@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BrandEditor-P8OZX2hi.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\nexport type ColorSlot = keyof Omit<NonNullable<Brand['theme']['colors']>, 'sidebar' | 'chart'>;\nexport type SidebarSlot = keyof NonNullable<NonNullable<Brand['theme']['colors']>['sidebar']>;\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 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 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 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'];\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// 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 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 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=\"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 </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];\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 {radii[size]}\n </span>\n </div>\n <Slider\n min={0}\n max={24}\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,CA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AAK,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb-BUoAZyhO.js","names":[],"sources":["../src/components/Breadcrumb/BreadcrumbDropdownContext.ts","../src/components/Breadcrumb/BreadcrumbDropdownGroup.tsx","../src/components/Breadcrumb/BreadcrumbDropdownItem.tsx","../src/components/Breadcrumb/BreadcrumbLink.tsx","../src/components/Breadcrumb/BreadcrumbDropdown.tsx","../src/components/Breadcrumb/BreadcrumbEllipsis.tsx","../src/components/Breadcrumb/BreadcrumbItem.tsx","../src/components/Breadcrumb/BreadcrumbList.tsx","../src/components/Breadcrumb/BreadcrumbPage.tsx","../src/components/Breadcrumb/BreadcrumbSeparator.tsx","../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { createContext, isValidElement, useCallback, useMemo, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport type BreadcrumbDropdownContextValue = {\n /** Current (trimmed, lowercased) filter query. Empty string = no filtering. */\n query: string;\n /** An ancestor group's label matched the query — descendants render regardless of their own match. */\n forceVisible: boolean;\n /** Filtering is off (`filter={false}` or `shouldFilter={false}`) — items never self-hide. */\n filterDisabled: boolean;\n /** Report this node's visibility to the parent scope. Returns the unregister cleanup. */\n register: (id: string, visible: boolean) => () => void;\n /** Close the panel (fired by items on select). */\n close: () => void;\n};\n\nexport const BreadcrumbDropdownContext = createContext<BreadcrumbDropdownContextValue | null>(null);\n\nexport const matchesQuery = (text: string, query: string) => text.toLowerCase().includes(query);\n\n/** Text content of a React tree — the default filter text when no `textValue` is given. */\nexport const getNodeText = (node: ReactNode): string => {\n if (typeof node === 'string' || typeof node === 'number') return String(node);\n if (Array.isArray(node)) return node.map(getNodeText).join('');\n if (isValidElement<{ children?: ReactNode }>(node)) return getNodeText(node.props.children);\n return '';\n};\n\nexport const normalizeQuery = (query: string) => query.trim().toLowerCase();\n\n/**\n * Visibility registry for one filtering scope (the panel root, or one group). Items and groups\n * report their visibility here; `anyVisible` drives the group header / empty-state rendering.\n */\nexport const useMatchRegistry = () => {\n const [matches, setMatches] = useState<ReadonlyMap<string, boolean>>(new Map());\n\n const register = useCallback((id: string, visible: boolean) => {\n setMatches((prev) => (prev.get(id) === visible ? prev : new Map(prev).set(id, visible)));\n return () => {\n setMatches((prev) => {\n if (!prev.has(id)) return prev;\n const next = new Map(prev);\n next.delete(id);\n return next;\n });\n };\n }, []);\n\n const anyVisible = useMemo(() => [...matches.values()].some(Boolean), [matches]);\n\n return { register, anyVisible };\n};\n","import { Children, use, useEffect, useId, useMemo, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nimport { ChevronDown, ChevronRight } from '../../icons';\nimport { cn } from '../../utils';\n\nimport {\n BreadcrumbDropdownContext,\n getNodeText,\n matchesQuery,\n useMatchRegistry,\n} from './BreadcrumbDropdownContext';\n\nconst headerClass = cn(\n // layout\n 'tw:flex',\n 'tw:w-full',\n 'tw:items-center',\n 'tw:gap-2',\n 'tw:box-border',\n\n 'tw:rounded-md',\n 'tw:border-none',\n 'tw:bg-transparent',\n 'tw:px-2',\n 'tw:py-1.5',\n 'tw:text-left',\n\n // font — single line; wrap the label in `Truncated` (design system) for ellipsis + tooltip\n 'tw:text-sm',\n 'tw:font-medium',\n 'tw:text-foreground',\n 'tw:min-w-0',\n 'tw:overflow-hidden',\n\n // icons\n \"tw:[&_svg:not([class*='tw:size-'])]:size-4\",\n 'tw:[&_svg]:shrink-0',\n);\n\nconst collapsibleHeaderClass = cn(\n 'tw:cursor-pointer',\n 'tw:hover:bg-accent',\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-ring/50',\n);\n\ntype BreadcrumbDropdownGroupProps = {\n /** Group header (e.g. bucket name + stage badge). */\n label: ReactNode;\n /**\n * Text the built-in filter matches against. When the group label matches, all its items stay\n * visible. Defaults to the label's rendered text content.\n */\n textValue?: string;\n /** Render the header as a toggle that expands / collapses the group's items. Default `false`. */\n collapsible?: boolean;\n /** Initial expanded state for `collapsible` groups. Default `true`. */\n defaultExpanded?: boolean;\n className?: string;\n children: ReactNode;\n};\n\n/**\n * A labelled group of `Breadcrumb.Dropdown.Item`s (e.g. one bucket with its tables). The group\n * hides itself when neither its label nor any child matches the filter query; an active query\n * force-expands collapsible groups. Non-empty `collapsible` groups toggle their items behind the\n * header with an animated expand / collapse; a `collapsible` group with no items renders a\n * non-interactive, greyed header that can't toggle.\n */\nexport const BreadcrumbDropdownGroup = ({\n label,\n textValue,\n collapsible = false,\n defaultExpanded = true,\n className,\n children,\n}: BreadcrumbDropdownGroupProps) => {\n const parent = use(BreadcrumbDropdownContext);\n if (!parent) {\n throw new Error('Breadcrumb.Dropdown.Group must be rendered inside Breadcrumb.Dropdown');\n }\n const id = useId();\n const { register: registerChild, anyVisible } = useMatchRegistry();\n const [expanded, setExpanded] = useState(defaultExpanded);\n\n const text = textValue ?? getNodeText(label);\n const filtering = !parent.filterDisabled && !!parent.query;\n const labelMatched = filtering && matchesQuery(text, parent.query);\n const visible = !filtering || parent.forceVisible || labelMatched || anyVisible;\n\n useEffect(() => parent.register(id, visible), [parent, id, visible]);\n\n const childContext = useMemo(\n () => ({\n query: parent.query,\n forceVisible: parent.forceVisible || labelMatched,\n filterDisabled: parent.filterDisabled,\n register: registerChild,\n close: parent.close,\n }),\n [parent, labelMatched, registerChild],\n );\n\n // An active query force-expands the group so matches are never hidden behind a collapsed header.\n const isExpanded = !collapsible || expanded || filtering;\n // A collapsible group with no items has nothing to toggle — render a non-interactive header.\n // oxlint-disable-next-line react-x/no-children-count -- emptiness check, no child transformation\n const isEmpty = Children.count(children) === 0;\n\n return (\n <div\n className={cn('tw:flex tw:flex-col', className)}\n style={visible ? undefined : { display: 'none' }}\n >\n {collapsible && isEmpty ? (\n <span\n aria-disabled\n className={cn(\n headerClass,\n 'tw:text-muted-foreground',\n // Fade just the leading chevron lighter than the label text.\n 'tw:[&>svg:first-child]:opacity-50',\n )}\n >\n <ChevronRight />\n {label}\n </span>\n ) : collapsible && !isEmpty ? (\n <button\n type=\"button\"\n aria-expanded={isExpanded}\n className={cn(headerClass, collapsibleHeaderClass)}\n onClick={() => setExpanded((prev) => !prev)}\n >\n {isExpanded ? <ChevronDown /> : <ChevronRight />}\n {label}\n </button>\n ) : (\n <span className={headerClass}>{label}</span>\n )}\n <BreadcrumbDropdownContext value={childContext}>\n {collapsible && !isEmpty ? (\n // Animated expand / collapse via a CSS grid-rows transition (0fr ↔ 1fr). The children stay\n // mounted while collapsed so the filter registry keeps receiving their visibility; `inert`\n // + `aria-hidden` take the collapsed content out of the a11y tree and tab order. An active\n // filter query force-expands (`isExpanded` includes `filtering`).\n <div\n className={cn(\n 'tw:grid tw:transition-[grid-template-rows] tw:duration-200 tw:ease-out',\n 'tw:motion-reduce:transition-none',\n isExpanded ? 'tw:grid-rows-[1fr]' : 'tw:grid-rows-[0fr]',\n )}\n >\n <div\n className=\"tw:overflow-hidden\"\n inert={!isExpanded}\n aria-hidden={isExpanded ? undefined : true}\n >\n <div className=\"tw:flex tw:flex-col tw:pl-6\">{children}</div>\n </div>\n </div>\n ) : (\n <div\n className=\"tw:flex tw:flex-col tw:pl-6\"\n style={isExpanded ? undefined : { display: 'none' }}\n >\n {children}\n </div>\n )}\n </BreadcrumbDropdownContext>\n </div>\n );\n};\n","import { use, useEffect, useId } from 'react';\nimport type { ComponentProps } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../utils';\n\nimport { BreadcrumbDropdownContext, getNodeText, matchesQuery } from './BreadcrumbDropdownContext';\n\nconst itemClass = cn(\n // layout\n 'tw:flex',\n 'tw:w-full',\n 'tw:items-center',\n 'tw:gap-2',\n 'tw:box-border',\n\n 'tw:rounded-md',\n 'tw:border-none',\n 'tw:bg-transparent',\n 'tw:px-2',\n 'tw:py-1.5',\n 'tw:cursor-pointer',\n 'tw:text-left',\n\n // font — single line; wrap the label in `Truncated` (design system) for ellipsis + tooltip\n 'tw:text-sm',\n 'tw:font-normal',\n 'tw:text-foreground',\n 'tw:no-underline',\n 'tw:min-w-0',\n 'tw:overflow-hidden',\n\n // hover / active entity\n 'tw:hover:bg-accent',\n 'tw:data-[active]:bg-accent',\n 'tw:data-[active]:font-medium',\n\n // focus\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-ring/50',\n\n // icons\n \"tw:[&_svg:not([class*='tw:size-'])]:size-4\",\n 'tw:[&_svg]:shrink-0',\n);\n\ntype BreadcrumbDropdownItemProps = ComponentProps<'button'> & {\n /** Render the consumer's element (typically a router link) instead of a `button`. */\n asChild?: boolean;\n /**\n * Text the built-in filter matches against. Defaults to the item's rendered text content\n * (extracted recursively, so `asChild` links with icons work out of the box).\n */\n textValue?: string;\n /** Marks the currently open entity (highlight + `aria-current`). */\n active?: boolean;\n /** Close the panel when the item is selected. Default `true`. */\n closeOnSelect?: boolean;\n};\n\n/**\n * One selectable entity row inside `Breadcrumb.Dropdown`. Self-hides when it doesn't match the\n * panel's filter query and closes the panel on select. Use `asChild` to render a router link.\n */\nexport const BreadcrumbDropdownItem = ({\n ref,\n asChild = false,\n textValue,\n active = false,\n closeOnSelect = true,\n className,\n children,\n onClick,\n ...props\n}: BreadcrumbDropdownItemProps) => {\n const context = use(BreadcrumbDropdownContext);\n if (!context) {\n throw new Error('Breadcrumb.Dropdown.Item must be rendered inside Breadcrumb.Dropdown');\n }\n const id = useId();\n\n const text = textValue ?? getNodeText(children);\n const visible =\n context.filterDisabled ||\n !context.query ||\n context.forceVisible ||\n matchesQuery(text, context.query);\n\n useEffect(() => context.register(id, visible), [context, id, visible]);\n\n if (!visible) return null;\n\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n ref={ref}\n {...(asChild ? {} : { type: 'button' as const })}\n data-active={active || undefined}\n aria-current={active || undefined}\n className={cn(itemClass, className)}\n onClick={(event) => {\n onClick?.(event);\n if (closeOnSelect && !event.defaultPrevented) {\n context.close();\n }\n }}\n {...props}\n >\n {children}\n </Comp>\n );\n};\n","import type { ComponentProps } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'a'> & {\n asChild?: boolean;\n};\n\nexport const BreadcrumbLink = ({ ref, asChild = false, className, ...props }: Props) => {\n const Comp = asChild ? Slot : 'a';\n return (\n <Comp\n ref={ref}\n className={cn(\n 'tw:flex',\n 'tw:items-center',\n 'tw:gap-1.5',\n // font\n 'tw:text-muted-foreground',\n 'tw:font-normal',\n 'tw:no-underline',\n\n // hover\n 'tw:hover:text-foreground',\n\n // focus\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-ring/50',\n 'tw:focus-visible:rounded-sm',\n\n // Icon\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-3.5',\n\n // transition\n 'tw:transition-colors',\n className,\n )}\n {...props}\n />\n );\n};\n","import { useCallback, useMemo, useRef, useState } from 'react';\nimport type { ComponentRef, ReactNode } from 'react';\n\nimport { SearchInput } from '../../blocks/SearchInput';\nimport { ChevronDown } from '../../icons';\nimport { cn } from '../../utils';\nimport { Popover } from '../Popover';\n\nimport {\n BreadcrumbDropdownContext,\n normalizeQuery,\n useMatchRegistry,\n} from './BreadcrumbDropdownContext';\nimport { BreadcrumbDropdownGroup } from './BreadcrumbDropdownGroup';\nimport { BreadcrumbDropdownItem } from './BreadcrumbDropdownItem';\nimport { BreadcrumbLink } from './BreadcrumbLink';\n\n// Chevron trigger, the only button in the crumb; no outline, only a hover / open background.\nconst chevronButtonClass = cn(\n 'tw:flex',\n 'tw:items-center',\n 'tw:justify-center',\n\n 'tw:rounded-md',\n 'tw:border-none',\n 'tw:bg-transparent',\n 'tw:cursor-pointer',\n 'tw:size-5',\n 'tw:text-muted-foreground',\n 'tw:transition-colors',\n 'tw:hover:bg-accent',\n 'tw:hover:text-foreground',\n 'tw:data-[state=open]:bg-accent',\n 'tw:data-[state=open]:text-foreground',\n\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-ring/50',\n\n 'tw:[&_svg]:transition-transform',\n 'tw:[&[data-state=open]_svg]:rotate-180',\n);\n\n// Plain label: `BreadcrumbLink` typography without hover / focus, as it isn't interactive.\nconst plainLabelClass = cn(\n 'tw:flex',\n 'tw:items-center',\n 'tw:gap-1.5',\n 'tw:text-muted-foreground',\n 'tw:font-normal',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-3.5',\n);\n\n// Fixed width per `size`, clamped to the viewport; long names truncate instead of widening it.\nconst PANEL_BASE = 'tw:max-h-[min(640px,var(--radix-popover-content-available-height))]';\n\nconst PANEL_WIDTH = {\n small: 'tw:w-[min(360px,var(--radix-popover-content-available-width))]',\n medium: 'tw:w-[min(440px,var(--radix-popover-content-available-width))]',\n large: 'tw:w-[min(560px,var(--radix-popover-content-available-width))]',\n} as const;\n\ntype PanelSize = keyof typeof PANEL_WIDTH;\n\ntype BreadcrumbDropdownProps = {\n /** Never the trigger. With `splitTrigger`, pass an anchor-like element so it navigates. */\n label: ReactNode;\n /** Renders `label` through `Breadcrumb.Link asChild`; default `false` (plain text). */\n splitTrigger?: boolean;\n /** Chevron's accessible name; defaults to `\"${label} menu\"`, or `\"Open menu\"` for a node label. */\n triggerLabel?: string;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Panel width: `small` 360px, `medium` 440px (default), `large` 560px. */\n size?: PanelSize;\n /**\n * Pinned filter input, focused on open; default on. Non-matching items / groups hide\n * (by `textValue` / string content).\n */\n filter?: boolean;\n /** `false` keeps the input but disables built-in matching; the consumer filters. */\n shouldFilter?: boolean;\n /** Controlled filter value. */\n searchValue?: string;\n onSearchChange?: (value: string) => void;\n searchPlaceholder?: string;\n /** Rendered when the built-in filter hides everything. Default `\"No results.\"`. */\n emptyMessage?: ReactNode;\n /** `Breadcrumb.Dropdown.Group` / `Breadcrumb.Dropdown.Item` elements. */\n children: ReactNode;\n};\n\n/**\n * Breadcrumb segment opening a filterable switcher of sibling entities.\n *\n * - Use on the leftmost segment with siblings worth switching between; at most one per breadcrumb.\n * - Not for row actions (`PageHeader.Detail` `overflowActions`) or a collapsed middle (`Ellipsis`).\n * - Render inside `Breadcrumb.Item` in place of `Breadcrumb.Link`.\n */\nexport const BreadcrumbDropdown = ({\n label,\n splitTrigger = false,\n triggerLabel,\n open,\n defaultOpen = false,\n onOpenChange,\n size = 'medium',\n filter = true,\n shouldFilter = true,\n searchValue,\n onSearchChange,\n searchPlaceholder = 'Search…',\n emptyMessage = 'No results.',\n children,\n}: BreadcrumbDropdownProps) => {\n const searchRef = useRef<ComponentRef<'input'>>(null);\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const [internalQuery, setInternalQuery] = useState('');\n const { register, anyVisible } = useMatchRegistry();\n\n const isOpen = open ?? internalOpen;\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n setInternalOpen(nextOpen);\n if (!nextOpen) setInternalQuery('');\n onOpenChange?.(nextOpen);\n },\n [onOpenChange],\n );\n const close = useCallback(() => handleOpenChange(false), [handleOpenChange]);\n\n const effectiveTriggerLabel =\n triggerLabel ?? (typeof label === 'string' ? `${label} menu` : 'Open menu');\n\n const rawQuery = searchValue ?? internalQuery;\n const filterDisabled = !filter || !shouldFilter;\n const query = filterDisabled ? '' : normalizeQuery(rawQuery);\n\n const contextValue = useMemo(\n () => ({ query, forceVisible: false, filterDisabled, register, close }),\n [query, filterDisabled, register, close],\n );\n\n return (\n <Popover open={isOpen} onOpenChange={handleOpenChange}>\n <span className=\"tw:flex tw:items-center tw:gap-0.5\">\n {splitTrigger ? (\n <BreadcrumbLink asChild>{label}</BreadcrumbLink>\n ) : (\n <span className={plainLabelClass}>{label}</span>\n )}\n <Popover.Trigger asChild>\n <button type=\"button\" aria-label={effectiveTriggerLabel} className={chevronButtonClass}>\n <ChevronDown className=\"tw:size-3.5\" />\n </button>\n </Popover.Trigger>\n </span>\n <Popover.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={16}\n data-size={size}\n className={cn('tw:overflow-hidden tw:p-0', PANEL_BASE, PANEL_WIDTH[size])}\n onOpenAutoFocus={\n filter\n ? (event) => {\n event.preventDefault();\n searchRef.current?.focus();\n }\n : undefined\n }\n >\n {filter && (\n <div className=\"tw:shrink-0 tw:border-0 tw:border-b tw:border-solid tw:border-border tw:p-2\">\n <SearchInput\n ref={searchRef}\n value={rawQuery}\n onValueChange={(value) => {\n setInternalQuery(value);\n onSearchChange?.(value);\n }}\n placeholder={searchPlaceholder}\n allowClear\n // Debounce only when the consumer filters itself (e.g. server-side).\n disableDebounce={shouldFilter}\n />\n </div>\n )}\n <div className=\"tw:flex tw:flex-1 tw:flex-col tw:overflow-y-auto tw:p-2\">\n <BreadcrumbDropdownContext value={contextValue}>{children}</BreadcrumbDropdownContext>\n {!filterDisabled && !!query && !anyVisible && (\n <span className=\"tw:px-2 tw:py-1.5 tw:text-sm tw:text-muted-foreground\">\n {emptyMessage}\n </span>\n )}\n </div>\n </Popover.Content>\n </Popover>\n );\n};\n\nBreadcrumbDropdown.Item = BreadcrumbDropdownItem;\nBreadcrumbDropdown.Group = BreadcrumbDropdownGroup;\n","import type { ComponentProps } from 'react';\n\nimport { Ellipsis } from '../../icons';\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'button'>;\n\nexport const BreadcrumbEllipsis = ({ ref, className, ...props }: Props) => (\n <button\n ref={ref}\n type=\"button\"\n className={cn(\n // layout\n 'tw:flex',\n 'tw:items-center',\n 'tw:justify-center',\n\n 'tw:rounded-md',\n 'tw:border-none',\n 'tw:bg-transparent',\n 'tw:cursor-pointer',\n 'tw:text-muted-foreground',\n 'tw:transition-colors',\n // Match the Breadcrumb.Dropdown chevron trigger: background + colour lift on hover / while the\n // menu is open, so the two interactive breadcrumb affordances read consistently.\n 'tw:hover:bg-accent',\n 'tw:hover:text-foreground',\n 'tw:data-[state=open]:bg-accent',\n 'tw:data-[state=open]:text-foreground',\n\n // focus\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-ring/50',\n\n 'tw:p-1',\n className,\n )}\n {...props}\n >\n <Ellipsis className=\"tw:size-4\" />\n <span className=\"tw:sr-only\">More</span>\n </button>\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'li'>;\n\nexport const BreadcrumbItem = ({ className, ...props }: Props) => (\n <li className={cn('tw:inline-flex', 'tw:items-center', className)} {...props} />\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'ol'>;\n\nexport const BreadcrumbList = ({ className, ...props }: Props) => (\n <ol\n className={cn(\n // layout\n 'tw:flex',\n 'tw:flex-wrap',\n 'tw:items-center',\n 'tw:gap-2',\n 'tw:m-0',\n 'tw:p-0',\n\n // font\n 'tw:break-words',\n 'tw:text-sm',\n 'tw:text-muted-foreground',\n className,\n )}\n {...props}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'span'>;\n\nexport const BreadcrumbPage = ({ ref, className, ...props }: Props) => (\n <span\n ref={ref}\n // Do not use the anchor, as this item is not clickable\n // oxlint-disable-next-line jsx_a11y/prefer-tag-over-role\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn('tw:font-medium', 'tw:text-foreground', className)}\n {...props}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'li'>;\n\nexport const BreadcrumbSeparator = ({ children, className, ...props }: Props) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\n // layout\n 'tw:flex',\n 'tw:items-center',\n 'tw:justify-center',\n\n 'tw:aspect-square',\n 'tw:size-[15px]',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-2.5',\n 'tw:text-muted-foreground',\n className,\n )}\n {...props}\n >\n {children ?? <span className=\"tw:select-none tw:text-sm tw:text-muted-foreground/50\">/</span>}\n </li>\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\nimport { BreadcrumbDropdown } from './BreadcrumbDropdown';\nimport { BreadcrumbEllipsis } from './BreadcrumbEllipsis';\nimport { BreadcrumbItem } from './BreadcrumbItem';\nimport { BreadcrumbLink } from './BreadcrumbLink';\nimport { BreadcrumbList } from './BreadcrumbList';\nimport { BreadcrumbPage } from './BreadcrumbPage';\nimport { BreadcrumbSeparator } from './BreadcrumbSeparator';\n\ntype Props = ComponentProps<'nav'>;\n\nexport const Breadcrumb = ({ className, ...props }: Props) => (\n <nav aria-label=\"breadcrumb\" className={cn('tailwindcss-preflight', className)} {...props} />\n);\n\nBreadcrumb.List = BreadcrumbList;\nBreadcrumb.Item = BreadcrumbItem;\nBreadcrumb.Link = BreadcrumbLink;\nBreadcrumb.Page = BreadcrumbPage;\nBreadcrumb.Separator = BreadcrumbSeparator;\nBreadcrumb.Ellipsis = BreadcrumbEllipsis;\nBreadcrumb.Dropdown = BreadcrumbDropdown;\n"],"mappings":";;;;;;;;AAgBA,MAAa,4BAA4B,cAAqD,IAAI;AAElG,MAAa,gBAAgB,MAAc,UAAkB,KAAK,YAAY,CAAC,CAAC,SAAS,KAAK;;AAG9F,MAAa,eAAe,SAA4B;CACtD,IAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU,OAAO,OAAO,IAAI;C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WAAW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-B21oVcPU.js","names":[],"sources":["../src/components/Button/styles.ts","../src/components/Button/Button.tsx","../src/components/Button/ButtonInline.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n// Opaque tints use `bg-[color-mix(in_oklab,rgb(var(--tint))_N%,rgb(var(--base)))]`, not `bg-<token>/N`.\n//\n// - `bg-<token>/N` mixes into `transparent`, showing whatever the button overlaps.\n// - Raw `--*` triples: `--color-*` exist at build time only; unresolved → `transparent`.\n// - Write the whole class literally — Tailwind scans source; assembled strings get no CSS.\n\nexport const variants = cva(\n [\n 'tailwindcss-preflight',\n 'tw:group/button',\n 'tw:border-box',\n\n // layout\n 'tw:relative',\n 'tw:flex',\n 'tw:items-center',\n 'tw:justify-center',\n 'tw:gap-2',\n\n // text — weight/tracking are brand tokens; only `keboola-legacy-*` brands uppercase\n 'tw:text-xs',\n 'tw:leading-5',\n 'tw:font-medium',\n 'tw:[[data-brand^=keboola-legacy]_&]:tracking-chrome',\n 'tw:[[data-brand^=keboola-legacy]_&]:uppercase',\n\n // border — legacy (non-argo) chrome uses a fixed radius, not the brand token.\n 'tw:rounded',\n 'tw:border',\n 'tw:border-transparent',\n\n // styling\n 'tw:shadow-none',\n 'tw:[a]:cursor-pointer', // explicitly set for anchor\n\n 'tw:focus-visible:outline',\n 'tw:focus-visible:outline-1',\n 'tw:focus-visible:-outline-offset-1',\n 'tw:focus-visible:outline-ring',\n 'tw:focus-visible:ring-4',\n 'tw:focus-visible:ring-ring/30',\n\n // disabled\n 'tw:disabled:opacity-40',\n 'tw:disabled:cursor-not-allowed',\n\n // anchor support\n 'tw:!no-underline',\n 'tw:aria-disabled:opacity-40',\n 'tw:aria-disabled:cursor-not-allowed',\n\n 'tw:[&_svg]:shrink-0',\n ],\n {\n defaultVariants: {\n size: 'medium',\n variant: 'primary',\n block: false,\n },\n variants: {\n block: {\n true: ['tw:w-full'],\n },\n variant: {\n primary: [\n 'tw:text-white',\n 'tw:bg-primary-500',\n\n 'tw:focus:text-white',\n 'tw:hover:text-white',\n 'tw:hover:not-disabled:bg-primary-600',\n 'tw:active:not-disabled:bg-primary-800',\n\n // anchor disabled override\n 'tw:aria-disabled:!bg-primary-500',\n ],\n secondary: [\n 'tw:text-white',\n 'tw:bg-secondary-500',\n\n 'tw:focus:text-white',\n 'tw:hover:text-white',\n 'tw:hover:not-disabled:bg-secondary-700',\n 'tw:active:not-disabled:bg-secondary-800',\n\n // anchor disabled override\n 'tw:aria-disabled:!bg-secondary-500',\n ],\n // Kai's actions: its gradient, three light pools drifting behind the label.\n kai: [\n 'tw:bg-kai',\n 'tw:animate-kai-drift',\n 'tw:motion-reduce:animate-none',\n 'tw:text-white',\n 'tw:hover:text-white',\n 'tw:focus:text-white',\n 'tw:hover:not-disabled:brightness-110',\n 'tw:focus-visible:ring-ring/50',\n ],\n danger: [\n 'tw:text-white',\n 'tw:bg-error-500',\n\n 'tw:focus:text-white',\n 'tw:hover:text-white',\n 'tw:hover:not-disabled:bg-error-600',\n 'tw:active:not-disabled:bg-error-700',\n\n // anchor disabled override\n 'tw:aria-disabled:!bg-error-500',\n ],\n // Tokens, not the fixed neutral scale: a transparent button cannot assume a light page.\n invisible: [\n 'tw:text-foreground',\n 'tw:bg-transparent',\n\n 'tw:focus:text-foreground',\n 'tw:hover:not-disabled:bg-muted',\n 'tw:hover:text-foreground',\n 'tw:active:not-disabled:bg-secondary',\n\n // contrasting icon on hover/active\n 'tw:[&_svg]:text-neutral-400',\n 'tw:hover:not-disabled:[&_svg]:text-secondary-600',\n 'tw:active:not-disabled:[&_svg]:text-secondary-600',\n\n // anchor disabled override\n 'tw:aria-disabled:!bg-transparent',\n ],\n outline: [\n 'tw:text-foreground',\n 'tw:bg-card',\n // border\n 'tw:!border-input',\n 'tw:hover:text-foreground',\n 'tw:focus:text-foreground',\n // Hover/pressed are `muted-foreground` tints: `bg-muted` is 4/255 from `bg-card` in dark.\n //\n // - Fills mix into `--card`: unchanged on a card, opaque off one.\n // - Border tints `transparent`: no `bg-clip-padding`, so it composites over the fill.\n 'tw:hover:not-disabled:!border-muted-foreground/60',\n 'tw:hover:not-disabled:bg-[color-mix(in_oklab,rgb(var(--muted-foreground))_15%,rgb(var(--card)))]',\n 'tw:active:not-disabled:bg-[color-mix(in_oklab,rgb(var(--muted-foreground))_35%,rgb(var(--card)))]',\n\n // contrasting icon hover, same as invisible\n 'tw:[&_svg]:text-muted-foreground',\n 'tw:not-disabled:hover:[&_svg]:text-secondary-600',\n 'tw:active:not-disabled:[&_svg]:text-secondary-600',\n\n // anchor disabled override\n 'tw:aria-disabled:!bg-card',\n 'tw:aria-disabled:!border-input',\n ],\n\n inline: [\n 'tw:text-foreground',\n 'tw:bg-transparent',\n 'tw:rounded-full',\n\n 'tw:[&_svg]:text-muted-foreground',\n 'tw:not-disabled:hover:[&_svg]:text-secondary-600',\n 'tw:not-disabled:focus:[&_svg]:text-secondary-600',\n ],\n },\n size: {\n medium: [\n 'tw:max-h-10',\n 'tw:min-h-10',\n 'tw:px-4',\n 'tw:py-2.5',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-4',\n ],\n small: [\n 'tw:max-h-8',\n 'tw:min-h-8',\n 'tw:px-4',\n 'tw:py-1.5',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-4',\n ],\n large: [\n 'tw:max-h-12',\n 'tw:min-h-12',\n 'tw:px-4',\n 'tw:py-3.5',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-4',\n ],\n\n 'icon-lg': ['tw:size-12', 'tw:p-0', 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-6'],\n icon: ['tw:size-10', 'tw:p-0', 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-4'],\n 'icon-sm': ['tw:size-8', 'tw:p-0', 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-4'],\n 'icon-xs': ['tw:size-6', 'tw:p-0', 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-4'],\n 'icon-2xs': [\n 'tw:!inline-flex',\n 'tw:size-5',\n 'tw:max-h-5',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-3',\n ],\n 'icon-3xs': ['tw:h-fit', 'tw:w-fit', 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-4'],\n },\n },\n },\n);\n\nexport const argoVariants = cva(\n [\n 'tailwindcss-preflight',\n\n // layout\n 'tw:relative',\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:justify-center',\n 'tw:whitespace-nowrap',\n 'tw:gap-2',\n\n // border\n 'tw:border',\n 'tw:border-transparent',\n 'tw:rounded-[var(--radius-lg,0.25rem)]',\n\n // text\n 'tw:font-medium',\n 'tw:select-none',\n\n // focus visible\n 'tw:!outline-hidden',\n 'tw:focus-visible:ring-2',\n\n // disabled\n 'tw:disabled:cursor-not-allowed',\n 'tw:disabled:opacity-50',\n 'tw:active:opacity-60',\n\n 'tw:transition-all',\n\n // anchor support\n 'tw:!no-underline',\n 'tw:aria-disabled:cursor-not-allowed',\n 'tw:aria-disabled:opacity-50',\n\n // icon\n 'tw:shrink-0',\n 'tw:[&_svg]:pointer-events-none',\n 'tw:[&_svg]:shrink-0',\n \"tw:[&_svg:not([class*='tw:size-'])]:size-4\",\n ],\n {\n defaultVariants: {\n variant: 'primary',\n size: 'medium',\n },\n variants: {\n block: {\n true: ['tw:w-full'],\n },\n variant: {\n primary: [\n 'tw:bg-primary',\n 'tw:text-primary-foreground',\n 'tw:[a]:hover:bg-primary/80',\n 'tw:hover:not-disabled:bg-primary/90',\n 'tw:hover:text-primary-foreground',\n 'tw:focus:text-primary-foreground',\n\n 'tw:focus-visible:border-primary',\n 'tw:focus-visible:ring-ring/50',\n ],\n secondary: [\n 'tw:bg-primary/10',\n 'tw:text-primary',\n 'tw:hover:not-disabled:bg-primary/20',\n\n 'tw:focus-visible:border-primary',\n 'tw:focus-visible:ring-ring/50',\n ],\n\n // should be called \"destructive\" by Figma\n // Kai's actions: its gradient, three light pools drifting behind the label.\n kai: [\n 'tw:bg-kai',\n 'tw:animate-kai-drift',\n 'tw:motion-reduce:animate-none',\n 'tw:text-white',\n 'tw:hover:text-white',\n 'tw:focus:text-white',\n 'tw:hover:not-disabled:brightness-110',\n 'tw:focus-visible:ring-ring/50',\n ],\n danger: [\n 'tw:bg-destructive',\n 'tw:text-destructive-foreground',\n 'tw:hover:not-disabled:bg-destructive/90',\n 'tw:hover:text-destructive-foreground',\n 'tw:focus:text-destructive-foreground',\n\n 'tw:focus-visible:border-destructive',\n 'tw:focus-visible:ring-destructive/20',\n ],\n outline: [\n 'tw:!border-input',\n 'tw:bg-background',\n 'tw:bg-clip-padding',\n // Semantic text color so the label/icon flips in dark mode (matches `invisible`).\n 'tw:text-foreground',\n // Hover hue comes from the brand primary, not the fixed `accent` blue.\n //\n // - Fill mixes into `--background`: `bg-clip-padding` gives a translucent fill no backing.\n // - The *chrome* border carries the state (fill is ~1.5:1); `--primary` is for `focus-visible`.\n // - Border is solid, not a tint: its contrast would depend on the call site.\n 'tw:hover:not-disabled:bg-[color-mix(in_oklab,rgb(var(--primary))_10%,rgb(var(--background)))]',\n 'tw:hover:not-disabled:!border-muted-foreground',\n 'tw:hover:not-disabled:text-primary',\n 'tw:hover:active:bg-background',\n 'tw:focus-visible:!border-primary',\n 'tw:focus-visible:ring-ring/50',\n ],\n\n // should be called \"ghost\" by Figma\n invisible: [\n 'tw:bg-transparent',\n 'tw:bg-clip-padding',\n 'tw:text-foreground',\n 'tw:hover:not-disabled:bg-primary/10',\n 'tw:hover:not-disabled:text-primary',\n 'tw:hover:not-disabled:border-primary/10',\n\n 'tw:focus-visible:ring-ring/50',\n ],\n // should be called \"link\" by Figma\n inline: [\n 'tw:bg-transparent',\n 'tw:text-primary',\n 'tw:hover:underline',\n 'tw:hover:active:bg-transparent',\n 'tw:focus-visible:ring-ring/50',\n ],\n },\n size: {\n // should be called \"default\" by Figma\n medium: ['tw:max-h-9', 'tw:py-2', 'tw:px-4', 'tw:text-sm'],\n // should be called \"small\" by Figma\n small: ['tw:max-h-8', 'tw:py-2', 'tw:px-3', 'tw:text-xs'],\n // should be called \"large\" by Figma\n large: ['tw:max-h-10', 'tw:py-2.5', 'tw:px-6', 'tw:text-sm'],\n\n 'icon-lg': ['tw:size-10'],\n icon: ['tw:size-9'],\n 'icon-sm': ['tw:size-8'],\n 'icon-xs': ['tw:size-6'],\n // unsupported in ARGO, remove when old design is gone\n 'icon-2xs': [],\n 'icon-3xs': [],\n },\n },\n },\n);\n","import type { ComponentProps } from 'react';\nimport { Root, Slottable } from '@radix-ui/react-slot';\nimport type { VariantProps } from 'class-variance-authority';\n\nimport { Loader2 } from '../../icons';\nimport { cn } from '../../utils';\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { argoVariants, variants } from './styles';\n\n/** Props for `Button`; icons are composed as children. */\ntype Props = {\n /** Replaces the leading content with a spinner and disables the button visually. The caller still controls `disabled`. */\n isLoading?: boolean;\n /** Render as a Radix `Slot` so the parent JSX (e.g. a `react-router` `<Link>`) becomes the button element. */\n asChild?: boolean;\n} & ComponentProps<'button'> &\n VariantProps<typeof variants>;\n\n/**\n * Any user-initiated action; `size=\"icon-*\"` with no children is the icon-only button.\n *\n * - Not for: inline text links (`ButtonInline`), URL navigation (`Link`), action + dropdown (`SplitButton`).\n * - Wrap in `Tooltip` when icon-only or disabled; `Popconfirm` for destructive actions.\n *\n * @see RECIPES.md#disabled-button-tooltip\n * @see RECIPES.md#confirm-dialog\n */\nexport const Button = ({\n ref,\n children,\n disabled = false,\n className,\n type = 'button',\n isLoading = false,\n asChild = false,\n onClick,\n variant = 'primary',\n size = 'medium',\n block = false,\n ...buttonProps\n}: Props) => {\n const renderArgo = useArgoDesign();\n const Comp = asChild ? Root : 'button';\n const isIconOnly = String(size).startsWith('icon');\n const classNames = renderArgo\n ? argoVariants({ variant, size, block, className })\n : variants({ size, variant, block, className });\n\n const handleClick: ComponentProps<'button'>['onClick'] = (event) => {\n const isAnchor = event.currentTarget.tagName === 'A';\n\n // <a/> does not support disabled by default, and we cannot use pointer-events: none because cursor-not-allowed would not work.\n if (isAnchor && disabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n };\n\n return (\n <Comp\n {...buttonProps}\n ref={ref}\n disabled={disabled}\n // An explicit `aria-disabled` wins: unavailable yet focusable, unlike `disabled`.\n aria-disabled={buttonProps['aria-disabled'] ?? disabled}\n data-variant={variant}\n // Icon-only flag; `ButtonGroup space=\"block\"` stretches only non-icon children.\n data-icon-only={isIconOnly}\n type={type}\n onClick={handleClick}\n className={cn(classNames)}\n >\n {isLoading && <Loader2 className=\"tw:size-4 tw:shrink-0 tw:animate-spin\" />}\n <Slottable>{isLoading && isIconOnly ? null : children}</Slottable>\n </Comp>\n );\n};\n","import type { ComponentProps } from 'react';\nimport { Root } from '@radix-ui/react-slot';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\n\nconst buttonInlineVariants = cva(\n [\n 'tailwindcss-preflight',\n\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:gap-2',\n\n 'tw:underline-offset-2',\n\n 'tw:disabled:opacity-40',\n 'tw:disabled:cursor-not-allowed',\n 'tw:disabled:text-neutral-500',\n 'tw:disabled:no-underline',\n 'tw:disabled:[&_svg]:text-neutral-400',\n\n // Default size for nested Lucide icons; callers can override on the icon.\n \"tw:[&_svg.lucide:not([class*='tw:size-'])]:size-4\",\n 'tw:[&_svg]:shrink-0',\n ],\n {\n defaultVariants: {\n variant: 'link',\n color: 'link',\n },\n variants: {\n color: {\n link: ['tw:text-primary', 'tw:hover:text-primary/90', 'tw:[&_svg]:text-primary'],\n dark: ['tw:text-foreground tw:[&_svg]:text-muted-foreground'],\n danger: ['tw:text-error-500 tw:[&_svg]:text-error-500'],\n muted: ['tw:text-muted-foreground tw:[&_svg]:text-muted-foreground'],\n custom: [],\n },\n variant: {\n link: ['tw:underline', 'tw:hover:no-underline'],\n 'link-reverse': ['tw:no-underline', '', 'tw:hover:underline'],\n custom: [],\n },\n },\n },\n);\n\ntype Props = ComponentProps<'button'> &\n VariantProps<typeof buttonInlineVariants> & { asChild?: boolean };\n\nexport const ButtonInline = ({\n ref,\n children,\n className,\n variant,\n color,\n type = 'button',\n asChild = false,\n ...buttonProps\n}: Props) => {\n const Comp = asChild ? Root : 'button';\n\n return (\n <Comp\n {...buttonProps}\n ref={ref}\n type={asChild ? undefined : type}\n className={buttonInlineVariants({ variant, color, className })}\n >\n {children}\n </Comp>\n );\n};\n"],"mappings":";;;;;;;AAQA,MAAa,WAAW,IACtB;CACE;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CAGA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CAGA;CACA;CACA;CAEA;AACF,GACA;CACE,iBAAiB;EACf,MAAM;EACN,SAAS;EACT,OAAO;CACT;CACA,UAAU;EACR,OAAO,EACL,MAAM,CAAC,WAAW,EACpB;EACA,SAAS;GACP,SAAS;IACP;IACA;IAEA;IACA;IACA;IACA;IAGA;GACF;GACA,WAAW;IACT;IACA;IAEA;IACA;IACA;IACA;IAGA;GACF;GAEA,KAAK;IACH;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IAEA;IACA;IACA;IACA;IAGA;GACF;GAEA,WAAW;IACT;IACA;IAEA;IACA;IACA;IACA;IAGA;IACA;IACA;IAGA;GACF;GACA,SAAS;IACP;IACA;IAEA;IACA;IACA;IAKA;IACA;IACA;IAGA;IACA;IACA;IAGA;IACA;GACF;GAEA,QAAQ;IACN;IACA;IACA;IAEA;IACA;IACA;GACF;EACF;EACA,MAAM;GACJ,QAAQ;IACN;IACA;IACA;IACA;IACA;GACF;GACA,OAAO;IACL;IACA;IACA;IACA;IACA;GACF;GACA,OAAO;IACL;IACA;IACA;IACA;IACA;GACF;GAEA,WAAW;IAAC;IAAc;IAAU;GAA4C;GAChF,MAAM;IAAC;IAAc;IAAU;GAA4C;GAC3E,WAAW;IAAC;IAAa;IAAU;GAA4C;GAC/E,WAAW;IAAC;IAAa;IAAU;GAA4C;GAC/E,YAAY;IACV;IACA;IACA;IACA;GACF;GACA,YAAY;IAAC;IAAY;IAAY;GAA4C;EACnF;CACF;AACF,CACF;AAEA,MAAa,eAAe,IAC1B;CACE;CAGA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CAGA;CACA;CAGA;CACA;CAGA;CACA;CACA;CAEA;CAGA;CACA;CACA;CAGA;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;CACA,UAAU;EACR,OAAO,EACL,MAAM,CAAC,WAAW,EACpB;EACA,SAAS;GACP,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IAEA;IACA;GACF;GACA,WAAW;IACT;IACA;IACA;IAEA;IACA;GACF;GAIA,KAAK;IACH;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,QAAQ;IACN;IACA;IACA;IACA;IACA;IAEA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IAEA;IAMA;IACA;IACA;IACA;IACA;IACA;GACF;GAGA,WAAW;IACT;IACA;IACA;IACA;IACA;IACA;IAEA;GACF;GAEA,QAAQ;IACN;IACA;IACA;IACA;IACA;GACF;EACF;EACA,MAAM;GAEJ,QAAQ;IAAC;IAAc;IAAW;IAAW;GAAY;GAEzD,OAAO;IAAC;IAAc;IAAW;IAAW;GAAY;GAExD,OAAO;IAAC;IAAe;IAAa;IAAW;GAAY;GAE3D,WAAW,CAAC,YAAY;GACxB,MAAM,CAAC,WAAW;GAClB,WAAW,CAAC,WAAW;GACvB,WAAW,CAAC,WAAW;GAEvB,YAAY,CAAC;GACb,YAAY,CAAC;EACf;CACF;AACF,CACF;;;;;;;;;;;;ACzUA,MAAa,UAAU,EACrB,KACA,UACA,WAAW,OACX,WACA,OAAO,UACP,YAAY,OACZ,UAAU,OACV,SACA,UAAU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EACE,GAAI;EACC;EACL,MAAM,UAAU,KAAA,IAAY;EAC5B,WAAW,qBAAqB;GAAE;GAAS;GAAO;EAAU,CAAC;EAE5D;CACG,CAAA;AAEV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card-BQmBWHXl.js","names":[],"sources":["../src/components/Card/styles.ts","../src/components/Card/CardContent.tsx","../src/components/Card/CardDescription.tsx","../src/components/Card/CardHeader.tsx","../src/components/Card/CardTitle.tsx","../src/components/Card/Card.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\n\nexport const cardClassnames = cva(\n [\n 'tw:flex',\n 'tw:flex-col',\n 'tw:rounded-lg',\n 'tw:bg-card',\n 'tw:text-card-foreground',\n\n // interactive — see the `interactive` variant in theme.css\n 'tw:interactive:cursor-pointer',\n 'tw:interactive:no-underline',\n 'tw:interactive:hover:no-underline',\n 'tw:interactive:hover:text-card-foreground',\n 'tw:interactive:focus:text-card-foreground',\n 'tw:interactive:motion-safe:transition-[translate,box-shadow,border-color]',\n 'tw:interactive:hover:border-input',\n 'tw:interactive:hover:shadow-md',\n 'tw:interactive:motion-safe:hover:-translate-y-0.5',\n 'tw:interactive:active:translate-y-0',\n 'tw:interactive:focus-visible:outline',\n 'tw:interactive:focus-visible:outline-1',\n 'tw:interactive:focus-visible:-outline-offset-1',\n 'tw:interactive:focus-visible:outline-ring',\n 'tw:interactive:focus-visible:ring-4',\n 'tw:interactive:focus-visible:ring-ring/30',\n ],\n {\n defaultVariants: {\n padding: 'small',\n },\n variants: {\n bordered: {\n true: 'tw:border tw:border-solid tw:border-border',\n false: 'tw:shadow-raised tw:data-[argo=true]:shadow-sm',\n },\n // `none` drops the gap too: slots own their padding, so a gap would\n // double-space a `Card.Header divider`.\n padding: {\n none: 'tw:p-0',\n small: 'tw:gap-4 tw:px-6 tw:py-4',\n medium: 'tw:gap-4 tw:p-7',\n large: 'tw:gap-4 tw:p-8',\n },\n },\n },\n);\n\nexport const cardHeaderClassnames = cva('tw:flex', {\n defaultVariants: {\n divider: false,\n layout: 'row',\n },\n variants: {\n // No `border-solid`: it would give the other sides a 3px `medium` border.\n // `min-h-16` holds one height with or without a button; keep padding under it.\n divider: {\n true: 'tw:min-h-16 tw:border-b tw:border-border tw:px-6 tw:py-2',\n false: '',\n },\n layout: {\n row: 'tw:items-center tw:justify-between tw:gap-4',\n inline: 'tw:items-center tw:gap-3',\n stack: 'tw:flex-col tw:gap-1.5',\n },\n },\n});\n\nexport const cardContentClassnames = cva('', {\n defaultVariants: {\n padded: false,\n },\n variants: {\n padded: {\n true: 'tw:px-6 tw:py-5',\n false: '',\n },\n },\n});\n\nexport const cardTitleClassnames = cn(\n 'tw:m-0',\n 'tw:leading-6',\n 'tw:font-medium',\n 'tw:text-base',\n 'tw:text-card-foreground',\n);\n\nexport const cardDescriptionClassnames = cn('tw:m-0', 'tw:text-sm', 'tw:text-muted-foreground');\n","import type { HTMLAttributes } from 'react';\n\nimport { cardContentClassnames } from './styles';\n\ntype Props = HTMLAttributes<HTMLDivElement> & {\n /** Applies the standard body padding. Use with `Card padding=\"none\"`, where the\n * root adds none — otherwise the padding is doubled. */\n padded?: boolean;\n};\n\nexport const CardContent = ({ children, className, padded = false, ...rest }: Props) => (\n // `|| undefined` so an unpadded, unstyled content slot stays attribute-free\n // rather than rendering `class=\"\"`.\n <div {...rest} className={cardContentClassnames({ className, padded }) || undefined}>\n {children}\n </div>\n);\n","import type { HTMLAttributes } from 'react';\n\nimport { cn } from '../../utils';\n\nimport { cardDescriptionClassnames } from './styles';\n\n/** Muted secondary line under `Card.Title`; pair with `Card.Header layout=\"stack\"`. */\nexport const CardDescription = ({\n children,\n className,\n ...rest\n}: HTMLAttributes<HTMLParagraphElement>) => (\n <p className={cn(cardDescriptionClassnames, className)} {...rest}>\n {children}\n </p>\n);\n","import type { HTMLAttributes } from 'react';\n\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { cardHeaderClassnames } from './styles';\n\ntype Props = HTMLAttributes<HTMLDivElement> & {\n /** Bottom rule plus own padding and a 64px min height. Full-bleed only with `Card padding=\"none\"`. */\n divider?: boolean;\n /** `row`: title left, actions right. `inline`: together, e.g. title + badge.\n * `stack`: description under the title. */\n layout?: 'row' | 'inline' | 'stack';\n};\n\nexport const CardHeader = ({\n children,\n className,\n divider = false,\n layout = 'row',\n ...rest\n}: Props) => {\n const renderArgo = useArgoDesign();\n return (\n <div\n {...rest}\n data-argo={renderArgo}\n className={cardHeaderClassnames({ className, divider, layout })}\n >\n {children}\n </div>\n );\n};\n","import type { HTMLAttributes } from 'react';\n\nimport { cn } from '../../utils';\n\nimport { cardTitleClassnames } from './styles';\n\ntype HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\ntype Props = HTMLAttributes<HTMLHeadingElement> & {\n /** Heading tag to render. Defaults to `h3`; set explicitly to avoid a heading-order skip\n * (e.g. `as=\"h2\"` when the Card sits directly under a page's `h1`). */\n as?: HeadingLevel;\n};\n\nexport const CardTitle = ({ children, className, as: Tag = 'h3', ...rest }: Props) => (\n <Tag className={cn(cardTitleClassnames, className)} {...rest}>\n {children}\n </Tag>\n);\n","import type { HTMLAttributes } from 'react';\nimport { Root } from '@radix-ui/react-slot';\nimport type { VariantProps } from 'class-variance-authority';\n\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { CardContent } from './CardContent';\nimport { CardDescription } from './CardDescription';\nimport { CardHeader } from './CardHeader';\nimport { CardTitle } from './CardTitle';\nimport { cardClassnames } from './styles';\n\ntype Props = HTMLAttributes<HTMLDivElement> &\n VariantProps<typeof cardClassnames> & {\n /** Render as a Radix `Slot`: the child (`<a href>`, a router `<Link>`) becomes the card.\n * The card is then one link — nest no buttons or links inside it. */\n asChild?: boolean;\n /** Hover lift, focus ring and pointer cursor. Defaults to on when the card renders an\n * `<a href>`; `false` opts that out, `true` opts any other element in. */\n interactive?: boolean;\n };\n\nexport const Card = ({\n children,\n className,\n bordered = false,\n padding = 'small',\n asChild = false,\n interactive,\n ...rest\n}: Props) => {\n const renderArgo = useArgoDesign();\n const Comp = asChild ? Root : 'div';\n return (\n <Comp\n {...rest}\n data-argo={renderArgo}\n data-interactive={interactive}\n className={cardClassnames({ className, bordered, padding })}\n >\n {children}\n </Comp>\n );\n};\n\nCard.Header = CardHeader;\nCard.Content = CardContent;\nCard.Title = CardTitle;\nCard.Description = CardDescription;\n"],"mappings":";;;;;;AAIA,MAAa,iBAAiB,IAC5B;CACE;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB,EACf,SAAS,QACX;CACA,UAAU;EACR,UAAU;GACR,MAAM;GACN,OAAO;EACT;EAGA,SAAS;GACP,MAAM;GACN,OAAO;GACP,QAAQ;GACR,OAAO;EACT;CACF;AACF,CACF;AAEA,MAAa,uBAAuB,IAAI,WAAW;CACjD,iBAAiB;EACf,SAAS;EACT,QAAQ;CACV;CACA,UAAU;EAGR,SAAS;GACP,MAAM;GACN,OAAO;EACT;EACA,QAAQ;GACN,KAAK;GACL,QAAQ;GACR,OAAO;EACT;CACF;AACF,CAAC;AAED,MAAa,wBAAwB,IAAI,IAAI;CAC3C,iBAAiB,EACf,QAAQ,MACV;CACA,UAAU,EACR,QAAQ;EACN,MAAM;EACN,OAAO;CACT,EACF;AACF,CAAC;AAED,MAAa,sBAAsB,GACjC,UACA,gBACA,kBACA,gBACA,yBACF;AAEA,MAAa,4BAA4B,GAAG,UAAU,cAAc,0BAA0B;;;ACjF9F,MAAa,eAAe,EAAE,UAAU,WAAW,SAAS,OAAO,GAAG,WAGpE,oBAAC,OAAD;CAAK,GAAI;CAAM,WAAW,sBAAsB;EAAE;EAAW;CAAO,CAAC,KAAK,KAAA;CACvE;AACE,CAAA;;;;ACRP,MAAa,mBAAmB,EAC9B,UACA,WACA,GAAG,WAEH,oBAAC,KAAD;CAAG,WAAW,GAAG,2BAA2B,SAAS;CAAG,GAAI;CACzD;AACA,CAAA;;;ACAL,MAAa,cAAc,EACzB,UACA,WACA,UAAU,OACV,SAAS,OACT,GAAG,WACQ;CACX,MAAM,aAAa,cAAc;CACjC,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,aAAW;EACX,WAAW,qBAAqB;GAAE;GAAW;GAAS;EAAO,CAAC;EAE7D;CACE,CAAA;AAET;;;ACjBA,MAAa,aAAa,EAAE,UAAU,WAAW,IAAI,MAAM,MAAM,GAAG,WAClE,oBAAC,KAAD;CAAK,WAAW,GAAG,qBAAqB,SAAS;CAAG,GAAI;CACrD;AACE,CAAA;;;ACKP,MAAa,QAAQ,EACnB,UACA,WACA,WAAW,OACX,UAAU,SACV,UAAU,OACV,aACA,GAAG,WACQ;CACX,MAAM,aAAa,cAAc;CAEjC,OACE,oBAFW,UAAU,OAAO,OAE5B;EACE,GAAI;EACJ,aAAW;EACX,oBAAkB;EAClB,WAAW,eAAe;GAAE;GAAW;GAAU;EAAQ,CAAC;EAEzD;CACG,CAAA;AAEV;AAEA,KAAK,SAAS;AACd,KAAK,UAAU;AACf,KAAK,QAAQ;AACb,KAAK,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox-8yIIgY7g.js","names":[],"sources":["../src/components/Checkbox/styles.ts","../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const rootVariants = cva(\n [\n // reset\n 'tailwindcss-preflight',\n\n // position\n 'tw:flex',\n 'tw:items-center',\n 'tw:justify-center',\n\n 'tw:peer',\n 'tw:size-4',\n 'tw:shrink-0',\n 'tw:cursor-pointer',\n\n // border\n 'tw:border',\n 'tw:border-solid',\n\n // disabled\n 'tw:disabled:opacity-50',\n 'tw:disabled:cursor-not-allowed',\n ],\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: [\n 'tw:rounded',\n 'tw:border-neutral-200',\n\n 'tw:data-[state=checked]:bg-primary',\n 'tw:data-[state=checked]:border-primary',\n\n 'tw:data-[state=indeterminate]:bg-white',\n 'tw:data-[state=indeterminate]:border-neutral-200',\n ],\n argo: [\n 'tw:rounded',\n 'tw:border-input',\n 'tw:transition-colors',\n\n 'tw:data-[state=checked]:bg-primary',\n 'tw:data-[state=checked]:border-primary',\n\n 'tw:data-[state=indeterminate]:bg-primary',\n 'tw:data-[state=indeterminate]:border-primary',\n\n // focus\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:border-primary',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-ring/50',\n ],\n },\n },\n },\n);\n\nexport const indicatorVariants = cva(['tw:group', 'tw:flex', 'tw:items-center'], {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default: [\n 'tw:data-[state=checked]:text-primary-foreground',\n 'tw:data-[state=indeterminate]:text-neutral-200',\n ],\n argo: ['tw:text-primary-foreground'],\n },\n },\n});\n","import { useId } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\nimport type { CheckedState } from '@radix-ui/react-checkbox';\nimport { Indicator, Root } from '@radix-ui/react-checkbox';\nimport type { VariantProps } from 'class-variance-authority';\n\nimport { Check, Minus } from '../../icons';\nimport { cn } from '../../utils';\nimport { FieldBox } from '../FieldBox';\nimport type { fieldBoxVariants } from '../FieldBox/styles';\nimport { useArgoDesign } from '../ThemeProvider/context';\nimport type { Props as TooltipProps } from '../Tooltip';\nimport { Tooltip } from '../Tooltip';\n\nimport { indicatorVariants, rootVariants } from './styles';\n\ntype Props = {\n id?: string | number;\n description?: ReactNode;\n variant?: VariantProps<typeof fieldBoxVariants>['variant'];\n position?: 'start' | 'end';\n tooltip?: TooltipProps['tooltip'];\n tooltipPlacement?: TooltipProps['placement'];\n} & Omit<ComponentProps<typeof Root>, 'id'>;\n\nexport function Checkbox(\n prop: Omit<Props, 'checked' | 'onCheckedChange'> & {\n checked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n },\n): ReactNode;\n\nexport function Checkbox(\n prop: Omit<Props, 'checked' | 'onCheckedChange'> & {\n checked?: CheckedState;\n onCheckedChange?: (checked: CheckedState) => void;\n },\n): ReactNode;\n\nexport function Checkbox({\n className,\n id: idProp,\n children,\n description,\n variant,\n position,\n tooltip,\n tooltipPlacement = 'top',\n ...rest\n}: Props) {\n const fallbackId = useId();\n const id = idProp?.toString() ?? fallbackId;\n const styleVariant = useArgoDesign() ? 'argo' : 'default';\n\n const checkboxElement = (\n <Root id={id} {...rest} className={cn(rootVariants({ variant: styleVariant, className }))}>\n <Indicator className={cn(indicatorVariants({ variant: styleVariant }))}>\n <Check className=\"tw:hidden tw:size-3 tw:stroke-[4px] tw:group-data-[state=checked]:block\" />\n <Minus className=\"tw:hidden tw:size-3 tw:stroke-[4px] tw:group-data-[state=indeterminate]:block\" />\n </Indicator>\n </Root>\n );\n\n const rendered = !children ? (\n checkboxElement\n ) : (\n <FieldBox htmlFor={id} variant={variant} position={position} control={checkboxElement}>\n <FieldBox.Title>{children}</FieldBox.Title>\n {description && <FieldBox.Description>{description}</FieldBox.Description>}\n </FieldBox>\n );\n\n if (!tooltip) return rendered;\n\n // `asChild` only onto the labelled FieldBox: on the bare Radix `Root` the tooltip's\n // `data-state` overwrites the checkbox's and it stops toggling.\n return (\n <Tooltip tooltip={tooltip} placement={tooltipPlacement} triggerAsChild={!!children}>\n {rendered}\n </Tooltip>\n );\n}\n"],"mappings":";;;;;;;;;;AAEA,MAAa,eAAe,IAC1B;CAEE;CAGA;CACA;CACA;CAEA;CACA;CACA;CACA;CAGA;CACA;CAGA;CACA;AACF,GACA;CACE,iBAAiB,EACf,SAAS,UACX;CACA,UAAU,EACR,SAAS;EACP,SAAS;GACP;GACA;GAEA;GACA;GAEA;GACA;EACF;EACA,MAAM;GACJ;GACA;GACA;GAEA;GACA;GAEA;GACA;GAGA;GACA;GACA;GACA;EACF;CACF,EACF;AACF,CACF;AAEA,MAAa,oBAAoB,IAAI;CAAC;CAAY;CAAW;AAAiB,GAAG;CAC/E,iBAAiB,EACf,SAAS,UACX;CACA,UAAU,EACR,SAAS;EACP,SAAS,CACP,mDACA,gDACF;EACA,MAAM,CAAC,4BAA4B;CACrC,EACF;AACF,CAAC;;;ACrCD,SAAgB,SAAS,EACvB,WACA,IAAI,QACJ,UACA,aACA,SACA,UACA,SACA,mBAAmB,OACnB,GAAG,QACK;CACR,MAAM,aAAa,MAAM;CACzB,MAAM,KAAK,QAAQ,SAAS,KAAK;CACjC,MAAM,eAAe,cAAc,IAAI,SAAS;CAEhD,MAAM,kBACJ,oBAAC,MAAD;EAAU;EAAI,GAAI;EAAM,WAAW,GAAG,aAAa;GAAE,SAAS;GAAc;EAAU,CAAC,CAAC;EACtF,UAAA,qBAAC,WAAD;GAAW,WAAW,GAAG,kBAAkB,EAAE,SAAS,aAAa,CAAC,CAAC;GAArE,UAAA,CACE,oBAAC,OAAD,EAAO,WAAU,0EAA2E,CAAA,GAC5F,oBAAC,OAAD,EAAO,WAAU,gFAAiF,CAAA,CACzF;;CACP,CAAA;CAGR,MAAM,WAAW,CAAC,WAChB,kBAEA,qBAAC,UAAD;EAAU,SAAS;EAAa;EAAmB;EAAU,SAAS;EAAtE,UAAA,CACE,oBAAC,SAAS,OAAV,EAAiB,SAAyB,CAAA,GACzC,eAAe,oBAAC,SAAS,aAAV,EAAA,UAAuB,YAAkC,CAAA,CACjE;;CAGZ,IAAI,CAAC,SAAS,OAAO;CAIrB,OACE,oBAAC,SAAD;EAAkB;EAAS,WAAW;EAAkB,gBAAgB,CAAC,CAAC;EACvE,UAAA;CACM,CAAA;AAEb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox-BNhW0TDB.js","names":["BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","BaseCombobox","Combobox","BaseCombobox"],"sources":["../src/components/Combobox/blankValues.ts","../src/components/Combobox/ComboboxChip.tsx","../src/components/Combobox/utils.ts","../src/components/Combobox/ComboboxChips.tsx","../src/components/Combobox/ComboboxClearButton.tsx","../src/components/Combobox/ComboboxContent.tsx","../src/components/Combobox/ComboboxEmpty.tsx","../src/components/Combobox/ComboboxInput.tsx","../src/components/Combobox/ComboboxInputGroup.tsx","../src/components/Combobox/ComboboxItemIndicator.tsx","../src/components/Combobox/virtualList.ts","../src/components/Combobox/ComboboxItem.tsx","../src/components/Combobox/ComboboxList.tsx","../src/components/Combobox/ComboboxOpenButton.tsx","../src/components/Combobox/Group/ComboboxGroupHeader.tsx","../src/components/Combobox/Group/ComboboxGroup.tsx","../src/components/Combobox/Group/ComboboxGroupLabel.tsx","../src/components/Combobox/Group/ComboboxCollection.tsx","../src/components/Combobox/ComboboxFullList.tsx","../src/components/Combobox/ComboboxLoadingEmpty.tsx","../src/components/Combobox/ComboboxVirtualList.tsx","../src/components/Combobox/ComboboxOptions.tsx","../src/components/Combobox/ComboboxRoot.tsx","../src/components/Combobox/ComboboxSeparator.tsx","../src/components/Combobox/createdItems.ts","../src/components/Combobox/groupHeaders.ts","../src/components/Combobox/query.ts","../src/components/Combobox/Combobox.tsx","../src/components/Combobox/matchByWords.ts"],"sourcesContent":["/**\n * The two blank strings a Storage filter predicates on, in list order.\n *\n * - Hand it to `items` where the blanks are the whole list — a value field whose other entries the\n * user types. {@link withBlankValues} is for offering them ahead of a list that already exists.\n */\nexport const BLANK_VALUES: readonly string[] = ['', ' '];\n\nconst BLANK_LABELS: Record<string, string> = {\n '': '[empty string]',\n ' ': '[space character]',\n};\n\n/**\n * A string as a row or a chip shows it — named when its text is blank, itself otherwise.\n *\n * - Exported so an `itemToLabel` / `itemToChipLabel` / `itemToSelectedLabel` / `renderChips`\n * override can keep the default naming instead of retyping the labels.\n * - The two blank values get their own labels; any other whitespace-only string (a tab, a run of\n * spaces) falls back to a generic one, so two different ones read alike.\n * - Identity is unaffected — `toLabel` keys items off the raw string.\n */\nexport const namedLabel = (text: string): string =>\n text.trim() === '' ? (BLANK_LABELS[text] ?? '[whitespace]') : text;\n\n/**\n * `values` with both blank values offered ahead of them, and duplicates collapsed.\n *\n * - The dedupe matters where the list is the distinct values of a Storage column: it can already\n * hold a blank, and two `Object.is`-equal rows both report `aria-selected` and toggle each other.\n * - First occurrence wins, so the order of the values is otherwise preserved.\n * - String items only — the seven Storage filters this serves are all string-valued.\n */\nexport const withBlankValues = (values: readonly string[]): string[] => [\n ...new Set([...BLANK_VALUES, ...values]),\n];\n","import { type ComponentProps, type KeyboardEvent, type ReactNode, useState } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { X } from '../../icons';\nimport { Badge } from '../Badge';\nimport { useArgoDesign } from '../ThemeProvider/context';\nimport { Tooltip, TooltipProvider } from '../Tooltip';\nimport { hasTruncationOverflow } from '../Truncated';\n\nexport type BadgeColor = ComponentProps<typeof Badge>['color'];\nexport type BadgeVariant = ComponentProps<typeof Badge>['variant'];\n\n/**\n * Keeps a chip's keyboard handling off its content's.\n *\n * - Base UI's chip `preventDefault`s Enter/Space, cancelling a nested link or button.\n * - Capture phase, so the chip's own bubble handler never runs.\n * - Target-guarded, so the chip's own keys (Backspace, Delete, arrows) still reach it.\n */\nconst stopNestedKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n if (event.target !== event.currentTarget) event.stopPropagation();\n};\n\ntype Props = {\n children: ReactNode;\n color?: BadgeColor;\n variant?: BadgeVariant;\n};\n\n/**\n * One removable chip in a `MultiCombobox`'s `renderChips` slot or `Combobox.Chips`.\n *\n * - Position is identity: Base UI removes by index, so render one per `value` entry, in order.\n * - A non-removable chip is a plain `Badge`: a chip would shift the removal index.\n * - A label cut off by the chip's width shows in full in a tooltip on hover.\n */\nexport const ComboboxChip = ({ children, color, variant }: Props) => {\n const renderArgo = useArgoDesign();\n const [isTruncated, setIsTruncated] = useState(false);\n\n return (\n <BaseCombobox.Chip\n render={\n <Badge.Root\n color={color}\n variant={variant ?? (renderArgo ? 'pill' : 'default')}\n className=\"tw:max-w-40\"\n />\n }\n onKeyDownCapture={stopNestedKeyDown}\n >\n <TooltipProvider>\n <Tooltip tooltip={children} forceHide={!isTruncated} placement=\"top\" triggerAsChild>\n {/* The trigger's `tailwindcss-preflight` sets `line-height: 1.5`; keep the badge's own. */}\n <Badge.Label\n className=\"tw:leading-[inherit]\"\n onMouseOver={(event) => setIsTruncated(hasTruncationOverflow(event.currentTarget))}\n >\n {children}\n </Badge.Label>\n </Tooltip>\n </TooltipProvider>\n <Badge.Addon variant=\"inline\" align=\"inline-end\">\n <BaseCombobox.ChipRemove\n render={\n <Badge.Button aria-label=\"Remove value\">\n <X className=\"tw:size-3\" />\n </Badge.Button>\n }\n />\n </Badge.Addon>\n </BaseCombobox.Chip>\n );\n};\n","import { isValidElement, type ReactNode, useMemo } from 'react';\n\nimport { namedLabel } from './blankValues';\nimport type {\n CreatableItem,\n Group,\n GroupHeaderItem,\n InternalItems,\n LabeledItem,\n SelectAllItem,\n} from './types';\n\nconst isPlainObject = (item: unknown): item is Record<string, unknown> =>\n item !== null && typeof item === 'object';\n\nconst isNumber = (item: unknown): item is number => typeof item === 'number';\nconst isString = (item: unknown): item is string => typeof item === 'string';\n\nconst isLabeledItem = (item: unknown): item is LabeledItem =>\n isPlainObject(item) && Reflect.has(item, 'label') && Reflect.has(item, 'value');\n\nexport const isInternalItem = (item: unknown): item is InternalItems =>\n isLabeledItem(item) && '__marker' in item;\n\nexport const isSelectAllItem = (item: unknown): item is SelectAllItem =>\n isInternalItem(item) && item.__marker === 'selectAll';\n\nexport const isCreatableItem = (item: unknown): item is CreatableItem => {\n return isInternalItem(item) && item.__marker === 'creatable';\n};\n\nexport const isGroupHeaderItem = (item: unknown): item is GroupHeaderItem =>\n isInternalItem(item) && item.__marker === 'groupHeader';\n\nexport const isGroupItem = <Item>(itemOrGroup: Item | Group<Item>): itemOrGroup is Group<Item> =>\n itemOrGroup !== null && typeof itemOrGroup === 'object' && Reflect.has(itemOrGroup, 'items');\n\nexport const isGroupItems = <Item, GroupShape extends Group<Item> = Group<Item>>(\n items: readonly (Item | GroupShape)[],\n): items is GroupShape[] => {\n if (!Array.isArray(items)) return false;\n if (items.length === 0) return false; // Base UI treats empty as non-grouped\n return isGroupItem(items[0]); // Base UI checks only the first item\n};\n\n/** The options of a list, its groups flattened. */\nexport const flatItems = <Value>(list: readonly (Value | Group<Value>)[]) => {\n const items: Value[] = [];\n for (const entry of list) {\n if (!isGroupItem(entry)) items.push(entry);\n // One push per item: spreading a large group would exceed the engine's argument limit.\n else for (const item of entry.items) items.push(item);\n }\n return items;\n};\n\n/** The create row and Select All: each is drawn outside any group, even in a grouped list. */\nexport const isLooseItem = (item: unknown): item is CreatableItem | SelectAllItem =>\n isCreatableItem(item) || isSelectAllItem(item);\n\n/**\n * `items` as entries of `list`: one group without a label in a grouped list, else themselves.\n *\n * - Base UI reads the first entry to tell a grouped list, so every entry has to match it.\n * - The group never reaches `groupToLabel`: {@link isEntriesGroup} tells it apart.\n */\nexport const toEntries = <Item>(list: readonly unknown[], items: readonly Item[]) =>\n isGroupItems(list) ? [{ __marker: 'entries' as const, items }] : items;\n\n/** A group {@link toEntries} made; Base UI's filter keeps the marker, as it spreads each group. */\nexport const isEntriesGroup = (entry: unknown) =>\n isGroupItem(entry) && Reflect.get(entry, '__marker') === 'entries';\n\n/**\n * Node a list row and a chip show for an item.\n *\n * - Names a blank string, so a row or chip never renders as nothing; {@link toLabel} does not.\n * - A non-string `label` (a JSX node) passes through.\n */\nexport const defaultItemToLabel = <Item>(item: Item) => {\n if (isNumber(item)) return item;\n if (isString(item)) return namedLabel(item);\n if (!isLabeledItem(item))\n throw new Error(\n 'Combobox: Item does not have a `label` field. Pass `itemToLabel` for custom item shapes.',\n );\n\n return isString(item.label) ? namedLabel(item.label) : item.label;\n};\n\n/**\n * The node a row or a chip shows for an item when the caller passes no `itemToLabel`.\n *\n * - Names a blank `itemToStringLabel` result, which would otherwise render as nothing.\n * - Falls back to the item's own string: Base UI reports the outgoing selection for one render\n * after `items` and `itemToStringLabel` change together.\n */\nexport const defaultRowLabel = <Item>(itemToStringLabel?: (item: Item) => string) =>\n itemToStringLabel\n ? (item: Item) => namedLabel(itemToStringLabel(item) ?? toLabel(item))\n : defaultItemToLabel;\n\n/**\n * Display string for an item — mirrors Base UI's default.\n *\n * - Also the default search text and the closed `Combobox`'s input value.\n * - Does not name blank strings: `''` may mean \"nothing selected\", and must keep the placeholder.\n * - A labelled item with neither a label nor a value reads as `''`, like the string item `''`.\n * - Naming lives in {@link defaultItemToLabel}, read only by rows and chips.\n */\nexport const toLabel = (item: unknown): string => {\n if (isString(item)) return item;\n if (isLabeledItem(item)) return item.label || item.value || '';\n return String(item);\n};\n\n/** Equality key for an item — prefers `.value`. */\nconst toValueKey = (item: unknown): string => {\n if (isString(item)) return item;\n if (isLabeledItem(item)) return item.value || item.label || '';\n return String(item);\n};\n\nexport const defaultItemToIcon = <Item>(item: Item) =>\n isLabeledItem(item) ? item.icon : undefined;\n\nexport const defaultItemToDisabled = <Item>(item: Item) =>\n isLabeledItem(item) ? (item.disabled ?? false) : false;\n\n/** A group's `label`, as `Select` renders it; one that is not a node reads as none. */\nexport const defaultGroupToLabel = (group: object): ReactNode => {\n const label: unknown = Reflect.get(group, 'label');\n return isString(label) || isNumber(label) || isValidElement(label) ? label : undefined;\n};\n\n// Internal markers: LabeledItem-shaped sentinels injected into Base UI's items.\n// - `__marker` keeps consumer items and callbacks from colliding with them.\n\nexport const selectAllItem: SelectAllItem = {\n __marker: 'selectAll',\n value: '__select_all__',\n label: 'Select All',\n};\n\n/** Row for the group at `index` — keyed by position, like its collapse state. */\nexport const createGroupHeaderItem = (index: number): GroupHeaderItem => ({\n __marker: 'groupHeader',\n value: `__group_${index}__`,\n label: '',\n});\n\nexport const createCreatableItem = (query: string): CreatableItem => ({\n __marker: 'creatable',\n value: query,\n label: query,\n});\n\n/**\n * Item-equality predicate for a Base UI combobox root.\n *\n * - A sentinel equals a sentinel by marker and value key (the create row is rebuilt per keystroke).\n * - A sentinel never equals a real item.\n * - Real items use the caller's predicate, else `Object.is`.\n */\nexport const toItemEquality =\n <Value>(isItemEqualToValue?: (a: Value, b: Value) => boolean) =>\n (a: Value, b: Value) => {\n if (isInternalItem(a) || isInternalItem(b)) {\n return (\n isInternalItem(a) &&\n isInternalItem(b) &&\n a.__marker === b.__marker &&\n toValueKey(a) === toValueKey(b)\n );\n }\n return isItemEqualToValue?.(a, b) ?? Object.is(a, b);\n };\n\n/**\n * {@link toItemEquality} with a stable identity.\n *\n * - Base UI lists the comparer in an effect's deps; a new one per render re-renders every row.\n */\nexport const useItemEquality = <Value>(isItemEqualToValue?: (a: Value, b: Value) => boolean) =>\n useMemo(() => toItemEquality(isItemEqualToValue), [isItemEqualToValue]);\n\n/** `itemToStringValue` that also reads the create row, whose value is its query. */\nexport const withCreatableStringValue = <Value>(\n itemToStringValue: ((item: Value) => string) | undefined,\n allowCreate: boolean | undefined,\n) =>\n !allowCreate || !itemToStringValue\n ? itemToStringValue\n : (item: Value) => (isCreatableItem(item) ? item.value : itemToStringValue(item));\n\n/** {@link withCreatableStringValue} with a stable identity. */\nexport const useCreatableStringValue = <Value>(\n itemToStringValue: ((item: Value) => string) | undefined,\n allowCreate: boolean | undefined,\n) =>\n useMemo(\n () => withCreatableStringValue(itemToStringValue, allowCreate),\n [itemToStringValue, allowCreate],\n );\n\nexport const defaultToCreateValue = <Value>(\n query: string,\n value: Value | undefined,\n queryToCreateValue?: (query: string) => Value,\n): Value => {\n if (queryToCreateValue) return queryToCreateValue(query);\n if (value === undefined) return query as Value;\n if (isString(value)) return query as Value;\n if (isLabeledItem(value)) return { value: query, label: query } as Value;\n throw new Error(\n 'Combobox: Cannot infer item shape for `allowCreate`. Pass `queryToCreateValue` for custom item shapes.',\n );\n};\n\nexport const defaultQueryToCreateLabel = (query: string) => `Create \"${query}\"`;\n","import type { ReactNode } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { Badge } from '../Badge';\n\nimport { type BadgeColor, type BadgeVariant, ComboboxChip } from './ComboboxChip';\nimport { defaultItemToLabel, isInternalItem } from './utils';\n\ntype Props<Value> = {\n maxVisible?: number;\n itemToChipLabel?: (item: Value) => ReactNode;\n itemToChipColor?: (item: Value) => BadgeColor;\n /**\n * Non-removable chips ahead of the values, outside `maxVisible` and absent from `value`.\n */\n pinnedChipLabels?: ReactNode[];\n variant?: BadgeVariant;\n /**\n * Renders the chip area in place of the default chips; every other prop is then unused.\n */\n children?: (values: Value[]) => ReactNode;\n};\n\nexport const ComboboxChips = <Value,>({\n maxVisible = 3,\n itemToChipLabel = defaultItemToLabel,\n itemToChipColor,\n pinnedChipLabels,\n variant = 'pill',\n children,\n}: Props<Value>) => (\n <BaseCombobox.Value>\n {(rawValues: Value[]) => {\n // Drop the Select All marker Base UI keeps in `value`: it gets no chip and never reaches\n // the caller's `itemToChipLabel` / `itemToChipColor`.\n const values = rawValues.filter((value) => !isInternalItem(value));\n\n if (children) return children(values);\n\n const visible = values.slice(0, maxVisible);\n const overflow = values.slice(maxVisible);\n\n return (\n <>\n {pinnedChipLabels?.map((label, index) => (\n // oxlint-disable-next-line react/no-array-index-key\n <Badge key={index} className=\"tw:max-w-40\" variant={variant}>\n {label}\n </Badge>\n ))}\n\n {visible.map((value: Value, index) => (\n <ComboboxChip\n // oxlint-disable-next-line react/no-array-index-key\n key={index}\n color={itemToChipColor?.(value)}\n variant={variant}\n >\n {itemToChipLabel(value)}\n </ComboboxChip>\n ))}\n\n {overflow.length > 0 && (\n <Badge.Root variant=\"pill\">\n <Badge.Label>+{overflow.length}</Badge.Label>\n </Badge.Root>\n )}\n </>\n );\n }}\n </BaseCombobox.Value>\n);\n","import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { X } from '../../icons';\nimport { InputGroup } from '../InputGroup';\n\ntype Props = {\n disabled?: boolean;\n};\n\n/** The button that clears the selection. */\nexport const ComboboxClearButton = ({ disabled }: Props) => (\n <InputGroup.Button asChild aria-label=\"Clear\" disabled={disabled}>\n <BaseCombobox.Clear>\n <X className=\"tw:size-4\" />\n </BaseCombobox.Clear>\n </InputGroup.Button>\n);\n","import type { ComponentProps } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\n\nimport { cn } from '../../utils';\nimport { useArgoDesign } from '../ThemeProvider/context';\n\ntype PortalProps = ComponentProps<typeof BaseCombobox.Portal>;\ntype PositionerProps = ComponentProps<typeof BaseCombobox.Positioner>;\ntype PopupProps = Omit<ComponentProps<typeof BaseCombobox.Popup>, 'className'> & {\n className?: string;\n};\n\ntype Variant = 'default' | 'argo';\n\ntype Props = PopupProps &\n Pick<PositionerProps, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> &\n Pick<PortalProps, 'container'>;\n\nexport const ComboboxContent = ({\n ref,\n align = 'start',\n side = 'bottom',\n sideOffset = 4,\n alignOffset,\n anchor,\n container,\n className,\n children,\n ...popupProps\n}: Props) => {\n const effectiveVariant: Variant = useArgoDesign() ? 'argo' : 'default';\n return (\n <BaseCombobox.Portal container={container}>\n {/*\n * Registers the popup in Radix's layer stack.\n *\n * - Base UI portals the popup out of the DOM, so a surrounding Radix `Modal` / `Sheet` /\n * `Popover` would otherwise still count itself as topmost and close on Escape. Radix reads\n * the key off a document capture listener, so being a higher layer is the only lever.\n * - No `onDismiss`: Base UI closes the popup itself, the layer only claims the keystroke.\n */}\n <DismissableLayer asChild>\n <BaseCombobox.Positioner\n align={align}\n side={side}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"tw:isolate tw:z-[1055] tailwindcss-preflight\"\n >\n <BaseCombobox.Popup\n ref={ref}\n data-chips={!!anchor}\n data-variant={effectiveVariant}\n className={cn(\n 'tw:!pointer-events-auto',\n 'tw:group/combobox-content',\n 'tw:relative',\n 'tw:flex tw:flex-col tw:overflow-hidden',\n\n // sizing\n 'tw:max-h-[var(--available-height)]',\n 'tw:w-[var(--anchor-width)]',\n 'tw:max-w-[var(--available-width)]',\n 'tw:origin-[var(--transform-origin)]',\n 'tw:data-[chips=true]:min-w-[var(--anchor-width)]',\n\n // appearance\n 'tw:rounded-lg',\n 'tw:data-[variant=default]:rounded',\n\n 'tw:bg-popover',\n 'tw:text-popover-foreground',\n 'tw:shadow-md',\n 'tw:ring-1',\n 'tw:ring-foreground/10',\n 'tw:duration-100',\n\n // open animation\n 'data-open:animate-in',\n 'data-open:fade-in-0',\n 'data-open:zoom-in-95',\n\n // closed animation\n 'data-closed:animate-out',\n 'data-closed:fade-out-0',\n 'data-closed:zoom-out-95',\n\n // position animations\n 'tw:data-[side=bottom]:slide-in-from-top-2',\n 'tw:data-[side=top]:slide-in-from-bottom-2',\n 'tw:data-[side=left]:slide-in-from-right-2',\n 'tw:data-[side=right]:slide-in-from-left-2',\n 'tw:data-[side=inline-start]:slide-in-from-right-2',\n 'tw:data-[side=inline-end]:slide-in-from-left-2',\n className,\n )}\n {...popupProps}\n >\n {children}\n </BaseCombobox.Popup>\n </BaseCombobox.Positioner>\n </DismissableLayer>\n </BaseCombobox.Portal>\n );\n};\n","import type { ComponentProps } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { cn } from '../../utils';\n\ntype Props = Omit<ComponentProps<typeof BaseCombobox.Empty>, 'className'> & {\n className?: string;\n};\n\nexport const ComboboxEmpty = ({ ref, className, ...props }: Props) => (\n <BaseCombobox.Empty\n ref={ref}\n className={cn(\n 'tw:hidden',\n 'tw:group-data-[empty]/combobox-content:flex',\n 'tw:justify-center',\n 'tw:items-center',\n 'tw:text-center',\n 'tw:px-2',\n 'tw:text-muted-foreground',\n 'tw:py-6',\n className,\n )}\n {...props}\n />\n);\n","import type { ComponentProps } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport type { WithAccessibleName } from '../../utils/accessibleName';\nimport { InputGroup } from '../InputGroup';\n\n/** The input carries the `combobox` role, so the name is required here, not on the group. */\ntype Props = WithAccessibleName<Omit<ComponentProps<typeof BaseCombobox.Input>, 'render'>>;\n\nexport const ComboboxInput = ({ ref, ...props }: Props) => (\n <BaseCombobox.Input {...props} ref={ref} render={<InputGroup.Input />} />\n);\n","import type { ComponentProps } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { InputGroup } from '../InputGroup';\n\ntype InputGroupProps = Pick<\n ComponentProps<typeof InputGroup>,\n 'variant' | 'focusVariant' | 'sizing' | 'state'\n>;\n\ntype Props = InputGroupProps &\n Omit<ComponentProps<typeof BaseCombobox.InputGroup>, 'render' | 'className'> & {\n className?: string;\n };\n\nexport const ComboboxInputGroup = ({\n ref,\n state,\n variant,\n sizing,\n focusVariant,\n className,\n ...props\n}: Props) => (\n <BaseCombobox.InputGroup\n {...props}\n ref={ref}\n render={\n <InputGroup\n state={state}\n variant={variant}\n focusVariant={focusVariant}\n sizing={sizing}\n className={className}\n />\n }\n />\n);\n","import type { ComponentProps } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { Check } from '../../icons';\nimport { cn } from '../../utils';\n\ntype Variant = 'check' | 'checkbox';\n\ntype Props = Omit<ComponentProps<typeof BaseCombobox.ItemIndicator>, 'className' | 'children'> & {\n className?: string;\n variant?: Variant;\n};\n\nexport const ComboboxItemIndicator = ({ ref, className, variant = 'check', ...props }: Props) => {\n if (variant === 'checkbox') {\n return (\n <BaseCombobox.ItemIndicator\n ref={ref}\n keepMounted\n className={cn(\n 'tw:group/combobox-item-indicator',\n\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:justify-center',\n 'tw:size-4',\n 'tw:shrink-0',\n\n 'tw:rounded',\n 'tw:border',\n 'tw:border-input',\n 'tw:bg-background',\n\n 'tw:data-[selected]:bg-primary',\n 'tw:data-[selected]:border-primary',\n className,\n )}\n {...props}\n >\n <Check\n className={cn(\n 'tw:hidden',\n 'tw:size-3',\n 'tw:stroke-[4px]',\n 'tw:!text-primary-foreground',\n 'tw:group-data-[selected]/combobox-item-indicator:block',\n )}\n />\n </BaseCombobox.ItemIndicator>\n );\n }\n\n return (\n <BaseCombobox.ItemIndicator\n {...props}\n ref={ref}\n className={cn(\n 'tw:pointer-events-none',\n 'tw:absolute',\n 'tw:right-2',\n\n 'tw:group-data-[variant=default]/combobox-content:right-4',\n // `render={<Check />}` makes the icon the indicator element itself (not a descendant), so a\n // `[&_svg]` rule never matches it — size it directly or Lucide renders at its 24px default.\n 'tw:size-4',\n 'tw:group-data-[highlighted]/combobox-item:text-accent-foreground',\n 'tw:group-data-[variant=default]/combobox-content:group-data-[highlighted]/combobox-item:text-secondary-foreground',\n className,\n )}\n render={<Check />}\n />\n );\n};\n","import { createContext, useRef } from 'react';\n\nimport { isGroupItems } from './utils';\n\n/** Above this many options, `virtualized=\"auto\"` windows the list. */\nconst VIRTUALIZE_THRESHOLD = 30;\n\nexport type VirtualizedProps = {\n /** Puts only the rows in view into the DOM: `'auto'` past 30 options, grouped or not; `true` always. */\n virtualized?: boolean | 'auto';\n};\n\n/** Scrolls the option at Base UI's flat `index` into view, unless it is in view already. */\nexport type VirtualListHandle = { scrollToItem: (index: number) => void };\n\n/**\n * The position a windowed list gives each option it renders.\n *\n * - `index` is the option's place in Base UI's flat filtered list, which keyboard navigation counts.\n * - `aria-setsize` / `aria-posinset` keep the set's length known while most options are out of the DOM.\n * - `undefined` outside a windowed list, so a fully rendered list keeps its markup.\n */\nexport const VirtualRowContext = createContext<\n { index: number; 'aria-setsize': number; 'aria-posinset': number } | undefined\n>(undefined);\n\n/**\n * Whether a combobox windows its list, and what ties Base UI's highlight to the window.\n *\n * - `'auto'` counts options, not groups, so a list of a few large groups windows too.\n * - `onItemHighlighted` scrolls a row the keyboard reached into view; a pointer is over its row.\n * - `ref` goes to `ComboboxVirtualList`.\n */\nexport const useVirtualList = (\n items: readonly unknown[],\n virtualized: NonNullable<VirtualizedProps['virtualized']>,\n) => {\n const ref = useRef<VirtualListHandle>(null);\n const count = isGroupItems(items)\n ? items.reduce((sum, group) => sum + group.items.length, 0)\n : items.length;\n\n return {\n enabled: virtualized === 'auto' ? count > VIRTUALIZE_THRESHOLD : virtualized,\n ref,\n onItemHighlighted: ({ reason, index }: { reason: string; index: number }) => {\n if (reason !== 'pointer') ref.current?.scrollToItem(index);\n },\n };\n};\n","import { type ComponentProps, type ReactNode, use } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { cn } from '../../utils';\n\nimport { ComboboxItemIndicator } from './ComboboxItemIndicator';\nimport { VirtualRowContext } from './virtualList';\n\ntype Props = Omit<ComponentProps<typeof BaseCombobox.Item>, 'className'> & {\n className?: string;\n icon?: ReactNode;\n /** `'none'` leaves the row without one — a row that draws its own state in `icon`. */\n indicator?: ComponentProps<typeof ComboboxItemIndicator>['variant'] | 'none';\n};\n\nexport const ComboboxItem = ({\n ref,\n className,\n children,\n icon,\n indicator: variant = 'check',\n ...props\n}: Props) => (\n <BaseCombobox.Item\n {...props}\n {...use(VirtualRowContext)}\n ref={ref}\n data-slot=\"combobox-item\"\n className={cn(\n 'tw:group/combobox-item',\n // layout\n 'tw:relative',\n 'tw:flex',\n 'tw:flex-1',\n 'tw:items-center',\n 'tw:gap-2',\n\n // spacing\n 'tw:py-2',\n 'tw:px-2',\n 'tw:group-data-[variant=default]/combobox-content:px-4',\n 'tw:rounded-lg',\n 'tw:group-data-[variant=default]/combobox-content:rounded-none',\n\n // typography\n 'tw:text-sm',\n 'tw:select-none',\n 'tw:cursor-default',\n 'tw:outline-hidden',\n\n // highlighted (keyboard / hover)\n 'tw:data-[highlighted]:bg-accent',\n // The legacy highlight is a neutral step, not the argo accent.\n //\n // - `secondary` carries its own foreground, so fill and ink move together.\n // - `muted` is unusable: in dark it equals `popover`, so the band would disappear\n // into the listbox.\n 'tw:group-data-[variant=default]/combobox-content:data-[highlighted]:bg-secondary',\n 'tw:data-[highlighted]:text-accent-foreground',\n 'tw:group-data-[variant=default]/combobox-content:data-[highlighted]:text-secondary-foreground',\n\n // disabled\n 'tw:data-disabled:pointer-events-none',\n 'tw:data-disabled:opacity-50',\n\n // child svg defaults\n 'tw:[&_svg]:pointer-events-none',\n 'tw:[&_svg]:shrink-0',\n 'tw:[&_svg]:text-muted-foreground',\n \"tw:[&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n >\n {variant !== 'none' && <ComboboxItemIndicator variant={variant} />}\n {icon}\n {/* Wraps rather than truncates: similar names often differ only at the end. */}\n <span className=\"tw:min-w-0 tw:wrap-anywhere\">{children}</span>\n </BaseCombobox.Item>\n);\n","import type { ComponentProps } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { cn } from '../../utils';\n\ntype Props = Omit<ComponentProps<typeof BaseCombobox.List>, 'className'> & {\n className?: string;\n};\n\nexport const ComboboxList = ({ ref, className, ...props }: Props) => (\n <BaseCombobox.List\n ref={ref}\n className={cn(\n 'tw:no-scrollbar',\n 'tw:scroll-py-1',\n 'tw:overflow-y-auto',\n 'tw:overscroll-contain',\n 'tw:min-h-0',\n 'tw:flex-1',\n\n 'tw:p-2',\n 'tw:data-[empty]:p-0',\n 'tw:group-data-[variant=default]/combobox-content:p-0',\n className,\n )}\n {...props}\n />\n);\n","import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { ChevronDown, Loader2 } from '../../icons';\nimport { InputGroup } from '../InputGroup';\n\ntype Props = {\n disabled?: boolean;\n isLoading: boolean;\n};\n\n/**\n * The button that opens the popup: a chevron, or a spinner while the options are loading.\n *\n * - The spinner swaps in for the icon inside the one button, which costs the control no width, so\n * the input keeps its room whether or not a request is in flight.\n * - The button keeps opening the popup while loading, so a list that already has items stays\n * reachable.\n */\nexport const ComboboxOpenButton = ({ disabled, isLoading }: Props) => (\n <InputGroup.Button disabled={disabled} asChild aria-label=\"Open combobox\">\n <BaseCombobox.Trigger>\n {isLoading ? (\n <Loader2 className=\"tw:size-4 tw:animate-spin\" />\n ) : (\n <ChevronDown className=\"tw:size-4\" />\n )}\n </BaseCombobox.Trigger>\n </InputGroup.Button>\n);\n","import type { MouseEvent, ReactNode } from 'react';\n\nimport { Check, ChevronRight, Minus } from '../../../icons';\nimport { cn } from '../../../utils';\nimport { ComboboxItem } from '../ComboboxItem';\n\n/** Indent of a header's children (chevron + gap); the legacy variant pads its rows wider. */\nexport const GROUP_CHILD_INDENT = 'tw:pl-8 tw:group-data-[variant=default]/combobox-content:pl-10';\n\ntype Props = {\n value: unknown;\n children: ReactNode;\n /** `undefined` for a group that does not collapse — no chevron. */\n expanded?: boolean;\n onToggle: () => void;\n /**\n * `'mixed'` for a partial selection; `undefined` for an unselectable row that toggles on press.\n * Drawn here: Base UI would put its indicator ahead of the chevron.\n */\n checked?: boolean | 'mixed';\n /** The children's indicator, mirrored by a `checked` row. */\n indicator?: 'check' | 'checkbox';\n disabled?: boolean;\n};\n\n/**\n * A group's own row, standing for the whole group.\n *\n * - Keyboard-navigable like any other row.\n * - The chevron toggles by pointer; `ArrowRight` / `ArrowLeft` are handled by the owning control.\n */\nexport const ComboboxGroupHeader = ({\n value,\n children,\n expanded,\n onToggle,\n checked,\n indicator = 'check',\n disabled,\n}: Props) => {\n const toggleFromChevron = (event: MouseEvent) => {\n // Keep the chevron's click from selecting a selectable row.\n event.stopPropagation();\n onToggle();\n };\n\n return (\n <ComboboxItem\n value={value}\n disabled={disabled}\n // An option allows no `aria-expanded`; screen readers read the description after the name.\n aria-description={expanded === undefined ? undefined : expanded ? 'Expanded' : 'Collapsed'}\n {...(checked !== undefined && { 'aria-selected': checked === true })}\n indicator=\"none\"\n className=\"tw:font-medium\"\n onClick={\n checked !== undefined\n ? undefined\n : (event) => {\n event.preventBaseUIHandler();\n onToggle();\n }\n }\n icon={\n <>\n {expanded !== undefined && (\n <span\n aria-hidden\n data-slot=\"combobox-group-toggle\"\n className=\"tw:inline-flex tw:shrink-0\"\n onClick={toggleFromChevron}\n >\n <ChevronRight className={cn('tw:transition-transform', expanded && 'tw:rotate-90')} />\n </span>\n )}\n {checked !== undefined && <GroupIndicator checked={checked} variant={indicator} />}\n </>\n }\n >\n {children}\n </ComboboxItem>\n );\n};\n\n/**\n * A group row's selection mark: all, some, or none.\n *\n * - Base UI's indicator is binary, so the row draws its own.\n * - `checkbox` matches the children's leading box; `check` their trailing mark.\n */\nconst GroupIndicator = ({\n checked,\n variant,\n}: {\n checked: boolean | 'mixed';\n variant: 'check' | 'checkbox';\n}) => {\n const Mark = checked === 'mixed' ? Minus : Check;\n\n if (variant === 'checkbox') {\n return (\n <span\n aria-hidden\n data-checked={checked}\n className={cn(\n 'tw:inline-flex tw:size-4 tw:shrink-0 tw:items-center tw:justify-center',\n 'tw:rounded tw:border tw:border-input tw:bg-background',\n checked !== false && 'tw:border-primary tw:bg-primary',\n )}\n >\n {checked !== false && (\n <Mark className=\"tw:size-3 tw:stroke-[4px] tw:!text-primary-foreground\" />\n )}\n </span>\n );\n }\n\n if (checked === false) return null;\n\n return (\n <Mark\n aria-hidden\n className={cn(\n 'tw:pointer-events-none tw:absolute tw:right-2 tw:size-4',\n 'tw:group-data-[variant=default]/combobox-content:right-4',\n 'tw:group-data-[highlighted]/combobox-item:text-accent-foreground',\n 'tw:group-data-[variant=default]/combobox-content:group-data-[highlighted]/combobox-item:text-secondary-foreground',\n )}\n />\n );\n};\n","import type { ComponentProps } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { cn } from '../../../utils';\n\ntype Props = Omit<ComponentProps<typeof BaseCombobox.Group>, 'className'> & {\n className?: string;\n};\n\nexport const ComboboxGroup = ({ ref, className, children, ...props }: Props) => (\n <BaseCombobox.Group\n ref={ref}\n className={cn('tw:flex tw:flex-col tw:gap-0.5', className)}\n {...props}\n >\n {children}\n </BaseCombobox.Group>\n);\n","import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { cn } from '../../../utils';\n\ntype Props = Omit<BaseCombobox.GroupLabel.Props, 'className'> & {\n className?: string;\n};\n\nexport const ComboboxGroupLabel = ({ ref, className, ...props }: Props) => (\n <BaseCombobox.GroupLabel\n {...props}\n ref={ref}\n className={cn(\n // Base (argo variant) — soft gray section label.\n 'tw:px-2',\n 'tw:py-1.5',\n 'tw:text-xs',\n 'tw:font-medium',\n 'tw:leading-none',\n 'tw:text-muted-foreground',\n\n 'tw:group-data-[variant=default]/combobox-content:uppercase',\n 'tw:group-data-[variant=default]/combobox-content:font-semibold',\n 'tw:group-data-[variant=default]/combobox-content:tracking-wider',\n 'tw:group-data-[variant=default]/combobox-content:text-[11px]',\n 'tw:group-data-[variant=default]/combobox-content:text-black',\n 'tw:group-data-[variant=default]/combobox-content:pt-2',\n 'tw:group-data-[variant=default]/combobox-content:px-4',\n\n className,\n )}\n />\n);\n","import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\ntype Props = BaseCombobox.Collection.Props;\n\nexport const ComboboxCollection = ({ ...props }: Props) => (\n <BaseCombobox.Collection data-slot=\"combobox-collection\" {...props} />\n);\n","import { Fragment, type ReactNode } from 'react';\n\nimport { ComboboxList } from './ComboboxList';\nimport { ComboboxCollection, ComboboxGroup, ComboboxGroupLabel } from './Group';\nimport type { Group, ListRenderProps } from './types';\nimport { isGroupItem, isLooseItem } from './utils';\n\n/** A Base UI collection child whose rows are keyed by position, as React matches unkeyed ones. */\nconst keyed =\n <Entry,>(render: (entry: Entry) => ReactNode) =>\n (entry: Entry, index: number) =>\n (\n // oxlint-disable-next-line react/no-array-index-key\n <Fragment key={index}>{render(entry)}</Fragment>\n );\n\n/** A combobox list that renders every row; `ComboboxVirtualList` renders only those in view. */\nexport const ComboboxFullList = <Value, GroupShape extends Group<Value> = Group<Value>>({\n renderItem,\n renderGroupItem,\n groupToLabel,\n}: ListRenderProps<Value, GroupShape>) => {\n const renderEntry = (entry: Value | GroupShape) => {\n if (!isGroupItem(entry)) return renderItem(entry);\n\n const [lead] = entry.items;\n if (isLooseItem(lead)) return renderItem(lead);\n\n const label = groupToLabel?.(entry);\n return (\n <ComboboxGroup items={entry.items}>\n {label && <ComboboxGroupLabel>{label}</ComboboxGroupLabel>}\n <ComboboxCollection>{keyed(renderGroupItem)}</ComboboxCollection>\n </ComboboxGroup>\n );\n };\n\n return <ComboboxList>{keyed(renderEntry)}</ComboboxList>;\n};\n","import { Loader2 } from '../../icons';\n\n/**\n * What the empty slot says while the options are loading, in place of the `empty` node.\n *\n * - `Combobox.Empty` is a polite live region, so the switch to this text and back to `empty` once\n * the request settles is announced.\n * - Base UI renders the slot only while the list has nothing to show, so a list that already has\n * items keeps showing them.\n */\nexport const ComboboxLoadingEmpty = () => (\n <span className=\"tw:inline-flex tw:items-center tw:gap-2\">\n <Loader2 className=\"tw:size-4 tw:animate-spin\" />\n Loading…\n </span>\n);\n","import {\n type CSSProperties,\n type ReactNode,\n type Ref,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\nimport {\n measureElement,\n observeElementRect,\n useVirtualizer,\n type VirtualItem,\n} from '@tanstack/react-virtual';\n\nimport { useElement } from '../../hooks/useElement';\n\nimport { ComboboxList } from './ComboboxList';\nimport { ComboboxGroup, ComboboxGroupLabel } from './Group';\nimport type { Group, ListRenderProps } from './types';\nimport { isGroupItem, isGroupItems, isLooseItem } from './utils';\nimport { type VirtualListHandle, VirtualRowContext } from './virtualList';\n\n/** Rows rendered past each edge of the viewport, so a fast scroll does not paint blank. */\nconst OVERSCAN = 12;\n\ntype ItemRow<Value> = {\n type: 'item';\n item: Value;\n /** Place in Base UI's flat filtered list. */\n index: number;\n setSize: number;\n posInSet: number;\n};\n\ntype Row<Value> = (ItemRow<Value> | { type: 'label' }) & {\n /** The group whose wrapper the row shares; `undefined` for a row outside any group. */\n group?: string;\n /** Spaced from the row above by the gap a fully rendered group puts between its children. */\n padded: boolean;\n};\n\ntype Kind = 'label' | 'padded' | 'plain';\nconst kindOf = (row: Row<unknown>): Kind =>\n row.type === 'label' ? 'label' : row.padded ? 'padded' : 'plain';\n\n/**\n * Base UI's filtered entries as one row per option or group label, in list order.\n *\n * - A group whose lone item is the create row or Select All stays outside any group, as the fully\n * rendered list draws it.\n * - `aria-setsize` counts the options sharing a parent, as a browser does for a rendered list.\n */\nconst toRows = <Value, GroupShape extends Group<Value>>(\n entries: readonly (Value | GroupShape)[],\n groupToLabel: ((group: GroupShape) => ReactNode) | undefined,\n) => {\n const rows: Row<Value>[] = [];\n const rowOfItem: number[] = [];\n const labels = new Map<string, ReactNode>();\n const push = (item: Value, row: Omit<Row<Value> & ItemRow<Value>, 'type' | 'item' | 'index'>) => {\n rows.push({ type: 'item', item, index: rowOfItem.length, ...row });\n rowOfItem.push(rows.length - 1);\n };\n\n if (!isGroupItems<Value, GroupShape>(entries)) {\n const items = entries.filter((entry): entry is Value => !isGroupItem(entry));\n items.forEach((item, i) =>\n push(item, { padded: false, setSize: items.length, posInSet: i + 1 }),\n );\n return { rows, rowOfItem, labels };\n }\n\n const isLoose = (group: GroupShape) => isLooseItem(group.items[0]);\n const looseCount = entries.filter(isLoose).length;\n let loosePosition = 0;\n\n entries.forEach((entry, groupIndex) => {\n if (isLoose(entry)) {\n for (const item of entry.items) {\n push(item, { padded: false, setSize: looseCount, posInSet: ++loosePosition });\n }\n return;\n }\n\n const group = `group-${groupIndex}`;\n const label = groupToLabel?.(entry);\n if (label) {\n labels.set(group, label);\n rows.push({ type: 'label', group, padded: false });\n }\n entry.items.forEach((item, i) =>\n push(item, {\n group,\n padded: Boolean(label) || i > 0,\n setSize: entry.items.length,\n posInSet: i + 1,\n }),\n );\n });\n\n return { rows, rowOfItem, labels };\n};\n\ntype Props<Value, GroupShape extends Group<Value>> = ListRenderProps<Value, GroupShape> & {\n ref?: Ref<VirtualListHandle>;\n};\n\n/**\n * A combobox list that puts only the rows in view into the DOM.\n *\n * - Lists what Base UI filtered, so search and keyboard navigation cover every option.\n * - A group keeps its `role=\"group\"` wrapper, and its name while its label row is out of view.\n * - Rows keep their own height; a row not yet rendered is estimated from those that were.\n */\nexport const ComboboxVirtualList = <Value, GroupShape extends Group<Value> = Group<Value>>({\n renderItem,\n renderGroupItem,\n groupToLabel,\n ref,\n}: Props<Value, GroupShape>) => {\n // State, not a ref: the list mounts with the popup, and its top padding — which the rows start\n // below — is read once it has.\n const [listElement, attachList] = useElement();\n const scrollMargin = useMemo(\n () => (listElement ? Number.parseFloat(getComputedStyle(listElement).paddingTop) || 0 : 0),\n [listElement],\n );\n const filteredItems = BaseCombobox.useFilteredItems<Value | GroupShape>();\n const { rows, rowOfItem, labels } = useMemo(\n () => toRows<Value, GroupShape>(filteredItems, groupToLabel),\n [filteredItems, groupToLabel],\n );\n\n // The smallest height each kind of row has rendered at; 1rem stands in until one has.\n const sizesRef = useRef<Partial<Record<Kind, number>>>({});\n const [rem] = useState(\n () => Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 0,\n );\n\n const virtualizer = useVirtualizer({\n count: rows.length,\n getScrollElement: () => listElement,\n estimateSize: (index) => {\n const row = rows[index];\n const measured = sizesRef.current;\n return (row && measured[kindOf(row)]) ?? measured.plain ?? measured.padded ?? rem;\n },\n measureElement: (element, entry, instance) => {\n const size = measureElement(element, entry, instance);\n const row = rows[instance.indexFromElement(element)];\n if (row) {\n const kind = kindOf(row);\n sizesRef.current[kind] = Math.min(sizesRef.current[kind] ?? size, size);\n }\n return size;\n },\n // The popup is unbounded until Base UI positions it, and never taller than the window once it\n // is — so the first reading would otherwise mount every row.\n observeElementRect: (instance, callback) =>\n observeElementRect(instance, (rect) =>\n callback({\n ...rect,\n height: Math.min(rect.height, instance.targetWindow?.innerHeight ?? rect.height),\n }),\n ),\n overscan: OVERSCAN,\n scrollMargin,\n });\n\n useImperativeHandle(ref, () => ({\n scrollToItem: (index) => {\n const row = rowOfItem[index];\n if (row !== undefined) virtualizer.scrollToIndex(row, { align: 'auto' });\n },\n }));\n\n // Consecutive rows of one group share its wrapper; a row outside any group stands alone.\n const segments: { group?: string; start: number; items: VirtualItem[] }[] = [];\n for (const virtualItem of virtualizer.getVirtualItems()) {\n const group = rows[virtualItem.index]?.group;\n const last = segments.at(-1);\n if (group !== undefined && last?.group === group) last.items.push(virtualItem);\n else segments.push({ group, start: virtualItem.start, items: [virtualItem] });\n }\n\n const placeAt = (start: number): CSSProperties => ({\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${start - scrollMargin}px)`,\n });\n\n const renderRow = ({ key, index, start }: VirtualItem) => {\n const row = rows[index];\n if (!row) return null;\n return (\n <div\n key={key}\n data-index={index}\n ref={virtualizer.measureElement}\n className={row.padded ? 'tw:pt-0.5' : undefined}\n style={row.group === undefined ? placeAt(start) : undefined}\n >\n {row.type === 'label' ? (\n <ComboboxGroupLabel>{labels.get(row.group ?? '')}</ComboboxGroupLabel>\n ) : (\n <VirtualRowContext\n value={{\n index: row.index,\n 'aria-setsize': row.setSize,\n 'aria-posinset': row.posInSet,\n }}\n >\n {row.group === undefined ? renderItem(row.item) : renderGroupItem(row.item)}\n </VirtualRowContext>\n )}\n </div>\n );\n };\n\n return (\n <ComboboxList ref={attachList}>\n <div\n style={{ position: 'relative', width: '100%', height: `${virtualizer.getTotalSize()}px` }}\n >\n {segments.flatMap(({ group, start, items }) => {\n if (group === undefined) return items.map(renderRow);\n\n const label = labels.get(group);\n const labelInView = items.some((item) => rows[item.index]?.type === 'label');\n return (\n <ComboboxGroup key={group} className=\"tw:gap-0\" style={placeAt(start)}>\n {label && !labelInView && (\n <ComboboxGroupLabel className=\"tw:sr-only\">{label}</ComboboxGroupLabel>\n )}\n {items.map(renderRow)}\n </ComboboxGroup>\n );\n })}\n </div>\n </ComboboxList>\n );\n};\n","import { type ComponentProps, type ReactNode, type Ref, useCallback } from 'react';\n\nimport { Plus } from '../../icons';\n\nimport { ComboboxGroupHeader, GROUP_CHILD_INDENT } from './Group/ComboboxGroupHeader';\nimport { ComboboxEmpty } from './ComboboxEmpty';\nimport { ComboboxFullList } from './ComboboxFullList';\nimport { ComboboxItem } from './ComboboxItem';\nimport { ComboboxLoadingEmpty } from './ComboboxLoadingEmpty';\nimport { ComboboxVirtualList } from './ComboboxVirtualList';\nimport type { GroupHeaders } from './groupHeaders';\nimport type { Group } from './types';\nimport { isCreatableItem, isEntriesGroup, isSelectAllItem } from './utils';\nimport type { VirtualListHandle } from './virtualList';\n\ntype GroupHeaderProps = ComponentProps<typeof ComboboxGroupHeader>;\n\ntype Props<Value, GroupShape extends Group<Value>> = {\n isLoading: boolean;\n empty: ReactNode;\n /** Windows the list; `listRef` then reaches the windowed list. */\n virtualized: boolean;\n listRef: Ref<VirtualListHandle>;\n groupHeaders: GroupHeaders<Value, GroupShape>;\n groupToLabel: (group: GroupShape) => ReactNode;\n indicator?: GroupHeaderProps['indicator'];\n itemToLabel: (item: Value) => ReactNode;\n itemToIcon: (item: Value) => ReactNode;\n itemToDisabled: (item: Value) => boolean;\n /** The create row's text; receives the row's value. */\n createLabel: (value: string) => ReactNode;\n /** A selectable group row's mark and state; left unset, a group row only folds. */\n groupRowState?: (row: Value) => Required<Pick<GroupHeaderProps, 'checked' | 'disabled'>>;\n};\n\n/**\n * What a combobox popup lists: every row, the empty slot, and the loading text in it.\n *\n * - The list is windowed while `virtualized`, fully rendered otherwise.\n */\nexport const ComboboxOptions = <Value, GroupShape extends Group<Value> = Group<Value>>({\n isLoading,\n empty,\n virtualized,\n listRef,\n groupHeaders,\n groupToLabel,\n indicator,\n itemToLabel,\n itemToIcon,\n itemToDisabled,\n createLabel,\n groupRowState,\n}: Props<Value, GroupShape>) => {\n const renderItem = (item: Value, className?: string) => {\n if (isSelectAllItem(item)) {\n return (\n <ComboboxItem value={item} indicator=\"checkbox\">\n {item.label}\n </ComboboxItem>\n );\n }\n if (isCreatableItem(item)) {\n return (\n <ComboboxItem value={item} icon={<Plus />}>\n {createLabel(item.value)}\n </ComboboxItem>\n );\n }\n\n return (\n <ComboboxItem\n value={item}\n indicator={indicator}\n icon={itemToIcon(item)}\n disabled={itemToDisabled(item)}\n className={className}\n >\n {itemToLabel(item)}\n </ComboboxItem>\n );\n };\n\n const renderGroupItem = (item: Value) => {\n const header = groupHeaders.headerOf(item);\n if (!header) return renderItem(item, groupHeaders.collapsible ? GROUP_CHILD_INDENT : undefined);\n\n const state = groupRowState?.(item);\n return (\n <ComboboxGroupHeader\n value={item}\n expanded={groupHeaders.collapsible ? !header.collapsed : undefined}\n onToggle={() => groupHeaders.toggle(header.index)}\n checked={state?.checked}\n indicator={indicator}\n disabled={state?.disabled ?? false}\n >\n {groupToLabel(header.group)}\n </ComboboxGroupHeader>\n );\n };\n\n // Skips the group `toEntries` made; stable, since the windowed list memoizes its rows on it.\n const labelOfGroup = useCallback(\n (group: GroupShape) => (isEntriesGroup(group) ? undefined : groupToLabel(group)),\n [groupToLabel],\n );\n\n const listProps = {\n renderItem,\n renderGroupItem,\n groupToLabel: groupHeaders.enabled ? undefined : labelOfGroup,\n };\n\n return (\n <>\n <ComboboxEmpty>{isLoading ? <ComboboxLoadingEmpty /> : empty}</ComboboxEmpty>\n {virtualized ? (\n <ComboboxVirtualList<Value, GroupShape> ref={listRef} {...listProps} />\n ) : (\n <ComboboxFullList<Value, GroupShape> {...listProps} />\n )}\n </>\n );\n};\n","import { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nexport const ComboboxRoot = <Value, Multiple extends boolean | undefined = false>(\n props: BaseCombobox.Root.Props<Value, Multiple>,\n) => <BaseCombobox.Root {...props} />;\n","import type { ComponentProps } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { cn } from '../../utils';\n\ntype Props = Omit<ComponentProps<typeof BaseCombobox.Separator>, 'className'> & {\n className?: string;\n};\n\nexport const ComboboxSeparator = ({ ref, className, ...props }: Props) => (\n <BaseCombobox.Separator\n ref={ref}\n className={cn('tw:mx-2 tw:my-1 tw:h-px tw:bg-border', className)}\n {...props}\n />\n);\n","import { useMemo } from 'react';\n\nimport { toEntries } from './utils';\n\n/**\n * `list` followed by the values `allowCreate` minted, as entries of it; stable while both are.\n *\n * - Listed so a created value stays pickable: Base UI drops a value missing from `items`.\n */\nexport const useWithCreated = <Entry, Value>(list: readonly Entry[], created: readonly Value[]) =>\n useMemo(\n () => (created.length === 0 ? list : [...list, ...toEntries(list, created)]),\n [list, created],\n );\n","import { type KeyboardEvent, useRef, useState } from 'react';\nimport type { BaseUIEvent } from '@base-ui/react/types';\n\nimport type { Group } from './types';\nimport { createGroupHeaderItem, isGroupItems } from './utils';\n\ntype Header<Value, GroupShape extends Group<Value>> = {\n group: GroupShape;\n index: number;\n /** Whether the group hides its items — never while a query is active. */\n collapsed: boolean;\n /** Items matching the query — all of them without a query. */\n matching: readonly Value[];\n};\n\ntype Options<Value, GroupShape extends Group<Value>> = {\n items: readonly (Value | GroupShape)[];\n collapsible: boolean;\n selectable: boolean;\n query: string;\n /** Only called while there is a query. */\n matches: (item: Value) => boolean;\n /** The value a group's row stands for (`Combobox`); unset, the row is a sentinel. */\n groupToValue?: (group: GroupShape) => Value;\n /** Also tells the sentinel rows apart. */\n isItemEqualToValue: (a: Value, b: Value) => boolean;\n};\n\n/**\n * Gives each group a row (rendered with `ComboboxGroupHeader`) and collapses groups on request.\n *\n * - The row is the group's first item, so Base UI navigates, filters and presses it.\n * - A collapsed group hands Base UI only its row: Base UI never filters an empty query.\n * - A query shows every match regardless of collapse; a row shows only while its group matches.\n * - Collapse state is keyed by a group's position in `items`.\n */\nexport const useGroupHeaders = <Value, GroupShape extends Group<Value>>({\n items,\n collapsible,\n selectable,\n query,\n matches,\n groupToValue,\n isItemEqualToValue,\n}: Options<Value, GroupShape>) => {\n const [collapsedIndexes, setCollapsedIndexes] = useState<ReadonlySet<number>>(() => new Set());\n const highlightedRef = useRef<unknown>(undefined);\n\n const enabled = (collapsible || selectable) && isGroupItems<Value, GroupShape>(items);\n const headers = new Map<unknown, Header<Value, GroupShape>>();\n\n const listItems = !enabled\n ? items\n : items.map((group, index) => {\n const collapsed = collapsible && query === '' && collapsedIndexes.has(index);\n const matching = query === '' ? group.items : group.items.filter(matches);\n const row = groupToValue ? groupToValue(group) : createGroupHeaderItem(index);\n headers.set(row, { group, index, collapsed, matching });\n\n return { ...group, items: collapsed ? [row] : [row, ...group.items] };\n });\n\n const toggle = (index: number) =>\n setCollapsedIndexes((prev) => {\n const next = new Set(prev);\n if (!next.delete(index)) next.add(index);\n return next;\n });\n\n const headerOf = (item: unknown) => headers.get(item);\n\n // Rows are rebuilt every render, so fall back to equality for the highlighted row.\n const highlightedHeader = () => {\n const item = highlightedRef.current;\n if (item === undefined) return undefined;\n const header = headers.get(item);\n if (header) return header;\n for (const [row, entry] of headers) {\n if (isItemEqualToValue(row as Value, item as Value)) return entry;\n }\n return undefined;\n };\n\n return {\n enabled,\n /** `items` with group rows added and collapsed groups' items removed. */\n items: listItems,\n collapsible,\n headerOf,\n toggle,\n /** `filter` verdict for a group row (matches while its group does); `undefined` otherwise. */\n filterHeader: (item: unknown) => {\n const header = headerOf(item);\n return header ? header.matching.length > 0 : undefined;\n },\n /** For the root's `onItemHighlighted`: which row the keyboard would toggle. */\n onItemHighlighted: (item: unknown) => {\n highlightedRef.current = item;\n },\n /** For the root's `onOpenChange`: a closed popup has no highlighted row to toggle. */\n onOpenChange: (open: boolean) => {\n if (!open) highlightedRef.current = undefined;\n },\n /**\n * For the input's `onKeyDown`: `ArrowRight` / `ArrowLeft` expand / collapse the highlighted row.\n * Only without a query; also stops Base UI moving to the chips.\n */\n onInputKeyDown: (event: BaseUIEvent<KeyboardEvent<HTMLInputElement>>) => {\n if (!collapsible || query !== '') return;\n if (event.key !== 'ArrowRight' && event.key !== 'ArrowLeft') return;\n const header = highlightedHeader();\n if (!header) return;\n\n event.preventDefault();\n event.preventBaseUIHandler();\n if (header.collapsed === (event.key === 'ArrowRight')) toggle(header.index);\n },\n };\n};\n\nexport type GroupHeaders<Value, GroupShape extends Group<Value>> = ReturnType<\n typeof useGroupHeaders<Value, GroupShape>\n>;\n","import { useEffect } from 'react';\n\nimport { useStableCallback } from '../../hooks/useStableCallback';\nimport { noop } from '../../utils';\n\n/**\n * The text a combobox's input takes, with `inputValueSanitizer` applied to what the user typed.\n *\n * - `input-change` is the only reason carrying typed text. Every other one carries text the\n * control itself put there — an item's label, or the empty string a clear leaves — which a\n * sanitizer aimed at typed characters would mangle.\n * - A sanitizer sees the whole text on every keystroke, so it has to rewrite rather than drop:\n * one calling `trim()` swallows the space before the next word.\n */\nexport const sanitizeTypedInput = (\n next: string,\n reason: string,\n sanitizer: ((input: string) => string) | undefined,\n) => (reason === 'input-change' ? (sanitizer?.(next) ?? next) : next);\n\n/**\n * Reports the query the list filters by to the control's owner.\n *\n * - Fires from an effect rather than the input handler because `query` is derived: in `Combobox`\n * a selection showing its own label empties it without a keystroke, so the handler never sees\n * every value it takes.\n * - The mount render reports too, so an owner fetching on the query needs no first fetch of its\n * own.\n */\nexport const useQueryReporter = (query: string, onQueryChange?: (query: string) => void) => {\n const report = useStableCallback(onQueryChange ?? noop);\n\n useEffect(() => {\n report(query);\n }, [query, report]);\n};\n","import { type ComponentProps, type ReactNode, useCallback, useMemo, useState } from 'react';\nimport { Combobox as BaseCombobox } from '@base-ui/react/combobox';\n\nimport { cn } from '../../utils';\nimport { forwardAccessibleName, type WithAccessibleName } from '../../utils/accessibleName';\nimport { InputGroup } from '../InputGroup';\n\nimport { ComboboxChip } from './ComboboxChip';\nimport { ComboboxChips } from './ComboboxChips';\nimport { ComboboxClearButton } from './ComboboxClearButton';\nimport { ComboboxContent } from './ComboboxContent';\nimport { ComboboxEmpty } from './ComboboxEmpty';\nimport { ComboboxInput } from './ComboboxInput';\nimport { ComboboxInputGroup } from './ComboboxInputGroup';\nimport { ComboboxItem } from './ComboboxItem';\nimport { ComboboxList } from './ComboboxList';\nimport { ComboboxOpenButton } from './ComboboxOpenButton';\nimport { ComboboxOptions } from './ComboboxOptions';\nimport { ComboboxRoot } from './ComboboxRoot';\nimport { ComboboxSeparator } from './ComboboxSeparator';\nimport { useWithCreated } from './createdItems';\nimport { ComboboxCollection, ComboboxGroup, ComboboxGroupLabel } from './Group';\nimport { useGroupHeaders } from './groupHeaders';\nimport { useQueryReporter } from './query';\nimport type { Group } from './types';\nimport {\n createCreatableItem,\n defaultGroupToLabel,\n defaultItemToDisabled,\n defaultItemToIcon,\n defaultQueryToCreateLabel,\n defaultRowLabel,\n defaultToCreateValue,\n flatItems,\n isCreatableItem,\n isGroupHeaderItem,\n toEntries,\n toLabel,\n useCreatableStringValue,\n useItemEquality,\n} from './utils';\nimport { useVirtualList, type VirtualizedProps } from './virtualList';\n\ntype ComboboxProps<Value> = BaseCombobox.Root.Props<Value, false>;\ntype ComboboxInputProps = ComponentProps<typeof ComboboxInput>;\ntype ComboboxInputGroupProps = ComponentProps<typeof ComboboxInputGroup>;\ntype ComboboxItemProps = ComponentProps<typeof ComboboxItem>;\n\ntype Indicator = Exclude<NonNullable<ComboboxItemProps['indicator']>, 'none'>;\n\n// Go to the input, which is the `combobox` role; on the group they reach nothing.\n// - The `aria-*` set links a form field's label, help and error text.\n// - `onBlur` is the gate `FieldItem` reveals errors on.\ntype PublicComboboxInputProps = Pick<\n ComboboxInputProps,\n | 'placeholder'\n | 'id'\n | 'name'\n | 'onBlur'\n | 'aria-label'\n | 'aria-labelledby'\n | 'aria-describedby'\n | 'aria-invalid'\n | 'aria-required'\n> &\n Pick<ComboboxInputGroupProps, 'variant' | 'focusVariant' | 'sizing' | 'state' | 'className'>;\n\ntype PublicComboboxProps<Value> = Pick<\n ComboboxProps<Value>,\n | 'disabled'\n | 'inputRef'\n | 'value'\n | 'defaultValue'\n | 'onValueChange'\n | 'itemToStringLabel'\n | 'itemToStringValue'\n | 'filter'\n | 'onOpenChangeComplete'\n | 'isItemEqualToValue'\n>;\n\ntype CreatableProps<Value> = {\n allowCreate?: boolean;\n queryToCreateLabel?: (query: string) => ReactNode;\n queryToCreateValue?: (query: string) => Value;\n /**\n * Gate on the typed query for `allowCreate`; `false` hides the create row.\n * - Called only for a non-empty query that matches no existing item.\n */\n canCreate?: (query: string) => boolean;\n};\n\ntype BaseProps<Value, GroupShape extends Group<Value> = Group<Value>> = PublicComboboxInputProps &\n PublicComboboxProps<Value> &\n CreatableProps<Value> &\n VirtualizedProps & {\n /** Read as immutable: pass a new array to change it; one mutated in place is not re-filtered. */\n items?: readonly (Value | GroupShape)[];\n\n /** `false` where clearing must be unreachable, e.g. a required field. */\n allowClear?: boolean;\n empty?: ReactNode;\n /**\n * The options are still arriving — a request for `items` is in flight.\n *\n * - Does not disable the control; pass `disabled` too where the user has to wait.\n */\n isLoading?: boolean;\n indicator?: Indicator;\n prefix?: ReactNode;\n\n /**\n * Rewrites typed text (not the selected label); filter and `allowCreate` see the result.\n * - Rewrite, don't drop: it sees the whole text per keystroke, so `trim()` eats word spaces.\n */\n inputValueSanitizer?: (input: string) => string;\n /**\n * Reports the sanitized query, also on mount; empty while the input shows the selection.\n * - Notification only: the control owns the input text; there is no controlled `inputValue`.\n */\n onQueryChange?: (query: string) => void;\n\n /** Row content, `itemToStringLabel` by default; pass `query` to `MarkedText` to mark a match. */\n itemToLabel?: (item: Value, query: string) => ReactNode;\n itemToIcon?: (item: Value) => ReactNode;\n itemToDisabled?: (item: Value) => boolean;\n /**\n * Selection node drawn over the transparent input while closed; typing dissolves it. Clipped.\n * - Decoration: the input keeps `itemToStringLabel` text for screen readers, unlike `prefix`.\n */\n itemToSelectedLabel?: (item: Value) => ReactNode;\n\n /** Defaults to the group's `label`, as `Select` shows it. */\n groupToLabel?: (group: GroupShape) => ReactNode;\n /**\n * Each group gets a toggle row; with `groupToValue`, only the chevron and ←/→ keys toggle it.\n * - A query shows all matches regardless of collapse and hides groups without one.\n */\n collapsibleGroups?: boolean;\n /**\n * Makes each group's row selectable as the returned value.\n * - `itemToStringLabel`, `itemToSelectedLabel` and `itemToDisabled` then receive it too.\n */\n groupToValue?: (group: GroupShape) => Value;\n };\n\ntype Props<Value, GroupShape extends Group<Value> = Group<Value>> = WithAccessibleName<\n BaseProps<Value, GroupShape>\n>;\n\nconst acceptAll = () => true;\nconst NO_ITEMS: readonly never[] = [];\n\nexport const Combobox = <Value, GroupShape extends Group<Value> = Group<Value>>({\n items: _itemsProp,\n value,\n defaultValue,\n onValueChange,\n itemToStringLabel: itemToStringLabelProp,\n itemToStringValue,\n disabled,\n filter,\n inputRef,\n onOpenChangeComplete,\n isItemEqualToValue: isItemEqualToValueProp,\n\n variant,\n sizing,\n focusVariant,\n state,\n placeholder,\n allowClear = true,\n name,\n onBlur,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n 'aria-required': ariaRequired,\n className,\n\n empty = 'No items',\n isLoading = false,\n indicator,\n prefix,\n virtualized = false,\n\n inputValueSanitizer,\n onQueryChange,\n\n allowCreate,\n queryToCreateValue,\n queryToCreateLabel = defaultQueryToCreateLabel,\n canCreate,\n\n itemToDisabled = defaultItemToDisabled,\n itemToLabel: itemToLabelProp,\n itemToIcon = defaultItemToIcon,\n itemToSelectedLabel,\n groupToLabel = defaultGroupToLabel,\n collapsibleGroups = false,\n groupToValue,\n ...accessibleName\n}: Props<Value, GroupShape>) => {\n /** An item's string identity: input text, default search subject, accessible value. */\n const labelOf = useCallback(\n (item: Value) => itemToStringLabelProp?.(item) ?? toLabel(item),\n [itemToStringLabelProp],\n );\n const itemToLabel = itemToLabelProp ?? defaultRowLabel(itemToStringLabelProp);\n\n // What the user typed, or `null` while the control shows its selection.\n // - Input text and query both derive from it.\n // - Reset on close here: Base UI's sync-back skips text already equal to the label.\n const [typedText, setTypedText] = useState<string | null>(null);\n\n // The held item, controlled or not; mirrored from Base UI while uncontrolled.\n // - `null` is both \"nothing selected\" and the adder shape's pinned value.\n // - Read here, not via `BaseCombobox.Value`: the query gate and two classNames need it.\n const [uncontrolledValue, setUncontrolledValue] = useState<Value | null>(defaultValue ?? null);\n const selectedItem = value !== undefined ? value : uncontrolledValue;\n\n const selectedLabel = selectedItem == null ? null : labelOf(selectedItem);\n\n // Whether the on-screen text is the selection rather than a query.\n // - Compares with the label, not `null`: a query edited back to the label reads the same.\n const isShowingSelection =\n selectedLabel !== null && (typedText === null || typedText === selectedLabel);\n\n // The query, else the selection's label, which is what a screen reader reports.\n const inputValue = typedText ?? selectedLabel ?? '';\n // Shown only while the input's text is still the selection's label.\n const selectedNode =\n itemToSelectedLabel && selectedItem != null && isShowingSelection\n ? itemToSelectedLabel(selectedItem)\n : null;\n const query = (isShowingSelection ? '' : (typedText ?? '')).trim();\n const queryLower = query.toLowerCase();\n\n useQueryReporter(query, onQueryChange);\n\n // `aria-busy` for the input alone, absent rather than `false` while nothing is loading.\n //\n // - Not on the list: assistive tech may hold back a busy subtree, and the items already listed\n // stay pickable while loading. The empty slot's live region announces \"Loading…\" instead.\n const busy = isLoading || undefined;\n\n const itemsProp = _itemsProp ?? NO_ITEMS;\n const sampleItem = flatItems(itemsProp)[0];\n\n const isItemEqualToValue = useItemEquality(isItemEqualToValueProp);\n\n // The one value `allowCreate` minted, listed while it is the selection and `items` lacks it.\n // - An adder pinned to `null` lists none; `items` is scanned only when it or the value changes.\n const [createdItems, setCreatedItems] = useState<Value[]>([]);\n const [createdItem] = createdItems;\n const itemsHoldCreated = useMemo(\n () =>\n createdItem !== undefined &&\n flatItems(itemsProp).some((listed) => isItemEqualToValue(listed, createdItem)),\n [createdItem, itemsProp, isItemEqualToValue],\n );\n const created =\n createdItem !== undefined &&\n !itemsHoldCreated &&\n selectedItem != null &&\n isItemEqualToValue(createdItem, selectedItem)\n ? createdItems\n : NO_ITEMS;\n\n // Stable while the caller's accessor is: Base UI re-filters on every new identity.\n const itemToStringLabel = useCallback<NonNullable<ComboboxProps<Value>['itemToStringLabel']>>(\n (value) => {\n if (isCreatableItem(value)) return value.value;\n if (isGroupHeaderItem(value)) return value.label;\n return labelOf(value);\n },\n [labelOf],\n );\n\n const { contains } = BaseCombobox.useFilter();\n const itemFilter = filter ?? contains;\n const groupHeaders = useGroupHeaders<Value, GroupShape>({\n items: itemsProp,\n collapsible: collapsibleGroups,\n selectable: groupToValue !== undefined,\n query,\n matches: (item) => itemFilter(item, query, itemToStringLabel),\n groupToValue,\n isItemEqualToValue,\n });\n\n const allItems = useWithCreated(itemsProp, created);\n // What the list shows: `allItems` with each group's own row, once `groupHeaders` adds them.\n const listItems = useWithCreated(groupHeaders.items, created);\n\n const showCreateRow = (() => {\n if (!allowCreate || disabled || !query) return false;\n const exactMatch = flatItems(allItems).some(\n (item) => labelOf(item).toLowerCase() === queryLower,\n );\n return !exactMatch && (!canCreate || canCreate(query));\n })();\n\n const items = useMemo(\n () =>\n showCreateRow\n ? [...listItems, ...toEntries(listItems, [createCreatableItem(query)])]\n : listItems,\n [showCreateRow, listItems, query],\n );\n\n // Behind a selection the whole list stays browsable instead of narrowing to that item.\n // - Base UI's `shouldBypassFiltering` covers only a fresh open, not text edited back to the label.\n // - Creatable and group rows bypass the caller's `filter`; a group row matches while a child does.\n const filterHeader = groupHeaders.enabled ? groupHeaders.filterHeader : undefined;\n const queryFilter = useMemo<ComboboxProps<Value>['filter']>(() => {\n if (filterHeader) {\n return (item, query, itemToString) =>\n filterHeader(item) ?? (isCreatableItem(item) || itemFilter(item, query, itemToString));\n }\n if (!allowCreate || !filter) return filter;\n return (item, query, itemToString) =>\n isCreatableItem(item) || filter(item, query, itemToString);\n }, [filterHeader, allowCreate, filter, itemFilter]);\n const wrappedFilter = isShowingSelection ? acceptAll : queryFilter;\n\n const wrappedItemToStringValue = useCreatableStringValue(itemToStringValue, allowCreate);\n\n // Only user typing becomes `typedText` and passes through `inputValueSanitizer`.\n // - Every other reason (item press, clear, unmount sync-back) means \"show the selection\".\n // - The sync-back is never adopted: for a created item it stringifies the internal sentinel.\n const handleInputValueChange: NonNullable<ComboboxProps<Value>['onInputValueChange']> = (\n next,\n { reason },\n ) => {\n if (reason !== 'input-change') {\n setTypedText(null);\n return;\n }\n\n const typed = inputValueSanitizer?.(next) ?? next;\n // Whitespace-only text is dropped: Base UI won't open on it, so no close would discard it.\n // An empty input clears the selection, so it is adopted.\n setTypedText(typed === '' || typed.trim() !== '' ? typed : null);\n };\n\n // Discard the query as the popup starts closing, not after its transition.\n const handleOpenChange: NonNullable<ComboboxProps<Value>['onOpenChange']> = (open) => {\n if (!open) setTypedText(null);\n groupHeaders.onOpenChange(open);\n };\n\n const handleOnValueChange: ComboboxProps<Value>['onValueChange'] = (next, event) => {\n if (isCreatableItem(next)) {\n const newValue = defaultToCreateValue(next.value, sampleItem, queryToCreateValue) as Value;\n setCreatedItems([newValue]);\n setUncontrolledValue(newValue);\n onValueChange?.(newValue, event);\n return;\n }\n\n setUncontrolledValue(next);\n onValueChange?.(next, event);\n };\n\n // Decided on the real options rather than `items`, whose transient create row would switch\n // windowing on and off as the user types.\n const virtualList = useVirtualList(allItems, virtualized);\n\n const comboboxInput = (\n <ComboboxInput\n {...forwardAccessibleName(accessibleName)}\n name={name}\n onBlur={onBlur}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n aria-required={ariaRequired}\n aria-busy={busy}\n placeholder={placeholder}\n disabled={disabled}\n onKeyDown={groupHeaders.onInputKeyDown}\n // Text stays for screen readers and the caret; `selectedNode` is drawn over it.\n className={cn(\n selectedNode != null &&\n 'tw:text-transparent tw:caret-foreground tw:selection:bg-transparent',\n )}\n />\n );\n\n return (\n <BaseCombobox.Root<Value, false>\n items={items}\n // Otherwise Enter after typing drops the query; this commits the first match or create row.\n autoHighlight\n value={value}\n defaultValue={defaultValue}\n filter={wrappedFilter}\n onValueChange={handleOnValueChange}\n itemToStringLabel={itemToStringLabel}\n isItemEqualToValue={isItemEqualToValue}\n itemToStringValue={wrappedItemToStringValue}\n onOpenChange={handleOpenChange}\n onOpenChangeComplete={onOpenChangeComplete}\n disabled={disabled}\n inputRef={inputRef}\n inputValue={inputValue}\n onInputValueChange={handleInputValueChange}\n virtualized={virtualList.enabled}\n onItemHighlighted={(item, details) => {\n groupHeaders.onItemHighlighted(item);\n virtualList.onItemHighlighted(details);\n }}\n >\n <ComboboxInputGroup\n variant={variant}\n sizing={sizing}\n state={state}\n focusVariant={focusVariant}\n className={className}\n >\n {itemToSelectedLabel != null ? (\n // The addon overlays the input inside a `relative` wrapper; its `pl-4` and the input's\n // `px-4` share one origin.\n // - Branch on the prop, not `selectedNode`: swapping trees mid-typing drops input focus.\n <div className=\"tw:relative tw:flex tw:min-w-0 tw:flex-1\">\n {(prefix != null || selectedNode != null) && (\n <InputGroup.Addon\n align=\"inline-start\"\n className={cn(\n selectedNode != null &&\n 'tw:pointer-events-none tw:absolute tw:inset-y-0 tw:left-0 tw:max-w-full tw:overflow-hidden',\n )}\n >\n {prefix}\n {selectedNode}\n </InputGroup.Addon>\n )}\n {comboboxInput}\n </div>\n ) : (\n <>\n {prefix != null && <InputGroup.Addon align=\"inline-start\">{prefix}</InputGroup.Addon>}\n {comboboxInput}\n </>\n )}\n <InputGroup.Addon align=\"inline-end\">\n {allowClear && <ComboboxClearButton disabled={disabled} />}\n <ComboboxOpenButton disabled={disabled} isLoading={isLoading} />\n </InputGroup.Addon>\n </ComboboxInputGroup>\n <ComboboxContent>\n <ComboboxOptions<Value, GroupShape>\n isLoading={isLoading}\n empty={empty}\n virtualized={virtualList.enabled}\n listRef={virtualList.ref}\n groupHeaders={groupHeaders}\n groupToLabel={groupToLabel}\n indicator={indicator}\n itemToLabel={(item) => itemToLabel(item, query)}\n itemToIcon={itemToIcon}\n itemToDisabled={itemToDisabled}\n createLabel={queryToCreateLabel}\n groupRowState={\n groupToValue\n ? (row) => ({\n checked: selectedItem != null && isItemEqualToValue(row, selectedItem),\n disabled: itemToDisabled(row),\n })\n : undefined\n }\n />\n </ComboboxContent>\n </BaseCombobox.Root>\n );\n};\n\nCombobox.Root = ComboboxRoot;\nCombobox.InputGroup = ComboboxInputGroup;\nCombobox.Input = ComboboxInput;\nCombobox.Content = ComboboxContent;\nCombobox.List = ComboboxList;\nCombobox.Item = ComboboxItem;\nCombobox.Empty = ComboboxEmpty;\nCombobox.Value = BaseCombobox.Value;\nCombobox.Separator = ComboboxSeparator;\n\nCombobox.Group = ComboboxGroup;\nCombobox.GroupLabel = ComboboxGroupLabel;\nCombobox.GroupList = ComboboxCollection;\n\nCombobox.Chips = ComboboxChips;\nCombobox.Chip = ComboboxChip;\n","import { toLabel } from './utils';\n\n/** A single searchable text. `null` / `undefined` / `''` stand for \"this item has no such field\". */\ntype Text = string | number | null | undefined;\n\n// Lowercased words of a query.\n//\n// - Splits on whitespace runs, so no empty word matches every text.\n// - Plain `toLowerCase`: `foldCase` only matters for offsets, and none are reported here.\nconst toWords = (query: string) => query.toLowerCase().split(/\\s+/).filter(Boolean);\n\nconst isFilled = (text: Text): text is string | number =>\n text !== null && text !== undefined && text !== '';\n\nconst isTextList = (texts: Text | readonly Text[]): texts is readonly Text[] =>\n Array.isArray(texts);\n\n/**\n * Whether every word of `query` occurs in some of `texts`, ignoring case.\n *\n * - Words match by containment, across texts, in any order; an empty query matches everything.\n * - Plain lowercased `includes`, not `Intl.Collator`: `Muller` does not find `Müller`.\n * - Not interchangeable with kbc-ui's own `matchByWords` (single-space split, keeps empty texts).\n * - A `filter` for when the searchable text is not the label; else use {@link filterByWords}.\n */\nexport const matchByWords = (texts: Text | readonly Text[], query: string) => {\n const words = toWords(query);\n if (words.length === 0) return true;\n\n const haystacks = (isTextList(texts) ? texts : [texts])\n .filter(isFilled)\n .map((text) => String(text).toLowerCase());\n\n return words.every((word) => haystacks.some((haystack) => haystack.includes(word)));\n};\n\n/**\n * `filter` matching the item's displayed label word by word: `filter={filterByWords}`.\n *\n * - Generic, so it keeps the combobox's item type inference.\n * - Label: `itemToStringLabel` if passed, else the item's `label`, `value`, or string form.\n * - Only the label is searched, by design: never match what the user cannot see.\n * - Close over {@link matchByWords} to search other fields.\n */\nexport const filterByWords = <Item>(\n item: Item,\n query: string,\n itemToString?: (item: Item) => string,\n) => matchByWords(itemToString?.(item) ?? toLabel(item), query);\n"],"mappings":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