@dbcdk/react-components 0.0.116 → 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.
- package/dist/components/datetime-picker/DateTimePicker.cjs +5 -1
- package/dist/components/datetime-picker/DateTimePicker.js +5 -1
- package/dist/components/datetime-picker/dateTimeHelpers.cjs +7 -1
- package/dist/components/datetime-picker/dateTimeHelpers.js +7 -1
- package/dist/components/forms/input-container/InputContainer.cjs +1 -1
- package/dist/components/forms/input-container/InputContainer.js +1 -1
- package/dist/components/headline/Headline.module.css +5 -5
- package/package.json +1 -1
|
@@ -356,7 +356,11 @@ const DateTimePicker = react.forwardRef(function DateTimePicker2({
|
|
|
356
356
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
357
357
|
"div",
|
|
358
358
|
{
|
|
359
|
-
onClick:
|
|
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:
|
|
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)
|
|
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)
|
|
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 && 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 && 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-
|
|
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-
|
|
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:
|
|
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:
|
|
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:
|
|
150
|
+
flex: 0 1 auto;
|
|
151
151
|
min-width: 0;
|
|
152
152
|
}
|
|
153
153
|
|