@astryxdesign/core 0.7.8-canary.5e05bdf → 0.7.8-canary.7d37fb5

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 (43) hide show
  1. package/dist/DateInput/PickerWheel.d.ts.map +1 -1
  2. package/dist/DateInput/Wheel.d.ts.map +1 -1
  3. package/dist/DateInput/Wheel.js +34 -6
  4. package/dist/Icon/Icon.d.ts +3 -3
  5. package/dist/Icon/Icon.d.ts.map +1 -1
  6. package/dist/Icon/Icon.js +15 -1
  7. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +12 -0
  8. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  9. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +13 -3
  10. package/dist/Table/plugins/tree/useTableTreeData.d.ts +11 -0
  11. package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
  12. package/dist/Table/plugins/tree/useTableTreeData.js +27 -14
  13. package/dist/astryx.css +5 -0
  14. package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
  15. package/dist/hooks/actionGroupTracker.js +5 -4
  16. package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.d.ts.map +1 -1
  17. package/dist/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.js +3 -1
  18. package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.d.ts.map +1 -1
  19. package/dist/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.js +3 -1
  20. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  21. package/dist/i18n/generated-locales/en.generated.js +4 -0
  22. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  23. package/dist/i18n/generated-locales/pseudo.generated.js +4 -0
  24. package/dist/utils/pressFeedback.d.ts +6 -0
  25. package/dist/utils/pressFeedback.d.ts.map +1 -1
  26. package/dist/utils/pressFeedback.js +4 -4
  27. package/locales/en.json +16 -0
  28. package/locales/pseudo.json +12 -0
  29. package/package.json +4 -4
  30. package/src/DateInput/PickerWheel.tsx +2 -4
  31. package/src/DateInput/Wheel.tsx +67 -21
  32. package/src/Icon/Icon.doc.mjs +3 -3
  33. package/src/Icon/Icon.tsx +19 -4
  34. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +27 -7
  35. package/src/Table/plugins/tree/useTableTreeData.tsx +43 -20
  36. package/src/Table/useTableRowExpansion.doc.mjs +9 -0
  37. package/src/Table/useTableTreeData.doc.mjs +15 -3
  38. package/src/hooks/actionGroupTracker.ts +5 -4
  39. package/src/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.ts +3 -1
  40. package/src/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.ts +3 -1
  41. package/src/i18n/generated-locales/en.generated.ts +4 -0
  42. package/src/i18n/generated-locales/pseudo.generated.ts +4 -0
  43. package/src/utils/pressFeedback.ts +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"PickerWheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/PickerWheel.tsx"],"names":[],"mappings":"AAmDA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AA6HxB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAghBZ;yBAthBe,WAAW"}
1
+ {"version":3,"file":"PickerWheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/PickerWheel.tsx"],"names":[],"mappings":"AAmDA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AA2HxB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAghBZ;yBAthBe,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/Wheel.tsx"],"names":[],"mappings":"AAoDA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AA6JxB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAKtC;yBALe,KAAK;;;AASrB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BA6TZ;yBAnUe,WAAW"}
1
+ {"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/Wheel.tsx"],"names":[],"mappings":"AAoDA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AAoMxB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAKtC;yBALe,KAAK;;;AASrB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAoUZ;yBA1Ue,WAAW"}
@@ -51,10 +51,21 @@ const ITEM_BLOCK_SIZE = dateInputTouchSizes.wheelItemSize;
51
51
  * at the top — which is what a `view()` timeline over the `cover` range means,
52
52
  * and why this reads as a cylinder rotating under the finger.
53
53
  */
54
- const falloff = "x1tut0r7-B";
54
+ const tip = "x18sn2u9-B";
55
55
 
56
- /** Motion-free equivalent: the depth cue survives as opacity alone. */
57
- const fadeOnly = "xuvekqa-B";
56
+ /**
57
+ * Colour keeps every row at WCAG AA, which an opacity fade does not. The ends
58
+ * stop halfway to the secondary text colour, because that colour alone falls
59
+ * below AA in two shipped themes.
60
+ */
61
+ const fade = "x1ofkhwi-B";
62
+
63
+ /**
64
+ * A disabled row keeps its disabled colour and fades by opacity instead: WCAG
65
+ * 1.4.3 exempts inactive components from the contrast minimum.
66
+ */
67
+ const tipAndDim = "x1tut0r7-B";
68
+ const dim = "xuvekqa-B";
58
69
  const styles = {
59
70
  scroller: {
60
71
  kZKoxP: "xm8gem",
@@ -409,20 +420,37 @@ export function ScrollWheel({
409
420
  0: {
410
421
  className: "x78zum5 x6s0dn4 xl56j7k x6hpsvf xf314gf x1hdbdi8 xc342km xng3xce xjbqb8w x18juvz8 x1sodnla x1tgivj0 xuxw1ft x1ypdohk x16khyan x87ps6o x1jbe559 xuedmi6"
411
422
  },
423
+ 4: {
424
+ className: "x78zum5 x6s0dn4 xl56j7k x6hpsvf xf314gf x1hdbdi8 xc342km xng3xce xjbqb8w x18juvz8 x1sodnla x1tgivj0 xuxw1ft x1ypdohk x16khyan x87ps6o x1jbe559 xuedmi6 xssvwzl x190lv1 xg8s4dl x1u6ievf xwms9i0 x1esw782"
425
+ },
412
426
  2: {
413
427
  className: "x78zum5 x6s0dn4 xl56j7k x6hpsvf xf314gf x1hdbdi8 xc342km xng3xce xjbqb8w x18juvz8 xuxw1ft x1ypdohk x16khyan x87ps6o x1jbe559 xuedmi6 xjse4m1 x2mo6ok"
414
428
  },
429
+ 6: {
430
+ className: "x78zum5 x6s0dn4 xl56j7k x6hpsvf xf314gf x1hdbdi8 xc342km xng3xce xjbqb8w x18juvz8 xuxw1ft x1ypdohk x16khyan x87ps6o x1jbe559 xuedmi6 xssvwzl x190lv1 xg8s4dl x1u6ievf xwms9i0 x1esw782 xjse4m1 x2mo6ok"
431
+ },
415
432
  1: {
416
433
  className: "x78zum5 x6s0dn4 xl56j7k x6hpsvf xf314gf x1hdbdi8 xc342km xng3xce xjbqb8w x18juvz8 x1sodnla xuxw1ft x87ps6o x1jbe559 xuedmi6 xnbbluu xt0e3qv"
417
434
  },
435
+ 5: {
436
+ className: "x78zum5 x6s0dn4 xl56j7k x6hpsvf xf314gf x1hdbdi8 xc342km xng3xce xjbqb8w x18juvz8 x1sodnla xuxw1ft x87ps6o x1jbe559 xuedmi6 xssvwzl x190lv1 xg8s4dl x1u6ievf xwms9i0 x1esw782 xnbbluu xt0e3qv"
437
+ },
418
438
  3: {
419
439
  className: "x78zum5 x6s0dn4 xl56j7k x6hpsvf xf314gf x1hdbdi8 xc342km xng3xce xjbqb8w x18juvz8 xuxw1ft x87ps6o x1jbe559 xuedmi6 x2mo6ok xnbbluu xt0e3qv"
440
+ },
441
+ 7: {
442
+ className: "x78zum5 x6s0dn4 xl56j7k x6hpsvf xf314gf x1hdbdi8 xc342km xng3xce xjbqb8w x18juvz8 xuxw1ft x87ps6o x1jbe559 xuedmi6 xssvwzl x190lv1 xg8s4dl x1u6ievf xwms9i0 x1esw782 x2mo6ok xnbbluu xt0e3qv"
420
443
  }
421
- }[!!(index === activeIndex) << 1 | !!option.isDisabled << 0],
444
+ }[!!(index !== activeIndex && !option.isDisabled) << 2 | !!(index === activeIndex) << 1 | !!option.isDisabled << 0],
422
445
  children: /*#__PURE__*/_jsx("span", {
423
446
  ...{
424
- className: "x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xb3r6kr xlyipyv x1iu2jvn xk3h8ob x190lv1 xg8s4dl x1u6ievf xwms9i0 x1esw782 xlp1x4z"
425
- },
447
+ 0: {
448
+ className: "x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xb3r6kr xlyipyv x1trhrh1 x1pljy2o x190lv1 xg8s4dl x1u6ievf xwms9i0 x1esw782 xlp1x4z"
449
+ },
450
+ 1: {
451
+ className: "x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xb3r6kr xlyipyv x190lv1 xg8s4dl x1u6ievf xwms9i0 x1esw782 xlp1x4z x1iu2jvn xk3h8ob"
452
+ }
453
+ }[!!option.isDisabled << 0],
426
454
  children: option.label
427
455
  })
428
456
  }, option.value))
@@ -106,9 +106,9 @@ export type IconType = ComponentType<SVGProps<SVGSVGElement>>;
106
106
  */
107
107
  export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref' | 'color'> {
108
108
  /**
109
- * Ref to the rendered SVG element when `icon` is an icon component. A
110
- * semantic or namespaced name renders inside an internal wrapper, and the
111
- * ref is not attached.
109
+ * Ref to the rendered SVG element. For a semantic or namespaced name it is
110
+ * the `<svg>` inside Icon's wrapper, or `null` when the resolved glyph has
111
+ * no `<svg>`.
112
112
  */
113
113
  ref?: React.Ref<SVGSVGElement>;
114
114
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/Icon/Icon.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAInD,OAAO,KAAK,EAAC,QAAQ,EAAE,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAIzC,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEhE,YAAY,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAiDhD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8Df,CAAC;AAMH,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,WAAW,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,C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H,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,KAAiB,EACjB,IAAI,EAAE,QAAQ,EACd,OAAO,EACP,KAAK,EACL,GAAG,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,qBAqDX;yBAhEe,IAAI;;;AAyJpB;;;;;;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
@@ -29,13 +29,14 @@
29
29
  * - /apps/storybook/stories/Icon.stories.tsx (storybook stories)
30
30
  * - /packages/cli/assets/templates/blocks/components/Icon/ (showcase blocks)
31
31
  */
32
- import React from 'react';
32
+ import React, { useCallback } from 'react';
33
33
  import * as stylex from '@stylexjs/stylex';
34
34
  import "../theme/tokens.stylex.js";
35
35
  import { colorVars } from "../theme/tokens.stylex.js";
36
36
  import { useThemeName } from "../theme/useTheme.js";
37
37
  import { resolveIcon } from "./globalIconRegistry.js";
38
38
  import { mergeProps } from "../utils/mergeProps.js";
39
+ import { mergeRefs } from "../utils/mergeRefs.js";
39
40
  import { themeProps } from "../utils/themeProps.js";
40
41
  import { useIconSize } from "./IconDefaultSizeContext.js";
41
42
  import { iconSizeStyles } from "./IconSize.stylex.js";
@@ -251,6 +252,7 @@ export function Icon({
251
252
  className: className,
252
253
  style: style,
253
254
  xstyle: xstyle,
255
+ svgRef: ref,
254
256
  spanProps: props
255
257
  });
256
258
  }
@@ -295,6 +297,7 @@ function IconFromRegistry({
295
297
  className,
296
298
  style,
297
299
  xstyle,
300
+ svgRef,
298
301
  spanProps
299
302
  }) {
300
303
  const themeName = useThemeName();
@@ -302,6 +305,11 @@ function IconFromRegistry({
302
305
  size,
303
306
  variant
304
307
  });
308
+ // The glyph can change while the span stays. Attach the ref again when it
309
+ // does.
310
+ const attachSvgRef = useCallback(span => svgRef == null ? undefined : mergeRefs(svgRef)(span?.querySelector('svg') ?? null),
311
+ // eslint-disable-next-line @eslint-react/exhaustive-deps -- resolveIcon's inputs: a new glyph gets a new attach, and a function entry's new element each render does not.
312
+ [svgRef, name, themeName, size, variant]);
305
313
  if (resolvedIcon == null) {
306
314
  return null;
307
315
  }
@@ -313,6 +321,12 @@ function IconFromRegistry({
313
321
  // precedence (spread before the internal merge).
314
322
  const restSpanProps = spanProps ?? {};
315
323
  return /*#__PURE__*/_jsx("span", {
324
+ ref: svgRef == null ? undefined : attachSvgRef
325
+ // Derived a11y — decorative (aria-hidden) by default, or a meaningful
326
+ // image (role="img" + aria-label) when `label` is set. Placed BEFORE the
327
+ // prop spread so consumers can still override it with explicit
328
+ // aria-hidden/role/aria-label. This mirrors component-mode Icon.
329
+ ,
316
330
  ...a11yProps,
317
331
  ...restSpanProps,
318
332
  ...mergeProps(themeProps('icon', {
@@ -35,6 +35,17 @@ export interface UseTableRowExpansionConfig<T extends Record<string, unknown>> {
35
35
  * it is expanded. Receives the row's item.
36
36
  */
37
37
  renderExpanded: (item: T) => ReactNode;
38
+ /**
39
+ * Derive a human-readable row identity for the expansion control's accessible
40
+ * name. The plugin combines it with localized expand/collapse wording. Blank
41
+ * labels fall back to the generic row label.
42
+ *
43
+ * @example
44
+ * ```
45
+ * getRowLabel: item => item.name
46
+ * ```
47
+ */
48
+ getRowLabel?: (item: T) => string;
38
49
  /**
39
50
  * Control which rows are expandable. Non-expandable rows show no chevron, no
40
51
  * context-menu action, and never render a panel. @default all rows expandable
@@ -102,6 +113,7 @@ export interface UseTableRowExpansionConfig<T extends Record<string, unknown>> {
102
113
  * return next;
103
114
  * }),
104
115
  * getRowKey: item => item.id,
116
+ * getRowLabel: item => item.name,
105
117
  * renderExpanded: item => <OrderDetails order={item} />,
106
118
  * });
107
119
  * <Table data={data} columns={columns} idKey="id" plugins={{expansion}} />;
@@ -1 +1 @@
1
- {"version":3,"file":"useTableRowExpansion.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/rowExpansion/useTableRowExpansion.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAsBf,OAAO,KAAK,EACV,WAAW,EAMZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAKL,KAAK,cAAc,EAEpB,MAAM,gCAAgC,CAAC;AAoBxC;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3E,0CAA0C;IAC1C,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,kDAAkD;IAClD,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC/B;;;OAGG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;IACvC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAC3C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IACvC;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAgaD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpE,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACpC,WAAW,CAAC,CAAC,CAAC,CAsfhB"}
1
+ {"version":3,"file":"useTableRow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,CAyfhB"}
@@ -222,10 +222,16 @@ const chevronOffsetStyles = {
222
222
  // =============================================================================
223
223
 
224
224
  function ExpansionChevron({
225
+ rowLabel,
225
226
  isExpanded,
226
227
  onToggle
227
228
  }) {
228
229
  const t = useComponentTranslator();
230
+ const ariaLabel = rowLabel ? isExpanded ? t('@astryx.tableRowExpansion.collapseRowNamed', {
231
+ label: rowLabel
232
+ }) : t('@astryx.tableRowExpansion.expandRowNamed', {
233
+ label: rowLabel
234
+ }) : isExpanded ? t('@astryx.tableRowExpansion.collapseRow') : t('@astryx.tableRowExpansion.expandRow');
229
235
  const ctx = useTableContext();
230
236
  return /*#__PURE__*/_jsx("button", {
231
237
  type: "button",
@@ -235,7 +241,7 @@ function ExpansionChevron({
235
241
  e.stopPropagation();
236
242
  onToggle();
237
243
  },
238
- "aria-label": isExpanded ? t('@astryx.tableRowExpansion.collapseRow') : t('@astryx.tableRowExpansion.expandRow'),
244
+ "aria-label": ariaLabel,
239
245
  "aria-expanded": isExpanded,
240
246
  children: /*#__PURE__*/_jsx(Icon, {
241
247
  icon: "chevronRight",
@@ -425,6 +431,7 @@ function ExpansionSnapshot({
425
431
  * return next;
426
432
  * }),
427
433
  * getRowKey: item => item.id,
434
+ * getRowLabel: item => item.name,
428
435
  * renderExpanded: item => <OrderDetails order={item} />,
429
436
  * });
430
437
  * <Table data={data} columns={columns} idKey="id" plugins={{expansion}} />;
@@ -436,6 +443,7 @@ export function useTableRowExpansion(config) {
436
443
  onToggle,
437
444
  getRowKey,
438
445
  renderExpanded,
446
+ getRowLabel,
439
447
  getIsItemExpandable,
440
448
  hasRowClickExpansion,
441
449
  panelVariant = 'transparent',
@@ -630,12 +638,14 @@ export function useTableRowExpansion(config) {
630
638
  return null;
631
639
  }
632
640
  const key = getRowKey(item);
641
+ const isExpanded = expandedKeys.has(key);
633
642
  return /*#__PURE__*/_jsx(ExpansionChevron, {
634
- isExpanded: expandedKeys.has(key),
643
+ rowLabel: getRowLabel?.(item)?.trim() || undefined,
644
+ isExpanded: isExpanded,
635
645
  onToggle: () => onToggle(key)
636
646
  });
637
647
  }
638
- }), [expandedKeys, onToggle, getRowKey, getIsItemExpandable, t]);
648
+ }), [expandedKeys, onToggle, getRowKey, getIsItemExpandable, getRowLabel, t]);
639
649
  return useMemo(() => ({
640
650
  // One colour-mode watch per table for the open panels' dividers.
641
651
  transformTableContext(children) {
@@ -20,6 +20,17 @@ export interface UseTableTreeDataConfig<T extends Record<string, unknown>> {
20
20
  getRowMeta: (item: T) => TableTreeRowMeta | undefined;
21
21
  /** Toggle a row's expansion. */
22
22
  onToggleItem: (item: T) => void;
23
+ /**
24
+ * Derive a human-readable row identity for the expander's accessible name.
25
+ * The plugin combines it with localized expand/collapse wording. Blank labels
26
+ * fall back to the generic row label.
27
+ *
28
+ * @example
29
+ * ```
30
+ * getRowLabel: item => item.name
31
+ * ```
32
+ */
33
+ getRowLabel?: (item: T) => string;
23
34
  /**
24
35
  * Whether any row in the dataset is expandable. When false the plugin is
25
36
  * a no-op: no expanders, no indent, no tree ARIA — flat data renders
@@ -1 +1 @@
1
- {"version":3,"file":"useTableTreeData.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/tree/useTableTreeData.tsx"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EACV,WAAW,EAIZ,MAAM,aAAa,CAAC;AAarB,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,WAAW,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvE,qEAAqE;IACrE,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,gBAAgB,GAAG,SAAS,CAAC;IACtD,gCAAgC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IAC1C,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AA6VD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAChC,WAAW,CAAC,CAAC,CAAC,CA0PhB"}
1
+ {"version":3,"file":"useTableTreeData.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/tree/useTableTreeData.tsx"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EACV,WAAW,EAIZ,MAAM,aAAa,CAAC;AAarB,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,WAAW,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvE,qEAAqE;IACrE,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,gBAAgB,GAAG,SAAS,CAAC;IACtD,gCAAgC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IAC1C,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAyWD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAChC,WAAW,CAAC,CAAC,CAAC,CA0PhB"}
@@ -78,7 +78,7 @@ function createTreeStore(configRef) {
78
78
  const TreeStoreContext = /*#__PURE__*/createContext(null);
79
79
  TreeStoreContext.displayName = 'TreeStoreContext';
80
80
 
81
- /** Indent token -> index, for the numeric row snapshot. */
81
+ /** Indent token -> index, for the primitive row snapshot. */
82
82
  const INDENT_INDEX = {
83
83
  sm: 0,
84
84
  md: 1,
@@ -86,21 +86,26 @@ const INDENT_INDEX = {
86
86
  };
87
87
 
88
88
  /**
89
- * Encode a row's tree meta as a primitive for useSyncExternalStore —
90
- * object snapshots would tear. The indent token participates so a
91
- * runtime `indent` change re-renders the affected cells.
89
+ * Encode a row's tree meta and optional accessible label as a primitive for
90
+ * useSyncExternalStore — object snapshots would tear. The numeric fast path is
91
+ * retained when getRowLabel is absent. When it is present, the derived label
92
+ * participates so config-only label changes re-render the affected cells.
92
93
  * Encoding: level * 16 + indentIndex * 4 + hasChildren * 2 + isExpanded;
93
94
  * -1 = no meta.
94
95
  */
95
- function encodeRowMeta(config, item) {
96
+ function getRowSnapshot(config, item) {
96
97
  const meta = config.getRowMeta(item);
97
98
  if (!meta) {
98
99
  return -1;
99
100
  }
100
- return meta.level * 16 + INDENT_INDEX[config.indent ?? 'md'] * 4 + (meta.hasChildren ? 2 : 0) + (meta.isExpanded ? 1 : 0);
101
+ const metaSnapshot = meta.level * 16 + INDENT_INDEX[config.indent ?? 'md'] * 4 + (meta.hasChildren ? 2 : 0) + (meta.isExpanded ? 1 : 0);
102
+ if (!config.getRowLabel) {
103
+ return metaSnapshot;
104
+ }
105
+ return `${metaSnapshot}\u0000${config.getRowLabel(item)?.trim() ?? ''}`;
101
106
  }
102
- function useRowMetaSnapshot(store, item) {
103
- const getSnapshot = useCallback(() => encodeRowMeta(store.getConfig(), item), [store, item]);
107
+ function useRowSnapshot(store, item) {
108
+ const getSnapshot = useCallback(() => getRowSnapshot(store.getConfig(), item), [store, item]);
104
109
  return useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
105
110
  }
106
111
 
@@ -170,9 +175,16 @@ const treeStyles = {
170
175
 
171
176
  function TreeExpander({
172
177
  isExpanded,
173
- onToggle
178
+ onToggle,
179
+ rowLabel
174
180
  }) {
175
181
  const t = useComponentTranslator();
182
+ const normalizedRowLabel = rowLabel?.trim();
183
+ const ariaLabel = normalizedRowLabel ? isExpanded ? t('@astryx.tableTree.collapseRowNamed', {
184
+ label: normalizedRowLabel
185
+ }) : t('@astryx.tableTree.expandRowNamed', {
186
+ label: normalizedRowLabel
187
+ }) : isExpanded ? t('@astryx.tableTree.collapseRow') : t('@astryx.tableTree.expandRow');
176
188
  return /*#__PURE__*/_jsx("button", {
177
189
  type: "button",
178
190
  ...{
@@ -182,7 +194,7 @@ function TreeExpander({
182
194
  e.stopPropagation();
183
195
  onToggle();
184
196
  },
185
- "aria-label": isExpanded ? t('@astryx.tableTree.collapseRow') : t('@astryx.tableTree.expandRow'),
197
+ "aria-label": ariaLabel,
186
198
  "aria-expanded": isExpanded,
187
199
  children: /*#__PURE__*/_jsx(Icon, {
188
200
  icon: "chevronRight",
@@ -256,9 +268,9 @@ function TreeCellContentInner({
256
268
  item,
257
269
  children
258
270
  }) {
259
- // Subscribe to this row's structural meta so a toggle re-renders only
260
- // the affected cells.
261
- useRowMetaSnapshot(store, item);
271
+ // Subscribe to this row's structural meta and derived label so only affected
272
+ // cells re-render when either changes.
273
+ useRowSnapshot(store, item);
262
274
  const config = store.getConfig();
263
275
  const meta = config.getRowMeta(item);
264
276
  if (!meta) {
@@ -272,7 +284,8 @@ function TreeCellContentInner({
272
284
  ...stylex.props(treeStyles.cell, meta.level > 0 && treeStyles.indent(indent)),
273
285
  children: [meta.hasChildren ? /*#__PURE__*/_jsx(TreeExpander, {
274
286
  isExpanded: meta.isExpanded,
275
- onToggle: () => store.getConfig().onToggleItem(item)
287
+ onToggle: () => store.getConfig().onToggleItem(item),
288
+ rowLabel: config.getRowLabel?.(item)
276
289
  }) : /*#__PURE__*/_jsx("span", {
277
290
  ...{
278
291
  className: "x1rg5ohu xvy4d1p xxk0z11 x2lah0s"
package/dist/astryx.css CHANGED
@@ -56,6 +56,7 @@
56
56
  @property --x-owu7oy { syntax: "*"; inherits: true;}
57
57
  @property --astryx-press-alpha { syntax: "<number>"; inherits: true; initial-value: 0 }
58
58
  @keyframes x10jkm1t-B{from{--astryx-press-alpha:1;}to{--astryx-press-alpha:0;}}
59
+ @keyframes x1ofkhwi-B{0%{color:color-mix(in oklab,var(--color-text-primary),var(--color-text-secondary));}50%{color:var(--color-text-primary);}100%{color:color-mix(in oklab,var(--color-text-primary),var(--color-text-secondary));}}
59
60
  @keyframes x188b6p3-B{from{color:inherit;}to{color:transparent;}}
60
61
  @keyframes xuvekqa-B{0%{opacity:.3;}50%{opacity:1;}100%{opacity:.3;}}
61
62
  @keyframes x1tut0r7-B{0%{opacity:.3;transform:rotateX(52deg) scale(.86);}50%{opacity:1;transform:rotateX(0deg) scale(1);}100%{opacity:.3;transform:rotateX(-52deg) scale(.86);}}
@@ -75,6 +76,7 @@
75
76
  @keyframes xiylxmw-B{from{opacity:0;transform:translateY(calc(-1 * var(--spacing-2)));}to{opacity:1;transform:translateY(0);}}
76
77
  @keyframes xml828b-B{from{opacity:1;}to{opacity:var(--_progress-bar-pulse-floor);}}
77
78
  @keyframes xqng64z-B{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}
79
+ @keyframes x18sn2u9-B{0%{transform:rotateX(52deg) scale(.86);}50%{transform:rotateX(0deg) scale(1);}100%{transform:rotateX(-52deg) scale(.86);}}
78
80
  @keyframes x1c2q33o-B{0%{transform:translateX(100%);}100%{transform:translateX(-250%);}}
79
81
  @keyframes xr3m334-B{0%{transform:translateX(-100%);}100%{transform:translateX(250%);}}
80
82
  @keyframes x1xhkexc-B{from{width:0;margin-inline-end:0;opacity:0;}to{width:14px;margin-inline-end:var(--spacing-1);opacity:1;}}
@@ -1558,6 +1560,8 @@
1558
1560
  .x5um2zc.x5um2zc:where(.x1twag4g:first-child *):not(#\#):not(#\#):not(#\#){visibility:hidden}
1559
1561
  .x1se5z8o.x1se5z8o:where(.x1twag4g:last-child *):not(#\#):not(#\#):not(#\#){visibility:hidden}
1560
1562
  .x6ipy2d.x6ipy2d:where(.x1u3b27q:active *):not(#\#):not(#\#):not(#\#){background-color:var(--color-overlay-pressed)}
1563
+ @supports (animation-timeline: view()){.x1trhrh1.x1trhrh1:not(#\#):not(#\#):not(#\#){animation-name:x18sn2u9-B}}
1564
+ @supports (animation-timeline: view()){.xssvwzl.xssvwzl:not(#\#):not(#\#):not(#\#){animation-name:x1ofkhwi-B}}
1561
1565
  @supports (animation-timeline: view()){.x1iu2jvn.x1iu2jvn:not(#\#):not(#\#):not(#\#){animation-name:x1tut0r7-B}}
1562
1566
  @supports (container-type: scroll-state){.xafyuhj.xafyuhj:not(#\#):not(#\#):not(#\#){container-type:scroll-state}}
1563
1567
  @supports (grid-template-columns: subgrid){.x1tx5i3l.x1tx5i3l:not(#\#):not(#\#):not(#\#){display:grid}}
@@ -1794,6 +1798,7 @@
1794
1798
  @media (pointer: coarse){.x1brxl7n.x1brxl7n.x1brxl7n:where(.x1u3b27q:active *):not(#\#):not(#\#):not(#\#){background-color:transparent}}
1795
1799
  @media (hover: hover) and (not (pointer: coarse)){.xvy5t78.xvy5t78.xvy5t78:where(.x1u3b27q:active *):not(#\#):not(#\#):not(#\#){background-color:var(--color-overlay-pressed)}}
1796
1800
  @media (forced-colors: none){.x1xm682w.x1xm682w.x1xm682w:where(.x1iwu4tg:active *):not(#\#):not(#\#):not(#\#){background-image:linear-gradient(var(--color-overlay-pressed),var(--color-overlay-pressed))}}
1801
+ @supports (animation-timeline: view()){@media (prefers-reduced-motion: reduce){.x1pljy2o.x1pljy2o.x1pljy2o:not(#\#):not(#\#):not(#\#){animation-name:none}}}
1797
1802
  @supports (animation-timeline: view()){@media (prefers-reduced-motion: reduce){.xk3h8ob.xk3h8ob.xk3h8ob:not(#\#):not(#\#):not(#\#){animation-name:xuvekqa-B}}}
1798
1803
  @supports (-webkit-touch-callout: none){@media (pointer: coarse){.xf9zqsd.xf9zqsd.xf9zqsd:not(#\#):not(#\#):not(#\#){font-size:max(1rem,var(--text-body-size))}}}
1799
1804
  @supports (-webkit-touch-callout: none){@media (pointer: coarse){.x1w61h2b.x1w61h2b.x1w61h2b:not(#\#):not(#\#):not(#\#){font-size:max(1rem,var(--text-label-size))}}}
@@ -1 +1 @@
1
- {"version":3,"file":"actionGroupTracker.d.ts","sourceRoot":"","sources":["../../src/hooks/actionGroupTracker.ts"],"names":[],"mappings":"AAsBA,wEAAwE;AACxE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EA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AAI,IAAI,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,SAAS,IAAI,IAAI,CAAC;IAClB,kCAAkC;IAClC,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IACzC,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IACrC,0EAA0E;IAC1E,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB;AAUD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,yBAAyB,GAC1C,kBAAkB,CA2OpB"}
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * @file actionGroupTracker.ts
5
5
  * @input The tracked elements, the action selector and hit expansion, and the
6
- * press paint and fade clocks
6
+ * press paint and the press controller's fade clock
7
7
  * @output createActionGroupTracker, ActionGroupTracker,
8
8
  * ActionGroupTrackerOptions, ActionGroupTarget
9
9
  * @position Internal core tracker for a held finger that slides across a
@@ -14,8 +14,7 @@
14
14
 
15
15
  import { clickAndReport, clickForLift } from "../utils/browserClickWait.js";
16
16
  import { armClickGuard } from "../utils/clickGuard.js";
17
- import { PRESSED_ATTRIBUTE } from "../utils/pressFeedback.js";
18
- import { PRESS_FADE_MS } from "../utils/pressGesture.js";
17
+ import { PRESSED_ATTRIBUTE, pressFadeMs } from "../utils/pressFeedback.js";
19
18
 
20
19
  /** An action that is not enabled takes no highlight and does not run. */
21
20
  const DISABLED = ':disabled, [aria-disabled="true"]';
@@ -77,12 +76,14 @@ export function createActionGroupTracker(getOptions) {
77
76
  }
78
77
  clearFade(element);
79
78
  element.setAttribute(PRESSED_ATTRIBUTE, 'fading');
79
+ // The stylesheet's release follows the theme's tempo, so the fade ends on
80
+ // the press controller's clock.
80
81
  fades.set(element, setTimeout(() => {
81
82
  fades.delete(element);
82
83
  if (element.getAttribute(PRESSED_ATTRIBUTE) === 'fading') {
83
84
  element.removeAttribute(PRESSED_ATTRIBUTE);
84
85
  }
85
- }, PRESS_FADE_MS));
86
+ }, pressFadeMs(element)));
86
87
  };
87
88
  const highlight = next => {
88
89
  if (next === highlighted) {
@@ -1 +1 @@
1
- {"version":3,"file":"useTableRowExpansion.generated.d.ts","sourceRoot":"","sources":["../../../../../../src/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAI7C,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"useTableRowExpansion.generated.d.ts","sourceRoot":"","sources":["../../../../../../src/i18n/generated-english/Table/plugins/rowExpansion/useTableRowExpansion.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM7C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -8,7 +8,9 @@
8
8
 
9
9
  const english = {
10
10
  "@astryx.tableRowExpansion.collapseRow": "Collapse row",
11
+ "@astryx.tableRowExpansion.collapseRowNamed": "Collapse {label}",
11
12
  "@astryx.tableRowExpansion.columnHeader": "Row expansion",
12
- "@astryx.tableRowExpansion.expandRow": "Expand row"
13
+ "@astryx.tableRowExpansion.expandRow": "Expand row",
14
+ "@astryx.tableRowExpansion.expandRowNamed": "Expand {label}"
13
15
  };
14
16
  export default english;
@@ -1 +1 @@
1
- {"version":3,"file":"useTableTreeData.generated.d.ts","sourceRoot":"","sources":["../../../../../../src/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK7C,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"useTableTreeData.generated.d.ts","sourceRoot":"","sources":["../../../../../../src/i18n/generated-english/Table/plugins/tree/useTableTreeData.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAO7C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -9,7 +9,9 @@
9
9
  const english = {
10
10
  "@astryx.tableTree.collapseAllRows": "Collapse all rows",
11
11
  "@astryx.tableTree.collapseRow": "Collapse row",
12
+ "@astryx.tableTree.collapseRowNamed": "Collapse {label}",
12
13
  "@astryx.tableTree.expandAllRows": "Expand all rows",
13
- "@astryx.tableTree.expandRow": "Expand row"
14
+ "@astryx.tableTree.expandRow": "Expand row",
15
+ "@astryx.tableTree.expandRowNamed": "Expand {label}"
14
16
  };
15
17
  export default english;
@@ -1 +1 @@
1
- {"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA6pBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiqBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -415,7 +415,9 @@ const runtimeCatalog = {
415
415
  '@astryx.tableGroupedRows.expandGroup': 'Expand group {groupKey}',
416
416
  '@astryx.tableGroupedRows.collapseGroup': 'Collapse group {groupKey}',
417
417
  '@astryx.tableRowExpansion.collapseRow': 'Collapse row',
418
+ '@astryx.tableRowExpansion.collapseRowNamed': 'Collapse {label}',
418
419
  '@astryx.tableRowExpansion.expandRow': 'Expand row',
420
+ '@astryx.tableRowExpansion.expandRowNamed': 'Expand {label}',
419
421
  '@astryx.tableRowExpansion.columnHeader': 'Row expansion',
420
422
  '@astryx.tableRowExpansion.collapseAllRows': 'Collapse all rows',
421
423
  '@astryx.tableRowExpansion.expandAllRows': 'Expand all rows',
@@ -430,7 +432,9 @@ const runtimeCatalog = {
430
432
  '@astryx.step.status.error': 'error',
431
433
  '@astryx.switch.loading': 'Loading',
432
434
  '@astryx.tableTree.collapseRow': 'Collapse row',
435
+ '@astryx.tableTree.collapseRowNamed': 'Collapse {label}',
433
436
  '@astryx.tableTree.expandRow': 'Expand row',
437
+ '@astryx.tableTree.expandRowNamed': 'Expand {label}',
434
438
  '@astryx.tableTree.collapseAllRows': 'Collapse all rows',
435
439
  '@astryx.tableTree.expandAllRows': 'Expand all rows',
436
440
  '@astryx.textArea.counter': '{count, number}/{limit, number}',
@@ -1 +1 @@
1
- {"version":3,"file":"pseudo.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/pseudo.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAyqBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"pseudo.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/pseudo.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA6qBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -415,7 +415,9 @@ const runtimeCatalog = {
415
415
  '@astryx.tableGroupedRows.expandGroup': '⟦Éẋþàñð ĝřóúþ {groupKey}⟧',
416
416
  '@astryx.tableGroupedRows.collapseGroup': '⟦Çółłàþšé ĝřóúþ {groupKey}⟧',
417
417
  '@astryx.tableRowExpansion.collapseRow': '⟦Çółłàþšé řóŵ⟧',
418
+ '@astryx.tableRowExpansion.collapseRowNamed': '⟦Çółłàþšé {label}⟧',
418
419
  '@astryx.tableRowExpansion.expandRow': '⟦Éẋþàñð řóŵ⟧',
420
+ '@astryx.tableRowExpansion.expandRowNamed': '⟦Éẋþàñð {label}⟧',
419
421
  '@astryx.tableRowExpansion.columnHeader': '⟦Řóŵ éẋþàñšíóñ⟧',
420
422
  '@astryx.tableRowExpansion.collapseAllRows': '⟦Çółłàþšé àłł řóŵš⟧',
421
423
  '@astryx.tableRowExpansion.expandAllRows': '⟦Éẋþàñð àłł řóŵš⟧',
@@ -430,7 +432,9 @@ const runtimeCatalog = {
430
432
  '@astryx.step.status.error': '⟦éřřóř⟧',
431
433
  '@astryx.switch.loading': '⟦Łóàðíñĝ⟧',
432
434
  '@astryx.tableTree.collapseRow': '⟦Çółłàþšé řóŵ⟧',
435
+ '@astryx.tableTree.collapseRowNamed': '⟦Çółłàþšé {label}⟧',
433
436
  '@astryx.tableTree.expandRow': '⟦Éẋþàñð řóŵ⟧',
437
+ '@astryx.tableTree.expandRowNamed': '⟦Éẋþàñð {label}⟧',
434
438
  '@astryx.tableTree.collapseAllRows': '⟦Çółłàþšé àłł řóŵš⟧',
435
439
  '@astryx.tableTree.expandAllRows': '⟦Éẋþàñð àłł řóŵš⟧',
436
440
  '@astryx.textArea.counter': '⟦{count, number}/{limit, number}⟧',
@@ -23,6 +23,12 @@ export declare const pressableProps: {
23
23
  * scroll is the program moving something, not a list still gliding.
24
24
  */
25
25
  export declare const PRESS_GESTURE_MEMORY_MS = 3000;
26
+ /**
27
+ * The release fade's clock on `element`, read once, at the release, from the
28
+ * property its stylesheet reads: the theme's `--_astryx-motion-tempo`. Under
29
+ * Reduce Motion a tempo may shorten the fade, never lengthen it past 200 ms.
30
+ */
31
+ export declare function pressFadeMs(element: Element): number;
26
32
  /**
27
33
  * Install the touch press controller on this document, once, however many
28
34
  * times it is called: the listeners exist while at least one caller holds it.
@@ -1 +1 @@
1
- {"version":3,"file":"pressFeedback.d.ts","sourceRoot":"","sources":["../../src/utils/pressFeedback.ts"],"names":[],"mappings":"AAkDA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,qDAAqD;AACrD,eAAO,MAAM,cAAc,EAAE;IAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAA;CAE/D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAC;AA6oB5C;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,IAAI,CA0BjD"}
1
+ {"version":3,"file":"pressFeedback.d.ts","sourceRoot":"","sources":["../../src/utils/pressFeedback.ts"],"names":[],"mappings":"AAkDA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,qDAAqD;AACrD,eAAO,MAAM,cAAc,EAAE;IAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAA;CAE/D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAyE5C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAUpD;AAqjBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,IAAI,CA0BjD"}
@@ -5,8 +5,8 @@
5
5
  * @input The press state machine (pressGesture.ts), the menu-press and
6
6
  * press-group markers and the document's pointer, keyboard, scroll and
7
7
  * visibility events
8
- * @output PRESSABLE_ATTRIBUTE, PRESSED_ATTRIBUTE, pressableProps and
9
- * installPressFeedback
8
+ * @output PRESSABLE_ATTRIBUTE, PRESSED_ATTRIBUTE, pressableProps,
9
+ * pressFadeMs and installPressFeedback
10
10
  * @position The DOM half of the touch press model. usePressFeedback installs
11
11
  * it, and the CSS arms live in interactionOverlay.stylex.ts.
12
12
  *
@@ -129,7 +129,7 @@ const TIMER_MS = {
129
129
  * property its stylesheet reads: the theme's `--_astryx-motion-tempo`. Under
130
130
  * Reduce Motion a tempo may shorten the fade, never lengthen it past 200 ms.
131
131
  */
132
- function fadeMs(element) {
132
+ export function pressFadeMs(element) {
133
133
  const style = getComputedStyle(element);
134
134
  const value = style.getPropertyValue('--_astryx-motion-tempo').trim();
135
135
  const read = value === '' ? Number.NaN : Number(value);
@@ -201,7 +201,7 @@ function apply(slot, step) {
201
201
  },
202
202
  // The release fade follows the theme's tempo (AST-108). The onset delay
203
203
  // and the tap flash do not.
204
- kind === 'fade' ? fadeMs(live.element) : TIMER_MS[kind]);
204
+ kind === 'fade' ? pressFadeMs(live.element) : TIMER_MS[kind]);
205
205
  }
206
206
  }
207
207