@midas-ds/components 15.4.0 → 15.4.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 +6 -0
- package/accordion/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.js +2 -2
- package/calendar/index.js +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.js +2 -2
- package/chunks/{AccordionItem-BCoomT4-.js → AccordionItem-69q6FXXl.js} +37 -37
- package/chunks/{BadgeContainer-BJAC-kV0.js → BadgeContainer-CKVsfTlF.js} +1 -1
- package/chunks/Breadcrumbs-By2bMbQd.js +28 -0
- package/chunks/Button-BMf7mX0N.js +46 -0
- package/chunks/{ButtonGroup-B6mr4JGY.js → ButtonGroup-Dr6HOBo2.js} +1 -1
- package/chunks/Card-ia98VoKL.js +130 -0
- package/chunks/CharacterCounter-DeuE2det.js +21 -0
- package/chunks/Checkbox-ClhO-AzB.js +122 -0
- package/chunks/CheckboxGroup-C3FOm8N8.js +84 -0
- package/chunks/{ColorSchemeSwitch-Cd6VSXql.js → ColorSchemeSwitch-DugvPh6T.js} +17 -17
- package/chunks/ComboBox-BqRZMi8W.js +108 -0
- package/chunks/DateField-12KSJHls.js +46 -0
- package/chunks/DateInputDivider-CkTB5q5k.js +36 -0
- package/chunks/DateRangePicker-BLRFvUp0.js +117 -0
- package/chunks/Dialog-C-X_qUR6.js +66 -0
- package/chunks/Dropdown-D7HQo9eM.js +79 -0
- package/chunks/FieldError-C0HRIcAx.js +23 -0
- package/chunks/FileUpload-h1PxqQmb.js +16 -0
- package/chunks/{Grid-DeB7TdcZ.js → Grid-B-WgMwON.js} +2 -2
- package/chunks/{GridItem-B_3FFhPs.js → GridItem-5t1Z14sM.js} +1 -1
- package/chunks/Heading-D8tNNJkt.js +38 -0
- package/chunks/{InfoBanner-Bw3rjGtB.js → InfoBanner-Cc3GhryE.js} +3 -3
- package/chunks/Label-D6WuwdAj.js +73 -0
- package/chunks/{Layout-InD0Hl7F.js → Layout-DGCDkyf3.js} +70 -70
- package/chunks/Link-yTNUNv3C.js +54 -0
- package/chunks/LinkButton-3nAekUJ4.js +63 -0
- package/chunks/{ListBox-CKDglhFH.js → ListBox-D4tO_OrO.js} +18 -18
- package/chunks/ListBoxLoadMoreItem-Bo0eLhpt.js +41 -0
- package/chunks/ListBoxSection-DKHba2X0.js +49 -0
- package/chunks/{Logo-D80UDT1x.js → Logo-InDSslpO.js} +2 -2
- package/chunks/Popover-BAdqdN6C.js +38 -0
- package/chunks/ProgressBar-zeJLxHVL.js +53 -0
- package/chunks/Radio-kvQP7E9s.js +43 -0
- package/chunks/RangeCalendar-CnquULdq.js +99 -0
- package/chunks/{SearchField-Dr3DAs9W.js → SearchField-B6ygRRL4.js} +39 -39
- package/chunks/Select-Cm5VZRTx.js +576 -0
- package/chunks/{Select-fDRXxmLm.js → Select-qmCuJm2x.js} +48 -46
- package/chunks/Separator-BcnQEA9f.js +76 -0
- package/chunks/{Skeleton-Bcg_xgAx.js → Skeleton-DqIHQLQl.js} +1 -1
- package/chunks/Spinner-Pll5zpx8.js +48 -0
- package/chunks/TabList-D2XV5ixe.js +81 -0
- package/chunks/Table-B1rlSIhS.js +139 -0
- package/chunks/Tag-Ca8wKXOy.js +53 -0
- package/chunks/{Text-WP6RbnnK.js → Text-TWzJxnto.js} +9 -9
- package/chunks/TextArea-UU7gFMEb.js +124 -0
- package/chunks/Toast-Cm2Zqq-F.js +162 -0
- package/chunks/ToggleButtonGroup-CXKTrLbb.js +29 -0
- package/chunks/Tooltip-CtstfI8u.js +46 -0
- package/chunks/clsx-AexbMWKp.js +24 -0
- package/chunks/useLocalizedStringFormatter-ZgRJmvHC.js +25 -0
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.js +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/index.js +1 -1
- package/dropdown/index.js +1 -1
- package/field-error/index.js +1 -1
- package/file-upload/index.js +1 -1
- package/grid/index.js +2 -2
- package/heading/index.js +1 -1
- package/index.js +68 -68
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/legacy-select/index.js +1 -1
- package/link/index.js +3 -3
- package/link-button/index.js +3 -3
- package/list-box/index.js +3 -3
- package/logo/index.js +1 -1
- package/menu/index.js +5 -5
- package/modal/index.js +2 -2
- package/package.json +2 -3
- package/popover/index.js +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/skeleton/index.js +1 -1
- package/spinner/index.js +1 -1
- package/table/index.js +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.js +1 -1
- package/text/index.js +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.js +1 -1
- package/tooltip/index.js +1 -1
- package/chunks/Breadcrumbs-CnuqEeOL.js +0 -28
- package/chunks/Button-CHs1wv7n.js +0 -46
- package/chunks/Card-D58EJCcV.js +0 -130
- package/chunks/CharacterCounter-CzCvDmNP.js +0 -21
- package/chunks/Checkbox-CogzFDe3.js +0 -119
- package/chunks/CheckboxGroup-BLx25gqn.js +0 -83
- package/chunks/ComboBox-8YAwADqL.js +0 -108
- package/chunks/DateField-CpbYROK1.js +0 -46
- package/chunks/DateInputDivider-C43xP4is.js +0 -36
- package/chunks/DateRangePicker-CICkmtXG.js +0 -116
- package/chunks/Dialog-DBn9L3SP.js +0 -66
- package/chunks/Dropdown-Cctv2Qpv.js +0 -79
- package/chunks/FieldError-CZKAYQ-n.js +0 -23
- package/chunks/FileUpload-DILt4rAn.js +0 -16
- package/chunks/Heading-DIw3iLMN.js +0 -38
- package/chunks/Label-CKe9pgXT.js +0 -73
- package/chunks/Link-C3w5O2wT.js +0 -54
- package/chunks/LinkButton-D6X0Dvoz.js +0 -63
- package/chunks/ListBoxLoadMoreItem-y9pCuqRe.js +0 -41
- package/chunks/ListBoxSection-CvtRigQb.js +0 -49
- package/chunks/Popover-DktRiuCr.js +0 -38
- package/chunks/ProgressBar-Bjxi5TgY.js +0 -53
- package/chunks/Radio-DqFFcFra.js +0 -43
- package/chunks/RangeCalendar-CIxwICEf.js +0 -99
- package/chunks/Select-BSqv5Qi-.js +0 -566
- package/chunks/Separator-Cw1vlSYO.js +0 -76
- package/chunks/Spinner-B2EAm49Z.js +0 -48
- package/chunks/TabList-BIBQcX2n.js +0 -81
- package/chunks/Table-Cy-R3Ma8.js +0 -139
- package/chunks/Tag-BZnq1_yZ.js +0 -53
- package/chunks/TextArea-3fPkKmNx.js +0 -124
- package/chunks/Toast-CP_V12b3.js +0 -161
- package/chunks/ToggleButtonGroup-CgNeypuW.js +0 -29
- package/chunks/Tooltip-C53p0sfk.js +0 -46
- package/chunks/clsx-CuNqTHjr.js +0 -11
- package/chunks/internationalized-C9snpc7V.js +0 -1955
- package/chunks/react-aria-components-mIKW9wOa.js +0 -22645
- package/chunks/react-stately-DRNKkAB0.js +0 -2586
- package/chunks/useLocalizedStringFormatter-CPwiI7nv.js +0 -25
- package/chunks/variables-BkqZ2WGF.js +0 -5
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { ListBoxItem as m, Popover as n, Header as B, ListBoxSection as l } from "react-aria-components";
|
|
3
|
+
import { c as a } from "./clsx-AexbMWKp.js";
|
|
4
|
+
import { s as i } from "./ListBox-D4tO_OrO.js";
|
|
5
|
+
const I = ({
|
|
6
|
+
children: t,
|
|
7
|
+
className: o,
|
|
8
|
+
textValue: s,
|
|
9
|
+
...r
|
|
10
|
+
}) => /* @__PURE__ */ e(
|
|
11
|
+
m,
|
|
12
|
+
{
|
|
13
|
+
className: a(i.listBoxItem, o),
|
|
14
|
+
textValue: s || (typeof t == "string" ? t : void 0),
|
|
15
|
+
...r,
|
|
16
|
+
children: (x) => /* @__PURE__ */ e("div", { className: i.textContent, children: typeof t == "function" ? t(x) : t })
|
|
17
|
+
}
|
|
18
|
+
), N = ({
|
|
19
|
+
className: t,
|
|
20
|
+
children: o,
|
|
21
|
+
...s
|
|
22
|
+
}) => /* @__PURE__ */ e(
|
|
23
|
+
n,
|
|
24
|
+
{
|
|
25
|
+
className: a(t, i.listBoxPopover),
|
|
26
|
+
offset: 0,
|
|
27
|
+
...s,
|
|
28
|
+
children: o
|
|
29
|
+
}
|
|
30
|
+
), p = ({ className: t, ...o }) => /* @__PURE__ */ e(
|
|
31
|
+
B,
|
|
32
|
+
{
|
|
33
|
+
className: a(i.listBoxSectionHeading, t),
|
|
34
|
+
...o
|
|
35
|
+
}
|
|
36
|
+
), S = ({
|
|
37
|
+
children: t,
|
|
38
|
+
name: o,
|
|
39
|
+
...s
|
|
40
|
+
}) => /* @__PURE__ */ c(l, { ...s, children: [
|
|
41
|
+
o && /* @__PURE__ */ e(p, { children: o }),
|
|
42
|
+
t
|
|
43
|
+
] });
|
|
44
|
+
export {
|
|
45
|
+
I as L,
|
|
46
|
+
N as a,
|
|
47
|
+
S as b,
|
|
48
|
+
p as c
|
|
49
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as c, jsxs as v } from "react/jsx-runtime";
|
|
2
|
-
import { c as o } from "./clsx-
|
|
3
|
-
import { u as i } from "./useLocalizedStringFormatter-
|
|
2
|
+
import { c as o } from "./clsx-AexbMWKp.js";
|
|
3
|
+
import { u as i } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
4
4
|
import '../assets/Logo.css';const m = "_container_191fy_1", p = "_noPadding_191fy_6", g = "_logo_191fy_10", f = "_primary_191fy_15", M = "_dark_191fy_23", Z = "_xSmall_191fy_31", _ = "_small_191fy_35", u = "_large_191fy_39", l = {
|
|
5
5
|
container: m,
|
|
6
6
|
noPadding: p,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "./clsx-AexbMWKp.js";
|
|
3
|
+
import { Popover as l, OverlayArrow as v } from "react-aria-components";
|
|
4
|
+
import '../assets/Popover.css';const n = "_popover_94l1i_1", m = "_arrow_94l1i_23", r = {
|
|
5
|
+
popover: n,
|
|
6
|
+
arrow: m
|
|
7
|
+
};
|
|
8
|
+
function d({
|
|
9
|
+
children: e,
|
|
10
|
+
className: s,
|
|
11
|
+
offset: p = 4,
|
|
12
|
+
hideArrow: a = !1,
|
|
13
|
+
...t
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ i(
|
|
16
|
+
l,
|
|
17
|
+
{
|
|
18
|
+
...t,
|
|
19
|
+
offset: p,
|
|
20
|
+
className: c(r.popover, s),
|
|
21
|
+
children: [
|
|
22
|
+
!a && /* @__PURE__ */ o(v, { className: r.arrow, children: /* @__PURE__ */ o(
|
|
23
|
+
"svg",
|
|
24
|
+
{
|
|
25
|
+
width: 8,
|
|
26
|
+
height: 8,
|
|
27
|
+
viewBox: "0 0 8 8",
|
|
28
|
+
children: /* @__PURE__ */ o("path", { d: "M0 0 L4 4 L8 0" })
|
|
29
|
+
}
|
|
30
|
+
) }),
|
|
31
|
+
e
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
d as P
|
|
38
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as a, jsxs as _, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { ProgressBar as d } from "react-aria-components";
|
|
3
|
+
import { L as c } from "./Label-D6WuwdAj.js";
|
|
4
|
+
import { c as l } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import '../assets/ProgressBar.css';const f = "_progressBar_ojm9j_1", N = "_label_ojm9j_9", g = "_value_ojm9j_14", p = "_bar_ojm9j_19", v = "_fill_ojm9j_29", e = {
|
|
6
|
+
progressBar: f,
|
|
7
|
+
label: N,
|
|
8
|
+
value: g,
|
|
9
|
+
bar: p,
|
|
10
|
+
fill: v
|
|
11
|
+
}, y = ({
|
|
12
|
+
label: r,
|
|
13
|
+
labelProps: s,
|
|
14
|
+
showValueLabel: o = !1,
|
|
15
|
+
...m
|
|
16
|
+
}) => /* @__PURE__ */ a(
|
|
17
|
+
d,
|
|
18
|
+
{
|
|
19
|
+
...m,
|
|
20
|
+
className: l(e.progressBar, m.className),
|
|
21
|
+
children: ({ percentage: t, valueText: i, isIndeterminate: n }) => /* @__PURE__ */ _(j, { children: [
|
|
22
|
+
r && /* @__PURE__ */ a(
|
|
23
|
+
c,
|
|
24
|
+
{
|
|
25
|
+
elementType: "span",
|
|
26
|
+
...s,
|
|
27
|
+
className: l(s?.className, e.label),
|
|
28
|
+
children: r
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
o && /* @__PURE__ */ a(
|
|
32
|
+
c,
|
|
33
|
+
{
|
|
34
|
+
elementType: "span",
|
|
35
|
+
...s,
|
|
36
|
+
id: r ? "" : s?.id,
|
|
37
|
+
className: l(s?.className, e.value),
|
|
38
|
+
children: i
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ a("div", { className: e.bar, children: /* @__PURE__ */ a(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: e.fill,
|
|
45
|
+
style: { width: `${n ? 50 : t}%` }
|
|
46
|
+
}
|
|
47
|
+
) })
|
|
48
|
+
] })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
export {
|
|
52
|
+
y as P
|
|
53
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { Radio as u, RadioGroup as _, Group as f } from "react-aria-components";
|
|
3
|
+
import { c as t } from "./clsx-AexbMWKp.js";
|
|
4
|
+
import { a as G, L as R } from "./Label-D6WuwdAj.js";
|
|
5
|
+
import { T as h } from "./Text-TWzJxnto.js";
|
|
6
|
+
import { F as p } from "./FieldError-C0HRIcAx.js";
|
|
7
|
+
import '../assets/Radio.css';const x = "_radioGroup_1q7p6_1", w = "_wrap_1q7p6_12", q = "_radio_1q7p6_1", i = {
|
|
8
|
+
radioGroup: x,
|
|
9
|
+
wrap: w,
|
|
10
|
+
radio: q
|
|
11
|
+
}, T = ({
|
|
12
|
+
label: o,
|
|
13
|
+
description: a,
|
|
14
|
+
errorMessage: d,
|
|
15
|
+
children: c,
|
|
16
|
+
className: e,
|
|
17
|
+
errorPosition: s = "top",
|
|
18
|
+
popover: m,
|
|
19
|
+
...l
|
|
20
|
+
}) => /* @__PURE__ */ n(
|
|
21
|
+
_,
|
|
22
|
+
{
|
|
23
|
+
...l,
|
|
24
|
+
className: t(i.radioGroup, e),
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ r(G, { popover: m, children: o && /* @__PURE__ */ r(R, { children: o }) }),
|
|
27
|
+
a && /* @__PURE__ */ r(h, { slot: "description", children: a }),
|
|
28
|
+
s === "top" && /* @__PURE__ */ r(p, { "data-testid": "fieldError", children: d }),
|
|
29
|
+
/* @__PURE__ */ r(f, { className: i.wrap, children: c }),
|
|
30
|
+
s === "bottom" && /* @__PURE__ */ r(p, { "data-testid": "fieldError", children: d })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
), $ = ({ className: o, ...a }) => /* @__PURE__ */ r(
|
|
34
|
+
u,
|
|
35
|
+
{
|
|
36
|
+
className: t(i.radio, o),
|
|
37
|
+
...a
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
export {
|
|
41
|
+
$ as R,
|
|
42
|
+
T as a
|
|
43
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { RangeCalendarContext as h, CalendarGrid as C, CalendarCell as g, Calendar as v, RangeCalendar as _ } from "react-aria-components";
|
|
3
|
+
import { c as p, a as l } from "./clsx-AexbMWKp.js";
|
|
4
|
+
import { F as c } from "./FieldError-C0HRIcAx.js";
|
|
5
|
+
import * as y from "react";
|
|
6
|
+
import { B as i } from "./Button-BMf7mX0N.js";
|
|
7
|
+
import { H as f } from "./Heading-D8tNNJkt.js";
|
|
8
|
+
import { c as R } from "./createLucideIcon-D4r5Phnh.js";
|
|
9
|
+
import { C as x } from "./chevron-right-GpyqdYK4.js";
|
|
10
|
+
import '../assets/RangeCalendar.css';const u = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], N = R("chevron-left", u), q = "_container_eq3gc_1", I = "_calendar_eq3gc_6", $ = "_day_eq3gc_28", G = "_header_eq3gc_92", H = "_range_eq3gc_159", r = {
|
|
11
|
+
container: q,
|
|
12
|
+
calendar: I,
|
|
13
|
+
day: $,
|
|
14
|
+
header: G,
|
|
15
|
+
range: H
|
|
16
|
+
}, s = ({
|
|
17
|
+
weekdayStyle: d = "short",
|
|
18
|
+
isReadOnly: n
|
|
19
|
+
}) => {
|
|
20
|
+
const a = !!y.useContext(h);
|
|
21
|
+
return /* @__PURE__ */ e(C, { weekdayStyle: d, children: (m) => /* @__PURE__ */ e(
|
|
22
|
+
g,
|
|
23
|
+
{
|
|
24
|
+
date: m,
|
|
25
|
+
className: p(r.day, a && r.range),
|
|
26
|
+
"data-readonly": n || void 0
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
29
|
+
}, t = ({
|
|
30
|
+
isDisabled: d,
|
|
31
|
+
isReadOnly: n
|
|
32
|
+
}) => /* @__PURE__ */ o("header", { className: r.header, children: [
|
|
33
|
+
/* @__PURE__ */ e(
|
|
34
|
+
i,
|
|
35
|
+
{
|
|
36
|
+
slot: "previous",
|
|
37
|
+
size: "medium",
|
|
38
|
+
"data-readonly": n || void 0,
|
|
39
|
+
children: /* @__PURE__ */ e(N, {})
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
f,
|
|
44
|
+
{
|
|
45
|
+
level: 3,
|
|
46
|
+
elementType: "h2",
|
|
47
|
+
"data-disabled": d || void 0
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
i,
|
|
52
|
+
{
|
|
53
|
+
slot: "next",
|
|
54
|
+
size: "medium",
|
|
55
|
+
"data-readonly": n || void 0,
|
|
56
|
+
children: /* @__PURE__ */ e(x, {})
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }), E = ({
|
|
60
|
+
className: d,
|
|
61
|
+
errorMessage: n,
|
|
62
|
+
...a
|
|
63
|
+
}) => /* @__PURE__ */ o("div", { className: r.container, children: [
|
|
64
|
+
/* @__PURE__ */ o(
|
|
65
|
+
v,
|
|
66
|
+
{
|
|
67
|
+
className: l(r.calendar, d),
|
|
68
|
+
"data-readonly": a.isReadOnly || void 0,
|
|
69
|
+
...a,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ e(t, { ...a }),
|
|
72
|
+
/* @__PURE__ */ e(s, { ...a })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ e(c, { isInvalid: a.isInvalid, children: n })
|
|
77
|
+
] }), O = ({
|
|
78
|
+
className: d,
|
|
79
|
+
errorMessage: n,
|
|
80
|
+
...a
|
|
81
|
+
}) => /* @__PURE__ */ o("div", { className: r.container, children: [
|
|
82
|
+
/* @__PURE__ */ o(
|
|
83
|
+
_,
|
|
84
|
+
{
|
|
85
|
+
className: l(r.calendar, d),
|
|
86
|
+
"data-readonly": a.isReadOnly || void 0,
|
|
87
|
+
...a,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ e(t, { ...a }),
|
|
90
|
+
/* @__PURE__ */ e(s, { ...a })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ e(c, { isInvalid: a.isInvalid, children: n })
|
|
95
|
+
] });
|
|
96
|
+
export {
|
|
97
|
+
E as C,
|
|
98
|
+
O as R
|
|
99
|
+
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsxs as u, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { s as
|
|
3
|
-
import { B as
|
|
4
|
-
import { c as l } from "./clsx-
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { c as
|
|
10
|
-
import { X as
|
|
11
|
-
import { u as
|
|
12
|
-
import '../assets/SearchField.css';const
|
|
2
|
+
import { s as N } from "./TextField.module-DZslrEPC.js";
|
|
3
|
+
import { B as _ } from "./Button-BMf7mX0N.js";
|
|
4
|
+
import { c as l } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import * as x from "react";
|
|
6
|
+
import { useSearchFieldState as j } from "react-stately";
|
|
7
|
+
import { useSearchField as C } from "react-aria";
|
|
8
|
+
import { F as f } from "./FieldError-C0HRIcAx.js";
|
|
9
|
+
import { c as p } from "./createLucideIcon-D4r5Phnh.js";
|
|
10
|
+
import { X as B } from "./x-BXShoIAM.js";
|
|
11
|
+
import { u as D } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
|
|
12
|
+
import '../assets/SearchField.css';const E = [
|
|
13
13
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
14
14
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
15
|
-
],
|
|
16
|
-
container:
|
|
17
|
-
inner:
|
|
18
|
-
inputContainer:
|
|
19
|
-
medium:
|
|
20
|
-
icon:
|
|
21
|
-
clear:
|
|
22
|
-
input:
|
|
23
|
-
},
|
|
24
|
-
en:
|
|
25
|
-
sv:
|
|
15
|
+
], k = p("search", E), P = "_container_basio_1", T = "_inner_basio_10", w = "_inputContainer_basio_15", I = "_medium_basio_21", K = "_icon_basio_26", L = "_clear_basio_39", M = "_input_basio_15", a = {
|
|
16
|
+
container: P,
|
|
17
|
+
inner: T,
|
|
18
|
+
inputContainer: w,
|
|
19
|
+
medium: I,
|
|
20
|
+
icon: K,
|
|
21
|
+
clear: L,
|
|
22
|
+
input: M
|
|
23
|
+
}, R = { search: "Search" }, V = { search: "Sök" }, O = {
|
|
24
|
+
en: R,
|
|
25
|
+
sv: V
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function X(r) {
|
|
28
28
|
return !!r?.length;
|
|
29
29
|
}
|
|
30
30
|
const Z = ({
|
|
@@ -32,7 +32,7 @@ const Z = ({
|
|
|
32
32
|
size: t = "large",
|
|
33
33
|
...e
|
|
34
34
|
}) => {
|
|
35
|
-
const { value: i, setValue: d } =
|
|
35
|
+
const { value: i, setValue: d } = j(e), v = D(O), m = x.useRef(null), { inputProps: o, isInvalid: s, validationErrors: h, clearButtonProps: S } = C(
|
|
36
36
|
{
|
|
37
37
|
...e,
|
|
38
38
|
label: e.placeholder,
|
|
@@ -40,14 +40,14 @@ const Z = ({
|
|
|
40
40
|
},
|
|
41
41
|
{ value: i, setValue: d },
|
|
42
42
|
m
|
|
43
|
-
),
|
|
44
|
-
if (e.validate &&
|
|
43
|
+
), g = ({ target: c }) => d(c.value), y = () => d(""), b = () => {
|
|
44
|
+
if (e.validate && X(e.validate(i)) || s || !i) {
|
|
45
45
|
m.current?.focus();
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
e.onSubmit && e.onSubmit(i);
|
|
49
|
-
},
|
|
50
|
-
c === "Enter" &&
|
|
49
|
+
}, F = ({ key: c }) => {
|
|
50
|
+
c === "Enter" && b();
|
|
51
51
|
};
|
|
52
52
|
return /* @__PURE__ */ u(
|
|
53
53
|
"div",
|
|
@@ -55,7 +55,7 @@ const Z = ({
|
|
|
55
55
|
className: l(a.container, e.className),
|
|
56
56
|
"data-disabled": o.disabled,
|
|
57
57
|
children: [
|
|
58
|
-
r === "top" && /* @__PURE__ */ n(
|
|
58
|
+
r === "top" && /* @__PURE__ */ n(f, { isInvalid: s, children: e.errorMessage ?? h.join(" ") }),
|
|
59
59
|
/* @__PURE__ */ u("div", { className: a.inner, children: [
|
|
60
60
|
/* @__PURE__ */ u(
|
|
61
61
|
"div",
|
|
@@ -65,7 +65,7 @@ const Z = ({
|
|
|
65
65
|
}),
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ n(
|
|
68
|
-
|
|
68
|
+
k,
|
|
69
69
|
{
|
|
70
70
|
size: 20,
|
|
71
71
|
className: a.icon
|
|
@@ -77,22 +77,22 @@ const Z = ({
|
|
|
77
77
|
...o,
|
|
78
78
|
...o.disabled && { "data-disabled": !0 },
|
|
79
79
|
className: l(
|
|
80
|
-
|
|
80
|
+
N.input,
|
|
81
81
|
a.input,
|
|
82
82
|
o.className,
|
|
83
83
|
{ [a.medium]: t === "medium" }
|
|
84
84
|
),
|
|
85
85
|
ref: m,
|
|
86
|
-
onChange:
|
|
86
|
+
onChange: g,
|
|
87
87
|
value: i,
|
|
88
88
|
"aria-invalid": s,
|
|
89
|
-
onKeyDown:
|
|
89
|
+
onKeyDown: F,
|
|
90
90
|
"aria-label": e.placeholder,
|
|
91
91
|
"aria-labelledby": ""
|
|
92
92
|
}
|
|
93
93
|
),
|
|
94
94
|
i.length > 0 && /* @__PURE__ */ n(
|
|
95
|
-
|
|
95
|
+
_,
|
|
96
96
|
{
|
|
97
97
|
variant: "icon",
|
|
98
98
|
size: t,
|
|
@@ -100,9 +100,9 @@ const Z = ({
|
|
|
100
100
|
[a.medium]: t === "medium"
|
|
101
101
|
}),
|
|
102
102
|
onPress: y,
|
|
103
|
-
...
|
|
103
|
+
...S,
|
|
104
104
|
children: /* @__PURE__ */ n(
|
|
105
|
-
|
|
105
|
+
B,
|
|
106
106
|
{
|
|
107
107
|
size: 20,
|
|
108
108
|
"aria-hidden": !0
|
|
@@ -114,18 +114,18 @@ const Z = ({
|
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
116
|
/* @__PURE__ */ n(
|
|
117
|
-
|
|
117
|
+
_,
|
|
118
118
|
{
|
|
119
119
|
size: t,
|
|
120
120
|
isDisabled: e.isDisabled,
|
|
121
121
|
excludeFromTabOrder: !0,
|
|
122
|
-
onPress:
|
|
122
|
+
onPress: b,
|
|
123
123
|
type: "button",
|
|
124
124
|
children: e.buttonText ? e.buttonText : v.format("search")
|
|
125
125
|
}
|
|
126
126
|
)
|
|
127
127
|
] }),
|
|
128
|
-
r === "bottom" && /* @__PURE__ */ n(
|
|
128
|
+
r === "bottom" && /* @__PURE__ */ n(f, { isInvalid: s, children: e.errorMessage ?? h.join(" ") })
|
|
129
129
|
]
|
|
130
130
|
}
|
|
131
131
|
);
|