@midas-ds/components 17.10.16 → 17.11.0
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/CHANGELOG.md +25 -0
- package/assets/TimeField.css +1 -0
- package/chunks/DateField-moMaM1xn.js +89 -0
- package/chunks/DateInput-NzWcnB4y.js +29 -0
- package/chunks/DateInputDivider-BHAwPkIR.js +13 -0
- package/chunks/{DateRangePicker-BK8CbDCZ.js → DateRangePicker-BItgKNh8.js} +24 -23
- package/chunks/TimeField-CEuBp21Z.js +88 -0
- package/date-field/DateField.d.ts +4 -2
- package/date-field/index.js +6 -5
- package/date-picker/index.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +123 -120
- package/package.json +2 -2
- package/time-field/TimeField.d.ts +23 -0
- package/time-field/TimeField.stories.d.ts +35 -0
- package/time-field/index.d.ts +1 -0
- package/time-field/index.js +4 -0
- package/time-field/intl/translations.json.d.ts +11 -0
- package/chunks/DateField-PU7fIO8a.js +0 -91
- package/chunks/DateInputDivider-DwopMIb9.js +0 -36
- /package/assets/{DateInputDivider.css → DateInput.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## 17.11.0 (2026-04-08)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components:** add TimeField component ([3c88d5371d](https://github.com/migrationsverket/midas/commit/3c88d5371d))
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **components,time-field:** make TimeFieldProps generic, remove React.FC and data-testid ([73599aadbd](https://github.com/migrationsverket/midas/commit/73599aadbd))
|
|
10
|
+
|
|
11
|
+
### 🏭 Refactoring
|
|
12
|
+
|
|
13
|
+
- **components,date-field,time-field:** wrap DateField and TimeField in forwardRef ([7bd91d2d07](https://github.com/migrationsverket/midas/commit/7bd91d2d07))
|
|
14
|
+
- **components,date-field:** make DateFieldProps generic and remove React.FC ([eefb171f3e](https://github.com/migrationsverket/midas/commit/eefb171f3e))
|
|
15
|
+
|
|
16
|
+
### 🧪 Tests updated
|
|
17
|
+
|
|
18
|
+
- **components,date-field,time-field:** add forwardRef tests for DateField and TimeField ([83f63f8692](https://github.com/migrationsverket/midas/commit/83f63f8692))
|
|
19
|
+
|
|
20
|
+
## 17.10.17 (2026-04-07)
|
|
21
|
+
|
|
22
|
+
### 🧱 Updated Dependencies
|
|
23
|
+
|
|
24
|
+
- Updated theme to 3.12.19
|
|
25
|
+
|
|
1
26
|
## 17.10.16 (2026-04-07)
|
|
2
27
|
|
|
3
28
|
### 🧱 Updated Dependencies
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._timeField_z8d4x_1{font-family:var(--midas-typography-font-family);display:flex;flex-direction:column;align-items:flex-start}._timeField_z8d4x_1[data-readonly] ._inputField_z8d4x_7{background-color:transparent;border-bottom-color:var(--midas-border-color-subtle)}._timeField_z8d4x_1[data-disabled] ._inputField_z8d4x_7{color:var(--midas-text-disabled);cursor:not-allowed;border-bottom-color:var(--midas-border-color-disabled);background-color:var(--midas-field-disabled)}._timeField_z8d4x_1[data-invalid] ._inputField_z8d4x_7{border:none;box-shadow:var(--midas-state-invalid)}._inputField_z8d4x_7{box-sizing:border-box;width:100%;min-height:var(--midas-size-control);display:flex;justify-content:space-between;align-items:center;background-color:var(--midas-field-01-base);border:1px solid transparent;border-bottom-color:var(--midas-border-color-primary);padding:0 0 0 1rem;position:relative}._inputField_z8d4x_7._medium_z8d4x_38{min-height:var(--midas-size-control-md)}._timeField_z8d4x_1:not([data-disabled],[data-readonly]) ._inputField_z8d4x_7 [data-hovered]{background-color:var(--midas-field-01-hover)}._clearButton_z8d4x_47{border:none;background-color:transparent}@media(forced-colors:active){._inputField_z8d4x_7{border:1px solid var(--midas-border-color-primary)}}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as F from "react";
|
|
3
|
+
import { DateField as x, DateFieldStateContext as g } from "react-aria-components";
|
|
4
|
+
import { c as d } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { D as j, a as B } from "./DateInput-NzWcnB4y.js";
|
|
6
|
+
import { F as f } from "./FieldError-krpMBtie.js";
|
|
7
|
+
import { a as C, L as w } from "./Label-Cg0aAlnt.js";
|
|
8
|
+
import { T as b } from "./Text-D0r_W4lH.js";
|
|
9
|
+
import { C as L } from "./ClearButton-DkC8PIMi.js";
|
|
10
|
+
import { FocusScope as S, useFocusManager as v } from "@react-aria/focus";
|
|
11
|
+
import { u as N } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
12
|
+
import '../assets/DateField.css';const V = { clear: "Clear date" }, R = { clear: "Rensa datum" }, T = {
|
|
13
|
+
en: V,
|
|
14
|
+
sv: R
|
|
15
|
+
}, E = "_dateField_1ejwm_1", I = "_inputField_1ejwm_7", M = "_medium_1ejwm_38", P = "_clearButton_1ejwm_47", r = {
|
|
16
|
+
dateField: E,
|
|
17
|
+
inputField: I,
|
|
18
|
+
medium: M,
|
|
19
|
+
clearButton: P
|
|
20
|
+
}, W = ({ isClearable: i, size: t, isDisabled: s, isReadOnly: o }) => {
|
|
21
|
+
const l = N(T), a = F.useContext(g), n = v(), m = () => {
|
|
22
|
+
a?.setValue(null), n?.focusFirst();
|
|
23
|
+
};
|
|
24
|
+
return i && a?.value != null && !o ? /* @__PURE__ */ e(
|
|
25
|
+
L,
|
|
26
|
+
{
|
|
27
|
+
onPress: m,
|
|
28
|
+
size: t,
|
|
29
|
+
isDisabled: s,
|
|
30
|
+
"aria-label": l.format("clear"),
|
|
31
|
+
className: d(r.clearButton, {
|
|
32
|
+
[r.medium]: t === "medium"
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
) : null;
|
|
36
|
+
}, U = F.forwardRef(
|
|
37
|
+
({
|
|
38
|
+
className: i,
|
|
39
|
+
description: t,
|
|
40
|
+
errorMessage: s,
|
|
41
|
+
errorPosition: o = "top",
|
|
42
|
+
label: l,
|
|
43
|
+
size: a = "large",
|
|
44
|
+
popover: n,
|
|
45
|
+
isClearable: m = !1,
|
|
46
|
+
isReadOnly: c,
|
|
47
|
+
isDisabled: u,
|
|
48
|
+
..._
|
|
49
|
+
}, h) => /* @__PURE__ */ p(
|
|
50
|
+
x,
|
|
51
|
+
{
|
|
52
|
+
..._,
|
|
53
|
+
ref: h,
|
|
54
|
+
isReadOnly: c,
|
|
55
|
+
isDisabled: u,
|
|
56
|
+
className: d(r.dateField, i),
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ e(C, { popover: n, children: l && /* @__PURE__ */ e(w, { children: l }) }),
|
|
59
|
+
t && /* @__PURE__ */ e(b, { slot: "description", children: t }),
|
|
60
|
+
o === "top" && /* @__PURE__ */ e(f, { children: s }),
|
|
61
|
+
/* @__PURE__ */ e(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: d(r.inputField, {
|
|
65
|
+
[r.medium]: a === "medium"
|
|
66
|
+
}),
|
|
67
|
+
"data-testid": "date-field_input-field",
|
|
68
|
+
children: /* @__PURE__ */ p(S, { children: [
|
|
69
|
+
/* @__PURE__ */ e(j, { children: (D) => /* @__PURE__ */ e(B, { segment: D }) }),
|
|
70
|
+
/* @__PURE__ */ e(
|
|
71
|
+
W,
|
|
72
|
+
{
|
|
73
|
+
isClearable: m,
|
|
74
|
+
size: a,
|
|
75
|
+
isDisabled: u,
|
|
76
|
+
isReadOnly: c
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
o === "bottom" && /* @__PURE__ */ e(f, { children: s })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
);
|
|
87
|
+
export {
|
|
88
|
+
U as D
|
|
89
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { DateSegment as n, DateInput as m } from "react-aria-components";
|
|
3
|
+
import { c as s } from "./clsx-AexbMWKp.js";
|
|
4
|
+
import '../assets/DateInput.css';const d = "_dateSegment_15g5c_1", o = {
|
|
5
|
+
dateSegment: d
|
|
6
|
+
}, u = ({
|
|
7
|
+
className: t,
|
|
8
|
+
...e
|
|
9
|
+
}) => /* @__PURE__ */ a(
|
|
10
|
+
n,
|
|
11
|
+
{
|
|
12
|
+
className: s(o.dateSegment, t),
|
|
13
|
+
...e
|
|
14
|
+
}
|
|
15
|
+
), c = "_dateInput_14x1f_1", p = "_divider_14x1f_21", r = {
|
|
16
|
+
dateInput: c,
|
|
17
|
+
divider: p
|
|
18
|
+
}, D = ({ className: t, ...e }) => /* @__PURE__ */ a(
|
|
19
|
+
m,
|
|
20
|
+
{
|
|
21
|
+
className: s(r.dateInput, t),
|
|
22
|
+
...e
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
export {
|
|
26
|
+
D,
|
|
27
|
+
u as a,
|
|
28
|
+
r as s
|
|
29
|
+
};
|
|
@@ -3,16 +3,17 @@ import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
|
3
3
|
import { Group as F, DatePickerStateContext as B, DateRangePickerStateContext as M, Popover as N, Dialog as S, DatePicker as R, DateRangePicker as G } from "react-aria-components";
|
|
4
4
|
import { a as k } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { C as L, R as w } from "./RangeCalendar-DxLInTav.js";
|
|
6
|
-
import { D as
|
|
6
|
+
import { D as f, a as P } from "./DateInput-NzWcnB4y.js";
|
|
7
7
|
import { F as _ } from "./FieldError-krpMBtie.js";
|
|
8
8
|
import { a as g, L as y } from "./Label-Cg0aAlnt.js";
|
|
9
9
|
import { T as D } from "./Text-D0r_W4lH.js";
|
|
10
10
|
import * as v from "react";
|
|
11
|
-
import { C as
|
|
12
|
-
import { FocusScope as
|
|
13
|
-
import { B as
|
|
14
|
-
import { c as
|
|
15
|
-
import { u as
|
|
11
|
+
import { C as I } from "./ClearButton-DkC8PIMi.js";
|
|
12
|
+
import { FocusScope as O, useFocusManager as V } from "@react-aria/focus";
|
|
13
|
+
import { B as T } from "./Button-GCROAMSl.js";
|
|
14
|
+
import { c as $ } from "./createLucideIcon-CP-mMPfa.js";
|
|
15
|
+
import { u as j } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
16
|
+
import { D as A } from "./DateInputDivider-BHAwPkIR.js";
|
|
16
17
|
import '../assets/DateRangePicker.css';const E = [
|
|
17
18
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
18
19
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
@@ -24,7 +25,7 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
24
25
|
["path", { d: "M8 18h.01", key: "lrp35t" }],
|
|
25
26
|
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
26
27
|
["path", { d: "M16 18h.01", key: "kzsmim" }]
|
|
27
|
-
], W =
|
|
28
|
+
], W = $("calendar-days", E), q = { clear: "Clear date", "open-calendar": "Open calendar" }, H = { clear: "Rensa datum", "open-calendar": "Öppna kalender" }, C = {
|
|
28
29
|
en: q,
|
|
29
30
|
sv: H
|
|
30
31
|
}, J = "_datePicker_13jtn_1", K = "_inputField_13jtn_8", Q = "_medium_13jtn_24", U = "_readOnly_13jtn_47", X = "_buttonGroup_13jtn_52", Y = "_iconButton_13jtn_58", Z = "_popover_13jtn_81 _dropdownAnimation_1ljkv_4", z = "_dialog_13jtn_85", a = {
|
|
@@ -42,9 +43,9 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
42
43
|
isReadOnly: i,
|
|
43
44
|
size: n
|
|
44
45
|
}) => {
|
|
45
|
-
const o = v.useContext(B), s = v.useContext(M), l =
|
|
46
|
+
const o = v.useContext(B), s = v.useContext(M), l = j(C), d = V(), r = s ?? o, u = ee(r) ? !!r.value.start && r.value.end : !!r?.value;
|
|
46
47
|
return t && u && !i ? /* @__PURE__ */ e(
|
|
47
|
-
|
|
48
|
+
I,
|
|
48
49
|
{
|
|
49
50
|
onPress: () => {
|
|
50
51
|
r?.setValue(null), d?.focusFirst();
|
|
@@ -57,7 +58,7 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
57
58
|
})
|
|
58
59
|
}
|
|
59
60
|
) : null;
|
|
60
|
-
},
|
|
61
|
+
}, b = ({
|
|
61
62
|
children: t,
|
|
62
63
|
isDisabled: c,
|
|
63
64
|
isInvalid: i,
|
|
@@ -65,7 +66,7 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
65
66
|
size: o = "large",
|
|
66
67
|
isClearable: s = !1
|
|
67
68
|
}) => {
|
|
68
|
-
const l =
|
|
69
|
+
const l = j(C);
|
|
69
70
|
return /* @__PURE__ */ e(
|
|
70
71
|
F,
|
|
71
72
|
{
|
|
@@ -73,7 +74,7 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
73
74
|
[a.medium]: o === "medium",
|
|
74
75
|
[a.readOnly]: n
|
|
75
76
|
}),
|
|
76
|
-
children: /* @__PURE__ */ h(
|
|
77
|
+
children: /* @__PURE__ */ h(O, { children: [
|
|
77
78
|
t,
|
|
78
79
|
/* @__PURE__ */ h("div", { className: a.buttonGroup, children: [
|
|
79
80
|
/* @__PURE__ */ e(
|
|
@@ -86,7 +87,7 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
86
87
|
}
|
|
87
88
|
),
|
|
88
89
|
/* @__PURE__ */ e(
|
|
89
|
-
|
|
90
|
+
T,
|
|
90
91
|
{
|
|
91
92
|
variant: "icon",
|
|
92
93
|
"aria-label": l.format("open-calendar"),
|
|
@@ -111,7 +112,7 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
111
112
|
);
|
|
112
113
|
}, x = ({
|
|
113
114
|
children: t
|
|
114
|
-
}) => /* @__PURE__ */ e(N, { className: a.popover, children: /* @__PURE__ */ e(S, { className: a.dialog, children: t }) }),
|
|
115
|
+
}) => /* @__PURE__ */ e(N, { className: a.popover, children: /* @__PURE__ */ e(S, { className: a.dialog, children: t }) }), _e = ({
|
|
115
116
|
className: t,
|
|
116
117
|
description: c,
|
|
117
118
|
errorMessage: i,
|
|
@@ -135,21 +136,21 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
135
136
|
c && /* @__PURE__ */ e(D, { slot: "description", children: c }),
|
|
136
137
|
n === "top" && /* @__PURE__ */ e(_, { children: i }),
|
|
137
138
|
/* @__PURE__ */ e(
|
|
138
|
-
|
|
139
|
+
b,
|
|
139
140
|
{
|
|
140
141
|
isClearable: l,
|
|
141
142
|
isReadOnly: d,
|
|
142
143
|
isDisabled: r,
|
|
143
144
|
size: u,
|
|
144
145
|
...m,
|
|
145
|
-
children: /* @__PURE__ */ e(
|
|
146
|
+
children: /* @__PURE__ */ e(f, { children: (p) => /* @__PURE__ */ e(P, { segment: p }) })
|
|
146
147
|
}
|
|
147
148
|
),
|
|
148
149
|
n === "bottom" && /* @__PURE__ */ e(_, { children: i }),
|
|
149
150
|
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(L, {}) })
|
|
150
151
|
]
|
|
151
152
|
}
|
|
152
|
-
),
|
|
153
|
+
), fe = ({
|
|
153
154
|
className: t,
|
|
154
155
|
description: c,
|
|
155
156
|
errorMessage: i,
|
|
@@ -173,7 +174,7 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
173
174
|
c && /* @__PURE__ */ e(D, { slot: "description", children: c }),
|
|
174
175
|
n === "top" && /* @__PURE__ */ e(_, { children: i }),
|
|
175
176
|
/* @__PURE__ */ h(
|
|
176
|
-
|
|
177
|
+
b,
|
|
177
178
|
{
|
|
178
179
|
isClearable: l,
|
|
179
180
|
isReadOnly: d,
|
|
@@ -181,9 +182,9 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
181
182
|
size: u,
|
|
182
183
|
...m,
|
|
183
184
|
children: [
|
|
184
|
-
/* @__PURE__ */ e(
|
|
185
|
-
/* @__PURE__ */ e(
|
|
186
|
-
/* @__PURE__ */ e(
|
|
185
|
+
/* @__PURE__ */ e(f, { slot: "start", children: (p) => /* @__PURE__ */ e(P, { segment: p }) }),
|
|
186
|
+
/* @__PURE__ */ e(A, {}),
|
|
187
|
+
/* @__PURE__ */ e(f, { slot: "end", children: (p) => /* @__PURE__ */ e(P, { segment: p }) })
|
|
187
188
|
]
|
|
188
189
|
}
|
|
189
190
|
),
|
|
@@ -193,6 +194,6 @@ import '../assets/DateRangePicker.css';const E = [
|
|
|
193
194
|
}
|
|
194
195
|
);
|
|
195
196
|
export {
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
_e as D,
|
|
198
|
+
fe as a
|
|
198
199
|
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { TimeField as T, TimeFieldStateContext as g } from "react-aria-components";
|
|
4
|
+
import { FocusScope as B, useFocusManager as C } from "@react-aria/focus";
|
|
5
|
+
import { c as d } from "./clsx-AexbMWKp.js";
|
|
6
|
+
import { D as b, a as L } from "./DateInput-NzWcnB4y.js";
|
|
7
|
+
import { F } from "./FieldError-krpMBtie.js";
|
|
8
|
+
import { a as S, L as v } from "./Label-Cg0aAlnt.js";
|
|
9
|
+
import { T as z } from "./Text-D0r_W4lH.js";
|
|
10
|
+
import { C as N } from "./ClearButton-DkC8PIMi.js";
|
|
11
|
+
import { u as V } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
12
|
+
import '../assets/TimeField.css';const j = { clear: "Clear time" }, D = { clear: "Rensa tid" }, R = {
|
|
13
|
+
en: j,
|
|
14
|
+
sv: D
|
|
15
|
+
}, w = "_timeField_z8d4x_1", E = "_inputField_z8d4x_7", I = "_medium_z8d4x_38", M = "_clearButton_z8d4x_47", r = {
|
|
16
|
+
timeField: w,
|
|
17
|
+
inputField: E,
|
|
18
|
+
medium: I,
|
|
19
|
+
clearButton: M
|
|
20
|
+
}, P = ({ isClearable: l, size: t, isDisabled: o, isReadOnly: s }) => {
|
|
21
|
+
const m = V(R), i = f.useContext(g), a = C(), n = () => {
|
|
22
|
+
i?.setValue(null), a?.focusFirst();
|
|
23
|
+
};
|
|
24
|
+
return l && i?.value != null && !s ? /* @__PURE__ */ e(
|
|
25
|
+
N,
|
|
26
|
+
{
|
|
27
|
+
onPress: n,
|
|
28
|
+
size: t,
|
|
29
|
+
isDisabled: o,
|
|
30
|
+
"aria-label": m.format("clear"),
|
|
31
|
+
className: d(r.clearButton, {
|
|
32
|
+
[r.medium]: t === "medium"
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
) : null;
|
|
36
|
+
}, Q = f.forwardRef(
|
|
37
|
+
({
|
|
38
|
+
className: l,
|
|
39
|
+
description: t,
|
|
40
|
+
errorMessage: o,
|
|
41
|
+
errorPosition: s = "top",
|
|
42
|
+
label: m,
|
|
43
|
+
size: i = "large",
|
|
44
|
+
popover: a,
|
|
45
|
+
isClearable: n = !1,
|
|
46
|
+
isReadOnly: c,
|
|
47
|
+
isDisabled: u,
|
|
48
|
+
..._
|
|
49
|
+
}, x) => /* @__PURE__ */ p(
|
|
50
|
+
T,
|
|
51
|
+
{
|
|
52
|
+
..._,
|
|
53
|
+
ref: x,
|
|
54
|
+
isReadOnly: c,
|
|
55
|
+
isDisabled: u,
|
|
56
|
+
className: d(r.timeField, l),
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ e(S, { popover: a, children: m && /* @__PURE__ */ e(v, { children: m }) }),
|
|
59
|
+
t && /* @__PURE__ */ e(z, { slot: "description", children: t }),
|
|
60
|
+
s === "top" && /* @__PURE__ */ e(F, { children: o }),
|
|
61
|
+
/* @__PURE__ */ e(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: d(r.inputField, {
|
|
65
|
+
[r.medium]: i === "medium"
|
|
66
|
+
}),
|
|
67
|
+
children: /* @__PURE__ */ p(B, { children: [
|
|
68
|
+
/* @__PURE__ */ e(b, { children: (h) => /* @__PURE__ */ e(L, { segment: h }) }),
|
|
69
|
+
/* @__PURE__ */ e(
|
|
70
|
+
P,
|
|
71
|
+
{
|
|
72
|
+
isClearable: n,
|
|
73
|
+
size: i,
|
|
74
|
+
isDisabled: u,
|
|
75
|
+
isReadOnly: c
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] })
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
s === "bottom" && /* @__PURE__ */ e(F, { children: o })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
export {
|
|
87
|
+
Q as T
|
|
88
|
+
};
|
|
@@ -2,7 +2,7 @@ import { DateFieldProps as AriaDateFieldProps, DateValue, ValidationResult } fro
|
|
|
2
2
|
import { InfoPopoverProps } from '../label';
|
|
3
3
|
import { Size } from '../common/types';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
export interface DateFieldProps extends AriaDateFieldProps<
|
|
5
|
+
export interface DateFieldProps<T extends DateValue> extends AriaDateFieldProps<T> {
|
|
6
6
|
description?: string;
|
|
7
7
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
8
8
|
errorPosition?: 'top' | 'bottom';
|
|
@@ -18,4 +18,6 @@ export interface DateFieldProps extends AriaDateFieldProps<DateValue> {
|
|
|
18
18
|
*/
|
|
19
19
|
isClearable?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export declare const DateField:
|
|
21
|
+
export declare const DateField: <T extends DateValue>(props: DateFieldProps<T> & {
|
|
22
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
23
|
+
}) => React.ReactElement | null;
|
package/date-field/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { D as
|
|
2
|
-
import { D as r, a as o
|
|
1
|
+
import { D as a } from "../chunks/DateField-moMaM1xn.js";
|
|
2
|
+
import { D as r, a as o } from "../chunks/DateInput-NzWcnB4y.js";
|
|
3
|
+
import { D as m } from "../chunks/DateInputDivider-BHAwPkIR.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
+
a as DateField,
|
|
5
6
|
r as DateInput,
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
m as DateInputDivider,
|
|
8
|
+
o as DateSegment
|
|
8
9
|
};
|
package/date-picker/index.js
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -5,52 +5,54 @@ import { B as n, a as d } from "./chunks/Breadcrumb-Bs836gOn.js";
|
|
|
5
5
|
import { B as l } from "./chunks/Button-GCROAMSl.js";
|
|
6
6
|
import { B as g } from "./chunks/ButtonGroup-Dr6HOBo2.js";
|
|
7
7
|
import { C as L, R as C } from "./chunks/RangeCalendar-DxLInTav.js";
|
|
8
|
-
import { C as b, a as S, b as
|
|
8
|
+
import { C as b, a as S, b as D, c as I, d as F, e as R, f as G } from "./chunks/Card-Br5b9Esq.js";
|
|
9
9
|
import { C as k } from "./chunks/CharacterCounter-Dgnv-orm.js";
|
|
10
10
|
import { C as M } from "./chunks/Checkbox-CwzV5QbM.js";
|
|
11
11
|
import { C as h } from "./chunks/CheckboxGroup-CF_3F36J.js";
|
|
12
12
|
import { C as y } from "./chunks/ColorSchemeSwitch-Bp3PSGkA.js";
|
|
13
13
|
import { C as N } from "./chunks/ComboBox-DQOqOcic.js";
|
|
14
|
-
import { D as z } from "./chunks/DateField-
|
|
15
|
-
import { D as Q, a as V
|
|
16
|
-
import { D as
|
|
17
|
-
import {
|
|
18
|
-
import { F as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { G as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { L as
|
|
27
|
-
import { L as
|
|
28
|
-
import { L as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { P as
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { S as
|
|
35
|
-
import { S as
|
|
36
|
-
import { S as
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import { T as
|
|
40
|
-
import { T as
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { T as
|
|
44
|
-
import { T as
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import { L as
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
|
|
14
|
+
import { D as z } from "./chunks/DateField-moMaM1xn.js";
|
|
15
|
+
import { D as Q, a as V } from "./chunks/DateInput-NzWcnB4y.js";
|
|
16
|
+
import { D as j } from "./chunks/DateInputDivider-BHAwPkIR.js";
|
|
17
|
+
import { D as J, a as K } from "./chunks/DateRangePicker-BItgKNh8.js";
|
|
18
|
+
import { F as W } from "./chunks/FieldError-krpMBtie.js";
|
|
19
|
+
import { F as Y, a as _ } from "./chunks/FileListItem-CKF9HPjw.js";
|
|
20
|
+
import { D as oo, F as ao } from "./chunks/FileUpload-D6oyWcDA.js";
|
|
21
|
+
import { G as eo } from "./chunks/Grid-CettmpaZ.js";
|
|
22
|
+
import { G as so } from "./chunks/GridItem-z7zclNdT.js";
|
|
23
|
+
import { H as xo } from "./chunks/Heading-nfcRc2QF.js";
|
|
24
|
+
import { I as io } from "./chunks/InfoBanner-CWLvkP6D.js";
|
|
25
|
+
import { L as no } from "./chunks/Label-Cg0aAlnt.js";
|
|
26
|
+
import { H as lo, L as co, N as go, S as uo, a as Lo } from "./chunks/Layout-DLe0UoSw.js";
|
|
27
|
+
import { L as Bo } from "./chunks/Link-CSIZehbN.js";
|
|
28
|
+
import { L as So } from "./chunks/LinkButton-Dzp8ZAPs.js";
|
|
29
|
+
import { L as Io, a as Fo } from "./chunks/Logo-DDykn5b2.js";
|
|
30
|
+
import { M as Go } from "./chunks/Dialog-BSWBlyJI.js";
|
|
31
|
+
import { P as ko } from "./chunks/Popover-CjEPHe4A.js";
|
|
32
|
+
import { P as Mo } from "./chunks/ProgressBar-CBz_dIOH.js";
|
|
33
|
+
import { R as ho, a as Ho } from "./chunks/Radio-CRHdSthr.js";
|
|
34
|
+
import { S as Eo } from "./chunks/SearchField-DRaSep82.js";
|
|
35
|
+
import { S as wo } from "./chunks/Select-DKNK3eh_.js";
|
|
36
|
+
import { S as Oo } from "./chunks/Skeleton-tiP1Syzf.js";
|
|
37
|
+
import { S as Vo } from "./chunks/Spinner-CfKMn18u.js";
|
|
38
|
+
import { C as jo, a as qo, R as Jo, T as Ko, b as Uo, c as Wo } from "./chunks/Table-DBdY7MIw.js";
|
|
39
|
+
import { T as Yo, a as _o, b as $o, c as oa } from "./chunks/TabList-CJSnr6O0.js";
|
|
40
|
+
import { T as ra, a as ea, b as ta } from "./chunks/TagGroup-DPFh8qHR.js";
|
|
41
|
+
import { T as pa } from "./chunks/Text-D0r_W4lH.js";
|
|
42
|
+
import { I as ma, T as ia, a as fa, b as na } from "./chunks/TextArea-C7l7_Kof.js";
|
|
43
|
+
import { T as Ta } from "./chunks/TimeField-CEuBp21Z.js";
|
|
44
|
+
import { G as ca, T as ga, a as ua, b as La, t as Ca } from "./chunks/Toast-BFq_0Ue4.js";
|
|
45
|
+
import { T as ba, a as Sa } from "./chunks/ToggleButtonGroup-DRnEEi5-.js";
|
|
46
|
+
import { T as Ia, a as Fa } from "./chunks/Tooltip-BYEaNkZG.js";
|
|
47
|
+
import { L as Ga } from "./chunks/ListBox-CRVACYCg.js";
|
|
48
|
+
import { L as ka, a as va, b as Ma, c as Aa, d as ha } from "./chunks/ListBoxHeader-1lJxEEFx.js";
|
|
49
|
+
import { L as ya, a as Ea } from "./chunks/ListBoxEmptyState-BZpImC1g.js";
|
|
50
|
+
import { M as wa, a as za, b as Oa, c as Qa, S as Va } from "./chunks/Separator-CDRwpeHz.js";
|
|
51
|
+
import { c as ja } from "./chunks/clsx-AexbMWKp.js";
|
|
52
|
+
import { DialogTrigger as Ja, MenuTrigger as Ka, RouterProvider as Ua } from "react-aria-components";
|
|
53
|
+
import { u as Xa } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
|
|
54
|
+
import { useToastState as _a } from "react-stately";
|
|
55
|
+
const o = "17.11.0", a = {
|
|
54
56
|
version: o
|
|
55
57
|
}, r = a.version;
|
|
56
58
|
export {
|
|
@@ -65,96 +67,97 @@ export {
|
|
|
65
67
|
L as Calendar,
|
|
66
68
|
b as Card,
|
|
67
69
|
S as CardActionArea,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
D as CardActions,
|
|
71
|
+
I as CardContent,
|
|
70
72
|
F as CardImage,
|
|
71
73
|
R as CardLink,
|
|
72
74
|
G as CardTitle,
|
|
73
|
-
|
|
75
|
+
jo as Cell,
|
|
74
76
|
k as CharacterCounter,
|
|
75
77
|
M as Checkbox,
|
|
76
78
|
h as CheckboxGroup,
|
|
77
79
|
y as ColorSchemeSwitch,
|
|
78
|
-
|
|
80
|
+
qo as Column,
|
|
79
81
|
N as ComboBox,
|
|
80
82
|
z as DateField,
|
|
81
83
|
Q as DateInput,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
84
|
+
j as DateInputDivider,
|
|
85
|
+
J as DatePicker,
|
|
86
|
+
K as DateRangePicker,
|
|
87
|
+
V as DateSegment,
|
|
88
|
+
Ja as DialogTrigger,
|
|
89
|
+
oo as DropZone,
|
|
90
|
+
W as FieldError,
|
|
91
|
+
Y as FileList,
|
|
92
|
+
_ as FileListItem,
|
|
93
|
+
ao as FileTrigger,
|
|
94
|
+
ca as GlobalToastRegion,
|
|
95
|
+
eo as Grid,
|
|
96
|
+
so as GridItem,
|
|
97
|
+
lo as Header,
|
|
98
|
+
xo as Heading,
|
|
99
|
+
io as InfoBanner,
|
|
100
|
+
ma as Input,
|
|
101
|
+
no as Label,
|
|
102
|
+
co as Layout,
|
|
103
|
+
Bo as Link,
|
|
104
|
+
So as LinkButton,
|
|
105
|
+
Ga as ListBox,
|
|
106
|
+
ka as ListBoxButton,
|
|
107
|
+
ya as ListBoxEmptyState,
|
|
108
|
+
va as ListBoxHeader,
|
|
109
|
+
Ma as ListBoxItem,
|
|
110
|
+
Aa as ListBoxLoadMoreItem,
|
|
111
|
+
Ea as ListBoxPopover,
|
|
112
|
+
ha as ListBoxSection,
|
|
111
113
|
Io as Logo,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
Fo as LogoContext,
|
|
115
|
+
wa as Menu,
|
|
116
|
+
za as MenuItem,
|
|
117
|
+
Oa as MenuPopover,
|
|
118
|
+
Qa as MenuSection,
|
|
119
|
+
Ka as MenuTrigger,
|
|
120
|
+
Go as Modal,
|
|
121
|
+
go as Navbar,
|
|
122
|
+
ko as Popover,
|
|
123
|
+
Mo as ProgressBar,
|
|
124
|
+
ho as Radio,
|
|
125
|
+
Ho as RadioGroup,
|
|
124
126
|
C as RangeCalendar,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Ta as
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
La as
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
127
|
+
Ua as RouterProvider,
|
|
128
|
+
Jo as Row,
|
|
129
|
+
Eo as SearchField,
|
|
130
|
+
wo as Select,
|
|
131
|
+
Va as Separator,
|
|
132
|
+
uo as Sidebar,
|
|
133
|
+
Lo as SidebarLink,
|
|
134
|
+
Oo as Skeleton,
|
|
135
|
+
Vo as Spinner,
|
|
136
|
+
Yo as Tab,
|
|
137
|
+
_o as TabList,
|
|
138
|
+
$o as TabPanel,
|
|
139
|
+
Ko as Table,
|
|
140
|
+
Uo as TableBody,
|
|
141
|
+
Wo as TableHeader,
|
|
142
|
+
oa as Tabs,
|
|
143
|
+
ra as Tag,
|
|
144
|
+
ea as TagGroup,
|
|
145
|
+
ta as TagList,
|
|
146
|
+
pa as Text,
|
|
147
|
+
ia as TextArea,
|
|
148
|
+
fa as TextField,
|
|
149
|
+
na as TextFieldBase,
|
|
150
|
+
Ta as TimeField,
|
|
151
|
+
ga as Toast,
|
|
152
|
+
ua as ToastProvider,
|
|
153
|
+
La as ToastRegion,
|
|
154
|
+
ba as ToggleButton,
|
|
155
|
+
Sa as ToggleButtonGroup,
|
|
156
|
+
Ia as Tooltip,
|
|
157
|
+
Fa as TooltipTrigger,
|
|
155
158
|
r as VERSION,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
ja as clsx,
|
|
160
|
+
Ca as toastQueue,
|
|
161
|
+
Xa as useLocalizedStringFormatter,
|
|
162
|
+
_a as useToastState
|
|
160
163
|
};
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Midas Components",
|
|
15
15
|
"homepage": "https://designsystem.migrationsverket.se/",
|
|
16
16
|
"license": "CC0-1.0",
|
|
17
|
-
"version": "17.
|
|
17
|
+
"version": "17.11.0",
|
|
18
18
|
"module": "./index.js",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"main": "./index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"./*": "./*/index.js"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@midas-ds/theme": "3.12.
|
|
44
|
+
"@midas-ds/theme": "3.12.19",
|
|
45
45
|
"react-aria-components": "1.16.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TimeFieldProps as AriaTimeFieldProps, TimeValue, ValidationResult } from 'react-aria-components';
|
|
2
|
+
import { InfoPopoverProps } from '../label';
|
|
3
|
+
import { Size } from '../common/types';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
export interface TimeFieldProps<T extends TimeValue> extends AriaTimeFieldProps<T> {
|
|
6
|
+
description?: string;
|
|
7
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
8
|
+
errorPosition?: 'top' | 'bottom';
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Component size (large: height 48px, medium: height 40px)
|
|
11
|
+
* @default 'large'
|
|
12
|
+
*/
|
|
13
|
+
size?: Size;
|
|
14
|
+
/** An assistive text that helps the user understand the field better. Will be hidden in a popover with an info icon button. */
|
|
15
|
+
popover?: InfoPopoverProps;
|
|
16
|
+
/** Show a clear button to remove the selected time
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
isClearable?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const TimeField: <T extends TimeValue>(props: TimeFieldProps<T> & {
|
|
22
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
23
|
+
}) => React.ReactElement | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { TimeField } from './TimeField';
|
|
3
|
+
type Story = StoryObj<typeof TimeField>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: <T extends import('react-aria').TimeValue>(props: import('./TimeField').TimeFieldProps<T> & {
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
}) => React.ReactElement | null;
|
|
8
|
+
title: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
parameters: {
|
|
11
|
+
a11y: {
|
|
12
|
+
config: {
|
|
13
|
+
rules: {
|
|
14
|
+
id: string;
|
|
15
|
+
selector: string;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
args: {
|
|
22
|
+
errorPosition: "top";
|
|
23
|
+
label: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
28
|
+
export declare const Primary: Story;
|
|
29
|
+
export declare const Invalid: Story;
|
|
30
|
+
export declare const Disabled: Story;
|
|
31
|
+
export declare const ReadOnly: Story;
|
|
32
|
+
export declare const WithDefaultValue: Story;
|
|
33
|
+
export declare const WithClearButton: Story;
|
|
34
|
+
export declare const WithSeconds: Story;
|
|
35
|
+
export declare const HourCycle12: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TimeField';
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import * as h from "react";
|
|
3
|
-
import { DateField as D, DateFieldStateContext as x } from "react-aria-components";
|
|
4
|
-
import { c as d } from "./clsx-AexbMWKp.js";
|
|
5
|
-
import { D as g, b as j } from "./DateInputDivider-DwopMIb9.js";
|
|
6
|
-
import { F } from "./FieldError-krpMBtie.js";
|
|
7
|
-
import { a as B, L as C } from "./Label-Cg0aAlnt.js";
|
|
8
|
-
import { T as b } from "./Text-D0r_W4lH.js";
|
|
9
|
-
import { C as w } from "./ClearButton-DkC8PIMi.js";
|
|
10
|
-
import { FocusScope as L, useFocusManager as S } from "@react-aria/focus";
|
|
11
|
-
import { u as v } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
12
|
-
import '../assets/DateField.css';const N = { clear: "Clear date" }, V = { clear: "Rensa datum" }, T = {
|
|
13
|
-
en: N,
|
|
14
|
-
sv: V
|
|
15
|
-
}, E = "_dateField_1ejwm_1", I = "_inputField_1ejwm_7", M = "_medium_1ejwm_38", P = "_clearButton_1ejwm_47", s = {
|
|
16
|
-
dateField: E,
|
|
17
|
-
inputField: I,
|
|
18
|
-
medium: M,
|
|
19
|
-
clearButton: P
|
|
20
|
-
}, R = ({
|
|
21
|
-
isClearable: i,
|
|
22
|
-
size: t,
|
|
23
|
-
isDisabled: o,
|
|
24
|
-
isReadOnly: r
|
|
25
|
-
}) => {
|
|
26
|
-
const l = v(T), a = h.useContext(x), n = S(), m = () => {
|
|
27
|
-
a?.setValue(null), n?.focusFirst();
|
|
28
|
-
};
|
|
29
|
-
return i && a?.value != null && !r ? /* @__PURE__ */ e(
|
|
30
|
-
w,
|
|
31
|
-
{
|
|
32
|
-
onPress: m,
|
|
33
|
-
size: t,
|
|
34
|
-
isDisabled: o,
|
|
35
|
-
"aria-label": l.format("clear"),
|
|
36
|
-
className: d(s.clearButton, {
|
|
37
|
-
[s.medium]: t === "medium"
|
|
38
|
-
})
|
|
39
|
-
}
|
|
40
|
-
) : null;
|
|
41
|
-
}, Q = ({
|
|
42
|
-
className: i,
|
|
43
|
-
description: t,
|
|
44
|
-
errorMessage: o,
|
|
45
|
-
errorPosition: r = "top",
|
|
46
|
-
label: l,
|
|
47
|
-
size: a = "large",
|
|
48
|
-
popover: n,
|
|
49
|
-
isClearable: m = !1,
|
|
50
|
-
isReadOnly: c,
|
|
51
|
-
isDisabled: u,
|
|
52
|
-
...f
|
|
53
|
-
}) => /* @__PURE__ */ p(
|
|
54
|
-
D,
|
|
55
|
-
{
|
|
56
|
-
...f,
|
|
57
|
-
isReadOnly: c,
|
|
58
|
-
isDisabled: u,
|
|
59
|
-
className: d(s.dateField, i),
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ e(B, { popover: n, children: l && /* @__PURE__ */ e(C, { children: l }) }),
|
|
62
|
-
t && /* @__PURE__ */ e(b, { slot: "description", children: t }),
|
|
63
|
-
r === "top" && /* @__PURE__ */ e(F, { children: o }),
|
|
64
|
-
/* @__PURE__ */ e(
|
|
65
|
-
"div",
|
|
66
|
-
{
|
|
67
|
-
className: d(s.inputField, {
|
|
68
|
-
[s.medium]: a === "medium"
|
|
69
|
-
}),
|
|
70
|
-
"data-testid": "date-field_input-field",
|
|
71
|
-
children: /* @__PURE__ */ p(L, { children: [
|
|
72
|
-
/* @__PURE__ */ e(g, { children: (_) => /* @__PURE__ */ e(j, { segment: _ }) }),
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
R,
|
|
75
|
-
{
|
|
76
|
-
isClearable: m,
|
|
77
|
-
size: a,
|
|
78
|
-
isDisabled: u,
|
|
79
|
-
isReadOnly: c
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
] })
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
r === "bottom" && /* @__PURE__ */ e(F, { children: o })
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
export {
|
|
90
|
-
Q as D
|
|
91
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { DateSegment as d, DateInput as i } from "react-aria-components";
|
|
3
|
-
import { c as s } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import '../assets/DateInputDivider.css';const m = "_dateSegment_15g5c_1", c = {
|
|
5
|
-
dateSegment: m
|
|
6
|
-
}, _ = ({
|
|
7
|
-
className: t,
|
|
8
|
-
...e
|
|
9
|
-
}) => /* @__PURE__ */ a(
|
|
10
|
-
d,
|
|
11
|
-
{
|
|
12
|
-
className: s(c.dateSegment, t),
|
|
13
|
-
...e
|
|
14
|
-
}
|
|
15
|
-
), o = "_dateInput_14x1f_1", r = "_divider_14x1f_21", n = {
|
|
16
|
-
dateInput: o,
|
|
17
|
-
divider: r
|
|
18
|
-
}, g = ({ className: t, ...e }) => /* @__PURE__ */ a(
|
|
19
|
-
i,
|
|
20
|
-
{
|
|
21
|
-
className: s(n.dateInput, t),
|
|
22
|
-
...e
|
|
23
|
-
}
|
|
24
|
-
), I = () => /* @__PURE__ */ a(
|
|
25
|
-
"span",
|
|
26
|
-
{
|
|
27
|
-
"aria-hidden": "true",
|
|
28
|
-
className: n.divider,
|
|
29
|
-
children: "-"
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
export {
|
|
33
|
-
g as D,
|
|
34
|
-
I as a,
|
|
35
|
-
_ as b
|
|
36
|
-
};
|
|
File without changes
|