@keboola/design 11.0.0 → 11.2.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 +16 -1
- package/CHANGELOG.md +2138 -0
- package/COMPONENT-API.md +40 -1
- package/dist/AIKit-DiS0CVOW.js +1320 -0
- package/dist/AIKit-DiS0CVOW.js.map +1 -0
- package/dist/Alert-DfZq9kGe.js +133 -0
- package/dist/Alert-DfZq9kGe.js.map +1 -0
- package/dist/AlertModal-Dp_XuJBW.js +219 -0
- package/dist/AlertModal-Dp_XuJBW.js.map +1 -0
- package/dist/AppShell-B5GQN6Zs.js +143 -0
- package/dist/AppShell-B5GQN6Zs.js.map +1 -0
- package/dist/AutoSaveTextarea-BeuWuszr.js +58 -0
- package/dist/{chunk-UGT6DKWM.js.map → AutoSaveTextarea-BeuWuszr.js.map} +1 -1
- package/dist/Badge-Ch26CXoP.js +195 -0
- package/dist/Badge-Ch26CXoP.js.map +1 -0
- package/dist/BrandEditor-DyzgfVkl.js +903 -0
- package/dist/BrandEditor-DyzgfVkl.js.map +1 -0
- package/dist/BrandLogo-CJkRd0F8.js +46 -0
- package/dist/BrandLogo-CJkRd0F8.js.map +1 -0
- package/dist/Breadcrumb-Frst8MTA.js +330 -0
- package/dist/Breadcrumb-Frst8MTA.js.map +1 -0
- package/dist/Button-6xBX0nNl.js +391 -0
- package/dist/Button-6xBX0nNl.js.map +1 -0
- package/dist/Calendar-cG5NIJ4O.js +6768 -0
- package/dist/Calendar-cG5NIJ4O.js.map +1 -0
- package/dist/Card-BAoZ35CV.js +105 -0
- package/dist/Card-BAoZ35CV.js.map +1 -0
- package/dist/Checkbox-GJ8-srt4.js +97 -0
- package/dist/Checkbox-GJ8-srt4.js.map +1 -0
- package/dist/Clipboard-CBJZiviP.js +58 -0
- package/dist/Clipboard-CBJZiviP.js.map +1 -0
- package/dist/ClipboardButton-ClcluT0C.js +43 -0
- package/dist/ClipboardButton-ClcluT0C.js.map +1 -0
- package/dist/CodeEditor-DyaN-Ij2.js +1000 -0
- package/dist/CodeEditor-DyaN-Ij2.js.map +1 -0
- package/dist/Collapsible-BQXWEOBC.js +34 -0
- package/dist/Collapsible-BQXWEOBC.js.map +1 -0
- package/dist/ColorInput-B8z4j4Y_.js +180 -0
- package/dist/ColorInput-B8z4j4Y_.js.map +1 -0
- package/dist/ColorModeSwitch-dZFZyqy1.js +77 -0
- package/dist/ColorModeSwitch-dZFZyqy1.js.map +1 -0
- package/dist/Combobox-Dgm6Z4ib.js +443 -0
- package/dist/Combobox-Dgm6Z4ib.js.map +1 -0
- package/dist/Command-C0aZfVTq.js +102 -0
- package/dist/Command-C0aZfVTq.js.map +1 -0
- package/dist/CopyField-BJ96zvXs.js +322 -0
- package/dist/CopyField-BJ96zvXs.js.map +1 -0
- package/dist/DateInput-B3UdzRfW.js +141 -0
- package/dist/DateInput-B3UdzRfW.js.map +1 -0
- package/dist/DatePicker-Dw3DpbUh.js +24 -0
- package/dist/DatePicker-Dw3DpbUh.js.map +1 -0
- package/dist/DateRangeInput-DTuySEiq.js +139 -0
- package/dist/DateRangeInput-DTuySEiq.js.map +1 -0
- package/dist/DateRangePicker-DCmMHg4s.js +159 -0
- package/dist/DateRangePicker-DCmMHg4s.js.map +1 -0
- package/dist/DiagramSkeleton-lwBS2YBa.js +11 -0
- package/dist/DiagramSkeleton-lwBS2YBa.js.map +1 -0
- package/dist/DiffView-ppTIzh2h.js +429 -0
- package/dist/DiffView-ppTIzh2h.js.map +1 -0
- package/dist/DropdownMenu-t90tVw6l.js +327 -0
- package/dist/DropdownMenu-t90tVw6l.js.map +1 -0
- package/dist/FieldBox-D7DYtX_m.js +70 -0
- package/dist/FieldBox-D7DYtX_m.js.map +1 -0
- package/dist/FieldItem-CAPj9lj3.d.ts +111 -0
- package/dist/FieldItem-D-h1NeBo.js +108 -0
- package/dist/FieldItem-D-h1NeBo.js.map +1 -0
- package/dist/FileUpload-BRv0TaZk.js +2527 -0
- package/dist/FileUpload-BRv0TaZk.js.map +1 -0
- package/dist/Form-DHvcFoEi.js +311 -0
- package/dist/Form-DHvcFoEi.js.map +1 -0
- package/dist/FormGroup-C41n65cE.js +124 -0
- package/dist/FormGroup-C41n65cE.js.map +1 -0
- package/dist/FullScreenModal-Cb3PGgh4.js +96 -0
- package/dist/FullScreenModal-Cb3PGgh4.js.map +1 -0
- package/dist/HoverCard-WfDkLK1s.js +31 -0
- package/dist/HoverCard-WfDkLK1s.js.map +1 -0
- package/dist/InputGroup-CdTq8H7c.js +292 -0
- package/dist/InputGroup-CdTq8H7c.js.map +1 -0
- package/dist/Kbd-CxHAo1oo.js +111 -0
- package/dist/Kbd-CxHAo1oo.js.map +1 -0
- package/dist/MarkedText-Ckbft5mw.js +44 -0
- package/dist/MarkedText-Ckbft5mw.js.map +1 -0
- package/dist/MermaidDiagram-ChL3WIQT.js +399 -0
- package/dist/MermaidDiagram-ChL3WIQT.js.map +1 -0
- package/dist/Modal-wqG8nJiK.js +185 -0
- package/dist/Modal-wqG8nJiK.js.map +1 -0
- package/dist/ModalTitle-C76ke2eo.js +28 -0
- package/dist/ModalTitle-C76ke2eo.js.map +1 -0
- package/dist/MultiActionButtonGroup-BiIIubiL.js +33 -0
- package/dist/MultiActionButtonGroup-BiIIubiL.js.map +1 -0
- package/dist/Navbar-BfaPeLUL.js +325 -0
- package/dist/Navbar-BfaPeLUL.js.map +1 -0
- package/dist/OtpInput-CbbymqYs.js +93 -0
- package/dist/OtpInput-CbbymqYs.js.map +1 -0
- package/dist/PageHeader-Q3IpCnQd.js +177 -0
- package/dist/PageHeader-Q3IpCnQd.js.map +1 -0
- package/dist/PageLayout-DSVM-ASz.js +176 -0
- package/dist/PageLayout-DSVM-ASz.js.map +1 -0
- package/dist/PageToolbar-OQg3mPF-.js +153 -0
- package/dist/PageToolbar-OQg3mPF-.js.map +1 -0
- package/dist/Pagination-Cjfda8KG.js +70 -0
- package/dist/Pagination-Cjfda8KG.js.map +1 -0
- package/dist/Popconfirm-D7_vfxFd.js +167 -0
- package/dist/Popconfirm-D7_vfxFd.js.map +1 -0
- package/dist/Popover-CzeHjvrB.js +85 -0
- package/dist/Popover-CzeHjvrB.js.map +1 -0
- package/dist/RadioGroup-sIveSsNa.js +233 -0
- package/dist/RadioGroup-sIveSsNa.js.map +1 -0
- package/dist/Resizable-D3vYToZH.js +52 -0
- package/dist/Resizable-D3vYToZH.js.map +1 -0
- package/dist/Search-3UiqNZRj.js +184 -0
- package/dist/Search-3UiqNZRj.js.map +1 -0
- package/dist/SearchInput-C7dF_Ir-.js +102 -0
- package/dist/SearchInput-C7dF_Ir-.js.map +1 -0
- package/dist/SectionNav-8NoTOKO8.js +276 -0
- package/dist/SectionNav-8NoTOKO8.js.map +1 -0
- package/dist/Select-Is0VkePH.js +181 -0
- package/dist/Select-Is0VkePH.js.map +1 -0
- package/dist/Sheet-Dw9BDvjI.js +169 -0
- package/dist/Sheet-Dw9BDvjI.js.map +1 -0
- package/dist/Sidebar-Dcb4rinA.js +799 -0
- package/dist/Sidebar-Dcb4rinA.js.map +1 -0
- package/dist/Slider-BOPfMOMm.js +127 -0
- package/dist/Slider-BOPfMOMm.js.map +1 -0
- package/dist/Stepper-C8sm9ZFM.js +325 -0
- package/dist/Stepper-C8sm9ZFM.js.map +1 -0
- package/dist/Switch-CX2A0v50.js +201 -0
- package/dist/Switch-CX2A0v50.js.map +1 -0
- package/dist/Table-CvYuTuNU.js +104 -0
- package/dist/Table-CvYuTuNU.js.map +1 -0
- package/dist/Tabs-UMQuDoW8.js +74 -0
- package/dist/Tabs-UMQuDoW8.js.map +1 -0
- package/dist/TextInput-CMuN1WfY.js +110 -0
- package/dist/TextInput-CMuN1WfY.js.map +1 -0
- package/dist/ThemeProvider-QncUrfJn.js +203 -0
- package/dist/ThemeProvider-QncUrfJn.js.map +1 -0
- package/dist/TimePicker-D9zktB8A.js +98 -0
- package/dist/TimePicker-D9zktB8A.js.map +1 -0
- package/dist/Timeline-6btyJl4D.js +154 -0
- package/dist/Timeline-6btyJl4D.js.map +1 -0
- package/dist/Toast-DQSbs3oA.js +49 -0
- package/dist/Toast-DQSbs3oA.js.map +1 -0
- package/dist/ToggleGroup-Cy_10Mvu.js +47 -0
- package/dist/ToggleGroup-Cy_10Mvu.js.map +1 -0
- package/dist/Workbench-BzE-Vvd9.js +293 -0
- package/dist/Workbench-BzE-Vvd9.js.map +1 -0
- package/dist/ZoomableSvg-CZEu6sAq.js +248 -0
- package/dist/ZoomableSvg-CZEu6sAq.js.map +1 -0
- package/dist/charts.d.ts +110 -103
- package/dist/charts.js +303 -254
- package/dist/charts.js.map +1 -1
- package/dist/classNames-BzrkDnOD.js +9 -0
- package/dist/classNames-BzrkDnOD.js.map +1 -0
- package/dist/context-KxxeMHbR.js +62 -0
- package/dist/context-KxxeMHbR.js.map +1 -0
- package/dist/editors.d.ts +244 -175
- package/dist/editors.js +802 -428
- package/dist/editors.js.map +1 -1
- package/dist/escapeStringRegexp-8MxP2knR.js +6 -0
- package/dist/escapeStringRegexp-8MxP2knR.js.map +1 -0
- package/dist/icons-Cek151jC.js +640 -0
- package/dist/icons-Cek151jC.js.map +1 -0
- package/dist/icons.d.ts +2 -41
- package/dist/icons.js +2 -9
- package/dist/index-m-kQEWiY.d.ts +54 -0
- package/dist/index.d.ts +6191 -9891
- package/dist/index.js +113 -124
- package/dist/internal/blocks/AIKit.js +2 -30
- package/dist/internal/blocks/AppShell.js +2 -11
- package/dist/internal/blocks/AutoSaveTextarea.js +2 -14
- package/dist/internal/blocks/BrandEditor.js +2 -23
- package/dist/internal/blocks/ChartPanel.js +45 -9
- package/dist/internal/blocks/ChartPanel.js.map +1 -1
- package/dist/internal/blocks/ClipboardButton.js +2 -12
- package/dist/internal/blocks/ColorInput.js +2 -13
- package/dist/internal/blocks/ColorModeSwitch.js +2 -13
- package/dist/internal/blocks/Command.js +2 -15
- package/dist/internal/blocks/CopyField.js +2 -11
- package/dist/internal/blocks/DashboardHero.js +58 -8
- package/dist/internal/blocks/DashboardHero.js.map +1 -1
- package/dist/internal/blocks/DateInput.js +2 -16
- package/dist/internal/blocks/DateRangeInput.js +2 -16
- package/dist/internal/blocks/EmptyConfigurationActionCard.js +15 -9
- package/dist/internal/blocks/EmptyConfigurationActionCard.js.map +1 -1
- package/dist/internal/blocks/EmptyState.js +141 -3
- package/dist/internal/blocks/EmptyState.js.map +1 -1
- package/dist/internal/blocks/ErrorState.js +178 -4
- package/dist/internal/blocks/ErrorState.js.map +1 -1
- package/dist/internal/blocks/ExportMenu.js +40 -12
- package/dist/internal/blocks/ExportMenu.js.map +1 -1
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +56 -0
- package/dist/internal/blocks/Form/connectors/MultiComboboxField.js.map +1 -0
- package/dist/internal/blocks/Form.js +2 -29
- package/dist/internal/blocks/FormGroup.js +2 -18
- package/dist/internal/blocks/GoogleButton.js +94 -9
- package/dist/internal/blocks/GoogleButton.js.map +1 -1
- package/dist/internal/blocks/MicrosoftButton.js +63 -9
- package/dist/internal/blocks/MicrosoftButton.js.map +1 -1
- package/dist/internal/blocks/MultiActionButtonGroup.js +2 -12
- package/dist/internal/blocks/MultiCombobox.js +192 -13
- package/dist/internal/blocks/MultiCombobox.js.map +1 -1
- package/dist/internal/blocks/NumberInput.js +43 -11
- package/dist/internal/blocks/NumberInput.js.map +1 -1
- package/dist/internal/blocks/OtpInput.js +2 -10
- package/dist/internal/blocks/PageHeader.js +2 -9
- package/dist/internal/blocks/PageLayout.js +2 -9
- package/dist/internal/blocks/PageToolbar.js +2 -13
- package/dist/internal/blocks/PasswordInput.js +96 -12
- package/dist/internal/blocks/PasswordInput.js.map +1 -1
- package/dist/internal/blocks/SearchInput.js +2 -12
- package/dist/internal/blocks/SearchInputWithNavigation.js +64 -15
- package/dist/internal/blocks/SearchInputWithNavigation.js.map +1 -1
- package/dist/internal/blocks/SectionNav.js +2 -15
- package/dist/internal/blocks/SplitButton.js +45 -13
- package/dist/internal/blocks/SplitButton.js.map +1 -1
- package/dist/internal/blocks/StatCard.js +96 -9
- package/dist/internal/blocks/StatCard.js.map +1 -1
- package/dist/internal/blocks/TextInput.js +2 -13
- package/dist/internal/blocks/Textarea.js +31 -12
- package/dist/internal/blocks/Textarea.js.map +1 -1
- package/dist/internal/blocks/TimeInput.js +76 -16
- package/dist/internal/blocks/TimeInput.js.map +1 -1
- package/dist/internal/components/Alert.js +2 -11
- package/dist/internal/components/AlertModal.js +2 -11
- package/dist/internal/components/Avatar.js +52 -8
- package/dist/internal/components/Avatar.js.map +1 -1
- package/dist/internal/components/Badge.js +2 -9
- package/dist/internal/components/BrandLogo.js +2 -11
- package/dist/internal/components/Breadcrumb.js +2 -14
- package/dist/internal/components/Button.js +2 -10
- package/dist/internal/components/ButtonGroup.js +65 -8
- package/dist/internal/components/ButtonGroup.js.map +1 -1
- package/dist/internal/components/Calendar.js +2 -9
- package/dist/internal/components/Card.js +2 -9
- package/dist/internal/components/Checkbox.js +2 -11
- package/dist/internal/components/Clipboard.js +2 -9
- package/dist/internal/components/Collapsible.js +2 -9
- package/dist/internal/components/CollapsiblePanel.js +86 -10
- package/dist/internal/components/CollapsiblePanel.js.map +1 -1
- package/dist/internal/components/Combobox.js +2 -13
- package/dist/internal/components/DatePicker.js +2 -11
- package/dist/internal/components/DateRangePicker.js +2 -17
- package/dist/internal/components/DiffView.js +2 -9
- package/dist/internal/components/DotsLoader.js +17 -4
- package/dist/internal/components/DotsLoader.js.map +1 -1
- package/dist/internal/components/DropdownMenu.js +2 -11
- package/dist/internal/components/EmptySearchContent.js +11 -3
- package/dist/internal/components/EmptySearchContent.js.map +1 -1
- package/dist/internal/components/FileUpload.js +2 -11
- package/dist/internal/components/FullScreenModal.js +2 -12
- package/dist/internal/components/HelpBlock.js +24 -3
- package/dist/internal/components/HelpBlock.js.map +1 -1
- package/dist/internal/components/HoverCard.js +2 -9
- package/dist/internal/components/InputGroup.js +2 -11
- package/dist/internal/components/Kbd.js +2 -9
- package/dist/internal/components/Label.js +38 -8
- package/dist/internal/components/Label.js.map +1 -1
- package/dist/internal/components/Link.js +21 -8
- package/dist/internal/components/Link.js.map +1 -1
- package/dist/internal/components/MarkedText.js +2 -5
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +19 -9
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js.map +1 -1
- package/dist/internal/components/MergeEditor/PaneHeader.js +12 -3
- package/dist/internal/components/MergeEditor/PaneHeader.js.map +1 -1
- package/dist/internal/components/MergeEditor/constants.js +17 -3
- package/dist/internal/components/MergeEditor/constants.js.map +1 -1
- package/dist/internal/components/MergeEditor/useMergeDiff.js +2 -5
- package/dist/internal/components/Modal.js +2 -13
- package/dist/internal/components/Navbar.js +2 -14
- package/dist/internal/components/Pagination.js +2 -11
- package/dist/internal/components/PanelWithDetails.js +30 -10
- package/dist/internal/components/PanelWithDetails.js.map +1 -1
- package/dist/internal/components/Popconfirm.js +2 -12
- package/dist/internal/components/Popover.js +2 -9
- package/dist/internal/components/Progress.js +46 -8
- package/dist/internal/components/Progress.js.map +1 -1
- package/dist/internal/components/RadioGroup.js +2 -12
- package/dist/internal/components/Resizable.js +2 -9
- package/dist/internal/components/ScrollArea.js +41 -8
- package/dist/internal/components/ScrollArea.js.map +1 -1
- package/dist/internal/components/Search.js +2 -10
- package/dist/internal/components/Select.js +2 -12
- package/dist/internal/components/Separator.js +83 -8
- package/dist/internal/components/Separator.js.map +1 -1
- package/dist/internal/components/Sheet.js +2 -12
- package/dist/internal/components/Sidebar.js +2 -20
- package/dist/internal/components/Skeleton/Skeleton.js +38 -8
- package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/internal/components/Skeleton/SkeletonList.js +40 -9
- package/dist/internal/components/Skeleton/SkeletonList.js.map +1 -1
- package/dist/internal/components/Slider.js +2 -11
- package/dist/internal/components/SpotlightBackdrop.js +131 -8
- package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
- package/dist/internal/components/Stepper.js +2 -10
- package/dist/internal/components/Switch.js +2 -10
- package/dist/internal/components/Table.js +2 -10
- package/dist/internal/components/Tabs.js +2 -12
- package/dist/internal/components/ThemeProvider.js +3 -10
- package/dist/internal/components/TimePicker.js +2 -12
- package/dist/internal/components/Timeline.js +2 -10
- package/dist/internal/components/Toast.js +3 -11
- package/dist/internal/components/Toggle.js +168 -8
- package/dist/internal/components/Toggle.js.map +1 -1
- package/dist/internal/components/ToggleGroup.js +2 -9
- package/dist/internal/components/Tooltip.js +2 -8
- package/dist/internal/components/Truncated.js +44 -8
- package/dist/internal/components/Truncated.js.map +1 -1
- package/dist/internal/components/Workbench.js +2 -11
- package/dist/internal/components/ZoomableSvg.js +2 -13
- package/dist/internal/hooks/useAutosizeInput.js +76 -3
- package/dist/internal/hooks/useAutosizeInput.js.map +1 -1
- package/dist/internal/hooks/useScrollbarPosition.js +44 -4
- package/dist/internal/hooks/useScrollbarPosition.js.map +1 -1
- package/dist/internal/hooks/useStableCallback.js +28 -3
- package/dist/internal/hooks/useStableCallback.js.map +1 -1
- package/dist/internal/utils/mergeRefs.js +19 -3
- package/dist/internal/utils/mergeRefs.js.map +1 -1
- package/dist/internal/utils.js +5 -8
- package/dist/markdown-editor.d.ts +72 -72
- package/dist/markdown-editor.js +1122 -1207
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.d.ts +12 -12
- package/dist/mermaid.js +2 -18
- package/dist/rjsf.d.ts +45 -34
- package/dist/rjsf.js +1601 -1671
- package/dist/rjsf.js.map +1 -1
- package/dist/rolldown-runtime-Bdc48AWt.js +33 -0
- package/dist/styles-DSUP_-9Z.js +158 -0
- package/dist/styles-DSUP_-9Z.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/testing.d.ts +8 -7
- package/dist/testing.js +36 -21
- package/dist/testing.js.map +1 -1
- package/dist/themeTokens-BNg98Mu9.js +85 -0
- package/dist/themeTokens-BNg98Mu9.js.map +1 -0
- package/dist/toast-CjkURw0M.js +184 -0
- package/dist/toast-CjkURw0M.js.map +1 -0
- package/dist/useColorSchemeState-CYqcUfSH.js +61 -0
- package/dist/useColorSchemeState-CYqcUfSH.js.map +1 -0
- package/dist/useControllableState-M6494mCT.js +31 -0
- package/dist/useControllableState-M6494mCT.js.map +1 -0
- package/dist/useElement-DkF6esWL.js +15 -0
- package/dist/useElement-DkF6esWL.js.map +1 -0
- package/dist/useMergeDiff-CvowEXJ1.js +465 -0
- package/dist/useMergeDiff-CvowEXJ1.js.map +1 -0
- package/dist/utils-D0c5VAyF.js +308 -0
- package/dist/utils-D0c5VAyF.js.map +1 -0
- package/package.json +11 -10
- package/dist/MermaidDiagram-ZU5KAVRT.js +0 -18
- package/dist/MermaidDiagram-ZU5KAVRT.js.map +0 -1
- package/dist/chunk-2YYJDKSP.js +0 -51
- package/dist/chunk-2YYJDKSP.js.map +0 -1
- package/dist/chunk-3P5UUCFI.js +0 -385
- package/dist/chunk-3P5UUCFI.js.map +0 -1
- package/dist/chunk-3QDFDDWZ.js +0 -99
- package/dist/chunk-3QDFDDWZ.js.map +0 -1
- package/dist/chunk-3W27OLK5.js +0 -15
- package/dist/chunk-3W27OLK5.js.map +0 -1
- package/dist/chunk-4FIZZONW.js +0 -40
- package/dist/chunk-4FIZZONW.js.map +0 -1
- package/dist/chunk-4GIAXOJG.js +0 -133
- package/dist/chunk-4GIAXOJG.js.map +0 -1
- package/dist/chunk-52NDNMK7.js +0 -99
- package/dist/chunk-52NDNMK7.js.map +0 -1
- package/dist/chunk-576G5OES.js +0 -201
- package/dist/chunk-576G5OES.js.map +0 -1
- package/dist/chunk-5AIE6SET.js +0 -659
- package/dist/chunk-5AIE6SET.js.map +0 -1
- package/dist/chunk-5FTNAZRW.js +0 -327
- package/dist/chunk-5FTNAZRW.js.map +0 -1
- package/dist/chunk-5IG2S7ZY.js +0 -70
- package/dist/chunk-5IG2S7ZY.js.map +0 -1
- package/dist/chunk-5QCXHNCW.js +0 -404
- package/dist/chunk-5QCXHNCW.js.map +0 -1
- package/dist/chunk-6DUMGC7Y.js +0 -105
- package/dist/chunk-6DUMGC7Y.js.map +0 -1
- package/dist/chunk-6J25CVST.js +0 -174
- package/dist/chunk-6J25CVST.js.map +0 -1
- package/dist/chunk-6NN35XOP.js +0 -120
- package/dist/chunk-6NN35XOP.js.map +0 -1
- package/dist/chunk-6NZBVA4T.js +0 -24
- package/dist/chunk-6NZBVA4T.js.map +0 -1
- package/dist/chunk-6W5BHRCL.js +0 -295
- package/dist/chunk-6W5BHRCL.js.map +0 -1
- package/dist/chunk-72BKRCEG.js +0 -409
- package/dist/chunk-72BKRCEG.js.map +0 -1
- package/dist/chunk-7GTI3PPI.js +0 -95
- package/dist/chunk-7GTI3PPI.js.map +0 -1
- package/dist/chunk-7P6PLZ4B.js +0 -74
- package/dist/chunk-7P6PLZ4B.js.map +0 -1
- package/dist/chunk-7WZWY5IA.js +0 -46
- package/dist/chunk-7WZWY5IA.js.map +0 -1
- package/dist/chunk-AIYO2632.js +0 -489
- package/dist/chunk-AIYO2632.js.map +0 -1
- package/dist/chunk-ANFZWPNE.js +0 -112
- package/dist/chunk-ANFZWPNE.js.map +0 -1
- package/dist/chunk-ANZTVAJU.js +0 -73
- package/dist/chunk-ANZTVAJU.js.map +0 -1
- package/dist/chunk-BD5BTJKX.js +0 -166
- package/dist/chunk-BD5BTJKX.js.map +0 -1
- package/dist/chunk-BHGIDSRJ.js +0 -140
- package/dist/chunk-BHGIDSRJ.js.map +0 -1
- package/dist/chunk-BSQWZITZ.js +0 -507
- package/dist/chunk-BSQWZITZ.js.map +0 -1
- package/dist/chunk-D3LAIK62.js +0 -23
- package/dist/chunk-D3LAIK62.js.map +0 -1
- package/dist/chunk-DODCR43C.js +0 -155
- package/dist/chunk-DODCR43C.js.map +0 -1
- package/dist/chunk-EEK5NGZF.js +0 -40
- package/dist/chunk-EEK5NGZF.js.map +0 -1
- package/dist/chunk-ENRG7TXA.js +0 -11
- package/dist/chunk-ENRG7TXA.js.map +0 -1
- package/dist/chunk-EQRMGIGY.js +0 -239
- package/dist/chunk-EQRMGIGY.js.map +0 -1
- package/dist/chunk-ERAHK5YQ.js +0 -495
- package/dist/chunk-ERAHK5YQ.js.map +0 -1
- package/dist/chunk-F3FOFY2P.js +0 -124
- package/dist/chunk-F3FOFY2P.js.map +0 -1
- package/dist/chunk-F6BTWFOC.js +0 -507
- package/dist/chunk-F6BTWFOC.js.map +0 -1
- package/dist/chunk-F6J6NNAL.js +0 -34
- package/dist/chunk-F6J6NNAL.js.map +0 -1
- package/dist/chunk-FCHJ7D5O.js +0 -59
- package/dist/chunk-FCHJ7D5O.js.map +0 -1
- package/dist/chunk-FFJTEQCC.js +0 -80
- package/dist/chunk-FFJTEQCC.js.map +0 -1
- package/dist/chunk-FUFMVW7O.js +0 -64
- package/dist/chunk-FUFMVW7O.js.map +0 -1
- package/dist/chunk-FVPGQ6UE.js +0 -25
- package/dist/chunk-FVPGQ6UE.js.map +0 -1
- package/dist/chunk-G3PMV62Z.js +0 -33
- package/dist/chunk-G3PMV62Z.js.map +0 -1
- package/dist/chunk-GACFOW3E.js +0 -51
- package/dist/chunk-GACFOW3E.js.map +0 -1
- package/dist/chunk-GDT6HQMK.js +0 -42
- package/dist/chunk-GDT6HQMK.js.map +0 -1
- package/dist/chunk-HLGU22C6.js +0 -2589
- package/dist/chunk-HLGU22C6.js.map +0 -1
- package/dist/chunk-HPMYYGP7.js +0 -134
- package/dist/chunk-HPMYYGP7.js.map +0 -1
- package/dist/chunk-I2UCOD45.js +0 -197
- package/dist/chunk-I2UCOD45.js.map +0 -1
- package/dist/chunk-IEGDZUVM.js +0 -75
- package/dist/chunk-IEGDZUVM.js.map +0 -1
- package/dist/chunk-IIS7INHF.js +0 -47
- package/dist/chunk-IIS7INHF.js.map +0 -1
- package/dist/chunk-ITELSEFU.js +0 -256
- package/dist/chunk-ITELSEFU.js.map +0 -1
- package/dist/chunk-IXAYNBOY.js +0 -407
- package/dist/chunk-IXAYNBOY.js.map +0 -1
- package/dist/chunk-JUW2ETEI.js +0 -191
- package/dist/chunk-JUW2ETEI.js.map +0 -1
- package/dist/chunk-K65C7CVE.js +0 -127
- package/dist/chunk-K65C7CVE.js.map +0 -1
- package/dist/chunk-KDI64MCY.js +0 -189
- package/dist/chunk-KDI64MCY.js.map +0 -1
- package/dist/chunk-KN4ASMH5.js +0 -160
- package/dist/chunk-KN4ASMH5.js.map +0 -1
- package/dist/chunk-KQW7QNTU.js +0 -1549
- package/dist/chunk-KQW7QNTU.js.map +0 -1
- package/dist/chunk-KR7NXXHC.js +0 -66
- package/dist/chunk-KR7NXXHC.js.map +0 -1
- package/dist/chunk-KRZKIVMA.js +0 -142
- package/dist/chunk-KRZKIVMA.js.map +0 -1
- package/dist/chunk-KTTLLKGQ.js +0 -185
- package/dist/chunk-KTTLLKGQ.js.map +0 -1
- package/dist/chunk-KWKSHPDP.js +0 -234
- package/dist/chunk-KWKSHPDP.js.map +0 -1
- package/dist/chunk-KZVC7OYG.js +0 -57
- package/dist/chunk-KZVC7OYG.js.map +0 -1
- package/dist/chunk-L5DHUN2V.js +0 -204
- package/dist/chunk-L5DHUN2V.js.map +0 -1
- package/dist/chunk-LCTGEH57.js +0 -1376
- package/dist/chunk-LCTGEH57.js.map +0 -1
- package/dist/chunk-LXLIQ2D6.js +0 -12
- package/dist/chunk-LXLIQ2D6.js.map +0 -1
- package/dist/chunk-M4CTURKX.js +0 -84
- package/dist/chunk-M4CTURKX.js.map +0 -1
- package/dist/chunk-M6LTUPVP.js +0 -301
- package/dist/chunk-M6LTUPVP.js.map +0 -1
- package/dist/chunk-MA6RRHDT.js +0 -291
- package/dist/chunk-MA6RRHDT.js.map +0 -1
- package/dist/chunk-MODE4QIA.js +0 -6
- package/dist/chunk-MODE4QIA.js.map +0 -1
- package/dist/chunk-MVILMVGG.js +0 -118
- package/dist/chunk-MVILMVGG.js.map +0 -1
- package/dist/chunk-MWS4VCLV.js +0 -17
- package/dist/chunk-MWS4VCLV.js.map +0 -1
- package/dist/chunk-NEUX74SO.js +0 -315
- package/dist/chunk-NEUX74SO.js.map +0 -1
- package/dist/chunk-NFHKYBRD.js +0 -156
- package/dist/chunk-NFHKYBRD.js.map +0 -1
- package/dist/chunk-NHJNNXD3.js +0 -89
- package/dist/chunk-NHJNNXD3.js.map +0 -1
- package/dist/chunk-O2BF3HZL.js +0 -33
- package/dist/chunk-O2BF3HZL.js.map +0 -1
- package/dist/chunk-OANXCZYD.js +0 -212
- package/dist/chunk-OANXCZYD.js.map +0 -1
- package/dist/chunk-ODJF7YIP.js +0 -230
- package/dist/chunk-ODJF7YIP.js.map +0 -1
- package/dist/chunk-ON4BJTHI.js +0 -101
- package/dist/chunk-ON4BJTHI.js.map +0 -1
- package/dist/chunk-OTL5WXIJ.js +0 -16
- package/dist/chunk-OTL5WXIJ.js.map +0 -1
- package/dist/chunk-PACNBKJV.js +0 -47
- package/dist/chunk-PACNBKJV.js.map +0 -1
- package/dist/chunk-PROCA7K7.js +0 -23
- package/dist/chunk-PROCA7K7.js.map +0 -1
- package/dist/chunk-QGMIPA67.js +0 -85
- package/dist/chunk-QGMIPA67.js.map +0 -1
- package/dist/chunk-QQA37LFB.js +0 -190
- package/dist/chunk-QQA37LFB.js.map +0 -1
- package/dist/chunk-QZAWRSEB.js +0 -61
- package/dist/chunk-QZAWRSEB.js.map +0 -1
- package/dist/chunk-R74KGWNS.js +0 -699
- package/dist/chunk-R74KGWNS.js.map +0 -1
- package/dist/chunk-RFDLHMKL.js +0 -110
- package/dist/chunk-RFDLHMKL.js.map +0 -1
- package/dist/chunk-RL64HN7S.js +0 -40
- package/dist/chunk-RL64HN7S.js.map +0 -1
- package/dist/chunk-RMRQKPL7.js +0 -115
- package/dist/chunk-RMRQKPL7.js.map +0 -1
- package/dist/chunk-RQVK4IYC.js +0 -606
- package/dist/chunk-RQVK4IYC.js.map +0 -1
- package/dist/chunk-RTW56PWZ.js +0 -59
- package/dist/chunk-RTW56PWZ.js.map +0 -1
- package/dist/chunk-RUTPQNLR.js +0 -266
- package/dist/chunk-RUTPQNLR.js.map +0 -1
- package/dist/chunk-S6TAF63G.js +0 -25
- package/dist/chunk-S6TAF63G.js.map +0 -1
- package/dist/chunk-SBGAUGXY.js +0 -224
- package/dist/chunk-SBGAUGXY.js.map +0 -1
- package/dist/chunk-SC275NHZ.js +0 -407
- package/dist/chunk-SC275NHZ.js.map +0 -1
- package/dist/chunk-SCQPU4UE.js +0 -97
- package/dist/chunk-SCQPU4UE.js.map +0 -1
- package/dist/chunk-SFFF2WQP.js +0 -8
- package/dist/chunk-SFFF2WQP.js.map +0 -1
- package/dist/chunk-SJYMHZKA.js +0 -36
- package/dist/chunk-SJYMHZKA.js.map +0 -1
- package/dist/chunk-SLCCUJVN.js +0 -125
- package/dist/chunk-SLCCUJVN.js.map +0 -1
- package/dist/chunk-SVBSNSD4.js +0 -259
- package/dist/chunk-SVBSNSD4.js.map +0 -1
- package/dist/chunk-SVPLTL35.js +0 -62
- package/dist/chunk-SVPLTL35.js.map +0 -1
- package/dist/chunk-SWQFYNYG.js +0 -338
- package/dist/chunk-SWQFYNYG.js.map +0 -1
- package/dist/chunk-THHB4EWS.js +0 -72
- package/dist/chunk-THHB4EWS.js.map +0 -1
- package/dist/chunk-TUCDD33E.js +0 -246
- package/dist/chunk-TUCDD33E.js.map +0 -1
- package/dist/chunk-TV4WAP2R.js +0 -14
- package/dist/chunk-TV4WAP2R.js.map +0 -1
- package/dist/chunk-U3A6YBTZ.js +0 -134
- package/dist/chunk-U3A6YBTZ.js.map +0 -1
- package/dist/chunk-UGT6DKWM.js +0 -95
- package/dist/chunk-VSERHUWD.js +0 -212
- package/dist/chunk-VSERHUWD.js.map +0 -1
- package/dist/chunk-VYG7BDXC.js +0 -49
- package/dist/chunk-VYG7BDXC.js.map +0 -1
- package/dist/chunk-WETKNYZX.js +0 -52
- package/dist/chunk-WETKNYZX.js.map +0 -1
- package/dist/chunk-WGG4AML3.js +0 -216
- package/dist/chunk-WGG4AML3.js.map +0 -1
- package/dist/chunk-WKAUEL6I.js +0 -30
- package/dist/chunk-WKAUEL6I.js.map +0 -1
- package/dist/chunk-WPOLA5CG.js +0 -81
- package/dist/chunk-WPOLA5CG.js.map +0 -1
- package/dist/chunk-WPVETCGJ.js +0 -254
- package/dist/chunk-WPVETCGJ.js.map +0 -1
- package/dist/chunk-WTSM3A7E.js +0 -13
- package/dist/chunk-WTSM3A7E.js.map +0 -1
- package/dist/chunk-WU3F2K3T.js +0 -148
- package/dist/chunk-WU3F2K3T.js.map +0 -1
- package/dist/chunk-WZZK2DTZ.js +0 -39
- package/dist/chunk-WZZK2DTZ.js.map +0 -1
- package/dist/chunk-X4IHLKRD.js +0 -42
- package/dist/chunk-X4IHLKRD.js.map +0 -1
- package/dist/chunk-XAHEXZJC.js +0 -80
- package/dist/chunk-XAHEXZJC.js.map +0 -1
- package/dist/chunk-XCYGJDUX.js +0 -31
- package/dist/chunk-XCYGJDUX.js.map +0 -1
- package/dist/chunk-Y4W3JORC.js +0 -104
- package/dist/chunk-Y4W3JORC.js.map +0 -1
- package/dist/chunk-YFZJ3ZLG.js +0 -1297
- package/dist/chunk-YFZJ3ZLG.js.map +0 -1
- package/dist/chunk-YI3WLXEN.js +0 -4387
- package/dist/chunk-YI3WLXEN.js.map +0 -1
- package/dist/chunk-ZBKFSPD3.js +0 -29
- package/dist/chunk-ZBKFSPD3.js.map +0 -1
- package/dist/chunk-ZOERRQ6A.js +0 -79
- package/dist/chunk-ZOERRQ6A.js.map +0 -1
- package/dist/chunk-ZSTGUKHU.js +0 -10
- package/dist/chunk-ZSTGUKHU.js.map +0 -1
- package/dist/chunk-ZUEHDL27.js +0 -65
- package/dist/chunk-ZUEHDL27.js.map +0 -1
- package/dist/constants-D3gaMY-W.d.ts +0 -39
- package/dist/icons.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/blocks/AIKit.js.map +0 -1
- package/dist/internal/blocks/AppShell.js.map +0 -1
- package/dist/internal/blocks/AutoSaveTextarea.js.map +0 -1
- package/dist/internal/blocks/BrandEditor.js.map +0 -1
- package/dist/internal/blocks/ClipboardButton.js.map +0 -1
- package/dist/internal/blocks/ColorInput.js.map +0 -1
- package/dist/internal/blocks/ColorModeSwitch.js.map +0 -1
- package/dist/internal/blocks/Command.js.map +0 -1
- package/dist/internal/blocks/CopyField.js.map +0 -1
- package/dist/internal/blocks/DateInput.js.map +0 -1
- package/dist/internal/blocks/DateRangeInput.js.map +0 -1
- package/dist/internal/blocks/Form.js.map +0 -1
- package/dist/internal/blocks/FormGroup.js.map +0 -1
- package/dist/internal/blocks/MultiActionButtonGroup.js.map +0 -1
- package/dist/internal/blocks/OtpInput.js.map +0 -1
- package/dist/internal/blocks/PageHeader.js.map +0 -1
- package/dist/internal/blocks/PageLayout.js.map +0 -1
- package/dist/internal/blocks/PageToolbar.js.map +0 -1
- package/dist/internal/blocks/SearchInput.js.map +0 -1
- package/dist/internal/blocks/SectionNav.js.map +0 -1
- package/dist/internal/blocks/TextInput.js.map +0 -1
- package/dist/internal/components/Alert.js.map +0 -1
- package/dist/internal/components/AlertModal.js.map +0 -1
- package/dist/internal/components/Badge.js.map +0 -1
- package/dist/internal/components/BrandLogo.js.map +0 -1
- package/dist/internal/components/Breadcrumb.js.map +0 -1
- package/dist/internal/components/Button.js.map +0 -1
- package/dist/internal/components/Calendar.js.map +0 -1
- package/dist/internal/components/Card.js.map +0 -1
- package/dist/internal/components/Checkbox.js.map +0 -1
- package/dist/internal/components/Clipboard.js.map +0 -1
- package/dist/internal/components/Collapsible.js.map +0 -1
- package/dist/internal/components/Combobox.js.map +0 -1
- package/dist/internal/components/DatePicker.js.map +0 -1
- package/dist/internal/components/DateRangePicker.js.map +0 -1
- package/dist/internal/components/DiffView.js.map +0 -1
- package/dist/internal/components/DropdownMenu.js.map +0 -1
- package/dist/internal/components/FileUpload.js.map +0 -1
- package/dist/internal/components/FullScreenModal.js.map +0 -1
- package/dist/internal/components/HoverCard.js.map +0 -1
- package/dist/internal/components/InputGroup.js.map +0 -1
- package/dist/internal/components/Kbd.js.map +0 -1
- package/dist/internal/components/MarkedText.js.map +0 -1
- package/dist/internal/components/MergeEditor/useMergeDiff.js.map +0 -1
- package/dist/internal/components/Modal.js.map +0 -1
- package/dist/internal/components/Navbar.js.map +0 -1
- package/dist/internal/components/Pagination.js.map +0 -1
- package/dist/internal/components/Popconfirm.js.map +0 -1
- package/dist/internal/components/Popover.js.map +0 -1
- package/dist/internal/components/RadioGroup.js.map +0 -1
- package/dist/internal/components/Resizable.js.map +0 -1
- package/dist/internal/components/Search.js.map +0 -1
- package/dist/internal/components/Select.js.map +0 -1
- package/dist/internal/components/Sheet.js.map +0 -1
- package/dist/internal/components/Sidebar.js.map +0 -1
- package/dist/internal/components/Slider.js.map +0 -1
- package/dist/internal/components/Stepper.js.map +0 -1
- package/dist/internal/components/Switch.js.map +0 -1
- package/dist/internal/components/Table.js.map +0 -1
- package/dist/internal/components/Tabs.js.map +0 -1
- package/dist/internal/components/ThemeProvider.js.map +0 -1
- package/dist/internal/components/TimePicker.js.map +0 -1
- package/dist/internal/components/Timeline.js.map +0 -1
- package/dist/internal/components/Toast.js.map +0 -1
- package/dist/internal/components/ToggleGroup.js.map +0 -1
- package/dist/internal/components/Tooltip.js.map +0 -1
- package/dist/internal/components/Workbench.js.map +0 -1
- package/dist/internal/components/ZoomableSvg.js.map +0 -1
- package/dist/internal/utils.js.map +0 -1
- package/dist/mermaid.js.map +0 -1
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { cn } from "./classNames-BzrkDnOD.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/blocks/PageHeader/styles.ts
|
|
4
|
+
const titleRowClass = "tw:flex tw:flex-wrap tw:items-center tw:gap-x-3 tw:gap-y-2";
|
|
5
|
+
const titleClass = "tw:m-0 tw:text-3xl tw:font-semibold tw:leading-9 tw:text-foreground tw:break-words";
|
|
6
|
+
const titleCompactClass = "tw:m-0 tw:text-xl tw:font-semibold tw:leading-7 tw:text-foreground tw:break-words";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/blocks/PageHeader/PageHeaderDetail.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Page header for single-entity pages.
|
|
11
|
+
*
|
|
12
|
+
* **When to use:** the page shows one entity (a bucket, flow, data app) with a parent hierarchy worth
|
|
13
|
+
* breadcrumbing. Primary action is typically "edit / deploy / run on this entity".
|
|
14
|
+
* **When NOT to use:** for top-level list pages use `PageHeader.Index`. For pages without a parent
|
|
15
|
+
* hierarchy use `PageHeader.Index` even if they show one entity.
|
|
16
|
+
* **Composition:** nest inside `PageLayout.Header`. Pass `Button`s for actions. Anything beyond the
|
|
17
|
+
* 2-visible-actions cap belongs in `overflowActions` (a `DropdownMenu`), not in extra slots.
|
|
18
|
+
*
|
|
19
|
+
* @see RECIPES.md#list-detail — for the list-page → detail-page navigation pattern
|
|
20
|
+
*/
|
|
21
|
+
const PageHeaderDetail = ({ ref, className, breadcrumbs, overflowActions, title, titleIcon, badges, description, compact = false, primaryAction, secondaryAction, headerNav, fullWidthDescription = false, ...props }) => {
|
|
22
|
+
const titleRow = /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: cn(titleRowClass, "tw:min-w-64 tw:flex-1 tw:pr-2"),
|
|
24
|
+
children: [
|
|
25
|
+
titleIcon && /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "tw:flex tw:shrink-0 tw:items-center",
|
|
27
|
+
children: titleIcon
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ jsx("h1", {
|
|
30
|
+
className: compact ? titleCompactClass : titleClass,
|
|
31
|
+
children: title
|
|
32
|
+
}),
|
|
33
|
+
badges && /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: "tw:flex tw:flex-wrap tw:items-center tw:gap-2 tw:[&_[data-slot=badge]]:rounded-full tw:[&_[data-slot=badge]]:normal-case tw:[&_[data-slot=badge]]:tracking-normal tw:[&_[data-slot=badge]]:py-0",
|
|
35
|
+
children: badges
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
const actions = (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", {
|
|
40
|
+
className: "tw:ml-auto tw:flex tw:flex-wrap tw:items-center tw:justify-end tw:gap-2",
|
|
41
|
+
children: [secondaryAction, primaryAction]
|
|
42
|
+
});
|
|
43
|
+
const descriptionNode = description && /* @__PURE__ */ jsx("p", {
|
|
44
|
+
className: "tw:m-0 tw:max-w-[800px] tw:break-words tw:text-sm tw:leading-5 tw:text-muted-foreground",
|
|
45
|
+
children: description
|
|
46
|
+
});
|
|
47
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
48
|
+
ref,
|
|
49
|
+
className: cn("tw:flex tw:w-full tw:flex-col tw:gap-4", className),
|
|
50
|
+
...props,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: "tw:flex tw:w-full tw:items-center tw:justify-between tw:gap-4",
|
|
54
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
55
|
+
className: "tw:min-w-0 tw:flex-1",
|
|
56
|
+
children: breadcrumbs
|
|
57
|
+
}), overflowActions && /* @__PURE__ */ jsx("div", {
|
|
58
|
+
className: "tw:flex tw:shrink-0 tw:items-center tw:gap-2",
|
|
59
|
+
children: overflowActions
|
|
60
|
+
})]
|
|
61
|
+
}),
|
|
62
|
+
fullWidthDescription ? /* @__PURE__ */ jsxs("div", {
|
|
63
|
+
className: "tw:flex tw:w-full tw:flex-col tw:gap-2",
|
|
64
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: "tw:flex tw:w-full tw:flex-wrap tw:items-start tw:justify-between tw:gap-x-4 tw:gap-y-3",
|
|
66
|
+
children: [titleRow, actions]
|
|
67
|
+
}), descriptionNode]
|
|
68
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: "tw:flex tw:w-full tw:flex-wrap tw:items-start tw:justify-between tw:gap-x-4 tw:gap-y-3",
|
|
70
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
71
|
+
className: "tw:flex tw:min-w-64 tw:flex-1 tw:flex-col tw:gap-2 tw:pr-2",
|
|
72
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
73
|
+
className: titleRowClass,
|
|
74
|
+
children: [
|
|
75
|
+
titleIcon && /* @__PURE__ */ jsx("span", {
|
|
76
|
+
className: "tw:flex tw:shrink-0 tw:items-center",
|
|
77
|
+
children: titleIcon
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx("h1", {
|
|
80
|
+
className: compact ? titleCompactClass : titleClass,
|
|
81
|
+
children: title
|
|
82
|
+
}),
|
|
83
|
+
badges && /* @__PURE__ */ jsx("div", {
|
|
84
|
+
className: "tw:flex tw:flex-wrap tw:items-center tw:gap-2 tw:[&_[data-slot=badge]]:rounded-full tw:[&_[data-slot=badge]]:normal-case tw:[&_[data-slot=badge]]:tracking-normal tw:[&_[data-slot=badge]]:py-0",
|
|
85
|
+
children: badges
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
}), descriptionNode]
|
|
89
|
+
}), actions]
|
|
90
|
+
}),
|
|
91
|
+
headerNav
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/blocks/PageHeader/PageHeaderIndex.tsx
|
|
97
|
+
/**
|
|
98
|
+
* Page header for top-level list / collection pages.
|
|
99
|
+
*
|
|
100
|
+
* **When to use:** the page is a list (Flows, Storage, Jobs, …) with no parent in the same section.
|
|
101
|
+
* Primary action is typically "create / add a new X".
|
|
102
|
+
* **When NOT to use:** for single-entity detail pages use `PageHeader.Detail`; for layouts that don't fit
|
|
103
|
+
* either pattern host custom JSX in `PageLayout.Header` directly.
|
|
104
|
+
* **Composition:** nest inside `PageLayout.Header`. Pass `Button`s into `action` and
|
|
105
|
+
* `documentation`. Search and filter chips belong in `PageToolbar`, not here.
|
|
106
|
+
*/
|
|
107
|
+
const PageHeaderIndex = ({ ref, className, title, description, metadata, documentation, action, headerNav, fullWidthDescription = false, ...props }) => {
|
|
108
|
+
const subtitle = metadata ?? description;
|
|
109
|
+
const hasActions = Boolean(documentation || action);
|
|
110
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
111
|
+
ref,
|
|
112
|
+
className: cn("tw:flex tw:w-full tw:flex-col tw:gap-4", className),
|
|
113
|
+
...props,
|
|
114
|
+
children: [fullWidthDescription ? /* @__PURE__ */ jsxs("div", {
|
|
115
|
+
className: "tw:flex tw:w-full tw:flex-col tw:gap-2",
|
|
116
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
117
|
+
className: "tw:flex tw:w-full tw:flex-wrap tw:items-start tw:justify-between tw:gap-x-4 tw:gap-y-3",
|
|
118
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
119
|
+
className: cn(titleRowClass, "tw:min-w-64 tw:flex-1 tw:pr-2"),
|
|
120
|
+
children: /* @__PURE__ */ jsx("h1", {
|
|
121
|
+
className: titleClass,
|
|
122
|
+
children: title
|
|
123
|
+
})
|
|
124
|
+
}), hasActions && /* @__PURE__ */ jsxs("div", {
|
|
125
|
+
className: "tw:ml-auto tw:flex tw:flex-wrap tw:items-center tw:justify-end tw:gap-2",
|
|
126
|
+
children: [documentation, action]
|
|
127
|
+
})]
|
|
128
|
+
}), subtitle && /* @__PURE__ */ jsx("p", {
|
|
129
|
+
className: "tw:m-0 tw:max-w-[800px] tw:break-words tw:text-sm tw:leading-5 tw:text-muted-foreground",
|
|
130
|
+
children: subtitle
|
|
131
|
+
})]
|
|
132
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
133
|
+
className: "tw:flex tw:w-full tw:items-start tw:justify-between tw:gap-4",
|
|
134
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
135
|
+
className: "tw:flex tw:min-w-0 tw:flex-1 tw:flex-col tw:gap-2 tw:pr-2",
|
|
136
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
137
|
+
className: titleRowClass,
|
|
138
|
+
children: /* @__PURE__ */ jsx("h1", {
|
|
139
|
+
className: titleClass,
|
|
140
|
+
children: title
|
|
141
|
+
})
|
|
142
|
+
}), subtitle && /* @__PURE__ */ jsx("p", {
|
|
143
|
+
className: "tw:m-0 tw:max-w-[800px] tw:break-words tw:text-sm tw:leading-5 tw:text-muted-foreground",
|
|
144
|
+
children: subtitle
|
|
145
|
+
})]
|
|
146
|
+
}), hasActions && /* @__PURE__ */ jsxs("div", {
|
|
147
|
+
className: "tw:flex tw:shrink-0 tw:items-center tw:gap-2",
|
|
148
|
+
children: [documentation, action]
|
|
149
|
+
})]
|
|
150
|
+
}), headerNav]
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/blocks/PageHeader/PageHeader.tsx
|
|
155
|
+
/**
|
|
156
|
+
* Structured page-header block that encodes the evviku page-header patterns 1:1 at the type level.
|
|
157
|
+
*
|
|
158
|
+
* **When to use:** every kbc-ui page with a structured header (title + actions + optional badges /
|
|
159
|
+
* description / tabs). Choose `PageHeader.Index` for list / collection pages, `PageHeader.Detail` for
|
|
160
|
+
* single-entity pages with breadcrumbs.
|
|
161
|
+
* **When NOT to use:** for layouts that don't match either pattern, host custom JSX inside
|
|
162
|
+
* `PageLayout.Header` directly. For routing-driven tab rows below the header use `PageLayout.Tabs`.
|
|
163
|
+
* **Composition:** nest inside `PageLayout.Header`. Pass `@keboola/design` `Button`s into the header slots
|
|
164
|
+
* (chrome is brand-driven). The variant types enforce pattern constraints (e.g. `Index` rejects breadcrumbs).
|
|
165
|
+
*
|
|
166
|
+
* @see RECIPES.md#page-header-tabs — for the canonical page-header + tabs composition
|
|
167
|
+
*/
|
|
168
|
+
const PageHeader = {
|
|
169
|
+
/** Index variant — top-level list / collection pages. No breadcrumbs; `metadata` wins over `description`. */
|
|
170
|
+
Index: PageHeaderIndex,
|
|
171
|
+
/** Detail variant — single-entity pages with required breadcrumbs and an overflow-actions slot. Max 2 visible actions. */
|
|
172
|
+
Detail: PageHeaderDetail
|
|
173
|
+
};
|
|
174
|
+
//#endregion
|
|
175
|
+
export { PageHeader };
|
|
176
|
+
|
|
177
|
+
//# sourceMappingURL=PageHeader-Q3IpCnQd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader-Q3IpCnQd.js","names":[],"sources":["../src/blocks/PageHeader/styles.ts","../src/blocks/PageHeader/PageHeaderDetail.tsx","../src/blocks/PageHeader/PageHeaderIndex.tsx","../src/blocks/PageHeader/PageHeader.tsx"],"sourcesContent":["export const titleRowClass = 'tw:flex tw:flex-wrap tw:items-center tw:gap-x-3 tw:gap-y-2';\nexport const titleClass =\n 'tw:m-0 tw:text-3xl tw:font-semibold tw:leading-9 tw:text-foreground tw:break-words';\nexport const titleCompactClass =\n 'tw:m-0 tw:text-xl tw:font-semibold tw:leading-7 tw:text-foreground tw:break-words';\n// Header badges always read as pills: force pill shape/case/tracking on any\n// Badge inside the slot via its `data-slot=\"badge\"` root (higher specificity\n// than the Badge's own variant classes, so it wins regardless of variant).\n// `tw:py-0` neutralises consumer-forced vertical padding (e.g. StatusLabel's\n// `tw:py-1.5`) so every header pill keeps the standard badge height.\nexport const badgesClass =\n 'tw:flex tw:flex-wrap tw:items-center tw:gap-2 tw:[&_[data-slot=badge]]:rounded-full tw:[&_[data-slot=badge]]:normal-case tw:[&_[data-slot=badge]]:tracking-normal tw:[&_[data-slot=badge]]:py-0';\nexport const descriptionClass =\n 'tw:m-0 tw:max-w-[800px] tw:break-words tw:text-sm tw:leading-5 tw:text-muted-foreground';\n","import type { ComponentProps, ReactNode } from 'react';\n\nimport { cn } from '../../utils';\n\nimport {\n badgesClass,\n descriptionClass,\n titleClass,\n titleCompactClass,\n titleRowClass,\n} from './styles';\n\n// Detail page header — single entity pages (bucket, flow, data app, …).\n// Pattern: docs/patterns/page-header/detail/detail-page-header.md\n// - Breadcrumbs are required; overflow menu sits on the breadcrumbs row.\n// - Max two visible actions: `primaryAction` + optional `secondaryAction`.\n// - All other actions belong in the breadcrumbs-row overflow menu.\n/**\n * Props for `PageHeader.Detail`. Detail pages enforce mandatory breadcrumbs, ≤ 2 visible actions, and an\n * overflow-menu slot on the breadcrumbs row.\n */\ntype PageHeaderDetailProps = Omit<ComponentProps<'header'>, 'title'> & {\n /** `Breadcrumb` chain ending in the entity name (last item is not a link). Required. */\n breadcrumbs: ReactNode;\n /** `DropdownMenu` for tertiary actions. Sits on the breadcrumbs row, not the title row. */\n overflowActions?: ReactNode;\n title: ReactNode;\n /** Optional icon rendered immediately left of the title (entity / component / type icon). */\n titleIcon?: ReactNode;\n /** Inline `Badge`s rendered next to the title (status, environment, version). Always rendered as pills. */\n badges?: ReactNode;\n description?: ReactNode;\n /** Compact title mode: renders a smaller title since the breadcrumb already shows the entity name. Default `false`. */\n compact?: boolean;\n /** Primary action (`Button`). Use the verb appropriate to the entity (Deploy / Run / Save). */\n primaryAction?: ReactNode;\n /** Optional second action (`Button variant=\"secondary\"`). Everything beyond goes in `overflowActions`. */\n secondaryAction?: ReactNode;\n /** Optional `Tabs` row below the title block. */\n headerNav?: ReactNode;\n /**\n * Opt into the responsive layout: the description spans its own full-width row below the title/actions row\n * instead of sharing the title column. Defaults to `false` (description sits inside the title column).\n * Enabled per the `sidebar-navigation` feature in kbc-ui; leaving it off keeps existing consumers\n * byte-identical.\n */\n fullWidthDescription?: boolean;\n};\n\n/**\n * Page header for single-entity pages.\n *\n * **When to use:** the page shows one entity (a bucket, flow, data app) with a parent hierarchy worth\n * breadcrumbing. Primary action is typically \"edit / deploy / run on this entity\".\n * **When NOT to use:** for top-level list pages use `PageHeader.Index`. For pages without a parent\n * hierarchy use `PageHeader.Index` even if they show one entity.\n * **Composition:** nest inside `PageLayout.Header`. Pass `Button`s for actions. Anything beyond the\n * 2-visible-actions cap belongs in `overflowActions` (a `DropdownMenu`), not in extra slots.\n *\n * @see RECIPES.md#list-detail — for the list-page → detail-page navigation pattern\n */\nexport const PageHeaderDetail = ({\n ref,\n className,\n breadcrumbs,\n overflowActions,\n title,\n titleIcon,\n badges,\n description,\n compact = false,\n primaryAction,\n secondaryAction,\n headerNav,\n fullWidthDescription = false,\n ...props\n}: PageHeaderDetailProps) => {\n const titleRow = (\n <div className={cn(titleRowClass, 'tw:min-w-64 tw:flex-1 tw:pr-2')}>\n {titleIcon && <span className=\"tw:flex tw:shrink-0 tw:items-center\">{titleIcon}</span>}\n <h1 className={compact ? titleCompactClass : titleClass}>{title}</h1>\n {badges && <div className={badgesClass}>{badges}</div>}\n </div>\n );\n const actions = (primaryAction || secondaryAction) && (\n <div className=\"tw:ml-auto tw:flex tw:flex-wrap tw:items-center tw:justify-end tw:gap-2\">\n {secondaryAction}\n {primaryAction}\n </div>\n );\n const descriptionNode = description && <p className={descriptionClass}>{description}</p>;\n return (\n <header\n ref={ref}\n className={cn('tw:flex tw:w-full tw:flex-col tw:gap-4', className)}\n {...props}\n >\n <div className=\"tw:flex tw:w-full tw:items-center tw:justify-between tw:gap-4\">\n <div className=\"tw:min-w-0 tw:flex-1\">{breadcrumbs}</div>\n {overflowActions && (\n <div className=\"tw:flex tw:shrink-0 tw:items-center tw:gap-2\">{overflowActions}</div>\n )}\n </div>\n\n {fullWidthDescription ? (\n <div className=\"tw:flex tw:w-full tw:flex-col tw:gap-2\">\n <div className=\"tw:flex tw:w-full tw:flex-wrap tw:items-start tw:justify-between tw:gap-x-4 tw:gap-y-3\">\n {titleRow}\n {actions}\n </div>\n {descriptionNode}\n </div>\n ) : (\n <div className=\"tw:flex tw:w-full tw:flex-wrap tw:items-start tw:justify-between tw:gap-x-4 tw:gap-y-3\">\n <div className=\"tw:flex tw:min-w-64 tw:flex-1 tw:flex-col tw:gap-2 tw:pr-2\">\n <div className={titleRowClass}>\n {titleIcon && (\n <span className=\"tw:flex tw:shrink-0 tw:items-center\">{titleIcon}</span>\n )}\n <h1 className={compact ? titleCompactClass : titleClass}>{title}</h1>\n {badges && <div className={badgesClass}>{badges}</div>}\n </div>\n {descriptionNode}\n </div>\n {actions}\n </div>\n )}\n\n {headerNav}\n </header>\n );\n};\n","import type { ComponentProps, ReactNode } from 'react';\n\nimport { cn } from '../../utils';\n\nimport { descriptionClass, titleClass, titleRowClass } from './styles';\n\n// Index page header — list / collection pages (Flows, Storage, Jobs, …).\n// Pattern: docs/patterns/page-header/index/index-page-header.md\n// - No breadcrumbs (top-level pages).\n// - `metadata` wins over `description` (mutually exclusive in pattern).\n// - At most one primary `action`; pair with the `documentation` icon button.\n/**\n * Props for `PageHeader.Index`. Index pages have no breadcrumbs and no overflow menu — search and filters\n * belong in `PageToolbar`, not here.\n */\ntype PageHeaderIndexProps = Omit<ComponentProps<'header'>, 'title'> & {\n title: ReactNode;\n /** Prose description shown below the title. Mutually exclusive with `metadata` in the pattern; `metadata` wins when both are passed. */\n description?: ReactNode;\n /** Count / system summary shown below the title (e.g. \"3 buckets and 39 tables\"). Wins over `description`. */\n metadata?: ReactNode;\n /** Icon-only docs button (`Button variant=\"invisible\" icon={<BookOpen />}`). Sits next to `action`. */\n documentation?: ReactNode;\n /** Primary \"create / add new X\" `Button`. */\n action?: ReactNode;\n /** Optional `Tabs` row rendered below the title block. Use only when >1 dataset / section is worth navigating to. */\n headerNav?: ReactNode;\n /**\n * Opt into the responsive layout: the description spans its own full-width row below the title, and the\n * action group wraps beneath the title (right-aligned) on narrow widths instead of shrinking. Defaults to\n * `false` (the description shares the title column and actions stay `shrink-0`). Enabled per the\n * `sidebar-navigation` feature in kbc-ui; leaving it off keeps existing consumers byte-identical.\n */\n fullWidthDescription?: boolean;\n};\n\n/**\n * Page header for top-level list / collection pages.\n *\n * **When to use:** the page is a list (Flows, Storage, Jobs, …) with no parent in the same section.\n * Primary action is typically \"create / add a new X\".\n * **When NOT to use:** for single-entity detail pages use `PageHeader.Detail`; for layouts that don't fit\n * either pattern host custom JSX in `PageLayout.Header` directly.\n * **Composition:** nest inside `PageLayout.Header`. Pass `Button`s into `action` and\n * `documentation`. Search and filter chips belong in `PageToolbar`, not here.\n */\nexport const PageHeaderIndex = ({\n ref,\n className,\n title,\n description,\n metadata,\n documentation,\n action,\n headerNav,\n fullWidthDescription = false,\n ...props\n}: PageHeaderIndexProps) => {\n const subtitle = metadata ?? description;\n const hasActions = Boolean(documentation || action);\n return (\n <header\n ref={ref}\n className={cn('tw:flex tw:w-full tw:flex-col tw:gap-4', className)}\n {...props}\n >\n {fullWidthDescription ? (\n <div className=\"tw:flex tw:w-full tw:flex-col tw:gap-2\">\n <div className=\"tw:flex tw:w-full tw:flex-wrap tw:items-start tw:justify-between tw:gap-x-4 tw:gap-y-3\">\n <div className={cn(titleRowClass, 'tw:min-w-64 tw:flex-1 tw:pr-2')}>\n <h1 className={titleClass}>{title}</h1>\n </div>\n {hasActions && (\n <div className=\"tw:ml-auto tw:flex tw:flex-wrap tw:items-center tw:justify-end tw:gap-2\">\n {documentation}\n {action}\n </div>\n )}\n </div>\n {subtitle && <p className={descriptionClass}>{subtitle}</p>}\n </div>\n ) : (\n <div className=\"tw:flex tw:w-full tw:items-start tw:justify-between tw:gap-4\">\n <div className=\"tw:flex tw:min-w-0 tw:flex-1 tw:flex-col tw:gap-2 tw:pr-2\">\n <div className={titleRowClass}>\n <h1 className={titleClass}>{title}</h1>\n </div>\n {subtitle && <p className={descriptionClass}>{subtitle}</p>}\n </div>\n {hasActions && (\n <div className=\"tw:flex tw:shrink-0 tw:items-center tw:gap-2\">\n {documentation}\n {action}\n </div>\n )}\n </div>\n )}\n {headerNav}\n </header>\n );\n};\n","import { PageHeaderDetail } from './PageHeaderDetail';\nimport { PageHeaderIndex } from './PageHeaderIndex';\n\n/**\n * Structured page-header block that encodes the evviku page-header patterns 1:1 at the type level.\n *\n * **When to use:** every kbc-ui page with a structured header (title + actions + optional badges /\n * description / tabs). Choose `PageHeader.Index` for list / collection pages, `PageHeader.Detail` for\n * single-entity pages with breadcrumbs.\n * **When NOT to use:** for layouts that don't match either pattern, host custom JSX inside\n * `PageLayout.Header` directly. For routing-driven tab rows below the header use `PageLayout.Tabs`.\n * **Composition:** nest inside `PageLayout.Header`. Pass `@keboola/design` `Button`s into the header slots\n * (chrome is brand-driven). The variant types enforce pattern constraints (e.g. `Index` rejects breadcrumbs).\n *\n * @see RECIPES.md#page-header-tabs — for the canonical page-header + tabs composition\n */\nexport const PageHeader = {\n /** Index variant — top-level list / collection pages. No breadcrumbs; `metadata` wins over `description`. */\n Index: PageHeaderIndex,\n /** Detail variant — single-entity pages with required breadcrumbs and an overflow-actions slot. Max 2 visible actions. */\n Detail: PageHeaderDetail,\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { cn } from "./classNames-BzrkDnOD.js";
|
|
2
|
+
import { mergeRefs } from "./internal/utils/mergeRefs.js";
|
|
3
|
+
import { createContext, use, useEffect, useRef } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/blocks/SectionNav/constants.ts
|
|
6
|
+
/**
|
|
7
|
+
* Names the container query `SectionNav` reads to pick the tree over the dropdown.
|
|
8
|
+
*
|
|
9
|
+
* It has to sit on an **ancestor**: a container query matches descendants only, so the element that
|
|
10
|
+
* names the container can never read it — and it cannot be `SectionNav`'s own wrapper either, whose
|
|
11
|
+
* width is what the switch changes (256px in a row, full width in a column), which would oscillate.
|
|
12
|
+
* `PageLayout.Content nav={…}` puts it on the right element for you.
|
|
13
|
+
*/
|
|
14
|
+
const SECTION_NAV_CONTAINER = "tw:@container/section-nav";
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/blocks/PageLayout/context.ts
|
|
17
|
+
/**
|
|
18
|
+
* The `PageLayout` root element, so `PageLayout.Header` can publish its measured height as a CSS
|
|
19
|
+
* custom property the whole page can read — `PageLayout.Content nav={…}` pins the nav to it.
|
|
20
|
+
*
|
|
21
|
+
* A slot rendered outside a `PageLayout` reads `null` and skips publishing rather than throwing:
|
|
22
|
+
* `PageLayout.Footer` is already documented as usable on its own.
|
|
23
|
+
*/
|
|
24
|
+
const PageLayoutRootContext = createContext(null);
|
|
25
|
+
const usePageLayoutRoot = () => use(PageLayoutRootContext);
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/blocks/PageLayout/PageLayout.tsx
|
|
28
|
+
const maxWidthClass = {
|
|
29
|
+
narrow: "tw:max-w-[976px]",
|
|
30
|
+
default: "tw:max-w-[1280px]",
|
|
31
|
+
wide: "tw:max-w-[1600px]",
|
|
32
|
+
full: "tw:max-w-full"
|
|
33
|
+
};
|
|
34
|
+
const Root = ({ ref, className, maxWidth = "full", children, ...props }) => {
|
|
35
|
+
const rootRef = useRef(null);
|
|
36
|
+
return /* @__PURE__ */ jsx(PageLayoutRootContext, {
|
|
37
|
+
value: rootRef,
|
|
38
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
39
|
+
ref: mergeRefs(ref ?? null, rootRef),
|
|
40
|
+
className: cn("tw:flex tw:flex-col tw:gap-4 tw:w-full tw:mx-auto", maxWidthClass[maxWidth], className),
|
|
41
|
+
...props,
|
|
42
|
+
children
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const Breadcrumbs = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
47
|
+
ref,
|
|
48
|
+
className: cn("tw:w-full", className),
|
|
49
|
+
...props,
|
|
50
|
+
children
|
|
51
|
+
});
|
|
52
|
+
const STICKY_CHROME_BLEED = "tw:before:absolute tw:before:inset-x-[-0.5rem] tw:before:inset-y-0 tw:before:-z-10 tw:before:bg-background";
|
|
53
|
+
const Header = ({ ref, className, sticky = false, children, ...props }) => {
|
|
54
|
+
const rootRef = usePageLayoutRoot();
|
|
55
|
+
const headerRef = useRef(null);
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const header = headerRef.current;
|
|
58
|
+
const root = rootRef?.current;
|
|
59
|
+
if (!sticky || !header || !root || typeof ResizeObserver === "undefined") return;
|
|
60
|
+
const publish = () => {
|
|
61
|
+
root.style.setProperty("--page-header-height", `${Math.round(header.getBoundingClientRect().height)}px`);
|
|
62
|
+
};
|
|
63
|
+
const observer = new ResizeObserver(publish);
|
|
64
|
+
observer.observe(header);
|
|
65
|
+
publish();
|
|
66
|
+
return () => {
|
|
67
|
+
observer.disconnect();
|
|
68
|
+
root.style.removeProperty("--page-header-height");
|
|
69
|
+
};
|
|
70
|
+
}, [sticky, rootRef]);
|
|
71
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
72
|
+
ref: mergeRefs(ref ?? null, headerRef),
|
|
73
|
+
className: cn("tw:w-full", sticky && ["tw:sticky tw:top-0 tw:z-20 tw:bg-background", STICKY_CHROME_BLEED], className),
|
|
74
|
+
...props,
|
|
75
|
+
children: [children, sticky && /* @__PURE__ */ jsx("div", {
|
|
76
|
+
"aria-hidden": true,
|
|
77
|
+
className: "tw:pointer-events-none tw:absolute tw:inset-x-0 tw:top-full tw:h-6 tw:bg-linear-to-b tw:from-background tw:to-[rgb(var(--background)/0)]"
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const Tabs = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
82
|
+
ref,
|
|
83
|
+
className: cn("tw:flex tw:w-full tw:items-center tw:border-b tw:border-border", className),
|
|
84
|
+
...props,
|
|
85
|
+
children
|
|
86
|
+
});
|
|
87
|
+
const scrollParent = (from) => {
|
|
88
|
+
for (let el = from.parentElement; el; el = el.parentElement) if (/auto|scroll/.test(getComputedStyle(el).overflowY)) return el;
|
|
89
|
+
return null;
|
|
90
|
+
};
|
|
91
|
+
const useAvailableHeight = () => {
|
|
92
|
+
const rowRef = useRef(null);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
const row = rowRef.current;
|
|
95
|
+
if (!row || typeof ResizeObserver === "undefined") return;
|
|
96
|
+
const scroller = scrollParent(row);
|
|
97
|
+
const publish = () => {
|
|
98
|
+
const top = row.getBoundingClientRect().top + (scroller?.scrollTop ?? window.scrollY);
|
|
99
|
+
const room = scroller ? scroller.clientHeight - (top - scroller.getBoundingClientRect().top) : window.innerHeight - top;
|
|
100
|
+
row.style.setProperty("--section-nav-available", `${Math.max(0, Math.round(room))}px`);
|
|
101
|
+
};
|
|
102
|
+
const observer = new ResizeObserver(publish);
|
|
103
|
+
observer.observe(row);
|
|
104
|
+
if (scroller) observer.observe(scroller);
|
|
105
|
+
publish();
|
|
106
|
+
return () => observer.disconnect();
|
|
107
|
+
}, []);
|
|
108
|
+
return rowRef;
|
|
109
|
+
};
|
|
110
|
+
const Content = ({ ref, className, nav, children, ...props }) => {
|
|
111
|
+
const rowRef = useAvailableHeight();
|
|
112
|
+
if (!nav) return /* @__PURE__ */ jsx("div", {
|
|
113
|
+
ref,
|
|
114
|
+
className: cn("tw:flex tw:w-full tw:flex-1 tw:flex-col", className),
|
|
115
|
+
...props,
|
|
116
|
+
children
|
|
117
|
+
});
|
|
118
|
+
return /* @__PURE__ */ jsx("div", {
|
|
119
|
+
ref,
|
|
120
|
+
className: cn("tw:group/page-layout-content tw:flex tw:w-full tw:flex-1 tw:flex-col", SECTION_NAV_CONTAINER, className),
|
|
121
|
+
...props,
|
|
122
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
123
|
+
ref: rowRef,
|
|
124
|
+
className: "tw:flex tw:w-full tw:@[640px]/section-nav:flex-row tw:@[640px]/section-nav:gap-8 tw:@max-[640px]/section-nav:flex-col tw:@max-[640px]/section-nav:gap-4",
|
|
125
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
126
|
+
"data-slot": "page-layout-nav",
|
|
127
|
+
className: "tw:sticky tw:top-[calc(var(--page-header-height,0px)+1rem)] tw:z-10 tw:shrink-0 tw:self-start tw:@[640px]/section-nav:max-h-[var(--section-nav-available,100dvh)] tw:@[640px]/section-nav:w-64 tw:@[640px]/section-nav:overflow-y-auto tw:@[640px]/section-nav:supports-[animation-timeline:scroll()]:scroll-fade-y tw:@max-[640px]/section-nav:w-full tw:@max-[640px]/section-nav:bg-background tw:@max-[640px]/section-nav:before:absolute tw:@max-[640px]/section-nav:before:inset-x-[-0.5rem] tw:@max-[640px]/section-nav:before:top-[-1rem] tw:@max-[640px]/section-nav:before:bottom-0 tw:@max-[640px]/section-nav:before:-z-10 tw:@max-[640px]/section-nav:before:bg-background tw:@max-[640px]/section-nav:after:pointer-events-none tw:@max-[640px]/section-nav:after:absolute tw:@max-[640px]/section-nav:after:inset-x-0 tw:@max-[640px]/section-nav:after:top-full tw:@max-[640px]/section-nav:after:h-6 tw:@max-[640px]/section-nav:after:bg-linear-to-b tw:@max-[640px]/section-nav:after:from-background tw:@max-[640px]/section-nav:after:to-[rgb(var(--background)/0)]",
|
|
128
|
+
children: nav
|
|
129
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
130
|
+
"data-slot": "page-layout-content-body",
|
|
131
|
+
className: "tw:[--page-content-sticky-top:var(--page-header-height,0px)] tw:min-w-0 tw:flex-1",
|
|
132
|
+
children
|
|
133
|
+
})]
|
|
134
|
+
})
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
const Footer = ({ ref, className, sticky = false, children, ...props }) => /* @__PURE__ */ jsx("footer", {
|
|
138
|
+
ref,
|
|
139
|
+
className: cn("tw:flex tw:w-full tw:items-center tw:justify-end tw:gap-3 tw:border-t tw:border-border tw:bg-background tw:px-6 tw:py-4", sticky && ["tw:sticky tw:bottom-0 tw:z-10", STICKY_CHROME_BLEED], className),
|
|
140
|
+
...props,
|
|
141
|
+
children
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* Compound page-chrome block. Provides every kbc-ui page with the same content-column shape:
|
|
145
|
+
* max-width container + vertical rhythm + named slots. The gutter between content and the app
|
|
146
|
+
* frame (sidebar / navbar) is owned by the shell, not by `PageLayout` — so the `Root` adds no
|
|
147
|
+
* outer page padding of its own (`PageLayout.Footer` keeps its own action-bar padding).
|
|
148
|
+
*
|
|
149
|
+
* **When to use:** every new kbc-ui page. Do not roll your own `<div className="tw:flex tw:flex-col">`
|
|
150
|
+
* chrome. Host `PageHeader.Index` / `PageHeader.Detail` inside `PageLayout.Header` for the structured
|
|
151
|
+
* page-header patterns.
|
|
152
|
+
* **When NOT to use:** the left-rail `Sidebar` lives in the app shell outside `PageLayout`. For embedded
|
|
153
|
+
* widgets or modal bodies the layout chrome is the modal / card itself, not `PageLayout`.
|
|
154
|
+
* **Composition:** `PageLayout` is opinionated about chrome only — slots accept any `ReactNode`. Put
|
|
155
|
+
* search / filter pills in `PageToolbar`, never in the header. Form submit bars go in
|
|
156
|
+
* `PageLayout.Footer sticky`.
|
|
157
|
+
*
|
|
158
|
+
* @see RECIPES.md#list-detail — for the index → detail page pattern
|
|
159
|
+
* @see RECIPES.md#section-nav — for the in-page vertical navigation pattern
|
|
160
|
+
*/
|
|
161
|
+
const PageLayout = Object.assign(Root, {
|
|
162
|
+
/** Detail-pattern breadcrumb row. Usually composed automatically by `PageHeader.Detail` — slot exists for layouts that don't fit either `PageHeader` variant. */
|
|
163
|
+
Breadcrumbs,
|
|
164
|
+
/** Host slot for `PageHeader.Index` / `PageHeader.Detail`, or custom header JSX when neither variant fits. Pass `sticky` to pin it — it then also publishes its measured height as `--page-header-height` on the root, which `Content nav` pins the nav to. */
|
|
165
|
+
Header,
|
|
166
|
+
/** Escape hatch for routing-based tab rows. Use `Tabs` / `TabsContent` core components inside, never a raw `<button>`. */
|
|
167
|
+
Tabs,
|
|
168
|
+
/** Main content slot. Lists, cards, tables. Pass `nav` (a `SectionNav`) for the two-column in-page-navigation layout; without it the slot is a plain column, exactly as before. */
|
|
169
|
+
Content,
|
|
170
|
+
/** Bottom action bar — form submit + cancel. Pass `sticky` for a footer that pins to the viewport. */
|
|
171
|
+
Footer
|
|
172
|
+
});
|
|
173
|
+
//#endregion
|
|
174
|
+
export { PageLayout };
|
|
175
|
+
|
|
176
|
+
//# sourceMappingURL=PageLayout-DSVM-ASz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout-DSVM-ASz.js","names":[],"sources":["../src/blocks/SectionNav/constants.ts","../src/blocks/PageLayout/context.ts","../src/blocks/PageLayout/PageLayout.tsx"],"sourcesContent":["/**\n * Names the container query `SectionNav` reads to pick the tree over the dropdown.\n *\n * It has to sit on an **ancestor**: a container query matches descendants only, so the element that\n * names the container can never read it — and it cannot be `SectionNav`'s own wrapper either, whose\n * width is what the switch changes (256px in a row, full width in a column), which would oscillate.\n * `PageLayout.Content nav={…}` puts it on the right element for you.\n */\nexport const SECTION_NAV_CONTAINER = 'tw:@container/section-nav';\n","import { createContext, use } from 'react';\nimport type { RefObject } from 'react';\n\n/**\n * The `PageLayout` root element, so `PageLayout.Header` can publish its measured height as a CSS\n * custom property the whole page can read — `PageLayout.Content nav={…}` pins the nav to it.\n *\n * A slot rendered outside a `PageLayout` reads `null` and skips publishing rather than throwing:\n * `PageLayout.Footer` is already documented as usable on its own.\n */\nexport const PageLayoutRootContext = createContext<RefObject<HTMLDivElement | null> | null>(null);\n\nexport const usePageLayoutRoot = () => use(PageLayoutRootContext);\n","import { useEffect, useRef } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport { cn, mergeRefs } from '../../utils';\nimport { SECTION_NAV_CONTAINER } from '../SectionNav/constants';\n\nimport { PageLayoutRootContext, usePageLayoutRoot } from './context';\n\n/**\n * Props for `PageLayout` root. `maxWidth` constrains the content column —\n * `narrow` (976px) for forms, `default` (1280px) for most pages, `wide` (1600px) for dense detail views,\n * `full` for edge-to-edge layouts.\n */\ntype RootProps = ComponentProps<'div'> & {\n maxWidth?: 'default' | 'narrow' | 'wide' | 'full';\n};\n\nconst maxWidthClass = {\n narrow: 'tw:max-w-[976px]',\n default: 'tw:max-w-[1280px]',\n wide: 'tw:max-w-[1600px]',\n full: 'tw:max-w-full',\n} as const;\n\nconst Root = ({ ref, className, maxWidth = 'full', children, ...props }: RootProps) => {\n const rootRef = useRef<HTMLDivElement>(null);\n\n return (\n <PageLayoutRootContext value={rootRef}>\n <div\n ref={mergeRefs(ref ?? null, rootRef)}\n className={cn(\n 'tw:flex tw:flex-col tw:gap-4 tw:w-full tw:mx-auto',\n maxWidthClass[maxWidth],\n className,\n )}\n {...props}\n >\n {children}\n </div>\n </PageLayoutRootContext>\n );\n};\n\nconst Breadcrumbs = ({ ref, className, children, ...props }: ComponentProps<'div'>) => (\n <div ref={ref} className={cn('tw:w-full', className)} {...props}>\n {children}\n </div>\n);\n\nconst STICKY_CHROME_BLEED =\n 'tw:before:absolute tw:before:inset-x-[-0.5rem] tw:before:inset-y-0 tw:before:-z-10 tw:before:bg-background';\n\ntype HeaderProps = ComponentProps<'header'> & {\n sticky?: boolean;\n};\n\nconst Header = ({ ref, className, sticky = false, children, ...props }: HeaderProps) => {\n const rootRef = usePageLayoutRoot();\n const headerRef = useRef<HTMLElement>(null);\n\n useEffect(() => {\n const header = headerRef.current;\n const root = rootRef?.current;\n\n if (!sticky || !header || !root || typeof ResizeObserver === 'undefined') return;\n\n const publish = () => {\n root.style.setProperty(\n '--page-header-height',\n `${Math.round(header.getBoundingClientRect().height)}px`,\n );\n };\n\n const observer = new ResizeObserver(publish);\n\n observer.observe(header);\n publish();\n\n return () => {\n observer.disconnect();\n root.style.removeProperty('--page-header-height');\n };\n }, [sticky, rootRef]);\n\n return (\n <header\n ref={mergeRefs(ref ?? null, headerRef)}\n className={cn(\n 'tw:w-full',\n sticky && ['tw:sticky tw:top-0 tw:z-20 tw:bg-background', STICKY_CHROME_BLEED],\n className,\n )}\n {...props}\n >\n {children}\n {sticky && (\n <div\n aria-hidden\n className=\"tw:pointer-events-none tw:absolute tw:inset-x-0 tw:top-full tw:h-6 tw:bg-linear-to-b tw:from-background tw:to-[rgb(var(--background)/0)]\"\n />\n )}\n </header>\n );\n};\n\nconst Tabs = ({ ref, className, children, ...props }: ComponentProps<'div'>) => (\n <div\n ref={ref}\n className={cn('tw:flex tw:w-full tw:items-center tw:border-b tw:border-border', className)}\n {...props}\n >\n {children}\n </div>\n);\n\ntype ContentProps = ComponentProps<'div'> & {\n nav?: ReactNode;\n};\n\nconst scrollParent = (from: HTMLElement): HTMLElement | null => {\n for (let el = from.parentElement; el; el = el.parentElement) {\n if (/auto|scroll/.test(getComputedStyle(el).overflowY)) return el;\n }\n\n return null;\n};\n\nconst useAvailableHeight = () => {\n const rowRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const row = rowRef.current;\n\n if (!row || typeof ResizeObserver === 'undefined') return;\n\n const scroller = scrollParent(row);\n\n const publish = () => {\n const top = row.getBoundingClientRect().top + (scroller?.scrollTop ?? window.scrollY);\n const room = scroller\n ? scroller.clientHeight - (top - scroller.getBoundingClientRect().top)\n : window.innerHeight - top;\n\n row.style.setProperty('--section-nav-available', `${Math.max(0, Math.round(room))}px`);\n };\n\n const observer = new ResizeObserver(publish);\n\n observer.observe(row);\n if (scroller) observer.observe(scroller);\n publish();\n\n return () => observer.disconnect();\n }, []);\n\n return rowRef;\n};\n\nconst Content = ({ ref, className, nav, children, ...props }: ContentProps) => {\n const rowRef = useAvailableHeight();\n\n if (!nav) {\n return (\n <div\n ref={ref}\n className={cn('tw:flex tw:w-full tw:flex-1 tw:flex-col', className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n 'tw:group/page-layout-content tw:flex tw:w-full tw:flex-1 tw:flex-col',\n SECTION_NAV_CONTAINER,\n className,\n )}\n {...props}\n >\n <div\n ref={rowRef}\n className=\"tw:flex tw:w-full tw:@[640px]/section-nav:flex-row tw:@[640px]/section-nav:gap-8 tw:@max-[640px]/section-nav:flex-col tw:@max-[640px]/section-nav:gap-4\"\n >\n <div\n data-slot=\"page-layout-nav\"\n className=\"tw:sticky tw:top-[calc(var(--page-header-height,0px)+1rem)] tw:z-10 tw:shrink-0 tw:self-start tw:@[640px]/section-nav:max-h-[var(--section-nav-available,100dvh)] tw:@[640px]/section-nav:w-64 tw:@[640px]/section-nav:overflow-y-auto tw:@[640px]/section-nav:supports-[animation-timeline:scroll()]:scroll-fade-y tw:@max-[640px]/section-nav:w-full tw:@max-[640px]/section-nav:bg-background tw:@max-[640px]/section-nav:before:absolute tw:@max-[640px]/section-nav:before:inset-x-[-0.5rem] tw:@max-[640px]/section-nav:before:top-[-1rem] tw:@max-[640px]/section-nav:before:bottom-0 tw:@max-[640px]/section-nav:before:-z-10 tw:@max-[640px]/section-nav:before:bg-background tw:@max-[640px]/section-nav:after:pointer-events-none tw:@max-[640px]/section-nav:after:absolute tw:@max-[640px]/section-nav:after:inset-x-0 tw:@max-[640px]/section-nav:after:top-full tw:@max-[640px]/section-nav:after:h-6 tw:@max-[640px]/section-nav:after:bg-linear-to-b tw:@max-[640px]/section-nav:after:from-background tw:@max-[640px]/section-nav:after:to-[rgb(var(--background)/0)]\"\n >\n {nav}\n </div>\n <div\n data-slot=\"page-layout-content-body\"\n className=\"tw:[--page-content-sticky-top:var(--page-header-height,0px)] tw:min-w-0 tw:flex-1\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n};\n\ntype FooterProps = ComponentProps<'footer'> & {\n sticky?: boolean;\n};\n\nconst Footer = ({ ref, className, sticky = false, children, ...props }: FooterProps) => (\n <footer\n ref={ref}\n className={cn(\n 'tw:flex tw:w-full tw:items-center tw:justify-end tw:gap-3 tw:border-t tw:border-border tw:bg-background tw:px-6 tw:py-4',\n sticky && ['tw:sticky tw:bottom-0 tw:z-10', STICKY_CHROME_BLEED],\n className,\n )}\n {...props}\n >\n {children}\n </footer>\n);\n\n/**\n * Compound page-chrome block. Provides every kbc-ui page with the same content-column shape:\n * max-width container + vertical rhythm + named slots. The gutter between content and the app\n * frame (sidebar / navbar) is owned by the shell, not by `PageLayout` — so the `Root` adds no\n * outer page padding of its own (`PageLayout.Footer` keeps its own action-bar padding).\n *\n * **When to use:** every new kbc-ui page. Do not roll your own `<div className=\"tw:flex tw:flex-col\">`\n * chrome. Host `PageHeader.Index` / `PageHeader.Detail` inside `PageLayout.Header` for the structured\n * page-header patterns.\n * **When NOT to use:** the left-rail `Sidebar` lives in the app shell outside `PageLayout`. For embedded\n * widgets or modal bodies the layout chrome is the modal / card itself, not `PageLayout`.\n * **Composition:** `PageLayout` is opinionated about chrome only — slots accept any `ReactNode`. Put\n * search / filter pills in `PageToolbar`, never in the header. Form submit bars go in\n * `PageLayout.Footer sticky`.\n *\n * @see RECIPES.md#list-detail — for the index → detail page pattern\n * @see RECIPES.md#section-nav — for the in-page vertical navigation pattern\n */\nexport const PageLayout = Object.assign(Root, {\n /** Detail-pattern breadcrumb row. Usually composed automatically by `PageHeader.Detail` — slot exists for layouts that don't fit either `PageHeader` variant. */\n Breadcrumbs,\n /** Host slot for `PageHeader.Index` / `PageHeader.Detail`, or custom header JSX when neither variant fits. Pass `sticky` to pin it — it then also publishes its measured height as `--page-header-height` on the root, which `Content nav` pins the nav to. */\n Header,\n /** Escape hatch for routing-based tab rows. Use `Tabs` / `TabsContent` core components inside, never a raw `<button>`. */\n Tabs,\n /** Main content slot. Lists, cards, tables. Pass `nav` (a `SectionNav`) for the two-column in-page-navigation layout; without it the slot is a plain column, exactly as before. */\n Content,\n /** Bottom action bar — form submit + cancel. Pass `sticky` for a footer that pins to the viewport. */\n Footer,\n});\n"],"mappings":"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"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { cn } from "./classNames-BzrkDnOD.js";
|
|
2
|
+
import { ChevronDown, Plus, X } from "./icons-Cek151jC.js";
|
|
3
|
+
import { Button } from "./Button-6xBX0nNl.js";
|
|
4
|
+
import { Popover } from "./Popover-CzeHjvrB.js";
|
|
5
|
+
import { Badge } from "./Badge-Ch26CXoP.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/blocks/PageToolbar/PageToolbarToken.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Editable filter token (Query Builder variant) — `Badge` pill with a `chevron-down`
|
|
10
|
+
* popover trigger for editing values and an `×` dismiss button. The popover content
|
|
11
|
+
* is supplied by the caller via the `popover` slot (typically a `Combobox` or option list).
|
|
12
|
+
*/
|
|
13
|
+
const PageToolbarToken = ({ children, popover, onRemove, removeAriaLabel, ...props }) => /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(Badge, {
|
|
14
|
+
...props,
|
|
15
|
+
asChild: true,
|
|
16
|
+
variant: "pill",
|
|
17
|
+
color: "blue-inverse",
|
|
18
|
+
suffix: /* @__PURE__ */ jsx(Button, {
|
|
19
|
+
type: "button",
|
|
20
|
+
variant: "inline",
|
|
21
|
+
size: "icon-2xs",
|
|
22
|
+
"aria-label": removeAriaLabel,
|
|
23
|
+
onClick: onRemove,
|
|
24
|
+
children: /* @__PURE__ */ jsx(X, { className: "tw:size-3" })
|
|
25
|
+
}),
|
|
26
|
+
children: /* @__PURE__ */ jsxs(Popover.Trigger, {
|
|
27
|
+
type: "button",
|
|
28
|
+
className: "tw:inline-flex tw:cursor-pointer tw:items-center tw:gap-1 tw:bg-inherit tw:text-inherit tailwindcss-preflight",
|
|
29
|
+
children: [children, /* @__PURE__ */ jsx(ChevronDown, { className: "tw:size-3" })]
|
|
30
|
+
})
|
|
31
|
+
}), /* @__PURE__ */ jsx(Popover.Content, {
|
|
32
|
+
align: "start",
|
|
33
|
+
children: popover
|
|
34
|
+
})] });
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/blocks/PageToolbar/PageToolbar.tsx
|
|
37
|
+
const Root = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
38
|
+
ref,
|
|
39
|
+
className: cn("tw:flex tw:flex-wrap tw:items-center tw:gap-3 tw:w-full", className),
|
|
40
|
+
...props,
|
|
41
|
+
children
|
|
42
|
+
});
|
|
43
|
+
const Search = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
44
|
+
ref,
|
|
45
|
+
className: cn("tw:mr-auto tw:flex tw:items-center tw:gap-2 tw:w-full tw:sm:w-auto tw:sm:min-w-64 tw:sm:max-w-md", "tw:*:first:min-w-0 tw:*:first:flex-1", className),
|
|
46
|
+
...props,
|
|
47
|
+
children
|
|
48
|
+
});
|
|
49
|
+
const Right = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
50
|
+
ref,
|
|
51
|
+
className: cn("tw:flex tw:flex-wrap tw:items-center tw:gap-2", className),
|
|
52
|
+
...props,
|
|
53
|
+
children
|
|
54
|
+
});
|
|
55
|
+
const ControlGroup = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
56
|
+
ref,
|
|
57
|
+
className: cn("tw:flex tw:items-center tw:gap-2", className),
|
|
58
|
+
...props,
|
|
59
|
+
children
|
|
60
|
+
});
|
|
61
|
+
const ActiveFilters = ({ ref, className, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
62
|
+
ref,
|
|
63
|
+
className: cn("tw:flex tw:flex-wrap tw:items-center tw:gap-2 tw:basis-full", className),
|
|
64
|
+
...props,
|
|
65
|
+
children
|
|
66
|
+
});
|
|
67
|
+
const Chip = ({ children, onRemove, removeAriaLabel, ...props }) => /* @__PURE__ */ jsx(Badge, {
|
|
68
|
+
...props,
|
|
69
|
+
variant: "pill",
|
|
70
|
+
color: "blue-inverse",
|
|
71
|
+
suffix: /* @__PURE__ */ jsx(Button, {
|
|
72
|
+
type: "button",
|
|
73
|
+
variant: "inline",
|
|
74
|
+
size: "icon-2xs",
|
|
75
|
+
"aria-label": removeAriaLabel,
|
|
76
|
+
onClick: onRemove,
|
|
77
|
+
children: /* @__PURE__ */ jsx(X, { className: "tw:size-3" })
|
|
78
|
+
}),
|
|
79
|
+
children
|
|
80
|
+
});
|
|
81
|
+
const AddFilter = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Button, {
|
|
82
|
+
variant: "invisible",
|
|
83
|
+
size: "small",
|
|
84
|
+
className: cn("tw:gap-1.5", className),
|
|
85
|
+
...props,
|
|
86
|
+
children: [/* @__PURE__ */ jsx(Plus, { className: "tw:size-4" }), children ?? "Add filter"]
|
|
87
|
+
});
|
|
88
|
+
const Clear = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Button, {
|
|
89
|
+
variant: "invisible",
|
|
90
|
+
size: "small",
|
|
91
|
+
className: cn("tw:ml-auto", className),
|
|
92
|
+
...props,
|
|
93
|
+
children: children ?? "Clear all"
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* Two-row toolbar for index pages — search on the left, filter / sort / utility / view
|
|
97
|
+
* controls on the right, an optional Active Filters row below for filter chips or tokens.
|
|
98
|
+
*
|
|
99
|
+
* **When to use:** every index page that supports search or filtering. Hosts inside
|
|
100
|
+
* `PageLayout` as the search / filter row, between `PageLayout.Header` and `PageLayout.Content`.
|
|
101
|
+
* **When NOT to use:** detail pages, form pages, or anywhere there is no search / filter
|
|
102
|
+
* surface. For routing-based tab rows reach for `PageLayout.Tabs`.
|
|
103
|
+
*
|
|
104
|
+
* **Recommended composition (enforced at the call site):**
|
|
105
|
+
*
|
|
106
|
+
* - `Search` sits on the left; the right cluster auto-aligns via flex.
|
|
107
|
+
* - Right cluster order: `Filters` → `Sort` → `Actions` → `View`. View controls are always
|
|
108
|
+
* the final control group — do not render any control after `View`.
|
|
109
|
+
* - `ActiveFilters` is the second row. Render it only when one or more filters are active.
|
|
110
|
+
* - `Clear` self-aligns to the far right of `ActiveFilters`.
|
|
111
|
+
*
|
|
112
|
+
* The block is variant-agnostic: render filter chips (Standard variant, non-editable) or
|
|
113
|
+
* tokens (Query Builder variant, editable) into `ActiveFilters` as plain children — do not
|
|
114
|
+
* mix the two in one toolbar.
|
|
115
|
+
*
|
|
116
|
+
* @see https://github.com/evviku/design-system-docs/blob/main/docs/patterns/toolbar/toolbar.md
|
|
117
|
+
*/
|
|
118
|
+
const PageToolbar = Object.assign(Root, {
|
|
119
|
+
/** Left slot — typically a `SearchInput`. */
|
|
120
|
+
Search,
|
|
121
|
+
/** Right cluster — host the four control groups below in the recommended order. */
|
|
122
|
+
Right,
|
|
123
|
+
/** Filter controls (`Combobox`, `Select`, `DatePicker`). */
|
|
124
|
+
Filters: ControlGroup,
|
|
125
|
+
/** Sort control. */
|
|
126
|
+
Sort: ControlGroup,
|
|
127
|
+
/** Utility actions (Export, Refresh, …). */
|
|
128
|
+
Actions: ControlGroup,
|
|
129
|
+
/** View toggle (List / Grid). Always render last in the right cluster. */
|
|
130
|
+
View: ControlGroup,
|
|
131
|
+
/**
|
|
132
|
+
* Active filters row. Render only when one or more filters are active. Pass filter chips
|
|
133
|
+
* (Standard variant) or tokens (Query Builder variant) as children, optionally followed
|
|
134
|
+
* by `AddFilter` / `Clear`.
|
|
135
|
+
*/
|
|
136
|
+
ActiveFilters,
|
|
137
|
+
/** Non-editable filter chip (Standard variant) — `Badge` pill with a dismiss button. */
|
|
138
|
+
Chip,
|
|
139
|
+
/**
|
|
140
|
+
* Editable filter token (Query Builder variant) — `Badge` pill with a `chevron-down`
|
|
141
|
+
* popover trigger for editing values and an `×` dismiss button. The popover content
|
|
142
|
+
* is supplied by the caller via the `popover` slot (typically a `Combobox` or option list).
|
|
143
|
+
*/
|
|
144
|
+
Token: PageToolbarToken,
|
|
145
|
+
/** "+ Add filter" action — typically rendered after the chips/tokens in `ActiveFilters`. */
|
|
146
|
+
AddFilter,
|
|
147
|
+
/** "Clear all" action — self-aligns to the far right of `ActiveFilters`. */
|
|
148
|
+
Clear
|
|
149
|
+
});
|
|
150
|
+
//#endregion
|
|
151
|
+
export { PageToolbar };
|
|
152
|
+
|
|
153
|
+
//# sourceMappingURL=PageToolbar-OQg3mPF-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageToolbar-OQg3mPF-.js","names":[],"sources":["../src/blocks/PageToolbar/PageToolbarToken.tsx","../src/blocks/PageToolbar/PageToolbar.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from 'react';\n\nimport { Badge } from '../../components/Badge';\nimport { Button } from '../../components/Button';\nimport { Popover } from '../../components/Popover';\nimport { ChevronDown, X } from '../../icons';\n\ntype PageToolbarTokenProps = Omit<\n ComponentPropsWithoutRef<typeof Badge>,\n 'variant' | 'color' | 'suffix' | 'children' | 'asChild' | 'popover'\n> & {\n children: ReactNode;\n /** Popover content rendered when the chevron-down trigger is clicked — typically a value editor. */\n popover: ReactNode;\n onRemove: () => void;\n removeAriaLabel: string;\n};\n\n/**\n * Editable filter token (Query Builder variant) — `Badge` pill with a `chevron-down`\n * popover trigger for editing values and an `×` dismiss button. The popover content\n * is supplied by the caller via the `popover` slot (typically a `Combobox` or option list).\n */\nexport const PageToolbarToken = ({\n children,\n popover,\n onRemove,\n removeAriaLabel,\n ...props\n}: PageToolbarTokenProps) => (\n <Popover>\n <Badge\n {...props}\n asChild\n variant=\"pill\"\n color=\"blue-inverse\"\n suffix={\n <Button\n type=\"button\"\n variant=\"inline\"\n size=\"icon-2xs\"\n aria-label={removeAriaLabel}\n onClick={onRemove}\n >\n <X className=\"tw:size-3\" />\n </Button>\n }\n >\n <Popover.Trigger\n type=\"button\"\n className=\"tw:inline-flex tw:cursor-pointer tw:items-center tw:gap-1 tw:bg-inherit tw:text-inherit tailwindcss-preflight\"\n >\n {children}\n <ChevronDown className=\"tw:size-3\" />\n </Popover.Trigger>\n </Badge>\n <Popover.Content align=\"start\">{popover}</Popover.Content>\n </Popover>\n);\n","import type { ComponentProps, ComponentPropsWithoutRef, ReactNode } from 'react';\n\nimport { Badge } from '../../components/Badge';\nimport { Button } from '../../components/Button';\nimport { Plus, X } from '../../icons';\nimport { cn } from '../../utils';\n\nimport { PageToolbarToken } from './PageToolbarToken';\n\ntype DivProps = ComponentProps<'div'>;\n\nconst Root = ({ ref, className, children, ...props }: DivProps) => (\n <div\n ref={ref}\n className={cn('tw:flex tw:flex-wrap tw:items-center tw:gap-3 tw:w-full', className)}\n {...props}\n >\n {children}\n </div>\n);\n\nconst Search = ({ ref, className, children, ...props }: DivProps) => (\n <div\n ref={ref}\n className={cn(\n 'tw:mr-auto tw:flex tw:items-center tw:gap-2 tw:w-full tw:sm:w-auto tw:sm:min-w-64 tw:sm:max-w-md',\n // The slot sizes itself between `min-w-64` and `max-w-md`, so the search field has to fill it —\n // without this the input stays content-width (≈224px inside a 448px slot) and truncates its own\n // placeholder, and every caller ends up hand-picking a width class to compensate.\n //\n // - First child only. The documented composition is the search field followed by filter pills;\n // stretching every child would size the pills to match the input.\n // - `min-w-0` so a long value shrinks the input rather than overflowing the toolbar.\n 'tw:*:first:min-w-0 tw:*:first:flex-1',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n);\n\nconst Right = ({ ref, className, children, ...props }: DivProps) => (\n <div\n ref={ref}\n className={cn('tw:flex tw:flex-wrap tw:items-center tw:gap-2', className)}\n {...props}\n >\n {children}\n </div>\n);\n\nconst ControlGroup = ({ ref, className, children, ...props }: DivProps) => (\n <div ref={ref} className={cn('tw:flex tw:items-center tw:gap-2', className)} {...props}>\n {children}\n </div>\n);\n\nconst ActiveFilters = ({ ref, className, children, ...props }: DivProps) => (\n <div\n ref={ref}\n className={cn('tw:flex tw:flex-wrap tw:items-center tw:gap-2 tw:basis-full', className)}\n {...props}\n >\n {children}\n </div>\n);\n\ntype ChipProps = Omit<\n ComponentPropsWithoutRef<typeof Badge>,\n 'variant' | 'color' | 'suffix' | 'children'\n> & {\n children: ReactNode;\n onRemove: () => void;\n removeAriaLabel: string;\n};\n\nconst Chip = ({ children, onRemove, removeAriaLabel, ...props }: ChipProps) => (\n <Badge\n {...props}\n variant=\"pill\"\n color=\"blue-inverse\"\n suffix={\n <Button\n type=\"button\"\n variant=\"inline\"\n size=\"icon-2xs\"\n aria-label={removeAriaLabel}\n onClick={onRemove}\n >\n <X className=\"tw:size-3\" />\n </Button>\n }\n >\n {children}\n </Badge>\n);\n\ntype ActionProps = ComponentPropsWithoutRef<typeof Button>;\n\nconst AddFilter = ({ className, children, ...props }: ActionProps) => (\n <Button variant=\"invisible\" size=\"small\" className={cn('tw:gap-1.5', className)} {...props}>\n <Plus className=\"tw:size-4\" />\n {children ?? 'Add filter'}\n </Button>\n);\n\nconst Clear = ({ className, children, ...props }: ActionProps) => (\n <Button variant=\"invisible\" size=\"small\" className={cn('tw:ml-auto', className)} {...props}>\n {children ?? 'Clear all'}\n </Button>\n);\n\n/**\n * Two-row toolbar for index pages — search on the left, filter / sort / utility / view\n * controls on the right, an optional Active Filters row below for filter chips or tokens.\n *\n * **When to use:** every index page that supports search or filtering. Hosts inside\n * `PageLayout` as the search / filter row, between `PageLayout.Header` and `PageLayout.Content`.\n * **When NOT to use:** detail pages, form pages, or anywhere there is no search / filter\n * surface. For routing-based tab rows reach for `PageLayout.Tabs`.\n *\n * **Recommended composition (enforced at the call site):**\n *\n * - `Search` sits on the left; the right cluster auto-aligns via flex.\n * - Right cluster order: `Filters` → `Sort` → `Actions` → `View`. View controls are always\n * the final control group — do not render any control after `View`.\n * - `ActiveFilters` is the second row. Render it only when one or more filters are active.\n * - `Clear` self-aligns to the far right of `ActiveFilters`.\n *\n * The block is variant-agnostic: render filter chips (Standard variant, non-editable) or\n * tokens (Query Builder variant, editable) into `ActiveFilters` as plain children — do not\n * mix the two in one toolbar.\n *\n * @see https://github.com/evviku/design-system-docs/blob/main/docs/patterns/toolbar/toolbar.md\n */\nexport const PageToolbar = Object.assign(Root, {\n /** Left slot — typically a `SearchInput`. */\n Search,\n /** Right cluster — host the four control groups below in the recommended order. */\n Right,\n /** Filter controls (`Combobox`, `Select`, `DatePicker`). */\n Filters: ControlGroup,\n /** Sort control. */\n Sort: ControlGroup,\n /** Utility actions (Export, Refresh, …). */\n Actions: ControlGroup,\n /** View toggle (List / Grid). Always render last in the right cluster. */\n View: ControlGroup,\n /**\n * Active filters row. Render only when one or more filters are active. Pass filter chips\n * (Standard variant) or tokens (Query Builder variant) as children, optionally followed\n * by `AddFilter` / `Clear`.\n */\n ActiveFilters,\n /** Non-editable filter chip (Standard variant) — `Badge` pill with a dismiss button. */\n Chip,\n /**\n * Editable filter token (Query Builder variant) — `Badge` pill with a `chevron-down`\n * popover trigger for editing values and an `×` dismiss button. The popover content\n * is supplied by the caller via the `popover` slot (typically a `Combobox` or option list).\n */\n Token: PageToolbarToken,\n /** \"+ Add filter\" action — typically rendered after the chips/tokens in `ActiveFilters`. */\n AddFilter,\n /** \"Clear all\" action — self-aligns to the far right of `ActiveFilters`. */\n Clear,\n});\n"],"mappings":";;;;;;;;;;;;AAuBA,MAAa,oBAAoB,EAC/B,UACA,SACA,UACA,iBACA,GAAG,YAEH,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,OAAD;CACE,GAAI;CACJ,SAAA;CACA,SAAQ;CACR,OAAM;CACN,QACE,oBAAC,QAAD;EACE,MAAK;EACL,SAAQ;EACR,MAAK;EACL,cAAY;EACZ,SAAS;EAET,UAAA,oBAAC,GAAD,EAAG,WAAU,YAAa,CAAA;CACpB,CAAA;CAGV,UAAA,qBAAC,QAAQ,SAAT;EACE,MAAK;EACL,WAAU;EAFZ,UAAA,CAIG,UACD,oBAAC,aAAD,EAAa,WAAU,YAAa,CAAA,CACrB;;AACZ,CAAA,GACP,oBAAC,QAAQ,SAAT;CAAiB,OAAM;CAAS,UAAA;AAAyB,CAAA,CAClD,EAAA,CAAA;;;AC9CX,MAAM,QAAQ,EAAE,KAAK,WAAW,UAAU,GAAG,YAC3C,oBAAC,OAAD;CACO;CACL,WAAW,GAAG,2DAA2D,SAAS;CAClF,GAAI;CAEH;AACE,CAAA;AAGP,MAAM,UAAU,EAAE,KAAK,WAAW,UAAU,GAAG,YAC7C,oBAAC,OAAD;CACO;CACL,WAAW,GACT,oGAQA,wCACA,SACF;CACA,GAAI;CAEH;AACE,CAAA;AAGP,MAAM,SAAS,EAAE,KAAK,WAAW,UAAU,GAAG,YAC5C,oBAAC,OAAD;CACO;CACL,WAAW,GAAG,iDAAiD,SAAS;CACxE,GAAI;CAEH;AACE,CAAA;AAGP,MAAM,gBAAgB,EAAE,KAAK,WAAW,UAAU,GAAG,YACnD,oBAAC,OAAD;CAAU;CAAK,WAAW,GAAG,oCAAoC,SAAS;CAAG,GAAI;CAC9E;AACE,CAAA;AAGP,MAAM,iBAAiB,EAAE,KAAK,WAAW,UAAU,GAAG,YACpD,oBAAC,OAAD;CACO;CACL,WAAW,GAAG,+DAA+D,SAAS;CACtF,GAAI;CAEH;AACE,CAAA;AAYP,MAAM,QAAQ,EAAE,UAAU,UAAU,iBAAiB,GAAG,YACtD,oBAAC,OAAD;CACE,GAAI;CACJ,SAAQ;CACR,OAAM;CACN,QACE,oBAAC,QAAD;EACE,MAAK;EACL,SAAQ;EACR,MAAK;EACL,cAAY;EACZ,SAAS;EAET,UAAA,oBAAC,GAAD,EAAG,WAAU,YAAa,CAAA;CACpB,CAAA;CAGT;AACI,CAAA;AAKT,MAAM,aAAa,EAAE,WAAW,UAAU,GAAG,YAC3C,qBAAC,QAAD;CAAQ,SAAQ;CAAY,MAAK;CAAQ,WAAW,GAAG,cAAc,SAAS;CAAG,GAAI;CAArF,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,YAAa,CAAA,GAC5B,YAAY,YACP;;AAGV,MAAM,SAAS,EAAE,WAAW,UAAU,GAAG,YACvC,oBAAC,QAAD;CAAQ,SAAQ;CAAY,MAAK;CAAQ,WAAW,GAAG,cAAc,SAAS;CAAG,GAAI;CAClF,UAAA,YAAY;AACP,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AA0BV,MAAa,cAAc,OAAO,OAAO,MAAM;;CAE7C;;CAEA;;CAEA,SAAS;;CAET,MAAM;;CAEN,SAAS;;CAET,MAAM;;;;;;CAMN;;CAEA;;;;;;CAMA,OAAO;;CAEP;;CAEA;AACF,CAAC"}
|