@midas-ds/components 17.8.1 → 17.8.3
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 +18 -0
- package/accordion/index.js +1 -1
- package/assets/Button.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/ComboBox.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Dialog.css +1 -1
- package/assets/InfoBanner.css +1 -1
- package/assets/Label.css +1 -1
- package/assets/Link.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/ListBox.css +1 -1
- package/assets/Popover.css +1 -1
- package/assets/ProgressBar.css +1 -1
- package/assets/Radio.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Separator.css +1 -1
- package/assets/Skeleton.css +1 -1
- package/assets/Table.css +1 -1
- package/assets/Toast.css +1 -1
- package/assets/Tooltip.css +1 -1
- package/assets/default.css +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +1 -1
- package/checkbox/index.js +2 -2
- package/chunks/{AccordionItem-w6c28fSu.js → AccordionItem-DHhQDd6o.js} +1 -1
- package/chunks/{Button-D22xOe8j.js → Button-GCROAMSl.js} +1 -1
- package/chunks/Button.module-byTN5rhp.js +14 -0
- package/chunks/{Checkbox-sAkQe7Q9.js → Checkbox-DSW-_Qpm.js} +28 -28
- package/chunks/{CheckboxGroup-DY8sC9ro.js → CheckboxGroup-DteJIgnR.js} +2 -2
- package/chunks/{ClearButton-DfwjeVYh.js → ClearButton-DkC8PIMi.js} +1 -1
- package/chunks/{ColorSchemeSwitch-D52V0sr3.js → ColorSchemeSwitch-gD9pFu9h.js} +1 -1
- package/chunks/{ComboBox-BGMkkxN2.js → ComboBox-BEUfJ6IN.js} +29 -29
- package/chunks/{DateField-kEqIc-Nc.js → DateField-Bwis4G2o.js} +2 -2
- package/chunks/DateRangePicker-5E41DzGI.js +198 -0
- package/chunks/{Dialog-SBj6IJAF.js → Dialog-BSWBlyJI.js} +16 -16
- package/chunks/InfoBanner-CWLvkP6D.js +76 -0
- package/chunks/{Label-BNQY5OnB.js → Label-Cg0aAlnt.js} +7 -7
- package/chunks/{Layout-fkaVQ6a0.js → Layout-BLP0HVR-.js} +2 -2
- package/chunks/Link-CyY3-8M8.js +59 -0
- package/chunks/{LinkButton-DJ-D5PkB.js → LinkButton-DWKAbxXF.js} +28 -28
- package/chunks/{ListBox-BmONCo_D.js → ListBox-CRtyHPj1.js} +19 -19
- package/chunks/{ListBoxEmptyState-7VzB4KvQ.js → ListBoxEmptyState-D6Jvy1WT.js} +1 -1
- package/chunks/{ListBoxHeader-D_WqTfOS.js → ListBoxHeader-DIxY1gOH.js} +1 -1
- package/chunks/{Popover-6cnHxDEK.js → Popover-CjEPHe4A.js} +7 -7
- package/chunks/ProgressBar-CBz_dIOH.js +53 -0
- package/chunks/Radio-CRHdSthr.js +44 -0
- package/chunks/{RangeCalendar-_g_BVyUN.js → RangeCalendar-DL6cCjH3.js} +1 -1
- package/chunks/{SearchField-D2Mm_VUO.js → SearchField-C_wD8YuG.js} +2 -2
- package/chunks/{Select-DJ_VE1E4.js → Select-C01v_D--.js} +57 -57
- package/chunks/Separator-CDRwpeHz.js +76 -0
- package/chunks/{Skeleton-D6mxKxuu.js → Skeleton-tiP1Syzf.js} +20 -20
- package/chunks/{Table-Bg-AKi7d.js → Table-BpVSZ3aM.js} +48 -48
- package/chunks/{TagGroup-YCiXkdo3.js → TagGroup-DPFh8qHR.js} +1 -1
- package/chunks/{TextArea-Z4BKGpA9.js → TextArea-C7l7_Kof.js} +2 -2
- package/chunks/Toast-BFq_0Ue4.js +158 -0
- package/chunks/{ToggleButtonGroup-Bv9xpwTT.js → ToggleButtonGroup-DRnEEi5-.js} +1 -1
- package/chunks/{Tooltip-C1bbgr2l.js → Tooltip-BYEaNkZG.js} +11 -11
- package/clear-button/index.js +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/index.js +32 -32
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/link-button/index.js +1 -1
- package/list-box/index.js +3 -3
- package/menu/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +2 -2
- package/popover/index.js +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/skeleton/index.js +1 -1
- package/table/index.js +1 -1
- package/tag/index.js +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.js +1 -1
- package/tooltip/index.js +1 -1
- package/chunks/Button.module-BW0TvYZ2.js +0 -14
- package/chunks/DateRangePicker-B7d3F0qi.js +0 -197
- package/chunks/InfoBanner-BIDGEIpk.js +0 -76
- package/chunks/Link-rqGQvFQq.js +0 -59
- package/chunks/ProgressBar-BIfkrfrH.js +0 -53
- package/chunks/Radio-D-sGYrD6.js +0 -44
- package/chunks/Separator-CkVOLF6I.js +0 -76
- package/chunks/Toast-D8euCY5O.js +0 -158
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as L, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import S, { forwardRef as l, useContext as H, useRef as j } from "react";
|
|
3
3
|
import { VisuallyHidden as D, mergeProps as h, useCheckboxGroupItem as M, useCheckbox as O, useHover as V, usePress as q, useFocusRing as w } from "react-aria";
|
|
4
4
|
import { useContextProps as A, CheckboxContext as T, useSlottedContext as E, FormContext as J } from "react-aria-components";
|
|
5
5
|
import { a as x } from "./clsx-AexbMWKp.js";
|
|
6
|
-
import { variables as
|
|
6
|
+
import { variables as m } from "@midas-ds/theme";
|
|
7
7
|
import { c as K } from "./createLucideIcon-CP-mMPfa.js";
|
|
8
8
|
import { C as Q } from "./check-Bt2UikoU.js";
|
|
9
9
|
import { useToggleState as U } from "@react-stately/toggle";
|
|
10
|
-
import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0h" }]], X = K("minus", W), Y =
|
|
10
|
+
import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0h" }]], X = K("minus", W), Y = S.createContext(null), Z = "_checkboxInner_rzhlf_1", $ = "_checkbox_rzhlf_1", ee = "_checkboxGroup_rzhlf_144", oe = "_checkboxList_rzhlf_155", b = {
|
|
11
11
|
checkboxInner: Z,
|
|
12
12
|
checkbox: $,
|
|
13
13
|
checkboxGroup: ee,
|
|
14
14
|
checkboxList: oe
|
|
15
|
-
},
|
|
15
|
+
}, u = l(
|
|
16
16
|
({
|
|
17
17
|
hoverResult: e,
|
|
18
18
|
pressResult: o,
|
|
@@ -23,49 +23,49 @@ import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0
|
|
|
23
23
|
isSelected: r,
|
|
24
24
|
isIndeterminate: s,
|
|
25
25
|
isDisabled: d,
|
|
26
|
-
isInvalid:
|
|
27
|
-
isReadOnly:
|
|
26
|
+
isInvalid: f,
|
|
27
|
+
isReadOnly: C,
|
|
28
28
|
isRequired: _,
|
|
29
29
|
inputProps: p,
|
|
30
30
|
inputRef: I,
|
|
31
31
|
children: R
|
|
32
32
|
}, y) => {
|
|
33
|
-
const { hoverProps: G, isHovered: P } = e, { pressProps: g, isPressed: N } = o, { isFocused:
|
|
34
|
-
return /* @__PURE__ */
|
|
33
|
+
const { hoverProps: G, isHovered: P } = e, { pressProps: g, isPressed: N } = o, { isFocused: z, isFocusVisible: B, focusProps: F } = c;
|
|
34
|
+
return /* @__PURE__ */ L(
|
|
35
35
|
"label",
|
|
36
36
|
{
|
|
37
37
|
ref: y,
|
|
38
38
|
...h(G, g, i),
|
|
39
39
|
slot: n || void 0,
|
|
40
|
-
className: x(
|
|
40
|
+
className: x(b.checkbox, a),
|
|
41
41
|
"data-hovered": P || void 0,
|
|
42
42
|
"data-selected": r || void 0,
|
|
43
43
|
"data-indeterminate": s || void 0,
|
|
44
44
|
"data-pressed": N || void 0,
|
|
45
45
|
"data-disabled": d || void 0,
|
|
46
|
-
"data-readonly":
|
|
47
|
-
"data-invalid":
|
|
48
|
-
"data-focused":
|
|
49
|
-
"data-focus-visible":
|
|
46
|
+
"data-readonly": C || void 0,
|
|
47
|
+
"data-invalid": f || void 0,
|
|
48
|
+
"data-focused": z || void 0,
|
|
49
|
+
"data-focus-visible": B || void 0,
|
|
50
50
|
"data-required": _ || void 0,
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */ t("div", { className: x(
|
|
52
|
+
/* @__PURE__ */ t("div", { className: x(b.checkboxInner), children: s ? /* @__PURE__ */ t(
|
|
53
53
|
X,
|
|
54
54
|
{
|
|
55
55
|
size: 14,
|
|
56
|
-
color:
|
|
56
|
+
color: m.iconOnColor
|
|
57
57
|
}
|
|
58
58
|
) : /* @__PURE__ */ t(
|
|
59
59
|
Q,
|
|
60
60
|
{
|
|
61
61
|
size: 14,
|
|
62
|
-
color:
|
|
62
|
+
color: m.iconOnColor
|
|
63
63
|
}
|
|
64
64
|
) }),
|
|
65
65
|
/* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(
|
|
66
66
|
"input",
|
|
67
67
|
{
|
|
68
|
-
...h(p,
|
|
68
|
+
...h(p, F),
|
|
69
69
|
ref: I
|
|
70
70
|
}
|
|
71
71
|
) }),
|
|
@@ -75,8 +75,8 @@ import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
|
|
79
|
-
const
|
|
78
|
+
u.displayName = "CheckboxInner";
|
|
79
|
+
const k = l((e, o) => {
|
|
80
80
|
const c = M(
|
|
81
81
|
{
|
|
82
82
|
...e,
|
|
@@ -86,7 +86,7 @@ const b = u((e, o) => {
|
|
|
86
86
|
e.inputRef
|
|
87
87
|
);
|
|
88
88
|
return /* @__PURE__ */ t(
|
|
89
|
-
|
|
89
|
+
u,
|
|
90
90
|
{
|
|
91
91
|
...e,
|
|
92
92
|
...c,
|
|
@@ -94,11 +94,11 @@ const b = u((e, o) => {
|
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
96
|
});
|
|
97
|
-
|
|
98
|
-
const v =
|
|
97
|
+
k.displayName = "CheckBoxGroupItem";
|
|
98
|
+
const v = l((e, o) => {
|
|
99
99
|
const c = O(e, U(e), e.inputRef);
|
|
100
100
|
return /* @__PURE__ */ t(
|
|
101
|
-
|
|
101
|
+
u,
|
|
102
102
|
{
|
|
103
103
|
...e,
|
|
104
104
|
...c,
|
|
@@ -107,15 +107,15 @@ const v = u((e, o) => {
|
|
|
107
107
|
);
|
|
108
108
|
});
|
|
109
109
|
v.displayName = "SingleCheckbox";
|
|
110
|
-
const te =
|
|
110
|
+
const te = l(
|
|
111
111
|
(e, o) => {
|
|
112
112
|
[e, o] = A(e, o, T);
|
|
113
|
-
const c = E(J), i = e.validationBehavior ?? c?.validationBehavior ?? "native", n =
|
|
113
|
+
const c = E(J), i = e.validationBehavior ?? c?.validationBehavior ?? "native", n = H(Y), a = j(null), r = V(e), s = q({
|
|
114
114
|
ref: o,
|
|
115
115
|
isDisabled: e.isDisabled
|
|
116
116
|
}), d = w();
|
|
117
117
|
return n ? /* @__PURE__ */ t(
|
|
118
|
-
|
|
118
|
+
k,
|
|
119
119
|
{
|
|
120
120
|
...e,
|
|
121
121
|
state: n,
|
|
@@ -142,5 +142,5 @@ te.displayName = "Checkbox";
|
|
|
142
142
|
export {
|
|
143
143
|
te as C,
|
|
144
144
|
Y as a,
|
|
145
|
-
|
|
145
|
+
b as s
|
|
146
146
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import { useCheckboxGroup as C } from "react-aria";
|
|
3
3
|
import { useCheckboxGroupState as v } from "react-stately";
|
|
4
|
-
import { a as k, L as S } from "./Label-
|
|
4
|
+
import { a as k, L as S } from "./Label-Cg0aAlnt.js";
|
|
5
5
|
import { T as y } from "./Text-D0r_W4lH.js";
|
|
6
6
|
import * as r from "react";
|
|
7
|
-
import { C as d, s as u, a as g } from "./Checkbox-
|
|
7
|
+
import { C as d, s as u, a as g } from "./Checkbox-DSW-_Qpm.js";
|
|
8
8
|
import { FieldErrorContext as A } from "react-aria-components";
|
|
9
9
|
import { F as P } from "./FieldError-krpMBtie.js";
|
|
10
10
|
import { u as V } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import * as m from "react";
|
|
4
4
|
import { VisuallyHidden as c } from "react-aria";
|
|
5
|
-
import { a as g, T as r } from "./ToggleButtonGroup-
|
|
5
|
+
import { a as g, T as r } from "./ToggleButtonGroup-DRnEEi5-.js";
|
|
6
6
|
import { c as l } from "./createLucideIcon-CP-mMPfa.js";
|
|
7
7
|
import { u } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
8
8
|
import '../assets/ColorSchemeSwitch.css';const k = [
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import F from "react";
|
|
4
4
|
import { ComboBox as w, Input as j, Button as v } from "react-aria-components";
|
|
5
|
-
import { c as
|
|
6
|
-
import { a as R, L as y } from "./Label-
|
|
7
|
-
import { T as
|
|
5
|
+
import { c as e } from "./clsx-AexbMWKp.js";
|
|
6
|
+
import { a as R, L as y } from "./Label-Cg0aAlnt.js";
|
|
7
|
+
import { T as z } from "./Text-D0r_W4lH.js";
|
|
8
8
|
import { F as u } from "./FieldError-krpMBtie.js";
|
|
9
|
-
import { L as
|
|
10
|
-
import { a as
|
|
11
|
-
import { C as
|
|
12
|
-
import { u as
|
|
13
|
-
import '../assets/ComboBox.css';const
|
|
14
|
-
combobox:
|
|
15
|
-
inputField:
|
|
16
|
-
medium:
|
|
17
|
-
wrap:
|
|
18
|
-
button:
|
|
9
|
+
import { L as B } from "./ListBox-CRtyHPj1.js";
|
|
10
|
+
import { a as C, L as N } from "./ListBoxEmptyState-D6Jvy1WT.js";
|
|
11
|
+
import { C as g } from "./chevron-down-BBFYYzZq.js";
|
|
12
|
+
import { u as E } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
13
|
+
import '../assets/ComboBox.css';const S = "_combobox_ssz8j_1", T = "_inputField_ssz8j_6", I = "_medium_ssz8j_28", O = "_wrap_ssz8j_80", U = "_button_ssz8j_85", D = "_icon_ssz8j_122", t = {
|
|
14
|
+
combobox: S,
|
|
15
|
+
inputField: T,
|
|
16
|
+
medium: I,
|
|
17
|
+
wrap: O,
|
|
18
|
+
button: U,
|
|
19
19
|
icon: D
|
|
20
20
|
}, M = { showList: "Show list", noResultsFound: "No results found" }, V = { showList: "Visa lista", noResultsFound: "Inga träffar" }, W = {
|
|
21
21
|
en: M,
|
|
@@ -32,47 +32,47 @@ function Y({
|
|
|
32
32
|
size: m = "large",
|
|
33
33
|
popover: h,
|
|
34
34
|
listBoxProps: b,
|
|
35
|
-
...
|
|
35
|
+
...s
|
|
36
36
|
}) {
|
|
37
|
-
const
|
|
38
|
-
L.currentTarget.value &&
|
|
37
|
+
const d = F.useRef(null), l = E(W), x = (L) => {
|
|
38
|
+
L.currentTarget.value && d.current?.select();
|
|
39
39
|
};
|
|
40
40
|
return /* @__PURE__ */ c(
|
|
41
41
|
w,
|
|
42
42
|
{
|
|
43
|
-
className:
|
|
44
|
-
...
|
|
45
|
-
"data-readonly":
|
|
43
|
+
className: e(t.combobox, _),
|
|
44
|
+
...s,
|
|
45
|
+
"data-readonly": s.isReadOnly || void 0,
|
|
46
46
|
children: [
|
|
47
47
|
/* @__PURE__ */ o(R, { popover: h, children: i && /* @__PURE__ */ o(y, { children: i }) }),
|
|
48
|
-
r && /* @__PURE__ */ o(
|
|
48
|
+
r && /* @__PURE__ */ o(z, { slot: "description", children: r }),
|
|
49
49
|
a === "top" && /* @__PURE__ */ o(u, { "data-testid": "fieldError", children: n }),
|
|
50
50
|
/* @__PURE__ */ c("div", { className: t.wrap, children: [
|
|
51
51
|
/* @__PURE__ */ o(
|
|
52
52
|
j,
|
|
53
53
|
{
|
|
54
|
-
className:
|
|
54
|
+
className: e(t.inputField, {
|
|
55
55
|
[t.medium]: m === "medium"
|
|
56
56
|
}),
|
|
57
|
-
"data-readonly":
|
|
57
|
+
"data-readonly": s.isReadOnly || void 0,
|
|
58
58
|
onMouseUp: x,
|
|
59
|
-
ref:
|
|
59
|
+
ref: d
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
62
|
/* @__PURE__ */ o(
|
|
63
63
|
v,
|
|
64
64
|
{
|
|
65
|
-
className:
|
|
65
|
+
className: e(t.button, {
|
|
66
66
|
[t.medium]: m === "medium"
|
|
67
67
|
}),
|
|
68
|
-
"aria-label":
|
|
68
|
+
"aria-label": l.format("showList"),
|
|
69
69
|
children: /* @__PURE__ */ o(
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
72
|
className: t.icon,
|
|
73
73
|
"aria-hidden": "true",
|
|
74
74
|
children: /* @__PURE__ */ o(
|
|
75
|
-
|
|
75
|
+
g,
|
|
76
76
|
{
|
|
77
77
|
size: 20,
|
|
78
78
|
"aria-hidden": !0
|
|
@@ -84,11 +84,11 @@ function Y({
|
|
|
84
84
|
)
|
|
85
85
|
] }),
|
|
86
86
|
a === "bottom" && /* @__PURE__ */ o(u, { "data-testid": "fieldError", children: n }),
|
|
87
|
-
/* @__PURE__ */ o(
|
|
88
|
-
|
|
87
|
+
/* @__PURE__ */ o(C, { offset: 4, children: /* @__PURE__ */ o(
|
|
88
|
+
B,
|
|
89
89
|
{
|
|
90
90
|
items: f,
|
|
91
|
-
renderEmptyState: () => /* @__PURE__ */ o(
|
|
91
|
+
renderEmptyState: () => /* @__PURE__ */ o(N, { children: l.format("noResultsFound") }),
|
|
92
92
|
...b,
|
|
93
93
|
children: p
|
|
94
94
|
}
|
|
@@ -4,9 +4,9 @@ import { DateField as h, DateFieldStateContext as D } from "react-aria-component
|
|
|
4
4
|
import { c as d } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { D as g, b as B } from "./DateInputDivider-DwopMIb9.js";
|
|
6
6
|
import { F } from "./FieldError-krpMBtie.js";
|
|
7
|
-
import { a as C, L as b } from "./Label-
|
|
7
|
+
import { a as C, L as b } from "./Label-Cg0aAlnt.js";
|
|
8
8
|
import { T as L } from "./Text-D0r_W4lH.js";
|
|
9
|
-
import { C as S } from "./ClearButton-
|
|
9
|
+
import { C as S } from "./ClearButton-DkC8PIMi.js";
|
|
10
10
|
import { FocusScope as v, useFocusManager as N } from "@react-aria/focus";
|
|
11
11
|
import { u as V } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
12
12
|
import '../assets/DateField.css';const j = { clear: "Clear date" }, T = { clear: "Rensa datum" }, E = {
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
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
|
+
import { a as k } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { C as L, R as w } from "./RangeCalendar-DL6cCjH3.js";
|
|
6
|
+
import { D as P, b as f, a as I } from "./DateInputDivider-DwopMIb9.js";
|
|
7
|
+
import { F as _ } from "./FieldError-krpMBtie.js";
|
|
8
|
+
import { a as g, L as y } from "./Label-Cg0aAlnt.js";
|
|
9
|
+
import { T as D } from "./Text-D0r_W4lH.js";
|
|
10
|
+
import * as v from "react";
|
|
11
|
+
import { C as O } from "./ClearButton-DkC8PIMi.js";
|
|
12
|
+
import { FocusScope as V, useFocusManager as T } from "@react-aria/focus";
|
|
13
|
+
import { B as $ } from "./Button-GCROAMSl.js";
|
|
14
|
+
import { c as A } from "./createLucideIcon-CP-mMPfa.js";
|
|
15
|
+
import { u as b } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
16
|
+
import '../assets/DateRangePicker.css';const E = [
|
|
17
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
18
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
19
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
20
|
+
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
21
|
+
["path", { d: "M8 14h.01", key: "6423bh" }],
|
|
22
|
+
["path", { d: "M12 14h.01", key: "1etili" }],
|
|
23
|
+
["path", { d: "M16 14h.01", key: "1gbofw" }],
|
|
24
|
+
["path", { d: "M8 18h.01", key: "lrp35t" }],
|
|
25
|
+
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
26
|
+
["path", { d: "M16 18h.01", key: "kzsmim" }]
|
|
27
|
+
], W = A("calendar-days", E), q = { clear: "Clear date", "open-calendar": "Open calendar" }, H = { clear: "Rensa datum", "open-calendar": "Öppna kalender" }, j = {
|
|
28
|
+
en: q,
|
|
29
|
+
sv: H
|
|
30
|
+
}, 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 = {
|
|
31
|
+
datePicker: J,
|
|
32
|
+
inputField: K,
|
|
33
|
+
medium: Q,
|
|
34
|
+
readOnly: U,
|
|
35
|
+
buttonGroup: X,
|
|
36
|
+
iconButton: Y,
|
|
37
|
+
popover: Z,
|
|
38
|
+
dialog: z
|
|
39
|
+
}, ee = (t) => !!t && !!t.value && Object.prototype.hasOwnProperty.call(t.value, "start"), te = ({
|
|
40
|
+
isClearable: t,
|
|
41
|
+
isDisabled: c,
|
|
42
|
+
isReadOnly: i,
|
|
43
|
+
size: n
|
|
44
|
+
}) => {
|
|
45
|
+
const o = v.useContext(B), s = v.useContext(M), l = b(j), d = T(), r = s ?? o, u = ee(r) ? !!r.value.start && r.value.end : !!r?.value;
|
|
46
|
+
return t && u && !i ? /* @__PURE__ */ e(
|
|
47
|
+
O,
|
|
48
|
+
{
|
|
49
|
+
onPress: () => {
|
|
50
|
+
r?.setValue(null), d?.focusFirst();
|
|
51
|
+
},
|
|
52
|
+
size: n,
|
|
53
|
+
isDisabled: c,
|
|
54
|
+
"aria-label": l.format("clear"),
|
|
55
|
+
className: k(a.iconButton, {
|
|
56
|
+
[a.medium]: n === "medium"
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
) : null;
|
|
60
|
+
}, C = ({
|
|
61
|
+
children: t,
|
|
62
|
+
isDisabled: c,
|
|
63
|
+
isInvalid: i,
|
|
64
|
+
isReadOnly: n,
|
|
65
|
+
size: o = "large",
|
|
66
|
+
isClearable: s = !1
|
|
67
|
+
}) => {
|
|
68
|
+
const l = b(j);
|
|
69
|
+
return /* @__PURE__ */ e(
|
|
70
|
+
F,
|
|
71
|
+
{
|
|
72
|
+
className: k(a.inputField, {
|
|
73
|
+
[a.medium]: o === "medium",
|
|
74
|
+
[a.readOnly]: n
|
|
75
|
+
}),
|
|
76
|
+
children: /* @__PURE__ */ h(V, { children: [
|
|
77
|
+
t,
|
|
78
|
+
/* @__PURE__ */ h("div", { className: a.buttonGroup, children: [
|
|
79
|
+
/* @__PURE__ */ e(
|
|
80
|
+
te,
|
|
81
|
+
{
|
|
82
|
+
isClearable: s,
|
|
83
|
+
isDisabled: c,
|
|
84
|
+
isReadOnly: n,
|
|
85
|
+
size: o
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ e(
|
|
89
|
+
$,
|
|
90
|
+
{
|
|
91
|
+
variant: "icon",
|
|
92
|
+
"aria-label": l.format("open-calendar"),
|
|
93
|
+
className: k(a.iconButton, {
|
|
94
|
+
[a.medium]: o === "medium",
|
|
95
|
+
[a.readOnly]: n
|
|
96
|
+
}),
|
|
97
|
+
"data-invalid": i || void 0,
|
|
98
|
+
size: o,
|
|
99
|
+
children: /* @__PURE__ */ e(
|
|
100
|
+
W,
|
|
101
|
+
{
|
|
102
|
+
"aria-hidden": !0,
|
|
103
|
+
size: 20
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] })
|
|
109
|
+
] })
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}, x = ({
|
|
113
|
+
children: t
|
|
114
|
+
}) => /* @__PURE__ */ e(N, { className: a.popover, children: /* @__PURE__ */ e(S, { className: a.dialog, children: t }) }), ke = ({
|
|
115
|
+
className: t,
|
|
116
|
+
description: c,
|
|
117
|
+
errorMessage: i,
|
|
118
|
+
errorPosition: n = "top",
|
|
119
|
+
label: o,
|
|
120
|
+
popover: s,
|
|
121
|
+
isClearable: l = !1,
|
|
122
|
+
isReadOnly: d,
|
|
123
|
+
isDisabled: r,
|
|
124
|
+
size: u,
|
|
125
|
+
...m
|
|
126
|
+
}) => /* @__PURE__ */ h(
|
|
127
|
+
R,
|
|
128
|
+
{
|
|
129
|
+
className: k(a.datePicker, t),
|
|
130
|
+
isReadOnly: d,
|
|
131
|
+
isDisabled: r,
|
|
132
|
+
...m,
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ e(g, { popover: s, children: o && /* @__PURE__ */ e(y, { children: o }) }),
|
|
135
|
+
c && /* @__PURE__ */ e(D, { slot: "description", children: c }),
|
|
136
|
+
n === "top" && /* @__PURE__ */ e(_, { children: i }),
|
|
137
|
+
/* @__PURE__ */ e(
|
|
138
|
+
C,
|
|
139
|
+
{
|
|
140
|
+
isClearable: l,
|
|
141
|
+
isReadOnly: d,
|
|
142
|
+
isDisabled: r,
|
|
143
|
+
size: u,
|
|
144
|
+
...m,
|
|
145
|
+
children: /* @__PURE__ */ e(P, { children: (p) => /* @__PURE__ */ e(f, { segment: p }) })
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
n === "bottom" && /* @__PURE__ */ e(_, { children: i }),
|
|
149
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(L, {}) })
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
), _e = ({
|
|
153
|
+
className: t,
|
|
154
|
+
description: c,
|
|
155
|
+
errorMessage: i,
|
|
156
|
+
errorPosition: n = "top",
|
|
157
|
+
label: o,
|
|
158
|
+
popover: s,
|
|
159
|
+
isClearable: l = !1,
|
|
160
|
+
isReadOnly: d,
|
|
161
|
+
isDisabled: r,
|
|
162
|
+
size: u,
|
|
163
|
+
...m
|
|
164
|
+
}) => /* @__PURE__ */ h(
|
|
165
|
+
G,
|
|
166
|
+
{
|
|
167
|
+
className: k(a.datePicker, t),
|
|
168
|
+
isReadOnly: d,
|
|
169
|
+
isDisabled: r,
|
|
170
|
+
...m,
|
|
171
|
+
children: [
|
|
172
|
+
/* @__PURE__ */ e(g, { popover: s, children: o && /* @__PURE__ */ e(y, { children: o }) }),
|
|
173
|
+
c && /* @__PURE__ */ e(D, { slot: "description", children: c }),
|
|
174
|
+
n === "top" && /* @__PURE__ */ e(_, { children: i }),
|
|
175
|
+
/* @__PURE__ */ h(
|
|
176
|
+
C,
|
|
177
|
+
{
|
|
178
|
+
isClearable: l,
|
|
179
|
+
isReadOnly: d,
|
|
180
|
+
isDisabled: r,
|
|
181
|
+
size: u,
|
|
182
|
+
...m,
|
|
183
|
+
children: [
|
|
184
|
+
/* @__PURE__ */ e(P, { slot: "start", children: (p) => /* @__PURE__ */ e(f, { segment: p }) }),
|
|
185
|
+
/* @__PURE__ */ e(I, {}),
|
|
186
|
+
/* @__PURE__ */ e(P, { slot: "end", children: (p) => /* @__PURE__ */ e(f, { segment: p }) })
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
),
|
|
190
|
+
n === "bottom" && /* @__PURE__ */ e(_, { children: i }),
|
|
191
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(w, {}) })
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
export {
|
|
196
|
+
ke as D,
|
|
197
|
+
_e as a
|
|
198
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { ModalOverlay as
|
|
3
|
-
import { B as _ } from "./Button-
|
|
4
|
-
import { H as
|
|
2
|
+
import { ModalOverlay as c, Modal as i, Dialog as n } from "react-aria-components";
|
|
3
|
+
import { B as _ } from "./Button-GCROAMSl.js";
|
|
4
|
+
import { H as p } from "./Heading-nfcRc2QF.js";
|
|
5
5
|
import { c as y } from "./clsx-AexbMWKp.js";
|
|
6
6
|
import { X as v } from "./x-B9bYxG31.js";
|
|
7
7
|
import { u as f } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
8
|
-
import '../assets/Dialog.css';const
|
|
9
|
-
modal:
|
|
10
|
-
overlay:
|
|
11
|
-
modalHeader:
|
|
12
|
-
modalTitle:
|
|
13
|
-
modalBody:
|
|
14
|
-
},
|
|
15
|
-
en:
|
|
16
|
-
sv:
|
|
8
|
+
import '../assets/Dialog.css';const h = "_modal_cs32p_1", g = "_overlay_cs32p_24", B = "_modalHeader_cs32p_50", H = "_modalTitle_cs32p_61", x = "_modalBody_cs32p_67", a = {
|
|
9
|
+
modal: h,
|
|
10
|
+
overlay: g,
|
|
11
|
+
modalHeader: B,
|
|
12
|
+
modalTitle: H,
|
|
13
|
+
modalBody: x
|
|
14
|
+
}, M = { close: "Close" }, N = { close: "Stäng" }, T = {
|
|
15
|
+
en: M,
|
|
16
|
+
sv: N
|
|
17
17
|
}, F = ({
|
|
18
18
|
children: s,
|
|
19
19
|
title: l,
|
|
@@ -21,16 +21,16 @@ import '../assets/Dialog.css';const p = "_modal_10hiu_1", u = "_overlay_10hiu_24
|
|
|
21
21
|
className: t,
|
|
22
22
|
...d
|
|
23
23
|
}) => {
|
|
24
|
-
const m = f(
|
|
24
|
+
const m = f(T);
|
|
25
25
|
return /* @__PURE__ */ o(
|
|
26
|
-
|
|
26
|
+
c,
|
|
27
27
|
{
|
|
28
28
|
...d,
|
|
29
29
|
className: y(a.overlay, t),
|
|
30
|
-
children: /* @__PURE__ */ o(
|
|
30
|
+
children: /* @__PURE__ */ o(i, { className: a.modal, children: /* @__PURE__ */ e(n, { children: [
|
|
31
31
|
/* @__PURE__ */ e("div", { className: a.modalHeader, children: [
|
|
32
32
|
/* @__PURE__ */ o("div", { className: a.modalTitle, children: l && /* @__PURE__ */ o(
|
|
33
|
-
|
|
33
|
+
p,
|
|
34
34
|
{
|
|
35
35
|
level: 3,
|
|
36
36
|
elementType: "h2",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs as e, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as g } from "./clsx-AexbMWKp.js";
|
|
3
|
+
import { B as h } from "./Button-GCROAMSl.js";
|
|
4
|
+
import { F as x } from "./FeedbackStatusIcon-X9Bjgeta.js";
|
|
5
|
+
import { useControlledState as B } from "@react-stately/utils";
|
|
6
|
+
import { X as N } from "./x-B9bYxG31.js";
|
|
7
|
+
import { u as b } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
8
|
+
import '../assets/InfoBanner.css';const v = "_infoBanner_7d8d1_1", I = "_success_7d8d1_11", S = "_info_7d8d1_1", w = "_important_7d8d1_21", C = "_warning_7d8d1_26", F = "_content_7d8d1_40", O = "_heading_7d8d1_46", j = "_text_7d8d1_51", z = "_icon_7d8d1_66", k = "_dismissable_7d8d1_75", s = {
|
|
9
|
+
infoBanner: v,
|
|
10
|
+
success: I,
|
|
11
|
+
info: S,
|
|
12
|
+
important: w,
|
|
13
|
+
warning: C,
|
|
14
|
+
content: F,
|
|
15
|
+
heading: O,
|
|
16
|
+
text: j,
|
|
17
|
+
icon: z,
|
|
18
|
+
dismissable: k
|
|
19
|
+
}, L = { close: "Close" }, P = { close: "Stäng" }, X = {
|
|
20
|
+
en: L,
|
|
21
|
+
sv: P
|
|
22
|
+
}, J = ({
|
|
23
|
+
title: o,
|
|
24
|
+
message: i,
|
|
25
|
+
type: t,
|
|
26
|
+
children: c,
|
|
27
|
+
isDismissable: r = !1,
|
|
28
|
+
defaultOpen: d = !0,
|
|
29
|
+
isOpen: l,
|
|
30
|
+
onOpenChange: m,
|
|
31
|
+
...a
|
|
32
|
+
}) => {
|
|
33
|
+
const [_, f] = B(
|
|
34
|
+
l,
|
|
35
|
+
d,
|
|
36
|
+
m
|
|
37
|
+
), u = b(X), p = () => {
|
|
38
|
+
f(!1);
|
|
39
|
+
};
|
|
40
|
+
return _ ? /* @__PURE__ */ e(
|
|
41
|
+
"aside",
|
|
42
|
+
{
|
|
43
|
+
...a,
|
|
44
|
+
className: g(s.infoBanner, s[t], a.className),
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ n(
|
|
47
|
+
x,
|
|
48
|
+
{
|
|
49
|
+
"aria-hidden": !0,
|
|
50
|
+
className: s.icon,
|
|
51
|
+
status: t
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ e("div", { className: s.content, children: [
|
|
55
|
+
o && /* @__PURE__ */ n("strong", { className: s.heading, children: o }),
|
|
56
|
+
/* @__PURE__ */ e("div", { className: s.text, children: [
|
|
57
|
+
i,
|
|
58
|
+
c
|
|
59
|
+
] })
|
|
60
|
+
] }),
|
|
61
|
+
r && /* @__PURE__ */ n("div", { className: s.dismissable, children: /* @__PURE__ */ n(
|
|
62
|
+
h,
|
|
63
|
+
{
|
|
64
|
+
variant: "icon",
|
|
65
|
+
"aria-label": u.format("close"),
|
|
66
|
+
onPress: p,
|
|
67
|
+
children: /* @__PURE__ */ n(N, { size: 20 })
|
|
68
|
+
}
|
|
69
|
+
) })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
) : null;
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
J as I
|
|
76
|
+
};
|
|
@@ -3,13 +3,13 @@ import * as b from "react";
|
|
|
3
3
|
import i, { useContext as f } from "react";
|
|
4
4
|
import { c as v } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { DialogTrigger as d, Label as g } from "react-aria-components";
|
|
6
|
-
import { P as u } from "./Popover-
|
|
7
|
-
import { B as P } from "./Button-
|
|
8
|
-
import { I as
|
|
9
|
-
import { u as
|
|
6
|
+
import { P as u } from "./Popover-CjEPHe4A.js";
|
|
7
|
+
import { B as P } from "./Button-GCROAMSl.js";
|
|
8
|
+
import { I as x } from "./info-N5jWZg2A.js";
|
|
9
|
+
import { u as _ } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
10
10
|
import '../assets/Label.css';const I = "_labelBase_f5wtf_1", L = {
|
|
11
11
|
labelBase: I
|
|
12
|
-
}, T = "
|
|
12
|
+
}, T = "_labelPopover_1cx2t_1", B = "_labelPopoverTrigger_1cx2t_7", c = {
|
|
13
13
|
labelPopover: T,
|
|
14
14
|
labelPopoverTrigger: B
|
|
15
15
|
}, y = { moreInfo: "More info" }, C = { moreInfo: "Mer information" }, E = {
|
|
@@ -19,7 +19,7 @@ import '../assets/Label.css';const I = "_labelBase_f5wtf_1", L = {
|
|
|
19
19
|
children: e,
|
|
20
20
|
"aria-label": o
|
|
21
21
|
}) => {
|
|
22
|
-
const a = f(s), t =
|
|
22
|
+
const a = f(s), t = _(E);
|
|
23
23
|
return /* @__PURE__ */ n(d, { children: [
|
|
24
24
|
/* @__PURE__ */ r(
|
|
25
25
|
P,
|
|
@@ -29,7 +29,7 @@ import '../assets/Label.css';const I = "_labelBase_f5wtf_1", L = {
|
|
|
29
29
|
className: c.labelPopoverTrigger,
|
|
30
30
|
"aria-label": o || t.format("moreInfo"),
|
|
31
31
|
id: a?.popoverId,
|
|
32
|
-
children: /* @__PURE__ */ r(
|
|
32
|
+
children: /* @__PURE__ */ r(x, { size: 20 })
|
|
33
33
|
}
|
|
34
34
|
),
|
|
35
35
|
/* @__PURE__ */ r(u, { children: e })
|