shekel-fe-shared-lib 1.0.0 → 1.0.1

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.mjs CHANGED
@@ -1,6 +1,5 @@
1
- import K from "react";
2
- import { Button as ee } from "antd";
3
- var R = { exports: {} }, b = {};
1
+ import se, { useState as _, useRef as J, useEffect as z } from "react";
2
+ var I = { exports: {} }, A = {};
4
3
  /**
5
4
  * @license React
6
5
  * react-jsx-runtime.production.js
@@ -10,29 +9,29 @@ var R = { exports: {} }, b = {};
10
9
  * This source code is licensed under the MIT license found in the
11
10
  * LICENSE file in the root directory of this source tree.
12
11
  */
13
- var Y;
14
- function re() {
15
- if (Y) return b;
16
- Y = 1;
17
- var l = Symbol.for("react.transitional.element"), f = Symbol.for("react.fragment");
18
- function u(c, o, s) {
19
- var i = null;
20
- if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) {
21
- s = {};
22
- for (var m in o)
23
- m !== "key" && (s[m] = o[m]);
24
- } else s = o;
25
- return o = s.ref, {
26
- $$typeof: l,
27
- type: c,
28
- key: i,
29
- ref: o !== void 0 ? o : null,
30
- props: s
12
+ var K;
13
+ function ne() {
14
+ if (K) return A;
15
+ K = 1;
16
+ var s = Symbol.for("react.transitional.element"), l = Symbol.for("react.fragment");
17
+ function n(r, a, c) {
18
+ var u = null;
19
+ if (c !== void 0 && (u = "" + c), a.key !== void 0 && (u = "" + a.key), "key" in a) {
20
+ c = {};
21
+ for (var f in a)
22
+ f !== "key" && (c[f] = a[f]);
23
+ } else c = a;
24
+ return a = c.ref, {
25
+ $$typeof: s,
26
+ type: r,
27
+ key: u,
28
+ ref: a !== void 0 ? a : null,
29
+ props: c
31
30
  };
32
31
  }
33
- return b.Fragment = f, b.jsx = u, b.jsxs = u, b;
32
+ return A.Fragment = l, A.jsx = n, A.jsxs = n, A;
34
33
  }
35
- var _ = {};
34
+ var M = {};
36
35
  /**
37
36
  * @license React
38
37
  * react-jsx-runtime.development.js
@@ -42,264 +41,1367 @@ var _ = {};
42
41
  * This source code is licensed under the MIT license found in the
43
42
  * LICENSE file in the root directory of this source tree.
44
43
  */
45
- var I;
46
- function te() {
47
- return I || (I = 1, process.env.NODE_ENV !== "production" && (function() {
48
- function l(e) {
49
- if (e == null) return null;
50
- if (typeof e == "function")
51
- return e.$$typeof === H ? null : e.displayName || e.name || null;
52
- if (typeof e == "string") return e;
53
- switch (e) {
54
- case p:
44
+ var ee;
45
+ function ae() {
46
+ return ee || (ee = 1, process.env.NODE_ENV !== "production" && (function() {
47
+ function s(t) {
48
+ if (t == null) return null;
49
+ if (typeof t == "function")
50
+ return t.$$typeof === D ? null : t.displayName || t.name || null;
51
+ if (typeof t == "string") return t;
52
+ switch (t) {
53
+ case i:
55
54
  return "Fragment";
56
- case U:
55
+ case b:
57
56
  return "Profiler";
58
- case W:
57
+ case k:
59
58
  return "StrictMode";
60
- case z:
59
+ case T:
61
60
  return "Suspense";
62
- case G:
61
+ case S:
63
62
  return "SuspenseList";
64
- case X:
63
+ case W:
65
64
  return "Activity";
66
65
  }
67
- if (typeof e == "object")
68
- switch (typeof e.tag == "number" && console.error(
66
+ if (typeof t == "object")
67
+ switch (typeof t.tag == "number" && console.error(
69
68
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
- ), e.$$typeof) {
71
- case M:
69
+ ), t.$$typeof) {
70
+ case y:
72
71
  return "Portal";
73
- case J:
74
- return e.displayName || "Context";
75
- case q:
76
- return (e._context.displayName || "Context") + ".Consumer";
77
- case V:
78
- var r = e.render;
79
- return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
- case B:
81
- return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
82
- case T:
83
- r = e._payload, e = e._init;
72
+ case $:
73
+ return t.displayName || "Context";
74
+ case N:
75
+ return (t._context.displayName || "Context") + ".Consumer";
76
+ case R:
77
+ var g = t.render;
78
+ return t = t.displayName, t || (t = g.displayName || g.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
79
+ case L:
80
+ return g = t.displayName || null, g !== null ? g : s(t.type) || "Memo";
81
+ case P:
82
+ g = t._payload, t = t._init;
84
83
  try {
85
- return l(e(r));
84
+ return s(t(g));
86
85
  } catch {
87
86
  }
88
87
  }
89
88
  return null;
90
89
  }
91
- function f(e) {
92
- return "" + e;
90
+ function l(t) {
91
+ return "" + t;
93
92
  }
94
- function u(e) {
93
+ function n(t) {
95
94
  try {
96
- f(e);
97
- var r = !1;
95
+ l(t);
96
+ var g = !1;
98
97
  } catch {
99
- r = !0;
98
+ g = !0;
100
99
  }
101
- if (r) {
102
- r = console;
103
- var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
- return t.call(
105
- r,
100
+ if (g) {
101
+ g = console;
102
+ var w = g.error, C = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
103
+ return w.call(
104
+ g,
106
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- n
108
- ), f(e);
106
+ C
107
+ ), l(t);
109
108
  }
110
109
  }
111
- function c(e) {
112
- if (e === p) return "<>";
113
- if (typeof e == "object" && e !== null && e.$$typeof === T)
110
+ function r(t) {
111
+ if (t === i) return "<>";
112
+ if (typeof t == "object" && t !== null && t.$$typeof === P)
114
113
  return "<...>";
115
114
  try {
116
- var r = l(e);
117
- return r ? "<" + r + ">" : "<...>";
115
+ var g = s(t);
116
+ return g ? "<" + g + ">" : "<...>";
118
117
  } catch {
119
118
  return "<...>";
120
119
  }
121
120
  }
122
- function o() {
123
- var e = g.A;
124
- return e === null ? null : e.getOwner();
121
+ function a() {
122
+ var t = B.A;
123
+ return t === null ? null : t.getOwner();
125
124
  }
126
- function s() {
125
+ function c() {
127
126
  return Error("react-stack-top-frame");
128
127
  }
129
- function i(e) {
130
- if (h.call(e, "key")) {
131
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
132
- if (r && r.isReactWarning) return !1;
128
+ function u(t) {
129
+ if (j.call(t, "key")) {
130
+ var g = Object.getOwnPropertyDescriptor(t, "key").get;
131
+ if (g && g.isReactWarning) return !1;
133
132
  }
134
- return e.key !== void 0;
133
+ return t.key !== void 0;
135
134
  }
136
- function m(e, r) {
137
- function t() {
138
- x || (x = !0, console.error(
135
+ function f(t, g) {
136
+ function w() {
137
+ G || (G = !0, console.error(
139
138
  "%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)",
140
- r
139
+ g
141
140
  ));
142
141
  }
143
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
144
- get: t,
142
+ w.isReactWarning = !0, Object.defineProperty(t, "key", {
143
+ get: w,
145
144
  configurable: !0
146
145
  });
147
146
  }
148
- function D() {
149
- var e = l(this.type);
150
- return j[e] || (j[e] = !0, console.error(
147
+ function m() {
148
+ var t = s(this.type);
149
+ return H[t] || (H[t] = !0, console.error(
151
150
  "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."
152
- )), e = this.props.ref, e !== void 0 ? e : null;
151
+ )), t = this.props.ref, t !== void 0 ? t : null;
153
152
  }
154
- function L(e, r, t, n, v, y) {
155
- var a = t.ref;
156
- return e = {
157
- $$typeof: P,
158
- type: e,
159
- key: r,
160
- props: t,
161
- _owner: n
162
- }, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
153
+ function h(t, g, w, C, F, U) {
154
+ var E = w.ref;
155
+ return t = {
156
+ $$typeof: o,
157
+ type: t,
158
+ key: g,
159
+ props: w,
160
+ _owner: C
161
+ }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(t, "ref", {
163
162
  enumerable: !1,
164
- get: D
165
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
163
+ get: m
164
+ }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
166
165
  configurable: !1,
167
166
  enumerable: !1,
168
167
  writable: !0,
169
168
  value: 0
170
- }), Object.defineProperty(e, "_debugInfo", {
169
+ }), Object.defineProperty(t, "_debugInfo", {
171
170
  configurable: !1,
172
171
  enumerable: !1,
173
172
  writable: !0,
174
173
  value: null
175
- }), Object.defineProperty(e, "_debugStack", {
174
+ }), Object.defineProperty(t, "_debugStack", {
176
175
  configurable: !1,
177
176
  enumerable: !1,
178
177
  writable: !0,
179
- value: v
180
- }), Object.defineProperty(e, "_debugTask", {
178
+ value: F
179
+ }), Object.defineProperty(t, "_debugTask", {
181
180
  configurable: !1,
182
181
  enumerable: !1,
183
182
  writable: !0,
184
- value: y
185
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
183
+ value: U
184
+ }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
186
185
  }
187
- function A(e, r, t, n, v, y) {
188
- var a = r.children;
189
- if (a !== void 0)
190
- if (n)
191
- if (Z(a)) {
192
- for (n = 0; n < a.length; n++)
193
- S(a[n]);
194
- Object.freeze && Object.freeze(a);
186
+ function v(t, g, w, C, F, U) {
187
+ var E = g.children;
188
+ if (E !== void 0)
189
+ if (C)
190
+ if (Y(E)) {
191
+ for (C = 0; C < E.length; C++)
192
+ p(E[C]);
193
+ Object.freeze && Object.freeze(E);
195
194
  } else
196
195
  console.error(
197
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
197
  );
199
- else S(a);
200
- if (h.call(r, "key")) {
201
- a = l(e);
202
- var d = Object.keys(r).filter(function(Q) {
203
- return Q !== "key";
198
+ else p(E);
199
+ if (j.call(g, "key")) {
200
+ E = s(t);
201
+ var O = Object.keys(g).filter(function(re) {
202
+ return re !== "key";
204
203
  });
205
- n = 0 < d.length ? "{key: someKey, " + d.join(": ..., ") + ": ...}" : "{key: someKey}", $[a + n] || (d = 0 < d.length ? "{" + d.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ C = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", Z[E + C] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
206
205
  `A props object containing a "key" prop is being spread into JSX:
207
206
  let props = %s;
208
207
  <%s {...props} />
209
208
  React keys must be passed directly to JSX without using spread:
210
209
  let props = %s;
211
210
  <%s key={someKey} {...props} />`,
212
- n,
213
- a,
214
- d,
215
- a
216
- ), $[a + n] = !0);
211
+ C,
212
+ E,
213
+ O,
214
+ E
215
+ ), Z[E + C] = !0);
217
216
  }
218
- if (a = null, t !== void 0 && (u(t), a = "" + t), i(r) && (u(r.key), a = "" + r.key), "key" in r) {
219
- t = {};
220
- for (var O in r)
221
- O !== "key" && (t[O] = r[O]);
222
- } else t = r;
223
- return a && m(
217
+ if (E = null, w !== void 0 && (n(w), E = "" + w), u(g) && (n(g.key), E = "" + g.key), "key" in g) {
218
+ w = {};
219
+ for (var q in g)
220
+ q !== "key" && (w[q] = g[q]);
221
+ } else w = g;
222
+ return E && f(
223
+ w,
224
+ typeof t == "function" ? t.displayName || t.name || "Unknown" : t
225
+ ), h(
224
226
  t,
225
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
226
- ), L(
227
- e,
228
- a,
229
- t,
230
- o(),
231
- v,
232
- y
227
+ E,
228
+ w,
229
+ a(),
230
+ F,
231
+ U
233
232
  );
234
233
  }
235
- function S(e) {
236
- w(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === T && (e._payload.status === "fulfilled" ? w(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
234
+ function p(t) {
235
+ d(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === P && (t._payload.status === "fulfilled" ? d(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
237
236
  }
238
- function w(e) {
239
- return typeof e == "object" && e !== null && e.$$typeof === P;
237
+ function d(t) {
238
+ return typeof t == "object" && t !== null && t.$$typeof === o;
240
239
  }
241
- var E = K, P = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), J = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), X = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), g = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, h = Object.prototype.hasOwnProperty, Z = Array.isArray, k = console.createTask ? console.createTask : function() {
240
+ var x = se, o = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), B = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, Y = Array.isArray, V = console.createTask ? console.createTask : function() {
242
241
  return null;
243
242
  };
244
- E = {
245
- react_stack_bottom_frame: function(e) {
246
- return e();
243
+ x = {
244
+ react_stack_bottom_frame: function(t) {
245
+ return t();
247
246
  }
248
247
  };
249
- var x, j = {}, N = E.react_stack_bottom_frame.bind(
250
- E,
251
- s
252
- )(), C = k(c(s)), $ = {};
253
- _.Fragment = p, _.jsx = function(e, r, t) {
254
- var n = 1e4 > g.recentlyCreatedOwnerStacks++;
255
- return A(
256
- e,
257
- r,
248
+ var G, H = {}, X = x.react_stack_bottom_frame.bind(
249
+ x,
250
+ c
251
+ )(), Q = V(r(c)), Z = {};
252
+ M.Fragment = i, M.jsx = function(t, g, w) {
253
+ var C = 1e4 > B.recentlyCreatedOwnerStacks++;
254
+ return v(
258
255
  t,
256
+ g,
257
+ w,
259
258
  !1,
260
- n ? Error("react-stack-top-frame") : N,
261
- n ? k(c(e)) : C
259
+ C ? Error("react-stack-top-frame") : X,
260
+ C ? V(r(t)) : Q
262
261
  );
263
- }, _.jsxs = function(e, r, t) {
264
- var n = 1e4 > g.recentlyCreatedOwnerStacks++;
265
- return A(
266
- e,
267
- r,
262
+ }, M.jsxs = function(t, g, w) {
263
+ var C = 1e4 > B.recentlyCreatedOwnerStacks++;
264
+ return v(
268
265
  t,
266
+ g,
267
+ w,
269
268
  !0,
270
- n ? Error("react-stack-top-frame") : N,
271
- n ? k(c(e)) : C
269
+ C ? Error("react-stack-top-frame") : X,
270
+ C ? V(r(t)) : Q
272
271
  );
273
272
  };
274
- })()), _;
273
+ })()), M;
275
274
  }
276
- var F;
277
- function ne() {
278
- return F || (F = 1, process.env.NODE_ENV === "production" ? R.exports = re() : R.exports = te()), R.exports;
275
+ var te;
276
+ function le() {
277
+ return te || (te = 1, process.env.NODE_ENV === "production" ? I.exports = ne() : I.exports = ae()), I.exports;
279
278
  }
280
- var ae = ne();
281
- const le = ({
282
- variant: l = "primary",
279
+ var e = le();
280
+ const de = ({
281
+ variant: s = "primary",
282
+ size: l = "md",
283
+ fullWidth: n = !1,
284
+ icon: r,
285
+ iconPosition: a = "left",
286
+ loading: c = !1,
287
+ hoverColor: u,
288
+ className: f = "",
289
+ children: m,
290
+ disabled: h,
291
+ ...v
292
+ }) => {
293
+ const p = "inline-flex items-center justify-center font-normal rounded-lg transition-all duration-300 ease-out focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-95", d = {
294
+ primary: "bg-[#EC615B] hover:bg-[#D4554F] text-white focus:ring-[#EC615B] shadow-sm hover:shadow-md",
295
+ outlined: "border border-gray-300 bg-white hover:bg-gray-50 text-[#181918] focus:ring-gray-300",
296
+ ghost: "bg-gray-100 hover:bg-gray-200 text-[#181918] focus:ring-gray-300",
297
+ text: "text-[#181918] hover:bg-gray-100 focus:ring-gray-300"
298
+ }, x = {
299
+ sm: "px-3 py-1.5 text-sm gap-1.5",
300
+ md: "px-4 py-2 text-base gap-2",
301
+ lg: "px-6 py-3 text-lg gap-2.5"
302
+ }, o = n ? "w-full" : "", y = `${p} ${d[s]} ${x[l]} ${o} ${f}`, i = () => c ? /* @__PURE__ */ e.jsxs(
303
+ "svg",
304
+ {
305
+ className: "animate-spin h-4 w-4",
306
+ xmlns: "http://www.w3.org/2000/svg",
307
+ fill: "none",
308
+ viewBox: "0 0 24 24",
309
+ children: [
310
+ /* @__PURE__ */ e.jsx(
311
+ "circle",
312
+ {
313
+ className: "opacity-25",
314
+ cx: "12",
315
+ cy: "12",
316
+ r: "10",
317
+ stroke: "currentColor",
318
+ strokeWidth: "4"
319
+ }
320
+ ),
321
+ /* @__PURE__ */ e.jsx(
322
+ "path",
323
+ {
324
+ className: "opacity-75",
325
+ fill: "currentColor",
326
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
327
+ }
328
+ )
329
+ ]
330
+ }
331
+ ) : r;
332
+ return /* @__PURE__ */ e.jsxs(
333
+ "button",
334
+ {
335
+ className: y,
336
+ disabled: h || c,
337
+ style: u ? {
338
+ "--hover-color": u
339
+ } : void 0,
340
+ onMouseEnter: (k) => {
341
+ u && !h && !c && (k.currentTarget.style.backgroundColor = u);
342
+ },
343
+ onMouseLeave: (k) => {
344
+ u && !h && !c && (k.currentTarget.style.backgroundColor = "");
345
+ },
346
+ ...v,
347
+ children: [
348
+ a === "left" && i(),
349
+ m,
350
+ a === "right" && i()
351
+ ]
352
+ }
353
+ );
354
+ }, ue = ({
355
+ label: s,
356
+ value: l,
357
+ selected: n = !1,
358
+ onClick: r,
359
+ className: a = ""
360
+ }) => {
361
+ const f = `stat-card relative flex flex-col p-4 rounded-lg border transition-all duration-500 ease-in-out cursor-pointer overflow-hidden ${n ? "border-[#181918] bg-[#F4F4F4] shadow-sm scale-[1.02]" : "border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"} ${a}`;
362
+ return /* @__PURE__ */ e.jsxs("div", { className: f, onClick: r, children: [
363
+ n && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-[#EC615B]/5 to-transparent animate-slide-in pointer-events-none" }),
364
+ /* @__PURE__ */ e.jsxs("div", { className: "relative z-10 transition-transform duration-300 ease-out hover:scale-[0.98] active:scale-[0.96]", children: [
365
+ /* @__PURE__ */ e.jsx("span", { className: `text-sm font-normal mb-2 block transition-colors duration-500 ${n ? "text-gray-700" : "text-gray-600"}`, children: s }),
366
+ /* @__PURE__ */ e.jsx("span", { className: `text-3xl font-semibold stat-value block transition-all duration-500 ${n ? "text-[#181918] scale-105" : "text-[#181918]"}`, children: l })
367
+ ] })
368
+ ] });
369
+ }, xe = ({
370
+ icon: s,
371
+ iconPosition: l = "left",
372
+ size: n = "md",
373
+ fullWidth: r = !1,
374
+ className: a = "",
375
+ onIconClick: c,
376
+ ...u
377
+ }) => {
378
+ const f = "relative inline-flex items-center", m = "border border-gray-300 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#EC615B] focus:border-[#EC615B] transition-all duration-200 ease-in-out placeholder:text-gray-400", h = {
379
+ sm: "px-3 py-1.5 text-sm",
380
+ md: "px-4 py-2 text-base",
381
+ lg: "px-5 py-3 text-lg"
382
+ }, v = {
383
+ sm: "w-4 h-4",
384
+ md: "w-5 h-5",
385
+ lg: "w-6 h-6"
386
+ }, p = l === "left" ? n === "sm" ? "pl-9" : n === "md" ? "pl-10" : "pl-12" : n === "sm" ? "pr-9" : n === "md" ? "pr-10" : "pr-12", d = r ? "w-full" : "", x = `${m} ${h[n]} ${s ? p : ""} ${d} ${a}`, o = l === "left" ? "left-3" : "right-3", y = /* @__PURE__ */ e.jsx(
387
+ "svg",
388
+ {
389
+ className: v[n],
390
+ xmlns: "http://www.w3.org/2000/svg",
391
+ fill: "none",
392
+ viewBox: "0 0 24 24",
393
+ stroke: "currentColor",
394
+ children: /* @__PURE__ */ e.jsx(
395
+ "path",
396
+ {
397
+ strokeLinecap: "round",
398
+ strokeLinejoin: "round",
399
+ strokeWidth: 2,
400
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
401
+ }
402
+ )
403
+ }
404
+ );
405
+ return /* @__PURE__ */ e.jsxs("div", { className: `${f} ${d}`, children: [
406
+ s && /* @__PURE__ */ e.jsx(
407
+ "div",
408
+ {
409
+ className: `absolute ${o} text-gray-400 ${c ? "cursor-pointer hover:text-gray-600" : ""}`,
410
+ onClick: c,
411
+ children: s === !0 ? y : s
412
+ }
413
+ ),
414
+ /* @__PURE__ */ e.jsx("input", { type: "text", className: x, ...u })
415
+ ] });
416
+ }, fe = ({
417
+ padding: s = "md",
418
+ shadow: l = "sm",
419
+ hover: n = !1,
420
+ bordered: r = !0,
421
+ rounded: a = "lg",
422
+ className: c = "",
423
+ children: u,
424
+ ...f
425
+ }) => {
426
+ const m = "card bg-white transition-all duration-300 ease-out", h = {
427
+ none: "p-0",
428
+ sm: "p-3",
429
+ md: "p-4",
430
+ lg: "p-6"
431
+ }, v = {
432
+ none: "",
433
+ sm: "shadow-sm",
434
+ md: "shadow-md",
435
+ lg: "shadow-lg"
436
+ }, p = {
437
+ none: "rounded-none",
438
+ sm: "rounded-sm",
439
+ md: "rounded-md",
440
+ lg: "rounded-lg",
441
+ xl: "rounded-xl"
442
+ }, d = r ? "border border-gray-200" : "", x = n ? "cursor-pointer" : "", o = `${m} ${h[s]} ${v[l]} ${p[a]} ${d} ${x} ${c}`;
443
+ return /* @__PURE__ */ e.jsx("div", { className: o, ...f, children: /* @__PURE__ */ e.jsx("div", { className: n ? "transition-transform duration-300 ease-out hover:scale-[0.98] active:scale-[0.96]" : "", children: u }) });
444
+ }, me = ({
445
+ items: s,
446
+ trigger: l = "click",
447
+ placement: n = "bottomLeft",
448
+ children: r,
449
+ className: a = "",
450
+ overlayClassName: c = "",
451
+ disabled: u = !1
452
+ }) => {
453
+ const [f, m] = _(!1), h = J(null);
454
+ z(() => {
455
+ const i = (k) => {
456
+ h.current && !h.current.contains(k.target) && m(!1);
457
+ };
458
+ return f && document.addEventListener("mousedown", i), () => {
459
+ document.removeEventListener("mousedown", i);
460
+ };
461
+ }, [f]);
462
+ const v = () => {
463
+ !u && l === "click" && m(!f);
464
+ }, p = () => {
465
+ !u && l === "hover" && m(!0);
466
+ }, d = () => {
467
+ !u && l === "hover" && m(!1);
468
+ }, x = (i) => {
469
+ !i.disabled && i.onClick && i.onClick(), m(!1);
470
+ }, o = {
471
+ bottomLeft: "top-full left-0 mt-1",
472
+ bottomRight: "top-full right-0 mt-1",
473
+ topLeft: "bottom-full left-0 mb-1",
474
+ topRight: "bottom-full right-0 mb-1"
475
+ }, y = n.startsWith("bottom") ? "dropdown-slide-down" : "dropdown-slide-up";
476
+ return /* @__PURE__ */ e.jsxs(
477
+ "div",
478
+ {
479
+ ref: h,
480
+ className: `relative inline-block ${a}`,
481
+ onMouseEnter: p,
482
+ onMouseLeave: d,
483
+ children: [
484
+ /* @__PURE__ */ e.jsx(
485
+ "div",
486
+ {
487
+ onClick: v,
488
+ className: `inline-flex ${u ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`,
489
+ children: r
490
+ }
491
+ ),
492
+ f && !u && /* @__PURE__ */ e.jsx(
493
+ "div",
494
+ {
495
+ className: `absolute ${o[n]} ${y} z-50 min-w-[160px] ${c}`,
496
+ children: /* @__PURE__ */ e.jsx("div", { className: "dropdown-menu bg-white rounded-lg shadow-lg border border-gray-200 py-1 overflow-hidden", children: s.map((i) => /* @__PURE__ */ e.jsxs(
497
+ "div",
498
+ {
499
+ onClick: () => x(i),
500
+ className: `
501
+ dropdown-menu-item
502
+ flex items-center gap-2 px-4 py-2 text-sm cursor-pointer transition-all duration-200 ease-out
503
+ ${i.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-50"}
504
+ ${i.danger ? "text-red-600 hover:bg-red-50" : "text-gray-700"}
505
+ `,
506
+ children: [
507
+ i.icon && /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0", children: i.icon }),
508
+ /* @__PURE__ */ e.jsx("span", { children: i.label })
509
+ ]
510
+ },
511
+ i.key
512
+ )) })
513
+ }
514
+ )
515
+ ]
516
+ }
517
+ );
518
+ }, oe = ({
519
+ options: s,
520
+ value: l,
521
+ defaultValue: n,
522
+ placeholder: r = "Select an option",
523
+ onChange: a,
524
+ disabled: c = !1,
525
+ size: u = "md",
283
526
  fullWidth: f = !1,
527
+ className: m = "",
528
+ allowClear: h = !1,
529
+ showSearch: v = !1,
530
+ searchPlaceholder: p = "Search..."
531
+ }) => {
532
+ const [d, x] = _(!1), [o, y] = _(
533
+ n
534
+ ), [i, k] = _(""), b = J(null), N = J(null), $ = l !== void 0 ? l : o;
535
+ z(() => {
536
+ const j = (Y) => {
537
+ b.current && !b.current.contains(Y.target) && (x(!1), k(""));
538
+ };
539
+ return d && (document.addEventListener("mousedown", j), v && N.current && N.current.focus()), () => {
540
+ document.removeEventListener("mousedown", j);
541
+ };
542
+ }, [d, v]);
543
+ const R = (j) => {
544
+ l === void 0 && y(j), a == null || a(j), x(!1), k("");
545
+ }, T = (j) => {
546
+ j.stopPropagation(), l === void 0 && y(void 0), a == null || a("");
547
+ }, S = s.find((j) => j.value === $), L = v ? s.filter(
548
+ (j) => j.label.toLowerCase().includes(i.toLowerCase())
549
+ ) : s, P = {
550
+ sm: "px-3 py-1.5 text-sm",
551
+ md: "px-4 py-2 text-base",
552
+ lg: "px-5 py-3 text-lg"
553
+ }, W = f ? "w-full" : "min-w-[200px]", D = /* @__PURE__ */ e.jsx(
554
+ "svg",
555
+ {
556
+ className: `w-4 h-4 transition-transform duration-200 ease-out ${d ? "rotate-180" : ""}`,
557
+ fill: "none",
558
+ stroke: "currentColor",
559
+ viewBox: "0 0 24 24",
560
+ children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
561
+ }
562
+ ), B = /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) });
563
+ return /* @__PURE__ */ e.jsxs("div", { ref: b, className: `relative ${W} ${m}`, children: [
564
+ /* @__PURE__ */ e.jsxs(
565
+ "div",
566
+ {
567
+ onClick: () => !c && x(!d),
568
+ className: `
569
+ select-trigger
570
+ flex items-center justify-between gap-2
571
+ border border-gray-300 rounded-lg
572
+ bg-white
573
+ transition-all duration-200 ease-out
574
+ ${P[u]}
575
+ ${c ? "opacity-50 cursor-not-allowed bg-gray-50" : "cursor-pointer hover:border-gray-400"}
576
+ ${d ? "border-[#EC615B] ring-2 ring-[#EC615B] ring-opacity-20" : ""}
577
+ `,
578
+ children: [
579
+ /* @__PURE__ */ e.jsx("span", { className: S ? "text-gray-900" : "text-gray-400", children: S ? S.label : r }),
580
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
581
+ h && $ && !c && /* @__PURE__ */ e.jsx(
582
+ "span",
583
+ {
584
+ onClick: T,
585
+ className: "text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",
586
+ children: B
587
+ }
588
+ ),
589
+ /* @__PURE__ */ e.jsx("span", { className: "text-gray-400", children: D })
590
+ ] })
591
+ ]
592
+ }
593
+ ),
594
+ d && !c && /* @__PURE__ */ e.jsx("div", { className: "absolute top-full left-0 right-0 mt-1 z-50 dropdown-slide-down", children: /* @__PURE__ */ e.jsxs("div", { className: "select-dropdown bg-white rounded-lg shadow-lg border border-gray-200 py-1 max-h-[300px] overflow-auto", children: [
595
+ v && /* @__PURE__ */ e.jsx("div", { className: "px-2 py-2 border-b border-gray-200", children: /* @__PURE__ */ e.jsx(
596
+ "input",
597
+ {
598
+ ref: N,
599
+ type: "text",
600
+ value: i,
601
+ onChange: (j) => k(j.target.value),
602
+ placeholder: p,
603
+ className: "w-full px-3 py-1.5 text-sm border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-[#EC615B] focus:border-[#EC615B] transition-all duration-200 ease-out",
604
+ onClick: (j) => j.stopPropagation()
605
+ }
606
+ ) }),
607
+ L.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-4 py-3 text-sm text-gray-500 text-center", children: "No results found" }) : L.map((j) => /* @__PURE__ */ e.jsx(
608
+ "div",
609
+ {
610
+ onClick: () => !j.disabled && R(j.value),
611
+ className: `
612
+ select-option
613
+ px-4 py-2 text-sm cursor-pointer transition-all duration-200 ease-out
614
+ ${j.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-50"}
615
+ ${j.value === $ ? "bg-[#FCEAE9] text-[#EC615B] font-medium" : "text-[#181918]"}
616
+ `,
617
+ children: j.label
618
+ },
619
+ j.value
620
+ ))
621
+ ] }) })
622
+ ] });
623
+ }, he = ({
624
+ columns: s,
625
+ dataSource: l,
626
+ rowKey: n = "id",
627
+ pagination: r,
628
+ loading: a = !1,
629
+ onRow: c,
284
630
  className: u = "",
285
- ...c
631
+ bordered: f = !1,
632
+ striped: m = !1
633
+ }) => {
634
+ const [h, v] = _(
635
+ r && typeof r == "object" && r.current || 1
636
+ ), [p, d] = _(
637
+ r && typeof r == "object" && r.pageSize || 10
638
+ ), x = (b, N) => typeof n == "function" ? n(b) : b[n] || String(N), o = (b, N) => N ? N.split(".").reduce(($, R) => $ == null ? void 0 : $[R], b) : b, y = r === !1 ? l : l.slice((h - 1) * p, h * p), i = (b) => {
639
+ v(b), r && typeof r == "object" && r.onChange && r.onChange(b, p);
640
+ }, k = (b) => {
641
+ d(b), v(1), r && typeof r == "object" && r.onChange && r.onChange(1, b);
642
+ };
643
+ return /* @__PURE__ */ e.jsxs("div", { className: "w-full", children: [
644
+ /* @__PURE__ */ e.jsx("div", { className: "overflow-x-auto rounded-2xl border border-[#EEEEEE]", children: /* @__PURE__ */ e.jsxs("table", { className: `w-full ${f ? "border-collapse" : ""} ${u}`, children: [
645
+ /* @__PURE__ */ e.jsx("thead", { className: "bg-[#F5F6F7]", children: /* @__PURE__ */ e.jsx("tr", { children: s.map((b, N) => /* @__PURE__ */ e.jsx(
646
+ "th",
647
+ {
648
+ className: `px-4 py-3 text-left text-xs font-medium text-[#333333] uppercase tracking-wider ${f && N !== s.length - 1 ? "border-r border-[#EEEEEE]" : ""} ${b.align === "center" ? "text-center" : b.align === "right" ? "text-right" : ""}`,
649
+ style: { width: b.width },
650
+ children: b.title
651
+ },
652
+ b.key
653
+ )) }) }),
654
+ /* @__PURE__ */ e.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: a ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx("td", { colSpan: s.length, className: "px-4 py-8 text-center text-[#333333]", children: /* @__PURE__ */ e.jsxs("div", { className: "flex justify-center items-center", children: [
655
+ /* @__PURE__ */ e.jsxs(
656
+ "svg",
657
+ {
658
+ className: "animate-spin h-5 w-5 mr-2",
659
+ xmlns: "http://www.w3.org/2000/svg",
660
+ fill: "none",
661
+ viewBox: "0 0 24 24",
662
+ children: [
663
+ /* @__PURE__ */ e.jsx(
664
+ "circle",
665
+ {
666
+ className: "opacity-25",
667
+ cx: "12",
668
+ cy: "12",
669
+ r: "10",
670
+ stroke: "currentColor",
671
+ strokeWidth: "4"
672
+ }
673
+ ),
674
+ /* @__PURE__ */ e.jsx(
675
+ "path",
676
+ {
677
+ className: "opacity-75",
678
+ fill: "currentColor",
679
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
680
+ }
681
+ )
682
+ ]
683
+ }
684
+ ),
685
+ "Loading..."
686
+ ] }) }) }) : y.length === 0 ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx("td", { colSpan: s.length, className: "px-4 py-8 text-center text-[#333333]", children: "No data" }) }) : y.map((b, N) => {
687
+ const $ = c ? c(b, N) : {};
688
+ return /* @__PURE__ */ e.jsx(
689
+ "tr",
690
+ {
691
+ className: `${m && N % 2 === 1 ? "bg-[#F5F6F7]" : ""} hover:bg-gray-50 transition-colors duration-200 ease-out`,
692
+ ...$,
693
+ children: s.map((R, T) => {
694
+ const S = o(b, R.dataIndex), L = R.render ? R.render(S, b, N) : S;
695
+ return /* @__PURE__ */ e.jsx(
696
+ "td",
697
+ {
698
+ className: `px-4 py-4 text-sm text-gray-900 ${f && T !== s.length - 1 ? "border-r border-[#EEEEEE]" : ""} ${R.align === "center" ? "text-center" : R.align === "right" ? "text-right" : ""}`,
699
+ children: L
700
+ },
701
+ R.key
702
+ );
703
+ })
704
+ },
705
+ x(b, N)
706
+ );
707
+ }) })
708
+ ] }) }),
709
+ r !== !1 && /* @__PURE__ */ e.jsx(
710
+ ie,
711
+ {
712
+ current: h,
713
+ pageSize: p,
714
+ total: l.length,
715
+ onChange: i,
716
+ onPageSizeChange: k,
717
+ showSizeChanger: r && typeof r == "object" ? r.showSizeChanger : !0,
718
+ pageSizeOptions: r && typeof r == "object" ? r.pageSizeOptions : [10, 20, 50, 100],
719
+ showTotal: r && typeof r == "object" ? r.showTotal : !0,
720
+ size: r && typeof r == "object" ? r.size : "md"
721
+ }
722
+ )
723
+ ] });
724
+ }, ie = ({
725
+ current: s,
726
+ pageSize: l,
727
+ total: n,
728
+ onChange: r,
729
+ onPageSizeChange: a,
730
+ showSizeChanger: c = !0,
731
+ pageSizeOptions: u = [10, 20, 50, 100],
732
+ showTotal: f = !0,
733
+ size: m = "md"
734
+ }) => {
735
+ const h = Math.ceil(n / l), v = (s - 1) * l + 1, p = Math.min(s * l, n), d = {
736
+ sm: {
737
+ button: "px-2.5 py-1 text-xs",
738
+ icon: "h-3.5 w-3.5",
739
+ nav: "px-1.5 py-1.5"
740
+ },
741
+ md: {
742
+ button: "px-4 py-2 text-sm",
743
+ icon: "h-5 w-5",
744
+ nav: "px-2 py-2"
745
+ },
746
+ lg: {
747
+ button: "px-5 py-2.5 text-base",
748
+ icon: "h-6 w-6",
749
+ nav: "px-3 py-3"
750
+ }
751
+ }, x = () => {
752
+ const o = [];
753
+ if (h <= 7)
754
+ for (let i = 1; i <= h; i++)
755
+ o.push(i);
756
+ else if (s <= 3) {
757
+ for (let i = 1; i <= 5; i++) o.push(i);
758
+ o.push("..."), o.push(h);
759
+ } else if (s >= h - 2) {
760
+ o.push(1), o.push("...");
761
+ for (let i = h - 4; i <= h; i++) o.push(i);
762
+ } else {
763
+ o.push(1), o.push("...");
764
+ for (let i = s - 1; i <= s + 1; i++) o.push(i);
765
+ o.push("..."), o.push(h);
766
+ }
767
+ return o;
768
+ };
769
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-t border-[#EEEEEE] sm:px-6 mt-4", children: [
770
+ f && /* @__PURE__ */ e.jsxs("div", { className: "text-sm text-[#181918]", children: [
771
+ v,
772
+ "-",
773
+ p,
774
+ " of ",
775
+ n,
776
+ " items"
777
+ ] }),
778
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
779
+ c && /* @__PURE__ */ e.jsx(
780
+ oe,
781
+ {
782
+ value: l.toString(),
783
+ onChange: (o) => a(Number(o)),
784
+ options: u.map((o) => ({
785
+ value: o.toString(),
786
+ label: `${o} / page`
787
+ })),
788
+ size: "sm",
789
+ className: "w-32"
790
+ }
791
+ ),
792
+ /* @__PURE__ */ e.jsxs("nav", { className: "inline-flex gap-1 items-center", "aria-label": "Pagination", children: [
793
+ /* @__PURE__ */ e.jsx(
794
+ "button",
795
+ {
796
+ onClick: () => r(s - 1),
797
+ disabled: s === 1,
798
+ className: `relative inline-flex items-center justify-center rounded-md ${d[m].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,
799
+ children: /* @__PURE__ */ e.jsx("svg", { className: d[m].icon, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ e.jsx(
800
+ "path",
801
+ {
802
+ strokeLinecap: "round",
803
+ strokeLinejoin: "round",
804
+ strokeWidth: 2,
805
+ d: "M15 19l-7-7 7-7"
806
+ }
807
+ ) })
808
+ }
809
+ ),
810
+ x().map((o, y) => o === "..." ? /* @__PURE__ */ e.jsx(
811
+ "span",
812
+ {
813
+ className: `relative inline-flex items-center justify-center ${d[m].button} font-normal text-[#181918]`,
814
+ children: "..."
815
+ },
816
+ `ellipsis-${y}`
817
+ ) : /* @__PURE__ */ e.jsx(
818
+ "button",
819
+ {
820
+ onClick: () => r(o),
821
+ className: `relative inline-flex items-center justify-center rounded-md ${d[m].button} font-medium transition-all duration-300 ease-out focus:z-20 hover:scale-105 active:scale-95 ${s === o ? "bg-[#EC615B] text-white shadow-sm" : "text-[#181918] hover:bg-gray-100"}`,
822
+ children: o
823
+ },
824
+ o
825
+ )),
826
+ /* @__PURE__ */ e.jsx(
827
+ "button",
828
+ {
829
+ onClick: () => r(s + 1),
830
+ disabled: s === h,
831
+ className: `relative inline-flex items-center justify-center rounded-md ${d[m].nav} text-[#181918] hover:bg-gray-100 focus:z-20 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-all duration-300 ease-out hover:scale-110 active:scale-95`,
832
+ children: /* @__PURE__ */ e.jsx("svg", { className: d[m].icon, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ e.jsx(
833
+ "path",
834
+ {
835
+ strokeLinecap: "round",
836
+ strokeLinejoin: "round",
837
+ strokeWidth: 2,
838
+ d: "M9 5l7 7-7 7"
839
+ }
840
+ ) })
841
+ }
842
+ )
843
+ ] })
844
+ ] })
845
+ ] });
846
+ }, ge = ({
847
+ title: s,
848
+ description: l,
849
+ searchPlaceholder: n = "Search...",
850
+ onSearch: r,
851
+ actions: a,
852
+ filters: c,
853
+ className: u = ""
854
+ }) => {
855
+ const f = (m) => {
856
+ r == null || r(m.target.value);
857
+ };
858
+ return /* @__PURE__ */ e.jsxs("div", { className: `space-y-4 mb-4 ${u}`, children: [
859
+ (s || l) && /* @__PURE__ */ e.jsxs("div", { children: [
860
+ s && /* @__PURE__ */ e.jsx("h2", { className: "text-xl font-semibold text-gray-900", children: s }),
861
+ l && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 mt-1", children: l })
862
+ ] }),
863
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
864
+ r && /* @__PURE__ */ e.jsx("div", { className: "flex-1 max-w-md", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
865
+ /* @__PURE__ */ e.jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ e.jsx(
866
+ "svg",
867
+ {
868
+ className: "h-5 w-5 text-gray-400",
869
+ fill: "none",
870
+ stroke: "currentColor",
871
+ viewBox: "0 0 24 24",
872
+ children: /* @__PURE__ */ e.jsx(
873
+ "path",
874
+ {
875
+ strokeLinecap: "round",
876
+ strokeLinejoin: "round",
877
+ strokeWidth: 2,
878
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
879
+ }
880
+ )
881
+ }
882
+ ) }),
883
+ /* @__PURE__ */ e.jsx(
884
+ "input",
885
+ {
886
+ type: "text",
887
+ placeholder: n,
888
+ onChange: f,
889
+ className: "block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"
890
+ }
891
+ )
892
+ ] }) }),
893
+ a && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: a })
894
+ ] }),
895
+ c && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: c })
896
+ ] });
897
+ }, pe = ({
898
+ open: s,
899
+ onClose: l,
900
+ title: n,
901
+ children: r,
902
+ footer: a,
903
+ width: c = "520px",
904
+ closable: u = !0,
905
+ maskClosable: f = !0,
906
+ centered: m = !0,
907
+ className: h = ""
286
908
  }) => {
287
- const o = {
288
- primary: "bg-blue-500 hover:bg-blue-600 border-blue-500",
289
- secondary: "bg-gray-500 hover:bg-gray-600 border-gray-500",
290
- success: "bg-green-500 hover:bg-green-600 border-green-500",
291
- danger: "bg-red-500 hover:bg-red-600 border-red-500"
292
- }, s = f ? "w-full" : "", i = `${o[l]} ${s} ${u}`;
293
- return /* @__PURE__ */ ae.jsx(
294
- ee,
909
+ const [v, p] = _(!1), [d, x] = _(!1);
910
+ if (z(() => {
911
+ if (s)
912
+ p(!0), setTimeout(() => x(!0), 10), document.body.style.overflow = "hidden";
913
+ else {
914
+ x(!1);
915
+ const i = setTimeout(() => {
916
+ p(!1);
917
+ }, 200);
918
+ return document.body.style.overflow = "unset", () => clearTimeout(i);
919
+ }
920
+ }, [s]), z(() => {
921
+ const i = (k) => {
922
+ k.key === "Escape" && u && s && l();
923
+ };
924
+ return s && document.addEventListener("keydown", i), () => {
925
+ document.removeEventListener("keydown", i);
926
+ };
927
+ }, [s, l, u]), !v) return null;
928
+ const o = () => {
929
+ f && l();
930
+ }, y = (i) => {
931
+ i.stopPropagation();
932
+ };
933
+ return /* @__PURE__ */ e.jsxs(
934
+ "div",
295
935
  {
296
- type: "primary",
297
- className: i,
298
- ...c
936
+ className: "fixed inset-0 z-50 overflow-y-auto",
937
+ onClick: o,
938
+ children: [
939
+ /* @__PURE__ */ e.jsx(
940
+ "div",
941
+ {
942
+ className: `fixed inset-0 bg-black transition-opacity duration-200 ease-out ${d ? "opacity-50" : "opacity-0"}`
943
+ }
944
+ ),
945
+ /* @__PURE__ */ e.jsx("div", { className: `flex min-h-full items-center justify-center p-4 ${m ? "items-center" : "items-start pt-20"}`, children: /* @__PURE__ */ e.jsxs(
946
+ "div",
947
+ {
948
+ className: `relative bg-white rounded-lg shadow-xl transition-all duration-200 ease-out ${d ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 -translate-y-4"} ${h}`,
949
+ style: { width: c, maxWidth: "90vw" },
950
+ onClick: y,
951
+ children: [
952
+ (n || u) && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-200", children: [
953
+ n && /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900", children: n }),
954
+ u && /* @__PURE__ */ e.jsx(
955
+ "button",
956
+ {
957
+ onClick: l,
958
+ className: "text-gray-400 hover:text-gray-600 transition-colors duration-200 ease-out",
959
+ children: /* @__PURE__ */ e.jsx(
960
+ "svg",
961
+ {
962
+ className: "w-5 h-5",
963
+ fill: "none",
964
+ stroke: "currentColor",
965
+ viewBox: "0 0 24 24",
966
+ children: /* @__PURE__ */ e.jsx(
967
+ "path",
968
+ {
969
+ strokeLinecap: "round",
970
+ strokeLinejoin: "round",
971
+ strokeWidth: 2,
972
+ d: "M6 18L18 6M6 6l12 12"
973
+ }
974
+ )
975
+ }
976
+ )
977
+ }
978
+ )
979
+ ] }),
980
+ /* @__PURE__ */ e.jsx("div", { className: "px-6 py-4 max-h-[70vh] overflow-y-auto", children: r }),
981
+ a && /* @__PURE__ */ e.jsx("div", { className: "px-6 py-4 border-t border-gray-200 flex justify-end gap-2", children: a })
982
+ ]
983
+ }
984
+ ) })
985
+ ]
299
986
  }
300
987
  );
301
- };
988
+ }, ve = ({
989
+ children: s,
990
+ variant: l = "default",
991
+ size: n = "md",
992
+ dot: r = !1,
993
+ icon: a,
994
+ iconPosition: c = "left",
995
+ className: u = ""
996
+ }) => {
997
+ const f = {
998
+ default: "bg-gray-100 text-[#181918]",
999
+ primary: "bg-[#FCEAE9] text-[#EC615B]",
1000
+ success: "bg-green-100 text-green-800",
1001
+ warning: "bg-yellow-100 text-yellow-800",
1002
+ danger: "bg-red-100 text-red-800",
1003
+ info: "bg-cyan-100 text-cyan-800"
1004
+ }, m = {
1005
+ sm: "px-2 py-0.5 text-xs",
1006
+ md: "px-2.5 py-1 text-sm",
1007
+ lg: "px-3 py-1.5 text-base"
1008
+ }, h = {
1009
+ sm: "w-1.5 h-1.5",
1010
+ md: "w-2 h-2",
1011
+ lg: "w-2.5 h-2.5"
1012
+ }, v = {
1013
+ default: "bg-gray-600",
1014
+ primary: "bg-[#EC615B]",
1015
+ success: "bg-green-600",
1016
+ warning: "bg-yellow-600",
1017
+ danger: "bg-red-600",
1018
+ info: "bg-cyan-600"
1019
+ }, p = {
1020
+ sm: "w-3 h-3",
1021
+ md: "w-3.5 h-3.5",
1022
+ lg: "w-4 h-4"
1023
+ };
1024
+ return /* @__PURE__ */ e.jsxs(
1025
+ "span",
1026
+ {
1027
+ className: `inline-flex items-center gap-1.5 font-medium rounded-full transition-all duration-200 ${f[l]} ${m[n]} ${u}`,
1028
+ children: [
1029
+ r && /* @__PURE__ */ e.jsx("span", { className: `rounded-full ${h[n]} ${v[l]}` }),
1030
+ a && c === "left" && /* @__PURE__ */ e.jsx("span", { className: `inline-flex items-center ${p[n]}`, children: a }),
1031
+ s,
1032
+ a && c === "right" && /* @__PURE__ */ e.jsx("span", { className: `inline-flex items-center ${p[n]}`, children: a })
1033
+ ]
1034
+ }
1035
+ );
1036
+ }, be = ({
1037
+ items: s,
1038
+ current: l = 0,
1039
+ direction: n = "vertical",
1040
+ size: r = "md",
1041
+ variant: a = "default",
1042
+ className: c = ""
1043
+ }) => {
1044
+ const u = (d, x) => x.status ? x.status : d < l ? "finish" : d === l ? "process" : "wait", f = {
1045
+ sm: "w-6 h-6",
1046
+ md: "w-8 h-8",
1047
+ lg: "w-10 h-10"
1048
+ }, m = {
1049
+ sm: "text-sm",
1050
+ md: "text-base",
1051
+ lg: "text-lg"
1052
+ }, h = {
1053
+ sm: "text-xs",
1054
+ md: "text-sm",
1055
+ lg: "text-base"
1056
+ }, v = (d, x) => x || (d === "finish" ? /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx(
1057
+ "path",
1058
+ {
1059
+ fillRule: "evenodd",
1060
+ d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
1061
+ clipRule: "evenodd"
1062
+ }
1063
+ ) }) : d === "error" ? /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx(
1064
+ "path",
1065
+ {
1066
+ fillRule: "evenodd",
1067
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
1068
+ clipRule: "evenodd"
1069
+ }
1070
+ ) }) : null), p = (d) => {
1071
+ const x = a === "outline";
1072
+ switch (d) {
1073
+ case "finish":
1074
+ return {
1075
+ icon: x ? "bg-white text-green-500 border-green-500" : "bg-green-500 text-white border-green-500",
1076
+ title: "text-[#181918]",
1077
+ description: "text-gray-600",
1078
+ line: "bg-green-500"
1079
+ };
1080
+ case "process":
1081
+ return {
1082
+ icon: x ? "bg-white text-[#EC615B] border-[#EC615B]" : "bg-[#EC615B] text-white border-[#EC615B]",
1083
+ title: "text-[#181918] font-semibold",
1084
+ description: "text-gray-700",
1085
+ line: "bg-gray-300"
1086
+ };
1087
+ case "error":
1088
+ return {
1089
+ icon: x ? "bg-white text-red-500 border-red-500" : "bg-red-500 text-white border-red-500",
1090
+ title: "text-red-600",
1091
+ description: "text-red-500",
1092
+ line: "bg-gray-300"
1093
+ };
1094
+ default:
1095
+ return {
1096
+ icon: "bg-white text-gray-400 border-gray-300",
1097
+ title: "text-gray-500",
1098
+ description: "text-gray-400",
1099
+ line: "bg-gray-300"
1100
+ };
1101
+ }
1102
+ };
1103
+ return n === "horizontal" ? /* @__PURE__ */ e.jsx("div", { className: `flex items-start ${c}`, children: s.map((d, x) => {
1104
+ const o = u(x, d), y = p(o), i = x === s.length - 1;
1105
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-start", children: [
1106
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center", children: [
1107
+ /* @__PURE__ */ e.jsx(
1108
+ "div",
1109
+ {
1110
+ className: `flex items-center justify-center ${f[r]} rounded-full border transition-all duration-300 ${y.icon}`,
1111
+ children: v(o, d.icon)
1112
+ }
1113
+ ),
1114
+ /* @__PURE__ */ e.jsxs("div", { className: "mt-2 text-center", children: [
1115
+ /* @__PURE__ */ e.jsx(
1116
+ "div",
1117
+ {
1118
+ className: `${m[r]} ${y.title} transition-colors duration-300`,
1119
+ children: d.title
1120
+ }
1121
+ ),
1122
+ d.description && /* @__PURE__ */ e.jsx(
1123
+ "div",
1124
+ {
1125
+ className: `${h[r]} ${y.description} mt-1 transition-colors duration-300`,
1126
+ children: d.description
1127
+ }
1128
+ )
1129
+ ] })
1130
+ ] }),
1131
+ !i && /* @__PURE__ */ e.jsx(
1132
+ "div",
1133
+ {
1134
+ className: `flex-1 h-0.5 mt-4 mx-2 ${y.line} transition-colors duration-300`
1135
+ }
1136
+ )
1137
+ ] }, x);
1138
+ }) }) : /* @__PURE__ */ e.jsx("div", { className: `flex flex-col ${c}`, children: s.map((d, x) => {
1139
+ const o = u(x, d), y = p(o), i = x === s.length - 1;
1140
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex", children: [
1141
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center mr-4", children: [
1142
+ /* @__PURE__ */ e.jsx(
1143
+ "div",
1144
+ {
1145
+ className: `flex items-center justify-center ${f[r]} rounded-full border transition-all duration-300 ${y.icon}`,
1146
+ children: v(o, d.icon)
1147
+ }
1148
+ ),
1149
+ !i && /* @__PURE__ */ e.jsx(
1150
+ "div",
1151
+ {
1152
+ className: `w-0.5 flex-1 my-1 ${y.line} transition-colors duration-300`,
1153
+ style: { minHeight: "20px" }
1154
+ }
1155
+ )
1156
+ ] }),
1157
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 pb-6", children: [
1158
+ /* @__PURE__ */ e.jsx(
1159
+ "div",
1160
+ {
1161
+ className: `${m[r]} ${y.title} transition-colors duration-300`,
1162
+ children: d.title
1163
+ }
1164
+ ),
1165
+ d.description && /* @__PURE__ */ e.jsx(
1166
+ "div",
1167
+ {
1168
+ className: `${h[r]} ${y.description} mt-1 transition-colors duration-300`,
1169
+ children: d.description
1170
+ }
1171
+ )
1172
+ ] })
1173
+ ] }, x);
1174
+ }) });
1175
+ }, ye = ({
1176
+ percent: s = 0,
1177
+ status: l = "normal",
1178
+ showInfo: n = !0,
1179
+ strokeColor: r,
1180
+ strokeWidth: a,
1181
+ size: c = "md",
1182
+ className: u = "",
1183
+ format: f
1184
+ }) => {
1185
+ const m = Math.min(100, Math.max(0, s)), h = {
1186
+ sm: "h-1.5",
1187
+ md: "h-2",
1188
+ lg: "h-3"
1189
+ }, v = {
1190
+ sm: "text-xs",
1191
+ md: "text-sm",
1192
+ lg: "text-base"
1193
+ }, p = () => {
1194
+ if (r) return r;
1195
+ switch (l) {
1196
+ case "success":
1197
+ return "bg-green-500";
1198
+ case "exception":
1199
+ return "bg-red-500";
1200
+ case "active":
1201
+ return "bg-[#EC615B]";
1202
+ default:
1203
+ return m === 100 ? "bg-green-500" : "bg-[#EC615B]";
1204
+ }
1205
+ }, d = () => l === "success" || m === 100 ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 text-green-500", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx(
1206
+ "path",
1207
+ {
1208
+ fillRule: "evenodd",
1209
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
1210
+ clipRule: "evenodd"
1211
+ }
1212
+ ) }) : l === "exception" ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 text-red-500", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx(
1213
+ "path",
1214
+ {
1215
+ fillRule: "evenodd",
1216
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
1217
+ clipRule: "evenodd"
1218
+ }
1219
+ ) }) : null, x = () => f ? f(m) : `${Math.round(m)}%`, o = a ? `${a}px` : void 0;
1220
+ return /* @__PURE__ */ e.jsxs("div", { className: `flex items-center gap-2 ${u}`, children: [
1221
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: /* @__PURE__ */ e.jsx(
1222
+ "div",
1223
+ {
1224
+ className: `w-full bg-gray-200 rounded-full overflow-hidden ${h[c]}`,
1225
+ style: { height: o },
1226
+ children: /* @__PURE__ */ e.jsx(
1227
+ "div",
1228
+ {
1229
+ className: `${p()} ${h[c]} rounded-full transition-all duration-300 ease-out ${l === "active" ? "progress-active" : ""}`,
1230
+ style: {
1231
+ width: `${m}%`,
1232
+ height: o
1233
+ }
1234
+ }
1235
+ )
1236
+ }
1237
+ ) }),
1238
+ n && /* @__PURE__ */ e.jsx("div", { className: `flex items-center gap-1 ${v[c]} text-gray-600 font-normal`, children: d() || x() })
1239
+ ] });
1240
+ }, je = ({
1241
+ checked: s,
1242
+ defaultChecked: l = !1,
1243
+ onChange: n,
1244
+ disabled: r = !1,
1245
+ indeterminate: a = !1,
1246
+ size: c = "md",
1247
+ variant: u = "filled",
1248
+ className: f = "",
1249
+ id: m,
1250
+ name: h,
1251
+ value: v
1252
+ }) => {
1253
+ const [p, d] = _(l), x = s !== void 0, o = x ? s : p, y = (R) => {
1254
+ if (r) return;
1255
+ const T = R.target.checked;
1256
+ x || d(T), n == null || n(T);
1257
+ }, i = {
1258
+ sm: "w-4 h-4",
1259
+ md: "w-5 h-5",
1260
+ lg: "w-6 h-6"
1261
+ }, k = {
1262
+ sm: "w-3 h-3",
1263
+ md: "w-3.5 h-3.5",
1264
+ lg: "w-4 h-4"
1265
+ }, b = u === "filled", N = () => r ? "cursor-not-allowed opacity-50 border-gray-300 bg-gray-100" : b ? !o && !a ? "border-gray-300 bg-white hover:border-gray-400" : "border-[#EC615B] bg-[#EC615B] hover:bg-[#D4554F] hover:border-[#D4554F]" : !o && !a ? "border-gray-300 bg-white hover:border-gray-400" : "border-[#EC615B] bg-white hover:border-[#D4554F]", $ = () => b ? "text-white" : "text-[#EC615B]";
1266
+ return /* @__PURE__ */ e.jsxs("div", { className: "inline-flex items-center", children: [
1267
+ /* @__PURE__ */ e.jsx(
1268
+ "input",
1269
+ {
1270
+ type: "checkbox",
1271
+ id: m,
1272
+ name: h,
1273
+ value: v,
1274
+ checked: o,
1275
+ onChange: y,
1276
+ disabled: r,
1277
+ className: "sr-only"
1278
+ }
1279
+ ),
1280
+ /* @__PURE__ */ e.jsxs(
1281
+ "label",
1282
+ {
1283
+ htmlFor: m,
1284
+ className: `
1285
+ relative flex items-center justify-center
1286
+ ${i[c]}
1287
+ ${u === "outline" ? "border" : "border-2"}
1288
+ rounded
1289
+ transition-all duration-200 ease-out
1290
+ cursor-pointer
1291
+ ${N()}
1292
+ ${f}
1293
+ `,
1294
+ children: [
1295
+ o && !a && /* @__PURE__ */ e.jsx(
1296
+ "svg",
1297
+ {
1298
+ className: `${k[c]} ${$()}`,
1299
+ fill: "none",
1300
+ stroke: "currentColor",
1301
+ viewBox: "0 0 24 24",
1302
+ strokeWidth: 3,
1303
+ children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
1304
+ }
1305
+ ),
1306
+ a && /* @__PURE__ */ e.jsx(
1307
+ "svg",
1308
+ {
1309
+ className: `${k[c]} ${$()}`,
1310
+ fill: "currentColor",
1311
+ viewBox: "0 0 24 24",
1312
+ children: /* @__PURE__ */ e.jsx("rect", { x: "4", y: "11", width: "16", height: "2", rx: "1" })
1313
+ }
1314
+ )
1315
+ ]
1316
+ }
1317
+ )
1318
+ ] });
1319
+ }, we = ({
1320
+ items: s,
1321
+ onRemove: l,
1322
+ emptyMessage: n = "No items selected",
1323
+ className: r = "",
1324
+ itemClassName: a = "",
1325
+ maxHeight: c = "300px"
1326
+ }) => s.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: `text-center py-8 text-gray-500 text-sm ${r}`, children: n }) : /* @__PURE__ */ e.jsx(
1327
+ "div",
1328
+ {
1329
+ className: `space-y-2 overflow-y-auto ${r}`,
1330
+ style: { maxHeight: c },
1331
+ children: s.map((u, f) => /* @__PURE__ */ e.jsxs(
1332
+ "div",
1333
+ {
1334
+ className: `
1335
+ group flex items-center justify-between
1336
+ bg-[#F4F4F4] rounded-lg px-4 py-3
1337
+ transition-all duration-300 ease-out
1338
+ hover:bg-[#EBEBEB] hover:shadow-sm
1339
+ animate-slide-in-item
1340
+ ${a}
1341
+ `,
1342
+ style: {
1343
+ animationDelay: `${f * 50}ms`
1344
+ },
1345
+ children: [
1346
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
1347
+ u.sublabel && /* @__PURE__ */ e.jsx("div", { className: "text-xs text-gray-500 font-normal mb-0.5", children: u.sublabel }),
1348
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm font-medium text-[#181918] truncate", children: u.label })
1349
+ ] }),
1350
+ /* @__PURE__ */ e.jsx(
1351
+ "button",
1352
+ {
1353
+ onClick: () => l(u.id),
1354
+ className: `
1355
+ ml-3 flex-shrink-0
1356
+ w-6 h-6 rounded-full
1357
+ flex items-center justify-center
1358
+ text-gray-400
1359
+ transition-all duration-200 ease-out
1360
+ hover:bg-white hover:text-[#EC615B] hover:scale-110
1361
+ active:scale-95
1362
+ focus:outline-none focus:ring-2 focus:ring-[#EC615B] focus:ring-opacity-50
1363
+ `,
1364
+ "aria-label": `Remove ${u.label}`,
1365
+ children: /* @__PURE__ */ e.jsx(
1366
+ "svg",
1367
+ {
1368
+ className: "w-4 h-4",
1369
+ fill: "none",
1370
+ stroke: "currentColor",
1371
+ viewBox: "0 0 24 24",
1372
+ children: /* @__PURE__ */ e.jsx(
1373
+ "path",
1374
+ {
1375
+ strokeLinecap: "round",
1376
+ strokeLinejoin: "round",
1377
+ strokeWidth: 2,
1378
+ d: "M6 18L18 6M6 6l12 12"
1379
+ }
1380
+ )
1381
+ }
1382
+ )
1383
+ }
1384
+ )
1385
+ ]
1386
+ },
1387
+ u.id
1388
+ ))
1389
+ }
1390
+ );
302
1391
  export {
303
- le as Button
1392
+ ve as Badge,
1393
+ de as Button,
1394
+ fe as Card,
1395
+ je as Checkbox,
1396
+ me as Dropdown,
1397
+ pe as Modal,
1398
+ ye as Progress,
1399
+ xe as SearchInput,
1400
+ oe as Select,
1401
+ we as SelectedItemsList,
1402
+ ue as StatCard,
1403
+ be as Steps,
1404
+ he as Table,
1405
+ ge as TableTop
304
1406
  };
305
1407
  //# sourceMappingURL=index.mjs.map