@midas-ds/components 17.28.2 → 17.30.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 +29 -0
- package/accordion/index.js +1 -1
- package/assets/file-list.css +1 -1
- package/assets/progress-bar.css +1 -1
- package/button/Button.stories.d.ts +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-BzmYSOS3.js} +23 -23
- package/chunks/{button-CenXTGXL.js → button-C-WkFek9.js} +1 -1
- package/chunks/calendar-Bt1FLxqr.js +107 -0
- package/chunks/card-CdH2UMUW.js +103 -0
- package/chunks/checkbox-DiFQy3MS.js +106 -0
- package/chunks/clear-button-Bv0YGBNG.js +17 -0
- package/chunks/color-scheme-switch-0axiBsna.js +160 -0
- package/chunks/{combobox-DIou4Z-d.js → combobox-DkZbA3o4.js} +24 -24
- package/chunks/{date-field-BF2f9bSf.js → date-field-CPpWZqws.js} +2 -2
- package/chunks/date-picker-DQ7vCG5-.js +142 -0
- package/chunks/file-list-D8Zc1aYS.js +139 -0
- package/chunks/{info-banner-osR4e6nB.js → info-banner-BVKtmVKN.js} +14 -14
- package/chunks/label-Dw5p84T2.js +50 -0
- package/chunks/layout-CUAjEEuH.js +378 -0
- package/chunks/link-DHu1cTmz.js +44 -0
- package/chunks/link-button-DYg_0p4Y.js +44 -0
- package/chunks/{list-box-BN_MSiOD.js → list-box-DmEoMvX1.js} +1 -1
- package/chunks/menu-CP0Xvmx0.js +48 -0
- package/chunks/modal-B_uSoXZM.js +66 -0
- package/chunks/progress-bar-BfFxpqUv.js +65 -0
- package/chunks/{radio-BD1EuxSa.js → radio-_z6ObjYx.js} +1 -1
- package/chunks/search-field-Cp_HHDl4.js +91 -0
- package/chunks/select-Wy6NakdH.js +176 -0
- package/chunks/spinner-COGZlDJB.js +29 -0
- package/chunks/table-O_Y45Sb7.js +84 -0
- package/chunks/tag-RjuYlFZI.js +78 -0
- package/chunks/{textfield-BSvCsAyC.js → textfield-Bu0Hg2pJ.js} +2 -2
- package/chunks/{time-field-CmjGBQph.js → time-field-Cnp-dYhm.js} +3 -3
- package/chunks/{toast-gJgjitZF.js → toast-Dg3fVjSS.js} +20 -20
- 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/file-list/FileList.stories.d.ts +15 -3
- package/file-list/FileListItem.d.ts +21 -1
- package/file-list/index.js +1 -1
- package/file-list/intl/translations.json.d.ts +10 -2
- package/index.js +49 -48
- 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 +1 -1
- package/menu/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +3 -2
- package/progress-bar/ProgressBar.d.ts +11 -0
- package/progress-bar/ProgressBar.stories.d.ts +3 -0
- 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/spinner/index.js +1 -1
- package/table/index.js +1 -1
- package/tag/index.js +1 -1
- package/textfield/index.js +1 -1
- package/time-field/index.js +1 -1
- package/toast/index.js +1 -1
- 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/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-TmEuO1fJ.js +0 -68
- 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/progress-bar-7w_kWo2f.js +0 -40
- 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/x-BJAOO5a5.js +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
## 17.30.0 (2026-10-09)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components,layout,table-styles:** depend on lucide-react ([#1405](https://github.com/migrationsverket/midas/pull/1405))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated theme to 3.17.7
|
|
10
|
+
|
|
11
|
+
## 17.29.0 (2026-10-09)
|
|
12
|
+
|
|
13
|
+
### 🚀 Features
|
|
14
|
+
|
|
15
|
+
- **components,file-list:** name the file in screen reader output and announce upload errors ([37b3d4545b6](https://github.com/migrationsverket/midas/commit/37b3d4545b6))
|
|
16
|
+
- **components,file-list:** animate the upload-complete and upload-failed transitions ([76157f5d350](https://github.com/migrationsverket/midas/commit/76157f5d350))
|
|
17
|
+
- **components,file-list:** auto-restore focus to a sibling row on removal ([c5356b073ef](https://github.com/migrationsverket/midas/commit/c5356b073ef))
|
|
18
|
+
- **components,file-list,progress-bar:** add upload progress states and a circular ProgressBar ([935847ee8ce](https://github.com/migrationsverket/midas/commit/935847ee8ce))
|
|
19
|
+
|
|
20
|
+
### 🩹 Fixes
|
|
21
|
+
|
|
22
|
+
- **components,file-list:** read the upload state first in each row and separate name and size ([4ce25f2de0c](https://github.com/migrationsverket/midas/commit/4ce25f2de0c))
|
|
23
|
+
- **components,file-list:** only render the progress bar and checkmark in their own state ([d7a8371ed70](https://github.com/migrationsverket/midas/commit/d7a8371ed70))
|
|
24
|
+
|
|
25
|
+
### 🧪 Tests updated
|
|
26
|
+
|
|
27
|
+
- update visual regression screenshots ([7052703314c](https://github.com/migrationsverket/midas/commit/7052703314c))
|
|
28
|
+
- update visual regression screenshots ([c7c1aeca056](https://github.com/migrationsverket/midas/commit/c7c1aeca056))
|
|
29
|
+
|
|
1
30
|
## 17.28.2 (2026-10-08)
|
|
2
31
|
|
|
3
32
|
### 🩹 Fixes
|
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-BzmYSOS3.js";
|
|
2
2
|
export { e as Accordion, t as AccordionItem };
|
package/assets/file-list.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._fileList_mb5n3_1{gap:var(--midas-space-small);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._fileListItem_mb5n3_18{--file-list-success-duration:2s;flex-direction:column;display:flex}._row_mb5n3_25{background-color:var(--midas-layer-01-base);box-sizing:border-box;font-family:var(--midas-typography-font-family);height:var(--midas-size-control);transition:box-shadow var(--midas-transition-duration-fast) var(--midas-transition-timing-ease-out);align-items:center;padding-inline-start:var(--midas-space-medium);display:flex}._fileListItem_mb5n3_18[data-status=error] ._row_mb5n3_25{box-shadow:var(--midas-state-invalid)}._iconSlot_mb5n3_46{height:var(--midas-size-icon-sm);opacity:0;transition:margin-inline-end var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out), opacity var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out), width var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out);flex-shrink:0;width:0;margin-inline-end:0;position:relative}._fileListItem_mb5n3_18[data-status=uploading] ._iconSlot_mb5n3_46,._fileListItem_mb5n3_18[data-status=success] ._iconSlot_mb5n3_46{opacity:1;width:var(--midas-size-icon-sm);margin-inline-end:var(--midas-space-small)}._progressIcon_mb5n3_70{position:absolute;inset:0}._ring_mb5n3_82{border:2px solid var(--midas-icon-success);box-sizing:border-box;opacity:0;border-radius:50%;position:absolute;inset:0}._fileListItem_mb5n3_18[data-status=success] ._ring_mb5n3_82{animation:_successRing_mb5n3_1 var(--file-list-success-duration) var(--midas-transition-timing-ease-out) forwards}._checkmark_mb5n3_106{height:var(--midas-size-icon-sm);opacity:0;width:var(--midas-size-icon-sm);margin:auto;position:absolute;inset:0;transform:scale(.4)}._fileListItem_mb5n3_18[data-status=success] ._checkmark_mb5n3_106{animation:_successCheckmark_mb5n3_1 var(--file-list-success-duration) var(--midas-transition-timing-ease-out) forwards}._successIcon_mb5n3_121{color:var(--midas-icon-success)}@keyframes _successRing_mb5n3_1{0%,30%{opacity:1}55%,to{opacity:0}}@keyframes _successCheckmark_mb5n3_1{0%,30%{opacity:0;transform:scale(.4)}55%{opacity:1;transform:scale(.65)}65%,to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){._row_mb5n3_25,._iconSlot_mb5n3_46,._ring_mb5n3_82,._checkmark_mb5n3_106,._errorReveal_mb5n3_163{transition-duration:1ms!important;animation-duration:1ms!important}}._fileInfo_mb5n3_169{align-items:baseline;gap:var(--midas-space-small);flex:1;min-width:0;display:flex}._fileName_mb5n3_177{color:var(--midas-text-primary);font-size:var(--midas-typography-font-size-30);font-weight:var(--midas-typography-weight-medium);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._fileSize_mb5n3_186{color:var(--midas-text-secondary);font-size:var(--midas-typography-font-size-30);flex-shrink:0}._deleteButton_mb5n3_192{color:var(--midas-icon-primary);flex-shrink:0;margin-inline-start:var(--midas-space-small)}._errorReveal_mb5n3_163{max-height:0;transition:max-height var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out);overflow:clip}._fileListItem_mb5n3_18[data-status=error] ._errorReveal_mb5n3_163{max-height:6.25rem}
|
package/assets/progress-bar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._progressBar_15k4b_1{column-gap:var(--midas-space-small);grid-template-columns:1fr auto;grid-template-areas:"label value""track track";display:grid}._progressBar_15k4b_1 ._label_15k4b_9{margin:0 0 var(--midas-space-small);grid-area:label}._progressBar_15k4b_1 ._value_15k4b_14{margin:0 0 var(--midas-space-small);grid-area:value}._progressBar_15k4b_1 ._track_15k4b_19{background:var(--midas-progress-bar-track-background);grid-area:track;height:.25rem;overflow:hidden}@media (forced-colors:active){._progressBar_15k4b_1 ._track_15k4b_19{border:1px solid}}._progressBar_15k4b_1 ._track_15k4b_19 ._indicator_15k4b_29{background:var(--midas-progress-bar-indicator-background);height:100%}@media (forced-colors:active){._progressBar_15k4b_1 ._track_15k4b_19 ._indicator_15k4b_29{background:highlight}}._progressBar_15k4b_1:not([aria-valuenow]) ._indicator_15k4b_29{will-change:transform;background:var(--midas-progress-bar-indicator-background);height:100%;animation:2s var(--midas-transition-timing-ease-in-out) infinite _indeterminate_15k4b_1}@media (forced-colors:active){._progressBar_15k4b_1:not([aria-valuenow]) ._indicator_15k4b_29{background:highlight}}._progressBar_15k4b_1 ._circular_15k4b_53{height:var(--midas-size-icon);width:var(--midas-size-icon);grid-area:track;transform:rotate(-90deg)}._progressBar_15k4b_1 ._circular_15k4b_53._circularSmall_15k4b_59{height:var(--midas-size-icon-sm);width:var(--midas-size-icon-sm)}._progressBar_15k4b_1 ._circularTrack_15k4b_65{fill:none;stroke:var(--midas-progress-bar-track-background);stroke-width:2px}@media (forced-colors:active){._progressBar_15k4b_1 ._circularTrack_15k4b_65{stroke:canvastext}}._progressBar_15k4b_1 ._circularIndicator_15k4b_75{fill:none;stroke:var(--midas-progress-bar-indicator-background);stroke-linecap:round;stroke-width:2px;transition:stroke-dashoffset var(--midas-transition-duration-normal) var(--midas-transition-timing-ease-out)}@media (forced-colors:active){._progressBar_15k4b_1 ._circularIndicator_15k4b_75{stroke:highlight}}._progressBar_15k4b_1 ._circularIndicator_15k4b_75._circularIndeterminate_15k4b_87{stroke-linecap:square;transform-origin:50%;animation:1s linear infinite _circularRotate_15k4b_1}@media (prefers-reduced-motion:reduce){._progressBar_15k4b_1 ._circularIndicator_15k4b_75._circularIndeterminate_15k4b_87{animation-duration:2s}}@keyframes _indeterminate_15k4b_1{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes _circularRotate_15k4b_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){._progressBar_15k4b_1:not([aria-valuenow]) ._indicator_15k4b_29{animation-duration:6s}}
|
|
@@ -17,7 +17,7 @@ export declare const PrimaryFullwidth: {
|
|
|
17
17
|
export declare const Icon: {
|
|
18
18
|
args: {
|
|
19
19
|
children: undefined;
|
|
20
|
-
icon: import('
|
|
20
|
+
icon: import('lucide-react').LucideIcon;
|
|
21
21
|
variant: string;
|
|
22
22
|
'aria-label': string;
|
|
23
23
|
};
|
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-C-WkFek9.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-Bt1FLxqr.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-CdH2UMUW.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-DiFQy3MS.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
2
|
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
-
import { t } from "./
|
|
4
|
-
import { t as n } from "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { n as t } from "./button-C-WkFek9.js";
|
|
4
|
+
import { t as n } from "./heading-BEl_z-5T.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,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { t as e } from "./clsx-Di52oYUU.js";
|
|
3
|
-
import { t } from "./spinner-
|
|
3
|
+
import { t } from "./spinner-COGZlDJB.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,107 @@
|
|
|
1
|
+
import { n as e, t } from "./clsx-Di52oYUU.js";
|
|
2
|
+
import { n } from "./button-C-WkFek9.js";
|
|
3
|
+
import { t as r } from "./heading-BEl_z-5T.js";
|
|
4
|
+
import { t as i } from "./field-error-LtNtEKDp.js";
|
|
5
|
+
import { n as a } from "./select-Wy6NakdH.js";
|
|
6
|
+
import { a as o, c as s, o as c } from "./list-box-DmEoMvX1.js";
|
|
7
|
+
import * as l from "react";
|
|
8
|
+
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";
|
|
9
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
10
|
+
import { ChevronLeft as b, ChevronRight as x } from "lucide-react";
|
|
11
|
+
import '../assets/calendar.css';var S = {
|
|
12
|
+
container: "_container_mn6zv_1",
|
|
13
|
+
calendar: "_calendar_mn6zv_6",
|
|
14
|
+
day: "_day_mn6zv_28",
|
|
15
|
+
header: "_header_mn6zv_90",
|
|
16
|
+
pickers: "_pickers_mn6zv_130",
|
|
17
|
+
range: "_range_mn6zv_180"
|
|
18
|
+
}, C = ({ weekdayStyle: e = "short", isReadOnly: n }) => {
|
|
19
|
+
let r = !!l.useContext(g);
|
|
20
|
+
return /* @__PURE__ */ v(f, {
|
|
21
|
+
weekdayStyle: e,
|
|
22
|
+
children: (e) => /* @__PURE__ */ v(d, {
|
|
23
|
+
date: e,
|
|
24
|
+
className: t(S.day, r && S.range),
|
|
25
|
+
"data-readonly": n || void 0
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
}, w = ({ isDisabled: e, isReadOnly: t, items: n, ...r }) => /* @__PURE__ */ y(_, {
|
|
29
|
+
isDisabled: e,
|
|
30
|
+
"data-readonly": t || void 0,
|
|
31
|
+
...r,
|
|
32
|
+
children: [/* @__PURE__ */ v(a, {
|
|
33
|
+
size: "small",
|
|
34
|
+
isDisabled: e
|
|
35
|
+
}), /* @__PURE__ */ v(o, { children: /* @__PURE__ */ v(s, {
|
|
36
|
+
items: n,
|
|
37
|
+
virtualized: !1,
|
|
38
|
+
size: "small",
|
|
39
|
+
children: (e) => /* @__PURE__ */ v(c, {
|
|
40
|
+
id: e.id,
|
|
41
|
+
textValue: e.formatted,
|
|
42
|
+
children: e.formatted
|
|
43
|
+
})
|
|
44
|
+
}) })]
|
|
45
|
+
}), T = ({ isDisabled: e, isReadOnly: t, showMonthYearPicker: i }) => {
|
|
46
|
+
let a = (n) => /* @__PURE__ */ v(w, {
|
|
47
|
+
...n,
|
|
48
|
+
isDisabled: e,
|
|
49
|
+
isReadOnly: t
|
|
50
|
+
});
|
|
51
|
+
return /* @__PURE__ */ y("header", {
|
|
52
|
+
className: S.header,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ v(n, {
|
|
55
|
+
slot: "previous",
|
|
56
|
+
size: "medium",
|
|
57
|
+
"data-readonly": t || void 0,
|
|
58
|
+
children: /* @__PURE__ */ v(b, { size: 20 })
|
|
59
|
+
}),
|
|
60
|
+
i ? /* @__PURE__ */ y("div", {
|
|
61
|
+
className: S.pickers,
|
|
62
|
+
children: [/* @__PURE__ */ v(p, { children: a }), /* @__PURE__ */ v(m, { children: a })]
|
|
63
|
+
}) : /* @__PURE__ */ v(r, {
|
|
64
|
+
level: 3,
|
|
65
|
+
elementType: "h2",
|
|
66
|
+
"data-disabled": e || void 0
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ v(n, {
|
|
69
|
+
slot: "next",
|
|
70
|
+
size: "medium",
|
|
71
|
+
"data-readonly": t || void 0,
|
|
72
|
+
children: /* @__PURE__ */ v(x, { size: 20 })
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
}, E = ({ className: t, errorMessage: n, showMonthYearPicker: r, ...a }) => /* @__PURE__ */ y("div", {
|
|
77
|
+
className: S.container,
|
|
78
|
+
children: [/* @__PURE__ */ y(u, {
|
|
79
|
+
className: e(S.calendar, t),
|
|
80
|
+
"data-readonly": a.isReadOnly || void 0,
|
|
81
|
+
...a,
|
|
82
|
+
children: [/* @__PURE__ */ v(T, {
|
|
83
|
+
...a,
|
|
84
|
+
showMonthYearPicker: r
|
|
85
|
+
}), /* @__PURE__ */ v(C, { ...a })]
|
|
86
|
+
}), /* @__PURE__ */ v(i, {
|
|
87
|
+
isInvalid: a.isInvalid,
|
|
88
|
+
children: n
|
|
89
|
+
})]
|
|
90
|
+
}), D = ({ className: t, errorMessage: n, showMonthYearPicker: r, commitBehavior: a, ...o }) => /* @__PURE__ */ y("div", {
|
|
91
|
+
className: S.container,
|
|
92
|
+
children: [/* @__PURE__ */ y(h, {
|
|
93
|
+
className: e(S.calendar, t),
|
|
94
|
+
"data-readonly": o.isReadOnly || void 0,
|
|
95
|
+
commitBehavior: a ?? (r ? "reset" : void 0),
|
|
96
|
+
...o,
|
|
97
|
+
children: [/* @__PURE__ */ v(T, {
|
|
98
|
+
...o,
|
|
99
|
+
showMonthYearPicker: r
|
|
100
|
+
}), /* @__PURE__ */ v(C, { ...o })]
|
|
101
|
+
}), /* @__PURE__ */ v(i, {
|
|
102
|
+
isInvalid: o.isInvalid,
|
|
103
|
+
children: n
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
106
|
+
//#endregion
|
|
107
|
+
export { E as n, D as t };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { t as e } from "./clsx-Di52oYUU.js";
|
|
2
|
+
import { t } from "./heading-BEl_z-5T.js";
|
|
3
|
+
import { t as n } from "./text-DwmZ-ew8.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-Di52oYUU.js";
|
|
3
|
+
import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
4
|
+
import { n, t as r } from "./label-Dw5p84T2.js";
|
|
5
|
+
import { t as i } from "./text-DwmZ-ew8.js";
|
|
6
|
+
import { t as a } from "./field-error-LtNtEKDp.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-C-WkFek9.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 };
|