@astryxdesign/core 0.1.7-canary.cecb773 → 0.1.7-canary.e24b070

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.
@@ -3,9 +3,8 @@
3
3
  * @input Uses React, StyleX, useScrollOverflow, useLayer, Button, Icon, theme tokens
4
4
  * @output Exports Carousel component
5
5
  * @position Horizontal scroll container with fade-edge overflow indication,
6
- * optional prev/next buttons on the top layer, scroll-snap, a 1px
7
- * visual bleed allowance for child selection indicators, and Shift + wheel
8
- * mapping so mouse users can scroll horizontally.
6
+ * optional prev/next buttons on the top layer, scroll-snap, and a 1px
7
+ * visual bleed allowance for child selection indicators.
9
8
  *
10
9
  * SYNC: When modified, update:
11
10
  * - /packages/core/src/Carousel/index.ts (exports)
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAC,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAc/E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;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MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAyJD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,QAAQ,EACR,GAAO,EACP,UAAiB,EACjB,WAAkB,EAClB,OAAe,EACf,OAAO,EACP,YAAY,EAAE,kBAAkB,EAChC,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,SAAS,EACb,EAAE,aAAa,+BAmJf;yBAjKe,QAAQ"}
@@ -7,9 +7,8 @@
7
7
  * @input Uses React, StyleX, useScrollOverflow, useLayer, Button, Icon, theme tokens
8
8
  * @output Exports Carousel component
9
9
  * @position Horizontal scroll container with fade-edge overflow indication,
10
- * optional prev/next buttons on the top layer, scroll-snap, a 1px
11
- * visual bleed allowance for child selection indicators, and Shift + wheel
12
- * mapping so mouse users can scroll horizontally.
10
+ * optional prev/next buttons on the top layer, scroll-snap, and a 1px
11
+ * visual bleed allowance for child selection indicators.
13
12
  *
14
13
  * SYNC: When modified, update:
15
14
  * - /packages/core/src/Carousel/index.ts (exports)
@@ -235,34 +234,6 @@ export function Carousel({
235
234
  scrollElRef.current = el;
236
235
  scrollRef(el);
237
236
  }, [scrollRef]);
238
-
239
- // Map Shift + vertical wheel to horizontal scroll. Trackpads emit
240
- // horizontal deltas natively, but a standard mouse only produces deltaY —
241
- // so mouse users can't wheel-scroll a horizontal container. Shift + wheel
242
- // is the long-established convention for horizontal scroll containers; we
243
- // honor it by translating the vertical delta into a horizontal scroll.
244
- //
245
- // Only kicks in when Shift is held and the wheel is purely vertical
246
- // (deltaX === 0), so native trackpad horizontal scrolling is untouched.
247
- const handleWheel = useCallback(event => {
248
- if (!event.shiftKey || event.deltaY === 0 || event.deltaX !== 0) {
249
- return;
250
- }
251
- const el = scrollElRef.current;
252
- if (!el) {
253
- return;
254
- }
255
- // Nothing to scroll horizontally — let the event fall through so the page
256
- // can scroll as it normally would.
257
- if (el.scrollWidth <= el.clientWidth) {
258
- return;
259
- }
260
- event.preventDefault();
261
- el.scrollBy({
262
- left: event.deltaY,
263
- behavior: 'auto'
264
- });
265
- }, []);
266
237
  const scrollBy = useCallback(direction => {
267
238
  const el = scrollElRef.current;
268
239
  if (!el) {
@@ -300,7 +271,6 @@ export function Carousel({
300
271
  children: [/*#__PURE__*/_jsx("div", {
301
272
  ref: composedRef,
302
273
  tabIndex: 0,
303
- onWheel: handleWheel,
304
274
  ...stylex.props(styles.scroller, gapStyles[gap], padding != null && paddingStyles[padding], hasSnap && styles.snap, fadeStyle),
305
275
  children: Children.map(children, child => /*#__PURE__*/_jsx("div", {
306
276
  ...{
@@ -140,31 +140,6 @@ export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref' | 'color'
140
140
  * @default 'md'
141
141
  */
142
142
  size?: IconSize;
143
- /**
144
- * Accessible name for the icon. Set this only when the icon is MEANINGFUL on
145
- * its own — a standalone status glyph or an icon-only indicator with no
146
- * adjacent text conveying the same information. Providing it exposes the icon
147
- * to assistive tech as `role="img"` with this string as the accessible name
148
- * (via `aria-label`) and drops the default `aria-hidden="true"`.
149
- *
150
- * Omit it (the default) for decorative icons — the common case, e.g. an icon
151
- * beside a text label — and the icon stays hidden from assistive tech
152
- * (`aria-hidden="true"`). An empty string (`''`) is treated the same as
153
- * omitting it (decorative), since an empty accessible name is meaningless.
154
- *
155
- * Don't set `label` when an interactive parent (Button, IconButton, link)
156
- * already names the control — that produces a duplicate announcement.
157
- *
158
- * @example
159
- * ```
160
- * // Meaningful, standalone icon
161
- * <Icon icon="success" label="Completed" />
162
- *
163
- * // Decorative icon (default) — omit label
164
- * <Icon icon="search" />
165
- * ```
166
- */
167
- label?: string;
168
143
  }
169
144
  /**
170
145
  * Renders an icon from the icon registry or a custom SVG component.
@@ -174,7 +149,7 @@ export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref' | 'color'
174
149
  * <Icon icon="close" size="md" color="primary" />
175
150
  * ```
176
151
  */
177
- export declare function Icon({ icon, color, size, label, ref, ...props }: IconProps): React.JSX.Element;
152
+ export declare function Icon({ icon, color, size, ref, ...props }: IconProps): React.JSX.Element;
178
153
  export declare namespace Icon {
179
154
  var displayName: string;
180
155
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/Icon/Icon.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAG3C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAqBnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2Df,CAAC;AAEH;;;;;;;;GAQG;AACH,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;EAiBd,CAAC;AAyCH,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,WAAW,CAAC;AACjD,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,UAAU,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,SAAU,SAAQ,IAAI,CACrC,QAAQ,CAAC,aAAa,CAAC,EACvB,KAAK,GAAG,OAAO,CAChB;IACC,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;;;;;;;;;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,KAAK,GAAG,OAAO,CAChB;IACC,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;OAIG;IACH,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAMD;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,KAAiB,EACjB,IAAW,EACX,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,qBA0BX;yBAhCe,IAAI;;;AAiFpB;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,EAChC,KAAK,CAAC,EAAE;IAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAC,GAC3C,KAAK,CAAC,SAAS,CAYjB"}
package/dist/Icon/Icon.js CHANGED
@@ -205,26 +205,6 @@ const spanSizeStyles = {
205
205
  * Extends SVGProps to allow passing additional SVG attributes (used when icon is a component).
206
206
  */
207
207
 
208
- /**
209
- * Derives the ARIA attributes for an icon from its `label` prop.
210
- *
211
- * - Non-empty `label` → meaningful image: `role="img"` + `aria-label`, and no
212
- * `aria-hidden` (an `aria-hidden` element is removed from the accessibility
213
- * tree, so its accessible name would be ignored).
214
- * - Omitted or empty `label` → decorative default: `aria-hidden="true"`.
215
- *
216
- * The result is spread BEFORE `{...props}` in both render modes so an explicit
217
- * `aria-hidden` / `role` / `aria-label` from the consumer always wins.
218
- */
219
- function getIconA11yProps(label) {
220
- return label != null && label !== '' ? {
221
- role: 'img',
222
- 'aria-label': label
223
- } : {
224
- 'aria-hidden': 'true'
225
- };
226
- }
227
-
228
208
  // =============================================================================
229
209
  // Component
230
210
  // =============================================================================
@@ -241,21 +221,15 @@ export function Icon({
241
221
  icon,
242
222
  color = 'inherit',
243
223
  size = 'md',
244
- label,
245
224
  ref,
246
225
  ...props
247
226
  }) {
248
- // Derive ARIA from `label`: decorative (aria-hidden) by default, or a
249
- // meaningful image (role="img" + aria-label) when `label` is non-empty.
250
- const a11yProps = getIconA11yProps(label);
251
-
252
227
  // String mode: resolve from icon registry, wrap in styled span
253
228
  if (typeof icon === 'string') {
254
229
  return /*#__PURE__*/_jsx(IconFromRegistry, {
255
230
  name: icon,
256
231
  color: color,
257
232
  size: size,
258
- a11yProps: a11yProps,
259
233
  spanProps: props
260
234
  });
261
235
  }
@@ -263,12 +237,8 @@ export function Icon({
263
237
  // Component mode: render SVG component directly with ref forwarding
264
238
  const IconComponent = icon;
265
239
  return /*#__PURE__*/_jsx(IconComponent, {
266
- ref: ref
267
- // Derived a11y (decorative default or meaningful `label`) is spread
268
- // BEFORE {...props} so an explicit aria-hidden/role/aria-label from the
269
- // consumer still wins as an escape hatch.
270
- ,
271
- ...a11yProps,
240
+ ref: ref,
241
+ "aria-hidden": "true",
272
242
  ...mergeProps(themeProps('icon', {
273
243
  size,
274
244
  color
@@ -293,7 +263,6 @@ function IconFromRegistry({
293
263
  name,
294
264
  color,
295
265
  size,
296
- a11yProps,
297
266
  spanProps
298
267
  }) {
299
268
  const resolvedIcon = getIcon(name);
@@ -301,7 +270,11 @@ function IconFromRegistry({
301
270
  return null;
302
271
  }
303
272
  return /*#__PURE__*/_jsx("span", {
304
- ...a11yProps,
273
+ // Decorative by default, but placed BEFORE the prop spread so consumers
274
+ // can override it (e.g. `aria-hidden={false}` + `role="img"` +
275
+ // `aria-label`) to expose a meaningful standalone icon. This matches
276
+ // component-mode Icon, which already sets aria-hidden before its spread.
277
+ "aria-hidden": "true",
305
278
  ...spanProps,
306
279
  ...mergeProps(themeProps('icon', {
307
280
  size,
@@ -1 +1 @@
1
- {"version":3,"file":"TreeListItem.d.ts","sourceRoot":"","sources":["../../src/TreeList/TreeListItem.tsx"],"names":[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AChB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB;AAMD,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,KAAK,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,OAAO,EACP,IAAI,EACJ,MAAM,EACN,UAAkB,EAClB,UAAkB,EAClB,WAAW,EACX,WAAW,EACX,MAAM,EACN,eAAe,EACf,UAAU,EACV,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,UAAU,GACX,EAAE,yBAAyB,+BA+L3B;yBArNe,YAAY"}
@@ -21,6 +21,8 @@ import { getIcon } from "../Icon/globalIconRegistry.js";
21
21
  import { mergeProps } from "../utils/index.js";
22
22
  import { useLinkComponent } from "../Link/useLinkComponent.js";
23
23
  import { TreeListBranches } from "./TreeListBranches.js";
24
+ import "./treeListItem.markers.stylex.js";
25
+ import { treeItemScope } from "./treeListItem.markers.stylex.js";
24
26
  import { themeProps } from "../utils/themeProps.js";
25
27
  import { useTranslator } from "../i18n/index.js";
26
28
 
@@ -29,6 +31,15 @@ import { useTranslator } from "../i18n/index.js";
29
31
  // =============================================================================
30
32
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
31
33
  const styles = {
34
+ wrapper: {
35
+ kH6xsr: "x3ct3a4",
36
+ kogj98: "x1ghz6dp",
37
+ kmVPX3: "x1717udv",
38
+ kVAEAm: "x1n2onr6",
39
+ kzqmXN: "xh8yej3",
40
+ kI3sdo: "x1a2a7pz",
41
+ $$css: true
42
+ },
32
43
  contentWrapper: {
33
44
  kaIpWk: "xh6dtrn",
34
45
  k1xSpc: "x78zum5",
@@ -51,8 +62,8 @@ const styles = {
51
62
  $$css: true
52
63
  },
53
64
  focusVisibleOutline: {
54
- kI3sdo: "x11h0toi x1irc7jg",
55
- kInvED: "x1g710d4 xdjuwb3",
65
+ kI3sdo: "x1a2a7pz xr21g96 x1irc7jg",
66
+ kInvED: "x1wfwxd8 xs4y3kv xdjuwb3",
56
67
  $$css: true
57
68
  },
58
69
  disabled: {
@@ -288,9 +299,7 @@ export function TreeListItem({
288
299
  "data-tree-id": id,
289
300
  "data-tree-level": nestedLevel + 1,
290
301
  "data-tree-disabled": isDisabled || undefined,
291
- ...{
292
- className: "x3ct3a4 x1ghz6dp x1717udv x1n2onr6 xh8yej3 x1a2a7pz x1hb5tod xtoutpx x1f8er9e x1aefuf3"
293
- },
302
+ ...stylex.props(styles.wrapper, treeItemScope),
294
303
  children: [/*#__PURE__*/_jsx("div", {
295
304
  ...{
296
305
  className: "x12gdq22"
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @file treeListItem.markers.stylex.ts
3
+ * @input Uses StyleX defineMarker
4
+ * @output Exports treeItemScope marker
5
+ * @position Scoped marker; consumed by TreeListItem.tsx
6
+ *
7
+ * SYNC: When modified, update /packages/core/src/TreeList/TreeListItem.tsx
8
+ */
9
+ import * as stylex from '@stylexjs/stylex';
10
+ /**
11
+ * Scoped marker placed on each treeitem row (`<li role="treeitem">`).
12
+ * Binds the row's `:focus-visible` outline to its OWN treeitem, so focusing
13
+ * a parent treeitem does not leak the focus ring onto descendant rows.
14
+ */
15
+ export declare const treeItemScope: ReturnType<typeof stylex.defineMarker>;
16
+ //# sourceMappingURL=treeListItem.markers.stylex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treeListItem.markers.stylex.d.ts","sourceRoot":"","sources":["../../src/TreeList/treeListItem.markers.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,YAAY,CAC1C,CAAC"}
@@ -0,0 +1,22 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file treeListItem.markers.stylex.ts
5
+ * @input Uses StyleX defineMarker
6
+ * @output Exports treeItemScope marker
7
+ * @position Scoped marker; consumed by TreeListItem.tsx
8
+ *
9
+ * SYNC: When modified, update /packages/core/src/TreeList/TreeListItem.tsx
10
+ */
11
+
12
+ import * as stylex from '@stylexjs/stylex';
13
+
14
+ /**
15
+ * Scoped marker placed on each treeitem row (`<li role="treeitem">`).
16
+ * Binds the row's `:focus-visible` outline to its OWN treeitem, so focusing
17
+ * a parent treeitem does not leak the focus ring onto descendant rows.
18
+ */
19
+ export const treeItemScope = {
20
+ x1g2q90y: "x1g2q90y",
21
+ $$css: true
22
+ };
package/dist/astryx.css CHANGED
@@ -75,8 +75,6 @@
75
75
  .x9icjy1{--_segmented-control-radius:var(--radius-element)}
76
76
  .xficto1{--_tab-indicator-bottom:calc(-1 * (var(--spacing-1) + var(--border-width)))}
77
77
  .xbrl7fg{--_tab-indicator-bottom:var(--x---_tab-indicator-bottom)}
78
- .x1f8er9e{--_tree-focus-outline-offset:0}
79
- .x1hb5tod{--_tree-focus-outline:none}
80
78
  .xnvcwyz{--astryx-section-padding:var(--spacing-0-5)}
81
79
  .xvdw317{--astryx-section-padding:var(--spacing-0)}
82
80
  .x1rj2uvf{--astryx-section-padding:var(--spacing-1-5)}
@@ -254,8 +252,6 @@
254
252
  .x1t5kicu{--layout-padding-outer-y:var(--spacing-9)}
255
253
  .xnpej1e{--radius-element:var(--radius-full)}
256
254
  .xkce8z9{--separator-display:flex}
257
- .x1aefuf3:focus-visible{--_tree-focus-outline-offset:2px}
258
- .xtoutpx:focus-visible{--_tree-focus-outline:2px solid var(--color-accent)}
259
255
  .x11woleg:focus-visible{--indicator-color:var(--color-accent)}
260
256
  .x1ibt0lz:first-child{--separator-display:none}
261
257
  .x1rht92:nth-child(even){--table-row-overlay:var(--color-background-muted)}
@@ -371,7 +367,6 @@
371
367
  .xhrcg97:not(#\#):not(#\#){margin-inline:var(--spacing-1)}
372
368
  .xvlecxo:not(#\#):not(#\#){margin-inline:var(--x-marginInline)}
373
369
  .x1a2a7pz:not(#\#):not(#\#){outline:none}
374
- .x11h0toi:not(#\#):not(#\#){outline:var(--_tree-focus-outline,none)}
375
370
  .xysyzu8:not(#\#):not(#\#){overflow:auto}
376
371
  .x7giv3:not(#\#):not(#\#){overflow:clip}
377
372
  .xb3r6kr:not(#\#):not(#\#){overflow:hidden}
@@ -422,6 +417,7 @@
422
417
  .xq2gx43:not(#\#):not(#\#){transition:none}
423
418
  .x1ey1afo:not(#\#):not(#\#){transition:opacity var(--duration-fast)}
424
419
  .x1ob6yzd:not(#\#):not(#\#){transition:transform var(--duration-fast) var(--ease-standard)}
420
+ .xr21g96.xr21g96:where(.x1g2q90y:focus-visible *):not(#\#):not(#\#){outline:2px solid var(--color-accent)}
425
421
  .x6q1khz:focus-within:not(#\#):not(#\#){border-color:var(--color-accent)}
426
422
  .xk2sxw7:focus-within:not(#\#):not(#\#){border-color:var(--color-error)}
427
423
  .xyq33ac:focus-within:not(#\#):not(#\#){border-color:var(--color-success)}
@@ -856,7 +852,6 @@
856
852
  .x1wfwxd8:not(#\#):not(#\#):not(#\#){outline-offset:0}
857
853
  .x1y3gkto:not(#\#):not(#\#):not(#\#){outline-offset:1px}
858
854
  .x1hl8ikr:not(#\#):not(#\#):not(#\#){outline-offset:2px}
859
- .x1g710d4:not(#\#):not(#\#):not(#\#){outline-offset:var(--_tree-focus-outline-offset,0)}
860
855
  .x9y5y3v:not(#\#):not(#\#):not(#\#){overflow-clip-margin:1px}
861
856
  .x1mzt3pk:not(#\#):not(#\#):not(#\#){overflow-wrap:break-word}
862
857
  .x1h4wwuj:not(#\#):not(#\#):not(#\#){overflow-wrap:normal}
@@ -1045,6 +1040,7 @@
1045
1040
  .x6cuj84:not(#\#):not(#\#):not(#\#){z-index:500}
1046
1041
  .x1q2oy4v:not(#\#):not(#\#):not(#\#){z-index:9999}
1047
1042
  .x1v2claj.x1v2claj:where(.x84s7jz:focus-within *):not(#\#):not(#\#):not(#\#){opacity:1}
1043
+ .xs4y3kv.xs4y3kv:where(.x1g2q90y:focus-visible *):not(#\#):not(#\#):not(#\#){outline-offset:2px}
1048
1044
  .x3730vf.x3730vf:where(.x84s7jz:focus-within *):not(#\#):not(#\#):not(#\#){pointer-events:auto}
1049
1045
  .xuqivmr.xuqivmr:where(.x84s7jz:focus-within *):not(#\#):not(#\#):not(#\#){transform:translateY(0)}
1050
1046
  .x7v6acp.x7v6acp:where(.x84s7jz:focus-within *):not(#\#):not(#\#):not(#\#){visibility:visible}