@keboola/design 10.1.0 → 11.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 (504) hide show
  1. package/AGENTS.md +2 -0
  2. package/dist/MermaidDiagram-ZU5KAVRT.js +18 -0
  3. package/dist/{MermaidDiagram-EOKJHQQV.js.map → MermaidDiagram-ZU5KAVRT.js.map} +1 -1
  4. package/dist/charts.d.ts +14 -8
  5. package/dist/charts.js +6 -1
  6. package/dist/charts.js.map +1 -1
  7. package/dist/chunk-2YYJDKSP.js +51 -0
  8. package/dist/chunk-2YYJDKSP.js.map +1 -0
  9. package/dist/chunk-3P5UUCFI.js +385 -0
  10. package/dist/chunk-3P5UUCFI.js.map +1 -0
  11. package/dist/chunk-3QDFDDWZ.js +99 -0
  12. package/dist/chunk-3QDFDDWZ.js.map +1 -0
  13. package/dist/chunk-3W27OLK5.js +15 -0
  14. package/dist/chunk-3W27OLK5.js.map +1 -0
  15. package/dist/chunk-4FIZZONW.js +40 -0
  16. package/dist/chunk-4FIZZONW.js.map +1 -0
  17. package/dist/chunk-4GIAXOJG.js +133 -0
  18. package/dist/chunk-4GIAXOJG.js.map +1 -0
  19. package/dist/chunk-52NDNMK7.js +99 -0
  20. package/dist/chunk-52NDNMK7.js.map +1 -0
  21. package/dist/chunk-576G5OES.js +201 -0
  22. package/dist/chunk-576G5OES.js.map +1 -0
  23. package/dist/chunk-5AIE6SET.js +659 -0
  24. package/dist/chunk-5AIE6SET.js.map +1 -0
  25. package/dist/chunk-5FTNAZRW.js +327 -0
  26. package/dist/chunk-5FTNAZRW.js.map +1 -0
  27. package/dist/chunk-5IG2S7ZY.js +70 -0
  28. package/dist/chunk-5IG2S7ZY.js.map +1 -0
  29. package/dist/chunk-5QCXHNCW.js +404 -0
  30. package/dist/chunk-5QCXHNCW.js.map +1 -0
  31. package/dist/chunk-6DUMGC7Y.js +105 -0
  32. package/dist/chunk-6DUMGC7Y.js.map +1 -0
  33. package/dist/chunk-6J25CVST.js +174 -0
  34. package/dist/chunk-6J25CVST.js.map +1 -0
  35. package/dist/chunk-6NN35XOP.js +120 -0
  36. package/dist/chunk-6NN35XOP.js.map +1 -0
  37. package/dist/chunk-6NZBVA4T.js +24 -0
  38. package/dist/chunk-6NZBVA4T.js.map +1 -0
  39. package/dist/chunk-6W5BHRCL.js +295 -0
  40. package/dist/chunk-6W5BHRCL.js.map +1 -0
  41. package/dist/chunk-72BKRCEG.js +409 -0
  42. package/dist/chunk-72BKRCEG.js.map +1 -0
  43. package/dist/{chunk-Q7NWXLCT.js → chunk-7GTI3PPI.js} +53 -48
  44. package/dist/chunk-7GTI3PPI.js.map +1 -0
  45. package/dist/chunk-7P6PLZ4B.js +74 -0
  46. package/dist/chunk-7P6PLZ4B.js.map +1 -0
  47. package/dist/chunk-7WZWY5IA.js +46 -0
  48. package/dist/chunk-7WZWY5IA.js.map +1 -0
  49. package/dist/chunk-AIYO2632.js +489 -0
  50. package/dist/chunk-AIYO2632.js.map +1 -0
  51. package/dist/chunk-ANFZWPNE.js +112 -0
  52. package/dist/chunk-ANFZWPNE.js.map +1 -0
  53. package/dist/chunk-ANZTVAJU.js +73 -0
  54. package/dist/chunk-ANZTVAJU.js.map +1 -0
  55. package/dist/chunk-BD5BTJKX.js +166 -0
  56. package/dist/chunk-BD5BTJKX.js.map +1 -0
  57. package/dist/chunk-BHGIDSRJ.js +140 -0
  58. package/dist/chunk-BHGIDSRJ.js.map +1 -0
  59. package/dist/chunk-BSQWZITZ.js +507 -0
  60. package/dist/chunk-BSQWZITZ.js.map +1 -0
  61. package/dist/chunk-D3LAIK62.js +23 -0
  62. package/dist/chunk-D3LAIK62.js.map +1 -0
  63. package/dist/chunk-DODCR43C.js +155 -0
  64. package/dist/chunk-DODCR43C.js.map +1 -0
  65. package/dist/chunk-EEK5NGZF.js +40 -0
  66. package/dist/chunk-EEK5NGZF.js.map +1 -0
  67. package/dist/chunk-ENRG7TXA.js +11 -0
  68. package/dist/chunk-ENRG7TXA.js.map +1 -0
  69. package/dist/chunk-EQRMGIGY.js +239 -0
  70. package/dist/chunk-EQRMGIGY.js.map +1 -0
  71. package/dist/{chunk-XV3UUOYF.js → chunk-ERAHK5YQ.js} +9 -359
  72. package/dist/chunk-ERAHK5YQ.js.map +1 -0
  73. package/dist/chunk-F3FOFY2P.js +124 -0
  74. package/dist/chunk-F3FOFY2P.js.map +1 -0
  75. package/dist/chunk-F6BTWFOC.js +507 -0
  76. package/dist/chunk-F6BTWFOC.js.map +1 -0
  77. package/dist/chunk-F6J6NNAL.js +34 -0
  78. package/dist/chunk-F6J6NNAL.js.map +1 -0
  79. package/dist/chunk-FCHJ7D5O.js +59 -0
  80. package/dist/chunk-FCHJ7D5O.js.map +1 -0
  81. package/dist/chunk-FFJTEQCC.js +80 -0
  82. package/dist/chunk-FFJTEQCC.js.map +1 -0
  83. package/dist/chunk-FUFMVW7O.js +64 -0
  84. package/dist/chunk-FUFMVW7O.js.map +1 -0
  85. package/dist/chunk-FVPGQ6UE.js +25 -0
  86. package/dist/chunk-FVPGQ6UE.js.map +1 -0
  87. package/dist/{chunk-JP7PNHLH.js → chunk-G3PMV62Z.js} +3 -10
  88. package/dist/chunk-G3PMV62Z.js.map +1 -0
  89. package/dist/chunk-GACFOW3E.js +51 -0
  90. package/dist/chunk-GACFOW3E.js.map +1 -0
  91. package/dist/chunk-GDT6HQMK.js +42 -0
  92. package/dist/chunk-GDT6HQMK.js.map +1 -0
  93. package/dist/chunk-HLGU22C6.js +2589 -0
  94. package/dist/chunk-HLGU22C6.js.map +1 -0
  95. package/dist/chunk-HPMYYGP7.js +134 -0
  96. package/dist/chunk-HPMYYGP7.js.map +1 -0
  97. package/dist/chunk-I2UCOD45.js +197 -0
  98. package/dist/chunk-I2UCOD45.js.map +1 -0
  99. package/dist/chunk-IEGDZUVM.js +75 -0
  100. package/dist/chunk-IEGDZUVM.js.map +1 -0
  101. package/dist/chunk-IIS7INHF.js +47 -0
  102. package/dist/chunk-IIS7INHF.js.map +1 -0
  103. package/dist/chunk-ITELSEFU.js +256 -0
  104. package/dist/chunk-ITELSEFU.js.map +1 -0
  105. package/dist/{chunk-CTCFYWJC.js → chunk-IXAYNBOY.js} +6 -6
  106. package/dist/{chunk-CTCFYWJC.js.map → chunk-IXAYNBOY.js.map} +1 -1
  107. package/dist/chunk-JUW2ETEI.js +191 -0
  108. package/dist/chunk-JUW2ETEI.js.map +1 -0
  109. package/dist/chunk-K65C7CVE.js +127 -0
  110. package/dist/chunk-K65C7CVE.js.map +1 -0
  111. package/dist/chunk-KDI64MCY.js +189 -0
  112. package/dist/chunk-KDI64MCY.js.map +1 -0
  113. package/dist/chunk-KN4ASMH5.js +160 -0
  114. package/dist/chunk-KN4ASMH5.js.map +1 -0
  115. package/dist/chunk-KQW7QNTU.js +1549 -0
  116. package/dist/chunk-KQW7QNTU.js.map +1 -0
  117. package/dist/chunk-KR7NXXHC.js +66 -0
  118. package/dist/chunk-KR7NXXHC.js.map +1 -0
  119. package/dist/chunk-KRZKIVMA.js +142 -0
  120. package/dist/chunk-KRZKIVMA.js.map +1 -0
  121. package/dist/{chunk-C3L3TBBT.js → chunk-KTTLLKGQ.js} +6 -63
  122. package/dist/chunk-KTTLLKGQ.js.map +1 -0
  123. package/dist/chunk-KWKSHPDP.js +234 -0
  124. package/dist/chunk-KWKSHPDP.js.map +1 -0
  125. package/dist/chunk-KZVC7OYG.js +57 -0
  126. package/dist/chunk-KZVC7OYG.js.map +1 -0
  127. package/dist/chunk-L5DHUN2V.js +204 -0
  128. package/dist/chunk-L5DHUN2V.js.map +1 -0
  129. package/dist/chunk-LCTGEH57.js +1376 -0
  130. package/dist/chunk-LCTGEH57.js.map +1 -0
  131. package/dist/chunk-LXLIQ2D6.js +12 -0
  132. package/dist/chunk-LXLIQ2D6.js.map +1 -0
  133. package/dist/chunk-M4CTURKX.js +84 -0
  134. package/dist/chunk-M4CTURKX.js.map +1 -0
  135. package/dist/chunk-M6LTUPVP.js +301 -0
  136. package/dist/chunk-M6LTUPVP.js.map +1 -0
  137. package/dist/chunk-MA6RRHDT.js +291 -0
  138. package/dist/chunk-MA6RRHDT.js.map +1 -0
  139. package/dist/chunk-MODE4QIA.js +6 -0
  140. package/dist/chunk-MODE4QIA.js.map +1 -0
  141. package/dist/chunk-MVILMVGG.js +118 -0
  142. package/dist/chunk-MVILMVGG.js.map +1 -0
  143. package/dist/chunk-MWS4VCLV.js +17 -0
  144. package/dist/chunk-MWS4VCLV.js.map +1 -0
  145. package/dist/chunk-NEUX74SO.js +315 -0
  146. package/dist/chunk-NEUX74SO.js.map +1 -0
  147. package/dist/chunk-NFHKYBRD.js +156 -0
  148. package/dist/chunk-NFHKYBRD.js.map +1 -0
  149. package/dist/chunk-NHJNNXD3.js +89 -0
  150. package/dist/chunk-NHJNNXD3.js.map +1 -0
  151. package/dist/chunk-O2BF3HZL.js +33 -0
  152. package/dist/chunk-O2BF3HZL.js.map +1 -0
  153. package/dist/chunk-OANXCZYD.js +212 -0
  154. package/dist/chunk-OANXCZYD.js.map +1 -0
  155. package/dist/chunk-ODJF7YIP.js +230 -0
  156. package/dist/chunk-ODJF7YIP.js.map +1 -0
  157. package/dist/chunk-ON4BJTHI.js +101 -0
  158. package/dist/chunk-ON4BJTHI.js.map +1 -0
  159. package/dist/{chunk-VMFSRV5H.js → chunk-OTL5WXIJ.js} +2 -2
  160. package/dist/{chunk-VMFSRV5H.js.map → chunk-OTL5WXIJ.js.map} +1 -1
  161. package/dist/{chunk-VPPM7UUQ.js → chunk-PACNBKJV.js} +3 -3
  162. package/dist/{chunk-VPPM7UUQ.js.map → chunk-PACNBKJV.js.map} +1 -1
  163. package/dist/{chunk-ESBL3IPF.js → chunk-PROCA7K7.js} +2 -2
  164. package/dist/{chunk-ESBL3IPF.js.map → chunk-PROCA7K7.js.map} +1 -1
  165. package/dist/chunk-QGMIPA67.js +85 -0
  166. package/dist/chunk-QGMIPA67.js.map +1 -0
  167. package/dist/chunk-QQA37LFB.js +190 -0
  168. package/dist/chunk-QQA37LFB.js.map +1 -0
  169. package/dist/chunk-QZAWRSEB.js +61 -0
  170. package/dist/chunk-QZAWRSEB.js.map +1 -0
  171. package/dist/chunk-R74KGWNS.js +699 -0
  172. package/dist/chunk-R74KGWNS.js.map +1 -0
  173. package/dist/chunk-RFDLHMKL.js +110 -0
  174. package/dist/chunk-RFDLHMKL.js.map +1 -0
  175. package/dist/chunk-RL64HN7S.js +40 -0
  176. package/dist/chunk-RL64HN7S.js.map +1 -0
  177. package/dist/chunk-RMRQKPL7.js +115 -0
  178. package/dist/chunk-RMRQKPL7.js.map +1 -0
  179. package/dist/{chunk-BOHNXTMM.js → chunk-RQVK4IYC.js} +3 -3
  180. package/dist/{chunk-BOHNXTMM.js.map → chunk-RQVK4IYC.js.map} +1 -1
  181. package/dist/chunk-RTW56PWZ.js +59 -0
  182. package/dist/chunk-RTW56PWZ.js.map +1 -0
  183. package/dist/chunk-RUTPQNLR.js +266 -0
  184. package/dist/chunk-RUTPQNLR.js.map +1 -0
  185. package/dist/chunk-S6TAF63G.js +25 -0
  186. package/dist/chunk-S6TAF63G.js.map +1 -0
  187. package/dist/chunk-SBGAUGXY.js +224 -0
  188. package/dist/chunk-SBGAUGXY.js.map +1 -0
  189. package/dist/chunk-SC275NHZ.js +407 -0
  190. package/dist/chunk-SC275NHZ.js.map +1 -0
  191. package/dist/chunk-SCQPU4UE.js +97 -0
  192. package/dist/chunk-SCQPU4UE.js.map +1 -0
  193. package/dist/chunk-SFFF2WQP.js +8 -0
  194. package/dist/chunk-SFFF2WQP.js.map +1 -0
  195. package/dist/chunk-SJYMHZKA.js +36 -0
  196. package/dist/chunk-SJYMHZKA.js.map +1 -0
  197. package/dist/chunk-SLCCUJVN.js +125 -0
  198. package/dist/chunk-SLCCUJVN.js.map +1 -0
  199. package/dist/{chunk-IJTHFNNJ.js → chunk-SVBSNSD4.js} +10 -12
  200. package/dist/chunk-SVBSNSD4.js.map +1 -0
  201. package/dist/chunk-SVPLTL35.js +62 -0
  202. package/dist/chunk-SVPLTL35.js.map +1 -0
  203. package/dist/{chunk-63NSN2VL.js → chunk-SWQFYNYG.js} +115 -51
  204. package/dist/chunk-SWQFYNYG.js.map +1 -0
  205. package/dist/chunk-THHB4EWS.js +72 -0
  206. package/dist/chunk-THHB4EWS.js.map +1 -0
  207. package/dist/chunk-TUCDD33E.js +246 -0
  208. package/dist/chunk-TUCDD33E.js.map +1 -0
  209. package/dist/chunk-TV4WAP2R.js +14 -0
  210. package/dist/chunk-TV4WAP2R.js.map +1 -0
  211. package/dist/chunk-U3A6YBTZ.js +134 -0
  212. package/dist/chunk-U3A6YBTZ.js.map +1 -0
  213. package/dist/chunk-UGT6DKWM.js +95 -0
  214. package/dist/chunk-UGT6DKWM.js.map +1 -0
  215. package/dist/chunk-VSERHUWD.js +212 -0
  216. package/dist/chunk-VSERHUWD.js.map +1 -0
  217. package/dist/chunk-VYG7BDXC.js +49 -0
  218. package/dist/chunk-VYG7BDXC.js.map +1 -0
  219. package/dist/chunk-WETKNYZX.js +52 -0
  220. package/dist/chunk-WETKNYZX.js.map +1 -0
  221. package/dist/chunk-WGG4AML3.js +216 -0
  222. package/dist/chunk-WGG4AML3.js.map +1 -0
  223. package/dist/chunk-WKAUEL6I.js +30 -0
  224. package/dist/chunk-WKAUEL6I.js.map +1 -0
  225. package/dist/chunk-WPOLA5CG.js +81 -0
  226. package/dist/chunk-WPOLA5CG.js.map +1 -0
  227. package/dist/chunk-WPVETCGJ.js +254 -0
  228. package/dist/chunk-WPVETCGJ.js.map +1 -0
  229. package/dist/chunk-WTSM3A7E.js +13 -0
  230. package/dist/chunk-WTSM3A7E.js.map +1 -0
  231. package/dist/chunk-WU3F2K3T.js +148 -0
  232. package/dist/chunk-WU3F2K3T.js.map +1 -0
  233. package/dist/chunk-WZZK2DTZ.js +39 -0
  234. package/dist/chunk-WZZK2DTZ.js.map +1 -0
  235. package/dist/chunk-X4IHLKRD.js +42 -0
  236. package/dist/chunk-X4IHLKRD.js.map +1 -0
  237. package/dist/chunk-XAHEXZJC.js +80 -0
  238. package/dist/chunk-XAHEXZJC.js.map +1 -0
  239. package/dist/chunk-XCYGJDUX.js +31 -0
  240. package/dist/chunk-XCYGJDUX.js.map +1 -0
  241. package/dist/chunk-Y4W3JORC.js +104 -0
  242. package/dist/chunk-Y4W3JORC.js.map +1 -0
  243. package/dist/{chunk-7PUUHEJQ.js → chunk-YFZJ3ZLG.js} +26 -42
  244. package/dist/chunk-YFZJ3ZLG.js.map +1 -0
  245. package/dist/{chunk-6FPEI4EM.js → chunk-YI3WLXEN.js} +27 -2323
  246. package/dist/chunk-YI3WLXEN.js.map +1 -0
  247. package/dist/chunk-ZBKFSPD3.js +29 -0
  248. package/dist/chunk-ZBKFSPD3.js.map +1 -0
  249. package/dist/chunk-ZOERRQ6A.js +79 -0
  250. package/dist/chunk-ZOERRQ6A.js.map +1 -0
  251. package/dist/chunk-ZSTGUKHU.js +10 -0
  252. package/dist/chunk-ZSTGUKHU.js.map +1 -0
  253. package/dist/chunk-ZUEHDL27.js +65 -0
  254. package/dist/chunk-ZUEHDL27.js.map +1 -0
  255. package/dist/editors.js +22 -14
  256. package/dist/editors.js.map +1 -1
  257. package/dist/icons.js +7 -2
  258. package/dist/index.d.ts +8 -18
  259. package/dist/index.js +121 -15800
  260. package/dist/index.js.map +1 -1
  261. package/dist/internal/blocks/AIKit.js +30 -0
  262. package/dist/internal/blocks/AIKit.js.map +1 -0
  263. package/dist/internal/blocks/AppShell.js +11 -0
  264. package/dist/internal/blocks/AppShell.js.map +1 -0
  265. package/dist/internal/blocks/AutoSaveTextarea.js +14 -0
  266. package/dist/internal/blocks/AutoSaveTextarea.js.map +1 -0
  267. package/dist/internal/blocks/BrandEditor.js +23 -0
  268. package/dist/internal/blocks/BrandEditor.js.map +1 -0
  269. package/dist/internal/blocks/ChartPanel.js +10 -0
  270. package/dist/internal/blocks/ChartPanel.js.map +1 -0
  271. package/dist/internal/blocks/ClipboardButton.js +12 -0
  272. package/dist/internal/blocks/ClipboardButton.js.map +1 -0
  273. package/dist/internal/blocks/ColorInput.js +13 -0
  274. package/dist/internal/blocks/ColorInput.js.map +1 -0
  275. package/dist/internal/blocks/ColorModeSwitch.js +13 -0
  276. package/dist/internal/blocks/ColorModeSwitch.js.map +1 -0
  277. package/dist/internal/blocks/Command.js +15 -0
  278. package/dist/internal/blocks/Command.js.map +1 -0
  279. package/dist/internal/blocks/CopyField.js +11 -0
  280. package/dist/internal/blocks/CopyField.js.map +1 -0
  281. package/dist/internal/blocks/DashboardHero.js +9 -0
  282. package/dist/internal/blocks/DashboardHero.js.map +1 -0
  283. package/dist/internal/blocks/DateInput.js +16 -0
  284. package/dist/internal/blocks/DateInput.js.map +1 -0
  285. package/dist/internal/blocks/DateRangeInput.js +16 -0
  286. package/dist/internal/blocks/DateRangeInput.js.map +1 -0
  287. package/dist/internal/blocks/EmptyConfigurationActionCard.js +10 -0
  288. package/dist/internal/blocks/EmptyConfigurationActionCard.js.map +1 -0
  289. package/dist/internal/blocks/EmptyState.js +4 -0
  290. package/dist/internal/blocks/EmptyState.js.map +1 -0
  291. package/dist/internal/blocks/ErrorState.js +5 -0
  292. package/dist/internal/blocks/ErrorState.js.map +1 -0
  293. package/dist/internal/blocks/ExportMenu.js +13 -0
  294. package/dist/internal/blocks/ExportMenu.js.map +1 -0
  295. package/dist/internal/blocks/Form.js +29 -0
  296. package/dist/internal/blocks/Form.js.map +1 -0
  297. package/dist/internal/blocks/FormGroup.js +18 -0
  298. package/dist/internal/blocks/FormGroup.js.map +1 -0
  299. package/dist/internal/blocks/GoogleButton.js +10 -0
  300. package/dist/internal/blocks/GoogleButton.js.map +1 -0
  301. package/dist/internal/blocks/MicrosoftButton.js +10 -0
  302. package/dist/internal/blocks/MicrosoftButton.js.map +1 -0
  303. package/dist/internal/blocks/MultiActionButtonGroup.js +12 -0
  304. package/dist/internal/blocks/MultiActionButtonGroup.js.map +1 -0
  305. package/dist/internal/blocks/MultiCombobox.js +14 -0
  306. package/dist/internal/blocks/MultiCombobox.js.map +1 -0
  307. package/dist/internal/blocks/NumberInput.js +12 -0
  308. package/dist/internal/blocks/NumberInput.js.map +1 -0
  309. package/dist/internal/blocks/OtpInput.js +10 -0
  310. package/dist/internal/blocks/OtpInput.js.map +1 -0
  311. package/dist/internal/blocks/PageHeader.js +9 -0
  312. package/dist/internal/blocks/PageHeader.js.map +1 -0
  313. package/dist/internal/blocks/PageLayout.js +9 -0
  314. package/dist/internal/blocks/PageLayout.js.map +1 -0
  315. package/dist/internal/blocks/PageToolbar.js +13 -0
  316. package/dist/internal/blocks/PageToolbar.js.map +1 -0
  317. package/dist/internal/blocks/PasswordInput.js +13 -0
  318. package/dist/internal/blocks/PasswordInput.js.map +1 -0
  319. package/dist/internal/blocks/SearchInput.js +12 -0
  320. package/dist/internal/blocks/SearchInput.js.map +1 -0
  321. package/dist/internal/blocks/SearchInputWithNavigation.js +16 -0
  322. package/dist/internal/blocks/SearchInputWithNavigation.js.map +1 -0
  323. package/dist/internal/blocks/SectionNav.js +15 -0
  324. package/dist/internal/blocks/SectionNav.js.map +1 -0
  325. package/dist/internal/blocks/SplitButton.js +14 -0
  326. package/dist/internal/blocks/SplitButton.js.map +1 -0
  327. package/dist/internal/blocks/StatCard.js +10 -0
  328. package/dist/internal/blocks/StatCard.js.map +1 -0
  329. package/dist/internal/blocks/TextInput.js +13 -0
  330. package/dist/internal/blocks/TextInput.js.map +1 -0
  331. package/dist/internal/blocks/Textarea.js +13 -0
  332. package/dist/internal/blocks/Textarea.js.map +1 -0
  333. package/dist/internal/blocks/TimeInput.js +17 -0
  334. package/dist/internal/blocks/TimeInput.js.map +1 -0
  335. package/dist/internal/components/Alert.js +11 -0
  336. package/dist/internal/components/Alert.js.map +1 -0
  337. package/dist/internal/components/AlertModal.js +11 -0
  338. package/dist/internal/components/AlertModal.js.map +1 -0
  339. package/dist/internal/components/Avatar.js +9 -0
  340. package/dist/internal/components/Avatar.js.map +1 -0
  341. package/dist/internal/components/Badge.js +9 -0
  342. package/dist/internal/components/Badge.js.map +1 -0
  343. package/dist/internal/components/BrandLogo.js +11 -0
  344. package/dist/internal/components/BrandLogo.js.map +1 -0
  345. package/dist/internal/components/Breadcrumb.js +14 -0
  346. package/dist/internal/components/Breadcrumb.js.map +1 -0
  347. package/dist/internal/components/Button.js +10 -0
  348. package/dist/internal/components/Button.js.map +1 -0
  349. package/dist/internal/components/ButtonGroup.js +9 -0
  350. package/dist/internal/components/ButtonGroup.js.map +1 -0
  351. package/dist/internal/components/Calendar.js +9 -0
  352. package/dist/internal/components/Calendar.js.map +1 -0
  353. package/dist/internal/components/Card.js +9 -0
  354. package/dist/internal/components/Card.js.map +1 -0
  355. package/dist/internal/components/Checkbox.js +11 -0
  356. package/dist/internal/components/Checkbox.js.map +1 -0
  357. package/dist/internal/components/Clipboard.js +9 -0
  358. package/dist/internal/components/Clipboard.js.map +1 -0
  359. package/dist/internal/components/Collapsible.js +9 -0
  360. package/dist/internal/components/Collapsible.js.map +1 -0
  361. package/dist/internal/components/CollapsiblePanel.js +11 -0
  362. package/dist/internal/components/CollapsiblePanel.js.map +1 -0
  363. package/dist/internal/components/Combobox.js +13 -0
  364. package/dist/internal/components/Combobox.js.map +1 -0
  365. package/dist/internal/components/DatePicker.js +11 -0
  366. package/dist/internal/components/DatePicker.js.map +1 -0
  367. package/dist/internal/components/DateRangePicker.js +17 -0
  368. package/dist/internal/components/DateRangePicker.js.map +1 -0
  369. package/dist/internal/components/DiffView.js +9 -0
  370. package/dist/internal/components/DiffView.js.map +1 -0
  371. package/dist/internal/components/DotsLoader.js +5 -0
  372. package/dist/internal/components/DotsLoader.js.map +1 -0
  373. package/dist/internal/components/DropdownMenu.js +11 -0
  374. package/dist/internal/components/DropdownMenu.js.map +1 -0
  375. package/dist/internal/components/EmptySearchContent.js +4 -0
  376. package/dist/internal/components/EmptySearchContent.js.map +1 -0
  377. package/dist/internal/components/FileUpload.js +11 -0
  378. package/dist/internal/components/FileUpload.js.map +1 -0
  379. package/dist/internal/components/FullScreenModal.js +12 -0
  380. package/dist/internal/components/FullScreenModal.js.map +1 -0
  381. package/dist/internal/components/HelpBlock.js +4 -0
  382. package/dist/internal/components/HelpBlock.js.map +1 -0
  383. package/dist/internal/components/HoverCard.js +9 -0
  384. package/dist/internal/components/HoverCard.js.map +1 -0
  385. package/dist/internal/components/InputGroup.js +11 -0
  386. package/dist/internal/components/InputGroup.js.map +1 -0
  387. package/dist/internal/components/Kbd.js +9 -0
  388. package/dist/internal/components/Kbd.js.map +1 -0
  389. package/dist/internal/components/Label.js +9 -0
  390. package/dist/internal/components/Label.js.map +1 -0
  391. package/dist/internal/components/Link.js +9 -0
  392. package/dist/internal/components/Link.js.map +1 -0
  393. package/dist/internal/components/MarkedText.js +5 -0
  394. package/dist/internal/components/MarkedText.js.map +1 -0
  395. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +10 -0
  396. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js.map +1 -0
  397. package/dist/internal/components/MergeEditor/PaneHeader.js +4 -0
  398. package/dist/internal/components/MergeEditor/PaneHeader.js.map +1 -0
  399. package/dist/internal/components/MergeEditor/constants.js +4 -0
  400. package/dist/internal/components/MergeEditor/constants.js.map +1 -0
  401. package/dist/internal/components/MergeEditor/useMergeDiff.js +5 -0
  402. package/dist/internal/components/MergeEditor/useMergeDiff.js.map +1 -0
  403. package/dist/internal/components/Modal.js +13 -0
  404. package/dist/internal/components/Modal.js.map +1 -0
  405. package/dist/internal/components/Navbar.js +14 -0
  406. package/dist/internal/components/Navbar.js.map +1 -0
  407. package/dist/internal/components/Pagination.js +11 -0
  408. package/dist/internal/components/Pagination.js.map +1 -0
  409. package/dist/internal/components/PanelWithDetails.js +11 -0
  410. package/dist/internal/components/PanelWithDetails.js.map +1 -0
  411. package/dist/internal/components/Popconfirm.js +12 -0
  412. package/dist/internal/components/Popconfirm.js.map +1 -0
  413. package/dist/internal/components/Popover.js +9 -0
  414. package/dist/internal/components/Popover.js.map +1 -0
  415. package/dist/internal/components/Progress.js +9 -0
  416. package/dist/internal/components/Progress.js.map +1 -0
  417. package/dist/internal/components/RadioGroup.js +12 -0
  418. package/dist/internal/components/RadioGroup.js.map +1 -0
  419. package/dist/internal/components/Resizable.js +9 -0
  420. package/dist/internal/components/Resizable.js.map +1 -0
  421. package/dist/internal/components/ScrollArea.js +9 -0
  422. package/dist/internal/components/ScrollArea.js.map +1 -0
  423. package/dist/internal/components/Search.js +10 -0
  424. package/dist/internal/components/Search.js.map +1 -0
  425. package/dist/internal/components/Select.js +12 -0
  426. package/dist/internal/components/Select.js.map +1 -0
  427. package/dist/internal/components/Separator.js +9 -0
  428. package/dist/internal/components/Separator.js.map +1 -0
  429. package/dist/internal/components/Sheet.js +12 -0
  430. package/dist/internal/components/Sheet.js.map +1 -0
  431. package/dist/internal/components/Sidebar.js +20 -0
  432. package/dist/internal/components/Sidebar.js.map +1 -0
  433. package/dist/internal/components/Skeleton/Skeleton.js +9 -0
  434. package/dist/internal/components/Skeleton/Skeleton.js.map +1 -0
  435. package/dist/internal/components/Skeleton/SkeletonList.js +10 -0
  436. package/dist/internal/components/Skeleton/SkeletonList.js.map +1 -0
  437. package/dist/internal/components/Slider.js +11 -0
  438. package/dist/internal/components/Slider.js.map +1 -0
  439. package/dist/internal/components/SpotlightBackdrop.js +9 -0
  440. package/dist/internal/components/SpotlightBackdrop.js.map +1 -0
  441. package/dist/internal/components/Stepper.js +10 -0
  442. package/dist/internal/components/Stepper.js.map +1 -0
  443. package/dist/internal/components/Switch.js +10 -0
  444. package/dist/internal/components/Switch.js.map +1 -0
  445. package/dist/internal/components/Table.js +10 -0
  446. package/dist/internal/components/Table.js.map +1 -0
  447. package/dist/internal/components/Tabs.js +12 -0
  448. package/dist/internal/components/Tabs.js.map +1 -0
  449. package/dist/internal/components/ThemeProvider.js +10 -0
  450. package/dist/internal/components/ThemeProvider.js.map +1 -0
  451. package/dist/internal/components/TimePicker.js +12 -0
  452. package/dist/internal/components/TimePicker.js.map +1 -0
  453. package/dist/internal/components/Timeline.js +10 -0
  454. package/dist/internal/components/Timeline.js.map +1 -0
  455. package/dist/internal/components/Toast.js +11 -0
  456. package/dist/internal/components/Toast.js.map +1 -0
  457. package/dist/internal/components/Toggle.js +9 -0
  458. package/dist/internal/components/Toggle.js.map +1 -0
  459. package/dist/internal/components/ToggleGroup.js +9 -0
  460. package/dist/internal/components/ToggleGroup.js.map +1 -0
  461. package/dist/internal/components/Tooltip.js +8 -0
  462. package/dist/internal/components/Tooltip.js.map +1 -0
  463. package/dist/internal/components/Truncated.js +9 -0
  464. package/dist/internal/components/Truncated.js.map +1 -0
  465. package/dist/internal/components/Workbench.js +11 -0
  466. package/dist/internal/components/Workbench.js.map +1 -0
  467. package/dist/internal/components/ZoomableSvg.js +13 -0
  468. package/dist/internal/components/ZoomableSvg.js.map +1 -0
  469. package/dist/internal/hooks/useAutosizeInput.js +4 -0
  470. package/dist/internal/hooks/useAutosizeInput.js.map +1 -0
  471. package/dist/internal/hooks/useScrollbarPosition.js +5 -0
  472. package/dist/internal/hooks/useScrollbarPosition.js.map +1 -0
  473. package/dist/internal/hooks/useStableCallback.js +4 -0
  474. package/dist/internal/hooks/useStableCallback.js.map +1 -0
  475. package/dist/internal/utils/mergeRefs.js +4 -0
  476. package/dist/internal/utils/mergeRefs.js.map +1 -0
  477. package/dist/internal/utils.js +8 -0
  478. package/dist/internal/utils.js.map +1 -0
  479. package/dist/markdown-editor.js +23 -9
  480. package/dist/markdown-editor.js.map +1 -1
  481. package/dist/mermaid.js +16 -8
  482. package/dist/rjsf.js +102 -29
  483. package/dist/rjsf.js.map +1 -1
  484. package/dist/styles.css +1 -1
  485. package/dist/testing.js +8 -3
  486. package/dist/testing.js.map +1 -1
  487. package/package.json +9 -8
  488. package/src/styles.css +35 -7
  489. package/src/theme.css +64 -0
  490. package/dist/MermaidDiagram-EOKJHQQV.js +0 -10
  491. package/dist/chunk-63NSN2VL.js.map +0 -1
  492. package/dist/chunk-6FPEI4EM.js.map +0 -1
  493. package/dist/chunk-7PUUHEJQ.js.map +0 -1
  494. package/dist/chunk-C3L3TBBT.js.map +0 -1
  495. package/dist/chunk-IJTHFNNJ.js.map +0 -1
  496. package/dist/chunk-JP7PNHLH.js.map +0 -1
  497. package/dist/chunk-KPNAW5MU.js +0 -229
  498. package/dist/chunk-KPNAW5MU.js.map +0 -1
  499. package/dist/chunk-L37JJ6MR.js +0 -152
  500. package/dist/chunk-L37JJ6MR.js.map +0 -1
  501. package/dist/chunk-Q7NWXLCT.js.map +0 -1
  502. package/dist/chunk-SYIEF644.js +0 -1016
  503. package/dist/chunk-SYIEF644.js.map +0 -1
  504. package/dist/chunk-XV3UUOYF.js.map +0 -1
@@ -0,0 +1,699 @@
1
+ import { Select } from './chunk-M6LTUPVP.js';
2
+ import { Slider } from './chunk-I2UCOD45.js';
3
+ import { ToggleGroup } from './chunk-M4CTURKX.js';
4
+ import { Collapsible } from './chunk-FVPGQ6UE.js';
5
+ import { Badge } from './chunk-SBGAUGXY.js';
6
+ import { Textarea } from './chunk-EEK5NGZF.js';
7
+ import { ColorInput } from './chunk-VSERHUWD.js';
8
+ import { TextInput } from './chunk-HPMYYGP7.js';
9
+ import { Label } from './chunk-S6TAF63G.js';
10
+ import { Button } from './chunk-IXAYNBOY.js';
11
+ import { useId, useMemo } from 'react';
12
+ import DOMPurify from 'dompurify';
13
+ import { keboola } from '@keboola/brand-registry';
14
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
15
+
16
+ // src/blocks/BrandEditor/color.ts
17
+ var hexToChannels = (hex) => {
18
+ let h = hex.trim().replace(/^#/, "");
19
+ if (h.length === 3 || h.length === 4) {
20
+ h = h.slice(0, 3).split("").map((c) => c + c).join("");
21
+ } else if (h.length === 8) {
22
+ h = h.slice(0, 6);
23
+ }
24
+ if (!/^[0-9a-fA-F]{6}$/.test(h)) return "0 0 0";
25
+ const n = parseInt(h, 16);
26
+ return `${n >> 16 & 255} ${n >> 8 & 255} ${n & 255}`;
27
+ };
28
+ var channelsToHex = (channels) => {
29
+ const [r = 0, g = 0, b = 0] = channels.trim().split(/\s+/).map((n) => Number(n) || 0);
30
+ const to2 = (v) => Math.max(0, Math.min(255, v)).toString(16).padStart(2, "0");
31
+ return `#${to2(r)}${to2(g)}${to2(b)}`;
32
+ };
33
+ var COMPLETE_HEX = /^([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
34
+ var ColorField = ({ id, label, channels, onChange }) => {
35
+ const hex = channelsToHex(channels);
36
+ return /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:items-center tw:justify-between tw:gap-2", children: [
37
+ /* @__PURE__ */ jsx(Label, { htmlFor: id, className: "tw:text-xs tw:font-normal tw:text-foreground", children: label }),
38
+ /* @__PURE__ */ jsx(
39
+ ColorInput,
40
+ {
41
+ id,
42
+ sizing: "medium",
43
+ value: hex,
44
+ className: "tw:w-36",
45
+ onValueChange: (next) => {
46
+ const clean = next.trim().replace(/^#/, "");
47
+ if (COMPLETE_HEX.test(clean)) onChange(hexToChannels(`#${clean}`));
48
+ }
49
+ }
50
+ )
51
+ ] });
52
+ };
53
+
54
+ // src/blocks/BrandEditor/contrast.ts
55
+ var clampChannel = (n) => Number.isFinite(n) ? Math.min(255, Math.max(0, n)) : 0;
56
+ var parseChannels = (channels) => {
57
+ const [r = 0, g = 0, b = 0] = channels.trim().split(/\s+/).map((n) => clampChannel(Number(n)));
58
+ return [r, g, b];
59
+ };
60
+ var relativeLuminance = (channels) => {
61
+ const [r = 0, g = 0, b = 0] = parseChannels(channels).map((c) => {
62
+ const s = c / 255;
63
+ return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
64
+ });
65
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
66
+ };
67
+ var contrastRatio = (fg, bg) => {
68
+ const l1 = relativeLuminance(fg);
69
+ const l2 = relativeLuminance(bg);
70
+ const [lighter, darker] = l1 >= l2 ? [l1, l2] : [l2, l1];
71
+ return (lighter + 0.05) / (darker + 0.05);
72
+ };
73
+ var wcagLevel = (ratio) => ratio >= 7 ? "AAA" : ratio >= 4.5 ? "AA" : "fail";
74
+ var ControlSection = ({ title, children }) => /* @__PURE__ */ jsxs("section", { className: "tw:flex tw:flex-col tw:gap-3 tw:border-b tw:border-border tw:p-4", children: [
75
+ /* @__PURE__ */ jsx("h3", { className: "tw:m-0 tw:text-xs tw:font-semibold tw:uppercase tw:tracking-wide tw:text-muted-foreground", children: title }),
76
+ children
77
+ ] });
78
+ var LogoField = ({ id, label, value, onChange }) => /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
79
+ /* @__PURE__ */ jsx(Label, { htmlFor: id, className: "tw:text-xs tw:font-normal tw:text-foreground", children: label }),
80
+ /* @__PURE__ */ jsx(
81
+ Textarea,
82
+ {
83
+ id,
84
+ value,
85
+ onValueChange: onChange,
86
+ maxRows: 4,
87
+ placeholder: "<svg\u2026>, a data: URI, or an https:// URL",
88
+ className: "tw:font-mono tw:text-xs"
89
+ }
90
+ )
91
+ ] });
92
+ var TextField = ({ id, label, value, onChange, placeholder }) => /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
93
+ /* @__PURE__ */ jsx(Label, { htmlFor: id, className: "tw:text-xs tw:font-normal tw:text-foreground", children: label }),
94
+ /* @__PURE__ */ jsx(
95
+ TextInput,
96
+ {
97
+ id,
98
+ sizing: "small",
99
+ value,
100
+ onValueChange: onChange,
101
+ placeholder,
102
+ className: "tw:font-mono tw:text-xs"
103
+ }
104
+ )
105
+ ] });
106
+ var DEFAULT_FALLBACK_FONT = "'Inter', system-ui, sans-serif";
107
+ var DEFAULT_FONT_OPTIONS = [
108
+ { value: DEFAULT_FALLBACK_FONT, label: "Inter (default)" },
109
+ { value: "'Space Grotesk', system-ui, sans-serif", label: "Space Grotesk" },
110
+ { value: "'Poppins', system-ui, sans-serif", label: "Poppins" },
111
+ { value: "'Manrope', system-ui, sans-serif", label: "Manrope" },
112
+ { value: "'Quicksand', system-ui, sans-serif", label: "Quicksand" },
113
+ { value: "'Baloo 2', system-ui, sans-serif", label: "Baloo 2" },
114
+ { value: "'Fraunces', Georgia, serif", label: "Fraunces (serif)" },
115
+ { value: "Georgia, 'Times New Roman', serif", label: "Georgia (serif)" },
116
+ { value: "'JetBrains Mono', ui-monospace, monospace", label: "JetBrains Mono" },
117
+ { value: "system-ui, sans-serif", label: "System UI" }
118
+ ];
119
+ var COLOR_LABELS = {
120
+ primary: "Primary",
121
+ primaryForeground: "Primary foreground",
122
+ background: "Background",
123
+ foreground: "Foreground",
124
+ card: "Card",
125
+ cardForeground: "Card foreground",
126
+ popover: "Popover",
127
+ popoverForeground: "Popover foreground",
128
+ secondary: "Secondary",
129
+ secondaryForeground: "Secondary foreground",
130
+ muted: "Muted",
131
+ mutedForeground: "Muted foreground",
132
+ accent: "Accent",
133
+ accentForeground: "Accent foreground",
134
+ border: "Border",
135
+ input: "Input border",
136
+ inputBackground: "Input background",
137
+ ring: "Ring",
138
+ ringOffset: "Ring offset",
139
+ destructive: "Destructive",
140
+ destructiveForeground: "Destructive foreground",
141
+ success: "Success",
142
+ successForeground: "Success foreground",
143
+ warning: "Warning",
144
+ warningForeground: "Warning foreground",
145
+ info: "Info",
146
+ infoForeground: "Info foreground"
147
+ };
148
+ var SIDEBAR_LABELS = {
149
+ sidebar: "Sidebar",
150
+ sidebarForeground: "Foreground",
151
+ sidebarPrimary: "Primary",
152
+ sidebarPrimaryForeground: "Primary foreground",
153
+ sidebarAccent: "Accent",
154
+ sidebarAccentForeground: "Accent foreground",
155
+ sidebarBorder: "Border",
156
+ sidebarRing: "Ring"
157
+ };
158
+ var CHART_LABELS = {
159
+ chart1: "Chart 1",
160
+ chart2: "Chart 2",
161
+ chart3: "Chart 3",
162
+ chart4: "Chart 4",
163
+ chart5: "Chart 5"
164
+ };
165
+ var WEIGHT_LABELS = {
166
+ normal: "Normal",
167
+ medium: "Medium",
168
+ semibold: "Semibold",
169
+ bold: "Bold"
170
+ };
171
+ var SHADOW_LABELS = {
172
+ sm: "Small",
173
+ md: "Medium",
174
+ lg: "Large",
175
+ lift: "Lift (raised)"
176
+ };
177
+ var SPACING_LABELS = {
178
+ gutter: "Gutter (between sections)",
179
+ inset: "Inset (in-container)"
180
+ };
181
+ var MOTION_LABELS = {
182
+ duration: "Duration",
183
+ easing: "Easing"
184
+ };
185
+ var COLOR_SLOTS = Object.keys(COLOR_LABELS);
186
+ var SIDEBAR_SLOTS = Object.keys(SIDEBAR_LABELS);
187
+ var CHART_SLOTS = Object.keys(CHART_LABELS);
188
+ var WEIGHT_SLOTS = Object.keys(WEIGHT_LABELS);
189
+ var SHADOW_SLOTS = Object.keys(SHADOW_LABELS);
190
+ var SPACING_SLOTS = Object.keys(SPACING_LABELS);
191
+ var MOTION_SLOTS = Object.keys(MOTION_LABELS);
192
+ var RADIUS_SIZES = ["sm", "md", "lg"];
193
+ var A11Y_PAIRS = [
194
+ { label: "Text on background", fg: "foreground", bg: "background" },
195
+ { label: "Text on card", fg: "cardForeground", bg: "card" },
196
+ { label: "Primary button", fg: "primaryForeground", bg: "primary" },
197
+ { label: "Muted text", fg: "mutedForeground", bg: "muted" },
198
+ { label: "Accent", fg: "accentForeground", bg: "accent" }
199
+ ];
200
+ var DEFAULT_SIDEBAR = {
201
+ light: {
202
+ sidebar: "255 255 255",
203
+ sidebarForeground: "30 41 59",
204
+ sidebarPrimary: "31 143 255",
205
+ sidebarPrimaryForeground: "255 255 255",
206
+ sidebarAccent: "219 234 254",
207
+ sidebarAccentForeground: "30 41 59",
208
+ sidebarBorder: "229 231 235",
209
+ sidebarRing: "31 143 255"
210
+ },
211
+ dark: {
212
+ sidebar: "14 14 18",
213
+ sidebarForeground: "229 230 236",
214
+ sidebarPrimary: "31 143 255",
215
+ sidebarPrimaryForeground: "255 255 255",
216
+ sidebarAccent: "38 38 45",
217
+ sidebarAccentForeground: "229 230 236",
218
+ sidebarBorder: "48 49 57",
219
+ sidebarRing: "31 143 255"
220
+ }
221
+ };
222
+ var DEFAULT_RADII = {
223
+ sm: "0.25rem",
224
+ md: "0.375rem",
225
+ lg: "0.5rem"
226
+ };
227
+ var DEFAULT_CHART = {
228
+ light: {
229
+ chart1: "31 143 255",
230
+ chart2: "0 194 135",
231
+ chart3: "146 92 255",
232
+ chart4: "245 147 0",
233
+ chart5: "237 94 223"
234
+ },
235
+ dark: {
236
+ chart1: "92 173 255",
237
+ chart2: "0 230 161",
238
+ chart3: "173 133 255",
239
+ chart4: "255 190 92",
240
+ chart5: "242 140 232"
241
+ }
242
+ };
243
+ var DEFAULT_FONT_WEIGHTS = {
244
+ normal: "400",
245
+ medium: "500",
246
+ semibold: "600",
247
+ bold: "700"
248
+ };
249
+ var DEFAULT_LETTER_SPACING = "1px";
250
+ var MONO_FALLBACK = "'JetBrains Mono', ui-monospace, monospace";
251
+ var DEFAULT_SHADOWS = {
252
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
253
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
254
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
255
+ lift: "0 10px 30px -12px rgb(0 0 0 / 0.28), 0 2px 6px rgb(0 0 0 / 0.06)"
256
+ };
257
+ var DEFAULT_SPACING = {
258
+ gutter: "1.5rem",
259
+ inset: "1.5rem"
260
+ };
261
+ var DEFAULT_MOTION = {
262
+ duration: "200ms",
263
+ easing: "cubic-bezier(0.2, 0.7, 0.2, 1)"
264
+ };
265
+ var DEFAULT_GRADIENT = "linear-gradient(135deg, rgb(var(--primary)), rgb(var(--accent, var(--primary))))";
266
+ var numOf = (value, fallback) => {
267
+ const n = Number.parseFloat(value);
268
+ return Number.isFinite(n) ? n : fallback;
269
+ };
270
+ var letterSpacingToPx = (value) => {
271
+ const n = Number.parseFloat(value);
272
+ if (!Number.isFinite(n)) return 0;
273
+ return value.trim().endsWith("em") ? n * 16 : n;
274
+ };
275
+ var pxToLetterSpacing = (px, currentValue) => currentValue.trim().endsWith("em") ? `${Number((px / 16).toFixed(3))}em` : `${px}px`;
276
+ var lengthToPx = (value) => {
277
+ const n = Number.parseFloat(value);
278
+ if (!Number.isFinite(n)) return 0;
279
+ return Math.round(value.trim().endsWith("rem") ? n * 16 : n);
280
+ };
281
+ var pxToLength = (px, currentValue) => {
282
+ const trimmed = currentValue.trim();
283
+ if (trimmed.endsWith("rem")) return `${px / 16}rem`;
284
+ if (/^-?\d*\.?\d+$/.test(trimmed)) return `${px}`;
285
+ return `${px}px`;
286
+ };
287
+ var isSvgMarkup = (source) => source.trimStart().startsWith("<");
288
+ var isImageSource = (source) => /^(data:|https?:\/\/)/.test(source.trim());
289
+ var LogoPreviewImage = ({ source, className }) => {
290
+ const safeSvg = useMemo(
291
+ () => isSvgMarkup(source) ? DOMPurify.sanitize(source, { USE_PROFILES: { svg: true, svgFilters: true } }) : null,
292
+ [source]
293
+ );
294
+ if (safeSvg !== null) {
295
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className, dangerouslySetInnerHTML: { __html: safeSvg } });
296
+ }
297
+ if (isImageSource(source)) {
298
+ return /* @__PURE__ */ jsx("img", { src: source, alt: "", className });
299
+ }
300
+ return null;
301
+ };
302
+ var BrandEditor = ({
303
+ value,
304
+ onChange,
305
+ colorScheme = "light",
306
+ onColorSchemeChange,
307
+ fontOptions = DEFAULT_FONT_OPTIONS
308
+ }) => {
309
+ const baseId = useId();
310
+ const { theme } = value;
311
+ const coreColors = colorScheme === "light" ? theme.colors : theme.colorsDark;
312
+ const sidebarColors = colorScheme === "light" ? theme.colors?.sidebar : theme.colorsDark?.sidebar;
313
+ const chartColors = colorScheme === "light" ? theme.colors?.chart : theme.colorsDark?.chart;
314
+ const defaultColors = colorScheme === "light" ? keboola.theme.colors : keboola.theme.colorsDark;
315
+ const radii = theme.radii ?? DEFAULT_RADII;
316
+ const typography = theme.typography;
317
+ const setColor = (slot, channels) => {
318
+ if (colorScheme === "light") {
319
+ onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, [slot]: channels } } });
320
+ return;
321
+ }
322
+ onChange({
323
+ ...value,
324
+ theme: { ...theme, colorsDark: { ...theme.colorsDark, [slot]: channels } }
325
+ });
326
+ };
327
+ const setSidebarColor = (slot, channels) => {
328
+ if (colorScheme === "light") {
329
+ const base = theme.colors?.sidebar ?? DEFAULT_SIDEBAR.light;
330
+ onChange({
331
+ ...value,
332
+ theme: { ...theme, colors: { ...theme.colors, sidebar: { ...base, [slot]: channels } } }
333
+ });
334
+ return;
335
+ }
336
+ const sidebarBase = theme.colorsDark?.sidebar ?? DEFAULT_SIDEBAR.dark;
337
+ onChange({
338
+ ...value,
339
+ theme: {
340
+ ...theme,
341
+ colorsDark: { ...theme.colorsDark, sidebar: { ...sidebarBase, [slot]: channels } }
342
+ }
343
+ });
344
+ };
345
+ const setChart = (slot, channels) => {
346
+ const base = chartColors ?? DEFAULT_CHART[colorScheme];
347
+ const chart = { ...base, [slot]: channels };
348
+ if (colorScheme === "light") {
349
+ onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, chart } } });
350
+ return;
351
+ }
352
+ onChange({ ...value, theme: { ...theme, colorsDark: { ...theme.colorsDark, chart } } });
353
+ };
354
+ const setRadius = (size, radius) => onChange({
355
+ ...value,
356
+ theme: { ...theme, radii: { ...theme.radii ?? DEFAULT_RADII, [size]: radius } }
357
+ });
358
+ const patchTypography = (patch) => onChange({ ...value, theme: { ...theme, typography: { ...theme.typography, ...patch } } });
359
+ const setFontFace = (face, font) => patchTypography({ [face]: font.trim() || void 0 });
360
+ const setFontWeight = (slot, weight) => patchTypography({ weight: { ...theme.typography?.weight, [slot]: weight || void 0 } });
361
+ const setLetterSpacing = (chrome) => patchTypography({ letterSpacing: { chrome: chrome.trim() || void 0 } });
362
+ const setShadow = (slot, shadow) => onChange({
363
+ ...value,
364
+ theme: { ...theme, shadows: { ...theme.shadows, [slot]: shadow.trim() || void 0 } }
365
+ });
366
+ const setSpacing = (slot, length) => onChange({
367
+ ...value,
368
+ theme: { ...theme, spacing: { ...theme.spacing, [slot]: length.trim() || void 0 } }
369
+ });
370
+ const setMotion = (slot, token) => onChange({
371
+ ...value,
372
+ theme: { ...theme, motion: { ...theme.motion, [slot]: token.trim() || void 0 } }
373
+ });
374
+ const setGradient = (gradient) => onChange({
375
+ ...value,
376
+ theme: { ...theme, gradient: { brand: gradient.trim() || void 0 } }
377
+ });
378
+ const setLogo = (slot, source) => {
379
+ const trimmed = source.trim();
380
+ const nextLogo = { ...value.logo };
381
+ if (trimmed) nextLogo[slot] = trimmed;
382
+ else delete nextLogo[slot];
383
+ const { logo: _drop, ...rest } = value;
384
+ onChange(Object.keys(nextLogo).length > 0 ? { ...value, logo: nextLogo } : rest);
385
+ };
386
+ return /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col", children: [
387
+ /* @__PURE__ */ jsxs(ControlSection, { title: "Colors", children: [
388
+ onColorSchemeChange ? /* @__PURE__ */ jsxs(
389
+ ToggleGroup,
390
+ {
391
+ type: "single",
392
+ value: colorScheme,
393
+ onValueChange: (next) => {
394
+ if (next === "light" || next === "dark") onColorSchemeChange(next);
395
+ },
396
+ "aria-label": "Color scheme",
397
+ className: "tw:w-full",
398
+ children: [
399
+ /* @__PURE__ */ jsx(ToggleGroup.Item, { value: "light", className: "tw:flex-1", children: "Light" }),
400
+ /* @__PURE__ */ jsx(ToggleGroup.Item, { value: "dark", className: "tw:flex-1", children: "Dark" })
401
+ ]
402
+ }
403
+ ) : null,
404
+ /* @__PURE__ */ jsx("div", { className: "tw:flex tw:flex-col tw:gap-2", children: COLOR_SLOTS.map((slot) => /* @__PURE__ */ jsx(
405
+ ColorField,
406
+ {
407
+ id: `${baseId}color-${colorScheme}-${slot}`,
408
+ label: COLOR_LABELS[slot],
409
+ channels: coreColors?.[slot] ?? defaultColors?.[slot] ?? "0 0 0",
410
+ onChange: (channels) => setColor(slot, channels)
411
+ },
412
+ slot
413
+ )) })
414
+ ] }),
415
+ /* @__PURE__ */ jsxs(ControlSection, { title: "Accessibility", children: [
416
+ /* @__PURE__ */ jsxs("p", { className: "tw:m-0 tw:text-xs tw:text-muted-foreground", children: [
417
+ "WCAG contrast for the ",
418
+ colorScheme,
419
+ " palette (AA needs 4.5:1)."
420
+ ] }),
421
+ /* @__PURE__ */ jsx("div", { className: "tw:flex tw:flex-col tw:gap-1.5", children: A11Y_PAIRS.map((pair) => {
422
+ const fg = coreColors?.[pair.fg] ?? defaultColors?.[pair.fg] ?? "0 0 0";
423
+ const bg = coreColors?.[pair.bg] ?? defaultColors?.[pair.bg] ?? "255 255 255";
424
+ const ratio = contrastRatio(fg, bg);
425
+ const level = wcagLevel(ratio);
426
+ return /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:items-center tw:justify-between tw:gap-2", children: [
427
+ /* @__PURE__ */ jsx("span", { className: "tw:text-xs tw:text-foreground", children: pair.label }),
428
+ /* @__PURE__ */ jsxs("span", { className: "tw:flex tw:items-center tw:gap-1.5", children: [
429
+ /* @__PURE__ */ jsxs("span", { className: "tw:text-xs tw:tabular-nums tw:text-muted-foreground", children: [
430
+ ratio.toFixed(1),
431
+ ":1"
432
+ ] }),
433
+ /* @__PURE__ */ jsx(Badge, { color: level === "fail" ? "red" : "green", children: level === "fail" ? "Fail" : level })
434
+ ] })
435
+ ] }, pair.label);
436
+ }) })
437
+ ] }),
438
+ /* @__PURE__ */ jsx(ControlSection, { title: "Sidebar colors", children: /* @__PURE__ */ jsxs(Collapsible, { className: "tw:flex tw:flex-col tw:gap-2", children: [
439
+ /* @__PURE__ */ jsx(Collapsible.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "small", className: "tw:w-full", children: [
440
+ "Toggle sidebar tokens (",
441
+ colorScheme,
442
+ ")"
443
+ ] }) }),
444
+ /* @__PURE__ */ jsx(Collapsible.Content, { className: "tw:flex tw:flex-col tw:gap-2", children: SIDEBAR_SLOTS.map((slot) => /* @__PURE__ */ jsx(
445
+ ColorField,
446
+ {
447
+ id: `${baseId}sidebar-${colorScheme}-${slot}`,
448
+ label: SIDEBAR_LABELS[slot],
449
+ channels: sidebarColors?.[slot] ?? DEFAULT_SIDEBAR[colorScheme][slot],
450
+ onChange: (channels) => setSidebarColor(slot, channels)
451
+ },
452
+ slot
453
+ )) })
454
+ ] }) }),
455
+ /* @__PURE__ */ jsxs(ControlSection, { title: "Chart palette", children: [
456
+ /* @__PURE__ */ jsxs("p", { className: "tw:m-0 tw:text-xs tw:text-muted-foreground", children: [
457
+ "Categorical series colours for the ",
458
+ colorScheme,
459
+ " palette (`--chart-1\u20265`)."
460
+ ] }),
461
+ /* @__PURE__ */ jsx("div", { className: "tw:flex tw:flex-col tw:gap-2", children: CHART_SLOTS.map((slot) => /* @__PURE__ */ jsx(
462
+ ColorField,
463
+ {
464
+ id: `${baseId}chart-${colorScheme}-${slot}`,
465
+ label: CHART_LABELS[slot],
466
+ channels: chartColors?.[slot] ?? DEFAULT_CHART[colorScheme][slot],
467
+ onChange: (channels) => setChart(slot, channels)
468
+ },
469
+ slot
470
+ )) })
471
+ ] }),
472
+ /* @__PURE__ */ jsx(ControlSection, { title: "Radius", children: RADIUS_SIZES.map((size) => {
473
+ const current = radii[size];
474
+ const px = lengthToPx(current);
475
+ return /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
476
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:items-center tw:justify-between", children: [
477
+ /* @__PURE__ */ jsx(Label, { className: "tw:text-xs tw:font-normal tw:uppercase tw:text-foreground", children: size }),
478
+ /* @__PURE__ */ jsx("span", { className: "tw:text-xs tw:tabular-nums tw:text-muted-foreground", children: radii[size] })
479
+ ] }),
480
+ /* @__PURE__ */ jsx(
481
+ Slider,
482
+ {
483
+ min: 0,
484
+ max: 24,
485
+ step: 1,
486
+ value: [px],
487
+ onValueChange: (values) => setRadius(size, pxToLength(values[0] ?? 0, current))
488
+ }
489
+ )
490
+ ] }, size);
491
+ }) }),
492
+ /* @__PURE__ */ jsxs(ControlSection, { title: "Typography", children: [
493
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
494
+ /* @__PURE__ */ jsx(
495
+ Label,
496
+ {
497
+ htmlFor: `${baseId}font-family`,
498
+ className: "tw:text-xs tw:font-normal tw:text-foreground",
499
+ children: "Font family"
500
+ }
501
+ ),
502
+ /* @__PURE__ */ jsx(
503
+ Select,
504
+ {
505
+ id: `${baseId}font-family`,
506
+ value: typography?.fontFamily ?? DEFAULT_FALLBACK_FONT,
507
+ onValueChange: (font) => setFontFace("fontFamily", font),
508
+ items: fontOptions
509
+ }
510
+ )
511
+ ] }),
512
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
513
+ /* @__PURE__ */ jsx(
514
+ Label,
515
+ {
516
+ htmlFor: `${baseId}font-display`,
517
+ className: "tw:text-xs tw:font-normal tw:text-foreground",
518
+ children: "Display font (headings)"
519
+ }
520
+ ),
521
+ /* @__PURE__ */ jsx(
522
+ Select,
523
+ {
524
+ id: `${baseId}font-display`,
525
+ value: typography?.fontDisplay ?? typography?.fontFamily ?? DEFAULT_FALLBACK_FONT,
526
+ onValueChange: (font) => setFontFace("fontDisplay", font),
527
+ items: fontOptions
528
+ }
529
+ )
530
+ ] }),
531
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
532
+ /* @__PURE__ */ jsx(
533
+ Label,
534
+ {
535
+ htmlFor: `${baseId}font-mono`,
536
+ className: "tw:text-xs tw:font-normal tw:text-foreground",
537
+ children: "Monospace font"
538
+ }
539
+ ),
540
+ /* @__PURE__ */ jsx(
541
+ Select,
542
+ {
543
+ id: `${baseId}font-mono`,
544
+ value: typography?.fontMono ?? MONO_FALLBACK,
545
+ onValueChange: (font) => setFontFace("fontMono", font),
546
+ items: fontOptions
547
+ }
548
+ )
549
+ ] }),
550
+ /* @__PURE__ */ jsx("span", { className: "tw:text-xs tw:text-muted-foreground", children: "Chrome font weights" }),
551
+ WEIGHT_SLOTS.map((slot) => {
552
+ const current = typography?.weight?.[slot] ?? DEFAULT_FONT_WEIGHTS[slot];
553
+ return /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
554
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:items-center tw:justify-between", children: [
555
+ /* @__PURE__ */ jsx(Label, { className: "tw:text-xs tw:font-normal tw:text-foreground", children: WEIGHT_LABELS[slot] }),
556
+ /* @__PURE__ */ jsx("span", { className: "tw:text-xs tw:tabular-nums tw:text-muted-foreground", children: current })
557
+ ] }),
558
+ /* @__PURE__ */ jsx(
559
+ Slider,
560
+ {
561
+ min: 100,
562
+ max: 900,
563
+ step: 25,
564
+ value: [numOf(current, 400)],
565
+ onValueChange: (values) => setFontWeight(slot, String(values[0] ?? 400))
566
+ }
567
+ )
568
+ ] }, slot);
569
+ }),
570
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
571
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:items-center tw:justify-between", children: [
572
+ /* @__PURE__ */ jsx(Label, { className: "tw:text-xs tw:font-normal tw:text-foreground", children: "Chrome letter spacing" }),
573
+ /* @__PURE__ */ jsx("span", { className: "tw:text-xs tw:tabular-nums tw:text-muted-foreground", children: typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING })
574
+ ] }),
575
+ /* @__PURE__ */ jsx(
576
+ Slider,
577
+ {
578
+ min: -2,
579
+ max: 4,
580
+ step: 0.25,
581
+ value: [letterSpacingToPx(typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING)],
582
+ onValueChange: (values) => setLetterSpacing(
583
+ pxToLetterSpacing(
584
+ values[0] ?? 0,
585
+ typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING
586
+ )
587
+ )
588
+ }
589
+ )
590
+ ] })
591
+ ] }),
592
+ /* @__PURE__ */ jsxs(ControlSection, { title: "Elevation", children: [
593
+ /* @__PURE__ */ jsx("p", { className: "tw:m-0 tw:text-xs tw:text-muted-foreground", children: "Box-shadow scale (`--shadow-*`), shared across light & dark. Empty inherits the default." }),
594
+ SHADOW_SLOTS.map((slot) => /* @__PURE__ */ jsx(
595
+ TextField,
596
+ {
597
+ id: `${baseId}shadow-${slot}`,
598
+ label: SHADOW_LABELS[slot],
599
+ value: theme.shadows?.[slot] ?? "",
600
+ placeholder: DEFAULT_SHADOWS[slot],
601
+ onChange: (next) => setShadow(slot, next)
602
+ },
603
+ slot
604
+ ))
605
+ ] }),
606
+ /* @__PURE__ */ jsxs(ControlSection, { title: "Density", children: [
607
+ /* @__PURE__ */ jsx("p", { className: "tw:m-0 tw:text-xs tw:text-muted-foreground", children: "Semantic spacing (`--space-*`), as CSS lengths." }),
608
+ SPACING_SLOTS.map((slot) => /* @__PURE__ */ jsx(
609
+ TextField,
610
+ {
611
+ id: `${baseId}spacing-${slot}`,
612
+ label: SPACING_LABELS[slot],
613
+ value: theme.spacing?.[slot] ?? "",
614
+ placeholder: DEFAULT_SPACING[slot],
615
+ onChange: (next) => setSpacing(slot, next)
616
+ },
617
+ slot
618
+ ))
619
+ ] }),
620
+ /* @__PURE__ */ jsxs(ControlSection, { title: "Motion", children: [
621
+ /* @__PURE__ */ jsx("p", { className: "tw:m-0 tw:text-xs tw:text-muted-foreground", children: "Base transition `duration` + `easing` (`--motion-*`)." }),
622
+ MOTION_SLOTS.map((slot) => /* @__PURE__ */ jsx(
623
+ TextField,
624
+ {
625
+ id: `${baseId}motion-${slot}`,
626
+ label: MOTION_LABELS[slot],
627
+ value: theme.motion?.[slot] ?? "",
628
+ placeholder: DEFAULT_MOTION[slot],
629
+ onChange: (next) => setMotion(slot, next)
630
+ },
631
+ slot
632
+ ))
633
+ ] }),
634
+ /* @__PURE__ */ jsx(ControlSection, { title: "Gradient", children: /* @__PURE__ */ jsx(
635
+ TextField,
636
+ {
637
+ id: `${baseId}gradient-brand`,
638
+ label: "Brand gradient",
639
+ value: theme.gradient?.brand ?? "",
640
+ placeholder: DEFAULT_GRADIENT,
641
+ onChange: setGradient
642
+ }
643
+ ) }),
644
+ /* @__PURE__ */ jsxs(ControlSection, { title: "Logo", children: [
645
+ /* @__PURE__ */ jsx(
646
+ LogoField,
647
+ {
648
+ id: `${baseId}logo-mark`,
649
+ label: "Mark (icon)",
650
+ value: value.logo?.mark ?? "",
651
+ onChange: (source) => setLogo("mark", source)
652
+ }
653
+ ),
654
+ /* @__PURE__ */ jsx(
655
+ LogoField,
656
+ {
657
+ id: `${baseId}logo-wordmark`,
658
+ label: "Wordmark (full)",
659
+ value: value.logo?.wordmark ?? "",
660
+ onChange: (source) => setLogo("wordmark", source)
661
+ }
662
+ ),
663
+ /* @__PURE__ */ jsxs(Collapsible, { className: "tw:flex tw:flex-col tw:gap-2", children: [
664
+ /* @__PURE__ */ jsx(Collapsible.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "small", className: "tw:w-full", children: "Toggle dark-mode logos" }) }),
665
+ /* @__PURE__ */ jsxs(Collapsible.Content, { className: "tw:flex tw:flex-col tw:gap-2", children: [
666
+ /* @__PURE__ */ jsx(
667
+ LogoField,
668
+ {
669
+ id: `${baseId}logo-mark-dark`,
670
+ label: "Mark (dark)",
671
+ value: value.logo?.markDark ?? "",
672
+ onChange: (source) => setLogo("markDark", source)
673
+ }
674
+ ),
675
+ /* @__PURE__ */ jsx(
676
+ LogoField,
677
+ {
678
+ id: `${baseId}logo-wordmark-dark`,
679
+ label: "Wordmark (dark)",
680
+ value: value.logo?.wordmarkDark ?? "",
681
+ onChange: (source) => setLogo("wordmarkDark", source)
682
+ }
683
+ )
684
+ ] })
685
+ ] }),
686
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:flex-col tw:gap-1", children: [
687
+ /* @__PURE__ */ jsx("span", { className: "tw:text-xs tw:text-muted-foreground", children: "Preview" }),
688
+ /* @__PURE__ */ jsx("div", { className: "tw:flex tw:min-h-12 tw:items-center tw:gap-4 tw:rounded-md tw:border tw:border-border tw:bg-background tw:p-3", children: value.logo?.mark || value.logo?.wordmark ? /* @__PURE__ */ jsxs(Fragment, { children: [
689
+ value.logo.mark ? /* @__PURE__ */ jsx(LogoPreviewImage, { source: value.logo.mark, className: "tw:h-8" }) : null,
690
+ value.logo.wordmark ? /* @__PURE__ */ jsx(LogoPreviewImage, { source: value.logo.wordmark, className: "tw:h-8" }) : null
691
+ ] }) : /* @__PURE__ */ jsx("span", { className: "tw:text-xs tw:text-muted-foreground", children: "No logo set" }) })
692
+ ] })
693
+ ] })
694
+ ] });
695
+ };
696
+
697
+ export { BrandEditor, DEFAULT_FALLBACK_FONT, DEFAULT_FONT_OPTIONS, channelsToHex, contrastRatio, hexToChannels, wcagLevel };
698
+ //# sourceMappingURL=chunk-R74KGWNS.js.map
699
+ //# sourceMappingURL=chunk-R74KGWNS.js.map