@bitrix24/b24ui-nuxt 2.1.2 → 2.1.4
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/cli/templates.mjs +2 -2
- package/dist/meta.d.mts +1321 -192
- package/dist/meta.mjs +1321 -192
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Accordion.vue +9 -4
- package/dist/runtime/components/Advice.vue +9 -5
- package/dist/runtime/components/Alert.vue +9 -7
- package/dist/runtime/components/Avatar.vue +4 -2
- package/dist/runtime/components/AvatarGroup.vue +3 -3
- package/dist/runtime/components/Badge.vue +6 -1
- package/dist/runtime/components/Banner.vue +9 -8
- package/dist/runtime/components/Breadcrumb.vue +9 -4
- package/dist/runtime/components/Button.vue +12 -9
- package/dist/runtime/components/Calendar.vue +11 -5
- package/dist/runtime/components/Card.vue +4 -4
- package/dist/runtime/components/ChatMessage.vue +7 -5
- package/dist/runtime/components/ChatMessages.vue +4 -2
- package/dist/runtime/components/ChatPalette.vue +3 -3
- package/dist/runtime/components/ChatPrompt.vue +4 -3
- package/dist/runtime/components/ChatPromptSubmit.vue +1 -0
- package/dist/runtime/components/Checkbox.vue +9 -7
- package/dist/runtime/components/CheckboxGroup.vue +4 -2
- package/dist/runtime/components/Chip.vue +3 -0
- package/dist/runtime/components/Collapsible.vue +2 -2
- package/dist/runtime/components/ColorPicker.vue +7 -3
- package/dist/runtime/components/CommandPalette.vue +68 -23
- package/dist/runtime/components/ContextMenu.vue +1 -0
- package/dist/runtime/components/ContextMenuContent.vue +19 -6
- package/dist/runtime/components/Countdown.vue +8 -1
- package/dist/runtime/components/DashboardSearch.vue +1 -0
- package/dist/runtime/components/DashboardSearchButton.vue +2 -1
- package/dist/runtime/components/DescriptionList.vue +12 -4
- package/dist/runtime/components/DropdownMenu.vue +2 -1
- package/dist/runtime/components/DropdownMenuContent.vue +21 -7
- package/dist/runtime/components/Empty.vue +9 -8
- package/dist/runtime/components/Error.vue +5 -5
- package/dist/runtime/components/FileUpload.vue +15 -8
- package/dist/runtime/components/FormField.vue +11 -11
- package/dist/runtime/components/Input.vue +8 -3
- package/dist/runtime/components/InputDate.vue +9 -2
- package/dist/runtime/components/InputMenu.vue +50 -32
- package/dist/runtime/components/InputNumber.vue +5 -2
- package/dist/runtime/components/InputTags.vue +12 -3
- package/dist/runtime/components/InputTime.vue +8 -2
- package/dist/runtime/components/Kbd.vue +1 -1
- package/dist/runtime/components/Modal.vue +11 -8
- package/dist/runtime/components/Navbar.vue +1 -1
- package/dist/runtime/components/NavbarDivider.vue +1 -1
- package/dist/runtime/components/NavbarSection.vue +2 -1
- package/dist/runtime/components/NavbarSpacer.vue +1 -1
- package/dist/runtime/components/NavigationMenu.vue +43 -12
- package/dist/runtime/components/PageCard.vue +10 -9
- package/dist/runtime/components/PageLinks.vue +9 -7
- package/dist/runtime/components/Pagination.vue +8 -8
- package/dist/runtime/components/PinInput.vue +2 -0
- package/dist/runtime/components/Popover.vue +2 -2
- package/dist/runtime/components/Progress.vue +6 -6
- package/dist/runtime/components/RadioGroup.d.vue.ts +2 -2
- package/dist/runtime/components/RadioGroup.vue +10 -4
- package/dist/runtime/components/RadioGroup.vue.d.ts +2 -2
- package/dist/runtime/components/Range.vue +5 -4
- package/dist/runtime/components/Select.vue +25 -11
- package/dist/runtime/components/SelectMenu.vue +47 -25
- package/dist/runtime/components/Separator.vue +7 -7
- package/dist/runtime/components/Sidebar.vue +1 -1
- package/dist/runtime/components/SidebarBody.vue +1 -1
- package/dist/runtime/components/SidebarFooter.vue +1 -1
- package/dist/runtime/components/SidebarHeader.vue +1 -1
- package/dist/runtime/components/SidebarHeading.vue +1 -1
- package/dist/runtime/components/SidebarLayout.vue +18 -13
- package/dist/runtime/components/SidebarSection.vue +2 -1
- package/dist/runtime/components/SidebarSpacer.vue +1 -1
- package/dist/runtime/components/Skeleton.vue +1 -0
- package/dist/runtime/components/Slideover.vue +10 -7
- package/dist/runtime/components/Stepper.vue +12 -9
- package/dist/runtime/components/Switch.vue +10 -6
- package/dist/runtime/components/Table.d.vue.ts +2 -2
- package/dist/runtime/components/Table.vue +33 -15
- package/dist/runtime/components/Table.vue.d.ts +2 -2
- package/dist/runtime/components/TableWrapper.vue +1 -0
- package/dist/runtime/components/Tabs.d.vue.ts +3 -3
- package/dist/runtime/components/Tabs.vue +24 -15
- package/dist/runtime/components/Tabs.vue.d.ts +3 -3
- package/dist/runtime/components/Textarea.vue +8 -3
- package/dist/runtime/components/Timeline.vue +9 -6
- package/dist/runtime/components/Toast.vue +10 -6
- package/dist/runtime/components/Toaster.vue +2 -0
- package/dist/runtime/components/Tooltip.vue +4 -4
- package/dist/runtime/components/User.vue +13 -6
- package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +2 -9
- package/dist/runtime/components/color-mode/ColorModeButton.vue +8 -13
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +2 -9
- package/dist/runtime/components/content/ContentSearch.vue +59 -68
- package/dist/runtime/components/content/ContentSearchButton.vue +2 -1
- package/dist/runtime/components/content/ContentSurround.vue +6 -4
- package/dist/runtime/components/content/ContentToc.vue +13 -10
- package/dist/runtime/components/prose/A.vue +1 -1
- package/dist/runtime/components/prose/Blockquote.vue +1 -1
- package/dist/runtime/components/prose/Callout.vue +4 -1
- package/dist/runtime/components/prose/Card.vue +5 -3
- package/dist/runtime/components/prose/Code.vue +1 -0
- package/dist/runtime/components/prose/CodeCollapse.vue +3 -2
- package/dist/runtime/components/prose/CodeGroup.vue +6 -6
- package/dist/runtime/components/prose/CodePreview.vue +3 -3
- package/dist/runtime/components/prose/Collapsible.vue +3 -2
- package/dist/runtime/components/prose/Em.vue +1 -1
- package/dist/runtime/components/prose/Field.vue +7 -7
- package/dist/runtime/components/prose/H1.vue +1 -0
- package/dist/runtime/components/prose/H2.vue +4 -2
- package/dist/runtime/components/prose/H3.vue +4 -2
- package/dist/runtime/components/prose/H4.vue +4 -2
- package/dist/runtime/components/prose/H5.vue +1 -0
- package/dist/runtime/components/prose/H6.vue +1 -0
- package/dist/runtime/components/prose/Hr.vue +1 -1
- package/dist/runtime/components/prose/Img.vue +4 -0
- package/dist/runtime/components/prose/Li.vue +1 -1
- package/dist/runtime/components/prose/Ol.vue +1 -1
- package/dist/runtime/components/prose/P.vue +1 -1
- package/dist/runtime/components/prose/Pre.vue +6 -5
- package/dist/runtime/components/prose/Strong.vue +1 -1
- package/dist/runtime/components/prose/Table.d.vue.ts +0 -3
- package/dist/runtime/components/prose/Table.vue +2 -1
- package/dist/runtime/components/prose/Table.vue.d.ts +0 -3
- package/dist/runtime/components/prose/Tbody.vue +1 -1
- package/dist/runtime/components/prose/Td.vue +1 -1
- package/dist/runtime/components/prose/Th.vue +1 -1
- package/dist/runtime/components/prose/Thead.vue +1 -1
- package/dist/runtime/components/prose/Tr.vue +1 -1
- package/dist/runtime/components/prose/Ul.vue +1 -1
- package/dist/runtime/composables/useContentSearch.d.ts +5 -0
- package/dist/runtime/composables/useContentSearch.js +30 -1
- package/dist/runtime/inertia/stubs.js +1 -1
- package/dist/runtime/types/index.d.ts +3 -0
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/utils/virtualizer.d.ts +6 -0
- package/dist/runtime/utils/virtualizer.js +32 -0
- package/dist/shared/{b24ui-nuxt.B9uYyQGR.mjs → b24ui-nuxt.Bs0V9FLV.mjs} +25 -19
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +11 -11
- package/dist/runtime/vue/components/color-mode/ColorModeButton.d.vue.ts +0 -12
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +0 -83
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +0 -12
|
@@ -119,6 +119,7 @@ defineExpose({
|
|
|
119
119
|
:ref="(el) => inputsRef[index] = el"
|
|
120
120
|
:type="type"
|
|
121
121
|
:part="segment.part"
|
|
122
|
+
data-slot="segment"
|
|
122
123
|
:class="b24ui.segment({ class: props.b24ui?.segment })"
|
|
123
124
|
:data-segment="segment.part"
|
|
124
125
|
>
|
|
@@ -134,6 +135,7 @@ defineExpose({
|
|
|
134
135
|
:default-value="defaultValue"
|
|
135
136
|
:name="name"
|
|
136
137
|
:disabled="disabled"
|
|
138
|
+
data-slot="base"
|
|
137
139
|
:class="b24ui.base({ class: [props.b24ui?.base, props.class] })"
|
|
138
140
|
@update:model-value="onUpdate"
|
|
139
141
|
@blur="onBlur"
|
|
@@ -141,6 +143,7 @@ defineExpose({
|
|
|
141
143
|
>
|
|
142
144
|
<B24Badge
|
|
143
145
|
v-if="isTag"
|
|
146
|
+
data-slot="tag"
|
|
144
147
|
:class="b24ui.tag({ class: props.b24ui?.tag })"
|
|
145
148
|
:color="props.tagColor"
|
|
146
149
|
:label="props.tag"
|
|
@@ -155,6 +158,7 @@ defineExpose({
|
|
|
155
158
|
<slot name="separator" :b24ui="b24ui">
|
|
156
159
|
<Component
|
|
157
160
|
:is="separatorIcon || icons.minus"
|
|
161
|
+
data-slot="separatorIcon"
|
|
158
162
|
:class="b24ui.separatorIcon({ class: props.b24ui?.separatorIcon })"
|
|
159
163
|
/>
|
|
160
164
|
</slot>
|
|
@@ -163,27 +167,30 @@ defineExpose({
|
|
|
163
167
|
|
|
164
168
|
<slot :b24ui="b24ui" />
|
|
165
169
|
|
|
166
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
170
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
167
171
|
<slot name="leading" :b24ui="b24ui">
|
|
168
172
|
<Component
|
|
169
173
|
:is="leadingIconName"
|
|
170
174
|
v-if="isLeading && leadingIconName"
|
|
175
|
+
data-slot="leadingIcon"
|
|
171
176
|
:class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
|
|
172
177
|
/>
|
|
173
178
|
<B24Avatar
|
|
174
179
|
v-else-if="!!avatar"
|
|
175
180
|
:size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
|
|
176
181
|
v-bind="avatar"
|
|
182
|
+
data-slot="leadingAvatar"
|
|
177
183
|
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
178
184
|
/>
|
|
179
185
|
</slot>
|
|
180
186
|
</span>
|
|
181
187
|
|
|
182
|
-
<span v-if="isTrailing || !!slots.trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
188
|
+
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
183
189
|
<slot name="trailing" :b24ui="b24ui">
|
|
184
190
|
<Component
|
|
185
191
|
:is="trailingIconName"
|
|
186
192
|
v-if="trailingIconName"
|
|
193
|
+
data-slot="trailingIcon"
|
|
187
194
|
:class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
|
|
188
195
|
/>
|
|
189
196
|
</slot>
|
|
@@ -15,6 +15,7 @@ import { useFormField } from "../composables/useFormField";
|
|
|
15
15
|
import { useLocale } from "../composables/useLocale";
|
|
16
16
|
import { usePortal } from "../composables/usePortal";
|
|
17
17
|
import { compare, get, getDisplayValue, isArrayOfArray } from "../utils";
|
|
18
|
+
import { getEstimateSize } from "../utils/virtualizer";
|
|
18
19
|
import { tv } from "../utils/tv";
|
|
19
20
|
import icons from "../dictionary/icons";
|
|
20
21
|
import B24Badge from "./Badge.vue";
|
|
@@ -80,16 +81,12 @@ const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "
|
|
|
80
81
|
const portalProps = usePortal(toRef(() => props.portal));
|
|
81
82
|
const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8, position: "popper" }));
|
|
82
83
|
const arrowProps = toRef(() => defu(typeof props.arrow === "boolean" ? {} : props.arrow, { width: 20, height: 10 }));
|
|
83
|
-
const virtualizerProps = toRef(() =>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
lg: 36,
|
|
90
|
-
xl: 40
|
|
91
|
-
}[props.size || "md"]
|
|
92
|
-
}));
|
|
84
|
+
const virtualizerProps = toRef(() => {
|
|
85
|
+
if (!props.virtualize) return false;
|
|
86
|
+
return defu(typeof props.virtualize === "boolean" ? {} : props.virtualize, {
|
|
87
|
+
estimateSize: getEstimateSize(items.value, inputSize.value || "md", props.descriptionKey)
|
|
88
|
+
});
|
|
89
|
+
});
|
|
93
90
|
const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, size: formGroupSize, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props);
|
|
94
91
|
const { orientation, size: fieldGroupSize } = useFieldGroup(props);
|
|
95
92
|
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(toRef(() => defu(props, { trailingIcon: icons.chevronDown })));
|
|
@@ -230,6 +227,11 @@ function onRemoveTag(event, modelValue) {
|
|
|
230
227
|
onUpdate(filteredValue);
|
|
231
228
|
}
|
|
232
229
|
}
|
|
230
|
+
function onCreate(e) {
|
|
231
|
+
e.preventDefault();
|
|
232
|
+
e.stopPropagation();
|
|
233
|
+
emits("create", searchTerm.value);
|
|
234
|
+
}
|
|
233
235
|
function onSelect(e, item) {
|
|
234
236
|
if (!isInputItem(item)) {
|
|
235
237
|
return;
|
|
@@ -251,14 +253,16 @@ defineExpose({
|
|
|
251
253
|
<template>
|
|
252
254
|
<DefineCreateItemTemplate>
|
|
253
255
|
<ComboboxItem
|
|
256
|
+
data-slot="item"
|
|
254
257
|
:class="b24ui.item({ addNew: true, class: props.b24ui?.item })"
|
|
255
258
|
:value="searchTerm"
|
|
256
|
-
@select
|
|
259
|
+
@select="onCreate"
|
|
257
260
|
>
|
|
258
|
-
<span :class="b24ui.itemLabel({ addNew: true, class: props.b24ui?.itemLabel })">
|
|
261
|
+
<span data-slot="itemLabel" :class="b24ui.itemLabel({ addNew: true, class: props.b24ui?.itemLabel })">
|
|
259
262
|
<slot name="create-item-label" :item="searchTerm">
|
|
260
263
|
<Component
|
|
261
264
|
:is="icons.plus"
|
|
265
|
+
data-slot="itemLeadingIcon"
|
|
262
266
|
:class="b24ui.itemLeadingIcon({ addNew: true, class: props.b24ui?.itemLeadingIcon })"
|
|
263
267
|
/>
|
|
264
268
|
{{ t("inputMenu.create", { label: searchTerm }) }}
|
|
@@ -268,14 +272,15 @@ defineExpose({
|
|
|
268
272
|
</DefineCreateItemTemplate>
|
|
269
273
|
|
|
270
274
|
<DefineItemTemplate v-slot="{ item, index }">
|
|
271
|
-
<ComboboxLabel v-if="isInputItem(item) && item.type === 'label'" :class="b24ui.label({ class: [props.b24ui?.label, item.b24ui?.label, item.class] })">
|
|
275
|
+
<ComboboxLabel v-if="isInputItem(item) && item.type === 'label'" data-slot="label" :class="b24ui.label({ class: [props.b24ui?.label, item.b24ui?.label, item.class] })">
|
|
272
276
|
{{ get(item, props.labelKey) }}
|
|
273
277
|
</ComboboxLabel>
|
|
274
278
|
|
|
275
|
-
<ComboboxSeparator v-else-if="isInputItem(item) && item.type === 'separator'" :class="b24ui.separator({ class: [props.b24ui?.separator, item.b24ui?.separator, item.class] })" />
|
|
279
|
+
<ComboboxSeparator v-else-if="isInputItem(item) && item.type === 'separator'" data-slot="separator" :class="b24ui.separator({ class: [props.b24ui?.separator, item.b24ui?.separator, item.class] })" />
|
|
276
280
|
|
|
277
281
|
<ComboboxItem
|
|
278
282
|
v-else
|
|
283
|
+
data-slot="item"
|
|
279
284
|
:class="b24ui.item({ class: [props.b24ui?.item, isInputItem(item) && item.b24ui?.item, isInputItem(item) && item.class], colorItem: isInputItem(item) ? item?.color : void 0 })"
|
|
280
285
|
:disabled="isInputItem(item) && item.disabled"
|
|
281
286
|
:value="props.valueKey && isInputItem(item) ? get(item, props.valueKey) : item"
|
|
@@ -283,11 +288,11 @@ defineExpose({
|
|
|
283
288
|
>
|
|
284
289
|
<slot name="item" :item="item" :index="index" :b24ui="b24ui">
|
|
285
290
|
<slot name="item-leading" :item="item" :index="index" :b24ui="b24ui">
|
|
286
|
-
<B24Avatar v-if="isInputItem(item) && item.avatar" :size="item.b24ui?.itemLeadingAvatarSize || props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: [props.b24ui?.itemLeadingAvatar, item.b24ui?.itemLeadingAvatar], colorItem: item?.color })" />
|
|
291
|
+
<B24Avatar v-if="isInputItem(item) && item.avatar" :size="item.b24ui?.itemLeadingAvatarSize || props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()" v-bind="item.avatar" data-slot="itemLeadingAvatar" :class="b24ui.itemLeadingAvatar({ class: [props.b24ui?.itemLeadingAvatar, item.b24ui?.itemLeadingAvatar], colorItem: item?.color })" />
|
|
287
292
|
</slot>
|
|
288
293
|
|
|
289
|
-
<span :class="b24ui.itemWrapper({ class: [props.b24ui?.itemWrapper, isInputItem(item) && item.b24ui?.itemWrapper] })">
|
|
290
|
-
<span :class="b24ui.itemLabel({ class: [props.b24ui?.itemLabel, isInputItem(item) && item.b24ui?.itemLabel] })">
|
|
294
|
+
<span data-slot="itemWrapper" :class="b24ui.itemWrapper({ class: [props.b24ui?.itemWrapper, isInputItem(item) && item.b24ui?.itemWrapper] })">
|
|
295
|
+
<span data-slot="itemLabel" :class="b24ui.itemLabel({ class: [props.b24ui?.itemLabel, isInputItem(item) && item.b24ui?.itemLabel] })">
|
|
291
296
|
<slot name="item-label" :item="item" :index="index">
|
|
292
297
|
{{ isInputItem(item) ? get(item, props.labelKey) : item }}
|
|
293
298
|
</slot>
|
|
@@ -295,6 +300,7 @@ defineExpose({
|
|
|
295
300
|
|
|
296
301
|
<span
|
|
297
302
|
v-if="isInputItem(item) && (get(item, props.descriptionKey) || !!slots['item-description'])"
|
|
303
|
+
data-slot="itemDescription"
|
|
298
304
|
:class="b24ui.itemDescription({ class: [props.b24ui?.itemDescription, isInputItem(item) && item.b24ui?.itemDescription] })"
|
|
299
305
|
>
|
|
300
306
|
<slot
|
|
@@ -307,10 +313,11 @@ defineExpose({
|
|
|
307
313
|
</span>
|
|
308
314
|
</span>
|
|
309
315
|
|
|
310
|
-
<span :class="b24ui.itemTrailing({ class: [props.b24ui?.itemTrailing, isInputItem(item) && item.b24ui?.itemTrailing], colorItem: isInputItem(item) ? item?.color : void 0 })">
|
|
316
|
+
<span data-slot="itemTrailing" :class="b24ui.itemTrailing({ class: [props.b24ui?.itemTrailing, isInputItem(item) && item.b24ui?.itemTrailing], colorItem: isInputItem(item) ? item?.color : void 0 })">
|
|
311
317
|
<ComboboxItemIndicator as-child>
|
|
312
318
|
<Component
|
|
313
319
|
:is="selectedIcon || icons.check"
|
|
320
|
+
data-slot="itemTrailingIcon"
|
|
314
321
|
:class="b24ui.itemTrailingIcon({ class: [props.b24ui?.itemTrailingIcon, isInputItem(item) && item.b24ui?.itemTrailingIcon], colorItem: isInputItem(item) ? item?.color : void 0 })"
|
|
315
322
|
/>
|
|
316
323
|
</ComboboxItemIndicator>
|
|
@@ -319,6 +326,7 @@ defineExpose({
|
|
|
319
326
|
<Component
|
|
320
327
|
:is="item.icon"
|
|
321
328
|
v-if="isInputItem(item) && item.icon"
|
|
329
|
+
data-slot="itemLeadingIcon"
|
|
322
330
|
:class="b24ui.itemLeadingIcon({ class: [props.b24ui?.itemLeadingIcon, item.b24ui?.itemLeadingIcon], colorItem: item?.color })"
|
|
323
331
|
/>
|
|
324
332
|
<B24Chip
|
|
@@ -327,6 +335,7 @@ defineExpose({
|
|
|
327
335
|
inset
|
|
328
336
|
standalone
|
|
329
337
|
v-bind="item.chip"
|
|
338
|
+
data-slot="itemLeadingChip"
|
|
330
339
|
:class="b24ui.itemLeadingChip({ class: [props.b24ui?.itemLeadingChip, item.b24ui?.itemLeadingChip], colorItem: item?.color })"
|
|
331
340
|
/>
|
|
332
341
|
</slot>
|
|
@@ -340,21 +349,22 @@ defineExpose({
|
|
|
340
349
|
v-bind="rootProps"
|
|
341
350
|
:name="name"
|
|
342
351
|
:disabled="disabled"
|
|
352
|
+
data-slot="root"
|
|
343
353
|
:class="b24ui.root({ class: [props.b24ui?.root, props.class] })"
|
|
344
354
|
:as-child="!!multiple"
|
|
345
355
|
ignore-filter
|
|
346
356
|
@update:model-value="onUpdate"
|
|
347
357
|
@update:open="onUpdateOpen"
|
|
348
|
-
@keydown.enter="$event.preventDefault()"
|
|
349
358
|
>
|
|
350
359
|
<B24Badge
|
|
351
360
|
v-if="!multiple && isTag"
|
|
361
|
+
data-slot="tag"
|
|
352
362
|
:class="b24ui.tag({ class: props.b24ui?.tag })"
|
|
353
363
|
:color="props.tagColor"
|
|
354
364
|
:label="props.tag"
|
|
355
365
|
size="xs"
|
|
356
366
|
/>
|
|
357
|
-
<ComboboxAnchor :as-child="!multiple" :class="b24ui.base({ class: props.b24ui?.base })">
|
|
367
|
+
<ComboboxAnchor :as-child="!multiple" data-slot="base" :class="b24ui.base({ class: props.b24ui?.base })">
|
|
358
368
|
<TagsInputRoot
|
|
359
369
|
v-if="multiple"
|
|
360
370
|
v-slot="{ modelValue: tags }"
|
|
@@ -369,22 +379,24 @@ defineExpose({
|
|
|
369
379
|
>
|
|
370
380
|
<B24Badge
|
|
371
381
|
v-if="!!multiple && isTag"
|
|
382
|
+
data-slot="tag"
|
|
372
383
|
:class="b24ui.tag({ class: props.b24ui?.tag })"
|
|
373
384
|
:color="props.tagColor"
|
|
374
385
|
:label="props.tag"
|
|
375
386
|
size="xs"
|
|
376
387
|
/>
|
|
377
|
-
<TagsInputItem v-for="(item, index) in tags" :key="index" :value="item" :class="b24ui.tagsItem({ class: [props.b24ui?.tagsItem, isInputItem(item) && item.b24ui?.tagsItem] })">
|
|
378
|
-
<TagsInputItemText :class="b24ui.tagsItemText({ class: [props.b24ui?.tagsItemText, isInputItem(item) && item.b24ui?.tagsItemText] })">
|
|
388
|
+
<TagsInputItem v-for="(item, index) in tags" :key="index" :value="item" data-slot="tagsItem" :class="b24ui.tagsItem({ class: [props.b24ui?.tagsItem, isInputItem(item) && item.b24ui?.tagsItem] })">
|
|
389
|
+
<TagsInputItemText data-slot="tagsItemText" :class="b24ui.tagsItemText({ class: [props.b24ui?.tagsItemText, isInputItem(item) && item.b24ui?.tagsItemText] })">
|
|
379
390
|
<slot name="tags-item-text" :item="item" :index="index">
|
|
380
391
|
{{ displayValue(item) }}
|
|
381
392
|
</slot>
|
|
382
393
|
</TagsInputItemText>
|
|
383
394
|
|
|
384
|
-
<TagsInputItemDelete :class="b24ui.tagsItemDelete({ class: [props.b24ui?.tagsItemDelete, isInputItem(item) && item.b24ui?.tagsItemDelete] })" :disabled="disabled">
|
|
395
|
+
<TagsInputItemDelete data-slot="tagsItemDelete" :class="b24ui.tagsItemDelete({ class: [props.b24ui?.tagsItemDelete, isInputItem(item) && item.b24ui?.tagsItemDelete] })" :disabled="disabled">
|
|
385
396
|
<slot name="tags-item-delete" :item="item" :index="index" :b24ui="b24ui">
|
|
386
397
|
<Component
|
|
387
398
|
:is="deleteIcon || icons.close"
|
|
399
|
+
data-slot="tagsItemDeleteIcon"
|
|
388
400
|
:class="b24ui.tagsItemDeleteIcon({ class: [props.b24ui?.tagsItemDeleteIcon, isInputItem(item) && item.b24ui?.tagsItemDeleteIcon] })"
|
|
389
401
|
/>
|
|
390
402
|
</slot>
|
|
@@ -397,8 +409,9 @@ defineExpose({
|
|
|
397
409
|
ref="inputRef"
|
|
398
410
|
v-bind="{ ...$attrs, ...ariaAttrs }"
|
|
399
411
|
:placeholder="placeholder"
|
|
412
|
+
data-slot="tagsInput"
|
|
400
413
|
:class="b24ui.tagsInput({ class: props.b24ui?.tagsInput })"
|
|
401
|
-
@
|
|
414
|
+
@change.stop
|
|
402
415
|
/>
|
|
403
416
|
</ComboboxInput>
|
|
404
417
|
</TagsInputRoot>
|
|
@@ -414,30 +427,34 @@ defineExpose({
|
|
|
414
427
|
:required="required"
|
|
415
428
|
@blur="onBlur"
|
|
416
429
|
@focus="onFocus"
|
|
430
|
+
@change.stop
|
|
417
431
|
@update:model-value="searchTerm = $event"
|
|
418
432
|
/>
|
|
419
433
|
|
|
420
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
434
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
421
435
|
<slot name="leading" :model-value="modelValue" :open="open" :b24ui="b24ui">
|
|
422
436
|
<Component
|
|
423
437
|
:is="leadingIconName"
|
|
424
438
|
v-if="isLeading && leadingIconName"
|
|
439
|
+
data-slot="leadingIcon"
|
|
425
440
|
:class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
|
|
426
441
|
/>
|
|
427
442
|
<B24Avatar
|
|
428
443
|
v-else-if="!!avatar"
|
|
429
444
|
:size="props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()"
|
|
430
445
|
v-bind="avatar"
|
|
446
|
+
data-slot="itemLeadingAvatar"
|
|
431
447
|
:class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar })"
|
|
432
448
|
/>
|
|
433
449
|
</slot>
|
|
434
450
|
</span>
|
|
435
451
|
|
|
436
|
-
<ComboboxTrigger v-if="isTrailing || !!slots.trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
452
|
+
<ComboboxTrigger v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
437
453
|
<slot name="trailing" :model-value="modelValue" :open="open" :b24ui="b24ui">
|
|
438
454
|
<Component
|
|
439
455
|
:is="trailingIconName"
|
|
440
456
|
v-if="trailingIconName"
|
|
457
|
+
data-slot="trailingIcon"
|
|
441
458
|
:class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
|
|
442
459
|
/>
|
|
443
460
|
</slot>
|
|
@@ -445,10 +462,10 @@ defineExpose({
|
|
|
445
462
|
</ComboboxAnchor>
|
|
446
463
|
|
|
447
464
|
<ComboboxPortal v-bind="portalProps">
|
|
448
|
-
<ComboboxContent :class="b24ui.content({ class: props.b24ui?.content })" v-bind="contentProps" @focus-outside.prevent>
|
|
465
|
+
<ComboboxContent data-slot="content" :class="b24ui.content({ class: props.b24ui?.content })" v-bind="contentProps" @focus-outside.prevent>
|
|
449
466
|
<slot name="content-top" />
|
|
450
467
|
|
|
451
|
-
<ComboboxEmpty :class="b24ui.empty({ class: props.b24ui?.empty })">
|
|
468
|
+
<ComboboxEmpty data-slot="empty" :class="b24ui.empty({ class: props.b24ui?.empty })">
|
|
452
469
|
<slot name="empty" :search-term="searchTerm">
|
|
453
470
|
{{ searchTerm ? t("inputMenu.noMatch", { searchTerm }) : t("inputMenu.noData") }}
|
|
454
471
|
</slot>
|
|
@@ -456,6 +473,7 @@ defineExpose({
|
|
|
456
473
|
|
|
457
474
|
<div
|
|
458
475
|
role="presentation"
|
|
476
|
+
data-slot="viewport"
|
|
459
477
|
:class="b24ui.viewport({ class: props.b24ui?.viewport })"
|
|
460
478
|
>
|
|
461
479
|
<template v-if="!!virtualize">
|
|
@@ -474,15 +492,15 @@ defineExpose({
|
|
|
474
492
|
</template>
|
|
475
493
|
|
|
476
494
|
<template v-else>
|
|
477
|
-
<ComboboxGroup v-if="createItem && createItemPosition === 'top'" :class="b24ui.group({ class: props.b24ui?.group })">
|
|
495
|
+
<ComboboxGroup v-if="createItem && createItemPosition === 'top'" data-slot="group" :class="b24ui.group({ class: props.b24ui?.group })">
|
|
478
496
|
<ReuseCreateItemTemplate />
|
|
479
497
|
</ComboboxGroup>
|
|
480
498
|
|
|
481
|
-
<ComboboxGroup v-for="(group, groupIndex) in filteredGroups" :key="`group-${groupIndex}`" :class="b24ui.group({ class: props.b24ui?.group })">
|
|
499
|
+
<ComboboxGroup v-for="(group, groupIndex) in filteredGroups" :key="`group-${groupIndex}`" data-slot="group" :class="b24ui.group({ class: props.b24ui?.group })">
|
|
482
500
|
<ReuseItemTemplate v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`" :item="item" :index="index" />
|
|
483
501
|
</ComboboxGroup>
|
|
484
502
|
|
|
485
|
-
<ComboboxGroup v-if="createItem && createItemPosition === 'bottom'" :class="b24ui.group({ class: props.b24ui?.group })">
|
|
503
|
+
<ComboboxGroup v-if="createItem && createItemPosition === 'bottom'" data-slot="group" :class="b24ui.group({ class: props.b24ui?.group })">
|
|
486
504
|
<ReuseCreateItemTemplate />
|
|
487
505
|
</ComboboxGroup>
|
|
488
506
|
</template>
|
|
@@ -490,7 +508,7 @@ defineExpose({
|
|
|
490
508
|
|
|
491
509
|
<slot name="content-bottom" />
|
|
492
510
|
|
|
493
|
-
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
511
|
+
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
494
512
|
</ComboboxContent>
|
|
495
513
|
</ComboboxPortal>
|
|
496
514
|
</ComboboxRoot>
|
|
@@ -113,6 +113,7 @@ defineExpose({
|
|
|
113
113
|
v-bind="rootProps"
|
|
114
114
|
:id="id"
|
|
115
115
|
:model-value="modelValue"
|
|
116
|
+
data-slot="root"
|
|
116
117
|
:class="b24ui.root({ class: [props.b24ui?.root, props.class] })"
|
|
117
118
|
:name="name"
|
|
118
119
|
:disabled="disabled"
|
|
@@ -120,6 +121,7 @@ defineExpose({
|
|
|
120
121
|
>
|
|
121
122
|
<B24Badge
|
|
122
123
|
v-if="isTag"
|
|
124
|
+
data-slot="tag"
|
|
123
125
|
:class="b24ui.tag({ class: props.b24ui?.tag })"
|
|
124
126
|
:color="props.tagColor"
|
|
125
127
|
:label="props.tag"
|
|
@@ -131,12 +133,13 @@ defineExpose({
|
|
|
131
133
|
ref="inputRef"
|
|
132
134
|
:placeholder="placeholder"
|
|
133
135
|
:required="required"
|
|
136
|
+
data-slot="base"
|
|
134
137
|
:class="b24ui.base({ class: props.b24ui?.base })"
|
|
135
138
|
@blur="onBlur"
|
|
136
139
|
@focus="emitFormFocus"
|
|
137
140
|
/>
|
|
138
141
|
|
|
139
|
-
<div v-if="!!increment" :class="b24ui.increment({ class: props.b24ui?.increment })">
|
|
142
|
+
<div v-if="!!increment" data-slot="increment" :class="b24ui.increment({ class: props.b24ui?.increment })">
|
|
140
143
|
<NumberFieldIncrement as-child :disabled="disabled || incrementDisabled">
|
|
141
144
|
<slot name="increment">
|
|
142
145
|
<B24Button
|
|
@@ -150,7 +153,7 @@ defineExpose({
|
|
|
150
153
|
</NumberFieldIncrement>
|
|
151
154
|
</div>
|
|
152
155
|
|
|
153
|
-
<div v-if="!!decrement" :class="b24ui.decrement({ class: props.b24ui?.decrement })">
|
|
156
|
+
<div v-if="!!decrement" data-slot="decrement" :class="b24ui.decrement({ class: props.b24ui?.decrement })">
|
|
154
157
|
<NumberFieldDecrement as-child :disabled="disabled || decrementDisabled">
|
|
155
158
|
<slot name="decrement">
|
|
156
159
|
<B24Button
|
|
@@ -114,6 +114,7 @@ defineExpose({
|
|
|
114
114
|
v-slot="{ modelValue: tags }"
|
|
115
115
|
:model-value="modelValue"
|
|
116
116
|
:default-value="defaultValue"
|
|
117
|
+
data-slot="root"
|
|
117
118
|
:class="b24ui.root({ class: [b24ui.base({ class: props.b24ui?.base }), props.b24ui?.root, props.class] })"
|
|
118
119
|
v-bind="rootProps"
|
|
119
120
|
:name="name"
|
|
@@ -122,6 +123,7 @@ defineExpose({
|
|
|
122
123
|
>
|
|
123
124
|
<B24Badge
|
|
124
125
|
v-if="isTag"
|
|
126
|
+
data-slot="tag"
|
|
125
127
|
:class="b24ui.tag({ class: props.b24ui?.tag })"
|
|
126
128
|
:color="props.tagColor"
|
|
127
129
|
:label="props.tag"
|
|
@@ -132,19 +134,22 @@ defineExpose({
|
|
|
132
134
|
v-for="(item, index) in tags"
|
|
133
135
|
:key="index"
|
|
134
136
|
:value="item"
|
|
137
|
+
data-slot="item"
|
|
135
138
|
:class="b24ui.item({ class: [props.b24ui?.item] })"
|
|
136
139
|
>
|
|
137
|
-
<TagsInputItemText :class="b24ui.itemText({ class: [props.b24ui?.itemText] })">
|
|
140
|
+
<TagsInputItemText data-slot="itemText" :class="b24ui.itemText({ class: [props.b24ui?.itemText] })">
|
|
138
141
|
<slot v-if="!!slots['item-text']" name="item-text" :item="item" :index="index" :b24ui="b24ui" />
|
|
139
142
|
</TagsInputItemText>
|
|
140
143
|
|
|
141
144
|
<TagsInputItemDelete
|
|
145
|
+
data-slot="itemDelete"
|
|
142
146
|
:class="b24ui.itemDelete({ class: [props.b24ui?.itemDelete] })"
|
|
143
147
|
:disabled="disabled"
|
|
144
148
|
>
|
|
145
149
|
<slot name="item-delete" :item="item" :index="index" :b24ui="b24ui">
|
|
146
150
|
<Component
|
|
147
151
|
:is="deleteIcon || icons.close"
|
|
152
|
+
data-slot="itemDeleteIcon"
|
|
148
153
|
:class="b24ui.itemDeleteIcon({ class: [props.b24ui?.itemDeleteIcon] })"
|
|
149
154
|
/>
|
|
150
155
|
</slot>
|
|
@@ -156,6 +161,7 @@ defineExpose({
|
|
|
156
161
|
v-bind="{ ...$attrs, ...ariaAttrs }"
|
|
157
162
|
:placeholder="placeholder"
|
|
158
163
|
:max-length="maxLength"
|
|
164
|
+
data-slot="input"
|
|
159
165
|
:class="b24ui.input({ class: props.b24ui?.input })"
|
|
160
166
|
@blur="onBlur"
|
|
161
167
|
@focus="onFocus"
|
|
@@ -163,27 +169,30 @@ defineExpose({
|
|
|
163
169
|
|
|
164
170
|
<slot :b24ui="b24ui" />
|
|
165
171
|
|
|
166
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
172
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
167
173
|
<slot name="leading" :b24ui="b24ui">
|
|
168
174
|
<Component
|
|
169
175
|
:is="leadingIconName"
|
|
170
176
|
v-if="isLeading && leadingIconName"
|
|
177
|
+
data-slot="leadingIcon"
|
|
171
178
|
:class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
|
|
172
179
|
/>
|
|
173
180
|
<B24Avatar
|
|
174
181
|
v-else-if="!!avatar"
|
|
175
182
|
:size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
|
|
176
183
|
v-bind="avatar"
|
|
184
|
+
data-slot="leadingAvatar"
|
|
177
185
|
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
178
186
|
/>
|
|
179
187
|
</slot>
|
|
180
188
|
</span>
|
|
181
189
|
|
|
182
|
-
<span v-if="isTrailing || !!slots.trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
190
|
+
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
183
191
|
<slot name="trailing" :b24ui="b24ui">
|
|
184
192
|
<Component
|
|
185
193
|
:is="trailingIconName"
|
|
186
194
|
v-if="trailingIconName"
|
|
195
|
+
data-slot="trailingIcon"
|
|
187
196
|
:class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
|
|
188
197
|
/>
|
|
189
198
|
</slot>
|
|
@@ -110,6 +110,7 @@ defineExpose({
|
|
|
110
110
|
v-slot="{ segments }"
|
|
111
111
|
:name="name"
|
|
112
112
|
:disabled="disabled"
|
|
113
|
+
data-slot="base"
|
|
113
114
|
:class="b24ui.base({ class: [props.b24ui?.base, props.class] })"
|
|
114
115
|
@update:model-value="onUpdate"
|
|
115
116
|
@blur="onBlur"
|
|
@@ -117,6 +118,7 @@ defineExpose({
|
|
|
117
118
|
>
|
|
118
119
|
<B24Badge
|
|
119
120
|
v-if="isTag"
|
|
121
|
+
data-slot="tag"
|
|
120
122
|
:class="b24ui.tag({ class: props.b24ui?.tag })"
|
|
121
123
|
:color="props.tagColor"
|
|
122
124
|
:label="props.tag"
|
|
@@ -128,6 +130,7 @@ defineExpose({
|
|
|
128
130
|
:key="`${segment.part}-${index}`"
|
|
129
131
|
:ref="(el) => inputsRef[index] = el"
|
|
130
132
|
:part="segment.part"
|
|
133
|
+
data-slot="segment"
|
|
131
134
|
:class="b24ui.segment({ class: props.b24ui?.segment })"
|
|
132
135
|
>
|
|
133
136
|
{{ segment.value.trim() }}
|
|
@@ -135,27 +138,30 @@ defineExpose({
|
|
|
135
138
|
|
|
136
139
|
<slot :b24ui="b24ui" />
|
|
137
140
|
|
|
138
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
141
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
139
142
|
<slot name="leading" :b24ui="b24ui">
|
|
140
143
|
<Component
|
|
141
144
|
:is="leadingIconName"
|
|
142
145
|
v-if="isLeading && leadingIconName"
|
|
146
|
+
data-slot="leadingIcon"
|
|
143
147
|
:class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
|
|
144
148
|
/>
|
|
145
149
|
<B24Avatar
|
|
146
150
|
v-else-if="!!avatar"
|
|
147
151
|
:size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
|
|
148
152
|
v-bind="avatar"
|
|
153
|
+
data-slot="leadingAvatar"
|
|
149
154
|
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
150
155
|
/>
|
|
151
156
|
</slot>
|
|
152
157
|
</span>
|
|
153
158
|
|
|
154
|
-
<span v-if="isTrailing || !!slots.trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
159
|
+
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
155
160
|
<slot name="trailing" :b24ui="b24ui">
|
|
156
161
|
<Component
|
|
157
162
|
:is="trailingIconName"
|
|
158
163
|
v-if="trailingIconName"
|
|
164
|
+
data-slot="trailingIcon"
|
|
159
165
|
:class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
|
|
160
166
|
/>
|
|
161
167
|
</slot>
|
|
@@ -25,7 +25,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.kbd ||
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
|
-
<Primitive :as="as" :class="b24ui.base({ class: props.class })">
|
|
28
|
+
<Primitive :as="as" data-slot="base" :class="b24ui.base({ class: props.class })">
|
|
29
29
|
<slot>
|
|
30
30
|
{{ getKbdKey(value) }}
|
|
31
31
|
</slot>
|
|
@@ -78,6 +78,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.modal |
|
|
|
78
78
|
<DialogRoot v-slot="{ open, close }" v-bind="rootProps">
|
|
79
79
|
<DefineContentTemplate>
|
|
80
80
|
<DialogContent
|
|
81
|
+
data-slot="content"
|
|
81
82
|
:class="b24ui.content({ class: [!slots.default && props.class, props.b24ui?.content] })"
|
|
82
83
|
v-bind="contentProps"
|
|
83
84
|
@after-enter="emits('after:enter')"
|
|
@@ -101,18 +102,19 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.modal |
|
|
|
101
102
|
<slot name="content" :close="close">
|
|
102
103
|
<div
|
|
103
104
|
v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close) || !!slots.body"
|
|
105
|
+
data-slot="contentWrapper"
|
|
104
106
|
:class="b24ui.contentWrapper({ class: props.b24ui?.contentWrapper })"
|
|
105
107
|
>
|
|
106
|
-
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" :class="b24ui.header({ class: props.b24ui?.header })">
|
|
108
|
+
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" data-slot="header" :class="b24ui.header({ class: props.b24ui?.header })">
|
|
107
109
|
<slot name="header" :close="close">
|
|
108
|
-
<div :class="b24ui.wrapper({ class: props.b24ui?.wrapper })">
|
|
109
|
-
<DialogTitle v-if="title || !!slots.title" :class="b24ui.title({ class: props.b24ui?.title })">
|
|
110
|
+
<div data-slot="wrapper" :class="b24ui.wrapper({ class: props.b24ui?.wrapper })">
|
|
111
|
+
<DialogTitle v-if="title || !!slots.title" data-slot="title" :class="b24ui.title({ class: props.b24ui?.title })">
|
|
110
112
|
<slot name="title">
|
|
111
113
|
{{ title }}
|
|
112
114
|
</slot>
|
|
113
115
|
</DialogTitle>
|
|
114
116
|
|
|
115
|
-
<DialogDescription v-if="description || !!slots.description" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
117
|
+
<DialogDescription v-if="description || !!slots.description" data-slot="description" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
116
118
|
<slot name="description">
|
|
117
119
|
{{ description }}
|
|
118
120
|
</slot>
|
|
@@ -130,6 +132,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.modal |
|
|
|
130
132
|
color="air-tertiary-no-accent"
|
|
131
133
|
:aria-label="t('modal.close')"
|
|
132
134
|
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
135
|
+
data-slot="close"
|
|
133
136
|
:class="b24ui.close({ class: props.b24ui?.close })"
|
|
134
137
|
/>
|
|
135
138
|
</slot>
|
|
@@ -137,12 +140,12 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.modal |
|
|
|
137
140
|
</slot>
|
|
138
141
|
</div>
|
|
139
142
|
|
|
140
|
-
<div v-if="!!slots.body" :class="b24ui.body({ class: props.b24ui?.body, scrollbarThin: Boolean(props.scrollbarThin) })">
|
|
143
|
+
<div v-if="!!slots.body" data-slot="body" :class="b24ui.body({ class: props.b24ui?.body, scrollbarThin: Boolean(props.scrollbarThin) })">
|
|
141
144
|
<slot name="body" :close="close" />
|
|
142
145
|
</div>
|
|
143
146
|
</div>
|
|
144
147
|
|
|
145
|
-
<div v-if="!!slots.footer" :class="b24ui.footer({ class: props.b24ui?.footer })">
|
|
148
|
+
<div v-if="!!slots.footer" data-slot="footer" :class="b24ui.footer({ class: props.b24ui?.footer })">
|
|
146
149
|
<slot name="footer" :close="close" />
|
|
147
150
|
</div>
|
|
148
151
|
</slot>
|
|
@@ -155,13 +158,13 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.modal |
|
|
|
155
158
|
|
|
156
159
|
<DialogPortal v-bind="portalProps">
|
|
157
160
|
<template v-if="scrollable">
|
|
158
|
-
<DialogOverlay :class="b24ui.overlay({ class: props.b24ui?.overlay })">
|
|
161
|
+
<DialogOverlay data-slot="overlay" :class="b24ui.overlay({ class: props.b24ui?.overlay })">
|
|
159
162
|
<ReuseContentTemplate />
|
|
160
163
|
</DialogOverlay>
|
|
161
164
|
</template>
|
|
162
165
|
|
|
163
166
|
<template v-else>
|
|
164
|
-
<DialogOverlay v-if="overlay" :class="b24ui.overlay({ class: props.b24ui?.overlay })" />
|
|
167
|
+
<DialogOverlay v-if="overlay" data-slot="overlay" :class="b24ui.overlay({ class: props.b24ui?.overlay })" />
|
|
165
168
|
|
|
166
169
|
<ReuseContentTemplate />
|
|
167
170
|
</template>
|
|
@@ -19,7 +19,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.navbar
|
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
21
|
<!-- Navbar -->
|
|
22
|
-
<Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
22
|
+
<Primitive :as="as" data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
23
23
|
<slot />
|
|
24
24
|
</Primitive>
|
|
25
25
|
</template>
|
|
@@ -18,7 +18,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.navbarD
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<Primitive :as="as" aria-hidden="true" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
21
|
+
<Primitive :as="as" aria-hidden="true" data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
22
22
|
<slot />
|
|
23
23
|
</Primitive>
|
|
24
24
|
</template>
|
|
@@ -20,8 +20,9 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.navbarS
|
|
|
20
20
|
<template>
|
|
21
21
|
<Primitive
|
|
22
22
|
:as="as"
|
|
23
|
+
data-component="section"
|
|
24
|
+
data-slot="root"
|
|
23
25
|
:class="b24ui.root({ class: [props.b24ui?.root, props.class] })"
|
|
24
|
-
data-slot="section"
|
|
25
26
|
>
|
|
26
27
|
<slot />
|
|
27
28
|
</Primitive>
|
|
@@ -18,7 +18,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.navbarS
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<Primitive :as="as" aria-hidden="true" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
21
|
+
<Primitive :as="as" aria-hidden="true" data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
22
22
|
<slot />
|
|
23
23
|
</Primitive>
|
|
24
24
|
</template>
|