@midas-ds/components 1.1.0 → 1.2.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/CHANGELOG.md +33 -0
- package/index.cjs +138 -0
- package/index.css +1 -0
- package/index.d.ts +0 -2
- package/index.js +27067 -105
- package/package.json +21 -4
- package/theme.cjs +1 -0
- package/theme.js +20 -0
- package/tokens-BskyMDHv.cjs +1 -0
- package/Breadcrumbs.css +0 -1
- package/Button-DL6nqUco.js +0 -182
- package/Button.css +0 -1
- package/ButtonGroup.css +0 -1
- package/Card.css +0 -1
- package/Checkbox-q0dugR2t.js +0 -402
- package/Checkbox.css +0 -1
- package/Collection-KMFfVuzU.js +0 -510
- package/ComboBox.css +0 -1
- package/DatePicker.css +0 -1
- package/Dialog-D6Bqrpn-.js +0 -1952
- package/Disclosure-dAZYXyTH.js +0 -225
- package/Disclosure.css +0 -1
- package/DragAndDrop-B0T3WgjL.js +0 -40
- package/Dropdown.css +0 -1
- package/FileUpload.css +0 -1
- package/Flex.css +0 -1
- package/Flex.module-CpoxBzQX.js +0 -37
- package/FocusScope-B7CkxXNC.js +0 -513
- package/Form-BWBjJC6v.js +0 -238
- package/Grid.css +0 -1
- package/Grid.module-Ia0e9Dix.js +0 -36
- package/Group-D7_8007y.js +0 -42
- package/Heading-RCRHv6hd.js +0 -15
- package/Hidden-CVlUgUJM.js +0 -37
- package/InfoBanner.css +0 -1
- package/Layout.css +0 -1
- package/Link-BnQvB-hH.js +0 -75
- package/Link.css +0 -1
- package/LinkButton.css +0 -1
- package/ListBox-DBBiqvcR.js +0 -474
- package/ListKeyboardDelegate-gCXy-Xnn.js +0 -172
- package/Logo.css +0 -1
- package/Modal.css +0 -1
- package/MultiSelect.css +0 -1
- package/PressResponder-B4g56kDz.js +0 -31
- package/RSPContexts-BW2SEIqe.js +0 -11
- package/Radio.css +0 -1
- package/SearchField.css +0 -1
- package/Select.css +0 -1
- package/SelectionManager-BfXUE1qg.js +0 -1031
- package/Separator-BBX9m2O2.js +0 -49
- package/Spinner.css +0 -1
- package/Table.css +0 -1
- package/Tabs.css +0 -1
- package/Tag-DWt0koFj.js +0 -728
- package/Tag.css +0 -1
- package/Text-BCF0xvqL.js +0 -15
- package/TextArea.css +0 -1
- package/TextField-CX4eOQf6.js +0 -225
- package/TextField.css +0 -1
- package/TextField.module-DdICj682.js +0 -143
- package/Toast.css +0 -1
- package/VisuallyHidden-Dhr5caPC.js +0 -39
- package/chevron-down-Cd1bkzXT.js +0 -13
- package/chevron-right-DBMc9VMi.js +0 -23
- package/clsx-OuTLNxxd.js +0 -16
- package/context-BpJLnOuu.js +0 -80
- package/createLucideIcon-DeWljiyi.js +0 -79
- package/index-B-jHjTDC.js +0 -120
- package/index-BPdc9gJ8.js +0 -3122
- package/index-KSgQWWiy.js +0 -26984
- package/index10.js +0 -4
- package/index11.js +0 -5
- package/index12.js +0 -4
- package/index13.js +0 -4
- package/index14.js +0 -4
- package/index15.js +0 -6
- package/index16.js +0 -6
- package/index17.js +0 -6
- package/index18.js +0 -4
- package/index19.js +0 -6
- package/index2.js +0 -8
- package/index20.js +0 -6
- package/index21.js +0 -4
- package/index22.js +0 -5
- package/index23.js +0 -5
- package/index24.js +0 -5
- package/index25.js +0 -6
- package/index26.js +0 -6
- package/index27.js +0 -6
- package/index28.js +0 -4
- package/index29.js +0 -6
- package/index3.js +0 -6
- package/index30.js +0 -21
- package/index31.js +0 -22
- package/index32.js +0 -14
- package/index33.js +0 -11
- package/index34.js +0 -31
- package/index35.js +0 -8
- package/index36.js +0 -9
- package/index37.js +0 -19
- package/index38.js +0 -9
- package/index39.js +0 -9
- package/index4.js +0 -4
- package/index40.js +0 -23
- package/index41.js +0 -63
- package/index42.js +0 -53
- package/index43.js +0 -18
- package/index44.js +0 -27
- package/index45.js +0 -18
- package/index46.js +0 -21
- package/index47.js +0 -49
- package/index48.js +0 -5
- package/index49.js +0 -25
- package/index5.js +0 -5
- package/index50.js +0 -18
- package/index51.js +0 -9
- package/index52.js +0 -25
- package/index53.js +0 -18
- package/index54.js +0 -11
- package/index55.js +0 -12
- package/index56.js +0 -15
- package/index57.js +0 -9
- package/index58.js +0 -9
- package/index59.js +0 -19
- package/index6.js +0 -4
- package/index60.js +0 -22
- package/index61.js +0 -61
- package/index62.js +0 -15
- package/index63.js +0 -11
- package/index64.js +0 -53
- package/index65.js +0 -85
- package/index66.js +0 -74
- package/index67.js +0 -24
- package/index68.js +0 -69
- package/index69.js +0 -80
- package/index7.js +0 -9
- package/index70.js +0 -140
- package/index71.js +0 -70
- package/index72.js +0 -42
- package/index73.js +0 -82
- package/index74.js +0 -71
- package/index75.js +0 -104
- package/index76.js +0 -275
- package/index77.js +0 -723
- package/index78.js +0 -489
- package/index79.js +0 -314
- package/index8.js +0 -4
- package/index80.js +0 -389
- package/index81.js +0 -252
- package/index82.js +0 -1364
- package/index83.js +0 -1009
- package/index84.js +0 -386
- package/index85.js +0 -2101
- package/index86.js +0 -2368
- package/index87.js +0 -6831
- package/index88.js +0 -17
- package/index89.js +0 -14
- package/index9.js +0 -5
- package/index90.js +0 -6
- package/index91.js +0 -9
- package/intlStrings-Cd44R5hT.js +0 -278
- package/react.esm-sMU8Z7rL.js +0 -11060
- package/triangle-alert-1OYl9KWz.js +0 -56
- package/useControlledState-Kv9K2AYu.js +0 -30
- package/useDescription-B7stiK3j.js +0 -32
- package/useEvent-Xk5kn5Ns.js +0 -21
- package/useField-DMzJIIN4.js +0 -67
- package/useFilter-Bt9dbV1U.js +0 -35
- package/useFocusRing-9PXyKy2A.js +0 -1297
- package/useFocusable-CcEBZe40.js +0 -59
- package/useGridSelectionCheckbox-DYgEnElE.js +0 -22
- package/useHasTabbableChild-D6DwR81L.js +0 -34
- package/useHighlightSelectionDescription-WYAbP4No.js +0 -552
- package/useLabels-9zaZ9oa0.js +0 -17
- package/useListState-BfTeKTk5.js +0 -119
- package/useLocalizedStringFormatter-BlCbn-hX.js +0 -96
- package/useSingleSelectListState-DPkaL0la.js +0 -34
- package/useUpdateEffect-Dtz-i14F.js +0 -12
- package/x-JK7i-TQC.js +0 -14
package/index78.js
DELETED
|
@@ -1,489 +0,0 @@
|
|
|
1
|
-
import { jsxs as T, jsx as v } from "react/jsx-runtime";
|
|
2
|
-
import b, { useMemo as M, useRef as E, useState as w, forwardRef as z, useCallback as J, createContext as q, useContext as Q } from "react";
|
|
3
|
-
import { a as X, $ as Y } from "./Button-DL6nqUco.js";
|
|
4
|
-
import { a as Z, $ as ee, b as ae, c as te } from "./ListBox-DBBiqvcR.js";
|
|
5
|
-
import { e as le, f as ne, g as ie, h as oe, i as de, a as se } from "./Dialog-D6Bqrpn-.js";
|
|
6
|
-
import { o as V, e as N, k as re, K as ce, I as fe, a as W, y as j, c as ue, z as be, A as $e, d as H, B as me } from "./useFocusRing-9PXyKy2A.js";
|
|
7
|
-
import { d as pe, e as ve, c as ye, $ as ge, a as xe } from "./Form-BWBjJC6v.js";
|
|
8
|
-
import { $ as he } from "./intlStrings-Cd44R5hT.js";
|
|
9
|
-
import { b as Pe, $ as De } from "./useField-DMzJIIN4.js";
|
|
10
|
-
import { $ as U } from "./Text-BCF0xvqL.js";
|
|
11
|
-
import { $ as Re } from "./Collection-KMFfVuzU.js";
|
|
12
|
-
import { $ as Se } from "./useSingleSelectListState-DPkaL0la.js";
|
|
13
|
-
import { $ as Ie, a as Be } from "./ListKeyboardDelegate-gCXy-Xnn.js";
|
|
14
|
-
import { g as Ce } from "./SelectionManager-BfXUE1qg.js";
|
|
15
|
-
import { $ as Fe } from "./VisuallyHidden-Dhr5caPC.js";
|
|
16
|
-
import { $ as ke } from "./useLocalizedStringFormatter-BlCbn-hX.js";
|
|
17
|
-
import { I as Ke } from "./TextField-CX4eOQf6.js";
|
|
18
|
-
import { C as _e } from "./chevron-down-Cd1bkzXT.js";
|
|
19
|
-
import './Select.css';const A = /* @__PURE__ */ new WeakMap();
|
|
20
|
-
function Ee(e, a, d) {
|
|
21
|
-
let { keyboardDelegate: i, isDisabled: l, isRequired: o, name: r, validationBehavior: t = "aria" } = e, n = Ie({
|
|
22
|
-
usage: "search",
|
|
23
|
-
sensitivity: "base"
|
|
24
|
-
}), c = M(() => i || new Be(a.collection, a.disabledKeys, d, n), [
|
|
25
|
-
i,
|
|
26
|
-
a.collection,
|
|
27
|
-
a.disabledKeys,
|
|
28
|
-
n
|
|
29
|
-
]), { menuTriggerProps: s, menuProps: f } = le({
|
|
30
|
-
isDisabled: l,
|
|
31
|
-
type: "listbox"
|
|
32
|
-
}, a, d), p = (u) => {
|
|
33
|
-
switch (u.key) {
|
|
34
|
-
case "ArrowLeft": {
|
|
35
|
-
var x, h;
|
|
36
|
-
u.preventDefault();
|
|
37
|
-
let R = a.selectedKey != null ? (x = c.getKeyAbove) === null || x === void 0 ? void 0 : x.call(c, a.selectedKey) : (h = c.getFirstKey) === null || h === void 0 ? void 0 : h.call(c);
|
|
38
|
-
R && a.setSelectedKey(R);
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
case "ArrowRight": {
|
|
42
|
-
var K, _;
|
|
43
|
-
u.preventDefault();
|
|
44
|
-
let R = a.selectedKey != null ? (K = c.getKeyBelow) === null || K === void 0 ? void 0 : K.call(c, a.selectedKey) : (_ = c.getFirstKey) === null || _ === void 0 ? void 0 : _.call(c);
|
|
45
|
-
R && a.setSelectedKey(R);
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}, { typeSelectProps: m } = Ce({
|
|
50
|
-
keyboardDelegate: c,
|
|
51
|
-
selectionManager: a.selectionManager,
|
|
52
|
-
onTypeSelect(u) {
|
|
53
|
-
a.setSelectedKey(u);
|
|
54
|
-
}
|
|
55
|
-
}), { isInvalid: y, validationErrors: P, validationDetails: B } = a.displayValidation, { labelProps: C, fieldProps: D, descriptionProps: g, errorMessageProps: F } = Pe({
|
|
56
|
-
...e,
|
|
57
|
-
labelElementType: "span",
|
|
58
|
-
isInvalid: y,
|
|
59
|
-
errorMessage: e.errorMessage || P
|
|
60
|
-
});
|
|
61
|
-
m.onKeyDown = m.onKeyDownCapture, delete m.onKeyDownCapture;
|
|
62
|
-
let k = V(e, {
|
|
63
|
-
labelable: !0
|
|
64
|
-
}), $ = N(m, s, D), I = re();
|
|
65
|
-
return A.set(a, {
|
|
66
|
-
isDisabled: l,
|
|
67
|
-
isRequired: o,
|
|
68
|
-
name: r,
|
|
69
|
-
validationBehavior: t
|
|
70
|
-
}), {
|
|
71
|
-
labelProps: {
|
|
72
|
-
...C,
|
|
73
|
-
onClick: () => {
|
|
74
|
-
if (!e.isDisabled) {
|
|
75
|
-
var u;
|
|
76
|
-
(u = d.current) === null || u === void 0 || u.focus(), ce("keyboard");
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
triggerProps: N(k, {
|
|
81
|
-
...$,
|
|
82
|
-
isDisabled: l,
|
|
83
|
-
onKeyDown: fe($.onKeyDown, p, e.onKeyDown),
|
|
84
|
-
onKeyUp: e.onKeyUp,
|
|
85
|
-
"aria-labelledby": [
|
|
86
|
-
I,
|
|
87
|
-
$["aria-labelledby"],
|
|
88
|
-
$["aria-label"] && !$["aria-labelledby"] ? $.id : null
|
|
89
|
-
].filter(Boolean).join(" "),
|
|
90
|
-
onFocus(u) {
|
|
91
|
-
a.isFocused || (e.onFocus && e.onFocus(u), e.onFocusChange && e.onFocusChange(!0), a.setFocused(!0));
|
|
92
|
-
},
|
|
93
|
-
onBlur(u) {
|
|
94
|
-
a.isOpen || (e.onBlur && e.onBlur(u), e.onFocusChange && e.onFocusChange(!1), a.setFocused(!1));
|
|
95
|
-
}
|
|
96
|
-
}),
|
|
97
|
-
valueProps: {
|
|
98
|
-
id: I
|
|
99
|
-
},
|
|
100
|
-
menuProps: {
|
|
101
|
-
...f,
|
|
102
|
-
autoFocus: a.focusStrategy || !0,
|
|
103
|
-
shouldSelectOnPressUp: !0,
|
|
104
|
-
shouldFocusOnHover: !0,
|
|
105
|
-
disallowEmptySelection: !0,
|
|
106
|
-
linkBehavior: "selection",
|
|
107
|
-
onBlur: (u) => {
|
|
108
|
-
u.currentTarget.contains(u.relatedTarget) || (e.onBlur && e.onBlur(u), e.onFocusChange && e.onFocusChange(!1), a.setFocused(!1));
|
|
109
|
-
},
|
|
110
|
-
"aria-labelledby": [
|
|
111
|
-
D["aria-labelledby"],
|
|
112
|
-
$["aria-label"] && !D["aria-labelledby"] ? $.id : null
|
|
113
|
-
].filter(Boolean).join(" ")
|
|
114
|
-
},
|
|
115
|
-
descriptionProps: g,
|
|
116
|
-
errorMessageProps: F,
|
|
117
|
-
isInvalid: y,
|
|
118
|
-
validationErrors: P,
|
|
119
|
-
validationDetails: B
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function we(e, a, d) {
|
|
123
|
-
let i = A.get(a) || {}, { autoComplete: l, name: o = i.name, isDisabled: r = i.isDisabled } = e, { validationBehavior: t, isRequired: n } = i, { visuallyHiddenProps: c } = Fe();
|
|
124
|
-
pe(e.selectRef, a.selectedKey, a.setSelectedKey), ve({
|
|
125
|
-
validationBehavior: t,
|
|
126
|
-
focus: () => {
|
|
127
|
-
var f;
|
|
128
|
-
return (f = d.current) === null || f === void 0 ? void 0 : f.focus();
|
|
129
|
-
}
|
|
130
|
-
}, a, e.selectRef);
|
|
131
|
-
var s;
|
|
132
|
-
return {
|
|
133
|
-
containerProps: {
|
|
134
|
-
...c,
|
|
135
|
-
"aria-hidden": !0,
|
|
136
|
-
// @ts-ignore
|
|
137
|
-
"data-react-aria-prevent-focus": !0,
|
|
138
|
-
// @ts-ignore
|
|
139
|
-
"data-a11y-ignore": "aria-hidden-focus"
|
|
140
|
-
},
|
|
141
|
-
inputProps: {
|
|
142
|
-
style: {
|
|
143
|
-
display: "none"
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
selectProps: {
|
|
147
|
-
tabIndex: -1,
|
|
148
|
-
autoComplete: l,
|
|
149
|
-
disabled: r,
|
|
150
|
-
required: t === "native" && n,
|
|
151
|
-
name: o,
|
|
152
|
-
value: (s = a.selectedKey) !== null && s !== void 0 ? s : "",
|
|
153
|
-
onChange: (f) => a.setSelectedKey(f.target.value)
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
function Me(e) {
|
|
158
|
-
let { state: a, triggerRef: d, label: i, name: l, isDisabled: o } = e, r = E(null), { containerProps: t, selectProps: n } = we({
|
|
159
|
-
...e,
|
|
160
|
-
selectRef: r
|
|
161
|
-
}, a, d);
|
|
162
|
-
var c;
|
|
163
|
-
return a.collection.size <= 300 ? /* @__PURE__ */ b.createElement("div", {
|
|
164
|
-
...t,
|
|
165
|
-
"data-testid": "hidden-select-container"
|
|
166
|
-
}, /* @__PURE__ */ b.createElement("label", null, i, /* @__PURE__ */ b.createElement("select", {
|
|
167
|
-
...n,
|
|
168
|
-
ref: r
|
|
169
|
-
}, /* @__PURE__ */ b.createElement("option", null), [
|
|
170
|
-
...a.collection.getKeys()
|
|
171
|
-
].map((s) => {
|
|
172
|
-
let f = a.collection.getItem(s);
|
|
173
|
-
if (f && f.type === "item") return /* @__PURE__ */ b.createElement("option", {
|
|
174
|
-
key: f.key,
|
|
175
|
-
value: f.key
|
|
176
|
-
}, f.textValue);
|
|
177
|
-
})))) : l ? /* @__PURE__ */ b.createElement("input", {
|
|
178
|
-
type: "hidden",
|
|
179
|
-
autoComplete: n.autoComplete,
|
|
180
|
-
name: l,
|
|
181
|
-
disabled: o,
|
|
182
|
-
value: (c = a.selectedKey) !== null && c !== void 0 ? c : ""
|
|
183
|
-
}) : null;
|
|
184
|
-
}
|
|
185
|
-
function qe(e) {
|
|
186
|
-
let a = ne(e), [d, i] = w(null), l = Se({
|
|
187
|
-
...e,
|
|
188
|
-
onSelectionChange: (n) => {
|
|
189
|
-
e.onSelectionChange != null && e.onSelectionChange(n), a.close(), o.commitValidation();
|
|
190
|
-
}
|
|
191
|
-
}), o = ye({
|
|
192
|
-
...e,
|
|
193
|
-
value: l.selectedKey
|
|
194
|
-
}), [r, t] = w(!1);
|
|
195
|
-
return {
|
|
196
|
-
...o,
|
|
197
|
-
...l,
|
|
198
|
-
...a,
|
|
199
|
-
focusStrategy: d,
|
|
200
|
-
open(n = null) {
|
|
201
|
-
l.collection.size !== 0 && (i(n), a.open());
|
|
202
|
-
},
|
|
203
|
-
toggle(n = null) {
|
|
204
|
-
l.collection.size !== 0 && (i(n), a.toggle());
|
|
205
|
-
},
|
|
206
|
-
isFocused: r,
|
|
207
|
-
setFocused: t
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
function Ve(e) {
|
|
211
|
-
return e && e.__esModule ? e.default : e;
|
|
212
|
-
}
|
|
213
|
-
const O = /* @__PURE__ */ q(null), L = /* @__PURE__ */ q(null), Oe = /* @__PURE__ */ z(function(a, d) {
|
|
214
|
-
[a, d] = W(a, d, O);
|
|
215
|
-
let { children: i, isDisabled: l = !1, isInvalid: o = !1, isRequired: r = !1 } = a, t = M(() => typeof i == "function" ? i({
|
|
216
|
-
isOpen: !1,
|
|
217
|
-
isDisabled: l,
|
|
218
|
-
isInvalid: o,
|
|
219
|
-
isRequired: r,
|
|
220
|
-
isFocused: !1,
|
|
221
|
-
isFocusVisible: !1,
|
|
222
|
-
defaultChildren: null
|
|
223
|
-
}) : i, [
|
|
224
|
-
i,
|
|
225
|
-
l,
|
|
226
|
-
o,
|
|
227
|
-
r
|
|
228
|
-
]);
|
|
229
|
-
return /* @__PURE__ */ b.createElement(Re, {
|
|
230
|
-
content: t
|
|
231
|
-
}, (n) => /* @__PURE__ */ b.createElement(Te, {
|
|
232
|
-
props: a,
|
|
233
|
-
collection: n,
|
|
234
|
-
selectRef: d
|
|
235
|
-
}));
|
|
236
|
-
});
|
|
237
|
-
function Te({ props: e, selectRef: a, collection: d }) {
|
|
238
|
-
let { validationBehavior: i } = j(ge) || {};
|
|
239
|
-
var l, o;
|
|
240
|
-
let r = (o = (l = e.validationBehavior) !== null && l !== void 0 ? l : i) !== null && o !== void 0 ? o : "native", t = qe({
|
|
241
|
-
...e,
|
|
242
|
-
collection: d,
|
|
243
|
-
children: void 0,
|
|
244
|
-
validationBehavior: r
|
|
245
|
-
}), { isFocusVisible: n, focusProps: c } = ue({
|
|
246
|
-
within: !0
|
|
247
|
-
}), s = E(null), [f, p] = be(), { labelProps: m, triggerProps: y, valueProps: P, menuProps: B, descriptionProps: C, errorMessageProps: D, ...g } = Ee({
|
|
248
|
-
...$e(e),
|
|
249
|
-
label: p,
|
|
250
|
-
validationBehavior: r
|
|
251
|
-
}, t, s), [F, k] = w(null), $ = J(() => {
|
|
252
|
-
s.current && k(s.current.offsetWidth + "px");
|
|
253
|
-
}, [
|
|
254
|
-
s
|
|
255
|
-
]);
|
|
256
|
-
ie({
|
|
257
|
-
ref: s,
|
|
258
|
-
onResize: $
|
|
259
|
-
});
|
|
260
|
-
let I = M(() => ({
|
|
261
|
-
isOpen: t.isOpen,
|
|
262
|
-
isFocused: t.isFocused,
|
|
263
|
-
isFocusVisible: n,
|
|
264
|
-
isDisabled: e.isDisabled || !1,
|
|
265
|
-
isInvalid: g.isInvalid || !1,
|
|
266
|
-
isRequired: e.isRequired || !1
|
|
267
|
-
}), [
|
|
268
|
-
t.isOpen,
|
|
269
|
-
t.isFocused,
|
|
270
|
-
n,
|
|
271
|
-
e.isDisabled,
|
|
272
|
-
g.isInvalid,
|
|
273
|
-
e.isRequired
|
|
274
|
-
]), u = H({
|
|
275
|
-
...e,
|
|
276
|
-
values: I,
|
|
277
|
-
defaultClassName: "react-aria-Select"
|
|
278
|
-
}), x = V(e);
|
|
279
|
-
delete x.id;
|
|
280
|
-
let h = E(null);
|
|
281
|
-
return /* @__PURE__ */ b.createElement(me, {
|
|
282
|
-
values: [
|
|
283
|
-
[
|
|
284
|
-
O,
|
|
285
|
-
e
|
|
286
|
-
],
|
|
287
|
-
[
|
|
288
|
-
L,
|
|
289
|
-
t
|
|
290
|
-
],
|
|
291
|
-
[
|
|
292
|
-
G,
|
|
293
|
-
P
|
|
294
|
-
],
|
|
295
|
-
[
|
|
296
|
-
De,
|
|
297
|
-
{
|
|
298
|
-
...m,
|
|
299
|
-
ref: f,
|
|
300
|
-
elementType: "span"
|
|
301
|
-
}
|
|
302
|
-
],
|
|
303
|
-
[
|
|
304
|
-
X,
|
|
305
|
-
{
|
|
306
|
-
...y,
|
|
307
|
-
ref: s,
|
|
308
|
-
isPressed: t.isOpen
|
|
309
|
-
}
|
|
310
|
-
],
|
|
311
|
-
[
|
|
312
|
-
oe,
|
|
313
|
-
t
|
|
314
|
-
],
|
|
315
|
-
[
|
|
316
|
-
de,
|
|
317
|
-
{
|
|
318
|
-
trigger: "Select",
|
|
319
|
-
triggerRef: s,
|
|
320
|
-
scrollRef: h,
|
|
321
|
-
placement: "bottom start",
|
|
322
|
-
style: {
|
|
323
|
-
"--trigger-width": F
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
],
|
|
327
|
-
[
|
|
328
|
-
Z,
|
|
329
|
-
{
|
|
330
|
-
...B,
|
|
331
|
-
ref: h
|
|
332
|
-
}
|
|
333
|
-
],
|
|
334
|
-
[
|
|
335
|
-
ee,
|
|
336
|
-
t
|
|
337
|
-
],
|
|
338
|
-
[
|
|
339
|
-
U,
|
|
340
|
-
{
|
|
341
|
-
slots: {
|
|
342
|
-
description: C,
|
|
343
|
-
errorMessage: D
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
],
|
|
347
|
-
[
|
|
348
|
-
xe,
|
|
349
|
-
g
|
|
350
|
-
]
|
|
351
|
-
]
|
|
352
|
-
}, /* @__PURE__ */ b.createElement("div", {
|
|
353
|
-
...x,
|
|
354
|
-
...u,
|
|
355
|
-
...c,
|
|
356
|
-
ref: a,
|
|
357
|
-
slot: e.slot || void 0,
|
|
358
|
-
"data-focused": t.isFocused || void 0,
|
|
359
|
-
"data-focus-visible": n || void 0,
|
|
360
|
-
"data-open": t.isOpen || void 0,
|
|
361
|
-
"data-disabled": e.isDisabled || void 0,
|
|
362
|
-
"data-invalid": g.isInvalid || void 0,
|
|
363
|
-
"data-required": e.isRequired || void 0
|
|
364
|
-
}), /* @__PURE__ */ b.createElement(Me, {
|
|
365
|
-
autoComplete: e.autoComplete,
|
|
366
|
-
state: t,
|
|
367
|
-
triggerRef: s,
|
|
368
|
-
label: p,
|
|
369
|
-
name: e.name,
|
|
370
|
-
isDisabled: e.isDisabled
|
|
371
|
-
}));
|
|
372
|
-
}
|
|
373
|
-
const G = /* @__PURE__ */ q(null), Ne = /* @__PURE__ */ z(function(a, d) {
|
|
374
|
-
var i, l;
|
|
375
|
-
[a, d] = W(a, d, G);
|
|
376
|
-
let o = Q(L), { placeholder: r } = j(O), t = o.selectedKey != null ? o.collection.getItem(o.selectedKey) : null, n = t == null ? void 0 : t.props.children;
|
|
377
|
-
typeof n == "function" && (n = n({
|
|
378
|
-
isHovered: !1,
|
|
379
|
-
isPressed: !1,
|
|
380
|
-
isSelected: !1,
|
|
381
|
-
isFocused: !1,
|
|
382
|
-
isFocusVisible: !1,
|
|
383
|
-
isDisabled: !1,
|
|
384
|
-
selectionMode: "single",
|
|
385
|
-
selectionBehavior: "toggle"
|
|
386
|
-
}));
|
|
387
|
-
let c = ke(Ve(he), "react-aria-components");
|
|
388
|
-
var s, f, p;
|
|
389
|
-
let m = H({
|
|
390
|
-
...a,
|
|
391
|
-
defaultChildren: (s = n ?? r) !== null && s !== void 0 ? s : c.format("selectPlaceholder"),
|
|
392
|
-
defaultClassName: "react-aria-SelectValue",
|
|
393
|
-
values: {
|
|
394
|
-
selectedItem: (f = (i = o.selectedItem) === null || i === void 0 ? void 0 : i.value) !== null && f !== void 0 ? f : null,
|
|
395
|
-
selectedText: (p = (l = o.selectedItem) === null || l === void 0 ? void 0 : l.textValue) !== null && p !== void 0 ? p : null,
|
|
396
|
-
isPlaceholder: !t
|
|
397
|
-
}
|
|
398
|
-
}), y = V(a);
|
|
399
|
-
return /* @__PURE__ */ b.createElement("span", {
|
|
400
|
-
ref: d,
|
|
401
|
-
...y,
|
|
402
|
-
...m,
|
|
403
|
-
"data-placeholder": !t || void 0
|
|
404
|
-
}, /* @__PURE__ */ b.createElement(U.Provider, {
|
|
405
|
-
value: void 0
|
|
406
|
-
}, m.children));
|
|
407
|
-
}), ze = '"../theme/tokens.css"', We = '"Inter", sans-serif', je = "#000000", He = "#b31b1b", Ue = "(max-width: 767px)", Ae = "#bfbfbf", Le = "#e6e6e6", Ge = "0 0 0 2px #ffffff, 0 0 0 4px #000000", Je = "#f2f2f2", Qe = "_button_1n8ts_4", Xe = "_select_1n8ts_41", Ye = "_popover_1n8ts_57", Ze = "_listBoxItem_1n8ts_65", ea = "_icon_1n8ts_87", S = {
|
|
408
|
-
tokens: ze,
|
|
409
|
-
display: We,
|
|
410
|
-
black: je,
|
|
411
|
-
signalRed130: He,
|
|
412
|
-
smBreakpoint: Ue,
|
|
413
|
-
gray50: Ae,
|
|
414
|
-
gray20: Le,
|
|
415
|
-
focus: Ge,
|
|
416
|
-
backgroundSecondary: Je,
|
|
417
|
-
button: Qe,
|
|
418
|
-
select: Xe,
|
|
419
|
-
popover: Ye,
|
|
420
|
-
listBoxItem: Ze,
|
|
421
|
-
icon: ea
|
|
422
|
-
};
|
|
423
|
-
function ga({
|
|
424
|
-
label: e,
|
|
425
|
-
description: a,
|
|
426
|
-
errorMessage: d,
|
|
427
|
-
children: i,
|
|
428
|
-
items: l,
|
|
429
|
-
...o
|
|
430
|
-
}) {
|
|
431
|
-
const r = b.useRef(null);
|
|
432
|
-
return /* @__PURE__ */ T(
|
|
433
|
-
Oe,
|
|
434
|
-
{
|
|
435
|
-
className: S.select,
|
|
436
|
-
ref: r,
|
|
437
|
-
...o,
|
|
438
|
-
children: [
|
|
439
|
-
/* @__PURE__ */ v(
|
|
440
|
-
Ke,
|
|
441
|
-
{
|
|
442
|
-
label: e,
|
|
443
|
-
description: a,
|
|
444
|
-
errorMessage: d,
|
|
445
|
-
children: /* @__PURE__ */ T(Y, { className: S.button, children: [
|
|
446
|
-
/* @__PURE__ */ v(Ne, {}),
|
|
447
|
-
/* @__PURE__ */ v(
|
|
448
|
-
"div",
|
|
449
|
-
{
|
|
450
|
-
className: S.icon,
|
|
451
|
-
"aria-hidden": "true",
|
|
452
|
-
children: /* @__PURE__ */ v(
|
|
453
|
-
_e,
|
|
454
|
-
{
|
|
455
|
-
size: 20,
|
|
456
|
-
"aria-hidden": !0
|
|
457
|
-
}
|
|
458
|
-
)
|
|
459
|
-
}
|
|
460
|
-
)
|
|
461
|
-
] })
|
|
462
|
-
}
|
|
463
|
-
),
|
|
464
|
-
/* @__PURE__ */ v(
|
|
465
|
-
se,
|
|
466
|
-
{
|
|
467
|
-
className: S.popover,
|
|
468
|
-
offset: 0,
|
|
469
|
-
UNSTABLE_portalContainer: r.current || void 0,
|
|
470
|
-
children: /* @__PURE__ */ v(ae, { items: l, children: i })
|
|
471
|
-
}
|
|
472
|
-
)
|
|
473
|
-
]
|
|
474
|
-
}
|
|
475
|
-
);
|
|
476
|
-
}
|
|
477
|
-
function xa(e) {
|
|
478
|
-
return /* @__PURE__ */ v(
|
|
479
|
-
te,
|
|
480
|
-
{
|
|
481
|
-
className: S.listBoxItem,
|
|
482
|
-
...e
|
|
483
|
-
}
|
|
484
|
-
);
|
|
485
|
-
}
|
|
486
|
-
export {
|
|
487
|
-
xa as Item,
|
|
488
|
-
ga as Select
|
|
489
|
-
};
|