@vellira-ui/react 2.22.1 → 2.22.5
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.js +232 -221
- package/dist/styles.css +1 -1
- package/package.json +15 -15
package/dist/index.js
CHANGED
|
@@ -3,21 +3,21 @@ import l from "clsx";
|
|
|
3
3
|
import { createPortal as u } from "react-dom";
|
|
4
4
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
5
|
import { FloatingPortal as m, arrow as h, autoUpdate as g, flip as _, offset as v, shift as y, size as b, useFloating as x, useFocus as S, useHover as C, useInteractions as w } from "@floating-ui/react";
|
|
6
|
-
import { useControllableState as T, useKeyboardNavigation as
|
|
7
|
-
import { Check as
|
|
8
|
-
import
|
|
6
|
+
import { useControllableState as T, useKeyboardNavigation as ee, useTabsKeyboard as E } from "@vellira-ui/core";
|
|
7
|
+
import { Check as D, ChevronDown as O, Close as k } from "@vellira-ui/icons";
|
|
8
|
+
import A from "focus-trap-react";
|
|
9
9
|
//#region src/utils/cn.ts
|
|
10
|
-
var
|
|
10
|
+
var j = (...e) => l(e), M = ({ children: e }) => {
|
|
11
11
|
let [t, n] = c(!1);
|
|
12
12
|
if (i(() => {
|
|
13
13
|
n(!0);
|
|
14
14
|
}, []), !t) return null;
|
|
15
15
|
let r = document.getElementById("overlay-root") ?? document.body;
|
|
16
16
|
return r ? u(e, r) : null;
|
|
17
|
-
},
|
|
17
|
+
}, N = {
|
|
18
18
|
dropdown: "_dropdown_6pgxt_1",
|
|
19
19
|
dropdownIn: "_dropdownIn_6pgxt_1"
|
|
20
|
-
},
|
|
20
|
+
}, P = t(({ children: e, floatingStyles: t, menuId: n, labelledById: r, label: i, activeDescendantId: a, onKeyDown: o, className: s }, c) => /* @__PURE__ */ f(M, { children: /* @__PURE__ */ f("ul", {
|
|
21
21
|
ref: c,
|
|
22
22
|
id: n,
|
|
23
23
|
role: "menu",
|
|
@@ -27,10 +27,10 @@ var M = (...e) => l(e), N = ({ children: e }) => {
|
|
|
27
27
|
"aria-activedescendant": a,
|
|
28
28
|
onKeyDown: o,
|
|
29
29
|
style: t,
|
|
30
|
-
className:
|
|
30
|
+
className: j(N.dropdown, s),
|
|
31
31
|
children: e
|
|
32
32
|
}) }));
|
|
33
|
-
|
|
33
|
+
P.displayName = "DropdownContent";
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/hooks/useFloatingPosition.ts
|
|
36
36
|
var F = (e) => {
|
|
@@ -42,7 +42,7 @@ var F = (e) => {
|
|
|
42
42
|
t.removeEventListener("change", r);
|
|
43
43
|
};
|
|
44
44
|
}, [e]), t;
|
|
45
|
-
},
|
|
45
|
+
}, te = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", matchTriggerWidth: a = !1, mobileSheetBreakpoint: s, middleware: c = [] } = {}) => {
|
|
46
46
|
let l = F(s), { refs: u, floatingStyles: d, update: f, context: p, middlewareData: m, placement: h } = x({
|
|
47
47
|
open: e,
|
|
48
48
|
onOpenChange: t,
|
|
@@ -76,7 +76,7 @@ var F = (e) => {
|
|
|
76
76
|
setFloatingRef: u.setFloating,
|
|
77
77
|
updatePosition: f
|
|
78
78
|
};
|
|
79
|
-
},
|
|
79
|
+
}, I = (e, t, n = !0) => {
|
|
80
80
|
let r = s(e);
|
|
81
81
|
r.current = e;
|
|
82
82
|
let a = s(t);
|
|
@@ -88,11 +88,11 @@ var F = (e) => {
|
|
|
88
88
|
};
|
|
89
89
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
90
90
|
}, [n]);
|
|
91
|
-
},
|
|
91
|
+
}, L = { group: "_group_1yomt_1" }, R = ({ label: e }) => /* @__PURE__ */ f("li", {
|
|
92
92
|
role: "presentation",
|
|
93
|
-
className:
|
|
93
|
+
className: L.group,
|
|
94
94
|
children: e
|
|
95
|
-
}),
|
|
95
|
+
}), z = {
|
|
96
96
|
item: "_item_t87eq_1",
|
|
97
97
|
disabled: "_disabled_t87eq_18",
|
|
98
98
|
active: "_active_t87eq_28",
|
|
@@ -103,7 +103,7 @@ var F = (e) => {
|
|
|
103
103
|
"itemText--truncate": "_itemText--truncate_t87eq_74",
|
|
104
104
|
"itemText--wrap": "_itemText--wrap_t87eq_79",
|
|
105
105
|
"itemText--nowrap": "_itemText--nowrap_t87eq_83"
|
|
106
|
-
},
|
|
106
|
+
}, B = ({ id: e, children: t, label: n, icon: r, danger: i, disabled: a, active: o, onClick: s, onMouseEnter: c, shortcut: l, textWrap: u = "truncate", className: d }) => {
|
|
107
107
|
let m = t || n;
|
|
108
108
|
return /* @__PURE__ */ p("li", {
|
|
109
109
|
id: e,
|
|
@@ -114,47 +114,47 @@ var F = (e) => {
|
|
|
114
114
|
"data-danger": i || void 0,
|
|
115
115
|
onClick: a ? void 0 : s,
|
|
116
116
|
onMouseEnter: a ? void 0 : c,
|
|
117
|
-
className:
|
|
118
|
-
[
|
|
119
|
-
[
|
|
120
|
-
[
|
|
117
|
+
className: j(z.item, {
|
|
118
|
+
[z.active]: o,
|
|
119
|
+
[z.disabled]: a,
|
|
120
|
+
[z.danger]: i
|
|
121
121
|
}, d),
|
|
122
122
|
children: [
|
|
123
123
|
r && /* @__PURE__ */ f("span", {
|
|
124
124
|
"aria-hidden": "true",
|
|
125
|
-
className:
|
|
125
|
+
className: z.itemIcon,
|
|
126
126
|
children: r
|
|
127
127
|
}),
|
|
128
128
|
m && /* @__PURE__ */ f("span", {
|
|
129
|
-
className:
|
|
129
|
+
className: j(z.itemText, z[`itemText--${u}`]),
|
|
130
130
|
children: m
|
|
131
131
|
}),
|
|
132
132
|
l && /* @__PURE__ */ f("span", {
|
|
133
|
-
className:
|
|
133
|
+
className: z.itemShortcut,
|
|
134
134
|
children: l
|
|
135
135
|
})
|
|
136
136
|
]
|
|
137
137
|
});
|
|
138
|
-
},
|
|
138
|
+
}, V = { group: "_group_ts4nb_1" }, H = () => /* @__PURE__ */ f("li", {
|
|
139
139
|
role: "separator",
|
|
140
|
-
className:
|
|
140
|
+
className: V.separator,
|
|
141
141
|
"aria-hidden": "true"
|
|
142
|
-
}),
|
|
142
|
+
}), U = {
|
|
143
143
|
button: "_button_ii6sx_1",
|
|
144
144
|
disabled: "_disabled_ii6sx_16",
|
|
145
145
|
iconLeft: "_iconLeft_ii6sx_27",
|
|
146
146
|
arrow: "_arrow_ii6sx_39",
|
|
147
147
|
iconOnly: "_iconOnly_ii6sx_42",
|
|
148
148
|
open: "_open_ii6sx_75"
|
|
149
|
-
},
|
|
150
|
-
let u = !!n, d = !!e, m = u && !d, h = i && d, g = r ?? /* @__PURE__ */ f(
|
|
149
|
+
}, ne = t(({ children: e, isOpen: t, icon: n, arrowIcon: r, showArrow: i = !0, rotateAngle: a = 90, label: o, className: s, ...c }, l) => {
|
|
150
|
+
let u = !!n, d = !!e, m = u && !d, h = i && d, g = r ?? /* @__PURE__ */ f(O, {}), _ = m ? o ?? "Open menu" : void 0;
|
|
151
151
|
return /* @__PURE__ */ p("button", {
|
|
152
152
|
...c,
|
|
153
153
|
ref: l,
|
|
154
154
|
type: "button",
|
|
155
|
-
className:
|
|
156
|
-
[
|
|
157
|
-
[
|
|
155
|
+
className: j(U.button, {
|
|
156
|
+
[U.disabled]: c.disabled,
|
|
157
|
+
[U.iconOnly]: m
|
|
158
158
|
}, s),
|
|
159
159
|
"aria-label": _,
|
|
160
160
|
"aria-expanded": t,
|
|
@@ -163,57 +163,57 @@ var F = (e) => {
|
|
|
163
163
|
children: [
|
|
164
164
|
u && /* @__PURE__ */ f("span", {
|
|
165
165
|
"aria-hidden": "true",
|
|
166
|
-
className:
|
|
166
|
+
className: U.iconLeft,
|
|
167
167
|
children: n
|
|
168
168
|
}),
|
|
169
169
|
e,
|
|
170
170
|
h && /* @__PURE__ */ f("span", {
|
|
171
171
|
"aria-hidden": "true",
|
|
172
|
-
className:
|
|
172
|
+
className: j(U.arrow, { [U.open]: t }),
|
|
173
173
|
children: g
|
|
174
174
|
})
|
|
175
175
|
]
|
|
176
176
|
});
|
|
177
177
|
});
|
|
178
|
-
|
|
178
|
+
ne.displayName = "DropdownTrigger";
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region src/components/Dropdown/types.ts
|
|
181
|
-
var
|
|
182
|
-
let [v, y] = c(!1), [b, x] = c(-1), S = s(null), C = s(null), w = a(), T = `${w}-trigger`, { floatingStyles:
|
|
181
|
+
var re = (e) => e.type !== "group" && e.type !== "separator", W = (e) => e.type === "group", ie = (e) => e.type === "separator", ae = { wrapper: "_wrapper_14ue8_1" }, oe = ({ label: e, icon: t, trigger: n, items: r = [], onSelect: i, className: o, disabled: l, rotateAngle: u = 90, placement: d, matchTriggerWidth: m, textWrap: h, showArrow: g = !0, arrowIcon: _ }) => {
|
|
182
|
+
let [v, y] = c(!1), [b, x] = c(-1), S = s(null), C = s(null), w = a(), T = `${w}-trigger`, { floatingStyles: E, setRef: D, setFloatingRef: O } = te({
|
|
183
183
|
placement: d,
|
|
184
184
|
matchTriggerWidth: m,
|
|
185
185
|
mobileSheetBreakpoint: 640
|
|
186
|
-
}),
|
|
186
|
+
}), k = r.filter(re), A = v && b >= 0 ? `${w}-item-${b}` : void 0, M = () => k.findIndex((e) => !e.disabled), N = () => {
|
|
187
187
|
l || y((e) => {
|
|
188
188
|
let t = !e;
|
|
189
|
-
return x(t ?
|
|
189
|
+
return x(t ? M() : -1), t;
|
|
190
190
|
});
|
|
191
191
|
}, F = () => {
|
|
192
192
|
y(!1), x(-1);
|
|
193
|
-
},
|
|
193
|
+
}, L = () => {
|
|
194
194
|
F(), S.current?.focus();
|
|
195
|
-
}, { onKeyDown:
|
|
195
|
+
}, { onKeyDown: z } = ee({
|
|
196
196
|
activeIndex: b,
|
|
197
197
|
setActiveIndex: x,
|
|
198
|
-
items:
|
|
198
|
+
items: k,
|
|
199
199
|
isOpen: v,
|
|
200
|
-
onOpen:
|
|
200
|
+
onOpen: N,
|
|
201
201
|
onSelect: () => {
|
|
202
|
-
let e =
|
|
203
|
-
!e || e.disabled || (i?.(e.value),
|
|
202
|
+
let e = k[b];
|
|
203
|
+
!e || e.disabled || (i?.(e.value), L());
|
|
204
204
|
},
|
|
205
|
-
onClose:
|
|
205
|
+
onClose: L
|
|
206
206
|
});
|
|
207
|
-
|
|
208
|
-
let
|
|
209
|
-
S.current = e,
|
|
210
|
-
},
|
|
211
|
-
C.current = e,
|
|
207
|
+
I([S, C], () => F(), v);
|
|
208
|
+
let V = (e) => {
|
|
209
|
+
S.current = e, D(e);
|
|
210
|
+
}, U = (e) => {
|
|
211
|
+
C.current = e, O(e), e?.focus();
|
|
212
212
|
};
|
|
213
213
|
return /* @__PURE__ */ p("div", {
|
|
214
|
-
className:
|
|
215
|
-
children: [/* @__PURE__ */ f(
|
|
216
|
-
ref:
|
|
214
|
+
className: j(ae.wrapper, o),
|
|
215
|
+
children: [/* @__PURE__ */ f(ne, {
|
|
216
|
+
ref: V,
|
|
217
217
|
id: T,
|
|
218
218
|
isOpen: v,
|
|
219
219
|
disabled: l,
|
|
@@ -222,32 +222,32 @@ var ne = (e) => e.type !== "group" && e.type !== "separator", G = (e) => e.type
|
|
|
222
222
|
showArrow: g,
|
|
223
223
|
arrowIcon: _,
|
|
224
224
|
rotateAngle: u,
|
|
225
|
-
onClick:
|
|
226
|
-
onKeyDown:
|
|
225
|
+
onClick: N,
|
|
226
|
+
onKeyDown: z,
|
|
227
227
|
"aria-expanded": v,
|
|
228
228
|
"aria-haspopup": "menu",
|
|
229
229
|
...v && { "aria-controls": w },
|
|
230
230
|
children: n
|
|
231
|
-
}), v && /* @__PURE__ */ f(
|
|
232
|
-
ref:
|
|
233
|
-
floatingStyles:
|
|
231
|
+
}), v && /* @__PURE__ */ f(P, {
|
|
232
|
+
ref: U,
|
|
233
|
+
floatingStyles: E,
|
|
234
234
|
menuId: w,
|
|
235
235
|
labelledById: n ? T : void 0,
|
|
236
236
|
label: n ? void 0 : e,
|
|
237
|
-
activeDescendantId:
|
|
238
|
-
onKeyDown:
|
|
237
|
+
activeDescendantId: A,
|
|
238
|
+
onKeyDown: z,
|
|
239
239
|
children: r.map((e, t) => {
|
|
240
|
-
if (
|
|
241
|
-
if (
|
|
242
|
-
if (
|
|
243
|
-
let t =
|
|
244
|
-
return /* @__PURE__ */ f(
|
|
240
|
+
if (W(e)) return /* @__PURE__ */ f(R, { label: e.label }, `group-${e.label}`);
|
|
241
|
+
if (ie(e)) return /* @__PURE__ */ f(H, {}, `separator-${t}`);
|
|
242
|
+
if (re(e)) {
|
|
243
|
+
let t = k.findIndex((t) => t === e);
|
|
244
|
+
return /* @__PURE__ */ f(B, {
|
|
245
245
|
id: `${w}-item-${t}`,
|
|
246
246
|
...e,
|
|
247
247
|
active: b === t,
|
|
248
248
|
textWrap: e.textWrap || h,
|
|
249
249
|
onClick: () => {
|
|
250
|
-
e.disabled || (i?.(e.value),
|
|
250
|
+
e.disabled || (i?.(e.value), L());
|
|
251
251
|
},
|
|
252
252
|
onMouseEnter: () => {
|
|
253
253
|
t < 0 || e.disabled || x(t);
|
|
@@ -258,14 +258,14 @@ var ne = (e) => e.type !== "group" && e.type !== "separator", G = (e) => e.type
|
|
|
258
258
|
})
|
|
259
259
|
})]
|
|
260
260
|
});
|
|
261
|
-
},
|
|
262
|
-
let e = r(
|
|
261
|
+
}, se = e(void 0), G = () => {
|
|
262
|
+
let e = r(se);
|
|
263
263
|
if (e === void 0) throw Error("Modal compound components must be used inside Modal");
|
|
264
264
|
return e;
|
|
265
265
|
};
|
|
266
|
-
|
|
266
|
+
se.displayName = "ModalContext";
|
|
267
267
|
var ce = { modalBody: "_modalBody_iv33a_1" }, le = ({ children: e }) => {
|
|
268
|
-
let { descriptionId: t } =
|
|
268
|
+
let { descriptionId: t } = G();
|
|
269
269
|
return /* @__PURE__ */ f("div", {
|
|
270
270
|
id: t,
|
|
271
271
|
className: ce.modalBody,
|
|
@@ -288,7 +288,7 @@ var me = {
|
|
|
288
288
|
modalHeaderTitle: "_modalHeaderTitle_155d7_8",
|
|
289
289
|
modalHeaderCloseButton: "_modalHeaderCloseButton_155d7_15"
|
|
290
290
|
}, he = ({ children: e }) => {
|
|
291
|
-
let { onClose: t, titleId: n } =
|
|
291
|
+
let { onClose: t, titleId: n } = G();
|
|
292
292
|
return /* @__PURE__ */ p("div", {
|
|
293
293
|
className: me.modalHeader,
|
|
294
294
|
children: [/* @__PURE__ */ f("h2", {
|
|
@@ -300,7 +300,7 @@ var me = {
|
|
|
300
300
|
className: me.modalHeaderCloseButton,
|
|
301
301
|
onClick: t,
|
|
302
302
|
"aria-label": "Close modal",
|
|
303
|
-
children: /* @__PURE__ */ f(
|
|
303
|
+
children: /* @__PURE__ */ f(k, { size: 16 })
|
|
304
304
|
})]
|
|
305
305
|
});
|
|
306
306
|
};
|
|
@@ -318,7 +318,7 @@ var ge = ({ isOpen: e, onClose: t }) => {
|
|
|
318
318
|
"overlay--animated": "_overlay--animated_1xotg_17",
|
|
319
319
|
modal: "_modal_1xotg_21"
|
|
320
320
|
}, K = 0, ve = "", ye = ({ children: e, onClose: t, isOpen: r, className: a, closeOnBackdrop: o, closeOnClick: c, closeOnEsc: l = !0, zIndex: u = 1e3, animated: d = !0 }) => {
|
|
321
|
-
let p = o ?? c ?? !0, m = s(null), { titleId: h, descriptionId: g } =
|
|
321
|
+
let p = o ?? c ?? !0, m = s(null), { titleId: h, descriptionId: g } = G(), _ = n((e) => {
|
|
322
322
|
p && e.target === e.currentTarget && t?.();
|
|
323
323
|
}, [p, t]);
|
|
324
324
|
return ge({
|
|
@@ -328,14 +328,14 @@ var ge = ({ isOpen: e, onClose: t }) => {
|
|
|
328
328
|
if (r) return K === 0 && (ve = document.body.style.overflow), K += 1, document.body.style.overflow = "hidden", () => {
|
|
329
329
|
K = Math.max(0, K - 1), K === 0 && (document.body.style.overflow = ve);
|
|
330
330
|
};
|
|
331
|
-
}, [r]), !r && !d ? null : /* @__PURE__ */ f(
|
|
332
|
-
className:
|
|
331
|
+
}, [r]), !r && !d ? null : /* @__PURE__ */ f(M, { children: /* @__PURE__ */ f("div", {
|
|
332
|
+
className: j(_e.overlay, r && _e["overlay--open"], d && _e["overlay--animated"], a),
|
|
333
333
|
onClick: _,
|
|
334
334
|
tabIndex: -1,
|
|
335
335
|
role: "presentation",
|
|
336
336
|
"aria-hidden": !r,
|
|
337
337
|
style: { zIndex: u },
|
|
338
|
-
children: /* @__PURE__ */ f(
|
|
338
|
+
children: /* @__PURE__ */ f(A, {
|
|
339
339
|
active: r,
|
|
340
340
|
focusTrapOptions: {
|
|
341
341
|
fallbackFocus: () => m.current,
|
|
@@ -360,7 +360,7 @@ ye.displayName = "ModalOverlay";
|
|
|
360
360
|
//#region src/components/Modal/Modal.tsx
|
|
361
361
|
var be = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: o = !0 }) => {
|
|
362
362
|
let s = a(), c = a();
|
|
363
|
-
return e ? /* @__PURE__ */ f(
|
|
363
|
+
return e ? /* @__PURE__ */ f(se.Provider, {
|
|
364
364
|
value: {
|
|
365
365
|
onClose: n,
|
|
366
366
|
titleId: s,
|
|
@@ -394,7 +394,7 @@ var xe = Object.assign(be, {
|
|
|
394
394
|
}, Se = ({ id: e, label: t, description: n, error: r, required: i = !1, disabled: o = !1, children: s, className: c }) => {
|
|
395
395
|
let l = a(), u = e ?? l, d = n ? `${u}-description` : void 0, m = r ? `${u}-error` : void 0;
|
|
396
396
|
return /* @__PURE__ */ p("div", {
|
|
397
|
-
className:
|
|
397
|
+
className: j(q.wrapper, { [q.disabled]: o }, c),
|
|
398
398
|
"data-disabled": o || void 0,
|
|
399
399
|
"data-invalid": !!r || void 0,
|
|
400
400
|
children: [
|
|
@@ -425,50 +425,60 @@ var xe = Object.assign(be, {
|
|
|
425
425
|
]
|
|
426
426
|
});
|
|
427
427
|
}, J = {
|
|
428
|
-
group: "
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
428
|
+
group: "_group_10xq8_1",
|
|
429
|
+
groupLabel: "_groupLabel_10xq8_7",
|
|
430
|
+
required: "_required_10xq8_17",
|
|
431
|
+
vertical: "_vertical_10xq8_21",
|
|
432
|
+
horizontal: "_horizontal_10xq8_25",
|
|
433
|
+
option: "_option_10xq8_30",
|
|
434
|
+
disabled: "_disabled_10xq8_41",
|
|
435
|
+
customRadio: "_customRadio_10xq8_44",
|
|
436
|
+
input: "_input_10xq8_49",
|
|
437
|
+
label: "_label_10xq8_100"
|
|
436
438
|
}, Ce = ({ label: e, description: t, value: n, defaultValue: r, onChange: i, options: o, name: s, required: c = !1, disabled: l = !1, error: u, className: d, orientation: m = "vertical" }) => {
|
|
437
|
-
let h = a(), g = `${h}-group`, _ = [t ? `${h}-description` : void 0, u ? `${h}-error` : void 0].filter(Boolean).join(" ") || void 0, [
|
|
439
|
+
let h = a(), g = `${h}-group`, _ = e ? `${h}-label` : void 0, v = [t ? `${h}-description` : void 0, u ? `${h}-error` : void 0].filter(Boolean).join(" ") || void 0, [y, b] = T({
|
|
438
440
|
value: n,
|
|
439
441
|
defaultValue: r ?? "",
|
|
440
442
|
onChange: i
|
|
441
443
|
});
|
|
442
|
-
return /* @__PURE__ */
|
|
444
|
+
return /* @__PURE__ */ p(Se, {
|
|
443
445
|
id: h,
|
|
444
|
-
label: e,
|
|
445
446
|
description: t,
|
|
446
447
|
required: c,
|
|
447
448
|
disabled: l,
|
|
448
449
|
error: u,
|
|
449
|
-
children: /* @__PURE__ */
|
|
450
|
+
children: [e && /* @__PURE__ */ p("span", {
|
|
451
|
+
id: _,
|
|
452
|
+
className: J.groupLabel,
|
|
453
|
+
children: [e, c && /* @__PURE__ */ f("span", {
|
|
454
|
+
className: J.required,
|
|
455
|
+
"aria-hidden": "true",
|
|
456
|
+
children: "*"
|
|
457
|
+
})]
|
|
458
|
+
}), /* @__PURE__ */ f("div", {
|
|
450
459
|
id: g,
|
|
451
|
-
className:
|
|
460
|
+
className: j(J.group, J[m], d),
|
|
452
461
|
role: "radiogroup",
|
|
462
|
+
"aria-labelledby": _,
|
|
453
463
|
"aria-required": c || void 0,
|
|
454
464
|
"aria-invalid": !!u || void 0,
|
|
455
|
-
"aria-describedby":
|
|
465
|
+
"aria-describedby": v,
|
|
456
466
|
children: o.map((e) => {
|
|
457
467
|
let t = `${h}-${e.value}`, n = l || e.disabled;
|
|
458
468
|
return /* @__PURE__ */ p("label", {
|
|
459
469
|
htmlFor: t,
|
|
460
|
-
className:
|
|
470
|
+
className: j(J.option, { [J.disabled]: n }),
|
|
461
471
|
children: [
|
|
462
472
|
/* @__PURE__ */ f("input", {
|
|
463
473
|
id: t,
|
|
464
474
|
type: "radio",
|
|
465
475
|
name: s,
|
|
466
476
|
value: e.value,
|
|
467
|
-
checked:
|
|
477
|
+
checked: y === e.value,
|
|
468
478
|
required: c,
|
|
469
479
|
disabled: n,
|
|
470
480
|
onChange: () => {
|
|
471
|
-
n ||
|
|
481
|
+
n || b(e.value);
|
|
472
482
|
},
|
|
473
483
|
className: J.input
|
|
474
484
|
}),
|
|
@@ -483,7 +493,7 @@ var xe = Object.assign(be, {
|
|
|
483
493
|
]
|
|
484
494
|
}, e.value);
|
|
485
495
|
})
|
|
486
|
-
})
|
|
496
|
+
})]
|
|
487
497
|
});
|
|
488
498
|
};
|
|
489
499
|
Ce.displayName = "RadioGroup";
|
|
@@ -499,7 +509,7 @@ var we = {
|
|
|
499
509
|
role: "option",
|
|
500
510
|
"aria-selected": t,
|
|
501
511
|
"aria-disabled": o || void 0,
|
|
502
|
-
className:
|
|
512
|
+
className: j(we.option, {
|
|
503
513
|
[we.selected]: t,
|
|
504
514
|
[we.active]: n,
|
|
505
515
|
[we.disabled]: o
|
|
@@ -517,7 +527,7 @@ Te.displayName = "SelectOption";
|
|
|
517
527
|
var Ee = {
|
|
518
528
|
dropdown: "_dropdown_1vrjb_1",
|
|
519
529
|
dropdownIn: "_dropdownIn_1vrjb_1"
|
|
520
|
-
}, De = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, selectedValue: o, activeIndex: s, onSelect: c, onMouseEnter: l }) => e ? /* @__PURE__ */ f(
|
|
530
|
+
}, De = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, selectedValue: o, activeIndex: s, onSelect: c, onMouseEnter: l }) => e ? /* @__PURE__ */ f(M, { children: /* @__PURE__ */ f("ul", {
|
|
521
531
|
ref: r,
|
|
522
532
|
id: t,
|
|
523
533
|
role: "listbox",
|
|
@@ -556,73 +566,73 @@ var Y = {
|
|
|
556
566
|
"aria-controls": n ? a : void 0,
|
|
557
567
|
"aria-describedby": t,
|
|
558
568
|
"aria-activedescendant": n && o >= 0 ? `${a}-option-${o}` : void 0,
|
|
559
|
-
className:
|
|
569
|
+
className: j(Y.control, {
|
|
560
570
|
[Y.error]: !!c,
|
|
561
571
|
[Y.disabled]: r
|
|
562
572
|
}),
|
|
563
573
|
onClick: m,
|
|
564
574
|
onKeyDown: h,
|
|
565
575
|
children: [/* @__PURE__ */ f("span", {
|
|
566
|
-
className:
|
|
576
|
+
className: j(Y.value, { [Y.placeholder]: u }),
|
|
567
577
|
children: l
|
|
568
578
|
}), /* @__PURE__ */ f("span", {
|
|
569
|
-
className:
|
|
579
|
+
className: j(Y.arrow, { [Y.open]: n }),
|
|
570
580
|
"aria-hidden": "true",
|
|
571
|
-
children: /* @__PURE__ */ f(
|
|
581
|
+
children: /* @__PURE__ */ f(O, {})
|
|
572
582
|
})]
|
|
573
583
|
});
|
|
574
584
|
Oe.displayName = "SelectTrigger";
|
|
575
585
|
//#endregion
|
|
576
586
|
//#region src/components/Select/Select.tsx
|
|
577
587
|
var ke = ({ label: e, description: t, id: r, name: i, value: l, defaultValue: u, onChange: d, options: m, placeholder: h = "Select...", required: g = !1, disabled: _ = !1, error: v, className: y }) => {
|
|
578
|
-
let b = a(), x = r ?? b, S = `${x}-listbox`, C = v ? `${x}-error` : void 0, w = s(null),
|
|
588
|
+
let b = a(), x = r ?? b, S = `${x}-listbox`, C = v ? `${x}-error` : void 0, w = s(null), E = s(null), [D, O] = T({
|
|
579
589
|
value: l,
|
|
580
590
|
defaultValue: u ?? "",
|
|
581
591
|
onChange: d
|
|
582
|
-
}), [
|
|
583
|
-
open:
|
|
592
|
+
}), [k, A] = c(!1), [j, M] = c(-1), N = o(() => m.find((e) => e.value === D), [m, D]), P = !!N, { floatingStyles: F, setRef: L, setFloatingRef: R } = te({
|
|
593
|
+
open: k,
|
|
584
594
|
matchTriggerWidth: !0,
|
|
585
595
|
mobileSheetBreakpoint: 640
|
|
586
|
-
}),
|
|
587
|
-
let e = m.findIndex((e) => e.value ===
|
|
596
|
+
}), z = n(() => {
|
|
597
|
+
let e = m.findIndex((e) => e.value === D && !e.disabled);
|
|
588
598
|
return e >= 0 ? e : m.findIndex((e) => !e.disabled);
|
|
589
|
-
}, [m,
|
|
590
|
-
_ || (
|
|
591
|
-
}, [_,
|
|
592
|
-
|
|
593
|
-
}, []),
|
|
599
|
+
}, [m, D]), B = n(() => {
|
|
600
|
+
_ || (M(z()), A(!0));
|
|
601
|
+
}, [_, z]), V = n(() => {
|
|
602
|
+
A(!1);
|
|
603
|
+
}, []), H = n(() => {
|
|
594
604
|
if (!_) {
|
|
595
|
-
if (
|
|
596
|
-
|
|
605
|
+
if (k) {
|
|
606
|
+
V();
|
|
597
607
|
return;
|
|
598
608
|
}
|
|
599
|
-
|
|
609
|
+
B();
|
|
600
610
|
}
|
|
601
611
|
}, [
|
|
602
|
-
|
|
612
|
+
V,
|
|
603
613
|
_,
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
]),
|
|
607
|
-
|
|
608
|
-
}, [
|
|
609
|
-
activeIndex:
|
|
610
|
-
setActiveIndex:
|
|
614
|
+
k,
|
|
615
|
+
B
|
|
616
|
+
]), U = n((e) => {
|
|
617
|
+
O(e), V(), w.current?.focus();
|
|
618
|
+
}, [V, O]), { onKeyDown: ne } = ee({
|
|
619
|
+
activeIndex: j,
|
|
620
|
+
setActiveIndex: M,
|
|
611
621
|
items: m,
|
|
612
|
-
isOpen:
|
|
613
|
-
onOpen:
|
|
614
|
-
onClose:
|
|
622
|
+
isOpen: k,
|
|
623
|
+
onOpen: B,
|
|
624
|
+
onClose: V,
|
|
615
625
|
onSelect: () => {
|
|
616
|
-
let e = m[
|
|
617
|
-
!e || e.disabled ||
|
|
626
|
+
let e = m[j];
|
|
627
|
+
!e || e.disabled || U(e.value);
|
|
618
628
|
}
|
|
619
629
|
});
|
|
620
|
-
|
|
621
|
-
let
|
|
622
|
-
w.current = e,
|
|
623
|
-
}, [
|
|
624
|
-
|
|
625
|
-
}, [
|
|
630
|
+
I([w, E], V, k);
|
|
631
|
+
let re = n((e) => {
|
|
632
|
+
w.current = e, L(e);
|
|
633
|
+
}, [L]), W = n((e) => {
|
|
634
|
+
E.current = e, R(e);
|
|
635
|
+
}, [R]);
|
|
626
636
|
return /* @__PURE__ */ p(Se, {
|
|
627
637
|
id: x,
|
|
628
638
|
label: e,
|
|
@@ -635,36 +645,36 @@ var ke = ({ label: e, description: t, id: r, name: i, value: l, defaultValue: u,
|
|
|
635
645
|
/* @__PURE__ */ f(Oe, {
|
|
636
646
|
id: x,
|
|
637
647
|
errorId: C,
|
|
638
|
-
isOpen:
|
|
648
|
+
isOpen: k,
|
|
639
649
|
disabled: _,
|
|
640
650
|
required: g,
|
|
641
651
|
listboxId: S,
|
|
642
|
-
activeIndex:
|
|
643
|
-
ariaLabel: e ? void 0 :
|
|
652
|
+
activeIndex: j,
|
|
653
|
+
ariaLabel: e ? void 0 : N?.label || h,
|
|
644
654
|
error: v,
|
|
645
|
-
displayText:
|
|
646
|
-
isPlaceholder: !
|
|
647
|
-
buttonRef:
|
|
648
|
-
onClick:
|
|
649
|
-
onKeyDown:
|
|
655
|
+
displayText: N?.label ?? h,
|
|
656
|
+
isPlaceholder: !P,
|
|
657
|
+
buttonRef: re,
|
|
658
|
+
onClick: H,
|
|
659
|
+
onKeyDown: ne
|
|
650
660
|
}),
|
|
651
661
|
i && /* @__PURE__ */ f("input", {
|
|
652
662
|
type: "hidden",
|
|
653
663
|
name: i,
|
|
654
|
-
value:
|
|
664
|
+
value: D,
|
|
655
665
|
disabled: _
|
|
656
666
|
}),
|
|
657
667
|
/* @__PURE__ */ f(De, {
|
|
658
|
-
isOpen:
|
|
668
|
+
isOpen: k,
|
|
659
669
|
listboxId: S,
|
|
660
670
|
labelledById: x,
|
|
661
671
|
style: F,
|
|
662
672
|
options: m,
|
|
663
|
-
selectedValue:
|
|
664
|
-
activeIndex:
|
|
665
|
-
setDropdownRef:
|
|
666
|
-
onSelect:
|
|
667
|
-
onMouseEnter:
|
|
673
|
+
selectedValue: D,
|
|
674
|
+
activeIndex: j,
|
|
675
|
+
setDropdownRef: W,
|
|
676
|
+
onSelect: U,
|
|
677
|
+
onMouseEnter: M
|
|
668
678
|
})
|
|
669
679
|
]
|
|
670
680
|
});
|
|
@@ -685,7 +695,7 @@ var Ae = e(null), je = () => {
|
|
|
685
695
|
...n,
|
|
686
696
|
role: "tablist",
|
|
687
697
|
"aria-orientation": r,
|
|
688
|
-
className:
|
|
698
|
+
className: j(Me.list, r === "vertical" && Me.vertical, i === "underline" && Me.underline, i === "pills" && Me.pills, t),
|
|
689
699
|
children: e
|
|
690
700
|
});
|
|
691
701
|
};
|
|
@@ -709,7 +719,7 @@ var Pe = {
|
|
|
709
719
|
"aria-labelledby": `tab-${e}`,
|
|
710
720
|
hidden: !l,
|
|
711
721
|
tabIndex: 0,
|
|
712
|
-
className:
|
|
722
|
+
className: j(Pe.panel, o && Pe.visible, a === "vertical" && Pe.vertical, n),
|
|
713
723
|
children: t
|
|
714
724
|
});
|
|
715
725
|
};
|
|
@@ -740,7 +750,7 @@ var X = {
|
|
|
740
750
|
id: `tab-${e}`,
|
|
741
751
|
disabled: i,
|
|
742
752
|
tabIndex: v ? 0 : -1,
|
|
743
|
-
className:
|
|
753
|
+
className: j(X.tab, X[h], m === "vertical" && X.vertical, y && X.withIcon, b && X.iconOnly, r),
|
|
744
754
|
onClick: (t) => {
|
|
745
755
|
i || (d(e), o?.(t));
|
|
746
756
|
},
|
|
@@ -767,7 +777,7 @@ var Le = {
|
|
|
767
777
|
p || d(e), i?.(e);
|
|
768
778
|
}, [p, i]), g = s([]), _ = n((e, t) => {
|
|
769
779
|
g.current[e] = t;
|
|
770
|
-
}, []), { onKeyDown: v } =
|
|
780
|
+
}, []), { onKeyDown: v } = E({
|
|
771
781
|
activeIndex: m,
|
|
772
782
|
setActiveIndex: h,
|
|
773
783
|
tabRefs: g,
|
|
@@ -783,7 +793,7 @@ var Le = {
|
|
|
783
793
|
return /* @__PURE__ */ f(Ae.Provider, {
|
|
784
794
|
value: y,
|
|
785
795
|
children: /* @__PURE__ */ f("div", {
|
|
786
|
-
className:
|
|
796
|
+
className: j(Le.tabs, a === "vertical" && Le.vertical, l),
|
|
787
797
|
children: e
|
|
788
798
|
})
|
|
789
799
|
});
|
|
@@ -813,7 +823,7 @@ var ze = Object.assign(Re, {
|
|
|
813
823
|
};
|
|
814
824
|
return /* @__PURE__ */ p("div", {
|
|
815
825
|
ref: c,
|
|
816
|
-
className:
|
|
826
|
+
className: j(Be.tooltip, a),
|
|
817
827
|
"data-placement": t,
|
|
818
828
|
"data-state": "open",
|
|
819
829
|
style: o,
|
|
@@ -832,38 +842,38 @@ var He = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
|
|
|
832
842
|
open: 300,
|
|
833
843
|
close: 100
|
|
834
844
|
}, maxWidth: o = 250, className: l, onOpenChange: u }) => {
|
|
835
|
-
let [g, _] = c(!1), v = s(null), y = a(), { context: b, floatingStyles: x, middlewareData: T, setRef:
|
|
845
|
+
let [g, _] = c(!1), v = s(null), y = a(), { context: b, floatingStyles: x, middlewareData: T, setRef: ee, setFloatingRef: E, placement: D } = te({
|
|
836
846
|
open: g,
|
|
837
847
|
onOpenChange: (e) => {
|
|
838
848
|
r || (_(e), u?.(e));
|
|
839
849
|
},
|
|
840
850
|
placement: t,
|
|
841
851
|
middleware: [h({ element: v })]
|
|
842
|
-
}),
|
|
852
|
+
}), O = T.arrow?.x, k = T.arrow?.y, { getReferenceProps: A, getFloatingProps: j } = w([C(b, { delay: {
|
|
843
853
|
open: i.open,
|
|
844
854
|
close: i.close
|
|
845
855
|
} }), S(b)]);
|
|
846
856
|
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
|
|
847
|
-
ref:
|
|
857
|
+
ref: ee,
|
|
848
858
|
style: { display: "inline-flex" },
|
|
849
859
|
"aria-describedby": g ? y : void 0,
|
|
850
|
-
...
|
|
860
|
+
...A(),
|
|
851
861
|
children: e
|
|
852
862
|
}), /* @__PURE__ */ f(m, { children: g && n && /* @__PURE__ */ f(Ve, {
|
|
853
863
|
id: y,
|
|
854
|
-
ref:
|
|
864
|
+
ref: E,
|
|
855
865
|
content: n,
|
|
856
866
|
arrowRef: v,
|
|
857
|
-
arrowX:
|
|
858
|
-
arrowY:
|
|
867
|
+
arrowX: O,
|
|
868
|
+
arrowY: k,
|
|
859
869
|
role: "tooltip",
|
|
860
870
|
style: {
|
|
861
871
|
...x,
|
|
862
872
|
maxWidth: typeof o == "number" ? `${o}px` : o
|
|
863
873
|
},
|
|
864
|
-
placement:
|
|
874
|
+
placement: D,
|
|
865
875
|
className: l,
|
|
866
|
-
...
|
|
876
|
+
...j()
|
|
867
877
|
}) })] });
|
|
868
878
|
};
|
|
869
879
|
He.displayName = "Tooltip";
|
|
@@ -872,24 +882,24 @@ He.displayName = "Tooltip";
|
|
|
872
882
|
var Ue = (e, t) => {
|
|
873
883
|
process.env.NODE_ENV !== "production" && !e && console.warn(t);
|
|
874
884
|
}, Z = {
|
|
875
|
-
button: "
|
|
876
|
-
loading: "
|
|
877
|
-
solid: "
|
|
878
|
-
primary: "
|
|
879
|
-
secondary: "
|
|
880
|
-
danger: "
|
|
881
|
-
close: "
|
|
882
|
-
outline: "
|
|
883
|
-
ghost: "
|
|
884
|
-
sm: "
|
|
885
|
-
md: "
|
|
886
|
-
lg: "
|
|
887
|
-
fullWidth: "
|
|
888
|
-
iconOnly: "
|
|
889
|
-
label: "
|
|
890
|
-
icon: "
|
|
891
|
-
spinner: "
|
|
892
|
-
"button-spin": "_button-
|
|
885
|
+
button: "_button_s76yk_1",
|
|
886
|
+
loading: "_loading_s76yk_21",
|
|
887
|
+
solid: "_solid_s76yk_32",
|
|
888
|
+
primary: "_primary_s76yk_32",
|
|
889
|
+
secondary: "_secondary_s76yk_52",
|
|
890
|
+
danger: "_danger_s76yk_72",
|
|
891
|
+
close: "_close_s76yk_92",
|
|
892
|
+
outline: "_outline_s76yk_112",
|
|
893
|
+
ghost: "_ghost_s76yk_192",
|
|
894
|
+
sm: "_sm_s76yk_281",
|
|
895
|
+
md: "_md_s76yk_287",
|
|
896
|
+
lg: "_lg_s76yk_293",
|
|
897
|
+
fullWidth: "_fullWidth_s76yk_299",
|
|
898
|
+
iconOnly: "_iconOnly_s76yk_303",
|
|
899
|
+
label: "_label_s76yk_307",
|
|
900
|
+
icon: "_icon_s76yk_303",
|
|
901
|
+
spinner: "_spinner_s76yk_329",
|
|
902
|
+
"button-spin": "_button-spin_s76yk_1"
|
|
893
903
|
}, We = t(({ children: e, color: t = "primary", variant: n = "solid", size: r = "md", type: i = "button", disabled: a = !1, loading: o = !1, loadingText: s, leftIcon: c, rightIcon: l, fullWidth: u = !1, iconOnly: d = !1, className: m, onClick: h, "aria-label": g, ..._ }, v) => {
|
|
894
904
|
let y = d || !e && !!(c || l), b = a || o, x = o && s ? s : e;
|
|
895
905
|
return Ue(!y || !!g, "Button: icon-only buttons must provide aria-label."), /* @__PURE__ */ p("button", {
|
|
@@ -900,7 +910,7 @@ var Ue = (e, t) => {
|
|
|
900
910
|
onClick: b ? void 0 : h,
|
|
901
911
|
"aria-label": g || void 0,
|
|
902
912
|
"aria-busy": o || void 0,
|
|
903
|
-
className:
|
|
913
|
+
className: j(Z.button, Z[t], Z[n], Z[r], m, {
|
|
904
914
|
[Z.disabled]: b,
|
|
905
915
|
[Z.loading]: o,
|
|
906
916
|
[Z.fullWidth]: u,
|
|
@@ -915,7 +925,7 @@ var Ue = (e, t) => {
|
|
|
915
925
|
className: Z.icon,
|
|
916
926
|
children: c
|
|
917
927
|
}),
|
|
918
|
-
x && /* @__PURE__ */ f("span", {
|
|
928
|
+
x && !y && /* @__PURE__ */ f("span", {
|
|
919
929
|
className: Z.label,
|
|
920
930
|
children: x
|
|
921
931
|
}),
|
|
@@ -947,7 +957,7 @@ var Q = {
|
|
|
947
957
|
className: Q.container,
|
|
948
958
|
children: [/* @__PURE__ */ p("label", {
|
|
949
959
|
htmlFor: l,
|
|
950
|
-
className:
|
|
960
|
+
className: j(Q.wrapper, r && Q.disabled, i),
|
|
951
961
|
children: [
|
|
952
962
|
/* @__PURE__ */ f("input", {
|
|
953
963
|
ref: c,
|
|
@@ -964,11 +974,11 @@ var Q = {
|
|
|
964
974
|
"aria-label": e ? void 0 : "Checkbox"
|
|
965
975
|
}),
|
|
966
976
|
/* @__PURE__ */ f("span", {
|
|
967
|
-
className:
|
|
977
|
+
className: j(Q.customCheckbox, u && Q.error),
|
|
968
978
|
"aria-hidden": "true",
|
|
969
979
|
children: d && /* @__PURE__ */ f("span", {
|
|
970
980
|
className: Q.checkmark,
|
|
971
|
-
children: /* @__PURE__ */ f(
|
|
981
|
+
children: /* @__PURE__ */ f(D, {})
|
|
972
982
|
})
|
|
973
983
|
}),
|
|
974
984
|
e && /* @__PURE__ */ f("span", {
|
|
@@ -1021,70 +1031,71 @@ var $ = {
|
|
|
1021
1031
|
case "search": return "off";
|
|
1022
1032
|
default: return;
|
|
1023
1033
|
}
|
|
1024
|
-
}, Je = t(({ id: e, label: t, name: r, description: i, placeholder: o, value: l, defaultValue: u, onChange: d, type: m = "text", size: h = "md", error: g, disabled: _ = !1, required: v = !1, className: y, autoComplete: b, readOnly: x = !1, clearable: S = !1, onClear: C, leftAdornment: w, rightAdornment: T, clearIcon:
|
|
1025
|
-
let
|
|
1026
|
-
|
|
1027
|
-
i ? `${
|
|
1028
|
-
g ? `${
|
|
1029
|
-
].filter(Boolean).join(" "),
|
|
1030
|
-
if (
|
|
1031
|
-
|
|
1034
|
+
}, Je = t(({ id: e, label: t, name: r, description: i, placeholder: o, value: l, defaultValue: u, onChange: d, type: m = "text", size: h = "md", error: g, disabled: _ = !1, required: v = !1, className: y, autoComplete: b, readOnly: x = !1, clearable: S = !1, onClear: C, leftAdornment: w, rightAdornment: T, clearIcon: ee, leftAdornmentTone: E = "default", rightAdornmentTone: D = "default", clearIconTone: O = "danger", autoFocus: k, maxLength: A, onMouseEnter: M, onMouseLeave: N, "aria-describedby": P, "aria-invalid": F, ...te }, I) => {
|
|
1035
|
+
let L = a(), R = e ?? L, z = s(null), [B, V] = c(u ?? ""), H = l !== void 0, U = H ? l : B, ne = U !== "", re = qe(m, b), W = S && ne && !_ && !x, ie = [
|
|
1036
|
+
P,
|
|
1037
|
+
i ? `${R}-description` : void 0,
|
|
1038
|
+
g ? `${R}-error` : void 0
|
|
1039
|
+
].filter(Boolean).join(" "), ae = ee ?? "×", oe = n((e) => {
|
|
1040
|
+
if (z.current = e, typeof I == "function") {
|
|
1041
|
+
I(e);
|
|
1032
1042
|
return;
|
|
1033
1043
|
}
|
|
1034
|
-
|
|
1035
|
-
}, [
|
|
1044
|
+
I && (I.current = e);
|
|
1045
|
+
}, [I]), se = n((e) => {
|
|
1036
1046
|
let t = e.target.value;
|
|
1037
|
-
|
|
1038
|
-
}, [
|
|
1039
|
-
|
|
1040
|
-
}, [
|
|
1047
|
+
H || V(t), d?.(e);
|
|
1048
|
+
}, [H, d]), G = n(() => {
|
|
1049
|
+
H || V(""), C?.(), z.current?.focus();
|
|
1050
|
+
}, [H, C]), ce = !W && !!T;
|
|
1041
1051
|
return /* @__PURE__ */ f(Se, {
|
|
1042
|
-
id:
|
|
1052
|
+
id: R,
|
|
1043
1053
|
label: t,
|
|
1044
1054
|
description: i,
|
|
1045
1055
|
error: g,
|
|
1046
1056
|
required: v,
|
|
1047
1057
|
disabled: _,
|
|
1048
1058
|
children: /* @__PURE__ */ p("div", {
|
|
1049
|
-
className:
|
|
1059
|
+
className: j($.inputWrapper, {
|
|
1050
1060
|
[$.hasLeftAdornment]: !!w,
|
|
1051
|
-
[$.hasRightAdornment]: !!T ||
|
|
1061
|
+
[$.hasRightAdornment]: !!T || W
|
|
1052
1062
|
}),
|
|
1053
1063
|
children: [
|
|
1054
1064
|
w && /* @__PURE__ */ f("span", {
|
|
1055
|
-
|
|
1065
|
+
"aria-hidden": "true",
|
|
1066
|
+
className: j($.leftAdornment, Ke[E]),
|
|
1056
1067
|
children: w
|
|
1057
1068
|
}),
|
|
1058
1069
|
/* @__PURE__ */ f("input", {
|
|
1059
|
-
...
|
|
1060
|
-
ref:
|
|
1061
|
-
id:
|
|
1070
|
+
...te,
|
|
1071
|
+
ref: oe,
|
|
1072
|
+
id: R,
|
|
1062
1073
|
name: r,
|
|
1063
1074
|
type: m,
|
|
1064
|
-
autoComplete:
|
|
1065
|
-
className:
|
|
1066
|
-
value:
|
|
1067
|
-
onChange:
|
|
1075
|
+
autoComplete: re,
|
|
1076
|
+
className: j($.input, $[h], { [$.error]: !!g }, y),
|
|
1077
|
+
value: U,
|
|
1078
|
+
onChange: se,
|
|
1068
1079
|
placeholder: o,
|
|
1069
1080
|
disabled: _,
|
|
1070
1081
|
readOnly: x,
|
|
1071
1082
|
required: v,
|
|
1072
|
-
autoFocus:
|
|
1073
|
-
maxLength:
|
|
1083
|
+
autoFocus: k,
|
|
1084
|
+
maxLength: A,
|
|
1074
1085
|
"aria-invalid": g ? !0 : F,
|
|
1075
|
-
"aria-describedby":
|
|
1076
|
-
onMouseEnter:
|
|
1077
|
-
onMouseLeave:
|
|
1086
|
+
"aria-describedby": ie || void 0,
|
|
1087
|
+
onMouseEnter: M,
|
|
1088
|
+
onMouseLeave: N
|
|
1078
1089
|
}),
|
|
1079
|
-
|
|
1090
|
+
W && /* @__PURE__ */ f("button", {
|
|
1080
1091
|
type: "button",
|
|
1081
|
-
className:
|
|
1082
|
-
onClick:
|
|
1092
|
+
className: j($.clearButton, Ke[O]),
|
|
1093
|
+
onClick: G,
|
|
1083
1094
|
"aria-label": "Clear input",
|
|
1084
|
-
children:
|
|
1095
|
+
children: ae
|
|
1085
1096
|
}),
|
|
1086
1097
|
ce && /* @__PURE__ */ f("div", {
|
|
1087
|
-
className:
|
|
1098
|
+
className: j($.rightAdornment, Ke[D]),
|
|
1088
1099
|
children: T
|
|
1089
1100
|
})
|
|
1090
1101
|
]
|
|
@@ -1132,4 +1143,4 @@ function Qe() {
|
|
|
1132
1143
|
return e;
|
|
1133
1144
|
}
|
|
1134
1145
|
//#endregion
|
|
1135
|
-
export { We as Button, Ge as Checkbox,
|
|
1146
|
+
export { We as Button, Ge as Checkbox, oe as Dropdown, Se as FormField, Je as Input, xe as Modal, Ce as RadioGroup, ke as Select, ze as Tabs, Ze as ThemeProvider, He as Tooltip, Qe as useTheme };
|