@nuxt/ui 2.11.0 → 2.12.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 +294 -48
- package/dist/module.d.ts +294 -48
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -4
- package/dist/runtime/components/data/Table.vue +29 -21
- package/dist/runtime/components/data/Table.vue.d.ts +28 -19
- package/dist/runtime/components/elements/Accordion.vue +10 -6
- package/dist/runtime/components/elements/Accordion.vue.d.ts +11 -11
- package/dist/runtime/components/elements/Alert.vue +12 -6
- package/dist/runtime/components/elements/Alert.vue.d.ts +12 -17
- package/dist/runtime/components/elements/Avatar.vue +2 -2
- package/dist/runtime/components/elements/Avatar.vue.d.ts +7 -7
- package/dist/runtime/components/elements/AvatarGroup.d.ts +7 -7
- package/dist/runtime/components/elements/AvatarGroup.mjs +2 -2
- package/dist/runtime/components/elements/Badge.vue +2 -2
- package/dist/runtime/components/elements/Badge.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Button.vue +8 -6
- package/dist/runtime/components/elements/Button.vue.d.ts +9 -8
- package/dist/runtime/components/elements/ButtonGroup.d.ts +7 -7
- package/dist/runtime/components/elements/ButtonGroup.mjs +3 -16
- package/dist/runtime/components/elements/Chip.vue +2 -2
- package/dist/runtime/components/elements/Chip.vue.d.ts +9 -9
- package/dist/runtime/components/elements/Dropdown.vue +68 -19
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +37 -9
- package/dist/runtime/components/elements/Kbd.vue +2 -2
- package/dist/runtime/components/elements/Kbd.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Link.vue +2 -2
- package/dist/runtime/components/elements/Meter.vue +2 -2
- package/dist/runtime/components/elements/Meter.vue.d.ts +7 -7
- package/dist/runtime/components/elements/MeterGroup.d.ts +9 -9
- package/dist/runtime/components/elements/MeterGroup.mjs +8 -21
- package/dist/runtime/components/elements/Progress.vue +5 -94
- package/dist/runtime/components/elements/Progress.vue.d.ts +123 -1
- package/dist/runtime/components/forms/Checkbox.vue +7 -7
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +8 -8
- package/dist/runtime/components/forms/Form.vue +17 -8
- package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
- package/dist/runtime/components/forms/FormGroup.vue +2 -2
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +7 -7
- package/dist/runtime/components/forms/Input.vue +8 -8
- package/dist/runtime/components/forms/Input.vue.d.ts +11 -11
- package/dist/runtime/components/forms/InputMenu.vue +410 -0
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +331 -0
- package/dist/runtime/components/forms/Radio.vue +7 -7
- package/dist/runtime/components/forms/Radio.vue.d.ts +7 -7
- package/dist/runtime/components/forms/RadioGroup.vue +5 -5
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +13 -13
- package/dist/runtime/components/forms/Range.vue +5 -5
- package/dist/runtime/components/forms/Range.vue.d.ts +8 -8
- package/dist/runtime/components/forms/Select.vue +8 -8
- package/dist/runtime/components/forms/Select.vue.d.ts +10 -10
- package/dist/runtime/components/forms/SelectMenu.vue +69 -36
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +40 -20
- package/dist/runtime/components/forms/Textarea.vue +3 -3
- package/dist/runtime/components/forms/Textarea.vue.d.ts +10 -10
- package/dist/runtime/components/forms/Toggle.vue +10 -10
- package/dist/runtime/components/forms/Toggle.vue.d.ts +16 -15
- package/dist/runtime/components/layout/Card.vue +2 -2
- package/dist/runtime/components/layout/Card.vue.d.ts +7 -7
- package/dist/runtime/components/layout/Container.vue +2 -2
- package/dist/runtime/components/layout/Container.vue.d.ts +7 -7
- package/dist/runtime/components/layout/Divider.vue +3 -8
- package/dist/runtime/components/layout/Divider.vue.d.ts +7 -7
- package/dist/runtime/components/layout/Skeleton.vue +2 -2
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +7 -7
- package/dist/runtime/components/navigation/Breadcrumb.vue +9 -6
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +10 -7
- package/dist/runtime/components/navigation/CommandPalette.vue +42 -33
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +16 -9
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -3
- package/dist/runtime/components/navigation/Pagination.vue +16 -11
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +16 -7
- package/dist/runtime/components/navigation/Tabs.vue +8 -5
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +9 -9
- package/dist/runtime/components/navigation/VerticalNavigation.vue +56 -39
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +14 -10
- package/dist/runtime/components/overlays/ContextMenu.vue +4 -3
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Modal.vue +3 -6
- package/dist/runtime/components/overlays/Modal.vue.d.ts +8 -8
- package/dist/runtime/components/overlays/Notification.vue +7 -7
- package/dist/runtime/components/overlays/Notification.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Notifications.vue +2 -2
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Popover.vue +54 -17
- package/dist/runtime/components/overlays/Popover.vue.d.ts +21 -11
- package/dist/runtime/components/overlays/Slideover.vue +6 -6
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +8 -8
- package/dist/runtime/components/overlays/Tooltip.vue +6 -5
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +7 -7
- package/dist/runtime/composables/useFormGroup.d.ts +3 -3
- package/dist/runtime/composables/useFormGroup.mjs +1 -1
- package/dist/runtime/composables/useShortcuts.mjs +3 -1
- package/dist/runtime/composables/useUI.d.ts +3 -3
- package/dist/runtime/types/alert.d.ts +5 -0
- package/dist/runtime/types/breadcrumb.d.ts +3 -0
- package/dist/runtime/types/dropdown.d.ts +2 -0
- package/dist/runtime/types/form.d.ts +2 -1
- package/dist/runtime/types/popper.d.ts +2 -0
- package/dist/runtime/types/utils.d.ts +4 -4
- package/dist/runtime/types/vertical-navigation.d.ts +1 -0
- package/dist/runtime/ui.config/data/table.d.ts +2 -2
- package/dist/runtime/ui.config/elements/accordion.d.ts +1 -1
- package/dist/runtime/ui.config/elements/alert.d.ts +5 -4
- package/dist/runtime/ui.config/elements/alert.mjs +1 -0
- package/dist/runtime/ui.config/elements/button.d.ts +4 -0
- package/dist/runtime/ui.config/elements/button.mjs +4 -0
- package/dist/runtime/ui.config/elements/buttonGroup.d.ts +92 -0
- package/dist/runtime/ui.config/elements/buttonGroup.mjs +12 -1
- package/dist/runtime/ui.config/elements/dropdown.d.ts +3 -1
- package/dist/runtime/ui.config/elements/dropdown.mjs +4 -2
- package/dist/runtime/ui.config/elements/meterGroup.d.ts +40 -0
- package/dist/runtime/ui.config/elements/meterGroup.mjs +14 -1
- package/dist/runtime/ui.config/forms/checkbox.d.ts +3 -0
- package/dist/runtime/ui.config/forms/checkbox.mjs +3 -0
- package/dist/runtime/ui.config/forms/input.d.ts +2 -0
- package/dist/runtime/ui.config/forms/input.mjs +14 -12
- package/dist/runtime/ui.config/forms/inputMenu.d.ts +64 -0
- package/dist/runtime/ui.config/forms/inputMenu.mjs +62 -0
- package/dist/runtime/ui.config/forms/radio.d.ts +3 -0
- package/dist/runtime/ui.config/forms/radio.mjs +3 -0
- package/dist/runtime/ui.config/forms/select.d.ts +2 -0
- package/dist/runtime/ui.config/forms/select.mjs +1 -0
- package/dist/runtime/ui.config/forms/selectMenu.d.ts +18 -11
- package/dist/runtime/ui.config/forms/selectMenu.mjs +12 -41
- package/dist/runtime/ui.config/forms/textarea.d.ts +2 -0
- package/dist/runtime/ui.config/forms/textarea.mjs +1 -0
- package/dist/runtime/ui.config/index.d.ts +1 -0
- package/dist/runtime/ui.config/index.mjs +1 -0
- package/dist/runtime/ui.config/layout/card.mjs +1 -1
- package/dist/runtime/ui.config/layout/divider.d.ts +6 -1
- package/dist/runtime/ui.config/layout/divider.mjs +5 -0
- package/dist/runtime/ui.config/navigation/breadcrumb.d.ts +1 -0
- package/dist/runtime/ui.config/navigation/breadcrumb.mjs +2 -1
- package/dist/runtime/ui.config/navigation/commandPalette.d.ts +5 -1
- package/dist/runtime/ui.config/navigation/commandPalette.mjs +5 -1
- package/dist/runtime/ui.config/navigation/pagination.d.ts +6 -6
- package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +6 -1
- package/dist/runtime/ui.config/navigation/verticalNavigation.mjs +5 -0
- package/dist/runtime/ui.config/overlays/contextMenu.mjs +1 -1
- package/dist/runtime/ui.config/overlays/modal.d.ts +1 -0
- package/dist/runtime/ui.config/overlays/modal.mjs +3 -2
- package/dist/runtime/ui.config/overlays/notification.d.ts +5 -4
- package/dist/runtime/ui.config/overlays/notification.mjs +1 -0
- package/dist/runtime/ui.config/overlays/popover.d.ts +1 -0
- package/dist/runtime/ui.config/overlays/popover.mjs +2 -1
- package/dist/runtime/ui.config/overlays/slideover.d.ts +5 -0
- package/dist/runtime/ui.config/overlays/slideover.mjs +5 -0
- package/dist/runtime/ui.config/overlays/tooltip.d.ts +1 -0
- package/dist/runtime/ui.config/overlays/tooltip.mjs +2 -1
- package/dist/runtime/ui.config/{_popperArrow.d.ts → popper.d.ts} +1 -2
- package/dist/runtime/ui.config/popper.mjs +9 -0
- package/dist/runtime/ui.css +1 -13
- package/dist/runtime/utils/index.mjs +11 -3
- package/dist/runtime/utils/uid.mjs +2 -1
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +1 -1
- package/package.json +29 -28
- package/dist/runtime/ui.config/_popperArrow.mjs +0 -8
|
@@ -18,6 +18,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
default: number;
|
|
19
19
|
validate(value: any): boolean;
|
|
20
20
|
};
|
|
21
|
+
disabled: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
21
25
|
size: {
|
|
22
26
|
type: PropType<ButtonSize>;
|
|
23
27
|
default: () => any;
|
|
@@ -61,11 +65,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
65
|
};
|
|
62
66
|
class: {
|
|
63
67
|
type: PropType<any>;
|
|
64
|
-
default:
|
|
68
|
+
default: () => "";
|
|
65
69
|
};
|
|
66
70
|
ui: {
|
|
67
|
-
type: PropType<
|
|
68
|
-
default:
|
|
71
|
+
type: PropType<any>;
|
|
72
|
+
default: () => {};
|
|
69
73
|
};
|
|
70
74
|
}, {
|
|
71
75
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -100,6 +104,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
104
|
default: number;
|
|
101
105
|
validate(value: any): boolean;
|
|
102
106
|
};
|
|
107
|
+
disabled: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
103
111
|
size: {
|
|
104
112
|
type: PropType<ButtonSize>;
|
|
105
113
|
default: () => any;
|
|
@@ -143,18 +151,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
143
151
|
};
|
|
144
152
|
class: {
|
|
145
153
|
type: PropType<any>;
|
|
146
|
-
default:
|
|
154
|
+
default: () => "";
|
|
147
155
|
};
|
|
148
156
|
ui: {
|
|
149
|
-
type: PropType<
|
|
150
|
-
default:
|
|
157
|
+
type: PropType<any>;
|
|
158
|
+
default: () => {};
|
|
151
159
|
};
|
|
152
160
|
}>> & {
|
|
153
161
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
154
162
|
}, {
|
|
155
163
|
size: ButtonSize;
|
|
156
|
-
ui:
|
|
164
|
+
ui: any;
|
|
157
165
|
class: any;
|
|
166
|
+
disabled: boolean;
|
|
158
167
|
max: number;
|
|
159
168
|
divider: string;
|
|
160
169
|
pageCount: number;
|
|
@@ -86,11 +86,11 @@ export default defineComponent({
|
|
|
86
86
|
},
|
|
87
87
|
class: {
|
|
88
88
|
type: [String, Object, Array],
|
|
89
|
-
default:
|
|
89
|
+
default: () => ""
|
|
90
90
|
},
|
|
91
91
|
ui: {
|
|
92
92
|
type: Object,
|
|
93
|
-
default:
|
|
93
|
+
default: () => ({})
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
emits: ["update:modelValue", "change"],
|
|
@@ -105,6 +105,9 @@ export default defineComponent({
|
|
|
105
105
|
if (!tab) {
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
+
if (!markerRef.value) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
108
111
|
markerRef.value.style.top = `${tab.offsetTop}px`;
|
|
109
112
|
markerRef.value.style.left = `${tab.offsetLeft}px`;
|
|
110
113
|
markerRef.value.style.width = `${tab.offsetWidth}px`;
|
|
@@ -114,16 +117,16 @@ export default defineComponent({
|
|
|
114
117
|
selectedIndex.value = index;
|
|
115
118
|
emit("change", index);
|
|
116
119
|
if (props.modelValue !== void 0) {
|
|
117
|
-
emit("update:modelValue",
|
|
120
|
+
emit("update:modelValue", selectedIndex.value);
|
|
118
121
|
}
|
|
119
|
-
calcMarkerSize(
|
|
122
|
+
calcMarkerSize(selectedIndex.value);
|
|
120
123
|
}
|
|
121
124
|
useResizeObserver(listRef, () => {
|
|
122
125
|
calcMarkerSize(selectedIndex.value);
|
|
123
126
|
});
|
|
124
127
|
watch(() => props.modelValue, (value) => {
|
|
125
128
|
selectedIndex.value = value;
|
|
126
|
-
calcMarkerSize(value);
|
|
129
|
+
calcMarkerSize(selectedIndex.value);
|
|
127
130
|
});
|
|
128
131
|
onMounted(() => calcMarkerSize(selectedIndex.value));
|
|
129
132
|
return {
|
|
@@ -20,11 +20,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
};
|
|
21
21
|
class: {
|
|
22
22
|
type: PropType<any>;
|
|
23
|
-
default:
|
|
23
|
+
default: () => string;
|
|
24
24
|
};
|
|
25
25
|
ui: {
|
|
26
|
-
type: PropType<
|
|
27
|
-
default:
|
|
26
|
+
type: PropType<any>;
|
|
27
|
+
default: () => {};
|
|
28
28
|
};
|
|
29
29
|
}, {
|
|
30
30
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -34,8 +34,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
listRef: import("vue").Ref<HTMLElement | undefined>;
|
|
35
35
|
itemRefs: import("vue").Ref<HTMLElement[]>;
|
|
36
36
|
markerRef: import("vue").Ref<HTMLElement | undefined>;
|
|
37
|
-
selectedIndex: import("vue").Ref<number>;
|
|
38
|
-
onChange: (index:
|
|
37
|
+
selectedIndex: import("vue").Ref<number | undefined>;
|
|
38
|
+
onChange: (index: number) => void;
|
|
39
39
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
40
|
modelValue: {
|
|
41
41
|
type: NumberConstructor;
|
|
@@ -56,18 +56,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
56
|
};
|
|
57
57
|
class: {
|
|
58
58
|
type: PropType<any>;
|
|
59
|
-
default:
|
|
59
|
+
default: () => string;
|
|
60
60
|
};
|
|
61
61
|
ui: {
|
|
62
|
-
type: PropType<
|
|
63
|
-
default:
|
|
62
|
+
type: PropType<any>;
|
|
63
|
+
default: () => {};
|
|
64
64
|
};
|
|
65
65
|
}>> & {
|
|
66
66
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
67
67
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
68
68
|
}, {
|
|
69
69
|
orientation: "horizontal" | "vertical";
|
|
70
|
-
ui:
|
|
70
|
+
ui: any;
|
|
71
71
|
class: any;
|
|
72
72
|
modelValue: number;
|
|
73
73
|
items: TabItem[];
|
|
@@ -1,47 +1,57 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav :class="ui.wrapper" v-bind="attrs">
|
|
3
|
-
<
|
|
4
|
-
v-for="(link, index) of
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
3
|
+
<ul v-for="(section, sectionIndex) of linkSections" :key="`linkSection${sectionIndex}`">
|
|
4
|
+
<li v-for="(link, index) of section" :key="`linkSection${sectionIndex}-${index}`">
|
|
5
|
+
<ULink
|
|
6
|
+
v-slot="{ isActive }"
|
|
7
|
+
v-bind="omit(link, ['label', 'labelClass', 'icon', 'iconClass', 'avatar', 'badge', 'click'])"
|
|
8
|
+
:class="[ui.base, ui.padding, ui.width, ui.ring, ui.rounded, ui.font, ui.size]"
|
|
9
|
+
:active-class="ui.active"
|
|
10
|
+
:inactive-class="ui.inactive"
|
|
11
|
+
@click="link.click"
|
|
12
|
+
@keyup.enter="$event.target.blur()"
|
|
13
|
+
>
|
|
14
|
+
<slot name="avatar" :link="link" :is-active="isActive">
|
|
15
|
+
<UAvatar
|
|
16
|
+
v-if="link.avatar"
|
|
17
|
+
v-bind="{ size: ui.avatar.size, ...link.avatar }"
|
|
18
|
+
:class="[ui.avatar.base]"
|
|
19
|
+
/>
|
|
20
|
+
</slot>
|
|
21
|
+
<slot name="icon" :link="link" :is-active="isActive">
|
|
22
|
+
<UIcon
|
|
23
|
+
v-if="link.icon"
|
|
24
|
+
:name="link.icon"
|
|
25
|
+
:class="twMerge(twJoin(ui.icon.base, isActive ? ui.icon.active : ui.icon.inactive), link.iconClass)"
|
|
26
|
+
/>
|
|
27
|
+
</slot>
|
|
28
|
+
<slot :link="link" :is-active="isActive">
|
|
29
|
+
<span v-if="link.label" :class="twMerge(ui.label, link.labelClass)">
|
|
30
|
+
<span v-if="isActive" class="sr-only">
|
|
31
|
+
Current page:
|
|
32
|
+
</span>
|
|
33
|
+
{{ link.label }}
|
|
34
|
+
</span>
|
|
35
|
+
</slot>
|
|
36
|
+
<slot name="badge" :link="link" :is-active="isActive">
|
|
37
|
+
<span v-if="link.badge" :class="[ui.badge.base, isActive ? ui.badge.active : ui.badge.inactive]">
|
|
38
|
+
{{ link.badge }}
|
|
39
|
+
</span>
|
|
40
|
+
</slot>
|
|
41
|
+
</ULink>
|
|
42
|
+
</li>
|
|
43
|
+
<UDivider v-if="sectionIndex < linkSections.length - 1" :ui="ui.divider" />
|
|
44
|
+
</ul>
|
|
37
45
|
</nav>
|
|
38
46
|
</template>
|
|
39
47
|
|
|
40
48
|
<script>
|
|
41
|
-
import { toRef, defineComponent } from "vue";
|
|
49
|
+
import { toRef, defineComponent, computed } from "vue";
|
|
50
|
+
import { twMerge, twJoin } from "tailwind-merge";
|
|
42
51
|
import UIcon from "../elements/Icon.vue";
|
|
43
52
|
import UAvatar from "../elements/Avatar.vue";
|
|
44
53
|
import ULink from "../elements/Link.vue";
|
|
54
|
+
import UDivider from "../layout/Divider.vue";
|
|
45
55
|
import { useUI } from "../../composables/useUI";
|
|
46
56
|
import { mergeConfig, omit } from "../../utils";
|
|
47
57
|
import appConfig from "#build/app.config";
|
|
@@ -51,7 +61,8 @@ export default defineComponent({
|
|
|
51
61
|
components: {
|
|
52
62
|
UIcon,
|
|
53
63
|
UAvatar,
|
|
54
|
-
ULink
|
|
64
|
+
ULink,
|
|
65
|
+
UDivider
|
|
55
66
|
},
|
|
56
67
|
inheritAttrs: false,
|
|
57
68
|
props: {
|
|
@@ -61,20 +72,26 @@ export default defineComponent({
|
|
|
61
72
|
},
|
|
62
73
|
class: {
|
|
63
74
|
type: [String, Object, Array],
|
|
64
|
-
default:
|
|
75
|
+
default: () => ""
|
|
65
76
|
},
|
|
66
77
|
ui: {
|
|
67
78
|
type: Object,
|
|
68
|
-
default:
|
|
79
|
+
default: () => ({})
|
|
69
80
|
}
|
|
70
81
|
},
|
|
71
82
|
setup(props) {
|
|
72
83
|
const { ui, attrs } = useUI("verticalNavigation", toRef(props, "ui"), config, toRef(props, "class"));
|
|
84
|
+
const linkSections = computed(() => {
|
|
85
|
+
return Array.isArray(props.links[0]) ? props.links : [props.links];
|
|
86
|
+
});
|
|
73
87
|
return {
|
|
74
88
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
75
89
|
ui,
|
|
76
90
|
attrs,
|
|
77
|
-
omit
|
|
91
|
+
omit,
|
|
92
|
+
linkSections,
|
|
93
|
+
twMerge,
|
|
94
|
+
twJoin
|
|
78
95
|
};
|
|
79
96
|
}
|
|
80
97
|
});
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
+
import { twJoin } from 'tailwind-merge';
|
|
2
3
|
import { omit } from '../../utils';
|
|
3
4
|
import type { VerticalNavigationLink } from '../../types';
|
|
4
5
|
declare const _default: import("vue").DefineComponent<{
|
|
5
6
|
links: {
|
|
6
|
-
type: PropType<VerticalNavigationLink[]>;
|
|
7
|
+
type: PropType<VerticalNavigationLink[] | VerticalNavigationLink[][]>;
|
|
7
8
|
default: () => never[];
|
|
8
9
|
};
|
|
9
10
|
class: {
|
|
10
11
|
type: PropType<any>;
|
|
11
|
-
default:
|
|
12
|
+
default: () => string;
|
|
12
13
|
};
|
|
13
14
|
ui: {
|
|
14
|
-
type: PropType<
|
|
15
|
-
default:
|
|
15
|
+
type: PropType<any>;
|
|
16
|
+
default: () => {};
|
|
16
17
|
};
|
|
17
18
|
}, {
|
|
18
19
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -20,22 +21,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
21
|
[x: string]: unknown;
|
|
21
22
|
}, string>>;
|
|
22
23
|
omit: typeof omit;
|
|
24
|
+
linkSections: import("vue").ComputedRef<VerticalNavigationLink[][]>;
|
|
25
|
+
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
26
|
+
twJoin: typeof twJoin;
|
|
23
27
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
28
|
links: {
|
|
25
|
-
type: PropType<VerticalNavigationLink[]>;
|
|
29
|
+
type: PropType<VerticalNavigationLink[] | VerticalNavigationLink[][]>;
|
|
26
30
|
default: () => never[];
|
|
27
31
|
};
|
|
28
32
|
class: {
|
|
29
33
|
type: PropType<any>;
|
|
30
|
-
default:
|
|
34
|
+
default: () => string;
|
|
31
35
|
};
|
|
32
36
|
ui: {
|
|
33
|
-
type: PropType<
|
|
34
|
-
default:
|
|
37
|
+
type: PropType<any>;
|
|
38
|
+
default: () => {};
|
|
35
39
|
};
|
|
36
40
|
}>>, {
|
|
37
|
-
ui:
|
|
41
|
+
ui: any;
|
|
38
42
|
class: any;
|
|
39
|
-
links: VerticalNavigationLink[];
|
|
43
|
+
links: VerticalNavigationLink[] | VerticalNavigationLink[][];
|
|
40
44
|
}, {}>;
|
|
41
45
|
export default _default;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
<div v-if="isOpen" ref="container" :class="wrapperClass" v-bind="attrs">
|
|
3
3
|
<Transition appear v-bind="ui.transition">
|
|
4
4
|
<div>
|
|
5
|
-
<div v-if="popper.arrow" data-popper-arrow :class="
|
|
5
|
+
<div v-if="popper.arrow" data-popper-arrow :class="Object.values(ui.arrow)" />
|
|
6
|
+
|
|
6
7
|
<div :class="[ui.base, ui.ring, ui.rounded, ui.shadow, ui.background]">
|
|
7
8
|
<slot />
|
|
8
9
|
</div>
|
|
@@ -39,11 +40,11 @@ export default defineComponent({
|
|
|
39
40
|
},
|
|
40
41
|
class: {
|
|
41
42
|
type: [String, Object, Array],
|
|
42
|
-
default:
|
|
43
|
+
default: () => ""
|
|
43
44
|
},
|
|
44
45
|
ui: {
|
|
45
46
|
type: Object,
|
|
46
|
-
default:
|
|
47
|
+
default: () => ({})
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
50
|
emits: ["update:modelValue", "close"],
|
|
@@ -15,11 +15,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
};
|
|
16
16
|
class: {
|
|
17
17
|
type: PropType<any>;
|
|
18
|
-
default:
|
|
18
|
+
default: () => string;
|
|
19
19
|
};
|
|
20
20
|
ui: {
|
|
21
|
-
type: PropType<
|
|
22
|
-
default:
|
|
21
|
+
type: PropType<any>;
|
|
22
|
+
default: () => {};
|
|
23
23
|
};
|
|
24
24
|
}, {
|
|
25
25
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -45,17 +45,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
};
|
|
46
46
|
class: {
|
|
47
47
|
type: PropType<any>;
|
|
48
|
-
default:
|
|
48
|
+
default: () => string;
|
|
49
49
|
};
|
|
50
50
|
ui: {
|
|
51
|
-
type: PropType<
|
|
52
|
-
default:
|
|
51
|
+
type: PropType<any>;
|
|
52
|
+
default: () => {};
|
|
53
53
|
};
|
|
54
54
|
}>> & {
|
|
55
55
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
56
56
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
57
57
|
}, {
|
|
58
|
-
ui:
|
|
58
|
+
ui: any;
|
|
59
59
|
popper: PopperOptions;
|
|
60
60
|
class: any;
|
|
61
61
|
modelValue: boolean;
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
ui.background,
|
|
15
15
|
ui.ring,
|
|
16
16
|
ui.shadow,
|
|
17
|
-
fullscreen ?
|
|
18
|
-
fullscreen ? 'h-screen' : ui.height,
|
|
19
|
-
fullscreen ? 'rounded-none' : ui.rounded,
|
|
20
|
-
fullscreen ? 'm-0' : ui.margin
|
|
17
|
+
fullscreen ? ui.fullscreen : [ui.width, ui.height, ui.rounded, ui.margin],
|
|
21
18
|
]"
|
|
22
19
|
>
|
|
23
20
|
<slot />
|
|
@@ -72,11 +69,11 @@ export default defineComponent({
|
|
|
72
69
|
},
|
|
73
70
|
class: {
|
|
74
71
|
type: [String, Object, Array],
|
|
75
|
-
default:
|
|
72
|
+
default: () => ""
|
|
76
73
|
},
|
|
77
74
|
ui: {
|
|
78
75
|
type: Object,
|
|
79
|
-
default:
|
|
76
|
+
default: () => ({})
|
|
80
77
|
}
|
|
81
78
|
},
|
|
82
79
|
emits: ["update:modelValue", "close"],
|
|
@@ -26,11 +26,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
};
|
|
27
27
|
class: {
|
|
28
28
|
type: PropType<any>;
|
|
29
|
-
default:
|
|
29
|
+
default: () => string;
|
|
30
30
|
};
|
|
31
31
|
ui: {
|
|
32
|
-
type: PropType<
|
|
33
|
-
default:
|
|
32
|
+
type: PropType<any>;
|
|
33
|
+
default: () => {};
|
|
34
34
|
};
|
|
35
35
|
}, {
|
|
36
36
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -67,22 +67,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
67
67
|
};
|
|
68
68
|
class: {
|
|
69
69
|
type: PropType<any>;
|
|
70
|
-
default:
|
|
70
|
+
default: () => string;
|
|
71
71
|
};
|
|
72
72
|
ui: {
|
|
73
|
-
type: PropType<
|
|
74
|
-
default:
|
|
73
|
+
type: PropType<any>;
|
|
74
|
+
default: () => {};
|
|
75
75
|
};
|
|
76
76
|
}>> & {
|
|
77
77
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
78
78
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
79
79
|
}, {
|
|
80
|
-
ui:
|
|
80
|
+
ui: any;
|
|
81
|
+
transition: boolean;
|
|
81
82
|
class: any;
|
|
82
83
|
modelValue: boolean;
|
|
83
84
|
appear: boolean;
|
|
84
85
|
overlay: boolean;
|
|
85
|
-
transition: boolean;
|
|
86
86
|
preventClose: boolean;
|
|
87
87
|
fullscreen: boolean;
|
|
88
88
|
}, {}>;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<UIcon v-if="icon" :name="icon" :class="iconClass" />
|
|
13
13
|
<UAvatar v-if="avatar" v-bind="{ size: ui.avatar.size, ...avatar }" :class="ui.avatar.base" />
|
|
14
14
|
|
|
15
|
-
<div class="
|
|
15
|
+
<div :class="ui.inner">
|
|
16
16
|
<p :class="ui.title">
|
|
17
17
|
<slot name="title" :title="title">
|
|
18
18
|
{{ title }}
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
</p>
|
|
26
26
|
|
|
27
27
|
<div v-if="(description || $slots.description) && actions.length" :class="ui.actions">
|
|
28
|
-
<UButton v-for="(action, index) of actions" :key="index" v-bind="{ ...ui.default.actionButton, ...action }" @click.stop="onAction(action)" />
|
|
28
|
+
<UButton v-for="(action, index) of actions" :key="index" v-bind="{ ...(ui.default.actionButton || {}), ...action }" @click.stop="onAction(action)" />
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
31
|
<div v-if="closeButton || (!description && !$slots.description && actions.length)" :class="twMerge(ui.actions, 'mt-0')">
|
|
32
32
|
<template v-if="!description && !$slots.description && actions.length">
|
|
33
|
-
<UButton v-for="(action, index) of actions" :key="index" v-bind="{ ...ui.default.actionButton, ...action }" @click.stop="onAction(action)" />
|
|
33
|
+
<UButton v-for="(action, index) of actions" :key="index" v-bind="{ ...(ui.default.actionButton || {}), ...action }" @click.stop="onAction(action)" />
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
|
-
<UButton v-if="closeButton" aria-label="Close" v-bind="{ ...ui.default.closeButton, ...closeButton }" @click.stop="onClose" />
|
|
36
|
+
<UButton v-if="closeButton" aria-label="Close" v-bind="{ ...(ui.default.closeButton || {}), ...closeButton }" @click.stop="onClose" />
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
<div v-if="timeout" :class="progressClass" :style="progressStyle" />
|
|
@@ -107,11 +107,11 @@ export default defineComponent({
|
|
|
107
107
|
},
|
|
108
108
|
class: {
|
|
109
109
|
type: [String, Object, Array],
|
|
110
|
-
default:
|
|
110
|
+
default: () => ""
|
|
111
111
|
},
|
|
112
112
|
ui: {
|
|
113
113
|
type: Object,
|
|
114
|
-
default:
|
|
114
|
+
default: () => ({})
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
emits: ["close"],
|
|
@@ -122,7 +122,7 @@ export default defineComponent({
|
|
|
122
122
|
const wrapperClass = computed(() => {
|
|
123
123
|
return twMerge(twJoin(
|
|
124
124
|
ui.value.wrapper,
|
|
125
|
-
ui.value.background,
|
|
125
|
+
ui.value.background?.replaceAll("{color}", props.color),
|
|
126
126
|
ui.value.rounded,
|
|
127
127
|
ui.value.shadow
|
|
128
128
|
), props.class);
|
|
@@ -44,11 +44,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
};
|
|
45
45
|
class: {
|
|
46
46
|
type: PropType<any>;
|
|
47
|
-
default:
|
|
47
|
+
default: () => "";
|
|
48
48
|
};
|
|
49
49
|
ui: {
|
|
50
|
-
type: PropType<
|
|
51
|
-
default:
|
|
50
|
+
type: PropType<any>;
|
|
51
|
+
default: () => {};
|
|
52
52
|
};
|
|
53
53
|
}, {
|
|
54
54
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -110,16 +110,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
110
110
|
};
|
|
111
111
|
class: {
|
|
112
112
|
type: PropType<any>;
|
|
113
|
-
default:
|
|
113
|
+
default: () => "";
|
|
114
114
|
};
|
|
115
115
|
ui: {
|
|
116
|
-
type: PropType<
|
|
117
|
-
default:
|
|
116
|
+
type: PropType<any>;
|
|
117
|
+
default: () => {};
|
|
118
118
|
};
|
|
119
119
|
}>> & {
|
|
120
120
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
121
121
|
}, {
|
|
122
|
-
ui:
|
|
122
|
+
ui: any;
|
|
123
123
|
description: string;
|
|
124
124
|
icon: string;
|
|
125
125
|
avatar: Avatar;
|
|
@@ -3,11 +3,11 @@ import type { Notification } from '../../types';
|
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
class: {
|
|
5
5
|
type: PropType<any>;
|
|
6
|
-
default:
|
|
6
|
+
default: () => string;
|
|
7
7
|
};
|
|
8
8
|
ui: {
|
|
9
|
-
type: PropType<
|
|
10
|
-
default:
|
|
9
|
+
type: PropType<any>;
|
|
10
|
+
default: () => {};
|
|
11
11
|
};
|
|
12
12
|
}, {
|
|
13
13
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -36,14 +36,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
36
36
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
37
|
class: {
|
|
38
38
|
type: PropType<any>;
|
|
39
|
-
default:
|
|
39
|
+
default: () => string;
|
|
40
40
|
};
|
|
41
41
|
ui: {
|
|
42
|
-
type: PropType<
|
|
43
|
-
default:
|
|
42
|
+
type: PropType<any>;
|
|
43
|
+
default: () => {};
|
|
44
44
|
};
|
|
45
45
|
}>>, {
|
|
46
|
-
ui:
|
|
46
|
+
ui: any;
|
|
47
47
|
class: any;
|
|
48
48
|
}, {}>;
|
|
49
49
|
export default _default;
|