@midas-ds/components 1.0.2 → 1.0.3
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 +182 -0
- package/CHANGELOG.md +10 -0
- package/Checkbox-DnKWanep.js +402 -0
- package/{Collection-B3xUVWPF.js → Collection-COLWgm24.js} +179 -152
- package/Dialog-Cb6toyXO.js +1951 -0
- package/DragAndDrop-B0T3WgjL.js +40 -0
- package/FocusScope-C8i7CH6y.js +513 -0
- package/Form-BQQs3jUk.js +238 -0
- package/Group-CdwXhx8Q.js +42 -0
- package/{Hidden-BQWDvze4.js → Hidden-DngIphiL.js} +1 -1
- package/Link-iAZLB3RI.js +75 -0
- package/ListBox-BKWkIIm6.js +474 -0
- package/ListKeyboardDelegate-BH-K5hyq.js +172 -0
- package/{PressResponder-DP8ZDNGy.js → PressResponder-Cz-TRBHO.js} +10 -10
- package/README.md +21 -3
- package/SelectionManager-8o40f7mx.js +1047 -0
- package/Separator-BlvmQjwz.js +49 -0
- package/Tag--W5TgxmK.js +728 -0
- package/Text-CQPW6xs7.js +15 -0
- package/TextField-DeK_yiK-.js +225 -0
- package/TextField.module-0-u4LVPp.js +143 -0
- package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-CFx06Bae.js} +1 -1
- package/{context-ScOIq_Gu.js → context-Bnqknrce.js} +1 -1
- package/index-B-jHjTDC.js +120 -0
- package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
- package/index-DK9ZACEc.js +642 -0
- package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
- package/index.js +45 -47
- package/index15.js +1 -1
- package/index16.js +1 -1
- package/index25.js +1 -1
- package/index26.js +1 -1
- package/index3.js +2 -4
- package/index31.js +3 -3
- package/index32.js +2 -2
- package/index33.js +2 -2
- package/index34.js +1 -1
- package/index35.js +1 -1
- package/index36.js +1 -1
- package/index37.js +1 -1
- package/index38.js +1 -1
- package/index39.js +1 -1
- package/index40.js +1 -1
- package/index41.js +1 -1
- package/index42.js +1 -1
- package/index43.js +1 -1
- package/index45.js +3 -3
- package/index5.js +1 -1
- package/index50.js +1 -1
- package/index52.js +3 -3
- package/index53.js +3 -3
- package/index54.js +1 -1
- package/index55.js +4 -4
- package/index56.js +1 -1
- package/index57.js +1 -1
- package/index58.js +1 -1
- package/index59.js +3 -3
- package/index60.js +1 -1
- package/index61.js +1 -1
- package/index62.js +1 -1
- package/index63.js +4 -4
- package/index64.js +3 -3
- package/index65.js +3 -3
- package/index66.js +1 -1
- package/index67.js +3 -3
- package/index68.js +2 -2
- package/index69.js +1 -1
- package/index71.js +1 -1
- package/index76.js +5 -5
- package/index77.js +2 -2
- package/index78.js +2 -2
- package/index79.js +1 -1
- package/index80.js +226 -227
- package/index81.js +197 -199
- package/index82.js +192 -195
- package/index83.js +181 -183
- package/index84.js +52 -54
- package/index85.js +261 -262
- package/index86.js +262 -262
- package/index87.js +209 -211
- package/index88.js +436 -440
- package/index89.js +962 -964
- package/index90.js +2401 -2399
- package/index92.js +5 -5
- package/index93.js +1 -1
- package/index94.js +1 -1
- package/link/Link.d.ts +2 -2
- package/link-button/LinkButton.d.ts +1 -1
- package/package.json +7 -1
- package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
- package/textfield/index.d.ts +0 -2
- package/{useControlledState-S_TYcV_c.js → useControlledState-DrAoodI6.js} +1 -1
- package/{useDescription-D4_zk_sA.js → useDescription-BPs7eRff.js} +1 -1
- package/useField-Dz62UHCP.js +67 -0
- package/{useFilter-BnJDBCkt.js → useFilter-ViwzkzZe.js} +1 -1
- package/useFocusRing-BKGhL91C.js +1297 -0
- package/{useFocusable-C-N9wcwm.js → useFocusable-CRSmYEQc.js} +11 -8
- package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-CVEvUCJL.js} +3 -3
- package/useHasTabbableChild-C8y4fwiY.js +34 -0
- package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-CD74uzLh.js} +19 -19
- package/useListState-DKnP5TB5.js +119 -0
- package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-DsZ-ZWSk.js} +29 -29
- package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-BHTLh8Ob.js} +5 -5
- package/Button-CCevm2s3.js +0 -183
- package/Checkbox-CllWDBxF.js +0 -405
- package/Dialog-CLTyYwkS.js +0 -1889
- package/DragAndDrop-OTN7La7U.js +0 -42
- package/FocusScope-BR0SJ-cZ.js +0 -512
- package/Form-DXLoQL91.js +0 -240
- package/Group-DPMuN3h8.js +0 -44
- package/Label-C18A_4Z5.js +0 -69
- package/Link-BU1h3K2a.js +0 -77
- package/ListBox-D21tdwTs.js +0 -463
- package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
- package/SelectionManager-D4WtKtey.js +0 -988
- package/Separator-DLUHK9vv.js +0 -48
- package/Tag-CEd6WWSc.js +0 -725
- package/Text-DGLaY3HR.js +0 -17
- package/TextField-C_hq9WeT.js +0 -226
- package/TextField.module-Cwq1FAm7.js +0 -141
- package/index-CEg5vZQH.js +0 -132
- package/index-CgfokhRq.js +0 -674
- package/useFocusRing-D97-G3fT.js +0 -1324
- package/useHasTabbableChild-DeuCnGGv.js +0 -34
- package/useListState-DSOTbsL3.js +0 -119
package/index83.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as H, jsx as F } from "react/jsx-runtime";
|
|
2
2
|
import * as w from "react";
|
|
3
|
-
import f, { useMemo as S, useRef as
|
|
4
|
-
import { $ as
|
|
5
|
-
import { n as g, p as
|
|
6
|
-
import { $ as
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import { $ as ee } from "./
|
|
10
|
-
import {
|
|
11
|
-
import { $ as
|
|
12
|
-
import './Tabs.css';const
|
|
13
|
-
function
|
|
14
|
-
return t ? (typeof e == "string" && (e = e.replace(/\s+/g, "")), `${
|
|
3
|
+
import f, { useMemo as S, useRef as B, useEffect as O, forwardRef as M, useContext as p, createContext as T } from "react";
|
|
4
|
+
import { $ as z, a as _, b as N, f as W, c as q, d as j } from "./Collection-COLWgm24.js";
|
|
5
|
+
import { n as g, p as U, e as m, l as G, a as J, c as E, d as K, A as R, x as Q, i as C, b as X } from "./useFocusRing-BKGhL91C.js";
|
|
6
|
+
import { $ as Y } from "./Hidden-DngIphiL.js";
|
|
7
|
+
import { $ as Z } from "./useSingleSelectListState-BHTLh8Ob.js";
|
|
8
|
+
import { a as A } from "./useControlledState-DrAoodI6.js";
|
|
9
|
+
import { $ as ee } from "./context-Bnqknrce.js";
|
|
10
|
+
import { d as te, e as ie } from "./SelectionManager-8o40f7mx.js";
|
|
11
|
+
import { $ as ae } from "./useHasTabbableChild-C8y4fwiY.js";
|
|
12
|
+
import './Tabs.css';const V = /* @__PURE__ */ new WeakMap();
|
|
13
|
+
function P(t, e, i) {
|
|
14
|
+
return t ? (typeof e == "string" && (e = e.replace(/\s+/g, "")), `${V.get(t)}-${i}-${e}`) : "";
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
let { key: a, isDisabled:
|
|
18
|
-
selectionManager:
|
|
16
|
+
function ne(t, e, i) {
|
|
17
|
+
let { key: a, isDisabled: n, shouldSelectOnPressUp: l } = t, { selectionManager: s, selectedKey: r } = e, d = a === r, o = n || e.isDisabled || e.selectionManager.isDisabled(a), { itemProps: c, isPressed: u } = te({
|
|
18
|
+
selectionManager: s,
|
|
19
19
|
key: a,
|
|
20
20
|
ref: i,
|
|
21
|
-
isDisabled:
|
|
22
|
-
shouldSelectOnPressUp:
|
|
21
|
+
isDisabled: o,
|
|
22
|
+
shouldSelectOnPressUp: l,
|
|
23
23
|
linkBehavior: "selection"
|
|
24
|
-
}),
|
|
24
|
+
}), $ = P(e, a, "tab"), y = P(e, a, "tabpanel"), { tabIndex: D } = c, b = e.collection.getItem(a), L = g(b == null ? void 0 : b.props, {
|
|
25
25
|
labelable: !0
|
|
26
26
|
});
|
|
27
27
|
delete L.id;
|
|
28
|
-
let
|
|
28
|
+
let k = U(b == null ? void 0 : b.props);
|
|
29
29
|
return {
|
|
30
|
-
tabProps:
|
|
31
|
-
id:
|
|
32
|
-
"aria-selected":
|
|
33
|
-
"aria-disabled":
|
|
34
|
-
"aria-controls":
|
|
35
|
-
tabIndex:
|
|
30
|
+
tabProps: m(L, k, c, {
|
|
31
|
+
id: $,
|
|
32
|
+
"aria-selected": d,
|
|
33
|
+
"aria-disabled": o || void 0,
|
|
34
|
+
"aria-controls": d ? y : void 0,
|
|
35
|
+
tabIndex: o ? void 0 : D,
|
|
36
36
|
role: "tab"
|
|
37
37
|
}),
|
|
38
|
-
isSelected:
|
|
39
|
-
isDisabled:
|
|
38
|
+
isSelected: d,
|
|
39
|
+
isDisabled: o,
|
|
40
40
|
isPressed: u
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
function se(t, e, i) {
|
|
44
|
-
let a =
|
|
45
|
-
var
|
|
46
|
-
const
|
|
44
|
+
let a = ae(i) ? void 0 : 0;
|
|
45
|
+
var n;
|
|
46
|
+
const l = P(e, (n = t.id) !== null && n !== void 0 ? n : e == null ? void 0 : e.selectedKey, "tabpanel"), s = A({
|
|
47
47
|
...t,
|
|
48
|
-
id:
|
|
49
|
-
"aria-labelledby":
|
|
48
|
+
id: l,
|
|
49
|
+
"aria-labelledby": P(e, e == null ? void 0 : e.selectedKey, "tab")
|
|
50
50
|
});
|
|
51
51
|
return {
|
|
52
|
-
tabPanelProps:
|
|
52
|
+
tabPanelProps: m(s, {
|
|
53
53
|
tabIndex: a,
|
|
54
54
|
role: "tabpanel",
|
|
55
55
|
"aria-describedby": t["aria-describedby"],
|
|
@@ -57,7 +57,7 @@ function se(t, e, i) {
|
|
|
57
57
|
})
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
class
|
|
60
|
+
class de {
|
|
61
61
|
getKeyLeftOf(e) {
|
|
62
62
|
return this.flipDirection ? this.getNextKey(e) : this.getPreviousKey(e);
|
|
63
63
|
}
|
|
@@ -94,51 +94,51 @@ class le {
|
|
|
94
94
|
while (this.isDisabled(e));
|
|
95
95
|
return e;
|
|
96
96
|
}
|
|
97
|
-
constructor(e, i, a,
|
|
98
|
-
this.collection = e, this.flipDirection = i === "rtl" && a === "horizontal", this.disabledKeys =
|
|
97
|
+
constructor(e, i, a, n = /* @__PURE__ */ new Set()) {
|
|
98
|
+
this.collection = e, this.flipDirection = i === "rtl" && a === "horizontal", this.disabledKeys = n, this.tabDirection = a === "horizontal";
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
let { orientation: a = "horizontal", keyboardActivation:
|
|
103
|
-
|
|
101
|
+
function le(t, e, i) {
|
|
102
|
+
let { orientation: a = "horizontal", keyboardActivation: n = "automatic" } = t, { collection: l, selectionManager: s, disabledKeys: r } = e, { direction: d } = ee(), o = S(() => new de(l, d, a, r), [
|
|
103
|
+
l,
|
|
104
104
|
r,
|
|
105
105
|
a,
|
|
106
|
-
|
|
107
|
-
]), { collectionProps: c } =
|
|
106
|
+
d
|
|
107
|
+
]), { collectionProps: c } = ie({
|
|
108
108
|
ref: i,
|
|
109
|
-
selectionManager:
|
|
110
|
-
keyboardDelegate:
|
|
111
|
-
selectOnFocus:
|
|
109
|
+
selectionManager: s,
|
|
110
|
+
keyboardDelegate: o,
|
|
111
|
+
selectOnFocus: n === "automatic",
|
|
112
112
|
disallowEmptySelection: !0,
|
|
113
113
|
scrollRef: i,
|
|
114
114
|
linkBehavior: "selection"
|
|
115
|
-
}), u =
|
|
116
|
-
|
|
117
|
-
let
|
|
115
|
+
}), u = G();
|
|
116
|
+
V.set(e, u);
|
|
117
|
+
let $ = A({
|
|
118
118
|
...t,
|
|
119
119
|
id: u
|
|
120
120
|
});
|
|
121
121
|
return {
|
|
122
122
|
tabListProps: {
|
|
123
|
-
...
|
|
123
|
+
...m(c, $),
|
|
124
124
|
role: "tablist",
|
|
125
125
|
"aria-orientation": a,
|
|
126
126
|
tabIndex: void 0
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function re(t) {
|
|
131
131
|
var e, i;
|
|
132
|
-
let a =
|
|
132
|
+
let a = Z({
|
|
133
133
|
...t,
|
|
134
134
|
suppressTextValueWarning: !0,
|
|
135
135
|
defaultSelectedKey: (i = (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : I(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())) !== null && i !== void 0 ? i : void 0
|
|
136
|
-
}), { selectionManager:
|
|
137
|
-
return
|
|
138
|
-
let
|
|
139
|
-
(
|
|
140
|
-
|
|
141
|
-
])), (
|
|
136
|
+
}), { selectionManager: n, collection: l, selectedKey: s } = a, r = B(s);
|
|
137
|
+
return O(() => {
|
|
138
|
+
let d = s;
|
|
139
|
+
(n.isEmpty || d == null || !l.getItem(d)) && (d = I(l, a.disabledKeys), d != null && n.setSelectedKeys([
|
|
140
|
+
d
|
|
141
|
+
])), (d != null && n.focusedKey == null || !n.isFocused && d !== r.current) && n.setFocusedKey(d), r.current = d;
|
|
142
142
|
}), {
|
|
143
143
|
...a,
|
|
144
144
|
isDisabled: t.isDisabled || !1
|
|
@@ -147,110 +147,108 @@ function oe(t) {
|
|
|
147
147
|
function I(t, e) {
|
|
148
148
|
let i = null;
|
|
149
149
|
if (t) {
|
|
150
|
-
var a,
|
|
151
|
-
for (i = t.getFirstKey(); i != null && (e.has(i) || !((
|
|
152
|
-
i != null && (e.has(i) || !((
|
|
150
|
+
var a, n, l, s;
|
|
151
|
+
for (i = t.getFirstKey(); i != null && (e.has(i) || !((n = t.getItem(i)) === null || n === void 0 || (a = n.props) === null || a === void 0) && a.isDisabled) && i !== t.getLastKey(); ) i = t.getKeyAfter(i);
|
|
152
|
+
i != null && (e.has(i) || !((s = t.getItem(i)) === null || s === void 0 || (l = s.props) === null || l === void 0) && l.isDisabled) && i === t.getLastKey() && (i = t.getFirstKey());
|
|
153
153
|
}
|
|
154
154
|
return i;
|
|
155
155
|
}
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
orientation: a,
|
|
156
|
+
const v = /* @__PURE__ */ T(null), h = /* @__PURE__ */ T(null), oe = /* @__PURE__ */ M(function(e, i) {
|
|
157
|
+
[e, i] = J(e, i, v);
|
|
158
|
+
let { children: a, orientation: n = "horizontal" } = e;
|
|
159
|
+
return a = S(() => typeof a == "function" ? a({
|
|
160
|
+
orientation: n,
|
|
162
161
|
defaultChildren: null
|
|
163
|
-
}) :
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
}) : a, [
|
|
163
|
+
a,
|
|
164
|
+
n
|
|
166
165
|
]), /* @__PURE__ */ f.createElement(z, {
|
|
167
|
-
content:
|
|
168
|
-
}, (
|
|
169
|
-
props:
|
|
170
|
-
collection:
|
|
171
|
-
tabsRef:
|
|
166
|
+
content: a
|
|
167
|
+
}, (l) => /* @__PURE__ */ f.createElement(ce, {
|
|
168
|
+
props: e,
|
|
169
|
+
collection: l,
|
|
170
|
+
tabsRef: i
|
|
172
171
|
}));
|
|
173
|
-
}
|
|
174
|
-
function
|
|
175
|
-
let { orientation: a = "horizontal" } = t,
|
|
172
|
+
});
|
|
173
|
+
function ce({ props: t, tabsRef: e, collection: i }) {
|
|
174
|
+
let { orientation: a = "horizontal" } = t, n = re({
|
|
176
175
|
...t,
|
|
177
176
|
collection: i,
|
|
178
177
|
children: void 0
|
|
179
|
-
}), { focusProps:
|
|
178
|
+
}), { focusProps: l, isFocused: s, isFocusVisible: r } = E({
|
|
180
179
|
within: !0
|
|
181
|
-
}),
|
|
180
|
+
}), d = S(() => ({
|
|
182
181
|
orientation: a,
|
|
183
|
-
isFocusWithin:
|
|
182
|
+
isFocusWithin: s,
|
|
184
183
|
isFocusVisible: r
|
|
185
184
|
}), [
|
|
186
185
|
a,
|
|
187
|
-
|
|
186
|
+
s,
|
|
188
187
|
r
|
|
189
|
-
]),
|
|
188
|
+
]), o = K({
|
|
190
189
|
...t,
|
|
191
190
|
defaultClassName: "react-aria-Tabs",
|
|
192
|
-
values:
|
|
191
|
+
values: d
|
|
193
192
|
});
|
|
194
193
|
return /* @__PURE__ */ f.createElement("div", {
|
|
195
194
|
...g(t),
|
|
195
|
+
...l,
|
|
196
196
|
...o,
|
|
197
|
-
...d,
|
|
198
197
|
ref: e,
|
|
199
198
|
slot: t.slot || void 0,
|
|
200
|
-
"data-focused":
|
|
199
|
+
"data-focused": s || void 0,
|
|
201
200
|
"data-orientation": a,
|
|
202
201
|
"data-focus-visible": r || void 0,
|
|
203
|
-
"data-disabled":
|
|
204
|
-
}, /* @__PURE__ */ f.createElement(
|
|
202
|
+
"data-disabled": n.isDisabled || void 0
|
|
203
|
+
}, /* @__PURE__ */ f.createElement(R, {
|
|
205
204
|
values: [
|
|
206
205
|
[
|
|
207
|
-
|
|
206
|
+
v,
|
|
208
207
|
t
|
|
209
208
|
],
|
|
210
209
|
[
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
h,
|
|
211
|
+
n
|
|
213
212
|
]
|
|
214
213
|
]
|
|
215
|
-
},
|
|
216
|
-
}
|
|
217
|
-
const ce = /* @__PURE__ */ M(re);
|
|
218
|
-
function fe(t, e) {
|
|
219
|
-
return p($) ? /* @__PURE__ */ f.createElement(ue, {
|
|
220
|
-
props: t,
|
|
221
|
-
forwardedRef: e
|
|
222
|
-
}) : /* @__PURE__ */ f.createElement(_, t);
|
|
214
|
+
}, o.children));
|
|
223
215
|
}
|
|
216
|
+
const fe = /* @__PURE__ */ M(function(e, i) {
|
|
217
|
+
return p(h) ? /* @__PURE__ */ f.createElement(ue, {
|
|
218
|
+
props: e,
|
|
219
|
+
forwardedRef: i
|
|
220
|
+
}) : /* @__PURE__ */ f.createElement(_, e);
|
|
221
|
+
});
|
|
224
222
|
function ue({ props: t, forwardedRef: e }) {
|
|
225
|
-
let i = p(
|
|
223
|
+
let i = p(h), { CollectionRoot: a } = p(N), { orientation: n = "horizontal", keyboardActivation: l = "automatic" } = Q(v), s = C(e), { tabListProps: r } = le({
|
|
226
224
|
...t,
|
|
227
|
-
orientation:
|
|
228
|
-
keyboardActivation:
|
|
229
|
-
}, i,
|
|
225
|
+
orientation: n,
|
|
226
|
+
keyboardActivation: l
|
|
227
|
+
}, i, s), d = K({
|
|
230
228
|
...t,
|
|
231
229
|
children: null,
|
|
232
230
|
defaultClassName: "react-aria-TabList",
|
|
233
231
|
values: {
|
|
234
|
-
orientation:
|
|
232
|
+
orientation: n,
|
|
235
233
|
state: i
|
|
236
234
|
}
|
|
237
|
-
}),
|
|
238
|
-
return delete
|
|
239
|
-
...
|
|
235
|
+
}), o = g(t);
|
|
236
|
+
return delete o.id, /* @__PURE__ */ f.createElement("div", {
|
|
237
|
+
...o,
|
|
240
238
|
...r,
|
|
241
|
-
ref:
|
|
242
|
-
...
|
|
243
|
-
"data-orientation":
|
|
239
|
+
ref: s,
|
|
240
|
+
...d,
|
|
241
|
+
"data-orientation": n || void 0
|
|
244
242
|
}, /* @__PURE__ */ f.createElement(a, {
|
|
245
243
|
collection: i.collection,
|
|
246
|
-
persistedKeys:
|
|
244
|
+
persistedKeys: W(i.selectionManager.focusedKey)
|
|
247
245
|
}));
|
|
248
246
|
}
|
|
249
|
-
const be = /* @__PURE__ */
|
|
250
|
-
let a = p(
|
|
247
|
+
const be = /* @__PURE__ */ q("item", (t, e, i) => {
|
|
248
|
+
let a = p(h), n = C(e), { tabProps: l, isSelected: s, isDisabled: r, isPressed: d } = ne({
|
|
251
249
|
key: i.key,
|
|
252
250
|
...t
|
|
253
|
-
}, a,
|
|
251
|
+
}, a, n), { focusProps: o, isFocused: c, isFocusVisible: u } = E(), { hoverProps: $, isHovered: y } = X({
|
|
254
252
|
isDisabled: r,
|
|
255
253
|
onHoverStart: t.onHoverStart,
|
|
256
254
|
onHoverEnd: t.onHoverEnd,
|
|
@@ -260,127 +258,127 @@ const be = /* @__PURE__ */ M(fe), $e = /* @__PURE__ */ O("item", (t, e, i) => {
|
|
|
260
258
|
id: void 0,
|
|
261
259
|
defaultClassName: "react-aria-Tab",
|
|
262
260
|
values: {
|
|
263
|
-
isSelected:
|
|
261
|
+
isSelected: s,
|
|
264
262
|
isDisabled: r,
|
|
265
263
|
isFocused: c,
|
|
266
264
|
isFocusVisible: u,
|
|
267
|
-
isPressed:
|
|
268
|
-
isHovered:
|
|
265
|
+
isPressed: d,
|
|
266
|
+
isHovered: y
|
|
269
267
|
}
|
|
270
268
|
}), b = i.props.href ? "a" : "div";
|
|
271
269
|
return /* @__PURE__ */ f.createElement(b, {
|
|
272
|
-
...
|
|
273
|
-
ref:
|
|
274
|
-
"data-selected":
|
|
270
|
+
...m(l, o, $, D),
|
|
271
|
+
ref: n,
|
|
272
|
+
"data-selected": s || void 0,
|
|
275
273
|
"data-disabled": r || void 0,
|
|
276
274
|
"data-focused": c || void 0,
|
|
277
275
|
"data-focus-visible": u || void 0,
|
|
278
|
-
"data-pressed":
|
|
279
|
-
"data-hovered":
|
|
276
|
+
"data-pressed": d || void 0,
|
|
277
|
+
"data-hovered": y || void 0
|
|
280
278
|
});
|
|
281
|
-
})
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
...t,
|
|
279
|
+
}), $e = /* @__PURE__ */ Y(function(e, i) {
|
|
280
|
+
const a = p(h);
|
|
281
|
+
let n = C(i), { tabPanelProps: l } = se(e, a, n), { focusProps: s, isFocused: r, isFocusVisible: d } = E(), o = a.selectedKey === e.id, c = K({
|
|
282
|
+
...e,
|
|
286
283
|
defaultClassName: "react-aria-TabPanel",
|
|
287
284
|
values: {
|
|
288
|
-
isFocused:
|
|
289
|
-
isFocusVisible:
|
|
290
|
-
isInert: !
|
|
291
|
-
state:
|
|
285
|
+
isFocused: r,
|
|
286
|
+
isFocusVisible: d,
|
|
287
|
+
isInert: !o,
|
|
288
|
+
state: a
|
|
292
289
|
}
|
|
293
290
|
});
|
|
294
|
-
if (!
|
|
295
|
-
let
|
|
296
|
-
delete
|
|
297
|
-
let
|
|
291
|
+
if (!o && !e.shouldForceMount) return null;
|
|
292
|
+
let u = g(e);
|
|
293
|
+
delete u.id;
|
|
294
|
+
let $ = o ? m(u, l, s, c) : c;
|
|
298
295
|
return /* @__PURE__ */ f.createElement("div", {
|
|
299
|
-
|
|
300
|
-
ref:
|
|
301
|
-
"data-focused":
|
|
302
|
-
"data-focus-visible":
|
|
296
|
+
...$,
|
|
297
|
+
ref: n,
|
|
298
|
+
"data-focused": r || void 0,
|
|
299
|
+
"data-focus-visible": d || void 0,
|
|
303
300
|
// @ts-ignore
|
|
304
|
-
inert:
|
|
305
|
-
"data-inert":
|
|
306
|
-
}, /* @__PURE__ */ f.createElement(
|
|
301
|
+
inert: o ? void 0 : "true",
|
|
302
|
+
"data-inert": o ? void 0 : "true"
|
|
303
|
+
}, /* @__PURE__ */ f.createElement(R, {
|
|
307
304
|
values: [
|
|
308
305
|
[
|
|
309
|
-
|
|
306
|
+
v,
|
|
310
307
|
null
|
|
311
308
|
],
|
|
312
309
|
[
|
|
313
|
-
|
|
310
|
+
h,
|
|
314
311
|
null
|
|
315
312
|
]
|
|
316
313
|
]
|
|
317
|
-
},
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
314
|
+
}, /* @__PURE__ */ f.createElement(N.Provider, {
|
|
315
|
+
value: j
|
|
316
|
+
}, c.children)));
|
|
317
|
+
}), he = '"../theme/tokens.css"', pe = '"Inter", sans-serif', me = "#bfbfbf", ye = "600", xe = "#25607f", Pe = "0 0 0 2px #ffffff, 0 0 0 4px #000000", ge = "(max-width: 767px)", Ke = "_container_a0kqi_4", ve = "_list_a0kqi_8", De = "_listItem_a0kqi_14", Fe = "_panel_a0kqi_42", x = {
|
|
318
|
+
tokens: he,
|
|
319
|
+
display: pe,
|
|
320
|
+
gray50: me,
|
|
321
|
+
semiBoldWeight: ye,
|
|
322
|
+
blue130: xe,
|
|
323
|
+
focus: Pe,
|
|
324
|
+
smBreakpoint: ge,
|
|
325
|
+
container: Ke,
|
|
326
|
+
list: ve,
|
|
327
|
+
listItem: De,
|
|
328
|
+
panel: Fe
|
|
331
329
|
}, Ae = ({
|
|
332
330
|
tabs: t,
|
|
333
331
|
label: e,
|
|
334
332
|
defaultSelected: i,
|
|
335
333
|
children: a
|
|
336
334
|
}) => {
|
|
337
|
-
const
|
|
338
|
-
if (
|
|
335
|
+
const n = w.Children.toArray(a);
|
|
336
|
+
if (n.length !== t.length)
|
|
339
337
|
throw new Error(
|
|
340
|
-
`The number of children must match the number of tabs. Children: ${
|
|
338
|
+
`The number of children must match the number of tabs. Children: ${n.length} Tabs: ${t.length}`
|
|
341
339
|
);
|
|
342
|
-
const
|
|
343
|
-
(
|
|
344
|
-
var
|
|
340
|
+
const l = n.reduce(
|
|
341
|
+
(s, r, d) => {
|
|
342
|
+
var o;
|
|
345
343
|
if (w.isValidElement(r)) {
|
|
346
|
-
const c = (
|
|
347
|
-
c && (
|
|
344
|
+
const c = (o = t[d]) == null ? void 0 : o.toLowerCase();
|
|
345
|
+
c && (s[c] = w.cloneElement(r, { id: c }));
|
|
348
346
|
}
|
|
349
|
-
return
|
|
347
|
+
return s;
|
|
350
348
|
},
|
|
351
349
|
{}
|
|
352
350
|
);
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
|
|
351
|
+
return /* @__PURE__ */ H(
|
|
352
|
+
oe,
|
|
355
353
|
{
|
|
356
354
|
orientation: "vertical",
|
|
357
355
|
defaultSelectedKey: i && i.toLowerCase(),
|
|
358
|
-
className:
|
|
356
|
+
className: x.container,
|
|
359
357
|
children: [
|
|
360
358
|
/* @__PURE__ */ F(
|
|
361
|
-
|
|
359
|
+
fe,
|
|
362
360
|
{
|
|
363
361
|
"aria-label": e,
|
|
364
|
-
className:
|
|
365
|
-
children: t.map((
|
|
366
|
-
|
|
362
|
+
className: x.list,
|
|
363
|
+
children: t.map((s) => /* @__PURE__ */ F(
|
|
364
|
+
be,
|
|
367
365
|
{
|
|
368
|
-
id:
|
|
369
|
-
className:
|
|
370
|
-
children:
|
|
366
|
+
id: s.toLowerCase(),
|
|
367
|
+
className: x.listItem,
|
|
368
|
+
children: s
|
|
371
369
|
},
|
|
372
|
-
|
|
370
|
+
s
|
|
373
371
|
))
|
|
374
372
|
}
|
|
375
373
|
),
|
|
376
|
-
t.map((
|
|
377
|
-
|
|
374
|
+
t.map((s) => /* @__PURE__ */ F(
|
|
375
|
+
$e,
|
|
378
376
|
{
|
|
379
|
-
id:
|
|
380
|
-
className:
|
|
381
|
-
children:
|
|
377
|
+
id: s.toLowerCase(),
|
|
378
|
+
className: x.panel,
|
|
379
|
+
children: l[s.toLowerCase()]
|
|
382
380
|
},
|
|
383
|
-
|
|
381
|
+
s
|
|
384
382
|
))
|
|
385
383
|
]
|
|
386
384
|
}
|