@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
|
@@ -21,17 +21,17 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.card || {} })
|
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
|
-
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
25
|
-
<div v-if="!!slots.header" :class="ui.header({ class: props.ui?.header })">
|
|
26
|
-
<slot name="header" />
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<div v-if="!!slots.default" :class="ui.body({ class: props.ui?.body })">
|
|
30
|
-
<slot />
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<div v-if="!!slots.footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
34
|
-
<slot name="footer" />
|
|
35
|
-
</div>
|
|
36
|
-
</Primitive>
|
|
24
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
25
|
+
<div v-if="!!slots.header" :class="ui.header({ class: props.ui?.header })">
|
|
26
|
+
<slot name="header" />
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div v-if="!!slots.default" :class="ui.body({ class: props.ui?.body })">
|
|
30
|
+
<slot />
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div v-if="!!slots.footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
34
|
+
<slot name="footer" />
|
|
35
|
+
</div>
|
|
36
|
+
</Primitive>
|
|
37
37
|
</template>
|
|
@@ -149,62 +149,62 @@ defineExpose({
|
|
|
149
149
|
</script>
|
|
150
150
|
|
|
151
151
|
<template>
|
|
152
|
-
<Primitive
|
|
153
|
-
:as="as"
|
|
154
|
-
role="region"
|
|
155
|
-
aria-roledescription="carousel"
|
|
156
|
-
tabindex="0"
|
|
157
|
-
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
158
|
-
@keydown="onKeyDown"
|
|
159
|
-
>
|
|
160
|
-
<div ref="emblaRef" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
161
|
-
<div :class="ui.container({ class: props.ui?.container })">
|
|
162
|
-
<div
|
|
163
|
-
v-for="(item, index) in items"
|
|
164
|
-
:key="index"
|
|
165
|
-
role="group"
|
|
166
|
-
aria-roledescription="slide"
|
|
167
|
-
:class="ui.item({ class: [props.ui?.item, isCarouselItem(item) && item.ui?.item, isCarouselItem(item) && item.class] })"
|
|
168
|
-
>
|
|
169
|
-
<slot :item="item" :index="index" />
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
173
|
-
|
|
174
|
-
<div v-if="arrows || dots" :class="ui.controls({ class: props.ui?.controls })">
|
|
175
|
-
<div v-if="arrows" :class="ui.arrows({ class: props.ui?.arrows })">
|
|
176
|
-
<UButton
|
|
177
|
-
:disabled="!canScrollPrev"
|
|
178
|
-
:icon="prevIcon"
|
|
179
|
-
color="neutral"
|
|
180
|
-
variant="outline"
|
|
181
|
-
:aria-label="t('carousel.prev')"
|
|
182
|
-
v-bind="typeof prev === 'object' ? prev : void 0"
|
|
183
|
-
:class="ui.prev({ class: props.ui?.prev })"
|
|
184
|
-
@click="scrollPrev"
|
|
185
|
-
/>
|
|
186
|
-
<UButton
|
|
187
|
-
:disabled="!canScrollNext"
|
|
188
|
-
:icon="nextIcon"
|
|
189
|
-
color="neutral"
|
|
190
|
-
variant="outline"
|
|
191
|
-
:aria-label="t('carousel.next')"
|
|
192
|
-
v-bind="typeof next === 'object' ? next : void 0"
|
|
193
|
-
:class="ui.next({ class: props.ui?.next })"
|
|
194
|
-
@click="scrollNext"
|
|
195
|
-
/>
|
|
196
|
-
</div>
|
|
197
|
-
|
|
198
|
-
<div v-if="dots" :class="ui.dots({ class: props.ui?.dots })">
|
|
199
|
-
<template v-for="(_, index) in scrollSnaps" :key="index">
|
|
200
|
-
<button
|
|
201
|
-
:aria-label="t('carousel.goto', { slide: index + 1 })"
|
|
202
|
-
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
|
|
203
|
-
:data-state="selectedIndex === index ? 'active' : void 0"
|
|
204
|
-
@click="scrollTo(index)"
|
|
205
|
-
/>
|
|
206
|
-
</template>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
</Primitive>
|
|
152
|
+
<Primitive
|
|
153
|
+
:as="as"
|
|
154
|
+
role="region"
|
|
155
|
+
aria-roledescription="carousel"
|
|
156
|
+
tabindex="0"
|
|
157
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
158
|
+
@keydown="onKeyDown"
|
|
159
|
+
>
|
|
160
|
+
<div ref="emblaRef" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
161
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
162
|
+
<div
|
|
163
|
+
v-for="(item, index) in items"
|
|
164
|
+
:key="index"
|
|
165
|
+
role="group"
|
|
166
|
+
aria-roledescription="slide"
|
|
167
|
+
:class="ui.item({ class: [props.ui?.item, isCarouselItem(item) && item.ui?.item, isCarouselItem(item) && item.class] })"
|
|
168
|
+
>
|
|
169
|
+
<slot :item="item" :index="index" />
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<div v-if="arrows || dots" :class="ui.controls({ class: props.ui?.controls })">
|
|
175
|
+
<div v-if="arrows" :class="ui.arrows({ class: props.ui?.arrows })">
|
|
176
|
+
<UButton
|
|
177
|
+
:disabled="!canScrollPrev"
|
|
178
|
+
:icon="prevIcon"
|
|
179
|
+
color="neutral"
|
|
180
|
+
variant="outline"
|
|
181
|
+
:aria-label="t('carousel.prev')"
|
|
182
|
+
v-bind="typeof prev === 'object' ? prev : void 0"
|
|
183
|
+
:class="ui.prev({ class: props.ui?.prev })"
|
|
184
|
+
@click="scrollPrev"
|
|
185
|
+
/>
|
|
186
|
+
<UButton
|
|
187
|
+
:disabled="!canScrollNext"
|
|
188
|
+
:icon="nextIcon"
|
|
189
|
+
color="neutral"
|
|
190
|
+
variant="outline"
|
|
191
|
+
:aria-label="t('carousel.next')"
|
|
192
|
+
v-bind="typeof next === 'object' ? next : void 0"
|
|
193
|
+
:class="ui.next({ class: props.ui?.next })"
|
|
194
|
+
@click="scrollNext"
|
|
195
|
+
/>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<div v-if="dots" :class="ui.dots({ class: props.ui?.dots })">
|
|
199
|
+
<template v-for="(_, index) in scrollSnaps" :key="index">
|
|
200
|
+
<button
|
|
201
|
+
:aria-label="t('carousel.goto', { slide: index + 1 })"
|
|
202
|
+
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
|
|
203
|
+
:data-state="selectedIndex === index ? 'active' : void 0"
|
|
204
|
+
@click="scrollTo(index)"
|
|
205
|
+
/>
|
|
206
|
+
</template>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</Primitive>
|
|
210
210
|
</template>
|
|
@@ -49,39 +49,39 @@ const handleActionClick = (e, action) => {
|
|
|
49
49
|
</script>
|
|
50
50
|
|
|
51
51
|
<template>
|
|
52
|
-
<Primitive :id="id" :as="as" :data-role="role" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
53
|
-
<div :class="ui.container({ class: props.ui?.container })">
|
|
54
|
-
<slot name="leading" :avatar="avatar">
|
|
55
|
-
<div v-if="hasLeading" :class="ui.leading({ class: props.ui?.leading })">
|
|
56
|
-
<UIcon v-if="icon" :name="icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
57
|
-
<UAvatar
|
|
58
|
-
v-else-if="avatar"
|
|
59
|
-
:size="ui.leadingAvatar()"
|
|
60
|
-
v-bind="avatar"
|
|
61
|
-
:class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })"
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
</slot>
|
|
65
|
-
<slot name="content" :content="content">
|
|
66
|
-
<div :class="ui.content({ class: props.ui?.content })">
|
|
67
|
-
<slot name="default">
|
|
68
|
-
{{ content }}
|
|
69
|
-
</slot>
|
|
70
|
-
</div>
|
|
71
|
-
</slot>
|
|
72
|
-
<slot name="actions" :actions="actions">
|
|
73
|
-
<div v-if="hasActions" :class="ui.actions({ class: props.ui?.actions })">
|
|
74
|
-
<UButton
|
|
75
|
-
v-for="action in actions"
|
|
76
|
-
:key="action.label"
|
|
77
|
-
v-bind="action"
|
|
78
|
-
:size="action.size || 'xs'"
|
|
79
|
-
:color="action.color || 'neutral'"
|
|
80
|
-
:variant="action.variant || 'ghost'"
|
|
81
|
-
@click="(e) => handleActionClick(e, action)"
|
|
82
|
-
/>
|
|
83
|
-
</div>
|
|
84
|
-
</slot>
|
|
85
|
-
</div>
|
|
86
|
-
</Primitive>
|
|
52
|
+
<Primitive :id="id" :as="as" :data-role="role" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
53
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
54
|
+
<slot name="leading" :avatar="avatar">
|
|
55
|
+
<div v-if="hasLeading" :class="ui.leading({ class: props.ui?.leading })">
|
|
56
|
+
<UIcon v-if="icon" :name="icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
57
|
+
<UAvatar
|
|
58
|
+
v-else-if="avatar"
|
|
59
|
+
:size="ui.leadingAvatar()"
|
|
60
|
+
v-bind="avatar"
|
|
61
|
+
:class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</slot>
|
|
65
|
+
<slot name="content" :content="content">
|
|
66
|
+
<div :class="ui.content({ class: props.ui?.content })">
|
|
67
|
+
<slot name="default">
|
|
68
|
+
{{ content }}
|
|
69
|
+
</slot>
|
|
70
|
+
</div>
|
|
71
|
+
</slot>
|
|
72
|
+
<slot name="actions" :actions="actions">
|
|
73
|
+
<div v-if="hasActions" :class="ui.actions({ class: props.ui?.actions })">
|
|
74
|
+
<UButton
|
|
75
|
+
v-for="action in actions"
|
|
76
|
+
:key="action.label"
|
|
77
|
+
v-bind="action"
|
|
78
|
+
:size="action.size || 'xs'"
|
|
79
|
+
:color="action.color || 'neutral'"
|
|
80
|
+
:variant="action.variant || 'ghost'"
|
|
81
|
+
@click="(e) => handleActionClick(e, action)"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</slot>
|
|
85
|
+
</div>
|
|
86
|
+
</Primitive>
|
|
87
87
|
</template>
|
|
@@ -3,11 +3,10 @@ import theme from "#build/ui/chat-messages";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { ref, computed, watch, nextTick,
|
|
7
|
-
import { defu } from "defu";
|
|
6
|
+
import { ref, computed, watch, nextTick, onMounted } from "vue";
|
|
8
7
|
import { Presence } from "reka-ui";
|
|
9
8
|
import { useElementBounding, useEventListener, watchThrottled } from "@vueuse/core";
|
|
10
|
-
import { omit } from "
|
|
9
|
+
import { omit } from "../utils";
|
|
11
10
|
import { useAppConfig } from "#imports";
|
|
12
11
|
import { tv } from "../utils/tv";
|
|
13
12
|
import UChatMessage from "./ChatMessage.vue";
|
|
@@ -30,20 +29,21 @@ const proxySlots = omit(slots, ["default", "indicator", "viewport"]);
|
|
|
30
29
|
const appConfig = useAppConfig();
|
|
31
30
|
function getValidVariant(variant) {
|
|
32
31
|
const allowed = ["solid", "outline", "soft", "subtle", "naked"];
|
|
33
|
-
|
|
32
|
+
if (allowed.includes(variant)) {
|
|
33
|
+
return variant;
|
|
34
|
+
}
|
|
35
|
+
return "soft";
|
|
34
36
|
}
|
|
35
|
-
const userProps =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
()
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
)
|
|
46
|
-
);
|
|
37
|
+
const userProps = computed(() => ({
|
|
38
|
+
...props.user,
|
|
39
|
+
variant: getValidVariant(props.user?.variant ?? void 0),
|
|
40
|
+
side: props.user?.side ?? "right"
|
|
41
|
+
}));
|
|
42
|
+
const assistantProps = computed(() => ({
|
|
43
|
+
...props.assistant,
|
|
44
|
+
variant: getValidVariant(props.assistant?.variant ?? void 0) === "soft" ? "naked" : getValidVariant(props.assistant?.variant ?? void 0),
|
|
45
|
+
side: props.assistant?.side ?? "left"
|
|
46
|
+
}));
|
|
47
47
|
const ui = computed(
|
|
48
48
|
() => tv({ extend: tv(theme), ...appConfig.ui?.chatMessages || {} })({
|
|
49
49
|
compact: props.compact
|
|
@@ -167,59 +167,59 @@ onMounted(() => {
|
|
|
167
167
|
</script>
|
|
168
168
|
|
|
169
169
|
<template>
|
|
170
|
-
<div
|
|
171
|
-
ref="el"
|
|
172
|
-
:data-status="status"
|
|
173
|
-
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
174
|
-
:style="{ '--last-message-height': `${lastMessageHeight}px` }"
|
|
175
|
-
>
|
|
176
|
-
<slot>
|
|
177
|
-
<UChatMessage
|
|
178
|
-
v-for="message in messages"
|
|
179
|
-
:key="message.id"
|
|
180
|
-
v-bind="{ ...message, ...message.role === 'user' ? userProps : assistantProps }"
|
|
181
|
-
:ref="(el) => registerMessageRef(message.id, el)"
|
|
182
|
-
:compact="compact"
|
|
183
|
-
>
|
|
184
|
-
<template v-for="(_, name) in proxySlots" #[name]>
|
|
185
|
-
<slot :name="name" v-bind="{ message }" />
|
|
186
|
-
</template>
|
|
187
|
-
</UChatMessage>
|
|
188
|
-
</slot>
|
|
189
|
-
|
|
190
|
-
<UChatMessage
|
|
191
|
-
v-if="status === 'submitted'"
|
|
192
|
-
id="indicator"
|
|
193
|
-
content=""
|
|
194
|
-
role="assistant"
|
|
195
|
-
v-bind="{ ...assistantProps, actions: void 0 }"
|
|
196
|
-
:compact="compact"
|
|
197
|
-
>
|
|
198
|
-
<template #content>
|
|
199
|
-
<div :class="ui.indicator({ class: props.ui?.indicator })">
|
|
200
|
-
<slot name="indicator">
|
|
201
|
-
<span />
|
|
202
|
-
<span />
|
|
203
|
-
<span />
|
|
204
|
-
</slot>
|
|
205
|
-
</div>
|
|
206
|
-
</template>
|
|
207
|
-
</UChatMessage>
|
|
208
|
-
|
|
209
|
-
<Presence :present="showAutoScroll">
|
|
210
|
-
<div :data-state="showAutoScroll ? 'open' : 'closed'" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
211
|
-
<slot name="viewport" :on-click="onAutoScrollClick">
|
|
212
|
-
<UButton
|
|
213
|
-
v-if="autoScroll"
|
|
214
|
-
:icon="autoScrollIcon || appConfig.ui.icons.arrowDown"
|
|
215
|
-
color="neutral"
|
|
216
|
-
variant="outline"
|
|
217
|
-
v-bind="typeof autoScroll === 'object' ? autoScroll : {}"
|
|
218
|
-
:class="ui.autoScroll({ class: props.ui?.autoScroll })"
|
|
219
|
-
@click="onAutoScrollClick"
|
|
220
|
-
/>
|
|
221
|
-
</slot>
|
|
222
|
-
</div>
|
|
223
|
-
</Presence>
|
|
224
|
-
</div>
|
|
170
|
+
<div
|
|
171
|
+
ref="el"
|
|
172
|
+
:data-status="status"
|
|
173
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
174
|
+
:style="{ '--last-message-height': `${lastMessageHeight}px` }"
|
|
175
|
+
>
|
|
176
|
+
<slot>
|
|
177
|
+
<UChatMessage
|
|
178
|
+
v-for="message in messages"
|
|
179
|
+
:key="message.id"
|
|
180
|
+
v-bind="{ ...message, ...message.role === 'user' ? userProps : assistantProps }"
|
|
181
|
+
:ref="(el) => registerMessageRef(message.id, el)"
|
|
182
|
+
:compact="compact"
|
|
183
|
+
>
|
|
184
|
+
<template v-for="(_, name) in proxySlots" #[name]>
|
|
185
|
+
<slot :name="name" v-bind="{ message }" />
|
|
186
|
+
</template>
|
|
187
|
+
</UChatMessage>
|
|
188
|
+
</slot>
|
|
189
|
+
|
|
190
|
+
<UChatMessage
|
|
191
|
+
v-if="status === 'submitted'"
|
|
192
|
+
id="indicator"
|
|
193
|
+
content=""
|
|
194
|
+
role="assistant"
|
|
195
|
+
v-bind="{ ...assistantProps, actions: void 0 }"
|
|
196
|
+
:compact="compact"
|
|
197
|
+
>
|
|
198
|
+
<template #content>
|
|
199
|
+
<div :class="ui.indicator({ class: props.ui?.indicator })">
|
|
200
|
+
<slot name="indicator">
|
|
201
|
+
<span />
|
|
202
|
+
<span />
|
|
203
|
+
<span />
|
|
204
|
+
</slot>
|
|
205
|
+
</div>
|
|
206
|
+
</template>
|
|
207
|
+
</UChatMessage>
|
|
208
|
+
|
|
209
|
+
<Presence :present="showAutoScroll">
|
|
210
|
+
<div :data-state="showAutoScroll ? 'open' : 'closed'" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
211
|
+
<slot name="viewport" :on-click="onAutoScrollClick">
|
|
212
|
+
<UButton
|
|
213
|
+
v-if="autoScroll"
|
|
214
|
+
:icon="autoScrollIcon || appConfig.ui.icons.arrowDown"
|
|
215
|
+
color="neutral"
|
|
216
|
+
variant="outline"
|
|
217
|
+
v-bind="typeof autoScroll === 'object' ? autoScroll : {}"
|
|
218
|
+
:class="ui.autoScroll({ class: props.ui?.autoScroll })"
|
|
219
|
+
@click="onAutoScrollClick"
|
|
220
|
+
/>
|
|
221
|
+
</slot>
|
|
222
|
+
</div>
|
|
223
|
+
</Presence>
|
|
224
|
+
</div>
|
|
225
225
|
</template>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
-
import type { ButtonProps, ComponentConfig } from '
|
|
2
|
+
import type { ButtonProps, ComponentConfig, ChatMessageProps } from '../types';
|
|
3
3
|
import type { Message, UseChatHelpers } from '@ai-sdk/vue';
|
|
4
4
|
import theme from '#build/ui/chat-messages';
|
|
5
|
-
import type { ChatMessageProps } from '../types';
|
|
6
5
|
type ChatMessages = ComponentConfig<typeof theme, AppConfig, 'chatMessages'>;
|
|
7
6
|
export interface ChatMessagesProps {
|
|
8
7
|
messages?: Message[];
|
|
@@ -6,18 +6,17 @@ import theme from "#build/ui/chat-prompt";
|
|
|
6
6
|
import { computed, useTemplateRef } from "vue";
|
|
7
7
|
import { Primitive, useForwardProps } from "reka-ui";
|
|
8
8
|
import { reactivePick } from "@vueuse/core";
|
|
9
|
-
import { omit } from "@eslamdevui/ui/utils";
|
|
10
9
|
import { useAppConfig } from "#imports";
|
|
11
10
|
import { useLocalePro } from "../composables/useLocalePro";
|
|
12
|
-
import { transformUI } from "../utils";
|
|
11
|
+
import { transformUI, omit } from "../utils";
|
|
13
12
|
import { tv } from "../utils/tv";
|
|
14
13
|
defineOptions({ inheritAttrs: false });
|
|
15
14
|
const props = defineProps({
|
|
16
15
|
as: { type: null, required: false, default: "form" },
|
|
17
16
|
placeholder: { type: String, required: false },
|
|
18
|
-
autofocus: { type:
|
|
19
|
-
autoresize: { type:
|
|
20
|
-
rows: { type:
|
|
17
|
+
autofocus: { type: Boolean, required: false, default: true },
|
|
18
|
+
autoresize: { type: Boolean, required: false, default: true },
|
|
19
|
+
rows: { type: Number, required: false, default: 1 },
|
|
21
20
|
variant: { type: null, required: false },
|
|
22
21
|
error: { type: Error, required: false },
|
|
23
22
|
class: { type: null, required: false },
|
|
@@ -48,30 +47,30 @@ defineExpose({ textareaRef: textarea.value?.textareaRef });
|
|
|
48
47
|
</script>
|
|
49
48
|
|
|
50
49
|
<template>
|
|
51
|
-
<Primitive :as="as" :class="uiPro.root({ class: [props.ui?.root, props.class] })" @submit.prevent="submit">
|
|
52
|
-
<div v-if="!!slots.header" :class="uiPro.header({ class: props.ui?.header })">
|
|
53
|
-
<slot name="header" />
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<UTextarea
|
|
57
|
-
ref="textarea"
|
|
58
|
-
v-model="model"
|
|
59
|
-
:placeholder="placeholder || t('chatPrompt.placeholder')"
|
|
60
|
-
:disabled="Boolean(error)"
|
|
61
|
-
variant="none"
|
|
62
|
-
v-bind="{ ...textareaProps, ...$attrs }"
|
|
63
|
-
:ui="transformUI(omit(uiPro, ['root', 'body', 'header', 'footer']), props.ui)"
|
|
64
|
-
:class="uiPro.body({ class: props.ui?.body })"
|
|
65
|
-
@keydown.enter.exact.prevent="submit"
|
|
66
|
-
@keydown.esc="blur"
|
|
67
|
-
>
|
|
68
|
-
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
69
|
-
<slot :name="name" v-bind="slotData" />
|
|
70
|
-
</template>
|
|
71
|
-
</UTextarea>
|
|
72
|
-
|
|
73
|
-
<div v-if="!!slots.footer" :class="uiPro.footer({ class: props.ui?.footer })">
|
|
74
|
-
<slot name="footer" />
|
|
75
|
-
</div>
|
|
76
|
-
</Primitive>
|
|
50
|
+
<Primitive :as="as" :class="uiPro.root({ class: [props.ui?.root, props.class] })" @submit.prevent="submit">
|
|
51
|
+
<div v-if="!!slots.header" :class="uiPro.header({ class: props.ui?.header })">
|
|
52
|
+
<slot name="header" />
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<UTextarea
|
|
56
|
+
ref="textarea"
|
|
57
|
+
v-model="model"
|
|
58
|
+
:placeholder="placeholder || t('chatPrompt.placeholder')"
|
|
59
|
+
:disabled="Boolean(error)"
|
|
60
|
+
variant="none"
|
|
61
|
+
v-bind="{ ...textareaProps, ...$attrs }"
|
|
62
|
+
:ui="transformUI(omit(uiPro, ['root', 'body', 'header', 'footer']), props.ui)"
|
|
63
|
+
:class="uiPro.body({ class: props.ui?.body })"
|
|
64
|
+
@keydown.enter.exact.prevent="submit"
|
|
65
|
+
@keydown.esc="blur"
|
|
66
|
+
>
|
|
67
|
+
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
68
|
+
<slot :name="name" v-bind="slotData" />
|
|
69
|
+
</template>
|
|
70
|
+
</UTextarea>
|
|
71
|
+
|
|
72
|
+
<div v-if="!!slots.footer" :class="uiPro.footer({ class: props.ui?.footer })">
|
|
73
|
+
<slot name="footer" />
|
|
74
|
+
</div>
|
|
75
|
+
</Primitive>
|
|
77
76
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
-
import type { TextareaProps, TextareaSlots, ComponentConfig } from '
|
|
2
|
+
import type { TextareaProps, TextareaSlots, ComponentConfig } from '../types';
|
|
3
3
|
import theme from '#build/ui/chat-prompt';
|
|
4
4
|
type ChatPrompt = ComponentConfig<typeof theme, AppConfig, 'chatPrompt', 'ui'>;
|
|
5
5
|
export interface ChatPromptProps extends /** @vue-ignore */ Pick<TextareaProps, 'autofocusDelay' | 'autoresizeDelay' | 'maxrows' | 'icon' | 'avatar' | 'loading' | 'loadingIcon'> {
|
|
@@ -48,9 +48,9 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ChatPrompt
|
|
|
48
48
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
49
49
|
}>, {
|
|
50
50
|
as: any;
|
|
51
|
-
autofocus:
|
|
52
|
-
autoresize:
|
|
53
|
-
rows:
|
|
51
|
+
autofocus: boolean;
|
|
52
|
+
autoresize: boolean;
|
|
53
|
+
rows: number;
|
|
54
54
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ChatPromptSlots>;
|
|
55
55
|
export default _default;
|
|
56
56
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -61,14 +61,14 @@ const uiPro = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.chatPrompt
|
|
|
61
61
|
</script>
|
|
62
62
|
|
|
63
63
|
<template>
|
|
64
|
-
<UButton
|
|
65
|
-
:aria-label="t('chatPromptSubmit.label')"
|
|
66
|
-
v-bind="buttonProps"
|
|
67
|
-
:class="uiPro.base({ class: [props.ui?.base, props.class] })"
|
|
68
|
-
:ui="transformUI(uiPro, props.ui)"
|
|
69
|
-
>
|
|
70
|
-
<template v-for="(_, name) in slots" #[name]="slotData">
|
|
71
|
-
<slot :name="name" v-bind="slotData" />
|
|
72
|
-
</template>
|
|
73
|
-
</UButton>
|
|
64
|
+
<UButton
|
|
65
|
+
:aria-label="t('chatPromptSubmit.label')"
|
|
66
|
+
v-bind="buttonProps"
|
|
67
|
+
:class="uiPro.base({ class: [props.ui?.base, props.class] })"
|
|
68
|
+
:ui="transformUI(uiPro, props.ui)"
|
|
69
|
+
>
|
|
70
|
+
<template v-for="(_, name) in slots" #[name]="slotData">
|
|
71
|
+
<slot :name="name" v-bind="slotData" />
|
|
72
|
+
</template>
|
|
73
|
+
</UButton>
|
|
74
74
|
</template>
|
|
@@ -54,37 +54,37 @@ function onUpdate(value) {
|
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
<template>
|
|
57
|
-
<Primitive :as="!variant || variant === 'list' ? as : Label" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
58
|
-
<div :class="ui.container({ class: props.ui?.container })">
|
|
59
|
-
<CheckboxRoot
|
|
60
|
-
:id="id"
|
|
61
|
-
v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
|
|
62
|
-
v-model="modelValue"
|
|
63
|
-
:name="name"
|
|
64
|
-
:disabled="disabled"
|
|
65
|
-
:class="ui.base({ class: props.ui?.base })"
|
|
66
|
-
@update:model-value="onUpdate"
|
|
67
|
-
>
|
|
68
|
-
<template #default="{ modelValue }">
|
|
69
|
-
<CheckboxIndicator :class="ui.indicator({ class: props.ui?.indicator })">
|
|
70
|
-
<UIcon v-if="modelValue === 'indeterminate'" :name="indeterminateIcon || appConfig.ui.icons.minus" :class="ui.icon({ class: props.ui?.icon })" />
|
|
71
|
-
<UIcon v-else :name="icon || appConfig.ui.icons.check" :class="ui.icon({ class: props.ui?.icon })" />
|
|
72
|
-
</CheckboxIndicator>
|
|
73
|
-
</template>
|
|
74
|
-
</CheckboxRoot>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<div v-if="label || !!slots.label || (description || !!slots.description)" :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
78
|
-
<component :is="!variant || variant === 'list' ? Label : 'p'" v-if="label || !!slots.label" :for="id" :class="ui.label({ class: props.ui?.label })">
|
|
79
|
-
<slot name="label" :label="label">
|
|
80
|
-
{{ label }}
|
|
81
|
-
</slot>
|
|
82
|
-
</component>
|
|
83
|
-
<p v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
84
|
-
<slot name="description" :description="description">
|
|
85
|
-
{{ description }}
|
|
86
|
-
</slot>
|
|
87
|
-
</p>
|
|
88
|
-
</div>
|
|
89
|
-
</Primitive>
|
|
57
|
+
<Primitive :as="!variant || variant === 'list' ? as : Label" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
58
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
59
|
+
<CheckboxRoot
|
|
60
|
+
:id="id"
|
|
61
|
+
v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
|
|
62
|
+
v-model="modelValue"
|
|
63
|
+
:name="name"
|
|
64
|
+
:disabled="disabled"
|
|
65
|
+
:class="ui.base({ class: props.ui?.base })"
|
|
66
|
+
@update:model-value="onUpdate"
|
|
67
|
+
>
|
|
68
|
+
<template #default="{ modelValue }">
|
|
69
|
+
<CheckboxIndicator :class="ui.indicator({ class: props.ui?.indicator })">
|
|
70
|
+
<UIcon v-if="modelValue === 'indeterminate'" :name="indeterminateIcon || appConfig.ui.icons.minus" :class="ui.icon({ class: props.ui?.icon })" />
|
|
71
|
+
<UIcon v-else :name="icon || appConfig.ui.icons.check" :class="ui.icon({ class: props.ui?.icon })" />
|
|
72
|
+
</CheckboxIndicator>
|
|
73
|
+
</template>
|
|
74
|
+
</CheckboxRoot>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div v-if="label || !!slots.label || (description || !!slots.description)" :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
78
|
+
<component :is="!variant || variant === 'list' ? Label : 'p'" v-if="label || !!slots.label" :for="id" :class="ui.label({ class: props.ui?.label })">
|
|
79
|
+
<slot name="label" :label="label">
|
|
80
|
+
{{ label }}
|
|
81
|
+
</slot>
|
|
82
|
+
</component>
|
|
83
|
+
<p v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
84
|
+
<slot name="description" :description="description">
|
|
85
|
+
{{ description }}
|
|
86
|
+
</slot>
|
|
87
|
+
</p>
|
|
88
|
+
</div>
|
|
89
|
+
</Primitive>
|
|
90
90
|
</template>
|