@dbcdk/react-components 0.0.115 → 0.0.117

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.
@@ -356,7 +356,11 @@ const DateTimePicker = react.forwardRef(function DateTimePicker2({
356
356
  return /* @__PURE__ */ jsxRuntime.jsx(
357
357
  "div",
358
358
  {
359
- onClick: toggle,
359
+ onClick: (e) => {
360
+ const target = e.target;
361
+ if (target == null ? void 0 : target.closest('[data-input-container-label-action="true"]')) return;
362
+ toggle(e);
363
+ },
360
364
  className: [styles__default.default.triggerWrap, fullWidth ? styles__default.default.triggerWrapFullWidth : ""].filter(Boolean).join(" "),
361
365
  children: /* @__PURE__ */ jsxRuntime.jsx(
362
366
  Input.Input,
@@ -350,7 +350,11 @@ const DateTimePicker = forwardRef(function DateTimePicker2({
350
350
  return /* @__PURE__ */ jsx(
351
351
  "div",
352
352
  {
353
- onClick: toggle,
353
+ onClick: (e) => {
354
+ const target = e.target;
355
+ if (target == null ? void 0 : target.closest('[data-input-container-label-action="true"]')) return;
356
+ toggle(e);
357
+ },
354
358
  className: [styles.triggerWrap, fullWidth ? styles.triggerWrapFullWidth : ""].filter(Boolean).join(" "),
355
359
  children: /* @__PURE__ */ jsx(
356
360
  Input,
@@ -42,7 +42,13 @@ function maskSingle(text, enableTime) {
42
42
  const t = normalizeSpaces(text);
43
43
  if (!enableTime) return maskDateEU(t);
44
44
  const m = /^(.*?)[ T](.*)$/.exec(t);
45
- if (!m) return maskDateEU(t);
45
+ if (!m) {
46
+ const d = digits(t);
47
+ if (d.length <= 8) return maskDateEU(t);
48
+ const datePart2 = maskDateEU(d.slice(0, 8));
49
+ const timePart2 = maskTimeHM(d.slice(8));
50
+ return timePart2 ? `${datePart2} ${timePart2}` : datePart2;
51
+ }
46
52
  const datePart = maskDateEU(m[1]);
47
53
  const timePart = maskTimeHM(m[2]);
48
54
  return timePart ? `${datePart} ${timePart}` : datePart;
@@ -40,7 +40,13 @@ function maskSingle(text, enableTime) {
40
40
  const t = normalizeSpaces(text);
41
41
  if (!enableTime) return maskDateEU(t);
42
42
  const m = /^(.*?)[ T](.*)$/.exec(t);
43
- if (!m) return maskDateEU(t);
43
+ if (!m) {
44
+ const d = digits(t);
45
+ if (d.length <= 8) return maskDateEU(t);
46
+ const datePart2 = maskDateEU(d.slice(0, 8));
47
+ const timePart2 = maskTimeHM(d.slice(8));
48
+ return timePart2 ? `${datePart2} ${timePart2}` : datePart2;
49
+ }
44
50
  const datePart = maskDateEU(m[1]);
45
51
  const timePart = maskTimeHM(m[2]);
46
52
  return timePart ? `${datePart} ${timePart}` : datePart;
@@ -28,7 +28,7 @@ function InputContainer({
28
28
  label,
29
29
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.required, children: " *" })
30
30
  ] }),
31
- labelAction && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.labelAction, children: labelAction })
31
+ labelAction && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-input-container-label-action": "true", children: labelAction })
32
32
  ] });
33
33
  const renderMessageRow = (error || helpText || helpTextAddition) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${error ? styles__default.default.errorText : styles__default.default.helpText} ${styles__default.default.messageRow}`, children: error ? /* @__PURE__ */ jsxRuntime.jsx(InlineStatus.InlineStatus, { severity: "error", disableIcon: true, children: error }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
34
34
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: helpText }),
@@ -22,7 +22,7 @@ function InputContainer({
22
22
  label,
23
23
  required && /* @__PURE__ */ jsx("span", { className: styles.required, children: " *" })
24
24
  ] }),
25
- labelAction && /* @__PURE__ */ jsx("div", { className: styles.labelAction, children: labelAction })
25
+ labelAction && /* @__PURE__ */ jsx("span", { "data-input-container-label-action": "true", children: labelAction })
26
26
  ] });
27
27
  const renderMessageRow = (error || helpText || helpTextAddition) && /* @__PURE__ */ jsx("div", { className: `${error ? styles.errorText : styles.helpText} ${styles.messageRow}`, children: error ? /* @__PURE__ */ jsx(InlineStatus, { severity: "error", disableIcon: true, children: error }) : /* @__PURE__ */ jsxs(Fragment, { children: [
28
28
  /* @__PURE__ */ jsx("span", { children: helpText }),
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  align-items: flex-start;
5
- gap: var(--spacing-lg);
5
+ gap: var(--spacing-md);
6
6
  max-width: 100%;
7
7
  min-width: 0;
8
8
  }
@@ -18,7 +18,7 @@
18
18
  .headlineRow {
19
19
  display: flex;
20
20
  align-items: center;
21
- gap: var(--spacing-lg);
21
+ gap: var(--spacing-md);
22
22
  min-width: 0;
23
23
  }
24
24
 
@@ -26,7 +26,7 @@
26
26
  .headline {
27
27
  position: relative;
28
28
  display: inline-flex;
29
- flex: 1 1 auto;
29
+ flex: 0 1 auto;
30
30
  align-items: center;
31
31
  gap: var(--spacing-xs);
32
32
  margin-block: var(--spacing-xs);
@@ -133,7 +133,7 @@
133
133
 
134
134
  .addition {
135
135
  display: flex;
136
- flex: 0 0 auto;
136
+ flex: 1 1 auto;
137
137
  min-width: 0;
138
138
  align-items: center;
139
139
  }
@@ -147,7 +147,7 @@
147
147
 
148
148
  /* Text wrapper (allows shrinking inside flex layouts) */
149
149
  .text {
150
- flex: 1 1 auto;
150
+ flex: 0 1 auto;
151
151
  min-width: 0;
152
152
  }
153
153
 
@@ -34,7 +34,7 @@
34
34
 
35
35
  /* Severity accents */
36
36
  .info {
37
- border-left-color: var(--color-status-info-border);
37
+ border-left-color: var(--color-status-info);
38
38
  }
39
39
 
40
40
  .brand {
@@ -42,15 +42,15 @@
42
42
  }
43
43
 
44
44
  .success {
45
- border-left-color: var(--color-status-success-border);
45
+ border-left-color: var(--color-status-success);
46
46
  }
47
47
 
48
48
  .warning {
49
- border-left-color: var(--color-status-warning-border);
49
+ border-left-color: var(--color-status-warning);
50
50
  }
51
51
 
52
52
  .error {
53
- border-left-color: var(--color-status-error-border);
53
+ border-left-color: var(--color-status-error);
54
54
  }
55
55
 
56
56
  .neutral {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbcdk/react-components",
3
- "version": "0.0.115",
3
+ "version": "0.0.117",
4
4
  "description": "Reusable React components for DBC projects",
5
5
  "license": "ISC",
6
6
  "author": "",