index.d.mts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. import * as vue from 'vue';
  2. import { ComponentPropsOptions, ExtractPropTypes, PropType, ComponentPublicInstance, FunctionalComponent, DirectiveBinding, WritableComputedRef, Ref, CSSProperties, VNode } from 'vue';
  3. type ClassValue = any;
  4. interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
  5. filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
  6. }
  7. declare function deepEqual(a: any, b: any): boolean;
  8. type Density = null | 'default' | 'comfortable' | 'compact';
  9. type JSXComponent<Props = any> = {
  10. new (): ComponentPublicInstance<Props>;
  11. } | FunctionalComponent<Props>;
  12. type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
  13. declare const IconValue: PropType<IconValue>;
  14. interface RippleDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
  15. value?: boolean | {
  16. class: string;
  17. };
  18. modifiers: {
  19. center?: boolean;
  20. circle?: boolean;
  21. stop?: boolean;
  22. };
  23. }
  24. type SelectionControlSlot = {
  25. model: WritableComputedRef<boolean>;
  26. textColorClasses: Ref<string[]>;
  27. textColorStyles: Ref<CSSProperties>;
  28. backgroundColorClasses: Ref<string[]>;
  29. backgroundColorStyles: Ref<CSSProperties>;
  30. inputNode: VNode;
  31. icon: IconValue | undefined;
  32. props: {
  33. onBlur: (e: Event) => void;
  34. onFocus: (e: FocusEvent) => void;
  35. id: string;
  36. };
  37. };
  38. declare const VRadio: {
  39. new (...args: any[]): vue.CreateComponentPublicInstance<{
  40. inline: boolean;
  41. error: boolean;
  42. style: vue.StyleValue;
  43. disabled: boolean | null;
  44. multiple: boolean | null;
  45. readonly: boolean | null;
  46. density: Density;
  47. ripple: boolean | {
  48. class: string;
  49. } | undefined;
  50. falseIcon: IconValue;
  51. trueIcon: IconValue;
  52. valueComparator: typeof deepEqual;
  53. } & {
  54. name?: string | undefined;
  55. type?: string | undefined;
  56. id?: string | undefined;
  57. color?: string | undefined;
  58. value?: any;
  59. label?: string | undefined;
  60. class?: any;
  61. theme?: string | undefined;
  62. modelValue?: any;
  63. baseColor?: string | undefined;
  64. defaultsTarget?: string | undefined;
  65. trueValue?: any;
  66. falseValue?: any;
  67. } & {
  68. $children?: vue.VNodeChild | ((arg: {
  69. backgroundColorClasses: vue.Ref<string[]>;
  70. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  71. }) => vue.VNodeChild) | {
  72. default?: ((arg: {
  73. backgroundColorClasses: vue.Ref<string[]>;
  74. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  75. }) => vue.VNodeChild) | undefined;
  76. label?: ((arg: {
  77. label: string | undefined;
  78. props: Record<string, unknown>;
  79. }) => vue.VNodeChild) | undefined;
  80. input?: ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  81. };
  82. 'v-slots'?: {
  83. default?: false | ((arg: {
  84. backgroundColorClasses: vue.Ref<string[]>;
  85. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  86. }) => vue.VNodeChild) | undefined;
  87. label?: false | ((arg: {
  88. label: string | undefined;
  89. props: Record<string, unknown>;
  90. }) => vue.VNodeChild) | undefined;
  91. input?: false | ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  92. } | undefined;
  93. } & {
  94. "v-slot:default"?: false | ((arg: {
  95. backgroundColorClasses: vue.Ref<string[]>;
  96. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  97. }) => vue.VNodeChild) | undefined;
  98. "v-slot:label"?: false | ((arg: {
  99. label: string | undefined;
  100. props: Record<string, unknown>;
  101. }) => vue.VNodeChild) | undefined;
  102. "v-slot:input"?: false | ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  103. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
  104. inline: boolean;
  105. error: boolean;
  106. style: vue.StyleValue;
  107. disabled: boolean | null;
  108. multiple: boolean | null;
  109. readonly: boolean | null;
  110. density: Density;
  111. ripple: boolean | {
  112. class: string;
  113. } | undefined;
  114. falseIcon: IconValue;
  115. trueIcon: IconValue;
  116. valueComparator: typeof deepEqual;
  117. } & {
  118. name?: string | undefined;
  119. type?: string | undefined;
  120. id?: string | undefined;
  121. color?: string | undefined;
  122. value?: any;
  123. label?: string | undefined;
  124. class?: any;
  125. theme?: string | undefined;
  126. modelValue?: any;
  127. baseColor?: string | undefined;
  128. defaultsTarget?: string | undefined;
  129. trueValue?: any;
  130. falseValue?: any;
  131. } & {
  132. $children?: vue.VNodeChild | ((arg: {
  133. backgroundColorClasses: vue.Ref<string[]>;
  134. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  135. }) => vue.VNodeChild) | {
  136. default?: ((arg: {
  137. backgroundColorClasses: vue.Ref<string[]>;
  138. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  139. }) => vue.VNodeChild) | undefined;
  140. label?: ((arg: {
  141. label: string | undefined;
  142. props: Record<string, unknown>;
  143. }) => vue.VNodeChild) | undefined;
  144. input?: ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  145. };
  146. 'v-slots'?: {
  147. default?: false | ((arg: {
  148. backgroundColorClasses: vue.Ref<string[]>;
  149. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  150. }) => vue.VNodeChild) | undefined;
  151. label?: false | ((arg: {
  152. label: string | undefined;
  153. props: Record<string, unknown>;
  154. }) => vue.VNodeChild) | undefined;
  155. input?: false | ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  156. } | undefined;
  157. } & {
  158. "v-slot:default"?: false | ((arg: {
  159. backgroundColorClasses: vue.Ref<string[]>;
  160. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  161. }) => vue.VNodeChild) | undefined;
  162. "v-slot:label"?: false | ((arg: {
  163. label: string | undefined;
  164. props: Record<string, unknown>;
  165. }) => vue.VNodeChild) | undefined;
  166. "v-slot:input"?: false | ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  167. }, {
  168. inline: boolean;
  169. error: boolean;
  170. style: vue.StyleValue;
  171. disabled: boolean | null;
  172. multiple: boolean | null;
  173. readonly: boolean | null;
  174. density: Density;
  175. ripple: boolean | {
  176. class: string;
  177. } | undefined;
  178. falseIcon: IconValue;
  179. trueIcon: IconValue;
  180. valueComparator: typeof deepEqual;
  181. }, true, {}, vue.SlotsType<Partial<{
  182. default: (arg: {
  183. backgroundColorClasses: vue.Ref<string[]>;
  184. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  185. }) => vue.VNode[];
  186. label: (arg: {
  187. label: string | undefined;
  188. props: Record<string, unknown>;
  189. }) => vue.VNode[];
  190. input: (arg: SelectionControlSlot) => vue.VNode[];
  191. }>>, {
  192. P: {};
  193. B: {};
  194. D: {};
  195. C: {};
  196. M: {};
  197. Defaults: {};
  198. }, {
  199. inline: boolean;
  200. error: boolean;
  201. style: vue.StyleValue;
  202. disabled: boolean | null;
  203. multiple: boolean | null;
  204. readonly: boolean | null;
  205. density: Density;
  206. ripple: boolean | {
  207. class: string;
  208. } | undefined;
  209. falseIcon: IconValue;
  210. trueIcon: IconValue;
  211. valueComparator: typeof deepEqual;
  212. } & {
  213. name?: string | undefined;
  214. type?: string | undefined;
  215. id?: string | undefined;
  216. color?: string | undefined;
  217. value?: any;
  218. label?: string | undefined;
  219. class?: any;
  220. theme?: string | undefined;
  221. modelValue?: any;
  222. baseColor?: string | undefined;
  223. defaultsTarget?: string | undefined;
  224. trueValue?: any;
  225. falseValue?: any;
  226. } & {
  227. $children?: vue.VNodeChild | ((arg: {
  228. backgroundColorClasses: vue.Ref<string[]>;
  229. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  230. }) => vue.VNodeChild) | {
  231. default?: ((arg: {
  232. backgroundColorClasses: vue.Ref<string[]>;
  233. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  234. }) => vue.VNodeChild) | undefined;
  235. label?: ((arg: {
  236. label: string | undefined;
  237. props: Record<string, unknown>;
  238. }) => vue.VNodeChild) | undefined;
  239. input?: ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  240. };
  241. 'v-slots'?: {
  242. default?: false | ((arg: {
  243. backgroundColorClasses: vue.Ref<string[]>;
  244. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  245. }) => vue.VNodeChild) | undefined;
  246. label?: false | ((arg: {
  247. label: string | undefined;
  248. props: Record<string, unknown>;
  249. }) => vue.VNodeChild) | undefined;
  250. input?: false | ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  251. } | undefined;
  252. } & {
  253. "v-slot:default"?: false | ((arg: {
  254. backgroundColorClasses: vue.Ref<string[]>;
  255. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  256. }) => vue.VNodeChild) | undefined;
  257. "v-slot:label"?: false | ((arg: {
  258. label: string | undefined;
  259. props: Record<string, unknown>;
  260. }) => vue.VNodeChild) | undefined;
  261. "v-slot:input"?: false | ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  262. }, {}, {}, {}, {}, {
  263. inline: boolean;
  264. error: boolean;
  265. style: vue.StyleValue;
  266. disabled: boolean | null;
  267. multiple: boolean | null;
  268. readonly: boolean | null;
  269. density: Density;
  270. ripple: boolean | {
  271. class: string;
  272. } | undefined;
  273. falseIcon: IconValue;
  274. trueIcon: IconValue;
  275. valueComparator: typeof deepEqual;
  276. }>;
  277. __isFragment?: never;
  278. __isTeleport?: never;
  279. __isSuspense?: never;
  280. } & vue.ComponentOptionsBase<{
  281. inline: boolean;
  282. error: boolean;
  283. style: vue.StyleValue;
  284. disabled: boolean | null;
  285. multiple: boolean | null;
  286. readonly: boolean | null;
  287. density: Density;
  288. ripple: boolean | {
  289. class: string;
  290. } | undefined;
  291. falseIcon: IconValue;
  292. trueIcon: IconValue;
  293. valueComparator: typeof deepEqual;
  294. } & {
  295. name?: string | undefined;
  296. type?: string | undefined;
  297. id?: string | undefined;
  298. color?: string | undefined;
  299. value?: any;
  300. label?: string | undefined;
  301. class?: any;
  302. theme?: string | undefined;
  303. modelValue?: any;
  304. baseColor?: string | undefined;
  305. defaultsTarget?: string | undefined;
  306. trueValue?: any;
  307. falseValue?: any;
  308. } & {
  309. $children?: vue.VNodeChild | ((arg: {
  310. backgroundColorClasses: vue.Ref<string[]>;
  311. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  312. }) => vue.VNodeChild) | {
  313. default?: ((arg: {
  314. backgroundColorClasses: vue.Ref<string[]>;
  315. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  316. }) => vue.VNodeChild) | undefined;
  317. label?: ((arg: {
  318. label: string | undefined;
  319. props: Record<string, unknown>;
  320. }) => vue.VNodeChild) | undefined;
  321. input?: ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  322. };
  323. 'v-slots'?: {
  324. default?: false | ((arg: {
  325. backgroundColorClasses: vue.Ref<string[]>;
  326. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  327. }) => vue.VNodeChild) | undefined;
  328. label?: false | ((arg: {
  329. label: string | undefined;
  330. props: Record<string, unknown>;
  331. }) => vue.VNodeChild) | undefined;
  332. input?: false | ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  333. } | undefined;
  334. } & {
  335. "v-slot:default"?: false | ((arg: {
  336. backgroundColorClasses: vue.Ref<string[]>;
  337. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  338. }) => vue.VNodeChild) | undefined;
  339. "v-slot:label"?: false | ((arg: {
  340. label: string | undefined;
  341. props: Record<string, unknown>;
  342. }) => vue.VNodeChild) | undefined;
  343. "v-slot:input"?: false | ((arg: SelectionControlSlot) => vue.VNodeChild) | undefined;
  344. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
  345. inline: boolean;
  346. error: boolean;
  347. style: vue.StyleValue;
  348. disabled: boolean | null;
  349. multiple: boolean | null;
  350. readonly: boolean | null;
  351. density: Density;
  352. ripple: boolean | {
  353. class: string;
  354. } | undefined;
  355. falseIcon: IconValue;
  356. trueIcon: IconValue;
  357. valueComparator: typeof deepEqual;
  358. }, {}, string, vue.SlotsType<Partial<{
  359. default: (arg: {
  360. backgroundColorClasses: vue.Ref<string[]>;
  361. backgroundColorStyles: vue.Ref<vue.CSSProperties>;
  362. }) => vue.VNode[];
  363. label: (arg: {
  364. label: string | undefined;
  365. props: Record<string, unknown>;
  366. }) => vue.VNode[];
  367. input: (arg: SelectionControlSlot) => vue.VNode[];
  368. }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
  369. theme: StringConstructor;
  370. density: {
  371. type: vue.PropType<Density>;
  372. default: string;
  373. validator: (v: any) => boolean;
  374. };
  375. class: vue.PropType<ClassValue>;
  376. style: {
  377. type: vue.PropType<vue.StyleValue>;
  378. default: null;
  379. };
  380. color: StringConstructor;
  381. disabled: {
  382. type: vue.PropType<boolean | null>;
  383. default: null;
  384. };
  385. defaultsTarget: StringConstructor;
  386. error: BooleanConstructor;
  387. id: StringConstructor;
  388. inline: BooleanConstructor;
  389. falseIcon: {
  390. type: vue.PropType<IconValue>;
  391. default: NonNullable<IconValue>;
  392. };
  393. trueIcon: {
  394. type: vue.PropType<IconValue>;
  395. default: NonNullable<IconValue>;
  396. };
  397. ripple: {
  398. type: vue.PropType<RippleDirectiveBinding["value"]>;
  399. default: boolean;
  400. };
  401. multiple: {
  402. type: vue.PropType<boolean | null>;
  403. default: null;
  404. };
  405. name: StringConstructor;
  406. readonly: {
  407. type: vue.PropType<boolean | null>;
  408. default: null;
  409. };
  410. modelValue: null;
  411. type: StringConstructor;
  412. valueComparator: {
  413. type: vue.PropType<typeof deepEqual>;
  414. default: typeof deepEqual;
  415. };
  416. label: StringConstructor;
  417. baseColor: StringConstructor;
  418. trueValue: null;
  419. falseValue: null;
  420. value: null;
  421. }, vue.ExtractPropTypes<{
  422. theme: StringConstructor;
  423. density: {
  424. type: vue.PropType<Density>;
  425. default: string;
  426. validator: (v: any) => boolean;
  427. };
  428. class: vue.PropType<ClassValue>;
  429. style: {
  430. type: vue.PropType<vue.StyleValue>;
  431. default: null;
  432. };
  433. color: StringConstructor;
  434. disabled: {
  435. type: vue.PropType<boolean | null>;
  436. default: null;
  437. };
  438. defaultsTarget: StringConstructor;
  439. error: BooleanConstructor;
  440. id: StringConstructor;
  441. inline: BooleanConstructor;
  442. falseIcon: {
  443. type: vue.PropType<IconValue>;
  444. default: NonNullable<IconValue>;
  445. };
  446. trueIcon: {
  447. type: vue.PropType<IconValue>;
  448. default: NonNullable<IconValue>;
  449. };
  450. ripple: {
  451. type: vue.PropType<RippleDirectiveBinding["value"]>;
  452. default: boolean;
  453. };
  454. multiple: {
  455. type: vue.PropType<boolean | null>;
  456. default: null;
  457. };
  458. name: StringConstructor;
  459. readonly: {
  460. type: vue.PropType<boolean | null>;
  461. default: null;
  462. };
  463. modelValue: null;
  464. type: StringConstructor;
  465. valueComparator: {
  466. type: vue.PropType<typeof deepEqual>;
  467. default: typeof deepEqual;
  468. };
  469. label: StringConstructor;
  470. baseColor: StringConstructor;
  471. trueValue: null;
  472. falseValue: null;
  473. value: null;
  474. }>>;
  475. type VRadio = InstanceType<typeof VRadio>;
  476. export { VRadio };