@vaebe/ccui 2.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -0
  3. package/affix/ccui-cli.css +2 -0
  4. package/affix/index.es.js +132 -0
  5. package/affix/index.umd.js +1 -0
  6. package/alert/ccui-cli.css +2 -0
  7. package/alert/index.es.js +127 -0
  8. package/alert/index.umd.js +1 -0
  9. package/anchor/ccui-cli.css +2 -0
  10. package/anchor/index.es.js +160 -0
  11. package/anchor/index.umd.js +1 -0
  12. package/avatar/ccui-cli.css +2 -0
  13. package/avatar/index.es.js +235 -0
  14. package/avatar/index.umd.js +1 -0
  15. package/badge/ccui-cli.css +2 -0
  16. package/badge/index.es.js +146 -0
  17. package/badge/index.umd.js +1 -0
  18. package/breadcrumb/ccui-cli.css +2 -0
  19. package/breadcrumb/index.es.js +89 -0
  20. package/breadcrumb/index.umd.js +1 -0
  21. package/button/ccui-cli.css +2 -0
  22. package/button/index.es.js +1236 -0
  23. package/button/index.umd.js +1 -0
  24. package/button-3d/ccui-cli.css +2 -0
  25. package/button-3d/index.es.js +80 -0
  26. package/button-3d/index.umd.js +1 -0
  27. package/calendar/ccui-cli.css +2 -0
  28. package/calendar/index.es.js +450 -0
  29. package/calendar/index.umd.js +1 -0
  30. package/card/ccui-cli.css +2 -0
  31. package/card/index.es.js +78 -0
  32. package/card/index.umd.js +1 -0
  33. package/ccui-cli.css +2 -0
  34. package/check-box/ccui-cli.css +2 -0
  35. package/check-box/index.es.js +173 -0
  36. package/check-box/index.umd.js +1 -0
  37. package/collapse/ccui-cli.css +2 -0
  38. package/collapse/index.es.js +176 -0
  39. package/collapse/index.umd.js +1 -0
  40. package/config-provider/index.es.js +204 -0
  41. package/config-provider/index.umd.js +1 -0
  42. package/date-picker/ccui-cli.css +2 -0
  43. package/date-picker/index.es.js +2447 -0
  44. package/date-picker/index.umd.js +1 -0
  45. package/descriptions/ccui-cli.css +2 -0
  46. package/descriptions/index.es.js +175 -0
  47. package/descriptions/index.umd.js +1 -0
  48. package/divider/ccui-cli.css +2 -0
  49. package/divider/index.es.js +78 -0
  50. package/divider/index.umd.js +1 -0
  51. package/drawer/ccui-cli.css +2 -0
  52. package/drawer/index.es.js +1320 -0
  53. package/drawer/index.umd.js +1 -0
  54. package/dropdown/ccui-cli.css +2 -0
  55. package/dropdown/index.es.js +606 -0
  56. package/dropdown/index.umd.js +1 -0
  57. package/empty/ccui-cli.css +2 -0
  58. package/empty/index.es.js +173 -0
  59. package/empty/index.umd.js +1 -0
  60. package/flex/ccui-cli.css +2 -0
  61. package/flex/index.es.js +87 -0
  62. package/flex/index.umd.js +1 -0
  63. package/float-button/ccui-cli.css +2 -0
  64. package/float-button/index.es.js +169 -0
  65. package/float-button/index.umd.js +1 -0
  66. package/form/ccui-cli.css +2 -0
  67. package/form/index.es.js +752 -0
  68. package/form/index.umd.js +1 -0
  69. package/grid/ccui-cli.css +2 -0
  70. package/grid/index.es.js +207 -0
  71. package/grid/index.umd.js +1 -0
  72. package/icon/ccui-cli.css +2 -0
  73. package/icon/index.es.js +1228 -0
  74. package/icon/index.umd.js +1 -0
  75. package/image/ccui-cli.css +2 -0
  76. package/image/index.es.js +276 -0
  77. package/image/index.umd.js +1 -0
  78. package/index.d.ts +7 -0
  79. package/input/ccui-cli.css +2 -0
  80. package/input/index.es.js +1293 -0
  81. package/input/index.umd.js +1 -0
  82. package/input-number/ccui-cli.css +2 -0
  83. package/input-number/index.es.js +263 -0
  84. package/input-number/index.umd.js +1 -0
  85. package/layout/ccui-cli.css +2 -0
  86. package/layout/index.es.js +184 -0
  87. package/layout/index.umd.js +1 -0
  88. package/masonry/ccui-cli.css +2 -0
  89. package/masonry/index.es.js +119 -0
  90. package/masonry/index.umd.js +1 -0
  91. package/menu/ccui-cli.css +2 -0
  92. package/menu/index.es.js +385 -0
  93. package/menu/index.umd.js +1 -0
  94. package/message/ccui-cli.css +2 -0
  95. package/message/index.es.js +351 -0
  96. package/message/index.umd.js +1 -0
  97. package/modal/ccui-cli.css +2 -0
  98. package/modal/index.es.js +1553 -0
  99. package/modal/index.umd.js +1 -0
  100. package/notification/ccui-cli.css +2 -0
  101. package/notification/index.es.js +347 -0
  102. package/notification/index.umd.js +1 -0
  103. package/nuxt/components/category.js +2 -0
  104. package/nuxt/components/install.js +2 -0
  105. package/nuxt/components/status.js +2 -0
  106. package/nuxt/components/title.js +2 -0
  107. package/nuxt/index.js +13 -0
  108. package/package.json +53 -0
  109. package/pagination/ccui-cli.css +2 -0
  110. package/pagination/index.es.js +296 -0
  111. package/pagination/index.umd.js +1 -0
  112. package/popconfirm/ccui-cli.css +2 -0
  113. package/popconfirm/index.es.js +735 -0
  114. package/popconfirm/index.umd.js +1 -0
  115. package/popover/ccui-cli.css +2 -0
  116. package/popover/index.es.js +530 -0
  117. package/popover/index.umd.js +1 -0
  118. package/progress/ccui-cli.css +2 -0
  119. package/progress/index.es.js +167 -0
  120. package/progress/index.umd.js +1 -0
  121. package/radio/ccui-cli.css +2 -0
  122. package/radio/index.es.js +157 -0
  123. package/radio/index.umd.js +1 -0
  124. package/rate/ccui-cli.css +2 -0
  125. package/rate/index.es.js +115 -0
  126. package/rate/index.umd.js +1 -0
  127. package/result/ccui-cli.css +2 -0
  128. package/result/index.es.js +90 -0
  129. package/result/index.umd.js +1 -0
  130. package/segmented/ccui-cli.css +2 -0
  131. package/segmented/index.es.js +99 -0
  132. package/segmented/index.umd.js +1 -0
  133. package/select/ccui-cli.css +2 -0
  134. package/select/index.es.js +1885 -0
  135. package/select/index.umd.js +1 -0
  136. package/skeleton/ccui-cli.css +2 -0
  137. package/skeleton/index.es.js +117 -0
  138. package/skeleton/index.umd.js +1 -0
  139. package/slider/ccui-cli.css +2 -0
  140. package/slider/index.es.js +1071 -0
  141. package/slider/index.umd.js +1 -0
  142. package/space/ccui-cli.css +2 -0
  143. package/space/index.es.js +108 -0
  144. package/space/index.umd.js +1 -0
  145. package/spin/ccui-cli.css +2 -0
  146. package/spin/index.es.js +86 -0
  147. package/spin/index.umd.js +1 -0
  148. package/splitter/ccui-cli.css +2 -0
  149. package/splitter/index.es.js +198 -0
  150. package/splitter/index.umd.js +1 -0
  151. package/status/ccui-cli.css +2 -0
  152. package/status/index.es.js +44 -0
  153. package/status/index.umd.js +1 -0
  154. package/steps/ccui-cli.css +2 -0
  155. package/steps/index.es.js +118 -0
  156. package/steps/index.umd.js +1 -0
  157. package/switch/ccui-cli.css +2 -0
  158. package/switch/index.es.js +118 -0
  159. package/switch/index.umd.js +1 -0
  160. package/table/ccui-cli.css +2 -0
  161. package/table/index.es.js +553 -0
  162. package/table/index.umd.js +1 -0
  163. package/tabs/ccui-cli.css +2 -0
  164. package/tabs/index.es.js +128 -0
  165. package/tabs/index.umd.js +1 -0
  166. package/tag/ccui-cli.css +2 -0
  167. package/tag/index.es.js +116 -0
  168. package/tag/index.umd.js +1 -0
  169. package/theme/darkTheme.css +352 -0
  170. package/theme/theme.scss +703 -0
  171. package/timeline/ccui-cli.css +2 -0
  172. package/timeline/index.es.js +113 -0
  173. package/timeline/index.umd.js +1 -0
  174. package/tooltip/ccui-cli.css +2 -0
  175. package/tooltip/index.es.js +423 -0
  176. package/tooltip/index.umd.js +1 -0
  177. package/tree/ccui-cli.css +2 -0
  178. package/tree/index.es.js +810 -0
  179. package/tree/index.umd.js +1 -0
  180. package/typography/ccui-cli.css +2 -0
  181. package/typography/index.es.js +270 -0
  182. package/typography/index.umd.js +1 -0
  183. package/util/index.es.js +78 -0
  184. package/util/index.umd.js +1 -0
  185. package/vue-ccui.es.js +18989 -0
  186. package/vue-ccui.umd.js +1 -0
  187. package/watermark/ccui-cli.css +2 -0
  188. package/watermark/index.es.js +179 -0
  189. package/watermark/index.umd.js +1 -0
@@ -0,0 +1,1293 @@
1
+ import { Fragment as e, computed as t, createVNode as n, defineComponent as r, getCurrentInstance as i, h as a, inject as o, mergeProps as s, nextTick as c, onMounted as l, onUnmounted as u, ref as d, shallowRef as f, watch as p } from "vue";
2
+ //#region ../../node_modules/.pnpm/@iconify+vue@5.0.1_vue@3.5.33_typescript@5.9.3_/node_modules/@iconify/vue/dist/iconify.mjs
3
+ var m = /^[a-z0-9]+(-[a-z0-9]+)*$/, h = (e, t, n, r = "") => {
4
+ let i = e.split(":");
5
+ if (e.slice(0, 1) === "@") {
6
+ if (i.length < 2 || i.length > 3) return null;
7
+ r = i.shift().slice(1);
8
+ }
9
+ if (i.length > 3 || !i.length) return null;
10
+ if (i.length > 1) {
11
+ let e = i.pop(), n = i.pop(), a = {
12
+ provider: i.length > 0 ? i[0] : r,
13
+ prefix: n,
14
+ name: e
15
+ };
16
+ return t && !g(a) ? null : a;
17
+ }
18
+ let a = i[0], o = a.split("-");
19
+ if (o.length > 1) {
20
+ let e = {
21
+ provider: r,
22
+ prefix: o.shift(),
23
+ name: o.join("-")
24
+ };
25
+ return t && !g(e) ? null : e;
26
+ }
27
+ if (n && r === "") {
28
+ let e = {
29
+ provider: r,
30
+ prefix: "",
31
+ name: a
32
+ };
33
+ return t && !g(e, n) ? null : e;
34
+ }
35
+ return null;
36
+ }, g = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
37
+ function _(e, t) {
38
+ let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
39
+ function a(e) {
40
+ if (n[e]) return i[e] = [];
41
+ if (!(e in i)) {
42
+ i[e] = null;
43
+ let t = r[e] && r[e].parent, n = t && a(t);
44
+ n && (i[e] = [t].concat(n));
45
+ }
46
+ return i[e];
47
+ }
48
+ return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
49
+ }
50
+ var v = Object.freeze({
51
+ left: 0,
52
+ top: 0,
53
+ width: 16,
54
+ height: 16
55
+ }), y = Object.freeze({
56
+ rotate: 0,
57
+ vFlip: !1,
58
+ hFlip: !1
59
+ }), b = Object.freeze({
60
+ ...v,
61
+ ...y
62
+ }), x = Object.freeze({
63
+ ...b,
64
+ body: "",
65
+ hidden: !1
66
+ });
67
+ function S(e, t) {
68
+ let n = {};
69
+ !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
70
+ let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
71
+ return r && (n.rotate = r), n;
72
+ }
73
+ function C(e, t) {
74
+ let n = S(e, t);
75
+ for (let r in x) r in y ? r in e && !(r in n) && (n[r] = y[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
76
+ return n;
77
+ }
78
+ function ee(e, t, n) {
79
+ let r = e.icons, i = e.aliases || Object.create(null), a = {};
80
+ function o(e) {
81
+ a = C(r[e] || i[e], a);
82
+ }
83
+ return o(t), n.forEach(o), C(e, a);
84
+ }
85
+ function w(e, t) {
86
+ let n = [];
87
+ if (typeof e != "object" || typeof e.icons != "object") return n;
88
+ e.not_found instanceof Array && e.not_found.forEach((e) => {
89
+ t(e, null), n.push(e);
90
+ });
91
+ let r = _(e);
92
+ for (let i in r) {
93
+ let a = r[i];
94
+ a && (t(i, ee(e, i, a)), n.push(i));
95
+ }
96
+ return n;
97
+ }
98
+ var T = {
99
+ provider: "",
100
+ aliases: {},
101
+ not_found: {},
102
+ ...v
103
+ };
104
+ function E(e, t) {
105
+ for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
106
+ return !0;
107
+ }
108
+ function D(e) {
109
+ if (typeof e != "object" || !e) return null;
110
+ let t = e;
111
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !E(e, T)) return null;
112
+ let n = t.icons;
113
+ for (let e in n) {
114
+ let t = n[e];
115
+ if (!e || typeof t.body != "string" || !E(t, x)) return null;
116
+ }
117
+ let r = t.aliases || Object.create(null);
118
+ for (let e in r) {
119
+ let t = r[e], i = t.parent;
120
+ if (!e || typeof i != "string" || !n[i] && !r[i] || !E(t, x)) return null;
121
+ }
122
+ return t;
123
+ }
124
+ var O = Object.create(null);
125
+ function k(e, t) {
126
+ return {
127
+ provider: e,
128
+ prefix: t,
129
+ icons: Object.create(null),
130
+ missing: /* @__PURE__ */ new Set()
131
+ };
132
+ }
133
+ function A(e, t) {
134
+ let n = O[e] || (O[e] = Object.create(null));
135
+ return n[t] || (n[t] = k(e, t));
136
+ }
137
+ function j(e, t) {
138
+ return D(t) ? w(t, (t, n) => {
139
+ n ? e.icons[t] = n : e.missing.add(t);
140
+ }) : [];
141
+ }
142
+ function M(e, t, n) {
143
+ try {
144
+ if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
145
+ } catch {}
146
+ return !1;
147
+ }
148
+ var N = !1;
149
+ function P(e) {
150
+ return typeof e == "boolean" && (N = e), N;
151
+ }
152
+ function te(e) {
153
+ let t = typeof e == "string" ? h(e, !0, N) : e;
154
+ if (t) {
155
+ let e = A(t.provider, t.prefix), n = t.name;
156
+ return e.icons[n] || (e.missing.has(n) ? null : void 0);
157
+ }
158
+ }
159
+ function ne(e, t) {
160
+ let n = h(e, !0, N);
161
+ if (!n) return !1;
162
+ let r = A(n.provider, n.prefix);
163
+ return t ? M(r, n.name, t) : (r.missing.add(n.name), !0);
164
+ }
165
+ function re(e, t) {
166
+ if (typeof e != "object") return !1;
167
+ if (typeof t != "string" && (t = e.provider || ""), N && !t && !e.prefix) {
168
+ let t = !1;
169
+ return D(e) && (e.prefix = "", w(e, (e, n) => {
170
+ ne(e, n) && (t = !0);
171
+ })), t;
172
+ }
173
+ let n = e.prefix;
174
+ return g({
175
+ prefix: n,
176
+ name: "a"
177
+ }) ? !!j(A(t, n), e) : !1;
178
+ }
179
+ var F = Object.freeze({
180
+ width: null,
181
+ height: null
182
+ }), I = Object.freeze({
183
+ ...F,
184
+ ...y
185
+ }), L = /(-?[0-9.]*[0-9]+[0-9.]*)/g, ie = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
186
+ function R(e, t, n) {
187
+ if (t === 1) return e;
188
+ if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
189
+ if (typeof e != "string") return e;
190
+ let r = e.split(L);
191
+ if (r === null || !r.length) return e;
192
+ let i = [], a = r.shift(), o = ie.test(a);
193
+ for (;;) {
194
+ if (o) {
195
+ let e = parseFloat(a);
196
+ isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
197
+ } else i.push(a);
198
+ if (a = r.shift(), a === void 0) return i.join("");
199
+ o = !o;
200
+ }
201
+ }
202
+ function ae(e, t = "defs") {
203
+ let n = "", r = e.indexOf("<" + t);
204
+ for (; r >= 0;) {
205
+ let i = e.indexOf(">", r), a = e.indexOf("</" + t);
206
+ if (i === -1 || a === -1) break;
207
+ let o = e.indexOf(">", a);
208
+ if (o === -1) break;
209
+ n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
210
+ }
211
+ return {
212
+ defs: n,
213
+ content: e
214
+ };
215
+ }
216
+ function oe(e, t) {
217
+ return e ? "<defs>" + e + "</defs>" + t : t;
218
+ }
219
+ function se(e, t, n) {
220
+ let r = ae(e);
221
+ return oe(r.defs, t + r.content + n);
222
+ }
223
+ var ce = (e) => e === "unset" || e === "undefined" || e === "none";
224
+ function le(e, t) {
225
+ let n = {
226
+ ...b,
227
+ ...e
228
+ }, r = {
229
+ ...I,
230
+ ...t
231
+ }, i = {
232
+ left: n.left,
233
+ top: n.top,
234
+ width: n.width,
235
+ height: n.height
236
+ }, a = n.body;
237
+ [n, r].forEach((e) => {
238
+ let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
239
+ n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
240
+ let s;
241
+ switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
242
+ case 1:
243
+ s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
244
+ break;
245
+ case 2:
246
+ t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
247
+ break;
248
+ case 3:
249
+ s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
250
+ break;
251
+ }
252
+ o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = se(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
253
+ });
254
+ let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
255
+ o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = R(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? R(u, l / c) : s === "auto" ? l : s);
256
+ let f = {}, p = (e, t) => {
257
+ ce(t) || (f[e] = t.toString());
258
+ };
259
+ p("width", u), p("height", d);
260
+ let m = [
261
+ i.left,
262
+ i.top,
263
+ c,
264
+ l
265
+ ];
266
+ return f.viewBox = m.join(" "), {
267
+ attributes: f,
268
+ viewBox: m,
269
+ body: a
270
+ };
271
+ }
272
+ var ue = /\sid="(\S+)"/g, de = /* @__PURE__ */ new Map();
273
+ function fe(e) {
274
+ e = e.replace(/[0-9]+$/, "") || "a";
275
+ let t = de.get(e) || 0;
276
+ return de.set(e, t + 1), t ? `${e}${t}` : e;
277
+ }
278
+ function pe(e) {
279
+ let t = [], n;
280
+ for (; n = ue.exec(e);) t.push(n[1]);
281
+ if (!t.length) return e;
282
+ let r = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
283
+ return t.forEach((t) => {
284
+ let n = fe(t), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
285
+ e = e.replace(RegExp("([#;\"])(" + i + ")([\")]|\\.[a-z])", "g"), "$1" + n + r + "$3");
286
+ }), e = e.replace(new RegExp(r, "g"), ""), e;
287
+ }
288
+ var z = Object.create(null);
289
+ function me(e, t) {
290
+ z[e] = t;
291
+ }
292
+ function B(e) {
293
+ return z[e] || z[""];
294
+ }
295
+ function V(e) {
296
+ let t;
297
+ if (typeof e.resources == "string") t = [e.resources];
298
+ else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
299
+ return {
300
+ resources: t,
301
+ path: e.path || "/",
302
+ maxURL: e.maxURL || 500,
303
+ rotate: e.rotate || 750,
304
+ timeout: e.timeout || 5e3,
305
+ random: e.random === !0,
306
+ index: e.index || 0,
307
+ dataAfterTimeout: e.dataAfterTimeout !== !1
308
+ };
309
+ }
310
+ for (var H = Object.create(null), U = ["https://api.simplesvg.com", "https://api.unisvg.com"], W = []; U.length > 0;) U.length === 1 || Math.random() > .5 ? W.push(U.shift()) : W.push(U.pop());
311
+ H[""] = V({ resources: ["https://api.iconify.design"].concat(W) });
312
+ function he(e, t) {
313
+ let n = V(t);
314
+ return n === null ? !1 : (H[e] = n, !0);
315
+ }
316
+ function G(e) {
317
+ return H[e];
318
+ }
319
+ var ge = (() => {
320
+ let e;
321
+ try {
322
+ if (e = fetch, typeof e == "function") return e;
323
+ } catch {}
324
+ })();
325
+ function _e(e, t) {
326
+ let n = G(e);
327
+ if (!n) return 0;
328
+ let r;
329
+ if (!n.maxURL) r = 0;
330
+ else {
331
+ let e = 0;
332
+ n.resources.forEach((t) => {
333
+ e = Math.max(e, t.length);
334
+ });
335
+ let i = t + ".json?icons=";
336
+ r = n.maxURL - e - n.path.length - i.length;
337
+ }
338
+ return r;
339
+ }
340
+ function ve(e) {
341
+ return e === 404;
342
+ }
343
+ var ye = (e, t, n) => {
344
+ let r = [], i = _e(e, t), a = "icons", o = {
345
+ type: a,
346
+ provider: e,
347
+ prefix: t,
348
+ icons: []
349
+ }, s = 0;
350
+ return n.forEach((n, c) => {
351
+ s += n.length + 1, s >= i && c > 0 && (r.push(o), o = {
352
+ type: a,
353
+ provider: e,
354
+ prefix: t,
355
+ icons: []
356
+ }, s = n.length), o.icons.push(n);
357
+ }), r.push(o), r;
358
+ };
359
+ function be(e) {
360
+ if (typeof e == "string") {
361
+ let t = G(e);
362
+ if (t) return t.path;
363
+ }
364
+ return "/";
365
+ }
366
+ var xe = {
367
+ prepare: ye,
368
+ send: (e, t, n) => {
369
+ if (!ge) {
370
+ n("abort", 424);
371
+ return;
372
+ }
373
+ let r = be(t.provider);
374
+ switch (t.type) {
375
+ case "icons": {
376
+ let e = t.prefix, n = t.icons.join(","), i = new URLSearchParams({ icons: n });
377
+ r += e + ".json?" + i.toString();
378
+ break;
379
+ }
380
+ case "custom": {
381
+ let e = t.uri;
382
+ r += e.slice(0, 1) === "/" ? e.slice(1) : e;
383
+ break;
384
+ }
385
+ default:
386
+ n("abort", 400);
387
+ return;
388
+ }
389
+ let i = 503;
390
+ ge(e + r).then((e) => {
391
+ let t = e.status;
392
+ if (t !== 200) {
393
+ setTimeout(() => {
394
+ n(ve(t) ? "abort" : "next", t);
395
+ });
396
+ return;
397
+ }
398
+ return i = 501, e.json();
399
+ }).then((e) => {
400
+ if (typeof e != "object" || !e) {
401
+ setTimeout(() => {
402
+ e === 404 ? n("abort", e) : n("next", i);
403
+ });
404
+ return;
405
+ }
406
+ setTimeout(() => {
407
+ n("success", e);
408
+ });
409
+ }).catch(() => {
410
+ n("next", i);
411
+ });
412
+ }
413
+ };
414
+ function Se(e, t) {
415
+ e.forEach((e) => {
416
+ let n = e.loaderCallbacks;
417
+ n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
418
+ });
419
+ }
420
+ function Ce(e) {
421
+ e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
422
+ e.pendingCallbacksFlag = !1;
423
+ let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
424
+ if (!t.length) return;
425
+ let n = !1, r = e.provider, i = e.prefix;
426
+ t.forEach((t) => {
427
+ let a = t.icons, o = a.pending.length;
428
+ a.pending = a.pending.filter((t) => {
429
+ if (t.prefix !== i) return !0;
430
+ let o = t.name;
431
+ if (e.icons[o]) a.loaded.push({
432
+ provider: r,
433
+ prefix: i,
434
+ name: o
435
+ });
436
+ else if (e.missing.has(o)) a.missing.push({
437
+ provider: r,
438
+ prefix: i,
439
+ name: o
440
+ });
441
+ else return n = !0, !0;
442
+ return !1;
443
+ }), a.pending.length !== o && (n || Se([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
444
+ });
445
+ }));
446
+ }
447
+ var we = 0;
448
+ function Te(e, t, n) {
449
+ let r = we++, i = Se.bind(null, n, r);
450
+ if (!t.pending.length) return i;
451
+ let a = {
452
+ id: r,
453
+ icons: t,
454
+ callback: e,
455
+ abort: i
456
+ };
457
+ return n.forEach((e) => {
458
+ (e.loaderCallbacks ||= []).push(a);
459
+ }), i;
460
+ }
461
+ function Ee(e) {
462
+ let t = {
463
+ loaded: [],
464
+ missing: [],
465
+ pending: []
466
+ }, n = Object.create(null);
467
+ e.sort((e, t) => e.provider === t.provider ? e.prefix === t.prefix ? e.name.localeCompare(t.name) : e.prefix.localeCompare(t.prefix) : e.provider.localeCompare(t.provider));
468
+ let r = {
469
+ provider: "",
470
+ prefix: "",
471
+ name: ""
472
+ };
473
+ return e.forEach((e) => {
474
+ if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
475
+ r = e;
476
+ let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] = A(i, a)), l;
477
+ l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
478
+ let u = {
479
+ provider: i,
480
+ prefix: a,
481
+ name: o
482
+ };
483
+ l.push(u);
484
+ }), t;
485
+ }
486
+ function De(e, t = !0, n = !1) {
487
+ let r = [];
488
+ return e.forEach((e) => {
489
+ let i = typeof e == "string" ? h(e, t, n) : e;
490
+ i && r.push(i);
491
+ }), r;
492
+ }
493
+ var Oe = {
494
+ resources: [],
495
+ index: 0,
496
+ timeout: 2e3,
497
+ rotate: 750,
498
+ random: !1,
499
+ dataAfterTimeout: !1
500
+ };
501
+ function ke(e, t, n, r) {
502
+ let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
503
+ if (e.random) {
504
+ let t = e.resources.slice(0);
505
+ for (o = []; t.length > 1;) {
506
+ let e = Math.floor(Math.random() * t.length);
507
+ o.push(t[e]), t = t.slice(0, e).concat(t.slice(e + 1));
508
+ }
509
+ o = o.concat(t);
510
+ } else o = e.resources.slice(a).concat(e.resources.slice(0, a));
511
+ let s = Date.now(), c = "pending", l = 0, u, d = null, f = [], p = [];
512
+ typeof r == "function" && p.push(r);
513
+ function m() {
514
+ d &&= (clearTimeout(d), null);
515
+ }
516
+ function h() {
517
+ c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
518
+ e.status === "pending" && (e.status = "aborted");
519
+ }), f = [];
520
+ }
521
+ function g(e, t) {
522
+ t && (p = []), typeof e == "function" && p.push(e);
523
+ }
524
+ function _() {
525
+ return {
526
+ startTime: s,
527
+ payload: t,
528
+ status: c,
529
+ queriesSent: l,
530
+ queriesPending: f.length,
531
+ subscribe: g,
532
+ abort: h
533
+ };
534
+ }
535
+ function v() {
536
+ c = "failed", p.forEach((e) => {
537
+ e(void 0, u);
538
+ });
539
+ }
540
+ function y() {
541
+ f.forEach((e) => {
542
+ e.status === "pending" && (e.status = "aborted");
543
+ }), f = [];
544
+ }
545
+ function b(t, n, r) {
546
+ let i = n !== "success";
547
+ switch (f = f.filter((e) => e !== t), c) {
548
+ case "pending": break;
549
+ case "failed":
550
+ if (i || !e.dataAfterTimeout) return;
551
+ break;
552
+ default: return;
553
+ }
554
+ if (n === "abort") {
555
+ u = r, v();
556
+ return;
557
+ }
558
+ if (i) {
559
+ u = r, f.length || (o.length ? x() : v());
560
+ return;
561
+ }
562
+ if (m(), y(), !e.random) {
563
+ let n = e.resources.indexOf(t.resource);
564
+ n !== -1 && n !== e.index && (e.index = n);
565
+ }
566
+ c = "completed", p.forEach((e) => {
567
+ e(r);
568
+ });
569
+ }
570
+ function x() {
571
+ if (c !== "pending") return;
572
+ m();
573
+ let r = o.shift();
574
+ if (r === void 0) {
575
+ if (f.length) {
576
+ d = setTimeout(() => {
577
+ m(), c === "pending" && (y(), v());
578
+ }, e.timeout);
579
+ return;
580
+ }
581
+ v();
582
+ return;
583
+ }
584
+ let i = {
585
+ status: "pending",
586
+ resource: r,
587
+ callback: (e, t) => {
588
+ b(i, e, t);
589
+ }
590
+ };
591
+ f.push(i), l++, d = setTimeout(x, e.rotate), n(r, t, i.callback);
592
+ }
593
+ return setTimeout(x), _;
594
+ }
595
+ function Ae(e) {
596
+ let t = {
597
+ ...Oe,
598
+ ...e
599
+ }, n = [];
600
+ function r() {
601
+ n = n.filter((e) => e().status === "pending");
602
+ }
603
+ function i(e, i, a) {
604
+ let o = ke(t, e, i, (e, t) => {
605
+ r(), a && a(e, t);
606
+ });
607
+ return n.push(o), o;
608
+ }
609
+ function a(e) {
610
+ return n.find((t) => e(t)) || null;
611
+ }
612
+ return {
613
+ query: i,
614
+ find: a,
615
+ setIndex: (e) => {
616
+ t.index = e;
617
+ },
618
+ getIndex: () => t.index,
619
+ cleanup: r
620
+ };
621
+ }
622
+ function je() {}
623
+ var K = Object.create(null);
624
+ function Me(e) {
625
+ if (!K[e]) {
626
+ let t = G(e);
627
+ if (!t) return;
628
+ K[e] = {
629
+ config: t,
630
+ redundancy: Ae(t)
631
+ };
632
+ }
633
+ return K[e];
634
+ }
635
+ function Ne(e, t, n) {
636
+ let r, i;
637
+ if (typeof e == "string") {
638
+ let t = B(e);
639
+ if (!t) return n(void 0, 424), je;
640
+ i = t.send;
641
+ let a = Me(e);
642
+ a && (r = a.redundancy);
643
+ } else {
644
+ let t = V(e);
645
+ if (t) {
646
+ r = Ae(t);
647
+ let n = B(e.resources ? e.resources[0] : "");
648
+ n && (i = n.send);
649
+ }
650
+ }
651
+ return !r || !i ? (n(void 0, 424), je) : r.query(t, i, n)().abort;
652
+ }
653
+ function Pe() {}
654
+ function Fe(e) {
655
+ e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
656
+ e.iconsLoaderFlag = !1, Ce(e);
657
+ }));
658
+ }
659
+ function Ie(e) {
660
+ let t = [], n = [];
661
+ return e.forEach((e) => {
662
+ (e.match(m) ? t : n).push(e);
663
+ }), {
664
+ valid: t,
665
+ invalid: n
666
+ };
667
+ }
668
+ function q(e, t, n) {
669
+ function r() {
670
+ let n = e.pendingIcons;
671
+ t.forEach((t) => {
672
+ n && n.delete(t), e.icons[t] || e.missing.add(t);
673
+ });
674
+ }
675
+ if (n && typeof n == "object") try {
676
+ if (!j(e, n).length) {
677
+ r();
678
+ return;
679
+ }
680
+ } catch (e) {
681
+ console.error(e);
682
+ }
683
+ r(), Fe(e);
684
+ }
685
+ function Le(e, t) {
686
+ e instanceof Promise ? e.then((e) => {
687
+ t(e);
688
+ }).catch(() => {
689
+ t(null);
690
+ }) : t(e);
691
+ }
692
+ function Re(e, t) {
693
+ e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
694
+ e.iconsQueueFlag = !1;
695
+ let { provider: t, prefix: n } = e, r = e.iconsToLoad;
696
+ if (delete e.iconsToLoad, !r || !r.length) return;
697
+ let i = e.loadIcon;
698
+ if (e.loadIcons && (r.length > 1 || !i)) {
699
+ Le(e.loadIcons(r, n, t), (t) => {
700
+ q(e, r, t);
701
+ });
702
+ return;
703
+ }
704
+ if (i) {
705
+ r.forEach((r) => {
706
+ Le(i(r, n, t), (t) => {
707
+ q(e, [r], t ? {
708
+ prefix: n,
709
+ icons: { [r]: t }
710
+ } : null);
711
+ });
712
+ });
713
+ return;
714
+ }
715
+ let { valid: a, invalid: o } = Ie(r);
716
+ if (o.length && q(e, o, null), !a.length) return;
717
+ let s = n.match(m) ? B(t) : null;
718
+ if (!s) {
719
+ q(e, a, null);
720
+ return;
721
+ }
722
+ s.prepare(t, n, a).forEach((n) => {
723
+ Ne(t, n, (t) => {
724
+ q(e, n.icons, t);
725
+ });
726
+ });
727
+ }));
728
+ }
729
+ var ze = (e, t) => {
730
+ let n = Ee(De(e, !0, P()));
731
+ if (!n.pending.length) {
732
+ let e = !0;
733
+ return t && setTimeout(() => {
734
+ e && t(n.loaded, n.missing, n.pending, Pe);
735
+ }), () => {
736
+ e = !1;
737
+ };
738
+ }
739
+ let r = Object.create(null), i = [], a, o;
740
+ return n.pending.forEach((e) => {
741
+ let { provider: t, prefix: n } = e;
742
+ if (n === o && t === a) return;
743
+ a = t, o = n, i.push(A(t, n));
744
+ let s = r[t] || (r[t] = Object.create(null));
745
+ s[n] || (s[n] = []);
746
+ }), n.pending.forEach((e) => {
747
+ let { provider: t, prefix: n, name: i } = e, a = A(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
748
+ o.has(i) || (o.add(i), r[t][n].push(i));
749
+ }), i.forEach((e) => {
750
+ let t = r[e.provider][e.prefix];
751
+ t.length && Re(e, t);
752
+ }), t ? Te(t, n, i) : Pe;
753
+ };
754
+ function Be(e, t) {
755
+ let n = { ...e };
756
+ for (let e in t) {
757
+ let r = t[e], i = typeof r;
758
+ e in F ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
759
+ }
760
+ return n;
761
+ }
762
+ var Ve = /[\s,]+/;
763
+ function He(e, t) {
764
+ t.split(Ve).forEach((t) => {
765
+ switch (t.trim()) {
766
+ case "horizontal":
767
+ e.hFlip = !0;
768
+ break;
769
+ case "vertical":
770
+ e.vFlip = !0;
771
+ break;
772
+ }
773
+ });
774
+ }
775
+ function Ue(e, t = 0) {
776
+ let n = e.replace(/^-?[0-9.]*/, "");
777
+ function r(e) {
778
+ for (; e < 0;) e += 4;
779
+ return e % 4;
780
+ }
781
+ if (n === "") {
782
+ let t = parseInt(e);
783
+ return isNaN(t) ? 0 : r(t);
784
+ } else if (n !== e) {
785
+ let t = 0;
786
+ switch (n) {
787
+ case "%":
788
+ t = 25;
789
+ break;
790
+ case "deg": t = 90;
791
+ }
792
+ if (t) {
793
+ let i = parseFloat(e.slice(0, e.length - n.length));
794
+ return isNaN(i) ? 0 : (i /= t, i % 1 == 0 ? r(i) : 0);
795
+ }
796
+ }
797
+ return t;
798
+ }
799
+ function We(e, t) {
800
+ let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
801
+ for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
802
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
803
+ }
804
+ function Ge(e) {
805
+ return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
806
+ }
807
+ function Ke(e) {
808
+ return "data:image/svg+xml," + Ge(e);
809
+ }
810
+ function qe(e) {
811
+ return "url(\"" + Ke(e) + "\")";
812
+ }
813
+ var Je = {
814
+ ...I,
815
+ inline: !1
816
+ }, Ye = {
817
+ xmlns: "http://www.w3.org/2000/svg",
818
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
819
+ "aria-hidden": !0,
820
+ role: "img"
821
+ }, Xe = { display: "inline-block" }, J = { backgroundColor: "currentColor" }, Ze = { backgroundColor: "transparent" }, Qe = {
822
+ Image: "var(--svg)",
823
+ Repeat: "no-repeat",
824
+ Size: "100% 100%"
825
+ }, $e = {
826
+ webkitMask: J,
827
+ mask: J,
828
+ background: Ze
829
+ };
830
+ for (let e in $e) {
831
+ let t = $e[e];
832
+ for (let n in Qe) t[e + n] = Qe[n];
833
+ }
834
+ var Y = {};
835
+ ["horizontal", "vertical"].forEach((e) => {
836
+ let t = e.slice(0, 1) + "Flip";
837
+ Y[e + "-flip"] = t, Y[e.slice(0, 1) + "-flip"] = t, Y[e + "Flip"] = t;
838
+ });
839
+ function et(e) {
840
+ return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
841
+ }
842
+ var tt = (e, t) => {
843
+ let n = Be(Je, t), r = { ...Ye }, i = t.mode || "svg", o = {}, s = t.style, c = typeof s == "object" && !(s instanceof Array) ? s : {};
844
+ for (let e in t) {
845
+ let i = t[e];
846
+ if (i !== void 0) switch (e) {
847
+ case "icon":
848
+ case "style":
849
+ case "onLoad":
850
+ case "mode":
851
+ case "ssr":
852
+ case "customise": break;
853
+ case "inline":
854
+ case "hFlip":
855
+ case "vFlip":
856
+ n[e] = i === !0 || i === "true" || i === 1;
857
+ break;
858
+ case "flip":
859
+ typeof i == "string" && He(n, i);
860
+ break;
861
+ case "color":
862
+ o.color = i;
863
+ break;
864
+ case "rotate":
865
+ typeof i == "string" ? n[e] = Ue(i) : typeof i == "number" && (n[e] = i);
866
+ break;
867
+ case "ariaHidden":
868
+ case "aria-hidden":
869
+ i !== !0 && i !== "true" && delete r["aria-hidden"];
870
+ break;
871
+ default: {
872
+ let t = Y[e];
873
+ t ? (i === !0 || i === "true" || i === 1) && (n[t] = !0) : Je[e] === void 0 && (r[e] = i);
874
+ }
875
+ }
876
+ }
877
+ let l = le(e, n), u = l.attributes;
878
+ if (n.inline && (o.verticalAlign = "-0.125em"), i === "svg") return r.style = {
879
+ ...o,
880
+ ...c
881
+ }, Object.assign(r, u), r.innerHTML = pe(l.body), a("svg", r);
882
+ let { body: d, width: f, height: p } = e, m = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), h = We(d, {
883
+ ...u,
884
+ width: f + "",
885
+ height: p + ""
886
+ });
887
+ return r.style = {
888
+ ...o,
889
+ "--svg": qe(h),
890
+ width: et(u.width),
891
+ height: et(u.height),
892
+ ...Xe,
893
+ ...m ? J : Ze,
894
+ ...c
895
+ }, a("span", r);
896
+ };
897
+ if (P(!0), me("", xe), typeof document < "u" && typeof window < "u") {
898
+ let e = window;
899
+ if (e.IconifyPreload !== void 0) {
900
+ let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
901
+ typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
902
+ try {
903
+ (typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !re(e)) && console.error(n);
904
+ } catch {
905
+ console.error(n);
906
+ }
907
+ });
908
+ }
909
+ if (e.IconifyProviders !== void 0) {
910
+ let t = e.IconifyProviders;
911
+ if (typeof t == "object" && t) for (let e in t) {
912
+ let n = "IconifyProviders[" + e + "] is invalid.";
913
+ try {
914
+ let r = t[e];
915
+ if (typeof r != "object" || !r || r.resources === void 0) continue;
916
+ he(e, r) || console.error(n);
917
+ } catch {
918
+ console.error(n);
919
+ }
920
+ }
921
+ }
922
+ }
923
+ var nt = {
924
+ ...b,
925
+ body: ""
926
+ }, rt = r((e, { emit: t }) => {
927
+ let n = d(null);
928
+ function r() {
929
+ n.value &&= (n.value.abort?.(), null);
930
+ }
931
+ let i = d(!!e.ssr), a = d(""), o = f(null);
932
+ function s() {
933
+ let i = e.icon;
934
+ if (typeof i == "object" && i && typeof i.body == "string") return a.value = "", { data: i };
935
+ let o;
936
+ if (typeof i != "string" || (o = h(i, !1, !0)) === null) return null;
937
+ let s = te(o);
938
+ if (!s) {
939
+ let e = n.value;
940
+ return (!e || e.name !== i) && (s === null ? n.value = { name: i } : n.value = {
941
+ name: i,
942
+ abort: ze([o], m)
943
+ }), null;
944
+ }
945
+ r(), a.value !== i && (a.value = i, c(() => {
946
+ t("load", i);
947
+ }));
948
+ let l = e.customise;
949
+ if (l) {
950
+ s = Object.assign({}, s);
951
+ let e = l(s.body, o.name, o.prefix, o.provider);
952
+ typeof e == "string" && (s.body = e);
953
+ }
954
+ let u = ["iconify"];
955
+ return o.prefix !== "" && u.push("iconify--" + o.prefix), o.provider !== "" && u.push("iconify--" + o.provider), {
956
+ data: s,
957
+ classes: u
958
+ };
959
+ }
960
+ function m() {
961
+ let e = s();
962
+ e ? e.data !== o.value?.data && (o.value = e) : o.value = null;
963
+ }
964
+ return i.value ? m() : l(() => {
965
+ i.value = !0, m();
966
+ }), p(() => e.icon, m), u(r), () => {
967
+ let t = o.value;
968
+ if (!t) return tt(nt, e);
969
+ let n = e;
970
+ return t.classes && (n = {
971
+ ...e,
972
+ class: t.classes.join(" ")
973
+ }), tt({
974
+ ...b,
975
+ ...t.data
976
+ }, n);
977
+ };
978
+ }, {
979
+ props: [
980
+ "icon",
981
+ "mode",
982
+ "ssr",
983
+ "width",
984
+ "height",
985
+ "style",
986
+ "color",
987
+ "inline",
988
+ "rotate",
989
+ "hFlip",
990
+ "horizontalFlip",
991
+ "vFlip",
992
+ "verticalFlip",
993
+ "flip",
994
+ "id",
995
+ "ariaHidden",
996
+ "customise",
997
+ "title"
998
+ ],
999
+ emits: ["load"]
1000
+ }), it = Symbol("ccuiFormItem"), at = /* @__PURE__ */ new Set();
1001
+ function X(e, t, n) {
1002
+ let r = `${e}.${t}`;
1003
+ at.has(r) || (at.add(r), typeof console < "u" && console.warn(`[ccui][${e}] ${t} 已 deprecated,请改用 ${n}。`));
1004
+ }
1005
+ function Z(e, t, n) {
1006
+ return e ? Object.prototype.hasOwnProperty.call(e, t) || Object.prototype.hasOwnProperty.call(e, n) : !1;
1007
+ }
1008
+ //#endregion
1009
+ //#region ../ccui/ui/shared/hooks/use-namespace.ts
1010
+ function Q(e, t, n) {
1011
+ let r = e;
1012
+ return t && (r += `__${t}`), n && (r += `--${n}`), r;
1013
+ }
1014
+ function ot(e, t = !1) {
1015
+ let n = t ? `.ccui-${e}` : `ccui-${e}`;
1016
+ return {
1017
+ b: () => Q(n),
1018
+ e: (e) => e ? Q(n, e) : "",
1019
+ m: (e) => e ? Q(n, "", e) : "",
1020
+ em: (e, t) => e && t ? Q(n, e, t) : "",
1021
+ is: (e) => `is-${e}`
1022
+ };
1023
+ }
1024
+ //#endregion
1025
+ //#region ../ccui/ui/input/src/input-types.ts
1026
+ var st = {
1027
+ type: {
1028
+ type: String,
1029
+ default: "text"
1030
+ },
1031
+ size: {
1032
+ type: String,
1033
+ default: "default"
1034
+ },
1035
+ placeholder: {
1036
+ type: String,
1037
+ default: ""
1038
+ },
1039
+ disabled: {
1040
+ type: Boolean,
1041
+ default: !1
1042
+ },
1043
+ readonly: {
1044
+ type: Boolean,
1045
+ default: !1
1046
+ },
1047
+ clearable: {
1048
+ type: Boolean,
1049
+ default: !1
1050
+ },
1051
+ allowClear: {
1052
+ type: [Boolean, Object],
1053
+ default: void 0
1054
+ },
1055
+ showPassword: {
1056
+ type: Boolean,
1057
+ default: !1
1058
+ },
1059
+ prepend: {
1060
+ type: String,
1061
+ default: ""
1062
+ },
1063
+ append: {
1064
+ type: String,
1065
+ default: ""
1066
+ },
1067
+ addonBefore: {
1068
+ type: String,
1069
+ default: ""
1070
+ },
1071
+ addonAfter: {
1072
+ type: String,
1073
+ default: ""
1074
+ },
1075
+ maxLength: {
1076
+ type: Number,
1077
+ default: void 0
1078
+ },
1079
+ showCount: {
1080
+ type: [Boolean, Object],
1081
+ default: !1
1082
+ },
1083
+ status: {
1084
+ type: String,
1085
+ default: ""
1086
+ },
1087
+ variant: {
1088
+ type: String,
1089
+ default: "outlined"
1090
+ },
1091
+ defaultValue: {
1092
+ type: String,
1093
+ default: void 0
1094
+ },
1095
+ modelValue: {
1096
+ type: String,
1097
+ default: ""
1098
+ },
1099
+ classNames: {
1100
+ type: Object,
1101
+ default: void 0
1102
+ },
1103
+ styles: {
1104
+ type: Object,
1105
+ default: void 0
1106
+ }
1107
+ };
1108
+ //#endregion
1109
+ //#region ../ccui/ui/input/src/input.tsx
1110
+ function ct(e) {
1111
+ return e.includes(":");
1112
+ }
1113
+ function lt(e) {
1114
+ return typeof e == "object" && !!e && !Array.isArray(e);
1115
+ }
1116
+ function ut(e) {
1117
+ return typeof e == "object" && !!e && !Array.isArray(e);
1118
+ }
1119
+ var $ = /* @__PURE__ */ r({
1120
+ name: "CInput",
1121
+ props: st,
1122
+ emits: [
1123
+ "update:modelValue",
1124
+ "input",
1125
+ "change",
1126
+ "focus",
1127
+ "blur",
1128
+ "clear",
1129
+ "press-enter"
1130
+ ],
1131
+ setup(r, { emit: a, slots: c }) {
1132
+ let l = ot("input"), u = d(null), f = o(it, null), m = t(() => f?.validateStatus.value ?? ""), h = t(() => r.status || m.value), g = i()?.vnode.props;
1133
+ Z(g, "clearable", "clearable") && X("Input", "clearable", "allowClear"), Z(g, "prepend", "prepend") && X("Input", "prepend", "addonBefore"), Z(g, "append", "append") && X("Input", "append", "addonAfter");
1134
+ let _ = d(r.modelValue === "" ? r.defaultValue ?? "" : r.modelValue), v = d(!1), y = d(!1), b = t(() => r.type === "password" && r.showPassword), x = t(() => r.type === "password" && b.value && y.value ? "text" : r.type), S = t(() => r.allowClear === void 0 ? r.clearable : r.allowClear), C = t(() => {
1135
+ let e = S.value;
1136
+ return typeof e == "boolean" ? e : e != null;
1137
+ }), ee = t(() => {
1138
+ let e = S.value;
1139
+ return lt(e) ? e.clearIcon : void 0;
1140
+ }), w = t(() => r.addonBefore || r.prepend), T = t(() => r.addonAfter || r.append), E = t(() => !!w.value || !!c["addon-before"] || !!c.prepend), D = t(() => !!T.value || !!c["addon-after"] || !!c.append), O = t(() => {
1141
+ let e = r.showCount;
1142
+ return typeof e == "boolean" ? e : e != null;
1143
+ }), k = t(() => {
1144
+ let e = r.showCount;
1145
+ return ut(e) ? e.formatter : void 0;
1146
+ }), A = t(() => {
1147
+ if (!O.value) return "";
1148
+ let e = _.value ?? "", t = e.length, n = r.maxLength;
1149
+ return k.value ? k.value({
1150
+ value: e,
1151
+ count: t,
1152
+ maxLength: n
1153
+ }) : n === void 0 ? `${t}` : `${t} / ${n}`;
1154
+ }), j = t(() => {
1155
+ let e = !r.disabled && !r.readonly && (C.value || b.value) || !!c.suffix || O.value, t = !!c.prefix;
1156
+ return {
1157
+ [l.b()]: !0,
1158
+ [l.m(r.size)]: !!r.size,
1159
+ [l.m("disabled")]: r.disabled,
1160
+ [l.m("readonly")]: r.readonly,
1161
+ [l.m("clearable")]: C.value,
1162
+ [l.m("suffix")]: e,
1163
+ [l.m("prefix")]: t,
1164
+ [l.m(`status-${h.value}`)]: !!h.value,
1165
+ [l.m(`variant-${r.variant}`)]: !!r.variant
1166
+ };
1167
+ }), M = t(() => ({
1168
+ [l.e("wrapper")]: !0,
1169
+ [l.em("wrapper", r.size)]: !!r.size,
1170
+ [l.em("wrapper", "disabled")]: r.disabled,
1171
+ [l.em("wrapper", `status-${h.value}`)]: !!h.value,
1172
+ [l.em("wrapper", `variant-${r.variant}`)]: !!r.variant
1173
+ })), N = t(() => ({
1174
+ [l.e("inner")]: !0,
1175
+ [l.m(r.size)]: !!r.size,
1176
+ [l.m("disabled")]: r.disabled,
1177
+ [l.m("readonly")]: r.readonly
1178
+ })), P = (e) => {
1179
+ _.value = e, a("update:modelValue", e), a("input", e), f?.validate("change");
1180
+ }, te = (e) => {
1181
+ let t = e.target;
1182
+ P(t.value);
1183
+ }, ne = (e) => {
1184
+ let t = e.target;
1185
+ a("change", t.value);
1186
+ }, re = (e) => {
1187
+ v.value = !0, a("focus", e);
1188
+ }, F = (e) => {
1189
+ v.value = !1, a("blur", e), f?.validate("blur");
1190
+ }, I = (e) => {
1191
+ e.key === "Enter" && a("press-enter", e);
1192
+ }, L = () => {
1193
+ P(""), a("clear");
1194
+ }, ie = () => {
1195
+ y.value = !y.value;
1196
+ };
1197
+ p(() => r.modelValue, (e) => {
1198
+ e !== _.value && (_.value = e);
1199
+ });
1200
+ let R = () => {
1201
+ let e = ee.value;
1202
+ return e ? typeof e == "string" ? ct(e) ? n("span", {
1203
+ class: l.e("clear"),
1204
+ onClick: L
1205
+ }, [n(rt, { icon: e }, null)]) : n("i", {
1206
+ class: [l.e("clear"), e],
1207
+ onClick: L
1208
+ }, null) : n("span", {
1209
+ class: l.e("clear"),
1210
+ onClick: L
1211
+ }, [e]) : n("i", {
1212
+ class: l.e("clear"),
1213
+ onClick: L
1214
+ }, null);
1215
+ }, ae = () => {
1216
+ if (!E.value) return null;
1217
+ let e = c["addon-before"] ? c["addon-before"]() : c.prepend?.();
1218
+ return n("div", { class: l.e("prepend") }, [e ?? n("span", null, [w.value])]);
1219
+ }, oe = () => {
1220
+ if (!D.value) return null;
1221
+ let e = c["addon-after"] ? c["addon-after"]() : c.append?.();
1222
+ return n("div", { class: l.e("append") }, [e ?? n("span", null, [T.value])]);
1223
+ }, se = () => {
1224
+ let e = !r.disabled && !r.readonly, t = e && C.value && !!_.value, i = e && b.value, a = !!c.suffix, o = O.value;
1225
+ return !t && !i && !a && !o ? null : n("div", { class: l.e("suffix") }, [
1226
+ t && R(),
1227
+ i && n("i", {
1228
+ class: y.value ? l.e("password-visible") : l.e("password-hidden"),
1229
+ onClick: ie
1230
+ }, null),
1231
+ a && c.suffix(),
1232
+ o && n("span", { class: l.e("count") }, [A.value])
1233
+ ]);
1234
+ }, ce = () => ({
1235
+ ref: u,
1236
+ class: [N.value, r.classNames?.input],
1237
+ style: r.styles?.input,
1238
+ placeholder: r.placeholder,
1239
+ disabled: r.disabled,
1240
+ readonly: r.readonly,
1241
+ maxlength: r.maxLength,
1242
+ value: _.value,
1243
+ onInput: te,
1244
+ onChange: ne,
1245
+ onFocus: re,
1246
+ onBlur: F,
1247
+ onKeydown: I
1248
+ });
1249
+ return () => {
1250
+ let t = ae(), i = oe(), a = n("input", s(ce(), { type: x.value }), null), o = n(e, null, [
1251
+ c.prefix && n("div", { class: l.e("prefix") }, [c.prefix()]),
1252
+ a,
1253
+ se()
1254
+ ]);
1255
+ return t || i ? n("div", {
1256
+ class: [j.value, r.classNames?.root],
1257
+ style: r.styles?.root
1258
+ }, [
1259
+ t,
1260
+ n("div", {
1261
+ class: [M.value, r.classNames?.wrapper],
1262
+ style: r.styles?.wrapper
1263
+ }, [o]),
1264
+ i
1265
+ ]) : n("div", {
1266
+ class: [
1267
+ {
1268
+ ...j.value,
1269
+ ...M.value
1270
+ },
1271
+ r.classNames?.root,
1272
+ r.classNames?.wrapper
1273
+ ],
1274
+ style: [r.styles?.root, r.styles?.wrapper]
1275
+ }, [o]);
1276
+ };
1277
+ }
1278
+ });
1279
+ //#endregion
1280
+ //#region ../ccui/ui/input/index.ts
1281
+ $.install = function(e) {
1282
+ e.component($.name, $);
1283
+ };
1284
+ var dt = {
1285
+ title: "Input 输入框",
1286
+ category: "数据录入",
1287
+ status: "100%",
1288
+ install(e) {
1289
+ e.component($.name, $);
1290
+ }
1291
+ };
1292
+ //#endregion
1293
+ export { $ as Input, dt as default };