@midas-ds/components 1.0.3 → 1.1.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/{Button-B4vMZbC6.js → Button-DL6nqUco.js} +22 -22
- package/CHANGELOG.md +6 -1
- package/{Checkbox-DnKWanep.js → Checkbox-q0dugR2t.js} +8 -8
- package/{Collection-COLWgm24.js → Collection-KMFfVuzU.js} +2 -2
- package/{Dialog-Cb6toyXO.js → Dialog-D6Bqrpn-.js} +170 -169
- package/Disclosure-dAZYXyTH.js +225 -0
- package/Disclosure.css +1 -0
- package/{FocusScope-C8i7CH6y.js → FocusScope-B7CkxXNC.js} +1 -1
- package/{Form-BQQs3jUk.js → Form-BWBjJC6v.js} +42 -42
- package/{Group-CdwXhx8Q.js → Group-D7_8007y.js} +10 -10
- package/Heading-RCRHv6hd.js +15 -0
- package/{Hidden-DngIphiL.js → Hidden-CVlUgUJM.js} +1 -1
- package/{Link-iAZLB3RI.js → Link-BnQvB-hH.js} +8 -8
- package/{ListBox-BKWkIIm6.js → ListBox-DBBiqvcR.js} +72 -72
- package/{ListKeyboardDelegate-BH-K5hyq.js → ListKeyboardDelegate-gCXy-Xnn.js} +2 -2
- package/{PressResponder-Cz-TRBHO.js → PressResponder-B4g56kDz.js} +5 -5
- package/{RSPContexts-EOiWkKOf.js → RSPContexts-BW2SEIqe.js} +2 -2
- package/{SelectionManager-8o40f7mx.js → SelectionManager-BfXUE1qg.js} +113 -129
- package/{Separator-BlvmQjwz.js → Separator-BBX9m2O2.js} +2 -2
- package/{Tag--W5TgxmK.js → Tag-DWt0koFj.js} +74 -74
- package/Text-BCF0xvqL.js +15 -0
- package/{TextField-DeK_yiK-.js → TextField-CX4eOQf6.js} +33 -33
- package/{TextField.module-0-u4LVPp.js → TextField.module-DdICj682.js} +7 -7
- package/{VisuallyHidden-CFx06Bae.js → VisuallyHidden-Dhr5caPC.js} +1 -1
- package/accordion/Accordion.d.ts +8 -8
- package/accordion/AccordionItem.d.ts +11 -3
- package/accordion/index.d.ts +0 -3
- package/{context-Bnqknrce.js → context-BpJLnOuu.js} +11 -11
- package/global.css +1 -0
- package/index.d.ts +1 -0
- package/index.js +105 -110
- package/index10.js +1 -1
- package/index11.js +1 -1
- package/index12.js +1 -1
- package/index13.js +1 -1
- package/index14.js +1 -1
- package/index15.js +2 -2
- package/index16.js +2 -2
- package/index17.js +1 -1
- package/index18.js +1 -1
- package/index19.js +2 -2
- package/index2.js +1 -1
- package/index20.js +2 -2
- package/index21.js +1 -1
- package/index22.js +1 -1
- package/index23.js +1 -1
- package/index24.js +1 -1
- package/index25.js +2 -2
- package/index26.js +2 -2
- package/index27.js +2 -2
- package/index28.js +1 -1
- package/index29.js +2 -8
- package/index3.js +1 -1
- package/index30.js +17 -16
- package/index31.js +1 -1
- package/index32.js +1 -1
- package/index33.js +1 -1
- package/index34.js +2 -2
- package/index36.js +1 -1
- package/index37.js +1 -1
- package/index38.js +1 -1
- package/index39.js +1 -1
- package/index4.js +1 -1
- package/index40.js +19 -12
- package/index41.js +61 -14
- package/index42.js +44 -22
- package/index43.js +13 -11
- package/index44.js +25 -4
- package/index45.js +16 -51
- package/index46.js +19 -16
- package/index47.js +49 -27
- package/index48.js +5 -18
- package/index49.js +25 -21
- package/index5.js +1 -1
- package/index50.js +16 -47
- package/index51.js +7 -3
- package/index52.js +18 -18
- package/index53.js +16 -16
- package/index54.js +5 -3
- package/index55.js +7 -20
- package/index56.js +13 -16
- package/index57.js +6 -8
- package/index58.js +5 -8
- package/index59.js +17 -13
- package/index6.js +1 -1
- package/index60.js +20 -7
- package/index61.js +59 -7
- package/index62.js +13 -17
- package/index63.js +9 -20
- package/index64.js +38 -46
- package/index65.js +85 -15
- package/index66.js +74 -11
- package/index67.js +23 -62
- package/index68.js +64 -80
- package/index69.js +68 -62
- package/index7.js +1 -1
- package/index70.js +138 -22
- package/index71.js +66 -65
- package/index72.js +40 -78
- package/index73.js +75 -133
- package/index74.js +69 -68
- package/index75.js +96 -34
- package/index76.js +258 -65
- package/index77.js +715 -63
- package/index78.js +478 -93
- package/index79.js +303 -263
- package/index8.js +1 -1
- package/index80.js +343 -677
- package/index81.js +242 -479
- package/index82.js +1332 -282
- package/index83.js +966 -346
- package/index84.js +344 -210
- package/index85.js +2024 -1286
- package/index86.js +2314 -955
- package/index87.js +6785 -340
- package/index88.js +15 -2099
- package/index89.js +12 -2367
- package/index9.js +1 -1
- package/index90.js +4 -6834
- package/index91.js +7 -15
- package/package.json +1 -1
- package/useControlledState-Kv9K2AYu.js +30 -0
- package/{useDescription-BPs7eRff.js → useDescription-B7stiK3j.js} +1 -1
- package/useEvent-Xk5kn5Ns.js +21 -0
- package/{useField-Dz62UHCP.js → useField-DMzJIIN4.js} +5 -5
- package/{useFilter-ViwzkzZe.js → useFilter-Bt9dbV1U.js} +1 -1
- package/{useFocusRing-BKGhL91C.js → useFocusRing-9PXyKy2A.js} +26 -26
- package/{useFocusable-CRSmYEQc.js → useFocusable-CcEBZe40.js} +1 -1
- package/{useGridSelectionCheckbox-CVEvUCJL.js → useGridSelectionCheckbox-DYgEnElE.js} +3 -3
- package/{useHasTabbableChild-C8y4fwiY.js → useHasTabbableChild-D6DwR81L.js} +5 -5
- package/{useHighlightSelectionDescription-CD74uzLh.js → useHighlightSelectionDescription-WYAbP4No.js} +4 -4
- package/useLabels-9zaZ9oa0.js +17 -0
- package/{useListState-DKnP5TB5.js → useListState-BfTeKTk5.js} +1 -1
- package/{useLocalizedStringFormatter-DsZ-ZWSk.js → useLocalizedStringFormatter-BlCbn-hX.js} +1 -1
- package/{useSingleSelectListState-BHTLh8Ob.js → useSingleSelectListState-DPkaL0la.js} +2 -2
- package/Text-CQPW6xs7.js +0 -15
- package/accordion/AccordionContent.d.ts +0 -3
- package/accordion/AccordionTagContext.d.ts +0 -3
- package/accordion/AccordionTrigger.d.ts +0 -3
- package/index-DK9ZACEc.js +0 -642
- package/index.css +0 -1
- package/index92.js +0 -14
- package/index93.js +0 -6
- package/index94.js +0 -9
- package/useControlledState-DrAoodI6.js +0 -45
package/index79.js
CHANGED
|
@@ -1,274 +1,314 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { $ as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { $ as L } from "./Group-D7_8007y.js";
|
|
3
|
+
import { n as w, e as y, o as F, f as E, k as G, a as _, y as N, z as T, d as S, B as W, i as A, F as H, A as j, c as K, b as z } from "./useFocusRing-9PXyKy2A.js";
|
|
4
|
+
import { d as U, e as J, c as Q, $ as X, a as Y } from "./Form-BWBjJC6v.js";
|
|
5
|
+
import { b as Z, $ as ee } from "./useField-DMzJIIN4.js";
|
|
6
|
+
import { $ as ae } from "./Text-BCF0xvqL.js";
|
|
7
|
+
import V, { useMemo as ie, useState as de, forwardRef as M, createContext as q } from "react";
|
|
8
|
+
import { $ as re } from "./useControlledState-Kv9K2AYu.js";
|
|
9
|
+
import { $ as le } from "./FocusScope-B7CkxXNC.js";
|
|
10
|
+
import { $ as se } from "./context-BpJLnOuu.js";
|
|
11
|
+
import { $ as ne } from "./useFocusable-CcEBZe40.js";
|
|
12
|
+
import { a as te } from "./VisuallyHidden-Dhr5caPC.js";
|
|
13
|
+
import { I as oe } from "./TextField-CX4eOQf6.js";
|
|
14
|
+
import './Radio.css';const C = /* @__PURE__ */ new WeakMap();
|
|
15
|
+
function ce(a, e, d) {
|
|
16
|
+
let { value: r, children: s, "aria-label": l, "aria-labelledby": n } = a;
|
|
17
|
+
const i = a.isDisabled || e.isDisabled;
|
|
18
|
+
let u = s != null, f = l != null || n != null;
|
|
19
|
+
!u && !f && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
20
|
+
let t = e.selectedValue === r, v = (B) => {
|
|
21
|
+
B.stopPropagation(), e.setSelectedValue(r);
|
|
22
|
+
}, { pressProps: m, isPressed: x } = w({
|
|
23
|
+
isDisabled: i
|
|
24
|
+
}), { pressProps: P, isPressed: $ } = w({
|
|
25
|
+
isDisabled: i,
|
|
26
|
+
onPress() {
|
|
27
|
+
e.setSelectedValue(r);
|
|
28
|
+
}
|
|
29
|
+
}), { focusableProps: D } = ne(y(a, {
|
|
30
|
+
onFocus: () => e.setLastFocusedValue(r)
|
|
31
|
+
}), d), R = y(m, D), g = F(a, {
|
|
32
|
+
labelable: !0
|
|
33
|
+
}), p = -1;
|
|
34
|
+
e.selectedValue != null ? e.selectedValue === r && (p = 0) : (e.lastFocusedValue === r || e.lastFocusedValue == null) && (p = 0), i && (p = void 0);
|
|
35
|
+
let { name: b, descriptionId: o, errorMessageId: h, validationBehavior: c } = C.get(e);
|
|
36
|
+
return U(d, e.selectedValue, e.setSelectedValue), J({
|
|
37
|
+
validationBehavior: c
|
|
38
|
+
}, e, d), {
|
|
39
|
+
labelProps: y(P, {
|
|
40
|
+
onClick: (B) => B.preventDefault()
|
|
41
|
+
}),
|
|
42
|
+
inputProps: y(g, {
|
|
43
|
+
...R,
|
|
44
|
+
type: "radio",
|
|
45
|
+
name: b,
|
|
46
|
+
tabIndex: p,
|
|
47
|
+
disabled: i,
|
|
48
|
+
required: e.isRequired && c === "native",
|
|
49
|
+
checked: t,
|
|
50
|
+
value: r,
|
|
51
|
+
onChange: v,
|
|
52
|
+
"aria-describedby": [
|
|
53
|
+
a["aria-describedby"],
|
|
54
|
+
e.isInvalid ? h : null,
|
|
55
|
+
o
|
|
56
|
+
].filter(Boolean).join(" ") || void 0
|
|
57
|
+
}),
|
|
58
|
+
isDisabled: i,
|
|
59
|
+
isSelected: t,
|
|
60
|
+
isPressed: x || $
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function fe(a, e) {
|
|
64
|
+
let { name: d, isReadOnly: r, isRequired: s, isDisabled: l, orientation: n = "vertical", validationBehavior: i = "aria" } = a, { direction: u } = se(), { isInvalid: f, validationErrors: t, validationDetails: v } = e.displayValidation, { labelProps: m, fieldProps: x, descriptionProps: P, errorMessageProps: $ } = Z({
|
|
65
|
+
...a,
|
|
66
|
+
// Radio group is not an HTML input element so it
|
|
67
|
+
// shouldn't be labeled by a <label> element.
|
|
68
|
+
labelElementType: "span",
|
|
69
|
+
isInvalid: e.isInvalid,
|
|
70
|
+
errorMessage: a.errorMessage || t
|
|
71
|
+
}), D = F(a, {
|
|
72
|
+
labelable: !0
|
|
73
|
+
}), { focusWithinProps: R } = E({
|
|
74
|
+
onBlurWithin(b) {
|
|
75
|
+
var o;
|
|
76
|
+
(o = a.onBlur) === null || o === void 0 || o.call(a, b), e.selectedValue || e.setLastFocusedValue(null);
|
|
77
|
+
},
|
|
78
|
+
onFocusWithin: a.onFocus,
|
|
79
|
+
onFocusWithinChange: a.onFocusChange
|
|
80
|
+
}), g = (b) => {
|
|
81
|
+
let o;
|
|
82
|
+
switch (b.key) {
|
|
83
|
+
case "ArrowRight":
|
|
84
|
+
u === "rtl" && n !== "vertical" ? o = "prev" : o = "next";
|
|
85
|
+
break;
|
|
86
|
+
case "ArrowLeft":
|
|
87
|
+
u === "rtl" && n !== "vertical" ? o = "next" : o = "prev";
|
|
88
|
+
break;
|
|
89
|
+
case "ArrowDown":
|
|
90
|
+
o = "next";
|
|
91
|
+
break;
|
|
92
|
+
case "ArrowUp":
|
|
93
|
+
o = "prev";
|
|
94
|
+
break;
|
|
95
|
+
default:
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
b.preventDefault();
|
|
99
|
+
let h = le(b.currentTarget, {
|
|
100
|
+
from: b.target
|
|
101
|
+
}), c;
|
|
102
|
+
o === "next" ? (c = h.nextNode(), c || (h.currentNode = b.currentTarget, c = h.firstChild())) : (c = h.previousNode(), c || (h.currentNode = b.currentTarget, c = h.lastChild())), c && (c.focus(), e.setSelectedValue(c.value));
|
|
103
|
+
}, p = G(d);
|
|
104
|
+
return C.set(e, {
|
|
105
|
+
name: p,
|
|
106
|
+
descriptionId: P.id,
|
|
107
|
+
errorMessageId: $.id,
|
|
108
|
+
validationBehavior: i
|
|
109
|
+
}), {
|
|
110
|
+
radioGroupProps: y(D, {
|
|
111
|
+
// https://www.w3.org/TR/wai-aria-1.2/#radiogroup
|
|
112
|
+
role: "radiogroup",
|
|
113
|
+
onKeyDown: g,
|
|
114
|
+
"aria-invalid": e.isInvalid || void 0,
|
|
115
|
+
"aria-errormessage": a["aria-errormessage"],
|
|
116
|
+
"aria-readonly": r || void 0,
|
|
117
|
+
"aria-required": s || void 0,
|
|
118
|
+
"aria-disabled": l || void 0,
|
|
119
|
+
"aria-orientation": n,
|
|
120
|
+
...x,
|
|
121
|
+
...R
|
|
122
|
+
}),
|
|
123
|
+
labelProps: m,
|
|
124
|
+
descriptionProps: P,
|
|
125
|
+
errorMessageProps: $,
|
|
126
|
+
isInvalid: f,
|
|
127
|
+
validationErrors: t,
|
|
128
|
+
validationDetails: v
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
let ue = Math.round(Math.random() * 1e10), be = 0;
|
|
132
|
+
function $e(a) {
|
|
133
|
+
let e = ie(() => a.name || `radio-group-${ue}-${++be}`, [
|
|
134
|
+
a.name
|
|
135
|
+
]);
|
|
136
|
+
var d;
|
|
137
|
+
let [r, s] = re(a.value, (d = a.defaultValue) !== null && d !== void 0 ? d : null, a.onChange), [l, n] = de(null), i = Q({
|
|
138
|
+
...a,
|
|
139
|
+
value: r
|
|
140
|
+
}), u = (t) => {
|
|
141
|
+
!a.isReadOnly && !a.isDisabled && (s(t), i.commitValidation());
|
|
142
|
+
}, f = i.displayValidation.isInvalid;
|
|
143
|
+
return {
|
|
144
|
+
...i,
|
|
145
|
+
name: e,
|
|
146
|
+
selectedValue: r,
|
|
147
|
+
setSelectedValue: u,
|
|
148
|
+
lastFocusedValue: l,
|
|
149
|
+
setLastFocusedValue: n,
|
|
150
|
+
isDisabled: a.isDisabled || !1,
|
|
151
|
+
isReadOnly: a.isReadOnly || !1,
|
|
152
|
+
isRequired: a.isRequired || !1,
|
|
153
|
+
validationState: a.validationState || (f ? "invalid" : null),
|
|
154
|
+
isInvalid: f
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
const pe = /* @__PURE__ */ q(null), ve = /* @__PURE__ */ q(null), O = /* @__PURE__ */ q(null), me = /* @__PURE__ */ M(function(e, d) {
|
|
158
|
+
[e, d] = _(e, d, pe);
|
|
159
|
+
let { validationBehavior: r } = N(X) || {};
|
|
160
|
+
var s, l;
|
|
161
|
+
let n = (l = (s = e.validationBehavior) !== null && s !== void 0 ? s : r) !== null && l !== void 0 ? l : "native", i = $e({
|
|
162
|
+
...e,
|
|
163
|
+
validationBehavior: n
|
|
164
|
+
}), [u, f] = T(), { radioGroupProps: t, labelProps: v, descriptionProps: m, errorMessageProps: x, ...P } = fe({
|
|
165
|
+
...e,
|
|
166
|
+
label: f,
|
|
167
|
+
validationBehavior: n
|
|
168
|
+
}, i), $ = S({
|
|
169
|
+
...e,
|
|
170
|
+
values: {
|
|
171
|
+
orientation: e.orientation || "vertical",
|
|
172
|
+
isDisabled: i.isDisabled,
|
|
173
|
+
isReadOnly: i.isReadOnly,
|
|
174
|
+
isRequired: i.isRequired,
|
|
175
|
+
isInvalid: i.isInvalid,
|
|
176
|
+
state: i
|
|
177
|
+
},
|
|
178
|
+
defaultClassName: "react-aria-RadioGroup"
|
|
179
|
+
});
|
|
180
|
+
return /* @__PURE__ */ V.createElement("div", {
|
|
181
|
+
...t,
|
|
182
|
+
...$,
|
|
183
|
+
ref: d,
|
|
184
|
+
slot: e.slot || void 0,
|
|
185
|
+
"data-orientation": e.orientation || "vertical",
|
|
186
|
+
"data-invalid": i.isInvalid || void 0,
|
|
187
|
+
"data-disabled": i.isDisabled || void 0,
|
|
188
|
+
"data-readonly": i.isReadOnly || void 0,
|
|
189
|
+
"data-required": i.isRequired || void 0
|
|
190
|
+
}, /* @__PURE__ */ V.createElement(W, {
|
|
191
|
+
values: [
|
|
192
|
+
[
|
|
193
|
+
O,
|
|
194
|
+
i
|
|
195
|
+
],
|
|
196
|
+
[
|
|
197
|
+
ee,
|
|
132
198
|
{
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"
|
|
199
|
+
...v,
|
|
200
|
+
ref: u,
|
|
201
|
+
elementType: "span"
|
|
136
202
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}, ke = ({
|
|
141
|
-
items: p,
|
|
142
|
-
app: r,
|
|
143
|
-
isOpened: d,
|
|
144
|
-
isCollapsed: t,
|
|
145
|
-
setIsCollapsed: i,
|
|
146
|
-
clientSideRouter: o
|
|
147
|
-
}) => {
|
|
148
|
-
const c = () => /* @__PURE__ */ e("div", { className: a.sidebarHeader, children: t ? /* @__PURE__ */ e("p", { className: a.name, children: r.shortName }) : /* @__PURE__ */ e("p", { className: a.abbr, children: r.name }) }), m = ({ group: s }) => /* @__PURE__ */ e("ul", { className: a.list, children: s.items.map((n, _) => /* @__PURE__ */ e(
|
|
149
|
-
"li",
|
|
150
|
-
{
|
|
151
|
-
className: h(
|
|
152
|
-
a.listItem,
|
|
153
|
-
t && a.listItemCollapsed
|
|
154
|
-
),
|
|
155
|
-
children: /* @__PURE__ */ e(
|
|
156
|
-
f,
|
|
203
|
+
],
|
|
204
|
+
[
|
|
205
|
+
ae,
|
|
157
206
|
{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
className: h(
|
|
162
|
-
a.listLink,
|
|
163
|
-
t && a.listLinkCollapsed
|
|
164
|
-
),
|
|
165
|
-
variant: "tertiary",
|
|
166
|
-
children: /* @__PURE__ */ e(
|
|
167
|
-
"span",
|
|
168
|
-
{
|
|
169
|
-
className: h(
|
|
170
|
-
a.linkText,
|
|
171
|
-
t && a.linkTextCollapsed
|
|
172
|
-
),
|
|
173
|
-
children: n.title
|
|
174
|
-
}
|
|
175
|
-
)
|
|
176
|
-
}
|
|
177
|
-
)
|
|
178
|
-
},
|
|
179
|
-
"link_" + _
|
|
180
|
-
)) });
|
|
181
|
-
return /* @__PURE__ */ l(
|
|
182
|
-
"aside",
|
|
183
|
-
{
|
|
184
|
-
id: "midasMainMenu",
|
|
185
|
-
className: h(
|
|
186
|
-
a.sidebar,
|
|
187
|
-
t && a.sidebarCollapsed,
|
|
188
|
-
d && a.sidebarOpened
|
|
189
|
-
),
|
|
190
|
-
children: [
|
|
191
|
-
/* @__PURE__ */ e(c, {}),
|
|
192
|
-
/* @__PURE__ */ e("nav", { className: a.sidebarNav, children: /* @__PURE__ */ e("ul", { className: a.list, children: p.map((s, n) => /* @__PURE__ */ l("li", { children: [
|
|
193
|
-
s.title && !t && /* @__PURE__ */ e("p", { className: a.listGroupTitle, children: s.title }),
|
|
194
|
-
o ? /* @__PURE__ */ e(L, { navigate: o, children: /* @__PURE__ */ e(m, { group: s }) }) : /* @__PURE__ */ e(m, { group: s })
|
|
195
|
-
] }, "list_" + n)) }) }),
|
|
196
|
-
/* @__PURE__ */ e("div", { className: a.sidebarFooter, children: /* @__PURE__ */ e(
|
|
197
|
-
k,
|
|
198
|
-
{
|
|
199
|
-
variant: "tertiary",
|
|
200
|
-
"aria-label": t ? "Maximera sidomenyn" : "Minimera sidomenyn",
|
|
201
|
-
onPress: () => i(!t),
|
|
202
|
-
className: a.collapseButton,
|
|
203
|
-
children: t ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(B, {})
|
|
207
|
+
slots: {
|
|
208
|
+
description: m,
|
|
209
|
+
errorMessage: x
|
|
204
210
|
}
|
|
205
|
-
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
[
|
|
214
|
+
Y,
|
|
215
|
+
P
|
|
206
216
|
]
|
|
217
|
+
]
|
|
218
|
+
}, $.children));
|
|
219
|
+
}), xe = /* @__PURE__ */ M(function(e, d) {
|
|
220
|
+
let { inputRef: r = null, ...s } = e;
|
|
221
|
+
[e, d] = _(s, d, ve);
|
|
222
|
+
let l = V.useContext(O), n = A(H(r, e.inputRef !== void 0 ? e.inputRef : null)), { labelProps: i, inputProps: u, isSelected: f, isDisabled: t, isPressed: v } = ce({
|
|
223
|
+
...j(e),
|
|
224
|
+
// ReactNode type doesn't allow function children.
|
|
225
|
+
children: typeof e.children == "function" ? !0 : e.children
|
|
226
|
+
}, l, n), { isFocused: m, isFocusVisible: x, focusProps: P } = K(), $ = t || l.isReadOnly, { hoverProps: D, isHovered: R } = z({
|
|
227
|
+
...e,
|
|
228
|
+
isDisabled: $
|
|
229
|
+
}), g = S({
|
|
230
|
+
...e,
|
|
231
|
+
defaultClassName: "react-aria-Radio",
|
|
232
|
+
values: {
|
|
233
|
+
isSelected: f,
|
|
234
|
+
isPressed: v,
|
|
235
|
+
isHovered: R,
|
|
236
|
+
isFocused: m,
|
|
237
|
+
isFocusVisible: x,
|
|
238
|
+
isDisabled: t,
|
|
239
|
+
isReadOnly: l.isReadOnly,
|
|
240
|
+
isInvalid: l.isInvalid,
|
|
241
|
+
isRequired: l.isRequired
|
|
207
242
|
}
|
|
208
|
-
);
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
243
|
+
}), p = F(e);
|
|
244
|
+
return delete p.id, /* @__PURE__ */ V.createElement("label", {
|
|
245
|
+
...y(p, i, D, g),
|
|
246
|
+
ref: d,
|
|
247
|
+
"data-selected": f || void 0,
|
|
248
|
+
"data-pressed": v || void 0,
|
|
249
|
+
"data-hovered": R || void 0,
|
|
250
|
+
"data-focused": m || void 0,
|
|
251
|
+
"data-focus-visible": x || void 0,
|
|
252
|
+
"data-disabled": t || void 0,
|
|
253
|
+
"data-readonly": l.isReadOnly || void 0,
|
|
254
|
+
"data-invalid": l.isInvalid || void 0,
|
|
255
|
+
"data-required": l.isRequired || void 0
|
|
256
|
+
}, /* @__PURE__ */ V.createElement(te, {
|
|
257
|
+
elementType: "span"
|
|
258
|
+
}, /* @__PURE__ */ V.createElement("input", {
|
|
259
|
+
...y(u, P),
|
|
260
|
+
ref: n
|
|
261
|
+
})), g.children);
|
|
262
|
+
}), Pe = '"../theme/tokens.css"', he = '"Inter", sans-serif', ye = "undefined", Re = "#1f1f1f", ge = "#000000", Ve = "#143c50", De = "#bfbfbf", Ie = "#b3b3b3", Be = "#ffdfdf", ke = "#e62323", Fe = "undefined", qe = "#1f1f1f", we = "undefined", _e = "(max-width: 767px)", Se = "0 0 0 2px #ffffff, 0 0 0 4px #000000", Me = "(min-width: 768px)", Ce = "#b3b3b3", Oe = "_radioGroup_1vn0q_4", Le = "_wrap_1vn0q_17", Ee = "_radio_1vn0q_4", k = {
|
|
263
|
+
tokens: Pe,
|
|
264
|
+
display: he,
|
|
265
|
+
inputLabel: ye,
|
|
266
|
+
inputText: Re,
|
|
267
|
+
black: ge,
|
|
268
|
+
blue150: Ve,
|
|
269
|
+
gray50: De,
|
|
270
|
+
gray60: Ie,
|
|
271
|
+
signalRed10: Be,
|
|
272
|
+
signalRed100: ke,
|
|
273
|
+
medium: Fe,
|
|
274
|
+
gray150: qe,
|
|
275
|
+
regular: we,
|
|
276
|
+
smBreakpoint: _e,
|
|
277
|
+
focus: Se,
|
|
278
|
+
mdBreakpoint: Me,
|
|
279
|
+
borderSecondary: Ce,
|
|
280
|
+
radioGroup: Oe,
|
|
281
|
+
wrap: Le,
|
|
282
|
+
radio: Ee
|
|
283
|
+
}, Ye = ({
|
|
284
|
+
label: a,
|
|
285
|
+
description: e,
|
|
286
|
+
errorMessage: d,
|
|
287
|
+
children: r,
|
|
288
|
+
...s
|
|
289
|
+
}) => /* @__PURE__ */ I(
|
|
290
|
+
me,
|
|
219
291
|
{
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
variant: "icon",
|
|
238
|
-
className: a.toggleButton,
|
|
239
|
-
"aria-label": i ? "Stäng meny" : "Öppna meny",
|
|
240
|
-
"aria-controls": "midasMainMenu",
|
|
241
|
-
onPress: () => {
|
|
242
|
-
c(!1), o(!i);
|
|
243
|
-
},
|
|
244
|
-
children: i ? /* @__PURE__ */ e(
|
|
245
|
-
T,
|
|
246
|
-
{
|
|
247
|
-
size: 20,
|
|
248
|
-
"aria-hidden": !0
|
|
249
|
-
}
|
|
250
|
-
) : /* @__PURE__ */ e(
|
|
251
|
-
I,
|
|
252
|
-
{
|
|
253
|
-
size: 20,
|
|
254
|
-
"aria-hidden": !0
|
|
255
|
-
}
|
|
256
|
-
)
|
|
257
|
-
}
|
|
258
|
-
),
|
|
259
|
-
/* @__PURE__ */ l("div", { children: [
|
|
260
|
-
/* @__PURE__ */ e("p", { className: a.userName, children: r.name }),
|
|
261
|
-
/* @__PURE__ */ e("p", { className: a.userTitle, children: r.title }),
|
|
262
|
-
/* @__PURE__ */ e("p", { className: a.title, children: p })
|
|
263
|
-
] })
|
|
264
|
-
] }),
|
|
265
|
-
/* @__PURE__ */ e("div", { className: a.headerItems, children: t }),
|
|
266
|
-
/* @__PURE__ */ e("div", { className: a.headerMenu, children: /* @__PURE__ */ e(x, { children: b.Children.map(t, (m) => /* @__PURE__ */ e(C, { children: m })) }) })
|
|
267
|
-
]
|
|
292
|
+
...s,
|
|
293
|
+
className: k.radioGroup,
|
|
294
|
+
children: /* @__PURE__ */ I(
|
|
295
|
+
oe,
|
|
296
|
+
{
|
|
297
|
+
label: a,
|
|
298
|
+
description: e,
|
|
299
|
+
errorMessage: d,
|
|
300
|
+
children: /* @__PURE__ */ I(L, { className: k.wrap, children: r })
|
|
301
|
+
}
|
|
302
|
+
)
|
|
303
|
+
}
|
|
304
|
+
), Ze = (a) => /* @__PURE__ */ I(
|
|
305
|
+
xe,
|
|
306
|
+
{
|
|
307
|
+
className: k.radio,
|
|
308
|
+
...a
|
|
268
309
|
}
|
|
269
310
|
);
|
|
270
311
|
export {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
ke as Sidebar
|
|
312
|
+
Ze as Radio,
|
|
313
|
+
Ye as RadioGroup
|
|
274
314
|
};
|
package/index8.js
CHANGED