themelia-react-ui 2.0.5 → 2.0.6

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 (489) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/MIGRATION.md +119 -0
  3. package/README.md +13 -6
  4. package/dist/{accordion-B9MHG0cT.js → accordion-0tQUZ20r.js} +7 -7
  5. package/dist/accordion-0tQUZ20r.js.map +1 -0
  6. package/dist/{action-menu-Dr8K-ghE.js → action-menu-C0gjzLyE.js} +7 -7
  7. package/dist/{action-menu-Dr8K-ghE.js.map → action-menu-C0gjzLyE.js.map} +1 -1
  8. package/dist/{ai-artifact-C58tQcBy.js → ai-artifact-CGGpQryR.js} +172 -157
  9. package/dist/ai-artifact-CGGpQryR.js.map +1 -0
  10. package/dist/{app-shell-B_IuNWOo.js → app-shell-EHuuRDGy.js} +5 -5
  11. package/dist/{app-shell-B_IuNWOo.js.map → app-shell-EHuuRDGy.js.map} +1 -1
  12. package/dist/{attachment-Dg_69lPS.js → attachment-BCpA4e7i.js} +8 -8
  13. package/dist/{attachment-Dg_69lPS.js.map → attachment-BCpA4e7i.js.map} +1 -1
  14. package/dist/{auth-DTkkshS8.js → auth-B0girIk_.js} +15 -15
  15. package/dist/auth-B0girIk_.js.map +1 -0
  16. package/dist/{avatar-CeZaFmNH.js → avatar-B9Jnp-T-.js} +3 -3
  17. package/dist/{avatar-CeZaFmNH.js.map → avatar-B9Jnp-T-.js.map} +1 -1
  18. package/dist/{badge-xIiV_E7f.js → badge-wWauMgAt.js} +3 -3
  19. package/dist/{badge-xIiV_E7f.js.map → badge-wWauMgAt.js.map} +1 -1
  20. package/dist/base/accordion.js +1 -1
  21. package/dist/base/action-menu.js +1 -1
  22. package/dist/base/attachment.js +1 -1
  23. package/dist/base/avatar.js +1 -1
  24. package/dist/base/badge.js +1 -1
  25. package/dist/base/batch-action-bar.js +1 -1
  26. package/dist/base/buttons.js +1 -1
  27. package/dist/base/cards.js +2 -2
  28. package/dist/base/carousel.js +3 -3
  29. package/dist/base/cascader.js +1 -1
  30. package/dist/base/chart.js +1 -1
  31. package/dist/base/choice-inputs.js +2 -2
  32. package/dist/base/code-block.js +1 -1
  33. package/dist/base/combobox.js +1 -1
  34. package/dist/base/command.js +1 -1
  35. package/dist/base/copyable.js +1 -1
  36. package/dist/base/date-pickers.js +2 -2
  37. package/dist/base/display.js +6 -6
  38. package/dist/base/feedback.js +4 -4
  39. package/dist/base/forms-numeric.js +1 -1
  40. package/dist/base/forms.js +2 -2
  41. package/dist/base/inline-edit.js +8 -8
  42. package/dist/base/item.js +1 -1
  43. package/dist/base/media-gallery.js +1 -1
  44. package/dist/base/metadata-list.js +1 -1
  45. package/dist/base/navigation.js +6 -6
  46. package/dist/base/popover-menu.js +1 -1
  47. package/dist/base/popover.js +1 -1
  48. package/dist/base/qr-code.js +1 -1
  49. package/dist/base/repeaters.js +195 -188
  50. package/dist/base/repeaters.js.map +1 -1
  51. package/dist/base/sheet.js +1 -1
  52. package/dist/base/sidebar.js +2 -2
  53. package/dist/base/signature-pad.js +7 -7
  54. package/dist/base/skeleton.js +1 -1
  55. package/dist/base/spinner.js +5 -5
  56. package/dist/base/spinner.js.map +1 -1
  57. package/dist/base/structure.js +1 -1
  58. package/dist/base/table.js +1 -1
  59. package/dist/base/text-inputs.js +2 -2
  60. package/dist/base/toaster.js +1 -1
  61. package/dist/base/tree.js +1 -1
  62. package/dist/base/upload-queue.js +1 -1
  63. package/dist/base/upload.js +3 -3
  64. package/dist/base/value-inputs.js +1 -1
  65. package/dist/{batch-action-bar-Cb8cuvyy.js → batch-action-bar-BoqWIIpV.js} +5 -5
  66. package/dist/{batch-action-bar-Cb8cuvyy.js.map → batch-action-bar-BoqWIIpV.js.map} +1 -1
  67. package/dist/blocks/admin.js +17 -17
  68. package/dist/blocks/ai.js +227 -221
  69. package/dist/blocks/ai.js.map +1 -1
  70. package/dist/blocks/analytics/usage-card.js +1 -1
  71. package/dist/blocks/analytics.js +424 -449
  72. package/dist/blocks/analytics.js.map +1 -1
  73. package/dist/blocks/collaboration.js +1 -1
  74. package/dist/blocks/commerce/receipt.js +1 -1
  75. package/dist/blocks/commerce.js +225 -220
  76. package/dist/blocks/commerce.js.map +1 -1
  77. package/dist/blocks/data-display.js +2 -2
  78. package/dist/blocks/onboarding.js +5 -5
  79. package/dist/blocks/planning.js +11 -11
  80. package/dist/blocks/timelines.js +1 -1
  81. package/dist/{breadcrumbs-J-K2kl4c.js → breadcrumbs-Bp9Ke7kd.js} +4 -4
  82. package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
  83. package/dist/{button-S2Cubiiz.js → button-ChBovTx0.js} +2 -2
  84. package/dist/{button-S2Cubiiz.js.map → button-ChBovTx0.js.map} +1 -1
  85. package/dist/{buttons-BedGfygC.js → buttons-DeW0bQeK.js} +6 -6
  86. package/dist/{buttons-BedGfygC.js.map → buttons-DeW0bQeK.js.map} +1 -1
  87. package/dist/{cards-rNX1M4Xn.js → cards-CNXnmvV5.js} +8 -8
  88. package/dist/{cards-rNX1M4Xn.js.map → cards-CNXnmvV5.js.map} +1 -1
  89. package/dist/{cascader-B1MiqkBq.js → cascader-CrAl9zD5.js} +15 -15
  90. package/dist/{cascader-B1MiqkBq.js.map → cascader-CrAl9zD5.js.map} +1 -1
  91. package/dist/{chart-Darg_0Kv.js → chart-I7ROnsl8.js} +5 -5
  92. package/dist/{chart-Darg_0Kv.js.map → chart-I7ROnsl8.js.map} +1 -1
  93. package/dist/{checkbox-fflqmODR.js → checkbox-MoyHIAPs.js} +3 -3
  94. package/dist/{checkbox-fflqmODR.js.map → checkbox-MoyHIAPs.js.map} +1 -1
  95. package/dist/{choice-inputs-zUgBZfE4.js → choice-inputs-DHGtx0QV.js} +122 -110
  96. package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
  97. package/dist/{code-block-BzmM9Eig.js → code-block-BSJyq9e-.js} +7 -7
  98. package/dist/{code-block-BzmM9Eig.js.map → code-block-BSJyq9e-.js.map} +1 -1
  99. package/dist/{collapsible-BkAI_XD4.js → collapsible-BzJ91LUG.js} +3 -3
  100. package/dist/{collapsible-BkAI_XD4.js.map → collapsible-BzJ91LUG.js.map} +1 -1
  101. package/dist/{collection-content-gDh1v6O4.js → collection-content-CSnwtOTH.js} +3 -3
  102. package/dist/{collection-content-gDh1v6O4.js.map → collection-content-CSnwtOTH.js.map} +1 -1
  103. package/dist/{combobox-BEx0vJgF.js → combobox-Bcvu5J8O.js} +11 -10
  104. package/dist/{combobox-BEx0vJgF.js.map → combobox-Bcvu5J8O.js.map} +1 -1
  105. package/dist/combobox-C2JiSQPc.js +915 -0
  106. package/dist/combobox-C2JiSQPc.js.map +1 -0
  107. package/dist/{command-CrlPIL6m.js → command-9e52NPgK.js} +6 -6
  108. package/dist/{command-CrlPIL6m.js.map → command-9e52NPgK.js.map} +1 -1
  109. package/dist/{comments-Dmpp0YIc.js → comments-BsgErEqd.js} +33 -28
  110. package/dist/comments-BsgErEqd.js.map +1 -0
  111. package/dist/components/base/choice-inputs/choice-types.d.ts +4 -0
  112. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
  113. package/dist/components/base/combobox/combobox-field.d.ts +2 -2
  114. package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
  115. package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
  116. package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
  117. package/dist/components/base/feedback/state-display.d.ts +5 -1
  118. package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
  119. package/dist/components/base/forms/form-field.d.ts +7 -2
  120. package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -1
  121. package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
  122. package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
  123. package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
  124. package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
  125. package/dist/components/base/navigation/language-switcher.d.ts +12 -4
  126. package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
  127. package/dist/components/base/sidebar/sidebar.d.ts +2 -0
  128. package/dist/components/base/upload/avatar-upload.d.ts +2 -1
  129. package/dist/components/base/upload/image-upload.d.ts +2 -1
  130. package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
  131. package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
  132. package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
  133. package/dist/components/blocks/ai/ai-tool-call/types.d.ts +2 -0
  134. package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
  135. package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
  136. package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
  137. package/dist/components/blocks/analytics/types.d.ts +2 -2
  138. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  139. package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
  140. package/dist/components/features/activities/activities.types.d.ts +18 -11
  141. package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
  142. package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
  143. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
  144. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
  145. package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
  146. package/dist/components/features/combobox/combobox.d.ts +2 -2
  147. package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
  148. package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
  149. package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
  150. package/dist/components/features/combobox/types.d.ts +37 -8
  151. package/dist/components/features/email-composer/types.d.ts +3 -1
  152. package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
  153. package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
  154. package/dist/components/features/filters/filters.types.d.ts +3 -3
  155. package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
  156. package/dist/components/features/filters/partials/filter-popover-content.d.ts +4 -2
  157. package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
  158. package/dist/components/features/filters/utils/filter-utils.d.ts +5 -1
  159. package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
  160. package/dist/components/features/media-library/media-library.d.ts +1 -1
  161. package/dist/components/features/media-library/media-library.strings.d.ts +6 -0
  162. package/dist/components/features/media-library/media-library.types.d.ts +36 -8
  163. package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
  164. package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
  165. package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
  166. package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
  167. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
  168. package/dist/components/features/products/products.types.d.ts +2 -2
  169. package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
  170. package/dist/components/features/resource/resource.d.ts +1 -1
  171. package/dist/components/features/resource/resource.types.d.ts +2 -0
  172. package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
  173. package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
  174. package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
  175. package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
  176. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
  177. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
  178. package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
  179. package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
  180. package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
  181. package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
  182. package/dist/components/features/table/data-table.d.ts +1 -1
  183. package/dist/components/features/table/index.d.ts +1 -0
  184. package/dist/components/features/table/table-body.d.ts +1 -1
  185. package/dist/components/features/table/table-helpers.d.ts +6 -3
  186. package/dist/components/features/table/table.strings.d.ts +3 -0
  187. package/dist/components/features/table/table.types.d.ts +17 -1
  188. package/dist/components/layout/header/header.types.d.ts +3 -2
  189. package/dist/components/layout/layout.types.d.ts +5 -3
  190. package/dist/components/layout/navigation/side-nav.d.ts +3 -2
  191. package/dist/components/layout/normalize-layout-path.d.ts +1 -0
  192. package/dist/components/layout/settings/settings.d.ts +1 -1
  193. package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
  194. package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +3 -1
  195. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -0
  196. package/dist/components/layout/sidebar/sidebar.types.d.ts +2 -0
  197. package/dist/components/primitives/link.d.ts +3 -2
  198. package/dist/components/primitives/money.d.ts +1 -1
  199. package/dist/components/primitives/number.d.ts +1 -1
  200. package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
  201. package/dist/{containers-CIxwbZt5.js → containers-CSdc32h9.js} +2 -2
  202. package/dist/{containers-CIxwbZt5.js.map → containers-CSdc32h9.js.map} +1 -1
  203. package/dist/{copyable-DIznBqiT.js → copyable-3fdHfMR3.js} +4 -4
  204. package/dist/{copyable-DIznBqiT.js.map → copyable-3fdHfMR3.js.map} +1 -1
  205. package/dist/{data-display-BdgCAw8T.js → data-display-Cmj-xZYl.js} +16 -15
  206. package/dist/data-display-Cmj-xZYl.js.map +1 -0
  207. package/dist/{date-Cq8ioE4o.js → date-Br0FicVv.js} +4 -4
  208. package/dist/{date-Cq8ioE4o.js.map → date-Br0FicVv.js.map} +1 -1
  209. package/dist/date-picker-CyQlFYsP.js +1617 -0
  210. package/dist/date-picker-CyQlFYsP.js.map +1 -0
  211. package/dist/date-pickers-tj2MXmXd.js +185 -0
  212. package/dist/date-pickers-tj2MXmXd.js.map +1 -0
  213. package/dist/{display-KsZLw9Ov.js → display-CT_N2a3w.js} +7 -7
  214. package/dist/{display-KsZLw9Ov.js.map → display-CT_N2a3w.js.map} +1 -1
  215. package/dist/{dropdown-menu-CLs8Lihj.js → dropdown-menu-C08iIugv.js} +6 -6
  216. package/dist/{dropdown-menu-CLs8Lihj.js.map → dropdown-menu-C08iIugv.js.map} +1 -1
  217. package/dist/features/activities.js +283 -270
  218. package/dist/features/activities.js.map +1 -1
  219. package/dist/features/ai-chat.js +40 -27
  220. package/dist/features/ai-chat.js.map +1 -1
  221. package/dist/features/appointment-calendar.js +126 -126
  222. package/dist/features/appointment-calendar.js.map +1 -1
  223. package/dist/features/async-preview.js +9 -9
  224. package/dist/features/combobox.js +1 -1
  225. package/dist/features/comments.js +1 -1
  226. package/dist/features/data-view.js +10 -10
  227. package/dist/features/email-composer.js +24 -19
  228. package/dist/features/email-composer.js.map +1 -1
  229. package/dist/features/event-calendar.js +129 -125
  230. package/dist/features/event-calendar.js.map +1 -1
  231. package/dist/features/filters.js +2 -2
  232. package/dist/features/global-search.js +16 -20
  233. package/dist/features/global-search.js.map +1 -1
  234. package/dist/features/kanban.js +18 -28
  235. package/dist/features/kanban.js.map +1 -1
  236. package/dist/features/map/style.css +15 -0
  237. package/dist/features/map.js +331 -314
  238. package/dist/features/map.js.map +1 -1
  239. package/dist/features/media-library.js +1044 -866
  240. package/dist/features/media-library.js.map +1 -1
  241. package/dist/features/mentions.js +2 -2
  242. package/dist/features/overlays.js +1 -1
  243. package/dist/features/products.js +978 -964
  244. package/dist/features/products.js.map +1 -1
  245. package/dist/features/questionnaire.js +159 -152
  246. package/dist/features/questionnaire.js.map +1 -1
  247. package/dist/features/resource-assignment.js +8 -8
  248. package/dist/features/resource.js +74 -71
  249. package/dist/features/resource.js.map +1 -1
  250. package/dist/features/rich-text-editor.js +28 -19
  251. package/dist/features/rich-text-editor.js.map +1 -1
  252. package/dist/features/schema-form.js +297 -256
  253. package/dist/features/schema-form.js.map +1 -1
  254. package/dist/features/suggestions.js +57 -50
  255. package/dist/features/suggestions.js.map +1 -1
  256. package/dist/features/sync.js +3 -3
  257. package/dist/features/table.js +1 -1
  258. package/dist/features/theme-tweaker.js +400 -399
  259. package/dist/features/theme-tweaker.js.map +1 -1
  260. package/dist/feedback-Dzo1xtAU.js +246 -0
  261. package/dist/feedback-Dzo1xtAU.js.map +1 -0
  262. package/dist/{field-affordance-recipes-DWcNcOjh.js → field-affordance-recipes-D6H7tVJi.js} +2 -2
  263. package/dist/{field-affordance-recipes-DWcNcOjh.js.map → field-affordance-recipes-D6H7tVJi.js.map} +1 -1
  264. package/dist/field-control-attributes-B6i335wr.js +18 -0
  265. package/dist/field-control-attributes-B6i335wr.js.map +1 -0
  266. package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
  267. package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
  268. package/dist/{filters-DzgSJpMK.js → filters-Dl80yYtN.js} +763 -605
  269. package/dist/filters-Dl80yYtN.js.map +1 -0
  270. package/dist/form-field-CAPdwdnZ.js +74 -0
  271. package/dist/form-field-CAPdwdnZ.js.map +1 -0
  272. package/dist/{form-sizing-Bs2qFUeE.js → form-sizing-CgcrUbLU.js} +2 -2
  273. package/dist/{form-sizing-Bs2qFUeE.js.map → form-sizing-CgcrUbLU.js.map} +1 -1
  274. package/dist/{forms-C0RGnJTe.js → forms-B3W8CH7-.js} +8 -8
  275. package/dist/{forms-C0RGnJTe.js.map → forms-B3W8CH7-.js.map} +1 -1
  276. package/dist/forms-numeric-CwjQJe-O.js +991 -0
  277. package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
  278. package/dist/{header-DMMxG__r.js → header-ZIIsRKxP.js} +113 -113
  279. package/dist/header-ZIIsRKxP.js.map +1 -0
  280. package/dist/hooks/use-files.d.ts +2 -0
  281. package/dist/{hooks-DB6CJ4MR.js → hooks-BitHSh-Y.js} +3 -3
  282. package/dist/{hooks-DB6CJ4MR.js.map → hooks-BitHSh-Y.js.map} +1 -1
  283. package/dist/{icon-badge-DZF-YjQp.js → icon-badge-npxF1SLX.js} +2 -2
  284. package/dist/{icon-badge-DZF-YjQp.js.map → icon-badge-npxF1SLX.js.map} +1 -1
  285. package/dist/index.js +1 -1
  286. package/dist/{input-CvyDQlY7.js → input-7KAc7XQL.js} +6 -6
  287. package/dist/{input-CvyDQlY7.js.map → input-7KAc7XQL.js.map} +1 -1
  288. package/dist/{input-DMBwAZmr.js → input-DIREVYHs.js} +3 -3
  289. package/dist/{input-DMBwAZmr.js.map → input-DIREVYHs.js.map} +1 -1
  290. package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
  291. package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
  292. package/dist/{item-DjCcM18E.js → item-FfWnaYST.js} +99 -98
  293. package/dist/item-FfWnaYST.js.map +1 -0
  294. package/dist/layout/app-shell.js +1 -1
  295. package/dist/layout/auth.js +1 -1
  296. package/dist/layout/containers.js +1 -1
  297. package/dist/layout/header.js +1 -1
  298. package/dist/layout/hooks.js +1 -1
  299. package/dist/layout/navigation.js +1 -1
  300. package/dist/layout/page.js +1 -1
  301. package/dist/layout/settings.js +1 -1
  302. package/dist/layout/sidebar.js +2 -2
  303. package/dist/layout/workspace.js +1 -1
  304. package/dist/layout.js +11 -11
  305. package/dist/layout.types-E_GAApzO.js +30 -0
  306. package/dist/layout.types-E_GAApzO.js.map +1 -0
  307. package/dist/lib/field-control-attributes.d.ts +11 -0
  308. package/dist/lib/field-state-recipes.d.ts +2 -0
  309. package/dist/lib/format.d.ts +1 -0
  310. package/dist/lib/surface-recipes.d.ts +1 -1
  311. package/dist/lib/token-merge.generated.d.ts +6 -6
  312. package/dist/lib/utils.js +1 -1
  313. package/dist/{media-gallery-C-vChPmE.js → media-gallery-C81DAnKI.js} +6 -6
  314. package/dist/{media-gallery-C-vChPmE.js.map → media-gallery-C81DAnKI.js.map} +1 -1
  315. package/dist/{mentions-0_4nWuI-.js → mentions-qOnedSt4.js} +236 -167
  316. package/dist/mentions-qOnedSt4.js.map +1 -0
  317. package/dist/message-BJHnn43M.js +135 -0
  318. package/dist/message-BJHnn43M.js.map +1 -0
  319. package/dist/{metadata-list-C3MkU-Om.js → metadata-list-XkqZ_UXH.js} +11 -11
  320. package/dist/{metadata-list-C3MkU-Om.js.map → metadata-list-XkqZ_UXH.js.map} +1 -1
  321. package/dist/{navigation-DaRjthVk.js → navigation-BgtPJAhi.js} +119 -119
  322. package/dist/navigation-BgtPJAhi.js.map +1 -0
  323. package/dist/{navigation-C90-oQFq.js → navigation-Bt-v7rWP.js} +52 -46
  324. package/dist/navigation-Bt-v7rWP.js.map +1 -0
  325. package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
  326. package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
  327. package/dist/{number-CRU3kGuk.js → number-CYqBcrSj.js} +78 -86
  328. package/dist/number-CYqBcrSj.js.map +1 -0
  329. package/dist/{overflow-tab-bar-IVFVQFV6.js → overflow-tab-bar-BQCA2Zn2.js} +7 -7
  330. package/dist/{overflow-tab-bar-IVFVQFV6.js.map → overflow-tab-bar-BQCA2Zn2.js.map} +1 -1
  331. package/dist/{overlays-BSgCtM2v.js → overlays-CC8zI3Du.js} +264 -260
  332. package/dist/overlays-CC8zI3Du.js.map +1 -0
  333. package/dist/{page-DUUKDAjo.js → page-BoQ1VaFJ.js} +13 -13
  334. package/dist/{page-DUUKDAjo.js.map → page-BoQ1VaFJ.js.map} +1 -1
  335. package/dist/{page-header-commands-7P3sfE9u.js → page-header-commands-DIKspJfx.js} +4 -4
  336. package/dist/{page-header-commands-7P3sfE9u.js.map → page-header-commands-DIKspJfx.js.map} +1 -1
  337. package/dist/{pagination-CgCjElfu.js → pagination-Br8TdV9A.js} +4 -4
  338. package/dist/{pagination-CgCjElfu.js.map → pagination-Br8TdV9A.js.map} +1 -1
  339. package/dist/{popover-B85RenIl.js → popover-k8TdUcAt.js} +10 -10
  340. package/dist/popover-k8TdUcAt.js.map +1 -0
  341. package/dist/{popover-menu-DlnQ2zlR.js → popover-menu-yn-o0kyA.js} +7 -7
  342. package/dist/{popover-menu-DlnQ2zlR.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
  343. package/dist/{popover.recipes-DdiEp0rd.js → popover.recipes-DJ0AkUan.js} +2 -2
  344. package/dist/{popover.recipes-DdiEp0rd.js.map → popover.recipes-DJ0AkUan.js.map} +1 -1
  345. package/dist/{portal-recipes-BpsV_iRw.js → portal-recipes-DyUXqUtD.js} +2 -2
  346. package/dist/{portal-recipes-BpsV_iRw.js.map → portal-recipes-DyUXqUtD.js.map} +1 -1
  347. package/dist/{primitives-ByWgGUgt.js → primitives-BkkQjYl7.js} +22 -17
  348. package/dist/primitives-BkkQjYl7.js.map +1 -0
  349. package/dist/primitives.js +4 -4
  350. package/dist/{progress-BJhQP9WX.js → progress-DZFXXzPs.js} +4 -4
  351. package/dist/{progress-BJhQP9WX.js.map → progress-DZFXXzPs.js.map} +1 -1
  352. package/dist/{receipt-tOc7B3hw.js → receipt-C7LhOg7Q.js} +6 -6
  353. package/dist/{receipt-tOc7B3hw.js.map → receipt-C7LhOg7Q.js.map} +1 -1
  354. package/dist/rich-text-BnTzZjIo.js +45 -0
  355. package/dist/rich-text-BnTzZjIo.js.map +1 -0
  356. package/dist/rich-text-editor-CAurDwT5.js +1273 -0
  357. package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
  358. package/dist/{rich-text-editor-toolbar-laT3tpBT.js → rich-text-editor-toolbar-DbXig7Jk.js} +36 -35
  359. package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
  360. package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
  361. package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
  362. package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
  363. package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
  364. package/dist/{scroll-area-B0dB2cBi.js → scroll-area-Bj6CRUif.js} +2 -2
  365. package/dist/{scroll-area-B0dB2cBi.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
  366. package/dist/{separator-Bb17I4pu.js → separator-B9ewiCGO.js} +2 -2
  367. package/dist/{separator-Bb17I4pu.js.map → separator-B9ewiCGO.js.map} +1 -1
  368. package/dist/{separator-Ct_WSWTJ.js → separator-DM6gs2vu.js} +3 -3
  369. package/dist/{separator-Ct_WSWTJ.js.map → separator-DM6gs2vu.js.map} +1 -1
  370. package/dist/services/actions.js +1 -1
  371. package/dist/settings-DZPHgpx4.js +155 -0
  372. package/dist/settings-DZPHgpx4.js.map +1 -0
  373. package/dist/{sheet-BGPERY55.js → sheet-C4DHsgLk.js} +6 -6
  374. package/dist/{sheet-BGPERY55.js.map → sheet-C4DHsgLk.js.map} +1 -1
  375. package/dist/sidebar-C8BnDwTH.js +709 -0
  376. package/dist/sidebar-C8BnDwTH.js.map +1 -0
  377. package/dist/{sidebar-f9gRWXIR.js → sidebar-CmD6a-HK.js} +16 -13
  378. package/dist/sidebar-CmD6a-HK.js.map +1 -0
  379. package/dist/{skeleton-BapcJd9C.js → skeleton-DDgdhmu9.js} +5 -5
  380. package/dist/{skeleton-BapcJd9C.js.map → skeleton-DDgdhmu9.js.map} +1 -1
  381. package/dist/{smart-card-CW0hjetE.js → smart-card-B6vLxqa_.js} +8 -8
  382. package/dist/{smart-card-CW0hjetE.js.map → smart-card-B6vLxqa_.js.map} +1 -1
  383. package/dist/{structure-DuxKl954.js → structure-DZJ2wbAU.js} +2 -2
  384. package/dist/{structure-DuxKl954.js.map → structure-DZJ2wbAU.js.map} +1 -1
  385. package/dist/style.css +1 -1
  386. package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
  387. package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
  388. package/dist/{table-CFOWY9pQ.js → table-CBonSdTp.js} +534 -486
  389. package/dist/table-CBonSdTp.js.map +1 -0
  390. package/dist/{table-B4TE7iOV.js → table-CXSPHH25.js} +75 -71
  391. package/dist/table-CXSPHH25.js.map +1 -0
  392. package/dist/{tabs-e7ko9S2o.js → tabs-C4Kr_hCr.js} +50 -49
  393. package/dist/tabs-C4Kr_hCr.js.map +1 -0
  394. package/dist/{text-inputs-B1culiSK.js → text-inputs-jdkS3ReG.js} +9 -9
  395. package/dist/{text-inputs-B1culiSK.js.map → text-inputs-jdkS3ReG.js.map} +1 -1
  396. package/dist/{timelines-D3Sl9ueq.js → timelines-CoPwdJP0.js} +10 -10
  397. package/dist/{timelines-D3Sl9ueq.js.map → timelines-CoPwdJP0.js.map} +1 -1
  398. package/dist/{tooltip-8wz5S_Zr.js → tooltip-31NwIpTo.js} +4 -4
  399. package/dist/{tooltip-8wz5S_Zr.js.map → tooltip-31NwIpTo.js.map} +1 -1
  400. package/dist/{tree-CzUJHnFs.js → tree-CeYVzdFE.js} +6 -6
  401. package/dist/{tree-CzUJHnFs.js.map → tree-CeYVzdFE.js.map} +1 -1
  402. package/dist/typography/rich-text.js +1 -1
  403. package/dist/{typography-BQnine1k.js → typography-C7-YMW1S.js} +2 -2
  404. package/dist/{typography-BQnine1k.js.map → typography-C7-YMW1S.js.map} +1 -1
  405. package/dist/typography.js +1 -1
  406. package/dist/{upload-BOW6U2tI.js → upload-Hdm5gObf.js} +303 -291
  407. package/dist/upload-Hdm5gObf.js.map +1 -0
  408. package/dist/{upload-queue-qUXn1ykN.js → upload-queue-D0sYPuqo.js} +8 -8
  409. package/dist/{upload-queue-qUXn1ykN.js.map → upload-queue-D0sYPuqo.js.map} +1 -1
  410. package/dist/{usage-card-BeSLY0i0.js → usage-card-9s8hLDfn.js} +9 -9
  411. package/dist/{usage-card-BeSLY0i0.js.map → usage-card-9s8hLDfn.js.map} +1 -1
  412. package/dist/{utils-B6kKb8jB.js → utils-DhuoqFy4.js} +31 -37
  413. package/dist/utils-DhuoqFy4.js.map +1 -0
  414. package/dist/{value-inputs-skdVB2zh.js → value-inputs-D3aPgq9H.js} +15 -15
  415. package/dist/{value-inputs-skdVB2zh.js.map → value-inputs-D3aPgq9H.js.map} +1 -1
  416. package/dist/{value-typography-uAmWUAL1.js → value-typography-uSzzG9Gf.js} +32 -26
  417. package/dist/value-typography-uSzzG9Gf.js.map +1 -0
  418. package/dist/{workspace-DHeHv0qw.js → workspace-CC8Vchiu.js} +12 -12
  419. package/dist/{workspace-DHeHv0qw.js.map → workspace-CC8Vchiu.js.map} +1 -1
  420. package/docs/consumer-skill/examples/edit.tsx +3 -3
  421. package/docs/consumer-skill/references/agents-md.md +19 -19
  422. package/docs/consumer-skill/references/analytics.md +15 -0
  423. package/docs/consumer-skill/references/component-contracts.json +14724 -13057
  424. package/docs/consumer-skill/references/composition.md +21 -4
  425. package/docs/consumer-skill/references/design-contract.md +1 -0
  426. package/docs/consumer-skill/references/installation.md +51 -8
  427. package/docs/consumer-skill/references/integration.md +24 -1
  428. package/docs/consumer-skill/references/public-api.json +172 -34
  429. package/docs/consumer-skill/references/review.md +51 -11
  430. package/docs/consumer-skill/references/rhf-workflows.md +72 -0
  431. package/docs/consumer-skill/references/theming.md +7 -2
  432. package/docs/consumer-skill/references/tokens.json +1 -1
  433. package/docs/consumer-skill/scripts/composition-policy.mjs +144 -30
  434. package/docs/consumer-skill/scripts/setup-skills.mjs +46 -9
  435. package/package.json +4 -2
  436. package/templates/admin-shell-template.tsx +1 -2
  437. package/templates/customers-template.tsx +18 -16
  438. package/dist/accordion-B9MHG0cT.js.map +0 -1
  439. package/dist/ai-artifact-C58tQcBy.js.map +0 -1
  440. package/dist/auth-DTkkshS8.js.map +0 -1
  441. package/dist/breadcrumbs-J-K2kl4c.js.map +0 -1
  442. package/dist/choice-inputs-zUgBZfE4.js.map +0 -1
  443. package/dist/combobox-BwzoXFSG.js +0 -884
  444. package/dist/combobox-BwzoXFSG.js.map +0 -1
  445. package/dist/comments-Dmpp0YIc.js.map +0 -1
  446. package/dist/data-display-BdgCAw8T.js.map +0 -1
  447. package/dist/date-picker-RlIzKom_.js +0 -1551
  448. package/dist/date-picker-RlIzKom_.js.map +0 -1
  449. package/dist/date-pickers-DY-CpXS1.js +0 -179
  450. package/dist/date-pickers-DY-CpXS1.js.map +0 -1
  451. package/dist/feedback-Dm4izqFn.js +0 -240
  452. package/dist/feedback-Dm4izqFn.js.map +0 -1
  453. package/dist/filters-DzgSJpMK.js.map +0 -1
  454. package/dist/form-field-BriWAXyg.js +0 -63
  455. package/dist/form-field-BriWAXyg.js.map +0 -1
  456. package/dist/forms-numeric-DIhghX1Q.js +0 -910
  457. package/dist/forms-numeric-DIhghX1Q.js.map +0 -1
  458. package/dist/header-DMMxG__r.js.map +0 -1
  459. package/dist/item-DjCcM18E.js.map +0 -1
  460. package/dist/layout.types-Cn7aUzJp.js +0 -20
  461. package/dist/layout.types-Cn7aUzJp.js.map +0 -1
  462. package/dist/mentions-0_4nWuI-.js.map +0 -1
  463. package/dist/message-g8p7eVtN.js +0 -128
  464. package/dist/message-g8p7eVtN.js.map +0 -1
  465. package/dist/navigation-C90-oQFq.js.map +0 -1
  466. package/dist/navigation-DaRjthVk.js.map +0 -1
  467. package/dist/number-CRU3kGuk.js.map +0 -1
  468. package/dist/overlays-BSgCtM2v.js.map +0 -1
  469. package/dist/popover-B85RenIl.js.map +0 -1
  470. package/dist/primitives-ByWgGUgt.js.map +0 -1
  471. package/dist/rich-text-Dth5E882.js +0 -78
  472. package/dist/rich-text-Dth5E882.js.map +0 -1
  473. package/dist/rich-text-editor-C1fOjBTd.js +0 -1195
  474. package/dist/rich-text-editor-C1fOjBTd.js.map +0 -1
  475. package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +0 -1
  476. package/dist/safe-image-src-C6kQSMBZ.js +0 -17
  477. package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
  478. package/dist/sanitize-html-DsQmI48u.js.map +0 -1
  479. package/dist/settings-Bar5wiSo.js +0 -167
  480. package/dist/settings-Bar5wiSo.js.map +0 -1
  481. package/dist/sidebar-D-JYMMbY.js +0 -686
  482. package/dist/sidebar-D-JYMMbY.js.map +0 -1
  483. package/dist/sidebar-f9gRWXIR.js.map +0 -1
  484. package/dist/table-B4TE7iOV.js.map +0 -1
  485. package/dist/table-CFOWY9pQ.js.map +0 -1
  486. package/dist/tabs-e7ko9S2o.js.map +0 -1
  487. package/dist/upload-BOW6U2tI.js.map +0 -1
  488. package/dist/utils-B6kKb8jB.js.map +0 -1
  489. package/dist/value-typography-uAmWUAL1.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,81 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.6 — 2026-11-04
4
+
5
+ - AI disclosure and source controls use their visible text for accessible
6
+ names. Disclosure copy overrides remain available as descriptions.
7
+ - OrderStatusCard accepts translated status labels and a formatter for the
8
+ displayed order reference.
9
+ - Default layout navigation renders callback-only entries as buttons and
10
+ keeps disabled entries inert. Custom settings link renderers receive
11
+ selection through `onClick`.
12
+ - SideNav accepts a `renderLink` adapter. Pass your app's pathname as
13
+ `currentPath` to preserve active-route highlighting when upgrading from
14
+ the implicit browser URL default.
15
+ - AppSidebar and SidebarNavigationRail close an open drawer after app
16
+ navigation. Use `closeDrawerOnNavigate={false}` to keep it open.
17
+ - Header and HeaderBreadcrumbs render in standalone and stacked layouts.
18
+ The built-in sidebar trigger appears only inside a sidebar provider.
19
+ - FormField labels, hints and errors reach time, dimension, coordinate,
20
+ image, avatar, key/value and rich-text controls. RichTextEditor also accepts
21
+ `invalid` and preserves the field association in source mode.
22
+ - A blank optional TimePicker allows native form submission.
23
+ - AvatarUpload honors MIME types and wildcards in its file accept rules.
24
+ - FormRichTextEditor binds React Hook Form touch, focus, invalid and disabled
25
+ state. Named editors include committed HTML in native submissions.
26
+ - Combobox and MultiCombobox accept selection defaults and new value props
27
+ alongside their legacy bindings. All three selectors accept search and
28
+ open defaults.
29
+ - WeightInput, DimensionsInput and CoordinatesInput expose direct value
30
+ callbacks, field blur and native form names, plus required and read-only
31
+ behavior.
32
+ - TimePicker supports initial times, controlled or default popup visibility,
33
+ and named native values with required validation in both modes.
34
+ - PillRadioGroup supports uncontrolled defaults and submits the selected
35
+ enabled option when named. Clearing still emits `null`.
36
+ - AppointmentCalendar, Questionnaire, LanguageSwitcher and EmailComposer
37
+ add consistent value callbacks. TabbedResourceShell adds an initial tab.
38
+ - Metric and MetricGrid accept a shared semantic `tone`. The legacy
39
+ `colorScheme` remains supported. Colored metrics keep primary progress
40
+ by default and accept an explicit neutral tone.
41
+ - MediaLibrary keeps failed edits and uploads in their own panels so browsing
42
+ stays available. `useMediaLibrary` exposes `loadError`, `mutationError` and
43
+ `uploadError` alongside the existing `error` field.
44
+ - MediaLibrary requires explicit callbacks for edits and deletes, including
45
+ in-memory collections and the headless mutation methods. Its Delete action
46
+ opens a confirmation and returns focus to the results after removal.
47
+ - MediaLibrary keeps previous results mounted during refresh. Inline fetcher
48
+ and error callbacks no longer trigger reloads. Change `refreshKey` to
49
+ reload the current remote query explicitly.
50
+ - MediaLibrary server pickers return selected records from earlier searches
51
+ and uploads. Uploads refresh the remote results and stay selected across
52
+ filters.
53
+ - MediaLibrary uploads keep queued files and individual failures available
54
+ for the next request. Upload helpers expose the current batch's file IDs.
55
+ - Native submissions from `Combobox`, `MultiCombobox` and
56
+ `AsyncResourceCombobox` now use the selected item's key, or its label
57
+ when no key is supplied. To keep submitting JSON objects, pass
58
+ `getItemValue={(item) => JSON.stringify(item)}`.
59
+ - Async filter option freshness and retention apply within one mounted editor.
60
+ Chip labels are isolated to their filter provider. Applications that need
61
+ reuse across editor mounts can cache in their own scoped fetcher.
62
+ - DataTable bulk-action counts include selected IDs from other server pages.
63
+ Use `rowSelection` for those IDs and `selectedRows` for loaded records.
64
+ - Numeric filters use `between` and store two positional bounds, with an
65
+ empty string for an open end. The URL helpers still read older scalar
66
+ values as exact matches. Date ranges retain both calendar days on reload.
67
+ - Inline product option editing preserves rich value labels. Options with
68
+ rich names can use the `onEditOption` callback for app-owned editing.
69
+ - Money treats a single dot as a decimal separator in
70
+ serialized amounts, including three-decimal currencies.
71
+ - Controlled overlays report each dismissal request through `onOpenChange`.
72
+ `onClose` now follows the committed visibility change.
73
+ - RichTextEditor source edits stay in a draft until switching back to rich
74
+ text. The editor emits the normalized document HTML. An external value
75
+ change replaces the open source draft.
76
+ - `useActivityResources` reseeds when resource values change. Equivalent
77
+ inline resources preserve local edits, and each mutation emits once.
78
+
3
79
  ## 2.0.5 — 2026-10-31
4
80
 
5
81
  - Modal scrims render again under `SidebarProvider`/`AppSidebar`. The sidebar
package/MIGRATION.md ADDED
@@ -0,0 +1,119 @@
1
+ # From admin-ui-starter-kit 3.x
2
+
3
+ `themelia-react-ui` is the Base UI and Tailwind port of the Themelia package
4
+ `admin-ui-starter-kit`. The package names have independent version histories.
5
+ The `themelia-react-ui` 2.x line is the migration destination for
6
+ `admin-ui-starter-kit` 3.x applications.
7
+
8
+ ## Imports and installation
9
+
10
+ 1. Use the [consumer setup](README.md#consumer-setup) to install the new package
11
+ and its required peers. React and React DOM use 19.x, Lucide uses 1.x, and
12
+ `@base-ui/react` is required. The old `cmdk`, Tailwind, Tailwind Vite plugin,
13
+ `tw-animate-css` and Inter font peers can be removed if the application has
14
+ no independent use for them. Keep the optional peers used by your families.
15
+ 2. Replace `admin-ui-starter-kit/<family>` with `themelia-react-ui/<family>`.
16
+ For `composed/admin`, `ai`, `analytics`, `commerce`, `data-display`,
17
+ `onboarding` and `timelines`, use `themelia-react-ui/blocks/<family>`.
18
+ For example, `admin-ui-starter-kit/composed/commerce` becomes
19
+ `themelia-react-ui/blocks/commerce`. Move CommonJS `require()` consumers to
20
+ ESM imports or asynchronous `import()`.
21
+ 3. Import `themelia-react-ui/style.css` once. Add
22
+ `themelia-react-ui/features/map/style.css` when using the map family.
23
+ The [theme guide](docs/consumer-skill/references/theming.md) covers the
24
+ optional green brand, structural roots and scoped portals.
25
+
26
+ ### Host CSS
27
+
28
+ The compiled stylesheet leaves global preflight and the page canvas to the app.
29
+ If the previous stylesheet supplied these values, put them in your app's lower
30
+ priority base layer. Keep an app-owned reset for native margins, lists and form
31
+ controls where you used Tailwind preflight.
32
+
33
+ ```css
34
+ @layer base {
35
+ * {
36
+ border-color: var(--border);
37
+ outline-color: color-mix(in oklab, var(--ring) 50%, transparent);
38
+ }
39
+ html { font-family: var(--font-sans); }
40
+ body { background-color: var(--background); color: var(--foreground); }
41
+ code, kbd, samp, pre { font-family: var(--font-mono); }
42
+ }
43
+ ```
44
+
45
+ For app-generated Tailwind utilities, follow the [Tailwind setup](docs/consumer-skill/references/installation.md).
46
+ The editable `theme.css` entry is processed by the application's Tailwind v4
47
+ build. The compiled `style.css` already includes package utilities.
48
+
49
+ ### Tools
50
+
51
+ | Former bin | Workflow in this package |
52
+ | --- | --- |
53
+ | `admin-ui-starter-kit-audit` | Run `node node_modules/themelia-react-ui/docs/consumer-skill/scripts/check-composition.mjs src`. Pass explicit file or directory paths. Its output is JSON. Replace the old `--fix` and `--strict` automation with your own review or CI step. |
54
+ | `admin-ui-starter-kit-install-skill` | Use the shipped `setup-skills.mjs --copy` or `--check` commands in the [installed setup guide](docs/consumer-skill/references/installation.md). |
55
+ | `admin-ui-starter-kit-publish-theme` | Import the published theme CSS or export a custom theme from Theme Studio and apply it in the app. |
56
+ | `admin-ui-starter-kit-showcase` | Use the component catalogue or render the shipped examples in your application. |
57
+
58
+ ## Defaults to review
59
+
60
+ | Owner | Earlier default | Current default or migration |
61
+ | --- | --- | --- |
62
+ | Untoned Button | Primary solid | Secondary outline. Set provider button defaults or make the primary command explicit. |
63
+ | Badge | Primary | Neutral. Set an explicit status tone where relevant. |
64
+ | Card and SmartCard | Framed, footer divider off | Card surface, header divider off, footer divider on. Explicit props win over provider booleans. |
65
+ | PageHeader | `h3` | `h1` for route titles. Use `headingTag="h3"` when the page already owns its heading, or supply a custom title element. |
66
+ | PageHeading | Separator on | Pass `withSeparator` to restore it. |
67
+ | ConfirmDialog | Start-aligned with an icon | Centered. Set `overlay.defaultConfirmAlign: 'start'` and pass `showIcon` on dialogs that need the icon. |
68
+ | DateCell and DateMetaCell | Icon on | Pass `showIcon` for the date glyph. |
69
+ | LoyaltyPoints | Warning tier | Neutral. Set `tierTone="warning"` where it conveys meaning. |
70
+ | Command | Default inset | Compact. Pass `inset="default"` for the wider inset. |
71
+ | Page | Large measure, no inset | Owns page gutters and block inset. Use explicit `maxWidth="lg"`, `gutter="none"` and `padding="none"` inside a shell that supplies them. |
72
+ | DataTable | Inline selection bar | Floating selection bar. Use `selectionToolbarPlacement="inline"` for inline placement. |
73
+ | MediaLibrary | Activation selects | Activation opens details. Use `defaultSelecting` to start in selection mode. |
74
+ | Metric money and signed values | Prefix currency code and ASCII hyphen | Default output can place the currency code after the amount and use the Unicode minus. Review text matching in tests. |
75
+ | Date range presets | Title case | Sentence case, such as “This week” and “Last 30 days”. |
76
+
77
+ To keep the earlier button, badge and card choices while moving the
78
+ imports, supply the old defaults explicitly.
79
+
80
+ ```tsx
81
+ import { UIProvider } from 'themelia-react-ui/ui-provider';
82
+
83
+ <UIProvider config={{
84
+ button: { defaultTone: 'primary', defaultButtonStyle: 'solid' },
85
+ badge: { defaultTone: 'primary' },
86
+ card: { defaultSurface: 'framed', defaultHeaderDivider: false, defaultFooterDivider: false },
87
+ overlay: { defaultConfirmAlign: 'start' },
88
+ }}>
89
+ <App />
90
+ </UIProvider>
91
+ ```
92
+
93
+ ## Behavior, selectors and deprecated entry points
94
+
95
+ - Check the query policy of async filters. Options are cached within a mounted
96
+ editor and refetch after a remount. Chip labels stay within their filter
97
+ provider. Reuse stable fetcher and mapper references. If the app needs caching
98
+ across editor mounts, keep it inside an app-owned fetcher keyed by the complete
99
+ query and authorization scope.
100
+ - For selectors targeting legacy ContentBlock element hooks, move styling and
101
+ queries to the owning Card regions, slots and accessible names. The
102
+ ContentBlock adapter keeps its root, header, content and footer hooks.
103
+ DataTable still exposes the selection-toolbar root class, and
104
+ `batch-action-bar--summary` and `batch-action-bar--actions` identify the new
105
+ bar regions. Query the actual status or action for ShipmentTracking and
106
+ product option rows whose decorative dot and drag hooks were removed.
107
+ Tree owns AiFileTree rows through `tree--item` and `tree--group`.
108
+ - For new code, use Card in place of SmartCard and ContentBlock,
109
+ `ActionDrawer` from `features/overlays` in place of base Sheet,
110
+ `Page` from `layout/page` in place of the resource shell, and
111
+ `SchemaForm` from `features/schema-form` for the sync form. Pass standalone
112
+ product-card content to `ProductOverview` through its typed region props.
113
+ - Check Command compositions that used inherited cmdk props. Base UI owns
114
+ Command's keyboard and filtering behavior. Supply an explicit `filter`
115
+ for application-specific ranking and use the current public parts when
116
+ composing empty and group content.
117
+
118
+ The [changelog](CHANGELOG.md) and [consumer composition guide](docs/consumer-skill/references/composition.md)
119
+ describe the current roles and the version-specific changes.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A publishable React UI package built on Base UI and Tailwind, with shadcn-compatible themes and Themelia's public APIs. Routing, persistence, permissions and translations remain consumer-owned.
4
4
 
5
- Package: **`themelia-react-ui`** · current version: **`2.0.5`** · MIT licensed.
5
+ Package: **`themelia-react-ui`** · current version: **`2.0.6`** · MIT licensed.
6
6
  The GitHub repository is `themelia-react-ui`; npm imports use `themelia-react-ui`.
7
7
 
8
8
  Consuming apps start with [consumer setup](#consumer-setup) and the packaged
@@ -49,6 +49,8 @@ Browser verification requires Playwright Chromium. An existing executable can be
49
49
 
50
50
  ## Consumer setup
51
51
 
52
+ Moving an existing Themelia app from `admin-ui-starter-kit`? See the [3.x migration guide](MIGRATION.md).
53
+
52
54
  Install a built tarball; use a registry release when available. React 19, React DOM 19, the declared Base UI peer and Lucide React 1 are required peers. Import exact family paths; there is no aggregate component barrel or public raw UI entrypoint.
53
55
 
54
56
  Nested light/dark utilities use custom-property container style queries. Use
@@ -56,14 +58,14 @@ Chromium 111+, Safari 18.1+ or Firefox 151+ for this theme behavior. The nearest
56
58
  mode class governs nested components and their scoped portals; see the
57
59
  [theme guide](docs/consumer-skill/references/theming.md) for partial overrides.
58
60
 
59
- Version 2.0.5 uses official `@base-ui/react ^1.9.0` from npm. Themelia's
61
+ Version 2.0.6 uses official `@base-ui/react ^1.9.0` from npm. Themelia's
60
62
  `ComboboxRoot.dismissLabel` and feature `strings.dismiss` name both screen-reader
61
63
  dismissal controls. Shared popup owners preserve focus restored to a child
62
64
  trigger during deferred parent recovery. These behaviors are library-owned;
63
65
  consumers install the unmodified official Base UI package.
64
66
 
65
67
  ```sh
66
- npm install ./themelia-react-ui-2.0.5.tgz '@base-ui/react@^1.9.0' lucide-react
68
+ npm install ./themelia-react-ui-2.0.6.tgz '@base-ui/react@^1.9.0' lucide-react
67
69
  ```
68
70
 
69
71
  For a registry release, install into a React 19 application with:
@@ -101,9 +103,14 @@ export function Example() {
101
103
  The default primary is near-black, so status colors never compete with it. For the Themelia green brand, also import `themelia-react-ui/themes/green.css` after `style.css`. For your own brand, set `--primary` and `--primary-foreground` (light and `.dark`) at the root or a `ThemeScope`; `--primary-accent` follows `--primary`.
102
104
 
103
105
  Compiled `style.css` requires no source scanning and includes no global preflight.
106
+ It includes static utility classes used by documented catalogue examples and
107
+ shipped recipes/templates. Arbitrary app classes still need app CSS or Tailwind.
104
108
  Components own their essential font and box model; the host may supply a reset
105
109
  for its own markup. Keep resets in a lower-priority CSS layer and load deliberate
106
- app overrides after library CSS. A Tailwind v4 application can additionally
110
+ app overrides after library CSS. The application owns the page canvas and inherited
111
+ copy: set the document font to `var(--font-sans)` and the body background/color to
112
+ `var(--background)` / `var(--foreground)`. See the [host CSS setup](docs/consumer-skill/references/installation.md#set-the-application-canvas).
113
+ A Tailwind v4 application can additionally
107
114
  import `theme.css` after Tailwind to generate app-owned utilities from the same
108
115
  mappings; this editable file contains Tailwind directives and needs processing.
109
116
 
@@ -241,7 +248,7 @@ Consumer callbacks own feature data and backend effects. The examples demonstrat
241
248
 
242
249
  ### Blocks import migration
243
250
 
244
- The presentation layer is now named `blocks`. Replace `themelia-react-ui/composed/<family>` with `themelia-react-ui/blocks/<family>` for admin, AI, analytics, commerce, data-display, onboarding, and timelines. Component names and props are unchanged. The source folder and catalogue routes follow the same rename.
251
+ The presentation layer is now named `blocks`. Replace `admin-ui-starter-kit/composed/<family>` with `themelia-react-ui/blocks/<family>` for admin, AI, analytics, commerce, data-display, onboarding, and timelines. The source folder and catalogue routes follow the same rename.
245
252
 
246
253
  The default development URL opens the full component catalogue. The focused foundation playground remains at `/?page=foundations`, and the products workspace remains at `/?page=products`.
247
254
 
@@ -437,7 +444,7 @@ visual review remain separate.
437
444
 
438
445
  Maintainers run `npm run docs:sync-skill` after changes to exports, types, selection guidance, peers or tokens. `npm run check:skill` requires a fresh library build and rejects stale source-backed references, built declaration exports and broken reference links. `prepack` checks source-backed references without rebuilding; `prepublishOnly` builds fresh assets and verifies built guidance. `check:package` verifies the complete shipped skill, strictly compiles the basic recipes without optional peers and every recipe with its required peers, and executes installed shell/resource-page and workflow checks.
439
446
 
440
- Build portable consumer documentation with `npm run build` followed by `npm run build:docs`. The generated [static entry](dist-docs/index.html) links to `dist-docs/2.0.5/` for the current version. Each version preserves the complete skill and all declaration files, supports search with the same finder, and uses relative links under any hosting subdirectory. Serve the entire artifact over HTTP; it needs no external CDN. Run `npm run check:static-docs` to check generated asset paths. The future hosting destination remains pending.
447
+ Build portable consumer documentation with `npm run build` followed by `npm run build:docs`. The generated [static entry](dist-docs/index.html) links to `dist-docs/2.0.6/` for the current version. Each version preserves the complete skill and all declaration files, supports search with the same finder, and uses relative links under any hosting subdirectory. Serve the entire artifact over HTTP; it needs no external CDN. Run `npm run check:static-docs` to check generated asset paths. The future hosting destination remains pending.
441
448
 
442
449
  `npm run check:agent` runs focused agent-consumption fixtures and built skill alignment. `npm run check:release` performs the real serial local build/package/browser/agent/static-documentation gate; it does not publish or deploy. `npm run check:quick` runs the everyday core (contract, lint, design lint, typecheck, unit tests, build). See the [release guide](docs/releasing.md) and [draft changelog](CHANGELOG.md). There is no hosted CI; every check runs locally, when you choose. These commands verify locally; publication and deployment remain separate actions.
443
450
 
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { useStrings as e } from "./lib/strings.js";
3
- import { t } from "./utils-B6kKb8jB.js";
4
- import { c as n } from "./typography-BQnine1k.js";
3
+ import { t } from "./utils-DhuoqFy4.js";
4
+ import { c as n } from "./typography-C7-YMW1S.js";
5
5
  import { t as r } from "./focus-recipes-B653VaLq.js";
6
6
  import { t as i } from "./motion-recipes-DitYv6P2.js";
7
- import { t as a } from "./structure-DuxKl954.js";
8
- import { t as o } from "./interaction-recipes-XR9ZpVYL.js";
7
+ import { t as a } from "./structure-DZJ2wbAU.js";
8
+ import { t as o } from "./interaction-recipes-4wZ2tvfb.js";
9
9
  import { t as s } from "./disclosure-panel-B0HFNZ9x.js";
10
- import { t as c } from "./icon-badge-DZF-YjQp.js";
10
+ import { t as c } from "./icon-badge-npxF1SLX.js";
11
11
  import * as l from "react";
12
12
  import { forwardRef as u } from "react";
13
13
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
@@ -78,7 +78,7 @@ var x = l.forwardRef(function({ className: e, children: i, ...a }, s) {
78
78
  let c = typeof i == "string" || typeof i == "number" || typeof i == "bigint";
79
79
  return /* @__PURE__ */ d(_, {
80
80
  ref: s,
81
- className: t("accordion-trigger--component min-h-action items-center gap-space-lg px-row-x py-row-y", `text-start text-inherit text-sm font-medium transition-colors ${o.rowHover} hover:no-underline`, `focus-visible:z-10 ${r.inset}`, e),
81
+ className: t("accordion-trigger--component min-h-action items-center gap-space-lg px-row-x py-row-y", `text-start text-inherit text-sm font-medium transition-colors ${o.rowHover} hover:no-underline`, "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50", `focus-visible:z-10 ${r.inset}`, e),
82
82
  ...a,
83
83
  children: c ? /* @__PURE__ */ d(n, {
84
84
  tag: "span",
@@ -205,4 +205,4 @@ function A({ iconStyle: e, icon: n, reserveSpace: r }) {
205
205
  //#endregion
206
206
  export { C as a, S as c, w as i, b as l, D as n, T as o, E as r, y as s, O as t, x as u };
207
207
 
208
- //# sourceMappingURL=accordion-B9MHG0cT.js.map
208
+ //# sourceMappingURL=accordion-0tQUZ20r.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion-0tQUZ20r.js","names":["Accordion","AccordionPrimitive","AccordionItem","AccordionTrigger","AccordionContent","Accordion","React","PrimitiveAccordion","PrimitiveAccordionItem","PrimitiveAccordionTrigger","PrimitiveAccordionContent","Accordion","Text","focusRecipes","motionRecipes","Stack","interactionRecipes","DisclosurePanelElement","IconBadge","React$1","Accordion$2","props","Accordion","cn","className","AccordionItem$1","AccordionTrigger$1","children","ChevronDownIcon","AccordionContent$1","panelProps","Accordion$1","AccordionItem","AccordionTrigger","isSimpleText","AccordionContent","ACCORDION_ROOT_VARIANT_CLASS","ACCORDION_ITEM_VARIANT_CLASS","ACCORDION_TRIGGER_BASE","ACCORDION_CONTENT_PADDING","defaultSmartAccordionStrings","SmartAccordion","forwardRef","stringsProp","strings","useStrings","hasIconColumn","iconStyle","items","item","contentPadding","triggerGridClass","onValueChange","next","variant","itemClassName","triggerClassName","SmartAccordionIcon","isSimpleContent","contentClassName","content","reserveSpace","icon"],"sources":["../src/components/ui/accordion.tsx","../src/components/base/accordion/accordion.tsx","../src/components/base/accordion/accordion-variants.ts","../src/components/base/accordion/accordion.strings.ts","../src/components/base/accordion/smart-accordion.tsx"],"sourcesContent":["import { DisclosurePanelElement } from './disclosure-panel';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\"\n\nimport { cn } from \"../../lib/utils\"\nimport { ChevronDownIcon } from \"lucide-react\"\n\nfunction Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"border-border accordion--component flex w-full flex-col border box-border overflow-hidden\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"border-border accordion-item--component border-b last:border-b-0\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: AccordionPrimitive.Trigger.Props) {\n return (\n <AccordionPrimitive.Header className=\"accordion-header m-0\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\"accordion-trigger--component flex w-full items-center justify-between border-0 bg-transparent outline-none cursor-pointer box-border\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon data-slot=\"accordion-trigger-icon\" className={cn(\"accordion-trigger--icon size-icon text-muted-foreground shrink-0 [[aria-expanded=true]_&]:rotate-180\", motionRecipes.chevron)} />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n render,\n ...props\n}: AccordionPrimitive.Panel.Props) {\n return (\n <AccordionPrimitive.Panel\n data-slot=\"accordion-content\"\n className={cn(\"accordion-content--component box-border text-inherit h-(--accordion-panel-height)\", motionRecipes.disclosure, className)}\n {...props}\n render={(panelProps, state) => <DisclosurePanelElement props={panelProps} state={state} render={render} heightVariable=\"--accordion-panel-height\" />}\n >\n {children}\n </AccordionPrimitive.Panel>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n\n","/**\n * Accordion — tokenized base wrapper around the shadcn/Base UI primitive.\n *\n * The internal primitive intentionally keeps shadcn's roomy defaults. This\n * public layer calibrates them for admin surfaces: radius tokens, 12px row\n * insets, density-aware vertical rhythm, quiet hover/focus treatments, and\n * matching trigger/content columns. Consumers retain the complete compound\n * API and can override any treatment with `className`.\n */\nimport * as React from 'react';\n\nimport {\n\tAccordion as PrimitiveAccordion,\n\tAccordionContent as PrimitiveAccordionContent,\n\tAccordionItem as PrimitiveAccordionItem,\n\tAccordionTrigger as PrimitiveAccordionTrigger,\n} from '../../ui/accordion';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nexport type AccordionProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordion>;\nexport type AccordionItemProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionItem>;\nexport type AccordionTriggerProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionTrigger>;\nexport type AccordionContentProps = React.ComponentPropsWithoutRef<typeof PrimitiveAccordionContent>;\n\nconst Accordion = React.forwardRef<React.ElementRef<typeof PrimitiveAccordion>, AccordionProps>(\n\tfunction Accordion({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<PrimitiveAccordion\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion--component rounded-surface border-border bg-card text-card-foreground',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAccordion.displayName = 'Accordion';\n\nconst AccordionItem = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionItem>, AccordionItemProps>(\n\tfunction AccordionItem({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<PrimitiveAccordionItem\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-item--component border-border',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAccordionItem.displayName = 'AccordionItem';\n\nconst AccordionTrigger = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionTrigger>, AccordionTriggerProps>(\n\tfunction AccordionTrigger({ className, children, ...props }, ref) {\n\t\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\t\treturn (\n\t\t\t<PrimitiveAccordionTrigger\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-trigger--component min-h-action items-center gap-space-lg px-row-x py-row-y',\n\t\t\t\t\t`text-start text-inherit text-sm font-medium transition-colors ${interactionRecipes.rowHover} hover:no-underline`,\n\t\t\t\t\t// Disabled governs expanding/collapsing. Dim only this trigger;\n\t\t\t\t\t// slotted panel controls and nested accordions own their own state.\n\t\t\t\t\t'disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50',\n\t\t\t\t\t// Inset: the shell clips its rounded corners, so an outer ring was cut off.\n\t\t\t\t\t`focus-visible:z-10 ${focusRecipes.inset}`,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText ? (\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</PrimitiveAccordionTrigger>\n\t\t);\n\t},\n);\nAccordionTrigger.displayName = 'AccordionTrigger';\n\nconst AccordionContent = React.forwardRef<React.ElementRef<typeof PrimitiveAccordionContent>, AccordionContentProps>(\n\tfunction AccordionContent({ className, children, ...props }, ref) {\n\t\tconst isSimpleText = typeof children === 'string' || typeof children === 'number' || typeof children === 'bigint';\n\t\treturn (\n\t\t\t<PrimitiveAccordionContent\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'accordion-content--component px-row-x pb-space-lg text-sm',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{isSimpleText ? (\n\t\t\t\t\t<Text tag=\"div\" size=\"inherit\" lineHeight=\"relaxed\" className=\"text-inherit\">\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Text>\n\t\t\t\t) : children}\n\t\t\t</PrimitiveAccordionContent>\n\t\t);\n\t},\n);\nAccordionContent.displayName = 'AccordionContent';\n\nexport {\n\tAccordion,\n\tAccordionItem,\n\tAccordionTrigger,\n\tAccordionContent,\n};\n","/**\n * Shared accordion-shell variant classes — used by both `SmartAccordion`\n * and any blocks surface that builds on `base/accordion` directly\n * (e.g. `blocks/onboarding/checklist`).\n *\n * Exported because two consumers already keep it in lockstep; a third\n * one will copy this exact map. Centralising means a future tweak\n * (e.g. tighten `card` items to `border-border/70`) propagates.\n *\n * Padding tokens for trigger / content live alongside so the rhythm\n * is shared too:\n *\n * - Trigger: `gap-space-lg px-row-x py-row-y` — density-driven,\n * `<UIProvider>`\n * override flows through.\n * - Content padding accounts for the base panel's `px-row-x`.\n * Medallion and inline rows use shared media/spacing tokens, and\n * no-icon rows add no extra left padding so body copy tracks the\n * trigger text column instead of drifting.\n */\nimport type { DisclosureSurface } from '../../../lib/component-vocabulary';\n\nexport type AccordionShellVariant = DisclosureSurface;\n\n// Flat sits inside a surface that already owns the inset. It outdents by the row\n// inset, so trigger and panel text align with that surface's content edge while\n// the hover fill and focus edge keep their room in the surface gutter.\nexport const ACCORDION_ROOT_VARIANT_CLASS: Record<AccordionShellVariant, string> = {\n\tcard: 'gap-space-md border-0 rounded-none bg-transparent text-inherit overflow-visible',\n\tbordered: 'rounded-surface border border-border bg-card text-card-foreground overflow-hidden',\n\tflat: '-mx-row-x w-auto border-0 rounded-none bg-transparent text-inherit overflow-visible',\n};\n\n// The chevron and the revealed panel carry the open state; an open item is not\n// tinted into a box. Rounded items clip their trigger so its inset focus ring and\n// hover fill follow the item's corners.\nexport const ACCORDION_ITEM_VARIANT_CLASS: Record<AccordionShellVariant, string> = {\n\tcard: 'border border-border bg-card text-card-foreground rounded-surface overflow-hidden',\n\tbordered: 'bg-transparent not-last:border-b border-border',\n\tflat: 'border-0 not-last:border-b-0 bg-transparent rounded-surface overflow-hidden',\n};\n\nexport const ACCORDION_TRIGGER_BASE =\n\t'items-center gap-space-lg px-row-x py-row-y text-start hover:no-underline';\n\n/**\n * Content-padding presets keyed off the leading-icon width. Use\n * `withMedallion` when the trigger renders a default `IconBadge`\n * plus the shared row gap so body text aligns under the title at every\n * consumer density.\n */\nexport const ACCORDION_CONTENT_PADDING = {\n\t// Composed from root tokens so a scoped density/space boundary applies (the\n\t// `--spacing-*` aliases resolve once at :root inside arbitrary values).\n\twithMedallion: 'ps-[calc(var(--row-x)*var(--space-scale)+var(--avatar)+0.75rem*var(--space-scale))] pe-row-x pt-0',\n\twithInline: 'ps-[calc(var(--row-x)*var(--space-scale)+var(--icon)*1.25+0.75rem*var(--space-scale))] pe-row-x pt-0',\n\twithoutIcon: 'px-row-x pt-0',\n} as const;\n","/**\n * Strings for `SmartAccordion`. There aren't many — Radix handles the\n * trigger ARIA states automatically, so the only library-owned copy is\n * the optional landmark label on the wrapping nav region. Consumers\n * override per-item `title` / `badge` / `content` directly via\n * `SmartAccordionItem` props (the strings live in the data, not here).\n */\nexport interface SmartAccordionStrings {\n\t/**\n\t * Sets `aria-label` on the wrapping element so screen readers can name\n\t * the accordion region. Optional — when absent, no aria-label is set.\n\t */\n\tregionAriaLabel?: string;\n}\n\nexport const defaultSmartAccordionStrings: SmartAccordionStrings = {\n\tregionAriaLabel: undefined,\n};\n","/**\n * SmartAccordion — the canonical \"icon + title + optional badge + body\"\n * accordion pattern, with three visual variants for the surface chrome\n * (`card` | `bordered` | `flat`) and three icon framings (`medallion` |\n * `inline` | `none`).\n *\n * Composes the wrapped `base/accordion` parts (rule 2 — blocks-style\n * convenience built from re-exports, not the raw shadcn primitive).\n *\n * For richer rows (multi-line metadata, custom layouts), drop down to\n * the compound API:\n *\n * import { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n * from '.';\n */\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { IconBadge } from '../display/icon-badge';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion';\nimport {\n\tACCORDION_CONTENT_PADDING,\n\tACCORDION_ITEM_VARIANT_CLASS,\n\tACCORDION_ROOT_VARIANT_CLASS,\n\tACCORDION_TRIGGER_BASE,\n} from './accordion-variants';\nimport { defaultSmartAccordionStrings } from './accordion.strings';\nimport type {\n\tSmartAccordionIconStyle,\n\tSmartAccordionProps,\n} from './accordion.types';\n\n/**\n * Bounded accordion composition for repeated icon, title, description, badge,\n * and body sections. Use the compound Accordion parts when row structure or\n * per-item presentation differs.\n */\nexport const SmartAccordion = forwardRef<HTMLDivElement, SmartAccordionProps>(function SmartAccordion({\n\titems,\n\tmultiple = false,\n\tdefaultValue,\n\tvalue,\n\tonValueChange,\n\tvariant = 'bordered',\n\ticonStyle = 'inline',\n\tclassName,\n\titemClassName,\n\ttriggerClassName,\n\tcontentClassName,\n\tstrings: stringsProp,\n}, ref) {\n\tconst strings = useStrings(defaultSmartAccordionStrings, stringsProp);\n\tconst hasIconColumn = iconStyle !== 'none' && items.some((item) => item.icon != null);\n\tconst contentPadding =\n\t\t!hasIconColumn\n\t\t\t? ACCORDION_CONTENT_PADDING.withoutIcon\n\t\t\t: iconStyle === 'medallion'\n\t\t\t? ACCORDION_CONTENT_PADDING.withMedallion\n\t\t\t: ACCORDION_CONTENT_PADDING.withInline;\n\tconst triggerGridClass = !hasIconColumn\n\t\t? 'grid-cols-[minmax(0,1fr)]'\n\t\t: 'grid-cols-[auto_minmax(0,1fr)]';\n\treturn (\n\t\t<Accordion\n\t\t\tref={ref}\n\t\t\tmultiple={multiple}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tvalue={value}\n\t\t\tonValueChange={\n\t\t\t\tonValueChange\n\t\t\t\t\t? (next) => onValueChange(next as string[])\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-label={strings.regionAriaLabel}\n\t\t\tdata-variant={variant}\n\t\t\tdata-icon-style={iconStyle}\n\t\t\tclassName={cn('smart-accordion--component', ACCORDION_ROOT_VARIANT_CLASS[variant], className)}\n\t\t>\n\t\t\t{items.map((item) => (\n\t\t\t\t<AccordionItem\n\t\t\t\t\tkey={item.value}\n\t\t\t\t\tvalue={item.value}\n\t\t\t\t\tclassName={cn('smart-accordion--item', ACCORDION_ITEM_VARIANT_CLASS[variant], itemClassName)}\n\t\t\t\t>\n\t\t\t\t\t<AccordionTrigger\n\t\t\t\t\t\tclassName={cn('smart-accordion--trigger', ACCORDION_TRIGGER_BASE, triggerClassName)}\n\t\t\t\t\t\tdisabled={item.disabled}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className={cn('grid min-w-0 flex-1 items-center gap-x-space-lg', triggerGridClass)}>\n\t\t\t\t\t\t\t<SmartAccordionIcon\n\t\t\t\t\t\t\t\ticonStyle={iconStyle}\n\t\t\t\t\t\t\t\ticon={item.icon}\n\t\t\t\t\t\t\t\treserveSpace={hasIconColumn}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Stack render={<span />} gap=\"dense\" className=\"smart-accordion--heading flex-1\">\n\t\t\t\t\t\t\t\t<span className=\"flex min-w-0 flex-wrap items-center gap-x-space-md gap-y-space-xs\">\n\t\t\t\t\t\t\t\t\t{isSimpleContent(item.title) ? (\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"inherit\" weight=\"semibold\" className=\"smart-accordion--title min-w-0\">\n\t\t\t\t\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : item.title}\n\t\t\t\t\t\t\t\t\t{item.badge != null && (\n\t\t\t\t\t\t\t\t\t\t<span className=\"smart-accordion--badge inline-flex shrink-0\">{item.badge}</span>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{!!item.description && (\n\t\t\t\t\t\t\t\t\tisSimpleContent(item.description) ? (\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"secondary\" className=\"smart-accordion--description min-w-0\">\n\t\t\t\t\t\t\t\t\t\t\t{item.description}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : item.description\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</AccordionTrigger>\n\t\t\t\t\t<AccordionContent\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'smart-accordion--content',\n\t\t\t\t\t\t\tcontentPadding,\n\t\t\t\t\t\t\tcontentClassName,\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isSimpleContent(item.content) ? (\n\t\t\t\t\t\t\t<Text tag=\"div\" type=\"secondary\" lineHeight=\"relaxed\">\n\t\t\t\t\t\t\t\t{item.content}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : item.content}\n\t\t\t\t\t</AccordionContent>\n\t\t\t\t</AccordionItem>\n\t\t\t))}\n\t\t</Accordion>\n\t);\n});\n\nSmartAccordion.displayName = 'SmartAccordion';\n\nfunction isSimpleContent(content: ReactNode): content is string | number | bigint {\n\treturn typeof content === 'string' || typeof content === 'number' || typeof content === 'bigint';\n}\n\nfunction SmartAccordionIcon({\n\ticonStyle,\n\ticon,\n\treserveSpace,\n}: {\n\ticonStyle: SmartAccordionIconStyle;\n\ticon?: ReactNode;\n\treserveSpace: boolean;\n}) {\n\tif (iconStyle === 'none' || !reserveSpace) return null;\n\tif (!icon) {\n\t\treturn (\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'smart-accordion--icon inline-flex shrink-0',\n\t\t\t\t\ticonStyle === 'inline' ? 'size-icon-lg' : 'size-avatar',\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t}\n\tif (iconStyle === 'inline') {\n\t\treturn (\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"smart-accordion--icon inline-flex size-icon-lg shrink-0 self-center text-muted-foreground [&>svg]:size-icon\"\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t);\n\t}\n\treturn (\n\t\t<IconBadge size=\"md\" tone=\"neutral\" shape=\"circle\" aria-hidden=\"true\" className=\"smart-accordion--icon self-center\">\n\t\t\t{icon}\n\t\t</IconBadge>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,SAASA,EAAU,EAAE,cAAW,GAAGqB,KAAwC;CACzE,OACE,kBAACpB,EAAmB,MAApB;EACE,aAAU;EACV,WAAWsB,EAAG,6FAA6FC,CAAS;EACpH,GAAIH;CACL,CAAA;AAEL;AAEA,SAASnB,EAAc,EAAE,cAAW,GAAGmB,KAAwC;CAC7E,OACE,kBAACpB,EAAmB,MAApB;EACE,aAAU;EACV,WAAWsB,EAAG,oEAAoEC,CAAS;EAC3F,GAAIH;CACL,CAAA;AAEL;AAEA,SAASlB,EAAiB,EACxB,cACA,aACA,GAAGkB,KACgC;CACnC,OACE,kBAACpB,EAAmB,QAApB;EAA2B,WAAU;EACnC,UAAA,kBAACA,EAAmB,SAApB;GACE,aAAU;GACV,WAAWsB,EAAG,wIAAwIC,CAAS;GAC/J,GAAIH;GAHN,UAAA,CAKGM,GACD,kBAACC,GAAD;IAAiB,aAAU;IAAyB,WAAWL,EAAG,wGAAwGT,EAAc,OAAO;GAAI,CAAA,CACzK;;CACH,CAAA;AAE/B;AAEA,SAASV,EAAiB,EACxB,cACA,aACA,WACA,GAAGiB,KAC8B;CACjC,OACE,kBAACpB,EAAmB,OAApB;EACE,aAAU;EACV,WAAWsB,EAAG,qFAAqFT,EAAc,YAAYU,CAAS;EACtI,GAAIH;EACJ,SAAS,GAAY,MAAU,kBAACJ,GAAD;GAAwB,OAAOa;GAAmB;GAAe;GAAQ,gBAAe;EAA4B,CAAA;EAElJ;CACuB,CAAA;AAE9B;;;ACnCA,IAAMzB,IAAYC,EAAM,WACvB,SAAmB,EAAE,cAAW,GAAGe,KAAS,GAAK;CAChD,OACC,kBAACd,GAAD;EACM;EACL,WAAWgB,EACV,mFACAC,CACD;EACA,GAAIH;CACJ,CAAA;AAE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AC,QAAD;QAAM,WAAU;QAA+C,UAAAA,EAAK;OAAY,CAAA,CAE5E;MACL,CAAA,GAAA,CAAC,CAACA,EAAK,gBACPS,EAAgBT,EAAK,WAAW,IAC/B,kBAACrC,GAAD;OAAM,KAAI;OAAO,MAAK;OAAY,WAAU;OAC1C,UAAAqC,EAAK;MACD,CAAA,IACHA,EAAK,YAEJ;KACH,CAAA,CAAA;;GACY,CAAA,GAClB,kBAACd,GAAD;IACC,WAAWZ,EACV,4BACA2B,GACAS,CACD;IAEC,UAAAD,EAAgBT,EAAK,OAAO,IAC5B,kBAACrC,GAAD;KAAM,KAAI;KAAM,MAAK;KAAY,YAAW;KAC1C,UAAAqC,EAAK;IACD,CAAA,IACHA,EAAK;GACQ,CAAA,CACJ;EAhDT,GAAAA,EAAK,KAgDI,CACf;CACS,CAAA;AAEb,CAAC;AAED,EAAe,cAAc;AAE7B,SAASS,EAAgB,GAAyD;CACjF,OAAO,OAAOE,KAAY,YAAY,OAAOA,KAAY,YAAY,OAAOA,KAAY;AACzF;AAEA,SAASH,EAAmB,EAC3B,cACA,SACA,mBAKE;CAuBF,OAtBIV,MAAc,UAAU,CAACc,IAAqB,OAC7CC,IAWDf,MAAc,WAEhB,kBAAC,QAAD;EACC,eAAY;EACZ,WAAU;EAET,UAAAe;CACI,CAAA,IAIP,kBAAC5C,GAAD;EAAW,MAAK;EAAK,MAAK;EAAU,OAAM;EAAS,eAAY;EAAO,WAAU;EAC9E,UAAA4C;CACS,CAAA,IAtBV,kBAAC,QAAD;EACC,eAAY;EACZ,WAAWvC,EACV,8CACAwB,MAAc,WAAW,iBAAiB,aAC3C;CACA,CAAA;AAkBJ"}
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { S as e, d as t } from "./ui-provider-C-74NVLc.js";
3
3
  import { useStrings as n } from "./lib/strings.js";
4
- import { t as r } from "./utils-B6kKb8jB.js";
5
- import { n as i } from "./buttons-BedGfygC.js";
6
- import { c as a } from "./typography-BQnine1k.js";
4
+ import { t as r } from "./utils-DhuoqFy4.js";
5
+ import { n as i } from "./buttons-DeW0bQeK.js";
6
+ import { c as a } from "./typography-C7-YMW1S.js";
7
7
  import { t as o } from "./composition.recipes-COdiFhxB.js";
8
- import { i as s, t as c } from "./popover.recipes-DdiEp0rd.js";
9
- import { t as l } from "./collection-content-gDh1v6O4.js";
10
- import { a as u, d, g as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dropdown-menu-CLs8Lihj.js";
8
+ import { i as s, t as c } from "./popover.recipes-DJ0AkUan.js";
9
+ import { t as l } from "./collection-content-CSnwtOTH.js";
10
+ import { a as u, d, g as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dropdown-menu-C08iIugv.js";
11
11
  import y, { isValidElement as b } from "react";
12
12
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
13
13
  import { MoreHorizontal as w } from "lucide-react";
@@ -281,4 +281,4 @@ R.displayName = "ActionButtons";
281
281
  //#endregion
282
282
  export { L as n, E as r, R as t };
283
283
 
284
- //# sourceMappingURL=action-menu-Dr8K-ghE.js.map
284
+ //# sourceMappingURL=action-menu-C0gjzLyE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-menu-Dr8K-ghE.js","names":["Icon","_Fragment","_jsx","resolveComponentScale","useDensityConfig","cn","Button","Text","compositionClasses","popoverWidthRecipes","collectionRecipes","CollectionContent","DropdownMenuItem","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuCheckboxItem","DropdownMenuLabel","DropdownMenuContent","DropdownMenuLinkItem","DropdownMenu","React","Fragment$1","overflowTriggerRecipes","MoreHorizontal","defaultActionMenuStrings","isDestructiveAction","action","resolveActions","visible","actions","preserveOrder","standard","destructive","getActionKey","index","renderActionIcon","icon","isValidElement","renderActionLabel","label","className","toMenuVariant","tone","toButtonPresentation","buttonStyle","renderMenuAction","key","shouldCloseOnSelect","closeOnSelect","content","density","href","renderLink","props","renderGroupedActions","nodes","currentGroup","args","nextGroup","groupChanged","DropdownMenuSeparator","assignRef","ref","node","ActionMenu","controlledOpen","stringsProp","uncontrolledOpen","setUncontrolledOpen","open","strings","useStrings","resolvedSrText","srText","resolvedActions","hasVisibleLabel","labelVisibility","hasResponsiveLabel","recipe","context","requestedSize","buttonProps","defaultScale","squareClass","defaultButtonProps","triggerClassName","triggerProps","labelClassName","triggerIcon","buttonContent","onOpenChange","nextOpen","details","renderTrigger","baseTriggerRef","dropdownTriggerProps","composedRef","width","contentClassName","ActionButtons","visibleActions","resolved","children","size","buttonClassName","buttonRenderProps"],"sources":["../src/components/base/action-menu/action-menu.recipes.ts","../src/components/base/action-menu/action-menu.strings.ts","../src/components/base/action-menu/action-menu.tsx"],"sourcesContent":["/**\n * Overflow trigger recipe — the one `⋯` square every overflow menu shares.\n *\n * The glyph and the default \"More actions\" name are fixed. `context` picks the\n * treatment for where the menu sits, and the square takes the size of the\n * controls beside it (`buttonProps.size`) or the provider scale, like every\n * other Button. A menu that shares a row with a primary command ends that row.\n */\nimport { MoreHorizontal } from 'lucide-react';\n\n/**\n * Where an overflow menu sits. `inline` is the quiet ghost square for rows,\n * cards, list items and footers; `commands` is the outline square that ends a\n * row of outline commands, such as a page header or toolbar.\n */\nexport type ActionMenuContext = 'inline' | 'commands';\n\nexport const overflowTriggerRecipes = {\n\ticon: MoreHorizontal,\n\tcontext: {\n\t\t// No fill until hover, and a muted glyph that does not compete with the content.\n\t\tinline: { tone: 'secondary', buttonStyle: 'ghost', glyph: 'text-muted-foreground' },\n\t\t// The commands' own boundary and ink.\n\t\tcommands: { tone: 'secondary', buttonStyle: 'outline', glyph: undefined },\n\t},\n} as const;\n","export interface ActionMenuStrings {\n\topenMenuLabel: string;\n}\n\nexport const defaultActionMenuStrings: ActionMenuStrings = {\n\topenMenuLabel: 'More actions',\n};\n","/**\n * ActionMenu — centralized action chrome for page, card, table, and row\n * overflow menus.\n *\n * Primary API is definition-driven: pass `actions={[...]}` and the component\n * renders the trigger, menu surface, grouping, checkbox rows, destructive\n * separation, links, disabled state, and density. `ActionButtons` renders the\n * same definitions as inline buttons for page/toolbars that need visible\n * actions plus an overflow menu.\n *\n * Without a visible `label` the trigger is the shared overflow square from\n * `action-menu.recipes.ts`: a `⋯` glyph named \"More actions\", ghost `inline`\n * or outline `commands`, at the size of the controls beside it or the\n * provider scale.\n */\nimport type { LucideIcon } from 'lucide-react';\nimport React, { isValidElement, type ComponentType, type ElementType, type ReactElement, type ReactNode } from 'react';\n\nimport { Button, type ButtonSize, type ButtonStyle } from '../buttons';\nimport { compositionClasses } from '../structure/composition.recipes';\nimport { collectionRecipes, popoverWidthRecipes, type CollectionDensity } from '../popover/popover.recipes';\nimport { CollectionContent } from '../popover/collection-content';\nimport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuLinkItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from '../navigation/dropdown-menu';\nimport { Text } from '../../typography';\nimport type { ActionButtonStyle, ActionPresentation } from '../../../lib/action-presentation';\nimport { resolveComponentScale, useDensityConfig } from '../../../lib/ui-provider';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { overflowTriggerRecipes, type ActionMenuContext } from './action-menu.recipes';\nimport {\n\tdefaultActionMenuStrings,\n\ttype ActionMenuStrings,\n} from './action-menu.strings';\n\ntype ActionMenuButtonProps = Partial<React.ComponentPropsWithoutRef<typeof Button>> & {\n\t[key: `data-${string}`]: string | boolean | undefined;\n\t'aria-label'?: string;\n\tonPointerDown?: React.PointerEventHandler<HTMLButtonElement>;\n};\nexport type ActionMenuDensity = CollectionDensity | 'table';\nexport type ActionMenuLabelVisibility = 'visible' | 'responsive' | 'hidden';\nexport interface ActionMenuLinkRenderProps extends React.ComponentPropsWithoutRef<'a'> {\n\thref: string;\n\tdisabled?: boolean;\n\texternal?: boolean;\n}\n\nexport type ActionMenuIcon = LucideIcon | ComponentType<{ className?: string }> | ReactNode;\n\nexport interface ActionMenuAction extends ActionPresentation {\n\t/** Stable React key. Falls back to a string `label`, then the index. */\n\tid?: string;\n\t/** Visible label for the entry. */\n\tlabel: ReactNode;\n\t/** Leading glyph. Accepts a Lucide icon, a component, or a rendered node. */\n\ticon?: ActionMenuIcon;\n\t/** `'checkbox'` renders a toggle driven by `checked`/`onCheckedChange`. Defaults to `'item'`. */\n\ttype?: 'item' | 'checkbox';\n\t/**\n\t * Renders the entry as a link. By default this is a native `<a href>`, so it\n\t * performs a full page navigation; pass `renderLink` on `ActionMenu` to route\n\t * it through your framework's router instead.\n\t */\n\thref?: string;\n\t/** Anchor target forwarded to the rendered link. Requires `href`. */\n\ttarget?: string;\n\t/** Anchor rel forwarded to the rendered link. Requires `href`. */\n\trel?: string;\n\t/** Marks the destination as leaving the app; forwarded to `renderLink`. */\n\texternal?: boolean;\n\t/** Runs when the entry is chosen. This is the handler for a normal item. */\n\tonClick?: () => void;\n\t/** Checked state for a `'checkbox'` entry. */\n\tchecked?: boolean;\n\t/** Fires with the next checked state for a `'checkbox'` entry. */\n\tonCheckedChange?: (checked: boolean) => void;\n\t/**\n\t * Starts a new group, drawing a separator above this entry. A string also\n\t * captions the group; `true` rules off without a heading, for the common\n\t * case of holding one entry apart (a sign-out, a delete) with no label to\n\t * write.\n\t */\n\tgroup?: string | true;\n\t/** Class merged onto this group's starting separator/caption, for example a responsive boundary. Does not style or hide the action rows. */\n\tgroupClassName?: string;\n\t/** Overrides the button size when the action renders as a button. */\n\tbuttonSize?: ButtonSize;\n\t/** Escape hatch merged onto the entry root. */\n\tclassName?: string;\n\t/** Escape hatch merged onto the entry's inner content. */\n\tcontentClassName?: string;\n\t/** Overrides the menu's `closeOnSelect` for this entry. */\n\tcloseOnSelect?: boolean;\n\t/** Replaces the rendered entry, e.g. to emit a framework `<Link>`. */\n\trender?: ReactNode;\n}\n\nexport interface ActionMenuProps {\n\t/** Controlled menu visibility. Omit to let the menu manage its own state. */\n\topen?: boolean;\n\t/** Reports native menu open/close requests, including their event details. */\n\tonOpenChange?: React.ComponentProps<typeof DropdownMenu>['onOpenChange'];\n\t/** Native focus destination when the menu closes; defaults to its trigger. */\n\tfinalFocus?: React.ComponentProps<typeof DropdownMenuContent>['finalFocus'];\n\t/**\n\t * Commands to offer. Destructive entries are moved last unless\n\t * `preserveOrder` is set.\n\t */\n\tactions: readonly ActionMenuAction[];\n\t/** Trigger text. Omit for the shared icon-only overflow trigger, and set `srText` to name it. */\n\tlabel?: string;\n\t/** Trigger glyph. Defaults to the horizontal ellipsis (`MoreHorizontal`) every overflow menu shares. */\n\ticon?: ActionMenuIcon;\n\t/** Accessible name when the trigger shows no visible `label`. Defaults to `strings.openMenuLabel`, \"More actions\". */\n\tsrText?: string;\n\t/**\n\t * Where the menu sits, which picks the trigger treatment. `inline` (the\n\t * default) is the quiet ghost square for rows, cards and footers; `commands`\n\t * is the outline square that ends a row of outline commands. Place the menu\n\t * after any primary command in the same row.\n\t */\n\tcontext?: ActionMenuContext;\n\t/**\n\t * Escape hatch forwarded to the trigger button. An icon-only trigger takes\n\t * `size` from here to match the controls beside it, otherwise the provider\n\t * scale.\n\t */\n\tbuttonProps?: ActionMenuButtonProps;\n\t/** Menu alignment against the trigger. Defaults to `end`. */\n\talign?: 'center' | 'start' | 'end';\n\t/** Which edge of the trigger the menu opens from. Defaults to `bottom`. */\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\t/** Merged onto the menu surface. */\n\tcontentClassName?: string;\n\t/** Fixed menu width. Defaults to sizing from the widest item. */\n\twidth?: string;\n\t/** Closes the menu after an action runs. Defaults to `true`. */\n\tcloseOnSelect?: boolean;\n\t/** Vertical row rhythm; table preserves the legacy tight action spacing. Inline room stays stable. */\n\tdensity?: ActionMenuDensity;\n\t/** Whether the trigger's `label` is visible, hidden, or responsive. */\n\tlabelVisibility?: ActionMenuLabelVisibility;\n\t/** Preserve incoming action order instead of moving destructive items last. */\n\tpreserveOrder?: boolean;\n\t/**\n\t * Renders actions carrying an `href` through the consumer's router, keeping\n\t * this component framework-agnostic. Without it, such actions render as\n\t * plain anchors.\n\t */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n\t/**\n\t * Replaces the default trigger button entirely, so a menu can hang off a\n\t * shape that is not a button with a glyph — an account block, a sidebar\n\t * row, a tab that has to match its siblings.\n\t *\n\t * Takes Base UI's `render` contract: either an element, whose props are\n\t * merged for you, or a function receiving the props to spread. Either way\n\t * the ARIA wiring, the open/close handlers and the popup's anchor ref reach\n\t * a real DOM node without anyone cloning anything.\n\t *\n\t * For a plain button that just needs different words or a different glyph,\n\t * `label`, `icon` and `buttonProps` are the smaller tools; reach for this\n\t * only when the trigger is a different thing.\n\t */\n\trenderTrigger?: React.ComponentProps<typeof DropdownMenuTrigger>['render'];\n\t/** Overrides the menu's own copy (the default trigger label). */\n\tstrings?: StringsProp<ActionMenuStrings>;\n}\n\nexport interface ActionButtonsProps {\n\t/**\n\t * Commands to render side by side rather than collapsed into a menu. Each\n\t * resolves like `Button`: untoned actions are the default outline button and\n\t * a `tone` without `buttonStyle` is solid, so mark the main command\n\t * `tone: 'primary'`.\n\t */\n\tactions: readonly ActionMenuAction[];\n\t/** Merged onto the button group. */\n\tclassName?: string;\n\t/** Merged onto every button in the group. */\n\tbuttonClassName?: string;\n\t/** Height preset applied to each button. */\n\tsize?: ButtonSize;\n\t/** Renders actions carrying an `href` through the consumer's router. */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}\n\nfunction isDestructiveAction(action: ActionMenuAction) {\n\treturn action.tone === 'destructive';\n}\n\nfunction resolveActions(actions: readonly ActionMenuAction[], preserveOrder = false) {\n\tconst visible = actions.filter((action) => action.visible !== false);\n\tif (preserveOrder) return visible;\n\n\tconst standard = visible.filter((action) => !isDestructiveAction(action));\n\tconst destructive = visible.filter(isDestructiveAction);\n\treturn [...standard, ...destructive];\n}\n\nfunction getActionKey(action: ActionMenuAction, index: number) {\n\treturn action.id ?? (typeof action.label === 'string' ? action.label : `action-${index}`);\n}\n\nfunction renderActionIcon(icon: ActionMenuAction['icon']) {\n\tif (!icon) return null;\n\tif (isValidElement(icon)) return icon;\n\tif (typeof icon === 'function') {\n\t\tconst Icon = icon as LucideIcon;\n\t\treturn <Icon className=\"size-icon-sm\" aria-hidden=\"true\" />;\n\t}\n\tif (typeof icon === 'object' && icon !== null && '$$typeof' in icon) {\n\t\tconst Icon = icon as unknown as ElementType<{ className?: string; 'aria-hidden'?: boolean }>;\n\t\treturn <Icon className=\"size-icon-sm\" aria-hidden />;\n\t}\n\treturn icon;\n}\n\nfunction renderActionLabel(label: ReactNode, className?: string) {\n\tif (typeof label === 'string' || typeof label === 'number' || typeof label === 'bigint') {\n\t\t// Same label recipe as Button: inherited size, medium weight.\n\t\treturn <Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className={cn('text-inherit', className)}>{label}</Text>;\n\t}\n\treturn className ? <span className={className}>{label}</span> : label;\n}\n\nfunction toMenuVariant(tone: ActionMenuAction['tone']): 'default' | 'destructive' {\n\treturn tone === 'destructive' ? 'destructive' : 'default';\n}\n\n/**\n * Inline actions resolve exactly like `Button`: an untoned action is the neutral\n * default button, and a tone without a style asks for that tone's solid treatment.\n * Mark the one main command with `tone: 'primary'`.\n */\nfunction toButtonPresentation(action: Pick<ActionMenuAction, 'tone' | 'buttonStyle'>): {\n\ttone?: ActionMenuAction['tone'];\n\tbuttonStyle?: ButtonStyle;\n\tclassName?: string;\n} {\n\tconst buttonStyle: ActionButtonStyle | undefined = action.buttonStyle;\n\tif (buttonStyle === 'link') {\n\t\treturn {\n\t\t\ttone: action.tone,\n\t\t\tbuttonStyle: 'ghost',\n\t\t\tclassName: 'underline underline-offset-[0.2em]',\n\t\t};\n\t}\n\treturn { tone: action.tone, buttonStyle };\n}\n\nfunction renderMenuAction({\n\taction,\n\tindex,\n\tdensity,\n\tcloseOnSelect,\n\trenderLink,\n}: {\n\taction: ActionMenuAction;\n\tindex: number;\n\tdensity: ActionMenuDensity;\n\tcloseOnSelect: boolean;\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}) {\n\tconst key = getActionKey(action, index);\n\tconst shouldCloseOnSelect = action.closeOnSelect ?? closeOnSelect;\n\tif (action.render) {\n\t\treturn <div key={key} className=\"action-menu--item\">{action.render}</div>;\n\t}\n\n\tconst icon = renderActionIcon(action.icon);\n\tconst content = (\n\t\t<CollectionContent label={action.label} leading={icon} wrap\n\t\t className={cn('action-menu--item-content w-full',action.contentClassName)}\n\t\t leadingClassName=\"action-menu--item-icon text-inherit\" labelClassName=\"action-menu--item-label\"/>\n\t);\n\tconst className = cn(\n\t\t'action-menu--item',\n\t\tdensity === 'table' && collectionRecipes.tableRow,\n\t\taction.className,\n\t);\n\tif (action.type === 'checkbox') {\n\t\treturn (\n\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\tkey={key}\n\t\t\t\tchecked={!!action.checked}\n\t\t\t\tdisabled={action.disabled}\n\t\t\t\tcloseOnClick={shouldCloseOnSelect}\n\t\t\t\tonCheckedChange={action.onCheckedChange}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuCheckboxItem>\n\t\t);\n\t}\n\n\tif (action.href && !action.disabled) {\n\t\tconst href = action.href;\n\t\treturn (\n\t\t\t<DropdownMenuLinkItem\n\t\t\t\tkey={key}\n\t\t\t\thref={href}\n\t\t\t\tvariant={toMenuVariant(action.tone)}\n\t\t\t\tcloseOnClick={shouldCloseOnSelect}\n\t\t\t\tonClick={action.onClick}\n\t\t\t\t// Element form, not a function, when the consumer supplies a link\n\t\t\t\t// renderer. The function form hands the menu-item props to the\n\t\t\t\t// consumer and trusts them to spread — and the renderer people\n\t\t\t\t// actually write destructures href/children/className and drops the\n\t\t\t\t// rest, which silently costs the row its `role=\"menuitem\"`. Handing\n\t\t\t\t// back an element lets the menu merge its own props on afterwards,\n\t\t\t\t// so a narrow renderer stays accessible.\n\t\t\t\trender={\n\t\t\t\t\trenderLink\n\t\t\t\t\t\t? (renderLink({\n\t\t\t\t\t\t\thref,\n\t\t\t\t\t\t\tchildren: content,\n\t\t\t\t\t\t\ttarget: action.target,\n\t\t\t\t\t\t\trel: action.rel,\n\t\t\t\t\t\t\texternal: action.external,\n\t\t\t\t\t\t\tdisabled: action.disabled,\n\t\t\t\t\t\t}) as ReactElement)\n\t\t\t\t\t\t: (props) => (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\thref={href}\n\t\t\t\t\t\t\t\ttarget={action.target}\n\t\t\t\t\t\t\t\trel={action.rel}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuLinkItem>\n\t\t);\n\t}\n\n\treturn (\n\t\t<DropdownMenuItem\n\t\tkey={key}\n\t\tdisabled={action.disabled}\n\t\tvariant={toMenuVariant(action.tone)}\n\t\tcloseOnClick={shouldCloseOnSelect}\n\t\tonClick={action.onClick}\n\t\tclassName={className}\n\t\t>\n\t\t\t{content}\n\t\t</DropdownMenuItem>\n\t);\n}\n\nfunction renderGroupedActions(args: {\n\tactions: readonly ActionMenuAction[];\n\tdensity: ActionMenuDensity;\n\tcloseOnSelect: boolean;\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}) {\n\tconst nodes: ReactNode[] = [];\n\tlet currentGroup: string | true | null = null;\n\n\targs.actions.forEach((action, index) => {\n\t\tconst nextGroup = action.group ?? null;\n\t\tconst groupChanged = nextGroup !== currentGroup;\n\n\t\tif (nodes.length > 0 && groupChanged) {\n\t\t\tnodes.push(<DropdownMenuSeparator key={`sep-${currentGroup ?? 'root'}-${nextGroup ?? 'root'}-${index}`} className={action.groupClassName} />);\n\t\t}\n\n\t\tif (groupChanged) {\n\t\t\tcurrentGroup = nextGroup;\n\t\t\tif (typeof nextGroup === 'string') {\n\t\t\t\tnodes.push(\n\t\t\t\t\t<DropdownMenuLabel\n\t\t\t\t\t\tkey={`group-${nextGroup}-${index}`}\n\t\t\t\t\t\tclassName={cn('normal-case', action.groupClassName)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{nextGroup}\n\t\t\t\t\t</DropdownMenuLabel>,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tnodes.push(renderMenuAction({ ...args, action, index }));\n\t});\n\n\treturn nodes;\n}\n\n/**\n * Writes a node into a ref of either shape. `ActionMenu` has two claims on its\n * trigger — Base UI's own anchor ref and the consumer's — so neither may\n * overwrite the other.\n */\nfunction assignRef<T>(ref: React.Ref<T> | undefined, node: T | null) {\n\tif (typeof ref === 'function') {\n\t\tref(node);\n\t} else if (ref) {\n\t\t(ref as React.RefObject<T | null>).current = node;\n\t}\n}\n\nexport const ActionMenu = React.forwardRef<HTMLButtonElement, ActionMenuProps>(function ActionMenu({\n\tactions,\n\topen: controlledOpen,\n\tonOpenChange,\n\tfinalFocus,\n\tlabel,\n\ticon = overflowTriggerRecipes.icon,\n\tsrText,\n\tcontext = 'inline',\n\tbuttonProps,\n\talign = 'end',\n\tside = 'bottom',\n\tcontentClassName = '',\n\twidth = 'w-auto',\n\tcloseOnSelect = true,\n\tdensity = 'default',\n\tlabelVisibility = 'visible',\n\tpreserveOrder = false,\n\trenderLink,\n\trenderTrigger,\n\tstrings: stringsProp,\n}: ActionMenuProps, ref) {\n\tconst [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);\n\tconst open = controlledOpen ?? uncontrolledOpen;\n\tconst { defaultScale } = useDensityConfig();\n\tconst strings = useStrings(defaultActionMenuStrings, stringsProp);\n\tconst resolvedSrText = srText ?? strings.openMenuLabel;\n\tconst resolvedActions = React.useMemo(\n\t\t() => resolveActions(actions, preserveOrder),\n\t\t[actions, preserveOrder],\n\t);\n\n\tif (resolvedActions.length === 0) return null;\n\tconst hasVisibleLabel = Boolean(label) && labelVisibility === 'visible';\n\tconst hasResponsiveLabel = Boolean(label) && labelVisibility === 'responsive';\n\n\t// The icon-only square takes the size of the controls beside it\n\t// (`buttonProps.size`), otherwise the provider scale like every other Button.\n\tconst recipe = overflowTriggerRecipes.context[context] ?? overflowTriggerRecipes.context.inline;\n\tconst requestedSize = hasVisibleLabel ? buttonProps?.size ?? 'sm' : resolveComponentScale(buttonProps?.size, defaultScale);\n\tconst squareClass = requestedSize === 'sm' ? 'size-action-sm' : requestedSize === 'lg' ? 'size-action-lg' : 'size-action';\n\tconst defaultButtonProps: ActionMenuButtonProps = {\n\t\ttone: recipe.tone,\n\t\tbuttonStyle: recipe.buttonStyle,\n\t\tsize: requestedSize,\n\t\ticonOnly: !hasVisibleLabel,\n\t\tclassName: hasVisibleLabel\n\t\t\t? undefined\n\t\t\t: hasResponsiveLabel\n\t\t\t\t? `${squareClass} p-0 sm:w-auto sm:gap-space-sm sm:px-control-sm`\n\t\t\t\t: cn(`${squareClass} p-0`, recipe.glyph),\n\t};\n\n\tconst mergedButtonProps = {\n\t\t...defaultButtonProps,\n\t\t...buttonProps,\n\t\tclassName: cn(defaultButtonProps.className, buttonProps?.className),\n\t};\n\n\tconst {\n\t\ttone = recipe.tone,\n\t\tbuttonStyle = recipe.buttonStyle,\n\t\tsize = requestedSize,\n\t\ticonOnly = !hasVisibleLabel,\n\t\tclassName: triggerClassName,\n\t\t...triggerProps\n\t} = mergedButtonProps;\n\n\tconst labelClassName =\n\t\tlabelVisibility === 'hidden'\n\t\t\t? 'sr-only'\n\t\t\t: labelVisibility === 'responsive'\n\t\t\t\t? 'sr-only sm:not-sr-only'\n\t\t\t\t: undefined;\n\n\tconst triggerIcon = renderActionIcon(icon);\n\n\tconst buttonContent = label ? (\n\t\t<>\n\t\t\t{triggerIcon}\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className={cn('whitespace-nowrap text-inherit', labelClassName)}>\n\t\t\t\t{label}\n\t\t\t</Text>\n\t\t</>\n\t) : (\n\t\t<>\n\t\t\t{triggerIcon}\n\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"sr-only\">{resolvedSrText}</Text>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<DropdownMenu open={open} onOpenChange={(nextOpen, details) => {\n\t\t\tonOpenChange?.(nextOpen, details);\n\t\t\tif (controlledOpen === undefined && !details.isCanceled) setUncontrolledOpen(nextOpen);\n\t\t}}>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\trender={renderTrigger ?? ((dropdownTriggerProps) => {\n\t\t\t\t\t// Base UI supplies its own trigger ref through `render`. Composing\n\t\t\t\t\t// rather than overwriting keeps the popup anchored while still\n\t\t\t\t\t// handing the consumer the trigger element.\n\t\t\t\t\tconst { ref: baseTriggerRef } = dropdownTriggerProps as {\n\t\t\t\t\t\tref?: React.Ref<HTMLButtonElement>;\n\t\t\t\t\t};\n\n\t\t\t\t\tconst composedRef = (node: HTMLButtonElement | null) => {\n\t\t\t\t\t\tassignRef(baseTriggerRef, node);\n\t\t\t\t\t\tassignRef(ref, node);\n\t\t\t\t\t};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t{...triggerProps}\n\t\t\t\t\t\t\t{...dropdownTriggerProps}\n\t\t\t\t\t\t\tref={composedRef}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={tone}\n\t\t\t\t\t\t\tbuttonStyle={buttonStyle}\n\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\ticonOnly={iconOnly}\n\t\t\t\t\t\t\tdata-context={context}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'action-menu--component',\n\t\t\t\t\t\t\t\ttriggerClassName,\n\t\t\t\t\t\t\t\t(dropdownTriggerProps as { className?: string }).className,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{buttonContent}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t/>\n\t\t\t<DropdownMenuContent\n\t\t\t\tfinalFocus={finalFocus}\n\t\t\t\tdensity={density === 'table' ? 'compact' : density}\n\t\t\t\talign={align}\n\t\t\t\tside={side}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'action-menu--content',\n\t\t\t\t\twidth,\n\t\t\t\t\tpopoverWidthRecipes.menuMin,\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<DropdownMenuGroup className=\"action-menu--group\">\n\t\t\t\t\t{renderGroupedActions({\n\t\t\t\t\t\tactions: resolvedActions,\n\t\t\t\t\t\tdensity,\n\t\t\t\t\t\tcloseOnSelect,\n\t\t\t\t\t\trenderLink,\n\t\t\t\t\t})}\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n});\n\nActionMenu.displayName = 'ActionMenu';\n\nexport const ActionButtons = React.forwardRef<HTMLDivElement, ActionButtonsProps>(function ActionButtons({\n\tactions,\n\tclassName,\n\tbuttonClassName,\n\tsize = 'sm',\n\trenderLink,\n}: ActionButtonsProps, ref) {\n\tconst visibleActions = resolveActions(actions, true);\n\tif (visibleActions.length === 0) return null;\n\n\treturn (\n\t\t<div ref={ref} className={cn('action-buttons--component flex flex-wrap items-center', compositionClasses.commands, className)}>\n\t\t\t{visibleActions.map((action, index) => {\n\t\t\t\tconst key = getActionKey(action, index);\n\t\t\t\tif (action.render) {\n\t\t\t\t\treturn <React.Fragment key={key}>{action.render}</React.Fragment>;\n\t\t\t\t}\n\n\t\t\t\tconst icon = renderActionIcon(action.icon);\n\t\t\t\tconst resolved = toButtonPresentation(action);\n\t\t\t\tconst children = (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{!!icon && <span className=\"action-buttons--icon inline-flex shrink-0 items-center\">{icon}</span>}\n\t\t\t\t\t\t{renderActionLabel(action.label, 'action-buttons--label')}\n\t\t\t\t\t</>\n\t\t\t\t);\n\n\t\t\t\tif (action.href && !action.disabled && renderLink) {\n\t\t\t\t\tconst href = action.href;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={resolved.tone}\n\t\t\t\t\t\t\tbuttonStyle={resolved.buttonStyle}\n\t\t\t\t\t\t\tsize={action.buttonSize ?? size}\n\t\t\t\t\t\t\tnativeButton={false}\n\t\t\t\t\t\t\tclassName={cn('action-buttons--item', resolved.className, buttonClassName, action.className)}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\taction.onClick?.();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\trender={(buttonRenderProps) =>\n\t\t\t\t\t\t\t\trenderLink({\n\t\t\t\t\t\t\t\t\t...buttonRenderProps,\n\t\t\t\t\t\t\t\t\thref,\n\t\t\t\t\t\t\t\t\tchildren: buttonRenderProps.children,\n\t\t\t\t\t\t\t\t\ttarget: action.target,\n\t\t\t\t\t\t\t\t\trel: action.rel,\n\t\t\t\t\t\t\t\t\texternal: action.external,\n\t\t\t\t\t\t\t\t\tdisabled: action.disabled,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (action.href && !action.disabled) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button key={key} href={action.href} target={action.target} rel={action.rel} tone={resolved.tone} buttonStyle={resolved.buttonStyle} size={action.buttonSize ?? size} className={cn('action-buttons--item', resolved.className, buttonClassName, action.className)} onClick={action.onClick}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst button = (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone={resolved.tone}\n\t\t\t\t\t\tbuttonStyle={resolved.buttonStyle}\n\t\t\t\t\t\tsize={action.buttonSize ?? size}\n\t\t\t\t\t\tclassName={cn('action-buttons--item', resolved.className, buttonClassName, action.className)}\n\t\t\t\t\t\tdisabled={!!action.disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\taction.onClick?.();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\n\t\t\t\treturn button;\n\t\t\t})}\n\t\t</div>\n\t);\n});\n\nActionButtons.displayName = 'ActionButtons';\n\nexport {\n\tdefaultActionMenuStrings,\n\ttype ActionMenuStrings,\n} from './action-menu.strings';\n"],"mappings":";;;;;;;;;;;;;;AAiBA,IAAasB,IAAyB;CACrC,MAAMC;CACN,SAAS;EAER,QAAQ;GAAE,MAAM;GAAa,aAAa;GAAS,OAAO;EAAwB;EAElF,UAAU;GAAE,MAAM;GAAa,aAAa;GAAW,OAAO,KAAA;EAAU;CACzE;AACD,GCrBaC,IAA8C,EAC1D,eAAe,eAChB;;;ACgMA,SAASC,EAAoB,GAA0B;CACtD,OAAOC,EAAO,SAAS;AACxB;AAEA,SAASC,EAAe,GAAsC,IAAgB,IAAO;CACpF,IAAMC,IAAUC,EAAQ,QAAQ,MAAWH,EAAO,YAAY,EAAK;CACnE,IAAII,GAAe,OAAOF;CAE1B,IAAMG,IAAWH,EAAQ,QAAQ,MAAW,CAACH,EAAoBC,CAAM,CAAC,GAClEM,IAAcJ,EAAQ,OAAOH,CAAmB;CACtD,OAAO,CAAC,GAAGM,GAAU,GAAGC,CAAW;AACpC;AAEA,SAASC,EAAa,GAA0B,GAAe;CAC9D,OAAOP,EAAO,OAAO,OAAOA,EAAO,SAAU,WAAWA,EAAO,QAAQ,UAAUQ;AAClF;AAEA,SAASC,EAAiB,GAAgC;CAWzD,OAVKC,IACDC,EAAeD,CAAI,IAA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;MACd,EAAO,UAAU;KAClB;KACA,SAAS,MACR0B,EAAW;MACV,GAAGqD;MACH;MACA,UAAUA,EAAkB;MAC5B,QAAQ/E,EAAO;MACf,KAAKA,EAAO;MACZ,UAAUA,EAAO;MACjB,UAAUA,EAAO;KAClB,CAAC;KAGD;IACM,GAvBFoB,CAuBE;GAEV;GA2BA,OAzBIpB,EAAO,QAAQ,CAACA,EAAO,WAEzB,kBAACpB,GAAD;IAAkB,MAAMoB,EAAO;IAAM,QAAQA,EAAO;IAAQ,KAAKA,EAAO;IAAK,MAAM2E,EAAS;IAAM,aAAaA,EAAS;IAAa,MAAM3E,EAAO,cAAc6E;IAAM,WAAWlG,EAAG,wBAAwBgG,EAAS,WAAWG,GAAiB9E,EAAO,SAAS;IAAG,SAASA,EAAO;IAClR;GACM,GAFKoB,CAEL,IAKT5C,kBAACI,GAAD;IAEC,MAAK;IACL,MAAM+F,EAAS;IACf,aAAaA,EAAS;IACtB,MAAM3E,EAAO,cAAc6E;IAC3B,WAAWlG,EAAG,wBAAwBgG,EAAS,WAAWG,GAAiB9E,EAAO,SAAS;IAC3F,UAAU,CAAC,CAACA,EAAO;IACnB,eAAe;KACd,EAAO,UAAU;IAClB;IAEC;GACM,GAZFoB,CAeA;EACR,CAAC;CACG,CAAA;AAEP,CAAC;AAED,EAAc,cAAc"}
1
+ {"version":3,"file":"action-menu-C0gjzLyE.js","names":["Icon","_Fragment","_jsx","resolveComponentScale","useDensityConfig","cn","Button","Text","compositionClasses","popoverWidthRecipes","collectionRecipes","CollectionContent","DropdownMenuItem","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuCheckboxItem","DropdownMenuLabel","DropdownMenuContent","DropdownMenuLinkItem","DropdownMenu","React","Fragment$1","overflowTriggerRecipes","MoreHorizontal","defaultActionMenuStrings","isDestructiveAction","action","resolveActions","visible","actions","preserveOrder","standard","destructive","getActionKey","index","renderActionIcon","icon","isValidElement","renderActionLabel","label","className","toMenuVariant","tone","toButtonPresentation","buttonStyle","renderMenuAction","key","shouldCloseOnSelect","closeOnSelect","content","density","href","renderLink","props","renderGroupedActions","nodes","currentGroup","args","nextGroup","groupChanged","DropdownMenuSeparator","assignRef","ref","node","ActionMenu","controlledOpen","stringsProp","uncontrolledOpen","setUncontrolledOpen","open","strings","useStrings","resolvedSrText","srText","resolvedActions","hasVisibleLabel","labelVisibility","hasResponsiveLabel","recipe","context","requestedSize","buttonProps","defaultScale","squareClass","defaultButtonProps","triggerClassName","triggerProps","labelClassName","triggerIcon","buttonContent","onOpenChange","nextOpen","details","renderTrigger","baseTriggerRef","dropdownTriggerProps","composedRef","width","contentClassName","ActionButtons","visibleActions","resolved","children","size","buttonClassName","buttonRenderProps"],"sources":["../src/components/base/action-menu/action-menu.recipes.ts","../src/components/base/action-menu/action-menu.strings.ts","../src/components/base/action-menu/action-menu.tsx"],"sourcesContent":["/**\n * Overflow trigger recipe — the one `⋯` square every overflow menu shares.\n *\n * The glyph and the default \"More actions\" name are fixed. `context` picks the\n * treatment for where the menu sits, and the square takes the size of the\n * controls beside it (`buttonProps.size`) or the provider scale, like every\n * other Button. A menu that shares a row with a primary command ends that row.\n */\nimport { MoreHorizontal } from 'lucide-react';\n\n/**\n * Where an overflow menu sits. `inline` is the quiet ghost square for rows,\n * cards, list items and footers; `commands` is the outline square that ends a\n * row of outline commands, such as a page header or toolbar.\n */\nexport type ActionMenuContext = 'inline' | 'commands';\n\nexport const overflowTriggerRecipes = {\n\ticon: MoreHorizontal,\n\tcontext: {\n\t\t// No fill until hover, and a muted glyph that does not compete with the content.\n\t\tinline: { tone: 'secondary', buttonStyle: 'ghost', glyph: 'text-muted-foreground' },\n\t\t// The commands' own boundary and ink.\n\t\tcommands: { tone: 'secondary', buttonStyle: 'outline', glyph: undefined },\n\t},\n} as const;\n","export interface ActionMenuStrings {\n\topenMenuLabel: string;\n}\n\nexport const defaultActionMenuStrings: ActionMenuStrings = {\n\topenMenuLabel: 'More actions',\n};\n","/**\n * ActionMenu — centralized action chrome for page, card, table, and row\n * overflow menus.\n *\n * Primary API is definition-driven: pass `actions={[...]}` and the component\n * renders the trigger, menu surface, grouping, checkbox rows, destructive\n * separation, links, disabled state, and density. `ActionButtons` renders the\n * same definitions as inline buttons for page/toolbars that need visible\n * actions plus an overflow menu.\n *\n * Without a visible `label` the trigger is the shared overflow square from\n * `action-menu.recipes.ts`: a `⋯` glyph named \"More actions\", ghost `inline`\n * or outline `commands`, at the size of the controls beside it or the\n * provider scale.\n */\nimport type { LucideIcon } from 'lucide-react';\nimport React, { isValidElement, type ComponentType, type ElementType, type ReactElement, type ReactNode } from 'react';\n\nimport { Button, type ButtonSize, type ButtonStyle } from '../buttons';\nimport { compositionClasses } from '../structure/composition.recipes';\nimport { collectionRecipes, popoverWidthRecipes, type CollectionDensity } from '../popover/popover.recipes';\nimport { CollectionContent } from '../popover/collection-content';\nimport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuLinkItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuTrigger,\n} from '../navigation/dropdown-menu';\nimport { Text } from '../../typography';\nimport type { ActionButtonStyle, ActionPresentation } from '../../../lib/action-presentation';\nimport { resolveComponentScale, useDensityConfig } from '../../../lib/ui-provider';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { overflowTriggerRecipes, type ActionMenuContext } from './action-menu.recipes';\nimport {\n\tdefaultActionMenuStrings,\n\ttype ActionMenuStrings,\n} from './action-menu.strings';\n\ntype ActionMenuButtonProps = Partial<React.ComponentPropsWithoutRef<typeof Button>> & {\n\t[key: `data-${string}`]: string | boolean | undefined;\n\t'aria-label'?: string;\n\tonPointerDown?: React.PointerEventHandler<HTMLButtonElement>;\n};\nexport type ActionMenuDensity = CollectionDensity | 'table';\nexport type ActionMenuLabelVisibility = 'visible' | 'responsive' | 'hidden';\nexport interface ActionMenuLinkRenderProps extends React.ComponentPropsWithoutRef<'a'> {\n\thref: string;\n\tdisabled?: boolean;\n\texternal?: boolean;\n}\n\nexport type ActionMenuIcon = LucideIcon | ComponentType<{ className?: string }> | ReactNode;\n\nexport interface ActionMenuAction extends ActionPresentation {\n\t/** Stable React key. Falls back to a string `label`, then the index. */\n\tid?: string;\n\t/** Visible label for the entry. */\n\tlabel: ReactNode;\n\t/** Leading glyph. Accepts a Lucide icon, a component, or a rendered node. */\n\ticon?: ActionMenuIcon;\n\t/** `'checkbox'` renders a toggle driven by `checked`/`onCheckedChange`. Defaults to `'item'`. */\n\ttype?: 'item' | 'checkbox';\n\t/**\n\t * Renders the entry as a link. By default this is a native `<a href>`, so it\n\t * performs a full page navigation; pass `renderLink` on `ActionMenu` to route\n\t * it through your framework's router instead.\n\t */\n\thref?: string;\n\t/** Anchor target forwarded to the rendered link. Requires `href`. */\n\ttarget?: string;\n\t/** Anchor rel forwarded to the rendered link. Requires `href`. */\n\trel?: string;\n\t/** Marks the destination as leaving the app; forwarded to `renderLink`. */\n\texternal?: boolean;\n\t/** Runs when the entry is chosen. This is the handler for a normal item. */\n\tonClick?: () => void;\n\t/** Checked state for a `'checkbox'` entry. */\n\tchecked?: boolean;\n\t/** Fires with the next checked state for a `'checkbox'` entry. */\n\tonCheckedChange?: (checked: boolean) => void;\n\t/**\n\t * Starts a new group, drawing a separator above this entry. A string also\n\t * captions the group; `true` rules off without a heading, for the common\n\t * case of holding one entry apart (a sign-out, a delete) with no label to\n\t * write.\n\t */\n\tgroup?: string | true;\n\t/** Class merged onto this group's starting separator/caption, for example a responsive boundary. Does not style or hide the action rows. */\n\tgroupClassName?: string;\n\t/** Overrides the button size when the action renders as a button. */\n\tbuttonSize?: ButtonSize;\n\t/** Escape hatch merged onto the entry root. */\n\tclassName?: string;\n\t/** Escape hatch merged onto the entry's inner content. */\n\tcontentClassName?: string;\n\t/** Overrides the menu's `closeOnSelect` for this entry. */\n\tcloseOnSelect?: boolean;\n\t/** Replaces the rendered entry, e.g. to emit a framework `<Link>`. */\n\trender?: ReactNode;\n}\n\nexport interface ActionMenuProps {\n\t/** Controlled menu visibility. Omit to let the menu manage its own state. */\n\topen?: boolean;\n\t/** Reports native menu open/close requests, including their event details. */\n\tonOpenChange?: React.ComponentProps<typeof DropdownMenu>['onOpenChange'];\n\t/** Native focus destination when the menu closes; defaults to its trigger. */\n\tfinalFocus?: React.ComponentProps<typeof DropdownMenuContent>['finalFocus'];\n\t/**\n\t * Commands to offer. Destructive entries are moved last unless\n\t * `preserveOrder` is set.\n\t */\n\tactions: readonly ActionMenuAction[];\n\t/** Trigger text. Omit for the shared icon-only overflow trigger, and set `srText` to name it. */\n\tlabel?: string;\n\t/** Trigger glyph. Defaults to the horizontal ellipsis (`MoreHorizontal`) every overflow menu shares. */\n\ticon?: ActionMenuIcon;\n\t/** Accessible name when the trigger shows no visible `label`. Defaults to `strings.openMenuLabel`, \"More actions\". */\n\tsrText?: string;\n\t/**\n\t * Where the menu sits, which picks the trigger treatment. `inline` (the\n\t * default) is the quiet ghost square for rows, cards and footers; `commands`\n\t * is the outline square that ends a row of outline commands. Place the menu\n\t * after any primary command in the same row.\n\t */\n\tcontext?: ActionMenuContext;\n\t/**\n\t * Escape hatch forwarded to the trigger button. An icon-only trigger takes\n\t * `size` from here to match the controls beside it, otherwise the provider\n\t * scale.\n\t */\n\tbuttonProps?: ActionMenuButtonProps;\n\t/** Menu alignment against the trigger. Defaults to `end`. */\n\talign?: 'center' | 'start' | 'end';\n\t/** Which edge of the trigger the menu opens from. Defaults to `bottom`. */\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\t/** Merged onto the menu surface. */\n\tcontentClassName?: string;\n\t/** Fixed menu width. Defaults to sizing from the widest item. */\n\twidth?: string;\n\t/** Closes the menu after an action runs. Defaults to `true`. */\n\tcloseOnSelect?: boolean;\n\t/** Vertical row rhythm; table preserves the legacy tight action spacing. Inline room stays stable. */\n\tdensity?: ActionMenuDensity;\n\t/** Whether the trigger's `label` is visible, hidden, or responsive. */\n\tlabelVisibility?: ActionMenuLabelVisibility;\n\t/** Preserve incoming action order instead of moving destructive items last. */\n\tpreserveOrder?: boolean;\n\t/**\n\t * Renders actions carrying an `href` through the consumer's router, keeping\n\t * this component framework-agnostic. Without it, such actions render as\n\t * plain anchors.\n\t */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n\t/**\n\t * Replaces the default trigger button entirely, so a menu can hang off a\n\t * shape that is not a button with a glyph — an account block, a sidebar\n\t * row, a tab that has to match its siblings.\n\t *\n\t * Takes Base UI's `render` contract: either an element, whose props are\n\t * merged for you, or a function receiving the props to spread. Either way\n\t * the ARIA wiring, the open/close handlers and the popup's anchor ref reach\n\t * a real DOM node without anyone cloning anything.\n\t *\n\t * For a plain button that just needs different words or a different glyph,\n\t * `label`, `icon` and `buttonProps` are the smaller tools; reach for this\n\t * only when the trigger is a different thing.\n\t */\n\trenderTrigger?: React.ComponentProps<typeof DropdownMenuTrigger>['render'];\n\t/** Overrides the menu's own copy (the default trigger label). */\n\tstrings?: StringsProp<ActionMenuStrings>;\n}\n\nexport interface ActionButtonsProps {\n\t/**\n\t * Commands to render side by side rather than collapsed into a menu. Each\n\t * resolves like `Button`: untoned actions are the default outline button and\n\t * a `tone` without `buttonStyle` is solid, so mark the main command\n\t * `tone: 'primary'`.\n\t */\n\tactions: readonly ActionMenuAction[];\n\t/** Merged onto the button group. */\n\tclassName?: string;\n\t/** Merged onto every button in the group. */\n\tbuttonClassName?: string;\n\t/** Height preset applied to each button. */\n\tsize?: ButtonSize;\n\t/** Renders actions carrying an `href` through the consumer's router. */\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}\n\nfunction isDestructiveAction(action: ActionMenuAction) {\n\treturn action.tone === 'destructive';\n}\n\nfunction resolveActions(actions: readonly ActionMenuAction[], preserveOrder = false) {\n\tconst visible = actions.filter((action) => action.visible !== false);\n\tif (preserveOrder) return visible;\n\n\tconst standard = visible.filter((action) => !isDestructiveAction(action));\n\tconst destructive = visible.filter(isDestructiveAction);\n\treturn [...standard, ...destructive];\n}\n\nfunction getActionKey(action: ActionMenuAction, index: number) {\n\treturn action.id ?? (typeof action.label === 'string' ? action.label : `action-${index}`);\n}\n\nfunction renderActionIcon(icon: ActionMenuAction['icon']) {\n\tif (!icon) return null;\n\tif (isValidElement(icon)) return icon;\n\tif (typeof icon === 'function') {\n\t\tconst Icon = icon as LucideIcon;\n\t\treturn <Icon className=\"size-icon-sm\" aria-hidden=\"true\" />;\n\t}\n\tif (typeof icon === 'object' && icon !== null && '$$typeof' in icon) {\n\t\tconst Icon = icon as unknown as ElementType<{ className?: string; 'aria-hidden'?: boolean }>;\n\t\treturn <Icon className=\"size-icon-sm\" aria-hidden />;\n\t}\n\treturn icon;\n}\n\nfunction renderActionLabel(label: ReactNode, className?: string) {\n\tif (typeof label === 'string' || typeof label === 'number' || typeof label === 'bigint') {\n\t\t// Same label recipe as Button: inherited size, medium weight.\n\t\treturn <Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className={cn('text-inherit', className)}>{label}</Text>;\n\t}\n\treturn className ? <span className={className}>{label}</span> : label;\n}\n\nfunction toMenuVariant(tone: ActionMenuAction['tone']): 'default' | 'destructive' {\n\treturn tone === 'destructive' ? 'destructive' : 'default';\n}\n\n/**\n * Inline actions resolve exactly like `Button`: an untoned action is the neutral\n * default button, and a tone without a style asks for that tone's solid treatment.\n * Mark the one main command with `tone: 'primary'`.\n */\nfunction toButtonPresentation(action: Pick<ActionMenuAction, 'tone' | 'buttonStyle'>): {\n\ttone?: ActionMenuAction['tone'];\n\tbuttonStyle?: ButtonStyle;\n\tclassName?: string;\n} {\n\tconst buttonStyle: ActionButtonStyle | undefined = action.buttonStyle;\n\tif (buttonStyle === 'link') {\n\t\treturn {\n\t\t\ttone: action.tone,\n\t\t\tbuttonStyle: 'ghost',\n\t\t\tclassName: 'underline underline-offset-[0.2em]',\n\t\t};\n\t}\n\treturn { tone: action.tone, buttonStyle };\n}\n\nfunction renderMenuAction({\n\taction,\n\tindex,\n\tdensity,\n\tcloseOnSelect,\n\trenderLink,\n}: {\n\taction: ActionMenuAction;\n\tindex: number;\n\tdensity: ActionMenuDensity;\n\tcloseOnSelect: boolean;\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}) {\n\tconst key = getActionKey(action, index);\n\tconst shouldCloseOnSelect = action.closeOnSelect ?? closeOnSelect;\n\tif (action.render) {\n\t\treturn <div key={key} className=\"action-menu--item\">{action.render}</div>;\n\t}\n\n\tconst icon = renderActionIcon(action.icon);\n\tconst content = (\n\t\t<CollectionContent label={action.label} leading={icon} wrap\n\t\t className={cn('action-menu--item-content w-full',action.contentClassName)}\n\t\t leadingClassName=\"action-menu--item-icon text-inherit\" labelClassName=\"action-menu--item-label\"/>\n\t);\n\tconst className = cn(\n\t\t'action-menu--item',\n\t\tdensity === 'table' && collectionRecipes.tableRow,\n\t\taction.className,\n\t);\n\tif (action.type === 'checkbox') {\n\t\treturn (\n\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\tkey={key}\n\t\t\t\tchecked={!!action.checked}\n\t\t\t\tdisabled={action.disabled}\n\t\t\t\tcloseOnClick={shouldCloseOnSelect}\n\t\t\t\tonCheckedChange={action.onCheckedChange}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuCheckboxItem>\n\t\t);\n\t}\n\n\tif (action.href && !action.disabled) {\n\t\tconst href = action.href;\n\t\treturn (\n\t\t\t<DropdownMenuLinkItem\n\t\t\t\tkey={key}\n\t\t\t\thref={href}\n\t\t\t\tvariant={toMenuVariant(action.tone)}\n\t\t\t\tcloseOnClick={shouldCloseOnSelect}\n\t\t\t\tonClick={action.onClick}\n\t\t\t\t// Element form, not a function, when the consumer supplies a link\n\t\t\t\t// renderer. The function form hands the menu-item props to the\n\t\t\t\t// consumer and trusts them to spread — and the renderer people\n\t\t\t\t// actually write destructures href/children/className and drops the\n\t\t\t\t// rest, which silently costs the row its `role=\"menuitem\"`. Handing\n\t\t\t\t// back an element lets the menu merge its own props on afterwards,\n\t\t\t\t// so a narrow renderer stays accessible.\n\t\t\t\trender={\n\t\t\t\t\trenderLink\n\t\t\t\t\t\t? (renderLink({\n\t\t\t\t\t\t\thref,\n\t\t\t\t\t\t\tchildren: content,\n\t\t\t\t\t\t\ttarget: action.target,\n\t\t\t\t\t\t\trel: action.rel,\n\t\t\t\t\t\t\texternal: action.external,\n\t\t\t\t\t\t\tdisabled: action.disabled,\n\t\t\t\t\t\t}) as ReactElement)\n\t\t\t\t\t\t: (props) => (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\thref={href}\n\t\t\t\t\t\t\t\ttarget={action.target}\n\t\t\t\t\t\t\t\trel={action.rel}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tclassName={className}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</DropdownMenuLinkItem>\n\t\t);\n\t}\n\n\treturn (\n\t\t<DropdownMenuItem\n\t\tkey={key}\n\t\tdisabled={action.disabled}\n\t\tvariant={toMenuVariant(action.tone)}\n\t\tcloseOnClick={shouldCloseOnSelect}\n\t\tonClick={action.onClick}\n\t\tclassName={className}\n\t\t>\n\t\t\t{content}\n\t\t</DropdownMenuItem>\n\t);\n}\n\nfunction renderGroupedActions(args: {\n\tactions: readonly ActionMenuAction[];\n\tdensity: ActionMenuDensity;\n\tcloseOnSelect: boolean;\n\trenderLink?: (props: ActionMenuLinkRenderProps) => ReactElement;\n}) {\n\tconst nodes: ReactNode[] = [];\n\tlet currentGroup: string | true | null = null;\n\n\targs.actions.forEach((action, index) => {\n\t\tconst nextGroup = action.group ?? null;\n\t\tconst groupChanged = nextGroup !== currentGroup;\n\n\t\tif (nodes.length > 0 && groupChanged) {\n\t\t\tnodes.push(<DropdownMenuSeparator key={`sep-${currentGroup ?? 'root'}-${nextGroup ?? 'root'}-${index}`} className={action.groupClassName} />);\n\t\t}\n\n\t\tif (groupChanged) {\n\t\t\tcurrentGroup = nextGroup;\n\t\t\tif (typeof nextGroup === 'string') {\n\t\t\t\tnodes.push(\n\t\t\t\t\t<DropdownMenuLabel\n\t\t\t\t\t\tkey={`group-${nextGroup}-${index}`}\n\t\t\t\t\t\tclassName={cn('normal-case', action.groupClassName)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{nextGroup}\n\t\t\t\t\t</DropdownMenuLabel>,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tnodes.push(renderMenuAction({ ...args, action, index }));\n\t});\n\n\treturn nodes;\n}\n\n/**\n * Writes a node into a ref of either shape. `ActionMenu` has two claims on its\n * trigger — Base UI's own anchor ref and the consumer's — so neither may\n * overwrite the other.\n */\nfunction assignRef<T>(ref: React.Ref<T> | undefined, node: T | null) {\n\tif (typeof ref === 'function') {\n\t\tref(node);\n\t} else if (ref) {\n\t\t(ref as React.RefObject<T | null>).current = node;\n\t}\n}\n\nexport const ActionMenu = React.forwardRef<HTMLButtonElement, ActionMenuProps>(function ActionMenu({\n\tactions,\n\topen: controlledOpen,\n\tonOpenChange,\n\tfinalFocus,\n\tlabel,\n\ticon = overflowTriggerRecipes.icon,\n\tsrText,\n\tcontext = 'inline',\n\tbuttonProps,\n\talign = 'end',\n\tside = 'bottom',\n\tcontentClassName = '',\n\twidth = 'w-auto',\n\tcloseOnSelect = true,\n\tdensity = 'default',\n\tlabelVisibility = 'visible',\n\tpreserveOrder = false,\n\trenderLink,\n\trenderTrigger,\n\tstrings: stringsProp,\n}: ActionMenuProps, ref) {\n\tconst [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);\n\tconst open = controlledOpen ?? uncontrolledOpen;\n\tconst { defaultScale } = useDensityConfig();\n\tconst strings = useStrings(defaultActionMenuStrings, stringsProp);\n\tconst resolvedSrText = srText ?? strings.openMenuLabel;\n\tconst resolvedActions = React.useMemo(\n\t\t() => resolveActions(actions, preserveOrder),\n\t\t[actions, preserveOrder],\n\t);\n\n\tif (resolvedActions.length === 0) return null;\n\tconst hasVisibleLabel = Boolean(label) && labelVisibility === 'visible';\n\tconst hasResponsiveLabel = Boolean(label) && labelVisibility === 'responsive';\n\n\t// The icon-only square takes the size of the controls beside it\n\t// (`buttonProps.size`), otherwise the provider scale like every other Button.\n\tconst recipe = overflowTriggerRecipes.context[context] ?? overflowTriggerRecipes.context.inline;\n\tconst requestedSize = hasVisibleLabel ? buttonProps?.size ?? 'sm' : resolveComponentScale(buttonProps?.size, defaultScale);\n\tconst squareClass = requestedSize === 'sm' ? 'size-action-sm' : requestedSize === 'lg' ? 'size-action-lg' : 'size-action';\n\tconst defaultButtonProps: ActionMenuButtonProps = {\n\t\ttone: recipe.tone,\n\t\tbuttonStyle: recipe.buttonStyle,\n\t\tsize: requestedSize,\n\t\ticonOnly: !hasVisibleLabel,\n\t\tclassName: hasVisibleLabel\n\t\t\t? undefined\n\t\t\t: hasResponsiveLabel\n\t\t\t\t? `${squareClass} p-0 sm:w-auto sm:gap-space-sm sm:px-control-sm`\n\t\t\t\t: cn(`${squareClass} p-0`, recipe.glyph),\n\t};\n\n\tconst mergedButtonProps = {\n\t\t...defaultButtonProps,\n\t\t...buttonProps,\n\t\tclassName: cn(defaultButtonProps.className, buttonProps?.className),\n\t};\n\n\tconst {\n\t\ttone = recipe.tone,\n\t\tbuttonStyle = recipe.buttonStyle,\n\t\tsize = requestedSize,\n\t\ticonOnly = !hasVisibleLabel,\n\t\tclassName: triggerClassName,\n\t\t...triggerProps\n\t} = mergedButtonProps;\n\n\tconst labelClassName =\n\t\tlabelVisibility === 'hidden'\n\t\t\t? 'sr-only'\n\t\t\t: labelVisibility === 'responsive'\n\t\t\t\t? 'sr-only sm:not-sr-only'\n\t\t\t\t: undefined;\n\n\tconst triggerIcon = renderActionIcon(icon);\n\n\tconst buttonContent = label ? (\n\t\t<>\n\t\t\t{triggerIcon}\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className={cn('whitespace-nowrap text-inherit', labelClassName)}>\n\t\t\t\t{label}\n\t\t\t</Text>\n\t\t</>\n\t) : (\n\t\t<>\n\t\t\t{triggerIcon}\n\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"sr-only\">{resolvedSrText}</Text>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<DropdownMenu open={open} onOpenChange={(nextOpen, details) => {\n\t\t\tonOpenChange?.(nextOpen, details);\n\t\t\tif (controlledOpen === undefined && !details.isCanceled) setUncontrolledOpen(nextOpen);\n\t\t}}>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\trender={renderTrigger ?? ((dropdownTriggerProps) => {\n\t\t\t\t\t// Base UI supplies its own trigger ref through `render`. Composing\n\t\t\t\t\t// rather than overwriting keeps the popup anchored while still\n\t\t\t\t\t// handing the consumer the trigger element.\n\t\t\t\t\tconst { ref: baseTriggerRef } = dropdownTriggerProps as {\n\t\t\t\t\t\tref?: React.Ref<HTMLButtonElement>;\n\t\t\t\t\t};\n\n\t\t\t\t\tconst composedRef = (node: HTMLButtonElement | null) => {\n\t\t\t\t\t\tassignRef(baseTriggerRef, node);\n\t\t\t\t\t\tassignRef(ref, node);\n\t\t\t\t\t};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t{...triggerProps}\n\t\t\t\t\t\t\t{...dropdownTriggerProps}\n\t\t\t\t\t\t\tref={composedRef}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={tone}\n\t\t\t\t\t\t\tbuttonStyle={buttonStyle}\n\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\ticonOnly={iconOnly}\n\t\t\t\t\t\t\tdata-context={context}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'action-menu--component',\n\t\t\t\t\t\t\t\ttriggerClassName,\n\t\t\t\t\t\t\t\t(dropdownTriggerProps as { className?: string }).className,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{buttonContent}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t/>\n\t\t\t<DropdownMenuContent\n\t\t\t\tfinalFocus={finalFocus}\n\t\t\t\tdensity={density === 'table' ? 'compact' : density}\n\t\t\t\talign={align}\n\t\t\t\tside={side}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'action-menu--content',\n\t\t\t\t\twidth,\n\t\t\t\t\tpopoverWidthRecipes.menuMin,\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<DropdownMenuGroup className=\"action-menu--group\">\n\t\t\t\t\t{renderGroupedActions({\n\t\t\t\t\t\tactions: resolvedActions,\n\t\t\t\t\t\tdensity,\n\t\t\t\t\t\tcloseOnSelect,\n\t\t\t\t\t\trenderLink,\n\t\t\t\t\t})}\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n});\n\nActionMenu.displayName = 'ActionMenu';\n\nexport const ActionButtons = React.forwardRef<HTMLDivElement, ActionButtonsProps>(function ActionButtons({\n\tactions,\n\tclassName,\n\tbuttonClassName,\n\tsize = 'sm',\n\trenderLink,\n}: ActionButtonsProps, ref) {\n\tconst visibleActions = resolveActions(actions, true);\n\tif (visibleActions.length === 0) return null;\n\n\treturn (\n\t\t<div ref={ref} className={cn('action-buttons--component flex flex-wrap items-center', compositionClasses.commands, className)}>\n\t\t\t{visibleActions.map((action, index) => {\n\t\t\t\tconst key = getActionKey(action, index);\n\t\t\t\tif (action.render) {\n\t\t\t\t\treturn <React.Fragment key={key}>{action.render}</React.Fragment>;\n\t\t\t\t}\n\n\t\t\t\tconst icon = renderActionIcon(action.icon);\n\t\t\t\tconst resolved = toButtonPresentation(action);\n\t\t\t\tconst children = (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{!!icon && <span className=\"action-buttons--icon inline-flex shrink-0 items-center\">{icon}</span>}\n\t\t\t\t\t\t{renderActionLabel(action.label, 'action-buttons--label')}\n\t\t\t\t\t</>\n\t\t\t\t);\n\n\t\t\t\tif (action.href && !action.disabled && renderLink) {\n\t\t\t\t\tconst href = action.href;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={resolved.tone}\n\t\t\t\t\t\t\tbuttonStyle={resolved.buttonStyle}\n\t\t\t\t\t\t\tsize={action.buttonSize ?? size}\n\t\t\t\t\t\t\tnativeButton={false}\n\t\t\t\t\t\t\tclassName={cn('action-buttons--item', resolved.className, buttonClassName, action.className)}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\taction.onClick?.();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\trender={(buttonRenderProps) =>\n\t\t\t\t\t\t\t\trenderLink({\n\t\t\t\t\t\t\t\t\t...buttonRenderProps,\n\t\t\t\t\t\t\t\t\thref,\n\t\t\t\t\t\t\t\t\tchildren: buttonRenderProps.children,\n\t\t\t\t\t\t\t\t\ttarget: action.target,\n\t\t\t\t\t\t\t\t\trel: action.rel,\n\t\t\t\t\t\t\t\t\texternal: action.external,\n\t\t\t\t\t\t\t\t\tdisabled: action.disabled,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (action.href && !action.disabled) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button key={key} href={action.href} target={action.target} rel={action.rel} tone={resolved.tone} buttonStyle={resolved.buttonStyle} size={action.buttonSize ?? size} className={cn('action-buttons--item', resolved.className, buttonClassName, action.className)} onClick={action.onClick}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst button = (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone={resolved.tone}\n\t\t\t\t\t\tbuttonStyle={resolved.buttonStyle}\n\t\t\t\t\t\tsize={action.buttonSize ?? size}\n\t\t\t\t\t\tclassName={cn('action-buttons--item', resolved.className, buttonClassName, action.className)}\n\t\t\t\t\t\tdisabled={!!action.disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\taction.onClick?.();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\n\t\t\t\treturn button;\n\t\t\t})}\n\t\t</div>\n\t);\n});\n\nActionButtons.displayName = 'ActionButtons';\n\nexport {\n\tdefaultActionMenuStrings,\n\ttype ActionMenuStrings,\n} from './action-menu.strings';\n"],"mappings":";;;;;;;;;;;;;;AAiBA,IAAasB,IAAyB;CACrC,MAAMC;CACN,SAAS;EAER,QAAQ;GAAE,MAAM;GAAa,aAAa;GAAS,OAAO;EAAwB;EAElF,UAAU;GAAE,MAAM;GAAa,aAAa;GAAW,OAAO,KAAA;EAAU;CACzE;AACD,GCrBaC,IAA8C,EAC1D,eAAe,eAChB;;;ACgMA,SAASC,EAAoB,GAA0B;CACtD,OAAOC,EAAO,SAAS;AACxB;AAEA,SAASC,EAAe,GAAsC,IAAgB,IAAO;CACpF,IAAMC,IAAUC,EAAQ,QAAQ,MAAWH,EAAO,YAAY,EAAK;CACnE,IAAII,GAAe,OAAOF;CAE1B,IAAMG,IAAWH,EAAQ,QAAQ,MAAW,CAACH,EAAoBC,CAAM,CAAC,GAClEM,IAAcJ,EAAQ,OAAOH,CAAmB;CACtD,OAAO,CAAC,GAAGM,GAAU,GAAGC,CAAW;AACpC;AAEA,SAASC,EAAa,GAA0B,GAAe;CAC9D,OAAOP,EAAO,OAAO,OAAOA,EAAO,SAAU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