@keboola/design 15.1.0 → 16.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 (345) hide show
  1. package/AGENTS.md +6 -5
  2. package/CHANGELOG.md +69 -0
  3. package/COMPONENT-API.md +62 -61
  4. package/dist/{AIKit-BR6jfsdI.js → AIKit-Cf5plya2.js} +328 -210
  5. package/dist/AIKit-Cf5plya2.js.map +1 -0
  6. package/dist/{Alert-Chz6KZ7e.js → Alert-DziS8n1H.js} +12 -19
  7. package/dist/{Alert-Chz6KZ7e.js.map → Alert-DziS8n1H.js.map} +1 -1
  8. package/dist/{AlertModal-DMsn62JJ.js → AlertModal-De04fFoy.js} +14 -24
  9. package/dist/{AlertModal-DMsn62JJ.js.map → AlertModal-De04fFoy.js.map} +1 -1
  10. package/dist/{AppShell-C8V1KRr_.js → AppShell-BUa3U7-e.js} +6 -9
  11. package/dist/{AppShell-C8V1KRr_.js.map → AppShell-BUa3U7-e.js.map} +1 -1
  12. package/dist/{AutoSaveTextarea-BbMhC5Aq.js → AutoSaveTextarea-CXHOQSun.js} +4 -5
  13. package/dist/{AutoSaveTextarea-BbMhC5Aq.js.map → AutoSaveTextarea-CXHOQSun.js.map} +1 -1
  14. package/dist/{Badge-CqlOE5A2.js → Badge-CFRhducL.js} +9 -14
  15. package/dist/{Badge-CqlOE5A2.js.map → Badge-CFRhducL.js.map} +1 -1
  16. package/dist/{BrandEditor-D61pzWRq.js → BrandEditor-hiLBX7az.js} +16 -23
  17. package/dist/{BrandEditor-D61pzWRq.js.map → BrandEditor-hiLBX7az.js.map} +1 -1
  18. package/dist/{BrandLogo-DkESE19K.js → BrandLogo-Dn7hhp2c.js} +4 -5
  19. package/dist/{BrandLogo-DkESE19K.js.map → BrandLogo-Dn7hhp2c.js.map} +1 -1
  20. package/dist/{Breadcrumb-DbqvDnYl.js → Breadcrumb-uGFEIjFF.js} +17 -28
  21. package/dist/{Breadcrumb-DbqvDnYl.js.map → Breadcrumb-uGFEIjFF.js.map} +1 -1
  22. package/dist/{Button-BNkyYU8u.js → Button-DbvGzEDb.js} +24 -20
  23. package/dist/Button-DbvGzEDb.js.map +1 -0
  24. package/dist/{Calendar-BnKi1kPu.js → Calendar-lJBTETbk.js} +752 -905
  25. package/dist/Calendar-lJBTETbk.js.map +1 -0
  26. package/dist/{Card-DxjGiqH8.js → Card-VIPfOVW5.js} +8 -14
  27. package/dist/{Card-DxjGiqH8.js.map → Card-VIPfOVW5.js.map} +1 -1
  28. package/dist/{Checkbox-CHDDJyAA.js → Checkbox-B2jLlyaO.js} +6 -8
  29. package/dist/{Checkbox-CHDDJyAA.js.map → Checkbox-B2jLlyaO.js.map} +1 -1
  30. package/dist/{Clipboard-DlwVZS1P.js → Clipboard-fAkDdpEu.js} +4 -5
  31. package/dist/{Clipboard-DlwVZS1P.js.map → Clipboard-fAkDdpEu.js.map} +1 -1
  32. package/dist/{ClipboardButton-B1Hr_n_Z.js → ClipboardButton-71Ugbl8c.js} +6 -8
  33. package/dist/{ClipboardButton-B1Hr_n_Z.js.map → ClipboardButton-71Ugbl8c.js.map} +1 -1
  34. package/dist/{CodeEditor-DVSPdfdo.js → CodeEditor-D_b-ZCng.js} +19 -31
  35. package/dist/{CodeEditor-DVSPdfdo.js.map → CodeEditor-D_b-ZCng.js.map} +1 -1
  36. package/dist/{Collapsible-DD4xTL75.js → Collapsible-zsXk4Vpp.js} +5 -8
  37. package/dist/{Collapsible-DD4xTL75.js.map → Collapsible-zsXk4Vpp.js.map} +1 -1
  38. package/dist/{ColorInput-B_eZIu39.js → ColorInput-Cjr1jkvy.js} +9 -12
  39. package/dist/{ColorInput-B_eZIu39.js.map → ColorInput-Cjr1jkvy.js.map} +1 -1
  40. package/dist/{ColorModeSwitch-BlrH8jAi.js → ColorModeSwitch-CuPYnJ2V.js} +5 -6
  41. package/dist/{ColorModeSwitch-BlrH8jAi.js.map → ColorModeSwitch-CuPYnJ2V.js.map} +1 -1
  42. package/dist/{Combobox-BLqX-Tdh.js → Combobox-DYjvYgl3.js} +37 -66
  43. package/dist/{Combobox-BLqX-Tdh.js.map → Combobox-DYjvYgl3.js.map} +1 -1
  44. package/dist/{Command-DhXmqFLT.js → Command-BcTb6GsR.js} +14 -24
  45. package/dist/{Command-DhXmqFLT.js.map → Command-BcTb6GsR.js.map} +1 -1
  46. package/dist/{CopyField-D0Pg4Z0R.js → CopyField-CnwAvQz9.js} +16 -28
  47. package/dist/{CopyField-D0Pg4Z0R.js.map → CopyField-CnwAvQz9.js.map} +1 -1
  48. package/dist/{DateInput-duinbI9_.js → DateInput-DJNX7Vdx.js} +8 -10
  49. package/dist/{DateInput-duinbI9_.js.map → DateInput-DJNX7Vdx.js.map} +1 -1
  50. package/dist/{DatePicker-Cg_aG_N4.js → DatePicker-CI59gF3S.js} +4 -5
  51. package/dist/{DatePicker-Cg_aG_N4.js.map → DatePicker-CI59gF3S.js.map} +1 -1
  52. package/dist/{DateRangeInput-BYVHf9zo.js → DateRangeInput-B3g8cyS0.js} +8 -10
  53. package/dist/{DateRangeInput-BYVHf9zo.js.map → DateRangeInput-B3g8cyS0.js.map} +1 -1
  54. package/dist/{DateRangePicker-m47cSV1r.js → DateRangePicker-48yOB2qV.js} +9 -10
  55. package/dist/{DateRangePicker-m47cSV1r.js.map → DateRangePicker-48yOB2qV.js.map} +1 -1
  56. package/dist/{DiffView-Dy4z-n-1.js → DiffView-DITZdVbh.js} +7 -12
  57. package/dist/{DiffView-Dy4z-n-1.js.map → DiffView-DITZdVbh.js.map} +1 -1
  58. package/dist/{DropdownMenu-Bum99mVf.js → DropdownMenu-Ba9atqDa.js} +20 -36
  59. package/dist/{DropdownMenu-Bum99mVf.js.map → DropdownMenu-Ba9atqDa.js.map} +1 -1
  60. package/dist/{FieldBox-BrxLkY9C.js → FieldBox-DdSdJ3ZN.js} +6 -10
  61. package/dist/{FieldBox-BrxLkY9C.js.map → FieldBox-DdSdJ3ZN.js.map} +1 -1
  62. package/dist/{FieldItem-BHUqgSO1.js → FieldItem-D7eCMfMB.js} +6 -8
  63. package/dist/{FieldItem-BHUqgSO1.js.map → FieldItem-D7eCMfMB.js.map} +1 -1
  64. package/dist/{FieldItem-CPN1xjN5.d.ts → FieldItem-fqm3CNR8.d.ts} +7 -6
  65. package/dist/{FileUpload-BYFONpEl.js → FileUpload-DskvxhAr.js} +25 -45
  66. package/dist/{FileUpload-BYFONpEl.js.map → FileUpload-DskvxhAr.js.map} +1 -1
  67. package/dist/{Form-Dqbt_tIs.js → Form-BUNW7nlt.js} +24 -38
  68. package/dist/{Form-Dqbt_tIs.js.map → Form-BUNW7nlt.js.map} +1 -1
  69. package/dist/{FormGroup-V5kIgQRN.js → FormGroup-QJB21LKp.js} +12 -20
  70. package/dist/{FormGroup-V5kIgQRN.js.map → FormGroup-QJB21LKp.js.map} +1 -1
  71. package/dist/{FullScreenModal-DAvvlGOz.js → FullScreenModal-RzY5XxiG.js} +8 -12
  72. package/dist/{FullScreenModal-DAvvlGOz.js.map → FullScreenModal-RzY5XxiG.js.map} +1 -1
  73. package/dist/{HoverCard-Cf9iYyaW.js → HoverCard-OGWKRXJ7.js} +4 -6
  74. package/dist/{HoverCard-Cf9iYyaW.js.map → HoverCard-OGWKRXJ7.js.map} +1 -1
  75. package/dist/{InlineEdit-D4P0SvCB.js → InlineEdit-CXL0ZslO.js} +7 -8
  76. package/dist/{InlineEdit-D4P0SvCB.js.map → InlineEdit-CXL0ZslO.js.map} +1 -1
  77. package/dist/{InputGroup-CZv_7QlM.js → InputGroup-BWeanEo7.js} +9 -15
  78. package/dist/{InputGroup-CZv_7QlM.js.map → InputGroup-BWeanEo7.js.map} +1 -1
  79. package/dist/{Kbd-CflKthfu.js → Kbd-BprYCICe.js} +8 -13
  80. package/dist/{Kbd-CflKthfu.js.map → Kbd-BprYCICe.js.map} +1 -1
  81. package/dist/{MarkedText-DlmlJO0u.js → MarkedText-BrganZ_V.js} +4 -6
  82. package/dist/{MarkedText-DlmlJO0u.js.map → MarkedText-BrganZ_V.js.map} +1 -1
  83. package/dist/{MermaidDiagram-2-EuNu1i.js → MermaidDiagram-E3azndPk.js} +9 -11
  84. package/dist/{MermaidDiagram-2-EuNu1i.js.map → MermaidDiagram-E3azndPk.js.map} +1 -1
  85. package/dist/{Modal-DwuvuiUx.js → Modal-Cf_kPEBW.js} +13 -21
  86. package/dist/{Modal-DwuvuiUx.js.map → Modal-Cf_kPEBW.js.map} +1 -1
  87. package/dist/{ModalTitle-RGWwIMU6.js → ModalTitle-7vgpfc6B.js} +5 -8
  88. package/dist/{ModalTitle-RGWwIMU6.js.map → ModalTitle-7vgpfc6B.js.map} +1 -1
  89. package/dist/{MultiActionButtonGroup-Dzig87s1.js → MultiActionButtonGroup-8WQwL4UQ.js} +6 -8
  90. package/dist/{MultiActionButtonGroup-Dzig87s1.js.map → MultiActionButtonGroup-8WQwL4UQ.js.map} +1 -1
  91. package/dist/{Navbar-DHUS7XiU.js → Navbar-CRjxVboE.js} +13 -22
  92. package/dist/{Navbar-DHUS7XiU.js.map → Navbar-CRjxVboE.js.map} +1 -1
  93. package/dist/{OtpInput-CY8yCaJk.js → OtpInput-C5plPzGU.js} +7 -11
  94. package/dist/{OtpInput-CY8yCaJk.js.map → OtpInput-C5plPzGU.js.map} +1 -1
  95. package/dist/{PageHeader-CL1A6jFM.js → PageHeader-DosMyar2.js} +6 -10
  96. package/dist/{PageHeader-CL1A6jFM.js.map → PageHeader-DosMyar2.js.map} +1 -1
  97. package/dist/{PageLayout-C9aXTpqV.js → PageLayout-LcvJccOW.js} +5 -8
  98. package/dist/{PageLayout-C9aXTpqV.js.map → PageLayout-LcvJccOW.js.map} +1 -1
  99. package/dist/{PageToolbar-LKP6PiP_.js → PageToolbar-By2HznxO.js} +8 -10
  100. package/dist/{PageToolbar-LKP6PiP_.js.map → PageToolbar-By2HznxO.js.map} +1 -1
  101. package/dist/{Pagination-D27x5KmH.js → Pagination-DrXTrvfD.js} +11 -18
  102. package/dist/{Pagination-D27x5KmH.js.map → Pagination-DrXTrvfD.js.map} +1 -1
  103. package/dist/{Popconfirm-p72DiagN.js → Popconfirm-BJuDOHdv.js} +46 -25
  104. package/dist/Popconfirm-BJuDOHdv.js.map +1 -0
  105. package/dist/{Popover-DnBw5Uay.js → Popover-DhOPlWgF.js} +4 -6
  106. package/dist/{Popover-DnBw5Uay.js.map → Popover-DhOPlWgF.js.map} +1 -1
  107. package/dist/{RadioGroup-B0TwHjBb.js → RadioGroup-B9oC8P15.js} +12 -18
  108. package/dist/{RadioGroup-B0TwHjBb.js.map → RadioGroup-B9oC8P15.js.map} +1 -1
  109. package/dist/{Resizable-D8zs0kcq.js → Resizable-Co-L3qg7.js} +4 -6
  110. package/dist/{Resizable-D8zs0kcq.js.map → Resizable-Co-L3qg7.js.map} +1 -1
  111. package/dist/{Search-vyZwGKMU.js → Search-OgaNjqQM.js} +26 -21
  112. package/dist/Search-OgaNjqQM.js.map +1 -0
  113. package/dist/{SearchInput-DyYXyw3u.js → SearchInput-eLS-uvOn.js} +18 -29
  114. package/dist/SearchInput-eLS-uvOn.js.map +1 -0
  115. package/dist/{SectionNav-6hcIpZLO.js → SectionNav-L81iJBo3.js} +11 -14
  116. package/dist/{SectionNav-6hcIpZLO.js.map → SectionNav-L81iJBo3.js.map} +1 -1
  117. package/dist/{Select-C6zKeip5.js → Select-DRdkdzBp.js} +28 -25
  118. package/dist/{Select-C6zKeip5.js.map → Select-DRdkdzBp.js.map} +1 -1
  119. package/dist/{Sheet-DKG20J7W.js → Sheet-DVb4XoJ5.js} +12 -19
  120. package/dist/{Sheet-DKG20J7W.js.map → Sheet-DVb4XoJ5.js.map} +1 -1
  121. package/dist/{Sidebar-BlYqasnX.js → Sidebar-DYvodJWN.js} +43 -75
  122. package/dist/{Sidebar-BlYqasnX.js.map → Sidebar-DYvodJWN.js.map} +1 -1
  123. package/dist/{Slider-DrcsM8_G.js → Slider-B9IskDxf.js} +8 -12
  124. package/dist/{Slider-DrcsM8_G.js.map → Slider-B9IskDxf.js.map} +1 -1
  125. package/dist/{Stepper-CQrUPVFL.js → Stepper-D7VspVEt.js} +11 -19
  126. package/dist/{Stepper-CQrUPVFL.js.map → Stepper-D7VspVEt.js.map} +1 -1
  127. package/dist/{Switch-DccpSpzC.js → Switch-DONWW7ju.js} +4 -6
  128. package/dist/{Switch-DccpSpzC.js.map → Switch-DONWW7ju.js.map} +1 -1
  129. package/dist/{Table-CilEvpMq.js → Table-BwgBm3hJ.js} +12 -21
  130. package/dist/{Table-CilEvpMq.js.map → Table-BwgBm3hJ.js.map} +1 -1
  131. package/dist/{Tabs-Ck4uWf8U.js → Tabs-DmJB4l_N.js} +9 -14
  132. package/dist/{Tabs-Ck4uWf8U.js.map → Tabs-DmJB4l_N.js.map} +1 -1
  133. package/dist/{TextInput-CR0_USaY.js → TextInput--1CfZybC.js} +8 -10
  134. package/dist/TextInput--1CfZybC.js.map +1 -0
  135. package/dist/{ThemeProvider-BTK7AL-T.js → ThemeProvider-BCHllN7d.js} +8 -13
  136. package/dist/{ThemeProvider-BTK7AL-T.js.map → ThemeProvider-BCHllN7d.js.map} +1 -1
  137. package/dist/{TimePicker-lk3NGqeK.js → TimePicker-CCV3SOw5.js} +4 -6
  138. package/dist/{TimePicker-lk3NGqeK.js.map → TimePicker-CCV3SOw5.js.map} +1 -1
  139. package/dist/{Timeline-DUXgByUE.js → Timeline-EMOpTLAT.js} +8 -13
  140. package/dist/{Timeline-DUXgByUE.js.map → Timeline-EMOpTLAT.js.map} +1 -1
  141. package/dist/{Toast-937n7n8i.js → Toast-BOTINeTX.js} +4 -6
  142. package/dist/{Toast-937n7n8i.js.map → Toast-BOTINeTX.js.map} +1 -1
  143. package/dist/{ToggleAllTooltip-DEjbWFoj.js → ToggleAllTooltip-BFmA6TXf.js} +4 -6
  144. package/dist/{ToggleAllTooltip-DEjbWFoj.js.map → ToggleAllTooltip-BFmA6TXf.js.map} +1 -1
  145. package/dist/{ToggleGroup-BOz1yyz6.js → ToggleGroup-DsDS7k70.js} +3 -4
  146. package/dist/{ToggleGroup-BOz1yyz6.js.map → ToggleGroup-DsDS7k70.js.map} +1 -1
  147. package/dist/{Workbench-CxgNCs3I.js → Workbench-4s0xP6XU.js} +18 -32
  148. package/dist/{Workbench-CxgNCs3I.js.map → Workbench-4s0xP6XU.js.map} +1 -1
  149. package/dist/{ZoomableSvg-CxXKanUR.js → ZoomableSvg-BRPGgaWJ.js} +8 -10
  150. package/dist/{ZoomableSvg-CxXKanUR.js.map → ZoomableSvg-BRPGgaWJ.js.map} +1 -1
  151. package/dist/charts.d.ts +0 -16
  152. package/dist/charts.js +10 -19
  153. package/dist/charts.js.map +1 -1
  154. package/dist/{classNames-DcGnTh2N.js → classNames-DkX30VJU.js} +2 -3
  155. package/dist/{classNames-DcGnTh2N.js.map → classNames-DkX30VJU.js.map} +1 -1
  156. package/dist/editors.d.ts +2 -16
  157. package/dist/editors.js +16 -26
  158. package/dist/editors.js.map +1 -1
  159. package/dist/{findLiteralMatches-DgGLzyG0.js → findLiteralMatches-BaLZTPtx.js} +2 -3
  160. package/dist/{findLiteralMatches-DgGLzyG0.js.map → findLiteralMatches-BaLZTPtx.js.map} +1 -1
  161. package/dist/flint.d.ts +0 -2
  162. package/dist/flint.js +10 -14
  163. package/dist/flint.js.map +1 -1
  164. package/dist/{highlightCode-D354tCXO.js → highlightCode-2spZP7ZA.js} +2 -3
  165. package/dist/{highlightCode-D354tCXO.js.map → highlightCode-2spZP7ZA.js.map} +1 -1
  166. package/dist/{icons-ZIeZXXS7.js → icons-DDR9dFSr.js} +21 -40
  167. package/dist/{icons-ZIeZXXS7.js.map → icons-DDR9dFSr.js.map} +1 -1
  168. package/dist/icons.d.ts +1 -1
  169. package/dist/icons.js +1 -2
  170. package/dist/{index-D-itZ3VP.d.ts → index-BljYaTWL.d.ts} +1 -39
  171. package/dist/index.d.ts +418 -1296
  172. package/dist/index.js +75 -74
  173. package/dist/internal/blocks/AIKit.js +1 -2
  174. package/dist/internal/blocks/AppShell.js +1 -2
  175. package/dist/internal/blocks/AuthLayout.js +3 -4
  176. package/dist/internal/blocks/AutoSaveTextarea.js +1 -2
  177. package/dist/internal/blocks/BrandEditor.js +1 -2
  178. package/dist/internal/blocks/ChartPanel.js +3 -4
  179. package/dist/internal/blocks/ChipEditor.js +6 -7
  180. package/dist/internal/blocks/ClipboardButton.js +1 -2
  181. package/dist/internal/blocks/ColorInput.js +1 -2
  182. package/dist/internal/blocks/ColorModeSwitch.js +1 -2
  183. package/dist/internal/blocks/Command.js +1 -2
  184. package/dist/internal/blocks/CopyField.js +1 -2
  185. package/dist/internal/blocks/DashboardHero.js +2 -3
  186. package/dist/internal/blocks/DateInput.js +1 -2
  187. package/dist/internal/blocks/DateRangeInput.js +1 -2
  188. package/dist/internal/blocks/DiagramShared/DiagramSkeleton.js +1 -2
  189. package/dist/internal/blocks/EmptyConfigurationActionCard.js +2 -3
  190. package/dist/internal/blocks/EmptyState.js +1 -2
  191. package/dist/internal/blocks/ErrorState.js +1 -2
  192. package/dist/internal/blocks/ExportMenu.js +5 -6
  193. package/dist/internal/blocks/FacebookButton.js +3 -4
  194. package/dist/internal/blocks/Form/connectors/ComboboxField.js +3 -4
  195. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +2 -3
  196. package/dist/internal/blocks/Form.js +3 -2
  197. package/dist/internal/blocks/FormGroup.js +1 -2
  198. package/dist/internal/blocks/GoogleButton.js +3 -4
  199. package/dist/internal/blocks/InlineEdit.js +1 -2
  200. package/dist/internal/blocks/MicrosoftButton.js +3 -4
  201. package/dist/internal/blocks/MultiActionButtonGroup.js +1 -2
  202. package/dist/internal/blocks/MultiCombobox.js +7 -8
  203. package/dist/internal/blocks/NumberInput.js +2 -3
  204. package/dist/internal/blocks/OtpInput.js +1 -2
  205. package/dist/internal/blocks/PageHeader.js +1 -2
  206. package/dist/internal/blocks/PageLayout.js +1 -2
  207. package/dist/internal/blocks/PageToolbar.js +1 -2
  208. package/dist/internal/blocks/PasswordInput.js +5 -6
  209. package/dist/internal/blocks/SearchInput.js +1 -2
  210. package/dist/internal/blocks/SearchInputWithNavigation.js +6 -7
  211. package/dist/internal/blocks/SectionNav.js +1 -2
  212. package/dist/internal/blocks/SplitButton.js +4 -5
  213. package/dist/internal/blocks/StatCard.js +4 -6
  214. package/dist/internal/blocks/StatCard.js.map +1 -1
  215. package/dist/internal/blocks/TextInput.js +1 -2
  216. package/dist/internal/blocks/Textarea.js +3 -4
  217. package/dist/internal/blocks/TimeInput.js +6 -7
  218. package/dist/internal/components/Alert.js +1 -2
  219. package/dist/internal/components/AlertModal.js +1 -2
  220. package/dist/internal/components/Avatar.js +3 -4
  221. package/dist/internal/components/Badge.js +1 -2
  222. package/dist/internal/components/BrandLogo.js +1 -2
  223. package/dist/internal/components/Breadcrumb.js +1 -2
  224. package/dist/internal/components/Button.js +1 -2
  225. package/dist/internal/components/ButtonGroup.js +2 -3
  226. package/dist/internal/components/Calendar.js +1 -2
  227. package/dist/internal/components/Card.js +1 -2
  228. package/dist/internal/components/Checkbox.js +1 -2
  229. package/dist/internal/components/Clipboard.js +1 -2
  230. package/dist/internal/components/Collapsible.js +1 -2
  231. package/dist/internal/components/CollapsiblePanel.js +5 -6
  232. package/dist/internal/components/Combobox.js +1 -2
  233. package/dist/internal/components/DatePicker.js +1 -2
  234. package/dist/internal/components/DateRangePicker.js +1 -2
  235. package/dist/internal/components/DiffView.js +1 -2
  236. package/dist/internal/components/DotsLoader.js +2 -3
  237. package/dist/internal/components/DropdownMenu.js +1 -2
  238. package/dist/internal/components/EmptySearchContent.js +1 -2
  239. package/dist/internal/components/FileUpload.js +1 -2
  240. package/dist/internal/components/FullScreenModal.js +1 -2
  241. package/dist/internal/components/HelpBlock.js +1 -2
  242. package/dist/internal/components/HoverCard.js +1 -2
  243. package/dist/internal/components/InputGroup.js +1 -2
  244. package/dist/internal/components/Kbd.js +1 -2
  245. package/dist/internal/components/Label.js +2 -3
  246. package/dist/internal/components/Link.js +2 -3
  247. package/dist/internal/components/MarkedText.js +1 -2
  248. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +3 -4
  249. package/dist/internal/components/MergeEditor/PaneHeader.js +1 -2
  250. package/dist/internal/components/MergeEditor/constants.js +1 -2
  251. package/dist/internal/components/MergeEditor/useMergeDiff.js +1 -2
  252. package/dist/internal/components/Modal.js +1 -2
  253. package/dist/internal/components/Navbar.js +1 -2
  254. package/dist/internal/components/Pagination.js +1 -2
  255. package/dist/internal/components/PanelWithDetails.js +4 -5
  256. package/dist/internal/components/Popconfirm.js +1 -2
  257. package/dist/internal/components/Popover.js +1 -2
  258. package/dist/internal/components/Progress.js +2 -3
  259. package/dist/internal/components/RadioGroup.js +1 -2
  260. package/dist/internal/components/Resizable.js +1 -2
  261. package/dist/internal/components/ScrollArea.js +3 -5
  262. package/dist/internal/components/ScrollArea.js.map +1 -1
  263. package/dist/internal/components/Search.js +1 -2
  264. package/dist/internal/components/Select.js +1 -2
  265. package/dist/internal/components/Separator.js +2 -3
  266. package/dist/internal/components/Sheet.js +1 -2
  267. package/dist/internal/components/Sidebar.js +1 -2
  268. package/dist/internal/components/Skeleton/Skeleton.js +2 -3
  269. package/dist/internal/components/Skeleton/SkeletonList.js +2 -3
  270. package/dist/internal/components/Slider.js +1 -2
  271. package/dist/internal/components/SpotlightBackdrop.js +3 -5
  272. package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
  273. package/dist/internal/components/Stepper.js +1 -2
  274. package/dist/internal/components/Switch.js +1 -2
  275. package/dist/internal/components/Table.js +1 -2
  276. package/dist/internal/components/Tabs.js +1 -2
  277. package/dist/internal/components/ThemeProvider.js +2 -2
  278. package/dist/internal/components/TimePicker.js +1 -2
  279. package/dist/internal/components/Timeline.js +1 -2
  280. package/dist/internal/components/Toast.js +2 -2
  281. package/dist/internal/components/Toggle.js +2 -3
  282. package/dist/internal/components/ToggleGroup.js +1 -2
  283. package/dist/internal/components/Tooltip.js +1 -2
  284. package/dist/internal/components/Truncated.js +3 -4
  285. package/dist/internal/components/Workbench.js +1 -2
  286. package/dist/internal/components/ZoomableSvg.js +1 -2
  287. package/dist/internal/hooks/useAltDigitHotkey.js +1 -2
  288. package/dist/internal/hooks/useAutosizeInput.js +1 -2
  289. package/dist/internal/hooks/useScrollbarPosition.js +2 -3
  290. package/dist/internal/hooks/useStableCallback.js +1 -2
  291. package/dist/internal/hooks/useTimeout.js +1 -2
  292. package/dist/internal/utils/accessibleName.js +1 -2
  293. package/dist/internal/utils/mergeRefs.js +1 -2
  294. package/dist/internal/utils.js +3 -3
  295. package/dist/markdown-editor.d.ts +0 -4
  296. package/dist/markdown-editor.js +30 -49
  297. package/dist/markdown-editor.js.map +1 -1
  298. package/dist/mermaid.d.ts +0 -2
  299. package/dist/mermaid.js +1 -2
  300. package/dist/rjsf.d.ts +0 -8
  301. package/dist/rjsf.js +47 -78
  302. package/dist/rjsf.js.map +1 -1
  303. package/dist/{rolldown-runtime-Bdc48AWt.js → rolldown-runtime-BrwM56v-.js} +2 -3
  304. package/dist/{styles-T8xwr0sR.js → styles-BXXXosW_.js} +2 -3
  305. package/dist/{styles-T8xwr0sR.js.map → styles-BXXXosW_.js.map} +1 -1
  306. package/dist/{styles-DxazJ8Mz.js → styles-nwtCRF7y.js} +2 -3
  307. package/dist/{styles-DxazJ8Mz.js.map → styles-nwtCRF7y.js.map} +1 -1
  308. package/dist/styles.css +1 -1
  309. package/dist/{svgCache-Dhmbe-7i.js → svgCache-BzvN_fgr.js} +2 -3
  310. package/dist/{svgCache-Dhmbe-7i.js.map → svgCache-BzvN_fgr.js.map} +1 -1
  311. package/dist/{svgTransforms-Hnvev3Vs.js → svgTransforms-BBxxO9T6.js} +4 -6
  312. package/dist/{svgTransforms-Hnvev3Vs.js.map → svgTransforms-BBxxO9T6.js.map} +1 -1
  313. package/dist/testing.d.ts +0 -2
  314. package/dist/testing.js +2 -3
  315. package/dist/{themeScopeContext-CEVXbYvZ.js → themeScopeContext-BZGPdyG8.js} +6 -11
  316. package/dist/{themeScopeContext-CEVXbYvZ.js.map → themeScopeContext-BZGPdyG8.js.map} +1 -1
  317. package/dist/{themeTokens-DCeb62ap.js → themeTokens-B60cQtAY.js} +4 -6
  318. package/dist/{themeTokens-DCeb62ap.js.map → themeTokens-B60cQtAY.js.map} +1 -1
  319. package/dist/{toast-Y3cTMBW8.js → toast-Dzj1EFOb.js} +10 -17
  320. package/dist/{toast-Y3cTMBW8.js.map → toast-Dzj1EFOb.js.map} +1 -1
  321. package/dist/{types-BPcAjMG0.d.ts → types-CsZuwfxc.d.ts} +1 -3
  322. package/dist/{useControllableState-CUYXMsfz.js → useControllableState-BCvUOC6G.js} +2 -3
  323. package/dist/{useControllableState-CUYXMsfz.js.map → useControllableState-BCvUOC6G.js.map} +1 -1
  324. package/dist/{useElement-D-RjrGa4.js → useElement-Dcoo9Jlr.js} +2 -3
  325. package/dist/{useElement-D-RjrGa4.js.map → useElement-Dcoo9Jlr.js.map} +1 -1
  326. package/dist/{useMergeDiff-CvowEXJ1.js → useMergeDiff-DFIATaTw.js} +3 -5
  327. package/dist/{useMergeDiff-CvowEXJ1.js.map → useMergeDiff-DFIATaTw.js.map} +1 -1
  328. package/dist/{utils-DwC9u0tM.js → utils-DjFceY3H.js} +18 -34
  329. package/dist/{utils-DwC9u0tM.js.map → utils-DjFceY3H.js.map} +1 -1
  330. package/dist/vega.d.ts +1 -5
  331. package/dist/vega.js +3 -4
  332. package/dist/{vegaTheme-ISwGXvof.js → vegaTheme-BcTNRmVS.js} +3 -4
  333. package/dist/{vegaTheme-ISwGXvof.js.map → vegaTheme-BcTNRmVS.js.map} +1 -1
  334. package/dist/{vegaTokens-DCkvpIVE.js → vegaTokens-DnCcy7JY.js} +3 -4
  335. package/dist/{vegaTokens-DCkvpIVE.js.map → vegaTokens-DnCcy7JY.js.map} +1 -1
  336. package/package.json +40 -40
  337. package/src/styles.css +70 -4
  338. package/src/theme.css +113 -11
  339. package/dist/AIKit-BR6jfsdI.js.map +0 -1
  340. package/dist/Button-BNkyYU8u.js.map +0 -1
  341. package/dist/Calendar-BnKi1kPu.js.map +0 -1
  342. package/dist/Popconfirm-p72DiagN.js.map +0 -1
  343. package/dist/Search-vyZwGKMU.js.map +0 -1
  344. package/dist/SearchInput-DyYXyw3u.js.map +0 -1
  345. package/dist/TextInput-CR0_USaY.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Badge-CqlOE5A2.js","names":[],"sources":["../src/components/Badge/BadgeAddon.tsx","../src/components/Badge/BadgeButton.tsx","../src/components/Badge/BadgeLabel.tsx","../src/components/Badge/styles.ts","../src/components/Badge/BadgeRoot.tsx","../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\n\nconst addonVariants = cva(\n [\n 'tw:flex',\n 'tw:items-center',\n 'tw:shrink-0',\n 'tw:bg-inherit',\n 'tw:self-stretch',\n 'tw:px-1',\n 'tw:has-[button]:px-0',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-3',\n ],\n {\n defaultVariants: {\n align: 'inline-end',\n variant: 'inline',\n },\n variants: {\n align: {\n 'inline-start': ['tw:order-first'],\n 'inline-end': ['tw:order-last'],\n },\n variant: {\n inline: [],\n floating: [\n 'tw:hidden',\n 'tw:group-hover/badge:flex',\n\n 'tw:absolute',\n 'tw:top-0',\n 'tw:bottom-0',\n 'tw:focus-within:flex',\n ],\n },\n },\n compoundVariants: [\n { variant: 'floating', align: 'inline-end', className: ['tw:right-0'] },\n { variant: 'floating', align: 'inline-start', className: ['tw:left-0'] },\n ],\n },\n);\n\ntype Props = ComponentProps<'div'> & VariantProps<typeof addonVariants>;\n\nexport const BadgeAddon = ({\n ref,\n align = 'inline-end',\n variant = 'inline',\n className,\n ...rest\n}: Props) => (\n <div\n {...rest}\n ref={ref}\n data-align={align}\n data-variant={variant}\n className={cn(addonVariants({ align, variant, className }))}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'button'>;\n\nexport const BadgeButton = ({ ref, className, type = 'button', children, ...rest }: Props) => (\n <button\n {...rest}\n ref={ref}\n type={type}\n className={cn(\n 'tailwindcss-preflight',\n\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:justify-center',\n 'tw:cursor-pointer',\n\n 'tw:bg-inherit',\n 'tw:text-inherit',\n\n 'tw:hover:brightness-95',\n 'tw:px-1',\n\n // The focus ring lives here rather than on `BadgeRoot`, whose own `focus-visible` block\n // sits on a `div` that never takes focus. Inset, because a badge root clips its overflow —\n // an outset ring on a nested button would be cut off.\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-inset',\n 'tw:focus-visible:ring-ring',\n // Default sizing for Lucide-icon children (which ship at 24×24); keeps\n // the visual baseline aligned with the previous FA-icon API and other\n // icon-wrapper components (ItemIcon, SidebarMenuIcon).\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-3',\n className,\n )}\n >\n {children}\n </button>\n);\n","import type { ComponentProps } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'span'> & {\n asChild?: boolean;\n};\n\nexport const BadgeLabel = ({ ref, className, asChild = false, ...rest }: Props) => {\n const Comp = asChild ? Slot : 'span';\n return (\n <Comp\n {...rest}\n ref={ref}\n data-slot=\"badge-label\"\n className={cn(\n 'tw:max-w-56',\n 'tw:truncate',\n 'tw:px-2',\n 'tw:py-0.5',\n\n // Drop side padding only when an *inline* addon is present —\n // floating addons overlay the label without taking layout space,\n // so the label still needs full padding behind them.\n 'tw:group-has-[[data-align=inline-start][data-variant=inline]:not(:empty)]/badge:pl-0',\n 'tw:group-has-[[data-align=inline-end][data-variant=inline]:not(:empty)]/badge:pr-0',\n className,\n )}\n />\n );\n};\n","import { cva } from 'class-variance-authority';\n\n/**\n * Badge's `color` variants: fill, foreground, and a `decoration-*` matching the fill.\n *\n * - Hues (`green`, `blue-inverse`, …) are fixed palette steps, for categorical labels; solid ones drop a rung in dark.\n * - Status colours (`success`, `warning-subtle`, …) read brand tokens; use them for a state.\n * - Tinted (`-inverse`, `-subtle`) variants follow `[data-theme=dark]`; measured by the contrast audit and stories.\n */\nexport const badgeColors = {\n gray: 'tw:bg-neutral-400 tw:text-white tw:decoration-neutral-400',\n 'gray-darker': 'tw:bg-neutral-500 tw:text-white tw:decoration-neutral-500',\n 'gray-inverse':\n 'tw:bg-neutral-100 tw:text-neutral-500 tw:decoration-neutral-100 tw:[[data-theme=dark]_&]:bg-neutral-700 tw:[[data-theme=dark]_&]:text-neutral-300 tw:[[data-theme=dark]_&]:decoration-neutral-700',\n green:\n 'tw:bg-green-500 tw:text-white tw:decoration-green-500 tw:[[data-theme=dark]_&]:bg-green-800 tw:[[data-theme=dark]_&]:decoration-green-800',\n 'green-darker':\n 'tw:bg-green-600 tw:text-white tw:decoration-green-600 tw:[[data-theme=dark]_&]:bg-green-900 tw:[[data-theme=dark]_&]:decoration-green-900',\n 'green-inverse':\n 'tw:bg-green-100 tw:text-green-900 tw:decoration-green-100 tw:[[data-theme=dark]_&]:bg-green-900 tw:[[data-theme=dark]_&]:text-green-200 tw:[[data-theme=dark]_&]:decoration-green-900',\n blue: 'tw:bg-blue-500 tw:text-white tw:decoration-blue-500 tw:[[data-theme=dark]_&]:bg-blue-600 tw:[[data-theme=dark]_&]:decoration-blue-600',\n 'blue-inverse':\n 'tw:bg-blue-100 tw:text-blue-800 tw:decoration-blue-100 tw:[[data-theme=dark]_&]:bg-blue-900 tw:[[data-theme=dark]_&]:text-blue-200 tw:[[data-theme=dark]_&]:decoration-blue-900',\n red: 'tw:bg-error-500 tw:text-white tw:decoration-error-500 tw:[[data-theme=dark]_&]:bg-error-600 tw:[[data-theme=dark]_&]:decoration-error-600',\n 'red-inverse':\n 'tw:bg-error-100 tw:text-error-800 tw:decoration-error-100 tw:[[data-theme=dark]_&]:bg-error-900 tw:[[data-theme=dark]_&]:text-error-200 tw:[[data-theme=dark]_&]:decoration-error-900',\n orange:\n 'tw:bg-warning-500 tw:text-white tw:decoration-warning-500 tw:[[data-theme=dark]_&]:bg-warning-700 tw:[[data-theme=dark]_&]:decoration-warning-700',\n 'orange-inverse':\n 'tw:bg-warning-100 tw:text-warning-800 tw:decoration-warning-100 tw:[[data-theme=dark]_&]:bg-warning-900 tw:[[data-theme=dark]_&]:text-warning-200 tw:[[data-theme=dark]_&]:decoration-warning-900',\n amber:\n 'tw:bg-warning-300 tw:text-warning-800 tw:decoration-warning-300 tw:[[data-theme=dark]_&]:bg-warning-800 tw:[[data-theme=dark]_&]:text-warning-100 tw:[[data-theme=dark]_&]:decoration-warning-800',\n // One rung deeper than `orange-inverse` so caution stays distinct from warning (same hue).\n 'amber-inverse':\n 'tw:bg-warning-200 tw:text-warning-800 tw:decoration-warning-200 tw:[[data-theme=dark]_&]:bg-warning-800 tw:[[data-theme=dark]_&]:text-warning-200 tw:[[data-theme=dark]_&]:decoration-warning-800',\n teal: 'tw:bg-teal-500 tw:text-white tw:decoration-teal-500 tw:[[data-theme=dark]_&]:bg-teal-700 tw:[[data-theme=dark]_&]:decoration-teal-700',\n 'teal-inverse':\n 'tw:bg-teal-100 tw:text-teal-800 tw:decoration-teal-100 tw:[[data-theme=dark]_&]:bg-teal-900 tw:[[data-theme=dark]_&]:text-teal-200 tw:[[data-theme=dark]_&]:decoration-teal-900',\n purple:\n 'tw:bg-purple-500 tw:text-white tw:decoration-purple-500 tw:[[data-theme=dark]_&]:bg-purple-600 tw:[[data-theme=dark]_&]:decoration-purple-600',\n 'purple-inverse':\n 'tw:bg-purple-100 tw:text-purple-800 tw:decoration-purple-100 tw:[[data-theme=dark]_&]:bg-purple-900 tw:[[data-theme=dark]_&]:text-purple-200 tw:[[data-theme=dark]_&]:decoration-purple-900',\n cyan: 'tw:bg-cyan-500 tw:text-white tw:decoration-cyan-500 tw:[[data-theme=dark]_&]:bg-cyan-700 tw:[[data-theme=dark]_&]:decoration-cyan-700',\n 'cyan-inverse':\n 'tw:bg-cyan-100 tw:text-cyan-800 tw:decoration-cyan-100 tw:[[data-theme=dark]_&]:bg-cyan-900 tw:[[data-theme=dark]_&]:text-cyan-200 tw:[[data-theme=dark]_&]:decoration-cyan-900',\n 'sidebar-primary': 'tw:bg-sidebar-primary tw:text-white tw:decoration-sidebar-primary',\n white: 'tw:bg-white/90 tw:text-neutral-600 tw:decoration-white/90',\n // Dark mode lightens these tokens but keeps a white foreground, so solid fills take dark ink there.\n success:\n 'tw:bg-success tw:text-success-foreground tw:decoration-success tw:[[data-theme=dark]_&]:text-background',\n 'success-subtle':\n 'tw:bg-success-subtle tw:text-success-subtle-foreground tw:decoration-success-subtle',\n warning: 'tw:bg-warning tw:text-warning-foreground tw:decoration-warning',\n 'warning-subtle':\n 'tw:bg-warning-subtle tw:text-warning-subtle-foreground tw:decoration-warning-subtle',\n info: 'tw:bg-info tw:text-info-foreground tw:decoration-info tw:[[data-theme=dark]_&]:text-background',\n 'info-subtle': 'tw:bg-info-subtle tw:text-info-subtle-foreground tw:decoration-info-subtle',\n destructive:\n 'tw:bg-destructive tw:text-destructive-foreground tw:decoration-destructive tw:[[data-theme=dark]_&]:text-background',\n 'destructive-subtle':\n 'tw:bg-destructive-subtle tw:text-destructive-subtle-foreground tw:decoration-destructive-subtle',\n // `neutral` has no status token: solid paints `muted-foreground`.\n neutral: 'tw:bg-muted-foreground tw:text-background tw:decoration-muted-foreground',\n 'neutral-subtle':\n 'tw:bg-neutral-subtle tw:text-neutral-subtle-foreground tw:decoration-neutral-subtle',\n} as const;\n\n/** A `Badge` `color` value. */\nexport type BadgeColor = keyof typeof badgeColors;\n\n/** Tinted variants are held to WCAG-AA; solid fills are pinned, so only recorded. */\nexport const isTintedBadgeColor = (color: string): boolean =>\n color.endsWith('-inverse') || color.endsWith('-subtle');\n\nexport const badgeRootVariants = cva(\n [\n 'tailwindcss-preflight',\n 'tw:group/badge',\n\n // display\n 'tw:relative',\n 'tw:inline-flex',\n 'tw:justify-center',\n 'tw:items-center',\n 'tw:min-h-5',\n 'tw:h-fit',\n 'tw:shrink-0',\n 'tw:overflow-hidden',\n\n // text — weight/tracking are brand-overridable tokens\n 'tw:whitespace-pre-wrap',\n 'tw:break-normal',\n 'tw:text-xs',\n 'tw:font-medium',\n 'tw:tracking-chrome',\n 'tw:text-center',\n 'tw:underline',\n\n // content\n 'tw:border-none',\n 'tw:[&>svg]:self-center',\n 'tw:[button&]:cursor-pointer',\n\n // focus\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-inset',\n 'tw:focus-visible:ring-ring',\n ],\n {\n defaultVariants: {\n color: 'gray',\n variant: 'default',\n },\n variants: {\n variant: {\n default: ['tw:rounded'],\n tag: ['tw:rounded tw:normal-case'],\n pill: ['tw:min-w-5 tw:rounded-full tw:normal-case tw:tracking-normal'],\n },\n color: badgeColors,\n },\n },\n);\n","import type { ComponentProps } from 'react';\nimport { type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\n\nimport { badgeRootVariants } from './styles';\n\ntype Props = ComponentProps<'div'> & VariantProps<typeof badgeRootVariants>;\n\nexport const BadgeRoot = ({ ref, variant, color, className, children, ...rest }: Props) => (\n <div\n {...rest}\n ref={ref}\n data-slot=\"badge\"\n className={cn(badgeRootVariants({ variant, color, className }))}\n >\n {children}\n </div>\n);\n","import type { ComponentProps, ReactNode } from 'react';\n\nimport { BadgeAddon } from './BadgeAddon';\nimport { BadgeButton } from './BadgeButton';\nimport { BadgeLabel } from './BadgeLabel';\nimport { BadgeRoot } from './BadgeRoot';\n\ntype AddonVariant = ComponentProps<typeof BadgeAddon>['variant'];\ntype BadgeRootProps = ComponentProps<typeof BadgeRoot>;\ntype BadgeLabelProps = ComponentProps<typeof BadgeLabel>;\n\n/**\n * - `color` status values (`success`, `warning-subtle`, …) follow the brand; use them for a state.\n * - `color` hues (`green`, `purple`, …) stay fixed; use them for categorical labels.\n */\ntype Props = Pick<BadgeRootProps, 'variant' | 'color'> &\n Omit<BadgeLabelProps, 'prefix'> & {\n prefix?: ReactNode;\n prefixVariant?: AddonVariant;\n suffix?: ReactNode;\n suffixVariant?: AddonVariant;\n labelClassName?: string;\n };\n\n/**\n * Inline pill for a status, count or tag.\n *\n * - Not for actions (`Button` / `ButtonInline`) or banners (`Alert`).\n * - `Badge.Button` for a clickable badge.\n */\nconst BadgeInner = ({\n ref,\n variant = 'pill',\n color,\n prefix,\n prefixVariant = 'inline',\n suffix,\n suffixVariant = 'inline',\n className,\n labelClassName,\n ...labelProps\n}: Props) => (\n <BadgeRoot className={className} variant={variant} color={color}>\n {prefix && (\n <BadgeAddon align=\"inline-start\" variant={prefixVariant}>\n {prefix}\n </BadgeAddon>\n )}\n <BadgeLabel {...labelProps} ref={ref} className={labelClassName} />\n {suffix && (\n <BadgeAddon align=\"inline-end\" variant={suffixVariant}>\n {suffix}\n </BadgeAddon>\n )}\n </BadgeRoot>\n);\n\nexport const Badge = Object.assign(BadgeInner, {\n Root: BadgeRoot,\n Button: BadgeButton,\n Label: BadgeLabel,\n Addon: BadgeAddon,\n});\n"],"mappings":";;;;;AAKA,MAAM,gBAAgB,IACpB;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB;EACf,OAAO;EACP,SAAS;CACX;CACA,UAAU;EACR,OAAO;GACL,gBAAgB,CAAC,gBAAgB;GACjC,cAAc,CAAC,eAAe;EAChC;EACA,SAAS;GACP,QAAQ,CAAC;GACT,UAAU;IACR;IACA;IAEA;IACA;IACA;IACA;GACF;EACF;CACF;CACA,kBAAkB,CAChB;EAAE,SAAS;EAAY,OAAO;EAAc,WAAW,CAAC,YAAY;CAAE,GACtE;EAAE,SAAS;EAAY,OAAO;EAAgB,WAAW,CAAC,WAAW;CAAE,CACzE;AACF,CACF;AAIA,MAAa,cAAc,EACzB,KACA,QAAQ,cACR,UAAU,UACV,WACA,GAAG,WAEH,oBAAC,OAAD;CACE,GAAI;CACC;CACL,cAAY;CACZ,gBAAc;CACd,WAAW,GAAG,cAAc;EAAE;EAAO;EAAS;CAAU,CAAC,CAAC;AAC3D,CAAA;;;ACvDH,MAAa,eAAe,EAAE,KAAK,WAAW,OAAO,UAAU,UAAU,GAAG,WAC1E,oBAAC,UAAD;CACE,GAAI;CACC;CACC;CACN,WAAW,GACT,yBAEA,kBACA,mBACA,qBACA,qBAEA,iBACA,mBAEA,0BACA,WAKA,mCACA,2BACA,+BACA,8BAIA,gDACA,SACF;CAEC;AACK,CAAA;;;AC/BV,MAAa,cAAc,EAAE,KAAK,WAAW,UAAU,OAAO,GAAG,WAAkB;CAEjF,OACE,oBAFW,UAAU,OAAO,QAE5B;EACE,GAAI;EACC;EACL,aAAU;EACV,WAAW,GACT,eACA,eACA,WACA,aAKA,wFACA,sFACA,SACF;CACD,CAAA;AAEL;AC2CA,MAAa,oBAAoB,IAC/B;CACE;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CAGA;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB;EACf,OAAO;EACP,SAAS;CACX;CACA,UAAU;EACR,SAAS;GACP,SAAS,CAAC,YAAY;GACtB,KAAK,CAAC,2BAA2B;GACjC,MAAM,CAAC,8DAA8D;EACvE;EACA,OAAO;GA9GX,MAAM;GACN,eAAe;GACf,gBACE;GACF,OACE;GACF,gBACE;GACF,iBACE;GACF,MAAM;GACN,gBACE;GACF,KAAK;GACL,eACE;GACF,QACE;GACF,kBACE;GACF,OACE;GAEF,iBACE;GACF,MAAM;GACN,gBACE;GACF,QACE;GACF,kBACE;GACF,MAAM;GACN,gBACE;GACF,mBAAmB;GACnB,OAAO;GAEP,SACE;GACF,kBACE;GACF,SAAS;GACT,kBACE;GACF,MAAM;GACN,eAAe;GACf,aACE;GACF,sBACE;GAEF,SAAS;GACT,kBACE;EAwDS;CACT;AACF,CACF;;;AClHA,MAAa,aAAa,EAAE,KAAK,SAAS,OAAO,WAAW,UAAU,GAAG,WACvE,oBAAC,OAAD;CACE,GAAI;CACC;CACL,aAAU;CACV,WAAW,GAAG,kBAAkB;EAAE;EAAS;EAAO;CAAU,CAAC,CAAC;CAE7D;AACE,CAAA;;;;;;;;;ACaP,MAAM,cAAc,EAClB,KACA,UAAU,QACV,OACA,QACA,gBAAgB,UAChB,QACA,gBAAgB,UAChB,WACA,gBACA,GAAG,iBAEH,qBAAC,WAAD;CAAsB;CAAoB;CAAgB;CAA1D,UAAA;EACG,UACC,oBAAC,YAAD;GAAY,OAAM;GAAe,SAAS;GACvC,UAAA;EACS,CAAA;EAEd,oBAAC,YAAD;GAAY,GAAI;GAAiB;GAAK,WAAW;EAAiB,CAAA;EACjE,UACC,oBAAC,YAAD;GAAY,OAAM;GAAa,SAAS;GACrC,UAAA;EACS,CAAA;CAEL;;AAGb,MAAa,QAAQ,OAAO,OAAO,YAAY;CAC7C,MAAM;CACN,QAAQ;CACR,OAAO;CACP,OAAO;AACT,CAAC"}
1
+ {"version":3,"file":"Badge-CFRhducL.js","names":[],"sources":["../src/components/Badge/BadgeAddon.tsx","../src/components/Badge/BadgeButton.tsx","../src/components/Badge/BadgeLabel.tsx","../src/components/Badge/styles.ts","../src/components/Badge/BadgeRoot.tsx","../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\n\nconst addonVariants = cva(\n [\n 'tw:flex',\n 'tw:items-center',\n 'tw:shrink-0',\n 'tw:bg-inherit',\n 'tw:self-stretch',\n 'tw:px-1',\n 'tw:has-[button]:px-0',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-3',\n ],\n {\n defaultVariants: {\n align: 'inline-end',\n variant: 'inline',\n },\n variants: {\n align: {\n 'inline-start': ['tw:order-first'],\n 'inline-end': ['tw:order-last'],\n },\n variant: {\n inline: [],\n floating: [\n 'tw:hidden',\n 'tw:group-hover/badge:flex',\n\n 'tw:absolute',\n 'tw:top-0',\n 'tw:bottom-0',\n 'tw:focus-within:flex',\n ],\n },\n },\n compoundVariants: [\n { variant: 'floating', align: 'inline-end', className: ['tw:right-0'] },\n { variant: 'floating', align: 'inline-start', className: ['tw:left-0'] },\n ],\n },\n);\n\ntype Props = ComponentProps<'div'> & VariantProps<typeof addonVariants>;\n\nexport const BadgeAddon = ({\n ref,\n align = 'inline-end',\n variant = 'inline',\n className,\n ...rest\n}: Props) => (\n <div\n {...rest}\n ref={ref}\n data-align={align}\n data-variant={variant}\n className={cn(addonVariants({ align, variant, className }))}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'button'>;\n\nexport const BadgeButton = ({ ref, className, type = 'button', children, ...rest }: Props) => (\n <button\n {...rest}\n ref={ref}\n type={type}\n className={cn(\n 'tailwindcss-preflight',\n\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:justify-center',\n 'tw:cursor-pointer',\n\n 'tw:bg-inherit',\n 'tw:text-inherit',\n\n 'tw:hover:brightness-95',\n 'tw:px-1',\n\n // The focus ring lives here rather than on `BadgeRoot`, whose own `focus-visible` block\n // sits on a `div` that never takes focus. Inset, because a badge root clips its overflow —\n // an outset ring on a nested button would be cut off.\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-inset',\n 'tw:focus-visible:ring-ring',\n // Default sizing for Lucide-icon children (which ship at 24×24); keeps\n // the visual baseline aligned with the previous FA-icon API and other\n // icon-wrapper components (ItemIcon, SidebarMenuIcon).\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-3',\n className,\n )}\n >\n {children}\n </button>\n);\n","import type { ComponentProps } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'span'> & {\n asChild?: boolean;\n};\n\nexport const BadgeLabel = ({ ref, className, asChild = false, ...rest }: Props) => {\n const Comp = asChild ? Slot : 'span';\n return (\n <Comp\n {...rest}\n ref={ref}\n data-slot=\"badge-label\"\n className={cn(\n 'tw:max-w-56',\n 'tw:truncate',\n 'tw:px-2',\n 'tw:py-0.5',\n\n // Drop side padding only when an *inline* addon is present —\n // floating addons overlay the label without taking layout space,\n // so the label still needs full padding behind them.\n 'tw:group-has-[[data-align=inline-start][data-variant=inline]:not(:empty)]/badge:pl-0',\n 'tw:group-has-[[data-align=inline-end][data-variant=inline]:not(:empty)]/badge:pr-0',\n className,\n )}\n />\n );\n};\n","import { cva } from 'class-variance-authority';\n\n/**\n * Badge's `color` variants: fill, foreground, and a `decoration-*` matching the fill.\n *\n * - Hues (`green`, `blue-inverse`, …) are fixed palette steps, for categorical labels; solid ones drop a rung in dark.\n * - Status colours (`success`, `warning-subtle`, …) read brand tokens; use them for a state.\n * - Tinted (`-inverse`, `-subtle`) variants follow `[data-theme=dark]`; measured by the contrast audit and stories.\n */\nexport const badgeColors = {\n gray: 'tw:bg-neutral-500 tw:text-white tw:decoration-neutral-500',\n 'gray-darker': 'tw:bg-neutral-600 tw:text-white tw:decoration-neutral-600',\n 'gray-inverse':\n 'tw:bg-neutral-100 tw:text-neutral-500 tw:decoration-neutral-100 tw:[[data-theme=dark]_&]:bg-neutral-700 tw:[[data-theme=dark]_&]:text-neutral-300 tw:[[data-theme=dark]_&]:decoration-neutral-700',\n green:\n 'tw:bg-green-500 tw:text-white tw:decoration-green-500 tw:[[data-theme=dark]_&]:bg-green-800 tw:[[data-theme=dark]_&]:decoration-green-800',\n 'green-darker':\n 'tw:bg-green-600 tw:text-white tw:decoration-green-600 tw:[[data-theme=dark]_&]:bg-green-900 tw:[[data-theme=dark]_&]:decoration-green-900',\n 'green-inverse':\n 'tw:bg-green-100 tw:text-green-900 tw:decoration-green-100 tw:[[data-theme=dark]_&]:bg-green-900 tw:[[data-theme=dark]_&]:text-green-200 tw:[[data-theme=dark]_&]:decoration-green-900',\n blue: 'tw:bg-blue-500 tw:text-white tw:decoration-blue-500 tw:[[data-theme=dark]_&]:bg-blue-600 tw:[[data-theme=dark]_&]:decoration-blue-600',\n 'blue-inverse':\n 'tw:bg-blue-100 tw:text-blue-800 tw:decoration-blue-100 tw:[[data-theme=dark]_&]:bg-blue-900 tw:[[data-theme=dark]_&]:text-blue-200 tw:[[data-theme=dark]_&]:decoration-blue-900',\n red: 'tw:bg-error-500 tw:text-white tw:decoration-error-500 tw:[[data-theme=dark]_&]:bg-error-600 tw:[[data-theme=dark]_&]:decoration-error-600',\n 'red-inverse':\n 'tw:bg-error-100 tw:text-error-800 tw:decoration-error-100 tw:[[data-theme=dark]_&]:bg-error-900 tw:[[data-theme=dark]_&]:text-error-200 tw:[[data-theme=dark]_&]:decoration-error-900',\n orange:\n 'tw:bg-warning-500 tw:text-white tw:decoration-warning-500 tw:[[data-theme=dark]_&]:bg-warning-700 tw:[[data-theme=dark]_&]:decoration-warning-700',\n 'orange-inverse':\n 'tw:bg-warning-100 tw:text-warning-800 tw:decoration-warning-100 tw:[[data-theme=dark]_&]:bg-warning-900 tw:[[data-theme=dark]_&]:text-warning-200 tw:[[data-theme=dark]_&]:decoration-warning-900',\n amber:\n 'tw:bg-warning-300 tw:text-warning-800 tw:decoration-warning-300 tw:[[data-theme=dark]_&]:bg-warning-800 tw:[[data-theme=dark]_&]:text-warning-100 tw:[[data-theme=dark]_&]:decoration-warning-800',\n // One rung deeper than `orange-inverse` so caution stays distinct from warning (same hue).\n 'amber-inverse':\n 'tw:bg-warning-200 tw:text-warning-800 tw:decoration-warning-200 tw:[[data-theme=dark]_&]:bg-warning-800 tw:[[data-theme=dark]_&]:text-warning-200 tw:[[data-theme=dark]_&]:decoration-warning-800',\n teal: 'tw:bg-teal-500 tw:text-white tw:decoration-teal-500 tw:[[data-theme=dark]_&]:bg-teal-700 tw:[[data-theme=dark]_&]:decoration-teal-700',\n 'teal-inverse':\n 'tw:bg-teal-100 tw:text-teal-800 tw:decoration-teal-100 tw:[[data-theme=dark]_&]:bg-teal-900 tw:[[data-theme=dark]_&]:text-teal-200 tw:[[data-theme=dark]_&]:decoration-teal-900',\n purple:\n 'tw:bg-purple-500 tw:text-white tw:decoration-purple-500 tw:[[data-theme=dark]_&]:bg-purple-600 tw:[[data-theme=dark]_&]:decoration-purple-600',\n 'purple-inverse':\n 'tw:bg-purple-100 tw:text-purple-800 tw:decoration-purple-100 tw:[[data-theme=dark]_&]:bg-purple-900 tw:[[data-theme=dark]_&]:text-purple-200 tw:[[data-theme=dark]_&]:decoration-purple-900',\n cyan: 'tw:bg-cyan-500 tw:text-white tw:decoration-cyan-500 tw:[[data-theme=dark]_&]:bg-cyan-700 tw:[[data-theme=dark]_&]:decoration-cyan-700',\n 'cyan-inverse':\n 'tw:bg-cyan-100 tw:text-cyan-800 tw:decoration-cyan-100 tw:[[data-theme=dark]_&]:bg-cyan-900 tw:[[data-theme=dark]_&]:text-cyan-200 tw:[[data-theme=dark]_&]:decoration-cyan-900',\n 'sidebar-primary': 'tw:bg-sidebar-primary tw:text-white tw:decoration-sidebar-primary',\n white: 'tw:bg-white/90 tw:text-neutral-600 tw:decoration-white/90',\n // Dark mode lightens these tokens but keeps a white foreground, so solid fills take dark ink there.\n success:\n 'tw:bg-success tw:text-success-foreground tw:decoration-success tw:[[data-theme=dark]_&]:text-background',\n 'success-subtle':\n 'tw:bg-success-subtle tw:text-success-subtle-foreground tw:decoration-success-subtle',\n warning: 'tw:bg-warning tw:text-warning-foreground tw:decoration-warning',\n 'warning-subtle':\n 'tw:bg-warning-subtle tw:text-warning-subtle-foreground tw:decoration-warning-subtle',\n info: 'tw:bg-info tw:text-info-foreground tw:decoration-info tw:[[data-theme=dark]_&]:text-background',\n 'info-subtle': 'tw:bg-info-subtle tw:text-info-subtle-foreground tw:decoration-info-subtle',\n destructive:\n 'tw:bg-destructive tw:text-destructive-foreground tw:decoration-destructive tw:[[data-theme=dark]_&]:text-background',\n 'destructive-subtle':\n 'tw:bg-destructive-subtle tw:text-destructive-subtle-foreground tw:decoration-destructive-subtle',\n // `neutral` has no status token: solid paints `muted-foreground`.\n neutral: 'tw:bg-muted-foreground tw:text-background tw:decoration-muted-foreground',\n 'neutral-subtle':\n 'tw:bg-neutral-subtle tw:text-neutral-subtle-foreground tw:decoration-neutral-subtle',\n} as const;\n\n/** A `Badge` `color` value. */\nexport type BadgeColor = keyof typeof badgeColors;\n\n/** Tinted variants are held to WCAG-AA; solid fills are pinned, so only recorded. */\nexport const isTintedBadgeColor = (color: string): boolean =>\n color.endsWith('-inverse') || color.endsWith('-subtle');\n\nexport const badgeRootVariants = cva(\n [\n 'tailwindcss-preflight',\n 'tw:group/badge',\n\n // display\n 'tw:relative',\n 'tw:inline-flex',\n 'tw:justify-center',\n 'tw:items-center',\n 'tw:min-h-5',\n 'tw:h-fit',\n 'tw:shrink-0',\n 'tw:overflow-hidden',\n\n // text — weight/tracking are brand-overridable tokens\n 'tw:whitespace-pre-wrap',\n 'tw:break-normal',\n 'tw:text-xs',\n 'tw:font-medium',\n 'tw:tracking-chrome',\n 'tw:text-center',\n 'tw:underline',\n\n // content\n 'tw:border-none',\n 'tw:[&>svg]:self-center',\n 'tw:[button&]:cursor-pointer',\n\n // focus\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-inset',\n 'tw:focus-visible:ring-ring',\n ],\n {\n defaultVariants: {\n color: 'gray',\n variant: 'default',\n },\n variants: {\n variant: {\n default: ['tw:rounded'],\n tag: ['tw:rounded tw:normal-case'],\n pill: ['tw:min-w-5 tw:rounded-full tw:normal-case tw:tracking-normal'],\n },\n color: badgeColors,\n },\n },\n);\n","import type { ComponentProps } from 'react';\nimport { type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\n\nimport { badgeRootVariants } from './styles';\n\ntype Props = ComponentProps<'div'> & VariantProps<typeof badgeRootVariants>;\n\nexport const BadgeRoot = ({ ref, variant, color, className, children, ...rest }: Props) => (\n <div\n {...rest}\n ref={ref}\n data-slot=\"badge\"\n className={cn(badgeRootVariants({ variant, color, className }))}\n >\n {children}\n </div>\n);\n","import type { ComponentProps, ReactNode } from 'react';\n\nimport { BadgeAddon } from './BadgeAddon';\nimport { BadgeButton } from './BadgeButton';\nimport { BadgeLabel } from './BadgeLabel';\nimport { BadgeRoot } from './BadgeRoot';\n\ntype AddonVariant = ComponentProps<typeof BadgeAddon>['variant'];\ntype BadgeRootProps = ComponentProps<typeof BadgeRoot>;\ntype BadgeLabelProps = ComponentProps<typeof BadgeLabel>;\n\n/**\n * - `color` status values (`success`, `warning-subtle`, …) follow the brand; use them for a state.\n * - `color` hues (`green`, `purple`, …) stay fixed; use them for categorical labels.\n */\ntype Props = Pick<BadgeRootProps, 'variant' | 'color'> &\n Omit<BadgeLabelProps, 'prefix'> & {\n prefix?: ReactNode;\n prefixVariant?: AddonVariant;\n suffix?: ReactNode;\n suffixVariant?: AddonVariant;\n labelClassName?: string;\n };\n\n/**\n * Inline pill for a status, count or tag.\n *\n * - Not for actions (`Button` / `ButtonInline`) or banners (`Alert`).\n * - `Badge.Button` for a clickable badge.\n */\nconst BadgeInner = ({\n ref,\n variant = 'pill',\n color,\n prefix,\n prefixVariant = 'inline',\n suffix,\n suffixVariant = 'inline',\n className,\n labelClassName,\n ...labelProps\n}: Props) => (\n <BadgeRoot className={className} variant={variant} color={color}>\n {prefix && (\n <BadgeAddon align=\"inline-start\" variant={prefixVariant}>\n {prefix}\n </BadgeAddon>\n )}\n <BadgeLabel {...labelProps} ref={ref} className={labelClassName} />\n {suffix && (\n <BadgeAddon align=\"inline-end\" variant={suffixVariant}>\n {suffix}\n </BadgeAddon>\n )}\n </BadgeRoot>\n);\n\nexport const Badge = Object.assign(BadgeInner, {\n Root: BadgeRoot,\n Button: BadgeButton,\n Label: BadgeLabel,\n Addon: BadgeAddon,\n});\n"],"mappings":";;;;;AAKA,MAAM,gBAAgB,IACpB;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB;EACf,OAAO;EACP,SAAS;CAC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D;EACvE;EACA,OAAO;GA9GX,MAAM;GACN,eAAe;GACf,gBACE;GACF,OACE;GACF,gBACE;GACF,iBACE;GACF,MAAM;GACN,gBACE;GACF,KAAK;GACL,eACE;GACF,QACE;GACF,kBACE;GACF,OACE;GAEF,iBACE;GACF,MAAM;GACN,gBACE;GACF,QACE;GACF,kBACE;GACF,MAAM;GACN,gBACE;GACF,mBAAmB;GACnB,OAAO;GAEP,SACE;GACF,kBACE;GACF,SAAS;GACT,kBACE;GACF,MAAM;GACN,eAAe;GACf,aACE;GACF,sBACE;GAEF,SAAS;GACT,kBACE;EAwDS;CACT;AACF,CACF;;AClHA,MAAa,aAAa,EAAE,KAAK,SAAS,OAAO,WAAW,UAAU,GAAG,WACvE,oBAAC,OAAD;CACE,GAAI;CACC;CACL,aAAU;CACV,WAAW,GAAG,kBAAkB;EAAE;EAAS;EAAO;CAAU,CAAC,CAAC;CAE7D;AACE,CAAA;;;;;;;;ACaP,MAAM,cAAc,EAClB,KACA,UAAU,QACV,OACA,QACA,gBAAgB,UAChB,QACA,gBAAgB,UAChB,WACA,gBACA,GAAG,iBAEH,qBAAC,WAAD;CAAsB;CAAoB;CAAgB;CAA1D,UAAA;EACG,UACC,oBAAC,YAAD;GAAY,OAAM;GAAe,SAAS;GACvC,UAAA;EACS,CAAA;EAEd,oBAAC,YAAD;GAAY,GAAI;GAAiB;GAAK,WAAW;EAAiB,CAAA;EACjE,UACC,oBAAC,YAAD;GAAY,OAAM;GAAa,SAAS;GACrC,UAAA;EACS,CAAA;CAEL;;AAGb,MAAa,QAAQ,OAAO,OAAO,YAAY;CAC7C,MAAM;CACN,QAAQ;CACR,OAAO;CACP,OAAO;AACT,CAAC"}
@@ -1,18 +1,18 @@
1
- import { Button } from "./Button-BNkyYU8u.js";
2
- import { ToggleGroup } from "./ToggleGroup-BOz1yyz6.js";
1
+ import { Button } from "./Button-DbvGzEDb.js";
2
+ import { ToggleGroup } from "./ToggleGroup-DsDS7k70.js";
3
3
  import { Label } from "./internal/components/Label.js";
4
- import { TextInput } from "./TextInput-CR0_USaY.js";
5
- import { Slider } from "./Slider-DrcsM8_G.js";
6
- import { Select } from "./Select-C6zKeip5.js";
7
- import { Badge } from "./Badge-CqlOE5A2.js";
8
- import { ColorInput } from "./ColorInput-B_eZIu39.js";
4
+ import { TextInput } from "./TextInput--1CfZybC.js";
5
+ import { Slider } from "./Slider-B9IskDxf.js";
6
+ import { Select } from "./Select-DRdkdzBp.js";
7
+ import { Badge } from "./Badge-CFRhducL.js";
8
+ import { ColorInput } from "./ColorInput-Cjr1jkvy.js";
9
9
  import { Textarea } from "./internal/blocks/Textarea.js";
10
- import { Collapsible } from "./Collapsible-DD4xTL75.js";
10
+ import { Collapsible } from "./Collapsible-zsXk4Vpp.js";
11
11
  import { useId, useMemo } from "react";
12
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
13
  import DOMPurify from "dompurify";
14
14
  import { keboola } from "@keboola/brand-registry";
15
- //#region src/blocks/BrandEditor/color.ts
15
+ // src/blocks/BrandEditor/color.ts
16
16
  const hexToChannels = (hex) => {
17
17
  let h = hex.trim().replace(/^#/, "");
18
18
  if (h.length === 3 || h.length === 4) h = h.slice(0, 3).split("").map((c) => c + c).join("");
@@ -26,8 +26,7 @@ const channelsToHex = (channels) => {
26
26
  const to2 = (v) => Math.max(0, Math.min(255, v)).toString(16).padStart(2, "0");
27
27
  return `#${to2(r)}${to2(g)}${to2(b)}`;
28
28
  };
29
- //#endregion
30
- //#region src/blocks/BrandEditor/ColorField.tsx
29
+ // src/blocks/BrandEditor/ColorField.tsx
31
30
  const COMPLETE_HEX = /^([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
32
31
  /** A labelled hex colour picker bound to a brand token (stored as RGB channels). */
33
32
  const ColorField = ({ id, label, channels, onChange }) => {
@@ -49,8 +48,7 @@ const ColorField = ({ id, label, channels, onChange }) => {
49
48
  })]
50
49
  });
51
50
  };
52
- //#endregion
53
- //#region src/blocks/BrandEditor/contrast.ts
51
+ // src/blocks/BrandEditor/contrast.ts
54
52
  const clampChannel = (n) => Number.isFinite(n) ? Math.min(255, Math.max(0, n)) : 0;
55
53
  const parseChannels = (channels) => {
56
54
  const [r = 0, g = 0, b = 0] = channels.trim().split(/\s+/).map((n) => clampChannel(Number(n)));
@@ -76,8 +74,7 @@ const contrastRatio = (fg, bg) => {
76
74
  };
77
75
  /** WCAG level for normal-size text at a given ratio. */
78
76
  const wcagLevel = (ratio) => ratio >= 7 ? "AAA" : ratio >= 4.5 ? "AA" : "fail";
79
- //#endregion
80
- //#region src/blocks/BrandEditor/ControlSection.tsx
77
+ // src/blocks/BrandEditor/ControlSection.tsx
81
78
  /** A titled block inside `BrandEditor`. */
82
79
  const ControlSection = ({ title, children }) => /* @__PURE__ */ jsxs("section", {
83
80
  className: "tw:flex tw:flex-col tw:gap-3 tw:border-b tw:border-border tw:p-4",
@@ -86,8 +83,7 @@ const ControlSection = ({ title, children }) => /* @__PURE__ */ jsxs("section",
86
83
  children: title
87
84
  }), children]
88
85
  });
89
- //#endregion
90
- //#region src/blocks/BrandEditor/LogoField.tsx
86
+ // src/blocks/BrandEditor/LogoField.tsx
91
87
  /** A labelled multi-line field for a brand logo source. */
92
88
  const LogoField = ({ id, label, value, onChange }) => /* @__PURE__ */ jsxs("div", {
93
89
  className: "tw:flex tw:flex-col tw:gap-1",
@@ -104,8 +100,7 @@ const LogoField = ({ id, label, value, onChange }) => /* @__PURE__ */ jsxs("div"
104
100
  className: "tw:font-mono tw:text-xs"
105
101
  })]
106
102
  });
107
- //#endregion
108
- //#region src/blocks/BrandEditor/TextField.tsx
103
+ // src/blocks/BrandEditor/TextField.tsx
109
104
  /** A labelled single-line field for a free-form CSS-value token (shadow, motion, gradient). */
110
105
  const TextField = ({ id, label, value, onChange, placeholder }) => /* @__PURE__ */ jsxs("div", {
111
106
  className: "tw:flex tw:flex-col tw:gap-1",
@@ -121,8 +116,7 @@ const TextField = ({ id, label, value, onChange, placeholder }) => /* @__PURE__
121
116
  className: "tw:font-mono tw:text-xs"
122
117
  })]
123
118
  });
124
- //#endregion
125
- //#region src/blocks/BrandEditor/BrandEditor.tsx
119
+ // src/blocks/BrandEditor/BrandEditor.tsx
126
120
  const DEFAULT_FALLBACK_FONT = "'Inter', system-ui, sans-serif";
127
121
  const DEFAULT_FONT_OPTIONS = [
128
122
  {
@@ -1033,7 +1027,6 @@ const BrandEditor = ({ value, onChange, colorScheme = "light", onColorSchemeChan
1033
1027
  ]
1034
1028
  });
1035
1029
  };
1036
- //#endregion
1037
1030
  export { BrandEditor, DEFAULT_FALLBACK_FONT, DEFAULT_FONT_OPTIONS, channelsToHex, contrastRatio, hexToChannels, wcagLevel };
1038
1031
 
1039
- //# sourceMappingURL=BrandEditor-D61pzWRq.js.map
1032
+ //# sourceMappingURL=BrandEditor-hiLBX7az.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrandEditor-D61pzWRq.js","names":[],"sources":["../src/blocks/BrandEditor/color.ts","../src/blocks/BrandEditor/ColorField.tsx","../src/blocks/BrandEditor/contrast.ts","../src/blocks/BrandEditor/ControlSection.tsx","../src/blocks/BrandEditor/LogoField.tsx","../src/blocks/BrandEditor/TextField.tsx","../src/blocks/BrandEditor/BrandEditor.tsx"],"sourcesContent":["// Brand colours are stored as space-separated \"R G B\" channel strings (see\n// `rgbChannelsSchema` in @keboola/brand-registry); `ColorInput` speaks hex.\n// These helpers convert at that boundary.\n\nexport const hexToChannels = (hex: string): string => {\n let h = hex.trim().replace(/^#/, '');\n // Expand 3/4-digit shorthand and drop alpha (4- and 8-digit `#rgba`/`#rrggbbaa`) — brand\n // channels carry no alpha. Anything else is malformed → fall back to black.\n if (h.length === 3 || h.length === 4) {\n h = h\n .slice(0, 3)\n .split('')\n .map((c) => c + c)\n .join('');\n } else if (h.length === 8) {\n h = h.slice(0, 6);\n }\n if (!/^[0-9a-fA-F]{6}$/.test(h)) return '0 0 0';\n const n = parseInt(h, 16);\n return `${(n >> 16) & 255} ${(n >> 8) & 255} ${n & 255}`;\n};\n\nexport const channelsToHex = (channels: string): string => {\n const [r = 0, g = 0, b = 0] = channels\n .trim()\n .split(/\\s+/)\n .map((n) => Number(n) || 0);\n const to2 = (v: number) => Math.max(0, Math.min(255, v)).toString(16).padStart(2, '0');\n return `#${to2(r)}${to2(g)}${to2(b)}`;\n};\n","import { Label } from '../../components/Label';\nimport { ColorInput } from '../ColorInput';\n\nimport { channelsToHex, hexToChannels } from './color';\n\ntype Props = {\n id: string;\n label: string;\n /** Current value as an \"R G B\" channel string. */\n channels: string;\n /** Called with a new \"R G B\" channel string when a valid colour is picked. */\n onChange: (channels: string) => void;\n};\n\n// ColorInput fires `onValueChange` on every keystroke (it only coerces on blur), so commit a\n// channel value only for a COMPLETE 3-, 4-, 6-, or 8-digit hex — otherwise a partial \"#1\"/\"#\"\n// would write unintended channels. Alpha (4-/8-digit) is truncated to RGB, since brand tokens\n// carry no alpha.\nconst COMPLETE_HEX = /^([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;\n\n/** A labelled hex colour picker bound to a brand token (stored as RGB channels). */\nexport const ColorField = ({ id, label, channels, onChange }: Props) => {\n const hex = channelsToHex(channels);\n\n return (\n <div className=\"tw:flex tw:items-center tw:justify-between tw:gap-2\">\n <Label htmlFor={id} className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n {label}\n </Label>\n <ColorInput\n id={id}\n value={hex}\n className=\"tw:w-36\"\n onValueChange={(next) => {\n const clean = next.trim().replace(/^#/, '');\n // Commit only complete hex (hexToChannels handles the 3/6/8-digit shapes + alpha drop).\n if (COMPLETE_HEX.test(clean)) onChange(hexToChannels(`#${clean}`));\n }}\n />\n </div>\n );\n};\n","// WCAG contrast helpers over `\"R G B\"` channel strings (the brand token format).\n\n// Coerce non-numeric/blank channels to 0 and clamp to the valid 0–255 range, so a malformed\n// token (e.g. \"999 999 999\") can neither NaN-out nor push luminance past WCAG's expected bounds.\nconst clampChannel = (n: number): number =>\n Number.isFinite(n) ? Math.min(255, Math.max(0, n)) : 0;\n\nconst parseChannels = (channels: string): [number, number, number] => {\n const [r = 0, g = 0, b = 0] = channels\n .trim()\n .split(/\\s+/)\n .map((n) => clampChannel(Number(n)));\n return [r, g, b];\n};\n\nconst relativeLuminance = (channels: string): number => {\n // Destructure with defaults (not an `as` assertion) so `r`/`g`/`b` are `number` under\n // `noUncheckedIndexedAccess` without a production-code type cast.\n const [r = 0, g = 0, b = 0] = parseChannels(channels).map((c) => {\n const s = c / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\n/** WCAG contrast ratio (1–21) between two `\"R G B\"` colours. */\nexport const contrastRatio = (fg: string, bg: string): number => {\n const l1 = relativeLuminance(fg);\n const l2 = relativeLuminance(bg);\n const [lighter, darker] = l1 >= l2 ? [l1, l2] : [l2, l1];\n return (lighter + 0.05) / (darker + 0.05);\n};\n\n/** WCAG level for normal-size text at a given ratio. */\nexport const wcagLevel = (ratio: number): 'AAA' | 'AA' | 'fail' =>\n ratio >= 7 ? 'AAA' : ratio >= 4.5 ? 'AA' : 'fail';\n","import type { ReactNode } from 'react';\n\ntype Props = {\n title: string;\n children: ReactNode;\n};\n\n/** A titled block inside `BrandEditor`. */\nexport const ControlSection = ({ title, children }: Props) => (\n <section className=\"tw:flex tw:flex-col tw:gap-3 tw:border-b tw:border-border tw:p-4\">\n <h3 className=\"tw:m-0 tw:text-xs tw:font-semibold tw:uppercase tw:tracking-wide tw:text-muted-foreground\">\n {title}\n </h3>\n {children}\n </section>\n);\n","import { Label } from '../../components/Label';\nimport { Textarea } from '../Textarea';\n\ntype Props = {\n id: string;\n label: string;\n /** Current logo source: SVG markup, a `data:` URI, or an `http(s)` URL. */\n value: string;\n /** Called with the new source (empty string clears the slot). */\n onChange: (value: string) => void;\n};\n\n/** A labelled multi-line field for a brand logo source. */\nexport const LogoField = ({ id, label, value, onChange }: Props) => (\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label htmlFor={id} className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n {label}\n </Label>\n <Textarea\n id={id}\n value={value}\n onValueChange={onChange}\n maxRows={4}\n placeholder=\"<svg…>, a data: URI, or an https:// URL\"\n className=\"tw:font-mono tw:text-xs\"\n />\n </div>\n);\n","import { Label } from '../../components/Label';\nimport { TextInput } from '../TextInput';\n\ntype Props = {\n id: string;\n label: string;\n /** Current CSS value (empty clears the token, falling back to the stylesheet default). */\n value: string;\n /** Called with the new CSS value on change. */\n onChange: (value: string) => void;\n /** The inherited default, shown as placeholder when the field is empty. */\n placeholder?: string;\n};\n\n/** A labelled single-line field for a free-form CSS-value token (shadow, motion, gradient). */\nexport const TextField = ({ id, label, value, onChange, placeholder }: Props) => (\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label htmlFor={id} className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n {label}\n </Label>\n <TextInput\n id={id}\n value={value}\n onValueChange={onChange}\n placeholder={placeholder}\n className=\"tw:font-mono tw:text-xs\"\n />\n </div>\n);\n","import { useId, useMemo } from 'react';\nimport DOMPurify from 'dompurify';\n\nimport type { Brand } from '@keboola/brand-registry';\nimport { keboola } from '@keboola/brand-registry';\n\nimport { Badge } from '../../components/Badge';\nimport { Button } from '../../components/Button';\nimport { Collapsible } from '../../components/Collapsible';\nimport { Label } from '../../components/Label';\nimport { Select } from '../../components/Select';\nimport { Slider } from '../../components/Slider';\nimport { ToggleGroup } from '../../components/ToggleGroup';\n\nimport { ColorField } from './ColorField';\nimport { contrastRatio, wcagLevel } from './contrast';\nimport { ControlSection } from './ControlSection';\nimport { LogoField } from './LogoField';\nimport { TextField } from './TextField';\n\ntype Colors = NonNullable<Brand['theme']['colors']>;\n/** Colour tokens written as full CSS values rather than `R G B` channels. */\nexport type StateColorSlot = keyof Pick<\n Colors,\n 'hover' | 'hoverForeground' | 'pressed' | 'selected' | 'selectedForeground' | 'scrim'\n>;\nexport type ColorSlot = keyof Omit<Colors, 'sidebar' | 'chart' | StateColorSlot>;\ntype SidebarColors = NonNullable<Colors['sidebar']>;\n/** Sidebar tokens written as full CSS values rather than `R G B` channels. */\nexport type SidebarStateSlot = keyof Pick<\n SidebarColors,\n 'sidebarHover' | 'sidebarHoverForeground' | 'sidebarSelected' | 'sidebarSelectedForeground'\n>;\nexport type SidebarSlot = keyof Omit<SidebarColors, SidebarStateSlot>;\nexport type ChartSlot = keyof NonNullable<NonNullable<Brand['theme']['colors']>['chart']>;\nexport type RadiusSize = keyof NonNullable<Brand['theme']['radii']>;\n\ntype Typography = NonNullable<Brand['theme']['typography']>;\ntype FontFace = 'fontFamily' | 'fontDisplay' | 'fontMono';\ntype FontWeightSlot = keyof NonNullable<Typography['weight']>;\ntype ShadowSlot = keyof NonNullable<Brand['theme']['shadows']>;\ntype SpacingSlot = keyof NonNullable<Brand['theme']['spacing']>;\ntype MotionSlot = keyof NonNullable<Brand['theme']['motion']>;\n\nexport const DEFAULT_FALLBACK_FONT = \"'Inter', system-ui, sans-serif\";\n\nexport const DEFAULT_FONT_OPTIONS: { value: string; label: string }[] = [\n { value: DEFAULT_FALLBACK_FONT, label: 'Inter (default)' },\n { value: \"'Space Grotesk', system-ui, sans-serif\", label: 'Space Grotesk' },\n { value: \"'Poppins', system-ui, sans-serif\", label: 'Poppins' },\n { value: \"'Manrope', system-ui, sans-serif\", label: 'Manrope' },\n { value: \"'Quicksand', system-ui, sans-serif\", label: 'Quicksand' },\n { value: \"'Baloo 2', system-ui, sans-serif\", label: 'Baloo 2' },\n { value: \"'Fraunces', Georgia, serif\", label: 'Fraunces (serif)' },\n { value: \"Georgia, 'Times New Roman', serif\", label: 'Georgia (serif)' },\n { value: \"'JetBrains Mono', ui-monospace, monospace\", label: 'JetBrains Mono' },\n { value: 'system-ui, sans-serif', label: 'System UI' },\n];\n\n// Label maps double as a compile-time exhaustiveness guard: typed as\n// `Record<ColorSlot, string>` / `Record<SidebarSlot, string>`, a new token added\n// to the upstream `Brand` schema fails to compile here until it gets a control,\n// so it can't silently drift out of the editor. Insertion order is display order.\nconst COLOR_LABELS: Record<ColorSlot, string> = {\n primary: 'Primary',\n primaryForeground: 'Primary foreground',\n background: 'Background',\n foreground: 'Foreground',\n card: 'Card',\n cardForeground: 'Card foreground',\n popover: 'Popover',\n popoverForeground: 'Popover foreground',\n secondary: 'Secondary',\n secondaryForeground: 'Secondary foreground',\n muted: 'Muted',\n mutedForeground: 'Muted foreground',\n accent: 'Accent',\n accentForeground: 'Accent foreground',\n border: 'Border',\n input: 'Input border',\n inputBackground: 'Input background',\n ring: 'Ring',\n ringOffset: 'Ring offset',\n destructive: 'Destructive',\n destructiveForeground: 'Destructive foreground',\n success: 'Success',\n successForeground: 'Success foreground',\n warning: 'Warning',\n warningForeground: 'Warning foreground',\n info: 'Info',\n infoForeground: 'Info foreground',\n};\n\nconst STATE_COLOR_LABELS: Record<StateColorSlot, string> = {\n hover: 'Hover',\n hoverForeground: 'Hover foreground',\n pressed: 'Pressed',\n selected: 'Selected',\n selectedForeground: 'Selected foreground',\n scrim: 'Scrim (modal backdrop)',\n};\n\n// What an unset state token resolves to, shown as the field's placeholder.\nconst STATE_COLOR_DEFAULTS: Record<StateColorSlot, string> = {\n hover: 'Follows accent (menus, table rows: their own tint)',\n hoverForeground: 'Follows accent foreground',\n pressed: 'Reserved: no component reads it yet',\n selected: 'Follows accent',\n selectedForeground: 'Follows accent foreground',\n scrim: 'rgb(0 0 0 / 0.5)',\n};\n\nconst DEFAULT_DISABLED_OPACITY = '0.5';\n\nconst SIDEBAR_LABELS: Record<SidebarSlot, string> = {\n sidebar: 'Sidebar',\n sidebarForeground: 'Foreground',\n sidebarPrimary: 'Primary',\n sidebarPrimaryForeground: 'Primary foreground',\n sidebarAccent: 'Accent',\n sidebarAccentForeground: 'Accent foreground',\n sidebarBorder: 'Border',\n sidebarRing: 'Ring',\n};\n\nconst SIDEBAR_STATE_LABELS: Record<SidebarStateSlot, string> = {\n sidebarHover: 'Hover',\n sidebarHoverForeground: 'Hover foreground',\n sidebarSelected: 'Selected (current page)',\n sidebarSelectedForeground: 'Selected foreground',\n};\n\nconst CHART_LABELS: Record<ChartSlot, string> = {\n chart1: 'Chart 1',\n chart2: 'Chart 2',\n chart3: 'Chart 3',\n chart4: 'Chart 4',\n chart5: 'Chart 5',\n};\n\nconst WEIGHT_LABELS: Record<FontWeightSlot, string> = {\n normal: 'Normal',\n medium: 'Medium',\n semibold: 'Semibold',\n bold: 'Bold',\n};\n\nconst SHADOW_LABELS: Record<ShadowSlot, string> = {\n sm: 'Small',\n md: 'Medium',\n lg: 'Large',\n lift: 'Lift (raised)',\n};\n\nconst SPACING_LABELS: Record<SpacingSlot, string> = {\n gutter: 'Gutter (between sections)',\n inset: 'Inset (in-container)',\n};\n\nconst MOTION_LABELS: Record<MotionSlot, string> = {\n duration: 'Duration',\n easing: 'Easing',\n};\n\nconst COLOR_SLOTS = Object.keys(COLOR_LABELS) as ColorSlot[];\nconst STATE_COLOR_SLOTS = Object.keys(STATE_COLOR_LABELS) as StateColorSlot[];\nconst SIDEBAR_STATE_SLOTS = Object.keys(SIDEBAR_STATE_LABELS) as SidebarStateSlot[];\nconst SIDEBAR_SLOTS = Object.keys(SIDEBAR_LABELS) as SidebarSlot[];\nconst CHART_SLOTS = Object.keys(CHART_LABELS) as ChartSlot[];\nconst WEIGHT_SLOTS = Object.keys(WEIGHT_LABELS) as FontWeightSlot[];\nconst SHADOW_SLOTS = Object.keys(SHADOW_LABELS) as ShadowSlot[];\nconst SPACING_SLOTS = Object.keys(SPACING_LABELS) as SpacingSlot[];\nconst MOTION_SLOTS = Object.keys(MOTION_LABELS) as MotionSlot[];\nconst RADIUS_SIZES: RadiusSize[] = ['sm', 'md', 'lg', 'card', 'popover', 'modal', 'sheet', 'toast'];\n\n// Foreground/background pairs whose contrast decides everyday legibility.\nconst A11Y_PAIRS: { label: string; fg: ColorSlot; bg: ColorSlot }[] = [\n { label: 'Text on background', fg: 'foreground', bg: 'background' },\n { label: 'Text on card', fg: 'cardForeground', bg: 'card' },\n { label: 'Primary button', fg: 'primaryForeground', bg: 'primary' },\n { label: 'Muted text', fg: 'mutedForeground', bg: 'muted' },\n { label: 'Accent', fg: 'accentForeground', bg: 'accent' },\n];\n\n// Fallback sidebar palette — the `keboola` brand doesn't set `colors.sidebar` /\n// `colorsDark.sidebar`, so a slot needs a value to seed from when a user starts\n// editing sidebar tokens on a brand that leaves them unset.\nconst DEFAULT_SIDEBAR: Record<'light' | 'dark', Record<SidebarSlot, string>> = {\n light: {\n sidebar: '255 255 255',\n sidebarForeground: '30 41 59',\n sidebarPrimary: '31 143 255',\n sidebarPrimaryForeground: '255 255 255',\n sidebarAccent: '219 234 254',\n sidebarAccentForeground: '30 41 59',\n sidebarBorder: '229 231 235',\n sidebarRing: '31 143 255',\n },\n dark: {\n sidebar: '14 14 18',\n sidebarForeground: '229 230 236',\n sidebarPrimary: '31 143 255',\n sidebarPrimaryForeground: '255 255 255',\n sidebarAccent: '38 38 45',\n sidebarAccentForeground: '229 230 236',\n sidebarBorder: '48 49 57',\n sidebarRing: '31 143 255',\n },\n};\n\nconst DEFAULT_RADII: NonNullable<Brand['theme']['radii']> = {\n sm: '0.25rem',\n md: '0.375rem',\n lg: '0.5rem',\n};\n\n// What an unset surface radius resolves to on its component.\nconst surfaceRadiusFallback = (\n size: RadiusSize,\n radii: NonNullable<Brand['theme']['radii']>,\n): string => {\n if (size === 'popover') return '1rem';\n if (size === 'modal') return '1.5rem';\n return radii.lg;\n};\n\n// The `@keboola/design/styles` categorical chart palette — seeds the chart\n// pickers when a brand leaves `colors.chart` / `colorsDark.chart` unset.\nconst DEFAULT_CHART: Record<'light' | 'dark', Record<ChartSlot, string>> = {\n light: {\n chart1: '31 143 255',\n chart2: '0 194 135',\n chart3: '146 92 255',\n chart4: '245 147 0',\n chart5: '237 94 223',\n },\n dark: {\n chart1: '92 173 255',\n chart2: '0 230 161',\n chart3: '173 133 255',\n chart4: '255 190 92',\n chart5: '242 140 232',\n },\n};\n\n// Chrome font-weight defaults (the Tailwind scale `@keboola/design` falls back to\n// when `typography.weight` is unset) — seed values for the weight sliders.\nconst DEFAULT_FONT_WEIGHTS: Record<FontWeightSlot, string> = {\n normal: '400',\n medium: '500',\n semibold: '600',\n bold: '700',\n};\n\n// Chrome tracking default (behind the hardcoded `tw:tracking-[1px]`).\nconst DEFAULT_LETTER_SPACING = '1px';\n\n// The monospace stack the mono-face Select falls back to when `fontMono` is unset\n// (matches the `DEFAULT_FONT_OPTIONS` JetBrains Mono entry).\nconst MONO_FALLBACK = \"'JetBrains Mono', ui-monospace, monospace\";\n\n// `@keboola/design/styles` defaults for the advanced token groups, shown as\n// placeholders so an unset field reveals the value it inherits.\nconst DEFAULT_SHADOWS: Record<ShadowSlot, string> = {\n sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)',\n md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',\n lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',\n lift: '0 10px 30px -12px rgb(0 0 0 / 0.28), 0 2px 6px rgb(0 0 0 / 0.06)',\n};\n\nconst DEFAULT_SPACING: Record<SpacingSlot, string> = {\n gutter: '1.5rem',\n inset: '1.5rem',\n};\n\nconst DEFAULT_MOTION: Record<MotionSlot, string> = {\n duration: '200ms',\n easing: 'cubic-bezier(0.2, 0.7, 0.2, 1)',\n};\n\nconst DEFAULT_GRADIENT =\n 'linear-gradient(135deg, rgb(var(--primary)), rgb(var(--accent, var(--primary))))';\n\n// Leading numeric value of a token string (font-weight \"500\").\nconst numOf = (value: string, fallback: number): number => {\n const n = Number.parseFloat(value);\n return Number.isFinite(n) ? n : fallback;\n};\n\n// Letter-spacing may be px or em. Drive the slider in px (treating `em` as ×16,\n// like the radius slider treats `rem`) and write back in the value's original\n// unit, so an `em`-authored brand (e.g. `0.02em`) stays `em` instead of being\n// silently rewritten to `px`.\nconst letterSpacingToPx = (value: string): number => {\n const n = Number.parseFloat(value);\n if (!Number.isFinite(n)) return 0;\n return value.trim().endsWith('em') ? n * 16 : n;\n};\n\nconst pxToLetterSpacing = (px: number, currentValue: string): string =>\n currentValue.trim().endsWith('em') ? `${Number((px / 16).toFixed(3))}em` : `${px}px`;\n\n// The Brand schema allows any CSS length for radii (`rem`, `px`, unitless). Convert to px for\n// the slider treating `rem` as ×16 and everything else as already-px, and write back preserving\n// the slot's original unit so `8px` stays `8px`, `0.5rem` stays `0.5rem`, and a unitless `8` stays `8`.\nconst lengthToPx = (value: string): number => {\n const n = Number.parseFloat(value);\n if (!Number.isFinite(n)) return 0;\n return Math.round(value.trim().endsWith('rem') ? n * 16 : n);\n};\n\nconst pxToLength = (px: number, currentValue: string): string => {\n const trimmed = currentValue.trim();\n if (trimmed.endsWith('rem')) return `${px / 16}rem`;\n // Preserve a unitless token (the schema allows it) rather than forcing `px` onto it.\n if (/^-?\\d*\\.?\\d+$/.test(trimmed)) return `${px}`;\n return `${px}px`;\n};\n\nexport type BrandEditorProps = {\n value: Brand;\n onChange: (next: Brand) => void;\n /** Palette being edited. Controlled. Default 'light'. */\n colorScheme?: 'light' | 'dark';\n /** If provided, the editor shows a light/dark toggle that calls this. If omitted, no toggle. */\n onColorSchemeChange?: (scheme: 'light' | 'dark') => void;\n /** Font choices for the typography Select. Defaults to DEFAULT_FONT_OPTIONS. */\n fontOptions?: { value: string; label: string }[];\n};\n\n// Match `BrandLogo`'s sniffing: any string starting with `<` is inline markup (covers\n// `<?xml …?><svg>` / `<!doctype …>` prefixes); only `data:` / `http(s)://` are image URLs.\nconst isSvgMarkup = (source: string) => source.trimStart().startsWith('<');\nconst isImageSource = (source: string) => /^(data:|https?:\\/\\/)/.test(source.trim());\n\n/** Renders a logo source (SVG markup, `data:` URI, or `http(s)` URL) from the raw string. */\nconst LogoPreviewImage = ({ source, className }: { source: string; className?: string }) => {\n const safeSvg = useMemo(\n () =>\n isSvgMarkup(source)\n ? DOMPurify.sanitize(source, { USE_PROFILES: { svg: true, svgFilters: true } })\n : null,\n [source],\n );\n\n if (safeSvg !== null) {\n // Decorative preview of what the caller is editing — the textarea holds the real value, so\n // hide the injected graphic from assistive tech (parity with the `alt=\"\"` image branch below).\n return <span aria-hidden className={className} dangerouslySetInnerHTML={{ __html: safeSvg }} />;\n }\n if (isImageSource(source)) {\n return <img src={source} alt=\"\" className={className} />;\n }\n return null;\n};\n\n/**\n * Controlled brand-editing block — colors (light/dark), sidebar colors, WCAG contrast readout,\n * corner radius, typography, and logo. Reads/writes a `Brand` (`@keboola/brand-registry`) via\n * `value` / `onChange`; owns no state of its own, so the caller decides where the brand and the\n * active color scheme live (Kai build-mode preview, theme-generator, …).\n */\nexport const BrandEditor = ({\n value,\n onChange,\n colorScheme = 'light',\n onColorSchemeChange,\n fontOptions = DEFAULT_FONT_OPTIONS,\n}: BrandEditorProps) => {\n // Prefix every control id so multiple BrandEditors on one page don't collide (broken label↔control).\n const baseId = useId();\n const { theme } = value;\n const coreColors = colorScheme === 'light' ? theme.colors : theme.colorsDark;\n const sidebarColors = colorScheme === 'light' ? theme.colors?.sidebar : theme.colorsDark?.sidebar;\n const chartColors = colorScheme === 'light' ? theme.colors?.chart : theme.colorsDark?.chart;\n // Fall back to the keboola default of the SAME scheme — never light values while editing dark.\n const defaultColors = colorScheme === 'light' ? keboola.theme.colors : keboola.theme.colorsDark;\n const radii = theme.radii ?? DEFAULT_RADII;\n const typography = theme.typography;\n\n const setColor = (slot: ColorSlot, channels: string) => {\n if (colorScheme === 'light') {\n onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, [slot]: channels } } });\n return;\n }\n // Keep colorsDark sparse (mirrors the light path) so an unset dark palette inherits the\n // design-system defaults instead of baking in a full keboola palette on the first edit.\n onChange({\n ...value,\n theme: { ...theme, colorsDark: { ...theme.colorsDark, [slot]: channels } },\n });\n };\n\n const setStateColor = (slot: StateColorSlot, color: string) => {\n const next = color.trim() || undefined;\n if (colorScheme === 'light') {\n onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, [slot]: next } } });\n return;\n }\n onChange({ ...value, theme: { ...theme, colorsDark: { ...theme.colorsDark, [slot]: next } } });\n };\n\n const setDisabledOpacity = (disabled: string) =>\n onChange({ ...value, theme: { ...theme, opacity: { ...theme.opacity, disabled } } });\n\n const setSidebarColor = (slot: SidebarSlot, channels: string) => {\n if (colorScheme === 'light') {\n const base = theme.colors?.sidebar ?? DEFAULT_SIDEBAR.light;\n onChange({\n ...value,\n theme: { ...theme, colors: { ...theme.colors, sidebar: { ...base, [slot]: channels } } },\n });\n return;\n }\n // Spread the existing (possibly-empty) colorsDark so setting a sidebar token doesn't seed the\n // whole core dark palette; only the sidebar sub-object is seeded, since it has no default to inherit.\n const sidebarBase = theme.colorsDark?.sidebar ?? DEFAULT_SIDEBAR.dark;\n onChange({\n ...value,\n theme: {\n ...theme,\n colorsDark: { ...theme.colorsDark, sidebar: { ...sidebarBase, [slot]: channels } },\n },\n });\n };\n\n const setSidebarState = (slot: SidebarStateSlot, color: string) => {\n const next = color.trim() || undefined;\n const palette = colorScheme === 'light' ? 'colors' : 'colorsDark';\n const sidebar = { ...(theme[palette]?.sidebar ?? DEFAULT_SIDEBAR[colorScheme]), [slot]: next };\n onChange({ ...value, theme: { ...theme, [palette]: { ...theme[palette], sidebar } } });\n };\n\n const setChart = (slot: ChartSlot, channels: string) => {\n const base = chartColors ?? DEFAULT_CHART[colorScheme];\n const chart = { ...base, [slot]: channels };\n if (colorScheme === 'light') {\n onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, chart } } });\n return;\n }\n onChange({ ...value, theme: { ...theme, colorsDark: { ...theme.colorsDark, chart } } });\n };\n\n const setRadius = (size: RadiusSize, radius: string) =>\n onChange({\n ...value,\n theme: { ...theme, radii: { ...(theme.radii ?? DEFAULT_RADII), [size]: radius } },\n });\n\n // Merge a typography patch, keeping sibling faces / weight / letterSpacing.\n const patchTypography = (patch: Partial<Typography>) =>\n onChange({ ...value, theme: { ...theme, typography: { ...theme.typography, ...patch } } });\n\n const setFontFace = (face: FontFace, font: string) =>\n patchTypography({ [face]: font.trim() || undefined });\n\n const setFontWeight = (slot: FontWeightSlot, weight: string) =>\n patchTypography({ weight: { ...theme.typography?.weight, [slot]: weight || undefined } });\n\n const setLetterSpacing = (chrome: string) =>\n patchTypography({ letterSpacing: { chrome: chrome.trim() || undefined } });\n\n const setShadow = (slot: ShadowSlot, shadow: string) =>\n onChange({\n ...value,\n theme: { ...theme, shadows: { ...theme.shadows, [slot]: shadow.trim() || undefined } },\n });\n\n const setSpacing = (slot: SpacingSlot, length: string) =>\n onChange({\n ...value,\n theme: { ...theme, spacing: { ...theme.spacing, [slot]: length.trim() || undefined } },\n });\n\n const setMotion = (slot: MotionSlot, token: string) =>\n onChange({\n ...value,\n theme: { ...theme, motion: { ...theme.motion, [slot]: token.trim() || undefined } },\n });\n\n const setGradient = (gradient: string) =>\n onChange({\n ...value,\n theme: { ...theme, gradient: { brand: gradient.trim() || undefined } },\n });\n\n const setLogo = (slot: keyof NonNullable<Brand['logo']>, source: string) => {\n const trimmed = source.trim();\n const nextLogo: NonNullable<Brand['logo']> = { ...value.logo };\n if (trimmed) nextLogo[slot] = trimmed;\n else delete nextLogo[slot];\n const { logo: _drop, ...rest } = value;\n onChange(Object.keys(nextLogo).length > 0 ? { ...value, logo: nextLogo } : rest);\n };\n\n return (\n <div className=\"tw:flex tw:flex-col\">\n <ControlSection title=\"Colors\">\n {onColorSchemeChange ? (\n <ToggleGroup\n type=\"single\"\n value={colorScheme}\n onValueChange={(next) => {\n if (next === 'light' || next === 'dark') onColorSchemeChange(next);\n }}\n aria-label=\"Color scheme\"\n className=\"tw:w-full\"\n >\n <ToggleGroup.Item value=\"light\" className=\"tw:flex-1\">\n Light\n </ToggleGroup.Item>\n <ToggleGroup.Item value=\"dark\" className=\"tw:flex-1\">\n Dark\n </ToggleGroup.Item>\n </ToggleGroup>\n ) : null}\n <div className=\"tw:flex tw:flex-col tw:gap-2\">\n {COLOR_SLOTS.map((slot) => (\n <ColorField\n key={slot}\n id={`${baseId}color-${colorScheme}-${slot}`}\n label={COLOR_LABELS[slot]}\n channels={coreColors?.[slot] ?? defaultColors?.[slot] ?? '0 0 0'}\n onChange={(channels) => setColor(slot, channels)}\n />\n ))}\n </div>\n </ControlSection>\n\n <ControlSection title=\"Accessibility\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n WCAG contrast for the {colorScheme} palette (AA needs 4.5:1).\n </p>\n <div className=\"tw:flex tw:flex-col tw:gap-1.5\">\n {A11Y_PAIRS.map((pair) => {\n const fg = coreColors?.[pair.fg] ?? defaultColors?.[pair.fg] ?? '0 0 0';\n const bg = coreColors?.[pair.bg] ?? defaultColors?.[pair.bg] ?? '255 255 255';\n const ratio = contrastRatio(fg, bg);\n const level = wcagLevel(ratio);\n return (\n <div key={pair.label} className=\"tw:flex tw:items-center tw:justify-between tw:gap-2\">\n <span className=\"tw:text-xs tw:text-foreground\">{pair.label}</span>\n <span className=\"tw:flex tw:items-center tw:gap-1.5\">\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {ratio.toFixed(1)}:1\n </span>\n <Badge color={level === 'fail' ? 'red' : 'green'}>\n {level === 'fail' ? 'Fail' : level}\n </Badge>\n </span>\n </div>\n );\n })}\n </div>\n </ControlSection>\n\n <ControlSection title=\"Interaction states\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Hover, pressed, selected and backdrop colours for the {colorScheme} palette, as any CSS\n colour so a wash can be translucent. Empty follows the default.\n </p>\n <div className=\"tw:flex tw:flex-col tw:gap-2\">\n {STATE_COLOR_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}state-${colorScheme}-${slot}`}\n label={STATE_COLOR_LABELS[slot]}\n value={coreColors?.[slot] ?? ''}\n placeholder={STATE_COLOR_DEFAULTS[slot]}\n onChange={(next) => setStateColor(slot, next)}\n />\n ))}\n </div>\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <div className=\"tw:flex tw:items-center tw:justify-between\">\n <Label className=\"tw:text-xs tw:font-normal tw:text-foreground\">Disabled opacity</Label>\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {theme.opacity?.disabled ?? DEFAULT_DISABLED_OPACITY}\n </span>\n </div>\n <Slider\n aria-label=\"Disabled opacity\"\n min={0.2}\n max={0.8}\n step={0.05}\n value={[Number(theme.opacity?.disabled ?? DEFAULT_DISABLED_OPACITY)]}\n onValueChange={(values) => setDisabledOpacity((values[0] ?? 0.5).toFixed(2))}\n />\n </div>\n </ControlSection>\n\n <ControlSection title=\"Sidebar colors\">\n <Collapsible className=\"tw:flex tw:flex-col tw:gap-2\">\n <Collapsible.Trigger asChild>\n <Button variant=\"outline\" size=\"small\" className=\"tw:w-full\">\n Toggle sidebar tokens ({colorScheme})\n </Button>\n </Collapsible.Trigger>\n <Collapsible.Content className=\"tw:flex tw:flex-col tw:gap-2\">\n {SIDEBAR_SLOTS.map((slot) => (\n <ColorField\n key={slot}\n id={`${baseId}sidebar-${colorScheme}-${slot}`}\n label={SIDEBAR_LABELS[slot]}\n channels={sidebarColors?.[slot] ?? DEFAULT_SIDEBAR[colorScheme][slot]}\n onChange={(channels) => setSidebarColor(slot, channels)}\n />\n ))}\n {SIDEBAR_STATE_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}sidebar-state-${colorScheme}-${slot}`}\n label={`Sidebar ${SIDEBAR_STATE_LABELS[slot].toLowerCase()}`}\n value={sidebarColors?.[slot] ?? ''}\n placeholder=\"Follows sidebar accent\"\n onChange={(next) => setSidebarState(slot, next)}\n />\n ))}\n </Collapsible.Content>\n </Collapsible>\n </ControlSection>\n\n <ControlSection title=\"Chart palette\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Categorical series colours for the {colorScheme} palette (`--chart-1…5`).\n </p>\n <div className=\"tw:flex tw:flex-col tw:gap-2\">\n {CHART_SLOTS.map((slot) => (\n <ColorField\n key={slot}\n id={`${baseId}chart-${colorScheme}-${slot}`}\n label={CHART_LABELS[slot]}\n channels={chartColors?.[slot] ?? DEFAULT_CHART[colorScheme][slot]}\n onChange={(channels) => setChart(slot, channels)}\n />\n ))}\n </div>\n </ControlSection>\n\n <ControlSection title=\"Radius\">\n {RADIUS_SIZES.map((size) => {\n const current = radii[size] ?? surfaceRadiusFallback(size, radii);\n const px = lengthToPx(current);\n return (\n <div key={size} className=\"tw:flex tw:flex-col tw:gap-1\">\n <div className=\"tw:flex tw:items-center tw:justify-between\">\n <Label className=\"tw:text-xs tw:font-normal tw:uppercase tw:text-foreground\">\n {size}\n </Label>\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {current}\n </span>\n </div>\n <Slider\n min={0}\n max={32}\n step={1}\n value={[px]}\n onValueChange={(values) => setRadius(size, pxToLength(values[0] ?? 0, current))}\n />\n </div>\n );\n })}\n </ControlSection>\n\n <ControlSection title=\"Typography\">\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label\n htmlFor={`${baseId}font-family`}\n className=\"tw:text-xs tw:font-normal tw:text-foreground\"\n >\n Font family\n </Label>\n <Select\n id={`${baseId}font-family`}\n value={typography?.fontFamily ?? DEFAULT_FALLBACK_FONT}\n onValueChange={(font) => setFontFace('fontFamily', font)}\n items={fontOptions}\n />\n </div>\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label\n htmlFor={`${baseId}font-display`}\n className=\"tw:text-xs tw:font-normal tw:text-foreground\"\n >\n Display font (headings)\n </Label>\n <Select\n id={`${baseId}font-display`}\n value={typography?.fontDisplay ?? typography?.fontFamily ?? DEFAULT_FALLBACK_FONT}\n onValueChange={(font) => setFontFace('fontDisplay', font)}\n items={fontOptions}\n />\n </div>\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label\n htmlFor={`${baseId}font-mono`}\n className=\"tw:text-xs tw:font-normal tw:text-foreground\"\n >\n Monospace font\n </Label>\n <Select\n id={`${baseId}font-mono`}\n value={typography?.fontMono ?? MONO_FALLBACK}\n onValueChange={(font) => setFontFace('fontMono', font)}\n items={fontOptions}\n />\n </div>\n\n <span className=\"tw:text-xs tw:text-muted-foreground\">Chrome font weights</span>\n {WEIGHT_SLOTS.map((slot) => {\n const current = typography?.weight?.[slot] ?? DEFAULT_FONT_WEIGHTS[slot];\n return (\n <div key={slot} className=\"tw:flex tw:flex-col tw:gap-1\">\n <div className=\"tw:flex tw:items-center tw:justify-between\">\n <Label className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n {WEIGHT_LABELS[slot]}\n </Label>\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {current}\n </span>\n </div>\n <Slider\n min={100}\n max={900}\n step={25}\n value={[numOf(current, 400)]}\n onValueChange={(values) => setFontWeight(slot, String(values[0] ?? 400))}\n />\n </div>\n );\n })}\n\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <div className=\"tw:flex tw:items-center tw:justify-between\">\n <Label className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n Chrome letter spacing\n </Label>\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING}\n </span>\n </div>\n <Slider\n min={-2}\n max={4}\n step={0.25}\n value={[letterSpacingToPx(typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING)]}\n onValueChange={(values) =>\n setLetterSpacing(\n pxToLetterSpacing(\n values[0] ?? 0,\n typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING,\n ),\n )\n }\n />\n </div>\n </ControlSection>\n\n <ControlSection title=\"Elevation\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Box-shadow scale (`--shadow-*`), shared across light & dark. Empty inherits the default.\n </p>\n {SHADOW_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}shadow-${slot}`}\n label={SHADOW_LABELS[slot]}\n value={theme.shadows?.[slot] ?? ''}\n placeholder={DEFAULT_SHADOWS[slot]}\n onChange={(next) => setShadow(slot, next)}\n />\n ))}\n </ControlSection>\n\n <ControlSection title=\"Density\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Semantic spacing (`--space-*`), as CSS lengths.\n </p>\n {SPACING_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}spacing-${slot}`}\n label={SPACING_LABELS[slot]}\n value={theme.spacing?.[slot] ?? ''}\n placeholder={DEFAULT_SPACING[slot]}\n onChange={(next) => setSpacing(slot, next)}\n />\n ))}\n </ControlSection>\n\n <ControlSection title=\"Motion\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Base transition `duration` + `easing` (`--motion-*`).\n </p>\n {MOTION_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}motion-${slot}`}\n label={MOTION_LABELS[slot]}\n value={theme.motion?.[slot] ?? ''}\n placeholder={DEFAULT_MOTION[slot]}\n onChange={(next) => setMotion(slot, next)}\n />\n ))}\n </ControlSection>\n\n <ControlSection title=\"Gradient\">\n <TextField\n id={`${baseId}gradient-brand`}\n label=\"Brand gradient\"\n value={theme.gradient?.brand ?? ''}\n placeholder={DEFAULT_GRADIENT}\n onChange={setGradient}\n />\n </ControlSection>\n\n <ControlSection title=\"Logo\">\n <LogoField\n id={`${baseId}logo-mark`}\n label=\"Mark (icon)\"\n value={value.logo?.mark ?? ''}\n onChange={(source) => setLogo('mark', source)}\n />\n <LogoField\n id={`${baseId}logo-wordmark`}\n label=\"Wordmark (full)\"\n value={value.logo?.wordmark ?? ''}\n onChange={(source) => setLogo('wordmark', source)}\n />\n <Collapsible className=\"tw:flex tw:flex-col tw:gap-2\">\n <Collapsible.Trigger asChild>\n <Button variant=\"outline\" size=\"small\" className=\"tw:w-full\">\n Toggle dark-mode logos\n </Button>\n </Collapsible.Trigger>\n <Collapsible.Content className=\"tw:flex tw:flex-col tw:gap-2\">\n <LogoField\n id={`${baseId}logo-mark-dark`}\n label=\"Mark (dark)\"\n value={value.logo?.markDark ?? ''}\n onChange={(source) => setLogo('markDark', source)}\n />\n <LogoField\n id={`${baseId}logo-wordmark-dark`}\n label=\"Wordmark (dark)\"\n value={value.logo?.wordmarkDark ?? ''}\n onChange={(source) => setLogo('wordmarkDark', source)}\n />\n </Collapsible.Content>\n </Collapsible>\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <span className=\"tw:text-xs tw:text-muted-foreground\">Preview</span>\n <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\">\n {value.logo?.mark || value.logo?.wordmark ? (\n <>\n {value.logo.mark ? (\n <LogoPreviewImage source={value.logo.mark} className=\"tw:h-8\" />\n ) : null}\n {value.logo.wordmark ? (\n <LogoPreviewImage source={value.logo.wordmark} className=\"tw:h-8\" />\n ) : null}\n </>\n ) : (\n <span className=\"tw:text-xs tw:text-muted-foreground\">No logo set</span>\n )}\n </div>\n </div>\n </ControlSection>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAIA,MAAa,iBAAiB,QAAwB;CACpD,IAAI,IAAI,IAAI,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE;CAGnC,IAAI,EAAE,WAAW,KAAK,EAAE,WAAW,GACjC,IAAI,EACD,MAAM,GAAG,CAAC,CAAC,CACX,MAAM,EAAE,CAAC,CACT,KAAK,MAAM,IAAI,CAAC,CAAC,CACjB,KAAK,EAAE;MACL,IAAI,EAAE,WAAW,GACtB,IAAI,EAAE,MAAM,GAAG,CAAC;CAElB,IAAI,CAAC,mBAAmB,KAAK,CAAC,GAAG,OAAO;CACxC,MAAM,IAAI,SAAS,GAAG,EAAE;CACxB,OAAO,GAAI,KAAK,KAAM,IAAI,GAAI,KAAK,IAAK,IAAI,GAAG,IAAI;AACrD;AAEA,MAAa,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,oBAAC,QAAD;OAAM,WAAU;OAAsC,UAAA;MAAa,CAAA,GACnE,oBAAC,OAAD;OAAK,WAAU;OACZ,UAAA,MAAM,MAAM,QAAQ,MAAM,MAAM,WAC/B,qBAAA,YAAA,EAAA,UAAA,CACG,MAAM,KAAK,OACV,oBAAC,kBAAD;QAAkB,QAAQ,MAAM,KAAK;QAAM,WAAU;OAAU,CAAA,IAC7D,MACH,MAAM,KAAK,WACV,oBAAC,kBAAD;QAAkB,QAAQ,MAAM,KAAK;QAAU,WAAU;OAAU,CAAA,IACjE,IACJ,EAAA,CAAA,IAEF,oBAAC,QAAD;QAAM,WAAU;QAAsC,UAAA;OAAiB,CAAA;MAEtE,CAAA,CACF;;IACS;;EACb;;AAET"}
1
+ {"version":3,"file":"BrandEditor-hiLBX7az.js","names":[],"sources":["../src/blocks/BrandEditor/color.ts","../src/blocks/BrandEditor/ColorField.tsx","../src/blocks/BrandEditor/contrast.ts","../src/blocks/BrandEditor/ControlSection.tsx","../src/blocks/BrandEditor/LogoField.tsx","../src/blocks/BrandEditor/TextField.tsx","../src/blocks/BrandEditor/BrandEditor.tsx"],"sourcesContent":["// Brand colours are stored as space-separated \"R G B\" channel strings (see\n// `rgbChannelsSchema` in @keboola/brand-registry); `ColorInput` speaks hex.\n// These helpers convert at that boundary.\n\nexport const hexToChannels = (hex: string): string => {\n let h = hex.trim().replace(/^#/, '');\n // Expand 3/4-digit shorthand and drop alpha (4- and 8-digit `#rgba`/`#rrggbbaa`) — brand\n // channels carry no alpha. Anything else is malformed → fall back to black.\n if (h.length === 3 || h.length === 4) {\n h = h\n .slice(0, 3)\n .split('')\n .map((c) => c + c)\n .join('');\n } else if (h.length === 8) {\n h = h.slice(0, 6);\n }\n if (!/^[0-9a-fA-F]{6}$/.test(h)) return '0 0 0';\n const n = parseInt(h, 16);\n return `${(n >> 16) & 255} ${(n >> 8) & 255} ${n & 255}`;\n};\n\nexport const channelsToHex = (channels: string): string => {\n const [r = 0, g = 0, b = 0] = channels\n .trim()\n .split(/\\s+/)\n .map((n) => Number(n) || 0);\n const to2 = (v: number) => Math.max(0, Math.min(255, v)).toString(16).padStart(2, '0');\n return `#${to2(r)}${to2(g)}${to2(b)}`;\n};\n","import { Label } from '../../components/Label';\nimport { ColorInput } from '../ColorInput';\n\nimport { channelsToHex, hexToChannels } from './color';\n\ntype Props = {\n id: string;\n label: string;\n /** Current value as an \"R G B\" channel string. */\n channels: string;\n /** Called with a new \"R G B\" channel string when a valid colour is picked. */\n onChange: (channels: string) => void;\n};\n\n// ColorInput fires `onValueChange` on every keystroke (it only coerces on blur), so commit a\n// channel value only for a COMPLETE 3-, 4-, 6-, or 8-digit hex — otherwise a partial \"#1\"/\"#\"\n// would write unintended channels. Alpha (4-/8-digit) is truncated to RGB, since brand tokens\n// carry no alpha.\nconst COMPLETE_HEX = /^([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;\n\n/** A labelled hex colour picker bound to a brand token (stored as RGB channels). */\nexport const ColorField = ({ id, label, channels, onChange }: Props) => {\n const hex = channelsToHex(channels);\n\n return (\n <div className=\"tw:flex tw:items-center tw:justify-between tw:gap-2\">\n <Label htmlFor={id} className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n {label}\n </Label>\n <ColorInput\n id={id}\n value={hex}\n className=\"tw:w-36\"\n onValueChange={(next) => {\n const clean = next.trim().replace(/^#/, '');\n // Commit only complete hex (hexToChannels handles the 3/6/8-digit shapes + alpha drop).\n if (COMPLETE_HEX.test(clean)) onChange(hexToChannels(`#${clean}`));\n }}\n />\n </div>\n );\n};\n","// WCAG contrast helpers over `\"R G B\"` channel strings (the brand token format).\n\n// Coerce non-numeric/blank channels to 0 and clamp to the valid 0–255 range, so a malformed\n// token (e.g. \"999 999 999\") can neither NaN-out nor push luminance past WCAG's expected bounds.\nconst clampChannel = (n: number): number =>\n Number.isFinite(n) ? Math.min(255, Math.max(0, n)) : 0;\n\nconst parseChannels = (channels: string): [number, number, number] => {\n const [r = 0, g = 0, b = 0] = channels\n .trim()\n .split(/\\s+/)\n .map((n) => clampChannel(Number(n)));\n return [r, g, b];\n};\n\nconst relativeLuminance = (channels: string): number => {\n // Destructure with defaults (not an `as` assertion) so `r`/`g`/`b` are `number` under\n // `noUncheckedIndexedAccess` without a production-code type cast.\n const [r = 0, g = 0, b = 0] = parseChannels(channels).map((c) => {\n const s = c / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\n/** WCAG contrast ratio (1–21) between two `\"R G B\"` colours. */\nexport const contrastRatio = (fg: string, bg: string): number => {\n const l1 = relativeLuminance(fg);\n const l2 = relativeLuminance(bg);\n const [lighter, darker] = l1 >= l2 ? [l1, l2] : [l2, l1];\n return (lighter + 0.05) / (darker + 0.05);\n};\n\n/** WCAG level for normal-size text at a given ratio. */\nexport const wcagLevel = (ratio: number): 'AAA' | 'AA' | 'fail' =>\n ratio >= 7 ? 'AAA' : ratio >= 4.5 ? 'AA' : 'fail';\n","import type { ReactNode } from 'react';\n\ntype Props = {\n title: string;\n children: ReactNode;\n};\n\n/** A titled block inside `BrandEditor`. */\nexport const ControlSection = ({ title, children }: Props) => (\n <section className=\"tw:flex tw:flex-col tw:gap-3 tw:border-b tw:border-border tw:p-4\">\n <h3 className=\"tw:m-0 tw:text-xs tw:font-semibold tw:uppercase tw:tracking-wide tw:text-muted-foreground\">\n {title}\n </h3>\n {children}\n </section>\n);\n","import { Label } from '../../components/Label';\nimport { Textarea } from '../Textarea';\n\ntype Props = {\n id: string;\n label: string;\n /** Current logo source: SVG markup, a `data:` URI, or an `http(s)` URL. */\n value: string;\n /** Called with the new source (empty string clears the slot). */\n onChange: (value: string) => void;\n};\n\n/** A labelled multi-line field for a brand logo source. */\nexport const LogoField = ({ id, label, value, onChange }: Props) => (\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label htmlFor={id} className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n {label}\n </Label>\n <Textarea\n id={id}\n value={value}\n onValueChange={onChange}\n maxRows={4}\n placeholder=\"<svg…>, a data: URI, or an https:// URL\"\n className=\"tw:font-mono tw:text-xs\"\n />\n </div>\n);\n","import { Label } from '../../components/Label';\nimport { TextInput } from '../TextInput';\n\ntype Props = {\n id: string;\n label: string;\n /** Current CSS value (empty clears the token, falling back to the stylesheet default). */\n value: string;\n /** Called with the new CSS value on change. */\n onChange: (value: string) => void;\n /** The inherited default, shown as placeholder when the field is empty. */\n placeholder?: string;\n};\n\n/** A labelled single-line field for a free-form CSS-value token (shadow, motion, gradient). */\nexport const TextField = ({ id, label, value, onChange, placeholder }: Props) => (\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label htmlFor={id} className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n {label}\n </Label>\n <TextInput\n id={id}\n value={value}\n onValueChange={onChange}\n placeholder={placeholder}\n className=\"tw:font-mono tw:text-xs\"\n />\n </div>\n);\n","import { useId, useMemo } from 'react';\nimport DOMPurify from 'dompurify';\n\nimport type { Brand } from '@keboola/brand-registry';\nimport { keboola } from '@keboola/brand-registry';\n\nimport { Badge } from '../../components/Badge';\nimport { Button } from '../../components/Button';\nimport { Collapsible } from '../../components/Collapsible';\nimport { Label } from '../../components/Label';\nimport { Select } from '../../components/Select';\nimport { Slider } from '../../components/Slider';\nimport { ToggleGroup } from '../../components/ToggleGroup';\n\nimport { ColorField } from './ColorField';\nimport { contrastRatio, wcagLevel } from './contrast';\nimport { ControlSection } from './ControlSection';\nimport { LogoField } from './LogoField';\nimport { TextField } from './TextField';\n\ntype Colors = NonNullable<Brand['theme']['colors']>;\n/** Colour tokens written as full CSS values rather than `R G B` channels. */\nexport type StateColorSlot = keyof Pick<\n Colors,\n 'hover' | 'hoverForeground' | 'pressed' | 'selected' | 'selectedForeground' | 'scrim'\n>;\nexport type ColorSlot = keyof Omit<Colors, 'sidebar' | 'chart' | StateColorSlot>;\ntype SidebarColors = NonNullable<Colors['sidebar']>;\n/** Sidebar tokens written as full CSS values rather than `R G B` channels. */\nexport type SidebarStateSlot = keyof Pick<\n SidebarColors,\n 'sidebarHover' | 'sidebarHoverForeground' | 'sidebarSelected' | 'sidebarSelectedForeground'\n>;\nexport type SidebarSlot = keyof Omit<SidebarColors, SidebarStateSlot>;\nexport type ChartSlot = keyof NonNullable<NonNullable<Brand['theme']['colors']>['chart']>;\nexport type RadiusSize = keyof NonNullable<Brand['theme']['radii']>;\n\ntype Typography = NonNullable<Brand['theme']['typography']>;\ntype FontFace = 'fontFamily' | 'fontDisplay' | 'fontMono';\ntype FontWeightSlot = keyof NonNullable<Typography['weight']>;\ntype ShadowSlot = keyof NonNullable<Brand['theme']['shadows']>;\ntype SpacingSlot = keyof NonNullable<Brand['theme']['spacing']>;\ntype MotionSlot = keyof NonNullable<Brand['theme']['motion']>;\n\nexport const DEFAULT_FALLBACK_FONT = \"'Inter', system-ui, sans-serif\";\n\nexport const DEFAULT_FONT_OPTIONS: { value: string; label: string }[] = [\n { value: DEFAULT_FALLBACK_FONT, label: 'Inter (default)' },\n { value: \"'Space Grotesk', system-ui, sans-serif\", label: 'Space Grotesk' },\n { value: \"'Poppins', system-ui, sans-serif\", label: 'Poppins' },\n { value: \"'Manrope', system-ui, sans-serif\", label: 'Manrope' },\n { value: \"'Quicksand', system-ui, sans-serif\", label: 'Quicksand' },\n { value: \"'Baloo 2', system-ui, sans-serif\", label: 'Baloo 2' },\n { value: \"'Fraunces', Georgia, serif\", label: 'Fraunces (serif)' },\n { value: \"Georgia, 'Times New Roman', serif\", label: 'Georgia (serif)' },\n { value: \"'JetBrains Mono', ui-monospace, monospace\", label: 'JetBrains Mono' },\n { value: 'system-ui, sans-serif', label: 'System UI' },\n];\n\n// Label maps double as a compile-time exhaustiveness guard: typed as\n// `Record<ColorSlot, string>` / `Record<SidebarSlot, string>`, a new token added\n// to the upstream `Brand` schema fails to compile here until it gets a control,\n// so it can't silently drift out of the editor. Insertion order is display order.\nconst COLOR_LABELS: Record<ColorSlot, string> = {\n primary: 'Primary',\n primaryForeground: 'Primary foreground',\n background: 'Background',\n foreground: 'Foreground',\n card: 'Card',\n cardForeground: 'Card foreground',\n popover: 'Popover',\n popoverForeground: 'Popover foreground',\n secondary: 'Secondary',\n secondaryForeground: 'Secondary foreground',\n muted: 'Muted',\n mutedForeground: 'Muted foreground',\n accent: 'Accent',\n accentForeground: 'Accent foreground',\n border: 'Border',\n input: 'Input border',\n inputBackground: 'Input background',\n ring: 'Ring',\n ringOffset: 'Ring offset',\n destructive: 'Destructive',\n destructiveForeground: 'Destructive foreground',\n success: 'Success',\n successForeground: 'Success foreground',\n warning: 'Warning',\n warningForeground: 'Warning foreground',\n info: 'Info',\n infoForeground: 'Info foreground',\n};\n\nconst STATE_COLOR_LABELS: Record<StateColorSlot, string> = {\n hover: 'Hover',\n hoverForeground: 'Hover foreground',\n pressed: 'Pressed',\n selected: 'Selected',\n selectedForeground: 'Selected foreground',\n scrim: 'Scrim (modal backdrop)',\n};\n\n// What an unset state token resolves to, shown as the field's placeholder.\nconst STATE_COLOR_DEFAULTS: Record<StateColorSlot, string> = {\n hover: 'Follows accent (menus, table rows: their own tint)',\n hoverForeground: 'Follows accent foreground',\n pressed: 'Reserved: no component reads it yet',\n selected: 'Follows accent',\n selectedForeground: 'Follows accent foreground',\n scrim: 'rgb(0 0 0 / 0.5)',\n};\n\nconst DEFAULT_DISABLED_OPACITY = '0.5';\n\nconst SIDEBAR_LABELS: Record<SidebarSlot, string> = {\n sidebar: 'Sidebar',\n sidebarForeground: 'Foreground',\n sidebarPrimary: 'Primary',\n sidebarPrimaryForeground: 'Primary foreground',\n sidebarAccent: 'Accent',\n sidebarAccentForeground: 'Accent foreground',\n sidebarBorder: 'Border',\n sidebarRing: 'Ring',\n};\n\nconst SIDEBAR_STATE_LABELS: Record<SidebarStateSlot, string> = {\n sidebarHover: 'Hover',\n sidebarHoverForeground: 'Hover foreground',\n sidebarSelected: 'Selected (current page)',\n sidebarSelectedForeground: 'Selected foreground',\n};\n\nconst CHART_LABELS: Record<ChartSlot, string> = {\n chart1: 'Chart 1',\n chart2: 'Chart 2',\n chart3: 'Chart 3',\n chart4: 'Chart 4',\n chart5: 'Chart 5',\n};\n\nconst WEIGHT_LABELS: Record<FontWeightSlot, string> = {\n normal: 'Normal',\n medium: 'Medium',\n semibold: 'Semibold',\n bold: 'Bold',\n};\n\nconst SHADOW_LABELS: Record<ShadowSlot, string> = {\n sm: 'Small',\n md: 'Medium',\n lg: 'Large',\n lift: 'Lift (raised)',\n};\n\nconst SPACING_LABELS: Record<SpacingSlot, string> = {\n gutter: 'Gutter (between sections)',\n inset: 'Inset (in-container)',\n};\n\nconst MOTION_LABELS: Record<MotionSlot, string> = {\n duration: 'Duration',\n easing: 'Easing',\n};\n\nconst COLOR_SLOTS = Object.keys(COLOR_LABELS) as ColorSlot[];\nconst STATE_COLOR_SLOTS = Object.keys(STATE_COLOR_LABELS) as StateColorSlot[];\nconst SIDEBAR_STATE_SLOTS = Object.keys(SIDEBAR_STATE_LABELS) as SidebarStateSlot[];\nconst SIDEBAR_SLOTS = Object.keys(SIDEBAR_LABELS) as SidebarSlot[];\nconst CHART_SLOTS = Object.keys(CHART_LABELS) as ChartSlot[];\nconst WEIGHT_SLOTS = Object.keys(WEIGHT_LABELS) as FontWeightSlot[];\nconst SHADOW_SLOTS = Object.keys(SHADOW_LABELS) as ShadowSlot[];\nconst SPACING_SLOTS = Object.keys(SPACING_LABELS) as SpacingSlot[];\nconst MOTION_SLOTS = Object.keys(MOTION_LABELS) as MotionSlot[];\nconst RADIUS_SIZES: RadiusSize[] = ['sm', 'md', 'lg', 'card', 'popover', 'modal', 'sheet', 'toast'];\n\n// Foreground/background pairs whose contrast decides everyday legibility.\nconst A11Y_PAIRS: { label: string; fg: ColorSlot; bg: ColorSlot }[] = [\n { label: 'Text on background', fg: 'foreground', bg: 'background' },\n { label: 'Text on card', fg: 'cardForeground', bg: 'card' },\n { label: 'Primary button', fg: 'primaryForeground', bg: 'primary' },\n { label: 'Muted text', fg: 'mutedForeground', bg: 'muted' },\n { label: 'Accent', fg: 'accentForeground', bg: 'accent' },\n];\n\n// Fallback sidebar palette — the `keboola` brand doesn't set `colors.sidebar` /\n// `colorsDark.sidebar`, so a slot needs a value to seed from when a user starts\n// editing sidebar tokens on a brand that leaves them unset.\nconst DEFAULT_SIDEBAR: Record<'light' | 'dark', Record<SidebarSlot, string>> = {\n light: {\n sidebar: '255 255 255',\n sidebarForeground: '30 41 59',\n sidebarPrimary: '31 143 255',\n sidebarPrimaryForeground: '255 255 255',\n sidebarAccent: '219 234 254',\n sidebarAccentForeground: '30 41 59',\n sidebarBorder: '229 231 235',\n sidebarRing: '31 143 255',\n },\n dark: {\n sidebar: '14 14 18',\n sidebarForeground: '229 230 236',\n sidebarPrimary: '31 143 255',\n sidebarPrimaryForeground: '255 255 255',\n sidebarAccent: '38 38 45',\n sidebarAccentForeground: '229 230 236',\n sidebarBorder: '48 49 57',\n sidebarRing: '31 143 255',\n },\n};\n\nconst DEFAULT_RADII: NonNullable<Brand['theme']['radii']> = {\n sm: '0.25rem',\n md: '0.375rem',\n lg: '0.5rem',\n};\n\n// What an unset surface radius resolves to on its component.\nconst surfaceRadiusFallback = (\n size: RadiusSize,\n radii: NonNullable<Brand['theme']['radii']>,\n): string => {\n if (size === 'popover') return '1rem';\n if (size === 'modal') return '1.5rem';\n return radii.lg;\n};\n\n// The `@keboola/design/styles` categorical chart palette — seeds the chart\n// pickers when a brand leaves `colors.chart` / `colorsDark.chart` unset.\nconst DEFAULT_CHART: Record<'light' | 'dark', Record<ChartSlot, string>> = {\n light: {\n chart1: '31 143 255',\n chart2: '0 194 135',\n chart3: '146 92 255',\n chart4: '245 147 0',\n chart5: '237 94 223',\n },\n dark: {\n chart1: '92 173 255',\n chart2: '0 230 161',\n chart3: '173 133 255',\n chart4: '255 190 92',\n chart5: '242 140 232',\n },\n};\n\n// Chrome font-weight defaults (the Tailwind scale `@keboola/design` falls back to\n// when `typography.weight` is unset) — seed values for the weight sliders.\nconst DEFAULT_FONT_WEIGHTS: Record<FontWeightSlot, string> = {\n normal: '400',\n medium: '500',\n semibold: '600',\n bold: '700',\n};\n\n// Chrome tracking default (behind the hardcoded `tw:tracking-[1px]`).\nconst DEFAULT_LETTER_SPACING = '1px';\n\n// The monospace stack the mono-face Select falls back to when `fontMono` is unset\n// (matches the `DEFAULT_FONT_OPTIONS` JetBrains Mono entry).\nconst MONO_FALLBACK = \"'JetBrains Mono', ui-monospace, monospace\";\n\n// `@keboola/design/styles` defaults for the advanced token groups, shown as\n// placeholders so an unset field reveals the value it inherits.\nconst DEFAULT_SHADOWS: Record<ShadowSlot, string> = {\n sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)',\n md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',\n lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',\n lift: '0 10px 30px -12px rgb(0 0 0 / 0.28), 0 2px 6px rgb(0 0 0 / 0.06)',\n};\n\nconst DEFAULT_SPACING: Record<SpacingSlot, string> = {\n gutter: '1.5rem',\n inset: '1.5rem',\n};\n\nconst DEFAULT_MOTION: Record<MotionSlot, string> = {\n duration: '200ms',\n easing: 'cubic-bezier(0.2, 0.7, 0.2, 1)',\n};\n\nconst DEFAULT_GRADIENT =\n 'linear-gradient(135deg, rgb(var(--primary)), rgb(var(--accent, var(--primary))))';\n\n// Leading numeric value of a token string (font-weight \"500\").\nconst numOf = (value: string, fallback: number): number => {\n const n = Number.parseFloat(value);\n return Number.isFinite(n) ? n : fallback;\n};\n\n// Letter-spacing may be px or em. Drive the slider in px (treating `em` as ×16,\n// like the radius slider treats `rem`) and write back in the value's original\n// unit, so an `em`-authored brand (e.g. `0.02em`) stays `em` instead of being\n// silently rewritten to `px`.\nconst letterSpacingToPx = (value: string): number => {\n const n = Number.parseFloat(value);\n if (!Number.isFinite(n)) return 0;\n return value.trim().endsWith('em') ? n * 16 : n;\n};\n\nconst pxToLetterSpacing = (px: number, currentValue: string): string =>\n currentValue.trim().endsWith('em') ? `${Number((px / 16).toFixed(3))}em` : `${px}px`;\n\n// The Brand schema allows any CSS length for radii (`rem`, `px`, unitless). Convert to px for\n// the slider treating `rem` as ×16 and everything else as already-px, and write back preserving\n// the slot's original unit so `8px` stays `8px`, `0.5rem` stays `0.5rem`, and a unitless `8` stays `8`.\nconst lengthToPx = (value: string): number => {\n const n = Number.parseFloat(value);\n if (!Number.isFinite(n)) return 0;\n return Math.round(value.trim().endsWith('rem') ? n * 16 : n);\n};\n\nconst pxToLength = (px: number, currentValue: string): string => {\n const trimmed = currentValue.trim();\n if (trimmed.endsWith('rem')) return `${px / 16}rem`;\n // Preserve a unitless token (the schema allows it) rather than forcing `px` onto it.\n if (/^-?\\d*\\.?\\d+$/.test(trimmed)) return `${px}`;\n return `${px}px`;\n};\n\nexport type BrandEditorProps = {\n value: Brand;\n onChange: (next: Brand) => void;\n /** Palette being edited. Controlled. Default 'light'. */\n colorScheme?: 'light' | 'dark';\n /** If provided, the editor shows a light/dark toggle that calls this. If omitted, no toggle. */\n onColorSchemeChange?: (scheme: 'light' | 'dark') => void;\n /** Font choices for the typography Select. Defaults to DEFAULT_FONT_OPTIONS. */\n fontOptions?: { value: string; label: string }[];\n};\n\n// Match `BrandLogo`'s sniffing: any string starting with `<` is inline markup (covers\n// `<?xml …?><svg>` / `<!doctype …>` prefixes); only `data:` / `http(s)://` are image URLs.\nconst isSvgMarkup = (source: string) => source.trimStart().startsWith('<');\nconst isImageSource = (source: string) => /^(data:|https?:\\/\\/)/.test(source.trim());\n\n/** Renders a logo source (SVG markup, `data:` URI, or `http(s)` URL) from the raw string. */\nconst LogoPreviewImage = ({ source, className }: { source: string; className?: string }) => {\n const safeSvg = useMemo(\n () =>\n isSvgMarkup(source)\n ? DOMPurify.sanitize(source, { USE_PROFILES: { svg: true, svgFilters: true } })\n : null,\n [source],\n );\n\n if (safeSvg !== null) {\n // Decorative preview of what the caller is editing — the textarea holds the real value, so\n // hide the injected graphic from assistive tech (parity with the `alt=\"\"` image branch below).\n return <span aria-hidden className={className} dangerouslySetInnerHTML={{ __html: safeSvg }} />;\n }\n if (isImageSource(source)) {\n return <img src={source} alt=\"\" className={className} />;\n }\n return null;\n};\n\n/**\n * Controlled brand-editing block — colors (light/dark), sidebar colors, WCAG contrast readout,\n * corner radius, typography, and logo. Reads/writes a `Brand` (`@keboola/brand-registry`) via\n * `value` / `onChange`; owns no state of its own, so the caller decides where the brand and the\n * active color scheme live (Kai build-mode preview, theme-generator, …).\n */\nexport const BrandEditor = ({\n value,\n onChange,\n colorScheme = 'light',\n onColorSchemeChange,\n fontOptions = DEFAULT_FONT_OPTIONS,\n}: BrandEditorProps) => {\n // Prefix every control id so multiple BrandEditors on one page don't collide (broken label↔control).\n const baseId = useId();\n const { theme } = value;\n const coreColors = colorScheme === 'light' ? theme.colors : theme.colorsDark;\n const sidebarColors = colorScheme === 'light' ? theme.colors?.sidebar : theme.colorsDark?.sidebar;\n const chartColors = colorScheme === 'light' ? theme.colors?.chart : theme.colorsDark?.chart;\n // Fall back to the keboola default of the SAME scheme — never light values while editing dark.\n const defaultColors = colorScheme === 'light' ? keboola.theme.colors : keboola.theme.colorsDark;\n const radii = theme.radii ?? DEFAULT_RADII;\n const typography = theme.typography;\n\n const setColor = (slot: ColorSlot, channels: string) => {\n if (colorScheme === 'light') {\n onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, [slot]: channels } } });\n return;\n }\n // Keep colorsDark sparse (mirrors the light path) so an unset dark palette inherits the\n // design-system defaults instead of baking in a full keboola palette on the first edit.\n onChange({\n ...value,\n theme: { ...theme, colorsDark: { ...theme.colorsDark, [slot]: channels } },\n });\n };\n\n const setStateColor = (slot: StateColorSlot, color: string) => {\n const next = color.trim() || undefined;\n if (colorScheme === 'light') {\n onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, [slot]: next } } });\n return;\n }\n onChange({ ...value, theme: { ...theme, colorsDark: { ...theme.colorsDark, [slot]: next } } });\n };\n\n const setDisabledOpacity = (disabled: string) =>\n onChange({ ...value, theme: { ...theme, opacity: { ...theme.opacity, disabled } } });\n\n const setSidebarColor = (slot: SidebarSlot, channels: string) => {\n if (colorScheme === 'light') {\n const base = theme.colors?.sidebar ?? DEFAULT_SIDEBAR.light;\n onChange({\n ...value,\n theme: { ...theme, colors: { ...theme.colors, sidebar: { ...base, [slot]: channels } } },\n });\n return;\n }\n // Spread the existing (possibly-empty) colorsDark so setting a sidebar token doesn't seed the\n // whole core dark palette; only the sidebar sub-object is seeded, since it has no default to inherit.\n const sidebarBase = theme.colorsDark?.sidebar ?? DEFAULT_SIDEBAR.dark;\n onChange({\n ...value,\n theme: {\n ...theme,\n colorsDark: { ...theme.colorsDark, sidebar: { ...sidebarBase, [slot]: channels } },\n },\n });\n };\n\n const setSidebarState = (slot: SidebarStateSlot, color: string) => {\n const next = color.trim() || undefined;\n const palette = colorScheme === 'light' ? 'colors' : 'colorsDark';\n const sidebar = { ...(theme[palette]?.sidebar ?? DEFAULT_SIDEBAR[colorScheme]), [slot]: next };\n onChange({ ...value, theme: { ...theme, [palette]: { ...theme[palette], sidebar } } });\n };\n\n const setChart = (slot: ChartSlot, channels: string) => {\n const base = chartColors ?? DEFAULT_CHART[colorScheme];\n const chart = { ...base, [slot]: channels };\n if (colorScheme === 'light') {\n onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, chart } } });\n return;\n }\n onChange({ ...value, theme: { ...theme, colorsDark: { ...theme.colorsDark, chart } } });\n };\n\n const setRadius = (size: RadiusSize, radius: string) =>\n onChange({\n ...value,\n theme: { ...theme, radii: { ...(theme.radii ?? DEFAULT_RADII), [size]: radius } },\n });\n\n // Merge a typography patch, keeping sibling faces / weight / letterSpacing.\n const patchTypography = (patch: Partial<Typography>) =>\n onChange({ ...value, theme: { ...theme, typography: { ...theme.typography, ...patch } } });\n\n const setFontFace = (face: FontFace, font: string) =>\n patchTypography({ [face]: font.trim() || undefined });\n\n const setFontWeight = (slot: FontWeightSlot, weight: string) =>\n patchTypography({ weight: { ...theme.typography?.weight, [slot]: weight || undefined } });\n\n const setLetterSpacing = (chrome: string) =>\n patchTypography({ letterSpacing: { chrome: chrome.trim() || undefined } });\n\n const setShadow = (slot: ShadowSlot, shadow: string) =>\n onChange({\n ...value,\n theme: { ...theme, shadows: { ...theme.shadows, [slot]: shadow.trim() || undefined } },\n });\n\n const setSpacing = (slot: SpacingSlot, length: string) =>\n onChange({\n ...value,\n theme: { ...theme, spacing: { ...theme.spacing, [slot]: length.trim() || undefined } },\n });\n\n const setMotion = (slot: MotionSlot, token: string) =>\n onChange({\n ...value,\n theme: { ...theme, motion: { ...theme.motion, [slot]: token.trim() || undefined } },\n });\n\n const setGradient = (gradient: string) =>\n onChange({\n ...value,\n theme: { ...theme, gradient: { brand: gradient.trim() || undefined } },\n });\n\n const setLogo = (slot: keyof NonNullable<Brand['logo']>, source: string) => {\n const trimmed = source.trim();\n const nextLogo: NonNullable<Brand['logo']> = { ...value.logo };\n if (trimmed) nextLogo[slot] = trimmed;\n else delete nextLogo[slot];\n const { logo: _drop, ...rest } = value;\n onChange(Object.keys(nextLogo).length > 0 ? { ...value, logo: nextLogo } : rest);\n };\n\n return (\n <div className=\"tw:flex tw:flex-col\">\n <ControlSection title=\"Colors\">\n {onColorSchemeChange ? (\n <ToggleGroup\n type=\"single\"\n value={colorScheme}\n onValueChange={(next) => {\n if (next === 'light' || next === 'dark') onColorSchemeChange(next);\n }}\n aria-label=\"Color scheme\"\n className=\"tw:w-full\"\n >\n <ToggleGroup.Item value=\"light\" className=\"tw:flex-1\">\n Light\n </ToggleGroup.Item>\n <ToggleGroup.Item value=\"dark\" className=\"tw:flex-1\">\n Dark\n </ToggleGroup.Item>\n </ToggleGroup>\n ) : null}\n <div className=\"tw:flex tw:flex-col tw:gap-2\">\n {COLOR_SLOTS.map((slot) => (\n <ColorField\n key={slot}\n id={`${baseId}color-${colorScheme}-${slot}`}\n label={COLOR_LABELS[slot]}\n channels={coreColors?.[slot] ?? defaultColors?.[slot] ?? '0 0 0'}\n onChange={(channels) => setColor(slot, channels)}\n />\n ))}\n </div>\n </ControlSection>\n\n <ControlSection title=\"Accessibility\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n WCAG contrast for the {colorScheme} palette (AA needs 4.5:1).\n </p>\n <div className=\"tw:flex tw:flex-col tw:gap-1.5\">\n {A11Y_PAIRS.map((pair) => {\n const fg = coreColors?.[pair.fg] ?? defaultColors?.[pair.fg] ?? '0 0 0';\n const bg = coreColors?.[pair.bg] ?? defaultColors?.[pair.bg] ?? '255 255 255';\n const ratio = contrastRatio(fg, bg);\n const level = wcagLevel(ratio);\n return (\n <div key={pair.label} className=\"tw:flex tw:items-center tw:justify-between tw:gap-2\">\n <span className=\"tw:text-xs tw:text-foreground\">{pair.label}</span>\n <span className=\"tw:flex tw:items-center tw:gap-1.5\">\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {ratio.toFixed(1)}:1\n </span>\n <Badge color={level === 'fail' ? 'red' : 'green'}>\n {level === 'fail' ? 'Fail' : level}\n </Badge>\n </span>\n </div>\n );\n })}\n </div>\n </ControlSection>\n\n <ControlSection title=\"Interaction states\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Hover, pressed, selected and backdrop colours for the {colorScheme} palette, as any CSS\n colour so a wash can be translucent. Empty follows the default.\n </p>\n <div className=\"tw:flex tw:flex-col tw:gap-2\">\n {STATE_COLOR_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}state-${colorScheme}-${slot}`}\n label={STATE_COLOR_LABELS[slot]}\n value={coreColors?.[slot] ?? ''}\n placeholder={STATE_COLOR_DEFAULTS[slot]}\n onChange={(next) => setStateColor(slot, next)}\n />\n ))}\n </div>\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <div className=\"tw:flex tw:items-center tw:justify-between\">\n <Label className=\"tw:text-xs tw:font-normal tw:text-foreground\">Disabled opacity</Label>\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {theme.opacity?.disabled ?? DEFAULT_DISABLED_OPACITY}\n </span>\n </div>\n <Slider\n aria-label=\"Disabled opacity\"\n min={0.2}\n max={0.8}\n step={0.05}\n value={[Number(theme.opacity?.disabled ?? DEFAULT_DISABLED_OPACITY)]}\n onValueChange={(values) => setDisabledOpacity((values[0] ?? 0.5).toFixed(2))}\n />\n </div>\n </ControlSection>\n\n <ControlSection title=\"Sidebar colors\">\n <Collapsible className=\"tw:flex tw:flex-col tw:gap-2\">\n <Collapsible.Trigger asChild>\n <Button variant=\"outline\" size=\"small\" className=\"tw:w-full\">\n Toggle sidebar tokens ({colorScheme})\n </Button>\n </Collapsible.Trigger>\n <Collapsible.Content className=\"tw:flex tw:flex-col tw:gap-2\">\n {SIDEBAR_SLOTS.map((slot) => (\n <ColorField\n key={slot}\n id={`${baseId}sidebar-${colorScheme}-${slot}`}\n label={SIDEBAR_LABELS[slot]}\n channels={sidebarColors?.[slot] ?? DEFAULT_SIDEBAR[colorScheme][slot]}\n onChange={(channels) => setSidebarColor(slot, channels)}\n />\n ))}\n {SIDEBAR_STATE_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}sidebar-state-${colorScheme}-${slot}`}\n label={`Sidebar ${SIDEBAR_STATE_LABELS[slot].toLowerCase()}`}\n value={sidebarColors?.[slot] ?? ''}\n placeholder=\"Follows sidebar accent\"\n onChange={(next) => setSidebarState(slot, next)}\n />\n ))}\n </Collapsible.Content>\n </Collapsible>\n </ControlSection>\n\n <ControlSection title=\"Chart palette\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Categorical series colours for the {colorScheme} palette (`--chart-1…5`).\n </p>\n <div className=\"tw:flex tw:flex-col tw:gap-2\">\n {CHART_SLOTS.map((slot) => (\n <ColorField\n key={slot}\n id={`${baseId}chart-${colorScheme}-${slot}`}\n label={CHART_LABELS[slot]}\n channels={chartColors?.[slot] ?? DEFAULT_CHART[colorScheme][slot]}\n onChange={(channels) => setChart(slot, channels)}\n />\n ))}\n </div>\n </ControlSection>\n\n <ControlSection title=\"Radius\">\n {RADIUS_SIZES.map((size) => {\n const current = radii[size] ?? surfaceRadiusFallback(size, radii);\n const px = lengthToPx(current);\n return (\n <div key={size} className=\"tw:flex tw:flex-col tw:gap-1\">\n <div className=\"tw:flex tw:items-center tw:justify-between\">\n <Label className=\"tw:text-xs tw:font-normal tw:uppercase tw:text-foreground\">\n {size}\n </Label>\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {current}\n </span>\n </div>\n <Slider\n min={0}\n max={32}\n step={1}\n value={[px]}\n onValueChange={(values) => setRadius(size, pxToLength(values[0] ?? 0, current))}\n />\n </div>\n );\n })}\n </ControlSection>\n\n <ControlSection title=\"Typography\">\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label\n htmlFor={`${baseId}font-family`}\n className=\"tw:text-xs tw:font-normal tw:text-foreground\"\n >\n Font family\n </Label>\n <Select\n id={`${baseId}font-family`}\n value={typography?.fontFamily ?? DEFAULT_FALLBACK_FONT}\n onValueChange={(font) => setFontFace('fontFamily', font)}\n items={fontOptions}\n />\n </div>\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label\n htmlFor={`${baseId}font-display`}\n className=\"tw:text-xs tw:font-normal tw:text-foreground\"\n >\n Display font (headings)\n </Label>\n <Select\n id={`${baseId}font-display`}\n value={typography?.fontDisplay ?? typography?.fontFamily ?? DEFAULT_FALLBACK_FONT}\n onValueChange={(font) => setFontFace('fontDisplay', font)}\n items={fontOptions}\n />\n </div>\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <Label\n htmlFor={`${baseId}font-mono`}\n className=\"tw:text-xs tw:font-normal tw:text-foreground\"\n >\n Monospace font\n </Label>\n <Select\n id={`${baseId}font-mono`}\n value={typography?.fontMono ?? MONO_FALLBACK}\n onValueChange={(font) => setFontFace('fontMono', font)}\n items={fontOptions}\n />\n </div>\n\n <span className=\"tw:text-xs tw:text-muted-foreground\">Chrome font weights</span>\n {WEIGHT_SLOTS.map((slot) => {\n const current = typography?.weight?.[slot] ?? DEFAULT_FONT_WEIGHTS[slot];\n return (\n <div key={slot} className=\"tw:flex tw:flex-col tw:gap-1\">\n <div className=\"tw:flex tw:items-center tw:justify-between\">\n <Label className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n {WEIGHT_LABELS[slot]}\n </Label>\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {current}\n </span>\n </div>\n <Slider\n min={100}\n max={900}\n step={25}\n value={[numOf(current, 400)]}\n onValueChange={(values) => setFontWeight(slot, String(values[0] ?? 400))}\n />\n </div>\n );\n })}\n\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <div className=\"tw:flex tw:items-center tw:justify-between\">\n <Label className=\"tw:text-xs tw:font-normal tw:text-foreground\">\n Chrome letter spacing\n </Label>\n <span className=\"tw:text-xs tw:tabular-nums tw:text-muted-foreground\">\n {typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING}\n </span>\n </div>\n <Slider\n min={-2}\n max={4}\n step={0.25}\n value={[letterSpacingToPx(typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING)]}\n onValueChange={(values) =>\n setLetterSpacing(\n pxToLetterSpacing(\n values[0] ?? 0,\n typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING,\n ),\n )\n }\n />\n </div>\n </ControlSection>\n\n <ControlSection title=\"Elevation\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Box-shadow scale (`--shadow-*`), shared across light & dark. Empty inherits the default.\n </p>\n {SHADOW_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}shadow-${slot}`}\n label={SHADOW_LABELS[slot]}\n value={theme.shadows?.[slot] ?? ''}\n placeholder={DEFAULT_SHADOWS[slot]}\n onChange={(next) => setShadow(slot, next)}\n />\n ))}\n </ControlSection>\n\n <ControlSection title=\"Density\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Semantic spacing (`--space-*`), as CSS lengths.\n </p>\n {SPACING_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}spacing-${slot}`}\n label={SPACING_LABELS[slot]}\n value={theme.spacing?.[slot] ?? ''}\n placeholder={DEFAULT_SPACING[slot]}\n onChange={(next) => setSpacing(slot, next)}\n />\n ))}\n </ControlSection>\n\n <ControlSection title=\"Motion\">\n <p className=\"tw:m-0 tw:text-xs tw:text-muted-foreground\">\n Base transition `duration` + `easing` (`--motion-*`).\n </p>\n {MOTION_SLOTS.map((slot) => (\n <TextField\n key={slot}\n id={`${baseId}motion-${slot}`}\n label={MOTION_LABELS[slot]}\n value={theme.motion?.[slot] ?? ''}\n placeholder={DEFAULT_MOTION[slot]}\n onChange={(next) => setMotion(slot, next)}\n />\n ))}\n </ControlSection>\n\n <ControlSection title=\"Gradient\">\n <TextField\n id={`${baseId}gradient-brand`}\n label=\"Brand gradient\"\n value={theme.gradient?.brand ?? ''}\n placeholder={DEFAULT_GRADIENT}\n onChange={setGradient}\n />\n </ControlSection>\n\n <ControlSection title=\"Logo\">\n <LogoField\n id={`${baseId}logo-mark`}\n label=\"Mark (icon)\"\n value={value.logo?.mark ?? ''}\n onChange={(source) => setLogo('mark', source)}\n />\n <LogoField\n id={`${baseId}logo-wordmark`}\n label=\"Wordmark (full)\"\n value={value.logo?.wordmark ?? ''}\n onChange={(source) => setLogo('wordmark', source)}\n />\n <Collapsible className=\"tw:flex tw:flex-col tw:gap-2\">\n <Collapsible.Trigger asChild>\n <Button variant=\"outline\" size=\"small\" className=\"tw:w-full\">\n Toggle dark-mode logos\n </Button>\n </Collapsible.Trigger>\n <Collapsible.Content className=\"tw:flex tw:flex-col tw:gap-2\">\n <LogoField\n id={`${baseId}logo-mark-dark`}\n label=\"Mark (dark)\"\n value={value.logo?.markDark ?? ''}\n onChange={(source) => setLogo('markDark', source)}\n />\n <LogoField\n id={`${baseId}logo-wordmark-dark`}\n label=\"Wordmark (dark)\"\n value={value.logo?.wordmarkDark ?? ''}\n onChange={(source) => setLogo('wordmarkDark', source)}\n />\n </Collapsible.Content>\n </Collapsible>\n <div className=\"tw:flex tw:flex-col tw:gap-1\">\n <span className=\"tw:text-xs tw:text-muted-foreground\">Preview</span>\n <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\">\n {value.logo?.mark || value.logo?.wordmark ? (\n <>\n {value.logo.mark ? (\n <LogoPreviewImage source={value.logo.mark} className=\"tw:h-8\" />\n ) : null}\n {value.logo.wordmark ? (\n <LogoPreviewImage source={value.logo.wordmark} className=\"tw:h-8\" />\n ) : null}\n </>\n ) : (\n <span className=\"tw:text-xs tw:text-muted-foreground\">No logo set</span>\n )}\n </div>\n </div>\n </ControlSection>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAIA,MAAa,iBAAiB,QAAwB;CACpD,IAAI,IAAI,IAAI,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE;CAGnC,IAAI,EAAE,WAAW,KAAK,EAAE,WAAW,GACjC,IAAI,EACD,MAAM,GAAG,CAAC,CAAC,CACX,MAAM,EAAE,CAAC,CACT,KAAK,MAAM,IAAI,CAAC,CAAC,CACjB,KAAK,EAAE;MACL,IAAI,EAAE,WAAW,GACtB,IAAI,EAAE,MAAM,GAAG,CAAC;CAElB,IAAI,CAAC,mBAAmB,KAAK,CAAC,GAAG,OAAO;CACxC,MAAM,IAAI,SAAS,GAAG,EAAE;CACxB,OAAO,GAAI,KAAK,KAAM,IAAI,GAAI,KAAK,IAAK,IAAI,GAAG,IAAI;AACrD;AAEA,MAAa,iBAAiB,aAA6B;CACzD,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,KAAK,SAC3B,KAAK,CAAC,CACN,MAAM,KAA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Q,MAAM,MAAM,WAC/B,qBAAA,YAAA,EAAA,UAAA,CACG,MAAM,KAAK,OACV,oBAAC,kBAAD;QAAkB,QAAQ,MAAM,KAAK;QAAM,WAAU;OAAU,CAAA,IAC7D,MACH,MAAM,KAAK,WACV,oBAAC,kBAAD;QAAkB,QAAQ,MAAM,KAAK;QAAU,WAAU;OAAU,CAAA,IACjE,IACJ,EAAA,CAAA,IAEF,oBAAC,QAAD;QAAM,WAAU;QAAsC,UAAA;OAAiB,CAAA;MAEtE,CAAA,CACF;;IACS;;EACb;;AAET"}
@@ -1,9 +1,9 @@
1
- import { cn } from "./classNames-DcGnTh2N.js";
2
- import { useTheme } from "./ThemeProvider-BTK7AL-T.js";
1
+ import { cn } from "./classNames-DkX30VJU.js";
2
+ import { useTheme } from "./ThemeProvider-BCHllN7d.js";
3
3
  import { useMemo } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import DOMPurify from "dompurify";
6
- //#region src/components/BrandLogo/BrandLogo.tsx
6
+ // src/components/BrandLogo/BrandLogo.tsx
7
7
  const isInlineSvg = (source) => source.trimStart().startsWith("<");
8
8
  const resolveLogoSource = (logo, variant, mode) => {
9
9
  if (!logo) return void 0;
@@ -40,7 +40,6 @@ const BrandLogo = ({ variant = "wordmark", className, label }) => {
40
40
  })
41
41
  });
42
42
  };
43
- //#endregion
44
43
  export { BrandLogo };
45
44
 
46
- //# sourceMappingURL=BrandLogo-DkESE19K.js.map
45
+ //# sourceMappingURL=BrandLogo-Dn7hhp2c.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrandLogo-DkESE19K.js","names":[],"sources":["../src/components/BrandLogo/BrandLogo.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport DOMPurify from 'dompurify';\n\nimport type { Brand } from '@keboola/brand-registry';\n\nimport { cn } from '../../utils';\nimport { type ResolvedColorScheme, useTheme } from '../ThemeProvider';\n\ntype Props = {\n /** `wordmark` (default, full logo) or `mark` (square icon); each falls back to the other. */\n variant?: 'mark' | 'wordmark';\n /** Sets the logo height; aspect ratio is preserved (e.g. `tw:h-7`). */\n className?: string;\n /**\n * Accessible name; defaults to the brand's picker `name`, suffixes included (`Keboola (V2)`).\n * Pass the product name where the logo names something, e.g. a link.\n */\n label?: string;\n};\n\nconst isInlineSvg = (source: string) => source.trimStart().startsWith('<');\n\n// Resolved mode wins, then the other mode, then the other variant.\nconst resolveLogoSource = (\n logo: Brand['logo'],\n variant: 'mark' | 'wordmark',\n mode: ResolvedColorScheme,\n): string | undefined => {\n if (!logo) return undefined;\n const forMode = (light?: string, dark?: string) =>\n mode === 'dark' ? (dark ?? light) : (light ?? dark);\n const mark = forMode(logo.mark, logo.markDark);\n const wordmark = forMode(logo.wordmark, logo.wordmarkDark);\n return variant === 'mark' ? (mark ?? wordmark) : (wordmark ?? mark);\n};\n\n// Reference SVGs omit width/height; without a default height they render ~150px tall.\nconst wrapperClass = 'tw:inline-flex tw:h-6 tw:items-center tw:[&>svg]:h-full tw:[&>svg]:w-auto';\n\n/**\n * The active brand's logo from the nearest `<ThemeProvider>`, or `null` if it ships none.\n * Inline SVG inherits `currentColor`; URLs use `<img>`.\n */\nexport const BrandLogo = ({ variant = 'wordmark', className, label }: Props) => {\n const { currentTheme, resolvedScheme } = useTheme();\n const source = resolveLogoSource(currentTheme.logo, variant, resolvedScheme);\n\n // Brands can come from customer config or a paste field, so the SVG is untrusted.\n const safeSvg = useMemo(\n () =>\n source && isInlineSvg(source)\n ? DOMPurify.sanitize(source, { USE_PROFILES: { svg: true, svgFilters: true } })\n : null,\n [source],\n );\n\n if (!source) return null;\n\n if (safeSvg !== null) {\n return (\n <span\n role=\"img\"\n aria-label={label ?? currentTheme.name}\n className={cn(wrapperClass, className)}\n dangerouslySetInnerHTML={{ __html: safeSvg }}\n />\n );\n }\n\n return (\n <span className={cn(wrapperClass, className)}>\n <img src={source} alt={label ?? currentTheme.name} className=\"tw:h-full tw:w-auto\" />\n </span>\n );\n};\n"],"mappings":";;;;;;AAoBA,MAAM,eAAe,WAAmB,OAAO,UAAU,CAAC,CAAC,WAAW,GAAG;AAGzE,MAAM,qBACJ,MACA,SACA,SACuB;CACvB,IAAI,CAAC,MAAM,OAAO,KAAA;CAClB,MAAM,WAAW,OAAgB,SAC/B,SAAS,SAAU,QAAQ,QAAU,SAAS;CAChD,MAAM,OAAO,QAAQ,KAAK,MAAM,KAAK,QAAQ;CAC7C,MAAM,WAAW,QAAQ,KAAK,UAAU,KAAK,YAAY;CACzD,OAAO,YAAY,SAAU,QAAQ,WAAa,YAAY;AAChE;AAGA,MAAM,eAAe;;;;;AAMrB,MAAa,aAAa,EAAE,UAAU,YAAY,WAAW,YAAmB;CAC9E,MAAM,EAAE,cAAc,mBAAmB,SAAS;CAClD,MAAM,SAAS,kBAAkB,aAAa,MAAM,SAAS,cAAc;CAG3E,MAAM,UAAU,cAEZ,UAAU,YAAY,MAAM,IACxB,UAAU,SAAS,QAAQ,EAAE,cAAc;EAAE,KAAK;EAAM,YAAY;CAAK,EAAE,CAAC,IAC5E,MACN,CAAC,MAAM,CACT;CAEA,IAAI,CAAC,QAAQ,OAAO;CAEpB,IAAI,YAAY,MACd,OACE,oBAAC,QAAD;EACE,MAAK;EACL,cAAY,SAAS,aAAa;EAClC,WAAW,GAAG,cAAc,SAAS;EACrC,yBAAyB,EAAE,QAAQ,QAAQ;CAC5C,CAAA;CAIL,OACE,oBAAC,QAAD;EAAM,WAAW,GAAG,cAAc,SAAS;EACzC,UAAA,oBAAC,OAAD;GAAK,KAAK;GAAQ,KAAK,SAAS,aAAa;GAAM,WAAU;EAAuB,CAAA;CAChF,CAAA;AAEV"}
1
+ {"version":3,"file":"BrandLogo-Dn7hhp2c.js","names":[],"sources":["../src/components/BrandLogo/BrandLogo.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport DOMPurify from 'dompurify';\n\nimport type { Brand } from '@keboola/brand-registry';\n\nimport { cn } from '../../utils';\nimport { type ResolvedColorScheme, useTheme } from '../ThemeProvider';\n\ntype Props = {\n /** `wordmark` (default, full logo) or `mark` (square icon); each falls back to the other. */\n variant?: 'mark' | 'wordmark';\n /** Sets the logo height; aspect ratio is preserved (e.g. `tw:h-7`). */\n className?: string;\n /**\n * Accessible name; defaults to the brand's picker `name`, suffixes included (`Keboola (V2)`).\n * Pass the product name where the logo names something, e.g. a link.\n */\n label?: string;\n};\n\nconst isInlineSvg = (source: string) => source.trimStart().startsWith('<');\n\n// Resolved mode wins, then the other mode, then the other variant.\nconst resolveLogoSource = (\n logo: Brand['logo'],\n variant: 'mark' | 'wordmark',\n mode: ResolvedColorScheme,\n): string | undefined => {\n if (!logo) return undefined;\n const forMode = (light?: string, dark?: string) =>\n mode === 'dark' ? (dark ?? light) : (light ?? dark);\n const mark = forMode(logo.mark, logo.markDark);\n const wordmark = forMode(logo.wordmark, logo.wordmarkDark);\n return variant === 'mark' ? (mark ?? wordmark) : (wordmark ?? mark);\n};\n\n// Reference SVGs omit width/height; without a default height they render ~150px tall.\nconst wrapperClass = 'tw:inline-flex tw:h-6 tw:items-center tw:[&>svg]:h-full tw:[&>svg]:w-auto';\n\n/**\n * The active brand's logo from the nearest `<ThemeProvider>`, or `null` if it ships none.\n * Inline SVG inherits `currentColor`; URLs use `<img>`.\n */\nexport const BrandLogo = ({ variant = 'wordmark', className, label }: Props) => {\n const { currentTheme, resolvedScheme } = useTheme();\n const source = resolveLogoSource(currentTheme.logo, variant, resolvedScheme);\n\n // Brands can come from customer config or a paste field, so the SVG is untrusted.\n const safeSvg = useMemo(\n () =>\n source && isInlineSvg(source)\n ? DOMPurify.sanitize(source, { USE_PROFILES: { svg: true, svgFilters: true } })\n : null,\n [source],\n );\n\n if (!source) return null;\n\n if (safeSvg !== null) {\n return (\n <span\n role=\"img\"\n aria-label={label ?? currentTheme.name}\n className={cn(wrapperClass, className)}\n dangerouslySetInnerHTML={{ __html: safeSvg }}\n />\n );\n }\n\n return (\n <span className={cn(wrapperClass, className)}>\n <img src={source} alt={label ?? currentTheme.name} className=\"tw:h-full tw:w-auto\" />\n </span>\n );\n};\n"],"mappings":";;;;;;AAoBA,MAAM,eAAe,WAAmB,OAAO,UAAU,CAAC,CAAC,WAAW,GAAG;AAGzE,MAAM,qBACJ,MACA,SACA,SACuB;CACvB,IAAI,CAAC,MAAM,OAAO,KAAA;CAClB,MAAM,WAAW,OAAgB,SAC/B,SAAS,SAAU,QAAQ,QAAU,SAAS;CAChD,MAAM,OAAO,QAAQ,KAAK,MAAM,KAAK,QAAQ;CAC7C,MAAM,WAAW,QAAQ,KAAK,UAAU,KAAK,YAAY;CACzD,OAAO,YAAY,SAAU,QAAQ,WAAa,YAAY;AAChE;AAGA,MAAM,eAAe;;;;;AAMrB,MAAa,aAAa,EAAE,UAAU,YAAY,WAAW,YAAmB;CAC9E,MAAM,EAAE,cAAc,mBAAmB,SAAS;CAClD,MAAM,SAAS,kBAAkB,aAAa,MAAM,SAAS,cAAc;CAG3E,MAAM,UAAU,cAEZ,UAAU,YAAY,MAAM,IACxB,UAAU,SAAS,QAAQ,EAAE,cAAc;EAAE,KAAK;EAAM,YAAY;CAAK,EAAE,CAAC,IAC5E,MACN,CAAC,MAAM,CACT;CAEA,IAAI,CAAC,QAAQ,OAAO;CAEpB,IAAI,YAAY,MACd,OACE,oBAAC,QAAD;EACE,MAAK;EACL,cAAY,SAAS,aAAa;EAClC,WAAW,GAAG,cAAc,SAAS;EACrC,yBAAyB,EAAE,QAAQ,QAAQ;CAC5C,CAAA;CAIL,OACE,oBAAC,QAAD;EAAM,WAAW,GAAG,cAAc,SAAS;EACzC,UAAA,oBAAC,OAAD;GAAK,KAAK;GAAQ,KAAK,SAAS,aAAa;GAAM,WAAU;EAAuB,CAAA;CAChF,CAAA;AAEV"}