@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.
Files changed (226) hide show
  1. package/dist/components/alert/Alert.d.ts +13 -0
  2. package/dist/components/forms/input/Input.d.ts +2 -1
  3. package/dist/components/forms/input-container/InputContainer.d.ts +3 -1
  4. package/dist/components/forms/text-area/Textarea.d.ts +1 -1
  5. package/dist/components/stack/Stack.d.ts +11 -3
  6. package/dist/components/table/Table.d.ts +1 -1
  7. package/dist/components/table/Table.types.d.ts +3 -0
  8. package/dist/components/table/components/TableHeader.d.ts +2 -1
  9. package/dist/index.cjs +12750 -0
  10. package/dist/index.css +7149 -0
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.js +12641 -78
  13. package/dist/tanstack.cjs +2674 -0
  14. package/dist/tanstack.css +1267 -0
  15. package/dist/tanstack.js +2650 -3
  16. package/dist/themes/dbc.css +3 -0
  17. package/dist/themes/forfatterweb.css +2 -0
  18. package/package.json +11 -10
  19. package/dist/assets/logo.js +0 -2
  20. package/dist/components/__stories__/_data/table.d.ts +0 -15
  21. package/dist/components/__stories__/_data/table.js +0 -55
  22. package/dist/components/__stories__/_data/tabs.d.ts +0 -9
  23. package/dist/components/__stories__/_data/tabs.js +0 -31
  24. package/dist/components/__stories__/story-components/Colors.d.ts +0 -11
  25. package/dist/components/__stories__/story-components/Colors.js +0 -96
  26. package/dist/components/__stories__/story-components/Colors.module.css +0 -27
  27. package/dist/components/__stories__/story-components/ComponentSizes.d.ts +0 -2
  28. package/dist/components/__stories__/story-components/ComponentSizes.js +0 -26
  29. package/dist/components/__stories__/story-components/Elevation.d.ts +0 -2
  30. package/dist/components/__stories__/story-components/Elevation.js +0 -49
  31. package/dist/components/__stories__/story-components/Flex.d.ts +0 -2
  32. package/dist/components/__stories__/story-components/Flex.js +0 -177
  33. package/dist/components/__stories__/story-components/Flex.module.css +0 -317
  34. package/dist/components/__stories__/story-components/Spacing.d.ts +0 -6
  35. package/dist/components/__stories__/story-components/Spacing.js +0 -76
  36. package/dist/components/__stories__/story-components/Spacing.module.css +0 -154
  37. package/dist/components/accordion/Accordion.js +0 -70
  38. package/dist/components/accordion/Accordion.module.css +0 -28
  39. package/dist/components/accordion/components/AccordionRow.js +0 -53
  40. package/dist/components/accordion/components/AccordionRow.module.css +0 -90
  41. package/dist/components/app-header/AppHeader.js +0 -5
  42. package/dist/components/app-header/AppHeader.module.css +0 -74
  43. package/dist/components/attribute-chip/AttributeChip.js +0 -5
  44. package/dist/components/attribute-chip/AttributeChip.module.css +0 -65
  45. package/dist/components/avatar/Avatar.js +0 -48
  46. package/dist/components/avatar/Avatar.module.css +0 -91
  47. package/dist/components/breadcrumbs/Breadcrumbs.js +0 -6
  48. package/dist/components/breadcrumbs/Breadcrumbs.module.css +0 -80
  49. package/dist/components/button/Button.js +0 -81
  50. package/dist/components/button/Button.module.css +0 -249
  51. package/dist/components/button-select/ButtonSelect.js +0 -7
  52. package/dist/components/button-select/ButtonSelect.module.css +0 -40
  53. package/dist/components/card/Card.js +0 -71
  54. package/dist/components/card/Card.module.css +0 -160
  55. package/dist/components/card/components/CardMeta.js +0 -26
  56. package/dist/components/card/components/CardMeta.module.css +0 -55
  57. package/dist/components/card-container/CardContainer.js +0 -6
  58. package/dist/components/card-container/CardContainer.module.css +0 -61
  59. package/dist/components/chip/Chip.js +0 -31
  60. package/dist/components/chip/Chip.module.css +0 -236
  61. package/dist/components/circle/Circle.js +0 -5
  62. package/dist/components/circle/Circle.module.css +0 -128
  63. package/dist/components/clear-button/ClearButton.js +0 -13
  64. package/dist/components/clear-button/ClearButton.module.css +0 -26
  65. package/dist/components/code-block/CodeBlock.js +0 -58
  66. package/dist/components/code-block/CodeBlock.module.css +0 -124
  67. package/dist/components/copy-button/CopyButton.js +0 -78
  68. package/dist/components/copy-button/CopyButton.module.css +0 -22
  69. package/dist/components/datetime-picker/DateTimePicker.js +0 -403
  70. package/dist/components/datetime-picker/DateTimePicker.module.css +0 -155
  71. package/dist/components/datetime-picker/dateTimeHelpers.js +0 -248
  72. package/dist/components/divider/Divider.js +0 -12
  73. package/dist/components/filter-field/FilterField.js +0 -191
  74. package/dist/components/filter-field/FilterField.module.css +0 -379
  75. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +0 -52
  76. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +0 -59
  77. package/dist/components/forms/checkbox/Checkbox.js +0 -26
  78. package/dist/components/forms/checkbox/Checkbox.module.css +0 -99
  79. package/dist/components/forms/checkbox-group/CheckboxGroup.js +0 -75
  80. package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +0 -115
  81. package/dist/components/forms/form-select/FormSelect.js +0 -86
  82. package/dist/components/forms/form-select/FormSelect.module.css +0 -236
  83. package/dist/components/forms/input/Input.js +0 -77
  84. package/dist/components/forms/input/Input.module.css +0 -468
  85. package/dist/components/forms/input-container/InputContainer.js +0 -15
  86. package/dist/components/forms/input-container/InputContainer.module.css +0 -56
  87. package/dist/components/forms/multi-select/MultiSelect.js +0 -122
  88. package/dist/components/forms/radio-buttons/RadioButton.js +0 -26
  89. package/dist/components/forms/radio-buttons/RadioButtonGroup.js +0 -19
  90. package/dist/components/forms/radio-buttons/RadioButtons.module.css +0 -118
  91. package/dist/components/forms/select/Select.js +0 -185
  92. package/dist/components/forms/select/Select.module.css +0 -32
  93. package/dist/components/forms/text-area/Textarea.js +0 -47
  94. package/dist/components/forms/text-area/Textarea.module.css +0 -70
  95. package/dist/components/forms/typeahead/Typeahead.js +0 -668
  96. package/dist/components/forms/typeahead/Typeahead.module.css +0 -38
  97. package/dist/components/grid/Grid.js +0 -23
  98. package/dist/components/grid/Grid.module.css +0 -35
  99. package/dist/components/headline/CollapsibleHeadline.js +0 -29
  100. package/dist/components/headline/Headline.js +0 -26
  101. package/dist/components/headline/Headline.module.css +0 -165
  102. package/dist/components/hyperlink/Hyperlink.js +0 -40
  103. package/dist/components/hyperlink/Hyperlink.module.css +0 -107
  104. package/dist/components/icon/Icon.js +0 -14
  105. package/dist/components/icon/Icon.module.css +0 -36
  106. package/dist/components/interval-select/IntervalSelect.js +0 -99
  107. package/dist/components/json-viewer/HighlightedText.js +0 -6
  108. package/dist/components/json-viewer/JsonNode.js +0 -30
  109. package/dist/components/json-viewer/JsonViewer.js +0 -68
  110. package/dist/components/json-viewer/JsonViewer.module.css +0 -346
  111. package/dist/components/json-viewer/types.js +0 -1
  112. package/dist/components/json-viewer/useClipboardStatus.js +0 -11
  113. package/dist/components/json-viewer/utils.js +0 -125
  114. package/dist/components/menu/Menu.js +0 -165
  115. package/dist/components/menu/Menu.module.css +0 -211
  116. package/dist/components/meta-bar/MetaBar.js +0 -9
  117. package/dist/components/meta-bar/MetaBar.module.css +0 -27
  118. package/dist/components/nav-bar/NavBar.js +0 -29
  119. package/dist/components/nav-bar/NavBar.module.css +0 -200
  120. package/dist/components/overlay/fade-overlay/FadeOverlay.js +0 -8
  121. package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +0 -54
  122. package/dist/components/overlay/modal/Modal.js +0 -115
  123. package/dist/components/overlay/modal/Modal.module.css +0 -109
  124. package/dist/components/overlay/modal/provider/ModalProvider.js +0 -73
  125. package/dist/components/overlay/side-panel/SidePanel.js +0 -83
  126. package/dist/components/overlay/side-panel/SidePanel.module.css +0 -177
  127. package/dist/components/overlay/side-panel/useSidePanel.js +0 -11
  128. package/dist/components/overlay/tooltip/Tooltip.js +0 -17
  129. package/dist/components/overlay/tooltip/Tooltip.module.css +0 -104
  130. package/dist/components/overlay/tooltip/TooltipProvider.js +0 -255
  131. package/dist/components/overlay/tooltip/useTooltipTrigger.js +0 -118
  132. package/dist/components/page/Page.js +0 -11
  133. package/dist/components/page/Page.module.css +0 -76
  134. package/dist/components/page-layout/PageLayout.js +0 -76
  135. package/dist/components/page-layout/PageLayout.module.css +0 -236
  136. package/dist/components/page-layout/components/layout-footer/LayoutFooter.js +0 -27
  137. package/dist/components/page-layout/components/layout-footer/LayoutFooter.module.css +0 -89
  138. package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.js +0 -14
  139. package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.module.css +0 -84
  140. package/dist/components/pagination/Pagination.js +0 -56
  141. package/dist/components/pagination/Pagination.module.css +0 -25
  142. package/dist/components/panel/Panel.js +0 -7
  143. package/dist/components/panel/Panel.module.css +0 -29
  144. package/dist/components/popover/Popover.js +0 -257
  145. package/dist/components/popover/Popover.module.css +0 -54
  146. package/dist/components/search-box/SearchBox.js +0 -170
  147. package/dist/components/search-box/SearchBox.module.css +0 -21
  148. package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +0 -48
  149. package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +0 -167
  150. package/dist/components/sidebar/Sidebar.js +0 -6
  151. package/dist/components/sidebar/components/SidebarItem.js +0 -8
  152. package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
  153. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +0 -63
  154. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +0 -29
  155. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +0 -153
  156. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +0 -260
  157. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +0 -18
  158. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +0 -106
  159. package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +0 -26
  160. package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +0 -20
  161. package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +0 -30
  162. package/dist/components/sidebar/providers/SidebarProvider.js +0 -229
  163. package/dist/components/skeleton-loader/SkeletonLoader.js +0 -73
  164. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +0 -13
  165. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +0 -51
  166. package/dist/components/split-button/SplitButton.js +0 -10
  167. package/dist/components/split-button/SplitButton.module.css +0 -32
  168. package/dist/components/split-pane/SplitPane.js +0 -107
  169. package/dist/components/split-pane/SplitPane.module.css +0 -111
  170. package/dist/components/split-pane/provider/SplitPaneContext.js +0 -124
  171. package/dist/components/stack/Stack.js +0 -19
  172. package/dist/components/state-page/StatePage.js +0 -20
  173. package/dist/components/state-page/StatePage.module.css +0 -9
  174. package/dist/components/state-page/empty.js +0 -2
  175. package/dist/components/state-page/error.js +0 -2
  176. package/dist/components/state-page/notFound.js +0 -2
  177. package/dist/components/sticky-footer-layout/StickyFooterLayout.js +0 -64
  178. package/dist/components/table/Table.js +0 -50
  179. package/dist/components/table/Table.module.css +0 -536
  180. package/dist/components/table/Table.types.js +0 -1
  181. package/dist/components/table/TanstackTable.js +0 -111
  182. package/dist/components/table/components/TableBody.js +0 -10
  183. package/dist/components/table/components/TableHeader.js +0 -7
  184. package/dist/components/table/components/TableHeaderCell.js +0 -24
  185. package/dist/components/table/components/TableLoadingBody.js +0 -26
  186. package/dist/components/table/components/TablePagination.js +0 -1
  187. package/dist/components/table/components/TableRow.js +0 -54
  188. package/dist/components/table/components/TableSelectionCell.js +0 -16
  189. package/dist/components/table/components/column-resizer/ColumnResizer.js +0 -5
  190. package/dist/components/table/components/column-resizer/ColumnResizer.module.css +0 -22
  191. package/dist/components/table/components/empty-state/EmptyState.js +0 -23
  192. package/dist/components/table/components/empty-state/EmptyState.module.css +0 -4
  193. package/dist/components/table/components/table-settings/TableSettings.js +0 -63
  194. package/dist/components/table/hooks/useTableRowInteractions.js +0 -30
  195. package/dist/components/table/table.classes.js +0 -23
  196. package/dist/components/table/table.utils.js +0 -47
  197. package/dist/components/table/tanstackTable.utils.js +0 -175
  198. package/dist/components/tabs/Tabs.js +0 -125
  199. package/dist/components/tabs/Tabs.module.css +0 -204
  200. package/dist/components/theme-button/ThemeButton.js +0 -23
  201. package/dist/components/toast/Toast.js +0 -20
  202. package/dist/components/toast/Toast.module.css +0 -161
  203. package/dist/components/toast/provider/ToastProvider.js +0 -70
  204. package/dist/components/user-display/UserDisplay.js +0 -6
  205. package/dist/components/user-display/UserDisplay.module.css +0 -25
  206. package/dist/constants/severity.js +0 -24
  207. package/dist/constants/severity.types.js +0 -1
  208. package/dist/constants/sizes.js +0 -7
  209. package/dist/hooks/useDeviceSize.js +0 -32
  210. package/dist/hooks/useListNavigation.js +0 -234
  211. package/dist/hooks/usePagination.js +0 -140
  212. package/dist/hooks/useSorting.js +0 -118
  213. package/dist/hooks/useTableData.js +0 -45
  214. package/dist/hooks/useTableSelection.js +0 -164
  215. package/dist/hooks/useTableSettings.js +0 -71
  216. package/dist/hooks/useTheme.js +0 -66
  217. package/dist/hooks/useTimeDuration.js +0 -68
  218. package/dist/hooks/useViewportFill.js +0 -77
  219. package/dist/styles/animation.js +0 -5
  220. package/dist/styles/themes/types.js +0 -1
  221. package/dist/types/a11y-props.types.js +0 -1
  222. package/dist/types/sizes.types.js +0 -1
  223. package/dist/utils/arrays/nested-filtering.js +0 -48
  224. package/dist/utils/date/formatDate.js +0 -51
  225. package/dist/utils/localStorage.utils.js +0 -78
  226. package/dist/utils/text/get-highlighted-segments.js +0 -46
@@ -1,249 +0,0 @@
1
- .button {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- gap: var(--spacing-xs);
6
-
7
- font-family: var(--font-family);
8
- font-size: var(--font-size-sm);
9
- line-height: 1;
10
-
11
- height: var(--component-size-md);
12
- min-block-size: var(--component-size-md);
13
-
14
- padding-inline: var(--spacing-sm);
15
- padding-block: var(--spacing-xs);
16
-
17
- border-width: var(--border-width-thin, 1px);
18
- border-style: solid;
19
- border-color: transparent;
20
-
21
- border-radius: var(--border-radius-default);
22
- cursor: pointer;
23
- user-select: none;
24
- white-space: nowrap;
25
- }
26
-
27
- .buttonLink {
28
- color: inherit;
29
- text-decoration: none;
30
- user-select: default;
31
- }
32
-
33
- .button:hover {
34
- transition:
35
- background-color var(--transition-fast) var(--ease-standard),
36
- color var(--transition-fast) var(--ease-standard),
37
- border-color var(--transition-fast) var(--ease-standard),
38
- box-shadow var(--transition-fast) var(--ease-standard);
39
- }
40
-
41
- .button:focus-visible {
42
- outline: none;
43
- border-color: var(--color-border-selected);
44
- box-shadow: inset 0 0 0 1px var(--color-border-selected);
45
- }
46
-
47
- .round {
48
- border-radius: 100%;
49
- }
50
-
51
- .rounded {
52
- border-radius: var(--border-radius-rounded);
53
- }
54
-
55
- .button:disabled,
56
- .button[aria-disabled='true'] {
57
- cursor: not-allowed;
58
- pointer-events: none;
59
- background-color: var(--color-disabled-bg);
60
- border-color: transparent;
61
- color: var(--color-disabled-fg);
62
- opacity: 0.5;
63
- }
64
-
65
- /* ==========================================================================
66
- * LINK STYLE
67
- * ======================================================================= */
68
-
69
- .link {
70
- text-decoration: none;
71
- font-size: var(--font-size-sm);
72
- color: var(--color-link);
73
- transition:
74
- color var(--transition-fast) var(--ease-standard),
75
- text-decoration-color var(--transition-fast) var(--ease-standard);
76
- text-underline-offset: 0.15em;
77
- }
78
-
79
- .link:focus-visible {
80
- outline: none;
81
- text-decoration: underline;
82
- text-decoration-color: currentColor;
83
- }
84
-
85
- /* Icons */
86
- .button svg,
87
- .icon svg {
88
- inline-size: var(--icon-size-md);
89
- block-size: var(--icon-size-md);
90
- }
91
-
92
- .icon {
93
- display: inline-flex;
94
- }
95
-
96
- /* ==========================================================================
97
- * SIZES
98
- * ======================================================================= */
99
-
100
- .button.xs {
101
- height: var(--component-size-xs);
102
- min-block-size: var(--component-size-xs);
103
- padding-inline: var(--spacing-xs);
104
- font-size: var(--font-size-xs);
105
- }
106
-
107
- .button.sm {
108
- height: var(--component-size-sm);
109
- min-block-size: var(--component-size-sm);
110
- padding-inline: var(--spacing-xs);
111
- }
112
-
113
- .button.sm svg {
114
- inline-size: var(--icon-size-sm);
115
- block-size: var(--icon-size-sm);
116
- }
117
-
118
- .button.lg {
119
- height: var(--component-size-lg);
120
- font-size: var(--font-size-md);
121
- min-block-size: var(--component-size-lg);
122
- padding-inline: var(--spacing-lg);
123
- }
124
-
125
- .button.fullWidth {
126
- width: 100%;
127
- }
128
-
129
- /* ==========================================================================
130
- * VARIANTS (semantic token-based)
131
- * ======================================================================= */
132
-
133
- .primary {
134
- background-color: var(--button-bg-primary);
135
- color: var(--button-fg-primary);
136
- border-color: transparent;
137
- }
138
-
139
- .primary:hover {
140
- background-color: var(--button-bg-primary-hover);
141
- }
142
-
143
- .secondary {
144
- background-color: var(--button-bg-secondary);
145
- color: var(--button-fg-secondary);
146
- border-color: var(--button-border-secondary);
147
- }
148
-
149
- .secondary:hover {
150
- background-color: var(--button-bg-secondary-hover);
151
- border-color: var(--color-border-strong);
152
- }
153
-
154
- .default {
155
- background-color: var(--color-bg-toolbar);
156
- color: var(--color-fg-default);
157
- border-color: transparent;
158
- }
159
-
160
- .default:hover {
161
- background-color: var(--color-bg-toolbar-hover);
162
- border-color: transparent;
163
- }
164
-
165
- .default:focus-visible {
166
- outline: none;
167
- border-color: var(--color-border-selected);
168
- box-shadow: inset 0 0 0 1px var(--color-border-selected);
169
- }
170
-
171
- .outlined {
172
- background-color: transparent;
173
- color: var(--color-fg-default);
174
- border-width: var(--border-width-thin, 1px);
175
- border-style: solid;
176
- border-color: var(--color-border-default);
177
- }
178
-
179
- .outlined:not(.active):hover {
180
- background-color: var(--color-bg-hover-subtle);
181
- border-color: var(--color-border-strong);
182
- }
183
-
184
- .success {
185
- background-color: transparent;
186
- color: var(--color-status-success-fg);
187
- border-color: var(--color-status-success-border);
188
- }
189
-
190
- .success .icon {
191
- color: var(--color-status-success);
192
- }
193
-
194
- .success:hover {
195
- border-color: var(--color-fg-default);
196
- }
197
-
198
- .danger {
199
- background-color: transparent;
200
- color: var(--color-status-error-fg);
201
- border-color: var(--color-status-error-border);
202
- }
203
-
204
- .danger .icon {
205
- color: var(--color-status-error);
206
- }
207
-
208
- .danger:hover {
209
- border-color: var(--color-fg-default);
210
- }
211
-
212
- .button.inline {
213
- background-color: transparent;
214
- border-color: transparent;
215
- padding: var(--spacing-xxs);
216
- min-block-size: unset;
217
- block-size: unset;
218
- height: unset;
219
- color: var(--color-fg-default);
220
- }
221
-
222
- .button.inline:hover {
223
- background-color: var(--opac-bg-light);
224
- }
225
-
226
- .button.inline:focus-visible {
227
- outline: none;
228
- background-color: var(--opac-bg-light);
229
- border-color: transparent;
230
- box-shadow: inset 0 0 0 1px var(--color-border-selected);
231
- }
232
-
233
- .active {
234
- background-color: var(--button-bg-primary);
235
- color: var(--button-fg-primary);
236
- border-color: var(--color-border-selected);
237
- }
238
-
239
- .inline.active {
240
- color: var(--button-bg-primary);
241
- }
242
-
243
- .active:hover {
244
- background-color: var(--button-bg-primary-hover);
245
- }
246
-
247
- .inline.active:hover {
248
- color: var(--button-bg-primary-hover);
249
- }
@@ -1,7 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Button } from '../../components/button/Button';
4
- import styles from './ButtonSelect.module.css';
5
- export function ButtonSelect({ options, value, onChange, size = 'md', disabled, }) {
6
- return (_jsx("div", { className: styles.group, role: "group", children: options.map(option => (_jsx(Button, { className: option.value === value ? `${styles.btn} ${styles.btnSelected}` : styles.btn, variant: "outlined", shape: "default", size: size, active: option.value === value, disabled: disabled || option.disabled, onClick: () => onChange(option.value), children: option.label }, option.value))) }));
7
- }
@@ -1,40 +0,0 @@
1
- .group {
2
- display: inline-flex;
3
- flex-wrap: nowrap;
4
- }
5
-
6
- /* Collapse the doubled border between adjacent buttons */
7
- .group .btn:not(:first-child) {
8
- margin-left: -1px;
9
- }
10
-
11
- /* Flatten interior corners */
12
- .group .btn:not(:first-child) {
13
- border-top-left-radius: 0;
14
- border-bottom-left-radius: 0;
15
- }
16
-
17
- .group .btn:not(:last-child) {
18
- border-top-right-radius: 0;
19
- border-bottom-right-radius: 0;
20
- }
21
-
22
- /* Raise hovered / focused / selected button so its full border is visible above siblings */
23
- .group .btn:hover,
24
- .group .btn:focus-visible,
25
- .group .btn:active,
26
- .group .btnSelected {
27
- position: relative;
28
- z-index: 1;
29
- }
30
-
31
- /* Selected state follows the system's selection language (same as Chip) */
32
- .group .btnSelected {
33
- background-color: var(--color-bg-selected);
34
- color: var(--color-brand);
35
- border-color: var(--color-border-selected);
36
- }
37
-
38
- .group .btnSelected:hover {
39
- background-color: var(--color-bg-selected);
40
- }
@@ -1,71 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import styles from './Card.module.css';
3
- import { CardMeta, CardMetaRow } from './components/CardMeta';
4
- import { Headline } from '../headline/Headline';
5
- import { Hyperlink } from '../hyperlink/Hyperlink';
6
- import { SkeletonLoaderItem } from '../skeleton-loader/skeleton-loader-item/SkeletonLoaderItem';
7
- /**
8
- * Fix for flex gap issue:
9
- * Distributes gap proportionally across cards
10
- */
11
- function getGapShare(width) {
12
- switch (width) {
13
- case 25:
14
- return 'calc(var(--card-container-gap, var(--spacing-md)) * 3 / 4)';
15
- case 33:
16
- return 'calc(var(--card-container-gap, var(--spacing-md)) * 2 / 3)';
17
- case 50:
18
- return 'calc(var(--card-container-gap, var(--spacing-md)) / 2)';
19
- case 66:
20
- return 'calc(var(--card-container-gap, var(--spacing-md)) * 2 / 3)';
21
- case 75:
22
- return 'calc(var(--card-container-gap, var(--spacing-md)) * 3 / 4)';
23
- case 100:
24
- default:
25
- return '0px';
26
- }
27
- }
28
- function getInnerPlacementClass(imgPlacement, s) {
29
- switch (imgPlacement) {
30
- case 'top':
31
- return s.innerImgTop;
32
- case 'right':
33
- return s.innerImgRight;
34
- case 'left':
35
- default:
36
- return s.innerImgLeft;
37
- }
38
- }
39
- function getVariantClass(variant, s) {
40
- switch (variant) {
41
- case 'subtle':
42
- return s.variantSubtle;
43
- case 'default':
44
- default:
45
- return s.variantDefault;
46
- }
47
- }
48
- function CardImpl({ title, subheader, loading = false, variant = 'default', size = 'md', headerMarker = true, headerIcon, headerAddition, severity, image, imgPlacement = 'left', mediaWidth, actions, headerMeta, sectionTitle, showSectionDivider = false, children, link, width, headlineSize = 4, }) {
49
- const outerStyle = width
50
- ? {
51
- ['--width']: `${width}%`,
52
- ['--gap-share']: getGapShare(width),
53
- }
54
- : undefined;
55
- const mediaStyle = mediaWidth
56
- ? { ['--card-media-width']: `${mediaWidth}px` }
57
- : undefined;
58
- const innerPlacementClass = getInnerPlacementClass(imgPlacement, styles);
59
- const variantClass = getVariantClass(variant, styles);
60
- const hasHeader = !!title || !!headerMeta;
61
- const showSection = !loading && (showSectionDivider || !!sectionTitle);
62
- const showBody = !loading && !!children;
63
- const showActions = !loading && !!actions;
64
- const inner = (_jsxs("div", { className: `${styles.inner} ${innerPlacementClass}`, children: [image ? (_jsx("div", { className: styles.media, style: mediaStyle, children: image })) : null, _jsxs("div", { className: styles.content, children: [hasHeader ? (_jsxs("header", { className: styles.header, children: [title ? (_jsx(Headline, { severity: severity, marker: headerMarker, icon: headerIcon, addition: headerAddition, subheader: subheader, size: headlineSize, weight: 500, disableMargin: true, children: title })) : null, headerMeta ? _jsx("div", { className: styles.headerMeta, children: headerMeta }) : null] })) : null, loading ? (_jsx("div", { className: styles.loadingList, "aria-busy": "true", "aria-live": "polite", children: Array.from({ length: 4 }, (_, index) => (_jsxs("div", { className: styles.loadingRow, children: [_jsx(SkeletonLoaderItem, {}), _jsx(SkeletonLoaderItem, { width: "100%" })] }, index))) })) : null, showSection ? (_jsxs("div", { className: styles.section, children: [showSectionDivider ? _jsx("div", { className: styles.sectionDivider }) : null, sectionTitle ? _jsx("div", { className: styles.sectionTitle, children: sectionTitle }) : null] })) : null, showBody ? _jsx("div", { className: styles.body, children: children }) : null, showActions ? _jsx("div", { className: styles.actions, children: actions }) : null] })] }));
65
- const cardContent = link ? _jsx(Hyperlink, { children: link }) : inner;
66
- return (_jsx("div", { className: `${styles.outerContainer} ${styles[size]}`, style: outerStyle, children: _jsx("div", { className: `${styles.container} ${variantClass}`, children: cardContent }) }));
67
- }
68
- export const Card = Object.assign(CardImpl, {
69
- Meta: CardMeta,
70
- MetaRow: CardMetaRow,
71
- });
@@ -1,160 +0,0 @@
1
- .outerContainer {
2
- --width: 100%;
3
- --gap-share: 0px;
4
-
5
- flex: 0 1 calc(var(--width) - var(--gap-share));
6
- min-width: 0;
7
- box-sizing: border-box;
8
- }
9
-
10
- /* Card surface */
11
- .container {
12
- height: 100%;
13
- border-radius: var(--border-radius-sm);
14
- box-sizing: border-box;
15
-
16
- /* ✅ Restore border */
17
- border: 1px solid var(--color-border-subtle);
18
-
19
- /* Optional: ensure background sits under border */
20
- background-clip: padding-box;
21
- }
22
-
23
- /* Variants */
24
- .variantDefault {
25
- background-color: var(--card-bg-default, var(--color-bg-surface, var(--color-bg-surface-subtle)));
26
- }
27
-
28
- .variantSubtle {
29
- background-color: var(--card-bg-subtle, var(--color-bg-surface-subtle, var(--color-bg-surface)));
30
- }
31
-
32
- /* Sizes */
33
- .sm .container {
34
- padding: var(--spacing-md);
35
- }
36
-
37
- .md .container {
38
- padding: var(--spacing-lg);
39
- }
40
-
41
- .md .content,
42
- .lg .content {
43
- gap: var(--spacing-lg);
44
- }
45
-
46
- .lg .container {
47
- padding: var(--spacing-xl);
48
- }
49
-
50
- /* Layout */
51
- .inner {
52
- display: flex;
53
- gap: var(--spacing-lg);
54
- height: 100%;
55
- min-width: 0;
56
- }
57
-
58
- .innerImgLeft {
59
- flex-direction: row;
60
- }
61
-
62
- .innerImgRight {
63
- flex-direction: row-reverse;
64
- }
65
-
66
- .innerImgTop {
67
- flex-direction: column;
68
- }
69
-
70
- .media {
71
- flex: 0 0 var(--card-media-width, auto);
72
- min-width: 0;
73
- }
74
-
75
- .content {
76
- display: flex;
77
- flex: 1 1 auto;
78
- flex-direction: column;
79
- gap: var(--spacing-md);
80
- min-width: 0;
81
- }
82
-
83
- /* Header */
84
- .header {
85
- display: flex;
86
- align-items: flex-start;
87
- justify-content: space-between;
88
- gap: var(--spacing-md);
89
- min-width: 0;
90
- }
91
-
92
- .headerMeta {
93
- flex: 0 0 auto;
94
- }
95
-
96
- /* Body */
97
- .body {
98
- min-width: 0;
99
- flex: 1 1 auto;
100
- }
101
-
102
- /* Actions */
103
- .actions {
104
- display: flex;
105
- flex-wrap: wrap;
106
- gap: var(--spacing-sm);
107
- margin-top: auto;
108
- }
109
-
110
- /* Section */
111
- .section {
112
- display: flex;
113
- flex-direction: column;
114
- gap: var(--spacing-sm);
115
- }
116
-
117
- .sectionDivider {
118
- width: 100%;
119
- height: 1px;
120
- background-color: var(--color-border-subtle);
121
- }
122
-
123
- .sectionTitle {
124
- font-weight: 500;
125
- }
126
-
127
- /* Loading */
128
- .loadingList {
129
- display: flex;
130
- flex-direction: column;
131
- gap: var(--spacing-md);
132
- }
133
-
134
- .loadingRow {
135
- display: flex;
136
- flex-direction: column;
137
- gap: var(--spacing-sm);
138
- }
139
-
140
- /* Responsive */
141
- @media screen and (max-width: 767px) {
142
- .outerContainer {
143
- --width: 100%;
144
- --gap-share: 0px;
145
-
146
- flex-basis: 100%;
147
- max-width: 100%;
148
- }
149
-
150
- .inner,
151
- .innerImgLeft,
152
- .innerImgRight,
153
- .innerImgTop {
154
- flex-direction: column;
155
- }
156
-
157
- .header {
158
- flex-direction: column;
159
- }
160
- }
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import styles from './CardMeta.module.css';
3
- function getColsClass(columns) {
4
- switch (columns) {
5
- case 1:
6
- return styles.cols1;
7
- case 3:
8
- return styles.cols3;
9
- case 2:
10
- default:
11
- return styles.cols2;
12
- }
13
- }
14
- export function CardMeta({ columns = 2, className, children, ...rest }) {
15
- const colsClass = getColsClass(columns);
16
- return (_jsx("dl", { ...rest, className: [styles.grid, colsClass, className].filter(Boolean).join(' '), children: children }));
17
- }
18
- export function CardMetaRow({ label, value, className, nowrapValue, labelWidth, boldValue = false, }) {
19
- return (_jsxs("div", { className: [styles.row, className].filter(Boolean).join(' '), style: labelWidth ? { ['--label-width']: labelWidth } : undefined, children: [_jsx("dt", { className: styles.label, children: label }), _jsx("dd", { className: [
20
- styles.value,
21
- !boldValue ? styles.valueRegular : styles.valueBold,
22
- nowrapValue ? styles.nowrap : '',
23
- ]
24
- .filter(Boolean)
25
- .join(' '), children: value })] }));
26
- }
@@ -1,55 +0,0 @@
1
- .grid {
2
- margin: 0;
3
- display: grid;
4
- gap: var(--spacing-xs) var(--spacing-lg);
5
- }
6
-
7
- /* Base: single column */
8
- .cols1,
9
- .cols2,
10
- .cols3 {
11
- grid-template-columns: 1fr;
12
- }
13
-
14
- @media (min-width: 640px) {
15
- .cols2 {
16
- grid-template-columns: 1fr 1fr;
17
- }
18
- .cols3 {
19
- grid-template-columns: 1fr 1fr 1fr;
20
- }
21
- }
22
-
23
- .row {
24
- --label-width: 120px;
25
- display: grid;
26
- grid-template-columns: var(--label-width) 1fr;
27
- gap: var(--spacing-xs);
28
- align-items: baseline;
29
- min-inline-size: 0;
30
- }
31
-
32
- .label {
33
- font-size: var(--font-size-xs);
34
- color: var(--color-fg-subtle);
35
- letter-spacing: var(--letter-spacing-wide);
36
- text-transform: uppercase;
37
- margin: 0;
38
- }
39
-
40
- .value {
41
- margin: 0;
42
- font-size: var(--font-size-sm);
43
- color: var(--color-fg-default);
44
- font-weight: var(--font-weight-default);
45
- min-inline-size: 0;
46
- word-break: break-word;
47
- }
48
-
49
- .valueBold {
50
- font-weight: var(--font-weight-medium);
51
- }
52
-
53
- .nowrap {
54
- white-space: nowrap;
55
- }
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Headline } from '../../components/headline/Headline';
3
- import styles from './CardContainer.module.css';
4
- export function CardContainer({ children, headline, subheader, expand, severity, displayHeaderMarker, }) {
5
- return (_jsxs("div", { className: styles.wrapper, children: [headline && (_jsx(Headline, { marker: displayHeaderMarker, severity: severity, disableMargin: true, subheader: subheader, children: headline })), _jsx("div", { className: styles.container, style: { ['--expand']: expand ? '1' : '0' }, children: children })] }));
6
- }
@@ -1,61 +0,0 @@
1
- .wrapper {
2
- display: flex;
3
- flex-direction: column;
4
- gap: var(--spacing-md);
5
- }
6
-
7
- .container {
8
- display: flex;
9
- flex-wrap: wrap;
10
- gap: var(--spacing-md);
11
- --card-container-gap: var(--spacing-md);
12
- border-radius: var(--border-radius-sm);
13
- }
14
-
15
- .container.default {
16
- background-color: var(--card-bg-default, var(--color-bg-surface, var(--color-bg-surface-subtle)));
17
- padding: var(--spacing-lg);
18
- }
19
-
20
- .container.subtle {
21
- background-color: var(--card-bg-subtle, var(--color-bg-surface-subtle, var(--color-bg-surface)));
22
- padding: var(--spacing-lg);
23
- }
24
-
25
- .container.strong {
26
- background-color: var(
27
- --card-bg-strong,
28
- var(--color-bg-surface-strong, var(--color-surface-strong))
29
- );
30
- color: var(--card-fg-on-strong, var(--color-fg-on-strong, #ffffff));
31
- padding: var(--spacing-lg);
32
- }
33
-
34
- .container.accent1 {
35
- background-color: var(
36
- --card-bg-accent-1,
37
- var(--color-bg-accent-1, var(--color-bg-surface-subtle))
38
- );
39
- padding: var(--spacing-lg);
40
- }
41
-
42
- .container.accent2 {
43
- background-color: var(
44
- --card-bg-accent-2,
45
- var(--color-bg-accent-2, var(--color-bg-surface-subtle))
46
- );
47
- padding: var(--spacing-lg);
48
- }
49
-
50
- .container > * {
51
- min-width: 0;
52
- box-sizing: border-box;
53
- }
54
-
55
- /* Mobile: stack */
56
- @media screen and (max-width: 767px) {
57
- .container > * {
58
- flex-basis: 100% !important;
59
- max-width: 100%;
60
- }
61
- }