@nuxt/ui 3.1.0 → 3.1.2
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/.nuxt/ui/accordion.ts +2 -23
- package/.nuxt/ui/alert.ts +2 -28
- package/.nuxt/ui/avatar-group.ts +2 -23
- package/.nuxt/ui/avatar.ts +2 -23
- package/.nuxt/ui/badge.ts +32 -30
- package/.nuxt/ui/breadcrumb.ts +2 -23
- package/.nuxt/ui/button-group.ts +2 -36
- package/.nuxt/ui/button.ts +4 -30
- package/.nuxt/ui/calendar.ts +4 -25
- package/.nuxt/ui/card.ts +2 -23
- package/.nuxt/ui/carousel.ts +2 -28
- package/.nuxt/ui/checkbox-group.ts +146 -24
- package/.nuxt/ui/checkbox.ts +2 -23
- package/.nuxt/ui/chip.ts +2 -23
- package/.nuxt/ui/collapsible.ts +2 -23
- package/.nuxt/ui/color-picker.ts +4 -25
- package/.nuxt/ui/command-palette.ts +2 -23
- package/.nuxt/ui/container.ts +2 -23
- package/.nuxt/ui/context-menu.ts +2 -23
- package/.nuxt/ui/drawer.ts +2 -23
- package/.nuxt/ui/dropdown-menu.ts +2 -23
- package/.nuxt/ui/form-field.ts +2 -23
- package/.nuxt/ui/form.ts +2 -23
- package/.nuxt/ui/input-menu.ts +4 -34
- package/.nuxt/ui/input-number.ts +12 -23
- package/.nuxt/ui/input.ts +4 -34
- package/.nuxt/ui/kbd.ts +2 -23
- package/.nuxt/ui/link.ts +14 -28
- package/.nuxt/ui/modal.ts +2 -23
- package/.nuxt/ui/navigation-menu.ts +3 -24
- package/.nuxt/ui/pagination.ts +2 -23
- package/.nuxt/ui/pin-input.ts +2 -23
- package/.nuxt/ui/popover.ts +2 -23
- package/.nuxt/ui/progress.ts +2 -23
- package/.nuxt/ui/radio-group.ts +2 -23
- package/.nuxt/ui/select-menu.ts +4 -34
- package/.nuxt/ui/select.ts +4 -34
- package/.nuxt/ui/separator.ts +2 -23
- package/.nuxt/ui/skeleton.ts +2 -23
- package/.nuxt/ui/slideover.ts +2 -23
- package/.nuxt/ui/slider.ts +2 -23
- package/.nuxt/ui/stepper.ts +2 -23
- package/.nuxt/ui/switch.ts +2 -23
- package/.nuxt/ui/table.ts +2 -23
- package/.nuxt/ui/tabs.ts +6 -26
- package/.nuxt/ui/textarea.ts +4 -34
- package/.nuxt/ui/toast.ts +2 -28
- package/.nuxt/ui/toaster.ts +2 -23
- package/.nuxt/ui/tooltip.ts +2 -23
- package/.nuxt/ui/tree.ts +2 -23
- package/.nuxt/ui.css +15 -8
- package/README.md +4 -0
- package/cli/templates.mjs +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +15 -5
- package/dist/runtime/components/Accordion.vue +9 -9
- package/dist/runtime/components/Accordion.vue.d.ts +6 -20
- package/dist/runtime/components/Alert.vue +1 -1
- package/dist/runtime/components/Alert.vue.d.ts +7 -22
- package/dist/runtime/components/App.vue.d.ts +2 -2
- package/dist/runtime/components/Avatar.vue +2 -2
- package/dist/runtime/components/Avatar.vue.d.ts +4 -25
- package/dist/runtime/components/AvatarGroup.vue +1 -1
- package/dist/runtime/components/AvatarGroup.vue.d.ts +2 -11
- package/dist/runtime/components/Badge.vue +5 -3
- package/dist/runtime/components/Badge.vue.d.ts +5 -24
- package/dist/runtime/components/Breadcrumb.vue +8 -8
- package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -20
- package/dist/runtime/components/Button.vue +2 -3
- package/dist/runtime/components/Button.vue.d.ts +4 -29
- package/dist/runtime/components/ButtonGroup.vue.d.ts +3 -24
- package/dist/runtime/components/Calendar.vue +2 -1
- package/dist/runtime/components/Calendar.vue.d.ts +6 -2
- package/dist/runtime/components/Card.vue +1 -1
- package/dist/runtime/components/Card.vue.d.ts +2 -11
- package/dist/runtime/components/Carousel.vue +5 -2
- package/dist/runtime/components/Carousel.vue.d.ts +10 -3
- package/dist/runtime/components/Checkbox.vue +2 -2
- package/dist/runtime/components/Checkbox.vue.d.ts +10 -13
- package/dist/runtime/components/CheckboxGroup.vue +8 -5
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +12 -3
- package/dist/runtime/components/Chip.vue +1 -1
- package/dist/runtime/components/Chip.vue.d.ts +10 -24
- package/dist/runtime/components/Collapsible.vue +1 -1
- package/dist/runtime/components/Collapsible.vue.d.ts +7 -22
- package/dist/runtime/components/ColorPicker.vue +1 -1
- package/dist/runtime/components/ColorPicker.vue.d.ts +9 -24
- package/dist/runtime/components/CommandPalette.vue +17 -17
- package/dist/runtime/components/CommandPalette.vue.d.ts +17 -27
- package/dist/runtime/components/Container.vue.d.ts +2 -11
- package/dist/runtime/components/ContextMenu.vue.d.ts +6 -24
- package/dist/runtime/components/ContextMenuContent.vue +15 -15
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +17 -57
- package/dist/runtime/components/Drawer.vue.d.ts +17 -27
- package/dist/runtime/components/DropdownMenu.vue.d.ts +6 -28
- package/dist/runtime/components/DropdownMenuContent.vue +15 -15
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +19 -6
- package/dist/runtime/components/Form.vue.d.ts +5 -2
- package/dist/runtime/components/FormField.vue +5 -5
- package/dist/runtime/components/FormField.vue.d.ts +2 -11
- package/dist/runtime/components/Icon.vue.d.ts +1 -10
- package/dist/runtime/components/Input.vue +2 -2
- package/dist/runtime/components/Input.vue.d.ts +20 -41
- package/dist/runtime/components/InputMenu.vue +17 -17
- package/dist/runtime/components/InputMenu.vue.d.ts +227 -5
- package/dist/runtime/components/InputNumber.vue +13 -7
- package/dist/runtime/components/InputNumber.vue.d.ts +90 -23
- package/dist/runtime/components/Kbd.vue.d.ts +3 -24
- package/dist/runtime/components/Link.vue +5 -14
- package/dist/runtime/components/Link.vue.d.ts +3 -34
- package/dist/runtime/components/LinkBase.vue.d.ts +4 -27
- package/dist/runtime/components/Modal.vue.d.ts +12 -28
- package/dist/runtime/components/NavigationMenu.vue +35 -28
- package/dist/runtime/components/NavigationMenu.vue.d.ts +24 -26
- package/dist/runtime/components/Pagination.vue +1 -1
- package/dist/runtime/components/Pagination.vue.d.ts +9 -33
- package/dist/runtime/components/PinInput.vue +1 -1
- package/dist/runtime/components/PinInput.vue.d.ts +13 -24
- package/dist/runtime/components/Popover.vue.d.ts +9 -26
- package/dist/runtime/components/Progress.vue +1 -1
- package/dist/runtime/components/Progress.vue.d.ts +10 -41
- package/dist/runtime/components/RadioGroup.vue +8 -8
- package/dist/runtime/components/RadioGroup.vue.d.ts +8 -3
- package/dist/runtime/components/Select.vue +12 -12
- package/dist/runtime/components/Select.vue.d.ts +11 -3
- package/dist/runtime/components/SelectMenu.vue +13 -13
- package/dist/runtime/components/SelectMenu.vue.d.ts +19 -5
- package/dist/runtime/components/Separator.vue +1 -1
- package/dist/runtime/components/Separator.vue.d.ts +3 -24
- package/dist/runtime/components/Skeleton.vue.d.ts +3 -12
- package/dist/runtime/components/Slideover.vue.d.ts +12 -29
- package/dist/runtime/components/Slider.vue +16 -4
- package/dist/runtime/components/Slider.vue.d.ts +23 -36
- package/dist/runtime/components/Stepper.vue +10 -10
- package/dist/runtime/components/Stepper.vue.d.ts +10 -14
- package/dist/runtime/components/Switch.vue +1 -1
- package/dist/runtime/components/Switch.vue.d.ts +10 -13
- package/dist/runtime/components/Table.vue +2 -2
- package/dist/runtime/components/Table.vue.d.ts +17 -17
- package/dist/runtime/components/Tabs.vue +6 -6
- package/dist/runtime/components/Tabs.vue.d.ts +6 -20
- package/dist/runtime/components/Textarea.vue +3 -3
- package/dist/runtime/components/Textarea.vue.d.ts +20 -44
- package/dist/runtime/components/Toast.vue +3 -2
- package/dist/runtime/components/Toast.vue.d.ts +92 -24
- package/dist/runtime/components/Toaster.vue +4 -4
- package/dist/runtime/components/Toaster.vue.d.ts +9 -28
- package/dist/runtime/components/Tooltip.vue.d.ts +7 -22
- package/dist/runtime/components/Tree.vue +10 -10
- package/dist/runtime/components/Tree.vue.d.ts +7 -22
- package/dist/runtime/composables/defineShortcuts.js +6 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +1 -1
- package/dist/runtime/composables/useFormField.d.ts +2 -2
- package/dist/runtime/composables/useFormField.js +2 -1
- package/dist/runtime/composables/useKbd.d.ts +1 -0
- package/dist/runtime/composables/useKbd.js +4 -3
- package/dist/runtime/composables/useOverlay.d.ts +9 -10
- package/dist/runtime/composables/useOverlay.js +11 -6
- package/dist/runtime/inertia/components/Link.vue +46 -60
- package/dist/runtime/inertia/components/Link.vue.d.ts +4 -33
- package/dist/runtime/inertia/components/LinkBase.vue +68 -0
- package/dist/runtime/inertia/components/LinkBase.vue.d.ts +25 -0
- package/dist/runtime/inertia/stubs.d.ts +1 -1
- package/dist/runtime/inertia/stubs.js +1 -1
- package/dist/runtime/locale/index.d.ts +1 -0
- package/dist/runtime/locale/index.js +1 -0
- package/dist/runtime/locale/sl.d.ts +3 -0
- package/dist/runtime/locale/sl.js +54 -0
- package/dist/runtime/types/tv.d.ts +53 -0
- package/dist/runtime/types/tv.js +0 -0
- package/dist/runtime/types/utils.d.ts +2 -52
- package/dist/runtime/types/utils.js +1 -0
- package/dist/runtime/utils/link.d.ts +1 -0
- package/dist/runtime/utils/link.js +12 -0
- package/dist/runtime/vue/components/Icon.vue.d.ts +1 -10
- package/dist/runtime/vue/components/Link.vue +27 -40
- package/dist/runtime/vue/components/Link.vue.d.ts +3 -34
- package/dist/runtime/vue/composables/useAppConfig.js +3 -1
- package/dist/runtime/vue/stubs.d.ts +1 -1
- package/dist/runtime/vue/stubs.js +1 -1
- package/dist/shared/{ui.D7lOOabO.mjs → ui.BvUP-pSb.mjs} +120 -27
- package/dist/unplugin.d.mts +2 -2
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -2
- package/package.json +28 -27
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SliderRootProps } from 'reka-ui';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
3
|
import theme from '#build/ui/slider';
|
|
4
|
+
import type { TooltipProps } from '../types';
|
|
4
5
|
import type { ComponentConfig } from '../types/utils';
|
|
5
6
|
type Slider = ComponentConfig<typeof theme, AppConfig, 'slider'>;
|
|
6
7
|
export interface SliderProps extends Pick<SliderRootProps, 'name' | 'disabled' | 'inverted' | 'min' | 'max' | 'step' | 'minStepsBetweenThumbs'> {
|
|
@@ -22,50 +23,36 @@ export interface SliderProps extends Pick<SliderRootProps, 'name' | 'disabled' |
|
|
|
22
23
|
* @defaultValue 'horizontal'
|
|
23
24
|
*/
|
|
24
25
|
orientation?: SliderRootProps['orientation'];
|
|
26
|
+
/**
|
|
27
|
+
* Display a tooltip around the slider thumbs with the current value.
|
|
28
|
+
* `{ disableClosingTrigger: true }`{lang="ts-type"}
|
|
29
|
+
* @defaultValue false
|
|
30
|
+
*/
|
|
31
|
+
tooltip?: boolean | TooltipProps;
|
|
25
32
|
/** The value of the slider when initially rendered. Use when you do not need to control the state of the slider. */
|
|
26
33
|
defaultValue?: number | number[];
|
|
27
34
|
class?: any;
|
|
28
35
|
ui?: Slider['slots'];
|
|
29
36
|
}
|
|
30
|
-
export interface SliderEmits {
|
|
31
|
-
(e: 'update:modelValue', payload:
|
|
37
|
+
export interface SliderEmits<T extends number | number[] = number | number[]> {
|
|
38
|
+
(e: 'update:modelValue', payload: T): void;
|
|
32
39
|
(e: 'change', payload: Event): void;
|
|
33
40
|
}
|
|
34
|
-
declare const _default:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
orientation: string;
|
|
48
|
-
}>>> & Readonly<{}>, {
|
|
49
|
-
orientation: "horizontal" | "vertical";
|
|
50
|
-
step: number;
|
|
51
|
-
max: number;
|
|
52
|
-
min: number;
|
|
53
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
|
-
export default _default;
|
|
55
|
-
type __VLS_WithDefaults<P, D> = {
|
|
56
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
57
|
-
default: D[K];
|
|
58
|
-
}> : P[K];
|
|
59
|
-
};
|
|
60
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
61
|
-
type __VLS_TypePropsToOption<T> = {
|
|
62
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
63
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
64
|
-
} : {
|
|
65
|
-
type: import('vue').PropType<T[K]>;
|
|
66
|
-
required: true;
|
|
67
|
-
};
|
|
41
|
+
declare const _default: <T extends number | number[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
42
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
43
|
+
readonly onChange?: ((payload: Event) => any) | undefined;
|
|
44
|
+
readonly "onUpdate:modelValue"?: ((payload: T) => any) | undefined;
|
|
45
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue"> & (SliderProps & {
|
|
46
|
+
modelValue?: T;
|
|
47
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
48
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
49
|
+
attrs: any;
|
|
50
|
+
slots: {};
|
|
51
|
+
emit: SliderEmits<T> & ((evt: "update:modelValue", value: T | undefined) => void);
|
|
52
|
+
}>) => import("vue").VNode & {
|
|
53
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
68
54
|
};
|
|
55
|
+
export default _default;
|
|
69
56
|
type __VLS_PrettifyLocal<T> = {
|
|
70
57
|
[K in keyof T]: T[K];
|
|
71
58
|
} & {};
|
|
@@ -62,20 +62,20 @@ defineExpose({
|
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
64
|
<template>
|
|
65
|
-
<StepperRoot v-bind="rootProps" v-model="currentStepIndex" :class="ui.root({ class: [props.
|
|
65
|
+
<StepperRoot v-bind="rootProps" v-model="currentStepIndex" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
66
66
|
<div :class="ui.header({ class: props.ui?.header })">
|
|
67
67
|
<StepperItem
|
|
68
68
|
v-for="(item, count) in items"
|
|
69
69
|
:key="item.value ?? count"
|
|
70
70
|
:step="count"
|
|
71
71
|
:disabled="item.disabled || props.disabled"
|
|
72
|
-
:class="ui.item({ class: props.ui?.item })"
|
|
72
|
+
:class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
|
|
73
73
|
>
|
|
74
|
-
<div :class="ui.container({ class: props.ui?.container })">
|
|
75
|
-
<StepperTrigger :class="ui.trigger({ class: props.ui?.trigger })">
|
|
76
|
-
<StepperIndicator :class="ui.indicator({ class: props.ui?.indicator })">
|
|
74
|
+
<div :class="ui.container({ class: [props.ui?.container, item.ui?.container] })">
|
|
75
|
+
<StepperTrigger :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger] })">
|
|
76
|
+
<StepperIndicator :class="ui.indicator({ class: [props.ui?.indicator, item.ui?.indicator] })">
|
|
77
77
|
<slot name="indicator" :item="item">
|
|
78
|
-
<UIcon v-if="item.icon" :name="item.icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
78
|
+
<UIcon v-if="item.icon" :name="item.icon" :class="ui.icon({ class: [props.ui?.icon, item.ui?.icon] })" />
|
|
79
79
|
<template v-else>
|
|
80
80
|
{{ count + 1 }}
|
|
81
81
|
</template>
|
|
@@ -85,17 +85,17 @@ defineExpose({
|
|
|
85
85
|
|
|
86
86
|
<StepperSeparator
|
|
87
87
|
v-if="count < items.length - 1"
|
|
88
|
-
:class="ui.separator({ class: props.ui?.separator })"
|
|
88
|
+
:class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })"
|
|
89
89
|
/>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
92
|
-
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
93
|
-
<StepperTitle :class="ui.title({ class: props.ui?.title })">
|
|
92
|
+
<div :class="ui.wrapper({ class: [props.ui?.wrapper, item.ui?.wrapper] })">
|
|
93
|
+
<StepperTitle as="div" :class="ui.title({ class: [props.ui?.title, item.ui?.title] })">
|
|
94
94
|
<slot name="title" :item="item">
|
|
95
95
|
{{ item.title }}
|
|
96
96
|
</slot>
|
|
97
97
|
</StepperTitle>
|
|
98
|
-
<StepperDescription :class="ui.description({ class: props.ui?.description })">
|
|
98
|
+
<StepperDescription as="div" :class="ui.description({ class: [props.ui?.description, item.ui?.description] })">
|
|
99
99
|
<slot name="description" :item="item">
|
|
100
100
|
{{ item.description }}
|
|
101
101
|
</slot>
|
|
@@ -14,6 +14,8 @@ export interface StepperItem {
|
|
|
14
14
|
icon?: string;
|
|
15
15
|
content?: string;
|
|
16
16
|
disabled?: boolean;
|
|
17
|
+
class?: any;
|
|
18
|
+
ui?: Pick<Stepper['slots'], 'item' | 'container' | 'trigger' | 'indicator' | 'icon' | 'separator' | 'wrapper' | 'title' | 'description'>;
|
|
17
19
|
[key: string]: any;
|
|
18
20
|
}
|
|
19
21
|
export interface StepperProps<T extends StepperItem = StepperItem> extends Pick<StepperRootProps, 'linear'> {
|
|
@@ -58,9 +60,13 @@ export type StepperSlots<T extends StepperItem = StepperItem> = {
|
|
|
58
60
|
content: SlotProps<T>;
|
|
59
61
|
} & DynamicSlots<T>;
|
|
60
62
|
declare const _default: <T extends StepperItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
61
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
63
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
64
|
+
readonly onPrev?: ((payload: T) => any) | undefined;
|
|
65
|
+
readonly onNext?: ((payload: T) => any) | undefined;
|
|
66
|
+
readonly "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
|
|
67
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onPrev" | "onNext"> & (StepperProps<T> & {
|
|
62
68
|
modelValue?: string | number;
|
|
63
|
-
}
|
|
69
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
64
70
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
65
71
|
next(): void;
|
|
66
72
|
prev(): void;
|
|
@@ -68,18 +74,8 @@ declare const _default: <T extends StepperItem>(__VLS_props: NonNullable<Awaited
|
|
|
68
74
|
hasPrev: import("vue").ComputedRef<boolean>;
|
|
69
75
|
}>): void;
|
|
70
76
|
attrs: any;
|
|
71
|
-
slots:
|
|
72
|
-
|
|
73
|
-
title: SlotProps<T>;
|
|
74
|
-
description: SlotProps<T>;
|
|
75
|
-
content: SlotProps<T>;
|
|
76
|
-
} & DynamicSlots<T>> & {
|
|
77
|
-
indicator: SlotProps<T>;
|
|
78
|
-
title: SlotProps<T>;
|
|
79
|
-
description: SlotProps<T>;
|
|
80
|
-
content: SlotProps<T>;
|
|
81
|
-
} & DynamicSlots<T>;
|
|
82
|
-
emit: (((evt: "prev", payload: T) => void) & ((evt: "next", payload: T) => void)) & ((evt: "update:modelValue", value: string | number) => void);
|
|
77
|
+
slots: StepperSlots<T>;
|
|
78
|
+
emit: (((evt: "prev", payload: T) => void) & ((evt: "next", payload: T) => void)) & ((evt: "update:modelValue", value: string | number | undefined) => void);
|
|
83
79
|
}>) => import("vue").VNode & {
|
|
84
80
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
85
81
|
};
|
|
@@ -53,7 +53,7 @@ function onUpdate(value) {
|
|
|
53
53
|
</script>
|
|
54
54
|
|
|
55
55
|
<template>
|
|
56
|
-
<Primitive :as="as" :class="ui.root({ class: [props.
|
|
56
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
57
57
|
<div :class="ui.container({ class: props.ui?.container })">
|
|
58
58
|
<SwitchRoot
|
|
59
59
|
:id="id"
|
|
@@ -51,22 +51,19 @@ export interface SwitchSlots {
|
|
|
51
51
|
description?: string;
|
|
52
52
|
}): any;
|
|
53
53
|
}
|
|
54
|
-
declare const _default:
|
|
54
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<SwitchProps & {
|
|
55
55
|
modelValue?: boolean;
|
|
56
|
-
}
|
|
56
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
57
|
+
change: (payload: Event) => any;
|
|
58
|
+
"update:modelValue": (value: boolean) => any;
|
|
59
|
+
}, string, import("vue").PublicProps, Readonly<SwitchProps & {
|
|
57
60
|
modelValue?: boolean;
|
|
58
|
-
} &
|
|
61
|
+
}> & Readonly<{
|
|
62
|
+
onChange?: ((payload: Event) => any) | undefined;
|
|
63
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
64
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SwitchSlots>;
|
|
59
65
|
export default _default;
|
|
60
|
-
type
|
|
61
|
-
type __VLS_TypePropsToOption<T> = {
|
|
62
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
63
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
64
|
-
} : {
|
|
65
|
-
type: import('vue').PropType<T[K]>;
|
|
66
|
-
required: true;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
66
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
70
67
|
new (): {
|
|
71
68
|
$slots: S;
|
|
72
69
|
};
|
|
@@ -189,7 +189,7 @@ defineExpose({
|
|
|
189
189
|
</script>
|
|
190
190
|
|
|
191
191
|
<template>
|
|
192
|
-
<Primitive :as="as" :class="ui.root({ class: [props.
|
|
192
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
193
193
|
<table ref="tableRef" :class="ui.base({ class: [props.ui?.base] })">
|
|
194
194
|
<caption v-if="caption || !!slots.caption" :class="ui.caption({ class: [props.ui?.caption] })">
|
|
195
195
|
<slot name="caption">
|
|
@@ -270,7 +270,7 @@ defineExpose({
|
|
|
270
270
|
<tr v-else>
|
|
271
271
|
<td :colspan="columns?.length" :class="ui.empty({ class: props.ui?.empty })">
|
|
272
272
|
<slot name="empty">
|
|
273
|
-
{{ empty || t(
|
|
273
|
+
{{ empty || t("table.noData") }}
|
|
274
274
|
</slot>
|
|
275
275
|
</td>
|
|
276
276
|
</tr>
|
|
@@ -138,7 +138,21 @@ export type TableSlots<T> = {
|
|
|
138
138
|
caption: (props?: {}) => any;
|
|
139
139
|
} & DynamicHeaderSlots<T> & DynamicCellSlots<T>;
|
|
140
140
|
declare const _default: <T extends TableData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
141
|
-
props: __VLS_PrettifyLocal<
|
|
141
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
142
|
+
readonly "onUpdate:globalFilter"?: ((value: string) => any) | undefined;
|
|
143
|
+
readonly "onUpdate:columnFilters"?: ((value: ColumnFiltersState) => any) | undefined;
|
|
144
|
+
readonly "onUpdate:columnOrder"?: ((value: ColumnOrderState) => any) | undefined;
|
|
145
|
+
readonly "onUpdate:columnVisibility"?: ((value: VisibilityState) => any) | undefined;
|
|
146
|
+
readonly "onUpdate:columnPinning"?: ((value: ColumnPinningState) => any) | undefined;
|
|
147
|
+
readonly "onUpdate:columnSizing"?: ((value: ColumnSizingState) => any) | undefined;
|
|
148
|
+
readonly "onUpdate:columnSizingInfo"?: ((value: ColumnSizingInfoState) => any) | undefined;
|
|
149
|
+
readonly "onUpdate:rowSelection"?: ((value: RowSelectionState) => any) | undefined;
|
|
150
|
+
readonly "onUpdate:rowPinning"?: ((value: RowPinningState) => any) | undefined;
|
|
151
|
+
readonly "onUpdate:sorting"?: ((value: SortingState) => any) | undefined;
|
|
152
|
+
readonly "onUpdate:grouping"?: ((value: GroupingState) => any) | undefined;
|
|
153
|
+
readonly "onUpdate:expanded"?: ((value: ExpandedState) => any) | undefined;
|
|
154
|
+
readonly "onUpdate:pagination"?: ((value: PaginationState) => any) | undefined;
|
|
155
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:globalFilter" | "onUpdate:columnFilters" | "onUpdate:columnOrder" | "onUpdate:columnVisibility" | "onUpdate:columnPinning" | "onUpdate:columnSizing" | "onUpdate:columnSizingInfo" | "onUpdate:rowSelection" | "onUpdate:rowPinning" | "onUpdate:sorting" | "onUpdate:grouping" | "onUpdate:expanded" | "onUpdate:pagination"> & (TableProps<T> & {
|
|
142
156
|
globalFilter?: string;
|
|
143
157
|
columnFilters?: ColumnFiltersState;
|
|
144
158
|
columnOrder?: ColumnOrderState;
|
|
@@ -152,27 +166,13 @@ declare const _default: <T extends TableData>(__VLS_props: NonNullable<Awaited<t
|
|
|
152
166
|
grouping?: GroupingState;
|
|
153
167
|
expanded?: ExpandedState;
|
|
154
168
|
pagination?: PaginationState;
|
|
155
|
-
}
|
|
169
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
156
170
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
157
171
|
tableRef: Ref<HTMLTableElement | undefined, HTMLTableElement | undefined>;
|
|
158
172
|
tableApi: import("@tanstack/table-core").Table<T>;
|
|
159
173
|
}>): void;
|
|
160
174
|
attrs: any;
|
|
161
|
-
slots:
|
|
162
|
-
expanded: (props: {
|
|
163
|
-
row: Row<T>;
|
|
164
|
-
}) => any;
|
|
165
|
-
empty: (props?: {}) => any;
|
|
166
|
-
loading: (props?: {}) => any;
|
|
167
|
-
caption: (props?: {}) => any;
|
|
168
|
-
} & Record<string, (props: HeaderContext<T, unknown>) => any> & Record<`${keyof T extends infer T_1 ? T_1 extends keyof T ? T_1 extends string ? T_1 : never : never : never}-header`, (props: HeaderContext<T, unknown>) => any> & Record<string, (props: CellContext<T, unknown>) => any> & Record<`${keyof T extends infer T_2 ? T_2 extends keyof T ? T_2 extends string ? T_2 : never : never : never}-cell`, (props: CellContext<T, unknown>) => any>> & {
|
|
169
|
-
expanded: (props: {
|
|
170
|
-
row: Row<T>;
|
|
171
|
-
}) => any;
|
|
172
|
-
empty: (props?: {}) => any;
|
|
173
|
-
loading: (props?: {}) => any;
|
|
174
|
-
caption: (props?: {}) => any;
|
|
175
|
-
} & Record<string, (props: HeaderContext<T, unknown>) => any> & Record<`${keyof T extends infer T_3 ? T_3 extends keyof T ? T_3 extends string ? T_3 : never : never : never}-header`, (props: HeaderContext<T, unknown>) => any> & Record<string, (props: CellContext<T, unknown>) => any> & Record<`${keyof T extends infer T_4 ? T_4 extends keyof T ? T_4 extends string ? T_4 : never : never : never}-cell`, (props: CellContext<T, unknown>) => any>;
|
|
175
|
+
slots: TableSlots<T>;
|
|
176
176
|
emit: ((evt: "update:globalFilter", value: string) => void) & ((evt: "update:columnFilters", value: ColumnFiltersState) => void) & ((evt: "update:columnOrder", value: ColumnOrderState) => void) & ((evt: "update:columnVisibility", value: VisibilityState) => void) & ((evt: "update:columnPinning", value: ColumnPinningState) => void) & ((evt: "update:columnSizing", value: ColumnSizingState) => void) & ((evt: "update:columnSizingInfo", value: ColumnSizingInfoState) => void) & ((evt: "update:rowSelection", value: RowSelectionState) => void) & ((evt: "update:rowPinning", value: RowPinningState) => void) & ((evt: "update:sorting", value: SortingState) => void) & ((evt: "update:grouping", value: GroupingState) => void) & ((evt: "update:expanded", value: ExpandedState) => void) & ((evt: "update:pagination", value: PaginationState) => void);
|
|
177
177
|
}>) => import("vue").VNode & {
|
|
178
178
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -40,19 +40,19 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tabs || {} })
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
<template>
|
|
43
|
-
<TabsRoot v-bind="rootProps" :class="ui.root({ class: [props.
|
|
43
|
+
<TabsRoot v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
44
44
|
<TabsList :class="ui.list({ class: props.ui?.list })">
|
|
45
45
|
<TabsIndicator :class="ui.indicator({ class: props.ui?.indicator })" />
|
|
46
46
|
|
|
47
47
|
<slot name="list-leading" />
|
|
48
48
|
|
|
49
|
-
<TabsTrigger v-for="(item, index) of items" :key="index" :value="item.value || String(index)" :disabled="item.disabled" :class="ui.trigger({ class: props.ui?.trigger })">
|
|
49
|
+
<TabsTrigger v-for="(item, index) of items" :key="index" :value="item.value || String(index)" :disabled="item.disabled" :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger] })">
|
|
50
50
|
<slot name="leading" :item="item" :index="index">
|
|
51
|
-
<UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
52
|
-
<UAvatar v-else-if="item.avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="item.avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
|
|
51
|
+
<UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, item.ui?.leadingIcon] })" />
|
|
52
|
+
<UAvatar v-else-if="item.avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="item.avatar" :class="ui.leadingAvatar({ class: [props.ui?.leadingAvatar, item.ui?.leadingAvatar] })" />
|
|
53
53
|
</slot>
|
|
54
54
|
|
|
55
|
-
<span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: props.ui?.label })">
|
|
55
|
+
<span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: [props.ui?.label, item.ui?.label] })">
|
|
56
56
|
<slot :item="item" :index="index">{{ get(item, props.labelKey) }}</slot>
|
|
57
57
|
</span>
|
|
58
58
|
|
|
@@ -63,7 +63,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tabs || {} })
|
|
|
63
63
|
</TabsList>
|
|
64
64
|
|
|
65
65
|
<template v-if="!!content">
|
|
66
|
-
<TabsContent v-for="(item, index) of items" :key="index" :value="item.value || String(index)" :class="ui.content({ class: props.ui?.content })">
|
|
66
|
+
<TabsContent v-for="(item, index) of items" :key="index" :value="item.value || String(index)" :class="ui.content({ class: [props.ui?.content, item.ui?.content, item.class] })">
|
|
67
67
|
<slot :name="item.slot || 'content'" :item="item" :index="index">
|
|
68
68
|
{{ item.content }}
|
|
69
69
|
</slot>
|
|
@@ -16,6 +16,8 @@ export interface TabsItem {
|
|
|
16
16
|
/** A unique value for the tab item. Defaults to the index. */
|
|
17
17
|
value?: string | number;
|
|
18
18
|
disabled?: boolean;
|
|
19
|
+
class?: any;
|
|
20
|
+
ui?: Pick<Tabs['slots'], 'trigger' | 'leadingIcon' | 'leadingAvatar' | 'label' | 'content'>;
|
|
19
21
|
[key: string]: any;
|
|
20
22
|
}
|
|
21
23
|
export interface TabsProps<T extends TabsItem = TabsItem> extends Pick<TabsRootProps<string | number>, 'defaultValue' | 'modelValue' | 'activationMode' | 'unmountOnHide'> {
|
|
@@ -72,28 +74,12 @@ export type TabsSlots<T extends TabsItem = TabsItem> = {
|
|
|
72
74
|
index: number;
|
|
73
75
|
}>;
|
|
74
76
|
declare const _default: <T extends TabsItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
75
|
-
props: __VLS_PrettifyLocal<
|
|
77
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
78
|
+
readonly "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
|
|
79
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & TabsProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
76
80
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
77
81
|
attrs: any;
|
|
78
|
-
slots:
|
|
79
|
-
leading: SlotProps<T>;
|
|
80
|
-
default: SlotProps<T>;
|
|
81
|
-
trailing: SlotProps<T>;
|
|
82
|
-
content: SlotProps<T>;
|
|
83
|
-
'list-leading': (props?: {}) => any;
|
|
84
|
-
'list-trailing': (props?: {}) => any;
|
|
85
|
-
} & DynamicSlots<T, undefined, {
|
|
86
|
-
index: number;
|
|
87
|
-
}>> & {
|
|
88
|
-
leading: SlotProps<T>;
|
|
89
|
-
default: SlotProps<T>;
|
|
90
|
-
trailing: SlotProps<T>;
|
|
91
|
-
content: SlotProps<T>;
|
|
92
|
-
'list-leading': (props?: {}) => any;
|
|
93
|
-
'list-trailing': (props?: {}) => any;
|
|
94
|
-
} & DynamicSlots<T, undefined, {
|
|
95
|
-
index: number;
|
|
96
|
-
}>;
|
|
82
|
+
slots: TabsSlots<T>;
|
|
97
83
|
emit: (evt: "update:modelValue", payload: string | number) => void;
|
|
98
84
|
}>) => import("vue").VNode & {
|
|
99
85
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -39,9 +39,9 @@ const props = defineProps({
|
|
|
39
39
|
loading: { type: Boolean, required: false },
|
|
40
40
|
loadingIcon: { type: String, required: false }
|
|
41
41
|
});
|
|
42
|
-
const slots = defineSlots();
|
|
43
42
|
const emits = defineEmits(["update:modelValue", "blur", "change"]);
|
|
44
|
-
const
|
|
43
|
+
const slots = defineSlots();
|
|
44
|
+
const [modelValue, modelModifiers] = defineModel({ type: null });
|
|
45
45
|
const appConfig = useAppConfig();
|
|
46
46
|
const { emitFormFocus, emitFormBlur, emitFormInput, emitFormChange, size, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props, { deferInputValidation: true });
|
|
47
47
|
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
|
|
@@ -130,7 +130,7 @@ defineExpose({
|
|
|
130
130
|
</script>
|
|
131
131
|
|
|
132
132
|
<template>
|
|
133
|
-
<Primitive :as="as" :class="ui.root({ class: [props.
|
|
133
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
134
134
|
<textarea
|
|
135
135
|
:id="id"
|
|
136
136
|
ref="textareaRef"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AppConfig } from '@nuxt/schema';
|
|
2
2
|
import theme from '#build/ui/textarea';
|
|
3
3
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
4
|
-
import type { ComponentConfig } from '../types/utils';
|
|
4
|
+
import type { AcceptableValue, ComponentConfig } from '../types/utils';
|
|
5
5
|
type Textarea = ComponentConfig<typeof theme, AppConfig, 'textarea'>;
|
|
6
6
|
export interface TextareaProps extends UseComponentIconsProps {
|
|
7
7
|
/**
|
|
@@ -38,8 +38,8 @@ export interface TextareaProps extends UseComponentIconsProps {
|
|
|
38
38
|
highlight?: boolean;
|
|
39
39
|
ui?: Textarea['slots'];
|
|
40
40
|
}
|
|
41
|
-
export interface TextareaEmits {
|
|
42
|
-
(e: 'update:modelValue', payload:
|
|
41
|
+
export interface TextareaEmits<T extends AcceptableValue = AcceptableValue> {
|
|
42
|
+
(e: 'update:modelValue', payload: T): void;
|
|
43
43
|
(e: 'blur', event: FocusEvent): void;
|
|
44
44
|
(e: 'change', event: Event): void;
|
|
45
45
|
}
|
|
@@ -48,48 +48,24 @@ export interface TextareaSlots {
|
|
|
48
48
|
default(props?: {}): any;
|
|
49
49
|
trailing(props?: {}): any;
|
|
50
50
|
}
|
|
51
|
-
declare const _default:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}>>> & Readonly<{}>, {
|
|
68
|
-
autofocusDelay: number;
|
|
69
|
-
autoresizeDelay: number;
|
|
70
|
-
rows: number;
|
|
71
|
-
maxrows: number;
|
|
72
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<TextareaSlots> & TextareaSlots>;
|
|
73
|
-
export default _default;
|
|
74
|
-
type __VLS_WithDefaults<P, D> = {
|
|
75
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
76
|
-
default: D[K];
|
|
77
|
-
}> : P[K];
|
|
78
|
-
};
|
|
79
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
80
|
-
type __VLS_TypePropsToOption<T> = {
|
|
81
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
82
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
83
|
-
} : {
|
|
84
|
-
type: import('vue').PropType<T[K]>;
|
|
85
|
-
required: true;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
89
|
-
new (): {
|
|
90
|
-
$slots: S;
|
|
91
|
-
};
|
|
51
|
+
declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
52
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
53
|
+
readonly onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
54
|
+
readonly onChange?: ((event: Event) => any) | undefined;
|
|
55
|
+
readonly "onUpdate:modelValue"?: ((payload: T) => any) | undefined;
|
|
56
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & (TextareaProps & {
|
|
57
|
+
modelValue?: T;
|
|
58
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
59
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
60
|
+
textareaRef: import("vue").Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
|
|
61
|
+
}>): void;
|
|
62
|
+
attrs: any;
|
|
63
|
+
slots: TextareaSlots;
|
|
64
|
+
emit: TextareaEmits<T> & ((evt: "update:modelValue", value: T | undefined) => void);
|
|
65
|
+
}>) => import("vue").VNode & {
|
|
66
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
92
67
|
};
|
|
68
|
+
export default _default;
|
|
93
69
|
type __VLS_PrettifyLocal<T> = {
|
|
94
70
|
[K in keyof T]: T[K];
|
|
95
71
|
} & {};
|
|
@@ -20,6 +20,7 @@ const props = defineProps({
|
|
|
20
20
|
avatar: { type: Object, required: false },
|
|
21
21
|
color: { type: null, required: false },
|
|
22
22
|
orientation: { type: null, required: false, default: "vertical" },
|
|
23
|
+
progress: { type: Boolean, required: false, default: true },
|
|
23
24
|
actions: { type: Array, required: false },
|
|
24
25
|
close: { type: [Boolean, Object], required: false, default: true },
|
|
25
26
|
closeIcon: { type: String, required: false },
|
|
@@ -61,7 +62,7 @@ defineExpose({
|
|
|
61
62
|
v-slot="{ remaining, duration }"
|
|
62
63
|
v-bind="rootProps"
|
|
63
64
|
:data-orientation="orientation"
|
|
64
|
-
:class="ui.root({ class: [props.
|
|
65
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
65
66
|
:style="{ '--height': height }"
|
|
66
67
|
>
|
|
67
68
|
<slot name="leading">
|
|
@@ -124,6 +125,6 @@ defineExpose({
|
|
|
124
125
|
</ToastClose>
|
|
125
126
|
</div>
|
|
126
127
|
|
|
127
|
-
<div v-if="remaining > 0 && duration" :class="ui.progress({ class: props.ui?.progress })" :style="{ width: `${remaining / duration * 100}%` }" />
|
|
128
|
+
<div v-if="progress && remaining > 0 && duration" :class="ui.progress({ class: props.ui?.progress })" :style="{ width: `${remaining / duration * 100}%` }" />
|
|
128
129
|
</ToastRoot>
|
|
129
130
|
</template>
|