@bitrix24/b24ui-nuxt 0.6.6 → 0.6.7
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/skeleton.ts +1 -1
- package/dist/meta.d.mts +2719 -297
- package/dist/meta.mjs +2719 -297
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/DescriptionList.vue +12 -0
- package/dist/runtime/components/DescriptionList.vue.d.ts +10 -8
- package/dist/runtime/components/DropdownMenu.vue.d.ts +2 -0
- package/dist/runtime/components/DropdownMenuContent.vue +4 -0
- package/dist/runtime/components/InputMenu.vue +6 -2
- package/dist/runtime/components/InputMenu.vue.d.ts +2 -0
- package/dist/runtime/components/Modal.vue +11 -9
- package/dist/runtime/components/Modal.vue.d.ts +3 -0
- package/dist/runtime/components/NavigationMenu.vue +4 -0
- package/dist/runtime/components/NavigationMenu.vue.d.ts +2 -0
- package/dist/runtime/components/Popover.vue +9 -6
- package/dist/runtime/components/Popover.vue.d.ts +3 -0
- package/dist/runtime/components/Select.vue +5 -0
- package/dist/runtime/components/Select.vue.d.ts +2 -0
- package/dist/runtime/components/SelectMenu.vue +5 -1
- package/dist/runtime/components/SelectMenu.vue.d.ts +2 -0
- package/dist/runtime/components/SidebarLayout.vue +4 -0
- package/dist/runtime/components/SidebarLayout.vue.d.ts +5 -3
- package/dist/runtime/components/Slideover.vue +11 -9
- package/dist/runtime/components/Slideover.vue.d.ts +3 -0
- package/dist/runtime/components/StackedLayout.vue +4 -0
- package/dist/runtime/components/StackedLayout.vue.d.ts +5 -3
- package/dist/shared/{b24ui-nuxt.BL9IkPeR.mjs → b24ui-nuxt.jU270f-Q.mjs} +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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.jU270f-Q.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
7
7
|
const name = "@bitrix24/b24ui-nuxt";
|
|
8
|
-
const version = "0.6.
|
|
8
|
+
const version = "0.6.7";
|
|
9
9
|
|
|
10
10
|
const module = defineNuxtModule({
|
|
11
11
|
meta: {
|
|
@@ -68,6 +68,12 @@ const normalizedItems = computed(() => {
|
|
|
68
68
|
v-for="(item, index) in normalizedItems"
|
|
69
69
|
:key="index"
|
|
70
70
|
>
|
|
71
|
+
<slot
|
|
72
|
+
name="content-top"
|
|
73
|
+
:item="item"
|
|
74
|
+
:index="index"
|
|
75
|
+
/>
|
|
76
|
+
|
|
71
77
|
<slot
|
|
72
78
|
:name="item.slot || 'content'"
|
|
73
79
|
:item="item"
|
|
@@ -163,6 +169,12 @@ const normalizedItems = computed(() => {
|
|
|
163
169
|
</span>
|
|
164
170
|
</dd>
|
|
165
171
|
</slot>
|
|
172
|
+
|
|
173
|
+
<slot
|
|
174
|
+
name="content-bottom"
|
|
175
|
+
:item="item"
|
|
176
|
+
:index="index"
|
|
177
|
+
/>
|
|
166
178
|
</template>
|
|
167
179
|
</dl>
|
|
168
180
|
<div
|
|
@@ -55,14 +55,16 @@ type SlotProps<T extends DescriptionListItem> = (props: {
|
|
|
55
55
|
index: number;
|
|
56
56
|
}) => any;
|
|
57
57
|
export type DescriptionListSlots<T extends DescriptionListItem = DescriptionListItem> = {
|
|
58
|
-
legend(props?: {}): any;
|
|
59
|
-
text(props?: {}): any;
|
|
60
|
-
leading: SlotProps<T>;
|
|
61
|
-
label: SlotProps<T>;
|
|
62
|
-
description: SlotProps<T>;
|
|
63
|
-
actions: SlotProps<T>;
|
|
64
|
-
content: SlotProps<T>;
|
|
65
|
-
|
|
58
|
+
'legend'(props?: {}): any;
|
|
59
|
+
'text'(props?: {}): any;
|
|
60
|
+
'leading': SlotProps<T>;
|
|
61
|
+
'label': SlotProps<T>;
|
|
62
|
+
'description': SlotProps<T>;
|
|
63
|
+
'actions': SlotProps<T>;
|
|
64
|
+
'content-top': SlotProps<T>;
|
|
65
|
+
'content': SlotProps<T>;
|
|
66
|
+
'content-bottom': SlotProps<T>;
|
|
67
|
+
'footer'(props?: {
|
|
66
68
|
b24ui: any;
|
|
67
69
|
}): any;
|
|
68
70
|
} & DynamicSlots<T, undefined, {
|
|
@@ -92,6 +92,8 @@ export type DropdownMenuSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayO
|
|
|
92
92
|
'item-leading': SlotProps<T>;
|
|
93
93
|
'item-label': SlotProps<T>;
|
|
94
94
|
'item-trailing': SlotProps<T>;
|
|
95
|
+
'content-top': (props?: {}) => any;
|
|
96
|
+
'content-bottom': (props?: {}) => any;
|
|
95
97
|
} & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing', {
|
|
96
98
|
active?: boolean;
|
|
97
99
|
index: number;
|
|
@@ -117,6 +117,8 @@ const groups = computed(
|
|
|
117
117
|
|
|
118
118
|
<DropdownMenu.Portal v-bind="portalProps">
|
|
119
119
|
<component :is="sub ? DropdownMenu.SubContent : DropdownMenu.Content" :class="props.class" v-bind="contentProps">
|
|
120
|
+
<slot name="content-top" />
|
|
121
|
+
|
|
120
122
|
<DropdownMenu.Group v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="b24ui.group({ class: b24uiOverride?.group })">
|
|
121
123
|
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
122
124
|
<DropdownMenu.Label v-if="item.type === 'label'" :class="b24ui.label({ class: b24uiOverride?.label })">
|
|
@@ -185,6 +187,8 @@ const groups = computed(
|
|
|
185
187
|
</DropdownMenu.Group>
|
|
186
188
|
|
|
187
189
|
<slot />
|
|
190
|
+
|
|
191
|
+
<slot name="content-bottom" />
|
|
188
192
|
</component>
|
|
189
193
|
</DropdownMenu.Portal>
|
|
190
194
|
</template>
|
|
@@ -134,7 +134,7 @@ const createItem = computed(() => {
|
|
|
134
134
|
}
|
|
135
135
|
const newItem = props.valueKey ? { [props.valueKey]: searchTerm.value } : searchTerm.value;
|
|
136
136
|
if (typeof props.createItem === "object" && props.createItem.when === "always" || props.createItem === "always") {
|
|
137
|
-
return !filteredItems.value.find((item) => compare(item, newItem,
|
|
137
|
+
return !filteredItems.value.find((item) => compare(item, newItem, props.valueKey));
|
|
138
138
|
}
|
|
139
139
|
return !filteredItems.value.length;
|
|
140
140
|
});
|
|
@@ -330,6 +330,8 @@ defineExpose({
|
|
|
330
330
|
|
|
331
331
|
<ComboboxPortal v-bind="portalProps">
|
|
332
332
|
<ComboboxContent :class="b24ui.content({ class: props.b24ui?.content })" v-bind="contentProps">
|
|
333
|
+
<slot name="content-top" />
|
|
334
|
+
|
|
333
335
|
<ComboboxEmpty :class="b24ui.empty({ class: props.b24ui?.empty })">
|
|
334
336
|
<slot name="empty" :search-term="searchTerm">
|
|
335
337
|
{{ searchTerm ? t('inputMenu.noMatch', { searchTerm }) : t('inputMenu.noData') }}
|
|
@@ -351,7 +353,7 @@ defineExpose({
|
|
|
351
353
|
v-else
|
|
352
354
|
:class="b24ui.item({ class: props.b24ui?.item, colorItem: isInputItem(item) ? item?.color : void 0 })"
|
|
353
355
|
:disabled="isInputItem(item) && item.disabled"
|
|
354
|
-
:value="props.valueKey && isInputItem(item) ? get(item,
|
|
356
|
+
:value="props.valueKey && isInputItem(item) ? get(item, props.valueKey) : item"
|
|
355
357
|
@select="onSelect($event, item)"
|
|
356
358
|
>
|
|
357
359
|
<slot name="item" :item="item" :index="index">
|
|
@@ -396,6 +398,8 @@ defineExpose({
|
|
|
396
398
|
<ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'bottom'" />
|
|
397
399
|
</ComboboxViewport>
|
|
398
400
|
|
|
401
|
+
<slot name="content-bottom" />
|
|
402
|
+
|
|
399
403
|
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
400
404
|
</ComboboxContent>
|
|
401
405
|
</ComboboxPortal>
|
|
@@ -211,6 +211,8 @@ export interface InputMenuSlots<A extends ArrayOrNested<InputMenuItem> = ArrayOr
|
|
|
211
211
|
'item-trailing': SlotProps<T>;
|
|
212
212
|
'tags-item-text': SlotProps<T>;
|
|
213
213
|
'tags-item-delete': SlotProps<T>;
|
|
214
|
+
'content-top': (props?: {}) => any;
|
|
215
|
+
'content-bottom': (props?: {}) => any;
|
|
214
216
|
'create-item-label'(props: {
|
|
215
217
|
item: string;
|
|
216
218
|
}): any;
|
|
@@ -31,7 +31,7 @@ const props = defineProps({
|
|
|
31
31
|
defaultOpen: { type: Boolean, required: false },
|
|
32
32
|
modal: { type: Boolean, required: false, default: true }
|
|
33
33
|
});
|
|
34
|
-
const emits = defineEmits(["after:leave", "update:open"]);
|
|
34
|
+
const emits = defineEmits(["after:leave", "close:prevent", "update:open"]);
|
|
35
35
|
const slots = defineSlots();
|
|
36
36
|
const { t } = useLocale();
|
|
37
37
|
const appConfig = useAppConfig();
|
|
@@ -39,18 +39,20 @@ const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen"
|
|
|
39
39
|
const portalProps = usePortal(toRef(() => props.portal));
|
|
40
40
|
const contentProps = toRef(() => props.content);
|
|
41
41
|
const contentEvents = computed(() => {
|
|
42
|
-
const
|
|
42
|
+
const defaultEvents = {
|
|
43
43
|
closeAutoFocus: (e) => e.preventDefault()
|
|
44
44
|
};
|
|
45
45
|
if (!props.dismissible) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
const events = ["pointerDownOutside", "interactOutside", "escapeKeyDown", "closeAutoFocus"];
|
|
47
|
+
return events.reduce((acc, curr) => {
|
|
48
|
+
acc[curr] = (e) => {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
emits("close:prevent");
|
|
51
|
+
};
|
|
52
|
+
return acc;
|
|
53
|
+
}, {});
|
|
52
54
|
}
|
|
53
|
-
return
|
|
55
|
+
return defaultEvents;
|
|
54
56
|
});
|
|
55
57
|
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.modal || {} })({
|
|
56
58
|
transition: props.transition,
|
|
@@ -63,6 +63,7 @@ export interface ModalProps extends DialogRootProps {
|
|
|
63
63
|
}
|
|
64
64
|
export interface ModalEmits extends DialogRootEmits {
|
|
65
65
|
'after:leave': [];
|
|
66
|
+
'close:prevent': [];
|
|
66
67
|
}
|
|
67
68
|
export interface ModalSlots {
|
|
68
69
|
default(props: {
|
|
@@ -83,9 +84,11 @@ export interface ModalSlots {
|
|
|
83
84
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
84
85
|
"update:open": (value: boolean) => any;
|
|
85
86
|
"after:leave": () => any;
|
|
87
|
+
"close:prevent": () => any;
|
|
86
88
|
}, string, import("vue").PublicProps, Readonly<ModalProps> & Readonly<{
|
|
87
89
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
88
90
|
"onAfter:leave"?: (() => any) | undefined;
|
|
91
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
89
92
|
}>, {
|
|
90
93
|
close: boolean | Partial<ButtonProps>;
|
|
91
94
|
modal: boolean;
|
|
@@ -229,6 +229,8 @@ const lists = computed(
|
|
|
229
229
|
:class="b24ui.root({ class: [props.class, props.b24ui?.root] })"
|
|
230
230
|
data-slot="section"
|
|
231
231
|
>
|
|
232
|
+
<slot name="list-leading" />
|
|
233
|
+
|
|
232
234
|
<template v-for="(list, listIndex) in lists" :key="`list-${listIndex}`">
|
|
233
235
|
<NavigationMenuList :class="b24ui.list({ class: props.b24ui?.list })">
|
|
234
236
|
<ReuseItemTemplate
|
|
@@ -243,6 +245,8 @@ const lists = computed(
|
|
|
243
245
|
<div v-if="orientation === 'vertical' && listIndex < lists.length - 1" :class="b24ui.separator({ class: props.b24ui?.separator })" />
|
|
244
246
|
</template>
|
|
245
247
|
|
|
248
|
+
<slot name="list-trailing" />
|
|
249
|
+
|
|
246
250
|
<div v-if="orientation === 'horizontal'" :class="b24ui.viewportWrapper({ class: props.b24ui?.viewportWrapper })">
|
|
247
251
|
<NavigationMenuIndicator v-if="arrow" :class="b24ui.indicator({ class: props.b24ui?.indicator })">
|
|
248
252
|
<div :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
@@ -122,6 +122,8 @@ export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = Ar
|
|
|
122
122
|
'item-label': SlotProps<T>;
|
|
123
123
|
'item-trailing': SlotProps<T>;
|
|
124
124
|
'item-content': SlotProps<T>;
|
|
125
|
+
'list-leading': (props?: {}) => any;
|
|
126
|
+
'list-trailing': (props?: {}) => any;
|
|
125
127
|
} & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing' | 'content', {
|
|
126
128
|
index: number;
|
|
127
129
|
active?: boolean;
|
|
@@ -25,7 +25,7 @@ const props = defineProps({
|
|
|
25
25
|
openDelay: { type: Number, required: false, default: 0 },
|
|
26
26
|
closeDelay: { type: Number, required: false, default: 0 }
|
|
27
27
|
});
|
|
28
|
-
const emits = defineEmits(["update:open"]);
|
|
28
|
+
const emits = defineEmits(["close:prevent", "update:open"]);
|
|
29
29
|
const slots = defineSlots();
|
|
30
30
|
const appConfig = useAppConfig();
|
|
31
31
|
const pick = props.mode === "hover" ? reactivePick(props, "defaultOpen", "open", "openDelay", "closeDelay") : reactivePick(props, "defaultOpen", "open", "modal");
|
|
@@ -34,11 +34,14 @@ const portalProps = usePortal(toRef(() => props.portal));
|
|
|
34
34
|
const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8 }));
|
|
35
35
|
const contentEvents = computed(() => {
|
|
36
36
|
if (!props.dismissible) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
const events = ["pointerDownOutside", "interactOutside", "escapeKeyDown"];
|
|
38
|
+
return events.reduce((acc, curr) => {
|
|
39
|
+
acc[curr] = (e) => {
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
emits("close:prevent");
|
|
42
|
+
};
|
|
43
|
+
return acc;
|
|
44
|
+
}, {});
|
|
42
45
|
}
|
|
43
46
|
return {};
|
|
44
47
|
});
|
|
@@ -34,6 +34,7 @@ export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps,
|
|
|
34
34
|
b24ui?: Popover['slots'];
|
|
35
35
|
}
|
|
36
36
|
export interface PopoverEmits extends PopoverRootEmits {
|
|
37
|
+
'close:prevent': [];
|
|
37
38
|
}
|
|
38
39
|
export interface PopoverSlots {
|
|
39
40
|
default(props: {
|
|
@@ -43,8 +44,10 @@ export interface PopoverSlots {
|
|
|
43
44
|
}
|
|
44
45
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
46
|
"update:open": (value: boolean) => any;
|
|
47
|
+
"close:prevent": () => any;
|
|
46
48
|
}, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
|
|
47
49
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
50
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
48
51
|
}>, {
|
|
49
52
|
mode: "click" | "hover";
|
|
50
53
|
portal: boolean | string | HTMLElement;
|
|
@@ -171,6 +171,8 @@ function isSelectItem(item) {
|
|
|
171
171
|
|
|
172
172
|
<SelectPortal v-bind="portalProps">
|
|
173
173
|
<SelectContent :class="b24ui.content({ class: props.b24ui?.content })" v-bind="contentProps">
|
|
174
|
+
<slot name="content-top" />
|
|
175
|
+
|
|
174
176
|
<SelectScrollUpButton :class="b24ui.scrollUpDownButton({ class: props.b24ui?.scrollUpDownButton })">
|
|
175
177
|
<Component
|
|
176
178
|
:is="icons.chevronUp"
|
|
@@ -238,6 +240,9 @@ function isSelectItem(item) {
|
|
|
238
240
|
:class="b24ui.scrollUpDownButtonIcon({ class: props.b24ui?.scrollUpDownButtonIcon })"
|
|
239
241
|
/>
|
|
240
242
|
</SelectScrollDownButton>
|
|
243
|
+
|
|
244
|
+
<slot name="content-bottom" />
|
|
245
|
+
|
|
241
246
|
<SelectArrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
242
247
|
</SelectContent>
|
|
243
248
|
</SelectPortal>
|
|
@@ -154,6 +154,8 @@ export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested
|
|
|
154
154
|
'item-leading': SlotProps<T>;
|
|
155
155
|
'item-label': SlotProps<T>;
|
|
156
156
|
'item-trailing': SlotProps<T>;
|
|
157
|
+
'content-top': (props?: {}) => any;
|
|
158
|
+
'content-bottom': (props?: {}) => any;
|
|
157
159
|
}
|
|
158
160
|
declare const _default: <T extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = "value", M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
159
161
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
@@ -155,7 +155,7 @@ const createItem = computed(() => {
|
|
|
155
155
|
}
|
|
156
156
|
const newItem = props.valueKey ? { [props.valueKey]: searchTerm.value } : searchTerm.value;
|
|
157
157
|
if (typeof props.createItem === "object" && props.createItem.when === "always" || props.createItem === "always") {
|
|
158
|
-
return !filteredItems.value.find((item) => compare(item, newItem,
|
|
158
|
+
return !filteredItems.value.find((item) => compare(item, newItem, props.valueKey));
|
|
159
159
|
}
|
|
160
160
|
return !filteredItems.value.length;
|
|
161
161
|
});
|
|
@@ -283,6 +283,8 @@ function isSelectItem(item) {
|
|
|
283
283
|
<ComboboxPortal v-bind="portalProps">
|
|
284
284
|
<ComboboxContent :class="b24ui.content({ class: props.b24ui?.content })" v-bind="contentProps">
|
|
285
285
|
<FocusScope trapped :class="b24ui.focusScope({ class: props.b24ui?.focusScope })">
|
|
286
|
+
<slot name="content-top" />
|
|
287
|
+
|
|
286
288
|
<ComboboxInput v-if="!!searchInput" v-model="searchTerm" :display-value="() => searchTerm" as-child>
|
|
287
289
|
<B24Input no-border autofocus autocomplete="off" v-bind="searchInputProps" :class="b24ui.input({ class: props.b24ui?.input })" />
|
|
288
290
|
</ComboboxInput>
|
|
@@ -352,6 +354,8 @@ function isSelectItem(item) {
|
|
|
352
354
|
|
|
353
355
|
<ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'bottom'" />
|
|
354
356
|
</ComboboxViewport>
|
|
357
|
+
|
|
358
|
+
<slot name="content-bottom" />
|
|
355
359
|
</FocusScope>
|
|
356
360
|
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
357
361
|
</ComboboxContent>
|
|
@@ -193,6 +193,8 @@ export interface SelectMenuSlots<A extends ArrayOrNested<SelectMenuItem> = Array
|
|
|
193
193
|
'item-leading': SlotProps<T>;
|
|
194
194
|
'item-label': SlotProps<T>;
|
|
195
195
|
'item-trailing': SlotProps<T>;
|
|
196
|
+
'content-top': (props?: {}) => any;
|
|
197
|
+
'content-bottom': (props?: {}) => any;
|
|
196
198
|
'create-item-label'(props: {
|
|
197
199
|
item: string;
|
|
198
200
|
}): any;
|
|
@@ -108,6 +108,8 @@ const handleNavigationClick = () => {
|
|
|
108
108
|
</header>
|
|
109
109
|
|
|
110
110
|
<!-- Page Content -->
|
|
111
|
+
<slot name="content-top" />
|
|
112
|
+
|
|
111
113
|
<template v-if="!!slots.default">
|
|
112
114
|
<main :class="b24ui.container({ class: props.b24ui?.container })">
|
|
113
115
|
<div :class="b24ui.containerWrapper({ class: props.b24ui?.containerWrapper })">
|
|
@@ -117,5 +119,7 @@ const handleNavigationClick = () => {
|
|
|
117
119
|
</div>
|
|
118
120
|
</main>
|
|
119
121
|
</template>
|
|
122
|
+
|
|
123
|
+
<slot name="content-bottom" />
|
|
120
124
|
</Primitive>
|
|
121
125
|
</template>
|
|
@@ -18,17 +18,19 @@ export interface SidebarLayoutSlots {
|
|
|
18
18
|
* @param props
|
|
19
19
|
* @param props.handleClick - Handler for navigation click events
|
|
20
20
|
*/
|
|
21
|
-
sidebar(props: {
|
|
21
|
+
'sidebar'(props: {
|
|
22
22
|
handleClick: () => void;
|
|
23
23
|
}): any;
|
|
24
24
|
/**
|
|
25
25
|
* Menu for mobile screen sizes.
|
|
26
26
|
*/
|
|
27
|
-
navbar(props?: {}): any;
|
|
27
|
+
'navbar'(props?: {}): any;
|
|
28
28
|
/**
|
|
29
29
|
* The page content.
|
|
30
30
|
*/
|
|
31
|
-
default(props?: {}): any;
|
|
31
|
+
'default'(props?: {}): any;
|
|
32
|
+
'content-top': (props?: {}) => any;
|
|
33
|
+
'content-bottom': (props?: {}) => any;
|
|
32
34
|
}
|
|
33
35
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<SidebarLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SidebarLayoutProps> & Readonly<{}>, {
|
|
34
36
|
as: any;
|
|
@@ -31,7 +31,7 @@ const props = defineProps({
|
|
|
31
31
|
defaultOpen: { type: Boolean, required: false },
|
|
32
32
|
modal: { type: Boolean, required: false, default: true }
|
|
33
33
|
});
|
|
34
|
-
const emits = defineEmits(["after:leave", "update:open"]);
|
|
34
|
+
const emits = defineEmits(["after:leave", "close:prevent", "update:open"]);
|
|
35
35
|
const slots = defineSlots();
|
|
36
36
|
const { t } = useLocale();
|
|
37
37
|
const appConfig = useAppConfig();
|
|
@@ -39,18 +39,20 @@ const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen"
|
|
|
39
39
|
const portalProps = usePortal(toRef(() => props.portal));
|
|
40
40
|
const contentProps = toRef(() => props.content);
|
|
41
41
|
const contentEvents = computed(() => {
|
|
42
|
-
const
|
|
42
|
+
const defaultEvents = {
|
|
43
43
|
closeAutoFocus: (e) => e.preventDefault()
|
|
44
44
|
};
|
|
45
45
|
if (!props.dismissible) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
const events = ["pointerDownOutside", "interactOutside", "escapeKeyDown", "closeAutoFocus"];
|
|
47
|
+
return events.reduce((acc, curr) => {
|
|
48
|
+
acc[curr] = (e) => {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
emits("close:prevent");
|
|
51
|
+
};
|
|
52
|
+
return acc;
|
|
53
|
+
}, {});
|
|
52
54
|
}
|
|
53
|
-
return
|
|
55
|
+
return defaultEvents;
|
|
54
56
|
});
|
|
55
57
|
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.slideover || {} })({
|
|
56
58
|
transition: props.transition,
|
|
@@ -64,6 +64,7 @@ export interface SlideoverProps extends DialogRootProps {
|
|
|
64
64
|
}
|
|
65
65
|
export interface SlideoverEmits extends DialogRootEmits {
|
|
66
66
|
'after:leave': [];
|
|
67
|
+
'close:prevent': [];
|
|
67
68
|
}
|
|
68
69
|
export interface SlideoverSlots {
|
|
69
70
|
default(props: {
|
|
@@ -84,9 +85,11 @@ export interface SlideoverSlots {
|
|
|
84
85
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<SlideoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
85
86
|
"update:open": (value: boolean) => any;
|
|
86
87
|
"after:leave": () => any;
|
|
88
|
+
"close:prevent": () => any;
|
|
87
89
|
}, string, import("vue").PublicProps, Readonly<SlideoverProps> & Readonly<{
|
|
88
90
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
89
91
|
"onAfter:leave"?: (() => any) | undefined;
|
|
92
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
90
93
|
}>, {
|
|
91
94
|
close: boolean | Partial<ButtonProps>;
|
|
92
95
|
modal: boolean;
|
|
@@ -100,6 +100,8 @@ const handleNavigationClick = () => {
|
|
|
100
100
|
</header>
|
|
101
101
|
|
|
102
102
|
<!-- Page Content -->
|
|
103
|
+
<slot name="content-top" />
|
|
104
|
+
|
|
103
105
|
<template v-if="!!slots.default">
|
|
104
106
|
<main :class="b24ui.container({ class: props.b24ui?.container })">
|
|
105
107
|
<div :class="b24ui.containerWrapper({ class: props.b24ui?.containerWrapper })">
|
|
@@ -109,5 +111,7 @@ const handleNavigationClick = () => {
|
|
|
109
111
|
</div>
|
|
110
112
|
</main>
|
|
111
113
|
</template>
|
|
114
|
+
|
|
115
|
+
<slot name="content-bottom" />
|
|
112
116
|
</Primitive>
|
|
113
117
|
</template>
|
|
@@ -18,17 +18,19 @@ export interface StackedLayoutSlots {
|
|
|
18
18
|
* @param props
|
|
19
19
|
* @param props.handleClick - Handler for navigation click events
|
|
20
20
|
*/
|
|
21
|
-
sidebar(props: {
|
|
21
|
+
'sidebar'(props: {
|
|
22
22
|
handleClick: () => void;
|
|
23
23
|
}): any;
|
|
24
24
|
/**
|
|
25
25
|
* Menu for desktop screen sizes.
|
|
26
26
|
*/
|
|
27
|
-
navbar(props?: {}): any;
|
|
27
|
+
'navbar'(props?: {}): any;
|
|
28
28
|
/**
|
|
29
29
|
* The page content.
|
|
30
30
|
*/
|
|
31
|
-
default(props?: {}): any;
|
|
31
|
+
'default'(props?: {}): any;
|
|
32
|
+
'content-top': (props?: {}) => any;
|
|
33
|
+
'content-bottom': (props?: {}) => any;
|
|
32
34
|
}
|
|
33
35
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<StackedLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<StackedLayoutProps> & Readonly<{}>, {
|
|
34
36
|
as: any;
|
|
@@ -5621,7 +5621,7 @@ const separator = {
|
|
|
5621
5621
|
};
|
|
5622
5622
|
|
|
5623
5623
|
const skeleton = {
|
|
5624
|
-
base: "animate-pulse rounded-md bg-gray-200 dark:bg-gray-800
|
|
5624
|
+
base: "animate-pulse rounded-md bg-gray-200 dark:bg-gray-800"
|
|
5625
5625
|
};
|
|
5626
5626
|
|
|
5627
5627
|
const safeList = [
|
package/dist/unplugin.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
|
|
|
3
3
|
import { createUnplugin } from 'unplugin';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
5
|
import tailwind from '@tailwindcss/vite';
|
|
6
|
-
import { g as getTemplates, d as defaultOptions, a as getDefaultUiConfig } from './shared/b24ui-nuxt.
|
|
6
|
+
import { g as getTemplates, d as defaultOptions, a as getDefaultUiConfig } from './shared/b24ui-nuxt.jU270f-Q.mjs';
|
|
7
7
|
import { globSync } from 'tinyglobby';
|
|
8
8
|
import { genSafeVariableName } from 'knitwork';
|
|
9
9
|
import MagicString from 'magic-string';
|
package/dist/vite.mjs
CHANGED
package/package.json
CHANGED