@keboola/design 11.9.0 → 13.0.0

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 (367) hide show
  1. package/AGENTS.md +45 -14
  2. package/CHANGELOG.md +246 -0
  3. package/COMPONENT-API.md +352 -294
  4. package/README.md +11 -1
  5. package/dist/{AIKit-ELIsegJz.js → AIKit-DcOlHIBr.js} +420 -247
  6. package/dist/AIKit-DcOlHIBr.js.map +1 -0
  7. package/dist/{Alert-BsIM_oFK.js → Alert-UI-CIs-1.js} +16 -16
  8. package/dist/Alert-UI-CIs-1.js.map +1 -0
  9. package/dist/{AlertModal-BGJdaRRj.js → AlertModal-mbSnuuka.js} +8 -8
  10. package/dist/AlertModal-mbSnuuka.js.map +1 -0
  11. package/dist/{AppShell-DRgJxpXW.js → AppShell-WSQabK8r.js} +15 -52
  12. package/dist/AppShell-WSQabK8r.js.map +1 -0
  13. package/dist/{AutoSaveTextarea-BeuWuszr.js → AutoSaveTextarea-C5iIr2Ts.js} +2 -2
  14. package/dist/{AutoSaveTextarea-BeuWuszr.js.map → AutoSaveTextarea-C5iIr2Ts.js.map} +1 -1
  15. package/dist/{Badge-o5jURtpB.js → Badge-DIjhwPvh.js} +4 -9
  16. package/dist/Badge-DIjhwPvh.js.map +1 -0
  17. package/dist/{BrandEditor-BsTBM3s6.js → BrandEditor-Bkd6dhb8.js} +7 -7
  18. package/dist/{BrandEditor-BsTBM3s6.js.map → BrandEditor-Bkd6dhb8.js.map} +1 -1
  19. package/dist/{BrandLogo-CoKBk4MI.js → BrandLogo-CKpVSZb6.js} +4 -4
  20. package/dist/BrandLogo-CKpVSZb6.js.map +1 -0
  21. package/dist/{Breadcrumb-xqEUxfwn.js → Breadcrumb-BUoAZyhO.js} +8 -14
  22. package/dist/Breadcrumb-BUoAZyhO.js.map +1 -0
  23. package/dist/{Button-DsRrU5F1.js → Button-B21oVcPU.js} +31 -14
  24. package/dist/Button-B21oVcPU.js.map +1 -0
  25. package/dist/{Calendar-cG5NIJ4O.js → Calendar-DFtmZzbF.js} +99 -99
  26. package/dist/Calendar-DFtmZzbF.js.map +1 -0
  27. package/dist/{Card-Dyo7055Q.js → Card-BQmBWHXl.js} +35 -7
  28. package/dist/Card-BQmBWHXl.js.map +1 -0
  29. package/dist/{Checkbox-Dq5fPNrO.js → Checkbox-8yIIgY7g.js} +4 -4
  30. package/dist/Checkbox-8yIIgY7g.js.map +1 -0
  31. package/dist/{Clipboard-BZitKiSA.js → Clipboard-_xf6hMDD.js} +2 -2
  32. package/dist/{Clipboard-BZitKiSA.js.map → Clipboard-_xf6hMDD.js.map} +1 -1
  33. package/dist/{ClipboardButton-KHQnPEh_.js → ClipboardButton-srUgWgwH.js} +4 -4
  34. package/dist/{ClipboardButton-KHQnPEh_.js.map → ClipboardButton-srUgWgwH.js.map} +1 -1
  35. package/dist/{CodeEditor-BJKJXA0c.js → CodeEditor-jZMw1ioj.js} +55 -165
  36. package/dist/CodeEditor-jZMw1ioj.js.map +1 -0
  37. package/dist/{ColorInput-Bj3dfPFA.js → ColorInput-B3gBZ8Ya.js} +12 -27
  38. package/dist/ColorInput-B3gBZ8Ya.js.map +1 -0
  39. package/dist/{ColorModeSwitch-CWt-DZGC.js → ColorModeSwitch-Bw9wMyoL.js} +7 -17
  40. package/dist/ColorModeSwitch-Bw9wMyoL.js.map +1 -0
  41. package/dist/Combobox-C_MTpQ1l.js +1081 -0
  42. package/dist/Combobox-C_MTpQ1l.js.map +1 -0
  43. package/dist/{Command-BDU3C1gg.js → Command-BQPiZCNz.js} +4 -4
  44. package/dist/{Command-BDU3C1gg.js.map → Command-BQPiZCNz.js.map} +1 -1
  45. package/dist/{CopyField-BHRQUyuF.js → CopyField-Ba7h8MqZ.js} +19 -55
  46. package/dist/{CopyField-BHRQUyuF.js.map → CopyField-Ba7h8MqZ.js.map} +1 -1
  47. package/dist/{DateInput-B6N8g0ra.js → DateInput-D0nWUasV.js} +6 -6
  48. package/dist/{DateInput-B6N8g0ra.js.map → DateInput-D0nWUasV.js.map} +1 -1
  49. package/dist/{DatePicker-nA8YdE84.js → DatePicker-CtSa9b3V.js} +3 -3
  50. package/dist/{DatePicker-nA8YdE84.js.map → DatePicker-CtSa9b3V.js.map} +1 -1
  51. package/dist/{DateRangeInput-7M9Z4cVO.js → DateRangeInput-i6wE45-V.js} +10 -14
  52. package/dist/DateRangeInput-i6wE45-V.js.map +1 -0
  53. package/dist/{DateRangePicker-DjSUFjh4.js → DateRangePicker-BAnuz6vO.js} +9 -13
  54. package/dist/DateRangePicker-BAnuz6vO.js.map +1 -0
  55. package/dist/DiffView-ppTIzh2h.js.map +1 -1
  56. package/dist/{DropdownMenu-CgVwhDvl.js → DropdownMenu-gRM-A8qU.js} +3 -3
  57. package/dist/DropdownMenu-gRM-A8qU.js.map +1 -0
  58. package/dist/{FieldItem-DZGIdiXE.js → FieldItem-BHViBJS3.js} +12 -25
  59. package/dist/FieldItem-BHViBJS3.js.map +1 -0
  60. package/dist/{FieldItem-vhIJW4pj.d.ts → FieldItem-CPN1xjN5.d.ts} +11 -25
  61. package/dist/{FileUpload-DYQCTGjU.js → FileUpload-Ch2hrIWq.js} +11 -16
  62. package/dist/{FileUpload-DYQCTGjU.js.map → FileUpload-Ch2hrIWq.js.map} +1 -1
  63. package/dist/{Form-CcK7dRrC.js → Form-VkzfVPyT.js} +15 -23
  64. package/dist/{Form-CcK7dRrC.js.map → Form-VkzfVPyT.js.map} +1 -1
  65. package/dist/{FormGroup-DR_gZ25-.js → FormGroup-CmCppxOn.js} +11 -17
  66. package/dist/FormGroup-CmCppxOn.js.map +1 -0
  67. package/dist/{FullScreenModal-CN9nAs72.js → FullScreenModal-Cwnm8WdM.js} +15 -29
  68. package/dist/FullScreenModal-Cwnm8WdM.js.map +1 -0
  69. package/dist/{HoverCard-B9ZMJxjn.js → HoverCard-B8OKu9XZ.js} +2 -2
  70. package/dist/{HoverCard-B9ZMJxjn.js.map → HoverCard-B8OKu9XZ.js.map} +1 -1
  71. package/dist/{InputGroup-Do8K2hvD.js → InputGroup-CrlMRz4X.js} +11 -13
  72. package/dist/InputGroup-CrlMRz4X.js.map +1 -0
  73. package/dist/{Kbd-LCFMumoq.js → Kbd-J4n1J6i4.js} +23 -13
  74. package/dist/Kbd-J4n1J6i4.js.map +1 -0
  75. package/dist/{MarkedText-DNGEUVWc.js → MarkedText-DlmlJO0u.js} +2 -2
  76. package/dist/{MarkedText-DNGEUVWc.js.map → MarkedText-DlmlJO0u.js.map} +1 -1
  77. package/dist/{MermaidDiagram-ZG0iiDV_.js → MermaidDiagram-B30x2yV7.js} +16 -34
  78. package/dist/MermaidDiagram-B30x2yV7.js.map +1 -0
  79. package/dist/{Modal-I3VWk2oo.js → Modal-BkSuS9Yz.js} +17 -34
  80. package/dist/Modal-BkSuS9Yz.js.map +1 -0
  81. package/dist/{ModalTitle-CeLM_mX9.js → ModalTitle-BxopkIoQ.js} +3 -3
  82. package/dist/ModalTitle-BxopkIoQ.js.map +1 -0
  83. package/dist/{MultiActionButtonGroup-CYZ8IgSf.js → MultiActionButtonGroup-AWLj1Tg7.js} +3 -3
  84. package/dist/{MultiActionButtonGroup-CYZ8IgSf.js.map → MultiActionButtonGroup-AWLj1Tg7.js.map} +1 -1
  85. package/dist/{Navbar-Liy1TPI7.js → Navbar-B_DNpv5s.js} +9 -13
  86. package/dist/{Navbar-Liy1TPI7.js.map → Navbar-B_DNpv5s.js.map} +1 -1
  87. package/dist/{OtpInput-CbbymqYs.js → OtpInput-I8B8Vjdl.js} +2 -2
  88. package/dist/{OtpInput-CbbymqYs.js.map → OtpInput-I8B8Vjdl.js.map} +1 -1
  89. package/dist/{PageHeader-Q3IpCnQd.js → PageHeader-CgfyXpf1.js} +13 -26
  90. package/dist/PageHeader-CgfyXpf1.js.map +1 -0
  91. package/dist/{PageLayout-DSVM-ASz.js → PageLayout-DiAAILuS.js} +12 -20
  92. package/dist/PageLayout-DiAAILuS.js.map +1 -0
  93. package/dist/{PageToolbar-BKVJiDAL.js → PageToolbar-CIW0VmKe.js} +12 -42
  94. package/dist/PageToolbar-CIW0VmKe.js.map +1 -0
  95. package/dist/{Pagination-C_b7Xhey.js → Pagination-DH3f6LN0.js} +3 -3
  96. package/dist/{Pagination-C_b7Xhey.js.map → Pagination-DH3f6LN0.js.map} +1 -1
  97. package/dist/{Popconfirm-5pBzT_HQ.js → Popconfirm-Dhzn7sy6.js} +3 -3
  98. package/dist/{Popconfirm-5pBzT_HQ.js.map → Popconfirm-Dhzn7sy6.js.map} +1 -1
  99. package/dist/{Popover-BEbQrC_P.js → Popover-CEk915I1.js} +4 -3
  100. package/dist/Popover-CEk915I1.js.map +1 -0
  101. package/dist/{RadioGroup-Byc2mym4.js → RadioGroup-CBPRLRN0.js} +4 -4
  102. package/dist/{RadioGroup-Byc2mym4.js.map → RadioGroup-CBPRLRN0.js.map} +1 -1
  103. package/dist/{Search-Dhig_hPD.js → Search-DmkQo716.js} +3 -3
  104. package/dist/{Search-Dhig_hPD.js.map → Search-DmkQo716.js.map} +1 -1
  105. package/dist/{SearchInput-92r2bkA7.js → SearchInput-D3qMkHaW.js} +8 -13
  106. package/dist/SearchInput-D3qMkHaW.js.map +1 -0
  107. package/dist/{SectionNav-CNLJsiVG.js → SectionNav-TU5i3JeM.js} +10 -42
  108. package/dist/SectionNav-TU5i3JeM.js.map +1 -0
  109. package/dist/{Select-DV3Hak_l.js → Select-B4uK0QVm.js} +10 -12
  110. package/dist/Select-B4uK0QVm.js.map +1 -0
  111. package/dist/{Sheet-OparjIi-.js → Sheet-D0fAE14T.js} +5 -9
  112. package/dist/Sheet-D0fAE14T.js.map +1 -0
  113. package/dist/{Sidebar-CLEbBtNY.js → Sidebar-ZLMNIbg5.js} +16 -33
  114. package/dist/Sidebar-ZLMNIbg5.js.map +1 -0
  115. package/dist/{Slider-DLclvRws.js → Slider-B0ou9r0B.js} +3 -3
  116. package/dist/{Slider-DLclvRws.js.map → Slider-B0ou9r0B.js.map} +1 -1
  117. package/dist/{Stepper-C8sm9ZFM.js → Stepper-BLkLhfnd.js} +6 -9
  118. package/dist/{Stepper-C8sm9ZFM.js.map → Stepper-BLkLhfnd.js.map} +1 -1
  119. package/dist/{Switch-B0WdGSjz.js → Switch-DZvNePOm.js} +2 -2
  120. package/dist/{Switch-B0WdGSjz.js.map → Switch-DZvNePOm.js.map} +1 -1
  121. package/dist/{Table-CvYuTuNU.js → Table-BaVT5Tkn.js} +6 -11
  122. package/dist/{Table-CvYuTuNU.js.map → Table-BaVT5Tkn.js.map} +1 -1
  123. package/dist/{Tabs-eB974xJf.js → Tabs-CTDmye1N.js} +3 -3
  124. package/dist/{Tabs-eB974xJf.js.map → Tabs-CTDmye1N.js.map} +1 -1
  125. package/dist/{TextInput-CFTf4Cz1.js → TextInput-BWYXbfs4.js} +10 -14
  126. package/dist/TextInput-BWYXbfs4.js.map +1 -0
  127. package/dist/{ThemeProvider-DAmNn9Sd.js → ThemeProvider-VF38VfUa.js} +13 -31
  128. package/dist/ThemeProvider-VF38VfUa.js.map +1 -0
  129. package/dist/{TimePicker-BGeqc-Ed.js → TimePicker-CDGYrRxi.js} +2 -2
  130. package/dist/{TimePicker-BGeqc-Ed.js.map → TimePicker-CDGYrRxi.js.map} +1 -1
  131. package/dist/{Timeline-C8-wnRRr.js → Timeline-B-I6sb0M.js} +2 -2
  132. package/dist/{Timeline-C8-wnRRr.js.map → Timeline-B-I6sb0M.js.map} +1 -1
  133. package/dist/{Toast-Dr6Uw7ao.js → Toast-PfQf3vj-.js} +2 -2
  134. package/dist/{Toast-Dr6Uw7ao.js.map → Toast-PfQf3vj-.js.map} +1 -1
  135. package/dist/{Workbench-UR2FBC7I.js → Workbench-DmZzpkj7.js} +2 -2
  136. package/dist/{Workbench-UR2FBC7I.js.map → Workbench-DmZzpkj7.js.map} +1 -1
  137. package/dist/{ZoomableSvg-BZlk3PFJ.js → ZoomableSvg-C65nta_r.js} +5 -19
  138. package/dist/ZoomableSvg-C65nta_r.js.map +1 -0
  139. package/dist/charts.d.ts +21 -52
  140. package/dist/charts.js +13 -39
  141. package/dist/charts.js.map +1 -1
  142. package/dist/{context-D7X470dy.js → context-U293r3v-.js} +5 -9
  143. package/dist/context-U293r3v-.js.map +1 -0
  144. package/dist/editors.d.ts +27 -124
  145. package/dist/editors.js +29 -71
  146. package/dist/editors.js.map +1 -1
  147. package/dist/{findLiteralMatches-BGBw8Vbl.js → findLiteralMatches-DgGLzyG0.js} +8 -20
  148. package/dist/findLiteralMatches-DgGLzyG0.js.map +1 -0
  149. package/dist/flint.d.ts +3 -6
  150. package/dist/flint.js +31 -80
  151. package/dist/flint.js.map +1 -1
  152. package/dist/{icons-Cek151jC.js → icons-wcA70iQx.js} +105 -2
  153. package/dist/icons-wcA70iQx.js.map +1 -0
  154. package/dist/icons.d.ts +2 -2
  155. package/dist/icons.js +2 -2
  156. package/dist/{index-m-kQEWiY.d.ts → index-B7k-09i1.d.ts} +14 -2
  157. package/dist/index.d.ts +1180 -1867
  158. package/dist/index.js +69 -68
  159. package/dist/internal/blocks/AIKit.js +2 -2
  160. package/dist/internal/blocks/AppShell.js +1 -1
  161. package/dist/internal/blocks/AuthLayout.js +7 -27
  162. package/dist/internal/blocks/AuthLayout.js.map +1 -1
  163. package/dist/internal/blocks/AutoSaveTextarea.js +1 -1
  164. package/dist/internal/blocks/BrandEditor.js +1 -1
  165. package/dist/internal/blocks/ChartPanel.js +4 -8
  166. package/dist/internal/blocks/ChartPanel.js.map +1 -1
  167. package/dist/internal/blocks/ChipEditor.js +13 -21
  168. package/dist/internal/blocks/ChipEditor.js.map +1 -1
  169. package/dist/internal/blocks/ClipboardButton.js +1 -1
  170. package/dist/internal/blocks/ColorInput.js +1 -1
  171. package/dist/internal/blocks/ColorModeSwitch.js +1 -1
  172. package/dist/internal/blocks/Command.js +1 -1
  173. package/dist/internal/blocks/CopyField.js +1 -1
  174. package/dist/internal/blocks/DashboardHero.js +4 -7
  175. package/dist/internal/blocks/DashboardHero.js.map +1 -1
  176. package/dist/internal/blocks/DateInput.js +1 -1
  177. package/dist/internal/blocks/DateRangeInput.js +1 -1
  178. package/dist/internal/blocks/EmptyConfigurationActionCard.js +1 -1
  179. package/dist/internal/blocks/EmptyState.js +5 -9
  180. package/dist/internal/blocks/EmptyState.js.map +1 -1
  181. package/dist/internal/blocks/ErrorState.js +5 -9
  182. package/dist/internal/blocks/ErrorState.js.map +1 -1
  183. package/dist/internal/blocks/ExportMenu.js +6 -10
  184. package/dist/internal/blocks/ExportMenu.js.map +1 -1
  185. package/dist/internal/blocks/Form/connectors/ComboboxField.js +40 -0
  186. package/dist/internal/blocks/Form/connectors/ComboboxField.js.map +1 -0
  187. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +5 -22
  188. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js.map +1 -1
  189. package/dist/internal/blocks/Form.js +1 -1
  190. package/dist/internal/blocks/FormGroup.js +1 -1
  191. package/dist/internal/blocks/GoogleButton.js +1 -1
  192. package/dist/internal/blocks/MicrosoftButton.js +1 -1
  193. package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
  194. package/dist/internal/blocks/MultiCombobox.js +160 -154
  195. package/dist/internal/blocks/MultiCombobox.js.map +1 -1
  196. package/dist/internal/blocks/NumberInput.js +1 -1
  197. package/dist/internal/blocks/OtpInput.js +1 -1
  198. package/dist/internal/blocks/PageHeader.js +1 -1
  199. package/dist/internal/blocks/PageLayout.js +1 -1
  200. package/dist/internal/blocks/PageToolbar.js +1 -1
  201. package/dist/internal/blocks/PasswordInput.js +4 -4
  202. package/dist/internal/blocks/PasswordInput.js.map +1 -1
  203. package/dist/internal/blocks/SearchInput.js +1 -1
  204. package/dist/internal/blocks/SearchInputWithNavigation.js +4 -4
  205. package/dist/internal/blocks/SectionNav.js +1 -1
  206. package/dist/internal/blocks/SplitButton.js +3 -3
  207. package/dist/internal/blocks/StatCard.js +4 -8
  208. package/dist/internal/blocks/StatCard.js.map +1 -1
  209. package/dist/internal/blocks/TextInput.js +1 -1
  210. package/dist/internal/blocks/Textarea.js +2 -2
  211. package/dist/internal/blocks/TimeInput.js +5 -5
  212. package/dist/internal/blocks/TimeInput.js.map +1 -1
  213. package/dist/internal/components/Alert.js +1 -1
  214. package/dist/internal/components/AlertModal.js +1 -1
  215. package/dist/internal/components/Avatar.js +1 -1
  216. package/dist/internal/components/Badge.js +1 -1
  217. package/dist/internal/components/BrandLogo.js +1 -1
  218. package/dist/internal/components/Breadcrumb.js +1 -1
  219. package/dist/internal/components/Button.js +1 -1
  220. package/dist/internal/components/ButtonGroup.js.map +1 -1
  221. package/dist/internal/components/Calendar.js +1 -1
  222. package/dist/internal/components/Card.js +1 -1
  223. package/dist/internal/components/Checkbox.js +1 -1
  224. package/dist/internal/components/Clipboard.js +1 -1
  225. package/dist/internal/components/CollapsiblePanel.js +3 -3
  226. package/dist/internal/components/CollapsiblePanel.js.map +1 -1
  227. package/dist/internal/components/Combobox.js +2 -2
  228. package/dist/internal/components/DatePicker.js +1 -1
  229. package/dist/internal/components/DateRangePicker.js +1 -1
  230. package/dist/internal/components/DropdownMenu.js +1 -1
  231. package/dist/internal/components/FileUpload.js +1 -1
  232. package/dist/internal/components/FullScreenModal.js +1 -1
  233. package/dist/internal/components/HoverCard.js +1 -1
  234. package/dist/internal/components/InputGroup.js +1 -1
  235. package/dist/internal/components/Kbd.js +1 -1
  236. package/dist/internal/components/MarkedText.js +1 -1
  237. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +1 -1
  238. package/dist/internal/components/Modal.js +1 -1
  239. package/dist/internal/components/Navbar.js +1 -1
  240. package/dist/internal/components/Pagination.js +1 -1
  241. package/dist/internal/components/PanelWithDetails.js +1 -1
  242. package/dist/internal/components/Popconfirm.js +1 -1
  243. package/dist/internal/components/Popover.js +1 -1
  244. package/dist/internal/components/RadioGroup.js +1 -1
  245. package/dist/internal/components/Search.js +1 -1
  246. package/dist/internal/components/Select.js +1 -1
  247. package/dist/internal/components/Separator.js.map +1 -1
  248. package/dist/internal/components/Sheet.js +1 -1
  249. package/dist/internal/components/Sidebar.js +1 -1
  250. package/dist/internal/components/Skeleton/Skeleton.js +5 -9
  251. package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
  252. package/dist/internal/components/Slider.js +1 -1
  253. package/dist/internal/components/SpotlightBackdrop.js +3 -8
  254. package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
  255. package/dist/internal/components/Stepper.js +1 -1
  256. package/dist/internal/components/Switch.js +1 -1
  257. package/dist/internal/components/Table.js +1 -1
  258. package/dist/internal/components/Tabs.js +1 -1
  259. package/dist/internal/components/ThemeProvider.js +3 -3
  260. package/dist/internal/components/TimePicker.js +1 -1
  261. package/dist/internal/components/Timeline.js +1 -1
  262. package/dist/internal/components/Toast.js +2 -2
  263. package/dist/internal/components/Tooltip.js +1 -1
  264. package/dist/internal/components/Truncated.js +4 -8
  265. package/dist/internal/components/Truncated.js.map +1 -1
  266. package/dist/internal/components/Workbench.js +1 -1
  267. package/dist/internal/components/ZoomableSvg.js +1 -1
  268. package/dist/internal/hooks/useScrollbarPosition.js +1 -1
  269. package/dist/internal/hooks/useStableCallback.js +4 -13
  270. package/dist/internal/hooks/useStableCallback.js.map +1 -1
  271. package/dist/internal/utils/accessibleName.js +11 -0
  272. package/dist/internal/utils/accessibleName.js.map +1 -0
  273. package/dist/internal/utils.js +2 -2
  274. package/dist/markdown-editor.d.ts +15 -37
  275. package/dist/markdown-editor.js +17 -23
  276. package/dist/markdown-editor.js.map +1 -1
  277. package/dist/mermaid.d.ts +4 -6
  278. package/dist/mermaid.js +1 -1
  279. package/dist/rjsf.d.ts +9 -19
  280. package/dist/rjsf.js +44 -84
  281. package/dist/rjsf.js.map +1 -1
  282. package/dist/{styles-BAFscjSV.js → styles-gzcjOyKv.js} +6 -6
  283. package/dist/styles-gzcjOyKv.js.map +1 -0
  284. package/dist/styles.css +1 -1
  285. package/dist/svgTransforms-Dw2hRA-i.js +51 -0
  286. package/dist/svgTransforms-Dw2hRA-i.js.map +1 -0
  287. package/dist/testing.d.ts +3 -10
  288. package/dist/testing.js +7 -15
  289. package/dist/testing.js.map +1 -1
  290. package/dist/themeTokens-7DEab0kp.js +31 -0
  291. package/dist/themeTokens-7DEab0kp.js.map +1 -0
  292. package/dist/{toast-DIC0iNRf.js → toast-CyXEdaCZ.js} +3 -3
  293. package/dist/toast-CyXEdaCZ.js.map +1 -0
  294. package/dist/{themeScopeContext-D7fSyb06.js → useColorSchemeState-Cw4MCXUs.js} +14 -14
  295. package/dist/useColorSchemeState-Cw4MCXUs.js.map +1 -0
  296. package/dist/{useControllableState-M6494mCT.js → useControllableState-CUYXMsfz.js} +3 -7
  297. package/dist/useControllableState-CUYXMsfz.js.map +1 -0
  298. package/dist/useElement-D-RjrGa4.js +21 -0
  299. package/dist/useElement-D-RjrGa4.js.map +1 -0
  300. package/dist/useThemeAttributes-B199Regy.js +67 -0
  301. package/dist/useThemeAttributes-B199Regy.js.map +1 -0
  302. package/dist/{utils-BW4AE8VP.js → utils-Bd28bWgm.js} +31 -26
  303. package/dist/utils-Bd28bWgm.js.map +1 -0
  304. package/dist/vega.d.ts +8 -30
  305. package/dist/vega.js +5 -13
  306. package/dist/vega.js.map +1 -1
  307. package/dist/{vegaTheme-CSvFEMBl.js → vegaTheme-VQMWTlBw.js} +7 -21
  308. package/dist/vegaTheme-VQMWTlBw.js.map +1 -0
  309. package/package.json +28 -27
  310. package/src/styles.css +120 -14
  311. package/src/theme.css +130 -5
  312. package/dist/AIKit-ELIsegJz.js.map +0 -1
  313. package/dist/Alert-BsIM_oFK.js.map +0 -1
  314. package/dist/AlertModal-BGJdaRRj.js.map +0 -1
  315. package/dist/AppShell-DRgJxpXW.js.map +0 -1
  316. package/dist/Badge-o5jURtpB.js.map +0 -1
  317. package/dist/BrandLogo-CoKBk4MI.js.map +0 -1
  318. package/dist/Breadcrumb-xqEUxfwn.js.map +0 -1
  319. package/dist/Button-DsRrU5F1.js.map +0 -1
  320. package/dist/Calendar-cG5NIJ4O.js.map +0 -1
  321. package/dist/Card-Dyo7055Q.js.map +0 -1
  322. package/dist/Checkbox-Dq5fPNrO.js.map +0 -1
  323. package/dist/CodeEditor-BJKJXA0c.js.map +0 -1
  324. package/dist/ColorInput-Bj3dfPFA.js.map +0 -1
  325. package/dist/ColorModeSwitch-CWt-DZGC.js.map +0 -1
  326. package/dist/Combobox-D8PrEqTG.js +0 -619
  327. package/dist/Combobox-D8PrEqTG.js.map +0 -1
  328. package/dist/DateRangeInput-7M9Z4cVO.js.map +0 -1
  329. package/dist/DateRangePicker-DjSUFjh4.js.map +0 -1
  330. package/dist/DropdownMenu-CgVwhDvl.js.map +0 -1
  331. package/dist/FieldItem-DZGIdiXE.js.map +0 -1
  332. package/dist/FormGroup-DR_gZ25-.js.map +0 -1
  333. package/dist/FullScreenModal-CN9nAs72.js.map +0 -1
  334. package/dist/InputGroup-Do8K2hvD.js.map +0 -1
  335. package/dist/Kbd-LCFMumoq.js.map +0 -1
  336. package/dist/MermaidDiagram-ZG0iiDV_.js.map +0 -1
  337. package/dist/Modal-I3VWk2oo.js.map +0 -1
  338. package/dist/ModalTitle-CeLM_mX9.js.map +0 -1
  339. package/dist/PageHeader-Q3IpCnQd.js.map +0 -1
  340. package/dist/PageLayout-DSVM-ASz.js.map +0 -1
  341. package/dist/PageToolbar-BKVJiDAL.js.map +0 -1
  342. package/dist/Popover-BEbQrC_P.js.map +0 -1
  343. package/dist/SearchInput-92r2bkA7.js.map +0 -1
  344. package/dist/SectionNav-CNLJsiVG.js.map +0 -1
  345. package/dist/Select-DV3Hak_l.js.map +0 -1
  346. package/dist/Sheet-OparjIi-.js.map +0 -1
  347. package/dist/Sidebar-CLEbBtNY.js.map +0 -1
  348. package/dist/TextInput-CFTf4Cz1.js.map +0 -1
  349. package/dist/ThemeProvider-DAmNn9Sd.js.map +0 -1
  350. package/dist/ZoomableSvg-BZlk3PFJ.js.map +0 -1
  351. package/dist/context-D7X470dy.js.map +0 -1
  352. package/dist/findLiteralMatches-BGBw8Vbl.js.map +0 -1
  353. package/dist/icons-Cek151jC.js.map +0 -1
  354. package/dist/internal/components/StatusDot.js +0 -67
  355. package/dist/internal/components/StatusDot.js.map +0 -1
  356. package/dist/styles-BAFscjSV.js.map +0 -1
  357. package/dist/svgTransforms-CJAYPk7o.js +0 -81
  358. package/dist/svgTransforms-CJAYPk7o.js.map +0 -1
  359. package/dist/themeScopeContext-D7fSyb06.js.map +0 -1
  360. package/dist/themeTokens-qP1-55O7.js +0 -119
  361. package/dist/themeTokens-qP1-55O7.js.map +0 -1
  362. package/dist/toast-DIC0iNRf.js.map +0 -1
  363. package/dist/useControllableState-M6494mCT.js.map +0 -1
  364. package/dist/useElement-BK3AAiIf.js +0 -24
  365. package/dist/useElement-BK3AAiIf.js.map +0 -1
  366. package/dist/utils-BW4AE8VP.js.map +0 -1
  367. package/dist/vegaTheme-CSvFEMBl.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Search-Dhig_hPD.js","names":["SearchIcon"],"sources":["../src/components/Search/ClearButton.tsx","../src/components/Search/styles.ts","../src/components/Search/utils.ts","../src/components/Search/Search.tsx","../src/components/Search/SearchForm.tsx"],"sourcesContent":["import type { MouseEventHandler } from 'react';\n\nimport { X } from '../../icons';\nimport { cn } from '../../utils';\n\ntype Props = {\n onClick: MouseEventHandler<HTMLButtonElement>;\n testId?: string;\n};\n\nexport const ClearButton = ({ onClick, testId }: Props) => {\n // Prevent default, as we do not want to lose input focus.\n const handleMouseDown: MouseEventHandler<HTMLButtonElement> = (event) => {\n event.preventDefault();\n };\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n tabIndex={-1} // clear button should not be focusable\n onMouseDown={handleMouseDown}\n className={cn(\n // reset\n 'tw:border-none',\n 'tw:bg-transparent',\n 'tw:p-0',\n\n // positioning\n 'tw:flex',\n 'tw:items-center',\n\n 'tw:cursor-pointer',\n 'tw:text-muted-foreground',\n 'tw:hover:text-foreground',\n )}\n data-testid={testId}\n >\n <X className=\"tw:size-4\" />\n </button>\n );\n};\n","import { cva } from 'class-variance-authority';\n\nexport const searchWrapperVariants = cva(\n [\n // positioning\n 'tw:flex',\n 'tw:items-center',\n 'tw:gap-2.5',\n\n // base\n 'tw:text-card-foreground',\n 'tw:transition-all',\n 'tw:font-sans',\n\n // readonly — `secondary` over `muted`, which is too close to the `card` fill to\n // read as non-editable in either scheme\n 'tw:has-[input[readonly]]:bg-secondary',\n 'tw:has-[input[readonly]]:focus-within:ring-0',\n 'tw:has-[input[readonly]]:outline-0',\n\n // disabled\n 'tw:disabled:opacity-40',\n\n // default input padding (was sizing.default)\n 'tw:[&>input]:py-[15px]',\n ],\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: [\n 'tw:rounded-lg',\n 'tw:px-5',\n 'tw:bg-card',\n 'tw:shadow-raised',\n // outline\n 'tw:outline',\n 'tw:outline-1',\n 'tw:outline-transparent',\n // focus\n 'tw:has-[input:focus]:outline-1',\n 'tw:has-[input:focus]:ring-4',\n 'tw:has-[input:focus]:outline-ring',\n 'tw:has-[input:focus]:ring-ring/30',\n ],\n ai: [\n 'tailwindcss-preflight',\n 'tw:relative',\n 'tw:rounded-card',\n 'tw:px-4',\n 'tw:cursor-text',\n 'tw:border-2',\n 'tw:border-transparent',\n 'tw:bg-gradient-to-br',\n 'tw:from-secondary-600',\n 'tw:to-purple-600',\n 'tw:bg-origin-border',\n // Floods the interior so the gradient shows only in the 2px border box.\n 'tw:shadow-[inset_0_100vw_rgb(var(--card))]',\n // focus\n 'tw:has-[input:focus]:ring-4',\n 'tw:has-[input:focus]:ring-ring/30',\n ],\n },\n },\n },\n);\n\nexport const searchInputClassnames = [\n // reset\n 'tw:border-none',\n 'tw:bg-transparent',\n 'tw:outline-hidden',\n 'tw:w-full',\n 'tw:p-0',\n\n // base\n 'tw:text-base',\n 'tw:leading-6',\n 'tw:font-normal',\n 'tw:font-sans',\n\n // placeholder\n 'tw:placeholder:text-muted-foreground',\n\n // disabled\n 'tw:disabled:cursor-not-allowed',\n].join(' ');\n","import { createPrefixedString } from '../../utils';\n\nexport const genSearchTestId = (prefix: string = '') => {\n const ps = createPrefixedString(prefix);\n return {\n toString: () => prefix,\n wrapper: ps`search-wrapper`,\n input: ps`search-input`,\n clearButton: ps`search-clear-button`,\n };\n};\n","import { useEffect, useMemo, useState } from 'react';\nimport type {\n ChangeEvent,\n ChangeEventHandler,\n ComponentProps,\n FocusEvent,\n FocusEventHandler,\n MouseEvent,\n MouseEventHandler,\n ReactNode,\n} from 'react';\n\nimport { Search as SearchIcon, Sparkles } from '../../icons';\nimport { cn, debounce, noop } from '../../utils';\n\nimport { ClearButton } from './ClearButton';\nimport { searchInputClassnames, searchWrapperVariants } from './styles';\nimport { genSearchTestId } from './utils';\n\ntype SearchChangeEventHandler = (\n value: string,\n event: ChangeEvent<HTMLInputElement> | MouseEvent<HTMLButtonElement>,\n) => void;\n\ntype SearchBlurEventHandler = (value: string, event: FocusEvent<HTMLInputElement, Element>) => void;\n\ntype Props = {\n suffix?: ReactNode;\n disableDebounce?: boolean;\n debounceDelay?: number;\n onChange?: SearchChangeEventHandler;\n onBlur?: SearchBlurEventHandler;\n value?: string | null;\n defaultValue?: string | null;\n testId?: string;\n onClear?: () => void;\n variant?: 'default' | 'ai';\n} & Omit<\n ComponentProps<'input'>,\n 'type' | 'onBlur' | 'onChange' | 'value' | 'defaultValue' | 'prefix' | 'suffix'\n>;\n\n/**\n * @deprecated Use `SearchInput` instead. `Search` is kept only for the legacy (non-sidebar) layout.\n */\nexport const Search = ({\n ref,\n suffix,\n className,\n onBlur,\n onChange = noop,\n disabled = false,\n readOnly = false,\n disableDebounce = false,\n debounceDelay = 300,\n value: externalValue,\n defaultValue,\n testId: prefixTestId = '',\n placeholder = 'Search',\n onClear,\n variant = 'default',\n ...rest\n}: Props) => {\n const [internalValue, setInternalValue] = useState(() =>\n externalValue != null ? externalValue : defaultValue,\n );\n const hasValue = internalValue !== '';\n\n const isClearButtonVisible = hasValue && !disabled && !readOnly;\n const testId = genSearchTestId(prefixTestId);\n\n const debouncedOnChange = useMemo(\n () => (disableDebounce ? onChange : debounce(onChange, debounceDelay)),\n [disableDebounce, debounceDelay, onChange],\n );\n\n useEffect(() => {\n if (externalValue == null) return; // uncontrolled state\n // oxlint-disable-next-line react-x/set-state-in-effect\n setInternalValue(externalValue);\n }, [externalValue]);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const currentValue = event.target.value;\n setInternalValue(currentValue);\n debouncedOnChange(currentValue, event);\n };\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n const currentValue = event.target.value;\n setInternalValue(currentValue);\n onBlur?.(currentValue, event);\n };\n\n const handleClear: MouseEventHandler<HTMLButtonElement> = (event) => {\n setInternalValue('');\n onChange?.('', event);\n onClear?.();\n };\n\n // Clicking anywhere in the field that isn't an interactive control (the leading icon,\n // the empty chrome) focuses the input — the whole pill acts as one click target.\n const handleWrapperMouseDown: MouseEventHandler<HTMLDivElement> = (event) => {\n if (disabled || readOnly) return;\n if ((event.target as HTMLElement).closest('button, a, input, textarea, [role=\"button\"]')) {\n return;\n }\n event.preventDefault();\n event.currentTarget.querySelector('input')?.focus();\n };\n\n return (\n // Mouse-only convenience: clicking the chrome focuses the input. The input itself is the\n // real interactive/focusable target, so no extra role or key handler is needed here.\n // oxlint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={cn(\n searchWrapperVariants({ variant }),\n {\n 'tw:cursor-not-allowed tw:opacity-40': disabled,\n },\n className,\n )}\n data-testid={testId.wrapper}\n onMouseDown={handleWrapperMouseDown}\n >\n {variant === 'ai' ? (\n <Sparkles className=\"tw:size-4 tw:shrink-0 tw:[&_*]:stroke-aigradient-600\" />\n ) : (\n <SearchIcon className=\"tw:size-4 tw:shrink-0 tw:text-neutral-400\" />\n )}\n\n <input\n {...rest}\n ref={ref}\n placeholder={placeholder}\n data-testid={testId.input}\n type=\"text\"\n value={internalValue ?? ''}\n onChange={handleChange}\n onBlur={handleBlur}\n className={searchInputClassnames}\n disabled={disabled}\n readOnly={readOnly}\n />\n\n {isClearButtonVisible && <ClearButton onClick={handleClear} testId={testId.clearButton} />}\n\n {suffix}\n </div>\n );\n};\n","import type { ComponentProps, FormEventHandler } from 'react';\n\nimport { Search } from './Search';\n\ntype Props = {\n onSubmit: (value: string) => void;\n} & Omit<ComponentProps<typeof Search>, 'onClear' | 'onBlur' | 'onSubmit'>;\n\nexport const SearchForm = ({ ref, onSubmit, name = 'search-field', ...props }: Props) => {\n const handleSubmit: FormEventHandler<HTMLFormElement> = (event) => {\n event.preventDefault();\n const searchEl = event.currentTarget.elements.namedItem(name) as HTMLInputElement;\n onSubmit(searchEl.value);\n };\n\n const onClear = () => {\n onSubmit('');\n };\n\n return (\n <form onSubmit={handleSubmit}>\n <Search\n {...props}\n ref={ref}\n onClear={onClear}\n name={name}\n // Debounce has no meaning when we use submit, which is triggered by pressing enter.\n disableDebounce\n />\n </form>\n );\n};\n"],"mappings":";;;;;;;AAUA,MAAa,eAAe,EAAE,SAAS,aAAoB;CAEzD,MAAM,mBAAyD,UAAU;EACvE,MAAM,eAAe;CACvB;CAEA,OACE,oBAAC,UAAD;EACE,MAAK;EACI;EACT,UAAU;EACV,aAAa;EACb,WAAW,GAET,kBACA,qBACA,UAGA,WACA,mBAEA,qBACA,4BACA,0BACF;EACA,eAAa;EAEb,UAAA,oBAAC,GAAD,EAAG,WAAU,YAAa,CAAA;CACpB,CAAA;AAEZ;;;ACvCA,MAAa,wBAAwB,IACnC;CAEE;CACA;CACA;CAGA;CACA;CACA;CAIA;CACA;CACA;CAGA;CAGA;AACF,GACA;CACE,iBAAiB,EACf,SAAS,UACX;CACA,UAAU,EACR,SAAS;EACP,SAAS;GACP;GACA;GACA;GACA;GAEA;GACA;GACA;GAEA;GACA;GACA;GACA;EACF;EACA,IAAI;GACF;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAEA;GAEA;GACA;EACF;CACF,EACF;AACF,CACF;AAEA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cAAc,OAAO,CAAC,EAAE,MAAM;CACpD;CAEA,OAIE,qBAAC,OAAD;EACE,WAAW,GACT,sBAAsB,EAAE,QAAQ,CAAC,GACjC,EACE,uCAAuC,SACzC,GACA,SACF;EACA,eAAa,OAAO;EACpB,aAAa;EATf,UAAA;GAWG,YAAY,OACX,oBAAC,UAAD,EAAU,WAAU,uDAAwD,CAAA,IAE5E,oBAACA,UAAD,EAAY,WAAU,4CAA6C,CAAA;GAGrE,oBAAC,SAAD;IACE,GAAI;IACC;IACQ;IACb,eAAa,OAAO;IACpB,MAAK;IACL,OAAO,iBAAiB;IACxB,UAAU;IACV,QAAQ;IACR,WAAW;IACD;IACA;GACX,CAAA;GAEA,wBAAwB,oBAAC,aAAD;IAAa,SAAS;IAAa,QAAQ,OAAO;GAAc,CAAA;GAExF;EACE;;AAET;;;AC/IA,MAAa,cAAc,EAAE,KAAK,UAAU,OAAO,gBAAgB,GAAG,YAAmB;CACvF,MAAM,gBAAmD,UAAU;EACjE,MAAM,eAAe;EAErB,SADiB,MAAM,cAAc,SAAS,UAAU,IACxC,CAAC,CAAC,KAAK;CACzB;CAEA,MAAM,gBAAgB;EACpB,SAAS,EAAE;CACb;CAEA,OACE,oBAAC,QAAD;EAAM,UAAU;EACd,UAAA,oBAAC,QAAD;GACE,GAAI;GACC;GACI;GACH;GAEN,iBAAA;EACD,CAAA;CACG,CAAA;AAEV"}
1
+ {"version":3,"file":"Search-DmkQo716.js","names":["SearchIcon"],"sources":["../src/components/Search/ClearButton.tsx","../src/components/Search/styles.ts","../src/components/Search/utils.ts","../src/components/Search/Search.tsx","../src/components/Search/SearchForm.tsx"],"sourcesContent":["import type { MouseEventHandler } from 'react';\n\nimport { X } from '../../icons';\nimport { cn } from '../../utils';\n\ntype Props = {\n onClick: MouseEventHandler<HTMLButtonElement>;\n testId?: string;\n};\n\nexport const ClearButton = ({ onClick, testId }: Props) => {\n // Prevent default, as we do not want to lose input focus.\n const handleMouseDown: MouseEventHandler<HTMLButtonElement> = (event) => {\n event.preventDefault();\n };\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n tabIndex={-1} // clear button should not be focusable\n onMouseDown={handleMouseDown}\n className={cn(\n // reset\n 'tw:border-none',\n 'tw:bg-transparent',\n 'tw:p-0',\n\n // positioning\n 'tw:flex',\n 'tw:items-center',\n\n 'tw:cursor-pointer',\n 'tw:text-muted-foreground',\n 'tw:hover:text-foreground',\n )}\n data-testid={testId}\n >\n <X className=\"tw:size-4\" />\n </button>\n );\n};\n","import { cva } from 'class-variance-authority';\n\nexport const searchWrapperVariants = cva(\n [\n // positioning\n 'tw:flex',\n 'tw:items-center',\n 'tw:gap-2.5',\n\n // base\n 'tw:text-card-foreground',\n 'tw:transition-all',\n 'tw:font-sans',\n\n // readonly — `secondary` over `muted`, which is too close to the `card` fill to\n // read as non-editable in either scheme\n 'tw:has-[input[readonly]]:bg-secondary',\n 'tw:has-[input[readonly]]:focus-within:ring-0',\n 'tw:has-[input[readonly]]:outline-0',\n\n // disabled\n 'tw:disabled:opacity-40',\n\n // default input padding (was sizing.default)\n 'tw:[&>input]:py-[15px]',\n ],\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: [\n 'tw:rounded-lg',\n 'tw:px-5',\n 'tw:bg-card',\n 'tw:shadow-raised',\n // outline\n 'tw:outline',\n 'tw:outline-1',\n 'tw:outline-transparent',\n // focus\n 'tw:has-[input:focus]:outline-1',\n 'tw:has-[input:focus]:ring-4',\n 'tw:has-[input:focus]:outline-ring',\n 'tw:has-[input:focus]:ring-ring/30',\n ],\n ai: [\n 'tailwindcss-preflight',\n 'tw:relative',\n 'tw:rounded-card',\n 'tw:px-4',\n 'tw:cursor-text',\n 'tw:border-2',\n 'tw:border-transparent',\n 'tw:bg-gradient-to-br',\n 'tw:from-secondary-600',\n 'tw:to-purple-600',\n 'tw:bg-origin-border',\n // Floods the interior so the gradient shows only in the 2px border box.\n 'tw:shadow-[inset_0_100vw_rgb(var(--card))]',\n // focus\n 'tw:has-[input:focus]:ring-4',\n 'tw:has-[input:focus]:ring-ring/30',\n ],\n },\n },\n },\n);\n\nexport const searchInputClassnames = [\n // reset\n 'tw:border-none',\n 'tw:bg-transparent',\n 'tw:outline-hidden',\n 'tw:w-full',\n 'tw:p-0',\n\n // base\n 'tw:text-base',\n 'tw:leading-6',\n 'tw:font-normal',\n 'tw:font-sans',\n\n // placeholder\n 'tw:placeholder:text-muted-foreground',\n\n // disabled\n 'tw:disabled:cursor-not-allowed',\n].join(' ');\n","import { createPrefixedString } from '../../utils';\n\nexport const genSearchTestId = (prefix: string = '') => {\n const ps = createPrefixedString(prefix);\n return {\n toString: () => prefix,\n wrapper: ps`search-wrapper`,\n input: ps`search-input`,\n clearButton: ps`search-clear-button`,\n };\n};\n","import { useEffect, useMemo, useState } from 'react';\nimport type {\n ChangeEvent,\n ChangeEventHandler,\n ComponentProps,\n FocusEvent,\n FocusEventHandler,\n MouseEvent,\n MouseEventHandler,\n ReactNode,\n} from 'react';\n\nimport { Search as SearchIcon, Sparkles } from '../../icons';\nimport { cn, debounce, noop } from '../../utils';\n\nimport { ClearButton } from './ClearButton';\nimport { searchInputClassnames, searchWrapperVariants } from './styles';\nimport { genSearchTestId } from './utils';\n\ntype SearchChangeEventHandler = (\n value: string,\n event: ChangeEvent<HTMLInputElement> | MouseEvent<HTMLButtonElement>,\n) => void;\n\ntype SearchBlurEventHandler = (value: string, event: FocusEvent<HTMLInputElement, Element>) => void;\n\ntype Props = {\n suffix?: ReactNode;\n disableDebounce?: boolean;\n debounceDelay?: number;\n onChange?: SearchChangeEventHandler;\n onBlur?: SearchBlurEventHandler;\n value?: string | null;\n defaultValue?: string | null;\n testId?: string;\n onClear?: () => void;\n variant?: 'default' | 'ai';\n} & Omit<\n ComponentProps<'input'>,\n 'type' | 'onBlur' | 'onChange' | 'value' | 'defaultValue' | 'prefix' | 'suffix'\n>;\n\n/**\n * @deprecated Use `SearchInput` instead. `Search` is kept only for the legacy (non-sidebar) layout.\n */\nexport const Search = ({\n ref,\n suffix,\n className,\n onBlur,\n onChange = noop,\n disabled = false,\n readOnly = false,\n disableDebounce = false,\n debounceDelay = 300,\n value: externalValue,\n defaultValue,\n testId: prefixTestId = '',\n placeholder = 'Search',\n onClear,\n variant = 'default',\n ...rest\n}: Props) => {\n const [internalValue, setInternalValue] = useState(() =>\n externalValue != null ? externalValue : defaultValue,\n );\n const hasValue = internalValue !== '';\n\n const isClearButtonVisible = hasValue && !disabled && !readOnly;\n const testId = genSearchTestId(prefixTestId);\n\n const debouncedOnChange = useMemo(\n () => (disableDebounce ? onChange : debounce(onChange, debounceDelay)),\n [disableDebounce, debounceDelay, onChange],\n );\n\n useEffect(() => {\n if (externalValue == null) return; // uncontrolled state\n // oxlint-disable-next-line react-x/set-state-in-effect\n setInternalValue(externalValue);\n }, [externalValue]);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const currentValue = event.target.value;\n setInternalValue(currentValue);\n debouncedOnChange(currentValue, event);\n };\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n const currentValue = event.target.value;\n setInternalValue(currentValue);\n onBlur?.(currentValue, event);\n };\n\n const handleClear: MouseEventHandler<HTMLButtonElement> = (event) => {\n setInternalValue('');\n onChange?.('', event);\n onClear?.();\n };\n\n // Clicking anywhere in the field that isn't an interactive control (the leading icon,\n // the empty chrome) focuses the input — the whole pill acts as one click target.\n const handleWrapperMouseDown: MouseEventHandler<HTMLDivElement> = (event) => {\n if (disabled || readOnly) return;\n if ((event.target as HTMLElement).closest('button, a, input, textarea, [role=\"button\"]')) {\n return;\n }\n event.preventDefault();\n event.currentTarget.querySelector('input')?.focus();\n };\n\n return (\n // Mouse-only convenience: clicking the chrome focuses the input. The input itself is the\n // real interactive/focusable target, so no extra role or key handler is needed here.\n // oxlint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n className={cn(\n searchWrapperVariants({ variant }),\n {\n 'tw:cursor-not-allowed tw:opacity-40': disabled,\n },\n className,\n )}\n data-testid={testId.wrapper}\n onMouseDown={handleWrapperMouseDown}\n >\n {variant === 'ai' ? (\n <Sparkles className=\"tw:size-4 tw:shrink-0 tw:[&_*]:stroke-aigradient-600\" />\n ) : (\n <SearchIcon className=\"tw:size-4 tw:shrink-0 tw:text-neutral-400\" />\n )}\n\n <input\n {...rest}\n ref={ref}\n placeholder={placeholder}\n data-testid={testId.input}\n type=\"text\"\n value={internalValue ?? ''}\n onChange={handleChange}\n onBlur={handleBlur}\n className={searchInputClassnames}\n disabled={disabled}\n readOnly={readOnly}\n />\n\n {isClearButtonVisible && <ClearButton onClick={handleClear} testId={testId.clearButton} />}\n\n {suffix}\n </div>\n );\n};\n","import type { ComponentProps, FormEventHandler } from 'react';\n\nimport { Search } from './Search';\n\ntype Props = {\n onSubmit: (value: string) => void;\n} & Omit<ComponentProps<typeof Search>, 'onClear' | 'onBlur' | 'onSubmit'>;\n\nexport const SearchForm = ({ ref, onSubmit, name = 'search-field', ...props }: Props) => {\n const handleSubmit: FormEventHandler<HTMLFormElement> = (event) => {\n event.preventDefault();\n const searchEl = event.currentTarget.elements.namedItem(name) as HTMLInputElement;\n onSubmit(searchEl.value);\n };\n\n const onClear = () => {\n onSubmit('');\n };\n\n return (\n <form onSubmit={handleSubmit}>\n <Search\n {...props}\n ref={ref}\n onClear={onClear}\n name={name}\n // Debounce has no meaning when we use submit, which is triggered by pressing enter.\n disableDebounce\n />\n </form>\n );\n};\n"],"mappings":";;;;;;;AAUA,MAAa,eAAe,EAAE,SAAS,aAAoB;CAEzD,MAAM,mBAAyD,UAAU;EACvE,MAAM,eAAe;CACvB;CAEA,OACE,oBAAC,UAAD;EACE,MAAK;EACI;EACT,UAAU;EACV,aAAa;EACb,WAAW,GAET,kBACA,qBACA,UAGA,WACA,mBAEA,qBACA,4BACA,0BACF;EACA,eAAa;EAEb,UAAA,oBAAC,GAAD,EAAG,WAAU,YAAa,CAAA;CACpB,CAAA;AAEZ;;;ACvCA,MAAa,wBAAwB,IACnC;C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icons-Cek151jC.js";
3
- import { InputGroup } from "./InputGroup-Do8K2hvD.js";
1
+ import { debounce } from "./utils-Bd28bWgm.js";
2
+ import { Search, X } from "./icons-wcA70iQx.js";
3
+ import { InputGroup } from "./InputGroup-CrlMRz4X.js";
4
4
  import { useEffect, useMemo, useRef, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/blocks/SearchInput/SearchInput.tsx
7
7
  /**
8
- * Debounced search input with a leading magnifying-glass icon and optional clear button.
8
+ * Debounced search input with a search icon and optional clear button.
9
9
  *
10
- * **When to use:** the search field inside `PageToolbar.Search`, list / table search, combobox-less
11
- * free-text filters. `onValueChange` is debounced so callers can wire it directly to fetches without
12
- * `useMemo` plumbing.
13
- * **When NOT to use:** for a plain string input use `TextInput`; for selecting from a known enumerated
14
- * list use `Combobox` (which has its own search built in).
15
- * **Composition:** typically rendered in `PageToolbar.Search` next to `MultiCombobox` filter pills. Use
16
- * `allowClear` for the canonical x-to-reset affordance.
10
+ * - Use for list / table search and free-text filters, e.g. in `PageToolbar.Search`.
11
+ * - Not for plain text (`TextInput`) or picking from a known list (`Combobox`).
17
12
  *
18
- * @see RECIPES.md#filter-toolbar — for the search + filter chips toolbar pattern
13
+ * @see RECIPES.md#filter-toolbar
19
14
  */
20
15
  const SearchInput = ({ ref, state, variant, focusVariant, sizing, className, value: valueProp, defaultValue, onValueChange, onValueBlur, onChange, onBlur, onClear, allowClear = false, disableDebounce = false, debounceDelay = 300, disabled, readOnly, ...restInputProps }) => {
21
16
  const [internalValue, setInternalValue] = useState(valueProp != null ? valueProp : defaultValue ?? "");
@@ -99,4 +94,4 @@ const SearchInput = ({ ref, state, variant, focusVariant, sizing, className, val
99
94
  //#endregion
100
95
  export { SearchInput };
101
96
 
102
- //# sourceMappingURL=SearchInput-92r2bkA7.js.map
97
+ //# sourceMappingURL=SearchInput-D3qMkHaW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchInput-D3qMkHaW.js","names":[],"sources":["../src/blocks/SearchInput/SearchInput.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport type { ChangeEventHandler, ComponentProps, FocusEventHandler } from 'react';\n\nimport { InputGroup } from '../../components/InputGroup';\nimport { Search, X } from '../../icons';\nimport { debounce } from '../../utils';\n\ntype InputGroupProps = Pick<\n ComponentProps<typeof InputGroup>,\n 'variant' | 'focusVariant' | 'state' | 'sizing'\n>;\n\ntype InputGroupInputProps = Omit<ComponentProps<typeof InputGroup.Input>, 'value' | 'defaultValue'>;\n\n/**\n * - `onValueChange` is debounced by default (300ms).\n * - `value={null}` / `undefined` is uncontrolled (falls back to `defaultValue`, else empty).\n * - `value={\"\"}` is controlled-empty.\n */\ntype Props = InputGroupProps &\n InputGroupInputProps & {\n value?: string | null;\n defaultValue?: string | null;\n /** Debounced; fires synchronously on clear and with `disableDebounce`. Use `onChange` per keystroke. */\n onValueChange?: (value: string) => void;\n /** Called with the value on blur. */\n onValueBlur?: (value: string) => void;\n onClear?: () => void;\n /** Shows the clear (x) button while the value is non-empty. */\n allowClear?: boolean;\n /** `onValueChange` fires on every keystroke. */\n disableDebounce?: boolean;\n /** In ms, default 300; ignored with `disableDebounce`. */\n debounceDelay?: number;\n };\n\n/**\n * Debounced search input with a search icon and optional clear button.\n *\n * - Use for list / table search and free-text filters, e.g. in `PageToolbar.Search`.\n * - Not for plain text (`TextInput`) or picking from a known list (`Combobox`).\n *\n * @see RECIPES.md#filter-toolbar\n */\nexport const SearchInput = ({\n ref,\n\n // group props\n state,\n variant,\n focusVariant,\n sizing,\n className,\n\n // own props\n value: valueProp,\n defaultValue,\n onValueChange,\n onValueBlur,\n onChange,\n onBlur,\n onClear,\n allowClear = false,\n disableDebounce = false,\n debounceDelay = 300,\n\n // input props\n disabled,\n readOnly,\n ...restInputProps\n}: Props) => {\n const [internalValue, setInternalValue] = useState<string>(\n valueProp != null ? valueProp : (defaultValue ?? ''),\n );\n\n // A pending debounced call; the controlled-value sync skips while set so typed characters survive.\n const debounceInFlightRef = useRef(false);\n const cancelRef = useRef<() => void>(() => {});\n\n const debouncedOnValueChange = useMemo(() => {\n if (!onValueChange || disableDebounce) {\n cancelRef.current = () => {};\n return onValueChange;\n }\n const d = debounce((val: string) => {\n debounceInFlightRef.current = false;\n onValueChange(val);\n }, debounceDelay);\n cancelRef.current = d.cancel;\n return d;\n }, [onValueChange, disableDebounce, debounceDelay]);\n\n useEffect(() => {\n return () => cancelRef.current();\n }, [debouncedOnValueChange]);\n\n // Skipped while a debounced call is in flight, so the input doesn't snap back mid-typing.\n useEffect(() => {\n if (valueProp == null) return;\n if (debounceInFlightRef.current) return;\n setInternalValue(valueProp);\n }, [valueProp]);\n\n const canClear = allowClear && !!internalValue && !disabled && !readOnly;\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const val = event.target.value;\n setInternalValue(val);\n if (!disableDebounce && debouncedOnValueChange) debounceInFlightRef.current = true;\n debouncedOnValueChange?.(val);\n onChange?.(event);\n };\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n onValueBlur?.(event.target.value);\n onBlur?.(event);\n };\n\n const handleClear = () => {\n cancelRef.current();\n debounceInFlightRef.current = false;\n setInternalValue('');\n onValueChange?.('');\n onClear?.();\n };\n\n return (\n <InputGroup\n state={state}\n variant={variant}\n sizing={sizing}\n focusVariant={focusVariant}\n className={className}\n >\n <InputGroup.Addon align=\"inline-start\">\n <Search className=\"tw:size-4 tw:shrink-0 tw:text-muted-foreground\" />\n </InputGroup.Addon>\n\n <InputGroup.Input\n {...restInputProps}\n ref={ref}\n value={internalValue}\n onChange={handleChange}\n onBlur={handleBlur}\n disabled={disabled}\n readOnly={readOnly}\n />\n\n {canClear && (\n <InputGroup.Addon align=\"inline-end\">\n <InputGroup.Button\n aria-label=\"Clear search\"\n onMouseDown={(event) => event.preventDefault()}\n onClick={handleClear}\n >\n <X className=\"tw:size-4\" />\n </InputGroup.Button>\n </InputGroup.Addon>\n )}\n </InputG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CACZ;CAEA,OACE,qBAAC,YAAD;EACS;EACE;EACD;EACM;EACH;EALb,UAAA;GAOE,oBAAC,WAAW,OAAZ;IAAkB,OAAM;IACtB,UAAA,oBAAC,QAAD,EAAQ,WAAU,iDAAkD,CAAA;GACpD,CAAA;GAElB,oBAAC,WAAW,OAAZ;IACE,GAAI;IACC;IACL,OAAO;IACP,UAAU;IACV,QAAQ;IACE;IACA;GACX,CAAA;GAEA,YACC,oBAAC,WAAW,OAAZ;IAAkB,OAAM;IACtB,UAAA,oBAAC,WAAW,QAAZ;KACE,cAAW;KACX,cAAc,UAAU,MAAM,eAAe;KAC7C,SAAS;KAET,UAAA,oBAAC,GAAD,EAAG,WAAU,YAAa,CAAA;IACT,CAAA;GACH,CAAA;EAEV;;AAEhB"}
@@ -1,17 +1,14 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { noop } from "./utils-BW4AE8VP.js";
3
- import { ChevronDown } from "./icons-Cek151jC.js";
4
- import { Button } from "./Button-DsRrU5F1.js";
5
- import { DropdownMenu } from "./DropdownMenu-CgVwhDvl.js";
6
- import { Badge } from "./Badge-o5jURtpB.js";
2
+ import { noop } from "./utils-Bd28bWgm.js";
3
+ import { ChevronDown } from "./icons-wcA70iQx.js";
4
+ import { Button } from "./Button-B21oVcPU.js";
5
+ import { DropdownMenu } from "./DropdownMenu-gRM-A8qU.js";
6
+ import { Badge } from "./Badge-DIjhwPvh.js";
7
7
  import { Collapsible } from "./Collapsible-BQXWEOBC.js";
8
8
  import { useState } from "react";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/blocks/SectionNav/SectionNavItemContent.tsx
11
- /**
12
- * One row's body, rendered identically in the tree and in the collapsed dropdown — same title, same
13
- * badge, same description. Shared rather than written twice so the two cannot drift.
14
- */
11
+ /** One row's body, shared by the tree and the collapsed dropdown. */
15
12
  const SectionNavItemContent = ({ item, active, showDescription = false, expanded, showIcon = true }) => {
16
13
  const Icon = item.icon;
17
14
  return /* @__PURE__ */ jsxs("span", {
@@ -120,42 +117,14 @@ const SectionNavGroupRow = ({ group, activeId, renderItem, showDescriptions }) =
120
117
  //#endregion
121
118
  //#region src/blocks/SectionNav/SectionNav.tsx
122
119
  /**
123
- * In-page grouped navigation for one page's sections: a tree above the container's breakpoint, a
124
- * single dropdown below it. Both are rendered and CSS picks one, and both draw their rows through
125
- * the same renderer, so the two can never drift apart.
126
- *
127
- * **This is not `Sidebar`.** `Sidebar` is the app-level left rail — `SidebarProvider`, icon-collapse,
128
- * one per app shell, outside `PageLayout`. `SectionNav` is scoped to a single page's sections, lives
129
- * inside `PageLayout.Content`, and owns no global state. See `AGENTS.md`.
130
- *
131
- * **Router-agnostic:** `renderItem` is the seam. Pass it whatever your router calls a link.
132
- *
133
- * ```tsx
134
- * <PageLayout.Content nav={
135
- * <SectionNav
136
- * groups={groups}
137
- * activeId={activeId}
138
- * renderItem={({ targetId, children, itemProps }) => (
139
- * <Link to={targetId} {...itemProps}>{children}</Link>
140
- * )}
141
- * />
142
- * }>
143
- * {page}
144
- * </PageLayout.Content>
145
- * ```
120
+ * One page's grouped section nav: a tree when wide, a dropdown when narrow, both rendered via `renderItem`.
146
121
  *
147
- * The tree↔dropdown switch is a **container** query on the content area's width, never the viewport
148
- * — a product sidebar or a chat panel narrows the page without the window resizing.
149
- * `PageLayout.Content nav={…}` names that container; standalone, put `tw:@container/section-nav` on
150
- * an ancestor yourself.
122
+ * - Not `Sidebar` (the app-level rail); this lives in `PageLayout.Content` and owns no global state.
123
+ * - The switch is a container query; standalone, put `tw:@container/section-nav` on an ancestor.
151
124
  *
152
125
  * @see RECIPES.md#section-nav
153
126
  */
154
127
  const SectionNav = ({ groups, activeId, renderItem, showDescriptions = false, label = "Sections", className }) => {
155
- /**
156
- * What the collapsed trigger names. A sub-section carries its group with it — "Developer settings /
157
- * CLI agents" — so the trigger says where you are, not just what page this is.
158
- */
159
128
  const activeChild = groups.flatMap((group) => group.children.map((child) => ({
160
129
  group,
161
130
  child
@@ -171,7 +140,6 @@ const SectionNav = ({ groups, activeId, renderItem, showDescriptions = false, la
171
140
  parent: void 0
172
141
  };
173
142
  const CurrentIcon = current.icon;
174
- /** A group whose subtree holds the active section: tinted like the tree's row, but not `aria-current`. */
175
143
  const holdsActive = (group) => group.id === activeId || group.children.some((child) => child.id === activeId);
176
144
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("nav", {
177
145
  "aria-label": label,
@@ -273,4 +241,4 @@ const SectionNav = ({ groups, activeId, renderItem, showDescriptions = false, la
273
241
  //#endregion
274
242
  export { SectionNav };
275
243
 
276
- //# sourceMappingURL=SectionNav-CNLJsiVG.js.map
244
+ //# sourceMappingURL=SectionNav-TU5i3JeM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionNav-TU5i3JeM.js","names":[],"sources":["../src/blocks/SectionNav/SectionNavItemContent.tsx","../src/blocks/SectionNav/SectionNavGroupRow.tsx","../src/blocks/SectionNav/SectionNav.tsx"],"sourcesContent":["import { Badge } from '../../components/Badge';\nimport { ChevronDown } from '../../icons';\nimport { cn } from '../../utils';\n\nimport type { SectionNavItem } from './types';\n\ntype Props = {\n item: SectionNavItem;\n active: boolean;\n showDescription?: boolean;\n /** Group rows only — renders the chevron. */\n expanded?: boolean;\n /** `false` on sub-section rows: the group's icon covers them; `icon` stays for flattened surfaces. */\n showIcon?: boolean;\n};\n\n/** One row's body, shared by the tree and the collapsed dropdown. */\nexport const SectionNavItemContent = ({\n item,\n active,\n showDescription = false,\n expanded,\n showIcon = true,\n}: Props) => {\n const Icon = item.icon;\n\n return (\n <span className=\"tw:flex tw:min-w-0 tw:flex-1 tw:flex-col tw:gap-0.5\">\n <span className=\"tw:flex tw:items-center tw:gap-2\">\n {showIcon && Icon && <Icon className=\"tw:size-4 tw:shrink-0\" />}\n <span\n className={cn(\n 'tw:flex-1 tw:truncate tw:text-sm',\n active ? 'tw:font-medium tw:text-accent-foreground' : 'tw:text-foreground',\n )}\n >\n {item.title}\n </span>\n {item.isNew && (\n <Badge\n color=\"blue-inverse\"\n className=\"tw:min-h-0 tw:text-[10px]\"\n labelClassName=\"tw:px-1.5 tw:py-0\"\n >\n New\n </Badge>\n )}\n {expanded !== undefined && (\n <ChevronDown\n className={cn(\n 'tw:size-4 tw:shrink-0 tw:text-muted-foreground tw:transition-transform tw:duration-200',\n expanded && 'tw:rotate-180',\n )}\n />\n )}\n </span>\n {/* Wraps, and breaks unbreakable tokens that would overflow the 256px column. */}\n {showDescription && item.description && (\n <span className=\"tw:text-xs tw:break-words tw:text-muted-foreground\">\n {item.description}\n </span>\n )}\n </span>\n );\n};\n","import { useState } from 'react';\nimport type { MouseEvent, ReactNode } from 'react';\n\nimport { Collapsible } from '../../components/Collapsible';\nimport { cn, noop } from '../../utils';\n\nimport { SectionNavItemContent } from './SectionNavItemContent';\nimport type { SectionNavGroup, SectionNavItemRenderProps } from './types';\n\ntype Props = {\n group: SectionNavGroup;\n activeId: string | undefined;\n renderItem: (props: SectionNavItemRenderProps) => ReactNode;\n showDescriptions: boolean;\n};\n\n/**\n * The ring is **inset**, not an outline. A row is exactly as wide as the nav column, and\n * `PageLayout.Content nav` makes that column a scroll container (`overflow-y-auto`, which forces\n * `overflow-x` to `auto` too) — so there is 0px of slack for anything painted outside the border\n * box, and the browser's default `outline-offset: 1px` ring gets clipped on both edges. Painting\n * inside the box cannot be clipped, at any column width, by any ancestor.\n */\nconst FOCUS_RING =\n 'tw:focus-visible:outline-hidden tw:focus-visible:ring-2 tw:focus-visible:ring-inset tw:focus-visible:ring-ring';\n\nconst rowClass = (active: boolean) =>\n cn(\n 'tw:flex tw:w-full tw:cursor-pointer tw:items-center tw:gap-2 tw:rounded-md tw:border-none tw:px-3 tw:py-2 tw:text-left tw:text-sm tw:no-underline tw:transition-colors',\n FOCUS_RING,\n active\n ? 'tw:bg-accent tw:font-medium tw:text-accent-foreground'\n : 'tw:bg-transparent tw:text-foreground tw:hover:bg-muted',\n );\n\nconst childRowClass = (active: boolean) =>\n cn(\n 'tw:flex tw:w-full tw:cursor-pointer tw:rounded-md tw:border-none tw:px-3 tw:py-1.5 tw:text-left tw:no-underline tw:transition-colors',\n FOCUS_RING,\n active ? 'tw:bg-accent' : 'tw:bg-transparent tw:hover:bg-muted',\n );\n\n/**\n * One group row and its sub-sections. The row is a single control: it opens the group **and** goes to\n * its first section, and only collapses once you are already there — so the chevron never becomes a\n * separate thing to aim at, and one click always makes progress.\n */\nexport const SectionNavGroupRow = ({ group, activeId, renderItem, showDescriptions }: Props) => {\n // Open on arrival: the nav is short enough that hiding any of it costs more than it saves.\n const [open, setOpen] = useState(true);\n\n const hasChildren = group.children.length > 0;\n const targetId = group.children[0]?.id ?? group.id;\n const isCurrent = group.id === activeId;\n const holdsCurrent = isCurrent || group.children.some((child) => child.id === activeId);\n\n const onClick = (event: MouseEvent<HTMLElement>) => {\n if (!hasChildren) return;\n\n // Already on the row's target, so navigating would be a no-op and the only thing left for the\n // click to do is toggle. `preventDefault` is what tells the caller's link not to navigate.\n if (activeId === targetId) {\n event.preventDefault();\n setOpen((isOpen) => !isOpen);\n\n return;\n }\n\n setOpen(true);\n };\n\n return (\n <Collapsible open={open} onOpenChange={setOpen} className=\"tw:flex tw:flex-col tw:gap-0.5\">\n {renderItem({\n targetId,\n isActive: isCurrent,\n children: (\n <SectionNavItemContent\n item={group}\n active={holdsCurrent}\n expanded={hasChildren ? open : undefined}\n />\n ),\n itemProps: {\n className: rowClass(holdsCurrent),\n 'aria-current': isCurrent ? 'page' : undefined,\n 'aria-expanded': hasChildren ? open : undefined,\n 'data-active': holdsCurrent && !isCurrent ? true : undefined,\n onClick,\n },\n })}\n\n {hasChildren && (\n <Collapsible.Content>\n {/* `pl-1` keeps each row's background box off the group's rule — without it an active\n row's `bg-accent` sits flush against the line. 4px is also what lines the child titles\n (20 + 1 + 4 + 12 = 37px) up with the parent's, which its icon puts at 12 + 16 + 8 = 36px. */}\n {/* `my-0 mr-0` and not `m-0`: a host app emits its own `.tw\\:m-0` from its own source, and\n its stylesheet is the later one — shorthand and longhand at equal specificity means the\n app's `m-0` would land after this `ml-5` and flatten the indent. Longhands only, so\n nothing here can be overridden by a copy of a class this block also uses. */}\n <ul className=\"tw:my-0 tw:mr-0 tw:ml-5 tw:flex tw:list-none tw:flex-col tw:gap-0.5 tw:border-l tw:border-border tw:py-0.5 tw:pl-1\">\n {group.children.map((child) => {\n const active = child.id === activeId;\n\n return (\n <li key={child.id}>\n {renderItem({\n targetId: child.id,\n isActive: active,\n children: (\n <SectionNavItemContent\n item={child}\n active={active}\n showDescription={showDescriptions}\n showIcon={false}\n />\n ),\n itemProps: {\n className: childRowClass(active),\n 'aria-current': active ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </li>\n );\n })}\n {group.note && (\n <li className=\"tw:py-1 tw:pl-3 tw:text-xs tw:text-muted-foreground\">{group.note}</li>\n )}\n </ul>\n </Collapsible.Content>\n )}\n </Collapsible>\n );\n};\n","import type { ReactNode } from 'react';\n\nimport { Button } from '../../components/Button';\nimport { DropdownMenu } from '../../components/DropdownMenu';\nimport { ChevronDown } from '../../icons';\nimport { cn, noop } from '../../utils';\n\nimport { SectionNavGroupRow } from './SectionNavGroupRow';\nimport { SectionNavItemContent } from './SectionNavItemContent';\nimport type { SectionNavGroup, SectionNavItemRenderProps } from './types';\n\ntype Props = {\n /** Already filtered: visibility, permissions and flags stay in the app; rendered as given. */\n groups: SectionNavGroup[];\n /** `id` of the current section: a child's, or a childless group's. */\n activeId?: string;\n /** Return a router link / `<a>` to `targetId` with `itemProps` spread on it. */\n renderItem: (props: SectionNavItemRenderProps) => ReactNode;\n /** Show each section's `description` under its title. */\n showDescriptions?: boolean;\n /** Accessible name for the tree's `<nav>`, and the collapsed label with nothing active. */\n label?: string;\n /** Applied to the tree's `<nav>`; the column geometry belongs to `PageLayout.Content nav`. */\n className?: string;\n};\n\n/**\n * One page's grouped section nav: a tree when wide, a dropdown when narrow, both rendered via `renderItem`.\n *\n * - Not `Sidebar` (the app-level rail); this lives in `PageLayout.Content` and owns no global state.\n * - The switch is a container query; standalone, put `tw:@container/section-nav` on an ancestor.\n *\n * @see RECIPES.md#section-nav\n */\nexport const SectionNav = ({\n groups,\n activeId,\n renderItem,\n showDescriptions = false,\n label = 'Sections',\n className,\n}: Props) => {\n // The collapsed trigger names a sub-section with its group: \"Developer settings / CLI agents\".\n const activeChild = groups\n .flatMap((group) => group.children.map((child) => ({ group, child })))\n .find(({ child }) => child.id === activeId);\n const activeGroup = groups.find((group) => group.id === activeId);\n const current = activeChild\n ? {\n icon: activeChild.group.icon,\n title: activeChild.child.title,\n parent: activeChild.group.title,\n }\n : { icon: activeGroup?.icon, title: activeGroup?.title ?? label, parent: undefined };\n const CurrentIcon = current.icon;\n // Tinted like the tree's row, but not `aria-current`.\n const holdsActive = (group: SectionNavGroup) =>\n group.id === activeId || group.children.some((child) => child.id === activeId);\n\n return (\n <>\n {/* - `tailwindcss-preflight` covers the caller's `<a>` rows; without it they're `content-box`\n and overflow the column.\n - `display` comes only from the two container variants: a plain `tw:flex` / `tw:hidden`\n would lose to the host app's identical, later rule. */}\n <nav\n aria-label={label}\n className={cn(\n 'tailwindcss-preflight',\n 'tw:w-full tw:flex-col tw:gap-0.5 tw:@[640px]/section-nav:flex tw:@max-[640px]/section-nav:hidden',\n className,\n )}\n >\n {groups.map((group) => (\n <SectionNavGroupRow\n key={group.id}\n group={group}\n activeId={activeId}\n renderItem={renderItem}\n showDescriptions={showDescriptions}\n />\n ))}\n </nav>\n\n <div className=\"tw:w-full tw:bg-background tw:@[640px]/section-nav:hidden tw:@max-[640px]/section-nav:block\">\n <DropdownMenu>\n <DropdownMenu.Trigger asChild>\n <Button variant=\"outline\" className=\"tw:w-full tw:justify-between\">\n <span className=\"tw:flex tw:min-w-0 tw:items-center tw:gap-2\">\n {CurrentIcon && <CurrentIcon className=\"tw:size-4 tw:shrink-0\" />}\n {current.parent && (\n <>\n <span className=\"tw:truncate tw:font-normal tw:text-muted-foreground\">\n {current.parent}\n </span>\n <span className=\"tw:text-border\">/</span>\n </>\n )}\n <span className=\"tw:truncate tw:font-medium tw:text-foreground\">\n {current.title}\n </span>\n </span>\n <ChevronDown className=\"tw:size-4 tw:shrink-0\" />\n </Button>\n </DropdownMenu.Trigger>\n\n <DropdownMenu.Content\n align=\"start\"\n className=\"tw:w-(--radix-dropdown-menu-trigger-width)\"\n >\n {groups.map((group) =>\n group.children.length > 0 ? (\n <DropdownMenu.Group key={group.id}>\n {/* A clickable item, not a label: in the tree it navigates to the first section. */}\n <DropdownMenu.Item asChild>\n {renderItem({\n targetId: group.children[0]?.id ?? group.id,\n isActive: false,\n children: <SectionNavItemContent item={group} active={holdsActive(group)} />,\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': undefined,\n 'aria-expanded': undefined,\n 'data-active': holdsActive(group) ? true : undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n <div className=\"tw:ml-5 tw:border-l tw:border-border tw:py-0.5 tw:pl-1\">\n {group.children.map((child) => (\n <DropdownMenu.Item key={child.id} asChild>\n {renderItem({\n targetId: child.id,\n isActive: child.id === activeId,\n children: (\n <SectionNavItemContent\n item={child}\n active={child.id === activeId}\n showDescription={showDescriptions}\n showIcon={false}\n />\n ),\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': child.id === activeId ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n ))}\n </div>\n </DropdownMenu.Group>\n ) : (\n <DropdownMenu.Item key={group.id} asChild>\n {renderItem({\n targetId: group.id,\n isActive: group.id === activeId,\n children: <SectionNavItemContent item={group} active={group.id === activeId} />,\n itemProps: {\n className: 'tw:no-underline',\n 'aria-current': group.id === activeId ? 'page' : undefined,\n 'aria-expanded': undefined,\n 'data-active': undefined,\n onClick: noop,\n },\n })}\n </DropdownMenu.Item>\n ),\n )}\n </Drop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classNames-BzrkDnOD.js";
2
- import { useArgoDesign } from "./context-D7X470dy.js";
3
- import { Check, ChevronDown, ChevronUp } from "./icons-Cek151jC.js";
4
- import { Button } from "./Button-DsRrU5F1.js";
5
- import { overlayTriggerVariants } from "./styles-BAFscjSV.js";
2
+ import { useArgoDesign } from "./context-U293r3v-.js";
3
+ import { Check, ChevronDown, ChevronUp } from "./icons-wcA70iQx.js";
4
+ import { Button } from "./Button-B21oVcPU.js";
5
+ import { overlayTriggerVariants } from "./styles-gzcjOyKv.js";
6
+ import { forwardAccessibleName } from "./internal/utils/accessibleName.js";
6
7
  import { useId } from "react";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
  import * as SelectPrimitive from "@radix-ui/react-select";
@@ -132,12 +133,9 @@ const isGroup = (itemOrGroup) => "items" in itemOrGroup;
132
133
  /**
133
134
  * Single selection from a short enumerated list. Built on Radix Select.
134
135
  *
135
- * **When to use:** picking one value from ~10 or fewer options where search adds no value (status,
136
- * region, role). Pass a flat `items` array or grouped arrays with optional labels for headings.
137
- * **When NOT to use:** for longer lists with search use `Combobox`; for multi-select use `MultiCombobox`.
138
- * **Composition:** wrap in `FormGroup` for label + help text, or use `useAppForm` + `field.SelectField`
139
- * for forms with validation. Use the compound parts (`Select.Root`, `Select.Trigger`, `Select.Content`,
140
- * `Select.Item`) for custom item layouts; the top-level `Select` covers the common cases.
136
+ * - Use for ~10 or fewer options where search adds nothing; else `Combobox` / `MultiCombobox`.
137
+ * - In forms: `FormGroup`, or `useAppForm` + `field.SelectField` for validation.
138
+ * - Compound parts (`Select.Root`, `.Trigger`, `.Content`, `.Item`) for custom item layouts.
141
139
  */
142
140
  const Select = ({ value, defaultValue, onValueChange, disabled, name, required, open, defaultOpen, onOpenChange, dir, autoComplete, form, variant, state, sizing, placeholder, className, onBlur, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, items = [], ...accessibleName }) => {
143
141
  const groupKeyId = useId();
@@ -162,7 +160,7 @@ const Select = ({ value, defaultValue, onValueChange, disabled, name, required,
162
160
  autoComplete,
163
161
  form,
164
162
  children: [/* @__PURE__ */ jsx(SelectTrigger, {
165
- ...accessibleName,
163
+ ...forwardAccessibleName(accessibleName),
166
164
  variant,
167
165
  state,
168
166
  sizing,
@@ -188,4 +186,4 @@ Select.Separator = SelectSeparator;
188
186
  //#endregion
189
187
  export { Select };
190
188
 
191
- //# sourceMappingURL=Select-DV3Hak_l.js.map
189
+ //# sourceMappingURL=Select-B4uK0QVm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select-B4uK0QVm.js","names":["SelectItemComponent"],"sources":["../src/components/Select/SelectContent.tsx","../src/components/Select/SelectGroup.tsx","../src/components/Select/SelectItem.tsx","../src/components/Select/SelectLabel.tsx","../src/components/Select/SelectRoot.tsx","../src/components/Select/SelectSeparator.tsx","../src/components/Select/SelectTrigger.tsx","../src/components/Select/Select.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\n\nimport { ChevronDown, ChevronUp } from '../../icons';\nimport { cn } from '../../utils';\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nconst scrollButtonStyles = cn(\n 'tw:flex',\n 'tw:items-center',\n 'tw:justify-center',\n 'tw:rounded-sm',\n 'tw:p-1',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-5',\n);\n\ntype Variant = 'default' | 'argo';\n\n/**\n * Props for `Select.Content`. `container` portals the listbox into a custom element (useful inside modals).\n */\ntype Props = ComponentProps<typeof SelectPrimitive.Content> & {\n container?: HTMLElement | null;\n};\n\n/**\n * Listbox container for `Select`. Portals items into a popover sized to the trigger.\n * Normally rendered implicitly by `Select`; use directly only when composing custom item layouts via\n * the `Select.Root` / `Select.Trigger` / `Select.Content` compound parts.\n */\nexport const SelectContent = ({\n ref,\n className,\n children,\n container,\n position = 'popper',\n sideOffset = 4,\n ...props\n}: Props) => {\n const effectiveVariant: Variant = useArgoDesign() ? 'argo' : 'default';\n return (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Content\n {...props}\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n data-variant={effectiveVariant}\n className={cn(\n 'tailwindcss-preflight',\n 'tw:group/select-content',\n // Floating tier above Modal (1051): Tooltip 1060 / Combobox·Popover·Select 1055 / Modal 1051 / DropdownMenu.SubContent 1041 / FullScreenModal 1039\n 'tw:z-[1055]',\n\n // layout\n 'tw:flex tw:flex-col',\n 'tw:p-1',\n 'tw:data-[variant=default]:p-0',\n 'tw:overflow-hidden',\n 'tw:origin-(--radix-select-content-transform-origin)',\n\n // sizing\n 'tw:max-h-[var(--radix-select-content-available-height)]',\n 'tw:min-w-[var(--radix-select-trigger-width)]',\n\n // appearance\n 'tw:bg-popover',\n 'tw:text-popover-foreground',\n 'tw:shadow-md',\n 'tw:ring-1',\n 'tw:ring-foreground/10',\n 'tw:rounded-lg',\n 'tw:data-[variant=default]:rounded',\n\n // open animation\n 'tw:data-[state=open]:animate-in',\n 'tw:data-[state=open]:fade-in-0',\n 'tw:data-[state=open]:zoom-in-95',\n\n // closed animation\n 'tw:data-[state=closed]:animate-out',\n 'tw:data-[state=closed]:fade-out-0',\n 'tw:data-[state=closed]:zoom-out-95',\n\n // position animations\n 'tw:data-[side=bottom]:slide-in-from-top-2',\n 'tw:data-[side=left]:slide-in-from-right-2',\n 'tw:data-[side=right]:slide-in-from-left-2',\n 'tw:data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n >\n <SelectPrimitive.ScrollUpButton className={scrollButtonStyles}>\n <ChevronUp />\n </SelectPrimitive.ScrollUpButton>\n\n <SelectPrimitive.Viewport\n className={cn({\n 'tw:h-[var(--radix-select-trigger-height)] tw:w-full tw:min-w-[var(--radix-select-trigger-width)]':\n position === 'popper',\n })}\n >\n {children}\n </SelectPrimitive.Viewport>\n\n <SelectPrimitive.ScrollDownButton className={scrollButtonStyles}>\n <ChevronDown />\n </SelectPrimitive.ScrollDownButton>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n};\n","import type { ComponentProps } from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<typeof SelectPrimitive.Group>;\n\nexport const SelectGroup = ({ className, ...props }: Props) => (\n <SelectPrimitive.Group {...props} className={cn('tw:flex tw:flex-col tw:gap-0.5', className)} />\n);\n","import { useId } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\n\nimport { Check } from '../../icons';\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<typeof SelectPrimitive.Item> & {\n icon?: ReactNode;\n hint?: ReactNode;\n};\n\nexport const SelectItem = ({\n ref,\n className,\n children,\n icon,\n hint,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}: Props) => {\n const hintId = useId();\n\n return (\n <SelectPrimitive.Item\n {...props}\n ref={ref}\n // Radix names the option from `ItemText` alone (`aria-labelledby`), so the hint is\n // described rather than named — it reaches a screen reader without joining the label.\n aria-describedby={\n [ariaDescribedBy, hint ? hintId : null].filter(Boolean).join(' ') || undefined\n }\n className={cn(\n 'tw:group/select-item',\n\n // layout\n 'tw:relative',\n 'tw:flex',\n 'tw:flex-1',\n 'tw:items-center',\n 'tw:gap-2',\n\n // spacing — default variant uses tighter radius and wider horizontal padding\n 'tw:py-2',\n 'tw:px-2',\n 'tw:group-data-[variant=default]/select-content:px-4',\n 'tw:rounded-lg',\n 'tw:group-data-[variant=default]/select-content:rounded-none',\n\n // typography\n 'tw:text-sm',\n 'tw:select-none',\n 'tw:cursor-default',\n 'tw:outline-hidden',\n\n // highlighted (keyboard / hover)\n 'tw:focus:outline-hidden',\n 'tw:data-[highlighted]:bg-accent',\n // The legacy highlight is a neutral step, not the argo accent.\n //\n // - `secondary` carries its own foreground, so fill and ink move together.\n // - `muted` is unusable: in dark it equals `popover`, so the band would disappear\n // into the listbox.\n 'tw:group-data-[variant=default]/select-content:data-[highlighted]:bg-secondary',\n 'tw:data-[highlighted]:text-accent-foreground',\n 'tw:group-data-[variant=default]/select-content:data-[highlighted]:text-secondary-foreground',\n\n // disabled\n 'tw:data-[disabled]:pointer-events-none',\n 'tw:data-[disabled]:opacity-50',\n\n // child svg defaults\n 'tw:[&_svg]:pointer-events-none',\n 'tw:[&_svg]:shrink-0',\n 'tw:[&_svg]:text-muted-foreground',\n \"tw:[&_svg:not([class*='tw:size-'])]:size-4\",\n className,\n )}\n >\n {icon}\n <span className=\"tw:flex-1 tw:truncate\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n {/* Outside `ItemText`, so the trigger shows the label alone once the option is picked. */}\n {hint && (\n <span id={hintId} className=\"tw:shrink-0 tw:text-xs tw:text-muted-foreground\">\n {hint}\n </span>\n )}\n <SelectPrimitive.ItemIndicator className=\"tw:pointer-events-none\">\n <Check className=\"tw:size-4\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n};\n","import type { ComponentProps } from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<typeof SelectPrimitive.Label>;\n\nexport const SelectLabel = ({ className, ...props }: Props) => (\n <SelectPrimitive.Label\n {...props}\n className={cn(\n // Base (argo variant) — soft gray section label\n 'tw:px-2',\n 'tw:py-1.5',\n 'tw:text-xs',\n 'tw:font-medium',\n 'tw:leading-none',\n 'tw:text-muted-foreground',\n\n // Default variant — uppercase tracked label, matches Combobox default\n 'tw:group-data-[variant=default]/select-content:uppercase',\n 'tw:group-data-[variant=default]/select-content:font-semibold',\n 'tw:group-data-[variant=default]/select-content:tracking-wider',\n 'tw:group-data-[variant=default]/select-content:text-[11px]',\n 'tw:group-data-[variant=default]/select-content:text-black',\n 'tw:group-data-[variant=default]/select-content:pt-2',\n 'tw:group-data-[variant=default]/select-content:px-4',\n\n className,\n )}\n />\n);\n","import type { ReactNode } from 'react';\nimport { Root } from '@radix-ui/react-select';\n\n// Mirror Radix's `SelectProps` as an explicit list. We can't infer via\n// `ComponentProps<typeof Root>` or reuse Radix's `SelectProps` directly: both\n// transitively reference the un-exported `SelectSharedProps` interface, and\n// TS4023 fires when DTS emits anything that consumes it (e.g. `useAppForm`).\n// Keep this in sync with `@radix-ui/react-select`'s `SelectProps` shape.\nexport type SelectRootProps = {\n // SelectSharedProps\n children?: ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: 'ltr' | 'rtl';\n name?: string;\n autoComplete?: string;\n disabled?: boolean;\n required?: boolean;\n form?: string;\n // SelectProps\n value?: string;\n defaultValue?: string;\n onValueChange?(value: string): void;\n};\n\nexport const SelectRoot = (props: SelectRootProps) => <Root {...props} />;\n","import type { ComponentProps } from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<typeof SelectPrimitive.Separator>;\n\nexport const SelectSeparator = ({ className, ...props }: Props) => (\n <SelectPrimitive.Separator\n {...props}\n className={cn('tw:mx-2 tw:my-1 tw:h-px tw:bg-border', className)}\n />\n);\n","import type { ComponentProps } from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { type VariantProps } from 'class-variance-authority';\n\nimport { ChevronDown } from '../../icons';\nimport { cn } from '../../utils';\nimport type { WithAccessibleName } from '../../utils/accessibleName';\nimport { Button } from '../Button';\nimport { overlayTriggerVariants } from '../OverlayTrigger/styles';\nimport { useArgoDesign } from '../ThemeProvider/context';\n\ntype BaseProps = ComponentProps<typeof SelectPrimitive.Trigger> &\n Omit<VariantProps<typeof overlayTriggerVariants>, 'variant'> & {\n variant?: Exclude<VariantProps<typeof overlayTriggerVariants>['variant'], 'argo'> | 'inline';\n } & Pick<ComponentProps<typeof SelectPrimitive.Value>, 'placeholder'>;\n\n/** `role=\"combobox\"` is not named from content: neither the item label nor `placeholder` names it. */\ntype SelectTriggerProps = WithAccessibleName<BaseProps>;\n\nexport const SelectTrigger = ({\n ref,\n className,\n variant,\n state,\n sizing,\n placeholder,\n ...props\n}: SelectTriggerProps) => {\n const isArgoDesign = useArgoDesign();\n const effectiveVariant = (() => {\n if (variant === 'inline') return 'inline';\n if (isArgoDesign) return 'argo';\n return variant;\n })();\n const isInlineVariant = effectiveVariant === 'inline';\n\n if (isInlineVariant)\n return (\n <SelectPrimitive.Trigger {...props} ref={ref} className={cn(className)} asChild>\n <Button variant=\"inline\">\n <SelectPrimitive.Value placeholder={placeholder} />\n <SelectPrimitive.Icon asChild>\n <ChevronDown />\n </SelectPrimitive.Icon>\n </Button>\n </SelectPrimitive.Trigger>\n );\n\n return (\n <SelectPrimitive.Trigger\n {...props}\n ref={ref}\n className={cn(\n overlayTriggerVariants({ variant: effectiveVariant, state, sizing }),\n className,\n )}\n >\n <SelectPrimitive.Value placeholder={placeholder} />\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"tw:size-4 tw:text-muted-foreground\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n};\n","import { useId } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport { forwardAccessibleName, type WithAccessibleName } from '../../utils/accessibleName';\n\nimport { SelectContent } from './SelectContent';\nimport { SelectGroup } from './SelectGroup';\nimport { SelectItem as SelectItemComponent } from './SelectItem';\nimport { SelectLabel } from './SelectLabel';\nimport { SelectRoot, type SelectRootProps } from './SelectRoot';\nimport { SelectSeparator } from './SelectSeparator';\nimport { SelectTrigger } from './SelectTrigger';\n\nexport type SelectItem = {\n value: string;\n label: ReactNode;\n icon?: ReactNode;\n /** Trailing muted note shown in the listbox only — never in the trigger. */\n hint?: ReactNode;\n disabled?: boolean;\n};\n\nexport type SelectItemGroup = {\n label?: ReactNode;\n items: readonly SelectItem[];\n};\n\nconst isGroup = (itemOrGroup: SelectItem | SelectItemGroup): itemOrGroup is SelectItemGroup =>\n 'items' in itemOrGroup;\n\ntype TriggerProps = ComponentProps<typeof SelectTrigger>;\n\ntype BaseProps = Pick<\n SelectRootProps,\n | 'value'\n | 'defaultValue'\n | 'onValueChange'\n | 'disabled'\n | 'name'\n | 'required'\n | 'open'\n | 'defaultOpen'\n | 'onOpenChange'\n | 'dir'\n | 'autoComplete'\n | 'form'\n> &\n Pick<\n TriggerProps,\n | 'variant'\n | 'state'\n | 'sizing'\n | 'placeholder'\n | 'id'\n | 'className'\n | 'onBlur'\n | 'aria-label'\n | 'aria-labelledby'\n | 'aria-describedby'\n | 'aria-invalid'\n | 'aria-required'\n > & {\n items?: readonly (SelectItem | SelectItemGroup)[];\n };\n\n/** `role=\"combobox\"` is not named from content: neither the item label nor `placeholder` names it. */\nexport type SelectProps = WithAccessibleName<BaseProps>;\n\n/**\n * Single selection from a short enumerated list. Built on Radix Select.\n *\n * - Use for ~10 or fewer options where search adds nothing; else `Combobox` / `MultiCombobox`.\n * - In forms: `FormGroup`, or `useAppForm` + `field.SelectField` for validation.\n * - Compound parts (`Select.Root`, `.Trigger`, `.Content`, `.Item`) for custom item layouts.\n */\nexport const Select = ({\n value,\n defaultValue,\n onValueChange,\n disabled,\n name,\n required,\n open,\n defaultOpen,\n onOpenChange,\n dir,\n autoComplete,\n form,\n variant,\n state,\n sizing,\n placeholder,\n className,\n onBlur,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n 'aria-required': ariaRequired,\n items = [],\n // Kept grouped: destructured apart, the required-one-of union becomes three optional props.\n ...accessibleName\n}: SelectProps) => {\n const groupKeyId = useId();\n\n const renderItem = (item: SelectItem) => (\n <SelectItemComponent\n key={item.value}\n value={item.value}\n icon={item.icon}\n hint={item.hint}\n disabled={item.disabled}\n >\n {item.label}\n </SelectItemComponent>\n );\n\n return (\n <SelectRoot\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n disabled={disabled}\n name={name}\n required={required}\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n dir={dir}\n autoComplete={autoComplete}\n form={form}\n >\n <SelectTrigger\n {...forwardAccessibleName(accessibleName)}\n variant={variant}\n state={state}\n sizing={sizing}\n placeholder={placeholder}\n className={className}\n onBlur={onBlur}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n aria-required={ariaRequired}\n />\n <SelectContent>\n {items.map((itemOrGroup, index) => {\n if (isGroup(itemOrGroup)) {\n return (\n <SelectGroup key={`${groupKeyId}-group-${index}`}>\n {itemOrGroup.label && <SelectLabel>{itemOrGroup.label}</SelectLabel>}\n {itemOrGroup.items.map(renderItem)}\n </SelectGroup>\n );\n }\n\n return renderItem(itemOrGroup);\n })}\n </SelectContent>\n </SelectRoot>\n );\n};\n\nSelect.Root = SelectRoot;\nSelect.Trigger = SelectTrigger;\nSelect.Content = SelectContent;\nSelect.Item = SelectItemComponent;\nSelect.Group = SelectGroup;\nSelect.Label = SelectLabel;\nSelect.Separator = SelectSeparator;\n"],"mappings":";;;;;;;;;;;AAOA,MAAM,qBAAqB,GACzB,WACA,mBACA,qBACA,iBACA,UACA,8CACF;;;;;;AAgBA,MAAa,iBAAiB,EAC5B,KACA,WACA,UACA,WACA,WAAW,UACX,aAAa,GACb,GAAG,YACQ;CACX,MAAM,mBAA4B,cAAc,IAAI,SAAS;CAC7D,OACE,oBAAC,gBAAgB,QAAjB;EAAmC;EACjC,UAAA,qBAAC,gBAAgB,SAAjB;GACE,GAAI;GACC;GACK;GACE;GACZ,gBAAc;GACd,WAAW,GACT,yBACA,2BAEA,eAGA,uBACA,UACA,iCACA,sBACA,uDAGA,2DACA,gDAGA,iBACA,8BACA,gBACA,aACA,yBACA,iBACA,qCAGA,mCACA,kCACA,mCAGA,sCACA,qCACA,sCAGA,6CACA,6CACA,6CACA,6CACA,SACF;GAhDF,UAAA;IAkDE,oBAAC,gBAAgB,gBAAjB;KAAgC,WAAW;KACzC,UAAA,oBAAC,WAAD,CAAY,CAAA;IACkB,CAAA;IAEhC,oBAAC,gBAAgB,UAAjB;KACE,WAAW,GAAG,EACZ,oGACE,aAAa,SAC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a,MAAM;CAEzB,MAAM,cAAc,SAClB,oBAACA,YAAD;EAEE,OAAO,KAAK;EACZ,MAAM,KAAK;EACX,MAAM,KAAK;EACX,UAAU,KAAK;EAEd,UAAA,KAAK;CACa,GAPd,KAAK,KAOS;CAGvB,OACE,qBAAC,YAAD;EACS;EACO;EACC;EACL;EACJ;EACI;EACJ;EACO;EACC;EACT;EACS;EACR;EAZR,UAAA,CAcE,oBAAC,eAAD;GACE,GAAI,sBAAsB,cAAc;GAC/B;GACF;GACC;GACK;GACF;GACH;GACR,oBAAkB;GAClB,gBAAc;GACd,iBAAe;EAChB,CAAA,GACD,oBAAC,eAAD,EAAA,UACG,MAAM,KAAK,aAAa,UAAU;GACjC,IAAI,QAAQ,WAAW,GACrB,OACE,qBAAC,aAAD,EAAA,UAAA,CACG,YAAY,SAAS,oBAAC,aAAD,EAAA,UAAc,YAAY,MAAmB,CAAA,GAClE,YAAY,MAAM,IAAI,UAAU,CACtB,EAAA,GAHK,GAAG,WAAW,SAAS,OAG5B;GAIjB,OAAO,WAAW,WAAW;EAC/B,CAAC,EACY,CAAA,CACL;;AAEhB;AAEA,OAAO,OAAO;AACd,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,OAAOA;AACd,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,YAAY"}
@@ -1,8 +1,8 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { useArgoDesign } from "./context-D7X470dy.js";
3
- import { X } from "./icons-Cek151jC.js";
4
- import { Button } from "./Button-DsRrU5F1.js";
5
- import { ModalDescription, ModalOverlay, ModalTitle } from "./ModalTitle-CeLM_mX9.js";
2
+ import { useArgoDesign } from "./context-U293r3v-.js";
3
+ import { X } from "./icons-wcA70iQx.js";
4
+ import { Button } from "./Button-B21oVcPU.js";
5
+ import { ModalDescription, ModalOverlay, ModalTitle } from "./ModalTitle-BxopkIoQ.js";
6
6
  import { cva } from "class-variance-authority";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Close, Content, Portal, Root, Title, Trigger } from "@radix-ui/react-dialog";
@@ -97,10 +97,6 @@ const SheetContent = ({ className, children, side = "right", disableTransition =
97
97
  container,
98
98
  children: [!hideOverlay && /* @__PURE__ */ jsx(SheetOverlay, { disableTransition: disableTransition ?? false }), /* @__PURE__ */ jsx(Content, {
99
99
  ...props,
100
- /**
101
- * Intentionally set undefined to avoid warning as suggested in docs, (https://www.radix-ui.com/primitives/docs/components/dialog#description)
102
- * as of now we don't use modal description anywhere, if we decide to fix this issue, we fix it everywhere at once.
103
- */
104
100
  "aria-describedby": void 0,
105
101
  className: cn(sheetContentVariants({
106
102
  side,
@@ -166,4 +162,4 @@ Sheet.Body = SheetBody;
166
162
  //#endregion
167
163
  export { Sheet };
168
164
 
169
- //# sourceMappingURL=Sheet-OparjIi-.js.map
165
+ //# sourceMappingURL=Sheet-D0fAE14T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet-D0fAE14T.js","names":[],"sources":["../src/components/Sheet/SheetBody.tsx","../src/components/Sheet/SheetOverlay.tsx","../src/components/Sheet/SheetContent.tsx","../src/components/Sheet/SheetFooter.tsx","../src/components/Sheet/SheetHeader.tsx","../src/components/Sheet/SheetTitle.tsx","../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'div'>;\n\nexport const SheetBody = ({ className, ...rest }: Props) => (\n <div\n {...rest}\n className={cn('tw:flex', 'tw:flex-col', 'tw:overflow-x-hidden', 'tw:px-4', className)}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { ModalOverlay } from '../Modal/ModalOverlay';\n\ntype Props = ComponentProps<typeof ModalOverlay>;\n\n// Assuming it should have the same style as standard modal, if not remove the modal dependency and style it separately.\nexport const SheetOverlay = ({ ref, ...props }: Props) => <ModalOverlay ref={ref} {...props} />;\n","import type { ComponentProps } from 'react';\nimport { Content, Portal } from '@radix-ui/react-dialog';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { SheetOverlay } from './SheetOverlay';\n\nconst sheetContentVariants = cva(\n [\n 'tailwindcss-preflight',\n\n 'tw:fixed',\n\n // Must beat the global z-index override in tooltip.less.\n 'tw:z-[1051]',\n\n 'tw:flex',\n 'tw:flex-col',\n\n 'tw:bg-card',\n 'tw:text-card-foreground',\n 'tw:shadow-lg',\n\n 'tw:data-[argo=true]:border',\n 'tw:data-[argo=true]:border-border',\n 'tw:data-[argo=true]:focus-visible:outline-hidden',\n 'tw:data-[argo=true]:focus-visible:ring-2',\n 'tw:data-[argo=true]:focus-visible:ring-ring/50',\n\n 'tw:ease-in-out',\n 'tw:data-[state=open]:duration-200',\n 'tw:data-[state=closed]:duration-200',\n ],\n {\n defaultVariants: {\n side: 'right',\n disableTransition: false,\n },\n variants: {\n disableTransition: {\n true: [],\n false: ['tw:data-[state=open]:animate-in', 'tw:data-[state=closed]:animate-out'],\n },\n side: {\n top: [\n 'tw:inset-x-0',\n 'tw:top-0',\n 'tw:h-auto',\n 'tw:data-[state=closed]:slide-out-to-top',\n 'tw:data-[state=open]:slide-in-from-top',\n 'tw:data-[argo=true]:rounded-b-lg',\n ],\n right: [\n 'tw:inset-y-0',\n 'tw:right-0',\n 'tw:h-full',\n 'tw:data-[state=closed]:slide-out-to-right',\n 'tw:data-[state=open]:slide-in-from-right',\n 'tw:data-[argo=true]:rounded-l-lg',\n ],\n\n bottom: [\n 'tw:inset-x-0',\n 'tw:bottom-0',\n 'tw:h-auto',\n 'tw:data-[state=closed]:slide-out-to-bottom',\n 'tw:data-[state=open]:slide-in-from-bottom',\n 'tw:drop-shadow-2xl', // standard tailwindcss shadow is invisible for a bottom sheet because of positioning\n 'tw:data-[argo=true]:rounded-t-lg',\n ],\n\n left: [\n 'tw:inset-y-0',\n 'tw:left-0',\n 'tw:h-full',\n 'tw:data-[state=closed]:slide-out-to-left',\n 'tw:data-[state=open]:slide-in-from-left',\n 'tw:data-[argo=true]:rounded-r-lg',\n ],\n },\n },\n },\n);\n\ntype Props = ComponentProps<typeof Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n hideOverlay?: boolean;\n keepOpenOnPointerDownOutside?: boolean;\n} & VariantProps<typeof sheetContentVariants> &\n Pick<ComponentProps<typeof Portal>, 'container'>;\n\nexport const SheetContent = ({\n className,\n children,\n side = 'right',\n disableTransition = false,\n hideOverlay = false,\n keepOpenOnPointerDownOutside = false,\n onPointerDownOutside,\n onInteractOutside,\n container,\n ...props\n}: Props) => {\n const renderArgo = useArgoDesign();\n\n const handleOnPointerDownOutside: ComponentProps<typeof Content>['onPointerDownOutside'] = (\n event,\n ) => {\n if (keepOpenOnPointerDownOutside) event.preventDefault();\n onPointerDownOutside?.(event);\n };\n\n const handleOnInteractOutside: ComponentProps<typeof Content>['onInteractOutside'] = (event) => {\n if (keepOpenOnPointerDownOutside) event.preventDefault();\n onInteractOutside?.(event);\n };\n\n return (\n <Portal container={container}>\n {!hideOverlay && <SheetOverlay disableTransition={disableTransition ?? false} />}\n <Content\n {...props}\n // Silences Radix's missing-description warning; no sheet uses a description.\n aria-describedby={undefined}\n className={cn(sheetContentVariants({ side, className, disableTransition }))}\n onPointerDownOutside={handleOnPointerDownOutside}\n onInteractOutside={handleOnInteractOutside}\n data-side={side}\n data-argo={renderArgo}\n >\n {children}\n </Content>\n </Portal>\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'div'>;\n\nexport const SheetFooter = ({ className, ...props }: Props) => (\n <div className={cn('tw:mt-auto tw:flex tw:flex-col tw:gap-2 tw:p-4', className)} {...props} />\n);\n","import type { ComponentProps, ReactNode } from 'react';\nimport { Close } from '@radix-ui/react-dialog';\n\nimport { X } from '../../icons';\nimport { cn } from '../../utils';\nimport { Button } from '../Button';\nimport { ModalDescription } from '../Modal/ModalDescription';\nimport { ModalTitle } from '../Modal/ModalTitle';\n\ntype Props = {\n title?: ReactNode;\n description?: ReactNode;\n hideCloseIcon?: boolean;\n} & ComponentProps<'div'>;\n\nexport const SheetHeader = ({\n className,\n children,\n hideCloseIcon = false,\n title,\n description,\n ...props\n}: Props) => {\n const isHeaderRendered = title || description || !hideCloseIcon;\n\n return (\n <div className={cn('tw:flex', 'tw:flex-col', 'tw:gap-1.5', 'tw:p-4', className)} {...props}>\n {isHeaderRendered && (\n <div className=\"tw:flex tw:flex-col\">\n <div className=\"tw:flex tw:justify-end tw:gap-2\">\n {title && <ModalTitle>{title}</ModalTitle>}\n {!hideCloseIcon && (\n <Close asChild>\n <Button variant=\"invisible\" size=\"icon-sm\">\n <X />\n <span className=\"tw:sr-only\">Close</span>\n </Button>\n </Close>\n )}\n </div>\n {description && <ModalDescription>{description}</ModalDescription>}\n </div>\n )}\n\n {children}\n </div>\n );\n};\n","import type { ComponentProps } from 'react';\nimport { Title } from '@radix-ui/react-dialog';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<typeof Title> & {\n visuallyHidden?: boolean;\n};\n\nexport const SheetTitle = ({ className, visuallyHidden = false, ...props }: Props) => (\n <Title className={cn({ 'tw:sr-only': visuallyHidden }, className)} {...props} />\n);\n","import type { ComponentProps } from 'react';\nimport { Close, Root, Trigger } from '@radix-ui/react-dialog';\n\nimport { SheetBody } from './SheetBody';\nimport { SheetContent } from './SheetContent';\nimport { SheetFooter } from './SheetFooter';\nimport { SheetHeader } from './SheetHeader';\nimport { SheetTitle } from './SheetTitle';\n\ntype Props = ComponentProps<typeof Root>;\n\nexport const Sheet = (props: Props) => <Root {...props} />;\n\nSheet.Close = Close;\nSheet.Trigger = Trigger;\nSheet.Content = SheetContent;\nSheet.Title = SheetTitle;\n\nSheet.Header = SheetHeader;\nSheet.Footer = SheetFooter;\nSheet.Body = SheetBody;\n"],"mappings":";;;;;;;;;AAMA,MAAa,aAAa,EAAE,WAAW,GAAG,WACxC,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ip, TooltipProvider } from "./utils-BW4AE8VP.js";
2
+ import { Tooltip, TooltipProvider } from "./utils-Bd28bWgm.js";
3
3
  import { mergeRefs } from "./internal/utils/mergeRefs.js";
4
- import { ChevronDown, Search } from "./icons-Cek151jC.js";
5
- import { DropdownMenu } from "./DropdownMenu-CgVwhDvl.js";
4
+ import { ChevronDown, Search } from "./icons-wcA70iQx.js";
5
+ import { DropdownMenu } from "./DropdownMenu-gRM-A8qU.js";
6
6
  import { ScrollArea } from "./internal/components/ScrollArea.js";
7
7
  import { Separator } from "./internal/components/Separator.js";
8
- import { Sheet } from "./Sheet-OparjIi-.js";
9
- import { HoverCard } from "./HoverCard-B9ZMJxjn.js";
8
+ import { Sheet } from "./Sheet-D0fAE14T.js";
9
+ import { HoverCard } from "./HoverCard-B8OKu9XZ.js";
10
+ import { useElement } from "./useElement-D-RjrGa4.js";
10
11
  import { Collapsible } from "./Collapsible-BQXWEOBC.js";
11
- import { useThemeScopeContainer } from "./ThemeProvider-DAmNn9Sd.js";
12
- import { BrandLogo } from "./BrandLogo-CoKBk4MI.js";
13
- import { useElement } from "./useElement-BK3AAiIf.js";
12
+ import { useThemeScopeContainer } from "./ThemeProvider-VF38VfUa.js";
13
+ import { BrandLogo } from "./BrandLogo-CKpVSZb6.js";
14
14
  import { useScrollbarPosition } from "./internal/hooks/useScrollbarPosition.js";
15
15
  import { Root, Slot, Slottable } from "@radix-ui/react-slot";
16
16
  import { createContext, use, useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
@@ -154,11 +154,7 @@ const calcEffectiveWidths = ({ variant, width: customWidth, collapsible, state,
154
154
  //#endregion
155
155
  //#region src/components/Sidebar/SidebarProvider/context.ts
156
156
  const SidebarContext = createContext(null);
157
- /**
158
- * The sidebar if there is one, `null` otherwise — for code that ENHANCES a page when the app shell is
159
- * around it (borrowing width, collapsing a panel) and must still render without one, in a test, a
160
- * story, or an embedded surface. Anything that genuinely requires a sidebar keeps `useSidebar`.
161
- */
157
+ /** `useSidebar` that returns `null` outside a `SidebarProvider` instead of throwing. */
162
158
  const useOptionalSidebar = (side = "left") => use(SidebarContext)?.[side] ?? null;
163
159
  const useSidebar = (side = "left") => {
164
160
  const context = use(SidebarContext);
@@ -252,15 +248,9 @@ const useSidebarState = ({ defaultMode, mode: modeProp, onModeChange }) => {
252
248
  const DEFAULT_SIDEBAR_VARIANT = "none";
253
249
  const DEFAULT_SIDEBAR_MODE = "expanded";
254
250
  const DEFAULT_SIDEBAR_COLLAPSIBLE = "off-canvas";
255
- /**
256
- * What `setMode` becomes for a rail that is currently a sheet.
257
- *
258
- * - The collapse axis has nothing to act on there, and the call site's own `mode` prop is a
259
- * stored desktop preference — `Sidebar.SearchInput` expands the rail on focus, which would
260
- * otherwise overwrite a stored `collapsed` the first time someone searches on a phone.
261
- */
251
+ /** A sheet's `setMode`: no-op, so `Sidebar.SearchInput` focus keeps a desktop `collapsed`. */
262
252
  const ignoreModeChange = () => {};
263
- /** The width a side watches: its own when it named one, the default when it just opted in. */
253
+ /** The side's own breakpoint, or the default for `true`. */
264
254
  const mobileBreakpointOf = (mobileSheet) => typeof mobileSheet === "number" ? mobileSheet : 768;
265
255
  const SidebarProvider = ({ children, defaultLeftMode = DEFAULT_SIDEBAR_MODE, leftMode, onLeftModeChange, defaultRightMode = DEFAULT_SIDEBAR_MODE, rightMode, onRightModeChange, leftMobileSheet = false, rightMobileSheet = false, leftCollapsible = DEFAULT_SIDEBAR_COLLAPSIBLE, leftVariant = DEFAULT_SIDEBAR_VARIANT, leftWidth, rightCollapsible = DEFAULT_SIDEBAR_COLLAPSIBLE, rightVariant = DEFAULT_SIDEBAR_VARIANT, rightWidth, onLeftWidthChange, onRightWidthChange, defaultFilledSide = null }) => {
266
256
  const isLeftNarrow = useMediaQuery(sidebarMobileMediaQuery(mobileBreakpointOf(leftMobileSheet)));
@@ -488,18 +478,11 @@ const SidebarMenuIcon = ({ ref, className, children, ...rest }) => /* @__PURE__
488
478
  //#endregion
489
479
  //#region src/components/Sidebar/SidebarMenu/useDestinationDismiss.ts
490
480
  /**
491
- * The click handler a sidebar menu item runs: the caller's own, then the sheet's dismissal.
481
+ * A menu item's click handler: the caller's own, then (on a phone) dismissing the sheet.
492
482
  *
493
- * - On a phone the rail is a sheet over the page, so a chosen destination has to dismiss it —
494
- * otherwise the page it navigated to sits behind the overlay.
495
- * - Two kinds of click are not a destination:
496
- * - Opening a popup. `DropdownMenu.Trigger` and `Sidebar.SubMenu` both hand their child an
497
- * `aria-haspopup` / `aria-expanded`, and closing the sheet under their popup would take
498
- * the popup with it.
499
- * - Acting on the rail itself. `Sidebar.Trigger` marks its child `data-sidebar-trigger`; its
500
- * own `toggle` runs after this handler, so dismissing here would hand `toggle` a closed
501
- * sheet and it would open it straight back up.
502
- * - Above the breakpoint the caller's `onClick` is all that runs.
483
+ * - Not a destination, so no dismissal:
484
+ * - A popup opener (`aria-haspopup` / `aria-expanded`) — closing would take the popup too.
485
+ * - `data-sidebar-trigger` — its `toggle` runs after this and would reopen the sheet.
503
486
  */
504
487
  const useDestinationDismiss = (props, onClick) => {
505
488
  const { side } = useSidebarInstance();
@@ -987,4 +970,4 @@ Sidebar.SubItem = SidebarMenuSubItem;
987
970
  //#endregion
988
971
  export { Sidebar, SidebarProvider, useOptionalSidebar, useSidebar };
989
972
 
990
- //# sourceMappingURL=Sidebar-CLEbBtNY.js.map
973
+ //# sourceMappingURL=Sidebar-ZLMNIbg5.js.map