@bitrix24/b24ui-nuxt 2.4.1 → 2.5.1

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.
@@ -102,7 +102,7 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
102
102
  autofocus?: boolean;
103
103
  /**
104
104
  * Display a close button in the input (useful when inside a Modal for example).
105
- * `{ size: 'sm', color: 'air-tertiary-no-accent' }`{lang="ts-type"}
105
+ * `{ color: 'air-tertiary-no-accent' }`{lang="ts-type"}
106
106
  * @emits 'update:open'
107
107
  * @defaultValue false
108
108
  */
@@ -115,7 +115,7 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
115
115
  closeIcon?: IconComponent;
116
116
  /**
117
117
  * Display a button to navigate back in history.
118
- * `{ size: 'sm', color: 'air-selection' }`{lang="ts-type"}
118
+ * `{ color: 'air-tertiary-accent' }`{lang="ts-type"}
119
119
  * @defaultValue true
120
120
  */
121
121
  back?: boolean | Omit<ButtonProps, LinkPropsKeys>;
@@ -76,7 +76,7 @@ const menuProps = toRef(() => defu(props.menu, {
76
76
  content: {
77
77
  onOpenAutoFocus: (e) => e.preventDefault()
78
78
  }
79
- }, props.mode === "modal" ? { fullscreen: true, transition: false } : props.mode === "slideover" ? { side: "left" } : {}));
79
+ }, props.mode === "modal" ? { fullscreen: true, transition: false } : props.mode === "slideover" ? { side: "left", close: false } : {}));
80
80
  function toggleOpen() {
81
81
  open.value = !open.value;
82
82
  }
@@ -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
- <slot name="content" :close="close">
108
- <template v-if="isBtnCloseExternal">
109
- <DialogClose v-if="props.close || !!slots.close" as-child>
110
- <slot name="close" :b24ui="b24ui">
111
- <!-- @todo fix this css -->
112
- <B24Button
113
- v-if="props.close"
114
- :icon="closeIcon || icons.close"
115
- class="group"
116
- color="air-primary"
117
- :aria-label="t('slideover.close')"
118
- size="lg"
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
- v-bind="typeof props.close === 'object' ? props.close : {}"
124
- data-slot="close"
125
- :class="b24ui.close({ class: uiProp?.close })"
126
- />
127
- </slot>
128
- </DialogClose>
129
- </template>
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
- <template v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || !isBtnCloseExternal && (props.close || !!slots.close)" #content-top>
152
- <div data-slot="header" :class="b24ui.header({ class: uiProp?.header })">
153
- <slot name="header" :close="close">
154
- <div data-slot="wrapper" :class="b24ui.wrapper({ class: uiProp?.wrapper })">
155
- <DialogTitle v-if="title || !!slots.title" data-slot="title" :class="b24ui.title({ class: uiProp?.title })">
156
- <slot name="title">
157
- {{ title }}
158
- </slot>
159
- </DialogTitle>
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
- <DialogDescription v-if="description || !!slots.description" data-slot="description" :class="b24ui.description({ class: uiProp?.description })">
162
- <slot name="description">
163
- {{ description }}
164
- </slot>
165
- </DialogDescription>
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
- <template v-if="!!slots['body']" #default>
193
- <div data-slot="body" :class="b24ui.body({ class: uiProp?.body })">
194
- <slot name="body" :close="close" />
195
- </div>
196
- </template>
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
- <template v-if="!!slots.footer" #content-bottom>
199
- <div data-slot="footer" :class="b24ui.footer({ class: uiProp?.footer })">
200
- <slot name="footer" :close="close" />
201
- </div>
202
- </template>
203
- </B24SidebarLayout>
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;
@@ -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"] *));@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)}
@@ -52,6 +52,7 @@ const twMergeConfig = {
52
52
  "style-old-ai"
53
53
  ],
54
54
  "b24-bg": [
55
+ // @deprecate This rule (style-blurred-bg) is deprecated and will be removed in version `3.0.0`
55
56
  "style-blurred-bg",
56
57
  "style-blurred-bg-input",
57
58
  "style-transparent-bg"