@eslamdevui/ui 3.2.0-beta.2 → 3.2.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/.nuxt/ui/alert.ts +0 -5
- package/.nuxt/ui/badge.ts +0 -5
- package/.nuxt/ui/button-group.ts +0 -13
- package/.nuxt/ui/button.ts +0 -5
- package/.nuxt/ui/carousel.ts +0 -5
- package/.nuxt/ui/content-surround.ts +0 -5
- package/.nuxt/ui/dashboard-navbar.ts +0 -5
- package/.nuxt/ui/dashboard-sidebar-collapse.ts +0 -5
- package/.nuxt/ui/dashboard-sidebar-toggle.ts +0 -5
- package/.nuxt/ui/dashboard-sidebar.ts +0 -10
- package/.nuxt/ui/index.ts +1 -48
- package/.nuxt/ui/input-menu.ts +0 -9
- package/.nuxt/ui/input-number.ts +0 -5
- package/.nuxt/ui/input-tags.ts +0 -9
- package/.nuxt/ui/input.ts +0 -9
- package/.nuxt/ui/select-menu.ts +0 -9
- package/.nuxt/ui/select.ts +0 -9
- package/.nuxt/ui/textarea.ts +0 -9
- package/.nuxt/ui/toast.ts +0 -5
- package/LICENSE.md +9 -9
- package/README.md +147 -147
- package/cli/commands/make/component.mjs +95 -95
- package/cli/commands/make/index.mjs +14 -14
- package/cli/commands/make/locale.mjs +64 -64
- package/cli/index.mjs +15 -15
- package/cli/package.json +13 -13
- package/cli/templates.mjs +236 -236
- package/cli/utils.mjs +31 -31
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Accordion.vue +36 -36
- package/dist/runtime/components/Alert.vue +46 -46
- package/dist/runtime/components/App.vue +10 -10
- package/dist/runtime/components/Avatar.vue +27 -27
- package/dist/runtime/components/AvatarGroup.vue +4 -4
- package/dist/runtime/components/Badge.vue +16 -16
- package/dist/runtime/components/Breadcrumb.vue +32 -32
- package/dist/runtime/components/Button.vue +28 -28
- package/dist/runtime/components/ButtonGroup.vue +3 -3
- package/dist/runtime/components/Calendar.vue +74 -74
- package/dist/runtime/components/Card.vue +13 -13
- package/dist/runtime/components/Carousel.vue +58 -58
- package/dist/runtime/components/ChatMessage.vue +35 -35
- package/dist/runtime/components/ChatMessages.vue +55 -55
- package/dist/runtime/components/ChatPrompt.vue +26 -26
- package/dist/runtime/components/ChatPromptSubmit.vue +10 -10
- package/dist/runtime/components/Checkbox.vue +33 -33
- package/dist/runtime/components/CheckboxGroup.vue +32 -32
- package/dist/runtime/components/Chip.vue +11 -11
- package/dist/runtime/components/Collapsible.vue +9 -9
- package/dist/runtime/components/ColorPicker.vue +30 -30
- package/dist/runtime/components/CommandPalette.vue +117 -117
- package/dist/runtime/components/Container.vue +3 -3
- package/dist/runtime/components/ContextMenu.vue +22 -22
- package/dist/runtime/components/ContextMenuContent.vue +105 -105
- package/dist/runtime/components/DashboardGroup.vue +3 -3
- package/dist/runtime/components/DashboardNavbar.vue +40 -40
- package/dist/runtime/components/DashboardPanel.vue +27 -27
- package/dist/runtime/components/DashboardResizeHandle.vue +7 -7
- package/dist/runtime/components/DashboardSearch.vue +20 -20
- package/dist/runtime/components/DashboardSearchButton.vue +43 -43
- package/dist/runtime/components/DashboardSidebar.vue +74 -74
- package/dist/runtime/components/DashboardSidebarCollapse.vue +7 -7
- package/dist/runtime/components/DashboardSidebarToggle.vue +7 -7
- package/dist/runtime/components/Drawer.vue +55 -55
- package/dist/runtime/components/DropdownMenu.vue +24 -24
- package/dist/runtime/components/DropdownMenuContent.vue +107 -107
- package/dist/runtime/components/Error.vue +22 -22
- package/dist/runtime/components/Form.vue +8 -8
- package/dist/runtime/components/FormField.vue +37 -37
- package/dist/runtime/components/Icon.vue +1 -1
- package/dist/runtime/components/Input.vue +34 -34
- package/dist/runtime/components/InputMenu.vue +163 -163
- package/dist/runtime/components/InputNumber.vue +49 -49
- package/dist/runtime/components/InputTags.vue +55 -55
- package/dist/runtime/components/Kbd.vue +5 -5
- package/dist/runtime/components/Link.vue +14 -14
- package/dist/runtime/components/LinkBase.vue +8 -8
- package/dist/runtime/components/Modal.vue +69 -69
- package/dist/runtime/components/NavigationMenu.vue +166 -166
- package/dist/runtime/components/OverlayProvider.vue +9 -9
- package/dist/runtime/components/Pagination.vue +47 -47
- package/dist/runtime/components/PinInput.vue +20 -20
- package/dist/runtime/components/Popover.vue +17 -17
- package/dist/runtime/components/Progress.vue +19 -19
- package/dist/runtime/components/RadioGroup.vue +43 -43
- package/dist/runtime/components/Select.vue +96 -96
- package/dist/runtime/components/SelectMenu.vue +130 -130
- package/dist/runtime/components/Separator.vue +15 -15
- package/dist/runtime/components/Skeleton.vue +10 -10
- package/dist/runtime/components/Slideover.vue +76 -76
- package/dist/runtime/components/Slider.vue +27 -27
- package/dist/runtime/components/Stepper.vue +51 -51
- package/dist/runtime/components/Switch.vue +33 -33
- package/dist/runtime/components/Table.vue +77 -77
- package/dist/runtime/components/Tabs.vue +37 -37
- package/dist/runtime/components/Textarea.vue +33 -33
- package/dist/runtime/components/Timeline.vue +38 -38
- package/dist/runtime/components/Toast.vue +69 -69
- package/dist/runtime/components/Toaster.vue +28 -28
- package/dist/runtime/components/Tooltip.vue +19 -19
- package/dist/runtime/components/Tree.vue +60 -60
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeButton.vue +16 -16
- package/dist/runtime/components/color-mode/ColorModeImage.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +19 -19
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +19 -19
- package/dist/runtime/components/content/ContentNavigation.vue +109 -109
- package/dist/runtime/components/content/ContentSearch.vue +25 -25
- package/dist/runtime/components/content/ContentSearchButton.vue +38 -38
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +12 -12
- package/dist/runtime/components/content/ContentSurround.vue +29 -29
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +59 -59
- package/dist/runtime/components/content/ContentToc.vue +68 -68
- package/dist/runtime/components/content/ContentToc.vue.d.ts +88 -88
- package/dist/runtime/components/locale/LocaleSelect.vue +20 -20
- package/dist/runtime/components/prose/A.vue +3 -3
- package/dist/runtime/components/prose/Accordion.vue +5 -5
- package/dist/runtime/components/prose/AccordionItem.vue +5 -5
- package/dist/runtime/components/prose/Badge.vue +3 -3
- package/dist/runtime/components/prose/Blockquote.vue +3 -3
- package/dist/runtime/components/prose/Callout.vue +27 -27
- package/dist/runtime/components/prose/Card.vue +43 -43
- package/dist/runtime/components/prose/CardGroup.vue +3 -3
- package/dist/runtime/components/prose/Code.vue +3 -3
- package/dist/runtime/components/prose/CodeCollapse.vue +16 -16
- package/dist/runtime/components/prose/CodeGroup.vue +15 -15
- package/dist/runtime/components/prose/CodeIcon.vue +1 -1
- package/dist/runtime/components/prose/CodePreview.vue +9 -9
- package/dist/runtime/components/prose/CodeTree.vue +61 -61
- package/dist/runtime/components/prose/Collapsible.vue +15 -15
- package/dist/runtime/components/prose/Em.vue +1 -1
- package/dist/runtime/components/prose/Field.vue +23 -23
- package/dist/runtime/components/prose/FieldGroup.vue +3 -3
- package/dist/runtime/components/prose/H1.vue +6 -6
- package/dist/runtime/components/prose/H2.vue +10 -10
- package/dist/runtime/components/prose/H3.vue +10 -10
- package/dist/runtime/components/prose/H4.vue +6 -6
- package/dist/runtime/components/prose/Hr.vue +1 -1
- package/dist/runtime/components/prose/Icon.vue +1 -1
- package/dist/runtime/components/prose/Img.vue +8 -8
- package/dist/runtime/components/prose/Kbd.vue +1 -1
- package/dist/runtime/components/prose/Li.vue +3 -3
- package/dist/runtime/components/prose/Ol.vue +3 -3
- package/dist/runtime/components/prose/P.vue +3 -3
- package/dist/runtime/components/prose/Pre.vue +20 -20
- package/dist/runtime/components/prose/Script.vue +3 -3
- package/dist/runtime/components/prose/Steps.vue +3 -3
- package/dist/runtime/components/prose/Strong.vue +3 -3
- package/dist/runtime/components/prose/Table.vue +5 -5
- package/dist/runtime/components/prose/Tabs.vue +14 -14
- package/dist/runtime/components/prose/TabsItem.vue +5 -5
- package/dist/runtime/components/prose/Tbody.vue +3 -3
- package/dist/runtime/components/prose/Td.vue +3 -3
- package/dist/runtime/components/prose/Th.vue +3 -3
- package/dist/runtime/components/prose/Thead.vue +3 -3
- package/dist/runtime/components/prose/Tr.vue +3 -3
- package/dist/runtime/components/prose/Ul.vue +3 -3
- package/dist/runtime/components/prose/callout/Caution.vue +3 -3
- package/dist/runtime/components/prose/callout/Note.vue +3 -3
- package/dist/runtime/components/prose/callout/Tip.vue +3 -3
- package/dist/runtime/components/prose/callout/Warning.vue +3 -3
- package/dist/runtime/inertia/components/Link.vue +12 -12
- package/dist/runtime/inertia/components/LinkBase.vue +15 -15
- package/dist/runtime/types/app.config.d.ts +6 -6
- package/dist/runtime/vue/components/Icon.vue +1 -1
- package/dist/runtime/vue/components/Link.vue +31 -31
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +7 -7
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +7 -7
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +7 -7
- package/package.json +1 -1
- package/vue-plugin.d.ts +5 -5
- package/.nuxt/ui/content/content-navigation.ts +0 -339
- package/.nuxt/ui/content/content-search-button.ts +0 -6
- package/.nuxt/ui/content/content-search.ts +0 -6
- package/.nuxt/ui/content/content-surround.ts +0 -39
- package/.nuxt/ui/content/content-toc.ts +0 -150
- package/.nuxt/ui/content/index.ts +0 -5
- package/.nuxt/ui/error.ts +0 -9
- package/.nuxt/ui/prose/a.ts +0 -6
- package/.nuxt/ui/prose/accordion-item.ts +0 -3
- package/.nuxt/ui/prose/accordion.ts +0 -6
- package/.nuxt/ui/prose/badge.ts +0 -3
- package/.nuxt/ui/prose/blockquote.ts +0 -3
- package/.nuxt/ui/prose/callout.ts +0 -129
- package/.nuxt/ui/prose/card-group.ts +0 -3
- package/.nuxt/ui/prose/card.ts +0 -119
- package/.nuxt/ui/prose/code-collapse.ts +0 -19
- package/.nuxt/ui/prose/code-group.ts +0 -13
- package/.nuxt/ui/prose/code-icon.ts +0 -66
- package/.nuxt/ui/prose/code-preview.ts +0 -14
- package/.nuxt/ui/prose/code-tree.ts +0 -28
- package/.nuxt/ui/prose/code.ts +0 -27
- package/.nuxt/ui/prose/collapsible.ts +0 -12
- package/.nuxt/ui/prose/em.ts +0 -3
- package/.nuxt/ui/prose/field-group.ts +0 -3
- package/.nuxt/ui/prose/field.ts +0 -11
- package/.nuxt/ui/prose/h1.ts +0 -6
- package/.nuxt/ui/prose/h2.ts +0 -14
- package/.nuxt/ui/prose/h3.ts +0 -14
- package/.nuxt/ui/prose/h4.ts +0 -6
- package/.nuxt/ui/prose/hr.ts +0 -3
- package/.nuxt/ui/prose/icon.ts +0 -3
- package/.nuxt/ui/prose/img.ts +0 -3
- package/.nuxt/ui/prose/index.ts +0 -41
- package/.nuxt/ui/prose/kbd.ts +0 -3
- package/.nuxt/ui/prose/li.ts +0 -3
- package/.nuxt/ui/prose/ol.ts +0 -3
- package/.nuxt/ui/prose/p.ts +0 -3
- package/.nuxt/ui/prose/pre.ts +0 -17
- package/.nuxt/ui/prose/steps.ts +0 -19
- package/.nuxt/ui/prose/strong.ts +0 -3
- package/.nuxt/ui/prose/table.ts +0 -6
- package/.nuxt/ui/prose/tabs-item.ts +0 -3
- package/.nuxt/ui/prose/tabs.ts +0 -5
- package/.nuxt/ui/prose/tbody.ts +0 -3
- package/.nuxt/ui/prose/td.ts +0 -3
- package/.nuxt/ui/prose/th.ts +0 -3
- package/.nuxt/ui/prose/thead.ts +0 -3
- package/.nuxt/ui/prose/tr.ts +0 -3
- package/.nuxt/ui/prose/ul.ts +0 -3
|
@@ -57,73 +57,73 @@ defineExpose({
|
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
59
|
<template>
|
|
60
|
-
<ToastRoot
|
|
61
|
-
ref="el"
|
|
62
|
-
v-slot="{ remaining, duration }"
|
|
63
|
-
v-bind="rootProps"
|
|
64
|
-
:data-orientation="orientation"
|
|
65
|
-
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
66
|
-
:style="{ '--height': height }"
|
|
67
|
-
>
|
|
68
|
-
<slot name="leading">
|
|
69
|
-
<UAvatar v-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
70
|
-
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
71
|
-
</slot>
|
|
72
|
-
|
|
73
|
-
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
74
|
-
<ToastTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
75
|
-
<slot name="title">
|
|
76
|
-
<component :is="title()" v-if="typeof title === 'function'" />
|
|
77
|
-
<component :is="title" v-else-if="typeof title === 'object'" />
|
|
78
|
-
<template v-else>
|
|
79
|
-
{{ title }}
|
|
80
|
-
</template>
|
|
81
|
-
</slot>
|
|
82
|
-
</ToastTitle>
|
|
83
|
-
<ToastDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
84
|
-
<slot name="description">
|
|
85
|
-
<component :is="description()" v-if="typeof description === 'function'" />
|
|
86
|
-
<component :is="description" v-else-if="typeof description === 'object'" />
|
|
87
|
-
<template v-else>
|
|
88
|
-
{{ description }}
|
|
89
|
-
</template>
|
|
90
|
-
</slot>
|
|
91
|
-
</ToastDescription>
|
|
92
|
-
|
|
93
|
-
<div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" :class="ui.actions({ class: props.ui?.actions })">
|
|
94
|
-
<slot name="actions">
|
|
95
|
-
<ToastAction v-for="(action, index) in actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
|
|
96
|
-
<UButton size="xs" :color="color" v-bind="action" />
|
|
97
|
-
</ToastAction>
|
|
98
|
-
</slot>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
<div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" :class="ui.actions({ class: props.ui?.actions, orientation: 'horizontal' })">
|
|
103
|
-
<template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
|
|
104
|
-
<slot name="actions">
|
|
105
|
-
<ToastAction v-for="(action, index) in actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
|
|
106
|
-
<UButton size="xs" :color="color" v-bind="action" />
|
|
107
|
-
</ToastAction>
|
|
108
|
-
</slot>
|
|
109
|
-
</template>
|
|
110
|
-
|
|
111
|
-
<ToastClose v-if="close || !!slots.close" as-child>
|
|
112
|
-
<slot name="close" :ui="ui">
|
|
113
|
-
<UButton
|
|
114
|
-
v-if="close"
|
|
115
|
-
:icon="closeIcon || appConfig.ui.icons.close"
|
|
116
|
-
color="neutral"
|
|
117
|
-
variant="link"
|
|
118
|
-
:aria-label="t('toast.close')"
|
|
119
|
-
v-bind="typeof close === 'object' ? close : {}"
|
|
120
|
-
:class="ui.close({ class: props.ui?.close })"
|
|
121
|
-
@click.stop
|
|
122
|
-
/>
|
|
123
|
-
</slot>
|
|
124
|
-
</ToastClose>
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
<div v-if="progress && remaining > 0 && duration" :class="ui.progress({ class: props.ui?.progress })" :style="{ width: `${remaining / duration * 100}%` }" />
|
|
128
|
-
</ToastRoot>
|
|
60
|
+
<ToastRoot
|
|
61
|
+
ref="el"
|
|
62
|
+
v-slot="{ remaining, duration }"
|
|
63
|
+
v-bind="rootProps"
|
|
64
|
+
:data-orientation="orientation"
|
|
65
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
66
|
+
:style="{ '--height': height }"
|
|
67
|
+
>
|
|
68
|
+
<slot name="leading">
|
|
69
|
+
<UAvatar v-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
70
|
+
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
71
|
+
</slot>
|
|
72
|
+
|
|
73
|
+
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
74
|
+
<ToastTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
75
|
+
<slot name="title">
|
|
76
|
+
<component :is="title()" v-if="typeof title === 'function'" />
|
|
77
|
+
<component :is="title" v-else-if="typeof title === 'object'" />
|
|
78
|
+
<template v-else>
|
|
79
|
+
{{ title }}
|
|
80
|
+
</template>
|
|
81
|
+
</slot>
|
|
82
|
+
</ToastTitle>
|
|
83
|
+
<ToastDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
84
|
+
<slot name="description">
|
|
85
|
+
<component :is="description()" v-if="typeof description === 'function'" />
|
|
86
|
+
<component :is="description" v-else-if="typeof description === 'object'" />
|
|
87
|
+
<template v-else>
|
|
88
|
+
{{ description }}
|
|
89
|
+
</template>
|
|
90
|
+
</slot>
|
|
91
|
+
</ToastDescription>
|
|
92
|
+
|
|
93
|
+
<div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" :class="ui.actions({ class: props.ui?.actions })">
|
|
94
|
+
<slot name="actions">
|
|
95
|
+
<ToastAction v-for="(action, index) in actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
|
|
96
|
+
<UButton size="xs" :color="color" v-bind="action" />
|
|
97
|
+
</ToastAction>
|
|
98
|
+
</slot>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" :class="ui.actions({ class: props.ui?.actions, orientation: 'horizontal' })">
|
|
103
|
+
<template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
|
|
104
|
+
<slot name="actions">
|
|
105
|
+
<ToastAction v-for="(action, index) in actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
|
|
106
|
+
<UButton size="xs" :color="color" v-bind="action" />
|
|
107
|
+
</ToastAction>
|
|
108
|
+
</slot>
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<ToastClose v-if="close || !!slots.close" as-child>
|
|
112
|
+
<slot name="close" :ui="ui">
|
|
113
|
+
<UButton
|
|
114
|
+
v-if="close"
|
|
115
|
+
:icon="closeIcon || appConfig.ui.icons.close"
|
|
116
|
+
color="neutral"
|
|
117
|
+
variant="link"
|
|
118
|
+
:aria-label="t('toast.close')"
|
|
119
|
+
v-bind="typeof close === 'object' ? close : {}"
|
|
120
|
+
:class="ui.close({ class: props.ui?.close })"
|
|
121
|
+
@click.stop
|
|
122
|
+
/>
|
|
123
|
+
</slot>
|
|
124
|
+
</ToastClose>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div v-if="progress && remaining > 0 && duration" :class="ui.progress({ class: props.ui?.progress })" :style="{ width: `${remaining / duration * 100}%` }" />
|
|
128
|
+
</ToastRoot>
|
|
129
129
|
</template>
|
|
@@ -67,18 +67,18 @@ function getOffset(index) {
|
|
|
67
67
|
</script>
|
|
68
68
|
|
|
69
69
|
<template>
|
|
70
|
-
<ToastProvider :swipe-direction="swipeDirection" v-bind="providerProps">
|
|
71
|
-
<slot />
|
|
72
|
-
|
|
73
|
-
<UToast
|
|
74
|
-
v-for="(toast, index) of toasts"
|
|
75
|
-
:key="toast.id"
|
|
76
|
-
ref="refs"
|
|
77
|
-
:progress="progress"
|
|
78
|
-
v-bind="omit(toast, ['id', 'close'])"
|
|
79
|
-
:close="toast.close"
|
|
80
|
-
:data-expanded="expanded"
|
|
81
|
-
:data-front="!expanded && index === toasts.length - 1"
|
|
70
|
+
<ToastProvider :swipe-direction="swipeDirection" v-bind="providerProps">
|
|
71
|
+
<slot />
|
|
72
|
+
|
|
73
|
+
<UToast
|
|
74
|
+
v-for="(toast, index) of toasts"
|
|
75
|
+
:key="toast.id"
|
|
76
|
+
ref="refs"
|
|
77
|
+
:progress="progress"
|
|
78
|
+
v-bind="omit(toast, ['id', 'close'])"
|
|
79
|
+
:close="toast.close"
|
|
80
|
+
:data-expanded="expanded"
|
|
81
|
+
:data-front="!expanded && index === toasts.length - 1"
|
|
82
82
|
:style="{
|
|
83
83
|
'--index': index - toasts.length + toasts.length,
|
|
84
84
|
'--before': toasts.length - 1 - index,
|
|
@@ -86,26 +86,26 @@ function getOffset(index) {
|
|
|
86
86
|
'--scale': expanded ? '1' : 'calc(1 - var(--before) * var(--scale-factor))',
|
|
87
87
|
'--translate': expanded ? 'calc(var(--offset) * var(--translate-factor))' : 'calc(var(--before) * var(--gap))',
|
|
88
88
|
'--transform': 'translateY(var(--translate)) scale(var(--scale))'
|
|
89
|
-
}"
|
|
90
|
-
:class="ui.base({ class: [props.ui?.base, toast.onClick ? 'cursor-pointer' : void 0] })"
|
|
91
|
-
@update:open="onUpdateOpen($event, toast.id)"
|
|
92
|
-
@click="toast.onClick && toast.onClick(toast)"
|
|
93
|
-
/>
|
|
94
|
-
|
|
95
|
-
<ToastPortal v-bind="portalProps">
|
|
96
|
-
<ToastViewport
|
|
97
|
-
:data-expanded="expanded"
|
|
98
|
-
:class="ui.viewport({ class: [props.ui?.viewport, props.class] })"
|
|
89
|
+
}"
|
|
90
|
+
:class="ui.base({ class: [props.ui?.base, toast.onClick ? 'cursor-pointer' : void 0] })"
|
|
91
|
+
@update:open="onUpdateOpen($event, toast.id)"
|
|
92
|
+
@click="toast.onClick && toast.onClick(toast)"
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
<ToastPortal v-bind="portalProps">
|
|
96
|
+
<ToastViewport
|
|
97
|
+
:data-expanded="expanded"
|
|
98
|
+
:class="ui.viewport({ class: [props.ui?.viewport, props.class] })"
|
|
99
99
|
:style="{
|
|
100
100
|
'--scale-factor': '0.05',
|
|
101
101
|
'--translate-factor': position?.startsWith('top') ? '1px' : '-1px',
|
|
102
102
|
'--gap': position?.startsWith('top') ? '16px' : '-16px',
|
|
103
103
|
'--front-height': `${frontHeight}px`,
|
|
104
104
|
'--height': `${height}px`
|
|
105
|
-
}"
|
|
106
|
-
@mouseenter="hovered = true"
|
|
107
|
-
@mouseleave="hovered = false"
|
|
108
|
-
/>
|
|
109
|
-
</ToastPortal>
|
|
110
|
-
</ToastProvider>
|
|
105
|
+
}"
|
|
106
|
+
@mouseenter="hovered = true"
|
|
107
|
+
@mouseleave="hovered = false"
|
|
108
|
+
/>
|
|
109
|
+
</ToastPortal>
|
|
110
|
+
</ToastProvider>
|
|
111
111
|
</template>
|
|
@@ -40,23 +40,23 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tooltip || {}
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
<template>
|
|
43
|
-
<TooltipRoot v-slot="{ open }" v-bind="rootProps">
|
|
44
|
-
<TooltipTrigger v-if="!!slots.default" v-bind="$attrs" as-child :class="props.class">
|
|
45
|
-
<slot :open="open" />
|
|
46
|
-
</TooltipTrigger>
|
|
47
|
-
|
|
48
|
-
<TooltipPortal v-bind="portalProps">
|
|
49
|
-
<TooltipContent v-bind="contentProps" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })">
|
|
50
|
-
<slot name="content">
|
|
51
|
-
<span v-if="text" :class="ui.text({ class: props.ui?.text })">{{ text }}</span>
|
|
52
|
-
|
|
53
|
-
<span v-if="kbds?.length" :class="ui.kbds({ class: props.ui?.kbds })">
|
|
54
|
-
<UKbd v-for="(kbd, index) in kbds" :key="index" :size="props.ui?.kbdsSize || ui.kbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
|
|
55
|
-
</span>
|
|
56
|
-
</slot>
|
|
57
|
-
|
|
58
|
-
<TooltipArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
59
|
-
</TooltipContent>
|
|
60
|
-
</TooltipPortal>
|
|
61
|
-
</TooltipRoot>
|
|
43
|
+
<TooltipRoot v-slot="{ open }" v-bind="rootProps">
|
|
44
|
+
<TooltipTrigger v-if="!!slots.default" v-bind="$attrs" as-child :class="props.class">
|
|
45
|
+
<slot :open="open" />
|
|
46
|
+
</TooltipTrigger>
|
|
47
|
+
|
|
48
|
+
<TooltipPortal v-bind="portalProps">
|
|
49
|
+
<TooltipContent v-bind="contentProps" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })">
|
|
50
|
+
<slot name="content">
|
|
51
|
+
<span v-if="text" :class="ui.text({ class: props.ui?.text })">{{ text }}</span>
|
|
52
|
+
|
|
53
|
+
<span v-if="kbds?.length" :class="ui.kbds({ class: props.ui?.kbds })">
|
|
54
|
+
<UKbd v-for="(kbd, index) in kbds" :key="index" :size="props.ui?.kbdsSize || ui.kbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
|
|
55
|
+
</span>
|
|
56
|
+
</slot>
|
|
57
|
+
|
|
58
|
+
<TooltipArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
59
|
+
</TooltipContent>
|
|
60
|
+
</TooltipPortal>
|
|
61
|
+
</TooltipRoot>
|
|
62
62
|
</template>
|
|
@@ -58,64 +58,64 @@ const defaultExpanded = computed(
|
|
|
58
58
|
</script>
|
|
59
59
|
|
|
60
60
|
<template>
|
|
61
|
-
<DefineTreeTemplate v-slot="{ items, level }">
|
|
62
|
-
<li
|
|
63
|
-
v-for="(item, index) in items"
|
|
64
|
-
:key="`${level}-${index}`"
|
|
65
|
-
:class="level > 0 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, item.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, item.ui?.item] })"
|
|
66
|
-
>
|
|
67
|
-
<TreeItem
|
|
68
|
-
v-slot="{ isExpanded, isSelected }"
|
|
69
|
-
as-child
|
|
70
|
-
:level="level"
|
|
71
|
-
:value="item"
|
|
72
|
-
@toggle="item.onToggle"
|
|
73
|
-
@select="item.onSelect"
|
|
74
|
-
>
|
|
75
|
-
<button :disabled="item.disabled || disabled" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], selected: isSelected, disabled: item.disabled || disabled })">
|
|
76
|
-
<slot :name="item.slot || 'item'" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
77
|
-
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
78
|
-
<UIcon
|
|
79
|
-
v-if="item.icon"
|
|
80
|
-
:name="item.icon"
|
|
81
|
-
:class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
|
|
82
|
-
/>
|
|
83
|
-
<UIcon
|
|
84
|
-
v-else-if="item.children?.length"
|
|
85
|
-
:name="isExpanded ? expandedIcon ?? appConfig.ui.icons.folderOpen : collapsedIcon ?? appConfig.ui.icons.folder"
|
|
86
|
-
:class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
|
|
87
|
-
/>
|
|
88
|
-
</slot>
|
|
89
|
-
|
|
90
|
-
<span v-if="getItemLabel(item) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
|
|
91
|
-
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
92
|
-
{{ getItemLabel(item) }}
|
|
93
|
-
</slot>
|
|
94
|
-
</span>
|
|
95
|
-
|
|
96
|
-
<span v-if="item.trailingIcon || item.children?.length || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing']" :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })">
|
|
97
|
-
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
98
|
-
<UIcon v-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })" />
|
|
99
|
-
<UIcon v-else-if="item.children?.length" :name="trailingIcon ?? appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })" />
|
|
100
|
-
</slot>
|
|
101
|
-
</span>
|
|
102
|
-
</slot>
|
|
103
|
-
</button>
|
|
104
|
-
|
|
105
|
-
<ul v-if="item.children?.length && isExpanded" :class="ui.listWithChildren({ class: [props.ui?.listWithChildren, item.ui?.listWithChildren] })">
|
|
106
|
-
<ReuseTreeTemplate :items="item.children" :level="level + 1" />
|
|
107
|
-
</ul>
|
|
108
|
-
</TreeItem>
|
|
109
|
-
</li>
|
|
110
|
-
</DefineTreeTemplate>
|
|
111
|
-
|
|
112
|
-
<TreeRoot
|
|
113
|
-
v-bind="rootProps"
|
|
114
|
-
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
115
|
-
:get-key="getItemValue"
|
|
116
|
-
:default-expanded="defaultExpanded"
|
|
117
|
-
:selection-behavior="selectionBehavior"
|
|
118
|
-
>
|
|
119
|
-
<ReuseTreeTemplate :items="items" :level="0" />
|
|
120
|
-
</TreeRoot>
|
|
61
|
+
<DefineTreeTemplate v-slot="{ items, level }">
|
|
62
|
+
<li
|
|
63
|
+
v-for="(item, index) in items"
|
|
64
|
+
:key="`${level}-${index}`"
|
|
65
|
+
:class="level > 0 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, item.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, item.ui?.item] })"
|
|
66
|
+
>
|
|
67
|
+
<TreeItem
|
|
68
|
+
v-slot="{ isExpanded, isSelected }"
|
|
69
|
+
as-child
|
|
70
|
+
:level="level"
|
|
71
|
+
:value="item"
|
|
72
|
+
@toggle="item.onToggle"
|
|
73
|
+
@select="item.onSelect"
|
|
74
|
+
>
|
|
75
|
+
<button :disabled="item.disabled || disabled" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], selected: isSelected, disabled: item.disabled || disabled })">
|
|
76
|
+
<slot :name="item.slot || 'item'" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
77
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
78
|
+
<UIcon
|
|
79
|
+
v-if="item.icon"
|
|
80
|
+
:name="item.icon"
|
|
81
|
+
:class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
|
|
82
|
+
/>
|
|
83
|
+
<UIcon
|
|
84
|
+
v-else-if="item.children?.length"
|
|
85
|
+
:name="isExpanded ? expandedIcon ?? appConfig.ui.icons.folderOpen : collapsedIcon ?? appConfig.ui.icons.folder"
|
|
86
|
+
:class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
|
|
87
|
+
/>
|
|
88
|
+
</slot>
|
|
89
|
+
|
|
90
|
+
<span v-if="getItemLabel(item) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
|
|
91
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
92
|
+
{{ getItemLabel(item) }}
|
|
93
|
+
</slot>
|
|
94
|
+
</span>
|
|
95
|
+
|
|
96
|
+
<span v-if="item.trailingIcon || item.children?.length || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing']" :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })">
|
|
97
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
98
|
+
<UIcon v-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })" />
|
|
99
|
+
<UIcon v-else-if="item.children?.length" :name="trailingIcon ?? appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })" />
|
|
100
|
+
</slot>
|
|
101
|
+
</span>
|
|
102
|
+
</slot>
|
|
103
|
+
</button>
|
|
104
|
+
|
|
105
|
+
<ul v-if="item.children?.length && isExpanded" :class="ui.listWithChildren({ class: [props.ui?.listWithChildren, item.ui?.listWithChildren] })">
|
|
106
|
+
<ReuseTreeTemplate :items="item.children" :level="level + 1" />
|
|
107
|
+
</ul>
|
|
108
|
+
</TreeItem>
|
|
109
|
+
</li>
|
|
110
|
+
</DefineTreeTemplate>
|
|
111
|
+
|
|
112
|
+
<TreeRoot
|
|
113
|
+
v-bind="rootProps"
|
|
114
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
115
|
+
:get-key="getItemValue"
|
|
116
|
+
:default-expanded="defaultExpanded"
|
|
117
|
+
:selection-behavior="selectionBehavior"
|
|
118
|
+
>
|
|
119
|
+
<ReuseTreeTemplate :items="items" :level="0" />
|
|
120
|
+
</TreeRoot>
|
|
121
121
|
</template>
|
|
@@ -11,6 +11,6 @@ defineProps({
|
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<template>
|
|
14
|
-
<UAvatar :src="light" class="dark:hidden" v-bind="$attrs" />
|
|
15
|
-
<UAvatar :src="dark" class="hidden dark:block" v-bind="$attrs" />
|
|
14
|
+
<UAvatar :src="light" class="dark:hidden" v-bind="$attrs" />
|
|
15
|
+
<UAvatar :src="dark" class="hidden dark:block" v-bind="$attrs" />
|
|
16
16
|
</template>
|
|
@@ -26,20 +26,20 @@ const isDark = computed({
|
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
29
|
-
<ClientOnly v-if="!colorMode?.forced">
|
|
30
|
-
<UButton
|
|
31
|
-
:icon="isDark ? appConfig.ui.icons.dark : appConfig.ui.icons.light"
|
|
32
|
-
:color="color"
|
|
33
|
-
:variant="variant"
|
|
34
|
-
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
35
|
-
v-bind="$attrs"
|
|
36
|
-
@click="isDark = !isDark"
|
|
37
|
-
/>
|
|
38
|
-
|
|
39
|
-
<template #fallback>
|
|
40
|
-
<slot name="fallback">
|
|
41
|
-
<div class="size-8" />
|
|
42
|
-
</slot>
|
|
43
|
-
</template>
|
|
44
|
-
</ClientOnly>
|
|
29
|
+
<ClientOnly v-if="!colorMode?.forced">
|
|
30
|
+
<UButton
|
|
31
|
+
:icon="isDark ? appConfig.ui.icons.dark : appConfig.ui.icons.light"
|
|
32
|
+
:color="color"
|
|
33
|
+
:variant="variant"
|
|
34
|
+
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
35
|
+
v-bind="$attrs"
|
|
36
|
+
@click="isDark = !isDark"
|
|
37
|
+
/>
|
|
38
|
+
|
|
39
|
+
<template #fallback>
|
|
40
|
+
<slot name="fallback">
|
|
41
|
+
<div class="size-8" />
|
|
42
|
+
</slot>
|
|
43
|
+
</template>
|
|
44
|
+
</ClientOnly>
|
|
45
45
|
</template>
|
|
@@ -12,6 +12,6 @@ defineProps({
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
|
-
<component :is="ImageComponent" :src="light" class="dark:hidden" v-bind="$attrs" />
|
|
16
|
-
<component :is="ImageComponent" :src="dark" class="hidden dark:block" v-bind="$attrs" />
|
|
15
|
+
<component :is="ImageComponent" :src="light" class="dark:hidden" v-bind="$attrs" />
|
|
16
|
+
<component :is="ImageComponent" :src="dark" class="hidden dark:block" v-bind="$attrs" />
|
|
17
17
|
</template>
|
|
@@ -27,23 +27,23 @@ const preference = computed({
|
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
|
-
<ClientOnly v-if="!colorMode?.forced">
|
|
31
|
-
<USelectMenu
|
|
32
|
-
v-model="preference"
|
|
33
|
-
:search-input="false"
|
|
34
|
-
:icon="preference?.icon"
|
|
35
|
-
v-bind="$attrs"
|
|
36
|
-
:items="items"
|
|
37
|
-
/>
|
|
38
|
-
<template #fallback>
|
|
39
|
-
<USelectMenu
|
|
40
|
-
:search-input="false"
|
|
41
|
-
:icon="items[0]?.icon"
|
|
42
|
-
v-bind="$attrs"
|
|
43
|
-
:model-value="items[0]"
|
|
44
|
-
:items="items"
|
|
45
|
-
disabled
|
|
46
|
-
/>
|
|
47
|
-
</template>
|
|
48
|
-
</ClientOnly>
|
|
30
|
+
<ClientOnly v-if="!colorMode?.forced">
|
|
31
|
+
<USelectMenu
|
|
32
|
+
v-model="preference"
|
|
33
|
+
:search-input="false"
|
|
34
|
+
:icon="preference?.icon"
|
|
35
|
+
v-bind="$attrs"
|
|
36
|
+
:items="items"
|
|
37
|
+
/>
|
|
38
|
+
<template #fallback>
|
|
39
|
+
<USelectMenu
|
|
40
|
+
:search-input="false"
|
|
41
|
+
:icon="items[0]?.icon"
|
|
42
|
+
v-bind="$attrs"
|
|
43
|
+
:model-value="items[0]"
|
|
44
|
+
:items="items"
|
|
45
|
+
disabled
|
|
46
|
+
/>
|
|
47
|
+
</template>
|
|
48
|
+
</ClientOnly>
|
|
49
49
|
</template>
|
|
@@ -22,23 +22,23 @@ const isDark = computed({
|
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
|
-
<ClientOnly v-if="!colorMode?.forced">
|
|
26
|
-
<USwitch
|
|
27
|
-
v-model="isDark"
|
|
28
|
-
:checked-icon="appConfig.ui.icons.dark"
|
|
29
|
-
:unchecked-icon="appConfig.ui.icons.light"
|
|
30
|
-
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
31
|
-
v-bind="$attrs"
|
|
32
|
-
/>
|
|
33
|
-
|
|
34
|
-
<template #fallback>
|
|
35
|
-
<USwitch
|
|
36
|
-
:checked-icon="appConfig.ui.icons.dark"
|
|
37
|
-
:unchecked-icon="appConfig.ui.icons.light"
|
|
38
|
-
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
39
|
-
v-bind="$attrs"
|
|
40
|
-
disabled
|
|
41
|
-
/>
|
|
42
|
-
</template>
|
|
43
|
-
</ClientOnly>
|
|
25
|
+
<ClientOnly v-if="!colorMode?.forced">
|
|
26
|
+
<USwitch
|
|
27
|
+
v-model="isDark"
|
|
28
|
+
:checked-icon="appConfig.ui.icons.dark"
|
|
29
|
+
:unchecked-icon="appConfig.ui.icons.light"
|
|
30
|
+
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
31
|
+
v-bind="$attrs"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
<template #fallback>
|
|
35
|
+
<USwitch
|
|
36
|
+
:checked-icon="appConfig.ui.icons.dark"
|
|
37
|
+
:unchecked-icon="appConfig.ui.icons.light"
|
|
38
|
+
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
39
|
+
v-bind="$attrs"
|
|
40
|
+
disabled
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
43
|
+
</ClientOnly>
|
|
44
44
|
</template>
|