@midas-ds/components 17.29.0 → 17.30.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 +16 -0
- package/accordion/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +1 -1
- package/card/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/chunks/FeedbackStatusIcon-DvMDGBGL.js +36 -0
- package/chunks/{accordion-DIVTJU3O.js → accordion-DlVM6IKH.js} +24 -24
- package/chunks/{badge-BfK6XrlL.js → badge-C4bXJmhn.js} +1 -1
- package/chunks/{breadcrumbs-DV0ZJc62.js → breadcrumbs-BGnyY3bO.js} +1 -1
- package/chunks/{button-CenXTGXL.js → button-dpe6hXmI.js} +2 -2
- package/chunks/calendar-BnT8aqrk.js +108 -0
- package/chunks/card-C0S9Kyi2.js +103 -0
- package/chunks/checkbox-B1RWLsu9.js +106 -0
- package/chunks/clear-button-DWtOkhCH.js +17 -0
- package/chunks/clsx-DAqHMl_k.js +7 -0
- package/chunks/color-scheme-switch-DVyIszaD.js +160 -0
- package/chunks/{combobox-DIou4Z-d.js → combobox-BLAVO2ax.js} +25 -25
- package/chunks/{date-field-BF2f9bSf.js → date-field-D5QLfSD_.js} +5 -5
- package/chunks/date-picker-BWSHiwIN.js +142 -0
- package/chunks/{drop-zone-DH3ZyHsr.js → drop-zone-DNhEbH4w.js} +1 -1
- package/chunks/{field-error-LtNtEKDp.js → field-error-BHoPnRe4.js} +2 -2
- package/chunks/file-list-Ntos8dkG.js +139 -0
- package/chunks/{grid-Cn_8RSvj.js → grid-BR68fpvW.js} +1 -1
- package/chunks/{heading-BEl_z-5T.js → heading-DcOjYrUM.js} +1 -1
- package/chunks/{info-banner-osR4e6nB.js → info-banner-DXjPEG69.js} +15 -15
- package/chunks/label-pGlER0ro.js +50 -0
- package/chunks/layout-Bue2Lkbc.js +378 -0
- package/chunks/link-B76JDA2N.js +44 -0
- package/chunks/link-button-BeXxC22w.js +44 -0
- package/chunks/{list-box-BN_MSiOD.js → list-box-BzBJX0nP.js} +3 -3
- package/chunks/{logo-DyZ2pXt7.js → logo-DSJ1bUJZ.js} +1 -1
- package/chunks/menu-DbQ98noD.js +48 -0
- package/chunks/modal-C8rs1jfL.js +66 -0
- package/chunks/{popover-DGcogqbS.js → popover-B82BcP5n.js} +1 -1
- package/chunks/{progress-bar-CknF4qAm.js → progress-bar-S6GNHQRZ.js} +2 -2
- package/chunks/{radio-BD1EuxSa.js → radio-uAtTm38S.js} +4 -4
- package/chunks/search-field-Bx3JApAJ.js +91 -0
- package/chunks/select-CuKVJ1x9.js +177 -0
- package/chunks/{skeleton-B_BPRPJy.js → skeleton-R_3dS7Ro.js} +1 -1
- package/chunks/spinner-CIjfJeGm.js +29 -0
- package/chunks/{stack-LF3ExhH9.js → stack-BAHKom_Q.js} +1 -1
- package/chunks/table-DDTeIVh8.js +84 -0
- package/chunks/{tabs-Co09VWvC.js → tabs-owuRVJ3N.js} +1 -1
- package/chunks/tag-BEawJnJm.js +78 -0
- package/chunks/{text-DwmZ-ew8.js → text-DnvD4Cjc.js} +1 -1
- package/chunks/textfield-G6u6RJD5.js +113 -0
- package/chunks/{time-field-CmjGBQph.js → time-field-Mm1iDLzS.js} +6 -6
- package/chunks/{toast-gJgjitZF.js → toast-DZuvVRD_.js} +21 -21
- package/chunks/{toggle-button-CIvsOXQf.js → toggle-button-DD_bXanH.js} +1 -1
- package/chunks/{tooltip-BkesIUIF.js → tooltip-1GBTeMrm.js} +1 -1
- 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/drop-zone/index.js +1 -1
- package/field-error/index.js +1 -1
- package/file-list/index.js +1 -1
- package/grid/index.js +1 -1
- package/heading/index.js +1 -1
- package/index.js +52 -50
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/Layout.d.ts +1 -2
- package/layout/context/LayoutContext.d.ts +7 -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 +1 -1
- package/logo/index.js +1 -1
- package/menu/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +4 -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/spinner/index.js +1 -1
- package/stack/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/time-field/index.js +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.js +1 -1
- package/tooltip/index.js +1 -1
- package/accordion/Accordion.stories.d.ts +0 -23
- package/accordion/AccordionItem.stories.d.ts +0 -25
- package/badge/Badge.stories.d.ts +0 -17
- package/breadcrumbs/Breadcrumbs.stories.d.ts +0 -25
- package/button/Button.stories.d.ts +0 -25
- package/button/ButtonGroup.stories.d.ts +0 -15
- package/calendar/Calendar.stories.d.ts +0 -17
- package/calendar/RangeCalendar.stories.d.ts +0 -15
- package/card/Card.stories.d.ts +0 -19
- package/checkbox/Checkbox.stories.d.ts +0 -30
- package/checkbox/CheckboxGroup.stories.d.ts +0 -31
- package/chunks/FeedbackStatusIcon-DRI7WrSU.js +0 -54
- package/chunks/arrow-right-Db_H9KjE.js +0 -10
- package/chunks/calendar-Bl_obez5.js +0 -111
- package/chunks/card-zIYA-SQh.js +0 -103
- package/chunks/check-DV00NPU0.js +0 -7
- package/chunks/checkbox-Bqd8B58G.js +0 -110
- package/chunks/chevron-down-CP7nEDei.js +0 -7
- package/chunks/chevron-right-DwqboCdU.js +0 -7
- package/chunks/clear-button-D3I1X3yG.js +0 -17
- package/chunks/clsx-Di52oYUU.js +0 -23
- package/chunks/color-scheme-switch-DVZjdwc9.js +0 -203
- package/chunks/createLucideIcon-BgluSHFG.js +0 -39
- package/chunks/date-picker-DZivTUB_.js +0 -187
- package/chunks/file-list-B4vG_egr.js +0 -161
- package/chunks/info-jCyacVsy.js +0 -19
- package/chunks/label-LWlgvAwz.js +0 -50
- package/chunks/layout-Db5um0f7.js +0 -426
- package/chunks/link-BAgs4RwY.js +0 -59
- package/chunks/link-button-BuPMEGUj.js +0 -52
- package/chunks/menu-aT2IR0tO.js +0 -49
- package/chunks/modal-C-UsxdO0.js +0 -66
- package/chunks/search-field-GNTRFpzf.js +0 -100
- package/chunks/select-oLCNpryY.js +0 -177
- package/chunks/spinner-LdHPVms_.js +0 -32
- package/chunks/square-arrow-out-up-right-DkgXD7hj.js +0 -17
- package/chunks/table-CmNWoAYO.js +0 -150
- package/chunks/tag-BIcqtf7b.js +0 -78
- package/chunks/textfield-BSvCsAyC.js +0 -112
- package/chunks/x-BJAOO5a5.js +0 -10
- package/color-scheme-switch/ColorSchemeSwitch.stories.d.ts +0 -7
- package/color-scheme-switch/ColorSchemeSwitchMenu.stories.d.ts +0 -8
- package/combobox/ComboBox.stories.d.ts +0 -43
- package/date-field/DateField.stories.d.ts +0 -15
- package/date-picker/DatePicker.stories.d.ts +0 -17
- package/date-picker/DateRangePicker.stories.d.ts +0 -39
- package/drop-zone/DropZone.stories.d.ts +0 -16
- package/file-list/FileList.stories.d.ts +0 -31
- package/grid/Grid.stories.d.ts +0 -28
- package/heading/Heading.stories.d.ts +0 -30
- package/info-banner/InfoBanner.stories.d.ts +0 -16
- package/label/Label.stories.d.ts +0 -10
- package/layout/Layout.stories.d.ts +0 -9
- package/link/Link.stories.d.ts +0 -14
- package/link-button/LinkButton.stories.d.ts +0 -13
- package/list-box/ListBox.stories.d.ts +0 -24
- package/logo/Logo.stories.d.ts +0 -7
- package/menu/Menu.stories.d.ts +0 -35
- package/modal/Modal.stories.d.ts +0 -15
- package/popover/Popover.stories.d.ts +0 -18
- package/progress-bar/ProgressBar.stories.d.ts +0 -18
- package/radio/Radio.stories.d.ts +0 -110
- package/radio/RadioGroup.stories.d.ts +0 -27
- package/search-field/SearchField.stories.d.ts +0 -34
- package/select/Select.stories.d.ts +0 -53
- package/skeleton/Skeleton.Form.stories.d.ts +0 -20
- package/skeleton/Skeleton.stories.d.ts +0 -10
- package/spinner/Spinner.stories.d.ts +0 -20
- package/stack/Stack.stories.d.ts +0 -24
- package/table/Table.stories.d.ts +0 -39
- package/tabs/Tabs.stories.d.ts +0 -31
- package/tag/Tag.stories.d.ts +0 -17
- package/text/Text.stories.d.ts +0 -10
- package/textfield/TextArea.stories.d.ts +0 -365
- package/textfield/TextField.stories.d.ts +0 -39
- package/time-field/TimeField.stories.d.ts +0 -37
- package/toast/Toast.stories.d.ts +0 -24
- package/tooltip/Tooltip.stories.d.ts +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 17.30.1 (2026-10-09)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **components,layout,table-styles:** declare public type packages ([#1406](https://github.com/migrationsverket/midas/pull/1406))
|
|
6
|
+
|
|
7
|
+
## 17.30.0 (2026-10-09)
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
|
|
11
|
+
- **components,layout,table-styles:** depend on lucide-react ([#1405](https://github.com/migrationsverket/midas/pull/1405))
|
|
12
|
+
|
|
13
|
+
### 🧱 Updated Dependencies
|
|
14
|
+
|
|
15
|
+
- Updated theme to 3.17.7
|
|
16
|
+
|
|
1
17
|
## 17.29.0 (2026-10-09)
|
|
2
18
|
|
|
3
19
|
### 🚀 Features
|
package/accordion/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/accordion-
|
|
1
|
+
import { n as e, t } from "../chunks/accordion-DlVM6IKH.js";
|
|
2
2
|
export { e as Accordion, t as AccordionItem };
|
package/badge/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/badge-
|
|
1
|
+
import { n as e, t } from "../chunks/badge-C4bXJmhn.js";
|
|
2
2
|
export { e as Badge, t as BadgeContainer };
|
package/breadcrumbs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/breadcrumbs-
|
|
1
|
+
import { n as e, t } from "../chunks/breadcrumbs-BGnyY3bO.js";
|
|
2
2
|
export { t as Breadcrumb, e as Breadcrumbs };
|
package/button/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/button-
|
|
1
|
+
import { n as e, t } from "../chunks/button-dpe6hXmI.js";
|
|
2
2
|
export { e as Button, t as ButtonGroup };
|
package/calendar/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/calendar-
|
|
1
|
+
import { n as e, t } from "../chunks/calendar-BnT8aqrk.js";
|
|
2
2
|
export { e as Calendar, t as RangeCalendar };
|
package/card/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../chunks/card-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../chunks/card-C0S9Kyi2.js";
|
|
2
2
|
export { o as Card, n as CardActionArea, e as CardActions, i as CardBody, a as CardContent, c as CardHeader, s as CardImage, t as CardLink, r as CardTitle };
|
package/checkbox/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../chunks/checkbox-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../chunks/checkbox-B1RWLsu9.js";
|
|
2
2
|
export { t as Checkbox, n as CheckboxButton, e as CheckboxField, r as CheckboxGroup };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { t as e } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Check as n, Flag as r, Info as i, TriangleAlert as a } from "lucide-react";
|
|
4
|
+
var o = {
|
|
5
|
+
en: {
|
|
6
|
+
ok: "okay",
|
|
7
|
+
information: "information",
|
|
8
|
+
importantInformation: "important information",
|
|
9
|
+
warning: "warning"
|
|
10
|
+
},
|
|
11
|
+
sv: {
|
|
12
|
+
ok: "okej",
|
|
13
|
+
information: "information",
|
|
14
|
+
importantInformation: "viktig information",
|
|
15
|
+
warning: "varning"
|
|
16
|
+
}
|
|
17
|
+
}, s = {
|
|
18
|
+
success: n,
|
|
19
|
+
info: i,
|
|
20
|
+
important: r,
|
|
21
|
+
warning: a
|
|
22
|
+
}, c = {
|
|
23
|
+
success: "ok",
|
|
24
|
+
info: "information",
|
|
25
|
+
important: "importantInformation",
|
|
26
|
+
warning: "warning"
|
|
27
|
+
}, l = ({ status: n, "aria-label": r, size: i = 20, ...a }) => {
|
|
28
|
+
let l = e(o), u = s[n];
|
|
29
|
+
return /* @__PURE__ */ t(u, {
|
|
30
|
+
"aria-label": r || l.format(c[n]),
|
|
31
|
+
size: i,
|
|
32
|
+
...a
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { l as t };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as e } from "./clsx-
|
|
3
|
-
import { t } from "./
|
|
4
|
-
import { t as n } from "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { t as e } from "./clsx-DAqHMl_k.js";
|
|
3
|
+
import { n as t } from "./button-dpe6hXmI.js";
|
|
4
|
+
import { t as n } from "./heading-DcOjYrUM.js";
|
|
5
|
+
import { t as r } from "./FeedbackStatusIcon-DvMDGBGL.js";
|
|
6
|
+
import { createContext as i, useContext as a, useEffect as o } from "react";
|
|
7
|
+
import { Disclosure as s, DisclosureGroup as c, DisclosurePanel as l, composeRenderProps as u } from "react-aria-components";
|
|
8
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
import { ChevronDown as m } from "lucide-react";
|
|
10
10
|
import '../assets/accordion.css';var h = {
|
|
11
11
|
root: "_root_17bdp_1",
|
|
12
12
|
contained: "_contained_17bdp_5",
|
|
13
13
|
triggerButton: "_triggerButton_17bdp_12"
|
|
14
|
-
}, g =
|
|
14
|
+
}, g = i(void 0), _ = ({ children: t, className: n, isContained: r, size: i = "large", ...a }) => /* @__PURE__ */ f(g.Provider, {
|
|
15
15
|
value: {
|
|
16
16
|
isContained: r,
|
|
17
17
|
size: i
|
|
18
18
|
},
|
|
19
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ f(c, {
|
|
20
20
|
className: e(h.root, r ? h.contained : h.uncontained, n),
|
|
21
21
|
...a,
|
|
22
22
|
children: t
|
|
@@ -40,45 +40,45 @@ import '../assets/accordion.css';var h = {
|
|
|
40
40
|
content: "_content_1ghre_133",
|
|
41
41
|
hasBackground: "_hasBackground_1ghre_138",
|
|
42
42
|
header: "_header_1ghre_146"
|
|
43
|
-
}, y = ({ title:
|
|
44
|
-
let T =
|
|
45
|
-
return
|
|
43
|
+
}, y = ({ title: i, children: c, className: h, headingLevel: _ = "h2", type: y, hasBackground: b = !0, size: x = "large", isContained: S, iconAriaLabel: C, ...w }) => {
|
|
44
|
+
let T = a(g), E = S ?? T?.isContained ?? !1, D = typeof i == "object";
|
|
45
|
+
return o(() => {
|
|
46
46
|
y && !E && console.warn("AccordionItem: When 'type' is set, it is recommended to also set 'isContained' to true for visual consistency.");
|
|
47
|
-
}, [y, E]), /* @__PURE__ */
|
|
47
|
+
}, [y, E]), /* @__PURE__ */ f(s, {
|
|
48
48
|
...w,
|
|
49
49
|
className: e(v.item, y && E && v[y], (x === "medium" || T?.size === "medium") && v.medium, E && v.contained, h),
|
|
50
|
-
children:
|
|
50
|
+
children: u(c, (a) => /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
|
|
51
51
|
className: v.trigger,
|
|
52
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ p(t, {
|
|
53
53
|
className: v.triggerButton,
|
|
54
54
|
slot: "trigger",
|
|
55
55
|
variant: "icon",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ f(m, {
|
|
58
58
|
size: 20,
|
|
59
59
|
className: v.chevronIcon
|
|
60
60
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ f("div", {
|
|
62
62
|
className: v.triggerMainContent,
|
|
63
|
-
children: D ?
|
|
63
|
+
children: D ? i : /* @__PURE__ */ f(n, {
|
|
64
64
|
level: 3,
|
|
65
65
|
elementType: _,
|
|
66
66
|
className: v.triggerText,
|
|
67
|
-
children:
|
|
67
|
+
children: i
|
|
68
68
|
})
|
|
69
69
|
}),
|
|
70
|
-
y && E && /* @__PURE__ */
|
|
70
|
+
y && E && /* @__PURE__ */ f(r, {
|
|
71
71
|
"aria-label": C,
|
|
72
72
|
className: v.statusIcon,
|
|
73
73
|
status: y
|
|
74
74
|
})
|
|
75
75
|
]
|
|
76
76
|
})
|
|
77
|
-
}), /* @__PURE__ */
|
|
77
|
+
}), /* @__PURE__ */ f(l, {
|
|
78
78
|
className: v.panel,
|
|
79
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ f("div", {
|
|
80
80
|
className: e(v.content, b && v.hasBackground),
|
|
81
|
-
children:
|
|
81
|
+
children: a
|
|
82
82
|
})
|
|
83
83
|
})] }))
|
|
84
84
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./clsx-
|
|
1
|
+
import { t as e } from "./clsx-DAqHMl_k.js";
|
|
2
2
|
import { Breadcrumb as t, Breadcrumbs as n } from "react-aria-components";
|
|
3
3
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
4
|
import '../assets/breadcrumbs.css';var o = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { t as e } from "./clsx-
|
|
3
|
-
import { t } from "./spinner-
|
|
2
|
+
import { t as e } from "./clsx-DAqHMl_k.js";
|
|
3
|
+
import { t } from "./spinner-CIjfJeGm.js";
|
|
4
4
|
import { t as n } from "./Button.module-0C2ArlRs.js";
|
|
5
5
|
import { forwardRef as r } from "react";
|
|
6
6
|
import { Button as i, ButtonContext as a, composeRenderProps as o, useContextProps as s } from "react-aria-components";
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { t as e } from "./clsx-DAqHMl_k.js";
|
|
2
|
+
import { n as t } from "./button-dpe6hXmI.js";
|
|
3
|
+
import { t as n } from "./heading-DcOjYrUM.js";
|
|
4
|
+
import { t as r } from "./field-error-BHoPnRe4.js";
|
|
5
|
+
import { n as i } from "./select-CuKVJ1x9.js";
|
|
6
|
+
import { a, c as o, o as s } from "./list-box-BzBJX0nP.js";
|
|
7
|
+
import * as c from "react";
|
|
8
|
+
import { clsx as l } from "clsx";
|
|
9
|
+
import { Calendar as u, CalendarCell as d, CalendarGrid as f, CalendarMonthPicker as p, CalendarYearPicker as m, RangeCalendar as h, RangeCalendarContext as g, Select as _ } from "react-aria-components";
|
|
10
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
+
import { ChevronLeft as b, ChevronRight as x } from "lucide-react";
|
|
12
|
+
import '../assets/calendar.css';var S = {
|
|
13
|
+
container: "_container_mn6zv_1",
|
|
14
|
+
calendar: "_calendar_mn6zv_6",
|
|
15
|
+
day: "_day_mn6zv_28",
|
|
16
|
+
header: "_header_mn6zv_90",
|
|
17
|
+
pickers: "_pickers_mn6zv_130",
|
|
18
|
+
range: "_range_mn6zv_180"
|
|
19
|
+
}, C = ({ weekdayStyle: t = "short", isReadOnly: n }) => {
|
|
20
|
+
let r = !!c.useContext(g);
|
|
21
|
+
return /* @__PURE__ */ v(f, {
|
|
22
|
+
weekdayStyle: t,
|
|
23
|
+
children: (t) => /* @__PURE__ */ v(d, {
|
|
24
|
+
date: t,
|
|
25
|
+
className: e(S.day, r && S.range),
|
|
26
|
+
"data-readonly": n || void 0
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}, w = ({ isDisabled: e, isReadOnly: t, items: n, ...r }) => /* @__PURE__ */ y(_, {
|
|
30
|
+
isDisabled: e,
|
|
31
|
+
"data-readonly": t || void 0,
|
|
32
|
+
...r,
|
|
33
|
+
children: [/* @__PURE__ */ v(i, {
|
|
34
|
+
size: "small",
|
|
35
|
+
isDisabled: e
|
|
36
|
+
}), /* @__PURE__ */ v(a, { children: /* @__PURE__ */ v(o, {
|
|
37
|
+
items: n,
|
|
38
|
+
virtualized: !1,
|
|
39
|
+
size: "small",
|
|
40
|
+
children: (e) => /* @__PURE__ */ v(s, {
|
|
41
|
+
id: e.id,
|
|
42
|
+
textValue: e.formatted,
|
|
43
|
+
children: e.formatted
|
|
44
|
+
})
|
|
45
|
+
}) })]
|
|
46
|
+
}), T = ({ isDisabled: e, isReadOnly: r, showMonthYearPicker: i }) => {
|
|
47
|
+
let a = (t) => /* @__PURE__ */ v(w, {
|
|
48
|
+
...t,
|
|
49
|
+
isDisabled: e,
|
|
50
|
+
isReadOnly: r
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ y("header", {
|
|
53
|
+
className: S.header,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ v(t, {
|
|
56
|
+
slot: "previous",
|
|
57
|
+
size: "medium",
|
|
58
|
+
"data-readonly": r || void 0,
|
|
59
|
+
children: /* @__PURE__ */ v(b, { size: 20 })
|
|
60
|
+
}),
|
|
61
|
+
i ? /* @__PURE__ */ y("div", {
|
|
62
|
+
className: S.pickers,
|
|
63
|
+
children: [/* @__PURE__ */ v(p, { children: a }), /* @__PURE__ */ v(m, { children: a })]
|
|
64
|
+
}) : /* @__PURE__ */ v(n, {
|
|
65
|
+
level: 3,
|
|
66
|
+
elementType: "h2",
|
|
67
|
+
"data-disabled": e || void 0
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ v(t, {
|
|
70
|
+
slot: "next",
|
|
71
|
+
size: "medium",
|
|
72
|
+
"data-readonly": r || void 0,
|
|
73
|
+
children: /* @__PURE__ */ v(x, { size: 20 })
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
}, E = ({ className: e, errorMessage: t, showMonthYearPicker: n, ...i }) => /* @__PURE__ */ y("div", {
|
|
78
|
+
className: S.container,
|
|
79
|
+
children: [/* @__PURE__ */ y(u, {
|
|
80
|
+
className: l(S.calendar, e),
|
|
81
|
+
"data-readonly": i.isReadOnly || void 0,
|
|
82
|
+
...i,
|
|
83
|
+
children: [/* @__PURE__ */ v(T, {
|
|
84
|
+
...i,
|
|
85
|
+
showMonthYearPicker: n
|
|
86
|
+
}), /* @__PURE__ */ v(C, { ...i })]
|
|
87
|
+
}), /* @__PURE__ */ v(r, {
|
|
88
|
+
isInvalid: i.isInvalid,
|
|
89
|
+
children: t
|
|
90
|
+
})]
|
|
91
|
+
}), D = ({ className: e, errorMessage: t, showMonthYearPicker: n, commitBehavior: i, ...a }) => /* @__PURE__ */ y("div", {
|
|
92
|
+
className: S.container,
|
|
93
|
+
children: [/* @__PURE__ */ y(h, {
|
|
94
|
+
className: l(S.calendar, e),
|
|
95
|
+
"data-readonly": a.isReadOnly || void 0,
|
|
96
|
+
commitBehavior: i ?? (n ? "reset" : void 0),
|
|
97
|
+
...a,
|
|
98
|
+
children: [/* @__PURE__ */ v(T, {
|
|
99
|
+
...a,
|
|
100
|
+
showMonthYearPicker: n
|
|
101
|
+
}), /* @__PURE__ */ v(C, { ...a })]
|
|
102
|
+
}), /* @__PURE__ */ v(r, {
|
|
103
|
+
isInvalid: a.isInvalid,
|
|
104
|
+
children: t
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
//#endregion
|
|
108
|
+
export { E as n, D as t };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { t as e } from "./clsx-DAqHMl_k.js";
|
|
2
|
+
import { t } from "./heading-DcOjYrUM.js";
|
|
3
|
+
import { t as n } from "./text-DnvD4Cjc.js";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { Button as i, Link as a } from "react-aria-components";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { ArrowRight as c } from "lucide-react";
|
|
8
|
+
import '../assets/card.css';var l = {
|
|
9
|
+
card: "_card_yandx_1",
|
|
10
|
+
horizontal: "_horizontal_yandx_26",
|
|
11
|
+
cardLink: "_cardLink_yandx_31",
|
|
12
|
+
cardContent: "_cardContent_yandx_42",
|
|
13
|
+
cardActions: "_cardActions_yandx_61",
|
|
14
|
+
deprecated: "_deprecated_yandx_75",
|
|
15
|
+
cardActionArea: "_cardActionArea_yandx_81",
|
|
16
|
+
cardImage: "_cardImage_yandx_114",
|
|
17
|
+
cardLinkIcon: "_cardLinkIcon_yandx_146"
|
|
18
|
+
}, u = r.createContext({
|
|
19
|
+
horizontal: void 0,
|
|
20
|
+
titleId: void 0
|
|
21
|
+
}), d = r.createContext(void 0), f = ({ horizontal: t, className: n, children: i, ...a }) => {
|
|
22
|
+
let s = `card-title-${r.useId()}`;
|
|
23
|
+
return /* @__PURE__ */ o(u.Provider, {
|
|
24
|
+
value: {
|
|
25
|
+
horizontal: t,
|
|
26
|
+
titleId: s
|
|
27
|
+
},
|
|
28
|
+
children: /* @__PURE__ */ o("div", {
|
|
29
|
+
...a,
|
|
30
|
+
className: e(l.card, t && l.horizontal, n),
|
|
31
|
+
children: i
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}, p = ({ children: t, ...n }) => {
|
|
35
|
+
let { horizontal: i } = r.useContext(u);
|
|
36
|
+
return /* @__PURE__ */ o(d.Provider, {
|
|
37
|
+
value: {},
|
|
38
|
+
children: /* @__PURE__ */ o("div", {
|
|
39
|
+
...n,
|
|
40
|
+
className: e(l.cardContent, i && l.horizontal),
|
|
41
|
+
children: t
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}, m = ({ elementType: n = "h2", children: i, className: a, ...s }) => {
|
|
45
|
+
let { horizontal: c, titleId: d } = r.useContext(u);
|
|
46
|
+
return /* @__PURE__ */ o(t, {
|
|
47
|
+
level: 3,
|
|
48
|
+
elementType: n,
|
|
49
|
+
className: e(a, l.cardTitle, c && l.horizontal),
|
|
50
|
+
id: d,
|
|
51
|
+
...s,
|
|
52
|
+
children: i
|
|
53
|
+
});
|
|
54
|
+
}, h = ({ children: t, ...n }) => {
|
|
55
|
+
let { horizontal: i } = r.useContext(u), a = !!r.useContext(d);
|
|
56
|
+
return /* @__PURE__ */ o("div", {
|
|
57
|
+
...n,
|
|
58
|
+
className: e(l.cardActions, i && l.horizontal, a && l.deprecated),
|
|
59
|
+
children: t
|
|
60
|
+
});
|
|
61
|
+
}, g = ({ children: t, className: n, ...a }) => {
|
|
62
|
+
let { titleId: s } = r.useContext(u);
|
|
63
|
+
return /* @__PURE__ */ o(i, {
|
|
64
|
+
...a,
|
|
65
|
+
"aria-labelledby": s,
|
|
66
|
+
className: e(l.cardActionArea, n),
|
|
67
|
+
children: t
|
|
68
|
+
});
|
|
69
|
+
}, _ = ({ as: t = "img", className: n, ...r }) => /* @__PURE__ */ o(t, {
|
|
70
|
+
...r,
|
|
71
|
+
"data-card-image": !0,
|
|
72
|
+
className: e(l.cardImage, n)
|
|
73
|
+
}), v = ({ children: t, as: n, ...r }) => /* @__PURE__ */ s(n || a, {
|
|
74
|
+
...r,
|
|
75
|
+
className: e(l.cardLink, r.className),
|
|
76
|
+
children: [t, /* @__PURE__ */ o(c, {
|
|
77
|
+
className: l.cardLinkIcon,
|
|
78
|
+
size: 24
|
|
79
|
+
})]
|
|
80
|
+
}), y = { cardBody: "_cardBody_337uy_1" }, b = ({ className: t, ...n }) => /* @__PURE__ */ o("div", {
|
|
81
|
+
className: e(t, y.cardBody),
|
|
82
|
+
...n
|
|
83
|
+
}), x = {
|
|
84
|
+
cardHeader: "_cardHeader_1625c_1",
|
|
85
|
+
textContainer: "_textContainer_1625c_14",
|
|
86
|
+
subHeading: "_subHeading_1625c_20"
|
|
87
|
+
}, S = ({ children: t, className: r, heading: i, headingLevel: a, subHeading: c, ...l }) => /* @__PURE__ */ s("div", {
|
|
88
|
+
className: e(r, x.cardHeader),
|
|
89
|
+
...l,
|
|
90
|
+
children: [/* @__PURE__ */ s("div", {
|
|
91
|
+
className: x.textContainer,
|
|
92
|
+
children: [/* @__PURE__ */ o(m, {
|
|
93
|
+
elementType: a,
|
|
94
|
+
children: i
|
|
95
|
+
}), c && /* @__PURE__ */ o(n, {
|
|
96
|
+
slot: "description",
|
|
97
|
+
className: x.subHeading,
|
|
98
|
+
children: c
|
|
99
|
+
})]
|
|
100
|
+
}), t]
|
|
101
|
+
});
|
|
102
|
+
//#endregion
|
|
103
|
+
export { h as a, v as c, g as i, m as l, b as n, p as o, f as r, _ as s, S as t };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-DAqHMl_k.js";
|
|
3
|
+
import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
4
|
+
import { n, t as r } from "./label-pGlER0ro.js";
|
|
5
|
+
import { t as i } from "./text-DnvD4Cjc.js";
|
|
6
|
+
import { t as a } from "./field-error-BHoPnRe4.js";
|
|
7
|
+
import { t as o } from "./splitDataAttributes-_JTFOOIb.js";
|
|
8
|
+
import * as s from "react";
|
|
9
|
+
import { forwardRef as c, useContext as l } from "react";
|
|
10
|
+
import { CheckboxButton as u, CheckboxField as d, CheckboxGroup as f, CheckboxGroupStateContext as p, composeRenderProps as m } from "react-aria-components";
|
|
11
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
|
+
import { Check as v, Minus as y } from "lucide-react";
|
|
13
|
+
import { variables as b } from "@midas-ds/theme";
|
|
14
|
+
import '../assets/checkbox.css';var x = {
|
|
15
|
+
indicator: "_indicator_3jfn4_1",
|
|
16
|
+
checkboxButton: "_checkboxButton_3jfn4_27",
|
|
17
|
+
checkboxField: "_checkboxField_3jfn4_144",
|
|
18
|
+
checkboxGroup: "_checkboxGroup_3jfn4_155",
|
|
19
|
+
checkboxList: "_checkboxList_3jfn4_166"
|
|
20
|
+
}, S = ({ className: t, ...n }) => /* @__PURE__ */ g(d, {
|
|
21
|
+
className: e(x.checkboxField, t),
|
|
22
|
+
...n
|
|
23
|
+
}), C = c(({ className: t, ...n }, r) => /* @__PURE__ */ g(u, {
|
|
24
|
+
className: e(x.checkboxButton, t),
|
|
25
|
+
ref: r,
|
|
26
|
+
...n
|
|
27
|
+
})), w = c(({ className: e, description: t, errorMessage: n, errorPosition: r = "top", children: s, ...c }, l) => {
|
|
28
|
+
let [u, d] = o(c);
|
|
29
|
+
return /* @__PURE__ */ _(S, {
|
|
30
|
+
...d,
|
|
31
|
+
children: [
|
|
32
|
+
t && /* @__PURE__ */ g(i, {
|
|
33
|
+
slot: "description",
|
|
34
|
+
children: t
|
|
35
|
+
}),
|
|
36
|
+
r === "top" && /* @__PURE__ */ g(a, { children: n }),
|
|
37
|
+
/* @__PURE__ */ g(C, {
|
|
38
|
+
...u,
|
|
39
|
+
ref: l,
|
|
40
|
+
className: e,
|
|
41
|
+
children: ({ isIndeterminate: e }) => /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
|
|
42
|
+
className: x.indicator,
|
|
43
|
+
children: g(e ? y : v, {
|
|
44
|
+
size: 14,
|
|
45
|
+
color: b.iconOnColor
|
|
46
|
+
})
|
|
47
|
+
}), s] })
|
|
48
|
+
}),
|
|
49
|
+
r === "bottom" && /* @__PURE__ */ g(a, { children: n })
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
w.displayName = "Checkbox";
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/checkbox/useSelectAll.ts
|
|
56
|
+
var T = (e, t) => {
|
|
57
|
+
let n = t?.value ?? [], r = s.Children.toArray(e).filter((e) => s.isValidElement(e) && e.type === w), i = r.filter((e) => !e.props.isDisabled).map((e) => e.props.value || ""), a = r.filter((e) => e.props.isDisabled).map((e) => e.props.value || "").filter((e) => n.includes(e)), o = n.filter((e) => i.includes(e)).length, c = o === 0, l = o === i.length;
|
|
58
|
+
return {
|
|
59
|
+
allSelected: l,
|
|
60
|
+
someSelected: !c && !l,
|
|
61
|
+
checkboxValues: i,
|
|
62
|
+
disabledSelectedValues: a
|
|
63
|
+
};
|
|
64
|
+
}, E = {
|
|
65
|
+
en: { selectAll: "Select all" },
|
|
66
|
+
sv: { selectAll: "Välj alla" }
|
|
67
|
+
}, D = ({ checkboxes: e, label: n }) => {
|
|
68
|
+
let r = l(p), i = t(E), { allSelected: a, someSelected: o, checkboxValues: s, disabledSelectedValues: c } = T(e, r);
|
|
69
|
+
return /* @__PURE__ */ g(p.Provider, {
|
|
70
|
+
value: null,
|
|
71
|
+
children: /* @__PURE__ */ g(w, {
|
|
72
|
+
isSelected: a,
|
|
73
|
+
isIndeterminate: o,
|
|
74
|
+
isReadOnly: r?.isReadOnly,
|
|
75
|
+
isDisabled: r?.isDisabled,
|
|
76
|
+
onChange: (e) => {
|
|
77
|
+
r?.setValue(e ? [...s, ...c] : c);
|
|
78
|
+
},
|
|
79
|
+
children: n || i.format("selectAll")
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
}, O = ({ label: t, description: o, errorMessage: s, errorPosition: c = "top", popover: l, showSelectAll: u, selectAllLabel: d, className: p, children: v, ...y }) => /* @__PURE__ */ g(f, {
|
|
83
|
+
...y,
|
|
84
|
+
className: e(x.checkboxGroup, p),
|
|
85
|
+
children: m(v, (e) => /* @__PURE__ */ _(h, { children: [
|
|
86
|
+
/* @__PURE__ */ g(n, {
|
|
87
|
+
popover: l,
|
|
88
|
+
children: t && /* @__PURE__ */ g(r, { children: t })
|
|
89
|
+
}),
|
|
90
|
+
o && /* @__PURE__ */ g(i, {
|
|
91
|
+
slot: "description",
|
|
92
|
+
children: o
|
|
93
|
+
}),
|
|
94
|
+
c === "top" && s && /* @__PURE__ */ g(a, { children: s }),
|
|
95
|
+
/* @__PURE__ */ _("div", {
|
|
96
|
+
className: x.checkboxList,
|
|
97
|
+
children: [u && /* @__PURE__ */ g(D, {
|
|
98
|
+
label: d,
|
|
99
|
+
checkboxes: e
|
|
100
|
+
}), e]
|
|
101
|
+
}),
|
|
102
|
+
c === "bottom" && s && /* @__PURE__ */ g(a, { children: s })
|
|
103
|
+
] }))
|
|
104
|
+
});
|
|
105
|
+
//#endregion
|
|
106
|
+
export { S as i, w as n, C as r, O as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { n as e } from "./button-dpe6hXmI.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
import { X as n } from "lucide-react";
|
|
6
|
+
//#region src/clear-button/ClearButton.tsx
|
|
7
|
+
var r = (r) => /* @__PURE__ */ t(e, {
|
|
8
|
+
variant: "icon",
|
|
9
|
+
slot: null,
|
|
10
|
+
...r,
|
|
11
|
+
children: /* @__PURE__ */ t(n, {
|
|
12
|
+
size: 20,
|
|
13
|
+
"aria-hidden": !0
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as t };
|