@dbcdk/react-components 0.0.143 → 0.0.144

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.
@@ -14,7 +14,10 @@ function AttributeChip({
14
14
  loading
15
15
  }) {
16
16
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles__default.default.container} ${styles__default.default[size]}`, "aria-busy": loading, children: [
17
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.label, children: label }),
17
+ label ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
18
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.label, children: label }),
19
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.separator, "aria-hidden": "true", children: "|" })
20
+ ] }) : null,
18
21
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.value, children: loading ? "\u2014" : value == null ? void 0 : value.toString() })
19
22
  ] });
20
23
  }
@@ -1,6 +1,6 @@
1
1
  import type { JSX } from 'react';
2
2
  interface AttributeChipProps {
3
- label: string;
3
+ label?: string;
4
4
  value: string | number | boolean;
5
5
  loading?: boolean;
6
6
  size?: 'sm' | 'md' | 'lg';
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import styles from './AttributeChip.module.css';
3
3
 
4
4
  function AttributeChip({
@@ -8,7 +8,10 @@ function AttributeChip({
8
8
  loading
9
9
  }) {
10
10
  return /* @__PURE__ */ jsxs("div", { className: `${styles.container} ${styles[size]}`, "aria-busy": loading, children: [
11
- /* @__PURE__ */ jsx("span", { className: styles.label, children: label }),
11
+ label ? /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ /* @__PURE__ */ jsx("span", { className: styles.label, children: label }),
13
+ /* @__PURE__ */ jsx("span", { className: styles.separator, "aria-hidden": "true", children: "|" })
14
+ ] }) : null,
12
15
  /* @__PURE__ */ jsx("span", { className: styles.value, children: loading ? "\u2014" : value == null ? void 0 : value.toString() })
13
16
  ] });
14
17
  }
@@ -4,62 +4,49 @@
4
4
  white-space: nowrap;
5
5
  border-radius: var(--border-radius-default);
6
6
  border: 1px solid var(--color-border-subtle);
7
- overflow: hidden;
7
+ background: var(--color-neutral);
8
+ color: var(--color-fg-default);
8
9
  font-family: var(--font-family);
9
10
  font-weight: var(--font-weight-default);
10
11
  line-height: var(--line-height-tight);
12
+ padding-inline: var(--spacing-sm);
11
13
  }
12
14
 
13
15
  .label,
14
16
  .value {
15
17
  display: inline-flex;
16
18
  align-items: center;
17
- height: 100%;
18
- padding-inline: var(--spacing-sm);
19
19
  }
20
20
 
21
21
  .label {
22
- background: var(--color-bg-contextual);
22
+ color: var(--color-fg-subtle);
23
+ font-size: 0.85em;
23
24
  }
24
25
 
25
26
  .value {
26
- background: var(--color-bg-contextual-subtle);
27
- color: var(--color-fg-default);
28
27
  font-weight: var(--font-weight-medium);
29
28
  }
30
29
 
31
- /* Optional: separator between label and value */
32
- .value {
33
- border-left: 1px solid var(--color-border-subtle);
30
+ .separator {
31
+ color: var(--color-border-default);
32
+ margin-inline: var(--spacing-xxs);
34
33
  }
35
34
 
36
35
  /* Sizes */
37
36
  .sm {
38
37
  height: var(--component-size-xs);
39
38
  font-size: var(--font-size-xs);
39
+ padding-inline: var(--spacing-xs);
40
40
  }
41
41
 
42
42
  .md {
43
43
  height: var(--component-size-sm);
44
44
  font-size: var(--font-size-sm);
45
+ padding-inline: var(--spacing-sm);
45
46
  }
46
47
 
47
48
  .lg {
48
49
  height: var(--component-size-md);
49
50
  font-size: var(--font-size-md);
50
- }
51
-
52
- .sm .label,
53
- .sm .value {
54
- padding-inline: var(--spacing-xs);
55
- }
56
-
57
- .md .label,
58
- .md .value {
59
- padding-inline: var(--spacing-sm);
60
- }
61
-
62
- .lg .label,
63
- .lg .value {
64
51
  padding-inline: var(--spacing-md);
65
52
  }
@@ -258,6 +258,10 @@ body.dbc-app {
258
258
  font-weight: var(--font-weight-medium);
259
259
  }
260
260
 
261
+ .dbc-bold-text {
262
+ font-weight: var(--font-weight-bold);
263
+ }
264
+
261
265
  /* ==========================================================================
262
266
  Layout utilities
263
267
  ========================================================================== */
package/dist/styles.css CHANGED
@@ -258,6 +258,10 @@ body.dbc-app {
258
258
  font-weight: var(--font-weight-medium);
259
259
  }
260
260
 
261
+ .dbc-bold-text {
262
+ font-weight: var(--font-weight-bold);
263
+ }
264
+
261
265
  /* ==========================================================================
262
266
  Layout utilities
263
267
  ========================================================================== */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbcdk/react-components",
3
- "version": "0.0.143",
3
+ "version": "0.0.144",
4
4
  "description": "Reusable React components for DBC projects",
5
5
  "license": "ISC",
6
6
  "author": "",