@kpv2004/quark-ui 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/components/Alert/Alert.d.ts +8 -0
  2. package/dist/components/Alert/Alert.d.ts.map +1 -0
  3. package/dist/components/Alert/index.d.ts +3 -0
  4. package/dist/components/Alert/index.d.ts.map +1 -0
  5. package/dist/components/Avatar/Avatar.d.ts +11 -0
  6. package/dist/components/Avatar/Avatar.d.ts.map +1 -0
  7. package/dist/components/Avatar/index.d.ts +3 -0
  8. package/dist/components/Avatar/index.d.ts.map +1 -0
  9. package/dist/components/Badge/Badge.d.ts +13 -0
  10. package/dist/components/Badge/Badge.d.ts.map +1 -0
  11. package/dist/components/Badge/index.d.ts +3 -0
  12. package/dist/components/Badge/index.d.ts.map +1 -0
  13. package/dist/components/Button/Button.d.ts +17 -0
  14. package/dist/components/Button/Button.d.ts.map +1 -0
  15. package/dist/components/Button/index.d.ts +3 -0
  16. package/dist/components/Button/index.d.ts.map +1 -0
  17. package/dist/components/Card/Card.d.ts +11 -0
  18. package/dist/components/Card/Card.d.ts.map +1 -0
  19. package/dist/components/Card/index.d.ts +3 -0
  20. package/dist/components/Card/index.d.ts.map +1 -0
  21. package/dist/components/Input/Input.d.ts +19 -0
  22. package/dist/components/Input/Input.d.ts.map +1 -0
  23. package/dist/components/Input/index.d.ts +3 -0
  24. package/dist/components/Input/index.d.ts.map +1 -0
  25. package/dist/components/Spinner/Spinner.d.ts +7 -0
  26. package/dist/components/Spinner/Spinner.d.ts.map +1 -0
  27. package/dist/components/Spinner/index.d.ts +3 -0
  28. package/dist/components/Spinner/index.d.ts.map +1 -0
  29. package/dist/components/Toggle/Toggle.d.ts +17 -0
  30. package/dist/components/Toggle/Toggle.d.ts.map +1 -0
  31. package/dist/components/Toggle/index.d.ts +3 -0
  32. package/dist/components/Toggle/index.d.ts.map +1 -0
  33. package/dist/index.cjs +6 -1
  34. package/dist/index.css +2 -1
  35. package/dist/index.d.ts +17 -98
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +841 -1
  38. package/package.json +2 -2
  39. package/dist/index.d.cts +0 -98
package/dist/index.js CHANGED
@@ -1 +1,841 @@
1
- import{forwardRef as V}from"react";var s={};import{jsx as w,jsxs as $}from"react/jsx-runtime";var X={sm:s.sizeSm,md:s.sizeMd,lg:s.sizeLg},G={primary:s.variantPrimary,secondary:s.variantSecondary,outline:s.variantOutline,ghost:s.variantGhost,danger:s.variantDanger},S=V(({variant:e="primary",size:r="md",isLoading:a=!1,leftIcon:t,rightIcon:o,fullWidth:n=!1,disabled:i,className:u,children:f,type:m="button",...q},v)=>{let N=[s.button,X[r],G[e],n?s.fullWidth:"",a?s.loading:"",u??""].filter(Boolean).join(" ");return $("button",{ref:v,type:m,className:N,disabled:i||a,"aria-busy":a||void 0,"aria-disabled":i||a||void 0,...q,children:[a&&w("span",{className:s.spinnerWrapper,"aria-hidden":"true",children:w("span",{className:s.spinner})}),t&&w("span",{className:s.iconLeft,children:t}),f,o&&w("span",{className:s.iconRight,children:o})]})});S.displayName="Button";var g={};import{jsx as K}from"react/jsx-runtime";var J={default:g.variantDefault,outlined:g.variantOutlined,elevated:g.variantElevated,glass:g.variantGlass},U={none:g.paddingNone,sm:g.paddingSm,md:g.paddingMd,lg:g.paddingLg},C=({variant:e="default",padding:r="md",hoverable:a=!1,className:t,children:o,...n})=>{let i=[g.card,J[e],U[r],a?g.hoverable:"",t??""].filter(Boolean).join(" ");return K("div",{className:i,...n,children:o})};C.displayName="Card";import{forwardRef as Z,useId as _}from"react";var l={};import{jsx as h,jsxs as E}from"react/jsx-runtime";var rr={sm:l.sizeSm,md:l.sizeMd,lg:l.sizeLg},P=Z(({label:e,error:r,helperText:a,leftIcon:t,rightIcon:o,size:n="md",variant:i="default",className:u,id:f,"aria-describedby":m,...q},v)=>{let N=_(),y=f??N,A=r?`${y}-error`:void 0,D=a&&!r?`${y}-helper`:void 0,W=m??A??D??void 0,O=[l.input,rr[n],i==="filled"?l.variantFilled:"",t?l.hasLeftIcon:"",o?l.hasRightIcon:"",r?l.inputError:"",u??""].filter(Boolean).join(" ");return E("div",{className:l.wrapper,children:[e&&h("label",{htmlFor:y,className:l.label,children:e}),E("div",{className:l.inputContainer,children:[t&&h("span",{className:l.leftIcon,"aria-hidden":"true",children:t}),h("input",{ref:v,id:y,className:O,"aria-invalid":r?!0:void 0,"aria-describedby":W,...q}),o&&h("span",{className:l.rightIcon,"aria-hidden":"true",children:o})]}),r&&h("p",{id:A,className:l.errorText,role:"alert",children:r}),a&&!r&&h("p",{id:D,className:l.helperText,children:a})]})});P.displayName="Input";import{useId as er}from"react";var p={};import{jsx as z,jsxs as tr}from"react/jsx-runtime";var or={sm:p.sizeSm,md:p.sizeMd,lg:p.sizeLg},R=({checked:e=!1,onChange:r,size:a="md",label:t,disabled:o=!1,className:n})=>{let i=er(),u=[p.wrapper,or[a],o?p.disabled:"",n??""].filter(Boolean).join(" "),f=[p.track,e?p.trackChecked:""].filter(Boolean).join(" "),m=[p.thumb,e?p.thumbChecked:""].filter(Boolean).join(" "),q=v=>{o||r?.(v.target.checked)};return tr("label",{className:u,children:[z("input",{id:i,type:"checkbox",role:"switch",className:p.input,checked:e,disabled:o,onChange:q,"aria-checked":e}),z("span",{className:f,"aria-hidden":"true",children:z("span",{className:m})}),t&&z("span",{className:p.label,children:t})]})};R.displayName="Toggle";var d={};import{jsx as lr,jsxs as cr}from"react/jsx-runtime";var ir={sm:d.sizeSm,md:d.sizeMd,lg:d.sizeLg},sr={default:d.variantDefault,primary:d.variantPrimary,success:d.variantSuccess,warning:d.variantWarning,danger:d.variantDanger,info:d.variantInfo},B=({variant:e="default",size:r="md",dot:a=!1,outline:t=!1,className:o,children:n,...i})=>{let u=[d.badge,ir[r],sr[e],t?d.outline:"",o??""].filter(Boolean).join(" ");return cr("span",{className:u,...i,children:[a&&lr("span",{className:`${d.dot} ${d.dotPulse}`,"aria-hidden":"true"}),n]})};B.displayName="Badge";var k={};import{FiInfo as pr,FiCheckCircle as gr,FiAlertTriangle as kr,FiXCircle as ur}from"react-icons/fi";import{jsx as b,jsxs as F}from"react/jsx-runtime";var br={info:k.variantInfo,success:k.variantSuccess,warning:k.variantWarning,danger:k.variantDanger},fr={info:b(pr,{}),success:b(gr,{}),warning:b(kr,{}),danger:b(ur,{})},I=({variant:e="info",title:r,onClose:a,className:t,children:o,...n})=>{let i=[k.alert,br[e],t??""].filter(Boolean).join(" ");return F("div",{className:i,role:"alert",...n,children:[b("span",{className:k.icon,"aria-hidden":"true",children:fr[e]}),F("div",{className:k.content,children:[r&&b("h5",{className:k.title,children:r}),o&&b("div",{className:k.description,children:o})]}),a&&b("button",{type:"button",className:k.closeButton,onClick:a,"aria-label":"Dismiss alert",children:"\u2715"})]})};I.displayName="Alert";import{useState as qr}from"react";var c={};import{jsx as L,jsxs as yr}from"react/jsx-runtime";var vr={xs:c.sizeXs,sm:c.sizeSm,md:c.sizeMd,lg:c.sizeLg,xl:c.sizeXl},hr={circle:c.shapeCircle,square:c.shapeSquare},xr={online:c.statusOnline,offline:c.statusOffline,away:c.statusAway,busy:c.statusBusy},T=({src:e,alt:r="",fallback:a,size:t="md",shape:o="circle",status:n,className:i,...u})=>{let[f,m]=qr(!1),q=[c.avatar,vr[t],hr[o],i??""].filter(Boolean).join(" ");return yr("div",{className:q,...u,children:[e&&!f?L("img",{src:e,alt:r,className:c.image,onError:()=>m(!0)}):L("span",{className:c.fallback,children:a}),n&&L("span",{className:`${c.statusDot} ${xr[n]}`,"aria-label":n,role:"status"})]})};T.displayName="Avatar";var x={};import{jsx as H}from"react/jsx-runtime";var zr={sm:x.sizeSm,md:x.sizeMd,lg:x.sizeLg},M=({size:e="md",color:r,style:a,className:t,...o})=>{let n=[x.spinner,zr[e],t??""].filter(Boolean).join(" "),i={...a,...r?{borderTopColor:r}:{}};return H("span",{className:n,style:i,role:"status",...o,children:H("span",{className:x.srOnly,children:"Loading..."})})};M.displayName="Spinner";export{I as Alert,T as Avatar,B as Badge,S as Button,C as Card,P as Input,M as Spinner,R as Toggle};
1
+ import e, { forwardRef as t, useId as n, useState as r } from "react";
2
+ //#region \0rolldown/runtime.js
3
+ var i = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), a = /* @__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
+ }), o = {
7
+ button: "_button_1yvwy_5",
8
+ sizeSm: "_sizeSm_1yvwy_44",
9
+ sizeMd: "_sizeMd_1yvwy_52",
10
+ sizeLg: "_sizeLg_1yvwy_60",
11
+ variantPrimary: "_variantPrimary_1yvwy_70",
12
+ variantSecondary: "_variantSecondary_1yvwy_82",
13
+ variantOutline: "_variantOutline_1yvwy_95",
14
+ variantGhost: "_variantGhost_1yvwy_107",
15
+ variantDanger: "_variantDanger_1yvwy_119",
16
+ fullWidth: "_fullWidth_1yvwy_133",
17
+ loading: "_loading_1yvwy_139",
18
+ spinnerWrapper: "_spinnerWrapper_1yvwy_144",
19
+ spinner: "_spinner_1yvwy_144",
20
+ "qk-spin": "_qk-spin_1yvwy_1",
21
+ iconLeft: "_iconLeft_1yvwy_170",
22
+ iconRight: "_iconRight_1yvwy_171"
23
+ }, s = /* @__PURE__ */ i(((e) => {
24
+ var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
25
+ function r(e, n, r) {
26
+ var i = null;
27
+ 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]);
28
+ else r = n;
29
+ return n = r.ref, {
30
+ $$typeof: t,
31
+ type: e,
32
+ key: i,
33
+ ref: n === void 0 ? null : n,
34
+ props: r
35
+ };
36
+ }
37
+ e.Fragment = n, e.jsx = r, e.jsxs = r;
38
+ })), c = /* @__PURE__ */ i(((e) => {
39
+ process.env.NODE_ENV !== "production" && (function() {
40
+ function t(e) {
41
+ if (e == null) return null;
42
+ if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
43
+ if (typeof e == "string") return e;
44
+ switch (e) {
45
+ case v: return "Fragment";
46
+ case b: return "Profiler";
47
+ case y: return "StrictMode";
48
+ case w: return "Suspense";
49
+ case T: return "SuspenseList";
50
+ case O: return "Activity";
51
+ }
52
+ 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) {
53
+ case _: return "Portal";
54
+ case S: return e.displayName || "Context";
55
+ case x: return (e._context.displayName || "Context") + ".Consumer";
56
+ case C:
57
+ var n = e.render;
58
+ return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
59
+ case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
60
+ case D:
61
+ n = e._payload, e = e._init;
62
+ try {
63
+ return t(e(n));
64
+ } catch {}
65
+ }
66
+ return null;
67
+ }
68
+ function n(e) {
69
+ return "" + e;
70
+ }
71
+ function r(e) {
72
+ try {
73
+ n(e);
74
+ var t = !1;
75
+ } catch {
76
+ t = !0;
77
+ }
78
+ if (t) {
79
+ t = console;
80
+ var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
81
+ 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);
82
+ }
83
+ }
84
+ function i(e) {
85
+ if (e === v) return "<>";
86
+ if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
87
+ try {
88
+ var n = t(e);
89
+ return n ? "<" + n + ">" : "<...>";
90
+ } catch {
91
+ return "<...>";
92
+ }
93
+ }
94
+ function o() {
95
+ var e = A.A;
96
+ return e === null ? null : e.getOwner();
97
+ }
98
+ function s() {
99
+ return Error("react-stack-top-frame");
100
+ }
101
+ function c(e) {
102
+ if (j.call(e, "key")) {
103
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
104
+ if (t && t.isReactWarning) return !1;
105
+ }
106
+ return e.key !== void 0;
107
+ }
108
+ function l(e, t) {
109
+ function n() {
110
+ 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));
111
+ }
112
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
113
+ get: n,
114
+ configurable: !0
115
+ });
116
+ }
117
+ function u() {
118
+ var e = t(this.type);
119
+ 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;
120
+ }
121
+ function d(e, t, n, r, i, a) {
122
+ var o = n.ref;
123
+ return e = {
124
+ $$typeof: g,
125
+ type: e,
126
+ key: t,
127
+ props: n,
128
+ _owner: r
129
+ }, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
130
+ enumerable: !1,
131
+ value: null
132
+ }) : Object.defineProperty(e, "ref", {
133
+ enumerable: !1,
134
+ get: u
135
+ }), e._store = {}, Object.defineProperty(e._store, "validated", {
136
+ configurable: !1,
137
+ enumerable: !1,
138
+ writable: !0,
139
+ value: 0
140
+ }), Object.defineProperty(e, "_debugInfo", {
141
+ configurable: !1,
142
+ enumerable: !1,
143
+ writable: !0,
144
+ value: null
145
+ }), Object.defineProperty(e, "_debugStack", {
146
+ configurable: !1,
147
+ enumerable: !1,
148
+ writable: !0,
149
+ value: i
150
+ }), Object.defineProperty(e, "_debugTask", {
151
+ configurable: !1,
152
+ enumerable: !1,
153
+ writable: !0,
154
+ value: a
155
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
156
+ }
157
+ function f(e, n, i, a, s, u) {
158
+ var f = n.children;
159
+ if (f !== void 0) if (a) if (M(f)) {
160
+ for (a = 0; a < f.length; a++) p(f[a]);
161
+ Object.freeze && Object.freeze(f);
162
+ } 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.");
163
+ else p(f);
164
+ if (j.call(n, "key")) {
165
+ f = t(e);
166
+ var m = Object.keys(n).filter(function(e) {
167
+ return e !== "key";
168
+ });
169
+ a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[f + a] || (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} />", a, f, m, f), R[f + a] = !0);
170
+ }
171
+ 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]);
172
+ else i = n;
173
+ return f && l(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, i, o(), s, u);
174
+ }
175
+ function p(e) {
176
+ 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));
177
+ }
178
+ function m(e) {
179
+ return typeof e == "object" && !!e && e.$$typeof === g;
180
+ }
181
+ var h = a("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() {
182
+ return null;
183
+ };
184
+ h = { react_stack_bottom_frame: function(e) {
185
+ return e();
186
+ } };
187
+ var P, F = {}, I = h.react_stack_bottom_frame.bind(h, s)(), L = N(i(s)), R = {};
188
+ e.Fragment = v, e.jsx = function(e, t, n) {
189
+ var r = 1e4 > A.recentlyCreatedOwnerStacks++;
190
+ return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
191
+ }, e.jsxs = function(e, t, n) {
192
+ var r = 1e4 > A.recentlyCreatedOwnerStacks++;
193
+ return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
194
+ };
195
+ })();
196
+ })), l = (/* @__PURE__ */ i(((e, t) => {
197
+ process.env.NODE_ENV === "production" ? t.exports = s() : t.exports = c();
198
+ })))(), u = {
199
+ sm: o.sizeSm,
200
+ md: o.sizeMd,
201
+ lg: o.sizeLg
202
+ }, d = {
203
+ primary: o.variantPrimary,
204
+ secondary: o.variantSecondary,
205
+ outline: o.variantOutline,
206
+ ghost: o.variantGhost,
207
+ danger: o.variantDanger
208
+ }, f = t(({ variant: e = "primary", size: t = "md", isLoading: n = !1, leftIcon: r, rightIcon: i, fullWidth: a = !1, disabled: s, className: c, children: f, type: p = "button", ...m }, h) => /* @__PURE__ */ (0, l.jsxs)("button", {
209
+ ref: h,
210
+ type: p,
211
+ className: [
212
+ o.button,
213
+ u[t],
214
+ d[e],
215
+ a ? o.fullWidth : "",
216
+ n ? o.loading : "",
217
+ c ?? ""
218
+ ].filter(Boolean).join(" "),
219
+ disabled: s || n,
220
+ "aria-busy": n || void 0,
221
+ "aria-disabled": s || n || void 0,
222
+ ...m,
223
+ children: [
224
+ n && /* @__PURE__ */ (0, l.jsx)("span", {
225
+ className: o.spinnerWrapper,
226
+ "aria-hidden": "true",
227
+ children: /* @__PURE__ */ (0, l.jsx)("span", { className: o.spinner })
228
+ }),
229
+ r && /* @__PURE__ */ (0, l.jsx)("span", {
230
+ className: o.iconLeft,
231
+ children: r
232
+ }),
233
+ f,
234
+ i && /* @__PURE__ */ (0, l.jsx)("span", {
235
+ className: o.iconRight,
236
+ children: i
237
+ })
238
+ ]
239
+ }));
240
+ f.displayName = "Button";
241
+ var p = {
242
+ card: "_card_bkd5b_5",
243
+ variantDefault: "_variantDefault_bkd5b_16",
244
+ variantOutlined: "_variantOutlined_bkd5b_21",
245
+ variantElevated: "_variantElevated_bkd5b_26",
246
+ variantGlass: "_variantGlass_bkd5b_32",
247
+ paddingNone: "_paddingNone_bkd5b_42",
248
+ paddingSm: "_paddingSm_bkd5b_46",
249
+ paddingMd: "_paddingMd_bkd5b_50",
250
+ paddingLg: "_paddingLg_bkd5b_54",
251
+ hoverable: "_hoverable_bkd5b_60"
252
+ }, m = {
253
+ default: p.variantDefault,
254
+ outlined: p.variantOutlined,
255
+ elevated: p.variantElevated,
256
+ glass: p.variantGlass
257
+ }, h = {
258
+ none: p.paddingNone,
259
+ sm: p.paddingSm,
260
+ md: p.paddingMd,
261
+ lg: p.paddingLg
262
+ }, g = ({ variant: e = "default", padding: t = "md", hoverable: n = !1, className: r, children: i, ...a }) => /* @__PURE__ */ (0, l.jsx)("div", {
263
+ className: [
264
+ p.card,
265
+ m[e],
266
+ h[t],
267
+ n ? p.hoverable : "",
268
+ r ?? ""
269
+ ].filter(Boolean).join(" "),
270
+ ...a,
271
+ children: i
272
+ });
273
+ g.displayName = "Card";
274
+ var _ = {
275
+ wrapper: "_wrapper_1jgbq_5",
276
+ inputContainer: "_inputContainer_1jgbq_13",
277
+ input: "_input_1jgbq_13",
278
+ variantFilled: "_variantFilled_1jgbq_58",
279
+ sizeSm: "_sizeSm_1jgbq_75",
280
+ sizeMd: "_sizeMd_1jgbq_82",
281
+ sizeLg: "_sizeLg_1jgbq_89",
282
+ hasLeftIcon: "_hasLeftIcon_1jgbq_98",
283
+ hasRightIcon: "_hasRightIcon_1jgbq_102",
284
+ leftIcon: "_leftIcon_1jgbq_114",
285
+ rightIcon: "_rightIcon_1jgbq_115",
286
+ label: "_label_1jgbq_137",
287
+ helperText: "_helperText_1jgbq_151",
288
+ errorText: "_errorText_1jgbq_160",
289
+ inputError: "_inputError_1jgbq_170"
290
+ }, v = {
291
+ sm: _.sizeSm,
292
+ md: _.sizeMd,
293
+ lg: _.sizeLg
294
+ }, y = t(({ label: e, error: t, helperText: r, leftIcon: i, rightIcon: a, size: o = "md", variant: s = "default", className: c, id: u, "aria-describedby": d, ...f }, p) => {
295
+ let m = n(), h = u ?? m, g = t ? `${h}-error` : void 0, y = r && !t ? `${h}-helper` : void 0, b = d ?? g ?? y ?? void 0, x = [
296
+ _.input,
297
+ v[o],
298
+ s === "filled" ? _.variantFilled : "",
299
+ i ? _.hasLeftIcon : "",
300
+ a ? _.hasRightIcon : "",
301
+ t ? _.inputError : "",
302
+ c ?? ""
303
+ ].filter(Boolean).join(" ");
304
+ return /* @__PURE__ */ (0, l.jsxs)("div", {
305
+ className: _.wrapper,
306
+ children: [
307
+ e && /* @__PURE__ */ (0, l.jsx)("label", {
308
+ htmlFor: h,
309
+ className: _.label,
310
+ children: e
311
+ }),
312
+ /* @__PURE__ */ (0, l.jsxs)("div", {
313
+ className: _.inputContainer,
314
+ children: [
315
+ i && /* @__PURE__ */ (0, l.jsx)("span", {
316
+ className: _.leftIcon,
317
+ "aria-hidden": "true",
318
+ children: i
319
+ }),
320
+ /* @__PURE__ */ (0, l.jsx)("input", {
321
+ ref: p,
322
+ id: h,
323
+ className: x,
324
+ "aria-invalid": t ? !0 : void 0,
325
+ "aria-describedby": b,
326
+ ...f
327
+ }),
328
+ a && /* @__PURE__ */ (0, l.jsx)("span", {
329
+ className: _.rightIcon,
330
+ "aria-hidden": "true",
331
+ children: a
332
+ })
333
+ ]
334
+ }),
335
+ t && /* @__PURE__ */ (0, l.jsx)("p", {
336
+ id: g,
337
+ className: _.errorText,
338
+ role: "alert",
339
+ children: t
340
+ }),
341
+ r && !t && /* @__PURE__ */ (0, l.jsx)("p", {
342
+ id: y,
343
+ className: _.helperText,
344
+ children: r
345
+ })
346
+ ]
347
+ });
348
+ });
349
+ y.displayName = "Input";
350
+ var b = {
351
+ wrapper: "_wrapper_1pvuf_5",
352
+ disabled: "_disabled_1pvuf_13",
353
+ input: "_input_1pvuf_20",
354
+ track: "_track_1pvuf_34",
355
+ trackChecked: "_trackChecked_1pvuf_51",
356
+ thumb: "_thumb_1pvuf_76",
357
+ sizeSm: "_sizeSm_1pvuf_88",
358
+ thumbChecked: "_thumbChecked_1pvuf_100",
359
+ sizeMd: "_sizeMd_1pvuf_106",
360
+ sizeLg: "_sizeLg_1pvuf_124",
361
+ label: "_label_1pvuf_142"
362
+ }, x = {
363
+ sm: b.sizeSm,
364
+ md: b.sizeMd,
365
+ lg: b.sizeLg
366
+ }, S = ({ checked: e = !1, onChange: t, size: r = "md", label: i, disabled: a = !1, className: o }) => {
367
+ let s = n(), c = [
368
+ b.wrapper,
369
+ x[r],
370
+ a ? b.disabled : "",
371
+ o ?? ""
372
+ ].filter(Boolean).join(" "), u = [b.track, e ? b.trackChecked : ""].filter(Boolean).join(" "), d = [b.thumb, e ? b.thumbChecked : ""].filter(Boolean).join(" ");
373
+ return /* @__PURE__ */ (0, l.jsxs)("label", {
374
+ className: c,
375
+ children: [
376
+ /* @__PURE__ */ (0, l.jsx)("input", {
377
+ id: s,
378
+ type: "checkbox",
379
+ role: "switch",
380
+ className: b.input,
381
+ checked: e,
382
+ disabled: a,
383
+ onChange: (e) => {
384
+ a || t?.(e.target.checked);
385
+ },
386
+ "aria-checked": e
387
+ }),
388
+ /* @__PURE__ */ (0, l.jsx)("span", {
389
+ className: u,
390
+ "aria-hidden": "true",
391
+ children: /* @__PURE__ */ (0, l.jsx)("span", { className: d })
392
+ }),
393
+ i && /* @__PURE__ */ (0, l.jsx)("span", {
394
+ className: b.label,
395
+ children: i
396
+ })
397
+ ]
398
+ });
399
+ };
400
+ S.displayName = "Toggle";
401
+ var C = {
402
+ badge: "_badge_kf03d_5",
403
+ sizeSm: "_sizeSm_kf03d_22",
404
+ sizeMd: "_sizeMd_kf03d_28",
405
+ sizeLg: "_sizeLg_kf03d_34",
406
+ variantDefault: "_variantDefault_kf03d_42",
407
+ variantPrimary: "_variantPrimary_kf03d_50",
408
+ variantSuccess: "_variantSuccess_kf03d_57",
409
+ variantWarning: "_variantWarning_kf03d_64",
410
+ variantDanger: "_variantDanger_kf03d_71",
411
+ variantInfo: "_variantInfo_kf03d_78",
412
+ outline: "_outline_kf03d_86",
413
+ dot: "_dot_kf03d_119",
414
+ dotPulse: "_dotPulse_kf03d_156",
415
+ badgePulse: "_badgePulse_kf03d_1"
416
+ }, w = {
417
+ sm: C.sizeSm,
418
+ md: C.sizeMd,
419
+ lg: C.sizeLg
420
+ }, T = {
421
+ default: C.variantDefault,
422
+ primary: C.variantPrimary,
423
+ success: C.variantSuccess,
424
+ warning: C.variantWarning,
425
+ danger: C.variantDanger,
426
+ info: C.variantInfo
427
+ }, E = ({ variant: e = "default", size: t = "md", dot: n = !1, outline: r = !1, className: i, children: a, ...o }) => /* @__PURE__ */ (0, l.jsxs)("span", {
428
+ className: [
429
+ C.badge,
430
+ w[t],
431
+ T[e],
432
+ r ? C.outline : "",
433
+ i ?? ""
434
+ ].filter(Boolean).join(" "),
435
+ ...o,
436
+ children: [n && /* @__PURE__ */ (0, l.jsx)("span", {
437
+ className: `${C.dot} ${C.dotPulse}`,
438
+ "aria-hidden": "true"
439
+ }), a]
440
+ });
441
+ E.displayName = "Badge";
442
+ var D = {
443
+ alert: "_alert_19uly_1",
444
+ icon: "_icon_19uly_15",
445
+ content: "_content_19uly_31",
446
+ title: "_title_19uly_35",
447
+ description: "_description_19uly_42",
448
+ closeButton: "_closeButton_19uly_54",
449
+ variantInfo: "_variantInfo_19uly_79",
450
+ variantSuccess: "_variantSuccess_19uly_89",
451
+ variantWarning: "_variantWarning_19uly_99",
452
+ variantDanger: "_variantDanger_19uly_109"
453
+ }, O = {
454
+ color: void 0,
455
+ size: void 0,
456
+ className: void 0,
457
+ style: void 0,
458
+ attr: void 0
459
+ }, k = e.createContext && /*#__PURE__*/ e.createContext(O), A = [
460
+ "attr",
461
+ "size",
462
+ "title"
463
+ ];
464
+ function j(e, t) {
465
+ if (e == null) return {};
466
+ var n, r, i = M(e, t);
467
+ if (Object.getOwnPropertySymbols) {
468
+ var a = Object.getOwnPropertySymbols(e);
469
+ for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
470
+ }
471
+ return i;
472
+ }
473
+ function M(e, t) {
474
+ if (e == null) return {};
475
+ var n = {};
476
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
477
+ if (t.indexOf(r) !== -1) continue;
478
+ n[r] = e[r];
479
+ }
480
+ return n;
481
+ }
482
+ function N() {
483
+ return N = Object.assign ? Object.assign.bind() : function(e) {
484
+ for (var t = 1; t < arguments.length; t++) {
485
+ var n = arguments[t];
486
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
487
+ }
488
+ return e;
489
+ }, N.apply(null, arguments);
490
+ }
491
+ function P(e, t) {
492
+ var n = Object.keys(e);
493
+ if (Object.getOwnPropertySymbols) {
494
+ var r = Object.getOwnPropertySymbols(e);
495
+ t && (r = r.filter(function(t) {
496
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
497
+ })), n.push.apply(n, r);
498
+ }
499
+ return n;
500
+ }
501
+ function F(e) {
502
+ for (var t = 1; t < arguments.length; t++) {
503
+ var n = arguments[t] == null ? {} : arguments[t];
504
+ t % 2 ? P(Object(n), !0).forEach(function(t) {
505
+ I(e, t, n[t]);
506
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : P(Object(n)).forEach(function(t) {
507
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
508
+ });
509
+ }
510
+ return e;
511
+ }
512
+ function I(e, t, n) {
513
+ return (t = L(t)) in e ? Object.defineProperty(e, t, {
514
+ value: n,
515
+ enumerable: !0,
516
+ configurable: !0,
517
+ writable: !0
518
+ }) : e[t] = n, e;
519
+ }
520
+ function L(e) {
521
+ var t = R(e, "string");
522
+ return typeof t == "symbol" ? t : t + "";
523
+ }
524
+ function R(e, t) {
525
+ if (typeof e != "object" || !e) return e;
526
+ var n = e[Symbol.toPrimitive];
527
+ if (n !== void 0) {
528
+ var r = n.call(e, t || "default");
529
+ if (typeof r != "object") return r;
530
+ throw TypeError("@@toPrimitive must return a primitive value.");
531
+ }
532
+ return (t === "string" ? String : Number)(e);
533
+ }
534
+ function z(t) {
535
+ return t && t.map((t, n) => /*#__PURE__*/ e.createElement(t.tag, F({ key: n }, t.attr), z(t.child)));
536
+ }
537
+ function B(t) {
538
+ return (n) => /*#__PURE__*/ e.createElement(V, N({ attr: F({}, t.attr) }, n), z(t.child));
539
+ }
540
+ function V(t) {
541
+ var n = (n) => {
542
+ var { attr: r, size: i, title: a } = t, o = j(t, A), s = i || n.size || "1em", c;
543
+ return n.className && (c = n.className), t.className && (c = (c ? c + " " : "") + t.className), /*#__PURE__*/ e.createElement("svg", N({
544
+ stroke: "currentColor",
545
+ fill: "currentColor",
546
+ strokeWidth: "0"
547
+ }, n.attr, r, o, {
548
+ className: c,
549
+ style: F(F({ color: t.color || n.color }, n.style), t.style),
550
+ height: s,
551
+ width: s,
552
+ xmlns: "http://www.w3.org/2000/svg"
553
+ }), a && /*#__PURE__*/ e.createElement("title", null, a), t.children);
554
+ };
555
+ return k === void 0 ? n(O) : /*#__PURE__*/ e.createElement(k.Consumer, null, (e) => n(e));
556
+ }
557
+ //#endregion
558
+ //#region ../../node_modules/.bun/react-icons@5.6.0/node_modules/react-icons/fi/index.mjs
559
+ function H(e) {
560
+ return B({
561
+ tag: "svg",
562
+ attr: {
563
+ viewBox: "0 0 24 24",
564
+ fill: "none",
565
+ stroke: "currentColor",
566
+ strokeWidth: "2",
567
+ strokeLinecap: "round",
568
+ strokeLinejoin: "round"
569
+ },
570
+ child: [
571
+ {
572
+ tag: "circle",
573
+ attr: {
574
+ cx: "12",
575
+ cy: "12",
576
+ r: "10"
577
+ },
578
+ child: []
579
+ },
580
+ {
581
+ tag: "line",
582
+ attr: {
583
+ x1: "15",
584
+ y1: "9",
585
+ x2: "9",
586
+ y2: "15"
587
+ },
588
+ child: []
589
+ },
590
+ {
591
+ tag: "line",
592
+ attr: {
593
+ x1: "9",
594
+ y1: "9",
595
+ x2: "15",
596
+ y2: "15"
597
+ },
598
+ child: []
599
+ }
600
+ ]
601
+ })(e);
602
+ }
603
+ function U(e) {
604
+ return B({
605
+ tag: "svg",
606
+ attr: {
607
+ viewBox: "0 0 24 24",
608
+ fill: "none",
609
+ stroke: "currentColor",
610
+ strokeWidth: "2",
611
+ strokeLinecap: "round",
612
+ strokeLinejoin: "round"
613
+ },
614
+ child: [
615
+ {
616
+ tag: "circle",
617
+ attr: {
618
+ cx: "12",
619
+ cy: "12",
620
+ r: "10"
621
+ },
622
+ child: []
623
+ },
624
+ {
625
+ tag: "line",
626
+ attr: {
627
+ x1: "12",
628
+ y1: "16",
629
+ x2: "12",
630
+ y2: "12"
631
+ },
632
+ child: []
633
+ },
634
+ {
635
+ tag: "line",
636
+ attr: {
637
+ x1: "12",
638
+ y1: "8",
639
+ x2: "12.01",
640
+ y2: "8"
641
+ },
642
+ child: []
643
+ }
644
+ ]
645
+ })(e);
646
+ }
647
+ function W(e) {
648
+ return B({
649
+ tag: "svg",
650
+ attr: {
651
+ viewBox: "0 0 24 24",
652
+ fill: "none",
653
+ stroke: "currentColor",
654
+ strokeWidth: "2",
655
+ strokeLinecap: "round",
656
+ strokeLinejoin: "round"
657
+ },
658
+ child: [{
659
+ tag: "path",
660
+ attr: { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" },
661
+ child: []
662
+ }, {
663
+ tag: "polyline",
664
+ attr: { points: "22 4 12 14.01 9 11.01" },
665
+ child: []
666
+ }]
667
+ })(e);
668
+ }
669
+ function G(e) {
670
+ return B({
671
+ tag: "svg",
672
+ attr: {
673
+ viewBox: "0 0 24 24",
674
+ fill: "none",
675
+ stroke: "currentColor",
676
+ strokeWidth: "2",
677
+ strokeLinecap: "round",
678
+ strokeLinejoin: "round"
679
+ },
680
+ child: [
681
+ {
682
+ tag: "path",
683
+ attr: { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" },
684
+ child: []
685
+ },
686
+ {
687
+ tag: "line",
688
+ attr: {
689
+ x1: "12",
690
+ y1: "9",
691
+ x2: "12",
692
+ y2: "13"
693
+ },
694
+ child: []
695
+ },
696
+ {
697
+ tag: "line",
698
+ attr: {
699
+ x1: "12",
700
+ y1: "17",
701
+ x2: "12.01",
702
+ y2: "17"
703
+ },
704
+ child: []
705
+ }
706
+ ]
707
+ })(e);
708
+ }
709
+ //#endregion
710
+ //#region src/components/Alert/Alert.tsx
711
+ var K = {
712
+ info: D.variantInfo,
713
+ success: D.variantSuccess,
714
+ warning: D.variantWarning,
715
+ danger: D.variantDanger
716
+ }, q = {
717
+ info: /* @__PURE__ */ (0, l.jsx)(U, {}),
718
+ success: /* @__PURE__ */ (0, l.jsx)(W, {}),
719
+ warning: /* @__PURE__ */ (0, l.jsx)(G, {}),
720
+ danger: /* @__PURE__ */ (0, l.jsx)(H, {})
721
+ }, J = ({ variant: e = "info", title: t, onClose: n, className: r, children: i, ...a }) => /* @__PURE__ */ (0, l.jsxs)("div", {
722
+ className: [
723
+ D.alert,
724
+ K[e],
725
+ r ?? ""
726
+ ].filter(Boolean).join(" "),
727
+ role: "alert",
728
+ ...a,
729
+ children: [
730
+ /* @__PURE__ */ (0, l.jsx)("span", {
731
+ className: D.icon,
732
+ "aria-hidden": "true",
733
+ children: q[e]
734
+ }),
735
+ /* @__PURE__ */ (0, l.jsxs)("div", {
736
+ className: D.content,
737
+ children: [t && /* @__PURE__ */ (0, l.jsx)("h5", {
738
+ className: D.title,
739
+ children: t
740
+ }), i && /* @__PURE__ */ (0, l.jsx)("div", {
741
+ className: D.description,
742
+ children: i
743
+ })]
744
+ }),
745
+ n && /* @__PURE__ */ (0, l.jsx)("button", {
746
+ type: "button",
747
+ className: D.closeButton,
748
+ onClick: n,
749
+ "aria-label": "Dismiss alert",
750
+ children: "✕"
751
+ })
752
+ ]
753
+ });
754
+ J.displayName = "Alert";
755
+ var Y = {
756
+ avatar: "_avatar_1uf1t_1",
757
+ image: "_image_1uf1t_15",
758
+ fallback: "_fallback_1uf1t_22",
759
+ shapeCircle: "_shapeCircle_1uf1t_29",
760
+ shapeSquare: "_shapeSquare_1uf1t_33",
761
+ sizeXs: "_sizeXs_1uf1t_39",
762
+ sizeSm: "_sizeSm_1uf1t_45",
763
+ sizeMd: "_sizeMd_1uf1t_51",
764
+ sizeLg: "_sizeLg_1uf1t_57",
765
+ sizeXl: "_sizeXl_1uf1t_63",
766
+ statusDot: "_statusDot_1uf1t_71",
767
+ statusOnline: "_statusOnline_1uf1t_109",
768
+ statusOffline: "_statusOffline_1uf1t_114",
769
+ statusAway: "_statusAway_1uf1t_118",
770
+ statusBusy: "_statusBusy_1uf1t_123"
771
+ }, X = {
772
+ xs: Y.sizeXs,
773
+ sm: Y.sizeSm,
774
+ md: Y.sizeMd,
775
+ lg: Y.sizeLg,
776
+ xl: Y.sizeXl
777
+ }, ee = {
778
+ circle: Y.shapeCircle,
779
+ square: Y.shapeSquare
780
+ }, te = {
781
+ online: Y.statusOnline,
782
+ offline: Y.statusOffline,
783
+ away: Y.statusAway,
784
+ busy: Y.statusBusy
785
+ }, Z = ({ src: e, alt: t = "", fallback: n, size: i = "md", shape: a = "circle", status: o, className: s, ...c }) => {
786
+ let [u, d] = r(!1), f = [
787
+ Y.avatar,
788
+ X[i],
789
+ ee[a],
790
+ s ?? ""
791
+ ].filter(Boolean).join(" "), p = e && !u;
792
+ return /* @__PURE__ */ (0, l.jsxs)("div", {
793
+ className: f,
794
+ ...c,
795
+ children: [p ? /* @__PURE__ */ (0, l.jsx)("img", {
796
+ src: e,
797
+ alt: t,
798
+ className: Y.image,
799
+ onError: () => d(!0)
800
+ }) : /* @__PURE__ */ (0, l.jsx)("span", {
801
+ className: Y.fallback,
802
+ children: n
803
+ }), o && /* @__PURE__ */ (0, l.jsx)("span", {
804
+ className: `${Y.statusDot} ${te[o]}`,
805
+ "aria-label": o,
806
+ role: "status"
807
+ })]
808
+ });
809
+ };
810
+ Z.displayName = "Avatar";
811
+ var Q = {
812
+ spinner: "_spinner_txj2l_1",
813
+ "qk-spin": "_qk-spin_txj2l_1",
814
+ sizeSm: "_sizeSm_txj2l_12",
815
+ sizeMd: "_sizeMd_txj2l_18",
816
+ sizeLg: "_sizeLg_txj2l_24",
817
+ srOnly: "_srOnly_txj2l_31"
818
+ }, ne = {
819
+ sm: Q.sizeSm,
820
+ md: Q.sizeMd,
821
+ lg: Q.sizeLg
822
+ }, $ = ({ size: e = "md", color: t, style: n, className: r, ...i }) => /* @__PURE__ */ (0, l.jsx)("span", {
823
+ className: [
824
+ Q.spinner,
825
+ ne[e],
826
+ r ?? ""
827
+ ].filter(Boolean).join(" "),
828
+ style: {
829
+ ...n,
830
+ ...t ? { borderTopColor: t } : {}
831
+ },
832
+ role: "status",
833
+ ...i,
834
+ children: /* @__PURE__ */ (0, l.jsx)("span", {
835
+ className: Q.srOnly,
836
+ children: "Loading..."
837
+ })
838
+ });
839
+ $.displayName = "Spinner";
840
+ //#endregion
841
+ export { J as Alert, Z as Avatar, E as Badge, f as Button, g as Card, y as Input, $ as Spinner, S as Toggle };