@eslamdevui/ui 3.2.0-beta.1 → 3.2.0-beta.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/alert.ts +5 -0
- package/.nuxt/ui/badge.ts +5 -0
- package/.nuxt/ui/button-group.ts +13 -0
- package/.nuxt/ui/button.ts +5 -0
- package/.nuxt/ui/carousel.ts +5 -0
- package/.nuxt/ui/content/content-navigation.ts +339 -0
- package/.nuxt/ui/content/content-search-button.ts +6 -0
- package/.nuxt/ui/content/content-search.ts +6 -0
- package/.nuxt/ui/content/content-surround.ts +39 -0
- package/.nuxt/ui/content/content-toc.ts +150 -0
- package/.nuxt/ui/content/index.ts +5 -0
- package/.nuxt/ui/content-surround.ts +5 -0
- package/.nuxt/ui/content-toc.ts +6 -6
- package/.nuxt/ui/dashboard-navbar.ts +5 -0
- package/.nuxt/ui/dashboard-sidebar-collapse.ts +5 -0
- package/.nuxt/ui/dashboard-sidebar-toggle.ts +5 -0
- package/.nuxt/ui/dashboard-sidebar.ts +10 -0
- package/.nuxt/ui/error.ts +9 -0
- package/.nuxt/ui/index.ts +48 -1
- package/.nuxt/ui/input-menu.ts +9 -0
- package/.nuxt/ui/input-number.ts +5 -0
- package/.nuxt/ui/input-tags.ts +9 -0
- package/.nuxt/ui/input.ts +9 -0
- package/.nuxt/ui/prose/a.ts +6 -0
- package/.nuxt/ui/prose/accordion-item.ts +3 -0
- package/.nuxt/ui/prose/accordion.ts +6 -0
- package/.nuxt/ui/prose/badge.ts +3 -0
- package/.nuxt/ui/prose/blockquote.ts +3 -0
- package/.nuxt/ui/prose/callout.ts +129 -0
- package/.nuxt/ui/prose/card-group.ts +3 -0
- package/.nuxt/ui/prose/card.ts +119 -0
- package/.nuxt/ui/prose/code-collapse.ts +19 -0
- package/.nuxt/ui/prose/code-group.ts +13 -0
- package/.nuxt/ui/prose/code-icon.ts +66 -0
- package/.nuxt/ui/prose/code-preview.ts +14 -0
- package/.nuxt/ui/prose/code-tree.ts +28 -0
- package/.nuxt/ui/prose/code.ts +27 -0
- package/.nuxt/ui/prose/collapsible.ts +12 -0
- package/.nuxt/ui/prose/em.ts +3 -0
- package/.nuxt/ui/prose/field-group.ts +3 -0
- package/.nuxt/ui/prose/field.ts +11 -0
- package/.nuxt/ui/prose/h1.ts +6 -0
- package/.nuxt/ui/prose/h2.ts +14 -0
- package/.nuxt/ui/prose/h3.ts +14 -0
- package/.nuxt/ui/prose/h4.ts +6 -0
- package/.nuxt/ui/prose/hr.ts +3 -0
- package/.nuxt/ui/prose/icon.ts +3 -0
- package/.nuxt/ui/prose/img.ts +3 -0
- package/.nuxt/ui/prose/index.ts +41 -0
- package/.nuxt/ui/prose/kbd.ts +3 -0
- package/.nuxt/ui/prose/li.ts +3 -0
- package/.nuxt/ui/prose/ol.ts +3 -0
- package/.nuxt/ui/prose/p.ts +3 -0
- package/.nuxt/ui/prose/pre.ts +17 -0
- package/.nuxt/ui/prose/steps.ts +19 -0
- package/.nuxt/ui/prose/strong.ts +3 -0
- package/.nuxt/ui/prose/table.ts +6 -0
- package/.nuxt/ui/prose/tabs-item.ts +3 -0
- package/.nuxt/ui/prose/tabs.ts +5 -0
- package/.nuxt/ui/prose/tbody.ts +3 -0
- package/.nuxt/ui/prose/td.ts +3 -0
- package/.nuxt/ui/prose/th.ts +3 -0
- package/.nuxt/ui/prose/thead.ts +3 -0
- package/.nuxt/ui/prose/tr.ts +3 -0
- package/.nuxt/ui/prose/ul.ts +3 -0
- package/.nuxt/ui/select-menu.ts +9 -0
- package/.nuxt/ui/select.ts +9 -0
- package/.nuxt/ui/textarea.ts +9 -0
- package/.nuxt/ui/toast.ts +5 -0
- 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 -228
- package/cli/utils.mjs +31 -31
- package/dist/module.json +1 -1
- package/dist/module.mjs +18 -13
- 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 +71 -71
- package/dist/runtime/components/ChatMessages.vue.d.ts +1 -2
- package/dist/runtime/components/ChatPrompt.vue +30 -31
- package/dist/runtime/components/ChatPrompt.vue.d.ts +4 -4
- 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 +41 -41
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardPanel.vue +29 -29
- package/dist/runtime/components/DashboardPanel.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardResizeHandle.vue +7 -7
- package/dist/runtime/components/DashboardSearch.vue +24 -25
- package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -3
- package/dist/runtime/components/DashboardSearchButton.vue +63 -41
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +7 -1
- package/dist/runtime/components/DashboardSidebar.vue +77 -77
- package/dist/runtime/components/DashboardSidebarCollapse.vue +7 -7
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.vue +14 -17
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +4 -6
- 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 +57 -0
- package/dist/runtime/components/Error.vue.d.ts +52 -0
- package/dist/runtime/components/Form.vue +8 -8
- package/dist/runtime/components/Form.vue.d.ts +1 -1
- 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/ColorModeAvatar.vue.d.ts +2 -2
- package/dist/runtime/components/color-mode/ColorModeButton.vue +16 -16
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +3 -3
- 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/ColorModeSelect.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +19 -19
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentNavigation.vue +175 -0
- package/dist/runtime/components/content/ContentNavigation.vue.d.ts +53 -0
- package/dist/runtime/components/content/ContentSearch.vue +184 -0
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +111 -0
- package/dist/runtime/components/content/ContentSearchButton.vue +95 -0
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +12 -0
- package/dist/runtime/components/content/ContentSurround.vue +61 -0
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +59 -0
- package/dist/runtime/components/content/ContentToc.vue +146 -0
- package/dist/runtime/components/content/ContentToc.vue.d.ts +88 -0
- package/dist/runtime/components/locale/LocaleSelect.vue +20 -20
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +1 -1
- package/dist/runtime/components/prose/A.vue +24 -0
- package/dist/runtime/components/prose/A.vue.d.ts +15 -0
- package/dist/runtime/components/prose/Accordion.vue +43 -0
- package/dist/runtime/components/prose/Accordion.vue.d.ts +16 -0
- package/dist/runtime/components/prose/AccordionItem.vue +25 -0
- package/dist/runtime/components/prose/AccordionItem.vue.d.ts +15 -0
- package/dist/runtime/components/prose/Badge.vue +21 -0
- package/dist/runtime/components/prose/Badge.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Blockquote.vue +21 -0
- package/dist/runtime/components/prose/Blockquote.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Callout.vue +60 -0
- package/dist/runtime/components/prose/Callout.vue.d.ts +26 -0
- package/dist/runtime/components/prose/Card.vue +83 -0
- package/dist/runtime/components/prose/Card.vue.d.ts +30 -0
- package/dist/runtime/components/prose/CardGroup.vue +21 -0
- package/dist/runtime/components/prose/CardGroup.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Code.vue +23 -0
- package/dist/runtime/components/prose/Code.vue.d.ts +22 -0
- package/dist/runtime/components/prose/CodeCollapse.vue +44 -0
- package/dist/runtime/components/prose/CodeCollapse.vue.d.ts +46 -0
- package/dist/runtime/components/prose/CodeGroup.vue +70 -0
- package/dist/runtime/components/prose/CodeGroup.vue.d.ts +37 -0
- package/dist/runtime/components/prose/CodeIcon.vue +28 -0
- package/dist/runtime/components/prose/CodeIcon.vue.d.ts +24 -0
- package/dist/runtime/components/prose/CodePreview.vue +28 -0
- package/dist/runtime/components/prose/CodePreview.vue.d.ts +19 -0
- package/dist/runtime/components/prose/CodeTree.vue +160 -0
- package/dist/runtime/components/prose/CodeTree.vue.d.ts +30 -0
- package/dist/runtime/components/prose/Collapsible.vue +41 -0
- package/dist/runtime/components/prose/Collapsible.vue.d.ts +38 -0
- package/dist/runtime/components/prose/Em.vue +19 -0
- package/dist/runtime/components/prose/Em.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Field.vue +48 -0
- package/dist/runtime/components/prose/Field.vue.d.ts +39 -0
- package/dist/runtime/components/prose/FieldGroup.vue +23 -0
- package/dist/runtime/components/prose/FieldGroup.vue.d.ts +18 -0
- package/dist/runtime/components/prose/H1.vue +28 -0
- package/dist/runtime/components/prose/H1.vue.d.ts +19 -0
- package/dist/runtime/components/prose/H2.vue +32 -0
- package/dist/runtime/components/prose/H2.vue.d.ts +19 -0
- package/dist/runtime/components/prose/H3.vue +32 -0
- package/dist/runtime/components/prose/H3.vue.d.ts +19 -0
- package/dist/runtime/components/prose/H4.vue +28 -0
- package/dist/runtime/components/prose/H4.vue.d.ts +19 -0
- package/dist/runtime/components/prose/Hr.vue +18 -0
- package/dist/runtime/components/prose/Hr.vue.d.ts +5 -0
- package/dist/runtime/components/prose/Icon.vue +19 -0
- package/dist/runtime/components/prose/Icon.vue.d.ts +6 -0
- package/dist/runtime/components/prose/Img.vue +40 -0
- package/dist/runtime/components/prose/Img.vue.d.ts +9 -0
- package/dist/runtime/components/prose/Kbd.vue +19 -0
- package/dist/runtime/components/prose/Kbd.vue.d.ts +6 -0
- package/dist/runtime/components/prose/Li.vue +21 -0
- package/dist/runtime/components/prose/Li.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Ol.vue +21 -0
- package/dist/runtime/components/prose/Ol.vue.d.ts +13 -0
- package/dist/runtime/components/prose/P.vue +21 -0
- package/dist/runtime/components/prose/P.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Pre.vue +63 -0
- package/dist/runtime/components/prose/Pre.vue.d.ts +25 -0
- package/dist/runtime/components/prose/Script.vue +12 -0
- package/dist/runtime/components/prose/Script.vue.d.ts +12 -0
- package/dist/runtime/components/prose/Steps.vue +22 -0
- package/dist/runtime/components/prose/Steps.vue.d.ts +22 -0
- package/dist/runtime/components/prose/Strong.vue +21 -0
- package/dist/runtime/components/prose/Strong.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Table.vue +24 -0
- package/dist/runtime/components/prose/Table.vue.d.ts +18 -0
- package/dist/runtime/components/prose/Tabs.vue +78 -0
- package/dist/runtime/components/prose/Tabs.vue.d.ts +36 -0
- package/dist/runtime/components/prose/TabsItem.vue +25 -0
- package/dist/runtime/components/prose/TabsItem.vue.d.ts +15 -0
- package/dist/runtime/components/prose/Tbody.vue +21 -0
- package/dist/runtime/components/prose/Tbody.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Td.vue +21 -0
- package/dist/runtime/components/prose/Td.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Th.vue +21 -0
- package/dist/runtime/components/prose/Th.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Thead.vue +21 -0
- package/dist/runtime/components/prose/Thead.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Tr.vue +21 -0
- package/dist/runtime/components/prose/Tr.vue.d.ts +13 -0
- package/dist/runtime/components/prose/Ul.vue +21 -0
- package/dist/runtime/components/prose/Ul.vue.d.ts +13 -0
- package/dist/runtime/components/prose/callout/Caution.vue +11 -0
- package/dist/runtime/components/prose/callout/Caution.vue.d.ts +14 -0
- package/dist/runtime/components/prose/callout/Note.vue +11 -0
- package/dist/runtime/components/prose/callout/Note.vue.d.ts +14 -0
- package/dist/runtime/components/prose/callout/Tip.vue +11 -0
- package/dist/runtime/components/prose/callout/Tip.vue.d.ts +14 -0
- package/dist/runtime/components/prose/callout/Warning.vue +11 -0
- package/dist/runtime/components/prose/callout/Warning.vue.d.ts +14 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
- package/dist/runtime/composables/useFormField.d.ts +2 -2
- package/dist/runtime/composables/usePortal.d.ts +1 -1
- package/dist/runtime/composables/useResizable.d.ts +1 -1
- 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/types/content.d.ts +4 -1
- package/dist/runtime/types/content.js +4 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/prose.d.ts +42 -1
- package/dist/runtime/types/prose.js +42 -0
- package/dist/runtime/types/tv.d.ts +2 -2
- package/dist/runtime/utils/index.d.ts +1 -1
- package/dist/runtime/utils/index.js +13 -4
- 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/dist/shared/{ui.BcVNrqyb.mjs → ui.DQZ75GCP.mjs} +183 -180
- package/dist/unplugin.mjs +9 -9
- package/dist/vite.mjs +1 -1
- package/package.json +8 -9
- package/vue-plugin.d.ts +5 -5
|
@@ -34,40 +34,40 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.accordion ||
|
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<template>
|
|
37
|
-
<AccordionRoot v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
38
|
-
<AccordionItem
|
|
39
|
-
v-for="(item, index) in props.items"
|
|
40
|
-
v-slot="{ open }"
|
|
41
|
-
:key="index"
|
|
42
|
-
:value="item.value || String(index)"
|
|
43
|
-
:disabled="item.disabled"
|
|
44
|
-
:class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
|
|
45
|
-
>
|
|
46
|
-
<AccordionHeader as="div" :class="ui.header({ class: [props.ui?.header, item.ui?.header] })">
|
|
47
|
-
<AccordionTrigger :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger], disabled: item.disabled })">
|
|
48
|
-
<slot name="leading" :item="item" :index="index" :open="open">
|
|
49
|
-
<UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, item?.ui?.leadingIcon] })" />
|
|
50
|
-
</slot>
|
|
51
|
-
|
|
52
|
-
<span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: [props.ui?.label, item.ui?.label] })">
|
|
53
|
-
<slot :item="item" :index="index" :open="open">{{ get(item, props.labelKey) }}</slot>
|
|
54
|
-
</span>
|
|
55
|
-
|
|
56
|
-
<slot name="trailing" :item="item" :index="index" :open="open">
|
|
57
|
-
<UIcon :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: [props.ui?.trailingIcon, item.ui?.trailingIcon] })" />
|
|
58
|
-
</slot>
|
|
59
|
-
</AccordionTrigger>
|
|
60
|
-
</AccordionHeader>
|
|
61
|
-
|
|
62
|
-
<AccordionContent v-if="item.content || !!slots.content || item.slot && !!slots[item.slot] || !!slots.body || item.slot && !!slots[`${item.slot}-body`]" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
|
|
63
|
-
<slot :name="item.slot || 'content'" :item="item" :index="index" :open="open">
|
|
64
|
-
<div :class="ui.body({ class: [props.ui?.body, item.ui?.body] })">
|
|
65
|
-
<slot :name="item.slot ? `${item.slot}-body` : 'body'" :item="item" :index="index" :open="open">
|
|
66
|
-
{{ item.content }}
|
|
67
|
-
</slot>
|
|
68
|
-
</div>
|
|
69
|
-
</slot>
|
|
70
|
-
</AccordionContent>
|
|
71
|
-
</AccordionItem>
|
|
72
|
-
</AccordionRoot>
|
|
37
|
+
<AccordionRoot v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
38
|
+
<AccordionItem
|
|
39
|
+
v-for="(item, index) in props.items"
|
|
40
|
+
v-slot="{ open }"
|
|
41
|
+
:key="index"
|
|
42
|
+
:value="item.value || String(index)"
|
|
43
|
+
:disabled="item.disabled"
|
|
44
|
+
:class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
|
|
45
|
+
>
|
|
46
|
+
<AccordionHeader as="div" :class="ui.header({ class: [props.ui?.header, item.ui?.header] })">
|
|
47
|
+
<AccordionTrigger :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger], disabled: item.disabled })">
|
|
48
|
+
<slot name="leading" :item="item" :index="index" :open="open">
|
|
49
|
+
<UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, item?.ui?.leadingIcon] })" />
|
|
50
|
+
</slot>
|
|
51
|
+
|
|
52
|
+
<span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: [props.ui?.label, item.ui?.label] })">
|
|
53
|
+
<slot :item="item" :index="index" :open="open">{{ get(item, props.labelKey) }}</slot>
|
|
54
|
+
</span>
|
|
55
|
+
|
|
56
|
+
<slot name="trailing" :item="item" :index="index" :open="open">
|
|
57
|
+
<UIcon :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: [props.ui?.trailingIcon, item.ui?.trailingIcon] })" />
|
|
58
|
+
</slot>
|
|
59
|
+
</AccordionTrigger>
|
|
60
|
+
</AccordionHeader>
|
|
61
|
+
|
|
62
|
+
<AccordionContent v-if="item.content || !!slots.content || item.slot && !!slots[item.slot] || !!slots.body || item.slot && !!slots[`${item.slot}-body`]" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
|
|
63
|
+
<slot :name="item.slot || 'content'" :item="item" :index="index" :open="open">
|
|
64
|
+
<div :class="ui.body({ class: [props.ui?.body, item.ui?.body] })">
|
|
65
|
+
<slot :name="item.slot ? `${item.slot}-body` : 'body'" :item="item" :index="index" :open="open">
|
|
66
|
+
{{ item.content }}
|
|
67
|
+
</slot>
|
|
68
|
+
</div>
|
|
69
|
+
</slot>
|
|
70
|
+
</AccordionContent>
|
|
71
|
+
</AccordionItem>
|
|
72
|
+
</AccordionRoot>
|
|
73
73
|
</template>
|
|
@@ -39,50 +39,50 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.alert || {} }
|
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
41
|
<template>
|
|
42
|
-
<Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
43
|
-
<slot name="leading">
|
|
44
|
-
<UAvatar v-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
45
|
-
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
46
|
-
</slot>
|
|
47
|
-
|
|
48
|
-
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
49
|
-
<div v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
50
|
-
<slot name="title">
|
|
51
|
-
{{ title }}
|
|
52
|
-
</slot>
|
|
53
|
-
</div>
|
|
54
|
-
<div v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
55
|
-
<slot name="description">
|
|
56
|
-
{{ description }}
|
|
57
|
-
</slot>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" :class="ui.actions({ class: props.ui?.actions })">
|
|
61
|
-
<slot name="actions">
|
|
62
|
-
<UButton v-for="(action, index) in actions" :key="index" size="xs" v-bind="action" />
|
|
63
|
-
</slot>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" :class="ui.actions({ class: props.ui?.actions, orientation: 'horizontal' })">
|
|
68
|
-
<template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
|
|
69
|
-
<slot name="actions">
|
|
70
|
-
<UButton v-for="(action, index) in actions" :key="index" size="xs" v-bind="action" />
|
|
71
|
-
</slot>
|
|
72
|
-
</template>
|
|
73
|
-
|
|
74
|
-
<slot name="close" :ui="ui">
|
|
75
|
-
<UButton
|
|
76
|
-
v-if="close"
|
|
77
|
-
:icon="closeIcon || appConfig.ui.icons.close"
|
|
78
|
-
color="neutral"
|
|
79
|
-
variant="link"
|
|
80
|
-
:aria-label="t('alert.close')"
|
|
81
|
-
v-bind="typeof close === 'object' ? close : {}"
|
|
82
|
-
:class="ui.close({ class: props.ui?.close })"
|
|
83
|
-
@click="emits('update:open', false)"
|
|
84
|
-
/>
|
|
85
|
-
</slot>
|
|
86
|
-
</div>
|
|
87
|
-
</Primitive>
|
|
42
|
+
<Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
43
|
+
<slot name="leading">
|
|
44
|
+
<UAvatar v-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
45
|
+
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
46
|
+
</slot>
|
|
47
|
+
|
|
48
|
+
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
49
|
+
<div v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
50
|
+
<slot name="title">
|
|
51
|
+
{{ title }}
|
|
52
|
+
</slot>
|
|
53
|
+
</div>
|
|
54
|
+
<div v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
55
|
+
<slot name="description">
|
|
56
|
+
{{ description }}
|
|
57
|
+
</slot>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" :class="ui.actions({ class: props.ui?.actions })">
|
|
61
|
+
<slot name="actions">
|
|
62
|
+
<UButton v-for="(action, index) in actions" :key="index" size="xs" v-bind="action" />
|
|
63
|
+
</slot>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" :class="ui.actions({ class: props.ui?.actions, orientation: 'horizontal' })">
|
|
68
|
+
<template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
|
|
69
|
+
<slot name="actions">
|
|
70
|
+
<UButton v-for="(action, index) in actions" :key="index" size="xs" v-bind="action" />
|
|
71
|
+
</slot>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<slot name="close" :ui="ui">
|
|
75
|
+
<UButton
|
|
76
|
+
v-if="close"
|
|
77
|
+
:icon="closeIcon || appConfig.ui.icons.close"
|
|
78
|
+
color="neutral"
|
|
79
|
+
variant="link"
|
|
80
|
+
:aria-label="t('alert.close')"
|
|
81
|
+
v-bind="typeof close === 'object' ? close : {}"
|
|
82
|
+
:class="ui.close({ class: props.ui?.close })"
|
|
83
|
+
@click="emits('update:open', false)"
|
|
84
|
+
/>
|
|
85
|
+
</slot>
|
|
86
|
+
</div>
|
|
87
|
+
</Primitive>
|
|
88
88
|
</template>
|
|
@@ -31,14 +31,14 @@ provide(portalTargetInjectionKey, portal);
|
|
|
31
31
|
</script>
|
|
32
32
|
|
|
33
33
|
<template>
|
|
34
|
-
<ConfigProvider :use-id="() => useId()" :dir="locale?.dir" :locale="locale?.code" v-bind="configProviderProps">
|
|
35
|
-
<TooltipProvider v-bind="tooltipProps">
|
|
36
|
-
<UToaster v-if="toaster !== null" v-bind="toasterProps">
|
|
37
|
-
<slot />
|
|
38
|
-
</UToaster>
|
|
39
|
-
<slot v-else />
|
|
40
|
-
|
|
41
|
-
<UOverlayProvider />
|
|
42
|
-
</TooltipProvider>
|
|
43
|
-
</ConfigProvider>
|
|
34
|
+
<ConfigProvider :use-id="() => useId()" :dir="locale?.dir" :locale="locale?.code" v-bind="configProviderProps">
|
|
35
|
+
<TooltipProvider v-bind="tooltipProps">
|
|
36
|
+
<UToaster v-if="toaster !== null" v-bind="toasterProps">
|
|
37
|
+
<slot />
|
|
38
|
+
</UToaster>
|
|
39
|
+
<slot v-else />
|
|
40
|
+
|
|
41
|
+
<UOverlayProvider />
|
|
42
|
+
</TooltipProvider>
|
|
43
|
+
</ConfigProvider>
|
|
44
44
|
</template>
|
|
@@ -53,31 +53,31 @@ function onError() {
|
|
|
53
53
|
</script>
|
|
54
54
|
|
|
55
55
|
<template>
|
|
56
|
-
<component
|
|
57
|
-
:is="props.chip ? UChip : Primitive"
|
|
58
|
-
:as="as"
|
|
59
|
-
v-bind="props.chip ? typeof props.chip === 'object' ? { inset: true, ...props.chip } : { inset: true } : {}"
|
|
60
|
-
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
61
|
-
:style="props.style"
|
|
62
|
-
>
|
|
63
|
-
<component
|
|
64
|
-
:is="ImageComponent"
|
|
65
|
-
v-if="src && !error"
|
|
66
|
-
role="img"
|
|
67
|
-
:src="src"
|
|
68
|
-
:alt="alt"
|
|
69
|
-
:width="sizePx"
|
|
70
|
-
:height="sizePx"
|
|
71
|
-
v-bind="$attrs"
|
|
72
|
-
:class="ui.image({ class: props.ui?.image })"
|
|
73
|
-
@error="onError"
|
|
74
|
-
/>
|
|
75
|
-
|
|
76
|
-
<Slot v-else v-bind="$attrs">
|
|
77
|
-
<slot>
|
|
78
|
-
<UIcon v-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
79
|
-
<span v-else :class="ui.fallback({ class: props.ui?.fallback })">{{ fallback || "\xA0" }}</span>
|
|
80
|
-
</slot>
|
|
81
|
-
</Slot>
|
|
82
|
-
</component>
|
|
56
|
+
<component
|
|
57
|
+
:is="props.chip ? UChip : Primitive"
|
|
58
|
+
:as="as"
|
|
59
|
+
v-bind="props.chip ? typeof props.chip === 'object' ? { inset: true, ...props.chip } : { inset: true } : {}"
|
|
60
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
61
|
+
:style="props.style"
|
|
62
|
+
>
|
|
63
|
+
<component
|
|
64
|
+
:is="ImageComponent"
|
|
65
|
+
v-if="src && !error"
|
|
66
|
+
role="img"
|
|
67
|
+
:src="src"
|
|
68
|
+
:alt="alt"
|
|
69
|
+
:width="sizePx"
|
|
70
|
+
:height="sizePx"
|
|
71
|
+
v-bind="$attrs"
|
|
72
|
+
:class="ui.image({ class: props.ui?.image })"
|
|
73
|
+
@error="onError"
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<Slot v-else v-bind="$attrs">
|
|
77
|
+
<slot>
|
|
78
|
+
<UIcon v-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
79
|
+
<span v-else :class="ui.fallback({ class: props.ui?.fallback })">{{ fallback || "\xA0" }}</span>
|
|
80
|
+
</slot>
|
|
81
|
+
</Slot>
|
|
82
|
+
</component>
|
|
83
83
|
</template>
|
|
@@ -58,8 +58,8 @@ provide(avatarGroupInjectionKey, computed(() => ({
|
|
|
58
58
|
</script>
|
|
59
59
|
|
|
60
60
|
<template>
|
|
61
|
-
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
62
|
-
<UAvatar v-if="hiddenCount > 0" :text="`+${hiddenCount}`" :class="ui.base({ class: props.ui?.base })" />
|
|
63
|
-
<component :is="avatar" v-for="(avatar, count) in visibleAvatars" :key="count" :class="ui.base({ class: props.ui?.base })" />
|
|
64
|
-
</Primitive>
|
|
61
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
62
|
+
<UAvatar v-if="hiddenCount > 0" :text="`+${hiddenCount}`" :class="ui.base({ class: props.ui?.base })" />
|
|
63
|
+
<component :is="avatar" v-for="(avatar, count) in visibleAvatars" :key="count" :class="ui.base({ class: props.ui?.base })" />
|
|
64
|
+
</Primitive>
|
|
65
65
|
</template>
|
|
@@ -41,20 +41,20 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.badge || {} }
|
|
|
41
41
|
</script>
|
|
42
42
|
|
|
43
43
|
<template>
|
|
44
|
-
<Primitive :as="as" :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
45
|
-
<slot name="leading">
|
|
46
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
47
|
-
<UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
|
|
48
|
-
</slot>
|
|
49
|
-
|
|
50
|
-
<slot>
|
|
51
|
-
<span v-if="label !== void 0 && label !== null" :class="ui.label({ class: props.ui?.label })">
|
|
52
|
-
{{ label }}
|
|
53
|
-
</span>
|
|
54
|
-
</slot>
|
|
55
|
-
|
|
56
|
-
<slot name="trailing">
|
|
57
|
-
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
58
|
-
</slot>
|
|
59
|
-
</Primitive>
|
|
44
|
+
<Primitive :as="as" :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
45
|
+
<slot name="leading">
|
|
46
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
47
|
+
<UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
|
|
48
|
+
</slot>
|
|
49
|
+
|
|
50
|
+
<slot>
|
|
51
|
+
<span v-if="label !== void 0 && label !== null" :class="ui.label({ class: props.ui?.label })">
|
|
52
|
+
{{ label }}
|
|
53
|
+
</span>
|
|
54
|
+
</slot>
|
|
55
|
+
|
|
56
|
+
<slot name="trailing">
|
|
57
|
+
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
58
|
+
</slot>
|
|
59
|
+
</Primitive>
|
|
60
60
|
</template>
|
|
@@ -30,36 +30,36 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.breadcrumb ||
|
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<template>
|
|
33
|
-
<Primitive :as="as" aria-label="breadcrumb" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
34
|
-
<ol :class="ui.list({ class: props.ui?.list })">
|
|
35
|
-
<template v-for="(item, index) in items" :key="index">
|
|
36
|
-
<li :class="ui.item({ class: [props.ui?.item, item.ui?.item] })">
|
|
37
|
-
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
38
|
-
<ULinkBase v-bind="slotProps" as="span" :aria-current="active && index === items.length - 1 ? 'page' : void 0" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: index === items.length - 1, disabled: !!item.disabled, to: !!item.to })">
|
|
39
|
-
<slot :name="item.slot || 'item'" :item="item" :index="index">
|
|
40
|
-
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="index === items.length - 1" :index="index">
|
|
41
|
-
<UIcon v-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active: index === items.length - 1 })" />
|
|
42
|
-
<UAvatar v-else-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active: index === items.length - 1 })" />
|
|
43
|
-
</slot>
|
|
44
|
-
|
|
45
|
-
<span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
|
|
46
|
-
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="index === items.length - 1" :index="index">
|
|
47
|
-
{{ get(item, props.labelKey) }}
|
|
48
|
-
</slot>
|
|
49
|
-
</span>
|
|
50
|
-
|
|
51
|
-
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="index === items.length - 1" :index="index" />
|
|
52
|
-
</slot>
|
|
53
|
-
</ULinkBase>
|
|
54
|
-
</ULink>
|
|
55
|
-
</li>
|
|
56
|
-
|
|
57
|
-
<li v-if="index < items.length - 1" role="presentation" aria-hidden="true" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })">
|
|
58
|
-
<slot name="separator">
|
|
59
|
-
<UIcon :name="separatorIcon" :class="ui.separatorIcon({ class: [props.ui?.separatorIcon, item.ui?.separatorIcon] })" />
|
|
60
|
-
</slot>
|
|
61
|
-
</li>
|
|
62
|
-
</template>
|
|
63
|
-
</ol>
|
|
64
|
-
</Primitive>
|
|
33
|
+
<Primitive :as="as" aria-label="breadcrumb" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
34
|
+
<ol :class="ui.list({ class: props.ui?.list })">
|
|
35
|
+
<template v-for="(item, index) in items" :key="index">
|
|
36
|
+
<li :class="ui.item({ class: [props.ui?.item, item.ui?.item] })">
|
|
37
|
+
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
38
|
+
<ULinkBase v-bind="slotProps" as="span" :aria-current="active && index === items.length - 1 ? 'page' : void 0" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: index === items.length - 1, disabled: !!item.disabled, to: !!item.to })">
|
|
39
|
+
<slot :name="item.slot || 'item'" :item="item" :index="index">
|
|
40
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="index === items.length - 1" :index="index">
|
|
41
|
+
<UIcon v-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active: index === items.length - 1 })" />
|
|
42
|
+
<UAvatar v-else-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active: index === items.length - 1 })" />
|
|
43
|
+
</slot>
|
|
44
|
+
|
|
45
|
+
<span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
|
|
46
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="index === items.length - 1" :index="index">
|
|
47
|
+
{{ get(item, props.labelKey) }}
|
|
48
|
+
</slot>
|
|
49
|
+
</span>
|
|
50
|
+
|
|
51
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="index === items.length - 1" :index="index" />
|
|
52
|
+
</slot>
|
|
53
|
+
</ULinkBase>
|
|
54
|
+
</ULink>
|
|
55
|
+
</li>
|
|
56
|
+
|
|
57
|
+
<li v-if="index < items.length - 1" role="presentation" aria-hidden="true" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })">
|
|
58
|
+
<slot name="separator">
|
|
59
|
+
<UIcon :name="separatorIcon" :class="ui.separatorIcon({ class: [props.ui?.separatorIcon, item.ui?.separatorIcon] })" />
|
|
60
|
+
</slot>
|
|
61
|
+
</li>
|
|
62
|
+
</template>
|
|
63
|
+
</ol>
|
|
64
|
+
</Primitive>
|
|
65
65
|
</template>
|
|
@@ -111,37 +111,37 @@ const ui = computed(() => tv({
|
|
|
111
111
|
</script>
|
|
112
112
|
|
|
113
113
|
<template>
|
|
114
|
-
<ULink
|
|
115
|
-
v-slot="{ active, ...slotProps }"
|
|
116
|
-
:type="type"
|
|
117
|
-
:disabled="disabled || isLoading"
|
|
118
|
-
v-bind="omit(linkProps, ['type', 'disabled', 'onClick'])"
|
|
119
|
-
custom
|
|
120
|
-
>
|
|
121
|
-
<ULinkBase
|
|
122
|
-
v-bind="slotProps"
|
|
114
|
+
<ULink
|
|
115
|
+
v-slot="{ active, ...slotProps }"
|
|
116
|
+
:type="type"
|
|
117
|
+
:disabled="disabled || isLoading"
|
|
118
|
+
v-bind="omit(linkProps, ['type', 'disabled', 'onClick'])"
|
|
119
|
+
custom
|
|
120
|
+
>
|
|
121
|
+
<ULinkBase
|
|
122
|
+
v-bind="slotProps"
|
|
123
123
|
:class="ui.base({
|
|
124
124
|
class: [props.ui?.base, props.class],
|
|
125
125
|
active,
|
|
126
126
|
...active && activeVariant ? { variant: activeVariant } : {},
|
|
127
127
|
...active && activeColor ? { color: activeColor } : {}
|
|
128
|
-
})"
|
|
129
|
-
@click="onClickWrapper"
|
|
130
|
-
>
|
|
131
|
-
<slot name="leading">
|
|
132
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon, active })" />
|
|
133
|
-
<UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar, active })" />
|
|
134
|
-
</slot>
|
|
135
|
-
|
|
136
|
-
<slot>
|
|
137
|
-
<span v-if="label !== void 0 && label !== null" :class="ui.label({ class: props.ui?.label, active })">
|
|
138
|
-
{{ label }}
|
|
139
|
-
</span>
|
|
140
|
-
</slot>
|
|
141
|
-
|
|
142
|
-
<slot name="trailing">
|
|
143
|
-
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon, active })" />
|
|
144
|
-
</slot>
|
|
145
|
-
</ULinkBase>
|
|
146
|
-
</ULink>
|
|
128
|
+
})"
|
|
129
|
+
@click="onClickWrapper"
|
|
130
|
+
>
|
|
131
|
+
<slot name="leading">
|
|
132
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon, active })" />
|
|
133
|
+
<UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar, active })" />
|
|
134
|
+
</slot>
|
|
135
|
+
|
|
136
|
+
<slot>
|
|
137
|
+
<span v-if="label !== void 0 && label !== null" :class="ui.label({ class: props.ui?.label, active })">
|
|
138
|
+
{{ label }}
|
|
139
|
+
</span>
|
|
140
|
+
</slot>
|
|
141
|
+
|
|
142
|
+
<slot name="trailing">
|
|
143
|
+
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon, active })" />
|
|
144
|
+
</slot>
|
|
145
|
+
</ULinkBase>
|
|
146
|
+
</ULink>
|
|
147
147
|
</template>
|
|
@@ -25,7 +25,7 @@ provide(buttonGroupInjectionKey, computed(() => ({
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
|
-
<Primitive :as="as" :class="ui({ orientation, class: props.class })">
|
|
29
|
-
<slot />
|
|
30
|
-
</Primitive>
|
|
28
|
+
<Primitive :as="as" :class="ui({ orientation, class: props.class })">
|
|
29
|
+
<slot />
|
|
30
|
+
</Primitive>
|
|
31
31
|
</template>
|
|
@@ -77,78 +77,78 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
|
|
|
77
77
|
</script>
|
|
78
78
|
|
|
79
79
|
<template>
|
|
80
|
-
<Calendar.Root
|
|
81
|
-
v-slot="{ weekDays, grid }"
|
|
82
|
-
v-bind="rootProps"
|
|
83
|
-
:model-value="modelValue"
|
|
84
|
-
:default-value="defaultValue"
|
|
85
|
-
:locale="locale"
|
|
86
|
-
:dir="dir"
|
|
87
|
-
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
88
|
-
>
|
|
89
|
-
<Calendar.Header :class="ui.header({ class: props.ui?.header })">
|
|
90
|
-
<Calendar.Prev v-if="props.yearControls" :prev-page="(date) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
|
|
91
|
-
<UButton :icon="prevYearIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.prevYear" />
|
|
92
|
-
</Calendar.Prev>
|
|
93
|
-
<Calendar.Prev v-if="props.monthControls" :aria-label="t('calendar.prevMonth')" as-child>
|
|
94
|
-
<UButton :icon="prevMonthIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.prevMonth" />
|
|
95
|
-
</Calendar.Prev>
|
|
96
|
-
<Calendar.Heading v-slot="{ headingValue }" :class="ui.heading({ class: props.ui?.heading })">
|
|
97
|
-
<slot name="heading" :value="headingValue">
|
|
98
|
-
{{ headingValue }}
|
|
99
|
-
</slot>
|
|
100
|
-
</Calendar.Heading>
|
|
101
|
-
<Calendar.Next v-if="props.monthControls" :aria-label="t('calendar.nextMonth')" as-child>
|
|
102
|
-
<UButton :icon="nextMonthIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.nextMonth" />
|
|
103
|
-
</Calendar.Next>
|
|
104
|
-
<Calendar.Next v-if="props.yearControls" :next-page="(date) => paginateYear(date, 1)" :aria-label="t('calendar.nextYear')" as-child>
|
|
105
|
-
<UButton :icon="nextYearIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.nextYear" />
|
|
106
|
-
</Calendar.Next>
|
|
107
|
-
</Calendar.Header>
|
|
108
|
-
<div :class="ui.body({ class: props.ui?.body })">
|
|
109
|
-
<Calendar.Grid
|
|
110
|
-
v-for="month in grid"
|
|
111
|
-
:key="month.value.toString()"
|
|
112
|
-
:class="ui.grid({ class: props.ui?.grid })"
|
|
113
|
-
>
|
|
114
|
-
<Calendar.GridHead>
|
|
115
|
-
<Calendar.GridRow :class="ui.gridWeekDaysRow({ class: props.ui?.gridWeekDaysRow })">
|
|
116
|
-
<Calendar.HeadCell
|
|
117
|
-
v-for="day in weekDays"
|
|
118
|
-
:key="day"
|
|
119
|
-
:class="ui.headCell({ class: props.ui?.headCell })"
|
|
120
|
-
>
|
|
121
|
-
<slot name="week-day" :day="day">
|
|
122
|
-
{{ day }}
|
|
123
|
-
</slot>
|
|
124
|
-
</Calendar.HeadCell>
|
|
125
|
-
</Calendar.GridRow>
|
|
126
|
-
</Calendar.GridHead>
|
|
127
|
-
<Calendar.GridBody :class="ui.gridBody({ class: props.ui?.gridBody })">
|
|
128
|
-
<Calendar.GridRow
|
|
129
|
-
v-for="(weekDates, index) in month.rows"
|
|
130
|
-
:key="`weekDate-${index}`"
|
|
131
|
-
:class="ui.gridRow({ class: props.ui?.gridRow })"
|
|
132
|
-
>
|
|
133
|
-
<Calendar.Cell
|
|
134
|
-
v-for="weekDate in weekDates"
|
|
135
|
-
:key="weekDate.toString()"
|
|
136
|
-
:date="weekDate"
|
|
137
|
-
:class="ui.cell({ class: props.ui?.cell })"
|
|
138
|
-
>
|
|
139
|
-
<Calendar.CellTrigger
|
|
140
|
-
:day="weekDate"
|
|
141
|
-
:month="month.value"
|
|
142
|
-
:class="ui.cellTrigger({ class: props.ui?.cellTrigger })"
|
|
143
|
-
>
|
|
144
|
-
<slot name="day" :day="weekDate">
|
|
145
|
-
{{ weekDate.day }}
|
|
146
|
-
</slot>
|
|
147
|
-
</Calendar.CellTrigger>
|
|
148
|
-
</Calendar.Cell>
|
|
149
|
-
</Calendar.GridRow>
|
|
150
|
-
</Calendar.GridBody>
|
|
151
|
-
</Calendar.Grid>
|
|
152
|
-
</div>
|
|
153
|
-
</Calendar.Root>
|
|
80
|
+
<Calendar.Root
|
|
81
|
+
v-slot="{ weekDays, grid }"
|
|
82
|
+
v-bind="rootProps"
|
|
83
|
+
:model-value="modelValue"
|
|
84
|
+
:default-value="defaultValue"
|
|
85
|
+
:locale="locale"
|
|
86
|
+
:dir="dir"
|
|
87
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
88
|
+
>
|
|
89
|
+
<Calendar.Header :class="ui.header({ class: props.ui?.header })">
|
|
90
|
+
<Calendar.Prev v-if="props.yearControls" :prev-page="(date) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
|
|
91
|
+
<UButton :icon="prevYearIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.prevYear" />
|
|
92
|
+
</Calendar.Prev>
|
|
93
|
+
<Calendar.Prev v-if="props.monthControls" :aria-label="t('calendar.prevMonth')" as-child>
|
|
94
|
+
<UButton :icon="prevMonthIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.prevMonth" />
|
|
95
|
+
</Calendar.Prev>
|
|
96
|
+
<Calendar.Heading v-slot="{ headingValue }" :class="ui.heading({ class: props.ui?.heading })">
|
|
97
|
+
<slot name="heading" :value="headingValue">
|
|
98
|
+
{{ headingValue }}
|
|
99
|
+
</slot>
|
|
100
|
+
</Calendar.Heading>
|
|
101
|
+
<Calendar.Next v-if="props.monthControls" :aria-label="t('calendar.nextMonth')" as-child>
|
|
102
|
+
<UButton :icon="nextMonthIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.nextMonth" />
|
|
103
|
+
</Calendar.Next>
|
|
104
|
+
<Calendar.Next v-if="props.yearControls" :next-page="(date) => paginateYear(date, 1)" :aria-label="t('calendar.nextYear')" as-child>
|
|
105
|
+
<UButton :icon="nextYearIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.nextYear" />
|
|
106
|
+
</Calendar.Next>
|
|
107
|
+
</Calendar.Header>
|
|
108
|
+
<div :class="ui.body({ class: props.ui?.body })">
|
|
109
|
+
<Calendar.Grid
|
|
110
|
+
v-for="month in grid"
|
|
111
|
+
:key="month.value.toString()"
|
|
112
|
+
:class="ui.grid({ class: props.ui?.grid })"
|
|
113
|
+
>
|
|
114
|
+
<Calendar.GridHead>
|
|
115
|
+
<Calendar.GridRow :class="ui.gridWeekDaysRow({ class: props.ui?.gridWeekDaysRow })">
|
|
116
|
+
<Calendar.HeadCell
|
|
117
|
+
v-for="day in weekDays"
|
|
118
|
+
:key="day"
|
|
119
|
+
:class="ui.headCell({ class: props.ui?.headCell })"
|
|
120
|
+
>
|
|
121
|
+
<slot name="week-day" :day="day">
|
|
122
|
+
{{ day }}
|
|
123
|
+
</slot>
|
|
124
|
+
</Calendar.HeadCell>
|
|
125
|
+
</Calendar.GridRow>
|
|
126
|
+
</Calendar.GridHead>
|
|
127
|
+
<Calendar.GridBody :class="ui.gridBody({ class: props.ui?.gridBody })">
|
|
128
|
+
<Calendar.GridRow
|
|
129
|
+
v-for="(weekDates, index) in month.rows"
|
|
130
|
+
:key="`weekDate-${index}`"
|
|
131
|
+
:class="ui.gridRow({ class: props.ui?.gridRow })"
|
|
132
|
+
>
|
|
133
|
+
<Calendar.Cell
|
|
134
|
+
v-for="weekDate in weekDates"
|
|
135
|
+
:key="weekDate.toString()"
|
|
136
|
+
:date="weekDate"
|
|
137
|
+
:class="ui.cell({ class: props.ui?.cell })"
|
|
138
|
+
>
|
|
139
|
+
<Calendar.CellTrigger
|
|
140
|
+
:day="weekDate"
|
|
141
|
+
:month="month.value"
|
|
142
|
+
:class="ui.cellTrigger({ class: props.ui?.cellTrigger })"
|
|
143
|
+
>
|
|
144
|
+
<slot name="day" :day="weekDate">
|
|
145
|
+
{{ weekDate.day }}
|
|
146
|
+
</slot>
|
|
147
|
+
</Calendar.CellTrigger>
|
|
148
|
+
</Calendar.Cell>
|
|
149
|
+
</Calendar.GridRow>
|
|
150
|
+
</Calendar.GridBody>
|
|
151
|
+
</Calendar.Grid>
|
|
152
|
+
</div>
|
|
153
|
+
</Calendar.Root>
|
|
154
154
|
</template>
|