@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/dist/module.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const defu = require('defu');
4
4
  const kit = require('@nuxt/kit');
5
- const templates = require('./shared/b24ui-nuxt.ClMXHpMM.cjs');
5
+ const templates = require('./shared/b24ui-nuxt.Bh_5o1_9.cjs');
6
6
  require('node:url');
7
7
  require('scule');
8
8
 
package/dist/module.d.cts CHANGED
@@ -11,4 +11,5 @@ interface ModuleOptions {
11
11
  }
12
12
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
13
13
 
14
- export { type ModuleOptions, _default as default };
14
+ export { _default as default };
15
+ export type { ModuleOptions };
package/dist/module.d.mts CHANGED
@@ -11,4 +11,5 @@ interface ModuleOptions {
11
11
  }
12
12
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
13
13
 
14
- export { type ModuleOptions, _default as default };
14
+ export { _default as default };
15
+ export type { ModuleOptions };
package/dist/module.d.ts CHANGED
@@ -11,4 +11,5 @@ interface ModuleOptions {
11
11
  }
12
12
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
13
13
 
14
- export { type ModuleOptions, _default as default };
14
+ export { _default as default };
15
+ export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
7
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
8
- "version": "0.5.1",
8
+ "version": "0.5.3",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "0.8.4",
11
11
  "unbuild": "2.0.0"
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.CBnBA3PE.mjs';
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 'horizontal'
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: 'horizontal',
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 v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])" v-bind="contentProps" :class="b24ui.content({ class: props.b24ui?.content })">
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 v-for="(item, index) in list" :key="`list-${listIndex}-${index}`" :item="item" :index="index" :class="b24ui.item({ class: props.b24ui?.item })" />
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 :class="b24ui.viewport({ class: props.b24ui?.viewport })" />
360
+ <NavigationMenuViewport
361
+ align="start"
362
+ :class="b24ui.viewport({ class: props.b24ui?.viewport })"
363
+ />
346
364
  </div>
347
365
  </NavigationMenuRoot>
348
366
  </template>
@@ -1,5 +1,4 @@
1
1
  import { defu } from "defu";
2
- // @__NO_SIDE_EFFECTS__
3
2
  export function defineLocale(options) {
4
3
  return defu(options, { dir: "ltr" });
5
4
  }
@@ -21,7 +21,6 @@ export function extractShortcuts(items) {
21
21
  traverse(items.flat());
22
22
  return shortcuts;
23
23
  }
24
- // @__NO_SIDE_EFFECTS__
25
24
  export function defineShortcuts(config, options = {}) {
26
25
  const chainedInputs = ref([]);
27
26
  const clearChainedInput = () => {
@@ -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: "light" | "dark" | "system";
15
+ preference: "dark" | "light" | "system";
16
16
  readonly value: import("@vueuse/core").BasicColorMode;
17
17
  forced: boolean;
18
18
  };