@nuxt/ui 2.17.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +3 -1988
- package/dist/module.d.ts +3 -1988
- package/dist/module.json +6 -2
- package/dist/module.mjs +6 -71
- package/dist/runtime/components/data/Table.vue +54 -19
- package/dist/runtime/components/data/Table.vue.d.ts +247 -48
- package/dist/runtime/components/elements/Accordion.vue +1 -2
- package/dist/runtime/components/elements/Accordion.vue.d.ts +140 -14
- package/dist/runtime/components/elements/Alert.vue +2 -4
- package/dist/runtime/components/elements/Alert.vue.d.ts +107 -24
- package/dist/runtime/components/elements/Avatar.vue +1 -1
- package/dist/runtime/components/elements/Avatar.vue.d.ts +153 -32
- package/dist/runtime/components/elements/AvatarGroup.d.ts +17 -8
- package/dist/runtime/components/elements/{AvatarGroup.mjs → AvatarGroup.js} +2 -2
- package/dist/runtime/components/elements/Badge.vue.d.ts +55 -18
- package/dist/runtime/components/elements/Button.vue +1 -2
- package/dist/runtime/components/elements/Button.vue.d.ts +259 -96
- package/dist/runtime/components/elements/ButtonGroup.d.ts +110 -6
- package/dist/runtime/components/elements/{ButtonGroup.mjs → ButtonGroup.js} +3 -3
- package/dist/runtime/components/elements/Carousel.vue.d.ts +75 -20
- package/dist/runtime/components/elements/Chip.vue.d.ts +97 -25
- package/dist/runtime/components/elements/Dropdown.vue +4 -9
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +135 -16
- package/dist/runtime/components/elements/Kbd.vue.d.ts +45 -10
- package/dist/runtime/components/elements/Link.vue.d.ts +73 -73
- package/dist/runtime/components/elements/Meter.vue +1 -1
- package/dist/runtime/components/elements/Meter.vue.d.ts +178 -22
- package/dist/runtime/components/elements/MeterGroup.d.ts +70 -13
- package/dist/runtime/components/elements/{MeterGroup.mjs → MeterGroup.js} +3 -3
- package/dist/runtime/components/elements/Progress.vue +7 -2
- package/dist/runtime/components/elements/Progress.vue.d.ts +187 -31
- package/dist/runtime/components/forms/Checkbox.vue +5 -3
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +76 -35
- package/dist/runtime/components/forms/Form.vue +1 -2
- package/dist/runtime/components/forms/Form.vue.d.ts +12 -11
- package/dist/runtime/components/forms/FormGroup.vue +1 -1
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +80 -27
- package/dist/runtime/components/forms/Input.vue +2 -2
- package/dist/runtime/components/forms/Input.vue.d.ts +276 -59
- package/dist/runtime/components/forms/InputMenu.vue +12 -10
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +434 -84
- package/dist/runtime/components/forms/Radio.vue +5 -3
- package/dist/runtime/components/forms/Radio.vue.d.ts +74 -35
- package/dist/runtime/components/forms/RadioGroup.vue +11 -3
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +85 -27
- package/dist/runtime/components/forms/Range.vue.d.ts +155 -26
- package/dist/runtime/components/forms/Select.vue +2 -2
- package/dist/runtime/components/forms/Select.vue.d.ts +273 -50
- package/dist/runtime/components/forms/SelectMenu.vue +50 -25
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +451 -86
- package/dist/runtime/components/forms/Textarea.vue.d.ts +263 -48
- package/dist/runtime/components/forms/Toggle.vue +1 -1
- package/dist/runtime/components/forms/Toggle.vue.d.ts +153 -26
- package/dist/runtime/components/layout/Card.vue.d.ts +55 -5
- package/dist/runtime/components/layout/Container.vue.d.ts +19 -5
- package/dist/runtime/components/layout/Divider.vue +1 -2
- package/dist/runtime/components/layout/Divider.vue.d.ts +121 -16
- package/dist/runtime/components/layout/Skeleton.vue +5 -1
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +27 -4
- package/dist/runtime/components/navigation/Breadcrumb.vue +1 -2
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +52 -9
- package/dist/runtime/components/navigation/CommandPalette.vue +8 -6
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +198 -40
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -3
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +5 -7
- package/dist/runtime/components/navigation/HorizontalNavigation.vue +1 -4
- package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +64 -9
- package/dist/runtime/components/navigation/Pagination.vue +2 -4
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +84 -12
- package/dist/runtime/components/navigation/Tabs.vue +10 -0
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +86 -15
- package/dist/runtime/components/navigation/VerticalNavigation.vue +1 -5
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +78 -9
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +71 -8
- package/dist/runtime/components/overlays/Modal.vue.d.ts +85 -11
- package/dist/runtime/components/overlays/Notification.vue +2 -4
- package/dist/runtime/components/overlays/Notification.vue.d.ts +130 -29
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +31 -16
- package/dist/runtime/components/overlays/Popover.vue +3 -6
- package/dist/runtime/components/overlays/Popover.vue.d.ts +110 -15
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +87 -15
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +90 -15
- package/dist/runtime/composables/{defineShortcuts.mjs → defineShortcuts.js} +1 -1
- package/dist/runtime/composables/{useButtonGroup.mjs → useButtonGroup.js} +8 -9
- package/dist/runtime/composables/useCopyToClipboard.d.ts +1 -1
- package/dist/runtime/composables/{useCopyToClipboard.mjs → useCopyToClipboard.js} +1 -1
- package/dist/runtime/composables/useFormGroup.d.ts +5 -5
- package/dist/runtime/composables/useFormGroup.js +49 -0
- package/dist/runtime/composables/useModal.d.ts +3 -3
- package/dist/runtime/composables/{useModal.mjs → useModal.js} +2 -4
- package/dist/runtime/composables/usePopper.d.ts +91 -55
- package/dist/runtime/composables/useShortcuts.d.ts +4 -4
- package/dist/runtime/composables/useSlideover.d.ts +3 -3
- package/dist/runtime/composables/{useSlideover.mjs → useSlideover.js} +2 -4
- package/dist/runtime/composables/useTimer.d.ts +1 -1
- package/dist/runtime/composables/useToast.d.ts +11 -11
- package/dist/runtime/composables/useUI.d.ts +1 -1
- package/dist/runtime/composables/{useUI.mjs → useUI.js} +1 -1
- package/dist/runtime/plugins/colors.d.ts +1 -1
- package/dist/runtime/plugins/{colors.mjs → colors.js} +1 -1
- package/dist/runtime/plugins/modals.d.ts +1 -1
- package/dist/runtime/plugins/{modals.mjs → modals.js} +1 -1
- package/dist/runtime/plugins/slideovers.d.ts +1 -1
- package/dist/runtime/plugins/{slideovers.mjs → slideovers.js} +1 -1
- package/dist/runtime/types/accordion.d.ts +6 -7
- package/dist/runtime/types/accordion.js +0 -0
- package/dist/runtime/types/alert.d.ts +8 -10
- package/dist/runtime/types/alert.js +0 -0
- package/dist/runtime/types/avatar.d.ts +13 -15
- package/dist/runtime/types/avatar.js +0 -0
- package/dist/runtime/types/badge.d.ts +11 -13
- package/dist/runtime/types/badge.js +0 -0
- package/dist/runtime/types/breadcrumb.d.ts +6 -8
- package/dist/runtime/types/breadcrumb.js +0 -0
- package/dist/runtime/types/button.d.ts +27 -29
- package/dist/runtime/types/button.js +0 -0
- package/dist/runtime/types/chip.d.ts +11 -13
- package/dist/runtime/types/chip.js +0 -0
- package/dist/runtime/types/clipboard.d.ts +7 -1
- package/dist/runtime/types/clipboard.js +0 -0
- package/dist/runtime/types/command-palette.d.ts +23 -24
- package/dist/runtime/types/command-palette.js +0 -0
- package/dist/runtime/types/component.d.ts +17 -14
- package/dist/runtime/types/component.js +0 -0
- package/dist/runtime/types/divider.d.ts +2 -3
- package/dist/runtime/types/divider.js +0 -0
- package/dist/runtime/types/dropdown.d.ts +12 -13
- package/dist/runtime/types/dropdown.js +0 -0
- package/dist/runtime/types/form-group.d.ts +4 -5
- package/dist/runtime/types/form-group.js +0 -0
- package/dist/runtime/types/form.d.ts +29 -28
- package/dist/runtime/types/form.js +0 -0
- package/dist/runtime/types/horizontal-navigation.d.ts +10 -11
- package/dist/runtime/types/horizontal-navigation.js +0 -0
- package/dist/runtime/types/index.d.ts +31 -31
- package/dist/runtime/types/index.js +31 -0
- package/dist/runtime/types/input.d.ts +7 -8
- package/dist/runtime/types/input.js +0 -0
- package/dist/runtime/types/kbd.d.ts +4 -5
- package/dist/runtime/types/kbd.js +0 -0
- package/dist/runtime/types/link.d.ts +9 -10
- package/dist/runtime/types/link.js +0 -0
- package/dist/runtime/types/meter.d.ts +4 -5
- package/dist/runtime/types/meter.js +0 -0
- package/dist/runtime/types/modal.d.ts +13 -15
- package/dist/runtime/types/modal.js +0 -0
- package/dist/runtime/types/notification.d.ts +17 -20
- package/dist/runtime/types/notification.js +0 -0
- package/dist/runtime/types/popper.d.ts +13 -15
- package/dist/runtime/types/popper.js +0 -0
- package/dist/runtime/types/progress.d.ts +5 -6
- package/dist/runtime/types/progress.js +0 -0
- package/dist/runtime/types/range.d.ts +6 -7
- package/dist/runtime/types/range.js +0 -0
- package/dist/runtime/types/select.d.ts +7 -8
- package/dist/runtime/types/select.js +0 -0
- package/dist/runtime/types/slideover.d.ts +10 -12
- package/dist/runtime/types/slideover.js +0 -0
- package/dist/runtime/types/tabs.d.ts +6 -5
- package/dist/runtime/types/tabs.js +0 -0
- package/dist/runtime/types/textarea.d.ts +7 -8
- package/dist/runtime/types/textarea.js +0 -0
- package/dist/runtime/types/toggle.d.ts +6 -7
- package/dist/runtime/types/toggle.js +0 -0
- package/dist/runtime/types/tooltip.d.ts +5 -5
- package/dist/runtime/types/tooltip.js +0 -0
- package/dist/runtime/types/utils.d.ts +15 -27
- package/dist/runtime/types/utils.js +0 -0
- package/dist/runtime/types/vertical-navigation.d.ts +10 -11
- package/dist/runtime/types/vertical-navigation.js +0 -0
- package/dist/runtime/ui.config/data/table.d.ts +10 -0
- package/dist/runtime/ui.config/data/{table.mjs → table.js} +10 -0
- package/dist/runtime/ui.config/elements/accordion.d.ts +1 -0
- package/dist/runtime/ui.config/elements/{accordion.mjs → accordion.js} +3 -2
- package/dist/runtime/ui.config/elements/alert.d.ts +2 -2
- package/dist/runtime/ui.config/elements/avatar.d.ts +2 -2
- package/dist/runtime/ui.config/elements/{carousel.mjs → carousel.js} +1 -1
- package/dist/runtime/ui.config/elements/{dropdown.mjs → dropdown.js} +1 -1
- package/dist/runtime/ui.config/forms/{inputMenu.mjs → inputMenu.js} +1 -1
- package/dist/runtime/ui.config/forms/{select.mjs → select.js} +1 -1
- package/dist/runtime/ui.config/forms/{selectMenu.mjs → selectMenu.js} +2 -2
- package/dist/runtime/ui.config/forms/{textarea.mjs → textarea.js} +1 -1
- package/dist/runtime/ui.config/forms/toggle.d.ts +2 -2
- package/dist/runtime/ui.config/index.d.ts +43 -43
- package/dist/runtime/ui.config/index.js +43 -0
- package/dist/runtime/ui.config/navigation/{breadcrumb.mjs → breadcrumb.js} +2 -2
- package/dist/runtime/ui.config/navigation/commandPalette.d.ts +1 -1
- package/dist/runtime/ui.config/navigation/tabs.d.ts +1 -0
- package/dist/runtime/ui.config/navigation/{tabs.mjs → tabs.js} +2 -1
- package/dist/runtime/ui.config/overlays/{contextMenu.mjs → contextMenu.js} +1 -1
- package/dist/runtime/ui.config/overlays/{modal.mjs → modal.js} +2 -2
- package/dist/runtime/ui.config/overlays/notification.d.ts +1 -1
- package/dist/runtime/ui.config/overlays/{popover.mjs → popover.js} +1 -1
- package/dist/runtime/ui.config/overlays/{slideover.mjs → slideover.js} +2 -2
- package/dist/runtime/ui.config/overlays/{tooltip.mjs → tooltip.js} +1 -1
- package/dist/runtime/utils/colors.d.ts +2 -2
- package/dist/runtime/utils/{colors.mjs → colors.js} +1 -1
- package/dist/runtime/utils/index.d.ts +4 -4
- package/dist/runtime/utils/{index.mjs → index.js} +2 -2
- package/dist/runtime/utils/link.d.ts +26 -24
- package/dist/runtime/utils/{link.mjs → link.js} +1 -1
- package/dist/types.d.mts +1 -16
- package/dist/types.d.ts +1 -16
- package/package.json +20 -21
- package/dist/runtime/components/elements/Icon.vue +0 -29
- package/dist/runtime/components/elements/Icon.vue.d.ts +0 -24
- package/dist/runtime/composables/useFormGroup.mjs +0 -45
- package/dist/runtime/ui.config/index.mjs +0 -43
- /package/dist/runtime/composables/{useCarouselScroll.mjs → useCarouselScroll.js} +0 -0
- /package/dist/runtime/composables/{usePopper.mjs → usePopper.js} +0 -0
- /package/dist/runtime/composables/{useShortcuts.mjs → useShortcuts.js} +0 -0
- /package/dist/runtime/composables/{useTimer.mjs → useTimer.js} +0 -0
- /package/dist/runtime/composables/{useToast.mjs → useToast.js} +0 -0
- /package/dist/runtime/ui.config/elements/{alert.mjs → alert.js} +0 -0
- /package/dist/runtime/ui.config/elements/{avatar.mjs → avatar.js} +0 -0
- /package/dist/runtime/ui.config/elements/{avatarGroup.mjs → avatarGroup.js} +0 -0
- /package/dist/runtime/ui.config/elements/{badge.mjs → badge.js} +0 -0
- /package/dist/runtime/ui.config/elements/{button.mjs → button.js} +0 -0
- /package/dist/runtime/ui.config/elements/{buttonGroup.mjs → buttonGroup.js} +0 -0
- /package/dist/runtime/ui.config/elements/{chip.mjs → chip.js} +0 -0
- /package/dist/runtime/ui.config/elements/{kbd.mjs → kbd.js} +0 -0
- /package/dist/runtime/ui.config/elements/{meter.mjs → meter.js} +0 -0
- /package/dist/runtime/ui.config/elements/{meterGroup.mjs → meterGroup.js} +0 -0
- /package/dist/runtime/ui.config/elements/{progress.mjs → progress.js} +0 -0
- /package/dist/runtime/ui.config/forms/{checkbox.mjs → checkbox.js} +0 -0
- /package/dist/runtime/ui.config/forms/{formGroup.mjs → formGroup.js} +0 -0
- /package/dist/runtime/ui.config/forms/{input.mjs → input.js} +0 -0
- /package/dist/runtime/ui.config/forms/{radio.mjs → radio.js} +0 -0
- /package/dist/runtime/ui.config/forms/{radioGroup.mjs → radioGroup.js} +0 -0
- /package/dist/runtime/ui.config/forms/{range.mjs → range.js} +0 -0
- /package/dist/runtime/ui.config/forms/{toggle.mjs → toggle.js} +0 -0
- /package/dist/runtime/ui.config/layout/{card.mjs → card.js} +0 -0
- /package/dist/runtime/ui.config/layout/{container.mjs → container.js} +0 -0
- /package/dist/runtime/ui.config/layout/{divider.mjs → divider.js} +0 -0
- /package/dist/runtime/ui.config/layout/{skeleton.mjs → skeleton.js} +0 -0
- /package/dist/runtime/ui.config/navigation/{commandPalette.mjs → commandPalette.js} +0 -0
- /package/dist/runtime/ui.config/navigation/{horizontalNavigation.mjs → horizontalNavigation.js} +0 -0
- /package/dist/runtime/ui.config/navigation/{pagination.mjs → pagination.js} +0 -0
- /package/dist/runtime/ui.config/navigation/{verticalNavigation.mjs → verticalNavigation.js} +0 -0
- /package/dist/runtime/ui.config/overlays/{notification.mjs → notification.js} +0 -0
- /package/dist/runtime/ui.config/overlays/{notifications.mjs → notifications.js} +0 -0
- /package/dist/runtime/ui.config/{popper.mjs → popper.js} +0 -0
- /package/dist/runtime/utils/{lodash.mjs → lodash.js} +0 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{{ title }}
|
|
15
15
|
</slot>
|
|
16
16
|
</p>
|
|
17
|
-
<div v-if="description || $slots.description" :class="twMerge(ui.description, !
|
|
17
|
+
<div v-if="description || $slots.description" :class="twMerge(ui.description, !title && !$slots.title && 'mt-0 leading-5')">
|
|
18
18
|
<slot name="description" :description="description">
|
|
19
19
|
{{ description }}
|
|
20
20
|
</slot>
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
<script>
|
|
43
43
|
import { computed, toRef, defineComponent } from "vue";
|
|
44
44
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
45
|
-
import UIcon from "
|
|
46
|
-
import UAvatar from "../elements/Avatar.vue";
|
|
47
|
-
import UButton from "../elements/Button.vue";
|
|
45
|
+
import { UIcon, UAvatar, UButton } from "#components";
|
|
48
46
|
import { useUI } from "../../composables/useUI";
|
|
49
47
|
import { mergeConfig } from "../../utils";
|
|
50
48
|
import appConfig from "#build/app.config";
|
|
@@ -1,13 +1,53 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { Avatar, Button, AlertVariant, AlertAction } from '../../types';
|
|
2
|
+
import type { Avatar, Button, AlertColor, AlertVariant, AlertAction, Strategy } from '../../types.js';
|
|
3
|
+
declare const config: {
|
|
4
|
+
wrapper: string;
|
|
5
|
+
inner: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
actions: string;
|
|
9
|
+
shadow: string;
|
|
10
|
+
rounded: string;
|
|
11
|
+
padding: string;
|
|
12
|
+
gap: string;
|
|
13
|
+
icon: {
|
|
14
|
+
base: string;
|
|
15
|
+
};
|
|
16
|
+
avatar: {
|
|
17
|
+
base: string;
|
|
18
|
+
size: "md";
|
|
19
|
+
};
|
|
20
|
+
color: {
|
|
21
|
+
white: {
|
|
22
|
+
solid: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
variant: {
|
|
26
|
+
solid: string;
|
|
27
|
+
outline: string;
|
|
28
|
+
soft: string;
|
|
29
|
+
subtle: string;
|
|
30
|
+
};
|
|
31
|
+
default: {
|
|
32
|
+
color: string;
|
|
33
|
+
variant: string;
|
|
34
|
+
icon: any;
|
|
35
|
+
closeButton: any;
|
|
36
|
+
actionButton: {
|
|
37
|
+
size: "xs";
|
|
38
|
+
color: "primary";
|
|
39
|
+
variant: "link";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
3
43
|
declare const _default: import("vue").DefineComponent<{
|
|
4
44
|
title: {
|
|
5
45
|
type: StringConstructor;
|
|
6
|
-
default:
|
|
46
|
+
default: any;
|
|
7
47
|
};
|
|
8
48
|
description: {
|
|
9
49
|
type: StringConstructor;
|
|
10
|
-
default:
|
|
50
|
+
default: any;
|
|
11
51
|
};
|
|
12
52
|
icon: {
|
|
13
53
|
type: StringConstructor;
|
|
@@ -15,7 +55,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
55
|
};
|
|
16
56
|
avatar: {
|
|
17
57
|
type: PropType<Avatar>;
|
|
18
|
-
default:
|
|
58
|
+
default: any;
|
|
19
59
|
};
|
|
20
60
|
closeButton: {
|
|
21
61
|
type: PropType<Button>;
|
|
@@ -23,16 +63,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
63
|
};
|
|
24
64
|
actions: {
|
|
25
65
|
type: PropType<AlertAction[]>;
|
|
26
|
-
default: () =>
|
|
66
|
+
default: () => any[];
|
|
27
67
|
};
|
|
28
68
|
color: {
|
|
29
|
-
type: PropType<
|
|
30
|
-
default: () =>
|
|
69
|
+
type: PropType<AlertColor>;
|
|
70
|
+
default: () => string;
|
|
31
71
|
validator(value: string): boolean;
|
|
32
72
|
};
|
|
33
73
|
variant: {
|
|
34
74
|
type: PropType<AlertVariant>;
|
|
35
|
-
default: () =>
|
|
75
|
+
default: () => string;
|
|
36
76
|
validator(value: string): boolean;
|
|
37
77
|
};
|
|
38
78
|
class: {
|
|
@@ -40,11 +80,52 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
80
|
default: () => "";
|
|
41
81
|
};
|
|
42
82
|
ui: {
|
|
43
|
-
type: PropType<
|
|
83
|
+
type: PropType<Partial<typeof config> & {
|
|
84
|
+
strategy?: Strategy;
|
|
85
|
+
}>;
|
|
44
86
|
default: () => {};
|
|
45
87
|
};
|
|
46
88
|
}, {
|
|
47
|
-
ui: import("vue").ComputedRef<
|
|
89
|
+
ui: import("vue").ComputedRef<{
|
|
90
|
+
wrapper: string;
|
|
91
|
+
inner: string;
|
|
92
|
+
title: string;
|
|
93
|
+
description: string;
|
|
94
|
+
actions: string;
|
|
95
|
+
shadow: string;
|
|
96
|
+
rounded: string;
|
|
97
|
+
padding: string;
|
|
98
|
+
gap: string;
|
|
99
|
+
icon: {
|
|
100
|
+
base: string;
|
|
101
|
+
};
|
|
102
|
+
avatar: {
|
|
103
|
+
base: string;
|
|
104
|
+
size: "md";
|
|
105
|
+
};
|
|
106
|
+
color: {
|
|
107
|
+
white: {
|
|
108
|
+
solid: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
variant: {
|
|
112
|
+
solid: string;
|
|
113
|
+
outline: string;
|
|
114
|
+
soft: string;
|
|
115
|
+
subtle: string;
|
|
116
|
+
};
|
|
117
|
+
default: {
|
|
118
|
+
color: string;
|
|
119
|
+
variant: string;
|
|
120
|
+
icon: any;
|
|
121
|
+
closeButton: any;
|
|
122
|
+
actionButton: {
|
|
123
|
+
size: "xs";
|
|
124
|
+
color: "primary";
|
|
125
|
+
variant: "link";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
}>;
|
|
48
129
|
attrs: import("vue").ComputedRef<Pick<{
|
|
49
130
|
[x: string]: unknown;
|
|
50
131
|
}, string>>;
|
|
@@ -54,11 +135,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
135
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
136
|
title: {
|
|
56
137
|
type: StringConstructor;
|
|
57
|
-
default:
|
|
138
|
+
default: any;
|
|
58
139
|
};
|
|
59
140
|
description: {
|
|
60
141
|
type: StringConstructor;
|
|
61
|
-
default:
|
|
142
|
+
default: any;
|
|
62
143
|
};
|
|
63
144
|
icon: {
|
|
64
145
|
type: StringConstructor;
|
|
@@ -66,7 +147,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
147
|
};
|
|
67
148
|
avatar: {
|
|
68
149
|
type: PropType<Avatar>;
|
|
69
|
-
default:
|
|
150
|
+
default: any;
|
|
70
151
|
};
|
|
71
152
|
closeButton: {
|
|
72
153
|
type: PropType<Button>;
|
|
@@ -74,16 +155,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
155
|
};
|
|
75
156
|
actions: {
|
|
76
157
|
type: PropType<AlertAction[]>;
|
|
77
|
-
default: () =>
|
|
158
|
+
default: () => any[];
|
|
78
159
|
};
|
|
79
160
|
color: {
|
|
80
|
-
type: PropType<
|
|
81
|
-
default: () =>
|
|
161
|
+
type: PropType<AlertColor>;
|
|
162
|
+
default: () => string;
|
|
82
163
|
validator(value: string): boolean;
|
|
83
164
|
};
|
|
84
165
|
variant: {
|
|
85
166
|
type: PropType<AlertVariant>;
|
|
86
|
-
default: () =>
|
|
167
|
+
default: () => string;
|
|
87
168
|
validator(value: string): boolean;
|
|
88
169
|
};
|
|
89
170
|
class: {
|
|
@@ -91,19 +172,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
91
172
|
default: () => "";
|
|
92
173
|
};
|
|
93
174
|
ui: {
|
|
94
|
-
type: PropType<
|
|
175
|
+
type: PropType<Partial<typeof config> & {
|
|
176
|
+
strategy?: Strategy;
|
|
177
|
+
}>;
|
|
95
178
|
default: () => {};
|
|
96
179
|
};
|
|
97
180
|
}>> & {
|
|
98
|
-
onClose?: (
|
|
181
|
+
onClose?: (...args: any[]) => any;
|
|
99
182
|
}, {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
avatar: Avatar;
|
|
103
|
-
color: any;
|
|
183
|
+
ui: {};
|
|
184
|
+
color: AlertColor;
|
|
104
185
|
variant: AlertVariant;
|
|
105
|
-
ui: any;
|
|
106
186
|
icon: string;
|
|
187
|
+
avatar: any;
|
|
188
|
+
class: any;
|
|
189
|
+
title: string;
|
|
107
190
|
description: string;
|
|
108
191
|
closeButton: Button;
|
|
109
192
|
actions: AlertAction[];
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<script>
|
|
24
24
|
import { defineComponent, ref, computed, toRef, watch } from "vue";
|
|
25
25
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
26
|
-
import UIcon from "
|
|
26
|
+
import { UIcon } from "#components";
|
|
27
27
|
import { useUI } from "../../composables/useUI";
|
|
28
28
|
import { mergeConfig } from "../../utils";
|
|
29
29
|
import appConfig from "#build/app.config";
|
|
@@ -1,21 +1,80 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { AvatarSize } from '../../types';
|
|
2
|
+
import type { AvatarSize, AvatarChipColor, AvatarChipPosition, Strategy } from '../../types.js';
|
|
3
|
+
declare const config: {
|
|
4
|
+
wrapper: string;
|
|
5
|
+
background: string;
|
|
6
|
+
rounded: string;
|
|
7
|
+
text: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
size: {
|
|
10
|
+
'3xs': string;
|
|
11
|
+
'2xs': string;
|
|
12
|
+
xs: string;
|
|
13
|
+
sm: string;
|
|
14
|
+
md: string;
|
|
15
|
+
lg: string;
|
|
16
|
+
xl: string;
|
|
17
|
+
'2xl': string;
|
|
18
|
+
'3xl': string;
|
|
19
|
+
};
|
|
20
|
+
chip: {
|
|
21
|
+
base: string;
|
|
22
|
+
background: string;
|
|
23
|
+
position: {
|
|
24
|
+
'top-right': string;
|
|
25
|
+
'bottom-right': string;
|
|
26
|
+
'top-left': string;
|
|
27
|
+
'bottom-left': string;
|
|
28
|
+
};
|
|
29
|
+
size: {
|
|
30
|
+
'3xs': string;
|
|
31
|
+
'2xs': string;
|
|
32
|
+
xs: string;
|
|
33
|
+
sm: string;
|
|
34
|
+
md: string;
|
|
35
|
+
lg: string;
|
|
36
|
+
xl: string;
|
|
37
|
+
'2xl': string;
|
|
38
|
+
'3xl': string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
icon: {
|
|
42
|
+
base: string;
|
|
43
|
+
size: {
|
|
44
|
+
'3xs': string;
|
|
45
|
+
'2xs': string;
|
|
46
|
+
xs: string;
|
|
47
|
+
sm: string;
|
|
48
|
+
md: string;
|
|
49
|
+
lg: string;
|
|
50
|
+
xl: string;
|
|
51
|
+
'2xl': string;
|
|
52
|
+
'3xl': string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
default: {
|
|
56
|
+
size: string;
|
|
57
|
+
icon: any;
|
|
58
|
+
chipColor: any;
|
|
59
|
+
chipPosition: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
3
62
|
declare const _default: import("vue").DefineComponent<{
|
|
4
63
|
as: {
|
|
5
|
-
type: (
|
|
64
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
6
65
|
default: string;
|
|
7
66
|
};
|
|
8
67
|
src: {
|
|
9
|
-
type: (
|
|
10
|
-
default:
|
|
68
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
69
|
+
default: any;
|
|
11
70
|
};
|
|
12
71
|
alt: {
|
|
13
72
|
type: StringConstructor;
|
|
14
|
-
default:
|
|
73
|
+
default: any;
|
|
15
74
|
};
|
|
16
75
|
text: {
|
|
17
76
|
type: StringConstructor;
|
|
18
|
-
default:
|
|
77
|
+
default: any;
|
|
19
78
|
};
|
|
20
79
|
icon: {
|
|
21
80
|
type: StringConstructor;
|
|
@@ -23,22 +82,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
82
|
};
|
|
24
83
|
size: {
|
|
25
84
|
type: PropType<AvatarSize>;
|
|
26
|
-
default: () =>
|
|
85
|
+
default: () => string;
|
|
27
86
|
validator(value: string): boolean;
|
|
28
87
|
};
|
|
29
88
|
chipColor: {
|
|
30
|
-
type: PropType<
|
|
89
|
+
type: PropType<AvatarChipColor>;
|
|
31
90
|
default: () => any;
|
|
32
91
|
validator(value: string): boolean;
|
|
33
92
|
};
|
|
34
93
|
chipPosition: {
|
|
35
|
-
type: PropType<
|
|
36
|
-
default: () =>
|
|
94
|
+
type: PropType<AvatarChipPosition>;
|
|
95
|
+
default: () => string;
|
|
37
96
|
validator(value: string): boolean;
|
|
38
97
|
};
|
|
39
98
|
chipText: {
|
|
40
|
-
type: (
|
|
41
|
-
default:
|
|
99
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
100
|
+
default: any;
|
|
42
101
|
};
|
|
43
102
|
imgClass: {
|
|
44
103
|
type: StringConstructor;
|
|
@@ -49,11 +108,71 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
108
|
default: () => "";
|
|
50
109
|
};
|
|
51
110
|
ui: {
|
|
52
|
-
type: PropType<
|
|
111
|
+
type: PropType<Partial<typeof config> & {
|
|
112
|
+
strategy?: Strategy;
|
|
113
|
+
}>;
|
|
53
114
|
default: () => {};
|
|
54
115
|
};
|
|
55
116
|
}, {
|
|
56
|
-
ui: import("vue").ComputedRef<
|
|
117
|
+
ui: import("vue").ComputedRef<{
|
|
118
|
+
wrapper: string;
|
|
119
|
+
background: string;
|
|
120
|
+
rounded: string;
|
|
121
|
+
text: string;
|
|
122
|
+
placeholder: string;
|
|
123
|
+
size: {
|
|
124
|
+
'3xs': string;
|
|
125
|
+
'2xs': string;
|
|
126
|
+
xs: string;
|
|
127
|
+
sm: string;
|
|
128
|
+
md: string;
|
|
129
|
+
lg: string;
|
|
130
|
+
xl: string;
|
|
131
|
+
'2xl': string;
|
|
132
|
+
'3xl': string;
|
|
133
|
+
};
|
|
134
|
+
chip: {
|
|
135
|
+
base: string;
|
|
136
|
+
background: string;
|
|
137
|
+
position: {
|
|
138
|
+
'top-right': string;
|
|
139
|
+
'bottom-right': string;
|
|
140
|
+
'top-left': string;
|
|
141
|
+
'bottom-left': string;
|
|
142
|
+
};
|
|
143
|
+
size: {
|
|
144
|
+
'3xs': string;
|
|
145
|
+
'2xs': string;
|
|
146
|
+
xs: string;
|
|
147
|
+
sm: string;
|
|
148
|
+
md: string;
|
|
149
|
+
lg: string;
|
|
150
|
+
xl: string;
|
|
151
|
+
'2xl': string;
|
|
152
|
+
'3xl': string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
icon: {
|
|
156
|
+
base: string;
|
|
157
|
+
size: {
|
|
158
|
+
'3xs': string;
|
|
159
|
+
'2xs': string;
|
|
160
|
+
xs: string;
|
|
161
|
+
sm: string;
|
|
162
|
+
md: string;
|
|
163
|
+
lg: string;
|
|
164
|
+
xl: string;
|
|
165
|
+
'2xl': string;
|
|
166
|
+
'3xl': string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
default: {
|
|
170
|
+
size: string;
|
|
171
|
+
icon: any;
|
|
172
|
+
chipColor: any;
|
|
173
|
+
chipPosition: string;
|
|
174
|
+
};
|
|
175
|
+
}>;
|
|
57
176
|
attrs: import("vue").ComputedRef<Pick<{
|
|
58
177
|
[x: string]: unknown;
|
|
59
178
|
}, string>>;
|
|
@@ -61,26 +180,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
180
|
imgClass: import("vue").ComputedRef<string>;
|
|
62
181
|
iconClass: import("vue").ComputedRef<string>;
|
|
63
182
|
chipClass: import("vue").ComputedRef<string>;
|
|
64
|
-
url: import("vue").ComputedRef<string
|
|
183
|
+
url: import("vue").ComputedRef<string>;
|
|
65
184
|
placeholder: import("vue").ComputedRef<string>;
|
|
66
185
|
error: import("vue").Ref<boolean>;
|
|
67
186
|
onError: () => void;
|
|
68
187
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
69
188
|
as: {
|
|
70
|
-
type: (
|
|
189
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
71
190
|
default: string;
|
|
72
191
|
};
|
|
73
192
|
src: {
|
|
74
|
-
type: (
|
|
75
|
-
default:
|
|
193
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
194
|
+
default: any;
|
|
76
195
|
};
|
|
77
196
|
alt: {
|
|
78
197
|
type: StringConstructor;
|
|
79
|
-
default:
|
|
198
|
+
default: any;
|
|
80
199
|
};
|
|
81
200
|
text: {
|
|
82
201
|
type: StringConstructor;
|
|
83
|
-
default:
|
|
202
|
+
default: any;
|
|
84
203
|
};
|
|
85
204
|
icon: {
|
|
86
205
|
type: StringConstructor;
|
|
@@ -88,22 +207,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
207
|
};
|
|
89
208
|
size: {
|
|
90
209
|
type: PropType<AvatarSize>;
|
|
91
|
-
default: () =>
|
|
210
|
+
default: () => string;
|
|
92
211
|
validator(value: string): boolean;
|
|
93
212
|
};
|
|
94
213
|
chipColor: {
|
|
95
|
-
type: PropType<
|
|
214
|
+
type: PropType<AvatarChipColor>;
|
|
96
215
|
default: () => any;
|
|
97
216
|
validator(value: string): boolean;
|
|
98
217
|
};
|
|
99
218
|
chipPosition: {
|
|
100
|
-
type: PropType<
|
|
101
|
-
default: () =>
|
|
219
|
+
type: PropType<AvatarChipPosition>;
|
|
220
|
+
default: () => string;
|
|
102
221
|
validator(value: string): boolean;
|
|
103
222
|
};
|
|
104
223
|
chipText: {
|
|
105
|
-
type: (
|
|
106
|
-
default:
|
|
224
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
225
|
+
default: any;
|
|
107
226
|
};
|
|
108
227
|
imgClass: {
|
|
109
228
|
type: StringConstructor;
|
|
@@ -114,19 +233,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
233
|
default: () => "";
|
|
115
234
|
};
|
|
116
235
|
ui: {
|
|
117
|
-
type: PropType<
|
|
236
|
+
type: PropType<Partial<typeof config> & {
|
|
237
|
+
strategy?: Strategy;
|
|
238
|
+
}>;
|
|
118
239
|
default: () => {};
|
|
119
240
|
};
|
|
120
241
|
}>>, {
|
|
242
|
+
alt: string;
|
|
121
243
|
size: AvatarSize;
|
|
122
|
-
|
|
123
|
-
class: any;
|
|
244
|
+
ui: {};
|
|
124
245
|
as: string | Record<string, any>;
|
|
125
|
-
ui: any;
|
|
126
246
|
icon: string;
|
|
247
|
+
class: any;
|
|
248
|
+
text: string;
|
|
127
249
|
src: string | boolean;
|
|
128
|
-
|
|
129
|
-
chipColor: any;
|
|
250
|
+
chipColor: AvatarChipColor;
|
|
130
251
|
chipPosition: "top-right" | "bottom-right" | "top-left" | "bottom-left";
|
|
131
252
|
chipText: string | number;
|
|
132
253
|
imgClass: string;
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { AvatarSize } from '../../types';
|
|
2
|
+
import type { AvatarSize, Strategy } from '../../types.js';
|
|
3
|
+
declare const avatarGroupConfig: {
|
|
4
|
+
wrapper: string;
|
|
5
|
+
ring: string;
|
|
6
|
+
margin: string;
|
|
7
|
+
};
|
|
3
8
|
declare const _default: import("vue").DefineComponent<{
|
|
4
9
|
size: {
|
|
5
10
|
type: PropType<AvatarSize>;
|
|
6
|
-
default:
|
|
11
|
+
default: any;
|
|
7
12
|
validator(value: string): boolean;
|
|
8
13
|
};
|
|
9
14
|
max: {
|
|
10
15
|
type: NumberConstructor;
|
|
11
|
-
default:
|
|
16
|
+
default: any;
|
|
12
17
|
};
|
|
13
18
|
class: {
|
|
14
19
|
type: PropType<any>;
|
|
15
20
|
default: () => "";
|
|
16
21
|
};
|
|
17
22
|
ui: {
|
|
18
|
-
type: PropType<
|
|
23
|
+
type: PropType<Partial<typeof avatarGroupConfig> & {
|
|
24
|
+
strategy?: Strategy;
|
|
25
|
+
}>;
|
|
19
26
|
default: () => {};
|
|
20
27
|
};
|
|
21
28
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -23,24 +30,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
30
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
31
|
size: {
|
|
25
32
|
type: PropType<AvatarSize>;
|
|
26
|
-
default:
|
|
33
|
+
default: any;
|
|
27
34
|
validator(value: string): boolean;
|
|
28
35
|
};
|
|
29
36
|
max: {
|
|
30
37
|
type: NumberConstructor;
|
|
31
|
-
default:
|
|
38
|
+
default: any;
|
|
32
39
|
};
|
|
33
40
|
class: {
|
|
34
41
|
type: PropType<any>;
|
|
35
42
|
default: () => "";
|
|
36
43
|
};
|
|
37
44
|
ui: {
|
|
38
|
-
type: PropType<
|
|
45
|
+
type: PropType<Partial<typeof avatarGroupConfig> & {
|
|
46
|
+
strategy?: Strategy;
|
|
47
|
+
}>;
|
|
39
48
|
default: () => {};
|
|
40
49
|
};
|
|
41
50
|
}>>, {
|
|
42
51
|
size: AvatarSize;
|
|
43
|
-
ui:
|
|
52
|
+
ui: {};
|
|
44
53
|
class: any;
|
|
45
54
|
max: number;
|
|
46
55
|
}, {}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h, cloneVNode, computed, toRef, defineComponent } from "vue";
|
|
2
2
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
3
3
|
import UAvatar from "./Avatar.vue";
|
|
4
|
-
import { useUI } from "../../composables/useUI.
|
|
5
|
-
import { mergeConfig, getSlotsChildren } from "../../utils/index.
|
|
4
|
+
import { useUI } from "../../composables/useUI.js";
|
|
5
|
+
import { mergeConfig, getSlotsChildren } from "../../utils/index.js";
|
|
6
6
|
import appConfig from "#build/app.config";
|
|
7
7
|
import { avatar, avatarGroup } from "#ui/ui.config";
|
|
8
8
|
const avatarConfig = mergeConfig(appConfig.ui.strategy, appConfig.ui.avatar, avatar);
|