@bitrix24/b24ui-nuxt 0.5.1 → 0.5.3
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 +309 -17
- package/dist/meta.cjs +757 -644
- package/dist/meta.d.cts +757 -644
- package/dist/meta.d.mts +757 -644
- package/dist/meta.d.ts +757 -644
- package/dist/meta.mjs +757 -644
- package/dist/module.cjs +1 -1
- package/dist/module.d.cts +2 -1
- package/dist/module.d.mts +2 -1
- package/dist/module.d.ts +2 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/NavigationMenu.vue +23 -5
- package/dist/runtime/composables/defineLocale.js +0 -1
- package/dist/runtime/composables/defineShortcuts.js +0 -1
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/utils/link.d.ts +8 -8
- package/dist/runtime/vue/stubs.d.ts +1 -1
- package/dist/shared/{b24ui-nuxt.CBnBA3PE.mjs → b24ui-nuxt.BIuy4yic.mjs} +445 -20
- package/dist/shared/{b24ui-nuxt.ClMXHpMM.cjs → b24ui-nuxt.Bh_5o1_9.cjs} +445 -20
- package/dist/types.d.mts +7 -1
- package/dist/types.d.ts +7 -1
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.d.cts +2 -1
- package/dist/unplugin.d.mts +2 -1
- package/dist/unplugin.d.ts +2 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +9 -8
package/dist/module.cjs
CHANGED
package/dist/module.d.cts
CHANGED
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
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.BIuy4yic.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
@@ -43,6 +43,10 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cu
|
|
|
43
43
|
slot?: string
|
|
44
44
|
value?: string
|
|
45
45
|
children?: NavigationMenuChildItem[]
|
|
46
|
+
/**
|
|
47
|
+
* With orientation=`horizontal` if `true` it will position the dropdown menu correctly
|
|
48
|
+
*/
|
|
49
|
+
viewportRtl?: boolean
|
|
46
50
|
onSelect?(e: Event): void
|
|
47
51
|
}
|
|
48
52
|
|
|
@@ -100,7 +104,7 @@ export interface NavigationMenuProps<T> extends Pick<NavigationMenuRootProps, 'm
|
|
|
100
104
|
/**
|
|
101
105
|
* The orientation of the content.
|
|
102
106
|
* Only works when `orientation` is `horizontal`.
|
|
103
|
-
* @defaultValue '
|
|
107
|
+
* @defaultValue 'vertical'
|
|
104
108
|
*/
|
|
105
109
|
contentOrientation?: NavigationMenuVariants['contentOrientation']
|
|
106
110
|
/**
|
|
@@ -146,7 +150,7 @@ import B24Collapsible from './Collapsible.vue'
|
|
|
146
150
|
|
|
147
151
|
const props = withDefaults(defineProps<NavigationMenuProps<I>>(), {
|
|
148
152
|
orientation: 'horizontal',
|
|
149
|
-
contentOrientation: '
|
|
153
|
+
contentOrientation: 'vertical',
|
|
150
154
|
externalIcon: true,
|
|
151
155
|
delayDuration: 0,
|
|
152
156
|
unmountOnHide: true,
|
|
@@ -272,7 +276,12 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0]
|
|
|
272
276
|
</B24LinkBase>
|
|
273
277
|
</component>
|
|
274
278
|
|
|
275
|
-
<NavigationMenuContent
|
|
279
|
+
<NavigationMenuContent
|
|
280
|
+
v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])"
|
|
281
|
+
v-bind="contentProps"
|
|
282
|
+
:data-viewport="item.viewportRtl ? 'rtl' : 'ltr'"
|
|
283
|
+
:class="b24ui.content({ class: props.b24ui?.content })"
|
|
284
|
+
>
|
|
276
285
|
<slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="(item as T)" :active="active" :index="index">
|
|
277
286
|
<ul :class="b24ui.childList({ class: props.b24ui?.childList })">
|
|
278
287
|
<li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="b24ui.childItem({ class: props.b24ui?.childItem })">
|
|
@@ -331,7 +340,13 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0]
|
|
|
331
340
|
>
|
|
332
341
|
<template v-for="(list, listIndex) in lists" :key="`list-${listIndex}`">
|
|
333
342
|
<NavigationMenuList :class="b24ui.list({ class: props.b24ui?.list })">
|
|
334
|
-
<ReuseItemTemplate
|
|
343
|
+
<ReuseItemTemplate
|
|
344
|
+
v-for="(item, index) in list"
|
|
345
|
+
:key="`list-${listIndex}-${index}`"
|
|
346
|
+
:item="item"
|
|
347
|
+
:index="index"
|
|
348
|
+
:class="b24ui.item({ class: props.b24ui?.item })"
|
|
349
|
+
/>
|
|
335
350
|
</NavigationMenuList>
|
|
336
351
|
|
|
337
352
|
<div v-if="orientation === 'vertical' && listIndex < lists.length - 1" :class="b24ui.separator({ class: props.b24ui?.separator })" />
|
|
@@ -342,7 +357,10 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0]
|
|
|
342
357
|
<div :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
|
|
343
358
|
</NavigationMenuIndicator>
|
|
344
359
|
|
|
345
|
-
<NavigationMenuViewport
|
|
360
|
+
<NavigationMenuViewport
|
|
361
|
+
align="start"
|
|
362
|
+
:class="b24ui.viewport({ class: props.b24ui?.viewport })"
|
|
363
|
+
/>
|
|
346
364
|
</div>
|
|
347
365
|
</NavigationMenuRoot>
|
|
348
366
|
</template>
|
package/dist/runtime/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@plugin "@bitrix24/b24style";@import "#build/b24ui.css";@import "./keyframes.css";@variant light (&:where(.light, .light *));@variant dark (&:where(.dark, .dark *));@layer base{--b24ui-header-height:calc(var(--spacing)*16);body{@apply antialiased scheme-light dark:scheme-dark}}@layer theme{:host,:root{--spacing:.25rem}}.scrollbar-thin{scrollbar-width:thin}.scrollbar-transparent{scrollbar-color:transparent transparent;scrollbar-gutter:stable}.scrollbar-transparent:hover{scrollbar-color:rgba(82,92,105,.36) transparent}.dark .scrollbar-transparent{scrollbar-color:rgba(0,0,0,.21) transparent}.dark .scrollbar-transparent:hover{scrollbar-color:#515a67 transparent}
|
|
1
|
+
@plugin "@bitrix24/b24style";@import "#build/b24ui.css";@import "./keyframes.css";@variant light (&:where(.light, .light *));@variant dark (&:where(.dark, .dark *));@layer base{--b24ui-header-height:calc(var(--spacing)*16);body{@apply antialiased scheme-light dark:scheme-dark}}@layer theme{:host,:root{--spacing:.25rem}}.scrollbar-thin{scrollbar-width:thin}.scrollbar-transparent{scrollbar-color:transparent transparent;scrollbar-gutter:stable}.scrollbar-transparent:hover{scrollbar-color:rgba(82,92,105,.36) transparent}.dark .scrollbar-transparent{scrollbar-color:rgba(0,0,0,.21) transparent}.dark .scrollbar-transparent:hover{scrollbar-color:#515a67 transparent}.clip-path-viewport-wrapper{clip-path:inset(0 -24px -28px -24px round 10px)}
|
|
@@ -6,24 +6,24 @@ export declare function pickLinkProps(link: LinkProps & {
|
|
|
6
6
|
replace: any;
|
|
7
7
|
type: any;
|
|
8
8
|
title: any;
|
|
9
|
+
href: any;
|
|
10
|
+
target: any;
|
|
11
|
+
as: any;
|
|
12
|
+
prefetch: any;
|
|
13
|
+
rel: any;
|
|
14
|
+
external: any;
|
|
15
|
+
exact: any;
|
|
9
16
|
active: any;
|
|
17
|
+
disabled: any;
|
|
10
18
|
activeClass: any;
|
|
11
19
|
ariaCurrentValue: any;
|
|
12
20
|
ariaLabel: any;
|
|
13
|
-
as: any;
|
|
14
|
-
disabled: any;
|
|
15
|
-
exact: any;
|
|
16
21
|
exactActiveClass: any;
|
|
17
22
|
exactHash: any;
|
|
18
23
|
exactQuery: any;
|
|
19
|
-
external: any;
|
|
20
|
-
href: any;
|
|
21
24
|
inactiveClass: any;
|
|
22
25
|
noPrefetch: any;
|
|
23
26
|
noRel: any;
|
|
24
|
-
prefetch: any;
|
|
25
27
|
prefetchedClass: any;
|
|
26
|
-
rel: any;
|
|
27
|
-
target: any;
|
|
28
28
|
to: any;
|
|
29
29
|
};
|
|
@@ -12,7 +12,7 @@ export declare const useColorMode: () => {
|
|
|
12
12
|
preference?: undefined;
|
|
13
13
|
readonly value?: undefined;
|
|
14
14
|
} | {
|
|
15
|
-
preference: "
|
|
15
|
+
preference: "dark" | "light" | "system";
|
|
16
16
|
readonly value: import("@vueuse/core").BasicColorMode;
|
|
17
17
|
forced: boolean;
|
|
18
18
|
};
|