@hjmds/react 1.12.0 → 1.13.0

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 (356) hide show
  1. package/dist/actions.d.ts +4 -0
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js +4 -1
  4. package/dist/actions.js.map +1 -1
  5. package/dist/activity-heatmap.d.ts +4 -1
  6. package/dist/activity-heatmap.d.ts.map +1 -1
  7. package/dist/activity-heatmap.js +1 -1
  8. package/dist/activity-heatmap.js.map +1 -1
  9. package/dist/advanced-display.d.ts +31 -3
  10. package/dist/advanced-display.d.ts.map +1 -1
  11. package/dist/advanced-display.js +26 -27
  12. package/dist/advanced-display.js.map +1 -1
  13. package/dist/advanced-forms.d.ts +27 -2
  14. package/dist/advanced-forms.d.ts.map +1 -1
  15. package/dist/advanced-forms.js +11 -7
  16. package/dist/advanced-forms.js.map +1 -1
  17. package/dist/affix.d.ts +4 -1
  18. package/dist/affix.d.ts.map +1 -1
  19. package/dist/affix.js +2 -2
  20. package/dist/affix.js.map +1 -1
  21. package/dist/agreement.d.ts +3 -0
  22. package/dist/agreement.d.ts.map +1 -1
  23. package/dist/agreement.js +14 -3
  24. package/dist/agreement.js.map +1 -1
  25. package/dist/anchor.d.ts +5 -0
  26. package/dist/anchor.d.ts.map +1 -1
  27. package/dist/anchor.js +2 -2
  28. package/dist/anchor.js.map +1 -1
  29. package/dist/asset.d.ts +8 -1
  30. package/dist/asset.d.ts.map +1 -1
  31. package/dist/asset.js +4 -4
  32. package/dist/asset.js.map +1 -1
  33. package/dist/auth-screen.d.ts +5 -0
  34. package/dist/auth-screen.d.ts.map +1 -1
  35. package/dist/auth-screen.js +2 -1
  36. package/dist/auth-screen.js.map +1 -1
  37. package/dist/bottom-cta.d.ts +5 -0
  38. package/dist/bottom-cta.d.ts.map +1 -1
  39. package/dist/bottom-cta.js +2 -2
  40. package/dist/bottom-cta.js.map +1 -1
  41. package/dist/bottom-info.d.ts +5 -0
  42. package/dist/bottom-info.d.ts.map +1 -1
  43. package/dist/bottom-info.js +2 -2
  44. package/dist/bottom-info.js.map +1 -1
  45. package/dist/bottom-navigation.d.ts +3 -0
  46. package/dist/bottom-navigation.d.ts.map +1 -1
  47. package/dist/bottom-navigation.js +2 -1
  48. package/dist/bottom-navigation.js.map +1 -1
  49. package/dist/breadcrumb.d.ts +3 -0
  50. package/dist/breadcrumb.d.ts.map +1 -1
  51. package/dist/breadcrumb.js +2 -2
  52. package/dist/breadcrumb.js.map +1 -1
  53. package/dist/calendar.d.ts +4 -1
  54. package/dist/calendar.d.ts.map +1 -1
  55. package/dist/calendar.js +2 -2
  56. package/dist/calendar.js.map +1 -1
  57. package/dist/carousel-motion.d.ts +3 -0
  58. package/dist/carousel-motion.d.ts.map +1 -1
  59. package/dist/carousel-motion.js +1 -1
  60. package/dist/carousel-motion.js.map +1 -1
  61. package/dist/carousel.d.ts +3 -0
  62. package/dist/carousel.d.ts.map +1 -1
  63. package/dist/carousel.js +2 -2
  64. package/dist/carousel.js.map +1 -1
  65. package/dist/celebration.d.ts.map +1 -1
  66. package/dist/celebration.js.map +1 -1
  67. package/dist/clipboard.d.ts.map +1 -1
  68. package/dist/clipboard.js +6 -2
  69. package/dist/clipboard.js.map +1 -1
  70. package/dist/code-block.d.ts +4 -1
  71. package/dist/code-block.d.ts.map +1 -1
  72. package/dist/code-block.js +1 -1
  73. package/dist/code-block.js.map +1 -1
  74. package/dist/collapsible.d.ts +3 -0
  75. package/dist/collapsible.d.ts.map +1 -1
  76. package/dist/collapsible.js +2 -2
  77. package/dist/collapsible.js.map +1 -1
  78. package/dist/color-picker.d.ts +4 -1
  79. package/dist/color-picker.d.ts.map +1 -1
  80. package/dist/color-picker.js +2 -2
  81. package/dist/color-picker.js.map +1 -1
  82. package/dist/command-palette.d.ts +6 -0
  83. package/dist/command-palette.d.ts.map +1 -1
  84. package/dist/command-palette.js +49 -15
  85. package/dist/command-palette.js.map +1 -1
  86. package/dist/composition-style.d.ts +14 -1
  87. package/dist/composition-style.d.ts.map +1 -1
  88. package/dist/composition-style.js.map +1 -1
  89. package/dist/content-transition.d.ts +6 -2
  90. package/dist/content-transition.d.ts.map +1 -1
  91. package/dist/content-transition.js +4 -4
  92. package/dist/content-transition.js.map +1 -1
  93. package/dist/context-menu.d.ts +4 -1
  94. package/dist/context-menu.d.ts.map +1 -1
  95. package/dist/context-menu.js +2 -2
  96. package/dist/context-menu.js.map +1 -1
  97. package/dist/data-table.d.ts +3 -0
  98. package/dist/data-table.d.ts.map +1 -1
  99. package/dist/data-table.js +31 -11
  100. package/dist/data-table.js.map +1 -1
  101. package/dist/date-picker.d.ts +4 -1
  102. package/dist/date-picker.d.ts.map +1 -1
  103. package/dist/date-picker.js +2 -2
  104. package/dist/date-picker.js.map +1 -1
  105. package/dist/date-range.d.ts +4 -1
  106. package/dist/date-range.d.ts.map +1 -1
  107. package/dist/date-range.js +2 -2
  108. package/dist/date-range.js.map +1 -1
  109. package/dist/display.d.ts +4 -0
  110. package/dist/display.d.ts.map +1 -1
  111. package/dist/display.js.map +1 -1
  112. package/dist/duration-field.d.ts +4 -2
  113. package/dist/duration-field.d.ts.map +1 -1
  114. package/dist/duration-field.js +2 -2
  115. package/dist/duration-field.js.map +1 -1
  116. package/dist/effect-surface.d.ts +4 -2
  117. package/dist/effect-surface.d.ts.map +1 -1
  118. package/dist/effect-surface.js +2 -2
  119. package/dist/effect-surface.js.map +1 -1
  120. package/dist/evidence.d.ts +1 -1
  121. package/dist/evidence.js +1 -1
  122. package/dist/evidence.js.map +1 -1
  123. package/dist/feedback.d.ts +24 -13
  124. package/dist/feedback.d.ts.map +1 -1
  125. package/dist/feedback.js +17 -15
  126. package/dist/feedback.js.map +1 -1
  127. package/dist/file-picker.d.ts +5 -0
  128. package/dist/file-picker.d.ts.map +1 -1
  129. package/dist/file-picker.js +2 -2
  130. package/dist/file-picker.js.map +1 -1
  131. package/dist/floating-action-button.d.ts.map +1 -1
  132. package/dist/floating-action-button.js.map +1 -1
  133. package/dist/folder-preview.d.ts +4 -1
  134. package/dist/folder-preview.d.ts.map +1 -1
  135. package/dist/folder-preview.js +2 -2
  136. package/dist/folder-preview.js.map +1 -1
  137. package/dist/forms.d.ts +35 -3
  138. package/dist/forms.d.ts.map +1 -1
  139. package/dist/forms.js +55 -36
  140. package/dist/forms.js.map +1 -1
  141. package/dist/gravity-letters.d.ts +4 -2
  142. package/dist/gravity-letters.d.ts.map +1 -1
  143. package/dist/gravity-letters.js +2 -2
  144. package/dist/gravity-letters.js.map +1 -1
  145. package/dist/grid-reveal.d.ts +4 -2
  146. package/dist/grid-reveal.d.ts.map +1 -1
  147. package/dist/grid-reveal.js +2 -2
  148. package/dist/grid-reveal.js.map +1 -1
  149. package/dist/heading.d.ts +5 -0
  150. package/dist/heading.d.ts.map +1 -1
  151. package/dist/heading.js +8 -1
  152. package/dist/heading.js.map +1 -1
  153. package/dist/inline-confirm.d.ts +3 -0
  154. package/dist/inline-confirm.d.ts.map +1 -1
  155. package/dist/inline-confirm.js +3 -3
  156. package/dist/inline-confirm.js.map +1 -1
  157. package/dist/internal/message-reactions.d.ts +16 -0
  158. package/dist/internal/message-reactions.d.ts.map +1 -0
  159. package/dist/internal/message-reactions.js +42 -0
  160. package/dist/internal/message-reactions.js.map +1 -0
  161. package/dist/internal/spinner.d.ts +18 -0
  162. package/dist/internal/spinner.d.ts.map +1 -0
  163. package/dist/internal/spinner.js +10 -0
  164. package/dist/internal/spinner.js.map +1 -0
  165. package/dist/layout.d.ts +12 -0
  166. package/dist/layout.d.ts.map +1 -1
  167. package/dist/layout.js +6 -6
  168. package/dist/layout.js.map +1 -1
  169. package/dist/masonry.d.ts +4 -1
  170. package/dist/masonry.d.ts.map +1 -1
  171. package/dist/masonry.js +5 -3
  172. package/dist/masonry.js.map +1 -1
  173. package/dist/mentions.d.ts.map +1 -1
  174. package/dist/mentions.js +12 -3
  175. package/dist/mentions.js.map +1 -1
  176. package/dist/menu-morph.d.ts +8 -1
  177. package/dist/menu-morph.d.ts.map +1 -1
  178. package/dist/menu-morph.js +3 -3
  179. package/dist/menu-morph.js.map +1 -1
  180. package/dist/menubar.d.ts +4 -1
  181. package/dist/menubar.d.ts.map +1 -1
  182. package/dist/menubar.js +4 -3
  183. package/dist/menubar.js.map +1 -1
  184. package/dist/modal.d.ts.map +1 -1
  185. package/dist/modal.js +4 -1
  186. package/dist/modal.js.map +1 -1
  187. package/dist/navigation-bar.d.ts +4 -1
  188. package/dist/navigation-bar.d.ts.map +1 -1
  189. package/dist/navigation-bar.js +2 -2
  190. package/dist/navigation-bar.js.map +1 -1
  191. package/dist/navigation.d.ts +5 -0
  192. package/dist/navigation.d.ts.map +1 -1
  193. package/dist/navigation.js +6 -6
  194. package/dist/navigation.js.map +1 -1
  195. package/dist/notification-bell.d.ts +4 -1
  196. package/dist/notification-bell.d.ts.map +1 -1
  197. package/dist/notification-bell.js +5 -3
  198. package/dist/notification-bell.js.map +1 -1
  199. package/dist/number-field.d.ts +11 -0
  200. package/dist/number-field.d.ts.map +1 -1
  201. package/dist/number-field.js +8 -3
  202. package/dist/number-field.js.map +1 -1
  203. package/dist/overlay-stack.d.ts.map +1 -1
  204. package/dist/overlay-stack.js.map +1 -1
  205. package/dist/overlays.d.ts +5 -0
  206. package/dist/overlays.d.ts.map +1 -1
  207. package/dist/overlays.js +35 -11
  208. package/dist/overlays.js.map +1 -1
  209. package/dist/pagination.d.ts +5 -0
  210. package/dist/pagination.d.ts.map +1 -1
  211. package/dist/pagination.js +2 -2
  212. package/dist/pagination.js.map +1 -1
  213. package/dist/popover.d.ts.map +1 -1
  214. package/dist/popover.js +5 -4
  215. package/dist/popover.js.map +1 -1
  216. package/dist/portal.d.ts.map +1 -1
  217. package/dist/portal.js +2 -1
  218. package/dist/portal.js.map +1 -1
  219. package/dist/provider-button.d.ts +5 -0
  220. package/dist/provider-button.d.ts.map +1 -1
  221. package/dist/provider-button.js +2 -2
  222. package/dist/provider-button.js.map +1 -1
  223. package/dist/provider.d.ts.map +1 -1
  224. package/dist/provider.js.map +1 -1
  225. package/dist/qr-code.d.ts +4 -1
  226. package/dist/qr-code.d.ts.map +1 -1
  227. package/dist/qr-code.js +2 -2
  228. package/dist/qr-code.js.map +1 -1
  229. package/dist/reaction-picker.d.ts +6 -2
  230. package/dist/reaction-picker.d.ts.map +1 -1
  231. package/dist/reaction-picker.js +20 -4
  232. package/dist/reaction-picker.js.map +1 -1
  233. package/dist/saved-items.d.ts +33 -0
  234. package/dist/saved-items.d.ts.map +1 -0
  235. package/dist/saved-items.js +19 -0
  236. package/dist/saved-items.js.map +1 -0
  237. package/dist/screen-flows.d.ts +323 -0
  238. package/dist/screen-flows.d.ts.map +1 -0
  239. package/dist/screen-flows.js +212 -0
  240. package/dist/screen-flows.js.map +1 -0
  241. package/dist/screens.d.ts +120 -0
  242. package/dist/screens.d.ts.map +1 -0
  243. package/dist/screens.js +66 -0
  244. package/dist/screens.js.map +1 -0
  245. package/dist/select.d.ts +6 -0
  246. package/dist/select.d.ts.map +1 -1
  247. package/dist/select.js +13 -3
  248. package/dist/select.js.map +1 -1
  249. package/dist/selection.d.ts +28 -1
  250. package/dist/selection.d.ts.map +1 -1
  251. package/dist/selection.js +12 -12
  252. package/dist/selection.js.map +1 -1
  253. package/dist/side-panel.d.ts.map +1 -1
  254. package/dist/side-panel.js.map +1 -1
  255. package/dist/sidebar.d.ts +3 -0
  256. package/dist/sidebar.d.ts.map +1 -1
  257. package/dist/sidebar.js +2 -2
  258. package/dist/sidebar.js.map +1 -1
  259. package/dist/skip-nav.d.ts.map +1 -1
  260. package/dist/skip-nav.js.map +1 -1
  261. package/dist/slider.d.ts +5 -0
  262. package/dist/slider.d.ts.map +1 -1
  263. package/dist/slider.js +2 -1
  264. package/dist/slider.js.map +1 -1
  265. package/dist/sortable.d.ts +3 -0
  266. package/dist/sortable.d.ts.map +1 -1
  267. package/dist/sortable.js +1 -1
  268. package/dist/sortable.js.map +1 -1
  269. package/dist/splitter.d.ts +5 -0
  270. package/dist/splitter.d.ts.map +1 -1
  271. package/dist/splitter.js +28 -3
  272. package/dist/splitter.js.map +1 -1
  273. package/dist/step-player.d.ts +4 -1
  274. package/dist/step-player.d.ts.map +1 -1
  275. package/dist/step-player.js +2 -2
  276. package/dist/step-player.js.map +1 -1
  277. package/dist/steps.d.ts +5 -0
  278. package/dist/steps.d.ts.map +1 -1
  279. package/dist/steps.js +2 -2
  280. package/dist/steps.js.map +1 -1
  281. package/dist/styles.css +245 -65
  282. package/dist/styles.layered.css +245 -65
  283. package/dist/supplemental-display.d.ts +4 -0
  284. package/dist/supplemental-display.d.ts.map +1 -1
  285. package/dist/supplemental-display.js +7 -4
  286. package/dist/supplemental-display.js.map +1 -1
  287. package/dist/supplemental-navigation.d.ts +5 -0
  288. package/dist/supplemental-navigation.d.ts.map +1 -1
  289. package/dist/supplemental-navigation.js +2 -2
  290. package/dist/supplemental-navigation.js.map +1 -1
  291. package/dist/swipe-actions.d.ts +4 -1
  292. package/dist/swipe-actions.d.ts.map +1 -1
  293. package/dist/swipe-actions.js +2 -2
  294. package/dist/swipe-actions.js.map +1 -1
  295. package/dist/tags-input.d.ts +5 -0
  296. package/dist/tags-input.d.ts.map +1 -1
  297. package/dist/tags-input.js +2 -2
  298. package/dist/tags-input.js.map +1 -1
  299. package/dist/task-list.d.ts +4 -1
  300. package/dist/task-list.d.ts.map +1 -1
  301. package/dist/task-list.js +3 -3
  302. package/dist/task-list.js.map +1 -1
  303. package/dist/text-formats.d.ts +5 -0
  304. package/dist/text-formats.d.ts.map +1 -1
  305. package/dist/text-formats.js +2 -1
  306. package/dist/text-formats.js.map +1 -1
  307. package/dist/theme.d.ts.map +1 -1
  308. package/dist/theme.js +22 -2
  309. package/dist/theme.js.map +1 -1
  310. package/dist/thinking-orb.d.ts +4 -1
  311. package/dist/thinking-orb.d.ts.map +1 -1
  312. package/dist/thinking-orb.js +2 -2
  313. package/dist/thinking-orb.js.map +1 -1
  314. package/dist/toast.d.ts.map +1 -1
  315. package/dist/toast.js +10 -4
  316. package/dist/toast.js.map +1 -1
  317. package/dist/toggle-group.d.ts +3 -0
  318. package/dist/toggle-group.d.ts.map +1 -1
  319. package/dist/toggle-group.js +2 -1
  320. package/dist/toggle-group.js.map +1 -1
  321. package/dist/top-bar.d.ts +5 -0
  322. package/dist/top-bar.d.ts.map +1 -1
  323. package/dist/top-bar.js +2 -2
  324. package/dist/top-bar.js.map +1 -1
  325. package/dist/top.d.ts +5 -0
  326. package/dist/top.d.ts.map +1 -1
  327. package/dist/top.js +2 -2
  328. package/dist/top.js.map +1 -1
  329. package/dist/tour.d.ts.map +1 -1
  330. package/dist/tour.js +3 -2
  331. package/dist/tour.js.map +1 -1
  332. package/dist/transfer-list.d.ts +3 -0
  333. package/dist/transfer-list.d.ts.map +1 -1
  334. package/dist/transfer-list.js +2 -2
  335. package/dist/transfer-list.js.map +1 -1
  336. package/dist/tree.d.ts +3 -0
  337. package/dist/tree.d.ts.map +1 -1
  338. package/dist/tree.js +17 -5
  339. package/dist/tree.js.map +1 -1
  340. package/dist/upload-item.d.ts +5 -0
  341. package/dist/upload-item.d.ts.map +1 -1
  342. package/dist/upload-item.js +2 -2
  343. package/dist/upload-item.js.map +1 -1
  344. package/dist/virtual-list.d.ts +4 -1
  345. package/dist/virtual-list.d.ts.map +1 -1
  346. package/dist/virtual-list.js +2 -2
  347. package/dist/virtual-list.js.map +1 -1
  348. package/dist/voice-note.d.ts +4 -1
  349. package/dist/voice-note.d.ts.map +1 -1
  350. package/dist/voice-note.js +2 -2
  351. package/dist/voice-note.js.map +1 -1
  352. package/dist/watermark.d.ts +4 -1
  353. package/dist/watermark.d.ts.map +1 -1
  354. package/dist/watermark.js +2 -2
  355. package/dist/watermark.js.map +1 -1
  356. package/package.json +18 -3
@@ -1 +1 @@
1
- {"version":3,"file":"heading.js","sourceRoot":"","sources":["../src/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,yBAAyB,GAE1B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,aAAa,EACb,UAAU,GAIX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAmC,SAAS,OAAO,CAClF,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACvD,YAAY;IAEZ,MAAM,UAAU,GAAsB;QACpC,KAAK;QACL,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC;KAC1D,CAAC;IACF,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5C,2EAA2E;IAC3E,0DAA0D;IAC1D,OAAO,aAAa,CAClB,IAAI,2BAA2B,CAAC,UAAU,CAAC,EAAE,EAC7C;QACE,GAAG,KAAK;QACR,GAAG,EAAE,YAAY;QACjB,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC;QAC/C,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE;YACL,oBAAoB,EAAE,GAAG,OAAO,CAAC,QAAQ,IAAI;YAC7C,2BAA2B,EAAE,GAAG,OAAO,CAAC,UAAU,IAAI;YACtD,sBAAsB,EAAE,OAAO,CAAC,UAAU;SAC1B;KACnB,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n headingRecipe,\n resolveHeadingSemanticLevel,\n validateHeadingDescriptor,\n type HeadingDescriptor,\n} from \"@hjmds/design-contracts/components/heading\";\nimport {\n createElement,\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\n\nexport type HeadingProps = Omit<HTMLAttributes<HTMLHeadingElement>, \"children\"> &\n HeadingDescriptor &\n Readonly<{ children: ReactNode }>;\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(function Heading(\n { level, semanticLevel, children, className, ...props },\n forwardedRef,\n) {\n const descriptor: HeadingDescriptor = {\n level,\n ...(semanticLevel === undefined ? {} : { semanticLevel }),\n };\n validateHeadingDescriptor(descriptor);\n const metrics = headingRecipe.levels[level];\n // Visual size and document level are separate axes: the element comes from\n // the semantic level, the type comes from the visual one.\n return createElement(\n `h${resolveHeadingSemanticLevel(descriptor)}`,\n {\n ...props,\n ref: forwardedRef,\n className: classNames(\"hjm-heading\", className),\n \"data-level\": level,\n style: {\n \"--hjm-heading-size\": `${metrics.fontSize}px`,\n \"--hjm-heading-line-height\": `${metrics.lineHeight}px`,\n \"--hjm-heading-weight\": metrics.fontWeight,\n } as CSSProperties,\n },\n children,\n );\n});\n"]}
1
+ {"version":3,"file":"heading.js","sourceRoot":"","sources":["../src/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,yBAAyB,GAE1B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,aAAa,EACb,UAAU,GAIX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAmC,SAAS,OAAO,CAClF,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAC3E,YAAY;IAEZ,MAAM,UAAU,GAAsB;QACpC,KAAK;QACL,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC;KAC1D,CAAC;IACF,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5C,2EAA2E;IAC3E,0DAA0D;IAC1D,OAAO,aAAa,CAClB,IAAI,2BAA2B,CAAC,UAAU,CAAC,EAAE,EAC7C;QACE,GAAG,KAAK;QACR,GAAG,EAAE,YAAY;QACjB,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC;QAC/C,YAAY,EAAE,KAAK;QACnB,2EAA2E;QAC3E,6EAA6E;QAC7E,2EAA2E;QAC3E,yEAAyE;QACzE,4EAA4E;QAC5E,KAAK,EAAE;YACL,GAAG,KAAK;YACR,GAAG,WAAW;YACd,oBAAoB,EAAE,GAAG,OAAO,CAAC,QAAQ,IAAI;YAC7C,2BAA2B,EAAE,GAAG,OAAO,CAAC,UAAU,IAAI;YACtD,sBAAsB,EAAE,OAAO,CAAC,UAAU;SAC1B;KACnB,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n headingRecipe,\n resolveHeadingSemanticLevel,\n validateHeadingDescriptor,\n type HeadingDescriptor,\n} from \"@hjmds/design-contracts/components/heading\";\nimport {\n createElement,\n forwardRef,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type HeadingProps = Omit<HTMLAttributes<HTMLHeadingElement>, \"children\"> &\n HeadingDescriptor &\n Readonly<{\n children: ReactNode;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(function Heading(\n { level, semanticLevel, children, className, layoutStyle, style, ...props },\n forwardedRef,\n) {\n const descriptor: HeadingDescriptor = {\n level,\n ...(semanticLevel === undefined ? {} : { semanticLevel }),\n };\n validateHeadingDescriptor(descriptor);\n const metrics = headingRecipe.levels[level];\n // Visual size and document level are separate axes: the element comes from\n // the semantic level, the type comes from the visual one.\n return createElement(\n `h${resolveHeadingSemanticLevel(descriptor)}`,\n {\n ...props,\n ref: forwardedRef,\n className: classNames(\"hjm-heading\", className),\n \"data-level\": level,\n // The caller's `style` used to be replaced wholesale by the recipe object,\n // so a placement margin vanished without a type error. Merge it instead, and\n // spread the recipe variables last: the level still owns size, line height\n // and weight, which is why the variables are not caller-overridable here\n // (unlike Native's caller-last array; Web has `layoutStyle` for placement).\n style: {\n ...style,\n ...layoutStyle,\n \"--hjm-heading-size\": `${metrics.fontSize}px`,\n \"--hjm-heading-line-height\": `${metrics.lineHeight}px`,\n \"--hjm-heading-weight\": metrics.fontWeight,\n } as CSSProperties,\n },\n children,\n );\n});\n"]}
@@ -1,3 +1,4 @@
1
+ import type { HjmCompositionStyleProp } from "./composition-style.js";
1
2
  export type InlineConfirmProps = Readonly<{
2
3
  label: string;
3
4
  prompt: string;
@@ -8,6 +9,8 @@ export type InlineConfirmProps = Readonly<{
8
9
  errorLabel: string;
9
10
  disabled?: boolean;
10
11
  onConfirm: () => void | Promise<void>;
12
+ /** Canonical layout-only placement, applied to whichever root the current phase renders so the block does not jump. */
13
+ layoutStyle?: HjmCompositionStyleProp;
11
14
  }>;
12
15
  /** Low-complexity confirmation using the existing async dialog session semantics. */
13
16
  export declare function InlineConfirm(props: InlineConfirmProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"inline-confirm.d.ts","sourceRoot":"","sources":["../src/inline-confirm.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAAC;AAGnP,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAwBtD"}
1
+ {"version":3,"file":"inline-confirm.d.ts","sourceRoot":"","sources":["../src/inline-confirm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9O,uHAAuH;IACvH,WAAW,CAAC,EAAE,uBAAuB,CAAA;CAAE,CAAC,CAAC;AAG3C,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAwBtD"}
@@ -25,13 +25,13 @@ export function InlineConfirm(props) {
25
25
  queueMicrotask(() => trigger.current?.focus());
26
26
  }, [phase, session]);
27
27
  if (done)
28
- return _jsx("span", { role: "status", children: props.successLabel });
28
+ return _jsx("span", { role: "status", style: props.layoutStyle, children: props.successLabel });
29
29
  if (!session)
30
- return _jsx(Button, { ref: trigger, tone: "danger", disabled: props.disabled ?? false, onClick: () => setSession(createAlertDialogSession({ mode: "confirm", tone: "danger", title: props.label, description: props.prompt, confirmLabel: props.confirmLabel, cancelLabel: props.cancelLabel, onConfirm: props.onConfirm, fallbackErrorMessage: props.errorLabel })), children: props.label });
30
+ return _jsx(Button, { ref: trigger, tone: "danger", disabled: props.disabled ?? false, ...(props.layoutStyle === undefined ? {} : { layoutStyle: props.layoutStyle }), onClick: () => setSession(createAlertDialogSession({ mode: "confirm", tone: "danger", title: props.label, description: props.prompt, confirmLabel: props.confirmLabel, cancelLabel: props.cancelLabel, onConfirm: props.onConfirm, fallbackErrorMessage: props.errorLabel })), children: props.label });
31
31
  const busy = phase?.status === "busy";
32
32
  return _jsxs("div", { role: "group", "aria-label": props.prompt, onKeyDown: event => { if (event.key === "Escape" && !busy) {
33
33
  event.stopPropagation();
34
34
  session.cancel("escape");
35
- } }, style: { display: "grid", gap: "var(--hjm-space-sm)" }, children: [_jsx("span", { children: props.prompt }), phase?.status === "error" && _jsx("span", { role: "alert", children: phase.message }), _jsxs("div", { style: { display: "flex", flexWrap: "wrap", gap: "var(--hjm-space-sm)" }, children: [_jsx(Button, { ref: cancel, tone: "ghost", disabled: busy, onClick: () => session.cancel("cancel-action"), children: props.cancelLabel }), _jsx(Button, { tone: "danger", loading: busy, disabled: busy || (props.disabled ?? false), onClick: () => { void session.confirm(); }, children: busy ? props.pendingLabel : props.confirmLabel })] })] });
35
+ } }, style: { ...props.layoutStyle, display: "grid", gap: "var(--hjm-space-sm)" }, children: [_jsx("span", { children: props.prompt }), phase?.status === "error" && _jsx("span", { role: "alert", children: phase.message }), _jsxs("div", { style: { display: "flex", flexWrap: "wrap", gap: "var(--hjm-space-sm)" }, children: [_jsx(Button, { ref: cancel, tone: "ghost", disabled: busy, onClick: () => session.cancel("cancel-action"), children: props.cancelLabel }), _jsx(Button, { tone: "danger", loading: busy, disabled: busy || (props.disabled ?? false), onClick: () => { void session.confirm(); }, children: busy ? props.pendingLabel : props.confirmLabel })] })] });
36
36
  }
37
37
  //# sourceMappingURL=inline-confirm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inline-confirm.js","sourceRoot":"","sources":["../src/inline-confirm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAA2B,MAAM,i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AE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,qBAAqB,EAAE,aAC3E,KAAC,MAAM,IAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,YAAG,KAAK,CAAC,WAAW,GAAU,EAC9H,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,YAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,GAAU,IACnL,IACF,CAAC;AACT,CAAC","sourcesContent":["import { useEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport { createAlertDialogSession, type AlertDialogSession } from \"@hjmds/design-contracts/components/alert-dialog\";\nimport { Button } from \"./actions.js\";\nexport type InlineConfirmProps = Readonly<{ label: string; prompt: string; confirmLabel: string; cancelLabel: string; pendingLabel: string; successLabel: string; errorLabel: string; disabled?: boolean; onConfirm: () => void | Promise<void> }>;\nconst emptySubscribe = () => () => {};\nconst emptySnapshot = () => null;\n/** Low-complexity confirmation using the existing async dialog session semantics. */\nexport function InlineConfirm(props: InlineConfirmProps) {\n const [session, setSession] = useState<AlertDialogSession | null>(null);\n const [done, setDone] = useState(false);\n const phase = useSyncExternalStore(session?.subscribe ?? emptySubscribe, session?.getSnapshot ?? emptySnapshot, emptySnapshot);\n const trigger = useRef<HTMLButtonElement>(null);\n const cancel = useRef<HTMLButtonElement>(null);\n useEffect(() => { if (session) cancel.current?.focus(); }, [session]);\n useEffect(() => {\n if (phase?.status !== \"closing\") return;\n const confirmed = phase.result.outcome === \"confirmed\";\n session?.completeExit();setDone(confirmed);setSession(null);\n // Cancel returns focus to the original action; success leaves a live result.\n if (!confirmed) queueMicrotask(() => trigger.current?.focus());\n }, [phase, session]);\n if (done) return <span role=\"status\">{props.successLabel}</span>;\n if (!session) return <Button ref={trigger} tone=\"danger\" disabled={props.disabled ?? false} onClick={() => setSession(createAlertDialogSession({ mode: \"confirm\", tone: \"danger\", title: props.label, description: props.prompt, confirmLabel: props.confirmLabel, cancelLabel: props.cancelLabel, onConfirm: props.onConfirm, fallbackErrorMessage: props.errorLabel }))}>{props.label}</Button>;\n const busy = phase?.status === \"busy\";\n return <div role=\"group\" aria-label={props.prompt} onKeyDown={event => { if (event.key === \"Escape\" && !busy) { event.stopPropagation();session.cancel(\"escape\"); } }} style={{ display: \"grid\", gap: \"var(--hjm-space-sm)\" }}>\n <span>{props.prompt}</span>{phase?.status === \"error\" && <span role=\"alert\">{phase.message}</span>}\n <div style={{ display: \"flex\", flexWrap: \"wrap\", gap: \"var(--hjm-space-sm)\" }}>\n <Button ref={cancel} tone=\"ghost\" disabled={busy} onClick={() => session.cancel(\"cancel-action\")}>{props.cancelLabel}</Button>\n <Button tone=\"danger\" loading={busy} disabled={busy || (props.disabled ?? false)} onClick={() => { void session.confirm(); }}>{busy ? props.pendingLabel : props.confirmLabel}</Button>\n </div>\n </div>;\n}\n"]}
1
+ {"version":3,"file":"inline-confirm.js","sourceRoot":"","sources":["../src/inline-confirm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAA2B,MAAM,iDAAiD,CAAC;AACpH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAKtC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;AACtC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;AAC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AAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,qBAAqB,EAAE,aAC3E,KAAC,MAAM,IAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,YAAG,KAAK,CAAC,WAAW,GAAU,EAC9H,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,YAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,GAAU,IACnL,IACF,CAAC;AACT,CAAC","sourcesContent":["import { useEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport { createAlertDialogSession, type AlertDialogSession } from \"@hjmds/design-contracts/components/alert-dialog\";\nimport { Button } from \"./actions.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nexport type InlineConfirmProps = Readonly<{ label: string; prompt: string; confirmLabel: string; cancelLabel: string; pendingLabel: string; successLabel: string; errorLabel: string; disabled?: boolean; onConfirm: () => void | Promise<void>;\n /** Canonical layout-only placement, applied to whichever root the current phase renders so the block does not jump. */\n layoutStyle?: HjmCompositionStyleProp }>;\nconst emptySubscribe = () => () => {};\nconst emptySnapshot = () => null;\n/** Low-complexity confirmation using the existing async dialog session semantics. */\nexport function InlineConfirm(props: InlineConfirmProps) {\n const [session, setSession] = useState<AlertDialogSession | null>(null);\n const [done, setDone] = useState(false);\n const phase = useSyncExternalStore(session?.subscribe ?? emptySubscribe, session?.getSnapshot ?? emptySnapshot, emptySnapshot);\n const trigger = useRef<HTMLButtonElement>(null);\n const cancel = useRef<HTMLButtonElement>(null);\n useEffect(() => { if (session) cancel.current?.focus(); }, [session]);\n useEffect(() => {\n if (phase?.status !== \"closing\") return;\n const confirmed = phase.result.outcome === \"confirmed\";\n session?.completeExit();setDone(confirmed);setSession(null);\n // Cancel returns focus to the original action; success leaves a live result.\n if (!confirmed) queueMicrotask(() => trigger.current?.focus());\n }, [phase, session]);\n if (done) return <span role=\"status\" style={props.layoutStyle}>{props.successLabel}</span>;\n if (!session) return <Button ref={trigger} tone=\"danger\" disabled={props.disabled ?? false} {...(props.layoutStyle === undefined ? {} : { layoutStyle: props.layoutStyle })} onClick={() => setSession(createAlertDialogSession({ mode: \"confirm\", tone: \"danger\", title: props.label, description: props.prompt, confirmLabel: props.confirmLabel, cancelLabel: props.cancelLabel, onConfirm: props.onConfirm, fallbackErrorMessage: props.errorLabel }))}>{props.label}</Button>;\n const busy = phase?.status === \"busy\";\n return <div role=\"group\" aria-label={props.prompt} onKeyDown={event => { if (event.key === \"Escape\" && !busy) { event.stopPropagation();session.cancel(\"escape\"); } }} style={{ ...props.layoutStyle, display: \"grid\", gap: \"var(--hjm-space-sm)\" }}>\n <span>{props.prompt}</span>{phase?.status === \"error\" && <span role=\"alert\">{phase.message}</span>}\n <div style={{ display: \"flex\", flexWrap: \"wrap\", gap: \"var(--hjm-space-sm)\" }}>\n <Button ref={cancel} tone=\"ghost\" disabled={busy} onClick={() => session.cancel(\"cancel-action\")}>{props.cancelLabel}</Button>\n <Button tone=\"danger\" loading={busy} disabled={busy || (props.disabled ?? false)} onClick={() => { void session.confirm(); }}>{busy ? props.pendingLabel : props.confirmLabel}</Button>\n </div>\n </div>;\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ReactionPickerProps } from "../reaction-picker.js";
3
+ type Props = ReactionPickerProps & Readonly<{
4
+ closeLabel: string;
5
+ menuAction?: Readonly<{
6
+ label: string;
7
+ onPress(): void;
8
+ disabled?: boolean;
9
+ }>;
10
+ children: ReactNode;
11
+ interactiveContent?: boolean;
12
+ }>;
13
+ /** Chat-specific trigger translation; Popover retains collision, focus, Escape and outside dismissal. */
14
+ export declare function MessageReactions({ children, closeLabel, menuAction, interactiveContent, ...picker }: Props): import("react").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=message-reactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-reactions.d.ts","sourceRoot":"","sources":["../../src/internal/message-reactions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjF,KAAK,KAAK,GAAG,mBAAmB,GAAG,QAAQ,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAA,OAAO,IAAG,IAAI,CAAC;QAAA,QAAQ,CAAC,EAAC,OAAO,CAAA;KAAC,CAAC,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,kBAAkB,CAAC,EAAC,OAAO,CAAA;CAAE,CAAC,CAAC;AAC9L,yGAAyG;AACzG,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAwB,EAAE,GAAG,MAAM,EAAE,EAAE,KAAK,+BA2BhH"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { screenPatternRecipe } from "@hjmds/design-contracts/screen-patterns";
4
+ import { Button } from "../actions.js";
5
+ import { Popover } from "../popover.js";
6
+ import { ReactionPicker } from "../reaction-picker.js";
7
+ /** Chat-specific trigger translation; Popover retains collision, focus, Escape and outside dismissal. */
8
+ export function MessageReactions({ children, closeLabel, menuAction, interactiveContent = false, ...picker }) {
9
+ const [open, setOpen] = useState(false);
10
+ const press = useRef(null);
11
+ const held = useRef(false);
12
+ const cancel = () => { if (press.current)
13
+ clearTimeout(press.current.timer); press.current = null; };
14
+ useEffect(() => () => { if (press.current)
15
+ clearTimeout(press.current.timer); }, []);
16
+ useEffect(() => { if (picker.disabled) {
17
+ cancel();
18
+ setOpen(false);
19
+ } }, [picker.disabled]);
20
+ return _jsxs(Popover, { open: open && !picker.disabled, onOpenChange: (next) => { if (!next)
21
+ setOpen(false); }, title: picker.label, closeLabel: closeLabel, descriptor: { placement: "top", align: "start" }, className: "hjm-message-reactions", trigger: _jsx("div", { className: "hjm-chat-message__bubble", tabIndex: picker.disabled ? -1 : 0, role: interactiveContent ? "group" : "button", "aria-label": picker.label, "aria-disabled": picker.disabled, onContextMenu: event => { event.preventDefault(); cancel(); if (!picker.disabled)
22
+ setOpen(true); },
23
+ // Only the bubble itself opens reactions: with interactiveContent, Enter/Space on a nested
24
+ // link or button must keep its native activation instead of being swallowed here.
25
+ onKeyDown: event => { if (event.target === event.currentTarget && (event.key === "Enter" || event.key === " ") && !picker.disabled) {
26
+ event.preventDefault();
27
+ setOpen(true);
28
+ } }, onPointerDown: event => {
29
+ if (picker.disabled || event.button !== 0 || event.target.closest("button,a,input,textarea"))
30
+ return;
31
+ cancel();
32
+ held.current = false;
33
+ const { clientX: x, clientY: y } = event;
34
+ press.current = { x, y, timer: setTimeout(() => { held.current = true; press.current = null; setOpen(true); }, screenPatternRecipe.reactionHoldMs) };
35
+ }, onPointerMove: event => { const start = press.current; if (start && Math.hypot(event.clientX - start.x, event.clientY - start.y) > screenPatternRecipe.reactionMoveTolerance)
36
+ cancel(); }, onPointerCancel: cancel, onPointerLeave: cancel, onPointerUp: cancel, onClickCapture: event => { if (held.current) {
37
+ event.preventDefault();
38
+ event.stopPropagation();
39
+ held.current = false;
40
+ } }, children: children }), children: [_jsx(ReactionPicker, { ...picker, layout: "strip", onValueChange: value => { picker.onValueChange(value); setOpen(false); } }), menuAction ? _jsx(Button, { tone: "ghost", disabled: menuAction.disabled, onClick: () => { setOpen(false); menuAction.onPress(); }, children: menuAction.label }) : null] });
41
+ }
42
+ //# sourceMappingURL=message-reactions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-reactions.js","sourceRoot":"","sources":["../../src/internal/message-reactions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,cAAc,EAA4B,MAAM,uBAAuB,CAAC;AAGjF,yGAAyG;AACzG,MAAM,UAAU,gBAAgB,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,GAAC,KAAK,EAAE,GAAG,MAAM,EAAS;IAC/G,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,MAAM,CAAwE,IAAI,CAAC,CAAC;IAClG,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,MAAM,GAAG,GAAG,EAAE,GAAG,IAAI,KAAK,CAAC,OAAO;QAAE,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACrG,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,KAAK,CAAC,OAAO;QAAE,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACrF,SAAS,CAAC,GAAG,EAAE,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QAAC,MA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CAAC,CAAC,CAAC,YACzH,QAAQ,GAAO,aACjB,KAAC,cAAc,OAAK,MAAM,EAAE,MAAM,EAAC,OAAO,EAAC,aAAa,EAAE,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAI,EACtH,UAAU,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,YAAG,UAAU,CAAC,KAAK,GAAU,CAAC,CAAC,CAAC,IAAI,IACtJ,CAAC;AACb,CAAC","sourcesContent":["import { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { screenPatternRecipe } from \"@hjmds/design-contracts/screen-patterns\";\nimport { Button } from \"../actions.js\";\nimport { Popover } from \"../popover.js\";\nimport { ReactionPicker, type ReactionPickerProps } from \"../reaction-picker.js\";\n\ntype Props = ReactionPickerProps & Readonly<{ closeLabel: string; menuAction?: Readonly<{label:string;onPress():void;disabled?:boolean}>; children: ReactNode; interactiveContent?:boolean }>;\n/** Chat-specific trigger translation; Popover retains collision, focus, Escape and outside dismissal. */\nexport function MessageReactions({ children, closeLabel, menuAction, interactiveContent=false, ...picker }: Props) {\n const [open, setOpen] = useState(false);\n const press = useRef<{ timer: ReturnType<typeof setTimeout>; x: number; y: number } | null>(null);\n const held = useRef(false);\n const cancel = () => { if (press.current) clearTimeout(press.current.timer); press.current = null; };\n useEffect(() => () => { if (press.current) clearTimeout(press.current.timer); }, []);\n useEffect(() => { if (picker.disabled) { cancel(); setOpen(false); } }, [picker.disabled]);\n return <Popover open={open && !picker.disabled} onOpenChange={(next) => { if (!next) setOpen(false); }} title={picker.label} closeLabel={closeLabel}\n descriptor={{ placement: \"top\", align: \"start\" }} className=\"hjm-message-reactions\" trigger={<div\n className=\"hjm-chat-message__bubble\" tabIndex={picker.disabled ? -1 : 0} role={interactiveContent?\"group\":\"button\"} aria-label={picker.label} aria-disabled={picker.disabled}\n onContextMenu={event => { event.preventDefault(); cancel(); if (!picker.disabled) setOpen(true); }}\n // Only the bubble itself opens reactions: with interactiveContent, Enter/Space on a nested\n // link or button must keep its native activation instead of being swallowed here.\n onKeyDown={event => { if (event.target === event.currentTarget && (event.key === \"Enter\" || event.key === \" \") && !picker.disabled) { event.preventDefault(); setOpen(true); } }}\n onPointerDown={event => {\n if (picker.disabled || event.button !== 0 || (event.target as HTMLElement).closest(\"button,a,input,textarea\")) return;\n cancel(); held.current = false;\n const { clientX: x, clientY: y } = event;\n press.current = { x, y, timer: setTimeout(() => { held.current = true; press.current = null; setOpen(true); }, screenPatternRecipe.reactionHoldMs) };\n }}\n onPointerMove={event => { const start = press.current; if (start && Math.hypot(event.clientX - start.x, event.clientY - start.y) > screenPatternRecipe.reactionMoveTolerance) cancel(); }}\n onPointerCancel={cancel} onPointerLeave={cancel} onPointerUp={cancel}\n onClickCapture={event => { if (held.current) { event.preventDefault(); event.stopPropagation(); held.current = false; } }}\n >{children}</div>}>\n <ReactionPicker {...picker} layout=\"strip\" onValueChange={value => { picker.onValueChange(value); setOpen(false); }} />\n {menuAction ? <Button tone=\"ghost\" disabled={menuAction.disabled} onClick={() => { setOpen(false); menuAction.onPress(); }}>{menuAction.label}</Button> : null}\n </Popover>;\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { type HTMLAttributes } from "react";
2
+ import { type SpinnerSize, type SpinnerTone } from "@hjmds/design-contracts/recipes";
3
+ import type { HjmCompositionStyleProp } from "../composition-style.js";
4
+ export type SpinnerProps = HTMLAttributes<HTMLSpanElement> & Readonly<{
5
+ label: string;
6
+ size?: SpinnerSize;
7
+ tone?: SpinnerTone;
8
+ /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
9
+ layoutStyle?: HjmCompositionStyleProp;
10
+ }>;
11
+ export declare const Spinner: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & Readonly<{
12
+ label: string;
13
+ size?: SpinnerSize;
14
+ tone?: SpinnerTone;
15
+ /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
16
+ layoutStyle?: HjmCompositionStyleProp;
17
+ }> & import("react").RefAttributes<HTMLSpanElement>>;
18
+ //# sourceMappingURL=spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/internal/spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACpG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGvE,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,GACxD,QAAQ,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEL,eAAO,MAAM,OAAO;WAPT,MAAM;WACN,WAAW;WACX,WAAW;IAClB,gGAAgG;kBAClF,uBAAuB;oDA6BvC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Shared by feedback and screen shells without pulling unrelated feedback UI
3
+ // into the lightweight screens entry. The public import remains /feedback.
4
+ import { forwardRef } from "react";
5
+ import { spinnerRecipe } from "@hjmds/design-contracts/recipes";
6
+ import { classNames } from "../internal.js";
7
+ export const Spinner = forwardRef(function Spinner({ label, size = spinnerRecipe.defaults.size, tone = spinnerRecipe.defaults.tone, className, layoutStyle, ...props }, ref) {
8
+ return (_jsxs("span", { ...props, style: { ...props.style, ...layoutStyle }, ref: ref, className: classNames("hjm-spinner", className), "data-size": size, "data-tone": tone, role: "status", "aria-live": "polite", children: [_jsx("span", { className: "hjm-spinner__glyph", "aria-hidden": "true" }), _jsx("span", { className: "hjm-visually-hidden", children: label })] }));
9
+ });
10
+ //# sourceMappingURL=spinner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../src/internal/spinner.tsx"],"names":[],"mappings":";AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,OAAO,EAAE,UAAU,EAAuB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,aAAa,EAAsC,MAAM,iCAAiC,CAAC;AAEpG,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAW5C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAgC,SAAS,OAAO,CAC/E,EACE,KAAK,EACL,IAAI,GAAG,aAAa,CAAC,QAAQ,CAAC,IAAI,EAClC,IAAI,GAAG,aAAa,CAAC,QAAQ,CAAC,IAAI,EAClC,SAAS,EACT,WAAW,EACX,GAAG,KAAK,EACT,EACD,GAAG;IAEH,OAAO,CACL,mBACM,KAAK,EACT,KAAK,EAAE,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE,GAAG,WAAW,EAAE,EACzC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,eACpC,IAAI,eACJ,IAAI,EACf,IAAI,EAAC,QAAQ,eACH,QAAQ,aAElB,eAAM,SAAS,EAAC,oBAAoB,iBAAa,MAAM,GAAG,EAC1D,eAAM,SAAS,EAAC,qBAAqB,YAAE,KAAK,GAAQ,IAC/C,CACR,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Shared by feedback and screen shells without pulling unrelated feedback UI\n// into the lightweight screens entry. The public import remains /feedback.\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { spinnerRecipe, type SpinnerSize, type SpinnerTone } from \"@hjmds/design-contracts/recipes\";\nimport type { HjmCompositionStyleProp } from \"../composition-style.js\";\nimport { classNames } from \"../internal.js\";\n\nexport type SpinnerProps = HTMLAttributes<HTMLSpanElement> &\n Readonly<{\n label: string;\n size?: SpinnerSize;\n tone?: SpinnerTone;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nexport const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(function Spinner(\n {\n label,\n size = spinnerRecipe.defaults.size,\n tone = spinnerRecipe.defaults.tone,\n className,\n layoutStyle,\n ...props\n },\n ref,\n) {\n return (\n <span\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={ref}\n className={classNames(\"hjm-spinner\", className)}\n data-size={size}\n data-tone={tone}\n role=\"status\"\n aria-live=\"polite\"\n >\n <span className=\"hjm-spinner__glyph\" aria-hidden=\"true\" />\n <span className=\"hjm-visually-hidden\">{label}</span>\n </span>\n );\n});\n\n"]}
package/dist/layout.d.ts CHANGED
@@ -42,6 +42,8 @@ export type LayoutProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & Rea
42
42
  mainProps?: Omit<LayoutRegionProps, "id" | "tabIndex">;
43
43
  footerProps?: LayoutRegionProps;
44
44
  skipLinkProps?: Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "href">;
45
+ /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
46
+ layoutStyle?: HjmCompositionStyleProp;
45
47
  }>;
46
48
  /** Accessible Web app shell with real landmarks and bypass navigation. */
47
49
  export declare const Layout: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children"> & Readonly<{
@@ -57,6 +59,8 @@ export declare const Layout: import("react").ForwardRefExoticComponent<Omit<HTML
57
59
  mainProps?: Omit<LayoutRegionProps, "id" | "tabIndex">;
58
60
  footerProps?: LayoutRegionProps;
59
61
  skipLinkProps?: Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "href">;
62
+ /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
63
+ layoutStyle?: HjmCompositionStyleProp;
60
64
  }> & import("react").RefAttributes<HTMLDivElement>>;
61
65
  export type TextProps = Omit<HTMLAttributes<HTMLElement>, "children"> & Readonly<{
62
66
  children: ReactNode;
@@ -130,11 +134,15 @@ export declare const Container: import("react").ForwardRefExoticComponent<Omit<H
130
134
  export type AspectRatioProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & Readonly<{
131
135
  children?: ReactNode;
132
136
  ratio?: AspectRatioValue;
137
+ /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
138
+ layoutStyle?: HjmCompositionStyleProp;
133
139
  }>;
134
140
  /** Responsive media frame. Products retain object-fit, crop, and content semantics. */
135
141
  export declare const AspectRatio: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children"> & Readonly<{
136
142
  children?: ReactNode;
137
143
  ratio?: AspectRatioValue;
144
+ /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
145
+ layoutStyle?: HjmCompositionStyleProp;
138
146
  }> & import("react").RefAttributes<HTMLDivElement>>;
139
147
  export type VisuallyHiddenProps = HTMLAttributes<HTMLSpanElement> & Readonly<{
140
148
  children: ReactNode;
@@ -171,6 +179,8 @@ export type SectionProps = Omit<HTMLAttributes<HTMLElement>, "children" | "title
171
179
  action?: ReactNode;
172
180
  children: ReactNode;
173
181
  headingLevel?: 2 | 3 | 4 | 5 | 6;
182
+ /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
183
+ layoutStyle?: HjmCompositionStyleProp;
174
184
  }>;
175
185
  /** Large-text-safe semantic content section with an optional header action. */
176
186
  export declare const Section: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "title" | "children"> & Readonly<{
@@ -179,6 +189,8 @@ export declare const Section: import("react").ForwardRefExoticComponent<Omit<HTM
179
189
  action?: ReactNode;
180
190
  children: ReactNode;
181
191
  headingLevel?: 2 | 3 | 4 | 5 | 6;
192
+ /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */
193
+ layoutStyle?: HjmCompositionStyleProp;
182
194
  }> & import("react").RefAttributes<HTMLElement>>;
183
195
  export type { GridGap };
184
196
  export type { AspectRatioValue, ContainerGutter, ContainerSize };
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,OAAO,EACb,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAEnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,GAAG,EACT,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,YAAY,EACV,cAAc,EACd,aAAa,EACb,WAAW,GACZ,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,QAAQ,GACT,MAAM,iCAAiC,CAAC;A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C,GAChF,QAAQ,CAAC;IACP,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEL,+EAA+E;AAC/E,eAAO,MAAM,OAAO;YAVR,SAAS;kBACH,SAAS;aACd,SAAS;cACR,SAAS;mBACJ,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,gGAAgG;kBAClF,uBAAuB;gDAuCvC,CAAC;AAEH,YAAY,EAAE,OAAO,EAAE,CAAC;AACxB,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
package/dist/layout.js CHANGED
@@ -19,7 +19,7 @@ function assertMainId(id) {
19
19
  }
20
20
  }
21
21
  /** Accessible Web app shell with real landmarks and bypass navigation. */
22
- export const Layout = forwardRef(function Layout({ children, header, footer, sidebar, skipLinkLabel, mainId: mainIdProp, mainRef: forwardedMainRef, headerProps, mainProps, footerProps, skipLinkProps, className, ...props }, ref) {
22
+ export const Layout = forwardRef(function Layout({ children, header, footer, sidebar, skipLinkLabel, mainId: mainIdProp, mainRef: forwardedMainRef, headerProps, mainProps, footerProps, skipLinkProps, className, layoutStyle, ...props }, ref) {
23
23
  const generatedId = `hjm-main-${useId().replaceAll(":", "")}`;
24
24
  const internalMainRef = useRef(null);
25
25
  const mainId = mainIdProp ?? generatedId;
@@ -83,7 +83,7 @@ export const Layout = forwardRef(function Layout({ children, header, footer, sid
83
83
  main.focus({ preventScroll: true });
84
84
  main.scrollIntoView?.({ block: "start" });
85
85
  };
86
- return (_jsxs("div", { ...props, ref: ref, className: classNames("hjm-layout", className), "data-hjm-component": "Layout", "data-sidebar-mode": sidebar?.mode ?? "none", children: [skipLinkLabel === undefined ? null : (_jsx("a", { ...restSkipLinkProps, href: `#${mainId}`, className: classNames("hjm-layout__skip-link", skipLinkClassName), onClick: moveFocusToMain, children: skipLinkLabel })), hasHeader ? (_jsx("header", { ...restHeaderProps, className: classNames("hjm-layout__header", headerClassName), children: header })) : null, sidebarNode, _jsx("main", { ...restMainProps, ref: composeRefs(internalMainRef, forwardedMainRef), id: mainId, className: classNames("hjm-layout__main", mainClassName), tabIndex: -1, style: {
86
+ return (_jsxs("div", { ...props, style: { ...props.style, ...layoutStyle }, ref: ref, className: classNames("hjm-layout", className), "data-hjm-component": "Layout", "data-sidebar-mode": sidebar?.mode ?? "none", children: [skipLinkLabel === undefined ? null : (_jsx("a", { ...restSkipLinkProps, href: `#${mainId}`, className: classNames("hjm-layout__skip-link", skipLinkClassName), onClick: moveFocusToMain, children: skipLinkLabel })), hasHeader ? (_jsx("header", { ...restHeaderProps, className: classNames("hjm-layout__header", headerClassName), children: header })) : null, sidebarNode, _jsx("main", { ...restMainProps, ref: composeRefs(internalMainRef, forwardedMainRef), id: mainId, className: classNames("hjm-layout__main", mainClassName), tabIndex: -1, style: {
87
87
  maxInlineSize: layoutRecipe.main.maxWidth,
88
88
  paddingInline: layoutRecipe.main.paddingHorizontal,
89
89
  ...mainStyle,
@@ -154,9 +154,9 @@ export const Container = forwardRef(function Container({ size, gutter, className
154
154
  } }));
155
155
  });
156
156
  /** Responsive media frame. Products retain object-fit, crop, and content semantics. */
157
- export const AspectRatio = forwardRef(function AspectRatio({ ratio, className, style, ...props }, ref) {
157
+ export const AspectRatio = forwardRef(function AspectRatio({ ratio, className, layoutStyle, style, ...props }, ref) {
158
158
  const resolved = resolveAspectRatioDescriptor(ratio === undefined ? {} : { ratio });
159
- return (_jsx("div", { ...props, ref: ref, className: classNames("hjm-aspect-ratio", className), "data-ratio": resolved.source, style: { aspectRatio: resolved.ratio, ...style } }));
159
+ return (_jsx("div", { ...props, ref: ref, className: classNames("hjm-aspect-ratio", className), "data-ratio": resolved.source, style: { ...layoutStyle, aspectRatio: resolved.ratio, ...style } }));
160
160
  });
161
161
  /** Keeps meaningful copy available to assistive technology without visible layout. */
162
162
  export const VisuallyHidden = forwardRef(function VisuallyHidden({ className, ...props }, ref) {
@@ -191,8 +191,8 @@ export const Grid = forwardRef(function Grid({ columns, gap, minColumnWidth, win
191
191
  } }));
192
192
  });
193
193
  /** Large-text-safe semantic content section with an optional header action. */
194
- export const Section = forwardRef(function Section({ title, description, action, children, headingLevel = 2, className, ...props }, ref) {
194
+ export const Section = forwardRef(function Section({ title, description, action, children, headingLevel = 2, className, layoutStyle, style, ...props }, ref) {
195
195
  const hasHeader = title !== undefined || description !== undefined || action !== undefined;
196
- return (_jsxs("section", { ...props, ref: ref, className: classNames("hjm-section", className), children: [hasHeader ? (_jsxs("header", { className: "hjm-section__header", children: [_jsxs("div", { className: "hjm-section__copy", children: [title === undefined ? null : createElement(`h${headingLevel}`, { className: "hjm-section__title" }, title), description === undefined ? null : (_jsx("div", { className: "hjm-section__description", children: description }))] }), action === undefined ? null : _jsx("div", { className: "hjm-section__action", children: action })] })) : null, _jsx("div", { className: "hjm-section__content", children: children })] }));
196
+ return (_jsxs("section", { ...props, style: { ...style, ...layoutStyle }, ref: ref, className: classNames("hjm-section", className), children: [hasHeader ? (_jsxs("header", { className: "hjm-section__header", children: [_jsxs("div", { className: "hjm-section__copy", children: [title === undefined ? null : createElement(`h${headingLevel}`, { className: "hjm-section__title" }, title), description === undefined ? null : (_jsx("div", { className: "hjm-section__description", children: description }))] }), action === undefined ? null : _jsx("div", { className: "hjm-section__action", children: action })] })) : null, _jsx("div", { className: "hjm-section__content", children: children })] }));
197
197
  });
198
198
  //# sourceMappingURL=layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,GAGlB,MAAM,8BA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CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAWH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAA4B,SAAS,OAAO,CAC3E,EACE,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,YAAY,GAAG,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG;IAEH,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,WAAW,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAC;IAC3F,OAAO,CACL,sBAAa,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,aAC1E,SAAS,CAAC,CAAC,CAAC,CACX,kBAAQ,SAAS,EAAC,qBAAqB,aACrC,eAAK,SAAS,EAAC,mBAAmB,aAC/B,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CACzC,IAAI,YAAY,EAAE,EAClB,EAAE,SAAS,EAAE,oBAAoB,EAAE,EACnC,KAAK,CACN,EACA,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAClC,cAAK,SAAS,EAAC,0BAA0B,YAAE,WAAW,GAAO,CAC9D,IACG,EACL,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,qBAAqB,YAAE,MAAM,GAAO,IAC3E,CACV,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,sBAAsB,YAAE,QAAQ,GAAO,IAC9C,CACX,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n resolveGridLayout,\n type GridDescriptor,\n type GridGap,\n} from \"@hjmds/design-contracts/grid\";\nimport {\n resolveAspectRatioDescriptor,\n type AspectRatioValue,\n} from \"@hjmds/design-contracts/components/aspect-ratio\";\nimport {\n resolveContainerDescriptor,\n type ContainerGutter,\n type ContainerSize,\n} from \"@hjmds/design-contracts/components/container\";\nimport {\n layoutRecipe,\n validateLayoutWebDescriptor,\n type LayoutSidebarDescriptor,\n type LayoutSidebarRole,\n} from \"@hjmds/design-contracts/components/layout\";\nimport {\n surfaceDefaults,\n surfaceGeometry,\n surfaceRecipe,\n type SurfacePadding,\n type SurfaceRadius,\n type SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n stackRecipe,\n textRecipe,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type TextEmphasis,\n type TextTone,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { TextVariant } from \"@hjmds/design-contracts/foundations\";\nimport {\n createElement,\n forwardRef,\n useId,\n useRef,\n type AnchorHTMLAttributes,\n type HTMLAttributes,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n classNames,\n composeRefs,\n useElementWidth,\n useWindowWidth,\n} from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type {\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nexport type {\n StackAlign,\n StackAxis,\n StackGap,\n StackJustify,\n TextEmphasis,\n TextTone,\n} from \"@hjmds/design-contracts/recipes\";\n\ntype LayoutRegionProps = Omit<\n HTMLAttributes<HTMLElement>,\n \"children\" | \"role\"\n>;\n\ntype LayoutSidebarBase = Readonly<{\n children: ReactNode;\n role: LayoutSidebarRole;\n label: string;\n landmarkProps?: Omit<LayoutRegionProps, \"aria-label\">;\n landmarkRef?: Ref<HTMLElement>;\n}>;\n\n/**\n * A persistent sidebar is rendered in the shell grid. An overlay sidebar is\n * deliberately handed to the product's SidePanel (or equivalent) through\n * `renderOverlay`; Layout never owns a second open/dismiss lifecycle.\n */\nexport type LayoutSidebar =\n | (LayoutSidebarBase &\n Readonly<{\n mode: \"persistent\";\n renderOverlay?: never;\n }>)\n | (LayoutSidebarBase &\n Readonly<{\n mode: \"overlay\";\n renderOverlay(sidebarLandmark: ReactElement): ReactNode;\n }>);\n\nexport type LayoutProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children: ReactNode;\n header?: ReactNode;\n footer?: ReactNode;\n sidebar?: LayoutSidebar;\n skipLinkLabel?: string;\n /** Stable product id for deep links; a hydration-safe id is generated when omitted. */\n mainId?: string;\n mainRef?: Ref<HTMLElement>;\n headerProps?: LayoutRegionProps;\n mainProps?: Omit<LayoutRegionProps, \"id\" | \"tabIndex\">;\n footerProps?: LayoutRegionProps;\n skipLinkProps?: Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n \"children\" | \"href\"\n >;\n }>;\n\nfunction hasRegionContent(content: ReactNode | undefined): boolean {\n return content !== undefined && content !== null && content !== false;\n}\n\nfunction assertMainId(id: string): void {\n if (id.trim().length === 0) {\n throw new TypeError(\"Layout mainId must not be empty\");\n }\n if (/\\s/u.test(id)) {\n throw new TypeError(\"Layout mainId must not contain whitespace\");\n }\n}\n\n/** Accessible Web app shell with real landmarks and bypass navigation. */\nexport const Layout = forwardRef<HTMLDivElement, LayoutProps>(function Layout(\n {\n children,\n header,\n footer,\n sidebar,\n skipLinkLabel,\n mainId: mainIdProp,\n mainRef: forwardedMainRef,\n headerProps,\n mainProps,\n footerProps,\n skipLinkProps,\n className,\n ...props\n },\n ref,\n) {\n const generatedId = `hjm-main-${useId().replaceAll(\":\", \"\")}`;\n const internalMainRef = useRef<HTMLElement>(null);\n const mainId = mainIdProp ?? generatedId;\n assertMainId(mainId);\n\n const hasHeader = hasRegionContent(header);\n const hasFooter = hasRegionContent(footer);\n const descriptor = {\n ...(hasHeader ? { hasHeader: true } : {}),\n ...(hasFooter ? { hasFooter: true } : {}),\n ...(sidebar === undefined\n ? {}\n : {\n sidebar: {\n role: sidebar.role,\n mode: sidebar.mode,\n label: sidebar.label,\n } satisfies LayoutSidebarDescriptor,\n }),\n ...(skipLinkLabel === undefined ? {} : { skipLinkLabel }),\n };\n validateLayoutWebDescriptor(descriptor);\n\n if (\n sidebar?.mode === \"overlay\" &&\n typeof sidebar.renderOverlay !== \"function\"\n ) {\n throw new TypeError(\n \"Layout overlay sidebar requires renderOverlay so SidePanel owns its lifecycle\",\n );\n }\n\n const {\n className: headerClassName,\n ...restHeaderProps\n } = headerProps ?? {};\n const {\n className: mainClassName,\n style: mainStyle,\n ...restMainProps\n } = mainProps ?? {};\n const {\n className: footerClassName,\n ...restFooterProps\n } = footerProps ?? {};\n const {\n className: skipLinkClassName,\n onClick: onSkipLinkClick,\n ...restSkipLinkProps\n } = skipLinkProps ?? {};\n\n let sidebarNode: ReactNode;\n if (sidebar !== undefined) {\n const {\n className: sidebarClassName,\n style: sidebarStyle,\n ...restSidebarProps\n } = sidebar.landmarkProps ?? {};\n const sidebarLandmark = createElement(\n sidebar.role === \"navigation\" ? \"nav\" : \"aside\",\n {\n ...restSidebarProps,\n ref: sidebar.landmarkRef,\n className: classNames(\"hjm-layout__sidebar\", sidebarClassName),\n \"aria-label\": sidebar.label,\n \"data-mode\": sidebar.mode,\n style: {\n ...(sidebar.mode === \"persistent\"\n ? { inlineSize: layoutRecipe.sidebar.width }\n : {}),\n ...sidebarStyle,\n },\n },\n sidebar.children,\n );\n sidebarNode = sidebar.mode === \"overlay\"\n ? sidebar.renderOverlay(sidebarLandmark)\n : sidebarLandmark;\n }\n\n const moveFocusToMain = (event: MouseEvent<HTMLAnchorElement>) => {\n onSkipLinkClick?.(event);\n if (event.defaultPrevented) return;\n const main = internalMainRef.current;\n if (main === null) return;\n event.preventDefault();\n const url = new URL(window.location.href);\n url.hash = mainId;\n window.history.replaceState(window.history.state, \"\", url);\n main.focus({ preventScroll: true });\n main.scrollIntoView?.({ block: \"start\" });\n };\n\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-layout\", className)}\n data-hjm-component=\"Layout\"\n data-sidebar-mode={sidebar?.mode ?? \"none\"}\n >\n {skipLinkLabel === undefined ? null : (\n <a\n {...restSkipLinkProps}\n href={`#${mainId}`}\n className={classNames(\n \"hjm-layout__skip-link\",\n skipLinkClassName,\n )}\n onClick={moveFocusToMain}\n >\n {skipLinkLabel}\n </a>\n )}\n {hasHeader ? (\n <header\n {...restHeaderProps}\n className={classNames(\"hjm-layout__header\", headerClassName)}\n >\n {header}\n </header>\n ) : null}\n {sidebarNode}\n <main\n {...restMainProps}\n ref={composeRefs(internalMainRef, forwardedMainRef)}\n id={mainId}\n className={classNames(\"hjm-layout__main\", mainClassName)}\n tabIndex={-1}\n style={{\n maxInlineSize: layoutRecipe.main.maxWidth,\n paddingInline: layoutRecipe.main.paddingHorizontal,\n ...mainStyle,\n }}\n >\n {children}\n </main>\n {hasFooter ? (\n <footer\n {...restFooterProps}\n className={classNames(\"hjm-layout__footer\", footerClassName)}\n >\n {footer}\n </footer>\n ) : null}\n </div>\n );\n});\n\nexport type TextProps = Omit<HTMLAttributes<HTMLElement>, \"children\"> &\n Readonly<{\n children: ReactNode;\n as?: \"span\" | \"p\" | \"div\" | \"strong\" | \"small\";\n variant?: TextVariant;\n tone?: TextTone;\n emphasis?: TextEmphasis;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n {\n as = \"span\",\n variant = textRecipe.defaults.variant,\n tone = textRecipe.defaults.tone,\n emphasis = textRecipe.defaults.emphasis,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n return createElement(as, {\n ...props,\n ref,\n className: classNames(\"hjm-text\", className),\n \"data-variant\": variant,\n \"data-tone\": tone,\n \"data-emphasis\": emphasis,\n // Placement wins over the legacy `style`, matching Surface's ordering.\n style: { ...style, ...layoutStyle },\n });\n});\n\nexport type SurfaceProps = HTMLAttributes<HTMLElement> &\n Readonly<{\n as?: \"div\" | \"section\" | \"article\";\n tone?: SurfaceTone;\n bordered?: boolean;\n padding?: SurfacePadding;\n radius?: SurfaceRadius;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Surface = forwardRef<HTMLElement, SurfaceProps>(function Surface(\n {\n as = \"div\",\n tone = surfaceDefaults.tone,\n bordered,\n padding = surfaceDefaults.padding,\n radius = surfaceDefaults.radius,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n const contract = surfaceRecipe[tone];\n return createElement(as, {\n ...props,\n ref,\n className: classNames(\"hjm-surface\", className),\n \"data-tone\": tone,\n // Canvas framing is the default; preserve the caller's explicit border opt-out.\n \"data-bordered\": bordered ?? (surfaceDefaults.bordered || contract.borderAlways),\n \"data-elevated\": contract.elevated,\n \"data-clips\": contract.clipsContent,\n \"data-padding\": padding,\n \"data-radius\": radius,\n style: {\n padding: surfaceGeometry.paddings[padding],\n borderRadius: surfaceGeometry.radii[radius],\n ...style,\n ...layoutStyle,\n },\n });\n});\n\nexport type StackProps = HTMLAttributes<HTMLDivElement> &\n Readonly<{\n axis?: StackAxis;\n gap?: StackGap;\n align?: StackAlign;\n justify?: StackJustify;\n wrap?: boolean;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nconst justifyValues = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n between: \"space-between\",\n} as const;\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n {\n axis = stackRecipe.defaults.axis,\n gap = stackRecipe.defaults.gap,\n align = stackRecipe.defaults.align,\n justify = stackRecipe.defaults.justify,\n wrap = stackRecipe.defaults.wrap,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-stack\", className)}\n data-axis={axis}\n data-gap={gap}\n style={{\n display: \"flex\",\n flexDirection: stackRecipe.axes[axis],\n gap: stackRecipe.gaps[gap],\n alignItems: align === \"start\" || align === \"end\" ? `flex-${align}` : align,\n justifyContent: justifyValues[justify],\n flexWrap: wrap ? \"wrap\" : \"nowrap\",\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type ContainerProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children?: ReactNode;\n size?: ContainerSize;\n gutter?: ContainerGutter;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** A centered, token-guttered content boundary shared with Native large screens. */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(function Container(\n { size, gutter, className, layoutStyle, style, ...props },\n ref,\n) {\n const resolved = resolveContainerDescriptor({\n ...(size === undefined ? {} : { size }),\n ...(gutter === undefined ? {} : { gutter }),\n });\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-container\", className)}\n data-size={resolved.size}\n data-gutter={resolved.gutter}\n style={{\n maxInlineSize: resolved.maxWidth ?? undefined,\n paddingInline: resolved.paddingInline,\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type AspectRatioProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children?: ReactNode;\n ratio?: AspectRatioValue;\n }>;\n\n/** Responsive media frame. Products retain object-fit, crop, and content semantics. */\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { ratio, className, style, ...props },\n ref,\n) {\n const resolved = resolveAspectRatioDescriptor(\n ratio === undefined ? {} : { ratio },\n );\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-aspect-ratio\", className)}\n data-ratio={resolved.source}\n style={{ aspectRatio: resolved.ratio, ...style }}\n />\n );\n});\n\nexport type VisuallyHiddenProps = HTMLAttributes<HTMLSpanElement> &\n Readonly<{ children: ReactNode }>;\n\n/** Keeps meaningful copy available to assistive technology without visible layout. */\nexport const VisuallyHidden = forwardRef<HTMLSpanElement, VisuallyHiddenProps>(\n function VisuallyHidden({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={classNames(\"hjm-visually-hidden\", className)}\n />\n );\n },\n);\n\nexport type GridProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Pick<GridDescriptor, \"columns\" | \"gap\" | \"minColumnWidth\"> &\n Readonly<{\n children?: ReactNode;\n /** Test/SSR override. Browser renderers otherwise observe window.innerWidth. */\n windowWidth?: number;\n /** Container measurement override; ResizeObserver is used when omitted. */\n availableWidth?: number;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid(\n {\n columns,\n gap,\n minColumnWidth,\n windowWidth,\n availableWidth,\n className,\n layoutStyle,\n style,\n ...props\n },\n forwardedRef,\n) {\n const browserWindowWidth = useWindowWidth();\n const [measuredWidth, gridRef] = useElementWidth(forwardedRef);\n const compactSsrWidth = 320;\n const effectiveWindowWidth =\n windowWidth ??\n (browserWindowWidth > 0 ? browserWindowWidth : compactSsrWidth);\n const effectiveAvailableWidth =\n availableWidth ??\n (measuredWidth !== undefined && measuredWidth > 0\n ? measuredWidth\n : effectiveWindowWidth);\n const descriptor: GridDescriptor = {\n columns,\n ...(gap === undefined ? {} : { gap }),\n ...(minColumnWidth === undefined ? {} : { minColumnWidth }),\n };\n const layout = resolveGridLayout(descriptor, {\n windowWidth: effectiveWindowWidth,\n availableWidth: effectiveAvailableWidth,\n });\n\n return (\n <div\n {...props}\n ref={gridRef}\n className={classNames(\"hjm-grid\", className)}\n data-window-class={layout.windowClass}\n data-columns={layout.columns}\n data-requested-columns={layout.requestedColumns}\n data-state={layout.columns < layout.requestedColumns ? \"collapsed\" : \"resolved\"}\n style={{\n display: \"grid\",\n gridTemplateColumns: `repeat(${layout.columns}, minmax(0, 1fr))`,\n rowGap: layout.rowGap,\n columnGap: layout.columnGap,\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type SectionProps = Omit<HTMLAttributes<HTMLElement>, \"children\" | \"title\"> &\n Readonly<{\n title?: ReactNode;\n description?: ReactNode;\n action?: ReactNode;\n children: ReactNode;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n }>;\n\n/** Large-text-safe semantic content section with an optional header action. */\nexport const Section = forwardRef<HTMLElement, SectionProps>(function Section(\n {\n title,\n description,\n action,\n children,\n headingLevel = 2,\n className,\n ...props\n },\n ref,\n) {\n const hasHeader = title !== undefined || description !== undefined || action !== undefined;\n return (\n <section {...props} ref={ref} className={classNames(\"hjm-section\", className)}>\n {hasHeader ? (\n <header className=\"hjm-section__header\">\n <div className=\"hjm-section__copy\">\n {title === undefined ? null : createElement(\n `h${headingLevel}`,\n { className: \"hjm-section__title\" },\n title,\n )}\n {description === undefined ? null : (\n <div className=\"hjm-section__description\">{description}</div>\n )}\n </div>\n {action === undefined ? null : <div className=\"hjm-section__action\">{action}</div>}\n </header>\n ) : null}\n <div className=\"hjm-section__content\">{children}</div>\n </section>\n );\n});\n\nexport type { GridGap };\nexport type { AspectRatioValue, ContainerGutter, ContainerSize };\n"]}
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,GAGlB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,4BAA4B,GAE7B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,0BAA0B,GAG3B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,2BAA2B,GAG5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,eAAe,EACf,eAAe,EACf,aAAa,GAId,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,UAAU,GAOX,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,UAAU,EACV,KAAK,EACL,MAAM,GAOP,MAAM,OAAO,CAAC;AACf,OAAO,EACL,UAAU,EACV,WAAW,EACX,eAAe,EACf,cAAc,GACf,MAAM,eAAe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AC3F,OAAO,CACL,sBAAa,KAAK,EAAE,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,WAAW,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,aAC/G,SAAS,CAAC,CAAC,CAAC,CACX,kBAAQ,SAAS,EAAC,qBAAqB,aACrC,eAAK,SAAS,EAAC,mBAAmB,aAC/B,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CACzC,IAAI,YAAY,EAAE,EAClB,EAAE,SAAS,EAAE,oBAAoB,EAAE,EACnC,KAAK,CACN,EACA,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAClC,cAAK,SAAS,EAAC,0BAA0B,YAAE,WAAW,GAAO,CAC9D,IACG,EACL,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,qBAAqB,YAAE,MAAM,GAAO,IAC3E,CACV,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,sBAAsB,YAAE,QAAQ,GAAO,IAC9C,CACX,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import {\n resolveGridLayout,\n type GridDescriptor,\n type GridGap,\n} from \"@hjmds/design-contracts/grid\";\nimport {\n resolveAspectRatioDescriptor,\n type AspectRatioValue,\n} from \"@hjmds/design-contracts/components/aspect-ratio\";\nimport {\n resolveContainerDescriptor,\n type ContainerGutter,\n type ContainerSize,\n} from \"@hjmds/design-contracts/components/container\";\nimport {\n layoutRecipe,\n validateLayoutWebDescriptor,\n type LayoutSidebarDescriptor,\n type LayoutSidebarRole,\n} from \"@hjmds/design-contracts/components/layout\";\nimport {\n surfaceDefaults,\n surfaceGeometry,\n surfaceRecipe,\n type SurfacePadding,\n type SurfaceRadius,\n type SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n stackRecipe,\n textRecipe,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type TextEmphasis,\n type TextTone,\n} from \"@hjmds/design-contracts/recipes\";\nimport type { TextVariant } from \"@hjmds/design-contracts/foundations\";\nimport {\n createElement,\n forwardRef,\n useId,\n useRef,\n type AnchorHTMLAttributes,\n type HTMLAttributes,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n classNames,\n composeRefs,\n useElementWidth,\n useWindowWidth,\n} from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type {\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nexport type {\n StackAlign,\n StackAxis,\n StackGap,\n StackJustify,\n TextEmphasis,\n TextTone,\n} from \"@hjmds/design-contracts/recipes\";\n\ntype LayoutRegionProps = Omit<\n HTMLAttributes<HTMLElement>,\n \"children\" | \"role\"\n>;\n\ntype LayoutSidebarBase = Readonly<{\n children: ReactNode;\n role: LayoutSidebarRole;\n label: string;\n landmarkProps?: Omit<LayoutRegionProps, \"aria-label\">;\n landmarkRef?: Ref<HTMLElement>;\n}>;\n\n/**\n * A persistent sidebar is rendered in the shell grid. An overlay sidebar is\n * deliberately handed to the product's SidePanel (or equivalent) through\n * `renderOverlay`; Layout never owns a second open/dismiss lifecycle.\n */\nexport type LayoutSidebar =\n | (LayoutSidebarBase &\n Readonly<{\n mode: \"persistent\";\n renderOverlay?: never;\n }>)\n | (LayoutSidebarBase &\n Readonly<{\n mode: \"overlay\";\n renderOverlay(sidebarLandmark: ReactElement): ReactNode;\n }>);\n\nexport type LayoutProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children: ReactNode;\n header?: ReactNode;\n footer?: ReactNode;\n sidebar?: LayoutSidebar;\n skipLinkLabel?: string;\n /** Stable product id for deep links; a hydration-safe id is generated when omitted. */\n mainId?: string;\n mainRef?: Ref<HTMLElement>;\n headerProps?: LayoutRegionProps;\n mainProps?: Omit<LayoutRegionProps, \"id\" | \"tabIndex\">;\n footerProps?: LayoutRegionProps;\n skipLinkProps?: Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n \"children\" | \"href\"\n >;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\nfunction hasRegionContent(content: ReactNode | undefined): boolean {\n return content !== undefined && content !== null && content !== false;\n}\n\nfunction assertMainId(id: string): void {\n if (id.trim().length === 0) {\n throw new TypeError(\"Layout mainId must not be empty\");\n }\n if (/\\s/u.test(id)) {\n throw new TypeError(\"Layout mainId must not contain whitespace\");\n }\n}\n\n/** Accessible Web app shell with real landmarks and bypass navigation. */\nexport const Layout = forwardRef<HTMLDivElement, LayoutProps>(function Layout(\n {\n children,\n header,\n footer,\n sidebar,\n skipLinkLabel,\n mainId: mainIdProp,\n mainRef: forwardedMainRef,\n headerProps,\n mainProps,\n footerProps,\n skipLinkProps,\n className,\n layoutStyle,\n ...props\n },\n ref,\n) {\n const generatedId = `hjm-main-${useId().replaceAll(\":\", \"\")}`;\n const internalMainRef = useRef<HTMLElement>(null);\n const mainId = mainIdProp ?? generatedId;\n assertMainId(mainId);\n\n const hasHeader = hasRegionContent(header);\n const hasFooter = hasRegionContent(footer);\n const descriptor = {\n ...(hasHeader ? { hasHeader: true } : {}),\n ...(hasFooter ? { hasFooter: true } : {}),\n ...(sidebar === undefined\n ? {}\n : {\n sidebar: {\n role: sidebar.role,\n mode: sidebar.mode,\n label: sidebar.label,\n } satisfies LayoutSidebarDescriptor,\n }),\n ...(skipLinkLabel === undefined ? {} : { skipLinkLabel }),\n };\n validateLayoutWebDescriptor(descriptor);\n\n if (\n sidebar?.mode === \"overlay\" &&\n typeof sidebar.renderOverlay !== \"function\"\n ) {\n throw new TypeError(\n \"Layout overlay sidebar requires renderOverlay so SidePanel owns its lifecycle\",\n );\n }\n\n const {\n className: headerClassName,\n ...restHeaderProps\n } = headerProps ?? {};\n const {\n className: mainClassName,\n style: mainStyle,\n ...restMainProps\n } = mainProps ?? {};\n const {\n className: footerClassName,\n ...restFooterProps\n } = footerProps ?? {};\n const {\n className: skipLinkClassName,\n onClick: onSkipLinkClick,\n ...restSkipLinkProps\n } = skipLinkProps ?? {};\n\n let sidebarNode: ReactNode;\n if (sidebar !== undefined) {\n const {\n className: sidebarClassName,\n style: sidebarStyle,\n ...restSidebarProps\n } = sidebar.landmarkProps ?? {};\n const sidebarLandmark = createElement(\n sidebar.role === \"navigation\" ? \"nav\" : \"aside\",\n {\n ...restSidebarProps,\n ref: sidebar.landmarkRef,\n className: classNames(\"hjm-layout__sidebar\", sidebarClassName),\n \"aria-label\": sidebar.label,\n \"data-mode\": sidebar.mode,\n style: {\n ...(sidebar.mode === \"persistent\"\n ? { inlineSize: layoutRecipe.sidebar.width }\n : {}),\n ...sidebarStyle,\n },\n },\n sidebar.children,\n );\n sidebarNode = sidebar.mode === \"overlay\"\n ? sidebar.renderOverlay(sidebarLandmark)\n : sidebarLandmark;\n }\n\n const moveFocusToMain = (event: MouseEvent<HTMLAnchorElement>) => {\n onSkipLinkClick?.(event);\n if (event.defaultPrevented) return;\n const main = internalMainRef.current;\n if (main === null) return;\n event.preventDefault();\n const url = new URL(window.location.href);\n url.hash = mainId;\n window.history.replaceState(window.history.state, \"\", url);\n main.focus({ preventScroll: true });\n main.scrollIntoView?.({ block: \"start\" });\n };\n\n return (\n <div\n {...props}\n style={{ ...props.style, ...layoutStyle }}\n ref={ref}\n className={classNames(\"hjm-layout\", className)}\n data-hjm-component=\"Layout\"\n data-sidebar-mode={sidebar?.mode ?? \"none\"}\n >\n {skipLinkLabel === undefined ? null : (\n <a\n {...restSkipLinkProps}\n href={`#${mainId}`}\n className={classNames(\n \"hjm-layout__skip-link\",\n skipLinkClassName,\n )}\n onClick={moveFocusToMain}\n >\n {skipLinkLabel}\n </a>\n )}\n {hasHeader ? (\n <header\n {...restHeaderProps}\n className={classNames(\"hjm-layout__header\", headerClassName)}\n >\n {header}\n </header>\n ) : null}\n {sidebarNode}\n <main\n {...restMainProps}\n ref={composeRefs(internalMainRef, forwardedMainRef)}\n id={mainId}\n className={classNames(\"hjm-layout__main\", mainClassName)}\n tabIndex={-1}\n style={{\n maxInlineSize: layoutRecipe.main.maxWidth,\n paddingInline: layoutRecipe.main.paddingHorizontal,\n ...mainStyle,\n }}\n >\n {children}\n </main>\n {hasFooter ? (\n <footer\n {...restFooterProps}\n className={classNames(\"hjm-layout__footer\", footerClassName)}\n >\n {footer}\n </footer>\n ) : null}\n </div>\n );\n});\n\nexport type TextProps = Omit<HTMLAttributes<HTMLElement>, \"children\"> &\n Readonly<{\n children: ReactNode;\n as?: \"span\" | \"p\" | \"div\" | \"strong\" | \"small\";\n variant?: TextVariant;\n tone?: TextTone;\n emphasis?: TextEmphasis;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n {\n as = \"span\",\n variant = textRecipe.defaults.variant,\n tone = textRecipe.defaults.tone,\n emphasis = textRecipe.defaults.emphasis,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n return createElement(as, {\n ...props,\n ref,\n className: classNames(\"hjm-text\", className),\n \"data-variant\": variant,\n \"data-tone\": tone,\n \"data-emphasis\": emphasis,\n // Placement wins over the legacy `style`, matching Surface's ordering.\n style: { ...style, ...layoutStyle },\n });\n});\n\nexport type SurfaceProps = HTMLAttributes<HTMLElement> &\n Readonly<{\n as?: \"div\" | \"section\" | \"article\";\n tone?: SurfaceTone;\n bordered?: boolean;\n padding?: SurfacePadding;\n radius?: SurfaceRadius;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Surface = forwardRef<HTMLElement, SurfaceProps>(function Surface(\n {\n as = \"div\",\n tone = surfaceDefaults.tone,\n bordered,\n padding = surfaceDefaults.padding,\n radius = surfaceDefaults.radius,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n const contract = surfaceRecipe[tone];\n return createElement(as, {\n ...props,\n ref,\n className: classNames(\"hjm-surface\", className),\n \"data-tone\": tone,\n // Canvas framing is the default; preserve the caller's explicit border opt-out.\n \"data-bordered\": bordered ?? (surfaceDefaults.bordered || contract.borderAlways),\n \"data-elevated\": contract.elevated,\n \"data-clips\": contract.clipsContent,\n \"data-padding\": padding,\n \"data-radius\": radius,\n style: {\n padding: surfaceGeometry.paddings[padding],\n borderRadius: surfaceGeometry.radii[radius],\n ...style,\n ...layoutStyle,\n },\n });\n});\n\nexport type StackProps = HTMLAttributes<HTMLDivElement> &\n Readonly<{\n axis?: StackAxis;\n gap?: StackGap;\n align?: StackAlign;\n justify?: StackJustify;\n wrap?: boolean;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nconst justifyValues = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n between: \"space-between\",\n} as const;\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n {\n axis = stackRecipe.defaults.axis,\n gap = stackRecipe.defaults.gap,\n align = stackRecipe.defaults.align,\n justify = stackRecipe.defaults.justify,\n wrap = stackRecipe.defaults.wrap,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-stack\", className)}\n data-axis={axis}\n data-gap={gap}\n style={{\n display: \"flex\",\n flexDirection: stackRecipe.axes[axis],\n gap: stackRecipe.gaps[gap],\n alignItems: align === \"start\" || align === \"end\" ? `flex-${align}` : align,\n justifyContent: justifyValues[justify],\n flexWrap: wrap ? \"wrap\" : \"nowrap\",\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type ContainerProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children?: ReactNode;\n size?: ContainerSize;\n gutter?: ContainerGutter;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** A centered, token-guttered content boundary shared with Native large screens. */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(function Container(\n { size, gutter, className, layoutStyle, style, ...props },\n ref,\n) {\n const resolved = resolveContainerDescriptor({\n ...(size === undefined ? {} : { size }),\n ...(gutter === undefined ? {} : { gutter }),\n });\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-container\", className)}\n data-size={resolved.size}\n data-gutter={resolved.gutter}\n style={{\n maxInlineSize: resolved.maxWidth ?? undefined,\n paddingInline: resolved.paddingInline,\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type AspectRatioProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Readonly<{\n children?: ReactNode;\n ratio?: AspectRatioValue;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n/** Responsive media frame. Products retain object-fit, crop, and content semantics. */\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { ratio, className, layoutStyle, style, ...props },\n ref,\n) {\n const resolved = resolveAspectRatioDescriptor(\n ratio === undefined ? {} : { ratio },\n );\n return (\n <div\n {...props}\n ref={ref}\n className={classNames(\"hjm-aspect-ratio\", className)}\n data-ratio={resolved.source}\n style={{ ...layoutStyle, aspectRatio: resolved.ratio, ...style }}\n />\n );\n});\n\n// No `layoutStyle`: the element is clipped to 1px by design, so placement has no visible effect.\nexport type VisuallyHiddenProps = HTMLAttributes<HTMLSpanElement> &\n Readonly<{ children: ReactNode }>;\n\n/** Keeps meaningful copy available to assistive technology without visible layout. */\nexport const VisuallyHidden = forwardRef<HTMLSpanElement, VisuallyHiddenProps>(\n function VisuallyHidden({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={classNames(\"hjm-visually-hidden\", className)}\n />\n );\n },\n);\n\nexport type GridProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> &\n Pick<GridDescriptor, \"columns\" | \"gap\" | \"minColumnWidth\"> &\n Readonly<{\n children?: ReactNode;\n /** Test/SSR override. Browser renderers otherwise observe window.innerWidth. */\n windowWidth?: number;\n /** Container measurement override; ResizeObserver is used when omitted. */\n availableWidth?: number;\n /** Canonical layout-only placement. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid(\n {\n columns,\n gap,\n minColumnWidth,\n windowWidth,\n availableWidth,\n className,\n layoutStyle,\n style,\n ...props\n },\n forwardedRef,\n) {\n const browserWindowWidth = useWindowWidth();\n const [measuredWidth, gridRef] = useElementWidth(forwardedRef);\n const compactSsrWidth = 320;\n const effectiveWindowWidth =\n windowWidth ??\n (browserWindowWidth > 0 ? browserWindowWidth : compactSsrWidth);\n const effectiveAvailableWidth =\n availableWidth ??\n (measuredWidth !== undefined && measuredWidth > 0\n ? measuredWidth\n : effectiveWindowWidth);\n const descriptor: GridDescriptor = {\n columns,\n ...(gap === undefined ? {} : { gap }),\n ...(minColumnWidth === undefined ? {} : { minColumnWidth }),\n };\n const layout = resolveGridLayout(descriptor, {\n windowWidth: effectiveWindowWidth,\n availableWidth: effectiveAvailableWidth,\n });\n\n return (\n <div\n {...props}\n ref={gridRef}\n className={classNames(\"hjm-grid\", className)}\n data-window-class={layout.windowClass}\n data-columns={layout.columns}\n data-requested-columns={layout.requestedColumns}\n data-state={layout.columns < layout.requestedColumns ? \"collapsed\" : \"resolved\"}\n style={{\n display: \"grid\",\n gridTemplateColumns: `repeat(${layout.columns}, minmax(0, 1fr))`,\n rowGap: layout.rowGap,\n columnGap: layout.columnGap,\n ...style,\n ...layoutStyle,\n }}\n />\n );\n});\n\nexport type SectionProps = Omit<HTMLAttributes<HTMLElement>, \"children\" | \"title\"> &\n Readonly<{\n title?: ReactNode;\n description?: ReactNode;\n action?: ReactNode;\n children: ReactNode;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n }>;\n\n/** Large-text-safe semantic content section with an optional header action. */\nexport const Section = forwardRef<HTMLElement, SectionProps>(function Section(\n {\n title,\n description,\n action,\n children,\n headingLevel = 2,\n className,\n layoutStyle,\n style,\n ...props\n },\n ref,\n) {\n const hasHeader = title !== undefined || description !== undefined || action !== undefined;\n return (\n <section {...props} style={{ ...style, ...layoutStyle }} ref={ref} className={classNames(\"hjm-section\", className)}>\n {hasHeader ? (\n <header className=\"hjm-section__header\">\n <div className=\"hjm-section__copy\">\n {title === undefined ? null : createElement(\n `h${headingLevel}`,\n { className: \"hjm-section__title\" },\n title,\n )}\n {description === undefined ? null : (\n <div className=\"hjm-section__description\">{description}</div>\n )}\n </div>\n {action === undefined ? null : <div className=\"hjm-section__action\">{action}</div>}\n </header>\n ) : null}\n <div className=\"hjm-section__content\">{children}</div>\n </section>\n );\n});\n\nexport type { GridGap };\nexport type { AspectRatioValue, ContainerGutter, ContainerSize };\n"]}
package/dist/masonry.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
+ import type { HjmCompositionStyleProp } from "./composition-style.js";
2
3
  export type MasonryProps<T> = {
3
4
  items: readonly T[];
4
5
  keyExtractor: (item: T) => string;
@@ -9,6 +10,8 @@ export type MasonryProps<T> = {
9
10
  gap?: number;
10
11
  label: string;
11
12
  empty?: ReactNode;
13
+ /** Canonical layout-only placement on the root. The measured `width`/height still win: absolute item frames depend on them. */
14
+ layoutStyle?: HjmCompositionStyleProp;
12
15
  };
13
- export declare function Masonry<T>({ items, keyExtractor, renderItem, getItemHeight, width, columns, gap, label, empty }: MasonryProps<T>): import("react").JSX.Element;
16
+ export declare function Masonry<T>({ items, keyExtractor, renderItem, getItemHeight, width, columns, gap, label, empty, layoutStyle }: MasonryProps<T>): import("react").JSX.Element;
14
17
  //# sourceMappingURL=masonry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"masonry.d.ts","sourceRoot":"","sources":["../src/masonry.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAAC,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AACpR,wBAAgB,OAAO,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,OAAW,EAAE,GAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC,+BAQzI"}
1
+ {"version":3,"file":"masonry.d.ts","sourceRoot":"","sources":["../src/masonry.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAAC,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAChR,+HAA+H;IAC/H,WAAW,CAAC,EAAE,uBAAuB,CAAA;CAAE,CAAC;AAC1C,wBAAgB,OAAO,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,OAAW,EAAE,GAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC,+BAUtJ"}
package/dist/masonry.js CHANGED
@@ -1,13 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { resolveMasonryLayout } from "@hjmds/design-contracts/components/masonry";
3
3
  import { validateListKeys } from "@hjmds/design-contracts/components/virtual-list";
4
- export function Masonry({ items, keyExtractor, renderItem, getItemHeight, width, columns = 2, gap = 12, label, empty }) {
4
+ export function Masonry({ items, keyExtractor, renderItem, getItemHeight, width, columns = 2, gap = 12, label, empty, layoutStyle }) {
5
5
  const keys = items.map(keyExtractor);
6
6
  validateListKeys(keys, label);
7
7
  const itemWidth = resolveMasonryLayout([], width, columns, gap).itemWidth;
8
8
  const layout = resolveMasonryLayout(items.map(item => getItemHeight(item, itemWidth)), width, columns, gap);
9
+ // A named div without a role is not exposed with its name (ARIA prohibits aria-label on generic).
10
+ // `group` keeps the collection name with the empty copy; `list` was rejected because the empty slot is not a listitem.
9
11
  if (!items.length)
10
- return _jsx("div", { "aria-label": label, children: empty });
11
- return _jsx("div", { "data-hjm-masonry": true, role: "list", "aria-label": label, style: { position: "relative", width, height: layout.height }, children: items.map((item, index) => { const frame = layout.items[index]; return _jsx("div", { role: "listitem", style: { position: "absolute", insetInlineStart: frame.left, top: frame.top, width: frame.width, height: frame.height }, children: renderItem(item, index) }, keys[index]); }) });
12
+ return _jsx("div", { role: "group", "aria-label": label, style: layoutStyle, children: empty });
13
+ return _jsx("div", { "data-hjm-masonry": true, role: "list", "aria-label": label, style: { ...layoutStyle, position: "relative", width, height: layout.height }, children: items.map((item, index) => { const frame = layout.items[index]; return _jsx("div", { role: "listitem", style: { position: "absolute", insetInlineStart: frame.left, top: frame.top, width: frame.width, height: frame.height }, children: renderItem(item, index) }, keys[index]); }) });
12
14
  }
13
15
  //# sourceMappingURL=masonry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"masonry.js","sourceRoot":"","sources":["../src/masonry.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAEnF,MAAM,UAAU,OAAO,CAAI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,EAAE,GAAG,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAmB;IACxI,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpE,MAAM,SAAS,GAAG,oBAAoB,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,SAAS,CAAC;IAC1E,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IAC5G,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,4BAAiB,KAAK,YAAG,KAAK,GAAO,CAAC;IAChE,OAAO,wCAAsB,IAAI,EAAC,MAAM,gBAAa,KAAK,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YACtH,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAE,CAAC,CAAC,OAAO,cAAK,IAAI,EAAC,UAAU,EAAmB,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,YAAG,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,IAA9J,IAAI,CAAC,KAAK,CAAC,CAA0J,CAAC,CAAC,CAAC,CAAC,GACxQ,CAAC;AACT,CAAC","sourcesContent":["import type { ReactNode } from \"react\";\nimport { resolveMasonryLayout } from \"@hjmds/design-contracts/components/masonry\";\nimport { validateListKeys } from \"@hjmds/design-contracts/components/virtual-list\";\nexport type MasonryProps<T> = { items: readonly T[]; keyExtractor: (item: T) => string; renderItem: (item: T, index: number) => ReactNode; getItemHeight: (item: T, itemWidth: number) => number; width: number; columns?: number; gap?: number; label: string; empty?: ReactNode };\nexport function Masonry<T>({ items, keyExtractor, renderItem, getItemHeight, width, columns = 2, gap = 12, label, empty }: MasonryProps<T>) {\n const keys = items.map(keyExtractor); validateListKeys(keys, label);\n const itemWidth = resolveMasonryLayout([], width, columns, gap).itemWidth;\n const layout = resolveMasonryLayout(items.map(item => getItemHeight(item, itemWidth)), width, columns, gap);\n if (!items.length) return <div aria-label={label}>{empty}</div>;\n return <div data-hjm-masonry role=\"list\" aria-label={label} style={{ position: \"relative\", width, height: layout.height }}>\n {items.map((item, index) => { const frame = layout.items[index]!; return <div role=\"listitem\" key={keys[index]} style={{ position: \"absolute\", insetInlineStart: frame.left, top: frame.top, width: frame.width, height: frame.height }}>{renderItem(item, index)}</div>; })}\n </div>;\n}\n"]}
1
+ {"version":3,"file":"masonry.js","sourceRoot":"","sources":["../src/masonry.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAKnF,MAAM,UAAU,OAAO,CAAI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,EAAE,GAAG,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAmB;IACrJ,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpE,MAAM,SAAS,GAAG,oBAAoB,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,SAAS,CAAC;IAC1E,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IAC5G,kGAAkG;IAClG,uHAAuH;IACvH,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,cAAK,IAAI,EAAC,OAAO,gBAAa,KAAK,EAAE,KAAK,EAAE,WAAW,YAAG,KAAK,GAAO,CAAC;IACjG,OAAO,wCAAsB,IAAI,EAAC,MAAM,gBAAa,KAAK,EAAE,KAAK,EAAE,EAAE,GAAG,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YACtI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAE,CAAC,CAAC,OAAO,cAAK,IAAI,EAAC,UAAU,EAAmB,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,YAAG,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,IAA9J,IAAI,CAAC,KAAK,CAAC,CAA0J,CAAC,CAAC,CAAC,CAAC,GACxQ,CAAC;AACT,CAAC","sourcesContent":["import type { ReactNode } from \"react\";\nimport { resolveMasonryLayout } from \"@hjmds/design-contracts/components/masonry\";\nimport { validateListKeys } from \"@hjmds/design-contracts/components/virtual-list\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nexport type MasonryProps<T> = { items: readonly T[]; keyExtractor: (item: T) => string; renderItem: (item: T, index: number) => ReactNode; getItemHeight: (item: T, itemWidth: number) => number; width: number; columns?: number; gap?: number; label: string; empty?: ReactNode;\n /** Canonical layout-only placement on the root. The measured `width`/height still win: absolute item frames depend on them. */\n layoutStyle?: HjmCompositionStyleProp };\nexport function Masonry<T>({ items, keyExtractor, renderItem, getItemHeight, width, columns = 2, gap = 12, label, empty, layoutStyle }: MasonryProps<T>) {\n const keys = items.map(keyExtractor); validateListKeys(keys, label);\n const itemWidth = resolveMasonryLayout([], width, columns, gap).itemWidth;\n const layout = resolveMasonryLayout(items.map(item => getItemHeight(item, itemWidth)), width, columns, gap);\n // A named div without a role is not exposed with its name (ARIA prohibits aria-label on generic).\n // `group` keeps the collection name with the empty copy; `list` was rejected because the empty slot is not a listitem.\n if (!items.length) return <div role=\"group\" aria-label={label} style={layoutStyle}>{empty}</div>;\n return <div data-hjm-masonry role=\"list\" aria-label={label} style={{ ...layoutStyle, position: \"relative\", width, height: layout.height }}>\n {items.map((item, index) => { const frame = layout.items[index]!; return <div role=\"listitem\" key={keys[index]} style={{ position: \"absolute\", insetInlineStart: frame.left, top: frame.top, width: frame.width, height: frame.height }}>{renderItem(item, index)}</div>; })}\n </div>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mentions.d.ts","sourceRoot":"","sources":["../src/mentions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAI1D,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,MAAM,MAAM,aAAa,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM,IACzD,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,CAAC,GACvE,QAAQ,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,SAAS,oBAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;IACrD,+EAA+E;IAC/E,UAAU,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACxC,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,GAAG,IAAI,KAAK,IAAI,C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