@astryxdesign/core 0.4.1 → 0.4.2-canary.01592f7

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 (217) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/Avatar/Avatar.d.ts +4 -1
  3. package/dist/Avatar/Avatar.d.ts.map +1 -1
  4. package/dist/Avatar/Avatar.js +19 -23
  5. package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
  6. package/dist/AvatarGroup/AvatarGroupOverflow.js +7 -2
  7. package/dist/Button/Button.d.ts.map +1 -1
  8. package/dist/Button/Button.js +9 -7
  9. package/dist/Chat/ChatMessage.d.ts +7 -0
  10. package/dist/Chat/ChatMessage.d.ts.map +1 -1
  11. package/dist/Chat/ChatMessageBubble.d.ts +13 -1
  12. package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
  13. package/dist/Chat/ChatMessageBubble.js +19 -1
  14. package/dist/Chat/ChatTokenizedText.js +1 -1
  15. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  16. package/dist/CheckboxInput/CheckboxInput.js +5 -0
  17. package/dist/CommandPalette/CommandPaletteFooter.d.ts.map +1 -1
  18. package/dist/CommandPalette/CommandPaletteFooter.js +5 -3
  19. package/dist/ComplexSelector/ComplexSelector.d.ts +38 -4
  20. package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
  21. package/dist/ComplexSelector/ComplexSelector.js +96 -35
  22. package/dist/ComplexSelector/index.d.ts +2 -2
  23. package/dist/ComplexSelector/index.d.ts.map +1 -1
  24. package/dist/ComplexSelector/index.js +1 -1
  25. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  26. package/dist/DateTimeInput/DateTimeInput.js +2 -2
  27. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
  28. package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -15
  29. package/dist/HoverCard/HoverCard.d.ts +1 -1
  30. package/dist/HoverCard/HoverCard.d.ts.map +1 -1
  31. package/dist/HoverCard/HoverCard.js +5 -13
  32. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  33. package/dist/HoverCard/useHoverCard.js +6 -5
  34. package/dist/InputGroup/groupStyles.d.ts.map +1 -1
  35. package/dist/InputGroup/groupStyles.js +7 -2
  36. package/dist/Layer/layerHost.d.ts +24 -0
  37. package/dist/Layer/layerHost.d.ts.map +1 -0
  38. package/dist/Layer/layerHost.js +79 -0
  39. package/dist/Layer/useLayer.d.ts +14 -6
  40. package/dist/Layer/useLayer.d.ts.map +1 -1
  41. package/dist/Layer/useLayer.js +158 -30
  42. package/dist/Markdown/parser.d.ts.map +1 -1
  43. package/dist/Markdown/parser.js +55 -12
  44. package/dist/NavItem/navItemStyles.stylex.d.ts +17 -5
  45. package/dist/NavItem/navItemStyles.stylex.d.ts.map +1 -1
  46. package/dist/NavItem/navItemStyles.stylex.js +11 -5
  47. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  48. package/dist/RadioList/RadioListItem.js +5 -0
  49. package/dist/SideNav/SideNav.d.ts +7 -9
  50. package/dist/SideNav/SideNav.d.ts.map +1 -1
  51. package/dist/SideNav/SideNav.js +32 -5
  52. package/dist/SideNav/SideNavCollapseButton.d.ts +25 -9
  53. package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
  54. package/dist/SideNav/SideNavCollapseButton.js +39 -15
  55. package/dist/SideNav/SideNavCollapseContext.d.ts +21 -0
  56. package/dist/SideNav/SideNavCollapseContext.d.ts.map +1 -1
  57. package/dist/SideNav/SideNavCollapseContext.js +16 -2
  58. package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
  59. package/dist/SideNav/SideNavHeading.js +89 -32
  60. package/dist/SideNav/SideNavItem.d.ts +7 -2
  61. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  62. package/dist/SideNav/SideNavItem.js +119 -75
  63. package/dist/SideNav/SideNavSection.d.ts.map +1 -1
  64. package/dist/SideNav/SideNavSection.js +7 -16
  65. package/dist/SideNav/index.d.ts +1 -1
  66. package/dist/SideNav/index.d.ts.map +1 -1
  67. package/dist/Slider/Slider.d.ts.map +1 -1
  68. package/dist/Slider/Slider.js +56 -15
  69. package/dist/Switch/Switch.d.ts.map +1 -1
  70. package/dist/Switch/Switch.js +5 -0
  71. package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
  72. package/dist/Thumbnail/Thumbnail.js +5 -0
  73. package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
  74. package/dist/TopNav/TopNavHeading.js +14 -6
  75. package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
  76. package/dist/TopNav/TopNavMegaMenu.js +25 -93
  77. package/dist/TopNav/TopNavMegaMenuItem.js +1 -1
  78. package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
  79. package/dist/TopNav/TopNavMenu.js +10 -5
  80. package/dist/astryx.css +40 -8
  81. package/dist/astryx.umd.js +50 -50
  82. package/dist/astryx.umd.js.map +4 -4
  83. package/dist/hooks/containerReveal.stylex.d.ts +71 -4
  84. package/dist/hooks/containerReveal.stylex.d.ts.map +1 -1
  85. package/dist/hooks/containerReveal.stylex.js +57 -5
  86. package/dist/hooks/index.d.ts +2 -2
  87. package/dist/hooks/index.d.ts.map +1 -1
  88. package/dist/hooks/index.js +1 -1
  89. package/dist/hooks/useContainerReveal.d.ts +60 -3
  90. package/dist/hooks/useContainerReveal.d.ts.map +1 -1
  91. package/dist/hooks/useContainerReveal.js +27 -5
  92. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  93. package/dist/hooks/useFocusTrap.js +16 -2
  94. package/dist/hooks/useMenuHover.d.ts +50 -5
  95. package/dist/hooks/useMenuHover.d.ts.map +1 -1
  96. package/dist/hooks/useMenuHover.js +171 -51
  97. package/dist/theme/defineTheme.d.ts +16 -5
  98. package/dist/theme/defineTheme.d.ts.map +1 -1
  99. package/dist/theme/defineTheme.js +44 -48
  100. package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
  101. package/dist/theme/derivedVarRegistry.js +7 -0
  102. package/dist/theme/expandColorScale.d.ts.map +1 -1
  103. package/dist/theme/expandColorScale.js +1 -0
  104. package/dist/theme/expandMotionScale.d.ts +1 -0
  105. package/dist/theme/expandMotionScale.d.ts.map +1 -1
  106. package/dist/theme/expandMotionScale.js +1 -0
  107. package/dist/theme/expandRadiusScale.d.ts +1 -0
  108. package/dist/theme/expandRadiusScale.d.ts.map +1 -1
  109. package/dist/theme/expandRadiusScale.js +1 -0
  110. package/dist/theme/expandTypeScale.d.ts +1 -0
  111. package/dist/theme/expandTypeScale.d.ts.map +1 -1
  112. package/dist/theme/expandTypeScale.js +1 -0
  113. package/dist/theme/mergeComponents.d.ts +20 -0
  114. package/dist/theme/mergeComponents.d.ts.map +1 -0
  115. package/dist/theme/mergeComponents.js +56 -0
  116. package/dist/theme/onMediaTokens.d.ts +6 -1
  117. package/dist/theme/onMediaTokens.d.ts.map +1 -1
  118. package/dist/theme/onMediaTokens.js +11 -3
  119. package/dist/theme/tokens.stylex.d.ts +3 -1
  120. package/dist/theme/tokens.stylex.d.ts.map +1 -1
  121. package/dist/theme/tokens.stylex.js +3 -1
  122. package/locales/en.json +84 -0
  123. package/locales/pseudo.json +63 -0
  124. package/package.json +3 -3
  125. package/src/Avatar/Avatar.doc.mjs +5 -2
  126. package/src/Avatar/Avatar.test.tsx +51 -0
  127. package/src/Avatar/Avatar.tsx +30 -20
  128. package/src/AvatarGroup/AvatarGroup.doc.mjs +1 -1
  129. package/src/AvatarGroup/AvatarGroup.test.tsx +14 -0
  130. package/src/AvatarGroup/AvatarGroupOverflow.tsx +3 -2
  131. package/src/Button/Button.tsx +5 -3
  132. package/src/ButtonGroup/ButtonGroup.test.tsx +7 -4
  133. package/src/Card/Card.doc.mjs +2 -0
  134. package/src/Chat/Chat.doc.mjs +4 -1
  135. package/src/Chat/ChatMessage.doc.mjs +3 -3
  136. package/src/Chat/ChatMessage.tsx +7 -0
  137. package/src/Chat/ChatMessageBubble.doc.mjs +7 -0
  138. package/src/Chat/ChatMessageBubble.test.tsx +95 -6
  139. package/src/Chat/ChatMessageBubble.tsx +25 -0
  140. package/src/Chat/ChatTokenizedText.tsx +1 -1
  141. package/src/CheckboxInput/CheckboxInput.tsx +20 -0
  142. package/src/CodeBlock/CodeBlock.doc.mjs +3 -0
  143. package/src/CommandPalette/CommandPaletteFooter.tsx +6 -3
  144. package/src/ComplexSelector/ComplexSelector.doc.mjs +55 -6
  145. package/src/ComplexSelector/ComplexSelector.test.tsx +197 -6
  146. package/src/ComplexSelector/ComplexSelector.tsx +153 -32
  147. package/src/ComplexSelector/index.ts +3 -1
  148. package/src/DateTimeInput/DateTimeInput.tsx +4 -2
  149. package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +72 -1
  150. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +24 -20
  151. package/src/HoverCard/HoverCard.doc.mjs +3 -3
  152. package/src/HoverCard/HoverCard.test.tsx +283 -55
  153. package/src/HoverCard/HoverCard.tsx +5 -13
  154. package/src/HoverCard/useHoverCard.tsx +8 -11
  155. package/src/InputGroup/groupStyles.ts +7 -8
  156. package/src/Item/Item.doc.mjs +4 -0
  157. package/src/Layer/layerHost.test.ts +99 -0
  158. package/src/Layer/layerHost.ts +141 -0
  159. package/src/Layer/useLayer.doc.mjs +14 -4
  160. package/src/Layer/useLayer.test.tsx +332 -7
  161. package/src/Layer/useLayer.tsx +235 -36
  162. package/src/Markdown/parser.test.ts +53 -0
  163. package/src/Markdown/parser.ts +53 -12
  164. package/src/MobileNav/MobileNav.doc.mjs +7 -0
  165. package/src/NavItem/navItemStyles.stylex.ts +31 -5
  166. package/src/RadioList/RadioListItem.tsx +20 -0
  167. package/src/SideNav/SideNav.doc.mjs +13 -4
  168. package/src/SideNav/SideNav.test.tsx +858 -2
  169. package/src/SideNav/SideNav.tsx +37 -16
  170. package/src/SideNav/SideNavCollapseButton.doc.mjs +28 -6
  171. package/src/SideNav/SideNavCollapseButton.tsx +67 -15
  172. package/src/SideNav/SideNavCollapseContext.ts +29 -9
  173. package/src/SideNav/SideNavHeading.tsx +53 -25
  174. package/src/SideNav/SideNavItem.doc.mjs +13 -0
  175. package/src/SideNav/SideNavItem.tsx +97 -84
  176. package/src/SideNav/SideNavSection.tsx +6 -20
  177. package/src/SideNav/index.ts +2 -0
  178. package/src/Slider/Slider.test.tsx +69 -33
  179. package/src/Slider/Slider.tsx +65 -13
  180. package/src/Switch/Switch.tsx +20 -0
  181. package/src/TabList/TabList.doc.mjs +3 -0
  182. package/src/Text/Text.doc.mjs +1 -1
  183. package/src/Thumbnail/Thumbnail.doc.mjs +3 -0
  184. package/src/Thumbnail/Thumbnail.tsx +10 -0
  185. package/src/Timestamp/Timestamp.test.tsx +40 -22
  186. package/src/Toolbar/Toolbar.test.tsx +14 -14
  187. package/src/TopNav/TopNav.test.tsx +86 -1
  188. package/src/TopNav/TopNavHeading.tsx +21 -14
  189. package/src/TopNav/TopNavMegaMenu.test.tsx +43 -0
  190. package/src/TopNav/TopNavMegaMenu.tsx +29 -105
  191. package/src/TopNav/TopNavMegaMenuItem.tsx +1 -1
  192. package/src/TopNav/TopNavMenu.test.tsx +41 -0
  193. package/src/TopNav/TopNavMenu.tsx +14 -4
  194. package/src/TreeList/TreeList.doc.mjs +1 -0
  195. package/src/hooks/containerReveal.stylex.ts +140 -9
  196. package/src/hooks/index.ts +6 -1
  197. package/src/hooks/useContainerReveal.doc.mjs +11 -5
  198. package/src/hooks/useContainerReveal.test.tsx +70 -3
  199. package/src/hooks/useContainerReveal.ts +86 -7
  200. package/src/hooks/useFocusTrap.test.tsx +16 -0
  201. package/src/hooks/useFocusTrap.ts +20 -2
  202. package/src/hooks/useMenuHover.test.tsx +364 -0
  203. package/src/hooks/useMenuHover.ts +243 -47
  204. package/src/theme/defineTheme.test.ts +127 -0
  205. package/src/theme/defineTheme.ts +57 -51
  206. package/src/theme/derivedVarRegistry.test.ts +78 -12
  207. package/src/theme/derivedVarRegistry.ts +4 -0
  208. package/src/theme/expandColorScale.ts +1 -0
  209. package/src/theme/expandMotionScale.ts +1 -0
  210. package/src/theme/expandRadiusScale.ts +1 -0
  211. package/src/theme/expandTypeScale.ts +1 -0
  212. package/src/theme/mergeComponents.ts +59 -0
  213. package/src/theme/onMediaTokens.ts +9 -2
  214. package/src/theme/themingTargets.test.ts +152 -26
  215. package/src/theme/tokens.stylex.ts +3 -1
  216. package/src/theme/tokens.test.ts +12 -0
  217. package/src/theme/useTheme.test.tsx +18 -0
@@ -94,12 +94,11 @@ export interface ContextRenderProps {
94
94
  /**
95
95
  * HTML tag to render the popover container as.
96
96
  *
97
- * Defaults to `'div'`. Pass `'span'` when the layer must render inline-safe
98
- * markup — e.g. a `HoverCard` wrapping inline text inside a `<p>`. A `<span>`
99
- * is phrasing content, so it stays put in the DOM tree instead of being
100
- * reparented out of a paragraph by the HTML parser, which keeps server and
101
- * client markup identical. The Popover API and CSS anchor positioning work
102
- * the same on either tag.
97
+ * Defaults to `'div'`. Context layers render an inert `<template>` marker at
98
+ * the JSX position. The marker's parent is checked before the requested
99
+ * container mounts there or portals outside ancestors that cannot safely
100
+ * contain it. The marker remains available to detect a new parent if the
101
+ * render call moves. With `lazyMount`, the first check waits until `show()`.
103
102
  *
104
103
  * @default 'div'
105
104
  */
@@ -162,6 +161,15 @@ interface BaseLayerOptions {
162
161
  */
163
162
  export interface ContextLayerOptions extends BaseLayerOptions {
164
163
  mode: 'context';
164
+ /**
165
+ * Defer mounting the final layer and resolving its inline/portal position
166
+ * until `show()` is requested. Hiding unmounts it while the inert marker
167
+ * remains at the JSX position. Use this when rich content must never enter
168
+ * an unsafe ancestor, even briefly, and does not need to exist while closed.
169
+ *
170
+ * @default false
171
+ */
172
+ lazyMount?: boolean;
165
173
  }
166
174
  /**
167
175
  * Options for fixed mode (manual positioning)
@@ -1 +1 @@
1
- {"version":3,"file":"useLayer.d.ts","sourceRoot":"","sources":["../../src/Layer/useLayer.tsx"],"names":[],"mappings":"AAIA;;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AAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,kBAAkB,KAAK,SAAS,CAAC;CACxE;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,GAAG,EAAE,SAAS,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,KAAK,SAAS,CAAC;CACrE;AAmFD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,GAAE,cAAwB,EACnC,SAAS,GAAE,cAAyB,GACnC,MAAM,CAgBR;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAAC;AAC3E,wBAAgB,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAAC"}
@@ -15,10 +15,12 @@
15
15
  */
16
16
  import React, { useCallback, useEffect, useId, useRef, useState } from 'react';
17
17
  import * as stylex from '@stylexjs/stylex';
18
+ import { createPortal } from 'react-dom';
18
19
  import { addAnchorName, removeAnchorName } from "./anchorName.js";
20
+ import { resolveLayerPortalTarget } from "./layerHost.js";
19
21
  import "../theme/tokens.stylex.js";
20
- import { typographyVars } from "../theme/tokens.stylex.js";
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { typeScaleVars, typographyVars } from "../theme/tokens.stylex.js";
23
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
22
24
  const _temp = {
23
25
  keoZOQ: "x1vhfslr",
24
26
  k1K539: "xlm3tn6",
@@ -38,6 +40,8 @@ const styles = {
38
40
  ksu8eU: "xng3xce",
39
41
  kVQacm: "x1rea2x4",
40
42
  kMv6JI: "x9ynric",
43
+ kGuDYH: "xjm74w1",
44
+ kLWn49: "xw6l6zx",
41
45
  kWkggS: "xjbqb8w",
42
46
  $$css: true
43
47
  },
@@ -100,17 +104,40 @@ const styles = {
100
104
  function toCssLength(value) {
101
105
  return typeof value === 'number' ? `${value}px` : value;
102
106
  }
107
+ function readPortalWritingContext(element, portalTarget) {
108
+ const view = element.ownerDocument.defaultView;
109
+ if (!view) {
110
+ return {};
111
+ }
112
+ const sourceStyle = view.getComputedStyle(element);
113
+ const targetStyle = view.getComputedStyle(portalTarget);
114
+
115
+ // Do not snapshot custom properties here. The portal target is the closest
116
+ // safe ancestor, so theme variables continue to inherit and update there.
117
+ // These two properties can be set on the unsafe chain itself and directly
118
+ // affect the logical anchor-positioning keywords used by the layer. Only
119
+ // override values the portal would actually lose; matching values should
120
+ // keep inheriting from the target so later direction changes remain live.
121
+ return {
122
+ ...(sourceStyle.direction !== targetStyle.direction && {
123
+ direction: sourceStyle.direction
124
+ }),
125
+ ...(sourceStyle.writingMode !== targetStyle.writingMode && {
126
+ writingMode: sourceStyle.writingMode
127
+ })
128
+ };
129
+ }
103
130
 
104
131
  /**
105
132
  * Map logical placement/alignment to a CSS position-area value.
106
133
  *
107
134
  * Uses the self-* logical keyword family: the inline axis resolves against
108
- * the popover's own inherited direction (the layer renders inside the
109
- * trigger's subtree, so it inherits `direction` and mirrors in RTL with no
110
- * JS). The block axis is direction-neutral but must come from the same
111
- * keyword family — mixing physical `top` with `self-inline-*` produces an
112
- * invalid position-area (computes to `none`, which pins the popover to the
113
- * viewport corner because styles.base zeroes the UA margins).
135
+ * the popover's own direction (inherited inline or preserved when portaled),
136
+ * so it mirrors in RTL without placement-specific JS. The block axis is
137
+ * direction-neutral but must come from the same keyword family — mixing
138
+ * physical `top` with `self-inline-*` produces an invalid position-area
139
+ * (computes to `none`, which pins the popover to the viewport corner because
140
+ * styles.base zeroes the UA margins).
114
141
  *
115
142
  * Note the plain logical family (`inline-start`, no `self-`) is NOT a
116
143
  * substitute: it resolves against the containing block — the page root for
@@ -182,36 +209,101 @@ export function useLayer(options) {
182
209
  onHide,
183
210
  lightDismiss = false
184
211
  } = options;
212
+ const lazyMount = mode === 'context' ? options.lazyMount ?? false : false;
185
213
  const id = useId();
186
214
  const anchorId = `--astryx-layer-${id.replace(/:/g, '')}`;
187
215
  const [isOpen, setIsOpen] = useState(false);
188
216
  const popoverRef = useRef(null);
217
+ // The DOM element on which the current logical open state was applied.
218
+ // A portal target change replaces the popover element; retaining the old
219
+ // reference lets the ref callback recognize and reopen its replacement.
220
+ const openedPopoverRef = useRef(null);
189
221
  const triggerRef = useRef(null);
222
+ // Context layers place a persistent inert marker at their real JSX position.
223
+ // Its parent tells us whether the final layer can stay inline or needs a
224
+ // corrective portal, including after the render call moves.
225
+ const sentinelRef = useRef(null);
226
+ const contextMountRef = useRef(null);
227
+ const [contextMount, setContextMount] = useState(null);
228
+ // A show() that arrives before the final layer mounts is replayed when its
229
+ // popover ref attaches.
230
+ const pendingShowRef = useRef(false);
190
231
 
191
232
  // Ref mirrors isOpen for synchronous reads inside show/hide.
192
233
  // State drives re-renders; the ref lets the imperative calls avoid
193
234
  // stale-closure reads of the previous isOpen value.
194
235
  const isOpenRef = useRef(false);
236
+ const showPopoverElement = useCallback(popover => {
237
+ // Finding infra-4: the Popover API is unsupported on Safari <17 and
238
+ // Firefox <125. On those browsers `showPopover` does not exist, so fall
239
+ // back to plain visibility instead of throwing.
240
+ if (typeof popover.showPopover === 'function') {
241
+ // The trigger is passed as the popover's invoker `source`: a layer
242
+ // hosted away from its trigger then still takes its sequential focus
243
+ // order (and its popover nesting) from the trigger rather than from its
244
+ // own DOM position. Browsers without the option ignore it.
245
+ popover.showPopover({
246
+ source: triggerRef.current ?? undefined
247
+ });
248
+ } else {
249
+ popover.style.display = 'block';
250
+ }
251
+ openedPopoverRef.current = popover;
252
+ }, []);
253
+ const isCurrentContextPopover = useCallback(popover => {
254
+ if (mode !== 'context') {
255
+ return true;
256
+ }
257
+ const mount = contextMountRef.current;
258
+ if (mount === null) {
259
+ return false;
260
+ }
261
+ const expectedParent = mount.portalTarget ?? sentinelRef.current?.parentElement ?? null;
262
+ return popover.parentElement === expectedParent;
263
+ }, [mode]);
264
+ const requestContextMount = useCallback(() => {
265
+ if (mode !== 'context') {
266
+ return;
267
+ }
268
+ const sentinel = sentinelRef.current;
269
+ const inlineParent = sentinel?.parentElement ?? null;
270
+ if (!sentinel || !inlineParent) {
271
+ return;
272
+ }
273
+ const portalTarget = resolveLayerPortalTarget(inlineParent);
274
+ const mount = {
275
+ portalTarget,
276
+ portalStyle: portalTarget ? readPortalWritingContext(sentinel, portalTarget) : {}
277
+ };
278
+ contextMountRef.current = mount;
279
+ setContextMount(mount);
280
+ }, [mode]);
281
+ const clearContextMount = useCallback(() => {
282
+ if (mode !== 'context' || !lazyMount) {
283
+ return;
284
+ }
285
+ contextMountRef.current = null;
286
+ setContextMount(null);
287
+ }, [mode, lazyMount]);
195
288
  const show = useCallback(() => {
196
- const popover = popoverRef.current;
197
- if (popover && !isOpenRef.current) {
198
- // Finding infra-4: the Popover API is unsupported on Safari <17 and
199
- // Firefox <125. On those browsers `showPopover` does not exist, so
200
- // calling it unconditionally throws a TypeError and the layer never
201
- // opens. Guard behind a feature check; when the API is missing, fall
202
- // back to plain visibility (the [popover] attribute is inert there, so
203
- // the element sits in normal flow) so the layer still becomes visible.
204
- if (typeof popover.showPopover === 'function') {
205
- popover.showPopover();
206
- } else {
207
- popover.style.display = 'block';
208
- }
289
+ // A context popover left over until React commits a previous hide must not
290
+ // be reopened. The synchronous mount ref is the source of truth.
291
+ const candidate = popoverRef.current;
292
+ const popover = candidate && isCurrentContextPopover(candidate) ? candidate : null;
293
+ if (!popover) {
294
+ pendingShowRef.current = true;
295
+ requestContextMount();
296
+ return;
297
+ }
298
+ if (!isOpenRef.current) {
299
+ showPopoverElement(popover);
209
300
  isOpenRef.current = true;
210
301
  setIsOpen(true);
211
302
  onShow?.();
212
303
  }
213
- }, [onShow]);
304
+ }, [onShow, requestContextMount, showPopoverElement, isCurrentContextPopover]);
214
305
  const hide = useCallback(() => {
306
+ pendingShowRef.current = false;
215
307
  if (isOpenRef.current) {
216
308
  const el = popoverRef.current;
217
309
  // See finding infra-4 note in `show`: mirror the same guard on hide so
@@ -223,11 +315,13 @@ export function useLayer(options) {
223
315
  el.style.display = 'none';
224
316
  }
225
317
  }
318
+ openedPopoverRef.current = null;
226
319
  isOpenRef.current = false;
227
320
  setIsOpen(false);
228
321
  onHide?.();
229
322
  }
230
- }, [onHide]);
323
+ clearContextMount();
324
+ }, [onHide, clearContextMount]);
231
325
 
232
326
  // Ref for trigger element (context mode only)
233
327
  const ref = mode === 'context' ? el => {
@@ -255,11 +349,13 @@ export function useLayer(options) {
255
349
  const handleToggle = useCallback(e => {
256
350
  const toggleEvent = e;
257
351
  if (toggleEvent.newState === 'closed' && isOpenRef.current) {
352
+ openedPopoverRef.current = null;
258
353
  isOpenRef.current = false;
259
354
  setIsOpen(false);
260
355
  onHide?.();
356
+ clearContextMount();
261
357
  }
262
- }, [onHide]);
358
+ }, [onHide, clearContextMount]);
263
359
 
264
360
  // Ref callback for popover element — sets up the `toggle` listener.
265
361
  // Tracks the element + handler currently bound so the listener is removed
@@ -283,7 +379,24 @@ export function useLayer(options) {
283
379
  const popoverRefCallback = useCallback(el => {
284
380
  popoverRef.current = el;
285
381
  bindToggleListener(el, handleToggle);
286
- }, [handleToggle, bindToggleListener]);
382
+ if (el && pendingShowRef.current) {
383
+ pendingShowRef.current = false;
384
+ show();
385
+ } else if (el && isOpenRef.current && openedPopoverRef.current !== el && isCurrentContextPopover(el)) {
386
+ // Changing a portal target remounts the popover. Preserve the logical
387
+ // open state without firing onShow again for the replacement element.
388
+ showPopoverElement(el);
389
+ }
390
+ }, [handleToggle, bindToggleListener, show, showPopoverElement, isCurrentContextPopover]);
391
+ const sentinelRefCallback = useCallback(el => {
392
+ sentinelRef.current = el;
393
+ if (el && (!lazyMount || pendingShowRef.current || isOpenRef.current)) {
394
+ // The render call may have moved while the hook stayed mounted.
395
+ // Resolve again from the newly attached marker rather than reusing a
396
+ // portal target from its previous JSX position.
397
+ requestContextMount();
398
+ }
399
+ }, [lazyMount, requestContextMount]);
287
400
 
288
401
  // Re-bind when the handler identity changes while the element stays mounted,
289
402
  // and detach on unmount.
@@ -302,6 +415,17 @@ export function useLayer(options) {
302
415
 
303
416
  // Render function for context mode
304
417
  const renderContext = useCallback((children, props) => {
418
+ // Keep the marker mounted after resolving the layer. Apart from giving
419
+ // us the real JSX parent on first show, this lets its ref report when a
420
+ // persistent hook's render call moves to a different host.
421
+ const sentinel = /*#__PURE__*/_jsx("template", {
422
+ ref: sentinelRefCallback
423
+ });
424
+ if (contextMount === null) {
425
+ return /*#__PURE__*/_jsx(_Fragment, {
426
+ children: sentinel
427
+ });
428
+ }
305
429
  const {
306
430
  placement = 'above',
307
431
  alignment = 'center',
@@ -332,10 +456,10 @@ export function useLayer(options) {
332
456
  const stylexResult = stylex.props(styles.base, offsetStyle, xstyle);
333
457
  const combinedClassName = extraClassName ? `${extraClassName} ${stylexResult.className ?? ''}` : stylexResult.className;
334
458
 
335
- // Render as the requested tag. A `span` keeps the layer phrasing content
336
- // so it is valid (and stays put on hydration) inside inline contexts like
337
- // a `<p>`; `div` remains the default for block layers.
338
- return /*#__PURE__*/_jsx(Container, {
459
+ // The marker gives us the actual JSX parent without mounting arbitrary
460
+ // children there. Safe positions preserve the existing DOM order and
461
+ // cascade; unsafe positions use the nearest corrective portal target.
462
+ const layer = /*#__PURE__*/_jsx(Container, {
339
463
  ref: popoverRefCallback,
340
464
  id: id,
341
465
  role: role,
@@ -345,13 +469,17 @@ export function useLayer(options) {
345
469
  style: {
346
470
  ...stylexResult.style,
347
471
  ...anchorStyle,
472
+ ...contextMount.portalStyle,
348
473
  ...extraStyle
349
474
  },
350
475
  onMouseEnter: onMouseEnter,
351
476
  onMouseLeave: onMouseLeave,
352
477
  children: children
353
478
  });
354
- }, [anchorId, id, lightDismiss, popoverRefCallback]);
479
+ return /*#__PURE__*/_jsxs(_Fragment, {
480
+ children: [sentinel, contextMount.portalTarget ? /*#__PURE__*/createPortal(layer, contextMount.portalTarget) : layer]
481
+ });
482
+ }, [anchorId, contextMount, id, lightDismiss, popoverRefCallback, sentinelRefCallback]);
355
483
 
356
484
  // Render function for fixed mode
357
485
  const renderFixed = useCallback((children, props) => {
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/Markdown/parser.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAMH,MAAM,MAAM,UAAU,GAClB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAC/B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,UAAU,EAAE,CAAA;CAAC,GACtC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,UAAU,EAAE,CAAA;CAAC,GACxC;IAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,UAAU,EAAE,CAAA;CAAC,GAC/C;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAC/B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,UAAU,EAAE,CAAA;CAAC,GACpD;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,GACzC;IAAC,IAAI,EA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AAE,KAAK,CAAC;CAClB,CAAC;AAyWF,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B,UAAU,EAAE,CAAC;AAChB,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,UAAU,EAAE,CAAC;AAqyB/E,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B,SAAS,EAAE,CAAC;AACf,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,YAAY,GACpB,SAAS,EAAE,CAAC;AAyJf,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,SAAS,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,sBAAsB,IAAI,gBAAgB,CAEzD;AAqCD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAkJ5D;AA0GD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,gBAAgB,EACvB,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B,SAAS,EAAE,CAAC;AACf,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,YAAY,GACpB,SAAS,EAAE,CAAC"}
@@ -203,7 +203,7 @@ function matchReferenceLink(text, start, linkDefs, opts) {
203
203
  // matches nothing.
204
204
  const label = rawLabel === '' ? linkText : rawLabel;
205
205
  const href = linkDefs.get(normalizeLinkLabel(label));
206
- if (href != null) {
206
+ if (href != null && isSafeUrl(href)) {
207
207
  return {
208
208
  node: {
209
209
  type: 'link',
@@ -222,7 +222,7 @@ function matchReferenceLink(text, start, linkDefs, opts) {
222
222
  return null;
223
223
  }
224
224
  const href = linkDefs.get(normalizeLinkLabel(linkText));
225
- if (href == null) {
225
+ if (href == null || !isSafeUrl(href)) {
226
226
  return null;
227
227
  }
228
228
  return {
@@ -304,6 +304,27 @@ function isWordChar(ch) {
304
304
  return /\w/.test(ch);
305
305
  }
306
306
 
307
+ // ---------------------------------------------------------------------------
308
+ // URL scheme sanitization
309
+ // ---------------------------------------------------------------------------
310
+
311
+ /**
312
+ * Reject URLs with dangerous schemes (javascript:, vbscript:, data:) that
313
+ * could execute arbitrary code when rendered as link hrefs or image srcs.
314
+ * Returns true if the URL is safe to use, false otherwise.
315
+ */
316
+ function isSafeUrl(url) {
317
+ // Trim and collapse whitespace/control chars that browsers tolerate but
318
+ // could bypass a naive prefix check (e.g. "java\nscript:alert(1)").
319
+ // eslint-disable-next-line no-control-regex -- control chars are the bypass
320
+ const normalized = url.replace(/[\x00-\x1f\x7f]/g, '').trim();
321
+ const lower = normalized.toLowerCase();
322
+ if (lower.startsWith('javascript:') || lower.startsWith('vbscript:') || lower.startsWith('data:text/html')) {
323
+ return false;
324
+ }
325
+ return true;
326
+ }
327
+
307
328
  // ---------------------------------------------------------------------------
308
329
  // Inline parser
309
330
  // ---------------------------------------------------------------------------
@@ -419,11 +440,20 @@ function parseInlineImpl(text, opts) {
419
440
  if (altClose !== -1 && text[altClose + 1] === '(') {
420
441
  const srcClose = findClosingParen(text, altClose + 2);
421
442
  if (srcClose !== -1) {
422
- nodes.push({
423
- type: 'image',
424
- src: text.slice(altClose + 2, srcClose),
425
- alt: text.slice(i + 2, altClose)
426
- });
443
+ const src = text.slice(altClose + 2, srcClose);
444
+ if (!isSafeUrl(src)) {
445
+ // Dangerous scheme — emit as plain text.
446
+ nodes.push({
447
+ type: 'text',
448
+ content: text.slice(i, srcClose + 1)
449
+ });
450
+ } else {
451
+ nodes.push({
452
+ type: 'image',
453
+ src,
454
+ alt: text.slice(i + 2, altClose)
455
+ });
456
+ }
427
457
  i = srcClose + 1;
428
458
  continue;
429
459
  }
@@ -459,11 +489,20 @@ function parseInlineImpl(text, opts) {
459
489
  if (textClose !== -1 && text[textClose + 1] === '(') {
460
490
  const urlClose = findClosingParen(text, textClose + 2);
461
491
  if (urlClose !== -1) {
462
- nodes.push({
463
- type: 'link',
464
- href: text.slice(textClose + 2, urlClose),
465
- children: parseInlineImpl(text.slice(i + 1, textClose), opts)
466
- });
492
+ const href = text.slice(textClose + 2, urlClose);
493
+ if (!isSafeUrl(href)) {
494
+ // Dangerous scheme — emit as plain text instead of a link.
495
+ nodes.push({
496
+ type: 'text',
497
+ content: text.slice(i, urlClose + 1)
498
+ });
499
+ } else {
500
+ nodes.push({
501
+ type: 'link',
502
+ href,
503
+ children: parseInlineImpl(text.slice(i + 1, textClose), opts)
504
+ });
505
+ }
467
506
  i = urlClose + 1;
468
507
  continue;
469
508
  }
@@ -690,6 +729,10 @@ function scanAutolinksInText(text) {
690
729
  let m;
691
730
  while ((m = re.exec(text)) !== null) {
692
731
  const url = m[1];
732
+ // Skip dangerous URL schemes (javascript:, vbscript:, data:text/html)
733
+ if (!isSafeUrl(url)) {
734
+ continue;
735
+ }
693
736
  matches.push({
694
737
  start: m.index,
695
738
  end: m.index + m[0].length,
@@ -9,8 +9,13 @@
9
9
  * disabled state) so all nav-like components stay in sync — especially important
10
10
  * when TopNav items render inside MobileNav drawers alongside SideNav items.
11
11
  *
12
- * Individual components layer their own overrides (e.g. collapsed mode, indentation,
13
- * focus outlines) via stylex.props composition.
12
+ * Individual components layer their own overrides (e.g. collapsed mode,
13
+ * indentation) via stylex.props composition.
14
+ *
15
+ * The focus ring is not defined here. Compose
16
+ * `focusOutlineProps.focusVisible` (utils/focusOutline.stylex.ts) at the call
17
+ * site, on whichever element actually takes focus — in a split-action row that
18
+ * is the link and the toggle, not the row that contains them.
14
19
  */
15
20
  export type NavItemSize = 'sm' | 'md' | 'lg';
16
21
  import * as stylex from '@stylexjs/stylex';
@@ -63,15 +68,22 @@ export declare const navItemStyles: Readonly<{
63
68
  }>;
64
69
  }>;
65
70
  readonly selected: Readonly<{
66
- readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))">;
71
+ readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))" | "Highlight">;
72
+ readonly color: stylex.StyleXClassNameFor<"color", "HighlightText" | null>;
67
73
  readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", "500">;
68
74
  readonly ':hover': stylex.StyleXClassNameFor<":hover", {
69
75
  readonly '@media (hover: hover)': {
70
- readonly backgroundColor: stylex.StyleXVar<"light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))">;
76
+ readonly backgroundColor: {
77
+ readonly default: stylex.StyleXVar<"light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))">;
78
+ readonly '@media (forced-colors: active)': "Highlight";
79
+ };
71
80
  };
72
81
  }>;
73
82
  readonly ':active': stylex.StyleXClassNameFor<":active", {
74
- readonly backgroundColor: stylex.StyleXVar<"light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))">;
83
+ readonly backgroundColor: {
84
+ readonly default: stylex.StyleXVar<"light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))">;
85
+ readonly '@media (forced-colors: active)': "Highlight";
86
+ };
75
87
  }>;
76
88
  }>;
77
89
  readonly disabled: Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"navItemStyles.stylex.d.ts","sourceRoot":"","sources":["../../src/NavItem/navItemStyles.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAU3C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuExB,CAAC"}
1
+ {"version":3,"file":"navItemStyles.stylex.d.ts","sourceRoot":"","sources":["../../src/NavItem/navItemStyles.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAU3C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FxB,CAAC"}
@@ -11,8 +11,13 @@
11
11
  * disabled state) so all nav-like components stay in sync — especially important
12
12
  * when TopNav items render inside MobileNav drawers alongside SideNav items.
13
13
  *
14
- * Individual components layer their own overrides (e.g. collapsed mode, indentation,
15
- * focus outlines) via stylex.props composition.
14
+ * Individual components layer their own overrides (e.g. collapsed mode,
15
+ * indentation) via stylex.props composition.
16
+ *
17
+ * The focus ring is not defined here. Compose
18
+ * `focusOutlineProps.focusVisible` (utils/focusOutline.stylex.ts) at the call
19
+ * site, on whichever element actually takes focus — in a split-action row that
20
+ * is the link and the toggle, not the row that contains them.
16
21
  */
17
22
 
18
23
  import * as stylex from '@stylexjs/stylex';
@@ -63,10 +68,11 @@ export const navItemStyles = {
63
68
  $$css: true
64
69
  },
65
70
  selected: {
66
- kWkggS: "x17x4s8c",
71
+ kWkggS: "x17x4s8c x1jzqe4",
72
+ kMwMTN: "x1k5gbb1",
67
73
  k63SB2: "x1e4wzip",
68
- kHE3J0: "x1sua13m",
69
- kSReZ0: "xjtnuge",
74
+ kHE3J0: "x1sua13m x1jawyga",
75
+ kSReZ0: "xjtnuge x1vo6n7o",
70
76
  $$css: true
71
77
  },
72
78
  disabled: {
@@ -1 +1 @@
1
- {"version":3,"file":"RadioListItem.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAkE5C,MAAM,WAAW,kBAAmB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,KAAK,EACL,WAAW,EACX,UAAU,EAAE,cAAsB,EAClC,YAAY,EACZ,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,kBAAkB,qBA8GpB;yBA1He,aAAa"}
1
+ {"version":3,"file":"RadioListItem.d.ts","sourceRoot":"","sources":["../../src/RadioList/RadioListItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAsF5C,MAAM,WAAW,kBAAmB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,KAAK,EACL,WAAW,EACX,UAAU,EAAE,cAAsB,EAClC,YAAY,EACZ,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,kBAAkB,qBA8GpB;yBA1He,aAAa"}
@@ -52,6 +52,11 @@ const styles = {
52
52
  kSiTet: "xg01cxk",
53
53
  kkrTdU: "x1ypdohk",
54
54
  kY2c9j: "x1vjfegm",
55
+ k7Eaqz: "xkagaj0",
56
+ kAzted: "x80b3aj",
57
+ k87sOh: "xijlfn0",
58
+ kLqNvP: "x1hsn8va",
59
+ k3aq6I: "x8i4i9p",
55
60
  $$css: true
56
61
  },
57
62
  inputDisabled: {
@@ -19,7 +19,7 @@
19
19
  import { type ReactNode } from 'react';
20
20
  import type { BaseProps } from '../BaseProps';
21
21
  import type { StyleXStyles } from '@stylexjs/stylex';
22
- import { type SideNavImperativeCollapseHandle } from './SideNavCollapseContext';
22
+ import { type SideNavCollapsibleConfig, type SideNavImperativeCollapseHandle } from './SideNavCollapseContext';
23
23
  import type { ResizableConfig } from '../Resizable/useResizable';
24
24
  export interface SideNavProps extends BaseProps<HTMLElement> {
25
25
  /** Ref forwarded to the root element */
@@ -28,6 +28,9 @@ export interface SideNavProps extends BaseProps<HTMLElement> {
28
28
  * Imperative collapse handle for SideNavCollapseButton instances rendered
29
29
  * outside this SideNav. This intentionally stays separate from `ref`, which
30
30
  * continues to expose the root HTMLElement.
31
+ *
32
+ * @deprecated Hand the same controlled `collapsible` config to SideNav and
33
+ * to the outside button instead.
31
34
  */
32
35
  handleRef?: React.Ref<SideNavImperativeCollapseHandle>;
33
36
  /**
@@ -98,19 +101,14 @@ export interface SideNavProps extends BaseProps<HTMLElement> {
98
101
  * - `true` — enables collapse with default toggle button and uncontrolled state
99
102
  * - Object — enables collapse with advanced configuration:
100
103
  * - `defaultIsCollapsed` — start collapsed (uncontrolled)
101
- * - `isCollapsed` + `onCollapsedChange` — controlled mode
104
+ * - `isCollapsed` + `onCollapsedChange` — controlled mode. Pass the same
105
+ * object to a `SideNavCollapseButton` rendered outside this SideNav
102
106
  * - `hasButton` — render built-in collapse button (default: true)
103
107
  * - `buttonLabel` — accessibility label for the collapse button
104
108
  *
105
109
  * @default false
106
110
  */
107
- collapsible?: boolean | {
108
- defaultIsCollapsed?: boolean;
109
- isCollapsed?: boolean;
110
- onCollapsedChange?: (isCollapsed: boolean) => void;
111
- hasButton?: boolean;
112
- buttonLabel?: string;
113
- };
111
+ collapsible?: boolean | SideNavCollapsibleConfig;
114
112
  }
115
113
  /**
116
114
  * Sidebar navigation container for application pages.
@@ -1 +1 @@
1
- {"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNav.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,0BAA0B,CAAC;AAKl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