asterui 0.12.14 → 0.12.16

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 (159) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Autocomplete.d.ts +22 -2
  3. package/dist/components/Button.d.ts +10 -5
  4. package/dist/components/Form.d.ts +11 -1
  5. package/dist/components/HoverGallery.d.ts +10 -0
  6. package/dist/components/Rating.d.ts +12 -4
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.js +156 -154
  9. package/dist/index.js.map +1 -1
  10. package/dist/index100.js +11 -43
  11. package/dist/index100.js.map +1 -1
  12. package/dist/index101.js +44 -11
  13. package/dist/index101.js.map +1 -1
  14. package/dist/index102.js +10 -12
  15. package/dist/index102.js.map +1 -1
  16. package/dist/index103.js +14 -7
  17. package/dist/index103.js.map +1 -1
  18. package/dist/index104.js +7 -12
  19. package/dist/index104.js.map +1 -1
  20. package/dist/index105.js +11 -29
  21. package/dist/index105.js.map +1 -1
  22. package/dist/index106.js +29 -16
  23. package/dist/index106.js.map +1 -1
  24. package/dist/index107.js +21 -0
  25. package/dist/index107.js.map +1 -0
  26. package/dist/index21.js +1 -1
  27. package/dist/index34.js +133 -119
  28. package/dist/index34.js.map +1 -1
  29. package/dist/index37.js +15 -120
  30. package/dist/index37.js.map +1 -1
  31. package/dist/index38.js +119 -37
  32. package/dist/index38.js.map +1 -1
  33. package/dist/index39.js +40 -398
  34. package/dist/index39.js.map +1 -1
  35. package/dist/index40.js +390 -89
  36. package/dist/index40.js.map +1 -1
  37. package/dist/index41.js +90 -215
  38. package/dist/index41.js.map +1 -1
  39. package/dist/index42.js +211 -135
  40. package/dist/index42.js.map +1 -1
  41. package/dist/index43.js +155 -15
  42. package/dist/index43.js.map +1 -1
  43. package/dist/index44.js +15 -17
  44. package/dist/index44.js.map +1 -1
  45. package/dist/index45.js +17 -21
  46. package/dist/index45.js.map +1 -1
  47. package/dist/index46.js +18 -134
  48. package/dist/index46.js.map +1 -1
  49. package/dist/index47.js +134 -10
  50. package/dist/index47.js.map +1 -1
  51. package/dist/index48.js +13 -35
  52. package/dist/index48.js.map +1 -1
  53. package/dist/index49.js +35 -34
  54. package/dist/index49.js.map +1 -1
  55. package/dist/index5.js +161 -80
  56. package/dist/index5.js.map +1 -1
  57. package/dist/index50.js +34 -81
  58. package/dist/index50.js.map +1 -1
  59. package/dist/index51.js +71 -166
  60. package/dist/index51.js.map +1 -1
  61. package/dist/index52.js +167 -144
  62. package/dist/index52.js.map +1 -1
  63. package/dist/index53.js +152 -11
  64. package/dist/index53.js.map +1 -1
  65. package/dist/index54.js +10 -20
  66. package/dist/index54.js.map +1 -1
  67. package/dist/index55.js +22 -14
  68. package/dist/index55.js.map +1 -1
  69. package/dist/index56.js +14 -7
  70. package/dist/index56.js.map +1 -1
  71. package/dist/index57.js +6 -333
  72. package/dist/index57.js.map +1 -1
  73. package/dist/index58.js +334 -47
  74. package/dist/index58.js.map +1 -1
  75. package/dist/index59.js +47 -122
  76. package/dist/index59.js.map +1 -1
  77. package/dist/index60.js +120 -108
  78. package/dist/index60.js.map +1 -1
  79. package/dist/index61.js +107 -167
  80. package/dist/index61.js.map +1 -1
  81. package/dist/index62.js +167 -29
  82. package/dist/index62.js.map +1 -1
  83. package/dist/index63.js +30 -120
  84. package/dist/index63.js.map +1 -1
  85. package/dist/index64.js +116 -80
  86. package/dist/index64.js.map +1 -1
  87. package/dist/index65.js +85 -19
  88. package/dist/index65.js.map +1 -1
  89. package/dist/index66.js +19 -73
  90. package/dist/index66.js.map +1 -1
  91. package/dist/index67.js +71 -54
  92. package/dist/index67.js.map +1 -1
  93. package/dist/index68.js +56 -44
  94. package/dist/index68.js.map +1 -1
  95. package/dist/index69.js +42 -49
  96. package/dist/index69.js.map +1 -1
  97. package/dist/index70.js +52 -62
  98. package/dist/index70.js.map +1 -1
  99. package/dist/index71.js +118 -102
  100. package/dist/index71.js.map +1 -1
  101. package/dist/index72.js +107 -41
  102. package/dist/index72.js.map +1 -1
  103. package/dist/index73.js +41 -68
  104. package/dist/index73.js.map +1 -1
  105. package/dist/index74.js +66 -19
  106. package/dist/index74.js.map +1 -1
  107. package/dist/index75.js +18 -55
  108. package/dist/index75.js.map +1 -1
  109. package/dist/index76.js +55 -251
  110. package/dist/index76.js.map +1 -1
  111. package/dist/index77.js +254 -22
  112. package/dist/index77.js.map +1 -1
  113. package/dist/index78.js +22 -31
  114. package/dist/index78.js.map +1 -1
  115. package/dist/index79.js +30 -93
  116. package/dist/index79.js.map +1 -1
  117. package/dist/index80.js +89 -324
  118. package/dist/index80.js.map +1 -1
  119. package/dist/index81.js +322 -73
  120. package/dist/index81.js.map +1 -1
  121. package/dist/index82.js +79 -39
  122. package/dist/index82.js.map +1 -1
  123. package/dist/index83.js +40 -23
  124. package/dist/index83.js.map +1 -1
  125. package/dist/index84.js +21 -93
  126. package/dist/index84.js.map +1 -1
  127. package/dist/index85.js +87 -148
  128. package/dist/index85.js.map +1 -1
  129. package/dist/index86.js +147 -152
  130. package/dist/index86.js.map +1 -1
  131. package/dist/index87.js +159 -63
  132. package/dist/index87.js.map +1 -1
  133. package/dist/index88.js +65 -35
  134. package/dist/index88.js.map +1 -1
  135. package/dist/index89.js +35 -234
  136. package/dist/index89.js.map +1 -1
  137. package/dist/index9.js +55 -53
  138. package/dist/index9.js.map +1 -1
  139. package/dist/index90.js +231 -31
  140. package/dist/index90.js.map +1 -1
  141. package/dist/index91.js +34 -210
  142. package/dist/index91.js.map +1 -1
  143. package/dist/index92.js +195 -198
  144. package/dist/index92.js.map +1 -1
  145. package/dist/index93.js +159 -241
  146. package/dist/index93.js.map +1 -1
  147. package/dist/index94.js +283 -166
  148. package/dist/index94.js.map +1 -1
  149. package/dist/index95.js +173 -253
  150. package/dist/index95.js.map +1 -1
  151. package/dist/index96.js +258 -14
  152. package/dist/index96.js.map +1 -1
  153. package/dist/index97.js +12 -31
  154. package/dist/index97.js.map +1 -1
  155. package/dist/index98.js +32 -5
  156. package/dist/index98.js.map +1 -1
  157. package/dist/index99.js +5 -13
  158. package/dist/index99.js.map +1 -1
  159. package/package.json +1 -1
package/dist/index41.js CHANGED
@@ -1,225 +1,100 @@
1
- import { jsx as y, jsxs as m } from "react/jsx-runtime";
2
- import { forwardRef as at, useRef as ft, useCallback as z, useState as G, useEffect as H } from "react";
3
- function S(e, r, c) {
4
- let l = "", s = 0;
5
- for (let p = 0; p < r.length && s <= e.length; p++) {
6
- const b = r[p];
7
- b === "#" || b === "A" || b === "*" ? s < e.length ? (l += e[s], s++) : l += c : l += b;
8
- }
9
- return l;
10
- }
11
- function J(e, r, c) {
12
- let l = "";
13
- for (let s = 0; s < e.length && s < r.length; s++) {
14
- const p = r[s];
15
- (p === "#" || p === "A" || p === "*") && e[s] !== c && (l += e[s]);
16
- }
17
- return l;
18
- }
19
- function pt(e, r) {
20
- return r === "#" ? /\d/.test(e) : r === "A" ? /[a-zA-Z]/.test(e) : r === "*" ? /[a-zA-Z0-9]/.test(e) : !1;
21
- }
22
- function k(e, r) {
23
- for (let c = r; c < e.length; c++)
24
- if (e[c] === "#" || e[c] === "A" || e[c] === "*")
25
- return c;
26
- return e.length;
27
- }
28
- const dt = ({ onClick: e, className: r }) => /* @__PURE__ */ y(
29
- "button",
1
+ import { jsxs as e, jsx as a } from "react/jsx-runtime";
2
+ const r = () => /* @__PURE__ */ a(
3
+ "svg",
30
4
  {
31
- type: "button",
32
- onClick: e,
33
- className: `flex items-center justify-center opacity-50 hover:opacity-100 transition-opacity ${r || ""}`,
34
- "aria-label": "Clear input",
35
- tabIndex: -1,
36
- children: /* @__PURE__ */ y("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ y("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
37
- }
38
- ), gt = at(
39
- ({
40
- type: e = "text",
41
- size: r,
42
- color: c,
43
- status: l,
44
- ghost: s = !1,
45
- bordered: p = !0,
46
- className: b = "",
47
- mask: t,
48
- maskPlaceholder: u = "_",
49
- allowClear: R,
50
- onClear: O,
51
- prefix: B,
52
- suffix: A,
53
- errorId: Q,
54
- value: i,
55
- defaultValue: N,
56
- onChange: a,
57
- onKeyDown: V,
58
- disabled: Z,
59
- required: W,
60
- ...U
61
- }, tt) => {
62
- const et = {
63
- xs: "input-xs",
64
- sm: "input-sm",
65
- md: "input-md",
66
- lg: "input-lg",
67
- xl: "input-xl"
68
- }, nt = l ? {
69
- error: "input-error",
70
- warning: "input-warning"
71
- }[l] : c ? {
72
- neutral: "input-neutral",
73
- primary: "input-primary",
74
- secondary: "input-secondary",
75
- accent: "input-accent",
76
- info: "input-info",
77
- success: "input-success",
78
- warning: "input-warning",
79
- error: "input-error"
80
- }[c] : "", _ = [
81
- "input",
82
- !p && "border-0",
83
- s && "input-ghost",
84
- r && et[r],
85
- nt,
86
- b
87
- ].filter(Boolean).join(" "), rt = ft(null), d = tt || rt, it = z(() => t ? J(i ?? N ?? "", t, u) : "", [t, i, N, u]), [j, E] = G(it), [T, $] = G(null);
88
- H(() => {
89
- t && i !== void 0 && E(J(i, t, u));
90
- }, [t, i, u]), H(() => {
91
- T !== null && d.current && (d.current.setSelectionRange(T, T), $(null));
92
- }, [T, d]);
93
- const X = z(
94
- (n) => {
95
- if (!t) {
96
- a?.(n);
97
- return;
98
- }
99
- const f = n.target, w = f.value, I = J(w, t, u);
100
- let x = "", v = 0;
101
- for (let g = 0; g < t.length && v < I.length; g++) {
102
- const h = t[g];
103
- (h === "#" || h === "A" || h === "*") && (pt(I[v], h) && (x += I[v]), v++);
104
- }
105
- E(x);
106
- const L = S(x, t, u);
107
- let o = k(t, 0), C = 0;
108
- for (let g = 0; g < t.length; g++) {
109
- const h = t[g];
110
- (h === "#" || h === "A" || h === "*") && C < x.length && (C++, o = g + 1);
111
- }
112
- o = k(t, o), o > t.length && (o = t.length), $(o);
113
- const ut = {
114
- ...n,
115
- target: { ...f, value: L },
116
- currentTarget: { ...f, value: L }
117
- };
118
- a?.(ut);
119
- },
120
- [t, u, a]
121
- ), Y = z(
122
- (n) => {
123
- if (!t) {
124
- V?.(n);
125
- return;
126
- }
127
- if (n.key === "Backspace") {
128
- n.preventDefault();
129
- const f = j.slice(0, -1);
130
- E(f);
131
- let w = 0, I = 0;
132
- for (let o = 0; o < t.length; o++) {
133
- const C = t[o];
134
- if (C === "#" || C === "A" || C === "*")
135
- if (I < f.length)
136
- I++, w = o + 1;
137
- else {
138
- w = o;
139
- break;
140
- }
5
+ width: "184",
6
+ height: "152",
7
+ viewBox: "0 0 184 152",
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ className: "mx-auto",
10
+ children: /* @__PURE__ */ e("g", { fill: "none", fillRule: "evenodd", children: [
11
+ /* @__PURE__ */ e("g", { transform: "translate(24 31.67)", children: [
12
+ /* @__PURE__ */ a(
13
+ "ellipse",
14
+ {
15
+ className: "fill-base-300",
16
+ cx: "67.797",
17
+ cy: "106.89",
18
+ rx: "67.797",
19
+ ry: "12.668"
141
20
  }
142
- $(w);
143
- const x = S(f, t, u), v = n.currentTarget, L = {
144
- target: { ...v, value: x },
145
- currentTarget: { ...v, value: x }
146
- };
147
- a?.(L);
148
- }
149
- V?.(n);
150
- },
151
- [t, u, j, a, V]
152
- ), [q, D] = G(i ?? N ?? "");
153
- H(() => {
154
- i !== void 0 && D(i);
155
- }, [i]);
156
- const ct = z((n) => {
157
- D(n.target.value), a?.(n);
158
- }, [a]), st = z(() => {
159
- if (D(""), E(""), O?.(), a && d.current) {
160
- const n = {
161
- target: { ...d.current, value: "" },
162
- currentTarget: { ...d.current, value: "" }
163
- };
164
- a(n);
165
- }
166
- }, [O, a, d]), F = R && (t ? j : q) && !Z, ot = typeof R == "object" && R.clearIcon ? R.clearIcon : null, M = {};
167
- l === "error" && (M["aria-invalid"] = !0), Q && (M["aria-describedby"] = Q), W && (M["aria-required"] = !0);
168
- const K = B || A || R, P = (n, f, w) => /* @__PURE__ */ y(
169
- "input",
170
- {
171
- ref: d,
172
- type: t ? "text" : e,
173
- className: n,
174
- value: f ?? i,
175
- defaultValue: !f && !i ? N : void 0,
176
- onChange: w ?? a,
177
- onKeyDown: t ? Y : V,
178
- disabled: Z,
179
- required: W,
180
- ...M,
181
- ...U
182
- }
183
- );
184
- if (!t && !K)
185
- return P(_);
186
- if (t && !K) {
187
- const n = S(j, t, u);
188
- return P(_, n, X);
189
- }
190
- const lt = t ? S(j, t, u) : void 0;
191
- return /* @__PURE__ */ m("div", { className: "relative flex items-center", children: [
192
- B && /* @__PURE__ */ y("span", { className: "absolute left-3 flex items-center text-base-content/70 pointer-events-none z-10", children: B }),
193
- /* @__PURE__ */ y(
194
- "input",
21
+ ),
22
+ /* @__PURE__ */ a(
23
+ "path",
24
+ {
25
+ className: "fill-base-200",
26
+ d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
27
+ }
28
+ ),
29
+ /* @__PURE__ */ a(
30
+ "path",
31
+ {
32
+ className: "fill-base-100",
33
+ d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
34
+ transform: "translate(13.56)"
35
+ }
36
+ ),
37
+ /* @__PURE__ */ a(
38
+ "ellipse",
39
+ {
40
+ className: "fill-base-300",
41
+ cx: "67.797",
42
+ cy: "106.89",
43
+ rx: "67.797",
44
+ ry: "12.668"
45
+ }
46
+ ),
47
+ /* @__PURE__ */ a(
48
+ "path",
49
+ {
50
+ className: "fill-base-200",
51
+ d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
52
+ }
53
+ ),
54
+ /* @__PURE__ */ a(
55
+ "path",
56
+ {
57
+ className: "fill-base-content opacity-10",
58
+ d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"
59
+ }
60
+ ),
61
+ /* @__PURE__ */ a(
62
+ "path",
63
+ {
64
+ className: "fill-base-100",
65
+ d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"
66
+ }
67
+ )
68
+ ] }),
69
+ /* @__PURE__ */ a(
70
+ "path",
195
71
  {
196
- ref: d,
197
- type: t ? "text" : e,
198
- className: [
199
- _,
200
- "w-full",
201
- B && "pl-10",
202
- (A || F) && "pr-10"
203
- ].filter(Boolean).join(" "),
204
- value: lt ?? (i !== void 0 ? i : q),
205
- defaultValue: i === void 0 && !t ? N : void 0,
206
- onChange: t ? X : ct,
207
- onKeyDown: t ? Y : V,
208
- disabled: Z,
209
- required: W,
210
- ...M,
211
- ...U
72
+ className: "fill-base-content opacity-10",
73
+ d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"
212
74
  }
213
75
  ),
214
- (A || F) && /* @__PURE__ */ m("span", { className: "absolute right-3 flex items-center gap-1 z-10", children: [
215
- F && (ot || /* @__PURE__ */ y(dt, { onClick: st })),
216
- A && /* @__PURE__ */ y("span", { className: "text-base-content/70", children: A })
76
+ /* @__PURE__ */ e("g", { className: "fill-base-100", transform: "translate(149.65 15.383)", children: [
77
+ /* @__PURE__ */ a("ellipse", { cx: "20.654", cy: "3.167", rx: "2.849", ry: "2.815" }),
78
+ /* @__PURE__ */ a("path", { d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" })
217
79
  ] })
218
- ] });
80
+ ] })
219
81
  }
220
- );
221
- gt.displayName = "Input";
82
+ ), o = ({
83
+ children: l,
84
+ className: t = "",
85
+ description: s = "No Data",
86
+ image: c,
87
+ imageStyle: i,
88
+ ...h
89
+ }) => {
90
+ const n = ["flex flex-col items-center justify-center py-8 px-4", t].filter(Boolean).join(" ");
91
+ return /* @__PURE__ */ e("div", { className: n, ...h, children: [
92
+ /* @__PURE__ */ a("div", { className: "mb-2", style: i, children: c === void 0 ? /* @__PURE__ */ a(r, {}) : c }),
93
+ s && /* @__PURE__ */ a("div", { className: "text-base-content/60 text-sm mb-4", children: s }),
94
+ l && /* @__PURE__ */ a("div", { className: "mt-2", children: l })
95
+ ] });
96
+ };
222
97
  export {
223
- gt as Input
98
+ o as Empty
224
99
  };
225
100
  //# sourceMappingURL=index41.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index41.js","sources":["../src/components/Input.tsx"],"sourcesContent":["import React, { forwardRef, useState, useCallback, useRef, useEffect } from 'react'\n\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {\n type?: 'text' | 'password' | 'email' | 'number' | 'date' | 'datetime-local' | 'week' | 'month' | 'tel' | 'url' | 'search' | 'time'\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'\n /** Validation status */\n status?: 'error' | 'warning'\n ghost?: boolean\n bordered?: boolean\n className?: string\n /** Input mask pattern. Use # for digits, A for letters, * for alphanumeric */\n mask?: string\n /** Placeholder character shown in mask (default: _) */\n maskPlaceholder?: string\n /** Show clear button when input has value */\n allowClear?: boolean | { clearIcon?: React.ReactNode }\n /** Callback when clear button is clicked */\n onClear?: () => void\n /** Prefix icon or element */\n prefix?: React.ReactNode\n /** Suffix icon or element */\n suffix?: React.ReactNode\n /** ID for error message element (for aria-describedby) */\n errorId?: string\n}\n\n// Helper to apply mask to raw value\nfunction applyMask(raw: string, mask: string, placeholder: string): string {\n let result = ''\n let rawIndex = 0\n\n for (let i = 0; i < mask.length && rawIndex <= raw.length; i++) {\n const maskChar = mask[i]\n if (maskChar === '#' || maskChar === 'A' || maskChar === '*') {\n if (rawIndex < raw.length) {\n result += raw[rawIndex]\n rawIndex++\n } else {\n result += placeholder\n }\n } else {\n result += maskChar\n }\n }\n\n return result\n}\n\n// Extract raw value from masked input\nfunction extractRaw(value: string, mask: string, placeholder: string): string {\n let raw = ''\n for (let i = 0; i < value.length && i < mask.length; i++) {\n const maskChar = mask[i]\n if ((maskChar === '#' || maskChar === 'A' || maskChar === '*') && value[i] !== placeholder) {\n raw += value[i]\n }\n }\n return raw\n}\n\n// Check if character is valid for mask position\nfunction isValidChar(char: string, maskChar: string): boolean {\n if (maskChar === '#') return /\\d/.test(char)\n if (maskChar === 'A') return /[a-zA-Z]/.test(char)\n if (maskChar === '*') return /[a-zA-Z0-9]/.test(char)\n return false\n}\n\n// Find next input position in mask\nfunction findNextInputPosition(mask: string, fromIndex: number): number {\n for (let i = fromIndex; i < mask.length; i++) {\n if (mask[i] === '#' || mask[i] === 'A' || mask[i] === '*') {\n return i\n }\n }\n return mask.length\n}\n\n// Clear icon component\nconst ClearIcon: React.FC<{ onClick: () => void; className?: string }> = ({ onClick, className }) => (\n <button\n type=\"button\"\n onClick={onClick}\n className={`flex items-center justify-center opacity-50 hover:opacity-100 transition-opacity ${className || ''}`}\n aria-label=\"Clear input\"\n tabIndex={-1}\n >\n <svg className=\"w-4 h-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n)\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n type = 'text',\n size,\n color,\n status,\n ghost = false,\n bordered = true,\n className = '',\n mask,\n maskPlaceholder = '_',\n allowClear,\n onClear,\n prefix,\n suffix,\n errorId,\n value,\n defaultValue,\n onChange,\n onKeyDown,\n disabled,\n required,\n ...props\n },\n ref\n ) => {\n const sizeClasses = {\n xs: 'input-xs',\n sm: 'input-sm',\n md: 'input-md',\n lg: 'input-lg',\n xl: 'input-xl',\n }\n\n const colorClasses = {\n neutral: 'input-neutral',\n primary: 'input-primary',\n secondary: 'input-secondary',\n accent: 'input-accent',\n info: 'input-info',\n success: 'input-success',\n warning: 'input-warning',\n error: 'input-error',\n }\n\n const statusClasses = {\n error: 'input-error',\n warning: 'input-warning',\n }\n\n // Status takes precedence over color for validation feedback\n const effectiveColorClass = status ? statusClasses[status] : (color ? colorClasses[color] : '')\n\n const inputClasses = [\n 'input',\n !bordered && 'border-0',\n ghost && 'input-ghost',\n size && sizeClasses[size],\n effectiveColorClass,\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Mask handling\n const innerRef = useRef<HTMLInputElement>(null)\n const inputRef = (ref as React.RefObject<HTMLInputElement>) || innerRef\n\n const getInitialRaw = useCallback(() => {\n if (!mask) return ''\n const initial = (value ?? defaultValue ?? '') as string\n return extractRaw(initial, mask, maskPlaceholder)\n }, [mask, value, defaultValue, maskPlaceholder])\n\n const [rawValue, setRawValue] = useState(getInitialRaw)\n const [cursorPos, setCursorPos] = useState<number | null>(null)\n\n // Sync with controlled value\n useEffect(() => {\n if (mask && value !== undefined) {\n setRawValue(extractRaw(value as string, mask, maskPlaceholder))\n }\n }, [mask, value, maskPlaceholder])\n\n // Set cursor position after render\n useEffect(() => {\n if (cursorPos !== null && inputRef.current) {\n inputRef.current.setSelectionRange(cursorPos, cursorPos)\n setCursorPos(null)\n }\n }, [cursorPos, inputRef])\n\n const handleMaskedChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (!mask) {\n onChange?.(e)\n return\n }\n\n const input = e.target\n const inputValue = input.value\n\n // Extract what the user is trying to type\n const newRaw = extractRaw(inputValue, mask, maskPlaceholder)\n\n // Filter to only valid characters\n let filteredRaw = ''\n let rawIdx = 0\n for (let i = 0; i < mask.length && rawIdx < newRaw.length; i++) {\n const maskChar = mask[i]\n if (maskChar === '#' || maskChar === 'A' || maskChar === '*') {\n if (isValidChar(newRaw[rawIdx], maskChar)) {\n filteredRaw += newRaw[rawIdx]\n }\n rawIdx++\n }\n }\n\n setRawValue(filteredRaw)\n\n // Calculate new cursor position\n const maskedValue = applyMask(filteredRaw, mask, maskPlaceholder)\n let newCursor = findNextInputPosition(mask, 0)\n let charsPlaced = 0\n for (let i = 0; i < mask.length; i++) {\n const maskChar = mask[i]\n if (maskChar === '#' || maskChar === 'A' || maskChar === '*') {\n if (charsPlaced < filteredRaw.length) {\n charsPlaced++\n newCursor = i + 1\n }\n }\n }\n // Skip to next input position if we're on a literal\n newCursor = findNextInputPosition(mask, newCursor)\n if (newCursor > mask.length) newCursor = mask.length\n\n setCursorPos(newCursor)\n\n // Create synthetic event with masked value\n const syntheticEvent = {\n ...e,\n target: { ...input, value: maskedValue },\n currentTarget: { ...input, value: maskedValue },\n } as React.ChangeEvent<HTMLInputElement>\n\n onChange?.(syntheticEvent)\n },\n [mask, maskPlaceholder, onChange]\n )\n\n const handleMaskedKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (!mask) {\n onKeyDown?.(e)\n return\n }\n\n if (e.key === 'Backspace') {\n e.preventDefault()\n const newRaw = rawValue.slice(0, -1)\n setRawValue(newRaw)\n\n // Calculate cursor position\n let newCursor = 0\n let charsPlaced = 0\n for (let i = 0; i < mask.length; i++) {\n const maskChar = mask[i]\n if (maskChar === '#' || maskChar === 'A' || maskChar === '*') {\n if (charsPlaced < newRaw.length) {\n charsPlaced++\n newCursor = i + 1\n } else {\n newCursor = i\n break\n }\n }\n }\n setCursorPos(newCursor)\n\n const maskedValue = applyMask(newRaw, mask, maskPlaceholder)\n const input = e.currentTarget\n const syntheticEvent = {\n target: { ...input, value: maskedValue },\n currentTarget: { ...input, value: maskedValue },\n } as unknown as React.ChangeEvent<HTMLInputElement>\n\n onChange?.(syntheticEvent)\n }\n\n onKeyDown?.(e)\n },\n [mask, maskPlaceholder, rawValue, onChange, onKeyDown]\n )\n\n // Track internal value for allowClear visibility\n const [internalValue, setInternalValue] = useState((value ?? defaultValue ?? '') as string)\n\n // Sync internal value with controlled value\n useEffect(() => {\n if (value !== undefined) {\n setInternalValue(value as string)\n }\n }, [value])\n\n const handleChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setInternalValue(e.target.value)\n onChange?.(e)\n }, [onChange])\n\n const handleClear = useCallback(() => {\n setInternalValue('')\n setRawValue('')\n onClear?.()\n // Create synthetic event for onChange\n if (onChange && inputRef.current) {\n const syntheticEvent = {\n target: { ...inputRef.current, value: '' },\n currentTarget: { ...inputRef.current, value: '' },\n } as React.ChangeEvent<HTMLInputElement>\n onChange(syntheticEvent)\n }\n }, [onClear, onChange, inputRef])\n\n // Determine if we should show clear button\n const currentValue = mask ? rawValue : internalValue\n const showClear = allowClear && currentValue && !disabled\n\n // Get custom clear icon if provided\n const clearIcon = typeof allowClear === 'object' && allowClear.clearIcon\n ? allowClear.clearIcon\n : null\n\n // Accessibility attributes\n const ariaProps: Record<string, string | boolean | undefined> = {}\n if (status === 'error') {\n ariaProps['aria-invalid'] = true\n }\n if (errorId) {\n ariaProps['aria-describedby'] = errorId\n }\n if (required) {\n ariaProps['aria-required'] = true\n }\n\n // If we have prefix, suffix, or allowClear, wrap in a container\n const hasAddons = prefix || suffix || allowClear\n\n // Build the input element\n const renderInput = (inputClassName: string, inputValue?: string, inputOnChange?: typeof onChange) => (\n <input\n ref={inputRef}\n type={mask ? 'text' : type}\n className={inputClassName}\n value={inputValue ?? value}\n defaultValue={!inputValue && !value ? defaultValue : undefined}\n onChange={inputOnChange ?? onChange}\n onKeyDown={mask ? handleMaskedKeyDown : onKeyDown}\n disabled={disabled}\n required={required}\n {...ariaProps}\n {...props}\n />\n )\n\n // If no mask and no addons, render simple input\n if (!mask && !hasAddons) {\n return renderInput(inputClasses)\n }\n\n // Render masked input without addons\n if (mask && !hasAddons) {\n const maskedValue = applyMask(rawValue, mask, maskPlaceholder)\n return renderInput(inputClasses, maskedValue, handleMaskedChange)\n }\n\n // Render with addons (prefix/suffix/clear)\n const maskedValue = mask ? applyMask(rawValue, mask, maskPlaceholder) : undefined\n\n return (\n <div className=\"relative flex items-center\">\n {prefix && (\n <span className=\"absolute left-3 flex items-center text-base-content/70 pointer-events-none z-10\">\n {prefix}\n </span>\n )}\n <input\n ref={inputRef}\n type={mask ? 'text' : type}\n className={[\n inputClasses,\n 'w-full',\n prefix && 'pl-10',\n (suffix || showClear) && 'pr-10',\n ].filter(Boolean).join(' ')}\n value={maskedValue ?? (value !== undefined ? value : internalValue)}\n defaultValue={value === undefined && !mask ? defaultValue : undefined}\n onChange={mask ? handleMaskedChange : handleChange}\n onKeyDown={mask ? handleMaskedKeyDown : onKeyDown}\n disabled={disabled}\n required={required}\n {...ariaProps}\n {...props}\n />\n {(suffix || showClear) && (\n <span className=\"absolute right-3 flex items-center gap-1 z-10\">\n {showClear && (\n clearIcon || <ClearIcon onClick={handleClear} />\n )}\n {suffix && (\n <span className=\"text-base-content/70\">\n {suffix}\n </span>\n )}\n </span>\n )}\n </div>\n )\n }\n)\n\nInput.displayName = 'Input'\n"],"names":["applyMask","raw","mask","placeholder","result","rawIndex","i","maskChar","extractRaw","value","isValidChar","char","findNextInputPosition","fromIndex","ClearIcon","onClick","className","jsx","Input","forwardRef","type","size","color","status","ghost","bordered","maskPlaceholder","allowClear","onClear","prefix","suffix","errorId","defaultValue","onChange","onKeyDown","disabled","required","props","ref","sizeClasses","effectiveColorClass","inputClasses","innerRef","useRef","inputRef","getInitialRaw","useCallback","rawValue","setRawValue","useState","cursorPos","setCursorPos","useEffect","handleMaskedChange","e","input","inputValue","newRaw","filteredRaw","rawIdx","maskedValue","newCursor","charsPlaced","syntheticEvent","handleMaskedKeyDown","internalValue","setInternalValue","handleChange","handleClear","showClear","clearIcon","ariaProps","hasAddons","renderInput","inputClassName","inputOnChange","jsxs"],"mappings":";;AA4BA,SAASA,EAAUC,GAAaC,GAAcC,GAA6B;AACzE,MAAIC,IAAS,IACTC,IAAW;AAEf,WAASC,IAAI,GAAGA,IAAIJ,EAAK,UAAUG,KAAYJ,EAAI,QAAQK,KAAK;AAC9D,UAAMC,IAAWL,EAAKI,CAAC;AACvB,IAAIC,MAAa,OAAOA,MAAa,OAAOA,MAAa,MACnDF,IAAWJ,EAAI,UACjBG,KAAUH,EAAII,CAAQ,GACtBA,OAEAD,KAAUD,IAGZC,KAAUG;AAAA,EAEd;AAEA,SAAOH;AACT;AAGA,SAASI,EAAWC,GAAeP,GAAcC,GAA6B;AAC5E,MAAIF,IAAM;AACV,WAASK,IAAI,GAAGA,IAAIG,EAAM,UAAUH,IAAIJ,EAAK,QAAQI,KAAK;AACxD,UAAMC,IAAWL,EAAKI,CAAC;AACvB,KAAKC,MAAa,OAAOA,MAAa,OAAOA,MAAa,QAAQE,EAAMH,CAAC,MAAMH,MAC7EF,KAAOQ,EAAMH,CAAC;AAAA,EAElB;AACA,SAAOL;AACT;AAGA,SAASS,GAAYC,GAAcJ,GAA2B;AAC5D,SAAIA,MAAa,MAAY,KAAK,KAAKI,CAAI,IACvCJ,MAAa,MAAY,WAAW,KAAKI,CAAI,IAC7CJ,MAAa,MAAY,cAAc,KAAKI,CAAI,IAC7C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,EAAC,QAAA,EAAK,WAAU,mFACb,UAAAY,GACH;AAAA,MAEF,gBAAAZ;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAK2B;AAAA,UACL,MAAM1C,IAAO,SAASkB;AAAA,UACtB,WAAW;AAAA,YACTqB;AAAA,YACA;AAAA,YACAZ,KAAU;AAAA,aACTC,KAAUuC,MAAc;AAAA,UAAA,EACzB,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,UAC1B,OAAOT,OAAgBnD,MAAU,SAAYA,IAAQwD;AAAA,UACrD,cAAcxD,MAAU,UAAa,CAACP,IAAO8B,IAAe;AAAA,UAC5D,UAAU9B,IAAOmD,IAAqBc;AAAA,UACtC,WAAWjE,IAAO8D,IAAsB9B;AAAA,UACxC,UAAAC;AAAA,UACA,UAAAC;AAAA,UACC,GAAGmC;AAAA,UACH,GAAGlC;AAAA,QAAA;AAAA,MAAA;AAAA,OAEJP,KAAUuC,MACV,gBAAAO,EAAC,QAAA,EAAK,WAAU,iDACb,UAAA;AAAA,QAAAP,MACCC,MAAa,gBAAArD,EAACH,IAAA,EAAU,SAASsD,GAAA,CAAa;AAAA,QAE/CtC,KACC,gBAAAb,EAAC,QAAA,EAAK,WAAU,wBACb,UAAAa,EAAA,CACH;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AAEAZ,GAAM,cAAc;"}
1
+ {"version":3,"file":"index41.js","sources":["../src/components/Empty.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface EmptyProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode\n description?: React.ReactNode\n image?: React.ReactNode\n imageStyle?: React.CSSProperties\n}\n\nconst DefaultEmptyImage: React.FC = () => (\n <svg\n width=\"184\"\n height=\"152\"\n viewBox=\"0 0 184 152\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"mx-auto\"\n >\n <g fill=\"none\" fillRule=\"evenodd\">\n <g transform=\"translate(24 31.67)\">\n <ellipse\n className=\"fill-base-300\"\n cx=\"67.797\"\n cy=\"106.89\"\n rx=\"67.797\"\n ry=\"12.668\"\n />\n <path\n className=\"fill-base-200\"\n d=\"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z\"\n />\n <path\n className=\"fill-base-100\"\n d=\"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z\"\n transform=\"translate(13.56)\"\n />\n <ellipse\n className=\"fill-base-300\"\n cx=\"67.797\"\n cy=\"106.89\"\n rx=\"67.797\"\n ry=\"12.668\"\n />\n <path\n className=\"fill-base-200\"\n d=\"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z\"\n />\n <path\n className=\"fill-base-content opacity-10\"\n d=\"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z\"\n />\n <path\n className=\"fill-base-100\"\n d=\"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z\"\n />\n </g>\n <path\n className=\"fill-base-content opacity-10\"\n d=\"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z\"\n />\n <g className=\"fill-base-100\" transform=\"translate(149.65 15.383)\">\n <ellipse cx=\"20.654\" cy=\"3.167\" rx=\"2.849\" ry=\"2.815\" />\n <path d=\"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z\" />\n </g>\n </g>\n </svg>\n)\n\nexport const Empty: React.FC<EmptyProps> = ({\n children,\n className = '',\n description = 'No Data',\n image,\n imageStyle,\n ...rest\n}) => {\n const classes = ['flex flex-col items-center justify-center py-8 px-4', className]\n .filter(Boolean)\n .join(' ')\n\n return (\n <div className={classes} {...rest}>\n <div className=\"mb-2\" style={imageStyle}>\n {image === undefined ? <DefaultEmptyImage /> : image}\n </div>\n {description && (\n <div className=\"text-base-content/60 text-sm mb-4\">{description}</div>\n )}\n {children && <div className=\"mt-2\">{children}</div>}\n </div>\n )\n}\n"],"names":["DefaultEmptyImage","jsx","jsxs","Empty","children","className","description","image","imageStyle","rest","classes"],"mappings":";AASA,MAAMA,IAA8B,MAClC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,WAAU;AAAA,IAEV,UAAA,gBAAAC,EAAC,KAAA,EAAE,MAAK,QAAO,UAAS,WACtB,UAAA;AAAA,MAAA,gBAAAA,EAAC,KAAA,EAAE,WAAU,uBACX,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,Y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