themelia-react-ui 2.0.1 → 2.0.2

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 (480) hide show
  1. package/CHANGELOG.md +307 -131
  2. package/README.md +28 -8
  3. package/THIRD_PARTY_NOTICES.md +13 -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-ax2BqjrI.js} +58 -54
  17. package/dist/auth-ax2BqjrI.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-C0EQW6dr.js +875 -0
  111. package/dist/combobox-C0EQW6dr.js.map +1 -0
  112. package/dist/combobox-xCQ2RMNE.js +309 -0
  113. package/dist/combobox-xCQ2RMNE.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-BYYlTA8E.js} +114 -105
  117. package/dist/comments-BYYlTA8E.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.strings.d.ts +7 -0
  125. package/dist/components/base/combobox/index.d.ts +30 -4
  126. package/dist/components/base/forms/form-sizing.d.ts +11 -3
  127. package/dist/components/base/navigation/pagination.d.ts +5 -2
  128. package/dist/components/base/popover/popover.recipes.d.ts +15 -1
  129. package/dist/components/base/table/index.d.ts +9 -2
  130. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  131. package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
  132. package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
  133. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +3 -1
  134. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
  135. package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
  136. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
  137. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
  138. package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
  139. package/dist/components/features/appointment-calendar/index.d.ts +3 -0
  140. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
  141. package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
  142. package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
  143. package/dist/components/features/combobox/types.d.ts +4 -0
  144. package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
  145. package/dist/components/features/rich-text-editor/index.d.ts +1 -1
  146. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +6 -0
  147. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +9 -1
  148. package/dist/components/features/table/table-header.d.ts +1 -1
  149. package/dist/components/features/table/table.strings.d.ts +55 -1
  150. package/dist/components/features/table/table.types.d.ts +17 -4
  151. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
  152. package/dist/components/primitives/number.d.ts +4 -2
  153. package/dist/components/primitives/value.d.ts +3 -1
  154. package/dist/components/typography/text-link.d.ts +4 -0
  155. package/dist/components/ui/combobox.d.ts +6 -2
  156. package/dist/components/ui/item.d.ts +8 -8
  157. package/dist/components/ui/tabs.d.ts +1 -1
  158. package/dist/{containers-DmWiJa2I.js → containers-Mu1LMGV1.js} +2 -2
  159. package/dist/{containers-DmWiJa2I.js.map → containers-Mu1LMGV1.js.map} +1 -1
  160. package/dist/{copyable-B3Gwgdqc.js → copyable-ClBuk_UK.js} +4 -4
  161. package/dist/{copyable-B3Gwgdqc.js.map → copyable-ClBuk_UK.js.map} +1 -1
  162. package/dist/{data-display-DafIvCl5.js → data-display-DT_khPl_.js} +98 -87
  163. package/dist/data-display-DT_khPl_.js.map +1 -0
  164. package/dist/{date-BgK3bTdo.js → date-DCrsDTZc.js} +5 -5
  165. package/dist/{date-BgK3bTdo.js.map → date-DCrsDTZc.js.map} +1 -1
  166. package/dist/{date-picker-CF-DtUpF.js → date-picker-ay0Pha_a.js} +594 -593
  167. package/dist/date-picker-ay0Pha_a.js.map +1 -0
  168. package/dist/date-pickers-Ccw8DL2b.js +175 -0
  169. package/dist/date-pickers-Ccw8DL2b.js.map +1 -0
  170. package/dist/{display-DsQTVzMz.js → display-hAc1HjpI.js} +49 -49
  171. package/dist/display-hAc1HjpI.js.map +1 -0
  172. package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
  173. package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
  174. package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
  175. package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
  176. package/dist/features/activities.js +398 -375
  177. package/dist/features/activities.js.map +1 -1
  178. package/dist/features/ai-chat.js +188 -179
  179. package/dist/features/ai-chat.js.map +1 -1
  180. package/dist/features/appointment-calendar.js +683 -0
  181. package/dist/features/appointment-calendar.js.map +1 -0
  182. package/dist/features/async-preview.js +109 -107
  183. package/dist/features/async-preview.js.map +1 -1
  184. package/dist/features/combobox.js +1 -1
  185. package/dist/features/comments.js +1 -1
  186. package/dist/features/data-view.js +137 -137
  187. package/dist/features/data-view.js.map +1 -1
  188. package/dist/features/email-composer.js +255 -255
  189. package/dist/features/email-composer.js.map +1 -1
  190. package/dist/features/event-calendar.js +254 -248
  191. package/dist/features/event-calendar.js.map +1 -1
  192. package/dist/features/filters.js +1 -1
  193. package/dist/features/global-search.js +35 -32
  194. package/dist/features/global-search.js.map +1 -1
  195. package/dist/features/kanban.js +118 -117
  196. package/dist/features/kanban.js.map +1 -1
  197. package/dist/features/map.js +233 -231
  198. package/dist/features/map.js.map +1 -1
  199. package/dist/features/media-library.js +789 -775
  200. package/dist/features/media-library.js.map +1 -1
  201. package/dist/features/mentions.js +1 -1
  202. package/dist/features/overlays.js +1 -1
  203. package/dist/features/products.js +922 -902
  204. package/dist/features/products.js.map +1 -1
  205. package/dist/features/questionnaire.js +28 -24
  206. package/dist/features/questionnaire.js.map +1 -1
  207. package/dist/features/resource-assignment.js +18 -15
  208. package/dist/features/resource-assignment.js.map +1 -1
  209. package/dist/features/resource.js +12 -12
  210. package/dist/features/resource.js.map +1 -1
  211. package/dist/features/rich-text-editor.js +2 -2
  212. package/dist/features/schema-form.js +15 -13
  213. package/dist/features/schema-form.js.map +1 -1
  214. package/dist/features/suggestions.js +3 -3
  215. package/dist/features/sync.js +11 -5
  216. package/dist/features/sync.js.map +1 -1
  217. package/dist/features/table.js +1 -1
  218. package/dist/features/theme-tweaker.js +493 -489
  219. package/dist/features/theme-tweaker.js.map +1 -1
  220. package/dist/feedback-BYIhtitP.js +239 -0
  221. package/dist/feedback-BYIhtitP.js.map +1 -0
  222. package/dist/{field-affordance-recipes-qQeIf4lG.js → field-affordance-recipes-DZhnIL_Y.js} +11 -18
  223. package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
  224. package/dist/{filters-BkHH53uv.js → filters-BGfvjP4d.js} +589 -580
  225. package/dist/filters-BGfvjP4d.js.map +1 -0
  226. package/dist/{form-field-DUt4UxSV.js → form-field-CwH9y77i.js} +6 -5
  227. package/dist/form-field-CwH9y77i.js.map +1 -0
  228. package/dist/{form-sizing-By94KzXE.js → form-sizing-BdP_Mf5p.js} +39 -44
  229. package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
  230. package/dist/{forms-Bzha-Y3B.js → forms-B9G_xwzi.js} +8 -8
  231. package/dist/{forms-Bzha-Y3B.js.map → forms-B9G_xwzi.js.map} +1 -1
  232. package/dist/{forms-numeric-C0bvjRPZ.js → forms-numeric-B_jraJaQ.js} +309 -309
  233. package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
  234. package/dist/{header-BOefOKd1.js → header-CGXuhcRm.js} +160 -153
  235. package/dist/header-CGXuhcRm.js.map +1 -0
  236. package/dist/{hooks-9k_TtmKh.js → hooks-Dkz0K2WT.js} +2 -2
  237. package/dist/{hooks-9k_TtmKh.js.map → hooks-Dkz0K2WT.js.map} +1 -1
  238. package/dist/{icon-badge-CAuKupo9.js → icon-badge-DYKIwvOV.js} +4 -4
  239. package/dist/{icon-badge-CAuKupo9.js.map → icon-badge-DYKIwvOV.js.map} +1 -1
  240. package/dist/index.js +3 -3
  241. package/dist/input-CZw8iU99.js +21 -0
  242. package/dist/input-CZw8iU99.js.map +1 -0
  243. package/dist/input-DQdEd0YD.js +263 -0
  244. package/dist/input-DQdEd0YD.js.map +1 -0
  245. package/dist/{interaction-recipes-CHr0dJUs.js → interaction-recipes-XR9ZpVYL.js} +2 -1
  246. package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
  247. package/dist/item-K5_ghvze.js +275 -0
  248. package/dist/item-K5_ghvze.js.map +1 -0
  249. package/dist/layout/app-shell.js +1 -1
  250. package/dist/layout/auth.js +1 -1
  251. package/dist/layout/containers.js +1 -1
  252. package/dist/layout/header.js +1 -1
  253. package/dist/layout/hooks.js +1 -1
  254. package/dist/layout/navigation.js +1 -1
  255. package/dist/layout/page.js +1 -1
  256. package/dist/layout/settings.js +1 -1
  257. package/dist/layout/sidebar.js +2 -2
  258. package/dist/layout/workspace.js +1 -1
  259. package/dist/layout.js +10 -10
  260. package/dist/lib/affordance-geometry.generated.d.ts +71 -0
  261. package/dist/lib/editable-text-recipe.d.ts +4 -4
  262. package/dist/lib/field-affordance-recipes.d.ts +2 -2
  263. package/dist/lib/interaction-recipes.d.ts +5 -0
  264. package/dist/lib/theme-mode-css.d.ts +7 -0
  265. package/dist/lib/tone-recipes.d.ts +8 -0
  266. package/dist/lib/ui-provider/types.d.ts +2 -2
  267. package/dist/lib/utils.js +1 -1
  268. package/dist/{media-gallery-DcTtAaeC.js → media-gallery-3zIVLMWH.js} +8 -8
  269. package/dist/media-gallery-3zIVLMWH.js.map +1 -0
  270. package/dist/{mentions-D-uyCh01.js → mentions-utuUvH1K.js} +144 -142
  271. package/dist/mentions-utuUvH1K.js.map +1 -0
  272. package/dist/{message-CdHgIWKf.js → message-DZ_ruyUV.js} +6 -5
  273. package/dist/message-DZ_ruyUV.js.map +1 -0
  274. package/dist/{metadata-list-X5rYAKSB.js → metadata-list-8N16ZMW_.js} +130 -119
  275. package/dist/metadata-list-8N16ZMW_.js.map +1 -0
  276. package/dist/{navigation-D3KwXmaq.js → navigation-Bnotn4AQ.js} +19 -19
  277. package/dist/navigation-Bnotn4AQ.js.map +1 -0
  278. package/dist/{navigation-HJf5zxlH.js → navigation-BzhHI3lo.js} +36 -35
  279. package/dist/navigation-BzhHI3lo.js.map +1 -0
  280. package/dist/{navigation-row-recipes-BVowojQw.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
  281. package/dist/{navigation-row-recipes-BVowojQw.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
  282. package/dist/{number-DMhe-Vsk.js → number-DbV1Dija.js} +36 -34
  283. package/dist/{number-DMhe-Vsk.js.map → number-DbV1Dija.js.map} +1 -1
  284. package/dist/{overflow-tab-bar-sQHXLlwQ.js → overflow-tab-bar-CWY7Nogn.js} +105 -103
  285. package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
  286. package/dist/{overlays-I0axtYA6.js → overlays-DNWmZrJ4.js} +14 -12
  287. package/dist/overlays-DNWmZrJ4.js.map +1 -0
  288. package/dist/{page-B5dTH9gE.js → page-Bgl1F560.js} +8 -8
  289. package/dist/{page-B5dTH9gE.js.map → page-Bgl1F560.js.map} +1 -1
  290. package/dist/{page-header-commands-DjzFEq3E.js → page-header-commands-DOb6WsfD.js} +5 -5
  291. package/dist/{page-header-commands-DjzFEq3E.js.map → page-header-commands-DOb6WsfD.js.map} +1 -1
  292. package/dist/pagination-BL25hu2s.js +158 -0
  293. package/dist/pagination-BL25hu2s.js.map +1 -0
  294. package/dist/{popover-Di55PyAI.js → popover-7_m66eYW.js} +8 -7
  295. package/dist/{popover-Di55PyAI.js.map → popover-7_m66eYW.js.map} +1 -1
  296. package/dist/popover-menu-B9WWygpa.js +100 -0
  297. package/dist/popover-menu-B9WWygpa.js.map +1 -0
  298. package/dist/{popover.recipes-Bdyhj2db.js → popover.recipes-D3j8R8Yp.js} +17 -10
  299. package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
  300. package/dist/{primitives-B-CkiEMU.js → primitives-BFK08r9M.js} +45 -44
  301. package/dist/primitives-BFK08r9M.js.map +1 -0
  302. package/dist/primitives.js +4 -4
  303. package/dist/{progress-rnS8-uAW.js → progress-B1VnCT0K.js} +5 -5
  304. package/dist/{progress-rnS8-uAW.js.map → progress-B1VnCT0K.js.map} +1 -1
  305. package/dist/{receipt-D0oswZ0p.js → receipt-BVSOH3Xo.js} +9 -6
  306. package/dist/{receipt-D0oswZ0p.js.map → receipt-BVSOH3Xo.js.map} +1 -1
  307. package/dist/{rich-text-DvGulsNJ.js → rich-text-GOUyKQ-s.js} +3 -3
  308. package/dist/{rich-text-DvGulsNJ.js.map → rich-text-GOUyKQ-s.js.map} +1 -1
  309. package/dist/{rich-text-editor-sMU_Scqm.js → rich-text-editor-cRLC-eBK.js} +418 -426
  310. package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
  311. package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
  312. package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
  313. package/dist/{scroll-area-Bt_vXY2b.js → scroll-area-DcI-M1UT.js} +2 -2
  314. package/dist/{scroll-area-Bt_vXY2b.js.map → scroll-area-DcI-M1UT.js.map} +1 -1
  315. package/dist/{separator-C8DlRGwF.js → separator-BDV-Y648.js} +3 -3
  316. package/dist/{separator-C8DlRGwF.js.map → separator-BDV-Y648.js.map} +1 -1
  317. package/dist/{separator-CYHnjsAb.js → separator-Bom7NsGO.js} +2 -2
  318. package/dist/{separator-CYHnjsAb.js.map → separator-Bom7NsGO.js.map} +1 -1
  319. package/dist/services/actions.js +1 -1
  320. package/dist/{settings-CQW3b-Cu.js → settings-ybnjVwbd.js} +20 -19
  321. package/dist/settings-ybnjVwbd.js.map +1 -0
  322. package/dist/{sheet-4SEvVYzA.js → sheet-CGpB3omz.js} +8 -7
  323. package/dist/{sheet-4SEvVYzA.js.map → sheet-CGpB3omz.js.map} +1 -1
  324. package/dist/{sidebar-d7Dg80ln.js → sidebar-A0ElHINE.js} +14 -13
  325. package/dist/{sidebar-d7Dg80ln.js.map → sidebar-A0ElHINE.js.map} +1 -1
  326. package/dist/{sidebar-C7WWR29L.js → sidebar-CPx_7YBa.js} +183 -182
  327. package/dist/sidebar-CPx_7YBa.js.map +1 -0
  328. package/dist/{skeleton-Cz890JZF.js → skeleton-Byjnt7qr.js} +3 -3
  329. package/dist/{skeleton-Cz890JZF.js.map → skeleton-Byjnt7qr.js.map} +1 -1
  330. package/dist/smart-card-DiC5aac3.js +604 -0
  331. package/dist/smart-card-DiC5aac3.js.map +1 -0
  332. package/dist/{structure-DC2dygdA.js → structure-BmisBK-3.js} +2 -2
  333. package/dist/{structure-DC2dygdA.js.map → structure-BmisBK-3.js.map} +1 -1
  334. package/dist/style.css +1 -1
  335. package/dist/table-BweFy_P9.js +1530 -0
  336. package/dist/table-BweFy_P9.js.map +1 -0
  337. package/dist/{table-CIKyLUsy.js → table-DsfzoUia.js} +75 -63
  338. package/dist/table-DsfzoUia.js.map +1 -0
  339. package/dist/{tabs-DwBJfjxX.js → tabs-CDocW5D1.js} +14 -13
  340. package/dist/tabs-CDocW5D1.js.map +1 -0
  341. package/dist/text-inputs-f9Ia-aCi.js +353 -0
  342. package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
  343. package/dist/theme-mode-css-BB-_RYab.js +14 -0
  344. package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
  345. package/dist/theme-scope-BJ6eE2xt.js +50 -0
  346. package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
  347. package/dist/theme.css +285 -228
  348. package/dist/themes/green.css +16 -12
  349. package/dist/timelines-CwM_9IhD.js +457 -0
  350. package/dist/timelines-CwM_9IhD.js.map +1 -0
  351. package/dist/{tone-recipes-CPoExcTE.js → tone-recipes-BPsRAvhu.js} +5 -2
  352. package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
  353. package/dist/{tooltip-CsfgrfS7.js → tooltip-yiRJUFjp.js} +4 -4
  354. package/dist/{tooltip-CsfgrfS7.js.map → tooltip-yiRJUFjp.js.map} +1 -1
  355. package/dist/{tree-BiKhg8AY.js → tree-WnKQzwbq.js} +9 -9
  356. package/dist/{tree-BiKhg8AY.js.map → tree-WnKQzwbq.js.map} +1 -1
  357. package/dist/typography/rich-text.js +1 -1
  358. package/dist/{typography-DTRkE9zL.js → typography-UTnveOEy.js} +6 -6
  359. package/dist/typography-UTnveOEy.js.map +1 -0
  360. package/dist/typography.js +2 -2
  361. package/dist/{ui-provider-1D_NSYzO.js → ui-provider-C_U0Xma4.js} +3 -3
  362. package/dist/ui-provider-C_U0Xma4.js.map +1 -0
  363. package/dist/ui-provider.js +2 -2
  364. package/dist/{upload-BO8-CLN6.js → upload-CXyxmQBP.js} +13 -12
  365. package/dist/upload-CXyxmQBP.js.map +1 -0
  366. package/dist/{upload-queue-EOC8g1gf.js → upload-queue-Boscubn9.js} +11 -9
  367. package/dist/upload-queue-Boscubn9.js.map +1 -0
  368. package/dist/{usage-card-obRaBskq.js → usage-card-BhO5eqkX.js} +53 -37
  369. package/dist/usage-card-BhO5eqkX.js.map +1 -0
  370. package/dist/{utils-l5LpDw2z.js → utils-BRhFDwuU.js} +59 -44
  371. package/dist/utils-BRhFDwuU.js.map +1 -0
  372. package/dist/{value-inputs-TAYMX111.js → value-inputs-DXPDjvBU.js} +268 -252
  373. package/dist/value-inputs-DXPDjvBU.js.map +1 -0
  374. package/dist/{value-typography-b8wpz1eX.js → value-typography-BP8OG6h5.js} +2 -2
  375. package/dist/{value-typography-b8wpz1eX.js.map → value-typography-BP8OG6h5.js.map} +1 -1
  376. package/dist/{workspace-DH0v0KcB.js → workspace-Cdrg7k9f.js} +34 -33
  377. package/dist/workspace-Cdrg7k9f.js.map +1 -0
  378. package/docs/consumer-skill/SKILL.md +2 -2
  379. package/docs/consumer-skill/references/agents-md.md +1 -1
  380. package/docs/consumer-skill/references/composition.md +8 -6
  381. package/docs/consumer-skill/references/integration.md +4 -3
  382. package/docs/consumer-skill/references/public-api.json +105 -2
  383. package/docs/consumer-skill/references/review.md +7 -0
  384. package/docs/consumer-skill/references/theming.md +71 -6
  385. package/docs/consumer-skill/references/tokens.json +1 -1
  386. package/docs/consumer-skill/references/workflows.md +25 -0
  387. package/docs/consumer-skill/scripts/composition-policy.mjs +3 -2
  388. package/docs/consumer-skill/scripts/surface-policy.mjs +11 -0
  389. package/package.json +8 -4
  390. package/dist/accordion-B6a3vVgA.js.map +0 -1
  391. package/dist/action-menu-TzCoSlwL.js +0 -280
  392. package/dist/action-menu-TzCoSlwL.js.map +0 -1
  393. package/dist/affordance-geometry.generated-B5iu-Mkr.js +0 -69
  394. package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +0 -1
  395. package/dist/ai-artifact-BMJdv-6q.js +0 -1115
  396. package/dist/ai-artifact-BMJdv-6q.js.map +0 -1
  397. package/dist/attachment-BtfhGm8i.js +0 -245
  398. package/dist/attachment-BtfhGm8i.js.map +0 -1
  399. package/dist/auth-CYxKfo69.js.map +0 -1
  400. package/dist/avatar-BBnEJIx8.js.map +0 -1
  401. package/dist/badge-MrKVNzW9.js.map +0 -1
  402. package/dist/batch-action-bar-BZGDG-Si.js.map +0 -1
  403. package/dist/breadcrumbs-D5t7I023.js.map +0 -1
  404. package/dist/buttons-SbIcm1HJ.js.map +0 -1
  405. package/dist/cards-CiiHpKYd.js +0 -66
  406. package/dist/cards-CiiHpKYd.js.map +0 -1
  407. package/dist/chart-QfrARkXl.js.map +0 -1
  408. package/dist/choice-inputs-t6w3ATNz.js.map +0 -1
  409. package/dist/code-block-Dgbu-CU3.js.map +0 -1
  410. package/dist/combobox-2Ic8N9bL.js +0 -278
  411. package/dist/combobox-2Ic8N9bL.js.map +0 -1
  412. package/dist/combobox-DLl0bfiq.js +0 -867
  413. package/dist/combobox-DLl0bfiq.js.map +0 -1
  414. package/dist/comments-BpDuCUUu.js.map +0 -1
  415. package/dist/data-display-DafIvCl5.js.map +0 -1
  416. package/dist/date-picker-CF-DtUpF.js.map +0 -1
  417. package/dist/date-pickers-BmzxJl5l.js +0 -174
  418. package/dist/date-pickers-BmzxJl5l.js.map +0 -1
  419. package/dist/display-DsQTVzMz.js.map +0 -1
  420. package/dist/dropdown-menu-E2qmdC7o.js +0 -193
  421. package/dist/dropdown-menu-E2qmdC7o.js.map +0 -1
  422. package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
  423. package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
  424. package/dist/feedback-qNuMBtRH.js +0 -233
  425. package/dist/feedback-qNuMBtRH.js.map +0 -1
  426. package/dist/field-affordance-recipes-qQeIf4lG.js.map +0 -1
  427. package/dist/filters-BkHH53uv.js.map +0 -1
  428. package/dist/form-field-DUt4UxSV.js.map +0 -1
  429. package/dist/form-sizing-By94KzXE.js.map +0 -1
  430. package/dist/forms-numeric-C0bvjRPZ.js.map +0 -1
  431. package/dist/header-BOefOKd1.js.map +0 -1
  432. package/dist/input-DWhBBBww.js +0 -262
  433. package/dist/input-DWhBBBww.js.map +0 -1
  434. package/dist/input-Ddi_LSYv.js +0 -20
  435. package/dist/input-Ddi_LSYv.js.map +0 -1
  436. package/dist/interaction-recipes-CHr0dJUs.js.map +0 -1
  437. package/dist/item-DEmDiTlD.js +0 -265
  438. package/dist/item-DEmDiTlD.js.map +0 -1
  439. package/dist/media-gallery-DcTtAaeC.js.map +0 -1
  440. package/dist/mentions-D-uyCh01.js.map +0 -1
  441. package/dist/message-CdHgIWKf.js.map +0 -1
  442. package/dist/metadata-list-X5rYAKSB.js.map +0 -1
  443. package/dist/navigation-D3KwXmaq.js.map +0 -1
  444. package/dist/navigation-HJf5zxlH.js.map +0 -1
  445. package/dist/overflow-tab-bar-sQHXLlwQ.js.map +0 -1
  446. package/dist/overlays-I0axtYA6.js.map +0 -1
  447. package/dist/pagination-3bPA_a6K.js +0 -149
  448. package/dist/pagination-3bPA_a6K.js.map +0 -1
  449. package/dist/popover-menu-B71Tn2Qz.js +0 -99
  450. package/dist/popover-menu-B71Tn2Qz.js.map +0 -1
  451. package/dist/popover.recipes-Bdyhj2db.js.map +0 -1
  452. package/dist/primitives-B-CkiEMU.js.map +0 -1
  453. package/dist/rich-text-editor-sMU_Scqm.js.map +0 -1
  454. package/dist/rich-text-editor.recipes-CadiF_Uu.js +0 -88
  455. package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +0 -1
  456. package/dist/settings-CQW3b-Cu.js.map +0 -1
  457. package/dist/sidebar-C7WWR29L.js.map +0 -1
  458. package/dist/smart-card-lFKxn5Hu.js +0 -595
  459. package/dist/smart-card-lFKxn5Hu.js.map +0 -1
  460. package/dist/spinner-fa3h1Aif.js +0 -80
  461. package/dist/spinner-fa3h1Aif.js.map +0 -1
  462. package/dist/table-CIKyLUsy.js.map +0 -1
  463. package/dist/table-CrcLN9Io.js +0 -1458
  464. package/dist/table-CrcLN9Io.js.map +0 -1
  465. package/dist/tabs-DwBJfjxX.js.map +0 -1
  466. package/dist/text-inputs-aaK9wcDT.js +0 -326
  467. package/dist/text-inputs-aaK9wcDT.js.map +0 -1
  468. package/dist/theme-scope-kStaAer0.js +0 -39
  469. package/dist/theme-scope-kStaAer0.js.map +0 -1
  470. package/dist/timelines-C_SBwHNP.js +0 -442
  471. package/dist/timelines-C_SBwHNP.js.map +0 -1
  472. package/dist/tone-recipes-CPoExcTE.js.map +0 -1
  473. package/dist/typography-DTRkE9zL.js.map +0 -1
  474. package/dist/ui-provider-1D_NSYzO.js.map +0 -1
  475. package/dist/upload-BO8-CLN6.js.map +0 -1
  476. package/dist/upload-queue-EOC8g1gf.js.map +0 -1
  477. package/dist/usage-card-obRaBskq.js.map +0 -1
  478. package/dist/utils-l5LpDw2z.js.map +0 -1
  479. package/dist/value-inputs-TAYMX111.js.map +0 -1
  480. package/dist/workspace-DH0v0KcB.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"overflow-tab-bar-sQHXLlwQ.js","names":["isSimpleText","_Fragment","_Fragment","DisplayLabel","Heading","Text","focusRecipes","Stack","ActionMenu","interactionRecipes","Badge","Separator","hasPageHeaderCommands","PageHeaderCommands","Fragment$1","isSimpleText$1","value","PageHeading","resolvedBadges","badges","badge","hasCommands","primaryAction","secondaryActions","actionsRegion","actions","cn","className","breadcrumbs","leading","contentClassName","eyebrow","eyebrowClassName","beforeTitle","titlePrefix","titleRowClassName","textGap","title","headingTag","titleClassName","item","index","titleSuffix","description","afterDescription","descriptionClassName","actionsClassName","children","withSeparator","defaultOverflowTabBarStrings","TAB_BUTTON_BASE","TAB_INACTIVE","TAB_ACTIVE","isSimpleText","fitOverflowTabs","widths","sum","width","gap","available","used","count","next","moreWidth","OverflowTabBar","forwardRef","stringsProp","rootProps","strings","useStrings","rootRef","useRef","trackRef","measureRef","visibleCount","setVisibleCount","useState","items","setRootRef","useCallback","node","ref","root","track","measure","compute","trackStyle","inset","tab","observer","orderedItems","useMemo","activeIdx","i","lastVisibleIdx","visibleItems","overflowItems","handleSelect","onValueChange","handleKeyDown","event","tabs","forward","renderTab","Icon","tabClasses","isActive","activeTabClassName","tabClassName","inner","options","shared","moreContent","MoreHorizontal"],"sources":["../src/components/base/navigation/page-header/page-header.tsx","../src/components/base/navigation/overflow-tab-bar.tsx"],"sourcesContent":["/**\n * PageHeading — reusable visual heading block for sections and resources.\n * Higher-level layout components add routing/back behavior around this base\n * visual primitive instead of reimplementing title, description, badge, and\n * action spacing. `primaryAction` and `secondaryActions` describe commands by\n * role; the heading owns their treatment and placement for every header built\n * on it.\n */\nimport type { Key, ReactNode } from 'react';\nimport { DisplayLabel, Heading, Text, type HeadingTag } from '../../../typography';\nimport { Badge, type BadgeTone } from '../../badge';\nimport { Separator } from '../../display/separator';\nimport { Stack, type TextGap } from '../../structure';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\thasPageHeaderCommands,\n\tPageHeaderCommands,\n\ttype PageHeaderAction,\n\ttype PageHeaderLinkRenderer,\n} from './page-header-commands';\n\nexport interface PageHeadingBadge {\n\tlabel: ReactNode;\n\ttone?: BadgeTone;\n\tkey?: Key;\n}\n\n/**\n * Slot map, top to bottom and outside in:\n *\n * ```text\n * breadcrumbs\n * leading │ eyebrow\n * │ beforeTitle\n * │ titlePrefix │ title badges titleSuffix │ actions\n * │ │ description\n * │ │ afterDescription\n * children\n * ─────────────────────────────────────────── (withSeparator)\n * ```\n */\nexport interface PageHeadingProps {\n\t/** Small label above the title. Plain text is rendered as a `DisplayLabel`. */\n\teyebrow?: ReactNode;\n\t/** The page title. Plain text is rendered as a `Heading`; pass an element to own the markup. */\n\ttitle: ReactNode;\n\t/** Supporting sentence under the title, capped at `max-w-2xl` and aligned to the title's left edge. */\n\tdescription?: ReactNode;\n\t/** Title/description rhythm. Defaults to normal. */\n\ttextGap?: TextGap;\n\t/** Heading level for a plain-text `title`. Default: `'h2'`. Set for correct document outline. */\n\theadingTag?: HeadingTag;\n\t/** Convenience for a single badge beside the title. Ignored when `badges` is set. */\n\tbadge?: PageHeadingBadge;\n\t/** Badges beside the title, in order. Takes precedence over `badge`. */\n\tbadges?: PageHeadingBadge[];\n\t/** Breadcrumb trail rendered above the header block. */\n\tbreadcrumbs?: ReactNode;\n\t/** Content to the left of the entire header column — an avatar or back button. Top-aligned. */\n\tleading?: ReactNode;\n\t/** Free slot between the eyebrow and the title row, for a banner or status strip. */\n\tbeforeTitle?: ReactNode;\n\t/**\n\t * Content immediately left of the title, vertically centred on the title\n\t * line alone. Unlike `leading`, the description aligns to the title's left\n\t * edge rather than to this slot, so an icon here never shifts the copy.\n\t */\n\ttitlePrefix?: ReactNode;\n\t/** Content after the title and badges, on the same line. */\n\ttitleSuffix?: ReactNode;\n\t/** Content directly beneath the description, sharing its alignment — a metadata line. */\n\tafterDescription?: ReactNode;\n\t/**\n\t * Independent actions column beside the copy; follows it on narrow widths.\n\t * Holds non-command controls such as a period select; they render before\n\t * the role-based commands.\n\t */\n\tactions?: ReactNode;\n\t/**\n\t * The header'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. Default: `'More actions'`. */\n\tmoreActionsLabel?: string;\n\t/** Renders `href` commands as framework links. Defaults to a native anchor. */\n\trenderLink?: PageHeaderLinkRenderer;\n\t/** Content below the whole header block, above the separator. */\n\tchildren?: ReactNode;\n\t/** Merged onto the `<header>` root. */\n\tclassName?: string;\n\t/** Merged onto the column holding eyebrow, title, and description. */\n\tcontentClassName?: string;\n\t/** Merged onto the eyebrow. Only applies when `eyebrow` is plain text. */\n\teyebrowClassName?: string;\n\t/** Merged onto the title. Only applies when `title` is plain text. */\n\ttitleClassName?: string;\n\t/**\n\t * Merged onto the title row's grid. A `gap-space-md` here sets the\n\t * `titlePrefix`-to-title rhythm without also opening the gap under the title.\n\t */\n\ttitleRowClassName?: string;\n\t/** Merged onto the description. Only applies when `description` is plain text. */\n\tdescriptionClassName?: string;\n\t/** Merged onto the actions cluster. */\n\tactionsClassName?: string;\n\t/**\n\t * Draws a rule beneath the header. Default: `false` — the page rhythm (gap\n\t * between header and body) separates them; opt in where a rule is the design.\n\t */\n\twithSeparator?: boolean;\n}\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\nexport function PageHeading({\n\teyebrow,\n\ttitle,\n\tdescription,\n\ttextGap = 'normal',\n\theadingTag = 'h2',\n\tbadge,\n\tbadges,\n\tbreadcrumbs,\n\tleading,\n\tbeforeTitle,\n\ttitlePrefix,\n\ttitleSuffix,\n\tafterDescription,\n\tactions,\n\tprimaryAction,\n\tsecondaryActions,\n\tmoreActionsLabel = 'More actions',\n\trenderLink,\n\tchildren,\n\tclassName,\n\tcontentClassName,\n\teyebrowClassName,\n\ttitleClassName,\n\ttitleRowClassName,\n\tdescriptionClassName,\n\tactionsClassName,\n\twithSeparator = false,\n}: PageHeadingProps) {\n\tconst resolvedBadges = badges ?? (badge ? [badge] : []);\n\t// Custom `actions` content leads; role-based commands close the region.\n\tconst hasCommands = hasPageHeaderCommands(primaryAction, secondaryActions);\n\tconst actionsRegion = hasCommands ? (\n\t\t<>\n\t\t\t{actions}\n\t\t\t<PageHeaderCommands\n\t\t\t\tprimaryAction={primaryAction}\n\t\t\t\tsecondaryActions={secondaryActions}\n\t\t\t\tmoreActionsLabel={moreActionsLabel}\n\t\t\t\trenderLink={renderLink}\n\t\t\t/>\n\t\t</>\n\t) : actions;\n\n\treturn (\n\t\t<header className={cn('page-heading--component page-header--component', 'w-full', className)}>\n\t\t\t{!!breadcrumbs && <div className=\"mb-space-lg\">{breadcrumbs}</div>}\n\n\t\t\t<Stack direction=\"horizontal\" gap=\"lg\" align=\"start\" wrap={false}>\n\t\t\t\t{leading}\n\t\t\t\t<Stack gap=\"dense\" className={cn('page-header--content-row flex-1', contentClassName)}>\n\t\t\t\t\t{!!eyebrow && (isSimpleText(eyebrow) ? (\n\t\t\t\t\t\t<DisplayLabel tag=\"div\" className={eyebrowClassName}>\n\t\t\t\t\t\t\t{eyebrow}\n\t\t\t\t\t\t</DisplayLabel>\n\t\t\t\t\t) : eyebrow)}\n\t\t\t\t\t{beforeTitle}\n\t\t\t\t\t<Stack\n\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\tgap=\"lg\"\n\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\twrap={{ base: false, sm: true }}\n\t\t\t\t\t\tclassName=\"page-header--headline-row min-w-0\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* The copy owns its width independently of actions. The inner\n\t\t\t\t\t\t grid keeps the description aligned after a title prefix. */}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'page-header--copy-column page-header--title-row grid min-w-0 w-full flex-1 basis-full items-center gap-x-space-md sm:w-auto sm:basis-64',\n\t\t\t\t\t\t\t\ttitlePrefix ? 'grid-cols-[auto_minmax(0,1fr)]' : 'grid-cols-[minmax(0,1fr)]',\n\t\t\t\t\t\t\t\ttitleRowClassName,\n\t\t\t\t\t\t\t\ttextGap === 'normal' ? 'gap-y-normal' : 'gap-y-dense',\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{!!titlePrefix && (\n\t\t\t\t\t\t\t\t<span className=\"page-header--title-prefix inline-flex shrink-0 items-center self-center\">\n\t\t\t\t\t\t\t\t\t{titlePrefix}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Stack direction=\"horizontal\" gap=\"md\" align=\"center\" wrap className=\"page-header--title-line min-h-action-sm min-w-0\">\n\t\t\t\t\t\t\t\t{isSimpleText(title) ? (\n\t\t\t\t\t\t\t\t\t<Heading tag={headingTag} className={cn('page-header--title min-w-0 [overflow-wrap:anywhere] border-0 pb-0', titleClassName)}>\n\t\t\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t\t) : title}\n\t\t\t\t\t\t\t\t{resolvedBadges.length > 0 && (\n\t\t\t\t\t\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" wrap className=\"page-header--badges min-w-0 max-w-full\">\n\t\t\t\t\t\t\t\t\t\t{resolvedBadges.map((item, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Badge key={item.key ?? index} tone={item.tone ?? 'secondary'}>\n\t\t\t\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{titleSuffix}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t{(!!description || !!afterDescription) && (\n\t\t\t\t\t\t\t\t<Stack gap=\"dense\" className={cn('page-header--title-block min-w-0', !!titlePrefix && 'col-start-2')}>\n\t\t\t\t\t\t\t\t\t{!!description && (isSimpleText(description) ? (\n\t\t\t\t\t\t\t\t\t\t<Text type=\"secondary\" className={cn('page-header--description max-w-2xl [overflow-wrap:anywhere]', descriptionClassName)}>\n\t\t\t\t\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : description)}\n\t\t\t\t\t\t\t\t\t{afterDescription}\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{!!actionsRegion && (\n\t\t\t\t\t\t\t<Stack\n\t\t\t\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\t\t\t\tgap=\"md\"\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'page-header--actions max-w-full shrink-0',\n\t\t\t\t\t\t\t\t\thasCommands && 'self-end justify-end sm:self-auto',\n\t\t\t\t\t\t\t\t\tactionsClassName,\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{actionsRegion}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t</Stack>\n\t\t\t</Stack>\n\n\t\t\t{!!children && <div className=\"mt-space-xl\">{children}</div>}\n\n\t\t\t{!!withSeparator && <Separator className=\"mt-space-xl\" />}\n\t\t</header>\n\t);\n}\n\nPageHeading.displayName = 'PageHeading';\n","/**\n * OverflowTabBar — horizontal tab strip that gracefully degrades on narrow\n * containers. Tabs that would overflow are moved into a trailing \"More\"\n * dropdown so the strip never wraps. Uses a ResizeObserver to recompute on\n * container resize; the active tab is always kept visible by being moved\n * out of the overflow set when needed.\n *\n * The strip shares the segmented-tab recipe of `NavigationTabs` and `Tabs`:\n * a muted track, small action-height tabs with default-size labels, and a\n * lifted card-coloured active tab. Arrow keys, Home and End move focus between\n * tabs; Enter or Space activates the focused tab.\n *\n * Use `NavigationTabs` instead when a fixed route set cannot overflow.\n */\nimport { MoreHorizontal, type LucideIcon } from 'lucide-react';\nimport {\n\tforwardRef,\n\tuseCallback,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n\ttype ComponentPropsWithoutRef,\n\ttype KeyboardEvent,\n\ttype ReactNode,\n} from 'react';\n\nimport { ActionMenu } from '../action-menu';\nimport { Badge } from '../badge';\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nexport interface OverflowTabBarStrings {\n\tmore: string;\n\tnavigationLabel: string;\n}\n\nexport const defaultOverflowTabBarStrings: OverflowTabBarStrings = {\n\tmore: 'More',\n\tnavigationLabel: 'Tab navigation',\n};\n\nexport interface OverflowTabItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Display label. */\n\tlabel: ReactNode;\n\t/** Destination for the entry, when it navigates. */\n\thref?: string;\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n\t/** Chip rendered beside the label. */\n\tbadge?: ReactNode;\n\tonClick?: () => void;\n}\n\nexport interface OverflowTabBarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {\n\t/** Entries to render, in order. */\n\titems: OverflowTabItem[];\n\t/** Currently active tab id. */\n\tvalue?: string;\n\t/** Fired with the id of the newly active tab. */\n\tonValueChange?: (id: string) => void;\n\ttabClassName?: string;\n\tactiveTabClassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<OverflowTabBarStrings>;\n}\n\n// Native buttons and anchors are reset explicitly: the package ships no preflight.\nconst TAB_BUTTON_BASE =\n\t'box-border inline-flex h-action-sm shrink-0 cursor-pointer items-center gap-space-sm rounded-inner border-0 bg-transparent px-control-sm font-sans text-sm font-medium whitespace-nowrap no-underline outline-none transition-colors ' +\n\t`${focusRecipes.edge} [&_svg]:size-icon [&_svg]:shrink-0`;\nconst TAB_INACTIVE = interactionRecipes.segmentInactive;\nconst TAB_ACTIVE = interactionRecipes.segmentActive;\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/** How many tabs fit, reserving room for the \"More\" trigger only when something overflows. */\nexport function fitOverflowTabs(widths: readonly number[], available: number, gap: number, moreWidth: number): number {\n\tconst total = widths.reduce((sum, width) => sum + width, 0) + gap * Math.max(0, widths.length - 1);\n\tif (total <= available) return widths.length;\n\tlet used = 0;\n\tlet count = 0;\n\tfor (const width of widths) {\n\t\tconst next = used + (count > 0 ? gap : 0) + width;\n\t\tif (next + gap + moreWidth > available) break;\n\t\tused = next;\n\t\tcount += 1;\n\t}\n\treturn Math.max(1, count);\n}\n\nexport const OverflowTabBar = forwardRef<HTMLDivElement, OverflowTabBarProps>(function OverflowTabBar({\n\titems,\n\tvalue,\n\tonValueChange,\n\tclassName,\n\ttabClassName,\n\tactiveTabClassName,\n\tstrings: stringsProp,\n\t...rootProps\n}, ref) {\n\tconst strings = useStrings(defaultOverflowTabBarStrings, stringsProp);\n\tconst rootRef = useRef<HTMLDivElement | null>(null);\n\tconst trackRef = useRef<HTMLDivElement | null>(null);\n\tconst measureRef = useRef<HTMLDivElement | null>(null);\n\tconst [visibleCount, setVisibleCount] = useState(items.length);\n\n\tconst setRootRef = useCallback((node: HTMLDivElement | null) => {\n\t\trootRef.current = node;\n\t\tif (typeof ref === 'function') ref(node);\n\t\telse if (ref) ref.current = node;\n\t}, [ref]);\n\n\t// Recompute how many tabs fit when the available width or the items change.\n\tuseLayoutEffect(() => {\n\t\tconst root = rootRef.current;\n\t\tconst track = trackRef.current;\n\t\tconst measure = measureRef.current;\n\t\tif (!root || !track || !measure) return;\n\n\t\tconst compute = () => {\n\t\t\tconst trackStyle = getComputedStyle(track);\n\t\t\tconst inset = (parseFloat(trackStyle.paddingLeft) || 0) + (parseFloat(trackStyle.paddingRight) || 0);\n\t\t\tconst available = root.clientWidth - inset;\n\t\t\tif (available <= 0) {\n\t\t\t\tsetVisibleCount(items.length);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst gap = parseFloat(getComputedStyle(measure).columnGap) || 0;\n\t\t\tconst widths = Array.from(measure.querySelectorAll<HTMLElement>('[data-tab-id]')).map((tab) => tab.offsetWidth);\n\t\t\tconst moreWidth = measure.querySelector<HTMLElement>('[data-more-measure]')?.offsetWidth ?? 0;\n\t\t\tsetVisibleCount(fitOverflowTabs(widths, available, gap, moreWidth));\n\t\t};\n\n\t\tcompute();\n\t\tif (typeof ResizeObserver === 'undefined') return;\n\t\tconst observer = new ResizeObserver(compute);\n\t\tobserver.observe(root);\n\t\treturn () => observer.disconnect();\n\t}, [items, strings.more]);\n\n\t// Ensure the active tab is always visible; if it falls into the overflow set,\n\t// swap it with the last visible tab.\n\tconst orderedItems = useMemo(() => {\n\t\tif (!value) return items;\n\t\tconst activeIdx = items.findIndex((i) => i.id === value);\n\t\tif (activeIdx < 0 || activeIdx < visibleCount) return items;\n\t\tconst next = [...items];\n\t\tconst lastVisibleIdx = Math.max(0, visibleCount - 1);\n\t\t[next[activeIdx], next[lastVisibleIdx]] = [next[lastVisibleIdx], next[activeIdx]];\n\t\treturn next;\n\t}, [items, value, visibleCount]);\n\n\tconst visibleItems = orderedItems.slice(0, visibleCount);\n\tconst overflowItems = orderedItems.slice(visibleCount);\n\n\tconst handleSelect = (item: OverflowTabItem) => {\n\t\tonValueChange?.(item.id);\n\t\titem.onClick?.();\n\t};\n\n\t// Roving focus: arrows, Home and End move between tabs; activation stays on\n\t// Enter/Space so moving focus never navigates a link tab by itself.\n\tconst handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n\t\tif (!['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) return;\n\t\tconst tabs = Array.from(event.currentTarget.querySelectorAll<HTMLElement>('[role=\"tab\"]'));\n\t\tconst index = tabs.indexOf(event.target as HTMLElement);\n\t\tif (index < 0 || tabs.length === 0) return;\n\t\tconst rtl = getComputedStyle(event.currentTarget).direction === 'rtl';\n\t\tconst forward = rtl ? 'ArrowLeft' : 'ArrowRight';\n\t\tconst next = event.key === 'Home'\n\t\t\t? 0\n\t\t\t: event.key === 'End'\n\t\t\t\t? tabs.length - 1\n\t\t\t\t: event.key === forward\n\t\t\t\t\t? (index + 1) % tabs.length\n\t\t\t\t\t: (index - 1 + tabs.length) % tabs.length;\n\t\tevent.preventDefault();\n\t\ttabs[next]?.focus();\n\t};\n\n\tconst renderTab = (item: OverflowTabItem, isActive: boolean, options?: { measure?: boolean }) => {\n\t\tconst Icon = item.icon;\n\t\tconst tabClasses = cn(\n\t\t\tTAB_BUTTON_BASE,\n\t\t\tisActive ? cn(TAB_ACTIVE, activeTabClassName) : TAB_INACTIVE,\n\t\t\ttabClassName,\n\t\t);\n\t\tconst inner = (\n\t\t\t<>\n\t\t\t\t{!!Icon && <Icon aria-hidden=\"true\" />}\n\t\t\t\t{isSimpleText(item.label) ? (\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t{item.label}\n\t\t\t\t\t</Text>\n\t\t\t\t) : item.label}\n\t\t\t\t{item.badge !== undefined && item.badge !== null && item.badge !== false && (\n\t\t\t\t\t<Badge size=\"sm\" tone=\"secondary\" className=\"overflow-tab-bar--badge\">\n\t\t\t\t\t\t{item.badge}\n\t\t\t\t\t</Badge>\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t\tif (options?.measure) {\n\t\t\treturn (\n\t\t\t\t<span key={item.id} data-tab-id={item.id} className={cn('overflow-tab-bar--measure', tabClasses)}>\n\t\t\t\t\t{inner}\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\t\tconst shared = {\n\t\t\t'data-tab-id': item.id,\n\t\t\trole: 'tab',\n\t\t\t'aria-selected': isActive,\n\t\t\ttabIndex: isActive || !value ? 0 : -1,\n\t\t\tonClick: () => handleSelect(item),\n\t\t\tclassName: cn('overflow-tab-bar--tab', tabClasses),\n\t\t} as const;\n\t\tif (item.href) {\n\t\t\treturn <a key={item.id} href={item.href} {...shared}>{inner}</a>;\n\t\t}\n\t\treturn <button key={item.id} type=\"button\" {...shared}>{inner}</button>;\n\t};\n\n\tconst moreContent = (\n\t\t<>\n\t\t\t<MoreHorizontal aria-hidden=\"true\" />\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t{strings.more}\n\t\t\t</Text>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={setRootRef}\n\t\t\tclassName={cn('overflow-tab-bar--component relative w-full min-w-0 max-w-full', className)}\n\t\t\t{...rootProps}\n\t\t>\n\t\t\t{/* Hidden measure row: every tab plus the More trigger at native width,\n\t\t\t laid out but invisible, so the visible strip never has to guess. */}\n\t\t\t<div\n\t\t\t\tref={measureRef}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"pointer-events-none invisible fixed left-0 top-0 z-[-1] flex h-0 w-0 items-center gap-space-2xs overflow-hidden\"\n\t\t\t>\n\t\t\t\t{items.map((i) => renderTab(i, false, { measure: true }))}\n\t\t\t\t<span data-more-measure=\"\" className={cn(TAB_BUTTON_BASE, TAB_INACTIVE)}>{moreContent}</span>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tref={trackRef}\n\t\t\t\tclassName=\"overflow-tab-bar--viewport inline-flex max-w-full min-w-0 items-center gap-space-2xs overflow-hidden rounded-inner bg-muted p-space-2xs align-top\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\trole=\"tablist\"\n\t\t\t\t\taria-label={strings.navigationLabel}\n\t\t\t\t\taria-orientation=\"horizontal\"\n\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\tclassName=\"overflow-tab-bar--tablist flex min-w-0 items-center gap-space-2xs overflow-hidden\"\n\t\t\t\t>\n\t\t\t\t\t{visibleItems.map((item) => renderTab(item, item.id === value))}\n\t\t\t\t</div>\n\t\t\t\t{overflowItems.length > 0 && (\n\t\t\t\t\t<ActionMenu\n\t\t\t\t\t\tactions={overflowItems.map((item) => ({\n\t\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\t\tlabel: item.label,\n\t\t\t\t\t\t\ticon: item.icon,\n\t\t\t\t\t\t\tonClick: () => handleSelect(item),\n\t\t\t\t\t\t}))}\n\t\t\t\t\t\talign=\"end\"\n\t\t\t\t\t\tcontentClassName=\"min-w-40\"\n\t\t\t\t\t\twidth=\"w-auto\"\n\t\t\t\t\t\tcloseOnSelect\n\t\t\t\t\t\tpreserveOrder\n\t\t\t\t\t\trenderTrigger={\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\taria-label={strings.more}\n\t\t\t\t\t\t\t\tclassName={cn(TAB_BUTTON_BASE, TAB_INACTIVE, 'overflow-tab-bar--more')}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{moreContent}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n});\n\nOverflowTabBar.displayName = 'OverflowTabBar';\n"],"mappings":";;;;;;;;;;;;;;;AAyHA,SAASA,EAAa,GAAqD;CAC1E,OAAO,OAAOgB,KAAU,YAAY,OAAOA,KAAU,YAAY,OAAOA,KAAU;AACnF;AAEA,SAAgBC,EAAY,EAC3B,YACA,UACA,gBACA,aAAU,UACV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eyD,EAAazD,CAAI;IACjC,EAAE;IACF,OAAM;IACN,kBAAiB;IACjB,OAAM;IACN,eAAA;IACA,eAAA;IACA,eACC,kBAAC,UAAD;KACC,MAAK;KACL,cAAY4B,EAAQ;KACpB,WAAW1C,EAAGwB,GAAiBC,GAAc,wBAAwB;KAEpE,UAAA6D;IACM,CAAA;GAET,CAAA,CAEE;EACD,CAAA,CAAA;;AAEP,CAAC;AAED,EAAe,cAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"overlays-I0axtYA6.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","interactionRecipes","React$1","Dialog$2","props","Dialog","DialogTrigger$1","renderSlot","asChild","DialogPortal","resolvedContainer","container","DialogClose$1","DialogOverlay","className","DialogContent$1","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';\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 ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean\n} & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\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 >\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\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\" 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"],"m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,KAAgB1C,EAAKiC,EAAiB;AACnD,GAAc,cAAc"}
@@ -1,149 +0,0 @@
1
- "use client";
2
- import { useStrings as e } from "./lib/strings.js";
3
- import { t } from "./utils-l5LpDw2z.js";
4
- import { n } from "./buttons-SbIcm1HJ.js";
5
- import { s as r } from "./typography-DTRkE9zL.js";
6
- import { createContext as i, useContext as a } from "react";
7
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import { ChevronLeftIcon as c, ChevronRightIcon as l, MoreHorizontalIcon as u } from "lucide-react";
9
- //#region src/components/ui/pagination.tsx
10
- function d({ className: e, ...n }) {
11
- return /* @__PURE__ */ o("nav", {
12
- role: "navigation",
13
- "aria-label": "pagination",
14
- "data-slot": "pagination",
15
- className: t("mx-auto flex w-full justify-center", e),
16
- ...n
17
- });
18
- }
19
- function f({ className: e, ...n }) {
20
- return /* @__PURE__ */ o("ul", {
21
- "data-slot": "pagination-content",
22
- className: t("flex items-center", e),
23
- ...n
24
- });
25
- }
26
- function p({ ...e }) {
27
- return /* @__PURE__ */ o("li", {
28
- "data-slot": "pagination-item",
29
- ...e
30
- });
31
- }
32
- //#endregion
33
- //#region src/components/base/navigation/pagination.tsx
34
- var m = {
35
- navigationLabel: "pagination",
36
- morePages: "More pages",
37
- previous: "Previous",
38
- next: "Next",
39
- previousLabel: "Go to previous page",
40
- nextLabel: "Go to next page"
41
- }, h = i(m);
42
- function g(t) {
43
- let n = a(h);
44
- return e(n, t);
45
- }
46
- function _(e) {
47
- return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
48
- }
49
- function v({ className: e, strings: n, children: r, "aria-label": i, ...a }) {
50
- let s = g(n);
51
- return /* @__PURE__ */ o(h.Provider, {
52
- value: s,
53
- children: /* @__PURE__ */ o(d, {
54
- "aria-label": i ?? s.navigationLabel,
55
- className: t("pagination-primitives--component", e),
56
- ...a,
57
- children: r
58
- })
59
- });
60
- }
61
- function y({ className: e, ...n }) {
62
- return /* @__PURE__ */ o(f, {
63
- className: t("pagination-primitives--content m-0 p-0 list-none gap-space-2xs", e),
64
- ...n
65
- });
66
- }
67
- function b({ className: e, label: n, strings: i, ...a }) {
68
- let c = g(i);
69
- return /* @__PURE__ */ s("span", {
70
- "data-slot": "pagination-ellipsis",
71
- className: t("pagination-primitives--ellipsis inline-flex size-action shrink-0 items-center justify-center text-muted-foreground", e),
72
- ...a,
73
- children: [/* @__PURE__ */ o(u, {
74
- className: "size-icon",
75
- "aria-hidden": "true"
76
- }), /* @__PURE__ */ o(r, {
77
- tag: "span",
78
- size: "inherit",
79
- className: "sr-only",
80
- children: n ?? c.morePages
81
- })]
82
- });
83
- }
84
- function x(e) {
85
- return /* @__PURE__ */ o(p, { ...e });
86
- }
87
- function S({ className: e, children: i, active: a = !1, ...s }) {
88
- return /* @__PURE__ */ o(n, {
89
- tone: "secondary",
90
- buttonStyle: a ? "outline" : "ghost",
91
- "aria-current": a ? "page" : void 0,
92
- "data-slot": "pagination-link",
93
- "data-active": a || void 0,
94
- className: t("pagination-primitives--link min-w-action px-control-xs", e),
95
- ...s,
96
- children: _(i) ? /* @__PURE__ */ o(r, {
97
- tag: "span",
98
- size: "inherit",
99
- weight: "medium",
100
- lineHeight: "tight",
101
- className: "text-inherit",
102
- children: i
103
- }) : i
104
- });
105
- }
106
- function C({ className: e, text: n, strings: i, children: a, ...l }) {
107
- let u = g(i);
108
- return /* @__PURE__ */ s(S, {
109
- "aria-label": u.previousLabel,
110
- size: "md",
111
- className: t("pagination-primitives--previous sm:!ps-control-sm sm:!pe-control", e),
112
- ...l,
113
- children: [/* @__PURE__ */ o(c, {
114
- "data-icon": "inline-start",
115
- "aria-hidden": "true"
116
- }), /* @__PURE__ */ o(r, {
117
- tag: "span",
118
- size: "inherit",
119
- weight: "medium",
120
- lineHeight: "tight",
121
- className: "hidden text-inherit sm:block",
122
- children: n ?? u.previous
123
- })]
124
- });
125
- }
126
- function w({ className: e, text: n, strings: i, children: a, ...c }) {
127
- let u = g(i);
128
- return /* @__PURE__ */ s(S, {
129
- "aria-label": u.nextLabel,
130
- size: "md",
131
- className: t("pagination-primitives--next sm:!ps-control sm:!pe-control-sm", e),
132
- ...c,
133
- children: [/* @__PURE__ */ o(r, {
134
- tag: "span",
135
- size: "inherit",
136
- weight: "medium",
137
- lineHeight: "tight",
138
- className: "hidden text-inherit sm:block",
139
- children: n ?? u.next
140
- }), /* @__PURE__ */ o(l, {
141
- "data-icon": "inline-end",
142
- "aria-hidden": "true"
143
- })]
144
- });
145
- }
146
- //#endregion
147
- export { w as a, m as c, S as i, b as n, C as o, x as r, v as s, y as t };
148
-
149
- //# sourceMappingURL=pagination-3bPA_a6K.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pagination-3bPA_a6K.js","names":["PaginationContent","PaginationItem","UIPagination","UIPaginationContent","UIPaginationItem","Text","Pagination","props","cn","className","PaginationContent$1","PaginationItem$1","defaultPaginationStrings","PaginationStringsContext","createContext","usePaginationStrings","inheritedStrings","useContext","useStrings","stringsProp","isSimpleText","value","PaginationPrimitive","ariaLabel","strings","PaginationContent","PaginationEllipsis","MoreHorizontalIcon","label","PaginationItem","PaginationLink","Button","active","children","PaginationPrevious","_children","ChevronLeftIcon","text","PaginationNext","ChevronRightIcon"],"sources":["../src/components/ui/pagination.tsx","../src/components/base/navigation/pagination.tsx"],"sourcesContent":["import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"./button\"\nimport { cn } from \"../../lib/utils\"\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn(\n \"mx-auto flex w-full justify-center\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({\n className,\n ...props\n}: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\"flex items-center\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n React.ComponentProps<\"a\">\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) {\n return (\n <Button\n variant={isActive ? \"outline\" : \"ghost\"}\n size={size}\n className={cn(className)}\n nativeButton={false}\n render={\n <a\n aria-current={isActive ? \"page\" : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n {...props}\n />\n }\n />\n )\n}\n\nfunction PaginationPrevious({\n className,\n text = \"Previous\",\n ...props\n}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"pl-2!\", className)}\n {...props}\n >\n <ChevronLeftIcon data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">\n {text}\n </span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({\n className,\n text = \"Next\",\n ...props\n}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"pr-2!\", className)}\n {...props}\n >\n <span className=\"hidden sm:block\">{text}</span>\n <ChevronRightIcon data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\n \"size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4 flex items-center justify-center\",\n className\n )}\n {...props}\n >\n <MoreHorizontalIcon\n />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n}\n","import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\nimport { createContext, useContext, type ComponentProps, type ReactNode } from 'react';\n\nimport {\n\tPagination as UIPagination,\n\tPaginationContent as UIPaginationContent,\n\tPaginationItem as UIPaginationItem,\n} from '../../ui/pagination';\nimport { Button, type ButtonProps } from '../buttons';\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nexport interface PaginationStrings {\n\tnavigationLabel: string;\n\tmorePages: string;\n\tprevious: string;\n\tnext: string;\n\tpreviousLabel: string;\n\tnextLabel: string;\n}\n\nexport const defaultPaginationStrings: PaginationStrings = {\n\tnavigationLabel: 'pagination',\n\tmorePages: 'More pages',\n\tprevious: 'Previous',\n\tnext: 'Next',\n\tpreviousLabel: 'Go to previous page',\n\tnextLabel: 'Go to next page',\n};\n\nconst PaginationStringsContext = createContext<PaginationStrings>(defaultPaginationStrings);\n\nfunction usePaginationStrings(stringsProp?: StringsProp<PaginationStrings>) {\n\tconst inheritedStrings = useContext(PaginationStringsContext);\n\treturn useStrings(inheritedStrings, stringsProp);\n}\n\nexport interface PaginationProps extends ComponentProps<typeof UIPagination> {\n\t/** Pagination items, normally blocks through `PaginationContent`. */\n\tchildren?: ReactNode;\n\t/** Accessible label for the pagination navigation landmark. */\n\t'aria-label'?: string;\n\t/** Additional classes merged with the package pagination root hook. */\n\tclassName?: string;\n\t/** Localizable navigation, direction, and ellipsis labels inherited by compound parts. */\n\tstrings?: StringsProp<PaginationStrings>;\n}\nexport type PaginationContentProps = ComponentProps<typeof UIPaginationContent>;\nexport type PaginationEllipsisProps = ComponentProps<'span'> & {\n\t/** Copy for the control. */\n\tlabel?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\nexport type PaginationItemProps = ComponentProps<typeof UIPaginationItem>;\nexport interface PaginationLinkProps extends Omit<\n\tButtonProps,\n\t'buttonStyle' | 'children' | 'variant'\n> {\n\tchildren?: ReactNode;\n\t/** Marks the current page. */\n\tactive?: boolean;\n}\nexport type PaginationNextProps = PaginationLinkProps & {\n\t/** Visible label for the control. */\n\ttext?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\nexport type PaginationPreviousProps = PaginationLinkProps & {\n\t/** Visible label for the control. */\n\ttext?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/**\n * Tokenized pagination navigation root.\n *\n * Compose it with the exported content, item, link, previous, next, and\n * ellipsis parts when consumers need explicit page navigation markup.\n */\n\nexport function PaginationPrimitive({ className, strings: stringsProp, children, 'aria-label': ariaLabel, ...props }: PaginationProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\treturn (\n\t\t<PaginationStringsContext.Provider value={strings}>\n\t\t\t<UIPagination\n\t\t\t\taria-label={ariaLabel ?? strings.navigationLabel}\n\t\t\t\tclassName={cn('pagination-primitives--component', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</UIPagination>\n\t\t</PaginationStringsContext.Provider>\n\t);\n}\n\nexport function PaginationContent({ className, ...props }: PaginationContentProps) {\n\treturn (\n\t\t<UIPaginationContent\n\t\t\tclassName={cn('pagination-primitives--content m-0 p-0 list-none gap-space-2xs', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function PaginationEllipsis({ className, label, strings: stringsProp, ...props }: PaginationEllipsisProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"pagination-ellipsis\"\n\t\t\t// Same square as a page link, so the row keeps one rhythm around the gap.\n\t\t\tclassName={cn('pagination-primitives--ellipsis inline-flex size-action shrink-0 items-center justify-center text-muted-foreground', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon className=\"size-icon\" aria-hidden=\"true\" />\n\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"sr-only\">\n\t\t\t\t{label ?? strings.morePages}\n\t\t\t</Text>\n\t\t</span>\n\t);\n}\n\nexport function PaginationItem(props: PaginationItemProps) {\n\treturn <UIPaginationItem {...props} />;\n}\n\nexport function PaginationLink({ className, children, active = false, ...props }: PaginationLinkProps) {\n\treturn (\n\t\t<Button\n\t\t\ttone=\"secondary\"\n\t\t\tbuttonStyle={active ? 'outline' : 'ghost'}\n\t\t\taria-current={active ? 'page' : undefined}\n\t\t\tdata-slot=\"pagination-link\"\n\t\t\tdata-active={active || undefined}\n\t\t\t// Page numbers are action-height squares that widen only for long numbers.\n\t\t\tclassName={cn('pagination-primitives--link min-w-action px-control-xs', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</Button>\n\t);\n}\n\n\nexport function PaginationPrevious({ className, text, strings: stringsProp, children: _children, ...props }: PaginationPreviousProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label={strings.previousLabel}\n\t\t\tsize=\"md\"\n\t\t\tclassName={cn('pagination-primitives--previous sm:!ps-control-sm sm:!pe-control', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronLeftIcon data-icon=\"inline-start\" aria-hidden=\"true\" />\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"hidden text-inherit sm:block\">\n\t\t\t\t{text ?? strings.previous}\n\t\t\t</Text>\n\t\t</PaginationLink>\n\t);\n}\n\n\nexport function PaginationNext({ className, text, strings: stringsProp, children: _children, ...props }: PaginationNextProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label={strings.nextLabel}\n\t\t\tsize=\"md\"\n\t\t\tclassName={cn('pagination-primitives--next sm:!ps-control sm:!pe-control-sm', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"hidden text-inherit sm:block\">\n\t\t\t\t{text ?? strings.next}\n\t\t\t</Text>\n\t\t\t<ChevronRightIcon data-icon=\"inline-end\" aria-hidden=\"true\" />\n\t\t</PaginationLink>\n\t);\n}\n"],"mappings":";;;;;;;;;AAMA,SAASM,EAAW,EAAE,cAAW,GAAGC,KAAsC;CACxE,OACE,kBAAC,OAAD;EACE,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAWC,EACT,sCACAC,CACF;EACA,GAAIF;CACL,CAAA;AAEL;AAEA,SAASP,EAAkB,EACzB,cACA,GAAGO,KAC0B;CAC7B,OACE,kBAAC,MAAD;EACE,aAAU;EACV,WAAWC,EAAG,qBAAqBC,CAAS;EAC5C,GAAIF;CACL,CAAA;AAEL;AAEA,SAASN,EAAe,EAAE,GAAGM,KAAqC;CAChE,OAAO,kBAAC,MAAD;EAAI,aAAU;EAAkB,GAAIA;CAAQ,CAAA;AACrD;;;ACdA,IAAaK,IAA8C;CAC1D,iBAAiB;CACjB,WAAW;CACX,UAAU;CACV,MAAM;CACN,eAAe;CACf,WAAW;AACZ,GAEMC,IAA2BC,EAAiCF,CAAwB;AAE1F,SAASG,EAAqB,GAA8C;CAC3E,IAAMC,IAAmBC,EAAWJ,CAAwB;CAC5D,OAAOK,EAAWF,GAAkBG,CAAW;AAChD;AAyCA,SAASC,EAAa,GAAqD;CAC1E,OAAO,OAAOC,KAAU,YAAY,OAAOA,KAAU,YAAY,OAAOA,KAAU;AACnF;AASA,SAAgBC,EAAoB,EAAE,cAAW,SAASH,GAAa,aAAU,cAAcI,GAAW,GAAGhB,KAA0B;CACtI,IAAMiB,IAAUT,EAAqBI,CAAW;CAChD,OACC,kBAACN,EAAyB,UAA1B;EAAmC,OAA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MiB,IAAUT,EAAqBI,CAAW;CAChD,OACC,kBAACW,GAAD;EACC,cAAYN,EAAQ;EACpB,MAAK;EACL,WAAWhB,EAAG,oEAAoEC,CAAS;EAC3F,GAAIF;EAJL,UAAA,CAMC,kBAAC6B,GAAD;GAAiB,aAAU;GAAe,eAAY;EAAQ,CAAA,GAC9D,kBAAC/B,GAAD;GAAM,KAAI;GAAO,MAAK;GAAU,QAAO;GAAS,YAAW;GAAQ,WAAU;GAC3E,UAAAgC,KAAQb,EAAQ;EACZ,CAAA,CACS;;AAElB;AAGA,SAAgBc,EAAe,EAAE,cAAW,SAAM,SAASnB,GAAa,UAAUgB,GAAW,GAAG5B,KAA8B;CAC7H,IAAMiB,IAAUT,EAAqBI,CAAW;CAChD,OACC,kBAACW,GAAD;EACC,cAAYN,EAAQ;EACpB,MAAK;EACL,WAAWhB,EAAG,gEAAgEC,CAAS;EACvF,GAAIF;EAJL,UAAA,CAMC,kBAACF,GAAD;GAAM,KAAI;GAAO,MAAK;GAAU,QAAO;GAAS,YAAW;GAAQ,WAAU;GAC3E,UAAAgC,KAAQb,EAAQ;EACZ,CAAA,GACN,kBAACe,GAAD;GAAkB,aAAU;GAAa,eAAY;EAAQ,CAAA,CAC9C;;AAElB"}
@@ -1,99 +0,0 @@
1
- "use client";
2
- import { useStrings as e } from "./lib/strings.js";
3
- import { t } from "./utils-l5LpDw2z.js";
4
- import { n, t as r } from "./feedback-qNuMBtRH.js";
5
- import { t as i } from "./collection-content-uK16Grv0.js";
6
- import { a, i as o, l as s, n as c, o as l, r as u, t as d } from "./command-kNR20o7x.js";
7
- import { c as f, i as p, o as m, r as h, t as g } from "./popover-Di55PyAI.js";
8
- import * as _ from "react";
9
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
10
- //#region src/components/base/popover-menu/popover-menu.types.ts
11
- var x = {
12
- searchPlaceholder: "Search…",
13
- empty: "No results.",
14
- loading: "Loading…",
15
- retry: "Retry"
16
- };
17
- //#endregion
18
- //#region src/components/base/popover-menu/popover-menu.tsx
19
- function S({ density: S = "default", trigger: C, items: w, onSelect: T, open: E, onOpenChange: D, search: O = !0, searchValue: k, onSearchChange: A, loading: j = !1, error: M, onRetry: N, header: P, footer: F, empty: I, loadingSlot: L, renderItem: R, strings: z, align: B = "start", sideOffset: V, contentClassName: H, contentLabel: U, contentLabelledBy: W }) {
20
- let G = e(x, z), K = _.useRef(null), q = _.useRef(null), J = _.useRef(!1), Y = _.useRef(null), X = _.useMemo(() => new Map(w.filter((e) => e.searchValue !== void 0).map((e) => [e.value, e.searchValue])), [w]), Z = _.useCallback((e, t, n) => X.has(e) ? s(X.get(e), t) : s(e, t, n), [X]);
21
- return /* @__PURE__ */ b(m, {
22
- open: E,
23
- onOpenChange: (e, t) => {
24
- J.current = !e && t.reason === "escape-key", D?.(e);
25
- },
26
- onOpenChangeComplete: (e) => {
27
- !e && J.current && (J.current = !1, q.current?.focus({ preventScroll: !0 }));
28
- },
29
- children: [/* @__PURE__ */ y(f, {
30
- ref: q,
31
- render: C
32
- }), /* @__PURE__ */ y(g, {
33
- ref: Y,
34
- "aria-label": W ? void 0 : U ?? G.searchPlaceholder,
35
- "aria-labelledby": W,
36
- align: B,
37
- sideOffset: V,
38
- type: "menu",
39
- inset: "flush",
40
- className: t("popover-menu--component", "w-56 gap-0 overflow-hidden", H),
41
- children: /* @__PURE__ */ b(d, {
42
- shouldFilter: !A,
43
- filter: Z,
44
- inset: "flush",
45
- className: "popover-menu--collection",
46
- children: [
47
- !!P && /* @__PURE__ */ y(p, {
48
- className: "popover-menu--header",
49
- children: P
50
- }),
51
- !!O && /* @__PURE__ */ y(o, {
52
- ref: K,
53
- placeholder: G.searchPlaceholder,
54
- value: k,
55
- onValueChange: A
56
- }),
57
- /* @__PURE__ */ y(l, {
58
- "aria-busy": j || void 0,
59
- children: j ? L === void 0 ? /* @__PURE__ */ y(n, { label: G.loading }) : /* @__PURE__ */ y("div", {
60
- role: "status",
61
- "aria-live": "polite",
62
- children: L
63
- }) : M ? /* @__PURE__ */ y(r, {
64
- variant: "inline",
65
- description: M,
66
- onRetry: N ? () => {
67
- (K.current ?? Y.current)?.focus(), N();
68
- } : void 0,
69
- retryLabel: G.retry ?? "Retry"
70
- }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(c, { children: I ?? G.empty }), w.length > 0 && /* @__PURE__ */ y(u, { children: w.map((e) => /* @__PURE__ */ y(a, {
71
- density: S,
72
- value: e.value,
73
- keywords: e.searchValue === void 0 ? [e.label, e.description].filter((e) => typeof e == "string") : [e.searchValue],
74
- onSelect: () => T(e),
75
- disabled: e.disabled,
76
- "data-checked": e.selected || void 0,
77
- className: "data-[checked=true]:**:[svg]:text-primary-accent",
78
- children: ({ isHighlighted: t }) => R ? R(e, { isHighlighted: t }) : /* @__PURE__ */ y(i, {
79
- label: e.label,
80
- description: e.description,
81
- leading: e.icon,
82
- leadingClassName: "[&_svg]:size-icon"
83
- })
84
- }, e.value)) })] })
85
- }),
86
- !!F && /* @__PURE__ */ y(h, {
87
- className: "popover-menu--footer justify-start",
88
- children: F
89
- })
90
- ]
91
- })
92
- })]
93
- });
94
- }
95
- S.displayName = "PopoverMenu";
96
- //#endregion
97
- export { x as n, S as t };
98
-
99
- //# sourceMappingURL=popover-menu-B71Tn2Qz.js.map