@midas-ds/components 16.5.2 → 16.5.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 +14 -0
- package/assets/DateField.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Select2.css +1 -1
- package/assets/TextField.css +1 -1
- package/assets/default.css +1 -1
- package/chunks/DateField-CuNWL_ao.js +91 -0
- package/chunks/{DateRangePicker-DQB5TrfF.js → DateRangePicker-jqrHTmLu.js} +45 -45
- package/chunks/{SearchField-C493CTGJ.js → SearchField-Cd05nl-B.js} +1 -1
- package/chunks/{Select-D9db38XE.js → Select-Bc7Qj5UC.js} +63 -63
- package/chunks/{Select-CaSZY6w_.js → Select-CRUskZeu.js} +127 -127
- package/chunks/{TextArea-kEpt5DKm.js → TextArea-VkipFRQc.js} +1 -1
- package/chunks/TextField.module-B3n8v1vH.js +13 -0
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/index.js +6 -6
- package/legacy-select/index.js +1 -1
- package/package.json +2 -2
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/textfield/index.js +1 -1
- package/chunks/DateField-CodiOrfY.js +0 -91
- package/chunks/TextField.module-DZslrEPC.js +0 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
2
|
import * as w from "react";
|
|
3
|
-
import { useMemo as z, useState as V, useCallback as I, useEffect as
|
|
4
|
-
import { c as
|
|
3
|
+
import { useMemo as z, useState as V, useCallback as I, useEffect as M, useRef as L } from "react";
|
|
4
|
+
import { c as B } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { filterDOMProps as D, mergeProps as x, useId as O, chain as N, useFormReset as R, useObjectRef as E } from "@react-aria/utils";
|
|
6
6
|
import { Section as j, Item as C } from "@react-stately/collections";
|
|
7
7
|
import { Collection as G, FieldErrorContext as H, TextField as $, TagList as W } from "react-aria-components";
|
|
@@ -10,8 +10,8 @@ import { b as q, L as X, a as J } from "./ListBoxSection-MZB_5DdD.js";
|
|
|
10
10
|
import { useCollator as Q, useField as Y, useButton as Z } from "react-aria";
|
|
11
11
|
import { setInteractionModality as ee } from "@react-aria/interactions";
|
|
12
12
|
import { useMenuTrigger as te } from "@react-aria/menu";
|
|
13
|
-
import { ListKeyboardDelegate as le, useTypeSelect as
|
|
14
|
-
import { useMenuTriggerState as
|
|
13
|
+
import { ListKeyboardDelegate as le, useTypeSelect as oe } from "@react-aria/selection";
|
|
14
|
+
import { useMenuTriggerState as ne } from "@react-stately/menu";
|
|
15
15
|
import { useFormValidationState as ie } from "@react-stately/form";
|
|
16
16
|
import { useListState as re } from "@react-stately/list";
|
|
17
17
|
import { a as se, T as ae } from "./Tag-CZrQBEgv.js";
|
|
@@ -19,12 +19,12 @@ import { useFormValidation as ce } from "@react-aria/form";
|
|
|
19
19
|
import { useVisuallyHidden as de } from "@react-aria/visually-hidden";
|
|
20
20
|
import { a as ue, L as me } from "./Label-xWKvOuML.js";
|
|
21
21
|
import { T as ge } from "./Text-TWzJxnto.js";
|
|
22
|
-
import { C as
|
|
23
|
-
import { X as
|
|
24
|
-
import { u as
|
|
25
|
-
import { C as
|
|
26
|
-
import { F as
|
|
27
|
-
import '../assets/Select2.css';const
|
|
22
|
+
import { C as he } from "./Checkbox-BTAfwDxU.js";
|
|
23
|
+
import { X as fe } from "./x-BXShoIAM.js";
|
|
24
|
+
import { u as T } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
25
|
+
import { C as pe } from "./chevron-down-DgT-uSF9.js";
|
|
26
|
+
import { F as ye } from "./FieldError-Bra5aRT3.js";
|
|
27
|
+
import '../assets/Select2.css';const A = ({ item: e }) => /* @__PURE__ */ n(
|
|
28
28
|
X,
|
|
29
29
|
{
|
|
30
30
|
...e.value,
|
|
@@ -32,10 +32,10 @@ import '../assets/Select2.css';const T = ({ item: e }) => /* @__PURE__ */ o(
|
|
|
32
32
|
"aria-label": e.textValue,
|
|
33
33
|
children: e.rendered
|
|
34
34
|
}
|
|
35
|
-
), be = ({ section: e, state: t }) => /* @__PURE__ */
|
|
35
|
+
), be = ({ section: e, state: t }) => /* @__PURE__ */ n(q, { ...e.value, children: t.collection.getChildren ? /* @__PURE__ */ n(G, { items: t.collection.getChildren(e.key), children: (s) => /* @__PURE__ */ n(A, { item: s }) }) : null }), Se = ({
|
|
36
36
|
state: e,
|
|
37
37
|
...t
|
|
38
|
-
}) => /* @__PURE__ */
|
|
38
|
+
}) => /* @__PURE__ */ n(
|
|
39
39
|
U,
|
|
40
40
|
{
|
|
41
41
|
...t,
|
|
@@ -43,17 +43,17 @@ import '../assets/Select2.css';const T = ({ item: e }) => /* @__PURE__ */ o(
|
|
|
43
43
|
escapeKeyBehavior: "none",
|
|
44
44
|
onSelectionChange: e.setSelectedKeys,
|
|
45
45
|
items: e.collection,
|
|
46
|
-
children: (s) => s.type === "section" ? /* @__PURE__ */
|
|
46
|
+
children: (s) => s.type === "section" ? /* @__PURE__ */ n(
|
|
47
47
|
be,
|
|
48
48
|
{
|
|
49
49
|
state: e,
|
|
50
50
|
section: s
|
|
51
51
|
}
|
|
52
|
-
) : /* @__PURE__ */
|
|
52
|
+
) : /* @__PURE__ */ n(A, { item: s })
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
function ve(e, t, s) {
|
|
56
|
-
const { disallowEmptySelection: r, isDisabled: l } = e, i = Q({ usage: "search", sensitivity: "base" }),
|
|
56
|
+
const { disallowEmptySelection: r, isDisabled: l } = e, i = Q({ usage: "search", sensitivity: "base" }), o = z(
|
|
57
57
|
() => new le(
|
|
58
58
|
t.collection,
|
|
59
59
|
t.disabledKeys,
|
|
@@ -69,34 +69,34 @@ function ve(e, t, s) {
|
|
|
69
69
|
t,
|
|
70
70
|
s
|
|
71
71
|
), u = (g) => {
|
|
72
|
-
const { selectedKeys: v, selectionMode:
|
|
73
|
-
if (
|
|
72
|
+
const { selectedKeys: v, selectionMode: k } = t, P = v.values().next().value;
|
|
73
|
+
if (k === "single")
|
|
74
74
|
switch (g.key) {
|
|
75
75
|
case "ArrowLeft": {
|
|
76
76
|
g.preventDefault();
|
|
77
|
-
const S = v.size > 0 ?
|
|
77
|
+
const S = v.size > 0 ? o.getKeyAbove(P) : o.getFirstKey();
|
|
78
78
|
S && t.setSelectedKeys([S]);
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
81
|
case "ArrowRight": {
|
|
82
82
|
g.preventDefault();
|
|
83
|
-
const S = v.size > 0 ?
|
|
83
|
+
const S = v.size > 0 ? o.getKeyBelow(P) : o.getFirstKey();
|
|
84
84
|
S && t.setSelectedKeys([S]);
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
}, { typeSelectProps: c } =
|
|
89
|
-
keyboardDelegate:
|
|
88
|
+
}, { typeSelectProps: c } = oe({
|
|
89
|
+
keyboardDelegate: o,
|
|
90
90
|
selectionManager: t.selectionManager,
|
|
91
91
|
onTypeSelect(g) {
|
|
92
92
|
t.setSelectedKeys([g]);
|
|
93
93
|
}
|
|
94
|
-
}), { labelProps: b, fieldProps:
|
|
94
|
+
}), { labelProps: b, fieldProps: f } = Y({
|
|
95
95
|
...e,
|
|
96
96
|
labelElementType: "span"
|
|
97
97
|
});
|
|
98
98
|
c.onKeyDown = c.onKeyDownCapture, delete c.onKeyDownCapture;
|
|
99
|
-
const m = D(e, { labelable: !0 }),
|
|
99
|
+
const m = D(e, { labelable: !0 }), p = x(c, a, f), K = O();
|
|
100
100
|
return {
|
|
101
101
|
labelProps: {
|
|
102
102
|
...b,
|
|
@@ -105,16 +105,16 @@ function ve(e, t, s) {
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
triggerProps: x(m, {
|
|
108
|
-
...
|
|
108
|
+
...p,
|
|
109
109
|
onKeyDown: N(
|
|
110
|
-
|
|
110
|
+
p.onKeyDown,
|
|
111
111
|
u,
|
|
112
112
|
e.onKeyDown
|
|
113
113
|
),
|
|
114
114
|
onKeyUp: e.onKeyUp,
|
|
115
115
|
"aria-labelledby": [
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
p["aria-labelledby"],
|
|
117
|
+
p["aria-label"] && !p["aria-labelledby"] ? p.id : null,
|
|
118
118
|
K
|
|
119
119
|
].filter(Boolean).join(" "),
|
|
120
120
|
onFocus(g) {
|
|
@@ -137,8 +137,8 @@ function ve(e, t, s) {
|
|
|
137
137
|
g.currentTarget.contains(g.relatedTarget) || (e.onBlur && e.onBlur(g), t.setFocused(!1));
|
|
138
138
|
},
|
|
139
139
|
"aria-labelledby": [
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
f["aria-labelledby"],
|
|
141
|
+
p["aria-label"] && !f["aria-labelledby"] ? p.id : null
|
|
142
142
|
].filter(Boolean).join(" ")
|
|
143
143
|
}
|
|
144
144
|
};
|
|
@@ -148,7 +148,7 @@ function Ke(e) {
|
|
|
148
148
|
collection: t,
|
|
149
149
|
disabledKeys: s,
|
|
150
150
|
selectionManager: r,
|
|
151
|
-
selectionManager: { setSelectedKeys: l, selectedKeys: i, selectionMode:
|
|
151
|
+
selectionManager: { setSelectedKeys: l, selectedKeys: i, selectionMode: o }
|
|
152
152
|
} = re(e), a = [], d = i.size !== 0 ? Array.from(i).map((u) => {
|
|
153
153
|
const c = t.getItem(u);
|
|
154
154
|
return c || a.push(u), c;
|
|
@@ -161,26 +161,26 @@ function Ke(e) {
|
|
|
161
161
|
collection: t,
|
|
162
162
|
disabledKeys: s,
|
|
163
163
|
selectionManager: r,
|
|
164
|
-
selectionMode:
|
|
164
|
+
selectionMode: o,
|
|
165
165
|
selectedKeys: i,
|
|
166
166
|
setSelectedKeys: l.bind(r),
|
|
167
167
|
selectedItems: d
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
function Pe(e) {
|
|
171
|
-
const [t, s] = V(!1), r =
|
|
171
|
+
const [t, s] = V(!1), r = ne(e), l = e.selectionMode === "single", i = Ke({
|
|
172
172
|
...e,
|
|
173
173
|
onSelectionChange: (c) => {
|
|
174
174
|
e.onSelectionChange && e.onSelectionChange(c), l && r.close();
|
|
175
175
|
}
|
|
176
|
-
}),
|
|
176
|
+
}), o = ie({
|
|
177
177
|
...e,
|
|
178
178
|
validationBehavior: "native",
|
|
179
179
|
value: i.selectedKeys
|
|
180
180
|
}), a = i.collection.size === 0, d = !!i.selectedKeys.size, u = I(() => {
|
|
181
|
-
|
|
182
|
-
}, [
|
|
183
|
-
return
|
|
181
|
+
o.resetValidation(), o.commitValidation();
|
|
182
|
+
}, [o]);
|
|
183
|
+
return M(() => {
|
|
184
184
|
l && d && u();
|
|
185
185
|
}, [d, l, u]), {
|
|
186
186
|
...i,
|
|
@@ -196,21 +196,21 @@ function Pe(e) {
|
|
|
196
196
|
},
|
|
197
197
|
isFocused: t,
|
|
198
198
|
setFocused: s,
|
|
199
|
-
...
|
|
199
|
+
...o
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
202
|
function xe(e, t = {}) {
|
|
203
203
|
const [s, r] = V({ width: 0, height: 0 }), l = t.delay === void 0 ? 500 : t.delay, i = !!t.includePadding;
|
|
204
|
-
return
|
|
204
|
+
return M(() => {
|
|
205
205
|
if (!e) return;
|
|
206
|
-
const
|
|
206
|
+
const o = new ResizeObserver(
|
|
207
207
|
Ce(([a]) => {
|
|
208
208
|
const { inlineSize: d, blockSize: u } = i ? a.borderBoxSize[0] : a.contentBoxSize[0];
|
|
209
209
|
r({ width: d, height: u });
|
|
210
210
|
}, l)
|
|
211
211
|
);
|
|
212
|
-
return
|
|
213
|
-
|
|
212
|
+
return o.observe(e), () => {
|
|
213
|
+
o.disconnect();
|
|
214
214
|
};
|
|
215
215
|
}, [l, e, i]), s;
|
|
216
216
|
}
|
|
@@ -228,12 +228,12 @@ function _e({
|
|
|
228
228
|
isDisabled: s,
|
|
229
229
|
isRequired: r,
|
|
230
230
|
selectRef: l
|
|
231
|
-
}, i,
|
|
231
|
+
}, i, o) {
|
|
232
232
|
const { visuallyHiddenProps: a } = de();
|
|
233
233
|
return R(l, i.selectedKeys, i.setSelectedKeys), ce(
|
|
234
234
|
{
|
|
235
235
|
validationBehavior: "native",
|
|
236
|
-
focus: () =>
|
|
236
|
+
focus: () => o.current?.focus()
|
|
237
237
|
},
|
|
238
238
|
i,
|
|
239
239
|
l
|
|
@@ -261,28 +261,28 @@ function _e({
|
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
263
|
function we(e) {
|
|
264
|
-
const { state: t, triggerRef: s, name: r, isDisabled: l } = e, i = `${e.label}-hidden`,
|
|
265
|
-
{ ...e, selectRef:
|
|
264
|
+
const { state: t, triggerRef: s, name: r, isDisabled: l } = e, i = `${e.label}-hidden`, o = L(null), { containerProps: a, selectProps: d } = _e(
|
|
265
|
+
{ ...e, selectRef: o },
|
|
266
266
|
t,
|
|
267
267
|
s
|
|
268
268
|
);
|
|
269
|
-
return t.collection.size <= 300 ? /* @__PURE__ */
|
|
269
|
+
return t.collection.size <= 300 ? /* @__PURE__ */ n(
|
|
270
270
|
"div",
|
|
271
271
|
{
|
|
272
272
|
...a,
|
|
273
273
|
"data-testid": "hidden-select-container",
|
|
274
|
-
children: /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ y("label", { children: [
|
|
275
275
|
i,
|
|
276
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ y(
|
|
277
277
|
"select",
|
|
278
278
|
{
|
|
279
279
|
...d,
|
|
280
|
-
ref:
|
|
280
|
+
ref: o,
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ n("option", {}),
|
|
283
283
|
[...t.collection.getKeys()].map((u) => {
|
|
284
284
|
const c = t.collection.getItem(u);
|
|
285
|
-
return c && c.type === "item" ? /* @__PURE__ */
|
|
285
|
+
return c && c.type === "item" ? /* @__PURE__ */ n(
|
|
286
286
|
"option",
|
|
287
287
|
{
|
|
288
288
|
value: c.key,
|
|
@@ -296,7 +296,7 @@ function we(e) {
|
|
|
296
296
|
)
|
|
297
297
|
] })
|
|
298
298
|
}
|
|
299
|
-
) : r ? /* @__PURE__ */
|
|
299
|
+
) : r ? /* @__PURE__ */ n(
|
|
300
300
|
"input",
|
|
301
301
|
{
|
|
302
302
|
type: "hidden",
|
|
@@ -307,18 +307,18 @@ function we(e) {
|
|
|
307
307
|
}
|
|
308
308
|
) : null;
|
|
309
309
|
}
|
|
310
|
-
const Ve = "
|
|
310
|
+
const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32", Te = "_icon_1bht1_68", Ae = "_tagGroup_1bht1_74", Fe = "_triggerContainer_1bht1_95", ke = "_selectValueTag_1bht1_101", ze = "_clearButton_1bht1_117", Ie = "_truncate_1bht1_129", Le = "_selectAll_1bht1_172", h = {
|
|
311
311
|
wrapper: Ve,
|
|
312
|
-
trigger:
|
|
313
|
-
medium:
|
|
314
|
-
icon:
|
|
315
|
-
tagGroup:
|
|
316
|
-
triggerContainer:
|
|
317
|
-
selectValueTag:
|
|
312
|
+
trigger: Me,
|
|
313
|
+
medium: Be,
|
|
314
|
+
icon: Te,
|
|
315
|
+
tagGroup: Ae,
|
|
316
|
+
triggerContainer: Fe,
|
|
317
|
+
selectValueTag: ke,
|
|
318
318
|
clearButton: ze,
|
|
319
319
|
truncate: Ie,
|
|
320
320
|
selectAll: Le
|
|
321
|
-
}, De = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", chosen: "chosen" }, Oe = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", chosen: "valda" },
|
|
321
|
+
}, De = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", chosen: "chosen" }, Oe = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", chosen: "valda" }, F = {
|
|
322
322
|
en: De,
|
|
323
323
|
sv: Oe
|
|
324
324
|
}, Ne = ({
|
|
@@ -329,32 +329,32 @@ const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32"
|
|
|
329
329
|
triggerRef: l,
|
|
330
330
|
isClearable: i
|
|
331
331
|
}) => {
|
|
332
|
-
const
|
|
333
|
-
return /* @__PURE__ */
|
|
332
|
+
const o = T(F);
|
|
333
|
+
return /* @__PURE__ */ y(
|
|
334
334
|
"div",
|
|
335
335
|
{
|
|
336
|
-
className:
|
|
336
|
+
className: h.selectValueTag,
|
|
337
337
|
"data-disabled": t || void 0,
|
|
338
338
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ n(
|
|
340
340
|
"span",
|
|
341
341
|
{
|
|
342
|
-
className:
|
|
342
|
+
className: h.truncate,
|
|
343
343
|
style: { maxWidth: s - 92 },
|
|
344
|
-
children: e?.length && e.length > 1 ? `${e.length} ${
|
|
344
|
+
children: e?.length && e.length > 1 ? `${e.length} ${o.format("chosen")}` : e?.[0].textValue
|
|
345
345
|
}
|
|
346
346
|
),
|
|
347
|
-
i && /* @__PURE__ */
|
|
347
|
+
i && /* @__PURE__ */ n(
|
|
348
348
|
"button",
|
|
349
349
|
{
|
|
350
350
|
disabled: t,
|
|
351
|
-
"aria-label":
|
|
352
|
-
className:
|
|
351
|
+
"aria-label": o.format("clearAll"),
|
|
352
|
+
className: h.clearButton,
|
|
353
353
|
onClick: () => {
|
|
354
354
|
r(), l?.current?.focus();
|
|
355
355
|
},
|
|
356
|
-
children: /* @__PURE__ */
|
|
357
|
-
|
|
356
|
+
children: /* @__PURE__ */ n(
|
|
357
|
+
fe,
|
|
358
358
|
{
|
|
359
359
|
width: 20,
|
|
360
360
|
height: 20
|
|
@@ -372,30 +372,30 @@ const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32"
|
|
|
372
372
|
size: r = "large",
|
|
373
373
|
isOpen: l,
|
|
374
374
|
isInvalid: i,
|
|
375
|
-
selectionMode:
|
|
375
|
+
selectionMode: o,
|
|
376
376
|
state: { selectedItems: a },
|
|
377
377
|
placeholder: d,
|
|
378
378
|
children: u,
|
|
379
379
|
triggerRef: c,
|
|
380
380
|
...b
|
|
381
381
|
}) => {
|
|
382
|
-
const { buttonProps:
|
|
382
|
+
const { buttonProps: f } = Z(
|
|
383
383
|
{ autoFocus: e, excludeFromTabOrder: t, isDisabled: s, ...b },
|
|
384
384
|
c
|
|
385
|
-
), m =
|
|
386
|
-
return /* @__PURE__ */
|
|
385
|
+
), m = o === "multiple";
|
|
386
|
+
return /* @__PURE__ */ y(
|
|
387
387
|
"div",
|
|
388
388
|
{
|
|
389
|
-
className:
|
|
389
|
+
className: h.triggerContainer,
|
|
390
390
|
"data-disabled": s || void 0,
|
|
391
391
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ y(
|
|
393
393
|
"button",
|
|
394
394
|
{
|
|
395
|
-
...
|
|
395
|
+
...f,
|
|
396
396
|
autoFocus: e,
|
|
397
|
-
className:
|
|
398
|
-
[
|
|
397
|
+
className: B(h.trigger, {
|
|
398
|
+
[h.medium]: r === "medium"
|
|
399
399
|
}),
|
|
400
400
|
"data-disabled": s || void 0,
|
|
401
401
|
"data-invalid": i || void 0,
|
|
@@ -403,14 +403,14 @@ const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32"
|
|
|
403
403
|
ref: c,
|
|
404
404
|
type: "button",
|
|
405
405
|
children: [
|
|
406
|
-
m && !a ? /* @__PURE__ */
|
|
407
|
-
m ? null : /* @__PURE__ */
|
|
408
|
-
/* @__PURE__ */
|
|
406
|
+
m && !a ? /* @__PURE__ */ n("span", { children: d }) : null,
|
|
407
|
+
m ? null : /* @__PURE__ */ n("span", { children: a ? a[0].textValue : d }),
|
|
408
|
+
/* @__PURE__ */ n(
|
|
409
409
|
"div",
|
|
410
410
|
{
|
|
411
|
-
className:
|
|
411
|
+
className: h.icon,
|
|
412
412
|
"aria-hidden": "true",
|
|
413
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ n(pe, { size: 20 })
|
|
414
414
|
}
|
|
415
415
|
)
|
|
416
416
|
]
|
|
@@ -423,7 +423,7 @@ const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32"
|
|
|
423
423
|
}, _ = ({
|
|
424
424
|
state: e,
|
|
425
425
|
errorMessage: t
|
|
426
|
-
}) => /* @__PURE__ */
|
|
426
|
+
}) => /* @__PURE__ */ n(H.Provider, { value: { ...e.displayValidation }, children: /* @__PURE__ */ n(ye, { children: t }) }), Ee = w.forwardRef(
|
|
427
427
|
({ isClearable: e = !0, popover: t, ...s }, r) => {
|
|
428
428
|
const l = {
|
|
429
429
|
selectionMode: "single",
|
|
@@ -433,28 +433,28 @@ const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32"
|
|
|
433
433
|
size: "large",
|
|
434
434
|
popover: t,
|
|
435
435
|
...s
|
|
436
|
-
}, i = E(r),
|
|
436
|
+
}, i = E(r), o = Pe(l), a = T(F), { labelProps: d, triggerProps: u, valueProps: c, menuProps: b } = ve(
|
|
437
437
|
l,
|
|
438
|
-
|
|
438
|
+
o,
|
|
439
439
|
i
|
|
440
|
-
), { width:
|
|
440
|
+
), { width: f } = xe(i.current, {
|
|
441
441
|
includePadding: !0
|
|
442
442
|
});
|
|
443
|
-
return /* @__PURE__ */
|
|
443
|
+
return /* @__PURE__ */ y(
|
|
444
444
|
$,
|
|
445
445
|
{
|
|
446
446
|
...l,
|
|
447
|
-
className:
|
|
447
|
+
className: B(h.wrapper, l.className),
|
|
448
448
|
children: [
|
|
449
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ n(
|
|
450
450
|
we,
|
|
451
451
|
{
|
|
452
452
|
...l,
|
|
453
|
-
state:
|
|
453
|
+
state: o,
|
|
454
454
|
triggerRef: i
|
|
455
455
|
}
|
|
456
456
|
),
|
|
457
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ n(ue, { popover: t, children: l.label && /* @__PURE__ */ n(
|
|
458
458
|
me,
|
|
459
459
|
{
|
|
460
460
|
...d,
|
|
@@ -462,79 +462,79 @@ const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32"
|
|
|
462
462
|
children: l.label
|
|
463
463
|
}
|
|
464
464
|
) }),
|
|
465
|
-
l.description && /* @__PURE__ */
|
|
466
|
-
l.errorPosition === "top" && /* @__PURE__ */
|
|
465
|
+
l.description && /* @__PURE__ */ n(ge, { slot: "description", children: l.description }),
|
|
466
|
+
l.errorPosition === "top" && /* @__PURE__ */ n(
|
|
467
467
|
_,
|
|
468
468
|
{
|
|
469
469
|
...l,
|
|
470
|
-
state:
|
|
470
|
+
state: o
|
|
471
471
|
}
|
|
472
472
|
),
|
|
473
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ n(
|
|
474
474
|
Re,
|
|
475
475
|
{
|
|
476
476
|
...l,
|
|
477
477
|
...u,
|
|
478
|
-
isInvalid:
|
|
478
|
+
isInvalid: o.displayValidation.isInvalid,
|
|
479
479
|
triggerRef: i,
|
|
480
|
-
state:
|
|
481
|
-
children: l.selectionMode === "multiple" &&
|
|
480
|
+
state: o,
|
|
481
|
+
children: l.selectionMode === "multiple" && o.selectedItems ? /* @__PURE__ */ n("span", { ...c, children: /* @__PURE__ */ n(
|
|
482
482
|
Ne,
|
|
483
483
|
{
|
|
484
484
|
...l,
|
|
485
|
-
state:
|
|
486
|
-
parentWidth:
|
|
487
|
-
onClear: () =>
|
|
485
|
+
state: o,
|
|
486
|
+
parentWidth: f,
|
|
487
|
+
onClear: () => o.selectionManager.clearSelection(),
|
|
488
488
|
triggerRef: i
|
|
489
489
|
}
|
|
490
490
|
) }) : null
|
|
491
491
|
}
|
|
492
492
|
),
|
|
493
|
-
l.errorPosition === "bottom" && /* @__PURE__ */
|
|
493
|
+
l.errorPosition === "bottom" && /* @__PURE__ */ n(
|
|
494
494
|
_,
|
|
495
495
|
{
|
|
496
496
|
...l,
|
|
497
|
-
state:
|
|
497
|
+
state: o
|
|
498
498
|
}
|
|
499
499
|
),
|
|
500
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ y(
|
|
501
501
|
J,
|
|
502
502
|
{
|
|
503
|
-
isOpen:
|
|
503
|
+
isOpen: o.isOpen,
|
|
504
504
|
onOpenChange: (m) => {
|
|
505
|
-
m ||
|
|
505
|
+
m || o.close();
|
|
506
506
|
},
|
|
507
507
|
triggerRef: i,
|
|
508
|
-
style: { width:
|
|
508
|
+
style: { width: f },
|
|
509
509
|
children: [
|
|
510
|
-
l.isSelectableAll && /* @__PURE__ */
|
|
511
|
-
|
|
510
|
+
l.isSelectableAll && /* @__PURE__ */ n(
|
|
511
|
+
he,
|
|
512
512
|
{
|
|
513
|
-
isSelected:
|
|
514
|
-
isIndeterminate: !
|
|
515
|
-
className:
|
|
516
|
-
onChange: () =>
|
|
513
|
+
isSelected: o.selectionManager.isSelectAll,
|
|
514
|
+
isIndeterminate: !o.selectionManager.isSelectAll && !o.selectionManager.isEmpty,
|
|
515
|
+
className: h.selectAll,
|
|
516
|
+
onChange: () => o.selectionManager.toggleSelectAll(),
|
|
517
517
|
children: a.format("selectAll")
|
|
518
518
|
}
|
|
519
519
|
),
|
|
520
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ n(
|
|
521
521
|
Se,
|
|
522
522
|
{
|
|
523
523
|
...b,
|
|
524
|
-
state:
|
|
524
|
+
state: o
|
|
525
525
|
}
|
|
526
526
|
)
|
|
527
527
|
]
|
|
528
528
|
}
|
|
529
529
|
),
|
|
530
|
-
l.showTags && !!
|
|
530
|
+
l.showTags && !!o.selectedItems && /* @__PURE__ */ n(
|
|
531
531
|
se,
|
|
532
532
|
{
|
|
533
533
|
"aria-label": a.format("selectedItems"),
|
|
534
534
|
selectionBehavior: "toggle",
|
|
535
|
-
onRemove: (m) =>
|
|
536
|
-
className:
|
|
537
|
-
children: /* @__PURE__ */
|
|
535
|
+
onRemove: (m) => o.selectionManager.toggleSelection(Array.from(m)[0]),
|
|
536
|
+
className: h.tagGroup,
|
|
537
|
+
children: /* @__PURE__ */ n(W, { items: o.selectedItems, children: (m) => /* @__PURE__ */ n(
|
|
538
538
|
ae,
|
|
539
539
|
{
|
|
540
540
|
textValue: m.textValue,
|
|
@@ -552,21 +552,21 @@ const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32"
|
|
|
552
552
|
);
|
|
553
553
|
}
|
|
554
554
|
), je = w.forwardRef(
|
|
555
|
-
({ options: e, ...t }, s) => /* @__PURE__ */
|
|
555
|
+
({ options: e, ...t }, s) => /* @__PURE__ */ n(
|
|
556
556
|
Ee,
|
|
557
557
|
{
|
|
558
558
|
...t,
|
|
559
559
|
items: e,
|
|
560
560
|
ref: s,
|
|
561
|
-
children: (r) => r.children ? /* @__PURE__ */
|
|
561
|
+
children: (r) => r.children ? /* @__PURE__ */ n(
|
|
562
562
|
j,
|
|
563
563
|
{
|
|
564
564
|
items: r.children,
|
|
565
565
|
title: r.name,
|
|
566
|
-
children: (l) => /* @__PURE__ */
|
|
566
|
+
children: (l) => /* @__PURE__ */ n(C, { textValue: l.textValue, children: l.name })
|
|
567
567
|
},
|
|
568
568
|
String(r.name)
|
|
569
|
-
) : /* @__PURE__ */
|
|
569
|
+
) : /* @__PURE__ */ n(C, { textValue: r.textValue, children: r.name })
|
|
570
570
|
}
|
|
571
571
|
)
|
|
572
572
|
);
|
|
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as s, Fragment as P } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as l, useState as C } from "react";
|
|
3
3
|
import { useContextProps as p, TextFieldContext as b, TextField as g, InputContext as f, Input as I, TextArea as v } from "react-aria-components";
|
|
4
4
|
import { a as A, c as h } from "./clsx-AexbMWKp.js";
|
|
5
|
-
import { s as d } from "./TextField.module-
|
|
5
|
+
import { s as d } from "./TextField.module-B3n8v1vH.js";
|
|
6
6
|
import { T as w } from "./Text-TWzJxnto.js";
|
|
7
7
|
import { B } from "./Button-BGu-SRi7.js";
|
|
8
8
|
import { u as L } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import '../assets/TextField.css';const t = "_textField_bb2z2_1", o = "_bottomError_bb2z2_20", s = "_textArea_bb2z2_29", _ = "_input_bb2z2_30", r = "_wrap_bb2z2_87", e = "_medium_bb2z2_92", b = "_passwordText_bb2z2_120", n = "_passwordButton_bb2z2_167", a = {
|
|
2
|
+
textField: t,
|
|
3
|
+
bottomError: o,
|
|
4
|
+
textArea: s,
|
|
5
|
+
input: _,
|
|
6
|
+
wrap: r,
|
|
7
|
+
medium: e,
|
|
8
|
+
passwordText: b,
|
|
9
|
+
passwordButton: n
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
a as s
|
|
13
|
+
};
|
package/date-field/index.js
CHANGED
package/date-picker/index.js
CHANGED
package/index.js
CHANGED
|
@@ -10,9 +10,9 @@ import { C as R } from "./chunks/Checkbox-BTAfwDxU.js";
|
|
|
10
10
|
import { C as F } from "./chunks/CheckboxGroup-C5NpRdqR.js";
|
|
11
11
|
import { C as v } from "./chunks/ColorSchemeSwitch-CaqrCGTA.js";
|
|
12
12
|
import { C as h, a as H, b as y } from "./chunks/ComboBox-BrpJ6b7d.js";
|
|
13
|
-
import { D as N } from "./chunks/DateField-
|
|
13
|
+
import { D as N } from "./chunks/DateField-CuNWL_ao.js";
|
|
14
14
|
import { a as E, b as Q, D as Z } from "./chunks/DateInputDivider-CkTB5q5k.js";
|
|
15
|
-
import { D as q, a as J } from "./chunks/DateRangePicker-
|
|
15
|
+
import { D as q, a as J } from "./chunks/DateRangePicker-jqrHTmLu.js";
|
|
16
16
|
import { F as O } from "./chunks/FieldError-Bra5aRT3.js";
|
|
17
17
|
import { D as V, F as W } from "./chunks/FileUpload-h1PxqQmb.js";
|
|
18
18
|
import { G as Y } from "./chunks/Grid-B-WgMwON.js";
|
|
@@ -28,16 +28,16 @@ import { M as Bo } from "./chunks/Dialog-DRpxD3Gh.js";
|
|
|
28
28
|
import { P as So } from "./chunks/Popover-BcEtFiU1.js";
|
|
29
29
|
import { P as Io } from "./chunks/ProgressBar-KQdaaME2.js";
|
|
30
30
|
import { R as Po, a as Ro } from "./chunks/Radio-Clk616ep.js";
|
|
31
|
-
import { S as Fo } from "./chunks/SearchField-
|
|
32
|
-
import { S as vo } from "./chunks/Select-
|
|
33
|
-
import { S as ho } from "./chunks/Select-
|
|
31
|
+
import { S as Fo } from "./chunks/SearchField-Cd05nl-B.js";
|
|
32
|
+
import { S as vo } from "./chunks/Select-Bc7Qj5UC.js";
|
|
33
|
+
import { S as ho } from "./chunks/Select-CRUskZeu.js";
|
|
34
34
|
import { S as yo } from "./chunks/Skeleton-DqIHQLQl.js";
|
|
35
35
|
import { S as No } from "./chunks/Spinner-tvJ7rPiT.js";
|
|
36
36
|
import { b as Eo, C as Qo, R as Zo, T as jo, c as qo, a as Jo } from "./chunks/Table-BgsgXhC_.js";
|
|
37
37
|
import { a as Oo, c as Uo, b as Vo, T as Wo } from "./chunks/TabList-D2XV5ixe.js";
|
|
38
38
|
import { T as Yo, a as _o } from "./chunks/Tag-CZrQBEgv.js";
|
|
39
39
|
import { T as oa } from "./chunks/Text-TWzJxnto.js";
|
|
40
|
-
import { I as ra, b as ea, a as ta, T as sa } from "./chunks/TextArea-
|
|
40
|
+
import { I as ra, b as ea, a as ta, T as sa } from "./chunks/TextArea-VkipFRQc.js";
|
|
41
41
|
import { G as xa, b as ma, T as ia, a as fa, t as na } from "./chunks/Toast-BehM7JJP.js";
|
|
42
42
|
import { T as Ta, a as la } from "./chunks/ToggleButtonGroup-CXKTrLbb.js";
|
|
43
43
|
import { T as Ca, a as ga } from "./chunks/Tooltip-m032jGgF.js";
|