@suribef/suri-ui 0.1.0

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.
@@ -0,0 +1,612 @@
1
+ import { forwardRef as e, useCallback as t, useEffect as n, useId as r, useRef as i } from "react";
2
+ //#region \0rolldown/runtime.js
3
+ var a = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), o = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
4
+ if (typeof require < "u") return require.apply(this, arguments);
5
+ throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
6
+ });
7
+ //#endregion
8
+ //#region src/utils/cn.ts
9
+ function s(...e) {
10
+ return e.filter(Boolean).join(" ");
11
+ }
12
+ var c = {
13
+ button: "_button_1cyfq_1",
14
+ primary: "_primary_1cyfq_27",
15
+ secondary: "_secondary_1cyfq_28",
16
+ ghost: "_ghost_1cyfq_29",
17
+ danger: "_danger_1cyfq_30",
18
+ sm: "_sm_1cyfq_37",
19
+ md: "_md_1cyfq_38",
20
+ lg: "_lg_1cyfq_39",
21
+ fullWidth: "_fullWidth_1cyfq_41",
22
+ loading: "_loading_1cyfq_42",
23
+ spinner: "_spinner_1cyfq_44",
24
+ spin: "_spin_1cyfq_44",
25
+ icon: "_icon_1cyfq_56"
26
+ }, l = /* @__PURE__ */ a(((e) => {
27
+ var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
28
+ function r(e, n, r) {
29
+ var i = null;
30
+ if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
31
+ else r = n;
32
+ return n = r.ref, {
33
+ $$typeof: t,
34
+ type: e,
35
+ key: i,
36
+ ref: n === void 0 ? null : n,
37
+ props: r
38
+ };
39
+ }
40
+ e.Fragment = n, e.jsx = r, e.jsxs = r;
41
+ })), u = /* @__PURE__ */ a(((e) => {
42
+ process.env.NODE_ENV !== "production" && (function() {
43
+ function t(e) {
44
+ if (e == null) return null;
45
+ if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
46
+ if (typeof e == "string") return e;
47
+ switch (e) {
48
+ case v: return "Fragment";
49
+ case b: return "Profiler";
50
+ case y: return "StrictMode";
51
+ case w: return "Suspense";
52
+ case T: return "SuspenseList";
53
+ case O: return "Activity";
54
+ }
55
+ if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
56
+ case _: return "Portal";
57
+ case S: return e.displayName || "Context";
58
+ case x: return (e._context.displayName || "Context") + ".Consumer";
59
+ case C:
60
+ var n = e.render;
61
+ return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
62
+ case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
63
+ case D:
64
+ n = e._payload, e = e._init;
65
+ try {
66
+ return t(e(n));
67
+ } catch {}
68
+ }
69
+ return null;
70
+ }
71
+ function n(e) {
72
+ return "" + e;
73
+ }
74
+ function r(e) {
75
+ try {
76
+ n(e);
77
+ var t = !1;
78
+ } catch {
79
+ t = !0;
80
+ }
81
+ if (t) {
82
+ t = console;
83
+ var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
84
+ return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
85
+ }
86
+ }
87
+ function i(e) {
88
+ if (e === v) return "<>";
89
+ if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
90
+ try {
91
+ var n = t(e);
92
+ return n ? "<" + n + ">" : "<...>";
93
+ } catch {
94
+ return "<...>";
95
+ }
96
+ }
97
+ function a() {
98
+ var e = A.A;
99
+ return e === null ? null : e.getOwner();
100
+ }
101
+ function s() {
102
+ return Error("react-stack-top-frame");
103
+ }
104
+ function c(e) {
105
+ if (j.call(e, "key")) {
106
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
107
+ if (t && t.isReactWarning) return !1;
108
+ }
109
+ return e.key !== void 0;
110
+ }
111
+ function l(e, t) {
112
+ function n() {
113
+ P || (P = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
114
+ }
115
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
116
+ get: n,
117
+ configurable: !0
118
+ });
119
+ }
120
+ function u() {
121
+ var e = t(this.type);
122
+ return F[e] || (F[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
123
+ }
124
+ function d(e, t, n, r, i, a) {
125
+ var o = n.ref;
126
+ return e = {
127
+ $$typeof: g,
128
+ type: e,
129
+ key: t,
130
+ props: n,
131
+ _owner: r
132
+ }, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
133
+ enumerable: !1,
134
+ value: null
135
+ }) : Object.defineProperty(e, "ref", {
136
+ enumerable: !1,
137
+ get: u
138
+ }), e._store = {}, Object.defineProperty(e._store, "validated", {
139
+ configurable: !1,
140
+ enumerable: !1,
141
+ writable: !0,
142
+ value: 0
143
+ }), Object.defineProperty(e, "_debugInfo", {
144
+ configurable: !1,
145
+ enumerable: !1,
146
+ writable: !0,
147
+ value: null
148
+ }), Object.defineProperty(e, "_debugStack", {
149
+ configurable: !1,
150
+ enumerable: !1,
151
+ writable: !0,
152
+ value: i
153
+ }), Object.defineProperty(e, "_debugTask", {
154
+ configurable: !1,
155
+ enumerable: !1,
156
+ writable: !0,
157
+ value: a
158
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
159
+ }
160
+ function f(e, n, i, o, s, u) {
161
+ var f = n.children;
162
+ if (f !== void 0) if (o) if (M(f)) {
163
+ for (o = 0; o < f.length; o++) p(f[o]);
164
+ Object.freeze && Object.freeze(f);
165
+ } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
166
+ else p(f);
167
+ if (j.call(n, "key")) {
168
+ f = t(e);
169
+ var m = Object.keys(n).filter(function(e) {
170
+ return e !== "key";
171
+ });
172
+ o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[f + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, f, m, f), R[f + o] = !0);
173
+ }
174
+ if (f = null, i !== void 0 && (r(i), f = "" + i), c(n) && (r(n.key), f = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
175
+ else i = n;
176
+ return f && l(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, i, a(), s, u);
177
+ }
178
+ function p(e) {
179
+ m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
180
+ }
181
+ function m(e) {
182
+ return typeof e == "object" && !!e && e.$$typeof === g;
183
+ }
184
+ var h = o("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), A = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
185
+ return null;
186
+ };
187
+ h = { react_stack_bottom_frame: function(e) {
188
+ return e();
189
+ } };
190
+ var P, F = {}, I = h.react_stack_bottom_frame.bind(h, s)(), L = N(i(s)), R = {};
191
+ e.Fragment = v, e.jsx = function(e, t, n) {
192
+ var r = 1e4 > A.recentlyCreatedOwnerStacks++;
193
+ return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
194
+ }, e.jsxs = function(e, t, n) {
195
+ var r = 1e4 > A.recentlyCreatedOwnerStacks++;
196
+ return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
197
+ };
198
+ })();
199
+ })), d = (/* @__PURE__ */ a(((e, t) => {
200
+ process.env.NODE_ENV === "production" ? t.exports = l() : t.exports = u();
201
+ })))(), f = e(({ variant: e = "primary", size: t = "md", loading: n = !1, leftIcon: r, rightIcon: i, fullWidth: a = !1, disabled: o, children: l, className: u, onClick: f, tabIndex: p, ...m }, h) => /* @__PURE__ */ (0, d.jsxs)("button", {
202
+ ref: h,
203
+ className: s(c.button, c[e], c[t], a && c.fullWidth, n && c.loading, u),
204
+ disabled: o,
205
+ "aria-disabled": n || void 0,
206
+ "aria-busy": n || void 0,
207
+ tabIndex: n ? -1 : p,
208
+ "data-fullwidth": a || void 0,
209
+ "data-loading": n || void 0,
210
+ onClick: (e) => {
211
+ if (n) {
212
+ e.preventDefault();
213
+ return;
214
+ }
215
+ f?.(e);
216
+ },
217
+ ...m,
218
+ children: [
219
+ n && /* @__PURE__ */ (0, d.jsx)("span", {
220
+ className: c.spinner,
221
+ "aria-hidden": "true"
222
+ }),
223
+ !n && r && /* @__PURE__ */ (0, d.jsx)("span", {
224
+ className: c.icon,
225
+ children: r
226
+ }),
227
+ /* @__PURE__ */ (0, d.jsx)("span", { children: l }),
228
+ !n && i && /* @__PURE__ */ (0, d.jsx)("span", {
229
+ className: c.icon,
230
+ children: i
231
+ })
232
+ ]
233
+ }));
234
+ f.displayName = "Button";
235
+ var p = {
236
+ badge: "_badge_1di7z_1",
237
+ sm: "_sm_1di7z_13",
238
+ md: "_md_1di7z_14",
239
+ dot: "_dot_1di7z_17",
240
+ default: "_default_1di7z_26",
241
+ success: "_success_1di7z_27",
242
+ warning: "_warning_1di7z_28",
243
+ danger: "_danger_1di7z_29",
244
+ info: "_info_1di7z_30"
245
+ };
246
+ //#endregion
247
+ //#region src/components/Badge/Badge.tsx
248
+ function m({ variant: e = "default", size: t = "md", dot: n = !1, children: r, className: i, ...a }) {
249
+ return process.env.NODE_ENV !== "production" && n && !a["aria-label"] && console.warn("[SuriUI Badge] El modo dot requiere aria-label para accesibilidad. Ejemplo: <Badge dot aria-label=\"3 notificaciones\" />"), /* @__PURE__ */ (0, d.jsx)("span", {
250
+ className: s(p.badge, p[e], p[t], n && p.dot, i),
251
+ "data-dot": n || void 0,
252
+ ...a,
253
+ children: !n && r
254
+ });
255
+ }
256
+ m.displayName = "Badge";
257
+ var h = {
258
+ spinner: "_spinner_b9met_1",
259
+ sm: "_sm_b9met_10",
260
+ md: "_md_b9met_11",
261
+ lg: "_lg_b9met_12",
262
+ svg: "_svg_b9met_15",
263
+ spin: "_spin_b9met_1",
264
+ track: "_track_b9met_22",
265
+ head: "_head_b9met_28"
266
+ };
267
+ //#endregion
268
+ //#region src/components/Spinner/Spinner.tsx
269
+ function g({ size: e = "md", label: t = "Cargando...", "aria-live": n = "polite", className: r, ...i }) {
270
+ return /* @__PURE__ */ (0, d.jsxs)("span", {
271
+ role: "status",
272
+ "aria-live": n,
273
+ className: s(h.spinner, h[e], r),
274
+ ...i,
275
+ children: [/* @__PURE__ */ (0, d.jsxs)("svg", {
276
+ className: h.svg,
277
+ viewBox: "0 0 24 24",
278
+ fill: "none",
279
+ xmlns: "http://www.w3.org/2000/svg",
280
+ "aria-hidden": "true",
281
+ focusable: "false",
282
+ children: [/* @__PURE__ */ (0, d.jsx)("circle", {
283
+ className: h.track,
284
+ cx: "12",
285
+ cy: "12",
286
+ r: "10",
287
+ strokeWidth: "3"
288
+ }), /* @__PURE__ */ (0, d.jsx)("path", {
289
+ className: h.head,
290
+ d: "M12 2a10 10 0 0 1 10 10",
291
+ strokeWidth: "3",
292
+ strokeLinecap: "round"
293
+ })]
294
+ }), /* @__PURE__ */ (0, d.jsx)("span", {
295
+ className: "sui-sr-only",
296
+ children: t
297
+ })]
298
+ });
299
+ }
300
+ g.displayName = "Spinner";
301
+ var _ = {
302
+ wrapper: "_wrapper_1cd3d_1",
303
+ fullWidth: "_fullWidth_1cd3d_7",
304
+ label: "_label_1cd3d_12",
305
+ required: "_required_1cd3d_20",
306
+ input: "_input_1cd3d_25",
307
+ inputError: "_inputError_1cd3d_51",
308
+ disabled: "_disabled_1cd3d_68",
309
+ description: "_description_1cd3d_74",
310
+ descriptionHelper: "_descriptionHelper_1cd3d_80",
311
+ descriptionError: "_descriptionError_1cd3d_84"
312
+ }, v = e(({ label: e, helperText: t, error: n, fullWidth: i = !1, disabled: a, required: o, id: c, className: l, ...u }, f) => {
313
+ let p = r(), m = c ?? p, h = `${m}-description`, g = n || t || void 0;
314
+ return /* @__PURE__ */ (0, d.jsxs)("div", {
315
+ className: s(_.wrapper, i && _.fullWidth, a && _.disabled),
316
+ "data-fullwidth": i || void 0,
317
+ "data-error": !!n || void 0,
318
+ "data-disabled": a || void 0,
319
+ children: [
320
+ e && /* @__PURE__ */ (0, d.jsxs)("label", {
321
+ htmlFor: m,
322
+ className: _.label,
323
+ children: [e, o && /* @__PURE__ */ (0, d.jsxs)("span", {
324
+ "aria-hidden": "true",
325
+ className: _.required,
326
+ children: [" ", "*"]
327
+ })]
328
+ }),
329
+ /* @__PURE__ */ (0, d.jsx)("input", {
330
+ ref: f,
331
+ id: m,
332
+ className: s(_.input, n && _.inputError, l),
333
+ disabled: a,
334
+ required: o,
335
+ "aria-required": o || void 0,
336
+ "aria-invalid": !!n || void 0,
337
+ "aria-describedby": h,
338
+ ...u
339
+ }),
340
+ /* @__PURE__ */ (0, d.jsx)("span", {
341
+ id: h,
342
+ className: s(_.description, n ? _.descriptionError : _.descriptionHelper),
343
+ "aria-live": "polite",
344
+ "aria-atomic": "true",
345
+ children: g
346
+ })
347
+ ]
348
+ });
349
+ });
350
+ v.displayName = "Input";
351
+ var y = {
352
+ card: "_card_l6w6d_4",
353
+ bordered: "_bordered_l6w6d_15",
354
+ fullWidth: "_fullWidth_l6w6d_19",
355
+ "shadow-sm": "_shadow-sm_l6w6d_24",
356
+ "shadow-md": "_shadow-md_l6w6d_25",
357
+ "shadow-lg": "_shadow-lg_l6w6d_26",
358
+ header: "_header_l6w6d_29",
359
+ headerDivided: "_headerDivided_l6w6d_33",
360
+ body: "_body_l6w6d_37",
361
+ footer: "_footer_l6w6d_41",
362
+ footerDivided: "_footerDivided_l6w6d_45"
363
+ }, b = e(({ as: e = "div", shadow: t = "sm", bordered: n = !0, fullWidth: r = !1, className: i, children: a, ...o }, c) => /* @__PURE__ */ (0, d.jsx)(e, {
364
+ ref: c,
365
+ className: s(y.card, t !== "none" && y[`shadow-${t}`], n && y.bordered, r && y.fullWidth, i),
366
+ "data-shadow": t,
367
+ "data-bordered": n || void 0,
368
+ "data-fullwidth": r || void 0,
369
+ ...o,
370
+ children: a
371
+ }));
372
+ b.displayName = "Card";
373
+ function x({ divided: e = !1, className: t, children: n, ...r }) {
374
+ return /* @__PURE__ */ (0, d.jsx)("div", {
375
+ className: s(y.header, e && y.headerDivided, t),
376
+ "data-divided": e || void 0,
377
+ ...r,
378
+ children: n
379
+ });
380
+ }
381
+ x.displayName = "Card.Header";
382
+ function S({ className: e, children: t, ...n }) {
383
+ return /* @__PURE__ */ (0, d.jsx)("div", {
384
+ className: s(y.body, e),
385
+ ...n,
386
+ children: t
387
+ });
388
+ }
389
+ S.displayName = "Card.Body";
390
+ function C({ divided: e = !1, className: t, children: n, ...r }) {
391
+ return /* @__PURE__ */ (0, d.jsx)("div", {
392
+ className: s(y.footer, e && y.footerDivided, t),
393
+ "data-divided": e || void 0,
394
+ ...r,
395
+ children: n
396
+ });
397
+ }
398
+ C.displayName = "Card.Footer";
399
+ var w = b;
400
+ w.Header = x, w.Body = S, w.Footer = C;
401
+ var T = {
402
+ stack: "_stack_2ervp_1",
403
+ "direction-column": "_direction-column_2ervp_8",
404
+ "direction-row": "_direction-row_2ervp_9",
405
+ "direction-row-reverse": "_direction-row-reverse_2ervp_10",
406
+ "direction-column-reverse": "_direction-column-reverse_2ervp_11",
407
+ "align-start": "_align-start_2ervp_14",
408
+ "align-center": "_align-center_2ervp_15",
409
+ "align-end": "_align-end_2ervp_16",
410
+ "align-stretch": "_align-stretch_2ervp_17",
411
+ "align-baseline": "_align-baseline_2ervp_18",
412
+ "justify-start": "_justify-start_2ervp_21",
413
+ "justify-center": "_justify-center_2ervp_22",
414
+ "justify-end": "_justify-end_2ervp_23",
415
+ "justify-between": "_justify-between_2ervp_24",
416
+ "justify-around": "_justify-around_2ervp_25",
417
+ "justify-evenly": "_justify-evenly_2ervp_26",
418
+ wrap: "_wrap_2ervp_29",
419
+ fullWidth: "_fullWidth_2ervp_30",
420
+ fullHeight: "_fullHeight_2ervp_31"
421
+ }, E = e(({ as: e = "div", direction: t = "column", gap: n = 4, align: r, justify: i, wrap: a = !1, fullWidth: o = !1, fullHeight: c = !1, className: l, style: u, children: f, ...p }, m) => {
422
+ let h = e, g = `var(--sui-space-${n})`;
423
+ return /* @__PURE__ */ (0, d.jsx)(h, {
424
+ ref: m,
425
+ className: s(T.stack, T[`direction-${t}`], r && T[`align-${r}`], i && T[`justify-${i}`], a && T.wrap, o && T.fullWidth, c && T.fullHeight, l),
426
+ style: {
427
+ "--sui-stack-gap": g,
428
+ ...u
429
+ },
430
+ "data-direction": t,
431
+ "data-fullwidth": o || void 0,
432
+ "data-fullheight": c || void 0,
433
+ ...p,
434
+ children: f
435
+ });
436
+ });
437
+ E.displayName = "Stack";
438
+ var D = {
439
+ divider: "_divider_a98c6_1",
440
+ horizontal: "_horizontal_a98c6_7",
441
+ vertical: "_vertical_a98c6_13"
442
+ };
443
+ //#endregion
444
+ //#region src/components/Divider/Divider.tsx
445
+ function O({ decorative: e = !1, orientation: t = "horizontal", label: n, className: r, ...i }) {
446
+ let a = t === "vertical";
447
+ return e ? /* @__PURE__ */ (0, d.jsx)("div", {
448
+ "aria-hidden": "true",
449
+ className: s(D.divider, a ? D.vertical : D.horizontal, r),
450
+ "data-orientation": t,
451
+ "data-decorative": "true",
452
+ ...i
453
+ }) : /* @__PURE__ */ (0, d.jsx)("hr", {
454
+ role: a ? "separator" : void 0,
455
+ "aria-orientation": a ? "vertical" : void 0,
456
+ "aria-label": n,
457
+ className: s(D.divider, a ? D.vertical : D.horizontal, r),
458
+ "data-orientation": t,
459
+ ...i
460
+ });
461
+ }
462
+ O.displayName = "Divider";
463
+ //#endregion
464
+ //#region src/utils/useCombinedRef.ts
465
+ function k(...e) {
466
+ return t((t) => {
467
+ e.forEach((e) => {
468
+ e && (typeof e == "function" ? e(t) : e.current = t);
469
+ });
470
+ }, e);
471
+ }
472
+ var A = {
473
+ wrapper: "_wrapper_48l1v_1",
474
+ fullWidth: "_fullWidth_48l1v_7",
475
+ label: "_label_48l1v_10",
476
+ required: "_required_48l1v_18",
477
+ textarea: "_textarea_48l1v_21",
478
+ "resize-none": "_resize-none_48l1v_47",
479
+ "resize-vertical": "_resize-vertical_48l1v_48",
480
+ "resize-horizontal": "_resize-horizontal_48l1v_49",
481
+ "resize-both": "_resize-both_48l1v_50",
482
+ autoResize: "_autoResize_48l1v_54",
483
+ textareaError: "_textareaError_48l1v_60",
484
+ disabled: "_disabled_48l1v_77",
485
+ description: "_description_48l1v_83",
486
+ descriptionHelper: "_descriptionHelper_48l1v_91",
487
+ descriptionError: "_descriptionError_48l1v_92"
488
+ }, j = e(({ label: e, helperText: t, error: a, fullWidth: o = !1, resize: c = "vertical", autoResize: l = !1, disabled: u, required: f, id: p, rows: m = 3, value: h, className: g, onChange: _, ...v }, y) => {
489
+ let b = r(), x = p ?? b, S = `${x}-description`, C = a || t || void 0, w = i(null), T = k(w, y);
490
+ return n(() => {
491
+ if (!l || !w.current) return;
492
+ let e = w.current;
493
+ e.style.height = "auto", e.style.height = `${e.scrollHeight}px`;
494
+ }, [l, h]), /* @__PURE__ */ (0, d.jsxs)("div", {
495
+ className: s(A.wrapper, o && A.fullWidth, u && A.disabled),
496
+ "data-fullwidth": o || void 0,
497
+ "data-error": !!a || void 0,
498
+ "data-disabled": u || void 0,
499
+ children: [
500
+ e && /* @__PURE__ */ (0, d.jsxs)("label", {
501
+ htmlFor: x,
502
+ className: A.label,
503
+ children: [e, f && /* @__PURE__ */ (0, d.jsxs)("span", {
504
+ "aria-hidden": "true",
505
+ className: A.required,
506
+ children: [" ", "*"]
507
+ })]
508
+ }),
509
+ /* @__PURE__ */ (0, d.jsx)("textarea", {
510
+ ref: T,
511
+ id: x,
512
+ rows: m,
513
+ value: h,
514
+ className: s(A.textarea, A[`resize-${c}`], l && A.autoResize, a && A.textareaError, g),
515
+ disabled: u,
516
+ required: f,
517
+ "aria-required": f || void 0,
518
+ "aria-invalid": !!a || void 0,
519
+ "aria-describedby": S,
520
+ onChange: _,
521
+ ...v
522
+ }),
523
+ /* @__PURE__ */ (0, d.jsx)("span", {
524
+ id: S,
525
+ className: s(A.description, a ? A.descriptionError : A.descriptionHelper),
526
+ "aria-live": "polite",
527
+ "aria-atomic": "true",
528
+ children: C
529
+ })
530
+ ]
531
+ });
532
+ });
533
+ j.displayName = "Textarea";
534
+ var M = {
535
+ wrapper: "_wrapper_1ny9q_1",
536
+ fullWidth: "_fullWidth_1ny9q_7",
537
+ label: "_label_1ny9q_10",
538
+ required: "_required_1ny9q_18",
539
+ selectWrapper: "_selectWrapper_1ny9q_21",
540
+ select: "_select_1ny9q_21",
541
+ selectError: "_selectError_1ny9q_57",
542
+ disabled: "_disabled_1ny9q_74",
543
+ description: "_description_1ny9q_80",
544
+ descriptionHelper: "_descriptionHelper_1ny9q_88",
545
+ descriptionError: "_descriptionError_1ny9q_89"
546
+ };
547
+ //#endregion
548
+ //#region src/components/Select/Select.tsx
549
+ function N(e) {
550
+ return "group" in e;
551
+ }
552
+ var P = e(({ options: e, label: t, placeholder: n, helperText: i, error: a, fullWidth: o = !1, disabled: c, required: l, id: u, className: f, ...p }, m) => {
553
+ let h = r(), g = u ?? h, _ = `${g}-description`, v = a || i || void 0;
554
+ return /* @__PURE__ */ (0, d.jsxs)("div", {
555
+ className: s(M.wrapper, o && M.fullWidth, c && M.disabled),
556
+ "data-fullwidth": o || void 0,
557
+ "data-error": !!a || void 0,
558
+ "data-disabled": c || void 0,
559
+ children: [
560
+ t && /* @__PURE__ */ (0, d.jsxs)("label", {
561
+ htmlFor: g,
562
+ className: M.label,
563
+ children: [t, l && /* @__PURE__ */ (0, d.jsxs)("span", {
564
+ "aria-hidden": "true",
565
+ className: M.required,
566
+ children: [" ", "*"]
567
+ })]
568
+ }),
569
+ /* @__PURE__ */ (0, d.jsx)("div", {
570
+ className: M.selectWrapper,
571
+ children: /* @__PURE__ */ (0, d.jsxs)("select", {
572
+ ref: m,
573
+ id: g,
574
+ className: s(M.select, a && M.selectError, f),
575
+ disabled: c,
576
+ required: l,
577
+ "aria-required": l || void 0,
578
+ "aria-invalid": !!a || void 0,
579
+ "aria-describedby": _,
580
+ ...p,
581
+ children: [n && /* @__PURE__ */ (0, d.jsx)("option", {
582
+ value: "",
583
+ disabled: !0,
584
+ hidden: !0,
585
+ children: n
586
+ }), e.map((e) => N(e) ? /* @__PURE__ */ (0, d.jsx)("optgroup", {
587
+ label: e.group,
588
+ children: e.options.map((e) => /* @__PURE__ */ (0, d.jsx)("option", {
589
+ value: e.value,
590
+ disabled: e.disabled,
591
+ children: e.label
592
+ }, e.value))
593
+ }, e.group) : /* @__PURE__ */ (0, d.jsx)("option", {
594
+ value: e.value,
595
+ disabled: e.disabled,
596
+ children: e.label
597
+ }, e.value))]
598
+ })
599
+ }),
600
+ /* @__PURE__ */ (0, d.jsx)("span", {
601
+ id: _,
602
+ className: s(M.description, a ? M.descriptionError : M.descriptionHelper),
603
+ "aria-live": "polite",
604
+ "aria-atomic": "true",
605
+ children: v
606
+ })
607
+ ]
608
+ });
609
+ });
610
+ P.displayName = "Select";
611
+ //#endregion
612
+ export { m as Badge, f as Button, w as Card, S as CardBody, C as CardFooter, x as CardHeader, O as Divider, v as Input, P as Select, g as Spinner, E as Stack, j as Textarea, k as useCombinedRef };
@@ -0,0 +1 @@
1
+ export declare function cn(...classes: (string | undefined | false | null)[]): string;
@@ -0,0 +1,2 @@
1
+ import { Ref, RefCallback } from 'react';
2
+ export declare function useCombinedRef<T>(...refs: (Ref<T> | null | undefined)[]): RefCallback<T>;