@cdx-ui/components 0.3.4 → 0.3.6

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 (287) hide show
  1. package/README.md +1 -1
  2. package/coverage.svg +1 -1
  3. package/docs/components/bar-chart/content.md +703 -0
  4. package/docs/components/content.md +9 -1
  5. package/docs/components/line-chart/content.md +567 -0
  6. package/docs/components/pie-chart/content.md +493 -0
  7. package/docs/components/progress-segmented/content.md +1 -1
  8. package/docs/components/select/content.md +144 -2
  9. package/docs/components/stepper/content.md +599 -0
  10. package/docs/components/system-alert/content.md +533 -0
  11. package/docs/foundations/expressions/icons/content.md +1 -1
  12. package/docs/foundations/styles/tokens/all-tokens/content.md +2 -1
  13. package/docs/llms.txt +10 -0
  14. package/docs/patterns/content.md +1 -0
  15. package/docs/patterns/dashboard/content.md +423 -19
  16. package/docs/patterns/insights/content.md +590 -0
  17. package/docs/resources/release-notes/0.3.4/content.md +27 -0
  18. package/docs/resources/release-notes/0.3.5/content.md +7 -0
  19. package/docs/resources/release-notes/content.md +2 -0
  20. package/lib/commonjs/components/BarChart/geometry.js +1130 -0
  21. package/lib/commonjs/components/BarChart/geometry.js.map +1 -0
  22. package/lib/commonjs/components/BarChart/index.js +942 -0
  23. package/lib/commonjs/components/BarChart/index.js.map +1 -0
  24. package/lib/commonjs/components/BarChart/styles.js +26 -0
  25. package/lib/commonjs/components/BarChart/styles.js.map +1 -0
  26. package/lib/commonjs/components/Button/index.js +2 -2
  27. package/lib/commonjs/components/Button/index.js.map +1 -1
  28. package/lib/commonjs/components/Chip/styles.js +3 -1
  29. package/lib/commonjs/components/Chip/styles.js.map +1 -1
  30. package/lib/commonjs/components/LineChart/geometry.js +698 -0
  31. package/lib/commonjs/components/LineChart/geometry.js.map +1 -0
  32. package/lib/commonjs/components/LineChart/index.js +747 -0
  33. package/lib/commonjs/components/LineChart/index.js.map +1 -0
  34. package/lib/commonjs/components/LineChart/styles.js +25 -0
  35. package/lib/commonjs/components/LineChart/styles.js.map +1 -0
  36. package/lib/commonjs/components/PieChart/geometry.js +216 -0
  37. package/lib/commonjs/components/PieChart/geometry.js.map +1 -0
  38. package/lib/commonjs/components/PieChart/index.js +476 -0
  39. package/lib/commonjs/components/PieChart/index.js.map +1 -0
  40. package/lib/commonjs/components/PieChart/styles.js +88 -0
  41. package/lib/commonjs/components/PieChart/styles.js.map +1 -0
  42. package/lib/commonjs/components/ProgressCircle/ProgressCircleRing.js +9 -31
  43. package/lib/commonjs/components/ProgressCircle/ProgressCircleRing.js.map +1 -1
  44. package/lib/commonjs/components/ProgressCircle/ProgressRing.js +52 -0
  45. package/lib/commonjs/components/ProgressCircle/ProgressRing.js.map +1 -0
  46. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +8 -7
  47. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js.map +1 -1
  48. package/lib/commonjs/components/Stepper/index.js +369 -0
  49. package/lib/commonjs/components/Stepper/index.js.map +1 -0
  50. package/lib/commonjs/components/Stepper/styles.js +211 -0
  51. package/lib/commonjs/components/Stepper/styles.js.map +1 -0
  52. package/lib/commonjs/components/Stepper/useStepperLabelFit.js +22 -0
  53. package/lib/commonjs/components/Stepper/useStepperLabelFit.js.map +1 -0
  54. package/lib/commonjs/components/Stepper/useStepperLabelFit.web.js +52 -0
  55. package/lib/commonjs/components/Stepper/useStepperLabelFit.web.js.map +1 -0
  56. package/lib/commonjs/components/Stepper/useStepperRingColors.js +31 -0
  57. package/lib/commonjs/components/Stepper/useStepperRingColors.js.map +1 -0
  58. package/lib/commonjs/components/SystemAlert/animation.js +218 -0
  59. package/lib/commonjs/components/SystemAlert/animation.js.map +1 -0
  60. package/lib/commonjs/components/SystemAlert/index.js +525 -0
  61. package/lib/commonjs/components/SystemAlert/index.js.map +1 -0
  62. package/lib/commonjs/components/SystemAlert/styles.js +178 -0
  63. package/lib/commonjs/components/SystemAlert/styles.js.map +1 -0
  64. package/lib/commonjs/components/SystemAlert/useSystemAlertStatusBarStyle.js +53 -0
  65. package/lib/commonjs/components/SystemAlert/useSystemAlertStatusBarStyle.js.map +1 -0
  66. package/lib/commonjs/components/Tabs/index.js +4 -0
  67. package/lib/commonjs/components/Tabs/index.js.map +1 -1
  68. package/lib/commonjs/components/Tabs/styles.js +1 -1
  69. package/lib/commonjs/components/Tabs/styles.js.map +1 -1
  70. package/lib/commonjs/components/chart/ChartInspector.js +610 -0
  71. package/lib/commonjs/components/chart/ChartInspector.js.map +1 -0
  72. package/lib/commonjs/components/chart/format.js +93 -0
  73. package/lib/commonjs/components/chart/format.js.map +1 -0
  74. package/lib/commonjs/components/chart/index.js +2 -0
  75. package/lib/commonjs/components/chart/index.js.map +1 -0
  76. package/lib/commonjs/components/chart/motion.js +97 -0
  77. package/lib/commonjs/components/chart/motion.js.map +1 -0
  78. package/lib/commonjs/components/chart/palette.js +178 -0
  79. package/lib/commonjs/components/chart/palette.js.map +1 -0
  80. package/lib/commonjs/components/chart/size.js +34 -0
  81. package/lib/commonjs/components/chart/size.js.map +1 -0
  82. package/lib/commonjs/components/chart/ticks.js +59 -0
  83. package/lib/commonjs/components/chart/ticks.js.map +1 -0
  84. package/lib/commonjs/components/chart/types.js +6 -0
  85. package/lib/commonjs/components/chart/types.js.map +1 -0
  86. package/lib/commonjs/components/chart/useChartHostWidth.js +27 -0
  87. package/lib/commonjs/components/chart/useChartHostWidth.js.map +1 -0
  88. package/lib/commonjs/components/index.js +60 -0
  89. package/lib/commonjs/components/index.js.map +1 -1
  90. package/lib/commonjs/figma/SystemAlert.Button.figma.js +28 -0
  91. package/lib/commonjs/figma/SystemAlert.Button.figma.js.map +1 -0
  92. package/lib/commonjs/figma/SystemAlert.Close.figma.js +22 -0
  93. package/lib/commonjs/figma/SystemAlert.Close.figma.js.map +1 -0
  94. package/lib/commonjs/figma/SystemAlert.Description.figma.js +20 -0
  95. package/lib/commonjs/figma/SystemAlert.Description.figma.js.map +1 -0
  96. package/lib/commonjs/figma/SystemAlert.IconButton.figma.js +31 -0
  97. package/lib/commonjs/figma/SystemAlert.IconButton.figma.js.map +1 -0
  98. package/lib/commonjs/figma/SystemAlert.figma.js +48 -0
  99. package/lib/commonjs/figma/SystemAlert.figma.js.map +1 -0
  100. package/lib/module/components/BarChart/geometry.js +1110 -0
  101. package/lib/module/components/BarChart/geometry.js.map +1 -0
  102. package/lib/module/components/BarChart/index.js +936 -0
  103. package/lib/module/components/BarChart/index.js.map +1 -0
  104. package/lib/module/components/BarChart/styles.js +22 -0
  105. package/lib/module/components/BarChart/styles.js.map +1 -0
  106. package/lib/module/components/Button/index.js +2 -2
  107. package/lib/module/components/Button/index.js.map +1 -1
  108. package/lib/module/components/Chip/styles.js +3 -1
  109. package/lib/module/components/Chip/styles.js.map +1 -1
  110. package/lib/module/components/LineChart/geometry.js +685 -0
  111. package/lib/module/components/LineChart/geometry.js.map +1 -0
  112. package/lib/module/components/LineChart/index.js +741 -0
  113. package/lib/module/components/LineChart/index.js.map +1 -0
  114. package/lib/module/components/LineChart/styles.js +21 -0
  115. package/lib/module/components/LineChart/styles.js.map +1 -0
  116. package/lib/module/components/PieChart/geometry.js +209 -0
  117. package/lib/module/components/PieChart/geometry.js.map +1 -0
  118. package/lib/module/components/PieChart/index.js +471 -0
  119. package/lib/module/components/PieChart/index.js.map +1 -0
  120. package/lib/module/components/PieChart/styles.js +84 -0
  121. package/lib/module/components/PieChart/styles.js.map +1 -0
  122. package/lib/module/components/ProgressCircle/ProgressCircleRing.js +10 -32
  123. package/lib/module/components/ProgressCircle/ProgressCircleRing.js.map +1 -1
  124. package/lib/module/components/ProgressCircle/ProgressRing.js +48 -0
  125. package/lib/module/components/ProgressCircle/ProgressRing.js.map +1 -0
  126. package/lib/module/components/ScrollShadow/useScrollShadow.js +8 -7
  127. package/lib/module/components/ScrollShadow/useScrollShadow.js.map +1 -1
  128. package/lib/module/components/Stepper/index.js +360 -0
  129. package/lib/module/components/Stepper/index.js.map +1 -0
  130. package/lib/module/components/Stepper/styles.js +206 -0
  131. package/lib/module/components/Stepper/styles.js.map +1 -0
  132. package/lib/module/components/Stepper/useStepperLabelFit.js +18 -0
  133. package/lib/module/components/Stepper/useStepperLabelFit.js.map +1 -0
  134. package/lib/module/components/Stepper/useStepperLabelFit.web.js +48 -0
  135. package/lib/module/components/Stepper/useStepperLabelFit.web.js.map +1 -0
  136. package/lib/module/components/Stepper/useStepperRingColors.js +28 -0
  137. package/lib/module/components/Stepper/useStepperRingColors.js.map +1 -0
  138. package/lib/module/components/SystemAlert/animation.js +213 -0
  139. package/lib/module/components/SystemAlert/animation.js.map +1 -0
  140. package/lib/module/components/SystemAlert/index.js +515 -0
  141. package/lib/module/components/SystemAlert/index.js.map +1 -0
  142. package/lib/module/components/SystemAlert/styles.js +174 -0
  143. package/lib/module/components/SystemAlert/styles.js.map +1 -0
  144. package/lib/module/components/SystemAlert/useSystemAlertStatusBarStyle.js +49 -0
  145. package/lib/module/components/SystemAlert/useSystemAlertStatusBarStyle.js.map +1 -0
  146. package/lib/module/components/Tabs/index.js +4 -0
  147. package/lib/module/components/Tabs/index.js.map +1 -1
  148. package/lib/module/components/Tabs/styles.js +1 -1
  149. package/lib/module/components/Tabs/styles.js.map +1 -1
  150. package/lib/module/components/chart/ChartInspector.js +600 -0
  151. package/lib/module/components/chart/ChartInspector.js.map +1 -0
  152. package/lib/module/components/chart/format.js +84 -0
  153. package/lib/module/components/chart/format.js.map +1 -0
  154. package/lib/module/components/chart/index.js +2 -0
  155. package/lib/module/components/chart/index.js.map +1 -0
  156. package/lib/module/components/chart/motion.js +89 -0
  157. package/lib/module/components/chart/motion.js.map +1 -0
  158. package/lib/module/components/chart/palette.js +168 -0
  159. package/lib/module/components/chart/palette.js.map +1 -0
  160. package/lib/module/components/chart/size.js +29 -0
  161. package/lib/module/components/chart/size.js.map +1 -0
  162. package/lib/module/components/chart/ticks.js +55 -0
  163. package/lib/module/components/chart/ticks.js.map +1 -0
  164. package/lib/module/components/chart/types.js +4 -0
  165. package/lib/module/components/chart/types.js.map +1 -0
  166. package/lib/module/components/chart/useChartHostWidth.js +23 -0
  167. package/lib/module/components/chart/useChartHostWidth.js.map +1 -0
  168. package/lib/module/components/index.js +5 -0
  169. package/lib/module/components/index.js.map +1 -1
  170. package/lib/module/figma/SystemAlert.Button.figma.js +22 -0
  171. package/lib/module/figma/SystemAlert.Button.figma.js.map +1 -0
  172. package/lib/module/figma/SystemAlert.Close.figma.js +18 -0
  173. package/lib/module/figma/SystemAlert.Close.figma.js.map +1 -0
  174. package/lib/module/figma/SystemAlert.Description.figma.js +14 -0
  175. package/lib/module/figma/SystemAlert.Description.figma.js.map +1 -0
  176. package/lib/module/figma/SystemAlert.IconButton.figma.js +25 -0
  177. package/lib/module/figma/SystemAlert.IconButton.figma.js.map +1 -0
  178. package/lib/module/figma/SystemAlert.figma.js +42 -0
  179. package/lib/module/figma/SystemAlert.figma.js.map +1 -0
  180. package/lib/typescript/components/BarChart/geometry.d.ts +236 -0
  181. package/lib/typescript/components/BarChart/geometry.d.ts.map +1 -0
  182. package/lib/typescript/components/BarChart/index.d.ts +193 -0
  183. package/lib/typescript/components/BarChart/index.d.ts.map +1 -0
  184. package/lib/typescript/components/BarChart/styles.d.ts +32 -0
  185. package/lib/typescript/components/BarChart/styles.d.ts.map +1 -0
  186. package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
  187. package/lib/typescript/components/LineChart/geometry.d.ts +248 -0
  188. package/lib/typescript/components/LineChart/geometry.d.ts.map +1 -0
  189. package/lib/typescript/components/LineChart/index.d.ts +105 -0
  190. package/lib/typescript/components/LineChart/index.d.ts.map +1 -0
  191. package/lib/typescript/components/LineChart/styles.d.ts +12 -0
  192. package/lib/typescript/components/LineChart/styles.d.ts.map +1 -0
  193. package/lib/typescript/components/PieChart/geometry.d.ts +43 -0
  194. package/lib/typescript/components/PieChart/geometry.d.ts.map +1 -0
  195. package/lib/typescript/components/PieChart/index.d.ts +147 -0
  196. package/lib/typescript/components/PieChart/index.d.ts.map +1 -0
  197. package/lib/typescript/components/PieChart/styles.d.ts +27 -0
  198. package/lib/typescript/components/PieChart/styles.d.ts.map +1 -0
  199. package/lib/typescript/components/ProgressCircle/ProgressCircleRing.d.ts.map +1 -1
  200. package/lib/typescript/components/ProgressCircle/ProgressRing.d.ts +17 -0
  201. package/lib/typescript/components/ProgressCircle/ProgressRing.d.ts.map +1 -0
  202. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts.map +1 -1
  203. package/lib/typescript/components/Stepper/index.d.ts +68 -0
  204. package/lib/typescript/components/Stepper/index.d.ts.map +1 -0
  205. package/lib/typescript/components/Stepper/styles.d.ts +46 -0
  206. package/lib/typescript/components/Stepper/styles.d.ts.map +1 -0
  207. package/lib/typescript/components/Stepper/useStepperLabelFit.d.ts +15 -0
  208. package/lib/typescript/components/Stepper/useStepperLabelFit.d.ts.map +1 -0
  209. package/lib/typescript/components/Stepper/useStepperLabelFit.web.d.ts +10 -0
  210. package/lib/typescript/components/Stepper/useStepperLabelFit.web.d.ts.map +1 -0
  211. package/lib/typescript/components/Stepper/useStepperRingColors.d.ts +6 -0
  212. package/lib/typescript/components/Stepper/useStepperRingColors.d.ts.map +1 -0
  213. package/lib/typescript/components/SystemAlert/animation.d.ts +56 -0
  214. package/lib/typescript/components/SystemAlert/animation.d.ts.map +1 -0
  215. package/lib/typescript/components/SystemAlert/index.d.ts +110 -0
  216. package/lib/typescript/components/SystemAlert/index.d.ts.map +1 -0
  217. package/lib/typescript/components/SystemAlert/styles.d.ts +38 -0
  218. package/lib/typescript/components/SystemAlert/styles.d.ts.map +1 -0
  219. package/lib/typescript/components/SystemAlert/useSystemAlertStatusBarStyle.d.ts +14 -0
  220. package/lib/typescript/components/SystemAlert/useSystemAlertStatusBarStyle.d.ts.map +1 -0
  221. package/lib/typescript/components/Tabs/index.d.ts.map +1 -1
  222. package/lib/typescript/components/chart/ChartInspector.d.ts +101 -0
  223. package/lib/typescript/components/chart/ChartInspector.d.ts.map +1 -0
  224. package/lib/typescript/components/chart/format.d.ts +16 -0
  225. package/lib/typescript/components/chart/format.d.ts.map +1 -0
  226. package/lib/typescript/components/chart/index.d.ts +3 -0
  227. package/lib/typescript/components/chart/index.d.ts.map +1 -0
  228. package/lib/typescript/components/chart/motion.d.ts +27 -0
  229. package/lib/typescript/components/chart/motion.d.ts.map +1 -0
  230. package/lib/typescript/components/chart/palette.d.ts +44 -0
  231. package/lib/typescript/components/chart/palette.d.ts.map +1 -0
  232. package/lib/typescript/components/chart/size.d.ts +25 -0
  233. package/lib/typescript/components/chart/size.d.ts.map +1 -0
  234. package/lib/typescript/components/chart/ticks.d.ts +3 -0
  235. package/lib/typescript/components/chart/ticks.d.ts.map +1 -0
  236. package/lib/typescript/components/chart/types.d.ts +163 -0
  237. package/lib/typescript/components/chart/types.d.ts.map +1 -0
  238. package/lib/typescript/components/chart/useChartHostWidth.d.ts +9 -0
  239. package/lib/typescript/components/chart/useChartHostWidth.d.ts.map +1 -0
  240. package/lib/typescript/components/index.d.ts +5 -0
  241. package/lib/typescript/components/index.d.ts.map +1 -1
  242. package/lib/typescript/figma/SystemAlert.Button.figma.d.ts +11 -0
  243. package/lib/typescript/figma/SystemAlert.Button.figma.d.ts.map +1 -0
  244. package/lib/typescript/figma/SystemAlert.Close.figma.d.ts +11 -0
  245. package/lib/typescript/figma/SystemAlert.Close.figma.d.ts.map +1 -0
  246. package/lib/typescript/figma/SystemAlert.Description.figma.d.ts +8 -0
  247. package/lib/typescript/figma/SystemAlert.Description.figma.d.ts.map +1 -0
  248. package/lib/typescript/figma/SystemAlert.IconButton.figma.d.ts +11 -0
  249. package/lib/typescript/figma/SystemAlert.IconButton.figma.d.ts.map +1 -0
  250. package/lib/typescript/figma/SystemAlert.figma.d.ts +8 -0
  251. package/lib/typescript/figma/SystemAlert.figma.d.ts.map +1 -0
  252. package/package.json +5 -5
  253. package/src/components/BarChart/geometry.ts +1469 -0
  254. package/src/components/BarChart/index.tsx +1424 -0
  255. package/src/components/BarChart/styles.ts +31 -0
  256. package/src/components/Button/index.tsx +1 -1
  257. package/src/components/Chip/styles.ts +3 -1
  258. package/src/components/LineChart/geometry.ts +957 -0
  259. package/src/components/LineChart/index.tsx +1109 -0
  260. package/src/components/LineChart/styles.ts +26 -0
  261. package/src/components/PieChart/geometry.ts +295 -0
  262. package/src/components/PieChart/index.tsx +715 -0
  263. package/src/components/PieChart/styles.ts +101 -0
  264. package/src/components/ProgressCircle/ProgressCircleRing.tsx +10 -39
  265. package/src/components/ProgressCircle/ProgressRing.tsx +60 -0
  266. package/src/components/ScrollShadow/useScrollShadow.ts +12 -11
  267. package/src/components/Stepper/index.tsx +452 -0
  268. package/src/components/Stepper/styles.ts +234 -0
  269. package/src/components/Stepper/useStepperLabelFit.ts +21 -0
  270. package/src/components/Stepper/useStepperLabelFit.web.ts +53 -0
  271. package/src/components/Stepper/useStepperRingColors.ts +29 -0
  272. package/src/components/SystemAlert/animation.ts +252 -0
  273. package/src/components/SystemAlert/index.tsx +684 -0
  274. package/src/components/SystemAlert/styles.ts +212 -0
  275. package/src/components/SystemAlert/useSystemAlertStatusBarStyle.ts +57 -0
  276. package/src/components/Tabs/index.tsx +4 -0
  277. package/src/components/Tabs/styles.ts +1 -1
  278. package/src/components/chart/ChartInspector.tsx +726 -0
  279. package/src/components/chart/format.ts +95 -0
  280. package/src/components/chart/index.ts +24 -0
  281. package/src/components/chart/motion.ts +98 -0
  282. package/src/components/chart/palette.tsx +247 -0
  283. package/src/components/chart/size.ts +21 -0
  284. package/src/components/chart/ticks.ts +53 -0
  285. package/src/components/chart/types.ts +183 -0
  286. package/src/components/chart/useChartHostWidth.ts +26 -0
  287. package/src/components/index.ts +5 -0
@@ -0,0 +1,515 @@
1
+ "use strict";
2
+
3
+ import { forwardRef, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4
+ import { AccessibilityInfo, Platform, Text, View } from 'react-native';
5
+ import Animated from 'react-native-reanimated';
6
+ import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
7
+ import { Slot, dataAttributes, mergeDataAttributes } from '@cdx-ui/primitives';
8
+ import { CheckCircle, Close, EmergencyHome, Error as ErrorIcon, Info, Warning } from '@cdx-ui/icons';
9
+ import { cn, createContext, getTextContent, mergeRefs, ParentContext, useParentContext, useStyleContext } from '@cdx-ui/utils';
10
+ import { Button } from '../Button';
11
+ import { Icon } from '../Icon';
12
+ import { IconButton } from '../IconButton';
13
+ import { useSystemAlertPresence, useSystemAlertSurfaceStyle } from './animation';
14
+ import { systemAlertActionLabelVariants, systemAlertActionVariants, systemAlertActionsVariants, systemAlertBodyVariants, systemAlertCloseIconVariants, systemAlertCloseVariants, systemAlertDescriptionVariants, systemAlertIconActionIconVariants, systemAlertIconActionVariants, systemAlertIconVariants, systemAlertPresenceClipVariants, systemAlertPresenceSurfaceVariants, systemAlertPresenceVariants, systemAlertRootVariants } from './styles';
15
+
16
+ // =============================================================================
17
+ // CONTEXT
18
+ // =============================================================================
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
+ const SCOPE = 'SYSTEM_ALERT';
21
+ const useSystemAlertStyleContext = () => {
22
+ const ctx = useStyleContext(SCOPE);
23
+ return {
24
+ color: ctx?.color ?? 'info',
25
+ hasClose: ctx?.hasClose ?? false
26
+ };
27
+ };
28
+ // Provided only in presence mode, so a static banner's Description never registers.
29
+ const [SystemAlertDescriptionRegistryProvider, useSystemAlertDescriptionRegistry] = createContext('SystemAlertDescriptionRegistry', {
30
+ strict: false
31
+ });
32
+ const COLOR_ICONS = {
33
+ danger: EmergencyHome,
34
+ warning: Warning,
35
+ success: CheckCircle,
36
+ info: Info,
37
+ brand: ErrorIcon
38
+ };
39
+
40
+ // =============================================================================
41
+ // PRESENCE (internal, `isOpen` only)
42
+ // =============================================================================
43
+
44
+ const AnimatedSlot = Animated.createAnimatedComponent(Slot);
45
+
46
+ // Screen-reader focus on a leaving surface would land somewhere unpredictable.
47
+ const EXITING_SURFACE_PROPS = {
48
+ importantForAccessibility: 'no-hide-descendants',
49
+ accessibilityElementsHidden: true,
50
+ pointerEvents: 'none'
51
+ };
52
+
53
+ // `scroll` clips like `hidden` on iOS and Android, but Yoga caps a child's flex-basis height at
54
+ // its parent's height unless the parent's overflow is `scroll`. Under `hidden`, the moving
55
+ // wrapper's fixed height caps the surface, iOS lays the description out as one clipped line,
56
+ // and the banner jumps by a line when it settles. Inline because Uniwind compiles
57
+ // `overflow-scroll` to `{ x, y }` keys that React Native ignores.
58
+ const NATIVE_WRAPPER_STYLE = {
59
+ overflow: 'scroll'
60
+ };
61
+
62
+ // RNW ignores the native hiding props and deprecates the `pointerEvents` prop.
63
+ const WEB_EXITING_SURFACE_PROPS = {
64
+ 'aria-hidden': true
65
+ };
66
+ const WEB_EXITING_SURFACE_STYLE = {
67
+ pointerEvents: 'none'
68
+ };
69
+ function SystemAlertPresenceSurface({
70
+ presence,
71
+ asChild,
72
+ surfaceRef,
73
+ style,
74
+ onLayout,
75
+ children,
76
+ ...props
77
+ }) {
78
+ const {
79
+ setSurfaceHeight,
80
+ phase
81
+ } = presence;
82
+ const isWeb = Platform.OS === 'web';
83
+ const nodeRef = useRef(null);
84
+ const ref = useMemo(() => mergeRefs(surfaceRef, nodeRef), [surfaceRef]);
85
+ const surfaceStyle = useSystemAlertSurfaceStyle(presence);
86
+ useLayoutEffect(() => {
87
+ const node = nodeRef.current;
88
+ // RNW's `measure` is deferred, which would let the first frames transition toward 0.
89
+ if (isWeb) {
90
+ const element = node;
91
+ if (typeof element?.getBoundingClientRect === 'function') {
92
+ setSurfaceHeight(element.getBoundingClientRect().height);
93
+ }
94
+ return;
95
+ }
96
+ if (typeof node?.measure !== 'function') return;
97
+ node.measure((_x, _y, _width, height) => {
98
+ setSurfaceHeight(height);
99
+ });
100
+ }, [isWeb, setSurfaceHeight]);
101
+ const handleLayout = useCallback(event => {
102
+ onLayout?.(event);
103
+ setSurfaceHeight(event.nativeEvent.layout.height);
104
+ }, [onLayout, setSurfaceHeight]);
105
+ const isExiting = phase === 'exiting';
106
+ if (isWeb) {
107
+ const WebComp = asChild ? Slot : View;
108
+ return /*#__PURE__*/_jsx(WebComp, {
109
+ ref: ref,
110
+ style: [style, isExiting ? WEB_EXITING_SURFACE_STYLE : undefined],
111
+ ...props,
112
+ ...(isExiting ? WEB_EXITING_SURFACE_PROPS : undefined),
113
+ onLayout: handleLayout,
114
+ children: children
115
+ });
116
+ }
117
+ const Comp = asChild ? AnimatedSlot : Animated.View;
118
+ return /*#__PURE__*/_jsx(Comp, {
119
+ ref: ref,
120
+ style: [style, surfaceStyle],
121
+ ...props,
122
+ ...(isExiting ? EXITING_SURFACE_PROPS : undefined),
123
+ onLayout: handleLayout,
124
+ children: children
125
+ });
126
+ }
127
+ function SystemAlertPresence({
128
+ isOpen,
129
+ animation,
130
+ collapsedHeight,
131
+ isAssertive,
132
+ liveRegion,
133
+ ...surfaceProps
134
+ }) {
135
+ const presence = useSystemAlertPresence({
136
+ isOpen,
137
+ animation,
138
+ collapsedHeight
139
+ });
140
+ const descriptionRef = useRef(null);
141
+ const registerDescription = useCallback((owner, text) => {
142
+ if (text !== null) {
143
+ descriptionRef.current = {
144
+ owner,
145
+ text
146
+ };
147
+ } else if (descriptionRef.current?.owner === owner) {
148
+ descriptionRef.current = null;
149
+ }
150
+ }, []);
151
+ const registry = useMemo(() => ({
152
+ registerDescription
153
+ }), [registerDescription]);
154
+
155
+ // iOS has no live regions. Announce on the open edge only, after the newly mounted
156
+ // Description has registered, and without waiting for the slide.
157
+ const wasOpenRef = useRef(isOpen);
158
+ useEffect(() => {
159
+ const wasOpen = wasOpenRef.current;
160
+ wasOpenRef.current = isOpen;
161
+ if (!isOpen || wasOpen || Platform.OS !== 'ios') return;
162
+ const text = descriptionRef.current?.text ?? '';
163
+ if (!text) {
164
+ if (__DEV__) {
165
+ console.warn('[SystemAlert] Opened without an announcement: `SystemAlert.Description` children must contain text. Text a component resolves itself, outside its children, cannot be read.');
166
+ }
167
+ return;
168
+ }
169
+ AccessibilityInfo.announceForAccessibilityWithOptions(text, {
170
+ queue: !isAssertive
171
+ });
172
+ }, [isOpen, isAssertive]);
173
+ const surface = presence.isSurfaceMounted ? /*#__PURE__*/_jsx(SystemAlertPresenceSurface, {
174
+ presence: presence,
175
+ ...surfaceProps
176
+ }) : null;
177
+
178
+ // Web announces the surface's `role` insertion; an `aria-live` wrapper around it could
179
+ // announce it twice.
180
+ if (Platform.OS === 'web') {
181
+ return /*#__PURE__*/_jsx(SystemAlertDescriptionRegistryProvider, {
182
+ value: registry,
183
+ children: /*#__PURE__*/_jsx(View, {
184
+ ref: presence.wrapperRef,
185
+ className: systemAlertPresenceVariants(),
186
+ style: {
187
+ height: presence.webWrapperHeight,
188
+ minHeight: collapsedHeight
189
+ },
190
+ ...dataAttributes({
191
+ state: presence.webState
192
+ }),
193
+ children: /*#__PURE__*/_jsx(View, {
194
+ className: systemAlertPresenceClipVariants(),
195
+ style: {
196
+ height: presence.webWrapperHeight
197
+ },
198
+ ...dataAttributes({
199
+ state: presence.webState
200
+ }),
201
+ children: surface
202
+ })
203
+ })
204
+ });
205
+ }
206
+
207
+ // The live region sits on the wrapper, which stays mounted while closed, so TalkBack
208
+ // hears the open as a change inside an existing region.
209
+ return /*#__PURE__*/_jsx(SystemAlertDescriptionRegistryProvider, {
210
+ value: registry,
211
+ children: /*#__PURE__*/_jsx(Animated.View, {
212
+ className: systemAlertPresenceVariants(),
213
+ style: [NATIVE_WRAPPER_STYLE, presence.wrapperStyle],
214
+ accessibilityLiveRegion: liveRegion,
215
+ children: surface
216
+ })
217
+ });
218
+ }
219
+
220
+ // =============================================================================
221
+ // ROOT
222
+ // =============================================================================
223
+
224
+ const SystemAlertRoot = /*#__PURE__*/forwardRef(({
225
+ asChild,
226
+ isOpen,
227
+ animation,
228
+ color = 'info',
229
+ hasSafeAreaInset = true,
230
+ onClose,
231
+ closeAccessibilityLabel = 'Dismiss alert',
232
+ className,
233
+ style,
234
+ children,
235
+ ...props
236
+ }, ref) => {
237
+ const insets = useContext(SafeAreaInsetsContext);
238
+ const hasClose = !!onClose;
239
+ const parent = useParentContext();
240
+ const ctx = useMemo(() => ({
241
+ ...parent,
242
+ [SCOPE]: {
243
+ color,
244
+ hasClose
245
+ }
246
+ }), [parent, color, hasClose]);
247
+ const isAssertive = color === 'danger' || color === 'warning';
248
+ const role = isAssertive ? 'alert' : 'status';
249
+ const liveRegion = isAssertive ? 'assertive' : 'polite';
250
+ const insetTop = hasSafeAreaInset ? insets?.top ?? 0 : 0;
251
+ const rootStyle = hasSafeAreaInset ? [{
252
+ paddingTop: insetTop
253
+ }, style] : style;
254
+ const dataProps = mergeDataAttributes(props, dataAttributes({
255
+ slot: 'system-alert'
256
+ }));
257
+ const body = asChild ? null : /*#__PURE__*/_jsxs(View, {
258
+ className: systemAlertBodyVariants(),
259
+ children: [children, onClose ? /*#__PURE__*/_jsx(IconButton, {
260
+ as: Close,
261
+ variant: "ghost",
262
+ size: "small",
263
+ onPress: onClose,
264
+ accessibilityLabel: closeAccessibilityLabel,
265
+ className: systemAlertCloseVariants({
266
+ color
267
+ }),
268
+ iconClassName: systemAlertCloseIconVariants({
269
+ color
270
+ }),
271
+ ...dataAttributes({
272
+ slot: 'system-alert-close'
273
+ })
274
+ }) : null]
275
+ });
276
+ if (isOpen !== undefined) {
277
+ return /*#__PURE__*/_jsx(ParentContext.Provider, {
278
+ value: ctx,
279
+ children: /*#__PURE__*/_jsx(SystemAlertPresence, {
280
+ isOpen: isOpen,
281
+ animation: animation,
282
+ collapsedHeight: insetTop,
283
+ isAssertive: isAssertive,
284
+ liveRegion: liveRegion,
285
+ surfaceRef: ref,
286
+ asChild: asChild,
287
+ className: cn(systemAlertRootVariants({
288
+ color
289
+ }), systemAlertPresenceSurfaceVariants(), className),
290
+ style: rootStyle,
291
+ role: role,
292
+ ...props,
293
+ ...dataProps,
294
+ children: asChild ? children : body
295
+ })
296
+ });
297
+ }
298
+ const rootClassName = cn(systemAlertRootVariants({
299
+ color
300
+ }), className);
301
+ if (asChild) {
302
+ return /*#__PURE__*/_jsx(ParentContext.Provider, {
303
+ value: ctx,
304
+ children: /*#__PURE__*/_jsx(Slot, {
305
+ ref: ref,
306
+ className: rootClassName,
307
+ style: rootStyle,
308
+ role: role,
309
+ accessibilityLiveRegion: liveRegion,
310
+ ...props,
311
+ ...dataProps,
312
+ children: children
313
+ })
314
+ });
315
+ }
316
+ return /*#__PURE__*/_jsx(ParentContext.Provider, {
317
+ value: ctx,
318
+ children: /*#__PURE__*/_jsx(View, {
319
+ ref: ref,
320
+ className: rootClassName,
321
+ style: rootStyle,
322
+ role: role,
323
+ accessibilityLiveRegion: liveRegion,
324
+ ...props,
325
+ ...dataProps,
326
+ children: body
327
+ })
328
+ });
329
+ });
330
+ SystemAlertRoot.displayName = 'SystemAlert';
331
+
332
+ // =============================================================================
333
+ // ICON
334
+ // =============================================================================
335
+
336
+ const SystemAlertIcon = /*#__PURE__*/forwardRef(({
337
+ asChild,
338
+ as: asOverride,
339
+ className,
340
+ style,
341
+ ...props
342
+ }, ref) => {
343
+ const {
344
+ color
345
+ } = useSystemAlertStyleContext();
346
+ const computedClassName = cn(systemAlertIconVariants({
347
+ color
348
+ }), className);
349
+ const dataProps = mergeDataAttributes(props, dataAttributes({
350
+ slot: 'system-alert-icon'
351
+ }));
352
+ if (asChild) {
353
+ return /*#__PURE__*/_jsx(Slot, {
354
+ ref: ref,
355
+ className: computedClassName,
356
+ style: style,
357
+ ...props,
358
+ ...dataProps
359
+ });
360
+ }
361
+ return /*#__PURE__*/_jsx(Icon, {
362
+ as: asOverride ?? COLOR_ICONS[color],
363
+ className: computedClassName,
364
+ style: style,
365
+ ...props,
366
+ ...dataProps
367
+ });
368
+ });
369
+ SystemAlertIcon.displayName = 'SystemAlert.Icon';
370
+
371
+ // =============================================================================
372
+ // DESCRIPTION
373
+ // =============================================================================
374
+
375
+ const SystemAlertDescription = /*#__PURE__*/forwardRef(({
376
+ asChild,
377
+ className,
378
+ style,
379
+ children,
380
+ ...props
381
+ }, ref) => {
382
+ const {
383
+ color
384
+ } = useSystemAlertStyleContext();
385
+ const registry = useSystemAlertDescriptionRegistry();
386
+ const [owner] = useState(() => ({}));
387
+ const text = registry ? getTextContent(children) : '';
388
+ useLayoutEffect(() => {
389
+ registry?.registerDescription(owner, text);
390
+ }, [registry, owner, text]);
391
+ useLayoutEffect(() => () => registry?.registerDescription(owner, null), [registry, owner]);
392
+ const computedClassName = cn(systemAlertDescriptionVariants({
393
+ color
394
+ }), className);
395
+ const Comp = asChild ? Slot : Text;
396
+ return /*#__PURE__*/_jsx(Comp, {
397
+ ref: ref,
398
+ className: computedClassName,
399
+ style: style,
400
+ ...props,
401
+ ...mergeDataAttributes(props, dataAttributes({
402
+ slot: 'system-alert-description'
403
+ })),
404
+ children: children
405
+ });
406
+ });
407
+ SystemAlertDescription.displayName = 'SystemAlert.Description';
408
+
409
+ // =============================================================================
410
+ // ACTIONS
411
+ // =============================================================================
412
+
413
+ const SystemAlertActions = /*#__PURE__*/forwardRef(({
414
+ asChild,
415
+ className,
416
+ style,
417
+ children,
418
+ ...props
419
+ }, ref) => {
420
+ const {
421
+ hasClose
422
+ } = useSystemAlertStyleContext();
423
+ const computedClassName = cn(systemAlertActionsVariants({
424
+ hasClose
425
+ }), className);
426
+ const Comp = asChild ? Slot : View;
427
+ return /*#__PURE__*/_jsx(Comp, {
428
+ ref: ref,
429
+ className: computedClassName,
430
+ style: style,
431
+ ...props,
432
+ ...mergeDataAttributes(props, dataAttributes({
433
+ slot: 'system-alert-actions'
434
+ })),
435
+ children: children
436
+ });
437
+ });
438
+ SystemAlertActions.displayName = 'SystemAlert.Actions';
439
+
440
+ // =============================================================================
441
+ // ACTION
442
+ // =============================================================================
443
+
444
+ const SystemAlertAction = /*#__PURE__*/forwardRef(({
445
+ className,
446
+ children,
447
+ ...props
448
+ }, ref) => {
449
+ const {
450
+ color
451
+ } = useSystemAlertStyleContext();
452
+ return /*#__PURE__*/_jsx(Button, {
453
+ ref: ref,
454
+ variant: "ghost",
455
+ size: "small",
456
+ className: cn(systemAlertActionVariants({
457
+ color
458
+ }), className),
459
+ ...props,
460
+ ...mergeDataAttributes(props, dataAttributes({
461
+ slot: 'system-alert-action'
462
+ })),
463
+ children: /*#__PURE__*/_jsx(Button.Label, {
464
+ className: systemAlertActionLabelVariants({
465
+ color
466
+ }),
467
+ children: children
468
+ })
469
+ });
470
+ });
471
+ SystemAlertAction.displayName = 'SystemAlert.Action';
472
+
473
+ // =============================================================================
474
+ // ICON ACTION
475
+ // =============================================================================
476
+
477
+ const SystemAlertIconAction = /*#__PURE__*/forwardRef(({
478
+ className,
479
+ iconClassName,
480
+ ...props
481
+ }, ref) => {
482
+ const {
483
+ color
484
+ } = useSystemAlertStyleContext();
485
+ return /*#__PURE__*/_jsx(IconButton, {
486
+ ref: ref,
487
+ variant: "ghost",
488
+ size: "small",
489
+ className: cn(systemAlertIconActionVariants({
490
+ color
491
+ }), className),
492
+ iconClassName: cn(systemAlertIconActionIconVariants({
493
+ color
494
+ }), iconClassName),
495
+ ...props,
496
+ ...mergeDataAttributes(props, dataAttributes({
497
+ slot: 'system-alert-icon-action'
498
+ }))
499
+ });
500
+ });
501
+ SystemAlertIconAction.displayName = 'SystemAlert.IconAction';
502
+
503
+ // =============================================================================
504
+ // COMPOUND EXPORT
505
+ // =============================================================================
506
+
507
+ export const SystemAlert = Object.assign(SystemAlertRoot, {
508
+ Icon: SystemAlertIcon,
509
+ Description: SystemAlertDescription,
510
+ Actions: SystemAlertActions,
511
+ Action: SystemAlertAction,
512
+ IconAction: SystemAlertIconAction
513
+ });
514
+ export { useSystemAlertStatusBarStyle } from './useSystemAlertStatusBarStyle';
515
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","useCallback","useContext","useEffect","useLayoutEffect","useMemo","useRef","useState","AccessibilityInfo","Platform","Text","View","Animated","SafeAreaInsetsContext","Slot","dataAttributes","mergeDataAttributes","CheckCircle","Close","EmergencyHome","Error","ErrorIcon","Info","Warning","cn","createContext","getTextContent","mergeRefs","ParentContext","useParentContext","useStyleContext","Button","Icon","IconButton","useSystemAlertPresence","useSystemAlertSurfaceStyle","systemAlertActionLabelVariants","systemAlertActionVariants","systemAlertActionsVariants","systemAlertBodyVariants","systemAlertCloseIconVariants","systemAlertCloseVariants","systemAlertDescriptionVariants","systemAlertIconActionIconVariants","systemAlertIconActionVariants","systemAlertIconVariants","systemAlertPresenceClipVariants","systemAlertPresenceSurfaceVariants","systemAlertPresenceVariants","systemAlertRootVariants","jsx","_jsx","jsxs","_jsxs","SCOPE","useSystemAlertStyleContext","ctx","color","hasClose","SystemAlertDescriptionRegistryProvider","useSystemAlertDescriptionRegistry","strict","COLOR_ICONS","danger","warning","success","info","brand","AnimatedSlot","createAnimatedComponent","EXITING_SURFACE_PROPS","importantForAccessibility","accessibilityElementsHidden","pointerEvents","NATIVE_WRAPPER_STYLE","overflow","WEB_EXITING_SURFACE_PROPS","WEB_EXITING_SURFACE_STYLE","SystemAlertPresenceSurface","presence","asChild","surfaceRef","style","onLayout","children","props","setSurfaceHeight","phase","isWeb","OS","nodeRef","ref","surfaceStyle","node","current","element","getBoundingClientRect","height","measure","_x","_y","_width","handleLayout","event","nativeEvent","layout","isExiting","WebComp","undefined","Comp","SystemAlertPresence","isOpen","animation","collapsedHeight","isAssertive","liveRegion","surfaceProps","descriptionRef","registerDescription","owner","text","registry","wasOpenRef","wasOpen","__DEV__","console","warn","announceForAccessibilityWithOptions","queue","surface","isSurfaceMounted","value","wrapperRef","className","webWrapperHeight","minHeight","state","webState","wrapperStyle","accessibilityLiveRegion","SystemAlertRoot","hasSafeAreaInset","onClose","closeAccessibilityLabel","insets","parent","role","insetTop","top","rootStyle","paddingTop","dataProps","slot","body","as","variant","size","onPress","accessibilityLabel","iconClassName","Provider","rootClassName","displayName","SystemAlertIcon","asOverride","computedClassName","SystemAlertDescription","SystemAlertActions","SystemAlertAction","Label","SystemAlertIconAction","SystemAlert","Object","assign","Description","Actions","Action","IconAction","useSystemAlertStatusBarStyle"],"sourceRoot":"../../../../src","sources":["components/SystemAlert/index.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAIH,OAAO;AACd,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,IAAI,EACJC,IAAI,QAKC,cAAc;AACrB,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,IAAI,EAAEC,cAAc,EAAEC,mBAAmB,QAAQ,oBAAoB;AAE9E,SACEC,WAAW,EACXC,KAAK,EACLC,aAAa,EACbC,KAAK,IAAIC,SAAS,EAClBC,IAAI,EACJC,OAAO,QACF,eAAe;AACtB,SACEC,EAAE,EACFC,aAAa,EACbC,cAAc,EACdC,SAAS,EACTC,aAAa,EACbC,gBAAgB,EAChBC,eAAe,QACV,eAAe;AAEtB,SAASC,MAAM,QAA0B,WAAW;AACpD,SAASC,IAAI,QAAwB,SAAS;AAC9C,SAASC,UAAU,QAA8B,eAAe;AAChE,SACEC,sBAAsB,EACtBC,0BAA0B,QAErB,aAAa;AACpB,SACEC,8BAA8B,EAC9BC,yBAAyB,EACzBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,4BAA4B,EAC5BC,wBAAwB,EACxBC,8BAA8B,EAC9BC,iCAAiC,EACjCC,6BAA6B,EAC7BC,uBAAuB,EACvBC,+BAA+B,EAC/BC,kCAAkC,EAClCC,2BAA2B,EAC3BC,uBAAuB,QAGlB,UAAU;;AAEjB;AACA;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEA,MAAMC,KAAK,GAAG,cAAc;AAO5B,MAAMC,0BAA0B,GAAGA,CAAA,KAA+B;EAChE,MAAMC,GAAG,GAAG1B,eAAe,CAACwB,KAAK,CAAiD;EAClF,OAAO;IAAEG,KAAK,EAAED,GAAG,EAAEC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