themelia-react-ui 2.0.1 → 2.0.3

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 (490) hide show
  1. package/CHANGELOG.md +317 -131
  2. package/README.md +25 -9
  3. package/THIRD_PARTY_NOTICES.md +7 -0
  4. package/dist/{accordion-B6a3vVgA.js → accordion-Cjb6sx0G.js} +14 -13
  5. package/dist/accordion-Cjb6sx0G.js.map +1 -0
  6. package/dist/action-menu-CllU52Mm.js +280 -0
  7. package/dist/action-menu-CllU52Mm.js.map +1 -0
  8. package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
  9. package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
  10. package/dist/ai-artifact-DvTwDVyL.js +1148 -0
  11. package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
  12. package/dist/{app-shell-ZK5RWdo6.js → app-shell-C4FhvCqF.js} +5 -5
  13. package/dist/{app-shell-ZK5RWdo6.js.map → app-shell-C4FhvCqF.js.map} +1 -1
  14. package/dist/attachment-BxDfL2mw.js +246 -0
  15. package/dist/attachment-BxDfL2mw.js.map +1 -0
  16. package/dist/{auth-CYxKfo69.js → auth-BGua8ouh.js} +58 -54
  17. package/dist/auth-BGua8ouh.js.map +1 -0
  18. package/dist/{avatar-BBnEJIx8.js → avatar-DAPlDvhJ.js} +7 -7
  19. package/dist/avatar-DAPlDvhJ.js.map +1 -0
  20. package/dist/{badge-MrKVNzW9.js → badge-HpFqoqSY.js} +40 -40
  21. package/dist/badge-HpFqoqSY.js.map +1 -0
  22. package/dist/base/accordion.js +1 -1
  23. package/dist/base/action-menu.js +1 -1
  24. package/dist/base/attachment.js +1 -1
  25. package/dist/base/avatar.js +1 -1
  26. package/dist/base/badge.js +1 -1
  27. package/dist/base/batch-action-bar.js +1 -1
  28. package/dist/base/buttons.js +1 -1
  29. package/dist/base/cards.js +2 -2
  30. package/dist/base/carousel.js +40 -36
  31. package/dist/base/carousel.js.map +1 -1
  32. package/dist/base/cascader.js +92 -92
  33. package/dist/base/cascader.js.map +1 -1
  34. package/dist/base/chart.js +1 -1
  35. package/dist/base/choice-inputs.js +2 -2
  36. package/dist/base/code-block.js +1 -1
  37. package/dist/base/combobox.js +2 -2
  38. package/dist/base/command.js +1 -1
  39. package/dist/base/copyable.js +1 -1
  40. package/dist/base/date-pickers.js +2 -2
  41. package/dist/base/display.js +6 -6
  42. package/dist/base/feedback.js +3 -3
  43. package/dist/base/forms-numeric.js +1 -1
  44. package/dist/base/forms.js +2 -2
  45. package/dist/base/inline-edit.js +14 -14
  46. package/dist/base/inline-edit.js.map +1 -1
  47. package/dist/base/item.js +1 -1
  48. package/dist/base/media-gallery.js +1 -1
  49. package/dist/base/metadata-list.js +1 -1
  50. package/dist/base/navigation.js +6 -6
  51. package/dist/base/popover-menu.js +1 -1
  52. package/dist/base/popover.js +1 -1
  53. package/dist/base/qr-code.js +1 -1
  54. package/dist/base/repeaters.js +171 -176
  55. package/dist/base/repeaters.js.map +1 -1
  56. package/dist/base/sheet.js +1 -1
  57. package/dist/base/sidebar.js +1 -1
  58. package/dist/base/signature-pad.js +6 -6
  59. package/dist/base/skeleton.js +1 -1
  60. package/dist/base/spinner.js +79 -2
  61. package/dist/base/spinner.js.map +1 -0
  62. package/dist/base/structure.js +1 -1
  63. package/dist/base/table.js +1 -1
  64. package/dist/base/text-inputs.js +2 -2
  65. package/dist/base/toaster.js +46 -45
  66. package/dist/base/toaster.js.map +1 -1
  67. package/dist/base/tree.js +1 -1
  68. package/dist/base/upload-queue.js +1 -1
  69. package/dist/base/upload.js +3 -3
  70. package/dist/base/value-inputs.js +1 -1
  71. package/dist/{batch-action-bar-BZGDG-Si.js → batch-action-bar-DnUJ21NQ.js} +6 -5
  72. package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
  73. package/dist/blocks/admin.js +42 -42
  74. package/dist/blocks/admin.js.map +1 -1
  75. package/dist/blocks/ai.js +260 -240
  76. package/dist/blocks/ai.js.map +1 -1
  77. package/dist/blocks/analytics/usage-card.js +1 -1
  78. package/dist/blocks/analytics.js +620 -585
  79. package/dist/blocks/analytics.js.map +1 -1
  80. package/dist/blocks/collaboration.js +1 -1
  81. package/dist/blocks/commerce/receipt.js +1 -1
  82. package/dist/blocks/commerce.js +1152 -1109
  83. package/dist/blocks/commerce.js.map +1 -1
  84. package/dist/blocks/data-display.js +2 -2
  85. package/dist/blocks/onboarding.js +48 -39
  86. package/dist/blocks/onboarding.js.map +1 -1
  87. package/dist/blocks/planning.js +13 -12
  88. package/dist/blocks/planning.js.map +1 -1
  89. package/dist/blocks/timelines.js +1 -1
  90. package/dist/{breadcrumbs-D5t7I023.js → breadcrumbs-C-oqs1sQ.js} +5 -5
  91. package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
  92. package/dist/{button-QYwiyhD2.js → button-DVzspB_G.js} +2 -2
  93. package/dist/{button-QYwiyhD2.js.map → button-DVzspB_G.js.map} +1 -1
  94. package/dist/{buttons-SbIcm1HJ.js → buttons-DPZekJFu.js} +20 -15
  95. package/dist/buttons-DPZekJFu.js.map +1 -0
  96. package/dist/cards-BaBZR-AU.js +68 -0
  97. package/dist/cards-BaBZR-AU.js.map +1 -0
  98. package/dist/{chart-QfrARkXl.js → chart-ZOYyK2xG.js} +58 -55
  99. package/dist/chart-ZOYyK2xG.js.map +1 -0
  100. package/dist/{checkbox-DhB6K0bK.js → checkbox-AWIhNhmo.js} +2 -2
  101. package/dist/{checkbox-DhB6K0bK.js.map → checkbox-AWIhNhmo.js.map} +1 -1
  102. package/dist/{choice-inputs-t6w3ATNz.js → choice-inputs-CNHvARCJ.js} +49 -45
  103. package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
  104. package/dist/{code-block-Dgbu-CU3.js → code-block-DeneBJR_.js} +8 -8
  105. package/dist/code-block-DeneBJR_.js.map +1 -0
  106. package/dist/{collapsible-D8AEGU1-.js → collapsible-C-_l4hpy.js} +3 -3
  107. package/dist/{collapsible-D8AEGU1-.js.map → collapsible-C-_l4hpy.js.map} +1 -1
  108. package/dist/{collection-content-uK16Grv0.js → collection-content-By56pLog.js} +3 -3
  109. package/dist/{collection-content-uK16Grv0.js.map → collection-content-By56pLog.js.map} +1 -1
  110. package/dist/combobox-DaHESuiL.js +355 -0
  111. package/dist/combobox-DaHESuiL.js.map +1 -0
  112. package/dist/{combobox-DLl0bfiq.js → combobox-Dxo2fAYQ.js} +289 -279
  113. package/dist/combobox-Dxo2fAYQ.js.map +1 -0
  114. package/dist/{command-kNR20o7x.js → command-C25VMRII.js} +7 -7
  115. package/dist/{command-kNR20o7x.js.map → command-C25VMRII.js.map} +1 -1
  116. package/dist/{comments-BpDuCUUu.js → comments-DD0DUPwJ.js} +114 -105
  117. package/dist/comments-DD0DUPwJ.js.map +1 -0
  118. package/dist/components/base/badge/badge.recipes.d.ts +1 -1
  119. package/dist/components/base/buttons/loader-button.d.ts +2 -1
  120. package/dist/components/base/cards/card.recipes.d.ts +2 -3
  121. package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
  122. package/dist/components/base/cards/smart-card.types.d.ts +11 -4
  123. package/dist/components/base/chart/chart.d.ts +2 -5
  124. package/dist/components/base/combobox/combobox-field.d.ts +16 -0
  125. package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
  126. package/dist/components/base/combobox/index.d.ts +30 -4
  127. package/dist/components/base/forms/form-sizing.d.ts +11 -3
  128. package/dist/components/base/navigation/pagination.d.ts +5 -2
  129. package/dist/components/base/popover/popover.recipes.d.ts +15 -1
  130. package/dist/components/base/table/index.d.ts +9 -2
  131. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  132. package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
  133. package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
  134. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +3 -1
  135. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
  136. package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
  137. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
  138. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
  139. package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
  140. package/dist/components/features/appointment-calendar/index.d.ts +3 -0
  141. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
  142. package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
  143. package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
  144. package/dist/components/features/combobox/types.d.ts +4 -0
  145. package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
  146. package/dist/components/features/rich-text-editor/index.d.ts +1 -1
  147. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +6 -0
  148. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +9 -1
  149. package/dist/components/features/table/table-header.d.ts +1 -1
  150. package/dist/components/features/table/table.strings.d.ts +55 -1
  151. package/dist/components/features/table/table.types.d.ts +17 -4
  152. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
  153. package/dist/components/primitives/number.d.ts +4 -2
  154. package/dist/components/primitives/value.d.ts +3 -1
  155. package/dist/components/typography/text-link.d.ts +4 -0
  156. package/dist/components/ui/combobox-dismiss.d.ts +16 -0
  157. package/dist/components/ui/combobox.d.ts +16 -7
  158. package/dist/components/ui/dialog.d.ts +1 -1
  159. package/dist/components/ui/item.d.ts +8 -8
  160. package/dist/components/ui/popover.d.ts +1 -1
  161. package/dist/components/ui/sheet.d.ts +1 -1
  162. package/dist/components/ui/tabs.d.ts +1 -1
  163. package/dist/{containers-DmWiJa2I.js → containers-Mu1LMGV1.js} +2 -2
  164. package/dist/{containers-DmWiJa2I.js.map → containers-Mu1LMGV1.js.map} +1 -1
  165. package/dist/{copyable-B3Gwgdqc.js → copyable-ClBuk_UK.js} +4 -4
  166. package/dist/{copyable-B3Gwgdqc.js.map → copyable-ClBuk_UK.js.map} +1 -1
  167. package/dist/{data-display-DafIvCl5.js → data-display-DT_khPl_.js} +98 -87
  168. package/dist/data-display-DT_khPl_.js.map +1 -0
  169. package/dist/{date-BgK3bTdo.js → date-DCrsDTZc.js} +5 -5
  170. package/dist/{date-BgK3bTdo.js.map → date-DCrsDTZc.js.map} +1 -1
  171. package/dist/{date-picker-CF-DtUpF.js → date-picker-B2K3ucWn.js} +594 -593
  172. package/dist/date-picker-B2K3ucWn.js.map +1 -0
  173. package/dist/date-pickers-Ds8gLaoP.js +175 -0
  174. package/dist/date-pickers-Ds8gLaoP.js.map +1 -0
  175. package/dist/{display-DsQTVzMz.js → display-hAc1HjpI.js} +49 -49
  176. package/dist/display-hAc1HjpI.js.map +1 -0
  177. package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
  178. package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
  179. package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
  180. package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
  181. package/dist/features/activities.js +398 -375
  182. package/dist/features/activities.js.map +1 -1
  183. package/dist/features/ai-chat.js +188 -179
  184. package/dist/features/ai-chat.js.map +1 -1
  185. package/dist/features/appointment-calendar.js +683 -0
  186. package/dist/features/appointment-calendar.js.map +1 -0
  187. package/dist/features/async-preview.js +109 -107
  188. package/dist/features/async-preview.js.map +1 -1
  189. package/dist/features/combobox.js +1 -1
  190. package/dist/features/comments.js +1 -1
  191. package/dist/features/data-view.js +137 -137
  192. package/dist/features/data-view.js.map +1 -1
  193. package/dist/features/email-composer.js +255 -255
  194. package/dist/features/email-composer.js.map +1 -1
  195. package/dist/features/event-calendar.js +254 -248
  196. package/dist/features/event-calendar.js.map +1 -1
  197. package/dist/features/filters.js +1 -1
  198. package/dist/features/global-search.js +35 -32
  199. package/dist/features/global-search.js.map +1 -1
  200. package/dist/features/kanban.js +118 -117
  201. package/dist/features/kanban.js.map +1 -1
  202. package/dist/features/map.js +233 -231
  203. package/dist/features/map.js.map +1 -1
  204. package/dist/features/media-library.js +789 -775
  205. package/dist/features/media-library.js.map +1 -1
  206. package/dist/features/mentions.js +1 -1
  207. package/dist/features/overlays.js +1 -1
  208. package/dist/features/products.js +922 -902
  209. package/dist/features/products.js.map +1 -1
  210. package/dist/features/questionnaire.js +28 -24
  211. package/dist/features/questionnaire.js.map +1 -1
  212. package/dist/features/resource-assignment.js +18 -15
  213. package/dist/features/resource-assignment.js.map +1 -1
  214. package/dist/features/resource.js +12 -12
  215. package/dist/features/resource.js.map +1 -1
  216. package/dist/features/rich-text-editor.js +2 -2
  217. package/dist/features/schema-form.js +15 -13
  218. package/dist/features/schema-form.js.map +1 -1
  219. package/dist/features/suggestions.js +3 -3
  220. package/dist/features/sync.js +11 -5
  221. package/dist/features/sync.js.map +1 -1
  222. package/dist/features/table.js +1 -1
  223. package/dist/features/theme-tweaker.js +493 -489
  224. package/dist/features/theme-tweaker.js.map +1 -1
  225. package/dist/feedback-BYIhtitP.js +239 -0
  226. package/dist/feedback-BYIhtitP.js.map +1 -0
  227. package/dist/{field-affordance-recipes-qQeIf4lG.js → field-affordance-recipes-DZhnIL_Y.js} +11 -18
  228. package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
  229. package/dist/{filters-BkHH53uv.js → filters-DJVAveHA.js} +589 -580
  230. package/dist/filters-DJVAveHA.js.map +1 -0
  231. package/dist/{form-field-DUt4UxSV.js → form-field-CwH9y77i.js} +6 -5
  232. package/dist/form-field-CwH9y77i.js.map +1 -0
  233. package/dist/{form-sizing-By94KzXE.js → form-sizing-BdP_Mf5p.js} +39 -44
  234. package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
  235. package/dist/{forms-Bzha-Y3B.js → forms-B9G_xwzi.js} +8 -8
  236. package/dist/{forms-Bzha-Y3B.js.map → forms-B9G_xwzi.js.map} +1 -1
  237. package/dist/{forms-numeric-C0bvjRPZ.js → forms-numeric-B_jraJaQ.js} +309 -309
  238. package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
  239. package/dist/{header-BOefOKd1.js → header-BSfIEWbI.js} +160 -153
  240. package/dist/header-BSfIEWbI.js.map +1 -0
  241. package/dist/{hooks-9k_TtmKh.js → hooks-ClH9thn4.js} +2 -2
  242. package/dist/{hooks-9k_TtmKh.js.map → hooks-ClH9thn4.js.map} +1 -1
  243. package/dist/{icon-badge-CAuKupo9.js → icon-badge-DYKIwvOV.js} +4 -4
  244. package/dist/{icon-badge-CAuKupo9.js.map → icon-badge-DYKIwvOV.js.map} +1 -1
  245. package/dist/index.js +3 -3
  246. package/dist/input-CZw8iU99.js +21 -0
  247. package/dist/input-CZw8iU99.js.map +1 -0
  248. package/dist/input-DQdEd0YD.js +263 -0
  249. package/dist/input-DQdEd0YD.js.map +1 -0
  250. package/dist/{interaction-recipes-CHr0dJUs.js → interaction-recipes-XR9ZpVYL.js} +2 -1
  251. package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
  252. package/dist/item-K5_ghvze.js +275 -0
  253. package/dist/item-K5_ghvze.js.map +1 -0
  254. package/dist/layout/app-shell.js +1 -1
  255. package/dist/layout/auth.js +1 -1
  256. package/dist/layout/containers.js +1 -1
  257. package/dist/layout/header.js +1 -1
  258. package/dist/layout/hooks.js +1 -1
  259. package/dist/layout/navigation.js +1 -1
  260. package/dist/layout/page.js +1 -1
  261. package/dist/layout/settings.js +1 -1
  262. package/dist/layout/sidebar.js +2 -2
  263. package/dist/layout/workspace.js +1 -1
  264. package/dist/layout.js +10 -10
  265. package/dist/lib/affordance-geometry.generated.d.ts +71 -0
  266. package/dist/lib/editable-text-recipe.d.ts +4 -4
  267. package/dist/lib/field-affordance-recipes.d.ts +2 -2
  268. package/dist/lib/interaction-recipes.d.ts +5 -0
  269. package/dist/lib/theme-mode-css.d.ts +7 -0
  270. package/dist/lib/tone-recipes.d.ts +8 -0
  271. package/dist/lib/ui-provider/types.d.ts +2 -2
  272. package/dist/lib/use-popup-focus-recovery.d.ts +8 -0
  273. package/dist/lib/utils.js +1 -1
  274. package/dist/{media-gallery-DcTtAaeC.js → media-gallery-3zIVLMWH.js} +8 -8
  275. package/dist/media-gallery-3zIVLMWH.js.map +1 -0
  276. package/dist/{mentions-D-uyCh01.js → mentions-CGlEJ15c.js} +144 -142
  277. package/dist/mentions-CGlEJ15c.js.map +1 -0
  278. package/dist/{message-CdHgIWKf.js → message-DZ_ruyUV.js} +6 -5
  279. package/dist/message-DZ_ruyUV.js.map +1 -0
  280. package/dist/{metadata-list-X5rYAKSB.js → metadata-list-8N16ZMW_.js} +130 -119
  281. package/dist/metadata-list-8N16ZMW_.js.map +1 -0
  282. package/dist/{navigation-D3KwXmaq.js → navigation-Bnotn4AQ.js} +19 -19
  283. package/dist/navigation-Bnotn4AQ.js.map +1 -0
  284. package/dist/{navigation-HJf5zxlH.js → navigation-BzhHI3lo.js} +36 -35
  285. package/dist/navigation-BzhHI3lo.js.map +1 -0
  286. package/dist/{navigation-row-recipes-BVowojQw.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
  287. package/dist/{navigation-row-recipes-BVowojQw.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
  288. package/dist/{number-DMhe-Vsk.js → number-DbV1Dija.js} +36 -34
  289. package/dist/{number-DMhe-Vsk.js.map → number-DbV1Dija.js.map} +1 -1
  290. package/dist/{overflow-tab-bar-sQHXLlwQ.js → overflow-tab-bar-CWY7Nogn.js} +105 -103
  291. package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
  292. package/dist/{overlays-I0axtYA6.js → overlays-tMkF-VAN.js} +282 -278
  293. package/dist/overlays-tMkF-VAN.js.map +1 -0
  294. package/dist/{page-B5dTH9gE.js → page-CL9YeH_V.js} +8 -8
  295. package/dist/{page-B5dTH9gE.js.map → page-CL9YeH_V.js.map} +1 -1
  296. package/dist/{page-header-commands-DjzFEq3E.js → page-header-commands-DOb6WsfD.js} +5 -5
  297. package/dist/{page-header-commands-DjzFEq3E.js.map → page-header-commands-DOb6WsfD.js.map} +1 -1
  298. package/dist/pagination-BL25hu2s.js +158 -0
  299. package/dist/pagination-BL25hu2s.js.map +1 -0
  300. package/dist/{popover-Di55PyAI.js → popover-gnTOhbFM.js} +69 -66
  301. package/dist/popover-gnTOhbFM.js.map +1 -0
  302. package/dist/popover-menu-Cn9rUkdc.js +100 -0
  303. package/dist/popover-menu-Cn9rUkdc.js.map +1 -0
  304. package/dist/{popover.recipes-Bdyhj2db.js → popover.recipes-D3j8R8Yp.js} +17 -10
  305. package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
  306. package/dist/{primitives-B-CkiEMU.js → primitives-BFK08r9M.js} +45 -44
  307. package/dist/primitives-BFK08r9M.js.map +1 -0
  308. package/dist/primitives.js +4 -4
  309. package/dist/{progress-rnS8-uAW.js → progress-B1VnCT0K.js} +5 -5
  310. package/dist/{progress-rnS8-uAW.js.map → progress-B1VnCT0K.js.map} +1 -1
  311. package/dist/{receipt-D0oswZ0p.js → receipt-BVSOH3Xo.js} +9 -6
  312. package/dist/{receipt-D0oswZ0p.js.map → receipt-BVSOH3Xo.js.map} +1 -1
  313. package/dist/{rich-text-DvGulsNJ.js → rich-text-GOUyKQ-s.js} +3 -3
  314. package/dist/{rich-text-DvGulsNJ.js.map → rich-text-GOUyKQ-s.js.map} +1 -1
  315. package/dist/{rich-text-editor-sMU_Scqm.js → rich-text-editor-cRLC-eBK.js} +418 -426
  316. package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
  317. package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
  318. package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
  319. package/dist/{scroll-area-Bt_vXY2b.js → scroll-area-DcI-M1UT.js} +2 -2
  320. package/dist/{scroll-area-Bt_vXY2b.js.map → scroll-area-DcI-M1UT.js.map} +1 -1
  321. package/dist/{separator-C8DlRGwF.js → separator-BDV-Y648.js} +3 -3
  322. package/dist/{separator-C8DlRGwF.js.map → separator-BDV-Y648.js.map} +1 -1
  323. package/dist/{separator-CYHnjsAb.js → separator-Bom7NsGO.js} +2 -2
  324. package/dist/{separator-CYHnjsAb.js.map → separator-Bom7NsGO.js.map} +1 -1
  325. package/dist/services/actions.js +1 -1
  326. package/dist/{settings-CQW3b-Cu.js → settings-ybnjVwbd.js} +20 -19
  327. package/dist/settings-ybnjVwbd.js.map +1 -0
  328. package/dist/{sheet-4SEvVYzA.js → sheet-ijlsjq-n.js} +76 -73
  329. package/dist/sheet-ijlsjq-n.js.map +1 -0
  330. package/dist/{sidebar-C7WWR29L.js → sidebar-Db6gkh3U.js} +183 -182
  331. package/dist/sidebar-Db6gkh3U.js.map +1 -0
  332. package/dist/{sidebar-d7Dg80ln.js → sidebar-DkTO4VTO.js} +14 -13
  333. package/dist/{sidebar-d7Dg80ln.js.map → sidebar-DkTO4VTO.js.map} +1 -1
  334. package/dist/{skeleton-Cz890JZF.js → skeleton-Byjnt7qr.js} +3 -3
  335. package/dist/{skeleton-Cz890JZF.js.map → skeleton-Byjnt7qr.js.map} +1 -1
  336. package/dist/smart-card-DiC5aac3.js +604 -0
  337. package/dist/smart-card-DiC5aac3.js.map +1 -0
  338. package/dist/{structure-DC2dygdA.js → structure-BmisBK-3.js} +2 -2
  339. package/dist/{structure-DC2dygdA.js.map → structure-BmisBK-3.js.map} +1 -1
  340. package/dist/style.css +1 -1
  341. package/dist/table-BweFy_P9.js +1530 -0
  342. package/dist/table-BweFy_P9.js.map +1 -0
  343. package/dist/{table-CIKyLUsy.js → table-DsfzoUia.js} +75 -63
  344. package/dist/table-DsfzoUia.js.map +1 -0
  345. package/dist/{tabs-DwBJfjxX.js → tabs-CDocW5D1.js} +14 -13
  346. package/dist/tabs-CDocW5D1.js.map +1 -0
  347. package/dist/text-inputs-f9Ia-aCi.js +353 -0
  348. package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
  349. package/dist/theme-mode-css-BB-_RYab.js +14 -0
  350. package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
  351. package/dist/theme-scope-BJ6eE2xt.js +50 -0
  352. package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
  353. package/dist/theme.css +285 -228
  354. package/dist/themes/green.css +16 -12
  355. package/dist/timelines-CwM_9IhD.js +457 -0
  356. package/dist/timelines-CwM_9IhD.js.map +1 -0
  357. package/dist/{tone-recipes-CPoExcTE.js → tone-recipes-BPsRAvhu.js} +5 -2
  358. package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
  359. package/dist/{tooltip-CsfgrfS7.js → tooltip-yiRJUFjp.js} +4 -4
  360. package/dist/{tooltip-CsfgrfS7.js.map → tooltip-yiRJUFjp.js.map} +1 -1
  361. package/dist/{tree-BiKhg8AY.js → tree-WnKQzwbq.js} +9 -9
  362. package/dist/{tree-BiKhg8AY.js.map → tree-WnKQzwbq.js.map} +1 -1
  363. package/dist/typography/rich-text.js +1 -1
  364. package/dist/{typography-DTRkE9zL.js → typography-UTnveOEy.js} +6 -6
  365. package/dist/typography-UTnveOEy.js.map +1 -0
  366. package/dist/typography.js +2 -2
  367. package/dist/{ui-provider-1D_NSYzO.js → ui-provider-C_U0Xma4.js} +3 -3
  368. package/dist/ui-provider-C_U0Xma4.js.map +1 -0
  369. package/dist/ui-provider.js +2 -2
  370. package/dist/{upload-BO8-CLN6.js → upload-CXyxmQBP.js} +13 -12
  371. package/dist/upload-CXyxmQBP.js.map +1 -0
  372. package/dist/{upload-queue-EOC8g1gf.js → upload-queue-Boscubn9.js} +11 -9
  373. package/dist/upload-queue-Boscubn9.js.map +1 -0
  374. package/dist/{usage-card-obRaBskq.js → usage-card-BhO5eqkX.js} +53 -37
  375. package/dist/usage-card-BhO5eqkX.js.map +1 -0
  376. package/dist/use-popup-focus-recovery-C0QPvgOR.js +36 -0
  377. package/dist/use-popup-focus-recovery-C0QPvgOR.js.map +1 -0
  378. package/dist/{utils-l5LpDw2z.js → utils-BRhFDwuU.js} +59 -44
  379. package/dist/utils-BRhFDwuU.js.map +1 -0
  380. package/dist/{value-inputs-TAYMX111.js → value-inputs-TaX4OjNk.js} +268 -252
  381. package/dist/value-inputs-TaX4OjNk.js.map +1 -0
  382. package/dist/{value-typography-b8wpz1eX.js → value-typography-BP8OG6h5.js} +2 -2
  383. package/dist/{value-typography-b8wpz1eX.js.map → value-typography-BP8OG6h5.js.map} +1 -1
  384. package/dist/{workspace-DH0v0KcB.js → workspace-B-OEm3Kf.js} +34 -33
  385. package/dist/workspace-B-OEm3Kf.js.map +1 -0
  386. package/docs/consumer-skill/SKILL.md +3 -3
  387. package/docs/consumer-skill/references/agents-md.md +1 -1
  388. package/docs/consumer-skill/references/composition.md +8 -6
  389. package/docs/consumer-skill/references/installation.md +6 -0
  390. package/docs/consumer-skill/references/integration.md +4 -3
  391. package/docs/consumer-skill/references/public-api.json +105 -2
  392. package/docs/consumer-skill/references/review.md +7 -0
  393. package/docs/consumer-skill/references/theming.md +71 -6
  394. package/docs/consumer-skill/references/tokens.json +1 -1
  395. package/docs/consumer-skill/references/workflows.md +26 -0
  396. package/docs/consumer-skill/scripts/composition-policy.mjs +3 -2
  397. package/docs/consumer-skill/scripts/surface-policy.mjs +11 -0
  398. package/package.json +8 -4
  399. package/dist/accordion-B6a3vVgA.js.map +0 -1
  400. package/dist/action-menu-TzCoSlwL.js +0 -280
  401. package/dist/action-menu-TzCoSlwL.js.map +0 -1
  402. package/dist/affordance-geometry.generated-B5iu-Mkr.js +0 -69
  403. package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +0 -1
  404. package/dist/ai-artifact-BMJdv-6q.js +0 -1115
  405. package/dist/ai-artifact-BMJdv-6q.js.map +0 -1
  406. package/dist/attachment-BtfhGm8i.js +0 -245
  407. package/dist/attachment-BtfhGm8i.js.map +0 -1
  408. package/dist/auth-CYxKfo69.js.map +0 -1
  409. package/dist/avatar-BBnEJIx8.js.map +0 -1
  410. package/dist/badge-MrKVNzW9.js.map +0 -1
  411. package/dist/batch-action-bar-BZGDG-Si.js.map +0 -1
  412. package/dist/breadcrumbs-D5t7I023.js.map +0 -1
  413. package/dist/buttons-SbIcm1HJ.js.map +0 -1
  414. package/dist/cards-CiiHpKYd.js +0 -66
  415. package/dist/cards-CiiHpKYd.js.map +0 -1
  416. package/dist/chart-QfrARkXl.js.map +0 -1
  417. package/dist/choice-inputs-t6w3ATNz.js.map +0 -1
  418. package/dist/code-block-Dgbu-CU3.js.map +0 -1
  419. package/dist/combobox-2Ic8N9bL.js +0 -278
  420. package/dist/combobox-2Ic8N9bL.js.map +0 -1
  421. package/dist/combobox-DLl0bfiq.js.map +0 -1
  422. package/dist/comments-BpDuCUUu.js.map +0 -1
  423. package/dist/data-display-DafIvCl5.js.map +0 -1
  424. package/dist/date-picker-CF-DtUpF.js.map +0 -1
  425. package/dist/date-pickers-BmzxJl5l.js +0 -174
  426. package/dist/date-pickers-BmzxJl5l.js.map +0 -1
  427. package/dist/display-DsQTVzMz.js.map +0 -1
  428. package/dist/dropdown-menu-E2qmdC7o.js +0 -193
  429. package/dist/dropdown-menu-E2qmdC7o.js.map +0 -1
  430. package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
  431. package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
  432. package/dist/feedback-qNuMBtRH.js +0 -233
  433. package/dist/feedback-qNuMBtRH.js.map +0 -1
  434. package/dist/field-affordance-recipes-qQeIf4lG.js.map +0 -1
  435. package/dist/filters-BkHH53uv.js.map +0 -1
  436. package/dist/form-field-DUt4UxSV.js.map +0 -1
  437. package/dist/form-sizing-By94KzXE.js.map +0 -1
  438. package/dist/forms-numeric-C0bvjRPZ.js.map +0 -1
  439. package/dist/header-BOefOKd1.js.map +0 -1
  440. package/dist/input-DWhBBBww.js +0 -262
  441. package/dist/input-DWhBBBww.js.map +0 -1
  442. package/dist/input-Ddi_LSYv.js +0 -20
  443. package/dist/input-Ddi_LSYv.js.map +0 -1
  444. package/dist/interaction-recipes-CHr0dJUs.js.map +0 -1
  445. package/dist/item-DEmDiTlD.js +0 -265
  446. package/dist/item-DEmDiTlD.js.map +0 -1
  447. package/dist/media-gallery-DcTtAaeC.js.map +0 -1
  448. package/dist/mentions-D-uyCh01.js.map +0 -1
  449. package/dist/message-CdHgIWKf.js.map +0 -1
  450. package/dist/metadata-list-X5rYAKSB.js.map +0 -1
  451. package/dist/navigation-D3KwXmaq.js.map +0 -1
  452. package/dist/navigation-HJf5zxlH.js.map +0 -1
  453. package/dist/overflow-tab-bar-sQHXLlwQ.js.map +0 -1
  454. package/dist/overlays-I0axtYA6.js.map +0 -1
  455. package/dist/pagination-3bPA_a6K.js +0 -149
  456. package/dist/pagination-3bPA_a6K.js.map +0 -1
  457. package/dist/popover-Di55PyAI.js.map +0 -1
  458. package/dist/popover-menu-B71Tn2Qz.js +0 -99
  459. package/dist/popover-menu-B71Tn2Qz.js.map +0 -1
  460. package/dist/popover.recipes-Bdyhj2db.js.map +0 -1
  461. package/dist/primitives-B-CkiEMU.js.map +0 -1
  462. package/dist/rich-text-editor-sMU_Scqm.js.map +0 -1
  463. package/dist/rich-text-editor.recipes-CadiF_Uu.js +0 -88
  464. package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +0 -1
  465. package/dist/settings-CQW3b-Cu.js.map +0 -1
  466. package/dist/sheet-4SEvVYzA.js.map +0 -1
  467. package/dist/sidebar-C7WWR29L.js.map +0 -1
  468. package/dist/smart-card-lFKxn5Hu.js +0 -595
  469. package/dist/smart-card-lFKxn5Hu.js.map +0 -1
  470. package/dist/spinner-fa3h1Aif.js +0 -80
  471. package/dist/spinner-fa3h1Aif.js.map +0 -1
  472. package/dist/table-CIKyLUsy.js.map +0 -1
  473. package/dist/table-CrcLN9Io.js +0 -1458
  474. package/dist/table-CrcLN9Io.js.map +0 -1
  475. package/dist/tabs-DwBJfjxX.js.map +0 -1
  476. package/dist/text-inputs-aaK9wcDT.js +0 -326
  477. package/dist/text-inputs-aaK9wcDT.js.map +0 -1
  478. package/dist/theme-scope-kStaAer0.js +0 -39
  479. package/dist/theme-scope-kStaAer0.js.map +0 -1
  480. package/dist/timelines-C_SBwHNP.js +0 -442
  481. package/dist/timelines-C_SBwHNP.js.map +0 -1
  482. package/dist/tone-recipes-CPoExcTE.js.map +0 -1
  483. package/dist/typography-DTRkE9zL.js.map +0 -1
  484. package/dist/ui-provider-1D_NSYzO.js.map +0 -1
  485. package/dist/upload-BO8-CLN6.js.map +0 -1
  486. package/dist/upload-queue-EOC8g1gf.js.map +0 -1
  487. package/dist/usage-card-obRaBskq.js.map +0 -1
  488. package/dist/utils-l5LpDw2z.js.map +0 -1
  489. package/dist/value-inputs-TAYMX111.js.map +0 -1
  490. package/dist/workspace-DH0v0KcB.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlays-tMkF-VAN.js","names":["Dialog","DialogPrimitive","DialogTrigger","DialogClose","DialogContent","Button","DialogHeader","DialogFooter","DialogTitle","DialogDescription","isSimpleText","titleTypography","Dialog","DialogPrimitive","React","DialogTriggerPrimitive","DialogClosePrimitive","DialogContentPrimitive","DialogHeaderPrimitive","DialogFooterPrimitive","DialogTitlePrimitive","DialogDescriptionPrimitive","BaseDialog","AlertDialog","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogContent","AlertDialogFooter","AlertDialogMedia","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","Button","AlertDialogCancel","AlertDialog","AlertDialogPrimitive","React","AlertDialogTriggerPrimitive","AlertDialogContentPrimitive","AlertDialogFooterPrimitive","AlertDialogTitlePrimitive","AlertDialogDescriptionPrimitive","AlertDialogMediaPrimitive","AlertDialogActionPrimitive","AlertDialogCancelPrimitive","BaseAlertDialog","useOverlayConfig","useThemePortalContainer","cn","SheetDescription","SheetTitle","SheetContent","SheetTrigger","SheetBody","SheetFooter","SheetClose","SheetHeader","Sheet","overlayAnatomyRecipes","Button","Text","textSizes","textLineHeights","textWeights","motionRecipes","Slot","Button$1","Stack","toneRecipes","AlertDescription","Alert","surfaceDividerRecipes","modalRegionRecipes","modalBackdropRecipe","usePopupFocusRecovery","interactionRecipes","React$1","Dialog$2","props","Dialog","DialogTrigger$1","renderSlot","asChild","DialogPortal","resolvedContainer","container","DialogClose$1","DialogOverlay","className","DialogContent$1","recoverFocus","onFocusCapture","children","showCloseButton","XIcon","DialogHeader$1","DialogFooter$1","DialogTitle$1","DialogDescription$1","isSimpleText$1","value","titleTypography$1","Dialog$1","DialogTrigger","DialogClose","DialogContent","DialogHeader","textGap","DialogBody","DialogFooter","DialogTitle","DialogDescription","defaultOverlayStrings","defaultAlertDialogStrings","useOverlayActions","strings","useStrings","customStrings","isExecuting","setIsExecuting","useState","executingRef","useRef","handleConfirm","useCallback","onConfirm","closeDialog","onAsyncConfirm","closeOnAsyncComplete","error","onError","loading","handleCancel","onCancel","handleFormSubmit","formId","form","useMemo","emphasis","tone","confirmTone","resolveOpenValue","nextOpen","currentOpen","normalizeGroupState","result","key","keys","state","hasGroupStateChanged","previous","next","useOverlayVisibility","controlledOpen","internalOpen","setInternalOpen","defaultOpen","isControlled","open","openRef","setOpen","resolvedOpen","changed","onOpenChange","onOpen","onClose","useOverlayVisibilityGroup","keyList","stateRef","setKeyOpen","previousState","nextState","closeOthersOnOpen","item","usePendingOverlayFocus","popupRef","useLayoutEffect","popup","pending","modal","active","overlayToneGlyphs","HelpCircle","AlertCircle","AlertTriangle","Info","CheckCircle","OverlayToneIcon","Glyph","color","SIZE_CLASSES","ActionDialogImpl","centered","align","defaultDialogAlign","visibility","pendingFocusRef","effectiveLoading","hasContent","alertMessage","hasFooter","showCancel","showConfirm","footer","closeOnBackdropClick","details","closeOnEscape","trigger","isValidElement","surfaceStyle","initialFocusRef","title","size","description","visuallyHideHeader","showIcon","contentClassName","finalConfirmTone","confirmStyle","confirmButtonOnClick","X","ActionDialog","memo","WIDTH_CLASSES","ActionDrawerImpl","isHorizontal","direction","showFooter","width","ActionDrawer","AlertDialog$2","AlertDialog","AlertDialogTrigger$1","AlertDialogPortal","AlertDialogOverlay","AlertDialogContent$1","AlertDialogFooter$1","AlertDialogMedia$1","AlertDialogTitle$1","AlertDialogDescription$1","AlertDialogAction$1","AlertDialogCancel$1","isSimpleText","titleTypography","AlertDialog$1","AlertDialogTrigger","AlertDialogContent","AlertDialogHeader","AlertDialogBody","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogMedia","AlertDialogAction","AlertDialogCancel","ConfirmDialogImpl","resolvedAlign","defaultConfirmAlign","mergedStrings","resolvedConfirmTone","destructive","resolvedTone","toneGlyph","hasHeading","ConfirmDialog"],"sources":["../src/components/ui/dialog.tsx","../src/components/base/display/dialog.tsx","../src/components/features/overlays/overlays.strings.ts","../src/components/features/overlays/hooks/use-overlay-actions.ts","../src/components/features/overlays/hooks/use-overlay-visibility.ts","../src/components/features/overlays/hooks/use-pending-overlay-focus.ts","../src/components/features/overlays/overlay-tone-icon.tsx","../src/components/features/overlays/dialog.tsx","../src/components/features/overlays/drawer.tsx","../src/components/ui/alert-dialog.tsx","../src/components/base/display/alert-dialog.tsx","../src/components/features/overlays/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { overlayAnatomyRecipes } from '../../lib/overlay-anatomy-recipes';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { modalBackdropRecipe } from './overlay.recipes';\nimport { usePopupFocusRecovery } from '../../lib/use-popup-focus-recovery';\n\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\n\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\"\nimport { XIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"./button\"\nimport { Slot } from \"./slot\"\nimport { cn } from \"../../lib/utils\"\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" modal=\"trap-focus\" {...props} />\n}\n\nfunction DialogTrigger({\n asChild = false,\n ...props\n}: DialogPrimitive.Trigger.Props & { asChild?: boolean }) {\n const renderSlot = asChild ? <Slot /> : undefined\n\n return (\n <DialogPrimitive.Trigger\n data-slot=\"dialog-trigger\"\n render={renderSlot}\n {...props}\n />\n )\n}\n\nfunction DialogPortal({ container, ...props }: DialogPrimitive.Portal.Props) {\n const resolvedContainer = useThemePortalContainer(container)\n return <DialogPrimitive.Portal container={resolvedContainer} data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(modalBackdropRecipe, motionRecipes.backdrop, \"isolate\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n container,\n children,\n showCloseButton = true,\n onFocusCapture,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean\n} & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n const recoverFocus = usePopupFocusRecovery(onFocusCapture)\n return (\n <DialogPortal container={resolvedContainer}>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n motionRecipes.dialog,\n \"bg-background grid max-w-[calc(100%-2rem)] gap-space-xl rounded-radius p-surface text-sm sm:max-w-md fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none\",\n className\n )}\n {...props}\n onFocusCapture={recoverFocus}\n >\n {children}\n {!!showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n data-overlay-close=\"\"\n className={overlayAnatomyRecipes.close}\n size=\"icon-sm\"\n />\n }\n >\n <XIcon\n />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {!!showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({\n className,\n asChild = false,\n ...props\n}: DialogPrimitive.Title.Props & { asChild?: boolean }) {\n const renderSlot = asChild ? <Slot /> : undefined\n\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n render={renderSlot}\n className={cn(\"leading-none font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n asChild = false,\n ...props\n}: DialogPrimitive.Description.Props & { asChild?: boolean }) {\n const renderSlot = asChild ? <Slot /> : undefined\n\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n render={renderSlot}\n className={cn(\"text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import { modalRegionRecipes, surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport { overlayAnatomyRecipes } from '../../../lib/overlay-anatomy-recipes';\nimport type { TextGap } from '../structure';\n/**\n * Dialog — internal modal anatomy behind `ActionDialog`.\n *\n * Not published from any entrypoint: applications use `ActionDialog` (or\n * `ConfirmDialog`) from `themelia-react-ui/features/overlays`, which owns the\n * lifecycle, focus, dismissal and action contract. This wrapper supplies the\n * modal geometry those features share: one framed popover surface whose\n * header, scrolling body and footer each own their inset, with exactly one rule\n * between adjacent visible regions (`modalRegionRecipes`).\n */\nimport * as React from 'react';\n\nimport {\n\tDialog as DialogPrimitive,\n\tDialogClose as DialogClosePrimitive,\n\tDialogContent as DialogContentPrimitive,\n\tDialogDescription as DialogDescriptionPrimitive,\n\tDialogFooter as DialogFooterPrimitive,\n\tDialogHeader as DialogHeaderPrimitive,\n\tDialogOverlay,\n\tDialogPortal,\n\tDialogTitle as DialogTitlePrimitive,\n\tDialogTrigger as DialogTriggerPrimitive,\n} from '../../ui/dialog';\nimport { Text } from '../../typography';\nimport { textLineHeights, textSizes, textWeights } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\n\nfunction isSimpleText(value: React.ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/**\n * The title element carries the canonical title role, so custom title nodes\n * match scalar titles and its line box never differs from the Text inside.\n * Descriptions keep the configurable Text default instead.\n */\nconst titleTypography = cn(textSizes.base, textWeights.semibold, textLineHeights.snug);\n\nexport const Dialog = DialogPrimitive;\n\nexport const DialogTrigger = React.forwardRef<\n\tReact.ElementRef<typeof DialogTriggerPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogTriggerPrimitive>\n>(function DialogTrigger({ className, ...props }, ref) {\n\treturn (\n\t\t<DialogTriggerPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('dialog-trigger--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogTrigger.displayName = 'DialogTrigger';\n\nexport const DialogClose = React.forwardRef<\n\tReact.ElementRef<typeof DialogClosePrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogClosePrimitive>\n>(function DialogClose({ className, ...props }, ref) {\n\treturn (\n\t\t<DialogClosePrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('dialog-close--component active:translate-y-0!', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogClose.displayName = 'DialogClose';\n\nexport const DialogContent = React.forwardRef<\n\tReact.ElementRef<typeof DialogContentPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogContentPrimitive>\n>(function DialogContent({ className, ...props }, ref) {\n\treturn (\n\t\t<DialogContentPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t// The shell is flush: each region owns its inset once and the rules\n\t\t\t\t// between regions run edge to edge.\n\t\t\t\t'dialog-content--component flex max-h-[min(90vh,48rem)] flex-col gap-0 overflow-hidden rounded-radius bg-popover p-0 text-popover-foreground shadow-xl sm:max-w-lg [&_[data-slot=dialog-close]]:active:translate-y-0!', surfaceDividerRecipes.modal.shell,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogContent.displayName = 'DialogContent';\n\nexport const DialogHeader = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof DialogHeaderPrimitive> & { textGap?: TextGap }\n>(function DialogHeader({ className, textGap = 'normal', ...props }, ref) {\n\treturn (\n\t\t<DialogHeaderPrimitive\n\t\t\tref={ref}\n\t\t\tdata-modal-region=\"\"\n\t\t\tclassName={cn(\n\t\t\t\t'dialog-header--component', modalRegionRecipes.header,\n\t\t\t\toverlayAnatomyRecipes.header,\n\t\t\t\ttextGap === 'dense' ? 'gap-dense' : 'gap-normal',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogHeader.displayName = 'DialogHeader';\n\n/** Scroll-owning content region between the pinned dialog header and footer. */\nexport const DialogBody = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\tfunction DialogBody({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"dialog-body\"\n\t\t\t\tdata-modal-region=\"\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'dialog-body--component', modalRegionRecipes.body,\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);\n\nDialogBody.displayName = 'DialogBody';\n\nexport const DialogFooter = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof DialogFooterPrimitive>\n>(function DialogFooter({ className, ...props }, ref) {\n\treturn (\n\t\t<DialogFooterPrimitive\n\t\t\tref={ref}\n\t\t\tdata-modal-region=\"\"\n\t\t\tclassName={cn(\n\t\t\t\t'dialog-footer--component', modalRegionRecipes.footer,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nDialogFooter.displayName = 'DialogFooter';\n\nexport const DialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof DialogTitlePrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogTitlePrimitive>\n>(function DialogTitle({ children, className, ...props }, ref) {\n\treturn (\n\t\t<DialogTitlePrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('dialog-title--component m-0', titleTypography, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"span\"\n\t\t\t\t\ttype=\"inherit\"\n\t\t\t\t\tsize=\"base\"\n\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\tlineHeight=\"snug\"\n\t\t\t\t\tclassName=\"dialog-title--text\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</DialogTitlePrimitive>\n\t);\n});\n\nDialogTitle.displayName = 'DialogTitle';\n\nexport const DialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof DialogDescriptionPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof DialogDescriptionPrimitive>\n>(function DialogDescription({ children, className, ...props }, ref) {\n\treturn (\n\t\t<DialogDescriptionPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('dialog-description--component m-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text\n\t\t\t\t\ttag=\"span\"\n\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\tlineHeight=\"relaxed\"\n\t\t\t\t\tclassName=\"dialog-description--text\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</DialogDescriptionPrimitive>\n\t);\n});\n\nDialogDescription.displayName = 'DialogDescription';\n\nexport { DialogOverlay, DialogPortal };\n","/**\n * Default user-facing strings shared by ActionDialog, ActionDrawer, and\n * ConfirmDialog recipes.\n *\n * Consumers wire backend i18n at the call site:\n *\n * <ActionDialog strings={{ confirm: t('common.confirm') }} … />\n */\n\nexport interface OverlayStrings {\n\tconfirm: string;\n\tcancel: string;\n\tclose: string;\n\tloading: string;\n\tdialogLabel: string;\n\tdrawerLabel: string;\n\talertDialogLabel: string;\n}\n\nexport const defaultOverlayStrings: OverlayStrings = {\n\tconfirm: 'Confirm',\n\tcancel: 'Cancel',\n\tclose: 'Close',\n\tloading: 'Loading...',\n\tdialogLabel: 'Dialog',\n\tdrawerLabel: 'Drawer',\n\talertDialogLabel: 'Confirmation',\n};\n\nexport const defaultAlertDialogStrings: OverlayStrings = {\n\tconfirm: 'Continue',\n\tcancel: 'Cancel',\n\tclose: 'Close',\n\tloading: 'Loading...',\n\tdialogLabel: 'Dialog',\n\tdrawerLabel: 'Drawer',\n\talertDialogLabel: 'Confirmation',\n};\n","import { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { useStrings, type StringsProp } from '../../../../lib/strings';\n\nimport {\n\tdefaultOverlayStrings,\n\ttype OverlayStrings,\n} from '../overlays.strings';\nimport type {\n\tOverlayButtonTone,\n\tOverlayActionProps,\n\tOverlayTone,\n} from '../overlays.types';\n\nexport interface UseOverlayActionsOptions\n\textends Pick<\n\t\tOverlayActionProps,\n\t\t| 'onConfirm'\n\t\t| 'onAsyncConfirm'\n\t\t| 'closeOnAsyncComplete'\n\t\t| 'confirmTone'\n\t\t| 'loading'\n\t\t| 'formId'\n\t> {\n\tcloseDialog: () => void;\n\tonCancel?: () => void;\n\tcustomStrings?: StringsProp<OverlayStrings>;\n\temphasis?: boolean;\n\ttone?: OverlayTone;\n\t/** Called when `onAsyncConfirm` throws; the consumer reports or retries.\n\t * Without it the library logs the rejection in development only. */\n\tonError?: (error: unknown) => void;\n}\n\nexport interface UseOverlayActionsReturn {\n\t/** Overrides this surface's own copy. */\n\tstrings: OverlayStrings;\n\tisExecuting: boolean;\n\thandleConfirm: () => Promise<void>;\n\thandleCancel: () => void;\n\tfinalConfirmTone: OverlayButtonTone;\n\tconfirmButtonOnClick: (() => Promise<void>) | undefined;\n\teffectiveLoading: boolean;\n}\n\nexport function useOverlayActions({\n\tcloseDialog,\n\tonConfirm,\n\tonAsyncConfirm,\n\tcloseOnAsyncComplete = true,\n\tconfirmTone = 'primary',\n\tloading = false,\n\tformId,\n\tonCancel,\n\tcustomStrings,\n\temphasis = false,\n\ttone = 'neutral',\n\tonError,\n}: UseOverlayActionsOptions): UseOverlayActionsReturn {\n\tconst strings = useStrings(defaultOverlayStrings, customStrings);\n\n\tconst [isExecuting, setIsExecuting] = useState(false);\n\tconst executingRef = useRef(false);\n\n\tconst handleConfirm = useCallback(async () => {\n\t\tif (loading || executingRef.current) return;\n\t\tif (onConfirm) {\n\t\t\tonConfirm();\n\t\t\tcloseDialog();\n\t\t\treturn;\n\t\t}\n\n\t\tif (onAsyncConfirm) {\n\t\t\texecutingRef.current = true;\n\t\t\tsetIsExecuting(true);\n\t\t\ttry {\n\t\t\t\tawait onAsyncConfirm();\n\t\t\t\tif (closeOnAsyncComplete) {\n\t\t\t\t\tcloseDialog();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t// A consumer that handles the failure owns its reporting; only an\n\t\t\t\t// unhandled rejection is surfaced in development.\n\t\t\t\tif (onError) onError(error);\n\t\t\t\telse if (import.meta.env?.DEV) console.error('Overlay async confirm failed:', error);\n\t\t\t} finally {\n\t\t\t\texecutingRef.current = false;\n\t\t\t\tsetIsExecuting(false);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tcloseDialog();\n\t}, [loading, onConfirm, onAsyncConfirm, closeOnAsyncComplete, closeDialog, onError]);\n\n\tconst handleCancel = useCallback(() => {\n\t\tif (loading || executingRef.current) return;\n\t\tonCancel?.();\n\t\tcloseDialog();\n\t}, [loading, onCancel, closeDialog]);\n\n\tconst handleFormSubmit = useCallback(async () => {\n\t\tif (!formId || loading || executingRef.current) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst form = document.getElementById(formId);\n\n\t\tif (!(form instanceof HTMLFormElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tform.requestSubmit();\n\t}, [formId, loading]);\n\n\tconst finalConfirmTone = useMemo<OverlayButtonTone>(() => {\n\t\tif (!emphasis) return confirmTone ?? 'primary';\n\t\tif (tone === 'destructive') return 'destructive';\n\t\tif (tone === 'warning') return 'warning';\n\t\tif (tone === 'success') return 'success';\n\t\treturn confirmTone ?? 'primary';\n\t}, [emphasis, tone, confirmTone]);\n\n\tconst confirmButtonOnClick = formId ? handleFormSubmit : handleConfirm;\n\n\treturn {\n\t\tstrings,\n\t\tisExecuting,\n\t\thandleConfirm,\n\t\thandleCancel,\n\t\tfinalConfirmTone,\n\t\tconfirmButtonOnClick,\n\t\teffectiveLoading: isExecuting || loading,\n\t};\n}\n","import {\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n\ttype Dispatch,\n\ttype SetStateAction,\n} from 'react';\n\nexport type OverlayOpenSetter = Dispatch<SetStateAction<boolean>>;\n\nexport interface OverlayVisibilityProps {\n\t/** Current visibility. */\n\topen: boolean;\n\t/** Requests a visibility change; spread both onto an overlay. */\n\tonOpenChange: (open: boolean) => void;\n}\n\nexport interface UseOverlayVisibilityOptions {\n\t/** Initial visibility when uncontrolled. Default: `false`. */\n\tdefaultOpen?: boolean;\n\t/** Controlled visibility. Omit to let the hook own it. */\n\topen?: boolean;\n\t/** Fired once for every actual visibility change. */\n\tonOpenChange?: (open: boolean) => void;\n\t/** Fired after a change to open. */\n\tonOpen?: () => void;\n\t/** Fired after a change to closed, whatever dismissed the overlay. */\n\tonClose?: () => void;\n}\n\nexport interface UseOverlayVisibilityReturn {\n\topen: boolean;\n\tisOpen: boolean;\n\tsetOpen: OverlayOpenSetter;\n\tshow: () => void;\n\thide: () => void;\n\ttoggle: () => void;\n\toverlayProps: OverlayVisibilityProps;\n}\n\nexport type OverlayVisibilityGroupState<TKey extends string = string> = Record<TKey, boolean>;\n\nexport interface UseOverlayVisibilityGroupOptions<TKey extends string = string> {\n\t/** Initial visibility per key when uncontrolled. */\n\tdefaultOpen?: Partial<Record<TKey, boolean>>;\n\t/** Controlled visibility per key. */\n\topen?: Partial<Record<TKey, boolean>>;\n\t/** Fired once for every actual change, with the key, its visibility and the next group state. */\n\tonOpenChange?: (\n\t\tkey: TKey,\n\t\topen: boolean,\n\t\tstate: OverlayVisibilityGroupState<TKey>,\n\t) => void;\n\t/** Opening one key closes the others, for one-at-a-time overlays. Default: `false`. */\n\tcloseOthersOnOpen?: boolean;\n}\n\nexport type UseOverlayVisibilityGroupReturn<TKey extends string = string> = Record<\n\tTKey,\n\tUseOverlayVisibilityReturn\n>;\n\nfunction resolveOpenValue(\n\tnextOpen: SetStateAction<boolean>,\n\tcurrentOpen: boolean,\n): boolean {\n\tif (typeof nextOpen === 'function') {\n\t\treturn (nextOpen as (open: boolean) => boolean)(currentOpen);\n\t}\n\treturn nextOpen;\n}\n\nfunction normalizeGroupState<TKey extends string>(\n\tkeys: readonly TKey[],\n\tstate?: Partial<Record<TKey, boolean>>,\n): OverlayVisibilityGroupState<TKey> {\n\tconst result = {} as OverlayVisibilityGroupState<TKey>;\n\tfor (const key of keys) {\n\t\tresult[key] = Boolean(state?.[key]);\n\t}\n\treturn result;\n}\n\nfunction hasGroupStateChanged<TKey extends string>(\n\tprevious: OverlayVisibilityGroupState<TKey>,\n\tnext: OverlayVisibilityGroupState<TKey>,\n\tkeys: readonly TKey[],\n): boolean {\n\treturn keys.some((key) => previous[key] !== next[key]);\n}\n\nexport function useOverlayVisibility({\n\tdefaultOpen = false,\n\topen: controlledOpen,\n\tonOpenChange,\n\tonOpen,\n\tonClose,\n}: UseOverlayVisibilityOptions = {}): UseOverlayVisibilityReturn {\n\tconst [internalOpen, setInternalOpen] = useState(defaultOpen);\n\tconst isControlled = controlledOpen !== undefined;\n\tconst open = isControlled ? controlledOpen : internalOpen;\n\tconst openRef = useRef(open);\n\topenRef.current = open;\n\n\tconst setOpen = useCallback<OverlayOpenSetter>(\n\t\t(nextOpen) => {\n\t\t\tconst resolvedOpen = resolveOpenValue(nextOpen, openRef.current);\n\t\t\tconst changed = openRef.current !== resolvedOpen;\n\n\t\t\tif (!isControlled) {\n\t\t\t\tsetInternalOpen(resolvedOpen);\n\t\t\t}\n\n\t\t\tif (!changed) return;\n\n\t\t\topenRef.current = resolvedOpen;\n\t\t\tonOpenChange?.(resolvedOpen);\n\t\t\tif (resolvedOpen) {\n\t\t\t\tonOpen?.();\n\t\t\t} else {\n\t\t\t\tonClose?.();\n\t\t\t}\n\t\t},\n\t\t[isControlled, onClose, onOpen, onOpenChange],\n\t);\n\n\tconst show = useCallback(() => {\n\t\tsetOpen(true);\n\t}, [setOpen]);\n\n\tconst hide = useCallback(() => {\n\t\tsetOpen(false);\n\t}, [setOpen]);\n\n\tconst toggle = useCallback(() => {\n\t\tsetOpen((currentOpen) => !currentOpen);\n\t}, [setOpen]);\n\n\tconst overlayProps = useMemo(\n\t\t() => ({\n\t\t\topen,\n\t\t\tonOpenChange: setOpen,\n\t\t}),\n\t\t[open, setOpen],\n\t);\n\n\treturn {\n\t\topen,\n\t\tisOpen: open,\n\t\tsetOpen,\n\t\tshow,\n\t\thide,\n\t\ttoggle,\n\t\toverlayProps,\n\t};\n}\n\nexport function useOverlayVisibilityGroup<const TKeys extends readonly string[]>(\n\tkeys: TKeys,\n\t{\n\t\tdefaultOpen,\n\t\topen: controlledOpen,\n\t\tonOpenChange,\n\t\tcloseOthersOnOpen = false,\n\t}: UseOverlayVisibilityGroupOptions<TKeys[number] & string> = {},\n): UseOverlayVisibilityGroupReturn<TKeys[number] & string> {\n\ttype TKey = TKeys[number] & string;\n\n\tconst keyList = keys as readonly TKey[];\n\tconst [internalOpen, setInternalOpen] = useState<OverlayVisibilityGroupState<TKey>>(\n\t\t() => normalizeGroupState(keyList, defaultOpen),\n\t);\n\tconst isControlled = controlledOpen !== undefined;\n\tconst state = normalizeGroupState(keyList, isControlled ? controlledOpen : internalOpen);\n\tconst stateRef = useRef(state);\n\tstateRef.current = state;\n\n\tconst setKeyOpen = useCallback(\n\t\t(key: TKey, nextOpen: SetStateAction<boolean>) => {\n\t\t\tconst previousState = stateRef.current;\n\t\t\tconst resolvedOpen = resolveOpenValue(nextOpen, previousState[key]);\n\t\t\tconst nextState = {\n\t\t\t\t...previousState,\n\t\t\t\t[key]: resolvedOpen,\n\t\t\t} as OverlayVisibilityGroupState<TKey>;\n\n\t\t\tif (closeOthersOnOpen && resolvedOpen) {\n\t\t\t\tfor (const item of keyList) {\n\t\t\t\t\tif (item !== key) {\n\t\t\t\t\t\tnextState[item] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst changed = hasGroupStateChanged(previousState, nextState, keyList);\n\n\t\t\tif (!isControlled) {\n\t\t\t\tsetInternalOpen(nextState);\n\t\t\t}\n\n\t\t\tif (!changed) return;\n\n\t\t\tstateRef.current = nextState;\n\t\t\tonOpenChange?.(key, resolvedOpen, nextState);\n\t\t},\n\t\t[closeOthersOnOpen, isControlled, keyList, onOpenChange],\n\t);\n\n\treturn useMemo(() => {\n\t\tconst result = {} as UseOverlayVisibilityGroupReturn<TKey>;\n\n\t\tfor (const key of keyList) {\n\t\t\tconst open = state[key];\n\t\t\tconst setOpen: OverlayOpenSetter = (nextOpen) => {\n\t\t\t\tsetKeyOpen(key, nextOpen);\n\t\t\t};\n\n\t\t\tresult[key] = {\n\t\t\t\topen,\n\t\t\t\tisOpen: open,\n\t\t\t\tsetOpen,\n\t\t\t\tshow: () => setKeyOpen(key, true),\n\t\t\t\thide: () => setKeyOpen(key, false),\n\t\t\t\ttoggle: () => setKeyOpen(key, (currentOpen) => !currentOpen),\n\t\t\t\toverlayProps: {\n\t\t\t\t\topen,\n\t\t\t\t\tonOpenChange: setOpen,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\treturn result;\n\t}, [keyList, setKeyOpen, state]);\n}\n","import { useLayoutEffect, useRef } from 'react';\n\n/** Keep modal focus anchored when its focused action becomes disabled. */\nexport function usePendingOverlayFocus(pending: boolean, modal: boolean | 'trap-focus' = true) {\n\tconst popupRef = useRef<HTMLDivElement>(null);\n\tuseLayoutEffect(() => {\n\t\tconst popup = popupRef.current;\n\t\tif (!pending || !modal || !popup) return;\n\t\tconst active = popup.ownerDocument.activeElement;\n\t\t// Preserve enabled fields and consumer-owned custom footer controls.\n\t\tif (active === popup.ownerDocument.body || (active && popup.contains(active) && active.matches(':disabled'))) {\n\t\t\tpopup.focus({ preventScroll: true });\n\t\t}\n\t}, [pending, modal]);\n\treturn popupRef;\n}\n","import { AlertCircle, AlertTriangle, CheckCircle, HelpCircle, Info } from 'lucide-react';\n\nimport { textLineHeights, textSizes } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\n\nimport type { OverlayTone } from './overlays.types';\nimport { toneRecipes } from '../../../lib/tone-recipes';\n\n/** One glyph and colour per tone, shared by every overlay's opt-in `showIcon`. */\nexport const overlayToneGlyphs = {\n\tneutral: { Glyph: HelpCircle, color: 'text-muted-foreground', surface: 'bg-muted' },\n\tdestructive: { Glyph: AlertCircle, color: 'text-destructive', surface: toneRecipes.destructive.tint },\n\twarning: { Glyph: AlertTriangle, color: 'text-warning-accent', surface: toneRecipes.warning.tint },\n\tinfo: { Glyph: Info, color: 'text-info', surface: toneRecipes.info.tint },\n\tsuccess: { Glyph: CheckCircle, color: 'text-success', surface: toneRecipes.success.tint },\n} as const satisfies Record<OverlayTone, { Glyph: typeof Info; color: string; surface: string }>;\n\n/**\n * Inline tone glyph for a heading row. The wrapper takes the title's own line\n * box (base size, snug leading, `h-lh`), so the glyph centres on the first title\n * line at any density instead of relying on an optical offset.\n */\nexport function OverlayToneIcon({ tone }: { tone: OverlayTone }) {\n\tconst { Glyph, color } = overlayToneGlyphs[tone];\n\treturn (\n\t\t<span aria-hidden=\"true\" className={cn('overlay-tone-icon--component flex h-lh shrink-0 items-center', textSizes.base, textLineHeights.snug)}>\n\t\t\t<Glyph className={cn('size-icon', color)} />\n\t\t</span>\n\t);\n}\n","import { overlayAnatomyRecipes } from '../../../lib/overlay-anatomy-recipes';\nimport { X } from 'lucide-react';\nimport { isValidElement, memo } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { Alert, AlertDescription } from '../../base/feedback';\nimport {\n\tDialog as BaseDialog,\n\tDialogBody,\n\tDialogClose,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from '../../base/display/dialog';\nimport { Stack } from '../../base/structure';\nimport { useOverlayConfig } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport { usePendingOverlayFocus } from './hooks/use-pending-overlay-focus';\nimport { OverlayToneIcon } from './overlay-tone-icon';\nimport type { ActionDialogProps, OverlaySize } from './overlays.types';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nconst SIZE_CLASSES: Record<OverlaySize, string> = {\n\txs: 'sm:max-w-xs',\n\tsm: 'sm:max-w-sm',\n\tmd: 'sm:max-w-md',\n\tlg: 'sm:max-w-lg',\n\txl: 'sm:max-w-xl',\n\t'2xl': 'sm:max-w-2xl',\n\t'3xl': 'sm:max-w-3xl',\n\t'4xl': 'sm:max-w-4xl',\n\t'5xl': 'sm:max-w-5xl',\n\tfull: 'sm:max-w-[calc(100vw-2rem)]',\n};\n\nfunction ActionDialogImpl({\n\topen,\n\tonOpenChange,\n\tonClose,\n\tchildren,\n\ttitle,\n\tdescription,\n\tvisuallyHideHeader = false,\n\tclassName,\n\tcontentClassName,\n\tshowCloseButton = true,\n\tsurfaceStyle,\n\tinitialFocusRef,\n\tcloseOnEscape = true,\n\tcloseOnBackdropClick = true,\n\tstrings: customStrings,\n\tshowCancel = true,\n\tshowConfirm = true,\n\tonCancel,\n\tonConfirm,\n\tonAsyncConfirm,\n\tonError,\n\tcloseOnAsyncComplete = true,\n\tconfirmTone = 'primary',\n\tconfirmStyle = 'solid',\n\tloading = false,\n\tformId,\n\tfooter,\n\temphasis = false,\n\ttone = 'neutral',\n\tshowIcon = false,\n\talertMessage,\n\tsize = 'lg',\n\ttrigger,\n\talign,\n}: ActionDialogProps) {\n\tconst { defaultDialogAlign } = useOverlayConfig();\n\tconst centered = (align ?? defaultDialogAlign ?? 'start') === 'center';\n\tconst visibility = useOverlayVisibility({ open, onOpenChange, onClose });\n\tconst {\n\t\tstrings,\n\t\tfinalConfirmTone,\n\t\tconfirmButtonOnClick,\n\t\teffectiveLoading,\n\t\thandleCancel,\n\t} = useOverlayActions({\n\t\tcloseDialog: visibility.hide,\n\t\tonConfirm,\n\t\tonAsyncConfirm,\n\t\tonError,\n\t\tcloseOnAsyncComplete,\n\t\tconfirmTone,\n\t\tloading,\n\t\tformId,\n\t\tonCancel,\n\t\tcustomStrings,\n\t\temphasis,\n\t\ttone,\n\t});\n\n\tconst pendingFocusRef = usePendingOverlayFocus(effectiveLoading);\n\tconst hasContent = Boolean(children || alertMessage);\n\tconst hasFooter = showCancel || showConfirm || footer;\n\n\treturn (\n\t\t<BaseDialog\n\t\t\topen={visibility.open}\n\t\t\tmodal\n\t\t\tdisablePointerDismissal={effectiveLoading || !closeOnBackdropClick}\n\t\t\tonOpenChange={(nextOpen, details) => {\n\t\t\t\tif (!nextOpen && (effectiveLoading || (details.reason === 'escape-key' && !closeOnEscape))) {\n\t\t\t\t\tdetails.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisibility.setOpen(nextOpen);\n\t\t\t}}\n\t\t>\n\t\t\t{!!trigger && (isValidElement(trigger) ? (\n\t\t\t\t<DialogTrigger render={trigger} />\n\t\t\t) : (\n\t\t\t\t<DialogTrigger render={<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" />} className=\"overlay-trigger--fallback\">\n\t\t\t\t\t{trigger}\n\t\t\t\t</DialogTrigger>\n\t\t\t))}\n\n\t\t\t<DialogContent\n\t\t\t\tref={pendingFocusRef}\n\t\t\t\tshowCloseButton={false}\n\t\t\t\tstyle={surfaceStyle}\n\t\t\t\tinitialFocus={initialFocusRef}\n\t\t\t\taria-label={title ? undefined : strings.dialogLabel}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'action-dialog--component dialog--component',\n\t\t\t\t\tSIZE_CLASSES[size],\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{!!(title || description) && (\n\t\t\t\t\t<DialogHeader\n\t\t\t\t\t\tdata-align={centered ? 'center' : 'start'}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'dialog--header',\n\t\t\t\t\t\t\tcentered && cn('text-center', overlayAnatomyRecipes.headerCentered),\n\t\t\t\t\t\t\tvisuallyHideHeader && 'sr-only',\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Stack direction={centered ? 'vertical' : 'horizontal'} gap=\"sm\" align={centered ? 'center' : 'start'} wrap={false}>\n\t\t\t\t\t\t\t{!!showIcon && <OverlayToneIcon tone={tone} />}\n\t\t\t\t\t\t\t<Stack gap=\"normal\" align={centered ? 'center' : undefined} className={cn('min-w-0', centered ? 'w-full' : 'flex-1')}>\n\t\t\t\t\t\t\t\t{!!title && <DialogTitle>{title}</DialogTitle>}\n\t\t\t\t\t\t\t\t{!!description && <DialogDescription>{description}</DialogDescription>}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</DialogHeader>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasContent && (\n\t\t\t\t\t<DialogBody className={cn('dialog--body', contentClassName)}>\n\t\t\t\t\t\t{!!alertMessage && (\n\t\t\t\t\t\t\t<Alert tone={tone} className=\"mb-space-md\">\n\t\t\t\t\t\t\t\t<AlertDescription>{alertMessage}</AlertDescription>\n\t\t\t\t\t\t\t</Alert>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</DialogBody>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasFooter && (\n\t\t\t\t\t<DialogFooter className=\"dialog--footer\">\n\t\t\t\t\t\t{footer ?? (\n\t\t\t\t\t\t\t<Stack\n\t\t\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\t\t\tgap=\"sm\"\n\t\t\t\t\t\t\t\talign={{ base: 'stretch', sm: 'center' }}\n\t\t\t\t\t\t\t\tjustify={centered ? 'center' : 'end'}\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!showCancel && (\n\t\t\t\t\t\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" onClick={handleCancel} disabled={effectiveLoading}>\n\t\t\t\t\t\t\t\t\t\t{strings.cancel}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!showConfirm && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone={finalConfirmTone}\n\t\t\t\t\t\t\t\t\t\tbuttonStyle={confirmStyle}\n\t\t\t\t\t\t\t\t\t\tonClick={confirmButtonOnClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tloading={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tstrings={{ loading: strings.loading }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{strings.confirm}\n\t\t\t\t\t\t\t\t\t</Button>\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)}\n\t\t\t\t\t</DialogFooter>\n\t\t\t\t)}\n\n\t\t\t\t{/*\n\t\t\t\t * Last in the DOM, drawn in the corner: opening focuses the first\n\t\t\t\t * field or action rather than the dismiss control, and the reading\n\t\t\t\t * order stays title → content → actions.\n\t\t\t\t */}\n\t\t\t\t{!!showCloseButton && (\n\t\t\t\t\t<DialogClose\n\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\trender={(\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\tdata-overlay-close=\"\"\n\t\t\t\t\t\t\t\tclassName={cn(overlayAnatomyRecipes.close, `z-10 text-muted-foreground ${interactionRecipes.rowHover}`)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<X className=\"size-icon\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\taria-label={strings.close}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</DialogContent>\n\t\t</BaseDialog>\n\t);\n}\n\nexport const ActionDialog = memo(ActionDialogImpl);\nActionDialog.displayName = 'ActionDialog';\n","import { overlayAnatomyRecipes } from '../../../lib/overlay-anatomy-recipes';\nimport { X } from 'lucide-react';\nimport { isValidElement, memo } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { Alert, AlertDescription } from '../../base/feedback';\nimport {\n\tSheet,\n\tSheetBody,\n\tSheetClose,\n\tSheetContent,\n\tSheetDescription,\n\tSheetFooter,\n\tSheetHeader,\n\tSheetTitle,\n\tSheetTrigger,\n} from '../../base/sheet/sheet';\nimport { Stack } from '../../base/structure';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport { usePendingOverlayFocus } from './hooks/use-pending-overlay-focus';\nimport { OverlayToneIcon } from './overlay-tone-icon';\nimport type { ActionDrawerProps, OverlaySize } from './overlays.types';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nconst WIDTH_CLASSES: Record<OverlaySize, string> = {\n\txs: 'data-[side=left]:sm:max-w-xs data-[side=right]:sm:max-w-xs',\n\tsm: 'data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm',\n\tmd: 'data-[side=left]:sm:max-w-md data-[side=right]:sm:max-w-md',\n\tlg: 'data-[side=left]:sm:max-w-lg data-[side=right]:sm:max-w-lg',\n\txl: 'data-[side=left]:sm:max-w-xl data-[side=right]:sm:max-w-xl',\n\t'2xl': 'data-[side=left]:sm:max-w-2xl data-[side=right]:sm:max-w-2xl',\n\t'3xl': 'data-[side=left]:sm:max-w-3xl data-[side=right]:sm:max-w-3xl',\n\t'4xl': 'data-[side=left]:sm:max-w-4xl data-[side=right]:sm:max-w-4xl',\n\t'5xl': 'data-[side=left]:sm:max-w-5xl data-[side=right]:sm:max-w-5xl',\n\tfull: 'data-[side=left]:sm:max-w-[calc(100vw-2rem)] data-[side=right]:sm:max-w-[calc(100vw-2rem)]',\n};\n\nfunction ActionDrawerImpl({\n\topen,\n\tonOpenChange,\n\tonClose,\n\tchildren,\n\ttitle,\n\tdescription,\n\tvisuallyHideHeader = false,\n\tshowCloseButton = true,\n\tclassName,\n\tcontentClassName,\n\tsurfaceStyle,\n\tinitialFocusRef,\n\tcloseOnEscape = true,\n\tcloseOnBackdropClick = true,\n\tstrings: customStrings,\n\tshowCancel = true,\n\tshowConfirm = true,\n\tonCancel,\n\tonConfirm,\n\tonAsyncConfirm,\n\tonError,\n\tcloseOnAsyncComplete = true,\n\tconfirmTone = 'primary',\n\tconfirmStyle = 'solid',\n\tloading = false,\n\tformId,\n\tfooter,\n\temphasis = false,\n\ttone = 'neutral',\n\tshowIcon = false,\n\talertMessage,\n\tdirection = 'right',\n\twidth = 'lg',\n\tshowFooter = true,\n\tmodal = true,\n\ttrigger,\n}: ActionDrawerProps) {\n\tconst visibility = useOverlayVisibility({ open, onOpenChange, onClose });\n\tconst {\n\t\tstrings,\n\t\tfinalConfirmTone,\n\t\tconfirmButtonOnClick,\n\t\teffectiveLoading,\n\t\thandleCancel,\n\t} = useOverlayActions({\n\t\tcloseDialog: visibility.hide,\n\t\tonConfirm,\n\t\tonAsyncConfirm,\n\t\tonError,\n\t\tcloseOnAsyncComplete,\n\t\tconfirmTone,\n\t\tloading,\n\t\tformId,\n\t\tonCancel,\n\t\tcustomStrings,\n\t\temphasis,\n\t\ttone,\n\t});\n\n\tconst isHorizontal = direction === 'left' || direction === 'right';\n\tconst pendingFocusRef = usePendingOverlayFocus(effectiveLoading, modal);\n\tconst hasContent = Boolean(children || alertMessage);\n\tconst hasFooter = showFooter && (showCancel || showConfirm || footer);\n\n\treturn (\n\t\t<Sheet\n\t\t\topen={visibility.open}\n\t\t\tmodal={modal}\n\t\t\t// A non-modal panel sits beside the page you keep working in, so a page\n\t\t\t// press must not dismiss it; it closes from its own controls or Escape.\n\t\t\tdisablePointerDismissal={effectiveLoading || !closeOnBackdropClick || modal === false}\n\t\t\tonOpenChange={(nextOpen, details) => {\n\t\t\t\tif (!nextOpen && (effectiveLoading || (details.reason === 'escape-key' && !closeOnEscape))) {\n\t\t\t\t\tdetails.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisibility.setOpen(nextOpen);\n\t\t\t}}\n\t\t>\n\t\t\t{!!trigger && (isValidElement(trigger) ? (\n\t\t\t\t<SheetTrigger render={trigger} />\n\t\t\t) : (\n\t\t\t\t<SheetTrigger render={<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" />} className=\"overlay-trigger--fallback\">\n\t\t\t\t\t{trigger}\n\t\t\t\t</SheetTrigger>\n\t\t\t))}\n\n\t\t\t<SheetContent\n\t\t\t\tref={pendingFocusRef}\n\t\t\t\tside={direction}\n\t\t\t\tshowCloseButton={false}\n\t\t\t\tstyle={surfaceStyle}\n\t\t\t\tinitialFocus={initialFocusRef}\n\t\t\t\taria-label={title ? undefined : strings.drawerLabel}\n\t\t\t\t// The vendored SheetContent renders its backdrop unconditionally,\n\t\t\t\t// so a non-modal drawer would still sit behind a full-viewport\n\t\t\t\t// scrim. This marks the panel so the token layer can drop it.\n\t\t\t\tdata-modal={modal === false ? 'false' : undefined}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'action-drawer--component drawer--component',\n\t\t\t\t\tisHorizontal && 'data-[side=left]:w-full data-[side=right]:w-full',\n\t\t\t\t\tisHorizontal && WIDTH_CLASSES[width],\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{!!(title || description) && (\n\t\t\t\t\t<SheetHeader className={cn('drawer--header', visuallyHideHeader && 'sr-only')}>\n\t\t\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" align=\"start\" wrap={false}>\n\t\t\t\t\t\t\t{!!showIcon && <OverlayToneIcon tone={tone} />}\n\t\t\t\t\t\t\t<Stack gap=\"normal\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t{!!title && <SheetTitle>{title}</SheetTitle>}\n\t\t\t\t\t\t\t\t{!!description && <SheetDescription>{description}</SheetDescription>}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</SheetHeader>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasContent && (\n\t\t\t\t\t<SheetBody className={cn('drawer--body', contentClassName)}>\n\t\t\t\t\t\t{!!alertMessage && (\n\t\t\t\t\t\t\t<Alert tone={tone} className=\"mb-space-md\">\n\t\t\t\t\t\t\t\t<AlertDescription>{alertMessage}</AlertDescription>\n\t\t\t\t\t\t\t</Alert>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</SheetBody>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasFooter && (\n\t\t\t\t\t<SheetFooter className=\"drawer--footer\">\n\t\t\t\t\t\t{footer ?? (\n\t\t\t\t\t\t\t<Stack\n\t\t\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\t\t\tgap=\"sm\"\n\t\t\t\t\t\t\t\talign={{ base: 'stretch', sm: 'center' }}\n\t\t\t\t\t\t\t\tjustify=\"end\"\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!showCancel && (\n\t\t\t\t\t\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" onClick={handleCancel} disabled={effectiveLoading}>\n\t\t\t\t\t\t\t\t\t\t{strings.cancel}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!showConfirm && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone={finalConfirmTone}\n\t\t\t\t\t\t\t\t\t\tbuttonStyle={confirmStyle}\n\t\t\t\t\t\t\t\t\t\tonClick={confirmButtonOnClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tloading={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tstrings={{ loading: strings.loading }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{strings.confirm}\n\t\t\t\t\t\t\t\t\t</Button>\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)}\n\t\t\t\t\t</SheetFooter>\n\t\t\t\t)}\n\n\t\t\t\t{/*\n\t\t\t\t * Last in the DOM, drawn in the corner: opening focuses the first\n\t\t\t\t * field or action rather than the dismiss control, and the reading\n\t\t\t\t * order stays title → content → actions.\n\t\t\t\t */}\n\t\t\t\t{!!showCloseButton && (\n\t\t\t\t\t<SheetClose\n\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\trender={(\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\tdata-overlay-close=\"\"\n\t\t\t\t\t\t\t\tclassName={cn(overlayAnatomyRecipes.close, `z-10 text-muted-foreground ${interactionRecipes.rowHover}`)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<X className=\"size-icon\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\taria-label={strings.close}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</SheetContent>\n\t\t</Sheet>\n\t);\n}\n\nexport const ActionDrawer = memo(ActionDrawerImpl);\nActionDrawer.displayName = 'ActionDrawer';\n","\"use client\";\n\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { modalBackdropRecipe } from './overlay.recipes';\n\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\n\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"./button\"\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({ container, ...props }: AlertDialogPrimitive.Portal.Props) {\n const resolvedContainer = useThemePortalContainer(container)\n return (\n <AlertDialogPrimitive.Portal container={resolvedContainer} data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(modalBackdropRecipe, motionRecipes.backdrop,\n \"isolate\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n container,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\"\n} & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n return (\n <AlertDialogPortal container={resolvedContainer}>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n motionRecipes.dialog,\n \"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-space-xl rounded-radius bg-popover p-surface text-popover-foreground shadow-xl outline-none data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-space-2xl sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"flex flex-col-reverse group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-space-md inline-flex size-16 items-center justify-center rounded-full bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n","import { modalRegionRecipes, surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport type { TextGap } from '../structure';\n/**\n * AlertDialog — internal confirmation anatomy behind `ConfirmDialog`.\n *\n * Not published from any entrypoint: applications use `ConfirmDialog` from\n * `themelia-react-ui/features/overlays`, which owns the decision lifecycle.\n * The surface shares the modal shell, region, rule and typography geometry of\n * the internal Dialog wrapper: a pinned heading region, an optional scrolling\n * body and pinned answers, with one rule between adjacent visible regions.\n */\nimport * as React from 'react';\n\nimport {\n\tAlertDialog as AlertDialogPrimitive,\n\tAlertDialogAction as AlertDialogActionPrimitive,\n\tAlertDialogCancel as AlertDialogCancelPrimitive,\n\tAlertDialogContent as AlertDialogContentPrimitive,\n\tAlertDialogDescription as AlertDialogDescriptionPrimitive,\n\tAlertDialogFooter as AlertDialogFooterPrimitive,\n\tAlertDialogMedia as AlertDialogMediaPrimitive,\n\tAlertDialogOverlay,\n\tAlertDialogPortal,\n\tAlertDialogTitle as AlertDialogTitlePrimitive,\n\tAlertDialogTrigger as AlertDialogTriggerPrimitive,\n} from '../../ui/alert-dialog';\nimport { Text } from '../../typography';\nimport { textLineHeights, textSizes, textWeights } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\n\nfunction isSimpleText(value: React.ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/** Same title role as Dialog, set on the element so its line box matches the Text inside. */\nconst titleTypography = cn(textSizes.base, textWeights.semibold, textLineHeights.snug);\n\nexport const AlertDialog = AlertDialogPrimitive;\n\nexport const AlertDialogTrigger = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogTriggerPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogTriggerPrimitive>\n>(function AlertDialogTrigger({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogTriggerPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-trigger--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nexport const AlertDialogContent = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogContentPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogContentPrimitive>\n>(function AlertDialogContent({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogContentPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t// Same flush shell as Dialog: regions own their insets and the rules between them.\n\t\t\t\t'alert-dialog-content--component flex max-h-[min(90vh,48rem)] flex-col gap-0 overflow-hidden rounded-radius bg-popover p-0 text-popover-foreground sm:max-w-md', surfaceDividerRecipes.modal.shell,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nexport const AlertDialogHeader = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement> & { textGap?: TextGap; align?: 'start' | 'center' }\n>(function AlertDialogHeader({ className, textGap = 'normal', align = 'start', ...props }, ref) {\n\t// Owned here rather than by the raw header, whose responsive variants force\n\t// start alignment from `sm`; a confirmation chooses its own alignment.\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tdata-modal-region=\"\"\n\t\t\tdata-align={align}\n\t\t\tclassName={cn(\n\t\t\t\t'alert-dialog-header--component flex flex-col',\n\t\t\t\tmodalRegionRecipes.header,\n\t\t\t\talign === 'center' ? 'items-center text-center' : 'items-start text-start',\n\t\t\t\ttextGap === 'dense' ? 'gap-dense' : 'gap-normal',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\n/** Scroll-owning region between the pinned heading and the pinned answers. */\nexport const AlertDialogBody = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\tfunction AlertDialogBody({ className, ...props }, ref) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"alert-dialog-body\"\n\t\t\t\tdata-modal-region=\"\"\n\t\t\t\tclassName={cn('alert-dialog-body--component', modalRegionRecipes.body, className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nAlertDialogBody.displayName = 'AlertDialogBody';\n\nexport const AlertDialogFooter = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogFooterPrimitive>\n>(function AlertDialogFooter({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogFooterPrimitive\n\t\t\tref={ref}\n\t\t\tdata-modal-region=\"\"\n\t\t\tclassName={cn(\n\t\t\t\t'alert-dialog-footer--component', modalRegionRecipes.footer,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nexport const AlertDialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogTitlePrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogTitlePrimitive>\n>(function AlertDialogTitle({ children, className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogTitlePrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-title--component m-0', titleTypography, className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text tag=\"span\" type=\"inherit\" size=\"base\" weight=\"semibold\" lineHeight=\"snug\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</AlertDialogTitlePrimitive>\n\t);\n});\n\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nexport const AlertDialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogDescriptionPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogDescriptionPrimitive>\n>(function AlertDialogDescription({ children, className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogDescriptionPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-description--component m-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text tag=\"span\" type=\"secondary\" lineHeight=\"relaxed\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</AlertDialogDescriptionPrimitive>\n\t);\n});\n\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\nexport const AlertDialogMedia = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogMediaPrimitive>\n>(function AlertDialogMedia({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogMediaPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-media--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogMedia.displayName = 'AlertDialogMedia';\n\nexport const AlertDialogAction = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogActionPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogActionPrimitive>\n>(function AlertDialogAction({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogActionPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-action--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogAction.displayName = 'AlertDialogAction';\n\nexport const AlertDialogCancel = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogCancelPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogCancelPrimitive>\n>(function AlertDialogCancel({ className, ...props }, ref) {\n\treturn (\n\t\t<AlertDialogCancelPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-cancel--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport { AlertDialogOverlay, AlertDialogPortal };\n","import { isValidElement, memo, useMemo } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { Alert, AlertDescription } from '../../base/feedback';\nimport {\n\tAlertDialog as BaseAlertDialog,\n\tAlertDialogBody,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from '../../base/display/alert-dialog';\nimport { Stack } from '../../base/structure';\nimport { useStrings } from '../../../lib/strings';\nimport { useOverlayConfig } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport { usePendingOverlayFocus } from './hooks/use-pending-overlay-focus';\nimport { overlayToneGlyphs } from './overlay-tone-icon';\nimport { defaultAlertDialogStrings } from './overlays.strings';\nimport type { ConfirmDialogProps } from './overlays.types';\n\nfunction ConfirmDialogImpl({\n\topen,\n\tonOpenChange,\n\tonClose,\n\tchildren,\n\ttitle,\n\tdescription,\n\tvisuallyHideHeader = false,\n\tclassName,\n\tcontentClassName,\n\tsurfaceStyle,\n\tinitialFocusRef,\n\tcloseOnEscape = true,\n\tstrings: customStrings,\n\tshowCancel = true,\n\tshowConfirm = true,\n\tonCancel,\n\tonConfirm,\n\tonAsyncConfirm,\n\tonError,\n\tcloseOnAsyncComplete = true,\n\tconfirmTone,\n\tconfirmStyle = 'solid',\n\tloading = false,\n\tformId,\n\tfooter,\n\ttone = 'neutral',\n\tshowIcon = false,\n\talertMessage,\n\ttrigger,\n\tdestructive = false,\n\talign,\n}: ConfirmDialogProps) {\n\tconst { defaultConfirmAlign } = useOverlayConfig();\n\tconst resolvedAlign = align ?? defaultConfirmAlign ?? 'center';\n\tconst visibility = useOverlayVisibility({ open, onOpenChange, onClose });\n\tconst mergedStrings = useStrings(defaultAlertDialogStrings, customStrings);\n\tconst resolvedConfirmTone = useMemo(() => {\n\t\tif (destructive) return 'destructive' as const;\n\t\tif (confirmTone) return confirmTone;\n\t\tconst toneMap = {\n\t\t\tneutral: 'primary',\n\t\t\tdestructive: 'destructive',\n\t\t\twarning: 'warning',\n\t\t\tinfo: 'primary',\n\t\t\tsuccess: 'success',\n\t\t} as const;\n\t\treturn toneMap[tone];\n\t}, [destructive, confirmTone, tone]);\n\n\tconst { strings, confirmButtonOnClick, effectiveLoading, handleCancel } =\n\t\tuseOverlayActions({\n\t\t\tcloseDialog: visibility.hide,\n\t\t\tonConfirm,\n\t\t\tonAsyncConfirm,\n\t\t\tonError,\n\t\t\tcloseOnAsyncComplete,\n\t\t\tconfirmTone: resolvedConfirmTone,\n\t\t\tloading,\n\t\t\tformId,\n\t\t\tonCancel,\n\t\t\tcustomStrings: mergedStrings,\n\t\t});\n\n\t/*\n\t * `destructive` is documented as the destructive *presentation*, but it only\n\t * ever reached the confirm button — the icon and the inline alert still came\n\t * from `tone`, which defaults to neutral. The result was a red confirm button\n\t * beside a grey question mark: two signals disagreeing about how serious the\n\t * action is. An explicit `tone` still wins, so this only fills the gap.\n\t */\n\tconst resolvedTone = destructive && tone === 'neutral' ? ('destructive' as const) : tone;\n\tconst toneGlyph = overlayToneGlyphs[resolvedTone];\n\tconst pendingFocusRef = usePendingOverlayFocus(effectiveLoading);\n\tconst hasHeading = Boolean(title || description || (showIcon && !visuallyHideHeader));\n\tconst hasContent = Boolean(children || alertMessage);\n\n\treturn (\n\t\t<BaseAlertDialog\n\t\t\topen={visibility.open}\n\t\t\tonOpenChange={(nextOpen, details) => {\n\t\t\t\tif (!nextOpen && (effectiveLoading || (details.reason === 'escape-key' && !closeOnEscape))) {\n\t\t\t\t\tdetails.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisibility.setOpen(nextOpen);\n\t\t\t}}\n\t\t>\n\t\t\t{!!trigger && (isValidElement(trigger) ? (\n\t\t\t\t<AlertDialogTrigger render={trigger} />\n\t\t\t) : (\n\t\t\t\t<AlertDialogTrigger render={<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" />} className=\"overlay-trigger--fallback\">\n\t\t\t\t\t{trigger}\n\t\t\t\t</AlertDialogTrigger>\n\t\t\t))}\n\n\t\t\t<AlertDialogContent\n\t\t\t\tref={pendingFocusRef}\n\t\t\t\tstyle={surfaceStyle}\n\t\t\t\tinitialFocus={initialFocusRef}\n\t\t\t\taria-label={title ? undefined : strings.alertDialogLabel}\n\t\t\t\tclassName={cn('confirm-dialog--component alert-dialog--component', className)}\n\t\t\t>\n\t\t\t\t{!!hasHeading && (\n\t\t\t\t\t<AlertDialogHeader\n\t\t\t\t\t\talign={resolvedAlign}\n\t\t\t\t\t\tclassName={cn('alert-dialog--header', visuallyHideHeader && 'sr-only')}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!!showIcon && !visuallyHideHeader && (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'mb-space-sm flex size-avatar-lg shrink-0 items-center justify-center rounded-full',\n\t\t\t\t\t\t\t\t\ttoneGlyph.surface,\n\t\t\t\t\t\t\t\t\ttoneGlyph.color,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<toneGlyph.Glyph className=\"size-icon-lg\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!title && <AlertDialogTitle>{title}</AlertDialogTitle>}\n\t\t\t\t\t\t{!!description && <AlertDialogDescription>{description}</AlertDialogDescription>}\n\t\t\t\t\t</AlertDialogHeader>\n\t\t\t\t)}\n\n\t\t\t\t{!!hasContent && (\n\t\t\t\t\t<AlertDialogBody className={cn('alert-dialog--body', contentClassName)}>\n\t\t\t\t\t\t{!!alertMessage && (\n\t\t\t\t\t\t\t<Alert tone={resolvedTone} className={cn(!!children && 'mb-space-md')}>\n\t\t\t\t\t\t\t\t<AlertDescription>{alertMessage}</AlertDescription>\n\t\t\t\t\t\t\t</Alert>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</AlertDialogBody>\n\t\t\t\t)}\n\n\t\t\t\t{!!(showCancel || showConfirm || footer) && (\n\t\t\t\t\t<AlertDialogFooter className=\"alert-dialog--footer\">\n\t\t\t\t\t\t{footer ?? (\n\t\t\t\t\t\t\t<Stack\n\t\t\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\t\t\tgap=\"sm\"\n\t\t\t\t\t\t\t\talign={{ base: 'stretch', sm: 'center' }}\n\t\t\t\t\t\t\t\tjustify={resolvedAlign === 'center' ? 'center' : 'end'}\n\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!showCancel && (\n\t\t\t\t\t\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"outline\" onClick={handleCancel} disabled={effectiveLoading}>\n\t\t\t\t\t\t\t\t\t\t{strings.cancel}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!showConfirm && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone={resolvedConfirmTone}\n\t\t\t\t\t\t\t\t\t\tbuttonStyle={confirmStyle}\n\t\t\t\t\t\t\t\t\t\tonClick={confirmButtonOnClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tloading={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tstrings={{ loading: strings.loading }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{strings.confirm}\n\t\t\t\t\t\t\t\t\t</Button>\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)}\n\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t)}\n\t\t\t</AlertDialogContent>\n\t\t</BaseAlertDialog>\n\t);\n}\n\nexport const ConfirmDialog = memo(ConfirmDialogImpl);\nConfirmDialog.displayName = 'ConfirmDialog';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,SAASA,EAAO,EAAE,GAAG8E,KAAqC;CACxD,OAAO,kBAAC7E,EAAgB,MAAjB;EAAsB,aAAU;EAAS,OAAM;EAAa,GAAI6E;CAAQ,CAAA;AACjF;AAEA,SAAS5E,EAAc,EACrB,aAAU,IACV,GAAG4E,KACqD;CACxD,IAAMG,IAAaC,IAAU,kBAACjB,GAAD,CAAO,CAAA,IAAI,KAAA;CAExC,OACE,kBAAChE,EAAgB,SAAjB;EACE,aAAU;EACV,QAAQgF;EACR,GAAIH;CACL,CAAA;AAEL;AAEA,SAASK,EAAa,EAAE,cAAW,GAAGL,KAAuC;CAC3E,IAAMM,IAAoBrC,EAAwBsC,CAAS;CAC3D,OAAO,kBAACpF,EAAgB,QAAjB;EAAwB,WAAWmF;EAAmB,aAAU;EAAgB,GAAIN;CAAQ,CAAA;AACrG;AAEA,SAAS3E,EAAY,EAAE,GAAG2E,KAAsC;CAC9D,OAAO,kBAAC7E,EAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI6E;CAAQ,CAAA;AACrE;AAEA,SAASS,EAAc,EACrB,cACA,GAAGT,KAC8B;CACjC,OACE,kBAAC7E,EAAgB,UAAjB;EACE,aAAU;EACV,WAAW+C,EAAGyB,GAAqBT,EAAc,UAAU,WAAWwB,CAAS;EAC/E,GAAIV;CACL,CAAA;AAEL;AAEA,SAAS1E,EAAc,EACrB,cACA,cACA,aACA,qBAAkB,IAClB,mBACA,GAAG0E,KAGqC;CACxC,IAAMM,IAAoBrC,EAAwBs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,MAAK;OAAS,MAAK;OAAY,aAAY;OAAU,SAASyE;OAAc,UAAUiE;OAC5F,UAAAlF,EAAQ;MACF,CAAA,GAER,CAAC,CAACuF,KACF,kBAAC/I,GAAD;OACC,MAAK;OACL,MAAMwM;OACN,aAAazC;OACb,SAASC;OACT,UAAUtB;OACV,SAASA;OACT,SAAS,EAAE,SAASlF,EAAQ,QAAQ;OAEnC,UAAAA,EAAQ;MACF,CAAA,CAEH;;IAEU,CAAA;GAED;EACJ,CAAA,CAAA;;AAEnB;AAEA,IAAaqJ,KAAgB1C,EAAKiC,EAAiB;AACnD,GAAc,cAAc"}
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { useStrings as e } from "./lib/strings.js";
3
- import { t } from "./utils-l5LpDw2z.js";
4
- import { a as n, n as r } from "./buttons-SbIcm1HJ.js";
5
- import { t as i } from "./structure-DC2dygdA.js";
6
- import { n as a, t as o } from "./action-menu-TzCoSlwL.js";
7
- import { r as s, t as c } from "./overflow-tab-bar-sQHXLlwQ.js";
8
- import { d as l } from "./hooks-9k_TtmKh.js";
9
- import { i as u } from "./containers-DmWiJa2I.js";
3
+ import { t } from "./utils-BRhFDwuU.js";
4
+ import { a as n, n as r } from "./buttons-DPZekJFu.js";
5
+ import { t as i } from "./structure-BmisBK-3.js";
6
+ import { n as a, t as o } from "./action-menu-CllU52Mm.js";
7
+ import { r as s, t as c } from "./overflow-tab-bar-CWY7Nogn.js";
8
+ import { d as l } from "./hooks-ClH9thn4.js";
9
+ import { i as u } from "./containers-Mu1LMGV1.js";
10
10
  import { forwardRef as d, useEffect as f, useMemo as p, useState as m } from "react";
11
11
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
12
12
  import { ArrowLeft as v } from "lucide-react";
@@ -221,4 +221,4 @@ function E({ actions: n, display: r = "dropdown", size: i = "sm", breakpoint: s
221
221
  //#endregion
222
222
  export { y as i, S as n, x as r, E as t };
223
223
 
224
- //# sourceMappingURL=page-B5dTH9gE.js.map
224
+ //# sourceMappingURL=page-CL9YeH_V.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-B5dTH9gE.js","names":["_Fragment","buttonVariants","Button","Stack","ActionMenu","ActionButtons","PageHeading","OverflowTabBar","useLayoutLinkRenderer","Container","Fragment$1","PageHeader","TitleIcon","resolvedRenderLink","defaultBack","backHref","onBack","backLabel","cn","ArrowLeft","titleIconNode","icon","iconClassName","titleIconClassName","titleIconHref","onTitleIconClick","titleIconLabel","titleStart","slots","replacedActions","tabsNode","tabs","titleBadges","actions","primaryAction","secondaryActions","className","contentClassName","titleClassName","descriptionClassName","actionsClassName","blockPadding","Page","forwardRef","containerProps","bodyClassName","bodyProps","slotProps","maxWidth","narrow","padding","header","renderLink","children","defaultPageActionsStrings","PAGE_ACTIONS_MENU_CLASS","DEFAULT_MAX_INLINE_ACTIONS","toActionMenuAction","context","contextBase","disabled","action","index","renderAction","PageActions","stringsProp","strings","useStrings","filtered","useMemo","isNarrow","setIsNarrow","useState","useEffect","display","check","breakpoint","inlineContextBase","renderActionLink","props","inlineClass","inlineClassName","menuContentClass","menuClassName","dropdownActions","entry","inlineLimit","maxInlineActions","inlineCandidates","inline","menu","inlineActions","menuActions"],"sources":["../src/components/layout/page/partials/page-header.tsx","../src/components/layout/page/page.tsx","../src/components/layout/page/page.types.ts","../src/components/layout/page/partials/page-actions.tsx"],"sourcesContent":["/**\n * PageHeader — page title, back control, title badges, and actions.\n *\n * Navigation goes through `renderLink`; consumer apps wire framework links at\n * the boundary. Slots let consumers replace any structural region without\n * forking the page wrapper. `primaryAction` and `secondaryActions` describe\n * commands by role; PageHeading owns their treatment and placement.\n */\nimport { ArrowLeft } from 'lucide-react';\n\nimport { Button } from '../../../base/buttons';\nimport { Stack } from '../../../base/structure';\nimport { PageHeading } from '../../../base/navigation/page-header';\nimport { OverflowTabBar } from '../../../base/navigation/overflow-tab-bar';\nimport { buttonVariants } from '../../../base/buttons/button.variants';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport type { PageHeaderProps } from '../page.types';\n\nexport function PageHeader({\n\ttitle,\n\tdescription,\n\ttextGap = 'dense',\n\theadingTag = 'h1',\n\ttitleIcon: TitleIcon,\n\ttitleIconHref,\n\tonTitleIconClick,\n\ttitleIconLabel = 'Open title link',\n\tbackHref,\n\tonBack,\n\tbackLabel = 'Back',\n\ttitleBadges = [],\n\tprimaryAction,\n\tsecondaryActions,\n\tmoreActionsLabel = 'More actions',\n\ttabs,\n\tactions,\n\tslots,\n\trenderLink,\n\tclassName,\n\tcontentClassName,\n\tactionsClassName,\n\ttitleClassName,\n\ttitleIconClassName,\n\tdescriptionClassName,\n}: PageHeaderProps) {\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\tconst hasBack = !!backHref || !!onBack;\n\n\tconst defaultBack = hasBack ? (\n\t\t<div className=\"flex items-center gap-space-sm shrink-0\">\n\t\t\t{backHref && !onBack ? (\n\t\t\t\tresolvedRenderLink({\n\t\t\t\t\thref: backHref,\n\t\t\t\t\t'aria-label': backLabel,\n\t\t\t\t\tclassName: cn('page-header--back-link', buttonVariants({tone:'secondary',buttonStyle:'ghost',size:'sm',iconOnly:true})),\n\t\t\t\t\tchildren: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ArrowLeft className=\"size-icon rtl:rotate-180\" aria-hidden=\"true\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t})\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\tclassName=\"page-header--back-button\"\n\t\t\t\t\tonClick={onBack}\n\t\t\t\t\taria-label={backLabel}\n\t\t\t\t>\n\t\t\t\t\t<ArrowLeft className=\"size-icon rtl:rotate-180\" aria-hidden=\"true\" />\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</div>\n\t) : null;\n\tconst titleIconNode = (() => {\n\t\tif (!TitleIcon) return null;\n\n\t\tconst icon = <TitleIcon className=\"size-icon\" aria-hidden=\"true\" />;\n\t\tconst iconClassName = cn(\n\t\t\t'page-header--title-icon flex size-icon shrink-0 items-center justify-center text-muted-foreground',\n\t\t\ttitleIconClassName,\n\t\t);\n\n\t\tif (titleIconHref && !onTitleIconClick) {\n\t\t\treturn resolvedRenderLink({\n\t\t\t\thref: titleIconHref,\n\t\t\t\t'aria-label': titleIconLabel,\n\t\t\t\tclassName: cn(\n\t\t\t\t\t'page-header--title-icon-link',\n\t\t\t\t\tbuttonVariants({tone:'secondary',buttonStyle:'ghost',size:'sm',iconOnly:true}),\n\t\t\t\t\ttitleIconClassName,\n\t\t\t\t),\n\t\t\t\tchildren: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{icon}\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\n\t\tif (onTitleIconClick) {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\tclassName={cn('page-header--title-icon-button', titleIconClassName)}\n\t\t\t\t\tonClick={onTitleIconClick}\n\t\t\t\t\taria-label={titleIconLabel}\n\t\t\t\t>\n\t\t\t\t\t{icon}\n\t\t\t\t</Button>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<span aria-hidden=\"true\" className={iconClassName}>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t);\n\t})();\n\t// Keep the standard back affordance beside the title, rather than reserving\n\t// a leading column around the entire copy/actions block on narrow pages.\n\tconst titleStart = slots?.back == null && defaultBack ? (\n\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"sm\" wrap={false}>\n\t\t\t{defaultBack}{titleIconNode}\n\t\t</Stack>\n\t) : titleIconNode;\n\t// `slots.actions` replaces the whole region, role-based commands included.\n\tconst replacedActions = slots?.actions != null;\n\t// Section tabs belong to the header: they sit under its copy and commands,\n\t// and the page rhythm separates them from the body.\n\tconst tabsNode = tabs && tabs.items.length > 0 ? (\n\t\t<OverflowTabBar\n\t\t\titems={tabs.items}\n\t\t\tvalue={tabs.value}\n\t\t\tonValueChange={tabs.onValueChange}\n\t\t\tclassName=\"page-header--tabs\"\n\t\t\tstrings={{ navigationLabel: tabs.label ?? 'Sections', more: tabs.moreLabel ?? 'More' }}\n\t\t/>\n\t) : null;\n\n\treturn (\n\t\t<PageHeading\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\ttextGap={textGap}\n\t\t\theadingTag={headingTag}\n\t\t\tleading={slots?.back}\n\t\t\tbeforeTitle={slots?.beforeTitle}\n\t\t\ttitlePrefix={titleStart}\n\t\t\tbadges={titleBadges}\n\t\t\tactions={replacedActions ? slots?.actions : actions}\n\t\t\tprimaryAction={replacedActions ? undefined : primaryAction}\n\t\t\tsecondaryActions={replacedActions ? undefined : secondaryActions}\n\t\t\tmoreActionsLabel={moreActionsLabel}\n\t\t\trenderLink={resolvedRenderLink}\n\t\t\tafterDescription={slots?.afterDescription}\n\t\t\twithSeparator={false}\n\t\t\tclassName={cn('layout-page-header--component', className)}\n\t\t\tcontentClassName={cn('max-w-none', contentClassName)}\n\t\t\ttitleClassName={cn('text-xl', titleClassName)}\n\t\t\ttitleRowClassName=\"gap-space-md\"\n\t\t\tdescriptionClassName={cn('text-sm', descriptionClassName)}\n\t\t\tactionsClassName={cn('shrink-0 self-end sm:self-auto', actionsClassName)}\n\t\t>\n\t\t\t{tabsNode}\n\t\t</PageHeading>\n\t);\n}\n","import { Stack } from '../../base/structure';\nimport { Container } from '../containers';\nimport { cn } from '../../../lib/utils';\nimport { forwardRef } from 'react';\n\nimport type { PageProps } from './page.types';\nimport { PageHeader } from './partials/page-header';\n\n/** Page — non-scrolling Container, PageHeader, and body-rhythm composition. */\nconst blockPadding = {none: 'py-0', sm: 'py-surface-xs', md: 'py-surface', lg: 'py-surface-lg'} as const;\n\nexport const Page = forwardRef<HTMLDivElement, PageProps>(function Page({\n\t\theader,\n\t\tchildren,\n\t\tslotProps,\n\t\trenderLink,\n\t\tmaxWidth,\n\t\tnarrow = false,\n\t\tgutter = 'lg',\n\t\tpadding = 'lg',\n\t\tclassName,\n\t\trender,\n\t\t...containerProps\n\t}, ref) {\n\tconst { className: bodyClassName, ...bodyProps } = slotProps?.body ?? {};\n\n\treturn (\n\t\t<Container\n\t\t\t{...containerProps}\n\t\t\tref={ref}\n\t\t\trender={render}\n\t\t\tmaxWidth={maxWidth ?? (narrow ? 'md' : 'lg')}\n\t\t\tgutter={gutter}\n\t\t\tclassName={cn('font-sans', blockPadding[padding], className)}\n\t\t>\n\t\t\t{/* Page rhythm: the 32px step separates the header from the body. */}\n\t\t\t<Stack gap=\"3xl\" className=\"page--component\">\n\t\t\t\t{header ? (\n\t\t\t\t\t<PageHeader\n\t\t\t\t\t\t{...header}\n\t\t\t\t\t\trenderLink={header.renderLink ?? renderLink}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t{children !== undefined && children !== null ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\t{...bodyProps}\n\t\t\t\t\t\tdata-slot=\"page-body\"\n\t\t\t\t\t\tclassName={cn('page--body relative block min-w-0 w-full', bodyClassName)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Stack>\n\t\t</Container>\n\t);\n});\n\nPage.displayName = 'Page';\n","/**\n * Page-level types for `Page`, `PageHeader`, `PageActions`, and exported\n * partials. All navigation is framework-neutral via `renderLink`.\n */\nimport type { ComponentType, JSX, Key, ReactNode } from 'react';\n\nimport type {\n\tLayoutLinkRenderer,\n\tLayoutNavigationAdapter,\n\tLayoutSlotAttributes,\n} from '../layout.types';\nimport type { TextGap } from '../../base/structure';\nimport type { ButtonSize } from '../../base/buttons';\nimport type { HeadingTag } from '../../typography';\nimport type { ContainerGutter, ContainerMaxWidth, ContainerProps } from '../containers/containers.types';\nimport type { StringsProp } from '../../../lib/strings';\nimport type { BadgeTone } from '../../base/badge';\nimport type { ActionPresentation } from '../../../lib/action-presentation';\nimport type { PageHeaderAction } from '../../base/navigation/page-header';\nimport type { OverflowTabItem } from '../../base/navigation';\n\nexport interface PageTitleBadge {\n\t/** Display label. */\n\tlabel: ReactNode;\n\t/** Semantic color intent. */\n\ttone?: BadgeTone;\n\tkey?: Key;\n}\n\nexport type { PageHeaderAction } from '../../base/navigation/page-header';\n\n/** Section tabs under a record's header. */\nexport interface PageHeaderTabs {\n\t/** Sections in order. `badge` shows a count chip beside the label. */\n\titems: OverflowTabItem[];\n\t/** Id of the active section. */\n\tvalue?: string;\n\t/**\n\t * Fired with the id of the chosen section. Switch the content or route here;\n\t * an item `href` renders a native link.\n\t */\n\tonValueChange?: (id: string) => void;\n\t/** Accessible name of the tab list. Default: `'Sections'`. */\n\tlabel?: string;\n\t/** Label of the trigger that holds tabs which do not fit. Default: `'More'`. */\n\tmoreLabel?: string;\n}\n\nexport interface PageHeaderSlots {\n\t/** Replaces the leading back control entirely. */\n\tback?: ReactNode;\n\t/** Additional content before the title line. */\n\tbeforeTitle?: ReactNode;\n\t/** Additional content after the description. */\n\tafterDescription?: ReactNode;\n\t/** Replaces the trailing actions region, including role-based commands. */\n\tactions?: ReactNode;\n}\n\nexport interface PageHeaderProps extends LayoutNavigationAdapter {\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Supporting copy under the title. */\n\tdescription?: ReactNode;\n\t/** Shared title/description rhythm. Defaults to dense for page copy. */\n\ttextGap?: TextGap;\n\t/** Semantic heading level for the title. Defaults to `h1`, the route's main heading; use `h2` when the page sits inside another titled page. */\n\theadingTag?: HeadingTag;\n\t/** Optional decorative icon rendered before the title. Pass a Lucide icon component. */\n\ttitleIcon?: ComponentType<{ className?: string }>;\n\t/** Optional link target for the title icon. Uses the same framework-neutral renderer as `backHref`. */\n\ttitleIconHref?: string;\n\t/** Optional click handler for the title icon when it should behave like an action. */\n\tonTitleIconClick?: () => void;\n\t/** Accessible label for linked/clickable title icons. */\n\ttitleIconLabel?: string;\n\t/** Destination for the back control. */\n\tbackHref?: string;\n\tonBack?: () => void;\n\t/** Copy for the back control. */\n\tbackLabel?: string;\n\t/** Chips shown beside the page title. */\n\ttitleBadges?: PageTitleBadge[];\n\t/**\n\t * The page's one main command: a solid primary button after the secondary\n\t * commands, visible at every width.\n\t */\n\tprimaryAction?: PageHeaderAction;\n\t/**\n\t * Supporting commands in priority order. The first two render as outline\n\t * buttons before the primary command; the rest, and every destructive\n\t * command, move into the More actions menu, which always closes the row.\n\t * Below `sm`, all secondary commands collapse into that menu.\n\t */\n\tsecondaryActions?: readonly PageHeaderAction[];\n\t/** Accessible name of the More actions menu trigger. */\n\tmoreActionsLabel?: string;\n\t/**\n\t * Section tabs under the header, for a record split into sections such as\n\t * documents and history. Tabs that do not fit move into a More menu, and\n\t * the active tab stays visible.\n\t */\n\ttabs?: PageHeaderTabs;\n\t/**\n\t * Custom controls before the role-based commands, such as a period select.\n\t * Prefer `primaryAction` and `secondaryActions` for commands.\n\t */\n\tactions?: ReactNode;\n\t/** Replaces individual regions of the shell. */\n\tslots?: PageHeaderSlots;\n\tclassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\tactionsClassName?: string;\n\ttitleClassName?: string;\n\ttitleIconClassName?: string;\n\tdescriptionClassName?: string;\n}\n\nexport interface PageActionContext {\n\tindex: number;\n\tisInline: boolean;\n\trenderLink: LayoutLinkRenderer;\n}\n\n/** @deprecated Use PageHeaderAction with `primaryAction` and `secondaryActions`. */\nexport interface PageAction extends ActionPresentation {\n\tid?: string;\n\t/** Display label. */\n\tlabel: ReactNode;\n\tonClick?: () => void;\n\t/** Destination for the entry, when it navigates. */\n\thref?: string;\n\ttarget?: string;\n\trel?: string;\n\texternal?: boolean;\n\t/** Shows the pending indicator. */\n\tloading?: boolean;\n\t/** Leading glyph. */\n\ticon?: ComponentType<{ className?: string }>;\n\t/** Optional inline button size. Defaults to the PageActions `size` prop. */\n\tsize?: ButtonSize;\n\tgroup?: string;\n\tplacement?: 'auto' | 'inline' | 'menu';\n\t/** Escape hatch for one action only. Prefer `renderAction` for consistent customization. */\n\telement?: ReactNode | JSX.Element;\n}\n\nexport type PageActionsDisplay = 'flat' | 'dropdown' | 'auto';\n\nexport interface PageActionsStrings {\n\tmenuLabel: string;\n}\n\nexport const defaultPageActionsStrings: PageActionsStrings = {\n\tmenuLabel: 'More actions',\n};\n\nexport interface PageActionsProps extends LayoutNavigationAdapter {\n\t/** Controls offered on the surface. */\n\tactions?: PageAction[];\n\t/** How actions are presented — inline, menu, or responsive. */\n\tdisplay?: PageActionsDisplay;\n\t/**\n\t * Inline action button scale, which the More actions square beside them\n\t * matches. Defaults to `sm`; set `md` for normal page-header buttons. A\n\t * menu-only ribbon follows the provider scale.\n\t */\n\tsize?: ButtonSize;\n\t/** Width at which responsive actions collapse into a menu. */\n\tbreakpoint?: number;\n\t/**\n\t * Maximum non-menu actions rendered inline before overflow moves them into\n\t * the dropdown menu. Defaults to 4 for admin header density.\n\t */\n\tmaxInlineActions?: number;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<PageActionsStrings>;\n\tclassName?: string;\n\t/** Merged onto the inline action row. */\n\tinlineClassName?: string;\n\t/** Merged onto the action menu. */\n\tmenuClassName?: string;\n\t/** Replaces the default action rendering. */\n\trenderAction?: (action: PageAction, context: PageActionContext) => ReactNode;\n}\n\nexport interface PageSlotProps {\n\t/** Native attributes merged onto the page body region. */\n\tbody?: LayoutSlotAttributes<HTMLDivElement>;\n}\n\nexport interface PageProps\n\textends LayoutNavigationAdapter, Omit<ContainerProps, 'children'> {\n\t/** Header region of the shell. */\n\theader?: PageHeaderProps;\n\t/** Maximum content width. Explicit values override narrow. Defaults to `lg`. */\n\tmaxWidth?: ContainerMaxWidth;\n\t/** Center one resource or form at the existing `md` content measure. */\n\tnarrow?: boolean;\n\t/** Inline page gutters. Defaults to `lg`; none requires an existing padded parent. */\n\tgutter?: ContainerGutter;\n\t/** Block padding around the whole page. Defaults to `lg`, independent of gutter. */\n\tpadding?: ContainerGutter;\n\tchildren?: ReactNode;\n\t/** Native attributes for stable page regions. */\n\tslotProps?: PageSlotProps;\n}\n","/**\n * PageActions — composable action ribbon for page headers.\n *\n * Links go through `renderLink`, never router imports or DOM click hacks.\n * Use `renderAction` for app-specific rendering while keeping grouping,\n * filtering, breakpoint, and menu placement logic centralized.\n */\nimport { useEffect, useMemo, useState, type ReactElement } from 'react';\n\nimport {\n\tActionButtons,\n\tActionMenu,\n\ttype ActionMenuAction,\n\ttype ActionMenuLinkRenderProps,\n} from '../../../base/action-menu';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport {\n\tdefaultPageActionsStrings,\n\ttype PageAction,\n\ttype PageActionContext,\n\ttype PageActionsProps,\n} from '../page.types';\n\nconst PAGE_ACTIONS_MENU_CLASS = 'max-h-[80vh] overflow-y-auto overscroll-contain';\nconst DEFAULT_MAX_INLINE_ACTIONS = 4;\n\ntype PageActionEntry = {\n\t/** The action this surface performs. */\n\taction: PageAction;\n\tindex: number;\n};\n\nfunction toActionMenuAction(\n\t{ action, index }: PageActionEntry,\n\tcontextBase: Omit<PageActionContext, 'index' | 'isInline'>,\n\tisInline: boolean,\n\trenderAction?: PageActionsProps['renderAction'],\n): ActionMenuAction {\n\tconst context: PageActionContext = { ...contextBase, index, isInline };\n\tconst disabled = !!action.disabled || !!action.loading;\n\n\treturn {\n\t\tid: action.id ?? String(index),\n\t\tlabel: action.label,\n\t\ticon: action.icon,\n\t\tonClick: action.onClick,\n\t\thref: action.href && !action.onClick ? action.href : undefined,\n\t\ttarget: action.target,\n\t\trel: action.rel,\n\t\texternal: action.external,\n\t\tdisabled,\n\t\ttone: action.tone ?? 'secondary',\n\t\tbuttonStyle: action.buttonStyle ?? 'solid',\n\t\tbuttonSize: action.size,\n\t\tgroup: action.group,\n\t\trender: action.element ?? renderAction?.(action, context),\n\t};\n}\n\n/** @deprecated Pass page commands as `primaryAction` and `secondaryActions`; use ActionButtons for a toolbar row. */\nexport function PageActions({\n\tactions,\n\tdisplay = 'dropdown',\n\tsize = 'sm',\n\tbreakpoint = 1040,\n\tmaxInlineActions = DEFAULT_MAX_INLINE_ACTIONS,\n\trenderLink,\n\tstrings: stringsProp,\n\tclassName,\n\tinlineClassName,\n\tmenuClassName,\n\trenderAction,\n}: PageActionsProps) {\n\tconst strings = useStrings(defaultPageActionsStrings, stringsProp);\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\n\tconst filtered = useMemo<PageActionEntry[]>(\n\t\t() => (actions ?? [])\n\t\t\t.map((action, index) => ({ action, index }))\n\t\t\t.filter(({ action }) => action.visible !== false),\n\t\t[actions],\n\t);\n\n\tconst [isNarrow, setIsNarrow] = useState(false);\n\tuseEffect(() => {\n\t\tif (display !== 'auto' || typeof window === 'undefined') return;\n\n\t\tconst check = () => setIsNarrow(window.innerWidth <= breakpoint);\n\t\tcheck();\n\t\twindow.addEventListener('resize', check);\n\t\treturn () => window.removeEventListener('resize', check);\n\t}, [display, breakpoint]);\n\n\tif (filtered.length === 0) return null;\n\n\tconst inlineContextBase = { renderLink: resolvedRenderLink };\n\tconst renderActionLink = (props: ActionMenuLinkRenderProps) =>\n\t\tresolvedRenderLink({\n\t\t\t...props,\n\t\t\tchildren: props.children ?? null,\n\t\t}) as ReactElement;\n\tconst inlineClass = cn('flex min-w-0 max-w-full flex-wrap items-center gap-space-sm', inlineClassName, className);\n\tconst menuContentClass = cn(PAGE_ACTIONS_MENU_CLASS, menuClassName);\n\n\tif (display === 'dropdown' || (display === 'auto' && isNarrow)) {\n\t\tconst dropdownActions = filtered.map((entry) =>\n\t\t\ttoActionMenuAction(entry, inlineContextBase, false, renderAction),\n\t\t);\n\n\t\treturn (\n\t\t\t<ActionMenu\n\t\t\t\tactions={dropdownActions}\n\t\t\t\tcontext=\"commands\"\n\t\t\t\tsrText={strings.menuLabel}\n\t\t\t\talign=\"end\"\n\t\t\t\tcloseOnSelect\n\t\t\t\tcontentClassName={menuContentClass}\n\t\t\t\tpreserveOrder\n\t\t\t\trenderLink={renderActionLink}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst inlineLimit = Math.max(0, maxInlineActions);\n\tconst inlineCandidates = filtered.filter(({ action }) => (action.placement ?? 'auto') !== 'menu');\n\tconst inline = inlineCandidates.slice(0, inlineLimit);\n\tconst overflow = inlineCandidates.slice(inlineLimit);\n\tconst menu = [\n\t\t...overflow,\n\t\t...filtered.filter(({ action }) => (action.placement ?? 'auto') === 'menu'),\n\t];\n\tconst inlineActions = inline.map((entry) =>\n\t\ttoActionMenuAction(entry, inlineContextBase, true, renderAction),\n\t);\n\tconst menuActions = menu.map((entry) =>\n\t\ttoActionMenuAction(entry, inlineContextBase, false, renderAction),\n\t);\n\n\treturn (\n\t\t<div className={inlineClass}>\n\t\t\t<ActionButtons\n\t\t\t\tactions={inlineActions}\n\t\t\t\tsize={size}\n\t\t\t\trenderLink={renderActionLink}\n\t\t\t/>\n\t\t\t{menu.length > 0 && (\n\t\t\t\t<ActionMenu\n\t\t\t\t\tactions={menuActions}\n\t\t\t\t\tcontext=\"commands\"\n\t\t\t\t\tsrText={strings.menuLabel}\n\t\t\t\t\talign=\"end\"\n\t\t\t\t\tcloseOnSelect\n\t\t\t\t\tcontentClassName={menuContentClass}\n\t\t\t\t\tpreserveOrder\n\t\t\t\t\trenderLink={renderActionLink}\n\t\t\t\t\t// The square matches the inline commands it ends.\n\t\t\t\t\tbuttonProps={{ size }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;AAoBA,SAAgBW,EAAW,EAC1B,UACA,gBACA,aAAU,SACV,gBAAa,MACb,WAAWC,GACX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D,EAAiB,MAAM,GAAGF,CAAW,GAE9CI,IAAO,CACZ,GAFgBF,EAAiB,MAAMF,CAEpC,GACH,GAAGlB,EAAS,QAAQ,EAAE,iBAAcP,EAAO,aAAa,YAAY,MAAM,CAC3E,GACM8B,IAAgBF,EAAO,KAAK,MACjChC,EAAmB4B,GAAOR,GAAmB,IAAMd,CAAY,CAChE,GACM6B,IAAcF,EAAK,KAAK,MAC7BjC,EAAmB4B,GAAOR,GAAmB,IAAOd,CAAY,CACjE;CAEA,OACC,kBAAC,OAAD;EAAK,WAAWiB;EAAhB,UAAA,CACC,kBAAC3E,GAAD;GACC,SAASsF;GACH;GACN,YAAYb;EACZ,CAAA,GACAY,EAAK,SAAS,KACd,kBAACtF,GAAD;GACC,SAASwF;GACT,SAAQ;GACR,QAAQ1B,EAAQ;GAChB,OAAM;GACN,eAAA;GACA,kBAAkBgB;GAClB,eAAA;GACA,YAAYJ;GAEZ,aAAa,EAAE,QAAK;EACpB,CAAA,CAEE;;AAEP"}
1
+ {"version":3,"file":"page-CL9YeH_V.js","names":["_Fragment","buttonVariants","Button","Stack","ActionMenu","ActionButtons","PageHeading","OverflowTabBar","useLayoutLinkRenderer","Container","Fragment$1","PageHeader","TitleIcon","resolvedRenderLink","defaultBack","backHref","onBack","backLabel","cn","ArrowLeft","titleIconNode","icon","iconClassName","titleIconClassName","titleIconHref","onTitleIconClick","titleIconLabel","titleStart","slots","replacedActions","tabsNode","tabs","titleBadges","actions","primaryAction","secondaryActions","className","contentClassName","titleClassName","descriptionClassName","actionsClassName","blockPadding","Page","forwardRef","containerProps","bodyClassName","bodyProps","slotProps","maxWidth","narrow","padding","header","renderLink","children","defaultPageActionsStrings","PAGE_ACTIONS_MENU_CLASS","DEFAULT_MAX_INLINE_ACTIONS","toActionMenuAction","context","contextBase","disabled","action","index","renderAction","PageActions","stringsProp","strings","useStrings","filtered","useMemo","isNarrow","setIsNarrow","useState","useEffect","display","check","breakpoint","inlineContextBase","renderActionLink","props","inlineClass","inlineClassName","menuContentClass","menuClassName","dropdownActions","entry","inlineLimit","maxInlineActions","inlineCandidates","inline","menu","inlineActions","menuActions"],"sources":["../src/components/layout/page/partials/page-header.tsx","../src/components/layout/page/page.tsx","../src/components/layout/page/page.types.ts","../src/components/layout/page/partials/page-actions.tsx"],"sourcesContent":["/**\n * PageHeader — page title, back control, title badges, and actions.\n *\n * Navigation goes through `renderLink`; consumer apps wire framework links at\n * the boundary. Slots let consumers replace any structural region without\n * forking the page wrapper. `primaryAction` and `secondaryActions` describe\n * commands by role; PageHeading owns their treatment and placement.\n */\nimport { ArrowLeft } from 'lucide-react';\n\nimport { Button } from '../../../base/buttons';\nimport { Stack } from '../../../base/structure';\nimport { PageHeading } from '../../../base/navigation/page-header';\nimport { OverflowTabBar } from '../../../base/navigation/overflow-tab-bar';\nimport { buttonVariants } from '../../../base/buttons/button.variants';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport type { PageHeaderProps } from '../page.types';\n\nexport function PageHeader({\n\ttitle,\n\tdescription,\n\ttextGap = 'dense',\n\theadingTag = 'h1',\n\ttitleIcon: TitleIcon,\n\ttitleIconHref,\n\tonTitleIconClick,\n\ttitleIconLabel = 'Open title link',\n\tbackHref,\n\tonBack,\n\tbackLabel = 'Back',\n\ttitleBadges = [],\n\tprimaryAction,\n\tsecondaryActions,\n\tmoreActionsLabel = 'More actions',\n\ttabs,\n\tactions,\n\tslots,\n\trenderLink,\n\tclassName,\n\tcontentClassName,\n\tactionsClassName,\n\ttitleClassName,\n\ttitleIconClassName,\n\tdescriptionClassName,\n}: PageHeaderProps) {\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\tconst hasBack = !!backHref || !!onBack;\n\n\tconst defaultBack = hasBack ? (\n\t\t<div className=\"flex items-center gap-space-sm shrink-0\">\n\t\t\t{backHref && !onBack ? (\n\t\t\t\tresolvedRenderLink({\n\t\t\t\t\thref: backHref,\n\t\t\t\t\t'aria-label': backLabel,\n\t\t\t\t\tclassName: cn('page-header--back-link', buttonVariants({tone:'secondary',buttonStyle:'ghost',size:'sm',iconOnly:true})),\n\t\t\t\t\tchildren: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ArrowLeft className=\"size-icon rtl:rotate-180\" aria-hidden=\"true\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t})\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\tclassName=\"page-header--back-button\"\n\t\t\t\t\tonClick={onBack}\n\t\t\t\t\taria-label={backLabel}\n\t\t\t\t>\n\t\t\t\t\t<ArrowLeft className=\"size-icon rtl:rotate-180\" aria-hidden=\"true\" />\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</div>\n\t) : null;\n\tconst titleIconNode = (() => {\n\t\tif (!TitleIcon) return null;\n\n\t\tconst icon = <TitleIcon className=\"size-icon\" aria-hidden=\"true\" />;\n\t\tconst iconClassName = cn(\n\t\t\t'page-header--title-icon flex size-icon shrink-0 items-center justify-center text-muted-foreground',\n\t\t\ttitleIconClassName,\n\t\t);\n\n\t\tif (titleIconHref && !onTitleIconClick) {\n\t\t\treturn resolvedRenderLink({\n\t\t\t\thref: titleIconHref,\n\t\t\t\t'aria-label': titleIconLabel,\n\t\t\t\tclassName: cn(\n\t\t\t\t\t'page-header--title-icon-link',\n\t\t\t\t\tbuttonVariants({tone:'secondary',buttonStyle:'ghost',size:'sm',iconOnly:true}),\n\t\t\t\t\ttitleIconClassName,\n\t\t\t\t),\n\t\t\t\tchildren: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{icon}\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\n\t\tif (onTitleIconClick) {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\tclassName={cn('page-header--title-icon-button', titleIconClassName)}\n\t\t\t\t\tonClick={onTitleIconClick}\n\t\t\t\t\taria-label={titleIconLabel}\n\t\t\t\t>\n\t\t\t\t\t{icon}\n\t\t\t\t</Button>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<span aria-hidden=\"true\" className={iconClassName}>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t);\n\t})();\n\t// Keep the standard back affordance beside the title, rather than reserving\n\t// a leading column around the entire copy/actions block on narrow pages.\n\tconst titleStart = slots?.back == null && defaultBack ? (\n\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"sm\" wrap={false}>\n\t\t\t{defaultBack}{titleIconNode}\n\t\t</Stack>\n\t) : titleIconNode;\n\t// `slots.actions` replaces the whole region, role-based commands included.\n\tconst replacedActions = slots?.actions != null;\n\t// Section tabs belong to the header: they sit under its copy and commands,\n\t// and the page rhythm separates them from the body.\n\tconst tabsNode = tabs && tabs.items.length > 0 ? (\n\t\t<OverflowTabBar\n\t\t\titems={tabs.items}\n\t\t\tvalue={tabs.value}\n\t\t\tonValueChange={tabs.onValueChange}\n\t\t\tclassName=\"page-header--tabs\"\n\t\t\tstrings={{ navigationLabel: tabs.label ?? 'Sections', more: tabs.moreLabel ?? 'More' }}\n\t\t/>\n\t) : null;\n\n\treturn (\n\t\t<PageHeading\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\ttextGap={textGap}\n\t\t\theadingTag={headingTag}\n\t\t\tleading={slots?.back}\n\t\t\tbeforeTitle={slots?.beforeTitle}\n\t\t\ttitlePrefix={titleStart}\n\t\t\tbadges={titleBadges}\n\t\t\tactions={replacedActions ? slots?.actions : actions}\n\t\t\tprimaryAction={replacedActions ? undefined : primaryAction}\n\t\t\tsecondaryActions={replacedActions ? undefined : secondaryActions}\n\t\t\tmoreActionsLabel={moreActionsLabel}\n\t\t\trenderLink={resolvedRenderLink}\n\t\t\tafterDescription={slots?.afterDescription}\n\t\t\twithSeparator={false}\n\t\t\tclassName={cn('layout-page-header--component', className)}\n\t\t\tcontentClassName={cn('max-w-none', contentClassName)}\n\t\t\ttitleClassName={cn('text-xl', titleClassName)}\n\t\t\ttitleRowClassName=\"gap-space-md\"\n\t\t\tdescriptionClassName={cn('text-sm', descriptionClassName)}\n\t\t\tactionsClassName={cn('shrink-0 self-end sm:self-auto', actionsClassName)}\n\t\t>\n\t\t\t{tabsNode}\n\t\t</PageHeading>\n\t);\n}\n","import { Stack } from '../../base/structure';\nimport { Container } from '../containers';\nimport { cn } from '../../../lib/utils';\nimport { forwardRef } from 'react';\n\nimport type { PageProps } from './page.types';\nimport { PageHeader } from './partials/page-header';\n\n/** Page — non-scrolling Container, PageHeader, and body-rhythm composition. */\nconst blockPadding = {none: 'py-0', sm: 'py-surface-xs', md: 'py-surface', lg: 'py-surface-lg'} as const;\n\nexport const Page = forwardRef<HTMLDivElement, PageProps>(function Page({\n\t\theader,\n\t\tchildren,\n\t\tslotProps,\n\t\trenderLink,\n\t\tmaxWidth,\n\t\tnarrow = false,\n\t\tgutter = 'lg',\n\t\tpadding = 'lg',\n\t\tclassName,\n\t\trender,\n\t\t...containerProps\n\t}, ref) {\n\tconst { className: bodyClassName, ...bodyProps } = slotProps?.body ?? {};\n\n\treturn (\n\t\t<Container\n\t\t\t{...containerProps}\n\t\t\tref={ref}\n\t\t\trender={render}\n\t\t\tmaxWidth={maxWidth ?? (narrow ? 'md' : 'lg')}\n\t\t\tgutter={gutter}\n\t\t\tclassName={cn('font-sans', blockPadding[padding], className)}\n\t\t>\n\t\t\t{/* Page rhythm: the 32px step separates the header from the body. */}\n\t\t\t<Stack gap=\"3xl\" className=\"page--component\">\n\t\t\t\t{header ? (\n\t\t\t\t\t<PageHeader\n\t\t\t\t\t\t{...header}\n\t\t\t\t\t\trenderLink={header.renderLink ?? renderLink}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t{children !== undefined && children !== null ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\t{...bodyProps}\n\t\t\t\t\t\tdata-slot=\"page-body\"\n\t\t\t\t\t\tclassName={cn('page--body relative block min-w-0 w-full', bodyClassName)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Stack>\n\t\t</Container>\n\t);\n});\n\nPage.displayName = 'Page';\n","/**\n * Page-level types for `Page`, `PageHeader`, `PageActions`, and exported\n * partials. All navigation is framework-neutral via `renderLink`.\n */\nimport type { ComponentType, JSX, Key, ReactNode } from 'react';\n\nimport type {\n\tLayoutLinkRenderer,\n\tLayoutNavigationAdapter,\n\tLayoutSlotAttributes,\n} from '../layout.types';\nimport type { TextGap } from '../../base/structure';\nimport type { ButtonSize } from '../../base/buttons';\nimport type { HeadingTag } from '../../typography';\nimport type { ContainerGutter, ContainerMaxWidth, ContainerProps } from '../containers/containers.types';\nimport type { StringsProp } from '../../../lib/strings';\nimport type { BadgeTone } from '../../base/badge';\nimport type { ActionPresentation } from '../../../lib/action-presentation';\nimport type { PageHeaderAction } from '../../base/navigation/page-header';\nimport type { OverflowTabItem } from '../../base/navigation';\n\nexport interface PageTitleBadge {\n\t/** Display label. */\n\tlabel: ReactNode;\n\t/** Semantic color intent. */\n\ttone?: BadgeTone;\n\tkey?: Key;\n}\n\nexport type { PageHeaderAction } from '../../base/navigation/page-header';\n\n/** Section tabs under a record's header. */\nexport interface PageHeaderTabs {\n\t/** Sections in order. `badge` shows a count chip beside the label. */\n\titems: OverflowTabItem[];\n\t/** Id of the active section. */\n\tvalue?: string;\n\t/**\n\t * Fired with the id of the chosen section. Switch the content or route here;\n\t * an item `href` renders a native link.\n\t */\n\tonValueChange?: (id: string) => void;\n\t/** Accessible name of the tab list. Default: `'Sections'`. */\n\tlabel?: string;\n\t/** Label of the trigger that holds tabs which do not fit. Default: `'More'`. */\n\tmoreLabel?: string;\n}\n\nexport interface PageHeaderSlots {\n\t/** Replaces the leading back control entirely. */\n\tback?: ReactNode;\n\t/** Additional content before the title line. */\n\tbeforeTitle?: ReactNode;\n\t/** Additional content after the description. */\n\tafterDescription?: ReactNode;\n\t/** Replaces the trailing actions region, including role-based commands. */\n\tactions?: ReactNode;\n}\n\nexport interface PageHeaderProps extends LayoutNavigationAdapter {\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Supporting copy under the title. */\n\tdescription?: ReactNode;\n\t/** Shared title/description rhythm. Defaults to dense for page copy. */\n\ttextGap?: TextGap;\n\t/** Semantic heading level for the title. Defaults to `h1`, the route's main heading; use `h2` when the page sits inside another titled page. */\n\theadingTag?: HeadingTag;\n\t/** Optional decorative icon rendered before the title. Pass a Lucide icon component. */\n\ttitleIcon?: ComponentType<{ className?: string }>;\n\t/** Optional link target for the title icon. Uses the same framework-neutral renderer as `backHref`. */\n\ttitleIconHref?: string;\n\t/** Optional click handler for the title icon when it should behave like an action. */\n\tonTitleIconClick?: () => void;\n\t/** Accessible label for linked/clickable title icons. */\n\ttitleIconLabel?: string;\n\t/** Destination for the back control. */\n\tbackHref?: string;\n\tonBack?: () => void;\n\t/** Copy for the back control. */\n\tbackLabel?: string;\n\t/** Chips shown beside the page title. */\n\ttitleBadges?: PageTitleBadge[];\n\t/**\n\t * The page's one main command: a solid primary button after the secondary\n\t * commands, visible at every width.\n\t */\n\tprimaryAction?: PageHeaderAction;\n\t/**\n\t * Supporting commands in priority order. The first two render as outline\n\t * buttons before the primary command; the rest, and every destructive\n\t * command, move into the More actions menu, which always closes the row.\n\t * Below `sm`, all secondary commands collapse into that menu.\n\t */\n\tsecondaryActions?: readonly PageHeaderAction[];\n\t/** Accessible name of the More actions menu trigger. */\n\tmoreActionsLabel?: string;\n\t/**\n\t * Section tabs under the header, for a record split into sections such as\n\t * documents and history. Tabs that do not fit move into a More menu, and\n\t * the active tab stays visible.\n\t */\n\ttabs?: PageHeaderTabs;\n\t/**\n\t * Custom controls before the role-based commands, such as a period select.\n\t * Prefer `primaryAction` and `secondaryActions` for commands.\n\t */\n\tactions?: ReactNode;\n\t/** Replaces individual regions of the shell. */\n\tslots?: PageHeaderSlots;\n\tclassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\tactionsClassName?: string;\n\ttitleClassName?: string;\n\ttitleIconClassName?: string;\n\tdescriptionClassName?: string;\n}\n\nexport interface PageActionContext {\n\tindex: number;\n\tisInline: boolean;\n\trenderLink: LayoutLinkRenderer;\n}\n\n/** @deprecated Use PageHeaderAction with `primaryAction` and `secondaryActions`. */\nexport interface PageAction extends ActionPresentation {\n\tid?: string;\n\t/** Display label. */\n\tlabel: ReactNode;\n\tonClick?: () => void;\n\t/** Destination for the entry, when it navigates. */\n\thref?: string;\n\ttarget?: string;\n\trel?: string;\n\texternal?: boolean;\n\t/** Shows the pending indicator. */\n\tloading?: boolean;\n\t/** Leading glyph. */\n\ticon?: ComponentType<{ className?: string }>;\n\t/** Optional inline button size. Defaults to the PageActions `size` prop. */\n\tsize?: ButtonSize;\n\tgroup?: string;\n\tplacement?: 'auto' | 'inline' | 'menu';\n\t/** Escape hatch for one action only. Prefer `renderAction` for consistent customization. */\n\telement?: ReactNode | JSX.Element;\n}\n\nexport type PageActionsDisplay = 'flat' | 'dropdown' | 'auto';\n\nexport interface PageActionsStrings {\n\tmenuLabel: string;\n}\n\nexport const defaultPageActionsStrings: PageActionsStrings = {\n\tmenuLabel: 'More actions',\n};\n\nexport interface PageActionsProps extends LayoutNavigationAdapter {\n\t/** Controls offered on the surface. */\n\tactions?: PageAction[];\n\t/** How actions are presented — inline, menu, or responsive. */\n\tdisplay?: PageActionsDisplay;\n\t/**\n\t * Inline action button scale, which the More actions square beside them\n\t * matches. Defaults to `sm`; set `md` for normal page-header buttons. A\n\t * menu-only ribbon follows the provider scale.\n\t */\n\tsize?: ButtonSize;\n\t/** Width at which responsive actions collapse into a menu. */\n\tbreakpoint?: number;\n\t/**\n\t * Maximum non-menu actions rendered inline before overflow moves them into\n\t * the dropdown menu. Defaults to 4 for admin header density.\n\t */\n\tmaxInlineActions?: number;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<PageActionsStrings>;\n\tclassName?: string;\n\t/** Merged onto the inline action row. */\n\tinlineClassName?: string;\n\t/** Merged onto the action menu. */\n\tmenuClassName?: string;\n\t/** Replaces the default action rendering. */\n\trenderAction?: (action: PageAction, context: PageActionContext) => ReactNode;\n}\n\nexport interface PageSlotProps {\n\t/** Native attributes merged onto the page body region. */\n\tbody?: LayoutSlotAttributes<HTMLDivElement>;\n}\n\nexport interface PageProps\n\textends LayoutNavigationAdapter, Omit<ContainerProps, 'children'> {\n\t/** Header region of the shell. */\n\theader?: PageHeaderProps;\n\t/** Maximum content width. Explicit values override narrow. Defaults to `lg`. */\n\tmaxWidth?: ContainerMaxWidth;\n\t/** Center one resource or form at the existing `md` content measure. */\n\tnarrow?: boolean;\n\t/** Inline page gutters. Defaults to `lg`; none requires an existing padded parent. */\n\tgutter?: ContainerGutter;\n\t/** Block padding around the whole page. Defaults to `lg`, independent of gutter. */\n\tpadding?: ContainerGutter;\n\tchildren?: ReactNode;\n\t/** Native attributes for stable page regions. */\n\tslotProps?: PageSlotProps;\n}\n","/**\n * PageActions — composable action ribbon for page headers.\n *\n * Links go through `renderLink`, never router imports or DOM click hacks.\n * Use `renderAction` for app-specific rendering while keeping grouping,\n * filtering, breakpoint, and menu placement logic centralized.\n */\nimport { useEffect, useMemo, useState, type ReactElement } from 'react';\n\nimport {\n\tActionButtons,\n\tActionMenu,\n\ttype ActionMenuAction,\n\ttype ActionMenuLinkRenderProps,\n} from '../../../base/action-menu';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport {\n\tdefaultPageActionsStrings,\n\ttype PageAction,\n\ttype PageActionContext,\n\ttype PageActionsProps,\n} from '../page.types';\n\nconst PAGE_ACTIONS_MENU_CLASS = 'max-h-[80vh] overflow-y-auto overscroll-contain';\nconst DEFAULT_MAX_INLINE_ACTIONS = 4;\n\ntype PageActionEntry = {\n\t/** The action this surface performs. */\n\taction: PageAction;\n\tindex: number;\n};\n\nfunction toActionMenuAction(\n\t{ action, index }: PageActionEntry,\n\tcontextBase: Omit<PageActionContext, 'index' | 'isInline'>,\n\tisInline: boolean,\n\trenderAction?: PageActionsProps['renderAction'],\n): ActionMenuAction {\n\tconst context: PageActionContext = { ...contextBase, index, isInline };\n\tconst disabled = !!action.disabled || !!action.loading;\n\n\treturn {\n\t\tid: action.id ?? String(index),\n\t\tlabel: action.label,\n\t\ticon: action.icon,\n\t\tonClick: action.onClick,\n\t\thref: action.href && !action.onClick ? action.href : undefined,\n\t\ttarget: action.target,\n\t\trel: action.rel,\n\t\texternal: action.external,\n\t\tdisabled,\n\t\ttone: action.tone ?? 'secondary',\n\t\tbuttonStyle: action.buttonStyle ?? 'solid',\n\t\tbuttonSize: action.size,\n\t\tgroup: action.group,\n\t\trender: action.element ?? renderAction?.(action, context),\n\t};\n}\n\n/** @deprecated Pass page commands as `primaryAction` and `secondaryActions`; use ActionButtons for a toolbar row. */\nexport function PageActions({\n\tactions,\n\tdisplay = 'dropdown',\n\tsize = 'sm',\n\tbreakpoint = 1040,\n\tmaxInlineActions = DEFAULT_MAX_INLINE_ACTIONS,\n\trenderLink,\n\tstrings: stringsProp,\n\tclassName,\n\tinlineClassName,\n\tmenuClassName,\n\trenderAction,\n}: PageActionsProps) {\n\tconst strings = useStrings(defaultPageActionsStrings, stringsProp);\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\n\tconst filtered = useMemo<PageActionEntry[]>(\n\t\t() => (actions ?? [])\n\t\t\t.map((action, index) => ({ action, index }))\n\t\t\t.filter(({ action }) => action.visible !== false),\n\t\t[actions],\n\t);\n\n\tconst [isNarrow, setIsNarrow] = useState(false);\n\tuseEffect(() => {\n\t\tif (display !== 'auto' || typeof window === 'undefined') return;\n\n\t\tconst check = () => setIsNarrow(window.innerWidth <= breakpoint);\n\t\tcheck();\n\t\twindow.addEventListener('resize', check);\n\t\treturn () => window.removeEventListener('resize', check);\n\t}, [display, breakpoint]);\n\n\tif (filtered.length === 0) return null;\n\n\tconst inlineContextBase = { renderLink: resolvedRenderLink };\n\tconst renderActionLink = (props: ActionMenuLinkRenderProps) =>\n\t\tresolvedRenderLink({\n\t\t\t...props,\n\t\t\tchildren: props.children ?? null,\n\t\t}) as ReactElement;\n\tconst inlineClass = cn('flex min-w-0 max-w-full flex-wrap items-center gap-space-sm', inlineClassName, className);\n\tconst menuContentClass = cn(PAGE_ACTIONS_MENU_CLASS, menuClassName);\n\n\tif (display === 'dropdown' || (display === 'auto' && isNarrow)) {\n\t\tconst dropdownActions = filtered.map((entry) =>\n\t\t\ttoActionMenuAction(entry, inlineContextBase, false, renderAction),\n\t\t);\n\n\t\treturn (\n\t\t\t<ActionMenu\n\t\t\t\tactions={dropdownActions}\n\t\t\t\tcontext=\"commands\"\n\t\t\t\tsrText={strings.menuLabel}\n\t\t\t\talign=\"end\"\n\t\t\t\tcloseOnSelect\n\t\t\t\tcontentClassName={menuContentClass}\n\t\t\t\tpreserveOrder\n\t\t\t\trenderLink={renderActionLink}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst inlineLimit = Math.max(0, maxInlineActions);\n\tconst inlineCandidates = filtered.filter(({ action }) => (action.placement ?? 'auto') !== 'menu');\n\tconst inline = inlineCandidates.slice(0, inlineLimit);\n\tconst overflow = inlineCandidates.slice(inlineLimit);\n\tconst menu = [\n\t\t...overflow,\n\t\t...filtered.filter(({ action }) => (action.placement ?? 'auto') === 'menu'),\n\t];\n\tconst inlineActions = inline.map((entry) =>\n\t\ttoActionMenuAction(entry, inlineContextBase, true, renderAction),\n\t);\n\tconst menuActions = menu.map((entry) =>\n\t\ttoActionMenuAction(entry, inlineContextBase, false, renderAction),\n\t);\n\n\treturn (\n\t\t<div className={inlineClass}>\n\t\t\t<ActionButtons\n\t\t\t\tactions={inlineActions}\n\t\t\t\tsize={size}\n\t\t\t\trenderLink={renderActionLink}\n\t\t\t/>\n\t\t\t{menu.length > 0 && (\n\t\t\t\t<ActionMenu\n\t\t\t\t\tactions={menuActions}\n\t\t\t\t\tcontext=\"commands\"\n\t\t\t\t\tsrText={strings.menuLabel}\n\t\t\t\t\talign=\"end\"\n\t\t\t\t\tcloseOnSelect\n\t\t\t\t\tcontentClassName={menuContentClass}\n\t\t\t\t\tpreserveOrder\n\t\t\t\t\trenderLink={renderActionLink}\n\t\t\t\t\t// The square matches the inline commands it ends.\n\t\t\t\t\tbuttonProps={{ size }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;AAoBA,SAAgBW,EAAW,EAC1B,UACA,gBACA,aAAU,SACV,gBAAa,MACb,WAAWC,GACX,kBACA,qBACA,oBAAiB,mBACjB,aACA,WACA,eAAY,QACZ,iBAAc,CAAC,GACf,kBACA,qBACA,sBAAmB,gBACnB,SACA,YACA,UACA,eACA,cACA,qBACA,qBACA,mBACA,uBACA,2BACmB;CACnB,IAAMC,IAAqBL,EAAsB,EAAE,cAAW,CAAC,GAGzDM,IAFYC,KAAcC,IAG/B,kBAAC,OAAD;EAAK,WAAU;EACb,UAAAD,KAAY,CAACC,IACbH,EAAmB;GAClB,MAAME;GACN,cAAcE;GACd,WAAWC,EAAG,0BAA0BjB,EAAe;IAAC,MAAK;IAAY,aAAY;IAAQ,MAAK;IAAK,UAAS;GAAI,CAAC,CAAC;GACtH,UACC,kBAAAD,GAAA,EAAA,UACC,kBAACmB,GAAD;IAAW,WAAU;IAA2B,eAAY;GAAQ,CAAA,EACnE,CAAA;EAEJ,CAAC,IAED,kBAACjB,GAAD;GACC,MAAK;GACL,MAAK;GACL,aAAY;GACZ,MAAK;GAAK,UAAA;GACV,WAAU;GACV,SAASc;GACT,cAAYC;GAEZ,UAAA,kBAACE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as e, v as t } from "./ui-provider-1D_NSYzO.js";
3
- import { t as n } from "./utils-l5LpDw2z.js";
4
- import { a as r, n as i } from "./buttons-SbIcm1HJ.js";
5
- import { n as a } from "./action-menu-TzCoSlwL.js";
2
+ import { s as e, v as t } from "./ui-provider-C_U0Xma4.js";
3
+ import { t as n } from "./utils-BRhFDwuU.js";
4
+ import { a as r, n as i } from "./buttons-DPZekJFu.js";
5
+ import { n as a } from "./action-menu-CllU52Mm.js";
6
6
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  //#region src/components/base/navigation/page-header/page-header-commands.tsx
8
8
  var l = ({ href: e, external: t, target: n, rel: r, children: i, ...a }) => /* @__PURE__ */ s("a", {
@@ -123,4 +123,4 @@ function _({ primaryAction: e, secondaryActions: t, moreActionsLabel: r, renderL
123
123
  //#endregion
124
124
  export { f as n, _ as t };
125
125
 
126
- //# sourceMappingURL=page-header-commands-DjzFEq3E.js.map
126
+ //# sourceMappingURL=page-header-commands-DOb6WsfD.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-header-commands-DjzFEq3E.js","names":["_Fragment","useDensityConfig","resolveComponentScale","cn","buttonVariants","Button","ActionMenu","defaultPageHeaderLinkRenderer","props","target","external","rel","MENU_CONTENT_CLASS","isVisible","action","hasPageHeaderCommands","primaryAction","secondaryActions","presentation","role","linkDestination","CommandButton","href","Icon","hookClassName","className","Fragment","renderLink","defaultScale","toMenuAction","key","PageHeaderCommands","secondary","index","routine","destructive","inline","overflow","primary","menuActions","entry","menuOnlyBelowSm","moreActionsLabel"],"sources":["../src/components/base/navigation/page-header/page-header-commands.tsx"],"sourcesContent":["/**\n * PageHeaderCommands — role-based commands for page and record headers.\n *\n * The role chooses each command's treatment and place: outline secondary\n * commands, then one solid primary command, then the More actions menu for\n * overflow and destructive commands, which always closes the row. Below `sm`,\n * secondary commands collapse into that menu through CSS alone, so server and\n * client markup agree. PageHeading owns the row, so every header that takes\n * `primaryAction` and `secondaryActions` places its commands the same way.\n */\nimport type { ComponentType, MouseEvent, ReactElement, ReactNode } from 'react';\n\nimport {\n\tActionMenu,\n\ttype ActionMenuAction,\n\ttype ActionMenuLinkRenderProps,\n} from '../../action-menu';\nimport { Button } from '../../buttons';\nimport { buttonVariants } from '../../buttons/button.variants';\nimport { resolveComponentScale, useDensityConfig } from '../../../../lib/ui-provider';\nimport { cn } from '../../../../lib/utils';\n\n/**\n * A page command described by its role. `primaryAction` and `secondaryActions`\n * choose the treatment, so a command carries no tone or button style.\n */\nexport interface PageHeaderAction {\n\t/** Stable key. Defaults to the command's position. */\n\tid?: string;\n\t/** Visible command text. */\n\tlabel: ReactNode;\n\t/** Runs the command. When both are set, `onClick` wins over `href`. */\n\tonClick?: () => void;\n\t/** Navigates through the header's `renderLink` instead of running a callback. */\n\thref?: string;\n\ttarget?: string;\n\trel?: string;\n\t/** Marks the destination as leaving the app; forwarded to `renderLink`. */\n\texternal?: boolean;\n\t/** Leading glyph. Pass a Lucide icon component. */\n\ticon?: ComponentType<{ className?: string }>;\n\t/** Shows the pending indicator and blocks activation. */\n\tloading?: boolean;\n\t/** Blocks activation while keeping the command visible. */\n\tdisabled?: boolean;\n\t/** Set false to omit the command, for example without permission. */\n\tvisible?: boolean;\n\t/**\n\t * Irreversible or harmful command. A destructive secondary command moves to\n\t * the More actions menu; a destructive primary command keeps its place with\n\t * the destructive treatment. Confirm it from the handler, e.g. ConfirmDialog.\n\t */\n\tdestructive?: boolean;\n}\n\n/** What a header hands its link renderer for an `href` command. */\nexport interface PageHeaderLinkRenderProps {\n\thref: string;\n\tchildren: ReactNode;\n\tclassName?: string;\n\ttarget?: string;\n\trel?: string;\n\t/** Marks the destination as leaving the app. */\n\texternal?: boolean;\n\tonClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n\t'aria-label'?: string;\n}\n\n/** Renders framework links for `href` commands. Layout `renderLink` functions fit. */\nexport type PageHeaderLinkRenderer = (props: PageHeaderLinkRenderProps) => ReactNode;\n\n/** Native anchor fallback, matching the layout default: external links open a new tab. */\nexport const defaultPageHeaderLinkRenderer: PageHeaderLinkRenderer = ({ href, external, target, rel, children, ...props }) => (\n\t<a\n\t\thref={href}\n\t\ttarget={target ?? (external ? '_blank' : undefined)}\n\t\trel={rel ?? (external ? 'noopener noreferrer' : undefined)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</a>\n);\n\n/** Secondary commands rendered as buttons from `sm` up; later ones overflow. */\nexport const PAGE_HEADER_INLINE_SECONDARY_LIMIT = 2;\n\nconst MENU_CONTENT_CLASS = 'max-h-[80vh] overflow-y-auto overscroll-contain';\n\ntype CommandRole = 'primary' | 'secondary';\n\ninterface CommandEntry {\n\taction: PageHeaderAction;\n\tkey: string;\n}\n\nexport interface PageHeaderCommandsProps {\n\tprimaryAction?: PageHeaderAction;\n\tsecondaryActions?: readonly PageHeaderAction[];\n\t/** Accessible name of the More actions menu trigger. */\n\tmoreActionsLabel: string;\n\trenderLink?: PageHeaderLinkRenderer;\n}\n\nfunction isVisible(action: PageHeaderAction | undefined): action is PageHeaderAction {\n\treturn !!action && action.visible !== false;\n}\n\n/** Whether the header has any role-based command to render. */\nexport function hasPageHeaderCommands(\n\tprimaryAction: PageHeaderAction | undefined,\n\tsecondaryActions: readonly PageHeaderAction[] | undefined,\n) {\n\treturn isVisible(primaryAction) || (secondaryActions ?? []).some(isVisible);\n}\n\nfunction presentation(action: PageHeaderAction, role: CommandRole) {\n\tif (role === 'secondary') return { tone: 'secondary', buttonStyle: 'outline' } as const;\n\treturn { tone: action.destructive ? 'destructive' : 'primary', buttonStyle: 'solid' } as const;\n}\n\n/** `onClick` wins over `href`, matching PageAction. */\nfunction linkDestination(action: PageHeaderAction) {\n\treturn action.href && !action.onClick ? action.href : undefined;\n}\n\nfunction CommandButton({\n\taction,\n\trole,\n\trenderLink,\n\tclassName,\n}: {\n\taction: PageHeaderAction;\n\trole: CommandRole;\n\trenderLink: PageHeaderLinkRenderer;\n\tclassName?: string;\n}) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst { tone, buttonStyle } = presentation(action, role);\n\tconst href = linkDestination(action);\n\tconst Icon = action.icon;\n\tconst hookClassName = cn(`page-header--${role}-action`, className);\n\n\tif (href && !action.disabled && !action.loading) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{renderLink({\n\t\t\t\t\thref,\n\t\t\t\t\ttarget: action.target,\n\t\t\t\t\trel: action.rel,\n\t\t\t\t\texternal: action.external,\n\t\t\t\t\tclassName: cn(\n\t\t\t\t\t\t'button--component base-button--component',\n\t\t\t\t\t\tbuttonVariants({ tone, buttonStyle, size: resolveComponentScale(undefined, defaultScale) }),\n\t\t\t\t\t\thookClassName,\n\t\t\t\t\t),\n\t\t\t\t\tchildren: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{Icon && <Icon className=\"size-icon shrink-0\" aria-hidden=\"true\" />}\n\t\t\t\t\t\t\t{action.label}\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t})}\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ttype=\"button\"\n\t\t\ttone={tone}\n\t\t\tbuttonStyle={buttonStyle}\n\t\t\ticon={Icon}\n\t\t\tloading={action.loading}\n\t\t\thandlesLoading={action.loading !== undefined}\n\t\t\tdisabled={action.disabled}\n\t\t\tonClick={action.onClick}\n\t\t\tclassName={hookClassName}\n\t\t>\n\t\t\t{action.label}\n\t\t</Button>\n\t);\n}\n\nfunction toMenuAction({ action, key }: CommandEntry, className?: string): ActionMenuAction {\n\treturn {\n\t\tid: key,\n\t\tlabel: action.label,\n\t\ticon: action.icon,\n\t\tonClick: action.onClick,\n\t\thref: linkDestination(action),\n\t\ttarget: action.target,\n\t\trel: action.rel,\n\t\texternal: action.external,\n\t\tdisabled: !!action.disabled || !!action.loading,\n\t\ttone: action.destructive ? 'destructive' : 'secondary',\n\t\tclassName,\n\t};\n}\n\nexport function PageHeaderCommands({\n\tprimaryAction,\n\tsecondaryActions,\n\tmoreActionsLabel,\n\trenderLink = defaultPageHeaderLinkRenderer,\n}: PageHeaderCommandsProps) {\n\tconst secondary: CommandEntry[] = (secondaryActions ?? [])\n\t\t.map((action, index) => ({ action, key: action.id ?? `secondary-${index}` }))\n\t\t.filter(({ action }) => isVisible(action));\n\tconst routine = secondary.filter(({ action }) => !action.destructive);\n\tconst destructive = secondary.filter(({ action }) => action.destructive);\n\tconst inline = routine.slice(0, PAGE_HEADER_INLINE_SECONDARY_LIMIT);\n\tconst overflow = routine.slice(PAGE_HEADER_INLINE_SECONDARY_LIMIT);\n\tconst primary = isVisible(primaryAction) ? primaryAction : undefined;\n\n\tif (!primary && secondary.length === 0) return null;\n\n\t// Inline commands reappear in the menu only below `sm`, where they collapse.\n\tconst menuActions: ActionMenuAction[] = [\n\t\t...inline.map((entry) => toMenuAction(entry, 'sm:hidden')),\n\t\t...overflow.map((entry) => toMenuAction(entry)),\n\t\t...destructive.map((entry) => ({ ...toMenuAction(entry), group: true as const })),\n\t];\n\tconst menuOnlyBelowSm = overflow.length === 0 && destructive.length === 0;\n\tconst renderMenuLink = (props: ActionMenuLinkRenderProps) =>\n\t\trenderLink({ ...props, children: props.children ?? null }) as ReactElement;\n\n\t// Secondary commands lead, the primary command follows them, and the More\n\t// actions menu closes the row. The trigger is one more secondary command:\n\t// outline, at the commands' own height.\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"page-header-commands\"\n\t\t\tclassName=\"page-header--commands flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm\"\n\t\t>\n\t\t\t{inline.map((entry) => (\n\t\t\t\t<CommandButton\n\t\t\t\t\tkey={entry.key}\n\t\t\t\t\taction={entry.action}\n\t\t\t\t\trole=\"secondary\"\n\t\t\t\t\trenderLink={renderLink}\n\t\t\t\t\tclassName=\"max-sm:hidden\"\n\t\t\t\t/>\n\t\t\t))}\n\t\t\t{primary && <CommandButton action={primary} role=\"primary\" renderLink={renderLink} />}\n\t\t\t{menuActions.length > 0 && (\n\t\t\t\t<ActionMenu\n\t\t\t\t\tactions={menuActions}\n\t\t\t\t\tcontext=\"commands\"\n\t\t\t\t\tsrText={moreActionsLabel}\n\t\t\t\t\talign=\"end\"\n\t\t\t\t\tcloseOnSelect\n\t\t\t\t\tpreserveOrder\n\t\t\t\t\tcontentClassName={MENU_CONTENT_CLASS}\n\t\t\t\t\trenderLink={renderMenuLink}\n\t\t\t\t\t// The shared outline overflow square follows the provider scale, like the commands.\n\t\t\t\t\tbuttonProps={{ className: cn('page-header--more-actions', menuOnlyBelowSm && 'sm:hidden') }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAwEA,IAAaO,KAAyD,EAAE,SAAM,aAAU,WAAQ,QAAK,aAAU,GAAGC,QACjH,kBAAC,KAAD;CACO;CACN,QAAQC,MAAWC,IAAW,WAAW,KAAA;CACzC,KAAKC,MAAQD,IAAW,wBAAwB,KAAA;CAChD,GAAIF;CAEH;AACC,CAAA,GAMEI,IAAqB;AAiB3B,SAASC,EAAU,GAAkE;CACpF,OAAO,CAAC,CAACC,KAAUA,EAAO,YAAY;AACvC;AAGA,SAAgBC,EACf,GACA,GACC;CACD,OAAOF,EAAUG,CAAa,MAAMC,KAAoB,CAAC,EAAA,CAAG,KAAKJ,CAAS;AAC3E;AAEA,SAASK,EAAa,GAA0B,GAAmB;CAElE,OADIC,MAAS,cAAoB;EAAE,MAAM;EAAa,aAAa;CAAU,IACtE;EAAE,MAAML,EAAO,cAAc,gBAAgB;EAAW,aAAa;CAAQ;AACrF;AAGA,SAASM,EAAgB,GAA0B;CAClD,OAAON,EAAO,QAAQ,CAACA,EAAO,UAAUA,EAAO,OAAO,KAAA;AACvD;AAEA,SAASO,EAAc,EACtB,WACA,SACA,eACA,gBAME;CACF,IAAM,EAAE,oBAAiBpB,EAAiB,GACpC,EAAE,SAAM,mBAAgBiB,EAAaJ,GAAQK,CAAI,GACjDG,IAAOF,EAAgBN,CAAM,GAC7BS,IAAOT,EAA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AUF,EAAU,QAAQ,EAAE,gBAAa,CAAClB,EAAO,WAAW,GAC9DqB,IAAcH,EAAU,QAAQ,EAAE,gBAAalB,EAAO,WAAW,GACjEsB,IAASF,EAAQ,MAAM,GAAA,CAAqC,GAC5DG,IAAWH,EAAQ,MAAA,CAAwC,GAC3DI,IAAUzB,EAAUG,CAAa,IAAIA,IAAgB,KAAA;CAE3D,IAAI,CAACsB,KAAWN,EAAU,WAAW,GAAG,OAAO;CAG/C,IAAMO,IAAkC;EACvC,GAAGH,EAAO,KAAK,MAAUP,EAAaW,GAAO,WAAW,CAAC;EACzD,GAAGH,EAAS,KAAK,MAAUR,EAAaW,CAAK,CAAC;EAC9C,GAAGL,EAAY,KAAK,OAAW;GAAE,GAAGN,EAAaW,CAAK;GAAG,OAAO;EAAc,EAAE;CACjF,GACMC,IAAkBJ,EAAS,WAAW,KAAKF,EAAY,WAAW;CAOxE,OACC,kBAAC,OAAD;EACC,aAAU;EACV,WAAU;EAFX,UAAA;GAIEC,EAAO,KAAK,MACZ,kBAACf,GAAD;IAEC,QAAQmB,EAAM;IACd,MAAK;IACO;IACZ,WAAU;GACV,GALKA,EAAM,GAKX,CACD;GACAF,KAAW,kBAACjB,GAAD;IAAe,QAAQiB;IAAS,MAAK;IAAsB;GAAa,CAAA;GACnFC,EAAY,SAAS,KACrB,kBAACjC,GAAD;IACC,SAASiC;IACT,SAAQ;IACR,QAAQG;IACR,OAAM;IACN,eAAA;IACA,eAAA;IACA,kBAAkB9B;IAClB,aA9BoB,MACvBe,EAAW;KAAE,GAAGnB;KAAO,UAAUA,EAAM,YAAY;IAAK,CAAC;IA+BtD,aAAa,EAAE,WAAWL,EAAG,6BAA6BsC,KAAmB,WAAW,EAAE;GAC1F,CAAA;EAEE;;AAEP"}
1
+ {"version":3,"file":"page-header-commands-DOb6WsfD.js","names":["_Fragment","useDensityConfig","resolveComponentScale","cn","buttonVariants","Button","ActionMenu","defaultPageHeaderLinkRenderer","props","target","external","rel","MENU_CONTENT_CLASS","isVisible","action","hasPageHeaderCommands","primaryAction","secondaryActions","presentation","role","linkDestination","CommandButton","href","Icon","hookClassName","className","Fragment","renderLink","defaultScale","toMenuAction","key","PageHeaderCommands","secondary","index","routine","destructive","inline","overflow","primary","menuActions","entry","menuOnlyBelowSm","moreActionsLabel"],"sources":["../src/components/base/navigation/page-header/page-header-commands.tsx"],"sourcesContent":["/**\n * PageHeaderCommands — role-based commands for page and record headers.\n *\n * The role chooses each command's treatment and place: outline secondary\n * commands, then one solid primary command, then the More actions menu for\n * overflow and destructive commands, which always closes the row. Below `sm`,\n * secondary commands collapse into that menu through CSS alone, so server and\n * client markup agree. PageHeading owns the row, so every header that takes\n * `primaryAction` and `secondaryActions` places its commands the same way.\n */\nimport type { ComponentType, MouseEvent, ReactElement, ReactNode } from 'react';\n\nimport {\n\tActionMenu,\n\ttype ActionMenuAction,\n\ttype ActionMenuLinkRenderProps,\n} from '../../action-menu';\nimport { Button } from '../../buttons';\nimport { buttonVariants } from '../../buttons/button.variants';\nimport { resolveComponentScale, useDensityConfig } from '../../../../lib/ui-provider';\nimport { cn } from '../../../../lib/utils';\n\n/**\n * A page command described by its role. `primaryAction` and `secondaryActions`\n * choose the treatment, so a command carries no tone or button style.\n */\nexport interface PageHeaderAction {\n\t/** Stable key. Defaults to the command's position. */\n\tid?: string;\n\t/** Visible command text. */\n\tlabel: ReactNode;\n\t/** Runs the command. When both are set, `onClick` wins over `href`. */\n\tonClick?: () => void;\n\t/** Navigates through the header's `renderLink` instead of running a callback. */\n\thref?: string;\n\ttarget?: string;\n\trel?: string;\n\t/** Marks the destination as leaving the app; forwarded to `renderLink`. */\n\texternal?: boolean;\n\t/** Leading glyph. Pass a Lucide icon component. */\n\ticon?: ComponentType<{ className?: string }>;\n\t/** Shows the pending indicator and blocks activation. */\n\tloading?: boolean;\n\t/** Blocks activation while keeping the command visible. */\n\tdisabled?: boolean;\n\t/** Set false to omit the command, for example without permission. */\n\tvisible?: boolean;\n\t/**\n\t * Irreversible or harmful command. A destructive secondary command moves to\n\t * the More actions menu; a destructive primary command keeps its place with\n\t * the destructive treatment. Confirm it from the handler, e.g. ConfirmDialog.\n\t */\n\tdestructive?: boolean;\n}\n\n/** What a header hands its link renderer for an `href` command. */\nexport interface PageHeaderLinkRenderProps {\n\thref: string;\n\tchildren: ReactNode;\n\tclassName?: string;\n\ttarget?: string;\n\trel?: string;\n\t/** Marks the destination as leaving the app. */\n\texternal?: boolean;\n\tonClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n\t'aria-label'?: string;\n}\n\n/** Renders framework links for `href` commands. Layout `renderLink` functions fit. */\nexport type PageHeaderLinkRenderer = (props: PageHeaderLinkRenderProps) => ReactNode;\n\n/** Native anchor fallback, matching the layout default: external links open a new tab. */\nexport const defaultPageHeaderLinkRenderer: PageHeaderLinkRenderer = ({ href, external, target, rel, children, ...props }) => (\n\t<a\n\t\thref={href}\n\t\ttarget={target ?? (external ? '_blank' : undefined)}\n\t\trel={rel ?? (external ? 'noopener noreferrer' : undefined)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</a>\n);\n\n/** Secondary commands rendered as buttons from `sm` up; later ones overflow. */\nexport const PAGE_HEADER_INLINE_SECONDARY_LIMIT = 2;\n\nconst MENU_CONTENT_CLASS = 'max-h-[80vh] overflow-y-auto overscroll-contain';\n\ntype CommandRole = 'primary' | 'secondary';\n\ninterface CommandEntry {\n\taction: PageHeaderAction;\n\tkey: string;\n}\n\nexport interface PageHeaderCommandsProps {\n\tprimaryAction?: PageHeaderAction;\n\tsecondaryActions?: readonly PageHeaderAction[];\n\t/** Accessible name of the More actions menu trigger. */\n\tmoreActionsLabel: string;\n\trenderLink?: PageHeaderLinkRenderer;\n}\n\nfunction isVisible(action: PageHeaderAction | undefined): action is PageHeaderAction {\n\treturn !!action && action.visible !== false;\n}\n\n/** Whether the header has any role-based command to render. */\nexport function hasPageHeaderCommands(\n\tprimaryAction: PageHeaderAction | undefined,\n\tsecondaryActions: readonly PageHeaderAction[] | undefined,\n) {\n\treturn isVisible(primaryAction) || (secondaryActions ?? []).some(isVisible);\n}\n\nfunction presentation(action: PageHeaderAction, role: CommandRole) {\n\tif (role === 'secondary') return { tone: 'secondary', buttonStyle: 'outline' } as const;\n\treturn { tone: action.destructive ? 'destructive' : 'primary', buttonStyle: 'solid' } as const;\n}\n\n/** `onClick` wins over `href`, matching PageAction. */\nfunction linkDestination(action: PageHeaderAction) {\n\treturn action.href && !action.onClick ? action.href : undefined;\n}\n\nfunction CommandButton({\n\taction,\n\trole,\n\trenderLink,\n\tclassName,\n}: {\n\taction: PageHeaderAction;\n\trole: CommandRole;\n\trenderLink: PageHeaderLinkRenderer;\n\tclassName?: string;\n}) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst { tone, buttonStyle } = presentation(action, role);\n\tconst href = linkDestination(action);\n\tconst Icon = action.icon;\n\tconst hookClassName = cn(`page-header--${role}-action`, className);\n\n\tif (href && !action.disabled && !action.loading) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{renderLink({\n\t\t\t\t\thref,\n\t\t\t\t\ttarget: action.target,\n\t\t\t\t\trel: action.rel,\n\t\t\t\t\texternal: action.external,\n\t\t\t\t\tclassName: cn(\n\t\t\t\t\t\t'button--component base-button--component',\n\t\t\t\t\t\tbuttonVariants({ tone, buttonStyle, size: resolveComponentScale(undefined, defaultScale) }),\n\t\t\t\t\t\thookClassName,\n\t\t\t\t\t),\n\t\t\t\t\tchildren: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{Icon && <Icon className=\"size-icon shrink-0\" aria-hidden=\"true\" />}\n\t\t\t\t\t\t\t{action.label}\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t})}\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ttype=\"button\"\n\t\t\ttone={tone}\n\t\t\tbuttonStyle={buttonStyle}\n\t\t\ticon={Icon}\n\t\t\tloading={action.loading}\n\t\t\thandlesLoading={action.loading !== undefined}\n\t\t\tdisabled={action.disabled}\n\t\t\tonClick={action.onClick}\n\t\t\tclassName={hookClassName}\n\t\t>\n\t\t\t{action.label}\n\t\t</Button>\n\t);\n}\n\nfunction toMenuAction({ action, key }: CommandEntry, className?: string): ActionMenuAction {\n\treturn {\n\t\tid: key,\n\t\tlabel: action.label,\n\t\ticon: action.icon,\n\t\tonClick: action.onClick,\n\t\thref: linkDestination(action),\n\t\ttarget: action.target,\n\t\trel: action.rel,\n\t\texternal: action.external,\n\t\tdisabled: !!action.disabled || !!action.loading,\n\t\ttone: action.destructive ? 'destructive' : 'secondary',\n\t\tclassName,\n\t};\n}\n\nexport function PageHeaderCommands({\n\tprimaryAction,\n\tsecondaryActions,\n\tmoreActionsLabel,\n\trenderLink = defaultPageHeaderLinkRenderer,\n}: PageHeaderCommandsProps) {\n\tconst secondary: CommandEntry[] = (secondaryActions ?? [])\n\t\t.map((action, index) => ({ action, key: action.id ?? `secondary-${index}` }))\n\t\t.filter(({ action }) => isVisible(action));\n\tconst routine = secondary.filter(({ action }) => !action.destructive);\n\tconst destructive = secondary.filter(({ action }) => action.destructive);\n\tconst inline = routine.slice(0, PAGE_HEADER_INLINE_SECONDARY_LIMIT);\n\tconst overflow = routine.slice(PAGE_HEADER_INLINE_SECONDARY_LIMIT);\n\tconst primary = isVisible(primaryAction) ? primaryAction : undefined;\n\n\tif (!primary && secondary.length === 0) return null;\n\n\t// Inline commands reappear in the menu only below `sm`, where they collapse.\n\tconst menuActions: ActionMenuAction[] = [\n\t\t...inline.map((entry) => toMenuAction(entry, 'sm:hidden')),\n\t\t...overflow.map((entry) => toMenuAction(entry)),\n\t\t...destructive.map((entry) => ({ ...toMenuAction(entry), group: true as const })),\n\t];\n\tconst menuOnlyBelowSm = overflow.length === 0 && destructive.length === 0;\n\tconst renderMenuLink = (props: ActionMenuLinkRenderProps) =>\n\t\trenderLink({ ...props, children: props.children ?? null }) as ReactElement;\n\n\t// Secondary commands lead, the primary command follows them, and the More\n\t// actions menu closes the row. The trigger is one more secondary command:\n\t// outline, at the commands' own height.\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"page-header-commands\"\n\t\t\tclassName=\"page-header--commands flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm\"\n\t\t>\n\t\t\t{inline.map((entry) => (\n\t\t\t\t<CommandButton\n\t\t\t\t\tkey={entry.key}\n\t\t\t\t\taction={entry.action}\n\t\t\t\t\trole=\"secondary\"\n\t\t\t\t\trenderLink={renderLink}\n\t\t\t\t\tclassName=\"max-sm:hidden\"\n\t\t\t\t/>\n\t\t\t))}\n\t\t\t{primary && <CommandButton action={primary} role=\"primary\" renderLink={renderLink} />}\n\t\t\t{menuActions.length > 0 && (\n\t\t\t\t<ActionMenu\n\t\t\t\t\tactions={menuActions}\n\t\t\t\t\tcontext=\"commands\"\n\t\t\t\t\tsrText={moreActionsLabel}\n\t\t\t\t\talign=\"end\"\n\t\t\t\t\tcloseOnSelect\n\t\t\t\t\tpreserveOrder\n\t\t\t\t\tcontentClassName={MENU_CONTENT_CLASS}\n\t\t\t\t\trenderLink={renderMenuLink}\n\t\t\t\t\t// The shared outline overflow square follows the provider scale, like the commands.\n\t\t\t\t\tbuttonProps={{ className: cn('page-header--more-actions', menuOnlyBelowSm && 'sm:hidden') }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAwEA,IAAaO,KAAyD,EAAE,SAAM,aAAU,WAAQ,QAAK,aAAU,GAAGC,QACjH,kBAAC,KAAD;CACO;CACN,QAAQC,MAAWC,IAAW,WAAW,KAAA;CACzC,KAAKC,MAAQD,IAAW,wBAAwB,KAAA;CAChD,GAAIF;CAEH;AACC,CAAA,GAMEI,IAAqB;AAiB3B,SAASC,EAAU,GAAkE;CACpF,OAAO,CAAC,CAACC,KAAUA,EAAO,YAAY;AACvC;AAGA,SAAgBC,EACf,GACA,GACC;CACD,OAAOF,EAAUG,CAAa,MAAMC,KAAoB,CAAC,EAAA,C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