@nuxt/ui 2.13.0 → 2.14.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/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 +131 -144
- 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 +63 -37
- 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 +62 -36
- 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 +6 -15
- 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 +6 -6
- package/dist/runtime/components/forms/InputMenu.vue +4 -1
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +7 -7
- package/dist/runtime/components/forms/Radio.vue +5 -11
- package/dist/runtime/components/forms/Radio.vue.d.ts +6 -6
- package/dist/runtime/components/forms/RadioGroup.vue +1 -0
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +4 -4
- package/dist/runtime/components/forms/Range.vue.d.ts +4 -4
- package/dist/runtime/components/forms/Select.vue.d.ts +6 -6
- package/dist/runtime/components/forms/SelectMenu.vue +4 -1
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +7 -7
- package/dist/runtime/components/forms/Textarea.vue +5 -1
- package/dist/runtime/components/forms/Textarea.vue.d.ts +15 -6
- package/dist/runtime/components/forms/Toggle.vue +3 -1
- package/dist/runtime/components/forms/Toggle.vue.d.ts +4 -4
- 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/colors.d.ts +3 -0
- package/dist/runtime/utils/colors.mjs +261 -0
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { Button } from '../../types';
|
|
2
|
+
import type { Button, ProgressAnimation } from '../../types';
|
|
3
3
|
declare function defaultComparator<T>(a: T, z: T): boolean;
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
modelValue: {
|
|
@@ -72,6 +72,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
72
|
}>;
|
|
73
73
|
default: () => any;
|
|
74
74
|
};
|
|
75
|
+
progress: {
|
|
76
|
+
type: PropType<{
|
|
77
|
+
color: any;
|
|
78
|
+
animation: ProgressAnimation;
|
|
79
|
+
}>;
|
|
80
|
+
default: () => any;
|
|
81
|
+
};
|
|
75
82
|
class: {
|
|
76
83
|
type: PropType<any>;
|
|
77
84
|
default: () => string;
|
|
@@ -112,7 +119,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
112
119
|
onSelect: (row: any) => void;
|
|
113
120
|
onChange: (event: any) => void;
|
|
114
121
|
getRowData: (row: Object, rowKey: string | string[], defaultValue?: any) => any;
|
|
115
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:sort")[], "update:modelValue" | "update:sort", import("vue").
|
|
122
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:sort")[], "update:modelValue" | "update:sort", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
116
123
|
modelValue: {
|
|
117
124
|
type: ArrayConstructor;
|
|
118
125
|
default: null;
|
|
@@ -183,6 +190,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
183
190
|
}>;
|
|
184
191
|
default: () => any;
|
|
185
192
|
};
|
|
193
|
+
progress: {
|
|
194
|
+
type: PropType<{
|
|
195
|
+
color: any;
|
|
196
|
+
animation: ProgressAnimation;
|
|
197
|
+
}>;
|
|
198
|
+
default: () => any;
|
|
199
|
+
};
|
|
186
200
|
class: {
|
|
187
201
|
type: PropType<any>;
|
|
188
202
|
default: () => string;
|
|
@@ -199,7 +213,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
199
213
|
column: string;
|
|
200
214
|
direction: 'asc' | 'desc';
|
|
201
215
|
};
|
|
216
|
+
progress: {
|
|
217
|
+
color: any;
|
|
218
|
+
animation: ProgressAnimation;
|
|
219
|
+
};
|
|
202
220
|
ui: any;
|
|
221
|
+
class: any;
|
|
203
222
|
columns: {
|
|
204
223
|
[key: string]: any;
|
|
205
224
|
key: string;
|
|
@@ -208,7 +227,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
208
227
|
direction?: "asc" | "desc" | undefined;
|
|
209
228
|
class?: string | undefined;
|
|
210
229
|
}[];
|
|
211
|
-
class: any;
|
|
212
230
|
modelValue: unknown[];
|
|
213
231
|
by: string | Function;
|
|
214
232
|
rows: {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="ui.wrapper">
|
|
3
|
-
<HDisclosure
|
|
3
|
+
<HDisclosure
|
|
4
|
+
v-for="(item, index) in items"
|
|
5
|
+
v-slot="{ open, close }"
|
|
6
|
+
:key="index"
|
|
7
|
+
as="div"
|
|
8
|
+
:class="ui.container"
|
|
9
|
+
:default-open="defaultOpen || item.defaultOpen"
|
|
10
|
+
>
|
|
4
11
|
<HDisclosureButton
|
|
5
12
|
:ref="() => buttonRefs[index] = { open, close }"
|
|
6
13
|
as="template"
|
|
@@ -46,13 +53,14 @@
|
|
|
46
53
|
|
|
47
54
|
<script>
|
|
48
55
|
import { ref, computed, toRef, defineComponent } from "vue";
|
|
49
|
-
import { Disclosure as HDisclosure, DisclosureButton as HDisclosureButton, DisclosurePanel as HDisclosurePanel } from "@headlessui/vue";
|
|
56
|
+
import { Disclosure as HDisclosure, DisclosureButton as HDisclosureButton, DisclosurePanel as HDisclosurePanel, provideUseId } from "@headlessui/vue";
|
|
50
57
|
import UIcon from "../elements/Icon.vue";
|
|
51
58
|
import UButton from "../elements/Button.vue";
|
|
52
59
|
import { useUI } from "../../composables/useUI";
|
|
53
60
|
import { mergeConfig, omit } from "../../utils";
|
|
54
61
|
import appConfig from "#build/app.config";
|
|
55
62
|
import { accordion, button } from "#ui/ui.config";
|
|
63
|
+
import { useId } from "#imports";
|
|
56
64
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.accordion, accordion);
|
|
57
65
|
const configButton = mergeConfig(appConfig.ui.strategy, appConfig.ui.button, button);
|
|
58
66
|
export default defineComponent({
|
|
@@ -129,6 +137,7 @@ export default defineComponent({
|
|
|
129
137
|
el.style.height = "0";
|
|
130
138
|
el.addEventListener("transitionend", done, { once: true });
|
|
131
139
|
}
|
|
140
|
+
provideUseId(() => useId());
|
|
132
141
|
return {
|
|
133
142
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
134
143
|
ui,
|
|
@@ -46,7 +46,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
46
|
onBeforeLeave: (_el: Element) => void;
|
|
47
47
|
onAfterEnter: (_el: Element) => void;
|
|
48
48
|
onLeave: (_el: Element, done: () => void) => void;
|
|
49
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
49
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
50
50
|
items: {
|
|
51
51
|
type: PropType<AccordionItem[]>;
|
|
52
52
|
default: () => never[];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<UAvatar v-if="avatar" v-bind="{ size: ui.avatar.size, ...avatar }" :class="ui.avatar.base" />
|
|
6
6
|
|
|
7
7
|
<div :class="ui.inner">
|
|
8
|
-
<p :class="ui.title">
|
|
8
|
+
<p v-if="(title || $slots.title)" :class="ui.title">
|
|
9
9
|
<slot name="title" :title="title">
|
|
10
10
|
{{ title }}
|
|
11
11
|
</slot>
|
|
@@ -52,7 +52,7 @@ export default defineComponent({
|
|
|
52
52
|
props: {
|
|
53
53
|
title: {
|
|
54
54
|
type: String,
|
|
55
|
-
|
|
55
|
+
default: null
|
|
56
56
|
},
|
|
57
57
|
description: {
|
|
58
58
|
type: String,
|
|
@@ -3,7 +3,7 @@ import type { Avatar, Button, AlertVariant, AlertAction } from '../../types';
|
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
title: {
|
|
5
5
|
type: StringConstructor;
|
|
6
|
-
|
|
6
|
+
default: null;
|
|
7
7
|
};
|
|
8
8
|
description: {
|
|
9
9
|
type: StringConstructor;
|
|
@@ -51,10 +51,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
51
|
alertClass: import("vue").ComputedRef<string>;
|
|
52
52
|
onAction: (action: AlertAction) => void;
|
|
53
53
|
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
54
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").
|
|
54
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
55
|
title: {
|
|
56
56
|
type: StringConstructor;
|
|
57
|
-
|
|
57
|
+
default: null;
|
|
58
58
|
};
|
|
59
59
|
description: {
|
|
60
60
|
type: StringConstructor;
|
|
@@ -98,6 +98,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
98
98
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
99
99
|
}, {
|
|
100
100
|
ui: any;
|
|
101
|
+
title: string;
|
|
101
102
|
description: string;
|
|
102
103
|
icon: string;
|
|
103
104
|
avatar: Avatar;
|
|
@@ -61,7 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
placeholder: import("vue").ComputedRef<string>;
|
|
62
62
|
error: import("vue").Ref<boolean>;
|
|
63
63
|
onError: () => void;
|
|
64
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
64
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
65
65
|
src: {
|
|
66
66
|
type: (BooleanConstructor | StringConstructor)[];
|
|
67
67
|
default: null;
|
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
};
|
|
21
21
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
22
22
|
[key: string]: any;
|
|
23
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
23
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
24
|
size: {
|
|
25
25
|
type: PropType<AvatarSize>;
|
|
26
26
|
default: null;
|
|
@@ -33,7 +33,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
33
|
[x: string]: unknown;
|
|
34
34
|
}, string>>;
|
|
35
35
|
badgeClass: 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
|
size: {
|
|
38
38
|
type: PropType<BadgeSize>;
|
|
39
39
|
default: () => any;
|
|
@@ -66,7 +66,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
66
|
ui: any;
|
|
67
67
|
color: any;
|
|
68
68
|
class: any;
|
|
69
|
-
label: string | number;
|
|
70
69
|
variant: BadgeVariant;
|
|
70
|
+
label: string | number;
|
|
71
71
|
}, {}>;
|
|
72
72
|
export default _default;
|
|
@@ -83,54 +83,67 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
83
|
to: {
|
|
84
84
|
readonly type: PropType<RouteLocationRaw>;
|
|
85
85
|
readonly default: undefined;
|
|
86
|
+
readonly required: false;
|
|
86
87
|
};
|
|
87
88
|
href: {
|
|
88
89
|
readonly type: PropType<RouteLocationRaw>;
|
|
89
90
|
readonly default: undefined;
|
|
91
|
+
readonly required: false;
|
|
90
92
|
};
|
|
91
93
|
target: {
|
|
92
|
-
readonly type: PropType<
|
|
94
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
93
95
|
readonly default: undefined;
|
|
96
|
+
readonly required: false;
|
|
94
97
|
};
|
|
95
98
|
rel: {
|
|
96
|
-
readonly type: PropType<
|
|
99
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
97
100
|
readonly default: undefined;
|
|
101
|
+
readonly required: false;
|
|
98
102
|
};
|
|
99
103
|
noRel: {
|
|
100
|
-
readonly type:
|
|
104
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
101
105
|
readonly default: undefined;
|
|
106
|
+
readonly required: false;
|
|
102
107
|
};
|
|
103
108
|
prefetch: {
|
|
104
|
-
readonly type:
|
|
109
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
105
110
|
readonly default: undefined;
|
|
111
|
+
readonly required: false;
|
|
106
112
|
};
|
|
107
113
|
noPrefetch: {
|
|
108
|
-
readonly type:
|
|
114
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
109
115
|
readonly default: undefined;
|
|
116
|
+
readonly required: false;
|
|
110
117
|
};
|
|
111
118
|
activeClass: {
|
|
112
|
-
readonly type:
|
|
119
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
113
120
|
readonly default: undefined;
|
|
121
|
+
readonly required: false;
|
|
114
122
|
};
|
|
115
123
|
exactActiveClass: {
|
|
116
|
-
readonly type:
|
|
124
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
117
125
|
readonly default: undefined;
|
|
126
|
+
readonly required: false;
|
|
118
127
|
};
|
|
119
128
|
prefetchedClass: {
|
|
120
|
-
readonly type:
|
|
129
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
121
130
|
readonly default: undefined;
|
|
131
|
+
readonly required: false;
|
|
122
132
|
};
|
|
123
133
|
replace: {
|
|
124
|
-
readonly type:
|
|
134
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
125
135
|
readonly default: undefined;
|
|
136
|
+
readonly required: false;
|
|
126
137
|
};
|
|
127
138
|
ariaCurrentValue: {
|
|
128
|
-
readonly type:
|
|
139
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
129
140
|
readonly default: undefined;
|
|
141
|
+
readonly required: false;
|
|
130
142
|
};
|
|
131
143
|
external: {
|
|
132
|
-
readonly type:
|
|
144
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
133
145
|
readonly default: undefined;
|
|
146
|
+
readonly required: false;
|
|
134
147
|
};
|
|
135
148
|
}, {
|
|
136
149
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -146,7 +159,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
146
159
|
leadingIconClass: import("vue").ComputedRef<string>;
|
|
147
160
|
trailingIconClass: import("vue").ComputedRef<string>;
|
|
148
161
|
linkProps: import("vue").ComputedRef<{}>;
|
|
149
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
162
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
150
163
|
type: {
|
|
151
164
|
type: StringConstructor;
|
|
152
165
|
default: string;
|
|
@@ -229,54 +242,67 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
229
242
|
to: {
|
|
230
243
|
readonly type: PropType<RouteLocationRaw>;
|
|
231
244
|
readonly default: undefined;
|
|
245
|
+
readonly required: false;
|
|
232
246
|
};
|
|
233
247
|
href: {
|
|
234
248
|
readonly type: PropType<RouteLocationRaw>;
|
|
235
249
|
readonly default: undefined;
|
|
250
|
+
readonly required: false;
|
|
236
251
|
};
|
|
237
252
|
target: {
|
|
238
|
-
readonly type: PropType<
|
|
253
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
239
254
|
readonly default: undefined;
|
|
255
|
+
readonly required: false;
|
|
240
256
|
};
|
|
241
257
|
rel: {
|
|
242
|
-
readonly type: PropType<
|
|
258
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
243
259
|
readonly default: undefined;
|
|
260
|
+
readonly required: false;
|
|
244
261
|
};
|
|
245
262
|
noRel: {
|
|
246
|
-
readonly type:
|
|
263
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
247
264
|
readonly default: undefined;
|
|
265
|
+
readonly required: false;
|
|
248
266
|
};
|
|
249
267
|
prefetch: {
|
|
250
|
-
readonly type:
|
|
268
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
251
269
|
readonly default: undefined;
|
|
270
|
+
readonly required: false;
|
|
252
271
|
};
|
|
253
272
|
noPrefetch: {
|
|
254
|
-
readonly type:
|
|
273
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
255
274
|
readonly default: undefined;
|
|
275
|
+
readonly required: false;
|
|
256
276
|
};
|
|
257
277
|
activeClass: {
|
|
258
|
-
readonly type:
|
|
278
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
259
279
|
readonly default: undefined;
|
|
280
|
+
readonly required: false;
|
|
260
281
|
};
|
|
261
282
|
exactActiveClass: {
|
|
262
|
-
readonly type:
|
|
283
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
263
284
|
readonly default: undefined;
|
|
285
|
+
readonly required: false;
|
|
264
286
|
};
|
|
265
287
|
prefetchedClass: {
|
|
266
|
-
readonly type:
|
|
288
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
267
289
|
readonly default: undefined;
|
|
290
|
+
readonly required: false;
|
|
268
291
|
};
|
|
269
292
|
replace: {
|
|
270
|
-
readonly type:
|
|
293
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
271
294
|
readonly default: undefined;
|
|
295
|
+
readonly required: false;
|
|
272
296
|
};
|
|
273
297
|
ariaCurrentValue: {
|
|
274
|
-
readonly type:
|
|
298
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
275
299
|
readonly default: undefined;
|
|
300
|
+
readonly required: false;
|
|
276
301
|
};
|
|
277
302
|
external: {
|
|
278
|
-
readonly type:
|
|
303
|
+
readonly type: PropType<NuxtLinkProps>;
|
|
279
304
|
readonly default: undefined;
|
|
305
|
+
readonly required: false;
|
|
280
306
|
};
|
|
281
307
|
}>>, {
|
|
282
308
|
size: ButtonSize;
|
|
@@ -285,13 +311,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
285
311
|
icon: string;
|
|
286
312
|
color: any;
|
|
287
313
|
type: string;
|
|
288
|
-
leading: boolean;
|
|
289
|
-
replace: boolean;
|
|
290
314
|
class: any;
|
|
315
|
+
target: NuxtLinkProps;
|
|
316
|
+
rel: NuxtLinkProps;
|
|
317
|
+
noRel: NuxtLinkProps;
|
|
318
|
+
prefetch: NuxtLinkProps;
|
|
319
|
+
noPrefetch: NuxtLinkProps;
|
|
320
|
+
activeClass: NuxtLinkProps;
|
|
321
|
+
exactActiveClass: NuxtLinkProps;
|
|
322
|
+
prefetchedClass: NuxtLinkProps;
|
|
323
|
+
replace: NuxtLinkProps;
|
|
324
|
+
ariaCurrentValue: NuxtLinkProps;
|
|
325
|
+
external: NuxtLinkProps;
|
|
326
|
+
leading: boolean;
|
|
327
|
+
variant: ButtonVariant;
|
|
291
328
|
label: string;
|
|
292
|
-
loading: boolean;
|
|
293
329
|
disabled: boolean;
|
|
294
|
-
|
|
330
|
+
loading: boolean;
|
|
295
331
|
block: boolean;
|
|
296
332
|
padded: boolean;
|
|
297
333
|
loadingIcon: string;
|
|
@@ -301,15 +337,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
301
337
|
square: boolean;
|
|
302
338
|
to: RouteLocationRaw;
|
|
303
339
|
href: RouteLocationRaw;
|
|
304
|
-
target: (string & {}) | "_blank" | "_parent" | "_self" | "_top" | null;
|
|
305
|
-
rel: string | null;
|
|
306
|
-
noRel: boolean;
|
|
307
|
-
prefetch: boolean;
|
|
308
|
-
noPrefetch: boolean;
|
|
309
|
-
activeClass: string;
|
|
310
|
-
exactActiveClass: string;
|
|
311
|
-
prefetchedClass: string;
|
|
312
|
-
ariaCurrentValue: string;
|
|
313
|
-
external: boolean;
|
|
314
340
|
}, {}>;
|
|
315
341
|
export default _default;
|
|
@@ -21,7 +21,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
21
|
};
|
|
22
22
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
23
|
[key: string]: any;
|
|
24
|
-
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
24
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
25
|
size: {
|
|
26
26
|
type: PropType<ButtonSize>;
|
|
27
27
|
default: null;
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
37
|
<div v-if="indicators" :class="ui.indicators.wrapper">
|
|
38
|
-
<template v-for="
|
|
39
|
-
<slot name="indicator" :on-click="onClick" :active="
|
|
38
|
+
<template v-for="page in pages" :key="page">
|
|
39
|
+
<slot name="indicator" :on-click="onClick" :active="page === currentPage" :page="page">
|
|
40
40
|
<button
|
|
41
41
|
type="button"
|
|
42
42
|
:class="[
|
|
43
43
|
ui.indicators.base,
|
|
44
|
-
|
|
44
|
+
page === currentPage ? ui.indicators.active : ui.indicators.inactive
|
|
45
45
|
]"
|
|
46
|
-
:aria-label="`set slide ${
|
|
47
|
-
@click="onClick(
|
|
46
|
+
:aria-label="`set slide ${page}`"
|
|
47
|
+
@click="onClick(page)"
|
|
48
48
|
/>
|
|
49
49
|
</slot>
|
|
50
50
|
</template>
|
|
@@ -98,7 +98,7 @@ export default defineComponent({
|
|
|
98
98
|
default: void 0
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
|
-
setup(props) {
|
|
101
|
+
setup(props, { expose }) {
|
|
102
102
|
const { ui, attrs } = useUI("carousel", toRef(props, "ui"), config, toRef(props, "class"));
|
|
103
103
|
const carouselRef = ref();
|
|
104
104
|
const itemWidth = ref(0);
|
|
@@ -110,8 +110,8 @@ export default defineComponent({
|
|
|
110
110
|
const [entry] = entries;
|
|
111
111
|
itemWidth.value = entry?.target?.firstElementChild?.clientWidth || 0;
|
|
112
112
|
});
|
|
113
|
-
const
|
|
114
|
-
const
|
|
113
|
+
const currentPage = computed(() => Math.round(x.value / itemWidth.value) + 1);
|
|
114
|
+
const pages = computed(() => {
|
|
115
115
|
if (!itemWidth.value) {
|
|
116
116
|
return 0;
|
|
117
117
|
}
|
|
@@ -123,9 +123,16 @@ export default defineComponent({
|
|
|
123
123
|
function onClickPrev() {
|
|
124
124
|
x.value -= itemWidth.value;
|
|
125
125
|
}
|
|
126
|
-
function onClick(
|
|
127
|
-
x.value = (
|
|
126
|
+
function onClick(page) {
|
|
127
|
+
x.value = (page - 1) * itemWidth.value;
|
|
128
128
|
}
|
|
129
|
+
expose({
|
|
130
|
+
pages,
|
|
131
|
+
page: currentPage,
|
|
132
|
+
prev: onClickPrev,
|
|
133
|
+
next: onClickNext,
|
|
134
|
+
select: onClick
|
|
135
|
+
});
|
|
129
136
|
return {
|
|
130
137
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
131
138
|
ui,
|
|
@@ -133,8 +140,8 @@ export default defineComponent({
|
|
|
133
140
|
isFirst,
|
|
134
141
|
isLast,
|
|
135
142
|
carouselRef,
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
pages,
|
|
144
|
+
currentPage,
|
|
138
145
|
onClickNext,
|
|
139
146
|
onClickPrev,
|
|
140
147
|
onClick,
|
|
@@ -45,13 +45,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
isFirst: import("vue").Ref<boolean>;
|
|
46
46
|
isLast: import("vue").Ref<boolean>;
|
|
47
47
|
carouselRef: import("vue").Ref<HTMLElement | undefined>;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
pages: import("vue").ComputedRef<number>;
|
|
49
|
+
currentPage: import("vue").ComputedRef<number>;
|
|
50
50
|
onClickNext: () => void;
|
|
51
51
|
onClickPrev: () => void;
|
|
52
|
-
onClick: (
|
|
52
|
+
onClick: (page: number) => void;
|
|
53
53
|
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
54
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
54
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
55
|
items: {
|
|
56
56
|
type: PropType<any[]>;
|
|
57
57
|
default: () => never[];
|
|
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
41
41
|
[x: string]: unknown;
|
|
42
42
|
}, string>>;
|
|
43
43
|
chipClass: import("vue").ComputedRef<string>;
|
|
44
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
44
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
45
|
size: {
|
|
46
46
|
type: PropType<"sm" | "2xs" | "md" | "xs" | "3xs" | "lg" | "xl" | "2xl" | "3xl">;
|
|
47
47
|
default: () => any;
|
|
@@ -81,9 +81,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
81
81
|
size: "sm" | "2xs" | "md" | "xs" | "3xs" | "lg" | "xl" | "2xl" | "3xl";
|
|
82
82
|
ui: any;
|
|
83
83
|
color: any;
|
|
84
|
+
class: any;
|
|
84
85
|
inset: boolean;
|
|
85
86
|
position: "top-right" | "bottom-right" | "top-left" | "bottom-left";
|
|
86
|
-
class: any;
|
|
87
87
|
text: string | number;
|
|
88
88
|
show: boolean;
|
|
89
89
|
}, {}>;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
<script>
|
|
58
58
|
import { defineComponent, ref, computed, watch, toRef, onMounted, resolveComponent } from "vue";
|
|
59
|
-
import { Menu as HMenu, MenuButton as HMenuButton, MenuItems as HMenuItems, MenuItem as HMenuItem } from "@headlessui/vue";
|
|
59
|
+
import { Menu as HMenu, MenuButton as HMenuButton, MenuItems as HMenuItems, MenuItem as HMenuItem, provideUseId } from "@headlessui/vue";
|
|
60
60
|
import { defu } from "defu";
|
|
61
61
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
62
62
|
import UIcon from "../elements/Icon.vue";
|
|
@@ -67,6 +67,7 @@ import { usePopper } from "../../composables/usePopper";
|
|
|
67
67
|
import { mergeConfig, getNuxtLinkProps } from "../../utils";
|
|
68
68
|
import appConfig from "#build/app.config";
|
|
69
69
|
import { dropdown } from "#ui/ui.config";
|
|
70
|
+
import { useId } from "#imports";
|
|
70
71
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.dropdown, dropdown);
|
|
71
72
|
export default defineComponent({
|
|
72
73
|
components: {
|
|
@@ -221,6 +222,7 @@ export default defineComponent({
|
|
|
221
222
|
emit("update:open", newValue === 0);
|
|
222
223
|
});
|
|
223
224
|
const NuxtLink = resolveComponent("NuxtLink");
|
|
225
|
+
provideUseId(() => useId());
|
|
224
226
|
return {
|
|
225
227
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
226
228
|
ui,
|
|
@@ -79,8 +79,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
79
|
getNuxtLinkProps: (props: any) => {};
|
|
80
80
|
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
81
81
|
twJoin: typeof twJoin;
|
|
82
|
-
NuxtLink: string | import("vue").ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
83
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:open"[], "update:open", import("vue").
|
|
82
|
+
NuxtLink: string | import("vue").ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>;
|
|
83
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:open"[], "update:open", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
84
84
|
items: {
|
|
85
85
|
type: PropType<DropdownItem[][]>;
|
|
86
86
|
default: () => never[];
|
|
@@ -122,8 +122,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
122
122
|
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
123
123
|
}, {
|
|
124
124
|
ui: any;
|
|
125
|
-
popper: PopperOptions;
|
|
126
125
|
class: any;
|
|
126
|
+
popper: PopperOptions;
|
|
127
127
|
disabled: boolean;
|
|
128
128
|
items: DropdownItem[][];
|
|
129
129
|
open: boolean;
|
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
};
|
|
10
10
|
}, {
|
|
11
11
|
dynamic: import("vue").ComputedRef<any>;
|
|
12
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
name: {
|
|
14
14
|
type: StringConstructor;
|
|
15
15
|
required: true;
|
|
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
24
24
|
[x: string]: unknown;
|
|
25
25
|
}, string>>;
|
|
26
26
|
kbdClass: import("vue").ComputedRef<string>;
|
|
27
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
27
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
28
|
value: {
|
|
29
29
|
type: StringConstructor;
|
|
30
30
|
default: null;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
:rel="rel"
|
|
24
24
|
:target="target"
|
|
25
25
|
:class="active !== undefined ? (active ? activeClass : inactiveClass) : resolveLinkClass(route, $route, { isActive, isExactActive })"
|
|
26
|
-
@click="(e) => !isExternal && navigate(e)"
|
|
26
|
+
@click="(e) => (!isExternal && !disabled) && navigate(e)"
|
|
27
27
|
>
|
|
28
28
|
<slot v-bind="{ isActive: active !== undefined ? active : (exact ? isExactActive : isActive) }" />
|
|
29
29
|
</a>
|