index.d.mts 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. import * as vue from 'vue';
  2. import { ComponentPropsOptions, ExtractPropTypes } from 'vue';
  3. interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
  4. filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
  5. }
  6. type ClassValue = any;
  7. type Density = null | 'default' | 'comfortable' | 'compact';
  8. declare const allowedVariants: readonly ["elevated", "flat", "tonal", "outlined", "text", "plain"];
  9. type Variant = typeof allowedVariants[number];
  10. declare const VBtnGroup: {
  11. new (...args: any[]): vue.CreateComponentPublicInstance<{
  12. variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
  13. style: vue.StyleValue;
  14. tag: string;
  15. tile: boolean;
  16. density: Density;
  17. divided: boolean;
  18. } & {
  19. border?: string | number | boolean | undefined;
  20. color?: string | undefined;
  21. class?: any;
  22. theme?: string | undefined;
  23. elevation?: string | number | undefined;
  24. rounded?: string | number | boolean | undefined;
  25. baseColor?: string | undefined;
  26. } & {
  27. $children?: vue.VNodeChild | {
  28. default?: (() => vue.VNodeChild) | undefined;
  29. } | (() => vue.VNodeChild);
  30. 'v-slots'?: {
  31. default?: false | (() => vue.VNodeChild) | undefined;
  32. } | undefined;
  33. } & {
  34. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  35. }, void, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
  36. variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
  37. style: vue.StyleValue;
  38. tag: string;
  39. tile: boolean;
  40. density: Density;
  41. divided: boolean;
  42. } & {
  43. border?: string | number | boolean | undefined;
  44. color?: string | undefined;
  45. class?: any;
  46. theme?: string | undefined;
  47. elevation?: string | number | undefined;
  48. rounded?: string | number | boolean | undefined;
  49. baseColor?: string | undefined;
  50. } & {
  51. $children?: vue.VNodeChild | {
  52. default?: (() => vue.VNodeChild) | undefined;
  53. } | (() => vue.VNodeChild);
  54. 'v-slots'?: {
  55. default?: false | (() => vue.VNodeChild) | undefined;
  56. } | undefined;
  57. } & {
  58. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  59. }, {
  60. variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
  61. style: vue.StyleValue;
  62. tag: string;
  63. rounded: string | number | boolean;
  64. tile: boolean;
  65. density: Density;
  66. divided: boolean;
  67. }, true, {}, vue.SlotsType<Partial<{
  68. default: () => vue.VNode[];
  69. }>>, {
  70. P: {};
  71. B: {};
  72. D: {};
  73. C: {};
  74. M: {};
  75. Defaults: {};
  76. }, {
  77. variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
  78. style: vue.StyleValue;
  79. tag: string;
  80. tile: boolean;
  81. density: Density;
  82. divided: boolean;
  83. } & {
  84. border?: string | number | boolean | undefined;
  85. color?: string | undefined;
  86. class?: any;
  87. theme?: string | undefined;
  88. elevation?: string | number | undefined;
  89. rounded?: string | number | boolean | undefined;
  90. baseColor?: string | undefined;
  91. } & {
  92. $children?: vue.VNodeChild | {
  93. default?: (() => vue.VNodeChild) | undefined;
  94. } | (() => vue.VNodeChild);
  95. 'v-slots'?: {
  96. default?: false | (() => vue.VNodeChild) | undefined;
  97. } | undefined;
  98. } & {
  99. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  100. }, {}, {}, {}, {}, {
  101. variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
  102. style: vue.StyleValue;
  103. tag: string;
  104. rounded: string | number | boolean;
  105. tile: boolean;
  106. density: Density;
  107. divided: boolean;
  108. }>;
  109. __isFragment?: never;
  110. __isTeleport?: never;
  111. __isSuspense?: never;
  112. } & vue.ComponentOptionsBase<{
  113. variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
  114. style: vue.StyleValue;
  115. tag: string;
  116. tile: boolean;
  117. density: Density;
  118. divided: boolean;
  119. } & {
  120. border?: string | number | boolean | undefined;
  121. color?: string | undefined;
  122. class?: any;
  123. theme?: string | undefined;
  124. elevation?: string | number | undefined;
  125. rounded?: string | number | boolean | undefined;
  126. baseColor?: string | undefined;
  127. } & {
  128. $children?: vue.VNodeChild | {
  129. default?: (() => vue.VNodeChild) | undefined;
  130. } | (() => vue.VNodeChild);
  131. 'v-slots'?: {
  132. default?: false | (() => vue.VNodeChild) | undefined;
  133. } | undefined;
  134. } & {
  135. "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
  136. }, void, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
  137. variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
  138. style: vue.StyleValue;
  139. tag: string;
  140. rounded: string | number | boolean;
  141. tile: boolean;
  142. density: Density;
  143. divided: boolean;
  144. }, {}, string, vue.SlotsType<Partial<{
  145. default: () => vue.VNode[];
  146. }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
  147. color: StringConstructor;
  148. variant: {
  149. type: vue.PropType<Variant>;
  150. default: string;
  151. validator: (v: any) => boolean;
  152. };
  153. theme: StringConstructor;
  154. tag: {
  155. type: StringConstructor;
  156. default: string;
  157. };
  158. rounded: {
  159. type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
  160. default: undefined;
  161. };
  162. tile: BooleanConstructor;
  163. elevation: {
  164. type: (StringConstructor | NumberConstructor)[];
  165. validator(v: any): boolean;
  166. };
  167. density: {
  168. type: vue.PropType<Density>;
  169. default: string;
  170. validator: (v: any) => boolean;
  171. };
  172. class: vue.PropType<ClassValue>;
  173. style: {
  174. type: vue.PropType<vue.StyleValue>;
  175. default: null;
  176. };
  177. border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
  178. baseColor: StringConstructor;
  179. divided: BooleanConstructor;
  180. }, vue.ExtractPropTypes<{
  181. color: StringConstructor;
  182. variant: {
  183. type: vue.PropType<Variant>;
  184. default: string;
  185. validator: (v: any) => boolean;
  186. };
  187. theme: StringConstructor;
  188. tag: {
  189. type: StringConstructor;
  190. default: string;
  191. };
  192. rounded: {
  193. type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
  194. default: undefined;
  195. };
  196. tile: BooleanConstructor;
  197. elevation: {
  198. type: (StringConstructor | NumberConstructor)[];
  199. validator(v: any): boolean;
  200. };
  201. density: {
  202. type: vue.PropType<Density>;
  203. default: string;
  204. validator: (v: any) => boolean;
  205. };
  206. class: vue.PropType<ClassValue>;
  207. style: {
  208. type: vue.PropType<vue.StyleValue>;
  209. default: null;
  210. };
  211. border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
  212. baseColor: StringConstructor;
  213. divided: BooleanConstructor;
  214. }>>;
  215. type VBtnGroup = InstanceType<typeof VBtnGroup>;
  216. export { VBtnGroup };