@bitrix24/b24ui-nuxt 0.5.0 → 0.5.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/b24ui/navigation-menu.ts +258 -38
- package/.nuxt/b24ui.css +1 -1
- package/README.md +2 -2
- package/dist/meta.cjs +7206 -996
- package/dist/meta.d.cts +7206 -996
- package/dist/meta.d.mts +7206 -996
- package/dist/meta.d.ts +7206 -996
- package/dist/meta.mjs +7206 -996
- package/dist/module.cjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/DropdownMenu.vue +4 -4
- package/dist/runtime/components/InputMenu.vue +3 -3
- package/dist/runtime/components/Modal.vue +10 -7
- package/dist/runtime/components/NavigationMenu.vue +38 -35
- package/dist/runtime/components/Popover.vue +3 -2
- package/dist/runtime/components/RadioGroup.vue +2 -2
- package/dist/runtime/components/Select.vue +3 -3
- package/dist/runtime/components/SelectMenu.vue +3 -3
- package/dist/runtime/components/Slideover.vue +10 -7
- package/dist/runtime/components/Toast.vue +1 -1
- package/dist/runtime/components/Tooltip.vue +3 -2
- package/dist/runtime/plugins/colors.d.ts +3 -0
- package/dist/shared/{b24ui-nuxt.Bj4fKDSa.mjs → b24ui-nuxt.CBnBA3PE.mjs} +352 -48
- package/dist/shared/{b24ui-nuxt.DHbGsmbj.cjs → b24ui-nuxt.ClMXHpMM.cjs} +352 -48
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +7 -7
package/dist/module.cjs
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defu } from 'defu';
|
|
2
2
|
import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
|
|
3
|
-
import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.
|
|
3
|
+
import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.CBnBA3PE.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<!-- eslint-disable vue/block-tag-newline -->
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
import type { VariantProps } from 'tailwind-variants'
|
|
4
|
-
import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentProps, DropdownMenuArrowProps } from 'reka-ui'
|
|
4
|
+
import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentProps, DropdownMenuContentEmits, DropdownMenuArrowProps } from 'reka-ui'
|
|
5
5
|
import type { AppConfig } from '@nuxt/schema'
|
|
6
6
|
import _appConfig from '#build/app.config'
|
|
7
7
|
import theme from '#build/b24ui/dropdown-menu'
|
|
8
8
|
import { tv } from '../utils/tv'
|
|
9
9
|
import type { AvatarProps, KbdProps, LinkProps, IconComponent } from '../types'
|
|
10
|
-
import type { DynamicSlots, PartialString } from '../types/utils'
|
|
10
|
+
import type { DynamicSlots, PartialString, EmitsToProps } from '../types/utils'
|
|
11
11
|
|
|
12
12
|
const appConfigDropdownMenu = _appConfig as AppConfig & { b24ui: { dropdownMenu: Partial<typeof theme> } }
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cust
|
|
|
24
24
|
icon?: IconComponent
|
|
25
25
|
color?: DropdownMenuVariants['color']
|
|
26
26
|
avatar?: AvatarProps
|
|
27
|
-
content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
27
|
+
content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DropdownMenuContentEmits>>
|
|
28
28
|
kbds?: KbdProps['value'][] | KbdProps[]
|
|
29
29
|
/**
|
|
30
30
|
* The item type.
|
|
@@ -65,7 +65,7 @@ export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'>
|
|
|
65
65
|
* The content of the menu.
|
|
66
66
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
67
67
|
*/
|
|
68
|
-
content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
68
|
+
content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DropdownMenuContentEmits>>
|
|
69
69
|
/**
|
|
70
70
|
* Display an arrow alongside the menu.
|
|
71
71
|
* @defaultValue false
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { InputHTMLAttributes } from 'vue'
|
|
3
3
|
import type { VariantProps } from 'tailwind-variants'
|
|
4
|
-
import type { ComboboxRootProps, ComboboxRootEmits, ComboboxContentProps, ComboboxArrowProps, AcceptableValue } from 'reka-ui'
|
|
4
|
+
import type { ComboboxRootProps, ComboboxRootEmits, ComboboxContentProps, ComboboxContentEmits, ComboboxArrowProps, AcceptableValue } from 'reka-ui'
|
|
5
5
|
import type { AppConfig } from '@nuxt/schema'
|
|
6
6
|
import _appConfig from '#build/app.config'
|
|
7
7
|
import theme from '#build/b24ui/input-menu'
|
|
8
8
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons'
|
|
9
9
|
import { tv } from '../utils/tv'
|
|
10
10
|
import type { AvatarProps, ChipProps, InputProps, IconComponent } from '../types'
|
|
11
|
-
import type { PartialString, MaybeArrayOfArray, MaybeArrayOfArrayItem, SelectModelValue, SelectModelValueEmits, SelectItemKey } from '../types/utils'
|
|
11
|
+
import type { PartialString, MaybeArrayOfArray, MaybeArrayOfArrayItem, SelectModelValue, SelectModelValueEmits, SelectItemKey, EmitsToProps } from '../types/utils'
|
|
12
12
|
|
|
13
13
|
const appConfigInputMenu = _appConfig as AppConfig & { b24ui: { inputMenu: Partial<typeof theme> } }
|
|
14
14
|
|
|
@@ -113,7 +113,7 @@ export interface InputMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends Ma
|
|
|
113
113
|
* The content of the menu.
|
|
114
114
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }
|
|
115
115
|
*/
|
|
116
|
-
content?: Omit<ComboboxContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
116
|
+
content?: Omit<ComboboxContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<ComboboxContentEmits>>
|
|
117
117
|
/**
|
|
118
118
|
* Display an arrow alongside the menu.
|
|
119
119
|
* @defaultValue false
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { DialogRootProps, DialogRootEmits, DialogContentProps } from 'reka-ui'
|
|
2
|
+
import type { DialogRootProps, DialogRootEmits, DialogContentProps, DialogContentEmits } from 'reka-ui'
|
|
3
3
|
import type { VariantProps } from 'tailwind-variants'
|
|
4
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
5
|
import _appConfig from '#build/app.config'
|
|
6
6
|
import theme from '#build/b24ui/modal'
|
|
7
7
|
import { tv } from '../utils/tv'
|
|
8
8
|
import type { ButtonProps, IconComponent } from '../types'
|
|
9
|
+
import type { EmitsToProps } from '../types/utils'
|
|
9
10
|
|
|
10
11
|
const appConfigModal = _appConfig as AppConfig & { b24ui: { modal: Partial<typeof theme> } }
|
|
11
12
|
|
|
@@ -19,7 +20,7 @@ export interface ModalProps extends DialogRootProps {
|
|
|
19
20
|
/**
|
|
20
21
|
* The content of the modal
|
|
21
22
|
*/
|
|
22
|
-
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
23
|
+
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DialogContentEmits>>
|
|
23
24
|
/**
|
|
24
25
|
* Render an overlay behind the modal.
|
|
25
26
|
* @defaultValue true
|
|
@@ -113,18 +114,20 @@ const { t } = useLocale()
|
|
|
113
114
|
const rootProps = useForwardPropsEmits(reactivePick(props, 'open', 'defaultOpen', 'modal'), emits)
|
|
114
115
|
const contentProps = toRef(() => props.content)
|
|
115
116
|
const contentEvents = computed(() => {
|
|
117
|
+
const events = {
|
|
118
|
+
closeAutoFocus: (e: Event) => e.preventDefault()
|
|
119
|
+
}
|
|
120
|
+
|
|
116
121
|
if (!props.dismissible) {
|
|
117
122
|
return {
|
|
118
123
|
pointerDownOutside: (e: Event) => e.preventDefault(),
|
|
119
124
|
interactOutside: (e: Event) => e.preventDefault(),
|
|
120
125
|
escapeKeyDown: (e: Event) => e.preventDefault(),
|
|
121
|
-
|
|
126
|
+
...events
|
|
122
127
|
}
|
|
123
128
|
}
|
|
124
129
|
|
|
125
|
-
return
|
|
126
|
-
closeAutoFocus: (e: Event) => e.preventDefault()
|
|
127
|
-
}
|
|
130
|
+
return events
|
|
128
131
|
})
|
|
129
132
|
|
|
130
133
|
const b24ui = computed(() => modal({
|
|
@@ -175,7 +178,7 @@ const b24ui = computed(() => modal({
|
|
|
175
178
|
</DialogDescription>
|
|
176
179
|
</div>
|
|
177
180
|
|
|
178
|
-
<DialogClose as-child>
|
|
181
|
+
<DialogClose v-if="close || !!slots.close" as-child>
|
|
179
182
|
<slot name="close" :b24ui="b24ui">
|
|
180
183
|
<B24Button
|
|
181
184
|
v-if="close"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<!-- eslint-disable vue/block-tag-newline -->
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
import type { VariantProps } from 'tailwind-variants'
|
|
4
|
-
import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps, CollapsibleRootProps } from 'reka-ui'
|
|
4
|
+
import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps, NavigationMenuContentEmits, CollapsibleRootProps } from 'reka-ui'
|
|
5
5
|
import type { AppConfig } from '@nuxt/schema'
|
|
6
6
|
import _appConfig from '#build/app.config'
|
|
7
7
|
import theme from '#build/b24ui/navigation-menu'
|
|
8
8
|
import { tv } from '../utils/tv'
|
|
9
9
|
import type { AvatarProps, BadgeProps, LinkProps, IconComponent } from '../types'
|
|
10
|
-
import type { DynamicSlots, MaybeArrayOfArray, MaybeArrayOfArrayItem, PartialString } from '../types/utils'
|
|
10
|
+
import type { DynamicSlots, MaybeArrayOfArray, MaybeArrayOfArrayItem, PartialString, EmitsToProps } from '../types/utils'
|
|
11
11
|
|
|
12
12
|
const appConfigNavigationMenu = _appConfig as AppConfig & { b24ui: { navigationMenu: Partial<typeof theme> } }
|
|
13
13
|
|
|
@@ -93,8 +93,10 @@ export interface NavigationMenuProps<T> extends Pick<NavigationMenuRootProps, 'm
|
|
|
93
93
|
* @defaultValue 'primary'
|
|
94
94
|
*/
|
|
95
95
|
highlightColor?: NavigationMenuVariants['highlightColor']
|
|
96
|
-
/**
|
|
97
|
-
|
|
96
|
+
/**
|
|
97
|
+
* The content of the menu.
|
|
98
|
+
*/
|
|
99
|
+
content?: Omit<NavigationMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<NavigationMenuContentEmits>>
|
|
98
100
|
/**
|
|
99
101
|
* The orientation of the content.
|
|
100
102
|
* Only works when `orientation` is `horizontal`.
|
|
@@ -193,42 +195,33 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0]
|
|
|
193
195
|
<template>
|
|
194
196
|
<DefineLinkTemplate v-slot="{ item, active, index }">
|
|
195
197
|
<slot :name="item.slot || 'item'" :item="(item as T)" :index="index">
|
|
196
|
-
<
|
|
197
|
-
<
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<span
|
|
206
|
-
v-if="(!collapsed || orientation !== 'vertical') && (get(item, props.labelKey as string) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'])"
|
|
207
|
-
:class="b24ui.linkLabel({ class: props.b24ui?.linkLabel, active })"
|
|
208
|
-
>
|
|
209
|
-
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="(item as T)" :active="active" :index="index">
|
|
210
|
-
{{ get(item, props.labelKey as string) }}
|
|
198
|
+
<span :class="b24ui.linkLabelWrapper({ class: props.b24ui?.linkLabelWrapper, active })">
|
|
199
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="(item as T)" :active="active" :index="index">
|
|
200
|
+
<Component
|
|
201
|
+
:is="item.icon"
|
|
202
|
+
v-if="item.icon"
|
|
203
|
+
:class="b24ui.linkLeadingIcon({ class: props.b24ui?.linkLeadingIcon, active, disabled: !!item.disabled })"
|
|
204
|
+
/>
|
|
205
|
+
<B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.linkLeadingAvatarSize || b24ui.linkLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.linkLeadingAvatar({ class: props.b24ui?.linkLeadingAvatar, active, disabled: !!item.disabled })" />
|
|
211
206
|
</slot>
|
|
212
207
|
|
|
213
|
-
<
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
208
|
+
<span
|
|
209
|
+
v-if="(!collapsed || orientation !== 'vertical') && (get(item, props.labelKey as string) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'])"
|
|
210
|
+
:class="b24ui.linkLabel({ class: props.b24ui?.linkLabel, active })"
|
|
211
|
+
>
|
|
212
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="(item as T)" :active="active" :index="index">
|
|
213
|
+
{{ get(item, props.labelKey as string) }}
|
|
214
|
+
</slot>
|
|
219
215
|
|
|
216
|
+
<Component
|
|
217
|
+
:is="typeof externalIcon !== 'boolean' ? externalIcon : icons.external"
|
|
218
|
+
v-if="item.target === '_blank' && externalIcon !== false"
|
|
219
|
+
:class="b24ui.linkLabelExternalIcon({ class: props.b24ui?.linkLabelExternalIcon, active })"
|
|
220
|
+
/>
|
|
221
|
+
</span>
|
|
222
|
+
</span>
|
|
220
223
|
<span v-if="(!collapsed || orientation !== 'vertical') && (item.badge || (orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])) || (orientation === 'vertical' && item.children?.length) || item.trailingIcon || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing'])" :class="b24ui.linkTrailing({ class: props.b24ui?.linkTrailing })">
|
|
221
224
|
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="(item as T)" :active="active" :index="index">
|
|
222
|
-
<B24Badge
|
|
223
|
-
v-if="item.badge"
|
|
224
|
-
color="default"
|
|
225
|
-
depth="normal"
|
|
226
|
-
:use-fill="false"
|
|
227
|
-
:size="((props.b24ui?.linkTrailingBadgeSize || b24ui.linkTrailingBadgeSize()) as BadgeProps['size'])"
|
|
228
|
-
v-bind="(typeof item.badge === 'string' || typeof item.badge === 'number') ? { label: item.badge } : item.badge"
|
|
229
|
-
:class="b24ui.linkTrailingBadge({ class: props.b24ui?.linkTrailingBadge })"
|
|
230
|
-
/>
|
|
231
|
-
|
|
232
225
|
<Component
|
|
233
226
|
:is="item.trailingIcon || trailingIcon || icons.chevronDown"
|
|
234
227
|
v-if="(orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])) || (orientation === 'vertical' && item.children?.length)"
|
|
@@ -239,6 +232,16 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0]
|
|
|
239
232
|
v-else-if="item.trailingIcon"
|
|
240
233
|
:class="b24ui.linkTrailingIcon({ class: props.b24ui?.linkTrailingIcon, active })"
|
|
241
234
|
/>
|
|
235
|
+
|
|
236
|
+
<B24Badge
|
|
237
|
+
v-if="item.badge"
|
|
238
|
+
color="danger"
|
|
239
|
+
depth="dark"
|
|
240
|
+
:use-fill="true"
|
|
241
|
+
:size="((props.b24ui?.linkTrailingBadgeSize || b24ui.linkTrailingBadgeSize()) as BadgeProps['size'])"
|
|
242
|
+
v-bind="(typeof item.badge === 'string' || typeof item.badge === 'number') ? { label: item.badge } : item.badge"
|
|
243
|
+
:class="b24ui.linkTrailingBadge({ class: props.b24ui?.linkTrailingBadge })"
|
|
244
|
+
/>
|
|
242
245
|
</slot>
|
|
243
246
|
</span>
|
|
244
247
|
</slot>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { PopoverRootProps, HoverCardRootProps, PopoverRootEmits, PopoverContentProps, PopoverArrowProps } from 'reka-ui'
|
|
2
|
+
import type { PopoverRootProps, HoverCardRootProps, PopoverRootEmits, PopoverContentProps, PopoverContentEmits, PopoverArrowProps } from 'reka-ui'
|
|
3
3
|
import type { AppConfig } from '@nuxt/schema'
|
|
4
4
|
import _appConfig from '#build/app.config'
|
|
5
5
|
import theme from '#build/b24ui/popover'
|
|
6
6
|
import { tv } from '../utils/tv'
|
|
7
|
+
import type { EmitsToProps } from '../types/utils'
|
|
7
8
|
|
|
8
9
|
const appConfigPopover = _appConfig as AppConfig & { b24ui: { popover: Partial<typeof theme> } }
|
|
9
10
|
|
|
@@ -19,7 +20,7 @@ export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps,
|
|
|
19
20
|
* The content of the popover.
|
|
20
21
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
21
22
|
*/
|
|
22
|
-
content?: Omit<PopoverContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
23
|
+
content?: Omit<PopoverContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<PopoverContentEmits>>
|
|
23
24
|
/**
|
|
24
25
|
* Display an arrow alongside the popover.
|
|
25
26
|
* @defaultValue false
|
|
@@ -161,8 +161,8 @@ function onUpdate(value: any) {
|
|
|
161
161
|
<RadioGroupItem
|
|
162
162
|
:id="item.id"
|
|
163
163
|
:value="item.value"
|
|
164
|
-
:disabled="disabled"
|
|
165
|
-
:class="b24ui.base({ class: props.b24ui?.base })"
|
|
164
|
+
:disabled="item.disabled"
|
|
165
|
+
:class="b24ui.base({ class: props.b24ui?.base, disabled: item.disabled })"
|
|
166
166
|
>
|
|
167
167
|
<RadioGroupIndicator :class="b24ui.indicator({ class: props.b24ui?.indicator })" />
|
|
168
168
|
</RadioGroupItem>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
-
import type { SelectRootProps, SelectRootEmits, SelectContentProps, SelectArrowProps, AcceptableValue } from 'reka-ui'
|
|
3
|
+
import type { SelectRootProps, SelectRootEmits, SelectContentProps, SelectContentEmits, SelectArrowProps, AcceptableValue } from 'reka-ui'
|
|
4
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
5
|
import _appConfig from '#build/app.config'
|
|
6
6
|
import theme from '#build/b24ui/select'
|
|
7
7
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons'
|
|
8
8
|
import { tv } from '../utils/tv'
|
|
9
9
|
import type { AvatarProps, ChipProps, InputProps, IconComponent } from '../types'
|
|
10
|
-
import type { PartialString, MaybeArrayOfArray, MaybeArrayOfArrayItem, SelectModelValue, SelectModelValueEmits, SelectItemKey } from '../types/utils'
|
|
10
|
+
import type { PartialString, MaybeArrayOfArray, MaybeArrayOfArrayItem, SelectModelValue, SelectModelValueEmits, SelectItemKey, EmitsToProps } from '../types/utils'
|
|
11
11
|
|
|
12
12
|
const appConfigSelect = _appConfig as AppConfig & { b24ui: { select: Partial<typeof theme> } }
|
|
13
13
|
|
|
@@ -87,7 +87,7 @@ export interface SelectProps<T extends MaybeArrayOfArrayItem<I>, I extends Maybe
|
|
|
87
87
|
* The content of the menu.
|
|
88
88
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }
|
|
89
89
|
*/
|
|
90
|
-
content?: Omit<SelectContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
90
|
+
content?: Omit<SelectContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<SelectContentEmits>>
|
|
91
91
|
/**
|
|
92
92
|
* Display an arrow alongside the menu.
|
|
93
93
|
* @defaultValue false
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
-
import type { ComboboxRootProps, ComboboxRootEmits, ComboboxContentProps, ComboboxArrowProps, AcceptableValue } from 'reka-ui'
|
|
3
|
+
import type { ComboboxRootProps, ComboboxRootEmits, ComboboxContentProps, ComboboxContentEmits, ComboboxArrowProps, AcceptableValue } from 'reka-ui'
|
|
4
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
5
|
import _appConfig from '#build/app.config'
|
|
6
6
|
import theme from '#build/b24ui/select-menu'
|
|
7
7
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons'
|
|
8
8
|
import { tv } from '../utils/tv'
|
|
9
9
|
import type { AvatarProps, ChipProps, InputProps, IconComponent } from '../types'
|
|
10
|
-
import type { PartialString, MaybeArrayOfArray, MaybeArrayOfArrayItem, SelectModelValue, SelectModelValueEmits, SelectItemKey } from '../types/utils'
|
|
10
|
+
import type { PartialString, MaybeArrayOfArray, MaybeArrayOfArrayItem, SelectModelValue, SelectModelValueEmits, SelectItemKey, EmitsToProps } from '../types/utils'
|
|
11
11
|
|
|
12
12
|
const appConfigSelectMenu = _appConfig as AppConfig & { b24ui: { selectMenu: Partial<typeof theme> } }
|
|
13
13
|
|
|
@@ -98,7 +98,7 @@ export interface SelectMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends M
|
|
|
98
98
|
* The content of the menu.
|
|
99
99
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }
|
|
100
100
|
*/
|
|
101
|
-
content?: Omit<ComboboxContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
101
|
+
content?: Omit<ComboboxContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<ComboboxContentEmits>>
|
|
102
102
|
/**
|
|
103
103
|
* Display an arrow alongside the menu.
|
|
104
104
|
* @defaultValue false
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
-
import type { DialogRootProps, DialogRootEmits, DialogContentProps } from 'reka-ui'
|
|
3
|
+
import type { DialogRootProps, DialogRootEmits, DialogContentProps, DialogContentEmits } from 'reka-ui'
|
|
4
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
5
|
import _appConfig from '#build/app.config'
|
|
6
6
|
import theme from '#build/b24ui/slideover'
|
|
7
7
|
import { tv } from '../utils/tv'
|
|
8
8
|
import type { ButtonProps, IconComponent } from '../types'
|
|
9
|
+
import type { EmitsToProps } from '../types/utils'
|
|
9
10
|
|
|
10
11
|
const appConfigSlideover = _appConfig as AppConfig & { b24ui: { slideover: Partial<typeof theme> } }
|
|
11
12
|
|
|
@@ -19,7 +20,7 @@ export interface SlideoverProps extends DialogRootProps {
|
|
|
19
20
|
/**
|
|
20
21
|
* The content of the slideover
|
|
21
22
|
*/
|
|
22
|
-
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
23
|
+
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DialogContentEmits>>
|
|
23
24
|
/**
|
|
24
25
|
* Render an overlay behind the slideover.
|
|
25
26
|
* @defaultValue true
|
|
@@ -115,18 +116,20 @@ const { t } = useLocale()
|
|
|
115
116
|
const rootProps = useForwardPropsEmits(reactivePick(props, 'open', 'defaultOpen', 'modal'), emits)
|
|
116
117
|
const contentProps = toRef(() => props.content)
|
|
117
118
|
const contentEvents = computed(() => {
|
|
119
|
+
const events = {
|
|
120
|
+
closeAutoFocus: (e: Event) => e.preventDefault()
|
|
121
|
+
}
|
|
122
|
+
|
|
118
123
|
if (!props.dismissible) {
|
|
119
124
|
return {
|
|
120
125
|
pointerDownOutside: (e: Event) => e.preventDefault(),
|
|
121
126
|
interactOutside: (e: Event) => e.preventDefault(),
|
|
122
127
|
escapeKeyDown: (e: Event) => e.preventDefault(),
|
|
123
|
-
|
|
128
|
+
...events
|
|
124
129
|
}
|
|
125
130
|
}
|
|
126
131
|
|
|
127
|
-
return
|
|
128
|
-
closeAutoFocus: (e: Event) => e.preventDefault()
|
|
129
|
-
}
|
|
132
|
+
return events
|
|
130
133
|
})
|
|
131
134
|
|
|
132
135
|
const b24ui = computed(() => slideover({
|
|
@@ -177,7 +180,7 @@ const b24ui = computed(() => slideover({
|
|
|
177
180
|
</DialogDescription>
|
|
178
181
|
</div>
|
|
179
182
|
|
|
180
|
-
<DialogClose as-child>
|
|
183
|
+
<DialogClose v-if="close || !!slots.close" as-child>
|
|
181
184
|
<slot name="close" :b24ui="b24ui">
|
|
182
185
|
<B24Button
|
|
183
186
|
v-if="close"
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipArrowProps } from 'reka-ui'
|
|
2
|
+
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipContentEmits, TooltipArrowProps } from 'reka-ui'
|
|
3
3
|
import type { AppConfig } from '@nuxt/schema'
|
|
4
4
|
import _appConfig from '#build/app.config'
|
|
5
5
|
import theme from '#build/b24ui/tooltip'
|
|
6
6
|
import { tv } from '../utils/tv'
|
|
7
7
|
import type { KbdProps } from '../types'
|
|
8
|
+
import type { EmitsToProps } from '../types/utils'
|
|
8
9
|
|
|
9
10
|
const appConfigTooltip = _appConfig as AppConfig & { b24ui: { tooltip: Partial<typeof theme> } }
|
|
10
11
|
|
|
@@ -19,7 +20,7 @@ export interface TooltipProps extends TooltipRootProps {
|
|
|
19
20
|
* The content of the tooltip.
|
|
20
21
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
21
22
|
*/
|
|
22
|
-
content?: Omit<TooltipContentProps, 'as' | 'asChild'>
|
|
23
|
+
content?: Omit<TooltipContentProps, 'as' | 'asChild'> & Partial<EmitsToProps<TooltipContentEmits>>
|
|
23
24
|
/**
|
|
24
25
|
* Display an arrow alongside the tooltip.
|
|
25
26
|
* @defaultValue false
|