@dbcdk/react-components 0.0.156 → 0.0.157

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 {
@@ -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 {
@@ -17,8 +17,8 @@ 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: [
20
+ function Icon({ severity, label, customIcon, size = "md" }) {
21
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.container, "data-size": size, children: [
22
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
23
  label && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
24
24
  ] });
@@ -1,10 +1,12 @@
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';
4
5
  interface IconProps {
5
6
  severity?: Severity;
6
7
  customIcon?: ReactNode;
7
8
  label?: string;
9
+ size?: IconSize;
8
10
  }
9
- export declare function Icon({ severity, label, customIcon }: IconProps): JSX.Element;
11
+ export declare function Icon({ severity, label, customIcon, size }: IconProps): JSX.Element;
10
12
  export {};
@@ -11,8 +11,8 @@ 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: [
14
+ function Icon({ severity, label, customIcon, size = "md" }) {
15
+ return /* @__PURE__ */ jsxs("div", { className: styles.container, "data-size": size, children: [
16
16
  /* @__PURE__ */ jsx("span", { className: `${styles.icon} ${severity ? styles[severity] : ""} dbc-icon`, children: customIcon ? customIcon : severity ? SeverityIcon[severity] : null }),
17
17
  label && /* @__PURE__ */ jsx("span", { children: label })
18
18
  ] });
@@ -7,6 +7,11 @@
7
7
  font-size: var(--font-size-sm);
8
8
  }
9
9
 
10
+ .container[data-size='xs'] {
11
+ gap: 0;
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
  }
@@ -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 {
@@ -213,7 +213,6 @@
213
213
  }
214
214
 
215
215
  .sm .contextMenuOverlay {
216
- inset-block: 0;
217
216
  min-block-size: 0;
218
217
  block-size: min(100%, 32px);
219
218
  }
@@ -564,8 +563,8 @@
564
563
 
565
564
  .contextMenuTrigger {
566
565
  color: var(--color-fg-subtle);
567
- min-inline-size: 36px;
568
- min-block-size: 36px;
566
+ min-inline-size: var(--component-size-sm);
567
+ min-block-size: var(--component-size-sm);
569
568
  border-radius: var(--border-radius-rounded);
570
569
  }
571
570
 
@@ -576,21 +575,33 @@
576
575
 
577
576
  .contextMenuAnchorCell .cellValueEllipsis,
578
577
  .contextMenuAnchorCell .cellValueNoEllipsis {
579
- padding-inline-end: calc(36px + var(--spacing-sm));
578
+ padding-inline-end: calc(var(--component-size-sm) + var(--spacing-sm));
580
579
  }
581
580
 
582
581
  .contextMenuOverlay {
583
582
  position: absolute;
584
- inset-block-start: 0;
583
+ inset-block: 0;
585
584
  inset-inline-end: 0;
586
585
  display: inline-flex;
587
- align-items: center;
588
586
  justify-content: center;
589
587
  min-inline-size: 40px;
590
- block-size: min(100%, 40px);
591
588
  z-index: 3;
592
589
  }
593
590
 
591
+ /*
592
+ * Popover's own wrapper divs (.container/.triggerSlot) default to
593
+ * align-items: stretch so a trigger can fill a fixed-height form row.
594
+ * That stretches our small "sm" trigger button to the full row height
595
+ * instead of letting it size itself, so it's overridden here rather
596
+ * than in Popover.module.css to avoid affecting other Popover consumers.
597
+ * (.contextMenuOverlay itself has no align-items to override: its only
598
+ * child, Popover's .container, always sets an explicit height: 100%.)
599
+ */
600
+ .contextMenuOverlay > div,
601
+ .contextMenuOverlay > div > div {
602
+ align-items: center;
603
+ }
604
+
594
605
  .contextMenuOverlay:hover .contextMenuTrigger,
595
606
  .contextMenuOverlay:focus-within .contextMenuTrigger {
596
607
  background-color: var(--opac-bg-light);
@@ -189,7 +189,7 @@
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 {
@@ -171,8 +171,9 @@ body.dbc-app {
171
171
 
172
172
  .dbc-table--matrix th,
173
173
  .dbc-table--matrix td {
174
- padding: var(--spacing-sm) var(--spacing-md);
174
+ padding: var(--spacing-xxs) var(--spacing-sm);
175
175
  border-bottom: var(--border-width-thin) solid var(--table-border-subtle);
176
+ line-height: var(--line-height-tight);
176
177
  }
177
178
 
178
179
  .dbc-table--matrix thead th {
package/dist/styles.css CHANGED
@@ -171,8 +171,9 @@ body.dbc-app {
171
171
 
172
172
  .dbc-table--matrix th,
173
173
  .dbc-table--matrix td {
174
- padding: var(--spacing-sm) var(--spacing-md);
174
+ padding: var(--spacing-xxs) var(--spacing-sm);
175
175
  border-bottom: var(--border-width-thin) solid var(--table-border-subtle);
176
+ line-height: var(--line-height-tight);
176
177
  }
177
178
 
178
179
  .dbc-table--matrix thead th {
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.157",
4
4
  "description": "Reusable React components for DBC projects",
5
5
  "license": "ISC",
6
6
  "author": "",