centui 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/dist/ActionBar-Bs5fkyFH.cjs +1 -0
  2. package/dist/ActionBar-CF1zMUMC.js +56 -0
  3. package/dist/ActivityIndicator-BOZRJBDn.cjs +1 -0
  4. package/dist/{RollerSuccess-CVEmS9gU.js → ActivityIndicator-Cp20c1E0.js} +30 -92
  5. package/dist/{Agree-DT46e5q5.cjs → Agree-ZswFiFNy.cjs} +1 -1
  6. package/dist/{Agree-yTGTi4e6.js → Agree-lAcOo38C.js} +2 -3
  7. package/dist/Amount-B2StZGGW.js +56 -0
  8. package/dist/Amount-CU7Oc4vv.cjs +1 -0
  9. package/dist/Bill-DDVs3Lu3.cjs +1 -0
  10. package/dist/Bill-qQ4LdkmR.js +58 -0
  11. package/dist/{Button-Blpwwbnw.cjs → Button-Bu8liJQE.cjs} +1 -1
  12. package/dist/{Button-BIi6CrwM.js → Button-D7e-cuA1.js} +5 -6
  13. package/dist/Captcha-BEF-de8-.cjs +1 -0
  14. package/dist/Captcha-CgpynYTc.js +283 -0
  15. package/dist/Cashier-CJLfQOXm.js +363 -0
  16. package/dist/Cashier-CLJngM0n.cjs +1 -0
  17. package/dist/{CellItem-YZD-BxKt.js → CellItem-BHEh4Cp-.js} +2 -3
  18. package/dist/{CellItem-T78DHako.cjs → CellItem-J0LkwZNL.cjs} +1 -1
  19. package/dist/Chart-BINJAx7V.js +135 -0
  20. package/dist/Chart-DJ0Q1g1P.cjs +1 -0
  21. package/dist/CheckBox-D5bCJUXD.js +55 -0
  22. package/dist/CheckBox-DDeCshDK.cjs +1 -0
  23. package/dist/CheckBoxBase-BIPGJ-TD.js +43 -0
  24. package/dist/CheckBoxBase-CobK6-tL.cjs +1 -0
  25. package/dist/CheckList-BsKo_Fl3.cjs +1 -0
  26. package/dist/{CheckList-Bfy3B-eN.js → CheckList-ViiCo4yi.js} +47 -91
  27. package/dist/{Codebox-D0UtCj11.js → Codebox-BLPrFnIv.js} +4 -5
  28. package/dist/Codebox-yLkdTU7w.cjs +1 -0
  29. package/dist/{DatePicker-B1AVbKhK.cjs → DatePicker-CCU6gqG3.cjs} +1 -1
  30. package/dist/{DatePicker-TAHuve5t.js → DatePicker-CYvPJatt.js} +2 -4
  31. package/dist/DetailItem-D6-zbZmd.js +21 -0
  32. package/dist/DetailItem-DDJXXao0.cjs +1 -0
  33. package/dist/Dialog-208_XUAL.cjs +1 -0
  34. package/dist/Dialog-Bb7Gth3j.js +148 -0
  35. package/dist/DropMenu-5TA_6bas.js +95 -0
  36. package/dist/DropMenu-D_ZMGOOi.cjs +1 -0
  37. package/dist/{Field-CseJzTZz.js → Field-0hdNWFNm.js} +1 -2
  38. package/dist/{FieldItem-Cc7bw5vU.js → FieldItem-D79w330m.js} +2 -3
  39. package/dist/{FieldItem-Dkpx5Kxk.cjs → FieldItem-UFKrl_5J.cjs} +1 -1
  40. package/dist/{Icon-jaEPn7d7.cjs → Icon-83WWqE5z.cjs} +1 -1
  41. package/dist/{Icon-dWGSK6Ou.js → Icon-BgCtu0ZV.js} +3 -5
  42. package/dist/ImageReader-DjshA_hh.cjs +1 -0
  43. package/dist/ImageReader-hUb5CEbV.js +122 -0
  44. package/dist/ImageViewer-BCEK4DOF.cjs +1 -0
  45. package/dist/ImageViewer-_dTRCIsV.js +68 -0
  46. package/dist/InputItem-DO5Yo_IH.cjs +1 -0
  47. package/dist/InputItem-yHsLFvKt.js +327 -0
  48. package/dist/Landscape-BsHyoM4N.cjs +1 -0
  49. package/dist/Landscape-Dd0abEy1.js +73 -0
  50. package/dist/LicensePlate-CTcAIbcb.js +201 -0
  51. package/dist/LicensePlate-CfwpVw0G.cjs +1 -0
  52. package/dist/NoticeBar-CV355FeO.cjs +1 -0
  53. package/dist/NoticeBar-G5aKL6VO.js +92 -0
  54. package/dist/NumberKeyboard-BWpxsbYt.cjs +1 -0
  55. package/dist/{NumberKeyboard-C7TRF5iC.js → NumberKeyboard-B_TJXxki.js} +77 -62
  56. package/dist/Picker-BOEGTBaN.cjs +1 -0
  57. package/dist/{Picker-Dam0LEcc.js → Picker-CA-JQ_OC.js} +168 -151
  58. package/dist/Popup-Ca1jPi0t.cjs +1 -0
  59. package/dist/Popup-qLk-BsRS.js +116 -0
  60. package/dist/{PopupTitleBar-nVurLaOe.js → PopupTitleBar-9P4RUMC1.js} +2 -3
  61. package/dist/{PopupTitleBar-B4vwxKC7.cjs → PopupTitleBar-Bfl49eYJ.cjs} +1 -1
  62. package/dist/Progress-CT-LHaQ0.cjs +1 -0
  63. package/dist/{Progress-CwIC6scr.js → Progress-Clet0W_n.js} +20 -22
  64. package/dist/Radio-B_MxJ65X.cjs +1 -0
  65. package/dist/{Radio-fsc7_N5K.js → Radio-DY-ZX0BP.js} +16 -14
  66. package/dist/{RadioGroup-CMPmk8X_.js → RadioGroup-B00aqM9e.js} +8 -6
  67. package/dist/RadioGroup-B6ukqnm5.cjs +1 -0
  68. package/dist/{RadioList-upQgua8Z.cjs → RadioList-D-9PITpr.cjs} +1 -1
  69. package/dist/{RadioList-CkerkQEY.js → RadioList-DNGsEzgf.js} +6 -8
  70. package/dist/ResultPage-DUs8ok5R.js +64 -0
  71. package/dist/ResultPage-YQWDaFmz.cjs +1 -0
  72. package/dist/{Roller-DFJ7jMV0.js → Roller-BznN57fL.js} +1 -2
  73. package/dist/RollerSuccess-BbMzNlkv.cjs +1 -0
  74. package/dist/RollerSuccess-CTh43Rh0.js +65 -0
  75. package/dist/Ruler-Bhf5J7hU.js +136 -0
  76. package/dist/Ruler-CEzB0oqG.cjs +1 -0
  77. package/dist/ScrollView-BNY62f7B.js +228 -0
  78. package/dist/ScrollView-BnadVBJC.cjs +1 -0
  79. package/dist/ScrollViewMore-BL1vpyMj.cjs +1 -0
  80. package/dist/ScrollViewMore-DBhoiI1X.js +54 -0
  81. package/dist/Selector-DOU8Af55.js +209 -0
  82. package/dist/Selector-DnFvOGbv.cjs +1 -0
  83. package/dist/{Skeleton-BG_j23KI.js → Skeleton-DqA5IxL5.js} +1 -2
  84. package/dist/Slider-BB2Nhpys.js +100 -0
  85. package/dist/Slider-vV7_nULf.cjs +1 -0
  86. package/dist/Stepper-BnDhL8IO.js +137 -0
  87. package/dist/Stepper-n_mc16V2.cjs +1 -0
  88. package/dist/Steps-BPQwab3T.js +157 -0
  89. package/dist/Steps-Dfpmgl8B.cjs +1 -0
  90. package/dist/SwiperItem-BY5cUoGn.cjs +1 -0
  91. package/dist/SwiperItem-BydyBdYU.js +323 -0
  92. package/dist/Switch-B1rsBY-M.js +31 -0
  93. package/dist/Switch-CghubImq.cjs +1 -0
  94. package/dist/TabPane-BCVsdptu.cjs +1 -0
  95. package/dist/TabPane-Q7oUFzmP.js +237 -0
  96. package/dist/TabPicker-BcL9assY.cjs +1 -0
  97. package/dist/TabPicker-BicPrto7.js +173 -0
  98. package/dist/Tag-C7ygxOwU.js +78 -0
  99. package/dist/Tag-CIA2npnD.cjs +1 -0
  100. package/dist/TextareaItem-Dl-PCLl-.js +168 -0
  101. package/dist/TextareaItem-Du5nl7tv.cjs +1 -0
  102. package/dist/{Tip-BFZSiRc1.js → Tip-DHPmevlv.js} +2 -3
  103. package/dist/{Tip-C3brAF9N.cjs → Tip-De_3tKtb.cjs} +1 -1
  104. package/dist/Transition-B-baX512.js +14 -0
  105. package/dist/Transition-Bwbqr4Xr.cjs +1 -0
  106. package/dist/WaterMark-CgkuQjv3.js +103 -0
  107. package/dist/WaterMark-M81jg6T5.cjs +1 -0
  108. package/dist/action-bar.cjs +1 -0
  109. package/dist/action-bar.d.ts +1 -0
  110. package/dist/action-bar.js +1 -0
  111. package/dist/{action-sheet-LJilF3EQ.cjs → action-sheet-BjaReHkr.cjs} +1 -1
  112. package/dist/{action-sheet-DKpi2GLQ.js → action-sheet-Da8dHevy.js} +15 -12
  113. package/dist/action-sheet.cjs +1 -1
  114. package/dist/action-sheet.js +1 -2
  115. package/dist/activity-indicator.cjs +1 -1
  116. package/dist/activity-indicator.js +4 -3
  117. package/dist/agree.cjs +1 -1
  118. package/dist/agree.js +1 -2
  119. package/dist/amount.cjs +1 -1
  120. package/dist/amount.js +1 -2
  121. package/dist/bill.cjs +1 -0
  122. package/dist/bill.d.ts +1 -0
  123. package/dist/bill.js +1 -0
  124. package/dist/button.cjs +1 -1
  125. package/dist/button.js +1 -2
  126. package/dist/captcha.cjs +1 -0
  127. package/dist/captcha.d.ts +1 -0
  128. package/dist/captcha.js +1 -0
  129. package/dist/cashier.cjs +1 -0
  130. package/dist/cashier.d.ts +1 -0
  131. package/dist/cashier.js +1 -0
  132. package/dist/cell-item.cjs +1 -1
  133. package/dist/cell-item.js +1 -2
  134. package/dist/chart.cjs +1 -0
  135. package/dist/chart.d.ts +1 -0
  136. package/dist/chart.js +1 -0
  137. package/dist/check-base.cjs +1 -1
  138. package/dist/check-base.js +1 -2
  139. package/dist/check.cjs +1 -1
  140. package/dist/check.js +3 -2
  141. package/dist/codebox.cjs +1 -1
  142. package/dist/codebox.js +1 -2
  143. package/dist/components/action-sheet/ActionSheet.vue.d.ts +5 -0
  144. package/dist/components/cashier/CashierChannel.vue.d.ts +4 -0
  145. package/dist/components/dialog/Dialog.vue.d.ts +10 -0
  146. package/dist/components/index.d.ts +2 -2
  147. package/dist/components/number-keyboard/KeyboardKey.vue.d.ts +3 -0
  148. package/dist/components/popup/PopupTitleBar.vue.d.ts +4 -0
  149. package/dist/components/swiper/Swiper.vue.d.ts +2 -2
  150. package/dist/cursor-BIPoNm8V.js +11 -0
  151. package/dist/cursor-tQE3LcbU.cjs +1 -0
  152. package/dist/date-picker.cjs +1 -1
  153. package/dist/date-picker.js +1 -2
  154. package/dist/detail-item.cjs +1 -0
  155. package/dist/detail-item.d.ts +1 -0
  156. package/dist/detail-item.js +1 -0
  157. package/dist/dialog-C38EDWGJ.cjs +1 -0
  158. package/dist/dialog-DdNA6YSe.js +91 -0
  159. package/dist/dialog.cjs +1 -1
  160. package/dist/dialog.js +2 -1
  161. package/dist/drop-menu.cjs +1 -0
  162. package/dist/drop-menu.d.ts +1 -0
  163. package/dist/drop-menu.js +1 -0
  164. package/dist/field-item.cjs +1 -1
  165. package/dist/field-item.js +1 -2
  166. package/dist/field.js +1 -2
  167. package/dist/icon.cjs +1 -1
  168. package/dist/icon.js +1 -2
  169. package/dist/image-reader.cjs +1 -0
  170. package/dist/image-reader.d.ts +1 -0
  171. package/dist/image-reader.js +1 -0
  172. package/dist/image-viewer.cjs +1 -0
  173. package/dist/image-viewer.d.ts +1 -0
  174. package/dist/image-viewer.js +1 -0
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.d.ts +2 -1
  177. package/dist/index.js +61 -2669
  178. package/dist/input-item.cjs +1 -1
  179. package/dist/input-item.js +1 -2
  180. package/dist/landscape.cjs +1 -0
  181. package/dist/landscape.d.ts +1 -0
  182. package/dist/landscape.js +1 -0
  183. package/dist/license-plate.cjs +1 -0
  184. package/dist/license-plate.d.ts +1 -0
  185. package/dist/license-plate.js +1 -0
  186. package/dist/notice-bar.cjs +1 -1
  187. package/dist/notice-bar.js +1 -2
  188. package/dist/number-keyboard.cjs +1 -1
  189. package/dist/number-keyboard.js +1 -2
  190. package/dist/picker.cjs +1 -1
  191. package/dist/picker.js +1 -2
  192. package/dist/popup.cjs +1 -1
  193. package/dist/popup.js +2 -2
  194. package/dist/progress.cjs +1 -1
  195. package/dist/progress.js +1 -2
  196. package/dist/radio-list.cjs +1 -1
  197. package/dist/radio-list.js +1 -2
  198. package/dist/radio.cjs +1 -1
  199. package/dist/radio.js +2 -2
  200. package/dist/result-page.cjs +1 -0
  201. package/dist/result-page.d.ts +1 -0
  202. package/dist/result-page.js +1 -0
  203. package/dist/ruler.cjs +1 -0
  204. package/dist/ruler.d.ts +1 -0
  205. package/dist/ruler.js +1 -0
  206. package/dist/scroll-view.cjs +1 -1
  207. package/dist/scroll-view.js +3 -2
  208. package/dist/selector.cjs +1 -0
  209. package/dist/selector.d.ts +1 -0
  210. package/dist/selector.js +1 -0
  211. package/dist/{shared-BtSkmaWC.js → shared-C9XlLe7F.js} +1 -2
  212. package/dist/skeleton.js +1 -2
  213. package/dist/slider.cjs +1 -1
  214. package/dist/slider.js +1 -2
  215. package/dist/stepper.cjs +1 -1
  216. package/dist/stepper.js +1 -2
  217. package/dist/steps.cjs +1 -0
  218. package/dist/steps.d.ts +1 -0
  219. package/dist/steps.js +1 -0
  220. package/dist/swiper.cjs +1 -1
  221. package/dist/swiper.js +1 -2
  222. package/dist/switch.cjs +1 -1
  223. package/dist/switch.js +1 -2
  224. package/dist/tab-picker.cjs +1 -0
  225. package/dist/tab-picker.d.ts +1 -0
  226. package/dist/tab-picker.js +1 -0
  227. package/dist/tabs.cjs +1 -0
  228. package/dist/tabs.d.ts +1 -0
  229. package/dist/tabs.js +1 -0
  230. package/dist/tag.cjs +1 -1
  231. package/dist/tag.js +1 -2
  232. package/dist/textarea-item.cjs +1 -0
  233. package/dist/textarea-item.d.ts +1 -0
  234. package/dist/textarea-item.js +1 -0
  235. package/dist/tip.cjs +1 -1
  236. package/dist/tip.js +1 -2
  237. package/dist/{toast-DX-RoB7Q.js → toast-ByIFvpMs.js} +6 -6
  238. package/dist/toast-C1K2_cOo.cjs +1 -0
  239. package/dist/toast.cjs +1 -1
  240. package/dist/toast.js +1 -2
  241. package/dist/transition.cjs +1 -0
  242. package/dist/transition.d.ts +1 -0
  243. package/dist/transition.js +1 -0
  244. package/dist/water-mark.cjs +1 -0
  245. package/dist/water-mark.d.ts +1 -0
  246. package/dist/water-mark.js +1 -0
  247. package/package.json +105 -4
  248. package/dist/Amount-De-oObat.cjs +0 -1
  249. package/dist/Amount-wOtRYOdx.js +0 -62
  250. package/dist/CheckBoxBase-BDsytL_r.cjs +0 -1
  251. package/dist/CheckBoxBase-BjyVzGqj.js +0 -40
  252. package/dist/CheckList-DEmLmccw.cjs +0 -1
  253. package/dist/Codebox-Cgj7wyzd.cjs +0 -1
  254. package/dist/InputItem-EJ4Y3tpU.cjs +0 -1
  255. package/dist/InputItem-bhFtp97z.js +0 -322
  256. package/dist/NoticeBar-DSf_EjTL.cjs +0 -1
  257. package/dist/NoticeBar-PEYcjXwD.js +0 -84
  258. package/dist/NumberKeyboard-BX0c0l2r.cjs +0 -1
  259. package/dist/Picker-D-TPtSxf.cjs +0 -1
  260. package/dist/Popup-Cm4BuaOo.cjs +0 -1
  261. package/dist/Popup-DPYBBL95.js +0 -116
  262. package/dist/Progress-DukssNvl.cjs +0 -1
  263. package/dist/Radio-ZHivLdvi.cjs +0 -1
  264. package/dist/RadioGroup-BR_jSDR4.cjs +0 -1
  265. package/dist/RollerSuccess--JecJ7bz.cjs +0 -1
  266. package/dist/ScrollViewMore-BWph-i1-.cjs +0 -1
  267. package/dist/ScrollViewMore-BgYJx-TP.js +0 -278
  268. package/dist/Slider-D3wrE8hn.cjs +0 -1
  269. package/dist/Slider-DteN8p-L.js +0 -95
  270. package/dist/Stepper-1EOk4pCY.js +0 -127
  271. package/dist/Stepper-BJr4I6_8.cjs +0 -1
  272. package/dist/SwiperItem-B6TgjCsM.cjs +0 -1
  273. package/dist/SwiperItem-CKd-XKT7.js +0 -337
  274. package/dist/Switch-B6DvVj2p.js +0 -30
  275. package/dist/Switch-BVPjF8CM.cjs +0 -1
  276. package/dist/Tag-CPv77lC8.cjs +0 -1
  277. package/dist/Tag-bs5j40pF.js +0 -66
  278. package/dist/dialog-0-E4Vyc-.cjs +0 -1
  279. package/dist/dialog-DHIZ2SMK.js +0 -227
  280. package/dist/toast-CAeyMc5r.cjs +0 -1
@@ -0,0 +1,148 @@
1
+ import { t as e } from "./Popup-qLk-BsRS.js";
2
+ import { t } from "./Icon-BgCtu0ZV.js";
3
+ import { t as n } from "./Roller-BznN57fL.js";
4
+ import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, withCtx as y, withModifiers as b } from "vue";
5
+ // src/components/dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
6
+ var x = { class: "cu-dialog-content" }, S = { class: "cu-dialog-body" }, C = {
7
+ key: 1,
8
+ class: "cu-dialog-icon"
9
+ }, w = ["textContent"], T = ["innerHTML"], E = ["onClick"], D = /* @__PURE__ */ u({
10
+ name: "cu-dialog",
11
+ __name: "Dialog",
12
+ props: {
13
+ modelValue: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ title: { default: "" },
18
+ icon: { default: "" },
19
+ iconSvg: {
20
+ type: Boolean,
21
+ default: !1
22
+ },
23
+ closable: {
24
+ type: Boolean,
25
+ default: !0
26
+ },
27
+ content: { default: "" },
28
+ btns: { default: () => [] },
29
+ layout: { default: "row" },
30
+ appendTo: {
31
+ type: [null, Boolean],
32
+ default: void 0
33
+ },
34
+ hasMask: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ maskClosable: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ transition: { default: "cu-fade" },
43
+ preventScroll: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ preventScrollExclude: { default: "" }
48
+ },
49
+ emits: [
50
+ "update:modelValue",
51
+ "show",
52
+ "hide"
53
+ ],
54
+ setup(u, { expose: D, emit: O }) {
55
+ let k = u, A = O, j = h(), M = k.appendTo === !1 ? null : k.appendTo ?? (typeof document < "u" ? document.body : null);
56
+ p(() => {
57
+ M && M.appendChild(j.value);
58
+ }), f(() => {
59
+ M && j.value && j.value.parentNode === M && M.removeChild(j.value);
60
+ });
61
+ function N(e) {
62
+ A("update:modelValue", e);
63
+ }
64
+ function P() {
65
+ A("show");
66
+ }
67
+ function F() {
68
+ A("hide");
69
+ }
70
+ function I(e) {
71
+ e.disabled || e.loading || (typeof e.handler == "function" ? e.handler.call(null, e) : L());
72
+ }
73
+ function L() {
74
+ A("update:modelValue", !1);
75
+ }
76
+ return D({ close: L }), (f, p) => (m(), o("div", {
77
+ ref_key: "root",
78
+ ref: j,
79
+ class: "cu-dialog",
80
+ role: "dialog",
81
+ "aria-modal": "true"
82
+ }, [l(e, {
83
+ "model-value": u.modelValue,
84
+ "has-mask": u.hasMask,
85
+ "mask-closable": u.maskClosable,
86
+ position: "center",
87
+ transition: u.transition,
88
+ "prevent-scroll": u.preventScroll,
89
+ "prevent-scroll-exclude": u.preventScrollExclude,
90
+ "onUpdate:modelValue": N,
91
+ onShow: P,
92
+ onHide: F
93
+ }, {
94
+ default: y(() => [s("div", x, [
95
+ _(f.$slots, "header"),
96
+ s("div", S, [
97
+ u.closable ? (m(), o("a", {
98
+ key: 0,
99
+ role: "button",
100
+ class: "cu-dialog-close",
101
+ onClick: L
102
+ }, [l(t, { name: "close" })])) : a("", !0),
103
+ u.icon ? (m(), o("div", C, [l(t, {
104
+ name: u.icon,
105
+ svg: u.iconSvg
106
+ }, null, 8, ["name", "svg"])])) : a("", !0),
107
+ u.title ? (m(), o("h2", {
108
+ key: 2,
109
+ class: "cu-dialog-title",
110
+ textContent: v(u.title)
111
+ }, null, 8, w)) : a("", !0),
112
+ _(f.$slots, "default", {}, () => [s("div", {
113
+ class: "cu-dialog-text",
114
+ innerHTML: u.content
115
+ }, null, 8, T)])
116
+ ]),
117
+ s("footer", { class: d(["cu-dialog-actions", { "is-column": u.layout === "column" }]) }, [(m(!0), o(r, null, g(u.btns, (e, r) => (m(), o("a", {
118
+ key: r,
119
+ role: "button",
120
+ class: d(["cu-dialog-btn", {
121
+ disabled: !!e.disabled,
122
+ warning: !e.disabled && !!e.warning
123
+ }]),
124
+ onClick: (t) => I(e),
125
+ onTouchmove: p[0] ||= b(() => {}, ["prevent"])
126
+ }, [e.loading ? (m(), i(n, {
127
+ key: 0,
128
+ class: "cu-dialog-btn-loading"
129
+ })) : e.icon ? (m(), i(t, {
130
+ key: 1,
131
+ class: "cu-dialog-btn-icon",
132
+ name: e.icon,
133
+ svg: e.iconSvg,
134
+ size: "md"
135
+ }, null, 8, ["name", "svg"])) : a("", !0), c(" " + v(e.text), 1)], 42, E))), 128))], 2)
136
+ ])]),
137
+ _: 3
138
+ }, 8, [
139
+ "model-value",
140
+ "has-mask",
141
+ "mask-closable",
142
+ "transition",
143
+ "prevent-scroll",
144
+ "prevent-scroll-exclude"
145
+ ])], 512));
146
+ }
147
+ });
148
+ export { D as t };
@@ -0,0 +1,95 @@
1
+ import { t as e } from "./Popup-qLk-BsRS.js";
2
+ import { t } from "./RadioList-DNGsEzgf.js";
3
+ import { Fragment as n, computed as r, createElementBlock as i, createElementVNode as a, createSlots as o, createVNode as s, defineComponent as c, normalizeClass as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, useSlots as g, watch as _, withCtx as v } from "vue";
4
+ // src/components/drop-menu/DropMenu.vue?vue&type=script&setup=true&lang.ts
5
+ var y = { class: "cu-drop-menu" }, b = { class: "cu-drop-menu-bar" }, x = ["onClick"], S = ["textContent"], C = { class: "cu-drop-menu-list" }, w = /* @__PURE__ */ c({
6
+ name: "cu-drop-menu",
7
+ __name: "DropMenu",
8
+ props: {
9
+ data: { default: () => [] },
10
+ defaultValue: { default: () => [] }
11
+ },
12
+ emits: [
13
+ "change",
14
+ "show",
15
+ "hide"
16
+ ],
17
+ setup(c, { expose: w, emit: T }) {
18
+ let E = c, D = T, O = g(), k = f(!1), A = f([]), j = f([]), M = f(-1), N = f(""), P = r(() => {
19
+ let e = O.default;
20
+ return e ? e({ option: {} }).some((e) => e.type !== Comment) : !1;
21
+ }), F = r(() => M.value < 0 || !E.data[M.value] ? [] : E.data[M.value].options ?? []);
22
+ _(() => E.data, (e, t) => {
23
+ JSON.stringify(e) !== JSON.stringify(t) && I();
24
+ }), _(() => E.defaultValue, (e, t) => {
25
+ JSON.stringify(e) !== JSON.stringify(t) && I();
26
+ }), u(() => {
27
+ I();
28
+ });
29
+ function I() {
30
+ j.value = E.defaultValue;
31
+ let e = (t, n, r) => {
32
+ t && t.forEach((t) => {
33
+ let i = r[0], a = E.defaultValue[i], o = t;
34
+ a !== void 0 && (o.value === a || o.text === a || o.label === a) ? A.value[i] = o : n > 0 && e(o.options ?? void 0, n, r);
35
+ });
36
+ };
37
+ E.data.forEach((t, n) => {
38
+ e(t.options ?? [], 0, [n]);
39
+ });
40
+ }
41
+ function L(e) {
42
+ return !!(A.value[e] !== void 0 || E.defaultValue[e]);
43
+ }
44
+ function R(e, t) {
45
+ let n = A.value[t];
46
+ return n === void 0 ? e.text : String(n.text ?? "");
47
+ }
48
+ function z(e, t) {
49
+ e && !e.disabled && (k.value ? k.value = !1 : (k.value = !0, M.value = t));
50
+ }
51
+ function B(e) {
52
+ let t = M.value, n = E.data[t];
53
+ k.value = !1, j.value[t] = e.value, A.value[t] = e, D("change", n, e);
54
+ }
55
+ return w({
56
+ getSelectedValues: () => A.value,
57
+ getSelectedValue: (e) => A.value[e]
58
+ }), (r, u) => (d(), i("div", y, [a("div", b, [(d(!0), i(n, null, p(c.data, (e, t) => (d(), i("div", {
59
+ key: t,
60
+ class: l(["bar-item", {
61
+ active: t === M.value,
62
+ selected: L(t),
63
+ disabled: e.disabled
64
+ }]),
65
+ onClick: (n) => z(e, t)
66
+ }, [a("span", { textContent: h(R(e, t)) }, null, 8, S)], 10, x))), 128))]), s(e, {
67
+ modelValue: k.value,
68
+ "onUpdate:modelValue": u[0] ||= (e) => k.value = e,
69
+ position: "top",
70
+ "prevent-scroll": "",
71
+ "prevent-scroll-exclude": N.value,
72
+ onShow: u[1] ||= (e) => r.$emit("show"),
73
+ onHide: u[2] ||= (e) => r.$emit("hide"),
74
+ onBeforeHide: u[3] ||= (e) => M.value = -1
75
+ }, {
76
+ default: v(() => [a("div", C, [s(t, {
77
+ "model-value": j.value[M.value],
78
+ options: F.value,
79
+ "is-slot-scope": P.value,
80
+ "align-center": "",
81
+ onChange: B
82
+ }, o({ _: 2 }, [P.value ? {
83
+ name: "default",
84
+ fn: v(({ option: e }) => [m(r.$slots, "default", { option: e })]),
85
+ key: "0"
86
+ } : void 0]), 1032, [
87
+ "model-value",
88
+ "options",
89
+ "is-slot-scope"
90
+ ])])]),
91
+ _: 3
92
+ }, 8, ["modelValue", "prevent-scroll-exclude"])]));
93
+ }
94
+ });
95
+ export { w as t };
@@ -0,0 +1 @@
1
+ const e=require("./Popup-Ca1jPi0t.cjs"),t=require("./RadioList-D-9PITpr.cjs");let n=require("vue");var r={class:`cu-drop-menu`},i={class:`cu-drop-menu-bar`},a=[`onClick`],o=[`textContent`],s={class:`cu-drop-menu-list`},c=(0,n.defineComponent)({name:`cu-drop-menu`,__name:`DropMenu`,props:{data:{default:()=>[]},defaultValue:{default:()=>[]}},emits:[`change`,`show`,`hide`],setup(c,{expose:l,emit:u}){let d=c,f=u,p=(0,n.useSlots)(),m=(0,n.ref)(!1),h=(0,n.ref)([]),g=(0,n.ref)([]),_=(0,n.ref)(-1),v=(0,n.ref)(``),y=(0,n.computed)(()=>{let e=p.default;return e?e({option:{}}).some(e=>e.type!==Comment):!1}),b=(0,n.computed)(()=>_.value<0||!d.data[_.value]?[]:d.data[_.value].options??[]);(0,n.watch)(()=>d.data,(e,t)=>{JSON.stringify(e)!==JSON.stringify(t)&&x()}),(0,n.watch)(()=>d.defaultValue,(e,t)=>{JSON.stringify(e)!==JSON.stringify(t)&&x()}),(0,n.onMounted)(()=>{x()});function x(){g.value=d.defaultValue;let e=(t,n,r)=>{t&&t.forEach(t=>{let i=r[0],a=d.defaultValue[i],o=t;a!==void 0&&(o.value===a||o.text===a||o.label===a)?h.value[i]=o:n>0&&e(o.options??void 0,n,r)})};d.data.forEach((t,n)=>{e(t.options??[],0,[n])})}function S(e){return!!(h.value[e]!==void 0||d.defaultValue[e])}function C(e,t){let n=h.value[t];return n===void 0?e.text:String(n.text??``)}function w(e,t){e&&!e.disabled&&(m.value?m.value=!1:(m.value=!0,_.value=t))}function T(e){let t=_.value,n=d.data[t];m.value=!1,g.value[t]=e.value,h.value[t]=e,f(`change`,n,e)}return l({getSelectedValues:()=>h.value,getSelectedValue:e=>h.value[e]}),(l,u)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,r,[(0,n.createElementVNode)(`div`,i,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(c.data,(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:t,class:(0,n.normalizeClass)([`bar-item`,{active:t===_.value,selected:S(t),disabled:e.disabled}]),onClick:n=>w(e,t)},[(0,n.createElementVNode)(`span`,{textContent:(0,n.toDisplayString)(C(e,t))},null,8,o)],10,a))),128))]),(0,n.createVNode)(e.t,{modelValue:m.value,"onUpdate:modelValue":u[0]||=e=>m.value=e,position:`top`,"prevent-scroll":``,"prevent-scroll-exclude":v.value,onShow:u[1]||=e=>l.$emit(`show`),onHide:u[2]||=e=>l.$emit(`hide`),onBeforeHide:u[3]||=e=>_.value=-1},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,s,[(0,n.createVNode)(t.t,{"model-value":g.value[_.value],options:b.value,"is-slot-scope":y.value,"align-center":``,onChange:T},(0,n.createSlots)({_:2},[y.value?{name:`default`,fn:(0,n.withCtx)(({option:e})=>[(0,n.renderSlot)(l.$slots,`default`,{option:e})]),key:`0`}:void 0]),1032,[`model-value`,`options`,`is-slot-scope`])])]),_:3},8,[`modelValue`,`prevent-scroll-exclude`])]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,5 +1,5 @@
1
1
  import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, provide as o, reactive as s, renderSlot as c, toDisplayString as l } from "vue";
2
- //#region src/components/field/Field.vue?vue&type=script&setup=true&lang.ts
2
+ // src/components/field/Field.vue?vue&type=script&setup=true&lang.ts
3
3
  var u = {
4
4
  key: 0,
5
5
  class: "cu-field-header"
@@ -47,5 +47,4 @@ var u = {
47
47
  ], 2));
48
48
  }
49
49
  });
50
- //#endregion
51
50
  export { _ as t };
@@ -1,7 +1,7 @@
1
- import { t as e } from "./Icon-dWGSK6Ou.js";
1
+ import { t as e } from "./Icon-BgCtu0ZV.js";
2
2
  import { Comment as t, Fragment as n, Text as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, defineComponent as u, inject as d, normalizeClass as f, openBlock as p, renderSlot as m, toDisplayString as h, useSlots as g } from "vue";
3
3
  import { isAndroid as _, isIOS as v } from "@centui/core";
4
- //#region src/components/field-item/FieldItem.vue?vue&type=script&setup=true&lang.ts
4
+ // src/components/field-item/FieldItem.vue?vue&type=script&setup=true&lang.ts
5
5
  var y = { class: "cu-field-item-content" }, b = ["textContent"], x = {
6
6
  key: 1,
7
7
  class: "cu-field-item-left"
@@ -84,5 +84,4 @@ var y = { class: "cu-field-item-content" }, b = ["textContent"], x = {
84
84
  ]), M("children") ? (p(), s("div", T, [m(t.$slots, "children")])) : o("", !0)], 2));
85
85
  }
86
86
  });
87
- //#endregion
88
87
  export { E as t };
@@ -1 +1 @@
1
- const e=require("./Icon-jaEPn7d7.cjs");let t=require("vue"),n=require("@centui/core");var r={class:`cu-field-item-content`},i=[`textContent`],a={key:1,class:`cu-field-item-left`},o={class:`cu-field-item-control`},s=[`textContent`],c={key:2,class:`cu-field-item-right`},l={key:0,class:`cu-field-item-children`},u=(0,t.defineComponent)({name:`cu-field-item`,__name:`FieldItem`,props:{title:{default:``},placeholder:{default:``},content:{default:``},addon:{default:``},arrow:{type:[Boolean,String],default:!1},solid:{type:Boolean,default:!1},alignRight:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`click`],setup(u,{emit:d}){let f=u,p=d,m=(0,t.useSlots)(),h=(0,t.inject)(`rootField`,null);function g(e){if(e.type===t.Comment)return!0;if(e.type===t.Text)return!String(e.children).trim();if(e.type===t.Fragment){let t=e.children;return!Array.isArray(t)||t.every(g)}return!1}function _(e){let t=m[e];return t?t().some(e=>!g(e)):!1}let v=(0,t.computed)(()=>n.isIOS?`is-ios`:n.isAndroid?`is-android`:`is-browser`),y=(0,t.computed)(()=>!!h?.disabled||f.disabled);function b(e){y.value||p(`click`,e)}return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cu-field-item`,[u.solid?`is-solid`:``,y.value?`is-disabled`:``,u.alignRight?`is-align-right`:``,v.value]]),onClick:b},[(0,t.createElementVNode)(`div`,r,[u.title?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,{key:0,class:`cu-field-item-title`,textContent:(0,t.toDisplayString)(u.title)},null,8,i)):(0,t.createCommentVNode)(``,!0),_(`left`)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,a,[(0,t.renderSlot)(n.$slots,`left`)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,o,[(0,t.renderSlot)(n.$slots,`default`,{},()=>[u.content?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(u.content),1)],64)):u.placeholder?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`cu-field-item-placeholder`,textContent:(0,t.toDisplayString)(u.placeholder)},null,8,s)):(0,t.createCommentVNode)(``,!0)])]),u.arrow||u.addon||_(`right`)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,c,[(0,t.renderSlot)(n.$slots,`right`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(u.addon),1)]),u.arrow?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:0,name:u.arrow===!0?`arrow`:u.arrow,size:`md`},null,8,[`name`])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)]),_(`children`)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,l,[(0,t.renderSlot)(n.$slots,`children`)])):(0,t.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
1
+ const e=require("./Icon-83WWqE5z.cjs");let t=require("vue"),n=require("@centui/core");var r={class:`cu-field-item-content`},i=[`textContent`],a={key:1,class:`cu-field-item-left`},o={class:`cu-field-item-control`},s=[`textContent`],c={key:2,class:`cu-field-item-right`},l={key:0,class:`cu-field-item-children`},u=(0,t.defineComponent)({name:`cu-field-item`,__name:`FieldItem`,props:{title:{default:``},placeholder:{default:``},content:{default:``},addon:{default:``},arrow:{type:[Boolean,String],default:!1},solid:{type:Boolean,default:!1},alignRight:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`click`],setup(u,{emit:d}){let f=u,p=d,m=(0,t.useSlots)(),h=(0,t.inject)(`rootField`,null);function g(e){if(e.type===t.Comment)return!0;if(e.type===t.Text)return!String(e.children).trim();if(e.type===t.Fragment){let t=e.children;return!Array.isArray(t)||t.every(g)}return!1}function _(e){let t=m[e];return t?t().some(e=>!g(e)):!1}let v=(0,t.computed)(()=>n.isIOS?`is-ios`:n.isAndroid?`is-android`:`is-browser`),y=(0,t.computed)(()=>!!h?.disabled||f.disabled);function b(e){y.value||p(`click`,e)}return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cu-field-item`,[u.solid?`is-solid`:``,y.value?`is-disabled`:``,u.alignRight?`is-align-right`:``,v.value]]),onClick:b},[(0,t.createElementVNode)(`div`,r,[u.title?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,{key:0,class:`cu-field-item-title`,textContent:(0,t.toDisplayString)(u.title)},null,8,i)):(0,t.createCommentVNode)(``,!0),_(`left`)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,a,[(0,t.renderSlot)(n.$slots,`left`)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,o,[(0,t.renderSlot)(n.$slots,`default`,{},()=>[u.content?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(u.content),1)],64)):u.placeholder?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`cu-field-item-placeholder`,textContent:(0,t.toDisplayString)(u.placeholder)},null,8,s)):(0,t.createCommentVNode)(``,!0)])]),u.arrow||u.addon||_(`right`)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,c,[(0,t.renderSlot)(n.$slots,`right`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(u.addon),1)]),u.arrow?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:0,name:u.arrow===!0?`arrow`:u.arrow,size:`md`},null,8,[`name`])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)]),_(`children`)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,l,[(0,t.renderSlot)(n.$slots,`children`)])):(0,t.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
@@ -28,4 +28,4 @@ let e=require("vue");var t=`<svg class="icon" viewBox="0 0 1024 1024"><path d="M
28
28
  ${e}
29
29
  </defs>
30
30
  </svg>
31
- `,o=()=>a(Object.keys(r).map(e=>`<symbol id=${e}${r[e].split(`svg`)[1]}symbol>`).join(``));function s(){typeof document>`u`||document.getElementById(`__MAND_MOBILE_SVG_SPRITE_NODE__`)||document.body.insertAdjacentHTML(`afterbegin`,o())}var c=[`xlink:href`],l=(0,e.defineComponent)({name:`cu-icon`,__name:`Icon`,props:{name:{},size:{default:`md`},color:{default:``},svg:{type:Boolean,default:!0}},emits:[`click`],setup(t){return(0,e.onMounted)(()=>{s()}),(n,r)=>t.svg?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{key:0,class:(0,e.normalizeClass)([`cu-icon icon-svg`,[`cu-icon-${t.name}`,t.size]]),style:(0,e.normalizeStyle)({fill:t.color}),onClick:r[0]||=e=>n.$emit(`click`,e)},[(0,e.createElementVNode)(`use`,{"xlink:href":`#${t.name}`},null,8,c)],6)):t.name?((0,e.openBlock)(),(0,e.createElementBlock)(`i`,{key:1,class:(0,e.normalizeClass)([`cu-icon icon-font`,[`cu-icon-${t.name}`,t.name,t.size]]),style:(0,e.normalizeStyle)({color:t.color}),onClick:r[1]||=e=>n.$emit(`click`,e)},null,6)):(0,e.createCommentVNode)(``,!0)}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
31
+ `,o=()=>a(Object.keys(r).map(e=>`<symbol id=${e}${r[e].split(`svg`)[1]}symbol>`).join(``));function s(){typeof document<`u`&&(document.getElementById(`__MAND_MOBILE_SVG_SPRITE_NODE__`)||document.body.insertAdjacentHTML(`afterbegin`,o()))}var c=[`xlink:href`],l=(0,e.defineComponent)({name:`cu-icon`,__name:`Icon`,props:{name:{},size:{default:`md`},color:{default:``},svg:{type:Boolean,default:!0}},emits:[`click`],setup(t){return(0,e.onMounted)(()=>{s()}),(n,r)=>t.svg?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{key:0,class:(0,e.normalizeClass)([`cu-icon icon-svg`,[`cu-icon-${t.name}`,t.size]]),style:(0,e.normalizeStyle)({fill:t.color}),onClick:r[0]||=e=>n.$emit(`click`,e)},[(0,e.createElementVNode)(`use`,{"xlink:href":`#${t.name}`},null,8,c)],6)):t.name?((0,e.openBlock)(),(0,e.createElementBlock)(`i`,{key:1,class:(0,e.normalizeClass)([`cu-icon icon-font`,[`cu-icon-${t.name}`,t.name,t.size]]),style:(0,e.normalizeStyle)({color:t.color}),onClick:r[1]||=e=>n.$emit(`click`,e)},null,6)):(0,e.createCommentVNode)(``,!0)}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
@@ -1,5 +1,5 @@
1
1
  import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, normalizeStyle as a, onMounted as o, openBlock as s } from "vue";
2
- //#region src/components/icon/default-svg-list.ts
2
+ // src/components/icon/default-svg-list.ts
3
3
  var c = "<svg class=\"icon\" viewBox=\"0 0 1024 1024\"><path d=\"M496 96C248.576 96 48 296.576 48 544s200.576 448 448 448 448-200.576 448-448S743.424 96 496 96z m-6.624 587.648l-45.248 45.248-45.248-45.248-167.776-167.76 45.248-45.248L444.112 638.4l287.536-287.536 45.248 45.248-287.52 287.536z\" /></svg>", l = "<svg class=\"icon\" viewBox=\"0 0 1024 1024\"><path d=\"M512 64C264.576 64 64 264.576 64 512s200.576 448 448 448 448-200.576 448-448S759.424 64 512 64z m248.912 651.664l-45.248 45.248L512 557.248 308.352 760.912l-45.248-45.248L466.752 512 263.104 308.352l45.248-45.248L512 466.752l203.648-203.648 45.248 45.248L557.248 512l203.664 203.664z\" /></svg>", u = {
4
4
  spinner: "<svg class=\"spinner\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" style=\"background:0 0\"><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.9166666666666666s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(30 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.8333333333333334s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(60 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.75s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(90 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.6666666666666666s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(120 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.5833333333333334s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(150 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.5s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(180 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.4166666666666667s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(210 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.3333333333333333s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(240 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.25s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(270 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.16666666666666666s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(300 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"-0.08333333333333333s\" repeatCount=\"indefinite\"/></rect><rect x=\"46.5\" y=\"15.5\" rx=\"12.09\" ry=\"4.03\" width=\"7\" height=\"17\" fill=\"#eee\" transform=\"rotate(330 50 50)\"><animate attributeName=\"opacity\" values=\"1;0\" dur=\"1s\" begin=\"0s\" repeatCount=\"indefinite\"/></rect></svg>",
5
5
  ring: "<svg class=\"ring\" viewBox=\"0 0 100 100\" class=\"center\">\n <defs>\n <linearGradient x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\" id=\"ring-a\">\n <stop offset=\"10%\" stop-color=\"#eee\" stop-opacity=\"0\"/>\n <stop offset=\"100%\" stop-color=\"#eee\"/>\n </linearGradient>\n <linearGradient x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\" id=\"ring-b\">\n <stop offset=\"0%\" stop-color=\"#eee\"/>\n <stop offset=\"100%\" stop-color=\"#eee\" stop-opacity=\".1\"/>\n </linearGradient>\n </defs>\n <g stroke-width=\"14\" fill=\"none\">\n <circle cx=\"50\" cy=\"50\" r=\"40\" stroke=\"url(#ring-a)\" stroke-dasharray=\"90 0\">\n <animateTransform attributeName=\"transform\" type=\"rotate\" repeatCount=\"indefinite\" dur=\"1s\" values=\"0 50 50;180 50 50;360 50 50\" keyTimes=\"0;0.5;1\"/>\n </circle>\n <circle cx=\"50\" cy=\"50\" r=\"40\" stroke-linecap=\"round\" stroke=\"url(#ring-b)\" stroke-dasharray=\"98 189\">\n <animateTransform attributeName=\"transform\" type=\"rotate\" repeatCount=\"indefinite\" dur=\"1s\" values=\"0 50 50;180 50 50;360 50 50\" keyTimes=\"0;0.5;1\"/>\n </circle>\n </g>\n </svg>",
@@ -78,10 +78,9 @@ var c = "<svg class=\"icon\" viewBox=\"0 0 1024 1024\"><path d=\"M496 96C248.576
78
78
  </svg>
79
79
  `, p = () => f(Object.keys(u).map((e) => `<symbol id=${e}${u[e].split("svg")[1]}symbol>`).join(""));
80
80
  function m() {
81
- typeof document > "u" || document.getElementById("__MAND_MOBILE_SVG_SPRITE_NODE__") || document.body.insertAdjacentHTML("afterbegin", p());
81
+ typeof document < "u" && (document.getElementById("__MAND_MOBILE_SVG_SPRITE_NODE__") || document.body.insertAdjacentHTML("afterbegin", p()));
82
82
  }
83
- //#endregion
84
- //#region src/components/icon/Icon.vue?vue&type=script&setup=true&lang.ts
83
+ // src/components/icon/Icon.vue?vue&type=script&setup=true&lang.ts
85
84
  var h = ["xlink:href"], g = /* @__PURE__ */ r({
86
85
  name: "cu-icon",
87
86
  __name: "Icon",
@@ -115,5 +114,4 @@ var h = ["xlink:href"], g = /* @__PURE__ */ r({
115
114
  }, null, 6)) : e("", !0);
116
115
  }
117
116
  });
118
- //#endregion
119
117
  export { g as t };
@@ -0,0 +1 @@
1
+ let e=require("vue");var t={class:`cu-image-reader`},n=[`name`,`accept`,`capture`,`multiple`],r=(0,e.defineComponent)({name:`cu-image-reader`,__name:`ImageReader`,props:{name:{default:()=>`image-reader-${Math.floor(Math.random()*1e4)}`},size:{default:0},mime:{default:()=>[]},isCameraOnly:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:!1},amount:{default:0}},emits:[`select`,`complete`,`error`],setup(r,{emit:i}){let a={100:`browser does not support`,101:`picture size is beyond the preset`,102:`picture read failure`,103:`the number of pictures exceeds the limit`},o=r,s=i,c=(0,e.ref)(Date.now()),l=(0,e.computed)(()=>{if(o.mime.length){let e=``;return o.mime.forEach(t=>{e+=`image/${t},`}),e.substring(0,e.length-1)}return`image/*`});function u(e,t){s(e,o.name,t)}function d(e){let t=e.target;if(t.files&&t.files.length){if(u(`select`,{files:Array.prototype.slice.call(t.files)}),o.amount&&t.files.length>o.amount){u(`error`,{code:`103`,msg:a[103]}),h();return}f(t)}}function f(e){let t=o.size*1e3,n=e.files;if(!n||!n.length)return;let r=n.length,i=0;Array.prototype.slice.call(n).forEach(e=>{p(e,t,()=>{i++,i>=r&&h()})})}function p(e,t,n){let r=new FileReader;r.onload=()=>{let i=String(r.result??``);if(t&&i.length>t){u(`error`,{code:`101`,msg:a[101]}),n();return}let o=new Image;o.onload=()=>{u(`complete`,{blob:m(i),dataUrl:i,file:e}),o=null,n()},o.onerror=()=>{u(`error`,{code:`102`,msg:a[102]}),n()},o.src=i},r.onerror=()=>{u(`error`,{code:`102`,msg:a[102]}),n()},r.readAsDataURL(e)}function m(e){let t=e.split(`,`),n=t[0].match(/:(.*?);/)?.[1]??`image/png`,r=window.atob(t[1]),i=r.length,a=new Uint8Array(i);for(;i--;)a[i]=r.charCodeAt(i);return new Blob([a],{type:n})}function h(){c.value=Date.now()}return(i,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,t,[((0,e.openBlock)(),(0,e.createElementBlock)(`input`,{key:c.value,class:`cu-image-reader-file`,type:`file`,name:r.name,accept:l.value,capture:r.isCameraOnly?!0:void 0,multiple:r.isMultiple,onChange:d},null,40,n))]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
@@ -0,0 +1,122 @@
1
+ import { computed as e, createElementBlock as t, defineComponent as n, openBlock as r, ref as i } from "vue";
2
+ // src/components/image-reader/ImageReader.vue?vue&type=script&setup=true&lang.ts
3
+ var a = { class: "cu-image-reader" }, o = [
4
+ "name",
5
+ "accept",
6
+ "capture",
7
+ "multiple"
8
+ ], s = /* @__PURE__ */ n({
9
+ name: "cu-image-reader",
10
+ __name: "ImageReader",
11
+ props: {
12
+ name: { default: () => `image-reader-${Math.floor(Math.random() * 1e4)}` },
13
+ size: { default: 0 },
14
+ mime: { default: () => [] },
15
+ isCameraOnly: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ isMultiple: {
20
+ type: Boolean,
21
+ default: !1
22
+ },
23
+ amount: { default: 0 }
24
+ },
25
+ emits: [
26
+ "select",
27
+ "complete",
28
+ "error"
29
+ ],
30
+ setup(n, { emit: s }) {
31
+ let c = {
32
+ 100: "browser does not support",
33
+ 101: "picture size is beyond the preset",
34
+ 102: "picture read failure",
35
+ 103: "the number of pictures exceeds the limit"
36
+ }, l = n, u = s, d = i(Date.now()), f = e(() => {
37
+ if (l.mime.length) {
38
+ let e = "";
39
+ return l.mime.forEach((t) => {
40
+ e += `image/${t},`;
41
+ }), e.substring(0, e.length - 1);
42
+ }
43
+ return "image/*";
44
+ });
45
+ function p(e, t) {
46
+ u(e, l.name, t);
47
+ }
48
+ function m(e) {
49
+ let t = e.target;
50
+ if (t.files && t.files.length) {
51
+ if (p("select", { files: Array.prototype.slice.call(t.files) }), l.amount && t.files.length > l.amount) {
52
+ p("error", {
53
+ code: "103",
54
+ msg: c[103]
55
+ }), v();
56
+ return;
57
+ }
58
+ h(t);
59
+ }
60
+ }
61
+ function h(e) {
62
+ let t = l.size * 1e3, n = e.files;
63
+ if (!n || !n.length) return;
64
+ let r = n.length, i = 0;
65
+ Array.prototype.slice.call(n).forEach((e) => {
66
+ g(e, t, () => {
67
+ i++, i >= r && v();
68
+ });
69
+ });
70
+ }
71
+ function g(e, t, n) {
72
+ let r = new FileReader();
73
+ r.onload = () => {
74
+ let i = String(r.result ?? "");
75
+ if (t && i.length > t) {
76
+ p("error", {
77
+ code: "101",
78
+ msg: c[101]
79
+ }), n();
80
+ return;
81
+ }
82
+ let a = new Image();
83
+ a.onload = () => {
84
+ p("complete", {
85
+ blob: _(i),
86
+ dataUrl: i,
87
+ file: e
88
+ }), a = null, n();
89
+ }, a.onerror = () => {
90
+ p("error", {
91
+ code: "102",
92
+ msg: c[102]
93
+ }), n();
94
+ }, a.src = i;
95
+ }, r.onerror = () => {
96
+ p("error", {
97
+ code: "102",
98
+ msg: c[102]
99
+ }), n();
100
+ }, r.readAsDataURL(e);
101
+ }
102
+ function _(e) {
103
+ let t = e.split(","), n = t[0].match(/:(.*?);/)?.[1] ?? "image/png", r = window.atob(t[1]), i = r.length, a = new Uint8Array(i);
104
+ for (; i--;) a[i] = r.charCodeAt(i);
105
+ return new Blob([a], { type: n });
106
+ }
107
+ function v() {
108
+ d.value = Date.now();
109
+ }
110
+ return (e, i) => (r(), t("div", a, [(r(), t("input", {
111
+ key: d.value,
112
+ class: "cu-image-reader-file",
113
+ type: "file",
114
+ name: n.name,
115
+ accept: f.value,
116
+ capture: n.isCameraOnly ? !0 : void 0,
117
+ multiple: n.isMultiple,
118
+ onChange: m
119
+ }, null, 40, o))]));
120
+ }
121
+ });
122
+ export { s as t };
@@ -0,0 +1 @@
1
+ const e=require("./SwiperItem-BY5cUoGn.cjs");let t=require("vue");var n={class:`viewer-container`},r={class:`item`},i=[`src`,`alt`],a={key:1,class:`viewer-index`},o=(0,t.defineComponent)({name:`cu-image-viewer`,__name:`ImageViewer`,props:{modelValue:{type:Boolean,default:!1},list:{default:()=>[]},initialIndex:{default:0},hasDots:{type:Boolean,default:!0}},emits:[`update:modelValue`,`change`],setup(o,{emit:s}){let c=o,l=s,u=(0,t.ref)(!1),d=(0,t.ref)([]),f=(0,t.ref)(0);u.value=c.modelValue,u.value&&(f.value=c.initialIndex,p()),(0,t.watch)(()=>c.modelValue,e=>{f.value=c.initialIndex,u.value=e,(0,t.nextTick)(()=>{p()})}),(0,t.watch)(u,e=>{l(`update:modelValue`,e)});function p(){d.value=c.list.map(e=>typeof e==`object`?e:{url:e})}function m(e,t){f.value=t,l(`change`,e,t)}function h(){u.value=!1}return(s,c)=>(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`cu-image-viewer`,onClick:h},[(0,t.createElementVNode)(`div`,n,[u.value?((0,t.openBlock)(),(0,t.createBlock)(e.n,{key:0,ref:`swiper`,autoplay:0,"default-index":f.value,"has-dots":!1,"is-prevent":!1,onAfterChange:m},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d.value,(n,a)=>((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:a,class:`viewer-item-wrap`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,r,[n.url?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,src:n.url,alt:n.alt},null,8,i)):(0,t.createCommentVNode)(``,!0)])]),_:2},1024))),128))]),_:1},8,[`default-index`])):(0,t.createCommentVNode)(``,!0),o.hasDots?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,a,(0,t.toDisplayString)(f.value+1)+`/`+(0,t.toDisplayString)(o.list.length),1)):(0,t.createCommentVNode)(``,!0)])],512)),[[t.vShow,u.value]])}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
@@ -0,0 +1,68 @@
1
+ import { n as e, t } from "./SwiperItem-BydyBdYU.js";
2
+ import { Fragment as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, nextTick as c, openBlock as l, ref as u, renderList as d, toDisplayString as f, vShow as p, watch as m, withCtx as h, withDirectives as g } from "vue";
3
+ // src/components/image-viewer/ImageViewer.vue?vue&type=script&setup=true&lang.ts
4
+ var _ = { class: "viewer-container" }, v = { class: "item" }, y = ["src", "alt"], b = {
5
+ key: 1,
6
+ class: "viewer-index"
7
+ }, x = /* @__PURE__ */ s({
8
+ name: "cu-image-viewer",
9
+ __name: "ImageViewer",
10
+ props: {
11
+ modelValue: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ list: { default: () => [] },
16
+ initialIndex: { default: 0 },
17
+ hasDots: {
18
+ type: Boolean,
19
+ default: !0
20
+ }
21
+ },
22
+ emits: ["update:modelValue", "change"],
23
+ setup(s, { emit: x }) {
24
+ let S = s, C = x, w = u(!1), T = u([]), E = u(0);
25
+ w.value = S.modelValue, w.value && (E.value = S.initialIndex, D()), m(() => S.modelValue, (e) => {
26
+ E.value = S.initialIndex, w.value = e, c(() => {
27
+ D();
28
+ });
29
+ }), m(w, (e) => {
30
+ C("update:modelValue", e);
31
+ });
32
+ function D() {
33
+ T.value = S.list.map((e) => typeof e == "object" ? e : { url: e });
34
+ }
35
+ function O(e, t) {
36
+ E.value = t, C("change", e, t);
37
+ }
38
+ function k() {
39
+ w.value = !1;
40
+ }
41
+ return (c, u) => g((l(), a("div", {
42
+ class: "cu-image-viewer",
43
+ onClick: k
44
+ }, [o("div", _, [w.value ? (l(), r(e, {
45
+ key: 0,
46
+ ref: "swiper",
47
+ autoplay: 0,
48
+ "default-index": E.value,
49
+ "has-dots": !1,
50
+ "is-prevent": !1,
51
+ onAfterChange: O
52
+ }, {
53
+ default: h(() => [(l(!0), a(n, null, d(T.value, (e, n) => (l(), r(t, {
54
+ key: n,
55
+ class: "viewer-item-wrap"
56
+ }, {
57
+ default: h(() => [o("div", v, [e.url ? (l(), a("img", {
58
+ key: 0,
59
+ src: e.url,
60
+ alt: e.alt
61
+ }, null, 8, y)) : i("", !0)])]),
62
+ _: 2
63
+ }, 1024))), 128))]),
64
+ _: 1
65
+ }, 8, ["default-index"])) : i("", !0), s.hasDots ? (l(), a("div", b, f(E.value + 1) + "/" + f(s.list.length), 1)) : i("", !0)])], 512)), [[p, w.value]]);
66
+ }
67
+ });
68
+ export { x as t };
@@ -0,0 +1 @@
1
+ const e=require("./FieldItem-UFKrl_5J.cjs"),t=require("./Icon-83WWqE5z.cjs"),n=require("./NumberKeyboard-BWpxsbYt.cjs"),r=require("./cursor-tQE3LcbU.cjs");let i=require("vue"),a=require("@centui/core");var o=[`type`,`name`,`value`,`placeholder`,`disabled`,`readonly`,`maxlength`],s=[`textContent`],c=[`textContent`],l={key:0,class:`cu-input-item-msg`},ee=[`textContent`],u={key:1,class:`cu-input-item-brief`},d=[`textContent`],f=(0,i.defineComponent)({name:`cu-input-item`,__name:`InputItem`,props:{type:{default:`text`},previewType:{default:``},name:{default:void 0},title:{default:``},brief:{default:``},modelValue:{default:``},placeholder:{default:``},maxlength:{default:``},size:{default:`normal`},align:{default:`left`},error:{default:``},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},solid:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},isVirtualKeyboard:{type:Boolean,default:!1},virtualKeyboardDisorder:{type:Boolean,default:!1},virtualKeyboardOkText:{default:void 0},virtualKeyboardVm:{default:null},isTitleLatent:{type:Boolean,default:!1},isFormative:{type:Boolean,default:!1},isHighlight:{type:Boolean,default:!1},isAmount:{type:Boolean,default:!1},formation:{type:Function,default:()=>void 0}},emits:[`update:modelValue`,`change`,`focus`,`blur`,`confirm`,`keyup`,`keydown`],setup(f,{expose:p,emit:m}){function h(e){return e.replace(/[\s,]/g,``)}let g=f,_=m,v=(0,i.inject)(`rootField`,null),y=(0,i.ref)(),b=(0,i.ref)(),x=g.name??(0,a.randomId)(`input-item`),S=(0,i.ref)(``),C=(0,i.ref)(``),w=(0,i.ref)(null),T=(0,i.ref)(!1),E=(0,i.ref)(!1),D=(0,i.ref)(!1),O=!1,k=null,A=null,j=(0,i.computed)(()=>(D.value?g.previewType:g.type)||`text`),M=(0,i.computed)(()=>{let e=j.value||`text`;return e===`bankCard`||e===`phone`||e===`digit`?e=`tel`:e===`money`&&(e=`text`),e}),N=(0,i.computed)(()=>j.value===`phone`?11:g.maxlength),P=(0,i.computed)(()=>g.isTitleLatent&&F.value?``:g.placeholder),F=(0,i.computed)(()=>!I.value||T.value),I=(0,i.computed)(()=>!S.value.length),L=(0,i.computed)(()=>{let e=j.value;return g.isFormative||e===`bankCard`||e===`phone`||e===`money`||e===`digit`}),R=(0,i.computed)(()=>!!v?.disabled||g.disabled),z=(0,i.computed)(()=>!!H.value||g.error!==``),B=(0,i.computed)(()=>!!te.value||g.brief!==``),V=(0,i.useSlots)(),H=(0,i.computed)(()=>!!V.error),te=(0,i.computed)(()=>!!V.brief);(0,i.watch)(()=>g.modelValue,e=>{e!==h(S.value)&&(S.value=U(W(`${e}`)).value)}),(0,i.watch)(()=>g.previewType,e=>{D.value=!!e},{immediate:!0}),(0,i.watch)(S,e=>{C.value=e;let t=L.value?h(e):e;t!==g.modelValue&&(_(`update:modelValue`,t),_(`change`,x,t))}),(0,i.watch)(T,e=>{if(!g.isVirtualKeyboard||!w.value)return;let t=w.value;e?(t.show?.(),_(`focus`,x)):(t.hide?.(),_(`blur`,x))}),S.value=U(W(`${g.modelValue}`)).value,(0,i.onMounted)(()=>{g.isVirtualKeyboard&&(0,i.nextTick)(()=>{X()})}),(0,i.onBeforeUnmount)(()=>{let e=w.value;e?.$el&&e.$el.parentNode&&e.$el.parentNode.removeChild(e.$el),k&&clearTimeout(k),A&&clearTimeout(A),document.removeEventListener(`click`,Y,!1)});function U(e,t=0){let n=j.value,r=S.value,i=r.length>e.length?-1:1,o={value:e,range:t};if(!L.value||e===``)return o;let s=g.formation(x,e,t);if(s)return s;let c=` `;switch(n){case`bankCard`:e=W((0,a.trimValue)(e.replace(/\D/g,``))),o=(0,a.formatValueByGapStep)(4,e,c,`left`,t,i,r);break;case`phone`:e=W((0,a.trimValue)(e.replace(/\D/g,``))),o=(0,a.formatValueByGapRule)(`3|4|4`,e,c,t,i);break;case`money`:{c=`,`,e=W((0,a.trimValue)(e.replace(/[^\d.]/g,``)));let n=e.indexOf(`.`),s=e.split(`.`)[0],l=~n?`.${e.split(`.`)[1]}`:``;o=(0,a.formatValueByGapStep)(3,(0,a.trimValue)(s,c),c,`right`,t,i,r.split(`.`)[0]),o.value+=l;break}case`digit`:e=W((0,a.trimValue)(e.replace(/\D/g,``))),o.value=e}return o}function W(e){let t=N.value;return t!==``&&t!==void 0?e.substring(0,Number(t)):e}function G(){E.value=!0,k&&clearTimeout(k),k=setTimeout(()=>{E.value=!1},500)}function K(){S.value=``,!g.isTitleLatent&&$(),D.value=!1}function q(){K()}function J(){T.value=!0,setTimeout(()=>{document.addEventListener(`click`,Y,!1)},0)}function Y(){T.value=!1,document.removeEventListener(`click`,Y,!1)}function X(){let e=g.virtualKeyboardVm&&typeof g.virtualKeyboardVm==`object`?g.virtualKeyboardVm:b.value;e&&(w.value=e,e.$el&&document.body.appendChild(e.$el))}function Z(e){let t=e.target;if(O){S.value=t.value,C.value=t.value;return}let n=U(t.value,L.value?r.t(t):0);S.value=n.value,C.value=n.value,L.value&&(0,i.nextTick)(()=>{r.n(t,n.range)})}function ne(){O=!0}function re(e){O=!1,Z(e)}function ie(e){_(`keyup`,x,e),(+e.keyCode==13||+e.keyCode==108)&&_(`confirm`,x,S.value)}function ae(e){_(`keydown`,x,e),+e.keyCode!=13&&+e.keyCode!=108&&(G(),D.value&&q())}function oe(){T.value=!0,_(`focus`,x)}function se(){A&&clearTimeout(A),A=setTimeout(()=>{A=null,T.value=!1,_(`blur`,x)},100)}function Q(){R.value||g.readonly||(Y(),T.value||J())}function ce(e){D.value&&q(),Number(N.value)>0&&h(S.value).length>=Number(N.value)||(S.value=U(S.value+e).value,G())}function le(){let e=S.value;e!==``&&(S.value=U(e.substring(0,e.length-1)).value,G(),D.value&&q())}function ue(){_(`confirm`,x,S.value)}function $(){g.isVirtualKeyboard?Q():(y.value?.$el.querySelector(`.cu-input-item-input`)?.focus(),setTimeout(()=>{T.value=!0},200))}function de(){g.isVirtualKeyboard?Y():y.value?.$el.querySelector(`.cu-input-item-input`)?.blur()}function fe(){return S.value}return p({focus:$,blur:de,getValue:fe}),(r,a)=>((0,i.openBlock)(),(0,i.createBlock)(e.t,{ref_key:`root`,ref:y,class:(0,i.normalizeClass)([`cu-input-item`,[f.isHighlight?`is-highlight`:``,f.isTitleLatent?`is-title-latent`:``,F.value?`is-active`:``,T.value?`is-focus`:``,z.value?`is-error`:``,B.value&&!z.value?`with-brief`:``,R.value?`is-disabled`:``,f.isAmount?`is-amount`:``,f.clearable?`is-clear`:``,f.align,f.size]]),title:f.title,solid:f.solid&&!f.isTitleLatent},{left:(0,i.withCtx)(()=>[(0,i.renderSlot)(r.$slots,`left`)]),right:(0,i.withCtx)(()=>[f.clearable&&!R.value&&!f.readonly?(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:0,class:`cu-input-item-clear`,onClick:K},[(0,i.createVNode)(t.t,{name:`clear`})],512)),[[i.vShow,!I.value&&T.value]]):(0,i.createCommentVNode)(``,!0),(0,i.renderSlot)(r.$slots,`right`)]),children:(0,i.withCtx)(()=>[z.value?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,l,[f.error===``?(0,i.renderSlot)(r.$slots,`error`,{},void 0,void 0,1):((0,i.openBlock)(),(0,i.createElementBlock)(`p`,{key:0,textContent:(0,i.toDisplayString)(f.error)},null,8,ee))])):(0,i.createCommentVNode)(``,!0),B.value&&!z.value?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,u,[f.brief===``?(0,i.renderSlot)(r.$slots,`brief`,{},void 0,void 0,1):((0,i.openBlock)(),(0,i.createElementBlock)(`p`,{key:0,textContent:(0,i.toDisplayString)(f.brief)},null,8,d))])):(0,i.createCommentVNode)(``,!0),f.isVirtualKeyboard&&!f.virtualKeyboardVm?((0,i.openBlock)(),(0,i.createBlock)(n.t,{key:2,ref_key:`numberKeyboard`,ref:b,id:`${(0,i.unref)(x)}-number-keyboard`,class:`cu-input-item-number-keyboard`,"ok-text":f.virtualKeyboardOkText,disorder:f.virtualKeyboardDisorder,onEnter:ce,onDelete:le,onConfirm:ue},null,8,[`id`,`ok-text`,`disorder`])):(0,i.createCommentVNode)(``,!0)]),default:(0,i.withCtx)(()=>[f.isVirtualKeyboard?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:1,class:(0,i.normalizeClass)([`cu-input-item-fake`,{"is-focus":T.value,"is-waiting":!E.value,disabled:R.value,readonly:f.readonly}]),onClick:Q},[(0,i.createElementVNode)(`span`,{textContent:(0,i.toDisplayString)(S.value)},null,8,s),S.value===``&&P.value!==``?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,{key:0,class:`cu-input-item-fake-placeholder`,textContent:(0,i.toDisplayString)(P.value)},null,8,c)):(0,i.createCommentVNode)(``,!0)],2)):((0,i.openBlock)(),(0,i.createElementBlock)(`input`,{key:0,class:`cu-input-item-input`,type:M.value,name:String((0,i.unref)(x)),value:C.value,placeholder:P.value,disabled:R.value,readonly:f.readonly,maxlength:L.value?``:N.value,autocomplete:`off`,onFocus:oe,onBlur:se,onKeyup:ie,onKeydown:ae,onInput:Z,onCompositionstart:ne,onCompositionend:re},null,40,o))]),_:3},8,[`class`,`title`,`solid`]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});