@midas-ds/components 16.2.4 → 16.3.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 +24 -0
- package/calendar/index.js +1 -1
- package/character-counter/CharacterCounter.d.ts +1 -2
- package/character-counter/index.js +1 -1
- package/checkbox/Checkbox.d.ts +2 -3
- package/checkbox/CheckboxGroupItem.d.ts +1 -2
- package/checkbox/CheckboxInner.d.ts +1 -2
- package/checkbox/SingleCheckbox.d.ts +1 -2
- package/checkbox/index.js +2 -2
- package/checkbox/types.d.ts +1 -1
- package/chunks/{CharacterCounter-DeuE2det.js → CharacterCounter-R6vh7AE5.js} +7 -6
- package/chunks/Checkbox-BTAfwDxU.js +130 -0
- package/chunks/{CheckboxGroup-C5kaqBcn.js → CheckboxGroup-BQ8EpX7O.js} +3 -3
- package/chunks/{ComboBox-N97lv5kN.js → ComboBox-DVK0dL2W.js} +1 -1
- package/chunks/{DateField-DeuLPe1Y.js → DateField-06YL8tj_.js} +1 -1
- package/chunks/{DateRangePicker-BqjLArNi.js → DateRangePicker-CZRWDV_g.js} +2 -2
- package/chunks/FieldError-Bra5aRT3.js +24 -0
- package/chunks/{Layout-ClW2Lbvq.js → Layout-DX3HUm5b.js} +72 -71
- package/chunks/{Radio-Dro99zCs.js → Radio-BDHczAt5.js} +1 -1
- package/chunks/{RangeCalendar-CGk2btOp.js → RangeCalendar-BSth1Fmv.js} +1 -1
- package/chunks/{SearchField-BfpeANM6.js → SearchField-DTkfUFwn.js} +1 -1
- package/chunks/{Select-D-LtFSZX.js → Select-C8Fr7Vn3.js} +2 -2
- package/chunks/{Select-nL9iJMlf.js → Select-CPM82ww2.js} +2 -2
- package/chunks/{Table-CgBjwlIi.js → Table-BgsgXhC_.js} +1 -1
- package/chunks/TextArea-DQ_dAC-2.js +137 -0
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/field-error/FieldError.d.ts +1 -2
- package/field-error/index.js +1 -1
- package/index.js +15 -15
- package/layout/components/SidebarLink.d.ts +1 -2
- package/layout/index.js +1 -1
- package/legacy-select/HiddenMultiSelect.d.ts +2 -2
- package/legacy-select/MultiSelectValueTag.d.ts +3 -3
- package/legacy-select/index.js +1 -1
- package/legacy-select/useMultiSelect.d.ts +1 -1
- package/package.json +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/table/index.js +1 -1
- package/textfield/Input.d.ts +1 -2
- package/textfield/PasswordField.d.ts +1 -2
- package/textfield/TextArea.d.ts +1 -2
- package/textfield/TextField.d.ts +1 -2
- package/textfield/TextFieldBase.d.ts +3 -3
- package/textfield/index.js +1 -1
- package/chunks/Checkbox-CP6Nv9yx.js +0 -122
- package/chunks/FieldError-C0HRIcAx.js +0 -23
- package/chunks/TextArea-CRvbqqVZ.js +0 -124
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 16.3.0 (2026-01-13)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components:** add displayName to forwardRef components" ([474d161db5](https://github.com/migrationsverket/midas/commit/474d161db5))
|
|
6
|
+
|
|
7
|
+
### 🔙 Rollback changes
|
|
8
|
+
|
|
9
|
+
- Revert "refactor: remove React.forwardRef" ([c4f26cd721](https://github.com/migrationsverket/midas/commit/c4f26cd721))
|
|
10
|
+
|
|
11
|
+
## 16.2.5 (2026-01-09)
|
|
12
|
+
|
|
13
|
+
### 🏭 Refactoring
|
|
14
|
+
|
|
15
|
+
- **components:** remove React.FC wrapper ([4f156ecf45](https://github.com/migrationsverket/midas/commit/4f156ecf45))
|
|
16
|
+
- remove React.forwardRef ([977fc0260b](https://github.com/migrationsverket/midas/commit/977fc0260b))
|
|
17
|
+
|
|
18
|
+
### 🔧 Maintenance
|
|
19
|
+
|
|
20
|
+
- accept all shapes of external refs ([340771208d](https://github.com/migrationsverket/midas/commit/340771208d))
|
|
21
|
+
- revert removal of react 18 peerDeps ([8c4b059f56](https://github.com/migrationsverket/midas/commit/8c4b059f56))
|
|
22
|
+
- **checkbox:** assert prop types ([406798b0a1](https://github.com/migrationsverket/midas/commit/406798b0a1))
|
|
23
|
+
- update to react 19 ([7389cceb06](https://github.com/migrationsverket/midas/commit/7389cceb06))
|
|
24
|
+
|
|
1
25
|
## 16.2.4 (2026-01-09)
|
|
2
26
|
|
|
3
27
|
### 🩹 Fixes
|
package/calendar/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InputProps } from 'react-aria-components';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
export interface CharacterCounterProps extends InputProps {
|
|
4
3
|
isLonely?: boolean;
|
|
5
4
|
}
|
|
6
|
-
export declare const CharacterCounter:
|
|
5
|
+
export declare const CharacterCounter: import('react').ForwardRefExoticComponent<CharacterCounterProps & import('react').RefAttributes<HTMLInputElement>>;
|
package/checkbox/Checkbox.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<import('react-aria').AriaCheckboxProps & import('react-aria-components').SlotProps & {
|
|
1
|
+
export declare const Checkbox: import('react').ForwardRefExoticComponent<import('react-aria').AriaCheckboxProps & import('react-aria-components').SlotProps & {
|
|
3
2
|
className?: string;
|
|
4
|
-
} &
|
|
3
|
+
} & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { CheckboxGroupItemProps } from './types';
|
|
2
|
-
|
|
3
|
-
export declare const CheckBoxGroupItem: React.ForwardRefExoticComponent<CheckboxGroupItemProps & React.RefAttributes<HTMLLabelElement>>;
|
|
2
|
+
export declare const CheckBoxGroupItem: import('react').ForwardRefExoticComponent<CheckboxGroupItemProps & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const CheckboxInner: React.ForwardRefExoticComponent<import('./types').CheckboxComponentProps & import('react-aria').CheckboxAria & React.RefAttributes<HTMLLabelElement>>;
|
|
1
|
+
export declare const CheckboxInner: import('react').ForwardRefExoticComponent<import('./types').CheckboxComponentProps & import('react-aria').CheckboxAria & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { CheckboxComponentProps } from './types';
|
|
2
|
-
|
|
3
|
-
export declare const SingleCheckbox: React.ForwardRefExoticComponent<CheckboxComponentProps & React.RefAttributes<HTMLLabelElement>>;
|
|
2
|
+
export declare const SingleCheckbox: import('react').ForwardRefExoticComponent<CheckboxComponentProps & import('react').RefAttributes<HTMLLabelElement>>;
|
package/checkbox/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as e } from "../chunks/Checkbox-
|
|
2
|
-
import { C } from "../chunks/CheckboxGroup-
|
|
1
|
+
import { C as e } from "../chunks/Checkbox-BTAfwDxU.js";
|
|
2
|
+
import { C } from "../chunks/CheckboxGroup-BQ8EpX7O.js";
|
|
3
3
|
export {
|
|
4
4
|
e as Checkbox,
|
|
5
5
|
C as CheckboxGroup
|
package/checkbox/types.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface CheckboxComponentProps extends CheckboxProps {
|
|
|
8
8
|
focusRingAria: FocusRingAria;
|
|
9
9
|
pressResult: PressResult;
|
|
10
10
|
hoverResult: HoverResult;
|
|
11
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
11
|
+
inputRef: React.RefObject<HTMLInputElement | null>;
|
|
12
12
|
}
|
|
13
13
|
export interface CheckboxGroupItemProps extends CheckboxComponentProps {
|
|
14
14
|
state: CheckboxGroupState;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
3
|
import { useContextProps as d, InputContext as h } from "react-aria-components";
|
|
4
|
-
import '../assets/CharacterCounter.css';const
|
|
5
|
-
characterCounter:
|
|
6
|
-
},
|
|
4
|
+
import '../assets/CharacterCounter.css';const C = "_characterCounter_1f0mh_1", m = {
|
|
5
|
+
characterCounter: C
|
|
6
|
+
}, u = i((t, a) => {
|
|
7
7
|
[t] = d(t, a, h);
|
|
8
8
|
const { maxLength: e, value: n, isLonely: c } = t, { length: r } = n?.toString() ?? "", o = e !== void 0;
|
|
9
9
|
return /* @__PURE__ */ s(
|
|
10
10
|
"span",
|
|
11
11
|
{
|
|
12
|
-
className:
|
|
12
|
+
className: m.characterCounter,
|
|
13
13
|
"data-exceeded": o && r > e || void 0,
|
|
14
14
|
"data-lonely": c || void 0,
|
|
15
15
|
children: o ? `${r} / ${e}` : r
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
});
|
|
19
|
+
u.displayName = "CharacterCounter";
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
u as C
|
|
21
22
|
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { jsxs as C, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import f, { forwardRef as l, useContext as R, useRef as _ } from "react";
|
|
3
|
+
import { mergeProps as h, VisuallyHidden as I, useCheckboxGroupItem as y, useCheckbox as P, useHover as g, usePress as G, useFocusRing as N } from "react-aria";
|
|
4
|
+
import { useContextProps as z, CheckboxContext as B, useSlottedContext as S, FormContext as F } from "react-aria-components";
|
|
5
|
+
import { a as x } from "./clsx-AexbMWKp.js";
|
|
6
|
+
import { variables as m } from "@midas-ds/theme";
|
|
7
|
+
import { c as L } from "./createLucideIcon-D4r5Phnh.js";
|
|
8
|
+
import { C as D } from "./check-BxlvVsvD.js";
|
|
9
|
+
import { useToggleState as H } from "@react-stately/toggle";
|
|
10
|
+
import '../assets/Checkbox.css';const O = [["path", { d: "M5 12h14", key: "1ays0h" }]], j = L("minus", O), q = f.createContext(null), A = "_checkboxInner_tzrii_1", M = "_checkbox_tzrii_1", V = "_checkboxGroup_tzrii_143", w = "_checkboxList_tzrii_154", b = {
|
|
11
|
+
checkboxInner: A,
|
|
12
|
+
checkbox: M,
|
|
13
|
+
checkboxGroup: V,
|
|
14
|
+
checkboxList: w
|
|
15
|
+
}, u = l(
|
|
16
|
+
(e, o) => {
|
|
17
|
+
const { hoverProps: i, isHovered: c } = e.hoverResult, { pressProps: s, isPressed: n } = e.pressResult, { isFocused: a, isFocusVisible: r, focusProps: d } = e.focusRingAria;
|
|
18
|
+
return /* @__PURE__ */ C(
|
|
19
|
+
"label",
|
|
20
|
+
{
|
|
21
|
+
ref: o,
|
|
22
|
+
...h(i, s, e.labelProps),
|
|
23
|
+
slot: e.slot || void 0,
|
|
24
|
+
className: x(b.checkbox, e.className),
|
|
25
|
+
"data-hovered": c || void 0,
|
|
26
|
+
"data-selected": e.isSelected || void 0,
|
|
27
|
+
"data-indeterminate": e.isIndeterminate || void 0,
|
|
28
|
+
"data-pressed": n || void 0,
|
|
29
|
+
"data-disabled": e.isDisabled || void 0,
|
|
30
|
+
"data-readonly": e.isReadOnly || void 0,
|
|
31
|
+
"data-invalid": e.isInvalid || void 0,
|
|
32
|
+
"data-focused": a || void 0,
|
|
33
|
+
"data-focus-visible": r || void 0,
|
|
34
|
+
"data-required": e.isRequired || void 0,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ t("div", { className: x(b.checkboxInner), children: e.isIndeterminate ? /* @__PURE__ */ t(
|
|
37
|
+
j,
|
|
38
|
+
{
|
|
39
|
+
size: 14,
|
|
40
|
+
color: m.iconOnColor
|
|
41
|
+
}
|
|
42
|
+
) : /* @__PURE__ */ t(
|
|
43
|
+
D,
|
|
44
|
+
{
|
|
45
|
+
size: 14,
|
|
46
|
+
color: m.iconOnColor
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
/* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(
|
|
50
|
+
"input",
|
|
51
|
+
{
|
|
52
|
+
...h(e.inputProps, d),
|
|
53
|
+
ref: e.inputRef
|
|
54
|
+
}
|
|
55
|
+
) }),
|
|
56
|
+
e.children
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
u.displayName = "CheckboxInner";
|
|
63
|
+
const v = l((e, o) => {
|
|
64
|
+
const i = y(
|
|
65
|
+
{
|
|
66
|
+
...e,
|
|
67
|
+
value: e.value || ""
|
|
68
|
+
},
|
|
69
|
+
e.state,
|
|
70
|
+
e.inputRef
|
|
71
|
+
);
|
|
72
|
+
return /* @__PURE__ */ t(
|
|
73
|
+
u,
|
|
74
|
+
{
|
|
75
|
+
...e,
|
|
76
|
+
...i,
|
|
77
|
+
ref: o
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
});
|
|
81
|
+
v.displayName = "CheckBoxGroupItem";
|
|
82
|
+
const k = l((e, o) => {
|
|
83
|
+
const i = P(e, H(e), e.inputRef);
|
|
84
|
+
return /* @__PURE__ */ t(
|
|
85
|
+
u,
|
|
86
|
+
{
|
|
87
|
+
...e,
|
|
88
|
+
...i,
|
|
89
|
+
ref: o
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
k.displayName = "SingleCheckbox";
|
|
94
|
+
const T = l(
|
|
95
|
+
(e, o) => {
|
|
96
|
+
[e, o] = z(e, o, B);
|
|
97
|
+
const i = S(F), c = e.validationBehavior ?? i?.validationBehavior ?? "native", s = R(q), n = _(null), a = g(e), r = G({
|
|
98
|
+
ref: o,
|
|
99
|
+
isDisabled: e.isDisabled
|
|
100
|
+
}), d = N();
|
|
101
|
+
return s ? /* @__PURE__ */ t(
|
|
102
|
+
v,
|
|
103
|
+
{
|
|
104
|
+
...e,
|
|
105
|
+
state: s,
|
|
106
|
+
inputRef: n,
|
|
107
|
+
hoverResult: a,
|
|
108
|
+
pressResult: r,
|
|
109
|
+
focusRingAria: d,
|
|
110
|
+
validationBehavior: c
|
|
111
|
+
}
|
|
112
|
+
) : /* @__PURE__ */ t(
|
|
113
|
+
k,
|
|
114
|
+
{
|
|
115
|
+
...e,
|
|
116
|
+
inputRef: n,
|
|
117
|
+
hoverResult: a,
|
|
118
|
+
pressResult: r,
|
|
119
|
+
focusRingAria: d,
|
|
120
|
+
validationBehavior: c
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
T.displayName = "Checkbox";
|
|
126
|
+
export {
|
|
127
|
+
T as C,
|
|
128
|
+
q as a,
|
|
129
|
+
b as s
|
|
130
|
+
};
|
|
@@ -4,14 +4,14 @@ import { useCheckboxGroupState as v } from "react-stately";
|
|
|
4
4
|
import { a as k, L as S } from "./Label-Dup4lWaR.js";
|
|
5
5
|
import { T as y } from "./Text-TWzJxnto.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-BTAfwDxU.js";
|
|
8
8
|
import { FieldErrorContext as A } from "react-aria-components";
|
|
9
|
-
import { F as P } from "./FieldError-
|
|
9
|
+
import { F as P } from "./FieldError-Bra5aRT3.js";
|
|
10
10
|
import { u as V } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
11
11
|
const F = (e, { value: t }) => {
|
|
12
12
|
const a = r.Children.toArray(e).filter(
|
|
13
13
|
(l) => r.isValidElement(l) && l.type === d
|
|
14
|
-
), c = r.Children.count(a), n = r.Children.toArray(e).filter((l) => r.isValidElement(l)).filter((l) => !!l && l.type === d).map((l) => l.props.value), s = t.length === 0, i = t.length === c;
|
|
14
|
+
), c = r.Children.count(a), n = r.Children.toArray(e).filter((l) => r.isValidElement(l)).filter((l) => !!l && l.type === d).map((l) => l.props.value || ""), s = t.length === 0, i = t.length === c;
|
|
15
15
|
return {
|
|
16
16
|
allSelected: i,
|
|
17
17
|
someSelected: !s && !i,
|
|
@@ -4,7 +4,7 @@ import { ComboBox as y, Input as B, Button as F, Collection as w } from "react-a
|
|
|
4
4
|
import { c as s } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { a as C, L as S } from "./Label-Dup4lWaR.js";
|
|
6
6
|
import { T as u } from "./Text-TWzJxnto.js";
|
|
7
|
-
import { F as h } from "./FieldError-
|
|
7
|
+
import { F as h } from "./FieldError-Bra5aRT3.js";
|
|
8
8
|
import { L as v } from "./ListBox-D5BBeZWL.js";
|
|
9
9
|
import { a as R, L as N, b as E } from "./ListBoxSection-MZB_5DdD.js";
|
|
10
10
|
import { C as I } from "./chevron-down-DgT-uSF9.js";
|
|
@@ -2,7 +2,7 @@ import { jsxs as F, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { DateField as u } from "react-aria-components";
|
|
3
3
|
import { c as m } from "./clsx-AexbMWKp.js";
|
|
4
4
|
import { a as _, D as f } from "./DateInputDivider-CkTB5q5k.js";
|
|
5
|
-
import { F as s } from "./FieldError-
|
|
5
|
+
import { F as s } from "./FieldError-Bra5aRT3.js";
|
|
6
6
|
import { a as h, L as D } from "./Label-Dup4lWaR.js";
|
|
7
7
|
import { T as b } from "./Text-TWzJxnto.js";
|
|
8
8
|
import '../assets/DateField.css';const x = "_dateField_y3sba_1", y = "_inputField_y3sba_7", L = "_medium_y3sba_37", i = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Group as P, Button as b, Popover as f, Dialog as v, DatePicker as x, DateRangePicker as F } from "react-aria-components";
|
|
3
3
|
import { a as m } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import { C as M, R as N } from "./RangeCalendar-
|
|
4
|
+
import { C as M, R as N } from "./RangeCalendar-BSth1Fmv.js";
|
|
5
5
|
import { a as p, D as k, b as B } from "./DateInputDivider-CkTB5q5k.js";
|
|
6
|
-
import { F as h } from "./FieldError-
|
|
6
|
+
import { F as h } from "./FieldError-Bra5aRT3.js";
|
|
7
7
|
import { a as u, L as y } from "./Label-Dup4lWaR.js";
|
|
8
8
|
import { T as _ } from "./Text-TWzJxnto.js";
|
|
9
9
|
import { c as C } from "./createLucideIcon-D4r5Phnh.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n, useContext as f } from "react";
|
|
3
|
+
import { FieldErrorContext as c, FieldError as d } from "react-aria-components";
|
|
4
|
+
import { c as a } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { T as m } from "./Text-TWzJxnto.js";
|
|
6
|
+
import '../assets/FieldError.css';const E = "_fieldError_u3cks_1", u = {
|
|
7
|
+
fieldError: E
|
|
8
|
+
}, x = n(
|
|
9
|
+
(r, s) => {
|
|
10
|
+
const { children: o, isInvalid: l } = r, e = a(u.fieldError, r.className), t = f(c);
|
|
11
|
+
return !t && l && typeof o != "function" ? /* @__PURE__ */ i(m, { className: e, children: o }) : t?.isInvalid ? /* @__PURE__ */ i(
|
|
12
|
+
d,
|
|
13
|
+
{
|
|
14
|
+
...r,
|
|
15
|
+
ref: s,
|
|
16
|
+
className: e
|
|
17
|
+
}
|
|
18
|
+
) : null;
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
x.displayName = "FieldError";
|
|
22
|
+
export {
|
|
23
|
+
x as F
|
|
24
|
+
};
|
|
@@ -1,72 +1,73 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as H } from "react/jsx-runtime";
|
|
2
2
|
import { G as S } from "./GridItem-5t1Z14sM.js";
|
|
3
3
|
import * as N from "react";
|
|
4
|
+
import { useState as G, useEffect as W } from "react";
|
|
4
5
|
import { c as u } from "./clsx-AexbMWKp.js";
|
|
5
6
|
import { Link as L, RouterProvider as O } from "react-aria-components";
|
|
6
7
|
import { B as M } from "./Button-wBgWrXj3.js";
|
|
7
|
-
import { a as
|
|
8
|
+
import { a as j, T as D } from "./Tooltip-m032jGgF.js";
|
|
8
9
|
import { a as y, B as I } from "./BadgeContainer-CKVsfTlF.js";
|
|
9
10
|
import { c as E } from "./createLucideIcon-D4r5Phnh.js";
|
|
10
11
|
import { u as C } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
11
|
-
import { variables as
|
|
12
|
+
import { variables as q } from "@midas-ds/theme";
|
|
12
13
|
import { L as g } from "./Logo-InDSslpO.js";
|
|
13
|
-
import { X as
|
|
14
|
-
import '../assets/Layout.css';const
|
|
14
|
+
import { X as A } from "./x-BXShoIAM.js";
|
|
15
|
+
import '../assets/Layout.css';const R = [
|
|
15
16
|
["path", { d: "M4 12h16", key: "1lakjw" }],
|
|
16
17
|
["path", { d: "M4 18h16", key: "19g7jn" }],
|
|
17
18
|
["path", { d: "M4 6h16", key: "1o0s65" }]
|
|
18
|
-
],
|
|
19
|
-
const
|
|
19
|
+
], $ = E("menu", R);
|
|
20
|
+
const F = [
|
|
20
21
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
21
22
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
22
23
|
["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
|
|
23
|
-
],
|
|
24
|
-
const
|
|
24
|
+
], X = E("panel-left-close", F);
|
|
25
|
+
const J = [
|
|
25
26
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
26
27
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
27
28
|
["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
|
|
28
|
-
],
|
|
29
|
-
baseLayout:
|
|
30
|
-
mainContent:
|
|
31
|
-
header:
|
|
32
|
-
headerExternal:
|
|
33
|
-
headerContent:
|
|
34
|
-
logo:
|
|
35
|
-
headerItems:
|
|
36
|
-
toggleButton:
|
|
37
|
-
sidebar:
|
|
38
|
-
main:
|
|
39
|
-
app:
|
|
40
|
-
sidebarOpened:
|
|
41
|
-
sidebarHeader:
|
|
42
|
-
appName:
|
|
43
|
-
collapseButton:
|
|
44
|
-
sidebarCollapsed:
|
|
45
|
-
userName:
|
|
46
|
-
userTitle:
|
|
47
|
-
title:
|
|
48
|
-
sidebarNav:
|
|
49
|
-
list:
|
|
50
|
-
listGroupTitle:
|
|
51
|
-
listItem:
|
|
52
|
-
listItemCollapsed:
|
|
53
|
-
listLink:
|
|
54
|
-
listLinkCollapsed:
|
|
55
|
-
active:
|
|
56
|
-
backdrop:
|
|
57
|
-
backdropOpened:
|
|
58
|
-
skipToContent:
|
|
59
|
-
navbar:
|
|
60
|
-
navbarList:
|
|
61
|
-
navbarItem:
|
|
62
|
-
headerContentExternal:
|
|
63
|
-
logoExternalContainer:
|
|
64
|
-
logoExternal:
|
|
65
|
-
logoExternalDesktop:
|
|
66
|
-
navbarWrapper:
|
|
29
|
+
], K = E("panel-left-open", J), Q = "_baseLayout_1n71v_1", U = "_mainContent_1n71v_10", V = "_header_1n71v_15", Y = "_headerExternal_1n71v_26", Z = "_headerContent_1n71v_41", ee = "_logo_1n71v_60", ae = "_headerItems_1n71v_69", ne = "_toggleButton_1n71v_75", te = "_sidebar_1n71v_83", se = "_main_1n71v_10", ie = "_app_1n71v_116", re = "_sidebarOpened_1n71v_124", oe = "_sidebarHeader_1n71v_128", le = "_appName_1n71v_140", de = "_collapseButton_1n71v_147", ce = "_sidebarCollapsed_1n71v_156", me = "_userName_1n71v_166", pe = "_userTitle_1n71v_184", _e = "_title_1n71v_196", ve = "_sidebarNav_1n71v_207", ue = "_list_1n71v_213", he = "_listGroupTitle_1n71v_219", be = "_listItem_1n71v_226", Ne = "_listItemCollapsed_1n71v_231", fe = "_listLink_1n71v_235", ke = "_listLinkCollapsed_1n71v_298", Ce = "_active_1n71v_303", xe = "_backdrop_1n71v_321", ge = "_backdropOpened_1n71v_331", Le = "_skipToContent_1n71v_349", ye = "_navbar_1n71v_363", Ie = "_navbarList_1n71v_375", Me = "_navbarItem_1n71v_397", Ee = "_headerContentExternal_1n71v_448", Te = "_logoExternalContainer_1n71v_456", Se = "_logoExternal_1n71v_456", ze = "_logoExternalDesktop_1n71v_468", Be = "_navbarWrapper_1n71v_477", a = {
|
|
30
|
+
baseLayout: Q,
|
|
31
|
+
mainContent: U,
|
|
32
|
+
header: V,
|
|
33
|
+
headerExternal: Y,
|
|
34
|
+
headerContent: Z,
|
|
35
|
+
logo: ee,
|
|
36
|
+
headerItems: ae,
|
|
37
|
+
toggleButton: ne,
|
|
38
|
+
sidebar: te,
|
|
39
|
+
main: se,
|
|
40
|
+
app: ie,
|
|
41
|
+
sidebarOpened: re,
|
|
42
|
+
sidebarHeader: oe,
|
|
43
|
+
appName: le,
|
|
44
|
+
collapseButton: de,
|
|
45
|
+
sidebarCollapsed: ce,
|
|
46
|
+
userName: me,
|
|
47
|
+
userTitle: pe,
|
|
48
|
+
title: _e,
|
|
49
|
+
sidebarNav: ve,
|
|
50
|
+
list: ue,
|
|
51
|
+
listGroupTitle: he,
|
|
52
|
+
listItem: be,
|
|
53
|
+
listItemCollapsed: Ne,
|
|
54
|
+
listLink: fe,
|
|
55
|
+
listLinkCollapsed: ke,
|
|
56
|
+
active: Ce,
|
|
57
|
+
backdrop: xe,
|
|
58
|
+
backdropOpened: ge,
|
|
59
|
+
skipToContent: Le,
|
|
60
|
+
navbar: ye,
|
|
61
|
+
navbarList: Ie,
|
|
62
|
+
navbarItem: Me,
|
|
63
|
+
headerContentExternal: Ee,
|
|
64
|
+
logoExternalContainer: Te,
|
|
65
|
+
logoExternal: Se,
|
|
66
|
+
logoExternalDesktop: ze,
|
|
67
|
+
navbarWrapper: Be
|
|
67
68
|
}, w = N.createContext(
|
|
68
69
|
void 0
|
|
69
|
-
),
|
|
70
|
+
), Oe = ({
|
|
70
71
|
items: t,
|
|
71
72
|
title: s,
|
|
72
73
|
user: i,
|
|
@@ -113,13 +114,13 @@ const F = [
|
|
|
113
114
|
active: n,
|
|
114
115
|
hasBadge: o
|
|
115
116
|
}) => {
|
|
116
|
-
const { isCollapsed: m, setIsOpened: d, clientSideHref: v } = k(), _ = v ? v(s) : s, [p, h] =
|
|
117
|
-
return
|
|
117
|
+
const { isCollapsed: m, setIsOpened: d, clientSideHref: v } = k(), _ = v ? v(s) : s, [p, h] = G(!1);
|
|
118
|
+
return W(() => {
|
|
118
119
|
if (typeof window < "u") {
|
|
119
120
|
const l = window.location.pathname === _ || window.location.pathname.startsWith(_ + "/");
|
|
120
121
|
h(n ?? l);
|
|
121
122
|
}
|
|
122
|
-
}, [n, _]), m ? /* @__PURE__ */ r(
|
|
123
|
+
}, [n, _]), m ? /* @__PURE__ */ r(j, { children: [
|
|
123
124
|
/* @__PURE__ */ e(
|
|
124
125
|
L,
|
|
125
126
|
{
|
|
@@ -143,7 +144,7 @@ const F = [
|
|
|
143
144
|
] })
|
|
144
145
|
}
|
|
145
146
|
),
|
|
146
|
-
/* @__PURE__ */ e(
|
|
147
|
+
/* @__PURE__ */ e(D, { placement: "right", children: t })
|
|
147
148
|
] }) : /* @__PURE__ */ r(
|
|
148
149
|
L,
|
|
149
150
|
{
|
|
@@ -160,10 +161,10 @@ const F = [
|
|
|
160
161
|
]
|
|
161
162
|
}
|
|
162
163
|
);
|
|
163
|
-
},
|
|
164
|
-
en:
|
|
165
|
-
sv:
|
|
166
|
-
},
|
|
164
|
+
}, we = { closeMenu: "Close menu", openMenu: "Open menu", maximizeMenu: "Maximize menu", minimizeMenu: "Minimize menu", sidebarMenu: "Sidebar menu", bottomMenu: "Bottom menu", skipToContent: "Skip to main content" }, Pe = { closeMenu: "Stäng meny", openMenu: "Öppna meny", maximizeMenu: "Maximera meny", minimizeMenu: "Minimera meny", sidebarMenu: "Sidomeny", bottomMenu: "Bottenmeny", skipToContent: "Hoppa till huvudinnehåll" }, x = {
|
|
165
|
+
en: we,
|
|
166
|
+
sv: Pe
|
|
167
|
+
}, He = () => {
|
|
167
168
|
const {
|
|
168
169
|
items: t,
|
|
169
170
|
app: s,
|
|
@@ -211,7 +212,7 @@ const F = [
|
|
|
211
212
|
"aria-label": n ? p.format("maximizeMenu") : p.format("minimizeMenu"),
|
|
212
213
|
onPress: () => o(!n),
|
|
213
214
|
className: a.collapseButton,
|
|
214
|
-
children: n ? /* @__PURE__ */ e(
|
|
215
|
+
children: n ? /* @__PURE__ */ e(K, { size: 20 }) : /* @__PURE__ */ e(X, { size: 20 })
|
|
215
216
|
}
|
|
216
217
|
)
|
|
217
218
|
] }),
|
|
@@ -236,7 +237,7 @@ const F = [
|
|
|
236
237
|
]
|
|
237
238
|
}
|
|
238
239
|
);
|
|
239
|
-
},
|
|
240
|
+
}, Ge = () => {
|
|
240
241
|
const {
|
|
241
242
|
title: t,
|
|
242
243
|
user: s,
|
|
@@ -277,7 +278,7 @@ const F = [
|
|
|
277
278
|
{
|
|
278
279
|
className: a.header,
|
|
279
280
|
style: {
|
|
280
|
-
borderTop: `solid 4px ${i.color ? i.color :
|
|
281
|
+
borderTop: `solid 4px ${i.color ? i.color : q.brandPrimary}`
|
|
281
282
|
},
|
|
282
283
|
children: [
|
|
283
284
|
/* @__PURE__ */ r("div", { className: a.headerContent, children: [
|
|
@@ -299,13 +300,13 @@ const F = [
|
|
|
299
300
|
m(!1), o?.(!0);
|
|
300
301
|
},
|
|
301
302
|
children: n ? /* @__PURE__ */ e(
|
|
302
|
-
|
|
303
|
+
A,
|
|
303
304
|
{
|
|
304
305
|
size: 20,
|
|
305
306
|
"aria-hidden": "true"
|
|
306
307
|
}
|
|
307
308
|
) : /* @__PURE__ */ e(
|
|
308
|
-
|
|
309
|
+
$,
|
|
309
310
|
{
|
|
310
311
|
size: 20,
|
|
311
312
|
"aria-hidden": "true"
|
|
@@ -338,7 +339,7 @@ const F = [
|
|
|
338
339
|
children: i.format("skipToContent")
|
|
339
340
|
}
|
|
340
341
|
);
|
|
341
|
-
},
|
|
342
|
+
}, We = () => {
|
|
342
343
|
const { isOpened: t, setIsOpened: s } = k();
|
|
343
344
|
return t ? /* @__PURE__ */ e(
|
|
344
345
|
"div",
|
|
@@ -350,7 +351,7 @@ const F = [
|
|
|
350
351
|
"aria-hidden": !0
|
|
351
352
|
}
|
|
352
353
|
) : null;
|
|
353
|
-
},
|
|
354
|
+
}, je = () => {
|
|
354
355
|
const { items: t, clientSideRouter: s, clientSideHref: i } = k(), n = C(x), o = t.at(0)?.items;
|
|
355
356
|
return /* @__PURE__ */ e(
|
|
356
357
|
"nav",
|
|
@@ -450,16 +451,16 @@ const F = [
|
|
|
450
451
|
}
|
|
451
452
|
);
|
|
452
453
|
};
|
|
453
|
-
c.Provider =
|
|
454
|
-
c.Header =
|
|
455
|
-
c.Sidebar =
|
|
454
|
+
c.Provider = Oe;
|
|
455
|
+
c.Header = Ge;
|
|
456
|
+
c.Sidebar = He;
|
|
456
457
|
c.SidebarLink = P;
|
|
457
|
-
c.Navbar =
|
|
458
|
-
c.Backdrop =
|
|
458
|
+
c.Navbar = je;
|
|
459
|
+
c.Backdrop = We;
|
|
459
460
|
export {
|
|
460
|
-
|
|
461
|
+
Ge as H,
|
|
461
462
|
c as L,
|
|
462
|
-
|
|
463
|
-
|
|
463
|
+
je as N,
|
|
464
|
+
He as S,
|
|
464
465
|
P as a
|
|
465
466
|
};
|
|
@@ -3,7 +3,7 @@ import { Radio as u, RadioGroup as _, Group as f } from "react-aria-components";
|
|
|
3
3
|
import { c as p } from "./clsx-AexbMWKp.js";
|
|
4
4
|
import { a as G, L as R } from "./Label-Dup4lWaR.js";
|
|
5
5
|
import { T as h } from "./Text-TWzJxnto.js";
|
|
6
|
-
import { F as t } from "./FieldError-
|
|
6
|
+
import { F as t } from "./FieldError-Bra5aRT3.js";
|
|
7
7
|
import '../assets/Radio.css';const x = "_radioGroup_1ls9z_1", w = "_wrap_1ls9z_12", z = "_radio_1ls9z_1", s = {
|
|
8
8
|
radioGroup: x,
|
|
9
9
|
wrap: w,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import { RangeCalendarContext as h, CalendarGrid as C, CalendarCell as g, Calendar as v, RangeCalendar as _ } from "react-aria-components";
|
|
3
3
|
import { c as p, a as l } from "./clsx-AexbMWKp.js";
|
|
4
|
-
import { F as c } from "./FieldError-
|
|
4
|
+
import { F as c } from "./FieldError-Bra5aRT3.js";
|
|
5
5
|
import * as y from "react";
|
|
6
6
|
import { B as i } from "./Button-wBgWrXj3.js";
|
|
7
7
|
import { H as f } from "./Heading-D8tNNJkt.js";
|
|
@@ -5,7 +5,7 @@ import { c as l } from "./clsx-AexbMWKp.js";
|
|
|
5
5
|
import * as x from "react";
|
|
6
6
|
import { useSearchFieldState as j } from "react-stately";
|
|
7
7
|
import { useSearchField as C } from "react-aria";
|
|
8
|
-
import { F as f } from "./FieldError-
|
|
8
|
+
import { F as f } from "./FieldError-Bra5aRT3.js";
|
|
9
9
|
import { c as p } from "./createLucideIcon-D4r5Phnh.js";
|
|
10
10
|
import { X as B } from "./x-BXShoIAM.js";
|
|
11
11
|
import { u as D } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
@@ -4,9 +4,9 @@ import { FocusScope as b } from "@react-aria/focus";
|
|
|
4
4
|
import { a as T, L as N } from "./Label-Dup4lWaR.js";
|
|
5
5
|
import { a as y, c as h } from "./clsx-AexbMWKp.js";
|
|
6
6
|
import { T as B } from "./Text-TWzJxnto.js";
|
|
7
|
-
import { F as _ } from "./FieldError-
|
|
7
|
+
import { F as _ } from "./FieldError-Bra5aRT3.js";
|
|
8
8
|
import f, { useContext as p } from "react";
|
|
9
|
-
import { C as L } from "./Checkbox-
|
|
9
|
+
import { C as L } from "./Checkbox-BTAfwDxU.js";
|
|
10
10
|
import { u } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
11
11
|
import { useFocusManager as M } from "react-aria";
|
|
12
12
|
import { X as F } from "./x-BXShoIAM.js";
|
|
@@ -19,11 +19,11 @@ import { useFormValidation as ce } from "@react-aria/form";
|
|
|
19
19
|
import { useVisuallyHidden as de } from "@react-aria/visually-hidden";
|
|
20
20
|
import { a as ue, L as me } from "./Label-Dup4lWaR.js";
|
|
21
21
|
import { T as ge } from "./Text-TWzJxnto.js";
|
|
22
|
-
import { C as fe } from "./Checkbox-
|
|
22
|
+
import { C as fe } from "./Checkbox-BTAfwDxU.js";
|
|
23
23
|
import { X as pe } from "./x-BXShoIAM.js";
|
|
24
24
|
import { u as B } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
25
25
|
import { C as ye } from "./chevron-down-DgT-uSF9.js";
|
|
26
|
-
import { F as he } from "./FieldError-
|
|
26
|
+
import { F as he } from "./FieldError-Bra5aRT3.js";
|
|
27
27
|
import '../assets/Select2.css';const T = ({ item: e }) => /* @__PURE__ */ o(
|
|
28
28
|
X,
|
|
29
29
|
{
|