@dbcdk/react-components 0.0.103 → 0.0.105
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/dist/assets/logo.cjs +87 -0
- package/dist/assets/logo.js +85 -0
- package/dist/client.cjs +587 -0
- package/dist/client.d.ts +83 -0
- package/dist/client.js +84 -0
- package/dist/components/accordion/Accordion.cjs +117 -0
- package/dist/components/accordion/Accordion.d.ts +5 -2
- package/dist/components/accordion/Accordion.js +111 -0
- package/dist/components/accordion/Accordion.module.css +41 -0
- package/dist/components/accordion/components/AccordionRow.cjs +120 -0
- package/dist/components/accordion/components/AccordionRow.js +114 -0
- package/dist/components/accordion/components/AccordionRow.module.css +133 -0
- package/dist/components/alert/Alert.cjs +52 -0
- package/dist/components/alert/Alert.d.ts +2 -1
- package/dist/components/alert/Alert.js +46 -0
- package/dist/components/alert/Alert.module.css +97 -0
- package/dist/components/app-header/AppHeader.cjs +14 -0
- package/dist/components/app-header/AppHeader.js +8 -0
- package/dist/components/app-header/AppHeader.module.css +74 -0
- package/dist/components/attribute-chip/AttributeChip.cjs +22 -0
- package/dist/components/attribute-chip/AttributeChip.js +16 -0
- package/dist/components/attribute-chip/AttributeChip.module.css +65 -0
- package/dist/components/avatar/Avatar.cjs +111 -0
- package/dist/components/avatar/Avatar.js +86 -0
- package/dist/components/avatar/Avatar.module.css +91 -0
- package/dist/components/breadcrumbs/Breadcrumbs.cjs +24 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +18 -0
- package/dist/components/breadcrumbs/Breadcrumbs.module.css +80 -0
- package/dist/components/button/Button.cjs +149 -0
- package/dist/components/button/Button.js +124 -0
- package/dist/components/button/Button.module.css +260 -0
- package/dist/components/button-select/ButtonSelect.cjs +35 -0
- package/dist/components/button-select/ButtonSelect.js +29 -0
- package/dist/components/button-select/ButtonSelect.module.css +40 -0
- package/dist/components/card/Card.cjs +112 -0
- package/dist/components/card/Card.d.ts +2 -1
- package/dist/components/card/Card.js +106 -0
- package/dist/components/card/Card.module.css +187 -0
- package/dist/components/card/components/CardMeta.cjs +62 -0
- package/dist/components/card/components/CardMeta.js +55 -0
- package/dist/components/card/components/CardMeta.module.css +55 -0
- package/dist/components/card-container/CardContainer.cjs +34 -0
- package/dist/components/card-container/CardContainer.js +28 -0
- package/dist/components/card-container/CardContainer.module.css +63 -0
- package/dist/components/chip/Chip.cjs +65 -0
- package/dist/components/chip/Chip.js +59 -0
- package/dist/components/chip/Chip.module.css +236 -0
- package/dist/components/circle/Circle.cjs +33 -0
- package/dist/components/circle/Circle.js +27 -0
- package/dist/components/circle/Circle.module.css +128 -0
- package/dist/components/clear-button/ClearButton.cjs +33 -0
- package/dist/components/clear-button/ClearButton.d.ts +2 -1
- package/dist/components/clear-button/ClearButton.js +27 -0
- package/dist/components/clear-button/ClearButton.module.css +26 -0
- package/dist/components/code-block/CodeBlock.cjs +97 -0
- package/dist/components/code-block/CodeBlock.js +91 -0
- package/dist/components/code-block/CodeBlock.module.css +124 -0
- package/dist/components/copy-button/CopyButton.cjs +139 -0
- package/dist/components/copy-button/CopyButton.js +133 -0
- package/dist/components/copy-button/CopyButton.module.css +22 -0
- package/dist/components/datetime-picker/DateTimePicker.cjs +559 -0
- package/dist/components/datetime-picker/DateTimePicker.js +553 -0
- package/dist/components/datetime-picker/DateTimePicker.module.css +155 -0
- package/dist/components/datetime-picker/dateTimeHelpers.cjs +179 -0
- package/dist/components/datetime-picker/dateTimeHelpers.js +160 -0
- package/dist/components/divider/Divider.cjs +22 -0
- package/dist/components/divider/Divider.js +20 -0
- package/dist/components/filter-field/FilterField.cjs +296 -0
- package/dist/components/filter-field/FilterField.js +289 -0
- package/dist/components/filter-field/FilterField.module.css +379 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.cjs +115 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +108 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +59 -0
- package/dist/components/forms/checkbox/Checkbox.cjs +88 -0
- package/dist/components/forms/checkbox/Checkbox.js +82 -0
- package/dist/components/forms/checkbox/Checkbox.module.css +104 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.cjs +121 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.js +115 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +115 -0
- package/dist/components/forms/form-select/FormSelect.cjs +191 -0
- package/dist/components/forms/form-select/FormSelect.js +166 -0
- package/dist/components/forms/form-select/FormSelect.module.css +236 -0
- package/dist/components/forms/input/Input.cjs +188 -0
- package/dist/components/forms/input/Input.d.ts +1 -0
- package/dist/components/forms/input/Input.js +182 -0
- package/dist/components/forms/input/Input.module.css +468 -0
- package/dist/components/forms/input-container/InputContainer.cjs +72 -0
- package/dist/components/forms/input-container/InputContainer.js +66 -0
- package/dist/components/forms/input-container/InputContainer.module.css +59 -0
- package/dist/components/forms/multi-select/MultiSelect.cjs +227 -0
- package/dist/components/forms/multi-select/MultiSelect.js +225 -0
- package/dist/components/forms/radio-buttons/RadioButton.cjs +91 -0
- package/dist/components/forms/radio-buttons/RadioButton.js +85 -0
- package/dist/components/forms/radio-buttons/RadioButtonGroup.cjs +74 -0
- package/dist/components/forms/radio-buttons/RadioButtonGroup.js +72 -0
- package/dist/components/forms/radio-buttons/RadioButtons.module.css +118 -0
- package/dist/components/forms/select/Select.cjs +286 -0
- package/dist/components/forms/select/Select.js +280 -0
- package/dist/components/forms/select/Select.module.css +32 -0
- package/dist/components/forms/text-area/Textarea.cjs +116 -0
- package/dist/components/forms/text-area/Textarea.js +110 -0
- package/dist/components/forms/text-area/Textarea.module.css +70 -0
- package/dist/components/forms/typeahead/Typeahead.cjs +792 -0
- package/dist/components/forms/typeahead/Typeahead.js +768 -0
- package/dist/components/forms/typeahead/Typeahead.module.css +38 -0
- package/dist/components/grid/Grid.cjs +45 -0
- package/dist/components/grid/Grid.js +38 -0
- package/dist/components/grid/Grid.module.css +35 -0
- package/dist/components/headline/CollapsibleHeadline.cjs +89 -0
- package/dist/components/headline/CollapsibleHeadline.d.ts +4 -4
- package/dist/components/headline/CollapsibleHeadline.js +83 -0
- package/dist/components/headline/Headline.cjs +59 -0
- package/dist/components/headline/Headline.js +53 -0
- package/dist/components/headline/Headline.module.css +185 -0
- package/dist/components/hyperlink/Hyperlink.cjs +107 -0
- package/dist/components/hyperlink/Hyperlink.js +82 -0
- package/dist/components/hyperlink/Hyperlink.module.css +121 -0
- package/dist/components/icon/Icon.cjs +27 -0
- package/dist/components/icon/Icon.js +20 -0
- package/dist/components/icon/Icon.module.css +36 -0
- package/dist/components/inline-status/InlineStatus.cjs +39 -0
- package/dist/components/inline-status/InlineStatus.js +33 -0
- package/dist/components/inline-status/InlineStatus.module.css +92 -0
- package/dist/components/interval-select/IntervalSelect.cjs +203 -0
- package/dist/components/interval-select/IntervalSelect.js +201 -0
- package/dist/components/json-viewer/HighlightedText.cjs +13 -0
- package/dist/components/json-viewer/HighlightedText.js +11 -0
- package/dist/components/json-viewer/JsonNode.cjs +124 -0
- package/dist/components/json-viewer/JsonNode.js +118 -0
- package/dist/components/json-viewer/JsonViewer.cjs +164 -0
- package/dist/components/json-viewer/JsonViewer.js +158 -0
- package/dist/components/json-viewer/JsonViewer.module.css +346 -0
- package/dist/components/json-viewer/types.cjs +2 -0
- package/dist/components/json-viewer/types.js +1 -0
- package/dist/components/json-viewer/useClipboardStatus.cjs +15 -0
- package/dist/components/json-viewer/useClipboardStatus.js +13 -0
- package/dist/components/json-viewer/utils.cjs +126 -0
- package/dist/components/json-viewer/utils.js +111 -0
- package/dist/components/media-card/MediaCard.cjs +60 -0
- package/dist/components/media-card/MediaCard.d.ts +19 -0
- package/dist/components/media-card/MediaCard.js +54 -0
- package/dist/components/media-card/MediaCard.module.css +92 -0
- package/dist/components/menu/Menu.cjs +287 -0
- package/dist/components/menu/Menu.js +262 -0
- package/dist/components/menu/Menu.module.css +220 -0
- package/dist/components/meta-bar/MetaBar.cjs +28 -0
- package/dist/components/meta-bar/MetaBar.js +22 -0
- package/dist/components/meta-bar/MetaBar.module.css +27 -0
- package/dist/components/nav-bar/NavBar.cjs +104 -0
- package/dist/components/nav-bar/NavBar.d.ts +4 -3
- package/dist/components/nav-bar/NavBar.js +98 -0
- package/dist/components/nav-bar/NavBar.module.css +225 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.cjs +30 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.js +24 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +54 -0
- package/dist/components/overlay/modal/Modal.cjs +189 -0
- package/dist/components/overlay/modal/Modal.d.ts +2 -1
- package/dist/components/overlay/modal/Modal.js +183 -0
- package/dist/components/overlay/modal/Modal.module.css +112 -0
- package/dist/components/overlay/modal/provider/ModalProvider.cjs +98 -0
- package/dist/components/overlay/modal/provider/ModalProvider.js +95 -0
- package/dist/components/overlay/side-panel/SidePanel.cjs +173 -0
- package/dist/components/overlay/side-panel/SidePanel.js +167 -0
- package/dist/components/overlay/side-panel/SidePanel.module.css +177 -0
- package/dist/components/overlay/side-panel/useSidePanel.cjs +16 -0
- package/dist/components/overlay/side-panel/useSidePanel.js +14 -0
- package/dist/components/overlay/tooltip/Tooltip.cjs +34 -0
- package/dist/components/overlay/tooltip/Tooltip.js +32 -0
- package/dist/components/overlay/tooltip/Tooltip.module.css +104 -0
- package/dist/components/overlay/tooltip/TooltipProvider.cjs +238 -0
- package/dist/components/overlay/tooltip/TooltipProvider.js +231 -0
- package/dist/components/overlay/tooltip/useTooltipTrigger.cjs +117 -0
- package/dist/components/overlay/tooltip/useTooltipTrigger.js +115 -0
- package/dist/components/page/Page.cjs +63 -0
- package/dist/components/page/Page.js +57 -0
- package/dist/components/page/Page.module.css +95 -0
- package/dist/components/page-layout/PageLayout.cjs +97 -0
- package/dist/components/page-layout/PageLayout.d.ts +0 -5
- package/dist/components/page-layout/PageLayout.js +91 -0
- package/dist/components/page-layout/PageLayout.module.css +236 -0
- package/dist/components/page-layout/components/footer/Footer.cjs +53 -0
- package/dist/components/page-layout/components/footer/Footer.js +47 -0
- package/dist/components/page-layout/components/footer/Footer.module.css +89 -0
- package/dist/components/pagination/Pagination.cjs +160 -0
- package/dist/components/pagination/Pagination.js +154 -0
- package/dist/components/pagination/Pagination.module.css +25 -0
- package/dist/components/panel/Panel.cjs +38 -0
- package/dist/components/panel/Panel.js +32 -0
- package/dist/components/panel/Panel.module.css +30 -0
- package/dist/components/popover/Popover.cjs +331 -0
- package/dist/components/popover/Popover.js +307 -0
- package/dist/components/popover/Popover.module.css +52 -0
- package/dist/components/search-box/SearchBox.cjs +274 -0
- package/dist/components/search-box/SearchBox.js +268 -0
- package/dist/components/search-box/SearchBox.module.css +27 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.cjs +127 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +121 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +174 -0
- package/dist/components/sidebar/Sidebar.cjs +39 -0
- package/dist/components/sidebar/Sidebar.js +37 -0
- package/dist/components/sidebar/components/SidebarItem.cjs +29 -0
- package/dist/components/sidebar/components/SidebarItem.js +27 -0
- package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.cjs +133 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +127 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +29 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.cjs +214 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +207 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +260 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.cjs +54 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +47 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +106 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.cjs +61 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +55 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +20 -0
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.cjs +97 -0
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +91 -0
- package/dist/components/sidebar/providers/SidebarProvider.cjs +223 -0
- package/dist/components/sidebar/providers/SidebarProvider.js +220 -0
- package/dist/components/skeleton-loader/SkeletonLoader.cjs +442 -0
- package/dist/components/skeleton-loader/SkeletonLoader.js +440 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.cjs +42 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +36 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +51 -0
- package/dist/components/split-button/SplitButton.cjs +46 -0
- package/dist/components/split-button/SplitButton.js +40 -0
- package/dist/components/split-button/SplitButton.module.css +32 -0
- package/dist/components/split-pane/SplitPane.cjs +188 -0
- package/dist/components/split-pane/SplitPane.d.ts +2 -1
- package/dist/components/split-pane/SplitPane.js +179 -0
- package/dist/components/split-pane/SplitPane.module.css +118 -0
- package/dist/components/split-pane/provider/SplitPaneContext.cjs +129 -0
- package/dist/components/split-pane/provider/SplitPaneContext.js +121 -0
- package/dist/components/stack/Stack.cjs +47 -0
- package/dist/components/stack/Stack.d.ts +1 -1
- package/dist/components/stack/Stack.js +41 -0
- package/dist/components/stack/Stack.module.css +61 -0
- package/dist/components/state-page/StatePage.cjs +48 -0
- package/dist/components/state-page/StatePage.js +42 -0
- package/dist/components/state-page/StatePage.module.css +9 -0
- package/dist/components/state-page/empty.cjs +664 -0
- package/dist/components/state-page/empty.js +662 -0
- package/dist/components/state-page/error.cjs +310 -0
- package/dist/components/state-page/error.js +308 -0
- package/dist/components/state-page/notFound.cjs +243 -0
- package/dist/components/state-page/notFound.js +241 -0
- package/dist/components/sticky-footer-layout/StickyFooterLayout.cjs +98 -0
- package/dist/components/sticky-footer-layout/StickyFooterLayout.js +96 -0
- package/dist/components/table/Table.cjs +216 -0
- package/dist/components/table/Table.js +210 -0
- package/dist/components/table/Table.module.css +534 -0
- package/dist/components/table/Table.types.cjs +2 -0
- package/dist/components/table/Table.types.js +1 -0
- package/dist/components/table/TanstackTable.cjs +172 -0
- package/dist/components/table/TanstackTable.js +147 -0
- package/dist/components/table/components/TableBody.cjs +50 -0
- package/dist/components/table/components/TableBody.js +44 -0
- package/dist/components/table/components/TableHeader.cjs +56 -0
- package/dist/components/table/components/TableHeader.js +50 -0
- package/dist/components/table/components/TableHeaderCell.cjs +69 -0
- package/dist/components/table/components/TableHeaderCell.js +63 -0
- package/dist/components/table/components/TableLoadingBody.cjs +35 -0
- package/dist/components/table/components/TableLoadingBody.js +29 -0
- package/dist/components/table/components/TablePagination.cjs +2 -0
- package/dist/components/table/components/TablePagination.js +1 -0
- package/dist/components/table/components/TableRow.cjs +151 -0
- package/dist/components/table/components/TableRow.js +145 -0
- package/dist/components/table/components/TableSelectionCell.cjs +41 -0
- package/dist/components/table/components/TableSelectionCell.js +35 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.cjs +25 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.js +19 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.module.css +22 -0
- package/dist/components/table/components/empty-state/EmptyState.cjs +33 -0
- package/dist/components/table/components/empty-state/EmptyState.js +31 -0
- package/dist/components/table/components/empty-state/EmptyState.module.css +4 -0
- package/dist/components/table/components/table-settings/TableSettings.cjs +139 -0
- package/dist/components/table/components/table-settings/TableSettings.js +137 -0
- package/dist/components/table/hooks/useTableRowInteractions.cjs +46 -0
- package/dist/components/table/hooks/useTableRowInteractions.js +44 -0
- package/dist/components/table/table.classes.cjs +49 -0
- package/dist/components/table/table.classes.js +40 -0
- package/dist/components/table/table.utils.cjs +57 -0
- package/dist/components/table/table.utils.js +45 -0
- package/dist/components/table/tanstackTable.utils.cjs +166 -0
- package/dist/components/table/tanstackTable.utils.js +159 -0
- package/dist/components/tabs/Tabs.cjs +172 -0
- package/dist/components/tabs/Tabs.js +166 -0
- package/dist/components/tabs/Tabs.module.css +261 -0
- package/dist/components/theme-button/ThemeButton.cjs +78 -0
- package/dist/components/theme-button/ThemeButton.js +75 -0
- package/dist/components/toast/Toast.cjs +68 -0
- package/dist/components/toast/Toast.js +62 -0
- package/dist/components/toast/Toast.module.css +161 -0
- package/dist/components/toast/provider/ToastProvider.cjs +105 -0
- package/dist/components/toast/provider/ToastProvider.js +97 -0
- package/dist/components/user-display/UserDisplay.cjs +22 -0
- package/dist/components/user-display/UserDisplay.js +16 -0
- package/dist/components/user-display/UserDisplay.module.css +25 -0
- package/dist/constants/chart-colors.cjs +10 -0
- package/dist/constants/chart-colors.js +8 -0
- package/dist/constants/chart-colors.types.cjs +2 -0
- package/dist/constants/chart-colors.types.js +1 -0
- package/dist/constants/severity.cjs +30 -0
- package/dist/constants/severity.js +26 -0
- package/dist/constants/severity.types.cjs +2 -0
- package/dist/constants/severity.types.js +1 -0
- package/dist/constants/sizes.cjs +11 -0
- package/dist/constants/sizes.js +9 -0
- package/dist/hooks/useDeviceSize.cjs +35 -0
- package/dist/hooks/useDeviceSize.js +33 -0
- package/dist/hooks/useListNavigation.cjs +237 -0
- package/dist/hooks/useListNavigation.js +235 -0
- package/dist/hooks/usePagination.cjs +144 -0
- package/dist/hooks/usePagination.js +142 -0
- package/dist/hooks/useSorting.cjs +119 -0
- package/dist/hooks/useSorting.js +117 -0
- package/dist/hooks/useTableData.cjs +53 -0
- package/dist/hooks/useTableData.js +51 -0
- package/dist/hooks/useTableSelection.cjs +172 -0
- package/dist/hooks/useTableSelection.js +170 -0
- package/dist/hooks/useTableSettings.cjs +90 -0
- package/dist/hooks/useTableSettings.js +87 -0
- package/dist/hooks/useTheme.cjs +64 -0
- package/dist/hooks/useTheme.js +62 -0
- package/dist/hooks/useTimeDuration.cjs +72 -0
- package/dist/hooks/useTimeDuration.js +70 -0
- package/dist/hooks/useViewportFill.cjs +82 -0
- package/dist/hooks/useViewportFill.js +80 -0
- package/dist/index.cjs +161 -12908
- package/dist/index.css +67 -7357
- package/dist/index.d.ts +0 -58
- package/dist/index.js +24 -12809
- package/dist/styles/animation.cjs +9 -0
- package/dist/styles/animation.js +7 -0
- package/dist/styles/themes/dbc/colors.css +5 -0
- package/dist/styles/themes/types.cjs +2 -0
- package/dist/styles/themes/types.js +1 -0
- package/dist/tanstack.cjs +18 -2717
- package/dist/tanstack.js +3 -2701
- package/dist/types/a11y-props.types.cjs +2 -0
- package/dist/types/a11y-props.types.js +1 -0
- package/dist/types/assets.d.cjs +2 -0
- package/dist/types/assets.d.js +1 -0
- package/dist/types/css.d.cjs +2 -0
- package/dist/types/css.d.js +1 -0
- package/dist/types/sizes.types.cjs +2 -0
- package/dist/types/sizes.types.js +1 -0
- package/dist/utils/arrays/nested-filtering.cjs +40 -0
- package/dist/utils/arrays/nested-filtering.js +38 -0
- package/dist/utils/date/formatDate.cjs +35 -0
- package/dist/utils/date/formatDate.js +33 -0
- package/dist/utils/localStorage.utils.cjs +53 -0
- package/dist/utils/localStorage.utils.js +49 -0
- package/dist/utils/text/get-highlighted-segments.cjs +49 -0
- package/dist/utils/text/get-highlighted-segments.js +47 -0
- package/package.json +8 -3
- package/dist/tanstack.css +0 -1385
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var styles = require('./Page.module.css');
|
|
5
|
+
var Breadcrumbs = require('../breadcrumbs/Breadcrumbs');
|
|
6
|
+
var Headline = require('../headline/Headline');
|
|
7
|
+
var SkeletonLoader = require('../skeleton-loader/SkeletonLoader');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
12
|
+
|
|
13
|
+
function Page({
|
|
14
|
+
header,
|
|
15
|
+
subheader,
|
|
16
|
+
severity,
|
|
17
|
+
headerIcon,
|
|
18
|
+
headerAddition,
|
|
19
|
+
breadcrumbs,
|
|
20
|
+
disableContentBox,
|
|
21
|
+
contentBox = false,
|
|
22
|
+
disableTopPadding = true,
|
|
23
|
+
maxWidth,
|
|
24
|
+
containScrolling = false,
|
|
25
|
+
children,
|
|
26
|
+
loading = false
|
|
27
|
+
}) {
|
|
28
|
+
const showContentBox = contentBox && !disableContentBox;
|
|
29
|
+
const maxWidthClass = maxWidth ? styles__default.default[`maxWidth${maxWidth.charAt(0).toUpperCase()}${maxWidth.slice(1)}`] : "";
|
|
30
|
+
const hasHeadline = Boolean(header || subheader || headerAddition);
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: `${styles__default.default.container} ${containScrolling ? styles__default.default.containScrolling : styles__default.default.documentScrolling} ${disableTopPadding ? styles__default.default.disableTopPadding : ""} ${maxWidthClass}`,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.headerContainer, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.headerMain, children: [
|
|
37
|
+
breadcrumbs ? /* @__PURE__ */ jsxRuntime.jsx(Breadcrumbs.Breadcrumbs, { items: breadcrumbs }) : null,
|
|
38
|
+
hasHeadline ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
39
|
+
Headline.Headline,
|
|
40
|
+
{
|
|
41
|
+
disableMargin: true,
|
|
42
|
+
size: 1,
|
|
43
|
+
severity,
|
|
44
|
+
icon: headerIcon,
|
|
45
|
+
subheader,
|
|
46
|
+
addition: headerAddition,
|
|
47
|
+
children: header
|
|
48
|
+
}
|
|
49
|
+
) : null
|
|
50
|
+
] }) }),
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: `${styles__default.default.content} ${loading ? styles__default.default.contentLoading : ""} ${showContentBox ? styles__default.default.contentBox : ""}`,
|
|
55
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(SkeletonLoader.SkeletonLoader, { type: "squares", rows: 1, columns: 1 }) : children
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
exports.Page = Page;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import styles from './Page.module.css';
|
|
3
|
+
import { Breadcrumbs } from '../breadcrumbs/Breadcrumbs';
|
|
4
|
+
import { Headline } from '../headline/Headline';
|
|
5
|
+
import { SkeletonLoader } from '../skeleton-loader/SkeletonLoader';
|
|
6
|
+
|
|
7
|
+
function Page({
|
|
8
|
+
header,
|
|
9
|
+
subheader,
|
|
10
|
+
severity,
|
|
11
|
+
headerIcon,
|
|
12
|
+
headerAddition,
|
|
13
|
+
breadcrumbs,
|
|
14
|
+
disableContentBox,
|
|
15
|
+
contentBox = false,
|
|
16
|
+
disableTopPadding = true,
|
|
17
|
+
maxWidth,
|
|
18
|
+
containScrolling = false,
|
|
19
|
+
children,
|
|
20
|
+
loading = false
|
|
21
|
+
}) {
|
|
22
|
+
const showContentBox = contentBox && !disableContentBox;
|
|
23
|
+
const maxWidthClass = maxWidth ? styles[`maxWidth${maxWidth.charAt(0).toUpperCase()}${maxWidth.slice(1)}`] : "";
|
|
24
|
+
const hasHeadline = Boolean(header || subheader || headerAddition);
|
|
25
|
+
return /* @__PURE__ */ jsxs(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: `${styles.container} ${containScrolling ? styles.containScrolling : styles.documentScrolling} ${disableTopPadding ? styles.disableTopPadding : ""} ${maxWidthClass}`,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx("div", { className: styles.headerContainer, children: /* @__PURE__ */ jsxs("div", { className: styles.headerMain, children: [
|
|
31
|
+
breadcrumbs ? /* @__PURE__ */ jsx(Breadcrumbs, { items: breadcrumbs }) : null,
|
|
32
|
+
hasHeadline ? /* @__PURE__ */ jsx(
|
|
33
|
+
Headline,
|
|
34
|
+
{
|
|
35
|
+
disableMargin: true,
|
|
36
|
+
size: 1,
|
|
37
|
+
severity,
|
|
38
|
+
icon: headerIcon,
|
|
39
|
+
subheader,
|
|
40
|
+
addition: headerAddition,
|
|
41
|
+
children: header
|
|
42
|
+
}
|
|
43
|
+
) : null
|
|
44
|
+
] }) }),
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: `${styles.content} ${loading ? styles.contentLoading : ""} ${showContentBox ? styles.contentBox : ""}`,
|
|
49
|
+
children: loading ? /* @__PURE__ */ jsx(SkeletonLoader, { type: "squares", rows: 1, columns: 1 }) : children
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { Page };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
min-height: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.maxWidthSm,
|
|
11
|
+
.maxWidthMd,
|
|
12
|
+
.maxWidthLg {
|
|
13
|
+
margin-inline: auto;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.maxWidthSm {
|
|
18
|
+
max-width: 560px;
|
|
19
|
+
}
|
|
20
|
+
.maxWidthMd {
|
|
21
|
+
max-width: 768px;
|
|
22
|
+
}
|
|
23
|
+
.maxWidthLg {
|
|
24
|
+
max-width: 1024px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.containScrolling {
|
|
28
|
+
height: 100%;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.documentScrolling {
|
|
33
|
+
height: auto;
|
|
34
|
+
overflow: visible;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.headerContainer {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
padding: var(--spacing-lg) 0;
|
|
41
|
+
padding-block-end: var(--spacing-md);
|
|
42
|
+
gap: var(--spacing-md);
|
|
43
|
+
min-width: 0;
|
|
44
|
+
flex: 0 0 auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.disableTopPadding {
|
|
48
|
+
padding-block-start: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.disableTopPadding .headerContainer {
|
|
52
|
+
padding-block-start: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.headerMain {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: var(--spacing-md);
|
|
59
|
+
flex: 1 1 auto;
|
|
60
|
+
min-width: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.content {
|
|
64
|
+
min-height: 0;
|
|
65
|
+
min-width: 0;
|
|
66
|
+
overflow: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.contentLoading {
|
|
70
|
+
flex: 1 1 auto;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.documentScrolling .content {
|
|
74
|
+
overflow: visible;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.contentBox {
|
|
78
|
+
padding: var(--spacing-lg);
|
|
79
|
+
border: 1px solid var(--color-border-subtle);
|
|
80
|
+
border-radius: var(--border-radius-md);
|
|
81
|
+
box-shadow: var(--shadow-md);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (max-width: 767px) {
|
|
85
|
+
.headerContainer {
|
|
86
|
+
padding-block: var(--spacing-md);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.contentBox {
|
|
90
|
+
padding-block: var(--spacing-md);
|
|
91
|
+
padding-inline: 0;
|
|
92
|
+
border: 0;
|
|
93
|
+
border-radius: 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var styles = require('./PageLayout.module.css');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
10
|
+
|
|
11
|
+
function getMaxWidthClass(value, styles2) {
|
|
12
|
+
if (!value) return "";
|
|
13
|
+
if (value === "sm") return styles2.maxWidthSm;
|
|
14
|
+
return styles2.maxWidthMd;
|
|
15
|
+
}
|
|
16
|
+
function getSlotName(el) {
|
|
17
|
+
var _a;
|
|
18
|
+
const t = el.type;
|
|
19
|
+
return (_a = t == null ? void 0 : t.__PAGE_LAYOUT_SLOT__) != null ? _a : null;
|
|
20
|
+
}
|
|
21
|
+
function splitSlots(children) {
|
|
22
|
+
const slots = {};
|
|
23
|
+
const rest = [];
|
|
24
|
+
react.Children.forEach(children, (child) => {
|
|
25
|
+
if (!react.isValidElement(child)) {
|
|
26
|
+
if (child != null) rest.push(child);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const slot = getSlotName(child);
|
|
30
|
+
if (!slot) {
|
|
31
|
+
rest.push(child);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
slots[slot] = child;
|
|
35
|
+
});
|
|
36
|
+
return { slots, rest };
|
|
37
|
+
}
|
|
38
|
+
const PageLayoutSidebar = ({
|
|
39
|
+
children
|
|
40
|
+
}) => {
|
|
41
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
42
|
+
};
|
|
43
|
+
PageLayoutSidebar.__PAGE_LAYOUT_SLOT__ = "Sidebar";
|
|
44
|
+
const PageLayoutHeader = ({
|
|
45
|
+
maxWidth = false,
|
|
46
|
+
children
|
|
47
|
+
}) => {
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.headerContainer, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles__default.default.headerContent} ${getMaxWidthClass(maxWidth, styles__default.default)}`, children }) });
|
|
49
|
+
};
|
|
50
|
+
PageLayoutHeader.__PAGE_LAYOUT_SLOT__ = "Header";
|
|
51
|
+
const PageLayoutContent = ({
|
|
52
|
+
maxWidth = false,
|
|
53
|
+
children
|
|
54
|
+
}) => {
|
|
55
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles__default.default.contentInner} ${getMaxWidthClass(maxWidth, styles__default.default)}`, children });
|
|
56
|
+
};
|
|
57
|
+
PageLayoutContent.__PAGE_LAYOUT_SLOT__ = "Content";
|
|
58
|
+
const PageLayoutFooter = ({
|
|
59
|
+
maxWidth = false,
|
|
60
|
+
children
|
|
61
|
+
}) => {
|
|
62
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles__default.default.footerContent} ${getMaxWidthClass(maxWidth, styles__default.default)}`, children });
|
|
63
|
+
};
|
|
64
|
+
PageLayoutFooter.__PAGE_LAYOUT_SLOT__ = "Footer";
|
|
65
|
+
const PageLayoutBase = ({
|
|
66
|
+
children,
|
|
67
|
+
containScrolling = false,
|
|
68
|
+
orientation = "vertical"
|
|
69
|
+
}) => {
|
|
70
|
+
var _a;
|
|
71
|
+
const { slots, rest } = splitSlots(children);
|
|
72
|
+
const content = (_a = slots.Content) != null ? _a : rest.length ? /* @__PURE__ */ jsxRuntime.jsx(PageLayoutContent, { maxWidth: "md", children: rest }) : void 0;
|
|
73
|
+
const rootClass = [
|
|
74
|
+
styles__default.default.root,
|
|
75
|
+
orientation === "vertical" ? styles__default.default.vertical : styles__default.default.horizontal,
|
|
76
|
+
containScrolling ? styles__default.default.containScrolling : styles__default.default.documentScrolling
|
|
77
|
+
].filter(Boolean).join(" ");
|
|
78
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rootClass, children: [
|
|
79
|
+
slots.Sidebar ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.sidebar, children: slots.Sidebar }) : null,
|
|
80
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.mainColumn, children: [
|
|
81
|
+
slots.Header ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.header, children: slots.Header }) : null,
|
|
82
|
+
slots.Hero ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.hero, children: slots.Hero }) : null,
|
|
83
|
+
content || slots.Footer ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.mainScroll, children: [
|
|
84
|
+
content ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.content, children: content }) : null,
|
|
85
|
+
slots.Footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.footer, children: slots.Footer }) : null
|
|
86
|
+
] }) : null
|
|
87
|
+
] })
|
|
88
|
+
] });
|
|
89
|
+
};
|
|
90
|
+
const PageLayout = Object.assign(PageLayoutBase, {
|
|
91
|
+
Sidebar: PageLayoutSidebar,
|
|
92
|
+
Header: PageLayoutHeader,
|
|
93
|
+
Content: PageLayoutContent,
|
|
94
|
+
Footer: PageLayoutFooter
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
exports.PageLayout = PageLayout;
|
|
@@ -24,11 +24,6 @@ export interface PageLayoutFooterProps {
|
|
|
24
24
|
}
|
|
25
25
|
export interface PageLayoutSidebarProps {
|
|
26
26
|
children: ReactNode;
|
|
27
|
-
/**
|
|
28
|
-
* Optional: if your sidebar contains navigation, you might wrap your nav in <nav>.
|
|
29
|
-
* This component will render an <aside>.
|
|
30
|
-
*/
|
|
31
|
-
ariaLabel?: string;
|
|
32
27
|
}
|
|
33
28
|
export declare const PageLayout: FC<PageLayoutProps> & {
|
|
34
29
|
Sidebar: FC<PageLayoutSidebarProps>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Children, isValidElement } from 'react';
|
|
3
|
+
import styles from './PageLayout.module.css';
|
|
4
|
+
|
|
5
|
+
function getMaxWidthClass(value, styles2) {
|
|
6
|
+
if (!value) return "";
|
|
7
|
+
if (value === "sm") return styles2.maxWidthSm;
|
|
8
|
+
return styles2.maxWidthMd;
|
|
9
|
+
}
|
|
10
|
+
function getSlotName(el) {
|
|
11
|
+
var _a;
|
|
12
|
+
const t = el.type;
|
|
13
|
+
return (_a = t == null ? void 0 : t.__PAGE_LAYOUT_SLOT__) != null ? _a : null;
|
|
14
|
+
}
|
|
15
|
+
function splitSlots(children) {
|
|
16
|
+
const slots = {};
|
|
17
|
+
const rest = [];
|
|
18
|
+
Children.forEach(children, (child) => {
|
|
19
|
+
if (!isValidElement(child)) {
|
|
20
|
+
if (child != null) rest.push(child);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const slot = getSlotName(child);
|
|
24
|
+
if (!slot) {
|
|
25
|
+
rest.push(child);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
slots[slot] = child;
|
|
29
|
+
});
|
|
30
|
+
return { slots, rest };
|
|
31
|
+
}
|
|
32
|
+
const PageLayoutSidebar = ({
|
|
33
|
+
children
|
|
34
|
+
}) => {
|
|
35
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
36
|
+
};
|
|
37
|
+
PageLayoutSidebar.__PAGE_LAYOUT_SLOT__ = "Sidebar";
|
|
38
|
+
const PageLayoutHeader = ({
|
|
39
|
+
maxWidth = false,
|
|
40
|
+
children
|
|
41
|
+
}) => {
|
|
42
|
+
return /* @__PURE__ */ jsx("div", { className: styles.headerContainer, children: /* @__PURE__ */ jsx("div", { className: `${styles.headerContent} ${getMaxWidthClass(maxWidth, styles)}`, children }) });
|
|
43
|
+
};
|
|
44
|
+
PageLayoutHeader.__PAGE_LAYOUT_SLOT__ = "Header";
|
|
45
|
+
const PageLayoutContent = ({
|
|
46
|
+
maxWidth = false,
|
|
47
|
+
children
|
|
48
|
+
}) => {
|
|
49
|
+
return /* @__PURE__ */ jsx("div", { className: `${styles.contentInner} ${getMaxWidthClass(maxWidth, styles)}`, children });
|
|
50
|
+
};
|
|
51
|
+
PageLayoutContent.__PAGE_LAYOUT_SLOT__ = "Content";
|
|
52
|
+
const PageLayoutFooter = ({
|
|
53
|
+
maxWidth = false,
|
|
54
|
+
children
|
|
55
|
+
}) => {
|
|
56
|
+
return /* @__PURE__ */ jsx("div", { className: `${styles.footerContent} ${getMaxWidthClass(maxWidth, styles)}`, children });
|
|
57
|
+
};
|
|
58
|
+
PageLayoutFooter.__PAGE_LAYOUT_SLOT__ = "Footer";
|
|
59
|
+
const PageLayoutBase = ({
|
|
60
|
+
children,
|
|
61
|
+
containScrolling = false,
|
|
62
|
+
orientation = "vertical"
|
|
63
|
+
}) => {
|
|
64
|
+
var _a;
|
|
65
|
+
const { slots, rest } = splitSlots(children);
|
|
66
|
+
const content = (_a = slots.Content) != null ? _a : rest.length ? /* @__PURE__ */ jsx(PageLayoutContent, { maxWidth: "md", children: rest }) : void 0;
|
|
67
|
+
const rootClass = [
|
|
68
|
+
styles.root,
|
|
69
|
+
orientation === "vertical" ? styles.vertical : styles.horizontal,
|
|
70
|
+
containScrolling ? styles.containScrolling : styles.documentScrolling
|
|
71
|
+
].filter(Boolean).join(" ");
|
|
72
|
+
return /* @__PURE__ */ jsxs("div", { className: rootClass, children: [
|
|
73
|
+
slots.Sidebar ? /* @__PURE__ */ jsx("div", { className: styles.sidebar, children: slots.Sidebar }) : null,
|
|
74
|
+
/* @__PURE__ */ jsxs("div", { className: styles.mainColumn, children: [
|
|
75
|
+
slots.Header ? /* @__PURE__ */ jsx("div", { className: styles.header, children: slots.Header }) : null,
|
|
76
|
+
slots.Hero ? /* @__PURE__ */ jsx("div", { className: styles.hero, children: slots.Hero }) : null,
|
|
77
|
+
content || slots.Footer ? /* @__PURE__ */ jsxs("div", { className: styles.mainScroll, children: [
|
|
78
|
+
content ? /* @__PURE__ */ jsx("div", { className: styles.content, children: content }) : null,
|
|
79
|
+
slots.Footer ? /* @__PURE__ */ jsx("div", { className: styles.footer, children: slots.Footer }) : null
|
|
80
|
+
] }) : null
|
|
81
|
+
] })
|
|
82
|
+
] });
|
|
83
|
+
};
|
|
84
|
+
const PageLayout = Object.assign(PageLayoutBase, {
|
|
85
|
+
Sidebar: PageLayoutSidebar,
|
|
86
|
+
Header: PageLayoutHeader,
|
|
87
|
+
Content: PageLayoutContent,
|
|
88
|
+
Footer: PageLayoutFooter
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export { PageLayout };
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/* Root shell */
|
|
2
|
+
.root {
|
|
3
|
+
width: 100%;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
display: grid;
|
|
6
|
+
gap: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Viewport handling:
|
|
10
|
+
- containScrolling => app-shell: lock to viewport and manage scroll in regions
|
|
11
|
+
- documentScrolling => let page scroll normally
|
|
12
|
+
*/
|
|
13
|
+
.containScrolling {
|
|
14
|
+
height: 100vh;
|
|
15
|
+
height: 100dvh;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.documentScrolling {
|
|
20
|
+
min-height: 100vh;
|
|
21
|
+
min-height: 100dvh;
|
|
22
|
+
overflow: visible;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Orientation layouts */
|
|
26
|
+
.vertical {
|
|
27
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.horizontal {
|
|
31
|
+
grid-template-columns: minmax(0, 1fr);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Sidebar */
|
|
35
|
+
.sidebar {
|
|
36
|
+
min-width: 0;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
background: var(--color-bg-surface);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.containScrolling .sidebar {
|
|
42
|
+
overflow: auto;
|
|
43
|
+
-webkit-overflow-scrolling: touch;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* In document-scrolling vertical layouts, keep the sidebar pinned to the viewport
|
|
47
|
+
and let it manage its own scroll independently of body scrolling. */
|
|
48
|
+
.documentScrolling.vertical .sidebar {
|
|
49
|
+
position: sticky;
|
|
50
|
+
top: 0;
|
|
51
|
+
align-self: start;
|
|
52
|
+
block-size: 100vh;
|
|
53
|
+
block-size: 100dvh;
|
|
54
|
+
overflow: auto;
|
|
55
|
+
-webkit-overflow-scrolling: touch;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* In horizontal orientation, sidebar becomes a top block if used */
|
|
59
|
+
.horizontal .sidebar {
|
|
60
|
+
grid-column: 1 / -1;
|
|
61
|
+
border-right: none;
|
|
62
|
+
border-bottom: var(--border-width-thin) solid var(--color-border-subtle);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Main column:
|
|
66
|
+
Use flex so the "rest of space" logic works reliably.
|
|
67
|
+
*/
|
|
68
|
+
.mainColumn {
|
|
69
|
+
min-width: 0;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
background: var(--color-bg-surface);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* In containScrolling mode, mainColumn must fill the viewport height
|
|
76
|
+
so the flex "remaining space" can be computed.
|
|
77
|
+
*/
|
|
78
|
+
.containScrolling .mainColumn {
|
|
79
|
+
height: 100%;
|
|
80
|
+
min-height: 0; /* important: allows children to shrink */
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Regions */
|
|
84
|
+
.header {
|
|
85
|
+
min-width: 0;
|
|
86
|
+
background: var(--color-bg-surface);
|
|
87
|
+
border-bottom: var(--border-width-thin) solid var(--color-border-default);
|
|
88
|
+
flex: 0 0 auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Sticky header only when the document is scrolling (body scroll) */
|
|
92
|
+
.documentScrolling .header {
|
|
93
|
+
position: sticky;
|
|
94
|
+
top: 0;
|
|
95
|
+
z-index: var(--z-sticky);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.hero {
|
|
99
|
+
min-width: 0;
|
|
100
|
+
background: var(--color-bg-surface);
|
|
101
|
+
border-bottom: var(--border-width-thin) solid var(--color-border-subtle);
|
|
102
|
+
flex: 0 0 auto;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Scroll wrapper: contains content + footer */
|
|
106
|
+
.mainScroll {
|
|
107
|
+
min-width: 0;
|
|
108
|
+
min-height: 0; /* CRITICAL for nested flex/scroll */
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
|
|
112
|
+
/* This is the "take all remaining space" bit */
|
|
113
|
+
flex: 1 1 auto;
|
|
114
|
+
|
|
115
|
+
/* default: documentScrolling uses normal page flow */
|
|
116
|
+
overflow: visible;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Contained scrolling: mainScroll scrolls (includes footer) */
|
|
120
|
+
.containScrolling .mainScroll {
|
|
121
|
+
overflow: auto;
|
|
122
|
+
-webkit-overflow-scrolling: touch;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Content area (not a scroll container anymore) */
|
|
126
|
+
.content {
|
|
127
|
+
min-width: 0;
|
|
128
|
+
min-height: 0;
|
|
129
|
+
flex: 1 1 auto; /* take remaining space inside mainScroll */
|
|
130
|
+
display: flex; /* lets contentInner stretch */
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
align-items: center;
|
|
133
|
+
|
|
134
|
+
background: var(--color-bg-surface);
|
|
135
|
+
padding: var(--spacing-lg) var(--spacing-md);
|
|
136
|
+
overflow: visible;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.footer {
|
|
140
|
+
min-width: 0;
|
|
141
|
+
background: var(--color-bg-surface-subtle);
|
|
142
|
+
display: flex;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
|
|
145
|
+
/* When there is extra space (content is short), this pushes footer to the bottom.
|
|
146
|
+
When content is long, footer follows content normally and is reached by scrolling.
|
|
147
|
+
*/
|
|
148
|
+
margin-top: auto;
|
|
149
|
+
flex: 0 0 auto;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Header slot wrappers */
|
|
153
|
+
.headerContainer {
|
|
154
|
+
display: flex;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
width: 100%;
|
|
157
|
+
padding-inline: var(--spacing-md);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.headerContent {
|
|
161
|
+
width: 100%;
|
|
162
|
+
box-sizing: border-box;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.footerContent {
|
|
166
|
+
width: 100%;
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.maxWidthMd {
|
|
171
|
+
max-width: 1600px;
|
|
172
|
+
margin-inline: auto;
|
|
173
|
+
width: 100%;
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.maxWidthSm {
|
|
178
|
+
margin-inline: auto;
|
|
179
|
+
width: 100%;
|
|
180
|
+
box-sizing: border-box;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@media (min-width: 640px) {
|
|
184
|
+
.maxWidthSm {
|
|
185
|
+
max-width: 640px;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@media (min-width: 768px) {
|
|
190
|
+
.maxWidthSm {
|
|
191
|
+
max-width: 668px;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media (min-width: 1024px) {
|
|
196
|
+
.maxWidthSm {
|
|
197
|
+
max-width: 924px;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (min-width: 1280px) {
|
|
202
|
+
.maxWidthSm {
|
|
203
|
+
max-width: 1180px;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Content slot inner wrapper (so maxWidth works without interfering with scroll) */
|
|
208
|
+
.contentInner {
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
gap: var(--spacing-xl);
|
|
212
|
+
width: 100%;
|
|
213
|
+
box-sizing: border-box;
|
|
214
|
+
min-width: 0;
|
|
215
|
+
|
|
216
|
+
/* This is what makes your "main content" actually expand to fill */
|
|
217
|
+
flex: 1 1 auto;
|
|
218
|
+
min-height: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Optional: for small viewport heights, avoid forced viewport locking */
|
|
222
|
+
@media (max-height: 400px) {
|
|
223
|
+
.containScrolling {
|
|
224
|
+
height: auto;
|
|
225
|
+
overflow: visible;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* In this mode, avoid forcing a nested scroll region */
|
|
229
|
+
.containScrolling .mainScroll {
|
|
230
|
+
overflow: visible;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.containScrolling .mainColumn {
|
|
234
|
+
height: auto;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var logo = require('../../../../assets/logo');
|
|
5
|
+
var Hyperlink = require('../../../../components/hyperlink/Hyperlink');
|
|
6
|
+
var styles = require('./Footer.module.css');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
11
|
+
|
|
12
|
+
const DEFAULT_META_PARTS = [
|
|
13
|
+
"Tempovej 7-11",
|
|
14
|
+
"DK-2750 Ballerup",
|
|
15
|
+
"+45 44 86 77 11",
|
|
16
|
+
`\xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} DBC DIGITAL A/S`
|
|
17
|
+
];
|
|
18
|
+
const DEFAULT_LINKS = [
|
|
19
|
+
{
|
|
20
|
+
label: "Kundeservice",
|
|
21
|
+
href: "https://kundeservice.dbc.dk",
|
|
22
|
+
external: true
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
function Footer({
|
|
26
|
+
links = DEFAULT_LINKS,
|
|
27
|
+
metaParts = DEFAULT_META_PARTS,
|
|
28
|
+
version,
|
|
29
|
+
extraLinks
|
|
30
|
+
}) {
|
|
31
|
+
const displayMetaParts = version && metaParts.length > 0 ? metaParts.map(
|
|
32
|
+
(part, index) => index === metaParts.length - 1 ? `${part} \xB7 ${version}` : part
|
|
33
|
+
) : metaParts;
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsx("footer", { className: styles__default.default.footer, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.inner, children: [
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.brand, children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.logoRow, children: /* @__PURE__ */ jsxRuntime.jsx(logo.Logo, {}) }),
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx("address", { className: styles__default.default.meta, children: displayMetaParts.map((part) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.part, children: part }, part)) })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: styles__default.default.links, "aria-label": "Footer navigation", children: [
|
|
40
|
+
extraLinks && extraLinks.length > 0 && (extraLinks == null ? void 0 : extraLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsx("span", { children: link }, index))),
|
|
41
|
+
links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
42
|
+
Hyperlink.Hyperlink,
|
|
43
|
+
{
|
|
44
|
+
href: link.href,
|
|
45
|
+
...link.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
46
|
+
children: link.label
|
|
47
|
+
}
|
|
48
|
+
) }, link.label))
|
|
49
|
+
] })
|
|
50
|
+
] }) });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
exports.Footer = Footer;
|