@bitrix24/b24ui-nuxt 2.5.1 → 2.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.json +1 -1
- package/dist/module.mjs +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/prose/Callout.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Callout.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Card.d.vue.ts +2 -1
- package/dist/runtime/components/prose/Card.vue +30 -0
- package/dist/runtime/components/prose/Card.vue.d.ts +2 -1
- 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.DMHr4spo.mjs → b24ui-nuxt.LkR3tG7f.mjs} +9 -5
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,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.LkR3tG7f.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
import 'knitwork';
|
|
@@ -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
|
/**
|
|
@@ -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/prose/callout';
|
|
4
3
|
import type { IconComponent, LinkProps } from '../../types';
|
|
5
4
|
import type { ComponentConfig } from '../../types/tv';
|
|
5
|
+
import theme from '#build/b24ui/prose/callout';
|
|
6
6
|
type ProseCallout = ComponentConfig<typeof theme, AppConfig, 'callout', 'b24ui.prose'>;
|
|
7
7
|
export interface ProseCalloutProps {
|
|
8
8
|
to?: LinkProps['to'];
|
|
@@ -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/prose/callout';
|
|
4
3
|
import type { IconComponent, LinkProps } from '../../types';
|
|
5
4
|
import type { ComponentConfig } from '../../types/tv';
|
|
5
|
+
import theme from '#build/b24ui/prose/callout';
|
|
6
6
|
type ProseCallout = ComponentConfig<typeof theme, AppConfig, 'callout', 'b24ui.prose'>;
|
|
7
7
|
export interface ProseCalloutProps {
|
|
8
8
|
to?: LinkProps['to'];
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
-
import theme from '#build/b24ui/prose/card';
|
|
4
3
|
import type { IconComponent, LinkProps } from '../../types';
|
|
5
4
|
import type { ComponentConfig } from '../../types/tv';
|
|
5
|
+
import theme from '#build/b24ui/prose/card';
|
|
6
6
|
type ProseCard = ComponentConfig<typeof theme, AppConfig, 'card', 'b24ui.prose'>;
|
|
7
7
|
export interface ProseCardProps {
|
|
8
8
|
to?: LinkProps['to'];
|
|
9
9
|
target?: LinkProps['target'];
|
|
10
10
|
icon?: IconComponent;
|
|
11
|
+
iconName?: string;
|
|
11
12
|
title?: string;
|
|
12
13
|
description?: string;
|
|
13
14
|
/**
|
|
@@ -9,11 +9,17 @@ import { useComponentUI } from "../../composables/useComponentUI";
|
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
10
|
import icons from "../../dictionary/icons";
|
|
11
11
|
import B24Link from "../Link.vue";
|
|
12
|
+
import GitHubIcon from "@bitrix24/b24icons-vue/social/GitHubIcon";
|
|
13
|
+
import InfoCircleIcon from "@bitrix24/b24icons-vue/outline/InfoCircleIcon";
|
|
14
|
+
import MdnwebdocsIcon from "@bitrix24/b24icons-vue/social/MdnwebdocsIcon";
|
|
15
|
+
import Bitrix24Icon from "@bitrix24/b24icons-vue/common-service/Bitrix24Icon";
|
|
16
|
+
import DemonstrationOnIcon from "@bitrix24/b24icons-vue/outline/DemonstrationOnIcon";
|
|
12
17
|
defineOptions({ inheritAttrs: false });
|
|
13
18
|
const props = defineProps({
|
|
14
19
|
to: { type: null, required: false },
|
|
15
20
|
target: { type: [String, Object, null], required: false },
|
|
16
21
|
icon: { type: [Function, Object], required: false },
|
|
22
|
+
iconName: { type: String, required: false },
|
|
17
23
|
title: { type: String, required: false },
|
|
18
24
|
description: { type: String, required: false },
|
|
19
25
|
color: { type: null, required: false },
|
|
@@ -30,6 +36,24 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.prose?.
|
|
|
30
36
|
}));
|
|
31
37
|
const target = computed(() => props.target || (!!props.to && typeof props.to === "string" && props.to.startsWith("http") ? "_blank" : void 0));
|
|
32
38
|
const ariaLabel = computed(() => (props.title || "Card link").trim());
|
|
39
|
+
const iconFromIconName = computed(() => {
|
|
40
|
+
if (!props.iconName) {
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
switch (props.iconName) {
|
|
44
|
+
case "InfoCircleIcon":
|
|
45
|
+
return InfoCircleIcon;
|
|
46
|
+
case "GitHubIcon":
|
|
47
|
+
return GitHubIcon;
|
|
48
|
+
case "MdnWebDocIcon":
|
|
49
|
+
return MdnwebdocsIcon;
|
|
50
|
+
case "Bitrix24Icon":
|
|
51
|
+
return Bitrix24Icon;
|
|
52
|
+
case "DemonstrationOnIcon":
|
|
53
|
+
return DemonstrationOnIcon;
|
|
54
|
+
}
|
|
55
|
+
return void 0;
|
|
56
|
+
});
|
|
33
57
|
</script>
|
|
34
58
|
|
|
35
59
|
<template>
|
|
@@ -50,6 +74,12 @@ const ariaLabel = computed(() => (props.title || "Card link").trim());
|
|
|
50
74
|
data-slot="icon"
|
|
51
75
|
:class="b24ui.icon({ class: uiProp?.icon })"
|
|
52
76
|
/>
|
|
77
|
+
<Component
|
|
78
|
+
:is="iconFromIconName"
|
|
79
|
+
v-else-if="props.iconName"
|
|
80
|
+
data-slot="icon"
|
|
81
|
+
:class="b24ui.icon({ class: uiProp?.icon })"
|
|
82
|
+
/>
|
|
53
83
|
<Component
|
|
54
84
|
:is="icons.external"
|
|
55
85
|
v-if="!!to && target === '_blank'"
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
-
import theme from '#build/b24ui/prose/card';
|
|
4
3
|
import type { IconComponent, LinkProps } from '../../types';
|
|
5
4
|
import type { ComponentConfig } from '../../types/tv';
|
|
5
|
+
import theme from '#build/b24ui/prose/card';
|
|
6
6
|
type ProseCard = ComponentConfig<typeof theme, AppConfig, 'card', 'b24ui.prose'>;
|
|
7
7
|
export interface ProseCardProps {
|
|
8
8
|
to?: LinkProps['to'];
|
|
9
9
|
target?: LinkProps['target'];
|
|
10
10
|
icon?: IconComponent;
|
|
11
|
+
iconName?: string;
|
|
11
12
|
title?: string;
|
|
12
13
|
description?: string;
|
|
13
14
|
/**
|
|
@@ -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{.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)}
|
|
1
|
+
@import "#build/b24ui.css";@import "./keyframes.css";@import "./air-design-tokens/tw-style/index.css";@import "./air-design-tokens/index.css";@source "./components";@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);--b24ui-container-width:90rem}}@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);--background-color-default:var(--ui-color-bg-content-primary);--background-color-muted:var(--ui-color-design-tinted-na-bg);--background-color-elevated:var(--ui-color-bg-content-secondary);--background-color-accented:var(--ui-color-accent-soft-element-blue);--background-color-border:var(--ui-color-divider-default);--border-color-default:var(--ui-color-divider-default);--border-color-muted:var(--ui-color-design-tinted-na-stroke);--border-color-accented:var(--ui-color-accent-soft-element-blue);--border-color-bg:var(--ui-color-bg-content-primary)}
|
|
@@ -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.5.
|
|
11
|
+
const version = "2.5.3";
|
|
12
12
|
|
|
13
13
|
function getDefaultConfig(theme) {
|
|
14
14
|
return {
|
|
@@ -2620,8 +2620,7 @@ const commandPalette = {
|
|
|
2620
2620
|
};
|
|
2621
2621
|
|
|
2622
2622
|
const container = {
|
|
2623
|
-
base: "w-full max-w-
|
|
2624
|
-
// max-w-7xl w-full
|
|
2623
|
+
base: "w-full max-w-(--b24ui-container-width) mx-auto px-4 sm:px-6 lg:px-8"
|
|
2625
2624
|
};
|
|
2626
2625
|
|
|
2627
2626
|
const contextMenu = {
|
|
@@ -2943,10 +2942,13 @@ const dashboardSidebar = {
|
|
|
2943
2942
|
root: [
|
|
2944
2943
|
"relative hidden lg:flex flex-col min-h-svh min-w-16 w-(--width) shrink-0",
|
|
2945
2944
|
"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
|
|
2945
|
+
"light:bg-transparent"
|
|
2947
2946
|
].join(" "),
|
|
2948
2947
|
header: "h-(--b24ui-header-height) shrink-0 flex items-center gap-1.5 ps-4 pe-4",
|
|
2949
|
-
body:
|
|
2948
|
+
body: [
|
|
2949
|
+
"flex flex-col gap-4 flex-1 overflow-y-auto py-2 ps-4 pe-4 md:pe-2 scrollbar-thin scrollbar-transparent",
|
|
2950
|
+
"light:[--leftmenu-group-stroke:var(--ui-color-base-30)]"
|
|
2951
|
+
],
|
|
2950
2952
|
footer: [
|
|
2951
2953
|
"shrink-0 flex items-center gap-1.5 py-2 ps-4 pe-4",
|
|
2952
2954
|
"lg:border-t lg:border-(--ui-color-divider-default)",
|
|
@@ -6064,6 +6066,8 @@ const navigationMenu = {
|
|
|
6064
6066
|
list: "flex flex-col",
|
|
6065
6067
|
item: [
|
|
6066
6068
|
"mt-(--menu-item-block-stack-space)",
|
|
6069
|
+
// @see `--leftmenu-group-stroke` src/runtime/air-design-tokens/components/navigation-menu.css:75
|
|
6070
|
+
// @see `light:--leftmenu-group-stroke` src/theme/dashboard-sidebar.ts:16
|
|
6067
6071
|
"data-[state=open]:rounded-(--menu-item-border-radius) data-[state=open]:border-(length:--leftmenu-group-stroke-weight) data-[state=open]:border-(--leftmenu-group-stroke)"
|
|
6068
6072
|
].join(" "),
|
|
6069
6073
|
link: [
|
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.LkR3tG7f.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