@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
@@ -1,22 +1,22 @@
1
1
  "use client";
2
2
  import {
3
3
  CategorySelect
4
- } from "../../../../chunk-JM64OEU6.js";
4
+ } from "../../../../chunk-WAPJ2DL3.js";
5
5
  import "../../../../chunk-LMXWI3DD.js";
6
- import "../../../../chunk-TPLKJHNN.js";
7
- import "../../../../chunk-ZUIJ3N7N.js";
8
- import "../../../../chunk-OVLNF4AZ.js";
9
- import "../../../../chunk-4TXIZ5WI.js";
10
- import "../../../../chunk-AJ6XEO4E.js";
11
- import "../../../../chunk-ZAB65STX.js";
12
- import "../../../../chunk-KIHQE5YA.js";
13
- import "../../../../chunk-OFOYMZRY.js";
6
+ import "../../../../chunk-ZC7RQDZ5.js";
7
+ import "../../../../chunk-V6Z4XS3I.js";
8
+ import "../../../../chunk-P7IVAMAU.js";
9
+ import "../../../../chunk-CJUOBTLL.js";
10
+ import "../../../../chunk-ZUY65MFH.js";
11
+ import "../../../../chunk-XHHR6G35.js";
12
+ import "../../../../chunk-GVDJQMFI.js";
13
+ import "../../../../chunk-NPN7JTRM.js";
14
14
  import "../../../../chunk-DMNZD3Q7.js";
15
- import "../../../../chunk-TFO6GBW7.js";
16
- import "../../../../chunk-2GB5CIN6.js";
17
- import "../../../../chunk-ISH42UC7.js";
18
- import "../../../../chunk-WWM2YTW4.js";
19
- import "../../../../chunk-LR6MSKTT.js";
15
+ import "../../../../chunk-ZS44PY7T.js";
16
+ import "../../../../chunk-RZVUY2MO.js";
17
+ import "../../../../chunk-USJPZ5Q7.js";
18
+ import "../../../../chunk-R2AZOWEZ.js";
19
+ import "../../../../chunk-PN4HVM43.js";
20
20
  import "../../../../chunk-C3UKR3NT.js";
21
21
  import "../../../../chunk-IPPTOL53.js";
22
22
  import "../../../../chunk-7FDU3FIN.js";
@@ -14,6 +14,7 @@ import {
14
14
  pinnedLabelSx,
15
15
  pinnedSx,
16
16
  radioSx,
17
+ rowIndent,
17
18
  rowMetaSx,
18
19
  rowNameSx,
19
20
  rowSx,
@@ -24,7 +25,7 @@ import {
24
25
  triggerClearSx,
25
26
  triggerCountSx,
26
27
  triggerSx
27
- } from "../../../../chunk-TFO6GBW7.js";
28
+ } from "../../../../chunk-ZS44PY7T.js";
28
29
  import "../../../../chunk-7FDU3FIN.js";
29
30
  import "../../../../chunk-EPEJMTCQ.js";
30
31
  import "../../../../chunk-6JAIFIPW.js";
@@ -45,6 +46,7 @@ export {
45
46
  pinnedLabelSx,
46
47
  pinnedSx,
47
48
  radioSx,
49
+ rowIndent,
48
50
  rowMetaSx,
49
51
  rowNameSx,
50
52
  rowSx,
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  CategoryTrigger
4
- } from "../../../../chunk-KIHQE5YA.js";
4
+ } from "../../../../chunk-GVDJQMFI.js";
5
5
  import "../../../../chunk-DMNZD3Q7.js";
6
- import "../../../../chunk-TFO6GBW7.js";
6
+ import "../../../../chunk-ZS44PY7T.js";
7
7
  import "../../../../chunk-7FDU3FIN.js";
8
8
  import "../../../../chunk-EPEJMTCQ.js";
9
9
  import "../../../../chunk-6JAIFIPW.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  handleCategoryKeyDown
3
- } from "../../../../chunk-WWM2YTW4.js";
4
- import "../../../../chunk-LR6MSKTT.js";
3
+ } from "../../../../chunk-R2AZOWEZ.js";
4
+ import "../../../../chunk-PN4HVM43.js";
5
5
  import "../../../../chunk-PZ5AY32C.js";
6
6
  export {
7
7
  handleCategoryKeyDown
@@ -1,8 +1,11 @@
1
1
  import {
2
2
  buildCategoryGroups,
3
3
  categoryCheckState,
4
+ categoryPath,
5
+ collectBranchIds,
4
6
  collectLeafIds,
5
7
  filterCategoryGroups,
8
+ findGroup,
6
9
  flattenRows,
7
10
  foldText,
8
11
  highlightSegments,
@@ -11,14 +14,18 @@ import {
11
14
  removeChip,
12
15
  summarizeSelection,
13
16
  toggleCategoryLeaves,
14
- toggleLeaf
15
- } from "../../../../chunk-LR6MSKTT.js";
17
+ toggleLeaf,
18
+ treeDepth
19
+ } from "../../../../chunk-PN4HVM43.js";
16
20
  import "../../../../chunk-PZ5AY32C.js";
17
21
  export {
18
22
  buildCategoryGroups,
19
23
  categoryCheckState,
24
+ categoryPath,
25
+ collectBranchIds,
20
26
  collectLeafIds,
21
27
  filterCategoryGroups,
28
+ findGroup,
22
29
  flattenRows,
23
30
  foldText,
24
31
  highlightSegments,
@@ -27,6 +34,7 @@ export {
27
34
  removeChip,
28
35
  summarizeSelection,
29
36
  toggleCategoryLeaves,
30
- toggleLeaf
37
+ toggleLeaf,
38
+ treeDepth
31
39
  };
32
40
  //# sourceMappingURL=category-tree.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useCategoryCommit
3
- } from "../../../../chunk-ZAB65STX.js";
4
- import "../../../../chunk-LR6MSKTT.js";
3
+ } from "../../../../chunk-XHHR6G35.js";
4
+ import "../../../../chunk-PN4HVM43.js";
5
5
  import "../../../../chunk-PZ5AY32C.js";
6
6
  export {
7
7
  useCategoryCommit
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  useCategoryKeyHandler
3
- } from "../../../../chunk-ISH42UC7.js";
4
- import "../../../../chunk-WWM2YTW4.js";
5
- import "../../../../chunk-LR6MSKTT.js";
3
+ } from "../../../../chunk-USJPZ5Q7.js";
4
+ import "../../../../chunk-R2AZOWEZ.js";
5
+ import "../../../../chunk-PN4HVM43.js";
6
6
  import "../../../../chunk-PZ5AY32C.js";
7
7
  export {
8
8
  useCategoryKeyHandler
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useCategorySelect
3
- } from "../../../../chunk-2GB5CIN6.js";
4
- import "../../../../chunk-LR6MSKTT.js";
3
+ } from "../../../../chunk-RZVUY2MO.js";
4
+ import "../../../../chunk-PN4HVM43.js";
5
5
  import "../../../../chunk-PZ5AY32C.js";
6
6
  export {
7
7
  useCategorySelect
@@ -1,25 +1,25 @@
1
1
  "use client";
2
2
  import {
3
3
  CategoryField
4
- } from "../../../../../chunk-WIT3Y7JT.js";
4
+ } from "../../../../../chunk-Y2B3I3IH.js";
5
5
  import "../../../../../chunk-4XK6JQ4D.js";
6
6
  import "../../../../../chunk-N5ZWC6CB.js";
7
- import "../../../../../chunk-JM64OEU6.js";
7
+ import "../../../../../chunk-WAPJ2DL3.js";
8
8
  import "../../../../../chunk-LMXWI3DD.js";
9
- import "../../../../../chunk-TPLKJHNN.js";
10
- import "../../../../../chunk-ZUIJ3N7N.js";
11
- import "../../../../../chunk-OVLNF4AZ.js";
12
- import "../../../../../chunk-4TXIZ5WI.js";
13
- import "../../../../../chunk-AJ6XEO4E.js";
14
- import "../../../../../chunk-ZAB65STX.js";
15
- import "../../../../../chunk-KIHQE5YA.js";
16
- import "../../../../../chunk-OFOYMZRY.js";
9
+ import "../../../../../chunk-ZC7RQDZ5.js";
10
+ import "../../../../../chunk-V6Z4XS3I.js";
11
+ import "../../../../../chunk-P7IVAMAU.js";
12
+ import "../../../../../chunk-CJUOBTLL.js";
13
+ import "../../../../../chunk-ZUY65MFH.js";
14
+ import "../../../../../chunk-XHHR6G35.js";
15
+ import "../../../../../chunk-GVDJQMFI.js";
16
+ import "../../../../../chunk-NPN7JTRM.js";
17
17
  import "../../../../../chunk-DMNZD3Q7.js";
18
- import "../../../../../chunk-TFO6GBW7.js";
19
- import "../../../../../chunk-2GB5CIN6.js";
20
- import "../../../../../chunk-ISH42UC7.js";
21
- import "../../../../../chunk-WWM2YTW4.js";
22
- import "../../../../../chunk-LR6MSKTT.js";
18
+ import "../../../../../chunk-ZS44PY7T.js";
19
+ import "../../../../../chunk-RZVUY2MO.js";
20
+ import "../../../../../chunk-USJPZ5Q7.js";
21
+ import "../../../../../chunk-R2AZOWEZ.js";
22
+ import "../../../../../chunk-PN4HVM43.js";
23
23
  import "../../../../../chunk-C3UKR3NT.js";
24
24
  import "../../../../../chunk-IPPTOL53.js";
25
25
  import "../../../../../chunk-7FDU3FIN.js";
@@ -1,4 +1,4 @@
1
- import "../../../../../chunk-R6SNYC3D.js";
1
+ import "../../../../../chunk-Y3KRUT7O.js";
2
2
  import {
3
3
  SelectField
4
4
  } from "../../../../../chunk-W4SDVTZC.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "../../../../../chunk-EOHKZGOZ.js";
8
8
  import {
9
9
  CategoryField
10
- } from "../../../../../chunk-WIT3Y7JT.js";
10
+ } from "../../../../../chunk-Y2B3I3IH.js";
11
11
  import {
12
12
  ToggleField
13
13
  } from "../../../../../chunk-LYMAMKJT.js";
@@ -23,22 +23,22 @@ import "../../../../../chunk-A7LG3AXV.js";
23
23
  import "../../../../../chunk-6XLMTOJ3.js";
24
24
  import "../../../../../chunk-FGK2C7JR.js";
25
25
  import "../../../../../chunk-N5ZWC6CB.js";
26
- import "../../../../../chunk-JM64OEU6.js";
26
+ import "../../../../../chunk-WAPJ2DL3.js";
27
27
  import "../../../../../chunk-LMXWI3DD.js";
28
- import "../../../../../chunk-TPLKJHNN.js";
29
- import "../../../../../chunk-ZUIJ3N7N.js";
30
- import "../../../../../chunk-OVLNF4AZ.js";
31
- import "../../../../../chunk-4TXIZ5WI.js";
32
- import "../../../../../chunk-AJ6XEO4E.js";
33
- import "../../../../../chunk-ZAB65STX.js";
34
- import "../../../../../chunk-KIHQE5YA.js";
35
- import "../../../../../chunk-OFOYMZRY.js";
28
+ import "../../../../../chunk-ZC7RQDZ5.js";
29
+ import "../../../../../chunk-V6Z4XS3I.js";
30
+ import "../../../../../chunk-P7IVAMAU.js";
31
+ import "../../../../../chunk-CJUOBTLL.js";
32
+ import "../../../../../chunk-ZUY65MFH.js";
33
+ import "../../../../../chunk-XHHR6G35.js";
34
+ import "../../../../../chunk-GVDJQMFI.js";
35
+ import "../../../../../chunk-NPN7JTRM.js";
36
36
  import "../../../../../chunk-DMNZD3Q7.js";
37
- import "../../../../../chunk-TFO6GBW7.js";
38
- import "../../../../../chunk-2GB5CIN6.js";
39
- import "../../../../../chunk-ISH42UC7.js";
40
- import "../../../../../chunk-WWM2YTW4.js";
41
- import "../../../../../chunk-LR6MSKTT.js";
37
+ import "../../../../../chunk-ZS44PY7T.js";
38
+ import "../../../../../chunk-RZVUY2MO.js";
39
+ import "../../../../../chunk-USJPZ5Q7.js";
40
+ import "../../../../../chunk-R2AZOWEZ.js";
41
+ import "../../../../../chunk-PN4HVM43.js";
42
42
  import "../../../../../chunk-QYKDY4EI.js";
43
43
  import "../../../../../chunk-4OHRZW7U.js";
44
44
  import "../../../../../chunk-S6YY2WWK.js";
@@ -695,9 +695,9 @@ import "../../chunk-MWFSIB6K.js";
695
695
  import "../../chunk-NUGT7LMR.js";
696
696
  import {
697
697
  Alert
698
- } from "../../chunk-WNMYWQ7D.js";
699
- import "../../chunk-57Z2ND3N.js";
700
- import "../../chunk-N3QUEBNS.js";
698
+ } from "../../chunk-4Y6SPFKW.js";
699
+ import "../../chunk-CXLAJZSE.js";
700
+ import "../../chunk-L7VH6IMR.js";
701
701
  import "../../chunk-2IBFEHIX.js";
702
702
  import {
703
703
  AlertDialog
@@ -5,12 +5,12 @@ import {
5
5
  fadeInScale,
6
6
  getColorFromTheme,
7
7
  getVariantIcon
8
- } from "./chunk-57Z2ND3N.js";
8
+ } from "./chunk-CXLAJZSE.js";
9
9
  import {
10
- defaultAriaLive,
11
10
  resolveAlertProps,
11
+ resolveAnnouncement,
12
12
  testIdFor
13
- } from "./chunk-N3QUEBNS.js";
13
+ } from "./chunk-L7VH6IMR.js";
14
14
  import {
15
15
  ACTIVE,
16
16
  ALERT_EASING,
@@ -231,13 +231,15 @@ var Alert = React.forwardRef((alertProps, ref) => {
231
231
  description,
232
232
  children,
233
233
  animate,
234
- role,
234
+ role: _role,
235
+ announce: _announce,
236
+ // resolved from `alertProps` — see `resolveAnnouncement`
235
237
  "aria-atomic": ariaAtomic,
236
238
  ...others
237
239
  } = resolveAlertProps(alertProps);
238
240
  const dataTestId = resolveTestId(others, "alert");
239
241
  const props = withoutAlertOnlyProps(withoutTestIdProps(others));
240
- const ariaLive = alertProps["aria-live"] ?? defaultAriaLive(variant);
242
+ const announcement = resolveAnnouncement(alertProps, variant);
241
243
  const [open, setOpen] = React.useState(true);
242
244
  const [isClosing, setIsClosing] = React.useState(false);
243
245
  const handleClose = () => {
@@ -262,8 +264,8 @@ var Alert = React.forwardRef((alertProps, ref) => {
262
264
  pulse,
263
265
  animate,
264
266
  icon: displayIcon,
265
- role,
266
- "aria-live": ariaLive,
267
+ role: announcement.role,
268
+ "aria-live": announcement["aria-live"],
267
269
  "aria-atomic": ariaAtomic,
268
270
  tabIndex: 0,
269
271
  action: dismissButton(alertProps, dataTestId, handleClose),
@@ -284,4 +286,4 @@ export {
284
286
  Alert,
285
287
  ALERT_ONLY_PROPS
286
288
  };
287
- //# sourceMappingURL=chunk-WNMYWQ7D.js.map
289
+ //# sourceMappingURL=chunk-4Y6SPFKW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/Alert/Alert.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport MuiAlert from '@mui/material/Alert/index.js';\nimport AlertTitle from '@mui/material/AlertTitle/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport Collapse from '@mui/material/Collapse/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport { alpha, styled } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { resolveAlertProps, resolveAnnouncement, testIdFor } from './Alert.helpers';\nimport type { AlertPalette } from './Alert.metrics';\nimport {\n ACTIVE,\n GLOW,\n ALERT_EASING,\n ALERT_RADIUS_UNITS,\n ALERT_TRANSITION_MS,\n CLOSE_BUTTON,\n CLOSE_DELAY_MS,\n COLLAPSE_MS,\n DESCRIPTION,\n FADE_IN,\n FOCUS,\n HOVER,\n seconds,\n TITLE,\n} from './Alert.metrics';\nimport {\n alertEmphasisStyles,\n alertLayoutStyles,\n alertVariantStyles,\n fadeInScale,\n getColorFromTheme,\n getVariantIcon,\n} from './Alert.styles';\nimport type { AlertColor } from '@mui/material/Alert/index.js';\nimport type { AlertProps } from './Alert.types';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { px } from '../../../tokens/theme';\n\nconst transition = `all ${seconds(ALERT_TRANSITION_MS)} ${ALERT_EASING}`;\n\n// Define animations\n/**\n * The pointer states' shadow: a flat tint, plus the glow when the alert has one.\n *\n * The tint is an inset spread at 100vmax, which always exceeds the element, so\n * it covers the surface edge to edge. It paints ABOVE the background and BELOW\n * the content, which is what keeps the ink's own contrast out of these states\n * entirely — see `ACTIVE` in `Alert.metrics.ts` for why a layer replaced the\n * opacity dip and the brightness multiplier that each preceded it.\n *\n * The glow is COMPOSED rather than replaced, so hovering a glowing alert keeps\n * its glow; `glowStyles` gave up its `!important` for this.\n */\nfunction pointerShadow(\n theme: Theme,\n colorPalette: AlertPalette,\n glow: boolean,\n variant: string | undefined,\n): (alpha_: number) => string {\n // The tint moves the surface AWAY from its own ink, which is why this reads\n // the variant and not only the mode.\n //\n // `gradient` is the one variant where the two disagree: it paints a\n // mid-lightness sweep (L* 42–61) under WHITE ink in BOTH modes, so the\n // mode-keyed answer tinted it white in dark mode — toward the text. Measured:\n // white-on-gradient fell to 2.90:1 on hover and 2.41:1 pressed, under the 3:1\n // floor and below its own idle. Every other variant's surface tracks the mode,\n // so for them the two rules agree.\n const ink = variant === 'gradient' || theme.palette.mode === 'light' ? '#000000' : '#ffffff';\n const glowShadow = glow\n ? `0 0 ${GLOW.blur}px ${GLOW.spread}px ${alpha(colorPalette.main, GLOW.alpha)}`\n : null;\n return (alpha_) =>\n [`inset 0 0 0 100vmax ${alpha(ink, alpha_)}`, glowShadow].filter(Boolean).join(', ');\n}\n\nconst StyledAlert = styled(MuiAlert, {\n shouldForwardProp: (prop) =>\n !['customVariant', 'customColor', 'glow', 'pulse', 'animate'].includes(prop as string),\n})<{\n customVariant?: string;\n customColor?: string;\n glow?: boolean;\n pulse?: boolean;\n animate?: boolean;\n}>(({ theme, customVariant, customColor, glow, pulse, animate }) => {\n const colorPalette = getColorFromTheme(theme, customColor || customVariant || 'info');\n\n const withTint = pointerShadow(theme, colorPalette, Boolean(glow), customVariant);\n\n return {\n borderRadius: theme.spacing(ALERT_RADIUS_UNITS),\n transition: `${transition}, box-shadow ${seconds(ACTIVE.ms)} ${ALERT_EASING}`,\n position: 'relative',\n overflow: 'hidden',\n animation: animate ? `${fadeInScale} ${seconds(FADE_IN.ms)} ease-out` : 'none',\n willChange: 'transform, opacity',\n\n ...alertLayoutStyles(theme, colorPalette, animate),\n\n // Hover: one tint step, and nothing that moves. An alert is a surface\n // rather than a control, so the pointer only needs telling it is here. The\n // icon keeps its own place for the same reason — it is the variant's\n // meaning, not an affordance to animate.\n '&:hover': {\n boxShadow: withTint(HOVER.tintAlpha),\n\n '&::before': {\n opacity: 1,\n },\n },\n\n // Press: a 20% tint, landing at once and easing back. Still no geometry.\n //\n // `transition: none` here is what makes the dip INSTANT: a click's\n // `:active` lasts about as long as the finger is down, so easing into it\n // would be cut off in its first tenth and read as a flicker. The ease is on\n // the way back, governed by the root.\n //\n // Neither `:hover` nor `:focus-visible` may declare `transition`, and that\n // is not a style preference. `:active` under a mouse ALWAYS implies\n // `:hover`, so a bare shorthand in the hover block outranks the root's\n // (0,2,0 beats 0,1,0) and silently resets the timing this state rests on.\n //\n // The `:not(:has(…))` names CONTROLS, not any descendant. `:active`\n // matches an ancestor of whatever is pressed, so dismissing an alert\n // dimmed the alert being dismissed and pressing a call to action dimmed\n // the message explaining it. Excluding `:has(:active)` wholesale does not\n // work and was the first attempt: pressing the TEXT makes that text\n // `:active` too, so the guard matched on every press and the state never\n // fired at all.\n '&:active:not(:has(button:active, a:active, [role=\"button\"]:active))': {\n boxShadow: withTint(ACTIVE.tintAlpha),\n transition: 'none',\n },\n\n // Focus: `:focus-visible`, not `:focus-within`.\n //\n // The alert carries `tabIndex={0}`, so a MOUSE CLICK focused it and painted\n // the ring — a keyboard affordance answering a pointer, which is what made\n // clicking one look like an error state. `:focus-visible` is the browser's\n // own answer to \"did this focus come from the keyboard\": the ring stays for\n // whoever tabs here and never fires on a click.\n //\n // One ring, not three. It was a 3px outline at 3px offset UNDER a 6px halo,\n // and stacking two rings on one edge is what read as unfinished rather than\n // as emphasis.\n // It declares no `transition`: `outline-style` is discrete, so the ring\n // arrives at full width with only its COLOUR easing — from `currentcolor`,\n // the near-black alert ink, to the blue. That is a visible dark flash on\n // every keyboard focus, and it would also outrank the root's opacity\n // transition the way the hover block did.\n '&:focus-visible': {\n outline: `${FOCUS.ringWidth}px solid ${alpha(colorPalette.main, FOCUS.ringAlpha)}`,\n outlineOffset: `${FOCUS.offset}px`,\n },\n\n ...alertVariantStyles(theme, customVariant, colorPalette),\n ...alertEmphasisStyles(colorPalette, Boolean(glow), Boolean(pulse)),\n };\n});\n\n// glass and gradient are our own looks with no MUI severity of their own; both\n// borrow info's. danger is MUI's error.\nconst MUI_SEVERITY: Record<string, AlertColor> = {\n danger: 'error',\n glass: 'info',\n gradient: 'info',\n};\n\nconst toMuiSeverity = (variant: string): AlertColor =>\n MUI_SEVERITY[variant] ?? (variant as AlertColor);\n\nconst AlertContent: React.FC<{\n title?: AlertProps['title'];\n description?: AlertProps['description'];\n dataTestId?: string;\n children?: React.ReactNode;\n}> = ({ title, description, dataTestId, children }) => (\n <>\n {title && (\n <AlertTitle\n data-testid={testIdFor(dataTestId, 'title')}\n sx={{\n fontWeight: TITLE.fontWeight,\n fontSize: px(TITLE.fontSize),\n marginBottom: description ? TITLE.marginBottomUnits : 0,\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n wordBreak: 'break-word',\n }}\n >\n {title}\n </AlertTitle>\n )}\n {description && (\n <Box\n component=\"div\"\n data-testid={testIdFor(dataTestId, 'message')}\n sx={{\n opacity: DESCRIPTION.opacity,\n fontSize: px(DESCRIPTION.fontSize),\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n wordBreak: 'break-word',\n }}\n >\n {description}\n </Box>\n )}\n {children}\n </>\n);\n\nconst AlertCloseButton: React.FC<{ dataTestId?: string; label: string; onClose: () => void }> = ({\n dataTestId,\n label,\n onClose,\n}) => (\n <IconButton\n data-testid={testIdFor(dataTestId, 'close')}\n aria-label={label}\n color=\"inherit\"\n size=\"small\"\n onClick={onClose}\n sx={(theme) => ({\n transition,\n opacity: CLOSE_BUTTON.opacity,\n // Opacity and a wash only: the button used to spin 90deg and grow 1.1,\n // which drew the eye to the dismiss rather than to the message.\n '&:hover': {\n opacity: 1,\n backgroundColor: alpha(theme.palette.action.hover, CLOSE_BUTTON.washAlpha),\n },\n // A REAL ring, on the keyboard-only selector.\n //\n // This used to be `&:focus` setting `outline: 'none'` over a\n // `rgba(0,0,0,0.1)` wash — 1.25:1 against the info surface, and MUI's\n // ButtonBase already sets `outline: 0`, so there was no UA fallback\n // either. It went unnoticed while the ROOT still matched `:focus-within`\n // and drew a ring around the whole alert; moving the root to\n // `:focus-visible` took that away and left this button with no visible\n // focus at all. `Banner`'s dismiss already draws its own outline, so\n // this is also what keeps the two surfaces telling a keyboard user the\n // same thing.\n '&:focus-visible': {\n opacity: 1,\n // `currentColor` is the alert's own ink, inherited through\n // `color=\"inherit\"`, so the ring is drawn in whatever colour was\n // already chosen to be READ on this surface. Measured 11.2:1 on the\n // semantic variants and 5.7:1 on `gradient`.\n //\n // That is a reasoned choice, not a test-backed one, and the difference\n // matters: `alert-contrast.test.tsx` covers the ink of the four\n // semantic variants only — its `glass` case asserts the pane's alpha\n // rather than its ink, and `gradient` it does not render at all. A\n // translucent surface's contrast depends on what sits behind it, which\n // is why that test stops where it does and why this comment does not\n // borrow a guarantee it never made.\n outline: `${FOCUS.ringWidth}px solid currentColor`,\n outlineOffset: `${FOCUS.offset}px`,\n backgroundColor: alpha(theme.palette.action.focus, CLOSE_BUTTON.washAlpha),\n },\n })}\n >\n <Close fontSize=\"inherit\" />\n </IconButton>\n);\n\n/**\n * The dismiss button, or nothing.\n *\n * Reads `closeLabel` straight off the props rather than through the\n * `definedProps` merge, which would widen it to `string | undefined` and hand\n * the button an empty name. The UNION in `AlertProps` guarantees the label\n * wherever `closable` is true — that narrowing is gone inside the component,\n * which is why the fallback below exists and why it is unreachable.\n */\nfunction dismissButton(\n props: AlertProps,\n dataTestId: string | undefined,\n onClose: () => void,\n): React.JSX.Element | null {\n if (!props.closable) return null;\n return <AlertCloseButton dataTestId={dataTestId} label={props.closeLabel} onClose={onClose} />;\n}\n\nexport const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, ref) => {\n const {\n variant,\n color,\n glow,\n pulse,\n icon,\n showIcon,\n onClose,\n title,\n description,\n children,\n animate,\n role: _role, announce: _announce, // resolved from `alertProps` — see `resolveAnnouncement`\n 'aria-atomic': ariaAtomic,\n ...others\n } = resolveAlertProps(alertProps);\n\n // Every spelling of the test id the shared contract allows, mapped to the\n // one the DOM reads and defaulted to `alert`; the native Alert does the same.\n const dataTestId = resolveTestId(others, 'alert');\n // Then the dismiss union, which `dismissButton` reads off `alertProps` rather\n // than through this destructure — so without this strip it rides `...props`\n // onto the DOM. `ALERT_DEFAULTS` supplies `closable: false`, so that happened\n // on EVERY alert, not only the closable ones.\n const props = withoutAlertOnlyProps(withoutTestIdProps(others));\n\n // Depends on `variant`, so it cannot live in the static defaults above.\n const announcement = resolveAnnouncement(alertProps, variant);\n const [open, setOpen] = React.useState(true);\n const [isClosing, setIsClosing] = React.useState(false);\n\n const handleClose = () => {\n setIsClosing(true);\n window.setTimeout(() => {\n setOpen(false);\n onClose?.();\n }, CLOSE_DELAY_MS);\n };\n\n const severity = toMuiSeverity(variant);\n\n const displayIcon = showIcon ? (\n <Box component=\"span\" data-testid={testIdFor(dataTestId, 'icon')}>\n {icon || getVariantIcon(variant)}\n </Box>\n ) : (\n false\n );\n\n const content = (\n <AlertContent title={title} description={description} dataTestId={dataTestId}>\n {children}\n </AlertContent>\n );\n\n return (\n <Collapse in={open && !isClosing} timeout={COLLAPSE_MS}>\n <StyledAlert\n ref={ref}\n data-testid={dataTestId}\n severity={severity}\n customVariant={variant}\n customColor={color}\n glow={glow}\n pulse={pulse}\n animate={animate}\n icon={displayIcon}\n role={announcement.role}\n aria-live={announcement['aria-live']}\n aria-atomic={ariaAtomic}\n tabIndex={0}\n action={dismissButton(alertProps, dataTestId, handleClose)}\n {...props}\n >\n {content}\n </StyledAlert>\n </Collapse>\n );\n});\n\n/**\n * The props `Alert` OWNS, which must never reach the DOM.\n *\n * `AlertProps` extends MUI's, whose rest-spread is how a host's real HTML\n * attributes get onto the root — so the same spread carries the alert's own\n * configuration unless it is named here. Everything else the component consumes\n * leaves through the destructure above; these two do not, because\n * `dismissButton` reads them off the original props to keep the dismiss union's\n * narrowing intact.\n *\n * Exported so a test can render an alert carrying every name on it and assert\n * none reaches the DOM — the check that would have caught `closable`.\n */\nexport const ALERT_ONLY_PROPS = ['closable', 'closeLabel'] as const;\n\nfunction withoutAlertOnlyProps<P extends object>(rest: P): P {\n const html = { ...rest } as Record<string, unknown>;\n for (const key of ALERT_ONLY_PROPS) delete html[key];\n return html as P;\n}\n\nAlert.displayName = 'Alert';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,SAAS,OAAO,cAAc;AAE9B,OAAO,WAAW;AA8KhB,mBAEI,KAFJ;AA7IF,IAAM,aAAa,OAAO,QAAQ,mBAAmB,CAAC,IAAI,YAAY;AAetE,SAAS,cACP,OACA,cACA,MACA,SAC4B;AAU5B,QAAM,MAAM,YAAY,cAAc,MAAM,QAAQ,SAAS,UAAU,YAAY;AACnF,QAAM,aAAa,OACf,OAAO,KAAK,IAAI,MAAM,KAAK,MAAM,MAAM,MAAM,aAAa,MAAM,KAAK,KAAK,CAAC,KAC3E;AACJ,SAAO,CAAC,WACN,CAAC,uBAAuB,MAAM,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,OAAO,OAAO,EAAE,KAAK,IAAI;AACvF;AAEA,IAAM,cAAc,OAAO,UAAU;AAAA,EACnC,mBAAmB,CAAC,SAClB,CAAC,CAAC,iBAAiB,eAAe,QAAQ,SAAS,SAAS,EAAE,SAAS,IAAc;AACzF,CAAC,EAME,CAAC,EAAE,OAAO,eAAe,aAAa,MAAM,OAAO,QAAQ,MAAM;AAClE,QAAM,eAAe,kBAAkB,OAAO,eAAe,iBAAiB,MAAM;AAEpF,QAAM,WAAW,cAAc,OAAO,cAAc,QAAQ,IAAI,GAAG,aAAa;AAEhF,S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,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACN,MAAM,aAAa;AAAA,MACnB,aAAW,aAAa,WAAW;AAAA,MACnC,eAAa;AAAA,MACb,UAAU;AAAA,MACV,QAAQ,cAAc,YAAY,YAAY,WAAW;AAAA,MACxD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH,GACF;AAEJ,CAAC;AAeM,IAAM,mBAAmB,CAAC,YAAY,YAAY;AAEzD,SAAS,sBAAwC,MAAY;AAC3D,QAAM,OAAO,EAAE,GAAG,KAAK;AACvB,aAAW,OAAO,iBAAkB,QAAO,KAAK,GAAG;AACnD,SAAO;AACT;AAEA,MAAM,cAAc;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCardActions
3
- } from "./chunk-SYJMI2NP.js";
3
+ } from "./chunk-VNTOBLIB.js";
4
4
  import {
5
5
  ConfirmActionDialog
6
6
  } from "./chunk-QQS3GQYS.js";
@@ -50,4 +50,4 @@ function useRemoveConfirm({
50
50
  export {
51
51
  useRemoveConfirm
52
52
  };
53
- //# sourceMappingURL=chunk-KM5O4ICK.js.map
53
+ //# sourceMappingURL=chunk-7LCXGJN5.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-5WNQJ5KS.js";
5
5
  import {
6
6
  PillControl
7
- } from "./chunk-EJQW2IYW.js";
7
+ } from "./chunk-FPFUXRD2.js";
8
8
  import {
9
9
  MoreFilters
10
10
  } from "./chunk-PFDM2OIP.js";
@@ -220,4 +220,4 @@ function FilterSlots({
220
220
  export {
221
221
  InlineFilterControls
222
222
  };
223
- //# sourceMappingURL=chunk-NLJV4CPF.js.map
223
+ //# sourceMappingURL=chunk-7MN6I5NK.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PillControl
3
- } from "./chunk-EJQW2IYW.js";
3
+ } from "./chunk-FPFUXRD2.js";
4
4
  import {
5
5
  PanelRangeField
6
6
  } from "./chunk-DFLTUI7W.js";
@@ -154,4 +154,4 @@ export {
154
154
  GridFilterPanel,
155
155
  FilterDialog
156
156
  };
157
- //# sourceMappingURL=chunk-PN5CQKA2.js.map
157
+ //# sourceMappingURL=chunk-AXTLFK4T.js.map
@@ -7,7 +7,7 @@ import {
7
7
  panelHeadSx,
8
8
  pinnedLabelSx,
9
9
  pinnedSx
10
- } from "./chunk-TFO6GBW7.js";
10
+ } from "./chunk-ZS44PY7T.js";
11
11
 
12
12
  // src/components/form/CategorySelect/CategoryPanelHead.tsx
13
13
  import Box from "@mui/material/Box/index.js";
@@ -144,4 +144,4 @@ export {
144
144
  CategoryPanelHead,
145
145
  CategoryPinnedTray
146
146
  };
147
- //# sourceMappingURL=chunk-4TXIZ5WI.js.map
147
+ //# sourceMappingURL=chunk-CJUOBTLL.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VARIANT_ICON
3
- } from "./chunk-N3QUEBNS.js";
3
+ } from "./chunk-L7VH6IMR.js";
4
4
  import {
5
5
  ACTION_SLOT,
6
6
  ALERT_EASING,
@@ -266,4 +266,4 @@ export {
266
266
  alertVariantStyles,
267
267
  alertEmphasisStyles
268
268
  };
269
- //# sourceMappingURL=chunk-57Z2ND3N.js.map
269
+ //# sourceMappingURL=chunk-CXLAJZSE.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GridShell
3
- } from "./chunk-FBI6QB3O.js";
3
+ } from "./chunk-TVPPA4RD.js";
4
4
  import {
5
5
  useDataViewsState
6
6
  } from "./chunk-HEBQS7QP.js";
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
27
27
  export {
28
28
  DataViewsGrid
29
29
  };
30
- //# sourceMappingURL=chunk-E3PUH5IF.js.map
30
+ //# sourceMappingURL=chunk-EQ7PWGBN.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-4T6W43TO.js";
7
7
  import {
8
8
  CategorySelect
9
- } from "./chunk-JM64OEU6.js";
9
+ } from "./chunk-WAPJ2DL3.js";
10
10
 
11
11
  // src/components/data-display/DataViews/data-views-category-pill.tsx
12
12
  import { jsx } from "react/jsx-runtime";
@@ -79,4 +79,4 @@ export {
79
79
  emitPillDiff,
80
80
  PillControl
81
81
  };
82
- //# sourceMappingURL=chunk-EJQW2IYW.js.map
82
+ //# sourceMappingURL=chunk-FPFUXRD2.js.map
@@ -6,7 +6,7 @@ import {
6
6
  triggerClearSx,
7
7
  triggerCountSx,
8
8
  triggerSx
9
- } from "./chunk-TFO6GBW7.js";
9
+ } from "./chunk-ZS44PY7T.js";
10
10
 
11
11
  // src/components/form/CategorySelect/CategoryTrigger.tsx
12
12
  import Box from "@mui/material/Box/index.js";
@@ -88,4 +88,4 @@ function CategoryTrigger({
88
88
  export {
89
89
  CategoryTrigger
90
90
  };
91
- //# sourceMappingURL=chunk-KIHQE5YA.js.map
91
+ //# sourceMappingURL=chunk-GVDJQMFI.js.map
@@ -14,6 +14,17 @@ var definedProps = (props) => Object.fromEntries(
14
14
  );
15
15
  var resolveAlertProps = (props) => ({ ...ALERT_DEFAULTS, ...definedProps(props) });
16
16
  var defaultAriaLive = (variant) => variant === "danger" ? "assertive" : "polite";
17
+ var ANNOUNCE_ROLE = {
18
+ assertive: "alert",
19
+ polite: "status"
20
+ };
21
+ var resolveAnnouncement = (props, variant) => {
22
+ const announce = props.announce;
23
+ return {
24
+ role: props.role ?? (announce === void 0 ? ALERT_DEFAULTS.role : ANNOUNCE_ROLE[announce]),
25
+ "aria-live": props["aria-live"] ?? announce ?? defaultAriaLive(variant)
26
+ };
27
+ };
17
28
  var testIdFor = (base, suffix) => base ? `${base}-${suffix}` : `alert-${suffix}`;
18
29
  var VARIANT_ICON = {
19
30
  info: "Info",
@@ -26,7 +37,9 @@ export {
26
37
  ALERT_DEFAULTS,
27
38
  resolveAlertProps,
28
39
  defaultAriaLive,
40
+ ANNOUNCE_ROLE,
41
+ resolveAnnouncement,
29
42
  testIdFor,
30
43
  VARIANT_ICON
31
44
  };
32
- //# sourceMappingURL=chunk-N3QUEBNS.js.map
45
+ //# sourceMappingURL=chunk-L7VH6IMR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/Alert/Alert.helpers.ts"],"sourcesContent":["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"],"mappings":";AAKO,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;AA0BO,IAAM,sBAAsB,CACjC,OACA,YACkE;AAClE,QAAM,WAAW,MAAM;AACvB,SAAO;AAAA,IACL,MAAM,MAAM,SAAS,aAAa,SAAY,eAAe,OAAO,cAAc,QAAQ;AAAA,IAC1F,aAAa,MAAM,WAAW,KAAK,YAAY,gBAAgB,OAAO;AAAA,EACxE;AACF;AAEO,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;","names":[]}