@keboola/design 11.9.0 → 12.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 (363) hide show
  1. package/AGENTS.md +34 -8
  2. package/CHANGELOG.md +155 -0
  3. package/COMPONENT-API.md +337 -289
  4. package/README.md +11 -1
  5. package/dist/{AIKit-ELIsegJz.js → AIKit-BD4r7ff-.js} +404 -243
  6. package/dist/AIKit-BD4r7ff-.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-Th2khjPi.js} +5 -5
  10. package/dist/AlertModal-Th2khjPi.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-BU23Vl8V.js} +7 -7
  18. package/dist/{BrandEditor-BsTBM3s6.js.map → BrandEditor-BU23Vl8V.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-p9HtMLCc.js} +8 -14
  22. package/dist/Breadcrumb-p9HtMLCc.js.map +1 -0
  23. package/dist/{Button-DsRrU5F1.js → Button-Ca4Q3VJU.js} +31 -13
  24. package/dist/Button-Ca4Q3VJU.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-Cr9MBNHu.js} +4 -4
  28. package/dist/Card-Cr9MBNHu.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-DHa1trtI.js} +4 -4
  34. package/dist/{ClipboardButton-KHQnPEh_.js.map → ClipboardButton-DHa1trtI.js.map} +1 -1
  35. package/dist/{CodeEditor-BJKJXA0c.js → CodeEditor-BSo-oLFG.js} +55 -165
  36. package/dist/CodeEditor-BSo-oLFG.js.map +1 -0
  37. package/dist/{ColorInput-Bj3dfPFA.js → ColorInput-DSMqrs2-.js} +12 -27
  38. package/dist/ColorInput-DSMqrs2-.js.map +1 -0
  39. package/dist/{ColorModeSwitch-CWt-DZGC.js → ColorModeSwitch-D7EuWyJz.js} +7 -17
  40. package/dist/ColorModeSwitch-D7EuWyJz.js.map +1 -0
  41. package/dist/Combobox-CxRAYOBt.js +1069 -0
  42. package/dist/Combobox-CxRAYOBt.js.map +1 -0
  43. package/dist/{Command-BDU3C1gg.js → Command-BU_cVurn.js} +4 -4
  44. package/dist/{Command-BDU3C1gg.js.map → Command-BU_cVurn.js.map} +1 -1
  45. package/dist/{CopyField-BHRQUyuF.js → CopyField-6_c-NdLO.js} +17 -53
  46. package/dist/{CopyField-BHRQUyuF.js.map → CopyField-6_c-NdLO.js.map} +1 -1
  47. package/dist/{DateInput-B6N8g0ra.js → DateInput-DyEErfJf.js} +6 -6
  48. package/dist/{DateInput-B6N8g0ra.js.map → DateInput-DyEErfJf.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-Dg7-VUd9.js} +10 -14
  52. package/dist/DateRangeInput-Dg7-VUd9.js.map +1 -0
  53. package/dist/{DateRangePicker-DjSUFjh4.js → DateRangePicker-BoPnh4aH.js} +9 -13
  54. package/dist/DateRangePicker-BoPnh4aH.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-2wMXQ0Qw.js} +12 -25
  59. package/dist/FieldItem-2wMXQ0Qw.js.map +1 -0
  60. package/dist/{FieldItem-vhIJW4pj.d.ts → FieldItem-CPN1xjN5.d.ts} +11 -25
  61. package/dist/{FileUpload-DYQCTGjU.js → FileUpload-C83tXuE2.js} +11 -16
  62. package/dist/{FileUpload-DYQCTGjU.js.map → FileUpload-C83tXuE2.js.map} +1 -1
  63. package/dist/{Form-CcK7dRrC.js → Form-95rVLfX8.js} +15 -23
  64. package/dist/{Form-CcK7dRrC.js.map → Form-95rVLfX8.js.map} +1 -1
  65. package/dist/{FormGroup-DR_gZ25-.js → FormGroup-CmNiAtU6.js} +11 -17
  66. package/dist/FormGroup-CmNiAtU6.js.map +1 -0
  67. package/dist/{FullScreenModal-CN9nAs72.js → FullScreenModal-CD7mYeTz.js} +15 -29
  68. package/dist/FullScreenModal-CD7mYeTz.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-B4QOPxHl.js} +11 -13
  72. package/dist/InputGroup-B4QOPxHl.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-BQvz6bhv.js} +16 -34
  78. package/dist/MermaidDiagram-BQvz6bhv.js.map +1 -0
  79. package/dist/{Modal-I3VWk2oo.js → Modal-Driyqs_N.js} +17 -34
  80. package/dist/Modal-Driyqs_N.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-BPnmzBtw.js} +3 -3
  84. package/dist/{MultiActionButtonGroup-CYZ8IgSf.js.map → MultiActionButtonGroup-BPnmzBtw.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-DOAtAnfL.js} +12 -42
  94. package/dist/PageToolbar-DOAtAnfL.js.map +1 -0
  95. package/dist/{Pagination-C_b7Xhey.js → Pagination-LaSg-5cl.js} +3 -3
  96. package/dist/{Pagination-C_b7Xhey.js.map → Pagination-LaSg-5cl.js.map} +1 -1
  97. package/dist/{Popconfirm-5pBzT_HQ.js → Popconfirm-SLz0zodk.js} +3 -3
  98. package/dist/{Popconfirm-5pBzT_HQ.js.map → Popconfirm-SLz0zodk.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-CEfQDNl3.js} +8 -13
  106. package/dist/SearchInput-CEfQDNl3.js.map +1 -0
  107. package/dist/{SectionNav-CNLJsiVG.js → SectionNav-B_qf0AXi.js} +10 -42
  108. package/dist/SectionNav-B_qf0AXi.js.map +1 -0
  109. package/dist/{Select-DV3Hak_l.js → Select-ByRvkZ3D.js} +8 -11
  110. package/dist/{Select-DV3Hak_l.js.map → Select-ByRvkZ3D.js.map} +1 -1
  111. package/dist/{Sheet-OparjIi-.js → Sheet-C-yXk5Da.js} +5 -9
  112. package/dist/Sheet-C-yXk5Da.js.map +1 -0
  113. package/dist/{Sidebar-CLEbBtNY.js → Sidebar-Ds0E6PbR.js} +16 -33
  114. package/dist/Sidebar-Ds0E6PbR.js.map +1 -0
  115. package/dist/{Slider-DLclvRws.js → Slider-DWdu9NuM.js} +3 -3
  116. package/dist/{Slider-DLclvRws.js.map → Slider-DWdu9NuM.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-Dt9oLYHC.js} +3 -3
  124. package/dist/{Tabs-eB974xJf.js.map → Tabs-Dt9oLYHC.js.map} +1 -1
  125. package/dist/{TextInput-CFTf4Cz1.js → TextInput-CDG2XpBl.js} +10 -14
  126. package/dist/TextInput-CDG2XpBl.js.map +1 -0
  127. package/dist/{ThemeProvider-DAmNn9Sd.js → ThemeProvider-DXsxFg1U.js} +13 -31
  128. package/dist/ThemeProvider-DXsxFg1U.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-BzXVfgnI.js} +5 -19
  138. package/dist/ZoomableSvg-BzXVfgnI.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 +1151 -1838
  158. package/dist/index.js +68 -67
  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 +161 -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 +2 -2
  226. package/dist/internal/components/Combobox.js +2 -2
  227. package/dist/internal/components/DatePicker.js +1 -1
  228. package/dist/internal/components/DateRangePicker.js +1 -1
  229. package/dist/internal/components/DropdownMenu.js +1 -1
  230. package/dist/internal/components/FileUpload.js +1 -1
  231. package/dist/internal/components/FullScreenModal.js +1 -1
  232. package/dist/internal/components/HoverCard.js +1 -1
  233. package/dist/internal/components/InputGroup.js +1 -1
  234. package/dist/internal/components/Kbd.js +1 -1
  235. package/dist/internal/components/MarkedText.js +1 -1
  236. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +1 -1
  237. package/dist/internal/components/Modal.js +1 -1
  238. package/dist/internal/components/Navbar.js +1 -1
  239. package/dist/internal/components/Pagination.js +1 -1
  240. package/dist/internal/components/PanelWithDetails.js +1 -1
  241. package/dist/internal/components/Popconfirm.js +1 -1
  242. package/dist/internal/components/Popover.js +1 -1
  243. package/dist/internal/components/RadioGroup.js +1 -1
  244. package/dist/internal/components/Search.js +1 -1
  245. package/dist/internal/components/Select.js +1 -1
  246. package/dist/internal/components/Separator.js.map +1 -1
  247. package/dist/internal/components/Sheet.js +1 -1
  248. package/dist/internal/components/Sidebar.js +1 -1
  249. package/dist/internal/components/Skeleton/Skeleton.js +5 -9
  250. package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
  251. package/dist/internal/components/Slider.js +1 -1
  252. package/dist/internal/components/SpotlightBackdrop.js +3 -8
  253. package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
  254. package/dist/internal/components/StatusDot.js +8 -15
  255. package/dist/internal/components/StatusDot.js.map +1 -1
  256. package/dist/internal/components/Stepper.js +1 -1
  257. package/dist/internal/components/Switch.js +1 -1
  258. package/dist/internal/components/Table.js +1 -1
  259. package/dist/internal/components/Tabs.js +1 -1
  260. package/dist/internal/components/ThemeProvider.js +3 -3
  261. package/dist/internal/components/TimePicker.js +1 -1
  262. package/dist/internal/components/Timeline.js +1 -1
  263. package/dist/internal/components/Toast.js +2 -2
  264. package/dist/internal/components/Tooltip.js +1 -1
  265. package/dist/internal/components/Truncated.js +4 -8
  266. package/dist/internal/components/Truncated.js.map +1 -1
  267. package/dist/internal/components/Workbench.js +1 -1
  268. package/dist/internal/components/ZoomableSvg.js +1 -1
  269. package/dist/internal/hooks/useScrollbarPosition.js +1 -1
  270. package/dist/internal/hooks/useStableCallback.js +4 -13
  271. package/dist/internal/hooks/useStableCallback.js.map +1 -1
  272. package/dist/internal/utils.js +2 -2
  273. package/dist/markdown-editor.d.ts +15 -37
  274. package/dist/markdown-editor.js +17 -23
  275. package/dist/markdown-editor.js.map +1 -1
  276. package/dist/mermaid.d.ts +4 -6
  277. package/dist/mermaid.js +1 -1
  278. package/dist/rjsf.d.ts +9 -19
  279. package/dist/rjsf.js +44 -84
  280. package/dist/rjsf.js.map +1 -1
  281. package/dist/{styles-BAFscjSV.js → styles-gzcjOyKv.js} +6 -6
  282. package/dist/styles-gzcjOyKv.js.map +1 -0
  283. package/dist/styles.css +1 -1
  284. package/dist/svgTransforms-Dw2hRA-i.js +51 -0
  285. package/dist/svgTransforms-Dw2hRA-i.js.map +1 -0
  286. package/dist/testing.d.ts +3 -10
  287. package/dist/testing.js +5 -12
  288. package/dist/testing.js.map +1 -1
  289. package/dist/themeTokens-7DEab0kp.js +31 -0
  290. package/dist/themeTokens-7DEab0kp.js.map +1 -0
  291. package/dist/{toast-DIC0iNRf.js → toast-CyXEdaCZ.js} +3 -3
  292. package/dist/toast-CyXEdaCZ.js.map +1 -0
  293. package/dist/{themeScopeContext-D7fSyb06.js → useColorSchemeState-Cw4MCXUs.js} +14 -14
  294. package/dist/useColorSchemeState-Cw4MCXUs.js.map +1 -0
  295. package/dist/{useControllableState-M6494mCT.js → useControllableState-CUYXMsfz.js} +3 -7
  296. package/dist/useControllableState-CUYXMsfz.js.map +1 -0
  297. package/dist/useElement-D-RjrGa4.js +21 -0
  298. package/dist/useElement-D-RjrGa4.js.map +1 -0
  299. package/dist/useThemeAttributes-B199Regy.js +67 -0
  300. package/dist/useThemeAttributes-B199Regy.js.map +1 -0
  301. package/dist/{utils-BW4AE8VP.js → utils-Bd28bWgm.js} +31 -26
  302. package/dist/utils-Bd28bWgm.js.map +1 -0
  303. package/dist/vega.d.ts +8 -30
  304. package/dist/vega.js +5 -13
  305. package/dist/vega.js.map +1 -1
  306. package/dist/{vegaTheme-CSvFEMBl.js → vegaTheme-VQMWTlBw.js} +7 -21
  307. package/dist/vegaTheme-VQMWTlBw.js.map +1 -0
  308. package/package.json +10 -9
  309. package/src/styles.css +120 -14
  310. package/src/theme.css +126 -6
  311. package/dist/AIKit-ELIsegJz.js.map +0 -1
  312. package/dist/Alert-BsIM_oFK.js.map +0 -1
  313. package/dist/AlertModal-BGJdaRRj.js.map +0 -1
  314. package/dist/AppShell-DRgJxpXW.js.map +0 -1
  315. package/dist/Badge-o5jURtpB.js.map +0 -1
  316. package/dist/BrandLogo-CoKBk4MI.js.map +0 -1
  317. package/dist/Breadcrumb-xqEUxfwn.js.map +0 -1
  318. package/dist/Button-DsRrU5F1.js.map +0 -1
  319. package/dist/Calendar-cG5NIJ4O.js.map +0 -1
  320. package/dist/Card-Dyo7055Q.js.map +0 -1
  321. package/dist/Checkbox-Dq5fPNrO.js.map +0 -1
  322. package/dist/CodeEditor-BJKJXA0c.js.map +0 -1
  323. package/dist/ColorInput-Bj3dfPFA.js.map +0 -1
  324. package/dist/ColorModeSwitch-CWt-DZGC.js.map +0 -1
  325. package/dist/Combobox-D8PrEqTG.js +0 -619
  326. package/dist/Combobox-D8PrEqTG.js.map +0 -1
  327. package/dist/DateRangeInput-7M9Z4cVO.js.map +0 -1
  328. package/dist/DateRangePicker-DjSUFjh4.js.map +0 -1
  329. package/dist/DropdownMenu-CgVwhDvl.js.map +0 -1
  330. package/dist/FieldItem-DZGIdiXE.js.map +0 -1
  331. package/dist/FormGroup-DR_gZ25-.js.map +0 -1
  332. package/dist/FullScreenModal-CN9nAs72.js.map +0 -1
  333. package/dist/InputGroup-Do8K2hvD.js.map +0 -1
  334. package/dist/Kbd-LCFMumoq.js.map +0 -1
  335. package/dist/MermaidDiagram-ZG0iiDV_.js.map +0 -1
  336. package/dist/Modal-I3VWk2oo.js.map +0 -1
  337. package/dist/ModalTitle-CeLM_mX9.js.map +0 -1
  338. package/dist/PageHeader-Q3IpCnQd.js.map +0 -1
  339. package/dist/PageLayout-DSVM-ASz.js.map +0 -1
  340. package/dist/PageToolbar-BKVJiDAL.js.map +0 -1
  341. package/dist/Popover-BEbQrC_P.js.map +0 -1
  342. package/dist/SearchInput-92r2bkA7.js.map +0 -1
  343. package/dist/SectionNav-CNLJsiVG.js.map +0 -1
  344. package/dist/Sheet-OparjIi-.js.map +0 -1
  345. package/dist/Sidebar-CLEbBtNY.js.map +0 -1
  346. package/dist/TextInput-CFTf4Cz1.js.map +0 -1
  347. package/dist/ThemeProvider-DAmNn9Sd.js.map +0 -1
  348. package/dist/ZoomableSvg-BZlk3PFJ.js.map +0 -1
  349. package/dist/context-D7X470dy.js.map +0 -1
  350. package/dist/findLiteralMatches-BGBw8Vbl.js.map +0 -1
  351. package/dist/icons-Cek151jC.js.map +0 -1
  352. package/dist/styles-BAFscjSV.js.map +0 -1
  353. package/dist/svgTransforms-CJAYPk7o.js +0 -81
  354. package/dist/svgTransforms-CJAYPk7o.js.map +0 -1
  355. package/dist/themeScopeContext-D7fSyb06.js.map +0 -1
  356. package/dist/themeTokens-qP1-55O7.js +0 -119
  357. package/dist/themeTokens-qP1-55O7.js.map +0 -1
  358. package/dist/toast-DIC0iNRf.js.map +0 -1
  359. package/dist/useControllableState-M6494mCT.js.map +0 -1
  360. package/dist/useElement-BK3AAiIf.js +0 -24
  361. package/dist/useElement-BK3AAiIf.js.map +0 -1
  362. package/dist/utils-BW4AE8VP.js.map +0 -1
  363. package/dist/vegaTheme-CSvFEMBl.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { useArgoDesign } from "./context-D7X470dy.js";
2
+ import { useArgoDesign } from "./context-U293r3v-.js";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/Card/styles.ts
@@ -13,7 +13,7 @@ const cardClassnames = cva([
13
13
  defaultVariants: { padding: "small" },
14
14
  variants: {
15
15
  bordered: {
16
- true: "tw:border tw:border-solid tw:border-neutral-200 tw:data-[argo=true]:border-border",
16
+ true: "tw:border tw:border-solid tw:border-border",
17
17
  false: "tw:shadow-raised tw:data-[argo=true]:shadow-sm"
18
18
  },
19
19
  padding: {
@@ -31,7 +31,7 @@ const cardHeaderClassnames = cva("tw:flex", {
31
31
  },
32
32
  variants: {
33
33
  divider: {
34
- true: "tw:min-h-16 tw:border-b tw:border-neutral-200 tw:px-6 tw:py-2 tw:data-[argo=true]:border-border",
34
+ true: "tw:min-h-16 tw:border-b tw:border-border tw:px-6 tw:py-2",
35
35
  false: ""
36
36
  },
37
37
  layout: {
@@ -102,4 +102,4 @@ Card.Title = CardTitle;
102
102
  //#endregion
103
103
  export { Card };
104
104
 
105
- //# sourceMappingURL=Card-Dyo7055Q.js.map
105
+ //# sourceMappingURL=Card-Cr9MBNHu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card-Cr9MBNHu.js","names":[],"sources":["../src/components/Card/styles.ts","../src/components/Card/CardContent.tsx","../src/components/Card/CardHeader.tsx","../src/components/Card/CardTitle.tsx","../src/components/Card/Card.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\n\nexport const cardClassnames = cva(\n ['tw:flex', 'tw:flex-col', 'tw:rounded-lg', 'tw:bg-card', 'tw:text-card-foreground'],\n {\n defaultVariants: {\n padding: 'small',\n },\n variants: {\n bordered: {\n true: 'tw:border tw:border-solid tw:border-border',\n false: 'tw:shadow-raised tw:data-[argo=true]:shadow-sm',\n },\n // `none` drops the gap too: slots own their padding, so a gap would\n // double-space a `Card.Header divider`.\n padding: {\n none: 'tw:p-0',\n small: 'tw:gap-4 tw:px-6 tw:py-4',\n medium: 'tw:gap-4 tw:p-7',\n large: 'tw:gap-4 tw:p-8',\n },\n },\n },\n);\n\nexport const cardHeaderClassnames = cva('tw:flex', {\n defaultVariants: {\n divider: false,\n layout: 'row',\n },\n variants: {\n // No `border-solid`: it would give the other sides a 3px `medium` border.\n // `min-h-16` holds one height with or without a button; keep padding under it.\n divider: {\n true: 'tw:min-h-16 tw:border-b tw:border-border tw:px-6 tw:py-2',\n false: '',\n },\n layout: {\n row: 'tw:items-center tw:justify-between tw:gap-4',\n inline: 'tw:items-center tw:gap-3',\n stack: 'tw:flex-col tw:gap-1.5',\n },\n },\n});\n\nexport const cardContentClassnames = cva('', {\n defaultVariants: {\n padded: false,\n },\n variants: {\n padded: {\n true: 'tw:px-6 tw:py-5',\n false: '',\n },\n },\n});\n\nexport const cardTitleClassnames = cn(\n 'tw:m-0',\n 'tw:leading-6',\n 'tw:font-medium',\n 'tw:text-base',\n 'tw:text-card-foreground',\n);\n","import type { HTMLAttributes } from 'react';\n\nimport { cardContentClassnames } from './styles';\n\ntype Props = HTMLAttributes<HTMLDivElement> & {\n /** Applies the standard body padding. Use with `Card padding=\"none\"`, where the\n * root adds none — otherwise the padding is doubled. */\n padded?: boolean;\n};\n\nexport const CardContent = ({ children, className, padded = false, ...rest }: Props) => (\n // `|| undefined` so an unpadded, unstyled content slot stays attribute-free\n // rather than rendering `class=\"\"`.\n <div {...rest} className={cardContentClassnames({ className, padded }) || undefined}>\n {children}\n </div>\n);\n","import type { HTMLAttributes } from 'react';\n\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { cardHeaderClassnames } from './styles';\n\ntype Props = HTMLAttributes<HTMLDivElement> & {\n /** Bottom rule plus own padding and a 64px min height. Full-bleed only with `Card padding=\"none\"`. */\n divider?: boolean;\n /** `row`: title left, actions right. `inline`: together, e.g. title + badge.\n * `stack`: description under the title. */\n layout?: 'row' | 'inline' | 'stack';\n};\n\nexport const CardHeader = ({\n children,\n className,\n divider = false,\n layout = 'row',\n ...rest\n}: Props) => {\n const renderArgo = useArgoDesign();\n return (\n <div\n {...rest}\n data-argo={renderArgo}\n className={cardHeaderClassnames({ className, divider, layout })}\n >\n {children}\n </div>\n );\n};\n","import type { HTMLAttributes } from 'react';\n\nimport { cn } from '../../utils';\n\nimport { cardTitleClassnames } from './styles';\n\ntype HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\ntype Props = HTMLAttributes<HTMLHeadingElement> & {\n /** Heading tag to render. Defaults to `h3`; set explicitly to avoid a heading-order skip\n * (e.g. `as=\"h2\"` when the Card sits directly under a page's `h1`). */\n as?: HeadingLevel;\n};\n\nexport const CardTitle = ({ children, className, as: Tag = 'h3', ...rest }: Props) => (\n <Tag className={cn(cardTitleClassnames, className)} {...rest}>\n {children}\n </Tag>\n);\n","import type { HTMLAttributes } from 'react';\nimport type { VariantProps } from 'class-variance-authority';\n\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { CardContent } from './CardContent';\nimport { CardHeader } from './CardHeader';\nimport { CardTitle } from './CardTitle';\nimport { cardClassnames } from './styles';\n\ntype Props = HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardClassnames>;\n\nexport const Card = ({\n children,\n className,\n bordered = false,\n padding = 'small',\n ...rest\n}: Props) => {\n const renderArgo = useArgoDesign();\n return (\n <div\n {...rest}\n data-argo={renderArgo}\n className={cardClassnames({ className, bordered, padding })}\n >\n {children}\n </div>\n );\n};\n\nCard.Header = CardHeader;\nCard.Content = CardContent;\nCard.Title = CardTitle;\n"],"mappings":";;;;;AAIA,MAAa,iBAAiB,IAC5B;CAAC;CAAW;CAAe;CAAiB;CAAc;AAAyB,GACnF;CACE,iBAAiB,EACf,SAAS,QACX;CACA,UAAU;EACR,UAAU;GACR,MAAM;GACN,OAAO;EACT;EAGA,SAAS;GACP,MAAM;GACN,OAAO;GACP,QAAQ;GACR,OAAO;EACT;CACF;AACF,CACF;AAEA,MAAa,uBAAuB,IAAI,WAAW;CACjD,iBAAiB;EACf,SAAS;EACT,QAAQ;CACV;CACA,UAAU;EAGR,SAAS;GACP,MAAM;GACN,OAAO;EACT;EACA,QAAQ;GACN,KAAK;GACL,QAAQ;GACR,OAAO;EACT;CACF;AACF,CAAC;AAED,MAAa,wBAAwB,IAAI,IAAI;CAC3C,iBAAiB,EACf,QAAQ,MACV;CACA,UAAU,EACR,QAAQ;EACN,MAAM;EACN,OAAO;CACT,EACF;AACF,CAAC;AAED,MAAa,sBAAsB,GACjC,UACA,gBACA,kBACA,gBACA,yBACF;;;ACvDA,MAAa,eAAe,EAAE,UAAU,WAAW,SAAS,OAAO,GAAG,WAGpE,oBAAC,OAAD;CAAK,GAAI;CAAM,WAAW,sBAAsB;EAAE;EAAW;CAAO,CAAC,KAAK,KAAA;CACvE;AACE,CAAA;;;ACDP,MAAa,cAAc,EACzB,UACA,WACA,UAAU,OACV,SAAS,OACT,GAAG,WACQ;CACX,MAAM,aAAa,cAAc;CACjC,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,aAAW;EACX,WAAW,qBAAqB;GAAE;GAAW;GAAS;EAAO,CAAC;EAE7D;CACE,CAAA;AAET;;;ACjBA,MAAa,aAAa,EAAE,UAAU,WAAW,IAAI,MAAM,MAAM,GAAG,WAClE,oBAAC,KAAD;CAAK,WAAW,GAAG,qBAAqB,SAAS;CAAG,GAAI;CACrD;AACE,CAAA;;;ACLP,MAAa,QAAQ,EACnB,UACA,WACA,WAAW,OACX,UAAU,SACV,GAAG,WACQ;CACX,MAAM,aAAa,cAAc;CACjC,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,aAAW;EACX,WAAW,eAAe;GAAE;GAAW;GAAU;EAAQ,CAAC;EAEzD;CACE,CAAA;AAET;AAEA,KAAK,SAAS;AACd,KAAK,UAAU;AACf,KAAK,QAAQ"}
@@ -1,7 +1,7 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { Tooltip } from "./utils-BW4AE8VP.js";
3
- import { useArgoDesign } from "./context-D7X470dy.js";
4
- import { Check, Minus } from "./icons-Cek151jC.js";
2
+ import { Tooltip } from "./utils-Bd28bWgm.js";
3
+ import { useArgoDesign } from "./context-U293r3v-.js";
4
+ import { Check, Minus } from "./icons-wcA70iQx.js";
5
5
  import { FieldBox } from "./FieldBox-D7DYtX_m.js";
6
6
  import { useId } from "react";
7
7
  import { cva } from "class-variance-authority";
@@ -94,4 +94,4 @@ function Checkbox({ className, id: idProp, children, description, variant, posit
94
94
  //#endregion
95
95
  export { Checkbox };
96
96
 
97
- //# sourceMappingURL=Checkbox-Dq5fPNrO.js.map
97
+ //# sourceMappingURL=Checkbox-8yIIgY7g.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox-8yIIgY7g.js","names":[],"sources":["../src/components/Checkbox/styles.ts","../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const rootVariants = cva(\n [\n // reset\n 'tailwindcss-preflight',\n\n // position\n 'tw:flex',\n 'tw:items-center',\n 'tw:justify-center',\n\n 'tw:peer',\n 'tw:size-4',\n 'tw:shrink-0',\n 'tw:cursor-pointer',\n\n // border\n 'tw:border',\n 'tw:border-solid',\n\n // disabled\n 'tw:disabled:opacity-50',\n 'tw:disabled:cursor-not-allowed',\n ],\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: [\n 'tw:rounded',\n 'tw:border-neutral-200',\n\n 'tw:data-[state=checked]:bg-primary',\n 'tw:data-[state=checked]:border-primary',\n\n 'tw:data-[state=indeterminate]:bg-white',\n 'tw:data-[state=indeterminate]:border-neutral-200',\n ],\n argo: [\n 'tw:rounded',\n 'tw:border-input',\n 'tw:transition-colors',\n\n 'tw:data-[state=checked]:bg-primary',\n 'tw:data-[state=checked]:border-primary',\n\n 'tw:data-[state=indeterminate]:bg-primary',\n 'tw:data-[state=indeterminate]:border-primary',\n\n // focus\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:border-primary',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-ring/50',\n ],\n },\n },\n },\n);\n\nexport const indicatorVariants = cva(['tw:group', 'tw:flex', 'tw:items-center'], {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: [\n 'tw:data-[state=checked]:text-primary-foreground',\n 'tw:data-[state=indeterminate]:text-neutral-200',\n ],\n argo: ['tw:text-primary-foreground'],\n },\n },\n});\n","import { useId } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\nimport type { CheckedState } from '@radix-ui/react-checkbox';\nimport { Indicator, Root } from '@radix-ui/react-checkbox';\nimport type { VariantProps } from 'class-variance-authority';\n\nimport { Check, Minus } from '../../icons';\nimport { cn } from '../../utils';\nimport { FieldBox } from '../FieldBox';\nimport type { fieldBoxVariants } from '../FieldBox/styles';\nimport { useArgoDesign } from '../ThemeProvider/context';\nimport type { Props as TooltipProps } from '../Tooltip';\nimport { Tooltip } from '../Tooltip';\n\nimport { indicatorVariants, rootVariants } from './styles';\n\ntype Props = {\n id?: string | number;\n description?: ReactNode;\n variant?: VariantProps<typeof fieldBoxVariants>['variant'];\n position?: 'start' | 'end';\n tooltip?: TooltipProps['tooltip'];\n tooltipPlacement?: TooltipProps['placement'];\n} & Omit<ComponentProps<typeof Root>, 'id'>;\n\nexport function Checkbox(\n prop: Omit<Props, 'checked' | 'onCheckedChange'> & {\n checked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n },\n): ReactNode;\n\nexport function Checkbox(\n prop: Omit<Props, 'checked' | 'onCheckedChange'> & {\n checked?: CheckedState;\n onCheckedChange?: (checked: CheckedState) => void;\n },\n): ReactNode;\n\nexport function Checkbox({\n className,\n id: idProp,\n children,\n description,\n variant,\n position,\n tooltip,\n tooltipPlacement = 'top',\n ...rest\n}: Props) {\n const fallbackId = useId();\n const id = idProp?.toString() ?? fallbackId;\n const styleVariant = useArgoDesign() ? 'argo' : 'default';\n\n const checkboxElement = (\n <Root id={id} {...rest} className={cn(rootVariants({ variant: styleVariant, className }))}>\n <Indicator className={cn(indicatorVariants({ variant: styleVariant }))}>\n <Check className=\"tw:hidden tw:size-3 tw:stroke-[4px] tw:group-data-[state=checked]:block\" />\n <Minus className=\"tw:hidden tw:size-3 tw:stroke-[4px] tw:group-data-[state=indeterminate]:block\" />\n </Indicator>\n </Root>\n );\n\n const rendered = !children ? (\n checkboxElement\n ) : (\n <FieldBox htmlFor={id} variant={variant} position={position} control={checkboxElement}>\n <FieldBox.Title>{children}</FieldBox.Title>\n {description && <FieldBox.Description>{description}</FieldBox.Description>}\n </FieldBox>\n );\n\n if (!tooltip) return rendered;\n\n // `asChild` only onto the labelled FieldBox: on the bare Radix `Root` the tooltip's\n // `data-state` overwrites the checkbox's and it stops toggling.\n return (\n <Tooltip tooltip={tooltip} placement={tooltipPlacement} triggerAsChild={!!children}>\n {rendered}\n </Tooltip>\n );\n}\n"],"mappings":";;;;;;;;;;AAEA,MAAa,eAAe,IAC1B;CAEE;CAGA;CACA;CACA;CAEA;CACA;CACA;CACA;CAGA;CACA;CAGA;CACA;AACF,GACA;CACE,iBAAiB,EACf,SAAS,UACX;CACA,UAAU,EACR,SAAS;EACP,SAAS;GACP;GACA;GAEA;GACA;GAEA;GACA;EACF;EACA,MAAM;GACJ;GACA;GACA;GAEA;GACA;GAEA;GACA;GAGA;GACA;GACA;GACA;EACF;CACF,EACF;AACF,CACF;AAEA,MAAa,oBAAoB,IAAI;CAAC;CAAY;CAAW;AAAiB,GAAG;CAC/E,iBAAiB,EACf,SAAS,UACX;CACA,UAAU,EACR,SAAS;EACP,SAAS,CACP,mDACA,gDACF;EACA,MAAM,CAAC,4BAA4B;CACrC,EACF;AACF,CAAC;;;ACrCD,SAAgB,SAAS,EACvB,WACA,IAAI,QACJ,UACA,aACA,SACA,UACA,SACA,mBAAmB,OACnB,GAAG,QACK;CACR,MAAM,aAAa,MAAM;CACzB,MAAM,KAAK,QAAQ,SAAS,KAAK;CACjC,MAAM,eAAe,cAAc,IAAI,SAAS;CAEhD,MAAM,kBACJ,oBAAC,MAAD;EAAU;EAAI,GAAI;EAAM,WAAW,GAAG,aAAa;GAAE,SAAS;GAAc;EAAU,CAAC,CAAC;EACtF,UAAA,qBAAC,WAAD;GAAW,WAAW,GAAG,kBAAkB,EAAE,SAAS,aAAa,CAAC,CAAC;GAArE,UAAA,CACE,oBAAC,OAAD,EAAO,WAAU,0EAA2E,CAAA,GAC5F,oBAAC,OAAD,EAAO,WAAU,gFAAiF,CAAA,CACzF;;CACP,CAAA;CAGR,MAAM,WAAW,CAAC,WAChB,kBAEA,qBAAC,UAAD;EAAU,SAAS;EAAa;EAAmB;EAAU,SAAS;EAAtE,UAAA,CACE,oBAAC,SAAS,OAAV,EAAiB,SAAyB,CAAA,GACzC,eAAe,oBAAC,SAAS,aAAV,EAAA,UAAuB,YAAkC,CAAA,CACjE;;CAGZ,IAAI,CAAC,SAAS,OAAO;CAIrB,OACE,oBAAC,SAAD;EAAkB;EAAS,WAAW;EAAkB,gBAAgB,CAAC,CAAC;EACvE,UAAA;CACM,CAAA;AAEb"}
@@ -1,5 +1,5 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { Tooltip, copyToClipboard } from "./utils-BW4AE8VP.js";
2
+ import { Tooltip, copyToClipboard } from "./utils-Bd28bWgm.js";
3
3
  import { useState } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/Clipboard/Clipboard.tsx
@@ -55,4 +55,4 @@ const Clipboard = ({ ref, text: textProp, children, tooltip = "Copy to Clipboard
55
55
  //#endregion
56
56
  export { Clipboard };
57
57
 
58
- //# sourceMappingURL=Clipboard-BZitKiSA.js.map
58
+ //# sourceMappingURL=Clipboard-_xf6hMDD.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Clipboard-BZitKiSA.js","names":[],"sources":["../src/components/Clipboard/Clipboard.tsx"],"sourcesContent":["import { useState } from 'react';\nimport type { ComponentProps, MouseEventHandler } from 'react';\n\nimport { cn, copyToClipboard } from '../../utils';\nimport { type Props as TooltipProps, Tooltip } from '../Tooltip';\n\ntype Props = {\n tooltip?: TooltipProps['tooltip'];\n tooltipPlacement?: TooltipProps['placement'];\n tooltipVariant?: TooltipProps['variant'];\n asChild?: TooltipProps['triggerAsChild'];\n text?: string | (() => string);\n} & ComponentProps<'button'>;\n\nexport const Clipboard = ({\n ref,\n text: textProp,\n children,\n tooltip = 'Copy to Clipboard',\n tooltipPlacement = 'top',\n tooltipVariant: tooltipVariantProp = 'action',\n asChild = false,\n onClick,\n className,\n ...restButtonProps\n}: Props) => {\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const [state, setState] = useState<'ready' | 'copied' | 'error'>('ready');\n const text = typeof textProp === 'function' ? textProp() : textProp;\n\n const copy = async (text: string) => {\n try {\n // For the clipboard feature to work reliably, the window must be in focus for security reasons.\n // However, the button can be clicked without the window being focused.\n if (!document.hasFocus()) window.focus();\n\n await copyToClipboard(text);\n setState('copied');\n } catch {\n setState('error');\n }\n };\n\n const handleOnClick: MouseEventHandler<HTMLButtonElement> = (event) => {\n // Open on click rather than waiting for hover. Radix opens on pointer-enter via a\n // `delayDuration` timer (300ms here), so clicking faster than that left the outcome invisible\n // until the timer caught up — the message was already rendered, just inside a closed tooltip.\n setIsTooltipOpen(true);\n if (text && state === 'ready') void copy(text);\n onClick?.(event);\n };\n\n const handleOnOpenChange: ComponentProps<typeof Tooltip.Root>['onOpenChange'] = (open) => {\n // Reset when the tooltip closes, allowing the user to leave the copy button.\n if (!open && state !== 'ready') setState('ready');\n setIsTooltipOpen(open);\n };\n\n const tooltipContent = (() => {\n if (!text) return 'Nothing to copy';\n if (state === 'error') return 'Failed to copy';\n if (state === 'copied') return 'Copied to Clipboard';\n return tooltip;\n })();\n\n const tooltipVariant: TooltipProps['variant'] =\n state === 'ready' && !!text ? tooltipVariantProp : 'action';\n\n // `tooltip={null}` leaves nothing to say until there is an outcome. Not rendering `Content` at all\n // is what makes that work: hovering still opens the tooltip, there is simply nothing in it, and\n // the copied / failed message appears in place the moment `state` changes. It also keeps Radix\n // from pointing the trigger's `aria-describedby` at content that has no text.\n const hasTooltipContent = tooltipContent !== null && tooltipContent !== undefined;\n\n return (\n <Tooltip.Root open={isTooltipOpen} onOpenChange={handleOnOpenChange}>\n <Tooltip.Trigger\n {...restButtonProps}\n asChild={asChild}\n keepOpenOnClick\n onClick={handleOnClick}\n className={cn('tw:cursor-pointer', className)}\n ref={ref}\n >\n {children ?? text}\n </Tooltip.Trigger>\n\n {hasTooltipContent && (\n <Tooltip.Content\n keepOpenOnPointerDownOutside\n placement={tooltipPlacement}\n variant={tooltipVariant}\n >\n {tooltipContent}\n </Tooltip.Content>\n )}\n </Tooltip.Root>\n );\n};\n"],"mappings":";;;;;AAcA,MAAa,aAAa,EACxB,KACA,MAAM,UACN,UACA,UAAU,qBACV,mBAAmB,OACnB,gBAAgB,qBAAqB,UACrC,UAAU,OACV,SACA,WACA,GAAG,sBACQ;CACX,MAAM,CAAC,eAAe,oBAAoB,SAAS,KAAK;CACxD,MAAM,CAAC,OAAO,YAAY,SAAuC,OAAO;CACxE,MAAM,OAAO,OAAO,aAAa,aAAa,SAAS,IAAI;CAE3D,MAAM,OAAO,OAAO,SAAiB;EACnC,IAAI;GAGF,IAAI,CAAC,SAAS,SAAS,GAAG,OAAO,MAAM;GAEvC,MAAM,gBAAgB,IAAI;GAC1B,SAAS,QAAQ;EACnB,QAAQ;GACN,SAAS,OAAO;EAClB;CACF;CAEA,MAAM,iBAAuD,UAAU;EAIrE,iBAAiB,IAAI;EACrB,IAAI,QAAQ,UAAU,SAAS,KAAU,IAAI;EAC7C,UAAU,KAAK;CACjB;CAEA,MAAM,sBAA2E,SAAS;EAExF,IAAI,CAAC,QAAQ,UAAU,SAAS,SAAS,OAAO;EAChD,iBAAiB,IAAI;CACvB;CAEA,MAAM,wBAAwB;EAC5B,IAAI,CAAC,MAAM,OAAO;EAClB,IAAI,UAAU,SAAS,OAAO;EAC9B,IAAI,UAAU,UAAU,OAAO;EAC/B,OAAO;CACT,EAAA,CAAG;CAEH,MAAM,iBACJ,UAAU,WAAW,CAAC,CAAC,OAAO,qBAAqB;CAMrD,MAAM,oBAAoB,mBAAmB,QAAQ,mBAAmB,KAAA;CAExE,OACE,qBAAC,QAAQ,MAAT;EAAc,MAAM;EAAe,cAAc;EAAjD,UAAA,CACE,oBAAC,QAAQ,SAAT;GACE,GAAI;GACK;GACT,iBAAA;GACA,SAAS;GACT,WAAW,GAAG,qBAAqB,SAAS;GACvC;GAEJ,UAAA,YAAY;EACE,CAAA,GAEhB,qBACC,oBAAC,QAAQ,SAAT;GACE,8BAAA;GACA,WAAW;GACX,SAAS;GAER,UAAA;EACc,CAAA,CAEP;;AAElB"}
1
+ {"version":3,"file":"Clipboard-_xf6hMDD.js","names":[],"sources":["../src/components/Clipboard/Clipboard.tsx"],"sourcesContent":["import { useState } from 'react';\nimport type { ComponentProps, MouseEventHandler } from 'react';\n\nimport { cn, copyToClipboard } from '../../utils';\nimport { type Props as TooltipProps, Tooltip } from '../Tooltip';\n\ntype Props = {\n tooltip?: TooltipProps['tooltip'];\n tooltipPlacement?: TooltipProps['placement'];\n tooltipVariant?: TooltipProps['variant'];\n asChild?: TooltipProps['triggerAsChild'];\n text?: string | (() => string);\n} & ComponentProps<'button'>;\n\nexport const Clipboard = ({\n ref,\n text: textProp,\n children,\n tooltip = 'Copy to Clipboard',\n tooltipPlacement = 'top',\n tooltipVariant: tooltipVariantProp = 'action',\n asChild = false,\n onClick,\n className,\n ...restButtonProps\n}: Props) => {\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const [state, setState] = useState<'ready' | 'copied' | 'error'>('ready');\n const text = typeof textProp === 'function' ? textProp() : textProp;\n\n const copy = async (text: string) => {\n try {\n // For the clipboard feature to work reliably, the window must be in focus for security reasons.\n // However, the button can be clicked without the window being focused.\n if (!document.hasFocus()) window.focus();\n\n await copyToClipboard(text);\n setState('copied');\n } catch {\n setState('error');\n }\n };\n\n const handleOnClick: MouseEventHandler<HTMLButtonElement> = (event) => {\n // Open on click rather than waiting for hover. Radix opens on pointer-enter via a\n // `delayDuration` timer (300ms here), so clicking faster than that left the outcome invisible\n // until the timer caught up — the message was already rendered, just inside a closed tooltip.\n setIsTooltipOpen(true);\n if (text && state === 'ready') void copy(text);\n onClick?.(event);\n };\n\n const handleOnOpenChange: ComponentProps<typeof Tooltip.Root>['onOpenChange'] = (open) => {\n // Reset when the tooltip closes, allowing the user to leave the copy button.\n if (!open && state !== 'ready') setState('ready');\n setIsTooltipOpen(open);\n };\n\n const tooltipContent = (() => {\n if (!text) return 'Nothing to copy';\n if (state === 'error') return 'Failed to copy';\n if (state === 'copied') return 'Copied to Clipboard';\n return tooltip;\n })();\n\n const tooltipVariant: TooltipProps['variant'] =\n state === 'ready' && !!text ? tooltipVariantProp : 'action';\n\n // `tooltip={null}` leaves nothing to say until there is an outcome. Not rendering `Content` at all\n // is what makes that work: hovering still opens the tooltip, there is simply nothing in it, and\n // the copied / failed message appears in place the moment `state` changes. It also keeps Radix\n // from pointing the trigger's `aria-describedby` at content that has no text.\n const hasTooltipContent = tooltipContent !== null && tooltipContent !== undefined;\n\n return (\n <Tooltip.Root open={isTooltipOpen} onOpenChange={handleOnOpenChange}>\n <Tooltip.Trigger\n {...restButtonProps}\n asChild={asChild}\n keepOpenOnClick\n onClick={handleOnClick}\n className={cn('tw:cursor-pointer', className)}\n ref={ref}\n >\n {children ?? text}\n </Tooltip.Trigger>\n\n {hasTooltipContent && (\n <Tooltip.Content\n keepOpenOnPointerDownOutside\n placement={tooltipPlacement}\n variant={tooltipVariant}\n >\n {tooltipContent}\n </Tooltip.Content>\n )}\n </Tooltip.Root>\n );\n};\n"],"mappings":";;;;;AAcA,MAAa,aAAa,EACxB,KACA,MAAM,UACN,UACA,UAAU,qBACV,mBAAmB,OACnB,gBAAgB,qBAAqB,UACrC,UAAU,OACV,SACA,WACA,GAAG,sBACQ;CACX,MAAM,CAAC,eAAe,oBAAoB,SAAS,KAAK;CACxD,MAAM,CAAC,OAAO,YAAY,SAAuC,OAAO;CACxE,MAAM,OAAO,OAAO,aAAa,aAAa,SAAS,IAAI;CAE3D,MAAM,OAAO,OAAO,SAAiB;EACnC,IAAI;GAGF,IAAI,CAAC,SAAS,SAAS,GAAG,OAAO,MAAM;GAEvC,MAAM,gBAAgB,IAAI;GAC1B,SAAS,QAAQ;EACnB,QAAQ;GACN,SAAS,OAAO;EAClB;CACF;CAEA,MAAM,iBAAuD,UAAU;EAIrE,iBAAiB,IAAI;EACrB,IAAI,QAAQ,UAAU,SAAS,KAAU,IAAI;EAC7C,UAAU,KAAK;CACjB;CAEA,MAAM,sBAA2E,SAAS;EAExF,IAAI,CAAC,QAAQ,UAAU,SAAS,SAAS,OAAO;EAChD,iBAAiB,IAAI;CACvB;CAEA,MAAM,wBAAwB;EAC5B,IAAI,CAAC,MAAM,OAAO;EAClB,IAAI,UAAU,SAAS,OAAO;EAC9B,IAAI,UAAU,UAAU,OAAO;EAC/B,OAAO;CACT,EAAA,CAAG;CAEH,MAAM,iBACJ,UAAU,WAAW,CAAC,CAAC,OAAO,qBAAqB;CAMrD,MAAM,oBAAoB,mBAAmB,QAAQ,mBAAmB,KAAA;CAExE,OACE,qBAAC,QAAQ,MAAT;EAAc,MAAM;EAAe,cAAc;EAAjD,UAAA,CACE,oBAAC,QAAQ,SAAT;GACE,GAAI;GACK;GACT,iBAAA;GACA,SAAS;GACT,WAAW,GAAG,qBAAqB,SAAS;GACvC;GAEJ,UAAA,YAAY;EACE,CAAA,GAEhB,qBACC,oBAAC,QAAQ,SAAT;GACE,8BAAA;GACA,WAAW;GACX,SAAS;GAER,UAAA;EACc,CAAA,CAEP;;AAElB"}
@@ -1,6 +1,6 @@
1
- import { Copy } from "./icons-Cek151jC.js";
2
- import { Button, ButtonInline } from "./Button-DsRrU5F1.js";
3
- import { Clipboard } from "./Clipboard-BZitKiSA.js";
1
+ import { Copy } from "./icons-wcA70iQx.js";
2
+ import { Button, ButtonInline } from "./Button-Ca4Q3VJU.js";
3
+ import { Clipboard } from "./Clipboard-_xf6hMDD.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/blocks/ClipboardButton/ClipboardButton.tsx
6
6
  const DEFAULT_ICON = /* @__PURE__ */ jsx(Copy, {});
@@ -40,4 +40,4 @@ const ClipboardInline = ({ text, tooltip, tooltipPlacement, tooltipVariant, chil
40
40
  //#endregion
41
41
  export { ClipboardButton, ClipboardInline };
42
42
 
43
- //# sourceMappingURL=ClipboardButton-KHQnPEh_.js.map
43
+ //# sourceMappingURL=ClipboardButton-DHa1trtI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClipboardButton-KHQnPEh_.js","names":[],"sources":["../src/blocks/ClipboardButton/ClipboardButton.tsx","../src/blocks/ClipboardButton/ClipboardInline.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { Button } from '../../components/Button';\nimport { Clipboard } from '../../components/Clipboard';\nimport { Copy } from '../../icons';\n\ntype ClipboardProps = Pick<\n ComponentProps<typeof Clipboard>,\n 'text' | 'tooltip' | 'tooltipPlacement' | 'tooltipVariant'\n>;\n\ntype ButtonProps = Omit<ComponentProps<typeof Button>, 'disabled' | 'icon'>;\n\ntype Props = ClipboardProps & ButtonProps & { icon?: ReactNode };\n\nconst DEFAULT_ICON: ReactNode = <Copy />;\nconst DEFAULT_ARIA_LABEL = 'Copy';\n\nexport const ClipboardButton = ({\n // clipboard props\n text,\n tooltip,\n tooltipPlacement,\n tooltipVariant,\n\n // button props\n icon = DEFAULT_ICON,\n variant = 'outline',\n children,\n ...rest\n}: Props) => {\n // Icon-only (no text children): the `tooltip` is visual only, not an accessible\n // name, so fall back to it (when it's a string) or a sensible default. A\n // consumer-supplied `aria-label` in `rest` still wins.\n // A non-empty string tooltip names the action; an empty/absent tooltip still\n // needs a name, so fall back to the default rather than an empty aria-label.\n const defaultAriaLabel =\n typeof tooltip === 'string' && tooltip.trim() ? tooltip : DEFAULT_ARIA_LABEL;\n const ariaLabel = rest['aria-label'] ?? (children == null ? defaultAriaLabel : undefined);\n\n return (\n <Clipboard\n asChild\n tooltip={tooltip}\n tooltipPlacement={tooltipPlacement}\n tooltipVariant={tooltipVariant}\n text={text}\n >\n <Button {...rest} aria-label={ariaLabel} variant={variant} disabled={!text}>\n {icon}\n {children}\n </Button>\n </Clipboard>\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { ButtonInline } from '../../components/Button';\nimport { Clipboard } from '../../components/Clipboard';\nimport { Copy } from '../../icons';\n\ntype ClipboardProps = Pick<\n ComponentProps<typeof Clipboard>,\n 'text' | 'tooltip' | 'tooltipPlacement' | 'tooltipVariant'\n>;\n\ntype ButtonProps = Omit<ComponentProps<typeof ButtonInline>, 'disabled'>;\n\ntype Props = { hideIcon?: boolean } & ClipboardProps & ButtonProps;\n\nexport const ClipboardInline = ({\n // clipboard props\n text,\n tooltip,\n tooltipPlacement,\n tooltipVariant,\n\n // button props\n children = 'Copy To Clipboard',\n hideIcon = false,\n ...rest\n}: Props) => (\n <Clipboard\n asChild\n text={text}\n tooltip={tooltip}\n tooltipPlacement={tooltipPlacement}\n tooltipVariant={tooltipVariant}\n >\n <ButtonInline {...rest} disabled={!text}>\n {!hideIcon && <Copy className=\"tw:size-4\" />}\n {children}\n </ButtonInline>\n </Clipboard>\n);\n"],"mappings":";;;;;AAeA,MAAM,eAA0B,oBAAC,MAAD,CAAO,CAAA;AACvC,MAAM,qBAAqB;AAE3B,MAAa,mBAAmB,EAE9B,MACA,SACA,kBACA,gBAGA,OAAO,cACP,UAAU,WACV,UACA,GAAG,WACQ;CAMX,MAAM,mBACJ,OAAO,YAAY,YAAY,QAAQ,KAAK,IAAI,UAAU;CAC5D,MAAM,YAAY,KAAK,kBAAkB,YAAY,OAAO,mBAAmB,KAAA;CAE/E,OACE,oBAAC,WAAD;EACE,SAAA;EACS;EACS;EACF;EACV;EAEN,UAAA,qBAAC,QAAD;GAAQ,GAAI;GAAM,cAAY;GAAoB;GAAS,UAAU,CAAC;GAAtE,UAAA,CACG,MACA,QACK;;CACC,CAAA;AAEf;;;ACvCA,MAAa,mBAAmB,EAE9B,MACA,SACA,kBACA,gBAGA,WAAW,qBACX,WAAW,OACX,GAAG,WAEH,oBAAC,WAAD;CACE,SAAA;CACM;CACG;CACS;CACF;CAEhB,UAAA,qBAAC,cAAD;EAAc,GAAI;EAAM,UAAU,CAAC;EAAnC,UAAA,CACG,CAAC,YAAY,oBAAC,MAAD,EAAM,WAAU,YAAa,CAAA,GAC1C,QACW;;AACL,CAAA"}
1
+ {"version":3,"file":"ClipboardButton-DHa1trtI.js","names":[],"sources":["../src/blocks/ClipboardButton/ClipboardButton.tsx","../src/blocks/ClipboardButton/ClipboardInline.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { Button } from '../../components/Button';\nimport { Clipboard } from '../../components/Clipboard';\nimport { Copy } from '../../icons';\n\ntype ClipboardProps = Pick<\n ComponentProps<typeof Clipboard>,\n 'text' | 'tooltip' | 'tooltipPlacement' | 'tooltipVariant'\n>;\n\ntype ButtonProps = Omit<ComponentProps<typeof Button>, 'disabled' | 'icon'>;\n\ntype Props = ClipboardProps & ButtonProps & { icon?: ReactNode };\n\nconst DEFAULT_ICON: ReactNode = <Copy />;\nconst DEFAULT_ARIA_LABEL = 'Copy';\n\nexport const ClipboardButton = ({\n // clipboard props\n text,\n tooltip,\n tooltipPlacement,\n tooltipVariant,\n\n // button props\n icon = DEFAULT_ICON,\n variant = 'outline',\n children,\n ...rest\n}: Props) => {\n // Icon-only (no text children): the `tooltip` is visual only, not an accessible\n // name, so fall back to it (when it's a string) or a sensible default. A\n // consumer-supplied `aria-label` in `rest` still wins.\n // A non-empty string tooltip names the action; an empty/absent tooltip still\n // needs a name, so fall back to the default rather than an empty aria-label.\n const defaultAriaLabel =\n typeof tooltip === 'string' && tooltip.trim() ? tooltip : DEFAULT_ARIA_LABEL;\n const ariaLabel = rest['aria-label'] ?? (children == null ? defaultAriaLabel : undefined);\n\n return (\n <Clipboard\n asChild\n tooltip={tooltip}\n tooltipPlacement={tooltipPlacement}\n tooltipVariant={tooltipVariant}\n text={text}\n >\n <Button {...rest} aria-label={ariaLabel} variant={variant} disabled={!text}>\n {icon}\n {children}\n </Button>\n </Clipboard>\n );\n};\n","import type { ComponentProps } from 'react';\n\nimport { ButtonInline } from '../../components/Button';\nimport { Clipboard } from '../../components/Clipboard';\nimport { Copy } from '../../icons';\n\ntype ClipboardProps = Pick<\n ComponentProps<typeof Clipboard>,\n 'text' | 'tooltip' | 'tooltipPlacement' | 'tooltipVariant'\n>;\n\ntype ButtonProps = Omit<ComponentProps<typeof ButtonInline>, 'disabled'>;\n\ntype Props = { hideIcon?: boolean } & ClipboardProps & ButtonProps;\n\nexport const ClipboardInline = ({\n // clipboard props\n text,\n tooltip,\n tooltipPlacement,\n tooltipVariant,\n\n // button props\n children = 'Copy To Clipboard',\n hideIcon = false,\n ...rest\n}: Props) => (\n <Clipboard\n asChild\n text={text}\n tooltip={tooltip}\n tooltipPlacement={tooltipPlacement}\n tooltipVariant={tooltipVariant}\n >\n <ButtonInline {...rest} disabled={!text}>\n {!hideIcon && <Copy className=\"tw:size-4\" />}\n {children}\n </ButtonInline>\n </Clipboard>\n);\n"],"mappings":";;;;;AAeA,MAAM,eAA0B,oBAAC,MAAD,CAAO,CAAA;AACvC,MAAM,qBAAqB;AAE3B,MAAa,mBAAmB,EAE9B,MACA,SACA,kBACA,gBAGA,OAAO,cACP,UAAU,WACV,UACA,GAAG,WACQ;CAMX,MAAM,mBACJ,OAAO,YAAY,YAAY,QAAQ,KAAK,IAAI,UAAU;CAC5D,MAAM,YAAY,KAAK,kBAAkB,YAAY,OAAO,mBAAmB,KAAA;CAE/E,OACE,oBAAC,WAAD;EACE,SAAA;EACS;EACS;EACF;EACV;EAEN,UAAA,qBAAC,QAAD;GAAQ,GAAI;GAAM,cAAY;GAAoB;GAAS,UAAU,CAAC;GAAtE,UAAA,CACG,MACA,QACK;;CACC,CAAA;AAEf;;;ACvCA,MAAa,mBAAmB,EAE9B,MACA,SACA,kBACA,gBAGA,WAAW,qBACX,WAAW,OACX,GAAG,WAEH,oBAAC,WAAD;CACE,SAAA;CACM;CACG;CACS;CACF;CAEhB,UAAA,qBAAC,cAAD;EAAc,GAAI;EAAM,UAAU,CAAC;EAAnC,UAAA,CACG,CAAC,YAAY,oBAAC,MAAD,EAAM,WAAU,YAAa,CAAA,GAC1C,QACW;;AACL,CAAA"}
@@ -1,19 +1,19 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { isMac, keyCodes } from "./utils-BW4AE8VP.js";
3
- import { useArgoDesign } from "./context-D7X470dy.js";
4
- import { findLiteralMatches } from "./findLiteralMatches-BGBw8Vbl.js";
5
- import { ClipboardButton } from "./ClipboardButton-KHQnPEh_.js";
2
+ import { isMac, keyCodes } from "./utils-Bd28bWgm.js";
3
+ import { useArgoDesign } from "./context-U293r3v-.js";
4
+ import { findLiteralMatches } from "./findLiteralMatches-DgGLzyG0.js";
5
+ import { ClipboardButton } from "./ClipboardButton-DHa1trtI.js";
6
6
  import { useStableCallback } from "./internal/hooks/useStableCallback.js";
7
7
  import { HelpBlock } from "./internal/components/HelpBlock.js";
8
- import { Kbd } from "./Kbd-LCFMumoq.js";
9
- import { resolveToken, useThemeAttributes } from "./themeTokens-qP1-55O7.js";
8
+ import { useThemeAttributes } from "./useThemeAttributes-B199Regy.js";
9
+ import { Kbd } from "./Kbd-J4n1J6i4.js";
10
+ import { resolveToken } from "./themeTokens-7DEab0kp.js";
10
11
  import { useEffect, useLayoutEffect, useMemo, useRef } from "react";
11
12
  import { jsx, jsxs } from "react/jsx-runtime";
12
13
  import { autocompletion, completeAnyWord } from "@codemirror/autocomplete";
13
14
  import { unifiedMergeView } from "@codemirror/merge";
14
15
  import { Decoration, EditorView, ViewPlugin, keymap, placeholder, tooltips } from "@codemirror/view";
15
16
  import CodeMirror, { EditorState } from "@uiw/react-codemirror";
16
- import colors from "@keboola/tailwind-config/colors";
17
17
  import { javascript } from "@codemirror/lang-javascript";
18
18
  import { json, jsonParseLinter } from "@codemirror/lang-json";
19
19
  import { python } from "@codemirror/lang-python";
@@ -25,6 +25,7 @@ import { toml } from "@codemirror/legacy-modes/mode/toml";
25
25
  import { linter } from "@codemirror/lint";
26
26
  import { githubDarkInit, githubLightInit } from "@uiw/codemirror-theme-github";
27
27
  import { getSqlLanguageSupport } from "@keboola/codemirror-lang-sql";
28
+ import colors from "@keboola/tailwind-config/colors";
28
29
  import { simpleMode } from "@codemirror/legacy-modes/mode/simple-mode";
29
30
  import { tags } from "@lezer/highlight";
30
31
  import { Compartment, StateEffect, StateField } from "@codemirror/state";
@@ -200,15 +201,9 @@ const dbt = simpleMode({
200
201
  //#endregion
201
202
  //#region src/components/CodeEditor/modes/jsonnet.ts
202
203
  /**
203
- * Ported from google/codemirror-mode-jsonnet (Apache-2.0), the mode written by
204
- * the language's own authors, which was never taken past CodeMirror 5.
205
- * CodeMirror 5 style names are replaced by their CodeMirror 6 highlight tags:
206
- * `string-2` is `escape`, `error` is `invalid`.
204
+ * Port of google/codemirror-mode-jsonnet (Apache-2.0) to CodeMirror 6 tags.
207
205
  *
208
- * Every pattern is anchored and hoisted. `StringStream.match` slices the rest of
209
- * the line and, without `^`, scans all of it for a match it then discards unless
210
- * it started at the cursor — so an unanchored probe costs the whole remaining
211
- * line, and this tokenizer makes up to twenty of them per token.
206
+ * - Patterns are anchored with `^`: unanchored, `StringStream.match` scans the whole rest of the line.
212
207
  */
213
208
  const COMMENT_END = /^\*\//;
214
209
  const COMMENT_START = /^\/\/|^#/;
@@ -346,14 +341,10 @@ const jsonnet = {
346
341
  };
347
342
  const DARK_GUTTER_ALPHA = "47";
348
343
  /**
349
- * The two diff fills, per scheme: light keeps the opaque pastel, dark tints the same `500` hue at
350
- * low alpha over whatever token surface is behind it.
344
+ * The two diff fills per scheme: light uses the opaque pastel, dark the `500` hue at low alpha.
351
345
  *
352
- * - Its own module, importing nothing, so `MergeEditor` can share it without reaching into
353
- * `CodeEditor/helpers.ts` and pulling the language modes and the CodeMirror runtime with it.
354
- * - Shared by the unified merge wash in `helpers.ts` and `buildDiffHighlightTheme` in
355
- * `MergeEditor/decorations.ts`, so the two views cannot drift apart on the alphas.
356
- * - Callers pass the hue and the pastel; which one is used is this function's business.
346
+ * - Imports nothing, so `MergeEditor` shares it without pulling in CodeMirror via `helpers.ts`.
347
+ * - Shared by `helpers.ts` and `MergeEditor/decorations.ts`, so their alphas cannot drift.
357
348
  */
358
349
  const buildDiffWash = (scheme) => {
359
350
  const dark = scheme === "dark";
@@ -367,16 +358,9 @@ const buildDiffWash = (scheme) => {
367
358
  /**
368
359
  * The tag colours layered over the stock github palette, per colour scheme.
369
360
  *
370
- * - Its own module, importing nothing but the tag vocabulary and the ramps, so
371
- * `scripts/contrast-audit.ts` can measure the palette without pulling the language modes and the
372
- * CodeMirror runtime into a build script.
373
- * - Later entries win over the stock rule for the same tag — both `githubLightInit` and
374
- * `githubDarkInit` concatenate these after their own.
375
- * - `foreground` is the caller's, because it is a live `--*` token rather than a ramp step: the
376
- * theme passes `resolveToken('foreground')`, the audit passes the scheme's channel value.
377
- * - Every ramp step here is a light/dark pair, and each pair is chosen against **two** surfaces —
378
- * the theme's `background` setting is the page, but `variant="field"` paints on `muted`, which
379
- * the theme never sees. Ratios in the comments are quoted `background` / `muted`.
361
+ * - Imports only tags and ramps, so `scripts/contrast-audit.ts` can measure it.
362
+ * - These override stock rules for the same tag.
363
+ * - Colours are chosen against `background` and `muted` (`variant="field"`); ratios quote both.
380
364
  */
381
365
  const buildSyntaxPalette = (scheme, foreground) => {
382
366
  const dark = scheme === "dark";
@@ -460,14 +444,10 @@ const EDITABLE_EDITOR = "&.cm-editor:has(.cm-content[contenteditable=\"true\"])"
460
444
  /**
461
445
  * Editor chrome and the unified merge (diff) wash.
462
446
  *
463
- * - Chrome surfaces (selection, read-only wash) resolve from live `--*` tokens, so they re-skin
464
- * with brand and colour scheme. Fallback channels mirror the light-mode token values for SSR /
465
- * no-provider parity.
466
- * - Diff colours stay categorical — fixed across brands, because added/removed is meaning, not
467
- * chrome — but each is a light/dark pair from `buildDiffWash`, shared with
468
- * `buildDiffHighlightTheme` in `MergeEditor/decorations.ts`.
469
- * - This wash reaches only `CodeEditor`'s *unified* merge view — the one a `previousValue` turns on.
470
- * `MergePane` builds its own theme from scratch.
447
+ * - Chrome resolves from live `--*` tokens; fallbacks mirror light-mode values for SSR.
448
+ * - Diff colours are fixed across brands; light/dark pairs from `buildDiffWash`, shared with
449
+ * `MergeEditor/decorations.ts`.
450
+ * - Only `CodeEditor`'s unified merge view uses this; `MergePane` has its own theme.
471
451
  */
472
452
  const buildBaseThemeStyles = (scheme) => {
473
453
  const { line, gutter } = buildDiffWash(scheme);
@@ -533,30 +513,9 @@ const buildBasicSetup = (readOnly) => ({
533
513
  /**
534
514
  * The syntax theme, per colour scheme.
535
515
  *
536
- * - The stock github palette is picked by scheme: `githubDarkInit` under dark, `githubLightInit`
537
- * otherwise. One palette cannot serve both — the light set scores 1.14:1 to 4.31:1 on the two
538
- * dark surfaces, so 10 of its 11 colours failed AA there (UT-5194).
539
- * - `githubDarkInit` also passes `dark: true` to `EditorView.theme`, which sets the
540
- * `EditorView.darkTheme` facet. That is what makes the `&dark` rules apply — CodeMirror's own
541
- * base theme (cursor, selection layer, panels, buttons) and ours (`search.ts`,
542
- * `highlighting.ts`) both key off it, so they follow the scheme without a second signal.
543
- * - Chrome (surface, gutter, selection, caret) resolves from live `--*` tokens, so it re-skins with
544
- * the brand too. Fallback channels mirror the light-mode token values, for SSR and jsdom.
545
- * - `caret` and `selectionMatch` are pinned because the two initialisers disagree on them, and the
546
- * branch would otherwise change values nothing here chose. The caret follows `foreground`; before
547
- * the facet was set, CodeMirror's own default painted it black on the dark page, so it was
548
- * invisible. `selectionMatch` is a 10% `primary` tint, which beats each initialiser's own value
549
- * on the token it hurts most: 3.82:1 against the light default's 3.29, 5.40:1 against the dark
550
- * default's 3.57. Any occurrence wash costs contrast — this is the cheapest one, and it is the
551
- * same in both schemes.
552
- * - `styles` comes from `buildSyntaxPalette`, which lives apart so the audit script can measure it.
553
- *
554
- * Those overrides exist because the github theme paints every `name`-family tag one colour, and in
555
- * SQL nearly every token is a name — identifiers, function calls and `$variables` all drowned
556
- * together, and a keyword that doubles as a function (`create or REPLACE`) read as a value
557
- * (UT-5024). Instead: identifiers and brackets carry no colour, functions and special vars get
558
- * their own hues, and amber is unique to string literals — in JSON that shifts string values from
559
- * navy to amber, the one visible non-SQL change.
516
+ * - Light github palette fails AA on dark surfaces, so the palette is picked by scheme.
517
+ * - `githubDarkInit` sets the `EditorView.darkTheme` facet that every `&dark` rule keys off.
518
+ * - `caret` and `selectionMatch` are pinned: the initialisers disagree on them.
560
519
  */
561
520
  const buildCustomTheme = (scheme) => {
562
521
  const foreground = resolveToken("foreground", "30 41 59");
@@ -605,24 +564,14 @@ const shouldLintJson = (mode, readOnly) => mode === "application/json" && !readO
605
564
  /**
606
565
  * Wraps a lint source so a blank document produces no diagnostics.
607
566
  *
608
- * `jsonParseLinter` reports "Unexpected end of input" for empty content, which is right for a file and
609
- * wrong for an *optional* form field: it starts empty, and clearing it is how its value is removed.
610
- * Left unwrapped, every such field opens with a red gutter marker contradicting its own validation —
611
- * `CodeEditorField` puts six of them on one screen.
612
- *
613
- * Exported for its test: the wrapper is the behaviour worth pinning, and it needs no editor to exercise.
567
+ * - For optional fields, where empty is valid but `jsonParseLinter` reports an error.
614
568
  */
615
569
  const skipBlankDocument = (source) => (view) => view.state.doc.toString().trim() === "" ? [] : source(view);
616
570
  /**
617
571
  * The JSON linter, optionally blind to a blank document.
618
572
  *
619
- * - `allowBlankDocument` is opt-in, and only `CodeEditorField` opts in (from `!required`). Suppressing
620
- * the marker by default would break callers that treat empty as invalid *and* say so nowhere else:
621
- * `ex-generic/JsonConfiguration.tsx`, `flows/TaskParamsModalContent.tsx` and
622
- * `stream/PayloadTest.tsx` all gate their button on `isValidJsonConfig`, which is `false` for `''`,
623
- * with no `disabledReason` — so the gutter marker is the only thing explaining a dead button.
624
- * - Not derivable from `variant`: `ex-generic/FunctionControl.tsx` is `variant="field"` and empty is
625
- * an error there too. Whether blank is valid is the *field's* contract, not the control's shape.
573
+ * - Opt-in: some callers rely on the marker alone to explain why empty disables their button.
574
+ * - Not derivable from `variant` — whether blank is valid is the field's contract.
626
575
  */
627
576
  const buildJsonLinter = (allowBlankDocument) => {
628
577
  const source = jsonParseLinter();
@@ -631,28 +580,18 @@ const buildJsonLinter = (allowBlankDocument) => {
631
580
  //#endregion
632
581
  //#region src/components/CodeEditor/editorChrome.ts
633
582
  /**
634
- * Mirrors `InputGroup` at the sizing each design language gives a `TextInput`,
635
- * so an editor dropped into a form reads as one of its fields.
583
+ * Mirrors `InputGroup` at each design language's `TextInput` sizing, so it reads as a form field.
636
584
  *
637
- * The legacy preset reads the neutral ramp because the legacy `secondary`
638
- * variant does. No semantic token holds that grey, and the nearest one
639
- * (`--muted`) is a few points off — which is the "almost, but not quite, the
640
- * input next to it" mismatch this preset exists to remove.
641
- *
642
- * That ramp is fixed, so the legacy preset needs its own scheme pair — a legacy brand and the dark
643
- * scheme are independent choices, and `neutral[100]` under dark is a light slab: `foreground` on it
644
- * is 1.09:1 and the darkest syntax colour 2.69:1. Dark mirrors the same two steps from the other
645
- * end of the ramp (`800` / `900`, 5.00:1 and 6.14:1 for that colour).
585
+ * - Same colour-scheme tokens as `InputGroup`, so it follows light/dark.
586
+ * - argo: `muted`/`input`, the editable argo field's pair.
587
+ * - legacy: `secondary` as `variant="secondary"`; readonly `muted`/`input` as base `InputGroup`.
646
588
  */
647
- const buildInputChrome = (isArgo, scheme) => {
648
- const dark = scheme === "dark";
649
- const legacySurface = dark ? colors.neutral[800] : colors.neutral[100];
650
- const legacyReadOnly = dark ? colors.neutral[900] : colors.neutral[150];
589
+ const buildInputChrome = (isArgo) => {
651
590
  return {
652
- surface: isArgo ? resolveToken("muted", "241 245 249") : legacySurface,
653
- borderColor: isArgo ? resolveToken("input", "203 213 225") : legacySurface,
654
- readOnlySurface: isArgo ? resolveToken("muted", "241 245 249") : legacyReadOnly,
655
- readOnlyBorderColor: isArgo ? resolveToken("input", "203 213 225") : legacyReadOnly,
591
+ surface: isArgo ? resolveToken("muted", "241 245 249") : resolveToken("secondary", "226 232 240"),
592
+ borderColor: isArgo ? resolveToken("input", "203 213 225") : resolveToken("secondary", "226 232 240"),
593
+ readOnlySurface: resolveToken("muted", "241 245 249"),
594
+ readOnlyBorderColor: resolveToken("input", "203 213 225"),
656
595
  hoverBorderColor: null,
657
596
  focusBorderColor: isArgo ? resolveToken("primary", "37 99 235") : resolveToken("ring", "31 143 255"),
658
597
  focusRing: `0 0 0 4px ${resolveToken("ring", "31 143 255", isArgo ? .5 : .3)}`,
@@ -677,10 +616,7 @@ const buildCanvasChrome = () => ({
677
616
  paddingY: "8px",
678
617
  paddingX: null
679
618
  });
680
- /**
681
- * Spread over `buildBaseThemeStyles()` — never used alone. The read-only keys
682
- * are the base's own, so they replace its wash instead of landing beside it.
683
- */
619
+ /** Spread over `buildBaseThemeStyles()`; read-only keys match the base's to replace its wash. */
684
620
  const buildChromeStyles = (chrome) => ({
685
621
  "&.cm-editor": {
686
622
  border: `solid 1px ${chrome.borderColor}`,
@@ -776,15 +712,8 @@ const searchViewPlugin = ViewPlugin.fromClass(class {
776
712
  /**
777
713
  * Match and current-match fills, per colour scheme.
778
714
  *
779
- * - `&dark` is how a *static* base theme follows the scheme, without becoming a
780
- * `useThemedExtension` builder and a second entry in its never-evicting cache. It applies
781
- * whenever the `EditorView.darkTheme` facet is set — see `buildBaseThemeStyles`' callers, which
782
- * set it explicitly.
783
- * - Light text is `blue[700]`: 5.42:1 on the fill, and 6.29:1 for white on the current match.
784
- * - Dark tints `blue[500]` for the plain match, with `blue[200]` text: 11.10:1 on the page surface,
785
- * 8.86:1 on the `variant="field"` one. The current match keeps a solid `blue[500]` and takes
786
- * `neutral[900]` as its text (5.78:1) — white on it is 2.55:1, since the token that reads as
787
- * "strong" in light is a light colour.
715
+ * - `&dark` keeps this a static base theme; it applies when the `EditorView.darkTheme` facet is set.
716
+ * - Dark current match uses `neutral[900]` text: white on `blue[500]` is 2.55:1.
788
717
  */
789
718
  const searchTheme = EditorView.baseTheme({
790
719
  ".cm-searchMatch": { backgroundColor: colors.blue[100] },
@@ -820,20 +749,11 @@ const ToggleComponentHelp = () => /* @__PURE__ */ jsxs("div", { children: [
820
749
  //#region src/components/CodeEditor/tokenTheme.ts
821
750
  const themeCache = /* @__PURE__ */ new Map();
822
751
  /**
823
- * Memoize a CodeMirror theme/extension built from `resolveToken`, shared across
824
- * every instance that passes the same `cacheKey` and rebuilt whenever the active
825
- * brand / light-dark mode changes. `build` reads live `--*` values off `<html>`,
826
- * so the active theme is an invisible dependency a deps array can't see.
827
- *
828
- * `build` receives the scheme those values were read under, for the theme values
829
- * that are a light/dark *pair* rather than a token lookup (a categorical diff
830
- * wash has no semantic token, but an opaque light pastel still has to become a
831
- * low-alpha tint under dark). It comes from the same read that produced the key,
832
- * so a builder cannot resolve one scheme's colours under the other one's key.
752
+ * A CodeMirror extension shared per `cacheKey`, rebuilt when the brand or light/dark mode changes.
833
753
  *
834
- * `cacheKey` is the extension's full identity: anything the builder closes over
835
- * must be part of it (e.g. `` `merge-pane:${deleted}` ``), or instances built
836
- * from different inputs would share one theme.
754
+ * - `build` reads live `--*` values off `<html>`, a dependency no deps array can see.
755
+ * - `scheme` comes from the same read as the key, for values that are a light/dark pair.
756
+ * - `cacheKey` must include everything `build` closes over, or different inputs share a theme.
837
757
  */
838
758
  const useThemedExtension = (cacheKey, build) => {
839
759
  const { scheme, cacheKey: themeKey } = useThemeAttributes();
@@ -850,19 +770,11 @@ const useThemedExtension = (cacheKey, build) => {
850
770
  const establishesFixedContainingBlock = (style) => style.transform !== "none" || style.translate !== "none" || style.rotate !== "none" || style.scale !== "none" || style.perspective !== "none" || style.filter !== "none" || style.backdropFilter !== "none" || /\b(paint|layout|strict|content)\b/.test(style.contain) || /\b(transform|perspective|filter|contain)\b/.test(style.willChange);
851
771
  const crops = (style) => style.overflowX !== "visible" || style.overflowY !== "visible" || style.maskImage !== "none" || style.contentVisibility !== "visible" || /\b(paint|strict|content)\b/.test(style.contain);
852
772
  /**
853
- * Where a tooltip can hang without being cropped, or `null` for "wherever
854
- * CodeMirror would put it anyway".
855
- *
856
- * Two ancestors matter, and they are not the same ancestor. The **outermost
857
- * cropper** is the one to get above — landing anywhere below it leaves the
858
- * tooltip inside the box doing the cropping. The **containing block** is where
859
- * the search can stop, because from there upwards `position: fixed` is measured
860
- * against that element and nothing higher can crop it.
773
+ * Where a tooltip can hang uncropped, or `null` for CodeMirror's default.
861
774
  *
862
- * `document.body` and `<html>` are not treated as croppers: a fixed box whose
863
- * containing block is the viewport is not clipped by their overflow, and
864
- * hosting outside `<body>` would drop the tooltip out of the app's stacking and
865
- * pointer-events scope for no gain.
775
+ * - Hosts above the outermost cropper.
776
+ * - Stops at the fixed containing block; nothing higher can crop.
777
+ * - `<body>` and `<html>` never count as croppers.
866
778
  */
867
779
  const findTooltipHost = (from) => {
868
780
  let outermostCropper = null;
@@ -876,26 +788,9 @@ const findTooltipHost = (from) => {
876
788
  /**
877
789
  * `tooltips()`, re-hosted so the completion popup is never cropped.
878
790
  *
879
- * CodeMirror hangs tooltips inside the editor and lets `position: fixed` carry
880
- * them past its edges. That holds only while the viewport is their containing
881
- * block — a modal centred with a translate, a sheet sliding in, or a box under
882
- * paint containment takes that job, and then every scroller, mask and contained
883
- * box in between crops the popup instead. A tall editor hides the damage; a
884
- * one-line one shows a sliver of an unreadable list.
885
- *
886
- * The two shapes this has to survive in production are a `Modal`, whose body
887
- * scrolls and carries the argo fade mask, and kbc-ui's SQL editor, which wraps
888
- * every code block in `content-visibility: auto` to keep long scripts cheap.
889
- *
890
- * Hosting the layer above the outermost cropper clears all of that while keeping
891
- * the popup inside the modal's stacking, focus and pointer-events scope — which
892
- * `document.body` would not: the popup would sit behind the modal, and Radix
893
- * leaves the body `pointer-events: none` while a dialog is open.
894
- *
895
- * Both editors install this, and it is the only place either of them configures
896
- * a tooltip host. Keep it that way: CodeMirror's tooltip config takes the first
897
- * contributor that names a parent, so a second mechanism would not compose with
898
- * this one — it would silently win or lose on extension order.
791
+ * - Must survive a masked, scrolling `Modal` and kbc-ui's `content-visibility: auto` blocks.
792
+ * - Not `document.body`: the popup would sit behind the modal, which disables pointer events there.
793
+ * - The only tooltip host in either editor: CodeMirror takes the first parent configured.
899
794
  */
900
795
  const tooltipsExtension = () => {
901
796
  const layer = new Compartment();
@@ -909,9 +804,7 @@ const tooltipsExtension = () => {
909
804
  })];
910
805
  };
911
806
  /**
912
- * The extension above, built once per editor. Rebuilding it would hand
913
- * CodeMirror a fresh compartment and plugin on every reconfigure, dropping the
914
- * host it had already resolved — so it is only ever reached through this hook.
807
+ * The tooltips extension, built once per editor; a rebuild would drop the resolved host.
915
808
  */
916
809
  const useTooltipsExtension = () => useMemo(tooltipsExtension, []);
917
810
  //#endregion
@@ -962,13 +855,10 @@ const completeVariables = (variables = []) => {
962
855
  };
963
856
  };
964
857
  /**
965
- * The completion source both editors install, with an identity that never moves.
858
+ * The completion source both editors install, with a stable identity.
966
859
  *
967
- * Both hold it inside the memo that keys their whole extension tree, and callers
968
- * build the list inline — a config row mapped to `{ name, value }` in a store
969
- * selector, so a fresh array arrives on every store push. Because CodeMirror asks
970
- * the source for options rather than reading them up front, holding it steady costs
971
- * nothing: a completion request always reaches the latest render's variables.
860
+ * - It keys their extension memo, while callers pass a fresh array on every store push.
861
+ * - CodeMirror asks per request, so it still sees the latest variables.
972
862
  */
973
863
  const useVariableCompletion = (variables = []) => useStableCallback(completeVariables(variables));
974
864
  //#endregion
@@ -1019,7 +909,7 @@ const CodeEditor = ({ value, previousValue, onChange, variant = "plain", mode =
1019
909
  const isField = variant === "field";
1020
910
  const baseTheme = useThemedExtension(isField ? `code-editor:field:${isArgo ? "argo" : "legacy"}` : "code-editor:chrome", (scheme) => EditorView.theme({
1021
911
  ...buildBaseThemeStyles(scheme),
1022
- ...isField ? buildChromeStyles(buildInputChrome(isArgo, scheme)) : null
912
+ ...isField ? buildChromeStyles(buildInputChrome(isArgo)) : null
1023
913
  }, { dark: scheme === "dark" }));
1024
914
  const commonExtensions = useMemo(() => {
1025
915
  const callerCompletions = completionSource ?? (completeAny ? completeAnyWord : autocompletions?.length ? autocompletions : null);
@@ -1128,4 +1018,4 @@ const CodeEditor = ({ value, previousValue, onChange, variant = "plain", mode =
1128
1018
  //#endregion
1129
1019
  export { CodeEditor, LANGUAGE_MODES, buildBaseThemeStyles, buildBasicSetup, buildCanvasChrome, buildChromeStyles, buildCustomTheme, buildDiffWash, isLanguageMode, searchExtension, updateSearch, useThemedExtension, useTooltipsExtension, useVariableCompletion };
1130
1020
 
1131
- //# sourceMappingURL=CodeEditor-BJKJXA0c.js.map
1021
+ //# sourceMappingURL=CodeEditor-BSo-oLFG.js.map