sherick-ui 2.9.0 → 2.10.1

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 (284) hide show
  1. package/README.md +32 -0
  2. package/dist/cjs/components/Accordion.cjs +14 -26
  3. package/dist/cjs/components/Accordion.cjs.map +1 -1
  4. package/dist/cjs/components/Alert.cjs +60 -19
  5. package/dist/cjs/components/Alert.cjs.map +1 -1
  6. package/dist/cjs/components/AlertDialog.cjs +5 -3
  7. package/dist/cjs/components/AlertDialog.cjs.map +1 -1
  8. package/dist/cjs/components/Avatar.cjs +12 -3
  9. package/dist/cjs/components/Avatar.cjs.map +1 -1
  10. package/dist/cjs/components/Badge.cjs +5 -3
  11. package/dist/cjs/components/Badge.cjs.map +1 -1
  12. package/dist/cjs/components/Breadcrumb.cjs +8 -4
  13. package/dist/cjs/components/Breadcrumb.cjs.map +1 -1
  14. package/dist/cjs/components/Button.cjs +11 -4
  15. package/dist/cjs/components/Button.cjs.map +1 -1
  16. package/dist/cjs/components/Calendar.cjs +39 -4
  17. package/dist/cjs/components/Calendar.cjs.map +1 -1
  18. package/dist/cjs/components/Card.cjs +10 -6
  19. package/dist/cjs/components/Card.cjs.map +1 -1
  20. package/dist/cjs/components/Checkbox.cjs +15 -3
  21. package/dist/cjs/components/Checkbox.cjs.map +1 -1
  22. package/dist/cjs/components/CheckboxGroup.cjs +3 -2
  23. package/dist/cjs/components/CheckboxGroup.cjs.map +1 -1
  24. package/dist/cjs/components/Chip.cjs +53 -43
  25. package/dist/cjs/components/Chip.cjs.map +1 -1
  26. package/dist/cjs/components/ChipGroup.cjs +17 -0
  27. package/dist/cjs/components/ChipGroup.cjs.map +1 -1
  28. package/dist/cjs/components/Collapsible.cjs +1 -1
  29. package/dist/cjs/components/Collapsible.cjs.map +1 -1
  30. package/dist/cjs/components/Combobox.cjs +58 -14
  31. package/dist/cjs/components/Combobox.cjs.map +1 -1
  32. package/dist/cjs/components/Command.cjs +10 -4
  33. package/dist/cjs/components/Command.cjs.map +1 -1
  34. package/dist/cjs/components/CommandPalette.cjs +5 -2
  35. package/dist/cjs/components/CommandPalette.cjs.map +1 -1
  36. package/dist/cjs/components/DatePicker.cjs +6 -3
  37. package/dist/cjs/components/DatePicker.cjs.map +1 -1
  38. package/dist/cjs/components/DateRangePicker.cjs +3 -2
  39. package/dist/cjs/components/DateRangePicker.cjs.map +1 -1
  40. package/dist/cjs/components/DateTimePicker.cjs +1 -1
  41. package/dist/cjs/components/DateTimePicker.cjs.map +1 -1
  42. package/dist/cjs/components/Dialog.cjs +10 -3
  43. package/dist/cjs/components/Dialog.cjs.map +1 -1
  44. package/dist/cjs/components/DialogContent.cjs +5 -3
  45. package/dist/cjs/components/DialogContent.cjs.map +1 -1
  46. package/dist/cjs/components/DialogDescription.cjs +5 -3
  47. package/dist/cjs/components/DialogDescription.cjs.map +1 -1
  48. package/dist/cjs/components/DialogFooter.cjs +3 -3
  49. package/dist/cjs/components/DialogFooter.cjs.map +1 -1
  50. package/dist/cjs/components/DialogHeader.cjs +5 -3
  51. package/dist/cjs/components/DialogHeader.cjs.map +1 -1
  52. package/dist/cjs/components/DialogSurface.cjs +37 -15
  53. package/dist/cjs/components/DialogSurface.cjs.map +1 -1
  54. package/dist/cjs/components/DismissButton.cjs +24 -0
  55. package/dist/cjs/components/DismissButton.cjs.map +1 -0
  56. package/dist/cjs/components/Divider.cjs +3 -1
  57. package/dist/cjs/components/Divider.cjs.map +1 -1
  58. package/dist/cjs/components/Drawer.cjs +24 -14
  59. package/dist/cjs/components/Drawer.cjs.map +1 -1
  60. package/dist/cjs/components/Field.cjs +47 -2
  61. package/dist/cjs/components/Field.cjs.map +1 -1
  62. package/dist/cjs/components/FieldLabel.cjs +20 -0
  63. package/dist/cjs/components/FieldLabel.cjs.map +1 -0
  64. package/dist/cjs/components/FileUpload.cjs +19 -9
  65. package/dist/cjs/components/FileUpload.cjs.map +1 -1
  66. package/dist/cjs/components/IconButton.cjs +28 -7
  67. package/dist/cjs/components/IconButton.cjs.map +1 -1
  68. package/dist/cjs/components/Input.cjs +14 -5
  69. package/dist/cjs/components/Input.cjs.map +1 -1
  70. package/dist/cjs/components/Menu.cjs +18 -4
  71. package/dist/cjs/components/Menu.cjs.map +1 -1
  72. package/dist/cjs/components/NavGroup.cjs +7 -1
  73. package/dist/cjs/components/NavGroup.cjs.map +1 -1
  74. package/dist/cjs/components/NavItem.cjs +28 -3
  75. package/dist/cjs/components/NavItem.cjs.map +1 -1
  76. package/dist/cjs/components/NumberField.cjs +7 -6
  77. package/dist/cjs/components/NumberField.cjs.map +1 -1
  78. package/dist/cjs/components/Pagination.cjs +42 -8
  79. package/dist/cjs/components/Pagination.cjs.map +1 -1
  80. package/dist/cjs/components/Popover.cjs +13 -5
  81. package/dist/cjs/components/Popover.cjs.map +1 -1
  82. package/dist/cjs/components/Progress.cjs +5 -3
  83. package/dist/cjs/components/Progress.cjs.map +1 -1
  84. package/dist/cjs/components/RadioGroup.cjs +3 -2
  85. package/dist/cjs/components/RadioGroup.cjs.map +1 -1
  86. package/dist/cjs/components/Search.cjs +35 -14
  87. package/dist/cjs/components/Search.cjs.map +1 -1
  88. package/dist/cjs/components/SegmentedControl.cjs +2 -1
  89. package/dist/cjs/components/SegmentedControl.cjs.map +1 -1
  90. package/dist/cjs/components/Select.cjs +14 -4
  91. package/dist/cjs/components/Select.cjs.map +1 -1
  92. package/dist/cjs/components/Skeleton.cjs +5 -3
  93. package/dist/cjs/components/Skeleton.cjs.map +1 -1
  94. package/dist/cjs/components/Slider.cjs +1 -1
  95. package/dist/cjs/components/Slider.cjs.map +1 -1
  96. package/dist/cjs/components/Spinner.cjs +24 -14
  97. package/dist/cjs/components/Spinner.cjs.map +1 -1
  98. package/dist/cjs/components/StatusMark.cjs +43 -0
  99. package/dist/cjs/components/StatusMark.cjs.map +1 -0
  100. package/dist/cjs/components/Stepper.cjs +3 -3
  101. package/dist/cjs/components/Stepper.cjs.map +1 -1
  102. package/dist/cjs/components/Switch.cjs +20 -1
  103. package/dist/cjs/components/Switch.cjs.map +1 -1
  104. package/dist/cjs/components/Table.cjs +15 -7
  105. package/dist/cjs/components/Table.cjs.map +1 -1
  106. package/dist/cjs/components/Tabs.cjs +10 -3
  107. package/dist/cjs/components/Tabs.cjs.map +1 -1
  108. package/dist/cjs/components/Textarea.cjs +8 -4
  109. package/dist/cjs/components/Textarea.cjs.map +1 -1
  110. package/dist/cjs/components/Toast.cjs +47 -34
  111. package/dist/cjs/components/Toast.cjs.map +1 -1
  112. package/dist/cjs/components/ToggleGroup.cjs +14 -3
  113. package/dist/cjs/components/ToggleGroup.cjs.map +1 -1
  114. package/dist/cjs/components/Tooltip.cjs +16 -2
  115. package/dist/cjs/components/Tooltip.cjs.map +1 -1
  116. package/dist/cjs/components/TreeView.cjs +8 -4
  117. package/dist/cjs/components/TreeView.cjs.map +1 -1
  118. package/dist/cjs/components/choice-row.cjs +1 -1
  119. package/dist/cjs/components/choice-row.cjs.map +1 -1
  120. package/dist/cjs/components/date-family.cjs +16 -2
  121. package/dist/cjs/components/date-family.cjs.map +1 -1
  122. package/dist/cjs/components/date-field.cjs +4 -2
  123. package/dist/cjs/components/date-field.cjs.map +1 -1
  124. package/dist/cjs/components/edge-fade.cjs +80 -0
  125. package/dist/cjs/components/edge-fade.cjs.map +1 -0
  126. package/dist/cjs/components/scroll-region.cjs +56 -0
  127. package/dist/cjs/components/scroll-region.cjs.map +1 -0
  128. package/dist/cjs/components/time-panel.cjs +1 -1
  129. package/dist/cjs/components/time-panel.cjs.map +1 -1
  130. package/dist/cjs/components/ui.common.cjs +115 -58
  131. package/dist/cjs/components/ui.common.cjs.map +1 -1
  132. package/dist/cjs/components/ui.motion.cjs +41 -15
  133. package/dist/cjs/components/ui.motion.cjs.map +1 -1
  134. package/dist/cjs/dev.cjs +5 -0
  135. package/dist/cjs/dev.cjs.map +1 -1
  136. package/dist/cjs/index.cjs +1 -0
  137. package/dist/cjs/index.cjs.map +1 -1
  138. package/dist/esm/components/Accordion.js +16 -28
  139. package/dist/esm/components/Accordion.js.map +1 -1
  140. package/dist/esm/components/Alert.js +62 -22
  141. package/dist/esm/components/Alert.js.map +1 -1
  142. package/dist/esm/components/AlertDialog.js +6 -4
  143. package/dist/esm/components/AlertDialog.js.map +1 -1
  144. package/dist/esm/components/Avatar.js +14 -5
  145. package/dist/esm/components/Avatar.js.map +1 -1
  146. package/dist/esm/components/Badge.js +5 -3
  147. package/dist/esm/components/Badge.js.map +1 -1
  148. package/dist/esm/components/Breadcrumb.js +9 -5
  149. package/dist/esm/components/Breadcrumb.js.map +1 -1
  150. package/dist/esm/components/Button.js +11 -4
  151. package/dist/esm/components/Button.js.map +1 -1
  152. package/dist/esm/components/Calendar.js +42 -7
  153. package/dist/esm/components/Calendar.js.map +1 -1
  154. package/dist/esm/components/Card.js +12 -8
  155. package/dist/esm/components/Card.js.map +1 -1
  156. package/dist/esm/components/Checkbox.js +16 -4
  157. package/dist/esm/components/Checkbox.js.map +1 -1
  158. package/dist/esm/components/CheckboxGroup.js +3 -2
  159. package/dist/esm/components/CheckboxGroup.js.map +1 -1
  160. package/dist/esm/components/Chip.js +56 -46
  161. package/dist/esm/components/Chip.js.map +1 -1
  162. package/dist/esm/components/ChipGroup.js +18 -1
  163. package/dist/esm/components/ChipGroup.js.map +1 -1
  164. package/dist/esm/components/CodeBlock.js +58 -28
  165. package/dist/esm/components/CodeBlock.js.map +1 -1
  166. package/dist/esm/components/Collapsible.js +1 -1
  167. package/dist/esm/components/Collapsible.js.map +1 -1
  168. package/dist/esm/components/Combobox.js +62 -18
  169. package/dist/esm/components/Combobox.js.map +1 -1
  170. package/dist/esm/components/Command.js +11 -5
  171. package/dist/esm/components/Command.js.map +1 -1
  172. package/dist/esm/components/CommandPalette.js +7 -4
  173. package/dist/esm/components/CommandPalette.js.map +1 -1
  174. package/dist/esm/components/DatePicker.js +7 -4
  175. package/dist/esm/components/DatePicker.js.map +1 -1
  176. package/dist/esm/components/DateRangePicker.js +4 -3
  177. package/dist/esm/components/DateRangePicker.js.map +1 -1
  178. package/dist/esm/components/DateTimePicker.js +1 -1
  179. package/dist/esm/components/DateTimePicker.js.map +1 -1
  180. package/dist/esm/components/Dialog.js +12 -6
  181. package/dist/esm/components/Dialog.js.map +1 -1
  182. package/dist/esm/components/DialogContent.js +6 -4
  183. package/dist/esm/components/DialogContent.js.map +1 -1
  184. package/dist/esm/components/DialogDescription.js +6 -4
  185. package/dist/esm/components/DialogDescription.js.map +1 -1
  186. package/dist/esm/components/DialogFooter.js +3 -3
  187. package/dist/esm/components/DialogFooter.js.map +1 -1
  188. package/dist/esm/components/DialogHeader.js +5 -3
  189. package/dist/esm/components/DialogHeader.js.map +1 -1
  190. package/dist/esm/components/DialogSurface.js +38 -17
  191. package/dist/esm/components/DialogSurface.js.map +1 -1
  192. package/dist/esm/components/DismissButton.js +20 -0
  193. package/dist/esm/components/DismissButton.js.map +1 -0
  194. package/dist/esm/components/Divider.js +3 -1
  195. package/dist/esm/components/Divider.js.map +1 -1
  196. package/dist/esm/components/Drawer.js +27 -17
  197. package/dist/esm/components/Drawer.js.map +1 -1
  198. package/dist/esm/components/Field.js +49 -6
  199. package/dist/esm/components/Field.js.map +1 -1
  200. package/dist/esm/components/FieldLabel.js +15 -0
  201. package/dist/esm/components/FieldLabel.js.map +1 -0
  202. package/dist/esm/components/FileUpload.js +23 -13
  203. package/dist/esm/components/FileUpload.js.map +1 -1
  204. package/dist/esm/components/IconButton.js +30 -9
  205. package/dist/esm/components/IconButton.js.map +1 -1
  206. package/dist/esm/components/Input.js +15 -6
  207. package/dist/esm/components/Input.js.map +1 -1
  208. package/dist/esm/components/Markdown.js +7 -4
  209. package/dist/esm/components/Markdown.js.map +1 -1
  210. package/dist/esm/components/Menu.js +20 -6
  211. package/dist/esm/components/Menu.js.map +1 -1
  212. package/dist/esm/components/NavGroup.js +8 -2
  213. package/dist/esm/components/NavGroup.js.map +1 -1
  214. package/dist/esm/components/NavItem.js +30 -6
  215. package/dist/esm/components/NavItem.js.map +1 -1
  216. package/dist/esm/components/NumberField.js +8 -7
  217. package/dist/esm/components/NumberField.js.map +1 -1
  218. package/dist/esm/components/Pagination.js +43 -9
  219. package/dist/esm/components/Pagination.js.map +1 -1
  220. package/dist/esm/components/Popover.js +14 -6
  221. package/dist/esm/components/Popover.js.map +1 -1
  222. package/dist/esm/components/Progress.js +5 -3
  223. package/dist/esm/components/Progress.js.map +1 -1
  224. package/dist/esm/components/RadioGroup.js +3 -2
  225. package/dist/esm/components/RadioGroup.js.map +1 -1
  226. package/dist/esm/components/Search.js +36 -15
  227. package/dist/esm/components/Search.js.map +1 -1
  228. package/dist/esm/components/SegmentedControl.js +2 -1
  229. package/dist/esm/components/SegmentedControl.js.map +1 -1
  230. package/dist/esm/components/Select.js +16 -6
  231. package/dist/esm/components/Select.js.map +1 -1
  232. package/dist/esm/components/Skeleton.js +5 -3
  233. package/dist/esm/components/Skeleton.js.map +1 -1
  234. package/dist/esm/components/Slider.js +2 -2
  235. package/dist/esm/components/Slider.js.map +1 -1
  236. package/dist/esm/components/Spinner.js +24 -14
  237. package/dist/esm/components/Spinner.js.map +1 -1
  238. package/dist/esm/components/StatusMark.js +38 -0
  239. package/dist/esm/components/StatusMark.js.map +1 -0
  240. package/dist/esm/components/Stepper.js +4 -4
  241. package/dist/esm/components/Stepper.js.map +1 -1
  242. package/dist/esm/components/Switch.js +21 -2
  243. package/dist/esm/components/Switch.js.map +1 -1
  244. package/dist/esm/components/Table.js +16 -8
  245. package/dist/esm/components/Table.js.map +1 -1
  246. package/dist/esm/components/Tabs.js +11 -4
  247. package/dist/esm/components/Tabs.js.map +1 -1
  248. package/dist/esm/components/Textarea.js +8 -4
  249. package/dist/esm/components/Textarea.js.map +1 -1
  250. package/dist/esm/components/Toast.js +49 -36
  251. package/dist/esm/components/Toast.js.map +1 -1
  252. package/dist/esm/components/ToggleGroup.js +16 -5
  253. package/dist/esm/components/ToggleGroup.js.map +1 -1
  254. package/dist/esm/components/Tooltip.js +17 -4
  255. package/dist/esm/components/Tooltip.js.map +1 -1
  256. package/dist/esm/components/TreeView.js +9 -5
  257. package/dist/esm/components/TreeView.js.map +1 -1
  258. package/dist/esm/components/choice-row.js +1 -1
  259. package/dist/esm/components/choice-row.js.map +1 -1
  260. package/dist/esm/components/date-family.js +15 -3
  261. package/dist/esm/components/date-family.js.map +1 -1
  262. package/dist/esm/components/date-field.js +5 -3
  263. package/dist/esm/components/date-field.js.map +1 -1
  264. package/dist/esm/components/edge-fade.js +77 -0
  265. package/dist/esm/components/edge-fade.js.map +1 -0
  266. package/dist/esm/components/scroll-region.js +52 -0
  267. package/dist/esm/components/scroll-region.js.map +1 -0
  268. package/dist/esm/components/time-panel.js +1 -1
  269. package/dist/esm/components/time-panel.js.map +1 -1
  270. package/dist/esm/components/ui.common.js +115 -60
  271. package/dist/esm/components/ui.common.js.map +1 -1
  272. package/dist/esm/components/ui.motion.js +39 -16
  273. package/dist/esm/components/ui.motion.js.map +1 -1
  274. package/dist/esm/content.js +1 -1
  275. package/dist/esm/dev.js +2 -2
  276. package/dist/esm/index.js +1 -1
  277. package/dist/styles.css +326 -200
  278. package/dist/theme.css +15 -12
  279. package/dist/types/content.d.ts +13 -3
  280. package/dist/types/dev.d.cts +65 -30
  281. package/dist/types/dev.d.ts +65 -30
  282. package/dist/types/index.d.cts +502 -166
  283. package/dist/types/index.d.ts +502 -166
  284. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ui.motion.cjs","sources":["../../../src/components/ui.motion.ts"],"sourcesContent":["/* Sherick UI motion grammar\n =========================\n Components describe what changes; this module exclusively describes how change moves.\n\n The canonical intents are:\n - feedback: non-spatial state response;\n - tactile: temporary physical response to activation;\n - arrive: a meaningful subordinate part appears or leaves;\n - orient: a persistent part changes orientation in place;\n - relocate: a persistent part moves or resizes between stable states;\n - direct: geometry continuously follows the user;\n - disclose: in-flow content expands and collapses;\n - presence: an independent surface enters/leaves;\n - activity: continuous motion that communicates ongoing work.\n\n Every recipe here owns the transition property, the duration, the curve and the\n `prefers-reduced-motion` behavior for one physical event. The durations and curves\n themselves are the authored tokens in `src/styles/tokens.ts`; nothing in this file\n writes a literal duration or an animation keyframe beyond the two activity loops.\n\n `docs/DESIGN_LANGUAGE.md` owns the semantics. Target geometry, material, tone and\n elevation remain component/anatomy concerns: a component says where something ends\n up, and this module says how it gets there. */\n\n/* A recipe that is composed from other recipes is built through `cx`, whose call is marked pure.\n That is load-bearing for the published bundles rather than a bundler detail: an unused recipe\n whose value is a template literal with a substitution in it is not provably side-effect-free, so\n it survives tree-shaking and every consumer that imports any part of this module pays for every\n recipe in it — including the families it never uses. See `libs/utils.ts`. */\nimport { cx } from \"@/libs/utils\";\n\nexport type MotionIntent =\n | \"feedback\"\n | \"tactile\"\n | \"arrive\"\n | \"orient\"\n | \"relocate\"\n | \"direct\"\n | \"disclose\"\n | \"presence\"\n | \"activity\";\n\n/** Non-spatial feedback: hover, focus, field tone, a highlighted row, a filled surface.\n * It never translates, scales or resizes; reduced motion simply drops the interpolation\n * and the state still arrives. */\nexport const motionFeedback =\n \"transition-[background-color,border-color,color,box-shadow,opacity] duration-press ease-press motion-reduce:transition-none\";\n\n/** A control answers a press immediately and settles on its release.\n *\n * The recipe owns the *amplitude* of that answer as well as its timing, because how far a press\n * travels is the system's physical character rather than a component's anatomy. A percentage is a\n * distance only once it meets a size, so the amplitude comes in tiers chosen by the control's role:\n *\n * - `motionTactile`: a content-width control — a button, a chip, a segment — compresses 4%, about\n * two pixels at the size of the ink it moves. Stretched to its container (`w-full`), the same\n * control takes the wide tier's 1.5%.\n * - `motionTactileWide`: a control that spans a track — a tab — compresses 1.5%, so its edges move\n * about as far as a button's.\n * - `motionTactileField`: a list-opening field — a Select trigger, an editable Combobox — spans\n * its whole container, and 4% of a 580px field moved each edge 11.6px. It compresses 0.7%, about\n * two pixels at that width: the field acknowledges the press without lurching.\n *\n * The press leg runs on `duration-tactile`, short enough to land inside a tap; the release settles\n * on the release timing. A control whose visible ink is far smaller than its target takes\n * `motionInkPress` on that ink instead, so the target itself never moves. The interpolation and\n * the compression are neutralised together under reduced motion. */\n/* Base may disable the surface itself or the value control inside a Select wrapper.\n Neither is a pressable surface. Timing is otherwise shared by every tier. */\nconst tactileTiming =\n \"transition-[background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-tactile active:ease-press motion-reduce:transition-none\";\n\nexport const motionTactile = /* @__PURE__ */ cx(\n tactileTiming,\n \"motion-safe:[&:not([data-disabled],:disabled,:has(>[role=combobox][data-disabled]))]:active:scale-[0.96]\",\n /* A content-width control a layout has stretched to its container is no longer content-width: 4%\n of a 240px action moved each edge 4.8px. The stretch is the caller's `w-full`, so the control\n reads it from its own class and takes the wide tier — still a press, at a button's distance. */\n \"motion-safe:[&.w-full:not([data-disabled],:disabled,:has(>[role=combobox][data-disabled]))]:active:scale-[0.985]\"\n);\n\nexport const motionTactileWide = /* @__PURE__ */ cx(\n tactileTiming,\n \"motion-safe:[&:not([data-disabled],:disabled)]:active:scale-[0.985]\"\n);\n\nexport const motionTactileField = /* @__PURE__ */ cx(\n tactileTiming,\n \"motion-safe:[&:not([data-disabled],:disabled,:has(>[role=combobox][data-disabled]))]:active:scale-[0.993]\"\n);\n\n/** The spatial half of a compact press, applied to the *mark* rather than to the control.\n *\n * A control whose visible ink is much smaller than the target it is aimed at — a dialog's close\n * control, a stepper, a search field's submit — is a large target around a small glyph, and only\n * the glyph is visible at rest. Compressing the whole control would shrink the ground the pointer\n * is already on (a 44px target becomes 38.7px while held, which is exactly where a near-edge\n * release lands), so the mark takes the twelve percent and the target keeps its geometry. The\n * target still owns the focus ring and the state layer, and still carries the tone and depth\n * response, so the boundary a press happens inside never moves. */\nexport const motionInkPress =\n \"transition-transform duration-release ease-release group-active:duration-tactile group-active:ease-press group-active:scale-[0.88] motion-reduce:transition-none motion-reduce:group-active:scale-100\";\n\n/* Motion is not owned here — but the recipes above are the whole vocabulary: every press, arrival,\n travel, presence and activity in the library is one of these names plus its owner's own target\n geometry. */\n\n/* A field that opens a list — a `Select`'s trigger, an editable `Combobox`'s field — takes\n `motionTactile` as a whole, which is what makes the two forms of the same control press\n identically. The *field* is the element that carries the compression in both: a press activates\n the whole chain, so a descendant being pressed is what makes the field itself match `:active`\n (and a select trigger's own active state is suppressed by the primitive, so its field's wrapper\n is the only element left to carry it). Typing, focus and hover never match it, so the field is\n perfectly still while it is used as a text field; a press that places a caret or drags across a\n word is the same press the field already answers, and distinguishing it would take pointer\n bookkeeping inside a component for a case that reads as one interaction either way. */\n\n/** A meaningful subordinate part arrives. Spring is reserved for this intent: a mark is\n * made by overshooting the position it lands in. It leaves without the overshoot, and\n * reduced motion lands it in one step — which takes a *state-specific* override, because the\n * starting state is a higher-specificity rule than a plain `transform: none` and would otherwise\n * win under reduced motion while the transition was gone, turning a spring into an instant jump. */\nexport const motionArrive =\n \"transition-[background-color,color,box-shadow,transform,opacity] duration-release ease-spring data-[starting-style]:scale-50 data-[ending-style]:scale-50 data-[ending-style]:opacity-0 data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit motion-reduce:transition-none motion-reduce:transform-none motion-reduce:data-[starting-style]:scale-100 motion-reduce:data-[ending-style]:scale-100\";\n\n/** A persistent affordance changes orientation in place: a disclosure chevron. It reaches\n * its target orientation consistently and never overshoots. */\nexport const motionOrient =\n \"transition-transform duration-release ease-release motion-reduce:transition-none\";\n\n/** A persistent object travels between stable destinations: a tab indicator, a switch\n * thumb. The travel itself is the event, so it takes the glide curve rather than the\n * arrival curve, and it never overshoots: a destination that is passed and come back\n * from reads as a defect. Position, size and the tone the object picks up on the way\n * settle together, and an interrupted move retargets from wherever it currently is\n * because it is a transition and not a keyframe. */\nexport const motionRelocate =\n \"transition-[left,inset-inline-start,top,width,height,transform,background-color,color,box-shadow,opacity] duration-release ease-glide motion-reduce:transition-none\";\n\n/** The same travel across a whole track — a tab indicator — on the longer travel timing, so a\n * movement of hundreds of pixels is followed rather than skipped. */\nexport const motionRelocateLong =\n \"transition-[left,inset-inline-start,top,width,height,transform,background-color,color,box-shadow,opacity] duration-travel ease-glide motion-reduce:transition-none\";\n\n/** Direct manipulation: the pointer owns the geometry, so a positional transition would be\n * lag. While the primitive reports a drag, position and size are removed from the\n * transition list and only tone and engagement geometry remain; a keyboard or programmatic\n * step still settles. Reduced motion never changes direct manipulation. */\nexport const motionDirect =\n \"transition-[inset-inline-start,width,height,background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-press active:ease-press data-[dragging]:transition-[background-color,color,box-shadow,transform,opacity] motion-reduce:transition-none motion-reduce:transform-none\";\n\n/* Anchored popup, tooltip, modal, sheet, toast and scrim presence share three states:\n settled, `data-starting-style` and `data-ending-style`. The primitive decides\n when the node mounts and unmounts.\n None of them writes an animation keyframe or a timer, so a rapid open → close → open\n retargets from the current painted value instead of restarting.\n\n The anchored roles read their entrance direction from the resolved side. Base publishes\n the side on the popup after collision handling and the origin as `--transform-origin`, so\n a surface below its trigger rises into place, one above it settles down into it, and one\n flipped by a collision animates the way it is actually placed. */\n\nconst anchoredGeometry = /* @__PURE__ */ cx(\n \"[transform-origin:var(--transform-origin)]\",\n \"[--sui-overlay-from-shift-y:-4px]\",\n \"data-[side=top]:[--sui-overlay-from-shift-y:4px]\",\n \"data-[side=left]:[--sui-overlay-from-shift-y:0px] data-[side=left]:[--sui-overlay-from-shift-x:4px]\",\n \"data-[side=right]:[--sui-overlay-from-shift-y:0px] data-[side=right]:[--sui-overlay-from-shift-x:-4px]\",\n /* The logical sides resolve against the writing direction: `inline-start` puts the popup at the\n anchor's inline-start edge, which is its physical *left* on a left-to-right page and its\n physical *right* on a right-to-left one, so the four pixels that travel toward the anchor\n change sign with the page while the physical sides above never do. The direction is read from\n the `dir` attribute — the attribute that lays the page out, and the only one a portaled\n surface can see. The primitive resolves the side from the direction *it* is told about\n (`DirectionProvider`), so a consumer whose page is right-to-left declares that direction to\n both, exactly as the workbench's RTL specimens do. */\n \"data-[side=inline-start]:[--sui-overlay-from-shift-y:0px] data-[side=inline-start]:[--sui-overlay-from-shift-x:4px]\",\n \"[[dir=rtl]_&]:data-[side=inline-start]:[--sui-overlay-from-shift-x:-4px]\",\n \"data-[side=inline-end]:[--sui-overlay-from-shift-y:0px] data-[side=inline-end]:[--sui-overlay-from-shift-x:-4px]\",\n \"[[dir=rtl]_&]:data-[side=inline-end]:[--sui-overlay-from-shift-x:4px]\",\n);\n\n/* Both ends of a presence animation start from the same state, and reduced motion drops the\n spatial half of it: presence still reads as arriving, but only through opacity. The\n transform is a literal class rather than an interpolated one, because the stylesheet\n compiler reads class names as text: a name that only exists once a template is evaluated\n compiles to no rule at all. */\nconst anchoredFrom = /* @__PURE__ */ cx(\n \"data-[starting-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(var(--sui-overlay-from-shift-x,0px),var(--sui-overlay-from-shift-y,0px))scale(var(--sui-overlay-from-scale,1))]\",\n \"data-[ending-style]:opacity-0\",\n \"data-[ending-style]:[transform:translate(var(--sui-overlay-from-shift-x,0px),var(--sui-overlay-from-shift-y,0px))scale(var(--sui-overlay-from-scale,1))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\nconst modalFrom = /* @__PURE__ */ cx(\n \"data-[starting-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(0,12px)scale(0.96)]\",\n \"data-[ending-style]:opacity-0\",\n \"data-[ending-style]:[transform:translate(0,12px)scale(0.96)]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\n/** An anchored surface: `Select`, `Combobox`, `Menu` and `Popover`. It grows out of the edge\n * it is attached to, enters on the overlay timing, and leaves on the shorter exit.\n *\n * The grow is the motion's signature and the four pixels of travel only support it, so the\n * entrance takes the glide curve rather than the arrival curve. With a front-loaded curve the\n * opacity and the scale both jump in the first frames, which means the surface is already half\n * grown by the time it is visible at all — a pop, not a grow. The glide curve spends its whole\n * duration visible, so the eye actually sees the surface open out of its anchor. */\nexport const motionPresenceAnchored = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"[--sui-overlay-from-scale:0.94]\",\n anchoredGeometry,\n anchoredFrom,\n);\n\n/** A tooltip: the same side-aware model and the same grow as an anchored popup, deliberately\n * lighter — it settles on the local timing rather than the overlay timing, and it never\n * bounces. */\nexport const motionPresenceTooltip = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-release ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"[--sui-overlay-from-scale:0.94]\",\n anchoredGeometry,\n anchoredFrom,\n);\n\n/** A modal surface: anchored to the viewport rather than to a trigger, so it has no side\n * to grow from. A large surface never bounces; it fades, rises a little and settles, and its\n * scale stays restrained because a plane this big grows visibly even from a few percent. */\nexport const motionPresenceModal = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n modalFrom,\n);\n\n/** The plane behind a surface that owns the viewport. Opacity only: a blur or a filter is\n * never animated, so the plane can never animate the page behind it. */\nexport const motionPresenceScrim =\n \"transition-opacity duration-overlay ease-release data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\";\n\n/** Continuous activity is a distinct intent, not an exception to interaction motion: it\n * reports work rather than answering an event, and it has no entrance of its own. */\nexport const motionActivitySpin = \"animate-spin motion-reduce:animate-none\";\nexport const motionActivityPulse = \"animate-pulse motion-reduce:animate-none\";\n\n/** The indeterminate half of a progress bar. A task with no known value cannot report a\n * position, so it reports *work* instead: the fill sweeps across its own track on the one loop\n * that is paced, because a loop that reports rather than answers cannot arrive. The travel is a\n * composited transform rather than a laid-out edge, and an endless loop must never sit on the\n * layout path; the direction is a value the recipe flips with the writing direction, because a\n * transform is physical and the sweep follows the page. Under reduced motion the loop stops and\n * the fill rests where it starts: a static status glyph, exactly as the spin and the pulse rest. */\nexport const motionActivityIndeterminate =\n \"animate-sherick-indeterminate [[dir=rtl]_&]:[--sui-indeterminate-direction:-1] motion-reduce:animate-none\";\n\n/** The state layer is a composited overlay, so its own opacity is the only thing that\n * moves. Shared here because four interaction states across the library ride it. */\n/** A row in a collection moves its highlight rather than fading it: a highlight is where the reader\n * is, and arrowing through a list with a soft fade on every row leaves a smear of half-lit rows.\n * The row's layer therefore changes in one step, for the pointer and the keyboard alike. */\nexport const motionRowLayer = \"before:transition-none\";\n\n/** A rim drawn as an overlay of its own — an empty selection mark's lip, a drop target's dashes —\n * carries its own feedback timing: it steps up on hover and fades as a selection fill arrives,\n * on the same press curve as the surface beneath it. */\nexport const motionRim =\n \"after:transition-[background-color,border-color,opacity] after:duration-press after:ease-press motion-reduce:after:transition-none\";\n\nexport const motionStateLayer =\n \"before:transition-opacity before:duration-release before:ease-release active:before:duration-tactile active:before:ease-press group-active:before:duration-tactile group-active:before:ease-press motion-reduce:before:transition-none\";\n\n/* `disclose` is the in-flow counterpart of presence: nothing mounts or unmounts, and nothing\n leaves the page — one region changes its own height where it sits. Base measures the panel and\n publishes that height, so the geometry is the primitive's and only the interpolation is here.\n The panel states the height it opens to; this recipe owns how it gets there, and reduced\n motion applies the layout state in one step rather than travelling through it. */\nexport const motionDisclose =\n \"transition-[height] duration-release ease-release data-[starting-style]:h-0 data-[ending-style]:h-0 data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit motion-reduce:transition-none\";\n\n/* A sheet is a surface that owns the viewport and is attached to one edge of it, so its presence is\n a slide out of that edge rather than the modal lift, and it never bounces. The component names the\n edge by setting exactly one of `--sui-sheet-from-x` / `--sui-sheet-from-y` to a full own-extent\n offset, because which edge a sheet is attached to is anatomy; how far it travels and how long it\n takes are not.\n\n The other axis is `0px`, and that default is load-bearing: a fallback of `100%` on the axis the\n component did not set would translate a side sheet on both axes at once, so a sheet attached to\n the right edge would enter from the bottom-right corner and travel diagonally instead of\n straight in. One edge means one axis. */\nexport const motionPresenceSheet = /* @__PURE__ */ cx(\n \"transition-[transform,opacity] duration-sheet ease-glide\",\n \"data-[ending-style]:duration-sheet-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(var(--sui-sheet-from-x,0px),var(--sui-sheet-from-y,0px))]\",\n \"data-[ending-style]:[transform:translate(var(--sui-sheet-from-x,0px),var(--sui-sheet-from-y,0px))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\n/* A toast is a stack, not a single surface: several independent surfaces share one corner,\n re-flow when one of them leaves, and can each be flung away by the pointer. That is one\n spatial owner on one node, and this is it.\n\n The component owns where a toast rests — its stacked offset, its clamped height and the\n expanded fan are geometry — and sets `--sui-toast-from-y` to the direction the stack grows in.\n This recipe owns the entrance, the exit, the stack's re-flow, and the gesture: while\n `data-swiping` is set the node follows the pointer with no interpolation at all, and a\n dismissal carries the movement it was flung with so the toast keeps travelling the way it was\n already going instead of turning around. */\nexport const motionPresenceToast = /* @__PURE__ */ cx(\n \"transition-[transform,opacity,height] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"data-[swiping]:transition-none\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n \"data-[starting-style]:[transform:translateY(var(--sui-toast-from-y,150%))]\",\n \"[&[data-ending-style]:not([data-swipe-direction])]:[transform:translateY(var(--sui-toast-from-y,150%))]\",\n \"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)+150%))]\",\n \"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)+150%))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n"],"names":["cx"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBiD;AAEjD;;;;AAI+E;AAc/E;;AAEmC;AAC5B,MAAM,cAAc,GACzB;AAEF;;;;;;;;;;;;;;;;;;AAkBqE;AACrE;AAC+E;AAC/E,MAAM,aAAa,GACjB,wKAAwK;AAEnK,MAAM,aAAa,mBAAmBA,QAAE,CAC7C,aAAa,EACb,0GAA0G;AAC1G;;AAEkG;AAClG,kHAAkH;AAG7G,MAAM,iBAAiB,mBAAmBA,QAAE,CACjD,aAAa,EACb,qEAAqE;AAGhE,MAAM,kBAAkB,mBAAmBA,QAAE,CAClD,aAAa,EACb,2GAA2G;AAG7G;;;;;;;;AAQoE;AAC7D,MAAM,cAAc,GACzB;AAEF;;AAEe;AAEf;;;;;;;;AAQyF;AAEzF;;;;AAIqG;AAC9F,MAAM,YAAY,GACvB;AAEF;AACgE;AACzD,MAAM,YAAY,GACvB;AAEF;;;;;AAKqD;AAC9C,MAAM,cAAc,GACzB;AAEF;AACsE;AAC/D,MAAM,kBAAkB,GAC7B;AAEF;;;AAG4E;AACrE,MAAM,YAAY,GACvB;AAEF;;;;;;;;;AASoE;AAEpE,MAAM,gBAAgB,mBAAmBA,QAAE,CACzC,4CAA4C,EAC5C,mCAAmC,EACnC,kDAAkD,EAClD,qGAAqG,EACrG,wGAAwG;AACxG;;;;;;;AAOwD;AACxD,qHAAqH,EACrH,0EAA0E,EAC1E,kHAAkH,EAClH,uEAAuE,CACxE;AAED;;;;AAIiC;AACjC,MAAM,YAAY,mBAAmBA,QAAE,CACrC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,+BAA+B,EAC/B,4EAA4E,EAC5E,yGAAyG,EACzG,sHAAsH,EACtH,oHAAoH,EACpH,sHAAsH,EACtH,uHAAuH,EACvH,oDAAoD,EACpD,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ui.motion.cjs","sources":["../../../src/components/ui.motion.ts"],"sourcesContent":["/* Sherick UI motion grammar\n =========================\n Components describe what changes; this module exclusively describes how change moves.\n\n The canonical intents are:\n - feedback: non-spatial state response;\n - tactile: temporary physical response to activation;\n - arrive: a meaningful subordinate part appears or leaves;\n - orient: a persistent part changes orientation in place;\n - relocate: a persistent part moves or resizes between stable states;\n - direct: geometry continuously follows the user;\n - disclose: in-flow content expands and collapses;\n - presence: an independent surface enters/leaves;\n - activity: continuous motion that communicates ongoing work.\n\n Every recipe here owns the transition property, the duration, the curve and the\n `prefers-reduced-motion` behavior for one physical event. The durations and curves\n themselves are the authored tokens in `src/styles/tokens.ts`; nothing in this file\n writes a literal duration or an animation keyframe beyond the two activity loops.\n\n `docs/DESIGN_LANGUAGE.md` owns the semantics. Target geometry, material, tone and\n elevation remain component/anatomy concerns: a component says where something ends\n up, and this module says how it gets there. */\n\n/* A recipe that is composed from other recipes is built through `cx`, whose call is marked pure.\n That is load-bearing for the published bundles rather than a bundler detail: an unused recipe\n whose value is a template literal with a substitution in it is not provably side-effect-free, so\n it survives tree-shaking and every consumer that imports any part of this module pays for every\n recipe in it — including the families it never uses. See `libs/utils.ts`. */\nimport { cx } from \"@/libs/utils\";\n\nexport type MotionIntent =\n | \"feedback\"\n | \"tactile\"\n | \"arrive\"\n | \"orient\"\n | \"relocate\"\n | \"direct\"\n | \"disclose\"\n | \"presence\"\n | \"activity\";\n\n/** Non-spatial feedback: hover, focus, field tone, a highlighted row, a filled surface.\n * It never translates, scales or resizes; reduced motion simply drops the interpolation\n * and the state still arrives. */\nexport const motionFeedback =\n \"transition-[background-color,border-color,color,box-shadow,opacity] duration-press ease-press motion-reduce:transition-none\";\n\n/** A control answers a press immediately and settles on its release.\n *\n * The recipe owns the *amplitude* of that answer as well as its timing, because how far a press\n * travels is the system's physical character rather than a component's anatomy. A percentage is a\n * distance only once it meets a size, so the amplitude comes in tiers chosen by the control's role:\n *\n * - `motionTactile`: a content-width control — a button, a chip, a segment — compresses 4%, about\n * two pixels at the size of the ink it moves. Stretched to its container (`w-full`), the same\n * control takes the wide tier's 1.5%.\n * - `motionTactileWide`: a control that spans a track — a tab — compresses 1.5%, so its edges move\n * about as far as a button's.\n * - `motionTactileField`: a list-opening field — a Select trigger, an editable Combobox — spans\n * its whole container, and 4% of a 580px field moved each edge 11.6px. It compresses 0.7%, about\n * two pixels at that width: the field acknowledges the press without lurching.\n *\n * The press leg runs on `duration-tactile`, short enough to land inside a tap; the release settles\n * on the release timing. A control whose visible ink is far smaller than its target takes\n * `motionInkPress` on that ink instead, so the target itself never moves. The interpolation and\n * the compression are neutralised together under reduced motion. */\n/* Base may disable the surface itself or the value control inside a Select wrapper.\n Neither is a pressable surface. Timing is otherwise shared by every tier. */\nconst tactileTiming =\n \"transition-[background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-tactile active:ease-press motion-reduce:transition-none\";\n\nexport const motionTactile = /* @__PURE__ */ cx(\n tactileTiming,\n \"motion-safe:[&:not([data-disabled],:disabled,[aria-disabled=true],[aria-busy=true],:has(>[role=combobox][data-disabled]))]:active:scale-[0.96]\",\n /* A content-width control a layout has stretched to its container is no longer content-width: 4%\n of a 240px action moved each edge 4.8px. The stretch is the caller's `w-full`, so the control\n reads it from its own class and takes the wide tier — still a press, at a button's distance. */\n \"motion-safe:[&.w-full:not([data-disabled],:disabled,[aria-disabled=true],[aria-busy=true],:has(>[role=combobox][data-disabled]))]:active:scale-[0.985]\"\n);\n\nexport const motionTactileWide = /* @__PURE__ */ cx(\n tactileTiming,\n \"motion-safe:[&:not([data-disabled],:disabled,[aria-disabled=true],[aria-busy=true])]:active:scale-[0.985]\"\n);\n\nexport const motionTactileField = /* @__PURE__ */ cx(\n tactileTiming,\n \"motion-safe:[&:not([data-disabled],:disabled,[aria-disabled=true],[aria-busy=true],:has(>[role=combobox][data-disabled]))]:active:scale-[0.993]\"\n);\n\n/** The spatial half of a compact press, applied to the *mark* rather than to the control.\n *\n * A control whose visible ink is much smaller than the target it is aimed at — a dialog's close\n * control, a stepper, a search field's submit — is a large target around a small glyph, and only\n * the glyph is visible at rest. Compressing the whole control would shrink the ground the pointer\n * is already on (a 44px target becomes 38.7px while held, which is exactly where a near-edge\n * release lands), so the mark takes the twelve percent and the target keeps its geometry. The\n * target still owns the focus ring and the state layer, and still carries the tone and depth\n * response, so the boundary a press happens inside never moves. */\nexport const motionInkPress =\n \"transition-transform duration-release ease-release group-active:duration-tactile group-active:ease-press group-active:scale-[0.88] motion-reduce:transition-none motion-reduce:group-active:scale-100\";\n\n/* Motion is not owned here — but the recipes above are the whole vocabulary: every press, arrival,\n travel, presence and activity in the library is one of these names plus its owner's own target\n geometry. */\n\n/* A field that opens a list — a `Select`'s trigger, an editable `Combobox`'s field — takes\n `motionTactile` as a whole, which is what makes the two forms of the same control press\n identically. The *field* is the element that carries the compression in both: a press activates\n the whole chain, so a descendant being pressed is what makes the field itself match `:active`\n (and a select trigger's own active state is suppressed by the primitive, so its field's wrapper\n is the only element left to carry it). Typing, focus and hover never match it, so the field is\n perfectly still while it is used as a text field; a press that places a caret or drags across a\n word is the same press the field already answers, and distinguishing it would take pointer\n bookkeeping inside a component for a case that reads as one interaction either way. */\n\n/** A meaningful subordinate part arrives. Spring is reserved for this intent: a mark is\n * made by overshooting the position it lands in. It leaves without the overshoot, and\n * reduced motion lands it in one step — which takes a *state-specific* override, because the\n * starting state is a higher-specificity rule than a plain `transform: none` and would otherwise\n * win under reduced motion while the transition was gone, turning a spring into an instant jump. */\nexport const motionArrive =\n \"transition-[background-color,color,box-shadow,transform,opacity] duration-release ease-spring data-[starting-style]:scale-50 data-[ending-style]:scale-50 data-[ending-style]:opacity-0 data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit motion-reduce:transition-none motion-reduce:transform-none motion-reduce:data-[starting-style]:scale-100 motion-reduce:data-[ending-style]:scale-100\";\n\n/** A persistent affordance changes orientation in place: a disclosure chevron. It reaches\n * its target orientation consistently and never overshoots. */\nexport const motionOrient =\n \"transition-transform duration-release ease-release motion-reduce:transition-none\";\n\n/** A persistent object travels between stable destinations: a tab indicator, a switch\n * thumb. The travel itself is the event, so it takes the glide curve rather than the\n * arrival curve, and it never overshoots: a destination that is passed and come back\n * from reads as a defect. Position, size and the tone the object picks up on the way\n * settle together, and an interrupted move retargets from wherever it currently is\n * because it is a transition and not a keyframe. */\nexport const motionRelocate =\n \"transition-[left,inset-inline-start,top,width,height,transform,background-color,color,box-shadow,opacity] duration-release ease-glide motion-reduce:transition-none\";\n\n/** The same travel across a whole track — a tab indicator — on the longer travel timing, so a\n * movement of hundreds of pixels is followed rather than skipped. */\nexport const motionRelocateLong =\n \"transition-[left,inset-inline-start,top,width,height,transform,background-color,color,box-shadow,opacity] duration-travel ease-glide motion-reduce:transition-none\";\n\n/** Direct manipulation: the pointer owns the geometry, so a positional transition would be\n * lag. While the primitive reports a drag, position and size are removed from the\n * transition list and only tone and engagement geometry remain; a keyboard or programmatic\n * step still settles. Reduced motion never changes direct manipulation. */\nexport const motionDirect =\n \"transition-[inset-inline-start,width,height,background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-press active:ease-press data-[dragging]:transition-[background-color,color,box-shadow,transform,opacity] motion-reduce:transition-none motion-reduce:transform-none\";\n\n/* Anchored popup, tooltip, modal, sheet, toast and scrim presence share three states:\n settled, `data-starting-style` and `data-ending-style`. The primitive decides\n when the node mounts and unmounts.\n None of them writes an animation keyframe or a timer, so a rapid open → close → open\n retargets from the current painted value instead of restarting.\n\n The anchored roles read their entrance direction from the resolved side. Base publishes\n the side on the popup after collision handling and the origin as `--transform-origin`, so\n a surface below its trigger rises into place, one above it settles down into it, and one\n flipped by a collision animates the way it is actually placed. */\n\nconst anchoredGeometry = /* @__PURE__ */ cx(\n \"[transform-origin:var(--transform-origin)]\",\n \"[--sui-overlay-from-shift-y:-4px]\",\n \"data-[side=top]:[--sui-overlay-from-shift-y:4px]\",\n \"data-[side=left]:[--sui-overlay-from-shift-y:0px] data-[side=left]:[--sui-overlay-from-shift-x:4px]\",\n \"data-[side=right]:[--sui-overlay-from-shift-y:0px] data-[side=right]:[--sui-overlay-from-shift-x:-4px]\",\n /* The logical sides resolve against the writing direction: `inline-start` puts the popup at the\n anchor's inline-start edge, which is its physical *left* on a left-to-right page and its\n physical *right* on a right-to-left one, so the four pixels that travel toward the anchor\n change sign with the page while the physical sides above never do. The direction is read from\n the `dir` attribute — the attribute that lays the page out, and the only one a portaled\n surface can see. The primitive resolves the side from the direction *it* is told about\n (`DirectionProvider`), so a consumer whose page is right-to-left declares that direction to\n both, exactly as the workbench's RTL specimens do. */\n \"data-[side=inline-start]:[--sui-overlay-from-shift-y:0px] data-[side=inline-start]:[--sui-overlay-from-shift-x:4px]\",\n \"[[dir=rtl]_&]:data-[side=inline-start]:[--sui-overlay-from-shift-x:-4px]\",\n \"data-[side=inline-end]:[--sui-overlay-from-shift-y:0px] data-[side=inline-end]:[--sui-overlay-from-shift-x:-4px]\",\n \"[[dir=rtl]_&]:data-[side=inline-end]:[--sui-overlay-from-shift-x:4px]\",\n);\n\n/* Both ends of a presence animation start from the same state, and reduced motion drops the\n spatial half of it: presence still reads as arriving, but only through opacity. The\n transform is a literal class rather than an interpolated one, because the stylesheet\n compiler reads class names as text: a name that only exists once a template is evaluated\n compiles to no rule at all. */\nconst anchoredFrom = /* @__PURE__ */ cx(\n \"data-[starting-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(var(--sui-overlay-from-shift-x,0px),var(--sui-overlay-from-shift-y,0px))scale(var(--sui-overlay-from-scale,1))]\",\n \"data-[ending-style]:opacity-0\",\n \"data-[ending-style]:[transform:translate(var(--sui-overlay-from-shift-x,0px),var(--sui-overlay-from-shift-y,0px))scale(var(--sui-overlay-from-scale,1))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\nconst modalFrom = /* @__PURE__ */ cx(\n \"data-[starting-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(0,12px)scale(0.96)]\",\n \"data-[ending-style]:opacity-0\",\n \"data-[ending-style]:[transform:translate(0,12px)scale(0.96)]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\n/** An anchored surface: `Select`, `Combobox`, `Menu` and `Popover`. It grows out of the edge\n * it is attached to, enters on the overlay timing, and leaves on the shorter exit.\n *\n * The grow is the motion's signature and the four pixels of travel only support it, so the\n * entrance takes the glide curve rather than the arrival curve. With a front-loaded curve the\n * opacity and the scale both jump in the first frames, which means the surface is already half\n * grown by the time it is visible at all — a pop, not a grow. The glide curve spends its whole\n * duration visible, so the eye actually sees the surface open out of its anchor. */\nexport const motionPresenceAnchored = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"[--sui-overlay-from-scale:0.94]\",\n anchoredGeometry,\n anchoredFrom,\n);\n\n/** A tooltip: the same side-aware model and the same grow as an anchored popup, deliberately\n * lighter — it settles on the local timing rather than the overlay timing, and it never\n * bounces. A tooltip that Base opens during its warm-up (`data-instant`, because another tooltip\n * was just closed) takes no timing at all: the next hint is already where the reader moved to. */\nexport const motionPresenceTooltip = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-release ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"data-[instant]:duration-0\",\n \"motion-reduce:transition-[opacity]\",\n \"[--sui-overlay-from-scale:0.94]\",\n anchoredGeometry,\n anchoredFrom,\n);\n\n/** The utility tier: a small surface a reader opened from the keyboard, or a menu they asked for.\n * It is opacity only — no travel, no scale and no scrim ramp — on the short utility timing, so the\n * surface is there as soon as the key that opened it has been answered. */\nexport const motionPresenceUtility = /* @__PURE__ */ cx(\n \"transition-opacity duration-utility ease-release\",\n \"data-[ending-style]:duration-utility-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n);\n\n/** A modal surface: anchored to the viewport rather than to a trigger, so it has no side\n * to grow from. A large surface never bounces; it fades, rises a little and settles, and its\n * scale stays restrained because a plane this big grows visibly even from a few percent. */\nexport const motionPresenceModal = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n modalFrom,\n);\n\n/** The plane behind a surface that owns the viewport. Only its tint fades, and the tint is the\n * `::before` layer `overlay.scrim` paints: the element itself carries the backdrop blur, and a\n * presence recipe never animates a node that carries `backdrop-filter`, because every frame of\n * such an animation re-blurs the page behind it. The blur therefore arrives with the plane, and\n * the tint fades in front of it. */\nexport const motionPresenceScrim = cx(\n \"before:transition-opacity before:duration-overlay before:ease-release\",\n \"data-[starting-style]:before:opacity-0 data-[ending-style]:before:opacity-0\",\n \"data-[ending-style]:before:duration-overlay-exit data-[ending-style]:before:ease-exit\"\n);\n\n/** The scrim of a utility surface. A surface the reader opened from the keyboard answers on the\n * utility timing, and its plane fades on that same timing, so the backdrop is not slower than the\n * surface it sits behind. */\nexport const motionPresenceScrimUtility = cx(\n \"before:transition-opacity before:duration-utility before:ease-release\",\n \"data-[starting-style]:before:opacity-0 data-[ending-style]:before:opacity-0\",\n \"data-[ending-style]:before:duration-utility-exit data-[ending-style]:before:ease-exit\"\n);\n\n/** Continuous activity is a distinct intent, not an exception to interaction motion: it\n * reports work rather than answering an event, and it has no entrance of its own.\n *\n * Reduced motion removes the *travel* of an activity loop — the rotation, the sweep — and keeps\n * the loop as an opacity change. A spinner that simply stopped reads as finished, and a user who\n * asked for less motion still needs to know the work is running. The reduced form is therefore\n * a slow breathe for the spinner and a softer pulse for a skeleton, both on the authored pace. */\nexport const motionActivitySpin = \"animate-spin motion-reduce:animate-sherick-breathe\";\nexport const motionActivityPulse = \"animate-pulse motion-reduce:animate-sherick-soft-pulse\";\n\n/** The reduced form of an indeterminate bar. The sweep is removed — its travel is the thing reduced\n * motion takes away — and the fill is held at the full width of its track, where its opacity\n * breathes on the same slow loop the spinner takes. A progress part that owns this class sets its\n * fill to the whole track under `motion-reduce`, so the reader still sees a bar that is busy.\n * Exported separately so `Progress` can pair it with its own width rule. */\nexport const motionActivityIndeterminateReduced = \"motion-reduce:animate-sherick-breathe\";\n\n/** The indeterminate half of a progress bar. A task with no known value cannot report a\n * position, so it reports *work* instead: the fill sweeps across its own track on the one loop\n * that is paced, because a loop that reports rather than answers cannot arrive. The travel is a\n * composited transform rather than a laid-out edge, and an endless loop must never sit on the\n * layout path; the direction is a value the recipe flips with the writing direction, because a\n * transform is physical and the sweep follows the page. Under reduced motion the sweep gives way\n * to the opacity breathe above, so the bar keeps saying that work is running without moving. */\nexport const motionActivityIndeterminate = /* @__PURE__ */ cx(\n \"animate-sherick-indeterminate [[dir=rtl]_&]:[--sui-indeterminate-direction:-1]\",\n motionActivityIndeterminateReduced\n);\n\n/** The state layer is a composited overlay, so its own opacity is the only thing that\n * moves. Shared here because four interaction states across the library ride it. */\n/** A row in a collection moves its highlight rather than fading it: a highlight is where the reader\n * is, and arrowing through a list with a soft fade on every row leaves a smear of half-lit rows.\n * The row's layer therefore changes in one step, for the pointer and the keyboard alike. */\nexport const motionRowLayer = \"before:transition-none\";\n\n/** A rim drawn as an overlay of its own — an empty selection mark's lip, a drop target's dashes —\n * carries its own feedback timing: it steps up on hover and fades as a selection fill arrives,\n * on the same press curve as the surface beneath it. */\nexport const motionRim =\n \"after:transition-[background-color,border-color,opacity] after:duration-press after:ease-press motion-reduce:after:transition-none\";\n\nexport const motionStateLayer =\n \"before:transition-opacity before:duration-release before:ease-release active:before:duration-tactile active:before:ease-press group-active:before:duration-tactile group-active:before:ease-press motion-reduce:before:transition-none\";\n\n/* `disclose` is the in-flow counterpart of presence: nothing mounts or unmounts, and nothing\n leaves the page — one region changes its own height where it sits. Base measures the panel and\n publishes that height, so the geometry is the primitive's and only the interpolation is here.\n The panel states the height it opens to; this recipe owns how it gets there, and reduced\n motion applies the layout state in one step rather than travelling through it. */\nexport const motionDisclose =\n \"transition-[height] duration-release ease-release data-[starting-style]:h-0 data-[ending-style]:h-0 data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit motion-reduce:transition-none\";\n\n/* A sheet is a surface that owns the viewport and is attached to one edge of it, so its presence is\n a slide out of that edge rather than the modal lift, and it never bounces. The component names the\n edge by setting exactly one of `--sui-sheet-from-x` / `--sui-sheet-from-y` to a full own-extent\n offset, because which edge a sheet is attached to is anatomy; how far it travels and how long it\n takes are not.\n\n The other axis is `0px`, and that default is load-bearing: a fallback of `100%` on the axis the\n component did not set would translate a side sheet on both axes at once, so a sheet attached to\n the right edge would enter from the bottom-right corner and travel diagonally instead of\n straight in. One edge means one axis. */\nexport const motionPresenceSheet = /* @__PURE__ */ cx(\n \"transition-[transform,opacity] duration-sheet ease-glide\",\n \"data-[ending-style]:duration-sheet-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(var(--sui-sheet-from-x,0px),var(--sui-sheet-from-y,0px))]\",\n \"data-[ending-style]:[transform:translate(var(--sui-sheet-from-x,0px),var(--sui-sheet-from-y,0px))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\n/* A toast is a stack, not a single surface: several independent surfaces share one corner,\n re-flow when one of them leaves, and can each be flung away by the pointer. That is one\n spatial owner on one node, and this is it.\n\n The component owns where a toast rests — its stacked offset, its clamped height and the\n expanded fan are geometry — and sets `--sui-toast-from-y` to the direction the stack grows in.\n This recipe owns the entrance, the exit, the stack's re-flow, and the gesture: while\n `data-swiping` is set the node follows the pointer with no interpolation at all, and a\n dismissal carries the movement it was flung with so the toast keeps travelling the way it was\n already going instead of turning around. */\nexport const motionPresenceToast = /* @__PURE__ */ cx(\n \"transition-[transform,opacity,height] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"data-[swiping]:transition-none\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n \"data-[starting-style]:[transform:translateY(var(--sui-toast-from-y,150%))]\",\n \"[&[data-ending-style]:not([data-swipe-direction])]:[transform:translateY(var(--sui-toast-from-y,150%))]\",\n \"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)+150%))]\",\n \"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)+150%))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n"],"names":["cx"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBiD;AAEjD;;;;AAI+E;AAc/E;;AAEmC;AAC5B,MAAM,cAAc,GACzB;AAEF;;;;;;;;;;;;;;;;;;AAkBqE;AACrE;AAC+E;AAC/E,MAAM,aAAa,GACjB,wKAAwK;AAEnK,MAAM,aAAa,mBAAmBA,QAAE,CAC7C,aAAa,EACb,gJAAgJ;AAChJ;;AAEkG;AAClG,wJAAwJ;AAGnJ,MAAM,iBAAiB,mBAAmBA,QAAE,CACjD,aAAa,EACb,2GAA2G;AAGtG,MAAM,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;
22
22
  exports.focusRingHeld = ui_common.focusRingHeld;
23
23
  exports.focusRingInset = ui_common.focusRingInset;
24
24
  exports.focusRingWithin = ui_common.focusRingWithin;
25
+ exports.forcedBoundary = ui_common.forcedBoundary;
25
26
  exports.groupFocusRing = ui_common.groupFocusRing;
27
+ exports.headingRhythm = ui_common.headingRhythm;
26
28
  exports.hitArea = ui_common.hitArea;
27
29
  exports.iconSlot = ui_common.iconSlot;
28
30
  exports.iconStroke = ui_common.iconStroke;
@@ -49,6 +51,7 @@ exports.text = ui_common.text;
49
51
  exports.tone = ui_common.tone;
50
52
  exports.type = ui_common.type;
51
53
  exports.motionActivityIndeterminate = ui_motion.motionActivityIndeterminate;
54
+ exports.motionActivityIndeterminateReduced = ui_motion.motionActivityIndeterminateReduced;
52
55
  exports.motionActivityPulse = ui_motion.motionActivityPulse;
53
56
  exports.motionActivitySpin = ui_motion.motionActivitySpin;
54
57
  exports.motionArrive = ui_motion.motionArrive;
@@ -60,9 +63,11 @@ exports.motionOrient = ui_motion.motionOrient;
60
63
  exports.motionPresenceAnchored = ui_motion.motionPresenceAnchored;
61
64
  exports.motionPresenceModal = ui_motion.motionPresenceModal;
62
65
  exports.motionPresenceScrim = ui_motion.motionPresenceScrim;
66
+ exports.motionPresenceScrimUtility = ui_motion.motionPresenceScrimUtility;
63
67
  exports.motionPresenceSheet = ui_motion.motionPresenceSheet;
64
68
  exports.motionPresenceToast = ui_motion.motionPresenceToast;
65
69
  exports.motionPresenceTooltip = ui_motion.motionPresenceTooltip;
70
+ exports.motionPresenceUtility = ui_motion.motionPresenceUtility;
66
71
  exports.motionRelocate = ui_motion.motionRelocate;
67
72
  exports.motionRelocateLong = ui_motion.motionRelocateLong;
68
73
  exports.motionRim = ui_motion.motionRim;
@@ -1 +1 @@
1
- {"version":3,"file":"dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -105,6 +105,7 @@ exports.ToggleGroup = ToggleGroup.default;
105
105
  exports.Table = Table.Table;
106
106
  exports.Textarea = Textarea.default;
107
107
  exports.Tooltip = Tooltip.default;
108
+ exports.TooltipProvider = Tooltip.TooltipProvider;
108
109
  exports.TreeView = TreeView.default;
109
110
  exports.Drawer = Drawer.default;
110
111
  exports.ToastProvider = Toast.ToastProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,14 +5,23 @@ import React, { createContext, useContext } from 'react';
5
5
  import { HugeiconsIcon } from '@hugeicons/react';
6
6
  import { ArrowDown01Icon } from '@hugeicons/core-free-icons';
7
7
  import { cn } from '../libs/utils.js';
8
- import Divider from './Divider.js';
9
- import { iconStroke, disclosure } from './ui.common.js';
10
- import { motionFeedback, motionOrient } from './ui.motion.js';
8
+ import { edgeTone, iconStroke, disclosure } from './ui.common.js';
9
+ import { motionOrient } from './ui.motion.js';
11
10
 
12
11
  /* One section of an `Accordion`. The trigger and the panel it opens are `Accordion.Trigger` and
13
12
  `Accordion.Panel`; the heading that labels them is the trigger's own, so a consumer never has
14
- to build an accessible accordion structure by hand. */
15
- const AccordionItem = ({ children, className, ...props }) => (jsx(Accordion$1.Item, { ...props, className: cn("min-w-0", className), children: children }));
13
+ to build an accessible accordion structure by hand.
14
+
15
+ The join between two sections belongs to the section below it: every item after the first draws
16
+ a line on its top edge, in the lightest `row` tone, because the sections are rows of one stacked
17
+ list rather than separate parts of a surface. The line is the item's own, so a fragment or a
18
+ wrapper around items gets the same joins as a flat list.
19
+
20
+ The join yields to a closed neighbour under the pointer: a closed item that is hovered hides the line
21
+ above it and the line below it, while an open section keeps its line, so expanded content reads as one
22
+ unit. Both selectors sit inside the pointer media query, so a tap leaves no hover tone behind. */
23
+ const joinYield = "[@media(hover:hover)_and_(pointer:fine)]:[&:not([data-open]):hover]:border-transparent [@media(hover:hover)_and_(pointer:fine)]:[&:not([data-open]):hover+*]:border-transparent";
24
+ const AccordionItem = ({ children, className, ...props }) => (jsx(Accordion$1.Item, { ...props, className: cn("min-w-0 [&:not(:first-child)]:border-t", joinYield, edgeTone.row, className), children: children }));
16
25
  const HeadingLevelContext = createContext(3);
17
26
  /* The heading element Base wraps each trigger in. `render` replaces the element rather than
18
27
  adding one, so the level changes without a second wrapper. */
@@ -23,35 +32,14 @@ const AccordionTrigger = ({ children, className }) => {
23
32
  /* The heading is the item's own, so a consumer never writes the accessible accordion
24
33
  structure by hand; `render` replaces the element rather than adding a wrapper, so the
25
34
  level follows the document instead of being fixed at Base's default. */
26
- jsx(Accordion$1.Header, { render: headingRender(headingLevel), className: cn("m-0"), children: jsxs(Accordion$1.Trigger, { className: cn(disclosure.trigger, className), children: [jsx("span", { className: cn("min-w-0 flex-1"), children: children }), jsx(HugeiconsIcon, { icon: ArrowDown01Icon, "aria-hidden": "true", className: cn(iconStroke.glyph, "size-4 shrink-0", motionOrient, "group-data-[panel-open]:rotate-180") })] }) }));
35
+ jsx(Accordion$1.Header, { render: headingRender(headingLevel), className: cn("m-0"), children: jsxs(Accordion$1.Trigger, { className: cn(disclosure.trigger, className), children: [jsx("span", { className: cn("min-w-0 flex-1"), children: children }), jsx("span", { className: cn(disclosure.chevron), "aria-hidden": "true", children: jsx(HugeiconsIcon, { icon: ArrowDown01Icon, "aria-hidden": "true", className: cn(iconStroke.glyph, motionOrient, "group-data-[panel-open]:rotate-180") }) })] }) }));
27
36
  };
28
37
  /* The measured region. Base publishes the panel's open height as its own variable, and the
29
38
  disclosure recipe reads `--sui-disclose-height`, so the panel maps the two rather than the
30
39
  recipe knowing which primitive it belongs to. */
31
40
  const AccordionPanel = ({ children, className }) => (jsx(Accordion$1.Panel, { className: cn("[--sui-disclose-height:var(--accordion-panel-height)]", disclosure.panel, className), children: jsx("div", { className: cn("px-4 pb-4 pt-1"), children: children }) }));
32
- /* One hairline where two sections meet. The line belongs to the group rather than to a section,
33
- so a section never draws its own edge, and it is the public `Divider` at its lightest role —
34
- the line between the rows of one stacked list.
35
-
36
- Three of its properties are the accordion's own anatomy: it is inset to the band the trigger and
37
- the panel content share, so it marks the join between two sections rather than the width of the
38
- surface; it keeps air above and below, so the hover tint never sits on a rule; and it yields
39
- while either section beside it is hovered, so the boundary reads when the group is scanned
40
- without competing with the row the pointer is on. A section that is already open is excluded
41
- from the yield, because the line beneath expanded content is what keeps the expanded section
42
- reading as one unit. */
43
- const withDividers = (children) => React.Children.toArray(children).flatMap((child, index) => index === 0
44
- ? [child]
45
- : [
46
- jsx(Divider, { weight: "row", className: cn(
47
- /* `w-auto` in place of the shared full width: the column stretches it across the
48
- band the margins leave, so the inset is real geometry rather than a full-width
49
- line that overshoots its own margins. */
50
- "w-auto mx-4 my-2", motionFeedback, "[&:has(+div:not([data-open]):hover)]:opacity-0", "[div:not([data-open]):hover+&]:opacity-0") }, `divider-${index}`),
51
- child,
52
- ]);
53
41
  const Accordion = (({ children, multiple = false, disabled = false, headingLevel = 3, className, ...props }) => {
54
- return (jsx(HeadingLevelContext.Provider, { value: headingLevel, children: jsx(Accordion$1.Root, { ...props, multiple: multiple, disabled: disabled, className: cn("flex min-w-0 flex-col", className), children: withDividers(children) }) }));
42
+ return (jsx(HeadingLevelContext.Provider, { value: headingLevel, children: jsx(Accordion$1.Root, { ...props, multiple: multiple, disabled: disabled, className: cn("flex min-w-0 flex-col", className), children: children }) }));
55
43
  });
56
44
  Accordion.Item = AccordionItem;
57
45
  Accordion.Trigger = AccordionTrigger;
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sources":["../../../src/components/Accordion.tsx"],"sourcesContent":["\"use client\";\n\nimport { Accordion as BaseAccordion } from \"@base-ui/react/accordion\";\nimport React, { createContext, useContext, type ReactNode } from \"react\";\nimport { HugeiconsIcon } from \"@hugeicons/react\";\nimport { ArrowDown01Icon } from \"@hugeicons/core-free-icons\";\nimport { cn } from \"@/libs/utils\";\nimport Divider from \"./Divider\";\nimport { disclosure, iconStroke } from \"./ui.common\";\nimport { motionFeedback, motionOrient } from \"./ui.motion\";\n\n/** A heading level for the groups of an `Accordion`. Base renders a heading around every panel\n * trigger, because that is what makes the group navigable as a set of sections; which level it\n * is depends on where the accordion sits in the document. */\nexport type AccordionHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface AccordionProps {\n children: ReactNode;\n /**\n * Whether more than one panel can be open at once. A group that answers a question is single:\n * opening one section closes the one before it.\n */\n multiple?: boolean;\n /** The item(s) that are expanded, when the application owns the state. */\n value?: BaseAccordion.Root.Props[\"value\"];\n /** The item(s) that start expanded, for an accordion that owns its own state. */\n defaultValue?: BaseAccordion.Root.Props[\"defaultValue\"];\n /** Base's own value-change callback, event details included. */\n onValueChange?: BaseAccordion.Root.Props[\"onValueChange\"];\n /** Whether the whole group is inert. */\n disabled?: boolean;\n /** The heading level the group labels its sections with. */\n headingLevel?: AccordionHeadingLevel;\n /** Adds to the group's own column. The rows and panels style themselves. */\n className?: string;\n}\n\nexport interface AccordionItemProps {\n children: ReactNode;\n /**\n * Identifies the item. A controlled accordion expands its items by value, so an item without\n * one can still be opened but not addressed from outside.\n */\n value?: BaseAccordion.Item.Props[\"value\"];\n /** Whether this item alone is inert. */\n disabled?: boolean;\n /** Adds to the item's own column. */\n className?: string;\n}\n\nexport interface AccordionTriggerProps {\n children: ReactNode;\n /** Adds to the row. The row's shape, tone and states are the disclosure recipe's. */\n className?: string;\n}\n\nexport interface AccordionPanelProps {\n children: ReactNode;\n /** Adds to the measured region. The region's height and clipping are the recipe's. */\n className?: string;\n}\n\n/* One section of an `Accordion`. The trigger and the panel it opens are `Accordion.Trigger` and\n `Accordion.Panel`; the heading that labels them is the trigger's own, so a consumer never has\n to build an accessible accordion structure by hand. */\nconst AccordionItem = ({ children, className, ...props }: AccordionItemProps) => (\n <BaseAccordion.Item {...props} className={cn(\"min-w-0\", className)}>\n {children}\n </BaseAccordion.Item>\n);\n\ntype AccordionComponent = ((props: AccordionProps) => React.JSX.Element) & {\n Item: typeof AccordionItem;\n Trigger: typeof AccordionTrigger;\n Panel: typeof AccordionPanel;\n};\n\nconst HeadingLevelContext = createContext<AccordionHeadingLevel>(3);\n\n/* The heading element Base wraps each trigger in. `render` replaces the element rather than\n adding one, so the level changes without a second wrapper. */\nconst headingRender = (level: AccordionHeadingLevel) => React.createElement(`h${level}`);\n\nconst AccordionTrigger = ({ children, className }: AccordionTriggerProps) => {\n const headingLevel = useContext(HeadingLevelContext);\n\n return (\n /* The heading is the item's own, so a consumer never writes the accessible accordion\n structure by hand; `render` replaces the element rather than adding a wrapper, so the\n level follows the document instead of being fixed at Base's default. */\n <BaseAccordion.Header render={headingRender(headingLevel)} className={cn(\"m-0\")}>\n <BaseAccordion.Trigger className={cn(disclosure.trigger, className)}>\n <span className={cn(\"min-w-0 flex-1\")}>{children}</span>\n {/* The affordance turns in place, so it takes `orient`: it is the same object before\n and after, and only its direction changes. */}\n <HugeiconsIcon icon={ArrowDown01Icon}\n aria-hidden=\"true\"\n className={cn(iconStroke.glyph, \"size-4 shrink-0\", motionOrient, \"group-data-[panel-open]:rotate-180\")}\n />\n </BaseAccordion.Trigger>\n </BaseAccordion.Header>\n );\n};\n\n/* The measured region. Base publishes the panel's open height as its own variable, and the\n disclosure recipe reads `--sui-disclose-height`, so the panel maps the two rather than the\n recipe knowing which primitive it belongs to. */\nconst AccordionPanel = ({ children, className }: AccordionPanelProps) => (\n <BaseAccordion.Panel\n className={cn(\n \"[--sui-disclose-height:var(--accordion-panel-height)]\",\n disclosure.panel,\n className\n )}\n >\n <div className={cn(\"px-4 pb-4 pt-1\")}>{children}</div>\n </BaseAccordion.Panel>\n);\n\n\n/* One hairline where two sections meet. The line belongs to the group rather than to a section,\n so a section never draws its own edge, and it is the public `Divider` at its lightest role —\n the line between the rows of one stacked list.\n\n Three of its properties are the accordion's own anatomy: it is inset to the band the trigger and\n the panel content share, so it marks the join between two sections rather than the width of the\n surface; it keeps air above and below, so the hover tint never sits on a rule; and it yields\n while either section beside it is hovered, so the boundary reads when the group is scanned\n without competing with the row the pointer is on. A section that is already open is excluded\n from the yield, because the line beneath expanded content is what keeps the expanded section\n reading as one unit. */\nconst withDividers = (children: ReactNode) =>\n React.Children.toArray(children).flatMap((child, index) =>\n index === 0\n ? [child]\n : [\n <Divider\n key={`divider-${index}`}\n weight=\"row\"\n className={cn(\n /* `w-auto` in place of the shared full width: the column stretches it across the\n band the margins leave, so the inset is real geometry rather than a full-width\n line that overshoots its own margins. */\n \"w-auto mx-4 my-2\",\n motionFeedback,\n \"[&:has(+div:not([data-open]):hover)]:opacity-0\",\n \"[div:not([data-open]):hover+&]:opacity-0\"\n )}\n />,\n child,\n ]\n );\n\nconst Accordion = (({\n children,\n multiple = false,\n disabled = false,\n headingLevel = 3,\n className,\n ...props\n}: AccordionProps) => {\n return (\n <HeadingLevelContext.Provider value={headingLevel}>\n <BaseAccordion.Root\n {...props}\n multiple={multiple}\n disabled={disabled}\n className={cn(\"flex min-w-0 flex-col\", className)}\n >\n {withDividers(children)}\n </BaseAccordion.Root>\n </HeadingLevelContext.Provider>\n );\n}) as AccordionComponent;\n\nAccordion.Item = AccordionItem;\nAccordion.Trigger = AccordionTrigger;\nAccordion.Panel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AK,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc;;"}
1
+ {"version":3,"file":"Accordion.js","sources":["../../../src/components/Accordion.tsx"],"sourcesContent":["\"use client\";\n\nimport { Accordion as BaseAccordion } from \"@base-ui/react/accordion\";\nimport React, { createContext, useContext, type ReactNode } from \"react\";\nimport { HugeiconsIcon } from \"@hugeicons/react\";\nimport { ArrowDown01Icon } from \"@hugeicons/core-free-icons\";\nimport { cn } from \"@/libs/utils\";\nimport { disclosure, edgeTone, iconStroke } from \"./ui.common\";\nimport { motionOrient } from \"./ui.motion\";\n\n/** A heading level for the groups of an `Accordion`. Base renders a heading around every panel\n * trigger, because that is what makes the group navigable as a set of sections; which level it\n * is depends on where the accordion sits in the document. */\nexport type AccordionHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface AccordionProps {\n children: ReactNode;\n /**\n * Whether more than one panel can be open at once. A group that answers a question is single:\n * opening one section closes the one before it.\n */\n multiple?: boolean;\n /** The item(s) that are expanded, when the application owns the state. */\n value?: BaseAccordion.Root.Props[\"value\"];\n /** The item(s) that start expanded, for an accordion that owns its own state. */\n defaultValue?: BaseAccordion.Root.Props[\"defaultValue\"];\n /** Base's own value-change callback, event details included. */\n onValueChange?: BaseAccordion.Root.Props[\"onValueChange\"];\n /** Whether the whole group is inert. */\n disabled?: boolean;\n /** The heading level the group labels its sections with. */\n headingLevel?: AccordionHeadingLevel;\n /** Adds to the group's own column. The rows and panels style themselves. */\n className?: string;\n}\n\nexport interface AccordionItemProps {\n children: ReactNode;\n /**\n * Identifies the item. A controlled accordion expands its items by value, so an item without\n * one can still be opened but not addressed from outside.\n */\n value?: BaseAccordion.Item.Props[\"value\"];\n /** Whether this item alone is inert. */\n disabled?: boolean;\n /** Adds to the item's own column. */\n className?: string;\n}\n\nexport interface AccordionTriggerProps {\n children: ReactNode;\n /** Adds to the row. The row's shape, tone and states are the disclosure recipe's. */\n className?: string;\n}\n\nexport interface AccordionPanelProps {\n children: ReactNode;\n /** Adds to the measured region. The region's height and clipping are the recipe's. */\n className?: string;\n}\n\n/* One section of an `Accordion`. The trigger and the panel it opens are `Accordion.Trigger` and\n `Accordion.Panel`; the heading that labels them is the trigger's own, so a consumer never has\n to build an accessible accordion structure by hand.\n\n The join between two sections belongs to the section below it: every item after the first draws\n a line on its top edge, in the lightest `row` tone, because the sections are rows of one stacked\n list rather than separate parts of a surface. The line is the item's own, so a fragment or a\n wrapper around items gets the same joins as a flat list.\n\n The join yields to a closed neighbour under the pointer: a closed item that is hovered hides the line\n above it and the line below it, while an open section keeps its line, so expanded content reads as one\n unit. Both selectors sit inside the pointer media query, so a tap leaves no hover tone behind. */\nconst joinYield =\n \"[@media(hover:hover)_and_(pointer:fine)]:[&:not([data-open]):hover]:border-transparent [@media(hover:hover)_and_(pointer:fine)]:[&:not([data-open]):hover+*]:border-transparent\";\nconst AccordionItem = ({ children, className, ...props }: AccordionItemProps) => (\n <BaseAccordion.Item\n {...props}\n className={cn(\"min-w-0 [&:not(:first-child)]:border-t\", joinYield, edgeTone.row, className)}\n >\n {children}\n </BaseAccordion.Item>\n);\n\ntype AccordionComponent = ((props: AccordionProps) => React.JSX.Element) & {\n Item: typeof AccordionItem;\n Trigger: typeof AccordionTrigger;\n Panel: typeof AccordionPanel;\n};\n\nconst HeadingLevelContext = createContext<AccordionHeadingLevel>(3);\n\n/* The heading element Base wraps each trigger in. `render` replaces the element rather than\n adding one, so the level changes without a second wrapper. */\nconst headingRender = (level: AccordionHeadingLevel) => React.createElement(`h${level}`);\n\nconst AccordionTrigger = ({ children, className }: AccordionTriggerProps) => {\n const headingLevel = useContext(HeadingLevelContext);\n\n return (\n /* The heading is the item's own, so a consumer never writes the accessible accordion\n structure by hand; `render` replaces the element rather than adding a wrapper, so the\n level follows the document instead of being fixed at Base's default. */\n <BaseAccordion.Header render={headingRender(headingLevel)} className={cn(\"m-0\")}>\n <BaseAccordion.Trigger className={cn(disclosure.trigger, className)}>\n <span className={cn(\"min-w-0 flex-1\")}>{children}</span>\n {/* The affordance is a disclosure chevron at its own slot size. It turns in place, so it takes\n `orient`: it is the same object before and after, and only its direction changes. */}\n <span className={cn(disclosure.chevron)} aria-hidden=\"true\">\n <HugeiconsIcon\n icon={ArrowDown01Icon}\n aria-hidden=\"true\"\n className={cn(iconStroke.glyph, motionOrient, \"group-data-[panel-open]:rotate-180\")}\n />\n </span>\n </BaseAccordion.Trigger>\n </BaseAccordion.Header>\n );\n};\n\n/* The measured region. Base publishes the panel's open height as its own variable, and the\n disclosure recipe reads `--sui-disclose-height`, so the panel maps the two rather than the\n recipe knowing which primitive it belongs to. */\nconst AccordionPanel = ({ children, className }: AccordionPanelProps) => (\n <BaseAccordion.Panel\n className={cn(\n \"[--sui-disclose-height:var(--accordion-panel-height)]\",\n disclosure.panel,\n className\n )}\n >\n <div className={cn(\"px-4 pb-4 pt-1\")}>{children}</div>\n </BaseAccordion.Panel>\n);\n\n\nconst Accordion = (({\n children,\n multiple = false,\n disabled = false,\n headingLevel = 3,\n className,\n ...props\n}: AccordionProps) => {\n return (\n <HeadingLevelContext.Provider value={headingLevel}>\n <BaseAccordion.Root\n {...props}\n multiple={multiple}\n disabled={disabled}\n className={cn(\"flex min-w-0 flex-col\", className)}\n >\n {children}\n </BaseAccordion.Root>\n </HeadingLevelContext.Provider>\n );\n}) as AccordionComponent;\n\nAccordion.Item = AccordionItem;\nAccordion.Trigger = AccordionTrigger;\nAccordion.Panel = AccordionPanel;\n\nexport default Accordion;\n"],"names":["_jsx","BaseAccordion","_jsxs"],"mappings":";;;;;;;;;;AA6DA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAClB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAE,CAAA,CAAE,CAAC,uBAAuB,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAEhD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CACU,CAAA,CAAA,CACQ,CAAA;AAEnC,CAAC,CAAA;AAED,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa;AAC9B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB;AACpC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc;;"}
@@ -1,34 +1,74 @@
1
1
  'use client';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { Button } from '@base-ui/react/button';
4
- import { useState } from 'react';
5
- import { HugeiconsIcon } from '@hugeicons/react';
6
- import { CheckmarkCircle02Icon, Alert02Icon, CancelCircleIcon, InformationCircleIcon, Cancel01Icon } from '@hugeicons/core-free-icons';
3
+ import { forwardRef, useRef, useState } from 'react';
7
4
  import { cn } from '../libs/utils.js';
8
- import { tone, iconStroke, type, state, stateLayer, focusRingInset, shape, density, text } from './ui.common.js';
9
- import { motionInkPress, motionFeedback } from './ui.motion.js';
5
+ import { type, text, tone, shape } from './ui.common.js';
6
+ import DismissButton from './DismissButton.js';
7
+ import { StatusMark } from './StatusMark.js';
10
8
 
11
- const iconMap = {
12
- primary: InformationCircleIcon,
13
- secondary: InformationCircleIcon,
14
- danger: CancelCircleIcon,
15
- warning: Alert02Icon,
16
- success: CheckmarkCircle02Icon,
9
+ /* What a keyboard can land on. A disabled element is dropped by the `:disabled` check in the helper. */
10
+ const focusable = "a[href], button, input, select, textarea, [tabindex], [contenteditable='true']";
11
+ /**
12
+ * Moves focus off a node that is about to leave the page, so a dismissed alert or a removed chip does
13
+ * not drop focus onto the body. The reader's place goes to the next focusable element that follows the
14
+ * node in its scope, then to the one before it, and only then to the scope itself. The scope is the
15
+ * nearest role group, so a removed chip keeps focus inside its ChipGroup.
16
+ *
17
+ * Call it before the node is removed: once the node has left, there is nothing left to measure from.
18
+ */
19
+ const focusNeighbour = (node) => {
20
+ var _a;
21
+ const scope = (_a = node.closest('[role="group"]')) !== null && _a !== void 0 ? _a : node.parentElement;
22
+ if (!scope)
23
+ return;
24
+ const candidates = Array.from(scope.querySelectorAll(focusable)).filter((element) => !node.contains(element) && !element.matches(":disabled"));
25
+ const next = candidates.find((element) => node.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_FOLLOWING);
26
+ const previous = candidates
27
+ .filter((element) => node.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_PRECEDING)
28
+ .pop();
29
+ const target = next !== null && next !== void 0 ? next : previous;
30
+ if (target) {
31
+ target.focus();
32
+ return;
33
+ }
34
+ /* A container is not focusable by default. It takes a tab index only for the moment focus lands on
35
+ it, and gives the attribute back as soon as focus leaves. */
36
+ if (!scope.hasAttribute("tabindex")) {
37
+ scope.tabIndex = -1;
38
+ scope.addEventListener("blur", () => scope.removeAttribute("tabindex"), { once: true });
39
+ }
40
+ scope.focus();
17
41
  };
18
42
  /* An alert reports; it is not something the reader acts on. Its default is therefore the neutral
19
43
  soft surface, with the accent spent only on its small status mark, so an informational line never
20
44
  competes with the one priority action in the view. A semantic variant tints the whole surface,
21
45
  because there the colour carries meaning (§10). */
22
- const Alert = ({ children, variant = "secondary", className, closeable = false, onDismiss, }) => {
23
- const [isVisible, setIsVisible] = useState(true);
24
- const icon = iconMap[variant];
25
- if (!isVisible)
46
+ const Alert = forwardRef(({ children, variant = "secondary", className, closeable = false, dismissLabel = "Dismiss alert", announce, open, defaultOpen = true, onOpenChange, onDismiss, ...props }, ref) => {
47
+ const element = useRef(null);
48
+ const [uncontrolled, setUncontrolled] = useState(defaultOpen);
49
+ const isOpen = open !== null && open !== void 0 ? open : uncontrolled;
50
+ const role = announce !== null && announce !== void 0 ? announce : (variant === "danger" || variant === "warning" ? "alert" : "status");
51
+ /* The same node answers both the forwarded ref and the dismissal's focus move. */
52
+ const setElement = (node) => {
53
+ element.current = node;
54
+ if (typeof ref === "function")
55
+ ref(node);
56
+ else if (ref)
57
+ ref.current = node;
58
+ };
59
+ if (!isOpen)
26
60
  return null;
27
- return (jsxs("div", { role: variant === "danger" || variant === "warning" ? "alert" : "status", className: cn("flex min-w-0 items-start gap-3 px-4 py-3.5 [overflow-wrap:anywhere]", shape.control, tone.soft[variant], text.high, className), children: [jsx("span", { className: cn("flex h-6 shrink-0 items-center"), "aria-hidden": "true", children: jsx(HugeiconsIcon, { icon: icon, "aria-hidden": "true", className: cn("size-5", iconStroke.glyph, variant === "secondary" ? tone.text.primary : tone.text[variant]) }) }), jsx("div", { className: cn("min-w-0 flex-1", type.body), children: children }), closeable && (jsx(Button, { type: "button", "aria-label": "Dismiss alert", onClick: () => {
28
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
29
- setIsVisible(false);
30
- }, className: cn("group -me-2 -my-2.5 inline-flex shrink-0 items-center justify-center", density.target, shape.circle, focusRingInset, motionFeedback, stateLayer.quiet, state.enabled), children: jsx("span", { className: cn("inline-flex items-center justify-center", motionInkPress), children: jsx(HugeiconsIcon, { icon: Cancel01Icon, "aria-hidden": "true", className: cn("size-4", iconStroke.glyph) }) }) }))] }));
31
- };
61
+ const dismiss = () => {
62
+ if (element.current)
63
+ focusNeighbour(element.current);
64
+ onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
65
+ if (open === undefined)
66
+ setUncontrolled(false);
67
+ onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
68
+ };
69
+ return (jsxs("div", { ...props, ref: setElement, role: role === "none" ? undefined : role, className: cn("flex min-w-0 items-start gap-3 px-4 py-3.5 [overflow-wrap:anywhere]", shape.control, tone.soft[variant], text.high, className), children: [jsx("span", { className: cn("flex h-6 shrink-0 items-center"), children: jsx(StatusMark, { variant: variant }) }), jsx("div", { className: cn("min-w-0 flex-1", type.body), children: children }), closeable && (jsx(DismissButton, { label: dismissLabel, size: "compact", inRow: true, onClick: dismiss, className: cn("-me-3 -my-2.5") }))] }));
70
+ });
71
+ Alert.displayName = "Alert";
32
72
 
33
- export { Alert };
73
+ export { Alert, focusNeighbour };
34
74
  //# sourceMappingURL=Alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sources":["../../../src/components/Alert.tsx"],"sourcesContent":["\"use client\";\n\nimport { Button } from \"@base-ui/react/button\";\nimport React, { type ReactNode, useState } from \"react\";\nimport { HugeiconsIcon } from \"@hugeicons/react\";\nimport { Alert02Icon, Cancel01Icon, CancelCircleIcon, CheckmarkCircle02Icon, InformationCircleIcon } from \"@hugeicons/core-free-icons\";\nimport { cn } from \"@/libs/utils\";\nimport {\n density,\n focusRingInset,\n iconStroke,\n shape,\n state,\n stateLayer,\n text,\n tone,\n type,\n} from \"./ui.common\";\nimport { motionFeedback, motionInkPress } from \"./ui.motion\";\nimport { Variant } from \"./ui.types\";\n\nconst iconMap = {\n primary: InformationCircleIcon,\n secondary: InformationCircleIcon,\n danger: CancelCircleIcon,\n warning: Alert02Icon,\n success: CheckmarkCircle02Icon,\n};\n\nexport interface AlertProps {\n children: ReactNode;\n variant?: Variant;\n className?: string;\n closeable?: boolean;\n onDismiss?: () => void;\n}\n\n/* An alert reports; it is not something the reader acts on. Its default is therefore the neutral\n soft surface, with the accent spent only on its small status mark, so an informational line never\n competes with the one priority action in the view. A semantic variant tints the whole surface,\n because there the colour carries meaning (§10). */\nexport const Alert = ({\n children,\n variant = \"secondary\",\n className,\n closeable = false,\n onDismiss,\n}: AlertProps) => {\n const [isVisible, setIsVisible] = useState(true);\n const icon = iconMap[variant];\n\n if (!isVisible) return null;\n\n return (\n <div\n role={variant === \"danger\" || variant === \"warning\" ? \"alert\" : \"status\"}\n className={cn(\n \"flex min-w-0 items-start gap-3 px-4 py-3.5 [overflow-wrap:anywhere]\",\n shape.control,\n tone.soft[variant],\n text.high,\n className\n )}\n >\n {/* The status mark is a **first-line** mark: an alert's copy wraps, and a mark centred on the\n whole block would drift to the middle of it. The slot takes the first line's own height\n (`leading-6`), so the icon is centred on the line it belongs to with no offset. */}\n <span className={cn(\"flex h-6 shrink-0 items-center\")} aria-hidden=\"true\">\n <HugeiconsIcon icon={icon} aria-hidden=\"true\" className={cn(\"size-5\", iconStroke.glyph, variant === \"secondary\" ? tone.text.primary : tone.text[variant])} />\n </span>\n <div className={cn(\"min-w-0 flex-1\", type.body)}>{children}</div>\n {/* The dismissal is a first-line affordance too: a 44px target is taller than the line it belongs\n to, so it is offset to that line and gives its excess back on **both** vertical edges — a\n top-only offset would leave the target's remaining 10px as extra space under a single line of\n copy, letting the target rather than the copy size the surface. Its target padding is\n likewise pulled back at the surface's end edge: that padding exists to make the target big,\n and it is not allowed to read as a trailing void. The target keeps the geometry the pointer\n found. */}\n {closeable && (\n <Button\n type=\"button\"\n aria-label=\"Dismiss alert\"\n onClick={() => {\n onDismiss?.();\n setIsVisible(false);\n }}\n className={cn(\n \"group -me-2 -my-2.5 inline-flex shrink-0 items-center justify-center\",\n density.target,\n shape.circle,\n focusRingInset,\n motionFeedback,\n stateLayer.quiet,\n state.enabled\n )}\n >\n {/* The target stays exactly where the pointer found it; the mark inside it carries the\n press. */}\n <span className={cn(\"inline-flex items-center justify-center\", motionInkPress)}>\n <HugeiconsIcon icon={Cancel01Icon} aria-hidden=\"true\" className={cn(\"size-4\", iconStroke.glyph)} />\n </span>\n </Button>\n )}\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;AAqBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,OAAO,CAAA,CAAA,CAAG;AACd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB;AAC9B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB;AAChC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB;AACxB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW;AACpB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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AAC,CAAA,CAAA,CAAI,EAAA,CAC9F,CAAA,CAAA,CACA,CACV,CAAA,EAAA,CACG,CAAA;AAEV,CAAA;;"}
1
+ {"version":3,"file":"Alert.js","sources":["../../../src/components/Alert.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { forwardRef, useRef, useState, type ComponentPropsWithoutRef, type ReactNode } from \"react\";\nimport { cn } from \"@/libs/utils\";\nimport { shape, text, tone, type } from \"./ui.common\";\nimport DismissButton from \"./DismissButton\";\nimport StatusMark from \"./StatusMark\";\nimport { Variant } from \"./ui.types\";\n\n/* What a keyboard can land on. A disabled element is dropped by the `:disabled` check in the helper. */\nconst focusable = \"a[href], button, input, select, textarea, [tabindex], [contenteditable='true']\";\n\n/**\n * Moves focus off a node that is about to leave the page, so a dismissed alert or a removed chip does\n * not drop focus onto the body. The reader's place goes to the next focusable element that follows the\n * node in its scope, then to the one before it, and only then to the scope itself. The scope is the\n * nearest role group, so a removed chip keeps focus inside its ChipGroup.\n *\n * Call it before the node is removed: once the node has left, there is nothing left to measure from.\n */\nexport const focusNeighbour = (node: HTMLElement) => {\n const scope = node.closest<HTMLElement>('[role=\"group\"]') ?? node.parentElement;\n if (!scope) return;\n\n const candidates = Array.from(scope.querySelectorAll<HTMLElement>(focusable)).filter(\n (element) => !node.contains(element) && !element.matches(\":disabled\")\n );\n const next = candidates.find((element) => node.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_FOLLOWING);\n const previous = candidates\n .filter((element) => node.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_PRECEDING)\n .pop();\n const target = next ?? previous;\n if (target) {\n target.focus();\n return;\n }\n\n /* A container is not focusable by default. It takes a tab index only for the moment focus lands on\n it, and gives the attribute back as soon as focus leaves. */\n if (!scope.hasAttribute(\"tabindex\")) {\n scope.tabIndex = -1;\n scope.addEventListener(\"blur\", () => scope.removeAttribute(\"tabindex\"), { once: true });\n }\n scope.focus();\n};\n\n/** How an alert is announced to assistive technology. `none` leaves it silent. */\nexport type AlertAnnounce = \"none\" | \"status\" | \"alert\";\n\nexport interface AlertProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"role\"> {\n children: ReactNode;\n variant?: Variant;\n /** Whether the alert has a dismiss control. */\n closeable?: boolean;\n /** The dismiss control's accessible name. Override it when the surface's language is not the default. */\n dismissLabel?: string;\n /**\n * How the alert is announced. `alert` interrupts the reader, `status` is read politely, and `none`\n * adds no live role. Danger and warning default to `alert`, and every other variant to `status`.\n */\n announce?: AlertAnnounce;\n /** Whether the alert is shown, when the application owns that state. */\n open?: boolean;\n /** Whether the alert starts shown, for one that owns its own dismissal. */\n defaultOpen?: boolean;\n /** Reports `false` when the alert is dismissed, for a controlled alert or to observe an uncontrolled one. */\n onOpenChange?: (open: boolean) => void;\n /** Fires when the alert is dismissed, before its open state changes. */\n onDismiss?: () => void;\n}\n\n/* An alert reports; it is not something the reader acts on. Its default is therefore the neutral\n soft surface, with the accent spent only on its small status mark, so an informational line never\n competes with the one priority action in the view. A semantic variant tints the whole surface,\n because there the colour carries meaning (§10). */\nexport const Alert = forwardRef<HTMLDivElement, AlertProps>(\n (\n {\n children,\n variant = \"secondary\",\n className,\n closeable = false,\n dismissLabel = \"Dismiss alert\",\n announce,\n open,\n defaultOpen = true,\n onOpenChange,\n onDismiss,\n ...props\n },\n ref\n ) => {\n const element = useRef<HTMLDivElement | null>(null);\n const [uncontrolled, setUncontrolled] = useState(defaultOpen);\n const isOpen = open ?? uncontrolled;\n const role = announce ?? (variant === \"danger\" || variant === \"warning\" ? \"alert\" : \"status\");\n\n /* The same node answers both the forwarded ref and the dismissal's focus move. */\n const setElement = (node: HTMLDivElement | null) => {\n element.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) ref.current = node;\n };\n\n if (!isOpen) return null;\n\n const dismiss = () => {\n if (element.current) focusNeighbour(element.current);\n onDismiss?.();\n if (open === undefined) setUncontrolled(false);\n onOpenChange?.(false);\n };\n\n return (\n <div\n {...props}\n ref={setElement}\n role={role === \"none\" ? undefined : role}\n className={cn(\n \"flex min-w-0 items-start gap-3 px-4 py-3.5 [overflow-wrap:anywhere]\",\n shape.control,\n tone.soft[variant],\n text.high,\n className\n )}\n >\n {/* The status mark is a **first-line** mark: an alert's copy wraps, and a mark centred on the\n whole block would drift to the middle of it. The slot takes the first line's own height,\n so the mark is centred on the line it belongs to with no offset. */}\n <span className={cn(\"flex h-6 shrink-0 items-center\")}>\n <StatusMark variant={variant} />\n </span>\n <div className={cn(\"min-w-0 flex-1\", type.body)}>{children}</div>\n {/* The dismissal is a first-line affordance too. Its 44px target is taller than the line it\n belongs to, so the negative margins give the excess back on both vertical edges, and the\n end padding is pulled back toward the surface's edge: that padding exists to make the target\n big, and it must not read as a trailing void. The mark stays where the pointer found it. */}\n {closeable && (\n <DismissButton label={dismissLabel} size=\"compact\" inRow onClick={dismiss} className={cn(\"-me-3 -my-2.5\")} />\n )}\n </div>\n );\n }\n);\n\nAlert.displayName = \"Alert\";\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;AASA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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use client';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
4
4
  import { forwardRef } from 'react';
5
5
  import { cn } from '../libs/utils.js';
@@ -9,6 +9,7 @@ import { DialogFooter } from './DialogFooter.js';
9
9
  import { DialogHeader } from './DialogHeader.js';
10
10
  import { DialogSurface } from './DialogSurface.js';
11
11
 
12
+ const AlertDialogTrigger = ({ render, ...props }) => (jsx(AlertDialog$1.Trigger, { render: render, ...props }));
12
13
  /**
13
14
  * A dialog that asks one question and requires one answer. Its interaction contract differs from
14
15
  * `Dialog`: it is always modal, an outside press never dismisses it, and Base's default focus
@@ -16,17 +17,18 @@ import { DialogSurface } from './DialogSurface.js';
16
17
  * anything. Base owns presence, focus restoration, Escape and the `alertdialog` semantics; the
17
18
  * surface, typography and shape are the same ones `Dialog` uses.
18
19
  */
19
- const AlertDialog = forwardRef(({ title, description, cancelLabel = "Cancel", confirmLabel, onConfirm, onCancel, confirmVariant = "danger", className, onOpenChange, ...rootProps }, ref) => {
20
- return (jsx(AlertDialog$1.Root, { ...rootProps, onOpenChange: (nextOpen, eventDetails) => {
20
+ const AlertDialog = forwardRef(({ title, description, cancelLabel = "Cancel", confirmLabel, onConfirm, onCancel, confirmVariant = "danger", className, onOpenChange, children, ...rootProps }, ref) => {
21
+ return (jsxs(AlertDialog$1.Root, { ...rootProps, onOpenChange: (nextOpen, eventDetails) => {
21
22
  /* Escape is a cancellation, and it is read from Base's own reason for the change rather
22
23
  than from a key handler here: one place observes the closure, so a keyboard dismissal
23
24
  and the cancel action report the same thing. */
24
25
  if (!nextOpen && eventDetails.reason === "escape-key")
25
26
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
26
27
  onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen, eventDetails);
27
- }, children: jsxs(DialogSurface, { className: cn(className), popupRef: ref, children: [jsx(DialogHeader, { children: title }), description ? jsx(DialogDescription, { children: description }) : null, jsxs(DialogFooter, { className: cn("pt-4"), children: [jsx(AlertDialog$1.Close, { render: jsx(Button, { appearance: "text", variant: "secondary", onClick: onCancel, children: cancelLabel }) }), jsx(AlertDialog$1.Close, { render: jsx(Button, { appearance: "filled", variant: confirmVariant, onClick: onConfirm, children: confirmLabel }) })] })] }) }));
28
+ }, children: [children, jsxs(DialogSurface, { className: cn(className), popupRef: ref, children: [jsx(DialogHeader, { children: title }), description ? jsx(DialogDescription, { children: description }) : null, jsxs(DialogFooter, { className: cn("pt-4"), children: [jsx(AlertDialog$1.Close, { render: jsx(Button, { appearance: "text", variant: "secondary", onClick: onCancel, children: cancelLabel }) }), jsx(AlertDialog$1.Close, { render: jsx(Button, { appearance: "filled", variant: confirmVariant, onClick: onConfirm, children: confirmLabel }) })] })] })] }));
28
29
  });
29
30
  AlertDialog.displayName = "AlertDialog";
31
+ AlertDialog.Trigger = AlertDialogTrigger;
30
32
 
31
33
  export { AlertDialog as default };
32
34
  //# sourceMappingURL=AlertDialog.js.map