@webstrail/ui-library 1.0.0 → 1.0.2
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/README.md +524 -519
- package/dist/UIProvider-C3ae0nQV.cjs +2 -0
- package/dist/UIProvider-C3ae0nQV.cjs.map +1 -0
- package/dist/UIProvider-CHECrDaZ.js +466 -0
- package/dist/UIProvider-CHECrDaZ.js.map +1 -0
- package/dist/core/config/globalConfig.d.ts +54 -0
- package/dist/core/config/index.d.ts +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/theme/defaultTheme.d.ts +7 -0
- package/dist/core/theme/deriveTokens.d.ts +16 -0
- package/dist/core/theme/index.d.ts +2 -0
- package/dist/core/types/common.d.ts +32 -0
- package/dist/core/types/config.d.ts +70 -0
- package/dist/core/types/index.d.ts +3 -0
- package/dist/core/types/tokens.d.ts +65 -0
- package/dist/core/utils/styles.d.ts +19 -0
- package/dist/core.cjs +2 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.js +344 -0
- package/dist/core.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +817 -1248
- package/dist/index.js.map +1 -1
- package/dist/react/components/Button/Button.d.ts +2 -0
- package/dist/react/components/Button/Button.types.d.ts +52 -0
- package/dist/react/components/Button/index.d.ts +2 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react.cjs +2 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.js +9 -0
- package/dist/react.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/web-components/button/button.element.d.ts +59 -0
- package/dist/web-components/button/button.styles.d.ts +1 -0
- package/dist/web-components/button/button.types.d.ts +21 -0
- package/dist/web-components/button/index.d.ts +3 -0
- package/dist/web-components/index.d.ts +1 -0
- package/dist/web-components.cjs +269 -0
- package/dist/web-components.cjs.map +1 -0
- package/dist/web-components.js +503 -0
- package/dist/web-components.js.map +1 -0
- package/package.json +120 -104
package/dist/index.js
CHANGED
|
@@ -1,916 +1,505 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { camelToKebab as zi, configureWebstrail as Fi, defaultButtonStyles as Ai, defaultColors as Oi, defaultLayout as Ri, defaultResolvedConfig as Mi, defaultTypography as Vi, getWebstrailConfig as Di, normalizeButtonSize as ji, normalizeDimension as Gi, resetWebstrailConfig as Hi, resolveEffectiveButtonConfig as Ui, subscribeWebstrailConfig as Pi } from "./core.js";
|
|
2
|
+
import { u as pn } from "./UIProvider-CHECrDaZ.js";
|
|
3
|
+
import { B as Zi, U as Ji, a as Qi, d as Xi, c as Yi, e as mi, g as yi, f as li, h as Ni, m as Si, r as Ci, s as si, b as nr } from "./UIProvider-CHECrDaZ.js";
|
|
4
|
+
import { jsxs as q, jsx as c } from "react/jsx-runtime";
|
|
5
|
+
import { forwardRef as on, useId as fn, useRef as tn, useState as N, useImperativeHandle as bn, useEffect as wn, createContext as Bn, useContext as qn } from "react";
|
|
6
|
+
import { WbButton as ir, buttonStyles as rr, registerWbButton as cr } from "./web-components.js";
|
|
7
|
+
const En = "_container_106aw_1", Tn = "_floatingContainer_106aw_15", zn = "_label_106aw_23", Fn = "_requiredAsterisk_106aw_43", An = "_outerWrapper_106aw_55", On = "_inputWrapper_106aw_69", Rn = "_outerIconBox_106aw_77", Mn = "_hasError_106aw_135", Vn = "_disabled_106aw_143", Dn = "_withFloatingLabel_106aw_185", jn = "_floatingLabel_106aw_241", Gn = "_floatingLabelText_106aw_285", Hn = "_withStartIcon_106aw_327", Un = "_floated_106aw_335", Pn = "_input_106aw_69", Kn = "_floatingInput_106aw_437", Zn = "_withEndIcon_106aw_477", Jn = "_startIcon_106aw_485", Qn = "_endIcon_106aw_487", Xn = "_helperText_106aw_507", Yn = "_errorMessage_106aw_519", f = {
|
|
8
|
+
container: En,
|
|
9
|
+
floatingContainer: Tn,
|
|
10
|
+
label: zn,
|
|
11
|
+
requiredAsterisk: Fn,
|
|
12
|
+
outerWrapper: An,
|
|
13
|
+
inputWrapper: On,
|
|
14
|
+
outerIconBox: Rn,
|
|
15
|
+
hasError: Mn,
|
|
16
|
+
disabled: Vn,
|
|
17
|
+
withFloatingLabel: Dn,
|
|
18
|
+
floatingLabel: jn,
|
|
19
|
+
floatingLabelText: Gn,
|
|
20
|
+
withStartIcon: Hn,
|
|
21
|
+
floated: Un,
|
|
22
|
+
input: Pn,
|
|
23
|
+
floatingInput: Kn,
|
|
24
|
+
withEndIcon: Zn,
|
|
25
|
+
startIcon: Jn,
|
|
26
|
+
endIcon: Qn,
|
|
27
|
+
helperText: Xn,
|
|
28
|
+
errorMessage: Yn
|
|
18
29
|
};
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
for (const
|
|
22
|
-
if (
|
|
23
|
-
if (typeof
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
} else if (Array.isArray(
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
+
function d(...rn) {
|
|
31
|
+
const k = [];
|
|
32
|
+
for (const t of rn)
|
|
33
|
+
if (t) {
|
|
34
|
+
if (typeof t == "string" || typeof t == "number") {
|
|
35
|
+
const x = String(t).trim();
|
|
36
|
+
x && k.push(x);
|
|
37
|
+
} else if (Array.isArray(t)) {
|
|
38
|
+
if (t.length > 0) {
|
|
39
|
+
const x = d(...t);
|
|
40
|
+
x && k.push(x);
|
|
30
41
|
}
|
|
31
|
-
} else if (typeof
|
|
32
|
-
for (const [
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
|
|
42
|
+
} else if (typeof t == "object") {
|
|
43
|
+
for (const [x, I] of Object.entries(t))
|
|
44
|
+
if (I) {
|
|
45
|
+
const h = x.trim();
|
|
46
|
+
h && k.push(h);
|
|
36
47
|
}
|
|
37
48
|
}
|
|
38
49
|
}
|
|
39
|
-
return
|
|
50
|
+
return k.join(" ");
|
|
40
51
|
}
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
textColor: "#ffffff",
|
|
77
|
-
borderColor: "transparent",
|
|
78
|
-
hoverBackgroundColor: "#1d78c4",
|
|
79
|
-
hoverTextColor: "#ffffff",
|
|
80
|
-
activeBackgroundColor: "#1565a0",
|
|
81
|
-
disabledBackgroundColor: "#f3f4f6",
|
|
82
|
-
disabledTextColor: "#9ca3af",
|
|
83
|
-
disabledBorderColor: "#e5e7eb",
|
|
84
|
-
focusRingColor: "rgba(36, 145, 235, 0.35)",
|
|
85
|
-
padding: "0 16px",
|
|
86
|
-
transition: "all 0.15s ease-in-out"
|
|
87
|
-
},
|
|
88
|
-
input: {
|
|
89
|
-
height: "42px",
|
|
90
|
-
borderRadius: "8px",
|
|
91
|
-
borderColor: "#d1d5db",
|
|
92
|
-
textColor: "#1f2937",
|
|
93
|
-
placeholderColor: "#9ca3af",
|
|
94
|
-
backgroundColor: "#ffffff",
|
|
95
|
-
focusBorderColor: "#2491eb",
|
|
96
|
-
focusRingColor: "rgba(36, 145, 235, 0.25)",
|
|
97
|
-
errorBorderColor: "#dc2626",
|
|
98
|
-
disabledBackgroundColor: "#f3f4f6",
|
|
99
|
-
disabledTextColor: "#9ca3af",
|
|
100
|
-
disabledBorderColor: "#e5e7eb",
|
|
101
|
-
labelColor: "#374151",
|
|
102
|
-
helperColor: "#6b7280",
|
|
103
|
-
errorColor: "#dc2626",
|
|
104
|
-
fontSize: "14px",
|
|
105
|
-
padding: "0 14px",
|
|
106
|
-
floatingLabel: !0
|
|
107
|
-
},
|
|
108
|
-
select: {
|
|
109
|
-
height: "42px",
|
|
110
|
-
borderRadius: "8px",
|
|
111
|
-
borderColor: "#d1d5db",
|
|
112
|
-
textColor: "#1f2937",
|
|
113
|
-
placeholderColor: "#9ca3af",
|
|
114
|
-
backgroundColor: "#ffffff",
|
|
115
|
-
focusBorderColor: "#2491eb",
|
|
116
|
-
focusRingColor: "rgba(36, 145, 235, 0.25)",
|
|
117
|
-
errorBorderColor: "#dc2626",
|
|
118
|
-
disabledBackgroundColor: "#f3f4f6",
|
|
119
|
-
disabledTextColor: "#9ca3af",
|
|
120
|
-
dropdownBackgroundColor: "#ffffff",
|
|
121
|
-
dropdownBorderColor: "#e5e7eb",
|
|
122
|
-
dropdownShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
|
|
123
|
-
optionTextColor: "#1f2937",
|
|
124
|
-
optionHoverBackgroundColor: "#f3f4f6",
|
|
125
|
-
optionHoverTextColor: "#1f2937",
|
|
126
|
-
optionSelectedBackgroundColor: "#eff6ff",
|
|
127
|
-
optionSelectedTextColor: "#2491eb",
|
|
128
|
-
optionSelectedHoverBackgroundColor: "#dbeafe",
|
|
129
|
-
optionCheckColor: "#2491eb",
|
|
130
|
-
optionBorderRadius: "6px",
|
|
131
|
-
optionPadding: "8px 12px",
|
|
132
|
-
optionFontSize: "14px",
|
|
133
|
-
optionFontWeight: 400,
|
|
134
|
-
optionSelectedFontWeight: 500,
|
|
135
|
-
labelColor: "#374151",
|
|
136
|
-
errorColor: "#dc2626",
|
|
137
|
-
fontSize: "14px",
|
|
138
|
-
floatingLabel: !0
|
|
139
|
-
},
|
|
140
|
-
checkbox: {
|
|
141
|
-
size: "18px",
|
|
142
|
-
borderRadius: "4px",
|
|
143
|
-
borderColor: "#d1d5db",
|
|
144
|
-
checkedColor: "#2491eb",
|
|
145
|
-
checkmarkColor: "#ffffff",
|
|
146
|
-
backgroundColor: "#ffffff",
|
|
147
|
-
focusRingColor: "rgba(36, 145, 235, 0.35)",
|
|
148
|
-
disabledColor: "#d1d5db",
|
|
149
|
-
disabledBackgroundColor: "#f3f4f6",
|
|
150
|
-
labelColor: "#1f2937",
|
|
151
|
-
fontSize: "14px"
|
|
152
|
-
},
|
|
153
|
-
textarea: {
|
|
154
|
-
minHeight: "100px",
|
|
155
|
-
borderRadius: "8px",
|
|
156
|
-
borderColor: "#d1d5db",
|
|
157
|
-
textColor: "#1f2937",
|
|
158
|
-
placeholderColor: "#9ca3af",
|
|
159
|
-
backgroundColor: "#ffffff",
|
|
160
|
-
focusBorderColor: "#2491eb",
|
|
161
|
-
focusRingColor: "rgba(36, 145, 235, 0.25)",
|
|
162
|
-
errorBorderColor: "#dc2626",
|
|
163
|
-
disabledBackgroundColor: "#f3f4f6",
|
|
164
|
-
disabledTextColor: "#9ca3af",
|
|
165
|
-
disabledBorderColor: "#e5e7eb",
|
|
166
|
-
labelColor: "#374151",
|
|
167
|
-
helperColor: "#6b7280",
|
|
168
|
-
errorColor: "#dc2626",
|
|
169
|
-
counterColor: "#9ca3af",
|
|
170
|
-
fontSize: "14px",
|
|
171
|
-
padding: "10px 14px",
|
|
172
|
-
floatingLabel: !0
|
|
173
|
-
},
|
|
174
|
-
radio: {
|
|
175
|
-
size: "18px",
|
|
176
|
-
color: "#2491eb",
|
|
177
|
-
checkedColor: "#2491eb",
|
|
178
|
-
labelColor: "#1f2937",
|
|
179
|
-
descriptionColor: "#6b7280",
|
|
180
|
-
fontSize: "14px"
|
|
181
|
-
},
|
|
182
|
-
switch: {
|
|
183
|
-
width: "40px",
|
|
184
|
-
height: "22px",
|
|
185
|
-
thumbSize: "16px",
|
|
186
|
-
thumbColor: "#ffffff",
|
|
187
|
-
trackColor: "#e2e8f0",
|
|
188
|
-
trackCheckedColor: "#2491eb",
|
|
189
|
-
focusRingColor: "rgba(36, 145, 235, 0.35)",
|
|
190
|
-
borderRadius: "9999px",
|
|
191
|
-
disabledOpacity: 0.5,
|
|
192
|
-
labelColor: "#1f2937",
|
|
193
|
-
descriptionColor: "#6b7280",
|
|
194
|
-
fontSize: "14px"
|
|
195
|
-
}
|
|
196
|
-
}, be = Le(Fe);
|
|
197
|
-
be.displayName = "UIContext";
|
|
198
|
-
function me() {
|
|
199
|
-
return Ie(be);
|
|
200
|
-
}
|
|
201
|
-
function ve(o) {
|
|
202
|
-
return typeof o == "object" && o !== null && !Array.isArray(o);
|
|
203
|
-
}
|
|
204
|
-
function we(o, t = 0.1) {
|
|
205
|
-
if (!o || typeof o != "string") return "rgba(36, 145, 235, 0.1)";
|
|
206
|
-
const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
|
|
207
|
-
if (c) {
|
|
208
|
-
const d = parseInt(c[1], 16), h = parseInt(c[2], 16), w = parseInt(c[3], 16);
|
|
209
|
-
return `rgba(${d}, ${h}, ${w}, ${t})`;
|
|
210
|
-
}
|
|
211
|
-
const n = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
|
|
212
|
-
if (n) {
|
|
213
|
-
const d = parseInt(n[1] + n[1], 16), h = parseInt(n[2] + n[2], 16), w = parseInt(n[3] + n[3], 16);
|
|
214
|
-
return `rgba(${d}, ${h}, ${w}, ${t})`;
|
|
215
|
-
}
|
|
216
|
-
const f = Math.round(t * 100);
|
|
217
|
-
return `color-mix(in srgb, ${i} ${f}%, #ffffff)`;
|
|
218
|
-
}
|
|
219
|
-
function ye(o, t = 0.25) {
|
|
220
|
-
if (!o || typeof o != "string") return "rgba(36, 145, 235, 0.25)";
|
|
221
|
-
const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
|
|
222
|
-
if (c) {
|
|
223
|
-
const d = parseInt(c[1], 16), h = parseInt(c[2], 16), w = parseInt(c[3], 16);
|
|
224
|
-
return `rgba(${d}, ${h}, ${w}, ${t})`;
|
|
225
|
-
}
|
|
226
|
-
const n = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
|
|
227
|
-
if (n) {
|
|
228
|
-
const d = parseInt(n[1] + n[1], 16), h = parseInt(n[2] + n[2], 16), w = parseInt(n[3] + n[3], 16);
|
|
229
|
-
return `rgba(${d}, ${h}, ${w}, ${t})`;
|
|
230
|
-
}
|
|
231
|
-
const f = Math.round(t * 100);
|
|
232
|
-
return `color-mix(in srgb, ${i} ${f}%, transparent)`;
|
|
233
|
-
}
|
|
234
|
-
function Be(o, t = 0.12) {
|
|
235
|
-
if (!o || typeof o != "string") return "#1d78c4";
|
|
236
|
-
const i = o.trim(), c = i.match(/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/);
|
|
237
|
-
if (c) {
|
|
238
|
-
const d = Math.max(0, 1 - t), h = Math.round(parseInt(c[1], 16) * d), w = Math.round(parseInt(c[2], 16) * d), l = Math.round(parseInt(c[3], 16) * d), x = (I) => I.toString(16).padStart(2, "0");
|
|
239
|
-
return `#${x(h)}${x(w)}${x(l)}`;
|
|
240
|
-
}
|
|
241
|
-
const n = i.match(/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/);
|
|
242
|
-
if (n) {
|
|
243
|
-
const d = Math.max(0, 1 - t), h = Math.round(parseInt(n[1] + n[1], 16) * d), w = Math.round(parseInt(n[2] + n[2], 16) * d), l = Math.round(parseInt(n[3] + n[3], 16) * d), x = (I) => I.toString(16).padStart(2, "0");
|
|
244
|
-
return `#${x(h)}${x(w)}${x(l)}`;
|
|
245
|
-
}
|
|
246
|
-
const f = Math.round((1 - t) * 100);
|
|
247
|
-
return `color-mix(in srgb, ${i} ${f}%, #000000)`;
|
|
248
|
-
}
|
|
249
|
-
function Ce(o) {
|
|
250
|
-
const t = we(o, 0.1), i = we(o, 0.18), c = ye(o, 0.25), n = Be(o, 0.12), f = Be(o, 0.22), d = we(o, 0.08);
|
|
251
|
-
return {
|
|
252
|
-
colors: {
|
|
253
|
-
primary: o,
|
|
254
|
-
focusRing: c
|
|
255
|
-
},
|
|
256
|
-
select: {
|
|
257
|
-
focusBorderColor: o,
|
|
258
|
-
focusRingColor: c,
|
|
259
|
-
optionSelectedTextColor: o,
|
|
260
|
-
optionCheckColor: o,
|
|
261
|
-
optionSelectedBackgroundColor: t,
|
|
262
|
-
optionSelectedHoverBackgroundColor: i
|
|
263
|
-
},
|
|
264
|
-
button: {
|
|
265
|
-
backgroundColor: o,
|
|
266
|
-
hoverBackgroundColor: n,
|
|
267
|
-
activeBackgroundColor: f,
|
|
268
|
-
focusRingColor: c,
|
|
269
|
-
outlineColor: o,
|
|
270
|
-
outlineBorderColor: o,
|
|
271
|
-
outlineHoverBackgroundColor: d,
|
|
272
|
-
ghostColor: o,
|
|
273
|
-
ghostHoverBackgroundColor: d
|
|
274
|
-
},
|
|
275
|
-
input: {
|
|
276
|
-
focusBorderColor: o,
|
|
277
|
-
focusRingColor: c
|
|
278
|
-
},
|
|
279
|
-
checkbox: {
|
|
280
|
-
checkedColor: o,
|
|
281
|
-
focusRingColor: c
|
|
282
|
-
},
|
|
283
|
-
textarea: {
|
|
284
|
-
focusBorderColor: o,
|
|
285
|
-
focusRingColor: c
|
|
286
|
-
},
|
|
287
|
-
radio: {
|
|
288
|
-
color: o,
|
|
289
|
-
checkedColor: o,
|
|
290
|
-
focusRingColor: c
|
|
291
|
-
},
|
|
292
|
-
switch: {
|
|
293
|
-
trackCheckedColor: o,
|
|
294
|
-
focusRingColor: c
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
function he(o, ...t) {
|
|
299
|
-
let i = { ...o };
|
|
300
|
-
for (const c of t) {
|
|
301
|
-
if (!c || !ve(c))
|
|
302
|
-
continue;
|
|
303
|
-
const n = { ...i };
|
|
304
|
-
for (const f of Object.keys(c)) {
|
|
305
|
-
const d = c[f];
|
|
306
|
-
if (d === void 0)
|
|
307
|
-
continue;
|
|
308
|
-
const h = n[f];
|
|
309
|
-
ve(h) && ve(d) ? n[f] = he(
|
|
310
|
-
h,
|
|
311
|
-
d
|
|
312
|
-
) : n[f] = d;
|
|
313
|
-
}
|
|
314
|
-
i = n;
|
|
315
|
-
}
|
|
316
|
-
return i;
|
|
317
|
-
}
|
|
318
|
-
function Se(o, t) {
|
|
319
|
-
var c;
|
|
320
|
-
if (!t)
|
|
321
|
-
return { ...o };
|
|
322
|
-
const i = (c = t.colors) == null ? void 0 : c.primary;
|
|
323
|
-
if (i && typeof i == "string") {
|
|
324
|
-
const n = Ce(i);
|
|
325
|
-
return he(o, n, t);
|
|
326
|
-
}
|
|
327
|
-
return he(o, t);
|
|
328
|
-
}
|
|
329
|
-
const Ne = /* @__PURE__ */ new Set([
|
|
330
|
-
"fontWeight",
|
|
331
|
-
"opacity",
|
|
332
|
-
"zIndex",
|
|
333
|
-
"lineHeight",
|
|
334
|
-
"flex",
|
|
335
|
-
"flexGrow",
|
|
336
|
-
"flexShrink",
|
|
337
|
-
"order"
|
|
338
|
-
]);
|
|
339
|
-
function se(o) {
|
|
340
|
-
return o.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
341
|
-
}
|
|
342
|
-
function er(o, t) {
|
|
343
|
-
return typeof t == "number" && !Ne.has(o) ? `${t}px` : String(t);
|
|
344
|
-
}
|
|
345
|
-
function rr(o, t, i) {
|
|
346
|
-
return he(
|
|
347
|
-
o,
|
|
348
|
-
t,
|
|
349
|
-
i
|
|
350
|
-
);
|
|
351
|
-
}
|
|
352
|
-
function _e(o, t) {
|
|
353
|
-
if (!o)
|
|
354
|
-
return {};
|
|
355
|
-
const i = {};
|
|
356
|
-
for (const [c, n] of Object.entries(o))
|
|
357
|
-
if (!(n == null || n === "") && (typeof n == "string" || typeof n == "number")) {
|
|
358
|
-
const f = `--${t}-${se(c)}`;
|
|
359
|
-
i[f] = er(c, n);
|
|
360
|
-
}
|
|
361
|
-
return i;
|
|
362
|
-
}
|
|
363
|
-
function de(o, t) {
|
|
364
|
-
const i = me(), c = Fe[o], n = i[o];
|
|
365
|
-
return ke(() => {
|
|
366
|
-
const f = rr(
|
|
367
|
-
c,
|
|
368
|
-
n,
|
|
369
|
-
t
|
|
370
|
-
), d = _e(
|
|
371
|
-
f,
|
|
372
|
-
`wui-${o}`
|
|
373
|
-
);
|
|
374
|
-
return {
|
|
375
|
-
resolved: f,
|
|
376
|
-
cssVars: d,
|
|
377
|
-
getCombinedStyle: (w) => w ? {
|
|
378
|
-
...d,
|
|
379
|
-
...w
|
|
380
|
-
} : d
|
|
381
|
-
};
|
|
382
|
-
}, [o, c, n, t]);
|
|
383
|
-
}
|
|
384
|
-
const nr = ce(function({
|
|
385
|
-
children: t,
|
|
386
|
-
label: i,
|
|
387
|
-
variant: c = "primary",
|
|
388
|
-
size: n = "medium",
|
|
389
|
-
loading: f = !1,
|
|
390
|
-
loadingText: d,
|
|
391
|
-
disabled: h = !1,
|
|
392
|
-
startIcon: w,
|
|
393
|
-
endIcon: l,
|
|
394
|
-
fullWidth: x = !1,
|
|
395
|
-
className: I,
|
|
396
|
-
style: E,
|
|
397
|
-
styles: V,
|
|
398
|
-
type: k = "button",
|
|
399
|
-
...e
|
|
400
|
-
}, r) {
|
|
401
|
-
const { getCombinedStyle: U } = de("button", V), _ = {
|
|
402
|
-
primary: J.variantPrimary,
|
|
403
|
-
secondary: J.variantSecondary,
|
|
404
|
-
outline: J.variantOutline,
|
|
405
|
-
ghost: J.variantGhost,
|
|
406
|
-
danger: J.variantDanger
|
|
407
|
-
}[c], p = {
|
|
408
|
-
small: J.sizeSmall,
|
|
409
|
-
medium: J.sizeMedium,
|
|
410
|
-
large: J.sizeLarge
|
|
411
|
-
}[n], g = h || f, a = b(
|
|
412
|
-
"wui-button",
|
|
413
|
-
J.button,
|
|
414
|
-
_,
|
|
415
|
-
p,
|
|
416
|
-
x && J.fullWidth,
|
|
417
|
-
f && J.loading,
|
|
418
|
-
g && J.disabled,
|
|
419
|
-
I
|
|
420
|
-
);
|
|
421
|
-
return /* @__PURE__ */ F(
|
|
422
|
-
"button",
|
|
423
|
-
{
|
|
424
|
-
ref: r,
|
|
425
|
-
type: k,
|
|
426
|
-
className: a,
|
|
427
|
-
style: U(E),
|
|
428
|
-
disabled: g,
|
|
429
|
-
"aria-busy": f || void 0,
|
|
430
|
-
"aria-disabled": g || void 0,
|
|
431
|
-
...e,
|
|
432
|
-
children: [
|
|
433
|
-
f ? /* @__PURE__ */ u("span", { className: J.spinner, "aria-hidden": "true" }) : w ? /* @__PURE__ */ u("span", { className: J.icon, children: w }) : null,
|
|
434
|
-
f && d ? /* @__PURE__ */ u("span", { children: d }) : i !== void 0 ? /* @__PURE__ */ u("span", { children: i }) : t,
|
|
435
|
-
!f && l && /* @__PURE__ */ u("span", { className: J.icon, children: l })
|
|
436
|
-
]
|
|
437
|
-
}
|
|
438
|
-
);
|
|
439
|
-
});
|
|
440
|
-
nr.displayName = "Button";
|
|
441
|
-
const ir = "_container_mdr3c_1", cr = "_floatingContainer_mdr3c_8", or = "_label_mdr3c_12", ar = "_requiredAsterisk_mdr3c_22", tr = "_outerWrapper_mdr3c_28", dr = "_inputWrapper_mdr3c_35", ur = "_outerIconBox_mdr3c_39", fr = "_hasError_mdr3c_68", pr = "_disabled_mdr3c_72", _r = "_withFloatingLabel_mdr3c_93", br = "_floatingLabel_mdr3c_121", hr = "_floatingLabelText_mdr3c_143", gr = "_withStartIcon_mdr3c_164", xr = "_floated_mdr3c_168", vr = "_input_mdr3c_35", wr = "_floatingInput_mdr3c_219", kr = "_withEndIcon_mdr3c_239", Ir = "_startIcon_mdr3c_243", $r = "_endIcon_mdr3c_244", lr = "_helperText_mdr3c_254", Br = "_errorMessage_mdr3c_260", $ = {
|
|
442
|
-
container: ir,
|
|
443
|
-
floatingContainer: cr,
|
|
444
|
-
label: or,
|
|
445
|
-
requiredAsterisk: ar,
|
|
446
|
-
outerWrapper: tr,
|
|
447
|
-
inputWrapper: dr,
|
|
448
|
-
outerIconBox: ur,
|
|
449
|
-
hasError: fr,
|
|
450
|
-
disabled: pr,
|
|
451
|
-
withFloatingLabel: _r,
|
|
452
|
-
floatingLabel: br,
|
|
453
|
-
floatingLabelText: hr,
|
|
454
|
-
withStartIcon: gr,
|
|
455
|
-
floated: xr,
|
|
456
|
-
input: vr,
|
|
457
|
-
floatingInput: wr,
|
|
458
|
-
withEndIcon: kr,
|
|
459
|
-
startIcon: Ir,
|
|
460
|
-
endIcon: $r,
|
|
461
|
-
helperText: lr,
|
|
462
|
-
errorMessage: Br
|
|
463
|
-
}, Lr = ce(function({
|
|
464
|
-
id: t,
|
|
465
|
-
label: i,
|
|
466
|
-
floatingLabel: c,
|
|
467
|
-
helperText: n,
|
|
468
|
-
errorMessage: f,
|
|
469
|
-
required: d = !1,
|
|
470
|
-
disabled: h = !1,
|
|
471
|
-
readOnly: w = !1,
|
|
472
|
-
startIcon: l,
|
|
473
|
-
endIcon: x,
|
|
474
|
-
startIconPlacement: I = "inside",
|
|
475
|
-
endIconPlacement: E = "inside",
|
|
476
|
-
outerStartIcon: V,
|
|
477
|
-
outerEndIcon: k,
|
|
478
|
-
className: e,
|
|
479
|
-
style: r,
|
|
480
|
-
styles: U,
|
|
481
|
-
slotClassNames: _,
|
|
482
|
-
slotStyles: p,
|
|
483
|
-
"data-testid": g,
|
|
484
|
-
onChange: a,
|
|
485
|
-
onFocus: A,
|
|
486
|
-
onBlur: D,
|
|
487
|
-
...M
|
|
488
|
-
}, q) {
|
|
489
|
-
const j = ge(), B = t || `wui-input-${j}`, H = n ? `${B}-helper` : void 0, L = f ? `${B}-error` : void 0, O = fe(null), { resolved: Y, getCombinedStyle: R } = de("input", U), P = !!f, Z = c ?? (Y == null ? void 0 : Y.floatingLabel) ?? !0, m = M.value !== void 0, [y, ee] = N(
|
|
490
|
-
M.defaultValue ?? ""
|
|
491
|
-
), [re, C] = N(!1), Q = m ? M.value : y, ne = Q != null && String(Q).trim().length > 0, oe = re || !!ne, s = (G) => {
|
|
492
|
-
C(!0), A == null || A(G);
|
|
493
|
-
}, ue = (G) => {
|
|
494
|
-
C(!1), D == null || D(G);
|
|
495
|
-
}, pe = (G) => {
|
|
496
|
-
m || ee(G.target.value), a == null || a(G);
|
|
497
|
-
}, ae = !!(Z && i), te = V ?? (I === "outside" ? l : void 0), v = I === "outside" ? void 0 : l, W = k ?? (E === "outside" ? x : void 0), K = E === "outside" ? void 0 : x, xe = !!(te || W), We = b(
|
|
52
|
+
const mn = on(function({
|
|
53
|
+
id: k,
|
|
54
|
+
label: t,
|
|
55
|
+
floatingLabel: x,
|
|
56
|
+
helperText: I,
|
|
57
|
+
errorMessage: h,
|
|
58
|
+
required: L = !1,
|
|
59
|
+
disabled: b = !1,
|
|
60
|
+
readOnly: E = !1,
|
|
61
|
+
startIcon: z,
|
|
62
|
+
endIcon: _,
|
|
63
|
+
startIconPlacement: $ = "inside",
|
|
64
|
+
endIconPlacement: M = "inside",
|
|
65
|
+
outerStartIcon: H,
|
|
66
|
+
outerEndIcon: p,
|
|
67
|
+
className: n,
|
|
68
|
+
style: e,
|
|
69
|
+
styles: Q,
|
|
70
|
+
slotClassNames: a,
|
|
71
|
+
slotStyles: r,
|
|
72
|
+
"data-testid": u,
|
|
73
|
+
onChange: i,
|
|
74
|
+
onFocus: W,
|
|
75
|
+
onBlur: V,
|
|
76
|
+
...A
|
|
77
|
+
}, O) {
|
|
78
|
+
const U = fn(), g = k || `wui-input-${U}`, D = I ? `${g}-helper` : void 0, w = h ? `${g}-error` : void 0, R = tn(null), { resolved: X, getCombinedStyle: B } = pn("input", Q), j = !!h, P = x ?? (X == null ? void 0 : X.floatingLabel) ?? !0, Y = A.value !== void 0, [m, C] = N(
|
|
79
|
+
A.defaultValue ?? ""
|
|
80
|
+
), [s, y] = N(!1), Z = Y ? A.value : m, nn = Z != null && String(Z).trim().length > 0, cn = s || !!nn, S = (G) => {
|
|
81
|
+
y(!0), W == null || W(G);
|
|
82
|
+
}, un = (G) => {
|
|
83
|
+
y(!1), V == null || V(G);
|
|
84
|
+
}, _n = (G) => {
|
|
85
|
+
Y || C(G.target.value), i == null || i(G);
|
|
86
|
+
}, dn = !!(P && t), an = H ?? ($ === "outside" ? z : void 0), o = $ === "outside" ? void 0 : z, T = p ?? (M === "outside" ? _ : void 0), K = M === "outside" ? void 0 : _, hn = !!(an || T), xn = d(
|
|
498
87
|
"wui-input-container",
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
),
|
|
88
|
+
f.container,
|
|
89
|
+
dn && f.floatingContainer,
|
|
90
|
+
n
|
|
91
|
+
), In = d(
|
|
503
92
|
"wui-input-wrapper",
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
),
|
|
93
|
+
f.inputWrapper,
|
|
94
|
+
dn && f.withFloatingLabel,
|
|
95
|
+
j && f.hasError,
|
|
96
|
+
b && f.disabled,
|
|
97
|
+
a == null ? void 0 : a.wrapper
|
|
98
|
+
), Ln = d(
|
|
510
99
|
"wui-input-field",
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
!!
|
|
515
|
-
!!K &&
|
|
516
|
-
|
|
517
|
-
),
|
|
518
|
-
|
|
100
|
+
f.input,
|
|
101
|
+
dn && f.floatingInput,
|
|
102
|
+
cn && f.floated,
|
|
103
|
+
!!o && f.withStartIcon,
|
|
104
|
+
!!K && f.withEndIcon,
|
|
105
|
+
a == null ? void 0 : a.input
|
|
106
|
+
), $n = [w, D].filter(Boolean).join(" ") || void 0, gn = /* @__PURE__ */ q("div", { className: In, style: r == null ? void 0 : r.wrapper, children: [
|
|
107
|
+
P && t && /* @__PURE__ */ c(
|
|
519
108
|
"label",
|
|
520
109
|
{
|
|
521
|
-
htmlFor:
|
|
522
|
-
className:
|
|
110
|
+
htmlFor: g,
|
|
111
|
+
className: d(
|
|
523
112
|
"wui-input-floating-label",
|
|
524
|
-
|
|
525
|
-
!!
|
|
526
|
-
|
|
527
|
-
(
|
|
113
|
+
f.floatingLabel,
|
|
114
|
+
!!o && f.withStartIcon,
|
|
115
|
+
cn && f.floated,
|
|
116
|
+
(a == null ? void 0 : a.floatingLabel) || (a == null ? void 0 : a.label)
|
|
528
117
|
),
|
|
529
|
-
style: (
|
|
530
|
-
children: /* @__PURE__ */
|
|
531
|
-
|
|
532
|
-
|
|
118
|
+
style: (r == null ? void 0 : r.floatingLabel) || (r == null ? void 0 : r.label),
|
|
119
|
+
children: /* @__PURE__ */ q("span", { className: f.floatingLabelText, children: [
|
|
120
|
+
t,
|
|
121
|
+
L && /* @__PURE__ */ c("span", { className: f.requiredAsterisk, "aria-hidden": "true", children: "*" })
|
|
533
122
|
] })
|
|
534
123
|
}
|
|
535
124
|
),
|
|
536
|
-
|
|
537
|
-
/* @__PURE__ */
|
|
125
|
+
o && /* @__PURE__ */ c("span", { className: f.startIcon, children: o }),
|
|
126
|
+
/* @__PURE__ */ c(
|
|
538
127
|
"input",
|
|
539
128
|
{
|
|
540
129
|
ref: (G) => {
|
|
541
|
-
|
|
130
|
+
R.current = G, typeof O == "function" ? O(G) : O && (O.current = G);
|
|
542
131
|
},
|
|
543
|
-
id:
|
|
544
|
-
disabled:
|
|
545
|
-
readOnly:
|
|
546
|
-
required:
|
|
547
|
-
"aria-invalid":
|
|
548
|
-
"aria-describedby":
|
|
549
|
-
className:
|
|
550
|
-
style:
|
|
551
|
-
onChange:
|
|
552
|
-
onFocus:
|
|
553
|
-
onBlur:
|
|
554
|
-
...
|
|
132
|
+
id: g,
|
|
133
|
+
disabled: b,
|
|
134
|
+
readOnly: E,
|
|
135
|
+
required: L,
|
|
136
|
+
"aria-invalid": j ? "true" : "false",
|
|
137
|
+
"aria-describedby": $n,
|
|
138
|
+
className: Ln,
|
|
139
|
+
style: r == null ? void 0 : r.input,
|
|
140
|
+
onChange: _n,
|
|
141
|
+
onFocus: S,
|
|
142
|
+
onBlur: un,
|
|
143
|
+
...A
|
|
555
144
|
}
|
|
556
145
|
),
|
|
557
|
-
K && /* @__PURE__ */
|
|
558
|
-
] }),
|
|
146
|
+
K && /* @__PURE__ */ c("span", { className: f.endIcon, children: K })
|
|
147
|
+
] }), Wn = hn ? /* @__PURE__ */ q(
|
|
559
148
|
"div",
|
|
560
149
|
{
|
|
561
|
-
className:
|
|
150
|
+
className: d(
|
|
562
151
|
"wui-input-outer-wrapper",
|
|
563
|
-
|
|
564
|
-
|
|
152
|
+
f.outerWrapper,
|
|
153
|
+
a == null ? void 0 : a.outerWrapper
|
|
565
154
|
),
|
|
566
|
-
style:
|
|
155
|
+
style: r == null ? void 0 : r.outerWrapper,
|
|
567
156
|
children: [
|
|
568
|
-
|
|
157
|
+
an && /* @__PURE__ */ c(
|
|
569
158
|
"div",
|
|
570
159
|
{
|
|
571
|
-
className:
|
|
160
|
+
className: d(
|
|
572
161
|
"wui-input-outer-icon",
|
|
573
162
|
"wui-input-outer-start-icon",
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
(
|
|
163
|
+
f.outerIconBox,
|
|
164
|
+
b && f.disabled,
|
|
165
|
+
j && f.hasError,
|
|
166
|
+
(a == null ? void 0 : a.outerIconBox) || (a == null ? void 0 : a.outerStartIcon)
|
|
578
167
|
),
|
|
579
|
-
style: (
|
|
168
|
+
style: (r == null ? void 0 : r.outerIconBox) || (r == null ? void 0 : r.outerStartIcon),
|
|
580
169
|
onClick: () => {
|
|
581
170
|
var G;
|
|
582
|
-
return !
|
|
171
|
+
return !b && ((G = R.current) == null ? void 0 : G.focus());
|
|
583
172
|
},
|
|
584
|
-
children:
|
|
173
|
+
children: an
|
|
585
174
|
}
|
|
586
175
|
),
|
|
587
|
-
|
|
588
|
-
|
|
176
|
+
gn,
|
|
177
|
+
T && /* @__PURE__ */ c(
|
|
589
178
|
"div",
|
|
590
179
|
{
|
|
591
|
-
className:
|
|
180
|
+
className: d(
|
|
592
181
|
"wui-input-outer-icon",
|
|
593
182
|
"wui-input-outer-end-icon",
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
(
|
|
183
|
+
f.outerIconBox,
|
|
184
|
+
b && f.disabled,
|
|
185
|
+
j && f.hasError,
|
|
186
|
+
(a == null ? void 0 : a.outerIconBox) || (a == null ? void 0 : a.outerEndIcon)
|
|
598
187
|
),
|
|
599
|
-
style: (
|
|
188
|
+
style: (r == null ? void 0 : r.outerIconBox) || (r == null ? void 0 : r.outerEndIcon),
|
|
600
189
|
onClick: () => {
|
|
601
190
|
var G;
|
|
602
|
-
return !
|
|
191
|
+
return !b && ((G = R.current) == null ? void 0 : G.focus());
|
|
603
192
|
},
|
|
604
|
-
children:
|
|
193
|
+
children: T
|
|
605
194
|
}
|
|
606
195
|
)
|
|
607
196
|
]
|
|
608
197
|
}
|
|
609
|
-
) :
|
|
610
|
-
return /* @__PURE__ */
|
|
611
|
-
!
|
|
198
|
+
) : gn;
|
|
199
|
+
return /* @__PURE__ */ q("div", { className: xn, style: B(e), "data-testid": u, children: [
|
|
200
|
+
!P && t && /* @__PURE__ */ q(
|
|
612
201
|
"label",
|
|
613
202
|
{
|
|
614
|
-
htmlFor:
|
|
615
|
-
className:
|
|
616
|
-
style:
|
|
203
|
+
htmlFor: g,
|
|
204
|
+
className: d("wui-input-label", f.label, a == null ? void 0 : a.label),
|
|
205
|
+
style: r == null ? void 0 : r.label,
|
|
617
206
|
children: [
|
|
618
|
-
|
|
619
|
-
|
|
207
|
+
t,
|
|
208
|
+
L && /* @__PURE__ */ c("span", { className: f.requiredAsterisk, "aria-hidden": "true", children: "*" })
|
|
620
209
|
]
|
|
621
210
|
}
|
|
622
211
|
),
|
|
623
|
-
|
|
624
|
-
|
|
212
|
+
Wn,
|
|
213
|
+
j ? /* @__PURE__ */ c(
|
|
625
214
|
"span",
|
|
626
215
|
{
|
|
627
|
-
id:
|
|
216
|
+
id: w,
|
|
628
217
|
role: "alert",
|
|
629
|
-
className:
|
|
218
|
+
className: d(
|
|
630
219
|
"wui-input-error",
|
|
631
|
-
|
|
632
|
-
|
|
220
|
+
f.errorMessage,
|
|
221
|
+
a == null ? void 0 : a.errorMessage
|
|
633
222
|
),
|
|
634
|
-
style:
|
|
635
|
-
children:
|
|
223
|
+
style: r == null ? void 0 : r.errorMessage,
|
|
224
|
+
children: h
|
|
636
225
|
}
|
|
637
|
-
) :
|
|
226
|
+
) : I ? /* @__PURE__ */ c(
|
|
638
227
|
"span",
|
|
639
228
|
{
|
|
640
|
-
id:
|
|
641
|
-
className:
|
|
229
|
+
id: D,
|
|
230
|
+
className: d(
|
|
642
231
|
"wui-input-helper",
|
|
643
|
-
|
|
644
|
-
|
|
232
|
+
f.helperText,
|
|
233
|
+
a == null ? void 0 : a.helperText
|
|
645
234
|
),
|
|
646
|
-
style:
|
|
647
|
-
children:
|
|
235
|
+
style: r == null ? void 0 : r.helperText,
|
|
236
|
+
children: I
|
|
648
237
|
}
|
|
649
238
|
) : null
|
|
650
239
|
] });
|
|
651
240
|
});
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
container:
|
|
655
|
-
disabled:
|
|
656
|
-
hiddenInput:
|
|
657
|
-
box:
|
|
658
|
-
checked:
|
|
659
|
-
indeterminate:
|
|
660
|
-
icon:
|
|
661
|
-
label:
|
|
662
|
-
},
|
|
663
|
-
label:
|
|
664
|
-
checked:
|
|
665
|
-
defaultChecked:
|
|
666
|
-
indeterminate:
|
|
667
|
-
disabled:
|
|
668
|
-
onChange:
|
|
669
|
-
className:
|
|
670
|
-
style:
|
|
671
|
-
styles:
|
|
672
|
-
slotClassNames:
|
|
673
|
-
slotStyles:
|
|
674
|
-
"data-testid":
|
|
675
|
-
...
|
|
676
|
-
},
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}, [
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
},
|
|
241
|
+
mn.displayName = "Input";
|
|
242
|
+
const yn = "_container_1mwsv_1", ln = "_disabled_1mwsv_27", Nn = "_hiddenInput_1mwsv_37", Sn = "_box_1mwsv_55", Cn = "_checked_1mwsv_91", sn = "_indeterminate_1mwsv_93", ne = "_icon_1mwsv_103", ee = "_label_1mwsv_123", en = {
|
|
243
|
+
container: yn,
|
|
244
|
+
disabled: ln,
|
|
245
|
+
hiddenInput: Nn,
|
|
246
|
+
box: Sn,
|
|
247
|
+
checked: Cn,
|
|
248
|
+
indeterminate: sn,
|
|
249
|
+
icon: ne,
|
|
250
|
+
label: ee
|
|
251
|
+
}, ie = on(function({
|
|
252
|
+
label: k,
|
|
253
|
+
checked: t,
|
|
254
|
+
defaultChecked: x = !1,
|
|
255
|
+
indeterminate: I = !1,
|
|
256
|
+
disabled: h = !1,
|
|
257
|
+
onChange: L,
|
|
258
|
+
className: b,
|
|
259
|
+
style: E,
|
|
260
|
+
styles: z,
|
|
261
|
+
slotClassNames: _,
|
|
262
|
+
slotStyles: $,
|
|
263
|
+
"data-testid": M,
|
|
264
|
+
...H
|
|
265
|
+
}, p) {
|
|
266
|
+
const n = tn(null);
|
|
267
|
+
bn(p, () => n.current);
|
|
268
|
+
const e = t !== void 0, [Q, a] = N(x), r = e ? t : Q, { getCombinedStyle: u } = pn("checkbox", z);
|
|
269
|
+
wn(() => {
|
|
270
|
+
n.current && (n.current.indeterminate = !!I);
|
|
271
|
+
}, [I]);
|
|
272
|
+
const i = (A) => {
|
|
273
|
+
h || (e || a(A.target.checked), L == null || L(A));
|
|
274
|
+
}, W = d(
|
|
686
275
|
"wui-checkbox-container",
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
),
|
|
276
|
+
en.container,
|
|
277
|
+
h && en.disabled,
|
|
278
|
+
_ == null ? void 0 : _.container,
|
|
279
|
+
b
|
|
280
|
+
), V = d(
|
|
692
281
|
"wui-checkbox-box",
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
282
|
+
en.box,
|
|
283
|
+
r && en.checked,
|
|
284
|
+
I && en.indeterminate,
|
|
285
|
+
_ == null ? void 0 : _.box
|
|
697
286
|
);
|
|
698
|
-
return /* @__PURE__ */
|
|
699
|
-
/* @__PURE__ */
|
|
287
|
+
return /* @__PURE__ */ q("label", { className: W, style: u(E), "data-testid": M, children: [
|
|
288
|
+
/* @__PURE__ */ c(
|
|
700
289
|
"input",
|
|
701
290
|
{
|
|
702
|
-
ref:
|
|
291
|
+
ref: n,
|
|
703
292
|
type: "checkbox",
|
|
704
|
-
checked:
|
|
705
|
-
disabled:
|
|
706
|
-
onChange:
|
|
707
|
-
className:
|
|
708
|
-
"aria-checked":
|
|
709
|
-
...
|
|
293
|
+
checked: r,
|
|
294
|
+
disabled: h,
|
|
295
|
+
onChange: i,
|
|
296
|
+
className: en.hiddenInput,
|
|
297
|
+
"aria-checked": I ? "mixed" : r,
|
|
298
|
+
...H
|
|
710
299
|
}
|
|
711
300
|
),
|
|
712
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ c("span", { className: V, style: $ == null ? void 0 : $.box, children: I ? /* @__PURE__ */ c(
|
|
713
302
|
"svg",
|
|
714
303
|
{
|
|
715
|
-
className:
|
|
716
|
-
style:
|
|
304
|
+
className: d(en.icon, _ == null ? void 0 : _.icon),
|
|
305
|
+
style: $ == null ? void 0 : $.icon,
|
|
717
306
|
viewBox: "0 0 24 24",
|
|
718
307
|
"aria-hidden": "true",
|
|
719
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ c("line", { x1: "5", y1: "12", x2: "19", y2: "12", strokeWidth: "3" })
|
|
720
309
|
}
|
|
721
|
-
) :
|
|
310
|
+
) : r ? /* @__PURE__ */ c(
|
|
722
311
|
"svg",
|
|
723
312
|
{
|
|
724
|
-
className:
|
|
725
|
-
style:
|
|
313
|
+
className: d(en.icon, _ == null ? void 0 : _.icon),
|
|
314
|
+
style: $ == null ? void 0 : $.icon,
|
|
726
315
|
viewBox: "0 0 24 24",
|
|
727
316
|
"aria-hidden": "true",
|
|
728
|
-
children: /* @__PURE__ */
|
|
317
|
+
children: /* @__PURE__ */ c("polyline", { points: "20 6 9 17 4 12", strokeWidth: "3" })
|
|
729
318
|
}
|
|
730
319
|
) : null }),
|
|
731
|
-
|
|
320
|
+
k && /* @__PURE__ */ c(
|
|
732
321
|
"span",
|
|
733
322
|
{
|
|
734
|
-
className:
|
|
735
|
-
style:
|
|
736
|
-
children:
|
|
323
|
+
className: d("wui-checkbox-label", en.label, _ == null ? void 0 : _.label),
|
|
324
|
+
style: $ == null ? void 0 : $.label,
|
|
325
|
+
children: k
|
|
737
326
|
}
|
|
738
327
|
)
|
|
739
328
|
] });
|
|
740
329
|
});
|
|
741
|
-
|
|
742
|
-
const
|
|
743
|
-
container:
|
|
744
|
-
floatingContainer:
|
|
745
|
-
selectWrapper:
|
|
746
|
-
withFloatingLabel:
|
|
747
|
-
selectWrapperOpen:
|
|
748
|
-
label:
|
|
749
|
-
requiredAsterisk:
|
|
750
|
-
floatingLabel:
|
|
751
|
-
floatingLabelText:
|
|
752
|
-
floated:
|
|
753
|
-
trigger:
|
|
754
|
-
hasError:
|
|
755
|
-
disabled:
|
|
756
|
-
open:
|
|
757
|
-
value:
|
|
758
|
-
placeholder:
|
|
759
|
-
floatingPlaceholder:
|
|
760
|
-
arrow:
|
|
761
|
-
arrowOpen:
|
|
762
|
-
dropdown:
|
|
763
|
-
option:
|
|
764
|
-
optionActive:
|
|
765
|
-
optionSelected:
|
|
766
|
-
optionDisabled:
|
|
767
|
-
checkIcon:
|
|
768
|
-
errorMessage:
|
|
769
|
-
},
|
|
770
|
-
options:
|
|
771
|
-
value:
|
|
772
|
-
defaultValue:
|
|
773
|
-
placeholder:
|
|
774
|
-
label:
|
|
775
|
-
floatingLabel:
|
|
776
|
-
errorMessage:
|
|
777
|
-
disabled:
|
|
778
|
-
required:
|
|
779
|
-
onChange:
|
|
780
|
-
name:
|
|
781
|
-
className:
|
|
782
|
-
style:
|
|
783
|
-
styles:
|
|
784
|
-
slotClassNames:
|
|
785
|
-
slotStyles:
|
|
786
|
-
"data-testid":
|
|
787
|
-
id:
|
|
788
|
-
},
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
if (!
|
|
792
|
-
const
|
|
793
|
-
|
|
330
|
+
ie.displayName = "Checkbox";
|
|
331
|
+
const re = "_container_q8gl5_1", ce = "_floatingContainer_q8gl5_15", de = "_selectWrapper_q8gl5_23", ae = "_withFloatingLabel_q8gl5_33", oe = "_selectWrapperOpen_q8gl5_41", ue = "_label_q8gl5_49", te = "_requiredAsterisk_q8gl5_69", pe = "_floatingLabel_q8gl5_81", _e = "_floatingLabelText_q8gl5_125", fe = "_floated_q8gl5_167", he = "_trigger_q8gl5_199", be = "_hasError_q8gl5_199", ge = "_disabled_q8gl5_209", we = "_open_q8gl5_273", ve = "_value_q8gl5_315", ke = "_placeholder_q8gl5_329", xe = "_floatingPlaceholder_q8gl5_337", Ie = "_arrow_q8gl5_359", Le = "_arrowOpen_q8gl5_379", $e = "_dropdown_q8gl5_387", We = "_option_q8gl5_431", Be = "_optionActive_q8gl5_467", qe = "_optionSelected_q8gl5_477", Ee = "_optionDisabled_q8gl5_519", Te = "_checkIcon_q8gl5_531", ze = "_errorMessage_q8gl5_553", v = {
|
|
332
|
+
container: re,
|
|
333
|
+
floatingContainer: ce,
|
|
334
|
+
selectWrapper: de,
|
|
335
|
+
withFloatingLabel: ae,
|
|
336
|
+
selectWrapperOpen: oe,
|
|
337
|
+
label: ue,
|
|
338
|
+
requiredAsterisk: te,
|
|
339
|
+
floatingLabel: pe,
|
|
340
|
+
floatingLabelText: _e,
|
|
341
|
+
floated: fe,
|
|
342
|
+
trigger: he,
|
|
343
|
+
hasError: be,
|
|
344
|
+
disabled: ge,
|
|
345
|
+
open: we,
|
|
346
|
+
value: ve,
|
|
347
|
+
placeholder: ke,
|
|
348
|
+
floatingPlaceholder: xe,
|
|
349
|
+
arrow: Ie,
|
|
350
|
+
arrowOpen: Le,
|
|
351
|
+
dropdown: $e,
|
|
352
|
+
option: We,
|
|
353
|
+
optionActive: Be,
|
|
354
|
+
optionSelected: qe,
|
|
355
|
+
optionDisabled: Ee,
|
|
356
|
+
checkIcon: Te,
|
|
357
|
+
errorMessage: ze
|
|
358
|
+
}, Fe = on(function({
|
|
359
|
+
options: k,
|
|
360
|
+
value: t,
|
|
361
|
+
defaultValue: x,
|
|
362
|
+
placeholder: I = "Select an option...",
|
|
363
|
+
label: h,
|
|
364
|
+
floatingLabel: L,
|
|
365
|
+
errorMessage: b,
|
|
366
|
+
disabled: E = !1,
|
|
367
|
+
required: z = !1,
|
|
368
|
+
onChange: _,
|
|
369
|
+
name: $,
|
|
370
|
+
className: M,
|
|
371
|
+
style: H,
|
|
372
|
+
styles: p,
|
|
373
|
+
slotClassNames: n,
|
|
374
|
+
slotStyles: e,
|
|
375
|
+
"data-testid": Q,
|
|
376
|
+
id: a
|
|
377
|
+
}, r) {
|
|
378
|
+
const u = fn(), i = a || `wui-select-${u}`, W = `${i}-label`, V = `${i}-listbox`, A = b ? `${i}-error` : void 0, O = t !== void 0, [U, g] = N(x), D = O ? t : U, [w, R] = N(!1), [X, B] = N(!1), [j, P] = N(-1), Y = tn(null), m = tn(null), { resolved: C, getCombinedStyle: s } = pn("select", p), y = !!b, Z = L ?? (C == null ? void 0 : C.floatingLabel) ?? !0, nn = !!(Z && h), cn = w || X || !!D, S = k.find((o) => o.value === D);
|
|
379
|
+
wn(() => {
|
|
380
|
+
if (!w) return;
|
|
381
|
+
const o = (T) => {
|
|
382
|
+
Y.current && !Y.current.contains(T.target) && R(!1);
|
|
794
383
|
};
|
|
795
|
-
return document.addEventListener("mousedown",
|
|
796
|
-
document.removeEventListener("mousedown",
|
|
384
|
+
return document.addEventListener("mousedown", o), () => {
|
|
385
|
+
document.removeEventListener("mousedown", o);
|
|
797
386
|
};
|
|
798
|
-
}, [
|
|
799
|
-
const
|
|
800
|
-
var
|
|
801
|
-
|
|
802
|
-
},
|
|
803
|
-
if (!
|
|
804
|
-
if (
|
|
805
|
-
if (
|
|
806
|
-
|
|
387
|
+
}, [w]);
|
|
388
|
+
const un = (o) => {
|
|
389
|
+
var T;
|
|
390
|
+
o.disabled || E || (O || g(o.value), _ == null || _(o.value), R(!1), (T = m.current) == null || T.focus());
|
|
391
|
+
}, _n = (o) => {
|
|
392
|
+
if (!E)
|
|
393
|
+
if (o.key === "ArrowDown" || o.key === "ArrowUp") {
|
|
394
|
+
if (o.preventDefault(), !w) {
|
|
395
|
+
R(!0), P(0);
|
|
807
396
|
return;
|
|
808
397
|
}
|
|
809
|
-
const
|
|
810
|
-
let K =
|
|
811
|
-
K < 0 && (K =
|
|
812
|
-
} else
|
|
813
|
-
},
|
|
398
|
+
const T = o.key === "ArrowDown" ? 1 : -1;
|
|
399
|
+
let K = j + T;
|
|
400
|
+
K < 0 && (K = k.length - 1), K >= k.length && (K = 0), P(K);
|
|
401
|
+
} else o.key === "Enter" || o.key === " " ? (o.preventDefault(), w && j >= 0 && k[j] ? un(k[j]) : R((T) => !T)) : o.key === "Escape" && w && (o.preventDefault(), R(!1));
|
|
402
|
+
}, dn = d(
|
|
814
403
|
"wui-select-container",
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
),
|
|
404
|
+
v.container,
|
|
405
|
+
nn && v.floatingContainer,
|
|
406
|
+
n == null ? void 0 : n.container,
|
|
407
|
+
M
|
|
408
|
+
), an = d(
|
|
820
409
|
"wui-select-trigger",
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
410
|
+
v.trigger,
|
|
411
|
+
w && v.open,
|
|
412
|
+
y && v.hasError,
|
|
413
|
+
E && v.disabled,
|
|
414
|
+
n == null ? void 0 : n.trigger
|
|
826
415
|
);
|
|
827
|
-
return /* @__PURE__ */
|
|
416
|
+
return /* @__PURE__ */ q(
|
|
828
417
|
"div",
|
|
829
418
|
{
|
|
830
|
-
ref: (
|
|
831
|
-
|
|
419
|
+
ref: (o) => {
|
|
420
|
+
Y.current = o, typeof r == "function" ? r(o) : r && (r.current = o);
|
|
832
421
|
},
|
|
833
|
-
className:
|
|
834
|
-
style:
|
|
835
|
-
"data-testid":
|
|
422
|
+
className: dn,
|
|
423
|
+
style: s(H),
|
|
424
|
+
"data-testid": Q,
|
|
836
425
|
children: [
|
|
837
|
-
!
|
|
426
|
+
!Z && h && /* @__PURE__ */ q(
|
|
838
427
|
"label",
|
|
839
428
|
{
|
|
840
|
-
id:
|
|
841
|
-
className:
|
|
842
|
-
style:
|
|
429
|
+
id: W,
|
|
430
|
+
className: d("wui-select-label", v.label, n == null ? void 0 : n.label),
|
|
431
|
+
style: e == null ? void 0 : e.label,
|
|
843
432
|
onClick: () => {
|
|
844
|
-
var
|
|
845
|
-
return !
|
|
433
|
+
var o;
|
|
434
|
+
return !E && ((o = m.current) == null ? void 0 : o.focus());
|
|
846
435
|
},
|
|
847
436
|
children: [
|
|
848
|
-
|
|
849
|
-
|
|
437
|
+
h,
|
|
438
|
+
z && /* @__PURE__ */ c("span", { className: v.requiredAsterisk, "aria-hidden": "true", children: "*" })
|
|
850
439
|
]
|
|
851
440
|
}
|
|
852
441
|
),
|
|
853
|
-
|
|
854
|
-
/* @__PURE__ */
|
|
442
|
+
$ && /* @__PURE__ */ c("input", { type: "hidden", name: $, value: D || "" }),
|
|
443
|
+
/* @__PURE__ */ q(
|
|
855
444
|
"div",
|
|
856
445
|
{
|
|
857
|
-
className:
|
|
446
|
+
className: d(
|
|
858
447
|
"wui-select-wrapper",
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
448
|
+
v.selectWrapper,
|
|
449
|
+
nn && v.withFloatingLabel,
|
|
450
|
+
w && v.selectWrapperOpen,
|
|
451
|
+
n == null ? void 0 : n.wrapper
|
|
863
452
|
),
|
|
864
|
-
style:
|
|
453
|
+
style: e == null ? void 0 : e.wrapper,
|
|
865
454
|
children: [
|
|
866
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ q(
|
|
867
456
|
"button",
|
|
868
457
|
{
|
|
869
|
-
ref:
|
|
870
|
-
id:
|
|
458
|
+
ref: m,
|
|
459
|
+
id: i,
|
|
871
460
|
type: "button",
|
|
872
461
|
role: "combobox",
|
|
873
|
-
"aria-expanded":
|
|
462
|
+
"aria-expanded": w,
|
|
874
463
|
"aria-haspopup": "listbox",
|
|
875
|
-
"aria-controls":
|
|
876
|
-
"aria-labelledby":
|
|
877
|
-
"aria-invalid":
|
|
878
|
-
"aria-describedby":
|
|
879
|
-
disabled:
|
|
880
|
-
onClick: () => !
|
|
881
|
-
onFocus: () =>
|
|
882
|
-
onBlur: () =>
|
|
883
|
-
onKeyDown:
|
|
884
|
-
className:
|
|
885
|
-
style:
|
|
464
|
+
"aria-controls": V,
|
|
465
|
+
"aria-labelledby": h ? W : void 0,
|
|
466
|
+
"aria-invalid": y ? "true" : "false",
|
|
467
|
+
"aria-describedby": A,
|
|
468
|
+
disabled: E,
|
|
469
|
+
onClick: () => !E && R((o) => !o),
|
|
470
|
+
onFocus: () => B(!0),
|
|
471
|
+
onBlur: () => B(!1),
|
|
472
|
+
onKeyDown: _n,
|
|
473
|
+
className: an,
|
|
474
|
+
style: e == null ? void 0 : e.trigger,
|
|
886
475
|
children: [
|
|
887
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ c(
|
|
888
477
|
"span",
|
|
889
478
|
{
|
|
890
|
-
className:
|
|
479
|
+
className: d(
|
|
891
480
|
"wui-select-value",
|
|
892
|
-
|
|
893
|
-
!
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
481
|
+
v.value,
|
|
482
|
+
!S && v.placeholder,
|
|
483
|
+
nn && !S && v.floatingPlaceholder,
|
|
484
|
+
cn && v.floated,
|
|
485
|
+
S ? n == null ? void 0 : n.value : n == null ? void 0 : n.placeholder
|
|
897
486
|
),
|
|
898
|
-
style:
|
|
899
|
-
children:
|
|
487
|
+
style: S ? e == null ? void 0 : e.value : e == null ? void 0 : e.placeholder,
|
|
488
|
+
children: S ? S.label : I
|
|
900
489
|
}
|
|
901
490
|
),
|
|
902
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ c(
|
|
903
492
|
"span",
|
|
904
493
|
{
|
|
905
|
-
className:
|
|
494
|
+
className: d(
|
|
906
495
|
"wui-select-arrow",
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
496
|
+
v.arrow,
|
|
497
|
+
w && v.arrowOpen,
|
|
498
|
+
n == null ? void 0 : n.arrow
|
|
910
499
|
),
|
|
911
|
-
style:
|
|
500
|
+
style: e == null ? void 0 : e.arrow,
|
|
912
501
|
"aria-hidden": "true",
|
|
913
|
-
children: /* @__PURE__ */
|
|
502
|
+
children: /* @__PURE__ */ c(
|
|
914
503
|
"svg",
|
|
915
504
|
{
|
|
916
505
|
width: "14",
|
|
@@ -919,7 +508,7 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
|
|
|
919
508
|
fill: "none",
|
|
920
509
|
stroke: "currentColor",
|
|
921
510
|
strokeWidth: "2.5",
|
|
922
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ c("polyline", { points: "6 9 12 15 18 9" })
|
|
923
512
|
}
|
|
924
513
|
)
|
|
925
514
|
}
|
|
@@ -927,78 +516,78 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
|
|
|
927
516
|
]
|
|
928
517
|
}
|
|
929
518
|
),
|
|
930
|
-
|
|
519
|
+
nn && /* @__PURE__ */ c(
|
|
931
520
|
"label",
|
|
932
521
|
{
|
|
933
|
-
id:
|
|
934
|
-
htmlFor:
|
|
935
|
-
className:
|
|
522
|
+
id: W,
|
|
523
|
+
htmlFor: i,
|
|
524
|
+
className: d(
|
|
936
525
|
"wui-select-floating-label",
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
(
|
|
526
|
+
v.floatingLabel,
|
|
527
|
+
cn && v.floated,
|
|
528
|
+
(n == null ? void 0 : n.floatingLabel) || (n == null ? void 0 : n.label)
|
|
940
529
|
),
|
|
941
|
-
style: (
|
|
530
|
+
style: (e == null ? void 0 : e.floatingLabel) || (e == null ? void 0 : e.label),
|
|
942
531
|
onClick: () => {
|
|
943
|
-
var
|
|
944
|
-
return !
|
|
532
|
+
var o;
|
|
533
|
+
return !E && ((o = m.current) == null ? void 0 : o.focus());
|
|
945
534
|
},
|
|
946
|
-
children: /* @__PURE__ */
|
|
947
|
-
|
|
948
|
-
|
|
535
|
+
children: /* @__PURE__ */ q("span", { className: v.floatingLabelText, children: [
|
|
536
|
+
h,
|
|
537
|
+
z && /* @__PURE__ */ c("span", { className: v.requiredAsterisk, "aria-hidden": "true", children: "*" })
|
|
949
538
|
] })
|
|
950
539
|
}
|
|
951
540
|
),
|
|
952
|
-
|
|
541
|
+
w && /* @__PURE__ */ c(
|
|
953
542
|
"ul",
|
|
954
543
|
{
|
|
955
|
-
id:
|
|
544
|
+
id: V,
|
|
956
545
|
role: "listbox",
|
|
957
|
-
"aria-labelledby":
|
|
958
|
-
className:
|
|
546
|
+
"aria-labelledby": h ? W : void 0,
|
|
547
|
+
className: d(
|
|
959
548
|
"wui-select-dropdown",
|
|
960
|
-
|
|
961
|
-
|
|
549
|
+
v.dropdown,
|
|
550
|
+
n == null ? void 0 : n.dropdown
|
|
962
551
|
),
|
|
963
|
-
style:
|
|
964
|
-
children:
|
|
965
|
-
const K =
|
|
966
|
-
return /* @__PURE__ */
|
|
552
|
+
style: e == null ? void 0 : e.dropdown,
|
|
553
|
+
children: k.map((o, T) => {
|
|
554
|
+
const K = o.value === D, hn = T === j;
|
|
555
|
+
return /* @__PURE__ */ q(
|
|
967
556
|
"li",
|
|
968
557
|
{
|
|
969
558
|
role: "option",
|
|
970
559
|
"aria-selected": K,
|
|
971
|
-
"aria-disabled":
|
|
972
|
-
className:
|
|
560
|
+
"aria-disabled": o.disabled || void 0,
|
|
561
|
+
className: d(
|
|
973
562
|
"wui-select-option",
|
|
974
|
-
|
|
975
|
-
K &&
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
K && (
|
|
563
|
+
v.option,
|
|
564
|
+
K && v.optionSelected,
|
|
565
|
+
hn && v.optionActive,
|
|
566
|
+
o.disabled && v.optionDisabled,
|
|
567
|
+
n == null ? void 0 : n.option,
|
|
568
|
+
K && (n == null ? void 0 : n.selectedOption)
|
|
980
569
|
),
|
|
981
570
|
style: {
|
|
982
|
-
...
|
|
983
|
-
...K ?
|
|
571
|
+
...e == null ? void 0 : e.option,
|
|
572
|
+
...K ? e == null ? void 0 : e.selectedOption : void 0
|
|
984
573
|
},
|
|
985
|
-
onClick: () =>
|
|
574
|
+
onClick: () => un(o),
|
|
986
575
|
children: [
|
|
987
|
-
/* @__PURE__ */
|
|
988
|
-
K && /* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ c("span", { children: o.label }),
|
|
577
|
+
K && /* @__PURE__ */ c(
|
|
989
578
|
"svg",
|
|
990
579
|
{
|
|
991
|
-
className:
|
|
992
|
-
style:
|
|
580
|
+
className: d(v.checkIcon, n == null ? void 0 : n.checkIcon),
|
|
581
|
+
style: e == null ? void 0 : e.checkIcon,
|
|
993
582
|
viewBox: "0 0 24 24",
|
|
994
583
|
strokeWidth: "3",
|
|
995
584
|
"aria-hidden": "true",
|
|
996
|
-
children: /* @__PURE__ */
|
|
585
|
+
children: /* @__PURE__ */ c("polyline", { points: "20 6 9 17 4 12" })
|
|
997
586
|
}
|
|
998
587
|
)
|
|
999
588
|
]
|
|
1000
589
|
},
|
|
1001
|
-
|
|
590
|
+
o.value
|
|
1002
591
|
);
|
|
1003
592
|
})
|
|
1004
593
|
}
|
|
@@ -1006,308 +595,308 @@ const Or = "_container_q8gl5_1", Vr = "_floatingContainer_q8gl5_15", Dr = "_sele
|
|
|
1006
595
|
]
|
|
1007
596
|
}
|
|
1008
597
|
),
|
|
1009
|
-
|
|
598
|
+
y && /* @__PURE__ */ c(
|
|
1010
599
|
"span",
|
|
1011
600
|
{
|
|
1012
|
-
id:
|
|
601
|
+
id: A,
|
|
1013
602
|
role: "alert",
|
|
1014
|
-
className:
|
|
603
|
+
className: d(
|
|
1015
604
|
"wui-select-error",
|
|
1016
|
-
|
|
1017
|
-
|
|
605
|
+
v.errorMessage,
|
|
606
|
+
n == null ? void 0 : n.errorMessage
|
|
1018
607
|
),
|
|
1019
|
-
style:
|
|
1020
|
-
children:
|
|
608
|
+
style: e == null ? void 0 : e.errorMessage,
|
|
609
|
+
children: b
|
|
1021
610
|
}
|
|
1022
611
|
)
|
|
1023
612
|
]
|
|
1024
613
|
}
|
|
1025
614
|
);
|
|
1026
615
|
});
|
|
1027
|
-
|
|
1028
|
-
const
|
|
1029
|
-
container:
|
|
1030
|
-
floatingContainer:
|
|
1031
|
-
label:
|
|
1032
|
-
requiredAsterisk:
|
|
1033
|
-
wrapper:
|
|
1034
|
-
withFloatingLabel:
|
|
1035
|
-
hasError:
|
|
1036
|
-
disabled:
|
|
1037
|
-
floatingLabel:
|
|
1038
|
-
floatingLabelText:
|
|
1039
|
-
floated:
|
|
1040
|
-
textarea:
|
|
1041
|
-
floatingTextarea:
|
|
1042
|
-
footer:
|
|
1043
|
-
helperText:
|
|
1044
|
-
errorMessage:
|
|
1045
|
-
counter:
|
|
1046
|
-
},
|
|
1047
|
-
id:
|
|
1048
|
-
label:
|
|
1049
|
-
floatingLabel:
|
|
1050
|
-
helperText:
|
|
1051
|
-
errorMessage:
|
|
1052
|
-
required:
|
|
1053
|
-
disabled:
|
|
1054
|
-
readOnly:
|
|
1055
|
-
rows:
|
|
1056
|
-
maxLength:
|
|
1057
|
-
showCount:
|
|
1058
|
-
value:
|
|
1059
|
-
defaultValue:
|
|
1060
|
-
onChange:
|
|
1061
|
-
onFocus:
|
|
1062
|
-
onBlur:
|
|
1063
|
-
className:
|
|
1064
|
-
style:
|
|
1065
|
-
styles:
|
|
1066
|
-
slotClassNames:
|
|
1067
|
-
slotStyles:
|
|
1068
|
-
"data-testid":
|
|
1069
|
-
...
|
|
1070
|
-
},
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1073
|
-
), [
|
|
1074
|
-
|
|
1075
|
-
},
|
|
1076
|
-
|
|
1077
|
-
},
|
|
1078
|
-
|
|
1079
|
-
},
|
|
616
|
+
Fe.displayName = "Select";
|
|
617
|
+
const Ae = "_container_1f8v3_1", Oe = "_floatingContainer_1f8v3_15", Re = "_label_1f8v3_23", Me = "_requiredAsterisk_1f8v3_43", Ve = "_wrapper_1f8v3_55", De = "_withFloatingLabel_1f8v3_79", je = "_hasError_1f8v3_105", Ge = "_disabled_1f8v3_123", He = "_floatingLabel_1f8v3_135", Ue = "_floatingLabelText_1f8v3_179", Pe = "_floated_1f8v3_221", Ke = "_textarea_1f8v3_277", Ze = "_floatingTextarea_1f8v3_317", Je = "_footer_1f8v3_349", Qe = "_helperText_1f8v3_365", Xe = "_errorMessage_1f8v3_375", Ye = "_counter_1f8v3_387", F = {
|
|
618
|
+
container: Ae,
|
|
619
|
+
floatingContainer: Oe,
|
|
620
|
+
label: Re,
|
|
621
|
+
requiredAsterisk: Me,
|
|
622
|
+
wrapper: Ve,
|
|
623
|
+
withFloatingLabel: De,
|
|
624
|
+
hasError: je,
|
|
625
|
+
disabled: Ge,
|
|
626
|
+
floatingLabel: He,
|
|
627
|
+
floatingLabelText: Ue,
|
|
628
|
+
floated: Pe,
|
|
629
|
+
textarea: Ke,
|
|
630
|
+
floatingTextarea: Ze,
|
|
631
|
+
footer: Je,
|
|
632
|
+
helperText: Qe,
|
|
633
|
+
errorMessage: Xe,
|
|
634
|
+
counter: Ye
|
|
635
|
+
}, me = on(function({
|
|
636
|
+
id: k,
|
|
637
|
+
label: t,
|
|
638
|
+
floatingLabel: x,
|
|
639
|
+
helperText: I,
|
|
640
|
+
errorMessage: h,
|
|
641
|
+
required: L = !1,
|
|
642
|
+
disabled: b = !1,
|
|
643
|
+
readOnly: E = !1,
|
|
644
|
+
rows: z = 4,
|
|
645
|
+
maxLength: _,
|
|
646
|
+
showCount: $ = !1,
|
|
647
|
+
value: M,
|
|
648
|
+
defaultValue: H,
|
|
649
|
+
onChange: p,
|
|
650
|
+
onFocus: n,
|
|
651
|
+
onBlur: e,
|
|
652
|
+
className: Q,
|
|
653
|
+
style: a,
|
|
654
|
+
styles: r,
|
|
655
|
+
slotClassNames: u,
|
|
656
|
+
slotStyles: i,
|
|
657
|
+
"data-testid": W,
|
|
658
|
+
...V
|
|
659
|
+
}, A) {
|
|
660
|
+
const O = fn(), U = k || `wui-textarea-${O}`, g = I ? `${U}-helper` : void 0, D = h ? `${U}-error` : void 0, w = M !== void 0, [R, X] = N(
|
|
661
|
+
H !== void 0 ? String(H) : ""
|
|
662
|
+
), [B, j] = N(!1), P = w ? String(M ?? "") : R, Y = P != null && String(P).trim().length > 0, { resolved: m, getCombinedStyle: C } = pn("textarea", r), s = !!h, y = x ?? (m == null ? void 0 : m.floatingLabel) ?? !0, Z = !!(y && t), nn = B || !!Y, cn = (T) => {
|
|
663
|
+
w || X(T.target.value), p == null || p(T);
|
|
664
|
+
}, S = (T) => {
|
|
665
|
+
j(!0), n == null || n(T);
|
|
666
|
+
}, un = (T) => {
|
|
667
|
+
j(!1), e == null || e(T);
|
|
668
|
+
}, _n = d(
|
|
1080
669
|
"wui-textarea-container",
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
),
|
|
670
|
+
F.container,
|
|
671
|
+
Z && F.floatingContainer,
|
|
672
|
+
u == null ? void 0 : u.container,
|
|
673
|
+
Q
|
|
674
|
+
), dn = d(
|
|
1086
675
|
"wui-textarea-wrapper",
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
),
|
|
676
|
+
F.wrapper,
|
|
677
|
+
Z && F.withFloatingLabel,
|
|
678
|
+
s && F.hasError,
|
|
679
|
+
b && F.disabled,
|
|
680
|
+
u == null ? void 0 : u.wrapper
|
|
681
|
+
), an = d(
|
|
1093
682
|
"wui-textarea-field",
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
),
|
|
1099
|
-
return /* @__PURE__ */
|
|
1100
|
-
!
|
|
683
|
+
F.textarea,
|
|
684
|
+
Z && F.floatingTextarea,
|
|
685
|
+
nn && F.floated,
|
|
686
|
+
u == null ? void 0 : u.textarea
|
|
687
|
+
), o = [D, g].filter(Boolean).join(" ") || void 0;
|
|
688
|
+
return /* @__PURE__ */ q("div", { className: _n, style: C(a), "data-testid": W, children: [
|
|
689
|
+
!y && t && /* @__PURE__ */ q(
|
|
1101
690
|
"label",
|
|
1102
691
|
{
|
|
1103
|
-
htmlFor:
|
|
1104
|
-
className:
|
|
1105
|
-
style:
|
|
692
|
+
htmlFor: U,
|
|
693
|
+
className: d("wui-textarea-label", F.label, u == null ? void 0 : u.label),
|
|
694
|
+
style: i == null ? void 0 : i.label,
|
|
1106
695
|
children: [
|
|
1107
|
-
|
|
1108
|
-
|
|
696
|
+
t,
|
|
697
|
+
L && /* @__PURE__ */ c("span", { className: F.requiredAsterisk, "aria-hidden": "true", children: "*" })
|
|
1109
698
|
]
|
|
1110
699
|
}
|
|
1111
700
|
),
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
|
|
701
|
+
/* @__PURE__ */ q("div", { className: dn, style: i == null ? void 0 : i.wrapper, children: [
|
|
702
|
+
Z && /* @__PURE__ */ c(
|
|
1114
703
|
"label",
|
|
1115
704
|
{
|
|
1116
|
-
htmlFor:
|
|
1117
|
-
className:
|
|
705
|
+
htmlFor: U,
|
|
706
|
+
className: d(
|
|
1118
707
|
"wui-textarea-floating-label",
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
(
|
|
708
|
+
F.floatingLabel,
|
|
709
|
+
nn && F.floated,
|
|
710
|
+
(u == null ? void 0 : u.floatingLabel) || (u == null ? void 0 : u.label)
|
|
1122
711
|
),
|
|
1123
|
-
style: (
|
|
1124
|
-
children: /* @__PURE__ */
|
|
1125
|
-
|
|
1126
|
-
|
|
712
|
+
style: (i == null ? void 0 : i.floatingLabel) || (i == null ? void 0 : i.label),
|
|
713
|
+
children: /* @__PURE__ */ q("span", { className: F.floatingLabelText, children: [
|
|
714
|
+
t,
|
|
715
|
+
L && /* @__PURE__ */ c("span", { className: F.requiredAsterisk, "aria-hidden": "true", children: "*" })
|
|
1127
716
|
] })
|
|
1128
717
|
}
|
|
1129
718
|
),
|
|
1130
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ c(
|
|
1131
720
|
"textarea",
|
|
1132
721
|
{
|
|
1133
|
-
ref:
|
|
1134
|
-
id:
|
|
1135
|
-
rows:
|
|
1136
|
-
maxLength:
|
|
1137
|
-
value:
|
|
1138
|
-
defaultValue:
|
|
1139
|
-
onChange:
|
|
1140
|
-
onFocus:
|
|
1141
|
-
onBlur:
|
|
1142
|
-
disabled:
|
|
1143
|
-
readOnly:
|
|
1144
|
-
required:
|
|
1145
|
-
"aria-invalid":
|
|
1146
|
-
"aria-describedby":
|
|
1147
|
-
className:
|
|
1148
|
-
style:
|
|
1149
|
-
...
|
|
722
|
+
ref: A,
|
|
723
|
+
id: U,
|
|
724
|
+
rows: z,
|
|
725
|
+
maxLength: _,
|
|
726
|
+
value: w ? M : void 0,
|
|
727
|
+
defaultValue: w ? void 0 : H,
|
|
728
|
+
onChange: cn,
|
|
729
|
+
onFocus: S,
|
|
730
|
+
onBlur: un,
|
|
731
|
+
disabled: b,
|
|
732
|
+
readOnly: E,
|
|
733
|
+
required: L,
|
|
734
|
+
"aria-invalid": s ? "true" : "false",
|
|
735
|
+
"aria-describedby": o,
|
|
736
|
+
className: an,
|
|
737
|
+
style: i == null ? void 0 : i.textarea,
|
|
738
|
+
...V
|
|
1150
739
|
}
|
|
1151
740
|
)
|
|
1152
741
|
] }),
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
|
|
742
|
+
/* @__PURE__ */ q("div", { className: F.footer, children: [
|
|
743
|
+
s ? /* @__PURE__ */ c(
|
|
1155
744
|
"span",
|
|
1156
745
|
{
|
|
1157
|
-
id:
|
|
746
|
+
id: D,
|
|
1158
747
|
role: "alert",
|
|
1159
|
-
className:
|
|
748
|
+
className: d(
|
|
1160
749
|
"wui-textarea-error",
|
|
1161
|
-
|
|
1162
|
-
|
|
750
|
+
F.errorMessage,
|
|
751
|
+
u == null ? void 0 : u.errorMessage
|
|
1163
752
|
),
|
|
1164
|
-
style:
|
|
1165
|
-
children:
|
|
753
|
+
style: i == null ? void 0 : i.errorMessage,
|
|
754
|
+
children: h
|
|
1166
755
|
}
|
|
1167
|
-
) :
|
|
756
|
+
) : I ? /* @__PURE__ */ c(
|
|
1168
757
|
"span",
|
|
1169
758
|
{
|
|
1170
|
-
id:
|
|
1171
|
-
className:
|
|
759
|
+
id: g,
|
|
760
|
+
className: d(
|
|
1172
761
|
"wui-textarea-helper",
|
|
1173
|
-
|
|
1174
|
-
|
|
762
|
+
F.helperText,
|
|
763
|
+
u == null ? void 0 : u.helperText
|
|
1175
764
|
),
|
|
1176
|
-
style:
|
|
1177
|
-
children:
|
|
765
|
+
style: i == null ? void 0 : i.helperText,
|
|
766
|
+
children: I
|
|
1178
767
|
}
|
|
1179
|
-
) : /* @__PURE__ */
|
|
1180
|
-
|
|
768
|
+
) : /* @__PURE__ */ c("span", {}),
|
|
769
|
+
$ && /* @__PURE__ */ c(
|
|
1181
770
|
"span",
|
|
1182
771
|
{
|
|
1183
|
-
className:
|
|
772
|
+
className: d(
|
|
1184
773
|
"wui-textarea-counter",
|
|
1185
|
-
|
|
1186
|
-
|
|
774
|
+
F.counter,
|
|
775
|
+
u == null ? void 0 : u.counter
|
|
1187
776
|
),
|
|
1188
|
-
style:
|
|
777
|
+
style: i == null ? void 0 : i.counter,
|
|
1189
778
|
"aria-live": "polite",
|
|
1190
|
-
children:
|
|
779
|
+
children: _ !== void 0 ? `${P.length} / ${_}` : P.length
|
|
1191
780
|
}
|
|
1192
781
|
)
|
|
1193
782
|
] })
|
|
1194
783
|
] });
|
|
1195
784
|
});
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1198
|
-
container:
|
|
1199
|
-
disabled:
|
|
1200
|
-
radio:
|
|
1201
|
-
labelWrapper:
|
|
1202
|
-
label:
|
|
1203
|
-
labelChecked:
|
|
1204
|
-
description:
|
|
1205
|
-
groupContainer:
|
|
1206
|
-
groupLabel:
|
|
1207
|
-
optionsVertical:
|
|
1208
|
-
optionsHorizontal:
|
|
1209
|
-
groupError:
|
|
1210
|
-
},
|
|
1211
|
-
function
|
|
1212
|
-
return
|
|
785
|
+
me.displayName = "Textarea";
|
|
786
|
+
const ye = "_container_1ek6o_1", le = "_disabled_1ek6o_29", Ne = "_radio_1ek6o_39", Se = "_labelWrapper_1ek6o_71", Ce = "_label_1ek6o_71", se = "_labelChecked_1ek6o_99", ni = "_description_1ek6o_109", ei = "_groupContainer_1ek6o_121", ii = "_groupLabel_1ek6o_135", ri = "_optionsVertical_1ek6o_149", ci = "_optionsHorizontal_1ek6o_161", di = "_groupError_1ek6o_175", l = {
|
|
787
|
+
container: ye,
|
|
788
|
+
disabled: le,
|
|
789
|
+
radio: Ne,
|
|
790
|
+
labelWrapper: Se,
|
|
791
|
+
label: Ce,
|
|
792
|
+
labelChecked: se,
|
|
793
|
+
description: ni,
|
|
794
|
+
groupContainer: ei,
|
|
795
|
+
groupLabel: ii,
|
|
796
|
+
optionsVertical: ri,
|
|
797
|
+
optionsHorizontal: ci,
|
|
798
|
+
groupError: di
|
|
799
|
+
}, vn = Bn(null);
|
|
800
|
+
function ai() {
|
|
801
|
+
return qn(vn);
|
|
1213
802
|
}
|
|
1214
|
-
const
|
|
1215
|
-
label:
|
|
1216
|
-
description:
|
|
1217
|
-
value:
|
|
1218
|
-
size:
|
|
1219
|
-
color:
|
|
1220
|
-
checked:
|
|
1221
|
-
defaultChecked:
|
|
1222
|
-
disabled:
|
|
1223
|
-
onChange:
|
|
1224
|
-
name:
|
|
1225
|
-
className:
|
|
1226
|
-
style:
|
|
1227
|
-
styles:
|
|
1228
|
-
slotClassNames:
|
|
1229
|
-
slotStyles:
|
|
1230
|
-
"data-testid":
|
|
1231
|
-
id:
|
|
1232
|
-
...
|
|
1233
|
-
},
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1236
|
-
const
|
|
1237
|
-
...(
|
|
1238
|
-
...
|
|
1239
|
-
...
|
|
1240
|
-
...
|
|
1241
|
-
}, { resolved:
|
|
1242
|
-
var
|
|
1243
|
-
|
|
1244
|
-
},
|
|
803
|
+
const kn = on(function({
|
|
804
|
+
label: k,
|
|
805
|
+
description: t,
|
|
806
|
+
value: x,
|
|
807
|
+
size: I,
|
|
808
|
+
color: h,
|
|
809
|
+
checked: L,
|
|
810
|
+
defaultChecked: b = !1,
|
|
811
|
+
disabled: E = !1,
|
|
812
|
+
onChange: z,
|
|
813
|
+
name: _,
|
|
814
|
+
className: $,
|
|
815
|
+
style: M,
|
|
816
|
+
styles: H,
|
|
817
|
+
slotClassNames: p,
|
|
818
|
+
slotStyles: n,
|
|
819
|
+
"data-testid": e,
|
|
820
|
+
id: Q,
|
|
821
|
+
...a
|
|
822
|
+
}, r) {
|
|
823
|
+
const u = tn(null);
|
|
824
|
+
bn(r, () => u.current);
|
|
825
|
+
const i = ai(), W = !!i, V = _ || (i == null ? void 0 : i.name), A = W ? (i == null ? void 0 : i.value) !== void 0 && x !== void 0 ? i.value === x : L !== void 0 ? L : b : L !== void 0 ? L : void 0, [O, U] = N(b), g = W ? A : L !== void 0 ? L : O, D = E || !!(i != null && i.disabled), w = I ?? (i == null ? void 0 : i.size), R = h ?? (i == null ? void 0 : i.color), X = {
|
|
826
|
+
...(i == null ? void 0 : i.groupStyles) || {},
|
|
827
|
+
...H || {},
|
|
828
|
+
...w !== void 0 ? { size: w } : {},
|
|
829
|
+
...R !== void 0 ? { color: R } : {}
|
|
830
|
+
}, { resolved: B, getCombinedStyle: j } = pn("radio", X), P = R || (B == null ? void 0 : B.color) || (B == null ? void 0 : B.checkedColor), Y = w !== void 0 ? typeof w == "number" ? `${w}px` : w : (B == null ? void 0 : B.size) !== void 0 ? typeof B.size == "number" ? `${B.size}px` : B.size : void 0, m = (y) => {
|
|
831
|
+
var Z;
|
|
832
|
+
D || (!W && L === void 0 && U(y.target.checked), i && x !== void 0 && ((Z = i.onChange) == null || Z.call(i, x)), z == null || z(y));
|
|
833
|
+
}, C = d(
|
|
1245
834
|
"wui-radio-container",
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
),
|
|
835
|
+
l.container,
|
|
836
|
+
D && l.disabled,
|
|
837
|
+
p == null ? void 0 : p.container,
|
|
838
|
+
$
|
|
839
|
+
), s = d(
|
|
1251
840
|
"wui-radio-input",
|
|
1252
|
-
|
|
1253
|
-
(
|
|
841
|
+
l.radio,
|
|
842
|
+
(p == null ? void 0 : p.radio) || (p == null ? void 0 : p.control)
|
|
1254
843
|
);
|
|
1255
|
-
return /* @__PURE__ */
|
|
1256
|
-
/* @__PURE__ */
|
|
844
|
+
return /* @__PURE__ */ q("label", { className: C, style: j(M), "data-testid": e, children: [
|
|
845
|
+
/* @__PURE__ */ c(
|
|
1257
846
|
"input",
|
|
1258
847
|
{
|
|
1259
|
-
ref:
|
|
1260
|
-
id:
|
|
848
|
+
ref: u,
|
|
849
|
+
id: Q,
|
|
1261
850
|
type: "radio",
|
|
1262
|
-
name:
|
|
1263
|
-
value:
|
|
1264
|
-
checked:
|
|
1265
|
-
defaultChecked:
|
|
1266
|
-
disabled:
|
|
1267
|
-
onChange:
|
|
1268
|
-
className:
|
|
851
|
+
name: V,
|
|
852
|
+
value: x,
|
|
853
|
+
checked: g,
|
|
854
|
+
defaultChecked: W ? void 0 : b,
|
|
855
|
+
disabled: D,
|
|
856
|
+
onChange: m,
|
|
857
|
+
className: s,
|
|
1269
858
|
style: {
|
|
1270
|
-
...
|
|
1271
|
-
...
|
|
1272
|
-
...(
|
|
859
|
+
...P ? { accentColor: P } : void 0,
|
|
860
|
+
...Y ? { width: Y, height: Y } : void 0,
|
|
861
|
+
...(n == null ? void 0 : n.radio) || (n == null ? void 0 : n.control)
|
|
1273
862
|
},
|
|
1274
|
-
...
|
|
863
|
+
...a
|
|
1275
864
|
}
|
|
1276
865
|
),
|
|
1277
|
-
(
|
|
866
|
+
(k || t) && /* @__PURE__ */ q(
|
|
1278
867
|
"span",
|
|
1279
868
|
{
|
|
1280
|
-
className:
|
|
869
|
+
className: d(
|
|
1281
870
|
"wui-radio-label-wrapper",
|
|
1282
|
-
|
|
1283
|
-
|
|
871
|
+
l.labelWrapper,
|
|
872
|
+
p == null ? void 0 : p.labelWrapper
|
|
1284
873
|
),
|
|
1285
|
-
style:
|
|
874
|
+
style: n == null ? void 0 : n.labelWrapper,
|
|
1286
875
|
children: [
|
|
1287
|
-
|
|
876
|
+
k && /* @__PURE__ */ c(
|
|
1288
877
|
"span",
|
|
1289
878
|
{
|
|
1290
|
-
className:
|
|
879
|
+
className: d(
|
|
1291
880
|
"wui-radio-label",
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
881
|
+
l.label,
|
|
882
|
+
g && l.labelChecked,
|
|
883
|
+
p == null ? void 0 : p.label,
|
|
884
|
+
g && (p == null ? void 0 : p.labelChecked)
|
|
1296
885
|
),
|
|
1297
|
-
style:
|
|
1298
|
-
children:
|
|
886
|
+
style: n == null ? void 0 : n.label,
|
|
887
|
+
children: k
|
|
1299
888
|
}
|
|
1300
889
|
),
|
|
1301
|
-
|
|
890
|
+
t && /* @__PURE__ */ c(
|
|
1302
891
|
"span",
|
|
1303
892
|
{
|
|
1304
|
-
className:
|
|
893
|
+
className: d(
|
|
1305
894
|
"wui-radio-description",
|
|
1306
|
-
|
|
1307
|
-
|
|
895
|
+
l.description,
|
|
896
|
+
p == null ? void 0 : p.description
|
|
1308
897
|
),
|
|
1309
|
-
style:
|
|
1310
|
-
children:
|
|
898
|
+
style: n == null ? void 0 : n.description,
|
|
899
|
+
children: t
|
|
1311
900
|
}
|
|
1312
901
|
)
|
|
1313
902
|
]
|
|
@@ -1315,195 +904,195 @@ const Re = ce(function({
|
|
|
1315
904
|
)
|
|
1316
905
|
] });
|
|
1317
906
|
});
|
|
1318
|
-
|
|
1319
|
-
const
|
|
1320
|
-
name:
|
|
1321
|
-
value:
|
|
1322
|
-
defaultValue:
|
|
1323
|
-
onChange:
|
|
1324
|
-
options:
|
|
1325
|
-
direction:
|
|
1326
|
-
label:
|
|
1327
|
-
errorMessage:
|
|
1328
|
-
disabled:
|
|
1329
|
-
size:
|
|
1330
|
-
color:
|
|
1331
|
-
children:
|
|
1332
|
-
styles:
|
|
1333
|
-
className:
|
|
1334
|
-
style:
|
|
1335
|
-
"data-testid":
|
|
1336
|
-
},
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1339
|
-
},
|
|
907
|
+
kn.displayName = "Radio";
|
|
908
|
+
const oi = on(function({
|
|
909
|
+
name: k,
|
|
910
|
+
value: t,
|
|
911
|
+
defaultValue: x,
|
|
912
|
+
onChange: I,
|
|
913
|
+
options: h,
|
|
914
|
+
direction: L = "vertical",
|
|
915
|
+
label: b,
|
|
916
|
+
errorMessage: E,
|
|
917
|
+
disabled: z = !1,
|
|
918
|
+
size: _,
|
|
919
|
+
color: $,
|
|
920
|
+
children: M,
|
|
921
|
+
styles: H,
|
|
922
|
+
className: p,
|
|
923
|
+
style: n,
|
|
924
|
+
"data-testid": e
|
|
925
|
+
}, Q) {
|
|
926
|
+
const a = fn(), r = k || `wui-radiogroup-${a}`, u = t !== void 0, [i, W] = N(x), V = u ? t : i, A = (g) => {
|
|
927
|
+
z || (u || W(g), I == null || I(g));
|
|
928
|
+
}, O = d(
|
|
1340
929
|
"wui-radiogroup-container",
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
),
|
|
1344
|
-
return /* @__PURE__ */
|
|
1345
|
-
|
|
930
|
+
l.groupContainer,
|
|
931
|
+
p
|
|
932
|
+
), U = L === "horizontal" ? l.optionsHorizontal : l.optionsVertical;
|
|
933
|
+
return /* @__PURE__ */ c(
|
|
934
|
+
vn.Provider,
|
|
1346
935
|
{
|
|
1347
936
|
value: {
|
|
1348
|
-
name:
|
|
1349
|
-
value:
|
|
1350
|
-
onChange:
|
|
1351
|
-
disabled:
|
|
1352
|
-
size:
|
|
1353
|
-
color:
|
|
1354
|
-
groupStyles:
|
|
937
|
+
name: r,
|
|
938
|
+
value: V,
|
|
939
|
+
onChange: A,
|
|
940
|
+
disabled: z,
|
|
941
|
+
size: _,
|
|
942
|
+
color: $,
|
|
943
|
+
groupStyles: H
|
|
1355
944
|
},
|
|
1356
|
-
children: /* @__PURE__ */
|
|
945
|
+
children: /* @__PURE__ */ q(
|
|
1357
946
|
"div",
|
|
1358
947
|
{
|
|
1359
|
-
ref:
|
|
948
|
+
ref: Q,
|
|
1360
949
|
role: "radiogroup",
|
|
1361
|
-
"aria-label": typeof
|
|
1362
|
-
className:
|
|
1363
|
-
style:
|
|
1364
|
-
"data-testid":
|
|
950
|
+
"aria-label": typeof b == "string" ? b : void 0,
|
|
951
|
+
className: O,
|
|
952
|
+
style: n,
|
|
953
|
+
"data-testid": e,
|
|
1365
954
|
children: [
|
|
1366
|
-
|
|
1367
|
-
/* @__PURE__ */
|
|
1368
|
-
|
|
955
|
+
b && /* @__PURE__ */ c("span", { className: l.groupLabel, children: b }),
|
|
956
|
+
/* @__PURE__ */ c("div", { className: U, children: h ? h.map((g) => /* @__PURE__ */ c(
|
|
957
|
+
kn,
|
|
1369
958
|
{
|
|
1370
|
-
value:
|
|
1371
|
-
label:
|
|
1372
|
-
description:
|
|
1373
|
-
disabled:
|
|
1374
|
-
size:
|
|
1375
|
-
color:
|
|
1376
|
-
styles:
|
|
959
|
+
value: g.value,
|
|
960
|
+
label: g.label,
|
|
961
|
+
description: g.description,
|
|
962
|
+
disabled: g.disabled,
|
|
963
|
+
size: g.size,
|
|
964
|
+
color: g.color,
|
|
965
|
+
styles: g.styles
|
|
1377
966
|
},
|
|
1378
|
-
|
|
1379
|
-
)) :
|
|
1380
|
-
|
|
967
|
+
g.value
|
|
968
|
+
)) : M }),
|
|
969
|
+
E && /* @__PURE__ */ c("span", { role: "alert", className: l.groupError, children: E })
|
|
1381
970
|
]
|
|
1382
971
|
}
|
|
1383
972
|
)
|
|
1384
973
|
}
|
|
1385
974
|
);
|
|
1386
975
|
});
|
|
1387
|
-
|
|
1388
|
-
const
|
|
1389
|
-
container:
|
|
1390
|
-
disabled:
|
|
1391
|
-
hiddenInput:
|
|
1392
|
-
track:
|
|
1393
|
-
checked:
|
|
1394
|
-
thumb:
|
|
1395
|
-
sizeSmall:
|
|
1396
|
-
sizeMedium:
|
|
1397
|
-
sizeLarge:
|
|
1398
|
-
icon:
|
|
1399
|
-
labelWrapper:
|
|
1400
|
-
label:
|
|
1401
|
-
description:
|
|
1402
|
-
},
|
|
1403
|
-
small:
|
|
1404
|
-
medium:
|
|
1405
|
-
large:
|
|
1406
|
-
},
|
|
1407
|
-
checked:
|
|
1408
|
-
defaultChecked:
|
|
1409
|
-
onChange:
|
|
1410
|
-
disabled:
|
|
1411
|
-
size:
|
|
1412
|
-
label:
|
|
1413
|
-
description:
|
|
1414
|
-
checkedIcon:
|
|
1415
|
-
uncheckedIcon:
|
|
1416
|
-
name:
|
|
1417
|
-
value:
|
|
1418
|
-
className:
|
|
1419
|
-
style:
|
|
1420
|
-
styles:
|
|
1421
|
-
slotClassNames:
|
|
1422
|
-
slotStyles:
|
|
1423
|
-
"data-testid":
|
|
1424
|
-
id:
|
|
1425
|
-
...
|
|
1426
|
-
},
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1429
|
-
const
|
|
1430
|
-
if (
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1433
|
-
},
|
|
976
|
+
oi.displayName = "RadioGroup";
|
|
977
|
+
const ui = "_container_1f1un_1", ti = "_disabled_1f1un_29", pi = "_hiddenInput_1f1un_39", _i = "_track_1f1un_59", fi = "_checked_1f1un_101", hi = "_thumb_1f1un_111", bi = "_sizeSmall_1f1un_165", gi = "_sizeMedium_1f1un_179", wi = "_sizeLarge_1f1un_193", vi = "_icon_1f1un_209", ki = "_labelWrapper_1f1un_231", xi = "_label_1f1un_231", Ii = "_description_1f1un_253", J = {
|
|
978
|
+
container: ui,
|
|
979
|
+
disabled: ti,
|
|
980
|
+
hiddenInput: pi,
|
|
981
|
+
track: _i,
|
|
982
|
+
checked: fi,
|
|
983
|
+
thumb: hi,
|
|
984
|
+
sizeSmall: bi,
|
|
985
|
+
sizeMedium: gi,
|
|
986
|
+
sizeLarge: wi,
|
|
987
|
+
icon: vi,
|
|
988
|
+
labelWrapper: ki,
|
|
989
|
+
label: xi,
|
|
990
|
+
description: Ii
|
|
991
|
+
}, Li = {
|
|
992
|
+
small: J.sizeSmall,
|
|
993
|
+
medium: J.sizeMedium,
|
|
994
|
+
large: J.sizeLarge
|
|
995
|
+
}, $i = on(function({
|
|
996
|
+
checked: k,
|
|
997
|
+
defaultChecked: t = !1,
|
|
998
|
+
onChange: x,
|
|
999
|
+
disabled: I = !1,
|
|
1000
|
+
size: h = "medium",
|
|
1001
|
+
label: L,
|
|
1002
|
+
description: b,
|
|
1003
|
+
checkedIcon: E,
|
|
1004
|
+
uncheckedIcon: z,
|
|
1005
|
+
name: _,
|
|
1006
|
+
value: $,
|
|
1007
|
+
className: M,
|
|
1008
|
+
style: H,
|
|
1009
|
+
styles: p,
|
|
1010
|
+
slotClassNames: n,
|
|
1011
|
+
slotStyles: e,
|
|
1012
|
+
"data-testid": Q,
|
|
1013
|
+
id: a,
|
|
1014
|
+
...r
|
|
1015
|
+
}, u) {
|
|
1016
|
+
const i = tn(null);
|
|
1017
|
+
bn(u, () => i.current);
|
|
1018
|
+
const W = k !== void 0, [V, A] = N(t), O = W ? k : V, { getCombinedStyle: U } = pn("switch", p), g = (X) => {
|
|
1019
|
+
if (I) return;
|
|
1020
|
+
const B = X.target.checked;
|
|
1021
|
+
W || A(B), x == null || x(B, X);
|
|
1022
|
+
}, D = d(
|
|
1434
1023
|
"wui-switch-container",
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
),
|
|
1024
|
+
J.container,
|
|
1025
|
+
I && J.disabled,
|
|
1026
|
+
n == null ? void 0 : n.container,
|
|
1027
|
+
M
|
|
1028
|
+
), w = d(
|
|
1440
1029
|
"wui-switch-track",
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
),
|
|
1446
|
-
return /* @__PURE__ */
|
|
1447
|
-
/* @__PURE__ */
|
|
1030
|
+
J.track,
|
|
1031
|
+
Li[h],
|
|
1032
|
+
O && J.checked,
|
|
1033
|
+
n == null ? void 0 : n.track
|
|
1034
|
+
), R = d("wui-switch-thumb", J.thumb, n == null ? void 0 : n.thumb);
|
|
1035
|
+
return /* @__PURE__ */ q("label", { className: D, style: U(H), "data-testid": Q, children: [
|
|
1036
|
+
/* @__PURE__ */ c(
|
|
1448
1037
|
"input",
|
|
1449
1038
|
{
|
|
1450
|
-
ref:
|
|
1451
|
-
id:
|
|
1039
|
+
ref: i,
|
|
1040
|
+
id: a,
|
|
1452
1041
|
type: "checkbox",
|
|
1453
1042
|
role: "switch",
|
|
1454
|
-
name:
|
|
1455
|
-
value:
|
|
1456
|
-
checked:
|
|
1457
|
-
disabled:
|
|
1458
|
-
onChange:
|
|
1459
|
-
className:
|
|
1460
|
-
"aria-checked":
|
|
1461
|
-
...
|
|
1043
|
+
name: _,
|
|
1044
|
+
value: $,
|
|
1045
|
+
checked: O,
|
|
1046
|
+
disabled: I,
|
|
1047
|
+
onChange: g,
|
|
1048
|
+
className: J.hiddenInput,
|
|
1049
|
+
"aria-checked": O,
|
|
1050
|
+
...r
|
|
1462
1051
|
}
|
|
1463
1052
|
),
|
|
1464
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ c("span", { className: w, style: e == null ? void 0 : e.track, "aria-hidden": "true", children: /* @__PURE__ */ c("span", { className: R, style: e == null ? void 0 : e.thumb, children: O ? E && /* @__PURE__ */ c(
|
|
1465
1054
|
"span",
|
|
1466
1055
|
{
|
|
1467
|
-
className:
|
|
1468
|
-
style:
|
|
1469
|
-
children:
|
|
1056
|
+
className: d(J.icon, n == null ? void 0 : n.icon),
|
|
1057
|
+
style: e == null ? void 0 : e.icon,
|
|
1058
|
+
children: E
|
|
1470
1059
|
}
|
|
1471
|
-
) :
|
|
1060
|
+
) : z && /* @__PURE__ */ c(
|
|
1472
1061
|
"span",
|
|
1473
1062
|
{
|
|
1474
|
-
className:
|
|
1475
|
-
style:
|
|
1476
|
-
children:
|
|
1063
|
+
className: d(J.icon, n == null ? void 0 : n.icon),
|
|
1064
|
+
style: e == null ? void 0 : e.icon,
|
|
1065
|
+
children: z
|
|
1477
1066
|
}
|
|
1478
1067
|
) }) }),
|
|
1479
|
-
(
|
|
1068
|
+
(L || b) && /* @__PURE__ */ q(
|
|
1480
1069
|
"span",
|
|
1481
1070
|
{
|
|
1482
|
-
className:
|
|
1071
|
+
className: d(
|
|
1483
1072
|
"wui-switch-label-wrapper",
|
|
1484
|
-
|
|
1485
|
-
|
|
1073
|
+
J.labelWrapper,
|
|
1074
|
+
n == null ? void 0 : n.labelWrapper
|
|
1486
1075
|
),
|
|
1487
|
-
style:
|
|
1076
|
+
style: e == null ? void 0 : e.labelWrapper,
|
|
1488
1077
|
children: [
|
|
1489
|
-
|
|
1078
|
+
L && /* @__PURE__ */ c(
|
|
1490
1079
|
"span",
|
|
1491
1080
|
{
|
|
1492
|
-
className:
|
|
1493
|
-
style:
|
|
1494
|
-
children:
|
|
1081
|
+
className: d("wui-switch-label", J.label, n == null ? void 0 : n.label),
|
|
1082
|
+
style: e == null ? void 0 : e.label,
|
|
1083
|
+
children: L
|
|
1495
1084
|
}
|
|
1496
1085
|
),
|
|
1497
|
-
|
|
1086
|
+
b && /* @__PURE__ */ c(
|
|
1498
1087
|
"span",
|
|
1499
1088
|
{
|
|
1500
|
-
className:
|
|
1089
|
+
className: d(
|
|
1501
1090
|
"wui-switch-description",
|
|
1502
|
-
|
|
1503
|
-
|
|
1091
|
+
J.description,
|
|
1092
|
+
n == null ? void 0 : n.description
|
|
1504
1093
|
),
|
|
1505
|
-
style:
|
|
1506
|
-
children:
|
|
1094
|
+
style: e == null ? void 0 : e.description,
|
|
1095
|
+
children: b
|
|
1507
1096
|
}
|
|
1508
1097
|
)
|
|
1509
1098
|
]
|
|
@@ -1511,67 +1100,47 @@ const Un = "_container_17pmz_1", jn = "_disabled_17pmz_15", Zn = "_hiddenInput_1
|
|
|
1511
1100
|
)
|
|
1512
1101
|
] });
|
|
1513
1102
|
});
|
|
1514
|
-
|
|
1515
|
-
const ri = ({
|
|
1516
|
-
children: o,
|
|
1517
|
-
config: t,
|
|
1518
|
-
wrapWithContainer: i = !1,
|
|
1519
|
-
className: c,
|
|
1520
|
-
style: n
|
|
1521
|
-
}) => {
|
|
1522
|
-
const f = Ie(be), d = ke(() => Se(f, t), [f, t]), h = ke(() => {
|
|
1523
|
-
if (!i) return {};
|
|
1524
|
-
const l = _e(
|
|
1525
|
-
d.colors,
|
|
1526
|
-
"wui-color"
|
|
1527
|
-
), x = _e(
|
|
1528
|
-
d.typography,
|
|
1529
|
-
"wui-typography"
|
|
1530
|
-
), I = _e(
|
|
1531
|
-
d.layout,
|
|
1532
|
-
"wui-layout"
|
|
1533
|
-
);
|
|
1534
|
-
return {
|
|
1535
|
-
...l,
|
|
1536
|
-
...x,
|
|
1537
|
-
...I,
|
|
1538
|
-
...n
|
|
1539
|
-
};
|
|
1540
|
-
}, [i, d, n]), w = i ? /* @__PURE__ */ u(
|
|
1541
|
-
"div",
|
|
1542
|
-
{
|
|
1543
|
-
className: c ? `wui-provider-root ${c}` : "wui-provider-root",
|
|
1544
|
-
style: h,
|
|
1545
|
-
children: o
|
|
1546
|
-
}
|
|
1547
|
-
) : o;
|
|
1548
|
-
return /* @__PURE__ */ u(be.Provider, { value: d, children: w });
|
|
1549
|
-
};
|
|
1550
|
-
ri.displayName = "UIProvider";
|
|
1103
|
+
$i.displayName = "Switch";
|
|
1551
1104
|
export {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1105
|
+
Zi as Button,
|
|
1106
|
+
ie as Checkbox,
|
|
1107
|
+
mn as Input,
|
|
1108
|
+
kn as Radio,
|
|
1109
|
+
oi as RadioGroup,
|
|
1110
|
+
vn as RadioGroupContext,
|
|
1111
|
+
Fe as Select,
|
|
1112
|
+
$i as Switch,
|
|
1113
|
+
me as Textarea,
|
|
1114
|
+
Ji as UIContext,
|
|
1115
|
+
Qi as UIProvider,
|
|
1116
|
+
ir as WbButton,
|
|
1117
|
+
rr as buttonStyles,
|
|
1118
|
+
zi as camelToKebab,
|
|
1119
|
+
d as classNames,
|
|
1120
|
+
Fi as configureWebstrail,
|
|
1121
|
+
Xi as deepMerge,
|
|
1122
|
+
Ai as defaultButtonStyles,
|
|
1123
|
+
Oi as defaultColors,
|
|
1124
|
+
Ri as defaultLayout,
|
|
1125
|
+
Mi as defaultResolvedConfig,
|
|
1126
|
+
Vi as defaultTypography,
|
|
1127
|
+
Yi as defaultUIConfig,
|
|
1128
|
+
mi as deriveTokensFromPrimary,
|
|
1129
|
+
yi as getDarkerShade,
|
|
1130
|
+
li as getFocusRingColor,
|
|
1131
|
+
Ni as getSubtleBackgroundColor,
|
|
1132
|
+
Di as getWebstrailConfig,
|
|
1133
|
+
Si as mergeUIConfig,
|
|
1134
|
+
ji as normalizeButtonSize,
|
|
1135
|
+
Gi as normalizeDimension,
|
|
1136
|
+
cr as registerWbButton,
|
|
1137
|
+
Hi as resetWebstrailConfig,
|
|
1138
|
+
Ci as resolveComponentStyles,
|
|
1139
|
+
Ui as resolveEffectiveButtonConfig,
|
|
1140
|
+
si as stylesToCssVars,
|
|
1141
|
+
Pi as subscribeWebstrailConfig,
|
|
1142
|
+
pn as useComponentStyles,
|
|
1143
|
+
ai as useRadioGroup,
|
|
1144
|
+
nr as useUI
|
|
1576
1145
|
};
|
|
1577
1146
|
//# sourceMappingURL=index.js.map
|