@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/index81.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { jsxs as T, jsx as
|
|
1
|
+
import { jsxs as T, jsx as v } from "react/jsx-runtime";
|
|
2
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-
|
|
4
|
-
import { a as Z, $ as ee, b as ae, c as te } from "./ListBox-
|
|
5
|
-
import { e as le, f as
|
|
6
|
-
import { n as V, e as N,
|
|
7
|
-
import {
|
|
3
|
+
import { a as X, $ as Y } from "./Button-B4vMZbC6.js";
|
|
4
|
+
import { a as Z, $ as ee, b as ae, c as te } from "./ListBox-BKWkIIm6.js";
|
|
5
|
+
import { e as le, f as ne, g as ie, h as oe, i as de, a as se } from "./Dialog-Cb6toyXO.js";
|
|
6
|
+
import { n as V, e as N, l as re, K as ce, G as fe, a as W, x as j, c as ue, y as be, z as $e, d as H, A as me } from "./useFocusRing-BKGhL91C.js";
|
|
7
|
+
import { d as pe, e as ve, c as ye, $ as ge, a as xe } from "./Form-BQQs3jUk.js";
|
|
8
8
|
import { $ as he } from "./intlStrings-Cd44R5hT.js";
|
|
9
|
-
import {
|
|
10
|
-
import { $ as U } from "./Text-
|
|
11
|
-
import {
|
|
12
|
-
import { $ as Se } from "./useSingleSelectListState-
|
|
13
|
-
import { $ as Ie, a as Be } from "./ListKeyboardDelegate-
|
|
14
|
-
import { g as
|
|
15
|
-
import { $ as
|
|
16
|
-
import { $ as
|
|
17
|
-
import { I as
|
|
9
|
+
import { b as Pe, $ as De } from "./useField-Dz62UHCP.js";
|
|
10
|
+
import { $ as U } from "./Text-CQPW6xs7.js";
|
|
11
|
+
import { $ as Re } from "./Collection-COLWgm24.js";
|
|
12
|
+
import { $ as Se } from "./useSingleSelectListState-BHTLh8Ob.js";
|
|
13
|
+
import { $ as Ie, a as Be } from "./ListKeyboardDelegate-BH-K5hyq.js";
|
|
14
|
+
import { g as Ce } from "./SelectionManager-8o40f7mx.js";
|
|
15
|
+
import { $ as Fe } from "./VisuallyHidden-CFx06Bae.js";
|
|
16
|
+
import { $ as Ke } from "./useLocalizedStringFormatter-DsZ-ZWSk.js";
|
|
17
|
+
import { I as ke } from "./TextField-DeK_yiK-.js";
|
|
18
18
|
import { C as _e } from "./chevron-down-Cd1bkzXT.js";
|
|
19
19
|
import './Select.css';const A = /* @__PURE__ */ new WeakMap();
|
|
20
|
-
function Ee(e, a,
|
|
21
|
-
let { keyboardDelegate:
|
|
20
|
+
function Ee(e, a, d) {
|
|
21
|
+
let { keyboardDelegate: i, isDisabled: l, isRequired: o, name: r, validationBehavior: t = "aria" } = e, n = Ie({
|
|
22
22
|
usage: "search",
|
|
23
23
|
sensitivity: "base"
|
|
24
|
-
}),
|
|
25
|
-
|
|
24
|
+
}), c = M(() => i || new Be(a.collection, a.disabledKeys, d, n), [
|
|
25
|
+
i,
|
|
26
26
|
a.collection,
|
|
27
27
|
a.disabledKeys,
|
|
28
|
-
|
|
29
|
-
]), { menuTriggerProps:
|
|
28
|
+
n
|
|
29
|
+
]), { menuTriggerProps: s, menuProps: f } = le({
|
|
30
30
|
isDisabled: l,
|
|
31
31
|
type: "listbox"
|
|
32
|
-
}, a,
|
|
32
|
+
}, a, d), p = (u) => {
|
|
33
33
|
switch (u.key) {
|
|
34
34
|
case "ArrowLeft": {
|
|
35
|
-
var
|
|
35
|
+
var x, h;
|
|
36
36
|
u.preventDefault();
|
|
37
|
-
let
|
|
38
|
-
|
|
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
39
|
break;
|
|
40
40
|
}
|
|
41
41
|
case "ArrowRight": {
|
|
42
|
-
var
|
|
42
|
+
var k, _;
|
|
43
43
|
u.preventDefault();
|
|
44
|
-
let
|
|
45
|
-
|
|
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
46
|
break;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
}, { typeSelectProps:
|
|
50
|
-
keyboardDelegate:
|
|
49
|
+
}, { typeSelectProps: m } = Ce({
|
|
50
|
+
keyboardDelegate: c,
|
|
51
51
|
selectionManager: a.selectionManager,
|
|
52
52
|
onTypeSelect(u) {
|
|
53
53
|
a.setSelectedKey(u);
|
|
54
54
|
}
|
|
55
|
-
}), { isInvalid:
|
|
55
|
+
}), { isInvalid: y, validationErrors: P, validationDetails: B } = a.displayValidation, { labelProps: C, fieldProps: D, descriptionProps: g, errorMessageProps: F } = Pe({
|
|
56
56
|
...e,
|
|
57
57
|
labelElementType: "span",
|
|
58
|
-
isInvalid:
|
|
59
|
-
errorMessage: e.errorMessage ||
|
|
58
|
+
isInvalid: y,
|
|
59
|
+
errorMessage: e.errorMessage || P
|
|
60
60
|
});
|
|
61
|
-
|
|
62
|
-
let
|
|
61
|
+
m.onKeyDown = m.onKeyDownCapture, delete m.onKeyDownCapture;
|
|
62
|
+
let K = V(e, {
|
|
63
63
|
labelable: !0
|
|
64
|
-
}), $ = N(
|
|
64
|
+
}), $ = N(m, s, D), I = re();
|
|
65
65
|
return A.set(a, {
|
|
66
66
|
isDisabled: l,
|
|
67
|
-
isRequired:
|
|
68
|
-
name:
|
|
67
|
+
isRequired: o,
|
|
68
|
+
name: r,
|
|
69
69
|
validationBehavior: t
|
|
70
70
|
}), {
|
|
71
71
|
labelProps: {
|
|
72
|
-
...
|
|
72
|
+
...C,
|
|
73
73
|
onClick: () => {
|
|
74
74
|
if (!e.isDisabled) {
|
|
75
75
|
var u;
|
|
76
|
-
(u =
|
|
76
|
+
(u = d.current) === null || u === void 0 || u.focus(), ce("keyboard");
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
triggerProps: N(
|
|
80
|
+
triggerProps: N(K, {
|
|
81
81
|
...$,
|
|
82
82
|
isDisabled: l,
|
|
83
|
-
onKeyDown: fe($.onKeyDown,
|
|
83
|
+
onKeyDown: fe($.onKeyDown, p, e.onKeyDown),
|
|
84
84
|
onKeyUp: e.onKeyUp,
|
|
85
85
|
"aria-labelledby": [
|
|
86
86
|
I,
|
|
@@ -108,30 +108,30 @@ function Ee(e, a, i) {
|
|
|
108
108
|
u.currentTarget.contains(u.relatedTarget) || (e.onBlur && e.onBlur(u), e.onFocusChange && e.onFocusChange(!1), a.setFocused(!1));
|
|
109
109
|
},
|
|
110
110
|
"aria-labelledby": [
|
|
111
|
-
|
|
112
|
-
$["aria-label"] && !
|
|
111
|
+
D["aria-labelledby"],
|
|
112
|
+
$["aria-label"] && !D["aria-labelledby"] ? $.id : null
|
|
113
113
|
].filter(Boolean).join(" ")
|
|
114
114
|
},
|
|
115
|
-
descriptionProps:
|
|
116
|
-
errorMessageProps:
|
|
117
|
-
isInvalid:
|
|
118
|
-
validationErrors:
|
|
115
|
+
descriptionProps: g,
|
|
116
|
+
errorMessageProps: F,
|
|
117
|
+
isInvalid: y,
|
|
118
|
+
validationErrors: P,
|
|
119
119
|
validationDetails: B
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function we(e, a,
|
|
123
|
-
let
|
|
124
|
-
|
|
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
125
|
validationBehavior: t,
|
|
126
126
|
focus: () => {
|
|
127
127
|
var f;
|
|
128
|
-
return (f =
|
|
128
|
+
return (f = d.current) === null || f === void 0 ? void 0 : f.focus();
|
|
129
129
|
}
|
|
130
130
|
}, a, e.selectRef);
|
|
131
|
-
var
|
|
131
|
+
var s;
|
|
132
132
|
return {
|
|
133
133
|
containerProps: {
|
|
134
|
-
...
|
|
134
|
+
...c,
|
|
135
135
|
"aria-hidden": !0,
|
|
136
136
|
// @ts-ignore
|
|
137
137
|
"data-react-aria-prevent-focus": !0,
|
|
@@ -146,140 +146,139 @@ function we(e, a, i) {
|
|
|
146
146
|
selectProps: {
|
|
147
147
|
tabIndex: -1,
|
|
148
148
|
autoComplete: l,
|
|
149
|
-
disabled:
|
|
150
|
-
required: t === "native" &&
|
|
151
|
-
name:
|
|
152
|
-
value: (
|
|
149
|
+
disabled: r,
|
|
150
|
+
required: t === "native" && n,
|
|
151
|
+
name: o,
|
|
152
|
+
value: (s = a.selectedKey) !== null && s !== void 0 ? s : "",
|
|
153
153
|
onChange: (f) => a.setSelectedKey(f.target.value)
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
function Me(e) {
|
|
158
|
-
let { state: a, triggerRef:
|
|
158
|
+
let { state: a, triggerRef: d, label: i, name: l, isDisabled: o } = e, r = E(null), { containerProps: t, selectProps: n } = we({
|
|
159
159
|
...e,
|
|
160
|
-
selectRef:
|
|
161
|
-
}, a,
|
|
162
|
-
var
|
|
160
|
+
selectRef: r
|
|
161
|
+
}, a, d);
|
|
162
|
+
var c;
|
|
163
163
|
return a.collection.size <= 300 ? /* @__PURE__ */ b.createElement("div", {
|
|
164
164
|
...t,
|
|
165
165
|
"data-testid": "hidden-select-container"
|
|
166
|
-
}, /* @__PURE__ */ b.createElement("label", null,
|
|
167
|
-
...
|
|
168
|
-
ref:
|
|
166
|
+
}, /* @__PURE__ */ b.createElement("label", null, i, /* @__PURE__ */ b.createElement("select", {
|
|
167
|
+
...n,
|
|
168
|
+
ref: r
|
|
169
169
|
}, /* @__PURE__ */ b.createElement("option", null), [
|
|
170
170
|
...a.collection.getKeys()
|
|
171
|
-
].map((
|
|
172
|
-
let f = a.collection.getItem(
|
|
171
|
+
].map((s) => {
|
|
172
|
+
let f = a.collection.getItem(s);
|
|
173
173
|
if (f && f.type === "item") return /* @__PURE__ */ b.createElement("option", {
|
|
174
174
|
key: f.key,
|
|
175
175
|
value: f.key
|
|
176
176
|
}, f.textValue);
|
|
177
177
|
})))) : l ? /* @__PURE__ */ b.createElement("input", {
|
|
178
178
|
type: "hidden",
|
|
179
|
-
autoComplete:
|
|
179
|
+
autoComplete: n.autoComplete,
|
|
180
180
|
name: l,
|
|
181
|
-
disabled:
|
|
182
|
-
value: (
|
|
181
|
+
disabled: o,
|
|
182
|
+
value: (c = a.selectedKey) !== null && c !== void 0 ? c : ""
|
|
183
183
|
}) : null;
|
|
184
184
|
}
|
|
185
185
|
function qe(e) {
|
|
186
|
-
let a =
|
|
186
|
+
let a = ne(e), [d, i] = w(null), l = Se({
|
|
187
187
|
...e,
|
|
188
|
-
onSelectionChange: (
|
|
189
|
-
e.onSelectionChange != null && e.onSelectionChange(
|
|
188
|
+
onSelectionChange: (n) => {
|
|
189
|
+
e.onSelectionChange != null && e.onSelectionChange(n), a.close(), o.commitValidation();
|
|
190
190
|
}
|
|
191
|
-
}),
|
|
191
|
+
}), o = ye({
|
|
192
192
|
...e,
|
|
193
193
|
value: l.selectedKey
|
|
194
|
-
}), [
|
|
194
|
+
}), [r, t] = w(!1);
|
|
195
195
|
return {
|
|
196
|
-
...
|
|
196
|
+
...o,
|
|
197
197
|
...l,
|
|
198
198
|
...a,
|
|
199
|
-
focusStrategy:
|
|
200
|
-
open(
|
|
201
|
-
l.collection.size !== 0 && (
|
|
199
|
+
focusStrategy: d,
|
|
200
|
+
open(n = null) {
|
|
201
|
+
l.collection.size !== 0 && (i(n), a.open());
|
|
202
202
|
},
|
|
203
|
-
toggle(
|
|
204
|
-
l.collection.size !== 0 && (
|
|
203
|
+
toggle(n = null) {
|
|
204
|
+
l.collection.size !== 0 && (i(n), a.toggle());
|
|
205
205
|
},
|
|
206
|
-
isFocused:
|
|
206
|
+
isFocused: r,
|
|
207
207
|
setFocused: t
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
function Ve(e) {
|
|
211
211
|
return e && e.__esModule ? e.default : e;
|
|
212
212
|
}
|
|
213
|
-
const O = /* @__PURE__ */ q(null), L = /* @__PURE__ */ q(null)
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
let { children: i, isDisabled: o = !1, isInvalid: l = !1, isRequired: d = !1 } = e, s = M(() => typeof i == "function" ? i({
|
|
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({
|
|
217
216
|
isOpen: !1,
|
|
218
|
-
isDisabled:
|
|
219
|
-
isInvalid:
|
|
220
|
-
isRequired:
|
|
217
|
+
isDisabled: l,
|
|
218
|
+
isInvalid: o,
|
|
219
|
+
isRequired: r,
|
|
221
220
|
isFocused: !1,
|
|
222
221
|
isFocusVisible: !1,
|
|
223
222
|
defaultChildren: null
|
|
224
223
|
}) : i, [
|
|
225
224
|
i,
|
|
226
|
-
o,
|
|
227
225
|
l,
|
|
228
|
-
|
|
226
|
+
o,
|
|
227
|
+
r
|
|
229
228
|
]);
|
|
230
229
|
return /* @__PURE__ */ b.createElement(Re, {
|
|
231
|
-
content:
|
|
232
|
-
}, (
|
|
233
|
-
props:
|
|
234
|
-
collection:
|
|
235
|
-
selectRef:
|
|
230
|
+
content: t
|
|
231
|
+
}, (n) => /* @__PURE__ */ b.createElement(Te, {
|
|
232
|
+
props: a,
|
|
233
|
+
collection: n,
|
|
234
|
+
selectRef: d
|
|
236
235
|
}));
|
|
237
|
-
}
|
|
238
|
-
function Te({ props: e, selectRef: a, collection:
|
|
239
|
-
let { validationBehavior:
|
|
240
|
-
var l,
|
|
241
|
-
let
|
|
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({
|
|
242
241
|
...e,
|
|
243
|
-
collection:
|
|
242
|
+
collection: d,
|
|
244
243
|
children: void 0,
|
|
245
|
-
validationBehavior:
|
|
246
|
-
}), { isFocusVisible:
|
|
244
|
+
validationBehavior: r
|
|
245
|
+
}), { isFocusVisible: n, focusProps: c } = ue({
|
|
247
246
|
within: !0
|
|
248
|
-
}),
|
|
247
|
+
}), s = E(null), [f, p] = be(), { labelProps: m, triggerProps: y, valueProps: P, menuProps: B, descriptionProps: C, errorMessageProps: D, ...g } = Ee({
|
|
249
248
|
...$e(e),
|
|
250
|
-
label:
|
|
251
|
-
validationBehavior:
|
|
252
|
-
}, t,
|
|
253
|
-
|
|
249
|
+
label: p,
|
|
250
|
+
validationBehavior: r
|
|
251
|
+
}, t, s), [F, K] = w(null), $ = J(() => {
|
|
252
|
+
s.current && K(s.current.offsetWidth + "px");
|
|
254
253
|
}, [
|
|
255
|
-
|
|
254
|
+
s
|
|
256
255
|
]);
|
|
257
|
-
|
|
258
|
-
ref:
|
|
256
|
+
ie({
|
|
257
|
+
ref: s,
|
|
259
258
|
onResize: $
|
|
260
259
|
});
|
|
261
260
|
let I = M(() => ({
|
|
262
261
|
isOpen: t.isOpen,
|
|
263
262
|
isFocused: t.isFocused,
|
|
264
|
-
isFocusVisible:
|
|
263
|
+
isFocusVisible: n,
|
|
265
264
|
isDisabled: e.isDisabled || !1,
|
|
266
|
-
isInvalid:
|
|
265
|
+
isInvalid: g.isInvalid || !1,
|
|
267
266
|
isRequired: e.isRequired || !1
|
|
268
267
|
}), [
|
|
269
268
|
t.isOpen,
|
|
270
269
|
t.isFocused,
|
|
271
|
-
|
|
270
|
+
n,
|
|
272
271
|
e.isDisabled,
|
|
273
|
-
|
|
272
|
+
g.isInvalid,
|
|
274
273
|
e.isRequired
|
|
275
274
|
]), u = H({
|
|
276
275
|
...e,
|
|
277
276
|
values: I,
|
|
278
277
|
defaultClassName: "react-aria-Select"
|
|
279
|
-
}),
|
|
280
|
-
delete
|
|
281
|
-
let
|
|
282
|
-
return /* @__PURE__ */ b.createElement(
|
|
278
|
+
}), x = V(e);
|
|
279
|
+
delete x.id;
|
|
280
|
+
let h = E(null);
|
|
281
|
+
return /* @__PURE__ */ b.createElement(me, {
|
|
283
282
|
values: [
|
|
284
283
|
[
|
|
285
284
|
O,
|
|
@@ -291,12 +290,12 @@ function Te({ props: e, selectRef: a, collection: i }) {
|
|
|
291
290
|
],
|
|
292
291
|
[
|
|
293
292
|
G,
|
|
294
|
-
|
|
293
|
+
P
|
|
295
294
|
],
|
|
296
295
|
[
|
|
297
296
|
De,
|
|
298
297
|
{
|
|
299
|
-
...
|
|
298
|
+
...m,
|
|
300
299
|
ref: f,
|
|
301
300
|
elementType: "span"
|
|
302
301
|
}
|
|
@@ -304,24 +303,24 @@ function Te({ props: e, selectRef: a, collection: i }) {
|
|
|
304
303
|
[
|
|
305
304
|
X,
|
|
306
305
|
{
|
|
307
|
-
...
|
|
308
|
-
ref:
|
|
306
|
+
...y,
|
|
307
|
+
ref: s,
|
|
309
308
|
isPressed: t.isOpen
|
|
310
309
|
}
|
|
311
310
|
],
|
|
312
311
|
[
|
|
313
|
-
|
|
312
|
+
oe,
|
|
314
313
|
t
|
|
315
314
|
],
|
|
316
315
|
[
|
|
317
|
-
|
|
316
|
+
de,
|
|
318
317
|
{
|
|
319
318
|
trigger: "Select",
|
|
320
|
-
triggerRef:
|
|
321
|
-
scrollRef:
|
|
319
|
+
triggerRef: s,
|
|
320
|
+
scrollRef: h,
|
|
322
321
|
placement: "bottom start",
|
|
323
322
|
style: {
|
|
324
|
-
"--trigger-width":
|
|
323
|
+
"--trigger-width": F
|
|
325
324
|
}
|
|
326
325
|
}
|
|
327
326
|
],
|
|
@@ -329,7 +328,7 @@ function Te({ props: e, selectRef: a, collection: i }) {
|
|
|
329
328
|
Z,
|
|
330
329
|
{
|
|
331
330
|
...B,
|
|
332
|
-
ref:
|
|
331
|
+
ref: h
|
|
333
332
|
}
|
|
334
333
|
],
|
|
335
334
|
[
|
|
@@ -340,42 +339,42 @@ function Te({ props: e, selectRef: a, collection: i }) {
|
|
|
340
339
|
U,
|
|
341
340
|
{
|
|
342
341
|
slots: {
|
|
343
|
-
description:
|
|
344
|
-
errorMessage:
|
|
342
|
+
description: C,
|
|
343
|
+
errorMessage: D
|
|
345
344
|
}
|
|
346
345
|
}
|
|
347
346
|
],
|
|
348
347
|
[
|
|
349
348
|
xe,
|
|
350
|
-
|
|
349
|
+
g
|
|
351
350
|
]
|
|
352
351
|
]
|
|
353
352
|
}, /* @__PURE__ */ b.createElement("div", {
|
|
354
|
-
...
|
|
353
|
+
...x,
|
|
355
354
|
...u,
|
|
356
|
-
...
|
|
355
|
+
...c,
|
|
357
356
|
ref: a,
|
|
358
357
|
slot: e.slot || void 0,
|
|
359
358
|
"data-focused": t.isFocused || void 0,
|
|
360
|
-
"data-focus-visible":
|
|
359
|
+
"data-focus-visible": n || void 0,
|
|
361
360
|
"data-open": t.isOpen || void 0,
|
|
362
361
|
"data-disabled": e.isDisabled || void 0,
|
|
363
|
-
"data-invalid":
|
|
362
|
+
"data-invalid": g.isInvalid || void 0,
|
|
364
363
|
"data-required": e.isRequired || void 0
|
|
365
364
|
}), /* @__PURE__ */ b.createElement(Me, {
|
|
365
|
+
autoComplete: e.autoComplete,
|
|
366
366
|
state: t,
|
|
367
|
-
triggerRef:
|
|
368
|
-
label:
|
|
367
|
+
triggerRef: s,
|
|
368
|
+
label: p,
|
|
369
369
|
name: e.name,
|
|
370
370
|
isDisabled: e.isDisabled
|
|
371
371
|
}));
|
|
372
372
|
}
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
typeof t == "function" && (t = t({
|
|
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({
|
|
379
378
|
isHovered: !1,
|
|
380
379
|
isPressed: !1,
|
|
381
380
|
isSelected: !1,
|
|
@@ -385,73 +384,72 @@ function ze(e, a) {
|
|
|
385
384
|
selectionMode: "single",
|
|
386
385
|
selectionBehavior: "toggle"
|
|
387
386
|
}));
|
|
388
|
-
let c =
|
|
389
|
-
var
|
|
387
|
+
let c = Ke(Ve(he), "react-aria-components");
|
|
388
|
+
var s, f, p;
|
|
390
389
|
let m = H({
|
|
391
|
-
...
|
|
392
|
-
defaultChildren: (
|
|
390
|
+
...a,
|
|
391
|
+
defaultChildren: (s = n ?? r) !== null && s !== void 0 ? s : c.format("selectPlaceholder"),
|
|
393
392
|
defaultClassName: "react-aria-SelectValue",
|
|
394
393
|
values: {
|
|
395
|
-
selectedItem: (
|
|
396
|
-
selectedText: (
|
|
397
|
-
isPlaceholder: !
|
|
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
|
|
398
397
|
}
|
|
399
|
-
}),
|
|
398
|
+
}), y = V(a);
|
|
400
399
|
return /* @__PURE__ */ b.createElement("span", {
|
|
401
|
-
ref:
|
|
402
|
-
...
|
|
400
|
+
ref: d,
|
|
401
|
+
...y,
|
|
403
402
|
...m,
|
|
404
|
-
"data-placeholder": !
|
|
403
|
+
"data-placeholder": !t || void 0
|
|
405
404
|
}, /* @__PURE__ */ b.createElement(U.Provider, {
|
|
406
405
|
value: void 0
|
|
407
406
|
}, m.children));
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
icon: ta
|
|
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
|
|
424
422
|
};
|
|
425
|
-
function
|
|
423
|
+
function ga({
|
|
426
424
|
label: e,
|
|
427
425
|
description: a,
|
|
428
|
-
errorMessage:
|
|
429
|
-
children:
|
|
426
|
+
errorMessage: d,
|
|
427
|
+
children: i,
|
|
430
428
|
items: l,
|
|
431
|
-
...
|
|
429
|
+
...o
|
|
432
430
|
}) {
|
|
433
|
-
const
|
|
431
|
+
const r = b.useRef(null);
|
|
434
432
|
return /* @__PURE__ */ T(
|
|
435
|
-
|
|
433
|
+
Oe,
|
|
436
434
|
{
|
|
437
|
-
className:
|
|
438
|
-
ref:
|
|
439
|
-
...
|
|
435
|
+
className: S.select,
|
|
436
|
+
ref: r,
|
|
437
|
+
...o,
|
|
440
438
|
children: [
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
|
|
439
|
+
/* @__PURE__ */ v(
|
|
440
|
+
ke,
|
|
443
441
|
{
|
|
444
442
|
label: e,
|
|
445
443
|
description: a,
|
|
446
|
-
errorMessage:
|
|
447
|
-
children: /* @__PURE__ */ T(Y, { className:
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
444
|
+
errorMessage: d,
|
|
445
|
+
children: /* @__PURE__ */ T(Y, { className: S.button, children: [
|
|
446
|
+
/* @__PURE__ */ v(Ne, {}),
|
|
447
|
+
/* @__PURE__ */ v(
|
|
450
448
|
"div",
|
|
451
449
|
{
|
|
452
|
-
className:
|
|
450
|
+
className: S.icon,
|
|
453
451
|
"aria-hidden": "true",
|
|
454
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ v(
|
|
455
453
|
_e,
|
|
456
454
|
{
|
|
457
455
|
size: 20,
|
|
@@ -463,29 +461,29 @@ function ha({
|
|
|
463
461
|
] })
|
|
464
462
|
}
|
|
465
463
|
),
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
|
|
464
|
+
/* @__PURE__ */ v(
|
|
465
|
+
se,
|
|
468
466
|
{
|
|
469
|
-
className:
|
|
467
|
+
className: S.popover,
|
|
470
468
|
offset: 0,
|
|
471
|
-
UNSTABLE_portalContainer:
|
|
472
|
-
children: /* @__PURE__ */
|
|
469
|
+
UNSTABLE_portalContainer: r.current || void 0,
|
|
470
|
+
children: /* @__PURE__ */ v(ae, { items: l, children: i })
|
|
473
471
|
}
|
|
474
472
|
)
|
|
475
473
|
]
|
|
476
474
|
}
|
|
477
475
|
);
|
|
478
476
|
}
|
|
479
|
-
function
|
|
480
|
-
return /* @__PURE__ */
|
|
477
|
+
function xa(e) {
|
|
478
|
+
return /* @__PURE__ */ v(
|
|
481
479
|
te,
|
|
482
480
|
{
|
|
483
|
-
className:
|
|
481
|
+
className: S.listBoxItem,
|
|
484
482
|
...e
|
|
485
483
|
}
|
|
486
484
|
);
|
|
487
485
|
}
|
|
488
486
|
export {
|
|
489
|
-
|
|
490
|
-
|
|
487
|
+
xa as Item,
|
|
488
|
+
ga as Select
|
|
491
489
|
};
|