@bitrix24/b24ui-nuxt 0.6.6 → 0.6.8

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.
Files changed (36) hide show
  1. package/.nuxt/b24ui/skeleton.ts +1 -1
  2. package/dist/meta.d.mts +3091 -464
  3. package/dist/meta.mjs +3091 -464
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +2 -2
  6. package/dist/runtime/components/App.vue +1 -1
  7. package/dist/runtime/components/Calendar.vue +5 -1
  8. package/dist/runtime/components/Checkbox.vue +1 -1
  9. package/dist/runtime/components/DescriptionList.vue +12 -0
  10. package/dist/runtime/components/DescriptionList.vue.d.ts +10 -8
  11. package/dist/runtime/components/DropdownMenu.vue.d.ts +2 -0
  12. package/dist/runtime/components/DropdownMenuContent.vue +4 -0
  13. package/dist/runtime/components/InputMenu.vue +6 -2
  14. package/dist/runtime/components/InputMenu.vue.d.ts +210 -0
  15. package/dist/runtime/components/InputNumber.vue.d.ts +74 -0
  16. package/dist/runtime/components/Modal.vue +11 -9
  17. package/dist/runtime/components/Modal.vue.d.ts +3 -0
  18. package/dist/runtime/components/NavigationMenu.vue +4 -0
  19. package/dist/runtime/components/NavigationMenu.vue.d.ts +2 -0
  20. package/dist/runtime/components/Popover.vue +9 -6
  21. package/dist/runtime/components/Popover.vue.d.ts +3 -0
  22. package/dist/runtime/components/RadioGroup.vue +2 -2
  23. package/dist/runtime/components/Select.vue +5 -0
  24. package/dist/runtime/components/Select.vue.d.ts +2 -0
  25. package/dist/runtime/components/SelectMenu.vue +5 -1
  26. package/dist/runtime/components/SelectMenu.vue.d.ts +2 -0
  27. package/dist/runtime/components/SidebarLayout.vue +4 -0
  28. package/dist/runtime/components/SidebarLayout.vue.d.ts +5 -3
  29. package/dist/runtime/components/Slideover.vue +11 -9
  30. package/dist/runtime/components/Slideover.vue.d.ts +3 -0
  31. package/dist/runtime/components/StackedLayout.vue +4 -0
  32. package/dist/runtime/components/StackedLayout.vue.d.ts +5 -3
  33. package/dist/shared/{b24ui-nuxt.BL9IkPeR.mjs → b24ui-nuxt.jU270f-Q.mjs} +1 -1
  34. package/dist/unplugin.mjs +1 -1
  35. package/dist/vite.mjs +1 -1
  36. package/package.json +27 -27
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitrix24/b24ui-nuxt",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
4
4
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
5
5
  "configKey": "b24ui",
6
6
  "compatibility": {
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.BL9IkPeR.mjs';
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.6";
8
+ const version = "0.6.8";
9
9
 
10
10
  const module = defineNuxtModule({
11
11
  meta: {
@@ -15,7 +15,7 @@ import B24OverlayProvider from "./OverlayProvider.vue";
15
15
  const props = defineProps({
16
16
  tooltip: { type: Object, required: false },
17
17
  toaster: { type: [Object, null], required: false },
18
- locale: { type: null, required: false },
18
+ locale: { type: Object, required: false },
19
19
  portal: { type: null, required: false, default: "body" },
20
20
  scrollBody: { type: [Boolean, Object], required: false },
21
21
  nonce: { type: String, required: false }
@@ -37,6 +37,7 @@ const props = defineProps({
37
37
  allowNonContiguousRanges: { type: Boolean, required: false },
38
38
  pagedNavigation: { type: Boolean, required: false },
39
39
  preventDeselect: { type: Boolean, required: false },
40
+ maximumDays: { type: Number, required: false },
40
41
  weekStartsOn: { type: Number, required: false },
41
42
  weekdayFormat: { type: String, required: false },
42
43
  fixedWeeks: { type: Boolean, required: false, default: true },
@@ -48,8 +49,11 @@ const props = defineProps({
48
49
  initialFocus: { type: Boolean, required: false },
49
50
  isDateDisabled: { type: Function, required: false },
50
51
  isDateUnavailable: { type: Function, required: false },
52
+ isDateHighlightable: { type: Function, required: false },
51
53
  nextPage: { type: Function, required: false },
52
- prevPage: { type: Function, required: false }
54
+ prevPage: { type: Function, required: false },
55
+ disableDaysOutsideCurrentView: { type: Boolean, required: false },
56
+ fixedDate: { type: String, required: false }
53
57
  });
54
58
  const emits = defineEmits(["update:modelValue", "update:placeholder", "update:startValue"]);
55
59
  defineSlots();
@@ -23,7 +23,7 @@ const props = defineProps({
23
23
  disabled: { type: Boolean, required: false },
24
24
  required: { type: Boolean, required: false },
25
25
  name: { type: String, required: false },
26
- value: { type: [String, Number, Object, null], required: false },
26
+ value: { type: null, required: false },
27
27
  id: { type: String, required: false },
28
28
  defaultValue: { type: [Boolean, String], required: false }
29
29
  });
@@ -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
- footer(props?: {
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, String(props.valueKey)));
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, String(props.valueKey)) : 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;
@@ -249,6 +251,110 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
249
251
  };
250
252
  $refs: {
251
253
  [x: string]: unknown;
254
+ } & {
255
+ primitiveElement: ({
256
+ $: import("vue").ComponentInternalInstance;
257
+ $data: {};
258
+ $props: {
259
+ readonly modelValue?: string | undefined;
260
+ readonly autoFocus?: boolean | undefined;
261
+ readonly disabled?: boolean | undefined;
262
+ readonly asChild?: boolean | undefined;
263
+ readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
264
+ readonly "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
265
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
266
+ $attrs: {
267
+ [x: string]: unknown;
268
+ };
269
+ $refs: {
270
+ [x: string]: unknown;
271
+ } & {
272
+ primitiveElement: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
273
+ asChild: {
274
+ type: BooleanConstructor;
275
+ default: boolean;
276
+ };
277
+ as: {
278
+ type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
279
+ default: string;
280
+ };
281
+ }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
282
+ [key: string]: any;
283
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
284
+ asChild: boolean;
285
+ as: import("reka-ui").AsTag | import("vue").Component;
286
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
287
+ P: {};
288
+ B: {};
289
+ D: {};
290
+ C: {};
291
+ M: {};
292
+ Defaults: {};
293
+ }, Readonly<import("vue").ExtractPropTypes<{
294
+ asChild: {
295
+ type: BooleanConstructor;
296
+ default: boolean;
297
+ };
298
+ as: {
299
+ type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
300
+ default: string;
301
+ };
302
+ }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
303
+ [key: string]: any;
304
+ }>, {}, {}, {}, {
305
+ asChild: boolean;
306
+ as: import("reka-ui").AsTag | import("vue").Component;
307
+ }> | null;
308
+ };
309
+ $slots: Readonly<{
310
+ [name: string]: import("vue").Slot<any> | undefined;
311
+ }>;
312
+ $root: import("vue").ComponentPublicInstance | null;
313
+ $parent: import("vue").ComponentPublicInstance | null;
314
+ $host: Element | null;
315
+ $emit: (event: "update:modelValue", args_0: string) => void;
316
+ $el: any;
317
+ $options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").ListboxFilterProps> & Readonly<{
318
+ "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
319
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
320
+ "update:modelValue": (args_0: string) => any;
321
+ }, string, {
322
+ as: import("reka-ui").AsTag | import("vue").Component;
323
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
324
+ beforeCreate?: (() => void) | (() => void)[];
325
+ created?: (() => void) | (() => void)[];
326
+ beforeMount?: (() => void) | (() => void)[];
327
+ mounted?: (() => void) | (() => void)[];
328
+ beforeUpdate?: (() => void) | (() => void)[];
329
+ updated?: (() => void) | (() => void)[];
330
+ activated?: (() => void) | (() => void)[];
331
+ deactivated?: (() => void) | (() => void)[];
332
+ beforeDestroy?: (() => void) | (() => void)[];
333
+ beforeUnmount?: (() => void) | (() => void)[];
334
+ destroyed?: (() => void) | (() => void)[];
335
+ unmounted?: (() => void) | (() => void)[];
336
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
337
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
338
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
339
+ };
340
+ $forceUpdate: () => void;
341
+ $nextTick: typeof import("vue").nextTick;
342
+ $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
343
+ } & Readonly<{
344
+ as: import("reka-ui").AsTag | import("vue").Component;
345
+ }> & Omit<Readonly<import("reka-ui").ListboxFilterProps> & Readonly<{
346
+ "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
347
+ }>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
348
+ $slots: Readonly<{
349
+ default?: (props: {
350
+ modelValue: string | undefined;
351
+ }) => any;
352
+ }> & {
353
+ default?: (props: {
354
+ modelValue: string | undefined;
355
+ }) => any;
356
+ };
357
+ }) | null;
252
358
  };
253
359
  $slots: Readonly<{
254
360
  [name: string]: import("vue").Slot<any> | undefined;
@@ -309,6 +415,110 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
309
415
  };
310
416
  $refs: {
311
417
  [x: string]: unknown;
418
+ } & {
419
+ primitiveElement: ({
420
+ $: import("vue").ComponentInternalInstance;
421
+ $data: {};
422
+ $props: {
423
+ readonly modelValue?: string | undefined;
424
+ readonly autoFocus?: boolean | undefined;
425
+ readonly disabled?: boolean | undefined;
426
+ readonly asChild?: boolean | undefined;
427
+ readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
428
+ readonly "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
429
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
430
+ $attrs: {
431
+ [x: string]: unknown;
432
+ };
433
+ $refs: {
434
+ [x: string]: unknown;
435
+ } & {
436
+ primitiveElement: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
437
+ asChild: {
438
+ type: BooleanConstructor;
439
+ default: boolean;
440
+ };
441
+ as: {
442
+ type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
443
+ default: string;
444
+ };
445
+ }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
446
+ [key: string]: any;
447
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
448
+ asChild: boolean;
449
+ as: import("reka-ui").AsTag | import("vue").Component;
450
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
451
+ P: {};
452
+ B: {};
453
+ D: {};
454
+ C: {};
455
+ M: {};
456
+ Defaults: {};
457
+ }, Readonly<import("vue").ExtractPropTypes<{
458
+ asChild: {
459
+ type: BooleanConstructor;
460
+ default: boolean;
461
+ };
462
+ as: {
463
+ type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
464
+ default: string;
465
+ };
466
+ }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
467
+ [key: string]: any;
468
+ }>, {}, {}, {}, {
469
+ asChild: boolean;
470
+ as: import("reka-ui").AsTag | import("vue").Component;
471
+ }> | null;
472
+ };
473
+ $slots: Readonly<{
474
+ [name: string]: import("vue").Slot<any> | undefined;
475
+ }>;
476
+ $root: import("vue").ComponentPublicInstance | null;
477
+ $parent: import("vue").ComponentPublicInstance | null;
478
+ $host: Element | null;
479
+ $emit: (event: "update:modelValue", args_0: string) => void;
480
+ $el: any;
481
+ $options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").ListboxFilterProps> & Readonly<{
482
+ "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
483
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
484
+ "update:modelValue": (args_0: string) => any;
485
+ }, string, {
486
+ as: import("reka-ui").AsTag | import("vue").Component;
487
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
488
+ beforeCreate?: (() => void) | (() => void)[];
489
+ created?: (() => void) | (() => void)[];
490
+ beforeMount?: (() => void) | (() => void)[];
491
+ mounted?: (() => void) | (() => void)[];
492
+ beforeUpdate?: (() => void) | (() => void)[];
493
+ updated?: (() => void) | (() => void)[];
494
+ activated?: (() => void) | (() => void)[];
495
+ deactivated?: (() => void) | (() => void)[];
496
+ beforeDestroy?: (() => void) | (() => void)[];
497
+ beforeUnmount?: (() => void) | (() => void)[];
498
+ destroyed?: (() => void) | (() => void)[];
499
+ unmounted?: (() => void) | (() => void)[];
500
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
501
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
502
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
503
+ };
504
+ $forceUpdate: () => void;
505
+ $nextTick: typeof import("vue").nextTick;
506
+ $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
507
+ } & Readonly<{
508
+ as: import("reka-ui").AsTag | import("vue").Component;
509
+ }> & Omit<Readonly<import("reka-ui").ListboxFilterProps> & Readonly<{
510
+ "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
511
+ }>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
512
+ $slots: Readonly<{
513
+ default?: (props: {
514
+ modelValue: string | undefined;
515
+ }) => any;
516
+ }> & {
517
+ default?: (props: {
518
+ modelValue: string | undefined;
519
+ }) => any;
520
+ };
521
+ }) | null;
312
522
  };
313
523
  $slots: Readonly<{
314
524
  [name: string]: import("vue").Slot<any> | undefined;
@@ -117,6 +117,43 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<InputNumbe
117
117
  };
118
118
  $refs: {
119
119
  [x: string]: unknown;
120
+ } & {
121
+ primitiveElement: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
122
+ asChild: {
123
+ type: BooleanConstructor;
124
+ default: boolean;
125
+ };
126
+ as: {
127
+ type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
128
+ default: string;
129
+ };
130
+ }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
131
+ [key: string]: any;
132
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
133
+ asChild: boolean;
134
+ as: import("reka-ui").AsTag | import("vue").Component;
135
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
136
+ P: {};
137
+ B: {};
138
+ D: {};
139
+ C: {};
140
+ M: {};
141
+ Defaults: {};
142
+ }, Readonly<import("vue").ExtractPropTypes<{
143
+ asChild: {
144
+ type: BooleanConstructor;
145
+ default: boolean;
146
+ };
147
+ as: {
148
+ type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
149
+ default: string;
150
+ };
151
+ }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
152
+ [key: string]: any;
153
+ }>, {}, {}, {}, {
154
+ asChild: boolean;
155
+ as: import("reka-ui").AsTag | import("vue").Component;
156
+ }> | null;
120
157
  };
121
158
  $slots: Readonly<{
122
159
  [name: string]: import("vue").Slot<any> | undefined;
@@ -166,6 +203,43 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<InputNumbe
166
203
  };
167
204
  $refs: {
168
205
  [x: string]: unknown;
206
+ } & {
207
+ primitiveElement: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
208
+ asChild: {
209
+ type: BooleanConstructor;
210
+ default: boolean;
211
+ };
212
+ as: {
213
+ type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
214
+ default: string;
215
+ };
216
+ }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
217
+ [key: string]: any;
218
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
219
+ asChild: boolean;
220
+ as: import("reka-ui").AsTag | import("vue").Component;
221
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
222
+ P: {};
223
+ B: {};
224
+ D: {};
225
+ C: {};
226
+ M: {};
227
+ Defaults: {};
228
+ }, Readonly<import("vue").ExtractPropTypes<{
229
+ asChild: {
230
+ type: BooleanConstructor;
231
+ default: boolean;
232
+ };
233
+ as: {
234
+ type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
235
+ default: string;
236
+ };
237
+ }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
238
+ [key: string]: any;
239
+ }>, {}, {}, {}, {
240
+ asChild: boolean;
241
+ as: import("reka-ui").AsTag | import("vue").Component;
242
+ }> | null;
169
243
  };
170
244
  $slots: Readonly<{
171
245
  [name: string]: import("vue").Slot<any> | undefined;
@@ -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 events = {
42
+ const defaultEvents = {
43
43
  closeAutoFocus: (e) => e.preventDefault()
44
44
  };
45
45
  if (!props.dismissible) {
46
- return {
47
- pointerDownOutside: (e) => e.preventDefault(),
48
- interactOutside: (e) => e.preventDefault(),
49
- escapeKeyDown: (e) => e.preventDefault(),
50
- ...events
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 events;
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
- return {
38
- pointerDownOutside: (e) => e.preventDefault(),
39
- interactOutside: (e) => e.preventDefault(),
40
- escapeKeyDown: (e) => e.preventDefault()
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;