@astryxdesign/core 0.4.7-canary.de6d448 → 0.4.7-canary.dfdd778

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 (250) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/dist/AppShell/AppShell.d.ts.map +1 -1
  3. package/dist/AppShell/AppShell.js +3 -2
  4. package/dist/AspectRatio/AspectRatio.d.ts +24 -0
  5. package/dist/AspectRatio/AspectRatio.d.ts.map +1 -1
  6. package/dist/AspectRatio/AspectRatio.js +23 -4
  7. package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
  8. package/dist/AvatarGroup/AvatarGroup.js +3 -2
  9. package/dist/Banner/Banner.d.ts +40 -15
  10. package/dist/Banner/Banner.d.ts.map +1 -1
  11. package/dist/Banner/Banner.js +51 -18
  12. package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
  13. package/dist/BottomSheet/BottomSheetSwitcher.js +3 -2
  14. package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
  15. package/dist/Breadcrumbs/BreadcrumbItem.js +6 -5
  16. package/dist/ButtonGroup/ButtonGroup.d.ts +5 -1
  17. package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  18. package/dist/ButtonGroup/ButtonGroup.js +26 -7
  19. package/dist/Carousel/Carousel.d.ts.map +1 -1
  20. package/dist/Carousel/Carousel.js +3 -3
  21. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  22. package/dist/Chat/ChatComposerInput.js +2 -3
  23. package/dist/Chat/ChatLayout.d.ts.map +1 -1
  24. package/dist/Chat/ChatLayout.js +3 -3
  25. package/dist/Chat/ChatTokenizedText.d.ts +2 -0
  26. package/dist/Chat/ChatTokenizedText.d.ts.map +1 -1
  27. package/dist/Chat/ChatTokenizedText.js +11 -6
  28. package/dist/Chat/useChatComposerTokens.js +1 -1
  29. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  30. package/dist/CheckboxInput/CheckboxInput.js +3 -2
  31. package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
  32. package/dist/ClickableCard/ClickableCard.js +3 -3
  33. package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
  34. package/dist/CommandPalette/CommandPaletteInput.js +3 -2
  35. package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
  36. package/dist/CommandPalette/CommandPaletteItem.js +3 -2
  37. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  38. package/dist/ContextMenu/ContextMenu.js +4 -3
  39. package/dist/DateInput/DateInput.d.ts.map +1 -1
  40. package/dist/DateInput/DateInput.js +3 -2
  41. package/dist/DateTimeInput/DateTimeInput.d.ts +21 -1
  42. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  43. package/dist/DateTimeInput/DateTimeInput.js +406 -12
  44. package/dist/DateTimeInput/index.d.ts +1 -1
  45. package/dist/DateTimeInput/index.d.ts.map +1 -1
  46. package/dist/Dialog/Dialog.d.ts.map +1 -1
  47. package/dist/Dialog/Dialog.js +41 -36
  48. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
  49. package/dist/DropdownMenu/DropdownMenuSubMenu.js +6 -5
  50. package/dist/FileInput/FileInput.d.ts.map +1 -1
  51. package/dist/FileInput/FileInput.js +3 -2
  52. package/dist/HoverCard/HoverCard.d.ts +6 -0
  53. package/dist/HoverCard/HoverCard.d.ts.map +1 -1
  54. package/dist/HoverCard/useHoverCard.d.ts +5 -0
  55. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  56. package/dist/HoverCard/useHoverCard.js +67 -25
  57. package/dist/Item/Item.d.ts.map +1 -1
  58. package/dist/Item/Item.js +4 -2
  59. package/dist/Layer/LayerDepthContext.d.ts +52 -0
  60. package/dist/Layer/LayerDepthContext.d.ts.map +1 -0
  61. package/dist/Layer/LayerDepthContext.js +66 -0
  62. package/dist/Layer/index.d.ts +3 -0
  63. package/dist/Layer/index.d.ts.map +1 -1
  64. package/dist/Layer/index.js +4 -0
  65. package/dist/Layer/layerStack.d.ts +98 -0
  66. package/dist/Layer/layerStack.d.ts.map +1 -0
  67. package/dist/Layer/layerStack.js +306 -0
  68. package/dist/Layer/useLayerDismissal.d.ts +93 -0
  69. package/dist/Layer/useLayerDismissal.d.ts.map +1 -0
  70. package/dist/Layer/useLayerDismissal.js +91 -0
  71. package/dist/Lightbox/Lightbox.d.ts +1 -0
  72. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  73. package/dist/Lightbox/Lightbox.js +103 -81
  74. package/dist/MobileNav/MobileNav.d.ts +6 -1
  75. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  76. package/dist/MobileNav/MobileNav.js +61 -36
  77. package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
  78. package/dist/NavMenu/NavHeadingMenu.js +3 -2
  79. package/dist/Outline/Outline.d.ts.map +1 -1
  80. package/dist/Outline/Outline.js +3 -2
  81. package/dist/OverflowList/OverflowList.d.ts.map +1 -1
  82. package/dist/OverflowList/OverflowList.js +3 -2
  83. package/dist/Overlay/Overlay.d.ts.map +1 -1
  84. package/dist/Overlay/Overlay.js +3 -2
  85. package/dist/Popover/usePopover.d.ts.map +1 -1
  86. package/dist/Popover/usePopover.js +20 -17
  87. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  88. package/dist/PowerSearch/PowerSearch.js +4 -5
  89. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  90. package/dist/PowerSearch/PowerSearchEditPopover.js +20 -6
  91. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  92. package/dist/Resizable/ResizeHandle.js +3 -2
  93. package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  94. package/dist/SegmentedControl/SegmentedControl.js +3 -2
  95. package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
  96. package/dist/SelectableCard/SelectableCard.js +3 -3
  97. package/dist/SideNav/SideNav.d.ts.map +1 -1
  98. package/dist/SideNav/SideNav.js +4 -3
  99. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  100. package/dist/SideNav/SideNavItem.js +4 -3
  101. package/dist/Slider/Slider.d.ts.map +1 -1
  102. package/dist/Slider/Slider.js +3 -3
  103. package/dist/Switch/Switch.d.ts.map +1 -1
  104. package/dist/Switch/Switch.js +3 -2
  105. package/dist/TabList/Tab.d.ts +15 -2
  106. package/dist/TabList/Tab.d.ts.map +1 -1
  107. package/dist/TabList/Tab.js +32 -7
  108. package/dist/TabList/TabList.d.ts +46 -7
  109. package/dist/TabList/TabList.d.ts.map +1 -1
  110. package/dist/TabList/TabList.js +353 -23
  111. package/dist/TabList/TabListContext.d.ts +11 -1
  112. package/dist/TabList/TabListContext.d.ts.map +1 -1
  113. package/dist/TabList/TabListContext.js +11 -2
  114. package/dist/TabList/index.d.ts +2 -2
  115. package/dist/TabList/index.d.ts.map +1 -1
  116. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  117. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +7 -2
  118. package/dist/TextArea/TextArea.d.ts.map +1 -1
  119. package/dist/TextArea/TextArea.js +3 -2
  120. package/dist/TextInput/TextInput.d.ts.map +1 -1
  121. package/dist/TextInput/TextInput.js +3 -2
  122. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  123. package/dist/TimeInput/TimeInput.js +3 -2
  124. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  125. package/dist/Timestamp/Timestamp.js +5 -3
  126. package/dist/Token/TokenLink.d.ts.map +1 -1
  127. package/dist/Token/TokenLink.js +2 -2
  128. package/dist/Tooltip/Tooltip.d.ts +5 -0
  129. package/dist/Tooltip/Tooltip.d.ts.map +1 -1
  130. package/dist/Tooltip/useTooltip.d.ts +5 -0
  131. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  132. package/dist/Tooltip/useTooltip.js +39 -24
  133. package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
  134. package/dist/TopNav/TopNavMegaMenu.js +3 -3
  135. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  136. package/dist/Typeahead/BaseTypeahead.js +11 -3
  137. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  138. package/dist/Typeahead/Typeahead.js +3 -2
  139. package/dist/astryx.css +21 -1
  140. package/dist/hooks/useFocusTrap.d.ts +7 -4
  141. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  142. package/dist/hooks/useFocusTrap.js +60 -95
  143. package/dist/utils/sharedResizeObserver.d.ts.map +1 -1
  144. package/dist/utils/sharedResizeObserver.js +10 -1
  145. package/locales/en.json +8 -0
  146. package/locales/pseudo.json +6 -0
  147. package/package.json +2 -2
  148. package/src/AppShell/AppShell.tsx +3 -2
  149. package/src/AspectRatio/AspectRatio.doc.mjs +6 -3
  150. package/src/AspectRatio/AspectRatio.test.tsx +57 -10
  151. package/src/AspectRatio/AspectRatio.tsx +40 -1
  152. package/src/AvatarGroup/AvatarGroup.tsx +3 -2
  153. package/src/Banner/Banner.doc.mjs +13 -11
  154. package/src/Banner/Banner.test.tsx +102 -15
  155. package/src/Banner/Banner.tsx +72 -25
  156. package/src/BottomSheet/BottomSheetSwitcher.tsx +3 -2
  157. package/src/Breadcrumbs/BreadcrumbItem.tsx +7 -4
  158. package/src/ButtonGroup/ButtonGroup.doc.mjs +10 -1
  159. package/src/ButtonGroup/ButtonGroup.test.tsx +391 -1
  160. package/src/ButtonGroup/ButtonGroup.tsx +23 -5
  161. package/src/Carousel/Carousel.tsx +3 -2
  162. package/src/Chat/ChatComposerInput.tsx +5 -1
  163. package/src/Chat/ChatLayout.tsx +3 -2
  164. package/src/Chat/ChatTokenizedText.tsx +17 -10
  165. package/src/Chat/useChatComposerTokens.ts +1 -1
  166. package/src/CheckboxInput/CheckboxInput.tsx +3 -2
  167. package/src/ClickableCard/ClickableCard.tsx +3 -2
  168. package/src/CommandPalette/CommandPaletteInput.tsx +3 -2
  169. package/src/CommandPalette/CommandPaletteItem.tsx +3 -2
  170. package/src/ContextMenu/ContextMenu.tsx +4 -3
  171. package/src/DateInput/DateInput.tsx +3 -2
  172. package/src/DateTimeInput/DateTimeInput.doc.mjs +18 -0
  173. package/src/DateTimeInput/DateTimeInput.test.tsx +1088 -0
  174. package/src/DateTimeInput/DateTimeInput.tsx +556 -24
  175. package/src/DateTimeInput/index.ts +1 -0
  176. package/src/Dialog/Dialog.test.tsx +190 -1
  177. package/src/Dialog/Dialog.tsx +37 -38
  178. package/src/DropdownMenu/DropdownMenu.doc.mjs +6 -0
  179. package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +8 -5
  180. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +8 -11
  181. package/src/Field/Field.doc.mjs +2 -2
  182. package/src/FileInput/FileInput.tsx +3 -2
  183. package/src/HoverCard/HoverCard.doc.mjs +5 -0
  184. package/src/HoverCard/HoverCard.tsx +6 -0
  185. package/src/HoverCard/useHoverCard.tsx +81 -30
  186. package/src/Item/Item.tsx +5 -4
  187. package/src/Layer/LayerDepthContext.tsx +62 -0
  188. package/src/Layer/index.ts +9 -0
  189. package/src/Layer/layerDismissalFamilies.test.tsx +359 -0
  190. package/src/Layer/layerDismissalInvariants.test.tsx +417 -0
  191. package/src/Layer/layerStack.ts +362 -0
  192. package/src/Layer/useLayerDismissal.test.tsx +469 -0
  193. package/src/Layer/useLayerDismissal.ts +173 -0
  194. package/src/Layout/Layout.doc.mjs +2 -2
  195. package/src/Lightbox/Lightbox.doc.mjs +12 -0
  196. package/src/Lightbox/Lightbox.tsx +124 -102
  197. package/src/Link/Link.doc.mjs +28 -0
  198. package/src/Markdown/Markdown.doc.mjs +5 -0
  199. package/src/Markdown/parser.perf.test.ts +37 -5
  200. package/src/MobileNav/MobileNav.tsx +62 -36
  201. package/src/MultiSelector/MultiSelector.doc.mjs +17 -0
  202. package/src/MultiSelector/MultiSelector.test.tsx +1 -0
  203. package/src/NavMenu/NavHeadingMenu.tsx +3 -2
  204. package/src/Outline/Outline.tsx +3 -2
  205. package/src/OverflowList/OverflowList.tsx +3 -2
  206. package/src/Overlay/Overlay.tsx +3 -2
  207. package/src/Popover/usePopover.tsx +31 -28
  208. package/src/PowerSearch/PowerSearch.doc.mjs +16 -0
  209. package/src/PowerSearch/PowerSearch.tsx +11 -3
  210. package/src/PowerSearch/PowerSearchEditPopover.test.tsx +201 -0
  211. package/src/PowerSearch/PowerSearchEditPopover.tsx +17 -2
  212. package/src/Resizable/ResizeHandle.tsx +3 -2
  213. package/src/SegmentedControl/SegmentedControl.tsx +3 -2
  214. package/src/SelectableCard/SelectableCard.tsx +3 -2
  215. package/src/Selector/Selector.doc.mjs +1 -1
  216. package/src/Selector/Selector.test.tsx +24 -1
  217. package/src/SideNav/SideNav.doc.mjs +6 -6
  218. package/src/SideNav/SideNav.tsx +4 -2
  219. package/src/SideNav/SideNavItem.tsx +4 -2
  220. package/src/Slider/Slider.tsx +3 -2
  221. package/src/Switch/Switch.tsx +3 -2
  222. package/src/TabList/Tab.doc.mjs +13 -1
  223. package/src/TabList/Tab.tsx +67 -7
  224. package/src/TabList/TabList.doc.mjs +22 -6
  225. package/src/TabList/TabList.test.tsx +559 -0
  226. package/src/TabList/TabList.tsx +490 -22
  227. package/src/TabList/TabListContext.ts +13 -2
  228. package/src/TabList/index.ts +6 -2
  229. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +9 -2
  230. package/src/TextArea/TextArea.tsx +3 -2
  231. package/src/TextInput/TextInput.tsx +3 -2
  232. package/src/Thumbnail/Thumbnail.doc.mjs +1 -1
  233. package/src/TimeInput/TimeInput.tsx +2 -2
  234. package/src/Timestamp/Timestamp.tsx +4 -2
  235. package/src/Token/TokenLink.tsx +2 -2
  236. package/src/Tokenizer/Tokenizer.doc.mjs +6 -0
  237. package/src/Tooltip/Tooltip.doc.mjs +5 -0
  238. package/src/Tooltip/Tooltip.test.tsx +32 -0
  239. package/src/Tooltip/Tooltip.tsx +5 -0
  240. package/src/Tooltip/useTooltip.tsx +47 -24
  241. package/src/TopNav/TopNavMegaMenu.tsx +3 -2
  242. package/src/Typeahead/BaseTypeahead.tsx +11 -2
  243. package/src/Typeahead/Typeahead.doc.mjs +5 -0
  244. package/src/Typeahead/Typeahead.test.tsx +49 -0
  245. package/src/Typeahead/Typeahead.tsx +3 -2
  246. package/src/hooks/useContainerReveal.doc.mjs +2 -2
  247. package/src/hooks/useFocusTrap.test.tsx +14 -0
  248. package/src/hooks/useFocusTrap.ts +62 -111
  249. package/src/hooks/useFocusTrapEscapeShim.test.tsx +165 -0
  250. package/src/utils/sharedResizeObserver.ts +10 -2
package/CHANGELOG.md CHANGED
@@ -13,6 +13,7 @@
13
13
  **The exit ran on the entrance's curve.** `--ease-standard` is `cubic-bezier(0.24, 1, 0.4, 1)`, a decelerate curve: it spends its speed immediately and coasts. Right for an entrance, wrong for an exit. Measured on device (iPhone, real Safari), a scrim tap put the sheet half off-screen in 59ms of the 410ms transition and 90% off in 163ms, with the dim gone before it — so the close was over before the eye could follow it. The closing state now carries an accelerating curve of its own, `cubic-bezier(0.3, 0, 0.6, 0.6)`: away from rest, gathering speed, quickest as it leaves the screen, and moving within ~50ms so it reads as one departure rather than a hesitation and a snap. Only the curve changes — the exit keeps `--duration-medium`, the entrance's band, which is what keeps it legible under a theme that scales the motion scale down (neutral's medium is 300ms against the base 410ms).
14
14
 
15
15
  The scrim leaves with the sheet: while closing, the dim runs `linear` rather than the decelerate token. A fade covers no distance, so front-loading its progress just ends it early — the reasoning the touch date picker's surface swap already carries. `BottomSheetSwitcher` gets the same treatment when its flow closes; a handoff between two sheets is not a close and is unchanged.
16
+
16
17
  - `useListFocus` no longer swallows Escape when no `onEscape` was supplied. The hook called `preventDefault()` on every Escape — a habit inherited from the arrow keys, which share the handler and need it to suppress page scroll — so a list with nothing to dismiss still marked the key handled, and a surrounding layer that defers to `defaultPrevented` (a focus trap, a native popover) never got its turn. Escape is now consumed only when an `onEscape` is passed. Arrow, Home and End handling is unchanged (#5346).
17
18
  Behaviour change: `AvatarGroup`, `ButtonGroup`, `Outline`, `Pagination`, `SegmentedControl`, `TabList` and `Toolbar` pass no `onEscape`, so an Escape pressed inside one of them now reaches the surrounding layer and can dismiss it — the point of the fix, but a host that counted on the key stopping there will notice. `NavHeadingMenu` does the same when it renders without a menu close handler. Menus and flyouts that do pass `onEscape` are unaffected. `patch`, not `[breaking]`: the swallowing was never a contract — the hook documented Escape only as "custom callback", and no component advertised consuming the key.
18
19
  - TabList: the selected tab now carries `aria-current="true"` — ARIA's generic "current item within a set" — instead of `aria-current="page"`. The strip is a `<nav>` and stays one, but it is used to switch views in place at least as often as it is used to navigate, and on those uses `page` asserted a page change that never happened. Assistive tech announced the selected tab as the _current page_ even when nothing had navigated; it now announces it as the _current item_, which is true either way. A tab given an `href` still renders an anchor and still reads as a link — its current marker is just less specific than it was. No role changes and no new props. (#5347)
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAmBf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AA8BhD;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE7D;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE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;IAE7B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,eAAe,GAAG,SAAS,CAAC;IAEhD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AA2KD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAoB,EACpB,MAAM,EACN,QAAQ,EACR,cAAc,EACd,aAAa,EAAE,UAAU,EACzB,MAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,qBA6Yf;yBA5Ze,QAAQ"}
@@ -33,12 +33,13 @@ import { SideNavRenderContext } from "../SideNav/SideNavRenderContext.js";
33
33
  import { TopNavRenderContext } from "../TopNav/TopNavRenderContext.js";
34
34
  import { TopNavMobileContentContext } from "../TopNav/TopNavMobileContentContext.js";
35
35
  import { AppShellMobileContext } from "./AppShellMobileContext.js";
36
- import { mergeProps, mergeRefs, isRenderable } from "../utils/index.js";
36
+ import { mergeProps, isRenderable } from "../utils/index.js";
37
37
  import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
38
38
  import { useMediaQuery } from "../hooks/useMediaQuery.js";
39
39
  import { observeResize, unobserveResize } from "../utils/sharedResizeObserver.js";
40
40
  import { themeProps } from "../utils/themeProps.js";
41
41
  import { useTranslator } from "../i18n/index.js";
42
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
42
43
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
43
44
  const HasActivity = typeof React.Activity !== 'undefined';
44
45
  const ActivityWrapper = HasActivity ? ({
@@ -493,7 +494,7 @@ export function AppShell({
493
494
  value: mobileContextValue,
494
495
  children: /*#__PURE__*/_jsxs("div", {
495
496
  ...rest,
496
- ref: mergeRefs(ref, shellRef),
497
+ ref: useMergedRefs(ref, shellRef),
497
498
  "data-testid": dataTestId,
498
499
  ...mergeProps(themeProps('app-shell', {
499
500
  variant
@@ -34,6 +34,25 @@ export interface AspectRatioProps extends BaseProps<HTMLDivElement> {
34
34
  ref?: React.Ref<HTMLDivElement>;
35
35
  /**
36
36
  * The aspect ratio as width/height (e.g., 16/9 = 1.777..., 4/3 = 1.333..., 1 for square).
37
+ *
38
+ * The ratio is emitted as a class-level declaration — never an inline
39
+ * style — so it can be made responsive:
40
+ * - StyleX consumers pass an `aspect-ratio` rule via `xstyle`, including
41
+ * under `@media`/`@container` conditions.
42
+ * - Plain-CSS/Tailwind consumers override `aspect-ratio` from their own
43
+ * (unlayered) rules: the compiled component styles live in the
44
+ * `astryx-base` cascade layer, and unlayered CSS wins over layered
45
+ * rules regardless of specificity.
46
+ *
47
+ * @example
48
+ * ```
49
+ * // 3:1 hero that becomes 3:2 when its container stacks
50
+ * <AspectRatio ratio={3 / 1} className="gallery-hero">…</AspectRatio>
51
+ *
52
+ * // CSS: @container gallery (max-width: 720px) {
53
+ * // .gallery-hero { aspect-ratio: 3 / 2; }
54
+ * // }
55
+ * ```
37
56
  */
38
57
  ratio: number;
39
58
  /**
@@ -102,6 +121,11 @@ export interface AspectRatioProps extends BaseProps<HTMLDivElement> {
102
121
  * `ratio={1}` or an oval at other ratios. Both shapes respect the provided
103
122
  * `ratio`.
104
123
  *
124
+ * The ratio is a class-level declaration (not an inline style), so it can be
125
+ * overridden responsively — via `xstyle` for StyleX consumers, or with a
126
+ * plain unlayered `aspect-ratio` rule for plain-CSS consumers (component
127
+ * styles live in the `astryx-base` cascade layer, which unlayered CSS beats).
128
+ *
105
129
  * Sizing: the box takes its width from its container and derives its height
106
130
  * from the ratio, so it needs an ancestor with a definite width. Two
107
131
  * consequences are worth knowing. Constraining only the height (`height` or
@@ -1 +1 @@
1
- {"version":3,"file":"AspectRatio.d.ts","sourceRoot":"","sources":["../../src/AspectRatio/AspectRatio.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAErC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAI5C;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACjE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,GAAG,CAAC,EAAE,cAAc,CAAC;IAErB;;;;;;;OAOG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAkCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAmB,EACnB,GAAG,EACH,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,+BA2BlB;yBArCe,WAAW"}
1
+ {"version":3,"file":"AspectRatio.d.ts","sourceRoot":"","sources":["../../src/AspectRatio/AspectRatio.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAErC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAI5C;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACjE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,GAAG,CAAC,EAAE,cAAc,CAAC;IAErB;;;;;;;OAOG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAgDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAmB,EACnB,GAAG,EACH,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,+BA4BlB;yBAtCe,WAAW"}
@@ -49,6 +49,23 @@ const styles = {
49
49
  }
50
50
  };
51
51
 
52
+ // The ratio compiles to a CSS variable + a class-level declaration
53
+ // (aspect-ratio: var(--x)) instead of a raw inline style, so consumer
54
+ // overrides — `xstyle` rules, including ones inside @media/@container
55
+ // queries — can still win. A raw inline `aspect-ratio` would beat any class
56
+ // (same rationale as Grid's dynamic track values). Non-StyleX consumers
57
+ // don't need a dedicated hook: the compiled declaration sits in the
58
+ // `astryx-base` cascade layer, so any unlayered consumer rule wins
59
+ // regardless of specificity.
60
+ const dynamicStyles = {
61
+ ratio: ratio => [{
62
+ kOBAk4: ratio != null ? "x10y9f9r" : ratio,
63
+ $$css: true
64
+ }, {
65
+ "--x-aspectRatio": ratio != null ? ratio : undefined
66
+ }]
67
+ };
68
+
52
69
  /**
53
70
  * AspectRatio component for maintaining a specific aspect ratio for its children.
54
71
  *
@@ -64,6 +81,11 @@ const styles = {
64
81
  * `ratio={1}` or an oval at other ratios. Both shapes respect the provided
65
82
  * `ratio`.
66
83
  *
84
+ * The ratio is a class-level declaration (not an inline style), so it can be
85
+ * overridden responsively — via `xstyle` for StyleX consumers, or with a
86
+ * plain unlayered `aspect-ratio` rule for plain-CSS consumers (component
87
+ * styles live in the `astryx-base` cascade layer, which unlayered CSS beats).
88
+ *
67
89
  * Sizing: the box takes its width from its container and derives its height
68
90
  * from the ratio, so it needs an ancestor with a definite width. Two
69
91
  * consequences are worth knowing. Constraining only the height (`height` or
@@ -102,10 +124,7 @@ export function AspectRatio({
102
124
  ref: ref,
103
125
  ...mergeProps(themeProps('aspect-ratio', {
104
126
  shape
105
- }), stylex.props(styles.container, shape === 'ellipse' && styles.ellipse, xstyle), className, {
106
- ...style,
107
- aspectRatio: ratio
108
- }),
127
+ }), stylex.props(styles.container, dynamicStyles.ratio(ratio), shape === 'ellipse' && styles.ellipse, xstyle), className, style),
109
128
  ...props,
110
129
  children: /*#__PURE__*/_jsx("div", {
111
130
  "data-astryx-aspect-ratio-override": fit,
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAA2B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAc,KAAK,UAAU,EAAC,MAAM,WAAW,CAAC;AAavD,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACjE,yCAAyC;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAA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O,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,SAAS,CAmE9B;yBAhFe,WAAW"}
@@ -26,7 +26,7 @@
26
26
  import { useId, useMemo, useState } from 'react';
27
27
  import { resolveSize } from "../Avatar/index.js";
28
28
  import * as stylex from '@stylexjs/stylex';
29
- import { mergeProps, mergeRefs } from "../utils/index.js";
29
+ import { mergeProps } from "../utils/index.js";
30
30
  import { composeEventHandlers } from "../utils/composeEventHandlers.js";
31
31
  import { AvatarGroupContext } from "./AvatarGroupContext.js";
32
32
  import { themeProps } from "../utils/themeProps.js";
@@ -34,6 +34,7 @@ import { useTranslator } from "../i18n/index.js";
34
34
  import { useListFocus } from "../hooks/useListFocus.js";
35
35
  import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
36
36
  import { VisuallyHidden } from "../VisuallyHidden/index.js";
37
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
37
38
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
38
39
  const OVERLAP_RATIO = 0.25;
39
40
  const styles = {
@@ -118,7 +119,7 @@ export function AvatarGroup({
118
119
  value: contextValue,
119
120
  children: /*#__PURE__*/_jsxs("div", {
120
121
  ...props,
121
- ref: mergeRefs(ref, listRef),
122
+ ref: useMergedRefs(ref, listRef),
122
123
  role: "group",
123
124
  "aria-label": ariaLabel,
124
125
  "aria-describedby": describedBy,
@@ -1,19 +1,23 @@
1
1
  /**
2
2
  * @file Banner.tsx
3
- * @input Uses React useState/useRef/useId, Button, Icon (with registry string names), StyleX
3
+ * @input Uses React useState/useRef/useId, useCollapsible, Button, Icon (with registry string names), StyleX
4
4
  * @output Exports Banner component, BannerProps, BannerStatus, BannerContainer types
5
5
  * @position Core implementation; consumed by index.ts, tested by Banner.test.tsx
6
6
  *
7
7
  * Visual structure:
8
8
  * - Root container: layout-only wrapper (flex column), no visual styling, no theme target
9
9
  * - Header area (themeProps 'banner'): colored status background with icon, title, description, actions, dismiss
10
- * - Content area (themeProps 'banner-content'): collapsible card background for additional content (children)
10
+ * - Content area (themeProps 'banner-content'): card background for additional content (children)
11
11
  * - Status icon (themeProps 'banner-icon'): the target rides on the default
12
12
  * <Icon> itself — the element that paints — so 'status:X' overrides reach
13
13
  * the glyph (#4166); for a custom `icon` node it stays on the layout wrapper
14
14
  * - No left border accent — color is expressed through the full header background
15
15
  * - Each visual area owns its own border-radius (no overflow:clip on the container)
16
- * - When children are provided, a collapse/expand toggle button appears in the end area
16
+ * - Children are collapsible by default: a toggle appears in the header end
17
+ * area and the content starts closed. `collapsible={false}` opts out and
18
+ * pins the content open with no toggle. The whole collapse axis (enabled /
19
+ * default / controlled) lives on that one prop and is driven by the shared
20
+ * `useCollapsible` hook rather than local state.
17
21
  *
18
22
  * A status added through `BannerStatusMap` augmentation has no entry in the
19
23
  * status lookups, so it renders with no status fill, no default glyph and the
@@ -35,6 +39,7 @@
35
39
  */
36
40
  import { type ReactNode } from 'react';
37
41
  import type { BaseProps } from '../BaseProps';
42
+ import type { CollapsibleConfig } from '../Collapsible/useCollapsible';
38
43
  import type { Elevation } from '../utils/types';
39
44
  import type { BannerStatusMap, BannerContainerMap } from './index';
40
45
  /**
@@ -109,15 +114,29 @@ export interface BannerProps extends BaseProps<HTMLDivElement> {
109
114
  */
110
115
  elevation?: Elevation;
111
116
  /**
112
- * Whether the content area (children) starts expanded.
113
- * Only relevant when children are provided.
114
- * @default false
117
+ * Whether the content area (children) sits behind an expand/collapse toggle
118
+ * in the header. On by default, so a banner with children behaves as it
119
+ * always has.
120
+ *
121
+ * - omitted / `true` — collapsible, starts collapsed
122
+ * - `{defaultIsOpen: true}` — collapsible, starts open
123
+ * - `{isOpen, onOpenChange}` — controlled by the consumer
124
+ * - `false` — not collapsible: children are always visible, with no toggle,
125
+ * no `aria-expanded`, and a content region that stays mounted
126
+ *
127
+ * Takes the shared `CollapsibleConfig` so a banner's disclosure is
128
+ * configured exactly like `Collapsible`'s, rather than through a
129
+ * Banner-only vocabulary. Banner's default differs from the hook's on one
130
+ * point — it starts closed, not open — because a banner's message lives in
131
+ * its header and the content is supplementary.
132
+ *
133
+ * @default true
115
134
  */
116
- defaultIsExpanded?: boolean;
135
+ collapsible?: boolean | CollapsibleConfig;
117
136
  /**
118
- * Extra content rendered below the header in a collapsible card-background area.
137
+ * Extra content rendered below the header in a card-background area.
119
138
  * Use for rich content like lists, links, or detailed information.
120
- * When provided, a collapse/expand toggle button appears in the header.
139
+ * Collapsed behind a toggle unless `collapsible={false}`.
121
140
  */
122
141
  children?: ReactNode;
123
142
  }
@@ -126,11 +145,12 @@ export interface BannerProps extends BaseProps<HTMLDivElement> {
126
145
  *
127
146
  * Two-part visual structure:
128
147
  * - Header: colored status background with icon, title, description, and actions
129
- * - Content (optional): collapsible card background area for additional rich content
148
+ * - Content (optional): card background area for additional rich content
130
149
  *
131
- * When children are provided, a collapse/expand chevron button appears in the
132
- * header end area (to the left of the dismiss button if present). Clicking it
133
- * toggles the visibility of the content area.
150
+ * When children are provided, a chevron toggle appears in the header end area
151
+ * (to the left of the dismiss button if present) and the content starts
152
+ * collapsed. Pass `collapsible={false}` for content that is always visible,
153
+ * or a config object to change the initial state or control it.
134
154
  *
135
155
  * Manages its own dismissed state internally — the banner hides on dismiss
136
156
  * even if `onDismiss` is not provided, so product teams don't need to wire
@@ -161,12 +181,17 @@ export interface BannerProps extends BaseProps<HTMLDivElement> {
161
181
  * <Banner
162
182
  * status="warning"
163
183
  * title="Configuration changes"
164
- * defaultIsExpanded>
184
+ * collapsible={{defaultIsOpen: true}}>
165
185
  * <p>Details here...</p>
166
186
  * </Banner>
187
+ * <Banner status="error" title="3 fields need attention" collapsible={false}>
188
+ * <ul>
189
+ * <li>Email address is invalid</li>
190
+ * </ul>
191
+ * </Banner>
167
192
  * ```
168
193
  */
169
- export declare function Banner({ status, title, description, icon, isDismissable, onDismiss, endContent, container, elevation, defaultIsExpanded, children, xstyle, className, style, ref, onFocusCapture, onPointerDownCapture, ...rest }: BannerProps): import("react").JSX.Element | null;
194
+ export declare function Banner({ status, title, description, icon, isDismissable, onDismiss, endContent, container, elevation, collapsible, children, xstyle, className, style, ref, onFocusCapture, onPointerDownCapture, ...rest }: BannerProps): import("react").JSX.Element | null;
170
195
  export declare namespace Banner {
171
196
  var displayName: string;
172
197
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAA0B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAgB5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAI9C,OAAO,KAAK,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAMjE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC5D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;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GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmND;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,aAAqB,EACrB,SAAS,EACT,UAAU,EACV,SAAkB,EAClB,SAAkB,EAClB,WAAkB,EAClB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,cAAc,EACd,oBAAoB,EACpB,GAAG,IAAI,EACR,EAAE,WAAW,sCAoOb;yBAvPe,MAAM"}
@@ -4,20 +4,24 @@
4
4
 
5
5
  /**
6
6
  * @file Banner.tsx
7
- * @input Uses React useState/useRef/useId, Button, Icon (with registry string names), StyleX
7
+ * @input Uses React useState/useRef/useId, useCollapsible, Button, Icon (with registry string names), StyleX
8
8
  * @output Exports Banner component, BannerProps, BannerStatus, BannerContainer types
9
9
  * @position Core implementation; consumed by index.ts, tested by Banner.test.tsx
10
10
  *
11
11
  * Visual structure:
12
12
  * - Root container: layout-only wrapper (flex column), no visual styling, no theme target
13
13
  * - Header area (themeProps 'banner'): colored status background with icon, title, description, actions, dismiss
14
- * - Content area (themeProps 'banner-content'): collapsible card background for additional content (children)
14
+ * - Content area (themeProps 'banner-content'): card background for additional content (children)
15
15
  * - Status icon (themeProps 'banner-icon'): the target rides on the default
16
16
  * <Icon> itself — the element that paints — so 'status:X' overrides reach
17
17
  * the glyph (#4166); for a custom `icon` node it stays on the layout wrapper
18
18
  * - No left border accent — color is expressed through the full header background
19
19
  * - Each visual area owns its own border-radius (no overflow:clip on the container)
20
- * - When children are provided, a collapse/expand toggle button appears in the end area
20
+ * - Children are collapsible by default: a toggle appears in the header end
21
+ * area and the content starts closed. `collapsible={false}` opts out and
22
+ * pins the content open with no toggle. The whole collapse axis (enabled /
23
+ * default / controlled) lives on that one prop and is driven by the shared
24
+ * `useCollapsible` hook rather than local state.
21
25
  *
22
26
  * A status added through `BannerStatusMap` augmentation has no entry in the
23
27
  * status lookups, so it renders with no status fill, no default glyph and the
@@ -43,6 +47,7 @@ import { Button } from "../Button/index.js";
43
47
  import { Icon } from "../Icon/index.js";
44
48
  import "../theme/tokens.stylex.js";
45
49
  import { colorVars, spacingVars, radiusVars, fontWeightVars, typeScaleVars, borderVars, durationVars, easeVars, shadowVars } from "../theme/tokens.stylex.js";
50
+ import { useCollapsible } from "../Collapsible/useCollapsible.js";
46
51
  import { composeEventHandlers, isRenderable, mergeProps } from "../utils/index.js";
47
52
  import { edgeCompSlot } from "../Layout/edgeCompensation.stylex.js";
48
53
  import { themeProps } from "../utils/themeProps.js";
@@ -221,11 +226,12 @@ const elevationStyles = {
221
226
  *
222
227
  * Two-part visual structure:
223
228
  * - Header: colored status background with icon, title, description, and actions
224
- * - Content (optional): collapsible card background area for additional rich content
229
+ * - Content (optional): card background area for additional rich content
225
230
  *
226
- * When children are provided, a collapse/expand chevron button appears in the
227
- * header end area (to the left of the dismiss button if present). Clicking it
228
- * toggles the visibility of the content area.
231
+ * When children are provided, a chevron toggle appears in the header end area
232
+ * (to the left of the dismiss button if present) and the content starts
233
+ * collapsed. Pass `collapsible={false}` for content that is always visible,
234
+ * or a config object to change the initial state or control it.
229
235
  *
230
236
  * Manages its own dismissed state internally — the banner hides on dismiss
231
237
  * even if `onDismiss` is not provided, so product teams don't need to wire
@@ -256,9 +262,14 @@ const elevationStyles = {
256
262
  * <Banner
257
263
  * status="warning"
258
264
  * title="Configuration changes"
259
- * defaultIsExpanded>
265
+ * collapsible={{defaultIsOpen: true}}>
260
266
  * <p>Details here...</p>
261
267
  * </Banner>
268
+ * <Banner status="error" title="3 fields need attention" collapsible={false}>
269
+ * <ul>
270
+ * <li>Email address is invalid</li>
271
+ * </ul>
272
+ * </Banner>
262
273
  * ```
263
274
  */
264
275
  export function Banner({
@@ -271,7 +282,7 @@ export function Banner({
271
282
  endContent,
272
283
  container = 'card',
273
284
  elevation = 'none',
274
- defaultIsExpanded = false,
285
+ collapsible = true,
275
286
  children,
276
287
  xstyle,
277
288
  className,
@@ -283,7 +294,25 @@ export function Banner({
283
294
  }) {
284
295
  const t = useTranslator();
285
296
  const [isDismissed, setIsDismissed] = useState(false);
286
- const [isExpanded, setIsExpanded] = useState(defaultIsExpanded);
297
+ // The disclosure state machine is the shared one — Banner owns no collapse
298
+ // state of its own. `collapsible={false}` disables it, and that is what
299
+ // makes the content permanently visible.
300
+ //
301
+ // The one place Banner departs from the hook's defaults: `useCollapsible`
302
+ // opens by default, a banner starts closed. Its header already carries the
303
+ // message, so the content is supplementary — and this is the behaviour
304
+ // Banner has always had.
305
+ const collapsibleConfig = collapsible != null && typeof collapsible === 'object' ? collapsible : {};
306
+ const {
307
+ isEnabled: isCollapsible,
308
+ isOpen: isExpanded,
309
+ toggle: handleToggleExpand
310
+ } = useCollapsible({
311
+ isCollapsible: collapsible !== false && {
312
+ ...collapsibleConfig,
313
+ defaultIsOpen: collapsibleConfig.defaultIsOpen ?? false
314
+ }
315
+ });
287
316
  // The element focus came from before it entered the banner. Dismissing
288
317
  // unmounts the whole banner, dismiss button included, so without a handoff
289
318
  // the browser drops focus to <body> and a keyboard user loses their place.
@@ -292,7 +321,8 @@ export function Banner({
292
321
  // Links the expand/collapse toggle to the content region it shows/hides so
293
322
  // assistive tech can move from the button to its controlled content
294
323
  // (disclosure pattern). The region is conditionally rendered, so aria-controls
295
- // below is set only while it's mounted to avoid a dangling reference.
324
+ // below is set only while it's mounted to avoid a dangling reference. A
325
+ // non-collapsible banner has no toggle, so neither end of the link is used.
296
326
  const contentId = useId();
297
327
  const defaultIconName = defaultIconNames[status];
298
328
  const role = statusRole[status] ?? FALLBACK_ROLE;
@@ -325,17 +355,20 @@ export function Banner({
325
355
  origin.focus();
326
356
  }
327
357
  };
328
- const handleToggleExpand = () => {
329
- setIsExpanded(prev => !prev);
330
- };
331
358
 
359
+ // The toggle exists only for a collapsible banner that actually has content
360
+ // to disclose.
361
+ const hasToggle = isCollapsible && hasChildren;
332
362
  // Show the end area if there are actions, dismiss, or a collapsible toggle
333
- const showEndArea = isRenderable(endContent) || isDismissable || hasChildren;
363
+ const showEndArea = isRenderable(endContent) || isDismissable || hasToggle;
334
364
  // Center items vertically when there's only a title (no description)
335
365
  // and the banner has action buttons
336
366
  const hasActions = isRenderable(endContent) || isDismissable;
337
367
  const isSingleLine = !isRenderable(description) && hasActions;
338
- const showContent = hasChildren && isExpanded;
368
+
369
+ // Non-collapsible children are always shown; collapsible ones follow the
370
+ // hook's open state.
371
+ const showContent = hasChildren && (!isCollapsible || isExpanded);
339
372
  const isCard = container === 'card';
340
373
  return /*#__PURE__*/_jsxs("div", {
341
374
  ref: ref,
@@ -394,7 +427,7 @@ export function Banner({
394
427
  })]
395
428
  }), showEndArea && /*#__PURE__*/_jsxs("div", {
396
429
  ...stylex.props(styles.endArea, edgeCompSlot.inset(spacingVars['--spacing-2'])),
397
- children: [endContent, hasChildren && /*#__PURE__*/_jsx(Button, {
430
+ children: [endContent, hasToggle && /*#__PURE__*/_jsx(Button, {
398
431
  variant: "ghost",
399
432
  size: "sm",
400
433
  label: isExpanded ? t('@astryx.banner.collapse') : t('@astryx.banner.expand'),
@@ -424,7 +457,7 @@ export function Banner({
424
457
  })]
425
458
  })]
426
459
  }), showContent && /*#__PURE__*/_jsx("div", {
427
- id: contentId,
460
+ id: hasToggle ? contentId : undefined,
428
461
  ...mergeProps(themeProps('banner-content', {
429
462
  container,
430
463
  status
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetSwitcher.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheetSwitcher.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAQL,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAoI5C,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC5E,iDAAiD;IACjD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAEnC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;;;OAKG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,iEAAiE;IACjE,mBAAmB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEtD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,0DAA0D;IAC1D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,mBAAmB,EACnB,QAAe,EACf,QAAQ,EACR,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,+BA+Z1B;yBA5ae,mBAAmB"}
1
+ {"version":3,"file":"BottomSheetSwitcher.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheetSwitcher.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAQL,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAqI5C,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC5E,iDAAiD;IACjD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAEnC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;;;OAKG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,iEAAiE;IACjE,mBAAmB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEtD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,0DAA0D;IAC1D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,mBAAmB,EACnB,QAAe,EACf,QAAQ,EACR,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,+BA+Z1B;yBA5ae,mBAAmB"}
@@ -34,9 +34,10 @@ import * as stylex from '@stylexjs/stylex';
34
34
  import "../theme/tokens.stylex.js";
35
35
  import { colorVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
36
36
  import { hasActiveFocusTrapEscape, isImeKeyEvent, useFocusTrap, useScrollLock } from "../hooks/index.js";
37
- import { composeEventHandlers, mergeProps, mergeRefs } from "../utils/index.js";
37
+ import { composeEventHandlers, mergeProps } from "../utils/index.js";
38
38
  import { BottomSheetEdgeTint } from "./BottomSheetEdgeTint.js";
39
39
  import { BottomSheetSwitcherContext } from "./BottomSheetSwitcherContext.js";
40
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
40
41
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
41
42
  const styles = {
42
43
  dialog: {
@@ -400,7 +401,7 @@ export function BottomSheetSwitcher({
400
401
  children: /*#__PURE__*/_jsxs("dialog", {
401
402
  ...props,
402
403
  ...dialogPresentationProps,
403
- ref: mergeRefs(ref, dialogRef, containerRef),
404
+ ref: useMergedRefs(ref, dialogRef, containerRef),
404
405
  "aria-label": ariaLabel,
405
406
  "aria-modal": isModal ? 'true' : undefined,
406
407
  onCancel: composeEventHandlers(onCancel, handleCancel),
@@ -1 +1 @@
1
- {"version":3,"file":"BreadcrumbItem.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/BreadcrumbItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAS5C,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,8BAA8B,CAAC;AAMrE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,SAAS,CAAC,aAAa,CAAC,EACxB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;OAIG;IACH,EAAE,CAA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C/C,SAAS,CAAC,aAAa,CAAC,EACxB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAyHD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,EAAE,aAAa,EACxB,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,mBAAmB,qBAsMrB;yBArNe,cAAc"}
@@ -27,7 +27,7 @@ import "../theme/tokens.stylex.js";
27
27
  import { colorVars, spacingVars, typeScaleVars, radiusVars, fontWeightVars } from "../theme/tokens.stylex.js";
28
28
  import { BreadcrumbContext } from "./Breadcrumbs.js";
29
29
  import { useLinkComponent } from "../Link/useLinkComponent.js";
30
- import { mergeProps, mergeRefs } from "../utils/index.js";
30
+ import { mergeProps } from "../utils/index.js";
31
31
  import { themeProps } from "../utils/themeProps.js";
32
32
  import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
33
33
  import { Icon } from "../Icon/index.js";
@@ -38,7 +38,7 @@ import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
38
38
  import { renderDropdownItems } from "../DropdownMenu/renderDropdownItems.js";
39
39
  import { DropdownMenuContext } from "../DropdownMenu/DropdownMenuContext.js";
40
40
  import { MENU_ITEM_ROLES, MENU_ITEM_SELECTOR, MENU_BOUNDARY_SELECTOR } from "../DropdownMenu/menuItemRoles.js";
41
-
41
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
42
42
  // =============================================================================
43
43
  // Props
44
44
  // =============================================================================
@@ -203,6 +203,7 @@ export function BreadcrumbItem({
203
203
  };
204
204
  }
205
205
  });
206
+ const mergedItemRef = useMergedRefs(ref, liRef);
206
207
  const content = /*#__PURE__*/_jsxs(_Fragment, {
207
208
  children: [startIcon && /*#__PURE__*/_jsx("span", {
208
209
  ...{
@@ -213,7 +214,7 @@ export function BreadcrumbItem({
213
214
  });
214
215
  if (isCurrent) {
215
216
  return /*#__PURE__*/_jsxs("li", {
216
- ref: mergeRefs(ref, liRef),
217
+ ref: mergedItemRef,
217
218
  ...mergeProps(themeProps('breadcrumb-item', {
218
219
  variant: ctx.variant
219
220
  }), stylex.props(itemStyles.root, isSupporting ? itemStyles.supportingSize : itemStyles.defaultSize, xstyle), className, style),
@@ -255,7 +256,7 @@ export function BreadcrumbItem({
255
256
  // Items without isCurrent set render as links (if href) or plain spans.
256
257
  // The effect handles adding aria-current for auto-last detection.
257
258
  return /*#__PURE__*/_jsxs("li", {
258
- ref: mergeRefs(ref, liRef),
259
+ ref: mergedItemRef,
259
260
  ...mergeProps(themeProps('breadcrumb-item', {
260
261
  variant: ctx.variant
261
262
  }), stylex.props(itemStyles.root, isSupporting ? itemStyles.supportingSize : itemStyles.defaultSize, xstyle), className, style),
@@ -408,7 +409,7 @@ function BreadcrumbMenuTrigger({
408
409
  const menuContent = Array.isArray(menu) ? renderDropdownItems(menu) : menu;
409
410
  return /*#__PURE__*/_jsxs(_Fragment, {
410
411
  children: [/*#__PURE__*/_jsxs("button", {
411
- ref: mergeRefs(ref, buttonRef, popover.triggerRef),
412
+ ref: useMergedRefs(ref, buttonRef, popover.triggerRef),
412
413
  type: "button",
413
414
  onClick: handleClick,
414
415
  onKeyDown: handleKeyDown,
@@ -67,6 +67,10 @@ export interface ButtonGroupProps extends BaseProps<HTMLDivElement> {
67
67
  * Children automatically detect the group via context and apply position-aware
68
68
  * styles in pure CSS.
69
69
  *
70
+ * The group is a single tab stop: arrow keys move between members along the
71
+ * orientation, Home/End jump to the ends, focus wraps, and disabled members are
72
+ * skipped (the APG roving tabindex technique, via `useListFocus`).
73
+ *
70
74
  * Members that render their own layer — a Button with a `tooltip`, or a
71
75
  * DropdownMenu — compose correctly, including as the trailing member.
72
76
  *
@@ -90,7 +94,7 @@ export interface ButtonGroupProps extends BaseProps<HTMLDivElement> {
90
94
  * </ButtonGroup>
91
95
  * ```
92
96
  */
93
- export declare function ButtonGroup({ children, label, orientation, size: sizeProp, isDisabled, elevation, xstyle, className, style, ref, 'data-testid': testId, onKeyDown, ...props }: ButtonGroupProps): ReactNode;
97
+ export declare function ButtonGroup({ children, label, orientation, size: sizeProp, isDisabled, elevation, xstyle, className, style, ref, 'data-testid': testId, onKeyDown, onFocus, ...props }: ButtonGroupProps): ReactNode;
94
98
  export declare namespace ButtonGroup {
95
99
  var displayName: string;
96
100
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AAE1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAI9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM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