@nuxt/ui 3.0.1 → 3.1.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.
- package/.nuxt/ui/accordion.ts +25 -4
- package/.nuxt/ui/alert.ts +52 -31
- package/.nuxt/ui/avatar-group.ts +24 -3
- package/.nuxt/ui/avatar.ts +26 -5
- package/.nuxt/ui/badge.ts +56 -35
- package/.nuxt/ui/breadcrumb.ts +28 -7
- package/.nuxt/ui/button-group.ts +23 -2
- package/.nuxt/ui/button.ts +66 -45
- package/.nuxt/ui/calendar.ts +39 -18
- package/.nuxt/ui/card.ts +28 -7
- package/.nuxt/ui/carousel.ts +29 -8
- package/.nuxt/ui/checkbox-group.ts +82 -0
- package/.nuxt/ui/checkbox.ts +163 -29
- package/.nuxt/ui/chip.ts +31 -10
- package/.nuxt/ui/collapsible.ts +23 -2
- package/.nuxt/ui/color-picker.ts +26 -5
- package/.nuxt/ui/command-palette.ts +37 -16
- package/.nuxt/ui/container.ts +24 -3
- package/.nuxt/ui/context-menu.ts +56 -35
- package/.nuxt/ui/drawer.ts +33 -12
- package/.nuxt/ui/dropdown-menu.ts +57 -36
- package/.nuxt/ui/form-field.ts +29 -8
- package/.nuxt/ui/form.ts +23 -2
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/input-menu.ts +65 -44
- package/.nuxt/ui/input-number.ts +43 -22
- package/.nuxt/ui/input.ts +46 -25
- package/.nuxt/ui/kbd.ts +27 -6
- package/.nuxt/ui/link.ts +26 -5
- package/.nuxt/ui/modal.ts +28 -7
- package/.nuxt/ui/navigation-menu.ts +103 -84
- package/.nuxt/ui/pagination.ts +23 -2
- package/.nuxt/ui/pin-input.ts +43 -22
- package/.nuxt/ui/popover.ts +25 -4
- package/.nuxt/ui/progress.ts +40 -19
- package/.nuxt/ui/radio-group.ts +273 -37
- package/.nuxt/ui/select-menu.ts +59 -35
- package/.nuxt/ui/select.ts +55 -34
- package/.nuxt/ui/separator.ts +31 -10
- package/.nuxt/ui/skeleton.ts +24 -3
- package/.nuxt/ui/slideover.ts +27 -6
- package/.nuxt/ui/slider.ts +39 -18
- package/.nuxt/ui/stepper.ts +41 -20
- package/.nuxt/ui/switch.ts +44 -23
- package/.nuxt/ui/table.ts +38 -17
- package/.nuxt/ui/tabs.ts +55 -34
- package/.nuxt/ui/textarea.ts +63 -37
- package/.nuxt/ui/toast.ts +47 -26
- package/.nuxt/ui/toaster.ts +23 -2
- package/.nuxt/ui/tooltip.ts +25 -4
- package/.nuxt/ui/tree.ts +41 -20
- package/.nuxt/ui.css +56 -12
- package/README.md +11 -0
- package/cli/templates.mjs +18 -17
- package/dist/module.d.mts +2 -1
- package/dist/module.json +5 -5
- package/dist/module.mjs +11 -7
- package/dist/runtime/components/Accordion.vue +36 -92
- package/dist/runtime/components/Accordion.vue.d.ts +91 -0
- package/dist/runtime/components/Alert.vue +37 -100
- package/dist/runtime/components/Alert.vue.d.ts +96 -0
- package/dist/runtime/components/App.vue +28 -34
- package/dist/runtime/components/App.vue.d.ts +24 -0
- package/dist/runtime/components/Avatar.vue +47 -78
- package/dist/runtime/components/Avatar.vue.d.ts +60 -0
- package/dist/runtime/components/AvatarGroup.vue +40 -77
- package/dist/runtime/components/AvatarGroup.vue.d.ts +40 -0
- package/dist/runtime/components/Badge.vue +33 -62
- package/dist/runtime/components/Badge.vue.d.ts +62 -0
- package/dist/runtime/components/Breadcrumb.vue +36 -88
- package/dist/runtime/components/Breadcrumb.vue.d.ts +82 -0
- package/dist/runtime/components/Button.vue +96 -105
- package/dist/runtime/components/Button.vue.d.ts +73 -0
- package/dist/runtime/components/ButtonGroup.vue +20 -46
- package/dist/runtime/components/ButtonGroup.vue.d.ts +55 -0
- package/dist/runtime/components/Calendar.vue +73 -127
- package/dist/runtime/components/Calendar.vue.d.ts +107 -0
- package/dist/runtime/components/Card.vue +18 -40
- package/dist/runtime/components/Card.vue.d.ts +38 -0
- package/dist/runtime/components/Carousel.vue +112 -230
- package/dist/runtime/components/Carousel.vue.d.ts +120 -0
- package/dist/runtime/components/Checkbox.vue +52 -93
- package/dist/runtime/components/Checkbox.vue.d.ts +76 -0
- package/dist/runtime/components/CheckboxGroup.vue +121 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +75 -0
- package/dist/runtime/components/Chip.vue +26 -69
- package/dist/runtime/components/Chip.vue.d.ts +71 -0
- package/dist/runtime/components/Collapsible.vue +22 -41
- package/dist/runtime/components/Collapsible.vue.d.ts +50 -0
- package/dist/runtime/components/ColorPicker.vue +111 -197
- package/dist/runtime/components/ColorPicker.vue.d.ts +63 -0
- package/dist/runtime/components/CommandPalette.vue +94 -234
- package/dist/runtime/components/CommandPalette.vue.d.ts +173 -0
- package/dist/runtime/components/Container.vue +15 -28
- package/dist/runtime/components/Container.vue.d.ts +27 -0
- package/dist/runtime/components/ContextMenu.vue +32 -119
- package/dist/runtime/components/ContextMenu.vue.d.ts +127 -0
- package/dist/runtime/components/ContextMenuContent.vue +71 -72
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +105 -0
- package/dist/runtime/components/Drawer.vue +49 -87
- package/dist/runtime/components/Drawer.vue.d.ts +88 -0
- package/dist/runtime/components/DropdownMenu.vue +37 -129
- package/dist/runtime/components/DropdownMenu.vue.d.ts +141 -0
- package/dist/runtime/components/DropdownMenuContent.vue +76 -79
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +55 -0
- package/dist/runtime/components/Form.vue +135 -219
- package/dist/runtime/components/Form.vue.d.ts +66 -0
- package/dist/runtime/components/FormField.vue +36 -77
- package/dist/runtime/components/FormField.vue.d.ts +70 -0
- package/dist/runtime/components/Icon.vue +12 -19
- package/dist/runtime/components/Icon.vue.d.ts +17 -0
- package/dist/runtime/components/Input.vue +82 -140
- package/dist/runtime/components/Input.vue.d.ts +91 -0
- package/dist/runtime/components/InputMenu.vue +193 -302
- package/dist/runtime/components/InputMenu.vue.d.ts +312 -0
- package/dist/runtime/components/InputNumber.vue +71 -133
- package/dist/runtime/components/InputNumber.vue.d.ts +193 -0
- package/dist/runtime/components/Kbd.vue +20 -46
- package/dist/runtime/components/Kbd.vue.d.ts +55 -0
- package/dist/runtime/components/Link.vue +98 -173
- package/dist/runtime/components/Link.vue.d.ts +124 -0
- package/dist/runtime/components/LinkBase.vue +33 -41
- package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
- package/dist/runtime/components/Modal.vue +53 -116
- package/dist/runtime/components/Modal.vue.d.ts +109 -0
- package/dist/runtime/components/NavigationMenu.vue +78 -186
- package/dist/runtime/components/NavigationMenu.vue.d.ts +159 -0
- package/dist/runtime/components/OverlayProvider.vue +14 -18
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Pagination.vue +46 -140
- package/dist/runtime/components/Pagination.vue.d.ts +143 -0
- package/dist/runtime/components/PinInput.vue +61 -78
- package/dist/runtime/components/PinInput.vue.d.ts +68 -0
- package/dist/runtime/components/Popover.vue +47 -84
- package/dist/runtime/components/Popover.vue.d.ts +80 -0
- package/dist/runtime/components/Progress.vue +70 -131
- package/dist/runtime/components/Progress.vue.d.ts +97 -0
- package/dist/runtime/components/RadioGroup.vue +75 -126
- package/dist/runtime/components/RadioGroup.vue.d.ts +88 -0
- package/dist/runtime/components/Select.vue +115 -202
- package/dist/runtime/components/Select.vue.d.ts +139 -0
- package/dist/runtime/components/SelectMenu.vue +167 -281
- package/dist/runtime/components/SelectMenu.vue.d.ts +184 -0
- package/dist/runtime/components/Separator.vue +29 -71
- package/dist/runtime/components/Separator.vue.d.ts +75 -0
- package/dist/runtime/components/Skeleton.vue +21 -23
- package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
- package/dist/runtime/components/Slideover.vue +53 -120
- package/dist/runtime/components/Slideover.vue.d.ts +111 -0
- package/dist/runtime/components/Slider.vue +46 -84
- package/dist/runtime/components/Slider.vue.d.ts +71 -0
- package/dist/runtime/components/Stepper.vue +44 -113
- package/dist/runtime/components/Stepper.vue.d.ts +89 -0
- package/dist/runtime/components/Switch.vue +45 -93
- package/dist/runtime/components/Switch.vue.d.ts +73 -0
- package/dist/runtime/components/Table.vue +165 -264
- package/dist/runtime/components/Table.vue.d.ts +183 -0
- package/dist/runtime/components/Tabs.vue +40 -105
- package/dist/runtime/components/Tabs.vue.d.ts +104 -0
- package/dist/runtime/components/Textarea.vue +113 -158
- package/dist/runtime/components/Textarea.vue.d.ts +95 -0
- package/dist/runtime/components/Toast.vue +49 -110
- package/dist/runtime/components/Toast.vue.d.ts +95 -0
- package/dist/runtime/components/Toaster.vue +70 -107
- package/dist/runtime/components/Toaster.vue.d.ts +63 -0
- package/dist/runtime/components/Tooltip.vue +38 -65
- package/dist/runtime/components/Tooltip.vue.d.ts +65 -0
- package/dist/runtime/components/Tree.vue +57 -150
- package/dist/runtime/components/Tree.vue.d.ts +128 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.js +0 -1
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useFormField.d.ts +2 -2
- package/dist/runtime/composables/useFormField.js +1 -1
- package/dist/runtime/composables/useOverlay.d.ts +16 -8
- package/dist/runtime/composables/useOverlay.js +14 -6
- package/dist/runtime/composables/usePortal.d.ts +6 -0
- package/dist/runtime/composables/usePortal.js +17 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/inertia/components/Link.vue +146 -0
- package/dist/runtime/inertia/components/Link.vue.d.ts +92 -0
- package/dist/runtime/inertia/stubs.d.ts +43 -0
- package/dist/runtime/inertia/stubs.js +82 -0
- package/dist/runtime/locale/bg.d.ts +3 -0
- package/dist/runtime/locale/bg.js +54 -0
- package/dist/runtime/locale/hy.d.ts +3 -0
- package/dist/runtime/locale/hy.js +54 -0
- package/dist/runtime/locale/index.d.ts +6 -1
- package/dist/runtime/locale/index.js +6 -1
- package/dist/runtime/locale/kk.d.ts +3 -0
- package/dist/runtime/locale/kk.js +54 -0
- package/dist/runtime/locale/tj.d.ts +3 -0
- package/dist/runtime/locale/tj.js +54 -0
- package/dist/runtime/locale/ug_cn.d.ts +3 -0
- package/dist/runtime/locale/ug_cn.js +55 -0
- package/dist/runtime/types/form.d.ts +5 -1
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/types/utils.d.ts +70 -10
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +3 -0
- package/dist/runtime/utils/link.d.ts +4 -27
- package/dist/runtime/utils/link.js +32 -1
- package/dist/runtime/utils/tv.js +2 -2
- package/dist/runtime/vue/components/Icon.vue +7 -8
- package/dist/runtime/vue/components/Icon.vue.d.ts +14 -0
- package/dist/runtime/vue/components/Link.vue +118 -199
- package/dist/runtime/vue/components/Link.vue.d.ts +124 -0
- package/dist/runtime/vue/stubs.d.ts +5 -0
- package/dist/runtime/vue/stubs.js +11 -2
- package/dist/shared/{ui.BCaWD5Ek.mjs → ui.D7lOOabO.mjs} +623 -364
- package/dist/types.d.mts +5 -1
- package/dist/unplugin.d.mts +6 -1
- package/dist/unplugin.mjs +25 -4
- package/dist/vite.mjs +1 -1
- package/package.json +122 -64
- package/dist/module.cjs +0 -62
- package/dist/module.d.cts +0 -44
- package/dist/module.d.ts +0 -44
- package/dist/shared/ui.C6uTSFTI.cjs +0 -3555
- package/dist/types.d.ts +0 -1
- package/dist/unplugin.cjs +0 -232
- package/dist/unplugin.d.cts +0 -61
- package/dist/unplugin.d.ts +0 -61
- package/dist/vite.cjs +0 -23
- package/dist/vite.d.cts +0 -15
- package/dist/vite.d.ts +0 -15
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineLocale } from "../composables/defineLocale.js";
|
|
2
|
+
export default defineLocale({
|
|
3
|
+
name: "\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5",
|
|
4
|
+
code: "ug-CN",
|
|
5
|
+
dir: "rtl",
|
|
6
|
+
messages: {
|
|
7
|
+
inputMenu: {
|
|
8
|
+
noMatch: "\u0645\u0627\u0633 \u0643\u06D0\u0644\u0649\u062F\u0649\u063A\u0627\u0646 \u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
|
|
9
|
+
noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
|
|
10
|
+
create: '"{label}" \u0646\u0649 \u0642\u06C7\u0631\u06C7\u0634'
|
|
11
|
+
},
|
|
12
|
+
calendar: {
|
|
13
|
+
prevYear: "\u0626\u0627\u0644\u062F\u0649\u0646\u0642\u0649 \u064A\u0649\u0644",
|
|
14
|
+
nextYear: "\u0643\u06D0\u0644\u06D5\u0631 \u064A\u0649\u0644",
|
|
15
|
+
prevMonth: "\u0626\u0627\u0644\u062F\u0649\u0646\u0642\u0649 \u0626\u0627\u064A",
|
|
16
|
+
nextMonth: "\u0643\u06D0\u0644\u06D5\u0631 \u0626\u0627\u064A"
|
|
17
|
+
},
|
|
18
|
+
inputNumber: {
|
|
19
|
+
increment: "\u0643\u06C6\u067E\u06D5\u064A\u062A\u0649\u0634",
|
|
20
|
+
decrement: "\u0626\u0627\u0632\u0627\u064A\u062A\u0649\u0634"
|
|
21
|
+
},
|
|
22
|
+
commandPalette: {
|
|
23
|
+
placeholder: "\u0628\u06C7\u064A\u0631\u06C7\u0642 \u0643\u0649\u0631\u06AF\u06C8\u0632\u06C8\u06AD \u064A\u0627\u0643\u0649 \u0626\u0649\u0632\u062F\u06D5\u06AD...",
|
|
24
|
+
noMatch: "\u0645\u0627\u0633 \u0643\u06D0\u0644\u0649\u062F\u0649\u063A\u0627\u0646 \u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
|
|
25
|
+
noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
|
|
26
|
+
close: "\u062A\u0627\u0642\u0627\u0634"
|
|
27
|
+
},
|
|
28
|
+
selectMenu: {
|
|
29
|
+
noMatch: "\u0645\u0627\u0633 \u0643\u06D0\u0644\u0649\u062F\u0649\u063A\u0627\u0646 \u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
|
|
30
|
+
noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642",
|
|
31
|
+
create: '"{label}" \u0646\u0649 \u0642\u06C7\u0631\u06C7\u0634',
|
|
32
|
+
search: "\u0626\u0649\u0632\u062F\u06D5\u0634..."
|
|
33
|
+
},
|
|
34
|
+
toast: {
|
|
35
|
+
close: "\u062A\u0627\u0642\u0627\u0634"
|
|
36
|
+
},
|
|
37
|
+
carousel: {
|
|
38
|
+
prev: "\u0626\u0627\u0644\u062F\u0649\u0646\u0642\u0649 \u0628\u06D5\u062A",
|
|
39
|
+
next: "\u0643\u06D0\u064A\u0649\u0646\u0643\u0649 \u0628\u06D5\u062A",
|
|
40
|
+
goto: "{slide}-\u0628\u06D5\u062A\u0643\u06D5 \u0626\u0627\u062A\u0644\u0627\u0634"
|
|
41
|
+
},
|
|
42
|
+
modal: {
|
|
43
|
+
close: "\u062A\u0627\u0642\u0627\u0634"
|
|
44
|
+
},
|
|
45
|
+
slideover: {
|
|
46
|
+
close: "\u062A\u0627\u0642\u0627\u0634"
|
|
47
|
+
},
|
|
48
|
+
alert: {
|
|
49
|
+
close: "\u062A\u0627\u0642\u0627\u0634"
|
|
50
|
+
},
|
|
51
|
+
table: {
|
|
52
|
+
noData: "\u0633\u0627\u0646\u0644\u0649\u0642 \u0645\u06D5\u0644\u06C7\u0645\u0627\u062A \u064A\u0648\u0642"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
@@ -18,11 +18,14 @@ export interface Form<T extends object> {
|
|
|
18
18
|
submit(): Promise<void>;
|
|
19
19
|
disabled: ComputedRef<boolean>;
|
|
20
20
|
dirty: ComputedRef<boolean>;
|
|
21
|
+
loading: Ref<boolean>;
|
|
21
22
|
dirtyFields: DeepReadonly<Set<keyof T>>;
|
|
22
23
|
touchedFields: DeepReadonly<Set<keyof T>>;
|
|
23
24
|
blurredFields: DeepReadonly<Set<keyof T>>;
|
|
24
25
|
}
|
|
25
|
-
export type FormSchema<
|
|
26
|
+
export type FormSchema<I extends object = object, O extends object = I> = YupObjectSchema<I> | JoiSchema<I> | SuperstructSchema<any, any> | StandardSchemaV1<I, O>;
|
|
27
|
+
export type InferInput<Schema> = Schema extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Schema> : Schema extends YupObjectSchema<infer I> ? I : Schema extends JoiSchema<infer I> ? I : Schema extends SuperstructSchema<infer I, any> ? I : Schema extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Schema> : never;
|
|
28
|
+
export type InferOutput<Schema> = Schema extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<Schema> : Schema extends YupObjectSchema<infer O> ? O : Schema extends JoiSchema<infer O> ? O : Schema extends SuperstructSchema<infer O, any> ? O : never;
|
|
26
29
|
export type FormInputEvents = 'input' | 'blur' | 'change' | 'focus';
|
|
27
30
|
export interface FormError<P extends string = string> {
|
|
28
31
|
name?: P;
|
|
@@ -68,6 +71,7 @@ export interface FormFieldInjectedOptions<T> {
|
|
|
68
71
|
errorPattern?: RegExp;
|
|
69
72
|
hint?: string;
|
|
70
73
|
description?: string;
|
|
74
|
+
help?: string;
|
|
71
75
|
ariaId: string;
|
|
72
76
|
}
|
|
73
77
|
export interface ValidateReturnSchema<T> {
|
|
@@ -6,10 +6,12 @@ export * from '../components/AvatarGroup.vue';
|
|
|
6
6
|
export * from '../components/Badge.vue';
|
|
7
7
|
export * from '../components/Breadcrumb.vue';
|
|
8
8
|
export * from '../components/Button.vue';
|
|
9
|
+
export * from '../components/ButtonGroup.vue';
|
|
9
10
|
export * from '../components/Calendar.vue';
|
|
10
11
|
export * from '../components/Card.vue';
|
|
11
12
|
export * from '../components/Carousel.vue';
|
|
12
13
|
export * from '../components/Checkbox.vue';
|
|
14
|
+
export * from '../components/CheckboxGroup.vue';
|
|
13
15
|
export * from '../components/Chip.vue';
|
|
14
16
|
export * from '../components/Collapsible.vue';
|
|
15
17
|
export * from '../components/ColorPicker.vue';
|
|
@@ -6,10 +6,12 @@ export * from "../components/AvatarGroup.vue";
|
|
|
6
6
|
export * from "../components/Badge.vue";
|
|
7
7
|
export * from "../components/Breadcrumb.vue";
|
|
8
8
|
export * from "../components/Button.vue";
|
|
9
|
+
export * from "../components/ButtonGroup.vue";
|
|
9
10
|
export * from "../components/Calendar.vue";
|
|
10
11
|
export * from "../components/Card.vue";
|
|
11
12
|
export * from "../components/Carousel.vue";
|
|
12
13
|
export * from "../components/Checkbox.vue";
|
|
14
|
+
export * from "../components/CheckboxGroup.vue";
|
|
13
15
|
export * from "../components/Chip.vue";
|
|
14
16
|
export * from "../components/Collapsible.vue";
|
|
15
17
|
export * from "../components/ColorPicker.vue";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AcceptableValue as _AcceptableValue } from 'reka-ui';
|
|
2
|
+
import type { ClassValue } from 'tailwind-variants';
|
|
1
3
|
import type { VNode } from 'vue';
|
|
2
4
|
export interface TightMap<O = any> {
|
|
3
5
|
[key: string]: TightMap | O;
|
|
@@ -7,22 +9,80 @@ export type DeepPartial<T, O = any> = {
|
|
|
7
9
|
} & {
|
|
8
10
|
[key: string]: O | TightMap<O>;
|
|
9
11
|
};
|
|
12
|
+
export type DynamicSlotsKeys<Name extends string | undefined, Suffix extends string | undefined = undefined> = (Name extends string ? Suffix extends string ? Name | `${Name}-${Suffix}` : Name : never);
|
|
10
13
|
export type DynamicSlots<T extends {
|
|
11
14
|
slot?: string;
|
|
12
|
-
},
|
|
15
|
+
}, Suffix extends string | undefined = undefined, ExtraProps extends object = {}> = {
|
|
16
|
+
[K in DynamicSlotsKeys<T['slot'], Suffix>]: (props: {
|
|
17
|
+
item: Extract<T, {
|
|
18
|
+
slot: K extends `${infer Base}-${Suffix}` ? Base : K;
|
|
19
|
+
}>;
|
|
20
|
+
} & ExtraProps) => any;
|
|
21
|
+
};
|
|
13
22
|
export type GetObjectField<MaybeObject, Key extends string> = MaybeObject extends Record<string, any> ? MaybeObject[Key] : never;
|
|
14
|
-
export type
|
|
15
|
-
|
|
23
|
+
export type AcceptableValue = Exclude<_AcceptableValue, Record<string, any>>;
|
|
24
|
+
export type ArrayOrNested<T> = T[] | T[][];
|
|
25
|
+
export type NestedItem<T> = T extends Array<infer I> ? NestedItem<I> : T;
|
|
26
|
+
type AllKeys<T> = T extends any ? keyof T : never;
|
|
27
|
+
type NonCommonKeys<T extends object> = Exclude<AllKeys<T>, keyof T>;
|
|
28
|
+
type PickTypeOf<T, K extends string | number | symbol> = K extends AllKeys<T> ? T extends {
|
|
29
|
+
[k in K]?: any;
|
|
30
|
+
} ? T[K] : undefined : never;
|
|
31
|
+
export type MergeTypes<T extends object> = {
|
|
32
|
+
[k in keyof T]: PickTypeOf<T, k>;
|
|
33
|
+
} & {
|
|
34
|
+
[k in NonCommonKeys<T>]?: PickTypeOf<T, k>;
|
|
16
35
|
};
|
|
17
|
-
export type
|
|
18
|
-
export type
|
|
19
|
-
export type
|
|
20
|
-
export type
|
|
21
|
-
|
|
22
|
-
'update:modelValue': [payload:
|
|
36
|
+
export type GetItemKeys<I> = keyof Extract<NestedItem<I>, object>;
|
|
37
|
+
export type GetItemValue<I, VK extends GetItemKeys<I> | undefined, T extends NestedItem<I> = NestedItem<I>> = T extends object ? VK extends undefined ? T : VK extends keyof T ? T[VK] : never : T;
|
|
38
|
+
export type GetModelValue<T, VK extends GetItemKeys<T> | undefined, M extends boolean> = M extends true ? GetItemValue<T, VK>[] : GetItemValue<T, VK>;
|
|
39
|
+
export type GetModelValueEmits<T, VK extends GetItemKeys<T> | undefined, M extends boolean> = {
|
|
40
|
+
/** Event handler called when the value changes. */
|
|
41
|
+
'update:modelValue': [payload: GetModelValue<T, VK, M>];
|
|
23
42
|
};
|
|
24
|
-
export type MaybeMultipleModelValue<T, M extends boolean = false> = (T extends infer U ? M extends true ? U[] : U : never);
|
|
25
43
|
export type StringOrVNode = string | VNode | (() => VNode);
|
|
26
44
|
export type EmitsToProps<T> = {
|
|
27
45
|
[K in keyof T as `on${Capitalize<string & K>}`]: T[K] extends [...args: infer Args] ? (...args: Args) => void : never;
|
|
28
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Utility type to flatten intersection types for better IDE hover information.
|
|
49
|
+
* @template T The type to flatten.
|
|
50
|
+
*/
|
|
51
|
+
type Id<T> = {} & {
|
|
52
|
+
[P in keyof T]: T[P];
|
|
53
|
+
};
|
|
54
|
+
type ComponentVariants<T extends {
|
|
55
|
+
variants?: Record<string, Record<string, any>>;
|
|
56
|
+
}> = {
|
|
57
|
+
[K in keyof T['variants']]: keyof T['variants'][K];
|
|
58
|
+
};
|
|
59
|
+
type ComponentSlots<T extends {
|
|
60
|
+
slots?: Record<string, any>;
|
|
61
|
+
}> = Id<{
|
|
62
|
+
[K in keyof T['slots']]?: ClassValue;
|
|
63
|
+
}>;
|
|
64
|
+
type GetComponentAppConfig<A, U extends string, K extends string> = A extends Record<U, Record<K, any>> ? A[U][K] : {};
|
|
65
|
+
type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U extends string = 'ui' | 'uiPro' | 'uiPro.prose'> = A & (U extends 'uiPro.prose' ? {
|
|
66
|
+
uiPro?: {
|
|
67
|
+
prose?: {
|
|
68
|
+
[k in K]?: Partial<T>;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
} : {
|
|
72
|
+
[key in Exclude<U, 'uiPro.prose'>]?: {
|
|
73
|
+
[k in K]?: Partial<T>;
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* Defines the configuration shape expected for a component.
|
|
78
|
+
* @template T The component's theme imported from `#build/ui/*`.
|
|
79
|
+
* @template A The base AppConfig type from `@nuxt/schema`.
|
|
80
|
+
* @template K The key identifying the component (e.g., 'badge').
|
|
81
|
+
* @template U The top-level key in AppConfig ('ui' or 'uiPro').
|
|
82
|
+
*/
|
|
83
|
+
export type ComponentConfig<T extends Record<string, any>, A extends Record<string, any>, K extends string, U extends 'ui' | 'uiPro' | 'uiPro.prose' = 'ui'> = {
|
|
84
|
+
AppConfig: ComponentAppConfig<T, A, K, U>;
|
|
85
|
+
variants: ComponentVariants<T & GetComponentAppConfig<A, U, K>>;
|
|
86
|
+
slots: ComponentSlots<T>;
|
|
87
|
+
};
|
|
88
|
+
export {};
|
|
@@ -4,3 +4,4 @@ export declare function get(object: Record<string, any> | undefined, path: (stri
|
|
|
4
4
|
export declare function set(object: Record<string, any>, path: (string | number)[] | string, value: any): void;
|
|
5
5
|
export declare function looseToNumber(val: any): any;
|
|
6
6
|
export declare function compare<T>(value?: T, currentValue?: T, comparator?: string | ((a: T, b: T) => boolean)): boolean;
|
|
7
|
+
export declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
@@ -1,29 +1,6 @@
|
|
|
1
1
|
import type { LinkProps } from '../types';
|
|
2
2
|
export declare function pickLinkProps(link: LinkProps & {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type: any;
|
|
8
|
-
title: any;
|
|
9
|
-
active: any;
|
|
10
|
-
activeClass: any;
|
|
11
|
-
ariaCurrentValue: any;
|
|
12
|
-
ariaLabel: any;
|
|
13
|
-
as: any;
|
|
14
|
-
disabled: any;
|
|
15
|
-
exact: any;
|
|
16
|
-
exactActiveClass: any;
|
|
17
|
-
exactHash: any;
|
|
18
|
-
exactQuery: any;
|
|
19
|
-
external: any;
|
|
20
|
-
href: any;
|
|
21
|
-
inactiveClass: any;
|
|
22
|
-
noPrefetch: any;
|
|
23
|
-
noRel: any;
|
|
24
|
-
prefetch: any;
|
|
25
|
-
prefetchedClass: any;
|
|
26
|
-
rel: any;
|
|
27
|
-
target: any;
|
|
28
|
-
to: any;
|
|
29
|
-
};
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}): import("@vueuse/shared").ReactivePickReturn<LinkProps & {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}, string>;
|
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
import { reactivePick } from "@vueuse/core";
|
|
2
2
|
export function pickLinkProps(link) {
|
|
3
|
-
|
|
3
|
+
const keys = Object.keys(link);
|
|
4
|
+
const ariaKeys = keys.filter((key) => key.startsWith("aria-"));
|
|
5
|
+
const dataKeys = keys.filter((key) => key.startsWith("data-"));
|
|
6
|
+
const propsToInclude = [
|
|
7
|
+
"active",
|
|
8
|
+
"activeClass",
|
|
9
|
+
"ariaCurrentValue",
|
|
10
|
+
"as",
|
|
11
|
+
"disabled",
|
|
12
|
+
"exact",
|
|
13
|
+
"exactActiveClass",
|
|
14
|
+
"exactHash",
|
|
15
|
+
"exactQuery",
|
|
16
|
+
"external",
|
|
17
|
+
"href",
|
|
18
|
+
"download",
|
|
19
|
+
"inactiveClass",
|
|
20
|
+
"noPrefetch",
|
|
21
|
+
"noRel",
|
|
22
|
+
"prefetch",
|
|
23
|
+
"prefetchedClass",
|
|
24
|
+
"rel",
|
|
25
|
+
"replace",
|
|
26
|
+
"target",
|
|
27
|
+
"to",
|
|
28
|
+
"type",
|
|
29
|
+
"title",
|
|
30
|
+
"onClick",
|
|
31
|
+
...ariaKeys,
|
|
32
|
+
...dataKeys
|
|
33
|
+
];
|
|
34
|
+
return reactivePick(link, ...propsToInclude);
|
|
4
35
|
}
|
package/dist/runtime/utils/tv.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
<script
|
|
2
|
-
export interface IconProps {
|
|
3
|
-
name: string
|
|
4
|
-
}
|
|
5
|
-
</script>
|
|
1
|
+
<script>
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
import { Icon as IconifyIcon } from '@iconify/vue'
|
|
3
|
+
</script>
|
|
9
4
|
|
|
10
|
-
|
|
5
|
+
<script setup>
|
|
6
|
+
import { Icon as IconifyIcon } from "@iconify/vue";
|
|
7
|
+
defineProps({
|
|
8
|
+
name: { type: String, required: true }
|
|
9
|
+
});
|
|
11
10
|
</script>
|
|
12
11
|
|
|
13
12
|
<template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IconProps {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IconProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export default _default;
|
|
6
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
7
|
+
type __VLS_TypePropsToOption<T> = {
|
|
8
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
9
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
10
|
+
} : {
|
|
11
|
+
type: import('vue').PropType<T[K]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
};
|