@astryxdesign/core 0.4.2-canary.255e810 → 0.4.2-canary.44cde5e

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @file Banner.tsx
3
- * @input Uses React useState, Button, Icon (with registry string names), StyleX
3
+ * @input Uses React useState/useRef/useId, Button, Icon (with registry string names), StyleX
4
4
  * @output Exports Banner component, BannerProps, BannerStatus, BannerContainer types
5
5
  * @position Core implementation; consumed by index.ts, tested by Banner.test.tsx
6
6
  *
@@ -15,6 +15,10 @@
15
15
  * - Each visual area owns its own border-radius (no overflow:clip on the container)
16
16
  * - When children are provided, a collapse/expand toggle button appears in the end area
17
17
  *
18
+ * A status added through `BannerStatusMap` augmentation has no entry in the
19
+ * status lookups, so it renders with no status fill, no default glyph and the
20
+ * polite `role="status"` rather than losing its ARIA role entirely.
21
+ *
18
22
  * Title and description render as <div> (not <p>): they accept arbitrary
19
23
  * ReactNode content, and <p> cannot legally contain block-level children
20
24
  * (the HTML parser reparents them, desyncing SSR markup from the hydrated
@@ -159,7 +163,7 @@ export interface BannerProps extends BaseProps<HTMLDivElement> {
159
163
  * </Banner>
160
164
  * ```
161
165
  */
162
- export declare function Banner({ status, title, description, icon, isDismissable, onDismiss, endContent, container, elevation, defaultIsExpanded, children, xstyle, className, style, ref, ...rest }: BannerProps): import("react").JSX.Element | null;
166
+ export declare function Banner({ status, title, description, icon, isDismissable, onDismiss, endContent, container, elevation, defaultIsExpanded, children, xstyle, className, style, ref, onFocusCapture, onPointerDownCapture, ...rest }: BannerProps): import("react").JSX.Element | null;
163
167
  export declare namespace Banner {
164
168
  var displayName: string;
165
169
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAkB,KAAK,SAAS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IG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAiMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,aAAqB,EACrB,SAAS,EACT,UAAU,EACV,SAAkB,EAClB,SAAkB,EAClB,iBAAyB,EACzB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,cAAc,EACd,oBAAoB,EACpB,GAAG,IAAI,EACR,EAAE,WAAW,sCA2Mb;yBA9Ne,MAAM"}
@@ -4,7 +4,7 @@
4
4
 
5
5
  /**
6
6
  * @file Banner.tsx
7
- * @input Uses React useState, Button, Icon (with registry string names), StyleX
7
+ * @input Uses React useState/useRef/useId, Button, Icon (with registry string names), StyleX
8
8
  * @output Exports Banner component, BannerProps, BannerStatus, BannerContainer types
9
9
  * @position Core implementation; consumed by index.ts, tested by Banner.test.tsx
10
10
  *
@@ -19,6 +19,10 @@
19
19
  * - Each visual area owns its own border-radius (no overflow:clip on the container)
20
20
  * - When children are provided, a collapse/expand toggle button appears in the end area
21
21
  *
22
+ * A status added through `BannerStatusMap` augmentation has no entry in the
23
+ * status lookups, so it renders with no status fill, no default glyph and the
24
+ * polite `role="status"` rather than losing its ARIA role entirely.
25
+ *
22
26
  * Title and description render as <div> (not <p>): they accept arbitrary
23
27
  * ReactNode content, and <p> cannot legally contain block-level children
24
28
  * (the HTML parser reparents them, desyncing SSR markup from the hydrated
@@ -33,13 +37,13 @@
33
37
  * - /apps/storybook/stories/Banner.stories.tsx (storybook stories)
34
38
  * - /packages/cli/assets/templates/blocks/components/Banner/ (showcase blocks)
35
39
  */
36
- import { useId, useState } from 'react';
40
+ import { useId, useRef, useState } from 'react';
37
41
  import * as stylex from '@stylexjs/stylex';
38
42
  import { Button } from "../Button/index.js";
39
43
  import { Icon } from "../Icon/index.js";
40
44
  import "../theme/tokens.stylex.js";
41
45
  import { colorVars, spacingVars, radiusVars, fontWeightVars, typeScaleVars, borderVars, durationVars, easeVars, shadowVars } from "../theme/tokens.stylex.js";
42
- import { mergeProps } from "../utils/index.js";
46
+ import { composeEventHandlers, isRenderable, mergeProps } from "../utils/index.js";
43
47
  import { edgeCompSlot } from "../Layout/edgeCompensation.stylex.js";
44
48
  import { themeProps } from "../utils/themeProps.js";
45
49
  import { useTranslator } from "../i18n/index.js";
@@ -62,20 +66,21 @@ import { useTranslator } from "../i18n/index.js";
62
66
  */
63
67
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
64
68
  // =============================================================================
65
- // Status → Icon mapping
69
+ // Status lookups
66
70
  // =============================================================================
67
71
 
72
+ // `BannerStatus` is `keyof BannerStatusMap`, and index.ts documents augmenting
73
+ // that interface to add a status. Every lookup below is therefore partial: an
74
+ // augmented status the library has never heard of falls through to the base
75
+ // treatment (no status fill, no glyph, the polite role) instead of resolving to
76
+ // `undefined` and dropping the ARIA role along with it.
77
+
68
78
  const defaultIconNames = {
69
79
  info: 'info',
70
80
  warning: 'warning',
71
81
  error: 'error',
72
82
  success: 'success'
73
83
  };
74
-
75
- // =============================================================================
76
- // Status → ARIA role mapping
77
- // =============================================================================
78
-
79
84
  const statusRole = {
80
85
  info: 'status',
81
86
  warning: 'alert',
@@ -83,10 +88,8 @@ const statusRole = {
83
88
  success: 'status'
84
89
  };
85
90
 
86
- // =============================================================================
87
- // Status → Icon color mapping
88
- // =============================================================================
89
-
91
+ /** An unknown status is not urgent by definition, so it announces politely. */
92
+ const FALLBACK_ROLE = 'status';
90
93
  const statusIconColor = {
91
94
  info: 'accent',
92
95
  warning: 'warning',
@@ -106,7 +109,7 @@ const styles = {
106
109
  $$css: true
107
110
  },
108
111
  rootElevatedCard: {
109
- kaIpWk: "x1hviunn",
112
+ kaIpWk: "x1vf2byn",
110
113
  $$css: true
111
114
  },
112
115
  header: {
@@ -118,12 +121,12 @@ const styles = {
118
121
  $$css: true
119
122
  },
120
123
  headerCardStandalone: {
121
- kaIpWk: "x1hviunn",
124
+ kaIpWk: "x1vf2byn",
122
125
  $$css: true
123
126
  },
124
127
  headerCardWithContent: {
125
- krdFHd: "x81l70g",
126
- kfmiAY: "x7hs6f1",
128
+ krdFHd: "xwxb7qi",
129
+ kfmiAY: "x13nour3",
127
130
  kVL7Gh: "xbiv7yw",
128
131
  kT0f0o: "x16uus16",
129
132
  $$css: true
@@ -171,6 +174,15 @@ const statusStyles = {
171
174
  }
172
175
  };
173
176
 
177
+ /**
178
+ * Narrows an augmented `BannerStatus` to one the style map actually carries,
179
+ * so an unknown status renders with no status fill rather than crashing the
180
+ * lookup. StyleX style maps cannot be declared `Partial`, hence the guard.
181
+ */
182
+ function hasStatusStyle(status) {
183
+ return Object.prototype.hasOwnProperty.call(statusStyles, status);
184
+ }
185
+
174
186
  // Resting elevation for the banner. Applied to the root so the shadow wraps
175
187
  // the whole banner (header + optional content). 'none' is the default and
176
188
  // leaves the layout-only root untouched. For the `card` container the root is
@@ -260,51 +272,80 @@ export function Banner({
260
272
  className,
261
273
  style,
262
274
  ref,
275
+ onFocusCapture,
276
+ onPointerDownCapture,
263
277
  ...rest
264
278
  }) {
265
279
  const t = useTranslator();
266
280
  const [isDismissed, setIsDismissed] = useState(false);
267
281
  const [isExpanded, setIsExpanded] = useState(defaultIsExpanded);
282
+ // The element focus came from before it entered the banner. Dismissing
283
+ // unmounts the whole banner, dismiss button included, so without a handoff
284
+ // the browser drops focus to <body> and a keyboard user loses their place.
285
+ // ToastViewport makes the same handoff when a focused toast is dismissed.
286
+ const focusOriginRef = useRef(null);
268
287
  // Links the expand/collapse toggle to the content region it shows/hides so
269
288
  // assistive tech can move from the button to its controlled content
270
289
  // (disclosure pattern). The region is conditionally rendered, so aria-controls
271
290
  // below is set only while it's mounted to avoid a dangling reference.
272
291
  const contentId = useId();
273
292
  const defaultIconName = defaultIconNames[status];
274
- const role = statusRole[status];
293
+ const role = statusRole[status] ?? FALLBACK_ROLE;
275
294
  const iconColor = statusIconColor[status];
276
- const hasChildren = children != null;
295
+ const hasChildren = isRenderable(children);
277
296
  if (isDismissed) {
278
297
  return null;
279
298
  }
299
+
300
+ // `focusin` reports the element focus came *from* as relatedTarget; on
301
+ // pointerdown focus has not moved yet, so document.activeElement is it.
302
+ const rememberFocusOrigin = (candidate, root) => {
303
+ if (candidate instanceof HTMLElement && candidate !== document.body && !root.contains(candidate)) {
304
+ focusOriginRef.current = candidate;
305
+ }
306
+ };
307
+ const handleFocusCapture = event => {
308
+ rememberFocusOrigin(event.relatedTarget, event.currentTarget);
309
+ };
310
+ const handlePointerDownCapture = event => {
311
+ rememberFocusOrigin(document.activeElement, event.currentTarget);
312
+ };
280
313
  const handleDismiss = () => {
314
+ const origin = focusOriginRef.current;
281
315
  setIsDismissed(true);
282
316
  onDismiss?.();
317
+ // Move focus before React removes the subtree, so the browser never has a
318
+ // frame where the focused node is gone.
319
+ if (origin?.isConnected) {
320
+ origin.focus();
321
+ }
283
322
  };
284
323
  const handleToggleExpand = () => {
285
324
  setIsExpanded(prev => !prev);
286
325
  };
287
326
 
288
327
  // Show the end area if there are actions, dismiss, or a collapsible toggle
289
- const showEndArea = endContent != null || isDismissable || hasChildren;
328
+ const showEndArea = isRenderable(endContent) || isDismissable || hasChildren;
290
329
  // Center items vertically when there's only a title (no description)
291
330
  // and the banner has action buttons
292
- const hasActions = endContent != null || isDismissable;
293
- const isSingleLine = description == null && hasActions;
331
+ const hasActions = isRenderable(endContent) || isDismissable;
332
+ const isSingleLine = !isRenderable(description) && hasActions;
294
333
  const showContent = hasChildren && isExpanded;
295
334
  const isCard = container === 'card';
296
335
  return /*#__PURE__*/_jsxs("div", {
297
336
  ref: ref,
298
337
  role: role,
338
+ onFocusCapture: composeEventHandlers(onFocusCapture, handleFocusCapture),
339
+ onPointerDownCapture: composeEventHandlers(onPointerDownCapture, handlePointerDownCapture),
299
340
  ...mergeProps(stylex.props(styles.root, elevationStyles[elevation], isCard && elevation !== 'none' && styles.rootElevatedCard, xstyle), className, style),
300
341
  ...rest,
301
342
  children: [/*#__PURE__*/_jsxs("div", {
302
343
  ...mergeProps(themeProps('banner', {
303
344
  container,
304
345
  status
305
- }), stylex.props(styles.header, isSingleLine && styles.headerCentered, statusStyles[status], isCard && (showContent ? styles.headerCardWithContent : styles.headerCardStandalone))),
346
+ }), stylex.props(styles.header, isSingleLine && styles.headerCentered, hasStatusStyle(status) && statusStyles[status], isCard && (showContent ? styles.headerCardWithContent : styles.headerCardStandalone))),
306
347
  children: [/*#__PURE__*/_jsx("div", {
307
- ...(icon != null ? mergeProps(themeProps('banner-icon', {
348
+ ...(isRenderable(icon) ? mergeProps(themeProps('banner-icon', {
308
349
  status
309
350
  }), {
310
351
  className: "x78zum5 x6s0dn4 x2lah0s"
@@ -312,7 +353,7 @@ export function Banner({
312
353
  className: "x78zum5 x6s0dn4 x2lah0s"
313
354
  }),
314
355
  "aria-hidden": "true",
315
- children: icon != null ? icon :
356
+ children: isRenderable(icon) ? icon : defaultIconName != null ?
316
357
  /*#__PURE__*/
317
358
  // Applied to the status <Icon> itself rather than the wrapper, so
318
359
  // the element that paints the glyph is the element a theme
@@ -325,19 +366,19 @@ export function Banner({
325
366
  ...themeProps('banner-icon', {
326
367
  status
327
368
  })
328
- })
369
+ }) : null
329
370
  }), /*#__PURE__*/_jsxs("div", {
330
371
  ...{
331
372
  className: "x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli"
332
373
  },
333
374
  children: [/*#__PURE__*/_jsx("div", {
334
375
  ...{
335
- className: "x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0"
376
+ className: "x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0 xj0a0fe"
336
377
  },
337
378
  children: title
338
- }), description != null && /*#__PURE__*/_jsx("div", {
379
+ }), isRenderable(description) && /*#__PURE__*/_jsx("div", {
339
380
  ...{
340
- className: "x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4"
381
+ className: "x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4 xj0a0fe"
341
382
  },
342
383
  children: description
343
384
  })]
@@ -382,7 +423,7 @@ export function Banner({
382
423
  className: "x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh"
383
424
  },
384
425
  1: {
385
- className: "x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh x14k8p9y xiaxfje"
426
+ className: "x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh x1k5g1gk x1eprgri"
386
427
  }
387
428
  }[!!isCard << 0]),
388
429
  children: children
@@ -7,35 +7,37 @@
7
7
  * SYNC: When modified, update this header and /packages/core/src/Banner/Banner.doc.mjs
8
8
  */
9
9
  /**
10
- * Extensible status map for Banner.
10
+ * Extensible container map for Banner.
11
11
  *
12
- * Theme packages can add custom statuses via TypeScript module augmentation:
12
+ * Theme packages can add custom container types via TypeScript module augmentation:
13
13
  * @example
14
14
  * ```
15
15
  * declare module '@astryxdesign/core/Banner' {
16
- * interface BannerStatusMap {
17
- * 'neutral': true;
16
+ * interface BannerContainerMap {
17
+ * 'floating': true;
18
18
  * }
19
19
  * }
20
20
  * ```
21
21
  */
22
+ export interface BannerContainerMap {
23
+ card: true;
24
+ section: true;
25
+ }
22
26
  /**
23
- * Extensible container map for Banner.
27
+ * Extensible status map for Banner.
24
28
  *
25
- * Theme packages can add custom container types via TypeScript module augmentation:
29
+ * Theme packages can add custom statuses via TypeScript module augmentation.
30
+ * A status the library does not know falls through to the base treatment: no
31
+ * status fill, no default glyph, and `role="status"`.
26
32
  * @example
27
33
  * ```
28
34
  * declare module '@astryxdesign/core/Banner' {
29
- * interface BannerContainerMap {
30
- * 'floating': true;
35
+ * interface BannerStatusMap {
36
+ * 'neutral': true;
31
37
  * }
32
38
  * }
33
39
  * ```
34
40
  */
35
- export interface BannerContainerMap {
36
- card: true;
37
- section: true;
38
- }
39
41
  export interface BannerStatusMap {
40
42
  info: true;
41
43
  warning: true;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Banner/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH;;;;;;;;;;;;GAYG;AACH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,IAAI,CAAC;CACf;AAED,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,YAAY,EAAC,WAAW,EAAE,YAAY,EAAE,eAAe,EAAC,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Banner/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;CACf;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,IAAI,CAAC;CACf;AAED,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,YAAY,EAAC,WAAW,EAAE,YAAY,EAAE,eAAe,EAAC,MAAM,UAAU,CAAC"}
@@ -12,27 +12,29 @@
12
12
  */
13
13
 
14
14
  /**
15
- * Extensible status map for Banner.
15
+ * Extensible container map for Banner.
16
16
  *
17
- * Theme packages can add custom statuses via TypeScript module augmentation:
17
+ * Theme packages can add custom container types via TypeScript module augmentation:
18
18
  * @example
19
19
  * ```
20
20
  * declare module '@astryxdesign/core/Banner' {
21
- * interface BannerStatusMap {
22
- * 'neutral': true;
21
+ * interface BannerContainerMap {
22
+ * 'floating': true;
23
23
  * }
24
24
  * }
25
25
  * ```
26
26
  */
27
27
  /**
28
- * Extensible container map for Banner.
28
+ * Extensible status map for Banner.
29
29
  *
30
- * Theme packages can add custom container types via TypeScript module augmentation:
30
+ * Theme packages can add custom statuses via TypeScript module augmentation.
31
+ * A status the library does not know falls through to the base treatment: no
32
+ * status fill, no default glyph, and `role="status"`.
31
33
  * @example
32
34
  * ```
33
35
  * declare module '@astryxdesign/core/Banner' {
34
- * interface BannerContainerMap {
35
- * 'floating': true;
36
+ * interface BannerStatusMap {
37
+ * 'neutral': true;
36
38
  * }
37
39
  * }
38
40
  * ```
package/dist/astryx.css CHANGED
@@ -378,6 +378,7 @@
378
378
  .x1pjcqnp:not(#\#):not(#\#){border-radius:inherit}
379
379
  .x1ws5lxm:not(#\#):not(#\#){border-radius:max(0px,calc(var(--_dropdown-menu-radius,var(--spacing-2)) - var(--_dropdown-menu-padding,var(--spacing-1))))}
380
380
  .xc910v0:not(#\#):not(#\#){border-radius:max(0px,calc(var(--_segmented-control-radius) - var(--_segmented-control-padding)))}
381
+ .x1vf2byn:not(#\#):not(#\#){border-radius:var(--_banner-radius,var(--radius-container))}
381
382
  .x1jxw6zd:not(#\#):not(#\#){border-radius:var(--_button-radius,var(--radius-element))}
382
383
  .xy0xnkn:not(#\#):not(#\#){border-radius:var(--_button-radius,var(--radius-full))}
383
384
  .x153u1i6:not(#\#):not(#\#){border-radius:var(--_card-radius)}
@@ -639,14 +640,14 @@
639
640
  .x18o3ruo:not(#\#):not(#\#):not(#\#){background-image:none}
640
641
  .x1mwwwfo:not(#\#):not(#\#):not(#\#){border-collapse:collapse}
641
642
  .x16uus16:not(#\#):not(#\#):not(#\#){border-end-end-radius:0}
643
+ .x1eprgri:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--_banner-radius,var(--radius-container))}
642
644
  .x6k0y1c:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--_chat-composer-radius)}
643
- .xiaxfje:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--radius-container)}
644
645
  .x14i3lts:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--radius-element)}
645
646
  .x1dgc8on:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--radius-full)}
646
647
  .x1whkvtz:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--radius-inner)}
647
648
  .xbiv7yw:not(#\#):not(#\#):not(#\#){border-end-start-radius:0}
649
+ .x1k5g1gk:not(#\#):not(#\#):not(#\#){border-end-start-radius:var(--_banner-radius,var(--radius-container))}
648
650
  .xkvxy4d:not(#\#):not(#\#):not(#\#){border-end-start-radius:var(--_chat-composer-radius)}
649
- .x14k8p9y:not(#\#):not(#\#):not(#\#){border-end-start-radius:var(--radius-container)}
650
651
  .xquck67:not(#\#):not(#\#):not(#\#){border-end-start-radius:var(--radius-element)}
651
652
  .x1wc3881:not(#\#):not(#\#):not(#\#){border-end-start-radius:var(--radius-full)}
652
653
  .xrfs2vl:not(#\#):not(#\#):not(#\#){border-end-start-radius:var(--radius-inner)}
@@ -664,16 +665,16 @@
664
665
  .xtpqe59:not(#\#):not(#\#):not(#\#){border-inline-start-width:var(--spacing-0-5)}
665
666
  .x1gukg7c:not(#\#):not(#\#):not(#\#){border-spacing:0}
666
667
  .x1ga7v0g:not(#\#):not(#\#):not(#\#){border-start-end-radius:0}
668
+ .x13nour3:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--_banner-radius,var(--radius-container))}
667
669
  .xzc3kxz:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--_chat-composer-radius)}
668
670
  .xg0tfu:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-chat)}
669
- .x7hs6f1:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-container)}
670
671
  .xxbepff:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-element)}
671
672
  .x8agd5o:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-full)}
672
673
  .x126per9:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-inner)}
673
674
  .x15mokao:not(#\#):not(#\#):not(#\#){border-start-start-radius:0}
675
+ .xwxb7qi:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--_banner-radius,var(--radius-container))}
674
676
  .xy7p8pm:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--_chat-composer-radius)}
675
677
  .x1n70msy:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--radius-chat)}
676
- .x81l70g:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--radius-container)}
677
678
  .x19415el:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--radius-full)}
678
679
  .x3qb8m:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--radius-inner)}
679
680
  .x183tx6i:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--radius-page)}
@@ -972,6 +973,7 @@
972
973
  .x1t137rt:not(#\#):not(#\#):not(#\#){outline-style:none}
973
974
  .x1k57tk5:not(#\#):not(#\#):not(#\#){outline-width:0}
974
975
  .x9y5y3v:not(#\#):not(#\#):not(#\#){overflow-clip-margin:1px}
976
+ .xj0a0fe:not(#\#):not(#\#):not(#\#){overflow-wrap:anywhere}
975
977
  .x1mzt3pk:not(#\#):not(#\#):not(#\#){overflow-wrap:break-word}
976
978
  .x1h4wwuj:not(#\#):not(#\#):not(#\#){overflow-wrap:normal}
977
979
  .xyri2b:not(#\#):not(#\#):not(#\#){padding-inline-end:0}