@byyuurin/ui 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +5 -3
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +2 -2
  5. package/dist/runtime/components/Accordion.vue +41 -41
  6. package/dist/runtime/components/Accordion.vue.d.ts +11 -7
  7. package/dist/runtime/components/Alert.vue +63 -63
  8. package/dist/runtime/components/Alert.vue.d.ts +4 -4
  9. package/dist/runtime/components/App.vue +11 -10
  10. package/dist/runtime/components/App.vue.d.ts +11 -7
  11. package/dist/runtime/components/Avatar.vue +29 -29
  12. package/dist/runtime/components/Avatar.vue.d.ts +4 -3
  13. package/dist/runtime/components/AvatarGroup.vue +4 -4
  14. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  15. package/dist/runtime/components/Badge.vue +32 -32
  16. package/dist/runtime/components/Badge.vue.d.ts +2 -2
  17. package/dist/runtime/components/Breadcrumb.vue +49 -49
  18. package/dist/runtime/components/Breadcrumb.vue.d.ts +10 -6
  19. package/dist/runtime/components/Button.vue +52 -51
  20. package/dist/runtime/components/Button.vue.d.ts +1 -1
  21. package/dist/runtime/components/Calendar.vue +74 -74
  22. package/dist/runtime/components/Calendar.vue.d.ts +16 -12
  23. package/dist/runtime/components/Card.vue +41 -41
  24. package/dist/runtime/components/Card.vue.d.ts +1 -1
  25. package/dist/runtime/components/Carousel.vue +66 -66
  26. package/dist/runtime/components/Carousel.vue.d.ts +14 -10
  27. package/dist/runtime/components/Checkbox.vue +46 -46
  28. package/dist/runtime/components/Checkbox.vue.d.ts +4 -3
  29. package/dist/runtime/components/CheckboxGroup.vue +29 -29
  30. package/dist/runtime/components/CheckboxGroup.vue.d.ts +11 -7
  31. package/dist/runtime/components/Chip.vue +15 -15
  32. package/dist/runtime/components/Chip.vue.d.ts +2 -2
  33. package/dist/runtime/components/Collapsible.vue +14 -14
  34. package/dist/runtime/components/Collapsible.vue.d.ts +2 -2
  35. package/dist/runtime/components/Drawer.vue +76 -76
  36. package/dist/runtime/components/Drawer.vue.d.ts +6 -6
  37. package/dist/runtime/components/DropdownMenu.vue +28 -28
  38. package/dist/runtime/components/DropdownMenu.vue.d.ts +17 -9
  39. package/dist/runtime/components/DropdownMenuContent.vue +152 -153
  40. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +11 -7
  41. package/dist/runtime/components/FieldGroup.vue +3 -3
  42. package/dist/runtime/components/FieldGroup.vue.d.ts +2 -2
  43. package/dist/runtime/components/Form.vue +9 -9
  44. package/dist/runtime/components/Form.vue.d.ts +13 -8
  45. package/dist/runtime/components/FormField.vue +39 -38
  46. package/dist/runtime/components/FormField.vue.d.ts +7 -2
  47. package/dist/runtime/components/Icon.vue +2 -2
  48. package/dist/runtime/components/Icon.vue.d.ts +1 -1
  49. package/dist/runtime/components/Input.vue +48 -48
  50. package/dist/runtime/components/Input.vue.d.ts +16 -12
  51. package/dist/runtime/components/InputNumber.vue +47 -47
  52. package/dist/runtime/components/InputNumber.vue.d.ts +128 -124
  53. package/dist/runtime/components/InputTags.vue +54 -53
  54. package/dist/runtime/components/InputTags.vue.d.ts +16 -11
  55. package/dist/runtime/components/Kbd.vue +3 -3
  56. package/dist/runtime/components/Kbd.vue.d.ts +2 -2
  57. package/dist/runtime/components/Link.vue +26 -25
  58. package/dist/runtime/components/Link.vue.d.ts +16 -6
  59. package/dist/runtime/components/LinkBase.vue +3 -3
  60. package/dist/runtime/components/LinkBase.vue.d.ts +2 -2
  61. package/dist/runtime/components/Marquee.vue +5 -5
  62. package/dist/runtime/components/Marquee.vue.d.ts +3 -3
  63. package/dist/runtime/components/Modal.vue +74 -74
  64. package/dist/runtime/components/Modal.vue.d.ts +6 -6
  65. package/dist/runtime/components/NavigationMenu.vue +228 -228
  66. package/dist/runtime/components/NavigationMenu.vue.d.ts +11 -7
  67. package/dist/runtime/components/OverlayProvider.vue +9 -9
  68. package/dist/runtime/components/Pagination.vue +47 -47
  69. package/dist/runtime/components/Pagination.vue.d.ts +4 -4
  70. package/dist/runtime/components/PinInput.vue +23 -23
  71. package/dist/runtime/components/PinInput.vue.d.ts +14 -10
  72. package/dist/runtime/components/Popover.vue +22 -22
  73. package/dist/runtime/components/Popover.vue.d.ts +11 -7
  74. package/dist/runtime/components/Progress.vue +25 -25
  75. package/dist/runtime/components/Progress.vue.d.ts +2 -2
  76. package/dist/runtime/components/RadioGroup.vue +50 -50
  77. package/dist/runtime/components/RadioGroup.vue.d.ts +11 -7
  78. package/dist/runtime/components/ScrollArea.vue +32 -32
  79. package/dist/runtime/components/ScrollArea.vue.d.ts +2 -2
  80. package/dist/runtime/components/Select.vue +299 -148
  81. package/dist/runtime/components/Select.vue.d.ts +103 -123
  82. package/dist/runtime/components/Separator.vue +30 -30
  83. package/dist/runtime/components/Separator.vue.d.ts +2 -2
  84. package/dist/runtime/components/Skeleton.vue +11 -11
  85. package/dist/runtime/components/Skeleton.vue.d.ts +2 -2
  86. package/dist/runtime/components/Slider.vue +25 -25
  87. package/dist/runtime/components/Slider.vue.d.ts +11 -7
  88. package/dist/runtime/components/Stepper.vue +116 -0
  89. package/dist/runtime/components/Stepper.vue.d.ts +83 -0
  90. package/dist/runtime/components/Switch.vue +30 -30
  91. package/dist/runtime/components/Switch.vue.d.ts +4 -3
  92. package/dist/runtime/components/Table.vue +137 -137
  93. package/dist/runtime/components/Table.vue.d.ts +13 -8
  94. package/dist/runtime/components/Tabs.vue +74 -74
  95. package/dist/runtime/components/Tabs.vue.d.ts +12 -8
  96. package/dist/runtime/components/Textarea.vue +47 -47
  97. package/dist/runtime/components/Textarea.vue.d.ts +16 -11
  98. package/dist/runtime/components/Timeline.vue +47 -47
  99. package/dist/runtime/components/Timeline.vue.d.ts +11 -7
  100. package/dist/runtime/components/Toast.vue +93 -93
  101. package/dist/runtime/components/Toast.vue.d.ts +5 -5
  102. package/dist/runtime/components/ToastProvider.vue +29 -29
  103. package/dist/runtime/components/ToastProvider.vue.d.ts +3 -3
  104. package/dist/runtime/components/Tooltip.vue +24 -25
  105. package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
  106. package/dist/runtime/components/Tree.vue +241 -0
  107. package/dist/runtime/components/Tree.vue.d.ts +121 -0
  108. package/dist/runtime/composables/defineShortcuts.d.ts +1 -0
  109. package/dist/runtime/composables/defineShortcuts.js +44 -8
  110. package/dist/runtime/composables/useLocale.d.ts +12 -0
  111. package/dist/runtime/locale/en.d.ts +6 -0
  112. package/dist/runtime/locale/en.js +6 -0
  113. package/dist/runtime/locale/zh_tw.d.ts +6 -0
  114. package/dist/runtime/locale/zh_tw.js +6 -0
  115. package/dist/runtime/types/html.d.ts +8 -0
  116. package/dist/runtime/types/html.js +0 -0
  117. package/dist/runtime/types/index.d.ts +2 -0
  118. package/dist/runtime/types/index.js +2 -0
  119. package/dist/runtime/types/input.d.ts +5 -5
  120. package/dist/runtime/types/locale.d.ts +6 -0
  121. package/dist/runtime/types/unocss.d.ts +4 -4
  122. package/dist/runtime/types/utils.d.ts +3 -3
  123. package/dist/runtime/utils/index.d.ts +3 -3
  124. package/dist/runtime/utils/link.d.ts +2 -1
  125. package/dist/runtime/utils/link.js +40 -29
  126. package/dist/runtime/vue/components/Icon.vue +2 -2
  127. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
  128. package/dist/runtime/vue/components/Link.vue +7 -12
  129. package/dist/runtime/vue/components/Link.vue.d.ts +11 -40
  130. package/dist/setup.d.mts +1 -1
  131. package/dist/shared/{ui.CzIlLITK.mjs → ui.9kQouwss.mjs} +5 -3
  132. package/dist/shared/{ui.DpbffTXs.d.mts → ui.D8Bg1HWt.d.mts} +2 -0
  133. package/dist/shared/{ui.DLOxhmP0.mjs → ui.DpkP12cX.mjs} +262 -17
  134. package/dist/unocss.mjs +1 -1
  135. package/dist/unplugin.d.mts +1 -1
  136. package/dist/unplugin.mjs +2 -2
  137. package/dist/vite.d.mts +1 -1
  138. package/dist/vite.mjs +2 -2
  139. package/package.json +29 -29
  140. package/vue-plugin.d.ts +5 -5
@@ -1,11 +1,13 @@
1
1
  import type { VariantProps } from '@byyuurin/ui-kit';
2
2
  import type { NumberFieldRootProps } from 'reka-ui';
3
3
  import theme from '#build/ui/input-number';
4
- import type { ButtonProps, ComponentBaseProps, ComponentUIProps, IconProps } from '../types';
4
+ import type { ButtonProps, ComponentBaseProps, ComponentUIProps, IconProps, LinkPropsKeys } from '../types';
5
+ import type { InputHTMLAttributes } from '../types/html';
5
6
  import type { ModelModifiers } from '../types/input';
6
7
  import type { MaybeNull, StaticSlot } from '../types/utils';
7
8
  type ThemeVariants = VariantProps<typeof theme>;
8
- export interface InputNumberProps extends ComponentBaseProps, Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly'> {
9
+ type InputNumberValue = MaybeNull<number>;
10
+ export interface InputNumberProps<T extends InputNumberValue = InputNumberValue> extends ComponentBaseProps, Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly'>, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'min' | 'max' | 'readonly' | 'required' | 'step' | 'name' | 'placeholder'> {
9
11
  /**
10
12
  * The element or component this component should render as.
11
13
  * @default "div"
@@ -30,7 +32,7 @@ export interface InputNumberProps extends ComponentBaseProps, Pick<NumberFieldRo
30
32
  * Configure the increment button. The `color` and `size` are inherited.
31
33
  * @default { variant: 'link' }
32
34
  */
33
- increment?: boolean | ButtonProps;
35
+ increment?: boolean | Omit<ButtonProps, LinkPropsKeys>;
34
36
  /**
35
37
  * The icon displayed to increment the value.
36
38
  * @default app.icons.plus
@@ -42,7 +44,7 @@ export interface InputNumberProps extends ComponentBaseProps, Pick<NumberFieldRo
42
44
  * Configure the decrement button. The `color` and `size` are inherited.
43
45
  * @default { variant: 'link' }
44
46
  */
45
- decrement?: boolean | ButtonProps;
47
+ decrement?: boolean | Omit<ButtonProps, LinkPropsKeys>;
46
48
  /**
47
49
  * The icon displayed to decrement the value.
48
50
  * @default app.icons.minus
@@ -52,11 +54,11 @@ export interface InputNumberProps extends ComponentBaseProps, Pick<NumberFieldRo
52
54
  decrementDisabled?: boolean;
53
55
  autofocus?: boolean;
54
56
  autofocusDelay?: number;
55
- modelModifiers?: Pick<ModelModifiers, 'optional'>;
57
+ modelModifiers?: Pick<ModelModifiers<T>, 'optional'>;
56
58
  ui?: ComponentUIProps<typeof theme>;
57
59
  }
58
- export interface InputNumberEmits {
59
- 'update:modelValue': [value: number];
60
+ export interface InputNumberEmits<T extends InputNumberValue = InputNumberValue> {
61
+ 'update:modelValue': [value: T];
60
62
  'blur': [event: FocusEvent];
61
63
  'change': [event: Event];
62
64
  }
@@ -64,123 +66,125 @@ export interface InputNumberSlots {
64
66
  increment: StaticSlot;
65
67
  decrement: StaticSlot;
66
68
  }
67
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<InputNumberProps, {
68
- inputRef: import("vue").Ref<MaybeNull<{
69
- $: import("vue").ComponentInternalInstance;
70
- $data: {};
71
- $props: {
72
- readonly asChild?: boolean | undefined;
73
- readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
74
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
75
- $attrs: {
76
- [x: string]: unknown;
77
- };
78
- $refs: {
79
- [x: string]: unknown;
80
- };
81
- $slots: Readonly<{
82
- [name: string]: import("vue").Slot<any> | undefined;
83
- }>;
84
- $root: import("vue").ComponentPublicInstance | null;
85
- $parent: import("vue").ComponentPublicInstance | null;
86
- $host: Element | null;
87
- $emit: (event: string, ...args: any[]) => void;
88
- $el: any;
89
- $options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
90
- as: import("reka-ui").AsTag | import("vue").Component;
91
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
92
- beforeCreate?: (() => void) | (() => void)[];
93
- created?: (() => void) | (() => void)[];
94
- beforeMount?: (() => void) | (() => void)[];
95
- mounted?: (() => void) | (() => void)[];
96
- beforeUpdate?: (() => void) | (() => void)[];
97
- updated?: (() => void) | (() => void)[];
98
- activated?: (() => void) | (() => void)[];
99
- deactivated?: (() => void) | (() => void)[];
100
- beforeDestroy?: (() => void) | (() => void)[];
101
- beforeUnmount?: (() => void) | (() => void)[];
102
- destroyed?: (() => void) | (() => void)[];
103
- unmounted?: (() => void) | (() => void)[];
104
- renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
105
- renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
106
- errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
107
- };
108
- $forceUpdate: () => void;
109
- $nextTick: typeof import("vue").nextTick;
110
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
111
- } & Readonly<{
112
- as: import("reka-ui").AsTag | import("vue").Component;
113
- }> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
114
- $slots: {
115
- default?: (props: {}) => any;
116
- };
117
- }>, MaybeNull<{
118
- $: import("vue").ComponentInternalInstance;
119
- $data: {};
120
- $props: {
121
- readonly asChild?: boolean | undefined;
122
- readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
123
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
124
- $attrs: {
125
- [x: string]: unknown;
126
- };
127
- $refs: {
128
- [x: string]: unknown;
129
- };
130
- $slots: Readonly<{
131
- [name: string]: import("vue").Slot<any> | undefined;
132
- }>;
133
- $root: import("vue").ComponentPublicInstance | null;
134
- $parent: import("vue").ComponentPublicInstance | null;
135
- $host: Element | null;
136
- $emit: (event: string, ...args: any[]) => void;
137
- $el: any;
138
- $options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
139
- as: import("reka-ui").AsTag | import("vue").Component;
140
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
141
- beforeCreate?: (() => void) | (() => void)[];
142
- created?: (() => void) | (() => void)[];
143
- beforeMount?: (() => void) | (() => void)[];
144
- mounted?: (() => void) | (() => void)[];
145
- beforeUpdate?: (() => void) | (() => void)[];
146
- updated?: (() => void) | (() => void)[];
147
- activated?: (() => void) | (() => void)[];
148
- deactivated?: (() => void) | (() => void)[];
149
- beforeDestroy?: (() => void) | (() => void)[];
150
- beforeUnmount?: (() => void) | (() => void)[];
151
- destroyed?: (() => void) | (() => void)[];
152
- unmounted?: (() => void) | (() => void)[];
153
- renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
154
- renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
155
- errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
156
- };
157
- $forceUpdate: () => void;
158
- $nextTick: typeof import("vue").nextTick;
159
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
160
- } & Readonly<{
161
- as: import("reka-ui").AsTag | import("vue").Component;
162
- }> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
163
- $slots: {
164
- default?: (props: {}) => any;
165
- };
166
- }>>;
167
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
168
- change: (event: Event) => any;
169
- blur: (event: FocusEvent) => any;
170
- "update:modelValue": (value: number) => any;
171
- }, string, import("vue").PublicProps, Readonly<InputNumberProps> & Readonly<{
172
- onChange?: ((event: Event) => any) | undefined;
173
- onBlur?: ((event: FocusEvent) => any) | undefined;
174
- "onUpdate:modelValue"?: ((value: number) => any) | undefined;
175
- }>, {
176
- orientation: "horizontal" | "vertical";
177
- increment: boolean | ButtonProps;
178
- decrement: boolean | ButtonProps;
179
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, InputNumberSlots>;
180
69
  declare const _default: typeof __VLS_export;
181
70
  export default _default;
182
- type __VLS_WithSlots<T, S> = T & {
183
- new (): {
184
- $slots: S;
185
- };
71
+ declare const __VLS_export: <T extends InputNumberValue = InputNumberValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
72
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<InputNumberProps<T> & {
73
+ onBlur?: ((event: FocusEvent) => any) | undefined;
74
+ onChange?: ((event: Event) => any) | undefined;
75
+ "onUpdate:modelValue"?: ((value: T) => any) | undefined;
76
+ }> & (typeof globalThis extends {
77
+ __VLS_PROPS_FALLBACK: infer P;
78
+ } ? P : {});
79
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
80
+ inputRef: import("vue").Ref<MaybeNull<{
81
+ $: import("vue").ComponentInternalInstance;
82
+ $data: {};
83
+ $props: {
84
+ readonly asChild?: boolean | undefined;
85
+ readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
86
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
87
+ $attrs: {
88
+ [x: string]: unknown;
89
+ };
90
+ $refs: {
91
+ [x: string]: unknown;
92
+ };
93
+ $slots: Readonly<{
94
+ [name: string]: import("vue").Slot<any> | undefined;
95
+ }>;
96
+ $root: import("vue").ComponentPublicInstance | null;
97
+ $parent: import("vue").ComponentPublicInstance | null;
98
+ $host: Element | null;
99
+ $emit: (event: string, ...args: any[]) => void;
100
+ $el: any;
101
+ $options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
102
+ as: import("reka-ui").AsTag | import("vue").Component;
103
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
104
+ beforeCreate?: (() => void) | (() => void)[];
105
+ created?: (() => void) | (() => void)[];
106
+ beforeMount?: (() => void) | (() => void)[];
107
+ mounted?: (() => void) | (() => void)[];
108
+ beforeUpdate?: (() => void) | (() => void)[];
109
+ updated?: (() => void) | (() => void)[];
110
+ activated?: (() => void) | (() => void)[];
111
+ deactivated?: (() => void) | (() => void)[];
112
+ beforeDestroy?: (() => void) | (() => void)[];
113
+ beforeUnmount?: (() => void) | (() => void)[];
114
+ destroyed?: (() => void) | (() => void)[];
115
+ unmounted?: (() => void) | (() => void)[];
116
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
117
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
118
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
119
+ };
120
+ $forceUpdate: () => void;
121
+ $nextTick: typeof import("vue").nextTick;
122
+ $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
123
+ } & Readonly<{
124
+ as: import("reka-ui").AsTag | import("vue").Component;
125
+ }> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
126
+ $slots: {
127
+ default?: (props: {}) => any;
128
+ };
129
+ }>, MaybeNull<{
130
+ $: import("vue").ComponentInternalInstance;
131
+ $data: {};
132
+ $props: {
133
+ readonly asChild?: boolean | undefined;
134
+ readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
135
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
136
+ $attrs: {
137
+ [x: string]: unknown;
138
+ };
139
+ $refs: {
140
+ [x: string]: unknown;
141
+ };
142
+ $slots: Readonly<{
143
+ [name: string]: import("vue").Slot<any> | undefined;
144
+ }>;
145
+ $root: import("vue").ComponentPublicInstance | null;
146
+ $parent: import("vue").ComponentPublicInstance | null;
147
+ $host: Element | null;
148
+ $emit: (event: string, ...args: any[]) => void;
149
+ $el: any;
150
+ $options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
151
+ as: import("reka-ui").AsTag | import("vue").Component;
152
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
153
+ beforeCreate?: (() => void) | (() => void)[];
154
+ created?: (() => void) | (() => void)[];
155
+ beforeMount?: (() => void) | (() => void)[];
156
+ mounted?: (() => void) | (() => void)[];
157
+ beforeUpdate?: (() => void) | (() => void)[];
158
+ updated?: (() => void) | (() => void)[];
159
+ activated?: (() => void) | (() => void)[];
160
+ deactivated?: (() => void) | (() => void)[];
161
+ beforeDestroy?: (() => void) | (() => void)[];
162
+ beforeUnmount?: (() => void) | (() => void)[];
163
+ destroyed?: (() => void) | (() => void)[];
164
+ unmounted?: (() => void) | (() => void)[];
165
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
166
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
167
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
168
+ };
169
+ $forceUpdate: () => void;
170
+ $nextTick: typeof import("vue").nextTick;
171
+ $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
172
+ } & Readonly<{
173
+ as: import("reka-ui").AsTag | import("vue").Component;
174
+ }> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
175
+ $slots: {
176
+ default?: (props: {}) => any;
177
+ };
178
+ }>>;
179
+ }>) => void;
180
+ attrs: any;
181
+ slots: InputNumberSlots;
182
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void);
183
+ }>) => import("vue").VNode & {
184
+ __ctx?: Awaited<typeof __VLS_setup>;
186
185
  };
186
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
187
+ [K in keyof T]: T[K];
188
+ } : {
189
+ [K in keyof T as K]: T[K];
190
+ }) & {};
@@ -61,6 +61,7 @@ const ui = computed(() => {
61
61
  const styler = cv(merge(theme, appConfig.ui.inputTags));
62
62
  return styler({
63
63
  ...props,
64
+ type: void 0,
64
65
  color: color.value,
65
66
  size: fieldGroupSize.value || formFieldSize.value,
66
67
  highlight: highlight.value,
@@ -99,57 +100,57 @@ defineExpose({
99
100
  </script>
100
101
 
101
102
  <template>
102
- <TagsInputRoot
103
- v-slot="{ modelValue: tags }"
104
- :model-value="props.modelValue"
105
- :default-value="props.defaultValue"
106
- :class="ui.root({ class: [ui.base({ class: props.ui?.base }), props.ui?.root, props.class] })"
107
- v-bind="{ ...rootProps, id, name, disabled }"
108
- data-part="root"
109
- @update:model-value="onUpdate"
110
- >
111
- <TagsInputItem
112
- v-for="(item, index) in tags"
113
- :key="index"
114
- :value="item"
115
- :class="ui.item({ class: props.ui?.item })"
116
- data-part="item"
117
- >
118
- <TagsInputItemText :class="ui.itemText({ class: props.ui?.itemText })" data-part="itemText">
119
- <slot name="item-text" :item="item" :index="index" :ui="ui"></slot>
120
- </TagsInputItemText>
121
-
122
- <TagsInputItemDelete :disabled="disabled" :class="ui.itemDelete({ class: props.ui?.itemDelete })" data-part="itemDelete">
123
- <slot name="item-delete" :item="item" :index="index" :ui="ui">
124
- <Icon :name="props.deleteIcon || appConfig.ui.icons.close" :class="ui.itemDeleteIcon({ class: props.ui?.itemDeleteIcon })" data-part="itemDeleteIcon" />
125
- </slot>
126
- </TagsInputItemDelete>
127
- </TagsInputItem>
128
-
129
- <TagsInputInput
130
- ref="inputRef"
131
- v-bind="{ ...$attrs, ...ariaAttrs }"
132
- :placeholder="props.placeholder"
133
- :max-length="props.maxLength"
134
- :class="ui.input({ class: props.ui?.input })"
135
- data-part="input"
136
- @blur="onBlur"
137
- @focus="onFocus"
138
- />
139
-
140
- <span v-if="isLeading || props.avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })" data-part="leading">
141
- <slot name="leading" :ui="ui">
142
- <Icon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" data-part="leadingIcon" />
143
- <Avatar v-else-if="props.avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="props.avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" data-part="leadingAvatar" />
144
- </slot>
145
- </span>
146
-
147
- <slot :ui="ui"></slot>
148
-
149
- <span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })" data-part="trailing">
150
- <slot name="trailing" :ui="ui">
151
- <Icon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" data-part="trailingIcon" />
152
- </slot>
153
- </span>
154
- </TagsInputRoot>
103
+ <TagsInputRoot
104
+ v-slot="{ modelValue: tags }"
105
+ :model-value="props.modelValue"
106
+ :default-value="props.defaultValue"
107
+ :class="ui.root({ class: [ui.base({ class: props.ui?.base }), props.ui?.root, props.class] })"
108
+ v-bind="{ ...rootProps, id, name, disabled }"
109
+ data-part="root"
110
+ @update:model-value="onUpdate"
111
+ >
112
+ <TagsInputItem
113
+ v-for="(item, index) in tags"
114
+ :key="index"
115
+ :value="item"
116
+ :class="ui.item({ class: props.ui?.item })"
117
+ data-part="item"
118
+ >
119
+ <TagsInputItemText :class="ui.itemText({ class: props.ui?.itemText })" data-part="itemText">
120
+ <slot name="item-text" :item="item" :index="index" :ui="ui"></slot>
121
+ </TagsInputItemText>
122
+
123
+ <TagsInputItemDelete :disabled="disabled" :class="ui.itemDelete({ class: props.ui?.itemDelete })" data-part="itemDelete">
124
+ <slot name="item-delete" :item="item" :index="index" :ui="ui">
125
+ <Icon :name="props.deleteIcon || appConfig.ui.icons.close" :class="ui.itemDeleteIcon({ class: props.ui?.itemDeleteIcon })" data-part="itemDeleteIcon" />
126
+ </slot>
127
+ </TagsInputItemDelete>
128
+ </TagsInputItem>
129
+
130
+ <TagsInputInput
131
+ ref="inputRef"
132
+ v-bind="{ ...$attrs, ...ariaAttrs }"
133
+ :placeholder="props.placeholder"
134
+ :max-length="props.maxLength"
135
+ :class="ui.input({ class: props.ui?.input })"
136
+ data-part="input"
137
+ @blur="onBlur"
138
+ @focus="onFocus"
139
+ />
140
+
141
+ <span v-if="isLeading || props.avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })" data-part="leading">
142
+ <slot name="leading" :ui="ui">
143
+ <Icon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" data-part="leadingIcon" />
144
+ <Avatar v-else-if="props.avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="props.avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" data-part="leadingAvatar" />
145
+ </slot>
146
+ </span>
147
+
148
+ <slot :ui="ui"></slot>
149
+
150
+ <span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })" data-part="trailing">
151
+ <slot name="trailing" :ui="ui">
152
+ <Icon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" data-part="trailingIcon" />
153
+ </slot>
154
+ </span>
155
+ </TagsInputRoot>
155
156
  </template>
@@ -3,10 +3,11 @@ import type { AcceptableInputValue, TagsInputRootEmits, TagsInputRootProps } fro
3
3
  import theme from '#build/ui/input-tags';
4
4
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
5
5
  import type { ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps } from '../types';
6
+ import type { InputHTMLAttributes } from '../types/html';
6
7
  import type { StaticSlot } from '../types/utils';
7
8
  type ThemeVariants = VariantProps<typeof theme>;
8
9
  export type InputTagsItem = AcceptableInputValue;
9
- export interface InputTagsProps<T extends InputTagsItem = InputTagsItem> extends ComponentBaseProps, Pick<TagsInputRootProps<T>, 'modelValue' | 'defaultValue' | 'addOnPaste' | 'addOnTab' | 'addOnBlur' | 'duplicate' | 'disabled' | 'delimiter' | 'max' | 'id' | 'convertValue' | 'displayValue' | 'name' | 'required'>, UseComponentIconsProps {
10
+ export interface InputTagsProps<T extends InputTagsItem = InputTagsItem> extends ComponentBaseProps, Pick<TagsInputRootProps<T>, 'modelValue' | 'defaultValue' | 'addOnPaste' | 'addOnTab' | 'addOnBlur' | 'duplicate' | 'disabled' | 'delimiter' | 'max' | 'id' | 'convertValue' | 'displayValue' | 'name' | 'required'>, UseComponentIconsProps, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'max' | 'required' | 'name' | 'placeholder'> {
10
11
  /**
11
12
  * The element or component this component should render as.
12
13
  * @default "div"
@@ -26,7 +27,7 @@ export interface InputTagsProps<T extends InputTagsItem = InputTagsItem> extends
26
27
  autofocusDelay?: number;
27
28
  /**
28
29
  * The icon displayed to delete a tag.
29
- * @default appConfig.ui.icons.close
30
+ * @default app.icons.close
30
31
  */
31
32
  deleteIcon?: IconProps['name'];
32
33
  /** Highlight the ring color like a focus state. */
@@ -59,27 +60,31 @@ export interface InputTagsSlots<T extends InputTagsItem = InputTagsItem> {
59
60
  ui: ComponentStyler<typeof theme>;
60
61
  }>;
61
62
  }
62
- declare const __VLS_export: <T extends InputTagsItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
63
- props: __VLS_PrettifyLocal<InputTagsProps<AcceptableInputValue> & {
64
- onChange?: ((event: Event) => any) | undefined;
63
+ declare const _default: typeof __VLS_export;
64
+ export default _default;
65
+ declare const __VLS_export: <T extends InputTagsItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
66
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<InputTagsProps<AcceptableInputValue> & {
65
67
  onBlur?: ((event: FocusEvent) => any) | undefined;
68
+ onChange?: ((event: Event) => any) | undefined;
66
69
  onFocus?: ((event: FocusEvent) => any) | undefined;
67
70
  onInvalid?: ((payload: T) => any) | undefined;
68
71
  "onUpdate:modelValue"?: ((payload: T[]) => any) | undefined;
69
72
  onAddTag?: ((payload: T) => any) | undefined;
70
73
  onRemoveTag?: ((payload: T) => any) | undefined;
71
- }> & import("vue").PublicProps;
74
+ }> & (typeof globalThis extends {
75
+ __VLS_PROPS_FALLBACK: infer P;
76
+ } ? P : {});
72
77
  expose: (exposed: import("vue").ShallowUnwrapRef<{
73
78
  inputRef: Readonly<import("vue").Ref<HTMLInputElement, HTMLInputElement>>;
74
79
  }>) => void;
75
80
  attrs: any;
76
81
  slots: InputTagsSlots<T>;
77
- emit: ((evt: "change", event: Event) => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void) & ((evt: "addTag", payload: T) => void) & ((evt: "removeTag", payload: T) => void);
82
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void) & ((evt: "addTag", payload: T) => void) & ((evt: "removeTag", payload: T) => void);
78
83
  }>) => import("vue").VNode & {
79
84
  __ctx?: Awaited<typeof __VLS_setup>;
80
85
  };
81
- declare const _default: typeof __VLS_export;
82
- export default _default;
83
- type __VLS_PrettifyLocal<T> = {
86
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
87
+ [K in keyof T]: T[K];
88
+ } : {
84
89
  [K in keyof T as K]: T[K];
85
- } & {};
90
+ }) & {};
@@ -26,7 +26,7 @@ const ui = computed(() => {
26
26
  </script>
27
27
 
28
28
  <template>
29
- <Primitive :as="props.as" :class="ui.base({ class: props.class })" data-part="base">
30
- <slot>{{ getKbdKey(props.value) }}</slot>
31
- </Primitive>
29
+ <Primitive :as="props.as" :class="ui.base({ class: props.class })" data-part="base">
30
+ <slot>{{ getKbdKey(props.value) }}</slot>
31
+ </Primitive>
32
32
  </template>
@@ -22,11 +22,11 @@ export interface KbdProps extends ComponentBaseProps {
22
22
  export interface KbdSlots {
23
23
  default: StaticSlot;
24
24
  }
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
25
27
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<KbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KbdProps> & Readonly<{}>, {
26
28
  as: import("reka-ui").AsTag | import("vue").Component;
27
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, KbdSlots>;
28
- declare const _default: typeof __VLS_export;
29
- export default _default;
30
30
  type __VLS_WithSlots<T, S> = T & {
31
31
  new (): {
32
32
  $slots: S;
@@ -29,13 +29,14 @@ const props = defineProps({
29
29
  to: { type: null, required: false },
30
30
  href: { type: null, required: false },
31
31
  external: { type: Boolean, required: false },
32
- target: { type: [String, Object], required: false },
33
- rel: { type: [String, Object], required: false },
32
+ target: { type: [String, Object, null], required: false },
33
+ rel: { type: [String, Object, null], required: false },
34
34
  noRel: { type: Boolean, required: false },
35
35
  prefetchedClass: { type: String, required: false },
36
36
  prefetch: { type: Boolean, required: false },
37
37
  prefetchOn: { type: [String, Object], required: false },
38
38
  noPrefetch: { type: Boolean, required: false },
39
+ trailingSlash: { type: String, required: false },
39
40
  activeClass: { type: String, required: false },
40
41
  exactActiveClass: { type: String, required: false },
41
42
  ariaCurrentValue: { type: String, required: false, default: "page" },
@@ -87,14 +88,14 @@ function resolveLinkClass({ route: route2, isActive, isExactActive }) {
87
88
  </script>
88
89
 
89
90
  <template>
90
- <NuxtLink
91
- v-slot="{ href, navigate, route: linkRoute, rel, target, isExternal, isActive, isExactActive }"
92
- v-bind="nuxtLinkProps"
93
- :to="to"
94
- custom
95
- >
96
- <template v-if="custom">
97
- <slot
91
+ <NuxtLink
92
+ v-slot="{ href, navigate, route: linkRoute, rel, target, isExternal, isActive, isExactActive }"
93
+ v-bind="nuxtLinkProps"
94
+ :to="to"
95
+ custom
96
+ >
97
+ <template v-if="custom">
98
+ <slot
98
99
  v-bind="{
99
100
  ...$attrs,
100
101
  ...props.exact && isExactActive ? { 'aria-current': props.ariaCurrentValue } : {},
@@ -105,13 +106,13 @@ function resolveLinkClass({ route: route2, isActive, isExactActive }) {
105
106
  target,
106
107
  isExternal,
107
108
  active: isLinkActive({ route: linkRoute, isActive, isExactActive })
108
- }"
109
- >
110
- {{ props.label }}
111
- </slot>
112
- </template>
113
- <LinkBase
114
- v-else
109
+ }"
110
+ >
111
+ {{ props.label }}
112
+ </slot>
113
+ </template>
114
+ <LinkBase
115
+ v-else
115
116
  v-bind="{
116
117
  ...$attrs,
117
118
  ...props.exact && isExactActive ? { 'aria-current': props.ariaCurrentValue } : {},
@@ -121,12 +122,12 @@ function resolveLinkClass({ route: route2, isActive, isExactActive }) {
121
122
  rel,
122
123
  target,
123
124
  isExternal
124
- }"
125
- :class="resolveLinkClass({ route: linkRoute, isActive, isExactActive })"
126
- >
127
- <slot :active="isLinkActive({ route: linkRoute, isActive, isExactActive })">
128
- {{ props.label }}
129
- </slot>
130
- </LinkBase>
131
- </NuxtLink>
125
+ }"
126
+ :class="resolveLinkClass({ route: linkRoute, isActive, isExactActive })"
127
+ >
128
+ <slot :active="isLinkActive({ route: linkRoute, isActive, isExactActive })">
129
+ {{ props.label }}
130
+ </slot>
131
+ </LinkBase>
132
+ </NuxtLink>
132
133
  </template>