@dbcdk/react-components 0.0.156 → 0.0.158

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.
@@ -114,10 +114,6 @@
114
114
  border-bottom: var(--acc-item-separator, none);
115
115
  }
116
116
 
117
- .item[data-state='open'] .headerRow {
118
- background: var(--color-bg-contextual);
119
- }
120
-
121
117
  :global(.outlined) .item[data-state='open'] .headerRow {
122
118
  box-shadow: inset 3px 0 0 var(--color-border-selected);
123
119
  }
@@ -57,7 +57,6 @@
57
57
 
58
58
  .body {
59
59
  font-size: var(--font-size-sm);
60
- line-height: var(--line-height-normal);
61
60
  }
62
61
 
63
62
  .neutral {
@@ -2,7 +2,7 @@
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  justify-content: center;
5
- gap: var(--spacing-xs);
5
+ gap: var(--spacing-xxs);
6
6
 
7
7
  font-family: var(--font-family);
8
8
  font-size: var(--font-size-sm);
@@ -214,10 +214,13 @@
214
214
  background-color: transparent;
215
215
  border-color: transparent;
216
216
  padding: var(--spacing-xxs);
217
+ color: var(--color-fg-default);
218
+ }
219
+
220
+ .button.inline:not(.sm):not(.lg):not(.xs) {
217
221
  min-block-size: unset;
218
222
  block-size: unset;
219
223
  height: unset;
220
- color: var(--color-fg-default);
221
224
  }
222
225
 
223
226
  .button.inline:hover {
@@ -70,8 +70,12 @@
70
70
  --card-padding: var(--spacing-xl);
71
71
  }
72
72
 
73
+ .sm .content {
74
+ gap: var(--spacing-xs);
75
+ }
76
+
73
77
  .md .content {
74
- gap: var(--spacing-md);
78
+ gap: var(--spacing-sm);
75
79
  }
76
80
 
77
81
  .lg .content {
@@ -464,3 +464,15 @@
464
464
  min-inline-size: calc(16px + (var(--spacing-xxs) * 2));
465
465
  min-block-size: calc(16px + (var(--spacing-xxs) * 2));
466
466
  }
467
+
468
+ .clearSlot > * {
469
+ opacity: 0;
470
+ pointer-events: none;
471
+ transition: opacity var(--transition-fast) var(--ease-standard);
472
+ }
473
+
474
+ .field:hover .clearSlot > *,
475
+ .field:focus-within .clearSlot > * {
476
+ opacity: 1;
477
+ pointer-events: auto;
478
+ }
@@ -56,9 +56,16 @@
56
56
  transform: scale(1);
57
57
  }
58
58
 
59
- /* hover (only when not disabled) */
60
- .input:not(:disabled):hover + .radio {
61
- border-color: var(--color-brand-hover);
59
+ /* hover (only when not disabled/checked) — triggers from anywhere in the
60
+ control, not just the input itself, so hovering the label or an
61
+ interactive endAdornment (e.g. a menu trigger) also highlights the radio
62
+ icon. Reads a CSS variable (rather than a hardcoded color) so an
63
+ ancestor outside this module — e.g. a Menu row that already shows its
64
+ own hover feedback — can suppress this by setting the variable; that
65
+ works across CSS-module file boundaries where class-name hashing would
66
+ otherwise prevent one module's selectors from targeting another's. */
67
+ .container:hover .radio:not(.disabled):not(.checked) {
68
+ border-color: var(--radio-hover-border-color, var(--color-brand-hover));
62
69
  }
63
70
 
64
71
  /* focus ring */
@@ -61,6 +61,7 @@ function CollapsibleHeadline({
61
61
  shape: "round",
62
62
  type: "button",
63
63
  variant: "inline",
64
+ style: { padding: "var(--spacing-2xs)" },
64
65
  "aria-expanded": isExpanded,
65
66
  "aria-controls": panelId,
66
67
  onClick: handleToggle,
@@ -55,6 +55,7 @@ function CollapsibleHeadline({
55
55
  shape: "round",
56
56
  type: "button",
57
57
  variant: "inline",
58
+ style: { padding: "var(--spacing-2xs)" },
58
59
  "aria-expanded": isExpanded,
59
60
  "aria-controls": panelId,
60
61
  onClick: handleToggle,
@@ -52,34 +52,10 @@
52
52
  display: contents;
53
53
  }
54
54
 
55
- /* CollapsibleHeadline toggle button */
56
- .toggleButton {
57
- all: unset;
58
- box-sizing: border-box;
59
- display: inline-flex;
60
- align-items: center;
61
- justify-content: center;
62
- flex: 0 0 auto;
63
- padding: var(--spacing-2xs);
64
- border-radius: var(--border-radius-sm);
65
- cursor: pointer;
66
- color: var(--color-fg-subtle);
67
- transition: color var(--transition-fast) var(--ease-standard);
68
- }
69
-
70
- .toggleButton:hover {
71
- color: var(--color-fg-default);
72
- }
73
-
74
- .toggleButton:focus-visible {
75
- outline: none;
76
- box-shadow: var(--focus-ring);
77
- }
78
-
79
55
  .toggleChevron {
80
56
  display: block;
81
- width: var(--icon-size-md);
82
- height: var(--icon-size-md);
57
+ width: 0.85em;
58
+ height: 0.85em;
83
59
  transition: transform var(--transition-normal) var(--ease-standard);
84
60
  }
85
61
 
@@ -17,11 +17,22 @@ const SeverityIcon = {
17
17
  brand: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, {}),
18
18
  accent: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, {})
19
19
  };
20
- function Icon({ severity, label, customIcon }) {
21
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles__default.default.container}`, children: [
22
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.icon} ${severity ? styles__default.default[severity] : ""} dbc-icon`, children: customIcon ? customIcon : severity ? SeverityIcon[severity] : null }),
23
- label && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
24
- ] });
20
+ function Icon({
21
+ severity,
22
+ label,
23
+ customIcon,
24
+ size = "md",
25
+ iconPosition = "start"
26
+ }) {
27
+ const iconEl = /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.icon} ${severity ? styles__default.default[severity] : ""} dbc-icon`, children: customIcon ? customIcon : severity ? SeverityIcon[severity] : null });
28
+ const labelEl = label && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label });
29
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.container, "data-size": size, children: iconPosition === "end" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
30
+ labelEl,
31
+ iconEl
32
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
33
+ iconEl,
34
+ labelEl
35
+ ] }) });
25
36
  }
26
37
 
27
38
  exports.Icon = Icon;
@@ -1,10 +1,14 @@
1
1
  import type { ReactNode, JSX } from 'react';
2
2
  import { Severity } from '../../constants/severity.types';
3
3
  export declare const SeverityIcon: Record<Severity, ReactNode>;
4
+ type IconSize = 'xs' | 'md';
5
+ type IconPosition = 'start' | 'end';
4
6
  interface IconProps {
5
7
  severity?: Severity;
6
8
  customIcon?: ReactNode;
7
9
  label?: string;
10
+ size?: IconSize;
11
+ iconPosition?: IconPosition;
8
12
  }
9
- export declare function Icon({ severity, label, customIcon }: IconProps): JSX.Element;
13
+ export declare function Icon({ severity, label, customIcon, size, iconPosition, }: IconProps): JSX.Element;
10
14
  export {};
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { Sparkles, Building2, CircleAlert, Info, CircleX, CircleCheck } from 'lucide-react';
3
3
  import styles from './Icon.module.css';
4
4
 
@@ -11,11 +11,22 @@ const SeverityIcon = {
11
11
  brand: /* @__PURE__ */ jsx(Building2, {}),
12
12
  accent: /* @__PURE__ */ jsx(Sparkles, {})
13
13
  };
14
- function Icon({ severity, label, customIcon }) {
15
- return /* @__PURE__ */ jsxs("div", { className: `${styles.container}`, children: [
16
- /* @__PURE__ */ jsx("span", { className: `${styles.icon} ${severity ? styles[severity] : ""} dbc-icon`, children: customIcon ? customIcon : severity ? SeverityIcon[severity] : null }),
17
- label && /* @__PURE__ */ jsx("span", { children: label })
18
- ] });
14
+ function Icon({
15
+ severity,
16
+ label,
17
+ customIcon,
18
+ size = "md",
19
+ iconPosition = "start"
20
+ }) {
21
+ const iconEl = /* @__PURE__ */ jsx("span", { className: `${styles.icon} ${severity ? styles[severity] : ""} dbc-icon`, children: customIcon ? customIcon : severity ? SeverityIcon[severity] : null });
22
+ const labelEl = label && /* @__PURE__ */ jsx("span", { children: label });
23
+ return /* @__PURE__ */ jsx("div", { className: styles.container, "data-size": size, children: iconPosition === "end" ? /* @__PURE__ */ jsxs(Fragment, { children: [
24
+ labelEl,
25
+ iconEl
26
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
27
+ iconEl,
28
+ labelEl
29
+ ] }) });
19
30
  }
20
31
 
21
32
  export { Icon, SeverityIcon };
@@ -7,6 +7,11 @@
7
7
  font-size: var(--font-size-sm);
8
8
  }
9
9
 
10
+ .container[data-size='xs'] {
11
+ gap: var(--spacing-2xs);
12
+ font-size: var(--font-size-xs);
13
+ }
14
+
10
15
  .icon {
11
16
  display: flex;
12
17
  }
@@ -16,6 +21,10 @@
16
21
  width: auto;
17
22
  }
18
23
 
24
+ .container[data-size='xs'] .icon svg {
25
+ height: var(--icon-size-sm);
26
+ }
27
+
19
28
  .success {
20
29
  color: var(--color-status-success);
21
30
  }
@@ -133,6 +133,18 @@
133
133
  background-color: var(--color-bg-toolbar-hover);
134
134
  }
135
135
 
136
+ /* The row already conveys hover via the background color above, covering
137
+ the whole item consistently. Suppress RadioButton's own icon hover
138
+ border here — otherwise it only lights up when the pointer happens to
139
+ be over the icon/label/endAdornment rather than anywhere in the row.
140
+ RadioButton's hashed class names can't be targeted directly from this
141
+ module, so this relies on a CSS custom property that RadioButton's own
142
+ hover rule reads — custom properties inherit through the DOM regardless
143
+ of CSS-module class hashing. */
144
+ .row:hover > .interactiveChild {
145
+ --radio-hover-border-color: var(--color-border-default);
146
+ }
147
+
136
148
  /* Focus ring: support both cases */
137
149
  .interactive:focus-visible {
138
150
  outline: none;
@@ -177,7 +177,7 @@
177
177
  /* Active underline */
178
178
  .link.active,
179
179
  .link[aria-current='page'] {
180
- color: var(--color-fg-default);
180
+ color: var(--color-brand);
181
181
  box-shadow: none;
182
182
  }
183
183
 
@@ -27,15 +27,16 @@ function Page({
27
27
  }) {
28
28
  const showContentBox = contentBox && !disableContentBox;
29
29
  const maxWidthClass = maxWidth ? styles__default.default[`maxWidth${maxWidth.charAt(0).toUpperCase()}${maxWidth.slice(1)}`] : "";
30
- const hasHeadline = Boolean(header || subheader || headerAddition);
30
+ const showHeaderContainer = Boolean(header || headerAddition);
31
+ const showHeadline = Boolean(header || subheader);
31
32
  return /* @__PURE__ */ jsxRuntime.jsxs(
32
33
  "div",
33
34
  {
34
35
  className: `${styles__default.default.container} ${containScrolling ? styles__default.default.containScrolling : styles__default.default.documentScrolling} ${disableTopPadding ? styles__default.default.disableTopPadding : ""} ${maxWidthClass}`,
35
36
  children: [
36
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.headerContainer, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.headerMain, children: [
37
+ showHeaderContainer ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.headerContainer, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.headerMain, children: [
37
38
  breadcrumbs ? /* @__PURE__ */ jsxRuntime.jsx(Breadcrumbs.Breadcrumbs, { items: breadcrumbs }) : null,
38
- hasHeadline ? /* @__PURE__ */ jsxRuntime.jsx(
39
+ showHeadline ? /* @__PURE__ */ jsxRuntime.jsx(
39
40
  Headline.Headline,
40
41
  {
41
42
  disableMargin: true,
@@ -46,8 +47,8 @@ function Page({
46
47
  addition: headerAddition,
47
48
  children: header
48
49
  }
49
- ) : null
50
- ] }) }),
50
+ ) : headerAddition
51
+ ] }) }) : null,
51
52
  /* @__PURE__ */ jsxRuntime.jsx(
52
53
  "div",
53
54
  {
@@ -21,15 +21,16 @@ function Page({
21
21
  }) {
22
22
  const showContentBox = contentBox && !disableContentBox;
23
23
  const maxWidthClass = maxWidth ? styles[`maxWidth${maxWidth.charAt(0).toUpperCase()}${maxWidth.slice(1)}`] : "";
24
- const hasHeadline = Boolean(header || subheader || headerAddition);
24
+ const showHeaderContainer = Boolean(header || headerAddition);
25
+ const showHeadline = Boolean(header || subheader);
25
26
  return /* @__PURE__ */ jsxs(
26
27
  "div",
27
28
  {
28
29
  className: `${styles.container} ${containScrolling ? styles.containScrolling : styles.documentScrolling} ${disableTopPadding ? styles.disableTopPadding : ""} ${maxWidthClass}`,
29
30
  children: [
30
- /* @__PURE__ */ jsx("div", { className: styles.headerContainer, children: /* @__PURE__ */ jsxs("div", { className: styles.headerMain, children: [
31
+ showHeaderContainer ? /* @__PURE__ */ jsx("div", { className: styles.headerContainer, children: /* @__PURE__ */ jsxs("div", { className: styles.headerMain, children: [
31
32
  breadcrumbs ? /* @__PURE__ */ jsx(Breadcrumbs, { items: breadcrumbs }) : null,
32
- hasHeadline ? /* @__PURE__ */ jsx(
33
+ showHeadline ? /* @__PURE__ */ jsx(
33
34
  Headline,
34
35
  {
35
36
  disableMargin: true,
@@ -40,8 +41,8 @@ function Page({
40
41
  addition: headerAddition,
41
42
  children: header
42
43
  }
43
- ) : null
44
- ] }) }),
44
+ ) : headerAddition
45
+ ] }) }) : null,
45
46
  /* @__PURE__ */ jsx(
46
47
  "div",
47
48
  {
@@ -215,12 +215,8 @@
215
215
  align-items: center;
216
216
 
217
217
  background: var(--color-bg-surface);
218
- padding: var(--spacing-xl) var(--spacing-xl);
219
- overflow: visible;
220
- }
221
-
222
- .vertical .content {
223
218
  padding: var(--spacing-md);
219
+ overflow: visible;
224
220
  }
225
221
 
226
222
  .footer {
@@ -48,7 +48,6 @@
48
48
  .tableRoot {
49
49
  --table-component-header-bg: var(--table-header-bg);
50
50
  --table-component-header-fg: var(--table-header-fg);
51
- --table-component-header-border: var(--table-border-header);
52
51
  --table-component-header-font-weight: var(--font-weight-medium);
53
52
  --table-component-row-bg: var(--table-row-bg);
54
53
  --table-component-row-bg-alt: var(--table-row-bg-alt);
@@ -78,7 +77,6 @@
78
77
  .embedded {
79
78
  --table-component-header-bg: transparent;
80
79
  --table-component-header-fg: var(--color-fg-subtle);
81
- --table-component-header-border: transparent;
82
80
  --table-component-header-font-weight: var(--font-weight-default);
83
81
  --table-component-row-bg: transparent;
84
82
  --table-component-row-bg-alt: color-mix(
@@ -162,13 +160,10 @@
162
160
  .headerCell {
163
161
  vertical-align: middle;
164
162
  background-color: var(--table-component-header-bg);
165
- border-block-end: 1px solid var(--table-component-header-border);
166
163
  padding-block: var(--spacing-xxs);
167
164
  padding-inline: var(--spacing-sm);
168
165
  font-size: var(--font-size-xs);
169
166
  font-weight: var(--table-component-header-font-weight);
170
- letter-spacing: var(--letter-spacing-wide);
171
- text-transform: uppercase;
172
167
  color: var(--table-component-header-fg);
173
168
  white-space: nowrap;
174
169
  }
@@ -213,7 +208,6 @@
213
208
  }
214
209
 
215
210
  .sm .contextMenuOverlay {
216
- inset-block: 0;
217
211
  min-block-size: 0;
218
212
  block-size: min(100%, 32px);
219
213
  }
@@ -396,7 +390,7 @@
396
390
  all: unset;
397
391
  display: inline-flex;
398
392
  align-items: center;
399
- gap: 4px;
393
+ gap: var(--spacing-2xs);
400
394
  min-width: 0;
401
395
  max-inline-size: 100%;
402
396
  cursor: pointer;
@@ -405,6 +399,17 @@
405
399
  padding-block: 2px;
406
400
  padding-inline: 2px;
407
401
  justify-content: flex-start;
402
+ transition: color var(--transition-fast) var(--ease-standard);
403
+ }
404
+
405
+ .thButton:hover {
406
+ color: var(--color-fg-default);
407
+ }
408
+
409
+ .thButton:focus-visible {
410
+ outline: none;
411
+ color: var(--color-fg-default);
412
+ box-shadow: inset 0 0 0 1px var(--color-border-selected);
408
413
  }
409
414
 
410
415
  .thButtonRight {
@@ -470,6 +475,10 @@
470
475
  opacity: 0.45;
471
476
  }
472
477
 
478
+ .activeSort {
479
+ color: var(--color-fg-default);
480
+ }
481
+
473
482
  .cellContent {
474
483
  display: flex;
475
484
  inline-size: 100%;
@@ -564,8 +573,8 @@
564
573
 
565
574
  .contextMenuTrigger {
566
575
  color: var(--color-fg-subtle);
567
- min-inline-size: 36px;
568
- min-block-size: 36px;
576
+ min-inline-size: var(--component-size-sm);
577
+ min-block-size: var(--component-size-sm);
569
578
  border-radius: var(--border-radius-rounded);
570
579
  }
571
580
 
@@ -576,21 +585,33 @@
576
585
 
577
586
  .contextMenuAnchorCell .cellValueEllipsis,
578
587
  .contextMenuAnchorCell .cellValueNoEllipsis {
579
- padding-inline-end: calc(36px + var(--spacing-sm));
588
+ padding-inline-end: calc(var(--component-size-sm) + var(--spacing-sm));
580
589
  }
581
590
 
582
591
  .contextMenuOverlay {
583
592
  position: absolute;
584
- inset-block-start: 0;
593
+ inset-block: 0;
585
594
  inset-inline-end: 0;
586
595
  display: inline-flex;
587
- align-items: center;
588
596
  justify-content: center;
589
597
  min-inline-size: 40px;
590
- block-size: min(100%, 40px);
591
598
  z-index: 3;
592
599
  }
593
600
 
601
+ /*
602
+ * Popover's own wrapper divs (.container/.triggerSlot) default to
603
+ * align-items: stretch so a trigger can fill a fixed-height form row.
604
+ * That stretches our small "sm" trigger button to the full row height
605
+ * instead of letting it size itself, so it's overridden here rather
606
+ * than in Popover.module.css to avoid affecting other Popover consumers.
607
+ * (.contextMenuOverlay itself has no align-items to override: its only
608
+ * child, Popover's .container, always sets an explicit height: 100%.)
609
+ */
610
+ .contextMenuOverlay > div,
611
+ .contextMenuOverlay > div > div {
612
+ align-items: center;
613
+ }
614
+
594
615
  .contextMenuOverlay:hover .contextMenuTrigger,
595
616
  .contextMenuOverlay:focus-within .contextMenuTrigger {
596
617
  background-color: var(--opac-bg-light);
@@ -21,7 +21,6 @@ function TableHeaderCell({
21
21
  const active = table_utils.isActiveSort(sortById, column.id);
22
22
  const ariaSort = table_utils.getAriaSort(column.sortable, active, sortDirection != null ? sortDirection : null);
23
23
  const align = table_classes.getAlignValue(column);
24
- const dividerClass = table_classes.getDividerClass(column);
25
24
  const alignClasses = table_classes.getHeaderAlignClasses(align);
26
25
  const handleToggleSort = () => {
27
26
  if (!column.sortable || !onSortChange) return;
@@ -31,7 +30,7 @@ function TableHeaderCell({
31
30
  return /* @__PURE__ */ jsxRuntime.jsxs(
32
31
  "th",
33
32
  {
34
- className: table_classes.cx(styles__default.default.headerCell, dividerClass),
33
+ className: styles__default.default.headerCell,
35
34
  scope: "col",
36
35
  "aria-sort": ariaSort,
37
36
  "data-align": align,
@@ -52,8 +51,8 @@ function TableHeaderCell({
52
51
  children: [
53
52
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: alignClasses.label, children: table_utils.getHeaderLabel(column.header) }),
54
53
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles__default.default.sortIndicator, "aria-hidden": "true", children: [
55
- active && sortDirection === "asc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, {}),
56
- active && sortDirection === "desc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, {}),
54
+ active && sortDirection === "asc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: styles__default.default.activeSort }),
55
+ active && sortDirection === "desc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: styles__default.default.activeSort }),
57
56
  !active && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: styles__default.default.inActiveSort })
58
57
  ] })
59
58
  ]
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { ArrowUp, ArrowDown } from 'lucide-react';
3
- import { getAlignValue, getDividerClass, getHeaderAlignClasses, cx } from '../table.classes';
3
+ import { getAlignValue, getHeaderAlignClasses } from '../table.classes';
4
4
  import styles from '../Table.module.css';
5
5
  import { isActiveSort, getAriaSort, getHeaderLabel, shouldToggleOnKey, getNextSortDirection } from '../table.utils';
6
6
 
@@ -15,7 +15,6 @@ function TableHeaderCell({
15
15
  const active = isActiveSort(sortById, column.id);
16
16
  const ariaSort = getAriaSort(column.sortable, active, sortDirection != null ? sortDirection : null);
17
17
  const align = getAlignValue(column);
18
- const dividerClass = getDividerClass(column);
19
18
  const alignClasses = getHeaderAlignClasses(align);
20
19
  const handleToggleSort = () => {
21
20
  if (!column.sortable || !onSortChange) return;
@@ -25,7 +24,7 @@ function TableHeaderCell({
25
24
  return /* @__PURE__ */ jsxs(
26
25
  "th",
27
26
  {
28
- className: cx(styles.headerCell, dividerClass),
27
+ className: styles.headerCell,
29
28
  scope: "col",
30
29
  "aria-sort": ariaSort,
31
30
  "data-align": align,
@@ -46,8 +45,8 @@ function TableHeaderCell({
46
45
  children: [
47
46
  /* @__PURE__ */ jsx("span", { className: alignClasses.label, children: getHeaderLabel(column.header) }),
48
47
  /* @__PURE__ */ jsxs("span", { className: styles.sortIndicator, "aria-hidden": "true", children: [
49
- active && sortDirection === "asc" && /* @__PURE__ */ jsx(ArrowUp, {}),
50
- active && sortDirection === "desc" && /* @__PURE__ */ jsx(ArrowDown, {}),
48
+ active && sortDirection === "asc" && /* @__PURE__ */ jsx(ArrowUp, { className: styles.activeSort }),
49
+ active && sortDirection === "desc" && /* @__PURE__ */ jsx(ArrowDown, { className: styles.activeSort }),
51
50
  !active && /* @__PURE__ */ jsx(ArrowDown, { className: styles.inActiveSort })
52
51
  ] })
53
52
  ]
@@ -184,12 +184,12 @@
184
184
  ========================= */
185
185
 
186
186
  .tabs.outlined {
187
- gap: var(--spacing-lg);
187
+ gap: var(--spacing-md);
188
188
  }
189
189
 
190
190
  .headerContainerOutlined {
191
191
  padding-block-start: var(--spacing-sm);
192
- padding-block-end: var(--spacing-sm);
192
+ padding-block-end: 0;
193
193
  }
194
194
 
195
195
  .headerContainerOutlined.disableTopPadding {
@@ -89,6 +89,7 @@ body.dbc-app {
89
89
  .dbc-table th,
90
90
  .dbc-table td {
91
91
  padding-block: var(--spacing-xxs);
92
+ padding-inline: var(--spacing-xxs);
92
93
  vertical-align: baseline;
93
94
  }
94
95
 
@@ -101,9 +102,7 @@ body.dbc-app {
101
102
  font-size: var(--font-size-xs);
102
103
  color: var(--color-fg-subtle);
103
104
  letter-spacing: var(--letter-spacing-wide);
104
- text-transform: uppercase;
105
105
  font-weight: var(--font-weight-default);
106
- padding-right: var(--spacing-lg);
107
106
  }
108
107
 
109
108
  .dbc-table td {
@@ -115,8 +114,37 @@ body.dbc-app {
115
114
  word-break: break-word;
116
115
  }
117
116
 
118
- .dbc-table--hover tbody tr:hover {
117
+ /* Larger vertical padding (default is --spacing-xxs) */
118
+ .dbc-table--md th,
119
+ .dbc-table--md td {
120
+ padding-block: var(--spacing-xs);
121
+ }
122
+
123
+ /* --hover can go on the <table> (every row hovers) or directly on a <tr>
124
+ (opt in only specific rows, leaving the rest unaffected). */
125
+ .dbc-table--hover tbody tr:hover,
126
+ tr.dbc-table--hover:hover {
119
127
  background-color: var(--color-bg-contextual);
128
+ cursor: pointer;
129
+ }
130
+
131
+ /* Round the hovered row's leading/trailing edge (tr itself can't take a
132
+ border-radius reliably in table layout) — same token as Menu.item's
133
+ hover background. */
134
+ .dbc-table--hover tbody tr:hover th:first-child,
135
+ .dbc-table--hover tbody tr:hover td:first-child,
136
+ tr.dbc-table--hover:hover th:first-child,
137
+ tr.dbc-table--hover:hover td:first-child {
138
+ border-top-left-radius: var(--border-radius-md);
139
+ border-bottom-left-radius: var(--border-radius-md);
140
+ }
141
+
142
+ .dbc-table--hover tbody tr:hover th:last-child,
143
+ .dbc-table--hover tbody tr:hover td:last-child,
144
+ tr.dbc-table--hover:hover th:last-child,
145
+ tr.dbc-table--hover:hover td:last-child {
146
+ border-top-right-radius: var(--border-radius-md);
147
+ border-bottom-right-radius: var(--border-radius-md);
120
148
  }
121
149
 
122
150
  .dbc-table--clickableRow tbody tr:hover {
@@ -128,7 +156,8 @@ body.dbc-app {
128
156
  background-color: var(--table-row-bg-alt);
129
157
  }
130
158
 
131
- .dbc-table--striped.dbc-table--hover tbody tr:hover {
159
+ .dbc-table--striped.dbc-table--hover tbody tr:hover,
160
+ .dbc-table--striped tr.dbc-table--hover:hover {
132
161
  background-color: var(--table-row-bg-hover);
133
162
  }
134
163
 
@@ -162,65 +191,13 @@ body.dbc-app {
162
191
  vertical-align: middle;
163
192
  }
164
193
 
165
- /* Matrix / comparison table */
166
-
167
- .dbc-table--matrix {
168
- width: 100%;
169
- border-collapse: collapse;
170
- }
171
-
172
- .dbc-table--matrix th,
173
- .dbc-table--matrix td {
174
- padding: var(--spacing-sm) var(--spacing-md);
175
- border-bottom: var(--border-width-thin) solid var(--table-border-subtle);
176
- }
177
-
178
- .dbc-table--matrix thead th {
179
- color: var(--table-header-fg);
180
- background-color: transparent;
181
- font-size: var(--font-size-xs);
182
- font-weight: var(--font-weight-medium);
183
- letter-spacing: var(--letter-spacing-wide);
184
- text-transform: uppercase;
185
- }
186
-
187
- .dbc-table--matrix tbody th {
188
- color: var(--color-fg-default);
189
- font-size: var(--font-size-sm);
190
- font-weight: var(--font-weight-medium);
191
- letter-spacing: normal;
192
- text-transform: none;
193
- }
194
-
195
- .dbc-table--matrix td {
196
- color: var(--table-cell-fg);
197
- text-align: right;
198
- font-variant-numeric: tabular-nums;
199
- white-space: nowrap;
200
- }
201
-
202
- .dbc-table--matrix th:not(:first-child) {
194
+ /* Per-cell text alignment. Apply directly to a th/td to right-align that
195
+ column's header/content. */
196
+ .dbc-table th.dbc-table--align-right,
197
+ .dbc-table td.dbc-table--align-right {
203
198
  text-align: right;
204
199
  }
205
200
 
206
- .dbc-table--matrix tr:last-child th,
207
- .dbc-table--matrix tr:last-child td {
208
- border-bottom: 0;
209
- }
210
-
211
- .dbc-table--matrix-group-header th {
212
- border-bottom: 0;
213
- text-align: center;
214
- }
215
-
216
- .dbc-table--matrix-group-header th:first-child {
217
- text-align: left;
218
- }
219
-
220
- .dbc-table--matrix-current {
221
- background-color: color-mix(in srgb, var(--color-bg-selected) 45%, var(--color-bg-surface));
222
- }
223
-
224
201
  /* ==========================================================================
225
202
  Text / utility classes
226
203
  ========================================================================== */
@@ -240,7 +240,7 @@ html {
240
240
  --button-fg-primary: var(--color-fg-on-brand);
241
241
 
242
242
  /* Tables */
243
- --table-header-bg: light-dark(#f5f6f8, #182230);
243
+ --table-header-bg: light-dark(#f8f9fb, #1b2533);
244
244
  --table-row-bg: light-dark(#ffffff, #111827);
245
245
  --table-row-bg-alt: light-dark(#f7f9fc, #141d2a);
246
246
  --table-row-bg-hover: light-dark(#eef2f7, #172131);
@@ -248,10 +248,9 @@ html {
248
248
  --table-row-bg-selected-hover: var(--dbc-blue-150);
249
249
 
250
250
  --table-border-subtle: light-dark(#eef1f4, rgba(255, 255, 255, 0.08));
251
- --table-border-header: light-dark(#e2e6ea, rgba(255, 255, 255, 0.12));
252
251
  --table-divider: light-dark(#e8ebef, rgba(255, 255, 255, 0.08));
253
252
 
254
- --table-header-fg: var(--color-fg-muted);
253
+ --table-header-fg: var(--color-fg-subtle);
255
254
  --table-cell-fg: var(--color-fg-default);
256
255
 
257
256
  /* ==========================================================================
package/dist/styles.css CHANGED
@@ -89,6 +89,7 @@ body.dbc-app {
89
89
  .dbc-table th,
90
90
  .dbc-table td {
91
91
  padding-block: var(--spacing-xxs);
92
+ padding-inline: var(--spacing-xxs);
92
93
  vertical-align: baseline;
93
94
  }
94
95
 
@@ -101,9 +102,7 @@ body.dbc-app {
101
102
  font-size: var(--font-size-xs);
102
103
  color: var(--color-fg-subtle);
103
104
  letter-spacing: var(--letter-spacing-wide);
104
- text-transform: uppercase;
105
105
  font-weight: var(--font-weight-default);
106
- padding-right: var(--spacing-lg);
107
106
  }
108
107
 
109
108
  .dbc-table td {
@@ -115,8 +114,37 @@ body.dbc-app {
115
114
  word-break: break-word;
116
115
  }
117
116
 
118
- .dbc-table--hover tbody tr:hover {
117
+ /* Larger vertical padding (default is --spacing-xxs) */
118
+ .dbc-table--md th,
119
+ .dbc-table--md td {
120
+ padding-block: var(--spacing-xs);
121
+ }
122
+
123
+ /* --hover can go on the <table> (every row hovers) or directly on a <tr>
124
+ (opt in only specific rows, leaving the rest unaffected). */
125
+ .dbc-table--hover tbody tr:hover,
126
+ tr.dbc-table--hover:hover {
119
127
  background-color: var(--color-bg-contextual);
128
+ cursor: pointer;
129
+ }
130
+
131
+ /* Round the hovered row's leading/trailing edge (tr itself can't take a
132
+ border-radius reliably in table layout) — same token as Menu.item's
133
+ hover background. */
134
+ .dbc-table--hover tbody tr:hover th:first-child,
135
+ .dbc-table--hover tbody tr:hover td:first-child,
136
+ tr.dbc-table--hover:hover th:first-child,
137
+ tr.dbc-table--hover:hover td:first-child {
138
+ border-top-left-radius: var(--border-radius-md);
139
+ border-bottom-left-radius: var(--border-radius-md);
140
+ }
141
+
142
+ .dbc-table--hover tbody tr:hover th:last-child,
143
+ .dbc-table--hover tbody tr:hover td:last-child,
144
+ tr.dbc-table--hover:hover th:last-child,
145
+ tr.dbc-table--hover:hover td:last-child {
146
+ border-top-right-radius: var(--border-radius-md);
147
+ border-bottom-right-radius: var(--border-radius-md);
120
148
  }
121
149
 
122
150
  .dbc-table--clickableRow tbody tr:hover {
@@ -128,7 +156,8 @@ body.dbc-app {
128
156
  background-color: var(--table-row-bg-alt);
129
157
  }
130
158
 
131
- .dbc-table--striped.dbc-table--hover tbody tr:hover {
159
+ .dbc-table--striped.dbc-table--hover tbody tr:hover,
160
+ .dbc-table--striped tr.dbc-table--hover:hover {
132
161
  background-color: var(--table-row-bg-hover);
133
162
  }
134
163
 
@@ -162,65 +191,13 @@ body.dbc-app {
162
191
  vertical-align: middle;
163
192
  }
164
193
 
165
- /* Matrix / comparison table */
166
-
167
- .dbc-table--matrix {
168
- width: 100%;
169
- border-collapse: collapse;
170
- }
171
-
172
- .dbc-table--matrix th,
173
- .dbc-table--matrix td {
174
- padding: var(--spacing-sm) var(--spacing-md);
175
- border-bottom: var(--border-width-thin) solid var(--table-border-subtle);
176
- }
177
-
178
- .dbc-table--matrix thead th {
179
- color: var(--table-header-fg);
180
- background-color: transparent;
181
- font-size: var(--font-size-xs);
182
- font-weight: var(--font-weight-medium);
183
- letter-spacing: var(--letter-spacing-wide);
184
- text-transform: uppercase;
185
- }
186
-
187
- .dbc-table--matrix tbody th {
188
- color: var(--color-fg-default);
189
- font-size: var(--font-size-sm);
190
- font-weight: var(--font-weight-medium);
191
- letter-spacing: normal;
192
- text-transform: none;
193
- }
194
-
195
- .dbc-table--matrix td {
196
- color: var(--table-cell-fg);
197
- text-align: right;
198
- font-variant-numeric: tabular-nums;
199
- white-space: nowrap;
200
- }
201
-
202
- .dbc-table--matrix th:not(:first-child) {
194
+ /* Per-cell text alignment. Apply directly to a th/td to right-align that
195
+ column's header/content. */
196
+ .dbc-table th.dbc-table--align-right,
197
+ .dbc-table td.dbc-table--align-right {
203
198
  text-align: right;
204
199
  }
205
200
 
206
- .dbc-table--matrix tr:last-child th,
207
- .dbc-table--matrix tr:last-child td {
208
- border-bottom: 0;
209
- }
210
-
211
- .dbc-table--matrix-group-header th {
212
- border-bottom: 0;
213
- text-align: center;
214
- }
215
-
216
- .dbc-table--matrix-group-header th:first-child {
217
- text-align: left;
218
- }
219
-
220
- .dbc-table--matrix-current {
221
- background-color: color-mix(in srgb, var(--color-bg-selected) 45%, var(--color-bg-surface));
222
- }
223
-
224
201
  /* ==========================================================================
225
202
  Text / utility classes
226
203
  ========================================================================== */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbcdk/react-components",
3
- "version": "0.0.156",
3
+ "version": "0.0.158",
4
4
  "description": "Reusable React components for DBC projects",
5
5
  "license": "ISC",
6
6
  "author": "",