@utk09/finra-ui 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/Calendar.module-AHlPlLw_.js +362 -0
  2. package/dist/Calendar.module-AHlPlLw_.js.map +1 -0
  3. package/dist/DateInput-D3AUs_l2.js +224 -0
  4. package/dist/DateInput-D3AUs_l2.js.map +1 -0
  5. package/dist/assets/icons/CalendarIcon.d.ts +2 -0
  6. package/dist/assets/icons/ChevronLeftIcon.d.ts +2 -0
  7. package/dist/assets/icons/ChevronRightIcon.d.ts +2 -0
  8. package/dist/assets/icons/index.d.ts +8 -5
  9. package/dist/components/Badge/Badge.d.ts +3 -2
  10. package/dist/components/Button/Button.d.ts +3 -2
  11. package/dist/components/Calendar/Calendar.d.ts +6 -0
  12. package/dist/components/ComboBox/ComboBox.d.ts +3 -3
  13. package/dist/components/DateInput/DateInput.d.ts +16 -0
  14. package/dist/components/DateTenorInput/DateTenorInput.d.ts +16 -0
  15. package/dist/components/FormField/FormField.d.ts +1 -1
  16. package/dist/components/IconButton/IconButton.d.ts +2 -1
  17. package/dist/components/Input/Input.d.ts +3 -2
  18. package/dist/components/NumberInput/NumberInput.d.ts +1 -1
  19. package/dist/components/TenorInput/TenorInput.d.ts +14 -0
  20. package/dist/components/Textarea/Textarea.d.ts +1 -1
  21. package/dist/components/componentIds.d.ts +15 -0
  22. package/dist/dateFormat-CdClN4CU.js +200 -0
  23. package/dist/dateFormat-CdClN4CU.js.map +1 -0
  24. package/dist/dateInput-4sdYyWq0.js +551 -0
  25. package/dist/dateInput-4sdYyWq0.js.map +1 -0
  26. package/dist/finance.d.ts +8 -0
  27. package/dist/finance.js +390 -0
  28. package/dist/finance.js.map +1 -0
  29. package/dist/hooks/useClickOutside.d.ts +6 -0
  30. package/dist/hooks/useControlledValue.d.ts +11 -0
  31. package/dist/hooks/useDisclosure.d.ts +18 -0
  32. package/dist/index.d.ts +21 -17
  33. package/dist/index.js +889 -1288
  34. package/dist/index.js.map +1 -1
  35. package/dist/logic/calendar.d.ts +27 -0
  36. package/dist/logic/combobox.d.ts +23 -0
  37. package/dist/logic/cx.d.ts +6 -0
  38. package/dist/logic/dateInput.d.ts +13 -0
  39. package/dist/styles.css +2 -1
  40. package/dist/tenor-GS2kfKqC.js +111 -0
  41. package/dist/tenor-GS2kfKqC.js.map +1 -0
  42. package/dist/types/variants.d.ts +6 -0
  43. package/dist/unstyled/Calendar/Calendar.d.ts +48 -0
  44. package/dist/unstyled/ComboBox/ComboBox.d.ts +1 -1
  45. package/dist/unstyled/DateInput/DateInput.d.ts +58 -0
  46. package/dist/unstyled/DateTenorInput/DateTenorInput.d.ts +78 -0
  47. package/dist/unstyled/FormField/FormField.d.ts +3 -2
  48. package/dist/unstyled/Slot.d.ts +1 -1
  49. package/dist/unstyled/TenorInput/TenorInput.d.ts +27 -0
  50. package/dist/unstyled.d.ts +24 -20
  51. package/dist/unstyled.js +164 -219
  52. package/dist/unstyled.js.map +1 -1
  53. package/dist/utils/dateFormat.d.ts +17 -0
  54. package/dist/utils/tenor.d.ts +15 -0
  55. package/dist/utils.d.ts +5 -0
  56. package/dist/utils.js +3 -0
  57. package/package.json +23 -14
  58. package/dist/ComboBox-CbLG-Ss1.js +0 -471
  59. package/dist/ComboBox-CbLG-Ss1.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,1300 +1,901 @@
1
- import { jsxs as C, jsx as e, Fragment as ln } from "react/jsx-runtime";
2
- import { forwardRef as D, useRef as Z, useCallback as k, useState as J, useEffect as X, useId as mn, Children as vn, isValidElement as hn, cloneElement as fn, useMemo as yn } from "react";
3
- import { B as bn, I as gn, C as $n, m as tn, S as xn, R as kn, a as wn, b as Nn } from "./ComboBox-CbLG-Ss1.js";
4
- const f = "data-finra-ui", y = {
5
- // Button family
6
- button: "button",
7
- iconButton: "icon-button",
8
- buttonGroup: "button-group",
9
- // Input
10
- input: "input",
11
- inputField: "input-field",
12
- // Textarea
13
- textarea: "textarea",
14
- textareaField: "textarea-field",
15
- textareaCount: "textarea-count",
16
- // NumberInput
17
- numberInput: "number-input",
18
- numberInputField: "number-input-field",
19
- numberInputIncrement: "number-input-increment",
20
- numberInputDecrement: "number-input-decrement",
21
- // FormField
22
- formField: "form-field",
23
- formFieldLabel: "form-field-label",
24
- formFieldHelper: "form-field-helper",
25
- formFieldError: "form-field-error",
26
- // Checkbox
27
- checkbox: "checkbox",
28
- // Switch
29
- switch: "switch",
30
- // RadioButton
31
- radioButton: "radio-button",
32
- // Slider
33
- slider: "slider",
34
- // PillInput
35
- pillInput: "pill-input",
36
- // FileDropZone
37
- fileDropZone: "file-drop-zone",
38
- // Badge
39
- badge: "badge",
40
- // ComboBox
41
- comboBox: "combo-box",
42
- // Divider
43
- divider: "divider"
44
- };
45
- function un(n) {
46
- var a, t, r = "";
47
- if (typeof n == "string" || typeof n == "number") r += n;
48
- else if (typeof n == "object") if (Array.isArray(n)) {
49
- var i = n.length;
50
- for (a = 0; a < i; a++) n[a] && (t = un(n[a])) && (r && (r += " "), r += t);
51
- } else for (t in n) n[t] && (r && (r += " "), r += t);
52
- return r;
53
- }
54
- function w() {
55
- for (var n, a, t = 0, r = "", i = arguments.length; t < i; t++) (n = arguments[t]) && (a = un(n)) && (r && (r += " "), r += a);
56
- return r;
57
- }
58
- const on = (n) => typeof n == "boolean" ? `${n}` : n === 0 ? "0" : n, sn = w, H = (n, a) => (t) => {
59
- var r;
60
- if (a?.variants == null) return sn(n, t?.class, t?.className);
61
- const { variants: i, defaultVariants: s } = a, l = Object.keys(i).map((c) => {
62
- const $ = t?.[c], _ = s?.[c];
63
- if ($ === null) return null;
64
- const v = on($) || on(_);
65
- return i[c][v];
66
- }), p = t && Object.entries(t).reduce((c, $) => {
67
- let [_, v] = $;
68
- return v === void 0 || (c[_] = v), c;
69
- }, {}), m = a == null || (r = a.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((c, $) => {
70
- let { class: _, className: v, ...N } = $;
71
- return Object.entries(N).every((h) => {
72
- let [I, b] = h;
73
- return Array.isArray(b) ? b.includes({
74
- ...s,
75
- ...p
76
- }[I]) : {
77
- ...s,
78
- ...p
79
- }[I] === b;
80
- }) ? [
81
- ...c,
82
- _,
83
- v
84
- ] : c;
85
- }, []);
86
- return sn(n, l, m, t?.class, t?.className);
87
- }, In = "_button_nw9o1_1", Cn = "_variantPrimary_nw9o1_40", Sn = "_variantSecondary_nw9o1_53", Wn = "_variantTertiary_nw9o1_66", Bn = "_sentimentDanger_nw9o1_78", Dn = "_sentimentSuccess_nw9o1_84", Tn = "_sentimentWarning_nw9o1_90", Pn = "_sentimentInfo_nw9o1_96", Fn = "_fullWidth_nw9o1_102", Vn = "_icon_nw9o1_106", E = {
88
- button: In,
89
- variantPrimary: Cn,
90
- variantSecondary: Sn,
91
- variantTertiary: Wn,
92
- sentimentDanger: Bn,
93
- sentimentSuccess: Dn,
94
- sentimentWarning: Tn,
95
- sentimentInfo: Pn,
96
- fullWidth: Fn,
97
- icon: Vn
98
- }, En = {
99
- danger: E.sentimentDanger,
100
- success: E.sentimentSuccess,
101
- warning: E.sentimentWarning,
102
- info: E.sentimentInfo
103
- }, Rn = H(E.button, {
104
- variants: {
105
- variant: {
106
- primary: E.variantPrimary,
107
- secondary: E.variantSecondary,
108
- tertiary: E.variantTertiary
109
- },
110
- fullWidth: {
111
- true: E.fullWidth
112
- }
113
- },
114
- defaultVariants: {
115
- variant: "primary"
116
- }
117
- }), qn = D(
118
- ({ className: n, variant: a, fullWidth: t, sentiment: r, startIcon: i, endIcon: s, children: l, ...p }, m) => /* @__PURE__ */ C(
119
- bn,
120
- {
121
- ref: m,
122
- type: "button",
123
- [f]: y.button,
124
- className: w(
125
- Rn({ variant: a, fullWidth: t }),
126
- r && En[r],
127
- n
128
- ),
129
- ...p,
130
- children: [
131
- i ? /* @__PURE__ */ e("span", { className: E.icon, children: i }) : null,
132
- l,
133
- s ? /* @__PURE__ */ e("span", { className: E.icon, children: s }) : null
134
- ]
135
- }
136
- )
137
- );
138
- qn.displayName = "Button";
139
- const Ln = "_iconButton_wgr1d_1", Mn = "_variantPrimary_wgr1d_37", jn = "_variantSecondary_wgr1d_50", Hn = "_variantTertiary_wgr1d_63", On = "_sentimentDanger_wgr1d_75", An = "_sentimentSuccess_wgr1d_81", Kn = "_sentimentWarning_wgr1d_87", Gn = "_sentimentInfo_wgr1d_93", R = {
140
- iconButton: Ln,
141
- variantPrimary: Mn,
142
- variantSecondary: jn,
143
- variantTertiary: Hn,
144
- sentimentDanger: On,
145
- sentimentSuccess: An,
146
- sentimentWarning: Kn,
147
- sentimentInfo: Gn
148
- }, Zn = {
149
- danger: R.sentimentDanger,
150
- success: R.sentimentSuccess,
151
- warning: R.sentimentWarning,
152
- info: R.sentimentInfo
153
- }, zn = H(R.iconButton, {
154
- variants: {
155
- variant: {
156
- primary: R.variantPrimary,
157
- secondary: R.variantSecondary,
158
- tertiary: R.variantTertiary
159
- }
160
- },
161
- defaultVariants: {
162
- variant: "primary"
163
- }
164
- }), Un = D(
165
- ({ className: n, variant: a, sentiment: t, ...r }, i) => /* @__PURE__ */ e(
166
- gn,
167
- {
168
- ref: i,
169
- type: "button",
170
- [f]: y.iconButton,
171
- className: w(
172
- zn({ variant: a }),
173
- t && Zn[t],
174
- n
175
- ),
176
- ...r
177
- }
178
- )
179
- );
180
- Un.displayName = "IconButton";
181
- const Yn = "_buttonGroup_vy66t_1", Jn = "_vertical_vy66t_22", cn = {
182
- buttonGroup: Yn,
183
- vertical: Jn
184
- }, Qn = D(
185
- ({ className: n, orientation: a = "horizontal", children: t, ...r }, i) => /* @__PURE__ */ e(
186
- "div",
187
- {
188
- ref: i,
189
- role: "group",
190
- [f]: y.buttonGroup,
191
- className: w(
192
- cn.buttonGroup,
193
- a === "vertical" && cn.vertical,
194
- n
195
- ),
196
- ...r,
197
- children: t
198
- }
199
- )
200
- );
201
- Qn.displayName = "ButtonGroup";
202
- function dn(n) {
203
- return /* @__PURE__ */ e(
204
- "svg",
205
- {
206
- viewBox: "0 0 12 12",
207
- fill: "none",
208
- stroke: "currentColor",
209
- strokeWidth: "2",
210
- strokeLinecap: "round",
211
- strokeLinejoin: "round",
212
- ...n,
213
- children: /* @__PURE__ */ e("path", { d: "M2.5 6l2.5 2.5 4.5-5" })
214
- }
215
- );
216
- }
217
- function Xn(n) {
218
- return /* @__PURE__ */ e(
219
- "svg",
220
- {
221
- viewBox: "0 0 12 12",
222
- fill: "none",
223
- stroke: "currentColor",
224
- strokeWidth: "2",
225
- strokeLinecap: "round",
226
- ...n,
227
- children: /* @__PURE__ */ e("path", { d: "M2.5 6h7" })
228
- }
229
- );
230
- }
231
- function _n(n) {
232
- return /* @__PURE__ */ e(
233
- "svg",
234
- {
235
- viewBox: "0 0 12 12",
236
- fill: "none",
237
- stroke: "currentColor",
238
- strokeWidth: "2",
239
- strokeLinecap: "round",
240
- ...n,
241
- children: /* @__PURE__ */ e("path", { d: "M3 3l6 6M9 3l-6 6" })
242
- }
243
- );
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, r as s, s as c, t as l, u } from "./Calendar.module-AHlPlLw_.js";
2
+ import { g as d } from "./dateFormat-CdClN4CU.js";
3
+ import { a as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./DateInput-D3AUs_l2.js";
4
+ import { r as y } from "./dateInput-4sdYyWq0.js";
5
+ import { Children as b, cloneElement as x, forwardRef as S, isValidElement as C, useCallback as w, useEffect as T, useId as E, useMemo as D, useRef as O, useState as k } from "react";
6
+ import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
7
+ var N = {
8
+ button: "_button_vrgvv_1",
9
+ variantPrimary: "_variantPrimary_vrgvv_46",
10
+ variantSecondary: "_variantSecondary_vrgvv_59",
11
+ variantTertiary: "_variantTertiary_vrgvv_72",
12
+ sentimentDanger: "_sentimentDanger_vrgvv_84",
13
+ sentimentSuccess: "_sentimentSuccess_vrgvv_91",
14
+ sentimentWarning: "_sentimentWarning_vrgvv_98",
15
+ sentimentInfo: "_sentimentInfo_vrgvv_105",
16
+ fullWidth: "_fullWidth_vrgvv_112",
17
+ icon: "_icon_vrgvv_116"
18
+ }, P = {
19
+ danger: N.sentimentDanger,
20
+ success: N.sentimentSuccess,
21
+ warning: N.sentimentWarning,
22
+ info: N.sentimentInfo
23
+ }, ee = a(N.button, {
24
+ variants: {
25
+ variant: {
26
+ primary: N.variantPrimary,
27
+ secondary: N.variantSecondary,
28
+ tertiary: N.variantTertiary
29
+ },
30
+ fullWidth: { true: N.fullWidth }
31
+ },
32
+ defaultVariants: { variant: "primary" }
33
+ }), F = S(({ className: e, variant: t, fullWidth: i, sentiment: a, startIcon: o, endIcon: s, children: c, ...l }, d) => /* @__PURE__ */ M(_, {
34
+ ref: d,
35
+ type: "button",
36
+ [n]: r.button,
37
+ className: u(ee({
38
+ variant: t,
39
+ fullWidth: i
40
+ }), a && P[a], e),
41
+ ...l,
42
+ children: [
43
+ o ? /* @__PURE__ */ j("span", {
44
+ className: N.icon,
45
+ children: o
46
+ }) : null,
47
+ c,
48
+ s ? /* @__PURE__ */ j("span", {
49
+ className: N.icon,
50
+ children: s
51
+ }) : null
52
+ ]
53
+ }));
54
+ F.displayName = "Button";
55
+ var I = {
56
+ iconButton: "_iconButton_ccgdf_1",
57
+ variantPrimary: "_variantPrimary_ccgdf_43",
58
+ variantSecondary: "_variantSecondary_ccgdf_56",
59
+ variantTertiary: "_variantTertiary_ccgdf_69",
60
+ sentimentDanger: "_sentimentDanger_ccgdf_81",
61
+ sentimentSuccess: "_sentimentSuccess_ccgdf_88",
62
+ sentimentWarning: "_sentimentWarning_ccgdf_95",
63
+ sentimentInfo: "_sentimentInfo_ccgdf_102"
64
+ }, te = {
65
+ danger: I.sentimentDanger,
66
+ success: I.sentimentSuccess,
67
+ warning: I.sentimentWarning,
68
+ info: I.sentimentInfo
69
+ }, ne = a(I.iconButton, {
70
+ variants: { variant: {
71
+ primary: I.variantPrimary,
72
+ secondary: I.variantSecondary,
73
+ tertiary: I.variantTertiary
74
+ } },
75
+ defaultVariants: { variant: "primary" }
76
+ }), re = S(({ className: e, variant: t, sentiment: i, ...a }, o) => /* @__PURE__ */ j(h, {
77
+ ref: o,
78
+ type: "button",
79
+ [n]: r.iconButton,
80
+ className: u(ne({ variant: t }), i && te[i], e),
81
+ ...a
82
+ }));
83
+ re.displayName = "IconButton";
84
+ var ie = {
85
+ buttonGroup: "_buttonGroup_kt24a_1",
86
+ vertical: "_vertical_kt24a_22"
87
+ }, ae = S(({ className: e, orientation: t = "horizontal", children: i, ...a }, o) => /* @__PURE__ */ j("div", {
88
+ ref: o,
89
+ role: "group",
90
+ [n]: r.buttonGroup,
91
+ className: u(ie.buttonGroup, t === "vertical" && ie.vertical, e),
92
+ ...a,
93
+ children: i
94
+ }));
95
+ ae.displayName = "ButtonGroup";
96
+ //#endregion
97
+ //#region src/assets/icons/CloseIcon.tsx
98
+ function oe(e) {
99
+ return /* @__PURE__ */ j("svg", {
100
+ viewBox: "0 0 24 24",
101
+ fill: "none",
102
+ stroke: "currentColor",
103
+ strokeWidth: "2",
104
+ strokeLinecap: "round",
105
+ strokeLinejoin: "round",
106
+ ...e,
107
+ children: /* @__PURE__ */ j("path", { d: "M18 6 6 18M6 6l12 12" })
108
+ });
244
109
  }
245
- function nt(n) {
246
- return /* @__PURE__ */ e(
247
- "svg",
248
- {
249
- viewBox: "0 0 24 24",
250
- fill: "none",
251
- stroke: "currentColor",
252
- strokeWidth: "2",
253
- strokeLinecap: "round",
254
- strokeLinejoin: "round",
255
- ...n,
256
- children: /* @__PURE__ */ e("path", { d: "M18 6 6 18M6 6l12 12" })
257
- }
258
- );
110
+ //#endregion
111
+ //#region src/assets/icons/DashIcon.tsx
112
+ function se(e) {
113
+ return /* @__PURE__ */ j("svg", {
114
+ viewBox: "0 0 12 12",
115
+ fill: "none",
116
+ stroke: "currentColor",
117
+ strokeWidth: "2",
118
+ strokeLinecap: "round",
119
+ ...e,
120
+ children: /* @__PURE__ */ j("path", { d: "M2.5 6h7" })
121
+ });
259
122
  }
260
- function tt(n) {
261
- return /* @__PURE__ */ e(
262
- "svg",
263
- {
264
- viewBox: "0 0 12 12",
265
- fill: "none",
266
- stroke: "currentColor",
267
- strokeWidth: "1.5",
268
- strokeLinecap: "round",
269
- strokeLinejoin: "round",
270
- ...n,
271
- children: /* @__PURE__ */ e("path", { d: "M3 4.5l3 3 3-3" })
272
- }
273
- );
123
+ //#endregion
124
+ //#region src/assets/icons/MinusIcon.tsx
125
+ function ce(e) {
126
+ return /* @__PURE__ */ j("svg", {
127
+ viewBox: "0 0 24 24",
128
+ fill: "none",
129
+ stroke: "currentColor",
130
+ strokeWidth: "2",
131
+ strokeLinecap: "round",
132
+ ...e,
133
+ children: /* @__PURE__ */ j("path", { d: "M5 12h14" })
134
+ });
274
135
  }
275
- function et(n) {
276
- return /* @__PURE__ */ C(
277
- "svg",
278
- {
279
- viewBox: "0 0 24 24",
280
- fill: "none",
281
- stroke: "currentColor",
282
- strokeWidth: "1.5",
283
- strokeLinecap: "round",
284
- strokeLinejoin: "round",
285
- ...n,
286
- children: [
287
- /* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
288
- /* @__PURE__ */ e("polyline", { points: "17 8 12 3 7 8" }),
289
- /* @__PURE__ */ e("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
290
- ]
291
- }
292
- );
136
+ //#endregion
137
+ //#region src/assets/icons/PlusIcon.tsx
138
+ function le(e) {
139
+ return /* @__PURE__ */ j("svg", {
140
+ viewBox: "0 0 24 24",
141
+ fill: "none",
142
+ stroke: "currentColor",
143
+ strokeWidth: "2",
144
+ strokeLinecap: "round",
145
+ ...e,
146
+ children: /* @__PURE__ */ j("path", { d: "M12 5v14M5 12h14" })
147
+ });
293
148
  }
294
- function rt(n) {
295
- return /* @__PURE__ */ C("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", ...n, children: [
296
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10", opacity: "0.25" }),
297
- /* @__PURE__ */ e("path", { d: "M12 2a10 10 0 0 1 10 10" })
298
- ] });
149
+ //#endregion
150
+ //#region src/assets/icons/UploadIcon.tsx
151
+ function ue(e) {
152
+ return /* @__PURE__ */ M("svg", {
153
+ viewBox: "0 0 24 24",
154
+ fill: "none",
155
+ stroke: "currentColor",
156
+ strokeWidth: "1.5",
157
+ strokeLinecap: "round",
158
+ strokeLinejoin: "round",
159
+ ...e,
160
+ children: [
161
+ /* @__PURE__ */ j("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
162
+ /* @__PURE__ */ j("polyline", { points: "17 8 12 3 7 8" }),
163
+ /* @__PURE__ */ j("line", {
164
+ x1: "12",
165
+ y1: "3",
166
+ x2: "12",
167
+ y2: "15"
168
+ })
169
+ ]
170
+ });
299
171
  }
300
- function at(n) {
301
- return /* @__PURE__ */ e(
302
- "svg",
303
- {
304
- viewBox: "0 0 24 24",
305
- fill: "none",
306
- stroke: "currentColor",
307
- strokeWidth: "2",
308
- strokeLinecap: "round",
309
- ...n,
310
- children: /* @__PURE__ */ e("path", { d: "M5 12h14" })
311
- }
312
- );
313
- }
314
- function it(n) {
315
- return /* @__PURE__ */ e(
316
- "svg",
317
- {
318
- viewBox: "0 0 24 24",
319
- fill: "none",
320
- stroke: "currentColor",
321
- strokeWidth: "2",
322
- strokeLinecap: "round",
323
- ...n,
324
- children: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" })
325
- }
326
- );
327
- }
328
- const ot = "_wrapper_qx7i5_1", st = "_disabled_qx7i5_25", ct = "_fullWidth_qx7i5_30", lt = "_variantPrimary_qx7i5_33", ut = "_variantSecondary_qx7i5_36", dt = "_variantTertiary_qx7i5_40", _t = "_statusError_qx7i5_49", pt = "_statusWarning_qx7i5_52", mt = "_statusSuccess_qx7i5_55", vt = "_field_qx7i5_59", ht = "_adornment_qx7i5_76", ft = "_clearButton_qx7i5_88", P = {
329
- wrapper: ot,
330
- disabled: st,
331
- fullWidth: ct,
332
- variantPrimary: lt,
333
- variantSecondary: ut,
334
- variantTertiary: dt,
335
- statusError: _t,
336
- statusWarning: pt,
337
- statusSuccess: mt,
338
- field: vt,
339
- adornment: ht,
340
- clearButton: ft
341
- }, yt = H(P.wrapper, {
342
- variants: {
343
- variant: {
344
- primary: P.variantPrimary,
345
- secondary: P.variantSecondary,
346
- tertiary: P.variantTertiary
347
- }
348
- },
349
- defaultVariants: {
350
- variant: "primary"
351
- }
352
- }), bt = {
353
- error: P.statusError,
354
- warning: P.statusWarning,
355
- success: P.statusSuccess
356
- }, gt = D(
357
- ({
358
- className: n,
359
- variant: a,
360
- validationStatus: t,
361
- startAdornment: r,
362
- endAdornment: i,
363
- clearable: s,
364
- onClear: l,
365
- fullWidth: p,
366
- disabled: m,
367
- readOnly: c,
368
- value: $,
369
- defaultValue: _,
370
- onChange: v,
371
- ...N
372
- }, h) => {
373
- const I = Z(null), b = h || I, x = k(
374
- (S) => {
375
- S.preventDefault(), l ? l() : b.current && (Object.getOwnPropertyDescriptor(
376
- HTMLInputElement.prototype,
377
- "value"
378
- )?.set?.call(b.current, ""), b.current.dispatchEvent(new Event("input", { bubbles: !0 }))), b.current?.focus();
379
- },
380
- [l, b]
381
- ), d = s && !m && !c && ($ ?? _ ?? "") !== "";
382
- return /* @__PURE__ */ C(
383
- "div",
384
- {
385
- [f]: y.input,
386
- className: w(
387
- yt({ variant: a }),
388
- t && bt[t],
389
- m && P.disabled,
390
- p && P.fullWidth,
391
- n
392
- ),
393
- children: [
394
- r ? /* @__PURE__ */ e("span", { className: P.adornment, children: r }) : null,
395
- /* @__PURE__ */ e(
396
- "input",
397
- {
398
- ref: b,
399
- [f]: y.inputField,
400
- className: P.field,
401
- disabled: m,
402
- readOnly: c,
403
- value: $,
404
- defaultValue: _,
405
- onChange: v,
406
- ...N
407
- }
408
- ),
409
- d ? /* @__PURE__ */ e(
410
- "button",
411
- {
412
- type: "button",
413
- className: P.clearButton,
414
- onClick: x,
415
- "aria-label": "Clear input",
416
- tabIndex: -1,
417
- children: /* @__PURE__ */ e(nt, {})
418
- }
419
- ) : null,
420
- i ? /* @__PURE__ */ e("span", { className: P.adornment, children: i }) : null
421
- ]
422
- }
423
- );
424
- }
425
- );
426
- gt.displayName = "Input";
427
- const $t = "_wrapper_16m4i_1", xt = "_disabled_16m4i_21", kt = "_fullWidth_16m4i_26", wt = "_variantPrimary_16m4i_29", Nt = "_variantSecondary_16m4i_32", It = "_variantTertiary_16m4i_36", Ct = "_statusError_16m4i_45", St = "_statusWarning_16m4i_48", Wt = "_statusSuccess_16m4i_51", Bt = "_field_16m4i_55", Dt = "_charCount_16m4i_74", Tt = "_charCountWarning_16m4i_84", Pt = "_charCountError_16m4i_88", F = {
428
- wrapper: $t,
429
- disabled: xt,
430
- fullWidth: kt,
431
- variantPrimary: wt,
432
- variantSecondary: Nt,
433
- variantTertiary: It,
434
- statusError: Ct,
435
- statusWarning: St,
436
- statusSuccess: Wt,
437
- field: Bt,
438
- charCount: Dt,
439
- charCountWarning: Tt,
440
- charCountError: Pt
441
- }, Ft = H(F.wrapper, {
442
- variants: {
443
- variant: {
444
- primary: F.variantPrimary,
445
- secondary: F.variantSecondary,
446
- tertiary: F.variantTertiary
447
- }
448
- },
449
- defaultVariants: {
450
- variant: "primary"
451
- }
452
- }), Vt = {
453
- error: F.statusError,
454
- warning: F.statusWarning,
455
- success: F.statusSuccess
456
- }, Et = D(
457
- ({
458
- className: n,
459
- variant: a,
460
- validationStatus: t,
461
- showCharCount: r,
462
- warningThreshold: i,
463
- autoResize: s,
464
- minRows: l = 3,
465
- maxRows: p,
466
- fullWidth: m,
467
- maxLength: c,
468
- disabled: $,
469
- readOnly: _,
470
- value: v,
471
- defaultValue: N,
472
- onChange: h,
473
- ...I
474
- }, b) => {
475
- const x = Z(null), d = b || x, [S, W] = J(() => (v ?? N ?? "").length);
476
- X(() => {
477
- v !== void 0 && W(v.length);
478
- }, [v]);
479
- const u = k(() => {
480
- const g = d.current;
481
- if (!g || !s) return;
482
- g.style.height = "auto";
483
- const L = parseFloat(getComputedStyle(g).lineHeight), pn = L * l, rn = p ? L * p : 1 / 0, an = g.scrollHeight;
484
- g.style.height = `${Math.min(Math.max(an, pn), rn)}px`, g.style.overflowY = an > rn ? "auto" : "hidden";
485
- }, [s, l, p, d]);
486
- X(() => {
487
- u();
488
- }, [v, u]);
489
- const T = k(
490
- (g) => {
491
- W(g.target.value.length), u(), h?.(g);
492
- },
493
- [h, u]
494
- ), z = i !== void 0 && c !== void 0 && S >= i, U = c !== void 0 && S >= c ? "error" : z ? "warning" : void 0, B = t ?? U;
495
- return /* @__PURE__ */ C(
496
- "div",
497
- {
498
- [f]: y.textarea,
499
- className: w(
500
- Ft({ variant: a }),
501
- B && Vt[B],
502
- $ && F.disabled,
503
- m && F.fullWidth,
504
- n
505
- ),
506
- children: [
507
- /* @__PURE__ */ e(
508
- "textarea",
509
- {
510
- ref: d,
511
- [f]: y.textareaField,
512
- className: F.field,
513
- rows: l,
514
- maxLength: c,
515
- disabled: $,
516
- readOnly: _,
517
- value: v,
518
- defaultValue: N,
519
- onChange: T,
520
- ...I
521
- }
522
- ),
523
- r && c !== void 0 ? /* @__PURE__ */ C(
524
- "span",
525
- {
526
- [f]: y.textareaCount,
527
- className: w(
528
- F.charCount,
529
- U === "warning" && F.charCountWarning,
530
- U === "error" && F.charCountError
531
- ),
532
- children: [
533
- S,
534
- "/",
535
- c
536
- ]
537
- }
538
- ) : null
539
- ]
540
- }
541
- );
542
- }
543
- );
544
- Et.displayName = "Textarea";
545
- const Rt = "_wrapper_1k2cc_1", qt = "_disabled_1k2cc_22", Lt = "_fullWidth_1k2cc_27", Mt = "_variantPrimary_1k2cc_30", jt = "_variantSecondary_1k2cc_33", Ht = "_variantTertiary_1k2cc_37", Ot = "_statusError_1k2cc_46", At = "_statusWarning_1k2cc_49", Kt = "_statusSuccess_1k2cc_52", Gt = "_field_1k2cc_56", Zt = "_stepButton_1k2cc_79", V = {
546
- wrapper: Rt,
547
- disabled: qt,
548
- fullWidth: Lt,
549
- variantPrimary: Mt,
550
- variantSecondary: jt,
551
- variantTertiary: Ht,
552
- statusError: Ot,
553
- statusWarning: At,
554
- statusSuccess: Kt,
555
- field: Gt,
556
- stepButton: Zt
557
- }, zt = H(V.wrapper, {
558
- variants: {
559
- variant: {
560
- primary: V.variantPrimary,
561
- secondary: V.variantSecondary,
562
- tertiary: V.variantTertiary
563
- }
564
- },
565
- defaultVariants: {
566
- variant: "primary"
567
- }
568
- }), Ut = {
569
- error: V.statusError,
570
- warning: V.statusWarning,
571
- success: V.statusSuccess
172
+ var L = {
173
+ wrapper: "_wrapper_3mrtn_1",
174
+ disabled: "_disabled_3mrtn_25",
175
+ fullWidth: "_fullWidth_3mrtn_30",
176
+ variantPrimary: "_variantPrimary_3mrtn_33",
177
+ variantSecondary: "_variantSecondary_3mrtn_36",
178
+ variantTertiary: "_variantTertiary_3mrtn_40",
179
+ statusError: "_statusError_3mrtn_49",
180
+ statusWarning: "_statusWarning_3mrtn_52",
181
+ statusSuccess: "_statusSuccess_3mrtn_55",
182
+ field: "_field_3mrtn_59",
183
+ adornment: "_adornment_3mrtn_79",
184
+ clearButton: "_clearButton_3mrtn_91"
185
+ }, de = a(L.wrapper, {
186
+ variants: { variant: {
187
+ primary: L.variantPrimary,
188
+ secondary: L.variantSecondary,
189
+ tertiary: L.variantTertiary
190
+ } },
191
+ defaultVariants: { variant: "primary" }
192
+ }), fe = {
193
+ error: L.statusError,
194
+ warning: L.statusWarning,
195
+ success: L.statusSuccess
196
+ }, pe = S(({ className: e, variant: t, validationStatus: i, startAdornment: a, endAdornment: o, clearable: s, onClear: c, fullWidth: l, disabled: d, readOnly: f, value: p, defaultValue: m, onChange: h, ...g }, _) => {
197
+ let v = O(null), y = _ || v, b = w((e) => {
198
+ e.preventDefault(), c ? c() : y.current && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(y.current, ""), y.current.dispatchEvent(new Event("input", { bubbles: !0 }))), y.current?.focus();
199
+ }, [c, y]), x = s && !d && !f && (p ?? m ?? "") !== "";
200
+ return /* @__PURE__ */ M("div", {
201
+ [n]: r.input,
202
+ className: u(de({ variant: t }), i && fe[i], d && L.disabled, l && L.fullWidth, e),
203
+ children: [
204
+ a ? /* @__PURE__ */ j("span", {
205
+ className: L.adornment,
206
+ children: a
207
+ }) : null,
208
+ /* @__PURE__ */ j("input", {
209
+ ref: y,
210
+ [n]: r.inputField,
211
+ className: L.field,
212
+ disabled: d,
213
+ readOnly: f,
214
+ value: p,
215
+ defaultValue: m,
216
+ onChange: h,
217
+ ...g
218
+ }),
219
+ x ? /* @__PURE__ */ j("button", {
220
+ type: "button",
221
+ className: L.clearButton,
222
+ onClick: b,
223
+ "aria-label": "Clear input",
224
+ tabIndex: -1,
225
+ children: /* @__PURE__ */ j(oe, {})
226
+ }) : null,
227
+ o ? /* @__PURE__ */ j("span", {
228
+ className: L.adornment,
229
+ children: o
230
+ }) : null
231
+ ]
232
+ });
233
+ });
234
+ pe.displayName = "Input";
235
+ var R = {
236
+ wrapper: "_wrapper_1a7tg_1",
237
+ disabled: "_disabled_1a7tg_21",
238
+ fullWidth: "_fullWidth_1a7tg_26",
239
+ variantPrimary: "_variantPrimary_1a7tg_29",
240
+ variantSecondary: "_variantSecondary_1a7tg_32",
241
+ variantTertiary: "_variantTertiary_1a7tg_36",
242
+ statusError: "_statusError_1a7tg_45",
243
+ statusWarning: "_statusWarning_1a7tg_48",
244
+ statusSuccess: "_statusSuccess_1a7tg_51",
245
+ field: "_field_1a7tg_55",
246
+ charCount: "_charCount_1a7tg_77",
247
+ charCountWarning: "_charCountWarning_1a7tg_87",
248
+ charCountError: "_charCountError_1a7tg_91"
249
+ }, me = a(R.wrapper, {
250
+ variants: { variant: {
251
+ primary: R.variantPrimary,
252
+ secondary: R.variantSecondary,
253
+ tertiary: R.variantTertiary
254
+ } },
255
+ defaultVariants: { variant: "primary" }
256
+ }), he = {
257
+ error: R.statusError,
258
+ warning: R.statusWarning,
259
+ success: R.statusSuccess
260
+ }, z = S(({ className: e, variant: t, validationStatus: i, showCharCount: a, warningThreshold: o, autoResize: s, minRows: c = 3, maxRows: l, fullWidth: d, maxLength: f, disabled: p, readOnly: m, value: h, defaultValue: g, onChange: _, ...v }, y) => {
261
+ let b = O(null), x = y || b, [S, C] = k(() => (h ?? g ?? "").length);
262
+ T(() => {
263
+ h !== void 0 && C(h.length);
264
+ }, [h]);
265
+ let E = w(() => {
266
+ let e = x.current;
267
+ if (!e || !s) return;
268
+ e.style.height = "auto";
269
+ let t = parseFloat(getComputedStyle(e).lineHeight), n = t * c, r = l ? t * l : Infinity, i = e.scrollHeight;
270
+ e.style.height = `${Math.min(Math.max(i, n), r)}px`, e.style.overflowY = i > r ? "auto" : "hidden";
271
+ }, [
272
+ s,
273
+ c,
274
+ l,
275
+ x
276
+ ]);
277
+ T(() => {
278
+ E();
279
+ }, [h, E]);
280
+ let D = w((e) => {
281
+ C(e.target.value.length), E(), _?.(e);
282
+ }, [_, E]), A = f !== void 0 && S >= f ? "error" : o !== void 0 && f !== void 0 && S >= o ? "warning" : void 0, N = i ?? A;
283
+ return /* @__PURE__ */ M("div", {
284
+ [n]: r.textarea,
285
+ className: u(me({ variant: t }), N && he[N], p && R.disabled, d && R.fullWidth, e),
286
+ children: [/* @__PURE__ */ j("textarea", {
287
+ ref: x,
288
+ [n]: r.textareaField,
289
+ className: R.field,
290
+ rows: c,
291
+ maxLength: f,
292
+ disabled: p,
293
+ readOnly: m,
294
+ value: h,
295
+ defaultValue: g,
296
+ onChange: D,
297
+ ...v
298
+ }), a && f !== void 0 ? /* @__PURE__ */ M("span", {
299
+ [n]: r.textareaCount,
300
+ className: u(R.charCount, A === "warning" && R.charCountWarning, A === "error" && R.charCountError),
301
+ children: [
302
+ S,
303
+ "/",
304
+ f
305
+ ]
306
+ }) : null]
307
+ });
308
+ });
309
+ z.displayName = "Textarea";
310
+ var B = {
311
+ wrapper: "_wrapper_jj8ms_1",
312
+ disabled: "_disabled_jj8ms_22",
313
+ fullWidth: "_fullWidth_jj8ms_27",
314
+ variantPrimary: "_variantPrimary_jj8ms_30",
315
+ variantSecondary: "_variantSecondary_jj8ms_33",
316
+ variantTertiary: "_variantTertiary_jj8ms_37",
317
+ statusError: "_statusError_jj8ms_46",
318
+ statusWarning: "_statusWarning_jj8ms_49",
319
+ statusSuccess: "_statusSuccess_jj8ms_52",
320
+ field: "_field_jj8ms_56",
321
+ stepButton: "_stepButton_jj8ms_82"
322
+ }, ge = a(B.wrapper, {
323
+ variants: { variant: {
324
+ primary: B.variantPrimary,
325
+ secondary: B.variantSecondary,
326
+ tertiary: B.variantTertiary
327
+ } },
328
+ defaultVariants: { variant: "primary" }
329
+ }), _e = {
330
+ error: B.statusError,
331
+ warning: B.statusWarning,
332
+ success: B.statusSuccess
572
333
  };
573
- function Yt(n, a, t) {
574
- let r = n;
575
- return a !== void 0 && (r = Math.max(r, a)), t !== void 0 && (r = Math.min(r, t)), r;
334
+ function ve(e, t, n) {
335
+ let r = e;
336
+ return t !== void 0 && (r = Math.max(r, t)), n !== void 0 && (r = Math.min(r, n)), r;
576
337
  }
577
- function Q(n, a) {
578
- return a !== void 0 ? n.toFixed(a) : String(n);
338
+ function V(e, t) {
339
+ return t === void 0 ? String(e) : e.toFixed(t);
579
340
  }
580
- const Jt = D(
581
- ({
582
- className: n,
583
- variant: a,
584
- validationStatus: t,
585
- value: r,
586
- defaultValue: i,
587
- min: s,
588
- max: l,
589
- step: p = 1,
590
- precision: m,
591
- onChange: c,
592
- fullWidth: $,
593
- disabled: _,
594
- readOnly: v,
595
- ...N
596
- }, h) => {
597
- const I = Z(null), b = h || I, x = r !== void 0, [d, S] = J(
598
- () => i !== void 0 ? Q(i, m) : ""
599
- ), W = x ? r === "" ? "" : Q(r, m) : d;
600
- X(() => {
601
- x && r !== "" && S(Q(r, m));
602
- }, [r, m, x]);
603
- const u = k(
604
- (B) => {
605
- const g = Yt(B, s, l), L = Q(g, m);
606
- x || S(L), c?.(g);
607
- },
608
- [s, l, m, x, c]
609
- ), T = k(
610
- (B) => {
611
- const g = parseFloat(W) || 0;
612
- u(g + p * B);
613
- },
614
- [W, p, u]
615
- ), z = k(
616
- (B) => {
617
- const g = B.target.value;
618
- if (g === "" || g === "-" || g === ".") {
619
- x || S(g), g === "" && c?.(void 0);
620
- return;
621
- }
622
- const L = parseFloat(g);
623
- isNaN(L) || (x || S(g), c?.(L));
624
- },
625
- [x, c]
626
- ), en = k(() => {
627
- const B = parseFloat(W);
628
- isNaN(B) ? (x || S(""), c?.(void 0)) : u(B);
629
- }, [W, x, c, u]), U = k(
630
- (B) => {
631
- B.key === "ArrowUp" ? (B.preventDefault(), T(1)) : B.key === "ArrowDown" && (B.preventDefault(), T(-1));
632
- },
633
- [T]
634
- );
635
- return /* @__PURE__ */ C(
636
- "div",
637
- {
638
- [f]: y.numberInput,
639
- className: w(
640
- zt({ variant: a }),
641
- t && Ut[t],
642
- _ && V.disabled,
643
- $ && V.fullWidth,
644
- n
645
- ),
646
- children: [
647
- /* @__PURE__ */ e(
648
- "button",
649
- {
650
- type: "button",
651
- [f]: y.numberInputDecrement,
652
- className: V.stepButton,
653
- onClick: () => T(-1),
654
- disabled: _ || v || s !== void 0 && (parseFloat(W) || 0) <= s,
655
- "aria-label": "Decrement",
656
- tabIndex: -1,
657
- children: /* @__PURE__ */ e(at, {})
658
- }
659
- ),
660
- /* @__PURE__ */ e(
661
- "input",
662
- {
663
- ref: b,
664
- [f]: y.numberInputField,
665
- className: V.field,
666
- inputMode: "decimal",
667
- value: W,
668
- onChange: z,
669
- onBlur: en,
670
- onKeyDown: U,
671
- disabled: _,
672
- readOnly: v,
673
- role: "spinbutton",
674
- "aria-valuemin": s,
675
- "aria-valuemax": l,
676
- "aria-valuenow": typeof W == "string" ? parseFloat(W) || void 0 : W,
677
- ...N
678
- }
679
- ),
680
- /* @__PURE__ */ e(
681
- "button",
682
- {
683
- type: "button",
684
- [f]: y.numberInputIncrement,
685
- className: V.stepButton,
686
- onClick: () => T(1),
687
- disabled: _ || v || l !== void 0 && (parseFloat(W) || 0) >= l,
688
- "aria-label": "Increment",
689
- tabIndex: -1,
690
- children: /* @__PURE__ */ e(it, {})
691
- }
692
- )
693
- ]
694
- }
695
- );
696
- }
697
- );
698
- Jt.displayName = "NumberInput";
699
- const Qt = "_formField_bdanr_1", Xt = "_fullWidth_bdanr_6", ne = "_disabled_bdanr_12", te = "_label_bdanr_17", ee = "_required_bdanr_24", re = "_helperText_bdanr_29", ae = "_errorMessage_bdanr_37", M = {
700
- formField: Qt,
701
- fullWidth: Xt,
702
- disabled: ne,
703
- label: te,
704
- required: ee,
705
- helperText: re,
706
- errorMessage: ae
707
- }, ie = D(
708
- ({
709
- className: n,
710
- label: a,
711
- helperText: t,
712
- errorMessage: r,
713
- validationStatus: i,
714
- required: s,
715
- fullWidth: l,
716
- disabled: p,
717
- htmlFor: m,
718
- children: c,
719
- ...$
720
- }, _) => {
721
- const v = mn(), N = m ?? v, h = `${N}-helper`, I = `${N}-error`, b = i === "error" && r, x = [b ? I : void 0, t ? h : void 0].filter(Boolean).join(" ") || void 0, d = vn.map(c, (S) => hn(S) ? fn(S, {
722
- id: N,
723
- "aria-describedby": x,
724
- "aria-invalid": i === "error" ? !0 : void 0,
725
- disabled: p || void 0
726
- }) : S);
727
- return /* @__PURE__ */ C(
728
- "div",
729
- {
730
- ref: _,
731
- [f]: y.formField,
732
- className: w(
733
- M.formField,
734
- l && M.fullWidth,
735
- p && M.disabled,
736
- n
737
- ),
738
- ...$,
739
- children: [
740
- /* @__PURE__ */ e(
741
- "label",
742
- {
743
- [f]: y.formFieldLabel,
744
- htmlFor: N,
745
- className: w(M.label, s && M.required),
746
- children: a
747
- }
748
- ),
749
- d,
750
- b ? /* @__PURE__ */ e(
751
- "p",
752
- {
753
- [f]: y.formFieldError,
754
- id: I,
755
- className: M.errorMessage,
756
- role: "alert",
757
- children: r
758
- }
759
- ) : null,
760
- t ? /* @__PURE__ */ e(
761
- "p",
762
- {
763
- [f]: y.formFieldHelper,
764
- id: h,
765
- className: M.helperText,
766
- children: t
767
- }
768
- ) : null
769
- ]
770
- }
771
- );
772
- }
773
- );
774
- ie.displayName = "FormField";
775
- const oe = "_checkbox_q1fn9_1", se = "_disabled_q1fn9_11", ce = "_input_q1fn9_16", le = "_indicator_q1fn9_25", ue = "_label_q1fn9_70", Y = {
776
- checkbox: oe,
777
- disabled: se,
778
- input: ce,
779
- indicator: le,
780
- label: ue
781
- }, de = D(
782
- ({ className: n, label: a, indeterminate: t, disabled: r, ...i }, s) => {
783
- const l = Z(null);
784
- return X(() => {
785
- l.current && (l.current.indeterminate = t ?? !1);
786
- }, [t]), /* @__PURE__ */ C(
787
- "label",
788
- {
789
- [f]: y.checkbox,
790
- className: w(Y.checkbox, r && Y.disabled, n),
791
- children: [
792
- /* @__PURE__ */ e(
793
- $n,
794
- {
795
- ref: tn(s, l),
796
- className: Y.input,
797
- disabled: r,
798
- "data-indeterminate": t || void 0,
799
- ...i
800
- }
801
- ),
802
- /* @__PURE__ */ e("span", { className: Y.indicator, "aria-hidden": "true", children: t ? /* @__PURE__ */ e(Xn, {}) : /* @__PURE__ */ e(dn, {}) }),
803
- a ? /* @__PURE__ */ e("span", { className: Y.label, children: a }) : null
804
- ]
805
- }
806
- );
807
- }
808
- );
809
- de.displayName = "Checkbox";
810
- const _e = "_disabled_19daj_11", pe = "_input_19daj_16", me = "_track_19daj_25", ve = "_thumb_19daj_29", he = "_label_19daj_71", O = {
811
- switch: "_switch_19daj_1",
812
- disabled: _e,
813
- input: pe,
814
- track: me,
815
- thumb: ve,
816
- label: he
817
- }, fe = D(
818
- ({ className: n, label: a, disabled: t, ...r }, i) => /* @__PURE__ */ C(
819
- "label",
820
- {
821
- [f]: y.switch,
822
- className: w(O.switch, t && O.disabled, n),
823
- children: [
824
- /* @__PURE__ */ e(xn, { ref: i, className: O.input, disabled: t, ...r }),
825
- /* @__PURE__ */ e("span", { className: O.track, "aria-hidden": "true", children: /* @__PURE__ */ e("span", { className: O.thumb }) }),
826
- a ? /* @__PURE__ */ e("span", { className: O.label, children: a }) : null
827
- ]
828
- }
829
- )
830
- );
831
- fe.displayName = "Switch";
832
- const ye = "_radio_1ra61_1", be = "_disabled_1ra61_11", ge = "_input_1ra61_16", $e = "_indicator_1ra61_25", xe = "_dot_1ra61_28", ke = "_label_1ra61_68", A = {
833
- radio: ye,
834
- disabled: be,
835
- input: ge,
836
- indicator: $e,
837
- dot: xe,
838
- label: ke
839
- }, we = D(
840
- ({ className: n, label: a, disabled: t, ...r }, i) => /* @__PURE__ */ C(
841
- "label",
842
- {
843
- [f]: y.radioButton,
844
- className: w(A.radio, t && A.disabled, n),
845
- children: [
846
- /* @__PURE__ */ e(kn, { ref: i, className: A.input, disabled: t, ...r }),
847
- /* @__PURE__ */ e("span", { className: A.indicator, "aria-hidden": "true", children: /* @__PURE__ */ e("span", { className: A.dot }) }),
848
- a ? /* @__PURE__ */ e("span", { className: A.label, children: a }) : null
849
- ]
850
- }
851
- )
852
- );
853
- we.displayName = "RadioButton";
854
- const Ne = "_slider_q8xxv_1", Ie = "_disabled_q8xxv_11", Ce = "_header_q8xxv_16", Se = "_label_q8xxv_23", We = "_value_q8xxv_27", Be = "_input_q8xxv_33", K = {
855
- slider: Ne,
856
- disabled: Ie,
857
- header: Ce,
858
- label: Se,
859
- value: We,
860
- input: Be
861
- }, De = D(
862
- ({ className: n, label: a, showValue: t, disabled: r, value: i, defaultValue: s, ...l }, p) => {
863
- const m = i ?? s ?? "";
864
- return /* @__PURE__ */ C(
865
- "label",
866
- {
867
- [f]: y.slider,
868
- className: w(K.slider, r && K.disabled, n),
869
- children: [
870
- a || t ? /* @__PURE__ */ C("span", { className: K.header, children: [
871
- a ? /* @__PURE__ */ e("span", { className: K.label, children: a }) : null,
872
- t ? /* @__PURE__ */ e("span", { className: K.value, children: m }) : null
873
- ] }) : null,
874
- /* @__PURE__ */ e(
875
- wn,
876
- {
877
- ref: p,
878
- className: K.input,
879
- disabled: r,
880
- value: i,
881
- defaultValue: s,
882
- ...l
883
- }
884
- )
885
- ]
886
- }
887
- );
888
- }
889
- );
890
- De.displayName = "Slider";
891
- const Te = "_pillInput_1tv9n_1", Pe = "_disabled_1tv9n_26", Fe = "_pill_1tv9n_1", Ve = "_pillText_1tv9n_48", Ee = "_pillRemove_1tv9n_55", Re = "_input_1tv9n_75", G = {
892
- pillInput: Te,
893
- disabled: Pe,
894
- pill: Fe,
895
- pillText: Ve,
896
- pillRemove: Ee,
897
- input: Re
898
- }, qe = D(
899
- ({
900
- className: n,
901
- values: a,
902
- onChange: t,
903
- placeholder: r,
904
- disabled: i,
905
- maxPills: s,
906
- delimiters: l = [],
907
- ...p
908
- }, m) => {
909
- const [c, $] = J([]), [_, v] = J(""), N = Z(null), h = a ?? c, I = k(
910
- (u) => {
911
- a || $(u), t?.(u);
912
- },
913
- [a, t]
914
- ), b = k(
915
- (u) => {
916
- const T = u.trim();
917
- T && (h.includes(T) || s != null && h.length >= s || (I([...h, T]), v("")));
918
- },
919
- [h, s, I]
920
- ), x = k(
921
- (u) => {
922
- I(h.filter((T, z) => z !== u)), N.current?.focus();
923
- },
924
- [h, I]
925
- ), d = k(
926
- (u) => {
927
- if (u.key === "Enter") {
928
- u.preventDefault(), b(_);
929
- return;
930
- }
931
- if (u.key === "Backspace" && _ === "" && h.length > 0) {
932
- x(h.length - 1);
933
- return;
934
- }
935
- l.includes(u.key) && (u.preventDefault(), b(_));
936
- },
937
- [_, h, l, b, x]
938
- ), S = k(() => {
939
- i || N.current?.focus();
940
- }, [i]), W = k(
941
- (u) => {
942
- !i && (u.key === "Enter" || u.key === " ") && N.current?.focus();
943
- },
944
- [i]
945
- );
946
- return /* @__PURE__ */ C(
947
- "div",
948
- {
949
- [f]: y.pillInput,
950
- role: "toolbar",
951
- className: w(G.pillInput, i && G.disabled, n),
952
- onClick: S,
953
- onKeyDown: W,
954
- ...p,
955
- children: [
956
- h.map((u) => /* @__PURE__ */ C("span", { className: G.pill, children: [
957
- /* @__PURE__ */ e("span", { className: G.pillText, children: u }),
958
- i ? null : /* @__PURE__ */ e(
959
- "button",
960
- {
961
- type: "button",
962
- className: G.pillRemove,
963
- onClick: (T) => {
964
- T.stopPropagation(), x(h.indexOf(u));
965
- },
966
- "aria-label": `Remove ${u}`,
967
- tabIndex: -1,
968
- children: /* @__PURE__ */ e(_n, {})
969
- }
970
- )
971
- ] }, u)),
972
- /* @__PURE__ */ e(
973
- "input",
974
- {
975
- ref: tn(m, N),
976
- className: G.input,
977
- type: "text",
978
- value: _,
979
- onChange: (u) => v(u.target.value),
980
- onKeyDown: d,
981
- placeholder: h.length === 0 ? r : void 0,
982
- disabled: i,
983
- "aria-label": p["aria-label"],
984
- "aria-labelledby": p["aria-labelledby"]
985
- }
986
- )
987
- ]
988
- }
989
- );
990
- }
991
- );
992
- qe.displayName = "PillInput";
993
- const Le = "_dropZone_7sw02_1", Me = "_dragOver_7sw02_31", je = "_disabled_7sw02_35", He = "_input_7sw02_44", Oe = "_content_7sw02_53", Ae = "_icon_7sw02_61", Ke = "_text_7sw02_67", j = {
994
- dropZone: Le,
995
- dragOver: Me,
996
- disabled: je,
997
- input: He,
998
- content: Oe,
999
- icon: Ae,
1000
- text: Ke
1001
- }, Ge = D(
1002
- ({ className: n, onChange: a, accept: t, multiple: r, disabled: i, children: s, ...l }, p) => {
1003
- const [m, c] = J(!1), $ = Z(null), _ = k(
1004
- (d) => {
1005
- !d || d.length === 0 || a?.(Array.from(d));
1006
- },
1007
- [a]
1008
- ), v = k(
1009
- (d) => {
1010
- d.preventDefault(), i || c(!0);
1011
- },
1012
- [i]
1013
- ), N = k((d) => {
1014
- d.preventDefault(), c(!1);
1015
- }, []), h = k(
1016
- (d) => {
1017
- d.preventDefault(), c(!1), i || _(d.dataTransfer.files);
1018
- },
1019
- [i, _]
1020
- ), I = k(
1021
- (d) => {
1022
- _(d.target.files), d.target.value = "";
1023
- },
1024
- [_]
1025
- ), b = k(() => {
1026
- i || $.current?.click();
1027
- }, [i]), x = k(
1028
- (d) => {
1029
- !i && (d.key === "Enter" || d.key === " ") && (d.preventDefault(), $.current?.click());
1030
- },
1031
- [i]
1032
- );
1033
- return /* @__PURE__ */ C(ln, { children: [
1034
- /* @__PURE__ */ e(
1035
- "input",
1036
- {
1037
- ref: tn(p, $),
1038
- type: "file",
1039
- className: j.input,
1040
- accept: t,
1041
- multiple: r,
1042
- disabled: i,
1043
- onChange: I,
1044
- tabIndex: -1,
1045
- "aria-hidden": "true"
1046
- }
1047
- ),
1048
- /* @__PURE__ */ e(
1049
- "div",
1050
- {
1051
- [f]: y.fileDropZone,
1052
- role: "button",
1053
- tabIndex: i ? -1 : 0,
1054
- "aria-disabled": i || void 0,
1055
- className: w(
1056
- j.dropZone,
1057
- m && j.dragOver,
1058
- i && j.disabled,
1059
- n
1060
- ),
1061
- onClick: b,
1062
- onKeyDown: x,
1063
- onDragOver: v,
1064
- onDragLeave: N,
1065
- onDrop: h,
1066
- ...l,
1067
- children: s ?? /* @__PURE__ */ C("div", { className: j.content, children: [
1068
- /* @__PURE__ */ e(et, { className: j.icon, "aria-hidden": "true" }),
1069
- /* @__PURE__ */ e("span", { className: j.text, children: "Drop files here or click to browse" })
1070
- ] })
1071
- }
1072
- )
1073
- ] });
1074
- }
1075
- );
1076
- Ge.displayName = "FileDropZone";
1077
- const Ze = "_comboBox_1en1h_1", ze = "_fullWidth_1en1h_6", Ue = "_wrapper_1en1h_10", Ye = "_disabled_1en1h_34", Je = "_open_1en1h_39", Qe = "_variantPrimary_1en1h_43", Xe = "_variantSecondary_1en1h_46", nr = "_variantTertiary_1en1h_50", tr = "_statusError_1en1h_58", er = "_statusWarning_1en1h_61", rr = "_statusSuccess_1en1h_64", ar = "_input_1en1h_68", ir = "_inputHidden_1en1h_84", or = "_singleValue_1en1h_91", sr = "_multiValueContainer_1en1h_100", cr = "_pill_1en1h_109", lr = "_pillText_1en1h_124", ur = "_pillRemove_1en1h_131", dr = "_indicator_1en1h_151", _r = "_indicatorOpen_1en1h_168", pr = "_listbox_1en1h_172", mr = "_options_1en1h_189", vr = "_option_1en1h_189", hr = "_optionHighlighted_1en1h_215", fr = "_optionSelected_1en1h_218", yr = "_optionDisabled_1en1h_221", br = "_optionCreate_1en1h_225", gr = "_optionLabel_1en1h_230", $r = "_checkIcon_1en1h_238", xr = "_group_1en1h_245", kr = "_groupLabel_1en1h_249", wr = "_header_1en1h_261", Nr = "_footer_1en1h_262", Ir = "_loading_1en1h_276", Cr = "_spinner_1en1h_287", Sr = "_empty_1en1h_306", o = {
1078
- comboBox: Ze,
1079
- fullWidth: ze,
1080
- wrapper: Ue,
1081
- disabled: Ye,
1082
- open: Je,
1083
- variantPrimary: Qe,
1084
- variantSecondary: Xe,
1085
- variantTertiary: nr,
1086
- statusError: tr,
1087
- statusWarning: er,
1088
- statusSuccess: rr,
1089
- input: ar,
1090
- inputHidden: ir,
1091
- singleValue: or,
1092
- multiValueContainer: sr,
1093
- pill: cr,
1094
- pillText: lr,
1095
- pillRemove: ur,
1096
- indicator: dr,
1097
- indicatorOpen: _r,
1098
- listbox: pr,
1099
- options: mr,
1100
- option: vr,
1101
- optionHighlighted: hr,
1102
- optionSelected: fr,
1103
- optionDisabled: yr,
1104
- optionCreate: br,
1105
- optionLabel: gr,
1106
- checkIcon: $r,
1107
- group: xr,
1108
- groupLabel: kr,
1109
- header: wr,
1110
- footer: Nr,
1111
- loading: Ir,
1112
- spinner: Cr,
1113
- empty: Sr
1114
- }, Wr = H(o.wrapper, {
1115
- variants: {
1116
- variant: {
1117
- primary: o.variantPrimary,
1118
- secondary: o.variantSecondary,
1119
- tertiary: o.variantTertiary
1120
- }
1121
- },
1122
- defaultVariants: {
1123
- variant: "primary"
1124
- }
1125
- }), Br = {
1126
- error: o.statusError,
1127
- warning: o.statusWarning,
1128
- success: o.statusSuccess
341
+ var ye = S(({ className: e, variant: t, validationStatus: i, value: a, defaultValue: o, min: s, max: c, step: l = 1, precision: d, onChange: f, fullWidth: p, disabled: m, readOnly: h, ...g }, _) => {
342
+ let v = O(null), y = _ || v, b = a !== void 0, [x, S] = k(() => o === void 0 ? "" : V(o, d)), C = b ? a === "" ? "" : V(a, d) : x;
343
+ T(() => {
344
+ b && a !== "" && S(V(a, d));
345
+ }, [
346
+ a,
347
+ d,
348
+ b
349
+ ]);
350
+ let E = w((e) => {
351
+ let t = ve(e, s, c), n = V(t, d);
352
+ b || S(n), f?.(t);
353
+ }, [
354
+ s,
355
+ c,
356
+ d,
357
+ b,
358
+ f
359
+ ]), D = w((e) => {
360
+ E((parseFloat(C) || 0) + l * e);
361
+ }, [
362
+ C,
363
+ l,
364
+ E
365
+ ]), A = w((e) => {
366
+ let t = e.target.value;
367
+ if (t === "" || t === "-" || t === ".") {
368
+ b || S(t), t === "" && f?.(void 0);
369
+ return;
370
+ }
371
+ let n = parseFloat(t);
372
+ isNaN(n) || (b || S(t), f?.(n));
373
+ }, [b, f]), N = w(() => {
374
+ let e = parseFloat(C);
375
+ isNaN(e) ? (b || S(""), f?.(void 0)) : E(e);
376
+ }, [
377
+ C,
378
+ b,
379
+ f,
380
+ E
381
+ ]), P = w((e) => {
382
+ e.key === "ArrowUp" ? (e.preventDefault(), D(1)) : e.key === "ArrowDown" && (e.preventDefault(), D(-1));
383
+ }, [D]);
384
+ return /* @__PURE__ */ M("div", {
385
+ [n]: r.numberInput,
386
+ className: u(ge({ variant: t }), i && _e[i], m && B.disabled, p && B.fullWidth, e),
387
+ children: [
388
+ /* @__PURE__ */ j("button", {
389
+ type: "button",
390
+ [n]: r.numberInputDecrement,
391
+ className: B.stepButton,
392
+ onClick: () => D(-1),
393
+ disabled: m || h || s !== void 0 && (parseFloat(C) || 0) <= s,
394
+ "aria-label": "Decrement",
395
+ tabIndex: -1,
396
+ children: /* @__PURE__ */ j(ce, {})
397
+ }),
398
+ /* @__PURE__ */ j("input", {
399
+ ref: y,
400
+ [n]: r.numberInputField,
401
+ className: B.field,
402
+ inputMode: "decimal",
403
+ value: C,
404
+ onChange: A,
405
+ onBlur: N,
406
+ onKeyDown: P,
407
+ disabled: m,
408
+ readOnly: h,
409
+ role: "spinbutton",
410
+ "aria-valuemin": s,
411
+ "aria-valuemax": c,
412
+ "aria-valuenow": typeof C == "string" ? parseFloat(C) || void 0 : C,
413
+ ...g
414
+ }),
415
+ /* @__PURE__ */ j("button", {
416
+ type: "button",
417
+ [n]: r.numberInputIncrement,
418
+ className: B.stepButton,
419
+ onClick: () => D(1),
420
+ disabled: m || h || c !== void 0 && (parseFloat(C) || 0) >= c,
421
+ "aria-label": "Increment",
422
+ tabIndex: -1,
423
+ children: /* @__PURE__ */ j(le, {})
424
+ })
425
+ ]
426
+ });
427
+ });
428
+ ye.displayName = "NumberInput";
429
+ var H = {
430
+ formField: "_formField_oj32b_1",
431
+ fullWidth: "_fullWidth_oj32b_6",
432
+ disabled: "_disabled_oj32b_12",
433
+ label: "_label_oj32b_17",
434
+ required: "_required_oj32b_24",
435
+ helperText: "_helperText_oj32b_29",
436
+ errorMessage: "_errorMessage_oj32b_37"
437
+ }, be = S(({ className: e, label: t, helperText: i, errorMessage: a, validationStatus: o, required: s, fullWidth: c, disabled: l, htmlFor: d, children: f, ...p }, m) => {
438
+ let h = E(), g = d ?? h, _ = `${g}-helper`, v = `${g}-error`, y = o === "error" && a, S = [y ? v : void 0, i ? _ : void 0].filter(Boolean).join(" ") || void 0, w = b.map(f, (e) => C(e) ? x(e, {
439
+ id: g,
440
+ "aria-describedby": S,
441
+ "aria-invalid": o === "error" ? !0 : void 0,
442
+ disabled: l || void 0
443
+ }) : e);
444
+ return /* @__PURE__ */ M("div", {
445
+ ref: m,
446
+ [n]: r.formField,
447
+ className: u(H.formField, c && H.fullWidth, l && H.disabled, e),
448
+ ...p,
449
+ children: [
450
+ /* @__PURE__ */ j("label", {
451
+ [n]: r.formFieldLabel,
452
+ htmlFor: g,
453
+ className: u(H.label, s && H.required),
454
+ children: t
455
+ }),
456
+ w,
457
+ y ? /* @__PURE__ */ j("p", {
458
+ [n]: r.formFieldError,
459
+ id: v,
460
+ className: H.errorMessage,
461
+ role: "alert",
462
+ children: a
463
+ }) : null,
464
+ i ? /* @__PURE__ */ j("p", {
465
+ [n]: r.formFieldHelper,
466
+ id: _,
467
+ className: H.helperText,
468
+ children: i
469
+ }) : null
470
+ ]
471
+ });
472
+ });
473
+ be.displayName = "FormField";
474
+ var U = {
475
+ checkbox: "_checkbox_16jsr_1",
476
+ disabled: "_disabled_16jsr_11",
477
+ input: "_input_16jsr_16",
478
+ indicator: "_indicator_16jsr_25",
479
+ label: "_label_16jsr_70"
480
+ }, xe = S(({ className: e, label: t, indeterminate: i, disabled: a, ...o }, s) => {
481
+ let l = O(null);
482
+ return T(() => {
483
+ l.current && (l.current.indeterminate = i ?? !1);
484
+ }, [i]), /* @__PURE__ */ M("label", {
485
+ [n]: r.checkbox,
486
+ className: u(U.checkbox, a && U.disabled, e),
487
+ children: [
488
+ /* @__PURE__ */ j(f, {
489
+ ref: d(s, l),
490
+ className: U.input,
491
+ disabled: a,
492
+ "data-indeterminate": i || void 0,
493
+ ...o
494
+ }),
495
+ /* @__PURE__ */ j("span", {
496
+ className: U.indicator,
497
+ "aria-hidden": "true",
498
+ [n]: r.checkboxIndicator,
499
+ children: j(i ? se : c, {})
500
+ }),
501
+ t ? /* @__PURE__ */ j("span", {
502
+ className: U.label,
503
+ [n]: r.checkboxLabel,
504
+ children: t
505
+ }) : null
506
+ ]
507
+ });
508
+ });
509
+ xe.displayName = "Checkbox";
510
+ var W = {
511
+ switch: "_switch_4ebr9_1",
512
+ disabled: "_disabled_4ebr9_11",
513
+ input: "_input_4ebr9_16",
514
+ track: "_track_4ebr9_25",
515
+ thumb: "_thumb_4ebr9_29",
516
+ label: "_label_4ebr9_71"
517
+ }, Se = S(({ className: e, label: t, disabled: i, ...a }, o) => /* @__PURE__ */ M("label", {
518
+ [n]: r.switch,
519
+ className: u(W.switch, i && W.disabled, e),
520
+ children: [
521
+ /* @__PURE__ */ j(p, {
522
+ ref: o,
523
+ className: W.input,
524
+ disabled: i,
525
+ ...a
526
+ }),
527
+ /* @__PURE__ */ j("span", {
528
+ className: W.track,
529
+ "aria-hidden": "true",
530
+ [n]: r.switchTrack,
531
+ children: /* @__PURE__ */ j("span", {
532
+ className: W.thumb,
533
+ [n]: r.switchThumb
534
+ })
535
+ }),
536
+ t ? /* @__PURE__ */ j("span", {
537
+ className: W.label,
538
+ [n]: r.switchLabel,
539
+ children: t
540
+ }) : null
541
+ ]
542
+ }));
543
+ Se.displayName = "Switch";
544
+ var G = {
545
+ radio: "_radio_160az_1",
546
+ disabled: "_disabled_160az_11",
547
+ input: "_input_160az_16",
548
+ indicator: "_indicator_160az_25",
549
+ dot: "_dot_160az_28",
550
+ label: "_label_160az_68"
551
+ }, Ce = S(({ className: e, label: t, disabled: i, ...a }, o) => /* @__PURE__ */ M("label", {
552
+ [n]: r.radioButton,
553
+ className: u(G.radio, i && G.disabled, e),
554
+ children: [
555
+ /* @__PURE__ */ j(g, {
556
+ ref: o,
557
+ className: G.input,
558
+ disabled: i,
559
+ ...a
560
+ }),
561
+ /* @__PURE__ */ j("span", {
562
+ className: G.indicator,
563
+ "aria-hidden": "true",
564
+ [n]: r.radioButtonIndicator,
565
+ children: /* @__PURE__ */ j("span", { className: G.dot })
566
+ }),
567
+ t ? /* @__PURE__ */ j("span", {
568
+ className: G.label,
569
+ [n]: r.radioButtonLabel,
570
+ children: t
571
+ }) : null
572
+ ]
573
+ }));
574
+ Ce.displayName = "RadioButton";
575
+ var K = {
576
+ slider: "_slider_fo9xz_1",
577
+ disabled: "_disabled_fo9xz_11",
578
+ header: "_header_fo9xz_16",
579
+ label: "_label_fo9xz_23",
580
+ value: "_value_fo9xz_27",
581
+ input: "_input_fo9xz_33"
582
+ }, we = S(({ className: e, label: t, showValue: i, disabled: a, value: o, defaultValue: s, ...c }, l) => {
583
+ let d = o ?? s ?? "";
584
+ return /* @__PURE__ */ M("label", {
585
+ [n]: r.slider,
586
+ className: u(K.slider, a && K.disabled, e),
587
+ children: [t || i ? /* @__PURE__ */ M("span", {
588
+ className: K.header,
589
+ [n]: r.sliderHeader,
590
+ children: [t ? /* @__PURE__ */ j("span", {
591
+ className: K.label,
592
+ children: t
593
+ }) : null, i ? /* @__PURE__ */ j("span", {
594
+ className: K.value,
595
+ children: d
596
+ }) : null]
597
+ }) : null, /* @__PURE__ */ j(m, {
598
+ ref: l,
599
+ className: K.input,
600
+ disabled: a,
601
+ value: o,
602
+ defaultValue: s,
603
+ ...c
604
+ })]
605
+ });
606
+ });
607
+ we.displayName = "Slider";
608
+ var q = {
609
+ pillInput: "_pillInput_vxb9y_1",
610
+ disabled: "_disabled_vxb9y_26",
611
+ pill: "_pill_vxb9y_1",
612
+ pillText: "_pillText_vxb9y_48",
613
+ pillRemove: "_pillRemove_vxb9y_55",
614
+ input: "_input_vxb9y_75"
615
+ }, Te = S(({ className: e, values: t, onChange: i, placeholder: a, disabled: o, maxPills: c, delimiters: l = [], ...f }, p) => {
616
+ let [m, h] = k([]), [g, _] = k(""), v = O(null), y = t ?? m, b = w((e) => {
617
+ t || h(e), i?.(e);
618
+ }, [t, i]), x = w((e) => {
619
+ let t = e.trim();
620
+ t && (y.includes(t) || c != null && y.length >= c || (b([...y, t]), _("")));
621
+ }, [
622
+ y,
623
+ c,
624
+ b
625
+ ]), S = w((e) => {
626
+ b(y.filter((t, n) => n !== e)), v.current?.focus();
627
+ }, [y, b]), C = w((e) => {
628
+ if (e.key === "Enter") {
629
+ e.preventDefault(), x(g);
630
+ return;
631
+ }
632
+ if (e.key === "Backspace" && g === "" && y.length > 0) {
633
+ S(y.length - 1);
634
+ return;
635
+ }
636
+ l.includes(e.key) && (e.preventDefault(), x(g));
637
+ }, [
638
+ g,
639
+ y,
640
+ l,
641
+ x,
642
+ S
643
+ ]), T = w(() => {
644
+ o || v.current?.focus();
645
+ }, [o]), E = w((e) => {
646
+ !o && (e.key === "Enter" || e.key === " ") && v.current?.focus();
647
+ }, [o]);
648
+ return /* @__PURE__ */ M("div", {
649
+ [n]: r.pillInput,
650
+ role: "toolbar",
651
+ className: u(q.pillInput, o && q.disabled, e),
652
+ onClick: T,
653
+ onKeyDown: E,
654
+ ...f,
655
+ children: [y.map((e) => /* @__PURE__ */ M("span", {
656
+ className: q.pill,
657
+ children: [/* @__PURE__ */ j("span", {
658
+ className: q.pillText,
659
+ children: e
660
+ }), o ? null : /* @__PURE__ */ j("button", {
661
+ type: "button",
662
+ className: q.pillRemove,
663
+ onClick: (t) => {
664
+ t.stopPropagation(), S(y.indexOf(e));
665
+ },
666
+ "aria-label": `Remove ${e}`,
667
+ tabIndex: -1,
668
+ children: /* @__PURE__ */ j(s, {})
669
+ })]
670
+ }, e)), /* @__PURE__ */ j("input", {
671
+ ref: d(p, v),
672
+ className: q.input,
673
+ type: "text",
674
+ value: g,
675
+ onChange: (e) => _(e.target.value),
676
+ onKeyDown: C,
677
+ placeholder: y.length === 0 ? a : void 0,
678
+ disabled: o,
679
+ "aria-label": f["aria-label"],
680
+ "aria-labelledby": f["aria-labelledby"]
681
+ })]
682
+ });
683
+ });
684
+ Te.displayName = "PillInput";
685
+ var J = {
686
+ dropZone: "_dropZone_1uic8_1",
687
+ dragOver: "_dragOver_1uic8_31",
688
+ disabled: "_disabled_1uic8_35",
689
+ input: "_input_1uic8_44",
690
+ content: "_content_1uic8_53",
691
+ icon: "_icon_1uic8_61",
692
+ text: "_text_1uic8_67"
693
+ }, Ee = S(({ className: e, onChange: t, accept: i, multiple: a, disabled: o, children: s, ...c }, l) => {
694
+ let [f, p] = k(!1), m = O(null), h = w((e) => {
695
+ !e || e.length === 0 || t?.(Array.from(e));
696
+ }, [t]), g = w((e) => {
697
+ e.preventDefault(), o || p(!0);
698
+ }, [o]), _ = w((e) => {
699
+ e.preventDefault(), p(!1);
700
+ }, []), v = w((e) => {
701
+ e.preventDefault(), p(!1), o || h(e.dataTransfer.files);
702
+ }, [o, h]), y = w((e) => {
703
+ h(e.target.files), e.target.value = "";
704
+ }, [h]), b = w(() => {
705
+ o || m.current?.click();
706
+ }, [o]), x = w((e) => {
707
+ !o && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m.current?.click());
708
+ }, [o]);
709
+ return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j("input", {
710
+ ref: d(l, m),
711
+ type: "file",
712
+ className: J.input,
713
+ accept: i,
714
+ multiple: a,
715
+ disabled: o,
716
+ onChange: y,
717
+ tabIndex: -1,
718
+ "aria-hidden": "true",
719
+ [n]: r.fileDropZoneInput
720
+ }), /* @__PURE__ */ j("div", {
721
+ [n]: r.fileDropZone,
722
+ role: "button",
723
+ tabIndex: o ? -1 : 0,
724
+ "aria-disabled": o || void 0,
725
+ className: u(J.dropZone, f && J.dragOver, o && J.disabled, e),
726
+ onClick: b,
727
+ onKeyDown: x,
728
+ onDragOver: g,
729
+ onDragLeave: _,
730
+ onDrop: v,
731
+ ...c,
732
+ children: s ?? /* @__PURE__ */ M("div", {
733
+ className: J.content,
734
+ children: [/* @__PURE__ */ j(ue, {
735
+ className: J.icon,
736
+ "aria-hidden": "true"
737
+ }), /* @__PURE__ */ j("span", {
738
+ className: J.text,
739
+ children: "Drop files here or click to browse"
740
+ })]
741
+ })
742
+ })] });
743
+ });
744
+ Ee.displayName = "FileDropZone";
745
+ //#endregion
746
+ //#region src/components/Calendar/Calendar.tsx
747
+ var Y = {
748
+ root: l.root,
749
+ header: l.header,
750
+ navButton: l.navButton,
751
+ title: l.title,
752
+ weekdayRow: l.row,
753
+ weekday: l.weekday,
754
+ grid: l.grid,
755
+ row: l.row,
756
+ day: l.day,
757
+ dayToday: l.dayToday,
758
+ daySelected: l.daySelected,
759
+ dayDisabled: l.dayDisabled,
760
+ dayOutside: l.dayOutside,
761
+ footer: l.footer
762
+ }, X = S(({ className: e, classNames: t, ...i }, a) => /* @__PURE__ */ j(y, {
763
+ ref: a,
764
+ classNames: D(() => {
765
+ if (!t) return {
766
+ ...Y,
767
+ root: u(Y.root, e)
768
+ };
769
+ let n = {};
770
+ for (let e of Object.keys(Y)) n[e] = u(Y[e], t[e]);
771
+ return n.root = u(n.root, e), n;
772
+ }, [e, t]),
773
+ dataAttributes: { [n]: r.calendar },
774
+ ...i
775
+ }));
776
+ X.displayName = "Calendar";
777
+ var Z = {
778
+ wrapper: "_wrapper_1lnj7_1",
779
+ disabled: "_disabled_1lnj7_26",
780
+ fullWidth: "_fullWidth_1lnj7_31",
781
+ calendarOpen: "_calendarOpen_1lnj7_34",
782
+ variantPrimary: "_variantPrimary_1lnj7_38",
783
+ variantSecondary: "_variantSecondary_1lnj7_41",
784
+ variantTertiary: "_variantTertiary_1lnj7_45",
785
+ statusError: "_statusError_1lnj7_54",
786
+ statusWarning: "_statusWarning_1lnj7_57",
787
+ statusSuccess: "_statusSuccess_1lnj7_60",
788
+ field: "_field_1lnj7_64",
789
+ adornment: "_adornment_1lnj7_84",
790
+ popup: "_popup_1lnj7_117"
791
+ }, De = a(Z.wrapper, {
792
+ variants: { variant: {
793
+ primary: Z.variantPrimary,
794
+ secondary: Z.variantSecondary,
795
+ tertiary: Z.variantTertiary
796
+ } },
797
+ defaultVariants: { variant: "primary" }
798
+ }), Oe = {
799
+ error: Z.statusError,
800
+ warning: Z.statusWarning,
801
+ success: Z.statusSuccess
1129
802
  };
1130
- function Dr() {
1131
- return /* @__PURE__ */ e(dn, { className: o.checkIcon, "aria-hidden": "true" });
1132
- }
1133
- function Tr(n) {
1134
- return /* @__PURE__ */ e(
1135
- "span",
1136
- {
1137
- className: w(o.indicator, n && o.indicatorOpen),
1138
- "aria-hidden": "true",
1139
- children: /* @__PURE__ */ e(tt, {})
1140
- }
1141
- );
803
+ function ke() {
804
+ return /* @__PURE__ */ j(t, {
805
+ "aria-hidden": "true",
806
+ [n]: r.calendarIcon
807
+ });
1142
808
  }
1143
- function Pr() {
1144
- return /* @__PURE__ */ e(_n, {});
809
+ function Ae() {
810
+ return /* @__PURE__ */ j(e, { "aria-hidden": "true" });
1145
811
  }
1146
- function Fr() {
1147
- return /* @__PURE__ */ C(ln, { children: [
1148
- /* @__PURE__ */ e(rt, { className: o.spinner, "aria-hidden": "true" }),
1149
- "Loading..."
1150
- ] });
812
+ function je() {
813
+ return /* @__PURE__ */ j(i, { "aria-hidden": "true" });
1151
814
  }
1152
- const Vr = { [f]: y.comboBox };
1153
- function Er({
1154
- className: n,
1155
- variant: a,
1156
- validationStatus: t,
1157
- fullWidth: r,
1158
- disabled: i = !1,
1159
- open: s,
1160
- ...l
1161
- }, p) {
1162
- const m = yn(
1163
- () => ({
1164
- root: w(o.comboBox, r && o.fullWidth, n),
1165
- wrapper: w(
1166
- Wr({ variant: a }),
1167
- i && o.disabled,
1168
- t && Br[t],
1169
- s && o.open
1170
- ),
1171
- multiValueContainer: o.multiValueContainer,
1172
- pill: o.pill,
1173
- pillText: o.pillText,
1174
- pillRemove: o.pillRemove,
1175
- singleValue: o.singleValue,
1176
- input: o.input,
1177
- inputHidden: o.inputHidden,
1178
- indicator: o.indicator,
1179
- indicatorOpen: o.indicatorOpen,
1180
- listbox: o.listbox,
1181
- header: o.header,
1182
- footer: o.footer,
1183
- options: o.options,
1184
- option: o.option,
1185
- optionHighlighted: o.optionHighlighted,
1186
- optionSelected: o.optionSelected,
1187
- optionDisabled: o.optionDisabled,
1188
- optionCreate: o.optionCreate,
1189
- optionLabel: o.optionLabel,
1190
- checkIcon: o.checkIcon,
1191
- group: o.group,
1192
- groupLabel: o.groupLabel,
1193
- loading: o.loading,
1194
- spinner: o.spinner,
1195
- empty: o.empty
1196
- }),
1197
- [n, a, t, r, i, s]
1198
- );
1199
- return /* @__PURE__ */ e(
1200
- Nn,
1201
- {
1202
- ref: p,
1203
- disabled: i,
1204
- open: s,
1205
- classNames: m,
1206
- dataAttributes: Vr,
1207
- renderCheckIcon: Dr,
1208
- renderIndicator: Tr,
1209
- renderPillRemoveIcon: Pr,
1210
- renderLoading: Fr,
1211
- ...l
1212
- }
1213
- );
1214
- }
1215
- const Rr = D(Er);
1216
- Rr.displayName = "ComboBox";
1217
- const qr = "_badge_11y0a_1", Lr = "_variantPrimary_11y0a_17", Mr = "_variantSecondary_11y0a_22", jr = "_variantTertiary_11y0a_27", Hr = "_sentimentDanger_11y0a_32", Or = "_sentimentSuccess_11y0a_37", Ar = "_sentimentWarning_11y0a_41", Kr = "_sentimentInfo_11y0a_45", q = {
1218
- badge: qr,
1219
- variantPrimary: Lr,
1220
- variantSecondary: Mr,
1221
- variantTertiary: jr,
1222
- sentimentDanger: Hr,
1223
- sentimentSuccess: Or,
1224
- sentimentWarning: Ar,
1225
- sentimentInfo: Kr
1226
- }, Gr = {
1227
- danger: q.sentimentDanger,
1228
- success: q.sentimentSuccess,
1229
- warning: q.sentimentWarning,
1230
- info: q.sentimentInfo
1231
- }, Zr = H(q.badge, {
1232
- variants: {
1233
- variant: {
1234
- primary: q.variantPrimary,
1235
- secondary: q.variantSecondary,
1236
- tertiary: q.variantTertiary
1237
- }
1238
- },
1239
- defaultVariants: {
1240
- variant: "primary"
1241
- }
1242
- }), zr = D(
1243
- ({ className: n, variant: a, sentiment: t, children: r, ...i }, s) => /* @__PURE__ */ e(
1244
- "span",
1245
- {
1246
- ref: s,
1247
- [f]: y.badge,
1248
- className: w(
1249
- Zr({ variant: a }),
1250
- t && Gr[t],
1251
- n
1252
- ),
1253
- ...i,
1254
- children: r
1255
- }
1256
- )
1257
- );
1258
- zr.displayName = "Badge";
1259
- const Ur = "_divider_1kyjw_1", Yr = "_horizontal_1kyjw_7", Jr = "_vertical_1kyjw_11", nn = {
1260
- divider: Ur,
1261
- horizontal: Yr,
1262
- vertical: Jr
1263
- }, Qr = D(
1264
- ({ className: n, orientation: a = "horizontal", decorative: t = !1, ...r }, i) => /* @__PURE__ */ e(
1265
- "hr",
1266
- {
1267
- ref: i,
1268
- [f]: y.divider,
1269
- className: w(
1270
- nn.divider,
1271
- a === "vertical" ? nn.vertical : nn.horizontal,
1272
- n
1273
- ),
1274
- ...t ? { "aria-hidden": !0 } : { role: "separator", "aria-orientation": a },
1275
- ...r
1276
- }
1277
- )
1278
- );
1279
- Qr.displayName = "Divider";
1280
- export {
1281
- zr as Badge,
1282
- qn as Button,
1283
- Qn as ButtonGroup,
1284
- de as Checkbox,
1285
- Rr as ComboBox,
1286
- Qr as Divider,
1287
- f as FINRA_UI_ATTR,
1288
- Ge as FileDropZone,
1289
- ie as FormField,
1290
- Un as IconButton,
1291
- gt as Input,
1292
- Jt as NumberInput,
1293
- qe as PillInput,
1294
- we as RadioButton,
1295
- De as Slider,
1296
- fe as Switch,
1297
- Et as Textarea,
1298
- y as componentIds
1299
- };
1300
- //# sourceMappingURL=index.js.map
815
+ var Me = S(({ className: e, variant: t, validationStatus: i, fullWidth: a, disabled: o, ...s }, c) => /* @__PURE__ */ j(v, {
816
+ ref: c,
817
+ disabled: o,
818
+ classNames: D(() => ({
819
+ root: u(De({ variant: t }), i && Oe[i], o && Z.disabled, a && Z.fullWidth, e),
820
+ calendarOpen: Z.calendarOpen,
821
+ input: Z.field,
822
+ adornment: Z.adornment,
823
+ popup: Z.popup,
824
+ calendar: {
825
+ root: l.root,
826
+ header: l.header,
827
+ navButton: l.navButton,
828
+ title: l.title,
829
+ weekdayRow: l.weekdayRow,
830
+ weekday: l.weekday,
831
+ grid: l.grid,
832
+ row: l.row,
833
+ day: l.day,
834
+ dayToday: l.dayToday,
835
+ daySelected: l.daySelected,
836
+ dayDisabled: l.dayDisabled,
837
+ dayOutside: l.dayOutside,
838
+ footer: l.footer
839
+ }
840
+ }), [
841
+ e,
842
+ t,
843
+ i,
844
+ a,
845
+ o
846
+ ]),
847
+ dataAttributes: { [n]: r.dateInput },
848
+ renderCalendarIcon: ke,
849
+ renderCalendarNavPrev: Ae,
850
+ renderCalendarNavNext: je,
851
+ ...s
852
+ }));
853
+ Me.displayName = "DateInput";
854
+ var Q = {
855
+ badge: "_badge_1mq4h_1",
856
+ variantPrimary: "_variantPrimary_1mq4h_23",
857
+ variantSecondary: "_variantSecondary_1mq4h_28",
858
+ variantTertiary: "_variantTertiary_1mq4h_33",
859
+ sentimentDanger: "_sentimentDanger_1mq4h_38",
860
+ sentimentSuccess: "_sentimentSuccess_1mq4h_44",
861
+ sentimentWarning: "_sentimentWarning_1mq4h_49",
862
+ sentimentInfo: "_sentimentInfo_1mq4h_54"
863
+ }, Ne = {
864
+ danger: Q.sentimentDanger,
865
+ success: Q.sentimentSuccess,
866
+ warning: Q.sentimentWarning,
867
+ info: Q.sentimentInfo
868
+ }, Pe = a(Q.badge, {
869
+ variants: { variant: {
870
+ primary: Q.variantPrimary,
871
+ secondary: Q.variantSecondary,
872
+ tertiary: Q.variantTertiary
873
+ } },
874
+ defaultVariants: { variant: "primary" }
875
+ }), Fe = S(({ className: e, variant: t, sentiment: i, children: a, ...o }, s) => /* @__PURE__ */ j("span", {
876
+ ref: s,
877
+ [n]: r.badge,
878
+ className: u(Pe({ variant: t }), i && Ne[i], e),
879
+ ...o,
880
+ children: a
881
+ }));
882
+ Fe.displayName = "Badge";
883
+ var $ = {
884
+ divider: "_divider_qn523_1",
885
+ horizontal: "_horizontal_qn523_7",
886
+ vertical: "_vertical_qn523_11"
887
+ }, Ie = S(({ className: e, orientation: t = "horizontal", decorative: i = !1, ...a }, o) => /* @__PURE__ */ j("hr", {
888
+ ref: o,
889
+ [n]: r.divider,
890
+ className: u($.divider, t === "vertical" ? $.vertical : $.horizontal, e),
891
+ ...i ? { "aria-hidden": !0 } : {
892
+ role: "separator",
893
+ "aria-orientation": t
894
+ },
895
+ ...a
896
+ }));
897
+ Ie.displayName = "Divider";
898
+ //#endregion
899
+ export { Fe as Badge, F as Button, ae as ButtonGroup, X as Calendar, xe as Checkbox, o as ComboBox, Me as DateInput, Ie as Divider, n as FINRA_UI_ATTR, Ee as FileDropZone, be as FormField, re as IconButton, pe as Input, ye as NumberInput, Te as PillInput, Ce as RadioButton, we as Slider, Se as Switch, z as Textarea, r as componentIds };
900
+
901
+ //# sourceMappingURL=index.js.map