index.d.mts 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. import * as vue from 'vue';
  2. import { ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, PropType, ComponentPublicInstance, FunctionalComponent } from 'vue';
  3. // @ts-ignore
  4. import * as vue_router from 'vue-router';
  5. // @ts-ignore
  6. import { RouteLocationRaw } from 'vue-router';
  7. type SlotsToProps<U extends RawSlots, T = MakeInternalSlots<U>> = {
  8. $children?: (VNodeChild | (T extends {
  9. default: infer V;
  10. } ? V : {}) | {
  11. [K in keyof T]?: T[K];
  12. });
  13. 'v-slots'?: {
  14. [K in keyof T]?: T[K] | false;
  15. };
  16. } & {
  17. [K in keyof T as `v-slot:${K & string}`]?: T[K] | false;
  18. };
  19. type RawSlots = Record<string, unknown>;
  20. type Slot<T> = [T] extends [never] ? () => VNodeChild : (arg: T) => VNodeChild;
  21. type VueSlot<T> = [T] extends [never] ? () => VNode[] : (arg: T) => VNode[];
  22. type MakeInternalSlots<T extends RawSlots> = {
  23. [K in keyof T]: Slot<T[K]>;
  24. };
  25. type MakeSlots<T extends RawSlots> = {
  26. [K in keyof T]: VueSlot<T[K]>;
  27. };
  28. type GenericProps<Props, Slots extends Record<string, unknown>> = {
  29. $props: Props & SlotsToProps<Slots>;
  30. $slots: MakeSlots<Slots>;
  31. };
  32. interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
  33. filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
  34. }
  35. type ClassValue = any;
  36. type Density = null | 'default' | 'comfortable' | 'compact';
  37. type JSXComponent<Props = any> = {
  38. new (): ComponentPublicInstance<Props>;
  39. } | FunctionalComponent<Props>;
  40. type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
  41. declare const IconValue: PropType<IconValue>;
  42. interface LinkProps {
  43. href: string | undefined;
  44. replace: boolean | undefined;
  45. to: RouteLocationRaw | undefined;
  46. exact: boolean | undefined;
  47. }
  48. type InternalBreadcrumbItem = Partial<LinkProps> & {
  49. title: string;
  50. disabled?: boolean;
  51. };
  52. type BreadcrumbItem = string | InternalBreadcrumbItem;
  53. declare const VBreadcrumbs: {
  54. new (...args: any[]): vue.CreateComponentPublicInstance<{
  55. style: vue.StyleValue;
  56. disabled: boolean;
  57. tag: string;
  58. divider: string;
  59. tile: boolean;
  60. density: Density;
  61. } & {
  62. color?: string | undefined;
  63. class?: any;
  64. icon?: IconValue | undefined;
  65. rounded?: string | number | boolean | undefined;
  66. bgColor?: string | undefined;
  67. activeColor?: string | undefined;
  68. activeClass?: string | undefined;
  69. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<Record<string, any>, "$children" | "v-slots" | "v-slot:default" | "items" | "v-slot:prepend" | "v-slot:title" | "v-slot:item" | "v-slot:divider">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
  70. style: vue.StyleValue;
  71. disabled: boolean;
  72. tag: string;
  73. divider: string;
  74. tile: boolean;
  75. density: Density;
  76. } & {
  77. color?: string | undefined;
  78. class?: any;
  79. icon?: IconValue | undefined;
  80. rounded?: string | number | boolean | undefined;
  81. bgColor?: string | undefined;
  82. activeColor?: string | undefined;
  83. activeClass?: string | undefined;
  84. }, {
  85. style: vue.StyleValue;
  86. disabled: boolean;
  87. tag: string;
  88. divider: string;
  89. rounded: string | number | boolean;
  90. tile: boolean;
  91. density: Density;
  92. }, true, {}, vue.SlotsType<Partial<{
  93. prepend: () => vue.VNode[];
  94. title: (arg: {
  95. item: InternalBreadcrumbItem;
  96. index: number;
  97. }) => vue.VNode[];
  98. divider: (arg: {
  99. item: BreadcrumbItem;
  100. index: number;
  101. }) => vue.VNode[];
  102. item: (arg: {
  103. item: InternalBreadcrumbItem;
  104. index: number;
  105. }) => vue.VNode[];
  106. default: () => vue.VNode[];
  107. }>>, {
  108. P: {};
  109. B: {};
  110. D: {};
  111. C: {};
  112. M: {};
  113. Defaults: {};
  114. }, {
  115. style: vue.StyleValue;
  116. disabled: boolean;
  117. tag: string;
  118. divider: string;
  119. tile: boolean;
  120. density: Density;
  121. } & {
  122. color?: string | undefined;
  123. class?: any;
  124. icon?: IconValue | undefined;
  125. rounded?: string | number | boolean | undefined;
  126. bgColor?: string | undefined;
  127. activeColor?: string | undefined;
  128. activeClass?: string | undefined;
  129. }, {}, {}, {}, {}, {
  130. style: vue.StyleValue;
  131. disabled: boolean;
  132. tag: string;
  133. divider: string;
  134. rounded: string | number | boolean;
  135. tile: boolean;
  136. density: Density;
  137. }>;
  138. __isFragment?: never;
  139. __isTeleport?: never;
  140. __isSuspense?: never;
  141. } & vue.ComponentOptionsBase<{
  142. style: vue.StyleValue;
  143. disabled: boolean;
  144. tag: string;
  145. divider: string;
  146. tile: boolean;
  147. density: Density;
  148. } & {
  149. color?: string | undefined;
  150. class?: any;
  151. icon?: IconValue | undefined;
  152. rounded?: string | number | boolean | undefined;
  153. bgColor?: string | undefined;
  154. activeColor?: string | undefined;
  155. activeClass?: string | undefined;
  156. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<Record<string, any>, "$children" | "v-slots" | "v-slot:default" | "items" | "v-slot:prepend" | "v-slot:title" | "v-slot:item" | "v-slot:divider">, string, {
  157. style: vue.StyleValue;
  158. disabled: boolean;
  159. tag: string;
  160. divider: string;
  161. rounded: string | number | boolean;
  162. tile: boolean;
  163. density: Density;
  164. }, {}, string, vue.SlotsType<Partial<{
  165. prepend: () => vue.VNode[];
  166. title: (arg: {
  167. item: InternalBreadcrumbItem;
  168. index: number;
  169. }) => vue.VNode[];
  170. divider: (arg: {
  171. item: BreadcrumbItem;
  172. index: number;
  173. }) => vue.VNode[];
  174. item: (arg: {
  175. item: InternalBreadcrumbItem;
  176. index: number;
  177. }) => vue.VNode[];
  178. default: () => vue.VNode[];
  179. }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T extends BreadcrumbItem>(props: {
  180. items?: T[];
  181. }, slots: {
  182. prepend: never;
  183. title: {
  184. item: InternalBreadcrumbItem;
  185. index: number;
  186. };
  187. divider: {
  188. item: T;
  189. index: number;
  190. };
  191. item: {
  192. item: InternalBreadcrumbItem;
  193. index: number;
  194. };
  195. default: never;
  196. }) => GenericProps<typeof props, typeof slots>) & FilterPropsOptions<{
  197. tag: Omit<{
  198. type: StringConstructor;
  199. default: string;
  200. }, "type" | "default"> & {
  201. type: PropType<string>;
  202. default: string;
  203. };
  204. rounded: {
  205. type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
  206. default: undefined;
  207. };
  208. tile: BooleanConstructor;
  209. density: {
  210. type: PropType<Density>;
  211. default: string;
  212. validator: (v: any) => boolean;
  213. };
  214. class: PropType<ClassValue>;
  215. style: {
  216. type: PropType<vue.StyleValue>;
  217. default: null;
  218. };
  219. activeClass: StringConstructor;
  220. activeColor: StringConstructor;
  221. bgColor: StringConstructor;
  222. color: StringConstructor;
  223. disabled: BooleanConstructor;
  224. divider: {
  225. type: StringConstructor;
  226. default: string;
  227. };
  228. icon: PropType<IconValue>;
  229. items: {
  230. type: PropType<readonly BreadcrumbItem[]>;
  231. default: () => never[];
  232. };
  233. }, vue.ExtractPropTypes<{
  234. tag: Omit<{
  235. type: StringConstructor;
  236. default: string;
  237. }, "type" | "default"> & {
  238. type: PropType<string>;
  239. default: string;
  240. };
  241. rounded: {
  242. type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
  243. default: undefined;
  244. };
  245. tile: BooleanConstructor;
  246. density: {
  247. type: PropType<Density>;
  248. default: string;
  249. validator: (v: any) => boolean;
  250. };
  251. class: PropType<ClassValue>;
  252. style: {
  253. type: PropType<vue.StyleValue>;
  254. default: null;
  255. };
  256. activeClass: StringConstructor;
  257. activeColor: StringConstructor;
  258. bgColor: StringConstructor;
  259. color: StringConstructor;
  260. disabled: BooleanConstructor;
  261. divider: {
  262. type: StringConstructor;
  263. default: string;
  264. };
  265. icon: PropType<IconValue>;
  266. items: {
  267. type: PropType<readonly BreadcrumbItem[]>;
  268. default: () => never[];
  269. };
  270. }>>;
  271. type VBreadcrumbs = InstanceType<typeof VBreadcrumbs>;
  272. declare const VBreadcrumbsItem: {
  273. new (...args: any[]): vue.CreateComponentPublicInstance<{
  274. replace: boolean;
  275. exact: boolean;
  276. active: boolean;
  277. style: vue.StyleValue;
  278. disabled: boolean;
  279. tag: string;
  280. } & {
  281. color?: string | undefined;
  282. title?: string | undefined;
  283. class?: any;
  284. to?: vue_router.RouteLocationRaw | undefined;
  285. href?: string | undefined;
  286. activeColor?: string | undefined;
  287. activeClass?: string | undefined;
  288. } & {
  289. $children?: vue.VNodeChild | {
  290. default?: (() => vue.VNodeChild) | undefined;
  291. } | (() => vue.VNodeChild);
  292. 'v-slots'?: {
  293. default?: false | (() => vue.VNodeChild) | undefined;
  294. } | undefined;
  295. } & {
  296. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  297. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
  298. replace: boolean;
  299. exact: boolean;
  300. active: boolean;
  301. style: vue.StyleValue;
  302. disabled: boolean;
  303. tag: string;
  304. } & {
  305. color?: string | undefined;
  306. title?: string | undefined;
  307. class?: any;
  308. to?: vue_router.RouteLocationRaw | undefined;
  309. href?: string | undefined;
  310. activeColor?: string | undefined;
  311. activeClass?: string | undefined;
  312. } & {
  313. $children?: vue.VNodeChild | {
  314. default?: (() => vue.VNodeChild) | undefined;
  315. } | (() => vue.VNodeChild);
  316. 'v-slots'?: {
  317. default?: false | (() => vue.VNodeChild) | undefined;
  318. } | undefined;
  319. } & {
  320. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  321. }, {
  322. replace: boolean;
  323. exact: boolean;
  324. active: boolean;
  325. style: vue.StyleValue;
  326. disabled: boolean;
  327. tag: string;
  328. }, true, {}, vue.SlotsType<Partial<{
  329. default: () => vue.VNode[];
  330. }>>, {
  331. P: {};
  332. B: {};
  333. D: {};
  334. C: {};
  335. M: {};
  336. Defaults: {};
  337. }, {
  338. replace: boolean;
  339. exact: boolean;
  340. active: boolean;
  341. style: vue.StyleValue;
  342. disabled: boolean;
  343. tag: string;
  344. } & {
  345. color?: string | undefined;
  346. title?: string | undefined;
  347. class?: any;
  348. to?: vue_router.RouteLocationRaw | undefined;
  349. href?: string | undefined;
  350. activeColor?: string | undefined;
  351. activeClass?: string | undefined;
  352. } & {
  353. $children?: vue.VNodeChild | {
  354. default?: (() => vue.VNodeChild) | undefined;
  355. } | (() => vue.VNodeChild);
  356. 'v-slots'?: {
  357. default?: false | (() => vue.VNodeChild) | undefined;
  358. } | undefined;
  359. } & {
  360. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  361. }, {}, {}, {}, {}, {
  362. replace: boolean;
  363. exact: boolean;
  364. active: boolean;
  365. style: vue.StyleValue;
  366. disabled: boolean;
  367. tag: string;
  368. }>;
  369. __isFragment?: never;
  370. __isTeleport?: never;
  371. __isSuspense?: never;
  372. } & vue.ComponentOptionsBase<{
  373. replace: boolean;
  374. exact: boolean;
  375. active: boolean;
  376. style: vue.StyleValue;
  377. disabled: boolean;
  378. tag: string;
  379. } & {
  380. color?: string | undefined;
  381. title?: string | undefined;
  382. class?: any;
  383. to?: vue_router.RouteLocationRaw | undefined;
  384. href?: string | undefined;
  385. activeColor?: string | undefined;
  386. activeClass?: string | undefined;
  387. } & {
  388. $children?: vue.VNodeChild | {
  389. default?: (() => vue.VNodeChild) | undefined;
  390. } | (() => vue.VNodeChild);
  391. 'v-slots'?: {
  392. default?: false | (() => vue.VNodeChild) | undefined;
  393. } | undefined;
  394. } & {
  395. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  396. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
  397. replace: boolean;
  398. exact: boolean;
  399. active: boolean;
  400. style: vue.StyleValue;
  401. disabled: boolean;
  402. tag: string;
  403. }, {}, string, vue.SlotsType<Partial<{
  404. default: () => vue.VNode[];
  405. }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
  406. tag: Omit<{
  407. type: StringConstructor;
  408. default: string;
  409. }, "type" | "default"> & {
  410. type: vue.PropType<string>;
  411. default: string;
  412. };
  413. href: StringConstructor;
  414. replace: BooleanConstructor;
  415. to: vue.PropType<vue_router.RouteLocationRaw>;
  416. exact: BooleanConstructor;
  417. class: vue.PropType<ClassValue>;
  418. style: {
  419. type: vue.PropType<vue.StyleValue>;
  420. default: null;
  421. };
  422. active: BooleanConstructor;
  423. activeClass: StringConstructor;
  424. activeColor: StringConstructor;
  425. color: StringConstructor;
  426. disabled: BooleanConstructor;
  427. title: StringConstructor;
  428. }, vue.ExtractPropTypes<{
  429. tag: Omit<{
  430. type: StringConstructor;
  431. default: string;
  432. }, "type" | "default"> & {
  433. type: vue.PropType<string>;
  434. default: string;
  435. };
  436. href: StringConstructor;
  437. replace: BooleanConstructor;
  438. to: vue.PropType<vue_router.RouteLocationRaw>;
  439. exact: BooleanConstructor;
  440. class: vue.PropType<ClassValue>;
  441. style: {
  442. type: vue.PropType<vue.StyleValue>;
  443. default: null;
  444. };
  445. active: BooleanConstructor;
  446. activeClass: StringConstructor;
  447. activeColor: StringConstructor;
  448. color: StringConstructor;
  449. disabled: BooleanConstructor;
  450. title: StringConstructor;
  451. }>>;
  452. type VBreadcrumbsItem = InstanceType<typeof VBreadcrumbsItem>;
  453. declare const VBreadcrumbsDivider: {
  454. new (...args: any[]): vue.CreateComponentPublicInstance<{
  455. style: vue.StyleValue;
  456. } & {
  457. class?: any;
  458. divider?: string | number | undefined;
  459. } & {
  460. $children?: vue.VNodeChild | {
  461. default?: (() => vue.VNodeChild) | undefined;
  462. } | (() => vue.VNodeChild);
  463. 'v-slots'?: {
  464. default?: false | (() => vue.VNodeChild) | undefined;
  465. } | undefined;
  466. } & {
  467. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  468. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
  469. style: vue.StyleValue;
  470. } & {
  471. class?: any;
  472. divider?: string | number | undefined;
  473. } & {
  474. $children?: vue.VNodeChild | {
  475. default?: (() => vue.VNodeChild) | undefined;
  476. } | (() => vue.VNodeChild);
  477. 'v-slots'?: {
  478. default?: false | (() => vue.VNodeChild) | undefined;
  479. } | undefined;
  480. } & {
  481. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  482. }, {
  483. style: vue.StyleValue;
  484. }, true, {}, vue.SlotsType<Partial<{
  485. default: () => vue.VNode[];
  486. }>>, {
  487. P: {};
  488. B: {};
  489. D: {};
  490. C: {};
  491. M: {};
  492. Defaults: {};
  493. }, {
  494. style: vue.StyleValue;
  495. } & {
  496. class?: any;
  497. divider?: string | number | undefined;
  498. } & {
  499. $children?: vue.VNodeChild | {
  500. default?: (() => vue.VNodeChild) | undefined;
  501. } | (() => vue.VNodeChild);
  502. 'v-slots'?: {
  503. default?: false | (() => vue.VNodeChild) | undefined;
  504. } | undefined;
  505. } & {
  506. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  507. }, {}, {}, {}, {}, {
  508. style: vue.StyleValue;
  509. }>;
  510. __isFragment?: never;
  511. __isTeleport?: never;
  512. __isSuspense?: never;
  513. } & vue.ComponentOptionsBase<{
  514. style: vue.StyleValue;
  515. } & {
  516. class?: any;
  517. divider?: string | number | undefined;
  518. } & {
  519. $children?: vue.VNodeChild | {
  520. default?: (() => vue.VNodeChild) | undefined;
  521. } | (() => vue.VNodeChild);
  522. 'v-slots'?: {
  523. default?: false | (() => vue.VNodeChild) | undefined;
  524. } | undefined;
  525. } & {
  526. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  527. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
  528. style: vue.StyleValue;
  529. }, {}, string, vue.SlotsType<Partial<{
  530. default: () => vue.VNode[];
  531. }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
  532. class: vue.PropType<ClassValue>;
  533. style: {
  534. type: vue.PropType<vue.StyleValue>;
  535. default: null;
  536. };
  537. divider: (StringConstructor | NumberConstructor)[];
  538. }, vue.ExtractPropTypes<{
  539. class: vue.PropType<ClassValue>;
  540. style: {
  541. type: vue.PropType<vue.StyleValue>;
  542. default: null;
  543. };
  544. divider: (StringConstructor | NumberConstructor)[];
  545. }>>;
  546. type VBreadcrumbsDivider = InstanceType<typeof VBreadcrumbsDivider>;
  547. export { VBreadcrumbs, VBreadcrumbsDivider, VBreadcrumbsItem };