@dbcdk/react-components 0.0.95 → 0.0.97
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/components/alert/Alert.d.ts +13 -0
- package/dist/components/forms/input/Input.d.ts +2 -1
- package/dist/components/forms/input-container/InputContainer.d.ts +3 -1
- package/dist/components/forms/text-area/Textarea.d.ts +1 -1
- package/dist/components/stack/Stack.d.ts +11 -3
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/Table.types.d.ts +3 -0
- package/dist/components/table/components/TableHeader.d.ts +2 -1
- package/dist/index.cjs +12750 -0
- package/dist/index.css +7149 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12641 -78
- package/dist/tanstack.cjs +2674 -0
- package/dist/tanstack.css +1267 -0
- package/dist/tanstack.js +2650 -3
- package/dist/themes/dbc.css +3 -0
- package/dist/themes/forfatterweb.css +2 -0
- package/package.json +11 -10
- package/dist/assets/logo.js +0 -2
- package/dist/components/__stories__/_data/table.d.ts +0 -15
- package/dist/components/__stories__/_data/table.js +0 -55
- package/dist/components/__stories__/_data/tabs.d.ts +0 -9
- package/dist/components/__stories__/_data/tabs.js +0 -31
- package/dist/components/__stories__/story-components/Colors.d.ts +0 -11
- package/dist/components/__stories__/story-components/Colors.js +0 -96
- package/dist/components/__stories__/story-components/Colors.module.css +0 -27
- package/dist/components/__stories__/story-components/ComponentSizes.d.ts +0 -2
- package/dist/components/__stories__/story-components/ComponentSizes.js +0 -26
- package/dist/components/__stories__/story-components/Elevation.d.ts +0 -2
- package/dist/components/__stories__/story-components/Elevation.js +0 -49
- package/dist/components/__stories__/story-components/Flex.d.ts +0 -2
- package/dist/components/__stories__/story-components/Flex.js +0 -177
- package/dist/components/__stories__/story-components/Flex.module.css +0 -317
- package/dist/components/__stories__/story-components/Spacing.d.ts +0 -6
- package/dist/components/__stories__/story-components/Spacing.js +0 -76
- package/dist/components/__stories__/story-components/Spacing.module.css +0 -154
- package/dist/components/accordion/Accordion.js +0 -70
- package/dist/components/accordion/Accordion.module.css +0 -28
- package/dist/components/accordion/components/AccordionRow.js +0 -53
- package/dist/components/accordion/components/AccordionRow.module.css +0 -90
- package/dist/components/app-header/AppHeader.js +0 -5
- package/dist/components/app-header/AppHeader.module.css +0 -74
- package/dist/components/attribute-chip/AttributeChip.js +0 -5
- package/dist/components/attribute-chip/AttributeChip.module.css +0 -65
- package/dist/components/avatar/Avatar.js +0 -48
- package/dist/components/avatar/Avatar.module.css +0 -91
- package/dist/components/breadcrumbs/Breadcrumbs.js +0 -6
- package/dist/components/breadcrumbs/Breadcrumbs.module.css +0 -80
- package/dist/components/button/Button.js +0 -81
- package/dist/components/button/Button.module.css +0 -249
- package/dist/components/button-select/ButtonSelect.js +0 -7
- package/dist/components/button-select/ButtonSelect.module.css +0 -40
- package/dist/components/card/Card.js +0 -71
- package/dist/components/card/Card.module.css +0 -160
- package/dist/components/card/components/CardMeta.js +0 -26
- package/dist/components/card/components/CardMeta.module.css +0 -55
- package/dist/components/card-container/CardContainer.js +0 -6
- package/dist/components/card-container/CardContainer.module.css +0 -61
- package/dist/components/chip/Chip.js +0 -31
- package/dist/components/chip/Chip.module.css +0 -236
- package/dist/components/circle/Circle.js +0 -5
- package/dist/components/circle/Circle.module.css +0 -128
- package/dist/components/clear-button/ClearButton.js +0 -13
- package/dist/components/clear-button/ClearButton.module.css +0 -26
- package/dist/components/code-block/CodeBlock.js +0 -58
- package/dist/components/code-block/CodeBlock.module.css +0 -124
- package/dist/components/copy-button/CopyButton.js +0 -78
- package/dist/components/copy-button/CopyButton.module.css +0 -22
- package/dist/components/datetime-picker/DateTimePicker.js +0 -403
- package/dist/components/datetime-picker/DateTimePicker.module.css +0 -155
- package/dist/components/datetime-picker/dateTimeHelpers.js +0 -248
- package/dist/components/divider/Divider.js +0 -12
- package/dist/components/filter-field/FilterField.js +0 -191
- package/dist/components/filter-field/FilterField.module.css +0 -379
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +0 -52
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +0 -59
- package/dist/components/forms/checkbox/Checkbox.js +0 -26
- package/dist/components/forms/checkbox/Checkbox.module.css +0 -99
- package/dist/components/forms/checkbox-group/CheckboxGroup.js +0 -75
- package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +0 -115
- package/dist/components/forms/form-select/FormSelect.js +0 -86
- package/dist/components/forms/form-select/FormSelect.module.css +0 -236
- package/dist/components/forms/input/Input.js +0 -77
- package/dist/components/forms/input/Input.module.css +0 -468
- package/dist/components/forms/input-container/InputContainer.js +0 -15
- package/dist/components/forms/input-container/InputContainer.module.css +0 -56
- package/dist/components/forms/multi-select/MultiSelect.js +0 -122
- package/dist/components/forms/radio-buttons/RadioButton.js +0 -26
- package/dist/components/forms/radio-buttons/RadioButtonGroup.js +0 -19
- package/dist/components/forms/radio-buttons/RadioButtons.module.css +0 -118
- package/dist/components/forms/select/Select.js +0 -185
- package/dist/components/forms/select/Select.module.css +0 -32
- package/dist/components/forms/text-area/Textarea.js +0 -47
- package/dist/components/forms/text-area/Textarea.module.css +0 -70
- package/dist/components/forms/typeahead/Typeahead.js +0 -668
- package/dist/components/forms/typeahead/Typeahead.module.css +0 -38
- package/dist/components/grid/Grid.js +0 -23
- package/dist/components/grid/Grid.module.css +0 -35
- package/dist/components/headline/CollapsibleHeadline.js +0 -29
- package/dist/components/headline/Headline.js +0 -26
- package/dist/components/headline/Headline.module.css +0 -165
- package/dist/components/hyperlink/Hyperlink.js +0 -40
- package/dist/components/hyperlink/Hyperlink.module.css +0 -107
- package/dist/components/icon/Icon.js +0 -14
- package/dist/components/icon/Icon.module.css +0 -36
- package/dist/components/interval-select/IntervalSelect.js +0 -99
- package/dist/components/json-viewer/HighlightedText.js +0 -6
- package/dist/components/json-viewer/JsonNode.js +0 -30
- package/dist/components/json-viewer/JsonViewer.js +0 -68
- package/dist/components/json-viewer/JsonViewer.module.css +0 -346
- package/dist/components/json-viewer/types.js +0 -1
- package/dist/components/json-viewer/useClipboardStatus.js +0 -11
- package/dist/components/json-viewer/utils.js +0 -125
- package/dist/components/menu/Menu.js +0 -165
- package/dist/components/menu/Menu.module.css +0 -211
- package/dist/components/meta-bar/MetaBar.js +0 -9
- package/dist/components/meta-bar/MetaBar.module.css +0 -27
- package/dist/components/nav-bar/NavBar.js +0 -29
- package/dist/components/nav-bar/NavBar.module.css +0 -200
- package/dist/components/overlay/fade-overlay/FadeOverlay.js +0 -8
- package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +0 -54
- package/dist/components/overlay/modal/Modal.js +0 -115
- package/dist/components/overlay/modal/Modal.module.css +0 -109
- package/dist/components/overlay/modal/provider/ModalProvider.js +0 -73
- package/dist/components/overlay/side-panel/SidePanel.js +0 -83
- package/dist/components/overlay/side-panel/SidePanel.module.css +0 -177
- package/dist/components/overlay/side-panel/useSidePanel.js +0 -11
- package/dist/components/overlay/tooltip/Tooltip.js +0 -17
- package/dist/components/overlay/tooltip/Tooltip.module.css +0 -104
- package/dist/components/overlay/tooltip/TooltipProvider.js +0 -255
- package/dist/components/overlay/tooltip/useTooltipTrigger.js +0 -118
- package/dist/components/page/Page.js +0 -11
- package/dist/components/page/Page.module.css +0 -76
- package/dist/components/page-layout/PageLayout.js +0 -76
- package/dist/components/page-layout/PageLayout.module.css +0 -236
- package/dist/components/page-layout/components/layout-footer/LayoutFooter.js +0 -27
- package/dist/components/page-layout/components/layout-footer/LayoutFooter.module.css +0 -89
- package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.js +0 -14
- package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.module.css +0 -84
- package/dist/components/pagination/Pagination.js +0 -56
- package/dist/components/pagination/Pagination.module.css +0 -25
- package/dist/components/panel/Panel.js +0 -7
- package/dist/components/panel/Panel.module.css +0 -29
- package/dist/components/popover/Popover.js +0 -257
- package/dist/components/popover/Popover.module.css +0 -54
- package/dist/components/search-box/SearchBox.js +0 -170
- package/dist/components/search-box/SearchBox.module.css +0 -21
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +0 -48
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +0 -167
- package/dist/components/sidebar/Sidebar.js +0 -6
- package/dist/components/sidebar/components/SidebarItem.js +0 -8
- package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +0 -63
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +0 -29
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +0 -153
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +0 -260
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +0 -18
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +0 -106
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +0 -26
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +0 -20
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +0 -30
- package/dist/components/sidebar/providers/SidebarProvider.js +0 -229
- package/dist/components/skeleton-loader/SkeletonLoader.js +0 -73
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +0 -13
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +0 -51
- package/dist/components/split-button/SplitButton.js +0 -10
- package/dist/components/split-button/SplitButton.module.css +0 -32
- package/dist/components/split-pane/SplitPane.js +0 -107
- package/dist/components/split-pane/SplitPane.module.css +0 -111
- package/dist/components/split-pane/provider/SplitPaneContext.js +0 -124
- package/dist/components/stack/Stack.js +0 -19
- package/dist/components/state-page/StatePage.js +0 -20
- package/dist/components/state-page/StatePage.module.css +0 -9
- package/dist/components/state-page/empty.js +0 -2
- package/dist/components/state-page/error.js +0 -2
- package/dist/components/state-page/notFound.js +0 -2
- package/dist/components/sticky-footer-layout/StickyFooterLayout.js +0 -64
- package/dist/components/table/Table.js +0 -50
- package/dist/components/table/Table.module.css +0 -536
- package/dist/components/table/Table.types.js +0 -1
- package/dist/components/table/TanstackTable.js +0 -111
- package/dist/components/table/components/TableBody.js +0 -10
- package/dist/components/table/components/TableHeader.js +0 -7
- package/dist/components/table/components/TableHeaderCell.js +0 -24
- package/dist/components/table/components/TableLoadingBody.js +0 -26
- package/dist/components/table/components/TablePagination.js +0 -1
- package/dist/components/table/components/TableRow.js +0 -54
- package/dist/components/table/components/TableSelectionCell.js +0 -16
- package/dist/components/table/components/column-resizer/ColumnResizer.js +0 -5
- package/dist/components/table/components/column-resizer/ColumnResizer.module.css +0 -22
- package/dist/components/table/components/empty-state/EmptyState.js +0 -23
- package/dist/components/table/components/empty-state/EmptyState.module.css +0 -4
- package/dist/components/table/components/table-settings/TableSettings.js +0 -63
- package/dist/components/table/hooks/useTableRowInteractions.js +0 -30
- package/dist/components/table/table.classes.js +0 -23
- package/dist/components/table/table.utils.js +0 -47
- package/dist/components/table/tanstackTable.utils.js +0 -175
- package/dist/components/tabs/Tabs.js +0 -125
- package/dist/components/tabs/Tabs.module.css +0 -204
- package/dist/components/theme-button/ThemeButton.js +0 -23
- package/dist/components/toast/Toast.js +0 -20
- package/dist/components/toast/Toast.module.css +0 -161
- package/dist/components/toast/provider/ToastProvider.js +0 -70
- package/dist/components/user-display/UserDisplay.js +0 -6
- package/dist/components/user-display/UserDisplay.module.css +0 -25
- package/dist/constants/severity.js +0 -24
- package/dist/constants/severity.types.js +0 -1
- package/dist/constants/sizes.js +0 -7
- package/dist/hooks/useDeviceSize.js +0 -32
- package/dist/hooks/useListNavigation.js +0 -234
- package/dist/hooks/usePagination.js +0 -140
- package/dist/hooks/useSorting.js +0 -118
- package/dist/hooks/useTableData.js +0 -45
- package/dist/hooks/useTableSelection.js +0 -164
- package/dist/hooks/useTableSettings.js +0 -71
- package/dist/hooks/useTheme.js +0 -66
- package/dist/hooks/useTimeDuration.js +0 -68
- package/dist/hooks/useViewportFill.js +0 -77
- package/dist/styles/animation.js +0 -5
- package/dist/styles/themes/types.js +0 -1
- package/dist/types/a11y-props.types.js +0 -1
- package/dist/types/sizes.types.js +0 -1
- package/dist/utils/arrays/nested-filtering.js +0 -48
- package/dist/utils/date/formatDate.js +0 -51
- package/dist/utils/localStorage.utils.js +0 -78
- package/dist/utils/text/get-highlighted-segments.js +0 -46
|
@@ -1,236 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Logo } from '../../../../assets/logo';
|
|
4
|
-
import { Hyperlink } from '../../../../components/hyperlink/Hyperlink';
|
|
5
|
-
import styles from './LayoutFooter.module.css';
|
|
6
|
-
const DEFAULT_META_PARTS = [
|
|
7
|
-
'Tempovej 7-11',
|
|
8
|
-
'DK-2750 Ballerup',
|
|
9
|
-
'+45 44 86 77 11',
|
|
10
|
-
`© ${new Date().getFullYear()} DBC DIGITAL A/S`,
|
|
11
|
-
];
|
|
12
|
-
const DEFAULT_LINKS = [
|
|
13
|
-
{
|
|
14
|
-
label: 'Kundeservice',
|
|
15
|
-
href: 'https://kundeservice.dbc.dk',
|
|
16
|
-
external: true,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: 'Cookies',
|
|
20
|
-
href: '/cookies',
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
export function LayoutFooter({ links = DEFAULT_LINKS, metaParts = DEFAULT_META_PARTS, extraLinks, }) {
|
|
24
|
-
return (_jsx("footer", { className: styles.footer, children: _jsxs("div", { className: styles.inner, children: [_jsxs("div", { className: styles.brand, children: [_jsx("div", { className: styles.logoRow, children: _jsx(Logo, {}) }), _jsx("address", { className: styles.meta, children: metaParts.map(part => (_jsx("span", { className: styles.part, children: part }, part))) })] }), _jsxs("nav", { className: styles.links, "aria-label": "Footer navigation", children: [extraLinks &&
|
|
25
|
-
extraLinks.length > 0 &&
|
|
26
|
-
(extraLinks === null || extraLinks === void 0 ? void 0 : extraLinks.map((link, index) => _jsx("span", { children: link }, index))), links.map(link => (_jsx("span", { children: _jsx(Hyperlink, { href: link.href, ...(link.external ? { target: '_blank', rel: 'noopener noreferrer' } : {}), children: link.label }) }, link.label)))] })] }) }));
|
|
27
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
.footer {
|
|
2
|
-
inline-size: 100%;
|
|
3
|
-
background: var(--color-bg-surface-subtle);
|
|
4
|
-
line-height: var(--line-height-normal);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.inner {
|
|
8
|
-
inline-size: 100%;
|
|
9
|
-
max-inline-size: var(--container-xl);
|
|
10
|
-
margin-inline: auto;
|
|
11
|
-
padding-block: var(--spacing-lg);
|
|
12
|
-
padding-inline: var(--spacing-md);
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: row;
|
|
15
|
-
align-items: flex-start;
|
|
16
|
-
gap: var(--spacing-2xl);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.brand {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
gap: var(--spacing-xs);
|
|
23
|
-
flex-shrink: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.logoRow {
|
|
27
|
-
flex-shrink: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.logoRow svg {
|
|
31
|
-
height: 24px;
|
|
32
|
-
width: auto;
|
|
33
|
-
color: var(--color-brand);
|
|
34
|
-
display: block;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.meta {
|
|
38
|
-
font-style: normal;
|
|
39
|
-
margin: 0;
|
|
40
|
-
color: var(--color-fg-subtle);
|
|
41
|
-
line-height: var(--line-height-normal);
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: column;
|
|
44
|
-
gap: 1px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.part {
|
|
48
|
-
white-space: nowrap;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.links {
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: flex-start;
|
|
55
|
-
gap: 0;
|
|
56
|
-
line-height: var(--line-height-normal);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.linkGroup {
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: flex-start;
|
|
63
|
-
gap: var(--spacing-2xs);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.linkGroup + .linkGroup {
|
|
67
|
-
margin-block-start: var(--spacing-sm);
|
|
68
|
-
padding-inline: 0;
|
|
69
|
-
border-inline-start: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.linkItem {
|
|
73
|
-
white-space: nowrap;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@media (max-width: 640px) {
|
|
77
|
-
.inner {
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
gap: var(--spacing-md);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.linkGroup {
|
|
83
|
-
padding-inline: 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.linkGroup:first-child {
|
|
87
|
-
padding-inline-start: 0;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import heroStyles from './PageLayoutHero.module.css';
|
|
3
|
-
import layoutStyles from '../../PageLayout.module.css';
|
|
4
|
-
function getMaxWidthClass(value) {
|
|
5
|
-
if (!value)
|
|
6
|
-
return '';
|
|
7
|
-
if (value === 'sm')
|
|
8
|
-
return layoutStyles.maxWidthSm;
|
|
9
|
-
return layoutStyles.maxWidthMd;
|
|
10
|
-
}
|
|
11
|
-
export const PageLayoutHero = ({ children, link, metaHeadline, headline, image, maxWidth = 'md', textBgColor = 'var(--color-primary-900)', }) => {
|
|
12
|
-
const content = (_jsx("div", { className: `${heroStyles.heroContainer} ${getMaxWidthClass(maxWidth)}`, children: _jsxs("div", { className: heroStyles.splitWrapper, children: [_jsx("div", { className: heroStyles.imageColumn, children: image }), _jsx("div", { className: heroStyles.textColumn, style: { backgroundColor: textBgColor }, children: _jsxs("div", { className: heroStyles.textInner, children: [metaHeadline && _jsx("div", { className: heroStyles.metaHeadline, children: metaHeadline }), headline && (_jsx("div", { className: heroStyles.headline, children: _jsx("h2", { children: headline }) })), children] }) })] }) }));
|
|
13
|
-
return link ? _jsx(_Fragment, { children: link(content) }) : _jsx(_Fragment, { children: content });
|
|
14
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
.heroContainer {
|
|
2
|
-
width: 100%;
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
background-color: var(--color-brand);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.splitWrapper {
|
|
8
|
-
display: flex;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: clamp(260px, 60vh, 540px);
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/* LEFT SIDE — IMAGE */
|
|
15
|
-
.imageColumn {
|
|
16
|
-
flex: 0 0 60%;
|
|
17
|
-
position: relative;
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.imageColumn img,
|
|
22
|
-
.imageColumn picture,
|
|
23
|
-
.imageColumn video {
|
|
24
|
-
width: 100%;
|
|
25
|
-
height: 100%;
|
|
26
|
-
object-fit: cover;
|
|
27
|
-
display: block;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* RIGHT SIDE — TEXT BLOCK */
|
|
31
|
-
.textColumn {
|
|
32
|
-
flex: 0 0 40%;
|
|
33
|
-
color: var(--color-fg-on-brand);
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: flex-end;
|
|
36
|
-
padding: var(--spacing-lg);
|
|
37
|
-
position: relative;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.textInner {
|
|
41
|
-
z-index: 1;
|
|
42
|
-
max-width: 500px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.metaHeadline {
|
|
46
|
-
text-transform: uppercase;
|
|
47
|
-
opacity: 0.9;
|
|
48
|
-
font-size: var(--font-size-lg);
|
|
49
|
-
font-weight: 400;
|
|
50
|
-
margin-bottom: var(--spacing-xs);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.metaHeadline::after {
|
|
54
|
-
content: '';
|
|
55
|
-
display: block;
|
|
56
|
-
width: 40px;
|
|
57
|
-
height: 3px;
|
|
58
|
-
background-color: var(--color-fg-on-brand);
|
|
59
|
-
margin-top: 4px;
|
|
60
|
-
border-radius: 2px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.headline h2 {
|
|
64
|
-
margin: 0 0 var(--spacing-sm) 0;
|
|
65
|
-
font-size: var(--font-size-3xl);
|
|
66
|
-
color: var(--color-fg-on-brand);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@media (max-width: 900px) {
|
|
70
|
-
.splitWrapper {
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
height: auto;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.imageColumn,
|
|
76
|
-
.textColumn {
|
|
77
|
-
flex: none;
|
|
78
|
-
width: 100%;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.textColumn {
|
|
82
|
-
padding: var(--spacing-xl) var(--spacing-lg);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { ArrowLeft, ArrowRight, ChevronDown, ChevronsLeft, ChevronsRight } from 'lucide-react';
|
|
4
|
-
import { useMemo, useCallback, useRef } from 'react';
|
|
5
|
-
import styles from './Pagination.module.css';
|
|
6
|
-
import { Button } from '../button/Button';
|
|
7
|
-
import { Menu } from '../menu/Menu';
|
|
8
|
-
import { Popover } from '../popover/Popover';
|
|
9
|
-
const DEFAULT_PAGE_SIZE_OPTIONS = [20, 50, 100];
|
|
10
|
-
const NUMBER_LOCALE = 'da-DK';
|
|
11
|
-
export function Pagination({ itemsCount = 0, skip = 0, take = DEFAULT_PAGE_SIZE_OPTIONS[1], onPageChange, pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS, showFirstLast = true, showGoToPage = true, }) {
|
|
12
|
-
const popoverRef = useRef(null);
|
|
13
|
-
const pageSizeRef = useRef(null);
|
|
14
|
-
const formatNumber = useCallback((value) => value.toLocaleString(NUMBER_LOCALE), []);
|
|
15
|
-
const totalPages = useMemo(() => Math.max(1, Math.ceil(itemsCount / Math.max(1, take))), [itemsCount, take]);
|
|
16
|
-
const currentPage = useMemo(() => {
|
|
17
|
-
const p = Math.floor(skip / Math.max(1, take)) + 1;
|
|
18
|
-
return Math.min(Math.max(1, p), totalPages);
|
|
19
|
-
}, [skip, take, totalPages]);
|
|
20
|
-
const emit = useCallback((page, nextTake = take) => {
|
|
21
|
-
const nextTotalPages = Math.max(1, Math.ceil(itemsCount / Math.max(1, nextTake)));
|
|
22
|
-
const clampedPage = Math.min(Math.max(1, page), nextTotalPages);
|
|
23
|
-
const nextSkip = (clampedPage - 1) * nextTake;
|
|
24
|
-
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange({
|
|
25
|
-
page: clampedPage,
|
|
26
|
-
take: nextTake,
|
|
27
|
-
skip: nextSkip,
|
|
28
|
-
totalPages: nextTotalPages,
|
|
29
|
-
});
|
|
30
|
-
}, [onPageChange, take, itemsCount]);
|
|
31
|
-
const firstPage = useCallback(() => emit(1), [emit]);
|
|
32
|
-
const lastPage = useCallback(() => emit(totalPages), [emit, totalPages]);
|
|
33
|
-
const prevPage = useCallback(() => emit(currentPage - 1), [emit, currentPage]);
|
|
34
|
-
const nextPage = useCallback(() => emit(currentPage + 1), [emit, currentPage]);
|
|
35
|
-
const goToPage = useCallback((page) => emit(page), [emit]);
|
|
36
|
-
const canPrev = currentPage > 1;
|
|
37
|
-
const canNext = currentPage < totalPages;
|
|
38
|
-
const rangeLabel = useMemo(() => {
|
|
39
|
-
if (itemsCount <= 0)
|
|
40
|
-
return '0 af 0';
|
|
41
|
-
const first = skip + 1;
|
|
42
|
-
const last = Math.min(skip + take, itemsCount);
|
|
43
|
-
return `${formatNumber(first)}\u2013${formatNumber(last)} af ${formatNumber(itemsCount)}`;
|
|
44
|
-
}, [formatNumber, itemsCount, skip, take]);
|
|
45
|
-
const pages = useMemo(() => Array.from({ length: totalPages }, (_, i) => i + 1), [totalPages]);
|
|
46
|
-
const handlePageSizeChange = useCallback((size) => emit(1, size), [emit]);
|
|
47
|
-
return (_jsxs("div", { className: styles.container, children: [showFirstLast && (_jsx(Button, { size: "sm", icon: _jsx(ChevronsLeft, {}), disabled: !canPrev, onClick: firstPage, "aria-label": "First page" })), _jsx(Button, { size: "sm", icon: _jsx(ArrowLeft, {}), disabled: !canPrev, onClick: prevPage, "aria-label": "Previous page" }), _jsx("div", { className: styles.range, "aria-live": "polite", children: rangeLabel }), _jsx(Button, { size: "sm", icon: _jsx(ArrowRight, {}), disabled: !canNext, onClick: nextPage, "aria-label": "Next page" }), showFirstLast && (_jsx(Button, { size: "sm", icon: _jsx(ChevronsRight, {}), disabled: !canNext, onClick: lastPage, "aria-label": "Last page" })), showGoToPage && (_jsx(Popover, { ref: popoverRef, trigger: open => (_jsxs(Button, { size: "sm", variant: "outlined", onClick: open, children: ["Side ", formatNumber(currentPage), "/", formatNumber(totalPages), " ", _jsx(ChevronDown, { size: 16 })] })), children: _jsx(Menu, { children: pages === null || pages === void 0 ? void 0 : pages.map(page => (_jsx(Menu.Item, { active: page === currentPage, children: _jsx("button", { onClick: () => {
|
|
48
|
-
var _a;
|
|
49
|
-
goToPage(page);
|
|
50
|
-
(_a = popoverRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
51
|
-
}, children: formatNumber(page) }) }, page))) }) })), _jsx(Popover, { ref: pageSizeRef, trigger: open => (_jsxs(Button, { size: "sm", variant: "outlined", onClick: open, children: ["Vis ", formatNumber(take), " ", _jsx(ChevronDown, { size: 16 })] })), children: _jsx(Menu, { children: pageSizeOptions === null || pageSizeOptions === void 0 ? void 0 : pageSizeOptions.map(size => (_jsx(Menu.Item, { active: size === take, children: _jsx("button", { onClick: () => {
|
|
52
|
-
var _a;
|
|
53
|
-
handlePageSizeChange(size);
|
|
54
|
-
(_a = pageSizeRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
55
|
-
}, children: formatNumber(size) }) }, size))) }) })] }));
|
|
56
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
gap: var(--spacing-xxs);
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
margin: 0 auto;
|
|
7
|
-
max-width: 100%;
|
|
8
|
-
overflow-x: auto;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.ellipsisButton {
|
|
12
|
-
display: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media (min-width: 480px) {
|
|
16
|
-
.ellipsisButton {
|
|
17
|
-
display: contents;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
.range {
|
|
21
|
-
min-width: 110px;
|
|
22
|
-
text-align: center;
|
|
23
|
-
font-size: var(--font-size-xs);
|
|
24
|
-
padding: 0 var(--spacing-xxs);
|
|
25
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import styles from './Panel.module.css';
|
|
4
|
-
import { Headline } from '../headline/Headline';
|
|
5
|
-
export function Panel({ header, subheader, headerIcon, headerAddition, children, severity, size, }) {
|
|
6
|
-
return (_jsxs("section", { className: `${styles.container} ${size ? styles[size] : ''}`, children: [_jsx("div", { className: styles.header, children: _jsx(Headline, { disableMargin: true, size: size === 'sm' ? 4 : 3, icon: headerIcon, addition: headerAddition, subheader: subheader, severity: severity, children: header }) }), _jsx("div", { className: styles.content, children: children })] }));
|
|
7
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
border: var(--border-width-thin) solid var(--color-border-subtle);
|
|
3
|
-
border-radius: var(--border-radius-md);
|
|
4
|
-
background-color: var(--color-bg-surface);
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.header {
|
|
11
|
-
border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
|
|
12
|
-
border-bottom: var(--border-width-thin) solid var(--color-border-subtle);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.content {
|
|
16
|
-
padding: var(--spacing-md);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.header {
|
|
20
|
-
padding: var(--spacing-sm) var(--spacing-md);
|
|
21
|
-
background-color: var(--table-header-bg);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.container.sm {
|
|
25
|
-
.header,
|
|
26
|
-
.content {
|
|
27
|
-
padding: var(--spacing-xs) var(--spacing-md);
|
|
28
|
-
}
|
|
29
|
-
}
|