@midas-ds/components 16.2.5 → 16.3.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 +16 -0
- package/accordion/index.js +1 -1
- package/assets/Select.css +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +1 -1
- package/character-counter/CharacterCounter.d.ts +1 -3
- package/character-counter/index.js +1 -1
- package/checkbox/Checkbox.d.ts +3 -2
- package/checkbox/CheckboxGroupItem.d.ts +1 -1
- package/checkbox/CheckboxInner.d.ts +1 -2
- package/checkbox/SingleCheckbox.d.ts +1 -1
- package/checkbox/index.js +2 -2
- package/checkbox/types.d.ts +0 -1
- package/chunks/{AccordionItem-BUUDZ7l6.js → AccordionItem-D6vWtoJN.js} +2 -2
- package/chunks/{Button-wBgWrXj3.js → Button-BYrLbzir.js} +1 -1
- package/chunks/CharacterCounter-R6vh7AE5.js +22 -0
- package/chunks/Checkbox-BTAfwDxU.js +130 -0
- package/chunks/{CheckboxGroup-A7UJMi5J.js → CheckboxGroup-C6LIpj_R.js} +4 -4
- package/chunks/{ColorSchemeSwitch-DugvPh6T.js → ColorSchemeSwitch-D-vCkxQo.js} +1 -1
- package/chunks/{ComboBox-yl5zHYPk.js → ComboBox-CzwpRxSH.js} +3 -3
- package/chunks/{DateField-BsT1K-bB.js → DateField-DPJrihTz.js} +2 -2
- package/chunks/{DateRangePicker-BsK7pMRv.js → DateRangePicker-DzgK_p0d.js} +3 -3
- package/chunks/{Dialog-DC0cGNj5.js → Dialog-DprWZBKT.js} +2 -2
- package/chunks/{FeedbackStatusIcon-COWuMusk.js → FeedbackStatusIcon-YJaUAfjp.js} +1 -1
- package/chunks/FieldError-Bra5aRT3.js +24 -0
- package/chunks/{InfoBanner-DLiVpNON.js → InfoBanner-BOKZ4lBE.js} +3 -3
- package/chunks/{Label-Dup4lWaR.js → Label-6SXmzRZE.js} +2 -2
- package/chunks/{Layout-DX3HUm5b.js → Layout-DveMXIKw.js} +3 -3
- package/chunks/{ListBoxLoadMoreItem-CB67meAb.js → ListBoxLoadMoreItem-CygpsU3W.js} +2 -2
- package/chunks/{Logo-InDSslpO.js → Logo-CsWcKqIg.js} +1 -1
- package/chunks/{ProgressBar-CbwvcHvk.js → ProgressBar-67lCngwJ.js} +1 -1
- package/chunks/{Radio-CSFYbin8.js → Radio-XQA8CylD.js} +2 -2
- package/chunks/{RangeCalendar-BF-6p7u2.js → RangeCalendar-Bt8q3FZi.js} +2 -2
- package/chunks/{SearchField-mBHZ9pFg.js → SearchField-CxoPi6Ql.js} +3 -3
- package/chunks/Select-BNCz_ox4.js +221 -0
- package/chunks/{Select-BjD5iQvX.js → Select-CyYUhMOg.js} +6 -6
- package/chunks/{Spinner-BORNnHph.js → Spinner-tvJ7rPiT.js} +1 -1
- package/chunks/{Table-t3rVzb31.js → Table-BgsgXhC_.js} +1 -1
- package/chunks/{Tag-DxBoeE_n.js → Tag-BKcduKRR.js} +1 -1
- package/chunks/TextArea-BM5wOL3b.js +137 -0
- package/chunks/{Toast-DTwUGSJ8.js → Toast-C-EV39pd.js} +2 -2
- package/chunks/useLocalizedStringFormatter-BHvsRxDk.js +25 -0
- 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/field-error/FieldError.d.ts +1 -3
- package/field-error/index.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +68 -66
- package/info-banner/index.js +1 -1
- package/label/index.js +1 -1
- package/layout/index.js +1 -1
- package/legacy-select/Select.d.ts +4 -2
- package/legacy-select/index.js +1 -1
- package/legacy-select/types.d.ts +1 -2
- package/list-box/index.js +1 -1
- package/logo/index.js +1 -1
- package/modal/index.js +1 -1
- package/package.json +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/MultiSelectValue.d.ts +4 -0
- package/select/SelectTrigger.d.ts +4 -2
- package/select/index.js +1 -1
- package/spinner/index.js +1 -1
- package/table/index.js +1 -1
- package/tag/index.js +1 -1
- package/textfield/Input.d.ts +1 -3
- package/textfield/PasswordField.d.ts +1 -1
- package/textfield/TextArea.d.ts +2 -5
- package/textfield/TextField.d.ts +2 -5
- package/textfield/TextFieldBase.d.ts +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.js +1 -1
- package/chunks/CharacterCounter-_m-SgTMV.js +0 -20
- package/chunks/Checkbox-gsEu5wcB.js +0 -119
- package/chunks/FieldError-Bc0acYNs.js +0 -21
- package/chunks/Select-Df4333VV.js +0 -208
- package/chunks/TextArea-B2BePnZz.js +0 -136
- package/chunks/useLocalizedStringFormatter-ZgRJmvHC.js +0 -25
- package/select/SelectValueTag.d.ts +0 -5
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { SelectStateContext as d, SelectValue as v, Button as h, TagList as V, Select as A } from "react-aria-components";
|
|
3
|
+
import { FocusScope as C } from "@react-aria/focus";
|
|
4
|
+
import { a as N, L as b } from "./Label-6SXmzRZE.js";
|
|
5
|
+
import { a as y, c as T } from "./clsx-AexbMWKp.js";
|
|
6
|
+
import { T as B } from "./Text-TWzJxnto.js";
|
|
7
|
+
import { F as g } from "./FieldError-Bra5aRT3.js";
|
|
8
|
+
import _, { useContext as p } from "react";
|
|
9
|
+
import { C as M } from "./Checkbox-BTAfwDxU.js";
|
|
10
|
+
import { u as m } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
11
|
+
import { useFocusManager as F } from "react-aria";
|
|
12
|
+
import { X as L } from "./x-BXShoIAM.js";
|
|
13
|
+
import { L as I } from "./ListBox-D5BBeZWL.js";
|
|
14
|
+
import { P as G } from "./Popover-BcEtFiU1.js";
|
|
15
|
+
import { a as j, T as k } from "./Tag-BKcduKRR.js";
|
|
16
|
+
import { C as R } from "./chevron-down-DgT-uSF9.js";
|
|
17
|
+
import '../assets/Select.css';const $ = { clearAll: "Clear all", selectAll: "Select all", selectedItems: "Selected items", selected: "selected" }, w = { clearAll: "Rensa alla", selectAll: "Välj alla", selectedItems: "Valda objekt", selected: "valda" }, u = {
|
|
18
|
+
en: $,
|
|
19
|
+
sv: w
|
|
20
|
+
}, P = "_select_vdvx3_1", z = "_triggerContainer_vdvx3_7", E = "_trigger_vdvx3_7", K = "_medium_vdvx3_29", D = "_selectValue_vdvx3_72", W = "_placeholder_vdvx3_78", X = "_multiSelectValue_vdvx3_88", q = "_selectValueTag_vdvx3_112", H = "_clearButton_vdvx3_126", J = "_truncate_vdvx3_138", O = "_popover_vdvx3_175", Q = "_selectAll_vdvx3_201", U = "_tagGroup_vdvx3_264", a = {
|
|
21
|
+
select: P,
|
|
22
|
+
triggerContainer: z,
|
|
23
|
+
trigger: E,
|
|
24
|
+
medium: K,
|
|
25
|
+
selectValue: D,
|
|
26
|
+
placeholder: W,
|
|
27
|
+
multiSelectValue: X,
|
|
28
|
+
selectValueTag: q,
|
|
29
|
+
clearButton: H,
|
|
30
|
+
truncate: J,
|
|
31
|
+
popover: O,
|
|
32
|
+
selectAll: Q,
|
|
33
|
+
tagGroup: U
|
|
34
|
+
}, Y = () => {
|
|
35
|
+
const t = _.useContext(d), c = m(u), r = () => t?.setValue(
|
|
36
|
+
t?.selectionManager.isSelectAll ? null : Array.from(t.collection.getKeys())
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ e(
|
|
39
|
+
M,
|
|
40
|
+
{
|
|
41
|
+
className: a.selectAll,
|
|
42
|
+
isIndeterminate: !t?.selectionManager.isSelectAll && !t?.selectionManager.isEmpty,
|
|
43
|
+
isSelected: t?.selectionManager.isSelectAll,
|
|
44
|
+
onChange: r,
|
|
45
|
+
children: c.format("selectAll")
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}, Z = ({
|
|
49
|
+
isDisabled: t
|
|
50
|
+
}) => {
|
|
51
|
+
const c = m(u), r = (l, o) => l.length === 1 ? o : `${l.length} ${c.format("selected")}`;
|
|
52
|
+
return /* @__PURE__ */ e(
|
|
53
|
+
v,
|
|
54
|
+
{
|
|
55
|
+
className: a.multiSelectValue,
|
|
56
|
+
"data-disabled": t || void 0,
|
|
57
|
+
children: ({ isPlaceholder: l, selectedItems: o, selectedText: s }) => l ? /* @__PURE__ */ e(S, {}) : /* @__PURE__ */ i(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: a.selectValueTag,
|
|
61
|
+
"data-disabled": t || void 0,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ e("span", { className: a.truncate, children: r(o, s) }),
|
|
64
|
+
/* @__PURE__ */ e(ee, { isDisabled: t })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}, ee = ({
|
|
71
|
+
isDisabled: t
|
|
72
|
+
}) => {
|
|
73
|
+
const c = _.useContext(d), r = m(u), l = F(), o = () => {
|
|
74
|
+
l?.focusFirst(), c?.setValue(null);
|
|
75
|
+
};
|
|
76
|
+
return /* @__PURE__ */ e(
|
|
77
|
+
h,
|
|
78
|
+
{
|
|
79
|
+
"aria-label": r.format("clearAll"),
|
|
80
|
+
className: a.clearButton,
|
|
81
|
+
onPress: o,
|
|
82
|
+
slot: null,
|
|
83
|
+
isDisabled: t,
|
|
84
|
+
children: /* @__PURE__ */ e(
|
|
85
|
+
L,
|
|
86
|
+
{
|
|
87
|
+
width: 20,
|
|
88
|
+
height: 20
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}, te = ({
|
|
94
|
+
showTags: t,
|
|
95
|
+
isDisabled: c
|
|
96
|
+
}) => {
|
|
97
|
+
const r = m(u), l = p(d), o = (s) => {
|
|
98
|
+
l?.selectionManager.toggleSelection(Array.from(s)[0]);
|
|
99
|
+
};
|
|
100
|
+
return !l?.selectedItems.length || !t ? null : /* @__PURE__ */ e(
|
|
101
|
+
j,
|
|
102
|
+
{
|
|
103
|
+
"aria-label": r.format("selectedItems"),
|
|
104
|
+
className: a.tagGroup,
|
|
105
|
+
onRemove: o,
|
|
106
|
+
selectionBehavior: "toggle",
|
|
107
|
+
children: /* @__PURE__ */ e(V, { items: l.selectedItems, children: (s) => /* @__PURE__ */ e(
|
|
108
|
+
k,
|
|
109
|
+
{
|
|
110
|
+
dismissable: !0,
|
|
111
|
+
id: s.key,
|
|
112
|
+
isDisabled: c,
|
|
113
|
+
textValue: s.textValue,
|
|
114
|
+
children: s.textValue
|
|
115
|
+
},
|
|
116
|
+
s.key
|
|
117
|
+
) })
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}, le = ({
|
|
121
|
+
isDisabled: t,
|
|
122
|
+
selectionMode: c,
|
|
123
|
+
size: r
|
|
124
|
+
}) => {
|
|
125
|
+
const l = p(d);
|
|
126
|
+
return /* @__PURE__ */ i(
|
|
127
|
+
h,
|
|
128
|
+
{
|
|
129
|
+
className: y(
|
|
130
|
+
{
|
|
131
|
+
[a.medium]: r === "medium"
|
|
132
|
+
},
|
|
133
|
+
a.trigger
|
|
134
|
+
),
|
|
135
|
+
"data-invalid": !!l?.displayValidation.isInvalid || void 0,
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ e(
|
|
138
|
+
v,
|
|
139
|
+
{
|
|
140
|
+
className: a.selectValue,
|
|
141
|
+
"data-disabled": t || void 0,
|
|
142
|
+
children: ({ selectedText: o, defaultChildren: s }) => /* @__PURE__ */ e("div", { className: a.placeholder, children: /* @__PURE__ */ e("span", { className: a.truncate, children: c === "multiple" && o ? null : o || s }) })
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
/* @__PURE__ */ e(
|
|
146
|
+
"span",
|
|
147
|
+
{
|
|
148
|
+
"aria-hidden": "true",
|
|
149
|
+
style: { display: "flex" },
|
|
150
|
+
children: /* @__PURE__ */ e(R, { size: 20 })
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
function xe({
|
|
158
|
+
children: t,
|
|
159
|
+
description: c,
|
|
160
|
+
errorMessage: r,
|
|
161
|
+
errorPosition: l = "top",
|
|
162
|
+
items: o,
|
|
163
|
+
label: s,
|
|
164
|
+
popover: f,
|
|
165
|
+
size: x = "large",
|
|
166
|
+
...n
|
|
167
|
+
}) {
|
|
168
|
+
return /* @__PURE__ */ e(C, { children: /* @__PURE__ */ i(
|
|
169
|
+
A,
|
|
170
|
+
{
|
|
171
|
+
...n,
|
|
172
|
+
className: T(n.className, a.select),
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ e(N, { popover: f, children: s && /* @__PURE__ */ e(b, { "data-disabled": n.isDisabled || void 0, children: s }) }),
|
|
175
|
+
c && /* @__PURE__ */ e(B, { slot: "description", children: c }),
|
|
176
|
+
l === "top" && /* @__PURE__ */ e(g, { children: r }),
|
|
177
|
+
/* @__PURE__ */ i(
|
|
178
|
+
"div",
|
|
179
|
+
{
|
|
180
|
+
className: a.triggerContainer,
|
|
181
|
+
"data-disabled": n.isDisabled || void 0,
|
|
182
|
+
children: [
|
|
183
|
+
/* @__PURE__ */ e(
|
|
184
|
+
le,
|
|
185
|
+
{
|
|
186
|
+
size: x,
|
|
187
|
+
...n
|
|
188
|
+
}
|
|
189
|
+
),
|
|
190
|
+
n.selectionMode === "multiple" ? /* @__PURE__ */ e(Z, { ...n }) : null
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
l === "bottom" && /* @__PURE__ */ e(g, { children: r }),
|
|
195
|
+
/* @__PURE__ */ i(
|
|
196
|
+
G,
|
|
197
|
+
{
|
|
198
|
+
className: a.popover,
|
|
199
|
+
offset: 0,
|
|
200
|
+
hideArrow: !0,
|
|
201
|
+
children: [
|
|
202
|
+
n.isSelectableAll && /* @__PURE__ */ e(Y, {}),
|
|
203
|
+
/* @__PURE__ */ e(
|
|
204
|
+
I,
|
|
205
|
+
{
|
|
206
|
+
escapeKeyBehavior: "none",
|
|
207
|
+
items: o,
|
|
208
|
+
children: t
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ e(te, { ...n })
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
) });
|
|
218
|
+
}
|
|
219
|
+
export {
|
|
220
|
+
xe as S
|
|
221
|
+
};
|
|
@@ -14,16 +14,16 @@ import { ListKeyboardDelegate as le, useTypeSelect as ne } from "@react-aria/sel
|
|
|
14
14
|
import { useMenuTriggerState as oe } 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
|
-
import { a as se, T as ae } from "./Tag-
|
|
17
|
+
import { a as se, T as ae } from "./Tag-BKcduKRR.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 me } from "./Label-
|
|
20
|
+
import { a as ue, L as me } from "./Label-6SXmzRZE.js";
|
|
21
21
|
import { T as ge } from "./Text-TWzJxnto.js";
|
|
22
|
-
import { C as fe } from "./Checkbox-
|
|
22
|
+
import { C as fe } from "./Checkbox-BTAfwDxU.js";
|
|
23
23
|
import { X as pe } from "./x-BXShoIAM.js";
|
|
24
|
-
import { u as B } from "./useLocalizedStringFormatter-
|
|
24
|
+
import { u as B } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
25
25
|
import { C as ye } from "./chevron-down-DgT-uSF9.js";
|
|
26
|
-
import { F as he } from "./FieldError-
|
|
26
|
+
import { F as he } from "./FieldError-Bra5aRT3.js";
|
|
27
27
|
import '../assets/Select2.css';const T = ({ item: e }) => /* @__PURE__ */ o(
|
|
28
28
|
X,
|
|
29
29
|
{
|
|
@@ -565,7 +565,7 @@ const Ve = "_wrapper_1nkrm_7", ke = "_trigger_1nkrm_18", Me = "_medium_1nkrm_32"
|
|
|
565
565
|
title: r.name,
|
|
566
566
|
children: (l) => /* @__PURE__ */ o(C, { textValue: l.textValue, children: l.name })
|
|
567
567
|
},
|
|
568
|
-
r.name
|
|
568
|
+
String(r.name)
|
|
569
569
|
) : /* @__PURE__ */ o(C, { textValue: r.textValue, children: r.name })
|
|
570
570
|
}
|
|
571
571
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { c as r } from "./clsx-AexbMWKp.js";
|
|
3
3
|
import { VisuallyHidden as c } from "react-aria";
|
|
4
|
-
import { u as l } from "./useLocalizedStringFormatter-
|
|
4
|
+
import { u as l } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
5
5
|
import { c as d } from "./createLucideIcon-D4r5Phnh.js";
|
|
6
6
|
import '../assets/Spinner.css';const m = "_container_1qexx_1", p = "_spinner_1qexx_5", g = "_large_1qexx_18", n = {
|
|
7
7
|
container: m,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import { Table as w, useTableOptions as u, TableHeader as g, Collection as p, Row as N, Button as k, Column as f, Cell as x, TableBody as T } from "react-aria-components";
|
|
3
|
-
import { C as h } from "./Checkbox-
|
|
3
|
+
import { C as h } from "./Checkbox-BTAfwDxU.js";
|
|
4
4
|
import { c as a } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { c as d } from "./createLucideIcon-D4r5Phnh.js";
|
|
6
6
|
import '../assets/Table.css';const C = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { Tag as c, TagGroup as _, TagList as e } from "react-aria-components";
|
|
3
|
-
import { B as g } from "./Button-
|
|
3
|
+
import { B as g } from "./Button-BYrLbzir.js";
|
|
4
4
|
import { c as u } from "./clsx-AexbMWKp.js";
|
|
5
5
|
import { X as l } from "./x-BXShoIAM.js";
|
|
6
6
|
import '../assets/Tag.css';const T = "_button_1nm6n_1", p = "_success_1nm6n_16", f = "_warning_1nm6n_17", d = "_info_1nm6n_18", x = "_important_1nm6n_19", b = "_tag_1nm6n_31", w = "_tagText_1nm6n_83", L = "_dismissable_1nm6n_88", N = "_tagList_1nm6n_92", s = {
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsxs as c, jsx as s, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l, useState as C } from "react";
|
|
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
|
+
import { a as A, c as h } from "./clsx-AexbMWKp.js";
|
|
5
|
+
import { s as d } from "./TextField.module-DZslrEPC.js";
|
|
6
|
+
import { T as w } from "./Text-TWzJxnto.js";
|
|
7
|
+
import { B } from "./Button-BYrLbzir.js";
|
|
8
|
+
import { u as L } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
9
|
+
import { F as u } from "./FieldError-Bra5aRT3.js";
|
|
10
|
+
import { C as E } from "./CharacterCounter-R6vh7AE5.js";
|
|
11
|
+
import { a as S, L as $ } from "./Label-6SXmzRZE.js";
|
|
12
|
+
const x = l(
|
|
13
|
+
(e, a) => {
|
|
14
|
+
[e] = p(e, a, b);
|
|
15
|
+
const {
|
|
16
|
+
label: r,
|
|
17
|
+
description: o,
|
|
18
|
+
errorMessage: i,
|
|
19
|
+
showCounter: n,
|
|
20
|
+
errorPosition: t = "top",
|
|
21
|
+
size: m = "large",
|
|
22
|
+
popover: N,
|
|
23
|
+
children: y
|
|
24
|
+
} = e;
|
|
25
|
+
return /* @__PURE__ */ c(
|
|
26
|
+
g,
|
|
27
|
+
{
|
|
28
|
+
...e,
|
|
29
|
+
className: A(d.textField, {
|
|
30
|
+
[d.medium]: m === "medium"
|
|
31
|
+
}),
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ s(S, { popover: N, children: r && /* @__PURE__ */ s($, { children: r }) }),
|
|
34
|
+
o && /* @__PURE__ */ s(w, { slot: "description", children: o }),
|
|
35
|
+
n && /* @__PURE__ */ s(E, { isLonely: !o }),
|
|
36
|
+
t === "top" && /* @__PURE__ */ s(u, { "data-testid": "fieldError", children: i }),
|
|
37
|
+
y,
|
|
38
|
+
t === "bottom" && /* @__PURE__ */ s(
|
|
39
|
+
u,
|
|
40
|
+
{
|
|
41
|
+
"data-testid": "fieldError",
|
|
42
|
+
className: d.bottomError,
|
|
43
|
+
children: i
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
x.displayName = "TextFieldBase";
|
|
52
|
+
const j = { hide: "Hide", show: "Show" }, z = { hide: "Dölj", show: "Visa" }, D = {
|
|
53
|
+
en: j,
|
|
54
|
+
sv: z
|
|
55
|
+
}, T = l(
|
|
56
|
+
(e, a) => {
|
|
57
|
+
[e, a] = p(e, a, f);
|
|
58
|
+
const [r, o] = C(!1), i = () => o((t) => !t), n = L(D);
|
|
59
|
+
return /* @__PURE__ */ c(P, { children: [
|
|
60
|
+
r && /* @__PURE__ */ s(
|
|
61
|
+
w,
|
|
62
|
+
{
|
|
63
|
+
slot: "description",
|
|
64
|
+
className: d.passwordText,
|
|
65
|
+
children: e.value
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ s(
|
|
69
|
+
B,
|
|
70
|
+
{
|
|
71
|
+
variant: "tertiary",
|
|
72
|
+
onPress: i,
|
|
73
|
+
className: d.passwordButton,
|
|
74
|
+
children: r ? n.format("hide") : n.format("show")
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] });
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
T.displayName = "PasswordField";
|
|
81
|
+
const F = l(
|
|
82
|
+
({ skipContext: e = !1, ...a }, r) => {
|
|
83
|
+
const [o, i] = p(
|
|
84
|
+
a,
|
|
85
|
+
r,
|
|
86
|
+
f
|
|
87
|
+
), n = e ? r : i, t = e ? a : o;
|
|
88
|
+
return /* @__PURE__ */ c("div", { className: d.wrap, children: [
|
|
89
|
+
/* @__PURE__ */ s(
|
|
90
|
+
I,
|
|
91
|
+
{
|
|
92
|
+
...t,
|
|
93
|
+
ref: n,
|
|
94
|
+
className: h(d.input, t.className)
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
t.type === "password" && /* @__PURE__ */ s(T, { ...t })
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
F.displayName = "Input";
|
|
102
|
+
const H = l(
|
|
103
|
+
({ className: e, list: a, type: r, min: o, max: i, form: n, ...t }, m) => /* @__PURE__ */ s(x, { ...t, children: /* @__PURE__ */ s(
|
|
104
|
+
F,
|
|
105
|
+
{
|
|
106
|
+
className: h(e),
|
|
107
|
+
form: n,
|
|
108
|
+
list: a,
|
|
109
|
+
min: o,
|
|
110
|
+
max: i,
|
|
111
|
+
ref: m,
|
|
112
|
+
type: r,
|
|
113
|
+
skipContext: !0
|
|
114
|
+
}
|
|
115
|
+
) })
|
|
116
|
+
);
|
|
117
|
+
H.displayName = "TextField";
|
|
118
|
+
const M = l(
|
|
119
|
+
({ className: e, cols: a, form: r, rows: o, wrap: i, ...n }, t) => /* @__PURE__ */ s(x, { ...n, children: /* @__PURE__ */ s(
|
|
120
|
+
v,
|
|
121
|
+
{
|
|
122
|
+
className: h(d.textArea, e),
|
|
123
|
+
cols: a,
|
|
124
|
+
form: r,
|
|
125
|
+
ref: t,
|
|
126
|
+
rows: o,
|
|
127
|
+
wrap: i
|
|
128
|
+
}
|
|
129
|
+
) })
|
|
130
|
+
);
|
|
131
|
+
M.displayName = "TextArea";
|
|
132
|
+
export {
|
|
133
|
+
F as I,
|
|
134
|
+
x as T,
|
|
135
|
+
H as a,
|
|
136
|
+
M as b
|
|
137
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as n, jsxs as c, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import { B as p } from "./Button-
|
|
2
|
+
import { B as p } from "./Button-BYrLbzir.js";
|
|
3
3
|
import { useToastRegion as g, useToast as h } from "react-aria";
|
|
4
4
|
import { ToastQueue as v, useToastQueue as R, useToastState as y } from "react-stately";
|
|
5
5
|
import l from "react";
|
|
6
6
|
import { createPortal as b, flushSync as w } from "react-dom";
|
|
7
7
|
import { c as d } from "./clsx-AexbMWKp.js";
|
|
8
|
-
import { F as P } from "./FeedbackStatusIcon-
|
|
8
|
+
import { F as P } from "./FeedbackStatusIcon-YJaUAfjp.js";
|
|
9
9
|
import { X as I } from "./x-BXShoIAM.js";
|
|
10
10
|
import '../assets/Toast.css';const N = "_toastRegion_1798d_49", E = "_toast_1798d_49", O = "_success_1798d_97", x = "_info_1798d_105", C = "_important_1798d_113", M = "_warning_1798d_121", S = "_icon_1798d_129", k = "_toastContent_1798d_143", B = "_toastMessage_1798d_150", F = "_slideInTop_1798d_1", Q = "_slideInEnd_1798d_1", V = "_slideOutTop_1798d_1", j = "_slideOutEnd_1798d_1", e = {
|
|
11
11
|
toastRegion: N,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LocalizedStringFormatter as c, LocalizedStringDictionary as a } from "@internationalized/string";
|
|
2
|
+
import { useMemo as u } from "react";
|
|
3
|
+
import { useLocale as l } from "react-aria-components";
|
|
4
|
+
const t = "sv", n = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
function d(e) {
|
|
6
|
+
let o = n.get(e);
|
|
7
|
+
return o || (o = new a(e, t), n.set(e, o)), o;
|
|
8
|
+
}
|
|
9
|
+
function f(e, o) {
|
|
10
|
+
return o && a.getGlobalDictionaryForPackage(o) || d(e);
|
|
11
|
+
}
|
|
12
|
+
function D(e, o) {
|
|
13
|
+
if (!e || typeof e != "object" || !(t in e))
|
|
14
|
+
throw new Error(
|
|
15
|
+
`useLocalizedStringFormatter: Default language "${t}" must be defined in dictionary.`
|
|
16
|
+
);
|
|
17
|
+
const { locale: r } = l(), i = f(e, o);
|
|
18
|
+
return u(
|
|
19
|
+
() => new c(r, i),
|
|
20
|
+
[i, r]
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
D as u
|
|
25
|
+
};
|
package/combobox/index.js
CHANGED
package/date-field/index.js
CHANGED
package/date-picker/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Ref } from 'react';
|
|
2
1
|
import { FieldErrorProps as AriaFieldErrorProps } from 'react-aria-components';
|
|
3
2
|
export interface FieldErrorProps extends AriaFieldErrorProps {
|
|
4
3
|
isInvalid?: boolean;
|
|
5
|
-
ref?: Ref<HTMLElement>;
|
|
6
4
|
}
|
|
7
|
-
export declare const FieldError: (
|
|
5
|
+
export declare const FieldError: import('react').ForwardRefExoticComponent<FieldErrorProps & import('react').RefAttributes<HTMLElement>>;
|
package/field-error/index.js
CHANGED
package/index.d.ts
CHANGED