@dbcdk/react-components 0.0.88 → 0.0.89

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 (65) hide show
  1. package/dist/components/accordion/Accordion.d.ts +1 -0
  2. package/dist/components/accordion/components/AccordionRow.js +1 -1
  3. package/dist/components/button/Button.js +8 -1
  4. package/dist/components/button/Button.module.css +2 -1
  5. package/dist/components/card/Card.d.ts +1 -5
  6. package/dist/components/card/Card.js +29 -4
  7. package/dist/components/card/Card.module.css +85 -98
  8. package/dist/components/card-container/CardContainer.d.ts +2 -1
  9. package/dist/components/card-container/CardContainer.js +2 -2
  10. package/dist/components/card-container/CardContainer.module.css +10 -9
  11. package/dist/components/clear-button/ClearButton.d.ts +2 -1
  12. package/dist/components/clear-button/ClearButton.js +6 -2
  13. package/dist/components/clear-button/ClearButton.module.css +6 -0
  14. package/dist/components/divider/Divider.d.ts +5 -0
  15. package/dist/components/divider/Divider.js +12 -0
  16. package/dist/components/forms/input/Input.d.ts +2 -1
  17. package/dist/components/forms/input/Input.js +6 -2
  18. package/dist/components/forms/input/Input.module.css +32 -0
  19. package/dist/components/forms/select/Select.d.ts +2 -1
  20. package/dist/components/forms/select/Select.js +2 -2
  21. package/dist/components/forms/typeahead/Typeahead.d.ts +2 -1
  22. package/dist/components/forms/typeahead/Typeahead.js +180 -118
  23. package/dist/components/forms/typeahead/Typeahead.module.css +4 -0
  24. package/dist/components/grid/Grid.d.ts +21 -0
  25. package/dist/components/grid/Grid.js +21 -0
  26. package/dist/components/grid/Grid.module.css +20 -0
  27. package/dist/components/headline/Headline.d.ts +3 -3
  28. package/dist/components/headline/Headline.js +6 -6
  29. package/dist/components/headline/Headline.module.css +25 -6
  30. package/dist/components/nav-bar/NavBar.module.css +6 -2
  31. package/dist/components/overlay/modal/Modal.d.ts +2 -1
  32. package/dist/components/overlay/modal/Modal.js +5 -3
  33. package/dist/components/overlay/modal/provider/ModalProvider.js +2 -0
  34. package/dist/components/overlay/side-panel/SidePanel.d.ts +2 -1
  35. package/dist/components/overlay/side-panel/SidePanel.js +2 -2
  36. package/dist/components/page/Page.d.ts +5 -1
  37. package/dist/components/page/Page.js +6 -2
  38. package/dist/components/page/Page.module.css +54 -4
  39. package/dist/components/panel/Panel.d.ts +2 -1
  40. package/dist/components/panel/Panel.js +2 -2
  41. package/dist/components/stack/Stack.d.ts +16 -0
  42. package/dist/components/stack/Stack.js +19 -0
  43. package/dist/components/state-page/StatePage.d.ts +2 -1
  44. package/dist/components/state-page/StatePage.js +2 -2
  45. package/dist/components/table/Table.d.ts +1 -1
  46. package/dist/components/table/Table.js +22 -4
  47. package/dist/components/table/Table.module.css +14 -0
  48. package/dist/components/table/Table.types.d.ts +1 -0
  49. package/dist/components/tabs/Tabs.d.ts +3 -1
  50. package/dist/components/tabs/Tabs.js +4 -2
  51. package/dist/components/tabs/Tabs.module.css +4 -0
  52. package/dist/components/theme-button/ThemeButton.d.ts +1 -0
  53. package/dist/components/theme-button/ThemeButton.js +5 -1
  54. package/dist/components/toast/Toast.d.ts +2 -1
  55. package/dist/components/toast/Toast.js +2 -2
  56. package/dist/hooks/useViewportFill.d.ts +2 -6
  57. package/dist/hooks/useViewportFill.js +29 -24
  58. package/dist/index.d.ts +4 -0
  59. package/dist/index.js +4 -0
  60. package/dist/styles/css-helper-classes/flex.css +12 -0
  61. package/dist/styles/css-helper-classes/spacing.css +5 -0
  62. package/dist/styles/styles.css +154 -66
  63. package/dist/styles/themes/dbc/colors.css +10 -0
  64. package/dist/styles.css +154 -66
  65. package/package.json +1 -1
package/dist/styles.css CHANGED
@@ -8,12 +8,14 @@
8
8
  font-weight: 400;
9
9
  font-style: normal;
10
10
  }
11
+
11
12
  @font-face {
12
13
  font-family: 'Roboto';
13
14
  src: url('./fonts/Roboto/Roboto-Medium.ttf') format('truetype');
14
15
  font-weight: 500;
15
16
  font-style: normal;
16
17
  }
18
+
17
19
  @font-face {
18
20
  font-family: 'Roboto';
19
21
  src: url('./fonts/Roboto/Roboto-Bold.ttf') format('truetype');
@@ -62,26 +64,29 @@ body.dbc-app {
62
64
  font-family: monospace;
63
65
  }
64
66
 
67
+ /* ==========================================================================
68
+ Tables
69
+ ========================================================================== */
70
+
65
71
  .dbc-table {
66
72
  --card-label-width: 260px;
73
+
67
74
  border-collapse: collapse;
68
75
  font-size: var(--font-size-sm);
69
76
  line-height: var(--line-height-normal);
70
77
  }
71
78
 
72
- .dbc-table--hover tr:hover {
73
- background-color: var(--color-bg-contextual);
74
- }
75
-
76
- .dbc-table tr + tr th,
77
- .dbc-table tr + tr td {
79
+ /* Default compact table cell padding.
80
+ This applies to the first row too, avoiding uneven first-row spacing. */
81
+ .dbc-table th,
82
+ .dbc-table td {
78
83
  padding-block: var(--spacing-xxs);
84
+ vertical-align: baseline;
79
85
  }
80
86
 
81
87
  .dbc-table th {
82
88
  white-space: nowrap;
83
89
  text-align: left;
84
- vertical-align: top;
85
90
  max-width: var(--card-label-width);
86
91
  overflow: hidden;
87
92
  text-overflow: ellipsis;
@@ -93,29 +98,120 @@ body.dbc-app {
93
98
  padding-right: var(--spacing-lg);
94
99
  }
95
100
 
96
- /* VALUES (td) → match .metaValue */
97
101
  .dbc-table td {
98
- vertical-align: top;
99
102
  min-width: 0;
100
-
101
- margin: 0; /* harmless on td, keeps parity with metaValue */
103
+ margin: 0;
102
104
  font-size: var(--font-size-sm);
103
105
  color: var(--color-fg-default);
104
106
  font-weight: var(--font-weight-default);
105
-
106
107
  word-break: break-word;
107
108
  }
108
109
 
109
- /* Optional: baseline alignment closer to metaRow */
110
- .dbc-table th,
111
- .dbc-table td {
112
- vertical-align: baseline;
110
+ .dbc-table--hover tr:hover {
111
+ background-color: var(--color-bg-contextual);
112
+ }
113
+
114
+ .dbc-table--striped tbody tr:nth-child(even) {
115
+ background-color: var(--table-row-bg-alt);
116
+ }
117
+
118
+ .dbc-table--striped.dbc-table--hover tbody tr:hover {
119
+ background-color: var(--table-row-bg-hover);
113
120
  }
114
121
 
115
122
  .dbc-full-width {
116
123
  width: 100%;
117
124
  }
118
125
 
126
+ /* Bordered table */
127
+
128
+ .dbc-table--bordered {
129
+ width: auto;
130
+ border: var(--border-width-thin) solid var(--color-border-default);
131
+ border-collapse: collapse;
132
+ }
133
+
134
+ .dbc-table--bordered th,
135
+ .dbc-table--bordered td {
136
+ border: var(--border-width-thin) solid var(--color-border-default);
137
+ padding: var(--spacing-xs) var(--spacing-sm);
138
+ }
139
+
140
+ .dbc-table--bordered thead th {
141
+ background-color: var(--color-bg-surface);
142
+ }
143
+
144
+ /* Alignment modifier */
145
+
146
+ .dbc-table--align-middle,
147
+ .dbc-table--align-middle th,
148
+ .dbc-table--align-middle td {
149
+ vertical-align: middle;
150
+ }
151
+
152
+ /* Matrix / comparison table */
153
+
154
+ .dbc-table--matrix {
155
+ width: 100%;
156
+ border-collapse: collapse;
157
+ }
158
+
159
+ .dbc-table--matrix th,
160
+ .dbc-table--matrix td {
161
+ padding: var(--spacing-sm) var(--spacing-md);
162
+ border-bottom: var(--border-width-thin) solid var(--table-border-subtle);
163
+ }
164
+
165
+ .dbc-table--matrix thead th {
166
+ color: var(--table-header-fg);
167
+ background-color: transparent;
168
+ font-size: var(--font-size-xs);
169
+ font-weight: var(--font-weight-medium);
170
+ letter-spacing: var(--letter-spacing-wide);
171
+ text-transform: uppercase;
172
+ }
173
+
174
+ .dbc-table--matrix tbody th {
175
+ color: var(--color-fg-default);
176
+ font-size: var(--font-size-sm);
177
+ font-weight: var(--font-weight-medium);
178
+ letter-spacing: normal;
179
+ text-transform: none;
180
+ }
181
+
182
+ .dbc-table--matrix td {
183
+ color: var(--table-cell-fg);
184
+ text-align: right;
185
+ font-variant-numeric: tabular-nums;
186
+ white-space: nowrap;
187
+ }
188
+
189
+ .dbc-table--matrix th:not(:first-child) {
190
+ text-align: right;
191
+ }
192
+
193
+ .dbc-table--matrix tr:last-child th,
194
+ .dbc-table--matrix tr:last-child td {
195
+ border-bottom: 0;
196
+ }
197
+
198
+ .dbc-table--matrix-group-header th {
199
+ border-bottom: 0;
200
+ text-align: center;
201
+ }
202
+
203
+ .dbc-table--matrix-group-header th:first-child {
204
+ text-align: left;
205
+ }
206
+
207
+ .dbc-table--matrix-current {
208
+ background-color: color-mix(in srgb, var(--color-bg-selected) 45%, var(--color-bg-surface));
209
+ }
210
+
211
+ /* ==========================================================================
212
+ Text / utility classes
213
+ ========================================================================== */
214
+
119
215
  .dbc-highlight {
120
216
  color: var(--color-highlight-fg, inherit);
121
217
  background-color: var(--color-highlight-bg, var(--color-status-warning-bg));
@@ -141,34 +237,12 @@ body.dbc-app {
141
237
  font-weight: var(--font-weight-medium);
142
238
  }
143
239
 
144
- .dbc-table--bordered {
145
- width: auto;
146
- border: var(--border-width-thin) solid var(--color-border-default);
147
- border-collapse: collapse;
148
- }
149
-
150
- .dbc-table--bordered th,
151
- .dbc-table--bordered td {
152
- border: var(--border-width-thin) solid var(--color-border-default);
153
- padding: var(--spacing-xs) var(--spacing-sm);
154
- }
155
-
156
- .dbc-table--bordered thead th {
157
- background-color: var(--color-bg-surface);
158
- }
159
-
160
- .dbc-table--align-middle {
161
- vertical-align: middle;
162
- th {
163
- vertical-align: middle;
164
- }
165
- td {
166
- vertical-align: middle;
167
- }
168
- }
240
+ /* ==========================================================================
241
+ Layout utilities
242
+ ========================================================================== */
169
243
 
170
244
  @media screen and (min-height: 400px) {
171
- .body.dbc-app {
245
+ body.dbc-app {
172
246
  overflow: hidden;
173
247
  }
174
248
  }
@@ -181,15 +255,34 @@ body.dbc-app {
181
255
  }
182
256
 
183
257
  .hideScrollBar {
184
- scrollbar-width: none; /* Firefox */
258
+ scrollbar-width: none;
185
259
  }
260
+
186
261
  .hideScrollBar::-webkit-scrollbar {
187
- display: none; /* Chrome, Safari, Opera */
262
+ display: none;
188
263
  }
189
264
 
190
- /* Apply globally */
265
+ .fitContent {
266
+ white-space: nowrap !important;
267
+ width: 1% !important;
268
+ min-width: 1% !important;
269
+ max-width: 1% !important;
270
+ }
271
+
272
+ .dbc-full-height {
273
+ height: 100%;
274
+ }
275
+
276
+ .dbc-offset-height {
277
+ transform: translateY(-8vh);
278
+ }
279
+
280
+ /* ==========================================================================
281
+ Scrollbars
282
+ ========================================================================== */
283
+
191
284
  ::-webkit-scrollbar {
192
- width: 10px; /* or thinner: 6px */
285
+ width: 10px;
193
286
  }
194
287
 
195
288
  ::-webkit-scrollbar-track {
@@ -198,14 +291,18 @@ body.dbc-app {
198
291
 
199
292
  ::-webkit-scrollbar-thumb {
200
293
  background-color: var(--color-border-strong);
201
- border-radius: 4px; /* rounded for modern look */
202
- border: 2px solid var(--color-bg-surface); /* creates padding effect */
294
+ border-radius: 4px;
295
+ border: 2px solid var(--color-bg-surface);
203
296
  }
204
297
 
205
298
  ::-webkit-scrollbar-thumb:hover {
206
299
  background-color: var(--color-fg-subtle);
207
300
  }
208
301
 
302
+ /* ==========================================================================
303
+ Animations
304
+ ========================================================================== */
305
+
209
306
  .animate--expand {
210
307
  animation: expand 0.15s ease-in-out forwards;
211
308
  }
@@ -214,26 +311,16 @@ body.dbc-app {
214
311
  animation: collapse 0.15s ease-in-out forwards;
215
312
  }
216
313
 
217
- .fitContent {
218
- white-space: nowrap !important;
219
- width: 1% !important;
220
- min-width: 1% !important;
221
- max-width: 1% !important;
222
- }
223
-
224
- .dbc-full-height {
225
- height: 100%;
226
- }
227
-
228
- .dbc-offset-height {
229
- transform: translateY(-8vh);
314
+ .spin {
315
+ display: inline-block;
316
+ animation: spin 2s linear infinite;
230
317
  }
231
318
 
232
- /* Animations */
233
319
  @keyframes expand {
234
320
  0% {
235
321
  max-height: 0;
236
322
  }
323
+
237
324
  100% {
238
325
  max-height: 100vh;
239
326
  }
@@ -243,6 +330,7 @@ body.dbc-app {
243
330
  0% {
244
331
  max-height: 100vh;
245
332
  }
333
+
246
334
  100% {
247
335
  max-height: 0;
248
336
  }
@@ -252,15 +340,15 @@ body.dbc-app {
252
340
  from {
253
341
  transform: rotate(0deg);
254
342
  }
343
+
255
344
  to {
256
345
  transform: rotate(360deg);
257
346
  }
258
347
  }
259
348
 
260
- .spin {
261
- display: inline-block;
262
- animation: spin 2s linear infinite;
263
- }
349
+ /* ==========================================================================
350
+ Accessibility
351
+ ========================================================================== */
264
352
 
265
353
  .srOnly {
266
354
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbcdk/react-components",
3
- "version": "0.0.88",
3
+ "version": "0.0.89",
4
4
  "description": "Reusable React components for DBC projects",
5
5
  "license": "ISC",
6
6
  "author": "",