themelia-react-ui 2.0.3 → 2.0.5

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 (648) hide show
  1. package/CHANGELOG.md +185 -0
  2. package/README.md +168 -36
  3. package/dist/{accordion-Cjb6sx0G.js → accordion-B9MHG0cT.js} +11 -11
  4. package/dist/accordion-B9MHG0cT.js.map +1 -0
  5. package/dist/action-menu-Dr8K-ghE.js +284 -0
  6. package/dist/action-menu-Dr8K-ghE.js.map +1 -0
  7. package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-P-aVJisu.js} +42 -36
  8. package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
  9. package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-C58tQcBy.js} +387 -350
  10. package/dist/ai-artifact-C58tQcBy.js.map +1 -0
  11. package/dist/app-shell-B_IuNWOo.js +321 -0
  12. package/dist/app-shell-B_IuNWOo.js.map +1 -0
  13. package/dist/{attachment-BxDfL2mw.js → attachment-Dg_69lPS.js} +9 -9
  14. package/dist/{attachment-BxDfL2mw.js.map → attachment-Dg_69lPS.js.map} +1 -1
  15. package/dist/{auth-BGua8ouh.js → auth-DTkkshS8.js} +44 -47
  16. package/dist/auth-DTkkshS8.js.map +1 -0
  17. package/dist/{avatar-DAPlDvhJ.js → avatar-CeZaFmNH.js} +8 -8
  18. package/dist/avatar-CeZaFmNH.js.map +1 -0
  19. package/dist/{badge-HpFqoqSY.js → badge-xIiV_E7f.js} +5 -5
  20. package/dist/{badge-HpFqoqSY.js.map → badge-xIiV_E7f.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/batch-action-bar.js +1 -1
  27. package/dist/base/buttons.js +1 -1
  28. package/dist/base/cards.js +2 -2
  29. package/dist/base/carousel.js +3 -3
  30. package/dist/base/cascader.js +2 -372
  31. package/dist/base/chart.js +1 -1
  32. package/dist/base/choice-inputs.js +2 -2
  33. package/dist/base/code-block.js +1 -1
  34. package/dist/base/combobox.js +2 -2
  35. package/dist/base/command.js +1 -1
  36. package/dist/base/copyable.js +1 -1
  37. package/dist/base/date-pickers.js +2 -2
  38. package/dist/base/display.js +6 -6
  39. package/dist/base/feedback.js +3 -3
  40. package/dist/base/forms-numeric.js +1 -1
  41. package/dist/base/forms.js +3 -3
  42. package/dist/base/inline-edit.js +10 -10
  43. package/dist/base/item.js +1 -1
  44. package/dist/base/media-gallery.js +1 -1
  45. package/dist/base/metadata-list.js +1 -1
  46. package/dist/base/navigation.js +7 -7
  47. package/dist/base/popover-menu.js +1 -1
  48. package/dist/base/popover.js +1 -1
  49. package/dist/base/qr-code.js +1 -1
  50. package/dist/base/repeaters.js +12 -12
  51. package/dist/base/repeaters.js.map +1 -1
  52. package/dist/base/sheet.js +1 -1
  53. package/dist/base/sidebar.js +2 -2
  54. package/dist/base/signature-pad.js +7 -7
  55. package/dist/base/signature-pad.js.map +1 -1
  56. package/dist/base/skeleton.js +1 -1
  57. package/dist/base/spinner.js +4 -4
  58. package/dist/base/structure.js +1 -1
  59. package/dist/base/table.js +1 -1
  60. package/dist/base/text-inputs.js +2 -2
  61. package/dist/base/toaster.js +36 -36
  62. package/dist/base/toaster.js.map +1 -1
  63. package/dist/base/tree.js +1 -1
  64. package/dist/base/upload-queue.js +1 -1
  65. package/dist/base/upload.js +3 -3
  66. package/dist/base/value-inputs.js +1 -1
  67. package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-Cb8cuvyy.js} +6 -6
  68. package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
  69. package/dist/blocks/admin.js +23 -23
  70. package/dist/blocks/admin.js.map +1 -1
  71. package/dist/blocks/ai.js +230 -216
  72. package/dist/blocks/ai.js.map +1 -1
  73. package/dist/blocks/analytics/usage-card.js +1 -1
  74. package/dist/blocks/analytics.js +326 -307
  75. package/dist/blocks/analytics.js.map +1 -1
  76. package/dist/blocks/collaboration.js +1 -1
  77. package/dist/blocks/commerce/receipt.js +1 -1
  78. package/dist/blocks/commerce.js +1247 -1169
  79. package/dist/blocks/commerce.js.map +1 -1
  80. package/dist/blocks/data-display.js +2 -2
  81. package/dist/blocks/onboarding.js +6 -6
  82. package/dist/blocks/onboarding.js.map +1 -1
  83. package/dist/blocks/planning.js +11 -11
  84. package/dist/blocks/timelines.js +1 -1
  85. package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-J-K2kl4c.js} +6 -6
  86. package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
  87. package/dist/{button-DVzspB_G.js → button-S2Cubiiz.js} +3 -3
  88. package/dist/button-S2Cubiiz.js.map +1 -0
  89. package/dist/{buttons-DPZekJFu.js → buttons-BedGfygC.js} +16 -16
  90. package/dist/buttons-BedGfygC.js.map +1 -0
  91. package/dist/cards-rNX1M4Xn.js +69 -0
  92. package/dist/cards-rNX1M4Xn.js.map +1 -0
  93. package/dist/cascader-B1MiqkBq.js +439 -0
  94. package/dist/cascader-B1MiqkBq.js.map +1 -0
  95. package/dist/chart-Darg_0Kv.js +162 -0
  96. package/dist/chart-Darg_0Kv.js.map +1 -0
  97. package/dist/{checkbox-AWIhNhmo.js → checkbox-fflqmODR.js} +9 -5
  98. package/dist/checkbox-fflqmODR.js.map +1 -0
  99. package/dist/choice-inputs-zUgBZfE4.js +777 -0
  100. package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
  101. package/dist/{code-block-DeneBJR_.js → code-block-BzmM9Eig.js} +9 -9
  102. package/dist/code-block-BzmM9Eig.js.map +1 -0
  103. package/dist/{collapsible-C-_l4hpy.js → collapsible-BkAI_XD4.js} +5 -5
  104. package/dist/{collapsible-C-_l4hpy.js.map → collapsible-BkAI_XD4.js.map} +1 -1
  105. package/dist/{collection-content-By56pLog.js → collection-content-gDh1v6O4.js} +3 -3
  106. package/dist/{collection-content-By56pLog.js.map → collection-content-gDh1v6O4.js.map} +1 -1
  107. package/dist/combobox-BEx0vJgF.js +362 -0
  108. package/dist/combobox-BEx0vJgF.js.map +1 -0
  109. package/dist/{combobox-Dxo2fAYQ.js → combobox-BwzoXFSG.js} +254 -247
  110. package/dist/combobox-BwzoXFSG.js.map +1 -0
  111. package/dist/{command-C25VMRII.js → command-CrlPIL6m.js} +12 -12
  112. package/dist/command-CrlPIL6m.js.map +1 -0
  113. package/dist/{comments-DD0DUPwJ.js → comments-Dmpp0YIc.js} +380 -379
  114. package/dist/comments-Dmpp0YIc.js.map +1 -0
  115. package/dist/components/base/action-menu/action-menu.d.ts +9 -1
  116. package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
  117. package/dist/components/base/cards/card.recipes.d.ts +16 -7
  118. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
  119. package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
  120. package/dist/components/base/cards/smart-card.types.d.ts +11 -7
  121. package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
  122. package/dist/components/base/chart/chart.d.ts +6 -1
  123. package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
  124. package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
  125. package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
  126. package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
  127. package/dist/components/base/combobox/index.d.ts +4 -2
  128. package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
  129. package/dist/components/base/feedback/alert.d.ts +1 -1
  130. package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
  131. package/dist/components/base/forms/form-field.d.ts +5 -3
  132. package/dist/components/base/forms/form-sizing.d.ts +7 -7
  133. package/dist/components/base/forms/index.d.ts +1 -0
  134. package/dist/components/base/forms/server-errors.d.ts +16 -0
  135. package/dist/components/base/forms/workflow.d.ts +11 -2
  136. package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
  137. package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
  138. package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
  139. package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
  140. package/dist/components/base/navigation/page-header/page-header.d.ts +13 -4
  141. package/dist/components/base/popover/popover.d.ts +3 -3
  142. package/dist/components/base/popover/popover.recipes.d.ts +10 -6
  143. package/dist/components/base/sheet/sheet.d.ts +2 -0
  144. package/dist/components/base/sidebar/index.d.ts +1 -1
  145. package/dist/components/base/sidebar/sidebar.d.ts +27 -5
  146. package/dist/components/base/structure/composition.recipes.d.ts +17 -0
  147. package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
  148. package/dist/components/base/text-inputs/input.d.ts +4 -2
  149. package/dist/components/base/text-inputs/textarea.d.ts +4 -2
  150. package/dist/components/base/toaster/index.d.ts +1 -0
  151. package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
  152. package/dist/components/base/value-inputs/slider.d.ts +5 -1
  153. package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
  154. package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
  155. package/dist/components/blocks/ai/ai-tool-call/types.d.ts +3 -1
  156. package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
  157. package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
  158. package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
  159. package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
  160. package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
  161. package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
  162. package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
  163. package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
  164. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
  165. package/dist/components/blocks/commerce/index.d.ts +7 -6
  166. package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
  167. package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
  168. package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
  169. package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
  170. package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
  171. package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
  172. package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
  173. package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
  174. package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
  175. package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
  176. package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
  177. package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
  178. package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
  179. package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
  180. package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
  181. package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
  182. package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
  183. package/dist/components/features/activities/activities.types.d.ts +8 -2
  184. package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
  185. package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
  186. package/dist/components/features/event-calendar/colors.d.ts +2 -2
  187. package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
  188. package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
  189. package/dist/components/features/filters/filters.strings.d.ts +4 -0
  190. package/dist/components/features/filters/filters.types.d.ts +3 -0
  191. package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
  192. package/dist/components/features/filters/partials/filter-popover-content.d.ts +1 -1
  193. package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
  194. package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
  195. package/dist/components/features/filters/utils/filter-utils.d.ts +21 -3
  196. package/dist/components/features/global-search/global-search.types.d.ts +2 -0
  197. package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
  198. package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
  199. package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
  200. package/dist/components/features/media-library/media-library.types.d.ts +14 -4
  201. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  202. package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
  203. package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
  204. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  205. package/dist/components/features/products/products.strings.d.ts +9 -1
  206. package/dist/components/features/products/products.types.d.ts +43 -6
  207. package/dist/components/features/resource/resource.d.ts +5 -1
  208. package/dist/components/features/resource/resource.types.d.ts +12 -1
  209. package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
  210. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
  211. package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
  212. package/dist/components/features/table/table.types.d.ts +1 -1
  213. package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
  214. package/dist/components/layout/app-shell/index.d.ts +1 -1
  215. package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
  216. package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
  217. package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
  218. package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
  219. package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
  220. package/dist/components/layout/header/header.recipes.d.ts +6 -0
  221. package/dist/components/layout/header/header.types.d.ts +6 -6
  222. package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
  223. package/dist/components/layout/page/index.d.ts +2 -1
  224. package/dist/components/layout/page/page.d.ts +1 -0
  225. package/dist/components/layout/page/page.strings.d.ts +11 -0
  226. package/dist/components/layout/page/page.types.d.ts +69 -17
  227. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  228. package/dist/components/layout/settings/settings.d.ts +9 -2
  229. package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
  230. package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
  231. package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
  232. package/dist/components/layout/sidebar/index.d.ts +2 -1
  233. package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +36 -0
  234. package/dist/components/layout/sidebar/sidebar.context.d.ts +5 -7
  235. package/dist/components/layout/sidebar/sidebar.types.d.ts +48 -10
  236. package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
  237. package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
  238. package/dist/components/typography/text.styles.d.ts +26 -1
  239. package/dist/components/ui/alert-dialog.d.ts +2 -2
  240. package/dist/components/ui/combobox.d.ts +1 -1
  241. package/dist/components/ui/dialog.d.ts +2 -2
  242. package/dist/components/ui/overlay-layer.d.ts +18 -0
  243. package/dist/components/ui/sheet.d.ts +5 -1
  244. package/dist/components/ui/sidebar-state.d.ts +82 -0
  245. package/dist/components/ui/sidebar.d.ts +5 -17
  246. package/dist/composition.recipes-COdiFhxB.js +19 -0
  247. package/dist/composition.recipes-COdiFhxB.js.map +1 -0
  248. package/dist/containers-CIxwbZt5.js +112 -0
  249. package/dist/containers-CIxwbZt5.js.map +1 -0
  250. package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
  251. package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
  252. package/dist/{copyable-ClBuk_UK.js → copyable-DIznBqiT.js} +7 -7
  253. package/dist/{copyable-ClBuk_UK.js.map → copyable-DIznBqiT.js.map} +1 -1
  254. package/dist/{data-display-DT_khPl_.js → data-display-BdgCAw8T.js} +277 -285
  255. package/dist/data-display-BdgCAw8T.js.map +1 -0
  256. package/dist/{date-DCrsDTZc.js → date-Cq8ioE4o.js} +5 -5
  257. package/dist/{date-DCrsDTZc.js.map → date-Cq8ioE4o.js.map} +1 -1
  258. package/dist/{date-picker-B2K3ucWn.js → date-picker-RlIzKom_.js} +501 -480
  259. package/dist/date-picker-RlIzKom_.js.map +1 -0
  260. package/dist/date-pickers-DY-CpXS1.js +179 -0
  261. package/dist/date-pickers-DY-CpXS1.js.map +1 -0
  262. package/dist/{display-hAc1HjpI.js → display-KsZLw9Ov.js} +9 -9
  263. package/dist/{display-hAc1HjpI.js.map → display-KsZLw9Ov.js.map} +1 -1
  264. package/dist/dropdown-menu-CLs8Lihj.js +194 -0
  265. package/dist/dropdown-menu-CLs8Lihj.js.map +1 -0
  266. package/dist/features/activities.js +302 -253
  267. package/dist/features/activities.js.map +1 -1
  268. package/dist/features/ai-chat.js +15 -14
  269. package/dist/features/ai-chat.js.map +1 -1
  270. package/dist/features/appointment-calendar.js +222 -220
  271. package/dist/features/appointment-calendar.js.map +1 -1
  272. package/dist/features/async-preview.js +11 -10
  273. package/dist/features/async-preview.js.map +1 -1
  274. package/dist/features/combobox.js +1 -1
  275. package/dist/features/comments.js +1 -1
  276. package/dist/features/data-view.js +13 -13
  277. package/dist/features/data-view.js.map +1 -1
  278. package/dist/features/email-composer.js +249 -249
  279. package/dist/features/email-composer.js.map +1 -1
  280. package/dist/features/event-calendar.js +264 -269
  281. package/dist/features/event-calendar.js.map +1 -1
  282. package/dist/features/filters.js +1 -1
  283. package/dist/features/global-search.js +167 -138
  284. package/dist/features/global-search.js.map +1 -1
  285. package/dist/features/kanban.js +6 -7
  286. package/dist/features/kanban.js.map +1 -1
  287. package/dist/features/map.js +269 -260
  288. package/dist/features/map.js.map +1 -1
  289. package/dist/features/media-library.js +827 -777
  290. package/dist/features/media-library.js.map +1 -1
  291. package/dist/features/mentions.js +1 -1
  292. package/dist/features/overlays.js +1 -1
  293. package/dist/features/products.js +1246 -1169
  294. package/dist/features/products.js.map +1 -1
  295. package/dist/features/questionnaire.js +13 -13
  296. package/dist/features/questionnaire.js.map +1 -1
  297. package/dist/features/resource-assignment.js +8 -8
  298. package/dist/features/resource.js +127 -123
  299. package/dist/features/resource.js.map +1 -1
  300. package/dist/features/rich-text-editor.js +2 -2
  301. package/dist/features/schema-form.js +254 -253
  302. package/dist/features/schema-form.js.map +1 -1
  303. package/dist/features/suggestions.js +3 -3
  304. package/dist/features/sync.js +3 -3
  305. package/dist/features/table.js +1 -1
  306. package/dist/features/theme-tweaker.js +95 -96
  307. package/dist/features/theme-tweaker.js.map +1 -1
  308. package/dist/{feedback-BYIhtitP.js → feedback-Dm4izqFn.js} +81 -80
  309. package/dist/feedback-Dm4izqFn.js.map +1 -0
  310. package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
  311. package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
  312. package/dist/{filters-DJVAveHA.js → filters-DzgSJpMK.js} +693 -645
  313. package/dist/filters-DzgSJpMK.js.map +1 -0
  314. package/dist/{form-field-CwH9y77i.js → form-field-BriWAXyg.js} +14 -8
  315. package/dist/form-field-BriWAXyg.js.map +1 -0
  316. package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-Bs2qFUeE.js} +4 -4
  317. package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
  318. package/dist/forms-C0RGnJTe.js +216 -0
  319. package/dist/forms-C0RGnJTe.js.map +1 -0
  320. package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-DIhghX1Q.js} +295 -291
  321. package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
  322. package/dist/{header-BSfIEWbI.js → header-DMMxG__r.js} +67 -63
  323. package/dist/header-DMMxG__r.js.map +1 -0
  324. package/dist/header.recipes-BigdJjw1.js +6 -0
  325. package/dist/header.recipes-BigdJjw1.js.map +1 -0
  326. package/dist/hooks/useFormErrors.d.ts +1 -1
  327. package/dist/{hooks-ClH9thn4.js → hooks-DB6CJ4MR.js} +26 -14
  328. package/dist/hooks-DB6CJ4MR.js.map +1 -0
  329. package/dist/{icon-badge-DYKIwvOV.js → icon-badge-DZF-YjQp.js} +4 -4
  330. package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
  331. package/dist/index.js +4 -5
  332. package/dist/input-CvyDQlY7.js +289 -0
  333. package/dist/input-CvyDQlY7.js.map +1 -0
  334. package/dist/input-DMBwAZmr.js +21 -0
  335. package/dist/input-DMBwAZmr.js.map +1 -0
  336. package/dist/item-DjCcM18E.js +277 -0
  337. package/dist/item-DjCcM18E.js.map +1 -0
  338. package/dist/layout/app-shell.js +1 -1
  339. package/dist/layout/auth.js +1 -1
  340. package/dist/layout/containers.js +1 -1
  341. package/dist/layout/header.js +1 -1
  342. package/dist/layout/hooks.js +1 -1
  343. package/dist/layout/navigation.js +1 -1
  344. package/dist/layout/page.js +2 -2
  345. package/dist/layout/settings.js +1 -1
  346. package/dist/layout/sidebar.js +3 -3
  347. package/dist/layout/workspace.js +1 -1
  348. package/dist/layout.js +11 -11
  349. package/dist/lib/affordance-geometry.generated.d.ts +41 -35
  350. package/dist/lib/control-group-recipes.d.ts +5 -5
  351. package/dist/lib/field-affordance-recipes.d.ts +2 -2
  352. package/dist/lib/motion-recipes.d.ts +3 -0
  353. package/dist/lib/navigation-row-recipes.d.ts +7 -7
  354. package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
  355. package/dist/lib/portal-recipes.d.ts +3 -0
  356. package/dist/lib/token-merge.generated.d.ts +13 -10
  357. package/dist/lib/ui-provider/types.d.ts +1 -1
  358. package/dist/lib/utils.js +1 -1
  359. package/dist/map-demo-tile.svg +1 -1
  360. package/dist/{media-gallery-3zIVLMWH.js → media-gallery-C-vChPmE.js} +6 -6
  361. package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-C-vChPmE.js.map} +1 -1
  362. package/dist/{mentions-CGlEJ15c.js → mentions-0_4nWuI-.js} +10 -10
  363. package/dist/{mentions-CGlEJ15c.js.map → mentions-0_4nWuI-.js.map} +1 -1
  364. package/dist/{message-DZ_ruyUV.js → message-g8p7eVtN.js} +7 -7
  365. package/dist/message-g8p7eVtN.js.map +1 -0
  366. package/dist/metadata-list-C3MkU-Om.js +443 -0
  367. package/dist/metadata-list-C3MkU-Om.js.map +1 -0
  368. package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
  369. package/dist/motion-recipes-DitYv6P2.js.map +1 -0
  370. package/dist/navigation-C90-oQFq.js +255 -0
  371. package/dist/navigation-C90-oQFq.js.map +1 -0
  372. package/dist/{navigation-BzhHI3lo.js → navigation-DaRjthVk.js} +101 -82
  373. package/dist/navigation-DaRjthVk.js.map +1 -0
  374. package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
  375. package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
  376. package/dist/{number-DbV1Dija.js → number-CRU3kGuk.js} +5 -5
  377. package/dist/{number-DbV1Dija.js.map → number-CRU3kGuk.js.map} +1 -1
  378. package/dist/overflow-tab-bar-IVFVQFV6.js +172 -0
  379. package/dist/overflow-tab-bar-IVFVQFV6.js.map +1 -0
  380. package/dist/overlays-BSgCtM2v.js +1013 -0
  381. package/dist/overlays-BSgCtM2v.js.map +1 -0
  382. package/dist/page-DUUKDAjo.js +331 -0
  383. package/dist/page-DUUKDAjo.js.map +1 -0
  384. package/dist/page-header-commands-7P3sfE9u.js +193 -0
  385. package/dist/page-header-commands-7P3sfE9u.js.map +1 -0
  386. package/dist/{pagination-BL25hu2s.js → pagination-CgCjElfu.js} +7 -7
  387. package/dist/{pagination-BL25hu2s.js.map → pagination-CgCjElfu.js.map} +1 -1
  388. package/dist/popover-B85RenIl.js +201 -0
  389. package/dist/popover-B85RenIl.js.map +1 -0
  390. package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-DlnQ2zlR.js} +7 -7
  391. package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-DlnQ2zlR.js.map} +1 -1
  392. package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DdiEp0rd.js} +18 -11
  393. package/dist/popover.recipes-DdiEp0rd.js.map +1 -0
  394. package/dist/portal-recipes-BpsV_iRw.js +9 -0
  395. package/dist/portal-recipes-BpsV_iRw.js.map +1 -0
  396. package/dist/{primitives-BFK08r9M.js → primitives-ByWgGUgt.js} +6 -6
  397. package/dist/{primitives-BFK08r9M.js.map → primitives-ByWgGUgt.js.map} +1 -1
  398. package/dist/primitives.js +4 -4
  399. package/dist/{progress-B1VnCT0K.js → progress-BJhQP9WX.js} +9 -9
  400. package/dist/{progress-B1VnCT0K.js.map → progress-BJhQP9WX.js.map} +1 -1
  401. package/dist/{receipt-BVSOH3Xo.js → receipt-tOc7B3hw.js} +7 -7
  402. package/dist/receipt-tOc7B3hw.js.map +1 -0
  403. package/dist/{rich-text-GOUyKQ-s.js → rich-text-Dth5E882.js} +4 -4
  404. package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-Dth5E882.js.map} +1 -1
  405. package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-C1fOjBTd.js} +429 -430
  406. package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
  407. package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-laT3tpBT.js} +33 -29
  408. package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
  409. package/dist/{scroll-area-DcI-M1UT.js → scroll-area-B0dB2cBi.js} +2 -2
  410. package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
  411. package/dist/{separator-Bom7NsGO.js → separator-Bb17I4pu.js} +2 -2
  412. package/dist/{separator-Bom7NsGO.js.map → separator-Bb17I4pu.js.map} +1 -1
  413. package/dist/{separator-BDV-Y648.js → separator-Ct_WSWTJ.js} +3 -3
  414. package/dist/{separator-BDV-Y648.js.map → separator-Ct_WSWTJ.js.map} +1 -1
  415. package/dist/services/actions.js +1 -1
  416. package/dist/settings-Bar5wiSo.js +167 -0
  417. package/dist/settings-Bar5wiSo.js.map +1 -0
  418. package/dist/sheet-BGPERY55.js +250 -0
  419. package/dist/sheet-BGPERY55.js.map +1 -0
  420. package/dist/sidebar-D-JYMMbY.js +686 -0
  421. package/dist/sidebar-D-JYMMbY.js.map +1 -0
  422. package/dist/sidebar-f9gRWXIR.js +1001 -0
  423. package/dist/sidebar-f9gRWXIR.js.map +1 -0
  424. package/dist/skeleton-BapcJd9C.js +265 -0
  425. package/dist/skeleton-BapcJd9C.js.map +1 -0
  426. package/dist/smart-card-CW0hjetE.js +617 -0
  427. package/dist/smart-card-CW0hjetE.js.map +1 -0
  428. package/dist/{structure-BmisBK-3.js → structure-DuxKl954.js} +3 -3
  429. package/dist/{structure-BmisBK-3.js.map → structure-DuxKl954.js.map} +1 -1
  430. package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
  431. package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
  432. package/dist/style.css +1 -1
  433. package/dist/{table-DsfzoUia.js → table-B4TE7iOV.js} +3 -3
  434. package/dist/{table-DsfzoUia.js.map → table-B4TE7iOV.js.map} +1 -1
  435. package/dist/{table-BweFy_P9.js → table-CFOWY9pQ.js} +394 -388
  436. package/dist/table-CFOWY9pQ.js.map +1 -0
  437. package/dist/{tabs-CDocW5D1.js → tabs-e7ko9S2o.js} +11 -11
  438. package/dist/tabs-e7ko9S2o.js.map +1 -0
  439. package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-B1culiSK.js} +107 -104
  440. package/dist/text-inputs-B1culiSK.js.map +1 -0
  441. package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
  442. package/dist/text.styles-B64My8RZ.js.map +1 -0
  443. package/dist/theme.css +192 -149
  444. package/dist/{timelines-CwM_9IhD.js → timelines-D3Sl9ueq.js} +13 -12
  445. package/dist/timelines-D3Sl9ueq.js.map +1 -0
  446. package/dist/tooltip-8wz5S_Zr.js +113 -0
  447. package/dist/tooltip-8wz5S_Zr.js.map +1 -0
  448. package/dist/{tree-WnKQzwbq.js → tree-CzUJHnFs.js} +9 -9
  449. package/dist/{tree-WnKQzwbq.js.map → tree-CzUJHnFs.js.map} +1 -1
  450. package/dist/typography/rich-text.js +1 -1
  451. package/dist/typography-BQnine1k.js +117 -0
  452. package/dist/typography-BQnine1k.js.map +1 -0
  453. package/dist/typography.js +1 -1
  454. package/dist/ui-provider-C-74NVLc.js +178 -0
  455. package/dist/ui-provider-C-74NVLc.js.map +1 -0
  456. package/dist/ui-provider.js +2 -3
  457. package/dist/{upload-CXyxmQBP.js → upload-BOW6U2tI.js} +25 -24
  458. package/dist/upload-BOW6U2tI.js.map +1 -0
  459. package/dist/{upload-queue-Boscubn9.js → upload-queue-qUXn1ykN.js} +16 -14
  460. package/dist/upload-queue-qUXn1ykN.js.map +1 -0
  461. package/dist/{usage-card-BhO5eqkX.js → usage-card-BeSLY0i0.js} +145 -137
  462. package/dist/usage-card-BeSLY0i0.js.map +1 -0
  463. package/dist/{utils-BRhFDwuU.js → utils-B6kKb8jB.js} +303 -144
  464. package/dist/utils-B6kKb8jB.js.map +1 -0
  465. package/dist/value-inputs-skdVB2zh.js +980 -0
  466. package/dist/value-inputs-skdVB2zh.js.map +1 -0
  467. package/dist/{value-typography-BP8OG6h5.js → value-typography-uAmWUAL1.js} +2 -2
  468. package/dist/{value-typography-BP8OG6h5.js.map → value-typography-uAmWUAL1.js.map} +1 -1
  469. package/dist/workspace-DHeHv0qw.js +411 -0
  470. package/dist/workspace-DHeHv0qw.js.map +1 -0
  471. package/docs/consumer-skill/SKILL.md +15 -129
  472. package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
  473. package/docs/consumer-skill/examples/app-layout.tsx +74 -13
  474. package/docs/consumer-skill/examples/authentication.tsx +77 -0
  475. package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
  476. package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
  477. package/docs/consumer-skill/examples/detail.tsx +5 -4
  478. package/docs/consumer-skill/examples/edit.tsx +30 -38
  479. package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
  480. package/docs/consumer-skill/examples/index-table.tsx +4 -4
  481. package/docs/consumer-skill/examples/manifest.json +88 -1
  482. package/docs/consumer-skill/examples/product-media.tsx +41 -0
  483. package/docs/consumer-skill/examples/product-parts.tsx +81 -0
  484. package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
  485. package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
  486. package/docs/consumer-skill/examples/rhf-overlay-form.tsx +105 -0
  487. package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
  488. package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
  489. package/docs/consumer-skill/references/agents-md.md +23 -11
  490. package/docs/consumer-skill/references/analytics.md +18 -1
  491. package/docs/consumer-skill/references/authentication.md +42 -0
  492. package/docs/consumer-skill/references/commerce-composition.md +97 -0
  493. package/docs/consumer-skill/references/component-contracts.json +325201 -0
  494. package/docs/consumer-skill/references/composition-mapping.md +106 -0
  495. package/docs/consumer-skill/references/composition.md +198 -46
  496. package/docs/consumer-skill/references/critique-rubric.md +98 -0
  497. package/docs/consumer-skill/references/custom-composition.md +261 -0
  498. package/docs/consumer-skill/references/data-reading.md +79 -0
  499. package/docs/consumer-skill/references/design-contract.md +43 -9
  500. package/docs/consumer-skill/references/discovery.md +109 -8
  501. package/docs/consumer-skill/references/domain-structures.md +124 -0
  502. package/docs/consumer-skill/references/installation.md +51 -36
  503. package/docs/consumer-skill/references/integration.md +41 -2
  504. package/docs/consumer-skill/references/product-composition.md +94 -0
  505. package/docs/consumer-skill/references/public-api.json +4390 -475
  506. package/docs/consumer-skill/references/review.md +47 -5
  507. package/docs/consumer-skill/references/rhf-workflows.md +93 -0
  508. package/docs/consumer-skill/references/screen-archetypes.md +34 -0
  509. package/docs/consumer-skill/references/screen-decisions.md +126 -0
  510. package/docs/consumer-skill/references/theming.md +25 -27
  511. package/docs/consumer-skill/references/tokens.json +20 -11
  512. package/docs/consumer-skill/references/view-craft.md +153 -0
  513. package/docs/consumer-skill/references/view-spec.md +73 -0
  514. package/docs/consumer-skill/references/workflows.md +9 -2
  515. package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
  516. package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
  517. package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
  518. package/docs/consumer-skill/scripts/composition.mjs +254 -0
  519. package/docs/consumer-skill/scripts/discovery.mjs +96 -10
  520. package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
  521. package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
  522. package/docs/consumer-skill/scripts/inspection.mjs +193 -0
  523. package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
  524. package/docs/consumer-skill/scripts/setup-skills.mjs +111 -0
  525. package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
  526. package/docs/consumer-skills/themelia-components/SKILL.md +31 -0
  527. package/docs/consumer-skills/themelia-composition/SKILL.md +34 -0
  528. package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
  529. package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
  530. package/docs/consumer-skills/themelia-foundation/SKILL.md +15 -0
  531. package/docs/consumer-skills/themelia-tokenization/SKILL.md +42 -0
  532. package/package.json +4 -2
  533. package/templates/README.md +39 -0
  534. package/templates/admin-shell-template.tsx +382 -0
  535. package/templates/analytics-operations-template.tsx +376 -0
  536. package/templates/customers-template.tsx +509 -0
  537. package/templates/index.ts +29 -0
  538. package/templates/orders-template.tsx +1102 -0
  539. package/templates/products-template.tsx +834 -0
  540. package/templates/user-permissions-template.tsx +450 -0
  541. package/dist/accordion-Cjb6sx0G.js.map +0 -1
  542. package/dist/action-menu-CllU52Mm.js +0 -280
  543. package/dist/action-menu-CllU52Mm.js.map +0 -1
  544. package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
  545. package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
  546. package/dist/app-shell-C4FhvCqF.js +0 -236
  547. package/dist/app-shell-C4FhvCqF.js.map +0 -1
  548. package/dist/auth-BGua8ouh.js.map +0 -1
  549. package/dist/avatar-DAPlDvhJ.js.map +0 -1
  550. package/dist/base/cascader.js.map +0 -1
  551. package/dist/batch-action-bar-DnUJ21NQ.js.map +0 -1
  552. package/dist/button-DVzspB_G.js.map +0 -1
  553. package/dist/buttons-DPZekJFu.js.map +0 -1
  554. package/dist/cards-BaBZR-AU.js +0 -68
  555. package/dist/cards-BaBZR-AU.js.map +0 -1
  556. package/dist/chart-ZOYyK2xG.js +0 -155
  557. package/dist/chart-ZOYyK2xG.js.map +0 -1
  558. package/dist/checkbox-AWIhNhmo.js.map +0 -1
  559. package/dist/choice-inputs-CNHvARCJ.js +0 -770
  560. package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
  561. package/dist/code-block-DeneBJR_.js.map +0 -1
  562. package/dist/combobox-DaHESuiL.js +0 -355
  563. package/dist/combobox-DaHESuiL.js.map +0 -1
  564. package/dist/combobox-Dxo2fAYQ.js.map +0 -1
  565. package/dist/command-C25VMRII.js.map +0 -1
  566. package/dist/comments-DD0DUPwJ.js.map +0 -1
  567. package/dist/containers-Mu1LMGV1.js +0 -103
  568. package/dist/containers-Mu1LMGV1.js.map +0 -1
  569. package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
  570. package/dist/data-display-DT_khPl_.js.map +0 -1
  571. package/dist/date-picker-B2K3ucWn.js.map +0 -1
  572. package/dist/date-pickers-Ds8gLaoP.js +0 -175
  573. package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
  574. package/dist/dropdown-menu-Cl4X7L5S.js +0 -193
  575. package/dist/dropdown-menu-Cl4X7L5S.js.map +0 -1
  576. package/dist/feedback-BYIhtitP.js.map +0 -1
  577. package/dist/field-affordance-recipes-DZhnIL_Y.js.map +0 -1
  578. package/dist/filters-DJVAveHA.js.map +0 -1
  579. package/dist/form-field-CwH9y77i.js.map +0 -1
  580. package/dist/form-sizing-BdP_Mf5p.js.map +0 -1
  581. package/dist/forms-B9G_xwzi.js +0 -194
  582. package/dist/forms-B9G_xwzi.js.map +0 -1
  583. package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
  584. package/dist/header-BSfIEWbI.js.map +0 -1
  585. package/dist/hooks-ClH9thn4.js.map +0 -1
  586. package/dist/input-CZw8iU99.js +0 -21
  587. package/dist/input-CZw8iU99.js.map +0 -1
  588. package/dist/input-DQdEd0YD.js +0 -263
  589. package/dist/input-DQdEd0YD.js.map +0 -1
  590. package/dist/item-K5_ghvze.js +0 -275
  591. package/dist/item-K5_ghvze.js.map +0 -1
  592. package/dist/message-DZ_ruyUV.js.map +0 -1
  593. package/dist/metadata-list-8N16ZMW_.js +0 -405
  594. package/dist/metadata-list-8N16ZMW_.js.map +0 -1
  595. package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
  596. package/dist/navigation-Bnotn4AQ.js +0 -145
  597. package/dist/navigation-Bnotn4AQ.js.map +0 -1
  598. package/dist/navigation-BzhHI3lo.js.map +0 -1
  599. package/dist/navigation-row-recipes-BFLCk_Aq.js.map +0 -1
  600. package/dist/overflow-tab-bar-CWY7Nogn.js +0 -282
  601. package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
  602. package/dist/overlays-tMkF-VAN.js +0 -1003
  603. package/dist/overlays-tMkF-VAN.js.map +0 -1
  604. package/dist/page-CL9YeH_V.js +0 -224
  605. package/dist/page-CL9YeH_V.js.map +0 -1
  606. package/dist/page-header-commands-DOb6WsfD.js +0 -126
  607. package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
  608. package/dist/popover-gnTOhbFM.js +0 -198
  609. package/dist/popover-gnTOhbFM.js.map +0 -1
  610. package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
  611. package/dist/receipt-BVSOH3Xo.js.map +0 -1
  612. package/dist/rich-text-editor-cRLC-eBK.js.map +0 -1
  613. package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +0 -1
  614. package/dist/settings-ybnjVwbd.js +0 -171
  615. package/dist/settings-ybnjVwbd.js.map +0 -1
  616. package/dist/sheet-ijlsjq-n.js +0 -213
  617. package/dist/sheet-ijlsjq-n.js.map +0 -1
  618. package/dist/sidebar-Db6gkh3U.js +0 -619
  619. package/dist/sidebar-Db6gkh3U.js.map +0 -1
  620. package/dist/sidebar-DkTO4VTO.js +0 -512
  621. package/dist/sidebar-DkTO4VTO.js.map +0 -1
  622. package/dist/skeleton-Byjnt7qr.js +0 -264
  623. package/dist/skeleton-Byjnt7qr.js.map +0 -1
  624. package/dist/smart-card-DiC5aac3.js +0 -604
  625. package/dist/smart-card-DiC5aac3.js.map +0 -1
  626. package/dist/table-BweFy_P9.js.map +0 -1
  627. package/dist/tabs-CDocW5D1.js.map +0 -1
  628. package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
  629. package/dist/text.styles-g4He6UIW.js.map +0 -1
  630. package/dist/theme-scope-BJ6eE2xt.js +0 -50
  631. package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
  632. package/dist/timelines-CwM_9IhD.js.map +0 -1
  633. package/dist/tooltip-yiRJUFjp.js +0 -111
  634. package/dist/tooltip-yiRJUFjp.js.map +0 -1
  635. package/dist/typography-UTnveOEy.js +0 -117
  636. package/dist/typography-UTnveOEy.js.map +0 -1
  637. package/dist/ui-provider-C_U0Xma4.js +0 -136
  638. package/dist/ui-provider-C_U0Xma4.js.map +0 -1
  639. package/dist/upload-CXyxmQBP.js.map +0 -1
  640. package/dist/upload-queue-Boscubn9.js.map +0 -1
  641. package/dist/usage-card-BhO5eqkX.js.map +0 -1
  642. package/dist/use-mobile-vaLKwgyf.js +0 -15
  643. package/dist/use-mobile-vaLKwgyf.js.map +0 -1
  644. package/dist/utils-BRhFDwuU.js.map +0 -1
  645. package/dist/value-inputs-TaX4OjNk.js +0 -963
  646. package/dist/value-inputs-TaX4OjNk.js.map +0 -1
  647. package/dist/workspace-B-OEm3Kf.js +0 -408
  648. package/dist/workspace-B-OEm3Kf.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-DUUKDAjo.js","names":["_Fragment","buttonVariants","Button","Text","Heading","headingRoleSizes","copyRoleProps","Stack","EmptyDescription","EmptyTitle","LoadingState","EmptyHeader","Empty","ErrorState","compositionRhythm","compositionClasses","ActionMenu","ActionButtons","Badge","hasPageHeaderCommands","PageHeaderCommands","OverflowTabBar","useLayoutLinkRenderer","Container","TwoColumnLayout","Fragment$1","defaultPageStrings","resolveSlot","slot","context","PageHeader","TitleIcon","resolvedRenderLink","defaultBack","backHref","onBack","backLabel","cn","ArrowLeft","titleIconNode","icon","iconClassName","titleIconClassName","titleIconHref","onTitleIconClick","titleIconLabel","backControl","slots","titleStart","hasPrefix","hasCommands","primaryAction","secondaryActions","defaultActions","actions","actionsRegion","hasActions","beforeTitle","afterDescription","defaultSuffix","titleBadges","item","index","titleSuffix","simpleDescription","description","simpleTitle","title","className","contentClassName","textGap","headingTag","titleClassName","descriptionClassName","actionsClassName","tabs","blockPadding","Page","forwardRef","stringsProp","containerProps","strings","useStrings","bodyClassName","bodyProps","slotProps","toolbarClassName","toolbarProps","footerClassName","footerProps","resolvedAside","aside","hasAside","toolbarNode","toolbar","afterHeader","headerNode","header","renderLink","errorDescription","error","customError","body","loading","empty","emptySlot","children","bodyNode","maxWidth","narrow","padding","beforeHeader","asideRatio","defaultPageActionsStrings","PAGE_ACTIONS_MENU_CLASS","DEFAULT_MAX_INLINE_ACTIONS","toActionMenuAction","contextBase","disabled","action","renderAction","PageActions","filtered","useMemo","isNarrow","setIsNarrow","useState","useEffect","display","check","breakpoint","inlineContextBase","renderActionLink","props","inlineClass","inlineClassName","menuContentClass","menuClassName","dropdownActions","entry","inlineLimit","maxInlineActions","inlineCandidates","inline","menu","inlineActions","menuActions"],"sources":["../src/components/layout/page/page.strings.ts","../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":["/** Copy for Page's primary-body lifecycle states. */\nexport interface PageStrings {\n\tloadingLabel: string;\n\tloadingDescription: string;\n\terrorTitle: string;\n\terrorDescription: string;\n\tretryLabel: string;\n\temptyTitle: string;\n\temptyDescription: string;\n}\n\nexport const defaultPageStrings: PageStrings = {\n\tloadingLabel: 'Loading content',\n\tloadingDescription: 'Preparing the latest data for this view.',\n\terrorTitle: 'Content unavailable',\n\terrorDescription: 'The content could not be loaded.',\n\tretryLabel: 'Try again',\n\temptyTitle: 'No content found',\n\temptyDescription: 'There is no content available for this view.',\n};\n","/** Route header anatomy with four content slots and shared responsive commands. */\nimport { ArrowLeft } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { Badge } from '../../../base/badge';\nimport { Button } from '../../../base/buttons';\nimport { Stack } from '../../../base/structure';\nimport { OverflowTabBar } from '../../../base/navigation/overflow-tab-bar';\nimport { hasPageHeaderCommands, PageHeaderCommands } from '../../../base/navigation/page-header/page-header-commands';\nimport { buttonVariants } from '../../../base/buttons/button.variants';\nimport { Heading, Text } from '../../../typography';\nimport { copyRoleProps, headingRoleSizes } from '../../../typography/text.styles';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport type { PageHeaderProps, PageHeaderRenderContext, PageHeaderRenderSlot } from '../page.types';\n\nfunction resolveSlot(slot: PageHeaderRenderSlot, context: PageHeaderRenderContext): ReactNode {\n return typeof slot === 'function' ? slot(context) : slot ?? context.defaultContent;\n}\n\nexport function PageHeader({\n title, description, textGap = 'dense', headingTag = 'h1',\n titleIcon: TitleIcon, titleIconHref, onTitleIconClick, titleIconLabel = 'Open title link',\n backHref, onBack, backLabel = 'Back', titleBadges = [],\n primaryAction, secondaryActions, maxVisibleSecondaryActions, moreActionsLabel = 'More actions', tabs, actions, slots,\n renderLink, className, contentClassName, actionsClassName, titleClassName,\n titleIconClassName, descriptionClassName,\n}: PageHeaderProps) {\n const resolvedRenderLink = useLayoutLinkRenderer({renderLink});\n const hasBack = !!backHref || !!onBack;\n\tconst defaultBack = hasBack ? (\n\t\t<div className=\"flex items-center gap-space-sm shrink-0\">\n\t\t\t{backHref && !onBack ? (\n\t\t\t\tresolvedRenderLink({\n\t\t\t\t\thref: backHref,\n\t\t\t\t\t'aria-label': backLabel,\n\t\t\t\t\tclassName: cn('page-header--back-link', buttonVariants({tone:'secondary',buttonStyle:'ghost',size:'sm',iconOnly:true})),\n\t\t\t\t\tchildren: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ArrowLeft className=\"size-icon rtl:rotate-180\" aria-hidden=\"true\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t})\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\tclassName=\"page-header--back-button\"\n\t\t\t\t\tonClick={onBack}\n\t\t\t\t\taria-label={backLabel}\n\t\t\t\t>\n\t\t\t\t\t<ArrowLeft className=\"size-icon rtl:rotate-180\" aria-hidden=\"true\" />\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</div>\n\t) : null;\n\tconst titleIconNode = (() => {\n\t\tif (!TitleIcon) return null;\n\n\t\tconst icon = <TitleIcon className=\"size-icon\" aria-hidden=\"true\" />;\n\t\tconst iconClassName = cn(\n\t\t\t'page-header--title-icon flex size-icon shrink-0 items-center justify-center text-muted-foreground',\n\t\t\ttitleIconClassName,\n\t\t);\n\n\t\tif (titleIconHref && !onTitleIconClick) {\n\t\t\treturn resolvedRenderLink({\n\t\t\t\thref: titleIconHref,\n\t\t\t\t'aria-label': titleIconLabel,\n\t\t\t\tclassName: cn(\n\t\t\t\t\t'page-header--title-icon-link',\n\t\t\t\t\tbuttonVariants({tone:'secondary',buttonStyle:'ghost',size:'sm',iconOnly:true}),\n\t\t\t\t\ttitleIconClassName,\n\t\t\t\t),\n\t\t\t\tchildren: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{icon}\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\n\t\tif (onTitleIconClick) {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\tclassName={cn('page-header--title-icon-button', titleIconClassName)}\n\t\t\t\t\tonClick={onTitleIconClick}\n\t\t\t\t\taria-label={titleIconLabel}\n\t\t\t\t>\n\t\t\t\t\t{icon}\n\t\t\t\t</Button>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<span aria-hidden=\"true\" className={iconClassName}>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t);\n\t})();\n\n const backControl = slots?.back ?? defaultBack;\n const titleStart = backControl || titleIconNode ? (\n <Stack direction=\"horizontal\" align=\"center\" gap=\"sm\" wrap={false}>{backControl}{titleIconNode}</Stack>\n ) : null;\n const hasPrefix = titleStart != null;\n const hasCommands = hasPageHeaderCommands(primaryAction, secondaryActions);\n const defaultActions = hasCommands ? <>{actions}<PageHeaderCommands primaryAction={primaryAction} secondaryActions={secondaryActions} maxVisibleSecondaryActions={maxVisibleSecondaryActions} moreActionsLabel={moreActionsLabel} renderLink={resolvedRenderLink} /></> : actions;\n const actionsRegion = resolveSlot(slots?.actions, {renderLink:resolvedRenderLink, defaultContent:defaultActions});\n const hasActions = actionsRegion != null && actionsRegion !== false;\n const beforeTitle = resolveSlot(slots?.beforeTitle, {renderLink:resolvedRenderLink, defaultContent:null});\n const afterDescription = resolveSlot(slots?.afterDescription, {renderLink:resolvedRenderLink, defaultContent:null});\n const defaultSuffix = titleBadges.length ? <Stack direction=\"horizontal\" gap=\"sm\" wrap className=\"page-header--badges min-w-0 max-w-full\">\n {titleBadges.map((item,index)=><Badge key={item.key ?? index} tone={item.tone ?? 'secondary'}>{item.label}</Badge>)}\n </Stack> : null;\n const titleSuffix = resolveSlot(slots?.titleSuffix, {renderLink:resolvedRenderLink, defaultContent:defaultSuffix});\n const simpleDescription = typeof description === 'string' || typeof description === 'number' || typeof description === 'bigint';\n const simpleTitle = typeof title === 'string' || typeof title === 'number' || typeof title === 'bigint';\n\n return <header className={cn('layout-page-header--component page-heading--component page-header--component @container/page-header w-full min-w-0', className)}>\n <Stack gap=\"xl\">\n <Stack gap=\"sm\" className={cn('page-header--content-row min-w-0', contentClassName)}>\n {beforeTitle}\n {/* The actions sit beside the copy only while the copy keeps a readable measure\n (12rem beside the compact menu, 24rem once inline commands show at 40rem of\n header width);\n otherwise they wrap below it, so commands never cramp the title. */}\n <div className=\"page-header--headline-row flex min-w-0 flex-wrap items-start gap-x-space-xl gap-y-space-lg\">\n <div className={cn('page-header--copy-column page-header--title-row grid min-w-0 flex-1 basis-48 items-start gap-x-space-md @min-[40rem]/page-header:basis-96', hasPrefix ? 'grid-cols-[auto_minmax(0,1fr)]' : 'grid-cols-1', textGap === 'normal' ? 'gap-y-normal' : 'gap-y-dense')}>\n {hasPrefix && <span className=\"page-header--title-prefix inline-flex shrink-0 items-center self-start\">{titleStart}</span>}\n <Stack gap={textGap} className=\"page-header--copy-content min-w-0\">\n <Stack direction=\"horizontal\" gap=\"md\" align=\"center\" wrap className=\"page-header--title-line min-w-0\">\n {simpleTitle ? <Heading tag={headingTag} size={headingRoleSizes.route} className={cn('page-header--title min-w-0 [overflow-wrap:anywhere] border-0 pb-0',titleClassName)}>{title}</Heading> : title}\n {titleSuffix}\n </Stack>\n {((description != null && description !== false) || (afterDescription != null && afterDescription !== false)) && <Stack gap=\"dense\" className=\"page-header--title-block min-w-0\">\n {simpleDescription ? <Text {...copyRoleProps.structuralDescription} className={cn('page-header--description max-w-2xl [overflow-wrap:anywhere]',descriptionClassName)}>{description}</Text> : description}\n {afterDescription}\n </Stack>}\n </Stack>\n </div>\n {hasActions && <Stack direction=\"horizontal\" gap=\"md\" className={cn('page-header--actions max-w-full shrink-0 self-start', hasCommands && slots?.actions == null && 'justify-end', actionsClassName)}>{actionsRegion}</Stack>}\n </div>\n </Stack>\n {tabs && tabs.items.length > 0 && <OverflowTabBar items={tabs.items} value={tabs.value} onValueChange={tabs.onValueChange} className=\"page-header--tabs\" strings={{navigationLabel:tabs.label ?? 'Sections',more:tabs.moreLabel ?? 'More'}} />}\n </Stack>\n </header>;\n}\n","import { forwardRef } from 'react';\n\nimport { ErrorState, LoadingState, Empty, EmptyHeader, EmptyTitle, EmptyDescription } from '../../base/feedback';\nimport { Stack } from '../../base/structure';\nimport { compositionClasses, compositionRhythm } from '../../base/structure/composition.recipes';\nimport { Container, TwoColumnLayout } from '../containers';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport type { PageProps } from './page.types';\nimport { defaultPageStrings } from './page.strings';\nimport { PageHeader } from './partials/page-header';\n\nconst blockPadding = {none: 'py-0', sm: 'py-surface-xs', md: 'py-surface', lg: 'py-surface-lg'} as const;\n\n/** Route containment, header, lifecycle states and optional secondary context, without owning scrolling. */\nexport const Page = forwardRef<HTMLDivElement, PageProps>(function Page({\n header, children, slotProps, slots, renderLink, maxWidth, narrow = false,\n gutter = 'lg', padding = 'lg', aside, asideRatio = '7/5', stickyAside,\n toolbar, beforeHeader, afterHeader, loading = false, error, onRetry,\n empty = false, emptySlot, strings: stringsProp, className, render,\n ...containerProps\n}, ref) {\n const strings = useStrings(defaultPageStrings, stringsProp);\n const {className: bodyClassName, ...bodyProps} = slotProps?.body ?? {};\n const {className: toolbarClassName, ...toolbarProps} = slotProps?.toolbar ?? {};\n const {className: footerClassName, ...footerProps} = slotProps?.footer ?? {};\n const resolvedAside = slots?.aside ?? aside;\n const hasAside = resolvedAside !== undefined && resolvedAside !== null && resolvedAside !== false;\n const toolbarNode = slots?.toolbar ?? toolbar ?? afterHeader;\n const headerNode = slots?.header ?? (header ? <PageHeader {...header} renderLink={header.renderLink ?? renderLink} /> : null);\n const errorDescription = error instanceof Error ? error.message\n : typeof error === 'string' || typeof error === 'number' ? String(error) : strings.errorDescription;\n const customError = error && typeof error !== 'boolean' && typeof error !== 'string' && typeof error !== 'number' && !(error instanceof Error) ? error : undefined;\n const body = loading ? slots?.loading ?? <LoadingState variant=\"panel\" label={strings.loadingLabel} description={strings.loadingDescription} skeleton lines={4} />\n : error ? slots?.error ?? customError ?? <ErrorState variant=\"panel\" title={strings.errorTitle} description={errorDescription} onRetry={onRetry} retryLabel={strings.retryLabel} />\n : empty ? slots?.empty ?? emptySlot ?? <Empty><EmptyHeader><EmptyTitle>{strings.emptyTitle}</EmptyTitle><EmptyDescription>{strings.emptyDescription}</EmptyDescription></EmptyHeader></Empty>\n : children;\n const bodyNode = body !== undefined && body !== null ? (\n <div {...bodyProps} data-slot=\"page-body\" className={cn('page--body relative flex min-w-0 w-full flex-col', compositionClasses.subjects, bodyClassName)}>\n {body}\n </div>\n ) : null;\n\n return (\n <Container {...containerProps} ref={ref} render={render} maxWidth={maxWidth ?? (narrow ? 'md' : hasAside ? 'xl' : 'lg')}\n gutter={gutter} className={cn('font-sans', blockPadding[padding], className)}>\n <Stack gap={compositionRhythm.page} className=\"page--component\">\n {beforeHeader}\n {headerNode}\n {toolbarNode != null && toolbarNode !== false && <div {...toolbarProps} data-slot=\"page-toolbar\" className={cn('page--toolbar min-w-0', toolbarClassName)}>{toolbarNode}</div>}\n {hasAside ? <TwoColumnLayout adaptTo=\"container\" ratio={asideRatio} stickyAside={stickyAside} main={bodyNode} aside={resolvedAside} slotProps={{aside: slotProps?.aside}} /> : bodyNode}\n {slots?.footer != null && slots.footer !== false && <div {...footerProps} data-slot=\"page-footer\" className={cn('page--footer min-w-0', footerClassName)}>{slots.footer}</div>}\n </Stack>\n </Container>\n );\n});\nPage.displayName = 'Page';\n","/**\n * Page-level types for `Page`, `PageHeader`, `PageActions`, and exported\n * partials. All navigation is framework-neutral via `renderLink`.\n */\nimport type { ComponentType, JSX, Key, ReactNode } from 'react';\n\nimport type {\n\tLayoutLinkRenderer,\n\tLayoutNavigationAdapter,\n\tLayoutSlotAttributes,\n} from '../layout.types';\nimport type { TextGap } from '../../base/structure';\nimport type { ButtonSize } from '../../base/buttons';\nimport type { HeadingTag } from '../../typography';\nimport type { ContainerGutter, ContainerMaxWidth, ContainerProps } from '../containers/containers.types';\nimport type { StringsProp } from '../../../lib/strings';\nimport type { BadgeTone } from '../../base/badge';\nimport type { ActionPresentation } from '../../../lib/action-presentation';\nimport type { PageHeaderAction } from '../../base/navigation/page-header';\nimport type { OverflowTabItem } from '../../base/navigation';\nimport type { TwoColumnLayoutProps } from '../containers';\nimport type { PageStrings } from './page.strings';\n\nexport interface PageTitleBadge {\n\t/** Display label. */\n\tlabel: ReactNode;\n\t/** Semantic color intent. */\n\ttone?: BadgeTone;\n\tkey?: Key;\n}\n\nexport type { PageHeaderAction } from '../../base/navigation/page-header';\n\n/** Section tabs under a record's header. */\nexport interface PageHeaderTabs {\n\t/** Sections in order. `badge` shows a count chip beside the label. */\n\titems: OverflowTabItem[];\n\t/** Id of the active section. */\n\tvalue?: string;\n\t/**\n\t * Fired with the id of the chosen section. Switch the content or route here;\n\t * an item `href` renders a native link.\n\t */\n\tonValueChange?: (id: string) => void;\n\t/** Accessible name of the tab list. Default: `'Sections'`. */\n\tlabel?: string;\n\t/** Label of the trigger that holds tabs which do not fit. Default: `'More'`. */\n\tmoreLabel?: string;\n}\n\nexport interface PageHeaderRenderContext {\n\t/** The framework-neutral link renderer used by this header. */\n\trenderLink: LayoutLinkRenderer;\n\t/** Existing content for this position; actions includes the responsive command row. */\n\tdefaultContent: ReactNode;\n}\n\n/** A content node, or a render callback that can keep or replace its default content. */\nexport type PageHeaderRenderSlot = ReactNode | ((context: PageHeaderRenderContext) => ReactNode);\n\nexport interface PageHeaderSlots {\n\t/** @deprecated Use backHref/onBack for navigation. Retained as a custom back-control escape hatch. */\n\tback?: ReactNode;\n\t/** Context above the title, such as breadcrumbs. */\n\tbeforeTitle?: PageHeaderRenderSlot;\n\t/** Content beside the title, such as a status or count. */\n\ttitleSuffix?: PageHeaderRenderSlot;\n\t/** Context below the description. Compose metadata or other content here. */\n\tafterDescription?: PageHeaderRenderSlot;\n\t/** Keep, wrap or replace defaultContent's responsive command row. */\n\tactions?: PageHeaderRenderSlot;\n}\n\nexport interface PageHeaderProps extends LayoutNavigationAdapter {\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Supporting copy under the title. */\n\tdescription?: ReactNode;\n\t/** Shared title/description rhythm. Defaults to dense for page copy. */\n\ttextGap?: TextGap;\n\t/** Semantic heading level for the title. Defaults to `h1`, the route's main heading; use `h2` when the page sits inside another titled page. */\n\theadingTag?: HeadingTag;\n\t/** @deprecated Compose custom title content with slots.titleSuffix or a React-node title. */\n\ttitleIcon?: ComponentType<{ className?: string }>;\n\t/** @deprecated Compose a linked item in a render slot using its renderLink context. */\n\ttitleIconHref?: string;\n\t/** @deprecated Compose a command in slots.actions or describe it with primaryAction/secondaryActions. */\n\tonTitleIconClick?: () => void;\n\t/** @deprecated Accessible name for the compatibility title-icon control. */\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/** @deprecated Render title content with slots.titleSuffix. Retained for existing badge definitions. */\n\ttitleBadges?: PageTitleBadge[];\n\t/**\n\t * The page's one main command: a solid primary button after the secondary\n\t * commands. Compact headers place it first in the More actions menu.\n\t */\n\tprimaryAction?: PageHeaderAction;\n\t/**\n\t * Supporting commands in priority order. The first two render as outline\n\t * buttons before the primary command; the rest, and every destructive\n\t * command, move into the More actions menu, which always closes the row.\n\t * Below 40rem of header width, all commands collapse into that menu.\n\t */\n\tsecondaryActions?: readonly PageHeaderAction[];\n\t/**\n\t * How many routine secondary commands render as outline buttons on wide\n\t * headers; later ones join the More actions menu. Use `1` or `0` when long\n\t * labels beside the primary command would crowd the header; `Infinity`\n\t * keeps every routine command inline. @default 2\n\t */\n\tmaxVisibleSecondaryActions?: number;\n\t/** Accessible name of the More actions menu trigger. */\n\tmoreActionsLabel?: string;\n\t/**\n\t * Section tabs under the header, for a record split into sections such as\n\t * documents and history. Tabs that do not fit move into a More menu, and\n\t * the active tab stays visible.\n\t */\n\ttabs?: PageHeaderTabs;\n\t/**\n\t * @deprecated Customize commands with slots.actions; put other controls in Page toolbar.\n\t */\n\tactions?: ReactNode;\n\t/** Replaces individual regions of the shell. */\n\tslots?: PageHeaderSlots;\n\tclassName?: string;\n\t/** Merged onto the content region. */\n\tcontentClassName?: string;\n\tactionsClassName?: string;\n\ttitleClassName?: string;\n\ttitleIconClassName?: string;\n\tdescriptionClassName?: string;\n}\n\nexport interface PageActionContext {\n\tindex: number;\n\tisInline: boolean;\n\trenderLink: LayoutLinkRenderer;\n}\n\n/** @deprecated Use PageHeaderAction with `primaryAction` and `secondaryActions`. */\nexport interface PageAction extends ActionPresentation {\n\tid?: string;\n\t/** Display label. */\n\tlabel: ReactNode;\n\tonClick?: () => void;\n\t/** Destination for the entry, when it navigates. */\n\thref?: string;\n\ttarget?: string;\n\trel?: string;\n\texternal?: boolean;\n\t/** Shows the pending indicator. */\n\tloading?: boolean;\n\t/** Leading glyph. */\n\ticon?: ComponentType<{ className?: string }>;\n\t/** Optional inline button size. Defaults to the PageActions `size` prop. */\n\tsize?: ButtonSize;\n\tgroup?: string;\n\tplacement?: 'auto' | 'inline' | 'menu';\n\t/** Escape hatch for one action only. Prefer `renderAction` for consistent customization. */\n\telement?: ReactNode | JSX.Element;\n}\n\nexport type PageActionsDisplay = 'flat' | 'dropdown' | 'auto';\n\nexport interface PageActionsStrings {\n\tmenuLabel: string;\n}\n\nexport const defaultPageActionsStrings: PageActionsStrings = {\n\tmenuLabel: 'More actions',\n};\n\nexport interface PageActionsProps extends LayoutNavigationAdapter {\n\t/** Controls offered on the surface. */\n\tactions?: PageAction[];\n\t/** How actions are presented — inline, menu, or responsive. */\n\tdisplay?: PageActionsDisplay;\n\t/**\n\t * Inline action button scale, which the More actions square beside them\n\t * matches. Defaults to `sm`; set `md` for normal page-header buttons. A\n\t * menu-only ribbon follows the provider scale.\n\t */\n\tsize?: ButtonSize;\n\t/** Width at which responsive actions collapse into a menu. */\n\tbreakpoint?: number;\n\t/**\n\t * Maximum non-menu actions rendered inline before overflow moves them into\n\t * the dropdown menu. Defaults to 4 for admin header density.\n\t */\n\tmaxInlineActions?: number;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<PageActionsStrings>;\n\tclassName?: string;\n\t/** Merged onto the inline action row. */\n\tinlineClassName?: string;\n\t/** Merged onto the action menu. */\n\tmenuClassName?: string;\n\t/** Replaces the default action rendering. */\n\trenderAction?: (action: PageAction, context: PageActionContext) => ReactNode;\n}\n\nexport interface PageSlotProps {\n\t/** Native attributes merged onto the page body region. */\n\tbody?: LayoutSlotAttributes<HTMLDivElement>;\n\taside?: LayoutSlotAttributes<HTMLElement>;\n\ttoolbar?: LayoutSlotAttributes<HTMLDivElement>;\n\tfooter?: LayoutSlotAttributes<HTMLDivElement>;\n}\n\nexport interface PageSlots {\n\t/** Replaces the generated PageHeader. */\n\theader?: ReactNode;\n\ttoolbar?: ReactNode;\n\taside?: ReactNode;\n\tfooter?: ReactNode;\n\tloading?: ReactNode;\n\terror?: ReactNode;\n\tempty?: ReactNode;\n}\n\nexport interface PageProps\n\textends LayoutNavigationAdapter, Omit<ContainerProps, 'children'> {\n\t/** Header region of the shell. */\n\theader?: PageHeaderProps;\n\t/** Explicit width wins; otherwise narrow uses md, aside uses xl, and a single column uses lg. */\n\tmaxWidth?: ContainerMaxWidth;\n\t/** Center one resource or form at the existing `md` content measure. */\n\tnarrow?: boolean;\n\t/** Inline page gutters. Defaults to `lg`; none requires an existing padded parent. */\n\tgutter?: ContainerGutter;\n\t/** Block padding around the whole page. Defaults to `lg`, independent of gutter. */\n\tpadding?: ContainerGutter;\n\t/** Secondary context beside the primary body, adapting to the available container width. */\n\taside?: ReactNode;\n\t/** Main/aside proportions. Defaults to 7/5. */\n\tasideRatio?: TwoColumnLayoutProps['ratio'];\n\tstickyAside?: boolean;\n\t/** Query controls or context between header and body. */\n\ttoolbar?: ReactNode;\n\t/** Content above the header. */\n\tbeforeHeader?: ReactNode;\n\t/** Compatible toolbar fallback when toolbar and slots.toolbar are omitted. */\n\tafterHeader?: ReactNode;\n\t/** Replaces only the primary body; header, toolbar and aside remain mounted. */\n\tloading?: boolean;\n\terror?: ReactNode | Error;\n\tonRetry?: () => void;\n\tempty?: boolean;\n\temptySlot?: ReactNode;\n\t/** Region overrides take precedence over direct props. */\n\tslots?: PageSlots;\n\t/** Copy for the default loading, error and empty states. */\n\tstrings?: StringsProp<PageStrings>;\n\tchildren?: ReactNode;\n\t/** Native attributes for stable page regions. */\n\tslotProps?: PageSlotProps;\n}\n","/**\n * PageActions — composable action ribbon for page headers.\n *\n * Links go through `renderLink`, never router imports or DOM click hacks.\n * Use `renderAction` for app-specific rendering while keeping grouping,\n * filtering, breakpoint, and menu placement logic centralized.\n */\nimport { useEffect, useMemo, useState, type ReactElement } from 'react';\n\nimport {\n\tActionButtons,\n\tActionMenu,\n\ttype ActionMenuAction,\n\ttype ActionMenuLinkRenderProps,\n} from '../../../base/action-menu';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { useLayoutLinkRenderer } from '../../hooks';\nimport {\n\tdefaultPageActionsStrings,\n\ttype PageAction,\n\ttype PageActionContext,\n\ttype PageActionsProps,\n} from '../page.types';\n\nconst PAGE_ACTIONS_MENU_CLASS = 'max-h-[80vh] overflow-y-auto overscroll-contain';\nconst DEFAULT_MAX_INLINE_ACTIONS = 4;\n\ntype PageActionEntry = {\n\t/** The action this surface performs. */\n\taction: PageAction;\n\tindex: number;\n};\n\nfunction toActionMenuAction(\n\t{ action, index }: PageActionEntry,\n\tcontextBase: Omit<PageActionContext, 'index' | 'isInline'>,\n\tisInline: boolean,\n\trenderAction?: PageActionsProps['renderAction'],\n): ActionMenuAction {\n\tconst context: PageActionContext = { ...contextBase, index, isInline };\n\tconst disabled = !!action.disabled || !!action.loading;\n\n\treturn {\n\t\tid: action.id ?? String(index),\n\t\tlabel: action.label,\n\t\ticon: action.icon,\n\t\tonClick: action.onClick,\n\t\thref: action.href && !action.onClick ? action.href : undefined,\n\t\ttarget: action.target,\n\t\trel: action.rel,\n\t\texternal: action.external,\n\t\tdisabled,\n\t\ttone: action.tone ?? 'secondary',\n\t\tbuttonStyle: action.buttonStyle ?? 'solid',\n\t\tbuttonSize: action.size,\n\t\tgroup: action.group,\n\t\trender: action.element ?? renderAction?.(action, context),\n\t};\n}\n\n/** @deprecated Pass page commands as `primaryAction` and `secondaryActions`; use ActionButtons for a toolbar row. */\nexport function PageActions({\n\tactions,\n\tdisplay = 'dropdown',\n\tsize = 'sm',\n\tbreakpoint = 1040,\n\tmaxInlineActions = DEFAULT_MAX_INLINE_ACTIONS,\n\trenderLink,\n\tstrings: stringsProp,\n\tclassName,\n\tinlineClassName,\n\tmenuClassName,\n\trenderAction,\n}: PageActionsProps) {\n\tconst strings = useStrings(defaultPageActionsStrings, stringsProp);\n\tconst resolvedRenderLink = useLayoutLinkRenderer({ renderLink });\n\n\tconst filtered = useMemo<PageActionEntry[]>(\n\t\t() => (actions ?? [])\n\t\t\t.map((action, index) => ({ action, index }))\n\t\t\t.filter(({ action }) => action.visible !== false),\n\t\t[actions],\n\t);\n\n\tconst [isNarrow, setIsNarrow] = useState(false);\n\tuseEffect(() => {\n\t\tif (display !== 'auto' || typeof window === 'undefined') return;\n\n\t\tconst check = () => setIsNarrow(window.innerWidth <= breakpoint);\n\t\tcheck();\n\t\twindow.addEventListener('resize', check);\n\t\treturn () => window.removeEventListener('resize', check);\n\t}, [display, breakpoint]);\n\n\tif (filtered.length === 0) return null;\n\n\tconst inlineContextBase = { renderLink: resolvedRenderLink };\n\tconst renderActionLink = (props: ActionMenuLinkRenderProps) =>\n\t\tresolvedRenderLink({\n\t\t\t...props,\n\t\t\tchildren: props.children ?? null,\n\t\t}) as ReactElement;\n\tconst inlineClass = cn('flex min-w-0 max-w-full flex-wrap items-center gap-space-sm', inlineClassName, className);\n\tconst menuContentClass = cn(PAGE_ACTIONS_MENU_CLASS, menuClassName);\n\n\tif (display === 'dropdown' || (display === 'auto' && isNarrow)) {\n\t\tconst dropdownActions = filtered.map((entry) =>\n\t\t\ttoActionMenuAction(entry, inlineContextBase, false, renderAction),\n\t\t);\n\n\t\treturn (\n\t\t\t<ActionMenu\n\t\t\t\tactions={dropdownActions}\n\t\t\t\tcontext=\"commands\"\n\t\t\t\tsrText={strings.menuLabel}\n\t\t\t\talign=\"end\"\n\t\t\t\tcloseOnSelect\n\t\t\t\tcontentClassName={menuContentClass}\n\t\t\t\tpreserveOrder\n\t\t\t\trenderLink={renderActionLink}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst inlineLimit = Math.max(0, maxInlineActions);\n\tconst inlineCandidates = filtered.filter(({ action }) => (action.placement ?? 'auto') !== 'menu');\n\tconst inline = inlineCandidates.slice(0, inlineLimit);\n\tconst overflow = inlineCandidates.slice(inlineLimit);\n\tconst menu = [\n\t\t...overflow,\n\t\t...filtered.filter(({ action }) => (action.placement ?? 'auto') === 'menu'),\n\t];\n\tconst inlineActions = inline.map((entry) =>\n\t\ttoActionMenuAction(entry, inlineContextBase, true, renderAction),\n\t);\n\tconst menuActions = menu.map((entry) =>\n\t\ttoActionMenuAction(entry, inlineContextBase, false, renderAction),\n\t);\n\n\treturn (\n\t\t<div className={inlineClass}>\n\t\t\t<ActionButtons\n\t\t\t\tactions={inlineActions}\n\t\t\t\tsize={size}\n\t\t\t\trenderLink={renderActionLink}\n\t\t\t/>\n\t\t\t{menu.length > 0 && (\n\t\t\t\t<ActionMenu\n\t\t\t\t\tactions={menuActions}\n\t\t\t\t\tcontext=\"commands\"\n\t\t\t\t\tsrText={strings.menuLabel}\n\t\t\t\t\talign=\"end\"\n\t\t\t\t\tcloseOnSelect\n\t\t\t\t\tcontentClassName={menuContentClass}\n\t\t\t\t\tpreserveOrder\n\t\t\t\t\trenderLink={renderActionLink}\n\t\t\t\t\t// The square matches the inline commands it ends.\n\t\t\t\t\tbuttonProps={{ size }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,IAAa0B,IAAkC;CAC9C,cAAc;CACd,oBAAoB;CACpB,YAAY;CACZ,kBAAkB;CAClB,YAAY;CACZ,YAAY;CACZ,kBAAkB;AACnB;;;ACFA,SAASC,EAAY,GAA4B,GAA6C;CAC7F,OAAO,OAAOC,KAAS,aAAaA,EAAKC,CAAO,IAAID,KAAQC,EAAQ;AACrE;AAEA,SAAgBC,EAAW,EAC1B,UAAO,gBAAa,aAAU,SAAS,gBAAa,MACpD,WAAWC,GAAW,kBAAe,qBAAkB,oBAAiB,mBACxE,aAAU,WAAQ,eAAY,QAAQ,iBAAc,CAAC,GACrD,kBAAe,qBAAkB,+BAA4B,sBAAmB,gBAAgB,SAAM,YAAS,UAC/G,gBAAY,cAAW,qBAAkB,qBAAkB,mBAC3D,uBAAoB,2BACD;CACnB,IAAMC,IAAqBV,EAAsB,EAAC,eAAU,CAAC,GAEvDW,KADYC,KAAcC,IAE/B,kBAAC,OAAD;EAAK,WAAU;EACb,UAAAD,KAAY,CAACC,IACbH,EAAmB;GAClB,MAAME;GACN,cAAcE;GACd,WAAWC,EAAG,0BAA0BpC,EAAe;IAAC,MAAK;IAAY,aAAY;IAAQ,MAAK;IAAK,UAAS;GAAI,CAAC,CAAC;GACtH,UACC,kBAAAD,GAAA,EAAA,UACC,kBAACsC,GAAD;IAAW,WAAU;IAA2B,eAAY;GAAQ,CAAA,EACnE,CAAA;EAEJ,CAAC,IAED,kBAACpC,GAAD;GACC,MAAK;GACL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D,IAAMc,IAAkBhB,EAAS,KAAK,MACrCN,EAAmBuB,GAAOR,GAAmB,IAAOX,CAAY,CACjE;EAEA,OACC,kBAACxG,GAAD;GACC,SAAS0H;GACT,SAAQ;GACR,QAAQzD,EAAQ;GAChB,OAAM;GACN,eAAA;GACA,kBAAkBuD;GAClB,eAAA;GACA,YAAYJ;EACZ,CAAA;CAEH;CAEA,IAAMQ,IAAc,KAAK,IAAI,GAAGC,CAAgB,GAC1CC,IAAmBpB,EAAS,QAAQ,EAAE,iBAAcH,EAAO,aAAa,YAAY,MAAM,GAC1FwB,IAASD,EAAiB,MAAM,GAAGF,CAAW,GAE9CI,IAAO,CACZ,GAFgBF,EAAiB,MAAMF,CAEpC,GACH,GAAGlB,EAAS,QAAQ,EAAE,iBAAcH,EAAO,aAAa,YAAY,MAAM,CAC3E,GACM0B,IAAgBF,EAAO,KAAK,MACjC3B,EAAmBuB,GAAOR,GAAmB,IAAMX,CAAY,CAChE,GACM0B,IAAcF,EAAK,KAAK,MAC7B5B,EAAmBuB,GAAOR,GAAmB,IAAOX,CAAY,CACjE;CAEA,OACC,kBAAC,OAAD;EAAK,WAAWc;EAAhB,UAAA,CACC,kBAACrH,GAAD;GACC,SAASgI;GACH;GACN,YAAYb;EACZ,CAAA,GACAY,EAAK,SAAS,KACd,kBAAChI,GAAD;GACC,SAASkI;GACT,SAAQ;GACR,QAAQjE,EAAQ;GAChB,OAAM;GACN,eAAA;GACA,kBAAkBuD;GAClB,eAAA;GACA,YAAYJ;GAEZ,aAAa,EAAE,QAAK;EACpB,CAAA,CAEE;;AAEP"}
@@ -0,0 +1,193 @@
1
+ "use client";
2
+ import { S as e, a as t, d as n, r } from "./ui-provider-C-74NVLc.js";
3
+ import { t as i } from "./utils-B6kKb8jB.js";
4
+ import { a, n as o } from "./buttons-BedGfygC.js";
5
+ import { t as s } from "./focus-recipes-B653VaLq.js";
6
+ import { t as c } from "./composition.recipes-COdiFhxB.js";
7
+ import { n as l } from "./action-menu-Dr8K-ghE.js";
8
+ import { useCallback as u, useEffect as d, useRef as f, useState as p } from "react";
9
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
10
+ //#region src/components/base/navigation/page-header/page-header-commands.tsx
11
+ var _ = ({ href: e, external: t, target: n, rel: r, children: i, ...a }) => /* @__PURE__ */ h("a", {
12
+ href: e,
13
+ target: n ?? (t ? "_blank" : void 0),
14
+ rel: r ?? (t ? "noopener noreferrer" : void 0),
15
+ ...a,
16
+ children: i
17
+ }), v = "@max-[40rem]/page-header:hidden", y = "@min-[40rem]/page-header:hidden", b = "max-h-[80vh] overflow-y-auto overscroll-contain";
18
+ function x(e) {
19
+ return !!e && e.visible !== !1;
20
+ }
21
+ function S(e) {
22
+ let t = e.ownerDocument.defaultView?.getComputedStyle(e);
23
+ return !!t && t.display !== "none" && t.visibility !== "hidden" && !e.closest("[hidden],[inert]");
24
+ }
25
+ function C(e, t) {
26
+ return x(e) || (t ?? []).some(x);
27
+ }
28
+ function w(e, t) {
29
+ return t === "secondary" ? {
30
+ tone: "secondary",
31
+ buttonStyle: "outline"
32
+ } : {
33
+ tone: e.destructive ? "destructive" : "primary",
34
+ buttonStyle: "solid"
35
+ };
36
+ }
37
+ function T(e) {
38
+ return e.href && !e.onClick ? e.href : void 0;
39
+ }
40
+ function E({ action: t, role: r, renderLink: s, className: c }) {
41
+ let { defaultScale: l } = n(), { tone: u, buttonStyle: d } = w(t, r), f = T(t), p = t.icon, _ = i(`page-header--${r}-action`, c);
42
+ return f && !t.disabled && !t.loading ? /* @__PURE__ */ h(m, { children: s({
43
+ href: f,
44
+ target: t.target,
45
+ rel: t.rel,
46
+ external: t.external,
47
+ className: i("button--component base-button--component", a({
48
+ tone: u,
49
+ buttonStyle: d,
50
+ size: e(void 0, l)
51
+ }), _),
52
+ children: /* @__PURE__ */ g(m, { children: [p && /* @__PURE__ */ h(p, {
53
+ className: "size-icon shrink-0",
54
+ "aria-hidden": "true"
55
+ }), t.label] })
56
+ }) }) : /* @__PURE__ */ h(o, {
57
+ type: "button",
58
+ tone: u,
59
+ buttonStyle: d,
60
+ icon: p,
61
+ loading: t.loading,
62
+ handlesLoading: t.loading !== void 0,
63
+ disabled: t.disabled,
64
+ onClick: t.onClick,
65
+ className: _,
66
+ children: t.label
67
+ });
68
+ }
69
+ function D({ action: e, key: t }, n) {
70
+ return {
71
+ id: t,
72
+ label: e.label,
73
+ icon: e.icon,
74
+ onClick: e.onClick,
75
+ href: T(e),
76
+ target: e.target,
77
+ rel: e.rel,
78
+ external: e.external,
79
+ disabled: !!e.disabled || !!e.loading,
80
+ tone: e.destructive ? "destructive" : "secondary",
81
+ className: n
82
+ };
83
+ }
84
+ function O({ primaryAction: e, secondaryActions: n, maxVisibleSecondaryActions: a, moreActionsLabel: o, renderLink: m = _ }) {
85
+ let { host: C, attachHost: w, context: T } = t(), [O, k] = p(!1), A = f(null), j = f(null), M = u(() => A.current ?? !0, []), N = u((e) => {
86
+ e.target instanceof HTMLElement && (j.current = e.target);
87
+ }, []), P = u((e) => {
88
+ let t = e.relatedTarget;
89
+ if (t instanceof Node && C.current?.contains(t)) return;
90
+ let n = e.target;
91
+ n instanceof HTMLElement && n === j.current && !S(n) && (t == null || t instanceof HTMLElement && !S(t)) || (j.current = null);
92
+ }, [C]);
93
+ d(() => {
94
+ let e = C.current, t = e?.closest(".page-header--component"), n = e?.ownerDocument.defaultView;
95
+ if (!e || !t || !n) return;
96
+ let r = e.querySelector(".page-header--primary-action,.page-header--secondary-action");
97
+ if (!r) return;
98
+ let i = S(r), a = () => {
99
+ let t = S(r);
100
+ if (t === i) return;
101
+ i = t;
102
+ let n = e.ownerDocument.activeElement, a = n === e.ownerDocument.body && j.current && e.contains(j.current) && !S(j.current);
103
+ if (!n || !e.contains(n) && !a) {
104
+ j.current = null;
105
+ return;
106
+ }
107
+ let o = e.querySelectorAll(".page-header--more-actions,.page-header--primary-action,.page-header--secondary-action"), s = [...o].find((e) => e.matches(".page-header--more-actions") && S(e) && !e.matches(":disabled,[aria-disabled=\"true\"],[data-disabled]")) ?? [...o].find((e) => S(e) && !e.matches(":disabled,[aria-disabled=\"true\"],[data-disabled]")) ?? e;
108
+ A.current = s, O && k(!1), s.focus({ preventScroll: !0 });
109
+ }, o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a);
110
+ return o?.observe(t), n.addEventListener("resize", a), () => {
111
+ o?.disconnect(), n.removeEventListener("resize", a);
112
+ };
113
+ }, [
114
+ T.mounted,
115
+ C,
116
+ a,
117
+ O,
118
+ e,
119
+ n
120
+ ]);
121
+ let F = (n ?? []).map((e, t) => ({
122
+ action: e,
123
+ key: e.id ?? `secondary-${t}`
124
+ })).filter(({ action: e }) => x(e)), I = F.filter(({ action: e }) => !e.destructive), L = F.filter(({ action: e }) => e.destructive), R = a === void 0 || Number.isNaN(a) ? 2 : Math.max(0, Math.floor(a)), z = I.slice(0, R), B = I.slice(R), V = x(e) ? e : void 0;
125
+ if (!V && F.length === 0) return null;
126
+ let H = V ? {
127
+ action: V,
128
+ key: `primary-${V.id ?? "action"}`
129
+ } : void 0, U = [...H && V?.destructive ? [{
130
+ ...H,
131
+ className: y
132
+ }] : [], ...L.map((e) => ({
133
+ ...e,
134
+ className: void 0
135
+ }))], W = [
136
+ ...H && !V?.destructive ? [D(H, y)] : [],
137
+ ...z.map((e) => D(e, y)),
138
+ ...B.map((e) => D(e)),
139
+ ...U.map((e) => ({
140
+ ...D(e, e.className),
141
+ group: !0,
142
+ groupClassName: B.length > 0 && L.length > 0 ? void 0 : y
143
+ }))
144
+ ], G = B.length === 0 && L.length === 0;
145
+ return /* @__PURE__ */ h(r, {
146
+ value: T,
147
+ children: /* @__PURE__ */ g("div", {
148
+ ref: w,
149
+ onFocusCapture: N,
150
+ onBlurCapture: P,
151
+ tabIndex: -1,
152
+ "data-slot": "page-header-commands",
153
+ className: i("page-header--commands flex min-w-0 max-w-full flex-wrap items-center justify-end outline-none", c.commands, s.inset),
154
+ children: [
155
+ z.map((e) => /* @__PURE__ */ h(E, {
156
+ action: e.action,
157
+ role: "secondary",
158
+ renderLink: m,
159
+ className: v
160
+ }, e.key)),
161
+ V && /* @__PURE__ */ h(E, {
162
+ action: V,
163
+ role: "primary",
164
+ renderLink: m,
165
+ className: v
166
+ }),
167
+ W.length > 0 && /* @__PURE__ */ h(l, {
168
+ open: O,
169
+ onOpenChange: (e) => {
170
+ e && (A.current = null), k(e);
171
+ },
172
+ finalFocus: A.current ? M : void 0,
173
+ actions: W,
174
+ context: "commands",
175
+ srText: o,
176
+ align: "end",
177
+ closeOnSelect: !0,
178
+ preserveOrder: !0,
179
+ contentClassName: b,
180
+ renderLink: (e) => m({
181
+ ...e,
182
+ children: e.children ?? null
183
+ }),
184
+ buttonProps: { className: i("page-header--more-actions", G && y) }
185
+ })
186
+ ]
187
+ })
188
+ });
189
+ }
190
+ //#endregion
191
+ export { C as n, O as t };
192
+
193
+ //# sourceMappingURL=page-header-commands-7P3sfE9u.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-header-commands-7P3sfE9u.js","names":["_Fragment","resolveComponentScale","useThemeScopeHost","useDensityConfig","cn","Button","focusRecipes","compositionClasses","ActionMenu","Fragment$1","defaultPageHeaderLinkRenderer","props","target","external","rel","INLINE_COMMAND_CLASS","COMPACT_MENU_CLASS","MENU_CONTENT_CLASS","isVisible","action","isVisibleControl","style","node","hasPageHeaderCommands","primaryAction","secondaryActions","presentation","role","linkDestination","CommandButton","href","Icon","hookClassName","className","renderLink","buttonVariants","defaultScale","toMenuAction","key","PageHeaderCommands","menuOpen","setMenuOpen","useState","resizeFocus","useRef","ownedFocus","finalFocus","useCallback","captureFocus","event","captureBlur","next","host","root","header","view","inlineCommand","inlineVisible","recoverFocus","nextInlineVisible","active","droppedHiddenFocus","candidates","observer","context","maxVisibleSecondaryActions","secondary","index","routine","destructive","inlineLimit","inline","overflow","primary","primaryEntry","destructiveMenuEntries","entry","menuActions","compactMenuOnly","ThemeScopeHostProvider","attachHost","nextOpen","moreActionsLabel"],"sources":["../src/components/base/navigation/page-header/page-header-commands.tsx"],"sourcesContent":["/**\n * PageHeaderCommands — role-based commands for page and record headers.\n *\n * The role chooses each command's treatment and place: outline secondary\n * commands, then one solid primary command, then the More actions menu for\n * overflow and destructive commands, which always closes the row. Below the\n * named header container breakpoint, every command collapses into that menu\n * through CSS alone, so server and client markup agree. Both page and section\n * headers use this owner for the same command behavior.\n */\nimport { useCallback, useEffect, useRef, useState, type ComponentType, type FocusEvent, type MouseEvent, type ReactElement, type ReactNode } from 'react';\n\nimport {\n\tActionMenu,\n\ttype ActionMenuAction,\n\ttype ActionMenuLinkRenderProps,\n} from '../../action-menu';\nimport { Button } from '../../buttons';\nimport { buttonVariants } from '../../buttons/button.variants';\nimport {compositionClasses} from '../../structure/composition.recipes';\nimport { resolveComponentScale, useDensityConfig } from '../../../../lib/ui-provider';\nimport { cn } from '../../../../lib/utils';\nimport { focusRecipes } from '../../../../lib/focus-recipes';\nimport { ThemeScopeHostProvider, useThemeScopeHost } from '../../../../lib/theme-scope';\n\n/**\n * A page command described by its role. `primaryAction` and `secondaryActions`\n * choose the treatment, so a command carries no tone or button style.\n */\nexport interface PageHeaderAction {\n\t/** Stable key. Defaults to the command's position. */\n\tid?: string;\n\t/** Visible command text. */\n\tlabel: ReactNode;\n\t/** Runs the command. When both are set, `onClick` wins over `href`. */\n\tonClick?: () => void;\n\t/** Navigates through the header's `renderLink` instead of running a callback. */\n\thref?: string;\n\ttarget?: string;\n\trel?: string;\n\t/** Marks the destination as leaving the app; forwarded to `renderLink`. */\n\texternal?: boolean;\n\t/** Leading glyph. Pass a Lucide icon component. */\n\ticon?: ComponentType<{ className?: string }>;\n\t/** Shows the pending indicator and blocks activation. */\n\tloading?: boolean;\n\t/** Blocks activation while keeping the command visible. */\n\tdisabled?: boolean;\n\t/** Set false to omit the command, for example without permission. */\n\tvisible?: boolean;\n\t/**\n\t * Irreversible or harmful command. A destructive secondary command moves to\n\t * the More actions menu; a destructive primary command keeps its place with\n\t * the destructive treatment. Confirm it from the handler, e.g. ConfirmDialog.\n\t */\n\tdestructive?: boolean;\n}\n\n/** What a header hands its link renderer for an `href` command. */\nexport interface PageHeaderLinkRenderProps {\n\thref: string;\n\tchildren: ReactNode;\n\tclassName?: string;\n\ttarget?: string;\n\trel?: string;\n\t/** Marks the destination as leaving the app. */\n\texternal?: boolean;\n\tonClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n\t'aria-label'?: string;\n}\n\n/** Renders framework links for `href` commands. Layout `renderLink` functions fit. */\nexport type PageHeaderLinkRenderer = (props: PageHeaderLinkRenderProps) => ReactNode;\n\n/** Native anchor fallback, matching the layout default: external links open a new tab. */\nexport const defaultPageHeaderLinkRenderer: PageHeaderLinkRenderer = ({ href, external, target, rel, children, ...props }) => (\n\t<a\n\t\thref={href}\n\t\ttarget={target ?? (external ? '_blank' : undefined)}\n\t\trel={rel ?? (external ? 'noopener noreferrer' : undefined)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</a>\n);\n\n/** Secondary commands rendered as buttons on wide headers; later ones overflow. */\nexport const PAGE_HEADER_INLINE_SECONDARY_LIMIT = 2;\n\nconst INLINE_COMMAND_CLASS = '@max-[40rem]/page-header:hidden';\nconst COMPACT_MENU_CLASS = '@min-[40rem]/page-header:hidden';\nconst MENU_CONTENT_CLASS = 'max-h-[80vh] overflow-y-auto overscroll-contain';\n\ntype CommandRole = 'primary' | 'secondary';\n\ninterface CommandEntry {\n\taction: PageHeaderAction;\n\tkey: string;\n}\n\nexport interface PageHeaderCommandsProps {\n\tprimaryAction?: PageHeaderAction;\n\tsecondaryActions?: readonly PageHeaderAction[];\n\t/**\n\t * How many routine secondary commands render as outline buttons on wide\n\t * headers; later ones join the More actions menu. Use `1` or `0` when long\n\t * labels beside the primary command would crowd the header; `Infinity`\n\t * keeps every routine command inline. @default 2\n\t */\n\tmaxVisibleSecondaryActions?: number;\n\t/** Accessible name of the More actions menu trigger. */\n\tmoreActionsLabel: string;\n\trenderLink?: PageHeaderLinkRenderer;\n}\n\nfunction isVisible(action: PageHeaderAction | undefined): action is PageHeaderAction {\n\treturn !!action && action.visible !== false;\n}\n\nfunction isVisibleControl(node: HTMLElement) {\n\tconst style = node.ownerDocument.defaultView?.getComputedStyle(node);\n\treturn !!style && style.display !== 'none' && style.visibility !== 'hidden' && !node.closest('[hidden],[inert]');\n}\n\n/** Whether the header has any role-based command to render. */\nexport function hasPageHeaderCommands(\n\tprimaryAction: PageHeaderAction | undefined,\n\tsecondaryActions: readonly PageHeaderAction[] | undefined,\n) {\n\treturn isVisible(primaryAction) || (secondaryActions ?? []).some(isVisible);\n}\n\nfunction presentation(action: PageHeaderAction, role: CommandRole) {\n\tif (role === 'secondary') return { tone: 'secondary', buttonStyle: 'outline' } as const;\n\treturn { tone: action.destructive ? 'destructive' : 'primary', buttonStyle: 'solid' } as const;\n}\n\n/** `onClick` wins over `href`, matching PageAction. */\nfunction linkDestination(action: PageHeaderAction) {\n\treturn action.href && !action.onClick ? action.href : undefined;\n}\n\nfunction CommandButton({\n\taction,\n\trole,\n\trenderLink,\n\tclassName,\n}: {\n\taction: PageHeaderAction;\n\trole: CommandRole;\n\trenderLink: PageHeaderLinkRenderer;\n\tclassName?: string;\n}) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst { tone, buttonStyle } = presentation(action, role);\n\tconst href = linkDestination(action);\n\tconst Icon = action.icon;\n\tconst hookClassName = cn(`page-header--${role}-action`, className);\n\n\tif (href && !action.disabled && !action.loading) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{renderLink({\n\t\t\t\t\thref,\n\t\t\t\t\ttarget: action.target,\n\t\t\t\t\trel: action.rel,\n\t\t\t\t\texternal: action.external,\n\t\t\t\t\tclassName: cn(\n\t\t\t\t\t\t'button--component base-button--component',\n\t\t\t\t\t\tbuttonVariants({ tone, buttonStyle, size: resolveComponentScale(undefined, defaultScale) }),\n\t\t\t\t\t\thookClassName,\n\t\t\t\t\t),\n\t\t\t\t\tchildren: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{Icon && <Icon className=\"size-icon shrink-0\" aria-hidden=\"true\" />}\n\t\t\t\t\t\t\t{action.label}\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t})}\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ttype=\"button\"\n\t\t\ttone={tone}\n\t\t\tbuttonStyle={buttonStyle}\n\t\t\ticon={Icon}\n\t\t\tloading={action.loading}\n\t\t\thandlesLoading={action.loading !== undefined}\n\t\t\tdisabled={action.disabled}\n\t\t\tonClick={action.onClick}\n\t\t\tclassName={hookClassName}\n\t\t>\n\t\t\t{action.label}\n\t\t</Button>\n\t);\n}\n\nfunction toMenuAction({ action, key }: CommandEntry, className?: string): ActionMenuAction {\n\treturn {\n\t\tid: key,\n\t\tlabel: action.label,\n\t\ticon: action.icon,\n\t\tonClick: action.onClick,\n\t\thref: linkDestination(action),\n\t\ttarget: action.target,\n\t\trel: action.rel,\n\t\texternal: action.external,\n\t\tdisabled: !!action.disabled || !!action.loading,\n\t\ttone: action.destructive ? 'destructive' : 'secondary',\n\t\tclassName,\n\t};\n}\n\nexport function PageHeaderCommands({\n\tprimaryAction,\n\tsecondaryActions,\n\tmaxVisibleSecondaryActions,\n\tmoreActionsLabel,\n\trenderLink = defaultPageHeaderLinkRenderer,\n}: PageHeaderCommandsProps) {\n\t// Keep the popup inside its header container so responsive menu entries and\n\t// CSS theme inheritance follow the same boundary as the inline commands.\n\tconst { host, attachHost, context } = useThemeScopeHost<HTMLDivElement>();\n\tconst [menuOpen, setMenuOpen] = useState(false);\n\tconst resizeFocus = useRef<HTMLElement | null>(null);\n\tconst ownedFocus = useRef<HTMLElement | null>(null);\n\tconst finalFocus = useCallback(() => resizeFocus.current ?? true, []);\n\tconst captureFocus = useCallback((event: FocusEvent<HTMLDivElement>) => {\n\t\tif (event.target instanceof HTMLElement) ownedFocus.current = event.target;\n\t}, []);\n\tconst captureBlur = useCallback((event: FocusEvent<HTMLDivElement>) => {\n\t\tconst next = event.relatedTarget;\n\t\tif (next instanceof Node && host.current?.contains(next)) return;\n\t\tconst target = event.target;\n\t\tconst hiddenBlur = target instanceof HTMLElement && target === ownedFocus.current && !isVisibleControl(target)\n\t\t\t&& (next == null || next instanceof HTMLElement && !isVisibleControl(next));\n\t\tif (!hiddenBlur) ownedFocus.current = null;\n\t}, [host]);\n\tuseEffect(() => {\n\t\tconst root = host.current;\n\t\tconst header = root?.closest('.page-header--component');\n\t\tconst view = root?.ownerDocument.defaultView;\n\t\tif (!root || !header || !view) return;\n\t\tconst inlineCommand = root.querySelector<HTMLElement>('.page-header--primary-action,.page-header--secondary-action');\n\t\tif (!inlineCommand) return;\n\t\tlet inlineVisible = isVisibleControl(inlineCommand);\n\t\tconst recoverFocus = () => {\n\t\t\tconst nextInlineVisible = isVisibleControl(inlineCommand);\n\t\t\tif (nextInlineVisible === inlineVisible) return;\n\t\t\tinlineVisible = nextInlineVisible;\n\t\t\tconst active = root.ownerDocument.activeElement;\n\t\t\tconst droppedHiddenFocus = active === root.ownerDocument.body && ownedFocus.current\n\t\t\t\t&& root.contains(ownedFocus.current) && !isVisibleControl(ownedFocus.current);\n\t\t\tif (!active || !root.contains(active) && !droppedHiddenFocus) {\n\t\t\t\townedFocus.current = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// CSS owns the breakpoint. Only react when its actual presentation\n\t\t\t// changes, keeping focus out of a newly hidden row or trigger.\n\t\t\tconst candidates = root.querySelectorAll<HTMLElement>('.page-header--more-actions,.page-header--primary-action,.page-header--secondary-action');\n\t\t\tconst target = [...candidates].find(node => node.matches('.page-header--more-actions') && isVisibleControl(node) && !node.matches(':disabled,[aria-disabled=\"true\"],[data-disabled]'))\n\t\t\t\t?? [...candidates].find(node => isVisibleControl(node) && !node.matches(':disabled,[aria-disabled=\"true\"],[data-disabled]'))\n\t\t\t\t?? root;\n\t\t\tresizeFocus.current = target;\n\t\t\tif (menuOpen) setMenuOpen(false);\n\t\t\ttarget.focus({ preventScroll: true });\n\t\t};\n\t\tconst observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(recoverFocus);\n\t\tobserver?.observe(header);\n\t\tview.addEventListener('resize', recoverFocus);\n\t\treturn () => {\n\t\t\tobserver?.disconnect();\n\t\t\tview.removeEventListener('resize', recoverFocus);\n\t\t};\n\t}, [context.mounted, host, maxVisibleSecondaryActions, menuOpen, primaryAction, secondaryActions]);\n\tconst secondary: CommandEntry[] = (secondaryActions ?? [])\n\t\t.map((action, index) => ({ action, key: action.id ?? `secondary-${index}` }))\n\t\t.filter(({ action }) => isVisible(action));\n\tconst routine = secondary.filter(({ action }) => !action.destructive);\n\tconst destructive = secondary.filter(({ action }) => action.destructive);\n\t// `Infinity` keeps every routine command inline; NaN keeps the default.\n\tconst inlineLimit = maxVisibleSecondaryActions === undefined || Number.isNaN(maxVisibleSecondaryActions)\n\t\t? PAGE_HEADER_INLINE_SECONDARY_LIMIT\n\t\t: Math.max(0, Math.floor(maxVisibleSecondaryActions));\n\tconst inline = routine.slice(0, inlineLimit);\n\tconst overflow = routine.slice(inlineLimit);\n\tconst primary = isVisible(primaryAction) ? primaryAction : undefined;\n\n\tif (!primary && secondary.length === 0) return null;\n\n\tconst primaryEntry = primary ? { action: primary, key: `primary-${primary.id ?? 'action'}` } : undefined;\n\tconst destructiveMenuEntries = [\n\t\t...(primaryEntry && primary?.destructive ? [{ ...primaryEntry, className: COMPACT_MENU_CLASS }] : []),\n\t\t...destructive.map(entry => ({ ...entry, className: undefined })),\n\t];\n\t// Compact entries share one menu with permanent overflow. The primary leads\n\t// routine commands; destructive commands form the final group at any width.\n\tconst menuActions: ActionMenuAction[] = [\n\t\t...(primaryEntry && !primary?.destructive ? [toMenuAction(primaryEntry, COMPACT_MENU_CLASS)] : []),\n\t\t...inline.map(entry => toMenuAction(entry, COMPACT_MENU_CLASS)),\n\t\t...overflow.map(entry => toMenuAction(entry)),\n\t\t...destructiveMenuEntries.map(entry => ({\n\t\t\t...toMenuAction(entry, entry.className),\n\t\t\tgroup: true as const,\n\t\t\t// A boundary survives on wide headers only when both groups have a\n\t\t\t// permanent entry. Otherwise it follows the compact-only commands.\n\t\t\tgroupClassName: overflow.length > 0 && destructive.length > 0 ? undefined : COMPACT_MENU_CLASS,\n\t\t})),\n\t];\n\tconst compactMenuOnly = overflow.length === 0 && destructive.length === 0;\n\tconst renderMenuLink = (props: ActionMenuLinkRenderProps) =>\n\t\trenderLink({ ...props, children: props.children ?? null }) as ReactElement;\n\n\t// Secondary commands lead, the primary command follows them, and the More\n\t// actions menu closes the row. The trigger is one more secondary command:\n\t// outline, at the commands' own height.\n\treturn (\n\t\t<ThemeScopeHostProvider value={context}>\n\t\t\t<div\n\t\t\t\tref={attachHost}\n\t\t\t\tonFocusCapture={captureFocus}\n\t\t\t\tonBlurCapture={captureBlur}\n\t\t\t\ttabIndex={-1}\n\t\t\t\tdata-slot=\"page-header-commands\"\n\t\t\t\tclassName={cn('page-header--commands flex min-w-0 max-w-full flex-wrap items-center justify-end outline-none', compositionClasses.commands, focusRecipes.inset)}\n\t\t\t>\n\t\t\t\t{inline.map((entry) => (\n\t\t\t\t\t<CommandButton\n\t\t\t\t\t\tkey={entry.key}\n\t\t\t\t\t\taction={entry.action}\n\t\t\t\t\t\trole=\"secondary\"\n\t\t\t\t\t\trenderLink={renderLink}\n\t\t\t\t\t\tclassName={INLINE_COMMAND_CLASS}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t\t{primary && <CommandButton action={primary} role=\"primary\" renderLink={renderLink} className={INLINE_COMMAND_CLASS} />}\n\t\t\t\t{menuActions.length > 0 && (\n\t\t\t\t\t<ActionMenu\n\t\t\t\t\t\topen={menuOpen}\n\t\t\t\t\t\tonOpenChange={nextOpen => {\n\t\t\t\t\t\t\tif (nextOpen) resizeFocus.current = null;\n\t\t\t\t\t\t\tsetMenuOpen(nextOpen);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t// Only resizing owns an explicit target. The default close path\n\t\t\t\t\t\t// must respect focus already handed to a command's new overlay.\n\t\t\t\t\t\tfinalFocus={resizeFocus.current ? finalFocus : undefined}\n\t\t\t\t\t\tactions={menuActions}\n\t\t\t\t\t\tcontext=\"commands\"\n\t\t\t\t\t\tsrText={moreActionsLabel}\n\t\t\t\t\t\talign=\"end\"\n\t\t\t\t\t\tcloseOnSelect\n\t\t\t\t\t\tpreserveOrder\n\t\t\t\t\t\tcontentClassName={MENU_CONTENT_CLASS}\n\t\t\t\t\t\trenderLink={renderMenuLink}\n\t\t\t\t\t\t// The shared outline overflow square follows the provider scale, like the commands.\n\t\t\t\t\t\tbuttonProps={{ className: cn('page-header--more-actions', compactMenuOnly && COMPACT_MENU_CLASS) }}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</ThemeScopeHostProvider>\n\t);\n}\n"],"mappings":";;;;;;;;;;AA2EA,IAAaU,KAAyD,EAAE,SAAM,aAAU,WAAQ,QAAK,aAAU,GAAGC,QACjH,kBAAC,KAAD;CACO;CACN,QAAQC,MAAWC,IAAW,WAAW,KAAA;CACzC,KAAKC,MAAQD,IAAW,wBAAwB,KAAA;CAChD,GAAIF;CAEH;AACC,CAAA,GAMEI,IAAuB,mCACvBC,IAAqB,mCACrBC,IAAqB;AAwB3B,SAASC,EAAU,GAAkE;CACpF,OAAO,CAAC,CAACC,KAAUA,EAAO,YAAY;AACvC;AAEA,SAASC,EAAiB,GAAmB;CAC5C,IAAMC,IAAQC,EAAK,cAAc,aAAa,iBAAiBA,CAAI;CACnE,OAAO,CAAC,CAACD,KAASA,EAAM,YAAY,UAAUA,EAAM,eAAe,YAAY,CAACC,EAAK,QAAQ,kBAAkB;AAChH;AAGA,SAAgBC,EACf,GACA,GACC;CACD,OAAOL,EAAUM,CAAa,MAAMC,KAAoB,CAAC,EAAA,CAAG,KAAKP,CAAS;AAC3E;AAEA,SAASQ,EAAa,GAA0B,GAAmB;CAElE,OADIC,MAAS,cAAoB;EAAE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KACZ,WAAW7D;IACX,GALK6D,EAAM,GAKX,CACD;IACAH,KAAW,kBAAC5C,GAAD;KAAe,QAAQ4C;KAAS,MAAK;KAAsB;KAAY,WAAW1D;IAAuB,CAAA;IACpH8D,EAAY,SAAS,KACrB,kBAACrE,GAAD;KACC,MAAMgC;KACN,eAAc,MAAY;MAEzB,AADIyC,MAAU,EAAY,UAAU,OACpCxC,EAAYwC,CAAQ;KACrB;KAGA,YAAYtC,EAAY,UAAUG,IAAa,KAAA;KAC/C,SAAS+B;KACT,SAAQ;KACR,QAAQK;KACR,OAAM;KACN,eAAA;KACA,eAAA;KACA,kBAAkBjE;KAClB,aA3CmB,MACvBiB,EAAW;MAAE,GAAGvB;MAAO,UAAUA,EAAM,YAAY;KAAK,CAAC;KA4CrD,aAAa,EAAE,WAAWP,EAAG,6BAA6B0E,KAAmB9D,CAAkB,EAAE;IACjG,CAAA;GAEE;;CACkB,CAAA;AAE1B"}
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { s as e, v as t } from "./ui-provider-C_U0Xma4.js";
2
+ import { S as e, d as t } from "./ui-provider-C-74NVLc.js";
3
3
  import { useStrings as n } from "./lib/strings.js";
4
- import { t as r } from "./utils-BRhFDwuU.js";
5
- import { n as i } from "./buttons-DPZekJFu.js";
6
- import { c as a } from "./typography-UTnveOEy.js";
4
+ import { t as r } from "./utils-B6kKb8jB.js";
5
+ import { n as i } from "./buttons-BedGfygC.js";
6
+ import { c as a } from "./typography-BQnine1k.js";
7
7
  import { createContext as o, useContext as s } from "react";
8
8
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
9
  import { ChevronLeftIcon as u, ChevronRightIcon as d, MoreHorizontalIcon as f } from "lucide-react";
@@ -74,7 +74,7 @@ function C({ className: e, ...t }) {
74
74
  });
75
75
  }
76
76
  function w({ className: n, label: i, size: o, strings: s, ...u }) {
77
- let d = b(s), { defaultScale: p } = e(), m = t(o, p);
77
+ let d = b(s), { defaultScale: p } = t(), m = e(o, p);
78
78
  return /* @__PURE__ */ l("span", {
79
79
  "data-slot": "pagination-ellipsis",
80
80
  className: r("pagination-primitives--ellipsis inline-flex shrink-0 items-center justify-center text-muted-foreground", _[m], n),
@@ -94,7 +94,7 @@ function T(e) {
94
94
  return /* @__PURE__ */ c(h, { ...e });
95
95
  }
96
96
  function E({ className: n, children: o, active: s = !1, size: l, ...u }) {
97
- let { defaultScale: d } = e(), f = t(l, d);
97
+ let { defaultScale: d } = t(), f = e(l, d);
98
98
  return /* @__PURE__ */ c(i, {
99
99
  size: f,
100
100
  tone: "secondary",
@@ -155,4 +155,4 @@ function O({ className: e, text: t, strings: n, children: i, ...o }) {
155
155
  //#endregion
156
156
  export { O as a, v as c, E as i, w as n, D as o, T as r, S as s, C as t };
157
157
 
158
- //# sourceMappingURL=pagination-BL25hu2s.js.map
158
+ //# sourceMappingURL=pagination-CgCjElfu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-BL25hu2s.js","names":["PaginationContent","PaginationItem","UIPagination","UIPaginationContent","UIPaginationItem","useDensityConfig","resolveComponentScale","cn","Button","Text","Pagination","props","className","PaginationContent$1","PaginationItem$1","pageMinWidthClasses","pageSquareClasses","defaultPaginationStrings","PaginationStringsContext","createContext","usePaginationStrings","inheritedStrings","useContext","useStrings","stringsProp","isSimpleText","value","PaginationPrimitive","ariaLabel","strings","PaginationContent","PaginationEllipsis","sizeProp","size","defaultScale","MoreHorizontalIcon","label","PaginationItem","PaginationLink","active","children","PaginationPrevious","_children","ChevronLeftIcon","text","PaginationNext","ChevronRightIcon"],"sources":["../src/components/ui/pagination.tsx","../src/components/base/navigation/pagination.tsx"],"sourcesContent":["import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"./button\"\nimport { cn } from \"../../lib/utils\"\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn(\n \"mx-auto flex w-full justify-center\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({\n className,\n ...props\n}: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\"flex items-center\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n React.ComponentProps<\"a\">\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) {\n return (\n <Button\n variant={isActive ? \"outline\" : \"ghost\"}\n size={size}\n className={cn(className)}\n nativeButton={false}\n render={\n <a\n aria-current={isActive ? \"page\" : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n {...props}\n />\n }\n />\n )\n}\n\nfunction PaginationPrevious({\n className,\n text = \"Previous\",\n ...props\n}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"pl-2!\", className)}\n {...props}\n >\n <ChevronLeftIcon data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">\n {text}\n </span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({\n className,\n text = \"Next\",\n ...props\n}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"pr-2!\", className)}\n {...props}\n >\n <span className=\"hidden sm:block\">{text}</span>\n <ChevronRightIcon data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\n \"size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-icon 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';\nimport { resolveComponentScale, useDensityConfig, type ComponentScale } from '../../../lib/ui-provider';\n\nconst pageMinWidthClasses: Record<ComponentScale, string> = {\n\tsm: 'min-w-action-sm', md: 'min-w-action', lg: 'min-w-action-lg',\n};\nconst pageSquareClasses: Record<ComponentScale, string> = {\n\tsm: 'size-action-sm', md: 'size-action', lg: 'size-action-lg',\n};\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/** Matches page-link geometry; falls back to the provider scale. */\n\tsize?: ComponentScale;\n\t/** Copy for the control. */\n\tlabel?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\nexport type PaginationItemProps = ComponentProps<typeof UIPaginationItem>;\nexport interface PaginationLinkProps extends Omit<\n\tButtonProps,\n\t'buttonStyle' | 'children' | 'variant'\n> {\n\tchildren?: ReactNode;\n\t/** Marks the current page. */\n\tactive?: boolean;\n}\nexport type PaginationNextProps = PaginationLinkProps & {\n\t/** Visible label for the control. */\n\ttext?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\nexport type PaginationPreviousProps = PaginationLinkProps & {\n\t/** Visible label for the control. */\n\ttext?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/**\n * Tokenized pagination navigation root.\n *\n * Compose it with the exported content, item, link, previous, next, and\n * ellipsis parts when consumers need explicit page navigation markup.\n */\n\nexport function PaginationPrimitive({ className, strings: stringsProp, children, 'aria-label': ariaLabel, ...props }: PaginationProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\treturn (\n\t\t<PaginationStringsContext.Provider value={strings}>\n\t\t\t<UIPagination\n\t\t\t\taria-label={ariaLabel ?? strings.navigationLabel}\n\t\t\t\tclassName={cn('pagination-primitives--component', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</UIPagination>\n\t\t</PaginationStringsContext.Provider>\n\t);\n}\n\nexport function PaginationContent({ className, ...props }: PaginationContentProps) {\n\treturn (\n\t\t<UIPaginationContent\n\t\t\tclassName={cn('pagination-primitives--content m-0 p-0 list-none gap-space-2xs', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function PaginationEllipsis({ className, label, size: sizeProp, strings: stringsProp, ...props }: PaginationEllipsisProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"pagination-ellipsis\"\n\t\t\t// Same square as a page link, so the row keeps one rhythm around the gap.\n\t\t\tclassName={cn('pagination-primitives--ellipsis inline-flex shrink-0 items-center justify-center text-muted-foreground', pageSquareClasses[size], 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, size: sizeProp, ...props }: PaginationLinkProps) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\treturn (\n\t\t<Button\n\t\t\tsize={size}\n\t\t\ttone=\"secondary\"\n\t\t\tbuttonStyle={active ? 'outline' : 'ghost'}\n\t\t\taria-current={active ? 'page' : undefined}\n\t\t\tdata-slot=\"pagination-link\"\n\t\t\tdata-active={active || undefined}\n\t\t\t// Page numbers are action-height squares that widen only for long numbers.\n\t\t\tclassName={cn('pagination-primitives--link px-control-xs', pageMinWidthClasses[size], 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\tclassName={cn('pagination-primitives--previous sm:!ps-control-sm sm:!pe-control', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronLeftIcon data-icon=\"inline-start\" aria-hidden=\"true\" />\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"hidden text-inherit sm:block\">\n\t\t\t\t{text ?? strings.previous}\n\t\t\t</Text>\n\t\t</PaginationLink>\n\t);\n}\n\n\nexport function PaginationNext({ className, text, strings: stringsProp, children: _children, ...props }: PaginationNextProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label={strings.nextLabel}\n\t\t\tclassName={cn('pagination-primitives--next sm:!ps-control sm:!pe-control-sm', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"hidden text-inherit sm:block\">\n\t\t\t\t{text ?? strings.next}\n\t\t\t</Text>\n\t\t\t<ChevronRightIcon data-icon=\"inline-end\" aria-hidden=\"true\" />\n\t\t</PaginationLink>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAMA,SAASU,EAAW,EAAE,cAAW,GAAGC,KAAsC;CACxE,OACE,kBAAC,OAAD;EACE,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAWJ,EACT,sCACAK,CACF;EACA,GAAID;CACL,CAAA;AAEL;AAEA,SAASX,EAAkB,EACzB,cACA,GAAGW,KAC0B;CAC7B,OACE,kBAAC,MAAD;EACE,aAAU;EACV,WAAWJ,EAAG,qBAAqBK,CAAS;EAC5C,GAAID;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3E,UAAAmC,KAAQf,EAAQ;EACZ,CAAA,CACS;;AAElB;AAGA,SAAgBgB,EAAe,EAAE,cAAW,SAAM,SAASrB,GAAa,UAAUkB,GAAW,GAAG/B,KAA8B;CAC7H,IAAMkB,IAAUT,EAAqBI,CAAW;CAChD,OACC,kBAACc,GAAD;EACC,cAAYT,EAAQ;EACpB,WAAWtB,EAAG,gEAAgEK,CAAS;EACvF,GAAID;EAHL,UAAA,CAKC,kBAACF,GAAD;GAAM,KAAI;GAAO,MAAK;GAAU,QAAO;GAAS,YAAW;GAAQ,WAAU;GAC3E,UAAAmC,KAAQf,EAAQ;EACZ,CAAA,GACN,kBAACiB,GAAD;GAAkB,aAAU;GAAa,eAAY;EAAQ,CAAA,CAC9C;;AAElB"}
1
+ {"version":3,"file":"pagination-CgCjElfu.js","names":["PaginationContent","PaginationItem","UIPagination","UIPaginationContent","UIPaginationItem","resolveComponentScale","useDensityConfig","cn","Button","Text","Pagination","props","className","PaginationContent$1","PaginationItem$1","pageMinWidthClasses","pageSquareClasses","defaultPaginationStrings","PaginationStringsContext","createContext","usePaginationStrings","inheritedStrings","useContext","useStrings","stringsProp","isSimpleText","value","PaginationPrimitive","ariaLabel","strings","PaginationContent","PaginationEllipsis","sizeProp","size","defaultScale","MoreHorizontalIcon","label","PaginationItem","PaginationLink","active","children","PaginationPrevious","_children","ChevronLeftIcon","text","PaginationNext","ChevronRightIcon"],"sources":["../src/components/ui/pagination.tsx","../src/components/base/navigation/pagination.tsx"],"sourcesContent":["import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { Button } from \"./button\"\nimport { cn } from \"../../lib/utils\"\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn(\n \"mx-auto flex w-full justify-center\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({\n className,\n ...props\n}: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\"flex items-center\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n React.ComponentProps<\"a\">\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) {\n return (\n <Button\n variant={isActive ? \"outline\" : \"ghost\"}\n size={size}\n className={cn(className)}\n nativeButton={false}\n render={\n <a\n aria-current={isActive ? \"page\" : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n {...props}\n />\n }\n />\n )\n}\n\nfunction PaginationPrevious({\n className,\n text = \"Previous\",\n ...props\n}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"pl-2!\", className)}\n {...props}\n >\n <ChevronLeftIcon data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">\n {text}\n </span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({\n className,\n text = \"Next\",\n ...props\n}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"pr-2!\", className)}\n {...props}\n >\n <span className=\"hidden sm:block\">{text}</span>\n <ChevronRightIcon data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\n \"size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-icon 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';\nimport { resolveComponentScale, useDensityConfig, type ComponentScale } from '../../../lib/ui-provider';\n\nconst pageMinWidthClasses: Record<ComponentScale, string> = {\n\tsm: 'min-w-action-sm', md: 'min-w-action', lg: 'min-w-action-lg',\n};\nconst pageSquareClasses: Record<ComponentScale, string> = {\n\tsm: 'size-action-sm', md: 'size-action', lg: 'size-action-lg',\n};\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/** Matches page-link geometry; falls back to the provider scale. */\n\tsize?: ComponentScale;\n\t/** Copy for the control. */\n\tlabel?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\nexport type PaginationItemProps = ComponentProps<typeof UIPaginationItem>;\nexport interface PaginationLinkProps extends Omit<\n\tButtonProps,\n\t'buttonStyle' | 'children' | 'variant'\n> {\n\tchildren?: ReactNode;\n\t/** Marks the current page. */\n\tactive?: boolean;\n}\nexport type PaginationNextProps = PaginationLinkProps & {\n\t/** Visible label for the control. */\n\ttext?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\nexport type PaginationPreviousProps = PaginationLinkProps & {\n\t/** Visible label for the control. */\n\ttext?: string;\n\t/** Overrides the pagination copy. */\n\tstrings?: StringsProp<PaginationStrings>;\n};\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/**\n * Tokenized pagination navigation root.\n *\n * Compose it with the exported content, item, link, previous, next, and\n * ellipsis parts when consumers need explicit page navigation markup.\n */\n\nexport function PaginationPrimitive({ className, strings: stringsProp, children, 'aria-label': ariaLabel, ...props }: PaginationProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\treturn (\n\t\t<PaginationStringsContext.Provider value={strings}>\n\t\t\t<UIPagination\n\t\t\t\taria-label={ariaLabel ?? strings.navigationLabel}\n\t\t\t\tclassName={cn('pagination-primitives--component', className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</UIPagination>\n\t\t</PaginationStringsContext.Provider>\n\t);\n}\n\nexport function PaginationContent({ className, ...props }: PaginationContentProps) {\n\treturn (\n\t\t<UIPaginationContent\n\t\t\tclassName={cn('pagination-primitives--content m-0 p-0 list-none gap-space-2xs', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function PaginationEllipsis({ className, label, size: sizeProp, strings: stringsProp, ...props }: PaginationEllipsisProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"pagination-ellipsis\"\n\t\t\t// Same square as a page link, so the row keeps one rhythm around the gap.\n\t\t\tclassName={cn('pagination-primitives--ellipsis inline-flex shrink-0 items-center justify-center text-muted-foreground', pageSquareClasses[size], 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, size: sizeProp, ...props }: PaginationLinkProps) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\treturn (\n\t\t<Button\n\t\t\tsize={size}\n\t\t\ttone=\"secondary\"\n\t\t\tbuttonStyle={active ? 'outline' : 'ghost'}\n\t\t\taria-current={active ? 'page' : undefined}\n\t\t\tdata-slot=\"pagination-link\"\n\t\t\tdata-active={active || undefined}\n\t\t\t// Page numbers are action-height squares that widen only for long numbers.\n\t\t\tclassName={cn('pagination-primitives--link px-control-xs', pageMinWidthClasses[size], 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\tclassName={cn('pagination-primitives--previous sm:!ps-control-sm sm:!pe-control', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronLeftIcon data-icon=\"inline-start\" aria-hidden=\"true\" />\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"hidden text-inherit sm:block\">\n\t\t\t\t{text ?? strings.previous}\n\t\t\t</Text>\n\t\t</PaginationLink>\n\t);\n}\n\n\nexport function PaginationNext({ className, text, strings: stringsProp, children: _children, ...props }: PaginationNextProps) {\n\tconst strings = usePaginationStrings(stringsProp);\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label={strings.nextLabel}\n\t\t\tclassName={cn('pagination-primitives--next sm:!ps-control sm:!pe-control-sm', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"hidden text-inherit sm:block\">\n\t\t\t\t{text ?? strings.next}\n\t\t\t</Text>\n\t\t\t<ChevronRightIcon data-icon=\"inline-end\" aria-hidden=\"true\" />\n\t\t</PaginationLink>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAMA,SAASU,EAAW,EAAE,cAAW,GAAGC,KAAsC;CACxE,OACE,kBAAC,OAAD;EACE,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAWJ,EACT,sCACAK,CACF;EACA,GAAID;CACL,CAAA;AAEL;AAEA,SAASX,EAAkB,EACzB,cACA,GAAGW,KAC0B;CAC7B,OACE,kBAAC,MAAD;EACE,aAAU;EACV,WAAWJ,EAAG,qBAAqBK,CAAS;EAC5C,GAAID;CACL,CAAA;AAEL;AAEA,SAASV,EAAe,EAAE,GAAGU,KAAqC;CAChE,OAAO,kBAAC,MAAD;EAAI,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