@eslamdevui/ui 3.2.0-beta.2 → 3.2.1
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/auth-form.ts +20 -0
- package/.nuxt/ui/banner.ts +105 -0
- package/.nuxt/ui/blog-post.ts +140 -0
- package/.nuxt/ui/blog-posts.ts +14 -0
- package/.nuxt/ui/changelog-version.ts +41 -0
- package/.nuxt/ui/changelog-versions.ts +8 -0
- package/.nuxt/ui/chat-palette.ts +8 -0
- package/.nuxt/ui/content/content-navigation.ts +6 -4
- package/.nuxt/ui/content-navigation.ts +6 -4
- package/.nuxt/ui/footer-columns.ts +28 -0
- package/.nuxt/ui/footer.ts +11 -0
- package/.nuxt/ui/header.ts +30 -0
- package/.nuxt/ui/index.ts +32 -1
- package/.nuxt/ui/main.ts +3 -0
- package/.nuxt/ui/page-accordion.ts +7 -0
- package/.nuxt/ui/page-anchors.ts +30 -0
- package/.nuxt/ui/page-aside.ts +10 -0
- package/.nuxt/ui/page-body.ts +3 -0
- package/.nuxt/ui/page-card.ts +276 -0
- package/.nuxt/ui/page-columns.ts +3 -0
- package/.nuxt/ui/page-cta.ts +72 -0
- package/.nuxt/ui/page-feature.ts +31 -0
- package/.nuxt/ui/page-grid.ts +3 -0
- package/.nuxt/ui/page-header.ts +18 -0
- package/.nuxt/ui/page-hero.ts +46 -0
- package/.nuxt/ui/page-links.ts +25 -0
- package/.nuxt/ui/page-list.ts +8 -0
- package/.nuxt/ui/page-logos.ts +15 -0
- package/.nuxt/ui/page-marquee.ts +66 -0
- package/.nuxt/ui/page-section.ts +88 -0
- package/.nuxt/ui/page.ts +32 -0
- package/.nuxt/ui/pricing-plan.ts +101 -0
- package/.nuxt/ui/pricing-plans.ts +27 -0
- package/.nuxt/ui/pricing-table.ts +51 -0
- package/.nuxt/ui/user.ts +106 -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 -236
- package/cli/utils.mjs +31 -31
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- 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/AuthForm.vue +195 -0
- package/dist/runtime/components/AuthForm.vue.d.ts +85 -0
- 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/Banner.vue +113 -0
- package/dist/runtime/components/Banner.vue.d.ts +68 -0
- package/dist/runtime/components/BlogPost.vue +141 -0
- package/dist/runtime/components/BlogPost.vue.d.ts +59 -0
- package/dist/runtime/components/BlogPosts.vue +33 -0
- package/dist/runtime/components/BlogPosts.vue.d.ts +30 -0
- 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/ChangelogVersion.vue +165 -0
- package/dist/runtime/components/ChangelogVersion.vue.d.ts +58 -0
- package/dist/runtime/components/ChangelogVersions.vue +54 -0
- package/dist/runtime/components/ChangelogVersions.vue.d.ts +74 -0
- package/dist/runtime/components/ChatMessage.vue +35 -35
- package/dist/runtime/components/ChatMessages.vue +55 -55
- package/dist/runtime/components/ChatPalette.vue +32 -0
- package/dist/runtime/components/ChatPalette.vue.d.ts +24 -0
- package/dist/runtime/components/ChatPrompt.vue +26 -26
- package/dist/runtime/components/ChatPrompt.vue.d.ts +1 -1
- 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/CommandPalette.vue.d.ts +3 -3
- package/dist/runtime/components/Container.vue +3 -3
- package/dist/runtime/components/ContextMenu.vue +22 -22
- package/dist/runtime/components/ContextMenuContent.vue +105 -105
- package/dist/runtime/components/DashboardGroup.vue +3 -3
- package/dist/runtime/components/DashboardNavbar.vue +40 -40
- package/dist/runtime/components/DashboardPanel.vue +27 -27
- package/dist/runtime/components/DashboardResizeHandle.vue +7 -7
- package/dist/runtime/components/DashboardSearch.vue +20 -20
- package/dist/runtime/components/DashboardSearchButton.vue +43 -43
- package/dist/runtime/components/DashboardSidebar.vue +74 -74
- package/dist/runtime/components/DashboardSidebarCollapse.vue +7 -7
- package/dist/runtime/components/DashboardSidebarToggle.vue +7 -7
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -1
- package/dist/runtime/components/Drawer.vue +55 -55
- package/dist/runtime/components/DropdownMenu.vue +24 -24
- package/dist/runtime/components/DropdownMenuContent.vue +107 -107
- package/dist/runtime/components/Error.vue +22 -22
- package/dist/runtime/components/Error.vue.d.ts +1 -1
- package/dist/runtime/components/Footer.vue +44 -0
- package/dist/runtime/components/Footer.vue.d.ts +29 -0
- package/dist/runtime/components/FooterColumns.vue +68 -0
- package/dist/runtime/components/FooterColumns.vue.d.ts +52 -0
- package/dist/runtime/components/Form.vue +8 -8
- package/dist/runtime/components/FormField.vue +37 -37
- package/dist/runtime/components/Header.vue +137 -0
- package/dist/runtime/components/Header.vue.d.ts +72 -0
- 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/InputMenu.vue.d.ts +3 -3
- 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/Main.vue +23 -0
- package/dist/runtime/components/Main.vue.d.ts +20 -0
- 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/Page.vue +37 -0
- package/dist/runtime/components/Page.vue.d.ts +25 -0
- package/dist/runtime/components/PageAccordion.vue +26 -0
- package/dist/runtime/components/PageAccordion.vue.d.ts +21 -0
- package/dist/runtime/components/PageAnchors.vue +50 -0
- package/dist/runtime/components/PageAnchors.vue.d.ts +42 -0
- package/dist/runtime/components/PageAside.vue +36 -0
- package/dist/runtime/components/PageAside.vue.d.ts +27 -0
- package/dist/runtime/components/PageBody.vue +23 -0
- package/dist/runtime/components/PageBody.vue.d.ts +18 -0
- package/dist/runtime/components/PageCTA.vue +58 -0
- package/dist/runtime/components/PageCTA.vue.d.ts +49 -0
- package/dist/runtime/components/PageCard.vue +121 -0
- package/dist/runtime/components/PageCard.vue.d.ts +71 -0
- package/dist/runtime/components/PageColumns.vue +23 -0
- package/dist/runtime/components/PageColumns.vue.d.ts +18 -0
- package/dist/runtime/components/PageFeature.vue +71 -0
- package/dist/runtime/components/PageFeature.vue.d.ts +43 -0
- package/dist/runtime/components/PageGrid.vue +23 -0
- package/dist/runtime/components/PageGrid.vue.d.ts +18 -0
- package/dist/runtime/components/PageHeader.vue +58 -0
- package/dist/runtime/components/PageHeader.vue.d.ts +35 -0
- package/dist/runtime/components/PageHero.vue +67 -0
- package/dist/runtime/components/PageHero.vue.d.ts +49 -0
- package/dist/runtime/components/PageLinks.vue +55 -0
- package/dist/runtime/components/PageLinks.vue.d.ts +44 -0
- package/dist/runtime/components/PageList.vue +24 -0
- package/dist/runtime/components/PageList.vue.d.ts +21 -0
- package/dist/runtime/components/PageLogos.vue +64 -0
- package/dist/runtime/components/PageLogos.vue.d.ts +32 -0
- package/dist/runtime/components/PageMarquee.vue +40 -0
- package/dist/runtime/components/PageMarquee.vue.d.ts +30 -0
- package/dist/runtime/components/PageSection.vue +88 -0
- package/dist/runtime/components/PageSection.vue.d.ts +64 -0
- 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/PricingPlan.vue +129 -0
- package/dist/runtime/components/PricingPlan.vue.d.ts +109 -0
- package/dist/runtime/components/PricingPlans.vue +45 -0
- package/dist/runtime/components/PricingPlans.vue.d.ts +41 -0
- package/dist/runtime/components/PricingTable.vue +235 -0
- package/dist/runtime/components/PricingTable.vue.d.ts +98 -0
- 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/SelectMenu.vue.d.ts +3 -3
- 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 +38 -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/User.vue +69 -0
- package/dist/runtime/components/User.vue.d.ts +46 -0
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeButton.vue +16 -16
- package/dist/runtime/components/color-mode/ColorModeImage.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +19 -19
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +19 -19
- package/dist/runtime/components/content/ContentNavigation.vue +109 -109
- package/dist/runtime/components/content/ContentSearch.vue +25 -25
- package/dist/runtime/components/content/ContentSearchButton.vue +38 -38
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +58 -12
- package/dist/runtime/components/content/ContentSurround.vue +31 -31
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +52 -59
- package/dist/runtime/components/content/ContentToc.vue +88 -76
- package/dist/runtime/components/content/ContentToc.vue.d.ts +86 -88
- package/dist/runtime/components/locale/LocaleSelect.vue +20 -20
- package/dist/runtime/components/prose/A.vue +3 -3
- package/dist/runtime/components/prose/Accordion.vue +5 -5
- package/dist/runtime/components/prose/AccordionItem.vue +5 -5
- package/dist/runtime/components/prose/Badge.vue +3 -3
- package/dist/runtime/components/prose/Blockquote.vue +3 -3
- package/dist/runtime/components/prose/Callout.vue +27 -27
- package/dist/runtime/components/prose/Card.vue +43 -43
- package/dist/runtime/components/prose/CardGroup.vue +3 -3
- package/dist/runtime/components/prose/Code.vue +3 -3
- package/dist/runtime/components/prose/CodeCollapse.vue +16 -16
- package/dist/runtime/components/prose/CodeGroup.vue +15 -15
- package/dist/runtime/components/prose/CodeIcon.vue +1 -1
- package/dist/runtime/components/prose/CodePreview.vue +9 -9
- package/dist/runtime/components/prose/CodeTree.vue +61 -61
- package/dist/runtime/components/prose/Collapsible.vue +15 -15
- package/dist/runtime/components/prose/Em.vue +1 -1
- package/dist/runtime/components/prose/Field.vue +23 -23
- package/dist/runtime/components/prose/FieldGroup.vue +3 -3
- package/dist/runtime/components/prose/H1.vue +6 -6
- package/dist/runtime/components/prose/H2.vue +10 -10
- package/dist/runtime/components/prose/H3.vue +10 -10
- package/dist/runtime/components/prose/H4.vue +6 -6
- package/dist/runtime/components/prose/Hr.vue +1 -1
- package/dist/runtime/components/prose/Icon.vue +1 -1
- package/dist/runtime/components/prose/Img.vue +8 -8
- package/dist/runtime/components/prose/Kbd.vue +1 -1
- package/dist/runtime/components/prose/Li.vue +3 -3
- package/dist/runtime/components/prose/Ol.vue +3 -3
- package/dist/runtime/components/prose/P.vue +3 -3
- package/dist/runtime/components/prose/Pre.vue +20 -20
- package/dist/runtime/components/prose/Script.vue +3 -3
- package/dist/runtime/components/prose/Steps.vue +3 -3
- package/dist/runtime/components/prose/Strong.vue +3 -3
- package/dist/runtime/components/prose/Table.vue +5 -5
- package/dist/runtime/components/prose/Tabs.vue +14 -14
- package/dist/runtime/components/prose/TabsItem.vue +5 -5
- package/dist/runtime/components/prose/Tbody.vue +3 -3
- package/dist/runtime/components/prose/Td.vue +3 -3
- package/dist/runtime/components/prose/Th.vue +3 -3
- package/dist/runtime/components/prose/Thead.vue +3 -3
- package/dist/runtime/components/prose/Tr.vue +3 -3
- package/dist/runtime/components/prose/Ul.vue +3 -3
- package/dist/runtime/components/prose/callout/Caution.vue +3 -3
- package/dist/runtime/components/prose/callout/Note.vue +3 -3
- package/dist/runtime/components/prose/callout/Tip.vue +3 -3
- package/dist/runtime/components/prose/callout/Warning.vue +3 -3
- package/dist/runtime/inertia/components/Link.vue +12 -12
- package/dist/runtime/inertia/components/LinkBase.vue +15 -15
- package/dist/runtime/types/app.config.d.ts +6 -6
- package/dist/runtime/types/index.d.ts +33 -0
- package/dist/runtime/types/index.js +33 -0
- 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.DQZ75GCP.mjs → ui.DErCA3YU.mjs} +1247 -50
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
- package/vue-plugin.d.ts +5 -5
- package/.nuxt/ui/prose.ts +0 -321
|
@@ -126,100 +126,100 @@ defineExpose({
|
|
|
126
126
|
</script>
|
|
127
127
|
|
|
128
128
|
<template>
|
|
129
|
-
<SelectRoot
|
|
130
|
-
v-slot="{ modelValue, open }"
|
|
131
|
-
:name="name"
|
|
132
|
-
v-bind="rootProps"
|
|
133
|
-
:autocomplete="autocomplete"
|
|
134
|
-
:disabled="disabled"
|
|
135
|
-
:default-value="defaultValue"
|
|
136
|
-
:model-value="modelValue"
|
|
137
|
-
@update:model-value="onUpdate"
|
|
138
|
-
@update:open="onUpdateOpen"
|
|
139
|
-
>
|
|
140
|
-
<SelectTrigger :id="id" ref="triggerRef" :class="ui.base({ class: [props.ui?.base, props.class] })" v-bind="{ ...$attrs, ...ariaAttrs }">
|
|
141
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
142
|
-
<slot name="leading" :model-value="modelValue" :open="open" :ui="ui">
|
|
143
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
144
|
-
<UAvatar v-else-if="!!avatar" :size="props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="avatar" :class="ui.itemLeadingAvatar({ class: props.ui?.itemLeadingAvatar })" />
|
|
145
|
-
</slot>
|
|
146
|
-
</span>
|
|
147
|
-
|
|
148
|
-
<slot :model-value="modelValue" :open="open">
|
|
149
|
-
<template v-for="displayedModelValue in [displayValue(modelValue)]" :key="displayedModelValue">
|
|
150
|
-
<span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" :class="ui.value({ class: props.ui?.value })">
|
|
151
|
-
{{ displayedModelValue }}
|
|
152
|
-
</span>
|
|
153
|
-
<span v-else :class="ui.placeholder({ class: props.ui?.placeholder })">
|
|
154
|
-
{{ placeholder ?? "\xA0" }}
|
|
155
|
-
</span>
|
|
156
|
-
</template>
|
|
157
|
-
</slot>
|
|
158
|
-
|
|
159
|
-
<span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
160
|
-
<slot name="trailing" :model-value="modelValue" :open="open" :ui="ui">
|
|
161
|
-
<UIcon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
162
|
-
</slot>
|
|
163
|
-
</span>
|
|
164
|
-
</SelectTrigger>
|
|
165
|
-
|
|
166
|
-
<SelectPortal v-bind="portalProps">
|
|
167
|
-
<SelectContent :class="ui.content({ class: props.ui?.content })" v-bind="contentProps">
|
|
168
|
-
<slot name="content-top" />
|
|
169
|
-
|
|
170
|
-
<div role="presentation" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
171
|
-
<SelectGroup v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="ui.group({ class: props.ui?.group })">
|
|
172
|
-
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
173
|
-
<SelectLabel v-if="isSelectItem(item) && item.type === 'label'" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
|
|
174
|
-
{{ get(item, props.labelKey) }}
|
|
175
|
-
</SelectLabel>
|
|
176
|
-
|
|
177
|
-
<SelectSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator, item.class] })" />
|
|
178
|
-
|
|
179
|
-
<SelectItem
|
|
180
|
-
v-else
|
|
181
|
-
:class="ui.item({ class: [props.ui?.item, isSelectItem(item) && item.ui?.item, isSelectItem(item) && item.class] })"
|
|
182
|
-
:disabled="isSelectItem(item) && item.disabled"
|
|
183
|
-
:value="isSelectItem(item) ? get(item, props.valueKey) : item"
|
|
184
|
-
@select="isSelectItem(item) && item.onSelect?.($event)"
|
|
185
|
-
>
|
|
186
|
-
<slot name="item" :item="item" :index="index">
|
|
187
|
-
<slot name="item-leading" :item="item" :index="index">
|
|
188
|
-
<UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: [props.ui?.itemLeadingIcon, item.ui?.itemLeadingIcon] })" />
|
|
189
|
-
<UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize || props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: [props.ui?.itemLeadingAvatar, item.ui?.itemLeadingAvatar] })" />
|
|
190
|
-
<UChip
|
|
191
|
-
v-else-if="isSelectItem(item) && item.chip"
|
|
192
|
-
:size="item.ui?.itemLeadingChipSize || props.ui?.itemLeadingChipSize || ui.itemLeadingChipSize()"
|
|
193
|
-
inset
|
|
194
|
-
standalone
|
|
195
|
-
v-bind="item.chip"
|
|
196
|
-
:class="ui.itemLeadingChip({ class: [props.ui?.itemLeadingChip, item.ui?.itemLeadingChip] })"
|
|
197
|
-
/>
|
|
198
|
-
</slot>
|
|
199
|
-
|
|
200
|
-
<SelectItemText :class="ui.itemLabel({ class: [props.ui?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })">
|
|
201
|
-
<slot name="item-label" :item="item" :index="index">
|
|
202
|
-
{{ isSelectItem(item) ? get(item, props.labelKey) : item }}
|
|
203
|
-
</slot>
|
|
204
|
-
</SelectItemText>
|
|
205
|
-
|
|
206
|
-
<span :class="ui.itemTrailing({ class: [props.ui?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })">
|
|
207
|
-
<slot name="item-trailing" :item="item" :index="index" />
|
|
208
|
-
|
|
209
|
-
<SelectItemIndicator as-child>
|
|
210
|
-
<UIcon :name="selectedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" />
|
|
211
|
-
</SelectItemIndicator>
|
|
212
|
-
</span>
|
|
213
|
-
</slot>
|
|
214
|
-
</SelectItem>
|
|
215
|
-
</template>
|
|
216
|
-
</SelectGroup>
|
|
217
|
-
</div>
|
|
218
|
-
|
|
219
|
-
<slot name="content-bottom" />
|
|
220
|
-
|
|
221
|
-
<SelectArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
222
|
-
</SelectContent>
|
|
223
|
-
</SelectPortal>
|
|
224
|
-
</SelectRoot>
|
|
129
|
+
<SelectRoot
|
|
130
|
+
v-slot="{ modelValue, open }"
|
|
131
|
+
:name="name"
|
|
132
|
+
v-bind="rootProps"
|
|
133
|
+
:autocomplete="autocomplete"
|
|
134
|
+
:disabled="disabled"
|
|
135
|
+
:default-value="defaultValue"
|
|
136
|
+
:model-value="modelValue"
|
|
137
|
+
@update:model-value="onUpdate"
|
|
138
|
+
@update:open="onUpdateOpen"
|
|
139
|
+
>
|
|
140
|
+
<SelectTrigger :id="id" ref="triggerRef" :class="ui.base({ class: [props.ui?.base, props.class] })" v-bind="{ ...$attrs, ...ariaAttrs }">
|
|
141
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
142
|
+
<slot name="leading" :model-value="modelValue" :open="open" :ui="ui">
|
|
143
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
144
|
+
<UAvatar v-else-if="!!avatar" :size="props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="avatar" :class="ui.itemLeadingAvatar({ class: props.ui?.itemLeadingAvatar })" />
|
|
145
|
+
</slot>
|
|
146
|
+
</span>
|
|
147
|
+
|
|
148
|
+
<slot :model-value="modelValue" :open="open">
|
|
149
|
+
<template v-for="displayedModelValue in [displayValue(modelValue)]" :key="displayedModelValue">
|
|
150
|
+
<span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" :class="ui.value({ class: props.ui?.value })">
|
|
151
|
+
{{ displayedModelValue }}
|
|
152
|
+
</span>
|
|
153
|
+
<span v-else :class="ui.placeholder({ class: props.ui?.placeholder })">
|
|
154
|
+
{{ placeholder ?? "\xA0" }}
|
|
155
|
+
</span>
|
|
156
|
+
</template>
|
|
157
|
+
</slot>
|
|
158
|
+
|
|
159
|
+
<span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
160
|
+
<slot name="trailing" :model-value="modelValue" :open="open" :ui="ui">
|
|
161
|
+
<UIcon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
162
|
+
</slot>
|
|
163
|
+
</span>
|
|
164
|
+
</SelectTrigger>
|
|
165
|
+
|
|
166
|
+
<SelectPortal v-bind="portalProps">
|
|
167
|
+
<SelectContent :class="ui.content({ class: props.ui?.content })" v-bind="contentProps">
|
|
168
|
+
<slot name="content-top" />
|
|
169
|
+
|
|
170
|
+
<div role="presentation" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
171
|
+
<SelectGroup v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="ui.group({ class: props.ui?.group })">
|
|
172
|
+
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
173
|
+
<SelectLabel v-if="isSelectItem(item) && item.type === 'label'" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
|
|
174
|
+
{{ get(item, props.labelKey) }}
|
|
175
|
+
</SelectLabel>
|
|
176
|
+
|
|
177
|
+
<SelectSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator, item.class] })" />
|
|
178
|
+
|
|
179
|
+
<SelectItem
|
|
180
|
+
v-else
|
|
181
|
+
:class="ui.item({ class: [props.ui?.item, isSelectItem(item) && item.ui?.item, isSelectItem(item) && item.class] })"
|
|
182
|
+
:disabled="isSelectItem(item) && item.disabled"
|
|
183
|
+
:value="isSelectItem(item) ? get(item, props.valueKey) : item"
|
|
184
|
+
@select="isSelectItem(item) && item.onSelect?.($event)"
|
|
185
|
+
>
|
|
186
|
+
<slot name="item" :item="item" :index="index">
|
|
187
|
+
<slot name="item-leading" :item="item" :index="index">
|
|
188
|
+
<UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: [props.ui?.itemLeadingIcon, item.ui?.itemLeadingIcon] })" />
|
|
189
|
+
<UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize || props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: [props.ui?.itemLeadingAvatar, item.ui?.itemLeadingAvatar] })" />
|
|
190
|
+
<UChip
|
|
191
|
+
v-else-if="isSelectItem(item) && item.chip"
|
|
192
|
+
:size="item.ui?.itemLeadingChipSize || props.ui?.itemLeadingChipSize || ui.itemLeadingChipSize()"
|
|
193
|
+
inset
|
|
194
|
+
standalone
|
|
195
|
+
v-bind="item.chip"
|
|
196
|
+
:class="ui.itemLeadingChip({ class: [props.ui?.itemLeadingChip, item.ui?.itemLeadingChip] })"
|
|
197
|
+
/>
|
|
198
|
+
</slot>
|
|
199
|
+
|
|
200
|
+
<SelectItemText :class="ui.itemLabel({ class: [props.ui?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })">
|
|
201
|
+
<slot name="item-label" :item="item" :index="index">
|
|
202
|
+
{{ isSelectItem(item) ? get(item, props.labelKey) : item }}
|
|
203
|
+
</slot>
|
|
204
|
+
</SelectItemText>
|
|
205
|
+
|
|
206
|
+
<span :class="ui.itemTrailing({ class: [props.ui?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })">
|
|
207
|
+
<slot name="item-trailing" :item="item" :index="index" />
|
|
208
|
+
|
|
209
|
+
<SelectItemIndicator as-child>
|
|
210
|
+
<UIcon :name="selectedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" />
|
|
211
|
+
</SelectItemIndicator>
|
|
212
|
+
</span>
|
|
213
|
+
</slot>
|
|
214
|
+
</SelectItem>
|
|
215
|
+
</template>
|
|
216
|
+
</SelectGroup>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<slot name="content-bottom" />
|
|
220
|
+
|
|
221
|
+
<SelectArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
222
|
+
</SelectContent>
|
|
223
|
+
</SelectPortal>
|
|
224
|
+
</SelectRoot>
|
|
225
225
|
</template>
|
|
@@ -195,134 +195,134 @@ defineExpose({
|
|
|
195
195
|
</script>
|
|
196
196
|
|
|
197
197
|
<template>
|
|
198
|
-
<DefineCreateItemTemplate>
|
|
199
|
-
<ComboboxGroup :class="ui.group({ class: props.ui?.group })">
|
|
200
|
-
<ComboboxItem
|
|
201
|
-
:class="ui.item({ class: props.ui?.item })"
|
|
202
|
-
:value="searchTerm"
|
|
203
|
-
@select.prevent="emits('create', searchTerm)"
|
|
204
|
-
>
|
|
205
|
-
<span :class="ui.itemLabel({ class: props.ui?.itemLabel })">
|
|
206
|
-
<slot name="create-item-label" :item="searchTerm">
|
|
207
|
-
{{ t("selectMenu.create", { label: searchTerm }) }}
|
|
208
|
-
</slot>
|
|
209
|
-
</span>
|
|
210
|
-
</ComboboxItem>
|
|
211
|
-
</ComboboxGroup>
|
|
212
|
-
</DefineCreateItemTemplate>
|
|
213
|
-
|
|
214
|
-
<ComboboxRoot
|
|
215
|
-
:id="id"
|
|
216
|
-
v-slot="{ modelValue, open }"
|
|
217
|
-
v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
|
|
218
|
-
ignore-filter
|
|
219
|
-
as-child
|
|
220
|
-
:name="name"
|
|
221
|
-
:disabled="disabled"
|
|
222
|
-
@update:model-value="onUpdate"
|
|
223
|
-
@update:open="onUpdateOpen"
|
|
224
|
-
>
|
|
225
|
-
<ComboboxAnchor as-child>
|
|
226
|
-
<ComboboxTrigger ref="triggerRef" :class="ui.base({ class: [props.ui?.base, props.class] })" tabindex="0">
|
|
227
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
228
|
-
<slot name="leading" :model-value="modelValue" :open="open" :ui="ui">
|
|
229
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
230
|
-
<UAvatar v-else-if="!!avatar" :size="props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="avatar" :class="ui.itemLeadingAvatar({ class: props.ui?.itemLeadingAvatar })" />
|
|
231
|
-
</slot>
|
|
232
|
-
</span>
|
|
233
|
-
|
|
234
|
-
<slot :model-value="modelValue" :open="open">
|
|
235
|
-
<template v-for="displayedModelValue in [displayValue(modelValue)]" :key="displayedModelValue">
|
|
236
|
-
<span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" :class="ui.value({ class: props.ui?.value })">
|
|
237
|
-
{{ displayedModelValue }}
|
|
238
|
-
</span>
|
|
239
|
-
<span v-else :class="ui.placeholder({ class: props.ui?.placeholder })">
|
|
240
|
-
{{ placeholder ?? "\xA0" }}
|
|
241
|
-
</span>
|
|
242
|
-
</template>
|
|
243
|
-
</slot>
|
|
244
|
-
|
|
245
|
-
<span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
246
|
-
<slot name="trailing" :model-value="modelValue" :open="open" :ui="ui">
|
|
247
|
-
<UIcon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
248
|
-
</slot>
|
|
249
|
-
</span>
|
|
250
|
-
</ComboboxTrigger>
|
|
251
|
-
</ComboboxAnchor>
|
|
252
|
-
|
|
253
|
-
<ComboboxPortal v-bind="portalProps">
|
|
254
|
-
<ComboboxContent :class="ui.content({ class: props.ui?.content })" v-bind="contentProps">
|
|
255
|
-
<FocusScope trapped :class="ui.focusScope({ class: props.ui?.focusScope })">
|
|
256
|
-
<slot name="content-top" />
|
|
257
|
-
|
|
258
|
-
<ComboboxInput v-if="!!searchInput" v-model="searchTerm" :display-value="() => searchTerm" as-child>
|
|
259
|
-
<UInput autofocus autocomplete="off" :size="size" v-bind="searchInputProps" :class="ui.input({ class: props.ui?.input })" />
|
|
260
|
-
</ComboboxInput>
|
|
261
|
-
|
|
262
|
-
<ComboboxEmpty :class="ui.empty({ class: props.ui?.empty })">
|
|
263
|
-
<slot name="empty" :search-term="searchTerm">
|
|
264
|
-
{{ searchTerm ? t("selectMenu.noMatch", { searchTerm }) : t("selectMenu.noData") }}
|
|
265
|
-
</slot>
|
|
266
|
-
</ComboboxEmpty>
|
|
267
|
-
|
|
268
|
-
<div role="presentation" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
269
|
-
<ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'top'" />
|
|
270
|
-
|
|
271
|
-
<ComboboxGroup v-for="(group, groupIndex) in filteredGroups" :key="`group-${groupIndex}`" :class="ui.group({ class: props.ui?.group })">
|
|
272
|
-
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
273
|
-
<ComboboxLabel v-if="isSelectItem(item) && item.type === 'label'" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
|
|
274
|
-
{{ get(item, props.labelKey) }}
|
|
275
|
-
</ComboboxLabel>
|
|
276
|
-
|
|
277
|
-
<ComboboxSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator, item.class] })" />
|
|
278
|
-
|
|
279
|
-
<ComboboxItem
|
|
280
|
-
v-else
|
|
281
|
-
:class="ui.item({ class: [props.ui?.item, isSelectItem(item) && item.ui?.item, isSelectItem(item) && item.class] })"
|
|
282
|
-
:disabled="isSelectItem(item) && item.disabled"
|
|
283
|
-
:value="props.valueKey && isSelectItem(item) ? get(item, props.valueKey) : item"
|
|
284
|
-
@select="onSelect($event, item)"
|
|
285
|
-
>
|
|
286
|
-
<slot name="item" :item="item" :index="index">
|
|
287
|
-
<slot name="item-leading" :item="item" :index="index">
|
|
288
|
-
<UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: [props.ui?.itemLeadingIcon, item.ui?.itemLeadingIcon] })" />
|
|
289
|
-
<UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize || props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: [props.ui?.itemLeadingAvatar, item.ui?.itemLeadingAvatar] })" />
|
|
290
|
-
<UChip
|
|
291
|
-
v-else-if="isSelectItem(item) && item.chip"
|
|
292
|
-
:size="props.ui?.itemLeadingChipSize || ui.itemLeadingChipSize()"
|
|
293
|
-
inset
|
|
294
|
-
standalone
|
|
295
|
-
v-bind="item.chip"
|
|
296
|
-
:class="ui.itemLeadingChip({ class: [props.ui?.itemLeadingChip, item.ui?.itemLeadingChip] })"
|
|
297
|
-
/>
|
|
298
|
-
</slot>
|
|
299
|
-
|
|
300
|
-
<span :class="ui.itemLabel({ class: [props.ui?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })">
|
|
301
|
-
<slot name="item-label" :item="item" :index="index">
|
|
302
|
-
{{ isSelectItem(item) ? get(item, props.labelKey) : item }}
|
|
303
|
-
</slot>
|
|
304
|
-
</span>
|
|
305
|
-
|
|
306
|
-
<span :class="ui.itemTrailing({ class: [props.ui?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })">
|
|
307
|
-
<slot name="item-trailing" :item="item" :index="index" />
|
|
308
|
-
|
|
309
|
-
<ComboboxItemIndicator as-child>
|
|
310
|
-
<UIcon :name="selectedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" />
|
|
311
|
-
</ComboboxItemIndicator>
|
|
312
|
-
</span>
|
|
313
|
-
</slot>
|
|
314
|
-
</ComboboxItem>
|
|
315
|
-
</template>
|
|
316
|
-
</ComboboxGroup>
|
|
317
|
-
|
|
318
|
-
<ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'bottom'" />
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
<slot name="content-bottom" />
|
|
322
|
-
</FocusScope>
|
|
323
|
-
|
|
324
|
-
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
325
|
-
</ComboboxContent>
|
|
326
|
-
</ComboboxPortal>
|
|
327
|
-
</ComboboxRoot>
|
|
198
|
+
<DefineCreateItemTemplate>
|
|
199
|
+
<ComboboxGroup :class="ui.group({ class: props.ui?.group })">
|
|
200
|
+
<ComboboxItem
|
|
201
|
+
:class="ui.item({ class: props.ui?.item })"
|
|
202
|
+
:value="searchTerm"
|
|
203
|
+
@select.prevent="emits('create', searchTerm)"
|
|
204
|
+
>
|
|
205
|
+
<span :class="ui.itemLabel({ class: props.ui?.itemLabel })">
|
|
206
|
+
<slot name="create-item-label" :item="searchTerm">
|
|
207
|
+
{{ t("selectMenu.create", { label: searchTerm }) }}
|
|
208
|
+
</slot>
|
|
209
|
+
</span>
|
|
210
|
+
</ComboboxItem>
|
|
211
|
+
</ComboboxGroup>
|
|
212
|
+
</DefineCreateItemTemplate>
|
|
213
|
+
|
|
214
|
+
<ComboboxRoot
|
|
215
|
+
:id="id"
|
|
216
|
+
v-slot="{ modelValue, open }"
|
|
217
|
+
v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
|
|
218
|
+
ignore-filter
|
|
219
|
+
as-child
|
|
220
|
+
:name="name"
|
|
221
|
+
:disabled="disabled"
|
|
222
|
+
@update:model-value="onUpdate"
|
|
223
|
+
@update:open="onUpdateOpen"
|
|
224
|
+
>
|
|
225
|
+
<ComboboxAnchor as-child>
|
|
226
|
+
<ComboboxTrigger ref="triggerRef" :class="ui.base({ class: [props.ui?.base, props.class] })" tabindex="0">
|
|
227
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
228
|
+
<slot name="leading" :model-value="modelValue" :open="open" :ui="ui">
|
|
229
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
230
|
+
<UAvatar v-else-if="!!avatar" :size="props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="avatar" :class="ui.itemLeadingAvatar({ class: props.ui?.itemLeadingAvatar })" />
|
|
231
|
+
</slot>
|
|
232
|
+
</span>
|
|
233
|
+
|
|
234
|
+
<slot :model-value="modelValue" :open="open">
|
|
235
|
+
<template v-for="displayedModelValue in [displayValue(modelValue)]" :key="displayedModelValue">
|
|
236
|
+
<span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" :class="ui.value({ class: props.ui?.value })">
|
|
237
|
+
{{ displayedModelValue }}
|
|
238
|
+
</span>
|
|
239
|
+
<span v-else :class="ui.placeholder({ class: props.ui?.placeholder })">
|
|
240
|
+
{{ placeholder ?? "\xA0" }}
|
|
241
|
+
</span>
|
|
242
|
+
</template>
|
|
243
|
+
</slot>
|
|
244
|
+
|
|
245
|
+
<span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
246
|
+
<slot name="trailing" :model-value="modelValue" :open="open" :ui="ui">
|
|
247
|
+
<UIcon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
248
|
+
</slot>
|
|
249
|
+
</span>
|
|
250
|
+
</ComboboxTrigger>
|
|
251
|
+
</ComboboxAnchor>
|
|
252
|
+
|
|
253
|
+
<ComboboxPortal v-bind="portalProps">
|
|
254
|
+
<ComboboxContent :class="ui.content({ class: props.ui?.content })" v-bind="contentProps">
|
|
255
|
+
<FocusScope trapped :class="ui.focusScope({ class: props.ui?.focusScope })">
|
|
256
|
+
<slot name="content-top" />
|
|
257
|
+
|
|
258
|
+
<ComboboxInput v-if="!!searchInput" v-model="searchTerm" :display-value="() => searchTerm" as-child>
|
|
259
|
+
<UInput autofocus autocomplete="off" :size="size" v-bind="searchInputProps" :class="ui.input({ class: props.ui?.input })" />
|
|
260
|
+
</ComboboxInput>
|
|
261
|
+
|
|
262
|
+
<ComboboxEmpty :class="ui.empty({ class: props.ui?.empty })">
|
|
263
|
+
<slot name="empty" :search-term="searchTerm">
|
|
264
|
+
{{ searchTerm ? t("selectMenu.noMatch", { searchTerm }) : t("selectMenu.noData") }}
|
|
265
|
+
</slot>
|
|
266
|
+
</ComboboxEmpty>
|
|
267
|
+
|
|
268
|
+
<div role="presentation" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
269
|
+
<ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'top'" />
|
|
270
|
+
|
|
271
|
+
<ComboboxGroup v-for="(group, groupIndex) in filteredGroups" :key="`group-${groupIndex}`" :class="ui.group({ class: props.ui?.group })">
|
|
272
|
+
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
273
|
+
<ComboboxLabel v-if="isSelectItem(item) && item.type === 'label'" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
|
|
274
|
+
{{ get(item, props.labelKey) }}
|
|
275
|
+
</ComboboxLabel>
|
|
276
|
+
|
|
277
|
+
<ComboboxSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator, item.class] })" />
|
|
278
|
+
|
|
279
|
+
<ComboboxItem
|
|
280
|
+
v-else
|
|
281
|
+
:class="ui.item({ class: [props.ui?.item, isSelectItem(item) && item.ui?.item, isSelectItem(item) && item.class] })"
|
|
282
|
+
:disabled="isSelectItem(item) && item.disabled"
|
|
283
|
+
:value="props.valueKey && isSelectItem(item) ? get(item, props.valueKey) : item"
|
|
284
|
+
@select="onSelect($event, item)"
|
|
285
|
+
>
|
|
286
|
+
<slot name="item" :item="item" :index="index">
|
|
287
|
+
<slot name="item-leading" :item="item" :index="index">
|
|
288
|
+
<UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: [props.ui?.itemLeadingIcon, item.ui?.itemLeadingIcon] })" />
|
|
289
|
+
<UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize || props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: [props.ui?.itemLeadingAvatar, item.ui?.itemLeadingAvatar] })" />
|
|
290
|
+
<UChip
|
|
291
|
+
v-else-if="isSelectItem(item) && item.chip"
|
|
292
|
+
:size="props.ui?.itemLeadingChipSize || ui.itemLeadingChipSize()"
|
|
293
|
+
inset
|
|
294
|
+
standalone
|
|
295
|
+
v-bind="item.chip"
|
|
296
|
+
:class="ui.itemLeadingChip({ class: [props.ui?.itemLeadingChip, item.ui?.itemLeadingChip] })"
|
|
297
|
+
/>
|
|
298
|
+
</slot>
|
|
299
|
+
|
|
300
|
+
<span :class="ui.itemLabel({ class: [props.ui?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })">
|
|
301
|
+
<slot name="item-label" :item="item" :index="index">
|
|
302
|
+
{{ isSelectItem(item) ? get(item, props.labelKey) : item }}
|
|
303
|
+
</slot>
|
|
304
|
+
</span>
|
|
305
|
+
|
|
306
|
+
<span :class="ui.itemTrailing({ class: [props.ui?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })">
|
|
307
|
+
<slot name="item-trailing" :item="item" :index="index" />
|
|
308
|
+
|
|
309
|
+
<ComboboxItemIndicator as-child>
|
|
310
|
+
<UIcon :name="selectedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" />
|
|
311
|
+
</ComboboxItemIndicator>
|
|
312
|
+
</span>
|
|
313
|
+
</slot>
|
|
314
|
+
</ComboboxItem>
|
|
315
|
+
</template>
|
|
316
|
+
</ComboboxGroup>
|
|
317
|
+
|
|
318
|
+
<ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'bottom'" />
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<slot name="content-bottom" />
|
|
322
|
+
</FocusScope>
|
|
323
|
+
|
|
324
|
+
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
325
|
+
</ComboboxContent>
|
|
326
|
+
</ComboboxPortal>
|
|
327
|
+
</ComboboxRoot>
|
|
328
328
|
</template>
|
|
@@ -175,11 +175,11 @@ declare const _default: <T extends ArrayOrNested<SelectMenuItem>, VK extends Get
|
|
|
175
175
|
readonly onFocus?: ((payload: FocusEvent) => any) | undefined;
|
|
176
176
|
readonly onCreate?: ((item: string) => any) | undefined;
|
|
177
177
|
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
178
|
-
readonly "onUpdate:modelValue"?: ((payload: GetModelValue<T, VK, M>) => any) | undefined;
|
|
179
178
|
readonly onHighlight?: ((payload: {
|
|
180
179
|
ref: HTMLElement;
|
|
181
180
|
value: GetModelValue<T, VK, M>;
|
|
182
181
|
} | undefined) => any) | undefined;
|
|
182
|
+
readonly "onUpdate:modelValue"?: ((payload: GetModelValue<T, VK, M>) => any) | undefined;
|
|
183
183
|
readonly "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
184
184
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:open" | "onUpdate:modelValue" | "onHighlight" | "onUpdate:searchTerm" | "onCreate"> & (SelectMenuProps<T, VK, M> & {
|
|
185
185
|
searchTerm?: string;
|
|
@@ -289,10 +289,10 @@ declare const _default: <T extends ArrayOrNested<SelectMenuItem>, VK extends Get
|
|
|
289
289
|
}>): void;
|
|
290
290
|
attrs: any;
|
|
291
291
|
slots: SelectMenuSlots<T, VK, M, NestedItem<T>>;
|
|
292
|
-
emit: (((evt: "blur", payload: FocusEvent) => void) & ((evt: "change", payload: Event) => void) & ((evt: "focus", payload: FocusEvent) => void) & ((evt: "create", item: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "
|
|
292
|
+
emit: (((evt: "blur", payload: FocusEvent) => void) & ((evt: "change", payload: Event) => void) & ((evt: "focus", payload: FocusEvent) => void) & ((evt: "create", item: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "highlight", payload: {
|
|
293
293
|
ref: HTMLElement;
|
|
294
294
|
value: GetModelValue<T, VK, M>;
|
|
295
|
-
} | undefined) => void)) & ((evt: "update:searchTerm", value: string) => void);
|
|
295
|
+
} | undefined) => void) & ((evt: "update:modelValue", payload: GetModelValue<T, VK, M>) => void)) & ((evt: "update:searchTerm", value: string) => void);
|
|
296
296
|
}>) => import("vue").VNode & {
|
|
297
297
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
298
298
|
};
|
|
@@ -35,19 +35,19 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.separator ||
|
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<template>
|
|
38
|
-
<Separator v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
39
|
-
<div :class="ui.border({ class: props.ui?.border })" />
|
|
40
|
-
|
|
41
|
-
<template v-if="label || icon || avatar || !!slots.default">
|
|
42
|
-
<div :class="ui.container({ class: props.ui?.container })">
|
|
43
|
-
<slot>
|
|
44
|
-
<span v-if="label" :class="ui.label({ class: props.ui?.label })">{{ label }}</span>
|
|
45
|
-
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
46
|
-
<UAvatar v-else-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
47
|
-
</slot>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div :class="ui.border({ class: props.ui?.border })" />
|
|
51
|
-
</template>
|
|
52
|
-
</Separator>
|
|
38
|
+
<Separator v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
39
|
+
<div :class="ui.border({ class: props.ui?.border })" />
|
|
40
|
+
|
|
41
|
+
<template v-if="label || icon || avatar || !!slots.default">
|
|
42
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
43
|
+
<slot>
|
|
44
|
+
<span v-if="label" :class="ui.label({ class: props.ui?.label })">{{ label }}</span>
|
|
45
|
+
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
46
|
+
<UAvatar v-else-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
47
|
+
</slot>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div :class="ui.border({ class: props.ui?.border })" />
|
|
51
|
+
</template>
|
|
52
|
+
</Separator>
|
|
53
53
|
</template>
|
|
@@ -16,14 +16,14 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.skeleton || {
|
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
19
|
-
<Primitive
|
|
20
|
-
:as="as"
|
|
21
|
-
aria-busy="true"
|
|
22
|
-
aria-label="loading"
|
|
23
|
-
aria-live="polite"
|
|
24
|
-
role="alert"
|
|
25
|
-
:class="ui({ class: props.class })"
|
|
26
|
-
>
|
|
27
|
-
<slot />
|
|
28
|
-
</Primitive>
|
|
19
|
+
<Primitive
|
|
20
|
+
:as="as"
|
|
21
|
+
aria-busy="true"
|
|
22
|
+
aria-label="loading"
|
|
23
|
+
aria-live="polite"
|
|
24
|
+
role="alert"
|
|
25
|
+
:class="ui({ class: props.class })"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</Primitive>
|
|
29
29
|
</template>
|