@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
|
@@ -238,24 +238,29 @@ defineExpose({
|
|
|
238
238
|
<Primitive
|
|
239
239
|
:as="as"
|
|
240
240
|
v-bind="$attrs"
|
|
241
|
+
data-slot="base"
|
|
241
242
|
:class="b24ui.base({ class: [props.b24ui?.base, props.class] })"
|
|
242
243
|
>
|
|
243
244
|
<svg
|
|
244
245
|
v-if="props.useCircle"
|
|
246
|
+
data-slot="circleBase"
|
|
245
247
|
:class="b24ui.circleBase({ class: [props.b24ui?.circleBase] })"
|
|
246
248
|
viewBox="0 0 100 100"
|
|
247
249
|
xmlns="http://www.w3.org/2000/svg"
|
|
248
250
|
>
|
|
249
251
|
<g
|
|
252
|
+
data-slot="circleGroup"
|
|
250
253
|
:class="b24ui.circleGroup({ class: [props.b24ui?.circleGroup] })"
|
|
251
254
|
>
|
|
252
255
|
<circle
|
|
256
|
+
data-slot="circleElement"
|
|
253
257
|
:class="b24ui.circleElement({ class: [props.b24ui?.circleElement] })"
|
|
254
258
|
cx="50"
|
|
255
259
|
cy="50"
|
|
256
260
|
r="45"
|
|
257
261
|
/>
|
|
258
262
|
<path
|
|
263
|
+
data-slot="circlePath"
|
|
259
264
|
:class="b24ui.circlePath({ class: [props.b24ui?.circlePath] })"
|
|
260
265
|
:stroke-dasharray="fullDashArray"
|
|
261
266
|
d="M 50, 50 m -45, 0 a 45,45 0 1,0 90,0 a 45,45 0 1,0 -90,0"
|
|
@@ -266,12 +271,14 @@ defineExpose({
|
|
|
266
271
|
<Component
|
|
267
272
|
:is="leadingIconName"
|
|
268
273
|
v-if="isLeading && typeof leadingIconName !== 'undefined'"
|
|
274
|
+
data-slot="leadingIcon"
|
|
269
275
|
:class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
|
|
270
276
|
/>
|
|
271
277
|
<B24Avatar
|
|
272
278
|
v-else-if="!!avatar"
|
|
273
279
|
:size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
|
|
274
280
|
v-bind="avatar"
|
|
281
|
+
data-slot="leadingAvatar"
|
|
275
282
|
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
276
283
|
/>
|
|
277
284
|
</slot>
|
|
@@ -289,7 +296,7 @@ defineExpose({
|
|
|
289
296
|
:format-time="formatTime"
|
|
290
297
|
:b24ui="b24ui"
|
|
291
298
|
>
|
|
292
|
-
<span :class="b24ui.label({ class: props.b24ui?.label })">
|
|
299
|
+
<span data-slot="label" :class="b24ui.label({ class: props.b24ui?.label })">
|
|
293
300
|
{{ formatTime }}
|
|
294
301
|
</span>
|
|
295
302
|
</slot>
|
|
@@ -117,6 +117,7 @@ defineExpose({
|
|
|
117
117
|
:title="title || t('dashboardSearch.title')"
|
|
118
118
|
:description="description || t('dashboardSearch.description')"
|
|
119
119
|
v-bind="modalProps"
|
|
120
|
+
data-slot="modal"
|
|
120
121
|
:class="b24ui.modal({ class: [props.b24ui?.modal, props.class] })"
|
|
121
122
|
>
|
|
122
123
|
<template #content="contentData">
|
|
@@ -93,6 +93,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.dashboa
|
|
|
93
93
|
},
|
|
94
94
|
...$attrs
|
|
95
95
|
}"
|
|
96
|
+
data-slot="base"
|
|
96
97
|
:class="b24ui.base({ class: [props.b24ui?.base, props.class] })"
|
|
97
98
|
:b24ui="transformUI(b24ui, props.b24ui)"
|
|
98
99
|
@click="toggleSearch"
|
|
@@ -102,7 +103,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.dashboa
|
|
|
102
103
|
</template>
|
|
103
104
|
|
|
104
105
|
<template v-if="!collapsed" #trailing="{ b24ui: b24uiProxy }">
|
|
105
|
-
<div :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
106
|
+
<div data-slot="trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
106
107
|
<slot name="trailing" :b24ui="b24uiProxy">
|
|
107
108
|
<template v-if="kbds?.length">
|
|
108
109
|
<B24Kbd
|
|
@@ -51,19 +51,19 @@ const normalizedItems = computed(() => {
|
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<template>
|
|
54
|
-
<div :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
55
|
-
<h2 v-if="legend || !!slots.legend" :class="b24ui.legend({ class: props.b24ui?.legend })">
|
|
54
|
+
<div data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
55
|
+
<h2 v-if="legend || !!slots.legend" data-slot="legend" :class="b24ui.legend({ class: props.b24ui?.legend })">
|
|
56
56
|
<slot name="legend">
|
|
57
57
|
{{ legend }}
|
|
58
58
|
</slot>
|
|
59
59
|
</h2>
|
|
60
|
-
<p v-if="text || !!slots.text" :class="b24ui.text({ class: props.b24ui?.text })">
|
|
60
|
+
<p v-if="text || !!slots.text" data-slot="text" :class="b24ui.text({ class: props.b24ui?.text })">
|
|
61
61
|
<slot name="text">
|
|
62
62
|
{{ text }}
|
|
63
63
|
</slot>
|
|
64
64
|
</p>
|
|
65
65
|
|
|
66
|
-
<dl :class="b24ui.container({ class: props.b24ui?.container })">
|
|
66
|
+
<dl data-slot="container" :class="b24ui.container({ class: props.b24ui?.container })">
|
|
67
67
|
<template
|
|
68
68
|
v-for="(item, index) in normalizedItems"
|
|
69
69
|
:key="index"
|
|
@@ -82,6 +82,7 @@ const normalizedItems = computed(() => {
|
|
|
82
82
|
:b24ui="b24ui"
|
|
83
83
|
>
|
|
84
84
|
<dt
|
|
85
|
+
data-slot="labelWrapper"
|
|
85
86
|
:class="b24ui.labelWrapper({
|
|
86
87
|
class: [
|
|
87
88
|
props.b24ui?.labelWrapper,
|
|
@@ -93,6 +94,7 @@ const normalizedItems = computed(() => {
|
|
|
93
94
|
<Component
|
|
94
95
|
:is="item.icon"
|
|
95
96
|
v-if="item.icon"
|
|
97
|
+
data-slot="icon"
|
|
96
98
|
:class="b24ui.icon({
|
|
97
99
|
class: [
|
|
98
100
|
props.b24ui?.icon,
|
|
@@ -104,6 +106,7 @@ const normalizedItems = computed(() => {
|
|
|
104
106
|
v-else-if="item.avatar"
|
|
105
107
|
:size="props.b24ui?.avatarSize || b24ui.avatarSize()"
|
|
106
108
|
v-bind="item.avatar"
|
|
109
|
+
data-slot="avatar"
|
|
107
110
|
:class="b24ui.avatar({
|
|
108
111
|
class: [
|
|
109
112
|
props.b24ui?.avatar,
|
|
@@ -113,6 +116,7 @@ const normalizedItems = computed(() => {
|
|
|
113
116
|
/>
|
|
114
117
|
</slot>
|
|
115
118
|
<span
|
|
119
|
+
data-slot="label"
|
|
116
120
|
:class="b24ui.label({
|
|
117
121
|
class: [
|
|
118
122
|
item?.class,
|
|
@@ -128,6 +132,7 @@ const normalizedItems = computed(() => {
|
|
|
128
132
|
</dt>
|
|
129
133
|
<dd
|
|
130
134
|
:data-orientation="item.orientation"
|
|
135
|
+
data-slot="descriptionWrapper"
|
|
131
136
|
:class="b24ui.descriptionWrapper({
|
|
132
137
|
class: [
|
|
133
138
|
props.b24ui?.descriptionWrapper,
|
|
@@ -138,6 +143,7 @@ const normalizedItems = computed(() => {
|
|
|
138
143
|
})"
|
|
139
144
|
>
|
|
140
145
|
<span
|
|
146
|
+
data-slot="description"
|
|
141
147
|
:class="b24ui.description({
|
|
142
148
|
class: [
|
|
143
149
|
item?.class,
|
|
@@ -153,6 +159,7 @@ const normalizedItems = computed(() => {
|
|
|
153
159
|
</span>
|
|
154
160
|
<span
|
|
155
161
|
v-if="item.actions?.length || !!slots.actions"
|
|
162
|
+
data-slot="actions"
|
|
156
163
|
:class="b24ui.actions({
|
|
157
164
|
class: [
|
|
158
165
|
props.b24ui?.actions,
|
|
@@ -183,6 +190,7 @@ const normalizedItems = computed(() => {
|
|
|
183
190
|
</dl>
|
|
184
191
|
<div
|
|
185
192
|
v-if="!!slots.footer"
|
|
193
|
+
data-slot="footer"
|
|
186
194
|
:class="b24ui.footer({ class: props.b24ui?.footer })"
|
|
187
195
|
>
|
|
188
196
|
<slot name="footer" :b24ui="b24ui" />
|
|
@@ -57,6 +57,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.dropdow
|
|
|
57
57
|
</DropdownMenuTrigger>
|
|
58
58
|
|
|
59
59
|
<B24DropdownMenuContent
|
|
60
|
+
data-slot="content"
|
|
60
61
|
:class="b24ui.content({ class: [!slots.default && props.b24ui?.content, props.class] })"
|
|
61
62
|
:b24ui="b24ui"
|
|
62
63
|
:b24ui-override="props.b24ui"
|
|
@@ -73,7 +74,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.dropdow
|
|
|
73
74
|
<slot :name="name" v-bind="slotData" />
|
|
74
75
|
</template>
|
|
75
76
|
|
|
76
|
-
<DropdownMenuArrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
77
|
+
<DropdownMenuArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
77
78
|
</B24DropdownMenuContent>
|
|
78
79
|
</DropdownMenuRoot>
|
|
79
80
|
</template>
|
|
@@ -85,15 +85,17 @@ const groups = computed(
|
|
|
85
85
|
v-if="item.avatar"
|
|
86
86
|
:size="item.b24ui?.itemLeadingAvatarSize || b24uiOverride?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()"
|
|
87
87
|
v-bind="item.avatar"
|
|
88
|
+
data-slot="itemLeadingAvatar"
|
|
88
89
|
:class="b24ui.itemLeadingAvatar({ class: [b24uiOverride?.itemLeadingAvatar, item.b24ui?.itemLeadingAvatar], active })"
|
|
89
90
|
/>
|
|
90
91
|
</slot>
|
|
91
92
|
|
|
92
93
|
<span
|
|
93
94
|
v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'] || (get(item, props.descriptionKey) || !!slots[item.slot ? `${item.slot}-description` : 'item-description'])"
|
|
95
|
+
data-slot="itemWrapper"
|
|
94
96
|
:class="b24ui.itemWrapper({ class: [b24uiOverride?.itemWrapper, item.b24ui?.itemWrapper] })"
|
|
95
97
|
>
|
|
96
|
-
<span :class="b24ui.itemLabel({ class: [b24uiOverride?.itemLabel, item.b24ui?.itemLabel], active })">
|
|
98
|
+
<span data-slot="itemLabel" :class="b24ui.itemLabel({ class: [b24uiOverride?.itemLabel, item.b24ui?.itemLabel], active })">
|
|
97
99
|
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
|
|
98
100
|
{{ get(item, props.labelKey) }}
|
|
99
101
|
</slot>
|
|
@@ -101,6 +103,7 @@ const groups = computed(
|
|
|
101
103
|
|
|
102
104
|
<span
|
|
103
105
|
v-if="get(item, props.descriptionKey)"
|
|
106
|
+
data-slot="itemDescription"
|
|
104
107
|
:class="b24ui.itemDescription({ class: [b24uiOverride?.itemDescription, item.b24ui?.itemDescription] })"
|
|
105
108
|
>
|
|
106
109
|
<slot
|
|
@@ -114,10 +117,11 @@ const groups = computed(
|
|
|
114
117
|
</span>
|
|
115
118
|
</span>
|
|
116
119
|
|
|
117
|
-
<span :class="b24ui.itemTrailing({ class: [b24uiOverride?.itemTrailing, item.b24ui?.itemTrailing] })">
|
|
120
|
+
<span data-slot="itemTrailing" :class="b24ui.itemTrailing({ class: [b24uiOverride?.itemTrailing, item.b24ui?.itemTrailing] })">
|
|
118
121
|
<DropdownMenu.ItemIndicator as-child>
|
|
119
122
|
<Component
|
|
120
123
|
:is="checkedIcon || icons.check"
|
|
124
|
+
data-slot="itemTrailingIcon"
|
|
121
125
|
:class="b24ui.itemTrailingIcon({ class: [b24uiOverride?.itemTrailingIcon, item.b24ui?.itemTrailingIcon], color: item?.color })"
|
|
122
126
|
/>
|
|
123
127
|
</DropdownMenu.ItemIndicator>
|
|
@@ -132,24 +136,28 @@ const groups = computed(
|
|
|
132
136
|
<Component
|
|
133
137
|
:is="icons.loading"
|
|
134
138
|
v-if="item.loading"
|
|
139
|
+
data-slot="itemLeadingIcon"
|
|
135
140
|
:class="b24ui.itemLeadingIcon({ class: [b24uiOverride?.itemLeadingIcon, item.b24ui?.itemLeadingIcon], color: item?.color, loading: true })"
|
|
136
141
|
/>
|
|
137
142
|
<Component
|
|
138
143
|
:is="childrenIcon"
|
|
139
144
|
v-else-if="item.children?.length"
|
|
145
|
+
data-slot="itemTrailingIcon"
|
|
140
146
|
:class="b24ui.itemTrailingIcon({ class: [b24uiOverride?.itemTrailingIcon, item.b24ui?.itemTrailingIcon], color: item?.color, active })"
|
|
141
147
|
/>
|
|
142
148
|
<Component
|
|
143
149
|
:is="typeof externalIcon !== 'boolean' ? externalIcon : icons.external"
|
|
144
150
|
v-else-if="item.target === '_blank' && externalIcon !== false"
|
|
151
|
+
data-slot="itemLabelExternalIcon"
|
|
145
152
|
:class="b24ui.itemLabelExternalIcon({ class: [b24uiOverride?.itemLabelExternalIcon, item.b24ui?.itemLabelExternalIcon], color: item?.color, active })"
|
|
146
153
|
/>
|
|
147
154
|
<Component
|
|
148
155
|
:is="item.icon"
|
|
149
156
|
v-else-if="item.icon"
|
|
157
|
+
data-slot="itemLeadingIcon"
|
|
150
158
|
:class="b24ui.itemLeadingIcon({ class: [b24uiOverride?.itemLeadingIcon, item.b24ui?.itemLeadingIcon], color: item?.color, active })"
|
|
151
159
|
/>
|
|
152
|
-
<span v-else-if="item.kbds?.length" :class="b24ui.itemTrailingKbds({ class: [b24uiOverride?.itemTrailingKbds, item.b24ui?.itemTrailingKbds] })">
|
|
160
|
+
<span v-else-if="item.kbds?.length" data-slot="itemTrailingKbds" :class="b24ui.itemTrailingKbds({ class: [b24uiOverride?.itemTrailingKbds, item.b24ui?.itemTrailingKbds] })">
|
|
153
161
|
<B24Kbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="item.b24ui?.itemTrailingKbdsSize || b24uiOverride?.itemTrailingKbdsSize || b24ui.itemTrailingKbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
|
|
154
162
|
</span>
|
|
155
163
|
</slot>
|
|
@@ -160,22 +168,24 @@ const groups = computed(
|
|
|
160
168
|
<DropdownMenu.Portal v-bind="portalProps">
|
|
161
169
|
<component
|
|
162
170
|
:is="sub ? DropdownMenu.SubContent : DropdownMenu.Content"
|
|
171
|
+
data-slot="content"
|
|
163
172
|
:class="b24ui.content({ class: [b24uiOverride?.content, props.class] })"
|
|
164
173
|
v-bind="contentProps"
|
|
165
174
|
>
|
|
166
175
|
<slot name="content-top" />
|
|
167
176
|
|
|
168
|
-
<div role="presentation" :class="b24ui.viewport({ class: b24uiOverride?.viewport })">
|
|
177
|
+
<div role="presentation" data-slot="viewport" :class="b24ui.viewport({ class: b24uiOverride?.viewport })">
|
|
169
178
|
<DropdownMenu.Group
|
|
170
179
|
v-for="(group, groupIndex) in groups"
|
|
171
180
|
:key="`group-${groupIndex}`"
|
|
181
|
+
data-slot="group"
|
|
172
182
|
:class="b24ui.group({ class: b24uiOverride?.group })"
|
|
173
183
|
>
|
|
174
184
|
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
175
|
-
<DropdownMenu.Label v-if="item.type === 'label'" :class="b24ui.label({ class: [b24uiOverride?.label, item.b24ui?.label, item.class] })">
|
|
185
|
+
<DropdownMenu.Label v-if="item.type === 'label'" data-slot="label" :class="b24ui.label({ class: [b24uiOverride?.label, item.b24ui?.label, item.class] })">
|
|
176
186
|
<ReuseItemTemplate :item="item" :index="index" />
|
|
177
187
|
</DropdownMenu.Label>
|
|
178
|
-
<DropdownMenu.Separator v-else-if="item.type === 'separator'" :class="b24ui.separator({ class: [b24uiOverride?.separator, item.b24ui?.separator, item.class] })" />
|
|
188
|
+
<DropdownMenu.Separator v-else-if="item.type === 'separator'" data-slot="separator" :class="b24ui.separator({ class: [b24uiOverride?.separator, item.b24ui?.separator, item.class] })" />
|
|
179
189
|
<DropdownMenu.Sub
|
|
180
190
|
v-else-if="item?.children?.length"
|
|
181
191
|
:open="item.open"
|
|
@@ -186,6 +196,7 @@ const groups = computed(
|
|
|
186
196
|
type="button"
|
|
187
197
|
:disabled="item.disabled"
|
|
188
198
|
:text-value="get(item, props.labelKey)"
|
|
199
|
+
data-slot="item"
|
|
189
200
|
:class="b24ui.item({ class: [b24uiOverride?.item, item.b24ui?.item, item.class], color: item?.color })"
|
|
190
201
|
>
|
|
191
202
|
<ReuseItemTemplate :item="item" :index="index" />
|
|
@@ -193,6 +204,7 @@ const groups = computed(
|
|
|
193
204
|
|
|
194
205
|
<B24DropdownMenuContent
|
|
195
206
|
sub
|
|
207
|
+
data-slot="content"
|
|
196
208
|
:class="item.b24ui?.content"
|
|
197
209
|
:b24ui="b24ui"
|
|
198
210
|
:b24ui-override="b24uiOverride"
|
|
@@ -211,7 +223,7 @@ const groups = computed(
|
|
|
211
223
|
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
212
224
|
<slot :name="name" v-bind="slotData" />
|
|
213
225
|
</template>
|
|
214
|
-
<DropdownMenuArrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
226
|
+
<DropdownMenuArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
215
227
|
</B24DropdownMenuContent>
|
|
216
228
|
</DropdownMenu.Sub>
|
|
217
229
|
<DropdownMenu.CheckboxItem
|
|
@@ -219,6 +231,7 @@ const groups = computed(
|
|
|
219
231
|
:model-value="item.checked"
|
|
220
232
|
:disabled="item.disabled"
|
|
221
233
|
:text-value="get(item, props.labelKey)"
|
|
234
|
+
data-slot="item"
|
|
222
235
|
:class="b24ui.item({ class: [b24uiOverride?.item, item.b24ui?.item, item.class], color: item?.color })"
|
|
223
236
|
@update:model-value="item.onUpdateChecked"
|
|
224
237
|
@select="item.onSelect"
|
|
@@ -235,6 +248,7 @@ const groups = computed(
|
|
|
235
248
|
<B24Link v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
236
249
|
<B24LinkBase
|
|
237
250
|
v-bind="slotProps"
|
|
251
|
+
data-slot="item"
|
|
238
252
|
:class="b24ui.item({ class: [b24uiOverride?.item, item.b24ui?.item, item.class], color: item?.color, active })"
|
|
239
253
|
>
|
|
240
254
|
<ReuseItemTemplate :item="item" :active="active" :index="index" />
|
|
@@ -30,25 +30,26 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.empty |
|
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<template>
|
|
33
|
-
<Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
34
|
-
<div v-if="!!slots.header || (icon || !!slots.leading) || (title || !!slots.title) || (description || !!slots.description)" :class="b24ui.header({ class: props.b24ui?.header })">
|
|
33
|
+
<Primitive :as="as" data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
34
|
+
<div v-if="!!slots.header || (icon || !!slots.leading) || (title || !!slots.title) || (description || !!slots.description)" data-slot="header" :class="b24ui.header({ class: props.b24ui?.header })">
|
|
35
35
|
<slot name="header">
|
|
36
36
|
<slot name="leading" :b24ui="b24ui">
|
|
37
|
-
<div v-if="icon" :class="b24ui.indicator({ class: props.b24ui?.indicator })">
|
|
37
|
+
<div v-if="icon" data-slot="indicator" :class="b24ui.indicator({ class: props.b24ui?.indicator })">
|
|
38
38
|
<Component
|
|
39
39
|
:is="icon"
|
|
40
|
+
data-slot="icon"
|
|
40
41
|
:class="b24ui.icon({ class: props.b24ui?.icon })"
|
|
41
42
|
/>
|
|
42
43
|
</div>
|
|
43
44
|
</slot>
|
|
44
45
|
|
|
45
|
-
<h2 v-if="title || !!slots.title" :class="b24ui.title({ class: props.b24ui?.title })">
|
|
46
|
+
<h2 v-if="title || !!slots.title" data-slot="title" :class="b24ui.title({ class: props.b24ui?.title })">
|
|
46
47
|
<slot name="title">
|
|
47
48
|
{{ title }}
|
|
48
49
|
</slot>
|
|
49
50
|
</h2>
|
|
50
51
|
|
|
51
|
-
<div v-if="description || !!slots.description" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
52
|
+
<div v-if="description || !!slots.description" data-slot="description" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
52
53
|
<slot name="description">
|
|
53
54
|
{{ description }}
|
|
54
55
|
</slot>
|
|
@@ -56,9 +57,9 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.empty |
|
|
|
56
57
|
</slot>
|
|
57
58
|
</div>
|
|
58
59
|
|
|
59
|
-
<div v-if="!!slots.body || (actions?.length || !!slots.actions)" :class="b24ui.body({ class: props.b24ui?.body })">
|
|
60
|
+
<div v-if="!!slots.body || (actions?.length || !!slots.actions)" data-slot="body" :class="b24ui.body({ class: props.b24ui?.body })">
|
|
60
61
|
<slot name="body">
|
|
61
|
-
<div v-if="actions?.length || !!slots.actions" :class="b24ui.actions({ class: props.b24ui?.actions })">
|
|
62
|
+
<div v-if="actions?.length || !!slots.actions" data-slot="actions" :class="b24ui.actions({ class: props.b24ui?.actions })">
|
|
62
63
|
<slot name="actions">
|
|
63
64
|
<B24Button v-for="(action, index) in actions" :key="index" :size="size" v-bind="action" />
|
|
64
65
|
</slot>
|
|
@@ -66,7 +67,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.empty |
|
|
|
66
67
|
</slot>
|
|
67
68
|
</div>
|
|
68
69
|
|
|
69
|
-
<div v-if="!!slots.footer" :class="b24ui.footer({ class: props.b24ui?.footer })">
|
|
70
|
+
<div v-if="!!slots.footer" data-slot="footer" :class="b24ui.footer({ class: props.b24ui?.footer })">
|
|
70
71
|
<slot name="footer" />
|
|
71
72
|
</div>
|
|
72
73
|
</Primitive>
|
|
@@ -27,23 +27,23 @@ function handleError() {
|
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
|
-
<Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
31
|
-
<p v-if="!!props.error?.statusCode || !!slots.statusCode" :class="b24ui.statusCode({ class: props.b24ui?.statusCode })">
|
|
30
|
+
<Primitive :as="as" data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
31
|
+
<p v-if="!!props.error?.statusCode || !!slots.statusCode" data-slot="statusCode" :class="b24ui.statusCode({ class: props.b24ui?.statusCode })">
|
|
32
32
|
<slot name="statusCode">
|
|
33
33
|
{{ props.error?.statusCode }}
|
|
34
34
|
</slot>
|
|
35
35
|
</p>
|
|
36
|
-
<h1 v-if="!!props.error?.statusMessage || !!slots.statusMessage" :class="b24ui.statusMessage({ class: props.b24ui?.statusMessage })">
|
|
36
|
+
<h1 v-if="!!props.error?.statusMessage || !!slots.statusMessage" data-slot="statusMessage" :class="b24ui.statusMessage({ class: props.b24ui?.statusMessage })">
|
|
37
37
|
<slot name="statusMessage">
|
|
38
38
|
{{ props.error?.statusMessage }}
|
|
39
39
|
</slot>
|
|
40
40
|
</h1>
|
|
41
|
-
<p v-if="props.error?.message && props.error.message !== props.error.statusMessage || !!slots.message" :class="b24ui.message({ class: props.b24ui?.message })">
|
|
41
|
+
<p v-if="props.error?.message && props.error.message !== props.error.statusMessage || !!slots.message" data-slot="message" :class="b24ui.message({ class: props.b24ui?.message })">
|
|
42
42
|
<slot name="message">
|
|
43
43
|
{{ props.error?.message }}
|
|
44
44
|
</slot>
|
|
45
45
|
</p>
|
|
46
|
-
<div v-if="!!clear || !!slots.links" :class="b24ui.links({ class: props.b24ui?.links })">
|
|
46
|
+
<div v-if="!!clear || !!slots.links" data-slot="links" :class="b24ui.links({ class: props.b24ui?.links })">
|
|
47
47
|
<slot name="links">
|
|
48
48
|
<B24Button
|
|
49
49
|
v-if="clear"
|
|
@@ -139,11 +139,12 @@ defineExpose({
|
|
|
139
139
|
<template v-if="props.preview && modelValue && (Array.isArray(modelValue) ? modelValue.length : true)">
|
|
140
140
|
<slot name="files-top" :files="modelValue" :open="open" :remove-file="removeFile" />
|
|
141
141
|
|
|
142
|
-
<div :class="b24ui.files({ class: props.b24ui?.files })">
|
|
142
|
+
<div data-slot="files" :class="b24ui.files({ class: props.b24ui?.files })">
|
|
143
143
|
<slot name="files" :files="modelValue">
|
|
144
144
|
<div
|
|
145
145
|
v-for="(file, index) in Array.isArray(modelValue) ? modelValue : [modelValue]"
|
|
146
146
|
:key="file.name"
|
|
147
|
+
data-slot="file"
|
|
147
148
|
:class="b24ui.file({ class: props.b24ui?.file })"
|
|
148
149
|
>
|
|
149
150
|
<slot name="file" :file="file" :index="index">
|
|
@@ -153,18 +154,19 @@ defineExpose({
|
|
|
153
154
|
:src="createObjectUrl(file)"
|
|
154
155
|
:icon="fileIcon || icons.file"
|
|
155
156
|
:size="props.size"
|
|
157
|
+
data-slot="fileLeadingAvatar"
|
|
156
158
|
:class="b24ui.fileLeadingAvatar({ class: props.b24ui?.fileLeadingAvatar })"
|
|
157
159
|
/>
|
|
158
160
|
</slot>
|
|
159
161
|
|
|
160
|
-
<div :class="b24ui.fileWrapper({ class: props.b24ui?.fileWrapper })">
|
|
161
|
-
<span :class="b24ui.fileName({ class: props.b24ui?.fileName })">
|
|
162
|
+
<div data-slot="fileWrapper" :class="b24ui.fileWrapper({ class: props.b24ui?.fileWrapper })">
|
|
163
|
+
<span data-slot="fileName" :class="b24ui.fileName({ class: props.b24ui?.fileName })">
|
|
162
164
|
<slot name="file-name" :file="file" :index="index">
|
|
163
165
|
{{ file.name }}
|
|
164
166
|
</slot>
|
|
165
167
|
</span>
|
|
166
168
|
|
|
167
|
-
<span :class="b24ui.fileSize({ class: props.b24ui?.fileSize })">
|
|
169
|
+
<span data-slot="fileSize" :class="b24ui.fileSize({ class: props.b24ui?.fileSize })">
|
|
168
170
|
<slot name="file-size" :file="file" :index="index">
|
|
169
171
|
{{ formatFileSize(file.size) }}
|
|
170
172
|
</slot>
|
|
@@ -186,6 +188,7 @@ defineExpose({
|
|
|
186
188
|
}"
|
|
187
189
|
:aria-label="t('fileUpload.removeFile', { filename: file.name })"
|
|
188
190
|
:icon="fileDeleteIcon || icons.close"
|
|
191
|
+
data-slot="fileTrailingButton"
|
|
189
192
|
:class="b24ui.fileTrailingButton({ class: props.b24ui?.fileTrailingButton })"
|
|
190
193
|
@click.stop.prevent="removeFile(index)"
|
|
191
194
|
/>
|
|
@@ -199,7 +202,7 @@ defineExpose({
|
|
|
199
202
|
</template>
|
|
200
203
|
</DefineFilesTemplate>
|
|
201
204
|
|
|
202
|
-
<Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
205
|
+
<Primitive :as="as" data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
203
206
|
<slot :open="open" :remove-file="removeFile" :b24ui="b24ui">
|
|
204
207
|
<component
|
|
205
208
|
:is="variant === 'button' ? 'button' : 'div'"
|
|
@@ -207,6 +210,7 @@ defineExpose({
|
|
|
207
210
|
:type="variant === 'button' ? 'button' : void 0"
|
|
208
211
|
:role="variant === 'button' ? void 0 : 'button'"
|
|
209
212
|
:data-dragging="isDragging"
|
|
213
|
+
data-slot="base"
|
|
210
214
|
:class="b24ui.base({ class: props.b24ui?.base })"
|
|
211
215
|
:tabindex="interactive && !disabled ? 0 : -1"
|
|
212
216
|
@click="interactive && !disabled && open()"
|
|
@@ -217,35 +221,38 @@ defineExpose({
|
|
|
217
221
|
|
|
218
222
|
<div
|
|
219
223
|
v-if="position === 'inside' ? multiple ? !modelValue?.length : !modelValue : true"
|
|
224
|
+
data-slot="wrapper"
|
|
220
225
|
:class="b24ui.wrapper({ class: props.b24ui?.wrapper })"
|
|
221
226
|
>
|
|
222
227
|
<slot name="leading" :b24ui="b24ui">
|
|
223
228
|
<Component
|
|
224
229
|
:is="icon || icons.upload"
|
|
225
230
|
v-if="variant === 'button'"
|
|
231
|
+
data-slot="icon"
|
|
226
232
|
:class="b24ui.icon({ class: props.b24ui?.icon })"
|
|
227
233
|
/>
|
|
228
234
|
<B24Avatar
|
|
229
235
|
v-else
|
|
230
236
|
:icon="icon || icons.upload"
|
|
231
237
|
:size="props.size"
|
|
238
|
+
data-slot="avatar"
|
|
232
239
|
:class="b24ui.avatar({ class: props.b24ui?.avatar })"
|
|
233
240
|
/>
|
|
234
241
|
</slot>
|
|
235
242
|
|
|
236
243
|
<template v-if="variant !== 'button'">
|
|
237
|
-
<div v-if="label || !!slots.label" :class="b24ui.label({ class: props.b24ui?.label })">
|
|
244
|
+
<div v-if="label || !!slots.label" data-slot="label" :class="b24ui.label({ class: props.b24ui?.label })">
|
|
238
245
|
<slot name="label">
|
|
239
246
|
{{ label }}
|
|
240
247
|
</slot>
|
|
241
248
|
</div>
|
|
242
|
-
<div v-if="description || !!slots.description" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
249
|
+
<div v-if="description || !!slots.description" data-slot="description" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
243
250
|
<slot name="description">
|
|
244
251
|
{{ description }}
|
|
245
252
|
</slot>
|
|
246
253
|
</div>
|
|
247
254
|
|
|
248
|
-
<div v-if="!!slots.actions" :class="b24ui.actions({ class: props.b24ui?.actions })">
|
|
255
|
+
<div v-if="!!slots.actions" data-slot="actions" :class="b24ui.actions({ class: props.b24ui?.actions })">
|
|
249
256
|
<slot name="actions" :files="modelValue" :open="open" :remove-file="removeFile" />
|
|
250
257
|
</div>
|
|
251
258
|
</template>
|
|
@@ -58,40 +58,40 @@ provide(formFieldInjectionKey, computed(() => ({
|
|
|
58
58
|
</script>
|
|
59
59
|
|
|
60
60
|
<template>
|
|
61
|
-
<Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
62
|
-
<div :class="b24ui.wrapper({ class: props.b24ui?.wrapper })">
|
|
63
|
-
<div v-if="label || !!slots.label" :class="b24ui.labelWrapper({ class: props.b24ui?.labelWrapper })">
|
|
64
|
-
<Label :for="id" :class="b24ui.label({ class: props.b24ui?.label })">
|
|
61
|
+
<Primitive :as="as" data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
62
|
+
<div data-slot="wrapper" :class="b24ui.wrapper({ class: props.b24ui?.wrapper })">
|
|
63
|
+
<div v-if="label || !!slots.label" data-slot="root" :class="b24ui.labelWrapper({ class: props.b24ui?.labelWrapper })">
|
|
64
|
+
<Label :for="id" data-slot="label" :class="b24ui.label({ class: props.b24ui?.label })">
|
|
65
65
|
<slot name="label" :label="label">
|
|
66
66
|
{{ label }}
|
|
67
67
|
</slot>
|
|
68
68
|
</Label>
|
|
69
|
-
<span v-if="hint || !!slots.hint" :id="`${ariaId}-hint`" :class="b24ui.hint({ class: props.b24ui?.hint })">
|
|
69
|
+
<span v-if="hint || !!slots.hint" :id="`${ariaId}-hint`" data-slot="hint" :class="b24ui.hint({ class: props.b24ui?.hint })">
|
|
70
70
|
<slot name="hint" :hint="hint">
|
|
71
71
|
{{ hint }}
|
|
72
72
|
</slot>
|
|
73
73
|
</span>
|
|
74
74
|
</div>
|
|
75
75
|
|
|
76
|
-
<p v-if="description || !!slots.description" :id="`${ariaId}-description`" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
76
|
+
<p v-if="description || !!slots.description" :id="`${ariaId}-description`" data-slot="description" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
77
77
|
<slot name="description" :description="description">
|
|
78
78
|
{{ description }}
|
|
79
79
|
</slot>
|
|
80
80
|
</p>
|
|
81
81
|
</div>
|
|
82
82
|
|
|
83
|
-
<div :class="[(label || !!slots.label || description || !!slots.description) && b24ui.container({ class: props.b24ui?.container })]">
|
|
83
|
+
<div data-slot="container" :class="[(label || !!slots.label || description || !!slots.description) && b24ui.container({ class: props.b24ui?.container })]">
|
|
84
84
|
<slot :error="error" />
|
|
85
85
|
|
|
86
|
-
<div v-if="typeof error === 'string' && error || !!slots.error" :id="`${ariaId}-error`" :class="b24ui.error({ class: props.b24ui?.error })">
|
|
86
|
+
<div v-if="typeof error === 'string' && error || !!slots.error" :id="`${ariaId}-error`" data-slot="error" :class="b24ui.error({ class: props.b24ui?.error })">
|
|
87
87
|
<slot name="error" :error="error">
|
|
88
|
-
<div :class="b24ui.errorWrapper({ class: props.b24ui?.errorWrapper })">
|
|
89
|
-
<WarningIcon :class="b24ui.errorIcon()" />
|
|
88
|
+
<div data-slot="errorWrapper" :class="b24ui.errorWrapper({ class: props.b24ui?.errorWrapper })">
|
|
89
|
+
<WarningIcon data-slot="errorIcon" :class="b24ui.errorIcon()" />
|
|
90
90
|
<div>{{ error }}</div>
|
|
91
91
|
</div>
|
|
92
92
|
</slot>
|
|
93
93
|
</div>
|
|
94
|
-
<div v-else-if="help || !!slots.help" :id="`${ariaId}-help`" :class="b24ui.help({ class: props.b24ui?.help })">
|
|
94
|
+
<div v-else-if="help || !!slots.help" :id="`${ariaId}-help`" data-slot="help" :class="b24ui.help({ class: props.b24ui?.help })">
|
|
95
95
|
<slot name="help" :help="help">
|
|
96
96
|
{{ help }}
|
|
97
97
|
</slot>
|
|
@@ -124,9 +124,10 @@ defineExpose({
|
|
|
124
124
|
</script>
|
|
125
125
|
|
|
126
126
|
<template>
|
|
127
|
-
<Primitive :as="as" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
127
|
+
<Primitive :as="as" data-slot="root" :class="b24ui.root({ class: [props.b24ui?.root, props.class] })">
|
|
128
128
|
<B24Badge
|
|
129
129
|
v-if="isTag"
|
|
130
|
+
data-slot="tag"
|
|
130
131
|
:class="b24ui.tag({ class: props.b24ui?.tag })"
|
|
131
132
|
:color="props.tagColor"
|
|
132
133
|
:label="props.tag"
|
|
@@ -140,6 +141,7 @@ defineExpose({
|
|
|
140
141
|
:value="modelValue"
|
|
141
142
|
:name="name"
|
|
142
143
|
:placeholder="placeholder"
|
|
144
|
+
data-slot="base"
|
|
143
145
|
:class="b24ui.base({ class: props.b24ui?.base })"
|
|
144
146
|
:disabled="disabled"
|
|
145
147
|
:required="required"
|
|
@@ -153,27 +155,30 @@ defineExpose({
|
|
|
153
155
|
|
|
154
156
|
<slot :b24ui="b24ui" />
|
|
155
157
|
|
|
156
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
158
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="b24ui.leading({ class: props.b24ui?.leading })">
|
|
157
159
|
<slot name="leading" :b24ui="b24ui">
|
|
158
160
|
<Component
|
|
159
161
|
:is="leadingIconName"
|
|
160
162
|
v-if="isLeading && leadingIconName"
|
|
163
|
+
data-slot="leadingIcon"
|
|
161
164
|
:class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
|
|
162
165
|
/>
|
|
163
166
|
<B24Avatar
|
|
164
167
|
v-else-if="!!avatar"
|
|
165
168
|
:size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
|
|
166
169
|
v-bind="avatar"
|
|
170
|
+
data-slot="leadingAvatar"
|
|
167
171
|
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
168
172
|
/>
|
|
169
173
|
</slot>
|
|
170
174
|
</span>
|
|
171
175
|
|
|
172
|
-
<span v-if="isTrailing || !!slots.trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
176
|
+
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="b24ui.trailing({ class: props.b24ui?.trailing })">
|
|
173
177
|
<slot name="trailing" :b24ui="b24ui">
|
|
174
178
|
<Component
|
|
175
179
|
:is="trailingIconName"
|
|
176
180
|
v-if="trailingIconName"
|
|
181
|
+
data-slot="trailingIcon"
|
|
177
182
|
:class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
|
|
178
183
|
/>
|
|
179
184
|
</slot>
|