@nuxt/ui 4.7.0 → 4.8.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.css → ui.static.css} +0 -10
- package/LICENSE.md +1 -1
- package/cli/commands/make/component.mjs +6 -2
- package/cli/templates.mjs +46 -20
- package/cli/utils.mjs +19 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -4
- package/dist/runtime/components/Accordion.vue +15 -14
- package/dist/runtime/components/Alert.vue +20 -20
- package/dist/runtime/components/AuthForm.vue +37 -37
- package/dist/runtime/components/Avatar.d.vue.ts +4 -0
- package/dist/runtime/components/Avatar.vue +14 -12
- package/dist/runtime/components/Avatar.vue.d.ts +4 -0
- package/dist/runtime/components/AvatarGroup.d.vue.ts +4 -0
- package/dist/runtime/components/AvatarGroup.vue +11 -8
- package/dist/runtime/components/AvatarGroup.vue.d.ts +4 -0
- package/dist/runtime/components/Badge.vue +11 -11
- package/dist/runtime/components/Banner.vue +25 -23
- package/dist/runtime/components/BlogPost.d.vue.ts +1 -1
- package/dist/runtime/components/BlogPost.vue +30 -28
- package/dist/runtime/components/BlogPost.vue.d.ts +1 -1
- package/dist/runtime/components/BlogPosts.vue +6 -6
- package/dist/runtime/components/Breadcrumb.d.vue.ts +4 -0
- package/dist/runtime/components/Breadcrumb.vue +21 -18
- package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -0
- package/dist/runtime/components/Button.vue +17 -16
- package/dist/runtime/components/Calendar.vue +21 -20
- package/dist/runtime/components/Card.vue +11 -11
- package/dist/runtime/components/Carousel.vue +23 -22
- package/dist/runtime/components/ChangelogVersion.vue +31 -29
- package/dist/runtime/components/ChangelogVersions.vue +8 -8
- package/dist/runtime/components/ChatMessage.d.vue.ts +6 -0
- package/dist/runtime/components/ChatMessage.vue +46 -36
- package/dist/runtime/components/ChatMessage.vue.d.ts +6 -0
- package/dist/runtime/components/ChatMessages.vue +14 -14
- package/dist/runtime/components/ChatPalette.vue +6 -6
- package/dist/runtime/components/ChatPrompt.d.vue.ts +7 -0
- package/dist/runtime/components/ChatPrompt.vue +22 -12
- package/dist/runtime/components/ChatPrompt.vue.d.ts +7 -0
- package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +3 -3
- package/dist/runtime/components/ChatPromptSubmit.vue +6 -6
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +3 -3
- package/dist/runtime/components/ChatReasoning.vue +20 -20
- package/dist/runtime/components/ChatShimmer.vue +7 -7
- package/dist/runtime/components/ChatTool.d.vue.ts +1 -1
- package/dist/runtime/components/ChatTool.vue +19 -19
- package/dist/runtime/components/ChatTool.vue.d.ts +1 -1
- package/dist/runtime/components/Checkbox.d.vue.ts +2 -0
- package/dist/runtime/components/Checkbox.vue +25 -24
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -0
- package/dist/runtime/components/CheckboxGroup.d.vue.ts +1 -1
- package/dist/runtime/components/CheckboxGroup.vue +17 -14
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Chip.vue +8 -8
- package/dist/runtime/components/Collapsible.vue +8 -7
- package/dist/runtime/components/ColorPicker.d.vue.ts +2 -0
- package/dist/runtime/components/ColorPicker.vue +10 -10
- package/dist/runtime/components/ColorPicker.vue.d.ts +2 -0
- package/dist/runtime/components/CommandPalette.d.vue.ts +5 -5
- package/dist/runtime/components/CommandPalette.vue +92 -69
- package/dist/runtime/components/CommandPalette.vue.d.ts +5 -5
- package/dist/runtime/components/Container.vue +4 -4
- package/dist/runtime/components/ContextMenu.vue +16 -15
- package/dist/runtime/components/DashboardGroup.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardGroup.vue +6 -4
- package/dist/runtime/components/DashboardGroup.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardNavbar.vue +16 -16
- package/dist/runtime/components/DashboardPanel.vue +7 -7
- package/dist/runtime/components/DashboardResizeHandle.vue +5 -5
- package/dist/runtime/components/DashboardSearch.d.vue.ts +16 -1
- package/dist/runtime/components/DashboardSearch.vue +13 -11
- package/dist/runtime/components/DashboardSearch.vue.d.ts +16 -1
- package/dist/runtime/components/DashboardSearchButton.d.vue.ts +2 -2
- package/dist/runtime/components/DashboardSearchButton.vue +15 -15
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +2 -2
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardSidebar.vue +22 -22
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardSidebarCollapse.vue +5 -5
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.vue +5 -5
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardToolbar.vue +6 -6
- package/dist/runtime/components/Drawer.d.vue.ts +1 -1
- package/dist/runtime/components/Drawer.vue +23 -22
- package/dist/runtime/components/Drawer.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenu.vue +21 -20
- package/dist/runtime/components/Editor.vue +8 -7
- package/dist/runtime/components/EditorDragHandle.d.vue.ts +2 -2
- package/dist/runtime/components/EditorDragHandle.vue +8 -8
- package/dist/runtime/components/EditorDragHandle.vue.d.ts +2 -2
- package/dist/runtime/components/EditorToolbar.vue +10 -9
- package/dist/runtime/components/Empty.vue +14 -14
- package/dist/runtime/components/Error.d.vue.ts +9 -1
- package/dist/runtime/components/Error.vue +17 -10
- package/dist/runtime/components/Error.vue.d.ts +9 -1
- package/dist/runtime/components/FieldGroup.vue +4 -4
- package/dist/runtime/components/FileUpload.vue +36 -37
- package/dist/runtime/components/Footer.vue +10 -10
- package/dist/runtime/components/FooterColumns.vue +15 -15
- package/dist/runtime/components/Form.d.vue.ts +1 -1
- package/dist/runtime/components/Form.vue +5 -5
- package/dist/runtime/components/Form.vue.d.ts +1 -1
- package/dist/runtime/components/FormField.d.vue.ts +2 -1
- package/dist/runtime/components/FormField.vue +21 -21
- package/dist/runtime/components/FormField.vue.d.ts +2 -1
- package/dist/runtime/components/Header.vue +19 -19
- package/dist/runtime/components/Input.vue +19 -19
- package/dist/runtime/components/InputDate.vue +21 -20
- package/dist/runtime/components/InputMenu.d.vue.ts +52 -51
- package/dist/runtime/components/InputMenu.vue +66 -63
- package/dist/runtime/components/InputMenu.vue.d.ts +52 -51
- package/dist/runtime/components/InputNumber.vue +25 -24
- package/dist/runtime/components/InputTags.vue +26 -25
- package/dist/runtime/components/InputTime.vue +21 -20
- package/dist/runtime/components/Kbd.vue +5 -5
- package/dist/runtime/components/Link.d.vue.ts +11 -2
- package/dist/runtime/components/Link.vue +13 -4
- package/dist/runtime/components/Link.vue.d.ts +11 -2
- package/dist/runtime/components/Listbox.d.vue.ts +13 -9
- package/dist/runtime/components/Listbox.vue +34 -32
- package/dist/runtime/components/Listbox.vue.d.ts +13 -9
- package/dist/runtime/components/Main.vue +4 -4
- package/dist/runtime/components/Marquee.vue +5 -5
- package/dist/runtime/components/Modal.d.vue.ts +2 -2
- package/dist/runtime/components/Modal.vue +25 -24
- package/dist/runtime/components/Modal.vue.d.ts +2 -2
- package/dist/runtime/components/NavigationMenu.vue +66 -65
- package/dist/runtime/components/Page.vue +7 -7
- package/dist/runtime/components/PageAnchors.vue +11 -11
- package/dist/runtime/components/PageAside.vue +9 -9
- package/dist/runtime/components/PageBody.vue +4 -4
- package/dist/runtime/components/PageCTA.vue +18 -16
- package/dist/runtime/components/PageCard.vue +25 -23
- package/dist/runtime/components/PageColumns.vue +4 -4
- package/dist/runtime/components/PageFeature.vue +17 -15
- package/dist/runtime/components/PageGrid.vue +4 -4
- package/dist/runtime/components/PageHeader.vue +14 -14
- package/dist/runtime/components/PageHero.vue +20 -18
- package/dist/runtime/components/PageLinks.vue +12 -12
- package/dist/runtime/components/PageList.vue +4 -4
- package/dist/runtime/components/PageLogos.vue +16 -16
- package/dist/runtime/components/PageSection.d.vue.ts +1 -1
- package/dist/runtime/components/PageSection.vue +24 -22
- package/dist/runtime/components/PageSection.vue.d.ts +1 -1
- package/dist/runtime/components/Pagination.d.vue.ts +2 -2
- package/dist/runtime/components/Pagination.vue +23 -22
- package/dist/runtime/components/Pagination.vue.d.ts +2 -2
- package/dist/runtime/components/PinInput.vue +15 -14
- package/dist/runtime/components/Popover.vue +9 -8
- package/dist/runtime/components/PricingPlan.vue +36 -36
- package/dist/runtime/components/PricingPlans.vue +6 -6
- package/dist/runtime/components/PricingTable.vue +44 -44
- package/dist/runtime/components/Progress.d.vue.ts +1 -1
- package/dist/runtime/components/Progress.vue +12 -11
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/RadioGroup.d.vue.ts +2 -0
- package/dist/runtime/components/RadioGroup.vue +28 -27
- package/dist/runtime/components/RadioGroup.vue.d.ts +2 -0
- package/dist/runtime/components/ScrollArea.vue +13 -13
- package/dist/runtime/components/Select.vue +38 -40
- package/dist/runtime/components/SelectMenu.d.vue.ts +46 -46
- package/dist/runtime/components/SelectMenu.vue +49 -48
- package/dist/runtime/components/SelectMenu.vue.d.ts +46 -46
- package/dist/runtime/components/Separator.d.vue.ts +9 -3
- package/dist/runtime/components/Separator.vue +29 -16
- package/dist/runtime/components/Separator.vue.d.ts +9 -3
- package/dist/runtime/components/Sidebar.vue +28 -28
- package/dist/runtime/components/Skeleton.vue +5 -5
- package/dist/runtime/components/Slideover.d.vue.ts +3 -3
- package/dist/runtime/components/Slideover.vue +24 -23
- package/dist/runtime/components/Slideover.vue.d.ts +3 -3
- package/dist/runtime/components/Slider.vue +16 -15
- package/dist/runtime/components/Stepper.vue +19 -18
- package/dist/runtime/components/Switch.d.vue.ts +2 -0
- package/dist/runtime/components/Switch.vue +26 -23
- package/dist/runtime/components/Switch.vue.d.ts +2 -0
- package/dist/runtime/components/Table.vue +26 -25
- package/dist/runtime/components/Tabs.vue +22 -21
- package/dist/runtime/components/Textarea.vue +19 -18
- package/dist/runtime/components/Theme.d.vue.ts +13 -5
- package/dist/runtime/components/Theme.vue +32 -4
- package/dist/runtime/components/Theme.vue.d.ts +13 -5
- package/dist/runtime/components/Timeline.vue +15 -15
- package/dist/runtime/components/Toast.vue +35 -34
- package/dist/runtime/components/Toaster.d.vue.ts +1 -1
- package/dist/runtime/components/Toaster.vue +10 -9
- package/dist/runtime/components/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/Tooltip.vue +13 -12
- package/dist/runtime/components/Tree.vue +24 -23
- package/dist/runtime/components/User.vue +23 -21
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +5 -2
- package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeButton.vue +8 -6
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeImage.vue +4 -2
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +1 -0
- package/dist/runtime/components/content/ContentNavigation.vue +31 -30
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +30 -3
- package/dist/runtime/components/content/ContentSearch.vue +66 -32
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +30 -3
- package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +2 -2
- package/dist/runtime/components/content/ContentSearchButton.vue +15 -15
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +2 -2
- package/dist/runtime/components/content/ContentSurround.vue +14 -12
- package/dist/runtime/components/content/ContentToc.vue +34 -33
- package/dist/runtime/components/prose/A.vue +4 -4
- package/dist/runtime/components/prose/Accordion.vue +4 -4
- package/dist/runtime/components/prose/AccordionItem.vue +5 -5
- package/dist/runtime/components/prose/Badge.vue +4 -4
- package/dist/runtime/components/prose/Blockquote.vue +4 -4
- package/dist/runtime/components/prose/Callout.vue +8 -8
- package/dist/runtime/components/prose/Card.vue +12 -12
- package/dist/runtime/components/prose/CardGroup.vue +4 -4
- package/dist/runtime/components/prose/Code.vue +4 -4
- package/dist/runtime/components/prose/CodeCollapse.vue +8 -8
- package/dist/runtime/components/prose/CodeGroup.vue +9 -9
- package/dist/runtime/components/prose/CodePreview.vue +6 -6
- package/dist/runtime/components/prose/CodeTree.vue +14 -14
- package/dist/runtime/components/prose/Collapsible.vue +7 -7
- package/dist/runtime/components/prose/Em.vue +4 -4
- package/dist/runtime/components/prose/Field.vue +13 -13
- package/dist/runtime/components/prose/FieldGroup.vue +4 -4
- package/dist/runtime/components/prose/H1.vue +5 -5
- package/dist/runtime/components/prose/H2.vue +7 -7
- package/dist/runtime/components/prose/H3.vue +7 -7
- package/dist/runtime/components/prose/H4.vue +5 -5
- package/dist/runtime/components/prose/Hr.vue +4 -4
- package/dist/runtime/components/prose/Icon.vue +4 -4
- package/dist/runtime/components/prose/Img.vue +17 -12
- package/dist/runtime/components/prose/Kbd.d.vue.ts +10 -2
- package/dist/runtime/components/prose/Kbd.vue +8 -5
- package/dist/runtime/components/prose/Kbd.vue.d.ts +10 -2
- package/dist/runtime/components/prose/Li.vue +4 -4
- package/dist/runtime/components/prose/Ol.vue +4 -4
- package/dist/runtime/components/prose/P.vue +4 -4
- package/dist/runtime/components/prose/Pre.vue +9 -9
- package/dist/runtime/components/prose/Prompt.vue +12 -12
- package/dist/runtime/components/prose/Steps.vue +4 -4
- package/dist/runtime/components/prose/Strong.vue +4 -4
- package/dist/runtime/components/prose/Table.vue +5 -5
- package/dist/runtime/components/prose/Tabs.vue +4 -4
- package/dist/runtime/components/prose/TabsItem.vue +5 -5
- package/dist/runtime/components/prose/Tbody.vue +4 -4
- package/dist/runtime/components/prose/Td.vue +4 -4
- package/dist/runtime/components/prose/Th.vue +4 -4
- package/dist/runtime/components/prose/Thead.vue +4 -4
- package/dist/runtime/components/prose/Tr.vue +4 -4
- package/dist/runtime/components/prose/Ul.vue +4 -4
- package/dist/runtime/composables/defineShortcuts.js +7 -2
- package/dist/runtime/composables/index.d.ts +1 -2
- package/dist/runtime/composables/index.js +1 -2
- package/dist/runtime/composables/useAvatarGroup.d.ts +12 -1
- package/dist/runtime/composables/useAvatarGroup.js +4 -2
- package/dist/runtime/composables/useComponentIcons.js +1 -1
- package/dist/runtime/composables/useComponentProps.d.ts +180 -0
- package/dist/runtime/composables/useComponentProps.js +59 -0
- package/dist/runtime/composables/useContentSearch.d.ts +4 -2
- package/dist/runtime/composables/useContentSearch.js +64 -7
- package/dist/runtime/composables/useFieldGroup.d.ts +9 -1
- package/dist/runtime/composables/useFormField.d.ts +21 -1
- package/dist/runtime/composables/useForwardProps.d.ts +13 -0
- package/dist/runtime/composables/useForwardProps.js +14 -0
- package/dist/runtime/composables/usePrefix.d.ts +6 -0
- package/dist/runtime/composables/usePrefix.js +11 -0
- package/dist/runtime/composables/useResizable.d.ts +4 -0
- package/dist/runtime/composables/useResizable.js +1 -1
- package/dist/runtime/locale/ar.js +1 -0
- package/dist/runtime/locale/az.js +1 -0
- package/dist/runtime/locale/be.js +1 -0
- package/dist/runtime/locale/bg.js +1 -0
- package/dist/runtime/locale/bn.js +1 -0
- package/dist/runtime/locale/ca.js +1 -0
- package/dist/runtime/locale/ckb.js +1 -0
- package/dist/runtime/locale/cs.js +1 -0
- package/dist/runtime/locale/da.js +1 -0
- package/dist/runtime/locale/de.js +1 -0
- package/dist/runtime/locale/de_ch.js +1 -0
- package/dist/runtime/locale/el.js +1 -0
- package/dist/runtime/locale/en.js +1 -0
- package/dist/runtime/locale/es.js +1 -0
- package/dist/runtime/locale/et.js +1 -0
- package/dist/runtime/locale/eu.js +1 -0
- package/dist/runtime/locale/fa_ir.js +1 -0
- package/dist/runtime/locale/fi.js +1 -0
- package/dist/runtime/locale/fr.js +1 -0
- package/dist/runtime/locale/gl.js +1 -0
- package/dist/runtime/locale/he.js +1 -0
- package/dist/runtime/locale/hi.js +1 -0
- package/dist/runtime/locale/hr.js +1 -0
- package/dist/runtime/locale/hu.js +1 -0
- package/dist/runtime/locale/hy.js +1 -0
- package/dist/runtime/locale/id.js +1 -0
- package/dist/runtime/locale/is.js +1 -0
- package/dist/runtime/locale/it.js +1 -0
- package/dist/runtime/locale/ja.js +1 -0
- package/dist/runtime/locale/ka.js +1 -0
- package/dist/runtime/locale/kk.js +1 -0
- package/dist/runtime/locale/km.js +1 -0
- package/dist/runtime/locale/ko.js +1 -0
- package/dist/runtime/locale/ky.js +1 -0
- package/dist/runtime/locale/lb.js +1 -0
- package/dist/runtime/locale/lo.js +1 -0
- package/dist/runtime/locale/lt.js +1 -0
- package/dist/runtime/locale/mn.js +1 -0
- package/dist/runtime/locale/ms.js +1 -0
- package/dist/runtime/locale/nb_no.js +1 -0
- package/dist/runtime/locale/nl.js +1 -0
- package/dist/runtime/locale/pl.js +1 -0
- package/dist/runtime/locale/pt.js +1 -0
- package/dist/runtime/locale/pt_br.js +1 -0
- package/dist/runtime/locale/ro.js +1 -0
- package/dist/runtime/locale/ru.js +1 -0
- package/dist/runtime/locale/sk.js +1 -0
- package/dist/runtime/locale/sl.js +1 -0
- package/dist/runtime/locale/sq.js +1 -0
- package/dist/runtime/locale/sv.js +1 -0
- package/dist/runtime/locale/th.js +1 -0
- package/dist/runtime/locale/tj.js +1 -0
- package/dist/runtime/locale/tr.js +1 -0
- package/dist/runtime/locale/ug_cn.js +1 -0
- package/dist/runtime/locale/uk.js +1 -0
- package/dist/runtime/locale/ur.js +1 -0
- package/dist/runtime/locale/uz.js +1 -0
- package/dist/runtime/locale/vi.js +1 -0
- package/dist/runtime/locale/zh_cn.js +1 -0
- package/dist/runtime/locale/zh_tw.js +1 -0
- package/dist/runtime/plugins/colors.js +1 -1
- package/dist/runtime/types/content.d.ts +1 -0
- package/dist/runtime/types/content.js +1 -0
- package/dist/runtime/types/form.d.ts +2 -2
- package/dist/runtime/types/locale.d.ts +1 -0
- package/dist/runtime/utils/dashboard.d.ts +1 -1
- package/dist/runtime/utils/link.d.ts +1 -1
- package/dist/runtime/utils/link.js +1 -0
- package/dist/runtime/utils/{fuse.d.ts → search.d.ts} +2 -1
- package/dist/runtime/utils/{fuse.js → search.js} +11 -2
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +1 -0
- package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +1 -1
- package/dist/runtime/vue/overrides/inertia/Link.vue +5 -0
- package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/overrides/none/Link.d.vue.ts +1 -1
- package/dist/runtime/vue/overrides/none/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +1 -1
- package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +1 -1
- package/dist/shared/{ui.BIQuJqNV.mjs → ui.CoJ8bnb0.mjs} +244 -83
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +27 -34
- package/dist/runtime/composables/useComponentUI.d.ts +0 -33
- package/dist/runtime/composables/useComponentUI.js +0 -13
- package/dist/runtime/composables/useResolvedVariants.d.ts +0 -21
- package/dist/runtime/composables/useResolvedVariants.js +0 -14
|
@@ -6,27 +6,27 @@ import theme from "#build/ui/dashboard-toolbar";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
10
10
|
import { tv } from "../utils/tv";
|
|
11
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
as: { type: null, required: false },
|
|
13
13
|
class: { type: null, required: false },
|
|
14
14
|
ui: { type: Object, required: false }
|
|
15
15
|
});
|
|
16
16
|
defineSlots();
|
|
17
|
+
const props = useComponentProps("dashboardToolbar", _props);
|
|
17
18
|
const appConfig = useAppConfig();
|
|
18
|
-
const uiProp = useComponentUI("dashboardToolbar", props);
|
|
19
19
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardToolbar || {} })());
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
23
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
24
24
|
<slot>
|
|
25
|
-
<div data-slot="left" :class="ui.left({ class: [
|
|
25
|
+
<div data-slot="left" :class="ui.left({ class: [props.ui?.left] })">
|
|
26
26
|
<slot name="left" />
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
<div data-slot="right" :class="ui.right({ class: [
|
|
29
|
+
<div data-slot="right" :class="ui.right({ class: [props.ui?.right] })">
|
|
30
30
|
<slot name="right" />
|
|
31
31
|
</div>
|
|
32
32
|
</slot>
|
|
@@ -75,9 +75,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Drawer
|
|
|
75
75
|
"onUpdate:activeSnapPoint"?: ((val: string | number) => any) | undefined;
|
|
76
76
|
onAnimationEnd?: ((open: boolean) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
-
overlay: boolean;
|
|
79
78
|
modal: boolean;
|
|
80
79
|
portal: boolean | string | HTMLElement;
|
|
80
|
+
overlay: boolean;
|
|
81
81
|
direction: import("vaul-vue").DrawerDirection;
|
|
82
82
|
handle: boolean;
|
|
83
83
|
dismissible: boolean;
|
|
@@ -4,16 +4,17 @@ import theme from "#build/ui/drawer";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, toRef } from "vue";
|
|
7
|
-
import { VisuallyHidden
|
|
7
|
+
import { VisuallyHidden } from "reka-ui";
|
|
8
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
8
9
|
import { DrawerRoot, DrawerRootNested, DrawerTrigger, DrawerPortal, DrawerOverlay, DrawerContent, DrawerTitle, DrawerDescription, DrawerHandle } from "vaul-vue";
|
|
9
10
|
import { reactivePick } from "@vueuse/core";
|
|
10
11
|
import { useAppConfig } from "#imports";
|
|
11
|
-
import {
|
|
12
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
13
|
import { FieldGroupReset } from "../composables/useFieldGroup";
|
|
13
14
|
import { usePortal } from "../composables/usePortal";
|
|
14
15
|
import { pointerDownOutside } from "../utils/overlay";
|
|
15
16
|
import { tv } from "../utils/tv";
|
|
16
|
-
const
|
|
17
|
+
const _props = defineProps({
|
|
17
18
|
as: { type: null, required: false },
|
|
18
19
|
title: { type: String, required: false },
|
|
19
20
|
description: { type: String, required: false },
|
|
@@ -43,9 +44,9 @@ const props = defineProps({
|
|
|
43
44
|
});
|
|
44
45
|
const emits = defineEmits(["close:prevent", "drag", "release", "close", "update:open", "update:activeSnapPoint", "animationEnd"]);
|
|
45
46
|
const slots = defineSlots();
|
|
47
|
+
const props = useComponentProps("drawer", _props);
|
|
46
48
|
const appConfig = useAppConfig();
|
|
47
|
-
const
|
|
48
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, "activeSnapPoint", "closeThreshold", "shouldScaleBackground", "setBackgroundColorOnScale", "scrollLockTimeout", "fixed", "dismissible", "modal", "open", "defaultOpen", "nested", "direction", "noBodyStyles", "handleOnly", "preventScrollRestoration", "snapPoints"), emits);
|
|
49
|
+
const rootProps = useForwardProps(reactivePick(props, "activeSnapPoint", "closeThreshold", "shouldScaleBackground", "setBackgroundColorOnScale", "scrollLockTimeout", "fixed", "dismissible", "modal", "open", "defaultOpen", "nested", "direction", "noBodyStyles", "handleOnly", "preventScrollRestoration", "snapPoints"), emits);
|
|
49
50
|
const portalProps = usePortal(toRef(() => props.portal));
|
|
50
51
|
const contentProps = toRef(() => props.content);
|
|
51
52
|
const contentEvents = computed(() => {
|
|
@@ -71,57 +72,57 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.drawer || {}
|
|
|
71
72
|
</script>
|
|
72
73
|
|
|
73
74
|
<template>
|
|
74
|
-
<component :is="nested ? DrawerRootNested : DrawerRoot" v-bind="rootProps">
|
|
75
|
+
<component :is="props.nested ? DrawerRootNested : DrawerRoot" v-bind="rootProps">
|
|
75
76
|
<DrawerTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
76
77
|
<slot />
|
|
77
78
|
</DrawerTrigger>
|
|
78
79
|
|
|
79
80
|
<DrawerPortal v-bind="portalProps">
|
|
80
81
|
<FieldGroupReset>
|
|
81
|
-
<DrawerOverlay v-if="overlay" data-slot="overlay" :class="ui.overlay({ class:
|
|
82
|
+
<DrawerOverlay v-if="props.overlay" data-slot="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
|
|
82
83
|
|
|
83
|
-
<DrawerContent data-slot="content" :class="ui.content({ class: [!slots.default && props.class,
|
|
84
|
-
<DrawerHandle v-if="handle" data-slot="handle" :class="ui.handle({ class:
|
|
84
|
+
<DrawerContent data-slot="content" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-bind="contentProps" v-on="contentEvents">
|
|
85
|
+
<DrawerHandle v-if="props.handle" data-slot="handle" :class="ui.handle({ class: props.ui?.handle })" />
|
|
85
86
|
|
|
86
|
-
<VisuallyHidden v-if="!title && !slots.title || !description && !slots.description || !!slots.content">
|
|
87
|
-
<DrawerTitle v-if="!title && !slots.title" />
|
|
87
|
+
<VisuallyHidden v-if="!props.title && !slots.title || !props.description && !slots.description || !!slots.content">
|
|
88
|
+
<DrawerTitle v-if="!props.title && !slots.title" />
|
|
88
89
|
<DrawerTitle v-else-if="!!slots.content">
|
|
89
90
|
<slot name="title">
|
|
90
|
-
{{ title }}
|
|
91
|
+
{{ props.title }}
|
|
91
92
|
</slot>
|
|
92
93
|
</DrawerTitle>
|
|
93
94
|
|
|
94
|
-
<DrawerDescription v-if="!description && !slots.description" />
|
|
95
|
+
<DrawerDescription v-if="!props.description && !slots.description" />
|
|
95
96
|
<DrawerDescription v-else-if="!!slots.content">
|
|
96
97
|
<slot name="description">
|
|
97
|
-
{{ description }}
|
|
98
|
+
{{ props.description }}
|
|
98
99
|
</slot>
|
|
99
100
|
</DrawerDescription>
|
|
100
101
|
</VisuallyHidden>
|
|
101
102
|
|
|
102
103
|
<slot name="content">
|
|
103
|
-
<div data-slot="container" :class="ui.container({ class:
|
|
104
|
-
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description)" data-slot="header" :class="ui.header({ class:
|
|
104
|
+
<div data-slot="container" :class="ui.container({ class: props.ui?.container })">
|
|
105
|
+
<div v-if="!!slots.header || (props.title || !!slots.title) || (props.description || !!slots.description)" data-slot="header" :class="ui.header({ class: props.ui?.header })">
|
|
105
106
|
<slot name="header">
|
|
106
|
-
<DrawerTitle v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class:
|
|
107
|
+
<DrawerTitle v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
|
|
107
108
|
<slot name="title">
|
|
108
|
-
{{ title }}
|
|
109
|
+
{{ props.title }}
|
|
109
110
|
</slot>
|
|
110
111
|
</DrawerTitle>
|
|
111
112
|
|
|
112
|
-
<DrawerDescription v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class:
|
|
113
|
+
<DrawerDescription v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
|
|
113
114
|
<slot name="description">
|
|
114
|
-
{{ description }}
|
|
115
|
+
{{ props.description }}
|
|
115
116
|
</slot>
|
|
116
117
|
</DrawerDescription>
|
|
117
118
|
</slot>
|
|
118
119
|
</div>
|
|
119
120
|
|
|
120
|
-
<div v-if="!!slots.body" data-slot="body" :class="ui.body({ class:
|
|
121
|
+
<div v-if="!!slots.body" data-slot="body" :class="ui.body({ class: props.ui?.body })">
|
|
121
122
|
<slot name="body" />
|
|
122
123
|
</div>
|
|
123
124
|
|
|
124
|
-
<div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class:
|
|
125
|
+
<div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
125
126
|
<slot name="footer" />
|
|
126
127
|
</div>
|
|
127
128
|
</div>
|
|
@@ -75,9 +75,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Drawer
|
|
|
75
75
|
"onUpdate:activeSnapPoint"?: ((val: string | number) => any) | undefined;
|
|
76
76
|
onAnimationEnd?: ((open: boolean) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
-
overlay: boolean;
|
|
79
78
|
modal: boolean;
|
|
80
79
|
portal: boolean | string | HTMLElement;
|
|
80
|
+
overlay: boolean;
|
|
81
81
|
direction: import("vaul-vue").DrawerDirection;
|
|
82
82
|
handle: boolean;
|
|
83
83
|
dismissible: boolean;
|
|
@@ -5,14 +5,15 @@ import theme from "#build/ui/dropdown-menu";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, toRef } from "vue";
|
|
7
7
|
import { defu } from "defu";
|
|
8
|
-
import { DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuArrow
|
|
8
|
+
import { DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuArrow } from "reka-ui";
|
|
9
9
|
import { reactivePick } from "@vueuse/core";
|
|
10
10
|
import { useAppConfig } from "#imports";
|
|
11
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
12
13
|
import { omit } from "../utils";
|
|
13
14
|
import { tv } from "../utils/tv";
|
|
14
15
|
import UDropdownMenuContent from "./DropdownMenuContent.vue";
|
|
15
|
-
const
|
|
16
|
+
const _props = defineProps({
|
|
16
17
|
size: { type: null, required: false },
|
|
17
18
|
items: { type: null, required: false },
|
|
18
19
|
checkedIcon: { type: null, required: false },
|
|
@@ -36,9 +37,9 @@ const props = defineProps({
|
|
|
36
37
|
const emits = defineEmits(["update:open"]);
|
|
37
38
|
const slots = defineSlots();
|
|
38
39
|
const searchTerm = defineModel("searchTerm", { type: String, ...{ default: "" } });
|
|
40
|
+
const props = useComponentProps("dropdownMenu", _props);
|
|
39
41
|
const appConfig = useAppConfig();
|
|
40
|
-
const
|
|
41
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, "defaultOpen", "open", "modal"), emits);
|
|
42
|
+
const rootProps = useForwardProps(reactivePick(props, "defaultOpen", "open", "modal"), emits);
|
|
42
43
|
const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8 }));
|
|
43
44
|
const arrowProps = toRef(() => defu(props.arrow, { rounded: true }));
|
|
44
45
|
const getProxySlots = () => omit(slots, ["default"]);
|
|
@@ -49,33 +50,33 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dropdownMenu
|
|
|
49
50
|
|
|
50
51
|
<template>
|
|
51
52
|
<DropdownMenuRoot v-slot="{ open }" v-bind="rootProps">
|
|
52
|
-
<DropdownMenuTrigger v-if="!!slots.default" as-child :class="props.class" :disabled="disabled">
|
|
53
|
+
<DropdownMenuTrigger v-if="!!slots.default" as-child :class="props.class" :disabled="props.disabled">
|
|
53
54
|
<slot :open="open" />
|
|
54
55
|
</DropdownMenuTrigger>
|
|
55
56
|
|
|
56
57
|
<UDropdownMenuContent
|
|
57
58
|
v-model:search-term="searchTerm"
|
|
58
|
-
:class="ui.content({ class: [!slots.default && props.class,
|
|
59
|
+
:class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })"
|
|
59
60
|
:ui="ui"
|
|
60
|
-
:ui-override="
|
|
61
|
+
:ui-override="props.ui"
|
|
61
62
|
v-bind="contentProps"
|
|
62
|
-
:items="items"
|
|
63
|
-
:portal="portal"
|
|
64
|
-
:label-key="labelKey"
|
|
65
|
-
:description-key="descriptionKey"
|
|
66
|
-
:checked-icon="checkedIcon"
|
|
67
|
-
:loading-icon="loadingIcon"
|
|
68
|
-
:external-icon="externalIcon"
|
|
69
|
-
:size="size"
|
|
70
|
-
:filter="filter"
|
|
71
|
-
:filter-fields="filterFields"
|
|
72
|
-
:ignore-filter="ignoreFilter"
|
|
63
|
+
:items="props.items"
|
|
64
|
+
:portal="props.portal"
|
|
65
|
+
:label-key="props.labelKey"
|
|
66
|
+
:description-key="props.descriptionKey"
|
|
67
|
+
:checked-icon="props.checkedIcon"
|
|
68
|
+
:loading-icon="props.loadingIcon"
|
|
69
|
+
:external-icon="props.externalIcon"
|
|
70
|
+
:size="props.size"
|
|
71
|
+
:filter="props.filter"
|
|
72
|
+
:filter-fields="props.filterFields"
|
|
73
|
+
:ignore-filter="props.ignoreFilter"
|
|
73
74
|
>
|
|
74
75
|
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
|
|
75
76
|
<slot :name="name" v-bind="slotData" />
|
|
76
77
|
</template>
|
|
77
78
|
|
|
78
|
-
<DropdownMenuArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class:
|
|
79
|
+
<DropdownMenuArrow v-if="!!props.arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
79
80
|
</UDropdownMenuContent>
|
|
80
81
|
</DropdownMenuRoot>
|
|
81
82
|
</template>
|
|
@@ -5,7 +5,7 @@ import theme from "#build/ui/editor";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, provide, useAttrs, watch } from "vue";
|
|
7
7
|
import { defu } from "defu";
|
|
8
|
-
import { Primitive
|
|
8
|
+
import { Primitive } from "reka-ui";
|
|
9
9
|
import { mergeAttributes } from "@tiptap/core";
|
|
10
10
|
import Code from "@tiptap/extension-code";
|
|
11
11
|
import HorizontalRule from "@tiptap/extension-horizontal-rule";
|
|
@@ -17,11 +17,12 @@ import StarterKit from "@tiptap/starter-kit";
|
|
|
17
17
|
import { useEditor, EditorContent } from "@tiptap/vue-3";
|
|
18
18
|
import { reactiveOmit } from "@vueuse/core";
|
|
19
19
|
import { useAppConfig } from "#imports";
|
|
20
|
-
import {
|
|
20
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
21
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
21
22
|
import { createHandlers } from "../utils/editor";
|
|
22
23
|
import { tv } from "../utils/tv";
|
|
23
24
|
defineOptions({ inheritAttrs: false });
|
|
24
|
-
const
|
|
25
|
+
const _props = defineProps({
|
|
25
26
|
as: { type: null, required: false },
|
|
26
27
|
modelValue: { type: null, required: false },
|
|
27
28
|
contentType: { type: String, required: false },
|
|
@@ -65,9 +66,9 @@ const props = defineProps({
|
|
|
65
66
|
});
|
|
66
67
|
const emits = defineEmits(["update:modelValue"]);
|
|
67
68
|
defineSlots();
|
|
69
|
+
const props = useComponentProps("editor", _props);
|
|
68
70
|
const attrs = useAttrs();
|
|
69
71
|
const appConfig = useAppConfig();
|
|
70
|
-
const uiProp = useComponentUI("editor", props);
|
|
71
72
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.editor || {} })({
|
|
72
73
|
placeholderMode: typeof props.placeholder === "object" ? props.placeholder.mode : void 0
|
|
73
74
|
}));
|
|
@@ -78,7 +79,7 @@ const editorProps = computed(() => defu(props.editorProps, {
|
|
|
78
79
|
autocorrect: "off",
|
|
79
80
|
autocapitalize: "off",
|
|
80
81
|
...attrs,
|
|
81
|
-
class: ui.value.base({ class:
|
|
82
|
+
class: ui.value.base({ class: props.ui?.base })
|
|
82
83
|
}
|
|
83
84
|
}));
|
|
84
85
|
const contentType = computed(() => props.contentType || (typeof props.modelValue === "string" ? "html" : "json"));
|
|
@@ -196,7 +197,7 @@ defineExpose({
|
|
|
196
197
|
</script>
|
|
197
198
|
|
|
198
199
|
<template>
|
|
199
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
200
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
200
201
|
<template v-if="editor">
|
|
201
202
|
<slot :editor="editor" :handlers="handlers" />
|
|
202
203
|
|
|
@@ -204,7 +205,7 @@ defineExpose({
|
|
|
204
205
|
role="presentation"
|
|
205
206
|
:editor="editor"
|
|
206
207
|
data-slot="content"
|
|
207
|
-
:class="ui.content({ class:
|
|
208
|
+
:class="ui.content({ class: props.ui?.content })"
|
|
208
209
|
/>
|
|
209
210
|
</template>
|
|
210
211
|
</Primitive>
|
|
@@ -70,8 +70,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Editor
|
|
|
70
70
|
pos: number;
|
|
71
71
|
}) => any) | undefined;
|
|
72
72
|
}>, {
|
|
73
|
-
size: "
|
|
74
|
-
color: "error" | "primary" | "secondary" | "success" | "info" | "warning"
|
|
73
|
+
size: "md" | "xs" | "sm" | "lg" | "xl";
|
|
74
|
+
color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
|
|
75
75
|
variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
76
76
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EditorDragHandleSlots>;
|
|
77
77
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -5,17 +5,17 @@ import theme from "#build/ui/editor-drag-handle";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, ref } from "vue";
|
|
7
7
|
import DragHandle from "@tiptap/extension-drag-handle-vue-3";
|
|
8
|
-
import { useForwardProps } from "reka-ui";
|
|
9
8
|
import { reactiveOmit, reactivePick } from "@vueuse/core";
|
|
10
9
|
import { defu } from "defu";
|
|
11
10
|
import { useAppConfig } from "#imports";
|
|
12
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
13
13
|
import { buildFloatingUIMiddleware } from "../utils/editor";
|
|
14
14
|
import { transformUI } from "../utils";
|
|
15
15
|
import { tv } from "../utils/tv";
|
|
16
16
|
import UButton from "./Button.vue";
|
|
17
17
|
defineOptions({ inheritAttrs: false });
|
|
18
|
-
const
|
|
18
|
+
const _props = defineProps({
|
|
19
19
|
icon: { type: null, required: false },
|
|
20
20
|
color: { type: null, required: false, default: "neutral" },
|
|
21
21
|
variant: { type: null, required: false, default: "ghost" },
|
|
@@ -52,10 +52,10 @@ const props = defineProps({
|
|
|
52
52
|
});
|
|
53
53
|
defineSlots();
|
|
54
54
|
const emit = defineEmits(["nodeChange", "hover"]);
|
|
55
|
+
const props = useComponentProps("editorDragHandle", _props);
|
|
55
56
|
const dragHandleProps = useForwardProps(reactivePick(props, "pluginKey", "nested", "nestedOptions", "onElementDragEnd", "onElementDragStart", "getReferencedVirtualElement"));
|
|
56
57
|
const buttonProps = useForwardProps(reactiveOmit(props, "icon", "options", "editor", "pluginKey", "nested", "nestedOptions", "onElementDragEnd", "onElementDragStart", "getReferencedVirtualElement", "class", "ui"));
|
|
57
58
|
const appConfig = useAppConfig();
|
|
58
|
-
const uiProp = useComponentUI("editorDragHandle", props);
|
|
59
59
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.editorDragHandle || {} })());
|
|
60
60
|
const floatingUIOptions = computed(() => defu(props.options, {
|
|
61
61
|
strategy: "absolute",
|
|
@@ -114,10 +114,10 @@ function onClick() {
|
|
|
114
114
|
<DragHandle
|
|
115
115
|
v-bind="dragHandleProps"
|
|
116
116
|
:compute-position-config="computePositionConfig"
|
|
117
|
-
:editor="editor"
|
|
117
|
+
:editor="props.editor"
|
|
118
118
|
:on-node-change="onNodeChange"
|
|
119
119
|
data-slot="root"
|
|
120
|
-
:class="ui.root({ class: [
|
|
120
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
121
121
|
@click="onClick"
|
|
122
122
|
>
|
|
123
123
|
<slot :ui="ui" :on-click="onClick">
|
|
@@ -128,8 +128,8 @@ function onClick() {
|
|
|
128
128
|
...$attrs
|
|
129
129
|
}"
|
|
130
130
|
data-slot="handle"
|
|
131
|
-
:class="ui.handle({ class: [
|
|
132
|
-
:ui="transformUI(ui,
|
|
131
|
+
:class="ui.handle({ class: [props.ui?.handle, props.class] })"
|
|
132
|
+
:ui="transformUI(ui, props.ui)"
|
|
133
133
|
/>
|
|
134
134
|
</slot>
|
|
135
135
|
</DragHandle>
|
|
@@ -70,8 +70,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Editor
|
|
|
70
70
|
pos: number;
|
|
71
71
|
}) => any) | undefined;
|
|
72
72
|
}>, {
|
|
73
|
-
size: "
|
|
74
|
-
color: "error" | "primary" | "secondary" | "success" | "info" | "warning"
|
|
73
|
+
size: "md" | "xs" | "sm" | "lg" | "xl";
|
|
74
|
+
color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
|
|
75
75
|
variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
76
76
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EditorDragHandleSlots>;
|
|
77
77
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -4,12 +4,13 @@ import theme from "#build/ui/editor-toolbar";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, inject } from "vue";
|
|
7
|
-
import { Primitive, Separator
|
|
7
|
+
import { Primitive, Separator } from "reka-ui";
|
|
8
8
|
import { defu } from "defu";
|
|
9
9
|
import { BubbleMenu, FloatingMenu } from "@tiptap/vue-3/menus";
|
|
10
10
|
import { reactiveOmit } from "@vueuse/core";
|
|
11
11
|
import { useAppConfig } from "#imports";
|
|
12
|
-
import {
|
|
12
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
13
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
13
14
|
import { isArrayOfArray, pick, omit } from "../utils";
|
|
14
15
|
import { createHandlers } from "../utils/editor";
|
|
15
16
|
import { tv } from "../utils/tv";
|
|
@@ -17,7 +18,7 @@ import UButton from "./Button.vue";
|
|
|
17
18
|
import UDropdownMenu from "./DropdownMenu.vue";
|
|
18
19
|
import UTooltip from "./Tooltip.vue";
|
|
19
20
|
defineOptions({ inheritAttrs: false });
|
|
20
|
-
const
|
|
21
|
+
const _props = defineProps({
|
|
21
22
|
as: { type: null, required: false },
|
|
22
23
|
color: { type: null, required: false, default: "neutral" },
|
|
23
24
|
variant: { type: null, required: false, default: "ghost" },
|
|
@@ -38,8 +39,8 @@ const props = defineProps({
|
|
|
38
39
|
options: { type: Object, required: false }
|
|
39
40
|
});
|
|
40
41
|
defineSlots();
|
|
42
|
+
const props = useComponentProps("editorToolbar", _props);
|
|
41
43
|
const appConfig = useAppConfig();
|
|
42
|
-
const uiProp = useComponentUI("editorToolbar", props);
|
|
43
44
|
const handlers = inject("editorHandlers", computed(() => createHandlers()));
|
|
44
45
|
const Component = computed(() => {
|
|
45
46
|
return {
|
|
@@ -177,9 +178,9 @@ function getDropdownItems(item) {
|
|
|
177
178
|
<Primitive
|
|
178
179
|
:as="Component"
|
|
179
180
|
v-bind="Component !== 'template' ? {
|
|
180
|
-
editor,
|
|
181
|
+
editor: props.editor,
|
|
181
182
|
tabindex: -1,
|
|
182
|
-
class: ui.root({ class:
|
|
183
|
+
class: ui.root({ class: props.ui?.root }),
|
|
183
184
|
...rootProps,
|
|
184
185
|
options,
|
|
185
186
|
...$attrs
|
|
@@ -187,9 +188,9 @@ function getDropdownItems(item) {
|
|
|
187
188
|
...$attrs
|
|
188
189
|
}"
|
|
189
190
|
>
|
|
190
|
-
<Primitive :as="as" role="toolbar" data-slot="base" :class="ui.base({ class: [
|
|
191
|
+
<Primitive :as="props.as" role="toolbar" data-slot="base" :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
191
192
|
<template v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`">
|
|
192
|
-
<div role="group" data-slot="group" :class="ui.group({ class:
|
|
193
|
+
<div role="group" data-slot="group" :class="ui.group({ class: props.ui?.group })">
|
|
193
194
|
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
194
195
|
<slot
|
|
195
196
|
:name="item.slot || 'item'"
|
|
@@ -236,7 +237,7 @@ function getDropdownItems(item) {
|
|
|
236
237
|
<Separator
|
|
237
238
|
v-if="groupIndex < groups.length - 1"
|
|
238
239
|
data-slot="separator"
|
|
239
|
-
:class="ui.separator({ class:
|
|
240
|
+
:class="ui.separator({ class: props.ui?.separator })"
|
|
240
241
|
orientation="vertical"
|
|
241
242
|
/>
|
|
242
243
|
</template>
|
|
@@ -6,11 +6,11 @@ import theme from "#build/ui/empty";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
10
10
|
import { tv } from "../utils/tv";
|
|
11
11
|
import UAvatar from "./Avatar.vue";
|
|
12
12
|
import UButton from "./Button.vue";
|
|
13
|
-
const
|
|
13
|
+
const _props = defineProps({
|
|
14
14
|
as: { type: null, required: false },
|
|
15
15
|
icon: { type: null, required: false },
|
|
16
16
|
avatar: { type: Object, required: false },
|
|
@@ -23,8 +23,8 @@ const props = defineProps({
|
|
|
23
23
|
ui: { type: Object, required: false }
|
|
24
24
|
});
|
|
25
25
|
const slots = defineSlots();
|
|
26
|
+
const props = useComponentProps("empty", _props);
|
|
26
27
|
const appConfig = useAppConfig();
|
|
27
|
-
const uiProp = useComponentUI("empty", props);
|
|
28
28
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.empty || {} })({
|
|
29
29
|
variant: props.variant,
|
|
30
30
|
size: props.size
|
|
@@ -32,38 +32,38 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.empty || {} }
|
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<template>
|
|
35
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
36
|
-
<div v-if="!!slots.header || (icon || avatar || !!slots.leading) || (title || !!slots.title) || (description || !!slots.description)" data-slot="header" :class="ui.header({ class:
|
|
35
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
36
|
+
<div v-if="!!slots.header || (props.icon || props.avatar || !!slots.leading) || (props.title || !!slots.title) || (props.description || !!slots.description)" data-slot="header" :class="ui.header({ class: props.ui?.header })">
|
|
37
37
|
<slot name="header">
|
|
38
38
|
<slot name="leading" :ui="ui">
|
|
39
|
-
<UAvatar v-if="icon || avatar" :icon="icon" v-bind="typeof avatar === 'object' ? avatar : {}" data-slot="avatar" :class="ui.avatar({ class:
|
|
39
|
+
<UAvatar v-if="props.icon || props.avatar" :icon="props.icon" v-bind="typeof props.avatar === 'object' ? props.avatar : {}" data-slot="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
40
40
|
</slot>
|
|
41
41
|
|
|
42
|
-
<h2 v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class:
|
|
42
|
+
<h2 v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
|
|
43
43
|
<slot name="title">
|
|
44
|
-
{{ title }}
|
|
44
|
+
{{ props.title }}
|
|
45
45
|
</slot>
|
|
46
46
|
</h2>
|
|
47
47
|
|
|
48
|
-
<div v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class:
|
|
48
|
+
<div v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
|
|
49
49
|
<slot name="description">
|
|
50
|
-
{{ description }}
|
|
50
|
+
{{ props.description }}
|
|
51
51
|
</slot>
|
|
52
52
|
</div>
|
|
53
53
|
</slot>
|
|
54
54
|
</div>
|
|
55
55
|
|
|
56
|
-
<div v-if="!!slots.body || (actions?.length || !!slots.actions)" data-slot="body" :class="ui.body({ class:
|
|
56
|
+
<div v-if="!!slots.body || (props.actions?.length || !!slots.actions)" data-slot="body" :class="ui.body({ class: props.ui?.body })">
|
|
57
57
|
<slot name="body">
|
|
58
|
-
<div v-if="actions?.length || !!slots.actions" data-slot="actions" :class="ui.actions({ class:
|
|
58
|
+
<div v-if="props.actions?.length || !!slots.actions" data-slot="actions" :class="ui.actions({ class: props.ui?.actions })">
|
|
59
59
|
<slot name="actions">
|
|
60
|
-
<UButton v-for="(action, index) in actions" :key="index" :size="size" v-bind="action" />
|
|
60
|
+
<UButton v-for="(action, index) in props.actions" :key="index" :size="props.size" v-bind="action" />
|
|
61
61
|
</slot>
|
|
62
62
|
</div>
|
|
63
63
|
</slot>
|
|
64
64
|
</div>
|
|
65
65
|
|
|
66
|
-
<div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class:
|
|
66
|
+
<div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
67
67
|
<slot name="footer" />
|
|
68
68
|
</div>
|
|
69
69
|
</Primitive>
|
|
@@ -2,7 +2,7 @@ import type { VNode } from 'vue';
|
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
3
|
import type { NuxtError } from '#app';
|
|
4
4
|
import theme from '#build/ui/error';
|
|
5
|
-
import type { ButtonProps } from '../types';
|
|
5
|
+
import type { ButtonProps, IconProps } from '../types';
|
|
6
6
|
import type { ComponentConfig } from '../types/tv';
|
|
7
7
|
type Error = ComponentConfig<typeof theme, AppConfig, 'error'>;
|
|
8
8
|
export interface ErrorProps {
|
|
@@ -11,6 +11,11 @@ export interface ErrorProps {
|
|
|
11
11
|
* @defaultValue 'main'
|
|
12
12
|
*/
|
|
13
13
|
as?: any;
|
|
14
|
+
/**
|
|
15
|
+
* The icon displayed above the status code.
|
|
16
|
+
* @IconifyIcon
|
|
17
|
+
*/
|
|
18
|
+
icon?: IconProps['name'];
|
|
14
19
|
error?: Partial<NuxtError & {
|
|
15
20
|
message: string;
|
|
16
21
|
}>;
|
|
@@ -30,6 +35,9 @@ export interface ErrorProps {
|
|
|
30
35
|
}
|
|
31
36
|
export interface ErrorSlots {
|
|
32
37
|
default?(props?: {}): VNode[];
|
|
38
|
+
leading?(props: {
|
|
39
|
+
ui: Error['ui'];
|
|
40
|
+
}): VNode[];
|
|
33
41
|
statusCode?(props?: {}): VNode[];
|
|
34
42
|
statusMessage?(props?: {}): VNode[];
|
|
35
43
|
message?(props?: {}): VNode[];
|
|
@@ -6,12 +6,14 @@ import theme from "#build/ui/error";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { clearError, useAppConfig } from "#imports";
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
10
10
|
import { useLocale } from "../composables/useLocale";
|
|
11
11
|
import { tv } from "../utils/tv";
|
|
12
12
|
import UButton from "./Button.vue";
|
|
13
|
-
|
|
13
|
+
import UIcon from "./Icon.vue";
|
|
14
|
+
const _props = defineProps({
|
|
14
15
|
as: { type: null, required: false, default: "main" },
|
|
16
|
+
icon: { type: null, required: false },
|
|
15
17
|
error: { type: Object, required: false },
|
|
16
18
|
redirect: { type: String, required: false, default: "/" },
|
|
17
19
|
clear: { type: [Boolean, Object], required: false, default: true },
|
|
@@ -19,9 +21,9 @@ const props = defineProps({
|
|
|
19
21
|
ui: { type: Object, required: false }
|
|
20
22
|
});
|
|
21
23
|
const slots = defineSlots();
|
|
24
|
+
const props = useComponentProps("error", _props);
|
|
22
25
|
const { t } = useLocale();
|
|
23
26
|
const appConfig = useAppConfig();
|
|
24
|
-
const uiProp = useComponentUI("error", props);
|
|
25
27
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.error || {} })());
|
|
26
28
|
function handleError() {
|
|
27
29
|
clearError({ redirect: props.redirect });
|
|
@@ -29,31 +31,36 @@ function handleError() {
|
|
|
29
31
|
</script>
|
|
30
32
|
|
|
31
33
|
<template>
|
|
32
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
33
|
-
<
|
|
34
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
35
|
+
<div v-if="props.icon || !!slots.leading" data-slot="leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
36
|
+
<slot name="leading" :ui="ui">
|
|
37
|
+
<UIcon v-if="props.icon" :name="props.icon" data-slot="leadingIcon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
38
|
+
</slot>
|
|
39
|
+
</div>
|
|
40
|
+
<p v-if="!!props.error?.statusCode || !!props.error?.status || !!slots.statusCode" data-slot="statusCode" :class="ui.statusCode({ class: props.ui?.statusCode })">
|
|
34
41
|
<slot name="statusCode">
|
|
35
42
|
{{ props.error?.statusCode || props.error?.status }}
|
|
36
43
|
</slot>
|
|
37
44
|
</p>
|
|
38
|
-
<h1 v-if="!!props.error?.statusMessage || !!props.error?.statusText || !!slots.statusMessage" data-slot="statusMessage" :class="ui.statusMessage({ class:
|
|
45
|
+
<h1 v-if="!!props.error?.statusMessage || !!props.error?.statusText || !!slots.statusMessage" data-slot="statusMessage" :class="ui.statusMessage({ class: props.ui?.statusMessage })">
|
|
39
46
|
<slot name="statusMessage">
|
|
40
47
|
{{ props.error?.statusMessage || props.error?.statusText }}
|
|
41
48
|
</slot>
|
|
42
49
|
</h1>
|
|
43
|
-
<p v-if="props.error?.message && props.error.message !== (props.error.statusMessage || props.error.statusText) || !!slots.message" data-slot="message" :class="ui.message({ class:
|
|
50
|
+
<p v-if="props.error?.message && props.error.message !== (props.error.statusMessage || props.error.statusText) || !!slots.message" data-slot="message" :class="ui.message({ class: props.ui?.message })">
|
|
44
51
|
<slot name="message">
|
|
45
52
|
{{ props.error?.message }}
|
|
46
53
|
</slot>
|
|
47
54
|
</p>
|
|
48
|
-
<div v-if="!!clear || !!slots.links" data-slot="links" :class="ui.links({ class:
|
|
55
|
+
<div v-if="!!props.clear || !!slots.links" data-slot="links" :class="ui.links({ class: props.ui?.links })">
|
|
49
56
|
<slot name="links">
|
|
50
57
|
<UButton
|
|
51
|
-
v-if="clear"
|
|
58
|
+
v-if="props.clear"
|
|
52
59
|
size="lg"
|
|
53
60
|
color="primary"
|
|
54
61
|
variant="solid"
|
|
55
62
|
:label="t('error.clear')"
|
|
56
|
-
v-bind="typeof clear === 'object' ? clear : {}"
|
|
63
|
+
v-bind="typeof props.clear === 'object' ? props.clear : {}"
|
|
57
64
|
@click="handleError"
|
|
58
65
|
/>
|
|
59
66
|
</slot>
|