themelia-react-ui 1.0.1 → 1.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 (488) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/README.md +59 -13
  3. package/dist/{accordion-B-5Focs8.js → accordion-BRTcsp8J.js} +8 -8
  4. package/dist/accordion-BRTcsp8J.js.map +1 -0
  5. package/dist/{action-menu-Cx3SdfbN.js → action-menu-Drxw_vJk.js} +36 -36
  6. package/dist/action-menu-Drxw_vJk.js.map +1 -0
  7. package/dist/affordance-geometry.generated-CL84ZN9A.js +63 -0
  8. package/dist/affordance-geometry.generated-CL84ZN9A.js.map +1 -0
  9. package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-DLVdK0Py.js} +151 -155
  10. package/dist/ai-artifact-DLVdK0Py.js.map +1 -0
  11. package/dist/{app-shell-at8Kt4l_.js → app-shell-C_fKpljx.js} +11 -10
  12. package/dist/app-shell-C_fKpljx.js.map +1 -0
  13. package/dist/{attachment-BO2R47wn.js → attachment-DbjUWsP0.js} +12 -12
  14. package/dist/{attachment-BO2R47wn.js.map → attachment-DbjUWsP0.js.map} +1 -1
  15. package/dist/auth-CAQcasMV.js +723 -0
  16. package/dist/auth-CAQcasMV.js.map +1 -0
  17. package/dist/{avatar-Bpzty83c.js → avatar-Bu2HhitA.js} +6 -6
  18. package/dist/{avatar-Bpzty83c.js.map → avatar-Bu2HhitA.js.map} +1 -1
  19. package/dist/{badge-BZXZT9wd.js → badge-CzId1Wlm.js} +4 -4
  20. package/dist/{badge-BZXZT9wd.js.map → badge-CzId1Wlm.js.map} +1 -1
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/buttons.js +3 -2
  27. package/dist/base/cards.js +3 -3
  28. package/dist/base/carousel.js +25 -27
  29. package/dist/base/carousel.js.map +1 -1
  30. package/dist/base/cascader.js +150 -148
  31. package/dist/base/cascader.js.map +1 -1
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +2 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +1 -1
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +3 -3
  39. package/dist/base/display.js +7 -7
  40. package/dist/base/feedback.js +4 -4
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +2 -2
  43. package/dist/base/inline-edit.js +40 -43
  44. package/dist/base/inline-edit.js.map +1 -1
  45. package/dist/base/item.js +1 -1
  46. package/dist/base/media-gallery.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +1 -1
  51. package/dist/base/repeaters.js +33 -33
  52. package/dist/base/repeaters.js.map +1 -1
  53. package/dist/base/sheet.js +1 -1
  54. package/dist/base/sidebar.js +1 -1
  55. package/dist/base/signature-pad.js +83 -81
  56. package/dist/base/signature-pad.js.map +1 -1
  57. package/dist/base/skeleton.js +1 -1
  58. package/dist/base/spinner.js +1 -1
  59. package/dist/base/structure.js +1 -1
  60. package/dist/base/table.js +1 -1
  61. package/dist/base/text-inputs.js +2 -2
  62. package/dist/base/toaster.js +6 -6
  63. package/dist/base/toaster.js.map +1 -1
  64. package/dist/base/tree.js +1 -1
  65. package/dist/base/upload-queue.js +1 -1
  66. package/dist/base/upload.js +3 -3
  67. package/dist/base/value-inputs.js +1 -1
  68. package/dist/blocks/admin.js +134 -134
  69. package/dist/blocks/admin.js.map +1 -1
  70. package/dist/blocks/ai.js +120 -117
  71. package/dist/blocks/ai.js.map +1 -1
  72. package/dist/blocks/analytics/usage-card.js +1 -1
  73. package/dist/blocks/analytics.js +510 -472
  74. package/dist/blocks/analytics.js.map +1 -1
  75. package/dist/blocks/collaboration.js +2 -2
  76. package/dist/blocks/commerce/receipt.js +1 -1
  77. package/dist/blocks/commerce.js +395 -383
  78. package/dist/blocks/commerce.js.map +1 -1
  79. package/dist/blocks/data-display.js +1 -1
  80. package/dist/blocks/onboarding.js +6 -6
  81. package/dist/blocks/onboarding.js.map +1 -1
  82. package/dist/blocks/planning.js +36 -36
  83. package/dist/blocks/planning.js.map +1 -1
  84. package/dist/blocks/timelines.js +1 -1
  85. package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BuYz5SDU.js} +9 -8
  86. package/dist/breadcrumbs-BuYz5SDU.js.map +1 -0
  87. package/dist/button-BZDasD04.js +651 -0
  88. package/dist/button-BZDasD04.js.map +1 -0
  89. package/dist/{button-BS6l5JUw.js → button-BZyfTvwm.js} +3 -3
  90. package/dist/button-BZyfTvwm.js.map +1 -0
  91. package/dist/buttons-D_6KJvEE.js +99 -0
  92. package/dist/buttons-D_6KJvEE.js.map +1 -0
  93. package/dist/{cards-Cum56XOF.js → cards-qGSErLw_.js} +12 -12
  94. package/dist/{cards-Cum56XOF.js.map → cards-qGSErLw_.js.map} +1 -1
  95. package/dist/chart-Bsc5BICK.js +150 -0
  96. package/dist/chart-Bsc5BICK.js.map +1 -0
  97. package/dist/{checkbox-BavDRjF7.js → checkbox-BQNDjUCh.js} +3 -3
  98. package/dist/checkbox-BQNDjUCh.js.map +1 -0
  99. package/dist/choice-inputs-Mk3iWbhr.js +725 -0
  100. package/dist/choice-inputs-Mk3iWbhr.js.map +1 -0
  101. package/dist/{code-block-xHKbAJDj.js → code-block-DzHKRybS.js} +23 -23
  102. package/dist/code-block-DzHKRybS.js.map +1 -0
  103. package/dist/{collapsible-DsnktFNv.js → collapsible-ClvC7Bj3.js} +3 -3
  104. package/dist/{collapsible-DsnktFNv.js.map → collapsible-ClvC7Bj3.js.map} +1 -1
  105. package/dist/{collection-content-C4fthJV_.js → collection-content-D6S8cv_n.js} +3 -3
  106. package/dist/{collection-content-C4fthJV_.js.map → collection-content-D6S8cv_n.js.map} +1 -1
  107. package/dist/{combobox-DEbdr-3u.js → combobox-BFnbJJp3.js} +18 -18
  108. package/dist/combobox-BFnbJJp3.js.map +1 -0
  109. package/dist/{combobox-xv3yJbzl.js → combobox-hozNwUcc.js} +313 -316
  110. package/dist/combobox-hozNwUcc.js.map +1 -0
  111. package/dist/{command-C0xe7u9B.js → command-BnmSchli.js} +9 -9
  112. package/dist/command-BnmSchli.js.map +1 -0
  113. package/dist/comments-u5L0OGip.js +1156 -0
  114. package/dist/comments-u5L0OGip.js.map +1 -0
  115. package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
  116. package/dist/components/base/buttons/button.recipes.d.ts +10 -19
  117. package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
  118. package/dist/components/base/cards/card.recipes.d.ts +13 -5
  119. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
  120. package/dist/components/base/cards/smart-card.types.d.ts +1 -1
  121. package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
  122. package/dist/components/base/date-pickers/datepicker.types.d.ts +3 -0
  123. package/dist/components/base/forms/form-field.d.ts +1 -0
  124. package/dist/components/base/forms/form-sizing.d.ts +3 -3
  125. package/dist/components/base/navigation/tabs.d.ts +3 -5
  126. package/dist/components/base/popover/popover.recipes.d.ts +3 -3
  127. package/dist/components/base/table/index.d.ts +1 -1
  128. package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
  129. package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
  130. package/dist/components/blocks/analytics/types.d.ts +1 -1
  131. package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
  132. package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
  133. package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
  134. package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
  135. package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
  136. package/dist/components/features/combobox/components/error-message.d.ts +1 -1
  137. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
  138. package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
  139. package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
  140. package/dist/components/features/media-library/media-library.d.ts +1 -1
  141. package/dist/components/features/media-library/media-library.types.d.ts +9 -1
  142. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  143. package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
  144. package/dist/components/features/overlays/overlays.types.d.ts +5 -4
  145. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
  146. package/dist/components/features/table/data-table.d.ts +1 -1
  147. package/dist/components/features/table/table.types.d.ts +1 -1
  148. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
  149. package/dist/components/layout/auth/auth.types.d.ts +1 -0
  150. package/dist/components/layout/page/page.d.ts +0 -1
  151. package/dist/components/layout/page/page.types.d.ts +9 -3
  152. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
  153. package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
  154. package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
  155. package/dist/components/typography/heading.d.ts +5 -2
  156. package/dist/components/typography/index.d.ts +1 -1
  157. package/dist/components/typography/text.styles.d.ts +10 -0
  158. package/dist/components/ui/popover.d.ts +1 -1
  159. package/dist/components/ui/sidebar.d.ts +1 -1
  160. package/dist/components/ui/table.d.ts +2 -1
  161. package/dist/container.recipes-D9t8MHR3.js +27 -0
  162. package/dist/container.recipes-D9t8MHR3.js.map +1 -0
  163. package/dist/{containers-6s-ucRQQ.js → containers-DqB-bSYE.js} +33 -56
  164. package/dist/containers-DqB-bSYE.js.map +1 -0
  165. package/dist/control-group-recipes-DBXmfh2E.js +21 -0
  166. package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
  167. package/dist/{copyable-B7SBXJMr.js → copyable-BTSByfmq.js} +6 -6
  168. package/dist/{copyable-B7SBXJMr.js.map → copyable-BTSByfmq.js.map} +1 -1
  169. package/dist/{data-display-cWIRdeaf.js → data-display-Bihs9Ven.js} +545 -332
  170. package/dist/data-display-Bihs9Ven.js.map +1 -0
  171. package/dist/{date-BFNMnrS5.js → date-DOKhJPu7.js} +4 -4
  172. package/dist/{date-BFNMnrS5.js.map → date-DOKhJPu7.js.map} +1 -1
  173. package/dist/{date-picker-CA6ogMQB.js → date-picker-DzP5HQq7.js} +492 -472
  174. package/dist/date-picker-DzP5HQq7.js.map +1 -0
  175. package/dist/date-pickers-BpgGz7S-.js +196 -0
  176. package/dist/date-pickers-BpgGz7S-.js.map +1 -0
  177. package/dist/{display-CFM5myut.js → display-CS6Hbk18.js} +8 -8
  178. package/dist/{display-CFM5myut.js.map → display-CS6Hbk18.js.map} +1 -1
  179. package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-D-boNgGO.js} +7 -7
  180. package/dist/{dropdown-menu-BlnyHr-9.js.map → dropdown-menu-D-boNgGO.js.map} +1 -1
  181. package/dist/features/activities.js +152 -141
  182. package/dist/features/activities.js.map +1 -1
  183. package/dist/features/ai-chat.js +182 -179
  184. package/dist/features/ai-chat.js.map +1 -1
  185. package/dist/features/async-preview.js +9 -9
  186. package/dist/features/async-preview.js.map +1 -1
  187. package/dist/features/combobox.js +1 -1
  188. package/dist/features/comments.js +1 -1
  189. package/dist/features/data-view.js +25 -23
  190. package/dist/features/data-view.js.map +1 -1
  191. package/dist/features/email-composer/engine.js +1 -1
  192. package/dist/features/email-composer.js +103 -104
  193. package/dist/features/email-composer.js.map +1 -1
  194. package/dist/features/event-calendar.js +375 -373
  195. package/dist/features/event-calendar.js.map +1 -1
  196. package/dist/features/filters.js +1 -1
  197. package/dist/features/global-search.js +222 -224
  198. package/dist/features/global-search.js.map +1 -1
  199. package/dist/features/kanban.js +29 -29
  200. package/dist/features/kanban.js.map +1 -1
  201. package/dist/features/map.js +59 -58
  202. package/dist/features/map.js.map +1 -1
  203. package/dist/features/media-library.js +856 -855
  204. package/dist/features/media-library.js.map +1 -1
  205. package/dist/features/mentions.js +1 -1
  206. package/dist/features/overlays.js +1 -1
  207. package/dist/features/products.js +1209 -1209
  208. package/dist/features/products.js.map +1 -1
  209. package/dist/features/questionnaire.js +52 -52
  210. package/dist/features/questionnaire.js.map +1 -1
  211. package/dist/features/resource-assignment.js +29 -31
  212. package/dist/features/resource-assignment.js.map +1 -1
  213. package/dist/features/resource.js +13 -13
  214. package/dist/features/resource.js.map +1 -1
  215. package/dist/features/rich-text-editor.js +2 -2
  216. package/dist/features/schema-form.js +82 -82
  217. package/dist/features/schema-form.js.map +1 -1
  218. package/dist/features/suggestions.js +3 -3
  219. package/dist/features/sync.js +4 -4
  220. package/dist/features/sync.js.map +1 -1
  221. package/dist/features/table.js +1 -1
  222. package/dist/features/theme-tweaker.js +456 -450
  223. package/dist/features/theme-tweaker.js.map +1 -1
  224. package/dist/{feedback-DWUkgEjR.js → feedback-CJkUAapr.js} +29 -29
  225. package/dist/feedback-CJkUAapr.js.map +1 -0
  226. package/dist/field-affordance-recipes-uKY4MsZ_.js +25 -0
  227. package/dist/field-affordance-recipes-uKY4MsZ_.js.map +1 -0
  228. package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-DQQpiLWC.js} +3 -3
  229. package/dist/field-state-recipes-DQQpiLWC.js.map +1 -0
  230. package/dist/{filters-BhsUtsxW.js → filters-D6FF8L6s.js} +715 -720
  231. package/dist/filters-D6FF8L6s.js.map +1 -0
  232. package/dist/{form-field-Bn7ZH1rA.js → form-field-CZwrkP7m.js} +17 -9
  233. package/dist/form-field-CZwrkP7m.js.map +1 -0
  234. package/dist/{form-sizing-BWs70_a2.js → form-sizing-QP8aIRaW.js} +8 -5
  235. package/dist/form-sizing-QP8aIRaW.js.map +1 -0
  236. package/dist/{forms-B7pzS25o.js → forms-B5NCbkSC.js} +35 -35
  237. package/dist/{forms-B7pzS25o.js.map → forms-B5NCbkSC.js.map} +1 -1
  238. package/dist/forms-numeric-Crrm80Lm.js +867 -0
  239. package/dist/forms-numeric-Crrm80Lm.js.map +1 -0
  240. package/dist/{header-C59QZyxV.js → header-kxruN3RM.js} +53 -49
  241. package/dist/header-kxruN3RM.js.map +1 -0
  242. package/dist/{hooks-CM1Vp9Pe.js → hooks-BrlnCwQd.js} +2 -2
  243. package/dist/{hooks-CM1Vp9Pe.js.map → hooks-BrlnCwQd.js.map} +1 -1
  244. package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
  245. package/dist/http-CdEIHyQf.js.map +1 -0
  246. package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-Btc6pQrp.js} +4 -4
  247. package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-Btc6pQrp.js.map} +1 -1
  248. package/dist/index.js +2 -2
  249. package/dist/input-SX9V0AL3.js +255 -0
  250. package/dist/input-SX9V0AL3.js.map +1 -0
  251. package/dist/input-vxcaNCYC.js +20 -0
  252. package/dist/input-vxcaNCYC.js.map +1 -0
  253. package/dist/{item-pJ0GsOiJ.js → item-DE4YnuJx.js} +18 -17
  254. package/dist/item-DE4YnuJx.js.map +1 -0
  255. package/dist/layout/app-shell.js +1 -1
  256. package/dist/layout/auth.js +1 -1
  257. package/dist/layout/containers.js +1 -1
  258. package/dist/layout/header.js +1 -1
  259. package/dist/layout/hooks.js +1 -1
  260. package/dist/layout/navigation.js +1 -1
  261. package/dist/layout/page.js +1 -1
  262. package/dist/layout/settings.js +1 -1
  263. package/dist/layout/sidebar.js +2 -2
  264. package/dist/layout/workspace.js +1 -1
  265. package/dist/layout.js +10 -10
  266. package/dist/lib/affordance-geometry.generated.d.ts +40 -9
  267. package/dist/lib/control-group-recipes.d.ts +22 -0
  268. package/dist/lib/field-affordance-recipes.d.ts +35 -2
  269. package/dist/lib/field-state-recipes.d.ts +2 -2
  270. package/dist/lib/navigation-row-recipes.d.ts +3 -2
  271. package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
  272. package/dist/lib/surface-recipes.d.ts +5 -2
  273. package/dist/lib/token-merge.generated.d.ts +144 -2
  274. package/dist/lib/ui-provider/types.d.ts +4 -2
  275. package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
  276. package/dist/lib/utils.js +1 -1
  277. package/dist/{media-gallery-DhDRgnVZ.js → media-gallery-DLp3HAz0.js} +75 -74
  278. package/dist/media-gallery-DLp3HAz0.js.map +1 -0
  279. package/dist/{mentions-B8Ko-fhS.js → mentions-Cl0Kt_Pd.js} +52 -50
  280. package/dist/{mentions-B8Ko-fhS.js.map → mentions-Cl0Kt_Pd.js.map} +1 -1
  281. package/dist/message-SZUNB1eX.js +127 -0
  282. package/dist/message-SZUNB1eX.js.map +1 -0
  283. package/dist/{navigation-DBEu4POU.js → navigation-DnQSNMT0.js} +64 -55
  284. package/dist/navigation-DnQSNMT0.js.map +1 -0
  285. package/dist/{navigation-BUIn2Qxx.js → navigation-DyytsLRB.js} +37 -37
  286. package/dist/navigation-DyytsLRB.js.map +1 -0
  287. package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DQEXQcqY.js} +3 -3
  288. package/dist/navigation-row-recipes-DQEXQcqY.js.map +1 -0
  289. package/dist/{number-BNT_BIzJ.js → number-DasMFWEG.js} +4 -4
  290. package/dist/{number-BNT_BIzJ.js.map → number-DasMFWEG.js.map} +1 -1
  291. package/dist/overlays-DUbs1KEi.js +1011 -0
  292. package/dist/overlays-DUbs1KEi.js.map +1 -0
  293. package/dist/{page-BV6ioQg3.js → page-hGmT4nWK.js} +75 -64
  294. package/dist/page-hGmT4nWK.js.map +1 -0
  295. package/dist/{page-header-DQRa0jug.js → page-header-D8nERkn5.js} +9 -9
  296. package/dist/page-header-D8nERkn5.js.map +1 -0
  297. package/dist/{pagination-C29vvt3I.js → pagination-NLGqRirf.js} +20 -20
  298. package/dist/pagination-NLGqRirf.js.map +1 -0
  299. package/dist/{popover-CoLDEg19.js → popover-CghIYdQf.js} +23 -22
  300. package/dist/popover-CghIYdQf.js.map +1 -0
  301. package/dist/{popover-menu-GLIQTJTx.js → popover-menu-B4PoWhRl.js} +6 -6
  302. package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-B4PoWhRl.js.map} +1 -1
  303. package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-QlD4JenO.js} +5 -5
  304. package/dist/popover.recipes-QlD4JenO.js.map +1 -0
  305. package/dist/{primitives-DKPOGVpj.js → primitives-C7ff0QaI.js} +120 -113
  306. package/dist/primitives-C7ff0QaI.js.map +1 -0
  307. package/dist/primitives.js +3 -3
  308. package/dist/{progress-BOe8l_FZ.js → progress-BroqrAyV.js} +10 -9
  309. package/dist/progress-BroqrAyV.js.map +1 -0
  310. package/dist/{receipt-BM8xsGFy.js → receipt-BuJynLgf.js} +8 -8
  311. package/dist/{receipt-BM8xsGFy.js.map → receipt-BuJynLgf.js.map} +1 -1
  312. package/dist/{rich-text-B7sBAdDG.js → rich-text-DlxDOtf4.js} +4 -4
  313. package/dist/{rich-text-B7sBAdDG.js.map → rich-text-DlxDOtf4.js.map} +1 -1
  314. package/dist/rich-text-editor-BKyG7rWz.js +574 -0
  315. package/dist/rich-text-editor-BKyG7rWz.js.map +1 -0
  316. package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-B72Nfuze.js} +35 -26
  317. package/dist/rich-text-editor.recipes-B72Nfuze.js.map +1 -0
  318. package/dist/{scroll-area-BheMQ270.js → scroll-area-D-pIhEKl.js} +3 -3
  319. package/dist/scroll-area-D-pIhEKl.js.map +1 -0
  320. package/dist/{separator-Gk_WXH-l.js → separator-BNIgG3au.js} +3 -3
  321. package/dist/{separator-Gk_WXH-l.js.map → separator-BNIgG3au.js.map} +1 -1
  322. package/dist/{separator-DO0EbCEm.js → separator-BhtFyo4x.js} +2 -2
  323. package/dist/{separator-DO0EbCEm.js.map → separator-BhtFyo4x.js.map} +1 -1
  324. package/dist/services/actions.js +1 -1
  325. package/dist/{settings-BnCyyPOJ.js → settings-DOTOzeZ2.js} +10 -9
  326. package/dist/{settings-BnCyyPOJ.js.map → settings-DOTOzeZ2.js.map} +1 -1
  327. package/dist/{sheet-B-q914Ad.js → sheet-BFhrNehm.js} +11 -11
  328. package/dist/sheet-BFhrNehm.js.map +1 -0
  329. package/dist/{sidebar-DPR7fmqN.js → sidebar-CyR4XKwR.js} +219 -200
  330. package/dist/sidebar-CyR4XKwR.js.map +1 -0
  331. package/dist/{sidebar-C_2p3Tfj.js → sidebar-SvGJ0Zwi.js} +63 -58
  332. package/dist/sidebar-SvGJ0Zwi.js.map +1 -0
  333. package/dist/{skeleton-CmT1ppqb.js → skeleton-3F0uhYn3.js} +4 -4
  334. package/dist/{skeleton-CmT1ppqb.js.map → skeleton-3F0uhYn3.js.map} +1 -1
  335. package/dist/{smart-card-CYLn46e6.js → smart-card-DjGVV2xr.js} +171 -165
  336. package/dist/smart-card-DjGVV2xr.js.map +1 -0
  337. package/dist/{spinner-BY9HbUEh.js → spinner-Cpf7oRkF.js} +5 -5
  338. package/dist/{spinner-BY9HbUEh.js.map → spinner-Cpf7oRkF.js.map} +1 -1
  339. package/dist/{structure-MvKVq-oL.js → structure-CRdqVawd.js} +2 -2
  340. package/dist/{structure-MvKVq-oL.js.map → structure-CRdqVawd.js.map} +1 -1
  341. package/dist/style.css +1 -1
  342. package/dist/{surface-recipes-CQfRr-VL.js → surface-recipes-Dd__PD-w.js} +4 -3
  343. package/dist/surface-recipes-Dd__PD-w.js.map +1 -0
  344. package/dist/{table-DnlAJ-xR.js → table-CLtJTxoR.js} +17 -16
  345. package/dist/table-CLtJTxoR.js.map +1 -0
  346. package/dist/table-CcRDZiLP.js +1444 -0
  347. package/dist/table-CcRDZiLP.js.map +1 -0
  348. package/dist/tabs-BNgu7g0u.js +188 -0
  349. package/dist/tabs-BNgu7g0u.js.map +1 -0
  350. package/dist/text-inputs-DsR56TR-.js +330 -0
  351. package/dist/text-inputs-DsR56TR-.js.map +1 -0
  352. package/dist/{text.styles-BwB7vAF2.js → text.styles-Q4sGAIgA.js} +18 -10
  353. package/dist/text.styles-Q4sGAIgA.js.map +1 -0
  354. package/dist/theme.css +77 -115
  355. package/dist/{timelines-B9ICkQcV.js → timelines-D1pkt3se.js} +84 -78
  356. package/dist/timelines-D1pkt3se.js.map +1 -0
  357. package/dist/{tree-BdWSaoFT.js → tree-BtmYyMZV.js} +8 -8
  358. package/dist/{tree-BdWSaoFT.js.map → tree-BtmYyMZV.js.map} +1 -1
  359. package/dist/typography/rich-text.js +1 -1
  360. package/dist/typography-BxQgiZyw.js +96 -0
  361. package/dist/typography-BxQgiZyw.js.map +1 -0
  362. package/dist/typography.js +1 -1
  363. package/dist/{ui-provider-CftIB6TY.js → ui-provider-DRPn3qNl.js} +3 -2
  364. package/dist/ui-provider-DRPn3qNl.js.map +1 -0
  365. package/dist/ui-provider.js +1 -1
  366. package/dist/{upload-D8Za5x_c.js → upload-CDbYw1WN.js} +326 -323
  367. package/dist/upload-CDbYw1WN.js.map +1 -0
  368. package/dist/{upload-queue-hIIYBLS7.js → upload-queue-CNd_hH_a.js} +25 -25
  369. package/dist/upload-queue-CNd_hH_a.js.map +1 -0
  370. package/dist/{usage-card-DnmnJ58D.js → usage-card-VyJLUwRr.js} +53 -54
  371. package/dist/usage-card-VyJLUwRr.js.map +1 -0
  372. package/dist/utils-BvH9PSmq.js +4275 -0
  373. package/dist/utils-BvH9PSmq.js.map +1 -0
  374. package/dist/value-inputs-D0KCrfVC.js +840 -0
  375. package/dist/value-inputs-D0KCrfVC.js.map +1 -0
  376. package/dist/{workspace-C1PZmk8L.js → workspace-CcR8r-Nt.js} +115 -122
  377. package/dist/workspace-CcR8r-Nt.js.map +1 -0
  378. package/docs/consumer-skill/SKILL.md +110 -119
  379. package/docs/consumer-skill/examples/analytics.tsx +34 -0
  380. package/docs/consumer-skill/examples/app-layout.tsx +42 -12
  381. package/docs/consumer-skill/examples/detail.tsx +20 -4
  382. package/docs/consumer-skill/examples/manifest.json +13 -1
  383. package/docs/consumer-skill/examples/website.tsx +56 -0
  384. package/docs/consumer-skill/references/analytics.md +70 -0
  385. package/docs/consumer-skill/references/composition.md +116 -2
  386. package/docs/consumer-skill/references/design-contract.md +33 -7
  387. package/docs/consumer-skill/references/discovery.md +76 -5
  388. package/docs/consumer-skill/references/integration.md +14 -0
  389. package/docs/consumer-skill/references/public-api.json +2023 -218
  390. package/docs/consumer-skill/references/review.md +55 -3
  391. package/docs/consumer-skill/references/theming.md +52 -7
  392. package/docs/consumer-skill/references/tokens.json +177 -9
  393. package/docs/consumer-skill/references/workflows.md +32 -0
  394. package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
  395. package/docs/consumer-skill/scripts/composition-policy.mjs +179 -17
  396. package/docs/consumer-skill/scripts/discovery.mjs +61 -9
  397. package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
  398. package/package.json +7 -4
  399. package/dist/accordion-B-5Focs8.js.map +0 -1
  400. package/dist/action-menu-Cx3SdfbN.js.map +0 -1
  401. package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
  402. package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
  403. package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
  404. package/dist/app-shell-at8Kt4l_.js.map +0 -1
  405. package/dist/auth-OFwWSAap.js +0 -704
  406. package/dist/auth-OFwWSAap.js.map +0 -1
  407. package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
  408. package/dist/button-BS6l5JUw.js.map +0 -1
  409. package/dist/buttons-Co6GavvM.js +0 -674
  410. package/dist/buttons-Co6GavvM.js.map +0 -1
  411. package/dist/chart-DVfcwQu6.js +0 -149
  412. package/dist/chart-DVfcwQu6.js.map +0 -1
  413. package/dist/checkbox-BavDRjF7.js.map +0 -1
  414. package/dist/choice-inputs-CC7XqPQO.js +0 -619
  415. package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
  416. package/dist/code-block-xHKbAJDj.js.map +0 -1
  417. package/dist/combobox-DEbdr-3u.js.map +0 -1
  418. package/dist/combobox-xv3yJbzl.js.map +0 -1
  419. package/dist/command-C0xe7u9B.js.map +0 -1
  420. package/dist/comments-DviPLnwy.js +0 -1132
  421. package/dist/comments-DviPLnwy.js.map +0 -1
  422. package/dist/containers-6s-ucRQQ.js.map +0 -1
  423. package/dist/data-display-cWIRdeaf.js.map +0 -1
  424. package/dist/date-picker-CA6ogMQB.js.map +0 -1
  425. package/dist/date-pickers-BPIKLdsD.js +0 -224
  426. package/dist/date-pickers-BPIKLdsD.js.map +0 -1
  427. package/dist/feedback-DWUkgEjR.js.map +0 -1
  428. package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
  429. package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
  430. package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
  431. package/dist/filters-BhsUtsxW.js.map +0 -1
  432. package/dist/form-field-Bn7ZH1rA.js.map +0 -1
  433. package/dist/form-sizing-BWs70_a2.js.map +0 -1
  434. package/dist/forms-numeric-BUBxELBv.js +0 -867
  435. package/dist/forms-numeric-BUBxELBv.js.map +0 -1
  436. package/dist/header-C59QZyxV.js.map +0 -1
  437. package/dist/http-CLTVJc5I.js.map +0 -1
  438. package/dist/input-WwYQZJzG.js +0 -202
  439. package/dist/input-WwYQZJzG.js.map +0 -1
  440. package/dist/input-ci9fIgFH.js +0 -20
  441. package/dist/input-ci9fIgFH.js.map +0 -1
  442. package/dist/item-pJ0GsOiJ.js.map +0 -1
  443. package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
  444. package/dist/message-COsdEvXT.js +0 -108
  445. package/dist/message-COsdEvXT.js.map +0 -1
  446. package/dist/navigation-BUIn2Qxx.js.map +0 -1
  447. package/dist/navigation-DBEu4POU.js.map +0 -1
  448. package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
  449. package/dist/overlays-B11wZka6.js +0 -982
  450. package/dist/overlays-B11wZka6.js.map +0 -1
  451. package/dist/page-BV6ioQg3.js.map +0 -1
  452. package/dist/page-header-DQRa0jug.js.map +0 -1
  453. package/dist/pagination-C29vvt3I.js.map +0 -1
  454. package/dist/popover-CoLDEg19.js.map +0 -1
  455. package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
  456. package/dist/primitives-DKPOGVpj.js.map +0 -1
  457. package/dist/progress-BOe8l_FZ.js.map +0 -1
  458. package/dist/rich-text-editor-CoVrTiSv.js +0 -575
  459. package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
  460. package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
  461. package/dist/scroll-area-BheMQ270.js.map +0 -1
  462. package/dist/select-B2mb-qN2.js +0 -108
  463. package/dist/select-B2mb-qN2.js.map +0 -1
  464. package/dist/sheet-B-q914Ad.js.map +0 -1
  465. package/dist/sidebar-C_2p3Tfj.js.map +0 -1
  466. package/dist/sidebar-DPR7fmqN.js.map +0 -1
  467. package/dist/smart-card-CYLn46e6.js.map +0 -1
  468. package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
  469. package/dist/table-BS39xnlq.js +0 -1424
  470. package/dist/table-BS39xnlq.js.map +0 -1
  471. package/dist/table-DnlAJ-xR.js.map +0 -1
  472. package/dist/tabs-B5cNMWiP.js +0 -187
  473. package/dist/tabs-B5cNMWiP.js.map +0 -1
  474. package/dist/text-inputs-Dh9XGyiS.js +0 -331
  475. package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
  476. package/dist/text.styles-BwB7vAF2.js.map +0 -1
  477. package/dist/timelines-B9ICkQcV.js.map +0 -1
  478. package/dist/typography-Cv8MT-82.js +0 -96
  479. package/dist/typography-Cv8MT-82.js.map +0 -1
  480. package/dist/ui-provider-CftIB6TY.js.map +0 -1
  481. package/dist/upload-D8Za5x_c.js.map +0 -1
  482. package/dist/upload-queue-hIIYBLS7.js.map +0 -1
  483. package/dist/usage-card-DnmnJ58D.js.map +0 -1
  484. package/dist/utils-C2EKeIw3.js +0 -72
  485. package/dist/utils-C2EKeIw3.js.map +0 -1
  486. package/dist/value-inputs-DX2dbxjj.js +0 -824
  487. package/dist/value-inputs-DX2dbxjj.js.map +0 -1
  488. package/dist/workspace-C1PZmk8L.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"overlays-B11wZka6.js","names":["Dialog","DialogPrimitive","DialogTrigger","DialogClose","DialogContent","Button","DialogHeader","DialogFooter","DialogTitle","DialogDescription","isSimpleText","Dialog","DialogPrimitive","React","DialogTriggerPrimitive","DialogClosePrimitive","DialogContentPrimitive","DialogHeaderPrimitive","DialogFooterPrimitive","DialogTitlePrimitive","DialogDescriptionPrimitive","TONE_STYLES","BaseDialog","AlertDialog","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogMedia","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","Button","AlertDialogCancel","AlertDialog","AlertDialogPrimitive","React","AlertDialogTriggerPrimitive","AlertDialogContentPrimitive","AlertDialogHeaderPrimitive","AlertDialogFooterPrimitive","AlertDialogTitlePrimitive","AlertDialogDescriptionPrimitive","AlertDialogMediaPrimitive","AlertDialogActionPrimitive","AlertDialogCancelPrimitive","BaseAlertDialog","useThemePortalContainer","cn","SheetDescription","SheetTitle","SheetContent","SheetTrigger","SheetBody","SheetFooter","SheetClose","SheetHeader","Sheet","overlayAnatomyRecipes","Button","Text","motionRecipes","Slot","Button$1","Stack","Alert","AlertDescription","surfaceDividerRecipes","modalRegionRecipes","modalBackdropRecipe","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","Dialog$1","DialogTrigger","DialogClose","DialogContent","DialogHeader","textGap","DialogBody","DialogFooter","DialogTitle","DialogDescription","defaultOverlayStrings","defaultAlertDialogStrings","useOverlayActions","strings","useStrings","customStrings","isExecuting","setIsExecuting","useState","handleConfirm","useCallback","onConfirm","closeDialog","onAsyncConfirm","closeOnAsyncComplete","error","onError","handleCancel","onCancel","handleFormSubmit","formId","form","useMemo","emphasis","tone","confirmTone","loading","resolveOpenValue","nextOpen","currentOpen","normalizeGroupState","result","key","keys","state","hasGroupStateChanged","previous","next","useOverlayVisibility","controlledOpen","internalOpen","setInternalOpen","defaultOpen","isControlled","open","openRef","useRef","setOpen","resolvedOpen","changed","onOpenChange","onOpen","onClose","useOverlayVisibilityGroup","keyList","stateRef","setKeyOpen","previousState","nextState","closeOthersOnOpen","item","SIZE_CLASSES","TONE_STYLES$1","HelpCircle","AlertCircle","AlertTriangle","Info","CheckCircle","ActionDialogImpl","visibility","toneStyles","hasContent","alertMessage","hasFooter","showCancel","showConfirm","footer","closeOnBackdropClick","details","closeOnEscape","trigger","isValidElement","surfaceStyle","initialFocusRef","title","size","X","description","visuallyHideHeader","showIcon","contentClassName","finalConfirmTone","confirmStyle","confirmButtonOnClick","effectiveLoading","ActionDialog","memo","WIDTH_CLASSES","TONE_ICONS","ActionDrawerImpl","isHorizontal","direction","showFooter","modal","width","ActionDrawer","AlertDialog$2","AlertDialog","AlertDialogTrigger$1","AlertDialogPortal","AlertDialogOverlay","AlertDialogContent$1","AlertDialogHeader$1","AlertDialogFooter$1","AlertDialogMedia$1","AlertDialogTitle$1","AlertDialogDescription$1","AlertDialogAction$1","AlertDialogCancel$1","isSimpleText","AlertDialog$1","AlertDialogTrigger","AlertDialogContent","AlertDialogHeader","AlertDialogBody","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogMedia","AlertDialogAction","AlertDialogCancel","TONE_STYLES","ConfirmDialogImpl","mergedStrings","resolvedConfirmTone","destructive","resolvedTone","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/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":["import { overlayAnatomyRecipes } from '../../lib/overlay-anatomy-recipes';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { modalBackdropRecipe } from './overlay.recipes';\n\"use client\"\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 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-6 rounded-xl p-6 text-sm ring-1 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(\"gap-2 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 \"gap-2 flex flex-col-reverse gap-2 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 — structured base wrapper around the shadcn dialog primitive.\n *\n * Primitive state and composition props pass through unchanged. The package\n * wrapper supplies deliberate modal anatomy: separated header and footer,\n * a scroll-owning body, tokenized spacing, and stable BEM hooks.\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 { 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\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 stays flush so its separated regions can each own the\n\t\t\t\t// same default p-surface inset without stacking padding.\n\t\t\t\t'dialog-content--component flex max-h-[min(90vh,48rem)] flex-col gap-0 overflow-hidden rounded-radius bg-background p-0 text-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\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 fixed 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\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\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', 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', 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, 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. Library DEV-logs the error;\n\t * consumer wires telemetry. */\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\n\tconst handleConfirm = useCallback(async () => {\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\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\tif (import.meta.env?.DEV) {\n\t\t\t\t\tconsole.error('Overlay async confirm failed:', error);\n\t\t\t\t}\n\t\t\t\tonError?.(error);\n\t\t\t} finally {\n\t\t\t\tsetIsExecuting(false);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tcloseDialog();\n\t}, [onConfirm, onAsyncConfirm, closeOnAsyncComplete, closeDialog, onError]);\n\n\tconst handleCancel = useCallback(() => {\n\t\tonCancel?.();\n\t\tcloseDialog();\n\t}, [onCancel, closeDialog]);\n\n\tconst handleFormSubmit = useCallback(async () => {\n\t\tif (!formId) {\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]);\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\topen: boolean;\n\t/** Fired when a change is opened. */\n\tonOpenChange: (open: boolean) => void;\n}\n\nexport interface UseOverlayVisibilityOptions {\n\tdefaultOpen?: boolean;\n\topen?: boolean;\n\t/** Fired when a change is opened. */\n\tonOpenChange?: (open: boolean) => void;\n\t/** Fired when an entry is opened. */\n\tonOpen?: () => void;\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\tdefaultOpen?: Partial<Record<TKey, boolean>>;\n\topen?: Partial<Record<TKey, boolean>>;\n\t/** Fired when a change is opened. */\n\tonOpenChange?: (\n\t\tkey: TKey,\n\t\topen: boolean,\n\t\tstate: OverlayVisibilityGroupState<TKey>,\n\t) => void;\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 { overlayAnatomyRecipes } from '../../../lib/overlay-anatomy-recipes';\nimport {\n\tAlertCircle,\n\tAlertTriangle,\n\tCheckCircle,\n\tHelpCircle,\n\tInfo,\n\tX,\n} from 'lucide-react';\nimport { isValidElement, memo, type ReactNode } 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 { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport type { ActionDialogProps, OverlaySize, OverlayTone } from './overlays.types';\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\nconst TONE_STYLES: Record<OverlayTone, { icon: ReactNode; classes: string }> = {\n\tneutral: {\n\t\ticon: <HelpCircle className=\"size-icon text-muted-foreground\" />,\n\t\tclasses: '',\n\t},\n\tdestructive: {\n\t\ticon: <AlertCircle className=\"size-icon text-destructive\" />,\n\t\tclasses: 'border-destructive/50',\n\t},\n\twarning: {\n\t\ticon: <AlertTriangle className=\"size-icon text-warning\" />,\n\t\tclasses: 'border-warning/50',\n\t},\n\tinfo: {\n\t\ticon: <Info className=\"size-icon text-info\" />,\n\t\tclasses: 'border-info/50',\n\t},\n\tsuccess: {\n\t\ticon: <CheckCircle className=\"size-icon text-success\" />,\n\t\tclasses: 'border-success/50',\n\t},\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}: ActionDialogProps) {\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 toneStyles = TONE_STYLES[tone];\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={!closeOnBackdropClick}\n\t\t\tonOpenChange={(nextOpen, details) => {\n\t\t\t\tif (!nextOpen && 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 className=\"overlay-trigger--fallback cursor-pointer\">\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"text-inherit\">\n\t\t\t\t\t\t{trigger}\n\t\t\t\t\t</Text>\n\t\t\t\t</DialogTrigger>\n\t\t\t))}\n\n\t\t\t<DialogContent\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\temphasis && toneStyles.classes,\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{!!showCloseButton && (\n\t\t\t\t<DialogClose\n\t\t\t\t\trender={(\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\tdata-overlay-close=\"\"\n className={cn(overlayAnatomyRecipes.close, 'z-10 p-0 text-muted-foreground hover:bg-muted hover:text-foreground')}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<X className=\"size-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t\taria-label={strings.close}\n\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{!!(title || description) && (\n\t\t\t\t\t<DialogHeader className={cn('dialog--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 && <span className=\"shrink-0 pt-space-2xs\">{toneStyles.icon}</span>}\n\t\t\t\t\t\t\t<Stack gap=\"normal\" className=\"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 p-surface-xs\">\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=\"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}>\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\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\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\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 {\n\tAlertCircle,\n\tAlertTriangle,\n\tCheckCircle,\n\tHelpCircle,\n\tInfo,\n\tX,\n} from 'lucide-react';\nimport { isValidElement, memo, type ReactNode } 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';\nimport { Stack } from '../../base/structure';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport type { ActionDrawerProps, OverlaySize, OverlayTone } from './overlays.types';\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\nconst TONE_ICONS: Record<OverlayTone, ReactNode> = {\n\tneutral: <HelpCircle className=\"size-icon text-muted-foreground\" />,\n\tdestructive: <AlertCircle className=\"size-icon text-destructive\" />,\n\twarning: <AlertTriangle className=\"size-icon text-warning\" />,\n\tinfo: <Info className=\"size-icon text-info\" />,\n\tsuccess: <CheckCircle className=\"size-icon text-success\" />,\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\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 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\tdisablePointerDismissal={!closeOnBackdropClick}\n\t\t\tonOpenChange={(nextOpen, details) => {\n\t\t\t\tif (!nextOpen && 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 className=\"overlay-trigger--fallback cursor-pointer\">\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"text-inherit\">{trigger}</Text>\n\t\t\t\t</SheetTrigger>\n\t\t\t))}\n\n\t\t\t<SheetContent\n\t\t\t\tside={direction}\n\t\t\t\tshowCloseButton={false}\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{showCloseButton && <SheetClose\n\t\t\t\t\trender={(\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\tdata-overlay-close=\"\"\n className={cn(overlayAnatomyRecipes.close, 'z-10 p-0 text-muted-foreground hover:bg-muted hover:text-foreground')}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<X className=\"size-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t\taria-label={strings.close}\n\t\t\t\t/>}\n\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 && <span className=\"shrink-0 pt-space-2xs\">{TONE_ICONS[tone]}</span>}\n\t\t\t\t\t\t\t<Stack gap=\"normal\" className=\"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 p-surface-xs\">\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}>\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\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\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\t\t\t</SheetContent>\n\t\t</Sheet>\n\t);\n}\n\nexport const ActionDrawer = memo(ActionDrawerImpl);\nActionDrawer.displayName = 'ActionDrawer';\n","import { motionRecipes } from '../../lib/motion-recipes';\nimport { modalBackdropRecipe } from './overlay.recipes';\n\"use client\"\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 -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-popover-foreground shadow-xl ring-1 ring-foreground/5 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md dark:ring-foreground/10\",\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 gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 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 gap-2 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-balance text-muted-foreground md:text-pretty *:[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 } from '../../../lib/surface-recipes';\nimport type { TextGap } from '../structure';\n/**\n * AlertDialog — structured base wrapper around the shadcn alert-dialog\n * primitive. Higher-level confirmation recipes belong in features/overlays.\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\tAlertDialogHeader as AlertDialogHeaderPrimitive,\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 { 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\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'alert-dialog-content--component max-h-[min(90vh,48rem)] gap-0 overflow-hidden rounded-radius bg-background p-0 text-foreground ring-border/70 sm:max-w-md',\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.ComponentPropsWithoutRef<typeof AlertDialogHeaderPrimitive> & { textGap?: TextGap }\n>(function AlertDialogHeader({ className, textGap = 'normal', ...props }, ref) {\n\treturn (\n\t\t<AlertDialogHeaderPrimitive\n\t\t\tref={ref}\n\t\t\tclassName={cn('alert-dialog-header--component p-surface text-center', textGap === 'dense' ? 'gap-dense' : 'gap-normal', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\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\tclassName={cn('alert-dialog-body--component min-h-0 flex-1 overflow-y-auto p-surface', 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\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', 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', 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 { AlertCircle, AlertTriangle, CheckCircle, HelpCircle, Info } from 'lucide-react';\nimport { isValidElement, memo, useMemo, type ReactNode } 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 { Text } from '../../typography';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { useOverlayActions, useOverlayVisibility } from './hooks';\nimport { defaultAlertDialogStrings } from './overlays.strings';\nimport type { ConfirmDialogProps, OverlayTone } from './overlays.types';\n\nconst TONE_STYLES: Record<OverlayTone, { icon: ReactNode; iconColor: string; background: string }> = {\n\tneutral: {\n\t\ticon: <HelpCircle className=\"size-icon-lg\" />,\n\t\ticonColor: 'text-muted-foreground',\n\t\tbackground: 'bg-muted',\n\t},\n\tdestructive: {\n\t\ticon: <AlertCircle className=\"size-icon-lg\" />,\n\t\ticonColor: 'text-destructive',\n\t\tbackground: 'bg-destructive/10',\n\t},\n\twarning: {\n\t\ticon: <AlertTriangle className=\"size-icon-lg\" />,\n\t\ticonColor: 'text-warning',\n\t\tbackground: 'bg-warning/15',\n\t},\n\tinfo: {\n\t\ticon: <Info className=\"size-icon-lg\" />,\n\t\ticonColor: 'text-info',\n\t\tbackground: 'bg-info/15',\n\t},\n\tsuccess: {\n\t\ticon: <CheckCircle className=\"size-icon-lg\" />,\n\t\ticonColor: 'text-success',\n\t\tbackground: 'bg-success/15',\n\t},\n};\n\nfunction ConfirmDialogImpl({\n\topen,\n\tonOpenChange,\n\tonClose,\n\tchildren,\n\ttitle,\n\tdescription,\n\tvisuallyHideHeader = false,\n\tclassName,\n\tcontentClassName,\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 = true,\n\talertMessage,\n\ttrigger,\n\tdestructive = false,\n}: ConfirmDialogProps) {\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 toneStyles = TONE_STYLES[resolvedTone];\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 && 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 className=\"overlay-trigger--fallback cursor-pointer\">\n\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" className=\"text-inherit\">{trigger}</Text>\n\t\t\t\t</AlertDialogTrigger>\n\t\t\t))}\n\n\t\t\t<AlertDialogContent\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<AlertDialogBody className=\"alert-dialog--body\">\n\t\t\t\t\t{!!showIcon && !visuallyHideHeader && (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'mx-auto mb-space-md flex size-avatar-lg items-center justify-center rounded-full',\n\t\t\t\t\t\t\t\ttoneStyles.background,\n\t\t\t\t\t\t\t\ttoneStyles.iconColor,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{toneStyles.icon}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{!!(title || description) && (\n\t\t\t\t\t\t<AlertDialogHeader className={cn('p-0', visuallyHideHeader && 'sr-only')}>\n\t\t\t\t\t\t\t{!!title && <AlertDialogTitle>{title}</AlertDialogTitle>}\n\t\t\t\t\t\t\t{!!description && <AlertDialogDescription>{description}</AlertDialogDescription>}\n\t\t\t\t\t\t</AlertDialogHeader>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{!!alertMessage && (\n\t\t\t\t\t\t<Alert tone={resolvedTone} className=\"mt-space-md p-surface-xs text-left\">\n\t\t\t\t\t\t\t<AlertDescription>{alertMessage}</AlertDescription>\n\t\t\t\t\t\t</Alert>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{!!children && <div className={cn('mt-space-md', contentClassName)}>{children}</div>}\n\t\t\t\t</AlertDialogBody>\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=\"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}>\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\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\tloading={effectiveLoading}\n\t\t\t\t\t\t\t\t\t\tstrings={{ loading: strings.loading }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{strings.confirm}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</AlertDialogFooter>\n\t\t\t\t)}\n\t\t\t</AlertDialogContent>\n\t\t</BaseAlertDialog>\n\t);\n}\n\nexport const ConfirmDialog = memo(ConfirmDialogImpl);\nConfirmDialog.displayName = 'ConfirmDialog';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeA,SAASA,EAAO,EAAE,GAAGyE,KAAqC;CACxD,OAAO,kBAACxE,EAAgB,MAAjB;EAAsB,aAAU;EAAS,OAAM;EAAa,GAAIwE;CAAQ,CAAA;AACjF;AAEA,SAASvE,EAAc,EACrB,aAAU,IACV,GAAGuE,KACqD;CACxD,IAAMG,IAAaC,IAAU,kBAACd,GAAD,CAAO,CAAA,IAAI,KAAA;CAExC,OACE,kBAAC9D,EAAgB,SAAjB;EACE,aAAU;EACV,QAAQ2E;EACR,GAAIH;CACL,CAAA;AAEL;AAEA,SAASK,EAAa,EAAE,cAAW,GAAGL,KAAuC;CAC3E,IAAMM,IAAoB/B,EAAwBgC,CAAS;CAC3D,OAAO,kBAAC/E,EAAgB,QAAjB;EAAwB,WAAW8E;EAAmB,aAAU;EAAgB,GAAIN;CAAQ,CAAA;AACrG;AAEA,SAAStE,EAAY,EAAE,GAAGsE,KAAsC;CAC9D,OAAO,kBAACxE,EAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAIwE;CAAQ,CAAA;AACrE;AAEA,SAASS,EAAc,EACrB,cACA,GAAGT,KAC8B;CACjC,OACE,kBAACxE,EAAgB,UAAjB;EACE,aAAU;EACV,WAAWgD,EAAGqB,GAAqBR,EAAc,UAAU,WAAWqB,CAAS;EAC/E,GAAIV;CACL,CAAA;AAEL;AAEA,SAASrE,EAAc,EACrB,cACA,cACA,aACA,qBAAkB,IAClB,GAAGqE,KAGqC;CACxC,IAAMM,IAAoB/B,EAAwBgC,CAAS;CAC3D,OACE,kBAACF,GAAD;EAAc,WAAWC;EAAzB,UAAA,CACE,kBAACG,GAAD,CAAgB,CAAA,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C,SAAQ;KACR,WAAU;KALX,UAAA,CAOE,CAAC,CAACiH,KACF,kBAACtH,GAAD;MAAQ,MAAK;MAAS,MAAK;MAAY,aAAY;MAAU,SAAS6D;MACpE,UAAAd,EAAQ;KACF,CAAA,GAER,CAAC,CAACwE,KACF,kBAACvH,GAAD;MACC,MAAK;MACT,MAAMkL;MACF,aAAa1C;MACb,SAASC;MACT,SAASC;MACT,SAAS,EAAE,SAAS3F,EAAQ,QAAQ;MAEnC,UAAAA,EAAQ;KACF,CAAA,CAEH;;GAEU,CAAA,CAED;EACJ,CAAA,CAAA;;AAEnB;AAEA,IAAasI,KAAgBzC,EAAKoC,EAAiB;AACnD,GAAc,cAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-BV6ioQg3.js","names":["_Fragment","buttonVariants","Button","Stack","ActionMenu","ActionButtons","Separator","PageHeading","useLayoutLinkRenderer","Container","Fragment$1","PageHeader","TitleIcon","resolvedRenderLink","defaultBack","backHref","onBack","backLabel","cn","ArrowLeft","titleIconNode","icon","iconClassName","titleIconClassName","titleIconHref","onTitleIconClick","titleIconLabel","slots","titleBadges","actions","className","contentClassName","titleClassName","descriptionClassName","actionsClassName","Page","forwardRef","containerProps","bodyClassName","bodyProps","slotProps","header","renderLink","children","defaultPageActionsStrings","PAGE_ACTIONS_MENU_CLASS","DEFAULT_MAX_INLINE_ACTIONS","toActionMenuAction","context","contextBase","disabled","action","index","renderAction","PageActions","stringsProp","strings","useStrings","filtered","useMemo","isNarrow","setIsNarrow","useState","useEffect","display","check","breakpoint","inlineContextBase","renderActionLink","props","inlineClass","inlineClassName","menuContentClass","menuClassName","dropdownActions","entry","MoreHorizontal","inlineLimit","maxInlineActions","inlineCandidates","inline","menu","inlineActions","menuActions"],"sources":["../src/components/layout/page/partials/page-header.tsx","../src/components/layout/page/page.tsx","../src/components/layout/page/page.types.ts","../src/components/layout/page/partials/page-actions.tsx"],"sourcesContent":["/**\n * PageHeader — page title, back control, title badges, and actions.\n *\n * Navigation goes through `renderLink`; consumer apps wire framework links at\n * the boundary. Slots let consumers replace any structural region without\n * forking the page wrapper.\n */\nimport { ArrowLeft } from 'lucide-react';\n\nimport { Button } from '../../../base/buttons';\nimport { Separator } from '../../../base/display/separator';\nimport { PageHeading } from '../../../base/navigation/page-header';\nimport { buttonVariants } from '../../../base/buttons/button.variants';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport type { PageHeaderProps } from '../page.types';\n\nexport function PageHeader({\n\ttitle,\n\tdescription,\n\ttextGap,\n\theadingTag = 'h3',\n\ttitleIcon: TitleIcon,\n\ttitleIconHref,\n\tonTitleIconClick,\n\ttitleIconLabel = 'Open title link',\n\tbackHref,\n\tonBack,\n\tbackLabel = 'Back',\n\ttitleBadges = [],\n\tactions,\n\tslots,\n\trenderLink,\n\tclassName,\n\tcontentClassName,\n\tactionsClassName,\n\ttitleClassName,\n\ttitleIconClassName,\n\tdescriptionClassName,\n}: PageHeaderProps) {\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\tconst hasBack = !!backHref || !!onBack;\n\n\tconst defaultBack = hasBack ? (\n\t\t<div className=\"flex items-center gap-space-sm shrink-0\">\n\t\t\t{backHref && !onBack ? (\n\t\t\t\tresolvedRenderLink({\n\t\t\t\t\thref: backHref,\n\t\t\t\t\t'aria-label': backLabel,\n\t\t\t\t\tclassName: cn('page-header--back-link', buttonVariants({tone:'secondary',buttonStyle:'ghost',size:'sm',iconOnly:true})),\n\t\t\t\t\tchildren: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ArrowLeft className=\"size-icon rtl:rotate-180\" aria-hidden=\"true\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t})\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\tclassName=\"page-header--back-button\"\n\t\t\t\t\tonClick={onBack}\n\t\t\t\t\taria-label={backLabel}\n\t\t\t\t>\n\t\t\t\t\t<ArrowLeft className=\"size-icon rtl:rotate-180\" aria-hidden=\"true\" />\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t\t<Separator orientation=\"vertical\" className=\"h-action-sm\" />\n\t\t</div>\n\t) : null;\n\tconst titleIconNode = (() => {\n\t\tif (!TitleIcon) return null;\n\n\t\tconst icon = <TitleIcon className=\"size-icon\" aria-hidden=\"true\" />;\n\t\tconst iconClassName = cn(\n\t\t\t'page-header--title-icon flex size-icon shrink-0 items-center justify-center text-muted-foreground',\n\t\t\ttitleIconClassName,\n\t\t);\n\n\t\tif (titleIconHref && !onTitleIconClick) {\n\t\t\treturn resolvedRenderLink({\n\t\t\t\thref: titleIconHref,\n\t\t\t\t'aria-label': titleIconLabel,\n\t\t\t\tclassName: cn(\n\t\t\t\t\t'page-header--title-icon-link',\n\t\t\t\t\tbuttonVariants({tone:'secondary',buttonStyle:'ghost',size:'sm',iconOnly:true}),\n\t\t\t\t\ttitleIconClassName,\n\t\t\t\t),\n\t\t\t\tchildren: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{icon}\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\n\t\tif (onTitleIconClick) {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\tclassName={cn('page-header--title-icon-button', titleIconClassName)}\n\t\t\t\t\tonClick={onTitleIconClick}\n\t\t\t\t\taria-label={titleIconLabel}\n\t\t\t\t>\n\t\t\t\t\t{icon}\n\t\t\t\t</Button>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<span aria-hidden=\"true\" className={iconClassName}>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t);\n\t})();\n\n\treturn (\n\t\t<PageHeading\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\ttextGap={textGap}\n\t\t\theadingTag={headingTag}\n\t\t\tleading={slots?.back ?? defaultBack}\n\t\t\tbeforeTitle={slots?.beforeTitle}\n\t\t\ttitlePrefix={titleIconNode}\n\t\t\tbadges={titleBadges}\n\t\t\tactions={slots?.actions ?? actions}\n\t\t\tafterDescription={slots?.afterDescription}\n\t\t\twithSeparator={false}\n\t\t\tclassName={cn('layout-page-header--component', className)}\n\t\t\tcontentClassName={cn('max-w-none', contentClassName)}\n\t\t\ttitleClassName={cn('text-base', titleClassName)}\n\t\t\ttitleRowClassName=\"gap-space-md\"\n\t\t\tdescriptionClassName={cn('text-sm', descriptionClassName)}\n\t\t\tactionsClassName={cn('shrink-0 self-end sm:self-auto', actionsClassName)}\n\t\t/>\n\t);\n}\n","import { Stack } from '../../base/structure';\nimport { Container } from '../containers';\nimport { cn } from '../../../lib/utils';\nimport { forwardRef } from 'react';\n\nimport type { PageProps } from './page.types';\nimport { PageHeader } from './partials/page-header';\n\n/** Page — non-scrolling Container, PageHeader, and body-rhythm composition. */\nexport const Page = forwardRef<HTMLDivElement, PageProps>(function Page({\n\t\theader,\n\t\tchildren,\n\t\tslotProps,\n\t\trenderLink,\n\t\tmaxWidth = 'lg',\n\t\tgutter,\n\t\tclassName,\n\t\trender,\n\t\t...containerProps\n\t}, ref) {\n\tconst { className: bodyClassName, ...bodyProps } = slotProps?.body ?? {};\n\n\treturn (\n\t\t<Container\n\t\t\t{...containerProps}\n\t\t\tref={ref}\n\t\t\trender={render}\n\t\t\tmaxWidth={maxWidth}\n\t\t\tgutter={gutter}\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<Stack gap=\"2xl\" className=\"page--component\">\n\t\t\t\t{header ? (\n\t\t\t\t\t<PageHeader\n\t\t\t\t\t\t{...header}\n\t\t\t\t\t\trenderLink={header.renderLink ?? renderLink}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t{children !== undefined && children !== null ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\t{...bodyProps}\n\t\t\t\t\t\tdata-slot=\"page-body\"\n\t\t\t\t\t\tclassName={cn('page--body relative block min-w-0 w-full', bodyClassName)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</Stack>\n\t\t</Container>\n\t);\n});\n\nPage.displayName = 'Page';\n","/**\n * Page-level types for `Page`, `PageHeader`, `PageActions`, and exported\n * partials. All navigation is framework-neutral via `renderLink`.\n */\nimport type { ComponentType, JSX, Key, ReactNode } from 'react';\n\nimport type {\n\tLayoutLinkRenderer,\n\tLayoutNavigationAdapter,\n\tLayoutSlotAttributes,\n} from '../layout.types';\nimport type { TextGap } from '../../base/structure';\nimport type { ButtonSize } from '../../base/buttons';\nimport type { HeadingTag } from '../../typography';\nimport type { ContainerMaxWidth, ContainerProps } from '../containers/containers.types';\nimport type { StringsProp } from '../../../lib/strings';\nimport type { BadgeTone } from '../../base/badge';\nimport type { ActionPresentation } from '../../../lib/action-presentation';\n\nexport interface PageTitleBadge {\n\t/** Display label. */\n\tlabel: ReactNode;\n\t/** Semantic color intent. */\n\ttone?: BadgeTone;\n\tkey?: Key;\n}\n\nexport interface PageHeaderSlots {\n\t/** Replaces the leading back control entirely. */\n\tback?: ReactNode;\n\t/** Additional content before the title line. */\n\tbeforeTitle?: ReactNode;\n\t/** Additional content after the description. */\n\tafterDescription?: ReactNode;\n\t/** Replaces the trailing actions region. */\n\tactions?: ReactNode;\n}\n\nexport interface PageHeaderProps extends LayoutNavigationAdapter {\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Supporting copy under the title. */\n\tdescription?: ReactNode;\n\t/** Shared title/description rhythm. Defaults to normal. */\n\ttextGap?: TextGap;\n\t/** Semantic heading level for the title. Defaults to `h3` for nested app pages. */\n\theadingTag?: HeadingTag;\n\t/** Optional decorative icon rendered before the title. Pass a Lucide icon component. */\n\ttitleIcon?: ComponentType<{ className?: string }>;\n\t/** Optional link target for the title icon. Uses the same framework-neutral renderer as `backHref`. */\n\ttitleIconHref?: string;\n\t/** Optional click handler for the title icon when it should behave like an action. */\n\tonTitleIconClick?: () => void;\n\t/** Accessible label for linked/clickable title icons. */\n\ttitleIconLabel?: string;\n\t/** Destination for the back control. */\n\tbackHref?: string;\n\tonBack?: () => void;\n\t/** Copy for the back control. */\n\tbackLabel?: string;\n\t/** Chips shown beside the page title. */\n\ttitleBadges?: PageTitleBadge[];\n\t/** Controls offered on the surface. */\n\tactions?: ReactNode;\n\t/** Replaces individual regions of the shell. */\n\tslots?: PageHeaderSlots;\n\tclassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\tactionsClassName?: string;\n\ttitleClassName?: string;\n\ttitleIconClassName?: string;\n\tdescriptionClassName?: string;\n}\n\nexport interface PageActionContext {\n\tindex: number;\n\tisInline: boolean;\n\trenderLink: LayoutLinkRenderer;\n}\n\nexport interface PageAction extends ActionPresentation {\n\tid?: string;\n\t/** Display label. */\n\tlabel: ReactNode;\n\tonClick?: () => void;\n\t/** Destination for the entry, when it navigates. */\n\thref?: string;\n\ttarget?: string;\n\trel?: string;\n\texternal?: boolean;\n\t/** Shows the pending indicator. */\n\tloading?: boolean;\n\t/** Leading glyph. */\n\ticon?: ComponentType<{ className?: string }>;\n\t/** Optional inline button size. Defaults to the PageActions `size` prop. */\n\tsize?: ButtonSize;\n\tgroup?: string;\n\tplacement?: 'auto' | 'inline' | 'menu';\n\t/** Escape hatch for one action only. Prefer `renderAction` for consistent customization. */\n\telement?: ReactNode | JSX.Element;\n}\n\nexport type PageActionsDisplay = 'flat' | 'dropdown' | 'auto';\n\nexport interface PageActionsStrings {\n\tmenuLabel: string;\n}\n\nexport const defaultPageActionsStrings: PageActionsStrings = {\n\tmenuLabel: 'Page actions',\n};\n\nexport interface PageActionsProps extends LayoutNavigationAdapter {\n\t/** Controls offered on the surface. */\n\tactions?: PageAction[];\n\t/** How actions are presented — inline, menu, or responsive. */\n\tdisplay?: PageActionsDisplay;\n\t/** Inline action button scale. Defaults to `sm`; set `md` for normal page-header buttons. */\n\tsize?: ButtonSize;\n\t/** Width at which responsive actions collapse into a menu. */\n\tbreakpoint?: number;\n\t/**\n\t * Maximum non-menu actions rendered inline before overflow moves them into\n\t * the dropdown menu. Defaults to 4 for admin header density.\n\t */\n\tmaxInlineActions?: number;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<PageActionsStrings>;\n\tclassName?: string;\n\t/** Merged onto the inline action row. */\n\tinlineClassName?: string;\n\t/** Merged onto the action menu. */\n\tmenuClassName?: string;\n\t/** Replaces the default action rendering. */\n\trenderAction?: (action: PageAction, context: PageActionContext) => ReactNode;\n}\n\nexport interface PageSlotProps {\n\t/** Native attributes merged onto the page body region. */\n\tbody?: LayoutSlotAttributes<HTMLDivElement>;\n}\n\nexport interface PageProps\n\textends LayoutNavigationAdapter, Omit<ContainerProps, 'children'> {\n\t/** Header region of the shell. */\n\theader?: PageHeaderProps;\n\t/** Maximum content width. Defaults to `lg` for readable page composition. */\n\tmaxWidth?: ContainerMaxWidth;\n\tchildren?: ReactNode;\n\t/** Native attributes for stable page regions. */\n\tslotProps?: PageSlotProps;\n}\n","/**\n * PageActions — composable action ribbon for page headers.\n *\n * Links go through `renderLink`, never router imports or DOM click hacks.\n * Use `renderAction` for app-specific rendering while keeping grouping,\n * filtering, breakpoint, and menu placement logic centralized.\n */\nimport { useEffect, useMemo, useState, type ReactElement } from 'react';\nimport { MoreHorizontal } from 'lucide-react';\n\nimport {\n\tActionButtons,\n\tActionMenu,\n\ttype ActionMenuAction,\n\ttype ActionMenuLinkRenderProps,\n} from '../../../base/action-menu';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport {\n\tdefaultPageActionsStrings,\n\ttype PageAction,\n\ttype PageActionContext,\n\ttype PageActionsProps,\n} from '../page.types';\n\nconst PAGE_ACTIONS_MENU_CLASS = 'max-h-[80vh] overflow-y-auto overscroll-contain';\nconst DEFAULT_MAX_INLINE_ACTIONS = 4;\n\ntype PageActionEntry = {\n\t/** The action this surface performs. */\n\taction: PageAction;\n\tindex: number;\n};\n\nfunction toActionMenuAction(\n\t{ action, index }: PageActionEntry,\n\tcontextBase: Omit<PageActionContext, 'index' | 'isInline'>,\n\tisInline: boolean,\n\trenderAction?: PageActionsProps['renderAction'],\n): ActionMenuAction {\n\tconst context: PageActionContext = { ...contextBase, index, isInline };\n\tconst disabled = !!action.disabled || !!action.loading;\n\n\treturn {\n\t\tid: action.id ?? String(index),\n\t\tlabel: action.label,\n\t\ticon: action.icon,\n\t\tonClick: action.onClick,\n\t\thref: action.href && !action.onClick ? action.href : undefined,\n\t\ttarget: action.target,\n\t\trel: action.rel,\n\t\texternal: action.external,\n\t\tdisabled,\n\t\ttone: action.tone ?? 'secondary',\n\t\tbuttonStyle: action.buttonStyle ?? 'solid',\n\t\tbuttonSize: action.size,\n\t\tgroup: action.group,\n\t\trender: action.element ?? renderAction?.(action, context),\n\t};\n}\n\nexport function PageActions({\n\tactions,\n\tdisplay = 'dropdown',\n\tsize = 'sm',\n\tbreakpoint = 1040,\n\tmaxInlineActions = DEFAULT_MAX_INLINE_ACTIONS,\n\trenderLink,\n\tstrings: stringsProp,\n\tclassName,\n\tinlineClassName,\n\tmenuClassName,\n\trenderAction,\n}: PageActionsProps) {\n\tconst strings = useStrings(defaultPageActionsStrings, stringsProp);\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\n\tconst filtered = useMemo<PageActionEntry[]>(\n\t\t() => (actions ?? [])\n\t\t\t.map((action, index) => ({ action, index }))\n\t\t\t.filter(({ action }) => action.visible !== false),\n\t\t[actions],\n\t);\n\n\tconst [isNarrow, setIsNarrow] = useState(false);\n\tuseEffect(() => {\n\t\tif (display !== 'auto' || typeof window === 'undefined') return;\n\n\t\tconst check = () => setIsNarrow(window.innerWidth <= breakpoint);\n\t\tcheck();\n\t\twindow.addEventListener('resize', check);\n\t\treturn () => window.removeEventListener('resize', check);\n\t}, [display, breakpoint]);\n\n\tif (filtered.length === 0) return null;\n\n\tconst inlineContextBase = { renderLink: resolvedRenderLink };\n\tconst renderActionLink = (props: ActionMenuLinkRenderProps) =>\n\t\tresolvedRenderLink({\n\t\t\t...props,\n\t\t\tchildren: props.children ?? null,\n\t\t}) as ReactElement;\n\tconst inlineClass = cn('flex min-w-0 max-w-full flex-wrap items-center gap-space-sm', inlineClassName, className);\n\tconst menuContentClass = cn(PAGE_ACTIONS_MENU_CLASS, menuClassName);\n\n\tif (display === 'dropdown' || (display === 'auto' && isNarrow)) {\n\t\tconst dropdownActions = filtered.map((entry) =>\n\t\t\ttoActionMenuAction(entry, inlineContextBase, false, renderAction),\n\t\t);\n\n\t\treturn (\n\t\t\t<ActionMenu\n\t\t\t\tactions={dropdownActions}\n\t\t\t\ticon={MoreHorizontal}\n\t\t\t\tsrText={strings.menuLabel}\n\t\t\t\talign=\"end\"\n\t\t\t\tcloseOnSelect\n\t\t\t\tcontentClassName={menuContentClass}\n\t\t\t\tpreserveOrder\n\t\t\t\trenderLink={renderActionLink}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst inlineLimit = Math.max(0, maxInlineActions);\n\tconst inlineCandidates = filtered.filter(({ action }) => (action.placement ?? 'auto') !== 'menu');\n\tconst inline = inlineCandidates.slice(0, inlineLimit);\n\tconst overflow = inlineCandidates.slice(inlineLimit);\n\tconst menu = [\n\t\t...overflow,\n\t\t...filtered.filter(({ action }) => (action.placement ?? 'auto') === 'menu'),\n\t];\n\tconst inlineActions = inline.map((entry) =>\n\t\ttoActionMenuAction(entry, inlineContextBase, true, renderAction),\n\t);\n\tconst menuActions = menu.map((entry) =>\n\t\ttoActionMenuAction(entry, inlineContextBase, false, renderAction),\n\t);\n\n\treturn (\n\t\t<div className={inlineClass}>\n\t\t\t<ActionButtons\n\t\t\t\tactions={inlineActions}\n\t\t\t\tsize={size}\n\t\t\t\trenderLink={renderActionLink}\n\t\t\t/>\n\t\t\t{menu.length > 0 && (\n\t\t\t\t<ActionMenu\n\t\t\t\t\tactions={menuActions}\n\t\t\t\t\ticon={MoreHorizontal}\n\t\t\t\t\tsrText={strings.menuLabel}\n\t\t\t\t\talign=\"end\"\n\t\t\t\t\tcloseOnSelect\n\t\t\t\t\tcontentClassName={menuContentClass}\n\t\t\t\t\tpreserveOrder\n\t\t\t\t\trenderLink={renderActionLink}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgBW,EAAW,EAC1B,UACA,gBACA,YACA,gBAAa,MACb,WAAWC,GACX,kBACA,qBACA,oBAAiB,mBACjB,aACA,WACA,eAAY,QACZ,iBAAc,CAAC,GACf,YACA,UACA,eACA,cACA,qBACA,qBACA,mBACA,uBACA,2BACmB;CACnB,IAAMC,IAAqBL,EAAsB,EAAE,cAAW,CAAC,GAGzDM,IAFYC,KAAcC,IAG/B,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACED,KAAY,CAACC,IACbH,EAAmB;GAClB,MAAME;GACN,cAAcE;GACd,WAAWC,EAAG,0BAA0BjB,EAAe;IAAC,MAAK;IAAY,aAAY;IAAQ,MAAK;IAAK,UAAS;GAAI,CAAC,CAAC;GACtH,UACC,kBAAAD,GAAA,EAAA,UACC,kBAACmB,GAAD;IAAW,WAAU;IAA2B,eAAY;GAAQ,CAAA,EACnE,CAAA;EAEJ,CAAC,IAED,kBAACjB,GAAD;GACC,MAAK;GACL,MAAK;GACL,aAAY;GACZ,MAAK;GAAK,UAAA;GACV,WAAU;GACV,SAASc;GACT,cAAYC;GAEZ,UAAA,kBAACE,GAAD;IAAW,WAAU;IAA2B,eAAY;GAAQ,CAAA;EAC7D,CAAA,GAET,kBAACb,GAAD;GAAW,aAAY;GAAW,WAAU;EAAe,CAAA,CACvD;CACF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KAAK,MACjCjC,EAAmB4B,GAAOR,GAAmB,IAAMd,CAAY,CAChE,GACM8B,IAAcF,EAAK,KAAK,MAC7BlC,EAAmB4B,GAAOR,GAAmB,IAAOd,CAAY,CACjE;CAEA,OACC,kBAAC,OAAD;EAAK,WAAWiB;EAAhB,UAAA,CACC,kBAACjE,GAAD;GACC,SAAS6E;GACH;GACN,YAAYd;EACZ,CAAA,GACAa,EAAK,SAAS,KACd,kBAAC7E,GAAD;GACC,SAAS+E;GACT,MAAMP;GACN,QAAQpB,EAAQ;GAChB,OAAM;GACN,eAAA;GACA,kBAAkBgB;GAClB,eAAA;GACA,YAAYJ;EACZ,CAAA,CAEE;;AAEP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-header-DQRa0jug.js","names":["cn","Text","Heading","Stack","Badge","Separator","isSimpleText","value","PageHeading","resolvedBadges","badges","badge","className","breadcrumbs","leading","contentClassName","eyebrow","DisplayLabel","eyebrowClassName","beforeTitle","titlePrefix","titleRowClassName","textGap","title","headingTag","titleClassName","item","index","titleSuffix","description","afterDescription","descriptionClassName","actions","actionsClassName","children","withSeparator"],"sources":["../src/components/base/navigation/page-header/page-header.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.\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\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/** Independent actions column beside the copy; follows it on narrow widths. */\n\tactions?: ReactNode;\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/** Draws the rule beneath the header. Default: `true`. */\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\tchildren,\n\tclassName,\n\tcontentClassName,\n\teyebrowClassName,\n\ttitleClassName,\n\ttitleRowClassName,\n\tdescriptionClassName,\n\tactionsClassName,\n\twithSeparator = true,\n}: PageHeadingProps) {\n\tconst resolvedBadges = badges ?? (badge ? [badge] : []);\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=\"2xs\" 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={cn('mb-space-xs', 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=\"2xs\" 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{!!actions && (\n\t\t\t\t\t\t\t<Stack direction=\"horizontal\" gap=\"md\" className={cn('page-header--actions max-w-full shrink-0', actionsClassName)}>\n\t\t\t\t\t\t\t\t{actions}\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"],"mappings":";;;;;;;;AAyFA,SAASM,EAAa,GAAqD;CAC1E,OAAO,OAAOC,KAAU,YAAY,OAAOA,KAAU,YAAY,OAAOA,KAAU;AACnF;AAEA,SAAgBC,EAAY,EAC3B,YACA,UACA,gBACA,aAAU,UACV,gBAA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YAAa,KAAI;YAAK,MAAA;YAAK,WAAU;YACpD,UAAAM,EAAe,KAAK,GAAM,MAC1B,kBAACL,GAAD;aAA+B,MAAMsB,EAAK,QAAQ;aAChD,UAAAA,EAAK;YACA,GAFKA,EAAK,OAAOC,CAEjB,CACP;WACK,CAAA;WAEPC;UACK;;UACL,CAAC,CAACC,KAAe,CAAC,CAACC,MACpB,kBAAC3B,GAAD;UAAO,KAAI;UAAM,WAAWH,EAAG,oCAAoC,CAAC,CAACoB,KAAe,aAAa;UAAjG,UAAA,CACE,CAAC,CAACS,MAAgBvB,EAAauB,CAAW,IAC1C,kBAAC5B,GAAD;WAAM,MAAK;WAAY,WAAWD,EAAG,+DAA+D+B,CAAoB;WACtH,UAAAF;UACI,CAAA,IACHA,IACHC,CACK;;QAEJ;OACJ,CAAA,GAAA,CAAC,CAACE,KACF,kBAAC7B,GAAD;QAAO,WAAU;QAAa,KAAI;QAAK,WAAWH,EAAG,4CAA4CiC,CAAgB;QAC/G,UAAAD;OACK,CAAA,CAEF;;KACD;IACD,CAAA,CAAA;;GAEN,CAAC,CAACE,KAAY,kBAAC,OAAD;IAAK,WAAU;IAAe;GAAc,CAAA;GAE1D,CAAC,CAACC,KAAiB,kBAAC9B,GAAD,EAAW,WAAU,cAAe,CAAA;EACjD;;AAEV;AAEA,EAAY,cAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pagination-C29vvt3I.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(\"gap-1 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 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\tclassName={cn('pagination-primitives--ellipsis size-action-sm', 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\tclassName={cn('pagination-primitives--link text-pxs', 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 pl-2! text-pxs', 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 pr-2! text-pxs', 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,2BAA2BC,CAAS;EAClD,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,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WAAWxB,EAAG,wCAAwCC,CAAS;EAC/D,GAAIF;EAEH,UAAAa,EAAaa,CAAQ,IACrB,kBAAC5B,GAAD;GAAM,KAAI;GAAO,MAAK;GAAU,QAAO;GAAS,YAAW;GAAQ,WAAU;GAC3E;EACI,CAAA,IACH4B;CACG,CAAA;AAEV;AAGA,SAAgBC,EAAmB,EAAE,cAAW,SAAM,SAASf,GAAa,UAAUgB,GAAW,GAAG5B,KAAkC;CACrI,IAAMiB,IAAUT,EAAqBI,CAAW;CAChD,OACC,kBAACW,GAAD;EACC,cAAYN,EAAQ;EACpB,MAAK;EACL,WAAWhB,EAAG,kDAAkDC,CAAS;EACzE,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,8CAA8CC,CAAS;EACrE,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 +0,0 @@
1
- {"version":3,"file":"popover-CoLDEg19.js","names":["Popover","PopoverPrimitive","React","PopoverContent","PopoverHeader","PopoverTitle","PopoverDescription","React","PopoverContentPrimitive","PopoverHeaderPrimitive","PopoverTitlePrimitive","PopoverDescriptionPrimitive","useThemePortalContainer","Text","anchoredPositionMethod","motionRecipes","Slot","Stack","surfaceDividerRecipes","surfaceInsetClasses","popoverRecipes","React$1","Popover$1","props","Popover","PopoverTrigger","slotRender","asChild","safeRender","render","_nativeButton","rest","renderProps","state","inferredNativeButton","children","resolvedNativeButton","nativeButton","PopoverAnchor","PopoverContent$1","disablePortal","resolvedContainer","container","inlineHost","setInlineHost","content","cn","className","PopoverHeader$1","PopoverTitle$1","PopoverDescription$1","isSimpleText","value","PopoverSurfaceContext","PopoverContent","resolvedType","type","inset","PopoverHeader","surface","copyGap","textGap","band","menu","hasStart","start","PopoverTitle","compact","PopoverDescription","PopoverFooter","childrenAsCaption","caption"],"sources":["../src/components/ui/popover.tsx","../src/components/base/popover/popover.tsx"],"sourcesContent":["import { anchoredPositionMethod } from '../../lib/anchored-positioning';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport * as React from \"react\"\n\nimport { Slot } from \"./slot\"\nimport { cn } from \"../../lib/utils\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n asChild = false,\n nativeButton,\n render,\n children,\n ...props\n}: PopoverPrimitive.Trigger.Props & { asChild?: boolean; nativeButton?: boolean }) {\n const slotRender = asChild ? <Slot /> : undefined\n const safeRender: PopoverPrimitive.Trigger.Props[\"render\"] = typeof render === \"function\"\n ? ((renderProps, state) => {\n const { nativeButton: _nativeButton, ...rest } = renderProps as Record<string, unknown>\n void _nativeButton\n return render(rest as typeof renderProps, state)\n })\n : render\n let inferredNativeButton = true\n if (asChild && React.isValidElement(children)) {\n if (typeof children.type === \"string\") {\n inferredNativeButton = children.type === \"button\"\n } else {\n const childProps = (children.props ?? {}) as Record<string, unknown>\n inferredNativeButton = !(\"href\" in childProps)\n }\n }\n const resolvedNativeButton = nativeButton ?? (asChild ? inferredNativeButton : true)\n return (\n <PopoverPrimitive.Trigger\n data-slot=\"popover-trigger\"\n render={slotRender ?? safeRender}\n nativeButton={resolvedNativeButton}\n {...props}\n >\n {children}\n </PopoverPrimitive.Trigger>\n )\n}\n\nfunction PopoverAnchor({\n asChild = false,\n ...props\n}: React.ComponentPropsWithoutRef<\"span\"> & { asChild?: boolean }) {\n if (asChild) {\n return <Slot {...props} />\n }\n\n return <span data-slot=\"popover-anchor\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n container,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n disablePortal = false,\n positionMethod = disablePortal ? \"absolute\" : anchoredPositionMethod,\n onOpenAutoFocus,\n onInteractOutside,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"positionMethod\"\n > & {\n disablePortal?: boolean\n onOpenAutoFocus?: (event: Event) => void\n onInteractOutside?: (event: Event) => void\n } & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n const [inlineHost, setInlineHost] = React.useState<HTMLDivElement | null>(null)\n void onOpenAutoFocus\n void onInteractOutside\n\n const content = (\n <PopoverPrimitive.Positioner\n positionMethod={positionMethod}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n motionRecipes.popup,\n \"bg-popover text-popover-foreground ring-foreground/10 flex flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 z-50 w-72 origin-(--transform-origin) outline-hidden\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n )\n\n if (disablePortal) {\n // Base UI requires Portal context; a local host preserves inline DOM locality.\n return <div data-popover-inline-host=\"\" className=\"contents\" ref={setInlineHost}>\n <PopoverPrimitive.Portal container={inlineHost}>{content}</PopoverPrimitive.Portal>\n </div>\n }\n\n return <PopoverPrimitive.Portal container={resolvedContainer}>{content}</PopoverPrimitive.Portal>\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-1 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverAnchor,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n","import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\n/**\n * Popover — public wrapper around the internal Base UI popover implementation.\n *\n * What this layer adds on top of the primitive:\n * - Library-default `sideOffset` (6px) and an explicit inset contract:\n * card/multi-content popovers use `default`, item collections use\n * `compact`, and mixed region-owned compositions use `flush`.\n * - A consistent shadow + border treatment matching the rest of the\n * library (one semantic border, no extra primitive ring).\n * - Wraps the primitive parts with stable DOM hooks and adds a separated\n * footer region while preserving the compound-component pattern:\n * `<Popover>`, `<PopoverTrigger>`, `<PopoverContent>` exactly as\n * they would with the primitive.\n *\n * Use the shared inset role for padding; className owns placement. Override\n * `--surface-x` / `--surface-y` / `--space-scale` on a wrapper for surface-wide\n * density tweaks.\n */\nimport * as React from 'react';\n\nimport {\n\tPopover as PopoverPrimitive,\n\tPopoverAnchor,\n\tPopoverContent as PopoverContentPrimitive,\n\tPopoverDescription as PopoverDescriptionPrimitive,\n\tPopoverHeader as PopoverHeaderPrimitive,\n\tPopoverTitle as PopoverTitlePrimitive,\n\tPopoverTrigger,\n} from '../../ui/popover';\nimport { Text } from '../../typography';\nimport { Stack, type TextGap } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { popoverRecipes, surfaceInsetClasses, type PopoverContentType } from './popover.recipes';\nexport type { PopoverContentType } from './popover.recipes';\n\nfunction isSimpleText(value: React.ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\ntype PopoverContentBaseProps = React.ComponentProps<typeof PopoverContentPrimitive>;\n\nexport type PopoverContentInset = 'default' | 'compact' | 'flush';\n\nexport type PopoverContentProps = PopoverContentBaseProps & {\n\t/**\n\t * Surface inset role. `default` is for card-like or multi-content popovers,\n\t * `compact` for pure item/option collections, and `flush` when child regions\n\t * own their padding.\n\t */\n\tinset?: PopoverContentInset;\n\t/** Anatomy role; supplies the inferred inset only when inset is omitted. */\n\ttype?: PopoverContentType;\n};\n\nconst PopoverSurfaceContext = React.createContext({ type: 'display' as PopoverContentType, flush: false, regionOwned: false });\n\n/** Anchored content surface with a semantic inset role and package popover chrome. */\nfunction PopoverContent({\n\tclassName,\n\tsideOffset = 6,\n\tinset,\n\ttype,\n\tstyle,\n\t...props\n}: PopoverContentProps) {\n const resolvedType = type ?? (inset === 'compact' ? 'menu' : 'display');\n return (\n <PopoverSurfaceContext.Provider value={{ type: resolvedType, flush: inset === 'flush', regionOwned: false }}>\n\t\t<PopoverContentPrimitive\n\t\t\tdata-surface-type={resolvedType}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn('popover--component',\n\t\t\t\t// A popover is a small surface, not a compressed tooltip. The\n\t\t\t\t// unsuffixed surface token is the package-wide default and remains\n\t\t\t\t// responsive to scoped spacing changes.\n\t\t\t\t'gap-space-md max-h-[min(var(--available-height),calc(100dvh-2rem))] max-w-[calc(100vw-2rem)] overflow-y-auto overscroll-contain',\n\t\t\t\tpopoverRecipes.surface,\n\t\t\t\tsurfaceInsetClasses[inset ?? (resolvedType === 'menu' ? 'compact' : 'default')],\n\t\t\t\t// Raw shadcn/Base UI buttons still carry a generic 1px press\n\t\t\t\t// translation. Popovers are stable anchored surfaces; moving a\n\t\t\t\t// calendar day or menu action makes the interaction feel soft.\n\t\t\t\t'[&_button]:active:translate-y-0!',\n\t\t\t\t// The shared recipe owns the semantic hairline border and shadow.\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={style}\n\t\t\t{...props}\n\t\t/>\n </PopoverSurfaceContext.Provider>\n\t);\n}\n\ntype PopoverHeaderBaseProps = React.ComponentProps<typeof PopoverHeaderPrimitive> & {\n /** Leading control, aligned with collection highlight edges rather than label text. */\n start?: React.ReactNode;\n /** Copy rhythm. Defaults to dense for menus and normal for display surfaces. */\n textGap?: TextGap;\n};\n\nfunction PopoverHeader({ className, children, start, textGap, ...props }: PopoverHeaderBaseProps) {\n const surface = React.useContext(PopoverSurfaceContext);\n const copyGap = textGap ?? (surface.type === 'menu' ? 'dense' : 'normal');\n const band = surface.flush && !surface.regionOwned;\n const menu = surface.type === 'menu' && !surface.regionOwned;\n const hasStart = start != null && start !== false;\n return (\n\t\t<PopoverHeaderPrimitive\n\t\t\tclassName={cn(\n 'popover-header--component',\n copyGap === 'dense' ? 'gap-dense' : 'gap-normal',\n band && (surface.type === 'menu' ? popoverRecipes.menuRegion : popoverRecipes.display),\n !band && menu && 'py-row-y',\n hasStart && 'flex-row items-center gap-space-md',\n band && surfaceDividerRecipes.anchored.header,\n className,\n )}\n\t\t\t{...props}\n\t\t>\n <PopoverSurfaceContext.Provider value={{ ...surface, regionOwned: true }}>\n {start}\n <Stack gap={copyGap} className={cn('popover-header--body min-w-0 flex-1', menu && !hasStart && 'px-row-x')}>\n {children}\n </Stack>\n </PopoverSurfaceContext.Provider>\n </PopoverHeaderPrimitive>\n\t);\n}\n\ntype PopoverTitleBaseProps = React.ComponentProps<typeof PopoverTitlePrimitive>;\n\nfunction PopoverTitle({ children, className, ...props }: PopoverTitleBaseProps) {\n const compact = React.useContext(PopoverSurfaceContext).type === 'menu';\n return (\n\t\t<PopoverTitlePrimitive\n\t\t\tclassName={cn('popover-title--component', 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={compact ? undefined : 'base'}\n\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\tlineHeight=\"snug\"\n\t\t\t\t\tclassName=\"popover-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</PopoverTitlePrimitive>\n\t);\n}\n\ntype PopoverDescriptionBaseProps = React.ComponentProps<typeof PopoverDescriptionPrimitive>;\n\nfunction PopoverDescription({ children, className, ...props }: PopoverDescriptionBaseProps) {\n const compact = React.useContext(PopoverSurfaceContext).type === 'menu';\n return (\n\t\t<PopoverDescriptionPrimitive\n\t\t\tclassName={cn('popover-description--component', 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 size={compact ? 'xs' : undefined}\n\t\t\t\t\tlineHeight={compact ? 'normal' : 'relaxed'}\n\t\t\t\t\tclassName=\"popover-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</PopoverDescriptionPrimitive>\n\t);\n}\n\ntype PopoverFooterProps = React.ComponentProps<'div'> & {\n /** Leading supporting content, aligned with collection labels; children are trailing actions. */\n caption?: React.ReactNode;\n};\n\nfunction PopoverFooter({ className, children, caption, ...props }: PopoverFooterProps) {\n const surface = React.useContext(PopoverSurfaceContext);\n const childrenAsCaption = caption == null && isSimpleText(children);\n const content = caption ?? (childrenAsCaption ? children : undefined);\n return (\n\t\t<Stack\n\t\t\tdirection=\"horizontal\"\n\t\t\tgap=\"sm\"\n\t\t\tjustify=\"end\"\n\t\t\twrap\n\t\t\tclassName={cn(\n\t\t\t\t'popover-footer--component pt-space-sm', surfaceDividerRecipes.anchored.footer,\n surface.flush && !surface.regionOwned && (surface.type === 'menu' ? popoverRecipes.menuRegion : popoverRecipes.display),\n\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n <PopoverSurfaceContext.Provider value={{ ...surface, regionOwned: true }}>\n {content != null && <div className={cn('popover-footer--caption me-auto min-w-0 max-w-full', surface.type === 'menu' && !surface.regionOwned && 'px-row-x')}>\n {isSimpleText(content) ? <Text tag=\"span\" size=\"xs\" type=\"secondary\">{content}</Text> : content}\n </div>}\n {!childrenAsCaption && children}\n </PopoverSurfaceContext.Provider>\n </Stack>\n\t);\n}\n\nexport {\n\tPopoverPrimitive as Popover,\n\tPopoverAnchor,\n\tPopoverContent,\n\tPopoverDescription,\n\tPopoverFooter,\n\tPopoverHeader,\n\tPopoverTitle,\n\tPopoverTrigger,\n};\n"],"mappings":";;;;;;;;;;;;;;AASA,SAASA,EAAQ,EAAE,GAAGuB,KAAsC;CAC1D,OAAO,kBAACtB,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAIsB;CAAQ,CAAA;AAChE;AAEA,SAASE,EAAe,EACtB,aAAU,IACV,iBACA,WACA,aACA,GAAGF,KAC8E;CACjF,IAAMG,IAAaC,IAAU,kBAACX,GAAD,CAAO,CAAA,IAAI,KAAA,GAClCY,IAAuD,OAAOC,KAAW,eACzE,GAAa,MAAU;EACzB,IAAM,EAAE,cAAcC,GAAe,GAAGC,MAASC;EAEjD,OAAOH,EAAOE,GAA4BE,CAAK;CACjD,KACEJ,GACAK,IAAuB;CAC3B,AAAIP,KAAWzB,EAAM,eAAeiC,CAAQ,MAC1C,AAIED,IAJE,OAAOC,EAAS,QAAS,WACJA,EAAS,SAAS,WAGlB,EAAE,WADLA,EAAS,SAAS,CAAC;CAI3C,IAAMC,IAAuBC,MAAiB,MAAUH;CACxD,OACE,kBAACjC,EAAiB,SAAlB;EACE,aAAU;EACV,QAAQyB,KAAcE;EAC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I;EACJ,SAAQ;EACR,MAAA;EACA,WAAW6B,EACV,yCAAyC5B,EAAsB,SAAS,QACxEyC,EAAQ,SAAS,CAACA,EAAQ,gBAAgBA,EAAQ,SAAS,SAASvC,EAAe,aAAaA,EAAe,UAE/G2B,CACD;EACA,GAAIxB;EAEJ,UAAA,kBAAC8B,EAAsB,UAAvB;GAAgC,OAAO;IAAE,GAAGM;IAAS,aAAa;GAAK;GAAvE,UAAA,CACEd,KAAW,QAAQ,kBAAC,OAAD;IAAK,WAAWC,EAAG,sDAAsDa,EAAQ,SAAS,UAAU,CAACA,EAAQ,eAAe,UAAU;IACxJ,UAAAR,EAAaN,CAAO,IAAI,kBAAChC,GAAD;KAAM,KAAI;KAAO,MAAK;KAAK,MAAK;KAAa,UAAAgC;IAAc,CAAA,IAAIA;GACpF,CAAA,GACJ,CAACyB,KAAqBnC,CACQ;;CAC1B,CAAA;AAET"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"popover.recipes-zgBhMlUu.js","names":["surfaceDividerRecipes","popoverRecipes","surfaceInsetClasses","collectionDensityClasses","collectionRowClasses","density","rowBlockPaddingClasses","collectionRecipes"],"sources":["../src/components/base/popover/popover.recipes.ts"],"sourcesContent":["import { surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport { rowBlockPaddingClasses, type RowDensity } from '../../../lib/row-recipes';\n/** Shared anchored-surface chrome; Menu and Popover retain their own accessible behavior. */\nexport const popoverRecipes = {\n surface: `rounded-radius ${surfaceDividerRecipes.anchored.shell} bg-popover text-popover-foreground shadow-md ring-0`,\n display: 'p-surface',\n menu: 'p-surface-xs',\n // Collection bands share the list shell; text bodies add the row inset once.\n menuRegion: 'px-surface-xs py-space-md',\n separator: `mx-0 my-space-xs h-px w-full shrink-0 ${surfaceDividerRecipes.anchored.separator}`,\n row: 'min-h-control rounded-inner px-row-x gap-space-sm font-medium leading-tight',\n} as const;\nexport type PopoverContentType = 'display' | 'menu';\n\n/** One surface inset vocabulary for Popover, Command and their collections. */\nexport const surfaceInsetClasses = {\n default: popoverRecipes.display,\n compact: popoverRecipes.menu,\n flush: 'p-0',\n} as const;\n\n/** Collection density changes vertical rhythm; inline room and primary text stay stable. */\nexport type CollectionDensity = RowDensity;\n\nconst collectionDensityClasses: Record<CollectionDensity, string> = {\n default: '',\n compact: 'min-h-control-sm',\n comfortable: 'min-h-control-lg',\n};\n\nexport function collectionRowClasses(density: CollectionDensity = 'default'): string {\n return `${popoverRecipes.row} ${collectionDensityClasses[density]} ${rowBlockPaddingClasses[density]}`;\n}\n\n/** Shared interactive collection states, independent of Menu/listbox state ownership. */\nexport const collectionRecipes = {\n icons: '[&_svg]:pointer-events-none [&_svg]:size-icon [&_svg]:shrink-0',\n interactive: 'relative flex cursor-default items-center outline-none select-none transition-colors',\n highlighted: 'data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:[&_svg]:text-accent-foreground',\n disabled: 'data-disabled:pointer-events-none data-disabled:opacity-50',\n destructive: 'data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:[&_svg]:text-destructive data-[variant=destructive]:data-highlighted:[&_svg]:text-destructive',\n // Compatibility for existing table and overflow-tab ActionMenu consumers.\n tableRow: 'min-h-action-xs py-space-2xs',\n} as const;\n"],"mappings":";;;AAGA,IAAaC,IAAiB;CAC7B,SAAS,kBAAkBD,EAAsB,SAAS,MAAM;CAChE,SAAS;CACT,MAAM;CAEN,YAAY;CACZ,WAAW,yCAAyCA,EAAsB,SAAS;CACnF,KAAK;AACN,GAIaE,IAAsB;CAClC,SAASD,EAAe;CACxB,SAASA,EAAe;CACxB,OAAO;AACR,GAKME,IAA8D;CACnE,SAAS;CACT,SAAS;CACT,aAAa;AACd;AAEA,SAAgBC,EAAqB,IAA6B,WAAmB;CACpF,OAAO,GAAGH,EAAe,IAAI,GAAGE,EAAyBE,GAAS,GAAGC,EAAuBD;AAC7F;AAGA,IAAaE,IAAoB;CAChC,OAAO;CACP,aAAa;CACb,aAAa;CACb,UAAU;CACV,aAAa;CAEb,UAAU;AACX"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"primitives-DKPOGVpj.js","names":["_Fragment","useFormattingConfig","Text","formatDuration","formatInitials","Fragment$1","renderValueChildren","children","emptyLabel","Value","props","cn","className","SecondaryValue","MutedValue","MonoValue","EmptyValue","WORD_SEPARATOR","NAME_CONNECTOR","LETTER_MATCHER","LETTERS_MATCHER","normalizeNameWhitespace","value","getLetters","getFirstLetter","match","isFormattedSegment","first","segment","letters","isAllUpper","isAllLower","isFormattedName","word","formatNameSegment","before","after","formatNameWord","formatName","normalized","options","Name","rawValue","content","Initials","Link","Email","query","subject","body","href","display","normalizeTel","Phone","normalizeUrl","Url","isExternal","external","resolvedTarget","target","resolvedRel","rel","FILE_SIZE_UNITS","FILE_SIZE_UNIT_MULTIPLIER","normalizeFileSizeValue","from","formatFileSize","locale","bytes","displayValue","unitIndex","FileSize","formatting","label","type","Duration","maximumFractionDigits","parseDimensionPart","parsed","formatDimensions","parsedWidth","width","parsedHeight","height","parsedDepth","depth","formatter","values","separator","unit","Dimensions","index","part"],"sources":["../src/components/primitives/value.tsx","../src/components/primitives/name.tsx","../src/components/primitives/initials.tsx","../src/components/primitives/link.tsx","../src/components/primitives/file-size.tsx","../src/components/primitives/duration.tsx","../src/components/primitives/dimensions.tsx"],"sourcesContent":["import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { cn } from '../../lib/utils';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\nexport type ValueType = Extract<TextProps['type'], 'main' | 'secondary'>;\n\nexport interface ValueProps extends SpanProps {\n\tchildren?: ReactNode;\n\temptyLabel?: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: ValueType;\n\tref?: Ref<HTMLSpanElement>;\n}\n\nfunction renderValueChildren(children: ReactNode, emptyLabel: ReactNode) {\n\tif (children === null || children === undefined || children === '') return emptyLabel;\n\treturn children;\n}\n\nexport function Value({\n\tchildren,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight = 'regular',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: ValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={type}\n\t\t\tclassName={cn('value--component inline min-w-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{renderValueChildren(children, emptyLabel)}\n\t\t</Text>\n\t);\n}\n\nexport function SecondaryValue({\n\tchildren,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight = 'regular',\n\ttype = 'secondary',\n\tclassName,\n\tref,\n\t...props\n}: ValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\tclassName={cn('secondary-value--component inline min-w-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{renderValueChildren(children, emptyLabel)}\n\t\t</Text>\n\t);\n}\n\nexport function MutedValue({\n\tchildren,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight = 'regular',\n\ttype = 'secondary',\n\tclassName,\n\tref,\n\t...props\n}: ValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\tclassName={cn('muted-value--component inline min-w-0 opacity-80', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{renderValueChildren(children, emptyLabel)}\n\t\t</Text>\n\t);\n}\n\nexport function MonoValue({\n\tchildren,\n\temptyLabel = EMPTY,\n\tsize,\n\talign,\n\tweight = 'medium',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: ValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={type}\n\t\t\tnumeric\n\t\t\tclassName={cn('mono-value--component inline min-w-0 break-words', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{renderValueChildren(children, emptyLabel)}\n\t\t</Text>\n\t);\n}\n\nexport interface EmptyValueProps extends Omit<ValueProps, 'emptyLabel'> {\n\tref?: Ref<HTMLSpanElement>;\n}\n\nexport function EmptyValue({\n\tchildren = EMPTY,\n\tsize,\n\talign,\n\tweight = 'regular',\n\ttype = 'secondary',\n\tclassName,\n\tref,\n\t...props\n}: EmptyValueProps) {\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\tclassName={cn('empty-value--component inline min-w-0', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n","import { type ReactNode } from 'react';\n\nimport { cn } from '../../lib/utils';\n\nimport { Value, type ValueProps } from './value';\n\nconst WORD_SEPARATOR = /(\\s+)/u;\nconst NAME_CONNECTOR = /([-'])/u;\nconst LETTER_MATCHER = /\\p{L}/u;\nconst LETTERS_MATCHER = /\\p{L}/gu;\n\nexport interface NameFormatOptions {\n\t/** Force title-casing even when the name already looks intentionally cased. */\n\tforce?: boolean;\n}\n\nexport interface NameProps extends Omit<ValueProps, 'children'> {\n\t/** Raw name value to normalize for display. */\n\tvalue?: string | null;\n\t/** String children are normalized when value is not provided. */\n\tchildren?: ReactNode;\n\t/** Force title-casing even when the name already looks intentionally cased. */\n\tforce?: boolean;\n}\n\nfunction normalizeNameWhitespace(value: string) {\n\treturn value.trim().replace(/\\s+/g, ' ');\n}\n\nfunction getLetters(value: string) {\n\treturn value.match(LETTERS_MATCHER)?.join('') ?? '';\n}\n\nfunction getFirstLetter(value: string) {\n\tconst match = LETTER_MATCHER.exec(value);\n\tif (!match) return null;\n\treturn {\n\t\tindex: match.index,\n\t\tvalue: match[0],\n\t};\n}\n\nfunction isFormattedSegment(segment: string) {\n\tconst first = getFirstLetter(segment);\n\tif (!first) return true;\n\n\tconst letters = getLetters(segment);\n\tif (letters.length <= 1) return first.value === first.value.toLocaleUpperCase();\n\n\tconst isAllUpper = letters === letters.toLocaleUpperCase();\n\tconst isAllLower = letters === letters.toLocaleLowerCase();\n\n\treturn first.value === first.value.toLocaleUpperCase() && !isAllUpper && !isAllLower;\n}\n\nfunction isFormattedName(value: string) {\n\treturn normalizeNameWhitespace(value)\n\t\t.split(WORD_SEPARATOR)\n\t\t.filter((word) => word.trim() !== '')\n\t\t.every((word) =>\n\t\t\tword\n\t\t\t\t.split(NAME_CONNECTOR)\n\t\t\t\t.filter((segment) => segment !== '-' && segment !== \"'\")\n\t\t\t\t.every(isFormattedSegment),\n\t\t);\n}\n\nfunction formatNameSegment(segment: string) {\n\tconst first = getFirstLetter(segment);\n\tif (!first) return segment;\n\n\tconst before = segment.slice(0, first.index);\n\tconst after = segment.slice(first.index + first.value.length);\n\n\treturn `${before}${first.value.toLocaleUpperCase()}${after.toLocaleLowerCase()}`;\n}\n\nfunction formatNameWord(word: string) {\n\treturn word\n\t\t.split(NAME_CONNECTOR)\n\t\t.map((segment) => (segment === '-' || segment === \"'\" ? segment : formatNameSegment(segment)))\n\t\t.join('');\n}\n\nexport function formatName(value: string | null | undefined, options: NameFormatOptions = {}) {\n\tif (value === null || value === undefined) return '';\n\n\tconst normalized = normalizeNameWhitespace(value);\n\tif (!normalized) return '';\n\tif (!options.force && isFormattedName(normalized)) return normalized;\n\n\treturn normalized\n\t\t.split(WORD_SEPARATOR)\n\t\t.map((word) => (word.trim() === '' ? word : formatNameWord(word)))\n\t\t.join('');\n}\n\nexport function Name({\n\tvalue,\n\tchildren,\n\tforce,\n\tclassName,\n\tref,\n\t...props\n}: NameProps) {\n\tconst rawValue = value ?? (typeof children === 'string' ? children : undefined);\n\tconst content = rawValue === undefined ? children : formatName(rawValue, { force });\n\n\treturn (\n\t\t<Value ref={ref} className={cn('name--component', className)} {...props}>\n\t\t\t{content}\n\t\t</Value>\n\t);\n}\n","import { cn } from '../../lib/utils';\n\nimport { Value, type ValueProps } from './value';\nimport {\n\tformatInitials,\n\ttype InitialsMaxCharacters,\n\ttype InitialsStrategy,\n} from './initials-format';\n\nexport interface InitialsProps extends Omit<ValueProps, 'children'> {\n\t/** Person, organization, or resource name used to derive initials. */\n\tvalue?: string | null;\n\t/** First + last word by default; use first-words to preserve the first N words. */\n\tstrategy?: InitialsStrategy;\n\t/** Maximum visible characters. Defaults to 2. */\n\tmaxCharacters?: InitialsMaxCharacters;\n\t/** Optional BCP-47 locale used for locale-sensitive uppercasing. */\n\tlocale?: string;\n\t/** Returned when no usable letter or number exists. Defaults to an empty string. */\n\tfallback?: string;\n}\n\n/** Semantic displayed initials for identities and avatar fallbacks. */\nexport function Initials({\n\tvalue,\n\tstrategy,\n\tmaxCharacters,\n\tlocale,\n\tfallback,\n\tsize = 'inherit',\n\tclassName,\n\tref,\n\t...props\n}: InitialsProps) {\n\treturn (\n\t\t<Value\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t\tsize={size}\n\t\t\tclassName={cn('initials--component', className)}\n\t\t>\n\t\t\t{formatInitials(value, {\n\t\t\t\tstrategy,\n\t\t\t\tmaxCharacters,\n\t\t\t\tlocale,\n\t\t\t\tfallback,\n\t\t\t})}\n\t\t</Value>\n\t);\n}\n","import { type AnchorHTMLAttributes, type ReactNode, type Ref } from 'react';\n\nimport { Text } from '../typography';\nimport { EMPTY } from '../../lib/format';\nimport { cn } from '../../lib/utils';\n\nexport interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n\tchildren?: ReactNode;\n\temptyLabel?: ReactNode;\n\tref?: Ref<HTMLAnchorElement>;\n}\n\nexport function Link({\n\tchildren,\n\temptyLabel = EMPTY,\n\tclassName,\n\tref,\n\t...props\n}: LinkProps) {\n\tconst content =\n\t\tchildren === null || children === undefined || children === '' ? emptyLabel : children;\n\n\treturn (\n\t\t<a\n\t\t\tref={ref}\n\t\t\tdata-typography=\"link\"\n\t\t\tclassName={cn(\n\t\t\t\t'link--component text-link-color underline-offset-4 transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{content}\n\t\t</a>\n\t);\n}\n\nexport interface EmailProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\tsubject?: string;\n\tbody?: string;\n\tref?: Ref<HTMLElement>;\n}\n\nexport function Email({\n\tvalue,\n\tdisplay,\n\tsubject,\n\tbody,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: EmailProps) {\n\tif (!value) return <Text ref={ref} tag=\"span\" size=\"inherit\" type=\"secondary\" className={cn('email--component', className)}>{emptyLabel}</Text>;\n\n\tconst query = new URLSearchParams();\n\tif (subject) query.set('subject', subject);\n\tif (body) query.set('body', body);\n\tconst href = `mailto:${value}${query.size ? `?${query.toString()}` : ''}`;\n\n\treturn (\n\t\t<Link ref={ref as Ref<HTMLAnchorElement>} className={cn('email--component', className)} href={href} emptyLabel={emptyLabel} {...props}>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n\nexport interface PhoneProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\tref?: Ref<HTMLElement>;\n}\n\nfunction normalizeTel(value: string) {\n\treturn value.replace(/[^\\d+*#;,.]/g, '');\n}\n\nexport function Phone({\n\tvalue,\n\tdisplay,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: PhoneProps) {\n\tif (!value) return <Text ref={ref} tag=\"span\" size=\"inherit\" type=\"secondary\" className={cn('phone--component', className)}>{emptyLabel}</Text>;\n\n\treturn (\n\t\t<Link ref={ref as Ref<HTMLAnchorElement>} className={cn('phone--component', className)} href={`tel:${normalizeTel(value)}`} emptyLabel={emptyLabel} {...props}>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n\nexport interface UrlProps extends Omit<LinkProps, 'href' | 'children' | 'ref'> {\n\tvalue?: string | null;\n\tdisplay?: ReactNode;\n\texternal?: boolean;\n\tref?: Ref<HTMLElement>;\n}\n\nfunction normalizeUrl(value: string) {\n\tif (/^[a-z][a-z\\d+\\-.]*:/i.test(value) || value.startsWith('/') || value.startsWith('#')) return value;\n\treturn `https://${value}`;\n}\n\nexport function Url({\n\tvalue,\n\tdisplay,\n\texternal,\n\ttarget,\n\trel,\n\tclassName,\n\temptyLabel = EMPTY,\n\tref,\n\t...props\n}: UrlProps) {\n\tif (!value) return <Text ref={ref} tag=\"span\" size=\"inherit\" type=\"secondary\" className={cn('url--component', className)}>{emptyLabel}</Text>;\n\n\tconst href = normalizeUrl(value);\n\tconst isExternal = external ?? /^https?:\\/\\//i.test(href);\n\tconst resolvedTarget = target ?? (isExternal ? '_blank' : undefined);\n\tconst resolvedRel = rel ?? (isExternal ? 'noreferrer' : undefined);\n\n\treturn (\n\t\t<Link\n\t\t\tref={ref as Ref<HTMLAnchorElement>}\n\t\t\tclassName={cn('url--component', className)}\n\t\t\thref={href}\n\t\t\ttarget={resolvedTarget}\n\t\t\trel={resolvedRel}\n\t\t\temptyLabel={emptyLabel}\n\t\t\t{...props}\n\t\t>\n\t\t\t{display ?? value}\n\t\t</Link>\n\t);\n}\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n\nexport type FileSizeUnit = 'bytes' | 'kb' | 'mb' | 'gb' | 'tb';\n\nexport interface FileSizeProps extends SpanProps {\n\tvalue?: number | null;\n\tfrom?: FileSizeUnit;\n\tlocale?: string;\n\temptyLabel?: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nconst FILE_SIZE_UNITS = ['B', 'KB', 'MB', 'GB', 'TB'] as const;\nconst FILE_SIZE_UNIT_MULTIPLIER: Record<FileSizeUnit, number> = {\n\tbytes: 1,\n\tkb: 1024,\n\tmb: 1024 ** 2,\n\tgb: 1024 ** 3,\n\ttb: 1024 ** 4,\n};\n\nexport interface FileSizeFormatOptions {\n\tfrom?: FileSizeUnit;\n\tlocale?: string;\n}\n\nfunction normalizeFileSizeValue(value?: number | null, from: FileSizeUnit = 'bytes') {\n\tif (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) return null;\n\treturn value * FILE_SIZE_UNIT_MULTIPLIER[from];\n}\n\nexport function formatFileSize(\n\tvalue?: number | null,\n\toptions?: FileSizeFormatOptions | string,\n): string | null {\n\tconst locale = typeof options === 'string' ? options : options?.locale;\n\tconst from = typeof options === 'string' ? 'bytes' : options?.from ?? 'bytes';\n\tconst bytes = normalizeFileSizeValue(value, from);\n\tif (bytes === null) return null;\n\n\tlet displayValue = bytes;\n\tlet unitIndex = 0;\n\twhile (displayValue >= 1024 && unitIndex < FILE_SIZE_UNITS.length - 1) {\n\t\tdisplayValue /= 1024;\n\t\tunitIndex += 1;\n\t}\n\n\tconst formattedValue = new Intl.NumberFormat(locale, {\n\t\tmaximumFractionDigits: unitIndex === 0 ? 0 : 1,\n\t\tminimumFractionDigits: 0,\n\t}).format(displayValue);\n\n\treturn `${formattedValue} ${FILE_SIZE_UNITS[unitIndex]}`;\n}\n\nexport function FileSize({\n\tvalue,\n\tfrom = 'bytes',\n\tlocale,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight = 'regular',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: FileSizeProps) {\n\tconst formatting = useFormattingConfig();\n\tconst label = formatFileSize(value, { from, locale: locale ?? formatting.locale });\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={label === null ? 'secondary' : type}\n\t\t\tclassName={cn('file-size--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label ?? emptyLabel}\n\t\t</Text>\n\t);\n}\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport {\n\tEMPTY,\n\tformatDuration,\n\ttype DurationUnit,\n\ttype DurationUnitDisplay,\n} from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\n\nexport interface DurationProps extends SpanProps {\n\tvalue?: number | null;\n\tfrom?: DurationUnit;\n\tlocale?: string;\n\tmaxParts?: number;\n\tunitDisplay?: DurationUnitDisplay;\n\tminimumFractionDigits?: number;\n\tmaximumFractionDigits?: number;\n\temptyLabel?: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nexport function Duration({\n\tvalue,\n\tfrom = 'seconds',\n\tlocale,\n\tmaxParts = 2,\n\tunitDisplay = 'narrow',\n\tminimumFractionDigits,\n\tmaximumFractionDigits,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight = 'regular',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: DurationProps) {\n\tconst formatting = useFormattingConfig();\n\tconst label = value === null || value === undefined\n\t\t? null\n\t\t: formatDuration(value, {\n\t\t\t\tfrom,\n\t\t\t\tlocale: locale ?? formatting.locale,\n\t\t\t\tmaxParts,\n\t\t\t\tunitDisplay,\n\t\t\t\tminimumFractionDigits,\n\t\t\t\tmaximumFractionDigits: maximumFractionDigits ?? (\n\t\t\t\t\tfrom === 'milliseconds' ? 1 : undefined\n\t\t\t\t),\n\t\t\t});\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={label === null || label === EMPTY ? 'secondary' : type}\n\t\t\tclassName={cn('duration--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label === null || label === EMPTY ? emptyLabel : label}\n\t\t</Text>\n\t);\n}\n\nexport { formatDuration } from '../../lib/format';\nexport type { DurationUnit, DurationUnitDisplay, FormatDurationOptions } from '../../lib/format';\n","import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from 'react';\n\nimport { Text, type TextProps } from '../typography';\nimport type { TextSize } from '../../lib/ui-provider';\nimport { EMPTY } from '../../lib/format';\nimport { useFormattingConfig } from '../../lib/ui-provider';\nimport { cn } from '../../lib/utils';\n\ntype SpanProps = Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'color'>;\ntype DimensionPart = number | string | null | undefined;\n\nexport interface FormatDimensionsOptions {\n\tdepth?: DimensionPart;\n\tunit?: string;\n\tseparator?: string;\n\tlocale?: string;\n\toptions?: Intl.NumberFormatOptions;\n}\n\nexport interface DimensionsProps extends SpanProps {\n\twidth?: DimensionPart;\n\theight?: DimensionPart;\n\tdepth?: DimensionPart;\n\tunit?: ReactNode;\n\tseparator?: ReactNode;\n\tlocale?: string;\n\toptions?: Intl.NumberFormatOptions;\n\temptyLabel?: ReactNode;\n\tsize?: TextSize;\n\talign?: TextProps['align'];\n\tweight?: TextProps['weight'];\n\ttype?: TextProps['type'];\n\tref?: Ref<HTMLSpanElement>;\n}\n\nfunction parseDimensionPart(value: DimensionPart): number | null {\n\tif (value === null || value === undefined || value === '') return null;\n\tif (typeof value === 'number') return Number.isFinite(value) ? value : null;\n\tconst normalized = value.trim().replace(',', '.');\n\tif (!normalized) return null;\n\tconst parsed = Number(normalized);\n\treturn Number.isFinite(parsed) ? parsed : null;\n}\n\nexport function formatDimensions(\n\twidth: DimensionPart,\n\theight: DimensionPart,\n\t{\n\t\tdepth,\n\t\tunit,\n\t\tseparator = ' × ',\n\t\tlocale,\n\t\toptions,\n\t}: FormatDimensionsOptions = {},\n): string | null {\n\tconst parsedWidth = parseDimensionPart(width);\n\tconst parsedHeight = parseDimensionPart(height);\n\tconst parsedDepth = parseDimensionPart(depth);\n\tif (parsedWidth === null || parsedHeight === null) return null;\n\tif (depth !== null && depth !== undefined && depth !== '' && parsedDepth === null) return null;\n\n\tconst formatter = new Intl.NumberFormat(locale, options);\n\tconst values = [parsedWidth, parsedHeight];\n\tif (parsedDepth !== null) values.push(parsedDepth);\n\tconst label = values.map((value) => formatter.format(value)).join(separator);\n\treturn unit ? `${label} ${unit}` : label;\n}\n\nexport function Dimensions({\n\twidth,\n\theight,\n\tdepth,\n\tunit,\n\tseparator = ' × ',\n\tlocale,\n\toptions,\n\temptyLabel = EMPTY,\n\tsize,\n\talign = 'right',\n\tweight = 'regular',\n\ttype = 'main',\n\tclassName,\n\tref,\n\t...props\n}: DimensionsProps) {\n\tconst formatting = useFormattingConfig();\n\tconst label = formatDimensions(width, height, {\n\t\tdepth,\n\t\tseparator: typeof separator === 'string' ? separator : ' × ',\n\t\tlocale: locale ?? formatting.locale,\n\t\toptions,\n\t});\n\n\treturn (\n\t\t<Text\n\t\t\tref={ref}\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\talign={align}\n\t\t\tweight={weight}\n\t\t\ttype={label === null ? 'secondary' : type}\n\t\t\tclassName={cn('dimensions--component inline tabular-nums', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{label === null ? emptyLabel : (\n\t\t\t\t<>\n\t\t\t\t\t{typeof separator === 'string' ? label : label.split(' × ').map((part, index) => (\n\t\t\t\t\t\t<span key={`${part}-${index}`}>\n\t\t\t\t\t\t\t{index > 0 && separator}\n\t\t\t\t\t\t\t{part}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t))}\n\t\t\t\t\t{!!unit && <> {unit}</>}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</Text>\n\t);\n}\n"],"mappings":";;;;;;;;;AAoBA,SAASM,EAAoB,GAAqB,GAAuB;CAExE,OADIC,KAAa,QAAkCA,MAAa,KAAWC,IACpED;AACR;AAEA,SAAgBE,EAAM,EACrB,aACA,gBAAA,KACA,SACA,UACA,YAAS,WACT,UAAO,QACP,cACA,QACA,GAAGC,KACW;CACd,OACC,kBAACR,GAAD;EACM;EACL,KAAI;EACE;EACC;EACC;EACF;EACN,WAAWS,EAAG,mCAAmCC,CAAS;EAC1D,GAAIF;EAEH,UAAAJ,EAAoBC,GAAUC,CAAU;CACpC,CAAA;AAER;AAEA,SAAgBK,EAAe,EAC9B,aACA,gBAAA,KACA,SACA,UACA,YAAS,WACT,UAAO,aACP,cACA,QACA,GAAGH,KACW;CACd,OACC,kBAACR,GAAD;EACM;EACL,KAAI;EACE;EACA;EACC;EACC;EACR,WAAWS,EAAG,6CAA6CC,CAAS;EACpE,GAAIF;EAEH,UAAAJ,EAAoBC,GAAUC,CAAU;CACpC,CAAA;AAER;AAEA,SAAgBM,EAAW,EAC1B,aACA,gBAAA,KACA,SACA,UACA,YAAS,WACT,UAAO,aACP,cACA,QACA,GAAGJ,KACW;CACd,OACC,kBAACR,GAAD;EACM;EACL,KAAI;EACE;EACA;EACC;EACC;EACR,WAAWS,EAAG,oDAAoDC,CAAS;EAC3E,GA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AC3E,OAAOC,IAAO,GAAGhB,EAAM,GAAGgB,MAAShB;AACpC;AAEA,SAAgBiB,EAAW,EAC1B,UACA,WACA,UACA,SACA,eAAY,OACZ,WACA,YACA,gBAAA,KACA,SACA,WAAQ,SACR,YAAS,WACT,UAAO,QACP,cACA,QACA,GAAGhF,KACgB;CACnB,IAAM8D,IAAavE,EAAoB,GACjCwE,IAAQM,EAAiBE,GAAOE,GAAQ;EAC7C;EACA,WAAW,OAAOK,KAAc,WAAWA,IAAY;EACvD,QAAQrB,KAAUK,EAAW;EAC7B;CACD,CAAC;CAED,OACC,kBAACtE,GAAD;EACM;EACL,KAAI;EACE;EACC;EACC;EACR,MAAMuE,MAAU,OAAO,cAAcC;EACrC,WAAW/D,EAAG,6CAA6CC,CAAS;EACpE,GAAIF;EAEH,UAAA+D,MAAU,OAAOjE,IACjB,kBAAAR,GAAA,EAAA,UAAA,CACE,OAAOwF,KAAc,WAAWf,IAAQA,EAAM,MAAM,KAAK,CAAC,CAAC,KAAK,GAAM,MACtE,kBAAC,QAAD,EAAA,UAAA,CACEkB,IAAQ,KAAKH,GACbI,CACI,EAAA,GAHK,GAAGA,EAAK,GAAGD,GAGhB,CACN,GACA,CAAC,CAACF,KAAQ,kBAAAzF,GAAA,EAAA,UAAA,CAAE,KAAEyF,CAAO,EAAA,CAAA,CACrB,EAAA,CAAA;CAEE,CAAA;AAER"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress-BOe8l_FZ.js","names":["Progress","_Fragment","ProgressPrimitive","resolveComponentScale","useFormattingConfig","useDensityConfig","cn","Stack","trackHeightClasses","Fragment$1","defaultProgressStrings","ProgressContext","createContext","isSimpleText","value","INDICATOR_TONE_CLASSNAMES","mergeStateClassName","className","baseClassName","state","normalizeRange","min","minProp","maxCandidate","maxProp","normalizeValue","max","formatProgressValue","format","locale","normalized","Progress$1","forwardRef","valueProp","showValueProp","sizeProp","stringsProp","ariaDescribedBy","props","strings","useStrings","formatting","size","defaultScale","resolvedLocale","descriptionId","useId","formattedValue","usesGeneratedHeader","headerSlot","children","showValue","label","hasSummary","description","metadata","valueSlot","descriptionIds","resolvedGetAriaValueText","normalizedFormattedValue","currentValue","getAriaValueText","contextValue","useMemo","resolvedHeader","ProgressLabel","Text","ProgressValue","resolvedTrack","trackSlot","ProgressTrack","trackProps","ProgressIndicator","indicatorProps","tone","Progress","context","useContext","primitiveValue","_primitiveFormattedValue","content"],"sources":["../src/components/base/feedback/progress.strings.ts","../src/components/base/feedback/progress.tsx"],"sourcesContent":["export interface ProgressStrings {\n\t/** Screen-reader value announced while progress is indeterminate. */\n\tindeterminateValue: string;\n}\n\nexport const defaultProgressStrings: ProgressStrings = {\n\tindeterminateValue: 'In progress',\n};\n","import { trackHeightClasses } from '../../../lib/track-recipes';\n/**\n * Progress — token-driven Base UI progress wrapper for completion, quota,\n * and long-running task states.\n *\n * The root keeps the Base UI accessibility contract while adding a concise\n * admin summary API (`label`, `description`, `metadata`, `showValue`),\n * semantic tones, structural sizes, stable DOM hooks, and composition slots.\n * Consumers can still assemble `ProgressLabel`, `ProgressValue`,\n * `ProgressTrack`, and `ProgressIndicator` directly.\n */\nimport { Progress as ProgressPrimitive } from '@base-ui/react/progress';\nimport { createContext, forwardRef, useContext, useId, useMemo, type ReactNode } from 'react';\n\nimport { Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { useDensityConfig, useFormattingConfig, type ComponentScale } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport type { SemanticTone } from '../../../lib/component-vocabulary';\n\nimport { defaultProgressStrings, type ProgressStrings } from './progress.strings';\n\nexport type ProgressSize = ComponentScale;\nexport type ProgressTone = SemanticTone;\n\ntype ProgressRootState = ProgressPrimitive.Root.State;\ntype ProgressTrackState = ProgressPrimitive.Track.State;\ntype ProgressIndicatorState = ProgressPrimitive.Indicator.State;\ntype ProgressLabelState = ProgressPrimitive.Label.State;\ntype ProgressValueState = ProgressPrimitive.Value.State;\n\ntype StatefulClassName<TState> = string | ((state: TState) => string | undefined) | undefined;\n\nexport interface ProgressProps extends Omit<\n\tProgressPrimitive.Root.Props,\n\t'children' | 'format' | 'getAriaValueText' | 'locale' | 'max' | 'min' | 'value'\n> {\n\t/** Current value. `null` renders an indeterminate state. */\n\tvalue: number | null;\n\t/** Minimum value used to normalize the visual percentage. @default 0 */\n\tmin?: number;\n\t/** Maximum value used to normalize the visual percentage. @default 100 */\n\tmax?: number;\n\t/** Intl options for formatting the raw value instead of the default normalized percentage. */\n\tformat?: Intl.NumberFormatOptions;\n\t/** Locale forwarded to `Intl.NumberFormat`. */\n\tlocale?: Intl.LocalesArgument;\n\t/** Human-readable text for the current value. Receives the wrapper's normalized display value. */\n\tgetAriaValueText?: (formattedValue: string | null, value: number | null) => string;\n\t/** Low-level compound content. `headerSlot` takes precedence when both are supplied. */\n\tchildren?: ReactNode;\n\t/** Accessible visual label. Supplying it also enables `showValue` by default. */\n\tlabel?: ReactNode;\n\t/** Supporting text automatically connected with `aria-describedby`. */\n\tdescription?: ReactNode;\n\t/** Optional right-aligned task metadata, such as \"18,400 of 25,000 rows\". */\n\tmetadata?: ReactNode;\n\t/** Show the formatted value beside the label. Defaults to `true` when `label` is supplied. */\n\tshowValue?: boolean;\n\t/** Replaces the formatted value while retaining the default summary layout. */\n\tvalueSlot?: ReactNode;\n\t/** Replaces the entire content above the track. */\n\theaderSlot?: ReactNode;\n\t/** Replaces the default track and indicator composition. */\n\ttrackSlot?: ReactNode;\n\t/** Track thickness. @default \"default\" */\n\tsize?: ProgressSize;\n\t/** Semantic indicator color. @default \"primary\" */\n\ttone?: ProgressTone;\n\t/** Props forwarded to the default track. Ignored when `trackSlot` is supplied. */\n\ttrackProps?: ProgressTrackProps;\n\t/** Props forwarded to the default indicator. Ignored when `trackSlot` is supplied. */\n\tindicatorProps?: ProgressIndicatorProps;\n\t/** Override the indeterminate screen-reader copy. */\n\tstrings?: StringsProp<ProgressStrings>;\n}\n\nexport interface ProgressTrackProps extends ProgressPrimitive.Track.Props {\n\t/** Track thickness. @default \"default\" */\n\tsize?: ProgressSize;\n}\n\nexport interface ProgressIndicatorProps extends ProgressPrimitive.Indicator.Props {\n\t/** Semantic fill color. @default \"primary\" */\n\ttone?: ProgressTone;\n}\n\nexport interface ProgressLabelProps extends ProgressPrimitive.Label.Props {\n\t/** Accessible label content. */\n\tchildren?: ReactNode;\n}\n\nexport interface ProgressValueProps extends Omit<ProgressPrimitive.Value.Props, 'children'> {\n\t/** Customize the formatted display while preserving the value semantics. */\n\tchildren?: (formattedValue: string | null, value: number | null) => ReactNode;\n}\n\ninterface ProgressContextValue {\n\tformattedValue: string | null;\n\tvalue: number | null;\n}\n\nconst ProgressContext = createContext<ProgressContextValue | null>(null);\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\nconst INDICATOR_TONE_CLASSNAMES: Record<ProgressTone, string> = {\n\tneutral: 'bg-muted-foreground',\n\tprimary: 'bg-primary',\n\tsecondary: 'bg-secondary-foreground',\n\tsuccess: 'bg-success',\n\tinfo: 'bg-info',\n\twarning: 'bg-warning',\n\tdestructive: 'bg-destructive',\n};\n\nfunction mergeStateClassName<TState>(\n\tbaseClassName: string,\n\tclassName: StatefulClassName<TState>,\n): string | ((state: TState) => string) {\n\tif (typeof className === 'function') {\n\t\treturn (state) => cn(baseClassName, className(state));\n\t}\n\n\treturn cn(baseClassName, className);\n}\n\nfunction normalizeRange(minProp: number | undefined, maxProp: number | undefined) {\n\tconst min = Number.isFinite(minProp) ? (minProp as number) : 0;\n\tconst maxCandidate = Number.isFinite(maxProp) ? (maxProp as number) : 100;\n\tconst max = maxCandidate > min ? maxCandidate : min + 100;\n\n\treturn { min, max };\n}\n\nfunction normalizeValue(value: number | null, min: number, max: number): number | null {\n\tif (value === null || !Number.isFinite(value)) return null;\n\treturn Math.min(max, Math.max(min, value));\n}\n\nfunction formatProgressValue(\n\tvalue: number | null,\n\tmin: number,\n\tmax: number,\n\tlocale: Intl.LocalesArgument | undefined,\n\tformat: Intl.NumberFormatOptions | undefined,\n): string | null {\n\tif (value === null) return null;\n\n\tif (format) {\n\t\treturn new Intl.NumberFormat(locale, format).format(value);\n\t}\n\n\tconst normalized = max === min ? 0 : (value - min) / (max - min);\n\treturn new Intl.NumberFormat(locale, {\n\t\tstyle: 'percent',\n\t\tmaximumFractionDigits: 0,\n\t}).format(normalized);\n}\n\nconst Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n\t{\n\t\tvalue: valueProp,\n\t\tmin: minProp,\n\t\tmax: maxProp,\n\t\tformat,\n\t\tlocale,\n\t\tgetAriaValueText,\n\t\tchildren,\n\t\tlabel,\n\t\tdescription,\n\t\tmetadata,\n\t\tshowValue: showValueProp,\n\t\tvalueSlot,\n\t\theaderSlot,\n\t\ttrackSlot,\n\t\tsize: sizeProp,\n\t\ttone = 'primary',\n\t\ttrackProps,\n\t\tindicatorProps,\n\t\tstrings: stringsProp,\n\t\tclassName,\n\t\t'aria-describedby': ariaDescribedBy,\n\t\t...props\n\t},\n\tref,\n) {\n\tconst strings = useStrings(defaultProgressStrings, stringsProp);\n\tconst formatting = useFormattingConfig();\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\tconst resolvedLocale = locale ?? formatting.locale;\n\tconst descriptionId = useId();\n\tconst { min, max } = normalizeRange(minProp, maxProp);\n\tconst value = normalizeValue(valueProp, min, max);\n\tconst formattedValue = formatProgressValue(value, min, max, resolvedLocale, format);\n\tconst usesGeneratedHeader = headerSlot === undefined && children === undefined;\n\tconst showValue = showValueProp ?? label !== undefined;\n\tconst hasSummary =\n\t\tlabel !== undefined || description !== undefined || metadata !== undefined || valueSlot !== undefined || showValue;\n\tconst descriptionIds =\n\t\t[ariaDescribedBy, usesGeneratedHeader && description !== undefined ? descriptionId : undefined]\n\t\t\t.filter(Boolean)\n\t\t\t.join(' ') || undefined;\n\tconst resolvedGetAriaValueText = (_formattedValue: string | null, currentValue: number | null) => {\n\t\tconst normalizedFormattedValue = formatProgressValue(currentValue, min, max, resolvedLocale, format);\n\t\tif (getAriaValueText) {\n\t\t\treturn getAriaValueText(normalizedFormattedValue, currentValue);\n\t\t}\n\t\treturn normalizedFormattedValue ?? strings.indeterminateValue;\n\t};\n\tconst contextValue = useMemo(() => ({ formattedValue, value }), [formattedValue, value]);\n\tconst resolvedHeader =\n\t\theaderSlot ??\n\t\tchildren ??\n\t\t(hasSummary ? (\n\t\t\t<>\n\t\t\t\t<div className=\"progress--summary min-w-0\">\n\t\t\t\t\t{label !== undefined && <ProgressLabel>{label}</ProgressLabel>}\n\t\t\t\t\t{description !== undefined &&\n\t\t\t\t\t\t(isSimpleText(description) ? (\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tid={descriptionId}\n\t\t\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t\t\t\tclassName=\"progress--description mt-space-2xs block\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div id={descriptionId} className=\"progress--description mt-space-2xs\">\n\t\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t{(showValue || valueSlot !== undefined || metadata !== undefined) && (\n\t\t\t\t\t<Stack gap=\"2xs\" align=\"end\" className=\"progress--details text-right\">\n\t\t\t\t\t\t{valueSlot ?? (showValue ? <ProgressValue /> : null)}\n\t\t\t\t\t\t{metadata !== undefined &&\n\t\t\t\t\t\t\t(isSimpleText(metadata) ? (\n\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\" className=\"progress--metadata tabular-nums\">\n\t\t\t\t\t\t\t\t\t{metadata}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tmetadata\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\t\t\t</>\n\t\t) : null);\n\tconst resolvedTrack = trackSlot ?? (\n\t\t<ProgressTrack {...trackProps} size={trackProps?.size ?? size}>\n\t\t\t{trackProps?.children ?? <ProgressIndicator {...indicatorProps} tone={indicatorProps?.tone ?? tone} />}\n\t\t</ProgressTrack>\n\t);\n\n\treturn (\n\t\t<ProgressContext.Provider value={contextValue}>\n\t\t\t<ProgressPrimitive.Root\n\t\t\t\tref={ref}\n\t\t\t\tvalue={value}\n\t\t\t\tmin={min}\n\t\t\t\tmax={max}\n\t\t\t\tformat={format}\n\t\t\t\tlocale={resolvedLocale}\n\t\t\t\tgetAriaValueText={resolvedGetAriaValueText}\n\t\t\t\taria-describedby={descriptionIds}\n\t\t\t\tdata-slot=\"progress\"\n\t\t\t\tdata-size={size}\n\t\t\t\tdata-tone={tone}\n\t\t\t\tclassName={mergeStateClassName<ProgressRootState>(\n\t\t\t\t\t'progress--component grid min-w-0 w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-x-space-lg gap-y-space-sm',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{resolvedHeader}\n\t\t\t\t{resolvedTrack}\n\t\t\t</ProgressPrimitive.Root>\n\t\t</ProgressContext.Provider>\n\t);\n});\nProgress.displayName = 'Progress';\n\nconst ProgressTrack = forwardRef<HTMLDivElement, ProgressTrackProps>(function ProgressTrack(\n\t{ className, size: sizeProp, ...props },\n\tref,\n) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\treturn (\n\t\t<ProgressPrimitive.Track\n\t\t\tref={ref}\n\t\t\tdata-slot=\"progress-track\"\n\t\t\tdata-size={size}\n\t\t\tclassName={mergeStateClassName<ProgressTrackState>(\n\t\t\t\tcn(\n\t\t\t\t\t'progress-track--component progress--track relative col-span-full flex w-full items-center overflow-hidden rounded-full bg-muted',\n\t\t\t\t\ttrackHeightClasses[size],\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nProgressTrack.displayName = 'ProgressTrack';\n\nconst ProgressIndicator = forwardRef<HTMLDivElement, ProgressIndicatorProps>(function ProgressIndicator(\n\t{ className, tone = 'primary', ...props },\n\tref,\n) {\n\treturn (\n\t\t<ProgressPrimitive.Indicator\n\t\t\tref={ref}\n\t\t\tdata-slot=\"progress-indicator\"\n\t\t\tdata-tone={tone}\n\t\t\tclassName={mergeStateClassName<ProgressIndicatorState>(\n\t\t\t\tcn(\n\t\t\t\t\t'progress-indicator--component progress--indicator h-full rounded-full transition-[width] duration-300 ease-out motion-reduce:transition-none',\n\t\t\t\t\t'data-[indeterminate]:w-full motion-safe:data-[indeterminate]:animate-pulse',\n\t\t\t\t\tINDICATOR_TONE_CLASSNAMES[tone],\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nProgressIndicator.displayName = 'ProgressIndicator';\n\nconst ProgressLabel = forwardRef<HTMLSpanElement, ProgressLabelProps>(function ProgressLabel(\n\t{ className, children, ...props },\n\tref,\n) {\n\treturn (\n\t\t<ProgressPrimitive.Label\n\t\t\tref={ref}\n\t\t\tdata-slot=\"progress-label\"\n\t\t\tclassName={mergeStateClassName<ProgressLabelState>(\n\t\t\t\t'progress-label--component progress--label min-w-0',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? (\n\t\t\t\t<Text tag=\"span\" weight=\"medium\" lineHeight=\"tight\" className=\"block\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</ProgressPrimitive.Label>\n\t);\n});\nProgressLabel.displayName = 'ProgressLabel';\n\nconst ProgressValue = forwardRef<HTMLSpanElement, ProgressValueProps>(function ProgressValue(\n\t{ className, children, ...props },\n\tref,\n) {\n\tconst context = useContext(ProgressContext);\n\n\treturn (\n\t\t<ProgressPrimitive.Value\n\t\t\tref={ref}\n\t\t\tdata-slot=\"progress-value\"\n\t\t\tclassName={mergeStateClassName<ProgressValueState>(\n\t\t\t\t'progress-value--component progress--value whitespace-nowrap',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{(_primitiveFormattedValue, primitiveValue) => {\n\t\t\t\tconst value = context?.value ?? primitiveValue;\n\t\t\t\tconst formattedValue = context?.formattedValue ?? _primitiveFormattedValue;\n\t\t\t\tconst content = children ? children(formattedValue, value) : formattedValue;\n\n\t\t\t\tif (content === null || content === undefined) return null;\n\t\t\t\treturn isSimpleText(content) ? (\n\t\t\t\t\t// The percentage is the bar's primary value, so it mirrors\n\t\t\t\t\t// ProgressLabel: provider-default size and medium weight. Pinning\n\t\t\t\t\t// it to `xs`/secondary demoted the headline number below its own\n\t\t\t\t\t// caption and left the two off a shared baseline.\n\t\t\t\t\t<Text tag=\"span\" weight=\"medium\" lineHeight=\"tight\" className=\"block tabular-nums\">\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\tcontent\n\t\t\t\t);\n\t\t\t}}\n\t\t</ProgressPrimitive.Value>\n\t);\n});\nProgressValue.displayName = 'ProgressValue';\n\nexport { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, defaultProgressStrings };\nexport type { ProgressStrings };\n"],"mappings":";;;;;;;;;;;AAKA,IAAaU,IAA0C,EACtD,oBAAoB,cACrB,GCiGMC,IAAkBC,EAA2C,IAAI;AAEvE,SAASC,EAAa,GAAqD;CAC1E,OAAO,OAAOC,KAAU,YAAY,OAAOA,KAA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