@nuxt/ui 2.13.0 → 2.14.1
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/README.md +8 -8
- package/dist/module.d.mts +61 -2
- package/dist/module.d.ts +61 -2
- package/dist/module.json +2 -2
- package/dist/module.mjs +27 -23
- package/dist/runtime/components/data/Table.vue +16 -4
- package/dist/runtime/components/data/Table.vue.d.ts +21 -3
- package/dist/runtime/components/elements/Accordion.vue +11 -2
- package/dist/runtime/components/elements/Accordion.vue.d.ts +1 -1
- package/dist/runtime/components/elements/Alert.vue +2 -2
- package/dist/runtime/components/elements/Alert.vue.d.ts +4 -3
- package/dist/runtime/components/elements/Avatar.vue.d.ts +1 -1
- package/dist/runtime/components/elements/AvatarGroup.d.ts +1 -1
- package/dist/runtime/components/elements/Badge.vue.d.ts +2 -2
- package/dist/runtime/components/elements/Button.vue.d.ts +62 -36
- package/dist/runtime/components/elements/ButtonGroup.d.ts +1 -1
- package/dist/runtime/components/elements/Carousel.vue +19 -12
- package/dist/runtime/components/elements/Carousel.vue.d.ts +4 -4
- package/dist/runtime/components/elements/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/elements/Dropdown.vue +3 -1
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +3 -3
- package/dist/runtime/components/elements/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/elements/Kbd.vue.d.ts +1 -1
- package/dist/runtime/components/elements/Link.vue +1 -1
- package/dist/runtime/components/elements/Link.vue.d.ts +61 -35
- package/dist/runtime/components/elements/Meter.vue +4 -0
- package/dist/runtime/components/elements/Meter.vue.d.ts +1 -1
- package/dist/runtime/components/elements/MeterGroup.d.ts +1 -1
- package/dist/runtime/components/elements/Progress.vue +4 -1
- package/dist/runtime/components/elements/Progress.vue.d.ts +5 -5
- package/dist/runtime/components/forms/Checkbox.vue +1 -6
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +5 -14
- package/dist/runtime/components/forms/Form.vue +6 -3
- package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
- package/dist/runtime/components/forms/FormGroup.vue +20 -17
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +2 -2
- package/dist/runtime/components/forms/Input.vue +1 -0
- package/dist/runtime/components/forms/Input.vue.d.ts +5 -5
- package/dist/runtime/components/forms/InputMenu.vue +4 -1
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +6 -6
- package/dist/runtime/components/forms/Radio.vue +5 -11
- package/dist/runtime/components/forms/Radio.vue.d.ts +5 -5
- package/dist/runtime/components/forms/RadioGroup.vue +1 -0
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +3 -3
- package/dist/runtime/components/forms/Range.vue.d.ts +3 -3
- package/dist/runtime/components/forms/Select.vue.d.ts +5 -5
- package/dist/runtime/components/forms/SelectMenu.vue +4 -1
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +6 -6
- package/dist/runtime/components/forms/Textarea.vue +5 -1
- package/dist/runtime/components/forms/Textarea.vue.d.ts +14 -5
- package/dist/runtime/components/forms/Toggle.vue +3 -1
- package/dist/runtime/components/forms/Toggle.vue.d.ts +3 -3
- package/dist/runtime/components/layout/Card.vue +1 -1
- package/dist/runtime/components/layout/Card.vue.d.ts +1 -1
- package/dist/runtime/components/layout/Container.vue.d.ts +1 -1
- package/dist/runtime/components/layout/Divider.vue +8 -1
- package/dist/runtime/components/layout/Divider.vue.d.ts +15 -4
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/CommandPalette.vue +3 -1
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +2 -2
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +3 -1
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Tabs.vue +8 -8
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +10 -1
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +3 -3
- package/dist/runtime/components/overlays/Modal.vue +3 -1
- package/dist/runtime/components/overlays/Modal.vue.d.ts +5 -5
- package/dist/runtime/components/overlays/Modals.client.vue +12 -0
- package/dist/runtime/components/overlays/Notification.vue +2 -2
- package/dist/runtime/components/overlays/Notification.vue.d.ts +4 -3
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/Popover.vue +3 -1
- package/dist/runtime/components/overlays/Popover.vue.d.ts +3 -3
- package/dist/runtime/components/overlays/Slideover.vue +3 -1
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +5 -5
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/composables/useFormGroup.d.ts +1 -1
- package/dist/runtime/composables/useFormGroup.mjs +9 -12
- package/dist/runtime/composables/useModal.d.ts +12 -0
- package/dist/runtime/composables/useModal.mjs +37 -0
- package/dist/runtime/plugins/modals.d.ts +2 -0
- package/dist/runtime/plugins/modals.mjs +10 -0
- package/dist/runtime/types/component.d.ts +14 -0
- package/dist/runtime/types/divider.d.ts +3 -0
- package/dist/runtime/types/form.d.ts +2 -1
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/modal.d.ts +18 -0
- package/dist/runtime/types/progress.d.ts +2 -0
- package/dist/runtime/types/range.d.ts +2 -0
- package/dist/runtime/types/toggle.d.ts +2 -0
- package/dist/runtime/ui.config/data/table.d.ts +7 -0
- package/dist/runtime/ui.config/data/table.mjs +10 -3
- package/dist/runtime/ui.config/elements/accordion.d.ts +1 -0
- package/dist/runtime/ui.config/elements/accordion.mjs +1 -0
- package/dist/runtime/ui.config/forms/formGroup.d.ts +1 -0
- package/dist/runtime/ui.config/forms/formGroup.mjs +1 -0
- package/dist/runtime/ui.config/forms/input.d.ts +11 -0
- package/dist/runtime/ui.config/forms/input.mjs +11 -0
- package/dist/runtime/ui.config/forms/select.d.ts +11 -0
- package/dist/runtime/ui.config/forms/textarea.d.ts +11 -0
- package/dist/runtime/ui.config/layout/divider.d.ts +19 -2
- package/dist/runtime/ui.config/layout/divider.mjs +20 -3
- package/dist/runtime/utils/index.mjs +9 -0
- package/dist/runtime/utils/link.d.ts +24 -11
- package/dist/runtime/utils/link.mjs +26 -13
- package/package.json +21 -19
- package/dist/runtime/utils/uid.d.ts +0 -1
- package/dist/runtime/utils/uid.mjs +0 -5
|
@@ -61,6 +61,10 @@ export default defineComponent({
|
|
|
61
61
|
type: Number,
|
|
62
62
|
default: 3
|
|
63
63
|
},
|
|
64
|
+
maxrows: {
|
|
65
|
+
type: Number,
|
|
66
|
+
default: 0
|
|
67
|
+
},
|
|
64
68
|
autoresize: {
|
|
65
69
|
type: Boolean,
|
|
66
70
|
default: false
|
|
@@ -147,7 +151,7 @@ export default defineComponent({
|
|
|
147
151
|
const { scrollHeight } = textarea2.value;
|
|
148
152
|
const newRows = (scrollHeight - padding) / lineHeight;
|
|
149
153
|
if (newRows > props.rows) {
|
|
150
|
-
textarea2.value.rows = newRows;
|
|
154
|
+
textarea2.value.rows = props.maxrows ? Math.min(newRows, props.maxrows) : newRows;
|
|
151
155
|
}
|
|
152
156
|
}
|
|
153
157
|
};
|
|
@@ -29,6 +29,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
type: NumberConstructor;
|
|
30
30
|
default: number;
|
|
31
31
|
};
|
|
32
|
+
maxrows: {
|
|
33
|
+
type: NumberConstructor;
|
|
34
|
+
default: number;
|
|
35
|
+
};
|
|
32
36
|
autoresize: {
|
|
33
37
|
type: BooleanConstructor;
|
|
34
38
|
default: boolean;
|
|
@@ -90,13 +94,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
94
|
[x: string]: unknown;
|
|
91
95
|
}, string>>;
|
|
92
96
|
name: import("vue").ComputedRef<string | undefined>;
|
|
93
|
-
inputId: import("vue").
|
|
97
|
+
inputId: import("vue").ComputedRef<string | undefined>;
|
|
94
98
|
textarea: import("vue").Ref<HTMLTextAreaElement | null>;
|
|
95
99
|
textareaClass: import("vue").ComputedRef<string>;
|
|
96
100
|
onInput: (event: Event) => void;
|
|
97
101
|
onChange: (event: Event) => void;
|
|
98
102
|
onBlur: (event: FocusEvent) => void;
|
|
99
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "update:modelValue")[], "blur" | "update:modelValue", import("vue").
|
|
103
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "update:modelValue")[], "blur" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
104
|
modelValue: {
|
|
101
105
|
type: (NumberConstructor | StringConstructor)[];
|
|
102
106
|
default: string;
|
|
@@ -125,6 +129,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
125
129
|
type: NumberConstructor;
|
|
126
130
|
default: number;
|
|
127
131
|
};
|
|
132
|
+
maxrows: {
|
|
133
|
+
type: NumberConstructor;
|
|
134
|
+
default: number;
|
|
135
|
+
};
|
|
128
136
|
autoresize: {
|
|
129
137
|
type: BooleanConstructor;
|
|
130
138
|
default: boolean;
|
|
@@ -189,15 +197,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
189
197
|
ui: any;
|
|
190
198
|
id: string;
|
|
191
199
|
color: any;
|
|
192
|
-
name: string;
|
|
193
200
|
class: any;
|
|
201
|
+
name: string;
|
|
202
|
+
variant: TextareaVariant;
|
|
194
203
|
modelValue: string | number;
|
|
195
204
|
rows: number;
|
|
196
205
|
disabled: boolean;
|
|
197
|
-
variant: TextareaVariant;
|
|
198
|
-
required: boolean;
|
|
199
206
|
placeholder: string;
|
|
200
207
|
padded: boolean;
|
|
208
|
+
required: boolean;
|
|
201
209
|
autofocus: boolean;
|
|
202
210
|
autofocusDelay: number;
|
|
203
211
|
modelModifiers: {
|
|
@@ -205,6 +213,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
205
213
|
lazy?: boolean | undefined;
|
|
206
214
|
number?: boolean | undefined;
|
|
207
215
|
};
|
|
216
|
+
maxrows: number;
|
|
208
217
|
autoresize: boolean;
|
|
209
218
|
textareaClass: string;
|
|
210
219
|
}, {}>;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
22
|
import { computed, toRef, defineComponent } from "vue";
|
|
23
|
-
import { Switch as HSwitch } from "@headlessui/vue";
|
|
23
|
+
import { Switch as HSwitch, provideUseId } from "@headlessui/vue";
|
|
24
24
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
25
25
|
import UIcon from "../elements/Icon.vue";
|
|
26
26
|
import { useUI } from "../../composables/useUI";
|
|
@@ -28,6 +28,7 @@ import { useFormGroup } from "../../composables/useFormGroup";
|
|
|
28
28
|
import { mergeConfig } from "../../utils";
|
|
29
29
|
import appConfig from "#build/app.config";
|
|
30
30
|
import { toggle } from "#ui/ui.config";
|
|
31
|
+
import { useId } from "#imports";
|
|
31
32
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.toggle, toggle);
|
|
32
33
|
export default defineComponent({
|
|
33
34
|
components: {
|
|
@@ -124,6 +125,7 @@ export default defineComponent({
|
|
|
124
125
|
color.value && ui.value.icon.off.replaceAll("{color}", color.value)
|
|
125
126
|
);
|
|
126
127
|
});
|
|
128
|
+
provideUseId(() => useId());
|
|
127
129
|
return {
|
|
128
130
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
129
131
|
ui,
|
|
@@ -49,13 +49,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
[x: string]: unknown;
|
|
50
50
|
}, string>>;
|
|
51
51
|
name: import("vue").ComputedRef<string | undefined>;
|
|
52
|
-
inputId: import("vue").
|
|
52
|
+
inputId: import("vue").ComputedRef<string | undefined>;
|
|
53
53
|
active: import("vue").WritableComputedRef<boolean>;
|
|
54
54
|
switchClass: import("vue").ComputedRef<string>;
|
|
55
55
|
containerClass: import("vue").ComputedRef<string>;
|
|
56
56
|
onIconClass: import("vue").ComputedRef<string>;
|
|
57
57
|
offIconClass: import("vue").ComputedRef<string>;
|
|
58
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").
|
|
58
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
59
|
id: {
|
|
60
60
|
type: StringConstructor;
|
|
61
61
|
default: null;
|
|
@@ -106,8 +106,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
106
106
|
ui: any;
|
|
107
107
|
id: string;
|
|
108
108
|
color: any;
|
|
109
|
-
name: string;
|
|
110
109
|
class: any;
|
|
110
|
+
name: string;
|
|
111
111
|
modelValue: boolean;
|
|
112
112
|
disabled: boolean;
|
|
113
113
|
onIcon: string;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div v-if="$slots.header" :class="[ui.header.base, ui.header.padding, ui.header.background]">
|
|
8
8
|
<slot name="header" />
|
|
9
9
|
</div>
|
|
10
|
-
<div :class="[ui.body.base, ui.body.padding, ui.body.background]">
|
|
10
|
+
<div v-if="$slots.default" :class="[ui.body.base, ui.body.padding, ui.body.background]">
|
|
11
11
|
<slot />
|
|
12
12
|
</div>
|
|
13
13
|
<div v-if="$slots.footer" :class="[ui.footer.base, ui.footer.padding, ui.footer.background]">
|
|
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
[x: string]: unknown;
|
|
19
19
|
}, string>>;
|
|
20
20
|
cardClass: import("vue").ComputedRef<string>;
|
|
21
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
as: {
|
|
23
23
|
type: StringConstructor;
|
|
24
24
|
default: string;
|
|
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
[x: string]: unknown;
|
|
19
19
|
}, string>>;
|
|
20
20
|
containerClass: import("vue").ComputedRef<string>;
|
|
21
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
as: {
|
|
23
23
|
type: StringConstructor;
|
|
24
24
|
default: string;
|
|
@@ -47,6 +47,13 @@ export default defineComponent({
|
|
|
47
47
|
type: Object,
|
|
48
48
|
default: null
|
|
49
49
|
},
|
|
50
|
+
size: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: () => config.default.size,
|
|
53
|
+
validator(value) {
|
|
54
|
+
return Object.keys(config.border.size.horizontal).includes(value) || Object.keys(config.border.size.vertical).includes(value);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
50
57
|
orientation: {
|
|
51
58
|
type: String,
|
|
52
59
|
default: "horizontal",
|
|
@@ -84,7 +91,7 @@ export default defineComponent({
|
|
|
84
91
|
return twJoin(
|
|
85
92
|
ui.value.border.base,
|
|
86
93
|
ui.value.border[props.orientation],
|
|
87
|
-
ui.value.border.size[props.orientation],
|
|
94
|
+
ui.value.border.size[props.orientation][props.size],
|
|
88
95
|
ui.value.border.type[props.type]
|
|
89
96
|
);
|
|
90
97
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { Avatar } from '../../types';
|
|
2
|
+
import type { Avatar, DividerSize } from '../../types';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
label: {
|
|
5
5
|
type: StringConstructor;
|
|
@@ -13,6 +13,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
type: PropType<Avatar>;
|
|
14
14
|
default: null;
|
|
15
15
|
};
|
|
16
|
+
size: {
|
|
17
|
+
type: PropType<DividerSize>;
|
|
18
|
+
default: () => any;
|
|
19
|
+
validator(value: string): boolean;
|
|
20
|
+
};
|
|
16
21
|
orientation: {
|
|
17
22
|
type: PropType<"horizontal" | "vertical">;
|
|
18
23
|
default: string;
|
|
@@ -25,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
30
|
};
|
|
26
31
|
class: {
|
|
27
32
|
type: PropType<any>;
|
|
28
|
-
default: () =>
|
|
33
|
+
default: () => "";
|
|
29
34
|
};
|
|
30
35
|
ui: {
|
|
31
36
|
type: PropType<any>;
|
|
@@ -39,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
44
|
wrapperClass: import("vue").ComputedRef<string>;
|
|
40
45
|
containerClass: import("vue").ComputedRef<string>;
|
|
41
46
|
borderClass: import("vue").ComputedRef<string>;
|
|
42
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
47
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
48
|
label: {
|
|
44
49
|
type: StringConstructor;
|
|
45
50
|
default: null;
|
|
@@ -52,6 +57,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
57
|
type: PropType<Avatar>;
|
|
53
58
|
default: null;
|
|
54
59
|
};
|
|
60
|
+
size: {
|
|
61
|
+
type: PropType<DividerSize>;
|
|
62
|
+
default: () => any;
|
|
63
|
+
validator(value: string): boolean;
|
|
64
|
+
};
|
|
55
65
|
orientation: {
|
|
56
66
|
type: PropType<"horizontal" | "vertical">;
|
|
57
67
|
default: string;
|
|
@@ -64,7 +74,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
64
74
|
};
|
|
65
75
|
class: {
|
|
66
76
|
type: PropType<any>;
|
|
67
|
-
default: () =>
|
|
77
|
+
default: () => "";
|
|
68
78
|
};
|
|
69
79
|
ui: {
|
|
70
80
|
type: PropType<any>;
|
|
@@ -72,6 +82,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
82
|
};
|
|
73
83
|
}>>, {
|
|
74
84
|
orientation: "horizontal" | "vertical";
|
|
85
|
+
size: DividerSize;
|
|
75
86
|
ui: any;
|
|
76
87
|
icon: string;
|
|
77
88
|
avatar: Avatar;
|
|
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
[x: string]: unknown;
|
|
15
15
|
}, string>>;
|
|
16
16
|
skeletonClass: import("vue").ComputedRef<string>;
|
|
17
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
18
|
class: {
|
|
19
19
|
type: PropType<any>;
|
|
20
20
|
default: () => string;
|
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
getULinkProps: (props: any) => {};
|
|
27
27
|
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
28
28
|
twJoin: typeof twJoin;
|
|
29
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
29
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
30
|
links: {
|
|
31
31
|
type: PropType<BreadcrumbLink[]>;
|
|
32
32
|
default: () => never[];
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
|
|
64
64
|
<script>
|
|
65
65
|
import { ref, computed, watch, toRef, onMounted, defineComponent } from "vue";
|
|
66
|
-
import { Combobox as HCombobox, ComboboxInput as HComboboxInput, ComboboxOptions as HComboboxOptions } from "@headlessui/vue";
|
|
66
|
+
import { Combobox as HCombobox, ComboboxInput as HComboboxInput, ComboboxOptions as HComboboxOptions, provideUseId } from "@headlessui/vue";
|
|
67
67
|
import { useDebounceFn } from "@vueuse/core";
|
|
68
68
|
import { useFuse } from "@vueuse/integrations/useFuse";
|
|
69
69
|
import { twJoin } from "tailwind-merge";
|
|
@@ -75,6 +75,7 @@ import { useUI } from "../../composables/useUI";
|
|
|
75
75
|
import { mergeConfig } from "../../utils";
|
|
76
76
|
import appConfig from "#build/app.config";
|
|
77
77
|
import { commandPalette } from "#ui/ui.config";
|
|
78
|
+
import { useId } from "#imports";
|
|
78
79
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.commandPalette, commandPalette);
|
|
79
80
|
export default defineComponent({
|
|
80
81
|
components: {
|
|
@@ -316,6 +317,7 @@ export default defineComponent({
|
|
|
316
317
|
comboboxApi,
|
|
317
318
|
results
|
|
318
319
|
});
|
|
320
|
+
provideUseId(() => useId());
|
|
319
321
|
return {
|
|
320
322
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
321
323
|
ui,
|
|
@@ -110,7 +110,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
110
110
|
emptyState: ComputedRef<any>;
|
|
111
111
|
onSelect: (option: Command | Command[]) => void;
|
|
112
112
|
onClear: () => void;
|
|
113
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue")[], "close" | "update:modelValue", import("vue").
|
|
113
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue")[], "close" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
114
114
|
modelValue: {
|
|
115
115
|
type: (ObjectConstructor | NumberConstructor | StringConstructor | ArrayConstructor)[];
|
|
116
116
|
default: null;
|
|
@@ -200,8 +200,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
200
200
|
default: () => {};
|
|
201
201
|
};
|
|
202
202
|
}>> & {
|
|
203
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
204
203
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
204
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
205
205
|
}, {
|
|
206
206
|
ui: any;
|
|
207
207
|
icon: string;
|
|
@@ -71,10 +71,11 @@
|
|
|
71
71
|
|
|
72
72
|
<script>
|
|
73
73
|
import { computed, defineComponent } from "vue";
|
|
74
|
-
import { ComboboxOption as HComboboxOption } from "@headlessui/vue";
|
|
74
|
+
import { ComboboxOption as HComboboxOption, provideUseId } from "@headlessui/vue";
|
|
75
75
|
import UIcon from "../elements/Icon.vue";
|
|
76
76
|
import UAvatar from "../elements/Avatar.vue";
|
|
77
77
|
import UKbd from "../elements/Kbd.vue";
|
|
78
|
+
import { useId } from "#imports";
|
|
78
79
|
export default defineComponent({
|
|
79
80
|
components: {
|
|
80
81
|
HComboboxOption,
|
|
@@ -137,6 +138,7 @@ export default defineComponent({
|
|
|
137
138
|
}
|
|
138
139
|
return content;
|
|
139
140
|
}
|
|
141
|
+
provideUseId(() => useId());
|
|
140
142
|
return {
|
|
141
143
|
label,
|
|
142
144
|
highlight
|
|
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
indices: number[][];
|
|
32
32
|
value: string;
|
|
33
33
|
}) => string;
|
|
34
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
35
|
group: {
|
|
36
36
|
type: PropType<Group>;
|
|
37
37
|
required: true;
|
|
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
23
|
getULinkProps: (props: any) => {};
|
|
24
24
|
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
25
25
|
twJoin: typeof twJoin;
|
|
26
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
27
|
links: {
|
|
28
28
|
type: PropType<HorizontalNavigationLink[] | HorizontalNavigationLink[][]>;
|
|
29
29
|
default: () => never[];
|
|
@@ -86,7 +86,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
86
86
|
onClickPage: (page: number | string) => void;
|
|
87
87
|
onClickFirst: () => void;
|
|
88
88
|
onClickLast: () => void;
|
|
89
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").
|
|
89
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
90
90
|
modelValue: {
|
|
91
91
|
type: NumberConstructor;
|
|
92
92
|
required: true;
|
|
@@ -33,13 +33,7 @@
|
|
|
33
33
|
</HTabList>
|
|
34
34
|
|
|
35
35
|
<HTabPanels :class="ui.container">
|
|
36
|
-
<HTabPanel
|
|
37
|
-
v-for="(item, index) of items"
|
|
38
|
-
:key="index"
|
|
39
|
-
v-slot="{ selected }"
|
|
40
|
-
:class="ui.base"
|
|
41
|
-
tabindex="-1"
|
|
42
|
-
>
|
|
36
|
+
<HTabPanel v-for="(item, index) of items" :key="index" v-slot="{ selected }" :class="ui.base" :unmount="unmount">
|
|
43
37
|
<slot :name="item.slot || 'item'" :item="item" :index="index" :selected="selected">
|
|
44
38
|
{{ item.content }}
|
|
45
39
|
</slot>
|
|
@@ -50,12 +44,13 @@
|
|
|
50
44
|
|
|
51
45
|
<script>
|
|
52
46
|
import { toRef, ref, watch, onMounted, defineComponent } from "vue";
|
|
53
|
-
import { TabGroup as HTabGroup, TabList as HTabList, Tab as HTab, TabPanels as HTabPanels, TabPanel as HTabPanel } from "@headlessui/vue";
|
|
47
|
+
import { TabGroup as HTabGroup, TabList as HTabList, Tab as HTab, TabPanels as HTabPanels, TabPanel as HTabPanel, provideUseId } from "@headlessui/vue";
|
|
54
48
|
import { useResizeObserver } from "@vueuse/core";
|
|
55
49
|
import { useUI } from "../../composables/useUI";
|
|
56
50
|
import { mergeConfig } from "../../utils";
|
|
57
51
|
import appConfig from "#build/app.config";
|
|
58
52
|
import { tabs } from "#ui/ui.config";
|
|
53
|
+
import { useId } from "#imports";
|
|
59
54
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.tabs, tabs);
|
|
60
55
|
export default defineComponent({
|
|
61
56
|
components: {
|
|
@@ -84,6 +79,10 @@ export default defineComponent({
|
|
|
84
79
|
type: Array,
|
|
85
80
|
default: () => []
|
|
86
81
|
},
|
|
82
|
+
unmount: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
87
86
|
class: {
|
|
88
87
|
type: [String, Object, Array],
|
|
89
88
|
default: () => ""
|
|
@@ -129,6 +128,7 @@ export default defineComponent({
|
|
|
129
128
|
calcMarkerSize(selectedIndex.value);
|
|
130
129
|
});
|
|
131
130
|
onMounted(() => calcMarkerSize(selectedIndex.value));
|
|
131
|
+
provideUseId(() => useId());
|
|
132
132
|
return {
|
|
133
133
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
134
134
|
ui,
|
|
@@ -18,6 +18,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
type: PropType<TabItem[]>;
|
|
19
19
|
default: () => never[];
|
|
20
20
|
};
|
|
21
|
+
unmount: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
21
25
|
class: {
|
|
22
26
|
type: PropType<any>;
|
|
23
27
|
default: () => string;
|
|
@@ -36,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
36
40
|
markerRef: import("vue").Ref<HTMLElement | undefined>;
|
|
37
41
|
selectedIndex: import("vue").Ref<number | undefined>;
|
|
38
42
|
onChange: (index: number) => void;
|
|
39
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").
|
|
43
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
44
|
modelValue: {
|
|
41
45
|
type: NumberConstructor;
|
|
42
46
|
default: undefined;
|
|
@@ -54,6 +58,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
58
|
type: PropType<TabItem[]>;
|
|
55
59
|
default: () => never[];
|
|
56
60
|
};
|
|
61
|
+
unmount: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
57
65
|
class: {
|
|
58
66
|
type: PropType<any>;
|
|
59
67
|
default: () => string;
|
|
@@ -70,6 +78,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
70
78
|
ui: any;
|
|
71
79
|
class: any;
|
|
72
80
|
modelValue: number;
|
|
81
|
+
unmount: boolean;
|
|
73
82
|
items: TabItem[];
|
|
74
83
|
defaultIndex: number;
|
|
75
84
|
}, {}>;
|
|
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
23
|
getULinkProps: (props: any) => {};
|
|
24
24
|
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
25
25
|
twJoin: typeof twJoin;
|
|
26
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
27
|
links: {
|
|
28
28
|
type: PropType<VerticalNavigationLink[] | VerticalNavigationLink[][]>;
|
|
29
29
|
default: () => never[];
|
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
wrapperClass: import("vue").ComputedRef<string>;
|
|
31
31
|
popper: import("vue").ComputedRef<PopperOptions>;
|
|
32
32
|
container: Ref<import("@vueuse/core").MaybeElement>;
|
|
33
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue")[], "close" | "update:modelValue", import("vue").
|
|
33
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue")[], "close" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
34
|
modelValue: {
|
|
35
35
|
type: BooleanConstructor;
|
|
36
36
|
default: boolean;
|
|
@@ -52,12 +52,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
default: () => {};
|
|
53
53
|
};
|
|
54
54
|
}>> & {
|
|
55
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
56
55
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
57
57
|
}, {
|
|
58
58
|
ui: any;
|
|
59
|
-
popper: PopperOptions;
|
|
60
59
|
class: any;
|
|
60
|
+
popper: PopperOptions;
|
|
61
61
|
modelValue: boolean;
|
|
62
62
|
}, {}>;
|
|
63
63
|
export default _default;
|
|
@@ -28,11 +28,12 @@
|
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
30
|
import { computed, toRef, defineComponent } from "vue";
|
|
31
|
-
import { Dialog as HDialog, DialogPanel as HDialogPanel, TransitionRoot, TransitionChild } from "@headlessui/vue";
|
|
31
|
+
import { Dialog as HDialog, DialogPanel as HDialogPanel, TransitionRoot, TransitionChild, provideUseId } from "@headlessui/vue";
|
|
32
32
|
import { useUI } from "../../composables/useUI";
|
|
33
33
|
import { mergeConfig } from "../../utils";
|
|
34
34
|
import appConfig from "#build/app.config";
|
|
35
35
|
import { modal } from "#ui/ui.config";
|
|
36
|
+
import { useId } from "#imports";
|
|
36
37
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.modal, modal);
|
|
37
38
|
export default defineComponent({
|
|
38
39
|
components: {
|
|
@@ -103,6 +104,7 @@ export default defineComponent({
|
|
|
103
104
|
isOpen.value = value;
|
|
104
105
|
emit("close");
|
|
105
106
|
}
|
|
107
|
+
provideUseId(() => useId());
|
|
106
108
|
return {
|
|
107
109
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
108
110
|
ui,
|
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
40
|
isOpen: import("vue").WritableComputedRef<boolean>;
|
|
41
41
|
transitionClass: import("vue").ComputedRef<any>;
|
|
42
42
|
close: (value: boolean) => void;
|
|
43
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue" | "close-prevented")[], "close" | "update:modelValue" | "close-prevented", import("vue").
|
|
43
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue" | "close-prevented")[], "close" | "update:modelValue" | "close-prevented", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
44
|
modelValue: {
|
|
45
45
|
type: BooleanConstructor;
|
|
46
46
|
default: boolean;
|
|
@@ -74,17 +74,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
74
|
default: () => {};
|
|
75
75
|
};
|
|
76
76
|
}>> & {
|
|
77
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
78
77
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
78
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
79
79
|
"onClose-prevented"?: ((...args: any[]) => any) | undefined;
|
|
80
80
|
}, {
|
|
81
81
|
ui: any;
|
|
82
|
-
transition: boolean;
|
|
83
|
-
class: any;
|
|
84
|
-
modelValue: boolean;
|
|
85
82
|
appear: boolean;
|
|
86
83
|
overlay: boolean;
|
|
84
|
+
transition: boolean;
|
|
87
85
|
preventClose: boolean;
|
|
88
86
|
fullscreen: boolean;
|
|
87
|
+
class: any;
|
|
88
|
+
modelValue: boolean;
|
|
89
89
|
}, {}>;
|
|
90
90
|
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="modalState.component" v-if="modalState" v-bind="modalState.props" v-model="isOpen" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts" setup>
|
|
6
|
+
import { inject } from 'vue'
|
|
7
|
+
import { useModal, modalInjectionKey } from '../../composables/useModal'
|
|
8
|
+
|
|
9
|
+
const modalState = inject(modalInjectionKey)
|
|
10
|
+
|
|
11
|
+
const { isOpen } = useModal()
|
|
12
|
+
</script>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<UAvatar v-if="avatar" v-bind="{ size: ui.avatar.size, ...avatar }" :class="ui.avatar.base" />
|
|
14
14
|
|
|
15
15
|
<div :class="ui.inner">
|
|
16
|
-
<p :class="ui.title">
|
|
16
|
+
<p v-if="(title || $slots.title)" :class="ui.title">
|
|
17
17
|
<slot name="title" :title="title">
|
|
18
18
|
{{ title }}
|
|
19
19
|
</slot>
|
|
@@ -68,7 +68,7 @@ export default defineComponent({
|
|
|
68
68
|
},
|
|
69
69
|
title: {
|
|
70
70
|
type: String,
|
|
71
|
-
|
|
71
|
+
default: null
|
|
72
72
|
},
|
|
73
73
|
description: {
|
|
74
74
|
type: String,
|
|
@@ -7,7 +7,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
};
|
|
8
8
|
title: {
|
|
9
9
|
type: StringConstructor;
|
|
10
|
-
|
|
10
|
+
default: null;
|
|
11
11
|
};
|
|
12
12
|
description: {
|
|
13
13
|
type: StringConstructor;
|
|
@@ -66,14 +66,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
66
|
onClose: () => void;
|
|
67
67
|
onAction: (action: NotificationAction) => void;
|
|
68
68
|
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
69
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").
|
|
69
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
70
70
|
id: {
|
|
71
71
|
type: (NumberConstructor | StringConstructor)[];
|
|
72
72
|
required: true;
|
|
73
73
|
};
|
|
74
74
|
title: {
|
|
75
75
|
type: StringConstructor;
|
|
76
|
-
|
|
76
|
+
default: null;
|
|
77
77
|
};
|
|
78
78
|
description: {
|
|
79
79
|
type: StringConstructor;
|
|
@@ -120,6 +120,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
120
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
121
121
|
}, {
|
|
122
122
|
ui: any;
|
|
123
|
+
title: string;
|
|
123
124
|
description: string;
|
|
124
125
|
icon: string;
|
|
125
126
|
avatar: Avatar;
|
|
@@ -33,7 +33,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
33
|
};
|
|
34
34
|
notifications: any;
|
|
35
35
|
wrapperClass: import("vue").ComputedRef<string>;
|
|
36
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
36
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
37
|
class: {
|
|
38
38
|
type: PropType<any>;
|
|
39
39
|
default: () => string;
|