@nuxt/ui 2.17.0 → 2.18.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/dist/module.d.mts +3 -1988
- package/dist/module.d.ts +3 -1988
- package/dist/module.json +6 -2
- package/dist/module.mjs +6 -71
- package/dist/runtime/components/data/Table.vue +54 -19
- package/dist/runtime/components/data/Table.vue.d.ts +247 -48
- package/dist/runtime/components/elements/Accordion.vue +1 -2
- package/dist/runtime/components/elements/Accordion.vue.d.ts +140 -14
- package/dist/runtime/components/elements/Alert.vue +2 -4
- package/dist/runtime/components/elements/Alert.vue.d.ts +107 -24
- package/dist/runtime/components/elements/Avatar.vue +1 -1
- package/dist/runtime/components/elements/Avatar.vue.d.ts +153 -32
- package/dist/runtime/components/elements/AvatarGroup.d.ts +17 -8
- package/dist/runtime/components/elements/{AvatarGroup.mjs → AvatarGroup.js} +2 -2
- package/dist/runtime/components/elements/Badge.vue.d.ts +55 -18
- package/dist/runtime/components/elements/Button.vue +1 -2
- package/dist/runtime/components/elements/Button.vue.d.ts +259 -96
- package/dist/runtime/components/elements/ButtonGroup.d.ts +110 -6
- package/dist/runtime/components/elements/{ButtonGroup.mjs → ButtonGroup.js} +3 -3
- package/dist/runtime/components/elements/Carousel.vue.d.ts +75 -20
- package/dist/runtime/components/elements/Chip.vue.d.ts +97 -25
- package/dist/runtime/components/elements/Dropdown.vue +4 -9
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +135 -16
- package/dist/runtime/components/elements/Kbd.vue.d.ts +45 -10
- package/dist/runtime/components/elements/Link.vue.d.ts +73 -73
- package/dist/runtime/components/elements/Meter.vue +1 -1
- package/dist/runtime/components/elements/Meter.vue.d.ts +178 -22
- package/dist/runtime/components/elements/MeterGroup.d.ts +70 -13
- package/dist/runtime/components/elements/{MeterGroup.mjs → MeterGroup.js} +3 -3
- package/dist/runtime/components/elements/Progress.vue +7 -2
- package/dist/runtime/components/elements/Progress.vue.d.ts +187 -31
- package/dist/runtime/components/forms/Checkbox.vue +5 -3
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +76 -35
- package/dist/runtime/components/forms/Form.vue +1 -2
- package/dist/runtime/components/forms/Form.vue.d.ts +12 -11
- package/dist/runtime/components/forms/FormGroup.vue +1 -1
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +80 -27
- package/dist/runtime/components/forms/Input.vue +2 -2
- package/dist/runtime/components/forms/Input.vue.d.ts +276 -59
- package/dist/runtime/components/forms/InputMenu.vue +12 -10
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +434 -84
- package/dist/runtime/components/forms/Radio.vue +5 -3
- package/dist/runtime/components/forms/Radio.vue.d.ts +74 -35
- package/dist/runtime/components/forms/RadioGroup.vue +11 -3
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +85 -27
- package/dist/runtime/components/forms/Range.vue.d.ts +155 -26
- package/dist/runtime/components/forms/Select.vue +2 -2
- package/dist/runtime/components/forms/Select.vue.d.ts +273 -50
- package/dist/runtime/components/forms/SelectMenu.vue +50 -25
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +451 -86
- package/dist/runtime/components/forms/Textarea.vue.d.ts +263 -48
- package/dist/runtime/components/forms/Toggle.vue +1 -1
- package/dist/runtime/components/forms/Toggle.vue.d.ts +153 -26
- package/dist/runtime/components/layout/Card.vue.d.ts +55 -5
- package/dist/runtime/components/layout/Container.vue.d.ts +19 -5
- package/dist/runtime/components/layout/Divider.vue +1 -2
- package/dist/runtime/components/layout/Divider.vue.d.ts +121 -16
- package/dist/runtime/components/layout/Skeleton.vue +5 -1
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +27 -4
- package/dist/runtime/components/navigation/Breadcrumb.vue +1 -2
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +52 -9
- package/dist/runtime/components/navigation/CommandPalette.vue +8 -6
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +198 -40
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -3
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +5 -7
- package/dist/runtime/components/navigation/HorizontalNavigation.vue +1 -4
- package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +64 -9
- package/dist/runtime/components/navigation/Pagination.vue +2 -4
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +84 -12
- package/dist/runtime/components/navigation/Tabs.vue +10 -0
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +86 -15
- package/dist/runtime/components/navigation/VerticalNavigation.vue +1 -5
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +78 -9
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +71 -8
- package/dist/runtime/components/overlays/Modal.vue.d.ts +85 -11
- package/dist/runtime/components/overlays/Notification.vue +2 -4
- package/dist/runtime/components/overlays/Notification.vue.d.ts +130 -29
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +31 -16
- package/dist/runtime/components/overlays/Popover.vue +3 -6
- package/dist/runtime/components/overlays/Popover.vue.d.ts +110 -15
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +87 -15
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +90 -15
- package/dist/runtime/composables/{defineShortcuts.mjs → defineShortcuts.js} +1 -1
- package/dist/runtime/composables/{useButtonGroup.mjs → useButtonGroup.js} +8 -9
- package/dist/runtime/composables/useCopyToClipboard.d.ts +1 -1
- package/dist/runtime/composables/{useCopyToClipboard.mjs → useCopyToClipboard.js} +1 -1
- package/dist/runtime/composables/useFormGroup.d.ts +5 -5
- package/dist/runtime/composables/useFormGroup.js +49 -0
- package/dist/runtime/composables/useModal.d.ts +3 -3
- package/dist/runtime/composables/{useModal.mjs → useModal.js} +2 -4
- package/dist/runtime/composables/usePopper.d.ts +91 -55
- package/dist/runtime/composables/useShortcuts.d.ts +4 -4
- package/dist/runtime/composables/useSlideover.d.ts +3 -3
- package/dist/runtime/composables/{useSlideover.mjs → useSlideover.js} +2 -4
- package/dist/runtime/composables/useTimer.d.ts +1 -1
- package/dist/runtime/composables/useToast.d.ts +11 -11
- package/dist/runtime/composables/useUI.d.ts +1 -1
- package/dist/runtime/composables/{useUI.mjs → useUI.js} +1 -1
- package/dist/runtime/plugins/colors.d.ts +1 -1
- package/dist/runtime/plugins/{colors.mjs → colors.js} +1 -1
- package/dist/runtime/plugins/modals.d.ts +1 -1
- package/dist/runtime/plugins/{modals.mjs → modals.js} +1 -1
- package/dist/runtime/plugins/slideovers.d.ts +1 -1
- package/dist/runtime/plugins/{slideovers.mjs → slideovers.js} +1 -1
- package/dist/runtime/types/accordion.d.ts +6 -7
- package/dist/runtime/types/accordion.js +0 -0
- package/dist/runtime/types/alert.d.ts +8 -10
- package/dist/runtime/types/alert.js +0 -0
- package/dist/runtime/types/avatar.d.ts +13 -15
- package/dist/runtime/types/avatar.js +0 -0
- package/dist/runtime/types/badge.d.ts +11 -13
- package/dist/runtime/types/badge.js +0 -0
- package/dist/runtime/types/breadcrumb.d.ts +6 -8
- package/dist/runtime/types/breadcrumb.js +0 -0
- package/dist/runtime/types/button.d.ts +27 -29
- package/dist/runtime/types/button.js +0 -0
- package/dist/runtime/types/chip.d.ts +11 -13
- package/dist/runtime/types/chip.js +0 -0
- package/dist/runtime/types/clipboard.d.ts +7 -1
- package/dist/runtime/types/clipboard.js +0 -0
- package/dist/runtime/types/command-palette.d.ts +23 -24
- package/dist/runtime/types/command-palette.js +0 -0
- package/dist/runtime/types/component.d.ts +17 -14
- package/dist/runtime/types/component.js +0 -0
- package/dist/runtime/types/divider.d.ts +2 -3
- package/dist/runtime/types/divider.js +0 -0
- package/dist/runtime/types/dropdown.d.ts +12 -13
- package/dist/runtime/types/dropdown.js +0 -0
- package/dist/runtime/types/form-group.d.ts +4 -5
- package/dist/runtime/types/form-group.js +0 -0
- package/dist/runtime/types/form.d.ts +29 -28
- package/dist/runtime/types/form.js +0 -0
- package/dist/runtime/types/horizontal-navigation.d.ts +10 -11
- package/dist/runtime/types/horizontal-navigation.js +0 -0
- package/dist/runtime/types/index.d.ts +31 -31
- package/dist/runtime/types/index.js +31 -0
- package/dist/runtime/types/input.d.ts +7 -8
- package/dist/runtime/types/input.js +0 -0
- package/dist/runtime/types/kbd.d.ts +4 -5
- package/dist/runtime/types/kbd.js +0 -0
- package/dist/runtime/types/link.d.ts +9 -10
- package/dist/runtime/types/link.js +0 -0
- package/dist/runtime/types/meter.d.ts +4 -5
- package/dist/runtime/types/meter.js +0 -0
- package/dist/runtime/types/modal.d.ts +13 -15
- package/dist/runtime/types/modal.js +0 -0
- package/dist/runtime/types/notification.d.ts +17 -20
- package/dist/runtime/types/notification.js +0 -0
- package/dist/runtime/types/popper.d.ts +13 -15
- package/dist/runtime/types/popper.js +0 -0
- package/dist/runtime/types/progress.d.ts +5 -6
- package/dist/runtime/types/progress.js +0 -0
- package/dist/runtime/types/range.d.ts +6 -7
- package/dist/runtime/types/range.js +0 -0
- package/dist/runtime/types/select.d.ts +7 -8
- package/dist/runtime/types/select.js +0 -0
- package/dist/runtime/types/slideover.d.ts +10 -12
- package/dist/runtime/types/slideover.js +0 -0
- package/dist/runtime/types/tabs.d.ts +6 -5
- package/dist/runtime/types/tabs.js +0 -0
- package/dist/runtime/types/textarea.d.ts +7 -8
- package/dist/runtime/types/textarea.js +0 -0
- package/dist/runtime/types/toggle.d.ts +6 -7
- package/dist/runtime/types/toggle.js +0 -0
- package/dist/runtime/types/tooltip.d.ts +5 -5
- package/dist/runtime/types/tooltip.js +0 -0
- package/dist/runtime/types/utils.d.ts +15 -27
- package/dist/runtime/types/utils.js +0 -0
- package/dist/runtime/types/vertical-navigation.d.ts +10 -11
- package/dist/runtime/types/vertical-navigation.js +0 -0
- package/dist/runtime/ui.config/data/table.d.ts +10 -0
- package/dist/runtime/ui.config/data/{table.mjs → table.js} +10 -0
- package/dist/runtime/ui.config/elements/accordion.d.ts +1 -0
- package/dist/runtime/ui.config/elements/{accordion.mjs → accordion.js} +3 -2
- package/dist/runtime/ui.config/elements/alert.d.ts +2 -2
- package/dist/runtime/ui.config/elements/avatar.d.ts +2 -2
- package/dist/runtime/ui.config/elements/{carousel.mjs → carousel.js} +1 -1
- package/dist/runtime/ui.config/elements/{dropdown.mjs → dropdown.js} +1 -1
- package/dist/runtime/ui.config/forms/{inputMenu.mjs → inputMenu.js} +1 -1
- package/dist/runtime/ui.config/forms/{select.mjs → select.js} +1 -1
- package/dist/runtime/ui.config/forms/{selectMenu.mjs → selectMenu.js} +2 -2
- package/dist/runtime/ui.config/forms/{textarea.mjs → textarea.js} +1 -1
- package/dist/runtime/ui.config/forms/toggle.d.ts +2 -2
- package/dist/runtime/ui.config/index.d.ts +43 -43
- package/dist/runtime/ui.config/index.js +43 -0
- package/dist/runtime/ui.config/navigation/{breadcrumb.mjs → breadcrumb.js} +2 -2
- package/dist/runtime/ui.config/navigation/commandPalette.d.ts +1 -1
- package/dist/runtime/ui.config/navigation/tabs.d.ts +1 -0
- package/dist/runtime/ui.config/navigation/{tabs.mjs → tabs.js} +2 -1
- package/dist/runtime/ui.config/overlays/{contextMenu.mjs → contextMenu.js} +1 -1
- package/dist/runtime/ui.config/overlays/{modal.mjs → modal.js} +2 -2
- package/dist/runtime/ui.config/overlays/notification.d.ts +1 -1
- package/dist/runtime/ui.config/overlays/{popover.mjs → popover.js} +1 -1
- package/dist/runtime/ui.config/overlays/{slideover.mjs → slideover.js} +2 -2
- package/dist/runtime/ui.config/overlays/{tooltip.mjs → tooltip.js} +1 -1
- package/dist/runtime/utils/colors.d.ts +2 -2
- package/dist/runtime/utils/{colors.mjs → colors.js} +1 -1
- package/dist/runtime/utils/index.d.ts +4 -4
- package/dist/runtime/utils/{index.mjs → index.js} +2 -2
- package/dist/runtime/utils/link.d.ts +26 -24
- package/dist/runtime/utils/{link.mjs → link.js} +1 -1
- package/dist/types.d.mts +1 -16
- package/dist/types.d.ts +1 -16
- package/package.json +20 -21
- package/dist/runtime/components/elements/Icon.vue +0 -29
- package/dist/runtime/components/elements/Icon.vue.d.ts +0 -24
- package/dist/runtime/composables/useFormGroup.mjs +0 -45
- package/dist/runtime/ui.config/index.mjs +0 -43
- /package/dist/runtime/composables/{useCarouselScroll.mjs → useCarouselScroll.js} +0 -0
- /package/dist/runtime/composables/{usePopper.mjs → usePopper.js} +0 -0
- /package/dist/runtime/composables/{useShortcuts.mjs → useShortcuts.js} +0 -0
- /package/dist/runtime/composables/{useTimer.mjs → useTimer.js} +0 -0
- /package/dist/runtime/composables/{useToast.mjs → useToast.js} +0 -0
- /package/dist/runtime/ui.config/elements/{alert.mjs → alert.js} +0 -0
- /package/dist/runtime/ui.config/elements/{avatar.mjs → avatar.js} +0 -0
- /package/dist/runtime/ui.config/elements/{avatarGroup.mjs → avatarGroup.js} +0 -0
- /package/dist/runtime/ui.config/elements/{badge.mjs → badge.js} +0 -0
- /package/dist/runtime/ui.config/elements/{button.mjs → button.js} +0 -0
- /package/dist/runtime/ui.config/elements/{buttonGroup.mjs → buttonGroup.js} +0 -0
- /package/dist/runtime/ui.config/elements/{chip.mjs → chip.js} +0 -0
- /package/dist/runtime/ui.config/elements/{kbd.mjs → kbd.js} +0 -0
- /package/dist/runtime/ui.config/elements/{meter.mjs → meter.js} +0 -0
- /package/dist/runtime/ui.config/elements/{meterGroup.mjs → meterGroup.js} +0 -0
- /package/dist/runtime/ui.config/elements/{progress.mjs → progress.js} +0 -0
- /package/dist/runtime/ui.config/forms/{checkbox.mjs → checkbox.js} +0 -0
- /package/dist/runtime/ui.config/forms/{formGroup.mjs → formGroup.js} +0 -0
- /package/dist/runtime/ui.config/forms/{input.mjs → input.js} +0 -0
- /package/dist/runtime/ui.config/forms/{radio.mjs → radio.js} +0 -0
- /package/dist/runtime/ui.config/forms/{radioGroup.mjs → radioGroup.js} +0 -0
- /package/dist/runtime/ui.config/forms/{range.mjs → range.js} +0 -0
- /package/dist/runtime/ui.config/forms/{toggle.mjs → toggle.js} +0 -0
- /package/dist/runtime/ui.config/layout/{card.mjs → card.js} +0 -0
- /package/dist/runtime/ui.config/layout/{container.mjs → container.js} +0 -0
- /package/dist/runtime/ui.config/layout/{divider.mjs → divider.js} +0 -0
- /package/dist/runtime/ui.config/layout/{skeleton.mjs → skeleton.js} +0 -0
- /package/dist/runtime/ui.config/navigation/{commandPalette.mjs → commandPalette.js} +0 -0
- /package/dist/runtime/ui.config/navigation/{horizontalNavigation.mjs → horizontalNavigation.js} +0 -0
- /package/dist/runtime/ui.config/navigation/{pagination.mjs → pagination.js} +0 -0
- /package/dist/runtime/ui.config/navigation/{verticalNavigation.mjs → verticalNavigation.js} +0 -0
- /package/dist/runtime/ui.config/overlays/{notification.mjs → notification.js} +0 -0
- /package/dist/runtime/ui.config/overlays/{notifications.mjs → notifications.js} +0 -0
- /package/dist/runtime/ui.config/{popper.mjs → popper.js} +0 -0
- /package/dist/runtime/utils/{lodash.mjs → lodash.js} +0 -0
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
<div v-if="label || $slots.label" :class="ui.inner">
|
|
18
18
|
<label :for="inputId" :class="ui.label">
|
|
19
|
-
<slot name="label">{{ label }}</slot>
|
|
19
|
+
<slot name="label" :label="label">{{ label }}</slot>
|
|
20
20
|
<span v-if="required" :class="ui.required">*</span>
|
|
21
21
|
</label>
|
|
22
|
-
<p v-if="help" :class="ui.help">
|
|
23
|
-
|
|
22
|
+
<p v-if="help || $slots.help" :class="ui.help">
|
|
23
|
+
<slot name="help" :help="help">
|
|
24
|
+
{{ help }}
|
|
25
|
+
</slot>
|
|
24
26
|
</p>
|
|
25
27
|
</div>
|
|
26
28
|
</div>
|
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
+
import type { Strategy } from '../../types.js';
|
|
3
|
+
import colors from '#ui-colors';
|
|
4
|
+
declare const config: {
|
|
5
|
+
wrapper: string;
|
|
6
|
+
container: string;
|
|
7
|
+
base: string;
|
|
8
|
+
form: string;
|
|
9
|
+
color: string;
|
|
10
|
+
background: string;
|
|
11
|
+
border: string;
|
|
12
|
+
ring: string;
|
|
13
|
+
inner: string;
|
|
14
|
+
label: string;
|
|
15
|
+
required: string;
|
|
16
|
+
help: string;
|
|
17
|
+
default: {
|
|
18
|
+
color: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
2
21
|
declare const _default: import("vue").DefineComponent<{
|
|
3
22
|
id: {
|
|
4
23
|
type: StringConstructor;
|
|
5
|
-
default:
|
|
24
|
+
default: any;
|
|
6
25
|
};
|
|
7
26
|
value: {
|
|
8
|
-
type: (
|
|
9
|
-
default:
|
|
27
|
+
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
28
|
+
default: any;
|
|
10
29
|
};
|
|
11
30
|
modelValue: {
|
|
12
|
-
type: (
|
|
13
|
-
default:
|
|
31
|
+
type: (ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
32
|
+
default: any;
|
|
14
33
|
};
|
|
15
34
|
name: {
|
|
16
35
|
type: StringConstructor;
|
|
17
|
-
default:
|
|
36
|
+
default: any;
|
|
18
37
|
};
|
|
19
38
|
disabled: {
|
|
20
39
|
type: BooleanConstructor;
|
|
@@ -22,59 +41,77 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
41
|
};
|
|
23
42
|
help: {
|
|
24
43
|
type: StringConstructor;
|
|
25
|
-
default:
|
|
44
|
+
default: any;
|
|
26
45
|
};
|
|
27
46
|
label: {
|
|
28
47
|
type: StringConstructor;
|
|
29
|
-
default:
|
|
48
|
+
default: any;
|
|
30
49
|
};
|
|
31
50
|
required: {
|
|
32
51
|
type: BooleanConstructor;
|
|
33
52
|
default: boolean;
|
|
34
53
|
};
|
|
35
54
|
color: {
|
|
36
|
-
type: PropType<
|
|
37
|
-
default: () =>
|
|
55
|
+
type: PropType<(typeof colors)[number]>;
|
|
56
|
+
default: () => string;
|
|
38
57
|
validator(value: string): any;
|
|
39
58
|
};
|
|
40
59
|
inputClass: {
|
|
41
60
|
type: StringConstructor;
|
|
42
|
-
default:
|
|
61
|
+
default: any;
|
|
43
62
|
};
|
|
44
63
|
class: {
|
|
45
64
|
type: PropType<any>;
|
|
46
65
|
default: () => "";
|
|
47
66
|
};
|
|
48
67
|
ui: {
|
|
49
|
-
type: PropType<
|
|
68
|
+
type: PropType<Partial<typeof config> & {
|
|
69
|
+
strategy?: Strategy;
|
|
70
|
+
}>;
|
|
50
71
|
default: () => {};
|
|
51
72
|
};
|
|
52
73
|
}, {
|
|
53
74
|
inputId: string;
|
|
54
|
-
ui: import("vue").ComputedRef<
|
|
75
|
+
ui: import("vue").ComputedRef<{
|
|
76
|
+
wrapper: string;
|
|
77
|
+
container: string;
|
|
78
|
+
base: string;
|
|
79
|
+
form: string;
|
|
80
|
+
color: string;
|
|
81
|
+
background: string;
|
|
82
|
+
border: string;
|
|
83
|
+
ring: string;
|
|
84
|
+
inner: string;
|
|
85
|
+
label: string;
|
|
86
|
+
required: string;
|
|
87
|
+
help: string;
|
|
88
|
+
default: {
|
|
89
|
+
color: string;
|
|
90
|
+
};
|
|
91
|
+
}>;
|
|
55
92
|
attrs: import("vue").ComputedRef<Pick<{
|
|
56
93
|
[x: string]: unknown;
|
|
57
94
|
}, string>>;
|
|
58
95
|
pick: import("vue").WritableComputedRef<string | number | boolean | Record<string, any>>;
|
|
59
|
-
name:
|
|
96
|
+
name: any;
|
|
60
97
|
inputClass: import("vue").ComputedRef<string>;
|
|
61
98
|
onChange: (event: Event) => void;
|
|
62
99
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
63
100
|
id: {
|
|
64
101
|
type: StringConstructor;
|
|
65
|
-
default:
|
|
102
|
+
default: any;
|
|
66
103
|
};
|
|
67
104
|
value: {
|
|
68
|
-
type: (
|
|
69
|
-
default:
|
|
105
|
+
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
106
|
+
default: any;
|
|
70
107
|
};
|
|
71
108
|
modelValue: {
|
|
72
|
-
type: (
|
|
73
|
-
default:
|
|
109
|
+
type: (ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
110
|
+
default: any;
|
|
74
111
|
};
|
|
75
112
|
name: {
|
|
76
113
|
type: StringConstructor;
|
|
77
|
-
default:
|
|
114
|
+
default: any;
|
|
78
115
|
};
|
|
79
116
|
disabled: {
|
|
80
117
|
type: BooleanConstructor;
|
|
@@ -82,47 +119,49 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
119
|
};
|
|
83
120
|
help: {
|
|
84
121
|
type: StringConstructor;
|
|
85
|
-
default:
|
|
122
|
+
default: any;
|
|
86
123
|
};
|
|
87
124
|
label: {
|
|
88
125
|
type: StringConstructor;
|
|
89
|
-
default:
|
|
126
|
+
default: any;
|
|
90
127
|
};
|
|
91
128
|
required: {
|
|
92
129
|
type: BooleanConstructor;
|
|
93
130
|
default: boolean;
|
|
94
131
|
};
|
|
95
132
|
color: {
|
|
96
|
-
type: PropType<
|
|
97
|
-
default: () =>
|
|
133
|
+
type: PropType<(typeof colors)[number]>;
|
|
134
|
+
default: () => string;
|
|
98
135
|
validator(value: string): any;
|
|
99
136
|
};
|
|
100
137
|
inputClass: {
|
|
101
138
|
type: StringConstructor;
|
|
102
|
-
default:
|
|
139
|
+
default: any;
|
|
103
140
|
};
|
|
104
141
|
class: {
|
|
105
142
|
type: PropType<any>;
|
|
106
143
|
default: () => "";
|
|
107
144
|
};
|
|
108
145
|
ui: {
|
|
109
|
-
type: PropType<
|
|
146
|
+
type: PropType<Partial<typeof config> & {
|
|
147
|
+
strategy?: Strategy;
|
|
148
|
+
}>;
|
|
110
149
|
default: () => {};
|
|
111
150
|
};
|
|
112
151
|
}>> & {
|
|
113
|
-
onChange?: (
|
|
114
|
-
"onUpdate:modelValue"?: (
|
|
152
|
+
onChange?: (...args: any[]) => any;
|
|
153
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
115
154
|
}, {
|
|
116
|
-
|
|
117
|
-
name: string;
|
|
118
|
-
required: boolean;
|
|
119
|
-
label: string;
|
|
120
|
-
class: any;
|
|
121
|
-
color: any;
|
|
155
|
+
ui: {};
|
|
122
156
|
disabled: boolean;
|
|
123
|
-
|
|
157
|
+
color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
158
|
+
label: string;
|
|
124
159
|
id: string;
|
|
160
|
+
class: any;
|
|
161
|
+
name: string;
|
|
125
162
|
modelValue: string | number | boolean | Record<string, any>;
|
|
163
|
+
required: boolean;
|
|
164
|
+
value: string | number | boolean;
|
|
126
165
|
help: string;
|
|
127
166
|
inputClass: string;
|
|
128
167
|
}, {}>;
|
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
@change="onUpdate(option.value)"
|
|
19
19
|
>
|
|
20
20
|
<template #label>
|
|
21
|
-
<slot name="label" v-bind="{ option }" />
|
|
21
|
+
<slot name="label" v-bind="{ option, selected: option.selected }" />
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<template #help>
|
|
25
|
+
<slot name="help" v-bind="{ option, selected: option.selected }" />
|
|
22
26
|
</template>
|
|
23
27
|
</URadio>
|
|
24
28
|
</fieldset>
|
|
@@ -42,7 +46,7 @@ export default defineComponent({
|
|
|
42
46
|
inheritAttrs: false,
|
|
43
47
|
props: {
|
|
44
48
|
modelValue: {
|
|
45
|
-
type: [String, Number, Object],
|
|
49
|
+
type: [String, Number, Object, Boolean],
|
|
46
50
|
default: ""
|
|
47
51
|
},
|
|
48
52
|
name: {
|
|
@@ -106,6 +110,9 @@ export default defineComponent({
|
|
|
106
110
|
const guessOptionText = (option) => {
|
|
107
111
|
return get(option, props.optionAttribute, get(option, props.valueAttribute));
|
|
108
112
|
};
|
|
113
|
+
const guessOptionSelected = (option) => {
|
|
114
|
+
return props.modelValue === guessOptionValue(option);
|
|
115
|
+
};
|
|
109
116
|
const normalizeOption = (option) => {
|
|
110
117
|
if (["string", "number", "boolean"].includes(typeof option)) {
|
|
111
118
|
return {
|
|
@@ -116,7 +123,8 @@ export default defineComponent({
|
|
|
116
123
|
return {
|
|
117
124
|
...option,
|
|
118
125
|
value: guessOptionValue(option),
|
|
119
|
-
label: guessOptionText(option)
|
|
126
|
+
label: guessOptionText(option),
|
|
127
|
+
selected: guessOptionSelected(option)
|
|
120
128
|
};
|
|
121
129
|
};
|
|
122
130
|
const normalizedOptions = computed(() => {
|
|
@@ -1,20 +1,47 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
+
import type { Strategy } from '../../types.js';
|
|
3
|
+
import colors from '#ui-colors';
|
|
4
|
+
declare const config: {
|
|
5
|
+
wrapper: string;
|
|
6
|
+
fieldset: string;
|
|
7
|
+
legend: string;
|
|
8
|
+
default: {
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
declare const configRadio: {
|
|
13
|
+
wrapper: string;
|
|
14
|
+
container: string;
|
|
15
|
+
base: string;
|
|
16
|
+
form: string;
|
|
17
|
+
color: string;
|
|
18
|
+
background: string;
|
|
19
|
+
border: string;
|
|
20
|
+
ring: string;
|
|
21
|
+
inner: string;
|
|
22
|
+
label: string;
|
|
23
|
+
required: string;
|
|
24
|
+
help: string;
|
|
25
|
+
default: {
|
|
26
|
+
color: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
2
29
|
declare const _default: import("vue").DefineComponent<{
|
|
3
30
|
modelValue: {
|
|
4
|
-
type: (
|
|
31
|
+
type: (ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
5
32
|
default: string;
|
|
6
33
|
};
|
|
7
34
|
name: {
|
|
8
35
|
type: StringConstructor;
|
|
9
|
-
default:
|
|
36
|
+
default: any;
|
|
10
37
|
};
|
|
11
38
|
legend: {
|
|
12
39
|
type: StringConstructor;
|
|
13
|
-
default:
|
|
40
|
+
default: any;
|
|
14
41
|
};
|
|
15
42
|
options: {
|
|
16
43
|
type: ArrayConstructor;
|
|
17
|
-
default: () =>
|
|
44
|
+
default: () => any[];
|
|
18
45
|
};
|
|
19
46
|
optionAttribute: {
|
|
20
47
|
type: StringConstructor;
|
|
@@ -29,8 +56,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
56
|
default: boolean;
|
|
30
57
|
};
|
|
31
58
|
color: {
|
|
32
|
-
type: PropType<
|
|
33
|
-
default: () =>
|
|
59
|
+
type: PropType<(typeof colors)[number]>;
|
|
60
|
+
default: () => string;
|
|
34
61
|
validator(value: string): any;
|
|
35
62
|
};
|
|
36
63
|
class: {
|
|
@@ -38,16 +65,43 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
65
|
default: () => "";
|
|
39
66
|
};
|
|
40
67
|
ui: {
|
|
41
|
-
type: PropType<
|
|
68
|
+
type: PropType<Partial<typeof config> & {
|
|
69
|
+
strategy?: Strategy;
|
|
70
|
+
}>;
|
|
42
71
|
default: () => {};
|
|
43
72
|
};
|
|
44
73
|
uiRadio: {
|
|
45
|
-
type: PropType<
|
|
74
|
+
type: PropType<Partial<typeof configRadio> & {
|
|
75
|
+
strategy?: Strategy;
|
|
76
|
+
}>;
|
|
46
77
|
default: () => {};
|
|
47
78
|
};
|
|
48
79
|
}, {
|
|
49
|
-
ui: import("vue").ComputedRef<
|
|
50
|
-
|
|
80
|
+
ui: import("vue").ComputedRef<{
|
|
81
|
+
wrapper: string;
|
|
82
|
+
fieldset: string;
|
|
83
|
+
legend: string;
|
|
84
|
+
default: {
|
|
85
|
+
color: string;
|
|
86
|
+
};
|
|
87
|
+
}>;
|
|
88
|
+
uiRadio: import("vue").ComputedRef<{
|
|
89
|
+
wrapper: string;
|
|
90
|
+
container: string;
|
|
91
|
+
base: string;
|
|
92
|
+
form: string;
|
|
93
|
+
color: string;
|
|
94
|
+
background: string;
|
|
95
|
+
border: string;
|
|
96
|
+
ring: string;
|
|
97
|
+
inner: string;
|
|
98
|
+
label: string;
|
|
99
|
+
required: string;
|
|
100
|
+
help: string;
|
|
101
|
+
default: {
|
|
102
|
+
color: string;
|
|
103
|
+
};
|
|
104
|
+
}>;
|
|
51
105
|
attrs: import("vue").ComputedRef<Pick<{
|
|
52
106
|
[x: string]: unknown;
|
|
53
107
|
}, string>>;
|
|
@@ -55,20 +109,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
55
109
|
onUpdate: (value: any) => void;
|
|
56
110
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
57
111
|
modelValue: {
|
|
58
|
-
type: (
|
|
112
|
+
type: (ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
59
113
|
default: string;
|
|
60
114
|
};
|
|
61
115
|
name: {
|
|
62
116
|
type: StringConstructor;
|
|
63
|
-
default:
|
|
117
|
+
default: any;
|
|
64
118
|
};
|
|
65
119
|
legend: {
|
|
66
120
|
type: StringConstructor;
|
|
67
|
-
default:
|
|
121
|
+
default: any;
|
|
68
122
|
};
|
|
69
123
|
options: {
|
|
70
124
|
type: ArrayConstructor;
|
|
71
|
-
default: () =>
|
|
125
|
+
default: () => any[];
|
|
72
126
|
};
|
|
73
127
|
optionAttribute: {
|
|
74
128
|
type: StringConstructor;
|
|
@@ -83,8 +137,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
137
|
default: boolean;
|
|
84
138
|
};
|
|
85
139
|
color: {
|
|
86
|
-
type: PropType<
|
|
87
|
-
default: () =>
|
|
140
|
+
type: PropType<(typeof colors)[number]>;
|
|
141
|
+
default: () => string;
|
|
88
142
|
validator(value: string): any;
|
|
89
143
|
};
|
|
90
144
|
class: {
|
|
@@ -92,27 +146,31 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
146
|
default: () => "";
|
|
93
147
|
};
|
|
94
148
|
ui: {
|
|
95
|
-
type: PropType<
|
|
149
|
+
type: PropType<Partial<typeof config> & {
|
|
150
|
+
strategy?: Strategy;
|
|
151
|
+
}>;
|
|
96
152
|
default: () => {};
|
|
97
153
|
};
|
|
98
154
|
uiRadio: {
|
|
99
|
-
type: PropType<
|
|
155
|
+
type: PropType<Partial<typeof configRadio> & {
|
|
156
|
+
strategy?: Strategy;
|
|
157
|
+
}>;
|
|
100
158
|
default: () => {};
|
|
101
159
|
};
|
|
102
160
|
}>> & {
|
|
103
|
-
onChange?: (
|
|
104
|
-
"onUpdate:modelValue"?: (
|
|
161
|
+
onChange?: (...args: any[]) => any;
|
|
162
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
105
163
|
}, {
|
|
106
|
-
|
|
107
|
-
legend: string;
|
|
108
|
-
class: any;
|
|
109
|
-
color: any;
|
|
164
|
+
ui: {};
|
|
110
165
|
disabled: boolean;
|
|
111
|
-
|
|
112
|
-
|
|
166
|
+
color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
167
|
+
class: any;
|
|
113
168
|
options: unknown[];
|
|
169
|
+
name: string;
|
|
170
|
+
modelValue: string | number | boolean | Record<string, any>;
|
|
171
|
+
legend: string;
|
|
114
172
|
optionAttribute: string;
|
|
115
173
|
valueAttribute: string;
|
|
116
|
-
uiRadio:
|
|
174
|
+
uiRadio: {};
|
|
117
175
|
}, {}>;
|
|
118
176
|
export default _default;
|