@12-apps/ui 6.24.8 → 6.26.0

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 (151) hide show
  1. package/dist/_internal/components/data-display/Alert/Alert.helpers.js +5 -1
  2. package/dist/_internal/components/data-display/Alert/Alert.js +3 -3
  3. package/dist/_internal/components/data-display/Alert/Alert.styles.js +2 -2
  4. package/dist/_internal/components/data-display/CardKit/card-actions-context.js +4 -4
  5. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +5 -5
  6. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +19 -19
  7. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +24 -24
  8. package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +15 -15
  9. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +16 -16
  10. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +18 -18
  11. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +16 -16
  12. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +4 -4
  13. package/dist/_internal/components/data-display/index.js +3 -3
  14. package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +8 -8
  15. package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +2 -2
  16. package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +2 -2
  17. package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +4 -4
  18. package/dist/_internal/components/form/CategorySelect/CategoryQuickActions.js +2 -2
  19. package/dist/_internal/components/form/CategorySelect/CategoryRows.js +7 -9
  20. package/dist/_internal/components/form/CategorySelect/CategorySelect.js +14 -14
  21. package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +3 -1
  22. package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +2 -2
  23. package/dist/_internal/components/form/CategorySelect/category-keyboard.js +2 -2
  24. package/dist/_internal/components/form/CategorySelect/category-tree.js +11 -3
  25. package/dist/_internal/components/form/CategorySelect/useCategoryCommit.js +2 -2
  26. package/dist/_internal/components/form/CategorySelect/useCategoryKeyHandler.js +3 -3
  27. package/dist/_internal/components/form/CategorySelect/useCategorySelect.js +2 -2
  28. package/dist/_internal/components/form/total-form/Fields/CategoryField.js +15 -15
  29. package/dist/_internal/components/form/total-form/Fields/index.js +16 -16
  30. package/dist/_internal/components/index.js +3 -3
  31. package/dist/{chunk-WNMYWQ7D.js → chunk-4Y6SPFKW.js} +10 -8
  32. package/dist/chunk-4Y6SPFKW.js.map +1 -0
  33. package/dist/{chunk-KM5O4ICK.js → chunk-7LCXGJN5.js} +2 -2
  34. package/dist/{chunk-NLJV4CPF.js → chunk-7MN6I5NK.js} +2 -2
  35. package/dist/{chunk-PN5CQKA2.js → chunk-AXTLFK4T.js} +2 -2
  36. package/dist/{chunk-4TXIZ5WI.js → chunk-CJUOBTLL.js} +2 -2
  37. package/dist/{chunk-57Z2ND3N.js → chunk-CXLAJZSE.js} +2 -2
  38. package/dist/{chunk-E3PUH5IF.js → chunk-EQ7PWGBN.js} +2 -2
  39. package/dist/{chunk-EJQW2IYW.js → chunk-FPFUXRD2.js} +2 -2
  40. package/dist/{chunk-KIHQE5YA.js → chunk-GVDJQMFI.js} +2 -2
  41. package/dist/{chunk-N3QUEBNS.js → chunk-L7VH6IMR.js} +14 -1
  42. package/dist/chunk-L7VH6IMR.js.map +1 -0
  43. package/dist/{chunk-OFOYMZRY.js → chunk-NPN7JTRM.js} +22 -47
  44. package/dist/chunk-NPN7JTRM.js.map +1 -0
  45. package/dist/{chunk-OVLNF4AZ.js → chunk-P7IVAMAU.js} +24 -35
  46. package/dist/chunk-P7IVAMAU.js.map +1 -0
  47. package/dist/chunk-PN4HVM43.js +160 -0
  48. package/dist/chunk-PN4HVM43.js.map +1 -0
  49. package/dist/{chunk-WWM2YTW4.js → chunk-R2AZOWEZ.js} +21 -27
  50. package/dist/chunk-R2AZOWEZ.js.map +1 -0
  51. package/dist/{chunk-2GB5CIN6.js → chunk-RZVUY2MO.js} +8 -4
  52. package/dist/chunk-RZVUY2MO.js.map +1 -0
  53. package/dist/{chunk-FBI6QB3O.js → chunk-TVPPA4RD.js} +3 -3
  54. package/dist/{chunk-KFWIOFMS.js → chunk-TWY5FOBY.js} +3 -3
  55. package/dist/{chunk-6ZY5XU4J.js → chunk-UIZH4DAE.js} +2 -2
  56. package/dist/{chunk-ISH42UC7.js → chunk-USJPZ5Q7.js} +2 -2
  57. package/dist/{chunk-ZUIJ3N7N.js → chunk-V6Z4XS3I.js} +5 -3
  58. package/dist/chunk-V6Z4XS3I.js.map +1 -0
  59. package/dist/{chunk-SYJMI2NP.js → chunk-VNTOBLIB.js} +2 -2
  60. package/dist/{chunk-JM64OEU6.js → chunk-WAPJ2DL3.js} +10 -13
  61. package/dist/chunk-WAPJ2DL3.js.map +1 -0
  62. package/dist/{chunk-ZAB65STX.js → chunk-XHHR6G35.js} +2 -2
  63. package/dist/{chunk-WIT3Y7JT.js → chunk-Y2B3I3IH.js} +2 -2
  64. package/dist/{chunk-R6SNYC3D.js → chunk-Y3KRUT7O.js} +2 -2
  65. package/dist/{chunk-TPLKJHNN.js → chunk-ZC7RQDZ5.js} +8 -7
  66. package/dist/chunk-ZC7RQDZ5.js.map +1 -0
  67. package/dist/{chunk-TFO6GBW7.js → chunk-ZS44PY7T.js} +5 -1
  68. package/dist/chunk-ZS44PY7T.js.map +1 -0
  69. package/dist/{chunk-AJ6XEO4E.js → chunk-ZUY65MFH.js} +2 -2
  70. package/dist/data-display/Alert.js +3 -3
  71. package/dist/data-display/CardKit.js +5 -5
  72. package/dist/data-display/DataViews.js +24 -24
  73. package/dist/form/CategorySelect.js +24 -16
  74. package/dist/form/total-form.js +16 -16
  75. package/dist/native/data-display/Alert.js +18 -3
  76. package/dist/native/data-display/Alert.js.map +1 -1
  77. package/dist/types/components/data-display/Alert/Alert.base.d.ts +28 -2
  78. package/dist/types/components/data-display/Alert/Alert.base.d.ts.map +1 -1
  79. package/dist/types/components/data-display/Alert/Alert.helpers.d.ts +39 -0
  80. package/dist/types/components/data-display/Alert/Alert.helpers.d.ts.map +1 -1
  81. package/dist/types/components/form/CategorySelect/CategoryPanel.d.ts.map +1 -1
  82. package/dist/types/components/form/CategorySelect/CategoryPanelList.d.ts +6 -0
  83. package/dist/types/components/form/CategorySelect/CategoryPanelList.d.ts.map +1 -1
  84. package/dist/types/components/form/CategorySelect/CategoryQuickActions.d.ts.map +1 -1
  85. package/dist/types/components/form/CategorySelect/CategoryRows.d.ts +12 -24
  86. package/dist/types/components/form/CategorySelect/CategoryRows.d.ts.map +1 -1
  87. package/dist/types/components/form/CategorySelect/CategorySelect.d.ts +10 -7
  88. package/dist/types/components/form/CategorySelect/CategorySelect.d.ts.map +1 -1
  89. package/dist/types/components/form/CategorySelect/CategorySelect.styles.d.ts +11 -0
  90. package/dist/types/components/form/CategorySelect/CategorySelect.styles.d.ts.map +1 -1
  91. package/dist/types/components/form/CategorySelect/CategorySelect.types.d.ts +10 -2
  92. package/dist/types/components/form/CategorySelect/CategorySelect.types.d.ts.map +1 -1
  93. package/dist/types/components/form/CategorySelect/category-keyboard.d.ts.map +1 -1
  94. package/dist/types/components/form/CategorySelect/category-tree.d.ts +52 -20
  95. package/dist/types/components/form/CategorySelect/category-tree.d.ts.map +1 -1
  96. package/dist/types/components/form/CategorySelect/index.d.ts +1 -1
  97. package/dist/types/components/form/CategorySelect/index.d.ts.map +1 -1
  98. package/dist/types/components/form/CategorySelect/useCategorySelect.d.ts +2 -0
  99. package/dist/types/components/form/CategorySelect/useCategorySelect.d.ts.map +1 -1
  100. package/dist/types-native/components/data-display/Alert/Alert.base.d.ts +28 -2
  101. package/dist/types-native/components/data-display/Alert/Alert.base.d.ts.map +1 -1
  102. package/dist/types-native/components/data-display/Alert/Alert.helpers.d.ts +39 -0
  103. package/dist/types-native/components/data-display/Alert/Alert.helpers.d.ts.map +1 -1
  104. package/dist/types-native/components/data-display/Alert/Alert.native.d.ts.map +1 -1
  105. package/package.json +1 -1
  106. package/src/components/data-display/Alert/Alert.base.ts +29 -2
  107. package/src/components/data-display/Alert/Alert.helpers.ts +50 -0
  108. package/src/components/data-display/Alert/Alert.md +29 -1
  109. package/src/components/data-display/Alert/Alert.native.tsx +8 -4
  110. package/src/components/data-display/Alert/Alert.tsx +5 -5
  111. package/src/components/form/CategorySelect/CategoryPanel.tsx +1 -0
  112. package/src/components/form/CategorySelect/CategoryPanelList.tsx +42 -34
  113. package/src/components/form/CategorySelect/CategoryQuickActions.tsx +6 -4
  114. package/src/components/form/CategorySelect/CategoryRows.tsx +45 -81
  115. package/src/components/form/CategorySelect/CategorySelect.md +47 -13
  116. package/src/components/form/CategorySelect/CategorySelect.styles.ts +13 -0
  117. package/src/components/form/CategorySelect/CategorySelect.tsx +16 -14
  118. package/src/components/form/CategorySelect/CategorySelect.types.ts +10 -2
  119. package/src/components/form/CategorySelect/category-keyboard.ts +27 -31
  120. package/src/components/form/CategorySelect/category-tree.ts +143 -63
  121. package/src/components/form/CategorySelect/index.ts +4 -0
  122. package/src/components/form/CategorySelect/useCategorySelect.ts +15 -1
  123. package/dist/chunk-2GB5CIN6.js.map +0 -1
  124. package/dist/chunk-JM64OEU6.js.map +0 -1
  125. package/dist/chunk-LR6MSKTT.js +0 -124
  126. package/dist/chunk-LR6MSKTT.js.map +0 -1
  127. package/dist/chunk-N3QUEBNS.js.map +0 -1
  128. package/dist/chunk-OFOYMZRY.js.map +0 -1
  129. package/dist/chunk-OVLNF4AZ.js.map +0 -1
  130. package/dist/chunk-TFO6GBW7.js.map +0 -1
  131. package/dist/chunk-TPLKJHNN.js.map +0 -1
  132. package/dist/chunk-WNMYWQ7D.js.map +0 -1
  133. package/dist/chunk-WWM2YTW4.js.map +0 -1
  134. package/dist/chunk-ZUIJ3N7N.js.map +0 -1
  135. /package/dist/{chunk-KM5O4ICK.js.map → chunk-7LCXGJN5.js.map} +0 -0
  136. /package/dist/{chunk-NLJV4CPF.js.map → chunk-7MN6I5NK.js.map} +0 -0
  137. /package/dist/{chunk-PN5CQKA2.js.map → chunk-AXTLFK4T.js.map} +0 -0
  138. /package/dist/{chunk-4TXIZ5WI.js.map → chunk-CJUOBTLL.js.map} +0 -0
  139. /package/dist/{chunk-57Z2ND3N.js.map → chunk-CXLAJZSE.js.map} +0 -0
  140. /package/dist/{chunk-E3PUH5IF.js.map → chunk-EQ7PWGBN.js.map} +0 -0
  141. /package/dist/{chunk-EJQW2IYW.js.map → chunk-FPFUXRD2.js.map} +0 -0
  142. /package/dist/{chunk-KIHQE5YA.js.map → chunk-GVDJQMFI.js.map} +0 -0
  143. /package/dist/{chunk-FBI6QB3O.js.map → chunk-TVPPA4RD.js.map} +0 -0
  144. /package/dist/{chunk-KFWIOFMS.js.map → chunk-TWY5FOBY.js.map} +0 -0
  145. /package/dist/{chunk-6ZY5XU4J.js.map → chunk-UIZH4DAE.js.map} +0 -0
  146. /package/dist/{chunk-ISH42UC7.js.map → chunk-USJPZ5Q7.js.map} +0 -0
  147. /package/dist/{chunk-SYJMI2NP.js.map → chunk-VNTOBLIB.js.map} +0 -0
  148. /package/dist/{chunk-ZAB65STX.js.map → chunk-XHHR6G35.js.map} +0 -0
  149. /package/dist/{chunk-WIT3Y7JT.js.map → chunk-Y2B3I3IH.js.map} +0 -0
  150. /package/dist/{chunk-R6SNYC3D.js.map → chunk-Y3KRUT7O.js.map} +0 -0
  151. /package/dist/{chunk-AJ6XEO4E.js.map → chunk-ZUY65MFH.js.map} +0 -0
@@ -9,14 +9,14 @@ import {
9
9
  } from "../chunk-E6OILRUU.js";
10
10
  import {
11
11
  Fields_exports
12
- } from "../chunk-R6SNYC3D.js";
12
+ } from "../chunk-Y3KRUT7O.js";
13
13
  import {
14
14
  SelectField
15
15
  } from "../chunk-W4SDVTZC.js";
16
16
  import "../chunk-EOHKZGOZ.js";
17
17
  import {
18
18
  CategoryField
19
- } from "../chunk-WIT3Y7JT.js";
19
+ } from "../chunk-Y2B3I3IH.js";
20
20
  import "../chunk-LYMAMKJT.js";
21
21
  import {
22
22
  TextField
@@ -35,22 +35,22 @@ import "../chunk-FGK2C7JR.js";
35
35
  import "../chunk-JD5BVIM7.js";
36
36
  import "../chunk-JXUWWPZR.js";
37
37
  import "../chunk-N5ZWC6CB.js";
38
- import "../chunk-JM64OEU6.js";
38
+ import "../chunk-WAPJ2DL3.js";
39
39
  import "../chunk-LMXWI3DD.js";
40
- import "../chunk-TPLKJHNN.js";
41
- import "../chunk-ZUIJ3N7N.js";
42
- import "../chunk-OVLNF4AZ.js";
43
- import "../chunk-4TXIZ5WI.js";
44
- import "../chunk-AJ6XEO4E.js";
45
- import "../chunk-ZAB65STX.js";
46
- import "../chunk-KIHQE5YA.js";
47
- import "../chunk-OFOYMZRY.js";
40
+ import "../chunk-ZC7RQDZ5.js";
41
+ import "../chunk-V6Z4XS3I.js";
42
+ import "../chunk-P7IVAMAU.js";
43
+ import "../chunk-CJUOBTLL.js";
44
+ import "../chunk-ZUY65MFH.js";
45
+ import "../chunk-XHHR6G35.js";
46
+ import "../chunk-GVDJQMFI.js";
47
+ import "../chunk-NPN7JTRM.js";
48
48
  import "../chunk-DMNZD3Q7.js";
49
- import "../chunk-TFO6GBW7.js";
50
- import "../chunk-2GB5CIN6.js";
51
- import "../chunk-ISH42UC7.js";
52
- import "../chunk-WWM2YTW4.js";
53
- import "../chunk-LR6MSKTT.js";
49
+ import "../chunk-ZS44PY7T.js";
50
+ import "../chunk-RZVUY2MO.js";
51
+ import "../chunk-USJPZ5Q7.js";
52
+ import "../chunk-R2AZOWEZ.js";
53
+ import "../chunk-PN4HVM43.js";
54
54
  import "../chunk-QYKDY4EI.js";
55
55
  import "../chunk-4OHRZW7U.js";
56
56
  import "../chunk-S6YY2WWK.js";
@@ -53,6 +53,17 @@ var definedProps = (props) => Object.fromEntries(
53
53
  );
54
54
  var resolveAlertProps = (props) => ({ ...ALERT_DEFAULTS, ...definedProps(props) });
55
55
  var defaultAriaLive = (variant) => variant === "danger" ? "assertive" : "polite";
56
+ var ANNOUNCE_ROLE = {
57
+ assertive: "alert",
58
+ polite: "status"
59
+ };
60
+ var resolveAnnouncement = (props, variant) => {
61
+ const announce = props.announce;
62
+ return {
63
+ role: props.role ?? (announce === void 0 ? ALERT_DEFAULTS.role : ANNOUNCE_ROLE[announce]),
64
+ "aria-live": props["aria-live"] ?? announce ?? defaultAriaLive(variant)
65
+ };
66
+ };
56
67
  var testIdFor = (base, suffix) => base ? `${base}-${suffix}` : `alert-${suffix}`;
57
68
  var VARIANT_ICON = {
58
69
  info: "Info",
@@ -327,7 +338,10 @@ var Alert = React.forwardRef((alertProps, ref) => {
327
338
  description,
328
339
  children,
329
340
  animate,
330
- role,
341
+ // `role`, `announce` and `aria-live` all leave here and are resolved
342
+ // TOGETHER below, off `alertProps` — see `resolveAnnouncement`.
343
+ role: _role,
344
+ announce: _announce,
331
345
  "aria-atomic": ariaAtomic,
332
346
  "aria-live": _ariaLive,
333
347
  closable,
@@ -341,13 +355,14 @@ var Alert = React.forwardRef((alertProps, ref) => {
341
355
  const look = alertLook(theme, { variant, color, glow, pulse });
342
356
  const fadeIn = useFadeIn(animate);
343
357
  const dismiss = useDismiss(onClose);
358
+ const announcement = resolveAnnouncement(alertProps, variant);
344
359
  if (dismiss.gone) return null;
345
360
  return /* @__PURE__ */ jsx(Collapse, { open: dismiss.open, onCollapsed: dismiss.onCollapsed, children: /* @__PURE__ */ jsxs(
346
361
  Animated.View,
347
362
  {
348
363
  ref,
349
- role,
350
- "aria-live": alertProps["aria-live"] ?? defaultAriaLive(variant),
364
+ role: announcement.role,
365
+ "aria-live": announcement["aria-live"],
351
366
  ...webAria({ "aria-atomic": ariaAtomic }),
352
367
  tabIndex: 0,
353
368
  testID: testId,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/data-display/Alert/Alert.native.tsx","../../../src/components/data-display/Alert/Alert.helpers.ts","../../../src/components/data-display/Alert/Alert.metrics.ts","../../../src/components/data-display/Alert/Alert.look.native.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n Easing,\n type LayoutChangeEvent,\n Platform,\n Pressable,\n type Role,\n StyleSheet,\n Text as RNText,\n View,\n type ViewStyle,\n} from 'react-native';\n\nimport { defaultAriaLive, resolveAlertProps, testIdFor, VARIANT_ICON } from './Alert.helpers';\nimport {\n actionSlotStyle,\n alertLook,\n closeButtonStyle,\n descriptionStyle,\n iconSlotStyle,\n messageSlotStyle,\n messageTextStyle,\n titleStyle,\n} from './Alert.look.native';\nimport { CLOSE_BUTTON, CLOSE_DELAY_MS, COLLAPSE_MS, FADE_IN, ICON_SLOT, ICON_SPIN, PULSE } from './Alert.metrics';\nimport type { AlertProps, AlertVariant } from './Alert.types.native';\nimport { Icon } from '../../../icons/Icon.native';\nimport { webAria } from '../../../platform/aria';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\n\ntype AnimatedStyle = Animated.WithAnimatedValue<ViewStyle>;\nconst nativeDriver = Platform.OS !== 'web';\n\n/** A 0→1 progress that starts on mount when `animate` is set, else sits at 1. */\nfunction useProgress(animate: boolean, duration: number): Animated.Value {\n const progress = React.useRef(new Animated.Value(animate ? 0 : 1)).current;\n React.useEffect(() => {\n if (!animate) return undefined;\n const timing = Animated.timing(progress, { toValue: 1, duration, easing: Easing.out(Easing.ease), useNativeDriver: nativeDriver });\n timing.start();\n return () => timing.stop();\n }, [animate, duration, progress]);\n return progress;\n}\n\n/** The web's `fadeInScale` keyframes: in from 0 opacity, 0.95 scale and 10px above, over 300ms. */\nfunction useFadeIn(animate: boolean): AnimatedStyle | undefined {\n const progress = useProgress(animate, FADE_IN.ms);\n if (!animate) return undefined;\n return {\n opacity: progress,\n transform: [\n { scale: progress.interpolate({ inputRange: [0, 1], outputRange: [FADE_IN.scale, 1] }) },\n { translateY: progress.interpolate({ inputRange: [0, 1], outputRange: [-FADE_IN.lift, 0] }) },\n ],\n };\n}\n\n/** The web's `iconRotate` keyframes: one full turn, 0.8 → 1.1 → 1, over 600ms. */\nfunction useIconSpin(animate: boolean): AnimatedStyle | undefined {\n const progress = useProgress(animate, ICON_SPIN.ms);\n if (!animate) return undefined;\n return {\n transform: [\n { rotate: progress.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'] }) },\n { scale: progress.interpolate({ inputRange: [0, 0.5, 1], outputRange: [ICON_SPIN.from, ICON_SPIN.mid, 1] }) },\n ],\n };\n}\n\n/** The web's `::after` pulse: a wash of the hue over the card, fading out every two seconds, behind the words. */\nfunction Pulse({ color, radius, testID }: { color: string; radius: number; testID: string }): React.JSX.Element {\n const progress = React.useRef(new Animated.Value(0)).current;\n React.useEffect(() => {\n const loop = Animated.loop(\n Animated.timing(progress, { toValue: 1, duration: PULSE.ms, easing: Easing.linear, useNativeDriver: nativeDriver }),\n );\n loop.start();\n return () => loop.stop();\n }, [progress]);\n return (\n <Animated.View\n testID={testID}\n aria-hidden\n style={[\n StyleSheet.absoluteFill,\n {\n pointerEvents: 'none',\n borderRadius: radius,\n backgroundColor: color,\n opacity: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [PULSE.alpha, 0, 0] }),\n },\n ]}\n />\n );\n}\n\n/**\n * MUI's `Collapse`: open, it is a plain wrapper with its overflow visible (so\n * a glow can escape); closing, it clips and shrinks over 300ms, then says so.\n */\nfunction Collapse({ open, onCollapsed, children }: { open: boolean; onCollapsed: () => void; children: React.ReactNode }): React.JSX.Element {\n const [height, setHeight] = React.useState<number | null>(null);\n const progress = React.useRef(new Animated.Value(1)).current;\n React.useEffect(() => {\n if (open) return undefined;\n const timing = Animated.timing(progress, { toValue: 0, duration: COLLAPSE_MS, easing: Easing.inOut(Easing.ease), useNativeDriver: false });\n timing.start(({ finished }) => {\n if (finished) onCollapsed();\n });\n return () => timing.stop();\n }, [open, onCollapsed, progress]);\n const onLayout = (event: LayoutChangeEvent): void => {\n if (open) setHeight(event.nativeEvent.layout.height);\n };\n const shrink: AnimatedStyle = height == null ? {} : { maxHeight: progress.interpolate({ inputRange: [0, 1], outputRange: [0, height] }) };\n return (\n <Animated.View style={[{ overflow: open ? 'visible' : 'hidden', opacity: progress }, shrink]}>\n <View onLayout={onLayout}>{children}</View>\n </Animated.View>\n );\n}\n\ninterface IconSlotProps {\n variant: AlertVariant;\n icon: React.ReactNode;\n color: string;\n animate: boolean;\n testID: string;\n}\n\n/** The icon slot; `glass` and `gradient` have no glyph of their own, so theirs is empty unless an `icon` is given — as on the web. */\nfunction IconSlot({ variant, icon, color, animate, testID }: IconSlotProps): React.JSX.Element {\n const theme = useUiTheme();\n const spin = useIconSpin(animate);\n const glyph = VARIANT_ICON[variant];\n return (\n <Animated.View testID={testID} style={[iconSlotStyle(theme), spin]}>\n {icon || (glyph ? <Icon name={glyph} size={ICON_SLOT.size} color={color} /> : null)}\n </Animated.View>\n );\n}\n\nfunction CloseButton({ label, ink, onPress, testID }: { label: string | undefined; ink: string; onPress: () => void; testID: string }): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <Pressable role=\"button\" aria-label={label} testID={testID} onPress={onPress} style={({ pressed }) => closeButtonStyle(theme, pressed)}>\n <Icon name=\"Close\" size={CLOSE_BUTTON.iconSize} color={ink} />\n </Pressable>\n );\n}\n\ninterface ContentProps {\n title?: string;\n description?: string;\n children?: React.ReactNode;\n ink: string;\n testId: string;\n}\n\nfunction AlertContent({ title, description, children, ink, testId }: ContentProps): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <View style={messageSlotStyle(theme)}>\n {title ? (\n <RNText testID={testIdFor(testId, 'title')} style={titleStyle(theme, ink, Boolean(description))}>\n {title}\n </RNText>\n ) : null}\n {description ? (\n <RNText testID={testIdFor(testId, 'message')} style={descriptionStyle(theme, ink)}>\n {description}\n </RNText>\n ) : null}\n {renderTextChildren(children, messageTextStyle(theme, ink))}\n </View>\n );\n}\n\n/** The dismiss sequence the web runs: mark closing, fire `onClose` 200ms in, stay until the collapse has run. */\nfunction useDismiss(onClose: (() => void) | undefined): { open: boolean; gone: boolean; close: () => void; onCollapsed: () => void } {\n const [closing, setClosing] = React.useState(false);\n const [gone, setGone] = React.useState(false);\n const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n React.useEffect(() => () => {\n if (timer.current) clearTimeout(timer.current);\n }, []);\n const close = (): void => {\n setClosing(true);\n timer.current = setTimeout(() => onClose?.(), CLOSE_DELAY_MS);\n };\n const onCollapsed = React.useCallback(() => setGone(true), []);\n return { open: !closing, gone, close, onCollapsed };\n}\n\nexport const Alert = React.forwardRef<View, AlertProps>((alertProps, ref) => {\n const {\n variant, color, glow, pulse, icon, showIcon, onClose, title, description, children, animate, role,\n 'aria-atomic': ariaAtomic, 'aria-live': _ariaLive, closable, closeLabel, style, ...others\n } = resolveAlertProps(alertProps);\n const theme = useUiTheme();\n const testId = resolveTestId(others, 'alert') as string;\n const rest = withoutTestIdProps(others);\n const look = alertLook(theme, { variant, color, glow, pulse });\n const fadeIn = useFadeIn(animate);\n const dismiss = useDismiss(onClose);\n\n if (dismiss.gone) return null;\n return (\n <Collapse open={dismiss.open} onCollapsed={dismiss.onCollapsed}>\n <Animated.View\n ref={ref}\n role={role as Role}\n aria-live={alertProps['aria-live'] ?? defaultAriaLive(variant)}\n {...webAria({ 'aria-atomic': ariaAtomic })}\n tabIndex={0}\n testID={testId}\n style={[look.root, fadeIn, style]}\n {...rest}\n >\n {pulse ? <Pulse color={look.palette.main} radius={look.root.borderRadius as number} testID={testIdFor(testId, 'pulse')} /> : null}\n {showIcon ? <IconSlot variant={variant} icon={icon} color={look.iconColor} animate={animate} testID={testIdFor(testId, 'icon')} /> : null}\n <AlertContent title={title} description={description} ink={look.ink} testId={testId}>\n {children}\n </AlertContent>\n {closable ? (\n <View style={actionSlotStyle(theme)}>\n <CloseButton label={closeLabel} ink={look.ink} onPress={dismiss.close} testID={testIdFor(testId, 'close')} />\n </View>\n ) : null}\n </Animated.View>\n </Collapse>\n );\n});\n\nAlert.displayName = 'Alert';\n","import type { AlertBaseFields, AlertVariant } from './Alert.base';\nimport type { IconName } from '../../../icons/Icon.types';\n\ntype AlertDefaultedKeys = 'variant' | 'glow' | 'pulse' | 'showIcon' | 'animate' | 'role' | 'aria-atomic';\n\nexport const ALERT_DEFAULTS: Required<Pick<AlertBaseFields, AlertDefaultedKeys>> & { closable: false } = {\n variant: 'info',\n glow: false,\n pulse: false,\n showIcon: true,\n closable: false,\n animate: true,\n role: 'alert',\n 'aria-atomic': 'true',\n};\n\n/**\n * Generic over the renderer's own props: the web and the native `Alert` pass\n * different extras through, and both come back out untouched.\n */\nexport type ResolvedAlertProps<P extends AlertBaseFields> = P &\n Required<Pick<AlertBaseFields, AlertDefaultedKeys>>;\n\n// Strips explicitly-undefined props before the merge so `prop={undefined}` still\n// falls back to the default, the way a destructuring default would.\nconst definedProps = <P extends AlertBaseFields>(props: P): Partial<P> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<P>;\n\n// Through `unknown`: `closable: false` in the defaults belongs to the dismiss\n// union rather than to `AlertBaseFields`, so TypeScript cannot see the merge as\n// comparable to `P` although every field of `P` survives it untouched.\nexport const resolveAlertProps = <P extends AlertBaseFields>(props: P): ResolvedAlertProps<P> =>\n ({ ...ALERT_DEFAULTS, ...definedProps(props) }) as unknown as ResolvedAlertProps<P>;\n\n/** `danger` announces itself; everything else waits its turn. */\nexport const defaultAriaLive = (variant: AlertVariant): 'polite' | 'assertive' =>\n variant === 'danger' ? 'assertive' : 'polite';\n\nexport const testIdFor = (base: string | undefined, suffix: string): string =>\n base ? `${base}-${suffix}` : `alert-${suffix}`;\n\n/**\n * The glyph each semantic variant carries, by the shared icon set's name.\n * `glass` and `gradient` carry none of their own: the web renders an empty\n * icon slot for them unless the caller passes an `icon`, and so does native.\n */\nexport const VARIANT_ICON: Partial<Record<AlertVariant, IconName>> = {\n info: 'Info',\n success: 'CheckCircle',\n warning: 'Warning',\n danger: 'Error',\n};\n","import type { AlertVariant } from './Alert.base';\nimport { alpha, darken, lighten } from '../../../tokens/color';\nimport { contrastText, type UiGreyStep, type UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `Alert` RENDERERS DRAW WITH.\n *\n * `Alert.styles.tsx` / `Alert.tsx` (MUI) and `Alert.native.tsx` (React\n * Native) read this one table. Spacing is in SPACING UNITS where the web\n * writes `theme.spacing(n)`; durations are ms (the web turns them into `s`\n * through {@link seconds} so its emitted CSS is byte-for-byte what it was);\n * everything else is px, a ratio or an alpha. The hover, active and focus\n * numbers are here too although only the DOM can honour them — a number the\n * web draws with belongs in the table whether or not native can reach it.\n */\n\n/** The root: 12px corners, 14px 16px of padding, one 300ms curve for everything. */\nexport const ALERT_RADIUS_UNITS = 1.5;\nexport const ALERT_PADDING_UNITS = { vertical: 1.75, horizontal: 2 } as const;\nexport const ALERT_TRANSITION_MS = 300;\nexport const ALERT_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n/** Mount: the web's `fadeInScale` keyframes and the icon's `iconRotate`. */\nexport const FADE_IN = { ms: 300, scale: 0.95, lift: 10 } as const;\nexport const ICON_SPIN = { ms: 600, from: 0.8, mid: 1.1 } as const;\n/** Dismiss: MUI `Collapse` runs 300ms; `onClose` fires 200ms in. */\nexport const COLLAPSE_MS = 300;\nexport const CLOSE_DELAY_MS = 200;\n\n/** The message column: 8px between title, description and children; 0.95rem body on 1.5. */\nexport const MESSAGE_GAP_UNITS = 1;\nexport const MESSAGE_FONT_SIZE = 15.2;\nexport const MESSAGE_LINE_HEIGHT = 1.5;\n/** A control inside the message gets an edge: 4px above, a hairline at 0.45 of the hue. */\nexport const MESSAGE_BUTTON = { marginTopUnits: 0.5, borderAlpha: 0.45 } as const;\n\n/** The title: 1.05rem at 600; MUI's `AlertTitle` lifts it 2px; 4px below it when a description follows. */\nexport const TITLE = { fontSize: 16.8, fontWeight: 600, marginTop: -2, marginBottomUnits: 0.5 } as const;\n/** The description: 0.925rem, slightly faded. */\nexport const DESCRIPTION = { fontSize: 14.8, opacity: 0.9 } as const;\n\n/** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */\nexport const ICON_SLOT = { size: 22, opacity: 0.9, marginRightUnits: 1.75, paddingTopUnits: 0.25, paddingBottom: 7 } as const;\n/** The action slot: MUI's `4px 0 0 16px` with the 16px ours, pushed right, 8px into the padding. */\nexport const ACTION_SLOT = { paddingLeftUnits: 2, paddingTop: 4, marginRight: -8 } as const;\n/** The close button: MUI's small `IconButton` (5px padding, 18px glyph) at 0.7. */\nexport const CLOSE_BUTTON = { padding: 5, iconSize: 18, opacity: 0.7, washAlpha: 0.1 } as const;\n\n/**\n * A semantic Alert's surface and ink: an OPAQUE tint of the hue with a dark\n * ink of the same hue — MUI's own `standard` recipe, at its ratios. See\n * `semanticSurface` in `Alert.styles.tsx` for why not `alpha(main, 0.1)`.\n */\nexport const SEMANTIC_SURFACE = { tint: { light: 0.9, dark: 0.8 }, ink: 0.6, borderAlpha: 0.35 } as const;\n/** `glass`: 85% paper under a 20px blur, a 0.4 divider hairline. */\nexport const GLASS = { backgroundAlpha: 0.85, borderAlpha: 0.4, blur: 20, saturatePercent: 180 } as const;\n/**\n * `gradient`: light→dark at 0.9 along 135°, a 0.2 white shimmer sweeping 1000px every 3s.\n *\n * It carries no hover of its own, and that is load-bearing rather than an\n * omission. `alertVariantStyles` is spread AFTER the root's `'&:hover'` in the\n * same object literal, so a second `'&:hover'` key does not merge with it — it\n * REPLACES it. While this variant had one, `gradient` was the only alert that\n * brightened on hover while every other variant darkened, and the only one to\n * lose the shimmer reveal the root's hover performs.\n */\nexport const GRADIENT = {\n angleDeg: 135,\n stopAlpha: 0.9,\n shimmerAlpha: 0.2,\n shimmerMs: 3000,\n shimmerTravel: 1000,\n} as const;\n\n/** Emphasis: the glow's shadow and brightness, the pulse's wash. */\nexport const GLOW = { blur: 20, spread: 5, alpha: 0.3, brightness: 1.05 } as const;\nexport const PULSE = { alpha: 0.2, ms: 2000, spread: 10 } as const;\n\n/**\n * Pointer states — DOM only, kept so the web derives them.\n *\n * HOVER and ACTIVE carry NO geometry, and that is the point rather than an\n * omission. They used to lift the card 3px, scale it 1.01, grow a 20px shadow\n * and spin the icon 10deg at 1.15 — four things moving at once on a surface\n * that is not a control, which made a page of alerts twitch under the pointer.\n *\n * Both are a TINT now: a flat inset layer over the surface. Two mechanisms\n * came before it and each failed on a case the next had to fix. Dropping the\n * element's `opacity` composites toward the PAGE, so it inverted the hover on\n * a light tint (L* 95.0 idle, 89.1 hovered, 91.1 pressed) and vanished on a\n * dark one. A `filter: brightness()` fixed the direction but is MULTIPLICATIVE,\n * so it moved a near-black `glass` by four counts (ΔE76 1.71, under the JND)\n * and Banner's 10%-alpha wash by ΔE76 0.44. A layer is additive: it reads the\n * same on an opaque tint, a translucent wash and a gradient, and because it\n * paints above the background and below the content the ink keeps its own\n * contrast.\n */\nexport const HOVER = { tintAlpha: 0.06 } as const;\n\n/**\n * The press: a 20% tint LAYER, eased back fast.\n *\n * The layer is the point. The first attempt dropped the whole element's\n * opacity, which composites toward the PAGE and so behaves differently on\n * every surface it is asked about. Measured: over a light page it made a light\n * tint LIGHTER (L* 95.0 idle, 89.1 hovered, 91.1 pressed), so pushing the\n * surface looked like the pointer leaving; over a dark page it landed back on\n * the idle surface (ΔE76 0.82 on `glass`); on `gradient` it washed white body\n * copy to 2.31:1, under AA; and it diluted the ink during a text-selection\n * drag. A `brightness()` step instead of it fixed the direction but not the\n * reach — a multiplier does nothing to a near-black `glass` in dark mode\n * (ΔE76 1.71) and nothing to Banner's 10%-alpha wash (ΔE76 0.44), because it\n * scales only what the element already paints.\n *\n * An inset shadow at 100vmax is a flat tint over the whole surface: ADDITIVE,\n * so it reads the same on an opaque tint, a translucent wash and a gradient;\n * painted above the background and below the content, so the ink keeps its\n * own contrast; and animatable, which `background-image` is not.\n *\n * `ms` is 250 and not the 1000 first asked for, and the reason is that ONE\n * property carries both states. CSS runs a transition from the DESTINATION\n * state's declaration, and entering hover and releasing a press share that\n * destination — so they cannot have different durations without a second\n * animatable property, and both free pseudo-elements are already spent on the\n * `gradient` shimmer and the `pulse` wash. At 1000ms the hover inherited the\n * second: crossing an alert in 300ms peaked at a ≈ 0.024, under the JND, and\n * for ~360ms the alert you had just LEFT was darker than the one under the\n * pointer. A fast press-return is the smaller loss, and it is the call the\n * product owner made when shown both.\n */\nexport const ACTIVE = { tintAlpha: 0.2, ms: 250 } as const;\n\nexport const FOCUS = { ringWidth: 2, ringAlpha: 1, offset: 2 } as const;\n\n/** `neutral` has no palette slot; the web has always drawn it from three greys. */\nexport const NEUTRAL_GREY: Record<'main' | 'light' | 'dark', UiGreyStep> = { main: 500, light: 300, dark: 700 };\n\n/** A duration as the CSS the web has always emitted: `2000` → `2s`, `300` → `0.3s`. */\nexport const seconds = (ms: number): string => `${ms / 1000}s`;\n\n/** The palette shape the web's `getColorFromTheme` returns — a main plus optional shades. */\nexport interface AlertPalette {\n main: string;\n light?: string;\n dark?: string;\n}\n\n/**\n * The renderer-free twin of the web's `getColorFromTheme`: a variant or\n * colour name to its palette, `neutral` from the greys, anything unknown\n * (`glass`, `gradient`) to `info`.\n */\nexport function alertPalette(theme: UiTheme, key: string | undefined): AlertPalette {\n switch (key) {\n case 'info':\n case 'success':\n case 'warning':\n case 'danger':\n case 'primary':\n case 'secondary':\n return theme.palette[key];\n case 'neutral':\n return {\n main: theme.palette.grey[NEUTRAL_GREY.main],\n light: theme.palette.grey[NEUTRAL_GREY.light],\n dark: theme.palette.grey[NEUTRAL_GREY.dark],\n };\n default:\n return theme.palette.info;\n }\n}\n\n/** What a variant paints: its fill, its ink, its hairline if any, and the colour of its glyph. */\nexport interface AlertSurface {\n backgroundColor: string;\n color: string;\n borderColor?: string;\n iconColor: string;\n}\n\nexport const SEMANTIC_VARIANTS: ReadonlySet<AlertVariant> = new Set(['info', 'success', 'warning', 'danger']);\n\n/** The opaque tint and same-hue ink, inverted for dark mode; the hairline keeps its alpha. */\nexport function semanticSurface(theme: UiTheme, palette: AlertPalette): AlertSurface {\n const dark = theme.mode === 'dark';\n return {\n backgroundColor: dark\n ? darken(palette.main, SEMANTIC_SURFACE.tint.dark)\n : lighten(palette.main, SEMANTIC_SURFACE.tint.light),\n color: dark ? lighten(palette.main, SEMANTIC_SURFACE.ink) : darken(palette.main, SEMANTIC_SURFACE.ink),\n borderColor: alpha(palette.main, SEMANTIC_SURFACE.borderAlpha),\n iconColor: palette.main,\n };\n}\n\nexport function glassSurface(theme: UiTheme): AlertSurface {\n return {\n backgroundColor: alpha(theme.palette.background.paper, GLASS.backgroundAlpha),\n color: theme.palette.text.primary,\n borderColor: alpha(theme.palette.divider, GLASS.borderAlpha),\n iconColor: theme.palette.primary.main,\n };\n}\n\n/** The gradient's two stops; a renderer with no gradient fill paints `from`. */\nexport function gradientStops(palette: AlertPalette): { from: string; to: string } {\n return {\n from: alpha(palette.light || palette.main, GRADIENT.stopAlpha),\n to: alpha(palette.dark || palette.main, GRADIENT.stopAlpha),\n };\n}\n\nexport function gradientSurface(palette: AlertPalette): AlertSurface {\n const ink = contrastText(palette.main);\n return { backgroundColor: gradientStops(palette).from, color: ink, iconColor: ink };\n}\n\n/** The surface for a variant, `glass` and `gradient` included. */\nexport function alertSurface(theme: UiTheme, variant: AlertVariant, palette: AlertPalette): AlertSurface {\n if (variant === 'glass') return glassSurface(theme);\n if (variant === 'gradient') return gradientSurface(palette);\n return semanticSurface(theme, palette);\n}\n","import type { TextStyle, ViewStyle } from 'react-native';\n\nimport type { AlertVariant } from './Alert.base';\nimport {\n ACTION_SLOT,\n ALERT_PADDING_UNITS,\n ALERT_RADIUS_UNITS,\n type AlertPalette,\n alertPalette,\n alertSurface,\n CLOSE_BUTTON,\n DESCRIPTION,\n GLOW,\n ICON_SLOT,\n MESSAGE_FONT_SIZE,\n MESSAGE_GAP_UNITS,\n MESSAGE_LINE_HEIGHT,\n TITLE,\n} from './Alert.metrics';\nimport { alpha } from '../../../tokens/color';\nimport { muiTypeStyle } from '../../../tokens/mui-type';\nimport type { UiTheme } from '../../../tokens/theme';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\n/**\n * THE PAINT, KEPT APART FROM THE STRUCTURE.\n *\n * `Alert.native.tsx` reads as what renders where; this file reads as\n * arithmetic — the same palette slots, alphas and px the web's\n * `Alert.styles.tsx` derives from `Alert.metrics.ts`.\n */\n\nexport interface AlertLookArgs {\n variant: AlertVariant;\n color: ColorValue | undefined;\n glow: boolean;\n pulse: boolean;\n}\n\nexport interface AlertLook {\n palette: AlertPalette;\n /** What the words are set in. */\n ink: string;\n iconColor: string;\n root: ViewStyle;\n}\n\n/**\n * The root's paint. The web keeps `overflow: hidden` (its pulse wash is\n * clipped to the card, as it is here); only the glow opens it, because a\n * view's own shadow is clipped by its own overflow on a device.\n */\nexport function alertLook(theme: UiTheme, a: AlertLookArgs): AlertLook {\n const palette = alertPalette(theme, a.color ?? a.variant);\n const surface = alertSurface(theme, a.variant, palette);\n const root: ViewStyle = {\n flexDirection: 'row',\n paddingVertical: theme.spacing(ALERT_PADDING_UNITS.vertical),\n paddingHorizontal: theme.spacing(ALERT_PADDING_UNITS.horizontal),\n borderRadius: theme.spacing(ALERT_RADIUS_UNITS),\n overflow: a.glow ? 'visible' : 'hidden',\n backgroundColor: surface.backgroundColor,\n ...(surface.borderColor ? { borderWidth: 1, borderColor: surface.borderColor } : {}),\n ...(a.glow\n ? {\n boxShadow: `0 0 ${GLOW.blur}px ${GLOW.spread}px ${alpha(palette.main, GLOW.alpha)}`,\n filter: `brightness(${GLOW.brightness})`,\n }\n : {}),\n };\n return { palette, ink: surface.color, iconColor: surface.iconColor, root };\n}\n\n/** The message column: 8px between its lines, allowed to shrink so long text wraps beside the icon. */\nexport const messageSlotStyle = (theme: UiTheme): ViewStyle => ({\n flexDirection: 'column',\n gap: theme.spacing(MESSAGE_GAP_UNITS),\n flexShrink: 1,\n minWidth: 0,\n});\n\n/** A string child: MUI's `body2` letter-spacing at 0.95rem on the message's 1.5. */\nexport const messageTextStyle = (theme: UiTheme, ink: string): TextStyle => ({\n ...muiTypeStyle(theme, 'body2', MESSAGE_FONT_SIZE),\n lineHeight: MESSAGE_FONT_SIZE * MESSAGE_LINE_HEIGHT,\n color: ink,\n});\n\n/** MUI's `AlertTitle` (a `body1` Typography) at 1.05rem and 600, lifted 2px, 4px above a description. */\nexport const titleStyle = (theme: UiTheme, ink: string, hasDescription: boolean): TextStyle => ({\n ...muiTypeStyle(theme, 'body1', TITLE.fontSize),\n fontWeight: `${TITLE.fontWeight}`,\n color: ink,\n marginTop: TITLE.marginTop,\n marginBottom: hasDescription ? theme.spacing(TITLE.marginBottomUnits) : 0,\n});\n\n/** The description: 0.925rem on the message's 1.5, faded to 0.9. */\nexport const descriptionStyle = (theme: UiTheme, ink: string): TextStyle => ({\n ...muiTypeStyle(theme, 'body2', DESCRIPTION.fontSize),\n lineHeight: DESCRIPTION.fontSize * MESSAGE_LINE_HEIGHT,\n color: ink,\n opacity: DESCRIPTION.opacity,\n});\n\n/** MUI's `.MuiAlert-icon` with the web's overrides: first-line aligned, 14px from the words, 2px down. */\nexport const iconSlotStyle = (theme: UiTheme): ViewStyle => ({\n alignSelf: 'flex-start',\n alignItems: 'center',\n marginRight: theme.spacing(ICON_SLOT.marginRightUnits),\n paddingTop: theme.spacing(ICON_SLOT.paddingTopUnits),\n paddingBottom: ICON_SLOT.paddingBottom,\n opacity: ICON_SLOT.opacity,\n});\n\n/** MUI's `.MuiAlert-action`: top-aligned, pushed to the right edge, 16px off the text. */\nexport const actionSlotStyle = (theme: UiTheme): ViewStyle => ({\n alignItems: 'flex-start',\n paddingTop: ACTION_SLOT.paddingTop,\n paddingLeft: theme.spacing(ACTION_SLOT.paddingLeftUnits),\n marginLeft: 'auto',\n marginRight: ACTION_SLOT.marginRight,\n});\n\n/** MUI's small `IconButton` at 0.7; pressed stands in for the web's hover (full opacity, a faint wash). */\nexport const closeButtonStyle = (theme: UiTheme, pressed: boolean): ViewStyle => ({\n padding: CLOSE_BUTTON.padding,\n borderRadius: theme.radius.full,\n opacity: pressed ? 1 : CLOSE_BUTTON.opacity,\n backgroundColor: pressed ? alpha(theme.palette.action.hover, CLOSE_BUTTON.washAlpha) : 'transparent',\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,OAEK;;;ACPA,IAAM,iBAA4F;AAAA,EACvG,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,MAAM;AAAA,EACN,eAAe;AACjB;AAWA,IAAM,eAAe,CAA4B,UAC/C,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAKK,IAAM,oBAAoB,CAA4B,WAC1D,EAAE,GAAG,gBAAgB,GAAG,aAAa,KAAK,EAAE;AAGxC,IAAM,kBAAkB,CAAC,YAC9B,YAAY,WAAW,cAAc;AAEhC,IAAM,YAAY,CAAC,MAA0B,WAClD,OAAO,GAAG,IAAI,IAAI,MAAM,KAAK,SAAS,MAAM;AAOvC,IAAM,eAAwD;AAAA,EACnE,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;;;ACpCO,IAAM,qBAAqB;AAC3B,IAAM,sBAAsB,EAAE,UAAU,MAAM,YAAY,EAAE;AAK5D,IAAM,UAAU,EAAE,IAAI,KAAK,OAAO,MAAM,MAAM,GAAG;AACjD,IAAM,YAAY,EAAE,IAAI,KAAK,MAAM,KAAK,KAAK,IAAI;AAEjD,IAAM,cAAc;AACpB,IAAM,iBAAiB;AAGvB,IAAM,oBAAoB;AAC1B,IAAM,oBAAoB;AAC1B,IAAM,sBAAsB;AAK5B,IAAM,QAAQ,EAAE,UAAU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AAQ,UAAU,QAAQ,MAAM,GAAG,IAAK;AAAA,QACrI,oBAAC,gBAAa,OAAc,aAA0B,KAAK,KAAK,KAAK,QAClE,UACH;AAAA,QACC,WACC,oBAAC,QAAK,OAAO,gBAAgB,KAAK,GAChC,8BAAC,eAAY,OAAO,YAAY,KAAK,KAAK,KAAK,SAAS,QAAQ,OAAO,QAAQ,UAAU,QAAQ,OAAO,GAAG,GAC7G,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ,CAAC;AAED,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/data-display/Alert/Alert.native.tsx","../../../src/components/data-display/Alert/Alert.helpers.ts","../../../src/components/data-display/Alert/Alert.metrics.ts","../../../src/components/data-display/Alert/Alert.look.native.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n Easing,\n type LayoutChangeEvent,\n Platform,\n Pressable,\n type Role,\n StyleSheet,\n Text as RNText,\n View,\n type ViewStyle,\n} from 'react-native';\n\nimport { resolveAlertProps, resolveAnnouncement, testIdFor, VARIANT_ICON } from './Alert.helpers';\nimport {\n actionSlotStyle,\n alertLook,\n closeButtonStyle,\n descriptionStyle,\n iconSlotStyle,\n messageSlotStyle,\n messageTextStyle,\n titleStyle,\n} from './Alert.look.native';\nimport { CLOSE_BUTTON, CLOSE_DELAY_MS, COLLAPSE_MS, FADE_IN, ICON_SLOT, ICON_SPIN, PULSE } from './Alert.metrics';\nimport type { AlertProps, AlertVariant } from './Alert.types.native';\nimport { Icon } from '../../../icons/Icon.native';\nimport { webAria } from '../../../platform/aria';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\n\ntype AnimatedStyle = Animated.WithAnimatedValue<ViewStyle>;\nconst nativeDriver = Platform.OS !== 'web';\n\n/** A 0→1 progress that starts on mount when `animate` is set, else sits at 1. */\nfunction useProgress(animate: boolean, duration: number): Animated.Value {\n const progress = React.useRef(new Animated.Value(animate ? 0 : 1)).current;\n React.useEffect(() => {\n if (!animate) return undefined;\n const timing = Animated.timing(progress, { toValue: 1, duration, easing: Easing.out(Easing.ease), useNativeDriver: nativeDriver });\n timing.start();\n return () => timing.stop();\n }, [animate, duration, progress]);\n return progress;\n}\n\n/** The web's `fadeInScale` keyframes: in from 0 opacity, 0.95 scale and 10px above, over 300ms. */\nfunction useFadeIn(animate: boolean): AnimatedStyle | undefined {\n const progress = useProgress(animate, FADE_IN.ms);\n if (!animate) return undefined;\n return {\n opacity: progress,\n transform: [\n { scale: progress.interpolate({ inputRange: [0, 1], outputRange: [FADE_IN.scale, 1] }) },\n { translateY: progress.interpolate({ inputRange: [0, 1], outputRange: [-FADE_IN.lift, 0] }) },\n ],\n };\n}\n\n/** The web's `iconRotate` keyframes: one full turn, 0.8 → 1.1 → 1, over 600ms. */\nfunction useIconSpin(animate: boolean): AnimatedStyle | undefined {\n const progress = useProgress(animate, ICON_SPIN.ms);\n if (!animate) return undefined;\n return {\n transform: [\n { rotate: progress.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'] }) },\n { scale: progress.interpolate({ inputRange: [0, 0.5, 1], outputRange: [ICON_SPIN.from, ICON_SPIN.mid, 1] }) },\n ],\n };\n}\n\n/** The web's `::after` pulse: a wash of the hue over the card, fading out every two seconds, behind the words. */\nfunction Pulse({ color, radius, testID }: { color: string; radius: number; testID: string }): React.JSX.Element {\n const progress = React.useRef(new Animated.Value(0)).current;\n React.useEffect(() => {\n const loop = Animated.loop(\n Animated.timing(progress, { toValue: 1, duration: PULSE.ms, easing: Easing.linear, useNativeDriver: nativeDriver }),\n );\n loop.start();\n return () => loop.stop();\n }, [progress]);\n return (\n <Animated.View\n testID={testID}\n aria-hidden\n style={[\n StyleSheet.absoluteFill,\n {\n pointerEvents: 'none',\n borderRadius: radius,\n backgroundColor: color,\n opacity: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [PULSE.alpha, 0, 0] }),\n },\n ]}\n />\n );\n}\n\n/**\n * MUI's `Collapse`: open, it is a plain wrapper with its overflow visible (so\n * a glow can escape); closing, it clips and shrinks over 300ms, then says so.\n */\nfunction Collapse({ open, onCollapsed, children }: { open: boolean; onCollapsed: () => void; children: React.ReactNode }): React.JSX.Element {\n const [height, setHeight] = React.useState<number | null>(null);\n const progress = React.useRef(new Animated.Value(1)).current;\n React.useEffect(() => {\n if (open) return undefined;\n const timing = Animated.timing(progress, { toValue: 0, duration: COLLAPSE_MS, easing: Easing.inOut(Easing.ease), useNativeDriver: false });\n timing.start(({ finished }) => {\n if (finished) onCollapsed();\n });\n return () => timing.stop();\n }, [open, onCollapsed, progress]);\n const onLayout = (event: LayoutChangeEvent): void => {\n if (open) setHeight(event.nativeEvent.layout.height);\n };\n const shrink: AnimatedStyle = height == null ? {} : { maxHeight: progress.interpolate({ inputRange: [0, 1], outputRange: [0, height] }) };\n return (\n <Animated.View style={[{ overflow: open ? 'visible' : 'hidden', opacity: progress }, shrink]}>\n <View onLayout={onLayout}>{children}</View>\n </Animated.View>\n );\n}\n\ninterface IconSlotProps {\n variant: AlertVariant;\n icon: React.ReactNode;\n color: string;\n animate: boolean;\n testID: string;\n}\n\n/** The icon slot; `glass` and `gradient` have no glyph of their own, so theirs is empty unless an `icon` is given — as on the web. */\nfunction IconSlot({ variant, icon, color, animate, testID }: IconSlotProps): React.JSX.Element {\n const theme = useUiTheme();\n const spin = useIconSpin(animate);\n const glyph = VARIANT_ICON[variant];\n return (\n <Animated.View testID={testID} style={[iconSlotStyle(theme), spin]}>\n {icon || (glyph ? <Icon name={glyph} size={ICON_SLOT.size} color={color} /> : null)}\n </Animated.View>\n );\n}\n\nfunction CloseButton({ label, ink, onPress, testID }: { label: string | undefined; ink: string; onPress: () => void; testID: string }): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <Pressable role=\"button\" aria-label={label} testID={testID} onPress={onPress} style={({ pressed }) => closeButtonStyle(theme, pressed)}>\n <Icon name=\"Close\" size={CLOSE_BUTTON.iconSize} color={ink} />\n </Pressable>\n );\n}\n\ninterface ContentProps {\n title?: string;\n description?: string;\n children?: React.ReactNode;\n ink: string;\n testId: string;\n}\n\nfunction AlertContent({ title, description, children, ink, testId }: ContentProps): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <View style={messageSlotStyle(theme)}>\n {title ? (\n <RNText testID={testIdFor(testId, 'title')} style={titleStyle(theme, ink, Boolean(description))}>\n {title}\n </RNText>\n ) : null}\n {description ? (\n <RNText testID={testIdFor(testId, 'message')} style={descriptionStyle(theme, ink)}>\n {description}\n </RNText>\n ) : null}\n {renderTextChildren(children, messageTextStyle(theme, ink))}\n </View>\n );\n}\n\n/** The dismiss sequence the web runs: mark closing, fire `onClose` 200ms in, stay until the collapse has run. */\nfunction useDismiss(onClose: (() => void) | undefined): { open: boolean; gone: boolean; close: () => void; onCollapsed: () => void } {\n const [closing, setClosing] = React.useState(false);\n const [gone, setGone] = React.useState(false);\n const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n React.useEffect(() => () => {\n if (timer.current) clearTimeout(timer.current);\n }, []);\n const close = (): void => {\n setClosing(true);\n timer.current = setTimeout(() => onClose?.(), CLOSE_DELAY_MS);\n };\n const onCollapsed = React.useCallback(() => setGone(true), []);\n return { open: !closing, gone, close, onCollapsed };\n}\n\nexport const Alert = React.forwardRef<View, AlertProps>((alertProps, ref) => {\n const {\n variant, color, glow, pulse, icon, showIcon, onClose, title, description, children, animate,\n // `role`, `announce` and `aria-live` all leave here and are resolved\n // TOGETHER below, off `alertProps` — see `resolveAnnouncement`.\n role: _role, announce: _announce,\n 'aria-atomic': ariaAtomic, 'aria-live': _ariaLive, closable, closeLabel, style, ...others\n } = resolveAlertProps(alertProps);\n const theme = useUiTheme();\n const testId = resolveTestId(others, 'alert') as string;\n const rest = withoutTestIdProps(others);\n const look = alertLook(theme, { variant, color, glow, pulse });\n const fadeIn = useFadeIn(animate);\n const dismiss = useDismiss(onClose);\n const announcement = resolveAnnouncement(alertProps, variant);\n\n if (dismiss.gone) return null;\n return (\n <Collapse open={dismiss.open} onCollapsed={dismiss.onCollapsed}>\n <Animated.View\n ref={ref}\n role={announcement.role as Role}\n aria-live={announcement['aria-live']}\n {...webAria({ 'aria-atomic': ariaAtomic })}\n tabIndex={0}\n testID={testId}\n style={[look.root, fadeIn, style]}\n {...rest}\n >\n {pulse ? <Pulse color={look.palette.main} radius={look.root.borderRadius as number} testID={testIdFor(testId, 'pulse')} /> : null}\n {showIcon ? <IconSlot variant={variant} icon={icon} color={look.iconColor} animate={animate} testID={testIdFor(testId, 'icon')} /> : null}\n <AlertContent title={title} description={description} ink={look.ink} testId={testId}>\n {children}\n </AlertContent>\n {closable ? (\n <View style={actionSlotStyle(theme)}>\n <CloseButton label={closeLabel} ink={look.ink} onPress={dismiss.close} testID={testIdFor(testId, 'close')} />\n </View>\n ) : null}\n </Animated.View>\n </Collapse>\n );\n});\n\nAlert.displayName = 'Alert';\n","import type { AlertBaseFields, AlertVariant } from './Alert.base';\nimport type { IconName } from '../../../icons/Icon.types';\n\ntype AlertDefaultedKeys = 'variant' | 'glow' | 'pulse' | 'showIcon' | 'animate' | 'role' | 'aria-atomic';\n\nexport const ALERT_DEFAULTS: Required<Pick<AlertBaseFields, AlertDefaultedKeys>> & { closable: false } = {\n variant: 'info',\n glow: false,\n pulse: false,\n showIcon: true,\n closable: false,\n animate: true,\n role: 'alert',\n 'aria-atomic': 'true',\n};\n\n/**\n * Generic over the renderer's own props: the web and the native `Alert` pass\n * different extras through, and both come back out untouched.\n */\nexport type ResolvedAlertProps<P extends AlertBaseFields> = P &\n Required<Pick<AlertBaseFields, AlertDefaultedKeys>>;\n\n// Strips explicitly-undefined props before the merge so `prop={undefined}` still\n// falls back to the default, the way a destructuring default would.\nconst definedProps = <P extends AlertBaseFields>(props: P): Partial<P> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<P>;\n\n// Through `unknown`: `closable: false` in the defaults belongs to the dismiss\n// union rather than to `AlertBaseFields`, so TypeScript cannot see the merge as\n// comparable to `P` although every field of `P` survives it untouched.\nexport const resolveAlertProps = <P extends AlertBaseFields>(props: P): ResolvedAlertProps<P> =>\n ({ ...ALERT_DEFAULTS, ...definedProps(props) }) as unknown as ResolvedAlertProps<P>;\n\n/** `danger` announces itself; everything else waits its turn. */\nexport const defaultAriaLive = (variant: AlertVariant): 'polite' | 'assertive' =>\n variant === 'danger' ? 'assertive' : 'polite';\n\n/**\n * The ARIA role each `announce` level is spelled with.\n *\n * Both roles carry an IMPLICIT live setting, and that implicit one is what\n * assistive tech acts on — `alert` is assertive, `status` is polite. Pairing\n * them here is what stops `role` and `aria-live` from contradicting each\n * other, which they do by default: every alert is `role=\"alert\"` regardless of\n * variant, so an `info` alert asks to be polite in one attribute and to\n * interrupt in the other.\n */\nexport const ANNOUNCE_ROLE: Record<NonNullable<AlertBaseFields['announce']>, string> = {\n assertive: 'alert',\n polite: 'status',\n};\n\n/**\n * The two attributes that decide whether an alert interrupts, resolved TOGETHER.\n *\n * Both renderers therefore let `role` and `announce` leave their destructure\n * unused (`_role`, `_announce`) and call this instead — the first because the\n * defaults have already answered it, the second because it must never reach\n * the DOM.\n *\n * Reads the caller's own props rather than the defaulted ones, because the\n * whole question is which of them the caller actually spelled:\n * {@link ALERT_DEFAULTS} supplies `role: 'alert'` for everything, so after the\n * merge there is no longer any difference between an alert that asked to\n * interrupt and one that never mentioned it.\n *\n * Precedence, most specific first — an explicit `role` or `aria-live` beats\n * `announce`, so a call site that already spells either by hand is untouched:\n *\n * 1. `role` / `aria-live` as given;\n * 2. {@link AlertBaseFields.announce}, which supplies both;\n * 3. today's behaviour — `ALERT_DEFAULTS.role` and {@link defaultAriaLive}.\n *\n * With none of the three named, the result is byte-for-byte what it was before\n * `announce` existed.\n */\nexport const resolveAnnouncement = (\n props: Pick<AlertBaseFields, 'announce' | 'role' | 'aria-live'>,\n variant: AlertVariant,\n): { role: string; 'aria-live': 'polite' | 'assertive' | 'off' } => {\n const announce = props.announce;\n return {\n role: props.role ?? (announce === undefined ? ALERT_DEFAULTS.role : ANNOUNCE_ROLE[announce]),\n 'aria-live': props['aria-live'] ?? announce ?? defaultAriaLive(variant),\n };\n};\n\nexport const testIdFor = (base: string | undefined, suffix: string): string =>\n base ? `${base}-${suffix}` : `alert-${suffix}`;\n\n/**\n * The glyph each semantic variant carries, by the shared icon set's name.\n * `glass` and `gradient` carry none of their own: the web renders an empty\n * icon slot for them unless the caller passes an `icon`, and so does native.\n */\nexport const VARIANT_ICON: Partial<Record<AlertVariant, IconName>> = {\n info: 'Info',\n success: 'CheckCircle',\n warning: 'Warning',\n danger: 'Error',\n};\n","import type { AlertVariant } from './Alert.base';\nimport { alpha, darken, lighten } from '../../../tokens/color';\nimport { contrastText, type UiGreyStep, type UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `Alert` RENDERERS DRAW WITH.\n *\n * `Alert.styles.tsx` / `Alert.tsx` (MUI) and `Alert.native.tsx` (React\n * Native) read this one table. Spacing is in SPACING UNITS where the web\n * writes `theme.spacing(n)`; durations are ms (the web turns them into `s`\n * through {@link seconds} so its emitted CSS is byte-for-byte what it was);\n * everything else is px, a ratio or an alpha. The hover, active and focus\n * numbers are here too although only the DOM can honour them — a number the\n * web draws with belongs in the table whether or not native can reach it.\n */\n\n/** The root: 12px corners, 14px 16px of padding, one 300ms curve for everything. */\nexport const ALERT_RADIUS_UNITS = 1.5;\nexport const ALERT_PADDING_UNITS = { vertical: 1.75, horizontal: 2 } as const;\nexport const ALERT_TRANSITION_MS = 300;\nexport const ALERT_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n/** Mount: the web's `fadeInScale` keyframes and the icon's `iconRotate`. */\nexport const FADE_IN = { ms: 300, scale: 0.95, lift: 10 } as const;\nexport const ICON_SPIN = { ms: 600, from: 0.8, mid: 1.1 } as const;\n/** Dismiss: MUI `Collapse` runs 300ms; `onClose` fires 200ms in. */\nexport const COLLAPSE_MS = 300;\nexport const CLOSE_DELAY_MS = 200;\n\n/** The message column: 8px between title, description and children; 0.95rem body on 1.5. */\nexport const MESSAGE_GAP_UNITS = 1;\nexport const MESSAGE_FONT_SIZE = 15.2;\nexport const MESSAGE_LINE_HEIGHT = 1.5;\n/** A control inside the message gets an edge: 4px above, a hairline at 0.45 of the hue. */\nexport const MESSAGE_BUTTON = { marginTopUnits: 0.5, borderAlpha: 0.45 } as const;\n\n/** The title: 1.05rem at 600; MUI's `AlertTitle` lifts it 2px; 4px below it when a description follows. */\nexport const TITLE = { fontSize: 16.8, fontWeight: 600, marginTop: -2, marginBottomUnits: 0.5 } as const;\n/** The description: 0.925rem, slightly faded. */\nexport const DESCRIPTION = { fontSize: 14.8, opacity: 0.9 } as const;\n\n/** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */\nexport const ICON_SLOT = { size: 22, opacity: 0.9, marginRightUnits: 1.75, paddingTopUnits: 0.25, paddingBottom: 7 } as const;\n/** The action slot: MUI's `4px 0 0 16px` with the 16px ours, pushed right, 8px into the padding. */\nexport const ACTION_SLOT = { paddingLeftUnits: 2, paddingTop: 4, marginRight: -8 } as const;\n/** The close button: MUI's small `IconButton` (5px padding, 18px glyph) at 0.7. */\nexport const CLOSE_BUTTON = { padding: 5, iconSize: 18, opacity: 0.7, washAlpha: 0.1 } as const;\n\n/**\n * A semantic Alert's surface and ink: an OPAQUE tint of the hue with a dark\n * ink of the same hue — MUI's own `standard` recipe, at its ratios. See\n * `semanticSurface` in `Alert.styles.tsx` for why not `alpha(main, 0.1)`.\n */\nexport const SEMANTIC_SURFACE = { tint: { light: 0.9, dark: 0.8 }, ink: 0.6, borderAlpha: 0.35 } as const;\n/** `glass`: 85% paper under a 20px blur, a 0.4 divider hairline. */\nexport const GLASS = { backgroundAlpha: 0.85, borderAlpha: 0.4, blur: 20, saturatePercent: 180 } as const;\n/**\n * `gradient`: light→dark at 0.9 along 135°, a 0.2 white shimmer sweeping 1000px every 3s.\n *\n * It carries no hover of its own, and that is load-bearing rather than an\n * omission. `alertVariantStyles` is spread AFTER the root's `'&:hover'` in the\n * same object literal, so a second `'&:hover'` key does not merge with it — it\n * REPLACES it. While this variant had one, `gradient` was the only alert that\n * brightened on hover while every other variant darkened, and the only one to\n * lose the shimmer reveal the root's hover performs.\n */\nexport const GRADIENT = {\n angleDeg: 135,\n stopAlpha: 0.9,\n shimmerAlpha: 0.2,\n shimmerMs: 3000,\n shimmerTravel: 1000,\n} as const;\n\n/** Emphasis: the glow's shadow and brightness, the pulse's wash. */\nexport const GLOW = { blur: 20, spread: 5, alpha: 0.3, brightness: 1.05 } as const;\nexport const PULSE = { alpha: 0.2, ms: 2000, spread: 10 } as const;\n\n/**\n * Pointer states — DOM only, kept so the web derives them.\n *\n * HOVER and ACTIVE carry NO geometry, and that is the point rather than an\n * omission. They used to lift the card 3px, scale it 1.01, grow a 20px shadow\n * and spin the icon 10deg at 1.15 — four things moving at once on a surface\n * that is not a control, which made a page of alerts twitch under the pointer.\n *\n * Both are a TINT now: a flat inset layer over the surface. Two mechanisms\n * came before it and each failed on a case the next had to fix. Dropping the\n * element's `opacity` composites toward the PAGE, so it inverted the hover on\n * a light tint (L* 95.0 idle, 89.1 hovered, 91.1 pressed) and vanished on a\n * dark one. A `filter: brightness()` fixed the direction but is MULTIPLICATIVE,\n * so it moved a near-black `glass` by four counts (ΔE76 1.71, under the JND)\n * and Banner's 10%-alpha wash by ΔE76 0.44. A layer is additive: it reads the\n * same on an opaque tint, a translucent wash and a gradient, and because it\n * paints above the background and below the content the ink keeps its own\n * contrast.\n */\nexport const HOVER = { tintAlpha: 0.06 } as const;\n\n/**\n * The press: a 20% tint LAYER, eased back fast.\n *\n * The layer is the point. The first attempt dropped the whole element's\n * opacity, which composites toward the PAGE and so behaves differently on\n * every surface it is asked about. Measured: over a light page it made a light\n * tint LIGHTER (L* 95.0 idle, 89.1 hovered, 91.1 pressed), so pushing the\n * surface looked like the pointer leaving; over a dark page it landed back on\n * the idle surface (ΔE76 0.82 on `glass`); on `gradient` it washed white body\n * copy to 2.31:1, under AA; and it diluted the ink during a text-selection\n * drag. A `brightness()` step instead of it fixed the direction but not the\n * reach — a multiplier does nothing to a near-black `glass` in dark mode\n * (ΔE76 1.71) and nothing to Banner's 10%-alpha wash (ΔE76 0.44), because it\n * scales only what the element already paints.\n *\n * An inset shadow at 100vmax is a flat tint over the whole surface: ADDITIVE,\n * so it reads the same on an opaque tint, a translucent wash and a gradient;\n * painted above the background and below the content, so the ink keeps its\n * own contrast; and animatable, which `background-image` is not.\n *\n * `ms` is 250 and not the 1000 first asked for, and the reason is that ONE\n * property carries both states. CSS runs a transition from the DESTINATION\n * state's declaration, and entering hover and releasing a press share that\n * destination — so they cannot have different durations without a second\n * animatable property, and both free pseudo-elements are already spent on the\n * `gradient` shimmer and the `pulse` wash. At 1000ms the hover inherited the\n * second: crossing an alert in 300ms peaked at a ≈ 0.024, under the JND, and\n * for ~360ms the alert you had just LEFT was darker than the one under the\n * pointer. A fast press-return is the smaller loss, and it is the call the\n * product owner made when shown both.\n */\nexport const ACTIVE = { tintAlpha: 0.2, ms: 250 } as const;\n\nexport const FOCUS = { ringWidth: 2, ringAlpha: 1, offset: 2 } as const;\n\n/** `neutral` has no palette slot; the web has always drawn it from three greys. */\nexport const NEUTRAL_GREY: Record<'main' | 'light' | 'dark', UiGreyStep> = { main: 500, light: 300, dark: 700 };\n\n/** A duration as the CSS the web has always emitted: `2000` → `2s`, `300` → `0.3s`. */\nexport const seconds = (ms: number): string => `${ms / 1000}s`;\n\n/** The palette shape the web's `getColorFromTheme` returns — a main plus optional shades. */\nexport interface AlertPalette {\n main: string;\n light?: string;\n dark?: string;\n}\n\n/**\n * The renderer-free twin of the web's `getColorFromTheme`: a variant or\n * colour name to its palette, `neutral` from the greys, anything unknown\n * (`glass`, `gradient`) to `info`.\n */\nexport function alertPalette(theme: UiTheme, key: string | undefined): AlertPalette {\n switch (key) {\n case 'info':\n case 'success':\n case 'warning':\n case 'danger':\n case 'primary':\n case 'secondary':\n return theme.palette[key];\n case 'neutral':\n return {\n main: theme.palette.grey[NEUTRAL_GREY.main],\n light: theme.palette.grey[NEUTRAL_GREY.light],\n dark: theme.palette.grey[NEUTRAL_GREY.dark],\n };\n default:\n return theme.palette.info;\n }\n}\n\n/** What a variant paints: its fill, its ink, its hairline if any, and the colour of its glyph. */\nexport interface AlertSurface {\n backgroundColor: string;\n color: string;\n borderColor?: string;\n iconColor: string;\n}\n\nexport const SEMANTIC_VARIANTS: ReadonlySet<AlertVariant> = new Set(['info', 'success', 'warning', 'danger']);\n\n/** The opaque tint and same-hue ink, inverted for dark mode; the hairline keeps its alpha. */\nexport function semanticSurface(theme: UiTheme, palette: AlertPalette): AlertSurface {\n const dark = theme.mode === 'dark';\n return {\n backgroundColor: dark\n ? darken(palette.main, SEMANTIC_SURFACE.tint.dark)\n : lighten(palette.main, SEMANTIC_SURFACE.tint.light),\n color: dark ? lighten(palette.main, SEMANTIC_SURFACE.ink) : darken(palette.main, SEMANTIC_SURFACE.ink),\n borderColor: alpha(palette.main, SEMANTIC_SURFACE.borderAlpha),\n iconColor: palette.main,\n };\n}\n\nexport function glassSurface(theme: UiTheme): AlertSurface {\n return {\n backgroundColor: alpha(theme.palette.background.paper, GLASS.backgroundAlpha),\n color: theme.palette.text.primary,\n borderColor: alpha(theme.palette.divider, GLASS.borderAlpha),\n iconColor: theme.palette.primary.main,\n };\n}\n\n/** The gradient's two stops; a renderer with no gradient fill paints `from`. */\nexport function gradientStops(palette: AlertPalette): { from: string; to: string } {\n return {\n from: alpha(palette.light || palette.main, GRADIENT.stopAlpha),\n to: alpha(palette.dark || palette.main, GRADIENT.stopAlpha),\n };\n}\n\nexport function gradientSurface(palette: AlertPalette): AlertSurface {\n const ink = contrastText(palette.main);\n return { backgroundColor: gradientStops(palette).from, color: ink, iconColor: ink };\n}\n\n/** The surface for a variant, `glass` and `gradient` included. */\nexport function alertSurface(theme: UiTheme, variant: AlertVariant, palette: AlertPalette): AlertSurface {\n if (variant === 'glass') return glassSurface(theme);\n if (variant === 'gradient') return gradientSurface(palette);\n return semanticSurface(theme, palette);\n}\n","import type { TextStyle, ViewStyle } from 'react-native';\n\nimport type { AlertVariant } from './Alert.base';\nimport {\n ACTION_SLOT,\n ALERT_PADDING_UNITS,\n ALERT_RADIUS_UNITS,\n type AlertPalette,\n alertPalette,\n alertSurface,\n CLOSE_BUTTON,\n DESCRIPTION,\n GLOW,\n ICON_SLOT,\n MESSAGE_FONT_SIZE,\n MESSAGE_GAP_UNITS,\n MESSAGE_LINE_HEIGHT,\n TITLE,\n} from './Alert.metrics';\nimport { alpha } from '../../../tokens/color';\nimport { muiTypeStyle } from '../../../tokens/mui-type';\nimport type { UiTheme } from '../../../tokens/theme';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\n/**\n * THE PAINT, KEPT APART FROM THE STRUCTURE.\n *\n * `Alert.native.tsx` reads as what renders where; this file reads as\n * arithmetic — the same palette slots, alphas and px the web's\n * `Alert.styles.tsx` derives from `Alert.metrics.ts`.\n */\n\nexport interface AlertLookArgs {\n variant: AlertVariant;\n color: ColorValue | undefined;\n glow: boolean;\n pulse: boolean;\n}\n\nexport interface AlertLook {\n palette: AlertPalette;\n /** What the words are set in. */\n ink: string;\n iconColor: string;\n root: ViewStyle;\n}\n\n/**\n * The root's paint. The web keeps `overflow: hidden` (its pulse wash is\n * clipped to the card, as it is here); only the glow opens it, because a\n * view's own shadow is clipped by its own overflow on a device.\n */\nexport function alertLook(theme: UiTheme, a: AlertLookArgs): AlertLook {\n const palette = alertPalette(theme, a.color ?? a.variant);\n const surface = alertSurface(theme, a.variant, palette);\n const root: ViewStyle = {\n flexDirection: 'row',\n paddingVertical: theme.spacing(ALERT_PADDING_UNITS.vertical),\n paddingHorizontal: theme.spacing(ALERT_PADDING_UNITS.horizontal),\n borderRadius: theme.spacing(ALERT_RADIUS_UNITS),\n overflow: a.glow ? 'visible' : 'hidden',\n backgroundColor: surface.backgroundColor,\n ...(surface.borderColor ? { borderWidth: 1, borderColor: surface.borderColor } : {}),\n ...(a.glow\n ? {\n boxShadow: `0 0 ${GLOW.blur}px ${GLOW.spread}px ${alpha(palette.main, GLOW.alpha)}`,\n filter: `brightness(${GLOW.brightness})`,\n }\n : {}),\n };\n return { palette, ink: surface.color, iconColor: surface.iconColor, root };\n}\n\n/** The message column: 8px between its lines, allowed to shrink so long text wraps beside the icon. */\nexport const messageSlotStyle = (theme: UiTheme): ViewStyle => ({\n flexDirection: 'column',\n gap: theme.spacing(MESSAGE_GAP_UNITS),\n flexShrink: 1,\n minWidth: 0,\n});\n\n/** A string child: MUI's `body2` letter-spacing at 0.95rem on the message's 1.5. */\nexport const messageTextStyle = (theme: UiTheme, ink: string): TextStyle => ({\n ...muiTypeStyle(theme, 'body2', MESSAGE_FONT_SIZE),\n lineHeight: MESSAGE_FONT_SIZE * MESSAGE_LINE_HEIGHT,\n color: ink,\n});\n\n/** MUI's `AlertTitle` (a `body1` Typography) at 1.05rem and 600, lifted 2px, 4px above a description. */\nexport const titleStyle = (theme: UiTheme, ink: string, hasDescription: boolean): TextStyle => ({\n ...muiTypeStyle(theme, 'body1', TITLE.fontSize),\n fontWeight: `${TITLE.fontWeight}`,\n color: ink,\n marginTop: TITLE.marginTop,\n marginBottom: hasDescription ? theme.spacing(TITLE.marginBottomUnits) : 0,\n});\n\n/** The description: 0.925rem on the message's 1.5, faded to 0.9. */\nexport const descriptionStyle = (theme: UiTheme, ink: string): TextStyle => ({\n ...muiTypeStyle(theme, 'body2', DESCRIPTION.fontSize),\n lineHeight: DESCRIPTION.fontSize * MESSAGE_LINE_HEIGHT,\n color: ink,\n opacity: DESCRIPTION.opacity,\n});\n\n/** MUI's `.MuiAlert-icon` with the web's overrides: first-line aligned, 14px from the words, 2px down. */\nexport const iconSlotStyle = (theme: UiTheme): ViewStyle => ({\n alignSelf: 'flex-start',\n alignItems: 'center',\n marginRight: theme.spacing(ICON_SLOT.marginRightUnits),\n paddingTop: theme.spacing(ICON_SLOT.paddingTopUnits),\n paddingBottom: ICON_SLOT.paddingBottom,\n opacity: ICON_SLOT.opacity,\n});\n\n/** MUI's `.MuiAlert-action`: top-aligned, pushed to the right edge, 16px off the text. */\nexport const actionSlotStyle = (theme: UiTheme): ViewStyle => ({\n alignItems: 'flex-start',\n paddingTop: ACTION_SLOT.paddingTop,\n paddingLeft: theme.spacing(ACTION_SLOT.paddingLeftUnits),\n marginLeft: 'auto',\n marginRight: ACTION_SLOT.marginRight,\n});\n\n/** MUI's small `IconButton` at 0.7; pressed stands in for the web's hover (full opacity, a faint wash). */\nexport const closeButtonStyle = (theme: UiTheme, pressed: boolean): ViewStyle => ({\n padding: CLOSE_BUTTON.padding,\n borderRadius: theme.radius.full,\n opacity: pressed ? 1 : CLOSE_BUTTON.opacity,\n backgroundColor: pressed ? alpha(theme.palette.action.hover, CLOSE_BUTTON.washAlpha) : 'transparent',\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,OAEK;;;ACPA,IAAM,iBAA4F;AAAA,EACvG,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,MAAM;AAAA,EACN,eAAe;AACjB;AAWA,IAAM,eAAe,CAA4B,UAC/C,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAKK,IAAM,oBAAoB,CAA4B,WAC1D,EAAE,GAAG,gBAAgB,GAAG,aAAa,KAAK,EAAE;AAGxC,IAAM,kBAAkB,CAAC,YAC9B,YAAY,WAAW,cAAc;AAYhC,IAAM,gBAA0E;AAAA,EACrF,WAAW;AAAA,EACX,QAAQ;AACV;AA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RUPTS a screen reader, or waits its turn.
73
+ *
74
+ * Sets `role` and `aria-live` together, which is the whole point of it:
75
+ * those two disagree by default and the disagreement is invisible. An alert
76
+ * gets `role="alert"` from {@link ALERT_DEFAULTS} whatever its variant, and
77
+ * `role="alert"` is IMPLICITLY an assertive live region — so a `polite`
78
+ * `aria-live` beside it is contradicted rather than honoured, and several
79
+ * screen readers interrupt anyway. A caller who wants a quiet announcement
80
+ * has to know that the trick is `role="status"`, which is implicitly polite.
81
+ *
82
+ * `announce` is that knowledge, spelled once:
83
+ *
84
+ * | value | `role` | `aria-live` |
85
+ * |---|---|---|
86
+ * | `'assertive'` | `alert` | `assertive` |
87
+ * | `'polite'` | `status` | `polite` |
88
+ *
89
+ * Unset, nothing changes: the role stays `alert` and the live setting is
90
+ * still derived from the variant ({@link defaultAriaLive}). An explicit
91
+ * `role` or `aria-live` still wins over both, so an existing call site that
92
+ * spells either by hand keeps exactly what it spelled.
93
+ */
94
+ announce?: 'polite' | 'assertive';
95
+ /**
96
+ * ARIA role for the alert. Prefer {@link AlertBaseFields.announce}, which
97
+ * keeps this and `aria-live` consistent; this overrides it.
73
98
  */
74
99
  role?: string;
75
100
  /**
76
- * ARIA live region setting
101
+ * ARIA live region setting. Prefer {@link AlertBaseFields.announce}, which
102
+ * keeps this and `role` consistent; this overrides it.
77
103
  */
78
104
  'aria-live'?: 'polite' | 'assertive' | 'off';
79
105
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.base.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE5F;;;;;;;;;;;;GAYG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GAAG,KAAK,CAAC;IAE7C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,YAAY,CAAC"}
@@ -12,6 +12,45 @@ export type ResolvedAlertProps<P extends AlertBaseFields> = P & Required<Pick<Al
12
12
  export declare const resolveAlertProps: <P extends AlertBaseFields>(props: P) => ResolvedAlertProps<P>;
13
13
  /** `danger` announces itself; everything else waits its turn. */
14
14
  export declare const defaultAriaLive: (variant: AlertVariant) => "polite" | "assertive";
15
+ /**
16
+ * The ARIA role each `announce` level is spelled with.
17
+ *
18
+ * Both roles carry an IMPLICIT live setting, and that implicit one is what
19
+ * assistive tech acts on — `alert` is assertive, `status` is polite. Pairing
20
+ * them here is what stops `role` and `aria-live` from contradicting each
21
+ * other, which they do by default: every alert is `role="alert"` regardless of
22
+ * variant, so an `info` alert asks to be polite in one attribute and to
23
+ * interrupt in the other.
24
+ */
25
+ export declare const ANNOUNCE_ROLE: Record<NonNullable<AlertBaseFields['announce']>, string>;
26
+ /**
27
+ * The two attributes that decide whether an alert interrupts, resolved TOGETHER.
28
+ *
29
+ * Both renderers therefore let `role` and `announce` leave their destructure
30
+ * unused (`_role`, `_announce`) and call this instead — the first because the
31
+ * defaults have already answered it, the second because it must never reach
32
+ * the DOM.
33
+ *
34
+ * Reads the caller's own props rather than the defaulted ones, because the
35
+ * whole question is which of them the caller actually spelled:
36
+ * {@link ALERT_DEFAULTS} supplies `role: 'alert'` for everything, so after the
37
+ * merge there is no longer any difference between an alert that asked to
38
+ * interrupt and one that never mentioned it.
39
+ *
40
+ * Precedence, most specific first — an explicit `role` or `aria-live` beats
41
+ * `announce`, so a call site that already spells either by hand is untouched:
42
+ *
43
+ * 1. `role` / `aria-live` as given;
44
+ * 2. {@link AlertBaseFields.announce}, which supplies both;
45
+ * 3. today's behaviour — `ALERT_DEFAULTS.role` and {@link defaultAriaLive}.
46
+ *
47
+ * With none of the three named, the result is byte-for-byte what it was before
48
+ * `announce` existed.
49
+ */
50
+ export declare const resolveAnnouncement: (props: Pick<AlertBaseFields, "announce" | "role" | "aria-live">, variant: AlertVariant) => {
51
+ role: string;
52
+ "aria-live": "polite" | "assertive" | "off";
53
+ };
15
54
  export declare const testIdFor: (base: string | undefined, suffix: string) => string;
16
55
  /**
17
56
  * The glyph each semantic variant carries, by the shared icon set's name.
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,KAAK,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;AAEzG,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAA;CASnG,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,eAAe,IAAI,CAAC,GAC3D,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAYtD,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,eAAe,EAAE,OAAO,CAAC,KAAG,kBAAkB,CAAC,CAAC,CACP,CAAC;AAEtF,iEAAiE;AACjE,eAAO,MAAM,eAAe,GAAI,SAAS,YAAY,KAAG,QAAQ,GA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I,CAAC;IACnD,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,OAAO,EACP,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,UAAU,EACV,IAAI,GACL,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwDxC"}
1
+ {"version":3,"file":"CategoryPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategoryPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AASxD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAChD,kBAAkB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACnD,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,OAAO,EACP,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,UAAU,EACV,IAAI,GACL,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAyDxC"}
@@ -13,6 +13,12 @@ interface PanelListProps {
13
13
  loading: boolean;
14
14
  showCounts: boolean;
15
15
  allowParentSelection: boolean;
16
+ /**
17
+ * True when the tree has a level BELOW the subcategories. It turns the
18
+ * section-heading treatment off — see {@link CategoryNodeRows}. Derived from
19
+ * the options the panel state already holds, never a caller's decision.
20
+ */
21
+ deepTree: boolean;
16
22
  isExpanded: (categoryId: string) => boolean;
17
23
  onToggleExpanded: (categoryId: string) => void;
18
24
  onActivateCategory: (group: CategoryGroup) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryPanelList.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategoryPanelList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAYxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,UAAU,cAAc;IACtB,gEAAgE;IAChE,IAAI,EAAE,kBAAkB,CAAC;IACzB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5C,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,kBAAkB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACnD,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,gBAAgB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;CACpB;AAoID,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA4C1E"}
1
+ {"version":3,"file":"CategoryPanelList.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategoryPanelList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAQxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,UAAU,cAAc;IACtB,gEAAgE;IAChE,IAAI,EAAE,kBAAkB,CAAC;IACzB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5C,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,kBAAkB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACnD,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,gBAAgB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;CACpB;AA0ID,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA4C1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryQuickActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategoryQuickActions.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAgB/D;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,UAAU,EACV,IAAI,GACL,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiCpB"}
1
+ {"version":3,"file":"CategoryQuickActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategoryQuickActions.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAgB/D;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,UAAU,EACV,IAAI,GACL,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmCpB"}
@@ -13,18 +13,20 @@ export declare function CategoryCheckbox({ state }: {
13
13
  export declare function CategoryRadio({ on }: {
14
14
  on: boolean;
15
15
  }): React.JSX.Element;
16
- interface CategoryHeadRowProps {
16
+ interface CategoryTreeRowProps {
17
17
  option: CategorySelectOption;
18
18
  query: string;
19
+ /** 0 for a top-level category; each level below indents one more step. */
20
+ depth: number;
21
+ /** True when there is something under this row to fold. */
22
+ branch: boolean;
19
23
  expanded: boolean;
20
24
  active: boolean;
21
25
  sheet: boolean;
22
- /** Absent in leaf-only mode, where the category is a heading with no checkbox. */
26
+ /** Absent where the row cannot be picked — a category acting as a frame. */
23
27
  checkState?: CategoryCheckState;
24
28
  /** Single-select draws a radio for the control: choosing a row is exclusive. */
25
29
  single: boolean;
26
- /** False for a childless category — there is nothing under it to disclose. */
27
- expandable: boolean;
28
30
  selectedCount: number;
29
31
  showCounts: boolean;
30
32
  onToggleExpanded: () => void;
@@ -33,28 +35,14 @@ interface CategoryHeadRowProps {
33
35
  copy: CategorySelectCopy;
34
36
  }
35
37
  /**
36
- * A top-level category row: disclosure chevron, optional checkbox, name, meta.
38
+ * One row of the tree: disclosure chevron, optional control, name, meta.
37
39
  *
38
- * The chevron is its OWN button inside the row button — clicking it only folds,
39
- * while clicking the row does the row's job (expand as a heading, or tick when
40
- * the category is selectable). A CHILDLESS category has neither a fold nor a
41
- * heading to be: it draws no chevron, and it carries the control, because it is
42
- * itself the leaf.
40
+ * The chevron is its OWN button inside the row — clicking it only folds, while
41
+ * clicking the row does the row's job (expand as a frame, or mark when the row
42
+ * is selectable). A LEAF has neither a fold nor a frame to be: it draws no
43
+ * chevron, and it always carries the control, because it is what you pick.
43
44
  */
44
- export declare function CategoryHeadRow({ option, query, expanded, active, sheet, checkState, single, expandable, selectedCount, showCounts, onToggleExpanded, onActivate, dataTestId, copy, }: CategoryHeadRowProps): React.JSX.Element;
45
- interface SubcategoryRowProps {
46
- option: CategorySelectOption;
47
- query: string;
48
- selected: boolean;
49
- active: boolean;
50
- sheet: boolean;
51
- /** Single-select mode draws a radio; multi-select draws a checkbox. */
52
- single: boolean;
53
- showCounts: boolean;
54
- onActivate: () => void;
55
- dataTestId: string;
56
- }
57
- export declare function SubcategoryRow({ option, query, selected, active, sheet, single, showCounts, onActivate, dataTestId, }: SubcategoryRowProps): React.JSX.Element;
45
+ export declare function CategoryTreeRow({ option, query, depth, branch, expanded, active, sheet, checkState, single, selectedCount, showCounts, onToggleExpanded, onActivate, dataTestId, copy, }: CategoryTreeRowProps): React.JSX.Element;
58
46
  /** The category as a non-interactive heading (single-select, leaf-only). */
59
47
  export declare function CategorySectionHeading({ option, query, }: {
60
48
  option: CategorySelectOption;
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryRows.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategoryRows.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAa7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,0CAA0C;AAC1C,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,KAAK,GACN,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAepB;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAO5F;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,OAAO,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAExE;AAED,UAAU,oBAAoB;IAC5B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,kFAAkF;IAClF,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,gFA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G,CAAC,OAAO,CAMpB"}
1
+ {"version":3,"file":"CategoryRows.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategoryRows.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAc7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,0CAA0C;AAC1C,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,KAAK,GACN,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAepB;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAO5F;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,OAAO,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAExE;AAED,UAAU,oBAAoB;IAC5B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,4EAA4E;IAC5E,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,gFAAgF;IAChF,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAsED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,KAAK,EACL,UAAU,EACV,MAAM,EACN,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,IAAI,GACL,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+B1C;AAED,4EAA4E;AAC5E,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,KAAK,GACN,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAMpB"}
@@ -1,18 +1,21 @@
1
1
  import type { CategorySelectProps } from './CategorySelect.types';
2
2
  /**
3
- * A hierarchical category picker: categories as the frame, subcategories as the
4
- * thing you choose.
3
+ * A hierarchical category picker: categories as the frame, whatever is filed
4
+ * under them as the thing you choose.
5
5
  *
6
6
  * Two modes off one component. `multi` is the FILTER — ticks accumulate in a
7
7
  * draft and reach `onChange` only on Apply, so the list behind the panel does not
8
8
  * reload on every click. `single` is the "move to…" picker, where choosing a row
9
9
  * commits immediately because there is nothing to batch.
10
10
  *
11
- * The tree opens fully expanded: nothing a search could match is hidden behind a
12
- * disclosure. Selected categories pin above the list so they survive scrolling
13
- * and searching, search is accent-insensitive (`agua` finds `Águas`), and the
14
- * whole tree is keyboard-drivable — ↑↓ to move, → to open, ← to close, Space to
15
- * mark, Enter to apply, Esc to cancel.
11
+ * The tree nests as deep as the payload does — a picker can file ITEMS under a
12
+ * subcategory and get a third storey with no extra configuration. Opening
13
+ * unfolds the top level, and a search reveals every hit whatever is folded.
14
+ *
15
+ * Selected categories pin above the list so they survive scrolling and
16
+ * searching, search is accent-insensitive (`agua` finds `Águas`), and the whole
17
+ * tree is keyboard-drivable — ↑↓ to move, → to open, ← to close, Space to mark,
18
+ * Enter to apply, Esc to cancel.
16
19
  *
17
20
  * Under {@link METRICS.sheetBreakpoint} the panel becomes a bottom sheet, which
18
21
  * is the only way a 290px-tall list stays usable one-handed.
@@ -1 +1 @@
1
- {"version":3,"file":"CategorySelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategorySelect.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AA2EjF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+E5E"}
1
+ {"version":3,"file":"CategorySelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategorySelect.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AA0EjF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+E5E"}
@@ -25,6 +25,8 @@ export declare const METRICS: {
25
25
  readonly rowRadius: 8;
26
26
  readonly boxSize: 18;
27
27
  readonly chevronButton: 22;
28
+ /** Extra left padding per level of nesting. */
29
+ readonly rowIndentStep: 14;
28
30
  readonly footerButton: 32;
29
31
  readonly sheetFooterButton: 38;
30
32
  /** Below this width the panel becomes a bottom sheet. */
@@ -50,6 +52,15 @@ export declare const chipSx: (theme: Theme) => CSSObject;
50
52
  export declare const listSx: (sheet: boolean) => CSSObject;
51
53
  /** A row. `active` is the KEYBOARD cursor — deliberately distinct from hover. */
52
54
  export declare const rowSx: (theme: Theme, active: boolean, sheet: boolean) => CSSObject;
55
+ /**
56
+ * How far a row sits in from the panel edge, by depth.
57
+ *
58
+ * One step per level, on top of {@link rowSx}'s own 8px gutter — depth 0 keeps
59
+ * that gutter, and every level below it adds `METRICS.rowIndentStep`. Absolute
60
+ * like the rest of this file: the step is the design's own 14px, not a spacing
61
+ * multiple that would round it.
62
+ */
63
+ export declare const rowIndent: (depth: number) => CSSObject;
53
64
  export declare const rowNameSx: (theme: Theme, isCategory: boolean) => CSSObject;
54
65
  export declare const rowMetaSx: (theme: Theme, selected: boolean) => CSSObject;
55
66
  /** The query hit inside a row label. */
@@ -1 +1 @@
1
- {"version":3,"file":"CategorySelect.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/CategorySelect/CategorySelect.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAIlF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;IAclB,yDAAyD;;CAEjD,CAAC;AAWX,sFAAsF;AACtF,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,EAAE,UAAU,OAAO,EAAE,MAAM,OAAO,KAAG,SA0B1E,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,KAAG,SAU5C,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,cAAc,EAAE,SAc5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,OAAO,KAAG,SAO/C,CAAC;AAEH,0BAA0B;AAC1B,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,KAAG,SAUrC,CAAC;AAEH,wEAAwE;AACxE,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,KAAG,SAkBrC,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,OAAO,OAAO,KAAG,SAGzD,CAAC;AAEH,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,KAAG,SAItC,CAAC;AAEH,eAAO,MAAM,aAAa,GAAI,OA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,SACgC,CAAC;AAE3E,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,EAAE,YAAY,OAAO,KAAG,SAS5D,CAAC;AAEH,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,EAAE,UAAU,OAAO,KAAG,SAK1D,CAAC;AAEH,wCAAwC;AACxC,eAAO,MAAM,MAAM,EAAE,SAKpB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,KAAK,EAAE,MAAM,OAAO,KAAG,SAc5D,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,EAAE,OAAO,KAAK,GAAG,SAAS,GAAG,IAAI,KAAG,SAWzE,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,KAAG,SAK3C,CAAC;AAEH,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,EAAE,IAAI,OAAO,KAAG,SAUlD,CAAC;AAEH,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,KAAG,SAQ3C,CAAC;AAEH,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,KAAG,SAQtC,CAAC;AAEH,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,KAAG,SAWrC,CAAC;AAEH,mDAAmD;AACnD,eAAO,MAAM,UAAU,EAAE,SAIxB,CAAC"}
@@ -20,10 +20,18 @@ export interface CategorySelectOption {
20
20
  */
21
21
  count?: number;
22
22
  }
23
- /** A top-level category together with the subcategories nested under it. */
23
+ /**
24
+ * One node of the category tree: an option together with whatever sits under it.
25
+ *
26
+ * Recursive rather than "a category and its flat subcategories" because the tree
27
+ * a caller hands over is not always two deep — a picker can file ITEMS under a
28
+ * subcategory, and the level below still has to nest, fold and search like the
29
+ * one above it. A node with an empty `subcategories` is the leaf.
30
+ */
24
31
  export interface CategoryGroup {
25
32
  category: CategorySelectOption;
26
- subcategories: CategorySelectOption[];
33
+ /** The nodes directly below it, each a group in its own right. */
34
+ subcategories: CategoryGroup[];
27
35
  }
28
36
  /** One entry in the "selected" summary: a whole category, or a single leaf. */
29
37
  export interface CategorySelectionChip {