@hjmds/react 1.41.2 → 1.43.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 (393) hide show
  1. package/README.md +2 -2
  2. package/dist/actions.d.ts +41 -0
  3. package/dist/actions.d.ts.map +1 -1
  4. package/dist/actions.js +40 -3
  5. package/dist/actions.js.map +1 -1
  6. package/dist/activity-chip.d.ts.map +1 -1
  7. package/dist/activity-chip.js +1 -0
  8. package/dist/activity-chip.js.map +1 -1
  9. package/dist/advanced-display.d.ts +47 -14
  10. package/dist/advanced-display.d.ts.map +1 -1
  11. package/dist/advanced-display.js +72 -17
  12. package/dist/advanced-display.js.map +1 -1
  13. package/dist/advanced-forms.d.ts.map +1 -1
  14. package/dist/advanced-forms.js +1 -0
  15. package/dist/advanced-forms.js.map +1 -1
  16. package/dist/affix.d.ts +6 -1
  17. package/dist/affix.d.ts.map +1 -1
  18. package/dist/affix.js +5 -3
  19. package/dist/affix.js.map +1 -1
  20. package/dist/agreement.d.ts.map +1 -1
  21. package/dist/agreement.js +1 -0
  22. package/dist/agreement.js.map +1 -1
  23. package/dist/alert-dialog-queue.d.ts +24 -0
  24. package/dist/alert-dialog-queue.d.ts.map +1 -0
  25. package/dist/alert-dialog-queue.js +44 -0
  26. package/dist/alert-dialog-queue.js.map +1 -0
  27. package/dist/anchor.d.ts.map +1 -1
  28. package/dist/anchor.js +1 -0
  29. package/dist/anchor.js.map +1 -1
  30. package/dist/asset.d.ts.map +1 -1
  31. package/dist/asset.js +1 -0
  32. package/dist/asset.js.map +1 -1
  33. package/dist/auth-screen.d.ts.map +1 -1
  34. package/dist/auth-screen.js +1 -0
  35. package/dist/auth-screen.js.map +1 -1
  36. package/dist/avatar-blobatar-motion.d.ts.map +1 -1
  37. package/dist/avatar-blobatar-motion.js +1 -0
  38. package/dist/avatar-blobatar-motion.js.map +1 -1
  39. package/dist/avatar-blobatar.d.ts.map +1 -1
  40. package/dist/avatar-blobatar.js +1 -0
  41. package/dist/avatar-blobatar.js.map +1 -1
  42. package/dist/bottom-cta.d.ts.map +1 -1
  43. package/dist/bottom-cta.js +1 -0
  44. package/dist/bottom-cta.js.map +1 -1
  45. package/dist/bottom-info.d.ts.map +1 -1
  46. package/dist/bottom-info.js +1 -0
  47. package/dist/bottom-info.js.map +1 -1
  48. package/dist/bottom-navigation.d.ts.map +1 -1
  49. package/dist/bottom-navigation.js +1 -0
  50. package/dist/bottom-navigation.js.map +1 -1
  51. package/dist/breadcrumb.d.ts.map +1 -1
  52. package/dist/breadcrumb.js +1 -0
  53. package/dist/breadcrumb.js.map +1 -1
  54. package/dist/calendar.d.ts.map +1 -1
  55. package/dist/calendar.js +1 -0
  56. package/dist/calendar.js.map +1 -1
  57. package/dist/carousel-motion.d.ts.map +1 -1
  58. package/dist/carousel-motion.js +1 -0
  59. package/dist/carousel-motion.js.map +1 -1
  60. package/dist/carousel.d.ts.map +1 -1
  61. package/dist/carousel.js +1 -0
  62. package/dist/carousel.js.map +1 -1
  63. package/dist/celebration.d.ts.map +1 -1
  64. package/dist/celebration.js +1 -0
  65. package/dist/celebration.js.map +1 -1
  66. package/dist/chart.d.ts +7 -2
  67. package/dist/chart.d.ts.map +1 -1
  68. package/dist/chart.js +6 -3
  69. package/dist/chart.js.map +1 -1
  70. package/dist/choice-row.d.ts +10 -2
  71. package/dist/choice-row.d.ts.map +1 -1
  72. package/dist/choice-row.js +7 -3
  73. package/dist/choice-row.js.map +1 -1
  74. package/dist/clipboard.d.ts.map +1 -1
  75. package/dist/clipboard.js +1 -0
  76. package/dist/clipboard.js.map +1 -1
  77. package/dist/collapsible.d.ts.map +1 -1
  78. package/dist/collapsible.js +1 -0
  79. package/dist/collapsible.js.map +1 -1
  80. package/dist/collection-rail.d.ts.map +1 -1
  81. package/dist/collection-rail.js +3 -1
  82. package/dist/collection-rail.js.map +1 -1
  83. package/dist/color-picker.d.ts.map +1 -1
  84. package/dist/color-picker.js +1 -0
  85. package/dist/color-picker.js.map +1 -1
  86. package/dist/command-palette.d.ts.map +1 -1
  87. package/dist/command-palette.js +1 -0
  88. package/dist/command-palette.js.map +1 -1
  89. package/dist/communication.d.ts +92 -0
  90. package/dist/communication.d.ts.map +1 -1
  91. package/dist/communication.js +49 -1
  92. package/dist/communication.js.map +1 -1
  93. package/dist/content-transition.d.ts.map +1 -1
  94. package/dist/content-transition.js +1 -0
  95. package/dist/content-transition.js.map +1 -1
  96. package/dist/context-menu.d.ts.map +1 -1
  97. package/dist/context-menu.js +1 -0
  98. package/dist/context-menu.js.map +1 -1
  99. package/dist/conversation-row.d.ts.map +1 -1
  100. package/dist/conversation-row.js +1 -0
  101. package/dist/conversation-row.js.map +1 -1
  102. package/dist/data-table.d.ts.map +1 -1
  103. package/dist/data-table.js +1 -0
  104. package/dist/data-table.js.map +1 -1
  105. package/dist/date-entry.d.ts.map +1 -1
  106. package/dist/date-entry.js +1 -0
  107. package/dist/date-entry.js.map +1 -1
  108. package/dist/date-picker.d.ts.map +1 -1
  109. package/dist/date-picker.js +1 -0
  110. package/dist/date-picker.js.map +1 -1
  111. package/dist/date-range.d.ts.map +1 -1
  112. package/dist/date-range.js +1 -0
  113. package/dist/date-range.js.map +1 -1
  114. package/dist/design-profile.d.ts.map +1 -1
  115. package/dist/design-profile.js +1 -0
  116. package/dist/design-profile.js.map +1 -1
  117. package/dist/display.d.ts +21 -1
  118. package/dist/display.d.ts.map +1 -1
  119. package/dist/display.js +34 -8
  120. package/dist/display.js.map +1 -1
  121. package/dist/duration-field.d.ts.map +1 -1
  122. package/dist/duration-field.js +1 -0
  123. package/dist/duration-field.js.map +1 -1
  124. package/dist/effect-surface.d.ts.map +1 -1
  125. package/dist/effect-surface.js +1 -0
  126. package/dist/effect-surface.js.map +1 -1
  127. package/dist/evidence.d.ts +1 -1
  128. package/dist/evidence.js +1 -1
  129. package/dist/evidence.js.map +1 -1
  130. package/dist/feedback.d.ts.map +1 -1
  131. package/dist/feedback.js +1 -0
  132. package/dist/feedback.js.map +1 -1
  133. package/dist/field-group.d.ts.map +1 -1
  134. package/dist/field-group.js +1 -0
  135. package/dist/field-group.js.map +1 -1
  136. package/dist/file-picker.d.ts.map +1 -1
  137. package/dist/file-picker.js +1 -0
  138. package/dist/file-picker.js.map +1 -1
  139. package/dist/floating-action-button.d.ts.map +1 -1
  140. package/dist/floating-action-button.js +1 -0
  141. package/dist/floating-action-button.js.map +1 -1
  142. package/dist/folder-preview.d.ts.map +1 -1
  143. package/dist/folder-preview.js +1 -0
  144. package/dist/folder-preview.js.map +1 -1
  145. package/dist/forms.d.ts +30 -6
  146. package/dist/forms.d.ts.map +1 -1
  147. package/dist/forms.js +56 -14
  148. package/dist/forms.js.map +1 -1
  149. package/dist/gravity-letters.d.ts.map +1 -1
  150. package/dist/gravity-letters.js +1 -0
  151. package/dist/gravity-letters.js.map +1 -1
  152. package/dist/grid-reveal.d.ts.map +1 -1
  153. package/dist/grid-reveal.js +1 -0
  154. package/dist/grid-reveal.js.map +1 -1
  155. package/dist/heading.d.ts.map +1 -1
  156. package/dist/heading.js +1 -0
  157. package/dist/heading.js.map +1 -1
  158. package/dist/image-choice.d.ts.map +1 -1
  159. package/dist/image-choice.js +1 -0
  160. package/dist/image-choice.js.map +1 -1
  161. package/dist/image-comparison.d.ts.map +1 -1
  162. package/dist/image-comparison.js +1 -0
  163. package/dist/image-comparison.js.map +1 -1
  164. package/dist/image-viewer.d.ts +22 -1
  165. package/dist/image-viewer.d.ts.map +1 -1
  166. package/dist/image-viewer.js +14 -1
  167. package/dist/image-viewer.js.map +1 -1
  168. package/dist/index.d.ts +3 -3
  169. package/dist/index.d.ts.map +1 -1
  170. package/dist/index.js +1 -1
  171. package/dist/index.js.map +1 -1
  172. package/dist/inline-confirm.d.ts.map +1 -1
  173. package/dist/inline-confirm.js +1 -0
  174. package/dist/inline-confirm.js.map +1 -1
  175. package/dist/internal/document-resource.d.ts.map +1 -1
  176. package/dist/internal/document-resource.js +1 -0
  177. package/dist/internal/document-resource.js.map +1 -1
  178. package/dist/internal/initial-focus.d.ts.map +1 -1
  179. package/dist/internal/initial-focus.js +1 -0
  180. package/dist/internal/initial-focus.js.map +1 -1
  181. package/dist/internal/media-album.d.ts.map +1 -1
  182. package/dist/internal/media-album.js +1 -0
  183. package/dist/internal/media-album.js.map +1 -1
  184. package/dist/internal/message-reactions.d.ts.map +1 -1
  185. package/dist/internal/message-reactions.js +1 -0
  186. package/dist/internal/message-reactions.js.map +1 -1
  187. package/dist/internal/overlay-origin-motion.d.ts.map +1 -1
  188. package/dist/internal/overlay-origin-motion.js +1 -0
  189. package/dist/internal/overlay-origin-motion.js.map +1 -1
  190. package/dist/internal/pending-content.d.ts.map +1 -1
  191. package/dist/internal/pending-content.js +1 -0
  192. package/dist/internal/pending-content.js.map +1 -1
  193. package/dist/internal/photo-source-icon.d.ts.map +1 -1
  194. package/dist/internal/photo-source-icon.js +1 -0
  195. package/dist/internal/photo-source-icon.js.map +1 -1
  196. package/dist/internal/screen-exit.d.ts.map +1 -1
  197. package/dist/internal/screen-exit.js +1 -0
  198. package/dist/internal/screen-exit.js.map +1 -1
  199. package/dist/internal/screen-footer.d.ts.map +1 -1
  200. package/dist/internal/screen-footer.js +1 -0
  201. package/dist/internal/screen-footer.js.map +1 -1
  202. package/dist/internal/spinner.d.ts.map +1 -1
  203. package/dist/internal/spinner.js +1 -0
  204. package/dist/internal/spinner.js.map +1 -1
  205. package/dist/internal/use-composition-action.d.ts.map +1 -1
  206. package/dist/internal/use-composition-action.js +1 -0
  207. package/dist/internal/use-composition-action.js.map +1 -1
  208. package/dist/internal.d.ts.map +1 -1
  209. package/dist/internal.js +1 -0
  210. package/dist/internal.js.map +1 -1
  211. package/dist/layout.d.ts +11 -1
  212. package/dist/layout.d.ts.map +1 -1
  213. package/dist/layout.js +8 -4
  214. package/dist/layout.js.map +1 -1
  215. package/dist/mentions.d.ts.map +1 -1
  216. package/dist/mentions.js +1 -0
  217. package/dist/mentions.js.map +1 -1
  218. package/dist/menu-morph.d.ts.map +1 -1
  219. package/dist/menu-morph.js +1 -0
  220. package/dist/menu-morph.js.map +1 -1
  221. package/dist/menubar.d.ts.map +1 -1
  222. package/dist/menubar.js +1 -0
  223. package/dist/menubar.js.map +1 -1
  224. package/dist/modal.d.ts.map +1 -1
  225. package/dist/modal.js +1 -0
  226. package/dist/modal.js.map +1 -1
  227. package/dist/navigation-bar.d.ts.map +1 -1
  228. package/dist/navigation-bar.js +1 -0
  229. package/dist/navigation-bar.js.map +1 -1
  230. package/dist/navigation.d.ts.map +1 -1
  231. package/dist/navigation.js +1 -0
  232. package/dist/navigation.js.map +1 -1
  233. package/dist/notification-bell.d.ts +1 -1
  234. package/dist/notification-bell.d.ts.map +1 -1
  235. package/dist/notification-bell.js +5 -1
  236. package/dist/notification-bell.js.map +1 -1
  237. package/dist/number-field.d.ts.map +1 -1
  238. package/dist/number-field.js +1 -0
  239. package/dist/number-field.js.map +1 -1
  240. package/dist/overlay-stack.d.ts.map +1 -1
  241. package/dist/overlay-stack.js +1 -0
  242. package/dist/overlay-stack.js.map +1 -1
  243. package/dist/overlays.d.ts.map +1 -1
  244. package/dist/overlays.js +11 -2
  245. package/dist/overlays.js.map +1 -1
  246. package/dist/pagination.d.ts.map +1 -1
  247. package/dist/pagination.js +1 -0
  248. package/dist/pagination.js.map +1 -1
  249. package/dist/popover.d.ts.map +1 -1
  250. package/dist/popover.js +1 -0
  251. package/dist/popover.js.map +1 -1
  252. package/dist/portal.d.ts.map +1 -1
  253. package/dist/portal.js +1 -0
  254. package/dist/portal.js.map +1 -1
  255. package/dist/progressive-blur.d.ts.map +1 -1
  256. package/dist/progressive-blur.js +1 -0
  257. package/dist/progressive-blur.js.map +1 -1
  258. package/dist/provider-button.d.ts.map +1 -1
  259. package/dist/provider-button.js +1 -0
  260. package/dist/provider-button.js.map +1 -1
  261. package/dist/provider.d.ts +9 -1
  262. package/dist/provider.d.ts.map +1 -1
  263. package/dist/provider.js +2 -2
  264. package/dist/provider.js.map +1 -1
  265. package/dist/public-exports.generated.d.ts +9 -0
  266. package/dist/public-exports.generated.d.ts.map +1 -1
  267. package/dist/public-exports.generated.js +27 -0
  268. package/dist/public-exports.generated.js.map +1 -1
  269. package/dist/rating.d.ts.map +1 -1
  270. package/dist/rating.js +1 -0
  271. package/dist/rating.js.map +1 -1
  272. package/dist/reaction-picker.d.ts.map +1 -1
  273. package/dist/reaction-picker.js +1 -0
  274. package/dist/reaction-picker.js.map +1 -1
  275. package/dist/saved-items.d.ts.map +1 -1
  276. package/dist/saved-items.js +1 -0
  277. package/dist/saved-items.js.map +1 -1
  278. package/dist/screen-flows.d.ts +5 -1
  279. package/dist/screen-flows.d.ts.map +1 -1
  280. package/dist/screen-flows.js +13 -4
  281. package/dist/screen-flows.js.map +1 -1
  282. package/dist/screens.d.ts +24 -4
  283. package/dist/screens.d.ts.map +1 -1
  284. package/dist/screens.js +39 -12
  285. package/dist/screens.js.map +1 -1
  286. package/dist/scroll-progress.d.ts.map +1 -1
  287. package/dist/scroll-progress.js +1 -0
  288. package/dist/scroll-progress.js.map +1 -1
  289. package/dist/select.d.ts.map +1 -1
  290. package/dist/select.js +1 -0
  291. package/dist/select.js.map +1 -1
  292. package/dist/selection.d.ts +7 -1
  293. package/dist/selection.d.ts.map +1 -1
  294. package/dist/selection.js +33 -10
  295. package/dist/selection.js.map +1 -1
  296. package/dist/side-panel.d.ts.map +1 -1
  297. package/dist/side-panel.js +1 -0
  298. package/dist/side-panel.js.map +1 -1
  299. package/dist/sidebar.d.ts +21 -2
  300. package/dist/sidebar.d.ts.map +1 -1
  301. package/dist/sidebar.js +40 -20
  302. package/dist/sidebar.js.map +1 -1
  303. package/dist/skip-nav.d.ts.map +1 -1
  304. package/dist/skip-nav.js +1 -0
  305. package/dist/skip-nav.js.map +1 -1
  306. package/dist/slider.d.ts.map +1 -1
  307. package/dist/slider.js +1 -0
  308. package/dist/slider.js.map +1 -1
  309. package/dist/sortable.d.ts.map +1 -1
  310. package/dist/sortable.js +1 -0
  311. package/dist/sortable.js.map +1 -1
  312. package/dist/splitter.d.ts.map +1 -1
  313. package/dist/splitter.js +1 -0
  314. package/dist/splitter.js.map +1 -1
  315. package/dist/statistic-motion.d.ts.map +1 -1
  316. package/dist/statistic-motion.js +1 -0
  317. package/dist/statistic-motion.js.map +1 -1
  318. package/dist/status-text.d.ts.map +1 -1
  319. package/dist/status-text.js +1 -0
  320. package/dist/status-text.js.map +1 -1
  321. package/dist/step-player.d.ts.map +1 -1
  322. package/dist/step-player.js +1 -0
  323. package/dist/step-player.js.map +1 -1
  324. package/dist/steps.d.ts +16 -14
  325. package/dist/steps.d.ts.map +1 -1
  326. package/dist/steps.js +26 -9
  327. package/dist/steps.js.map +1 -1
  328. package/dist/styles.css +165 -41
  329. package/dist/styles.layered.css +165 -41
  330. package/dist/supplemental-display.d.ts.map +1 -1
  331. package/dist/supplemental-display.js +1 -0
  332. package/dist/supplemental-display.js.map +1 -1
  333. package/dist/supplemental-navigation.d.ts.map +1 -1
  334. package/dist/supplemental-navigation.js +1 -0
  335. package/dist/supplemental-navigation.js.map +1 -1
  336. package/dist/swipe-actions.d.ts.map +1 -1
  337. package/dist/swipe-actions.js +1 -0
  338. package/dist/swipe-actions.js.map +1 -1
  339. package/dist/table-family.d.ts.map +1 -1
  340. package/dist/table-family.js +1 -0
  341. package/dist/table-family.js.map +1 -1
  342. package/dist/table-sort-button.d.ts.map +1 -1
  343. package/dist/table-sort-button.js +1 -0
  344. package/dist/table-sort-button.js.map +1 -1
  345. package/dist/tags-input.d.ts.map +1 -1
  346. package/dist/tags-input.js +1 -0
  347. package/dist/tags-input.js.map +1 -1
  348. package/dist/task-list.d.ts.map +1 -1
  349. package/dist/task-list.js +1 -0
  350. package/dist/task-list.js.map +1 -1
  351. package/dist/text-annotation.d.ts.map +1 -1
  352. package/dist/text-annotation.js +1 -0
  353. package/dist/text-annotation.js.map +1 -1
  354. package/dist/text-formats.d.ts.map +1 -1
  355. package/dist/text-formats.js +1 -0
  356. package/dist/text-formats.js.map +1 -1
  357. package/dist/theme.d.ts.map +1 -1
  358. package/dist/theme.js +12 -1
  359. package/dist/theme.js.map +1 -1
  360. package/dist/thinking-orb.d.ts.map +1 -1
  361. package/dist/thinking-orb.js +1 -0
  362. package/dist/thinking-orb.js.map +1 -1
  363. package/dist/toast.d.ts.map +1 -1
  364. package/dist/toast.js +1 -0
  365. package/dist/toast.js.map +1 -1
  366. package/dist/toggle-group.d.ts.map +1 -1
  367. package/dist/toggle-group.js +1 -0
  368. package/dist/toggle-group.js.map +1 -1
  369. package/dist/top-bar.d.ts.map +1 -1
  370. package/dist/top-bar.js +1 -0
  371. package/dist/top-bar.js.map +1 -1
  372. package/dist/top.d.ts.map +1 -1
  373. package/dist/top.js +4 -3
  374. package/dist/top.js.map +1 -1
  375. package/dist/tour.d.ts.map +1 -1
  376. package/dist/tour.js +1 -0
  377. package/dist/tour.js.map +1 -1
  378. package/dist/transfer-list.d.ts.map +1 -1
  379. package/dist/transfer-list.js +1 -0
  380. package/dist/transfer-list.js.map +1 -1
  381. package/dist/tree.d.ts.map +1 -1
  382. package/dist/tree.js +1 -0
  383. package/dist/tree.js.map +1 -1
  384. package/dist/upload-item.d.ts.map +1 -1
  385. package/dist/upload-item.js +1 -0
  386. package/dist/upload-item.js.map +1 -1
  387. package/dist/virtual-list.d.ts.map +1 -1
  388. package/dist/virtual-list.js +1 -0
  389. package/dist/virtual-list.js.map +1 -1
  390. package/dist/voice-note.d.ts.map +1 -1
  391. package/dist/voice-note.js +1 -0
  392. package/dist/voice-note.js.map +1 -1
  393. package/package.json +8 -3
@@ -1 +1 @@
1
- {"version":3,"file":"data-table.js","sourceRoot":"","sources":["../src/data-table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B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IAbzB,MAAM,CAAC,EAAE,CAcX,CACN,CAAC;wCACJ,CAAC,CAAC,KAvCK,GAAG,CAAC,EAAE,CAwCV,CACN,CAAC,KAhDQ,OAAO,CAAC,KAAK,EAAE,EAAE,IAAI,MAAM,CAiD/B,CACP,CAAC,EACD,UAAU,CAAC,CAAC,CAAC,CACZ,0BACE,cAAI,SAAS,EAAC,yBAAyB,aACpC,WAAW,CAAC,CAAC,CAAC,aAAI,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE,cAAc,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EACrI,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;wCACnC,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;wCACzC,OAAO,CACL,aAAoB,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,uBAAuB,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,EAAmB,YACnJ,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IADf,MAAM,CAAC,EAAE,CAEb,CACN,CAAC;oCACJ,CAAC,CAAC,IACC,GACC,CACT,CAAC,CAAC,CAAC,IAAI,IACF,GACM,EAEb,MAAM,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,wBAAwB,YAAE,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IACnE,CACP,CAAC;AACJ,CAAC,CAE6B,CAAC;AAE/B,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,GAKhB,MAAM,mBAAmB,CAAC","sourcesContent":["import { TableSortButton } from \"./table-sort-button.js\";\nimport {\n dataTableColumnDefaults,\n dataTableDefaults,\n dataTableFamilyRecipe,\n dataTableFirstSortDirection,\n getNextDataTableSortState,\n resolveDataTableBody,\n resolveDataTableHeaderBands,\n splitPinnedDataTableColumns,\n resolveDataTableSelectAllState,\n validateDataTableColumns,\n validateDataTableRows,\n validateDataTableSortState,\n type DataTableAsyncState,\n type DataTableBodyItem,\n type DataTableCellHeat,\n type DataTableCellTone,\n type DataTableColumnDescriptor,\n type DataTableColumnGroup,\n type DataTableDensity,\n type DataTableRowDescriptor,\n type DataTableRowGroup,\n type DataTableSelection,\n type DataTableSortCycle,\n type DataTableSortState,\n} from \"@hjmds/design-contracts/components/data-table\";\nimport { forwardRef, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { useHjmDensityDefault } from \"./provider.js\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { tableCellEmphasis, type TableHeatColors } from \"./table-family.js\";\n\nexport type DataTableLabels = Readonly<{\n /** Accessible name for the table itself. */\n table: string;\n selectAll: string;\n /** Composes one row's selection control name from its id. */\n selectRow: (rowId: string) => string;\n /** Composes a sortable header's action name, including its current direction. */\n sortColumn: (header: string, direction: DataTableSortState<string>) => string;\n}>;\n\nexport type DataTableProps<ColumnKey extends string = string, RowKey extends string = string> = Readonly<{\n columns: readonly DataTableColumnDescriptor<ColumnKey>[];\n rows: readonly DataTableRowDescriptor<RowKey>[];\n labels: DataTableLabels;\n renderCell: (rowId: RowKey, columnId: ColumnKey) => ReactNode;\n /** Text for rich cells. Native composes the row name; Web labels each cell. Omit to use visible primitive text. */\n getCellText?: (rowId: RowKey, columnId: ColumnKey) => string | undefined;\n selection?: DataTableSelection<RowKey>;\n sortState?: DataTableSortState<ColumnKey>;\n sortCycle?: DataTableSortCycle;\n onSortChange?: (next: DataTableSortState<ColumnKey>) => void;\n asyncState?: DataTableAsyncState;\n density?: DataTableDensity;\n /** Composed beneath the table by the product — pagination, load more, totals. */\n footer?: ReactNode;\n /**\n * Optional summary row rendered as the table's `tfoot` (totals, averages). Returns the cell for\n * each column; HJM never computes the aggregate (2026-10-14, stat tables).\n */\n summaryRow?: (columnId: ColumnKey) => ReactNode;\n /** Header bands above leaf columns (Batting | Running). */\n columnGroups?: readonly DataTableColumnGroup<ColumnKey>[];\n /** Labeled row sections (Starters / Substitutes); each renders as its own `tbody`. */\n rowGroups?: readonly DataTableRowGroup<RowKey>[];\n /** Per-cell emphasis decided by the product (AG Grid cellClassRules / Savant percentile heat). */\n cellStyle?: (rowId: RowKey, columnId: ColumnKey) => Readonly<{ tone?: DataTableCellTone | null; heat?: DataTableCellHeat | null }> | null;\n /** Heat base colors (any CSS color); default high = danger red, low = info blue (Savant). */\n heatColors?: TableHeatColors;\n /** Bounds the scroll box height in px; the header stays fixed while rows scroll. */\n maxBodyHeight?: number;\n className?: string;\n /** Canonical layout-only placement on the root wrapper. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nfunction selectedRowKeysFrom<RowKey extends string>(\n selection: DataTableSelection<RowKey> | undefined,\n): ReadonlySet<RowKey> {\n if (!selection || selection.mode === \"none\") return new Set<RowKey>();\n if (selection.mode === \"single\") {\n const key = selection.selectedKey ?? selection.defaultSelectedKey ?? null;\n return key === null ? new Set<RowKey>() : new Set<RowKey>([key]);\n }\n return selection.selectedKeys ?? selection.defaultSelectedKeys ?? new Set<RowKey>();\n}\n\n/**\n * Pinned columns and bounded heights need their own scroll box (sticky cells stick to it);\n * other tables keep the original DOM.\n */\nfunction TableScroll({ scroll, maxBodyHeight, children }: Readonly<{ scroll: boolean; maxBodyHeight?: number | undefined; children: ReactNode }>) {\n if (!scroll && maxBodyHeight === undefined) return <>{children}</>;\n return (\n <div className=\"hjm-data-table__scroll\" data-bounded={maxBodyHeight !== undefined || undefined} style={maxBodyHeight !== undefined ? { maxBlockSize: maxBodyHeight } : undefined}>\n {children}\n </div>\n );\n}\n\ntype BodySection<RowKey> = { group: Readonly<{ id: string; label: string }> | null; rows: RowKey[] };\n\n/** Splits the resolved body into `tbody` sections: loose rows first, then one per row group. */\nfunction bodySections<RowKey>(items: readonly DataTableBodyItem<RowKey & string>[]): BodySection<RowKey>[] {\n const sections: BodySection<RowKey>[] = [];\n for (const item of items) {\n if (item.kind === \"group\") { sections.push({ group: { id: item.id, label: item.label }, rows: [] }); continue; }\n if (sections.length === 0) sections.push({ group: null, rows: [] });\n sections.at(-1)!.rows.push(item.id as RowKey);\n }\n // An empty table still renders one (empty) tbody, as before row groups existed.\n return sections.length > 0 ? sections : [{ group: null, rows: [] }];\n}\n\nexport const DataTable = forwardRef(function DataTable<\n ColumnKey extends string = string,\n RowKey extends string = string,\n>(\n {\n columns,\n rows,\n labels,\n renderCell,\n getCellText,\n selection,\n sortState = null,\n sortCycle = dataTableDefaults.sortCycle,\n onSortChange,\n asyncState = { status: \"idle\" },\n density: densityProp,\n footer,\n summaryRow,\n columnGroups,\n rowGroups,\n cellStyle,\n heatColors,\n maxBodyHeight,\n className,\n layoutStyle,\n }: DataTableProps<ColumnKey, RowKey>,\n forwardedRef: React.Ref<HTMLTableElement>,\n) {\n // Unconditional: `??` on the hook call would break the rules of hooks.\n const densityDefault = useHjmDensityDefault({ comfortable: \"regular\", compact: \"compact\" });\n const density = densityProp ?? densityDefault;\n validateDataTableColumns(columns);\n validateDataTableRows(rows);\n validateDataTableSortState(sortState, columns);\n const multiple = selection?.mode === \"multiple\";\n const single = selection?.mode === \"single\";\n // `defaultSelectedKey(s)` used to be re-read on every render, so an\n // uncontrolled table reported the click to `onSelectionChange` but kept showing\n // the default (same defect and fix as Tree, 2026-10-06). The uncontrolled value\n // lives in state; a controlled `selectedKey(s)` (including `null`) still wins.\n const selectionControlled = single\n ? selection.selectedKey !== undefined\n : multiple ? selection.selectedKeys !== undefined : true;\n const [uncontrolledKeys, setUncontrolledKeys] = useState<ReadonlySet<RowKey>>(() => selectedRowKeysFrom(selection));\n const selectedKeys: ReadonlySet<RowKey> = selectionControlled\n ? selectedRowKeysFrom(selection)\n : uncontrolledKeys;\n const commitSelection = (next: ReadonlySet<RowKey>) => {\n if (!selectionControlled) setUncontrolledKeys(next);\n };\n const hasSelector = selection !== undefined && selection.mode !== \"none\";\n // Only an unbroken leading run is pinned (contract). Sticky offsets need the rendered widths of\n // the cells before each pinned column, so they are measured rather than guessed from `width`.\n const pinnedCount = splitPinnedDataTableColumns(columns).pinned.length;\n const headerRowRef = useRef<HTMLTableRowElement>(null);\n const [pinnedOffsets, setPinnedOffsets] = useState<readonly number[]>([]);\n useLayoutEffect(() => {\n const row = headerRowRef.current;\n if (!row || pinnedCount === 0) return;\n const stickyCells = pinnedCount + (hasSelector ? 1 : 0);\n const measure = () => {\n const cells = [...row.cells].slice(0, stickyCells);\n const offsets: number[] = [];\n let sum = 0;\n for (const cell of cells) { offsets.push(sum); sum += cell.getBoundingClientRect().width; }\n setPinnedOffsets((previous) => previous.length === offsets.length && previous.every((value, i) => value === offsets[i]) ? previous : offsets);\n };\n measure();\n if (typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(measure);\n for (const cell of [...row.cells].slice(0, stickyCells)) observer.observe(cell);\n return () => observer.disconnect();\n }, [pinnedCount, hasSelector, columns]);\n // Sticky props for the selector cell (when pinning) and each pinned column, by visual position.\n const stickyAt = (position: number, isLast: boolean): Readonly<{ className?: string; style?: CSSProperties }> => {\n if (pinnedCount === 0) return {};\n return {\n className: isLast ? \"hjm-data-table__pinned hjm-data-table__pinned-edge\" : \"hjm-data-table__pinned\",\n style: { insetInlineStart: pinnedOffsets[position] ?? 0 },\n };\n };\n const selectorSticky = hasSelector && pinnedCount > 0 ? stickyAt(0, false) : {};\n const columnSticky = (index: number) => index < pinnedCount ? stickyAt(index + (hasSelector ? 1 : 0), index === pinnedCount - 1) : {};\n const selectAllState = multiple ? resolveDataTableSelectAllState(rows, selectedKeys) : false;\n const bands = useMemo(() => columnGroups && columnGroups.length > 0 ? resolveDataTableHeaderBands(columns, columnGroups) : null, [columns, columnGroups]);\n const sections = useMemo(() => bodySections<RowKey>(resolveDataTableBody(rows, rowGroups ?? [])), [rows, rowGroups]);\n const rowById = useMemo(() => new Map(rows.map((row) => [row.id, row])), [rows]);\n const columnSpan = columns.length + (hasSelector ? 1 : 0);\n\n const toggleRow = (row: DataTableRowDescriptor<RowKey>) => {\n if (row.disabled || !selection || selection.mode === \"none\") return;\n if (selection.mode === \"single\") {\n const current = selectedKeys.has(row.id) ? row.id : null;\n const next = current === row.id && selection.disallowEmptySelection !== true ? null : row.id;\n commitSelection(next === null ? new Set<RowKey>() : new Set<RowKey>([next]));\n selection.onSelectionChange?.(next);\n return;\n }\n const next = new Set(selectedKeys);\n if (next.has(row.id)) next.delete(row.id); else next.add(row.id);\n commitSelection(next);\n selection.onSelectionChange?.(next);\n };\n const toggleAll = () => {\n if (!multiple) return;\n // Disabled rows stay out of both the denominator and the result, matching\n // the shared select-all accounting.\n const selectable = rows.filter((row) => !row.disabled);\n const next = selectAllState === true\n ? new Set([...selectedKeys].filter((id) => !selectable.some((row) => row.id === id)))\n : new Set([...selectedKeys, ...selectable.map((row) => row.id)]);\n commitSelection(next);\n selection.onSelectionChange?.(next);\n };\n\n return (\n <div className={classNames(\"hjm-data-table\", className)} style={layoutStyle} data-density={density}>\n {asyncState.status === \"idle\" ? null : (\n <p className=\"hjm-data-table__state\" role={asyncState.status === \"error\" ? \"alert\" : \"status\"}>{asyncState.message}</p>\n )}\n <TableScroll scroll={pinnedCount > 0} maxBodyHeight={maxBodyHeight}>\n <table ref={forwardedRef} className=\"hjm-data-table__table\" aria-label={labels.table} aria-busy={asyncState.status === \"loading\" || undefined}>\n <thead>\n {bands ? (\n <tr className=\"hjm-data-table__bands\">\n {hasSelector ? <td aria-hidden=\"true\" className={classNames(\"hjm-data-table__selector\", selectorSticky.className)} style={selectorSticky.style} /> : null}\n {bands.map((band) => {\n const first = columns.findIndex((column) => column.id === band.columnIds[0]);\n // A band sticks only when every column under it is pinned; otherwise it scrolls with them.\n const sticky = first + band.span <= pinnedCount ? columnSticky(first + band.span - 1) : {};\n const stickyStyle = sticky.style ? { insetInlineStart: pinnedOffsets[first + (hasSelector ? 1 : 0)] ?? 0 } : undefined;\n return band.header === null\n ? <td key={band.id} aria-hidden=\"true\" colSpan={band.span} className={sticky.className} style={stickyStyle} />\n : <th key={band.id} scope=\"colgroup\" colSpan={band.span} className={classNames(\"hjm-data-table__band\", sticky.className)} style={stickyStyle}><span>{band.header}</span></th>;\n })}\n </tr>\n ) : null}\n <tr ref={headerRowRef}>\n {selection && selection.mode !== \"none\" ? (\n <th scope=\"col\" className={classNames(\"hjm-data-table__selector\", selectorSticky.className)} style={selectorSticky.style}>\n {multiple ? (\n <button\n type=\"button\"\n role=\"checkbox\"\n aria-checked={selectAllState === \"mixed\" ? \"mixed\" : String(selectAllState === true) as \"true\" | \"false\"}\n aria-label={labels.selectAll}\n className=\"hjm-data-table__check\"\n onClick={toggleAll}\n >\n {selectAllState === true ? \"✓\" : selectAllState === \"mixed\" ? \"–\" : \"\"}\n </button>\n ) : null}\n </th>\n ) : null}\n {columns.map((column, columnIndex) => {\n const sorted = sortState?.columnId === column.id ? sortState.direction : null;\n const sticky = columnSticky(columnIndex);\n return (\n <th\n key={column.id}\n scope=\"col\"\n // The direction passes straight through to aria-sort; the\n // contract already speaks that vocabulary.\n aria-sort={sorted ?? undefined}\n className={sticky.className}\n style={{ inlineSize: column.width, textAlign: column.align ?? dataTableColumnDefaults.align, ...sticky.style } as CSSProperties}\n >\n {column.sortable ? (\n // A button inside the header, never the header itself.\n <TableSortButton\n header={column.header}\n direction={sorted}\n glyphs={{ ascending: \"▲\", descending: \"▼\", none: \"↕\" }}\n className=\"hjm-data-table__sort\"\n accessibleName={labels.sortColumn(column.header, sortState as DataTableSortState<string>)}\n // `sortDescFirst` columns (stat tables: highest first) start descending.\n onSort={() => onSortChange?.(getNextDataTableSortState(sortState, column.id, sortCycle, dataTableFirstSortDirection(column)))}\n />\n ) : column.header}\n </th>\n );\n })}\n </tr>\n </thead>\n {sections.map((section) => (\n <tbody key={section.group?.id ?? \"rows\"}>\n {section.group ? (\n <tr className=\"hjm-data-table__group\">\n <th scope=\"rowgroup\" colSpan={columnSpan}><span>{section.group.label}</span></th>\n </tr>\n ) : null}\n {section.rows.map((rowId) => rowById.get(rowId)!).map((row) => (\n <tr key={row.id} aria-selected={selection && selection.mode !== \"none\" ? selectedKeys.has(row.id) : undefined} data-disabled={row.disabled || undefined}>\n {selection && selection.mode !== \"none\" ? (\n <td className={classNames(\"hjm-data-table__selector\", selectorSticky.className)} style={selectorSticky.style}>\n <button\n type=\"button\"\n role={multiple ? \"checkbox\" : \"radio\"}\n aria-checked={selectedKeys.has(row.id)}\n aria-label={labels.selectRow(row.id)}\n aria-disabled={row.disabled || undefined}\n className=\"hjm-data-table__check\"\n onClick={() => toggleRow(row)}\n >\n {selectedKeys.has(row.id) ? \"✓\" : \"\"}\n </button>\n </td>\n ) : null}\n {columns.map((column, columnIndex) => {\n const sticky = columnSticky(columnIndex);\n const emphasis = tableCellEmphasis(cellStyle?.(row.id, column.id), heatColors);\n // Sub-rows (TanStack `depth`) indent only the first column, which is the pinned one when pinning.\n const depth = columnIndex === 0 ? row.depth ?? 0 : 0;\n return (\n <td\n key={column.id}\n aria-label={getCellText?.(row.id, column.id)}\n className={classNames(sticky.className, emphasis.heat && \"hjm-table-family__heat\")}\n data-tone={emphasis.tone}\n data-heat={emphasis.heat}\n data-depth={depth > 0 ? depth : undefined}\n style={{\n textAlign: column.align ?? dataTableColumnDefaults.align,\n ...emphasis.style,\n ...(depth > 0 ? { \"--hjm-data-table-indent\": `${depth * dataTableFamilyRecipe.depthIndent}px` } : {}),\n ...sticky.style,\n } as CSSProperties}\n >\n {renderCell(row.id, column.id)}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n ))}\n {summaryRow ? (\n <tfoot>\n <tr className=\"hjm-data-table__summary\">\n {hasSelector ? <td className={classNames(\"hjm-data-table__selector\", selectorSticky.className)} style={selectorSticky.style} /> : null}\n {columns.map((column, columnIndex) => {\n const sticky = columnSticky(columnIndex);\n return (\n <td key={column.id} className={sticky.className} style={{ textAlign: column.align ?? dataTableColumnDefaults.align, ...sticky.style } as CSSProperties}>\n {summaryRow(column.id)}\n </td>\n );\n })}\n </tr>\n </tfoot>\n ) : null}\n </table>\n </TableScroll>\n {/* Pagination or load-more is composed beneath the table, never owned by it. */}\n {footer ? <div className=\"hjm-data-table__footer\">{footer}</div> : null}\n </div>\n );\n}) as <ColumnKey extends string = string, RowKey extends string = string>(\n props: DataTableProps<ColumnKey, RowKey> & { ref?: React.Ref<HTMLTableElement> },\n) => React.ReactElement | null;\n\nexport {\n LineScore,\n MatrixTable,\n ComparisonTable,\n type LineScoreProps,\n type MatrixTableProps,\n type ComparisonTableProps,\n type TableHeatColors,\n} from \"./table-family.js\";\n"]}
1
+ {"version":3,"file":"data-table.js","sourceRoot":"","sources":["../src/data-table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,GAa3B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAsC,MAAM,OAAO,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAwB,MAAM,mBAAmB,CAAC;AA+C5E,SAAS,mBAAmB,CAC1B,SAAiD;IAEjD,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,GAAG,EAAU,CAAC;IACtE,IAAI,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,GA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O,CACL,aAAoB,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,uBAAuB,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,EAAmB,YACnJ,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IADf,MAAM,CAAC,EAAE,CAEb,CACN,CAAC;oCACJ,CAAC,CAAC,IACC,GACC,CACT,CAAC,CAAC,CAAC,IAAI,IACF,GACM,EAEb,MAAM,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,wBAAwB,YAAE,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IACnE,CACP,CAAC;AACJ,CAAC,CAE6B,CAAC;AAE/B,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,GAKhB,MAAM,mBAAmB,CAAC","sourcesContent":["\"use client\";\n\nimport { TableSortButton } from \"./table-sort-button.js\";\nimport {\n dataTableColumnDefaults,\n dataTableDefaults,\n dataTableFamilyRecipe,\n dataTableFirstSortDirection,\n getNextDataTableSortState,\n resolveDataTableBody,\n resolveDataTableHeaderBands,\n splitPinnedDataTableColumns,\n resolveDataTableSelectAllState,\n validateDataTableColumns,\n validateDataTableRows,\n validateDataTableSortState,\n type DataTableAsyncState,\n type DataTableBodyItem,\n type DataTableCellHeat,\n type DataTableCellTone,\n type DataTableColumnDescriptor,\n type DataTableColumnGroup,\n type DataTableDensity,\n type DataTableRowDescriptor,\n type DataTableRowGroup,\n type DataTableSelection,\n type DataTableSortCycle,\n type DataTableSortState,\n} from \"@hjmds/design-contracts/components/data-table\";\nimport { forwardRef, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { useHjmDensityDefault } from \"./provider.js\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { tableCellEmphasis, type TableHeatColors } from \"./table-family.js\";\n\nexport type DataTableLabels = Readonly<{\n /** Accessible name for the table itself. */\n table: string;\n selectAll: string;\n /** Composes one row's selection control name from its id. */\n selectRow: (rowId: string) => string;\n /** Composes a sortable header's action name, including its current direction. */\n sortColumn: (header: string, direction: DataTableSortState<string>) => string;\n}>;\n\nexport type DataTableProps<ColumnKey extends string = string, RowKey extends string = string> = Readonly<{\n columns: readonly DataTableColumnDescriptor<ColumnKey>[];\n rows: readonly DataTableRowDescriptor<RowKey>[];\n labels: DataTableLabels;\n renderCell: (rowId: RowKey, columnId: ColumnKey) => ReactNode;\n /** Text for rich cells. Native composes the row name; Web labels each cell. Omit to use visible primitive text. */\n getCellText?: (rowId: RowKey, columnId: ColumnKey) => string | undefined;\n selection?: DataTableSelection<RowKey>;\n sortState?: DataTableSortState<ColumnKey>;\n sortCycle?: DataTableSortCycle;\n onSortChange?: (next: DataTableSortState<ColumnKey>) => void;\n asyncState?: DataTableAsyncState;\n density?: DataTableDensity;\n /** Composed beneath the table by the product — pagination, load more, totals. */\n footer?: ReactNode;\n /**\n * Optional summary row rendered as the table's `tfoot` (totals, averages). Returns the cell for\n * each column; HJM never computes the aggregate (2026-10-14, stat tables).\n */\n summaryRow?: (columnId: ColumnKey) => ReactNode;\n /** Header bands above leaf columns (Batting | Running). */\n columnGroups?: readonly DataTableColumnGroup<ColumnKey>[];\n /** Labeled row sections (Starters / Substitutes); each renders as its own `tbody`. */\n rowGroups?: readonly DataTableRowGroup<RowKey>[];\n /** Per-cell emphasis decided by the product (AG Grid cellClassRules / Savant percentile heat). */\n cellStyle?: (rowId: RowKey, columnId: ColumnKey) => Readonly<{ tone?: DataTableCellTone | null; heat?: DataTableCellHeat | null }> | null;\n /** Heat base colors (any CSS color); default high = danger red, low = info blue (Savant). */\n heatColors?: TableHeatColors;\n /** Bounds the scroll box height in px; the header stays fixed while rows scroll. */\n maxBodyHeight?: number;\n className?: string;\n /** Canonical layout-only placement on the root wrapper. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nfunction selectedRowKeysFrom<RowKey extends string>(\n selection: DataTableSelection<RowKey> | undefined,\n): ReadonlySet<RowKey> {\n if (!selection || selection.mode === \"none\") return new Set<RowKey>();\n if (selection.mode === \"single\") {\n const key = selection.selectedKey ?? selection.defaultSelectedKey ?? null;\n return key === null ? new Set<RowKey>() : new Set<RowKey>([key]);\n }\n return selection.selectedKeys ?? selection.defaultSelectedKeys ?? new Set<RowKey>();\n}\n\n/**\n * Pinned columns and bounded heights need their own scroll box (sticky cells stick to it);\n * other tables keep the original DOM.\n */\nfunction TableScroll({ scroll, maxBodyHeight, children }: Readonly<{ scroll: boolean; maxBodyHeight?: number | undefined; children: ReactNode }>) {\n if (!scroll && maxBodyHeight === undefined) return <>{children}</>;\n return (\n <div className=\"hjm-data-table__scroll\" data-bounded={maxBodyHeight !== undefined || undefined} style={maxBodyHeight !== undefined ? { maxBlockSize: maxBodyHeight } : undefined}>\n {children}\n </div>\n );\n}\n\ntype BodySection<RowKey> = { group: Readonly<{ id: string; label: string }> | null; rows: RowKey[] };\n\n/** Splits the resolved body into `tbody` sections: loose rows first, then one per row group. */\nfunction bodySections<RowKey>(items: readonly DataTableBodyItem<RowKey & string>[]): BodySection<RowKey>[] {\n const sections: BodySection<RowKey>[] = [];\n for (const item of items) {\n if (item.kind === \"group\") { sections.push({ group: { id: item.id, label: item.label }, rows: [] }); continue; }\n if (sections.length === 0) sections.push({ group: null, rows: [] });\n sections.at(-1)!.rows.push(item.id as RowKey);\n }\n // An empty table still renders one (empty) tbody, as before row groups existed.\n return sections.length > 0 ? sections : [{ group: null, rows: [] }];\n}\n\nexport const DataTable = forwardRef(function DataTable<\n ColumnKey extends string = string,\n RowKey extends string = string,\n>(\n {\n columns,\n rows,\n labels,\n renderCell,\n getCellText,\n selection,\n sortState = null,\n sortCycle = dataTableDefaults.sortCycle,\n onSortChange,\n asyncState = { status: \"idle\" },\n density: densityProp,\n footer,\n summaryRow,\n columnGroups,\n rowGroups,\n cellStyle,\n heatColors,\n maxBodyHeight,\n className,\n layoutStyle,\n }: DataTableProps<ColumnKey, RowKey>,\n forwardedRef: React.Ref<HTMLTableElement>,\n) {\n // Unconditional: `??` on the hook call would break the rules of hooks.\n const densityDefault = useHjmDensityDefault({ comfortable: \"regular\", compact: \"compact\" });\n const density = densityProp ?? densityDefault;\n validateDataTableColumns(columns);\n validateDataTableRows(rows);\n validateDataTableSortState(sortState, columns);\n const multiple = selection?.mode === \"multiple\";\n const single = selection?.mode === \"single\";\n // `defaultSelectedKey(s)` used to be re-read on every render, so an\n // uncontrolled table reported the click to `onSelectionChange` but kept showing\n // the default (same defect and fix as Tree, 2026-10-06). The uncontrolled value\n // lives in state; a controlled `selectedKey(s)` (including `null`) still wins.\n const selectionControlled = single\n ? selection.selectedKey !== undefined\n : multiple ? selection.selectedKeys !== undefined : true;\n const [uncontrolledKeys, setUncontrolledKeys] = useState<ReadonlySet<RowKey>>(() => selectedRowKeysFrom(selection));\n const selectedKeys: ReadonlySet<RowKey> = selectionControlled\n ? selectedRowKeysFrom(selection)\n : uncontrolledKeys;\n const commitSelection = (next: ReadonlySet<RowKey>) => {\n if (!selectionControlled) setUncontrolledKeys(next);\n };\n const hasSelector = selection !== undefined && selection.mode !== \"none\";\n // Only an unbroken leading run is pinned (contract). Sticky offsets need the rendered widths of\n // the cells before each pinned column, so they are measured rather than guessed from `width`.\n const pinnedCount = splitPinnedDataTableColumns(columns).pinned.length;\n const headerRowRef = useRef<HTMLTableRowElement>(null);\n const [pinnedOffsets, setPinnedOffsets] = useState<readonly number[]>([]);\n useLayoutEffect(() => {\n const row = headerRowRef.current;\n if (!row || pinnedCount === 0) return;\n const stickyCells = pinnedCount + (hasSelector ? 1 : 0);\n const measure = () => {\n const cells = [...row.cells].slice(0, stickyCells);\n const offsets: number[] = [];\n let sum = 0;\n for (const cell of cells) { offsets.push(sum); sum += cell.getBoundingClientRect().width; }\n setPinnedOffsets((previous) => previous.length === offsets.length && previous.every((value, i) => value === offsets[i]) ? previous : offsets);\n };\n measure();\n if (typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(measure);\n for (const cell of [...row.cells].slice(0, stickyCells)) observer.observe(cell);\n return () => observer.disconnect();\n }, [pinnedCount, hasSelector, columns]);\n // Sticky props for the selector cell (when pinning) and each pinned column, by visual position.\n const stickyAt = (position: number, isLast: boolean): Readonly<{ className?: string; style?: CSSProperties }> => {\n if (pinnedCount === 0) return {};\n return {\n className: isLast ? \"hjm-data-table__pinned hjm-data-table__pinned-edge\" : \"hjm-data-table__pinned\",\n style: { insetInlineStart: pinnedOffsets[position] ?? 0 },\n };\n };\n const selectorSticky = hasSelector && pinnedCount > 0 ? stickyAt(0, false) : {};\n const columnSticky = (index: number) => index < pinnedCount ? stickyAt(index + (hasSelector ? 1 : 0), index === pinnedCount - 1) : {};\n const selectAllState = multiple ? resolveDataTableSelectAllState(rows, selectedKeys) : false;\n const bands = useMemo(() => columnGroups && columnGroups.length > 0 ? resolveDataTableHeaderBands(columns, columnGroups) : null, [columns, columnGroups]);\n const sections = useMemo(() => bodySections<RowKey>(resolveDataTableBody(rows, rowGroups ?? [])), [rows, rowGroups]);\n const rowById = useMemo(() => new Map(rows.map((row) => [row.id, row])), [rows]);\n const columnSpan = columns.length + (hasSelector ? 1 : 0);\n\n const toggleRow = (row: DataTableRowDescriptor<RowKey>) => {\n if (row.disabled || !selection || selection.mode === \"none\") return;\n if (selection.mode === \"single\") {\n const current = selectedKeys.has(row.id) ? row.id : null;\n const next = current === row.id && selection.disallowEmptySelection !== true ? null : row.id;\n commitSelection(next === null ? new Set<RowKey>() : new Set<RowKey>([next]));\n selection.onSelectionChange?.(next);\n return;\n }\n const next = new Set(selectedKeys);\n if (next.has(row.id)) next.delete(row.id); else next.add(row.id);\n commitSelection(next);\n selection.onSelectionChange?.(next);\n };\n const toggleAll = () => {\n if (!multiple) return;\n // Disabled rows stay out of both the denominator and the result, matching\n // the shared select-all accounting.\n const selectable = rows.filter((row) => !row.disabled);\n const next = selectAllState === true\n ? new Set([...selectedKeys].filter((id) => !selectable.some((row) => row.id === id)))\n : new Set([...selectedKeys, ...selectable.map((row) => row.id)]);\n commitSelection(next);\n selection.onSelectionChange?.(next);\n };\n\n return (\n <div className={classNames(\"hjm-data-table\", className)} style={layoutStyle} data-density={density}>\n {asyncState.status === \"idle\" ? null : (\n <p className=\"hjm-data-table__state\" role={asyncState.status === \"error\" ? \"alert\" : \"status\"}>{asyncState.message}</p>\n )}\n <TableScroll scroll={pinnedCount > 0} maxBodyHeight={maxBodyHeight}>\n <table ref={forwardedRef} className=\"hjm-data-table__table\" aria-label={labels.table} aria-busy={asyncState.status === \"loading\" || undefined}>\n <thead>\n {bands ? (\n <tr className=\"hjm-data-table__bands\">\n {hasSelector ? <td aria-hidden=\"true\" className={classNames(\"hjm-data-table__selector\", selectorSticky.className)} style={selectorSticky.style} /> : null}\n {bands.map((band) => {\n const first = columns.findIndex((column) => column.id === band.columnIds[0]);\n // A band sticks only when every column under it is pinned; otherwise it scrolls with them.\n const sticky = first + band.span <= pinnedCount ? columnSticky(first + band.span - 1) : {};\n const stickyStyle = sticky.style ? { insetInlineStart: pinnedOffsets[first + (hasSelector ? 1 : 0)] ?? 0 } : undefined;\n return band.header === null\n ? <td key={band.id} aria-hidden=\"true\" colSpan={band.span} className={sticky.className} style={stickyStyle} />\n : <th key={band.id} scope=\"colgroup\" colSpan={band.span} className={classNames(\"hjm-data-table__band\", sticky.className)} style={stickyStyle}><span>{band.header}</span></th>;\n })}\n </tr>\n ) : null}\n <tr ref={headerRowRef}>\n {selection && selection.mode !== \"none\" ? (\n <th scope=\"col\" className={classNames(\"hjm-data-table__selector\", selectorSticky.className)} style={selectorSticky.style}>\n {multiple ? (\n <button\n type=\"button\"\n role=\"checkbox\"\n aria-checked={selectAllState === \"mixed\" ? \"mixed\" : String(selectAllState === true) as \"true\" | \"false\"}\n aria-label={labels.selectAll}\n className=\"hjm-data-table__check\"\n onClick={toggleAll}\n >\n {selectAllState === true ? \"✓\" : selectAllState === \"mixed\" ? \"–\" : \"\"}\n </button>\n ) : null}\n </th>\n ) : null}\n {columns.map((column, columnIndex) => {\n const sorted = sortState?.columnId === column.id ? sortState.direction : null;\n const sticky = columnSticky(columnIndex);\n return (\n <th\n key={column.id}\n scope=\"col\"\n // The direction passes straight through to aria-sort; the\n // contract already speaks that vocabulary.\n aria-sort={sorted ?? undefined}\n className={sticky.className}\n style={{ inlineSize: column.width, textAlign: column.align ?? dataTableColumnDefaults.align, ...sticky.style } as CSSProperties}\n >\n {column.sortable ? (\n // A button inside the header, never the header itself.\n <TableSortButton\n header={column.header}\n direction={sorted}\n glyphs={{ ascending: \"▲\", descending: \"▼\", none: \"↕\" }}\n className=\"hjm-data-table__sort\"\n accessibleName={labels.sortColumn(column.header, sortState as DataTableSortState<string>)}\n // `sortDescFirst` columns (stat tables: highest first) start descending.\n onSort={() => onSortChange?.(getNextDataTableSortState(sortState, column.id, sortCycle, dataTableFirstSortDirection(column)))}\n />\n ) : column.header}\n </th>\n );\n })}\n </tr>\n </thead>\n {sections.map((section) => (\n <tbody key={section.group?.id ?? \"rows\"}>\n {section.group ? (\n <tr className=\"hjm-data-table__group\">\n <th scope=\"rowgroup\" colSpan={columnSpan}><span>{section.group.label}</span></th>\n </tr>\n ) : null}\n {section.rows.map((rowId) => rowById.get(rowId)!).map((row) => (\n <tr key={row.id} aria-selected={selection && selection.mode !== \"none\" ? selectedKeys.has(row.id) : undefined} data-disabled={row.disabled || undefined}>\n {selection && selection.mode !== \"none\" ? (\n <td className={classNames(\"hjm-data-table__selector\", selectorSticky.className)} style={selectorSticky.style}>\n <button\n type=\"button\"\n role={multiple ? \"checkbox\" : \"radio\"}\n aria-checked={selectedKeys.has(row.id)}\n aria-label={labels.selectRow(row.id)}\n aria-disabled={row.disabled || undefined}\n className=\"hjm-data-table__check\"\n onClick={() => toggleRow(row)}\n >\n {selectedKeys.has(row.id) ? \"✓\" : \"\"}\n </button>\n </td>\n ) : null}\n {columns.map((column, columnIndex) => {\n const sticky = columnSticky(columnIndex);\n const emphasis = tableCellEmphasis(cellStyle?.(row.id, column.id), heatColors);\n // Sub-rows (TanStack `depth`) indent only the first column, which is the pinned one when pinning.\n const depth = columnIndex === 0 ? row.depth ?? 0 : 0;\n return (\n <td\n key={column.id}\n aria-label={getCellText?.(row.id, column.id)}\n className={classNames(sticky.className, emphasis.heat && \"hjm-table-family__heat\")}\n data-tone={emphasis.tone}\n data-heat={emphasis.heat}\n data-depth={depth > 0 ? depth : undefined}\n style={{\n textAlign: column.align ?? dataTableColumnDefaults.align,\n ...emphasis.style,\n ...(depth > 0 ? { \"--hjm-data-table-indent\": `${depth * dataTableFamilyRecipe.depthIndent}px` } : {}),\n ...sticky.style,\n } as CSSProperties}\n >\n {renderCell(row.id, column.id)}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n ))}\n {summaryRow ? (\n <tfoot>\n <tr className=\"hjm-data-table__summary\">\n {hasSelector ? <td className={classNames(\"hjm-data-table__selector\", selectorSticky.className)} style={selectorSticky.style} /> : null}\n {columns.map((column, columnIndex) => {\n const sticky = columnSticky(columnIndex);\n return (\n <td key={column.id} className={sticky.className} style={{ textAlign: column.align ?? dataTableColumnDefaults.align, ...sticky.style } as CSSProperties}>\n {summaryRow(column.id)}\n </td>\n );\n })}\n </tr>\n </tfoot>\n ) : null}\n </table>\n </TableScroll>\n {/* Pagination or load-more is composed beneath the table, never owned by it. */}\n {footer ? <div className=\"hjm-data-table__footer\">{footer}</div> : null}\n </div>\n );\n}) as <ColumnKey extends string = string, RowKey extends string = string>(\n props: DataTableProps<ColumnKey, RowKey> & { ref?: React.Ref<HTMLTableElement> },\n) => React.ReactElement | null;\n\nexport {\n LineScore,\n MatrixTable,\n ComparisonTable,\n type LineScoreProps,\n type MatrixTableProps,\n type ComparisonTableProps,\n type TableHeatColors,\n} from \"./table-family.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"date-entry.d.ts","sourceRoot":"","sources":["../src/date-entry.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAG/H,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG,QAAQ,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,uBAAuB,CAAA;CAAE,CAAC,CAAC;AAC7H,mGAAmG;AACnG,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,+BAuB9C"}
1
+ {"version":3,"file":"date-entry.d.ts","sourceRoot":"","sources":["../src/date-entry.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAiD,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAG/H,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG,QAAQ,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,uBAAuB,CAAA;CAAE,CAAC,CAAC;AAC7H,mGAAmG;AACnG,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,+BAuB9C"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { useRef } from "react";
3
4
  import { resolveDateEntryControl, updateDateEntryDraft } from "@hjmds/design-contracts/date-entry";
@@ -1 +1 @@
1
- {"version":3,"file":"date-entry.js","sourceRoot":"","sources":["../src/date-entry.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAA8B,MAAM,oCAAoC,CAAC;AAC/H,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,mGAAmG;AACnG,MAAM,UAAU,SAAS,CAAC,K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Draft, type DateEntryControlProps } from \"@hjmds/design-contracts/date-entry\";\nimport { FieldGroup } from \"./field-group.js\";\nimport { TextField } from \"./forms.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nexport type DateEntryProps = DateEntryControlProps & Readonly<{ className?: string; layoutStyle?: HjmCompositionStyleProp }>;\n/** Date policy stays here; FieldGroup owns related-input semantics, feedback and edit lifetime. */\nexport function DateEntry(props: DateEntryProps) {\n const resolved = resolveDateEntryControl(props);\n const current = useRef(props);\n current.current = props;\n return <FieldGroup layout=\"inline\" {...(props.className === undefined ? {} : { className: props.className })} {...(props.layoutStyle === undefined ? {} : { layoutStyle: props.layoutStyle })}\n descriptor={{ label: props.labels.label, disabled: props.disabled ?? false,\n ...(props.description ? { description: props.description } : {}),\n ...(resolved.error ? { error: { message: resolved.error, fieldIds: resolved.fields.filter(field => field.invalid).map(field => field.part) } } : {}),\n fields: resolved.fields.map(field => ({ id: field.part, label: props.labels[field.part] })) }}\n renderField={({ id, controlProps, guardChange }) => {\n const field = resolved.fields.find(field => field.part === id);\n if (!field) return null;\n return <TextField {...controlProps} value={field.value} type=\"text\"\n inputMode={field.part === \"month\" && props.monthInput !== \"numeric\" ? \"text\" : \"numeric\"}\n autoComplete={props.purpose === \"birthdate\" ? `bday-${field.part}` : \"off\"}\n required={props.required ?? false} readOnly={props.readOnly ?? false}\n onBlur={() => current.current.onBlur?.(field.part)}\n onValueChange={guardChange((value: string) => {\n // Retained host callbacks must not edit an old draft or bypass a new read-only policy.\n const latest = current.current;\n if (!latest.readOnly) latest.onValueChange(updateDateEntryDraft(latest.value, field.part, value));\n })} />;\n }} />;\n}\n"]}
1
+ {"version":3,"file":"date-entry.js","sourceRoot":"","sources":["../src/date-entry.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAA8B,MAAM,oCAAoC,CAAC;A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EAAE,KAAK,CAAC,CAAC,CAAC;gBACpG,CAAC,CAAC,GAAI,CAAC;QACX,CAAC,GAAI,CAAC;AACV,CAAC","sourcesContent":["\"use client\";\n\nimport { useRef } from \"react\";\nimport { resolveDateEntryControl, updateDateEntryDraft, type DateEntryControlProps } from \"@hjmds/design-contracts/date-entry\";\nimport { FieldGroup } from \"./field-group.js\";\nimport { TextField } from \"./forms.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nexport type DateEntryProps = DateEntryControlProps & Readonly<{ className?: string; layoutStyle?: HjmCompositionStyleProp }>;\n/** Date policy stays here; FieldGroup owns related-input semantics, feedback and edit lifetime. */\nexport function DateEntry(props: DateEntryProps) {\n const resolved = resolveDateEntryControl(props);\n const current = useRef(props);\n current.current = props;\n return <FieldGroup layout=\"inline\" {...(props.className === undefined ? {} : { className: props.className })} {...(props.layoutStyle === undefined ? {} : { layoutStyle: props.layoutStyle })}\n descriptor={{ label: props.labels.label, disabled: props.disabled ?? false,\n ...(props.description ? { description: props.description } : {}),\n ...(resolved.error ? { error: { message: resolved.error, fieldIds: resolved.fields.filter(field => field.invalid).map(field => field.part) } } : {}),\n fields: resolved.fields.map(field => ({ id: field.part, label: props.labels[field.part] })) }}\n renderField={({ id, controlProps, guardChange }) => {\n const field = resolved.fields.find(field => field.part === id);\n if (!field) return null;\n return <TextField {...controlProps} value={field.value} type=\"text\"\n inputMode={field.part === \"month\" && props.monthInput !== \"numeric\" ? \"text\" : \"numeric\"}\n autoComplete={props.purpose === \"birthdate\" ? `bday-${field.part}` : \"off\"}\n required={props.required ?? false} readOnly={props.readOnly ?? false}\n onBlur={() => current.current.onBlur?.(field.part)}\n onValueChange={guardChange((value: string) => {\n // Retained host callbacks must not edit an old draft or bypass a new read-only policy.\n const latest = current.current;\n if (!latest.readOnly) latest.onValueChange(updateDateEntryDraft(latest.value, field.part, value));\n })} />;\n }} />;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRo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,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAClG,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,OAAO,EAAE,EAClC,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,UAAU,EACV,UAAU,EACV,IAAe,EACf,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,EACT,WAAW,GACZ,EAAE,eAAe,CAAC,OAAO,CAAC,+BA0I1B"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import {} from "@hjmds/design-contracts/components/calendar";
3
4
  import { datePickerRecipe, resolveDatePickerTriggerText, validateDatePickerDescriptor, } from "@hjmds/design-contracts/components/date-picker";
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../src/date-picker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGN,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,GAI7B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,WAAW,EACX,SAAS,EACT,KAAK,EACL,eAAe,EACf,MAAM,EACN,QAAQ,GAET,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAA8C,MAAM,eAAe,CAA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AkB,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EAClJ,qBAAqB,EAAE,qBAAqB,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,WAC/D,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAC9E,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAI,IAClH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,8BAA8B,YAAE,WAAW,GAAQ,EACtG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,wBAAwB,EAAC,IAAI,EAAC,OAAO,YAAE,KAAK,GAAQ,IAC9F,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n type ComposeCalendarAccessibleName,\n type ResolvedCalendarDateCell,\n} from \"@hjmds/design-contracts/components/calendar\";\nimport {\n datePickerRecipe,\n resolveDatePickerTriggerText,\n validateDatePickerDescriptor,\n type DatePickerDescriptor,\n type DatePickerOpenChangeReason,\n type DatePickerSize,\n} from \"@hjmds/design-contracts/components/date-picker\";\nimport {\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type ReactNode,\n} from \"react\";\n\nimport { IconButton } from \"./actions.js\";\nimport { Calendar, type CalendarOverflow, type CalendarHandle } from \"./calendar.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nconst popoverViewportInset = 16;\n\nexport type DatePickerMonthAction = Readonly<{ month: string; label: string }>;\n\nexport type DatePickerProps<Content = unknown> = Readonly<{\n descriptor: DatePickerDescriptor<Content>;\n monthLabel: string;\n composeAccessibleName: ComposeCalendarAccessibleName<Content>;\n previousMonth?: DatePickerMonthAction;\n nextMonth?: DatePickerMonthAction;\n clearLabel: string;\n closeLabel: string;\n size?: DatePickerSize;\n description?: ReactNode;\n error?: ReactNode;\n onNavigateBeyondGrid?: (detail: CalendarOverflow, focusDate: CalendarHandle[\"focusDate\"]) => void;\n renderCellContent?: (cell: ResolvedCalendarDateCell<Content>) => ReactNode;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Single-date field with an anchored, focus-bearing calendar dialog. */\nexport function DatePicker<Content>({\n descriptor,\n monthLabel,\n composeAccessibleName,\n previousMonth,\n nextMonth,\n clearLabel,\n closeLabel,\n size = \"medium\",\n description,\n error,\n renderCellContent,\n onNavigateBeyondGrid,\n className,\n layoutStyle,\n}: DatePickerProps<Content>) {\n validateDatePickerDescriptor(descriptor);\n const generatedId = useId().replaceAll(\":\", \"\");\n const dialogId = `hjm-date-picker-${generatedId}`;\n const triggerRef = useRef<HTMLButtonElement>(null);\n const dialogRef = useRef<HTMLDivElement>(null);\n const controlledOpen = descriptor.open !== undefined;\n const [internalOpen, setInternalOpen] = useState(descriptor.defaultOpen ?? false);\n const open = controlledOpen ? descriptor.open === true : internalOpen;\n const controlledSelection = descriptor.selectedDate !== undefined;\n const [internalSelection, setInternalSelection] = useState(\n descriptor.defaultSelectedDate ?? null,\n );\n const selectedDate = controlledSelection ? descriptor.selectedDate ?? null : internalSelection;\n\n const closeReasonRef = useRef<DatePickerOpenChangeReason>(\"programmatic\");\n const requestOpen = useCallback((next: boolean, reason: DatePickerOpenChangeReason) => {\n closeReasonRef.current = next ? \"programmatic\" : reason;\n if (!controlledOpen) setInternalOpen(next);\n descriptor.onOpenChange?.(next, reason);\n }, [controlledOpen, descriptor.onOpenChange]);\n useEffect(() => {\n if (open && (descriptor.disabled || descriptor.readOnly)) requestOpen(false, \"programmatic\");\n }, [descriptor.disabled, descriptor.readOnly, open, requestOpen]);\n const commit = (date: string | null, reason: \"activate\" | \"clear\") => {\n // A controlled open field can become read-only while its grid remains mounted.\n if (descriptor.disabled || descriptor.readOnly) return;\n if (!controlledSelection) setInternalSelection(date);\n descriptor.onSelectionChange?.(date, reason);\n requestOpen(false, reason === \"activate\" ? \"selection\" : \"clear\");\n // Clearing a closed field removes the focused clear button without an open transition.\n if (reason === \"clear\") triggerRef.current?.focus();\n };\n\n const wasOpenRef = useRef(open);\n useEffect(() => {\n const wasOpen = wasOpenRef.current;\n wasOpenRef.current = open;\n if (!open) {\n // Outside/Tab dismissal keeps the user's new target; confirmation/Escape returns here.\n if (wasOpen && closeReasonRef.current !== \"outside\" && closeReasonRef.current !== \"blur\") triggerRef.current?.focus();\n return;\n }\n const outside = (event: PointerEvent) => {\n const target = event.target as Node;\n if (!dialogRef.current?.contains(target) && !triggerRef.current?.contains(target)) {\n requestOpen(false, \"outside\");\n }\n };\n document.addEventListener(\"pointerdown\", outside);\n return () => {\n document.removeEventListener(\"pointerdown\", outside);\n };\n }, [open, requestOpen]);\n\n // Keep the popover inside the viewport (2026-09-30 audit WR-0930-3): shift inline, flip up\n // when short. Not portaled: Calendar autoFocus runs before a portal popup is measured.\n useLayoutEffect(() => {\n const popover = dialogRef.current;\n if (!open || !popover) return;\n const place = () => {\n const viewport = window.visualViewport;\n const left = (viewport?.offsetLeft ?? 0) + popoverViewportInset;\n const right = (viewport?.offsetLeft ?? 0) + (viewport?.width ?? document.documentElement.clientWidth) - popoverViewportInset;\n // Layout offset, not translate: mobile Chromium widened the page for a translated box.\n popover.style.insetInlineStart = \"\";\n popover.style.maxInlineSize = `${Math.max(0, right - left)}px`;\n const rect = popover.getBoundingClientRect();\n let shift = rect.right > right ? Math.floor(right - rect.right) : 0;\n if (rect.left + shift < left) shift = Math.ceil(left - rect.left);\n const logical = getComputedStyle(popover).direction === \"rtl\" ? -shift : shift;\n popover.style.insetInlineStart = shift === 0 ? \"\" : `${logical}px`;\n popover.style.insetBlockStart = \"\";\n popover.style.insetBlockEnd = \"\";\n const box = popover.getBoundingClientRect();\n const bottom = (viewport?.offsetTop ?? 0) + (viewport?.height ?? window.innerHeight) - popoverViewportInset;\n const anchor = popover.parentElement?.getBoundingClientRect();\n if (anchor && box.bottom > bottom && anchor.top - box.height - popoverViewportInset >= (viewport?.offsetTop ?? 0)) {\n popover.style.insetBlockStart = \"auto\";\n popover.style.insetBlockEnd = \"calc(100% + var(--hjm-space-xs))\";\n }\n };\n place();\n window.addEventListener(\"resize\", place);\n window.visualViewport?.addEventListener(\"resize\", place);\n return () => {\n window.removeEventListener(\"resize\", place);\n window.visualViewport?.removeEventListener(\"resize\", place);\n };\n }, [open]);\n\n // The outer field owns selection; the shared grid receives only its resolved controlled value.\n const { defaultSelectedDate: _defaultSelectedDate, ...calendarDescriptor } = descriptor;\n const calendarGrid = descriptor.disabled || descriptor.readOnly\n ? { ...descriptor.grid, cells: descriptor.grid.cells.map((cell) => cell.date ? { ...cell, disabled: true } : cell) }\n : descriptor.grid;\n const label = descriptor.label ?? descriptor.accessibilityLabel;\n const triggerText = resolveDatePickerTriggerText(descriptor);\n return (\n <div style={layoutStyle} className={classNames(\"hjm-date-picker\", className)} onBlur={(event) => {\n const field = event.currentTarget;\n queueMicrotask(() => {\n if (open && dialogRef.current && !field.contains(document.activeElement)) requestOpen(false, \"blur\");\n });\n }} data-disabled={descriptor.disabled || undefined} data-invalid={descriptor.invalid || error !== undefined || undefined} data-size={size}>\n {descriptor.label === undefined ? null : <span className=\"hjm-date-picker__label\">{descriptor.label}</span>}\n <div className=\"hjm-date-picker__anchor\">\n <button\n aria-controls={open ? dialogId : undefined}\n aria-expanded={open}\n aria-haspopup=\"dialog\"\n aria-label={descriptor.accessibilityLabel ?? `${label}, ${triggerText}`}\n className=\"hjm-date-picker__trigger\"\n disabled={descriptor.disabled}\n onClick={() => !descriptor.readOnly && requestOpen(!open, \"trigger\")}\n ref={triggerRef}\n type=\"button\"\n >\n <Icon name=\"calendar\" size={datePickerRecipe.sizes[size].glyph} />\n <span data-placeholder={descriptor.displayValue === null || undefined}>{triggerText}</span>\n </button>\n {selectedDate === null ? null : (\n <IconButton label={clearLabel} tone=\"ghost\" className=\"hjm-date-picker__clear\" disabled={descriptor.disabled || descriptor.readOnly} onClick={() => commit(null, \"clear\")}><Icon name=\"close\" /></IconButton>\n )}\n {open ? (\n <div aria-label={label} className=\"hjm-date-picker__popover\" id={dialogId} ref={dialogRef} role=\"dialog\" onKeyDown={(event) => { if (event.key === \"Escape\") { event.preventDefault(); requestOpen(false, \"escape\"); } }}>\n <IconButton label={closeLabel} tone=\"ghost\" className=\"hjm-date-picker__calendar-close\" onClick={() => requestOpen(false, \"trigger\")}><Icon name=\"close\" /></IconButton>\n <Calendar descriptor={{ ...calendarDescriptor, grid: calendarGrid, monthLabel, selectedDate, onSelectionChange: (date) => commit(date, \"activate\") }}\n composeAccessibleName={composeAccessibleName} size={size} autoFocus\n {...(previousMonth ? { previousMonth } : {})} {...(nextMonth ? { nextMonth } : {})}\n {...(renderCellContent ? { renderCellContent } : {})} {...(onNavigateBeyondGrid ? { onNavigateBeyondGrid } : {})} />\n </div>\n ) : null}\n </div>\n {description === undefined ? null : <span className=\"hjm-date-picker__description\">{description}</span>}\n {error === undefined ? null : <span className=\"hjm-date-picker__error\" role=\"alert\">{error}</span>}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../src/date-picker.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAGN,MAAM,6CAA6C,CAA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Cell,\n} from \"@hjmds/design-contracts/components/calendar\";\nimport {\n datePickerRecipe,\n resolveDatePickerTriggerText,\n validateDatePickerDescriptor,\n type DatePickerDescriptor,\n type DatePickerOpenChangeReason,\n type DatePickerSize,\n} from \"@hjmds/design-contracts/components/date-picker\";\nimport {\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type ReactNode,\n} from \"react\";\n\nimport { IconButton } from \"./actions.js\";\nimport { Calendar, type CalendarOverflow, type CalendarHandle } from \"./calendar.js\";\nimport { Icon } from \"./supplemental-display.js\";\nimport { classNames } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nconst popoverViewportInset = 16;\n\nexport type DatePickerMonthAction = Readonly<{ month: string; label: string }>;\n\nexport type DatePickerProps<Content = unknown> = Readonly<{\n descriptor: DatePickerDescriptor<Content>;\n monthLabel: string;\n composeAccessibleName: ComposeCalendarAccessibleName<Content>;\n previousMonth?: DatePickerMonthAction;\n nextMonth?: DatePickerMonthAction;\n clearLabel: string;\n closeLabel: string;\n size?: DatePickerSize;\n description?: ReactNode;\n error?: ReactNode;\n onNavigateBeyondGrid?: (detail: CalendarOverflow, focusDate: CalendarHandle[\"focusDate\"]) => void;\n renderCellContent?: (cell: ResolvedCalendarDateCell<Content>) => ReactNode;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Single-date field with an anchored, focus-bearing calendar dialog. */\nexport function DatePicker<Content>({\n descriptor,\n monthLabel,\n composeAccessibleName,\n previousMonth,\n nextMonth,\n clearLabel,\n closeLabel,\n size = \"medium\",\n description,\n error,\n renderCellContent,\n onNavigateBeyondGrid,\n className,\n layoutStyle,\n}: DatePickerProps<Content>) {\n validateDatePickerDescriptor(descriptor);\n const generatedId = useId().replaceAll(\":\", \"\");\n const dialogId = `hjm-date-picker-${generatedId}`;\n const triggerRef = useRef<HTMLButtonElement>(null);\n const dialogRef = useRef<HTMLDivElement>(null);\n const controlledOpen = descriptor.open !== undefined;\n const [internalOpen, setInternalOpen] = useState(descriptor.defaultOpen ?? false);\n const open = controlledOpen ? descriptor.open === true : internalOpen;\n const controlledSelection = descriptor.selectedDate !== undefined;\n const [internalSelection, setInternalSelection] = useState(\n descriptor.defaultSelectedDate ?? null,\n );\n const selectedDate = controlledSelection ? descriptor.selectedDate ?? null : internalSelection;\n\n const closeReasonRef = useRef<DatePickerOpenChangeReason>(\"programmatic\");\n const requestOpen = useCallback((next: boolean, reason: DatePickerOpenChangeReason) => {\n closeReasonRef.current = next ? \"programmatic\" : reason;\n if (!controlledOpen) setInternalOpen(next);\n descriptor.onOpenChange?.(next, reason);\n }, [controlledOpen, descriptor.onOpenChange]);\n useEffect(() => {\n if (open && (descriptor.disabled || descriptor.readOnly)) requestOpen(false, \"programmatic\");\n }, [descriptor.disabled, descriptor.readOnly, open, requestOpen]);\n const commit = (date: string | null, reason: \"activate\" | \"clear\") => {\n // A controlled open field can become read-only while its grid remains mounted.\n if (descriptor.disabled || descriptor.readOnly) return;\n if (!controlledSelection) setInternalSelection(date);\n descriptor.onSelectionChange?.(date, reason);\n requestOpen(false, reason === \"activate\" ? \"selection\" : \"clear\");\n // Clearing a closed field removes the focused clear button without an open transition.\n if (reason === \"clear\") triggerRef.current?.focus();\n };\n\n const wasOpenRef = useRef(open);\n useEffect(() => {\n const wasOpen = wasOpenRef.current;\n wasOpenRef.current = open;\n if (!open) {\n // Outside/Tab dismissal keeps the user's new target; confirmation/Escape returns here.\n if (wasOpen && closeReasonRef.current !== \"outside\" && closeReasonRef.current !== \"blur\") triggerRef.current?.focus();\n return;\n }\n const outside = (event: PointerEvent) => {\n const target = event.target as Node;\n if (!dialogRef.current?.contains(target) && !triggerRef.current?.contains(target)) {\n requestOpen(false, \"outside\");\n }\n };\n document.addEventListener(\"pointerdown\", outside);\n return () => {\n document.removeEventListener(\"pointerdown\", outside);\n };\n }, [open, requestOpen]);\n\n // Keep the popover inside the viewport (2026-09-30 audit WR-0930-3): shift inline, flip up\n // when short. Not portaled: Calendar autoFocus runs before a portal popup is measured.\n useLayoutEffect(() => {\n const popover = dialogRef.current;\n if (!open || !popover) return;\n const place = () => {\n const viewport = window.visualViewport;\n const left = (viewport?.offsetLeft ?? 0) + popoverViewportInset;\n const right = (viewport?.offsetLeft ?? 0) + (viewport?.width ?? document.documentElement.clientWidth) - popoverViewportInset;\n // Layout offset, not translate: mobile Chromium widened the page for a translated box.\n popover.style.insetInlineStart = \"\";\n popover.style.maxInlineSize = `${Math.max(0, right - left)}px`;\n const rect = popover.getBoundingClientRect();\n let shift = rect.right > right ? Math.floor(right - rect.right) : 0;\n if (rect.left + shift < left) shift = Math.ceil(left - rect.left);\n const logical = getComputedStyle(popover).direction === \"rtl\" ? -shift : shift;\n popover.style.insetInlineStart = shift === 0 ? \"\" : `${logical}px`;\n popover.style.insetBlockStart = \"\";\n popover.style.insetBlockEnd = \"\";\n const box = popover.getBoundingClientRect();\n const bottom = (viewport?.offsetTop ?? 0) + (viewport?.height ?? window.innerHeight) - popoverViewportInset;\n const anchor = popover.parentElement?.getBoundingClientRect();\n if (anchor && box.bottom > bottom && anchor.top - box.height - popoverViewportInset >= (viewport?.offsetTop ?? 0)) {\n popover.style.insetBlockStart = \"auto\";\n popover.style.insetBlockEnd = \"calc(100% + var(--hjm-space-xs))\";\n }\n };\n place();\n window.addEventListener(\"resize\", place);\n window.visualViewport?.addEventListener(\"resize\", place);\n return () => {\n window.removeEventListener(\"resize\", place);\n window.visualViewport?.removeEventListener(\"resize\", place);\n };\n }, [open]);\n\n // The outer field owns selection; the shared grid receives only its resolved controlled value.\n const { defaultSelectedDate: _defaultSelectedDate, ...calendarDescriptor } = descriptor;\n const calendarGrid = descriptor.disabled || descriptor.readOnly\n ? { ...descriptor.grid, cells: descriptor.grid.cells.map((cell) => cell.date ? { ...cell, disabled: true } : cell) }\n : descriptor.grid;\n const label = descriptor.label ?? descriptor.accessibilityLabel;\n const triggerText = resolveDatePickerTriggerText(descriptor);\n return (\n <div style={layoutStyle} className={classNames(\"hjm-date-picker\", className)} onBlur={(event) => {\n const field = event.currentTarget;\n queueMicrotask(() => {\n if (open && dialogRef.current && !field.contains(document.activeElement)) requestOpen(false, \"blur\");\n });\n }} data-disabled={descriptor.disabled || undefined} data-invalid={descriptor.invalid || error !== undefined || undefined} data-size={size}>\n {descriptor.label === undefined ? null : <span className=\"hjm-date-picker__label\">{descriptor.label}</span>}\n <div className=\"hjm-date-picker__anchor\">\n <button\n aria-controls={open ? dialogId : undefined}\n aria-expanded={open}\n aria-haspopup=\"dialog\"\n aria-label={descriptor.accessibilityLabel ?? `${label}, ${triggerText}`}\n className=\"hjm-date-picker__trigger\"\n disabled={descriptor.disabled}\n onClick={() => !descriptor.readOnly && requestOpen(!open, \"trigger\")}\n ref={triggerRef}\n type=\"button\"\n >\n <Icon name=\"calendar\" size={datePickerRecipe.sizes[size].glyph} />\n <span data-placeholder={descriptor.displayValue === null || undefined}>{triggerText}</span>\n </button>\n {selectedDate === null ? null : (\n <IconButton label={clearLabel} tone=\"ghost\" className=\"hjm-date-picker__clear\" disabled={descriptor.disabled || descriptor.readOnly} onClick={() => commit(null, \"clear\")}><Icon name=\"close\" /></IconButton>\n )}\n {open ? (\n <div aria-label={label} className=\"hjm-date-picker__popover\" id={dialogId} ref={dialogRef} role=\"dialog\" onKeyDown={(event) => { if (event.key === \"Escape\") { event.preventDefault(); requestOpen(false, \"escape\"); } }}>\n <IconButton label={closeLabel} tone=\"ghost\" className=\"hjm-date-picker__calendar-close\" onClick={() => requestOpen(false, \"trigger\")}><Icon name=\"close\" /></IconButton>\n <Calendar descriptor={{ ...calendarDescriptor, grid: calendarGrid, monthLabel, selectedDate, onSelectionChange: (date) => commit(date, \"activate\") }}\n composeAccessibleName={composeAccessibleName} size={size} autoFocus\n {...(previousMonth ? { previousMonth } : {})} {...(nextMonth ? { nextMonth } : {})}\n {...(renderCellContent ? { renderCellContent } : {})} {...(onNavigateBeyondGrid ? { onNavigateBeyondGrid } : {})} />\n </div>\n ) : null}\n </div>\n {description === undefined ? null : <span className=\"hjm-date-picker__description\">{description}</span>}\n {error === undefined ? null : <span className=\"hjm-date-picker__error\" role=\"alert\">{error}</span>}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EACV,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,oBAAoB,CAAC,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC;IAC7D,yEAAyE;IACzE,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,CAAC,CAAC;IAC5G,qBAAqB,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC;IAC9D,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAChD,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,2EAA2E;IAC3E,WAAW,EAAE,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KA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EAAE,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,wBAAgB,eAAe,CAAC,OAAO,GAAG,OAAO,EAAE,EACjD,UAAU,EACV,qBAAqB,EACrB,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,WAAW,GACZ,EAAE,oBAAoB,CAAC,OAAO,CAAC,+BA8C/B"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { emptyDateRange, isCompleteDateRange, resolveDateRangeCellState, resolveDateRangeSelection, validateDateRange, } from "@hjmds/design-contracts/components/date-range";
3
4
  import { useState } from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"date-range.js","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,GAElB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAA4B,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAoBjE,MAAM,UAAU,eAAe,CAAoB,EACjD,UAAU,EACV,qBAAqB,EACrB,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB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G,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBACnE,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;gBACzC,OAAO,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;YACpE,CAAC,KACG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,KACtD,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAClD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAC3B,eACE,SAAS,EAAC,sBAAsB,gBACpB,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,EAChE,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAExC,iBAAiB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAClC,CACR,GACD,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import {\n emptyDateRange,\n isCompleteDateRange,\n resolveDateRangeCellState,\n resolveDateRangeSelection,\n validateDateRange,\n type DateRangeValue,\n} from \"@hjmds/design-contracts/components/date-range\";\nimport type {\n CalendarDescriptor,\n ComposeCalendarAccessibleName,\n} from \"@hjmds/design-contracts/components/calendar\";\nimport { useState, type ReactNode } from \"react\";\nimport { Calendar, type CalendarMonthAction } from \"./calendar.js\";\nimport { classNames, useControllableState } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type DateRangePickerProps<Content = unknown> = Readonly<{\n /** The same grid Calendar renders; the product still owns month data. */\n descriptor: Omit<CalendarDescriptor<Content>, \"selectedDate\" | \"defaultSelectedDate\" | \"onSelectionChange\">;\n composeAccessibleName: ComposeCalendarAccessibleName<Content>;\n value?: DateRangeValue;\n defaultValue?: DateRangeValue;\n onValueChange?: (value: DateRangeValue) => void;\n previousMonth?: CalendarMonthAction;\n nextMonth?: CalendarMonthAction;\n /** Localized suffixes appended to a day's name when it is a range edge. */\n rangeLabels: Readonly<{ start: string; end: string; between: string }>;\n renderCellContent?: (date: string) => ReactNode;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function DateRangePicker<Content = unknown>({\n descriptor,\n composeAccessibleName,\n value: controlledValue,\n defaultValue,\n onValueChange,\n previousMonth,\n nextMonth,\n rangeLabels,\n renderCellContent,\n className,\n layoutStyle,\n}: DateRangePickerProps<Content>) {\n const [value, setValue] = useControllableState<DateRangeValue>({\n ...(controlledValue === undefined ? {} : { value: controlledValue }),\n defaultValue: defaultValue ?? emptyDateRange,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n validateDateRange(value);\n // The hovered date previews the not-yet-committed end through the same cell\n // state function the committed range uses.\n const [hovered, setHovered] = useState<string | null>(null);\n\n return (\n <div\n style={layoutStyle}\n className={classNames(\"hjm-date-range\", className)}\n data-selecting={value.start !== null && value.end === null ? \"\" : undefined}\n data-complete={isCompleteDateRange(value) || undefined}\n onMouseLeave={() => setHovered(null)}\n >\n <Calendar<Content>\n descriptor={{\n ...descriptor,\n // Calendar keeps single selection: the range's own edges are painted\n // through cell content and data attributes, not by lying to it.\n selectedDate: value.end ?? value.start,\n onSelectionChange: (date) => { if (date !== null) setValue(resolveDateRangeSelection(value, date)); },\n } as CalendarDescriptor<Content>}\n composeAccessibleName={(info) => {\n const state = resolveDateRangeCellState(value, info.date, hovered);\n const base = composeAccessibleName(info);\n return state === \"none\" ? base : `${base}, ${rangeLabels[state]}`;\n }}\n {...(previousMonth === undefined ? {} : { previousMonth })}\n {...(nextMonth === undefined ? {} : { nextMonth })}\n renderCellContent={(cell) => (\n <span\n className=\"hjm-date-range__cell\"\n data-range={resolveDateRangeCellState(value, cell.date, hovered)}\n onMouseEnter={() => setHovered(cell.date)}\n >\n {renderCellContent?.(cell.date) ?? null}\n </span>\n )}\n />\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"date-range.js","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,GAElB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAA4B,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAoBjE,MAAM,UAAU,eAAe,CAAoB,EACjD,UAAU,EACV,qBAAqB,EACrB,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,WAAW,GACmB;IAC9B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,oBAAoB,CAAiB;QAC7D,GAAG,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;QACpE,YAAY,EAAE,YAAY,IAAI,cAAc;QAC5C,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;KACpE,CAAC,CAAC;IACH,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACzB,4EAA4E;IAC5E,2CAA2C;IAC3C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAE5D,OAA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AAsB,gBACpB,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,EAChE,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAExC,iBAAiB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAClC,CACR,GACD,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport {\n emptyDateRange,\n isCompleteDateRange,\n resolveDateRangeCellState,\n resolveDateRangeSelection,\n validateDateRange,\n type DateRangeValue,\n} from \"@hjmds/design-contracts/components/date-range\";\nimport type {\n CalendarDescriptor,\n ComposeCalendarAccessibleName,\n} from \"@hjmds/design-contracts/components/calendar\";\nimport { useState, type ReactNode } from \"react\";\nimport { Calendar, type CalendarMonthAction } from \"./calendar.js\";\nimport { classNames, useControllableState } from \"./internal.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\n\nexport type DateRangePickerProps<Content = unknown> = Readonly<{\n /** The same grid Calendar renders; the product still owns month data. */\n descriptor: Omit<CalendarDescriptor<Content>, \"selectedDate\" | \"defaultSelectedDate\" | \"onSelectionChange\">;\n composeAccessibleName: ComposeCalendarAccessibleName<Content>;\n value?: DateRangeValue;\n defaultValue?: DateRangeValue;\n onValueChange?: (value: DateRangeValue) => void;\n previousMonth?: CalendarMonthAction;\n nextMonth?: CalendarMonthAction;\n /** Localized suffixes appended to a day's name when it is a range edge. */\n rangeLabels: Readonly<{ start: string; end: string; between: string }>;\n renderCellContent?: (date: string) => ReactNode;\n className?: string;\n /** Canonical layout-only placement on the root element. Controlled visual keys are excluded. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\nexport function DateRangePicker<Content = unknown>({\n descriptor,\n composeAccessibleName,\n value: controlledValue,\n defaultValue,\n onValueChange,\n previousMonth,\n nextMonth,\n rangeLabels,\n renderCellContent,\n className,\n layoutStyle,\n}: DateRangePickerProps<Content>) {\n const [value, setValue] = useControllableState<DateRangeValue>({\n ...(controlledValue === undefined ? {} : { value: controlledValue }),\n defaultValue: defaultValue ?? emptyDateRange,\n ...(onValueChange === undefined ? {} : { onChange: onValueChange }),\n });\n validateDateRange(value);\n // The hovered date previews the not-yet-committed end through the same cell\n // state function the committed range uses.\n const [hovered, setHovered] = useState<string | null>(null);\n\n return (\n <div\n style={layoutStyle}\n className={classNames(\"hjm-date-range\", className)}\n data-selecting={value.start !== null && value.end === null ? \"\" : undefined}\n data-complete={isCompleteDateRange(value) || undefined}\n onMouseLeave={() => setHovered(null)}\n >\n <Calendar<Content>\n descriptor={{\n ...descriptor,\n // Calendar keeps single selection: the range's own edges are painted\n // through cell content and data attributes, not by lying to it.\n selectedDate: value.end ?? value.start,\n onSelectionChange: (date) => { if (date !== null) setValue(resolveDateRangeSelection(value, date)); },\n } as CalendarDescriptor<Content>}\n composeAccessibleName={(info) => {\n const state = resolveDateRangeCellState(value, info.date, hovered);\n const base = composeAccessibleName(info);\n return state === \"none\" ? base : `${base}, ${rangeLabels[state]}`;\n }}\n {...(previousMonth === undefined ? {} : { previousMonth })}\n {...(nextMonth === undefined ? {} : { nextMonth })}\n renderCellContent={(cell) => (\n <span\n className=\"hjm-date-range__cell\"\n data-range={resolveDateRangeCellState(value, cell.date, hovered)}\n onMouseEnter={() => setHovered(cell.date)}\n >\n {renderCellContent?.(cell.date) ?? null}\n </span>\n )}\n />\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"design-profile.d.ts","sourceRoot":"","sources":["../src/design-profile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAOpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,QAAQ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CACnE,CAAC,CAAC;AAEH;;sFAEsF;AACtF,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,GAAG,MAAM,EAAE,EAAE,mBAAmB,+BA8BhL"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { useState } from "react";
3
4
  import { ScreenLayout } from "./screens.js";
@@ -1 +1 @@
1
- {"version":3,"file":"design-profile.js","sourceRoot":"","sources":["../src/design-profile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAA0B,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,kCAAkC,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAC1J,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAWhD;;sFAEsF;AACtF,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,GAAG,MAAM,EAAuB;IAC/K,MAAM,EAAE,aAAa,EAAE,GAAG,WAAW,EAAE,CAAC;IACxC,MAAM,UAAU,GAAG,kBAAkB,IAAI,aAAa,EAAE,YAAY,CAAC,UAAU,IAAI,MAAM,CAAC;IAC1F,MAAM,mBAAmB,GAAG,2BAA2B,IAAI,aAAa,EAAE,YAAY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,CAAC,CAAC,YAAY,EAAE,WAAW,kBAAE,OAAO,GAAe,CAAC,CAAC,CAAC,IAAI,EAChN,KAAC,IAAI,OAAK,8BAA8B,CAAC,UAAU,CAAC,YAIjD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,MAAC,OAAO,IAAe,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAC,IAAI,aAC9I,UAAU,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,UAAU,QAAC,WAAW,EAAE,EAAE,YAAY,EAAE,UAAU,CAAC,OAAO,EAAE,GAAI,CAAC,CAAC,CAAC,IAAI,EACjH,KAAC,aAAa,IAAC,MAAM,EAAC,MAAM,EAAC,UAAU,EAAE,aAAa,EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,EAAC,yBAAyB,YAAE,IAAI,CAAC,QAAQ,GAAiB,KAFvJ,IAAI,CAAC,EAAE,CAGvC,CAAC,GACN,IACD,GACK,GACD,CAAC;AACnB,CAAC","sourcesContent":["import { useState, type ReactNode } from \"react\";\nimport { ScreenLayout, type ScreenLayoutProps } from \"./screens.js\";\nimport { Collapsible } from \"./collapsible.js\";\nimport { EffectSurface } from \"./effect-surface.js\";\nimport { Grid, Stack, Surface } from \"./layout.js\";\nimport { useHjmTheme } from \"./provider.js\";\nimport { resolveDesignProfileCollection, resolveDesignProfileCollectionItem, overviewContentLayout } from \"@hjmds/design-contracts/design-profile-layout\";\nimport { Divider } from \"./advanced-display.js\";\nimport type { HjmDesignProfile } from \"@hjmds/design-contracts/design-profile\";\n\nexport type OverviewScreenProps = Omit<ScreenLayoutProps, \"children\"> & Readonly<{\n items: readonly Readonly<{ id: string; children: ReactNode }>[];\n toolbar?: ReactNode;\n toolbarLabel: string;\n collection?: HjmDesignProfile[\"compositions\"][\"collection\"];\n toolbarPresentation?: HjmDesignProfile[\"compositions\"][\"toolbar\"];\n}>;\n\n/** Optional collection screen; ScreenLayout still owns loading/error/scrolling.\n * Unlike settings/inbox it owns a profile-selected collection and persistent tools.\n * It never owns product mutations or chooses a different component for each theme. */\nexport function OverviewScreen({ items, toolbar, toolbarLabel, collection: suppliedCollection, toolbarPresentation: suppliedToolbarPresentation, ...screen }: OverviewScreenProps) {\n const { designProfile } = useHjmTheme();\n const collection = suppliedCollection ?? designProfile?.compositions.collection ?? \"rows\";\n const toolbarPresentation = suppliedToolbarPresentation ?? designProfile?.compositions.toolbar ?? \"inline\";\n const [toolsOpen, setToolsOpen] = useState(true);\n if (!toolbarLabel.trim()) throw new TypeError(\"Overview tools need a localized label\");\n const ids = new Set(items.map(item => item.id));\n if (ids.size !== items.length || items.some(item => !item.id.trim())) throw new TypeError(\"Overview items need unique stable ids\");\n // Retain the same effect/grid/surface subtree when the profile changes: optional\n // decoration can disappear without remounting fields, focus or local state.\n const itemLayout = resolveDesignProfileCollectionItem(collection);\n const canvas = designProfile?.material.canvas ?? { layers: [\"mesh\"] as const, intensity: 0, active: false };\n return <EffectSurface descriptor={canvas} radius=\"none\" layoutStyle={{ width: \"100%\" }}>\n <ScreenLayout {...screen}>\n {/* Tools and collection share one bounded column, so card edges line up with the field above them. The screen\n body is a block box on Web (scroll=\"screen\"), where alignSelf has no effect, so auto inline margins center it. */}\n <Stack gap=\"xl\" layoutStyle={{ ...overviewContentLayout, marginInline: \"auto\" }}>\n {toolbar ? <Collapsible trigger={toolbarLabel} open={toolsOpen} onOpenChange={setToolsOpen} presentation={toolbarPresentation === \"inline\" ? \"inline\" : \"disclosure\"} keepMounted>{toolbar}</Collapsible> : null}\n <Grid {...resolveDesignProfileCollection(collection)}>\n {/* The card Surface owns the rounded frame; the material layer sits in its padded content box, so a rounded\n effect clipped the first glyph of edge-aligned text (clay/glass, 2026-10-17 after EffectSurface radius default lg).\n The rule slot stays in place (null when unused) so switching collections never remounts item content. */}\n {items.map((item, index) => <Surface key={item.id} padding={itemLayout.padding} tone={itemLayout.tone} bordered={itemLayout.bordered} radius=\"lg\">\n {itemLayout.ruled && index > 0 ? <Divider decorative layoutStyle={{ marginBottom: itemLayout.ruleGap }} /> : null}\n <EffectSurface radius=\"none\" descriptor={designProfile?.material.card ?? { layers: [\"mesh\"], intensity: 0, active: false }} className=\"hjm-profile-card-effect\">{item.children}</EffectSurface>\n </Surface>)}\n </Grid>\n </Stack>\n </ScreenLayout>\n </EffectSurface>;\n}\n"]}
1
+ {"version":3,"file":"design-profile.js","sourceRoot":"","sources":["../src/design-profile.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAA0B,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,kCAAkC,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAC1J,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAWhD;;sFAEsF;AACtF,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,GAAG,MAAM,EAAuB;IAC/K,MAAM,EAAE,aAAa,EAAE,GAAG,WAAW,EAAE,CAAC;IACxC,MAAM,UAAU,GAAG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AAY,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,mBAAmB,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,EAAE,WAAW,kBAAE,OAAO,GAAe,CAAC,CAAC,CAAC,IAAI,EAChN,KAAC,IAAI,OAAK,8BAA8B,CAAC,UAAU,CAAC,YAIjD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,MAAC,OAAO,IAAe,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAC,IAAI,aAC9I,UAAU,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,UAAU,QAAC,WAAW,EAAE,EAAE,YAAY,EAAE,UAAU,CAAC,OAAO,EAAE,GAAI,CAAC,CAAC,CAAC,IAAI,EACjH,KAAC,aAAa,IAAC,MAAM,EAAC,MAAM,EAAC,UAAU,EAAE,aAAa,EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,EAAC,yBAAyB,YAAE,IAAI,CAAC,QAAQ,GAAiB,KAFvJ,IAAI,CAAC,EAAE,CAGvC,CAAC,GACN,IACD,GACK,GACD,CAAC;AACnB,CAAC","sourcesContent":["\"use client\";\n\nimport { useState, type ReactNode } from \"react\";\nimport { ScreenLayout, type ScreenLayoutProps } from \"./screens.js\";\nimport { Collapsible } from \"./collapsible.js\";\nimport { EffectSurface } from \"./effect-surface.js\";\nimport { Grid, Stack, Surface } from \"./layout.js\";\nimport { useHjmTheme } from \"./provider.js\";\nimport { resolveDesignProfileCollection, resolveDesignProfileCollectionItem, overviewContentLayout } from \"@hjmds/design-contracts/design-profile-layout\";\nimport { Divider } from \"./advanced-display.js\";\nimport type { HjmDesignProfile } from \"@hjmds/design-contracts/design-profile\";\n\nexport type OverviewScreenProps = Omit<ScreenLayoutProps, \"children\"> & Readonly<{\n items: readonly Readonly<{ id: string; children: ReactNode }>[];\n toolbar?: ReactNode;\n toolbarLabel: string;\n collection?: HjmDesignProfile[\"compositions\"][\"collection\"];\n toolbarPresentation?: HjmDesignProfile[\"compositions\"][\"toolbar\"];\n}>;\n\n/** Optional collection screen; ScreenLayout still owns loading/error/scrolling.\n * Unlike settings/inbox it owns a profile-selected collection and persistent tools.\n * It never owns product mutations or chooses a different component for each theme. */\nexport function OverviewScreen({ items, toolbar, toolbarLabel, collection: suppliedCollection, toolbarPresentation: suppliedToolbarPresentation, ...screen }: OverviewScreenProps) {\n const { designProfile } = useHjmTheme();\n const collection = suppliedCollection ?? designProfile?.compositions.collection ?? \"rows\";\n const toolbarPresentation = suppliedToolbarPresentation ?? designProfile?.compositions.toolbar ?? \"inline\";\n const [toolsOpen, setToolsOpen] = useState(true);\n if (!toolbarLabel.trim()) throw new TypeError(\"Overview tools need a localized label\");\n const ids = new Set(items.map(item => item.id));\n if (ids.size !== items.length || items.some(item => !item.id.trim())) throw new TypeError(\"Overview items need unique stable ids\");\n // Retain the same effect/grid/surface subtree when the profile changes: optional\n // decoration can disappear without remounting fields, focus or local state.\n const itemLayout = resolveDesignProfileCollectionItem(collection);\n const canvas = designProfile?.material.canvas ?? { layers: [\"mesh\"] as const, intensity: 0, active: false };\n return <EffectSurface descriptor={canvas} radius=\"none\" layoutStyle={{ width: \"100%\" }}>\n <ScreenLayout {...screen}>\n {/* Tools and collection share one bounded column, so card edges line up with the field above them. The screen\n body is a block box on Web (scroll=\"screen\"), where alignSelf has no effect, so auto inline margins center it. */}\n <Stack gap=\"xl\" layoutStyle={{ ...overviewContentLayout, marginInline: \"auto\" }}>\n {toolbar ? <Collapsible trigger={toolbarLabel} open={toolsOpen} onOpenChange={setToolsOpen} presentation={toolbarPresentation === \"inline\" ? \"inline\" : \"disclosure\"} keepMounted>{toolbar}</Collapsible> : null}\n <Grid {...resolveDesignProfileCollection(collection)}>\n {/* The card Surface owns the rounded frame; the material layer sits in its padded content box, so a rounded\n effect clipped the first glyph of edge-aligned text (clay/glass, 2026-10-17 after EffectSurface radius default lg).\n The rule slot stays in place (null when unused) so switching collections never remounts item content. */}\n {items.map((item, index) => <Surface key={item.id} padding={itemLayout.padding} tone={itemLayout.tone} bordered={itemLayout.bordered} radius=\"lg\">\n {itemLayout.ruled && index > 0 ? <Divider decorative layoutStyle={{ marginBottom: itemLayout.ruleGap }} /> : null}\n <EffectSurface radius=\"none\" descriptor={designProfile?.material.card ?? { layers: [\"mesh\"], intensity: 0, active: false }} className=\"hjm-profile-card-effect\">{item.children}</EffectSurface>\n </Surface>)}\n </Grid>\n </Stack>\n </ScreenLayout>\n </EffectSurface>;\n}\n"]}
package/dist/display.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { listRowRecipe, type BadgeAdornmentContext, type BadgeSize, type BadgeTone, type BadgeVariant as ContractBadgeVariant, type ListRowDensity, type ListRowLeadingShape } from "@hjmds/design-contracts/recipes";
1
+ import { listRowRecipe, type BadgeAdornmentContext, type BadgeSize, type BadgeTone, type BadgeVariant as ContractBadgeVariant, type BadgeCategoryColor, type ListRowDensity, type ListRowLeadingShape, type ListRowTrailingAccessory } from "@hjmds/design-contracts/recipes";
2
2
  import { type TagTone } from "@hjmds/design-contracts/components/tag";
3
3
  import { type CardHeadingLevel } from "@hjmds/design-contracts/components/card";
4
4
  import { type SurfacePadding, type SurfaceRadius, type SurfaceTone } from "@hjmds/design-contracts/recipes/base";
@@ -9,6 +9,11 @@ export type { TagTone } from "@hjmds/design-contracts/components/tag";
9
9
  export type BadgeVariant = ContractBadgeVariant;
10
10
  export type BadgeProps = HTMLAttributes<HTMLSpanElement> & Readonly<{
11
11
  tone?: BadgeTone;
12
+ /**
13
+ * Product classification color per theme (series, grade…) in place of `tone`. HJM keeps the frame and picks the
14
+ * label ink; a color whose label cannot reach AA 4.5 throws instead of rendering unreadable.
15
+ */
16
+ categoryColor?: BadgeCategoryColor;
12
17
  size?: BadgeSize;
13
18
  variant?: BadgeVariant;
14
19
  leading?: ReactNode | ((context: BadgeAdornmentContext) => ReactNode);
@@ -18,6 +23,11 @@ export type BadgeProps = HTMLAttributes<HTMLSpanElement> & Readonly<{
18
23
  }>;
19
24
  export declare const Badge: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & Readonly<{
20
25
  tone?: BadgeTone;
26
+ /**
27
+ * Product classification color per theme (series, grade…) in place of `tone`. HJM keeps the frame and picks the
28
+ * label ink; a color whose label cannot reach AA 4.5 throws instead of rendering unreadable.
29
+ */
30
+ categoryColor?: BadgeCategoryColor;
21
31
  size?: BadgeSize;
22
32
  variant?: BadgeVariant;
23
33
  leading?: ReactNode | ((context: BadgeAdornmentContext) => ReactNode);
@@ -143,6 +153,11 @@ export type ListRowProps = Omit<HTMLAttributes<HTMLElement>, "title" | "onClick"
143
153
  description?: ReactNode;
144
154
  leading?: ReactNode;
145
155
  trailing?: ReactNode;
156
+ /**
157
+ * `disclosure`: the row opens another screen. HJM draws the decorative chevron after `trailing`, inside the row
158
+ * command (before any `trailingAction`), mirrored in RTL; size and color come from `listRowRecipe.accessories`.
159
+ */
160
+ trailingAccessory?: ListRowTrailingAccessory;
146
161
  /** Independent command outside the row's navigation target. */
147
162
  trailingAction?: ReactNode;
148
163
  /** Supply a framework Link without replacing the shared row layout. */
@@ -172,6 +187,11 @@ export declare const ListRow: import("react").ForwardRefExoticComponent<Omit<HTM
172
187
  description?: ReactNode;
173
188
  leading?: ReactNode;
174
189
  trailing?: ReactNode;
190
+ /**
191
+ * `disclosure`: the row opens another screen. HJM draws the decorative chevron after `trailing`, inside the row
192
+ * command (before any `trailingAction`), mirrored in RTL; size and color come from `listRowRecipe.accessories`.
193
+ */
194
+ trailingAccessory?: ListRowTrailingAccessory;
175
195
  /** Independent command outside the row's navigation target. */
176
196
  trailingAction?: ReactNode;
177
197
  /** Supply a framework Link without replacing the shared row layout. */
@@ -1 +1 @@
1
- {"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../src/display.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,IAAI,oBAAoB,EACzC,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,OAAO,EACb,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,YAAY,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,eAAe,CAAC,GACtD,QAAQ,CAAC;IACP,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,OAAO,EAAE,qBAAqB,KAAK,SAAS,CAAC,CAAC;IACtE,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,OAAO,EAAE,qBAAqB,KAAK,SAAS,CAAC,CAAC;IACrE,4EAA4E;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CAAC;IACxC,2EAA2E;IAC3E,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACvC,4EAA4E;IAC9E,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACzC,CAAC,CAAC;AAEH,eAAO,MAAM,OAAO;WAlCT,SAAS;kBACF,SAAS;cACb,SAAS;eACR,SAAS;IACpB;;;OAGG;wBACiB,wBAAwB;IAC5C,+DAA+D;qBAC9C,SAAS;IAC1B,uEAAuE;iBAC1D,CAAC,KAAK,EAAE,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,KAAK,SAAS;cACzD,cAAc;IACxB,mFAAmF;WAC5E,MAAM,OAAO,aAAa,CAAC,KAAK;IACvC,2EAA2E;mBAC5D,mBAAmB;eACvB,OAAO;eACP,OAAO;IAClB;;;;OAIG;cACO,OAAO;IACjB,uDAAuD;mBACxC,MAAM;WACd,MAAM;cACH,iBAAiB,CAAC,WAAW,CAAC;IACtC,4EAA4E;kBAChE,uBAAuB;gDAgIvC,CAAC"}
package/dist/display.js CHANGED
@@ -1,15 +1,37 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { badgeRecipe, listRowRecipe, } from "@hjmds/design-contracts/recipes";
3
+ import { badgeRecipe, listRowRecipe, resolveBadgeCategoryColor, validateListRowTrailingAccessory, } from "@hjmds/design-contracts/recipes";
4
+ import { THEMES } from "@hjmds/design-contracts/colors";
5
+ import { glyph } from "@hjmds/design-contracts/foundations";
3
6
  import { resolveTagDescriptor, } from "@hjmds/design-contracts/components/tag";
4
7
  import { cardRecipe, } from "@hjmds/design-contracts/components/card";
5
8
  import { surfaceGeometry, } from "@hjmds/design-contracts/recipes/base";
6
9
  import { createElement, forwardRef, } from "react";
7
10
  import { classNames } from "./internal.js";
8
- import { useHjmDensityDefault } from "./provider.js";
11
+ import { useHjmDensityDefault, useOptionalHjmTheme } from "./provider.js";
9
12
  import { Surface, Text } from "./layout.js";
10
- export const Badge = forwardRef(function Badge({ tone = badgeRecipe.defaults.tone, size = badgeRecipe.defaults.size, variant = badgeRecipe.defaults.variant, leading, trailing, className, children, layoutStyle, style, ...props }, ref) {
11
- const iconContext = { color: "currentColor", size: badgeRecipe.sizes[size].iconSize };
12
- return (_jsxs("span", { ...props, style: { ...style, ...layoutStyle }, ref: ref, className: classNames("hjm-badge", className), "data-tone": tone, "data-size": size, "data-variant": variant, children: [leading === undefined ? null : (_jsx("span", { "aria-hidden": "true", className: "hjm-badge__icon", children: typeof leading === "function" ? leading(iconContext) : leading })), _jsx("span", { className: "hjm-badge__label", children: children }), trailing === undefined ? null : (_jsx("span", { "aria-hidden": "true", className: "hjm-badge__icon", children: typeof trailing === "function" ? trailing(iconContext) : trailing }))] }));
13
+ import { Icon } from "./supplemental-display.js";
14
+ export const Badge = forwardRef(function Badge({ tone: toneProp, categoryColor, size = badgeRecipe.defaults.size, variant = badgeRecipe.defaults.variant, leading, trailing, className, children, layoutStyle, style, ...props }, ref) {
15
+ if (categoryColor !== undefined && toneProp !== undefined)
16
+ throw new TypeError("Badge takes either tone or categoryColor, not both");
17
+ const tone = toneProp ?? badgeRecipe.defaults.tone;
18
+ // Outside a provider the stylesheet paints the light palette, so the category resolves against it too.
19
+ const theme = useOptionalHjmTheme();
20
+ const category = categoryColor === undefined ? null : resolveBadgeCategoryColor(categoryColor, {
21
+ theme: theme?.environment.theme ?? "light",
22
+ variant,
23
+ palette: theme?.palette.theme ?? THEMES.light,
24
+ });
25
+ const iconContext = { color: "currentColor", size: badgeRecipe.sizes[size].iconSize, strokeWidth: badgeRecipe.iconStrokeWidth };
26
+ return (_jsxs("span", { ...props, style: {
27
+ ...style,
28
+ ...(category ? {
29
+ "--hjm-badge-category-content": category.content,
30
+ "--hjm-badge-category-background": category.background ?? "transparent",
31
+ "--hjm-badge-category-border": category.border ?? "transparent",
32
+ } : {}),
33
+ ...layoutStyle,
34
+ }, ref: ref, className: classNames("hjm-badge", className), "data-tone": category ? "category" : tone, "data-size": size, "data-variant": variant, children: [leading === undefined ? null : (_jsx("span", { "aria-hidden": "true", className: "hjm-badge__icon", children: typeof leading === "function" ? leading(iconContext) : leading })), _jsx("span", { className: "hjm-badge__label", children: children }), trailing === undefined ? null : (_jsx("span", { "aria-hidden": "true", className: "hjm-badge__icon", children: typeof trailing === "function" ? trailing(iconContext) : trailing }))] }));
13
35
  });
14
36
  export const Tag = forwardRef(function Tag({ children, tone, className, layoutStyle, style, ...props }, ref) {
15
37
  const descriptor = resolveTagDescriptor({
@@ -59,7 +81,7 @@ selected, onActivate, href, renderLink, disabled = false, tone = cardRecipe.defa
59
81
  export function QuoteCard({ children, attribution, renderMark, ...props }) {
60
82
  return _jsx(Card, { ...props, leading: _jsx("span", { className: "hjm-quote-card__mark", "aria-hidden": "true", children: renderMark?.({ color: "currentColor", size: cardRecipe.quotation.markSize }) ?? "“" }), children: _jsxs("blockquote", { className: "hjm-quote-card__body", children: [children, attribution === undefined ? null : _jsx("footer", { children: _jsx(Text, { variant: "caption", tone: "muted", children: attribution }) })] }) });
61
83
  }
62
- export const ListRow = forwardRef(function ListRow({ title, description, leading, trailing, trailingAction, renderLink, density: densityProp, tone = listRowRecipe.defaults.tone, leadingShape = "square", selected, disabled = false, loading = false, loadingLabel, href, onClick, className, layoutStyle, style, ...props }, ref) {
84
+ export const ListRow = forwardRef(function ListRow({ title, description, leading, trailing, trailingAccessory = listRowRecipe.defaults.trailingAccessory, trailingAction, renderLink, density: densityProp, tone = listRowRecipe.defaults.tone, leadingShape = "square", selected, disabled = false, loading = false, loadingLabel, href, onClick, className, layoutStyle, style, ...props }, ref) {
63
85
  // The hook runs unconditionally — `??` would short-circuit it and break the
64
86
  // rules of hooks on the very first row that passes `density`.
65
87
  const densityDefault = useHjmDensityDefault({
@@ -67,9 +89,11 @@ export const ListRow = forwardRef(function ListRow({ title, description, leading
67
89
  compact: "compact",
68
90
  });
69
91
  const density = densityProp ?? densityDefault;
92
+ validateListRowTrailingAccessory(trailingAccessory);
93
+ const accessory = trailingAccessory === "none" ? null : listRowRecipe.accessories[trailingAccessory];
70
94
  if (loading) {
71
95
  // A loading row is never interactive: there is nothing to activate yet.
72
- return (_jsxs("div", { ...props, ref: ref, role: loadingLabel ? "status" : undefined, "aria-busy": loadingLabel ? true : undefined, "aria-hidden": loadingLabel ? undefined : true, "aria-label": loadingLabel, className: classNames("hjm-list-row", "hjm-list-row--loading", className), "data-density": density, "data-leading": leading ? "" : undefined, "data-lines": description ? "two" : "one", "data-state": "loading", style: { ...style, ...layoutStyle }, children: [leading ? _jsx("span", { className: "hjm-list-row__leading", "data-shape": leadingShape, "data-placeholder": "" }) : null, _jsxs("span", { className: "hjm-list-row__content", children: [_jsx("span", { className: "hjm-list-row__title", "data-placeholder": "", style: { width: `${listRowRecipe.loading.titleWidthPercent}%` } }), description ? _jsx("span", { className: "hjm-list-row__description", "data-placeholder": "", style: { width: `${listRowRecipe.loading.descriptionWidthPercent}%` } }) : null] }), trailing ? _jsx("span", { className: "hjm-list-row__trailing", "data-placeholder": "", style: { width: listRowRecipe.loading.trailingWidth } }) : null] }));
96
+ return (_jsxs("div", { ...props, ref: ref, role: loadingLabel ? "status" : undefined, "aria-busy": loadingLabel ? true : undefined, "aria-hidden": loadingLabel ? undefined : true, "aria-label": loadingLabel, className: classNames("hjm-list-row", "hjm-list-row--loading", className), "data-density": density, "data-leading": leading ? "" : undefined, "data-lines": description ? "two" : "one", "data-state": "loading", style: { ...style, ...layoutStyle }, children: [leading ? _jsx("span", { className: "hjm-list-row__leading", "data-shape": leadingShape, "data-placeholder": "" }) : null, _jsxs("span", { className: "hjm-list-row__content", children: [_jsx("span", { className: "hjm-list-row__title", "data-placeholder": "", style: { width: `${listRowRecipe.loading.titleWidthPercent}%` } }), description ? _jsx("span", { className: "hjm-list-row__description", "data-placeholder": "", style: { width: `${listRowRecipe.loading.descriptionWidthPercent}%` } }) : null] }), trailing ? _jsx("span", { className: "hjm-list-row__trailing", "data-placeholder": "", style: { width: listRowRecipe.loading.trailingWidth } }) : null, accessory ? _jsx("span", { className: "hjm-list-row__accessory", "data-accessory": trailingAccessory, style: { inlineSize: glyph[accessory.glyph], blockSize: glyph[accessory.glyph] } }) : null] }));
73
97
  }
74
98
  const element = href ? "a" : onClick ? "button" : "div";
75
99
  const interactiveProps = href
@@ -106,7 +130,9 @@ export const ListRow = forwardRef(function ListRow({ title, description, leading
106
130
  style: trailingAction ? style : { ...style, ...layoutStyle },
107
131
  }, leading
108
132
  ? _jsx("span", { className: "hjm-list-row__leading", "data-shape": leadingShape, children: leading })
109
- : null, _jsxs("span", { className: "hjm-list-row__content", children: [_jsx("span", { className: "hjm-list-row__title", children: title }), description ? (_jsx("span", { className: "hjm-list-row__description", children: description })) : null] }), trailing ? _jsx("span", { className: "hjm-list-row__trailing", children: trailing }) : null);
133
+ : null, _jsxs("span", { className: "hjm-list-row__content", children: [_jsx("span", { className: "hjm-list-row__title", children: title }), description ? (_jsx("span", { className: "hjm-list-row__description", children: description })) : null] }), trailing ? _jsx("span", { className: "hjm-list-row__trailing", children: trailing }) : null, accessory
134
+ ? _jsx("span", { className: "hjm-list-row__accessory", "data-accessory": trailingAccessory, "aria-hidden": "true", children: _jsx(Icon, { name: accessory.icon, size: accessory.glyph, weight: accessory.weight }) })
135
+ : null);
110
136
  const linked = href && renderLink ? renderLink(row.props) : row;
111
137
  // The frame owns the row surface and its bleed so the command and the separate action share one fill, as Native;
112
138
  // the action stays outside the link/button (styles.css `.hjm-list-row-frame`).