@midas-ds/components 16.6.0 → 16.6.1
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 +18 -0
- package/assets/Dialog.css +1 -1
- package/assets/GridItem.css +1 -1
- package/assets/ProgressBar.css +1 -1
- package/assets/Select2.css +1 -1
- package/assets/Skeleton.css +1 -1
- package/assets/Spinner.css +1 -1
- package/assets/Text.css +1 -1
- package/assets/Toast.css +1 -1
- package/calendar/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/chunks/{CheckboxGroup-C5NpRdqR.js → CheckboxGroup-KqlchsTK.js} +2 -2
- package/chunks/{ComboBox-BrpJ6b7d.js → ComboBox-C-pAiys0.js} +2 -2
- package/chunks/{DateField-CuNWL_ao.js → DateField-Scz9gaJl.js} +2 -2
- package/chunks/{DateRangePicker-7MtqKhD1.js → DateRangePicker-DQfV97yu.js} +3 -3
- package/chunks/{FieldError-Bra5aRT3.js → FieldError-C_3uLAGY.js} +1 -1
- package/chunks/{Grid-B-WgMwON.js → Grid-CettmpaZ.js} +1 -1
- package/chunks/GridItem-z7zclNdT.js +237 -0
- package/chunks/{Layout-xF6_tsJ6.js → Layout-MPNSphLF.js} +1 -1
- package/chunks/{Radio-Clk616ep.js → Radio-BD-ICPhb.js} +2 -2
- package/chunks/{RangeCalendar-pgiXYhpG.js → RangeCalendar-CW38S2L8.js} +1 -1
- package/chunks/{SearchField-Cd05nl-B.js → SearchField-44UKmB8Z.js} +1 -1
- package/chunks/{Select-CRUskZeu.js → Select-BJlDjYWX.js} +88 -88
- package/chunks/{Select-BpSIhRl_.js → Select-CynlKjMH.js} +2 -2
- package/chunks/Text-Bxww8mmL.js +39 -0
- package/chunks/{TextArea-VkipFRQc.js → TextArea-Dudj2zg4.js} +2 -2
- package/chunks/Toast-DGvPi4rb.js +157 -0
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/field-error/index.js +1 -1
- package/grid/index.js +2 -2
- package/index.js +16 -16
- package/layout/index.js +1 -1
- package/legacy-select/index.js +1 -1
- package/package.json +2 -2
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/text/index.js +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.js +1 -1
- package/chunks/GridItem-5t1Z14sM.js +0 -237
- package/chunks/Text-TWzJxnto.js +0 -30
- package/chunks/Toast-BehM7JJP.js +0 -153
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import * as w from "react";
|
|
3
3
|
import { useMemo as z, useState as V, useCallback as I, useEffect as M, useRef as L } from "react";
|
|
4
4
|
import { c as B } from "./clsx-AexbMWKp.js";
|
|
5
|
-
import { filterDOMProps as D, mergeProps as x, useId as O, chain as
|
|
6
|
-
import { Section as
|
|
7
|
-
import { Collection as
|
|
8
|
-
import { L as
|
|
9
|
-
import { b as
|
|
5
|
+
import { filterDOMProps as D, mergeProps as x, useId as O, chain as q, useFormReset as N, useObjectRef as R } from "@react-aria/utils";
|
|
6
|
+
import { Section as E, Item as C } from "@react-stately/collections";
|
|
7
|
+
import { Collection as j, FieldErrorContext as G, TextField as H, TagList as $ } from "react-aria-components";
|
|
8
|
+
import { L as W } from "./ListBox-D5BBeZWL.js";
|
|
9
|
+
import { b as U, 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";
|
|
@@ -17,13 +17,13 @@ import { useListState as re } from "@react-stately/list";
|
|
|
17
17
|
import { a as se, T as ae } from "./Tag-CZrQBEgv.js";
|
|
18
18
|
import { useFormValidation as ce } from "@react-aria/form";
|
|
19
19
|
import { useVisuallyHidden as de } from "@react-aria/visually-hidden";
|
|
20
|
-
import { a as ue, L as
|
|
21
|
-
import { T as
|
|
22
|
-
import { C as
|
|
23
|
-
import { X as
|
|
20
|
+
import { a as ue, L as ge } from "./Label-xWKvOuML.js";
|
|
21
|
+
import { T as me } from "./Text-Bxww8mmL.js";
|
|
22
|
+
import { C as fe } from "./Checkbox-BTAfwDxU.js";
|
|
23
|
+
import { X as pe } from "./x-BXShoIAM.js";
|
|
24
24
|
import { u as T } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
25
|
-
import { C as
|
|
26
|
-
import { F as
|
|
25
|
+
import { C as ye } from "./chevron-down-DgT-uSF9.js";
|
|
26
|
+
import { F as he } from "./FieldError-C_3uLAGY.js";
|
|
27
27
|
import '../assets/Select2.css';const A = ({ item: e }) => /* @__PURE__ */ n(
|
|
28
28
|
X,
|
|
29
29
|
{
|
|
@@ -32,11 +32,11 @@ import '../assets/Select2.css';const A = ({ item: e }) => /* @__PURE__ */ n(
|
|
|
32
32
|
"aria-label": e.textValue,
|
|
33
33
|
children: e.rendered
|
|
34
34
|
}
|
|
35
|
-
), be = ({ section: e, state: t }) => /* @__PURE__ */ n(
|
|
35
|
+
), be = ({ section: e, state: t }) => /* @__PURE__ */ n(U, { ...e.value, children: t.collection.getChildren ? /* @__PURE__ */ n(j, { items: t.collection.getChildren(e.key), children: (s) => /* @__PURE__ */ n(A, { item: s }) }) : null }), Se = ({
|
|
36
36
|
state: e,
|
|
37
37
|
...t
|
|
38
38
|
}) => /* @__PURE__ */ n(
|
|
39
|
-
|
|
39
|
+
W,
|
|
40
40
|
{
|
|
41
41
|
...t,
|
|
42
42
|
...e,
|
|
@@ -68,18 +68,18 @@ function ve(e, t, s) {
|
|
|
68
68
|
},
|
|
69
69
|
t,
|
|
70
70
|
s
|
|
71
|
-
), u = (
|
|
71
|
+
), u = (m) => {
|
|
72
72
|
const { selectedKeys: v, selectionMode: k } = t, P = v.values().next().value;
|
|
73
73
|
if (k === "single")
|
|
74
|
-
switch (
|
|
74
|
+
switch (m.key) {
|
|
75
75
|
case "ArrowLeft": {
|
|
76
|
-
|
|
76
|
+
m.preventDefault();
|
|
77
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
|
+
m.preventDefault();
|
|
83
83
|
const S = v.size > 0 ? o.getKeyBelow(P) : o.getFirstKey();
|
|
84
84
|
S && t.setSelectedKeys([S]);
|
|
85
85
|
break;
|
|
@@ -88,15 +88,15 @@ function ve(e, t, s) {
|
|
|
88
88
|
}, { typeSelectProps: c } = oe({
|
|
89
89
|
keyboardDelegate: o,
|
|
90
90
|
selectionManager: t.selectionManager,
|
|
91
|
-
onTypeSelect(
|
|
92
|
-
t.setSelectedKeys([
|
|
91
|
+
onTypeSelect(m) {
|
|
92
|
+
t.setSelectedKeys([m]);
|
|
93
93
|
}
|
|
94
|
-
}), { labelProps: b, fieldProps:
|
|
94
|
+
}), { labelProps: b, fieldProps: p } = Y({
|
|
95
95
|
...e,
|
|
96
96
|
labelElementType: "span"
|
|
97
97
|
});
|
|
98
98
|
c.onKeyDown = c.onKeyDownCapture, delete c.onKeyDownCapture;
|
|
99
|
-
const
|
|
99
|
+
const g = D(e, { labelable: !0 }), y = x(c, a, p), K = O();
|
|
100
100
|
return {
|
|
101
101
|
labelProps: {
|
|
102
102
|
...b,
|
|
@@ -104,24 +104,24 @@ function ve(e, t, s) {
|
|
|
104
104
|
e.isDisabled || (s.current?.focus(), ee("keyboard"));
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
triggerProps: x(
|
|
108
|
-
...
|
|
109
|
-
onKeyDown:
|
|
110
|
-
|
|
107
|
+
triggerProps: x(g, {
|
|
108
|
+
...y,
|
|
109
|
+
onKeyDown: q(
|
|
110
|
+
y.onKeyDown,
|
|
111
111
|
u,
|
|
112
112
|
e.onKeyDown
|
|
113
113
|
),
|
|
114
114
|
onKeyUp: e.onKeyUp,
|
|
115
115
|
"aria-labelledby": [
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
y["aria-labelledby"],
|
|
117
|
+
y["aria-label"] && !y["aria-labelledby"] ? y.id : null,
|
|
118
118
|
K
|
|
119
119
|
].filter(Boolean).join(" "),
|
|
120
|
-
onFocus(
|
|
121
|
-
t.isFocused || (e.onFocus && e.onFocus(
|
|
120
|
+
onFocus(m) {
|
|
121
|
+
t.isFocused || (e.onFocus && e.onFocus(m), t.setFocused(!0));
|
|
122
122
|
},
|
|
123
|
-
onBlur(
|
|
124
|
-
t.isOpen || (e.onBlur && e.onBlur(
|
|
123
|
+
onBlur(m) {
|
|
124
|
+
t.isOpen || (e.onBlur && e.onBlur(m), t.setFocused(!1));
|
|
125
125
|
}
|
|
126
126
|
}),
|
|
127
127
|
valueProps: {
|
|
@@ -133,12 +133,12 @@ function ve(e, t, s) {
|
|
|
133
133
|
autoFocus: t.focusStrategy || !0,
|
|
134
134
|
shouldSelectOnPressUp: !0,
|
|
135
135
|
shouldFocusOnHover: !0,
|
|
136
|
-
onBlur: (
|
|
137
|
-
|
|
136
|
+
onBlur: (m) => {
|
|
137
|
+
m.currentTarget.contains(m.relatedTarget) || (e.onBlur && e.onBlur(m), t.setFocused(!1));
|
|
138
138
|
},
|
|
139
139
|
"aria-labelledby": [
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
p["aria-labelledby"],
|
|
141
|
+
y["aria-label"] && !p["aria-labelledby"] ? y.id : null
|
|
142
142
|
].filter(Boolean).join(" ")
|
|
143
143
|
}
|
|
144
144
|
};
|
|
@@ -230,7 +230,7 @@ function _e({
|
|
|
230
230
|
selectRef: l
|
|
231
231
|
}, i, o) {
|
|
232
232
|
const { visuallyHiddenProps: a } = de();
|
|
233
|
-
return
|
|
233
|
+
return N(l, i.selectedKeys, i.setSelectedKeys), ce(
|
|
234
234
|
{
|
|
235
235
|
validationBehavior: "native",
|
|
236
236
|
focus: () => o.current?.focus()
|
|
@@ -271,9 +271,9 @@ function we(e) {
|
|
|
271
271
|
{
|
|
272
272
|
...a,
|
|
273
273
|
"data-testid": "hidden-select-container",
|
|
274
|
-
children: /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ h("label", { children: [
|
|
275
275
|
i,
|
|
276
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ h(
|
|
277
277
|
"select",
|
|
278
278
|
{
|
|
279
279
|
...d,
|
|
@@ -307,7 +307,7 @@ function we(e) {
|
|
|
307
307
|
}
|
|
308
308
|
) : null;
|
|
309
309
|
}
|
|
310
|
-
const Ve = "
|
|
310
|
+
const Ve = "_wrapper_odqg7_1", Me = "_trigger_odqg7_12", Be = "_medium_odqg7_26", Te = "_icon_odqg7_62", Ae = "_tagGroup_odqg7_68", Fe = "_triggerContainer_odqg7_89", ke = "_selectValueTag_odqg7_95", ze = "_clearButton_odqg7_111", Ie = "_truncate_odqg7_123", Le = "_selectAll_odqg7_166", f = {
|
|
311
311
|
wrapper: Ve,
|
|
312
312
|
trigger: Me,
|
|
313
313
|
medium: Be,
|
|
@@ -321,7 +321,7 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
321
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
|
+
}, qe = ({
|
|
325
325
|
state: { selectedItems: e },
|
|
326
326
|
isDisabled: t,
|
|
327
327
|
parentWidth: s,
|
|
@@ -330,16 +330,16 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
330
330
|
isClearable: i
|
|
331
331
|
}) => {
|
|
332
332
|
const o = T(F);
|
|
333
|
-
return /* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ h(
|
|
334
334
|
"div",
|
|
335
335
|
{
|
|
336
|
-
className:
|
|
336
|
+
className: f.selectValueTag,
|
|
337
337
|
"data-disabled": t || void 0,
|
|
338
338
|
children: [
|
|
339
339
|
/* @__PURE__ */ n(
|
|
340
340
|
"span",
|
|
341
341
|
{
|
|
342
|
-
className:
|
|
342
|
+
className: f.truncate,
|
|
343
343
|
style: { maxWidth: s - 92 },
|
|
344
344
|
children: e?.length && e.length > 1 ? `${e.length} ${o.format("chosen")}` : e?.[0].textValue
|
|
345
345
|
}
|
|
@@ -349,12 +349,12 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
349
349
|
{
|
|
350
350
|
disabled: t,
|
|
351
351
|
"aria-label": o.format("clearAll"),
|
|
352
|
-
className:
|
|
352
|
+
className: f.clearButton,
|
|
353
353
|
onClick: () => {
|
|
354
354
|
r(), l?.current?.focus();
|
|
355
355
|
},
|
|
356
356
|
children: /* @__PURE__ */ n(
|
|
357
|
-
|
|
357
|
+
pe,
|
|
358
358
|
{
|
|
359
359
|
width: 20,
|
|
360
360
|
height: 20
|
|
@@ -365,7 +365,7 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
365
365
|
]
|
|
366
366
|
}
|
|
367
367
|
);
|
|
368
|
-
},
|
|
368
|
+
}, Ne = ({
|
|
369
369
|
autoFocus: e,
|
|
370
370
|
excludeFromTabOrder: t,
|
|
371
371
|
isDisabled: s,
|
|
@@ -379,23 +379,23 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
379
379
|
triggerRef: c,
|
|
380
380
|
...b
|
|
381
381
|
}) => {
|
|
382
|
-
const { buttonProps:
|
|
382
|
+
const { buttonProps: p } = Z(
|
|
383
383
|
{ autoFocus: e, excludeFromTabOrder: t, isDisabled: s, ...b },
|
|
384
384
|
c
|
|
385
|
-
),
|
|
386
|
-
return /* @__PURE__ */
|
|
385
|
+
), g = o === "multiple";
|
|
386
|
+
return /* @__PURE__ */ h(
|
|
387
387
|
"div",
|
|
388
388
|
{
|
|
389
|
-
className:
|
|
389
|
+
className: f.triggerContainer,
|
|
390
390
|
"data-disabled": s || void 0,
|
|
391
391
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ h(
|
|
393
393
|
"button",
|
|
394
394
|
{
|
|
395
|
-
...
|
|
395
|
+
...p,
|
|
396
396
|
autoFocus: e,
|
|
397
|
-
className: B(
|
|
398
|
-
[
|
|
397
|
+
className: B(f.trigger, {
|
|
398
|
+
[f.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_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
403
403
|
ref: c,
|
|
404
404
|
type: "button",
|
|
405
405
|
children: [
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
g && !a ? /* @__PURE__ */ n("span", { children: d }) : null,
|
|
407
|
+
g ? null : /* @__PURE__ */ n("span", { children: a ? a[0].textValue : d }),
|
|
408
408
|
/* @__PURE__ */ n(
|
|
409
409
|
"div",
|
|
410
410
|
{
|
|
411
|
-
className:
|
|
411
|
+
className: f.icon,
|
|
412
412
|
"aria-hidden": "true",
|
|
413
|
-
children: /* @__PURE__ */ n(
|
|
413
|
+
children: /* @__PURE__ */ n(ye, { size: 20 })
|
|
414
414
|
}
|
|
415
415
|
)
|
|
416
416
|
]
|
|
@@ -423,7 +423,7 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
423
423
|
}, _ = ({
|
|
424
424
|
state: e,
|
|
425
425
|
errorMessage: t
|
|
426
|
-
}) => /* @__PURE__ */ n(
|
|
426
|
+
}) => /* @__PURE__ */ n(G.Provider, { value: { ...e.displayValidation }, children: /* @__PURE__ */ n(he, { children: t }) }), Re = w.forwardRef(
|
|
427
427
|
({ isClearable: e = !0, popover: t, ...s }, r) => {
|
|
428
428
|
const l = {
|
|
429
429
|
selectionMode: "single",
|
|
@@ -433,18 +433,18 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
433
433
|
size: "large",
|
|
434
434
|
popover: t,
|
|
435
435
|
...s
|
|
436
|
-
}, i =
|
|
436
|
+
}, i = R(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: p } = xe(i.current, {
|
|
441
441
|
includePadding: !0
|
|
442
442
|
});
|
|
443
|
-
return /* @__PURE__ */
|
|
444
|
-
|
|
443
|
+
return /* @__PURE__ */ h(
|
|
444
|
+
H,
|
|
445
445
|
{
|
|
446
446
|
...l,
|
|
447
|
-
className: B(
|
|
447
|
+
className: B(f.wrapper, l.className),
|
|
448
448
|
children: [
|
|
449
449
|
/* @__PURE__ */ n(
|
|
450
450
|
we,
|
|
@@ -455,14 +455,14 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
455
455
|
}
|
|
456
456
|
),
|
|
457
457
|
/* @__PURE__ */ n(ue, { popover: t, children: l.label && /* @__PURE__ */ n(
|
|
458
|
-
|
|
458
|
+
ge,
|
|
459
459
|
{
|
|
460
460
|
...d,
|
|
461
461
|
"data-disabled": l.isDisabled || void 0,
|
|
462
462
|
children: l.label
|
|
463
463
|
}
|
|
464
464
|
) }),
|
|
465
|
-
l.description && /* @__PURE__ */ n(
|
|
465
|
+
l.description && /* @__PURE__ */ n(me, { slot: "description", children: l.description }),
|
|
466
466
|
l.errorPosition === "top" && /* @__PURE__ */ n(
|
|
467
467
|
_,
|
|
468
468
|
{
|
|
@@ -471,7 +471,7 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
471
471
|
}
|
|
472
472
|
),
|
|
473
473
|
/* @__PURE__ */ n(
|
|
474
|
-
|
|
474
|
+
Ne,
|
|
475
475
|
{
|
|
476
476
|
...l,
|
|
477
477
|
...u,
|
|
@@ -479,11 +479,11 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
479
479
|
triggerRef: i,
|
|
480
480
|
state: o,
|
|
481
481
|
children: l.selectionMode === "multiple" && o.selectedItems ? /* @__PURE__ */ n("span", { ...c, children: /* @__PURE__ */ n(
|
|
482
|
-
|
|
482
|
+
qe,
|
|
483
483
|
{
|
|
484
484
|
...l,
|
|
485
485
|
state: o,
|
|
486
|
-
parentWidth:
|
|
486
|
+
parentWidth: p,
|
|
487
487
|
onClear: () => o.selectionManager.clearSelection(),
|
|
488
488
|
triggerRef: i
|
|
489
489
|
}
|
|
@@ -497,22 +497,22 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
497
497
|
state: o
|
|
498
498
|
}
|
|
499
499
|
),
|
|
500
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ h(
|
|
501
501
|
J,
|
|
502
502
|
{
|
|
503
503
|
isOpen: o.isOpen,
|
|
504
|
-
onOpenChange: (
|
|
505
|
-
|
|
504
|
+
onOpenChange: (g) => {
|
|
505
|
+
g || o.close();
|
|
506
506
|
},
|
|
507
507
|
triggerRef: i,
|
|
508
|
-
style: { width:
|
|
508
|
+
style: { width: p },
|
|
509
509
|
children: [
|
|
510
510
|
l.isSelectableAll && /* @__PURE__ */ n(
|
|
511
|
-
|
|
511
|
+
fe,
|
|
512
512
|
{
|
|
513
513
|
isSelected: o.selectionManager.isSelectAll,
|
|
514
514
|
isIndeterminate: !o.selectionManager.isSelectAll && !o.selectionManager.isEmpty,
|
|
515
|
-
className:
|
|
515
|
+
className: f.selectAll,
|
|
516
516
|
onChange: () => o.selectionManager.toggleSelectAll(),
|
|
517
517
|
children: a.format("selectAll")
|
|
518
518
|
}
|
|
@@ -532,18 +532,18 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
532
532
|
{
|
|
533
533
|
"aria-label": a.format("selectedItems"),
|
|
534
534
|
selectionBehavior: "toggle",
|
|
535
|
-
onRemove: (
|
|
536
|
-
className:
|
|
537
|
-
children: /* @__PURE__ */ n(
|
|
535
|
+
onRemove: (g) => o.selectionManager.toggleSelection(Array.from(g)[0]),
|
|
536
|
+
className: f.tagGroup,
|
|
537
|
+
children: /* @__PURE__ */ n($, { items: o.selectedItems, children: (g) => /* @__PURE__ */ n(
|
|
538
538
|
ae,
|
|
539
539
|
{
|
|
540
|
-
textValue:
|
|
541
|
-
id:
|
|
540
|
+
textValue: g.textValue,
|
|
541
|
+
id: g.key,
|
|
542
542
|
dismissable: !0,
|
|
543
543
|
isDisabled: l.isDisabled,
|
|
544
|
-
children:
|
|
544
|
+
children: g.textValue
|
|
545
545
|
},
|
|
546
|
-
|
|
546
|
+
g.key
|
|
547
547
|
) })
|
|
548
548
|
}
|
|
549
549
|
)
|
|
@@ -551,15 +551,15 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
551
551
|
}
|
|
552
552
|
);
|
|
553
553
|
}
|
|
554
|
-
),
|
|
554
|
+
), Ee = w.forwardRef(
|
|
555
555
|
({ options: e, ...t }, s) => /* @__PURE__ */ n(
|
|
556
|
-
|
|
556
|
+
Re,
|
|
557
557
|
{
|
|
558
558
|
...t,
|
|
559
559
|
items: e,
|
|
560
560
|
ref: s,
|
|
561
561
|
children: (r) => r.children ? /* @__PURE__ */ n(
|
|
562
|
-
|
|
562
|
+
E,
|
|
563
563
|
{
|
|
564
564
|
items: r.children,
|
|
565
565
|
title: r.name,
|
|
@@ -570,7 +570,7 @@ const Ve = "_wrapper_1bht1_7", Me = "_trigger_1bht1_18", Be = "_medium_1bht1_32"
|
|
|
570
570
|
}
|
|
571
571
|
)
|
|
572
572
|
);
|
|
573
|
-
|
|
573
|
+
Ee.displayName = "Select";
|
|
574
574
|
export {
|
|
575
|
-
|
|
575
|
+
Ee as S
|
|
576
576
|
};
|
|
@@ -3,8 +3,8 @@ import { SelectStateContext as u, SelectValue as h, Button as _, TagList as A, S
|
|
|
3
3
|
import { FocusScope as x } from "@react-aria/focus";
|
|
4
4
|
import { a as z, L as N } from "./Label-xWKvOuML.js";
|
|
5
5
|
import { a as b, c as y } from "./clsx-AexbMWKp.js";
|
|
6
|
-
import { T } from "./Text-
|
|
7
|
-
import { F as g } from "./FieldError-
|
|
6
|
+
import { T } from "./Text-Bxww8mmL.js";
|
|
7
|
+
import { F as g } from "./FieldError-C_3uLAGY.js";
|
|
8
8
|
import p, { useContext as f } from "react";
|
|
9
9
|
import { C as B } from "./Checkbox-BTAfwDxU.js";
|
|
10
10
|
import { u as d } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as _ } from "./clsx-AexbMWKp.js";
|
|
3
|
+
import { Text as b } from "react-aria-components";
|
|
4
|
+
import '../assets/Text.css';const m = "_body_fvsa7_1", p = "_description_fvsa7_5", f = "_bold_fvsa7_42", y = "_italic_fvsa7_46", s = {
|
|
5
|
+
body: m,
|
|
6
|
+
"body-01": "_body-01_fvsa7_2",
|
|
7
|
+
"body-02": "_body-02_fvsa7_3",
|
|
8
|
+
"body-small": "_body-small_fvsa7_4",
|
|
9
|
+
description: p,
|
|
10
|
+
"description-small": "_description-small_fvsa7_6",
|
|
11
|
+
bold: f,
|
|
12
|
+
italic: y
|
|
13
|
+
}, a = "span", N = ({
|
|
14
|
+
children: d,
|
|
15
|
+
className: c,
|
|
16
|
+
size: t,
|
|
17
|
+
variant: i,
|
|
18
|
+
isExpressive: r = !1,
|
|
19
|
+
elementType: o = a,
|
|
20
|
+
...l
|
|
21
|
+
}) => {
|
|
22
|
+
const e = {
|
|
23
|
+
className: _(
|
|
24
|
+
i === "body-01" ? s["body-01"] : i === "body-02" ? s["body-02"] : l.slot === "description" ? t === "small" ? s["description-small"] : s.description : t === "small" ? s["body-small"] : s.body,
|
|
25
|
+
{
|
|
26
|
+
[s.bold]: ["b", "strong"].includes(o),
|
|
27
|
+
[s.italic]: ["i", "em"].includes(o)
|
|
28
|
+
},
|
|
29
|
+
c
|
|
30
|
+
),
|
|
31
|
+
elementType: o || a,
|
|
32
|
+
...r && { "data-expressive": !0 },
|
|
33
|
+
...l
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ n(b, { ...e, children: d });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
N as T
|
|
39
|
+
};
|
|
@@ -3,10 +3,10 @@ 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
5
|
import { s as d } from "./TextField.module-B3n8v1vH.js";
|
|
6
|
-
import { T as w } from "./Text-
|
|
6
|
+
import { T as w } from "./Text-Bxww8mmL.js";
|
|
7
7
|
import { B } from "./Button-BGu-SRi7.js";
|
|
8
8
|
import { u as L } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
9
|
-
import { F as u } from "./FieldError-
|
|
9
|
+
import { F as u } from "./FieldError-C_3uLAGY.js";
|
|
10
10
|
import { C as E } from "./CharacterCounter-R6vh7AE5.js";
|
|
11
11
|
import { a as S, L as $ } from "./Label-xWKvOuML.js";
|
|
12
12
|
const x = l(
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { jsx as o, jsxs as c, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { B as h } from "./Button-BGu-SRi7.js";
|
|
3
|
+
import { useToastRegion as f, useToast as p } from "react-aria";
|
|
4
|
+
import { ToastQueue as g, useToastQueue as w, useToastState as R } from "react-stately";
|
|
5
|
+
import _ from "react";
|
|
6
|
+
import { createPortal as y, flushSync as b } from "react-dom";
|
|
7
|
+
import { c as l } from "./clsx-AexbMWKp.js";
|
|
8
|
+
import { F as P } from "./FeedbackStatusIcon-YJaUAfjp.js";
|
|
9
|
+
import { X as I } from "./x-BXShoIAM.js";
|
|
10
|
+
import '../assets/Toast.css';const N = "_toastRegion_1shnv_49", E = "_toast_1shnv_49", O = "_success_1shnv_97", x = "_info_1shnv_105", C = "_important_1shnv_113", M = "_warning_1shnv_121", S = "_icon_1shnv_129", k = "_toastContent_1shnv_143", B = "_toastMessage_1shnv_150", F = "_viewTransition_1shnv_157", Q = "_slideInTop_1shnv_1", V = "_slideInEnd_1shnv_1", j = "_slideOutTop_1shnv_1", G = "_slideOutEnd_1shnv_1", e = {
|
|
11
|
+
toastRegion: N,
|
|
12
|
+
toast: E,
|
|
13
|
+
success: O,
|
|
14
|
+
info: x,
|
|
15
|
+
important: C,
|
|
16
|
+
warning: M,
|
|
17
|
+
icon: S,
|
|
18
|
+
toastContent: k,
|
|
19
|
+
toastMessage: B,
|
|
20
|
+
viewTransition: F,
|
|
21
|
+
slideInTop: Q,
|
|
22
|
+
slideInEnd: V,
|
|
23
|
+
slideOutTop: j,
|
|
24
|
+
slideOutEnd: G
|
|
25
|
+
}, u = {
|
|
26
|
+
wrapUpdate(t) {
|
|
27
|
+
"startViewTransition" in document ? document.startViewTransition(() => {
|
|
28
|
+
b(t);
|
|
29
|
+
}) : t();
|
|
30
|
+
},
|
|
31
|
+
maxVisibleToasts: 5
|
|
32
|
+
}, z = new g(u), Y = (t) => {
|
|
33
|
+
const n = w(z);
|
|
34
|
+
return n.visibleToasts.length > 0 ? y(
|
|
35
|
+
/* @__PURE__ */ o(
|
|
36
|
+
d,
|
|
37
|
+
{
|
|
38
|
+
...t,
|
|
39
|
+
state: n
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
document.body
|
|
43
|
+
) : null;
|
|
44
|
+
}, Z = ({ children: t, ...n }) => {
|
|
45
|
+
const s = R(u);
|
|
46
|
+
return /* @__PURE__ */ c(T, { children: [
|
|
47
|
+
typeof t == "function" ? t(s) : t,
|
|
48
|
+
s.visibleToasts.length > 0 && /* @__PURE__ */ o(
|
|
49
|
+
d,
|
|
50
|
+
{
|
|
51
|
+
...n,
|
|
52
|
+
state: s
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
function d({
|
|
58
|
+
state: t,
|
|
59
|
+
className: n,
|
|
60
|
+
...s
|
|
61
|
+
}) {
|
|
62
|
+
const a = _.useRef(null), { regionProps: r } = f(s, t, a);
|
|
63
|
+
return /* @__PURE__ */ o(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
...r,
|
|
67
|
+
ref: a,
|
|
68
|
+
className: l(e.toastRegion, n),
|
|
69
|
+
children: t.visibleToasts.map((i) => /* @__PURE__ */ o(
|
|
70
|
+
U,
|
|
71
|
+
{
|
|
72
|
+
toast: i,
|
|
73
|
+
state: t
|
|
74
|
+
},
|
|
75
|
+
i.key
|
|
76
|
+
))
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function U({
|
|
81
|
+
state: t,
|
|
82
|
+
className: n,
|
|
83
|
+
...s
|
|
84
|
+
}) {
|
|
85
|
+
const a = _.useRef(null), { toastProps: r, contentProps: i, titleProps: m, closeButtonProps: v } = p(
|
|
86
|
+
s,
|
|
87
|
+
t,
|
|
88
|
+
a
|
|
89
|
+
);
|
|
90
|
+
return /* @__PURE__ */ c(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
...r,
|
|
94
|
+
ref: a,
|
|
95
|
+
className: l(
|
|
96
|
+
e.toast,
|
|
97
|
+
e[s.toast.content.type],
|
|
98
|
+
n
|
|
99
|
+
),
|
|
100
|
+
style: {
|
|
101
|
+
viewTransitionName: s.toast.key,
|
|
102
|
+
viewTransitionClass: e.viewTransition
|
|
103
|
+
},
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ c(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
...i,
|
|
109
|
+
className: l(e.toastContent, i.className),
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ o(
|
|
112
|
+
P,
|
|
113
|
+
{
|
|
114
|
+
"aria-hidden": !0,
|
|
115
|
+
className: e.icon,
|
|
116
|
+
status: s.toast.content.type
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ c("div", { children: [
|
|
120
|
+
/* @__PURE__ */ o(
|
|
121
|
+
"p",
|
|
122
|
+
{
|
|
123
|
+
className: e.toastMessage,
|
|
124
|
+
...m,
|
|
125
|
+
children: s.toast.content.message
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
s.toast.content.children
|
|
129
|
+
] })
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
/* @__PURE__ */ o(
|
|
134
|
+
h,
|
|
135
|
+
{
|
|
136
|
+
variant: "icon",
|
|
137
|
+
...v,
|
|
138
|
+
children: /* @__PURE__ */ o(
|
|
139
|
+
I,
|
|
140
|
+
{
|
|
141
|
+
size: 20,
|
|
142
|
+
"aria-hidden": !0
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
Y as G,
|
|
153
|
+
Z as T,
|
|
154
|
+
d as a,
|
|
155
|
+
U as b,
|
|
156
|
+
z as t
|
|
157
|
+
};
|
package/combobox/index.js
CHANGED
package/date-field/index.js
CHANGED
package/date-picker/index.js
CHANGED