themelia-react-ui 2.0.3 → 2.0.4

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 (421) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +65 -28
  3. package/dist/{accordion-Cjb6sx0G.js → accordion-96o0pN62.js} +5 -5
  4. package/dist/{accordion-Cjb6sx0G.js.map → accordion-96o0pN62.js.map} +1 -1
  5. package/dist/action-menu-CHgs8vmj.js +281 -0
  6. package/dist/action-menu-CHgs8vmj.js.map +1 -0
  7. package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-B8yGOr8-.js} +7 -1
  8. package/dist/affordance-geometry.generated-B8yGOr8-.js.map +1 -0
  9. package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-BZUGwBq6.js} +277 -276
  10. package/dist/ai-artifact-BZUGwBq6.js.map +1 -0
  11. package/dist/{app-shell-C4FhvCqF.js → app-shell-D63ATkIK.js} +84 -83
  12. package/dist/app-shell-D63ATkIK.js.map +1 -0
  13. package/dist/{attachment-BxDfL2mw.js → attachment-DkoqHPPl.js} +7 -7
  14. package/dist/{attachment-BxDfL2mw.js.map → attachment-DkoqHPPl.js.map} +1 -1
  15. package/dist/{auth-BGua8ouh.js → auth-D2FVZ1MH.js} +10 -10
  16. package/dist/{auth-BGua8ouh.js.map → auth-D2FVZ1MH.js.map} +1 -1
  17. package/dist/{avatar-DAPlDvhJ.js → avatar-DWO_HHhB.js} +5 -5
  18. package/dist/{avatar-DAPlDvhJ.js.map → avatar-DWO_HHhB.js.map} +1 -1
  19. package/dist/{badge-HpFqoqSY.js → badge-DErMA7ul.js} +4 -4
  20. package/dist/{badge-HpFqoqSY.js.map → badge-DErMA7ul.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 +13 -13
  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 +1 -1
  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 +6 -6
  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 +9 -9
  51. package/dist/base/sheet.js +1 -1
  52. package/dist/base/sidebar.js +1 -1
  53. package/dist/base/signature-pad.js +6 -6
  54. package/dist/base/skeleton.js +1 -1
  55. package/dist/base/spinner.js +4 -4
  56. package/dist/base/structure.js +1 -1
  57. package/dist/base/table.js +1 -1
  58. package/dist/base/text-inputs.js +2 -2
  59. package/dist/base/toaster.js +3 -3
  60. package/dist/base/tree.js +1 -1
  61. package/dist/base/upload-queue.js +1 -1
  62. package/dist/base/upload.js +3 -3
  63. package/dist/base/value-inputs.js +1 -1
  64. package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-CdfIkCsV.js} +4 -4
  65. package/dist/{batch-action-bar-DnUJ21NQ.js.map → batch-action-bar-CdfIkCsV.js.map} +1 -1
  66. package/dist/blocks/admin.js +20 -20
  67. package/dist/blocks/admin.js.map +1 -1
  68. package/dist/blocks/ai.js +15 -15
  69. package/dist/blocks/analytics/usage-card.js +1 -1
  70. package/dist/blocks/analytics.js +17 -17
  71. package/dist/blocks/analytics.js.map +1 -1
  72. package/dist/blocks/collaboration.js +1 -1
  73. package/dist/blocks/commerce/receipt.js +1 -1
  74. package/dist/blocks/commerce.js +570 -567
  75. package/dist/blocks/commerce.js.map +1 -1
  76. package/dist/blocks/data-display.js +2 -2
  77. package/dist/blocks/onboarding.js +5 -5
  78. package/dist/blocks/planning.js +11 -11
  79. package/dist/blocks/timelines.js +1 -1
  80. package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-B-WFKecD.js} +4 -4
  81. package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-B-WFKecD.js.map} +1 -1
  82. package/dist/{button-DVzspB_G.js → button-DkmK-z8E.js} +2 -2
  83. package/dist/{button-DVzspB_G.js.map → button-DkmK-z8E.js.map} +1 -1
  84. package/dist/{buttons-DPZekJFu.js → buttons-BbfzgczK.js} +8 -8
  85. package/dist/{buttons-DPZekJFu.js.map → buttons-BbfzgczK.js.map} +1 -1
  86. package/dist/{cards-BaBZR-AU.js → cards-4JTWqvVe.js} +10 -10
  87. package/dist/cards-4JTWqvVe.js.map +1 -0
  88. package/dist/{chart-ZOYyK2xG.js → chart-C19flDQb.js} +4 -4
  89. package/dist/{chart-ZOYyK2xG.js.map → chart-C19flDQb.js.map} +1 -1
  90. package/dist/{checkbox-AWIhNhmo.js → checkbox-CzYUTPeJ.js} +9 -5
  91. package/dist/checkbox-CzYUTPeJ.js.map +1 -0
  92. package/dist/{choice-inputs-CNHvARCJ.js → choice-inputs-JLtij2y4.js} +182 -176
  93. package/dist/choice-inputs-JLtij2y4.js.map +1 -0
  94. package/dist/{code-block-DeneBJR_.js → code-block-CGNaUtAE.js} +7 -7
  95. package/dist/{code-block-DeneBJR_.js.map → code-block-CGNaUtAE.js.map} +1 -1
  96. package/dist/{collapsible-C-_l4hpy.js → collapsible-Do4G0zcC.js} +3 -3
  97. package/dist/{collapsible-C-_l4hpy.js.map → collapsible-Do4G0zcC.js.map} +1 -1
  98. package/dist/{collection-content-By56pLog.js → collection-content-C0e8SsTm.js} +3 -3
  99. package/dist/{collection-content-By56pLog.js.map → collection-content-C0e8SsTm.js.map} +1 -1
  100. package/dist/{combobox-Dxo2fAYQ.js → combobox-CBJDs6w_.js} +12 -12
  101. package/dist/{combobox-Dxo2fAYQ.js.map → combobox-CBJDs6w_.js.map} +1 -1
  102. package/dist/{combobox-DaHESuiL.js → combobox-hbhSS18O.js} +7 -7
  103. package/dist/{combobox-DaHESuiL.js.map → combobox-hbhSS18O.js.map} +1 -1
  104. package/dist/{command-C25VMRII.js → command-D8NrBj-b.js} +7 -7
  105. package/dist/{command-C25VMRII.js.map → command-D8NrBj-b.js.map} +1 -1
  106. package/dist/{comments-DD0DUPwJ.js → comments-Di4w0H_S.js} +383 -382
  107. package/dist/comments-Di4w0H_S.js.map +1 -0
  108. package/dist/components/base/action-menu/action-menu.d.ts +2 -0
  109. package/dist/components/base/cards/card.recipes.d.ts +12 -5
  110. package/dist/components/base/cards/smart-card.types.d.ts +12 -7
  111. package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
  112. package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
  113. package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
  114. package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
  115. package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
  116. package/dist/components/base/forms/form-field.d.ts +5 -3
  117. package/dist/components/base/forms/index.d.ts +1 -0
  118. package/dist/components/base/forms/server-errors.d.ts +16 -0
  119. package/dist/components/base/forms/workflow.d.ts +5 -2
  120. package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
  121. package/dist/components/base/navigation/page-header/page-header.d.ts +4 -2
  122. package/dist/components/base/structure/composition.recipes.d.ts +17 -0
  123. package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
  124. package/dist/components/base/text-inputs/input.d.ts +4 -2
  125. package/dist/components/base/text-inputs/textarea.d.ts +4 -2
  126. package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
  127. package/dist/components/base/value-inputs/slider.d.ts +5 -1
  128. package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
  129. package/dist/components/typography/text.styles.d.ts +26 -1
  130. package/dist/composition.recipes-COdiFhxB.js +19 -0
  131. package/dist/composition.recipes-COdiFhxB.js.map +1 -0
  132. package/dist/containers-CRmHf7GP.js +104 -0
  133. package/dist/containers-CRmHf7GP.js.map +1 -0
  134. package/dist/{copyable-ClBuk_UK.js → copyable-CnGCZdX4.js} +4 -4
  135. package/dist/{copyable-ClBuk_UK.js.map → copyable-CnGCZdX4.js.map} +1 -1
  136. package/dist/{data-display-DT_khPl_.js → data-display-D4oujtx0.js} +239 -238
  137. package/dist/data-display-D4oujtx0.js.map +1 -0
  138. package/dist/{date-DCrsDTZc.js → date-Q7jnXxpk.js} +5 -5
  139. package/dist/{date-DCrsDTZc.js.map → date-Q7jnXxpk.js.map} +1 -1
  140. package/dist/{date-picker-B2K3ucWn.js → date-picker-zOt1oNss.js} +102 -90
  141. package/dist/date-picker-zOt1oNss.js.map +1 -0
  142. package/dist/date-pickers-cj8IXbDC.js +179 -0
  143. package/dist/date-pickers-cj8IXbDC.js.map +1 -0
  144. package/dist/{display-hAc1HjpI.js → display-BB4BL_-K.js} +8 -8
  145. package/dist/{display-hAc1HjpI.js.map → display-BB4BL_-K.js.map} +1 -1
  146. package/dist/{dropdown-menu-Cl4X7L5S.js → dropdown-menu-CjY8Vt7W.js} +8 -8
  147. package/dist/{dropdown-menu-Cl4X7L5S.js.map → dropdown-menu-CjY8Vt7W.js.map} +1 -1
  148. package/dist/features/activities.js +11 -11
  149. package/dist/features/ai-chat.js +9 -9
  150. package/dist/features/appointment-calendar.js +222 -220
  151. package/dist/features/appointment-calendar.js.map +1 -1
  152. package/dist/features/async-preview.js +8 -8
  153. package/dist/features/combobox.js +1 -1
  154. package/dist/features/comments.js +1 -1
  155. package/dist/features/data-view.js +10 -10
  156. package/dist/features/email-composer.js +275 -274
  157. package/dist/features/email-composer.js.map +1 -1
  158. package/dist/features/event-calendar.js +199 -198
  159. package/dist/features/event-calendar.js.map +1 -1
  160. package/dist/features/filters.js +1 -1
  161. package/dist/features/global-search.js +12 -12
  162. package/dist/features/kanban.js +4 -4
  163. package/dist/features/map.js +7 -7
  164. package/dist/features/media-library.js +623 -622
  165. package/dist/features/media-library.js.map +1 -1
  166. package/dist/features/mentions.js +1 -1
  167. package/dist/features/overlays.js +1 -1
  168. package/dist/features/products.js +973 -969
  169. package/dist/features/products.js.map +1 -1
  170. package/dist/features/questionnaire.js +12 -12
  171. package/dist/features/resource-assignment.js +8 -8
  172. package/dist/features/resource.js +113 -112
  173. package/dist/features/resource.js.map +1 -1
  174. package/dist/features/rich-text-editor.js +2 -2
  175. package/dist/features/schema-form.js +254 -253
  176. package/dist/features/schema-form.js.map +1 -1
  177. package/dist/features/suggestions.js +3 -3
  178. package/dist/features/sync.js +3 -3
  179. package/dist/features/table.js +1 -1
  180. package/dist/features/theme-tweaker.js +19 -19
  181. package/dist/features/theme-tweaker.js.map +1 -1
  182. package/dist/{feedback-BYIhtitP.js → feedback-DZNL5Lg1.js} +9 -9
  183. package/dist/{feedback-BYIhtitP.js.map → feedback-DZNL5Lg1.js.map} +1 -1
  184. package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DjwGx8eM.js} +2 -2
  185. package/dist/{field-affordance-recipes-DZhnIL_Y.js.map → field-affordance-recipes-DjwGx8eM.js.map} +1 -1
  186. package/dist/{filters-DJVAveHA.js → filters-BcT-uoFy.js} +19 -19
  187. package/dist/{filters-DJVAveHA.js.map → filters-BcT-uoFy.js.map} +1 -1
  188. package/dist/{form-field-CwH9y77i.js → form-field-CsgRmdit.js} +14 -8
  189. package/dist/form-field-CsgRmdit.js.map +1 -0
  190. package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-NXgjkmBG.js} +3 -3
  191. package/dist/{form-sizing-BdP_Mf5p.js.map → form-sizing-NXgjkmBG.js.map} +1 -1
  192. package/dist/{forms-B9G_xwzi.js → forms-BV5m5aQF.js} +83 -65
  193. package/dist/forms-BV5m5aQF.js.map +1 -0
  194. package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-Cd33AKbD.js} +288 -288
  195. package/dist/forms-numeric-Cd33AKbD.js.map +1 -0
  196. package/dist/{header-BSfIEWbI.js → header-BA697l4a.js} +14 -14
  197. package/dist/{header-BSfIEWbI.js.map → header-BA697l4a.js.map} +1 -1
  198. package/dist/hooks/useFormErrors.d.ts +1 -1
  199. package/dist/{hooks-ClH9thn4.js → hooks-BQ-L7Uu2.js} +2 -2
  200. package/dist/{hooks-ClH9thn4.js.map → hooks-BQ-L7Uu2.js.map} +1 -1
  201. package/dist/{icon-badge-DYKIwvOV.js → icon-badge-COWbCCWu.js} +3 -3
  202. package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-COWbCCWu.js.map} +1 -1
  203. package/dist/index.js +2 -2
  204. package/dist/input-Cdw4k0fb.js +289 -0
  205. package/dist/input-Cdw4k0fb.js.map +1 -0
  206. package/dist/{input-CZw8iU99.js → input-DOPL5_QE.js} +3 -3
  207. package/dist/{input-CZw8iU99.js.map → input-DOPL5_QE.js.map} +1 -1
  208. package/dist/item-BvZ2DR_x.js +277 -0
  209. package/dist/item-BvZ2DR_x.js.map +1 -0
  210. package/dist/layout/app-shell.js +1 -1
  211. package/dist/layout/auth.js +1 -1
  212. package/dist/layout/containers.js +1 -1
  213. package/dist/layout/header.js +1 -1
  214. package/dist/layout/hooks.js +1 -1
  215. package/dist/layout/navigation.js +1 -1
  216. package/dist/layout/page.js +1 -1
  217. package/dist/layout/settings.js +1 -1
  218. package/dist/layout/sidebar.js +2 -2
  219. package/dist/layout/workspace.js +1 -1
  220. package/dist/layout.js +10 -10
  221. package/dist/lib/affordance-geometry.generated.d.ts +6 -0
  222. package/dist/lib/ui-provider/types.d.ts +1 -1
  223. package/dist/lib/utils.js +1 -1
  224. package/dist/{media-gallery-3zIVLMWH.js → media-gallery-CSl5W1Fy.js} +6 -6
  225. package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-CSl5W1Fy.js.map} +1 -1
  226. package/dist/{mentions-CGlEJ15c.js → mentions-RKOQaaIB.js} +8 -8
  227. package/dist/{mentions-CGlEJ15c.js.map → mentions-RKOQaaIB.js.map} +1 -1
  228. package/dist/{message-DZ_ruyUV.js → message-INU2xsxu.js} +4 -4
  229. package/dist/{message-DZ_ruyUV.js.map → message-INU2xsxu.js.map} +1 -1
  230. package/dist/metadata-list-qVV7AVxa.js +443 -0
  231. package/dist/metadata-list-qVV7AVxa.js.map +1 -0
  232. package/dist/{navigation-BzhHI3lo.js → navigation-BQNcg1jT.js} +8 -8
  233. package/dist/{navigation-BzhHI3lo.js.map → navigation-BQNcg1jT.js.map} +1 -1
  234. package/dist/{navigation-Bnotn4AQ.js → navigation-DLF3E1IC.js} +7 -7
  235. package/dist/{navigation-Bnotn4AQ.js.map → navigation-DLF3E1IC.js.map} +1 -1
  236. package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-WZEs-hYo.js} +2 -2
  237. package/dist/{navigation-row-recipes-BFLCk_Aq.js.map → navigation-row-recipes-WZEs-hYo.js.map} +1 -1
  238. package/dist/{number-DbV1Dija.js → number-E_OiIfJz.js} +5 -5
  239. package/dist/{number-DbV1Dija.js.map → number-E_OiIfJz.js.map} +1 -1
  240. package/dist/{overflow-tab-bar-CWY7Nogn.js → overflow-tab-bar-CrbqMteP.js} +107 -105
  241. package/dist/overflow-tab-bar-CrbqMteP.js.map +1 -0
  242. package/dist/{overlays-tMkF-VAN.js → overlays-BlKynmde.js} +228 -227
  243. package/dist/overlays-BlKynmde.js.map +1 -0
  244. package/dist/page-CIwNUtGr.js +227 -0
  245. package/dist/page-CIwNUtGr.js.map +1 -0
  246. package/dist/page-header-commands-DFMlNYzN.js +128 -0
  247. package/dist/page-header-commands-DFMlNYzN.js.map +1 -0
  248. package/dist/{pagination-BL25hu2s.js → pagination-Ch8X_47u.js} +5 -5
  249. package/dist/{pagination-BL25hu2s.js.map → pagination-Ch8X_47u.js.map} +1 -1
  250. package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-BYaCdFhf.js} +6 -6
  251. package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-BYaCdFhf.js.map} +1 -1
  252. package/dist/{popover-gnTOhbFM.js → popover-uwzX2vo7.js} +4 -4
  253. package/dist/{popover-gnTOhbFM.js.map → popover-uwzX2vo7.js.map} +1 -1
  254. package/dist/{primitives-BFK08r9M.js → primitives-Du64iDbb.js} +6 -6
  255. package/dist/{primitives-BFK08r9M.js.map → primitives-Du64iDbb.js.map} +1 -1
  256. package/dist/primitives.js +4 -4
  257. package/dist/{progress-B1VnCT0K.js → progress-BvF2oCdV.js} +5 -5
  258. package/dist/{progress-B1VnCT0K.js.map → progress-BvF2oCdV.js.map} +1 -1
  259. package/dist/{receipt-BVSOH3Xo.js → receipt-D789Jwyy.js} +6 -6
  260. package/dist/{receipt-BVSOH3Xo.js.map → receipt-D789Jwyy.js.map} +1 -1
  261. package/dist/{rich-text-GOUyKQ-s.js → rich-text-CLJEf76s.js} +4 -4
  262. package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-CLJEf76s.js.map} +1 -1
  263. package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-Cm1dpUpQ.js} +10 -10
  264. package/dist/{rich-text-editor-cRLC-eBK.js.map → rich-text-editor-Cm1dpUpQ.js.map} +1 -1
  265. package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-L__e4x47.js} +4 -4
  266. package/dist/{rich-text-editor-toolbar-DfXg0-VC.js.map → rich-text-editor-toolbar-L__e4x47.js.map} +1 -1
  267. package/dist/{scroll-area-DcI-M1UT.js → scroll-area-La5RXsEk.js} +2 -2
  268. package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-La5RXsEk.js.map} +1 -1
  269. package/dist/{separator-Bom7NsGO.js → separator-DAEV0w65.js} +2 -2
  270. package/dist/{separator-Bom7NsGO.js.map → separator-DAEV0w65.js.map} +1 -1
  271. package/dist/{separator-BDV-Y648.js → separator-GNfPG-90.js} +3 -3
  272. package/dist/{separator-BDV-Y648.js.map → separator-GNfPG-90.js.map} +1 -1
  273. package/dist/services/actions.js +1 -1
  274. package/dist/settings-BA2iboic.js +174 -0
  275. package/dist/settings-BA2iboic.js.map +1 -0
  276. package/dist/{sheet-ijlsjq-n.js → sheet-DoAxTb2J.js} +7 -7
  277. package/dist/{sheet-ijlsjq-n.js.map → sheet-DoAxTb2J.js.map} +1 -1
  278. package/dist/{sidebar-DkTO4VTO.js → sidebar-ByqKR_W5.js} +13 -13
  279. package/dist/{sidebar-DkTO4VTO.js.map → sidebar-ByqKR_W5.js.map} +1 -1
  280. package/dist/{sidebar-Db6gkh3U.js → sidebar-D2iSnGJ7.js} +11 -11
  281. package/dist/{sidebar-Db6gkh3U.js.map → sidebar-D2iSnGJ7.js.map} +1 -1
  282. package/dist/{skeleton-Byjnt7qr.js → skeleton-CUj8O5Bd.js} +3 -3
  283. package/dist/{skeleton-Byjnt7qr.js.map → skeleton-CUj8O5Bd.js.map} +1 -1
  284. package/dist/smart-card-CqkzQsK-.js +614 -0
  285. package/dist/smart-card-CqkzQsK-.js.map +1 -0
  286. package/dist/{structure-BmisBK-3.js → structure-C0V0_Fyf.js} +3 -3
  287. package/dist/{structure-BmisBK-3.js.map → structure-C0V0_Fyf.js.map} +1 -1
  288. package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
  289. package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
  290. package/dist/style.css +1 -1
  291. package/dist/{table-DsfzoUia.js → table-CpvnzJn9.js} +3 -3
  292. package/dist/{table-DsfzoUia.js.map → table-CpvnzJn9.js.map} +1 -1
  293. package/dist/{table-BweFy_P9.js → table-DH7rozUv.js} +19 -19
  294. package/dist/{table-BweFy_P9.js.map → table-DH7rozUv.js.map} +1 -1
  295. package/dist/{tabs-CDocW5D1.js → tabs-eqVsJZWO.js} +7 -7
  296. package/dist/{tabs-CDocW5D1.js.map → tabs-eqVsJZWO.js.map} +1 -1
  297. package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-DXItiR0O.js} +101 -98
  298. package/dist/text-inputs-DXItiR0O.js.map +1 -0
  299. package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
  300. package/dist/text.styles-B64My8RZ.js.map +1 -0
  301. package/dist/theme.css +152 -112
  302. package/dist/{timelines-CwM_9IhD.js → timelines-DmtztAY_.js} +10 -10
  303. package/dist/{timelines-CwM_9IhD.js.map → timelines-DmtztAY_.js.map} +1 -1
  304. package/dist/{tooltip-yiRJUFjp.js → tooltip-B4hjKtoV.js} +3 -3
  305. package/dist/{tooltip-yiRJUFjp.js.map → tooltip-B4hjKtoV.js.map} +1 -1
  306. package/dist/{tree-WnKQzwbq.js → tree-CV11PURP.js} +8 -8
  307. package/dist/{tree-WnKQzwbq.js.map → tree-CV11PURP.js.map} +1 -1
  308. package/dist/typography/rich-text.js +1 -1
  309. package/dist/typography-CSyJrh28.js +117 -0
  310. package/dist/typography-CSyJrh28.js.map +1 -0
  311. package/dist/typography.js +1 -1
  312. package/dist/{ui-provider-C_U0Xma4.js → ui-provider-CQCuCBcy.js} +3 -3
  313. package/dist/ui-provider-CQCuCBcy.js.map +1 -0
  314. package/dist/ui-provider.js +1 -1
  315. package/dist/{upload-CXyxmQBP.js → upload-C9SA0X-8.js} +11 -11
  316. package/dist/{upload-CXyxmQBP.js.map → upload-C9SA0X-8.js.map} +1 -1
  317. package/dist/{upload-queue-Boscubn9.js → upload-queue-DhQJiSRc.js} +9 -9
  318. package/dist/{upload-queue-Boscubn9.js.map → upload-queue-DhQJiSRc.js.map} +1 -1
  319. package/dist/{usage-card-BhO5eqkX.js → usage-card-DVTRDmGz.js} +134 -133
  320. package/dist/usage-card-DVTRDmGz.js.map +1 -0
  321. package/dist/{utils-BRhFDwuU.js → utils-CF3c95Io.js} +68 -5
  322. package/dist/utils-CF3c95Io.js.map +1 -0
  323. package/dist/value-inputs-C0o70p-U.js +980 -0
  324. package/dist/value-inputs-C0o70p-U.js.map +1 -0
  325. package/dist/{value-typography-BP8OG6h5.js → value-typography-ClupF0Gz.js} +2 -2
  326. package/dist/{value-typography-BP8OG6h5.js.map → value-typography-ClupF0Gz.js.map} +1 -1
  327. package/dist/workspace-9EFVXUyk.js +410 -0
  328. package/dist/workspace-9EFVXUyk.js.map +1 -0
  329. package/docs/consumer-skill/SKILL.md +14 -129
  330. package/docs/consumer-skill/examples/app-layout.tsx +22 -12
  331. package/docs/consumer-skill/examples/authentication.tsx +77 -0
  332. package/docs/consumer-skill/examples/edit.tsx +30 -38
  333. package/docs/consumer-skill/examples/manifest.json +51 -1
  334. package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
  335. package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
  336. package/docs/consumer-skill/examples/rhf-overlay-form.tsx +92 -0
  337. package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
  338. package/docs/consumer-skill/references/agents-md.md +17 -7
  339. package/docs/consumer-skill/references/authentication.md +42 -0
  340. package/docs/consumer-skill/references/component-contracts.json +319824 -0
  341. package/docs/consumer-skill/references/composition-mapping.md +92 -0
  342. package/docs/consumer-skill/references/composition.md +43 -19
  343. package/docs/consumer-skill/references/design-contract.md +32 -0
  344. package/docs/consumer-skill/references/discovery.md +84 -7
  345. package/docs/consumer-skill/references/installation.md +40 -36
  346. package/docs/consumer-skill/references/integration.md +6 -2
  347. package/docs/consumer-skill/references/public-api.json +1519 -65
  348. package/docs/consumer-skill/references/review.md +9 -4
  349. package/docs/consumer-skill/references/rhf-workflows.md +86 -0
  350. package/docs/consumer-skill/references/screen-archetypes.md +22 -0
  351. package/docs/consumer-skill/references/theming.md +8 -9
  352. package/docs/consumer-skill/references/tokens.json +12 -3
  353. package/docs/consumer-skill/references/workflows.md +2 -1
  354. package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
  355. package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
  356. package/docs/consumer-skill/scripts/composition.mjs +198 -0
  357. package/docs/consumer-skill/scripts/discovery.mjs +42 -10
  358. package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
  359. package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
  360. package/docs/consumer-skill/scripts/inspection.mjs +138 -0
  361. package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
  362. package/docs/consumer-skill/scripts/setup-skills.mjs +76 -0
  363. package/docs/consumer-skills/themelia-components/SKILL.md +30 -0
  364. package/docs/consumer-skills/themelia-composition/SKILL.md +35 -0
  365. package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
  366. package/docs/consumer-skills/themelia-foundation/SKILL.md +14 -0
  367. package/docs/consumer-skills/themelia-tokenization/SKILL.md +35 -0
  368. package/package.json +4 -2
  369. package/templates/README.md +39 -0
  370. package/templates/admin-shell-template.tsx +382 -0
  371. package/templates/analytics-operations-template.tsx +376 -0
  372. package/templates/customers-template.tsx +509 -0
  373. package/templates/index.ts +29 -0
  374. package/templates/orders-template.tsx +1102 -0
  375. package/templates/products-template.tsx +834 -0
  376. package/templates/user-permissions-template.tsx +450 -0
  377. package/dist/action-menu-CllU52Mm.js +0 -280
  378. package/dist/action-menu-CllU52Mm.js.map +0 -1
  379. package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
  380. package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
  381. package/dist/app-shell-C4FhvCqF.js.map +0 -1
  382. package/dist/cards-BaBZR-AU.js.map +0 -1
  383. package/dist/checkbox-AWIhNhmo.js.map +0 -1
  384. package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
  385. package/dist/comments-DD0DUPwJ.js.map +0 -1
  386. package/dist/containers-Mu1LMGV1.js +0 -103
  387. package/dist/containers-Mu1LMGV1.js.map +0 -1
  388. package/dist/data-display-DT_khPl_.js.map +0 -1
  389. package/dist/date-picker-B2K3ucWn.js.map +0 -1
  390. package/dist/date-pickers-Ds8gLaoP.js +0 -175
  391. package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
  392. package/dist/form-field-CwH9y77i.js.map +0 -1
  393. package/dist/forms-B9G_xwzi.js.map +0 -1
  394. package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
  395. package/dist/input-DQdEd0YD.js +0 -263
  396. package/dist/input-DQdEd0YD.js.map +0 -1
  397. package/dist/item-K5_ghvze.js +0 -275
  398. package/dist/item-K5_ghvze.js.map +0 -1
  399. package/dist/metadata-list-8N16ZMW_.js +0 -405
  400. package/dist/metadata-list-8N16ZMW_.js.map +0 -1
  401. package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
  402. package/dist/overlays-tMkF-VAN.js.map +0 -1
  403. package/dist/page-CL9YeH_V.js +0 -224
  404. package/dist/page-CL9YeH_V.js.map +0 -1
  405. package/dist/page-header-commands-DOb6WsfD.js +0 -126
  406. package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
  407. package/dist/settings-ybnjVwbd.js +0 -171
  408. package/dist/settings-ybnjVwbd.js.map +0 -1
  409. package/dist/smart-card-DiC5aac3.js +0 -604
  410. package/dist/smart-card-DiC5aac3.js.map +0 -1
  411. package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
  412. package/dist/text.styles-g4He6UIW.js.map +0 -1
  413. package/dist/typography-UTnveOEy.js +0 -117
  414. package/dist/typography-UTnveOEy.js.map +0 -1
  415. package/dist/ui-provider-C_U0Xma4.js.map +0 -1
  416. package/dist/usage-card-BhO5eqkX.js.map +0 -1
  417. package/dist/utils-BRhFDwuU.js.map +0 -1
  418. package/dist/value-inputs-TaX4OjNk.js +0 -963
  419. package/dist/value-inputs-TaX4OjNk.js.map +0 -1
  420. package/dist/workspace-B-OEm3Kf.js +0 -408
  421. package/dist/workspace-B-OEm3Kf.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choice-inputs-JLtij2y4.js","names":["Select","SelectPrimitive","isScalar","baseui.SelectContent","baseui.SelectGroup","baseui.SelectItem","baseui.SelectLabel","baseui.SelectSeparator","Select","baseui.Select","baseui.SelectTrigger","baseui.SelectValue","Switch","SwitchPrimitive","Switch","SwitchPrimitive","React","Switch","isSimpleText","Switch","isSimpleText","GRID_COLS","isSimpleText","RadioGroupPrimitive","RadioPrimitive","React","RadioGroupPrimitive","RadioPrimitive","React","useTypographyConfig","useDensityConfig","resolveComponentScale","cn","Label","Text","textLineHeights","textSizes","focusRecipes","anchoredPositionMethod","motionRecipes","Stack","surfaceDividerRecipes","collectionRowClasses","popoverRecipes","collectionRecipes","CollectionLabel","CollectionContent","interactionRecipes","fieldStateRecipes","selectToggleRecipes","formControlSizeClasses","formLabelSizeClasses","formFieldTriggerClasses","formControlIconClasses","resolveFormControlSize","Checkbox","React$1","Select$2","Select","SelectGroup","props","className","SelectValue","SelectTrigger","size","children","ChevronDownIcon","iconClassName","SelectContent","resolvedContainer","useThemePortalContainer","container","alignItemWithTrigger","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon","SELECT_POPUP_BEM","selectPopupItemSizeClasses","isScalar$1","value","SelectPopupContent","SelectPopupGroup","SelectPopupItem","density","defaultTextSize","selectPopupLabelSizeClasses","SelectPopupLabel","SelectPopupSeparator","defaultSelectStrings","CLEAR_VALUE","OPTION_VALUE_PREFIX","toInternalOptionValue","toInternalSelectedValue","toExternalValue","isScalar","typographyNode","DefaultOptionContent","option","Select$1","memo","forwardRef","isControlled","stringsProp","sizeProp","ariaLabel","ariaLabelledBy","ariaDescribedBy","ariaInvalid","triggerProps","strings","useStrings","defaultScale","resolvedPlaceholder","placeholder","internalOptions","useMemo","mapped","options","allowClear","internalValue","optionsByInternalValue","entry","normalizedValue","normalizedDefaultValue","defaultValue","handleValueChange","useCallback","externalValue","nextValue","onValueChange","serializeValue","invalid","selectedOption","currentValue","renderValue","contentClassName","rendered","renderOption","Switch$2","Switch","Switch$1","rest","resolvedAriaInvalid","resolvedInvalid","checked","choiceCardSizeTokens","choicePillSizeTokens","choiceListSizeTokens","choiceCardStateClasses","choiceControlTrackClasses","choiceCardMarkerClasses","choiceCardMarkerSlotClasses","SwitchCard","providedId","Icon","internal","setInternal","useState","labelLineClasses","generatedId","useId","id","hasDescription","description","describedById","handleToggle","disabled","newChecked","handleCardClick","name","label","hint","controlRef","isSimpleText$3","ToggleField","controlTrackClasses","inputId","labelId","descriptionId","set","next","onRowClick","Control","kind","v","TextBlock","controlPosition","isSimpleText$2","GRID_COLS$1","CardCheckboxGroup","markerTrackClasses","selected","tokens","toggle","o","val","columns","optionLabel","isSelected","isDisabled","shouldIncludeHidden","nameAttr","CircleCheck","isSimpleText$1","GRID_COLS","CardRadioGroupImpl","gridClassName","RadioGroup","Radio","CardRadioGroup","isSimpleText","ListRadioGroup","rowPadding","NEXT_KEYS","PREVIOUS_KEYS","PillRadioGroup","buttonRefs","isEnabled","selectedIndex","tabStopIndex","handleClick","optionValue","enabled","index","current","button","event","rtl","forward","backward","position","fullWidth","node"],"sources":["../src/components/ui/select.tsx","../src/components/base/choice-inputs/select-popup.tsx","../src/components/base/choice-inputs/select.tsx","../src/components/ui/switch.tsx","../src/components/base/choice-inputs/switch.tsx","../src/components/base/choice-inputs/choice-types.ts","../src/components/base/choice-inputs/switch-card.tsx","../src/components/base/choice-inputs/toggle-field.tsx","../src/components/base/choice-inputs/card-checkbox-group.tsx","../src/components/base/choice-inputs/card-radio-group.tsx","../src/components/base/choice-inputs/list-radio-group.tsx","../src/components/base/choice-inputs/pill-radio-group.tsx"],"sourcesContent":["import { anchoredPositionMethod } from '../../lib/anchored-positioning';\nimport { fieldStateRecipes } from '../../lib/field-state-recipes';\nimport { selectToggleRecipes } from '../../lib/field-affordance-recipes';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { surfaceDividerRecipes } from '../../lib/surface-recipes';\nimport { useThemePortalContainer, type ThemePortalContainer } from '../../lib/theme-scope';\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport * as React from \"react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className={cn(\"flex flex-1 text-start\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n iconClassName,\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n /** Chevron size; owners pass the matching control icon size. Defaults to the shared select-toggle glyph for `size`. */\n iconClassName?: string\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"box-border flex w-fit items-center justify-between gap-space-sm whitespace-nowrap rounded-inner border border-input bg-transparent px-control py-space-xs font-sans text-sm text-foreground shadow-none outline-none transition-[color,box-shadow]\",\n \"data-[placeholder]:text-muted-foreground data-[size=default]:h-control data-[size=sm]:h-control-sm\",\n fieldStateRecipes.focus,\n fieldStateRecipes.invalid,\n \"disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n \"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-space-sm [&_svg:not([class*='size-'])]:size-icon [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={\n <ChevronDownIcon aria-hidden=\"true\" className={cn(\"pointer-events-none shrink-0 text-muted-foreground\", selectToggleRecipes.icon[size === \"sm\" ? \"sm\" : \"md\"], iconClassName)} />\n }\n />\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n container,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n alignItemWithTrigger = true,\n positionMethod = anchoredPositionMethod,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\" | \"positionMethod\"\n > & { container?: ThemePortalContainer }) {\n const resolvedContainer = useThemePortalContainer(container)\n return (\n <SelectPrimitive.Portal container={resolvedContainer}>\n <SelectPrimitive.Positioner\n positionMethod={positionMethod}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-align-trigger={alignItemWithTrigger}\n className={cn(\n motionRecipes.popup,\n 'data-[align-trigger=true]:transition-none data-[align-trigger=true]:duration-0 data-[align-trigger=true]:scale-100 data-[align-trigger=true]:translate-none data-[align-trigger=true]:opacity-100',\n \"relative isolate z-50 max-h-(--available-height) min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-radius bg-popover text-popover-foreground shadow-md\",\n surfaceDividerRecipes.anchored.shell,\n className\n )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: SelectPrimitive.GroupLabel.Props) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(\"px-row-x py-row-y-sm text-xs font-medium text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: SelectPrimitive.Item.Props) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText className=\"flex min-w-0 flex-1 gap-space-sm\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator\n render={<span className=\"pointer-events-none flex shrink-0 items-center justify-center\" />}\n >\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none my-space-xs h-px\", surfaceDividerRecipes.anchored.separator, className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\"bg-popover z-10 flex cursor-default items-center justify-center py-space-xs [&_svg:not([class*='size-'])]:size-icon top-0 w-full\", className)}\n {...props}\n >\n <ChevronUpIcon\n />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\"bg-popover z-10 flex cursor-default items-center justify-center py-space-xs [&_svg:not([class*='size-'])]:size-icon bottom-0 w-full\", className)}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n","import { CollectionLabel } from '../popover/collection-content';\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react';\n\nimport * as baseui from '../../ui/select';\nimport { Text } from '../../typography';\nimport { textSizes } from '../../typography/text.styles';\nimport { useTypographyConfig, type FormControlSize } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\nimport { collectionRecipes, collectionRowClasses, popoverRecipes, type CollectionDensity } from '../popover/popover.recipes';\n\nconst SELECT_POPUP_BEM = {\n\tcontent: 'select-popup--component',\n\tgroup: 'select-popup--group',\n\titem: 'select-popup--item',\n\tlabel: 'select-popup--label',\n\tseparator: 'select-popup--separator',\n} as const;\n\nconst selectPopupItemSizeClasses: Record<FormControlSize, string> = {\n\tsm: \"[&_svg:not([class*='size-'])]:size-icon-sm\",\n\tmd: \"[&_svg:not([class*='size-'])]:size-icon\",\n\tlg: \"[&_svg:not([class*='size-'])]:size-icon-lg\",\n};\n\nfunction isScalar(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/**\n * Private presentation layer for every Select-based form popup.\n *\n * It deliberately leaves Root/Trigger/Value state and form semantics with the\n * owning control, while centralizing the collection popup's compact surface inset, row\n * rhythm, option indicator clearance, icon sizing, and group anatomy.\n */\nexport function SelectPopupContent({\n\tclassName,\n\talign = 'start',\n\talignItemWithTrigger = false,\n\t...props\n}: ComponentPropsWithoutRef<typeof baseui.SelectContent>) {\n\treturn (\n\t\t<baseui.SelectContent\n\t\t\talign={align}\n\t\t\talignItemWithTrigger={alignItemWithTrigger}\n\t\t\tclassName={cn(\n\t\t\t\tSELECT_POPUP_BEM.content,\n\t\t\t\tpopoverRecipes.surface,\n\t\t\t\tpopoverRecipes.menu,\n\t\t\t\t'w-max min-w-(--anchor-width) max-w-(--available-width)',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function SelectPopupGroup({\n\tclassName,\n\t...props\n}: ComponentPropsWithoutRef<typeof baseui.SelectGroup>) {\n\treturn (\n\t\t<baseui.SelectGroup\n\t\t\tclassName={cn(SELECT_POPUP_BEM.group, 'p-0', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport interface SelectPopupItemProps\n\textends ComponentPropsWithoutRef<typeof baseui.SelectItem> {\n\t/** Match option typography, gap, icon, and indicator clearance to its trigger. */\n\tsize?: FormControlSize;\n\t/** Vertical option rhythm, independent from trigger/icon size. */\n\tdensity?: CollectionDensity;\n}\n\nexport function SelectPopupItem({\n\tchildren,\n\tclassName,\n\tsize = 'md',\n\tdensity = 'default',\n\t...props\n}: SelectPopupItemProps) {\n\tconst { defaultTextSize } = useTypographyConfig();\n\treturn (\n\t\t<baseui.SelectItem\n\t\t\tclassName={cn(\n\t\t\t\tSELECT_POPUP_BEM.item,\n\t\t\t\tcollectionRowClasses(density),\n\t\t\t\tcollectionRecipes.highlighted,\n\t\t\t\tcollectionRecipes.disabled,\n\t\t\t\tselectPopupItemSizeClasses[size],\n\t\t\t\ttextSizes[defaultTextSize ?? 'sm'],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isScalar(children) ? <CollectionLabel>{children}</CollectionLabel> : children}\n\t\t</baseui.SelectItem>\n\t);\n}\n\nexport interface SelectPopupLabelProps\n\textends ComponentPropsWithoutRef<typeof baseui.SelectLabel> {\n\t/**\n\t * Owning control scale. Group captions sit one step below the option text:\n\t * `sm` and `md` use the compact caption size, `lg` the default text size.\n\t * Defaults to `md`.\n\t */\n\tsize?: FormControlSize;\n}\n\nconst selectPopupLabelSizeClasses: Record<FormControlSize, string> = {\n\tsm: 'text-xs',\n\tmd: 'text-xs',\n\tlg: 'text-sm',\n};\n\n/**\n * Group caption. Supporting copy rather than another option, so it uses the\n * secondary medium caption role shared with menu and command group captions.\n */\nexport function SelectPopupLabel({\n\tchildren,\n\tclassName,\n\tsize = 'md',\n\t...props\n}: SelectPopupLabelProps) {\n\treturn (\n\t\t<baseui.SelectLabel\n\t\t\tclassName={cn(\n\t\t\t\tSELECT_POPUP_BEM.label,\n\t\t\t\t'px-row-x py-row-y-sm font-medium text-muted-foreground',\n\t\t\t\tselectPopupLabelSizeClasses[size],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isScalar(children) ? (\n\t\t\t\t<Text tag=\"span\" size=\"inherit\" type=\"inherit\" weight=\"inherit\" lineHeight=\"tight\">\n\t\t\t\t\t{children}\n\t\t\t\t</Text>\n\t\t\t) : children}\n\t\t</baseui.SelectLabel>\n\t);\n}\n\nexport function SelectPopupSeparator({\n\tclassName,\n\t...props\n}: ComponentPropsWithoutRef<typeof baseui.SelectSeparator>) {\n\treturn (\n\t\t<baseui.SelectSeparator\n\t\t\tclassName={cn(\n\t\t\t\tSELECT_POPUP_BEM.separator,\n\t\t\t\tpopoverRecipes.separator,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n","import { CollectionContent } from '../popover/collection-content';\nimport {\n\tforwardRef,\n\tmemo,\n\tuseCallback,\n\tuseMemo,\n\ttype ComponentPropsWithoutRef,\n\ttype FocusEventHandler,\n\ttype ReactNode,\n\ttype Ref,\n} from 'react';\n\nimport * as baseui from '../../ui/select';\nimport { Text } from '../../typography';\nimport { useDensityConfig, type FormControlSize } from '../../../lib/ui-provider';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { selectToggleRecipes } from '../../../lib/field-affordance-recipes';\nimport type { CollectionDensity } from '../popover/popover.recipes';\n\nimport {\n\tformControlIconClasses,\n\tformFieldTriggerClasses,\n\tresolveFormControlSize,\n} from '../forms/form-sizing';\nimport {\n\tSelectPopupContent,\n\tSelectPopupGroup,\n\tSelectPopupItem,\n} from './select-popup';\n\nexport interface SelectStrings {\n\tplaceholder: string;\n}\n\nexport const defaultSelectStrings: SelectStrings = {\n\tplaceholder: 'Select an option',\n};\n\nexport interface SelectOption {\n\tvalue: string;\n\tlabel: string;\n\tdescription?: string;\n\ticon?: ReactNode;\n\tdisabled?: boolean;\n}\n\ntype BaseSelectTriggerProps = ComponentPropsWithoutRef<typeof baseui.SelectTrigger>;\n\ntype SelectTriggerProps = Omit<\n\tBaseSelectTriggerProps,\n\t| 'aria-describedby'\n\t| 'aria-invalid'\n\t| 'aria-label'\n\t| 'aria-labelledby'\n\t| 'children'\n\t| 'className'\n\t| 'defaultValue'\n\t| 'disabled'\n\t| 'form'\n\t| 'id'\n\t| 'name'\n\t| 'onBlur'\n\t| 'onChange'\n\t| 'onFocus'\n\t| 'required'\n\t| 'size'\n\t| 'value'\n>;\n\nexport interface SelectProps extends SelectTriggerProps {\n\t/** Popup option rhythm, independent from the trigger size. Defaults to default. */\n\tdensity?: CollectionDensity;\n\t/** Available options. An empty-string option clears the selection. */\n\toptions: SelectOption[];\n\n\t/** Placeholder text — overrides `strings.placeholder` when provided. */\n\tplaceholder?: string;\n\n\t/** String overrides (e.g. placeholder). */\n\tstrings?: StringsProp<SelectStrings>;\n\n\t/** Add a placeholder option that clears the current selection. */\n\tallowClear?: boolean;\n\n\t/** Error state for styling (passed from FormField). */\n\tinvalid?: boolean;\n\n\t/** Visual size. */\n\tsize?: FormControlSize;\n\n\t/** Additional class names for the trigger. */\n\tclassName?: string;\n\n\t/** Additional class names for the popup surface. */\n\tcontentClassName?: string;\n\n\t/** Canonical value callback. Returns `undefined` when the selection is cleared. */\n\tonValueChange?: (value: string | undefined) => void;\n\n\t/** Current value. Passing `value={undefined}` explicitly keeps the control controlled and clear. */\n\tvalue?: string | null;\n\n\t/** Initial value for an uncontrolled select. */\n\tdefaultValue?: string | null;\n\n\t/** Disabled state. */\n\tdisabled?: boolean;\n\n\t/** Read-only state. */\n\treadOnly?: boolean;\n\n\t/** Field name used by the hidden native input. */\n\tname?: string;\n\n\t/** The owning form id when the select is rendered outside that form. */\n\tform?: string;\n\n\t/** Native autocomplete hint forwarded to the hidden input. */\n\tautoComplete?: string;\n\n\t/** Ref to the hidden native input used for form submission. */\n\tinputRef?: Ref<HTMLInputElement>;\n\n\t/** Root id; Base UI applies it to the trigger/field contract. */\n\tid?: string;\n\n\t/** Required state. */\n\trequired?: boolean;\n\n\t/** Accessible label for externally-labelled or compact trigger contexts. */\n\t'aria-label'?: string;\n\n\t/** Ids of elements that label the trigger. */\n\t'aria-labelledby'?: string;\n\n\t/** Ids of elements that describe the trigger. */\n\t'aria-describedby'?: string;\n\n\t/** Native invalid state forwarded to the trigger. `invalid` takes precedence. */\n\t'aria-invalid'?: BaseSelectTriggerProps['aria-invalid'];\n\n\t/** Native focus callback forwarded to the trigger. */\n\tonFocus?: FocusEventHandler<HTMLButtonElement>;\n\n\t/** Native blur callback forwarded to the trigger. */\n\tonBlur?: FocusEventHandler<HTMLButtonElement>;\n\n\t/** Open state (controlled). */\n\topen?: boolean;\n\n\t/** Default open state. */\n\tdefaultOpen?: boolean;\n\n\t/** Open change handler. */\n\tonOpenChange?: (open: boolean) => void;\n\n\t/** Called after the popup's opening or closing animation completes. */\n\tonOpenChangeComplete?: (open: boolean) => void;\n\n\t/** Whether the open popup should isolate interaction from the rest of the page. */\n\tmodal?: boolean;\n\n\t/** Whether pointer movement should highlight popup options. */\n\thighlightItemOnHover?: boolean;\n\n\t/** Replace the default icon/label/description option presentation. */\n\trenderOption?: (option: SelectOption) => ReactNode;\n\n\t/** Replace the trigger value presentation. Receives `undefined` for the placeholder state. */\n\trenderValue?: (option: SelectOption | undefined) => ReactNode;\n}\n\ninterface InternalSelectOption {\n\tinternalValue: string;\n\toption: SelectOption;\n}\n\n// Base UI reserves the empty string for an empty native form value. Encoding every\n// real option keeps consumer values collision-free, including values that happen to\n// equal this component's clear sentinel.\nconst CLEAR_VALUE = '__admin_ui_select_clear__';\nconst OPTION_VALUE_PREFIX = '__admin_ui_select_option__:';\n\nfunction toInternalOptionValue(value: string): string {\n\treturn value === '' ? CLEAR_VALUE : `${OPTION_VALUE_PREFIX}${value}`;\n}\n\nfunction toInternalSelectedValue(value: string | null | undefined): string | null {\n\tif (value === '' || value === null || value === undefined) return null;\n\treturn `${OPTION_VALUE_PREFIX}${value}`;\n}\n\nfunction toExternalValue(value: string | null): string | undefined {\n\tif (value === null || value === CLEAR_VALUE) return undefined;\n\tif (value.startsWith(OPTION_VALUE_PREFIX)) return value.slice(OPTION_VALUE_PREFIX.length);\n\treturn undefined;\n}\n\nfunction isScalar(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\nfunction typographyNode(value: ReactNode, className?: string): ReactNode {\n\tif (!isScalar(value)) return value;\n\n\treturn (\n\t\t<Text tag=\"span\" size=\"inherit\" lineHeight=\"tight\" className={cn('text-inherit', className)}>\n\t\t\t{value}\n\t\t</Text>\n\t);\n}\n\nfunction DefaultOptionContent({ option, size }: { option: SelectOption; size: FormControlSize }) {\n return <CollectionContent label={option.label} description={option.description} leading={option.icon} leadingDecorative wrap\n className=\"select--option-content\" leadingClassName={cn('select--option-icon',formControlIconClasses[size])}\n bodyClassName=\"select--option-text text-start\" labelClassName=\"select--option-label block\"\n descriptionClassName=\"select--option-description line-clamp-2\"/>;\n}\n\n/**\n * Canonical finite-option form control. `Select` owns the single Base UI state\n * engine used by both standard and descriptive option presentations.\n */\nexport const Select = memo(\n\tforwardRef<HTMLButtonElement, SelectProps>(function Select(props, ref) {\n\t\tconst isControlled = Object.prototype.hasOwnProperty.call(props, 'value');\n\t\tconst {\n\t\t\toptions,\n\t\t\tdensity,\n\t\t\tplaceholder,\n\t\t\tstrings: stringsProp,\n\t\t\tallowClear = false,\n\t\t\tinvalid,\n\t\t\tsize: sizeProp,\n\t\t\tclassName,\n\t\t\tcontentClassName,\n\t\t\tonValueChange,\n\t\t\tdisabled,\n\t\t\treadOnly,\n\t\t\tdefaultOpen,\n\t\t\topen,\n\t\t\tonOpenChange,\n\t\t\tonOpenChangeComplete,\n\t\t\tmodal,\n\t\t\thighlightItemOnHover,\n\t\t\tname,\n\t\t\tform,\n\t\t\tautoComplete,\n\t\t\tinputRef,\n\t\t\tid,\n\t\t\trequired,\n\t\t\t'aria-label': ariaLabel,\n\t\t\t'aria-labelledby': ariaLabelledBy,\n\t\t\t'aria-describedby': ariaDescribedBy,\n\t\t\t'aria-invalid': ariaInvalid,\n\t\t\tonFocus,\n\t\t\tonBlur,\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\trenderOption,\n\t\t\trenderValue,\n\t\t\t...triggerProps\n\t\t} = props;\n\t\tconst strings = useStrings(defaultSelectStrings, stringsProp);\n\t\tconst { defaultScale } = useDensityConfig();\n\t\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\t\tconst resolvedPlaceholder = placeholder ?? strings.placeholder;\n\n\t\tconst internalOptions = useMemo<InternalSelectOption[]>(() => {\n\t\t\tconst mapped = options.map((option) => ({\n\t\t\t\toption,\n\t\t\t\tinternalValue: toInternalOptionValue(option.value),\n\t\t\t}));\n\n\t\t\tif (allowClear && !mapped.some(({ internalValue }) => internalValue === CLEAR_VALUE)) {\n\t\t\t\tmapped.unshift({\n\t\t\t\t\tinternalValue: CLEAR_VALUE,\n\t\t\t\t\toption: { value: '', label: resolvedPlaceholder },\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn mapped;\n\t\t}, [allowClear, options, resolvedPlaceholder]);\n\n\t\tconst optionsByInternalValue = useMemo(\n\t\t\t() => new Map(internalOptions.map((entry) => [entry.internalValue, entry.option])),\n\t\t\t[internalOptions],\n\t\t);\n\t\tconst normalizedValue = toInternalSelectedValue(value);\n\t\tconst normalizedDefaultValue = toInternalSelectedValue(defaultValue);\n\n\t\tconst handleValueChange = useCallback(\n\t\t\t(nextValue: string | null) => {\n\t\t\t\tconst externalValue = toExternalValue(nextValue);\n\t\t\t\tonValueChange?.(externalValue);\n\t\t\t},\n\t\t\t[onValueChange],\n\t\t);\n\n\t\tconst serializeValue = useCallback((internalValue: string) => {\n\t\t\treturn toExternalValue(internalValue) ?? '';\n\t\t}, []);\n\n\t\tconst controlledValueProps = isControlled ? { value: normalizedValue } : {};\n\n\t\treturn (\n\t\t\t<baseui.Select\n\t\t\t\tonValueChange={handleValueChange}\n\t\t\t\tdisabled={disabled}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tdefaultOpen={defaultOpen}\n\t\t\t\topen={open}\n\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\tonOpenChangeComplete={onOpenChangeComplete}\n\t\t\t\tmodal={modal}\n\t\t\t\thighlightItemOnHover={highlightItemOnHover}\n\t\t\t\tname={name}\n\t\t\t\tform={form}\n\t\t\t\tautoComplete={autoComplete}\n\t\t\t\tinputRef={inputRef}\n\t\t\t\tid={id}\n\t\t\t\trequired={required}\n\t\t\t\tdefaultValue={normalizedDefaultValue}\n\t\t\t\titemToStringValue={serializeValue}\n\t\t\t\t{...controlledValueProps}\n\t\t\t>\n\t\t\t\t<baseui.SelectTrigger\n\t\t\t\t\tref={ref}\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\taria-labelledby={ariaLabelledBy}\n\t\t\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t\t\taria-invalid={invalid ? true : ariaInvalid}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\ticonClassName={selectToggleRecipes.icon[size]}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'select--component select--trigger',\n\t\t\t\t\t\tformFieldTriggerClasses(size),\n\t\t\t\t\t\t'data-[placeholder]:text-muted-foreground',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...triggerProps}\n\t\t\t\t>\n\t\t\t\t\t<baseui.SelectValue className=\"select--value min-w-0\">\n\t\t\t\t\t\t{(currentValue: string | null) => {\n\t\t\t\t\t\t\tconst selectedOption = currentValue && currentValue !== CLEAR_VALUE\n\t\t\t\t\t\t\t\t? optionsByInternalValue.get(currentValue)\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\tconst rendered = renderValue\n\t\t\t\t\t\t\t\t? renderValue(selectedOption)\n\t\t\t\t\t\t\t\t: selectedOption?.label ?? resolvedPlaceholder;\n\n\t\t\t\t\t\t\treturn typographyNode(rendered, 'min-w-0 truncate');\n\t\t\t\t\t\t}}\n\t\t\t\t\t</baseui.SelectValue>\n\t\t\t\t</baseui.SelectTrigger>\n\t\t\t\t<SelectPopupContent className={cn('select--content', contentClassName)}>\n\t\t\t\t\t<SelectPopupGroup className=\"select--group\">\n\t\t\t\t\t\t{internalOptions.map(({ internalValue, option }) => {\n\t\t\t\t\t\t\tconst rendered = renderOption?.(option);\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<SelectPopupItem\n\t\t\t\t\t\t\t\t\tkey={internalValue}\n\t\t\t\t\t\t\t\t\tvalue={internalValue}\n\t\t\t\t\t\t\t\t\tlabel={option.label}\n\t\t\t\t\t\t\t\t\taria-label={option.label}\n\t\t\t\t\t\t\t\t\tdisabled={option.disabled}\n\t\t\t\t\t\t\t\t\tsize={size}\n\t\t\t\t\t\t\t\t\tdensity={density}\n\t\t\t\t\t\t\t\t\tclassName=\"select--item\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{renderOption\n\t\t\t\t\t\t\t\t\t\t? typographyNode(rendered, 'select--option-custom')\n\t\t\t\t\t\t\t\t\t\t: <DefaultOptionContent option={option} size={size} />}\n\t\t\t\t\t\t\t\t</SelectPopupItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</SelectPopupGroup>\n\t\t\t\t</SelectPopupContent>\n\t\t\t</baseui.Select>\n\t\t);\n\t}),\n);\n\nSelect.displayName = 'Select';\n","import { Switch as SwitchPrimitive } from \"@base-ui/react/switch\"\n\nimport { cn } from \"../../lib/utils\"\nimport { focusRecipes } from \"../../lib/focus-recipes\"\nimport { fieldStateRecipes } from \"../../lib/field-state-recipes\"\n\n/**\n * Raw switch recipe. The unchecked track is the shared `--input` control\n * boundary; focus is the shared focus frame, and invalid follows the field-state\n * contract (destructive border, destructive halo on focus) like every field.\n */\nfunction Switch({\n className,\n size = \"default\",\n ...props\n}: SwitchPrimitive.Root.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n \"peer group/switch relative box-border inline-flex shrink-0 items-center rounded-full border border-transparent outline-none transition-[background-color,border-color,box-shadow]\",\n \"data-checked:bg-primary data-unchecked:bg-input\",\n \"data-[size=default]:h-5 data-[size=default]:w-9 data-[size=sm]:h-4 data-[size=sm]:w-7\",\n focusRecipes.frame,\n fieldStateRecipes.invalid,\n \"after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"bg-background rounded-full shadow-sm group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[16px] group-data-[size=sm]/switch:data-checked:translate-x-[12px] group-data-[size=default]/switch:data-unchecked:translate-x-0.5 group-data-[size=sm]/switch:data-unchecked:translate-x-0.5 pointer-events-none block ring-0 transition-transform motion-reduce:transition-none\"\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n","/**\n * Switch — canonical boolean switch wrapper around the internal shadcn primitive.\n *\n * `onValueChange` is the package-wide value callback.\n */\nimport { forwardRef, type ComponentProps } from 'react';\n\nimport { Switch as SwitchPrimitive } from '../../ui/switch';\nimport { useDensityConfig, type ComponentScale } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\n\ntype BaseSwitchProps = ComponentProps<typeof SwitchPrimitive>;\ntype SwitchElement = React.ElementRef<typeof SwitchPrimitive>;\n\nexport interface SwitchProps extends Omit<BaseSwitchProps, 'onCheckedChange' | 'size'> {\n\t/** Component scale. Falls back to `UIProvider.density.defaultScale`. */\n\tsize?: ComponentScale;\n\t/** Controlled checked state. */\n\tchecked?: boolean;\n\t/** Initial checked state for uncontrolled usage. */\n\tdefaultChecked?: boolean;\n\t/** Disable interaction and native form participation changes. */\n\tdisabled?: boolean;\n\t/** Prevent changes while retaining the current submitted value. */\n\treadOnly?: boolean;\n\t/** Require the switch to be checked for native form validation. */\n\trequired?: boolean;\n\t/** Hidden input name used during native form submission. */\n\tname?: string;\n\t/** Hidden input value submitted while checked. */\n\tvalue?: string;\n\t/** Optional value submitted while unchecked. */\n\tuncheckedValue?: string;\n\t/** Associate the hidden input with a form by id. */\n\tform?: string;\n\t/** Canonical boolean value callback. */\n\tonValueChange?: (checked: boolean) => void;\n\n\t/** Error state for styling (passed from FormField). */\n\tinvalid?: boolean;\n}\n\n/** Canonical boolean control with native form state and value-first callbacks. */\nexport const Switch = forwardRef<SwitchElement, SwitchProps>(function Switch(\n\t{\n\t\tonValueChange,\n\t\tsize: sizeProp,\n\t\tinvalid,\n\t\tclassName,\n\t\tid,\n\t\tname,\n\t\t'aria-invalid': ariaInvalid,\n\t\t...rest\n\t},\n\tref,\n) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveComponentScale(sizeProp, defaultScale);\n\tconst resolvedAriaInvalid = invalid ? true : ariaInvalid;\n\tconst resolvedInvalid = resolvedAriaInvalid !== undefined && resolvedAriaInvalid !== false && resolvedAriaInvalid !== 'false';\n\n\treturn (\n\t\t<SwitchPrimitive\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t\tid={id}\n\t\t\tname={name}\n\t\t\tonCheckedChange={(checked) => onValueChange?.(checked)}\n\t\t\tsize={size === 'sm' ? 'sm' : 'default'}\n\t\t\taria-invalid={resolvedAriaInvalid}\n\t\t\tclassName={cn(\n\t\t\t\t'switch--component',\n\t\t\t\tsize === 'lg' && 'h-6! w-11! [&_[data-slot=switch-thumb]]:size-5! [&[data-checked]_[data-slot=switch-thumb]]:translate-x-[20px]!',\n\t\t\t\tresolvedInvalid && 'data-unchecked:border-destructive',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t/>\n\t);\n});\n\nSwitch.displayName = 'Switch';\n","/**\n * Shared types for choice-style form fields (CardRadio, CardCheckbox,\n * ListRadio, PillRadio). Each variant exports its own `Option` type that\n * extends `ChoiceOptionBase`, so consumers see one consistent option shape\n * across the family.\n *\n * Sizes follow the package component scale (`sm | md | lg`). CardRadio and\n * CardCheckbox additionally accept `size` to drive padding, icon size, and type\n * scale through shared form/display variables.\n */\nimport type { ComponentType, ReactNode } from 'react';\nimport type { ComponentScale } from '../../../lib/ui-provider';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nexport type ChoiceSize = ComponentScale;\n\nexport interface ChoiceOptionBase<TValue extends string = string> {\n\tvalue: TValue;\n\tlabel: ReactNode;\n\tdescription?: ReactNode;\n\ticon?: ComponentType<{ className?: string }>;\n\tdisabled?: boolean;\n}\n\nexport interface ChoiceGroupBaseProps {\n\t/** Supporting/error descriptions associated with the group. */\n\t'aria-describedby'?: string;\n\t/** Form field name (also used for hidden inputs and aria grouping). */\n\tname?: string;\n\t/** Disable the entire group. */\n\tdisabled?: boolean;\n\t/** Show error styling. */\n\tinvalid?: boolean;\n\t/** Density / control size. Defaults from `useDensityConfig().defaultScale`. */\n\tsize?: ChoiceSize;\n\tclassName?: string;\n}\n\n/**\n * Padding / icon-size token map shared across CardRadio + CardCheckbox so the\n * two variants line up visually when placed side-by-side.\n */\nexport const choiceCardSizeTokens: Record<\n\tChoiceSize,\n\t{ padding: string; iconBox: string; iconSize: string; gap: string }\n> = {\n\tsm: { padding: 'p-surface-xs', iconBox: 'size-avatar-sm', iconSize: 'size-icon-sm', gap: 'gap-space-sm' },\n\tmd: { padding: 'p-surface', iconBox: 'size-avatar', iconSize: 'size-icon', gap: 'gap-space-md' },\n\tlg: { padding: 'p-surface-lg', iconBox: 'size-avatar-lg', iconSize: 'size-icon-lg', gap: 'gap-space-lg' },\n};\n\n/**\n * Pill height / horizontal padding tokens. Shared across PillRadioGroup\n * and any future toggle-bar variant so they stack cleanly.\n */\nexport const choicePillSizeTokens: Record<ChoiceSize, string> = {\n\tsm: 'h-control-sm px-control-sm text-pxs',\n\tmd: 'h-control px-control text-sm',\n\tlg: 'h-control-lg px-control text-sm',\n};\n\n/**\n * Row padding tokens for ListRadio and any future inline list variant.\n */\nexport const choiceListSizeTokens: Record<ChoiceSize, string> = {\n\tsm: 'px-row-x py-row-y-sm',\n\tmd: 'px-row-x py-row-y',\n\tlg: 'px-row-x py-row-y-lg',\n};\n\n/**\n * Shared option-card states for CardRadioGroup and CardCheckboxGroup: the resting\n * `border-border` divider (declared beside `border` by each owner) steps up to the\n * control boundary on hover, and keyboard focus draws the shared focus frame.\n * Selection and validation are added by each owner as data/aria variants, so they\n * keep their border while focused.\n */\nexport const choiceCardStateClasses = `${interactionRecipes.tileHover} ${focusRecipes.frame}`;\n\n/** Optional option glyph: one neutral tile in every state, so colour stays for meaning. */\nexport const choiceCardIconClasses = 'inline-flex shrink-0 items-center justify-center rounded-inner bg-muted text-muted-foreground';\n\n/**\n * A control track exactly one label line tall. Pair it with the label's own text\n * role (size and leading) and align the row to its start: a checkbox, radio,\n * switch or selection marker then centres on the label's first line at every\n * scale, whether or not the label wraps.\n */\nexport const choiceControlTrackClasses = 'flex h-lh shrink-0 items-center';\n\n/**\n * Shared selected-card marker, derived from action geometry. It sits in a\n * `choiceControlTrackClasses` track beside the option label, inside a slot that\n * keeps its width while unselected so selecting never rewraps the label.\n */\nexport const choiceCardMarkerClasses = 'size-action-sm shrink-0 text-primary-foreground fill-primary stroke-primary-foreground';\nexport const choiceCardMarkerSlotClasses = 'inline-flex size-action-sm shrink-0 items-center justify-center';\n","/**\n * SwitchCard — bordered settings card with an icon, title, optional\n * description, optional hint, and a trailing switch. The whole card is\n * clickable and toggles the switch; clicking inside the actual switch only\n * toggles once. The on state draws the primary border; the switch itself carries the state.\n *\n * Use for top-of-list \"feature\" toggles where the switch needs more visual\n * weight than a `ToggleField`. For dense rows, prefer `ToggleField`.\n */\nimport { type LucideIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { useCallback, useId, useState } from 'react';\nimport { Stack } from '../structure';\nimport { Label, Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport { fieldStateRecipes } from '../../../lib/field-state-recipes';\nimport { useDensityConfig } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { formLabelSizeClasses } from '../forms/form-sizing';\n\nimport { choiceCardIconClasses, choiceControlTrackClasses } from './choice-types';\nimport { Switch } from './switch';\n\nexport interface SwitchCardProps {\n\t/** Editable control ref; the forwarded ref continues to name the outer row/card. */\n\tcontrolRef?: React.Ref<HTMLElement>;\n\t/** Blur callback from the editable control. */\n\tonBlur?: React.FocusEventHandler<HTMLElement>;\n\t/** Id of the editable control, including external FormField associations. */\n\tid?: string;\n\t'aria-invalid'?: React.AriaAttributes['aria-invalid'];\n\t/** Additional supporting/error descriptions associated with the editable control. */\n\t'aria-describedby'?: string;\n\t/** Card title, also the switch's accessible name. */\n\tlabel: string;\n\t/** Supporting sentence under the label. */\n\tdescription?: string;\n\t/** Short guidance below the description. */\n\thint?: string;\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n\t/** Form field name, forwarded for native submits. */\n\tname?: string;\n\t/** Whether the switch is on. Controlled. */\n\tvalue?: boolean;\n\t/** Initial switch state for uncontrolled use. */\n\tdefaultValue?: boolean;\n\tonValueChange?: (checked: boolean) => void;\n\t/** Disables the switch and mutes the card. */\n\tdisabled?: boolean;\n\t/** Applies the invalid styling. */\n\tinvalid?: boolean;\n\tclassName?: string;\n}\n\nexport const SwitchCard = React.forwardRef<HTMLDivElement, SwitchCardProps>(function SwitchCard({\n\t'aria-describedby': ariaDescribedBy,\n\t'aria-invalid': ariaInvalid,\n\tcontrolRef,\n\tonBlur,\n\tid: providedId,\n\tlabel,\n\tdescription,\n\thint,\n\ticon: Icon,\n\tname,\n\tvalue,\n\tdefaultValue,\n\tonValueChange,\n\tdisabled = false,\n\tinvalid,\n\tclassName,\n}: SwitchCardProps, ref) {\n\tconst isControlled = value !== undefined;\n\tconst [internal, setInternal] = useState<boolean>(defaultValue ?? false);\n\tconst checked = isControlled ? value ?? false : internal;\n\tconst { defaultScale } = useDensityConfig();\n\t// The switch track is one label line tall, so the switch centres on the title's first line.\n\tconst labelLineClasses = formLabelSizeClasses[resolveComponentScale(undefined, defaultScale)];\n\tconst generatedId = useId();\n\tconst id = providedId ?? generatedId;\n\n\tconst hasDescription = typeof description === 'string' && description.trim() !== '';\n\tconst describedById = hasDescription ? `${id}-description` : undefined;\n\n\tconst handleToggle = useCallback(\n\t\t(newChecked: boolean) => {\n\t\t\tif (disabled) return;\n\t\t\tif (!isControlled) setInternal(newChecked);\n\t\t\tonValueChange?.(newChecked);\n\t\t},\n\t\t[disabled, isControlled, onValueChange],\n\t);\n\n\tconst handleCardClick = useCallback(\n\t\t(e: React.MouseEvent) => {\n\t\t\tif ((e.target as HTMLElement).closest('[role=\"switch\"]')) return;\n\t\t\thandleToggle(!checked);\n\t\t},\n\t\t[checked, handleToggle],\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\taria-invalid={invalid || ariaInvalid}\n\t\t\tonClick={handleCardClick}\n\t\t\tclassName={cn('switch-card--component', \n\t\t\t\t'group relative flex items-start gap-space-lg rounded-radius border bg-card text-card-foreground p-surface transition-[background,border-color,box-shadow] duration-150',\n\t\t\t\t// Same resting, hover, selected and invalid states as the choice cards.\n\t\t\t\t'border-border',\n\t\t\t\tchecked && 'border-primary',\n\t\t\t\tfieldStateRecipes.invalid,\n\t\t\t\t!disabled && 'cursor-pointer hover:border-input',\n\t\t\t\tdisabled && 'cursor-not-allowed opacity-50',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!!name && (\n\t\t\t\t<input\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={checked ? '1' : '0'}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{!!Icon && (\n\t\t\t\t<span className={cn('switch-card--icon size-control', choiceCardIconClasses)}>\n\t\t\t\t\t<Icon className=\"size-icon\" />\n\t\t\t\t</span>\n\t\t\t)}\n\n\t\t\t\t<Stack gap=\"dense\" className=\"min-w-0 flex-1\">\n\t\t\t\t<Label\n\t\t\t\t\thtmlFor={id}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'block text-inherit',\n\t\t\t\t\t\tdisabled ? 'cursor-not-allowed' : 'cursor-pointer',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{label}\n\t\t\t\t</Label>\n\t\t\t\t{!!hasDescription && (\n\t\t\t\t\t<Text id={describedById} size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{!!hint && (\n\t\t\t\t\t<Text size=\"xs\" type=\"discrete\">\n\t\t\t\t\t\t{hint}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t</Stack>\n\n\t\t\t<div className={cn('switch-card--control', choiceControlTrackClasses, labelLineClasses)}>\n\t\t\t\t<Switch\n\t\t\t\t\t// The card owns the disabled fade; the switch keeps native disabled behavior.\n\t\t\t\t\tclassName=\"data-disabled:opacity-100\"\n\t\t\t\t\tid={id}\n\t\t\t\t\tref={controlRef}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tchecked={checked}\n\t\t\t\t\tonValueChange={handleToggle}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tinvalid={invalid || Boolean(ariaInvalid && ariaInvalid !== 'false')}\n\t\t\t\t\taria-label={label}\n\t\t\t\t\taria-describedby={[ariaDescribedBy, describedById].filter(Boolean).join(' ') || undefined}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n});\n\nSwitchCard.displayName = 'SwitchCard';\n","/**\n * ToggleField — inline label-and-control row for switches and checkboxes.\n *\n * Pattern: a left-aligned descriptive label/description block with the\n * control sitting on the trailing edge. Use for settings rows (e.g. \"Email\n * notifications\" + switch) where a full SwitchCard is too heavy and a bare\n * `Switch` + `<label>` is too brittle. The whole row is clickable and\n * keyboard-accessible.\n *\n * Two control kinds: `'switch'` (default) and `'checkbox'`. Both honour\n * controlled `value` / `defaultValue` / `onValueChange`. Strings are passed via\n * standard React props rather than a `strings` object — there are no\n * defaults to override.\n */\nimport type { ReactNode } from 'react';\nimport { forwardRef, useCallback, useId, useState } from 'react';\n\nimport { Stack } from '../structure';\nimport { Label, Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport { useDensityConfig } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { formLabelSizeClasses } from '../forms/form-sizing';\n\nimport { Checkbox } from './checkbox';\nimport { choiceControlTrackClasses } from './choice-types';\nimport { Switch } from './switch';\n\nexport type ToggleFieldKind = 'switch' | 'checkbox';\n\nexport interface ToggleFieldProps {\n\t/** Editable control ref; the forwarded ref continues to name the outer row/card. */\n\tcontrolRef?: React.Ref<HTMLElement>;\n\t/** Blur callback from the editable control. */\n\tonBlur?: React.FocusEventHandler<HTMLElement>;\n\t/** Id of the editable control, including external FormField associations. */\n\tid?: string;\n\t'aria-invalid'?: React.AriaAttributes['aria-invalid'];\n\t/** Additional supporting/error descriptions associated with the editable control. */\n\t'aria-describedby'?: string;\n\t/** Control label. */\n\tlabel: ReactNode;\n\t/** Supporting sentence under the label. */\n\tdescription?: ReactNode;\n\t/** Which control renders — a switch or a checkbox. */\n\tkind?: ToggleFieldKind;\n\t/** Whether the control is on. Controlled. */\n\tvalue?: boolean;\n\t/** Initial state for uncontrolled use. */\n\tdefaultValue?: boolean;\n\tonValueChange?: (checked: boolean) => void;\n\t/** Disables the control. */\n\tdisabled?: boolean;\n\t/** Applies the invalid styling. */\n\tinvalid?: boolean;\n\t/** Form field name, forwarded for native submits. */\n\tname?: string;\n\tclassName?: string;\n\t/** Place the control on the leading edge instead of trailing (default). */\n\tcontrolPosition?: 'leading' | 'trailing';\n}\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(function ToggleField({\n\t'aria-describedby': ariaDescribedBy,\n\t'aria-invalid': ariaInvalid,\n\tcontrolRef,\n\tonBlur,\n\tid: providedId,\n\tlabel,\n\tdescription,\n\tkind = 'switch',\n\tvalue,\n\tdefaultValue,\n\tonValueChange,\n\tdisabled = false,\n\tinvalid = false,\n\tname,\n\tclassName,\n\tcontrolPosition = 'trailing',\n}: ToggleFieldProps, ref) {\n\tconst isControlled = value !== undefined;\n\tconst [internal, setInternal] = useState<boolean>(defaultValue ?? false);\n\tconst checked = isControlled ? value ?? false : internal;\n\tconst { defaultScale } = useDensityConfig();\n\t// The control track is exactly one label line tall, so a switch or checkbox\n\t// centres on the label's first line at every scale, wrapped or not.\n\tconst controlTrackClasses = cn('toggle-field--control', choiceControlTrackClasses, formLabelSizeClasses[resolveComponentScale(undefined, defaultScale)]);\n\tconst generatedId = useId();\n\tconst inputId = providedId ?? generatedId;\n\tconst labelId = `${inputId}-label`;\n\tconst hasDescription = description !== null && description !== undefined && description !== false;\n\tconst descriptionId = hasDescription ? `${inputId}-description` : undefined;\n\n\tconst set = useCallback(\n\t\t(next: boolean) => {\n\t\t\tif (disabled) return;\n\t\t\tif (!isControlled) setInternal(next);\n\t\t\tonValueChange?.(next);\n\t\t},\n\t\t[disabled, isControlled, onValueChange],\n\t);\n\n\tconst onRowClick = (e: React.MouseEvent) => {\n\t\t// Avoid double-toggle when clicking the control itself.\n\t\tconst target = e.target as HTMLElement;\n\t\tif (target.closest('[role=\"switch\"], [role=\"checkbox\"], input[type=\"checkbox\"]')) return;\n\t\tset(!checked);\n\t};\n\n\tconst Control =\n\t\tkind === 'switch' ? (\n\t\t\t<Switch\n\t\t\t\t// The row already expands the hit area; a horizontal switch hit\n\t\t\t\t// extension would overflow when this field sits at a surface edge.\n\t\t\t\tclassName=\"after:inset-x-0\"\n\t\t\t\tid={inputId}\n\t\t\t\tref={controlRef}\n\t\t\t\tonBlur={onBlur}\n\t\t\t\tname={name}\n\t\t\t\tchecked={checked}\n\t\t\t\tonValueChange={set}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tinvalid={invalid || Boolean(ariaInvalid && ariaInvalid !== 'false')}\n\t\t\t\taria-labelledby={labelId}\n\t\t\t\taria-describedby={[ariaDescribedBy, descriptionId].filter(Boolean).join(' ') || undefined}\n\t\t\t/>\n\t\t) : (\n\t\t\t<Checkbox\n\t\t\t\tid={inputId}\n\t\t\t\tref={controlRef}\n\t\t\t\tonBlur={onBlur}\n\t\t\t\tname={name}\n\t\t\t\tchecked={checked}\n\t\t\t\tonCheckedChange={(v) => set(v === true)}\n\t\t\t\tdisabled={disabled}\n\t\t\t\taria-invalid={invalid || ariaInvalid}\n\t\t\t\taria-labelledby={labelId}\n\t\t\t\taria-describedby={[ariaDescribedBy, descriptionId].filter(Boolean).join(' ') || undefined}\n\t\t\t/>\n\t\t);\n\n\tconst TextBlock = (\n\t\t<Stack gap=\"dense\" className=\"min-w-0 flex-1\">\n\t\t\t<div id={labelId}>\n\t\t\t\t{isSimpleText(label) ? (\n\t\t\t\t\t<Label\n\t\t\t\t\t\thtmlFor={inputId}\n\t\t\t\t\t\tdata-disabled={disabled || undefined}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t// Leading is left to `Label` so this sits on the same\n\t\t\t\t\t\t\t// baseline rhythm as the switch, checkbox, and switch-card\n\t\t\t\t\t\t\t// labels; `leading-snug` here made it the only inline\n\t\t\t\t\t\t\t// control label in the package at 19.25px.\n\t\t\t\t\t\t\t'block text-inherit data-disabled:opacity-50',\n\t\t\t\t\t\t\tdisabled ? 'cursor-not-allowed' : 'cursor-pointer',\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</Label>\n\t\t\t\t) : label}\n\t\t\t</div>\n\t\t\t{hasDescription && (\n\t\t\t\t<div id={descriptionId}>\n\t\t\t\t\t{isSimpleText(description) ? (\n\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : description}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</Stack>\n\t);\n\n\treturn (\n\t\t<Stack\n\t\t\tref={ref}\n\t\t\tdirection=\"horizontal\"\n\t\t\talign=\"start\"\n\t\t\twrap={false}\n\t\t\tgap=\"md\"\n\t\t\trole=\"group\"\n\t\t\tonClick={onRowClick}\n\t\t\tclassName={cn('toggle-field--component rounded-radius py-row-y',\n\t\t\t\tdisabled && 'pointer-events-none',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{controlPosition === 'leading' && <div className={controlTrackClasses}>{Control}</div>}\n\t\t\t{TextBlock}\n\t\t\t{controlPosition === 'trailing' && <div className={controlTrackClasses}>{Control}</div>}\n\t\t</Stack>\n\t);\n});\n\nToggleField.displayName = 'ToggleField';\n","/**\n * CardCheckboxGroup — multi-select group rendered as a grid of card-shaped\n * options with title, optional description, and optional leading icon.\n * Use for a small set of feature flags / preferences where each option\n * benefits from extra context that a flat checkbox list can't carry.\n *\n * Pairs with `CardRadioGroup` (single-select). Both share spacing tokens\n * from `./choice-types` so they line up when used side-by-side.\n */\nimport { CircleCheck, type LucideIcon } from 'lucide-react';\nimport { forwardRef, useState, useCallback, useMemo, type ReactNode } from 'react';\nimport { Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { fieldStateRecipes } from '../../../lib/field-state-recipes';\nimport { useDensityConfig, useTypographyConfig } from '../../../lib/ui-provider';\nimport { textLineHeights, textSizes } from '../../typography/text.styles';\nimport { resolveFormControlSize } from '../forms/form-sizing';\nimport {\n\tchoiceCardSizeTokens,\n\tchoiceCardIconClasses,\n\tchoiceCardMarkerClasses,\n\tchoiceCardMarkerSlotClasses,\n\tchoiceCardStateClasses,\n\tchoiceControlTrackClasses,\n\ttype ChoiceGroupBaseProps,\n\ttype ChoiceOptionBase,\n} from './choice-types';\n\nexport interface CardCheckboxOption extends ChoiceOptionBase {\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n}\n\nexport interface CardCheckboxGroupProps extends ChoiceGroupBaseProps {\n\t/** Choices offered. */\n\toptions: CardCheckboxOption[];\n\t/** Current value. Controlled. */\n\tvalue?: string[];\n\t/** Initial value for uncontrolled use. */\n\tdefaultValue?: string[];\n\tonValueChange?: (values: string[]) => void;\n\t/** How many columns the grid uses. */\n\tcolumns?: 1 | 2 | 3 | 4;\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 * Container widths, not viewport widths — a choice-card group is as likely to\n * sit in a settings rail or a drawer as at page width, and keyed to the screen\n * it laid three cards across a 300px column.\n *\n * 384/576/672 puts every tier clear of the widths this actually renders at: the\n * shipped three-up group is 672px wide, so the three-column step sits 96px\n * below it rather than exactly on it, and 384 keeps the two-column step above\n * every mobile mount (316px).\n */\nconst GRID_COLS: Record<NonNullable<CardCheckboxGroupProps['columns']>, string> = {\n\t1: 'grid grid-cols-1 gap-space-md',\n\t2: 'grid grid-cols-1 gap-space-md @sm/card-checkbox-group:grid-cols-2',\n\t3: 'grid grid-cols-1 gap-space-md @sm/card-checkbox-group:grid-cols-2 @xl/card-checkbox-group:grid-cols-3',\n\t4: 'grid grid-cols-1 gap-space-md @sm/card-checkbox-group:grid-cols-2 @2xl/card-checkbox-group:grid-cols-4',\n};\n\nexport const CardCheckboxGroup = forwardRef<HTMLDivElement, CardCheckboxGroupProps>(function CardCheckboxGroup({\n\t'aria-describedby': ariaDescribedBy,\n\toptions,\n\tvalue,\n\tdefaultValue,\n\tonValueChange,\n\tname,\n\tcolumns = 3,\n\tinvalid,\n\tdisabled,\n\tsize: sizeProp,\n\tclassName,\n}: CardCheckboxGroupProps, ref) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst { defaultTextSize } = useTypographyConfig();\n\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\t// The marker track is one line of the option label's own text role tall, so\n\t// the selected check centres on the label's first line.\n\tconst markerTrackClasses = cn('card-checkbox-group--marker', choiceControlTrackClasses, textSizes[defaultTextSize ?? 'sm'], textLineHeights.normal);\n\n\tconst isControlled = value !== undefined;\n\tconst [internal, setInternal] = useState<string[]>(defaultValue ?? []);\n\tconst selected = useMemo(\n\t\t() => (isControlled ? value ?? [] : internal),\n\t\t[internal, isControlled, value],\n\t);\n\tconst tokens = choiceCardSizeTokens[size];\n\n\tconst toggle = useCallback(\n\t\t(val: string) => {\n\t\t\tif (disabled) return;\n\t\t\tif (options.find((o) => o.value === val)?.disabled) return;\n\t\t\tconst exists = selected.includes(val);\n\t\t\tconst next = exists ? selected.filter((v) => v !== val) : [...selected, val];\n\t\t\tif (!isControlled) setInternal(next);\n\t\t\tonValueChange?.(next);\n\t\t},\n\t\t[disabled, options, selected, isControlled, onValueChange],\n\t);\n\n\treturn (\n\t\t/*\n\t\t * The root exists to be the query container: an element cannot match its\n\t\t * own container query, so the grid whose columns react sits inside the\n\t\t * element being measured.\n\t\t */\n\t\t<div ref={ref} className={cn('card-checkbox-group--component @container/card-checkbox-group', className)}>\n\t\t\t<div\n\t\t\t\tclassName={cn('card-checkbox-group--grid', GRID_COLS[columns])}\n\t\t\t\trole=\"group\"\n\t\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\taria-disabled={disabled || undefined}\n\t\t\t>\n\t\t\t\t{options.map((option) => {\n\t\t\t\t\tconst Icon = option.icon;\n\t\t\t\t\tconst optionLabel = option.label;\n\t\t\t\t\tconst isSelected = selected.includes(option.value);\n\t\t\t\t\tconst isDisabled = disabled || option.disabled;\n\t\t\t\t\tconst shouldIncludeHidden = Boolean(name) && isSelected;\n\t\t\t\t\tconst nameAttr = name ? `${name}[]` : undefined;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div key={option.value} className=\"relative\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\t\t\t\tname={nameAttr}\n\t\t\t\t\t\t\t\tvalue={option.value}\n\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\thidden\n\t\t\t\t\t\t\t\tdisabled={!shouldIncludeHidden}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\taria-pressed={isSelected}\n\t\t\t\t\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\t\t\t\t\tonClick={() => toggle(option.value)}\n\t\t\t\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\t\t\t\tdata-selected={isSelected}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'box-border group relative flex w-full flex-col items-start text-start outline-none cursor-pointer',\n\t\t\t\t\t\t\t\t\t'rounded-radius border border-border bg-card text-card-foreground transition-[color,box-shadow,background,border-color] duration-150',\n\t\t\t\t\t\t\t\t\tchoiceCardStateClasses,\n\t\t\t\t\t\t\t\t\t'data-[selected=true]:border-primary',\n\t\t\t\t\t\t\t\t\ttokens.padding,\n\t\t\t\t\t\t\t\t\ttokens.gap,\n\t\t\t\t\t\t\t\t\tfieldStateRecipes.invalid,\n\t\t\t\t\t\t\t\t\t'disabled:cursor-not-allowed disabled:opacity-50',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!Icon && (\n\t\t\t\t\t\t\t\t\t<span className={cn(choiceCardIconClasses, tokens.iconBox)}>\n\t\t\t\t\t\t\t\t\t\t<Icon className={tokens.iconSize} />\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<span className={cn('card-checkbox-group--body flex w-full min-w-0 items-start', tokens.gap)}>\n\t\t\t\t\t\t\t\t<Stack gap=\"dense\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t\t{isSimpleText(optionLabel) ? (\n\t\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"inherit\" weight=\"medium\">\n\t\t\t\t\t\t\t\t\t\t\t{optionLabel}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : optionLabel}\n\t\t\t\t\t\t\t\t\t{!!option.description && (\n\t\t\t\t\t\t\t\t\t\tisSimpleText(option.description) ? (\n\t\t\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t\t{option.description}\n\t\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t\t) : option.description\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t<span aria-hidden=\"true\" className={markerTrackClasses}>\n\t\t\t\t\t\t\t\t\t<span className={choiceCardMarkerSlotClasses}>\n\t\t\t\t\t\t\t\t\t\t<CircleCheck\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\tchoiceCardMarkerClasses,\n\t\t\t\t\t\t\t\t\t\t\t\t!isSelected && 'hidden',\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t</div>\n\t);\n});\n\nCardCheckboxGroup.displayName = 'CardCheckboxGroup';\n","/**\n * CardRadioGroup — single-select radio group rendered as a grid of card-shaped\n * options with title, optional description, and optional leading icon. Built\n * on `@base-ui/react/radio` for accessibility (keyboard navigation, focus\n * management, native form participation).\n *\n * Pairs with `CardCheckboxGroup` (multi-select). Shares spacing tokens from\n * `./choice-types`.\n */\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\nimport { CircleCheck, type LucideIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { memo, useMemo, type ReactNode } from 'react';\nimport { Text } from '../../typography';\nimport { Stack } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { fieldStateRecipes } from '../../../lib/field-state-recipes';\nimport { useDensityConfig, useTypographyConfig } from '../../../lib/ui-provider';\nimport { textLineHeights, textSizes } from '../../typography/text.styles';\nimport { resolveFormControlSize } from '../forms/form-sizing';\nimport {\n\tchoiceCardSizeTokens,\n\tchoiceCardIconClasses,\n\tchoiceCardMarkerClasses,\n\tchoiceCardMarkerSlotClasses,\n\tchoiceCardStateClasses,\n\tchoiceControlTrackClasses,\n\ttype ChoiceGroupBaseProps,\n\ttype ChoiceOptionBase,\n} from './choice-types';\n\nexport interface CardRadioOption extends ChoiceOptionBase {\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n}\n\nexport interface CardRadioGroupProps extends ChoiceGroupBaseProps {\n\t/** Choices offered. */\n\toptions: CardRadioOption[];\n\t/** Current value. Controlled. */\n\tvalue?: string;\n\t/** Initial value for uncontrolled use. */\n\tdefaultValue?: string;\n\tonValueChange?: (value: string) => void;\n\t/** How many columns the grid uses. */\n\tcolumns?: 1 | 2 | 3 | 4;\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 * Container widths, not viewport widths — a choice-card group is as likely to\n * sit in a settings rail or a drawer as at page width, and keyed to the screen\n * it laid three cards across a 300px column.\n *\n * 384/576/672 puts every tier clear of the widths this actually renders at: the\n * shipped three-up group is 672px wide, so the three-column step sits 96px\n * below it rather than exactly on it, and 384 keeps the two-column step above\n * every mobile mount (316px).\n */\nconst GRID_COLS: Record<NonNullable<CardRadioGroupProps['columns']>, string> = {\n\t1: 'grid grid-cols-1 gap-space-md',\n\t2: 'grid grid-cols-1 gap-space-md @sm/card-radio-group:grid-cols-2',\n\t3: 'grid grid-cols-1 gap-space-md @sm/card-radio-group:grid-cols-2 @xl/card-radio-group:grid-cols-3',\n\t4: 'grid grid-cols-1 gap-space-md @sm/card-radio-group:grid-cols-2 @2xl/card-radio-group:grid-cols-4',\n};\n\nfunction CardRadioGroupImpl({\n\t'aria-describedby': ariaDescribedBy,\n\toptions,\n\tvalue,\n\tdefaultValue,\n\tonValueChange,\n\tname,\n\tcolumns = 3,\n\tinvalid,\n\tdisabled,\n\tsize: sizeProp,\n\tclassName,\n}: CardRadioGroupProps, ref: React.ForwardedRef<HTMLDivElement>) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst { defaultTextSize } = useTypographyConfig();\n\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\t// The marker track is one line of the option label's own text role tall, so\n\t// the selected check centres on the label's first line.\n\tconst markerTrackClasses = cn('card-radio-group--marker', choiceControlTrackClasses, textSizes[defaultTextSize ?? 'sm'], textLineHeights.normal);\n\n\tconst tokens = choiceCardSizeTokens[size];\n\tconst gridClassName = useMemo(() => cn('card-radio-group--grid', GRID_COLS[columns]), [columns]);\n\n\treturn (\n\t\t/*\n\t\t * The root exists to be the query container: an element cannot match its\n\t\t * own container query, so the grid whose columns react sits inside the\n\t\t * element being measured.\n\t\t */\n\t\t<div ref={ref} className={cn('card-radio-group--component @container/card-radio-group', className)}>\n\t\t\t<RadioGroupPrimitive\n\t\t\t\tvalue={value}\n\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\tonValueChange={(val) => val && onValueChange?.(val)}\n\t\t\t\tname={name}\n\t\t\t\tdisabled={disabled}\n\t\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\tclassName={gridClassName}\n\t\t\t>\n\t\t\t\t{options.map((option) => {\n\t\t\t\t\tconst Icon = option.icon;\n\t\t\t\t\tconst optionLabel = option.label;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<RadioPrimitive.Root\n\t\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\t\tvalue={option.value}\n\t\t\t\t\t\t\tdisabled={disabled || option.disabled}\n\t\t\t\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t'box-border relative group flex flex-col text-start outline-none cursor-pointer',\n\t\t\t\t\t\t\t\t'rounded-radius border border-border bg-card text-card-foreground transition-[color,box-shadow,background,border-color] duration-150',\n\t\t\t\t\t\t\t\tchoiceCardStateClasses,\n\t\t\t\t\t\t\t\t'data-[checked]:border-primary',\n\t\t\t\t\t\t\t\ttokens.padding,\n\t\t\t\t\t\t\t\ttokens.gap,\n\t\t\t\t\t\t\t\tfieldStateRecipes.invalid,\n\t\t\t\t\t\t\t\t// The radio root is a span, so state comes from Base UI's attribute.\n\t\t\t\t\t\t\t\t'data-disabled:cursor-not-allowed data-disabled:opacity-50',\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{!!Icon && (\n\t\t\t\t\t\t\t\t<span className={cn(choiceCardIconClasses, tokens.iconBox)}>\n\t\t\t\t\t\t\t\t\t<Icon className={tokens.iconSize} />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<span className={cn('card-radio-group--body flex w-full min-w-0 items-start', tokens.gap)}>\n\t\t\t\t\t\t\t<Stack gap=\"dense\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t{isSimpleText(optionLabel) ? (\n\t\t\t\t\t\t\t\t\t<Text tag=\"span\" type=\"inherit\" weight=\"medium\">\n\t\t\t\t\t\t\t\t\t\t{optionLabel}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t) : optionLabel}\n\t\t\t\t\t\t\t\t{!!option.description && (\n\t\t\t\t\t\t\t\t\tisSimpleText(option.description) ? (\n\t\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t{option.description}\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t) : option.description\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t<span aria-hidden=\"true\" className={markerTrackClasses}>\n\t\t\t\t\t\t\t\t<span className={choiceCardMarkerSlotClasses}>\n\t\t\t\t\t\t\t\t\t<RadioPrimitive.Indicator\n\t\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t\t<CircleCheck className={choiceCardMarkerClasses} />\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</RadioPrimitive.Root>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</RadioGroupPrimitive>\n\t\t</div>\n\t);\n}\n\nexport const CardRadioGroup = memo(React.forwardRef<HTMLDivElement, CardRadioGroupProps>(CardRadioGroupImpl));\nCardRadioGroup.displayName = 'CardRadioGroup';\n","/**\n * ListRadioGroup — single-select radio group rendered as a vertical list with\n * dividers between rows. Use when options have descriptive secondary text and\n * read better as a stack than a grid (e.g. plan tiers, role definitions).\n *\n * Pairs with `CardRadioGroup` for grid-style choices and `PillRadioGroup` for\n * inline compact toggles.\n */\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\nimport { forwardRef } from 'react';\nimport { Text } from '../../typography';\nimport { textSizes } from '../../typography/text.styles';\nimport { Stack } from '../structure';\nimport { cn } from '../../../lib/utils';\nimport { fieldStateRecipes } from '../../../lib/field-state-recipes';\nimport { useDensityConfig, useTypographyConfig } from '../../../lib/ui-provider';\nimport { resolveFormControlSize } from '../forms/form-sizing';\nimport {\n\tchoiceControlTrackClasses,\n\tchoiceListSizeTokens,\n\ttype ChoiceGroupBaseProps,\n\ttype ChoiceOptionBase,\n} from './choice-types';\nimport { interactionRecipes } from '../../../lib/interaction-recipes';\n\nexport interface ListRadioOption extends ChoiceOptionBase {}\n\nexport interface ListRadioGroupProps extends ChoiceGroupBaseProps {\n\t/** Choices offered. */\n\toptions: ListRadioOption[];\n\t/** Current value. Controlled. */\n\tvalue?: string;\n\t/** Initial value for uncontrolled use. */\n\tdefaultValue?: string;\n\tonValueChange?: (value: string) => void;\n}\n\nfunction isSimpleText(value: React.ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\nexport const ListRadioGroup = forwardRef<HTMLDivElement, ListRadioGroupProps>(function ListRadioGroup({\n\toptions,\n\tvalue,\n\tdefaultValue,\n\tonValueChange,\n\tname,\n\tinvalid,\n\tdisabled,\n\tsize: sizeProp,\n\tclassName,\n}: ListRadioGroupProps, ref) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst { defaultTextSize } = useTypographyConfig();\n\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\n\tconst rowPadding = choiceListSizeTokens[size];\n\t// The radio track is one line of the label's own text role tall, so the\n\t// circle centres on the first line whether or not the label wraps.\n\tconst labelLineClasses = cn(textSizes[defaultTextSize ?? 'sm'], 'leading-tight');\n\treturn (\n\t\t<RadioGroupPrimitive\n\t\t\tref={ref}\n\t\t\tvalue={value}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tonValueChange={(val) => val && onValueChange?.(val)}\n\t\t\tname={name}\n\t\t\tdisabled={disabled}\n\t\t\taria-invalid={invalid || undefined}\n\t\t\tclassName={cn('list-radio-group--component', \n\t\t\t\t'overflow-hidden rounded-radius border border-border [&>[role=radio]~[role=radio]]:border-t [&>[role=radio]~[role=radio]]:border-border',\n\t\t\t\t// Validation marks the group frame once, never each radio; the focused\n\t\t\t\t// row's radio draws the focus frame.\n\t\t\t\tfieldStateRecipes.invalid,\n\t\t\t\t// A disabled group dims once; its rows do not dim again.\n\t\t\t\tdisabled && 'pointer-events-none opacity-50',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{options.map((option) => (\n\t\t\t\t<RadioPrimitive.Root\n\t\t\t\t\tkey={option.value}\n\t\t\t\t\tvalue={option.value}\n\t\t\t\t\tdisabled={disabled || option.disabled}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'box-border group flex w-full items-start gap-space-lg text-start outline-none cursor-pointer',\n\t\t\t\t\t\t`transition-colors ${interactionRecipes.rowHover}`,\n\t\t\t\t\t\t'data-disabled:cursor-not-allowed',\n\t\t\t\t\t\t!disabled && 'data-disabled:opacity-50',\n\t\t\t\t\t\trowPadding,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<span aria-hidden=\"true\" className={cn('list-radio-group--track', choiceControlTrackClasses, labelLineClasses)}>\n\t\t\t\t\t\t{/* Selection reads from the radio itself: the shared control\n\t\t\t\t\t\t boundary, the primary ring and dot when checked, and the shared\n\t\t\t\t\t\t focus frame when the row has keyboard focus. */}\n\t\t\t\t\t\t<span className={cn(\n\t\t\t\t\t\t\t'list-radio-group--radio box-border flex size-4 items-center justify-center rounded-full border border-input transition-[border-color,box-shadow]',\n\t\t\t\t\t\t\t'group-data-[checked]:border-primary group-focus-visible:border-ring group-focus-visible:ring-3 group-focus-visible:ring-ring/50',\n\t\t\t\t\t\t)}>\n\t\t\t\t\t\t\t<RadioPrimitive.Indicator className=\"list-radio-group--dot size-2 rounded-full bg-primary\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Stack gap=\"dense\" className=\"flex-1 min-w-0\">\n\t\t\t\t\t\t{isSimpleText(option.label) ? (\n\t\t\t\t\t\t\t<Text tag=\"span\" weight=\"medium\" lineHeight=\"tight\" className=\"block\">\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : option.label}\n\t\t\t\t\t\t{!!option.description && (\n\t\t\t\t\t\t\tisSimpleText(option.description) ? (\n\t\t\t\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\" className=\"block\">\n\t\t\t\t\t\t\t\t\t{option.description}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) : option.description\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t</RadioPrimitive.Root>\n\t\t\t))}\n\t\t</RadioGroupPrimitive>\n\t);\n});\n\nListRadioGroup.displayName = 'ListRadioGroup';\n","/**\n * PillRadioGroup — compact, inline single-select rendered as connected pill\n * buttons. Best for 2–4 options where a full `<Select>` is too heavy and\n * cards are too tall (e.g. timeframe toggles, view-mode switchers).\n *\n * Custom-styled buttons rather than the shadcn ToggleGroup primitive: the\n * primitive strips inner rounding when spacing=0, which doesn't match this\n * design system's pill connector style.\n *\n * Keyboard follows the native radio-group pattern: the group is one Tab stop\n * (the selected pill, or the first enabled one), the arrow keys move to the\n * previous/next enabled pill and select it, Home/End jump to the ends, and\n * Space/Enter select the focused pill (or clear it when `allowClear` is set).\n */\nimport * as React from 'react';\n\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport { fieldStateRecipes } from '../../../lib/field-state-recipes';\nimport { useDensityConfig } from '../../../lib/ui-provider';\nimport { formControlSizeClasses, resolveFormControlSize } from '../forms/form-sizing';\nimport {\n\tchoicePillSizeTokens,\n\ttype ChoiceGroupBaseProps,\n\ttype ChoiceOptionBase,\n} from './choice-types';\nimport { focusRecipes } from '../../../lib/focus-recipes';\n\nexport interface PillRadioGroupOption extends ChoiceOptionBase {}\n\nexport interface PillRadioGroupProps\n\textends Omit<ChoiceGroupBaseProps, 'name'> {\n\t/** Form field name, forwarded for native submits. */\n\tname: string;\n\t/** Current value. Controlled. */\n\tvalue: string | null | undefined;\n\t/** Choices offered. */\n\toptions: PillRadioGroupOption[];\n\tonValueChange: (value: string | null) => void;\n\t/** Allow deselecting (click active pill to clear). Default false. */\n\tallowClear?: boolean;\n\t/** Stretch pills to fill the container. */\n\tfullWidth?: boolean;\n\t/** Accessible name of the group when no visible label is associated with it. */\n\t'aria-label'?: string;\n\t/** Id of a visible label that names the group. */\n\t'aria-labelledby'?: string;\n}\n\nconst NEXT_KEYS = new Set(['ArrowRight', 'ArrowDown']);\nconst PREVIOUS_KEYS = new Set(['ArrowLeft', 'ArrowUp']);\n\nexport const PillRadioGroup = React.forwardRef<HTMLDivElement, PillRadioGroupProps>(function PillRadioGroup({\n\tname,\n\tvalue,\n\toptions,\n\tonValueChange,\n\tallowClear = false,\n\tsize: sizeProp,\n\tfullWidth = false,\n\tdisabled = false,\n\tinvalid = false,\n\tclassName,\n\t'aria-label': ariaLabel,\n\t'aria-labelledby': ariaLabelledBy,\n\t'aria-describedby': ariaDescribedBy,\n}: PillRadioGroupProps, ref) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst size = resolveFormControlSize(sizeProp, defaultScale);\n\tconst buttonRefs = React.useRef<Array<HTMLButtonElement | null>>([]);\n\n\tconst isEnabled = React.useCallback(\n\t\t(option: PillRadioGroupOption) => !disabled && !option.disabled,\n\t\t[disabled],\n\t);\n\tconst selectedIndex = options.findIndex((option) => option.value === value);\n\t// One Tab stop: the selected enabled pill, otherwise the first enabled one.\n\tconst tabStopIndex = selectedIndex >= 0 && isEnabled(options[selectedIndex])\n\t\t? selectedIndex\n\t\t: options.findIndex(isEnabled);\n\n\tconst handleClick = React.useCallback(\n\t\t(optionValue: string) => {\n\t\t\tif (optionValue === value) {\n\t\t\t\tif (allowClear) onValueChange(null);\n\t\t\t} else {\n\t\t\t\tonValueChange(optionValue);\n\t\t\t}\n\t\t},\n\t\t[allowClear, onValueChange, value],\n\t);\n\n\tconst handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n\t\tconst enabled = options.map((option, index) => (isEnabled(option) ? index : -1)).filter((index) => index >= 0);\n\t\tif (!enabled.length) return;\n\t\tconst current = buttonRefs.current.findIndex((button) => button === event.target);\n\t\tif (current < 0) return;\n\t\tconst rtl = getComputedStyle(event.currentTarget).direction === 'rtl';\n\t\tconst forward = rtl ? new Set(['ArrowLeft', 'ArrowDown']) : NEXT_KEYS;\n\t\tconst backward = rtl ? new Set(['ArrowRight', 'ArrowUp']) : PREVIOUS_KEYS;\n\t\tconst position = enabled.indexOf(current);\n\t\tlet next: number | undefined;\n\t\tif (forward.has(event.key)) next = enabled[(position + 1) % enabled.length];\n\t\telse if (backward.has(event.key)) next = enabled[(position - 1 + enabled.length) % enabled.length];\n\t\telse if (event.key === 'Home') next = enabled[0];\n\t\telse if (event.key === 'End') next = enabled[enabled.length - 1];\n\t\tif (next === undefined) return;\n\t\tevent.preventDefault();\n\t\tbuttonRefs.current[next]?.focus();\n\t\t// Moving within a radio group selects, as native radios do.\n\t\tif (options[next].value !== value) onValueChange(options[next].value);\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tdata-name={name}\n\t\t\trole=\"radiogroup\"\n\t\t\taria-label={ariaLabel}\n\t\t\taria-labelledby={ariaLabelledBy}\n\t\t\taria-describedby={ariaDescribedBy}\n\t\t\taria-invalid={invalid || undefined}\n\t\t\taria-disabled={disabled || undefined}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\tclassName={cn('pill-radio-group--component',\n\t\t\t\t'border-input inline-flex items-center overflow-hidden rounded-inner border',\n\t\t\t\tformControlSizeClasses[size],\n\t\t\t\tfullWidth ? 'w-full' : 'w-fit self-start',\n\t\t\t\t// The group is the field frame: validation marks it once, and the\n\t\t\t\t// focused pill draws the inset focus recipe inside it.\n\t\t\t\tfieldStateRecipes.invalid,\n\t\t\t\t// A disabled group dims once; its pills do not dim again.\n\t\t\t\tdisabled && 'pointer-events-none opacity-50',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{options.map((option, index) => {\n\t\t\t\tconst isSelected = option.value === value;\n\t\t\t\tconst Icon = option.icon;\n\t\t\t\tconst optionLabel =\n\t\t\t\t\ttypeof option.label === 'string' ? option.label : undefined;\n\t\t\t\treturn (\n\t\t\t\t\t<button\n\t\t\t\t\t\tkey={option.value}\n\t\t\t\t\t\tref={(node) => { buttonRefs.current[index] = node; }}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"radio\"\n\t\t\t\t\t\taria-checked={isSelected}\n\t\t\t\t\t\taria-label={optionLabel || option.value}\n\t\t\t\t\t\tdisabled={disabled || option.disabled}\n\t\t\t\t\t\ttabIndex={index === tabStopIndex ? 0 : -1}\n\t\t\t\t\t\tonClick={() => handleClick(option.value)}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'box-border inline-flex select-none items-center justify-center border-0 p-0 font-sans font-medium transition-colors',\n\t\t\t\t\t\t\t// Inset, so the frame's clipped rounded corners never cut the ring.\n\t\t\t\t\t\t\t`outline-none focus-visible:z-10 ${focusRecipes.inset}`,\n\t\t\t\t\t\t\t'disabled:pointer-events-none',\n\t\t\t\t\t\t\t!disabled && 'disabled:opacity-50',\n\t\t\t\t\t\t\tchoicePillSizeTokens[size],\n\t\t\t\t\t\t\t'h-full min-h-0',\n\t\t\t\t\t\t\tfullWidth && 'flex-1',\n\t\t\t\t\t\t\tindex > 0 && 'border-input border-s',\n\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t? 'bg-primary text-primary-foreground focus-visible:inset-ring-primary-foreground focus-visible:ring-primary-foreground/50'\n\t\t\t\t\t\t\t\t: 'bg-background text-foreground hover:bg-muted',\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!!Icon && <Icon className={cn(size === 'sm' ? 'size-icon-sm' : 'size-icon', option.label && 'me-space-sm')} />}\n\t\t\t\t\t\t{typeof option.label === 'string' || typeof option.label === 'number' || typeof option.label === 'bigint' ? (\n\t\t\t\t\t\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className=\"text-inherit\">\n\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) : option.label}\n\t\t\t\t\t</button>\n\t\t\t\t);\n\t\t\t})}\n\t\t</div>\n\t);\n});\n\nPillRadioGroup.displayName = 'PillRadioGroup';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,KAASC,EAAgB;AAE/B,SAAS0D,EAAY,EAAE,cAAW,GAAGC,KAAsC;CACzE,OACE,kBAAC3D,EAAgB,OAAjB;EACE,aAAU;EACV,WAAW+B,EAAG,eAAe6B,CAAS;EACtC,GAAID;CACL,CAAA;AAEL;AAEA,SAASE,GAAY,EAAE,cAAW,GAAGF,KAAsC;CACzE,OACE,kBAAC3D,EAAgB,OAAjB;EACE,aAAU;EACV,WAAW+B,EAAG,0BAA0B6B,CAAS;EACjD,GAAID;CACL,CAAA;AAEL;AAEA,SAASG,GAAc,EACrB,cACA,UAAO,WACP,kBACA,aACA,GAAGH,KAKF;CACD,OACE,kBAAC3D,EAAgB,SAAjB;EACE,aAAU;EACV,aAAW+D;EACX,WAAWhC,EACT,sPACA,sGACAgB,EAAkB,OAClBA,EAAkB,SAClB,6GACA,gPACAa,CACF;EACA,GAAID;EAZN,UAAA,CAcGK,GACD,kBAAChE,EAAgB,MAAjB,EACE,QACE,kBAACiE,GAAD;GAAiB,eAAY;GAAO,WAAWlC,EAAG,sDAAsDiB,EAAoB,KAAKe,MAAS,OAAO,OAAO,OAAOG,CAAa;EAAI,CAAA,EAEnL,CAAA,CACsB;;AAE7B;AAEA,SAASC,GAAc,EACrB,cACA,cACA,aACA,UAAO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WAAW9H,EAAGgC,MAAS,OAAO,iBAAiB,aAAaqC,EAAO,SAAS,aAAa,EAAI,CAAA,GAC7G,OAAOA,EAAO,SAAU,YAAY,OAAOA,EAAO,SAAU,YAAY,OAAOA,EAAO,SAAU,WAChG,kBAACnE,GAAD;KAAM,KAAI;KAAO,MAAK;KAAU,QAAO;KAAS,YAAW;KAAQ,WAAU;KAC3E,UAAAmE,EAAO;IACH,CAAA,IACHA,EAAO,KACJ;GA9BF,GAAAA,EAAO,KA8BL;EAEV,CAAC;CACG,CAAA;AAEP,CAAC;AAED,GAAe,cAAc"}
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { useStrings as e } from "./lib/strings.js";
3
- import { t } from "./utils-BRhFDwuU.js";
4
- import { n } from "./buttons-DPZekJFu.js";
5
- import { c as r } from "./typography-UTnveOEy.js";
6
- import { n as i } from "./text.styles-g4He6UIW.js";
3
+ import { t } from "./utils-CF3c95Io.js";
4
+ import { n } from "./buttons-BbfzgczK.js";
5
+ import { c as r } from "./typography-CSyJrh28.js";
6
+ import { i } from "./text.styles-B64My8RZ.js";
7
7
  import { t as a } from "./focus-recipes-B653VaLq.js";
8
- import { t as o } from "./structure-BmisBK-3.js";
8
+ import { t as o } from "./structure-C0V0_Fyf.js";
9
9
  import { i as s } from "./tone-recipes-BPsRAvhu.js";
10
10
  import { a as c } from "./surface-recipes-BKRVW8Os.js";
11
- import { m as l } from "./primitives-BFK08r9M.js";
11
+ import { m as l } from "./primitives-Du64iDbb.js";
12
12
  import { forwardRef as u, useEffect as d, useRef as f, useState as p } from "react";
13
13
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
14
14
  import { Check as g, Copy as _, WrapText as v } from "lucide-react";
@@ -182,4 +182,4 @@ x.displayName = "CodeBlock";
182
182
  //#endregion
183
183
  export { b as n, x as t };
184
184
 
185
- //# sourceMappingURL=code-block-DeneBJR_.js.map
185
+ //# sourceMappingURL=code-block-CGNaUtAE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-block-DeneBJR_.js","names":["Text","resolveTextClassNames","focusRecipes","Stack","toneRecipes","surfaceDividerRecipes","MonoValue","useCodeCopy","copied","setCopied","useState","failed","setFailed","mounted","useRef","attempt","timer","useEffect","source","request","text","error","onCopyError","defaultCodeBlockStrings","CodeBlock","forwardRef","wrapProp","stringsProp","props","strings","useStrings","uncontrolledWrap","setWrap","defaultWrap","wrap","code","lines","first","startLine","hasDiff","diffLines","highlights","highlightLines","focus","focusLines","handleWrap","onWrapChange","cn","className","hideHeader","headerStart","filename","language","headerActions","showWrapToggle","Button","WrapText","hideCopy","copy","onCopy","jsx","Check","Copy","maxHeight","number","index","highlighted","focused","diff","showLineNumbers","renderLine"],"sources":["../src/components/base/code-block/use-code-copy.ts","../src/components/base/code-block/code-block.types.ts","../src/components/base/code-block/code-block.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\n/** Clipboard lifecycle for code display; callbacks and text stay per mount. */\nexport function useCodeCopy(source: string, onCopyError?: (error: unknown) => void) {\n\tconst [copied, setCopied] = useState(false);\n\tconst [failed, setFailed] = useState(false);\n\tconst mounted = useRef(false);\n\tconst attempt = useRef(0);\n\tconst timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n\tuseEffect(() => {\n\t\tmounted.current = true;\n\t\tsetCopied(false);\n\t\tsetFailed(false);\n\t\treturn () => {\n\t\t\tmounted.current = false;\n\t\t\tattempt.current += 1;\n\t\t\tclearTimeout(timer.current);\n\t\t};\n\t}, [source]);\n\n\tconst copy = async (text: string) => {\n\t\tconst request = ++attempt.current;\n\t\tclearTimeout(timer.current);\n\t\tsetCopied(false);\n\t\tsetFailed(false);\n\t\ttry {\n\t\t\tif (typeof navigator === 'undefined' || !navigator.clipboard?.writeText) {\n\t\t\t\tthrow new Error('Clipboard unavailable');\n\t\t\t}\n\t\t\tawait navigator.clipboard.writeText(text);\n\t\t} catch (error) {\n\t\t\tif (mounted.current && request === attempt.current) {\n\t\t\t\tsetFailed(true);\n\t\t\t\tonCopyError?.(error);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tif (!mounted.current || request !== attempt.current) return false;\n\t\tsetCopied(true);\n\t\ttimer.current = setTimeout(() => setCopied(false), 1500);\n\t\treturn true;\n\t};\n\n\treturn { copied, failed, copy };\n}\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport type { StringsProp } from '../../../lib/strings';\nexport interface CodeBlockStrings {\n copyAria: string; copied: string; copyError: string; defaultLanguageLabel: string; wrap: string; contentAria: string;\n}\nexport const defaultCodeBlockStrings: CodeBlockStrings = {\n copyAria: 'Copy code', copied: 'Copied', copyError: 'Could not copy. Please try again.', defaultLanguageLabel: 'Code', wrap: 'Wrap lines', contentAria: 'Code content',\n};\nexport interface CodeBlockLine {\n /** Source text, always used for copying even when a renderLine is supplied. */\n text: string;\n /** Source line number, starting at startLine. */\n number: number;\n highlighted: boolean;\n focused: boolean;\n diff?: 'add' | 'remove';\n}\nexport interface CodeBlockProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'onCopy'> {\n code: string;\n language?: string;\n filename?: string;\n showLineNumbers?: boolean;\n /** First displayed line number. @default 1 */\n startLine?: number;\n highlightLines?: readonly number[];\n /** Dim other lines. Hover/focus restores context. Source numbers are one based. */\n focusLines?: readonly number[];\n diffLines?: Readonly<Record<number, 'add' | 'remove'>>;\n /** Caller-prepared syntax rendering, e.g. token spans. Plain text is server safe and escaped by React. Never pass untrusted HTML. */\n renderLine?: (line: CodeBlockLine) => ReactNode;\n hideHeader?: boolean;\n hideCopy?: boolean;\n maxHeight?: number | string;\n headerStart?: ReactNode;\n headerActions?: ReactNode;\n wrap?: boolean;\n defaultWrap?: boolean;\n onWrapChange?: (wrap: boolean) => void;\n showWrapToggle?: boolean;\n onCopy?: (code: string) => void;\n onCopyError?: (error: unknown) => void;\n strings?: StringsProp<CodeBlockStrings>;\n}\n","import { forwardRef, useState } from 'react';\nimport { Check, Copy, WrapText } from 'lucide-react';\nimport { Button } from '../buttons';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\nimport { resolveTextClassNames } from '../../typography/text.styles';\nimport { MonoValue } from '../../primitives';\nimport { cn } from '../../../lib/utils';\nimport { useStrings } from '../../../lib/strings';\nimport { surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport { useCodeCopy } from './use-code-copy';\nimport { defaultCodeBlockStrings, type CodeBlockProps } from './code-block.types';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { toneRecipes } from '../../../lib/tone-recipes';\n\n/** Generic code display. Consumers own highlighting; source text remains the copy payload. */\nexport const CodeBlock = forwardRef<HTMLDivElement, CodeBlockProps>(function CodeBlock({\n code, language, filename, showLineNumbers = false, startLine = 1, highlightLines, focusLines, diffLines, renderLine,\n hideHeader = false, hideCopy = false, maxHeight, headerStart, headerActions, wrap: wrapProp, defaultWrap = false, onWrapChange, showWrapToggle = false,\n onCopy, onCopyError, strings: stringsProp, className, ...props\n}, ref) {\n const strings = useStrings(defaultCodeBlockStrings, stringsProp);\n const [uncontrolledWrap, setWrap] = useState(defaultWrap);\n const wrap = wrapProp ?? uncontrolledWrap;\n const { copied, failed, copy } = useCodeCopy(code, onCopyError);\n const lines = code.split('\\n');\n const first = Number.isFinite(startLine) ? Math.max(1, Math.trunc(startLine)) : 1;\n const hasDiff = Object.keys(diffLines ?? {}).length > 0;\n const highlights = new Set(highlightLines); const focus = new Set(focusLines);\n const handleWrap = () => { if (wrapProp === undefined) setWrap(!wrap); onWrapChange?.(!wrap); };\n return <div {...props} ref={ref} data-wrap={wrap || undefined} className={cn('code-block--component group/code-block box-border w-full min-w-0 max-w-full overflow-hidden rounded-radius bg-card text-card-foreground', surfaceDividerRecipes.frame.shell, className)}>\n {!hideHeader && <Stack direction=\"horizontal\" align=\"center\" gap=\"sm\" wrap className={cn('code-block--header p-surface-xs bg-muted text-muted-foreground', surfaceDividerRecipes.frame.header)}>\n {headerStart}\n <MonoValue className=\"min-w-0 truncate\">{filename || language || strings.defaultLanguageLabel}</MonoValue>\n {filename && language && <Text tag=\"span\" size=\"xs\" type=\"secondary\">{language}</Text>}\n <Stack direction=\"horizontal\" align=\"center\" gap=\"xs\" className=\"ms-auto shrink-0\">\n {headerActions}\n {showWrapToggle && <Button type=\"button\" size=\"sm\" iconOnly tone=\"secondary\" buttonStyle=\"ghost\" aria-label={strings.wrap} aria-pressed={wrap} onClick={handleWrap}><WrapText aria-hidden=\"true\" className=\"size-icon-sm\" /></Button>}\n {!hideCopy && <Button type=\"button\" size=\"sm\" iconOnly tone=\"secondary\" buttonStyle=\"ghost\" aria-label={copied ? strings.copied : strings.copyAria} onClick={async () => { if (await copy(code)) onCopy?.(code); }}>{copied ? <Check aria-hidden=\"true\" className=\"size-icon-sm\" /> : <Copy aria-hidden=\"true\" className=\"size-icon-sm\" />}</Button>}\n </Stack>\n </Stack>}\n <div className={`code-block--viewport min-w-0 max-w-full overflow-auto focus-visible:outline-none ${focusRecipes.inset}`} tabIndex={0} role=\"region\" aria-label={strings.contentAria} style={maxHeight !== undefined ? { maxHeight } : undefined}>\n <pre dir=\"ltr\" className={cn(resolveTextClassNames({ lineHeight: 'relaxed' }), 'code-block--pre m-0 p-surface font-mono text-inherit')}><code className=\"block\">\n {lines.map((text, index) => {\n const number = first + index; const highlighted = highlights.has(number); const focused = focus.size === 0 || focus.has(number); const diff = diffLines?.[number];\n return <span key={number} data-code-line={number} data-highlighted={highlighted || undefined} data-focused={focused ? 'true' : 'false'} data-diff={diff} className={cn('code-block--line flex min-w-0 gap-space-sm', highlighted && 'bg-accent text-accent-foreground', diff === 'add' && toneRecipes.success.wash, diff === 'remove' && toneRecipes.destructive.wash, !focused && 'opacity-50 group-hover/code-block:opacity-100 group-focus-within/code-block:opacity-100')}>\n {showLineNumbers && <Text tag=\"span\" size=\"inherit\" type=\"secondary\" numeric aria-hidden=\"true\" style={{ minWidth: `${String(first + lines.length - 1).length}ch` }} className=\"code-block--number select-none shrink-0 text-right\">{number}</Text>}\n {/* A tinted line keeps the source legible; the marker carries the status ink. */}\n {hasDiff && <Text tag=\"span\" size=\"inherit\" aria-hidden=\"true\" className={cn('code-block--diff font-mono select-none shrink-0', diff === 'add' ? 'text-success' : diff === 'remove' ? 'text-destructive' : 'text-inherit')}>{diff === 'add' ? '+' : diff === 'remove' ? '−' : '\\u00a0'}</Text>}\n <Text tag=\"span\" size=\"inherit\" lineHeight=\"relaxed\" className={cn('code-block--text font-mono block min-w-0 flex-1 text-inherit', wrap ? 'whitespace-pre-wrap break-words' : 'whitespace-pre')}>{renderLine ? renderLine({ text, number, highlighted, focused, diff }) : text || '\\u00a0'}</Text>\n </span>;\n })}\n </code></pre>\n </div>\n {failed && <div className=\"p-surface-xs\"><Text role=\"alert\" size=\"xs\" type=\"error\">{strings.copyError}</Text></div>}\n </div>;\n});\nCodeBlock.displayName = 'CodeBlock';\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAgBO,EAAY,GAAgB,GAAwC;CACnF,IAAM,CAACC,GAAQC,KAAaC,EAAS,EAAK,GACpC,CAACC,GAAQC,KAAaF,EAAS,EAAK,GACpCG,IAAUC,EAAO,EAAK,GACtBC,IAAUD,EAAO,CAAC,GAClBE,IAAQF,EAAkD,KAAA,CAAS;CAoCzE,OAlCAG,SACC,EAAQ,UAAU,IAClBR,EAAU,EAAK,GACfG,EAAU,EAAK,SACF;EAGZ,AAFA,EAAQ,UAAU,IAClB,EAAQ,WAAW,GACnB,aAAaI,EAAM,OAAO;CAC3B,IACE,CAACE,CAAM,CAAC,GAyBJ;EAAE;EAAQ;EAAQ,aAvBL,MAAiB;GACpC,IAAMC,IAAU,EAAEJ,EAAQ;GAG1B,AAFA,aAAaC,EAAM,OAAO,GAC1BP,EAAU,EAAK,GACfG,EAAU,EAAK;GACf,IAAI;IACH,IAAI,OAAO,YAAc,OAAe,CAAC,UAAU,WAAW,WAC7D,MAAU,MAAM,uBAAuB;IAExC,MAAM,UAAU,UAAU,UAAUQ,CAAI;GACzC,SAASC,GAAO;IAKf,O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,WAAU;IAAe,UAAA,kBAACX,GAAD;KAAM,MAAK;KAAQ,MAAK;KAAK,MAAK;KAAS,UAAA6B,EAAQ;IAAgB,CAAA;GAAM,CAAA;EAC9G;;AACN,CAAC;AACD,EAAU,cAAc"}
1
+ {"version":3,"file":"code-block-CGNaUtAE.js","names":["Text","focusRecipes","Stack","toneRecipes","surfaceDividerRecipes","MonoValue","useCodeCopy","copied","setCopied","useState","failed","setFailed","mounted","useRef","attempt","timer","useEffect","source","request","text","error","onCopyError","defaultCodeBlockStrings","CodeBlock","forwardRef","wrapProp","stringsProp","props","strings","useStrings","uncontrolledWrap","setWrap","defaultWrap","wrap","code","lines","first","startLine","hasDiff","diffLines","highlights","highlightLines","focus","focusLines","handleWrap","onWrapChange","cn","className","hideHeader","headerStart","filename","language","headerActions","showWrapToggle","Button","WrapText","hideCopy","copy","onCopy","jsx","Check","Copy","maxHeight","resolveTextClassNames","number","index","highlighted","focused","diff","showLineNumbers","renderLine"],"sources":["../src/components/base/code-block/use-code-copy.ts","../src/components/base/code-block/code-block.types.ts","../src/components/base/code-block/code-block.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\n/** Clipboard lifecycle for code display; callbacks and text stay per mount. */\nexport function useCodeCopy(source: string, onCopyError?: (error: unknown) => void) {\n\tconst [copied, setCopied] = useState(false);\n\tconst [failed, setFailed] = useState(false);\n\tconst mounted = useRef(false);\n\tconst attempt = useRef(0);\n\tconst timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n\tuseEffect(() => {\n\t\tmounted.current = true;\n\t\tsetCopied(false);\n\t\tsetFailed(false);\n\t\treturn () => {\n\t\t\tmounted.current = false;\n\t\t\tattempt.current += 1;\n\t\t\tclearTimeout(timer.current);\n\t\t};\n\t}, [source]);\n\n\tconst copy = async (text: string) => {\n\t\tconst request = ++attempt.current;\n\t\tclearTimeout(timer.current);\n\t\tsetCopied(false);\n\t\tsetFailed(false);\n\t\ttry {\n\t\t\tif (typeof navigator === 'undefined' || !navigator.clipboard?.writeText) {\n\t\t\t\tthrow new Error('Clipboard unavailable');\n\t\t\t}\n\t\t\tawait navigator.clipboard.writeText(text);\n\t\t} catch (error) {\n\t\t\tif (mounted.current && request === attempt.current) {\n\t\t\t\tsetFailed(true);\n\t\t\t\tonCopyError?.(error);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tif (!mounted.current || request !== attempt.current) return false;\n\t\tsetCopied(true);\n\t\ttimer.current = setTimeout(() => setCopied(false), 1500);\n\t\treturn true;\n\t};\n\n\treturn { copied, failed, copy };\n}\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport type { StringsProp } from '../../../lib/strings';\nexport interface CodeBlockStrings {\n copyAria: string; copied: string; copyError: string; defaultLanguageLabel: string; wrap: string; contentAria: string;\n}\nexport const defaultCodeBlockStrings: CodeBlockStrings = {\n copyAria: 'Copy code', copied: 'Copied', copyError: 'Could not copy. Please try again.', defaultLanguageLabel: 'Code', wrap: 'Wrap lines', contentAria: 'Code content',\n};\nexport interface CodeBlockLine {\n /** Source text, always used for copying even when a renderLine is supplied. */\n text: string;\n /** Source line number, starting at startLine. */\n number: number;\n highlighted: boolean;\n focused: boolean;\n diff?: 'add' | 'remove';\n}\nexport interface CodeBlockProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'onCopy'> {\n code: string;\n language?: string;\n filename?: string;\n showLineNumbers?: boolean;\n /** First displayed line number. @default 1 */\n startLine?: number;\n highlightLines?: readonly number[];\n /** Dim other lines. Hover/focus restores context. Source numbers are one based. */\n focusLines?: readonly number[];\n diffLines?: Readonly<Record<number, 'add' | 'remove'>>;\n /** Caller-prepared syntax rendering, e.g. token spans. Plain text is server safe and escaped by React. Never pass untrusted HTML. */\n renderLine?: (line: CodeBlockLine) => ReactNode;\n hideHeader?: boolean;\n hideCopy?: boolean;\n maxHeight?: number | string;\n headerStart?: ReactNode;\n headerActions?: ReactNode;\n wrap?: boolean;\n defaultWrap?: boolean;\n onWrapChange?: (wrap: boolean) => void;\n showWrapToggle?: boolean;\n onCopy?: (code: string) => void;\n onCopyError?: (error: unknown) => void;\n strings?: StringsProp<CodeBlockStrings>;\n}\n","import { forwardRef, useState } from 'react';\nimport { Check, Copy, WrapText } from 'lucide-react';\nimport { Button } from '../buttons';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\nimport { resolveTextClassNames } from '../../typography/text.styles';\nimport { MonoValue } from '../../primitives';\nimport { cn } from '../../../lib/utils';\nimport { useStrings } from '../../../lib/strings';\nimport { surfaceDividerRecipes } from '../../../lib/surface-recipes';\nimport { useCodeCopy } from './use-code-copy';\nimport { defaultCodeBlockStrings, type CodeBlockProps } from './code-block.types';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { toneRecipes } from '../../../lib/tone-recipes';\n\n/** Generic code display. Consumers own highlighting; source text remains the copy payload. */\nexport const CodeBlock = forwardRef<HTMLDivElement, CodeBlockProps>(function CodeBlock({\n code, language, filename, showLineNumbers = false, startLine = 1, highlightLines, focusLines, diffLines, renderLine,\n hideHeader = false, hideCopy = false, maxHeight, headerStart, headerActions, wrap: wrapProp, defaultWrap = false, onWrapChange, showWrapToggle = false,\n onCopy, onCopyError, strings: stringsProp, className, ...props\n}, ref) {\n const strings = useStrings(defaultCodeBlockStrings, stringsProp);\n const [uncontrolledWrap, setWrap] = useState(defaultWrap);\n const wrap = wrapProp ?? uncontrolledWrap;\n const { copied, failed, copy } = useCodeCopy(code, onCopyError);\n const lines = code.split('\\n');\n const first = Number.isFinite(startLine) ? Math.max(1, Math.trunc(startLine)) : 1;\n const hasDiff = Object.keys(diffLines ?? {}).length > 0;\n const highlights = new Set(highlightLines); const focus = new Set(focusLines);\n const handleWrap = () => { if (wrapProp === undefined) setWrap(!wrap); onWrapChange?.(!wrap); };\n return <div {...props} ref={ref} data-wrap={wrap || undefined} className={cn('code-block--component group/code-block box-border w-full min-w-0 max-w-full overflow-hidden rounded-radius bg-card text-card-foreground', surfaceDividerRecipes.frame.shell, className)}>\n {!hideHeader && <Stack direction=\"horizontal\" align=\"center\" gap=\"sm\" wrap className={cn('code-block--header p-surface-xs bg-muted text-muted-foreground', surfaceDividerRecipes.frame.header)}>\n {headerStart}\n <MonoValue className=\"min-w-0 truncate\">{filename || language || strings.defaultLanguageLabel}</MonoValue>\n {filename && language && <Text tag=\"span\" size=\"xs\" type=\"secondary\">{language}</Text>}\n <Stack direction=\"horizontal\" align=\"center\" gap=\"xs\" className=\"ms-auto shrink-0\">\n {headerActions}\n {showWrapToggle && <Button type=\"button\" size=\"sm\" iconOnly tone=\"secondary\" buttonStyle=\"ghost\" aria-label={strings.wrap} aria-pressed={wrap} onClick={handleWrap}><WrapText aria-hidden=\"true\" className=\"size-icon-sm\" /></Button>}\n {!hideCopy && <Button type=\"button\" size=\"sm\" iconOnly tone=\"secondary\" buttonStyle=\"ghost\" aria-label={copied ? strings.copied : strings.copyAria} onClick={async () => { if (await copy(code)) onCopy?.(code); }}>{copied ? <Check aria-hidden=\"true\" className=\"size-icon-sm\" /> : <Copy aria-hidden=\"true\" className=\"size-icon-sm\" />}</Button>}\n </Stack>\n </Stack>}\n <div className={`code-block--viewport min-w-0 max-w-full overflow-auto focus-visible:outline-none ${focusRecipes.inset}`} tabIndex={0} role=\"region\" aria-label={strings.contentAria} style={maxHeight !== undefined ? { maxHeight } : undefined}>\n <pre dir=\"ltr\" className={cn(resolveTextClassNames({ lineHeight: 'relaxed' }), 'code-block--pre m-0 p-surface font-mono text-inherit')}><code className=\"block\">\n {lines.map((text, index) => {\n const number = first + index; const highlighted = highlights.has(number); const focused = focus.size === 0 || focus.has(number); const diff = diffLines?.[number];\n return <span key={number} data-code-line={number} data-highlighted={highlighted || undefined} data-focused={focused ? 'true' : 'false'} data-diff={diff} className={cn('code-block--line flex min-w-0 gap-space-sm', highlighted && 'bg-accent text-accent-foreground', diff === 'add' && toneRecipes.success.wash, diff === 'remove' && toneRecipes.destructive.wash, !focused && 'opacity-50 group-hover/code-block:opacity-100 group-focus-within/code-block:opacity-100')}>\n {showLineNumbers && <Text tag=\"span\" size=\"inherit\" type=\"secondary\" numeric aria-hidden=\"true\" style={{ minWidth: `${String(first + lines.length - 1).length}ch` }} className=\"code-block--number select-none shrink-0 text-right\">{number}</Text>}\n {/* A tinted line keeps the source legible; the marker carries the status ink. */}\n {hasDiff && <Text tag=\"span\" size=\"inherit\" aria-hidden=\"true\" className={cn('code-block--diff font-mono select-none shrink-0', diff === 'add' ? 'text-success' : diff === 'remove' ? 'text-destructive' : 'text-inherit')}>{diff === 'add' ? '+' : diff === 'remove' ? '−' : '\\u00a0'}</Text>}\n <Text tag=\"span\" size=\"inherit\" lineHeight=\"relaxed\" className={cn('code-block--text font-mono block min-w-0 flex-1 text-inherit', wrap ? 'whitespace-pre-wrap break-words' : 'whitespace-pre')}>{renderLine ? renderLine({ text, number, highlighted, focused, diff }) : text || '\\u00a0'}</Text>\n </span>;\n })}\n </code></pre>\n </div>\n {failed && <div className=\"p-surface-xs\"><Text role=\"alert\" size=\"xs\" type=\"error\">{strings.copyError}</Text></div>}\n </div>;\n});\nCodeBlock.displayName = 'CodeBlock';\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAgBM,EAAY,GAAgB,GAAwC;CACnF,IAAM,CAACC,GAAQC,KAAaC,EAAS,EAAK,GACpC,CAACC,GAAQC,KAAaF,EAAS,EAAK,GACpCG,IAAUC,EAAO,EAAK,GACtBC,IAAUD,EAAO,CAAC,GAClBE,IAAQF,EAAkD,KAAA,CAAS;CAoCzE,OAlCAG,SACC,EAAQ,UAAU,IAClBR,EAAU,EAAK,GACfG,EAAU,EAAK,SACF;EAGZ,AAFA,EAAQ,UAAU,IAClB,EAAQ,WAAW,GACnB,aAAaI,EAAM,OAAO;CAC3B,IACE,CAACE,CAAM,CAAC,GAyBJ;EAAE;EAAQ;EAAQ,aAvBL,MAAiB;GACpC,IAAMC,IAAU,EAAEJ,EAAQ;GAG1B,AAFA,aAAaC,EAAM,OAAO,GAC1BP,EAAU,EAAK,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AAM;WAAQ;WAAa;WAAS;UAAK,CAAC,IAAInD,KAAQ;SAAe,CAAA;QAC5R;OALY,GAAA6C,CAKZ;MACP,CAAC;KACI,CAAA;IAAM,CAAA;GACR,CAAA;GACJtD,KAAU,kBAAC,OAAD;IAAK,WAAU;IAAe,UAAA,kBAACV,GAAD;KAAM,MAAK;KAAQ,MAAK;KAAK,MAAK;KAAS,UAAA4B,EAAQ;IAAgB,CAAA;GAAM,CAAA;EAC9G;;AACN,CAAC;AACD,EAAU,cAAc"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "./utils-BRhFDwuU.js";
3
- import { c as t } from "./typography-UTnveOEy.js";
2
+ import { t as e } from "./utils-CF3c95Io.js";
3
+ import { c as t } from "./typography-CSyJrh28.js";
4
4
  import { t as n } from "./motion-recipes-ChBg4HBq.js";
5
5
  import { t as r } from "./slot-CLF9kLrS.js";
6
6
  import { t as i } from "./disclosure-panel-B0HFNZ9x.js";
@@ -78,4 +78,4 @@ f.displayName = "Collapsible", p.displayName = "CollapsibleTrigger", m.displayNa
78
78
  //#endregion
79
79
  export { m as n, p as r, f as t };
80
80
 
81
- //# sourceMappingURL=collapsible-C-_l4hpy.js.map
81
+ //# sourceMappingURL=collapsible-Do4G0zcC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible-C-_l4hpy.js","names":["Collapsible","CollapsiblePrimitive","CollapsibleTrigger","React","CollapsibleContent","Collapsible","CollapsiblePrimitive","CollapsibleTriggerPrimitive","CollapsibleContentPrimitive","cn","Text","motionRecipes","Slot","DisclosurePanelElement","React$1","Collapsible$2","props","Collapsible","CollapsibleTrigger$1","slotRender","asChild","safeRender","render","_nativeButton","rest","renderProps","state","inferredNativeButton","children","resolvedNativeButton","nativeButton","CollapsibleContent$1","className","panelProps","isSimpleText","value","Collapsible$1","CollapsibleTrigger","CollapsibleContent"],"sources":["../src/components/ui/collapsible.tsx","../src/components/base/display/collapsible.tsx"],"sourcesContent":["import { DisclosurePanelElement } from './disclosure-panel';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { cn } from '../../lib/utils';\nimport { Collapsible as CollapsiblePrimitive } from \"@base-ui/react/collapsible\"\nimport * as React from \"react\"\n\nimport { Slot } from \"./slot\"\n\nfunction Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\nfunction CollapsibleTrigger({\n asChild = false,\n nativeButton,\n render,\n children,\n ...props\n}: CollapsiblePrimitive.Trigger.Props & { asChild?: boolean; nativeButton?: boolean }) {\n const slotRender = asChild ? <Slot /> : undefined\n const safeRender: CollapsiblePrimitive.Trigger.Props[\"render\"] = typeof render === \"function\"\n ? ((renderProps, state) => {\n const { nativeButton: _nativeButton, ...rest } = renderProps as Record<string, unknown>\n void _nativeButton\n return render(rest as typeof renderProps, state)\n })\n : render\n let inferredNativeButton = true\n if (asChild && React.isValidElement(children)) {\n if (typeof children.type === \"string\") {\n inferredNativeButton = children.type === \"button\"\n } else {\n const childProps = (children.props ?? {}) as Record<string, unknown>\n inferredNativeButton = !(\"href\" in childProps)\n }\n }\n const resolvedNativeButton = nativeButton ?? (asChild ? inferredNativeButton : true)\n return (\n <CollapsiblePrimitive.Trigger\n data-slot=\"collapsible-trigger\"\n render={slotRender ?? safeRender}\n nativeButton={resolvedNativeButton}\n {...props}\n >\n {children}\n </CollapsiblePrimitive.Trigger>\n )\n}\n\nfunction CollapsibleContent({ className, render, ...props }: CollapsiblePrimitive.Panel.Props) {\n return (\n <CollapsiblePrimitive.Panel data-slot=\"collapsible-content\" className={cn(\"box-border h-(--collapsible-panel-height)\", motionRecipes.disclosure, className)} {...props} render={(panelProps, state) => <DisclosurePanelElement props={panelProps} state={state} render={render} heightVariable=\"--collapsible-panel-height\" />} />\n )\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n","/** Tokenized base wrappers for inline disclosure behavior. */\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport {\n\tCollapsible as CollapsiblePrimitive,\n\tCollapsibleContent as CollapsibleContentPrimitive,\n\tCollapsibleTrigger as CollapsibleTriggerPrimitive,\n} from '../../ui/collapsible';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nexport type CollapsibleProps = ComponentProps<typeof CollapsiblePrimitive>;\nexport type CollapsibleTriggerProps = ComponentProps<typeof CollapsibleTriggerPrimitive>;\nexport type CollapsibleContentProps = ComponentProps<typeof CollapsibleContentPrimitive>;\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/** Root disclosure state. Supports controlled and uncontrolled open state. */\nexport function Collapsible({ className, ...props }: CollapsibleProps) {\n\treturn (\n\t\t<CollapsiblePrimitive\n\t\t\tclassName={cn('collapsible--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/** Consumer-blocks control that toggles the disclosure panel. */\nexport function CollapsibleTrigger({ className, children, ...props }: CollapsibleTriggerProps) {\n\treturn (\n\t\t<CollapsibleTriggerPrimitive\n\t\t\tclassName={cn('collapsible-trigger--component active:translate-y-0!', 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</CollapsibleTriggerPrimitive>\n\t);\n}\n\n/** Mount-aware disclosure panel. The caller owns its surface and content. */\nexport function CollapsibleContent({ className, children, ...props }: CollapsibleContentProps) {\n\treturn (\n\t\t<CollapsibleContentPrimitive\n\t\t\tclassName={cn('collapsible-content--component', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? <Text>{children}</Text> : children}\n\t\t</CollapsibleContentPrimitive>\n\t);\n}\n\nCollapsible.displayName = 'Collapsible';\nCollapsibleTrigger.displayName = 'CollapsibleTrig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,CAAS;EACjD,GAAIhB;CACJ,CAAA;AAEH;AAGA,SAAgBqB,EAAmB,EAAE,cAAW,aAAU,GAAGrB,KAAkC;CAC9F,OACC,kBAACT,GAAD;EACC,WAAWE,EAAG,wDAAwDuB,CAAS;EAC/E,GAAIhB;EAEH,UAAAkB,EAAaN,CAAQ,IACrB,kBAAClB,GAAD;GAAM,KAAI;GAAO,MAAK;GAAU,QAAO;GAAS,YAAW;GAAQ,WAAU;GAC3E;EACI,CAAA,IACHkB;CACwB,CAAA;AAE/B;AAGA,SAAgBU,EAAmB,EAAE,cAAW,aAAU,GAAGtB,KAAkC;CAC9F,OACC,kBAACR,GAAD;EACC,WAAWC,EAAG,kCAAkCuB,CAAS;EACzD,GAAIhB;EAEH,UAAAkB,EAAaN,CAAQ,IAAI,kBAAClB,GAAD,EAAO,YAAe,CAAA,IAAIkB;CACxB,CAAA;AAE/B;AAEA,EAAY,cAAc,eAC1B,EAAmB,cAAc,sBACjC,EAAmB,cAAc"}
1
+ {"version":3,"file":"collapsible-Do4G0zcC.js","names":["Collapsible","CollapsiblePrimitive","CollapsibleTrigger","React","CollapsibleContent","Collapsible","CollapsiblePrimitive","CollapsibleTriggerPrimitive","CollapsibleContentPrimitive","cn","Text","motionRecipes","Slot","DisclosurePanelElement","React$1","Collapsible$2","props","Collapsible","CollapsibleTrigger$1","slotRender","asChild","safeRender","render","_nativeButton","rest","renderProps","state","inferredNativeButton","children","resolvedNativeButton","nativeButton","CollapsibleContent$1","className","panelProps","isSimpleText","value","Collapsible$1","CollapsibleTrigger","CollapsibleContent"],"sources":["../src/components/ui/collapsible.tsx","../src/components/base/display/collapsible.tsx"],"sourcesContent":["import { DisclosurePanelElement } from './disclosure-panel';\nimport { motionRecipes } from '../../lib/motion-recipes';\nimport { cn } from '../../lib/utils';\nimport { Collapsible as CollapsiblePrimitive } from \"@base-ui/react/collapsible\"\nimport * as React from \"react\"\n\nimport { Slot } from \"./slot\"\n\nfunction Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\nfunction CollapsibleTrigger({\n asChild = false,\n nativeButton,\n render,\n children,\n ...props\n}: CollapsiblePrimitive.Trigger.Props & { asChild?: boolean; nativeButton?: boolean }) {\n const slotRender = asChild ? <Slot /> : undefined\n const safeRender: CollapsiblePrimitive.Trigger.Props[\"render\"] = typeof render === \"function\"\n ? ((renderProps, state) => {\n const { nativeButton: _nativeButton, ...rest } = renderProps as Record<string, unknown>\n void _nativeButton\n return render(rest as typeof renderProps, state)\n })\n : render\n let inferredNativeButton = true\n if (asChild && React.isValidElement(children)) {\n if (typeof children.type === \"string\") {\n inferredNativeButton = children.type === \"button\"\n } else {\n const childProps = (children.props ?? {}) as Record<string, unknown>\n inferredNativeButton = !(\"href\" in childProps)\n }\n }\n const resolvedNativeButton = nativeButton ?? (asChild ? inferredNativeButton : true)\n return (\n <CollapsiblePrimitive.Trigger\n data-slot=\"collapsible-trigger\"\n render={slotRender ?? safeRender}\n nativeButton={resolvedNativeButton}\n {...props}\n >\n {children}\n </CollapsiblePrimitive.Trigger>\n )\n}\n\nfunction CollapsibleContent({ className, render, ...props }: CollapsiblePrimitive.Panel.Props) {\n return (\n <CollapsiblePrimitive.Panel data-slot=\"collapsible-content\" className={cn(\"box-border h-(--collapsible-panel-height)\", motionRecipes.disclosure, className)} {...props} render={(panelProps, state) => <DisclosurePanelElement props={panelProps} state={state} render={render} heightVariable=\"--collapsible-panel-height\" />} />\n )\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n","/** Tokenized base wrappers for inline disclosure behavior. */\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport {\n\tCollapsible as CollapsiblePrimitive,\n\tCollapsibleContent as CollapsibleContentPrimitive,\n\tCollapsibleTrigger as CollapsibleTriggerPrimitive,\n} from '../../ui/collapsible';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nexport type CollapsibleProps = ComponentProps<typeof CollapsiblePrimitive>;\nexport type CollapsibleTriggerProps = ComponentProps<typeof CollapsibleTriggerPrimitive>;\nexport type CollapsibleContentProps = ComponentProps<typeof CollapsibleContentPrimitive>;\n\nfunction isSimpleText(value: ReactNode): value is string | number | bigint {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/** Root disclosure state. Supports controlled and uncontrolled open state. */\nexport function Collapsible({ className, ...props }: CollapsibleProps) {\n\treturn (\n\t\t<CollapsiblePrimitive\n\t\t\tclassName={cn('collapsible--component', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/** Consumer-blocks control that toggles the disclosure panel. */\nexport function CollapsibleTrigger({ className, children, ...props }: CollapsibleTriggerProps) {\n\treturn (\n\t\t<CollapsibleTriggerPrimitive\n\t\t\tclassName={cn('collapsible-trigger--component active:translate-y-0!', 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</CollapsibleTriggerPrimitive>\n\t);\n}\n\n/** Mount-aware disclosure panel. The caller owns its surface and content. */\nexport function CollapsibleContent({ className, children, ...props }: CollapsibleContentProps) {\n\treturn (\n\t\t<CollapsibleContentPrimitive\n\t\t\tclassName={cn('collapsible-content--component', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isSimpleText(children) ? <Text>{children}</Text> : children}\n\t\t</CollapsibleContentPrimitive>\n\t);\n}\n\nCollapsible.displayName = 'Collapsible';\nCollapsibleTrigger.displayName = 'CollapsibleTrigger';\nCollapsibleContent.displayName = 'CollapsibleContent';\n"],"mappings":";;;;;;;;;;AAQA,SAASA,EAAY,EAAE,GAAGgB,KAA0C;CAClE,OAAO,kBAACf,EAAqB,MAAtB;EAA2B,aAAU;EAAc,GAAIe;CAAQ,CAAA;AACxE;AAEA,SAAS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,EAAaN,CAAQ,IACrB,kBAAClB,GAAD;GAAM,KAAI;GAAO,MAAK;GAAU,QAAO;GAAS,YAAW;GAAQ,WAAU;GAC3E;EACI,CAAA,IACHkB;CACwB,CAAA;AAE/B;AAGA,SAAgBU,EAAmB,EAAE,cAAW,aAAU,GAAGtB,KAAkC;CAC9F,OACC,kBAACR,GAAD;EACC,WAAWC,EAAG,kCAAkCuB,CAAS;EACzD,GAAIhB;EAEH,UAAAkB,EAAaN,CAAQ,IAAI,kBAAClB,GAAD,EAAO,YAAe,CAAA,IAAIkB;CACxB,CAAA;AAE/B;AAEA,EAAY,cAAc,eAC1B,EAAmB,cAAc,sBACjC,EAAmB,cAAc"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "./utils-BRhFDwuU.js";
3
- import { c as t } from "./typography-UTnveOEy.js";
2
+ import { t as e } from "./utils-CF3c95Io.js";
3
+ import { c as t } from "./typography-CSyJrh28.js";
4
4
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
5
  //#region src/components/base/popover/collection-content.tsx
6
6
  function i(e) {
@@ -50,4 +50,4 @@ function o({ label: i, description: o, leading: s, trailing: c, leadingDecorativ
50
50
  //#endregion
51
51
  export { a as n, o as t };
52
52
 
53
- //# sourceMappingURL=collection-content-By56pLog.js.map
53
+ //# sourceMappingURL=collection-content-C0e8SsTm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection-content-By56pLog.js","names":["cn","Text","isScalar","value","CollectionLabel","children","className","CollectionContent","copyFlow","wrap","leading","leadingDecorative","leadingClassName","bodyClassName","labelClassName","label","description","descriptionClassName","trailing"],"sources":["../src/components/base/popover/collection-content.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nfunction isScalar(value: ReactNode) {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/** Presentation only. Interactive primitives retain identity and behavior. */\nexport function CollectionLabel({ children, className }: { children: ReactNode; className?: string }) {\n\tif (typeof children === 'string' && !children.trim()) return children;\n\tif (!isScalar(children)) return className ? <span className={className}>{children}</span> : children;\n\treturn (\n\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className={cn('text-inherit text-start', className)}>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\ninterface CollectionContentProps {\n\tlabel: ReactNode;\n\tdescription?: ReactNode;\n\tleading?: ReactNode;\n\ttrailing?: ReactNode;\n\tleadingDecorative?: boolean;\n\twrap?: boolean;\n\tclassName?: string;\n\tleadingClassName?: string;\n\tbodyClassName?: string;\n\tlabelClassName?: string;\n\tdescriptionClassName?: string;\n}\n\n/** Private copy grammar shared by option/action owners; rich slots are not cloned. */\nexport function CollectionContent({\n\tlabel, description, leading, trailing, leadingDecorative = false, wrap = false,\n\tclassName, leadingClassName, bodyClassName, labelClassName, descriptionClassName,\n}: CollectionContentProps) {\n\tconst copyFlow = wrap ? 'whitespace-normal wrap-anywhere' : 'truncate';\n\treturn (\n\t\t<span className={cn('collection-content--component flex min-w-0 flex-1 items-center gap-space-sm', className)}>\n\t\t\t{leading != null && leading !== false && (\n\t\t\t\t<span aria-hidden={leadingDecorative || undefined} className={cn('inline-flex shrink-0 items-center justify-center text-muted-foreground', leadingClassName)}>\n\t\t\t\t\t{leading}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t<span className={cn('collection-content--copy flex min-w-0 flex-1 flex-col gap-dense', bodyClassName)}>\n\t\t\t\t<CollectionLabel className={cn('min-w-0', copyFlow, labelClassName)}>{label}</CollectionLabel>\n\t\t\t\t{description != null && description !== false && description !== '' && (\n\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\" lineHeight=\"tight\" className={cn('text-start', copyFlow, descriptionClassName)}>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t</span>\n\t\t\t{trailing}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;;AAIA,SAASE,EAAS,GAAkB;CACnC,OAAO,OAAOC,KAAU,YAAY,OAAOA,KAAU,YAAY,OAAOA,KAAU;AACnF;AAGA,SAAgBC,EAAgB,EAAE,aAAU,gBAA0D;CAGrG,OAFI,OAAOC,KAAa,YAAY,CAACA,EAAS,KAAK,IAAUA,IACxDH,EAASG,CAAQ,IAErB,kBAACJ,GAAD;EAAM,KAAI;EAAO,MAAK;EAAU,QAAO;EAAS,YAAW;EAAQ,WAAWD,EAAG,2BAA2BM,CAAS;EACnH;CACI,CAAA,IAJyBA,IAAY,kBAAC,QAAD;EAAiB;EAAY;CAAe,CAAA,IAAID;AAM7F;AAiBA,SAAgBE,EAAkB,EACjC,UAAO,gBAAa,YAAS,aAAU,uBAAoB,IAAO,UAAO,IACzE,cAAW,qBAAkB,kBAAe,mBAAgB,2BAClC;CAC1B,IAAMC,IAAWC,IAAO,oCAAoC;CAC5D,OACC,kBAAC,QAAD;EAAM,WAAWT,EAAG,+EAA+EM,CAAS;EAA5G,UAAA;GACEI,KAAW,QAAQA,MAAY,MAC/B,kBAAC,QAAD;IAAM,eAAaC,KAAqB,KAAA;IAAW,WAAWX,EAAG,0EAA0EY,CAAgB;IACzJ,UAAAF;GACI,CAAA;GAEP,kBAAC,QAAD;IAAM,WAAWV,EAAG,mEAAmEa,CAAa;IAApG,UAAA,CACC,kBAACT,GAAD;KAAiB,WAAWJ,EAAG,WAAWQ,GAAUM,CAAc;KAAI,UAAAC;IAAuB,CAAA,GAC5FC,KAAe,QAAQA,MAAgB,MAASA,MAAgB,MAChE,kBAACf,GAAD;KAAM,KAAI;KAAO,MAAK;KAAK,MAAK;KAAY,YAAW;KAAQ,WAAWD,EAAG,cAAcQ,GAAUS,CAAoB;KACvH,UAAAD;IACI,CAAA,CAEF;;GACLE;EACI;;AAER"}
1
+ {"version":3,"file":"collection-content-C0e8SsTm.js","names":["cn","Text","isScalar","value","CollectionLabel","children","className","CollectionContent","copyFlow","wrap","leading","leadingDecorative","leadingClassName","bodyClassName","labelClassName","label","description","descriptionClassName","trailing"],"sources":["../src/components/base/popover/collection-content.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\n\nfunction isScalar(value: ReactNode) {\n\treturn typeof value === 'string' || typeof value === 'number' || typeof value === 'bigint';\n}\n\n/** Presentation only. Interactive primitives retain identity and behavior. */\nexport function CollectionLabel({ children, className }: { children: ReactNode; className?: string }) {\n\tif (typeof children === 'string' && !children.trim()) return children;\n\tif (!isScalar(children)) return className ? <span className={className}>{children}</span> : children;\n\treturn (\n\t\t<Text tag=\"span\" size=\"inherit\" weight=\"medium\" lineHeight=\"tight\" className={cn('text-inherit text-start', className)}>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\ninterface CollectionContentProps {\n\tlabel: ReactNode;\n\tdescription?: ReactNode;\n\tleading?: ReactNode;\n\ttrailing?: ReactNode;\n\tleadingDecorative?: boolean;\n\twrap?: boolean;\n\tclassName?: string;\n\tleadingClassName?: string;\n\tbodyClassName?: string;\n\tlabelClassName?: string;\n\tdescriptionClassName?: string;\n}\n\n/** Private copy grammar shared by option/action owners; rich slots are not cloned. */\nexport function CollectionContent({\n\tlabel, description, leading, trailing, leadingDecorative = false, wrap = false,\n\tclassName, leadingClassName, bodyClassName, labelClassName, descriptionClassName,\n}: CollectionContentProps) {\n\tconst copyFlow = wrap ? 'whitespace-normal wrap-anywhere' : 'truncate';\n\treturn (\n\t\t<span className={cn('collection-content--component flex min-w-0 flex-1 items-center gap-space-sm', className)}>\n\t\t\t{leading != null && leading !== false && (\n\t\t\t\t<span aria-hidden={leadingDecorative || undefined} className={cn('inline-flex shrink-0 items-center justify-center text-muted-foreground', leadingClassName)}>\n\t\t\t\t\t{leading}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t<span className={cn('collection-content--copy flex min-w-0 flex-1 flex-col gap-dense', bodyClassName)}>\n\t\t\t\t<CollectionLabel className={cn('min-w-0', copyFlow, labelClassName)}>{label}</CollectionLabel>\n\t\t\t\t{description != null && description !== false && description !== '' && (\n\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"secondary\" lineHeight=\"tight\" className={cn('text-start', copyFlow, descriptionClassName)}>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t</span>\n\t\t\t{trailing}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;;AAIA,SAASE,EAAS,GAAkB;CACnC,OAAO,OAAOC,KAAU,YAAY,OAAOA,KAAU,YAAY,OAAOA,KAAU;AACnF;AAGA,SAAgBC,EAAgB,EAAE,aAAU,gBAA0D;CAGrG,OAFI,OAAOC,KAAa,YAAY,CAACA,EAAS,KAAK,IAAUA,IACxDH,EAASG,CAAQ,IAErB,kBAACJ,GAAD;EAAM,KAAI;EAAO,MAAK;EAAU,QAAO;EAAS,YAAW;EAAQ,WAAWD,EAAG,2BAA2BM,CAAS;EACnH;CACI,CAAA,IAJyBA,IAAY,kBAAC,QAAD;EAAiB;EAAY;CAAe,CAAA,IAAID;AAM7F;AAiBA,SAAgBE,EAAkB,EACjC,UAAO,gBAAa,YAAS,aAAU,uBAAoB,IAAO,UAAO,IACzE,cAAW,qBAAkB,kBAAe,mBAAgB,2BAClC;CAC1B,IAAMC,IAAWC,IAAO,oCAAoC;CAC5D,OACC,kBAAC,QAAD;EAAM,WAAWT,EAAG,+EAA+EM,CAAS;EAA5G,UAAA;GACEI,KAAW,QAAQA,MAAY,MAC/B,kBAAC,QAAD;IAAM,eAAaC,KAAqB,KAAA;IAAW,WAAWX,EAAG,0EAA0EY,CAAgB;IACzJ,UAAAF;GACI,CAAA;GAEP,kBAAC,QAAD;IAAM,WAAWV,EAAG,mEAAmEa,CAAa;IAApG,UAAA,CACC,kBAACT,GAAD;KAAiB,WAAWJ,EAAG,WAAWQ,GAAUM,CAAc;KAAI,UAAAC;IAAuB,CAAA,GAC5FC,KAAe,QAAQA,MAAgB,MAASA,MAAgB,MAChE,kBAACf,GAAD;KAAM,KAAI;KAAO,MAAK;KAAK,MAAK;KAAY,YAAW;KAAQ,WAAWD,EAAG,cAAcQ,GAAUS,CAAoB;KACvH,UAAAD;IACI,CAAA,CAEF;;GACLE;EACI;;AAER"}
@@ -1,18 +1,18 @@
1
1
  "use client";
2
- import { s as e, v as t } from "./ui-provider-C_U0Xma4.js";
2
+ import { s as e, v as t } from "./ui-provider-CQCuCBcy.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, o } from "./typography-UTnveOEy.js";
7
- import { t as s } from "./structure-BmisBK-3.js";
4
+ import { t as r } from "./utils-CF3c95Io.js";
5
+ import { n as i } from "./buttons-BbfzgczK.js";
6
+ import { c as a, o } from "./typography-CSyJrh28.js";
7
+ import { t as s } from "./structure-C0V0_Fyf.js";
8
8
  import { n as c } from "./tone-recipes-BPsRAvhu.js";
9
- import { t as l } from "./feedback-BYIhtitP.js";
9
+ import { t as l } from "./feedback-DZNL5Lg1.js";
10
10
  import { t as u } from "./layer-recipes-CCpklYME.js";
11
- import { n as d, r as f } from "./field-affordance-recipes-DZhnIL_Y.js";
12
- import { C as p, S as m, _ as h, a as g, b as _, g as v, h as y, m as b, o as x, p as S, t as C, u as w, v as T, w as E, x as D } from "./combobox-DaHESuiL.js";
13
- import { l as O, u as k } from "./form-sizing-BdP_Mf5p.js";
14
- import { t as A } from "./input-DQdEd0YD.js";
15
- import { t as ee } from "./scroll-area-DcI-M1UT.js";
11
+ import { n as d, r as f } from "./field-affordance-recipes-DjwGx8eM.js";
12
+ import { C as p, S as m, _ as h, a as g, b as _, g as v, h as y, m as b, o as x, p as S, t as C, u as w, v as T, w as E, x as D } from "./combobox-hbhSS18O.js";
13
+ import { l as O, u as k } from "./form-sizing-NXgjkmBG.js";
14
+ import { t as A } from "./input-Cdw4k0fb.js";
15
+ import { t as ee } from "./scroll-area-La5RXsEk.js";
16
16
  import { t as j } from "./use-debounced-callback-Cx1h-hdv.js";
17
17
  import * as M from "react";
18
18
  import { useCallback as N, useEffect as P, useMemo as F, useRef as I, useState as L } from "react";
@@ -874,4 +874,4 @@ Ce.displayName = "AsyncResourceCombobox";
874
874
  //#endregion
875
875
  export { ge as a, be as i, xe as n, W as o, Z as r, Ce as t };
876
876
 
877
- //# sourceMappingURL=combobox-Dxo2fAYQ.js.map
877
+ //# sourceMappingURL=combobox-CBJDs6w_.js.map