@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
|
@@ -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
329
|
loading: boolean;
|
|
293
330
|
disabled: boolean;
|
|
294
|
-
variant: ButtonVariant;
|
|
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>
|
|
@@ -34,61 +34,74 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
to: {
|
|
35
35
|
readonly type: import("vue").PropType<RouteLocationRaw>;
|
|
36
36
|
readonly default: undefined;
|
|
37
|
+
readonly required: false;
|
|
37
38
|
};
|
|
38
39
|
href: {
|
|
39
40
|
readonly type: import("vue").PropType<RouteLocationRaw>;
|
|
40
41
|
readonly default: undefined;
|
|
42
|
+
readonly required: false;
|
|
41
43
|
};
|
|
42
44
|
target: {
|
|
43
|
-
readonly type: import("vue").PropType<
|
|
45
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
44
46
|
readonly default: undefined;
|
|
47
|
+
readonly required: false;
|
|
45
48
|
};
|
|
46
49
|
rel: {
|
|
47
|
-
readonly type: import("vue").PropType<
|
|
50
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
48
51
|
readonly default: undefined;
|
|
52
|
+
readonly required: false;
|
|
49
53
|
};
|
|
50
54
|
noRel: {
|
|
51
|
-
readonly type:
|
|
55
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
52
56
|
readonly default: undefined;
|
|
57
|
+
readonly required: false;
|
|
53
58
|
};
|
|
54
59
|
prefetch: {
|
|
55
|
-
readonly type:
|
|
60
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
56
61
|
readonly default: undefined;
|
|
62
|
+
readonly required: false;
|
|
57
63
|
};
|
|
58
64
|
noPrefetch: {
|
|
59
|
-
readonly type:
|
|
65
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
60
66
|
readonly default: undefined;
|
|
67
|
+
readonly required: false;
|
|
61
68
|
};
|
|
62
69
|
activeClass: {
|
|
63
|
-
readonly type:
|
|
70
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
64
71
|
readonly default: undefined;
|
|
72
|
+
readonly required: false;
|
|
65
73
|
};
|
|
66
74
|
exactActiveClass: {
|
|
67
|
-
readonly type:
|
|
75
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
68
76
|
readonly default: undefined;
|
|
77
|
+
readonly required: false;
|
|
69
78
|
};
|
|
70
79
|
prefetchedClass: {
|
|
71
|
-
readonly type:
|
|
80
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
72
81
|
readonly default: undefined;
|
|
82
|
+
readonly required: false;
|
|
73
83
|
};
|
|
74
84
|
replace: {
|
|
75
|
-
readonly type:
|
|
85
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
76
86
|
readonly default: undefined;
|
|
87
|
+
readonly required: false;
|
|
77
88
|
};
|
|
78
89
|
ariaCurrentValue: {
|
|
79
|
-
readonly type:
|
|
90
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
80
91
|
readonly default: undefined;
|
|
92
|
+
readonly required: false;
|
|
81
93
|
};
|
|
82
94
|
external: {
|
|
83
|
-
readonly type:
|
|
95
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
84
96
|
readonly default: undefined;
|
|
97
|
+
readonly required: false;
|
|
85
98
|
};
|
|
86
99
|
}, {
|
|
87
100
|
resolveLinkClass: (route: any, $route: any, { isActive, isExactActive }: {
|
|
88
101
|
isActive: boolean;
|
|
89
102
|
isExactActive: boolean;
|
|
90
|
-
}) =>
|
|
91
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
103
|
+
}) => any;
|
|
104
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
92
105
|
as: {
|
|
93
106
|
type: StringConstructor;
|
|
94
107
|
default: string;
|
|
@@ -124,72 +137,85 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
124
137
|
to: {
|
|
125
138
|
readonly type: import("vue").PropType<RouteLocationRaw>;
|
|
126
139
|
readonly default: undefined;
|
|
140
|
+
readonly required: false;
|
|
127
141
|
};
|
|
128
142
|
href: {
|
|
129
143
|
readonly type: import("vue").PropType<RouteLocationRaw>;
|
|
130
144
|
readonly default: undefined;
|
|
145
|
+
readonly required: false;
|
|
131
146
|
};
|
|
132
147
|
target: {
|
|
133
|
-
readonly type: import("vue").PropType<
|
|
148
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
134
149
|
readonly default: undefined;
|
|
150
|
+
readonly required: false;
|
|
135
151
|
};
|
|
136
152
|
rel: {
|
|
137
|
-
readonly type: import("vue").PropType<
|
|
153
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
138
154
|
readonly default: undefined;
|
|
155
|
+
readonly required: false;
|
|
139
156
|
};
|
|
140
157
|
noRel: {
|
|
141
|
-
readonly type:
|
|
158
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
142
159
|
readonly default: undefined;
|
|
160
|
+
readonly required: false;
|
|
143
161
|
};
|
|
144
162
|
prefetch: {
|
|
145
|
-
readonly type:
|
|
163
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
146
164
|
readonly default: undefined;
|
|
165
|
+
readonly required: false;
|
|
147
166
|
};
|
|
148
167
|
noPrefetch: {
|
|
149
|
-
readonly type:
|
|
168
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
150
169
|
readonly default: undefined;
|
|
170
|
+
readonly required: false;
|
|
151
171
|
};
|
|
152
172
|
activeClass: {
|
|
153
|
-
readonly type:
|
|
173
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
154
174
|
readonly default: undefined;
|
|
175
|
+
readonly required: false;
|
|
155
176
|
};
|
|
156
177
|
exactActiveClass: {
|
|
157
|
-
readonly type:
|
|
178
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
158
179
|
readonly default: undefined;
|
|
180
|
+
readonly required: false;
|
|
159
181
|
};
|
|
160
182
|
prefetchedClass: {
|
|
161
|
-
readonly type:
|
|
183
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
162
184
|
readonly default: undefined;
|
|
185
|
+
readonly required: false;
|
|
163
186
|
};
|
|
164
187
|
replace: {
|
|
165
|
-
readonly type:
|
|
188
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
166
189
|
readonly default: undefined;
|
|
190
|
+
readonly required: false;
|
|
167
191
|
};
|
|
168
192
|
ariaCurrentValue: {
|
|
169
|
-
readonly type:
|
|
193
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
170
194
|
readonly default: undefined;
|
|
195
|
+
readonly required: false;
|
|
171
196
|
};
|
|
172
197
|
external: {
|
|
173
|
-
readonly type:
|
|
198
|
+
readonly type: import("vue").PropType<NuxtLinkProps>;
|
|
174
199
|
readonly default: undefined;
|
|
200
|
+
readonly required: false;
|
|
175
201
|
};
|
|
176
202
|
}>>, {
|
|
177
203
|
type: string;
|
|
178
|
-
|
|
204
|
+
target: NuxtLinkProps;
|
|
205
|
+
rel: NuxtLinkProps;
|
|
206
|
+
noRel: NuxtLinkProps;
|
|
207
|
+
prefetch: NuxtLinkProps;
|
|
208
|
+
noPrefetch: NuxtLinkProps;
|
|
209
|
+
activeClass: NuxtLinkProps;
|
|
210
|
+
exactActiveClass: NuxtLinkProps;
|
|
211
|
+
prefetchedClass: NuxtLinkProps;
|
|
212
|
+
replace: NuxtLinkProps;
|
|
213
|
+
ariaCurrentValue: NuxtLinkProps;
|
|
214
|
+
external: NuxtLinkProps;
|
|
179
215
|
as: string;
|
|
180
216
|
disabled: boolean;
|
|
181
217
|
to: RouteLocationRaw;
|
|
182
218
|
href: RouteLocationRaw;
|
|
183
|
-
target: (string & {}) | "_blank" | "_parent" | "_self" | "_top" | null;
|
|
184
|
-
rel: string | null;
|
|
185
|
-
noRel: boolean;
|
|
186
|
-
prefetch: boolean;
|
|
187
|
-
noPrefetch: boolean;
|
|
188
|
-
activeClass: string;
|
|
189
|
-
exactActiveClass: string;
|
|
190
|
-
prefetchedClass: string;
|
|
191
|
-
ariaCurrentValue: string;
|
|
192
|
-
external: boolean;
|
|
193
219
|
active: boolean;
|
|
194
220
|
exact: boolean;
|
|
195
221
|
exactQuery: boolean;
|
|
@@ -30,12 +30,16 @@
|
|
|
30
30
|
<script>
|
|
31
31
|
import { computed, defineComponent, toRef } from "vue";
|
|
32
32
|
import { twJoin } from "tailwind-merge";
|
|
33
|
+
import UIcon from "./Icon.vue";
|
|
33
34
|
import { useUI } from "../../composables/useUI";
|
|
34
35
|
import { mergeConfig } from "../../utils";
|
|
35
36
|
import appConfig from "#build/app.config";
|
|
36
37
|
import { meter } from "#ui/ui.config";
|
|
37
38
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.meter, meter);
|
|
38
39
|
export default defineComponent({
|
|
40
|
+
components: {
|
|
41
|
+
UIcon
|
|
42
|
+
},
|
|
39
43
|
inheritAttrs: false,
|
|
40
44
|
slots: Object,
|
|
41
45
|
props: {
|
|
@@ -56,7 +56,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
56
|
normalizedMin: import("vue").ComputedRef<number>;
|
|
57
57
|
normalizedMax: import("vue").ComputedRef<number>;
|
|
58
58
|
percent: import("vue").ComputedRef<number>;
|
|
59
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
59
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
60
60
|
value: {
|
|
61
61
|
type: NumberConstructor;
|
|
62
62
|
default: number;
|
|
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
};
|
|
32
32
|
}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
33
33
|
[key: string]: any;
|
|
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
|
min: {
|
|
36
36
|
type: NumberConstructor;
|
|
37
37
|
default: number;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</slot>
|
|
10
10
|
|
|
11
11
|
<progress :class="progressClass" v-bind="{ value, max: realMax }">
|
|
12
|
-
{{ Math.round(percent) }}
|
|
12
|
+
{{ percent !== undefined ? `${Math.round(percent)}%` : undefined }}
|
|
13
13
|
</progress>
|
|
14
14
|
|
|
15
15
|
<div v-if="isSteps" :class="stepsClass">
|
|
@@ -163,6 +163,9 @@ export default defineComponent({
|
|
|
163
163
|
return Number(props.max);
|
|
164
164
|
});
|
|
165
165
|
const percent = computed(() => {
|
|
166
|
+
if (isIndeterminate.value) {
|
|
167
|
+
return void 0;
|
|
168
|
+
}
|
|
166
169
|
switch (true) {
|
|
167
170
|
case props.value < 0:
|
|
168
171
|
return 0;
|