@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,211 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.STEPPER_RING_STROKE_WIDTH = exports.STEPPER_INDICATOR_SIZE = void 0;
7
+ exports.getStepperLayout = getStepperLayout;
8
+ exports.stepperVariants = exports.stepperTitleVariants = exports.stepperStepVariants = exports.stepperStepTriggerVariants = exports.stepperStepMainVariants = exports.stepperStepLabelVariants = exports.stepperStepBodyVariants = exports.stepperSeparatorVariants = exports.stepperIndicatorVariants = exports.stepperIndicatorRingVariants = exports.stepperIndicatorNumeralVariants = exports.stepperIndicatorDiscVariants = exports.stepperIndicatorCheckVariants = exports.stepperDescriptionVariants = exports.stepperContentVariants = void 0;
9
+ var _reactNative = require("react-native");
10
+ var _utils = require("@cdx-ui/utils");
11
+ var _constants = require("../../styles/constants");
12
+ /** Indicator frame in px. The ring is drawn at this size around the 24px disc. */
13
+ const STEPPER_INDICATOR_SIZE = exports.STEPPER_INDICATOR_SIZE = 34;
14
+ const STEPPER_RING_STROKE_WIDTH = exports.STEPPER_RING_STROKE_WIDTH = 3;
15
+ function getStepperLayout(orientation, labelPlacement) {
16
+ if (orientation === 'vertical') {
17
+ return 'vertical';
18
+ }
19
+ return labelPlacement === 'bottom' ? 'horizontal-bottom' : 'horizontal-end';
20
+ }
21
+
22
+ // Horizontal layouts:
23
+ // - `horizontal-end` (label after the indicator): steps start at their content width and every
24
+ // step but the last grows; that growth goes to its in-flow separator. With `labelFit: 'words'`
25
+ // (web, while the row fits) steps keep their min-content width so labels wrap between words;
26
+ // with `'shrink'` RN Web's `min-width: 0` lets them shrink further so the row never overflows.
27
+ // - `horizontal-bottom` (label centered below): equal columns; the separator is absolute, so it
28
+ // never affects column layout.
29
+ const stepperVariants = exports.stepperVariants = (0, _utils.cva)([], {
30
+ variants: {
31
+ layout: {
32
+ vertical: 'flex-col',
33
+ 'horizontal-end': 'w-full flex-row items-start',
34
+ 'horizontal-bottom': 'w-full flex-row items-start'
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ layout: 'vertical'
39
+ }
40
+ });
41
+ const stepperStepVariants = exports.stepperStepVariants = (0, _utils.cva)([], {
42
+ variants: {
43
+ layout: {
44
+ vertical: 'flex-row',
45
+ 'horizontal-end': 'min-w-0 flex-row items-start',
46
+ 'horizontal-bottom': 'relative min-w-0 flex-1 basis-0 items-center'
47
+ },
48
+ isLast: {
49
+ true: '',
50
+ false: ''
51
+ },
52
+ labelFit: {
53
+ words: '',
54
+ shrink: ''
55
+ }
56
+ },
57
+ compoundVariants: [{
58
+ layout: 'horizontal-end',
59
+ isLast: false,
60
+ className: 'grow shrink basis-auto pe-2'
61
+ }, {
62
+ layout: 'horizontal-end',
63
+ isLast: true,
64
+ className: 'shrink'
65
+ }, {
66
+ layout: 'horizontal-end',
67
+ labelFit: 'words',
68
+ className: 'min-w-auto'
69
+ }],
70
+ defaultVariants: {
71
+ layout: 'vertical',
72
+ isLast: false,
73
+ labelFit: 'shrink'
74
+ }
75
+ });
76
+
77
+ // Unexported layout wrappers inside `Stepper.Step` (no `data-slot`).
78
+ const stepperStepMainVariants = exports.stepperStepMainVariants = (0, _utils.cva)(['min-w-0'], {
79
+ variants: {
80
+ layout: {
81
+ vertical: 'flex-1',
82
+ 'horizontal-end': 'shrink',
83
+ 'horizontal-bottom': 'items-center self-stretch px-2'
84
+ },
85
+ labelFit: {
86
+ words: '',
87
+ shrink: ''
88
+ }
89
+ },
90
+ compoundVariants: [{
91
+ layout: 'horizontal-end',
92
+ labelFit: 'words',
93
+ className: 'min-w-auto'
94
+ }],
95
+ defaultVariants: {
96
+ layout: 'vertical',
97
+ labelFit: 'shrink'
98
+ }
99
+ });
100
+
101
+ // Each layout pads the hover and press fill and cancels it with an equal negative margin, so a
102
+ // step keeps its geometry when it becomes clickable. The 24px disc sits 5px inside its 34px
103
+ // frame, so sides bounded by the disc get 4px and sides bounded by text get 9px; the fill then
104
+ // looks evenly padded. Each layout aligns the trigger to its content (`self-start`, or
105
+ // `self-center` under a centered label) so the fill hugs the indicator and label instead of
106
+ // spanning the step. Hover, press and focus-visible use the `Tabs` hover tokens and the Forge
107
+ // focus ring until the designer specifies clickable-step states.
108
+ const stepperStepTriggerVariants = exports.stepperStepTriggerVariants = (0, _utils.cva)(['rounded-md', _constants.TRANSITION_COLORS, _reactNative.Platform.select({
109
+ default: 'data-[active=true]:bg-surface-secondary-active',
110
+ web: ['outline-none data-[clickable=true]:cursor-pointer', 'data-[hover=true]:bg-surface-secondary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active', 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2'].join(' ')
111
+ })], {
112
+ variants: {
113
+ layout: {
114
+ vertical: 'flex-row items-start self-start gap-2 -my-1 -ms-1 -me-[9px] py-1 ps-1 pe-[9px]',
115
+ 'horizontal-end': 'flex-row items-start self-start gap-2 -my-1 -ms-1 -me-[9px] py-1 ps-1 pe-[9px]',
116
+ 'horizontal-bottom': 'min-w-0 items-center self-center gap-1 -mx-[9px] -mt-1 -mb-[9px] px-[9px] pt-1 pb-[9px]'
117
+ }
118
+ },
119
+ defaultVariants: {
120
+ layout: 'vertical'
121
+ }
122
+ });
123
+ const stepperStepLabelVariants = exports.stepperStepLabelVariants = (0, _utils.cva)(['min-w-0'], {
124
+ variants: {
125
+ layout: {
126
+ vertical: 'shrink py-[7px]',
127
+ 'horizontal-end': 'shrink py-[7px]',
128
+ 'horizontal-bottom': 'self-stretch'
129
+ },
130
+ labelFit: {
131
+ words: '',
132
+ shrink: ''
133
+ }
134
+ },
135
+ compoundVariants: [{
136
+ layout: 'horizontal-end',
137
+ labelFit: 'words',
138
+ className: 'min-w-auto'
139
+ }],
140
+ defaultVariants: {
141
+ layout: 'vertical',
142
+ labelFit: 'shrink'
143
+ }
144
+ });
145
+ const stepperStepBodyVariants = exports.stepperStepBodyVariants = (0, _utils.cva)([], {
146
+ variants: {
147
+ layout: {
148
+ vertical: 'ps-[42px]',
149
+ 'horizontal-end': 'ps-[42px]',
150
+ 'horizontal-bottom': 'self-stretch'
151
+ }
152
+ },
153
+ defaultVariants: {
154
+ layout: 'vertical'
155
+ }
156
+ });
157
+
158
+ // Indicator, disc, numeral and check each emit their own `data-current` because native
159
+ // Uniwind cannot style a child from its parent's data attributes.
160
+ const stepperIndicatorVariants = exports.stepperIndicatorVariants = (0, _utils.cva)(['relative size-[34px] shrink-0 items-center justify-center']);
161
+ const stepperIndicatorRingVariants = exports.stepperIndicatorRingVariants = (0, _utils.cva)(['pointer-events-none absolute inset-0']);
162
+ const stepperIndicatorDiscVariants = exports.stepperIndicatorDiscVariants = (0, _utils.cva)(['size-6 items-center justify-center rounded-full', 'bg-surface-neutral-strong data-[current=true]:bg-surface-brand-strong']);
163
+ const stepperIndicatorNumeralVariants = exports.stepperIndicatorNumeralVariants = (0, _utils.cva)(['body-sm font-medium', 'text-content-neutral-on-strong data-[current=true]:text-content-brand-on-strong']);
164
+ const stepperIndicatorCheckVariants = exports.stepperIndicatorCheckVariants = (0, _utils.cva)(['size-7 text-content-neutral data-[current=true]:text-content-brand']);
165
+
166
+ // Native text alignment does not inherit from a parent `View`, so centered labels set it on
167
+ // each text part.
168
+ const stepperTitleVariants = exports.stepperTitleVariants = (0, _utils.cva)(['body-md text-content-secondary', 'data-[current=true]:font-medium data-[current=true]:text-content-primary'], {
169
+ variants: {
170
+ isCentered: {
171
+ true: 'text-center',
172
+ false: ''
173
+ }
174
+ },
175
+ defaultVariants: {
176
+ isCentered: false
177
+ }
178
+ });
179
+ const stepperDescriptionVariants = exports.stepperDescriptionVariants = (0, _utils.cva)(['body-sm text-content-secondary'], {
180
+ variants: {
181
+ isCentered: {
182
+ true: 'text-center',
183
+ false: ''
184
+ }
185
+ },
186
+ defaultVariants: {
187
+ isCentered: false
188
+ }
189
+ });
190
+ const stepperContentVariants = exports.stepperContentVariants = (0, _utils.cva)(['gap-2 py-2']);
191
+
192
+ // Vertical: rendered before the step's main column with zero net width, centered under the
193
+ // 34px frame; `self-stretch` follows the title and content.
194
+ // `horizontal-end`: in flow after the label, centered on the frame's height; it takes the
195
+ // step's growth, and the step's `pe-2` leaves 8px before the next indicator.
196
+ // `horizontal-bottom`: absolute from this column's center to the next one's (columns are equal
197
+ // and have no gap), inset 25px at each end: half the 34px frame plus 8px.
198
+ // `z-10` keeps the line above a clickable trigger's hover and press fill.
199
+ const stepperSeparatorVariants = exports.stepperSeparatorVariants = (0, _utils.cva)(['z-10 bg-stroke-secondary'], {
200
+ variants: {
201
+ layout: {
202
+ vertical: 'relative mt-[34px] min-h-6 w-px self-stretch ms-[16.5px] -me-[17.5px]',
203
+ 'horizontal-end': 'relative mt-[16.5px] h-px min-w-6 flex-1 ms-2',
204
+ 'horizontal-bottom': 'absolute top-[16.5px] start-[50%] end-[-50%] h-px ms-[25px] me-[25px]'
205
+ }
206
+ },
207
+ defaultVariants: {
208
+ layout: 'vertical'
209
+ }
210
+ });
211
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_utils","_constants","STEPPER_INDICATOR_SIZE","exports","STEPPER_RING_STROKE_WIDTH","getStepperLayout","orientation","labelPlacement","stepperVariants","cva","variants","layout","vertical","defaultVariants","stepperStepVariants","isLast","true","false","labelFit","words","shrink","compoundVariants","className","stepperStepMainVariants","stepperStepTriggerVariants","TRANSITION_COLORS","Platform","select","default","web","join","stepperStepLabelVariants","stepperStepBodyVariants","stepperIndicatorVariants","stepperIndicatorRingVariants","stepperIndicatorDiscVariants","stepperIndicatorNumeralVariants","stepperIndicatorCheckVariants","stepperTitleVariants","isCentered","stepperDescriptionVariants","stepperContentVariants","stepperSeparatorVariants"],"sourceRoot":"../../../../src","sources":["components/Stepper/styles.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA;AACO,MAAMG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,EAAE;AACjC,MAAME,yBAAyB,GAAAD,OAAA,CAAAC,yBAAA,GAAG,CAAC;AAInC,SAASC,gBAAgBA,CAC9BC,WAA+B,EAC/BC,cAAqC,EACtB;EACf,IAAID,WAAW,KAAK,UAAU,EAAE;IAC9B,O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AE;IACR6B,UAAU,EAAE;MACVvB,IAAI,EAAE,aAAa;MACnBC,KAAK,EAAE;IACT;EACF,CAAC;EACDJ,eAAe,EAAE;IACf0B,UAAU,EAAE;EACd;AACF,CACF,CAAC;AAEM,MAAMC,0BAA0B,GAAArC,OAAA,CAAAqC,0BAAA,GAAG,IAAA/B,UAAG,EAAC,CAAC,gCAAgC,CAAC,EAAE;EAChFC,QAAQ,EAAE;IACR6B,UAAU,EAAE;MACVvB,IAAI,EAAE,aAAa;MACnBC,KAAK,EAAE;IACT;EACF,CAAC;EACDJ,eAAe,EAAE;IACf0B,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEK,MAAME,sBAAsB,GAAAtC,OAAA,CAAAsC,sBAAA,GAAG,IAAAhC,UAAG,EAAC,CAAC,YAAY,CAAC,CAAC;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMiC,wBAAwB,GAAAvC,OAAA,CAAAuC,wBAAA,GAAG,IAAAjC,UAAG,EAAC,CAAC,0BAA0B,CAAC,EAAE;EACxEC,QAAQ,EAAE;IACRC,MAAM,EAAE;MACNC,QAAQ,EAAE,uEAAuE;MACjF,gBAAgB,EAAE,+CAA+C;MACjE,mBAAmB,EAAE;IACvB;EACF,CAAC;EACDC,eAAe,EAAE;IACfF,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useStepperLabelFit = useStepperLabelFit;
7
+ /**
8
+ * How `horizontal-end` labels give way when the row runs out of room. `'words'` keeps each
9
+ * step at least as wide as its longest word, so labels wrap only between words; `'shrink'` lets
10
+ * steps shrink below that so the row never overflows.
11
+ */
12
+
13
+ const NATIVE_RESULT = {
14
+ fit: 'shrink',
15
+ measureRef: undefined
16
+ };
17
+
18
+ /** Native layout has no min-content sizing, so steps always shrink to fit. */
19
+ function useStepperLabelFit(_enabled, _count) {
20
+ return NATIVE_RESULT;
21
+ }
22
+ //# sourceMappingURL=useStepperLabelFit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NATIVE_RESULT","fit","measureRef","undefined","useStepperLabelFit","_enabled","_count"],"sourceRoot":"../../../../src","sources":["components/Stepper/useStepperLabelFit.ts"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;AACA;;AAQA,MAAMA,aAAoC,GAAG;EAAEC,GAAG,EAAE,QAAQ;EAAEC,UAAU,EAAEC;AAAU,CAAC;;AAErF;AACO,SAASC,kBAAkBA,CAACC,QAAiB,EAAEC,MAAc,EAAyB;EAC3F,OAAON,aAAa;AACtB","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useStepperLabelFit = useStepperLabelFit;
7
+ var _react = require("react");
8
+ /**
9
+ * CSS flex cannot keep min-content minimums only while they fit: `min-width: auto` overflows a
10
+ * tight row and `min-width: 0` breaks words even when there is room. So labels start at
11
+ * `'words'`, and if the root then overflows they switch to `'shrink'` before paint. The decision
12
+ * is kept until the root's width or the step count changes.
13
+ */
14
+ function useStepperLabelFit(enabled, count) {
15
+ const [node, setNode] = (0, _react.useState)(null);
16
+ const [width, setWidth] = (0, _react.useState)(0);
17
+ const [decision, setDecision] = (0, _react.useState)(null);
18
+ const key = `${String(width)}:${String(count)}`;
19
+ const fit = decision?.key === key ? decision.fit : 'words';
20
+ (0, _react.useEffect)(() => {
21
+ if (!enabled || node === null || typeof ResizeObserver === 'undefined') {
22
+ return undefined;
23
+ }
24
+ const observer = new ResizeObserver(() => {
25
+ setWidth(node.clientWidth);
26
+ });
27
+ observer.observe(node);
28
+ return () => observer.disconnect();
29
+ }, [enabled, node]);
30
+
31
+ // No deps: label text can change without resizing the root, and the measurement is cheap.
32
+ // eslint-disable-next-line react-hooks/exhaustive-deps
33
+ (0, _react.useLayoutEffect)(() => {
34
+ if (!enabled || node === null || fit !== 'words') {
35
+ return;
36
+ }
37
+ if (node.scrollWidth > node.clientWidth + 1) {
38
+ setDecision({
39
+ key,
40
+ fit: 'shrink'
41
+ });
42
+ }
43
+ });
44
+ const measureRef = (0, _react.useCallback)(value => {
45
+ setNode(value);
46
+ }, []);
47
+ return {
48
+ fit: enabled ? fit : 'shrink',
49
+ measureRef: enabled ? measureRef : undefined
50
+ };
51
+ }
52
+ //# sourceMappingURL=useStepperLabelFit.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","useStepperLabelFit","enabled","count","node","setNode","useState","width","setWidth","decision","setDecision","key","String","fit","useEffect","ResizeObserver","undefined","observer","clientWidth","observe","disconnect","useLayoutEffect","scrollWidth","measureRef","useCallback","value"],"sourceRoot":"../../../../src","sources":["components/Stepper/useStepperLabelFit.web.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAACC,OAAgB,EAAEC,KAAa,EAAyB;EACzF,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAG,IAAAC,eAAQ,EAAqB,IAAI,CAAC;EAC1D,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAF,eAAQ,EAAC,CAAC,CAAC;EACrC,MAAM,CAACG,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAJ,eAAQ,EAAqB,IAAI,CAAC;EAElE,MAAMK,GAAG,GAAG,GAAGC,MAAM,CAACL,KAAK,CAAC,IAAIK,MAAM,CAACT,KAAK,CAAC,EAAE;EAC/C,MAAMU,GAAoB,GAAGJ,QAAQ,EAAEE,GAAG,KAAKA,GAAG,GAAGF,QAAQ,CAACI,GAAG,GAAG,OAAO;EAE3E,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAI,CAACZ,OAAO,IAAIE,IAAI,KAAK,IAAI,IAAI,OAAOW,cAAc,KAAK,WAAW,EAAE;MACtE,OAAOC,SAAS;IAClB;IACA,MAAMC,QAAQ,GAAG,IAAIF,cAAc,CAAC,MAAM;MACxCP,QAAQ,CAACJ,IAAI,CAACc,WAAW,CAAC;IAC5B,CAAC,CAAC;IACFD,QAAQ,CAACE,OAAO,CAACf,IAAI,CAAC;IACtB,OAAO,MAAMa,QAAQ,CAACG,UAAU,CAAC,CAAC;EACpC,CAAC,EAAE,CAAClB,OAAO,EAAEE,IAAI,CAAC,CAAC;;EAEnB;EACA;EACA,IAAAiB,sBAAe,EAAC,MAAM;IACpB,IAAI,CAACnB,OAAO,IAAIE,IAAI,KAAK,IAAI,IAAIS,GAAG,KAAK,OAAO,EAAE;MAChD;IACF;IACA,IAAIT,IAAI,CAACkB,WAAW,GAAGlB,IAAI,CAACc,WAAW,GAAG,CAAC,EAAE;MAC3CR,WAAW,CAAC;QAAEC,GAAG;QAAEE,GAAG,EAAE;MAAS,CAAC,CAAC;IACrC;EACF,CAAC,CAAC;EAEF,MAAMU,UAAU,GAAG,IAAAC,kBAAW,EAAqBC,KAAK,IAAK;IAC3DpB,OAAO,CAACoB,KAAsC,CAAC;EACjD,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IAAEZ,GAAG,EAAEX,OAAO,GAAGW,GAAG,GAAG,QAAQ;IAAEU,UAAU,EAAErB,OAAO,GAAGqB,UAAU,GAAGP;EAAU,CAAC;AACxF","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useStepperRingColors = useStepperRingColors;
7
+ var _uniwind = require("uniwind");
8
+ /** Light-theme fallbacks when Uniwind CSS context is unavailable (e.g. Jest). */
9
+ const FALLBACKS = {
10
+ track: '#e9e9e9',
11
+ brand: '#346099',
12
+ neutral: '#616263'
13
+ };
14
+ function toColor(value, fallback) {
15
+ if (typeof value === 'string' && value.length > 0) {
16
+ return value;
17
+ }
18
+ return fallback;
19
+ }
20
+
21
+ /** Ring stroke colors for `Stepper.Indicator`: brand on the current step, neutral otherwise. */
22
+ function useStepperRingColors(isCurrent) {
23
+ const trackToken = (0, _uniwind.useCSSVariable)('--color-stroke-secondary');
24
+ const brandToken = (0, _uniwind.useCSSVariable)('--color-surface-brand-strong');
25
+ const neutralToken = (0, _uniwind.useCSSVariable)('--color-surface-neutral-strong');
26
+ return {
27
+ track: toColor(trackToken, FALLBACKS.track),
28
+ indicator: isCurrent ? toColor(brandToken, FALLBACKS.brand) : toColor(neutralToken, FALLBACKS.neutral)
29
+ };
30
+ }
31
+ //# sourceMappingURL=useStepperRingColors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_uniwind","require","FALLBACKS","track","brand","neutral","toColor","value","fallback","length","useStepperRingColors","isCurrent","trackToken","useCSSVariable","brandToken","neutralToken","indicator"],"sourceRoot":"../../../../src","sources":["components/Stepper/useStepperRingColors.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE;AACX,CAAU;AAEV,SAASC,OAAOA,CAACC,KAAkC,EAAEC,QAAgB,EAAU;EAC7E,IAAI,OAAOD,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACE,MAAM,GAAG,CAAC,EAAE;IACjD,OAAOF,KAAK;EACd;EACA,OAAOC,QAAQ;AACjB;;AAEA;AACO,SAASE,oBAAoBA,CAACC,SAAkB,EAAE;EACvD,MAAMC,UAAU,GAAG,IAAAC,uBAAc,EAAC,0BAA0B,CAAC;EAC7D,MAAMC,UAAU,GAAG,IAAAD,uBAAc,EAAC,8BAA8B,CAAC;EACjE,MAAME,YAAY,GAAG,IAAAF,uBAAc,EAAC,gCAAgC,CAAC;EAErE,OAAO;IACLV,KAAK,EAAEG,OAAO,CAACM,UAAU,EAAEV,SAAS,CAACC,KAAK,CAAC;IAC3Ca,SAAS,EAAEL,SAAS,GAChBL,OAAO,CAACQ,UAAU,EAAEZ,SAAS,CAACE,KAAK,CAAC,GACpCE,OAAO,CAACS,YAAY,EAAEb,SAAS,CAACG,OAAO;EAC7C,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SYSTEM_ALERT_WEB_SAFETY_MS = exports.SYSTEM_ALERT_EXIT_MS = exports.SYSTEM_ALERT_ENTER_MS = void 0;
7
+ exports.useSystemAlertPresence = useSystemAlertPresence;
8
+ exports.useSystemAlertSurfaceStyle = useSystemAlertSurfaceStyle;
9
+ var _react = require("react");
10
+ var _reactNative = require("react-native");
11
+ var _reactNativeReanimated = require("react-native-reanimated");
12
+ var _reactNativeWorklets = require("react-native-worklets");
13
+ var _animation = require("../../animation");
14
+ // No motion spec exists for SystemAlert; these mirror FullScreenDialog's surface motion.
15
+ const SYSTEM_ALERT_ENTER_MS = exports.SYSTEM_ALERT_ENTER_MS = 300;
16
+ const SYSTEM_ALERT_EXIT_MS = exports.SYSTEM_ALERT_EXIT_MS = 220;
17
+ /** Unmounts an exiting web surface when `transitionend` never fires (reduced motion, hidden tab). */
18
+ const SYSTEM_ALERT_WEB_SAFETY_MS = exports.SYSTEM_ALERT_WEB_SAFETY_MS = SYSTEM_ALERT_EXIT_MS + 100;
19
+ const ENTER_TIMING = {
20
+ duration: SYSTEM_ALERT_ENTER_MS,
21
+ easing: _reactNativeReanimated.Easing.bezier(0.32, 0.72, 0, 1)
22
+ };
23
+ const EXIT_TIMING = {
24
+ duration: SYSTEM_ALERT_EXIT_MS,
25
+ easing: _reactNativeReanimated.Easing.bezier(0.4, 0, 1, 1)
26
+ };
27
+
28
+ /**
29
+ * `entering` and `exiting` exist only while motion runs. With motion off, `isOpen`
30
+ * moves straight between `open` and `closed`.
31
+ */
32
+
33
+ /** Web `data-state`. `exiting` maps to `closed`, as in Dialog and FullScreenDialog. */
34
+
35
+ /**
36
+ * Presence lifecycle and contact-push motion for an in-flow SystemAlert. One value, the
37
+ * surface's bottom edge `b`, is driven; the wrapper's height is `max(collapsedHeight, b)`,
38
+ * so content below only moves once the surface leaves the reserved strip.
39
+ *
40
+ * Web runs the same lifecycle on CSS transitions keyed on `data-state` instead of Reanimated:
41
+ * `entering` → (rAF) → `open`, and `closed` → `transitionend` on the wrapper's `height`, or a
42
+ * safety timer → unmount. The inset is 0 there, so the wrapper's height is `b`, and the surface,
43
+ * aligned to the wrapper's bottom edge, follows the same transition.
44
+ */
45
+ function useSystemAlertPresence({
46
+ isOpen,
47
+ animation,
48
+ collapsedHeight
49
+ }) {
50
+ const isWeb = _reactNative.Platform.OS === 'web';
51
+ const isAllAnimationsDisabled = (0, _animation.useCombinedAnimationDisabledState)(animation);
52
+ const hasMotion = !isAllAnimationsDisabled;
53
+ const [phase, setPhase] = (0, _react.useState)(isOpen ? 'open' : 'closed');
54
+ const [prevIsOpen, setPrevIsOpen] = (0, _react.useState)(isOpen);
55
+ if (isOpen !== prevIsOpen) {
56
+ setPrevIsOpen(isOpen);
57
+ if (isOpen) {
58
+ setPhase(hasMotion ? 'entering' : 'open');
59
+ } else {
60
+ setPhase(hasMotion ? 'exiting' : 'closed');
61
+ }
62
+ }
63
+ const edge = (0, _reactNativeReanimated.useSharedValue)(0);
64
+ const surfaceHeight = (0, _reactNativeReanimated.useSharedValue)(0);
65
+ const isSettled = (0, _reactNativeReanimated.useSharedValue)(isOpen);
66
+ const [webSurfaceHeight, setWebSurfaceHeight] = (0, _react.useState)(0);
67
+ const wrapperRef = (0, _react.useRef)(null);
68
+
69
+ // Read by the surface's layout callbacks, which run before this hook's own effects.
70
+ const phaseRef = (0, _react.useRef)(phase);
71
+ phaseRef.current = phase;
72
+ // The JS-side copy of `surfaceHeight`. A shared value read on the JS thread right after a
73
+ // JS write can still return the old value, which would start the first enter toward 0.
74
+ const surfaceHeightRef = (0, _react.useRef)(0);
75
+ const settle = (0, _react.useCallback)((from, to) => {
76
+ setPhase(current => current === from ? to : current);
77
+ }, []);
78
+
79
+ // `withTiming` starts from the current edge, so a reversal continues from where it is.
80
+ const startEnter = (0, _react.useCallback)(() => {
81
+ edge.set((0, _reactNativeReanimated.withTiming)(surfaceHeightRef.current, ENTER_TIMING, finished => {
82
+ 'worklet';
83
+
84
+ if (finished) (0, _reactNativeWorklets.scheduleOnRN)(settle, 'entering', 'open');
85
+ }));
86
+ }, [edge, settle]);
87
+ const setSurfaceHeight = (0, _react.useCallback)(height => {
88
+ if (height <= 0) return;
89
+ if (isWeb) {
90
+ setWebSurfaceHeight(height);
91
+ return;
92
+ }
93
+ if (height === surfaceHeightRef.current) return;
94
+ surfaceHeightRef.current = height;
95
+ surfaceHeight.set(height);
96
+ if (phaseRef.current === 'open') {
97
+ edge.set(height);
98
+ } else if (phaseRef.current === 'entering') {
99
+ startEnter();
100
+ }
101
+ }, [isWeb, edge, surfaceHeight, startEnter]);
102
+
103
+ // A layout effect so the surface's synchronous measurement (a child effect) has already
104
+ // run and the first animated frame targets the measured height. Without one, `onLayout`
105
+ // starts the enter through `setSurfaceHeight`.
106
+ (0, _react.useLayoutEffect)(() => {
107
+ if (isWeb) return;
108
+ switch (phase) {
109
+ case 'open':
110
+ edge.set(surfaceHeightRef.current);
111
+ isSettled.set(true);
112
+ break;
113
+ case 'closed':
114
+ isSettled.set(false);
115
+ edge.set(0);
116
+ break;
117
+ case 'entering':
118
+ isSettled.set(false);
119
+ if (surfaceHeightRef.current > 0) startEnter();
120
+ break;
121
+ case 'exiting':
122
+ isSettled.set(false);
123
+ edge.set((0, _reactNativeReanimated.withTiming)(0, EXIT_TIMING, finished => {
124
+ 'worklet';
125
+
126
+ if (finished) (0, _reactNativeWorklets.scheduleOnRN)(settle, 'exiting', 'closed');
127
+ }));
128
+ break;
129
+ }
130
+ }, [isWeb, phase, edge, isSettled, startEnter, settle]);
131
+
132
+ // One frame at `entering` (height 0, surface above the clip) so the browser has a start
133
+ // value to transition from.
134
+ (0, _react.useEffect)(() => {
135
+ if (!isWeb || phase !== 'entering') return;
136
+ const frame = requestAnimationFrame(() => {
137
+ settle('entering', 'open');
138
+ });
139
+ return () => cancelAnimationFrame(frame);
140
+ }, [isWeb, phase, settle]);
141
+ (0, _react.useEffect)(() => {
142
+ if (!isWeb || phase !== 'exiting') return;
143
+ const node = wrapperRef.current;
144
+ const finish = () => {
145
+ settle('exiting', 'closed');
146
+ };
147
+ const safetyTimer = setTimeout(finish, SYSTEM_ALERT_WEB_SAFETY_MS);
148
+ if (typeof node?.addEventListener !== 'function') {
149
+ return () => clearTimeout(safetyTimer);
150
+ }
151
+
152
+ // The surface's own `transform` transition bubbles here too.
153
+ const handleTransitionEnd = event => {
154
+ if (event.target !== node) return;
155
+ if (event.propertyName === 'height') finish();
156
+ };
157
+ node.addEventListener('transitionend', handleTransitionEnd);
158
+ return () => {
159
+ clearTimeout(safetyTimer);
160
+ node.removeEventListener('transitionend', handleTransitionEnd);
161
+ };
162
+ }, [isWeb, phase, settle]);
163
+
164
+ // CSS cannot transition to `auto`, so a moving wrapper gets the measured px height.
165
+ // Before the first measurement (or with motion off) it sizes to its content; `auto` → px
166
+ // does not transition, so a banner shown on first render does not animate.
167
+ let webWrapperHeight;
168
+ if (isWeb && hasMotion) {
169
+ webWrapperHeight = phase === 'open' ? webSurfaceHeight || undefined : 0;
170
+ }
171
+
172
+ // Explicit deps for Vite/web without the Reanimated Babel plugin.
173
+ const wrapperStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
174
+ height: isSettled.get() ? 'auto' : Math.max(collapsedHeight, edge.get())
175
+ }), [isSettled, edge, collapsedHeight]);
176
+ return {
177
+ phase,
178
+ isSurfaceMounted: phase !== 'closed',
179
+ wrapperStyle,
180
+ setSurfaceHeight,
181
+ edge,
182
+ surfaceHeight,
183
+ isSettled,
184
+ webState: isWeb ? phase === 'exiting' ? 'closed' : phase : undefined,
185
+ webWrapperHeight,
186
+ wrapperRef
187
+ };
188
+ }
189
+
190
+ /**
191
+ * The surface's slide, `translateY = b − H`. Call it from a component that mounts with the
192
+ * surface: Reanimated computes the initial style once, on the hook's first render.
193
+ */
194
+ function useSystemAlertSurfaceStyle({
195
+ edge,
196
+ surfaceHeight,
197
+ isSettled
198
+ }) {
199
+ const {
200
+ height: windowHeight
201
+ } = (0, _reactNative.useWindowDimensions)();
202
+
203
+ // Explicit deps for Vite/web without the Reanimated Babel plugin.
204
+ return (0, _reactNativeReanimated.useAnimatedStyle)(() => {
205
+ const height = surfaceHeight.get();
206
+ let translateY = 0;
207
+ if (!isSettled.get()) {
208
+ // Before the first measurement, park the surface above the clip.
209
+ translateY = height > 0 ? edge.get() - height : -windowHeight;
210
+ }
211
+ return {
212
+ transform: [{
213
+ translateY
214
+ }]
215
+ };
216
+ }, [edge, surfaceHeight, isSettled, windowHeight]);
217
+ }
218
+ //# sourceMappingURL=animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_reactNativeWorklets","_animation","SYSTEM_ALERT_ENTER_MS","exports","SYSTEM_ALERT_EXIT_MS","SYSTEM_ALERT_WEB_SAFETY_MS","ENTER_TIMING","duration","easing","Easing","bezier","EXIT_TIMING","useSystemAlertPresence","isOpen","animation","collapsedHeight","isWeb","Platform","OS","isAllAnimationsDisabled","useCombinedAnimationDisabledState","hasMotion","phase","setPhase","useState","prevIsOpen","setPrevIsOpen","edge","useSharedValue","surfaceHeight","isSettled","webSurfaceHeight","setWebSurfaceHeight","wrapperRef","useRef","phaseRef","current","surfaceHeightRef","settle","useCallback","from","to","startEnter","set","withTiming","finished","scheduleOnRN","setSurfaceHeight","height","useLayoutEffect","useEffect","frame","requestAnimationFrame","cancelAnimationFrame","node","finish","safetyTimer","setTimeout","addEventListener","clearTimeout","handleTransitionEnd","event","target","propertyName","removeEventListener","webWrapperHeight","undefined","wrapperStyle","useAnimatedStyle","get","Math","max","isSurfaceMounted","webState","useSystemAlertSurfaceStyle","windowHeight","useWindowDimensions","translateY","transform"],"sourceRoot":"../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