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