@keboola/design 13.1.3 → 14.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.
- package/AGENTS.md +68 -6
- package/CHANGELOG.md +196 -0
- package/COMPONENT-API.md +60 -50
- package/dist/{AIKit-BVCWP9Ks.js → AIKit-BRSZ3nY7.js} +2227 -313
- package/dist/AIKit-BRSZ3nY7.js.map +1 -0
- package/dist/{Alert-UI-CIs-1.js → Alert-CZ0dDsuk.js} +7 -7
- package/dist/{Alert-UI-CIs-1.js.map → Alert-CZ0dDsuk.js.map} +1 -1
- package/dist/{AlertModal-mbSnuuka.js → AlertModal-BDle9ZVQ.js} +6 -6
- package/dist/AlertModal-BDle9ZVQ.js.map +1 -0
- package/dist/{AppShell-WSQabK8r.js → AppShell-B03fj1j7.js} +2 -2
- package/dist/{AppShell-WSQabK8r.js.map → AppShell-B03fj1j7.js.map} +1 -1
- package/dist/{AutoSaveTextarea-C5iIr2Ts.js → AutoSaveTextarea-jiqNeeE4.js} +3 -3
- package/dist/{AutoSaveTextarea-C5iIr2Ts.js.map → AutoSaveTextarea-jiqNeeE4.js.map} +1 -1
- package/dist/{Badge-Dz0cj6rj.js → Badge-Ba3epgcI.js} +2 -2
- package/dist/{Badge-Dz0cj6rj.js.map → Badge-Ba3epgcI.js.map} +1 -1
- package/dist/{BrandEditor-P8OZX2hi.js → BrandEditor-CN2HJ_12.js} +155 -17
- package/dist/BrandEditor-CN2HJ_12.js.map +1 -0
- package/dist/{BrandLogo-CKpVSZb6.js → BrandLogo-BfITD0im.js} +2 -2
- package/dist/{BrandLogo-CKpVSZb6.js.map → BrandLogo-BfITD0im.js.map} +1 -1
- package/dist/{Breadcrumb-BUoAZyhO.js → Breadcrumb-BnIlsoIH.js} +62 -20
- package/dist/Breadcrumb-BnIlsoIH.js.map +1 -0
- package/dist/{Button-B21oVcPU.js → Button-D2JqBAq7.js} +199 -7
- package/dist/Button-D2JqBAq7.js.map +1 -0
- package/dist/{Calendar-DFtmZzbF.js → Calendar-BnKi1kPu.js} +4 -4
- package/dist/{Calendar-DFtmZzbF.js.map → Calendar-BnKi1kPu.js.map} +1 -1
- package/dist/{Card-BQmBWHXl.js → Card-Bpc_ZlL4.js} +3 -3
- package/dist/Card-Bpc_ZlL4.js.map +1 -0
- package/dist/{Checkbox-8yIIgY7g.js → Checkbox-uFE8XLT_.js} +6 -6
- package/dist/Checkbox-uFE8XLT_.js.map +1 -0
- package/dist/{Clipboard-_xf6hMDD.js → Clipboard-D-9XOqy4.js} +3 -3
- package/dist/{Clipboard-_xf6hMDD.js.map → Clipboard-D-9XOqy4.js.map} +1 -1
- package/dist/{ClipboardButton-srUgWgwH.js → ClipboardButton-DxvZG_H0.js} +4 -4
- package/dist/{ClipboardButton-srUgWgwH.js.map → ClipboardButton-DxvZG_H0.js.map} +1 -1
- package/dist/{CodeEditor-Df7VVx08.js → CodeEditor-BfRSCKEs.js} +6 -6
- package/dist/{CodeEditor-Df7VVx08.js.map → CodeEditor-BfRSCKEs.js.map} +1 -1
- package/dist/{Collapsible-BQXWEOBC.js → Collapsible-DD4xTL75.js} +2 -2
- package/dist/{Collapsible-BQXWEOBC.js.map → Collapsible-DD4xTL75.js.map} +1 -1
- package/dist/{ColorInput-B3gBZ8Ya.js → ColorInput-CDKH8q_f.js} +5 -5
- package/dist/{ColorInput-B3gBZ8Ya.js.map → ColorInput-CDKH8q_f.js.map} +1 -1
- package/dist/{ColorModeSwitch-D8Cki137.js → ColorModeSwitch-DR6J2U6M.js} +4 -4
- package/dist/{ColorModeSwitch-D8Cki137.js.map → ColorModeSwitch-DR6J2U6M.js.map} +1 -1
- package/dist/{Combobox-BNhW0TDB.js → Combobox-CEesMe2M.js} +246 -44
- package/dist/Combobox-CEesMe2M.js.map +1 -0
- package/dist/{Command-BQPiZCNz.js → Command-T3MLRaen.js} +10 -6
- package/dist/Command-T3MLRaen.js.map +1 -0
- package/dist/{CopyField-Ba7h8MqZ.js → CopyField-CNbCHw9a.js} +4 -4
- package/dist/{CopyField-Ba7h8MqZ.js.map → CopyField-CNbCHw9a.js.map} +1 -1
- package/dist/{DateInput-D0nWUasV.js → DateInput-ClK1lCxz.js} +5 -5
- package/dist/{DateInput-D0nWUasV.js.map → DateInput-ClK1lCxz.js.map} +1 -1
- package/dist/{DatePicker-CtSa9b3V.js → DatePicker-CgHAu9KX.js} +3 -3
- package/dist/{DatePicker-CtSa9b3V.js.map → DatePicker-CgHAu9KX.js.map} +1 -1
- package/dist/{DateRangeInput-i6wE45-V.js → DateRangeInput-DtlAffS1.js} +5 -5
- package/dist/{DateRangeInput-i6wE45-V.js.map → DateRangeInput-DtlAffS1.js.map} +1 -1
- package/dist/{DateRangePicker-BAnuz6vO.js → DateRangePicker-CXpXPMoh.js} +8 -8
- package/dist/{DateRangePicker-BAnuz6vO.js.map → DateRangePicker-CXpXPMoh.js.map} +1 -1
- package/dist/{DiffView-ppTIzh2h.js → DiffView-Dy4z-n-1.js} +3 -3
- package/dist/{DiffView-ppTIzh2h.js.map → DiffView-Dy4z-n-1.js.map} +1 -1
- package/dist/{DropdownMenu-BJGLjpVc.js → DropdownMenu-B1gGvZoh.js} +9 -9
- package/dist/DropdownMenu-B1gGvZoh.js.map +1 -0
- package/dist/{FieldBox-D7DYtX_m.js → FieldBox-BrxLkY9C.js} +8 -6
- package/dist/FieldBox-BrxLkY9C.js.map +1 -0
- package/dist/{FieldItem-BHViBJS3.js → FieldItem-CYvJyjiI.js} +4 -4
- package/dist/{FieldItem-BHViBJS3.js.map → FieldItem-CYvJyjiI.js.map} +1 -1
- package/dist/{FileUpload-Ch2hrIWq.js → FileUpload-D6vPG3WB.js} +9 -9
- package/dist/FileUpload-D6vPG3WB.js.map +1 -0
- package/dist/{Form-VkzfVPyT.js → Form-CD55zJiy.js} +10 -10
- package/dist/{Form-VkzfVPyT.js.map → Form-CD55zJiy.js.map} +1 -1
- package/dist/{FormGroup-CmCppxOn.js → FormGroup-DiYFdEhH.js} +4 -4
- package/dist/{FormGroup-CmCppxOn.js.map → FormGroup-DiYFdEhH.js.map} +1 -1
- package/dist/{FullScreenModal-Cwnm8WdM.js → FullScreenModal-CUuAakh3.js} +20 -6
- package/dist/{FullScreenModal-Cwnm8WdM.js.map → FullScreenModal-CUuAakh3.js.map} +1 -1
- package/dist/HoverCard-BBdPYqEf.js +31 -0
- package/dist/HoverCard-BBdPYqEf.js.map +1 -0
- package/dist/InlineEdit-D5RdunZo.js +370 -0
- package/dist/InlineEdit-D5RdunZo.js.map +1 -0
- package/dist/{InputGroup-CrlMRz4X.js → InputGroup-Dm014ruw.js} +4 -4
- package/dist/{InputGroup-CrlMRz4X.js.map → InputGroup-Dm014ruw.js.map} +1 -1
- package/dist/{Kbd-J4n1J6i4.js → Kbd-3YM7NQO4.js} +3 -3
- package/dist/{Kbd-J4n1J6i4.js.map → Kbd-3YM7NQO4.js.map} +1 -1
- package/dist/MermaidDiagram-CeiOkI60.js +199 -0
- package/dist/MermaidDiagram-CeiOkI60.js.map +1 -0
- package/dist/{Modal-BkSuS9Yz.js → Modal-DMZRswk4.js} +8 -7
- package/dist/Modal-DMZRswk4.js.map +1 -0
- package/dist/{ModalTitle-BxopkIoQ.js → ModalTitle-CTECVgL8.js} +3 -3
- package/dist/ModalTitle-CTECVgL8.js.map +1 -0
- package/dist/{MultiActionButtonGroup-AWLj1Tg7.js → MultiActionButtonGroup-CEv_txvz.js} +5 -5
- package/dist/{MultiActionButtonGroup-AWLj1Tg7.js.map → MultiActionButtonGroup-CEv_txvz.js.map} +1 -1
- package/dist/{Navbar-B_DNpv5s.js → Navbar-CtVYcRFn.js} +18 -14
- package/dist/Navbar-CtVYcRFn.js.map +1 -0
- package/dist/{OtpInput-I8B8Vjdl.js → OtpInput-CY8yCaJk.js} +4 -4
- package/dist/{OtpInput-I8B8Vjdl.js.map → OtpInput-CY8yCaJk.js.map} +1 -1
- package/dist/{PageHeader-CgfyXpf1.js → PageHeader-CL1A6jFM.js} +21 -14
- package/dist/PageHeader-CL1A6jFM.js.map +1 -0
- package/dist/{PageLayout-DiAAILuS.js → PageLayout-C9aXTpqV.js} +2 -2
- package/dist/{PageLayout-DiAAILuS.js.map → PageLayout-C9aXTpqV.js.map} +1 -1
- package/dist/{PageToolbar-C06RKIif.js → PageToolbar-B_e7HGva.js} +6 -6
- package/dist/{PageToolbar-C06RKIif.js.map → PageToolbar-B_e7HGva.js.map} +1 -1
- package/dist/{Pagination-DH3f6LN0.js → Pagination-DDp6PRqf.js} +5 -5
- package/dist/Pagination-DDp6PRqf.js.map +1 -0
- package/dist/{Popconfirm-Dhzn7sy6.js → Popconfirm-BgV6a0sl.js} +5 -5
- package/dist/{Popconfirm-Dhzn7sy6.js.map → Popconfirm-BgV6a0sl.js.map} +1 -1
- package/dist/{Popover-CEk915I1.js → Popover-BU7nGOv-.js} +3 -3
- package/dist/Popover-BU7nGOv-.js.map +1 -0
- package/dist/{RadioGroup-CYEp8Wnx.js → RadioGroup-C8EC3fqO.js} +6 -6
- package/dist/{RadioGroup-CYEp8Wnx.js.map → RadioGroup-C8EC3fqO.js.map} +1 -1
- package/dist/{Resizable-D3vYToZH.js → Resizable-D8zs0kcq.js} +2 -2
- package/dist/{Resizable-D3vYToZH.js.map → Resizable-D8zs0kcq.js.map} +1 -1
- package/dist/{Search-DmkQo716.js → Search-aaUMI4ix.js} +4 -4
- package/dist/{Search-DmkQo716.js.map → Search-aaUMI4ix.js.map} +1 -1
- package/dist/{SearchInput-D3qMkHaW.js → SearchInput-Dxi2GK4n.js} +4 -4
- package/dist/{SearchInput-D3qMkHaW.js.map → SearchInput-Dxi2GK4n.js.map} +1 -1
- package/dist/{SectionNav-I2p2uXTd.js → SectionNav-BnHOMLtE.js} +11 -11
- package/dist/{SectionNav-I2p2uXTd.js.map → SectionNav-BnHOMLtE.js.map} +1 -1
- package/dist/{Select-B4uK0QVm.js → Select-CjQgU_6K.js} +6 -6
- package/dist/Select-CjQgU_6K.js.map +1 -0
- package/dist/{Sheet-D0fAE14T.js → Sheet-utw4_rUa.js} +9 -9
- package/dist/Sheet-utw4_rUa.js.map +1 -0
- package/dist/{Sidebar-D9ytIs8V.js → Sidebar-BAmux2Uj.js} +21 -18
- package/dist/Sidebar-BAmux2Uj.js.map +1 -0
- package/dist/{Slider-B0ou9r0B.js → Slider-DbzzSDRV.js} +5 -5
- package/dist/{Slider-B0ou9r0B.js.map → Slider-DbzzSDRV.js.map} +1 -1
- package/dist/{Stepper-BLkLhfnd.js → Stepper-BBPembeK.js} +3 -3
- package/dist/{Stepper-BLkLhfnd.js.map → Stepper-BBPembeK.js.map} +1 -1
- package/dist/{Switch-DZvNePOm.js → Switch-Dw4tvQls.js} +3 -3
- package/dist/Switch-Dw4tvQls.js.map +1 -0
- package/dist/{Table-BaVT5Tkn.js → Table-CilEvpMq.js} +65 -6
- package/dist/Table-CilEvpMq.js.map +1 -0
- package/dist/{Tabs-CTDmye1N.js → Tabs-C0uvkPHc.js} +5 -5
- package/dist/Tabs-C0uvkPHc.js.map +1 -0
- package/dist/{TextInput-BWYXbfs4.js → TextInput-K2DSDs5O.js} +5 -5
- package/dist/{TextInput-BWYXbfs4.js.map → TextInput-K2DSDs5O.js.map} +1 -1
- package/dist/{ThemeProvider-VF38VfUa.js → ThemeProvider-C8yaKlM1.js} +22 -5
- package/dist/ThemeProvider-C8yaKlM1.js.map +1 -0
- package/dist/{TimePicker-CDGYrRxi.js → TimePicker-DyyV3nw8.js} +2 -2
- package/dist/{TimePicker-CDGYrRxi.js.map → TimePicker-DyyV3nw8.js.map} +1 -1
- package/dist/{Timeline-B-I6sb0M.js → Timeline-DUXgByUE.js} +3 -3
- package/dist/{Timeline-B-I6sb0M.js.map → Timeline-DUXgByUE.js.map} +1 -1
- package/dist/{Toast-NrOdDDru.js → Toast-BGnUL4jV.js} +2 -2
- package/dist/{Toast-NrOdDDru.js.map → Toast-BGnUL4jV.js.map} +1 -1
- package/dist/ToggleAllTooltip-Dlmq-yqS.js +37 -0
- package/dist/ToggleAllTooltip-Dlmq-yqS.js.map +1 -0
- package/dist/{ToggleGroup-Cy_10Mvu.js → ToggleGroup-BOz1yyz6.js} +3 -3
- package/dist/ToggleGroup-BOz1yyz6.js.map +1 -0
- package/dist/{Workbench-DmZzpkj7.js → Workbench-CxgNCs3I.js} +4 -4
- package/dist/{Workbench-DmZzpkj7.js.map → Workbench-CxgNCs3I.js.map} +1 -1
- package/dist/{ZoomableSvg-C65nta_r.js → ZoomableSvg-Dh1OstPN.js} +87 -83
- package/dist/ZoomableSvg-Dh1OstPN.js.map +1 -0
- package/dist/charts.js +1 -1
- package/dist/classNames-DcGnTh2N.js +21 -0
- package/dist/classNames-DcGnTh2N.js.map +1 -0
- package/dist/editors.js +6 -6
- package/dist/flint.js +10 -45
- package/dist/flint.js.map +1 -1
- package/dist/highlightCode-D354tCXO.js +81 -0
- package/dist/highlightCode-D354tCXO.js.map +1 -0
- package/dist/{icons-wcA70iQx.js → icons-ZIeZXXS7.js} +37 -4
- package/dist/icons-ZIeZXXS7.js.map +1 -0
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +2 -2
- package/dist/{index-B7k-09i1.d.ts → index-D-itZ3VP.d.ts} +14 -3
- package/dist/index.d.ts +942 -424
- package/dist/index.js +72 -70
- package/dist/internal/blocks/AIKit.js +2 -2
- package/dist/internal/blocks/AppShell.js +1 -1
- package/dist/internal/blocks/AuthLayout.js +2 -2
- package/dist/internal/blocks/AutoSaveTextarea.js +1 -1
- package/dist/internal/blocks/BrandEditor.js +1 -1
- package/dist/internal/blocks/ChartPanel.js +2 -2
- package/dist/internal/blocks/ChipEditor.js +4 -4
- package/dist/internal/blocks/ClipboardButton.js +1 -1
- package/dist/internal/blocks/ColorInput.js +1 -1
- package/dist/internal/blocks/ColorModeSwitch.js +1 -1
- package/dist/internal/blocks/Command.js +1 -1
- package/dist/internal/blocks/CopyField.js +1 -1
- package/dist/internal/blocks/DashboardHero.js +2 -2
- package/dist/internal/blocks/DashboardHero.js.map +1 -1
- package/dist/internal/blocks/DateInput.js +1 -1
- package/dist/internal/blocks/DateRangeInput.js +1 -1
- package/dist/internal/blocks/DiagramShared/DiagramSkeleton.js.map +1 -1
- package/dist/internal/blocks/EmptyConfigurationActionCard.js +1 -1
- package/dist/internal/blocks/ExportMenu.js +4 -4
- package/dist/internal/blocks/FacebookButton.js +66 -0
- package/dist/internal/blocks/FacebookButton.js.map +1 -0
- package/dist/internal/blocks/Form/connectors/ComboboxField.js +2 -2
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +1 -1
- package/dist/internal/blocks/Form.js +1 -1
- package/dist/internal/blocks/FormGroup.js +1 -1
- package/dist/internal/blocks/GoogleButton.js +2 -2
- package/dist/internal/blocks/InlineEdit.js +2 -0
- package/dist/internal/blocks/MicrosoftButton.js +2 -2
- package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
- package/dist/internal/blocks/MultiCombobox.js +204 -68
- package/dist/internal/blocks/MultiCombobox.js.map +1 -1
- package/dist/internal/blocks/NumberInput.js +1 -1
- package/dist/internal/blocks/OtpInput.js +1 -1
- package/dist/internal/blocks/PageHeader.js +1 -1
- package/dist/internal/blocks/PageLayout.js +1 -1
- package/dist/internal/blocks/PageToolbar.js +1 -1
- package/dist/internal/blocks/PasswordInput.js +3 -3
- package/dist/internal/blocks/SearchInput.js +1 -1
- package/dist/internal/blocks/SearchInputWithNavigation.js +5 -5
- package/dist/internal/blocks/SectionNav.js +1 -1
- package/dist/internal/blocks/SplitButton.js +6 -5
- package/dist/internal/blocks/SplitButton.js.map +1 -1
- package/dist/internal/blocks/StatCard.js +2 -2
- package/dist/internal/blocks/TextInput.js +1 -1
- package/dist/internal/blocks/Textarea.js +1 -1
- package/dist/internal/blocks/TimeInput.js +4 -4
- package/dist/internal/components/Alert.js +1 -1
- package/dist/internal/components/AlertModal.js +1 -1
- package/dist/internal/components/Avatar.js +2 -2
- package/dist/internal/components/Badge.js +1 -1
- package/dist/internal/components/BrandLogo.js +1 -1
- package/dist/internal/components/Breadcrumb.js +1 -1
- package/dist/internal/components/Button.js +1 -1
- package/dist/internal/components/ButtonGroup.js +1 -1
- package/dist/internal/components/Calendar.js +1 -1
- package/dist/internal/components/Card.js +1 -1
- package/dist/internal/components/Checkbox.js +1 -1
- package/dist/internal/components/Clipboard.js +1 -1
- package/dist/internal/components/Collapsible.js +1 -1
- package/dist/internal/components/CollapsiblePanel.js +5 -5
- package/dist/internal/components/CollapsiblePanel.js.map +1 -1
- package/dist/internal/components/Combobox.js +1 -1
- package/dist/internal/components/DatePicker.js +1 -1
- package/dist/internal/components/DateRangePicker.js +1 -1
- package/dist/internal/components/DiffView.js +1 -1
- package/dist/internal/components/DotsLoader.js +1 -1
- package/dist/internal/components/DropdownMenu.js +1 -1
- package/dist/internal/components/FileUpload.js +1 -1
- package/dist/internal/components/FullScreenModal.js +1 -1
- package/dist/internal/components/HoverCard.js +1 -1
- package/dist/internal/components/InputGroup.js +1 -1
- package/dist/internal/components/Kbd.js +1 -1
- package/dist/internal/components/Label.js +2 -2
- package/dist/internal/components/Label.js.map +1 -1
- package/dist/internal/components/Link.js +1 -1
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +2 -2
- package/dist/internal/components/Modal.js +1 -1
- package/dist/internal/components/Navbar.js +1 -1
- package/dist/internal/components/Pagination.js +1 -1
- package/dist/internal/components/PanelWithDetails.js +3 -3
- package/dist/internal/components/Popconfirm.js +1 -1
- package/dist/internal/components/Popover.js +1 -1
- package/dist/internal/components/Progress.js +1 -1
- package/dist/internal/components/RadioGroup.js +1 -1
- package/dist/internal/components/Resizable.js +1 -1
- package/dist/internal/components/ScrollArea.js +1 -1
- package/dist/internal/components/Search.js +1 -1
- package/dist/internal/components/Select.js +1 -1
- package/dist/internal/components/Separator.js +1 -1
- package/dist/internal/components/Sheet.js +1 -1
- package/dist/internal/components/Sidebar.js +1 -1
- package/dist/internal/components/Skeleton/Skeleton.js +2 -2
- package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/internal/components/Skeleton/SkeletonList.js +1 -1
- package/dist/internal/components/Slider.js +1 -1
- package/dist/internal/components/SpotlightBackdrop.js +1 -1
- package/dist/internal/components/Stepper.js +1 -1
- package/dist/internal/components/Switch.js +1 -1
- package/dist/internal/components/Table.js +1 -1
- package/dist/internal/components/Tabs.js +1 -1
- package/dist/internal/components/ThemeProvider.js +1 -1
- package/dist/internal/components/TimePicker.js +1 -1
- package/dist/internal/components/Timeline.js +1 -1
- package/dist/internal/components/Toast.js +2 -2
- package/dist/internal/components/Toggle.js +5 -5
- package/dist/internal/components/Toggle.js.map +1 -1
- package/dist/internal/components/ToggleGroup.js +1 -1
- package/dist/internal/components/Tooltip.js +1 -1
- package/dist/internal/components/Truncated.js +2 -2
- package/dist/internal/components/Workbench.js +1 -1
- package/dist/internal/components/ZoomableSvg.js +1 -1
- package/dist/internal/utils.js +2 -2
- package/dist/markdown-editor.js +14 -14
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.d.ts +1 -2
- package/dist/mermaid.js +1 -1
- package/dist/rjsf.js +101 -14
- package/dist/rjsf.js.map +1 -1
- package/dist/{styles-DBGXH5-_.js → styles-BDA5rQz3.js} +6 -6
- package/dist/styles-BDA5rQz3.js.map +1 -0
- package/dist/{styles-gzcjOyKv.js → styles-YQdM7G8c.js} +3 -3
- package/dist/{styles-gzcjOyKv.js.map → styles-YQdM7G8c.js.map} +1 -1
- package/dist/styles.css +1 -1
- package/dist/svgCache-Dhmbe-7i.js +26 -0
- package/dist/svgCache-Dhmbe-7i.js.map +1 -0
- package/dist/svgTransforms-Hnvev3Vs.js +38 -0
- package/dist/svgTransforms-Hnvev3Vs.js.map +1 -0
- package/dist/testing.js +1 -1
- package/dist/{themeTokens-7DEab0kp.js → themeTokens-l2Fsfcs7.js} +3 -12
- package/dist/themeTokens-l2Fsfcs7.js.map +1 -0
- package/dist/{toast-CyXEdaCZ.js → toast-D6Z6MOB5.js} +5 -5
- package/dist/toast-D6Z6MOB5.js.map +1 -0
- package/dist/{utils-Bd28bWgm.js → utils-LQ4jJA-9.js} +21 -5
- package/dist/utils-LQ4jJA-9.js.map +1 -0
- package/dist/vega.js +1 -1
- package/dist/vegaTheme-BrmVoPEz.js +49 -0
- package/dist/vegaTheme-BrmVoPEz.js.map +1 -0
- package/dist/{vegaTheme-VQMWTlBw.js → vegaTokens-Ce07C0DH.js} +36 -44
- package/dist/vegaTokens-Ce07C0DH.js.map +1 -0
- package/package.json +4 -4
- package/src/styles.css +183 -4
- package/src/theme.css +47 -3
- package/dist/AIKit-BVCWP9Ks.js.map +0 -1
- package/dist/AlertModal-mbSnuuka.js.map +0 -1
- package/dist/BrandEditor-P8OZX2hi.js.map +0 -1
- package/dist/Breadcrumb-BUoAZyhO.js.map +0 -1
- package/dist/Button-B21oVcPU.js.map +0 -1
- package/dist/Card-BQmBWHXl.js.map +0 -1
- package/dist/Checkbox-8yIIgY7g.js.map +0 -1
- package/dist/Combobox-BNhW0TDB.js.map +0 -1
- package/dist/Command-BQPiZCNz.js.map +0 -1
- package/dist/DiagramSource-C5_d8Gdj.js +0 -11
- package/dist/DiagramSource-C5_d8Gdj.js.map +0 -1
- package/dist/DropdownMenu-BJGLjpVc.js.map +0 -1
- package/dist/FieldBox-D7DYtX_m.js.map +0 -1
- package/dist/FileUpload-Ch2hrIWq.js.map +0 -1
- package/dist/HoverCard-B8OKu9XZ.js +0 -31
- package/dist/HoverCard-B8OKu9XZ.js.map +0 -1
- package/dist/MermaidDiagram-B30x2yV7.js +0 -302
- package/dist/MermaidDiagram-B30x2yV7.js.map +0 -1
- package/dist/Modal-BkSuS9Yz.js.map +0 -1
- package/dist/ModalTitle-BxopkIoQ.js.map +0 -1
- package/dist/Navbar-B_DNpv5s.js.map +0 -1
- package/dist/PageHeader-CgfyXpf1.js.map +0 -1
- package/dist/Pagination-DH3f6LN0.js.map +0 -1
- package/dist/Popover-CEk915I1.js.map +0 -1
- package/dist/Select-B4uK0QVm.js.map +0 -1
- package/dist/Sheet-D0fAE14T.js.map +0 -1
- package/dist/Sidebar-D9ytIs8V.js.map +0 -1
- package/dist/Switch-DZvNePOm.js.map +0 -1
- package/dist/Table-BaVT5Tkn.js.map +0 -1
- package/dist/Tabs-CTDmye1N.js.map +0 -1
- package/dist/ThemeProvider-VF38VfUa.js.map +0 -1
- package/dist/ToggleGroup-Cy_10Mvu.js.map +0 -1
- package/dist/ZoomableSvg-C65nta_r.js.map +0 -1
- package/dist/classNames-BzrkDnOD.js +0 -9
- package/dist/classNames-BzrkDnOD.js.map +0 -1
- package/dist/icons-wcA70iQx.js.map +0 -1
- package/dist/styles-DBGXH5-_.js.map +0 -1
- package/dist/svgTransforms-Dw2hRA-i.js +0 -51
- package/dist/svgTransforms-Dw2hRA-i.js.map +0 -1
- package/dist/themeTokens-7DEab0kp.js.map +0 -1
- package/dist/toast-CyXEdaCZ.js.map +0 -1
- package/dist/utils-Bd28bWgm.js.map +0 -1
- package/dist/vegaTheme-VQMWTlBw.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Button } from "./Button-
|
|
2
|
-
import { ToggleGroup } from "./ToggleGroup-
|
|
1
|
+
import { Button } from "./Button-D2JqBAq7.js";
|
|
2
|
+
import { ToggleGroup } from "./ToggleGroup-BOz1yyz6.js";
|
|
3
3
|
import { Label } from "./internal/components/Label.js";
|
|
4
|
-
import { TextInput } from "./TextInput-
|
|
5
|
-
import { Slider } from "./Slider-
|
|
6
|
-
import { Select } from "./Select-
|
|
7
|
-
import { Badge } from "./Badge-
|
|
8
|
-
import { ColorInput } from "./ColorInput-
|
|
4
|
+
import { TextInput } from "./TextInput-K2DSDs5O.js";
|
|
5
|
+
import { Slider } from "./Slider-DbzzSDRV.js";
|
|
6
|
+
import { Select } from "./Select-CjQgU_6K.js";
|
|
7
|
+
import { Badge } from "./Badge-Ba3epgcI.js";
|
|
8
|
+
import { ColorInput } from "./ColorInput-CDKH8q_f.js";
|
|
9
9
|
import { Textarea } from "./internal/blocks/Textarea.js";
|
|
10
|
-
import { Collapsible } from "./Collapsible-
|
|
10
|
+
import { Collapsible } from "./Collapsible-DD4xTL75.js";
|
|
11
11
|
import { useId, useMemo } from "react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { keboola } from "@keboola/brand-registry";
|
|
14
13
|
import DOMPurify from "dompurify";
|
|
14
|
+
import { keboola } from "@keboola/brand-registry";
|
|
15
15
|
//#region src/blocks/BrandEditor/color.ts
|
|
16
16
|
const hexToChannels = (hex) => {
|
|
17
17
|
let h = hex.trim().replace(/^#/, "");
|
|
@@ -197,6 +197,23 @@ const COLOR_LABELS = {
|
|
|
197
197
|
info: "Info",
|
|
198
198
|
infoForeground: "Info foreground"
|
|
199
199
|
};
|
|
200
|
+
const STATE_COLOR_LABELS = {
|
|
201
|
+
hover: "Hover",
|
|
202
|
+
hoverForeground: "Hover foreground",
|
|
203
|
+
pressed: "Pressed",
|
|
204
|
+
selected: "Selected",
|
|
205
|
+
selectedForeground: "Selected foreground",
|
|
206
|
+
scrim: "Scrim (modal backdrop)"
|
|
207
|
+
};
|
|
208
|
+
const STATE_COLOR_DEFAULTS = {
|
|
209
|
+
hover: "Follows accent (menus, table rows: their own tint)",
|
|
210
|
+
hoverForeground: "Follows accent foreground",
|
|
211
|
+
pressed: "Reserved: no component reads it yet",
|
|
212
|
+
selected: "Follows accent",
|
|
213
|
+
selectedForeground: "Follows accent foreground",
|
|
214
|
+
scrim: "rgb(0 0 0 / 0.5)"
|
|
215
|
+
};
|
|
216
|
+
const DEFAULT_DISABLED_OPACITY = "0.5";
|
|
200
217
|
const SIDEBAR_LABELS = {
|
|
201
218
|
sidebar: "Sidebar",
|
|
202
219
|
sidebarForeground: "Foreground",
|
|
@@ -207,6 +224,12 @@ const SIDEBAR_LABELS = {
|
|
|
207
224
|
sidebarBorder: "Border",
|
|
208
225
|
sidebarRing: "Ring"
|
|
209
226
|
};
|
|
227
|
+
const SIDEBAR_STATE_LABELS = {
|
|
228
|
+
sidebarHover: "Hover",
|
|
229
|
+
sidebarHoverForeground: "Hover foreground",
|
|
230
|
+
sidebarSelected: "Selected (current page)",
|
|
231
|
+
sidebarSelectedForeground: "Selected foreground"
|
|
232
|
+
};
|
|
210
233
|
const CHART_LABELS = {
|
|
211
234
|
chart1: "Chart 1",
|
|
212
235
|
chart2: "Chart 2",
|
|
@@ -235,6 +258,8 @@ const MOTION_LABELS = {
|
|
|
235
258
|
easing: "Easing"
|
|
236
259
|
};
|
|
237
260
|
const COLOR_SLOTS = Object.keys(COLOR_LABELS);
|
|
261
|
+
const STATE_COLOR_SLOTS = Object.keys(STATE_COLOR_LABELS);
|
|
262
|
+
const SIDEBAR_STATE_SLOTS = Object.keys(SIDEBAR_STATE_LABELS);
|
|
238
263
|
const SIDEBAR_SLOTS = Object.keys(SIDEBAR_LABELS);
|
|
239
264
|
const CHART_SLOTS = Object.keys(CHART_LABELS);
|
|
240
265
|
const WEIGHT_SLOTS = Object.keys(WEIGHT_LABELS);
|
|
@@ -244,7 +269,12 @@ const MOTION_SLOTS = Object.keys(MOTION_LABELS);
|
|
|
244
269
|
const RADIUS_SIZES = [
|
|
245
270
|
"sm",
|
|
246
271
|
"md",
|
|
247
|
-
"lg"
|
|
272
|
+
"lg",
|
|
273
|
+
"card",
|
|
274
|
+
"popover",
|
|
275
|
+
"modal",
|
|
276
|
+
"sheet",
|
|
277
|
+
"toast"
|
|
248
278
|
];
|
|
249
279
|
const A11Y_PAIRS = [
|
|
250
280
|
{
|
|
@@ -300,6 +330,11 @@ const DEFAULT_RADII = {
|
|
|
300
330
|
md: "0.375rem",
|
|
301
331
|
lg: "0.5rem"
|
|
302
332
|
};
|
|
333
|
+
const surfaceRadiusFallback = (size, radii) => {
|
|
334
|
+
if (size === "popover") return "1rem";
|
|
335
|
+
if (size === "modal") return "1.5rem";
|
|
336
|
+
return radii.lg;
|
|
337
|
+
};
|
|
303
338
|
const DEFAULT_CHART = {
|
|
304
339
|
light: {
|
|
305
340
|
chart1: "31 143 255",
|
|
@@ -420,6 +455,42 @@ const BrandEditor = ({ value, onChange, colorScheme = "light", onColorSchemeChan
|
|
|
420
455
|
}
|
|
421
456
|
});
|
|
422
457
|
};
|
|
458
|
+
const setStateColor = (slot, color) => {
|
|
459
|
+
const next = color.trim() || void 0;
|
|
460
|
+
if (colorScheme === "light") {
|
|
461
|
+
onChange({
|
|
462
|
+
...value,
|
|
463
|
+
theme: {
|
|
464
|
+
...theme,
|
|
465
|
+
colors: {
|
|
466
|
+
...theme.colors,
|
|
467
|
+
[slot]: next
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
onChange({
|
|
474
|
+
...value,
|
|
475
|
+
theme: {
|
|
476
|
+
...theme,
|
|
477
|
+
colorsDark: {
|
|
478
|
+
...theme.colorsDark,
|
|
479
|
+
[slot]: next
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
};
|
|
484
|
+
const setDisabledOpacity = (disabled) => onChange({
|
|
485
|
+
...value,
|
|
486
|
+
theme: {
|
|
487
|
+
...theme,
|
|
488
|
+
opacity: {
|
|
489
|
+
...theme.opacity,
|
|
490
|
+
disabled
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
});
|
|
423
494
|
const setSidebarColor = (slot, channels) => {
|
|
424
495
|
if (colorScheme === "light") {
|
|
425
496
|
const base = theme.colors?.sidebar ?? DEFAULT_SIDEBAR.light;
|
|
@@ -453,6 +524,24 @@ const BrandEditor = ({ value, onChange, colorScheme = "light", onColorSchemeChan
|
|
|
453
524
|
}
|
|
454
525
|
});
|
|
455
526
|
};
|
|
527
|
+
const setSidebarState = (slot, color) => {
|
|
528
|
+
const next = color.trim() || void 0;
|
|
529
|
+
const palette = colorScheme === "light" ? "colors" : "colorsDark";
|
|
530
|
+
const sidebar = {
|
|
531
|
+
...theme[palette]?.sidebar ?? DEFAULT_SIDEBAR[colorScheme],
|
|
532
|
+
[slot]: next
|
|
533
|
+
};
|
|
534
|
+
onChange({
|
|
535
|
+
...value,
|
|
536
|
+
theme: {
|
|
537
|
+
...theme,
|
|
538
|
+
[palette]: {
|
|
539
|
+
...theme[palette],
|
|
540
|
+
sidebar
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
};
|
|
456
545
|
const setChart = (slot, channels) => {
|
|
457
546
|
const chart = {
|
|
458
547
|
...chartColors ?? DEFAULT_CHART[colorScheme],
|
|
@@ -623,6 +712,49 @@ const BrandEditor = ({ value, onChange, colorScheme = "light", onColorSchemeChan
|
|
|
623
712
|
})
|
|
624
713
|
})]
|
|
625
714
|
}),
|
|
715
|
+
/* @__PURE__ */ jsxs(ControlSection, {
|
|
716
|
+
title: "Interaction states",
|
|
717
|
+
children: [
|
|
718
|
+
/* @__PURE__ */ jsxs("p", {
|
|
719
|
+
className: "tw:m-0 tw:text-xs tw:text-muted-foreground",
|
|
720
|
+
children: [
|
|
721
|
+
"Hover, pressed, selected and backdrop colours for the ",
|
|
722
|
+
colorScheme,
|
|
723
|
+
" palette, as any CSS colour so a wash can be translucent. Empty follows the default."
|
|
724
|
+
]
|
|
725
|
+
}),
|
|
726
|
+
/* @__PURE__ */ jsx("div", {
|
|
727
|
+
className: "tw:flex tw:flex-col tw:gap-2",
|
|
728
|
+
children: STATE_COLOR_SLOTS.map((slot) => /* @__PURE__ */ jsx(TextField, {
|
|
729
|
+
id: `${baseId}state-${colorScheme}-${slot}`,
|
|
730
|
+
label: STATE_COLOR_LABELS[slot],
|
|
731
|
+
value: coreColors?.[slot] ?? "",
|
|
732
|
+
placeholder: STATE_COLOR_DEFAULTS[slot],
|
|
733
|
+
onChange: (next) => setStateColor(slot, next)
|
|
734
|
+
}, slot))
|
|
735
|
+
}),
|
|
736
|
+
/* @__PURE__ */ jsxs("div", {
|
|
737
|
+
className: "tw:flex tw:flex-col tw:gap-1",
|
|
738
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
739
|
+
className: "tw:flex tw:items-center tw:justify-between",
|
|
740
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
741
|
+
className: "tw:text-xs tw:font-normal tw:text-foreground",
|
|
742
|
+
children: "Disabled opacity"
|
|
743
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
744
|
+
className: "tw:text-xs tw:tabular-nums tw:text-muted-foreground",
|
|
745
|
+
children: theme.opacity?.disabled ?? DEFAULT_DISABLED_OPACITY
|
|
746
|
+
})]
|
|
747
|
+
}), /* @__PURE__ */ jsx(Slider, {
|
|
748
|
+
"aria-label": "Disabled opacity",
|
|
749
|
+
min: .2,
|
|
750
|
+
max: .8,
|
|
751
|
+
step: .05,
|
|
752
|
+
value: [Number(theme.opacity?.disabled ?? DEFAULT_DISABLED_OPACITY)],
|
|
753
|
+
onValueChange: (values) => setDisabledOpacity((values[0] ?? .5).toFixed(2))
|
|
754
|
+
})]
|
|
755
|
+
})
|
|
756
|
+
]
|
|
757
|
+
}),
|
|
626
758
|
/* @__PURE__ */ jsx(ControlSection, {
|
|
627
759
|
title: "Sidebar colors",
|
|
628
760
|
children: /* @__PURE__ */ jsxs(Collapsible, {
|
|
@@ -639,14 +771,20 @@ const BrandEditor = ({ value, onChange, colorScheme = "light", onColorSchemeChan
|
|
|
639
771
|
")"
|
|
640
772
|
]
|
|
641
773
|
})
|
|
642
|
-
}), /* @__PURE__ */
|
|
774
|
+
}), /* @__PURE__ */ jsxs(Collapsible.Content, {
|
|
643
775
|
className: "tw:flex tw:flex-col tw:gap-2",
|
|
644
|
-
children: SIDEBAR_SLOTS.map((slot) => /* @__PURE__ */ jsx(ColorField, {
|
|
776
|
+
children: [SIDEBAR_SLOTS.map((slot) => /* @__PURE__ */ jsx(ColorField, {
|
|
645
777
|
id: `${baseId}sidebar-${colorScheme}-${slot}`,
|
|
646
778
|
label: SIDEBAR_LABELS[slot],
|
|
647
779
|
channels: sidebarColors?.[slot] ?? DEFAULT_SIDEBAR[colorScheme][slot],
|
|
648
780
|
onChange: (channels) => setSidebarColor(slot, channels)
|
|
649
|
-
}, slot))
|
|
781
|
+
}, slot)), SIDEBAR_STATE_SLOTS.map((slot) => /* @__PURE__ */ jsx(TextField, {
|
|
782
|
+
id: `${baseId}sidebar-state-${colorScheme}-${slot}`,
|
|
783
|
+
label: `Sidebar ${SIDEBAR_STATE_LABELS[slot].toLowerCase()}`,
|
|
784
|
+
value: sidebarColors?.[slot] ?? "",
|
|
785
|
+
placeholder: "Follows sidebar accent",
|
|
786
|
+
onChange: (next) => setSidebarState(slot, next)
|
|
787
|
+
}, slot))]
|
|
650
788
|
})]
|
|
651
789
|
})
|
|
652
790
|
}),
|
|
@@ -672,7 +810,7 @@ const BrandEditor = ({ value, onChange, colorScheme = "light", onColorSchemeChan
|
|
|
672
810
|
/* @__PURE__ */ jsx(ControlSection, {
|
|
673
811
|
title: "Radius",
|
|
674
812
|
children: RADIUS_SIZES.map((size) => {
|
|
675
|
-
const current = radii[size];
|
|
813
|
+
const current = radii[size] ?? surfaceRadiusFallback(size, radii);
|
|
676
814
|
const px = lengthToPx(current);
|
|
677
815
|
return /* @__PURE__ */ jsxs("div", {
|
|
678
816
|
className: "tw:flex tw:flex-col tw:gap-1",
|
|
@@ -683,11 +821,11 @@ const BrandEditor = ({ value, onChange, colorScheme = "light", onColorSchemeChan
|
|
|
683
821
|
children: size
|
|
684
822
|
}), /* @__PURE__ */ jsx("span", {
|
|
685
823
|
className: "tw:text-xs tw:tabular-nums tw:text-muted-foreground",
|
|
686
|
-
children:
|
|
824
|
+
children: current
|
|
687
825
|
})]
|
|
688
826
|
}), /* @__PURE__ */ jsx(Slider, {
|
|
689
827
|
min: 0,
|
|
690
|
-
max:
|
|
828
|
+
max: 32,
|
|
691
829
|
step: 1,
|
|
692
830
|
value: [px],
|
|
693
831
|
onValueChange: (values) => setRadius(size, pxToLength(values[0] ?? 0, current))
|
|
@@ -900,4 +1038,4 @@ const BrandEditor = ({ value, onChange, colorScheme = "light", onColorSchemeChan
|
|
|
900
1038
|
//#endregion
|
|
901
1039
|
export { BrandEditor, DEFAULT_FALLBACK_FONT, DEFAULT_FONT_OPTIONS, channelsToHex, contrastRatio, hexToChannels, wcagLevel };
|
|
902
1040
|
|
|
903
|
-
//# sourceMappingURL=BrandEditor-
|
|
1041
|
+
//# sourceMappingURL=BrandEditor-CN2HJ_12.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandEditor-CN2HJ_12.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 sizing=\"medium\"\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 sizing=\"small\"\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,KAAK,CAAC,CACZ,KAAK,MAAM,OAAO,CAAC,KAAK,CAAC;CAC5B,MAAM,OAAO,MAAc,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CACr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,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,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "./classNames-
|
|
1
|
+
import { cn } from "./classNames-DcGnTh2N.js";
|
|
2
2
|
import { useTheme } from "./context-U293r3v-.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -43,4 +43,4 @@ const BrandLogo = ({ variant = "wordmark", className, label }) => {
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { BrandLogo };
|
|
45
45
|
|
|
46
|
-
//# sourceMappingURL=BrandLogo-
|
|
46
|
+
//# sourceMappingURL=BrandLogo-BfITD0im.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrandLogo-
|
|
1
|
+
{"version":3,"file":"BrandLogo-BfITD0im.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,11 +1,18 @@
|
|
|
1
|
-
import { cn } from "./classNames-
|
|
2
|
-
import { ChevronDown, ChevronRight, Ellipsis } from "./icons-
|
|
3
|
-
import { Popover } from "./Popover-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { cn } from "./classNames-DcGnTh2N.js";
|
|
2
|
+
import { ChevronDown, ChevronRight, Ellipsis } from "./icons-ZIeZXXS7.js";
|
|
3
|
+
import { Popover } from "./Popover-BU7nGOv-.js";
|
|
4
|
+
import { ToggleAllTooltip, isToggleAllClick } from "./ToggleAllTooltip-Dlmq-yqS.js";
|
|
5
|
+
import { SearchInput } from "./SearchInput-Dxi2GK4n.js";
|
|
6
6
|
import { Children, createContext, isValidElement, use, useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
//#region src/components/Breadcrumb/BreadcrumbDropdownContext.ts
|
|
10
|
+
const NO_TOGGLES = {};
|
|
11
|
+
/** Records `toggle` under `scope`, keeping the toggles made without a search. */
|
|
12
|
+
const withToggle = (toggles, scope, toggle) => ({
|
|
13
|
+
...toggles[""] && { "": toggles[""] },
|
|
14
|
+
[scope]: toggle
|
|
15
|
+
});
|
|
9
16
|
const BreadcrumbDropdownContext = createContext(null);
|
|
10
17
|
const matchesQuery = (text, query) => text.toLowerCase().includes(query);
|
|
11
18
|
/** Text content of a React tree — the default filter text when no `textValue` is given. */
|
|
@@ -40,11 +47,11 @@ const useMatchRegistry = () => {
|
|
|
40
47
|
//#endregion
|
|
41
48
|
//#region src/components/Breadcrumb/BreadcrumbDropdownGroup.tsx
|
|
42
49
|
const headerClass = cn("tw:flex", "tw:w-full", "tw:items-center", "tw:gap-2", "tw:box-border", "tw:rounded-md", "tw:border-none", "tw:bg-transparent", "tw:px-2", "tw:py-1.5", "tw:text-left", "tw:text-sm", "tw:font-medium", "tw:text-foreground", "tw:min-w-0", "tw:overflow-hidden", "tw:[&_svg:not([class*='tw:size-'])]:size-4", "tw:[&_svg]:shrink-0");
|
|
43
|
-
const collapsibleHeaderClass = cn("tw:cursor-pointer", "tw:hover:bg-
|
|
50
|
+
const collapsibleHeaderClass = cn("tw:cursor-pointer", "tw:hover:bg-hover", "tw:focus-visible:outline-hidden", "tw:focus-visible:ring-2", "tw:focus-visible:ring-ring/50");
|
|
44
51
|
/**
|
|
45
52
|
* A labelled group of `Breadcrumb.Dropdown.Item`s (e.g. one bucket with its tables). The group
|
|
46
53
|
* hides itself when neither its label nor any child matches the filter query; an active query
|
|
47
|
-
*
|
|
54
|
+
* opens collapsible groups, and a fold made under it lasts until the query changes. Non-empty `collapsible` groups toggle their items behind the
|
|
48
55
|
* header with an animated expand / collapse; a `collapsible` group with no items renders a
|
|
49
56
|
* non-interactive, greyed header that can't toggle.
|
|
50
57
|
*/
|
|
@@ -53,9 +60,13 @@ const BreadcrumbDropdownGroup = ({ label, textValue, collapsible = false, defaul
|
|
|
53
60
|
if (!parent) throw new Error("Breadcrumb.Dropdown.Group must be rendered inside Breadcrumb.Dropdown");
|
|
54
61
|
const id = useId();
|
|
55
62
|
const { register: registerChild, anyVisible } = useMatchRegistry();
|
|
56
|
-
const [
|
|
63
|
+
const [own, setOwn] = useState(NO_TOGGLES);
|
|
57
64
|
const text = textValue ?? getNodeText(label);
|
|
58
65
|
const filtering = !parent.filterDisabled && !!parent.query;
|
|
66
|
+
const scope = filtering ? parent.query : "";
|
|
67
|
+
const ownToggle = own[scope];
|
|
68
|
+
const allToggle = parent.allExpanded[scope];
|
|
69
|
+
const toggle = allToggle && (!ownToggle || allToggle.at > ownToggle.at) ? allToggle : ownToggle;
|
|
59
70
|
const labelMatched = filtering && matchesQuery(text, parent.query);
|
|
60
71
|
const visible = !filtering || parent.forceVisible || labelMatched || anyVisible;
|
|
61
72
|
useEffect(() => parent.register(id, visible), [
|
|
@@ -68,13 +79,16 @@ const BreadcrumbDropdownGroup = ({ label, textValue, collapsible = false, defaul
|
|
|
68
79
|
forceVisible: parent.forceVisible || labelMatched,
|
|
69
80
|
filterDisabled: parent.filterDisabled,
|
|
70
81
|
register: registerChild,
|
|
71
|
-
close: parent.close
|
|
82
|
+
close: parent.close,
|
|
83
|
+
allExpanded: parent.allExpanded,
|
|
84
|
+
setAllExpanded: parent.setAllExpanded,
|
|
85
|
+
stamp: parent.stamp
|
|
72
86
|
}), [
|
|
73
87
|
parent,
|
|
74
88
|
labelMatched,
|
|
75
89
|
registerChild
|
|
76
90
|
]);
|
|
77
|
-
const isExpanded = !collapsible || expanded ||
|
|
91
|
+
const isExpanded = !collapsible || (toggle ? toggle.expanded : filtering || defaultExpanded);
|
|
78
92
|
const isEmpty = Children.count(children) === 0;
|
|
79
93
|
return /* @__PURE__ */ jsxs("div", {
|
|
80
94
|
className: cn("tw:flex tw:flex-col", className),
|
|
@@ -87,8 +101,17 @@ const BreadcrumbDropdownGroup = ({ label, textValue, collapsible = false, defaul
|
|
|
87
101
|
type: "button",
|
|
88
102
|
"aria-expanded": isExpanded,
|
|
89
103
|
className: cn(headerClass, collapsibleHeaderClass),
|
|
90
|
-
onClick: () =>
|
|
91
|
-
|
|
104
|
+
onClick: (event) => isToggleAllClick(event) ? parent.setAllExpanded(!isExpanded, scope) : setOwn((prev) => withToggle(prev, scope, {
|
|
105
|
+
expanded: !isExpanded,
|
|
106
|
+
at: parent.stamp()
|
|
107
|
+
})),
|
|
108
|
+
children: [/* @__PURE__ */ jsx(ToggleAllTooltip, {
|
|
109
|
+
expanded: isExpanded,
|
|
110
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
111
|
+
className: "tw:inline-flex",
|
|
112
|
+
children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, {}) : /* @__PURE__ */ jsx(ChevronRight, {})
|
|
113
|
+
})
|
|
114
|
+
}), label]
|
|
92
115
|
}) : /* @__PURE__ */ jsx("span", {
|
|
93
116
|
className: headerClass,
|
|
94
117
|
children: label
|
|
@@ -115,7 +138,7 @@ const BreadcrumbDropdownGroup = ({ label, textValue, collapsible = false, defaul
|
|
|
115
138
|
};
|
|
116
139
|
//#endregion
|
|
117
140
|
//#region src/components/Breadcrumb/BreadcrumbDropdownItem.tsx
|
|
118
|
-
const itemClass = cn("tw:flex", "tw:w-full", "tw:items-center", "tw:gap-2", "tw:box-border", "tw:rounded-md", "tw:border-none", "tw:bg-transparent", "tw:px-2", "tw:py-1.5", "tw:cursor-pointer", "tw:text-left", "tw:text-sm", "tw:font-normal", "tw:text-foreground", "tw:no-underline", "tw:min-w-0", "tw:overflow-hidden", "tw:hover:bg-
|
|
141
|
+
const itemClass = cn("tw:flex", "tw:w-full", "tw:items-center", "tw:gap-2", "tw:box-border", "tw:rounded-md", "tw:border-none", "tw:bg-transparent", "tw:px-2", "tw:py-1.5", "tw:cursor-pointer", "tw:text-left", "tw:text-sm", "tw:font-normal", "tw:text-foreground", "tw:no-underline", "tw:min-w-0", "tw:overflow-hidden", "tw:hover:bg-hover", "tw:data-[active]:bg-selected", "tw:data-[active]:font-medium", "tw:focus-visible:outline-hidden", "tw:focus-visible:ring-2", "tw:focus-visible:ring-ring/50", "tw:[&_svg:not([class*='tw:size-'])]:size-4", "tw:[&_svg]:shrink-0");
|
|
119
142
|
/**
|
|
120
143
|
* One selectable entity row inside `Breadcrumb.Dropdown`. Self-hides when it doesn't match the
|
|
121
144
|
* panel's filter query and closes the panel on select. Use `asChild` to render a router link.
|
|
@@ -157,7 +180,7 @@ const BreadcrumbLink = ({ ref, asChild = false, className, ...props }) => {
|
|
|
157
180
|
};
|
|
158
181
|
//#endregion
|
|
159
182
|
//#region src/components/Breadcrumb/BreadcrumbDropdown.tsx
|
|
160
|
-
const chevronButtonClass = cn("tw:flex", "tw:items-center", "tw:justify-center", "tw:rounded-md", "tw:border-none", "tw:bg-transparent", "tw:cursor-pointer", "tw:size-5", "tw:text-muted-foreground", "tw:transition-colors", "tw:hover:bg-
|
|
183
|
+
const chevronButtonClass = cn("tw:flex", "tw:items-center", "tw:justify-center", "tw:rounded-md", "tw:border-none", "tw:bg-transparent", "tw:cursor-pointer", "tw:size-5", "tw:text-muted-foreground", "tw:transition-colors", "tw:hover:bg-hover", "tw:hover:text-foreground", "tw:data-[state=open]:bg-hover", "tw:data-[state=open]:text-foreground", "tw:focus-visible:outline-hidden", "tw:focus-visible:ring-2", "tw:focus-visible:ring-ring/50", "tw:[&_svg]:transition-transform", "tw:[&[data-state=open]_svg]:rotate-180");
|
|
161
184
|
const plainLabelClass = cn("tw:flex", "tw:items-center", "tw:gap-1.5", "tw:text-muted-foreground", "tw:font-normal", "tw:[&_svg:not([class*=\"tw:size-\"])]:size-3.5");
|
|
162
185
|
const PANEL_BASE = "tw:max-h-[min(640px,var(--radix-popover-content-available-height))]";
|
|
163
186
|
const PANEL_WIDTH = {
|
|
@@ -172,12 +195,24 @@ const PANEL_WIDTH = {
|
|
|
172
195
|
* - Not for row actions (`PageHeader.Detail` `overflowActions`) or a collapsed middle (`Ellipsis`).
|
|
173
196
|
* - Render inside `Breadcrumb.Item` in place of `Breadcrumb.Link`.
|
|
174
197
|
*/
|
|
175
|
-
const BreadcrumbDropdown = ({ label, splitTrigger = false, triggerLabel, open, defaultOpen = false, onOpenChange, size = "medium", filter = true, shouldFilter = true, searchValue, onSearchChange, searchPlaceholder = "Search…", emptyMessage = "No results.", children }) => {
|
|
198
|
+
const BreadcrumbDropdown = ({ label, splitTrigger = false, triggerLabel, open, defaultOpen = false, onOpenChange, size = "medium", filter = true, shouldFilter = true, searchValue, onSearchChange, searchPlaceholder = "Search…", emptyMessage = "No results.", panelClassName, children }) => {
|
|
176
199
|
const searchRef = useRef(null);
|
|
177
200
|
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
178
201
|
const [internalQuery, setInternalQuery] = useState("");
|
|
202
|
+
const stampRef = useRef(0);
|
|
203
|
+
const stamp = useCallback(() => ++stampRef.current, []);
|
|
204
|
+
const [allExpanded, setAllExpandedState] = useState(NO_TOGGLES);
|
|
205
|
+
const setAllExpanded = useCallback((expanded, scope) => setAllExpandedState((prev) => withToggle(prev, scope, {
|
|
206
|
+
expanded,
|
|
207
|
+
at: stamp()
|
|
208
|
+
})), [stamp]);
|
|
179
209
|
const { register, anyVisible } = useMatchRegistry();
|
|
180
210
|
const isOpen = open ?? internalOpen;
|
|
211
|
+
const [wasOpen, setWasOpen] = useState(isOpen);
|
|
212
|
+
if (wasOpen !== isOpen) {
|
|
213
|
+
setWasOpen(isOpen);
|
|
214
|
+
if (!isOpen) setAllExpandedState(NO_TOGGLES);
|
|
215
|
+
}
|
|
181
216
|
const handleOpenChange = useCallback((nextOpen) => {
|
|
182
217
|
setInternalOpen(nextOpen);
|
|
183
218
|
if (!nextOpen) setInternalQuery("");
|
|
@@ -193,12 +228,18 @@ const BreadcrumbDropdown = ({ label, splitTrigger = false, triggerLabel, open, d
|
|
|
193
228
|
forceVisible: false,
|
|
194
229
|
filterDisabled,
|
|
195
230
|
register,
|
|
196
|
-
close
|
|
231
|
+
close,
|
|
232
|
+
allExpanded,
|
|
233
|
+
setAllExpanded,
|
|
234
|
+
stamp
|
|
197
235
|
}), [
|
|
198
236
|
query,
|
|
199
237
|
filterDisabled,
|
|
200
238
|
register,
|
|
201
|
-
close
|
|
239
|
+
close,
|
|
240
|
+
allExpanded,
|
|
241
|
+
setAllExpanded,
|
|
242
|
+
stamp
|
|
202
243
|
]);
|
|
203
244
|
return /* @__PURE__ */ jsxs(Popover, {
|
|
204
245
|
open: isOpen,
|
|
@@ -225,12 +266,13 @@ const BreadcrumbDropdown = ({ label, splitTrigger = false, triggerLabel, open, d
|
|
|
225
266
|
sideOffset: 8,
|
|
226
267
|
collisionPadding: 16,
|
|
227
268
|
"data-size": size,
|
|
228
|
-
className: cn("tw:overflow-hidden tw:p-0", PANEL_BASE, PANEL_WIDTH[size]),
|
|
269
|
+
className: cn("tw:overflow-hidden tw:p-0", PANEL_BASE, PANEL_WIDTH[size], panelClassName),
|
|
229
270
|
onOpenAutoFocus: filter ? (event) => {
|
|
230
271
|
event.preventDefault();
|
|
231
272
|
searchRef.current?.focus();
|
|
232
273
|
} : void 0,
|
|
233
274
|
children: [filter && /* @__PURE__ */ jsx("div", {
|
|
275
|
+
"data-slot": "breadcrumb-dropdown-search",
|
|
234
276
|
className: "tw:shrink-0 tw:border-0 tw:border-b tw:border-solid tw:border-border tw:p-2",
|
|
235
277
|
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
236
278
|
ref: searchRef,
|
|
@@ -263,7 +305,7 @@ BreadcrumbDropdown.Group = BreadcrumbDropdownGroup;
|
|
|
263
305
|
const BreadcrumbEllipsis = ({ ref, className, ...props }) => /* @__PURE__ */ jsxs("button", {
|
|
264
306
|
ref,
|
|
265
307
|
type: "button",
|
|
266
|
-
className: cn("tw:flex", "tw:items-center", "tw:justify-center", "tw:rounded-md", "tw:border-none", "tw:bg-transparent", "tw:cursor-pointer", "tw:text-muted-foreground", "tw:transition-colors", "tw:hover:bg-
|
|
308
|
+
className: cn("tw:flex", "tw:items-center", "tw:justify-center", "tw:rounded-md", "tw:border-none", "tw:bg-transparent", "tw:cursor-pointer", "tw:text-muted-foreground", "tw:transition-colors", "tw:hover:bg-hover", "tw:hover:text-foreground", "tw:data-[state=open]:bg-hover", "tw:data-[state=open]:text-foreground", "tw:focus-visible:outline-hidden", "tw:focus-visible:ring-2", "tw:focus-visible:ring-ring/50", "tw:p-1", className),
|
|
267
309
|
...props,
|
|
268
310
|
children: [/* @__PURE__ */ jsx(Ellipsis, { className: "tw:size-4" }), /* @__PURE__ */ jsx("span", {
|
|
269
311
|
className: "tw:sr-only",
|
|
@@ -321,4 +363,4 @@ Breadcrumb.Dropdown = BreadcrumbDropdown;
|
|
|
321
363
|
//#endregion
|
|
322
364
|
export { Breadcrumb };
|
|
323
365
|
|
|
324
|
-
//# sourceMappingURL=Breadcrumb-
|
|
366
|
+
//# sourceMappingURL=Breadcrumb-BnIlsoIH.js.map
|