@midas-ds/components 17.33.5 → 17.33.7
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 +12 -0
- package/accordion/index.js +1 -1
- package/assets/date-field.css +1 -1
- package/assets/date-picker.css +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/chunks/{Button.module-0C2ArlRs.js → Button.module-CXkKBjuB.js} +0 -1
- package/chunks/{FeedbackStatusIcon-DvMDGBGL.js → FeedbackStatusIcon-Ba31xgcy.js} +1 -2
- package/chunks/{TextField.module-Bg4LNalb.js → TextField.module-B-5HJOZt.js} +0 -1
- package/chunks/{accordion-DRXQI8XG.js → accordion-BKnABSyU.js} +4 -5
- package/chunks/{badge-C4bXJmhn.js → badge-C5Sdu_uw.js} +1 -2
- package/chunks/{breadcrumbs-BGnyY3bO.js → breadcrumbs-BwYDyKWo.js} +1 -2
- package/chunks/{button-dpe6hXmI.js → button-S2AY4EEn.js} +4 -5
- package/chunks/{calendar-Bq2qqFIW.js → calendar-BOTC3DKx.js} +26 -27
- package/chunks/{card-C0S9Kyi2.js → card-mIB1NewO.js} +3 -4
- package/chunks/{character-counter-CSoVSrxZ.js → character-counter-IbkPoEcq.js} +0 -1
- package/chunks/{checkbox-BGxv1TyT.js → checkbox-CzH8BdsB.js} +38 -40
- package/chunks/{clear-button-DWtOkhCH.js → clear-button-CeQy0RdK.js} +2 -3
- package/chunks/{clsx-DAqHMl_k.js → clsx-BtGY0yFD.js} +1 -2
- package/chunks/{color-scheme-switch-D7EpvqTW.js → color-scheme-switch-BpmV-r9p.js} +28 -29
- package/chunks/{combobox-f4uuMJcb.js → combobox-DQ3d6pLc.js} +16 -18
- package/chunks/date-field-CdlSlO7A.js +76 -0
- package/chunks/date-picker-IJI2Bxlx.js +144 -0
- package/chunks/{drop-zone-DNhEbH4w.js → drop-zone-BL3Z-Sbj.js} +1 -2
- package/chunks/{field-error-BHoPnRe4.js → field-error-C5ynuTRu.js} +2 -3
- package/chunks/{file-list-DT3zkJbO.js → file-list-etDe20pj.js} +9 -10
- package/chunks/{file-trigger-Dp5nH8oS.js → file-trigger-gOeeZzDP.js} +1 -2
- package/chunks/{grid-SIgkSK_-.js → grid-CFn_pqQX.js} +1 -2
- package/chunks/{heading-DcOjYrUM.js → heading-CIlMdywy.js} +1 -2
- package/chunks/{icons-UBHIX2oV.js → icons-a0WawN46.js} +1 -2
- package/chunks/{info-banner-DXjPEG69.js → info-banner-BKB7_CPh.js} +6 -7
- package/chunks/{label-2ac-zqbe.js → label-B5-Kmj4t.js} +8 -9
- package/chunks/{layout-BT-UgQne.js → layout-Cs8Oc8sf.js} +82 -83
- package/chunks/{link-B76JDA2N.js → link-CG_mHnLv.js} +2 -3
- package/chunks/{link-button-BeXxC22w.js → link-button-4xRbQqH2.js} +2 -3
- package/chunks/{list-box-BzBJX0nP.js → list-box-frfQGO1x.js} +5 -6
- package/chunks/{logo-DSJ1bUJZ.js → logo-Xe8PO0US.js} +2 -3
- package/chunks/{menu-DbQ98noD.js → menu-7gP2Sovj.js} +1 -2
- package/chunks/{modal-CzApHmjO.js → modal-BQrpnHT5.js} +15 -17
- package/chunks/{popover-B82BcP5n.js → popover-C7Ain5Qz.js} +1 -2
- package/chunks/{progress-bar-CJOm7oiN.js → progress-bar-DE7UoEWR.js} +9 -10
- package/chunks/{radio-DgFKSBa5.js → radio-DAB7WeIP.js} +17 -18
- package/chunks/{search-field-CpQnnJKa.js → search-field-BI1h0UBl.js} +23 -25
- package/chunks/{select-CdVW8cwA.js → select-BHpUGcW7.js} +38 -40
- package/chunks/{skeleton-R_3dS7Ro.js → skeleton-6y5HNJZp.js} +1 -2
- package/chunks/{spinner-CIjfJeGm.js → spinner-YKC-Vk3v.js} +2 -3
- package/chunks/{splitDataAttributes-_JTFOOIb.js → splitDataAttributes-ChyO_Kvc.js} +1 -2
- package/chunks/{stack-BAHKom_Q.js → stack-DKjRicm1.js} +1 -2
- package/chunks/{table-D02AQ0Xr.js → table-Fsf-jJip.js} +16 -17
- package/chunks/{tabs-CbcNTa7J.js → tabs-ZCpVhr_r.js} +2 -3
- package/chunks/{tag-BEawJnJm.js → tag-B1suqFhD.js} +2 -3
- package/chunks/{text-DnvD4Cjc.js → text-D7tnzTru.js} +1 -2
- package/chunks/textfield-C-lRIIil.js +110 -0
- package/chunks/time-field-nbvqWpzf.js +59 -0
- package/chunks/{toast-B8J42Yss.js → toast-DTqQhHFN.js} +13 -14
- package/chunks/{toggle-button-DD_bXanH.js → toggle-button-BVyG8F2K.js} +6 -7
- package/chunks/{tooltip-1GBTeMrm.js → tooltip-CR1uxtPd.js} +2 -4
- package/chunks/{useLocalizedStringFormatter-CeyBc0x0.js → useLocalizedStringFormatter-DhIAL1D7.js} +1 -2
- package/clear-button/index.js +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/drop-zone/index.js +1 -1
- package/field-error/index.js +1 -1
- package/file-list/index.js +1 -1
- package/file-trigger/index.js +1 -1
- package/grid/index.js +1 -1
- package/heading/index.js +1 -1
- package/icons/index.js +1 -1
- package/index.js +50 -52
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/link-button/index.js +1 -1
- package/list-box/index.js +1 -1
- package/logo/index.js +1 -1
- package/menu/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +1 -1
- 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/stack/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/time-field/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/date-field-BCfp9ZpN.js +0 -73
- package/chunks/date-picker-DH8j2eU9.js +0 -142
- package/chunks/textfield-CeFppAMx.js +0 -113
- package/chunks/time-field-H-mXlxua.js +0 -60
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
3
|
-
import { n as t } from "./button-dpe6hXmI.js";
|
|
4
|
-
import { n, t as r } from "./calendar-Bq2qqFIW.js";
|
|
5
|
-
import { n as i, t as a } from "./label-2ac-zqbe.js";
|
|
6
|
-
import { t as o } from "./text-DnvD4Cjc.js";
|
|
7
|
-
import { t as s } from "./field-error-BHoPnRe4.js";
|
|
8
|
-
import { t as c } from "./clear-button-DWtOkhCH.js";
|
|
9
|
-
import { n as l, r as u, t as d } from "./date-field-BCfp9ZpN.js";
|
|
10
|
-
import * as f from "react";
|
|
11
|
-
import { clsx as p } from "clsx";
|
|
12
|
-
import { DatePicker as m, DatePickerStateContext as h, DateRangePicker as g, DateRangePickerStateContext as _, Group as v, Popover as y } from "react-aria-components";
|
|
13
|
-
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
14
|
-
import { CalendarDays as S } from "lucide-react";
|
|
15
|
-
import { FocusScope as C, useFocusManager as w } from "react-aria";
|
|
16
|
-
import '../assets/date-picker.css';var T = {
|
|
17
|
-
en: {
|
|
18
|
-
clear: "Clear date",
|
|
19
|
-
"open-calendar": "Open calendar"
|
|
20
|
-
},
|
|
21
|
-
sv: {
|
|
22
|
-
clear: "Rensa datum",
|
|
23
|
-
"open-calendar": "Öppna kalender"
|
|
24
|
-
}
|
|
25
|
-
}, E = {
|
|
26
|
-
datePicker: "_datePicker_14wog_1",
|
|
27
|
-
inputField: "_inputField_14wog_8",
|
|
28
|
-
medium: "_medium_14wog_24",
|
|
29
|
-
readOnly: "_readOnly_14wog_47",
|
|
30
|
-
buttonGroup: "_buttonGroup_14wog_52",
|
|
31
|
-
iconButton: "_iconButton_14wog_58",
|
|
32
|
-
popover: "_popover_14wog_81 _dropdownAnimation_1ljkv_4"
|
|
33
|
-
}, D = (e) => !!e && !!e.value && Object.prototype.hasOwnProperty.call(e.value, "start"), O = ({ isClearable: t, isDisabled: n, isReadOnly: r, size: i }) => {
|
|
34
|
-
let a = f.useContext(h), o = f.useContext(_), s = e(T), l = w(), u = o ?? a, d = D(u) ? !!u.value.start && u.value.end : !!u?.value;
|
|
35
|
-
return t && d && !r ? /* @__PURE__ */ b(c, {
|
|
36
|
-
onPress: () => {
|
|
37
|
-
u?.setValue(null), l?.focusFirst();
|
|
38
|
-
},
|
|
39
|
-
size: i,
|
|
40
|
-
isDisabled: n,
|
|
41
|
-
"aria-label": s.format("clear"),
|
|
42
|
-
className: p(E.iconButton, { [E.medium]: i === "medium" })
|
|
43
|
-
}) : null;
|
|
44
|
-
}, k = ({ children: n, isDisabled: r, isInvalid: i, isReadOnly: a, size: o = "large", isClearable: s = !1 }) => {
|
|
45
|
-
let c = e(T);
|
|
46
|
-
return /* @__PURE__ */ b(v, {
|
|
47
|
-
className: p(E.inputField, {
|
|
48
|
-
[E.medium]: o === "medium",
|
|
49
|
-
[E.readOnly]: a
|
|
50
|
-
}),
|
|
51
|
-
children: /* @__PURE__ */ x(C, { children: [n, /* @__PURE__ */ x("div", {
|
|
52
|
-
className: E.buttonGroup,
|
|
53
|
-
children: [/* @__PURE__ */ b(O, {
|
|
54
|
-
isClearable: s,
|
|
55
|
-
isDisabled: r,
|
|
56
|
-
isReadOnly: a,
|
|
57
|
-
size: o
|
|
58
|
-
}), /* @__PURE__ */ b(t, {
|
|
59
|
-
variant: "icon",
|
|
60
|
-
"aria-label": c.format("open-calendar"),
|
|
61
|
-
className: p(E.iconButton, {
|
|
62
|
-
[E.medium]: o === "medium",
|
|
63
|
-
[E.readOnly]: a
|
|
64
|
-
}),
|
|
65
|
-
"data-invalid": i || void 0,
|
|
66
|
-
size: o,
|
|
67
|
-
children: /* @__PURE__ */ b(S, {
|
|
68
|
-
"aria-hidden": !0,
|
|
69
|
-
size: 20
|
|
70
|
-
})
|
|
71
|
-
})]
|
|
72
|
-
})] })
|
|
73
|
-
});
|
|
74
|
-
}, A = ({ children: e }) => /* @__PURE__ */ b(y, {
|
|
75
|
-
className: E.popover,
|
|
76
|
-
children: e
|
|
77
|
-
}), j = f.forwardRef(({ className: e, description: t, errorMessage: r, errorPosition: c = "top", label: d, popover: f, isClearable: h = !1, isReadOnly: g, isDisabled: _, size: v, ...y }, S) => /* @__PURE__ */ x(m, {
|
|
78
|
-
className: p(E.datePicker, e),
|
|
79
|
-
isReadOnly: g,
|
|
80
|
-
isDisabled: _,
|
|
81
|
-
ref: S,
|
|
82
|
-
...y,
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ b(i, {
|
|
85
|
-
popover: f,
|
|
86
|
-
children: d && /* @__PURE__ */ b(a, { children: d })
|
|
87
|
-
}),
|
|
88
|
-
t && /* @__PURE__ */ b(o, {
|
|
89
|
-
slot: "description",
|
|
90
|
-
children: t
|
|
91
|
-
}),
|
|
92
|
-
c === "top" && /* @__PURE__ */ b(s, { children: r }),
|
|
93
|
-
/* @__PURE__ */ b(k, {
|
|
94
|
-
isClearable: h,
|
|
95
|
-
isReadOnly: g,
|
|
96
|
-
isDisabled: _,
|
|
97
|
-
size: v,
|
|
98
|
-
...y,
|
|
99
|
-
children: /* @__PURE__ */ b(l, { children: (e) => /* @__PURE__ */ b(u, { segment: e }) })
|
|
100
|
-
}),
|
|
101
|
-
c === "bottom" && /* @__PURE__ */ b(s, { children: r }),
|
|
102
|
-
/* @__PURE__ */ b(A, { children: /* @__PURE__ */ b(n, {}) })
|
|
103
|
-
]
|
|
104
|
-
})), M = ({ className: e, description: t, errorMessage: n, errorPosition: c = "top", label: f, popover: m, isClearable: h = !1, isReadOnly: _, isDisabled: v, size: y, ...S }) => /* @__PURE__ */ x(g, {
|
|
105
|
-
className: p(E.datePicker, e),
|
|
106
|
-
isReadOnly: _,
|
|
107
|
-
isDisabled: v,
|
|
108
|
-
...S,
|
|
109
|
-
children: [
|
|
110
|
-
/* @__PURE__ */ b(i, {
|
|
111
|
-
popover: m,
|
|
112
|
-
children: f && /* @__PURE__ */ b(a, { children: f })
|
|
113
|
-
}),
|
|
114
|
-
t && /* @__PURE__ */ b(o, {
|
|
115
|
-
slot: "description",
|
|
116
|
-
children: t
|
|
117
|
-
}),
|
|
118
|
-
c === "top" && /* @__PURE__ */ b(s, { children: n }),
|
|
119
|
-
/* @__PURE__ */ x(k, {
|
|
120
|
-
isClearable: h,
|
|
121
|
-
isReadOnly: _,
|
|
122
|
-
isDisabled: v,
|
|
123
|
-
size: y,
|
|
124
|
-
...S,
|
|
125
|
-
children: [
|
|
126
|
-
/* @__PURE__ */ b(l, {
|
|
127
|
-
slot: "start",
|
|
128
|
-
children: (e) => /* @__PURE__ */ b(u, { segment: e })
|
|
129
|
-
}),
|
|
130
|
-
/* @__PURE__ */ b(d, {}),
|
|
131
|
-
/* @__PURE__ */ b(l, {
|
|
132
|
-
slot: "end",
|
|
133
|
-
children: (e) => /* @__PURE__ */ b(u, { segment: e })
|
|
134
|
-
})
|
|
135
|
-
]
|
|
136
|
-
}),
|
|
137
|
-
c === "bottom" && /* @__PURE__ */ b(s, { children: n }),
|
|
138
|
-
/* @__PURE__ */ b(A, { children: /* @__PURE__ */ b(r, {}) })
|
|
139
|
-
]
|
|
140
|
-
});
|
|
141
|
-
//#endregion
|
|
142
|
-
export { j as n, M as t };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-DAqHMl_k.js";
|
|
3
|
-
import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
4
|
-
import { n } from "./button-dpe6hXmI.js";
|
|
5
|
-
import { n as r, t as i } from "./label-2ac-zqbe.js";
|
|
6
|
-
import { t as a } from "./text-DnvD4Cjc.js";
|
|
7
|
-
import { t as o } from "./field-error-BHoPnRe4.js";
|
|
8
|
-
import { t as s } from "./character-counter-CSoVSrxZ.js";
|
|
9
|
-
import { t as c } from "./TextField.module-Bg4LNalb.js";
|
|
10
|
-
import { forwardRef as l, useState as u } from "react";
|
|
11
|
-
import { clsx as d } from "clsx";
|
|
12
|
-
import { Input as f, InputContext as p, TextArea as m, TextField as h, TextFieldContext as g, useContextProps as _ } from "react-aria-components";
|
|
13
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
14
|
-
//#region src/textfield/TextFieldBase.tsx
|
|
15
|
-
var b = l((e, t) => {
|
|
16
|
-
[e] = _(e, t, g);
|
|
17
|
-
let { label: n, description: l, errorMessage: u, showCounter: f, errorPosition: p = "top", size: m = "large", popover: b, children: x } = e;
|
|
18
|
-
return /* @__PURE__ */ y(h, {
|
|
19
|
-
...e,
|
|
20
|
-
className: d(c.textField, { [c.medium]: m === "medium" }),
|
|
21
|
-
children: [
|
|
22
|
-
/* @__PURE__ */ v(r, {
|
|
23
|
-
popover: b,
|
|
24
|
-
children: n && /* @__PURE__ */ v(i, { children: n })
|
|
25
|
-
}),
|
|
26
|
-
l && /* @__PURE__ */ v(a, {
|
|
27
|
-
slot: "description",
|
|
28
|
-
children: l
|
|
29
|
-
}),
|
|
30
|
-
f && /* @__PURE__ */ v(s, { isLonely: !l }),
|
|
31
|
-
p === "top" && /* @__PURE__ */ v(o, {
|
|
32
|
-
"data-testid": "fieldError",
|
|
33
|
-
children: u
|
|
34
|
-
}),
|
|
35
|
-
x,
|
|
36
|
-
p === "bottom" && /* @__PURE__ */ v(o, {
|
|
37
|
-
"data-testid": "fieldError",
|
|
38
|
-
className: c.bottomError,
|
|
39
|
-
children: u
|
|
40
|
-
})
|
|
41
|
-
]
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
b.displayName = "TextFieldBase";
|
|
45
|
-
var x = {
|
|
46
|
-
en: {
|
|
47
|
-
hide: "Hide",
|
|
48
|
-
show: "Show",
|
|
49
|
-
showPassword: "Show password"
|
|
50
|
-
},
|
|
51
|
-
sv: {
|
|
52
|
-
hide: "Dölj",
|
|
53
|
-
show: "Visa",
|
|
54
|
-
showPassword: "Visa lösenord"
|
|
55
|
-
}
|
|
56
|
-
}, S = ({ showPassword: e, onToggle: r }) => {
|
|
57
|
-
let i = t(x);
|
|
58
|
-
return /* @__PURE__ */ v(n, {
|
|
59
|
-
"aria-label": i.format("showPassword"),
|
|
60
|
-
"aria-pressed": e,
|
|
61
|
-
variant: "tertiary",
|
|
62
|
-
onPress: r,
|
|
63
|
-
className: c.passwordButton,
|
|
64
|
-
children: e ? i.format("hide") : i.format("show")
|
|
65
|
-
});
|
|
66
|
-
}, C = l(({ skipContext: t = !1, ...n }, r) => {
|
|
67
|
-
let [i, a] = _(n, r, p), o = t ? r : a, s = t ? n : i, l = s.type === "password", [d, m] = u(!1);
|
|
68
|
-
return /* @__PURE__ */ y("div", {
|
|
69
|
-
className: c.wrap,
|
|
70
|
-
children: [/* @__PURE__ */ v(f, {
|
|
71
|
-
...s,
|
|
72
|
-
ref: o,
|
|
73
|
-
type: l && d ? "text" : s.type,
|
|
74
|
-
className: e(c.input, s.className)
|
|
75
|
-
}), l && /* @__PURE__ */ v(S, {
|
|
76
|
-
showPassword: d,
|
|
77
|
-
onToggle: () => m((e) => !e)
|
|
78
|
-
})]
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
C.displayName = "Input";
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region src/textfield/TextField.tsx
|
|
84
|
-
var w = l(({ className: t, list: n, type: r, min: i, max: a, form: o, ...s }, c) => /* @__PURE__ */ v(b, {
|
|
85
|
-
...s,
|
|
86
|
-
children: /* @__PURE__ */ v(C, {
|
|
87
|
-
className: e(t),
|
|
88
|
-
form: o,
|
|
89
|
-
list: n,
|
|
90
|
-
min: i,
|
|
91
|
-
max: a,
|
|
92
|
-
ref: c,
|
|
93
|
-
type: r,
|
|
94
|
-
skipContext: !0
|
|
95
|
-
})
|
|
96
|
-
}));
|
|
97
|
-
w.displayName = "TextField";
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region src/textfield/TextArea.tsx
|
|
100
|
-
var T = l(({ className: t, cols: n, form: r, rows: i, wrap: a, ...o }, s) => /* @__PURE__ */ v(b, {
|
|
101
|
-
...o,
|
|
102
|
-
children: /* @__PURE__ */ v(m, {
|
|
103
|
-
className: e(c.textArea, t),
|
|
104
|
-
cols: n,
|
|
105
|
-
form: r,
|
|
106
|
-
ref: s,
|
|
107
|
-
rows: i,
|
|
108
|
-
wrap: a
|
|
109
|
-
})
|
|
110
|
-
}));
|
|
111
|
-
T.displayName = "TextArea";
|
|
112
|
-
//#endregion
|
|
113
|
-
export { b as i, w as n, C as r, T as t };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-DAqHMl_k.js";
|
|
2
|
-
import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
|
|
3
|
-
import { n, t as r } from "./label-2ac-zqbe.js";
|
|
4
|
-
import { t as i } from "./text-DnvD4Cjc.js";
|
|
5
|
-
import { t as a } from "./field-error-BHoPnRe4.js";
|
|
6
|
-
import { t as o } from "./clear-button-DWtOkhCH.js";
|
|
7
|
-
import { n as s, r as c } from "./date-field-BCfp9ZpN.js";
|
|
8
|
-
import * as l from "react";
|
|
9
|
-
import { TimeField as u, TimeFieldStateContext as d } from "react-aria-components";
|
|
10
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
-
import { FocusScope as m, useFocusManager as h } from "react-aria";
|
|
12
|
-
import '../assets/time-field.css';var g = {
|
|
13
|
-
en: { clear: "Clear time" },
|
|
14
|
-
sv: { clear: "Rensa tid" }
|
|
15
|
-
}, _ = {
|
|
16
|
-
timeField: "_timeField_1evr6_1",
|
|
17
|
-
inputField: "_inputField_1evr6_7",
|
|
18
|
-
medium: "_medium_1evr6_41",
|
|
19
|
-
clearButton: "_clearButton_1evr6_50"
|
|
20
|
-
}, v = ({ isClearable: n, size: r, isDisabled: i, isReadOnly: a }) => {
|
|
21
|
-
let s = t(g), c = l.useContext(d), u = h();
|
|
22
|
-
return n && c?.value != null && !a ? /* @__PURE__ */ f(o, {
|
|
23
|
-
onPress: () => {
|
|
24
|
-
c?.setValue(null), u?.focusFirst();
|
|
25
|
-
},
|
|
26
|
-
size: r,
|
|
27
|
-
isDisabled: i,
|
|
28
|
-
"aria-label": s.format("clear"),
|
|
29
|
-
className: e(_.clearButton, { [_.medium]: r === "medium" })
|
|
30
|
-
}) : null;
|
|
31
|
-
}, y = l.forwardRef(({ className: t, description: o, errorMessage: l, errorPosition: d = "top", label: h, size: g = "large", popover: y, isClearable: b = !1, isReadOnly: x, isDisabled: S, ...C }, w) => /* @__PURE__ */ p(u, {
|
|
32
|
-
...C,
|
|
33
|
-
ref: w,
|
|
34
|
-
isReadOnly: x,
|
|
35
|
-
isDisabled: S,
|
|
36
|
-
className: e(_.timeField, t),
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ f(n, {
|
|
39
|
-
popover: y,
|
|
40
|
-
children: h && /* @__PURE__ */ f(r, { children: h })
|
|
41
|
-
}),
|
|
42
|
-
o && /* @__PURE__ */ f(i, {
|
|
43
|
-
slot: "description",
|
|
44
|
-
children: o
|
|
45
|
-
}),
|
|
46
|
-
d === "top" && /* @__PURE__ */ f(a, { children: l }),
|
|
47
|
-
/* @__PURE__ */ f("div", {
|
|
48
|
-
className: e(_.inputField, { [_.medium]: g === "medium" }),
|
|
49
|
-
children: /* @__PURE__ */ p(m, { children: [/* @__PURE__ */ f(s, { children: (e) => /* @__PURE__ */ f(c, { segment: e }) }), /* @__PURE__ */ f(v, {
|
|
50
|
-
isClearable: b,
|
|
51
|
-
size: g,
|
|
52
|
-
isDisabled: S,
|
|
53
|
-
isReadOnly: x
|
|
54
|
-
})] })
|
|
55
|
-
}),
|
|
56
|
-
d === "bottom" && /* @__PURE__ */ f(a, { children: l })
|
|
57
|
-
]
|
|
58
|
-
}));
|
|
59
|
-
//#endregion
|
|
60
|
-
export { y as t };
|