@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
|
@@ -101,10 +101,10 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
|
|
|
101
101
|
</script>
|
|
102
102
|
|
|
103
103
|
<template>
|
|
104
|
-
<template v-if="!isExternal && !!to">
|
|
105
|
-
<RouterLink v-slot="{ href, navigate, route: linkRoute, isActive, isExactActive }" v-bind="routerLinkProps" :to="to" custom>
|
|
106
|
-
<template v-if="custom">
|
|
107
|
-
<slot
|
|
104
|
+
<template v-if="!isExternal && !!to">
|
|
105
|
+
<RouterLink v-slot="{ href, navigate, route: linkRoute, isActive, isExactActive }" v-bind="routerLinkProps" :to="to" custom>
|
|
106
|
+
<template v-if="custom">
|
|
107
|
+
<slot
|
|
108
108
|
v-bind="{
|
|
109
109
|
...$attrs,
|
|
110
110
|
...exact && isExactActive ? { 'aria-current': props.ariaCurrentValue } : {},
|
|
@@ -114,11 +114,11 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
|
|
|
114
114
|
href,
|
|
115
115
|
navigate,
|
|
116
116
|
active: isLinkActive({ route: linkRoute, isActive, isExactActive })
|
|
117
|
-
}"
|
|
118
|
-
/>
|
|
119
|
-
</template>
|
|
120
|
-
<ULinkBase
|
|
121
|
-
v-else
|
|
117
|
+
}"
|
|
118
|
+
/>
|
|
119
|
+
</template>
|
|
120
|
+
<ULinkBase
|
|
121
|
+
v-else
|
|
122
122
|
v-bind="{
|
|
123
123
|
...$attrs,
|
|
124
124
|
...exact && isExactActive ? { 'aria-current': props.ariaCurrentValue } : {},
|
|
@@ -127,17 +127,17 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
|
|
|
127
127
|
disabled,
|
|
128
128
|
href,
|
|
129
129
|
navigate
|
|
130
|
-
}"
|
|
131
|
-
:class="resolveLinkClass({ route: linkRoute, isActive, isExactActive })"
|
|
132
|
-
>
|
|
133
|
-
<slot :active="isLinkActive({ route: linkRoute, isActive, isExactActive })" />
|
|
134
|
-
</ULinkBase>
|
|
135
|
-
</RouterLink>
|
|
136
|
-
</template>
|
|
137
|
-
|
|
138
|
-
<template v-else>
|
|
139
|
-
<template v-if="custom">
|
|
140
|
-
<slot
|
|
130
|
+
}"
|
|
131
|
+
:class="resolveLinkClass({ route: linkRoute, isActive, isExactActive })"
|
|
132
|
+
>
|
|
133
|
+
<slot :active="isLinkActive({ route: linkRoute, isActive, isExactActive })" />
|
|
134
|
+
</ULinkBase>
|
|
135
|
+
</RouterLink>
|
|
136
|
+
</template>
|
|
137
|
+
|
|
138
|
+
<template v-else>
|
|
139
|
+
<template v-if="custom">
|
|
140
|
+
<slot
|
|
141
141
|
v-bind="{
|
|
142
142
|
...$attrs,
|
|
143
143
|
as,
|
|
@@ -147,11 +147,11 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
|
|
|
147
147
|
target: isExternal ? '_blank' : void 0,
|
|
148
148
|
active,
|
|
149
149
|
isExternal
|
|
150
|
-
}"
|
|
151
|
-
/>
|
|
152
|
-
</template>
|
|
153
|
-
<ULinkBase
|
|
154
|
-
v-else
|
|
150
|
+
}"
|
|
151
|
+
/>
|
|
152
|
+
</template>
|
|
153
|
+
<ULinkBase
|
|
154
|
+
v-else
|
|
155
155
|
v-bind="{
|
|
156
156
|
...$attrs,
|
|
157
157
|
as,
|
|
@@ -160,10 +160,10 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
|
|
|
160
160
|
href: to,
|
|
161
161
|
target: isExternal ? '_blank' : void 0,
|
|
162
162
|
isExternal
|
|
163
|
-
}"
|
|
164
|
-
:class="resolveLinkClass()"
|
|
165
|
-
>
|
|
166
|
-
<slot :active="active" />
|
|
167
|
-
</ULinkBase>
|
|
168
|
-
</template>
|
|
163
|
+
}"
|
|
164
|
+
:class="resolveLinkClass()"
|
|
165
|
+
>
|
|
166
|
+
<slot :active="active" />
|
|
167
|
+
</ULinkBase>
|
|
168
|
+
</template>
|
|
169
169
|
</template>
|
|
@@ -24,11 +24,11 @@ const isDark = computed({
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<template>
|
|
27
|
-
<UButton
|
|
28
|
-
:icon="isDark ? appConfig.ui.icons.dark : appConfig.ui.icons.light"
|
|
29
|
-
:color="color"
|
|
30
|
-
:variant="variant"
|
|
31
|
-
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
32
|
-
@click="isDark = !isDark"
|
|
33
|
-
/>
|
|
27
|
+
<UButton
|
|
28
|
+
:icon="isDark ? appConfig.ui.icons.dark : appConfig.ui.icons.light"
|
|
29
|
+
:color="color"
|
|
30
|
+
:variant="variant"
|
|
31
|
+
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
32
|
+
@click="isDark = !isDark"
|
|
33
|
+
/>
|
|
34
34
|
</template>
|
|
@@ -27,11 +27,11 @@ const preference = computed({
|
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
|
-
<USelectMenu
|
|
31
|
-
v-model="preference"
|
|
32
|
-
:icon="preference?.icon"
|
|
33
|
-
:search-input="false"
|
|
34
|
-
v-bind="$attrs"
|
|
35
|
-
:items="items"
|
|
36
|
-
/>
|
|
30
|
+
<USelectMenu
|
|
31
|
+
v-model="preference"
|
|
32
|
+
:icon="preference?.icon"
|
|
33
|
+
:search-input="false"
|
|
34
|
+
v-bind="$attrs"
|
|
35
|
+
:items="items"
|
|
36
|
+
/>
|
|
37
37
|
</template>
|
|
@@ -22,11 +22,11 @@ const isDark = computed({
|
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
|
-
<USwitch
|
|
26
|
-
v-model="isDark"
|
|
27
|
-
:checked-icon="appConfig.ui.icons.dark"
|
|
28
|
-
:unchecked-icon="appConfig.ui.icons.light"
|
|
29
|
-
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
30
|
-
v-bind="$attrs"
|
|
31
|
-
/>
|
|
25
|
+
<USwitch
|
|
26
|
+
v-model="isDark"
|
|
27
|
+
:checked-icon="appConfig.ui.icons.dark"
|
|
28
|
+
:unchecked-icon="appConfig.ui.icons.light"
|
|
29
|
+
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
30
|
+
v-bind="$attrs"
|
|
31
|
+
/>
|
|
32
32
|
</template>
|
|
@@ -68,7 +68,9 @@ const defaultOptions = {
|
|
|
68
68
|
theme: {
|
|
69
69
|
colors: void 0,
|
|
70
70
|
transitions: true
|
|
71
|
-
}
|
|
71
|
+
},
|
|
72
|
+
mdc: false,
|
|
73
|
+
content: false
|
|
72
74
|
};
|
|
73
75
|
const resolveColors = (colors) => {
|
|
74
76
|
return colors?.length ? [.../* @__PURE__ */ new Set(["primary", ...colors])] : ["primary", "secondary", "success", "info", "warning", "error"];
|
|
@@ -1509,7 +1511,7 @@ const contentSurround = {
|
|
|
1509
1511
|
}
|
|
1510
1512
|
};
|
|
1511
1513
|
|
|
1512
|
-
const contentToc = {
|
|
1514
|
+
const contentToc = (options) => ({
|
|
1513
1515
|
slots: {
|
|
1514
1516
|
root: "sticky top-(--ui-header-height) z-10 bg-default/75 lg:bg-[initial] backdrop-blur -mx-4 px-4 sm:px-6 sm:-mx-6 overflow-y-auto max-h-[calc(100vh-var(--ui-header-height))]",
|
|
1515
1517
|
container: "pt-4 sm:pt-6 pb-2.5 sm:pb-4.5 lg:py-8 border-b border-dashed border-default lg:border-0 flex flex-col",
|
|
@@ -1530,33 +1532,13 @@ const contentToc = {
|
|
|
1530
1532
|
},
|
|
1531
1533
|
variants: {
|
|
1532
1534
|
color: {
|
|
1533
|
-
|
|
1534
|
-
secondary: "",
|
|
1535
|
-
success: "",
|
|
1536
|
-
info: "",
|
|
1537
|
-
warning: "",
|
|
1538
|
-
error: "",
|
|
1535
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
1539
1536
|
neutral: ""
|
|
1540
1537
|
},
|
|
1541
1538
|
highlightColor: {
|
|
1542
|
-
|
|
1543
|
-
indicator:
|
|
1544
|
-
},
|
|
1545
|
-
secondary: {
|
|
1546
|
-
indicator: "bg-secondary"
|
|
1547
|
-
},
|
|
1548
|
-
success: {
|
|
1549
|
-
indicator: "bg-success"
|
|
1550
|
-
},
|
|
1551
|
-
info: {
|
|
1552
|
-
indicator: "bg-info"
|
|
1553
|
-
},
|
|
1554
|
-
warning: {
|
|
1555
|
-
indicator: "bg-warning"
|
|
1556
|
-
},
|
|
1557
|
-
error: {
|
|
1558
|
-
indicator: "bg-error"
|
|
1559
|
-
},
|
|
1539
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
1540
|
+
indicator: `bg-${color}`
|
|
1541
|
+
}])),
|
|
1560
1542
|
neutral: {
|
|
1561
1543
|
indicator: "bg-inverted"
|
|
1562
1544
|
}
|
|
@@ -1577,60 +1559,20 @@ const contentToc = {
|
|
|
1577
1559
|
}
|
|
1578
1560
|
},
|
|
1579
1561
|
compoundVariants: [
|
|
1580
|
-
{
|
|
1581
|
-
color:
|
|
1582
|
-
active: true,
|
|
1583
|
-
class: {
|
|
1584
|
-
link: "text-primary",
|
|
1585
|
-
linkLeadingIcon: "text-primary"
|
|
1586
|
-
}
|
|
1587
|
-
},
|
|
1588
|
-
{
|
|
1589
|
-
color: "secondary",
|
|
1590
|
-
active: true,
|
|
1591
|
-
class: {
|
|
1592
|
-
link: "text-secondary",
|
|
1593
|
-
linkLeadingIcon: "text-secondary"
|
|
1594
|
-
}
|
|
1595
|
-
},
|
|
1596
|
-
{
|
|
1597
|
-
color: "success",
|
|
1598
|
-
active: true,
|
|
1599
|
-
class: {
|
|
1600
|
-
link: "text-success",
|
|
1601
|
-
linkLeadingIcon: "text-success"
|
|
1602
|
-
}
|
|
1603
|
-
},
|
|
1604
|
-
{
|
|
1605
|
-
color: "info",
|
|
1606
|
-
active: true,
|
|
1607
|
-
class: {
|
|
1608
|
-
link: "text-info",
|
|
1609
|
-
linkLeadingIcon: "text-info"
|
|
1610
|
-
}
|
|
1611
|
-
},
|
|
1612
|
-
{
|
|
1613
|
-
color: "warning",
|
|
1614
|
-
active: true,
|
|
1615
|
-
class: {
|
|
1616
|
-
link: "text-warning",
|
|
1617
|
-
linkLeadingIcon: "text-warning"
|
|
1618
|
-
}
|
|
1619
|
-
},
|
|
1620
|
-
{
|
|
1621
|
-
color: "error",
|
|
1562
|
+
...(options.theme.colors || []).map((color) => ({
|
|
1563
|
+
color: `${color}`,
|
|
1622
1564
|
active: true,
|
|
1623
1565
|
class: {
|
|
1624
|
-
link:
|
|
1625
|
-
|
|
1566
|
+
link: `text-${color}`,
|
|
1567
|
+
linkText: `text-${color}`
|
|
1626
1568
|
}
|
|
1627
|
-
},
|
|
1569
|
+
})),
|
|
1628
1570
|
{
|
|
1629
1571
|
color: "neutral",
|
|
1630
1572
|
active: true,
|
|
1631
1573
|
class: {
|
|
1632
|
-
link:
|
|
1633
|
-
linkLeadingIcon:
|
|
1574
|
+
link: `text-highlighted`,
|
|
1575
|
+
linkLeadingIcon: `text-highlighted`
|
|
1634
1576
|
}
|
|
1635
1577
|
}
|
|
1636
1578
|
],
|
|
@@ -1638,7 +1580,7 @@ const contentToc = {
|
|
|
1638
1580
|
color: "primary",
|
|
1639
1581
|
highlightColor: "primary"
|
|
1640
1582
|
}
|
|
1641
|
-
};
|
|
1583
|
+
});
|
|
1642
1584
|
|
|
1643
1585
|
const contextMenu = (options) => ({
|
|
1644
1586
|
slots: {
|
|
@@ -2073,6 +2015,16 @@ const dropdownMenu = (options) => ({
|
|
|
2073
2015
|
}
|
|
2074
2016
|
});
|
|
2075
2017
|
|
|
2018
|
+
const error = {
|
|
2019
|
+
slots: {
|
|
2020
|
+
root: "min-h-[calc(100vh-var(--ui-header-height))] flex flex-col items-center justify-center text-center",
|
|
2021
|
+
statusCode: "text-base font-semibold text-primary",
|
|
2022
|
+
statusMessage: "mt-2 text-4xl sm:text-5xl font-bold text-highlighted text-balance",
|
|
2023
|
+
message: "mt-4 text-lg text-muted text-balance",
|
|
2024
|
+
links: "mt-8 flex items-center justify-center gap-6"
|
|
2025
|
+
}
|
|
2026
|
+
};
|
|
2027
|
+
|
|
2076
2028
|
const form = {
|
|
2077
2029
|
base: ""
|
|
2078
2030
|
};
|
|
@@ -4575,6 +4527,90 @@ const tree = (options) => ({
|
|
|
4575
4527
|
}
|
|
4576
4528
|
});
|
|
4577
4529
|
|
|
4530
|
+
const theme = {
|
|
4531
|
+
__proto__: null,
|
|
4532
|
+
accordion: accordion$1,
|
|
4533
|
+
alert: alert,
|
|
4534
|
+
avatar: avatar,
|
|
4535
|
+
avatarGroup: avatarGroup,
|
|
4536
|
+
badge: badge$1,
|
|
4537
|
+
breadcrumb: breadcrumb,
|
|
4538
|
+
button: button,
|
|
4539
|
+
buttonGroup: buttonGroup,
|
|
4540
|
+
calendar: calendar,
|
|
4541
|
+
card: card$1,
|
|
4542
|
+
carousel: carousel,
|
|
4543
|
+
chatMessage: chatMessage,
|
|
4544
|
+
chatMessages: chatMessages,
|
|
4545
|
+
chatPrompt: chatPrompt,
|
|
4546
|
+
chatPromptSubmit: chatPromptSubmit,
|
|
4547
|
+
checkbox: checkbox,
|
|
4548
|
+
checkboxGroup: checkboxGroup,
|
|
4549
|
+
chip: chip,
|
|
4550
|
+
collapsible: collapsible$1,
|
|
4551
|
+
colorPicker: colorPicker,
|
|
4552
|
+
commandPalette: commandPalette,
|
|
4553
|
+
container: container,
|
|
4554
|
+
contentNavigation: contentNavigation,
|
|
4555
|
+
contentSearch: contentSearch,
|
|
4556
|
+
contentSearchButton: contentSearchButton,
|
|
4557
|
+
contentSurround: contentSurround,
|
|
4558
|
+
contentToc: contentToc,
|
|
4559
|
+
contextMenu: contextMenu,
|
|
4560
|
+
dashboardGroup: dashboardGroup,
|
|
4561
|
+
dashboardNavbar: dashboardNavbar,
|
|
4562
|
+
dashboardPanel: dashboardPanel,
|
|
4563
|
+
dashboardResizeHandle: dashboardResizeHandle,
|
|
4564
|
+
dashboardSearch: dashboardSearch,
|
|
4565
|
+
dashboardSearchButton: dashboardSearchButton,
|
|
4566
|
+
dashboardSidebar: dashboardSidebar,
|
|
4567
|
+
dashboardSidebarCollapse: dashboardSidebarCollapse,
|
|
4568
|
+
dashboardSidebarToggle: dashboardSidebarToggle,
|
|
4569
|
+
drawer: drawer,
|
|
4570
|
+
dropdownMenu: dropdownMenu,
|
|
4571
|
+
error: error,
|
|
4572
|
+
form: form,
|
|
4573
|
+
formField: formField,
|
|
4574
|
+
input: input,
|
|
4575
|
+
inputMenu: inputMenu,
|
|
4576
|
+
inputNumber: inputNumber,
|
|
4577
|
+
inputTags: inputTags,
|
|
4578
|
+
kbd: kbd$1,
|
|
4579
|
+
link: link,
|
|
4580
|
+
modal: modal,
|
|
4581
|
+
navigationMenu: navigationMenu,
|
|
4582
|
+
pagination: pagination,
|
|
4583
|
+
pinInput: pinInput,
|
|
4584
|
+
popover: popover,
|
|
4585
|
+
progress: progress,
|
|
4586
|
+
radioGroup: radioGroup,
|
|
4587
|
+
select: select,
|
|
4588
|
+
selectMenu: selectMenu,
|
|
4589
|
+
separator: separator,
|
|
4590
|
+
skeleton: skeleton,
|
|
4591
|
+
slideover: slideover,
|
|
4592
|
+
slider: slider,
|
|
4593
|
+
stepper: stepper,
|
|
4594
|
+
switch: _switch,
|
|
4595
|
+
table: table$1,
|
|
4596
|
+
tabs: tabs$1,
|
|
4597
|
+
textarea: textarea,
|
|
4598
|
+
timeline: timeline,
|
|
4599
|
+
toast: toast,
|
|
4600
|
+
toaster: toaster,
|
|
4601
|
+
tooltip: tooltip,
|
|
4602
|
+
tree: tree
|
|
4603
|
+
};
|
|
4604
|
+
|
|
4605
|
+
const contentTheme = {
|
|
4606
|
+
__proto__: null,
|
|
4607
|
+
contentNavigation: contentNavigation,
|
|
4608
|
+
contentSearch: contentSearch,
|
|
4609
|
+
contentSearchButton: contentSearchButton,
|
|
4610
|
+
contentSurround: contentSurround,
|
|
4611
|
+
contentToc: contentToc
|
|
4612
|
+
};
|
|
4613
|
+
|
|
4578
4614
|
const a = {
|
|
4579
4615
|
base: [
|
|
4580
4616
|
"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&>code]:border-dashed hover:[&>code]:border-primary hover:[&>code]:text-primary",
|
|
@@ -5084,7 +5120,7 @@ const ul = {
|
|
|
5084
5120
|
base: "list-disc ps-6 my-5 marker:text-(--ui-border-accented)"
|
|
5085
5121
|
};
|
|
5086
5122
|
|
|
5087
|
-
const
|
|
5123
|
+
const proseTheme = {
|
|
5088
5124
|
__proto__: null,
|
|
5089
5125
|
a: a,
|
|
5090
5126
|
accordion: accordion,
|
|
@@ -5129,114 +5165,59 @@ const index = {
|
|
|
5129
5165
|
ul: ul
|
|
5130
5166
|
};
|
|
5131
5167
|
|
|
5132
|
-
const
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
avatarGroup: avatarGroup,
|
|
5138
|
-
badge: badge$1,
|
|
5139
|
-
breadcrumb: breadcrumb,
|
|
5140
|
-
button: button,
|
|
5141
|
-
buttonGroup: buttonGroup,
|
|
5142
|
-
calendar: calendar,
|
|
5143
|
-
card: card$1,
|
|
5144
|
-
carousel: carousel,
|
|
5145
|
-
chatMessage: chatMessage,
|
|
5146
|
-
chatMessages: chatMessages,
|
|
5147
|
-
chatPrompt: chatPrompt,
|
|
5148
|
-
chatPromptSubmit: chatPromptSubmit,
|
|
5149
|
-
checkbox: checkbox,
|
|
5150
|
-
checkboxGroup: checkboxGroup,
|
|
5151
|
-
chip: chip,
|
|
5152
|
-
collapsible: collapsible$1,
|
|
5153
|
-
colorPicker: colorPicker,
|
|
5154
|
-
commandPalette: commandPalette,
|
|
5155
|
-
container: container,
|
|
5156
|
-
contentNavigation: contentNavigation,
|
|
5157
|
-
contentSearch: contentSearch,
|
|
5158
|
-
contentSearchButton: contentSearchButton,
|
|
5159
|
-
contentSurround: contentSurround,
|
|
5160
|
-
contentToc: contentToc,
|
|
5161
|
-
contextMenu: contextMenu,
|
|
5162
|
-
dashboardGroup: dashboardGroup,
|
|
5163
|
-
dashboardNavbar: dashboardNavbar,
|
|
5164
|
-
dashboardPanel: dashboardPanel,
|
|
5165
|
-
dashboardResizeHandle: dashboardResizeHandle,
|
|
5166
|
-
dashboardSearch: dashboardSearch,
|
|
5167
|
-
dashboardSearchButton: dashboardSearchButton,
|
|
5168
|
-
dashboardSidebar: dashboardSidebar,
|
|
5169
|
-
dashboardSidebarCollapse: dashboardSidebarCollapse,
|
|
5170
|
-
dashboardSidebarToggle: dashboardSidebarToggle,
|
|
5171
|
-
drawer: drawer,
|
|
5172
|
-
dropdownMenu: dropdownMenu,
|
|
5173
|
-
form: form,
|
|
5174
|
-
formField: formField,
|
|
5175
|
-
input: input,
|
|
5176
|
-
inputMenu: inputMenu,
|
|
5177
|
-
inputNumber: inputNumber,
|
|
5178
|
-
inputTags: inputTags,
|
|
5179
|
-
kbd: kbd$1,
|
|
5180
|
-
link: link,
|
|
5181
|
-
modal: modal,
|
|
5182
|
-
navigationMenu: navigationMenu,
|
|
5183
|
-
pagination: pagination,
|
|
5184
|
-
pinInput: pinInput,
|
|
5185
|
-
popover: popover,
|
|
5186
|
-
progress: progress,
|
|
5187
|
-
prose: index,
|
|
5188
|
-
radioGroup: radioGroup,
|
|
5189
|
-
select: select,
|
|
5190
|
-
selectMenu: selectMenu,
|
|
5191
|
-
separator: separator,
|
|
5192
|
-
skeleton: skeleton,
|
|
5193
|
-
slideover: slideover,
|
|
5194
|
-
slider: slider,
|
|
5195
|
-
stepper: stepper,
|
|
5196
|
-
switch: _switch,
|
|
5197
|
-
table: table$1,
|
|
5198
|
-
tabs: tabs$1,
|
|
5199
|
-
textarea: textarea,
|
|
5200
|
-
timeline: timeline,
|
|
5201
|
-
toast: toast,
|
|
5202
|
-
toaster: toaster,
|
|
5203
|
-
tooltip: tooltip,
|
|
5204
|
-
tree: tree
|
|
5168
|
+
const themeCollections = {
|
|
5169
|
+
"": theme,
|
|
5170
|
+
// Root theme files
|
|
5171
|
+
"content": contentTheme,
|
|
5172
|
+
"prose": proseTheme
|
|
5205
5173
|
};
|
|
5206
|
-
|
|
5174
|
+
function generateVariantDeclarations(variants, result) {
|
|
5175
|
+
return variants.filter((variant) => result.variants?.[variant]).map((variant) => {
|
|
5176
|
+
const keys = Object.keys(result.variants[variant]);
|
|
5177
|
+
return `const ${variant} = ${JSON.stringify(keys, null, 2)} as const`;
|
|
5178
|
+
});
|
|
5179
|
+
}
|
|
5180
|
+
function processJsonWithVariants(json, variants) {
|
|
5181
|
+
let processedJson = json;
|
|
5182
|
+
for (const variant of variants) {
|
|
5183
|
+
processedJson = processedJson.replace(
|
|
5184
|
+
new RegExp(`("${variant}": "[^"]+")`, "g"),
|
|
5185
|
+
`$1 as typeof ${variant}[number]`
|
|
5186
|
+
);
|
|
5187
|
+
processedJson = processedJson.replace(
|
|
5188
|
+
new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"),
|
|
5189
|
+
(_, before, match, after) => {
|
|
5190
|
+
const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
|
|
5191
|
+
return `${before}${replaced}${after}`;
|
|
5192
|
+
}
|
|
5193
|
+
);
|
|
5194
|
+
}
|
|
5195
|
+
return processedJson;
|
|
5196
|
+
}
|
|
5207
5197
|
function getTemplates(options, uiConfig) {
|
|
5208
5198
|
const templates = [];
|
|
5209
|
-
for (const
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
const
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
json =
|
|
5223
|
-
json = json
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5199
|
+
for (const [folder, themeCollection] of Object.entries(themeCollections)) {
|
|
5200
|
+
for (const [component, template] of Object.entries(themeCollection)) {
|
|
5201
|
+
const folderPath = folder ? `${folder}/` : "";
|
|
5202
|
+
const filename = `ui/${folderPath}${kebabCase(component)}.ts`;
|
|
5203
|
+
templates.push({
|
|
5204
|
+
filename,
|
|
5205
|
+
write: true,
|
|
5206
|
+
getContents: async () => {
|
|
5207
|
+
const result = typeof template === "function" ? template(options) : template;
|
|
5208
|
+
const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
|
|
5209
|
+
const keys = Object.keys(values);
|
|
5210
|
+
return keys.some((key) => key !== "true" && key !== "false");
|
|
5211
|
+
}).map(([key]) => key);
|
|
5212
|
+
let json = JSON.stringify(result, null, 2);
|
|
5213
|
+
json = processJsonWithVariants(json, variants);
|
|
5214
|
+
return [
|
|
5215
|
+
...generateVariantDeclarations(variants, result),
|
|
5216
|
+
`export default ${json}`
|
|
5217
|
+
].join("\n\n");
|
|
5227
5218
|
}
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
const keys = Object.keys(result.variants[variant]);
|
|
5231
|
-
return `const ${variant} = ${JSON.stringify(keys, null, 2)} as const`;
|
|
5232
|
-
});
|
|
5233
|
-
}
|
|
5234
|
-
return [
|
|
5235
|
-
...generateVariantDeclarations(variants),
|
|
5236
|
-
`export default ${json}`
|
|
5237
|
-
].join("\n\n");
|
|
5238
|
-
}
|
|
5239
|
-
});
|
|
5219
|
+
});
|
|
5220
|
+
}
|
|
5240
5221
|
}
|
|
5241
5222
|
templates.push({
|
|
5242
5223
|
filename: "ui.css",
|
|
@@ -5311,7 +5292,29 @@ function getTemplates(options, uiConfig) {
|
|
|
5311
5292
|
templates.push({
|
|
5312
5293
|
filename: "ui/index.ts",
|
|
5313
5294
|
write: true,
|
|
5314
|
-
getContents: () =>
|
|
5295
|
+
getContents: () => {
|
|
5296
|
+
const exports = [];
|
|
5297
|
+
for (const component of Object.keys(theme)) {
|
|
5298
|
+
exports.push(`export { default as ${component} } from './${kebabCase(component)}'`);
|
|
5299
|
+
}
|
|
5300
|
+
for (const component of Object.keys(contentTheme)) {
|
|
5301
|
+
exports.push(`export { default as ${component} } from './content/${kebabCase(component)}'`);
|
|
5302
|
+
}
|
|
5303
|
+
for (const component of Object.keys(proseTheme)) {
|
|
5304
|
+
exports.push(`export { default as ${component} } from './prose/${kebabCase(component)}'`);
|
|
5305
|
+
}
|
|
5306
|
+
return exports.join("\n");
|
|
5307
|
+
}
|
|
5308
|
+
});
|
|
5309
|
+
templates.push({
|
|
5310
|
+
filename: "ui/content/index.ts",
|
|
5311
|
+
write: true,
|
|
5312
|
+
getContents: () => Object.keys(contentTheme).map((component) => `export { default as ${component} } from './${kebabCase(component)}'`).join("\n")
|
|
5313
|
+
});
|
|
5314
|
+
templates.push({
|
|
5315
|
+
filename: "ui/prose/index.ts",
|
|
5316
|
+
write: true,
|
|
5317
|
+
getContents: () => Object.keys(proseTheme).map((component) => `export { default as ${component} } from './${kebabCase(component)}'`).join("\n")
|
|
5315
5318
|
});
|
|
5316
5319
|
templates.push({
|
|
5317
5320
|
filename: "types/ui.d.ts",
|
package/dist/unplugin.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
|
|
|
3
3
|
import { createUnplugin } from 'unplugin';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
5
|
import tailwind from '@tailwindcss/vite';
|
|
6
|
-
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.
|
|
6
|
+
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.DQZ75GCP.mjs';
|
|
7
7
|
import { globSync } from 'tinyglobby';
|
|
8
8
|
import { genSafeVariableName } from 'knitwork';
|
|
9
9
|
import MagicString from 'magic-string';
|
|
@@ -19,16 +19,16 @@ function TemplatePlugin(options, appConfig) {
|
|
|
19
19
|
const templates = getTemplates(options, appConfig.ui);
|
|
20
20
|
const templateKeys = new Set(templates.map((t) => `#build/${t.filename}`));
|
|
21
21
|
return {
|
|
22
|
-
name: "
|
|
22
|
+
name: "eslamdevui:ui:templates",
|
|
23
23
|
enforce: "pre",
|
|
24
24
|
resolveId(id) {
|
|
25
25
|
if (templateKeys.has(id + ".ts")) {
|
|
26
|
-
return id.replace("#build/", "virtual:
|
|
26
|
+
return id.replace("#build/", "virtual:eslamdevui-ui-templates/") + ".ts";
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
loadInclude: (id) => templateKeys.has(id.replace("virtual:
|
|
29
|
+
loadInclude: (id) => templateKeys.has(id.replace("virtual:eslamdevui-ui-templates/", "#build/")),
|
|
30
30
|
load(id) {
|
|
31
|
-
id = id.replace("virtual:
|
|
31
|
+
id = id.replace("virtual:eslamdevui-ui-templates/", "#build/");
|
|
32
32
|
return templates.find((t) => `#build/${t.filename}` === id).getContents({});
|
|
33
33
|
}
|
|
34
34
|
};
|
|
@@ -41,11 +41,11 @@ function PluginsPlugin(options) {
|
|
|
41
41
|
plugins.push(resolvePathSync("../runtime/vue/plugins/color-mode", { extensions: [".ts", ".mjs", ".js"], url: import.meta.url }));
|
|
42
42
|
}
|
|
43
43
|
return {
|
|
44
|
-
name: "
|
|
44
|
+
name: "eslamdevui:ui:plugins",
|
|
45
45
|
enforce: "pre",
|
|
46
46
|
resolveId(id) {
|
|
47
47
|
if (id === "@eslamdevui/ui/vue-plugin") {
|
|
48
|
-
return "virtual:
|
|
48
|
+
return "virtual:eslamdevui-ui-plugins";
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
transform(code, id) {
|
|
@@ -60,7 +60,7 @@ function PluginsPlugin(options) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
loadInclude: (id) => id === "virtual:
|
|
63
|
+
loadInclude: (id) => id === "virtual:eslamdevui-ui-plugins",
|
|
64
64
|
load() {
|
|
65
65
|
return `
|
|
66
66
|
${plugins.map((p) => `import ${genSafeVariableName(p)} from "${p}"`).join("\n")}
|
|
@@ -127,7 +127,7 @@ function ComponentImportPlugin(options, meta) {
|
|
|
127
127
|
const pluginOptions = defu(options.components, {
|
|
128
128
|
dts: options.dts ?? true,
|
|
129
129
|
exclude: [
|
|
130
|
-
/[\\/]node_modules[\\/](?!\.pnpm|@
|
|
130
|
+
/[\\/]node_modules[\\/](?!\.pnpm|@eslamdevui\/ui|@compodium\/examples)/,
|
|
131
131
|
/[\\/]\.git[\\/]/,
|
|
132
132
|
/[\\/]\.nuxt[\\/]/
|
|
133
133
|
],
|
package/dist/vite.mjs
CHANGED