@astryxdesign/core 0.7.9-canary.cb2a34a → 0.7.9-canary.d0cf29a

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.
Files changed (44) hide show
  1. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  2. package/dist/MobileNav/MobileNav.js +5 -0
  3. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  4. package/dist/PowerSearch/PowerSearch.js +6 -1
  5. package/dist/Switch/Switch.d.ts.map +1 -1
  6. package/dist/Switch/Switch.js +13 -10
  7. package/dist/Tokenizer/Tokenizer.d.ts +14 -10
  8. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  9. package/dist/Tokenizer/Tokenizer.js +189 -89
  10. package/dist/astryx.css +9 -9
  11. package/dist/motion/uikit/timing.d.ts +14 -10
  12. package/dist/motion/uikit/timing.d.ts.map +1 -1
  13. package/dist/motion/uikit/timing.js +7 -5
  14. package/dist/privateAttributes/press.stylex.d.ts +2 -2
  15. package/dist/privateAttributes/press.stylex.d.ts.map +1 -1
  16. package/dist/privateAttributes/press.stylex.js +12 -13
  17. package/dist/theme/themeMotion.d.ts +3 -2
  18. package/dist/theme/themeMotion.d.ts.map +1 -1
  19. package/dist/theme/themeMotion.js +3 -2
  20. package/dist/utils/interactionOverlay.stylex.d.ts +3 -8
  21. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  22. package/dist/utils/interactionOverlay.stylex.js +27 -34
  23. package/dist/utils/pressFeedback.d.ts +3 -2
  24. package/dist/utils/pressFeedback.d.ts.map +1 -1
  25. package/dist/utils/pressFeedback.js +8 -8
  26. package/dist/utils/pressGesture.d.ts +6 -6
  27. package/dist/utils/pressGesture.d.ts.map +1 -1
  28. package/dist/utils/pressGesture.js +9 -8
  29. package/package.json +4 -4
  30. package/src/MobileNav/MobileNav.tsx +5 -0
  31. package/src/PowerSearch/PowerSearch.tsx +14 -1
  32. package/src/Switch/Switch.tsx +7 -6
  33. package/src/Tokenizer/Tokenizer.doc.mjs +3 -3
  34. package/src/Tokenizer/Tokenizer.tsx +252 -115
  35. package/src/motion/uikit/timing.ts +7 -5
  36. package/src/privateAttributes/press.stylex.ts +9 -10
  37. package/src/theme/themeMotion.ts +3 -2
  38. package/src/utils/interactionOverlay.stylex.ts +17 -25
  39. package/src/utils/pressFeedback.ts +15 -8
  40. package/src/utils/pressGesture.ts +11 -8
  41. package/dist/utils/rowPressLayer.stylex.d.ts +0 -14
  42. package/dist/utils/rowPressLayer.stylex.d.ts.map +0 -1
  43. package/dist/utils/rowPressLayer.stylex.js +0 -25
  44. package/src/utils/rowPressLayer.stylex.ts +0 -27
@@ -1 +1 @@
1
- {"version":3,"file":"MobileNav.d.ts","sourceRoot":"","sources":["../../src/MobileNav/MobileNav.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAOL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAuBf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAyM5C;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,MAAM,CAAC;AAI/B;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkBpE;AA+DD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEp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;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAEhC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,SAAS,CAAC,EACxB,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,EACR,MAAM,EACN,KAAW,EACX,IAAa,EACb,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO,EAAE,WAAW,EACpB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,cAAc,+BAgShB;yBA/Se,SAAS"}
@@ -63,6 +63,7 @@ import { useLayerDismissal } from "../Layer/useLayerDismissal.js";
63
63
  import { themeProps } from "../utils/themeProps.js";
64
64
  import { useMergedRefs } from "../hooks/useMergedRefs.js";
65
65
  import { useScrollLock } from "../hooks/useScrollLock.js";
66
+ import { useFocusRegionContainment } from "../hooks/useFocusTrap.js";
66
67
  import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
67
68
  import english from "../i18n/generated-english/MobileNav/MobileNav.generated.js";
68
69
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -328,6 +329,10 @@ export function MobileNav({
328
329
  }
329
330
  }), [onOpenChangeProp, appShellMobile]);
330
331
  const dialogRef = useRef(null);
332
+ // Native showModal() lets Tab leave for the browser's own UI, so the shared
333
+ // module wraps it. A closing drawer stops containing as soon as it starts to
334
+ // slide out.
335
+ useFocusRegionContainment(dialogRef, isOpen);
331
336
  const drawerRef = useRef(null);
332
337
  const closeTimeoutRef = useRef(null);
333
338
  // The input hold on the drawer's layer while it slides in under a coarse
@@ -1 +1 @@
1
- {"version":3,"file":"PowerSearch.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAUZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAC;AAStB,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAY1C,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AA2B1C,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAIjB,qBAAqB,EACrB,iBAAiB,EAGjB,qBAAqB,EAEtB,MAAM,SAAS,CAAC;AAQjB,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAyMxE,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,SAAS,CAAC,WAAW,CAAC,EACtB,UAAU,CACX;IACC,yEAAyE;IACzE,MAAM,EAAE,iBAAiB,CAAC;IAC1B,gCAAgC;IAChC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC1C,kCAAkC;IAClC,QAAQ,EAAE,CACR,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,EACzC,UAAU,EAAE,qBAA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B;;;OAGG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC;CACxC;AAED,oFAAoF;AACpF,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAoC3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EAAE,UAAU,EAClB,OAAO,EACP,QAAQ,EACR,KAAK,EAAE,cAAc,EACrB,aAAoB,EACpB,WAAW,EAAE,oBAAoB,EACjC,YAAoB,EACpB,QAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,aAA0B,EAC1B,SAAS,EACT,cAAmB,EACnB,oBAAoB,EACpB,gBAA6C,EAC7C,sBAAsB,EAAE,+BAA+B,EACvD,UAAU,EACV,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,GAAG,EACH,SAAS,EACT,IAAI,EAAE,QAAQ,EACd,aAAa,EAAE,MAAM,EACrB,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EAAE,kBAAkB,EAC9B,YAAyB,GAC1B,EAAE,gBAAgB,qBAuiClB;yBA1kCe,WAAW"}
@@ -1032,7 +1032,12 @@ export function PowerSearch({
1032
1032
  className: "xjyslct xfoc8du xkh2ocl x78zum5 x6s0dn4 xt970qd x7a5moj x1ghz6dp xc342km xng3xce xjbqb8w xv1l7n4 x9ynric xjm74w1 xw6l6zx x1yc453h xuxw1ft x1ypdohk xvivl9a x1a2a7pz x10l6tqk x10a8y8t xeuugli x1717udv"
1033
1033
  }
1034
1034
  }[!!(filters.length > 0) << 0],
1035
- children: filters.length === 0 ? placeholder : null
1035
+ children: filters.length === 0 ? /*#__PURE__*/_jsx("span", {
1036
+ ...{
1037
+ className: "xeuugli xb3r6kr xlyipyv xuxw1ft"
1038
+ },
1039
+ children: placeholder
1040
+ }) : null
1036
1041
  })]
1037
1042
  }), (endContent || isRenderable(resultCountText)) && /*#__PURE__*/_jsxs("div", {
1038
1043
  ref: endLaneRef,
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/Switch/Switch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAef,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAKhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAgnB9C,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,KAAK,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAElD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACxE;;OAEG;IACH,YAAY,CAAC,EAAE,CACb,OAAO,EAAE,OAAO,EAChB,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAC7B,IAAI,GAA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,OAAO,EACP,MAAM,EACN,SAAS,EACT,YAAY,EACZ,aAAqB,EACrB,YAAoB,EACpB,MAAM,EACN,IAAW,EACX,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,kBAAkB,EAAE,mBAAmB,EACvC,iBAAiB,EAAE,kBAAkB,EACrC,GAAG,IAAI,EACR,EAAE,WAAW,+BA4Rb;yBAzTe,MAAM"}
@@ -33,8 +33,10 @@ import { usePressFeedback } from "../hooks/usePressFeedback.js";
33
33
  import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
34
34
  import english from "../i18n/generated-english/Switch/Switch.generated.js";
35
35
  registerEnglishFallback(english);
36
+ import "../motion/reducedMotion.stylex.js";
37
+ import { reducedMotionFadeConsts } from "../motion/reducedMotion.stylex.js";
36
38
  import "../utils/interactionOverlay.stylex.js";
37
- import { interactionOverlayStyles, pressConsts, pressVars } from "../utils/interactionOverlay.stylex.js";
39
+ import { interactionOverlayStyles, pressVars } from "../utils/interactionOverlay.stylex.js";
38
40
  import { pressHoldsDragProps } from "../privateAttributes/pressHoldsDrag.stylex.js";
39
41
  import { useSwitchTouch } from "./useSwitchTouch.js";
40
42
  import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
@@ -65,14 +67,15 @@ const PRESS_FADING = '[data-astryx-press="fading"]';
65
67
 
66
68
  /**
67
69
  * The shared press release, for the press layers the switch fades on the
68
- * compositor. The clock scales by the theme's tempo, and the curve is the
69
- * controller's own. Switch.test.tsx compares the two.
70
+ * compositor: the theme's exit motion tokens, no longer than the Reduce
71
+ * Motion fade under Reduce Motion. Switch.test.tsx compares them with
72
+ * the overlay's.
70
73
  * SYNC: utils/interactionOverlay.stylex.ts PRESS_RELEASE_DURATION,
71
74
  * PRESS_RELEASE_DURATION_REDUCED and RELEASE_EASE.
72
75
  */
73
- const PRESS_RELEASE_DURATION = `calc(${pressConsts.releaseMs}ms * min(var(--_astryx-motion-tempo, 1), 1.5))`;
74
- const PRESS_RELEASE_DURATION_REDUCED = `min(${pressConsts.releaseMs}ms, calc(${pressConsts.releaseMs}ms * var(--_astryx-motion-tempo, 1)))`;
75
- const PRESS_RELEASE_EASE = 'cubic-bezier(0, 0, 0.2, 1)';
76
+ const PRESS_RELEASE_DURATION = durationVars['--duration-exit'];
77
+ const PRESS_RELEASE_DURATION_REDUCED = `min(${durationVars['--duration-exit']}, ${reducedMotionFadeConsts.duration})`;
78
+ const PRESS_RELEASE_EASE = easeVars['--ease-exit'];
76
79
 
77
80
  // The measured hit insets (utils/hitArea), 0 until measured.
78
81
  const HIT_TOP = 'var(--astryx-hit-inset-top, 0px)';
@@ -262,8 +265,8 @@ const styles = {
262
265
  kLkRvE: "x1my3e5g",
263
266
  k5QlbN: "x2huugr x1ccaw7f",
264
267
  k7EzDT: "xxhzo2e",
265
- kQZAMR: "xvym4rz xigdn9b",
266
- kZiNAr: "xgq6fxe",
268
+ kQZAMR: "xs8z9ty x1e7l4zx",
269
+ kZiNAr: "x15baseh",
267
270
  k8Tatv: "xq2jpp1",
268
271
  k5JduY: "x1s928wv",
269
272
  kc3QkE: "x1h1zc6f x1ep27e9",
@@ -320,8 +323,8 @@ const styles = {
320
323
  kLkRvE: "x1my3e5g",
321
324
  k5QlbN: "x2huugr x1ccaw7f",
322
325
  k7EzDT: "xxhzo2e",
323
- kQZAMR: "xvym4rz xigdn9b",
324
- kZiNAr: "xgq6fxe",
326
+ kQZAMR: "xs8z9ty x1e7l4zx",
327
+ kZiNAr: "x15baseh",
325
328
  k8Tatv: "xq2jpp1",
326
329
  k5JduY: "x1s928wv",
327
330
  kc3QkE: "x1h1zc6f x1ep27e9",
@@ -4,8 +4,8 @@
4
4
  * useAdaptivePresentation, and TokenizerBottomSheet (lazy)
5
5
  * @output Exports Tokenizer multi-select typeahead component
6
6
  * @position Composed component; forwards DOM ref and exposes focus control via
7
- * handleRef. The `presentation` prop swaps the inline combobox for a
8
- * trigger that opens TokenizerBottomSheet.
7
+ * handleRef. The `presentation` prop swaps the inline combobox for a field
8
+ * box whose trigger opens TokenizerBottomSheet.
9
9
  *
10
10
  * SYNC: When modified, update:
11
11
  * - /packages/core/src/Tokenizer/index.ts
@@ -207,8 +207,8 @@ export interface TokenizerProps<T extends SearchableItem> extends Omit<FieldInpu
207
207
  * How the field presents its choices.
208
208
  * - `'popover'`: the inline combobox with its anchored suggestion menu, on
209
209
  * every device.
210
- * - `'bottom-sheet'`: a trigger showing the selected tokens that opens one
211
- * tall modal sheet: a search row on top, full-width checkbox rows that
210
+ * - `'bottom-sheet'`: a field showing the selected tokens, whose trigger
211
+ * opens one tall modal sheet: a search row on top, full-width checkbox rows that
212
212
  * keep their place while the sheet is open, a create row with
213
213
  * `hasCreate`, and a footer pinned in every state with a confirmed Clear
214
214
  * all and Save. The sheet edits a draft: `onChange` fires once, when Save
@@ -219,12 +219,16 @@ export interface TokenizerProps<T extends SearchableItem> extends Omit<FieldInpu
219
219
  * otherwise the popover — the same resolution Selector uses. The server
220
220
  * render and the hydrating render are the popover.
221
221
  *
222
- * In the sheet presentation the trigger is the control: `ref`, `id`,
223
- * `aria-*`, and `data-*` reach it. `renderItem`, `renderToken`,
224
- * `endContent`, `hasClear`, `hasEntriesOnFocus`, `menuWidth`,
225
- * `tokenOverflowBehavior`, and `hasAutoFocus` have no surface to act on
226
- * and warn once in development. Pass `'popover'` to keep the inline field
227
- * and those props on every device.
222
+ * In the sheet presentation the field's box keeps the inline field's box,
223
+ * theming target and focus ring, and holds the trigger, the tokens and
224
+ * `endContent`. The trigger is the control: `ref`, `id`, `aria-*`, and
225
+ * `data-*` reach it. `endContent` renders at the field's
226
+ * inline end and `renderToken` renders the field's tokens, as in the inline
227
+ * field. `renderItem`, `hasClear` (the sheet has its own Clear all),
228
+ * `hasEntriesOnFocus`, `menuWidth`, `tokenOverflowBehavior` (the field
229
+ * wraps its tokens), and `hasAutoFocus` have no surface to act on and warn
230
+ * once in development. Pass `'popover'` to keep the inline field and those
231
+ * props on every device.
228
232
  * @default 'adaptive'
229
233
  */
230
234
  presentation?: TokenizerPresentation;
@@ -1 +1 @@
1
- {"version":3,"file":"Tokenizer.d.ts","sourceRoot":"","sources":["../../src/Tokenizer/Tokenizer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAYZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAI1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAWtD,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EACb,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAWxE,YAAY,EACV,WAAW,IAAI,eAAe,EAC9B,eAAe,IAAI,mBAAmB,GACvC,MAAM,UAAU,CAAC;AAMlB;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,cAAc,IAChD;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAC,GACtB;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAC,GACzB;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAC,GACzB;IAAC,IAAI,EAAE,SAAS,CAAA;CAAC,CAAC;AAEtB,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GACnC,MAAM,GAAG,iBAAiB,GAAG,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c,CAAC,CAAC,CAAC,EACjB,KAAK,CACN,GAAG;IACF;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,CAAC;CACvD,CAAC;AAmZF,wBAAgB,SAAS,CAAC,CAAC,SAAS,cAAc,EAChD,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAC/B,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;AACrB,wBAAgB,SAAS,CAAC,CAAC,SAAS,cAAc,EAChD,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GACvB,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;yBAFL,SAAS"}
@@ -8,8 +8,8 @@
8
8
  * useAdaptivePresentation, and TokenizerBottomSheet (lazy)
9
9
  * @output Exports Tokenizer multi-select typeahead component
10
10
  * @position Composed component; forwards DOM ref and exposes focus control via
11
- * handleRef. The `presentation` prop swaps the inline combobox for a
12
- * trigger that opens TokenizerBottomSheet.
11
+ * handleRef. The `presentation` prop swaps the inline combobox for a field
12
+ * box whose trigger opens TokenizerBottomSheet.
13
13
  *
14
14
  * SYNC: When modified, update:
15
15
  * - /packages/core/src/Tokenizer/index.ts
@@ -25,6 +25,7 @@ import { CommittedChoicesKeyContext } from "../Typeahead/committedChoicesKey.js"
25
25
  import { useFieldInputStyling } from "../Field/fieldParts.js";
26
26
  import { inputDisabledFocusStyles } from "../Field/inputDisabledFocus.js";
27
27
  import { useMergedRefs } from "../hooks/useMergedRefs.js";
28
+ import { hasInteractiveAncestor } from "../hooks/useClickableContainer.js";
28
29
  import { TokenizerClearAllMessageContext } from "./TokenizerClearAllMessageContext.js";
29
30
  import { TokenizerItemRemovableContext } from "./TokenizerItemRemovableContext.js";
30
31
  import { useBusyAnnouncement } from "../hooks/useBusyAnnouncement.js";
@@ -167,14 +168,39 @@ const styles = {
167
168
  kzqmXN: "x1xgy17j",
168
169
  $$css: true
169
170
  },
170
- sheetTrigger: {
171
+ sheetField: {
171
172
  kzqmXN: "xh8yej3",
173
+ kkrTdU: "x1ypdohk x16khyan",
174
+ $$css: true
175
+ },
176
+ sheetFieldDisabled: {
177
+ kkrTdU: "xt0e3qv",
178
+ $$css: true
179
+ },
180
+ sheetTrigger: {
181
+ kysU6D: "xjyslct",
182
+ kzQI83: "x1iyjqo2",
183
+ kSGwAc: "xkh2ocl",
184
+ k1xSpc: "x78zum5",
185
+ kGNEyG: "x6s0dn4",
186
+ k7Eaqz: "xeuugli",
187
+ kmVPX3: "x1717udv",
188
+ kogj98: "x1ghz6dp",
189
+ kMzoRj: "xc342km",
190
+ ksu8eU: "xng3xce",
191
+ kWkggS: "xjbqb8w",
172
192
  kMv6JI: "xjb2p0i",
173
193
  kGuDYH: "x1qlqyl8",
194
+ kLWn49: "x15bjb6t",
174
195
  kMwMTN: "x1heor9g",
175
196
  k9WMMc: "x1yc453h",
176
- kysU6D: "xjyslct",
177
197
  kkrTdU: "x1ypdohk x16khyan",
198
+ kI3sdo: "x1a2a7pz",
199
+ $$css: true
200
+ },
201
+ sheetTriggerWithTokens: {
202
+ kVAEAm: "x10l6tqk",
203
+ kpwlN0: "x10a8y8t",
178
204
  $$css: true
179
205
  },
180
206
  sheetTriggerDisabled: {
@@ -554,7 +580,7 @@ export function Tokenizer({
554
580
  // Props that describe the inline combobox have no surface in the sheet
555
581
  // presentation. Say so once in development rather than dropping them
556
582
  // silently (`architecture:public-component-api` INV3).
557
- const inertSheetProps = isSheetPresentation ? [['renderItem', renderItem], ['renderToken', renderToken], ['endContent', endContent], ['hasClear', hasClear || undefined], ['hasEntriesOnFocus', hasEntriesOnFocus || undefined], ['menuWidth', menuWidth], ['tokenOverflowBehavior', tokenOverflowBehavior], ['hasAutoFocus', hasAutoFocus || undefined]].filter(([, v]) => v !== undefined && v !== 'none').map(([name]) => name) : [];
583
+ const inertSheetProps = isSheetPresentation ? [['renderItem', renderItem], ['hasClear', hasClear || undefined], ['hasEntriesOnFocus', hasEntriesOnFocus || undefined], ['menuWidth', menuWidth], ['tokenOverflowBehavior', tokenOverflowBehavior], ['hasAutoFocus', hasAutoFocus || undefined]].filter(([, v]) => v !== undefined && v !== 'none').map(([name]) => name) : [];
558
584
  const inertSheetPropsKey = inertSheetProps.join(',');
559
585
  useEffect(() => {
560
586
  if (inertSheetPropsKey === '') {
@@ -615,9 +641,27 @@ export function Tokenizer({
615
641
  };
616
642
  }, [tooltipAnchorRef]);
617
643
 
644
+ // A swap also removes `endContent` and a custom token's remove. If focus is
645
+ // in the box when it detaches, the new control takes it. The box also anchors
646
+ // the disabled-message tooltip.
647
+ const sheetFieldCallbackRef = useCallback(el => {
648
+ tooltipAnchorRef(el);
649
+ if (el == null) {
650
+ return;
651
+ }
652
+ return () => {
653
+ if (el.contains(el.ownerDocument.activeElement)) {
654
+ isFocusPendingHandOffRef.current = true;
655
+ }
656
+ tooltipAnchorRef(null);
657
+ };
658
+ }, [tooltipAnchorRef]);
659
+
618
660
  // The sheet presentation has no input; the public ref reaches the trigger,
619
- // the control it stands for (`family:input-fields` FR10).
620
- const triggerMergedRef = useMergedRefs(triggerRef, ref, disabledMessageTooltip.ref, handOffFocusRef);
661
+ // the control it stands for (`family:input-fields` FR10). The
662
+ // disabled-message tooltip anchors to the field box around it, as it
663
+ // anchors to the inline field's wrapper.
664
+ const triggerMergedRef = useMergedRefs(triggerRef, ref, handOffFocusRef);
621
665
  useImperativeHandle(handleRef, () => ({
622
666
  focus() {
623
667
  (isSheetPresentation ? triggerRef : inputRef).current?.focus();
@@ -639,6 +683,11 @@ export function Tokenizer({
639
683
  // `endContent`, a clear button, or all three — so its width is measured
640
684
  // rather than assumed, and the input reserves it.
641
685
  const [laneRef, laneReserve] = useEndLaneReserve(END_LANE_INSET);
686
+ // `laneRef` publishes the lane's width, so token rows and the placeholder
687
+ // stop short of it. `sheetLaneRef` tells a tap in the lane from a tap on the
688
+ // field.
689
+ const sheetLaneRef = useRef(null);
690
+ const sheetLaneMergedRef = useMergedRefs(laneRef, sheetLaneRef);
642
691
  // A composing component can lock tokens (PowerSearch's read-only filters
643
692
  // and read-only field). No remove path removes a locked token.
644
693
  const isItemRemovable = use(TokenizerItemRemovableContext);
@@ -1070,83 +1119,80 @@ export function Tokenizer({
1070
1119
  })]
1071
1120
  })]
1072
1121
  });
1122
+
1123
+ // A `renderToken` token's own remove control in the sheet field removes at
1124
+ // once, as it does in the inline field. Its control leaves with it, so
1125
+ // focus moves to the trigger.
1126
+ const handleSheetTokenRemove = item => {
1127
+ if (handleRemove(item)) {
1128
+ triggerRef.current?.focus();
1129
+ }
1130
+ };
1131
+ // A tap on a token, the placeholder or empty space opens the sheet, as a tap
1132
+ // on the trigger does. The trigger, `endContent` and a custom token's
1133
+ // controls handle their own clicks.
1134
+ const handleSheetFieldClick = event => {
1135
+ const trigger = triggerRef.current;
1136
+ const target = event.target;
1137
+ if (trigger == null || !(target instanceof Element)) {
1138
+ return;
1139
+ }
1140
+ if (trigger.contains(target) || sheetLaneRef.current?.contains(target) || hasInteractiveAncestor(target, event.currentTarget)) {
1141
+ return;
1142
+ }
1143
+ trigger.click();
1144
+ };
1145
+
1146
+ // The caller's onFocus and onBlur report focus entering and leaving the whole
1147
+ // box, as for the inline wrapper. A move between the trigger, `endContent`
1148
+ // and a custom token's controls stays inside the field.
1149
+ const handleSheetFieldFocus = event => {
1150
+ // BottomSheet focuses the trigger only after its exit completes; that
1151
+ // focus is the signal that the retained sheet can leave. If the
1152
+ // resolution moved to the popover meanwhile, the inline input takes the
1153
+ // focus over once it mounts.
1154
+ const isReturningFromSheet = event.target === triggerRef.current && !isSheetOpen && isSheetPresented;
1155
+ if (isReturningFromSheet) {
1156
+ setIsSheetPresented(false);
1157
+ }
1158
+ const relatedTarget = event.relatedTarget;
1159
+ if (relatedTarget instanceof Node && event.currentTarget.contains(relatedTarget)) {
1160
+ return;
1161
+ }
1162
+ // Focus that returns from the field's own sheet, or that a presentation swap
1163
+ // hands over, does not enter from outside. The caller's onFocus stays quiet
1164
+ // for it (`family:input-fields` FR10).
1165
+ const isInsideTheField = isReturningFromSheet && hasReportedFocusRef.current || isHandingOffFocusRef.current;
1166
+ if (!isInsideTheField) {
1167
+ hasReportedFocusRef.current = true;
1168
+ onFocus?.(event);
1169
+ }
1170
+ };
1171
+ const handleSheetFieldBlur = event => {
1172
+ // Focus moving into the sheet, or to another control in the box, is
1173
+ // still the field's. Only a blur to somewhere else reports.
1174
+ const relatedTarget = event.relatedTarget;
1175
+ if (isSheetOpen || relatedTarget instanceof Node && event.currentTarget.contains(relatedTarget)) {
1176
+ return;
1177
+ }
1178
+ hasReportedFocusRef.current = false;
1179
+ isFocusPendingHandOffRef.current = false;
1180
+ onBlur?.(event);
1181
+ };
1073
1182
  let tokenizerContent;
1074
1183
  if (isSheetPresentation) {
1075
1184
  tokenizerContent = /*#__PURE__*/_jsxs(_Fragment, {
1076
- children: [/*#__PURE__*/_jsxs("button", {
1077
- ...restWithoutClick,
1078
- ref: triggerMergedRef,
1079
- type: "button",
1080
- id: inputId,
1081
- "aria-labelledby": fieldLabelledBy,
1082
- "aria-haspopup": "dialog",
1083
- "aria-expanded": isSheetOpen,
1084
- "aria-disabled": isDisabled || undefined
1085
- // The description is what the inline input's is, in its order —
1086
- // the caller's ids, the field description, the status message, the
1087
- // disabled reason (`spec:AST-085` FR5: a disabled control exposes
1088
- // its description and reason on itself) — then the hidden count and
1089
- // the rendered tokens themselves, each by id: the
1090
- // accessible-description algorithm reads the referenced elements in
1091
- // order and separates them, so every label renders once
1092
- // (`architecture:component-style-authoring` INV7) and no locale's
1093
- // list punctuation is written here (AR6).
1094
- ,
1095
- "aria-describedby": [ariaDescribedByProp, ariaDescribedBy, value.length > 0 ? triggerTokensId : null, ...value.map(item => tokenElementId(item.id))].filter(Boolean).join(' ') || undefined
1096
- // The open runs first and the caller's onClick after it, as the
1097
- // inline input composes its click: a caller observes the click but
1098
- // cannot cancel the field's own handling
1099
- // (`family:input-fields` FR10).
1100
- ,
1101
- onClick: composeEventHandlers(() => {
1102
- if (isDisabled) {
1103
- return;
1104
- }
1105
- setIsSheetPresented(true);
1106
- setSheetInitialQuery(sheetQueryRef.current);
1107
- setIsSheetOpen(true);
1108
- },
1109
- // Typed for the input by the base props; here the control is the
1110
- // trigger button, and the handler only reads the event.
1111
- callerOnClick),
1112
- onFocus: event => {
1113
- // BottomSheet focuses the trigger only after its exit completes;
1114
- // that focus is the signal that the retained sheet can leave. If
1115
- // the resolution moved to the popover meanwhile, the inline input
1116
- // takes the focus over once it mounts. The field's own sheet is
1117
- // part of the field: focus coming back from it, or handed over by
1118
- // a presentation swap, is not focus entering from outside, so the
1119
- // caller's onFocus — "when focus enters the tokenizer from
1120
- // outside" — stays quiet for it (`family:input-fields` FR10).
1121
- const isReturningFromSheet = !isSheetOpen && isSheetPresented;
1122
- if (isReturningFromSheet) {
1123
- setIsSheetPresented(false);
1124
- }
1125
- const isInsideTheField = isReturningFromSheet && hasReportedFocusRef.current || isHandingOffFocusRef.current;
1126
- if (!isInsideTheField) {
1127
- hasReportedFocusRef.current = true;
1128
- onFocus?.(event);
1129
- }
1130
- },
1131
- onBlur: event => {
1132
- // Focus moving into the sheet is still the field's: the flag
1133
- // stays, and the caller's onBlur — "when focus leaves the
1134
- // tokenizer entirely" — stays quiet. Only a blur to somewhere
1135
- // else reports.
1136
- if (isSheetOpen) {
1137
- return;
1138
- }
1139
- hasReportedFocusRef.current = false;
1140
- isFocusPendingHandOffRef.current = false;
1141
- onBlur?.(event);
1142
- },
1143
- onKeyDown: onKeyDown,
1185
+ children: [/*#__PURE__*/_jsxs("div", {
1186
+ ref: sheetFieldCallbackRef,
1187
+ onClick: handleSheetFieldClick,
1188
+ onFocus: handleSheetFieldFocus,
1189
+ onBlur: handleSheetFieldBlur,
1144
1190
  ...mergeProps(themeProps('tokenizer', {
1145
1191
  size,
1146
1192
  status: status?.type,
1147
1193
  disabled: isDisabled ? 'disabled' : null
1148
- }), stylex.props(inputWrapperStyles.base, styles.wrapper, styles.sheetTrigger,
1149
- // The trigger keeps the inline field's height for its size step,
1194
+ }), stylex.props(inputWrapperStyles.base, styles.wrapper, styles.sheetField, isDisabled && styles.sheetFieldDisabled,
1195
+ // The field keeps the inline field's height for its size step,
1150
1196
  // as Selector's bottom-sheet trigger does; the sheet's own rows
1151
1197
  // and search field carry the touch-sized targets.
1152
1198
  sizeStyles[size], value.length > 0 && styles.wrapperWithTokens, isDisabled && inputWrapperStyles.disabled, isDisabled && styles.sheetTriggerDisabled, status && inputStatusBorderStyles[status.type], status && !isDisabled && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], controlXstyle), controlClassName, controlStyle),
@@ -1161,29 +1207,83 @@ export function Tokenizer({
1161
1207
  size: 'sm',
1162
1208
  color: 'secondary'
1163
1209
  })
1164
- }), value.length > 0 ? value.map(item => /*#__PURE__*/_jsx(Token, {
1210
+ }), /*#__PURE__*/_jsx("button", {
1211
+ ...restWithoutClick,
1212
+ ref: triggerMergedRef,
1213
+ type: "button",
1214
+ id: inputId,
1215
+ "aria-labelledby": fieldLabelledBy,
1216
+ "aria-haspopup": "dialog",
1217
+ "aria-expanded": isSheetOpen,
1218
+ "aria-disabled": isDisabled || undefined
1219
+ // The description follows the inline input's order: the caller's
1220
+ // ids, the field description, the status message, then the
1221
+ // disabled reason (`spec:AST-085` FR5). The hidden count and the
1222
+ // token labels follow, each by id. The algorithm separates
1223
+ // referenced elements, so no list punctuation is written here
1224
+ // (AR6). A default token is display-only and is its own label. A
1225
+ // custom token can hold controls, so a hidden copy of its item
1226
+ // label stands in.
1227
+ ,
1228
+ "aria-describedby": [ariaDescribedByProp, ariaDescribedBy, value.length > 0 ? triggerTokensId : null, ...value.map(item => tokenElementId(item.id))].filter(Boolean).join(' ') || undefined
1229
+ // The open runs first and the caller's onClick after it, as the
1230
+ // inline input composes its click: a caller observes the click but
1231
+ // cannot cancel the field's own handling
1232
+ // (`family:input-fields` FR10).
1233
+ ,
1234
+ onClick: composeEventHandlers(() => {
1235
+ if (isDisabled) {
1236
+ return;
1237
+ }
1238
+ setIsSheetPresented(true);
1239
+ setSheetInitialQuery(sheetQueryRef.current);
1240
+ setIsSheetOpen(true);
1241
+ },
1242
+ // Typed for the input by the base props; here the control is the
1243
+ // trigger button, and the handler only reads the event.
1244
+ callerOnClick),
1245
+ onKeyDown: onKeyDown,
1246
+ ...stylex.props(styles.sheetTrigger, value.length > 0 && styles.sheetTriggerWithTokens,
1247
+ // With no token the placeholder stops short of the end lane, as
1248
+ // the inline input's text does.
1249
+ value.length === 0 && laneReserve),
1250
+ children: value.length === 0 && /*#__PURE__*/_jsx("span", {
1251
+ ...{
1252
+ 0: {
1253
+ className: "xv1l7n4 x7a5moj"
1254
+ },
1255
+ 1: {
1256
+ className: "x7a5moj xv1l7n4 x1bhcspo"
1257
+ }
1258
+ }[!!isDisabled << 0],
1259
+ children: placeholder ?? ''
1260
+ })
1261
+ }), value.map(item => renderToken ? /*#__PURE__*/_jsx("span", {
1262
+ ...{
1263
+ className: "x78zum5 x2lah0s x193iq5w x1n2onr6 x1vjfegm"
1264
+ },
1265
+ children: renderToken(item, () => handleSheetTokenRemove(item))
1266
+ }, item.id) : /*#__PURE__*/_jsx(Token, {
1165
1267
  id: tokenElementId(item.id),
1166
1268
  label: item.label,
1167
1269
  size: size,
1168
1270
  isDisabled: isDisabled,
1169
1271
  xstyle: isDisabled ? styles.sheetTokenDisabled : undefined
1170
- }, item.id)) : /*#__PURE__*/_jsx("span", {
1171
- ...{
1172
- 0: {
1173
- className: "xv1l7n4 x7a5moj"
1174
- },
1175
- 1: {
1176
- className: "x7a5moj xv1l7n4 x1bhcspo"
1177
- }
1178
- }[!!isDisabled << 0],
1179
- children: placeholder ?? ''
1272
+ }, item.id)), isRenderable(endContent) && /*#__PURE__*/_jsx("div", {
1273
+ ref: sheetLaneMergedRef,
1274
+ ...stylex.props(styles.endSection, endSectionSizeStyles[size]),
1275
+ children: endContent
1180
1276
  })]
1181
1277
  }), value.length > 0 && /*#__PURE__*/_jsx(VisuallyHidden, {
1182
1278
  id: triggerTokensId,
1183
1279
  children: t('@astryx.tokenizer.selectedCount', {
1184
1280
  count: value.length
1185
1281
  })
1186
- }), htmlName != null && !isDisabled && value.map(item => /*#__PURE__*/_jsx("input", {
1282
+ }), renderToken != null && value.map(item => /*#__PURE__*/_jsx("span", {
1283
+ id: tokenElementId(item.id),
1284
+ hidden: true,
1285
+ children: item.label
1286
+ }, item.id)), htmlName != null && !isDisabled && value.map(item => /*#__PURE__*/_jsx("input", {
1187
1287
  type: "hidden",
1188
1288
  name: htmlName,
1189
1289
  value: item.id
package/dist/astryx.css CHANGED
@@ -2280,10 +2280,10 @@
2280
2280
  @media (max-width: 640px){.xci7e5a.xci7e5a:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--x-fqzwsx)}}
2281
2281
  @supports (-webkit-touch-callout: none){@media (pointer: coarse){.x9w4715.x9w4715.x9w4715:not(#\#):not(#\#):not(#\#):not(#\#){height:calc(max(1rem,var(--text-body-size)) * var(--text-body-leading));height:1lh}}}
2282
2282
  @media (pointer: coarse){@media (forced-colors: active){.x1j61smm.x1j61smm.x1j61smm:not(#\#):not(#\#):not(#\#):not(#\#){width:calc(max(var(--_progress-bar-fill,0%),var(--_progress-bar-min,0px)) + var(--_progress-bar-flip,0) * .01px)}}}
2283
- .x1heh2iz[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-duration:calc(.2s * min(var(--_astryx-motion-tempo,1),1.5))}
2283
+ .xem8lmn[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-duration:var(--duration-exit)}
2284
2284
  .xziyay6[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-fill-mode:both}
2285
2285
  .x14e4jsf[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-name:x10jkm1t-B}
2286
- .xwkbtvz[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-timing-function:cubic-bezier(0,0,.2,1)}
2286
+ .x1t1ddl7[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-timing-function:var(--ease-exit)}
2287
2287
  .x7qqc7o[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){background-color:var(--color-neutral)}
2288
2288
  .xf3x42i[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){background-color:var(--color-neutral)}
2289
2289
  .x1bev2v5[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){background-image:none}
@@ -2317,7 +2317,7 @@
2317
2317
  @starting-style{.x14gflnl.x14gflnl:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}}
2318
2318
  @starting-style{.xrxqmjf.xrxqmjf:dir(rtl):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(-100%)}}
2319
2319
  @starting-style{.x1r0dqvm.x1r0dqvm:dir(rtl):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}}
2320
- @media (prefers-reduced-motion: reduce){.x1sgdaq5.x1sgdaq5[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-duration:min(.2s,calc(.2s * var(--_astryx-motion-tempo,1)))}}
2320
+ @media (prefers-reduced-motion: reduce){.xogcwkh.xogcwkh[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-duration:min(var(--duration-exit),200ms)}}
2321
2321
  @media (pointer: coarse){.x6su2wr.x6su2wr[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-name:none}}
2322
2322
  @media (prefers-reduced-motion: reduce) and (not (pointer: coarse)) and (not (pointer: coarse)){.xxsp3er.xxsp3er[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){animation-name:none}}
2323
2323
  @media (forced-colors: active){.x1pjcgc3.x1pjcgc3[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){background-color:Highlight}}
@@ -2504,10 +2504,10 @@
2504
2504
  @media (prefers-reduced-motion: reduce){.x15l12jy.x15l12jy:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::backdrop{transition-duration:var(--_sheet-scrim-duration,.01s)}}
2505
2505
  @media (pointer: coarse){.xqycr0j.xqycr0j:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{will-change:opacity}}
2506
2506
  @media (pointer: coarse){.x1gybruy.x1gybruy.x1gybruy:where(.x1odsvnm:active *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{background-color:transparent}}
2507
- @media (pointer: coarse){.xvym4rz.xvym4rz.xvym4rz:where(.x1iwu4tg[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-duration:calc(200ms * min(var(--_astryx-motion-tempo,1),1.5))}}
2507
+ @media (pointer: coarse){.xs8z9ty.xs8z9ty.xs8z9ty:where(.x1iwu4tg[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-duration:var(--duration-exit)}}
2508
2508
  @media (pointer: coarse){.xq2jpp1.xq2jpp1.xq2jpp1:where(.x1iwu4tg[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-fill-mode:both}}
2509
2509
  @media (pointer: coarse){.xxhzo2e.xxhzo2e.xxhzo2e:where(.x1iwu4tg[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-name:x1jn504y-B}}
2510
- @media (pointer: coarse){.xgq6fxe.xgq6fxe.xgq6fxe:where(.x1iwu4tg[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-timing-function:cubic-bezier(0,0,.2,1)}}
2510
+ @media (pointer: coarse){.x15baseh.x15baseh.x15baseh:where(.x1iwu4tg[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-timing-function:var(--ease-exit)}}
2511
2511
  @media (pointer: coarse){.x1dn949c.x1dn949c:is([data-astryx-press="on"],[data-astryx-press="fading"]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{background-color:var(--color-overlay-pressed)}}
2512
2512
  @media (pointer: coarse){.x1ikgzpo.x1ikgzpo.x1ikgzpo:where(.x1odsvnm[data-astryx-press="on"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{background-image:var(--_press-paint-image)}}
2513
2513
  @media (pointer: coarse){.xsozn46.xsozn46.xsozn46:where(.x1odsvnm[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{background-image:var(--_press-paint-image)}}
@@ -2520,7 +2520,7 @@
2520
2520
  @media (pointer: coarse){.xjscm90.xjscm90:is([data-astryx-press="on"],[data-astryx-press="fading"]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{z-index:-1}}
2521
2521
  @media (pointer: coarse){.x1ocadqd.x1ocadqd.x1ocadqd:is([data-astryx-press="on"],[data-astryx-press="fading"]):where(:not(:disabled,[aria-disabled="true"])):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{content:""}}
2522
2522
  @media (pointer: coarse){.x1995whq.x1995whq.x1995whq:is([data-astryx-press="on"],[data-astryx-press="fading"]):where(:not(:disabled,[aria-disabled="true"])):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{content:none}}
2523
- @media (prefers-reduced-motion: reduce) and (pointer: coarse){@media (pointer: coarse){.xigdn9b.xigdn9b.xigdn9b.xigdn9b:where(.x1iwu4tg[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-duration:min(200ms,calc(200ms * var(--_astryx-motion-tempo,1)))}}}
2523
+ @media (prefers-reduced-motion: reduce) and (pointer: coarse){@media (pointer: coarse){.x1e7l4zx.x1e7l4zx.x1e7l4zx.x1e7l4zx:where(.x1iwu4tg[data-astryx-press="fading"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-duration:min(var(--duration-exit),200ms)}}}
2524
2524
  .xp6skj9:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{border-bottom-color:inherit}
2525
2525
  .x1tqw9ds:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{border-bottom-color:var(--_segmented-after-border-bottom-color,currentcolor)}
2526
2526
  .xg5vybf:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{border-bottom-color:var(--_segmented-lens-border-bottom-color,currentcolor)}
@@ -2596,13 +2596,13 @@
2596
2596
  .x1ea2at[data-astryx-cell-gliding="line"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{position:absolute}
2597
2597
  .x15tr235[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{transition-property:none}
2598
2598
  .x1xg7wox[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{transition-property:none}
2599
- @media (pointer: coarse){.x16lp0i7.x16lp0i7[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-duration:calc(200ms * min(var(--_astryx-motion-tempo,1),1.5))}}
2599
+ @media (pointer: coarse){.x1osot8d.x1osot8d[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-duration:var(--duration-exit)}}
2600
2600
  @media (pointer: coarse){.x1dn5vsf.x1dn5vsf[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-fill-mode:both}}
2601
- @media (pointer: coarse){.x1gyhjqm.x1gyhjqm[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}}
2601
+ @media (pointer: coarse){.x10t12yn.x10t12yn[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-timing-function:var(--ease-exit)}}
2602
2602
  @media (pointer: coarse){.xr9xsjc.xr9xsjc[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{opacity:0}}
2603
2603
  @media (pointer: coarse){.xw7rim2.xw7rim2[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{opacity:1}}
2604
2604
  @media (pointer: coarse){.x1bxn267.x1bxn267.x1bxn267:where(:not(:disabled,[aria-disabled="true"]))[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-name:x1jn504y-B}}
2605
- @media (prefers-reduced-motion: reduce){@media (pointer: coarse){.x1bf026e.x1bf026e.x1bf026e[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-duration:min(200ms,calc(200ms * var(--_astryx-motion-tempo,1)))}}}
2605
+ @media (prefers-reduced-motion: reduce){@media (pointer: coarse){.xbkwwzw.xbkwwzw.xbkwwzw[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{animation-duration:min(var(--duration-exit),200ms)}}}
2606
2606
  .x3mysge[data-astryx-table-pinned="carry"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{border-bottom-color:var(--_table-row-divider-app-color,var(--color-border))}
2607
2607
  .x8qyx5[data-astryx-cell-gliding="line"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{border-bottom-color:var(--_table-row-glide-color,var(--color-border))}
2608
2608
  .xvlxne[data-astryx-cell-gliding]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{border-bottom-color:var(--_table-row-glide-color,var(--color-border))}