@bitrix24/b24ui-nuxt 2.4.2 → 2.5.2
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.css +2 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/air-design-tokens/components/navigation-menu.css +1 -1
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +2 -2
- package/dist/runtime/components/DashboardSidebar.vue +16 -9
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +2 -2
- package/dist/runtime/components/Header.d.vue.ts +2 -2
- package/dist/runtime/components/Header.vue +17 -10
- package/dist/runtime/components/Header.vue.d.ts +2 -2
- package/dist/runtime/components/Slideover.d.vue.ts +0 -12
- package/dist/runtime/components/Slideover.vue +65 -90
- package/dist/runtime/components/Slideover.vue.d.ts +0 -12
- package/dist/runtime/composables/index.d.ts +3 -0
- package/dist/runtime/composables/index.js +3 -0
- package/dist/runtime/composables/useDevice.d.ts +39 -0
- package/dist/runtime/composables/useDevice.js +62 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/plugins/platform.d.ts +1 -1
- package/dist/shared/{b24ui-nuxt.C-GSAtA1.mjs → b24ui-nuxt.D2-pCbE6.mjs} +65 -87
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
package/.nuxt/b24ui.css
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, addPlugin, hasNuxtModule, addComponentsDir, addImportsDir, installModule } from '@nuxt/kit';
|
|
3
|
-
import { d as defaultOptions, v as version, n as name, a as getDefaultConfig, b as addTemplates } from './shared/b24ui-nuxt.
|
|
3
|
+
import { d as defaultOptions, v as version, n as name, a as getDefaultConfig, b as addTemplates } from './shared/b24ui-nuxt.D2-pCbE6.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
import 'knitwork';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@theme inline{--content-area-left-shift:22px;--air-header-min-height:58px;--air-footer-min-height:76px;--topbar-height:58px;--b24ui-header-height:var(--topbar-height)}@layer components{.air-sidebar{background:var(--air-theme-background-blurred,none)}.clip-path-viewport-wrapper{clip-path:inset(0 -24px -28px -24px round 10px)}.menu-item-horizontal{--menu-item-border-radius:var(--ui-border-radius-sm);--menu-item-border:var(--ui-color-design-selection-stroke);--menu-item-color:var(--menu-item-color-default);--menu-item-color-default:var(--ui-color-design-plain-content);--menu-item-color-active:var(--ui-color-design-selection-content);--menu-item-background:var(--menu-item-background-default);--menu-item-background-default:transparent;--menu-item-background-hover:var(--ui-color-design-plain-na-focused-bg);--menu-item-background-active:var(--ui-color-design-selection-bg);transition:background-color .2s,opacity .2s}.menu-item-horizontal:hover{--menu-item-color-active:var(--ui-color-design-plain-na-focused-content)}.menu-item-horizontal-active{--menu-item-color:var(--menu-item-color-active);--menu-item-background:var(--menu-item-background-active)}.menu-item-vertical{--menu-item-color:var(--menu-item-color-default);--menu-item-color-default:var(--ui-color-design-plain-content);--menu-item-color-active:var(--ui-color-design-selection-content);--menu-item-background:var(--menu-item-background-default);--menu-item-background-default:transparent;--menu-item-background-hover:color-mix(in srgb,var(--menu-item-background) 100%,var(--ui-color-bg-state-hover-default-hex) var(--ui-color-bg-state-hover-default-opacity));--menu-item-background-active:var(--ui-color-design-selection-bg);transition:border-radius .2s ease-in-out,color .15s ease-in-out,background .15s ease-in-out}.menu-item-vertical:hover{transition-duration:.2s,.15s,0s}.menu-item-vertical-active{--menu-item-color:var(--menu-item-color-active);--menu-item-background:var(--menu-item-background-active)}.light .menu-item-vertical{--menu-item-background-active:var(--ui-color-design-filled-bg);--menu-item-color-active:var(--ui-color-base-white-fixed)}.light .menu-item-vertical-active{--menu-item-background:var(--ui-color-design-filled-bg);--menu-item-color:var(--ui-color-base-white-fixed)}.light,:root{--menu-item-block-stack-space:4px;--menu-width-expanded:240px;--menu-width-collapsed:66px;--menu-items-block-padding-x:14px;--menu-item-border-radius:var(--ui-border-radius-md);--leftmenu-bg:var(--ui-color-bg-content-secondary);--leftmenu-bg-expanded:var(--ui-color-bg-content-secondary);--leftmenu-bg-stroke:#fff;--leftmenu-bg-stroke-expanded:#fff;--leftmenu-bg-overlayed:rgba(33,51,76,.94);--leftmenu-bg-blur:0px;--leftmenu-bg-blur-expanded:0px;--leftmenu-width:66px;--leftmenu-width-expanded:240px;--leftmenu-bg-divider:var(--ui-color-divider-default);--leftmenu-group-bg:transparent;--leftmenu-group-stroke:var(--ui-color-divider-default);--leftmenu-group-stroke-weight:var(--ui-border-width-thin)}.dark{--leftmenu-bg:#262626;--leftmenu-bg-expanded:#262626;--leftmenu-bg-stroke:#3b3b3b;--leftmenu-bg-stroke-expanded:#3b3b3b;--leftmenu-bg-overlayed:rgba(52,74,103,.94);--leftmenu-bg-blur:0px;--leftmenu-bg-blur-expanded:0px;--leftmenu-bg-divider:var(--ui-color-divider-default);--leftmenu-group-bg:transparent;--leftmenu-group-stroke:var(--ui-color-divider-default);--leftmenu-group-stroke-weight:var(--ui-border-width-thin)}.edge-light{--leftmenu-bg:rgb(0 0 0/3%);--leftmenu-bg-expanded:rgb(0 0 0/2%);--leftmenu-bg-stroke:transparent;--leftmenu-bg-stroke-expanded:rgb(0 0 0/4%);--leftmenu-bg-overlayed:rgba(33,51,76,.94);--leftmenu-bg-blur:var(--ui-bg-blur-less);--leftmenu-bg-blur-expanded:var(--ui-bg-blur-less);--leftmenu-width:66px;--leftmenu-width-expanded:240px;--leftmenu-bg-divider:rgba(0,0,0,.1);--leftmenu-group-bg:var(--ui-color-bg-content-tertiary,rgb(0 0 0/3%));--leftmenu-group-stroke:var(--ui-color-divider-less);--leftmenu-group-stroke-weight:var(--ui-border-width-thin)}.edge-dark{--leftmenu-bg:hsla(0,0%,100%,.06);--leftmenu-bg-expanded:hsla(0,0%,100%,.03);--leftmenu-bg-stroke:transparent;--leftmenu-bg-stroke-expanded:hsla(0,0%,100%,.06);--leftmenu-bg-overlayed:rgba(33,51,76,.94);--leftmenu-bg-blur:var(--ui-bg-blur-less);--leftmenu-bg-blur-expanded:var(--ui-bg-blur-less);--leftmenu-width:66px;--leftmenu-width-expanded:240px;--leftmenu-bg-divider:hsla(0,0%,100%,.1);--leftmenu-group-bg:var(--ui-color-bg-content-tertiary,hsla(0,0%,100%,.08));--leftmenu-group-stroke:var(--ui-color-divider-less);--leftmenu-group-stroke-weight:var(--ui-border-width-thin)}.air-header,.light .air-header{--topbar-bg:var(--ui-color-bg-content-secondary);--topbar-bg-stroke:var(--ui-color-bg-content-primary);--topbar-bg-stroke-weight:0;--topbar-bg-blur:0px}.dark .air-header{--topbar-bg:#2d2d2d;--topbar-bg-stroke:#3d3d3d;--topbar-bg-stroke-weight:0;--topbar-bg-blur:0px}.edge-dark .air-header{--topbar-bg:hsla(0,0%,100%,.1);--topbar-bg-stroke:transparent;--topbar-bg-stroke-weight:0px;--topbar-bg-blur:var(--ui-bg-blur-less)}.edge-light .air-header{--topbar-bg:rgba(0,0,0,.05);--topbar-bg-stroke:transparent;--topbar-bg-stroke-weight:0px;--topbar-bg-blur:var(--ui-bg-blur-less)}.air-header:before{background:linear-gradient(to right,var(--topbar-bg),var(--topbar-bg)),var(--air-theme-background-blurred,none);bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:-1}}
|
|
1
|
+
@theme inline{--content-area-left-shift:22px;--air-header-min-height:58px;--air-footer-min-height:76px;--topbar-height:58px;--b24ui-header-height:var(--topbar-height)}@layer components{.air-sidebar{background:var(--air-theme-background-blurred,none)}.clip-path-viewport-wrapper{clip-path:inset(0 -24px -28px -24px round 10px)}.menu-item-horizontal{--menu-item-border-radius:var(--ui-border-radius-sm);--menu-item-border:var(--ui-color-design-selection-stroke);--menu-item-color:var(--menu-item-color-default);--menu-item-color-default:var(--ui-color-design-plain-content);--menu-item-color-active:var(--ui-color-design-selection-content);--menu-item-background:var(--menu-item-background-default);--menu-item-background-default:transparent;--menu-item-background-hover:var(--ui-color-design-plain-na-focused-bg);--menu-item-background-active:var(--ui-color-design-selection-bg);transition:background-color .2s,opacity .2s}.menu-item-horizontal:hover{--menu-item-color-active:var(--ui-color-design-plain-na-focused-content)}.menu-item-horizontal-active{--menu-item-color:var(--menu-item-color-active);--menu-item-background:var(--menu-item-background-active)}.menu-item-vertical{--menu-item-color:var(--menu-item-color-default);--menu-item-color-default:var(--ui-color-design-plain-content);--menu-item-color-active:var(--ui-color-design-selection-content);--menu-item-background:var(--menu-item-background-default);--menu-item-background-default:transparent;--menu-item-background-hover:color-mix(in srgb,var(--menu-item-background) 100%,var(--ui-color-bg-state-hover-default-hex) var(--ui-color-bg-state-hover-default-opacity));--menu-item-background-active:var(--ui-color-design-selection-bg);transition:border-radius .2s ease-in-out,color .15s ease-in-out,background .15s ease-in-out}.menu-item-vertical:hover{transition-duration:.2s,.15s,0s}.menu-item-vertical-active{--menu-item-color:var(--menu-item-color-active);--menu-item-background:var(--menu-item-background-active)}.light .menu-item-vertical{--menu-item-background-active:var(--ui-color-design-filled-bg);--menu-item-color-active:var(--ui-color-base-white-fixed);transition:color .17s}.light .menu-item-vertical:hover{transition-duration:0s}.light .menu-item-vertical-active{--menu-item-background:var(--ui-color-design-filled-bg);--menu-item-color:var(--ui-color-base-white-fixed)}.light,:root{--menu-item-block-stack-space:4px;--menu-width-expanded:240px;--menu-width-collapsed:66px;--menu-items-block-padding-x:14px;--menu-item-border-radius:var(--ui-border-radius-md);--leftmenu-bg:var(--ui-color-bg-content-secondary);--leftmenu-bg-expanded:var(--ui-color-bg-content-secondary);--leftmenu-bg-stroke:#fff;--leftmenu-bg-stroke-expanded:#fff;--leftmenu-bg-overlayed:rgba(33,51,76,.94);--leftmenu-bg-blur:0px;--leftmenu-bg-blur-expanded:0px;--leftmenu-width:66px;--leftmenu-width-expanded:240px;--leftmenu-bg-divider:var(--ui-color-divider-default);--leftmenu-group-bg:transparent;--leftmenu-group-stroke:var(--ui-color-divider-default);--leftmenu-group-stroke-weight:var(--ui-border-width-thin)}.dark{--leftmenu-bg:#262626;--leftmenu-bg-expanded:#262626;--leftmenu-bg-stroke:#3b3b3b;--leftmenu-bg-stroke-expanded:#3b3b3b;--leftmenu-bg-overlayed:rgba(52,74,103,.94);--leftmenu-bg-blur:0px;--leftmenu-bg-blur-expanded:0px;--leftmenu-bg-divider:var(--ui-color-divider-default);--leftmenu-group-bg:transparent;--leftmenu-group-stroke:var(--ui-color-divider-default);--leftmenu-group-stroke-weight:var(--ui-border-width-thin)}.edge-light{--leftmenu-bg:rgb(0 0 0/3%);--leftmenu-bg-expanded:rgb(0 0 0/2%);--leftmenu-bg-stroke:transparent;--leftmenu-bg-stroke-expanded:rgb(0 0 0/4%);--leftmenu-bg-overlayed:rgba(33,51,76,.94);--leftmenu-bg-blur:var(--ui-bg-blur-less);--leftmenu-bg-blur-expanded:var(--ui-bg-blur-less);--leftmenu-width:66px;--leftmenu-width-expanded:240px;--leftmenu-bg-divider:rgba(0,0,0,.1);--leftmenu-group-bg:var(--ui-color-bg-content-tertiary,rgb(0 0 0/3%));--leftmenu-group-stroke:var(--ui-color-divider-less);--leftmenu-group-stroke-weight:var(--ui-border-width-thin)}.edge-dark{--leftmenu-bg:hsla(0,0%,100%,.06);--leftmenu-bg-expanded:hsla(0,0%,100%,.03);--leftmenu-bg-stroke:transparent;--leftmenu-bg-stroke-expanded:hsla(0,0%,100%,.06);--leftmenu-bg-overlayed:rgba(33,51,76,.94);--leftmenu-bg-blur:var(--ui-bg-blur-less);--leftmenu-bg-blur-expanded:var(--ui-bg-blur-less);--leftmenu-width:66px;--leftmenu-width-expanded:240px;--leftmenu-bg-divider:hsla(0,0%,100%,.1);--leftmenu-group-bg:var(--ui-color-bg-content-tertiary,hsla(0,0%,100%,.08));--leftmenu-group-stroke:var(--ui-color-divider-less);--leftmenu-group-stroke-weight:var(--ui-border-width-thin)}.air-header,.light .air-header{--topbar-bg:var(--ui-color-bg-content-secondary);--topbar-bg-stroke:var(--ui-color-bg-content-primary);--topbar-bg-stroke-weight:0;--topbar-bg-blur:0px}.dark .air-header{--topbar-bg:#2d2d2d;--topbar-bg-stroke:#3d3d3d;--topbar-bg-stroke-weight:0;--topbar-bg-blur:0px}.edge-dark .air-header{--topbar-bg:hsla(0,0%,100%,.1);--topbar-bg-stroke:transparent;--topbar-bg-stroke-weight:0px;--topbar-bg-blur:var(--ui-bg-blur-less)}.edge-light .air-header{--topbar-bg:rgba(0,0,0,.05);--topbar-bg-stroke:transparent;--topbar-bg-stroke-weight:0px;--topbar-bg-blur:var(--ui-bg-blur-less)}.air-header:before{background:linear-gradient(to right,var(--topbar-bg),var(--topbar-bg)),var(--air-theme-background-blurred,none);bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:-1}}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
-
import theme from '#build/b24ui/dashboard-sidebar';
|
|
4
3
|
import type { UseResizableProps } from '../composables/useResizable';
|
|
5
4
|
import type { ButtonProps, DrawerProps, ModalProps, SlideoverProps, LinkPropsKeys } from '../types';
|
|
6
5
|
import type { ComponentConfig } from '../types/tv';
|
|
6
|
+
import theme from '#build/b24ui/dashboard-sidebar';
|
|
7
7
|
type DashboardSidebar = ComponentConfig<typeof theme, AppConfig, 'dashboardSidebar'>;
|
|
8
8
|
type DashboardSidebarMode = 'modal' | 'slideover' | 'drawer';
|
|
9
9
|
type DashboardSidebarMenu<T> = T extends 'modal' ? ModalProps : T extends 'slideover' ? SlideoverProps : T extends 'drawer' ? DrawerProps : never;
|
|
10
10
|
export interface DashboardSidebarProps<T extends DashboardSidebarMode = DashboardSidebarMode> extends Pick<UseResizableProps, 'id' | 'side' | 'minSize' | 'maxSize' | 'defaultSize' | 'resizable' | 'collapsible' | 'collapsedSize'> {
|
|
11
11
|
/**
|
|
12
12
|
* The mode of the sidebar menu.
|
|
13
|
-
* @defaultValue '
|
|
13
|
+
* @defaultValue 'slideover'
|
|
14
14
|
*/
|
|
15
15
|
mode?: T;
|
|
16
16
|
/**
|
|
@@ -72,11 +72,22 @@ const Menu = computed(() => ({
|
|
|
72
72
|
modal: B24Modal,
|
|
73
73
|
drawer: B24Drawer
|
|
74
74
|
})[props.mode]);
|
|
75
|
-
const menuProps = toRef(() =>
|
|
76
|
-
content: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
const menuProps = toRef(() => {
|
|
76
|
+
const modeSettings = props.mode === "modal" ? { fullscreen: true, transition: false, b24ui: { content: "p-0 pt-0" } } : props.mode === "slideover" ? { side: "left", close: false } : {};
|
|
77
|
+
return defu(
|
|
78
|
+
props.menu,
|
|
79
|
+
{ content: { onOpenAutoFocus: (e) => e.preventDefault() } },
|
|
80
|
+
modeSettings,
|
|
81
|
+
{
|
|
82
|
+
b24ui: {
|
|
83
|
+
overlay: b24ui.value.overlay({ class: uiProp.value?.overlay }),
|
|
84
|
+
content: b24ui.value.content({
|
|
85
|
+
class: [modeSettings.b24ui?.content, uiProp.value?.content]
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
});
|
|
80
91
|
function toggleOpen() {
|
|
81
92
|
open.value = !open.value;
|
|
82
93
|
}
|
|
@@ -141,10 +152,6 @@ function toggleOpen() {
|
|
|
141
152
|
:title="t('dashboardSidebar.title')"
|
|
142
153
|
:description="t('dashboardSidebar.description')"
|
|
143
154
|
v-bind="menuProps"
|
|
144
|
-
:b24ui="{
|
|
145
|
-
overlay: b24ui.overlay({ class: uiProp?.overlay }),
|
|
146
|
-
content: b24ui.content({ class: uiProp?.content })
|
|
147
|
-
}"
|
|
148
155
|
>
|
|
149
156
|
<template #content="contentData">
|
|
150
157
|
<slot name="content" v-bind="contentData">
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
-
import theme from '#build/b24ui/dashboard-sidebar';
|
|
4
3
|
import type { UseResizableProps } from '../composables/useResizable';
|
|
5
4
|
import type { ButtonProps, DrawerProps, ModalProps, SlideoverProps, LinkPropsKeys } from '../types';
|
|
6
5
|
import type { ComponentConfig } from '../types/tv';
|
|
6
|
+
import theme from '#build/b24ui/dashboard-sidebar';
|
|
7
7
|
type DashboardSidebar = ComponentConfig<typeof theme, AppConfig, 'dashboardSidebar'>;
|
|
8
8
|
type DashboardSidebarMode = 'modal' | 'slideover' | 'drawer';
|
|
9
9
|
type DashboardSidebarMenu<T> = T extends 'modal' ? ModalProps : T extends 'slideover' ? SlideoverProps : T extends 'drawer' ? DrawerProps : never;
|
|
10
10
|
export interface DashboardSidebarProps<T extends DashboardSidebarMode = DashboardSidebarMode> extends Pick<UseResizableProps, 'id' | 'side' | 'minSize' | 'maxSize' | 'defaultSize' | 'resizable' | 'collapsible' | 'collapsedSize'> {
|
|
11
11
|
/**
|
|
12
12
|
* The mode of the sidebar menu.
|
|
13
|
-
* @defaultValue '
|
|
13
|
+
* @defaultValue 'slideover'
|
|
14
14
|
*/
|
|
15
15
|
mode?: T;
|
|
16
16
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
-
import theme from '#build/b24ui/header';
|
|
4
3
|
import type { ButtonProps, DrawerProps, ModalProps, SlideoverProps, LinkPropsKeys } from '../types';
|
|
5
4
|
import type { ComponentConfig } from '../types/tv';
|
|
5
|
+
import theme from '#build/b24ui/header';
|
|
6
6
|
type Header = ComponentConfig<typeof theme, AppConfig, 'header'>;
|
|
7
7
|
type HeaderMode = 'modal' | 'slideover' | 'drawer';
|
|
8
8
|
type HeaderMenu<T> = T extends 'modal' ? ModalProps : T extends 'slideover' ? SlideoverProps : T extends 'drawer' ? DrawerProps : never;
|
|
@@ -16,7 +16,7 @@ export interface HeaderProps<T extends HeaderMode = HeaderMode> {
|
|
|
16
16
|
to?: string;
|
|
17
17
|
/**
|
|
18
18
|
* The mode of the header menu.
|
|
19
|
-
* @defaultValue '
|
|
19
|
+
* @defaultValue 'slideover'
|
|
20
20
|
*/
|
|
21
21
|
mode?: T;
|
|
22
22
|
/**
|
|
@@ -24,7 +24,7 @@ const props = defineProps({
|
|
|
24
24
|
as: { type: null, required: false, default: "header" },
|
|
25
25
|
title: { type: String, required: false, default: "Bitrix24 UI" },
|
|
26
26
|
to: { type: String, required: false, default: "/" },
|
|
27
|
-
mode: { type: null, required: false, default: "
|
|
27
|
+
mode: { type: null, required: false, default: "slideover" },
|
|
28
28
|
menu: { type: null, required: false },
|
|
29
29
|
toggle: { type: [Boolean, Object], required: false, default: true },
|
|
30
30
|
toggleSide: { type: String, required: false, default: "left" },
|
|
@@ -55,11 +55,22 @@ const Menu = computed(() => ({
|
|
|
55
55
|
modal: B24Modal,
|
|
56
56
|
drawer: B24Drawer
|
|
57
57
|
})[props.mode]);
|
|
58
|
-
const menuProps = toRef(() =>
|
|
59
|
-
content: {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
const menuProps = toRef(() => {
|
|
59
|
+
const modeSettings = props.mode === "modal" ? { fullscreen: true, transition: false, b24ui: { content: "p-0 pt-0" } } : props.mode === "slideover" ? { side: "left", close: false } : {};
|
|
60
|
+
return defu(
|
|
61
|
+
props.menu,
|
|
62
|
+
{ content: { onOpenAutoFocus: (e) => e.preventDefault() } },
|
|
63
|
+
modeSettings,
|
|
64
|
+
{
|
|
65
|
+
b24ui: {
|
|
66
|
+
overlay: b24ui.value.overlay({ class: uiProp.value?.overlay }),
|
|
67
|
+
content: b24ui.value.content({
|
|
68
|
+
class: [modeSettings.b24ui?.content, uiProp.value?.content]
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
});
|
|
63
74
|
function toggleOpen() {
|
|
64
75
|
open.value = !open.value;
|
|
65
76
|
}
|
|
@@ -125,10 +136,6 @@ function toggleOpen() {
|
|
|
125
136
|
:title="t('header.title')"
|
|
126
137
|
:description="t('header.description')"
|
|
127
138
|
v-bind="menuProps"
|
|
128
|
-
:b24ui="{
|
|
129
|
-
overlay: b24ui.overlay({ class: uiProp?.overlay }),
|
|
130
|
-
content: b24ui.content({ class: uiProp?.content })
|
|
131
|
-
}"
|
|
132
139
|
>
|
|
133
140
|
<template #content="contentData">
|
|
134
141
|
<slot name="content" v-bind="contentData">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
-
import theme from '#build/b24ui/header';
|
|
4
3
|
import type { ButtonProps, DrawerProps, ModalProps, SlideoverProps, LinkPropsKeys } from '../types';
|
|
5
4
|
import type { ComponentConfig } from '../types/tv';
|
|
5
|
+
import theme from '#build/b24ui/header';
|
|
6
6
|
type Header = ComponentConfig<typeof theme, AppConfig, 'header'>;
|
|
7
7
|
type HeaderMode = 'modal' | 'slideover' | 'drawer';
|
|
8
8
|
type HeaderMenu<T> = T extends 'modal' ? ModalProps : T extends 'slideover' ? SlideoverProps : T extends 'drawer' ? DrawerProps : never;
|
|
@@ -16,7 +16,7 @@ export interface HeaderProps<T extends HeaderMode = HeaderMode> {
|
|
|
16
16
|
to?: string;
|
|
17
17
|
/**
|
|
18
18
|
* The mode of the header menu.
|
|
19
|
-
* @defaultValue '
|
|
19
|
+
* @defaultValue 'slideover'
|
|
20
20
|
*/
|
|
21
21
|
mode?: T;
|
|
22
22
|
/**
|
|
@@ -60,11 +60,6 @@ export interface SlideoverProps extends DialogRootProps {
|
|
|
60
60
|
* @defaultValue false
|
|
61
61
|
*/
|
|
62
62
|
dismissible?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* The content is placed on a light background.
|
|
65
|
-
* @defaultValue 'true'
|
|
66
|
-
*/
|
|
67
|
-
useLightContent?: boolean;
|
|
68
63
|
class?: any;
|
|
69
64
|
b24ui?: Slideover['slots'];
|
|
70
65
|
}
|
|
@@ -80,12 +75,6 @@ export interface SlideoverSlots {
|
|
|
80
75
|
content?(props: {
|
|
81
76
|
close: () => void;
|
|
82
77
|
}): VNode[];
|
|
83
|
-
sidebar?(props: {
|
|
84
|
-
close: () => void;
|
|
85
|
-
}): VNode[];
|
|
86
|
-
navbar?(props: {
|
|
87
|
-
close: () => void;
|
|
88
|
-
}): VNode[];
|
|
89
78
|
header?(props: {
|
|
90
79
|
close: () => void;
|
|
91
80
|
}): VNode[];
|
|
@@ -118,7 +107,6 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Slideo
|
|
|
118
107
|
close: boolean | Omit<ButtonProps, LinkPropsKeys>;
|
|
119
108
|
side: Slideover["variants"]["side"];
|
|
120
109
|
overlay: boolean;
|
|
121
|
-
useLightContent: boolean;
|
|
122
110
|
transition: boolean;
|
|
123
111
|
modal: boolean;
|
|
124
112
|
portal: boolean | string | HTMLElement;
|
|
@@ -14,7 +14,6 @@ import { pointerDownOutside } from "../utils/overlay";
|
|
|
14
14
|
import { tv } from "../utils/tv";
|
|
15
15
|
import icons from "../dictionary/icons";
|
|
16
16
|
import B24Button from "./Button.vue";
|
|
17
|
-
import B24SidebarLayout from "./SidebarLayout.vue";
|
|
18
17
|
const props = defineProps({
|
|
19
18
|
title: { type: String, required: false },
|
|
20
19
|
description: { type: String, required: false },
|
|
@@ -28,7 +27,6 @@ const props = defineProps({
|
|
|
28
27
|
close: { type: [Boolean, Object], required: false, default: true },
|
|
29
28
|
closeIcon: { type: [Function, Object], required: false },
|
|
30
29
|
dismissible: { type: Boolean, required: false, default: true },
|
|
31
|
-
useLightContent: { type: Boolean, required: false, default: true },
|
|
32
30
|
class: { type: null, required: false },
|
|
33
31
|
b24ui: { type: Object, required: false },
|
|
34
32
|
open: { type: Boolean, required: false },
|
|
@@ -104,103 +102,80 @@ const isBtnCloseExternal = computed(() => !props.inset && ["left", "right", "bot
|
|
|
104
102
|
</DialogDescription>
|
|
105
103
|
</VisuallyHidden>
|
|
106
104
|
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
<
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
:b24ui="{
|
|
120
|
-
baseLine: 'ps-[4px] pe-[4px]',
|
|
105
|
+
<template v-if="isBtnCloseExternal && (props.close || !!slots.close)">
|
|
106
|
+
<DialogClose as-child>
|
|
107
|
+
<slot name="close" :b24ui="b24ui">
|
|
108
|
+
<B24Button
|
|
109
|
+
v-if="props.close"
|
|
110
|
+
:icon="closeIcon || icons.close"
|
|
111
|
+
class="group"
|
|
112
|
+
color="air-primary"
|
|
113
|
+
:aria-label="t('slideover.close')"
|
|
114
|
+
size="lg"
|
|
115
|
+
:b24ui="{
|
|
116
|
+
baseLine: 'ps-1 pe-1',
|
|
121
117
|
label: 'hidden sm:flex'
|
|
122
118
|
}"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<B24SidebarLayout
|
|
131
|
-
:use-light-content="props.useLightContent"
|
|
132
|
-
is-inner
|
|
133
|
-
:b24ui="{
|
|
134
|
-
root: b24ui.sidebarLayoutRoot({ class: uiProp?.sidebarLayoutRoot }),
|
|
135
|
-
header: b24ui.sidebarLayoutHeaderWrapper({ class: uiProp?.sidebarLayoutHeaderWrapper }),
|
|
136
|
-
pageWrapper: b24ui.sidebarLayoutPageWrapper({ class: uiProp?.sidebarLayoutPageWrapper }),
|
|
137
|
-
container: b24ui.sidebarLayoutContainer({ class: uiProp?.sidebarLayoutContainer }),
|
|
138
|
-
pageBottomWrapper: b24ui.sidebarLayoutPageBottomWrapper({ class: uiProp?.sidebarLayoutPageBottomWrapper }),
|
|
139
|
-
loadingWrapper: b24ui.sidebarLayoutLoadingWrapper({ class: uiProp?.sidebarLayoutLoadingWrapper }),
|
|
140
|
-
loadingIcon: b24ui.sidebarLayoutLoadingIcon({ class: uiProp?.sidebarLayoutLoadingIcon })
|
|
141
|
-
}"
|
|
142
|
-
>
|
|
143
|
-
<template v-if="!!slots['sidebar']" #sidebar>
|
|
144
|
-
<slot name="sidebar" :close="close" />
|
|
145
|
-
</template>
|
|
146
|
-
|
|
147
|
-
<template v-if="!!slots['navbar']" #navbar>
|
|
148
|
-
<slot name="navbar" :close="close" />
|
|
149
|
-
</template>
|
|
119
|
+
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
120
|
+
data-slot="close"
|
|
121
|
+
:class="b24ui.close({ class: uiProp?.close })"
|
|
122
|
+
/>
|
|
123
|
+
</slot>
|
|
124
|
+
</DialogClose>
|
|
125
|
+
</template>
|
|
150
126
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
127
|
+
<slot name="content" :close="close">
|
|
128
|
+
<div
|
|
129
|
+
v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || !isBtnCloseExternal && (props.close || !!slots.close)"
|
|
130
|
+
data-slot="header"
|
|
131
|
+
:class="b24ui.header({ class: uiProp?.header })"
|
|
132
|
+
>
|
|
133
|
+
<slot name="header" :close="close">
|
|
134
|
+
<div data-slot="wrapper" :class="b24ui.wrapper({ class: uiProp?.wrapper })">
|
|
135
|
+
<DialogTitle v-if="title || !!slots.title" data-slot="title" :class="b24ui.title({ class: uiProp?.title })">
|
|
136
|
+
<slot name="title">
|
|
137
|
+
{{ title }}
|
|
138
|
+
</slot>
|
|
139
|
+
</DialogTitle>
|
|
160
140
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
</div>
|
|
167
|
-
<template v-if="!isBtnCloseExternal && (props.close || !!slots.close)">
|
|
168
|
-
<DialogClose v-if="props.close || !!slots.close" as-child>
|
|
169
|
-
<slot name="close" :b24ui="b24ui">
|
|
170
|
-
<B24Button
|
|
171
|
-
v-if="props.close"
|
|
172
|
-
:icon="closeIcon || icons.close"
|
|
173
|
-
class="group"
|
|
174
|
-
color="air-tertiary-no-accent"
|
|
175
|
-
:aria-label="t('slideover.close')"
|
|
176
|
-
size="lg"
|
|
177
|
-
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
178
|
-
data-slot="close"
|
|
179
|
-
:class="b24ui.close({ class: uiProp?.close })"
|
|
180
|
-
/>
|
|
181
|
-
</slot>
|
|
182
|
-
</DialogClose>
|
|
183
|
-
</template>
|
|
184
|
-
</slot>
|
|
141
|
+
<DialogDescription v-if="description || !!slots.description" data-slot="description" :class="b24ui.description({ class: uiProp?.description })">
|
|
142
|
+
<slot name="description">
|
|
143
|
+
{{ description }}
|
|
144
|
+
</slot>
|
|
145
|
+
</DialogDescription>
|
|
185
146
|
</div>
|
|
186
|
-
</template>
|
|
187
147
|
|
|
188
|
-
<template v-if="!!slots['actions']" #content-actions>
|
|
189
148
|
<slot name="actions" />
|
|
190
|
-
</template>
|
|
191
149
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
150
|
+
<template v-if="!isBtnCloseExternal && (props.close || !!slots.close)">
|
|
151
|
+
<DialogClose v-if="props.close || !!slots.close" as-child>
|
|
152
|
+
<slot name="close" :b24ui="b24ui">
|
|
153
|
+
<B24Button
|
|
154
|
+
v-if="props.close"
|
|
155
|
+
:icon="closeIcon || icons.close"
|
|
156
|
+
class="group"
|
|
157
|
+
color="air-tertiary-no-accent"
|
|
158
|
+
:aria-label="t('slideover.close')"
|
|
159
|
+
size="lg"
|
|
160
|
+
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
161
|
+
data-slot="close"
|
|
162
|
+
:class="b24ui.close({ class: uiProp?.close })"
|
|
163
|
+
/>
|
|
164
|
+
</slot>
|
|
165
|
+
</DialogClose>
|
|
166
|
+
</template>
|
|
167
|
+
</slot>
|
|
168
|
+
</div>
|
|
197
169
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
170
|
+
<template v-if="!!slots['body']">
|
|
171
|
+
<div data-slot="body" :class="b24ui.body({ class: uiProp?.body })">
|
|
172
|
+
<slot name="body" :close="close" />
|
|
173
|
+
</div>
|
|
174
|
+
</template>
|
|
175
|
+
|
|
176
|
+
<div v-if="!!slots.footer" data-slot="footer" :class="b24ui.footer({ class: uiProp?.footer })">
|
|
177
|
+
<slot name="footer" :close="close" />
|
|
178
|
+
</div>
|
|
204
179
|
</slot>
|
|
205
180
|
</DialogContent>
|
|
206
181
|
</DialogPortal>
|
|
@@ -60,11 +60,6 @@ export interface SlideoverProps extends DialogRootProps {
|
|
|
60
60
|
* @defaultValue false
|
|
61
61
|
*/
|
|
62
62
|
dismissible?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* The content is placed on a light background.
|
|
65
|
-
* @defaultValue 'true'
|
|
66
|
-
*/
|
|
67
|
-
useLightContent?: boolean;
|
|
68
63
|
class?: any;
|
|
69
64
|
b24ui?: Slideover['slots'];
|
|
70
65
|
}
|
|
@@ -80,12 +75,6 @@ export interface SlideoverSlots {
|
|
|
80
75
|
content?(props: {
|
|
81
76
|
close: () => void;
|
|
82
77
|
}): VNode[];
|
|
83
|
-
sidebar?(props: {
|
|
84
|
-
close: () => void;
|
|
85
|
-
}): VNode[];
|
|
86
|
-
navbar?(props: {
|
|
87
|
-
close: () => void;
|
|
88
|
-
}): VNode[];
|
|
89
78
|
header?(props: {
|
|
90
79
|
close: () => void;
|
|
91
80
|
}): VNode[];
|
|
@@ -118,7 +107,6 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Slideo
|
|
|
118
107
|
close: boolean | Omit<ButtonProps, LinkPropsKeys>;
|
|
119
108
|
side: Slideover["variants"]["side"];
|
|
120
109
|
overlay: boolean;
|
|
121
|
-
useLightContent: boolean;
|
|
122
110
|
transition: boolean;
|
|
123
111
|
modal: boolean;
|
|
124
112
|
portal: boolean | string | HTMLElement;
|
|
@@ -6,4 +6,7 @@ export * from './useOverlay';
|
|
|
6
6
|
export * from './useResizable';
|
|
7
7
|
export * from './useScrollspy';
|
|
8
8
|
export * from './useToast';
|
|
9
|
+
export * from './useDevice';
|
|
10
|
+
export * from './useConfetti';
|
|
9
11
|
export * from './useSpeechRecognition';
|
|
12
|
+
export * from './color-mode/useColorMode';
|
|
@@ -6,4 +6,7 @@ export * from "./useOverlay.js";
|
|
|
6
6
|
export * from "./useResizable.js";
|
|
7
7
|
export * from "./useScrollspy.js";
|
|
8
8
|
export * from "./useToast.js";
|
|
9
|
+
export * from "./useDevice.js";
|
|
10
|
+
export * from "./useConfetti.js";
|
|
9
11
|
export * from "./useSpeechRecognition.js";
|
|
12
|
+
export * from "./color-mode/useColorMode.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoints Tailwind
|
|
3
|
+
*/
|
|
4
|
+
declare const TAILWIND_BREAKPOINTS: {
|
|
5
|
+
readonly sm: 640;
|
|
6
|
+
readonly md: 768;
|
|
7
|
+
readonly lg: 1024;
|
|
8
|
+
readonly xl: 1280;
|
|
9
|
+
readonly '2xl': 1536;
|
|
10
|
+
};
|
|
11
|
+
export type PlatformName = 'web' | 'bitrix-mobile' | 'bitrix-desktop';
|
|
12
|
+
export type ScreenSize = keyof typeof TAILWIND_BREAKPOINTS | 'xs';
|
|
13
|
+
export declare const useDevice: () => {
|
|
14
|
+
platform: Readonly<import("vue").Ref<{
|
|
15
|
+
readonly name?: PlatformName | undefined;
|
|
16
|
+
readonly version?: string | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
readonly name?: PlatformName | undefined;
|
|
19
|
+
readonly version?: string | undefined;
|
|
20
|
+
}>>;
|
|
21
|
+
version: import("vue").ComputedRef<string | undefined>;
|
|
22
|
+
isWeb: import("vue").ComputedRef<boolean>;
|
|
23
|
+
isBitrixMobile: import("vue").ComputedRef<boolean>;
|
|
24
|
+
isBitrixDesktop: import("vue").ComputedRef<boolean>;
|
|
25
|
+
screen: import("vue").ComputedRef<{
|
|
26
|
+
current: ScreenSize;
|
|
27
|
+
xs: boolean;
|
|
28
|
+
sm: boolean;
|
|
29
|
+
md: boolean;
|
|
30
|
+
lg: boolean;
|
|
31
|
+
xl: boolean;
|
|
32
|
+
'2xl': boolean;
|
|
33
|
+
isMobile: boolean;
|
|
34
|
+
isTablet: boolean;
|
|
35
|
+
isDesktop: boolean;
|
|
36
|
+
isLargeDesktop: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useState } from "#imports";
|
|
2
|
+
import { computed, readonly } from "vue";
|
|
3
|
+
import { createSharedComposable, useMediaQuery } from "@vueuse/core";
|
|
4
|
+
const TAILWIND_BREAKPOINTS = {
|
|
5
|
+
"sm": 640,
|
|
6
|
+
"md": 768,
|
|
7
|
+
"lg": 1024,
|
|
8
|
+
"xl": 1280,
|
|
9
|
+
"2xl": 1536
|
|
10
|
+
};
|
|
11
|
+
const _useDevice = () => {
|
|
12
|
+
const platform = useState("platform", () => ({}));
|
|
13
|
+
const isWeb = computed(() => platform.value.name === "web");
|
|
14
|
+
const isBitrixMobile = computed(() => platform.value.name === "bitrix-mobile");
|
|
15
|
+
const isBitrixDesktop = computed(() => platform.value.name === "bitrix-desktop");
|
|
16
|
+
const mediaQueries = {
|
|
17
|
+
"sm": useMediaQuery(`(min-width: ${TAILWIND_BREAKPOINTS["sm"]}px)`),
|
|
18
|
+
"md": useMediaQuery(`(min-width: ${TAILWIND_BREAKPOINTS["md"]}px)`),
|
|
19
|
+
"lg": useMediaQuery(`(min-width: ${TAILWIND_BREAKPOINTS["lg"]}px)`),
|
|
20
|
+
"xl": useMediaQuery(`(min-width: ${TAILWIND_BREAKPOINTS["xl"]}px)`),
|
|
21
|
+
"2xl": useMediaQuery(`(min-width: ${TAILWIND_BREAKPOINTS["2xl"]}px)`)
|
|
22
|
+
};
|
|
23
|
+
const screen = computed(() => {
|
|
24
|
+
const sm = mediaQueries.sm.value;
|
|
25
|
+
const md = mediaQueries.md.value;
|
|
26
|
+
const lg = mediaQueries.lg.value;
|
|
27
|
+
const xl = mediaQueries.xl.value;
|
|
28
|
+
const xl2 = mediaQueries["2xl"].value;
|
|
29
|
+
let current = "xs";
|
|
30
|
+
if (xl2) current = "2xl";
|
|
31
|
+
else if (xl) current = "xl";
|
|
32
|
+
else if (lg) current = "lg";
|
|
33
|
+
else if (md) current = "md";
|
|
34
|
+
else if (sm) current = "sm";
|
|
35
|
+
else current = "xs";
|
|
36
|
+
return {
|
|
37
|
+
current,
|
|
38
|
+
"xs": !sm,
|
|
39
|
+
sm,
|
|
40
|
+
md,
|
|
41
|
+
lg,
|
|
42
|
+
xl,
|
|
43
|
+
"2xl": xl2,
|
|
44
|
+
"isMobile": !md,
|
|
45
|
+
"isTablet": md && !lg,
|
|
46
|
+
"isDesktop": lg,
|
|
47
|
+
"isLargeDesktop": xl2
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
// Platform data
|
|
52
|
+
platform: readonly(platform),
|
|
53
|
+
version: computed(() => platform.value.version),
|
|
54
|
+
// Platform flags
|
|
55
|
+
isWeb,
|
|
56
|
+
isBitrixMobile,
|
|
57
|
+
isBitrixDesktop,
|
|
58
|
+
// Screen information
|
|
59
|
+
screen
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export const useDevice = /* @__PURE__ */ createSharedComposable(_useDevice);
|
package/dist/runtime/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "#build/b24ui.css";@import "./keyframes.css";@import "./air-design-tokens/tw-style/index.css";@import "./air-design-tokens/index.css";@variant light (&:where(.light, .light *));@variant edge-dark (&:where(.edge-dark, .edge-dark *));@variant edge-light (&:where(.edge-light, .edge-light *));@variant dark (&:where(.dark, .dark *));@variant bitrix-mobile (&:where(html[data-platform="bitrix-mobile"] *));@variant bitrix-desktop (&:where(html[data-platform="bitrix-desktop"] *));@layer base{.sidebar-layout.--inner,body{--air-theme-background:var(--air-theme-bg-image,none) var(--air-theme-bg-position,0 0) /var(--air-theme-bg-size,auto) var(--air-theme-bg-repeat,repeat) var(--air-theme-bg-attachment,scroll) var(--air-theme-bg-color,transparent);--air-theme-background-blurred:var(--air-theme-bg-image-blurred,none) var(--air-theme-bg-position,0 0) /var(--air-theme-bg-size,auto) var(--air-theme-bg-repeat,repeat) var(--air-theme-bg-attachment,scroll)}}@layer theme{:host,:root{--b24ui-header-height:--spacing(14.5)}}@theme default inline{--text-color-dimmed:var(--ui-color-base-6);--text-color-muted:var(--ui-color-design-plain-na-content-secondary);--text-color-description:var(--b24ui-typography-description-color);--text-color-legend:var(--b24ui-typography-legend-color);--text-color-label:var(--b24ui-typography-label-color)}
|
|
1
|
+
@import "#build/b24ui.css";@import "./keyframes.css";@import "./air-design-tokens/tw-style/index.css";@import "./air-design-tokens/index.css";@variant light (&:where(.light, .light *));@variant edge-dark (&:where(.edge-dark, .edge-dark *));@variant edge-light (&:where(.edge-light, .edge-light *));@variant dark (&:where(.dark, .dark *));@variant bitrix-mobile (&:where(html[data-platform="bitrix-mobile"] *));@variant bitrix-desktop (&:where(html[data-platform="bitrix-desktop"] *));@variant web (&:where(html[data-platform="web"] *));@layer base{.air-custom-bg,.sidebar-layout.--inner,body{--air-theme-background:var(--air-theme-bg-image,none) var(--air-theme-bg-position,0 0) /var(--air-theme-bg-size,auto) var(--air-theme-bg-repeat,repeat) var(--air-theme-bg-attachment,scroll) var(--air-theme-bg-color,transparent);--air-theme-background-blurred:var(--air-theme-bg-image-blurred,none) var(--air-theme-bg-position,0 0) /var(--air-theme-bg-size,auto) var(--air-theme-bg-repeat,repeat) var(--air-theme-bg-attachment,scroll)}}@layer theme{:host,:root{--b24ui-header-height:--spacing(14.5)}}@theme default inline{--text-color-dimmed:var(--ui-color-base-6);--text-color-muted:var(--ui-color-design-plain-na-content-secondary);--text-color-description:var(--b24ui-typography-description-color);--text-color-legend:var(--b24ui-typography-legend-color);--text-color-label:var(--b24ui-typography-label-color)}
|
|
@@ -8,7 +8,7 @@ import { globSync } from 'tinyglobby';
|
|
|
8
8
|
import { defuFn } from 'defu';
|
|
9
9
|
|
|
10
10
|
const name = "@bitrix24/b24ui-nuxt";
|
|
11
|
-
const version = "2.
|
|
11
|
+
const version = "2.5.2";
|
|
12
12
|
|
|
13
13
|
function getDefaultConfig(theme) {
|
|
14
14
|
return {
|
|
@@ -2876,7 +2876,7 @@ const dashboardNavbar = {
|
|
|
2876
2876
|
const dashboardPanel = {
|
|
2877
2877
|
slots: {
|
|
2878
2878
|
root: "relative flex flex-col min-w-0 min-h-svh lg:not-last:border-e lg:not-last:border-e-0 lg:not-last:border-(--ui-color-divider-default) shrink-0",
|
|
2879
|
-
body: "flex flex-col gap-4
|
|
2879
|
+
body: "flex flex-col gap-4 flex-1 overflow-y-auto sm:p-4 sm:pt-0 scrollbar-thin",
|
|
2880
2880
|
handle: ""
|
|
2881
2881
|
},
|
|
2882
2882
|
variants: {
|
|
@@ -2943,12 +2943,15 @@ const dashboardSidebar = {
|
|
|
2943
2943
|
root: [
|
|
2944
2944
|
"relative hidden lg:flex flex-col min-h-svh min-w-16 w-(--width) shrink-0",
|
|
2945
2945
|
"backdrop-blur-sm bg-(--ui-color-bg-content-primary)/20 light:bg-transparent dark:bg-(--ui-color-bg-content-primary)/70",
|
|
2946
|
-
"light:bg-transparent
|
|
2946
|
+
"light:bg-transparent"
|
|
2947
2947
|
].join(" "),
|
|
2948
2948
|
header: "h-(--b24ui-header-height) shrink-0 flex items-center gap-1.5 ps-4 pe-4",
|
|
2949
|
-
body:
|
|
2949
|
+
body: [
|
|
2950
|
+
"flex flex-col gap-4 flex-1 overflow-y-auto py-2 ps-4 pe-4 md:pe-2 scrollbar-thin scrollbar-transparent",
|
|
2951
|
+
"light:[--leftmenu-group-stroke:var(--ui-color-base-30)]"
|
|
2952
|
+
],
|
|
2950
2953
|
footer: [
|
|
2951
|
-
"shrink-0 flex items-center gap-1.5 ps-4 pe-4
|
|
2954
|
+
"shrink-0 flex items-center gap-1.5 py-2 ps-4 pe-4",
|
|
2952
2955
|
"lg:border-t lg:border-(--ui-color-divider-default)",
|
|
2953
2956
|
"light:lg:border-(--ui-color-base-30)"
|
|
2954
2957
|
].join(" "),
|
|
@@ -6036,7 +6039,10 @@ const navigationMenu = {
|
|
|
6036
6039
|
"border border-(--menu-item-background) hover:border-(--ui-color-design-plain-na-focused-stroke) data-[state=open]:bg-(--ui-color-design-plain-na-focused-stroke)",
|
|
6037
6040
|
"bitrix-mobile:px-3",
|
|
6038
6041
|
"bitrix-mobile:h-[34px] bitrix-mobile:min-h-[34px]",
|
|
6039
|
-
"bitrix-mobile:text-(--ui-color-base-4) bitrix-mobile:border-(--ui-color-base-7)"
|
|
6042
|
+
"bitrix-mobile:text-(--ui-color-base-4) bitrix-mobile:border-(--ui-color-base-7)",
|
|
6043
|
+
"bitrix-mobile:leading-6 bitrix-mobile:text-(length:--ui-font-size-md)",
|
|
6044
|
+
// @memo This is a temporary solution until we connect the required font.
|
|
6045
|
+
"bitrix-mobile:scale-x-[0.92]"
|
|
6040
6046
|
].join(" "),
|
|
6041
6047
|
linkTrailingIcon: "size-[16px]",
|
|
6042
6048
|
linkLeadingBadge: "-top-[6px] -right-[14px] -translate-x-1/2",
|
|
@@ -6061,6 +6067,8 @@ const navigationMenu = {
|
|
|
6061
6067
|
list: "flex flex-col",
|
|
6062
6068
|
item: [
|
|
6063
6069
|
"mt-(--menu-item-block-stack-space)",
|
|
6070
|
+
// @see `--leftmenu-group-stroke` src/runtime/air-design-tokens/components/navigation-menu.css:75
|
|
6071
|
+
// @see `light:--leftmenu-group-stroke` src/theme/dashboard-sidebar.ts:16
|
|
6064
6072
|
"data-[state=open]:rounded-(--menu-item-border-radius) data-[state=open]:border-(length:--leftmenu-group-stroke-weight) data-[state=open]:border-(--leftmenu-group-stroke)"
|
|
6065
6073
|
].join(" "),
|
|
6066
6074
|
link: [
|
|
@@ -6103,11 +6111,7 @@ const navigationMenu = {
|
|
|
6103
6111
|
},
|
|
6104
6112
|
active: {
|
|
6105
6113
|
true: {
|
|
6106
|
-
|
|
6107
|
-
* @memo Special color for `light` mode - see b24.settings.
|
|
6108
|
-
* @see src/runtime/air-design-tokens/components/navigation-menu.css
|
|
6109
|
-
*/
|
|
6110
|
-
link: "light:font-semibold",
|
|
6114
|
+
link: "",
|
|
6111
6115
|
childLink: [
|
|
6112
6116
|
"text-(--ui-color-accent-main-primary)",
|
|
6113
6117
|
"hover:text-(--ui-color-accent-main-primary)"
|
|
@@ -6148,7 +6152,7 @@ const navigationMenu = {
|
|
|
6148
6152
|
collapsed: false,
|
|
6149
6153
|
class: {
|
|
6150
6154
|
item: "data-[state=open]:bg-(--leftmenu-group-bg)",
|
|
6151
|
-
childList: "",
|
|
6155
|
+
childList: "mb-0.5",
|
|
6152
6156
|
childItem: "",
|
|
6153
6157
|
content: "motion-safe:data-[state=open]:animate-[collapsible-down_200ms_ease-out] motion-safe:data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden",
|
|
6154
6158
|
linkLabel: "ms-[9px]"
|
|
@@ -8299,25 +8303,35 @@ const safeList = [
|
|
|
8299
8303
|
const slideover = {
|
|
8300
8304
|
slots: {
|
|
8301
8305
|
overlay: "fixed inset-0 bg-linear-to-b from-[#00204e]/52 to-[#00204e]",
|
|
8302
|
-
//
|
|
8303
8306
|
content: [
|
|
8307
|
+
"base-mode",
|
|
8304
8308
|
"fixed",
|
|
8309
|
+
"bg-(--ui-color-gray-05) dark:bg-(--ui-color-base-black-fixed)",
|
|
8305
8310
|
"sm:shadow-lg",
|
|
8306
8311
|
"flex flex-col focus:outline-none",
|
|
8307
8312
|
"h-full"
|
|
8308
8313
|
].join(" "),
|
|
8309
|
-
sidebarLayoutRoot: "relative",
|
|
8310
|
-
sidebarLayoutHeaderWrapper: "relative",
|
|
8311
|
-
sidebarLayoutPageWrapper: "min-h-full pb-[calc(53px_+_10px)] px-[20px] ps-[20px] pe-[20px] pb-[20px] overflow-y-auto scrollbar-thin",
|
|
8312
|
-
sidebarLayoutContainer: "gap-[22px]",
|
|
8313
|
-
sidebarLayoutPageBottomWrapper: "relative",
|
|
8314
|
-
sidebarLayoutLoadingWrapper: "",
|
|
8315
|
-
sidebarLayoutLoadingIcon: "",
|
|
8316
8314
|
header: [
|
|
8317
|
-
"
|
|
8318
|
-
"flex
|
|
8315
|
+
"py-[20px] px-[20px]",
|
|
8316
|
+
"flex items-center gap-x-[12px] gap-y-1.5",
|
|
8317
|
+
"overflow-hidden"
|
|
8319
8318
|
].join(" "),
|
|
8320
8319
|
wrapper: "min-h-[30px]",
|
|
8320
|
+
body: [
|
|
8321
|
+
"size-full",
|
|
8322
|
+
"flex-1 overflow-y-auto pb-2.5 px-[20px]"
|
|
8323
|
+
].join(" "),
|
|
8324
|
+
footer: [
|
|
8325
|
+
"absolute inset-x-0 bottom-0",
|
|
8326
|
+
"base-mode",
|
|
8327
|
+
"bg-(--ui-color-bg-content-primary)",
|
|
8328
|
+
"flex items-center justify-center gap-2.5",
|
|
8329
|
+
//
|
|
8330
|
+
"border-t border-t-1 border-t-(--ui-color-divider-less)",
|
|
8331
|
+
"shadow-top-md",
|
|
8332
|
+
"py-[13px] px-[13px]"
|
|
8333
|
+
// pr-(--scrollbar-width)
|
|
8334
|
+
].join(" "),
|
|
8321
8335
|
title: [
|
|
8322
8336
|
"font-[family-name:var(--ui-font-family-primary)]",
|
|
8323
8337
|
"text-(--b24ui-typography-label-color)",
|
|
@@ -8331,26 +8345,12 @@ const slideover = {
|
|
|
8331
8345
|
"text-(length:--ui-font-size-sm)"
|
|
8332
8346
|
].join(" "),
|
|
8333
8347
|
close: "absolute",
|
|
8334
|
-
body: [
|
|
8335
|
-
"size-full",
|
|
8336
|
-
"flex-1"
|
|
8337
|
-
].join(" "),
|
|
8338
|
-
footer: [
|
|
8339
|
-
"absolute inset-x-0 bottom-0",
|
|
8340
|
-
"bg-(--ui-color-bg-content-primary)",
|
|
8341
|
-
// --ui-color-bg-content-primary
|
|
8342
|
-
"flex items-center justify-center gap-3",
|
|
8343
|
-
"border-t border-t-1 border-t-(--ui-color-divider-less)",
|
|
8344
|
-
"shadow-top-md",
|
|
8345
|
-
"py-[9px] px-2 pr-(--scrollbar-width)"
|
|
8346
|
-
].join(" "),
|
|
8347
8348
|
safeList
|
|
8348
8349
|
},
|
|
8349
8350
|
variants: {
|
|
8350
8351
|
useFooter: {
|
|
8351
8352
|
true: {
|
|
8352
|
-
|
|
8353
|
-
// -_18px
|
|
8353
|
+
body: "mb-[64px]"
|
|
8354
8354
|
}
|
|
8355
8355
|
},
|
|
8356
8356
|
overlayBlur: {
|
|
@@ -8365,34 +8365,24 @@ const slideover = {
|
|
|
8365
8365
|
}
|
|
8366
8366
|
},
|
|
8367
8367
|
side: {
|
|
8368
|
-
// @todo fix if parent SidebarLayout.isUseSideBar > w-[calc(100%-135x)] > w-[calc(100%-150px)]
|
|
8369
8368
|
top: {
|
|
8370
|
-
content: ""
|
|
8371
|
-
// 'sm:rounded-t-none'
|
|
8372
|
-
sidebarLayoutRoot: ""
|
|
8373
|
-
// sm:rounded-t-none
|
|
8369
|
+
content: ""
|
|
8374
8370
|
},
|
|
8375
8371
|
right: {
|
|
8376
|
-
content: ""
|
|
8377
|
-
// sm:rounded-t-none
|
|
8378
|
-
sidebarLayoutRoot: ""
|
|
8372
|
+
content: ""
|
|
8379
8373
|
// sm:rounded-t-none
|
|
8380
8374
|
},
|
|
8381
8375
|
bottom: {
|
|
8382
|
-
content: ""
|
|
8383
|
-
sidebarLayoutRoot: ""
|
|
8376
|
+
content: ""
|
|
8384
8377
|
},
|
|
8385
8378
|
left: {
|
|
8386
|
-
content: ""
|
|
8387
|
-
// sm:rounded-t-none
|
|
8388
|
-
sidebarLayoutRoot: ""
|
|
8379
|
+
content: ""
|
|
8389
8380
|
// sm:rounded-t-none
|
|
8390
8381
|
}
|
|
8391
8382
|
},
|
|
8392
8383
|
inset: {
|
|
8393
8384
|
true: {
|
|
8394
|
-
content: "rounded-
|
|
8395
|
-
sidebarLayoutRoot: "rounded-[18px]"
|
|
8385
|
+
content: "rounded-4.5"
|
|
8396
8386
|
}
|
|
8397
8387
|
},
|
|
8398
8388
|
transition: {
|
|
@@ -8410,13 +8400,12 @@ const slideover = {
|
|
|
8410
8400
|
content: "max-h-[calc(100%-2rem)] inset-x-4 top-4"
|
|
8411
8401
|
}
|
|
8412
8402
|
},
|
|
8403
|
+
// @todo remove this ?
|
|
8413
8404
|
{
|
|
8414
8405
|
side: "top",
|
|
8415
8406
|
inset: true,
|
|
8416
8407
|
useFooter: true,
|
|
8417
|
-
class: {
|
|
8418
|
-
sidebarLayoutPageWrapper: "min-h-[calc(100vh_-_53px-2rem)]"
|
|
8419
|
-
}
|
|
8408
|
+
class: {}
|
|
8420
8409
|
},
|
|
8421
8410
|
{
|
|
8422
8411
|
side: "top",
|
|
@@ -8432,13 +8421,12 @@ const slideover = {
|
|
|
8432
8421
|
content: "w-[calc(100%-2rem)] max-h-[calc(100%-2rem)] inset-y-4 right-4 "
|
|
8433
8422
|
}
|
|
8434
8423
|
},
|
|
8424
|
+
// @todo remove this ?
|
|
8435
8425
|
{
|
|
8436
8426
|
side: "right",
|
|
8437
8427
|
inset: true,
|
|
8438
8428
|
useFooter: true,
|
|
8439
|
-
class: {
|
|
8440
|
-
sidebarLayoutPageWrapper: "min-h-[calc(100vh_-_53px-2rem)]"
|
|
8441
|
-
}
|
|
8429
|
+
class: {}
|
|
8442
8430
|
},
|
|
8443
8431
|
{
|
|
8444
8432
|
side: "right",
|
|
@@ -8451,18 +8439,15 @@ const slideover = {
|
|
|
8451
8439
|
side: "bottom",
|
|
8452
8440
|
inset: true,
|
|
8453
8441
|
class: {
|
|
8454
|
-
content: [
|
|
8455
|
-
"max-h-[calc(100%-2rem)] w-[calc(100%-2rem)] end-4 bottom-4"
|
|
8456
|
-
].join(" ")
|
|
8442
|
+
content: "max-h-[calc(100%-2rem)] w-[calc(100%-2rem)] end-4 bottom-4"
|
|
8457
8443
|
}
|
|
8458
8444
|
},
|
|
8445
|
+
// @todo remove this ?
|
|
8459
8446
|
{
|
|
8460
8447
|
side: "bottom",
|
|
8461
8448
|
inset: true,
|
|
8462
8449
|
useFooter: true,
|
|
8463
|
-
class: {
|
|
8464
|
-
sidebarLayoutPageWrapper: "min-h-[calc(100vh_-_53px_-_2rem)]"
|
|
8465
|
-
}
|
|
8450
|
+
class: {}
|
|
8466
8451
|
},
|
|
8467
8452
|
{
|
|
8468
8453
|
side: "bottom",
|
|
@@ -8472,8 +8457,7 @@ const slideover = {
|
|
|
8472
8457
|
"max-h-full sm:max-h-[calc(100%-18px)] right-[5px] top-0 sm:top-[18px] bottom-0",
|
|
8473
8458
|
"w-[calc(100%-60px-5px)] sm:w-[calc(100%-150px-70px)]",
|
|
8474
8459
|
"sm:rounded-t-[18px]"
|
|
8475
|
-
].join(" ")
|
|
8476
|
-
sidebarLayoutRoot: "sm:rounded-t-[18px]"
|
|
8460
|
+
].join(" ")
|
|
8477
8461
|
}
|
|
8478
8462
|
},
|
|
8479
8463
|
{
|
|
@@ -8483,13 +8467,12 @@ const slideover = {
|
|
|
8483
8467
|
content: "w-[calc(100%-2rem)] max-h-[calc(100%-2rem)] inset-y-4 left-4"
|
|
8484
8468
|
}
|
|
8485
8469
|
},
|
|
8470
|
+
// @todo remove this ?
|
|
8486
8471
|
{
|
|
8487
8472
|
side: "left",
|
|
8488
8473
|
inset: true,
|
|
8489
8474
|
useFooter: true,
|
|
8490
|
-
class: {
|
|
8491
|
-
sidebarLayoutPageWrapper: "min-h-[calc(100vh_-_53px-2rem)]"
|
|
8492
|
-
}
|
|
8475
|
+
class: {}
|
|
8493
8476
|
},
|
|
8494
8477
|
{
|
|
8495
8478
|
side: "left",
|
|
@@ -8500,13 +8483,12 @@ const slideover = {
|
|
|
8500
8483
|
},
|
|
8501
8484
|
// endregion ////
|
|
8502
8485
|
// region bottom & footer -> min-h ////
|
|
8486
|
+
// @todo remove this ?
|
|
8503
8487
|
{
|
|
8504
8488
|
side: "bottom",
|
|
8505
8489
|
inset: false,
|
|
8506
8490
|
useFooter: true,
|
|
8507
|
-
class: {
|
|
8508
|
-
sidebarLayoutPageWrapper: "sm:min-h-[calc(100vh_-_53px_-18px)]"
|
|
8509
|
-
}
|
|
8491
|
+
class: {}
|
|
8510
8492
|
},
|
|
8511
8493
|
// endregion ////
|
|
8512
8494
|
// region btn.close ////
|
|
@@ -8516,7 +8498,7 @@ const slideover = {
|
|
|
8516
8498
|
class: {
|
|
8517
8499
|
close: [
|
|
8518
8500
|
"pl-1.5 pr-[4px]",
|
|
8519
|
-
"top-[17px] -translate-x-full left-
|
|
8501
|
+
"top-[17px] -translate-x-full left-0",
|
|
8520
8502
|
"rounded-l-full"
|
|
8521
8503
|
].join(" ")
|
|
8522
8504
|
}
|
|
@@ -8527,7 +8509,7 @@ const slideover = {
|
|
|
8527
8509
|
class: {
|
|
8528
8510
|
close: [
|
|
8529
8511
|
"pr-1.5 pl-[4px]",
|
|
8530
|
-
"top-[17px] translate-x-full right-
|
|
8512
|
+
"top-[17px] translate-x-full right-0",
|
|
8531
8513
|
"rounded-r-full",
|
|
8532
8514
|
"[&>div]:flex-row-reverse"
|
|
8533
8515
|
].join(" ")
|
|
@@ -8537,17 +8519,13 @@ const slideover = {
|
|
|
8537
8519
|
// side: 'top',
|
|
8538
8520
|
inset: true,
|
|
8539
8521
|
class: {
|
|
8540
|
-
close:
|
|
8541
|
-
"top-4 end-4"
|
|
8542
|
-
].join(" ")
|
|
8522
|
+
close: "top-4 end-4"
|
|
8543
8523
|
}
|
|
8544
8524
|
},
|
|
8545
8525
|
{
|
|
8546
8526
|
side: "top",
|
|
8547
8527
|
class: {
|
|
8548
|
-
close:
|
|
8549
|
-
"top-4 end-4"
|
|
8550
|
-
].join(" ")
|
|
8528
|
+
close: "top-4 end-4"
|
|
8551
8529
|
}
|
|
8552
8530
|
},
|
|
8553
8531
|
// endregion ////
|
|
@@ -9667,11 +9645,11 @@ const toast = {
|
|
|
9667
9645
|
root: [
|
|
9668
9646
|
"dark",
|
|
9669
9647
|
"relative group overflow-hidden",
|
|
9670
|
-
"rounded-[
|
|
9671
|
-
"flex
|
|
9648
|
+
"rounded-[8px] p-4",
|
|
9649
|
+
"flex gap-4",
|
|
9672
9650
|
"focus-visible:outline-(length:--ui-design-outline-stroke-weight) focus-visible:outline-offset-2 focus-visible:outline-(--ui-color-design-outline-content-divider)",
|
|
9673
9651
|
"font-[family-name:var(--ui-font-family-primary)]",
|
|
9674
|
-
"bg-(--ui-color-
|
|
9652
|
+
"bg-(--ui-color-base-black-fixed)/80",
|
|
9675
9653
|
"text-(--ui-color-design-plain-na-focused-content)",
|
|
9676
9654
|
"text-(length:--ui-font-size-sm) font-(--ui-font-weight-normal)"
|
|
9677
9655
|
].join(" "),
|
|
@@ -9683,8 +9661,7 @@ const toast = {
|
|
|
9683
9661
|
avatarSize: "xl",
|
|
9684
9662
|
actions: "flex gap-1.5 shrink-0",
|
|
9685
9663
|
progress: "absolute inset-x-0 bottom-0",
|
|
9686
|
-
|
|
9687
|
-
close: "p-0"
|
|
9664
|
+
close: "p-0 absolute top-2 right-2"
|
|
9688
9665
|
},
|
|
9689
9666
|
variants: {
|
|
9690
9667
|
color: {
|
|
@@ -9694,7 +9671,7 @@ const toast = {
|
|
|
9694
9671
|
"air-primary-copilot": { root: "style-filled-copilot" },
|
|
9695
9672
|
"air-primary-warning": { root: "style-filled-warning" },
|
|
9696
9673
|
"air-secondary": { root: "style-filled-inverted" },
|
|
9697
|
-
// @deprecate ////
|
|
9674
|
+
// @deprecate This rule is deprecated and will be removed in version `3.0.0` ////
|
|
9698
9675
|
"default": { root: "old-style-default" },
|
|
9699
9676
|
"danger": { root: "old-style-danger" },
|
|
9700
9677
|
"success": { root: "old-style-success" },
|
|
@@ -11703,7 +11680,8 @@ function getTemplates(options, uiConfig, nuxt, resolve) {
|
|
|
11703
11680
|
}
|
|
11704
11681
|
|
|
11705
11682
|
/* @deprecate This rule is deprecated and will be removed in version 3.0.0 */
|
|
11706
|
-
.sidebar-layout.--inner
|
|
11683
|
+
.sidebar-layout.--inner,
|
|
11684
|
+
.air-custom-bg {
|
|
11707
11685
|
background: var(--air-theme-background);
|
|
11708
11686
|
}
|
|
11709
11687
|
}
|
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 getDefaultConfig } from './shared/b24ui-nuxt.
|
|
6
|
+
import { g as getTemplates, d as defaultOptions, a as getDefaultConfig } from './shared/b24ui-nuxt.D2-pCbE6.mjs';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import path from 'node:path';
|
|
9
9
|
import MagicString from 'magic-string';
|
package/dist/vite.mjs
CHANGED
package/package.json
CHANGED