@midas-ds/components 15.4.0 → 15.4.1
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 +6 -0
- package/accordion/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.js +2 -2
- package/calendar/index.js +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.js +2 -2
- package/chunks/{AccordionItem-BCoomT4-.js → AccordionItem-69q6FXXl.js} +37 -37
- package/chunks/{BadgeContainer-BJAC-kV0.js → BadgeContainer-CKVsfTlF.js} +1 -1
- package/chunks/Breadcrumbs-By2bMbQd.js +28 -0
- package/chunks/Button-BMf7mX0N.js +46 -0
- package/chunks/{ButtonGroup-B6mr4JGY.js → ButtonGroup-Dr6HOBo2.js} +1 -1
- package/chunks/Card-ia98VoKL.js +130 -0
- package/chunks/CharacterCounter-DeuE2det.js +21 -0
- package/chunks/Checkbox-ClhO-AzB.js +122 -0
- package/chunks/CheckboxGroup-C3FOm8N8.js +84 -0
- package/chunks/{ColorSchemeSwitch-Cd6VSXql.js → ColorSchemeSwitch-DugvPh6T.js} +17 -17
- package/chunks/ComboBox-BqRZMi8W.js +108 -0
- package/chunks/DateField-12KSJHls.js +46 -0
- package/chunks/DateInputDivider-CkTB5q5k.js +36 -0
- package/chunks/DateRangePicker-BLRFvUp0.js +117 -0
- package/chunks/Dialog-C-X_qUR6.js +66 -0
- package/chunks/Dropdown-D7HQo9eM.js +79 -0
- package/chunks/FieldError-C0HRIcAx.js +23 -0
- package/chunks/FileUpload-h1PxqQmb.js +16 -0
- package/chunks/{Grid-DeB7TdcZ.js → Grid-B-WgMwON.js} +2 -2
- package/chunks/{GridItem-B_3FFhPs.js → GridItem-5t1Z14sM.js} +1 -1
- package/chunks/Heading-D8tNNJkt.js +38 -0
- package/chunks/{InfoBanner-Bw3rjGtB.js → InfoBanner-Cc3GhryE.js} +3 -3
- package/chunks/Label-D6WuwdAj.js +73 -0
- package/chunks/{Layout-InD0Hl7F.js → Layout-DGCDkyf3.js} +70 -70
- package/chunks/Link-yTNUNv3C.js +54 -0
- package/chunks/LinkButton-3nAekUJ4.js +63 -0
- package/chunks/{ListBox-CKDglhFH.js → ListBox-D4tO_OrO.js} +18 -18
- package/chunks/ListBoxLoadMoreItem-Bo0eLhpt.js +41 -0
- package/chunks/ListBoxSection-DKHba2X0.js +49 -0
- package/chunks/{Logo-D80UDT1x.js → Logo-InDSslpO.js} +2 -2
- package/chunks/Popover-BAdqdN6C.js +38 -0
- package/chunks/ProgressBar-zeJLxHVL.js +53 -0
- package/chunks/Radio-kvQP7E9s.js +43 -0
- package/chunks/RangeCalendar-CnquULdq.js +99 -0
- package/chunks/{SearchField-Dr3DAs9W.js → SearchField-B6ygRRL4.js} +39 -39
- package/chunks/Select-Cm5VZRTx.js +576 -0
- package/chunks/{Select-fDRXxmLm.js → Select-qmCuJm2x.js} +48 -46
- package/chunks/Separator-BcnQEA9f.js +76 -0
- package/chunks/{Skeleton-Bcg_xgAx.js → Skeleton-DqIHQLQl.js} +1 -1
- package/chunks/Spinner-Pll5zpx8.js +48 -0
- package/chunks/TabList-D2XV5ixe.js +81 -0
- package/chunks/Table-B1rlSIhS.js +139 -0
- package/chunks/Tag-Ca8wKXOy.js +53 -0
- package/chunks/{Text-WP6RbnnK.js → Text-TWzJxnto.js} +9 -9
- package/chunks/TextArea-UU7gFMEb.js +124 -0
- package/chunks/Toast-Cm2Zqq-F.js +162 -0
- package/chunks/ToggleButtonGroup-CXKTrLbb.js +29 -0
- package/chunks/Tooltip-CtstfI8u.js +46 -0
- package/chunks/clsx-AexbMWKp.js +24 -0
- package/chunks/useLocalizedStringFormatter-ZgRJmvHC.js +25 -0
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.js +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/index.js +1 -1
- package/dropdown/index.js +1 -1
- package/field-error/index.js +1 -1
- package/file-upload/index.js +1 -1
- package/grid/index.js +2 -2
- package/heading/index.js +1 -1
- package/index.js +68 -68
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/legacy-select/index.js +1 -1
- package/link/index.js +3 -3
- package/link-button/index.js +3 -3
- package/list-box/index.js +3 -3
- package/logo/index.js +1 -1
- package/menu/index.js +5 -5
- package/modal/index.js +2 -2
- package/package.json +2 -3
- 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/spinner/index.js +1 -1
- package/table/index.js +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.js +1 -1
- package/text/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/Breadcrumbs-CnuqEeOL.js +0 -28
- package/chunks/Button-CHs1wv7n.js +0 -46
- package/chunks/Card-D58EJCcV.js +0 -130
- package/chunks/CharacterCounter-CzCvDmNP.js +0 -21
- package/chunks/Checkbox-CogzFDe3.js +0 -119
- package/chunks/CheckboxGroup-BLx25gqn.js +0 -83
- package/chunks/ComboBox-8YAwADqL.js +0 -108
- package/chunks/DateField-CpbYROK1.js +0 -46
- package/chunks/DateInputDivider-C43xP4is.js +0 -36
- package/chunks/DateRangePicker-CICkmtXG.js +0 -116
- package/chunks/Dialog-DBn9L3SP.js +0 -66
- package/chunks/Dropdown-Cctv2Qpv.js +0 -79
- package/chunks/FieldError-CZKAYQ-n.js +0 -23
- package/chunks/FileUpload-DILt4rAn.js +0 -16
- package/chunks/Heading-DIw3iLMN.js +0 -38
- package/chunks/Label-CKe9pgXT.js +0 -73
- package/chunks/Link-C3w5O2wT.js +0 -54
- package/chunks/LinkButton-D6X0Dvoz.js +0 -63
- package/chunks/ListBoxLoadMoreItem-y9pCuqRe.js +0 -41
- package/chunks/ListBoxSection-CvtRigQb.js +0 -49
- package/chunks/Popover-DktRiuCr.js +0 -38
- package/chunks/ProgressBar-Bjxi5TgY.js +0 -53
- package/chunks/Radio-DqFFcFra.js +0 -43
- package/chunks/RangeCalendar-CIxwICEf.js +0 -99
- package/chunks/Select-BSqv5Qi-.js +0 -566
- package/chunks/Separator-Cw1vlSYO.js +0 -76
- package/chunks/Spinner-B2EAm49Z.js +0 -48
- package/chunks/TabList-BIBQcX2n.js +0 -81
- package/chunks/Table-Cy-R3Ma8.js +0 -139
- package/chunks/Tag-BZnq1_yZ.js +0 -53
- package/chunks/TextArea-3fPkKmNx.js +0 -124
- package/chunks/Toast-CP_V12b3.js +0 -161
- package/chunks/ToggleButtonGroup-CgNeypuW.js +0 -29
- package/chunks/Tooltip-C53p0sfk.js +0 -46
- package/chunks/clsx-CuNqTHjr.js +0 -11
- package/chunks/internationalized-C9snpc7V.js +0 -1955
- package/chunks/react-aria-components-mIKW9wOa.js +0 -22645
- package/chunks/react-stately-DRNKkAB0.js +0 -2586
- package/chunks/useLocalizedStringFormatter-CPwiI7nv.js +0 -25
- package/chunks/variables-BkqZ2WGF.js +0 -5
package/info-banner/index.js
CHANGED
package/label/index.js
CHANGED
package/layout/index.js
CHANGED
package/legacy-select/index.js
CHANGED
package/link/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as e } from "../chunks/Link-
|
|
2
|
-
import {
|
|
1
|
+
import { L as e } from "../chunks/Link-yTNUNv3C.js";
|
|
2
|
+
import { RouterProvider as f } from "react-aria-components";
|
|
3
3
|
export {
|
|
4
4
|
e as Link,
|
|
5
|
-
|
|
5
|
+
f as RouterProvider
|
|
6
6
|
};
|
package/link-button/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as t } from "../chunks/LinkButton-
|
|
2
|
-
import {
|
|
1
|
+
import { L as t } from "../chunks/LinkButton-3nAekUJ4.js";
|
|
2
|
+
import { RouterProvider as f } from "react-aria-components";
|
|
3
3
|
export {
|
|
4
4
|
t as LinkButton,
|
|
5
|
-
|
|
5
|
+
f as RouterProvider
|
|
6
6
|
};
|
package/list-box/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as s } from "../chunks/ListBox-
|
|
2
|
-
import { L, a as e } from "../chunks/ListBoxLoadMoreItem-
|
|
3
|
-
import { c as r, L as i, a as B, b as m } from "../chunks/ListBoxSection-
|
|
1
|
+
import { L as s } from "../chunks/ListBox-D4tO_OrO.js";
|
|
2
|
+
import { L, a as e } from "../chunks/ListBoxLoadMoreItem-Bo0eLhpt.js";
|
|
3
|
+
import { c as r, L as i, a as B, b as m } from "../chunks/ListBoxSection-DKHba2X0.js";
|
|
4
4
|
export {
|
|
5
5
|
s as ListBox,
|
|
6
6
|
L as ListBoxButton,
|
package/logo/index.js
CHANGED
package/menu/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { M as
|
|
2
|
-
import {
|
|
1
|
+
import { M as a, a as o, b as n, c as M, S as s } from "../chunks/Separator-BcnQEA9f.js";
|
|
2
|
+
import { MenuTrigger as u } from "react-aria-components";
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
a as Menu,
|
|
5
5
|
o as MenuItem,
|
|
6
6
|
n as MenuPopover,
|
|
7
|
-
|
|
7
|
+
M as MenuSection,
|
|
8
8
|
u as MenuTrigger,
|
|
9
|
-
|
|
9
|
+
s as Separator
|
|
10
10
|
};
|
package/modal/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as a } from "../chunks/Dialog-
|
|
2
|
-
import {
|
|
1
|
+
import { M as a } from "../chunks/Dialog-C-X_qUR6.js";
|
|
2
|
+
import { DialogTrigger as g } from "react-aria-components";
|
|
3
3
|
export {
|
|
4
4
|
g as DialogTrigger,
|
|
5
5
|
a as Modal
|
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": "15.4.
|
|
17
|
+
"version": "15.4.1",
|
|
18
18
|
"module": "./index.js",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"main": "./index.js",
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@midas-ds/theme": "3.8.0",
|
|
45
|
-
"react-aria-components": "1.13.0"
|
|
46
|
-
"react-stately": "3.42.0"
|
|
45
|
+
"react-aria-components": "1.13.0"
|
|
47
46
|
}
|
|
48
47
|
}
|
package/popover/index.js
CHANGED
package/progress-bar/index.js
CHANGED
package/radio/index.js
CHANGED
package/search-field/index.js
CHANGED
package/select/index.js
CHANGED
package/skeleton/index.js
CHANGED
package/spinner/index.js
CHANGED
package/table/index.js
CHANGED
package/tabs/index.js
CHANGED
package/tag/index.js
CHANGED
package/text/index.js
CHANGED
package/textfield/index.js
CHANGED
package/toast/index.js
CHANGED
package/toggle-button/index.js
CHANGED
package/tooltip/index.js
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { C as d, D as i } from "./react-aria-components-mIKW9wOa.js";
|
|
3
|
-
import { c as m } from "./clsx-CuNqTHjr.js";
|
|
4
|
-
import { L as p } from "./Link-C3w5O2wT.js";
|
|
5
|
-
import '../assets/Breadcrumbs.css';const f = "_container_1k7pu_1", l = {
|
|
6
|
-
container: f
|
|
7
|
-
}, h = ({
|
|
8
|
-
items: r,
|
|
9
|
-
className: e,
|
|
10
|
-
...a
|
|
11
|
-
}) => /* @__PURE__ */ c(
|
|
12
|
-
d,
|
|
13
|
-
{
|
|
14
|
-
className: m(l.container, e),
|
|
15
|
-
...a,
|
|
16
|
-
children: r.map(({ title: o, href: s, isDisabled: n }, t) => /* @__PURE__ */ c(i, { children: /* @__PURE__ */ c(
|
|
17
|
-
p,
|
|
18
|
-
{
|
|
19
|
-
href: s,
|
|
20
|
-
isDisabled: n,
|
|
21
|
-
children: o
|
|
22
|
-
}
|
|
23
|
-
) }, o.toLocaleLowerCase() + t))
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
export {
|
|
27
|
-
h as B
|
|
28
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx as m, jsxs as a, Fragment as l } from "react/jsx-runtime";
|
|
2
|
-
import { B as r } from "./Button.module-Cm0H98vy.js";
|
|
3
|
-
import { k as p } from "./react-aria-components-mIKW9wOa.js";
|
|
4
|
-
import { c as u } from "./clsx-CuNqTHjr.js";
|
|
5
|
-
import { S as f } from "./Spinner-B2EAm49Z.js";
|
|
6
|
-
const B = ({
|
|
7
|
-
variant: i = "primary",
|
|
8
|
-
fullwidth: t,
|
|
9
|
-
className: n,
|
|
10
|
-
iconPlacement: d,
|
|
11
|
-
size: s = "large",
|
|
12
|
-
icon: o,
|
|
13
|
-
iconSize: c,
|
|
14
|
-
...e
|
|
15
|
-
}) => /* @__PURE__ */ m(
|
|
16
|
-
p,
|
|
17
|
-
{
|
|
18
|
-
className: u(
|
|
19
|
-
r.button,
|
|
20
|
-
i === "primary" && r.primary,
|
|
21
|
-
i === "secondary" && r.secondary,
|
|
22
|
-
i === "tertiary" && r.tertiary,
|
|
23
|
-
i === "danger" && r.danger,
|
|
24
|
-
i === "icon" && r.iconBtn,
|
|
25
|
-
t && r.fullwidth,
|
|
26
|
-
s === "medium" && r.medium,
|
|
27
|
-
d === "right" && r.iconRight,
|
|
28
|
-
n
|
|
29
|
-
),
|
|
30
|
-
...e,
|
|
31
|
-
children: /* @__PURE__ */ a(l, { children: [
|
|
32
|
-
o && !e.isPending && /* @__PURE__ */ m(
|
|
33
|
-
o,
|
|
34
|
-
{
|
|
35
|
-
"aria-hidden": !0,
|
|
36
|
-
size: c ?? 20
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
e.isPending && /* @__PURE__ */ m(f, { small: !0 }),
|
|
40
|
-
e.children
|
|
41
|
-
] })
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
export {
|
|
45
|
-
B
|
|
46
|
-
};
|
package/chunks/Card-D58EJCcV.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { c as n } from "./clsx-CuNqTHjr.js";
|
|
3
|
-
import * as e from "react";
|
|
4
|
-
import { H as m } from "./Heading-DIw3iLMN.js";
|
|
5
|
-
import { k as _, E as C } from "./react-aria-components-mIKW9wOa.js";
|
|
6
|
-
import { A as x } from "./arrow-right-DNeP8Eqv.js";
|
|
7
|
-
import '../assets/Card.css';const A = "_card_1x9yi_1", h = "_horizontal_1x9yi_11", I = "_cardLink_1x9yi_16", u = "_cardContent_1x9yi_21", p = "_cardActions_1x9yi_40", z = "_cardActionArea_1x9yi_50", f = "_cardImage_1x9yi_83", k = "_cardLinkIcon_1x9yi_115", c = {
|
|
8
|
-
card: A,
|
|
9
|
-
horizontal: h,
|
|
10
|
-
cardLink: I,
|
|
11
|
-
cardContent: u,
|
|
12
|
-
cardActions: p,
|
|
13
|
-
cardActionArea: z,
|
|
14
|
-
cardImage: f,
|
|
15
|
-
cardLinkIcon: k
|
|
16
|
-
}, i = e.createContext({
|
|
17
|
-
horizontal: void 0,
|
|
18
|
-
titleId: void 0
|
|
19
|
-
}), $ = ({
|
|
20
|
-
horizontal: t,
|
|
21
|
-
className: o,
|
|
22
|
-
children: a,
|
|
23
|
-
...s
|
|
24
|
-
}) => {
|
|
25
|
-
const d = `card-title-${e.useId()}`;
|
|
26
|
-
return /* @__PURE__ */ r(i.Provider, { value: { horizontal: t, titleId: d }, children: /* @__PURE__ */ r(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
...s,
|
|
30
|
-
className: n(
|
|
31
|
-
c.card,
|
|
32
|
-
t && c.horizontal,
|
|
33
|
-
o
|
|
34
|
-
),
|
|
35
|
-
children: a
|
|
36
|
-
}
|
|
37
|
-
) });
|
|
38
|
-
}, j = ({
|
|
39
|
-
children: t,
|
|
40
|
-
...o
|
|
41
|
-
}) => {
|
|
42
|
-
const { horizontal: a } = e.useContext(i);
|
|
43
|
-
return /* @__PURE__ */ r(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
...o,
|
|
47
|
-
className: n(c.cardContent, a && c.horizontal),
|
|
48
|
-
children: t
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}, E = ({
|
|
52
|
-
elementType: t = "h2",
|
|
53
|
-
children: o
|
|
54
|
-
}) => {
|
|
55
|
-
const { horizontal: a, titleId: s } = e.useContext(i);
|
|
56
|
-
return /* @__PURE__ */ r(
|
|
57
|
-
m,
|
|
58
|
-
{
|
|
59
|
-
level: a ? 5 : 3,
|
|
60
|
-
elementType: t,
|
|
61
|
-
isExpressive: a,
|
|
62
|
-
className: n(c.cardTitle, a && c.horizontal),
|
|
63
|
-
id: s,
|
|
64
|
-
children: o
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}, H = ({
|
|
68
|
-
children: t,
|
|
69
|
-
...o
|
|
70
|
-
}) => {
|
|
71
|
-
const { horizontal: a } = e.useContext(i);
|
|
72
|
-
return /* @__PURE__ */ r(
|
|
73
|
-
"div",
|
|
74
|
-
{
|
|
75
|
-
...o,
|
|
76
|
-
className: n(c.cardActions, a && c.horizontal),
|
|
77
|
-
children: t
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
}, R = ({ children: t, className: o, ...a }) => {
|
|
81
|
-
const { titleId: s } = e.useContext(i);
|
|
82
|
-
return /* @__PURE__ */ r(
|
|
83
|
-
_,
|
|
84
|
-
{
|
|
85
|
-
...a,
|
|
86
|
-
"aria-labelledby": s,
|
|
87
|
-
className: n(c.cardActionArea, o),
|
|
88
|
-
children: t
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}, T = ({
|
|
92
|
-
as: t = "img",
|
|
93
|
-
className: o,
|
|
94
|
-
...a
|
|
95
|
-
}) => /* @__PURE__ */ r(
|
|
96
|
-
t,
|
|
97
|
-
{
|
|
98
|
-
...a,
|
|
99
|
-
className: n(c.cardImage, o)
|
|
100
|
-
}
|
|
101
|
-
), w = ({
|
|
102
|
-
children: t,
|
|
103
|
-
as: o,
|
|
104
|
-
...a
|
|
105
|
-
}) => /* @__PURE__ */ l(
|
|
106
|
-
o || C,
|
|
107
|
-
{
|
|
108
|
-
...a,
|
|
109
|
-
className: n(c.cardLink, a.className),
|
|
110
|
-
children: [
|
|
111
|
-
t,
|
|
112
|
-
/* @__PURE__ */ r(
|
|
113
|
-
x,
|
|
114
|
-
{
|
|
115
|
-
className: c.cardLinkIcon,
|
|
116
|
-
size: 24
|
|
117
|
-
}
|
|
118
|
-
)
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
);
|
|
122
|
-
export {
|
|
123
|
-
$ as C,
|
|
124
|
-
j as a,
|
|
125
|
-
E as b,
|
|
126
|
-
H as c,
|
|
127
|
-
R as d,
|
|
128
|
-
T as e,
|
|
129
|
-
w as f
|
|
130
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import * as d from "react";
|
|
3
|
-
import { F as f, G as i } from "./react-aria-components-mIKW9wOa.js";
|
|
4
|
-
import '../assets/CharacterCounter.css';const h = "_characterCounter_1f0mh_1", m = {
|
|
5
|
-
characterCounter: h
|
|
6
|
-
}, u = d.forwardRef((t, o) => {
|
|
7
|
-
[t] = f(t, o, i);
|
|
8
|
-
const { maxLength: e, value: c, isLonely: n } = t, { length: a } = c?.toString() ?? "", r = e !== void 0;
|
|
9
|
-
return /* @__PURE__ */ s(
|
|
10
|
-
"span",
|
|
11
|
-
{
|
|
12
|
-
className: m.characterCounter,
|
|
13
|
-
"data-exceeded": r && a > e || void 0,
|
|
14
|
-
"data-lonely": n || void 0,
|
|
15
|
-
children: r ? `${a} / ${e}` : a
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
export {
|
|
20
|
-
u as C
|
|
21
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import * as o from "react";
|
|
3
|
-
import v from "react";
|
|
4
|
-
import { l, aG as b, a2 as m, aH as k, aI as R, aJ as _, F as C, aK as I, aL as P, aM as G, aN as y, aO as L, aP as N } from "./react-aria-components-mIKW9wOa.js";
|
|
5
|
-
import { i as u } from "./variables-BkqZ2WGF.js";
|
|
6
|
-
import { c as w } from "./createLucideIcon-D4r5Phnh.js";
|
|
7
|
-
import { C as B } from "./check-BxlvVsvD.js";
|
|
8
|
-
import '../assets/Checkbox.css';const g = [["path", { d: "M5 12h14", key: "1ays0h" }]], D = w("minus", g), F = v.createContext(null), M = "_checkboxInner_19c98_1", O = "_checkbox_19c98_1", j = "_checkboxGroup_19c98_143", q = "_checkboxList_19c98_154", x = {
|
|
9
|
-
checkboxInner: M,
|
|
10
|
-
checkbox: O,
|
|
11
|
-
checkboxGroup: j,
|
|
12
|
-
checkboxList: q
|
|
13
|
-
}, $ = o.forwardRef((e, a) => {
|
|
14
|
-
const { hoverProps: t, isHovered: s } = e.hoverResult, { pressProps: i, isPressed: d } = e.pressResult, { isFocused: n, isFocusVisible: r, focusProps: f } = e.focusRingAria;
|
|
15
|
-
return /* @__PURE__ */ h(
|
|
16
|
-
"label",
|
|
17
|
-
{
|
|
18
|
-
ref: a,
|
|
19
|
-
...b(t, i, e.labelProps),
|
|
20
|
-
slot: e.slot || void 0,
|
|
21
|
-
className: l(x.checkbox, e.className),
|
|
22
|
-
"data-hovered": s || void 0,
|
|
23
|
-
"data-selected": e.isSelected || void 0,
|
|
24
|
-
"data-indeterminate": e.isIndeterminate || void 0,
|
|
25
|
-
"data-pressed": d || void 0,
|
|
26
|
-
"data-disabled": e.isDisabled || void 0,
|
|
27
|
-
"data-readonly": e.isReadOnly || void 0,
|
|
28
|
-
"data-invalid": e.isInvalid || void 0,
|
|
29
|
-
"data-focused": n || void 0,
|
|
30
|
-
"data-focus-visible": r || void 0,
|
|
31
|
-
"data-required": e.isRequired || void 0,
|
|
32
|
-
children: [
|
|
33
|
-
/* @__PURE__ */ c("div", { className: l(x.checkboxInner), children: e.isIndeterminate ? /* @__PURE__ */ c(
|
|
34
|
-
D,
|
|
35
|
-
{
|
|
36
|
-
size: 14,
|
|
37
|
-
color: u
|
|
38
|
-
}
|
|
39
|
-
) : /* @__PURE__ */ c(
|
|
40
|
-
B,
|
|
41
|
-
{
|
|
42
|
-
size: 14,
|
|
43
|
-
color: u
|
|
44
|
-
}
|
|
45
|
-
) }),
|
|
46
|
-
/* @__PURE__ */ c(m, { children: /* @__PURE__ */ c(
|
|
47
|
-
"input",
|
|
48
|
-
{
|
|
49
|
-
...b(e.inputProps, f),
|
|
50
|
-
ref: e.inputRef
|
|
51
|
-
}
|
|
52
|
-
) }),
|
|
53
|
-
e.children
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
}), z = o.forwardRef((e, a) => {
|
|
58
|
-
const t = k(
|
|
59
|
-
{
|
|
60
|
-
...e,
|
|
61
|
-
value: e.value || ""
|
|
62
|
-
},
|
|
63
|
-
e.state,
|
|
64
|
-
e.inputRef
|
|
65
|
-
);
|
|
66
|
-
return /* @__PURE__ */ c(
|
|
67
|
-
$,
|
|
68
|
-
{
|
|
69
|
-
...e,
|
|
70
|
-
...t,
|
|
71
|
-
ref: a
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
}), A = o.forwardRef((e, a) => {
|
|
75
|
-
const t = R(e, _(e), e.inputRef);
|
|
76
|
-
return /* @__PURE__ */ c(
|
|
77
|
-
$,
|
|
78
|
-
{
|
|
79
|
-
...e,
|
|
80
|
-
...t,
|
|
81
|
-
ref: a
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
}), Q = o.forwardRef(
|
|
85
|
-
(e, a) => {
|
|
86
|
-
[e, a] = C(e, a, N);
|
|
87
|
-
const t = I(L), s = e.validationBehavior ?? t?.validationBehavior ?? "native", i = o.useContext(F), d = o.useRef(null), n = P(e), r = G({
|
|
88
|
-
ref: a,
|
|
89
|
-
isDisabled: e.isDisabled
|
|
90
|
-
}), f = y();
|
|
91
|
-
return i ? /* @__PURE__ */ c(
|
|
92
|
-
z,
|
|
93
|
-
{
|
|
94
|
-
...e,
|
|
95
|
-
state: i,
|
|
96
|
-
inputRef: d,
|
|
97
|
-
hoverResult: n,
|
|
98
|
-
pressResult: r,
|
|
99
|
-
focusRingAria: f,
|
|
100
|
-
validationBehavior: s
|
|
101
|
-
}
|
|
102
|
-
) : /* @__PURE__ */ c(
|
|
103
|
-
A,
|
|
104
|
-
{
|
|
105
|
-
...e,
|
|
106
|
-
inputRef: d,
|
|
107
|
-
hoverResult: n,
|
|
108
|
-
pressResult: r,
|
|
109
|
-
focusRingAria: f,
|
|
110
|
-
validationBehavior: s
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
export {
|
|
116
|
-
Q as C,
|
|
117
|
-
F as a,
|
|
118
|
-
x as s
|
|
119
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import { a as v, L as C } from "./Label-CKe9pgXT.js";
|
|
3
|
-
import { T as S } from "./Text-WP6RbnnK.js";
|
|
4
|
-
import * as a from "react";
|
|
5
|
-
import { C as d, s as h, a as k } from "./Checkbox-CogzFDe3.js";
|
|
6
|
-
import { I as y, a1 as $ } from "./react-aria-components-mIKW9wOa.js";
|
|
7
|
-
import { F as g } from "./FieldError-CZKAYQ-n.js";
|
|
8
|
-
import { t as A } from "./react-stately-DRNKkAB0.js";
|
|
9
|
-
import { u as P } from "./useLocalizedStringFormatter-CPwiI7nv.js";
|
|
10
|
-
const V = (e, { value: t }) => {
|
|
11
|
-
const c = a.Children.toArray(e).filter(
|
|
12
|
-
(l) => a.isValidElement(l) && l.type === d
|
|
13
|
-
), i = a.Children.count(c), s = a.Children.toArray(e).filter((l) => a.isValidElement(l)).filter((l) => !!l && l.type === d).map((l) => l.props.value), n = t.length === 0, r = t.length === i;
|
|
14
|
-
return {
|
|
15
|
-
allSelected: r,
|
|
16
|
-
someSelected: !n && !r,
|
|
17
|
-
checkboxValues: s
|
|
18
|
-
};
|
|
19
|
-
}, b = ({ state: e, errorMessage: t }) => /* @__PURE__ */ o(y.Provider, { value: e.displayValidation, children: /* @__PURE__ */ o(g, { children: t }) }), L = { selectAll: "Select all" }, F = { selectAll: "Välj alla" }, p = {
|
|
20
|
-
en: L,
|
|
21
|
-
sv: F
|
|
22
|
-
};
|
|
23
|
-
function z(e) {
|
|
24
|
-
const t = A(e), c = P(p), { groupProps: i, labelProps: s, descriptionProps: n } = $(
|
|
25
|
-
e,
|
|
26
|
-
t
|
|
27
|
-
), { allSelected: r, someSelected: m, checkboxValues: l } = V(
|
|
28
|
-
e.children,
|
|
29
|
-
t
|
|
30
|
-
), u = (x) => {
|
|
31
|
-
t.setValue(x ? l : []);
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ f(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
...i,
|
|
37
|
-
className: h.checkboxGroup,
|
|
38
|
-
"data-readonly": e.isReadOnly || void 0,
|
|
39
|
-
"data-disabled": e.isDisabled || void 0,
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ o(v, { popover: e.popover, children: e.label && /* @__PURE__ */ o(C, { ...s, children: e.label }) }),
|
|
42
|
-
e.description && /* @__PURE__ */ o(
|
|
43
|
-
S,
|
|
44
|
-
{
|
|
45
|
-
slot: "description",
|
|
46
|
-
...n,
|
|
47
|
-
children: e.description
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
e.errorPosition === "top" && /* @__PURE__ */ o(
|
|
51
|
-
b,
|
|
52
|
-
{
|
|
53
|
-
...e,
|
|
54
|
-
state: t
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
/* @__PURE__ */ f("div", { className: h.checkboxList, children: [
|
|
58
|
-
e.showSelectAll && /* @__PURE__ */ o(
|
|
59
|
-
d,
|
|
60
|
-
{
|
|
61
|
-
isSelected: r,
|
|
62
|
-
isIndeterminate: m,
|
|
63
|
-
isReadOnly: e.isReadOnly,
|
|
64
|
-
onChange: u,
|
|
65
|
-
children: e.selectAllLabel || c.format("selectAll")
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ o(k.Provider, { value: t, children: e.children })
|
|
69
|
-
] }),
|
|
70
|
-
e.errorPosition === "bottom" && /* @__PURE__ */ o(
|
|
71
|
-
b,
|
|
72
|
-
{
|
|
73
|
-
...e,
|
|
74
|
-
state: t
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
export {
|
|
82
|
-
z as C
|
|
83
|
-
};
|