index.d.mts 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. import * as vue from 'vue';
  2. import { ComponentPropsOptions, ExtractPropTypes, JSXComponent, PropType } from 'vue';
  3. declare const block: readonly ["top", "bottom"];
  4. declare const inline: readonly ["start", "end", "left", "right"];
  5. type Tblock = typeof block[number];
  6. type Tinline = typeof inline[number];
  7. type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
  8. interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
  9. filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
  10. }
  11. type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
  12. declare const IconValue: PropType<IconValue>;
  13. declare const VBadge: {
  14. new (...args: any[]): {
  15. $: vue.ComponentInternalInstance;
  16. $data: {};
  17. $props: {
  18. inline?: boolean | undefined;
  19. location?: NonNullable<Anchor> | undefined;
  20. transition?: NonNullable<string | boolean | (vue.TransitionProps & {
  21. component?: vue.Component | undefined;
  22. })> | undefined;
  23. label?: string | undefined;
  24. style?: vue.StyleValue | undefined;
  25. tag?: string | undefined;
  26. dot?: boolean | undefined;
  27. rounded?: string | number | boolean | undefined;
  28. floating?: boolean | undefined;
  29. modelValue?: boolean | undefined;
  30. bordered?: boolean | undefined;
  31. max?: string | number | undefined;
  32. key?: string | number | symbol | undefined;
  33. color?: string | undefined;
  34. content?: string | number | undefined;
  35. class?: any;
  36. icon?: IconValue | undefined;
  37. $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
  38. default?: (() => vue.VNodeChild) | undefined;
  39. badge?: (() => vue.VNodeChild) | undefined;
  40. };
  41. ref?: vue.VNodeRef | undefined;
  42. ref_for?: boolean | undefined;
  43. ref_key?: string | undefined;
  44. theme?: string | undefined;
  45. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  46. 'v-slots'?: {
  47. default?: false | (() => vue.VNodeChild) | undefined;
  48. badge?: false | (() => vue.VNodeChild) | undefined;
  49. } | undefined;
  50. onVnodeBeforeMount?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  51. [key: string]: any;
  52. }>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  53. [key: string]: any;
  54. }>) => void)[] | undefined;
  55. onVnodeMounted?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  56. [key: string]: any;
  57. }>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  58. [key: string]: any;
  59. }>) => void)[] | undefined;
  60. onVnodeBeforeUpdate?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  61. [key: string]: any;
  62. }>, oldVNode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  63. [key: string]: any;
  64. }>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  65. [key: string]: any;
  66. }>, oldVNode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  67. [key: string]: any;
  68. }>) => void)[] | undefined;
  69. onVnodeUpdated?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  70. [key: string]: any;
  71. }>, oldVNode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  72. [key: string]: any;
  73. }>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  74. [key: string]: any;
  75. }>, oldVNode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  76. [key: string]: any;
  77. }>) => void)[] | undefined;
  78. onVnodeBeforeUnmount?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  79. [key: string]: any;
  80. }>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  81. [key: string]: any;
  82. }>) => void)[] | undefined;
  83. onVnodeUnmounted?: ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  84. [key: string]: any;
  85. }>) => void) | ((vnode: vue.VNode<vue.RendererNode, vue.RendererElement, {
  86. [key: string]: any;
  87. }>) => void)[] | undefined;
  88. offsetX?: string | number | undefined;
  89. offsetY?: string | number | undefined;
  90. textColor?: string | undefined;
  91. "v-slot:badge"?: false | (() => vue.VNodeChild) | undefined;
  92. };
  93. $attrs: {
  94. [x: string]: unknown;
  95. };
  96. $refs: {
  97. [x: string]: unknown;
  98. };
  99. $slots: Readonly<{
  100. default?: (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
  101. [key: string]: any;
  102. }>[]) | undefined;
  103. badge?: (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
  104. [key: string]: any;
  105. }>[]) | undefined;
  106. }>;
  107. $root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
  108. $parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
  109. $emit: (event: string, ...args: any[]) => void;
  110. $el: any;
  111. $options: vue.ComponentOptionsBase<{
  112. inline: boolean;
  113. location: NonNullable<Anchor>;
  114. transition: NonNullable<string | boolean | (vue.TransitionProps & {
  115. component?: vue.Component | undefined;
  116. })>;
  117. label: string;
  118. style: vue.StyleValue;
  119. tag: string;
  120. dot: boolean;
  121. floating: boolean;
  122. modelValue: boolean;
  123. bordered: boolean;
  124. } & {
  125. max?: string | number | undefined;
  126. color?: string | undefined;
  127. content?: string | number | undefined;
  128. class?: any;
  129. icon?: IconValue | undefined;
  130. theme?: string | undefined;
  131. rounded?: string | number | boolean | undefined;
  132. offsetX?: string | number | undefined;
  133. offsetY?: string | number | undefined;
  134. textColor?: string | undefined;
  135. } & {
  136. $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
  137. default?: (() => vue.VNodeChild) | undefined;
  138. badge?: (() => vue.VNodeChild) | undefined;
  139. };
  140. 'v-slots'?: {
  141. default?: false | (() => vue.VNodeChild) | undefined;
  142. badge?: false | (() => vue.VNodeChild) | undefined;
  143. } | undefined;
  144. } & {
  145. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  146. "v-slot:badge"?: false | (() => vue.VNodeChild) | undefined;
  147. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
  148. inline: boolean;
  149. location: NonNullable<Anchor>;
  150. transition: NonNullable<string | boolean | (vue.TransitionProps & {
  151. component?: vue.Component | undefined;
  152. })>;
  153. label: string;
  154. style: vue.StyleValue;
  155. tag: string;
  156. dot: boolean;
  157. rounded: string | number | boolean;
  158. floating: boolean;
  159. modelValue: boolean;
  160. bordered: boolean;
  161. }, {}, string, vue.SlotsType<Partial<{
  162. default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
  163. [key: string]: any;
  164. }>[];
  165. badge: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
  166. [key: string]: any;
  167. }>[];
  168. }>>> & {
  169. beforeCreate?: ((() => void) | (() => void)[]) | undefined;
  170. created?: ((() => void) | (() => void)[]) | undefined;
  171. beforeMount?: ((() => void) | (() => void)[]) | undefined;
  172. mounted?: ((() => void) | (() => void)[]) | undefined;
  173. beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
  174. updated?: ((() => void) | (() => void)[]) | undefined;
  175. activated?: ((() => void) | (() => void)[]) | undefined;
  176. deactivated?: ((() => void) | (() => void)[]) | undefined;
  177. beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
  178. beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
  179. destroyed?: ((() => void) | (() => void)[]) | undefined;
  180. unmounted?: ((() => void) | (() => void)[]) | undefined;
  181. renderTracked?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
  182. renderTriggered?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
  183. errorCaptured?: (((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null, info: string) => boolean | void)[]) | undefined;
  184. };
  185. $forceUpdate: () => void;
  186. $nextTick: typeof vue.nextTick;
  187. $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: vue.WatchOptions<boolean> | undefined): vue.WatchStopHandle;
  188. } & {
  189. inline: boolean;
  190. location: NonNullable<Anchor>;
  191. transition: NonNullable<string | boolean | (vue.TransitionProps & {
  192. component?: vue.Component | undefined;
  193. })>;
  194. label: string;
  195. style: vue.StyleValue;
  196. tag: string;
  197. dot: boolean;
  198. floating: boolean;
  199. modelValue: boolean;
  200. bordered: boolean;
  201. } & {
  202. max?: string | number | undefined;
  203. color?: string | undefined;
  204. content?: string | number | undefined;
  205. class?: any;
  206. icon?: IconValue | undefined;
  207. theme?: string | undefined;
  208. rounded?: string | number | boolean | undefined;
  209. offsetX?: string | number | undefined;
  210. offsetY?: string | number | undefined;
  211. textColor?: string | undefined;
  212. } & {
  213. $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
  214. default?: (() => vue.VNodeChild) | undefined;
  215. badge?: (() => vue.VNodeChild) | undefined;
  216. };
  217. 'v-slots'?: {
  218. default?: false | (() => vue.VNodeChild) | undefined;
  219. badge?: false | (() => vue.VNodeChild) | undefined;
  220. } | undefined;
  221. } & {
  222. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  223. "v-slot:badge"?: false | (() => vue.VNodeChild) | undefined;
  224. } & vue.ShallowUnwrapRef<{}> & {} & vue.ComponentCustomProperties & {};
  225. __isFragment?: undefined;
  226. __isTeleport?: undefined;
  227. __isSuspense?: undefined;
  228. } & vue.ComponentOptionsBase<{
  229. inline: boolean;
  230. location: NonNullable<Anchor>;
  231. transition: NonNullable<string | boolean | (vue.TransitionProps & {
  232. component?: vue.Component | undefined;
  233. })>;
  234. label: string;
  235. style: vue.StyleValue;
  236. tag: string;
  237. dot: boolean;
  238. floating: boolean;
  239. modelValue: boolean;
  240. bordered: boolean;
  241. } & {
  242. max?: string | number | undefined;
  243. color?: string | undefined;
  244. content?: string | number | undefined;
  245. class?: any;
  246. icon?: IconValue | undefined;
  247. theme?: string | undefined;
  248. rounded?: string | number | boolean | undefined;
  249. offsetX?: string | number | undefined;
  250. offsetY?: string | number | undefined;
  251. textColor?: string | undefined;
  252. } & {
  253. $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
  254. default?: (() => vue.VNodeChild) | undefined;
  255. badge?: (() => vue.VNodeChild) | undefined;
  256. };
  257. 'v-slots'?: {
  258. default?: false | (() => vue.VNodeChild) | undefined;
  259. badge?: false | (() => vue.VNodeChild) | undefined;
  260. } | undefined;
  261. } & {
  262. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  263. "v-slot:badge"?: false | (() => vue.VNodeChild) | undefined;
  264. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
  265. inline: boolean;
  266. location: NonNullable<Anchor>;
  267. transition: NonNullable<string | boolean | (vue.TransitionProps & {
  268. component?: vue.Component | undefined;
  269. })>;
  270. label: string;
  271. style: vue.StyleValue;
  272. tag: string;
  273. dot: boolean;
  274. rounded: string | number | boolean;
  275. floating: boolean;
  276. modelValue: boolean;
  277. bordered: boolean;
  278. }, {}, string, vue.SlotsType<Partial<{
  279. default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
  280. [key: string]: any;
  281. }>[];
  282. badge: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
  283. [key: string]: any;
  284. }>[];
  285. }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
  286. transition: Omit<{
  287. type: vue.PropType<string | boolean | (vue.TransitionProps & {
  288. component?: vue.Component | undefined;
  289. })>;
  290. default: string;
  291. validator: (val: unknown) => boolean;
  292. }, "type" | "default"> & {
  293. type: vue.PropType<NonNullable<string | boolean | (vue.TransitionProps & {
  294. component?: vue.Component | undefined;
  295. })>>;
  296. default: NonNullable<string | boolean | (vue.TransitionProps & {
  297. component?: vue.Component | undefined;
  298. })>;
  299. };
  300. theme: StringConstructor;
  301. tag: {
  302. type: StringConstructor;
  303. default: string;
  304. };
  305. rounded: {
  306. type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
  307. default: undefined;
  308. };
  309. location: {
  310. type: vue.PropType<NonNullable<Anchor>>;
  311. default: NonNullable<Anchor>;
  312. };
  313. class: vue.PropType<any>;
  314. style: {
  315. type: vue.PropType<vue.StyleValue>;
  316. default: null;
  317. };
  318. bordered: BooleanConstructor;
  319. color: StringConstructor;
  320. content: (StringConstructor | NumberConstructor)[];
  321. dot: BooleanConstructor;
  322. floating: BooleanConstructor;
  323. icon: vue.PropType<IconValue>;
  324. inline: BooleanConstructor;
  325. label: {
  326. type: StringConstructor;
  327. default: string;
  328. };
  329. max: (StringConstructor | NumberConstructor)[];
  330. modelValue: {
  331. type: BooleanConstructor;
  332. default: boolean;
  333. };
  334. offsetX: (StringConstructor | NumberConstructor)[];
  335. offsetY: (StringConstructor | NumberConstructor)[];
  336. textColor: StringConstructor;
  337. }, vue.ExtractPropTypes<{
  338. transition: Omit<{
  339. type: vue.PropType<string | boolean | (vue.TransitionProps & {
  340. component?: vue.Component | undefined;
  341. })>;
  342. default: string;
  343. validator: (val: unknown) => boolean;
  344. }, "type" | "default"> & {
  345. type: vue.PropType<NonNullable<string | boolean | (vue.TransitionProps & {
  346. component?: vue.Component | undefined;
  347. })>>;
  348. default: NonNullable<string | boolean | (vue.TransitionProps & {
  349. component?: vue.Component | undefined;
  350. })>;
  351. };
  352. theme: StringConstructor;
  353. tag: {
  354. type: StringConstructor;
  355. default: string;
  356. };
  357. rounded: {
  358. type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
  359. default: undefined;
  360. };
  361. location: {
  362. type: vue.PropType<NonNullable<Anchor>>;
  363. default: NonNullable<Anchor>;
  364. };
  365. class: vue.PropType<any>;
  366. style: {
  367. type: vue.PropType<vue.StyleValue>;
  368. default: null;
  369. };
  370. bordered: BooleanConstructor;
  371. color: StringConstructor;
  372. content: (StringConstructor | NumberConstructor)[];
  373. dot: BooleanConstructor;
  374. floating: BooleanConstructor;
  375. icon: vue.PropType<IconValue>;
  376. inline: BooleanConstructor;
  377. label: {
  378. type: StringConstructor;
  379. default: string;
  380. };
  381. max: (StringConstructor | NumberConstructor)[];
  382. modelValue: {
  383. type: BooleanConstructor;
  384. default: boolean;
  385. };
  386. offsetX: (StringConstructor | NumberConstructor)[];
  387. offsetY: (StringConstructor | NumberConstructor)[];
  388. textColor: StringConstructor;
  389. }>>;
  390. type VBadge = InstanceType<typeof VBadge>;
  391. export { VBadge };