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.
- package/dist/ActionBar-Bs5fkyFH.cjs +1 -0
- package/dist/ActionBar-CF1zMUMC.js +56 -0
- package/dist/ActivityIndicator-BOZRJBDn.cjs +1 -0
- package/dist/{RollerSuccess-CVEmS9gU.js → ActivityIndicator-Cp20c1E0.js} +30 -92
- package/dist/{Agree-DT46e5q5.cjs → Agree-ZswFiFNy.cjs} +1 -1
- package/dist/{Agree-yTGTi4e6.js → Agree-lAcOo38C.js} +2 -3
- package/dist/Amount-B2StZGGW.js +56 -0
- package/dist/Amount-CU7Oc4vv.cjs +1 -0
- package/dist/Bill-DDVs3Lu3.cjs +1 -0
- package/dist/Bill-qQ4LdkmR.js +58 -0
- package/dist/{Button-Blpwwbnw.cjs → Button-Bu8liJQE.cjs} +1 -1
- package/dist/{Button-BIi6CrwM.js → Button-D7e-cuA1.js} +5 -6
- package/dist/Captcha-BEF-de8-.cjs +1 -0
- package/dist/Captcha-CgpynYTc.js +283 -0
- package/dist/Cashier-CJLfQOXm.js +363 -0
- package/dist/Cashier-CLJngM0n.cjs +1 -0
- package/dist/{CellItem-YZD-BxKt.js → CellItem-BHEh4Cp-.js} +2 -3
- package/dist/{CellItem-T78DHako.cjs → CellItem-J0LkwZNL.cjs} +1 -1
- package/dist/Chart-BINJAx7V.js +135 -0
- package/dist/Chart-DJ0Q1g1P.cjs +1 -0
- package/dist/CheckBox-D5bCJUXD.js +55 -0
- package/dist/CheckBox-DDeCshDK.cjs +1 -0
- package/dist/CheckBoxBase-BIPGJ-TD.js +43 -0
- package/dist/CheckBoxBase-CobK6-tL.cjs +1 -0
- package/dist/CheckList-BsKo_Fl3.cjs +1 -0
- package/dist/{CheckList-Bfy3B-eN.js → CheckList-ViiCo4yi.js} +47 -91
- package/dist/{Codebox-D0UtCj11.js → Codebox-BLPrFnIv.js} +4 -5
- package/dist/Codebox-yLkdTU7w.cjs +1 -0
- package/dist/{DatePicker-B1AVbKhK.cjs → DatePicker-CCU6gqG3.cjs} +1 -1
- package/dist/{DatePicker-TAHuve5t.js → DatePicker-CYvPJatt.js} +2 -4
- package/dist/DetailItem-D6-zbZmd.js +21 -0
- package/dist/DetailItem-DDJXXao0.cjs +1 -0
- package/dist/Dialog-208_XUAL.cjs +1 -0
- package/dist/Dialog-Bb7Gth3j.js +148 -0
- package/dist/DropMenu-5TA_6bas.js +95 -0
- package/dist/DropMenu-D_ZMGOOi.cjs +1 -0
- package/dist/{Field-CseJzTZz.js → Field-0hdNWFNm.js} +1 -2
- package/dist/{FieldItem-Cc7bw5vU.js → FieldItem-D79w330m.js} +2 -3
- package/dist/{FieldItem-Dkpx5Kxk.cjs → FieldItem-UFKrl_5J.cjs} +1 -1
- package/dist/{Icon-jaEPn7d7.cjs → Icon-83WWqE5z.cjs} +1 -1
- package/dist/{Icon-dWGSK6Ou.js → Icon-BgCtu0ZV.js} +3 -5
- package/dist/ImageReader-DjshA_hh.cjs +1 -0
- package/dist/ImageReader-hUb5CEbV.js +122 -0
- package/dist/ImageViewer-BCEK4DOF.cjs +1 -0
- package/dist/ImageViewer-_dTRCIsV.js +68 -0
- package/dist/InputItem-DO5Yo_IH.cjs +1 -0
- package/dist/InputItem-yHsLFvKt.js +327 -0
- package/dist/Landscape-BsHyoM4N.cjs +1 -0
- package/dist/Landscape-Dd0abEy1.js +73 -0
- package/dist/LicensePlate-CTcAIbcb.js +201 -0
- package/dist/LicensePlate-CfwpVw0G.cjs +1 -0
- package/dist/NoticeBar-CV355FeO.cjs +1 -0
- package/dist/NoticeBar-G5aKL6VO.js +92 -0
- package/dist/NumberKeyboard-BWpxsbYt.cjs +1 -0
- package/dist/{NumberKeyboard-C7TRF5iC.js → NumberKeyboard-B_TJXxki.js} +77 -62
- package/dist/Picker-BOEGTBaN.cjs +1 -0
- package/dist/{Picker-Dam0LEcc.js → Picker-CA-JQ_OC.js} +168 -151
- package/dist/Popup-Ca1jPi0t.cjs +1 -0
- package/dist/Popup-qLk-BsRS.js +116 -0
- package/dist/{PopupTitleBar-nVurLaOe.js → PopupTitleBar-9P4RUMC1.js} +2 -3
- package/dist/{PopupTitleBar-B4vwxKC7.cjs → PopupTitleBar-Bfl49eYJ.cjs} +1 -1
- package/dist/Progress-CT-LHaQ0.cjs +1 -0
- package/dist/{Progress-CwIC6scr.js → Progress-Clet0W_n.js} +20 -22
- package/dist/Radio-B_MxJ65X.cjs +1 -0
- package/dist/{Radio-fsc7_N5K.js → Radio-DY-ZX0BP.js} +16 -14
- package/dist/{RadioGroup-CMPmk8X_.js → RadioGroup-B00aqM9e.js} +8 -6
- package/dist/RadioGroup-B6ukqnm5.cjs +1 -0
- package/dist/{RadioList-upQgua8Z.cjs → RadioList-D-9PITpr.cjs} +1 -1
- package/dist/{RadioList-CkerkQEY.js → RadioList-DNGsEzgf.js} +6 -8
- package/dist/ResultPage-DUs8ok5R.js +64 -0
- package/dist/ResultPage-YQWDaFmz.cjs +1 -0
- package/dist/{Roller-DFJ7jMV0.js → Roller-BznN57fL.js} +1 -2
- package/dist/RollerSuccess-BbMzNlkv.cjs +1 -0
- package/dist/RollerSuccess-CTh43Rh0.js +65 -0
- package/dist/Ruler-Bhf5J7hU.js +136 -0
- package/dist/Ruler-CEzB0oqG.cjs +1 -0
- package/dist/ScrollView-BNY62f7B.js +228 -0
- package/dist/ScrollView-BnadVBJC.cjs +1 -0
- package/dist/ScrollViewMore-BL1vpyMj.cjs +1 -0
- package/dist/ScrollViewMore-DBhoiI1X.js +54 -0
- package/dist/Selector-DOU8Af55.js +209 -0
- package/dist/Selector-DnFvOGbv.cjs +1 -0
- package/dist/{Skeleton-BG_j23KI.js → Skeleton-DqA5IxL5.js} +1 -2
- package/dist/Slider-BB2Nhpys.js +100 -0
- package/dist/Slider-vV7_nULf.cjs +1 -0
- package/dist/Stepper-BnDhL8IO.js +137 -0
- package/dist/Stepper-n_mc16V2.cjs +1 -0
- package/dist/Steps-BPQwab3T.js +157 -0
- package/dist/Steps-Dfpmgl8B.cjs +1 -0
- package/dist/SwiperItem-BY5cUoGn.cjs +1 -0
- package/dist/SwiperItem-BydyBdYU.js +323 -0
- package/dist/Switch-B1rsBY-M.js +31 -0
- package/dist/Switch-CghubImq.cjs +1 -0
- package/dist/TabPane-BCVsdptu.cjs +1 -0
- package/dist/TabPane-Q7oUFzmP.js +237 -0
- package/dist/TabPicker-BcL9assY.cjs +1 -0
- package/dist/TabPicker-BicPrto7.js +173 -0
- package/dist/Tag-C7ygxOwU.js +78 -0
- package/dist/Tag-CIA2npnD.cjs +1 -0
- package/dist/TextareaItem-Dl-PCLl-.js +168 -0
- package/dist/TextareaItem-Du5nl7tv.cjs +1 -0
- package/dist/{Tip-BFZSiRc1.js → Tip-DHPmevlv.js} +2 -3
- package/dist/{Tip-C3brAF9N.cjs → Tip-De_3tKtb.cjs} +1 -1
- package/dist/Transition-B-baX512.js +14 -0
- package/dist/Transition-Bwbqr4Xr.cjs +1 -0
- package/dist/WaterMark-CgkuQjv3.js +103 -0
- package/dist/WaterMark-M81jg6T5.cjs +1 -0
- package/dist/action-bar.cjs +1 -0
- package/dist/action-bar.d.ts +1 -0
- package/dist/action-bar.js +1 -0
- package/dist/{action-sheet-LJilF3EQ.cjs → action-sheet-BjaReHkr.cjs} +1 -1
- package/dist/{action-sheet-DKpi2GLQ.js → action-sheet-Da8dHevy.js} +15 -12
- package/dist/action-sheet.cjs +1 -1
- package/dist/action-sheet.js +1 -2
- package/dist/activity-indicator.cjs +1 -1
- package/dist/activity-indicator.js +4 -3
- package/dist/agree.cjs +1 -1
- package/dist/agree.js +1 -2
- package/dist/amount.cjs +1 -1
- package/dist/amount.js +1 -2
- package/dist/bill.cjs +1 -0
- package/dist/bill.d.ts +1 -0
- package/dist/bill.js +1 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -2
- package/dist/captcha.cjs +1 -0
- package/dist/captcha.d.ts +1 -0
- package/dist/captcha.js +1 -0
- package/dist/cashier.cjs +1 -0
- package/dist/cashier.d.ts +1 -0
- package/dist/cashier.js +1 -0
- package/dist/cell-item.cjs +1 -1
- package/dist/cell-item.js +1 -2
- package/dist/chart.cjs +1 -0
- package/dist/chart.d.ts +1 -0
- package/dist/chart.js +1 -0
- package/dist/check-base.cjs +1 -1
- package/dist/check-base.js +1 -2
- package/dist/check.cjs +1 -1
- package/dist/check.js +3 -2
- package/dist/codebox.cjs +1 -1
- package/dist/codebox.js +1 -2
- package/dist/components/action-sheet/ActionSheet.vue.d.ts +5 -0
- package/dist/components/cashier/CashierChannel.vue.d.ts +4 -0
- package/dist/components/dialog/Dialog.vue.d.ts +10 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/components/number-keyboard/KeyboardKey.vue.d.ts +3 -0
- package/dist/components/popup/PopupTitleBar.vue.d.ts +4 -0
- package/dist/components/swiper/Swiper.vue.d.ts +2 -2
- package/dist/cursor-BIPoNm8V.js +11 -0
- package/dist/cursor-tQE3LcbU.cjs +1 -0
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.js +1 -2
- package/dist/detail-item.cjs +1 -0
- package/dist/detail-item.d.ts +1 -0
- package/dist/detail-item.js +1 -0
- package/dist/dialog-C38EDWGJ.cjs +1 -0
- package/dist/dialog-DdNA6YSe.js +91 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +2 -1
- package/dist/drop-menu.cjs +1 -0
- package/dist/drop-menu.d.ts +1 -0
- package/dist/drop-menu.js +1 -0
- package/dist/field-item.cjs +1 -1
- package/dist/field-item.js +1 -2
- package/dist/field.js +1 -2
- package/dist/icon.cjs +1 -1
- package/dist/icon.js +1 -2
- package/dist/image-reader.cjs +1 -0
- package/dist/image-reader.d.ts +1 -0
- package/dist/image-reader.js +1 -0
- package/dist/image-viewer.cjs +1 -0
- package/dist/image-viewer.d.ts +1 -0
- package/dist/image-viewer.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +61 -2669
- package/dist/input-item.cjs +1 -1
- package/dist/input-item.js +1 -2
- package/dist/landscape.cjs +1 -0
- package/dist/landscape.d.ts +1 -0
- package/dist/landscape.js +1 -0
- package/dist/license-plate.cjs +1 -0
- package/dist/license-plate.d.ts +1 -0
- package/dist/license-plate.js +1 -0
- package/dist/notice-bar.cjs +1 -1
- package/dist/notice-bar.js +1 -2
- package/dist/number-keyboard.cjs +1 -1
- package/dist/number-keyboard.js +1 -2
- package/dist/picker.cjs +1 -1
- package/dist/picker.js +1 -2
- package/dist/popup.cjs +1 -1
- package/dist/popup.js +2 -2
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -2
- package/dist/radio-list.cjs +1 -1
- package/dist/radio-list.js +1 -2
- package/dist/radio.cjs +1 -1
- package/dist/radio.js +2 -2
- package/dist/result-page.cjs +1 -0
- package/dist/result-page.d.ts +1 -0
- package/dist/result-page.js +1 -0
- package/dist/ruler.cjs +1 -0
- package/dist/ruler.d.ts +1 -0
- package/dist/ruler.js +1 -0
- package/dist/scroll-view.cjs +1 -1
- package/dist/scroll-view.js +3 -2
- package/dist/selector.cjs +1 -0
- package/dist/selector.d.ts +1 -0
- package/dist/selector.js +1 -0
- package/dist/{shared-BtSkmaWC.js → shared-C9XlLe7F.js} +1 -2
- package/dist/skeleton.js +1 -2
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -2
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +1 -2
- package/dist/steps.cjs +1 -0
- package/dist/steps.d.ts +1 -0
- package/dist/steps.js +1 -0
- package/dist/swiper.cjs +1 -1
- package/dist/swiper.js +1 -2
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -2
- package/dist/tab-picker.cjs +1 -0
- package/dist/tab-picker.d.ts +1 -0
- package/dist/tab-picker.js +1 -0
- package/dist/tabs.cjs +1 -0
- package/dist/tabs.d.ts +1 -0
- package/dist/tabs.js +1 -0
- package/dist/tag.cjs +1 -1
- package/dist/tag.js +1 -2
- package/dist/textarea-item.cjs +1 -0
- package/dist/textarea-item.d.ts +1 -0
- package/dist/textarea-item.js +1 -0
- package/dist/tip.cjs +1 -1
- package/dist/tip.js +1 -2
- package/dist/{toast-DX-RoB7Q.js → toast-ByIFvpMs.js} +6 -6
- package/dist/toast-C1K2_cOo.cjs +1 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.js +1 -2
- package/dist/transition.cjs +1 -0
- package/dist/transition.d.ts +1 -0
- package/dist/transition.js +1 -0
- package/dist/water-mark.cjs +1 -0
- package/dist/water-mark.d.ts +1 -0
- package/dist/water-mark.js +1 -0
- package/package.json +105 -4
- package/dist/Amount-De-oObat.cjs +0 -1
- package/dist/Amount-wOtRYOdx.js +0 -62
- package/dist/CheckBoxBase-BDsytL_r.cjs +0 -1
- package/dist/CheckBoxBase-BjyVzGqj.js +0 -40
- package/dist/CheckList-DEmLmccw.cjs +0 -1
- package/dist/Codebox-Cgj7wyzd.cjs +0 -1
- package/dist/InputItem-EJ4Y3tpU.cjs +0 -1
- package/dist/InputItem-bhFtp97z.js +0 -322
- package/dist/NoticeBar-DSf_EjTL.cjs +0 -1
- package/dist/NoticeBar-PEYcjXwD.js +0 -84
- package/dist/NumberKeyboard-BX0c0l2r.cjs +0 -1
- package/dist/Picker-D-TPtSxf.cjs +0 -1
- package/dist/Popup-Cm4BuaOo.cjs +0 -1
- package/dist/Popup-DPYBBL95.js +0 -116
- package/dist/Progress-DukssNvl.cjs +0 -1
- package/dist/Radio-ZHivLdvi.cjs +0 -1
- package/dist/RadioGroup-BR_jSDR4.cjs +0 -1
- package/dist/RollerSuccess--JecJ7bz.cjs +0 -1
- package/dist/ScrollViewMore-BWph-i1-.cjs +0 -1
- package/dist/ScrollViewMore-BgYJx-TP.js +0 -278
- package/dist/Slider-D3wrE8hn.cjs +0 -1
- package/dist/Slider-DteN8p-L.js +0 -95
- package/dist/Stepper-1EOk4pCY.js +0 -127
- package/dist/Stepper-BJr4I6_8.cjs +0 -1
- package/dist/SwiperItem-B6TgjCsM.cjs +0 -1
- package/dist/SwiperItem-CKd-XKT7.js +0 -337
- package/dist/Switch-B6DvVj2p.js +0 -30
- package/dist/Switch-BVPjF8CM.cjs +0 -1
- package/dist/Tag-CPv77lC8.cjs +0 -1
- package/dist/Tag-bs5j40pF.js +0 -66
- package/dist/dialog-0-E4Vyc-.cjs +0 -1
- package/dist/dialog-DHIZ2SMK.js +0 -227
- package/dist/toast-CAeyMc5r.cjs +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { t as e } from "./FieldItem-D79w330m.js";
|
|
2
|
+
import { t } from "./Icon-BgCtu0ZV.js";
|
|
3
|
+
import { n, t as r } from "./cursor-BIPoNm8V.js";
|
|
4
|
+
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, nextTick as f, normalizeClass as p, onMounted as m, openBlock as h, ref as g, renderSlot as _, toDisplayString as v, vModelText as y, vShow as b, watch as x, withCtx as S, withDirectives as C } from "vue";
|
|
5
|
+
// src/components/textarea-item/TextareaItem.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var w = [
|
|
7
|
+
"disabled",
|
|
8
|
+
"readonly",
|
|
9
|
+
"maxlength",
|
|
10
|
+
"placeholder",
|
|
11
|
+
"rows"
|
|
12
|
+
], T = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "cu-textarea-item-msg"
|
|
15
|
+
}, E = /* @__PURE__ */ u({
|
|
16
|
+
name: "cu-textarea-item",
|
|
17
|
+
__name: "TextareaItem",
|
|
18
|
+
props: {
|
|
19
|
+
title: { default: "" },
|
|
20
|
+
name: { default: () => `textarea-item-${Math.floor(Math.random() * 1e4)}` },
|
|
21
|
+
placeholder: { default: "" },
|
|
22
|
+
modelValue: { default: "" },
|
|
23
|
+
value: { default: "" },
|
|
24
|
+
maxLength: { default: "" },
|
|
25
|
+
maxHeight: { default: "" },
|
|
26
|
+
solid: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
},
|
|
30
|
+
readonly: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
clearable: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
rows: { default: "3" },
|
|
43
|
+
autosize: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
error: { default: "" },
|
|
48
|
+
formation: {
|
|
49
|
+
type: Function,
|
|
50
|
+
default: void 0
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: [
|
|
54
|
+
"update:modelValue",
|
|
55
|
+
"change",
|
|
56
|
+
"input",
|
|
57
|
+
"focus",
|
|
58
|
+
"blur",
|
|
59
|
+
"keyup",
|
|
60
|
+
"keydown"
|
|
61
|
+
],
|
|
62
|
+
setup(u, { expose: E, emit: D }) {
|
|
63
|
+
let O = u, k = D, A = g(O.maxHeight), j = g(O.modelValue || O.value), M = g(!1), N = g(), P = d(), F = (() => {
|
|
64
|
+
let e = P?.vnode.props;
|
|
65
|
+
return !!e && ("modelValue" in e || "onUpdate:modelValue" in e);
|
|
66
|
+
})(), I = i(() => O.disabled), L = i(() => O.error), R = i(() => !j.value.length);
|
|
67
|
+
x(() => F ? O.modelValue : O.value, (e) => {
|
|
68
|
+
j.value = e, f(() => {
|
|
69
|
+
q();
|
|
70
|
+
});
|
|
71
|
+
}), x(j, (e) => {
|
|
72
|
+
k("update:modelValue", e), k("change", e);
|
|
73
|
+
}), x(() => O.maxHeight, (e) => {
|
|
74
|
+
A.value = e, q();
|
|
75
|
+
}), m(() => {
|
|
76
|
+
q();
|
|
77
|
+
});
|
|
78
|
+
function z(e) {
|
|
79
|
+
let t = e.target, i = B(t.value, r(t));
|
|
80
|
+
j.value = i.value, f(() => {
|
|
81
|
+
n(t, i.range), q();
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function B(e, t = 0) {
|
|
85
|
+
return O.formation?.(O.name, e, t) || {
|
|
86
|
+
value: e,
|
|
87
|
+
range: t
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function V() {
|
|
91
|
+
j.value = "", f(() => {
|
|
92
|
+
q();
|
|
93
|
+
}), J();
|
|
94
|
+
}
|
|
95
|
+
function H(e) {
|
|
96
|
+
k("keyup", e);
|
|
97
|
+
}
|
|
98
|
+
function U(e) {
|
|
99
|
+
k("keydown", e);
|
|
100
|
+
}
|
|
101
|
+
function W() {
|
|
102
|
+
M.value = !0, k("focus");
|
|
103
|
+
}
|
|
104
|
+
function G() {
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
M.value = !1, k("blur");
|
|
107
|
+
}, 100);
|
|
108
|
+
}
|
|
109
|
+
function K(e) {
|
|
110
|
+
e.style.height = "auto";
|
|
111
|
+
let t = e.scrollHeight;
|
|
112
|
+
t !== 0 && (A.value && t > Number(A.value) && (t = Number(A.value)), e.style.height = t + "px");
|
|
113
|
+
}
|
|
114
|
+
function q() {
|
|
115
|
+
O.autosize && N.value && K(N.value);
|
|
116
|
+
}
|
|
117
|
+
function J() {
|
|
118
|
+
N.value?.focus(), setTimeout(() => {
|
|
119
|
+
M.value = !0;
|
|
120
|
+
}, 200);
|
|
121
|
+
}
|
|
122
|
+
function Y() {
|
|
123
|
+
N.value?.blur(), M.value = !1;
|
|
124
|
+
}
|
|
125
|
+
function X() {
|
|
126
|
+
return j.value;
|
|
127
|
+
}
|
|
128
|
+
return E({
|
|
129
|
+
resizeTextarea: q,
|
|
130
|
+
focus: J,
|
|
131
|
+
blur: Y,
|
|
132
|
+
getValue: X
|
|
133
|
+
}), (n, r) => (h(), a(e, {
|
|
134
|
+
class: p(["cu-textarea-item", [I.value ? "is-disabled" : "", L.value ? "is-error" : ""]]),
|
|
135
|
+
title: u.title,
|
|
136
|
+
solid: u.solid
|
|
137
|
+
}, {
|
|
138
|
+
right: S(() => [u.clearable && !I.value && !u.readonly ? C((h(), s("div", {
|
|
139
|
+
key: 0,
|
|
140
|
+
class: "cu-textarea-item__clear",
|
|
141
|
+
onClick: V
|
|
142
|
+
}, [l(t, { name: "clear" })], 512)), [[b, !R.value && M.value]]) : o("", !0), _(n.$slots, "right")]),
|
|
143
|
+
children: S(() => [L.value ? (h(), s("div", T, [c("p", null, v(L.value), 1)])) : o("", !0)]),
|
|
144
|
+
default: S(() => [C(c("textarea", {
|
|
145
|
+
ref_key: "textarea",
|
|
146
|
+
ref: N,
|
|
147
|
+
"onUpdate:modelValue": r[0] ||= (e) => j.value = e,
|
|
148
|
+
class: "cu-textarea-item__textarea",
|
|
149
|
+
disabled: I.value,
|
|
150
|
+
readonly: u.readonly,
|
|
151
|
+
maxlength: u.maxLength,
|
|
152
|
+
placeholder: u.placeholder,
|
|
153
|
+
rows: u.rows,
|
|
154
|
+
onInput: z,
|
|
155
|
+
onFocus: W,
|
|
156
|
+
onBlur: G,
|
|
157
|
+
onKeyup: H,
|
|
158
|
+
onKeydown: U
|
|
159
|
+
}, null, 40, w), [[y, j.value]]), _(n.$slots, "footer")]),
|
|
160
|
+
_: 3
|
|
161
|
+
}, 8, [
|
|
162
|
+
"class",
|
|
163
|
+
"title",
|
|
164
|
+
"solid"
|
|
165
|
+
]));
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
export { E as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./FieldItem-UFKrl_5J.cjs"),t=require("./Icon-83WWqE5z.cjs"),n=require("./cursor-tQE3LcbU.cjs");let r=require("vue");var i=[`disabled`,`readonly`,`maxlength`,`placeholder`,`rows`],a={key:0,class:`cu-textarea-item-msg`},o=(0,r.defineComponent)({name:`cu-textarea-item`,__name:`TextareaItem`,props:{title:{default:``},name:{default:()=>`textarea-item-${Math.floor(Math.random()*1e4)}`},placeholder:{default:``},modelValue:{default:``},value:{default:``},maxLength:{default:``},maxHeight:{default:``},solid:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},rows:{default:`3`},autosize:{type:Boolean,default:!1},error:{default:``},formation:{type:Function,default:void 0}},emits:[`update:modelValue`,`change`,`input`,`focus`,`blur`,`keyup`,`keydown`],setup(o,{expose:s,emit:c}){let l=o,u=c,d=(0,r.ref)(l.maxHeight),f=(0,r.ref)(l.modelValue||l.value),p=(0,r.ref)(!1),m=(0,r.ref)(),h=(0,r.getCurrentInstance)(),g=(()=>{let e=h?.vnode.props;return!!e&&(`modelValue`in e||`onUpdate:modelValue`in e)})(),_=(0,r.computed)(()=>l.disabled),v=(0,r.computed)(()=>l.error),y=(0,r.computed)(()=>!f.value.length);(0,r.watch)(()=>g?l.modelValue:l.value,e=>{f.value=e,(0,r.nextTick)(()=>{O()})}),(0,r.watch)(f,e=>{u(`update:modelValue`,e),u(`change`,e)}),(0,r.watch)(()=>l.maxHeight,e=>{d.value=e,O()}),(0,r.onMounted)(()=>{O()});function b(e){let t=e.target,i=x(t.value,n.t(t));f.value=i.value,(0,r.nextTick)(()=>{n.n(t,i.range),O()})}function x(e,t=0){return l.formation?.(l.name,e,t)||{value:e,range:t}}function S(){f.value=``,(0,r.nextTick)(()=>{O()}),k()}function C(e){u(`keyup`,e)}function w(e){u(`keydown`,e)}function T(){p.value=!0,u(`focus`)}function E(){setTimeout(()=>{p.value=!1,u(`blur`)},100)}function D(e){e.style.height=`auto`;let t=e.scrollHeight;t!==0&&(d.value&&t>Number(d.value)&&(t=Number(d.value)),e.style.height=t+`px`)}function O(){l.autosize&&m.value&&D(m.value)}function k(){m.value?.focus(),setTimeout(()=>{p.value=!0},200)}function A(){m.value?.blur(),p.value=!1}function j(){return f.value}return s({resizeTextarea:O,focus:k,blur:A,getValue:j}),(n,s)=>((0,r.openBlock)(),(0,r.createBlock)(e.t,{class:(0,r.normalizeClass)([`cu-textarea-item`,[_.value?`is-disabled`:``,v.value?`is-error`:``]]),title:o.title,solid:o.solid},{right:(0,r.withCtx)(()=>[o.clearable&&!_.value&&!o.readonly?(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:0,class:`cu-textarea-item__clear`,onClick:S},[(0,r.createVNode)(t.t,{name:`clear`})],512)),[[r.vShow,!y.value&&p.value]]):(0,r.createCommentVNode)(``,!0),(0,r.renderSlot)(n.$slots,`right`)]),children:(0,r.withCtx)(()=>[v.value?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,a,[(0,r.createElementVNode)(`p`,null,(0,r.toDisplayString)(v.value),1)])):(0,r.createCommentVNode)(``,!0)]),default:(0,r.withCtx)(()=>[(0,r.withDirectives)((0,r.createElementVNode)(`textarea`,{ref_key:`textarea`,ref:m,"onUpdate:modelValue":s[0]||=e=>f.value=e,class:`cu-textarea-item__textarea`,disabled:_.value,readonly:o.readonly,maxlength:o.maxLength,placeholder:o.placeholder,rows:o.rows,onInput:b,onFocus:T,onBlur:E,onKeyup:C,onKeydown:w},null,40,i),[[r.vModelText,f.value]]),(0,r.renderSlot)(n.$slots,`footer`)]),_:3},8,[`class`,`title`,`solid`]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./Icon-
|
|
1
|
+
import { t as e } from "./Icon-BgCtu0ZV.js";
|
|
2
2
|
import { Fragment as t, cloneVNode as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, getCurrentInstance as u, normalizeClass as d, onBeforeUnmount as f, onMounted as p, openBlock as m, render as h, renderSlot as g, toDisplayString as _ } from "vue";
|
|
3
3
|
import { randomId as v } from "@centui/core";
|
|
4
|
-
|
|
4
|
+
// src/components/tip/TipContent.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var y = { class: "cu-tip-content" }, b = ["textContent"], x = /* @__PURE__ */ l({
|
|
6
6
|
name: "cu-tip-content",
|
|
7
7
|
__name: "TipContent",
|
|
@@ -162,5 +162,4 @@ var y = { class: "cu-tip-content" }, b = ["textContent"], x = /* @__PURE__ */ l(
|
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
|
-
//#endregion
|
|
166
165
|
export { x as n, S as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./Icon-
|
|
1
|
+
const e=require("./Icon-83WWqE5z.cjs");let t=require("vue"),n=require("@centui/core");var r={class:`cu-tip-content`},i=[`textContent`],a=(0,t.defineComponent)({name:`cu-tip-content`,__name:`TipContent`,props:{placement:{default:`top`},closable:{type:Boolean,default:!0},icon:{default:void 0},iconSvg:{type:Boolean,default:!1},content:{default:``},name:{default:void 0}},emits:[`close`],setup(n,{emit:a}){let o=n,s=a,c=(0,t.computed)(()=>({"has-close":o.closable,[`is-${o.placement}`]:[`left`,`bottom`,`right`].includes(o.placement),[String(o.name)]:!!o.name}));function l(){s(`close`)}return(a,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cu-tip`,c.value])},[(0,t.createElementVNode)(`div`,r,[a.$slots.default?(0,t.renderSlot)(a.$slots,`default`,{},void 0,void 0,1):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[n.icon?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:0,class:`content-icon`,name:n.icon,svg:n.iconSvg},null,8,[`name`,`svg`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{class:`content-text`,textContent:(0,t.toDisplayString)(n.content)},null,8,i)],64)),n.closable?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:2,name:`close`,size:`md`,onClick:l})):(0,t.createCommentVNode)(``,!0)]),o[0]||=(0,t.createElementVNode)(`div`,{class:`cu-tip-bg`},null,-1)],2))}}),o=(0,t.defineComponent)({name:`cu-tip`,props:{placement:{type:String,default:`top`},name:{type:[String,Number],default:void 0},icon:{type:String,default:void 0},iconSvg:{type:Boolean,default:!1},content:{type:[String,Number],default:``},closable:{type:Boolean,default:!0},fill:{type:Boolean,default:!1},offset:{type:Object,default:()=>({top:0,left:0})}},emits:[`show`,`hide`],setup(e,{slots:r,emit:i}){let o=null,s=null,c=(0,t.getCurrentInstance)();function l(){let e=c?.proxy?.$el;return e&&e.nodeType===1?e:null}(0,t.onMounted)(()=>{o=u(l()??document.body)}),(0,t.onBeforeUnmount)(()=>{m(),o=null});function u(e){if(e===null||e===document.body)return e;let t=window.getComputedStyle(e).overflowY,n=t!==`visible`&&t!==`hidden`,r=e.getAttribute&&e.getAttribute(`scroll-wrapper`)!==null;return n&&e.scrollHeight>e.clientHeight||r?e:u(e.parentNode)}function d(e,t){let n=0,r=0,i=e;for(;i&&(n+=i.offsetLeft,r+=i.offsetTop,i!==t&&i!==document.body&&i!==null);)i=i.offsetParent;return{x:n,y:r}}function f(){if(s)return s;s=document.createElement(`div`);let r=(0,t.createVNode)(a,{icon:e.icon,iconSvg:e.iconSvg,placement:e.placement,content:e.content,closable:e.closable,name:e.name??(0,n.randomId)(`tip`),onClose:g});return(0,t.render)(r,s),s}function p(t){if(!s)return;let n=s.firstElementChild,r=d(t,o),i=e.offset.top||0,a=e.offset.left||0,c=n.offsetWidth,l=n.offsetHeight,u=``;switch(e.fill&&(e.placement===`top`||e.placement===`bottom`)&&(c=t.offsetWidth,u+=`width: ${c}px;`),e.fill&&(e.placement===`left`||e.placement===`right`)&&(l=t.offsetHeight,u+=`height: ${l}px;`),e.placement){case`left`:r.y+=(t.offsetHeight-l)/2,r.x-=c+10;break;case`right`:r.y+=(t.offsetHeight-l)/2,r.x+=t.offsetWidth+10;break;case`bottom`:r.y+=t.offsetHeight+10,r.x+=(t.offsetWidth-c)/2;break;default:r.y-=l+10,r.x+=(t.offsetWidth-c)/2}u+=`position: absolute; top: ${r.y+i}px; left: ${r.x+a}px;`,n.style.cssText=u}function m(){s&&s.parentNode&&s.parentNode.removeChild(s)}function h(){let t=f(),n=l();o&&t.parentNode!==o&&n&&o.appendChild(t),n&&p(n),i(`show`,e.name)}function g(){s&&s.parentNode!==null&&(s.parentNode.removeChild(s),i(`hide`,e.name))}return()=>{let e=r.default?.()??[];if(!e.length)return e;let n=null;for(let t of e)if(n=t,t.type||t.props&&Object.keys(t.props).length)break;return n?(0,t.cloneVNode)(n,{onClick:h}):e}}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Transition as e, createBlock as t, defineComponent as n, openBlock as r, renderSlot as i, withCtx as a } from "vue";
|
|
2
|
+
// src/components/transition/Transition.vue
|
|
3
|
+
var o = /* @__PURE__ */ n({
|
|
4
|
+
name: "cu-transition",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "Transition",
|
|
7
|
+
setup(n) {
|
|
8
|
+
return (n, o) => (r(), t(e, null, {
|
|
9
|
+
default: a(() => [i(n.$slots, "default")]),
|
|
10
|
+
_: 3
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export { o as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("vue");var t=(0,e.defineComponent)({name:`cu-transition`,inheritAttrs:!1,__name:`Transition`,setup(t){return(t,n)=>((0,e.openBlock)(),(0,e.createBlock)(e.Transition,null,{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(t.$slots,`default`)]),_:3}))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Comment as e, Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeStyle as s, onMounted as c, openBlock as l, ref as u, renderList as d, renderSlot as f, unref as p, useSlots as m, watch as h } from "vue";
|
|
2
|
+
import { getDpr as g } from "@centui/core/web";
|
|
3
|
+
// src/components/water-mark/WaterMark.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _ = { class: "cu-water-mark" }, v = { class: "water-mark-container" }, y = 14, b = "#858B9C", x = /* @__PURE__ */ o({
|
|
5
|
+
name: "cu-water-mark",
|
|
6
|
+
__name: "WaterMark",
|
|
7
|
+
props: {
|
|
8
|
+
content: { default: "" },
|
|
9
|
+
spacing: { default: "20vw" },
|
|
10
|
+
repeatX: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !0
|
|
13
|
+
},
|
|
14
|
+
repeatY: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
rotate: { default: -30 },
|
|
19
|
+
opacity: { default: .1 }
|
|
20
|
+
},
|
|
21
|
+
setup(o) {
|
|
22
|
+
let x = o, S = m(), C = u(), w = u(), T = typeof process < "u" && process.env.MAND_ENV === "test" ? 2 : 50, E = n(() => {
|
|
23
|
+
let e = S.watermark;
|
|
24
|
+
return e ? e({ coord: {
|
|
25
|
+
row: 1,
|
|
26
|
+
col: 1
|
|
27
|
+
} }).some((e) => !O(e)) : !1;
|
|
28
|
+
}), D = n(() => E.value || !!x.content);
|
|
29
|
+
function O(n) {
|
|
30
|
+
if (!n || typeof n != "object") return !0;
|
|
31
|
+
let r = n;
|
|
32
|
+
if (r.type === e) return !0;
|
|
33
|
+
if (r.type === t) {
|
|
34
|
+
let e = r.children;
|
|
35
|
+
return !Array.isArray(e) || e.every(O);
|
|
36
|
+
}
|
|
37
|
+
return !1;
|
|
38
|
+
}
|
|
39
|
+
let k = null, A = 2, j = 0, M = 0, N = 0;
|
|
40
|
+
c(() => {
|
|
41
|
+
x.content && (k = w.value?.getContext("2d") ?? null, k && (A = Math.max(g(), 2), P(), F(), I()));
|
|
42
|
+
}), h(() => x.content, (e, t) => {
|
|
43
|
+
e !== t && k && e && L();
|
|
44
|
+
});
|
|
45
|
+
function P() {
|
|
46
|
+
let e = C.value, t = w.value;
|
|
47
|
+
e && t && (j = t.width = e.clientWidth * A, M = t.height = e.clientHeight * A, k.scale(1 / A, 1 / A));
|
|
48
|
+
}
|
|
49
|
+
function F() {
|
|
50
|
+
let { spacing: e } = x;
|
|
51
|
+
if (typeof e == "number") {
|
|
52
|
+
N = e;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
let [, t = "20", n = "vw"] = /([0-9]+)([A-Za-z]+)/.exec(e) ?? [];
|
|
56
|
+
n === "px" ? N = Number(t) : n === "vh" ? N = Number(t) * window.screen.height / 100 : n === "vw" && (N = Number(t) * window.screen.width / 100), N *= A;
|
|
57
|
+
}
|
|
58
|
+
function I() {
|
|
59
|
+
if (!k) return;
|
|
60
|
+
let e = x.content.length * y * A, t = Math.ceil(j / (e + N)), n = Math.ceil(M / (y * A + N)), r = y * A;
|
|
61
|
+
k.font = `${r}px "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif`, k.fillStyle = b;
|
|
62
|
+
let i = 0, a = 0;
|
|
63
|
+
for (let o = 0; o < n; o++) {
|
|
64
|
+
i = 0;
|
|
65
|
+
for (let n = 0; n < t; n++) k.fillText(x.content, i, a), i += e;
|
|
66
|
+
a += r + N;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function L() {
|
|
70
|
+
let e = w.value;
|
|
71
|
+
e && k && (k.clearRect(0, 0, e.width, e.height), I());
|
|
72
|
+
}
|
|
73
|
+
return (e, n) => (l(), i("div", _, [a("div", v, [f(e.$slots, "default")]), D.value ? (l(), i("div", {
|
|
74
|
+
key: 0,
|
|
75
|
+
class: "water-mark-list",
|
|
76
|
+
ref_key: "mark",
|
|
77
|
+
ref: C
|
|
78
|
+
}, [a("div", {
|
|
79
|
+
class: "water-mark-list-wrapper",
|
|
80
|
+
style: s({
|
|
81
|
+
opacity: o.opacity,
|
|
82
|
+
transform: `rotate(${o.rotate}deg)`
|
|
83
|
+
})
|
|
84
|
+
}, [o.content ? (l(), i("canvas", {
|
|
85
|
+
key: 0,
|
|
86
|
+
ref_key: "canvas",
|
|
87
|
+
ref: w,
|
|
88
|
+
class: "water-mark-canvas"
|
|
89
|
+
}, null, 512)) : E.value ? (l(!0), i(t, { key: 1 }, d(o.repeatY ? p(T) : 1, (n) => (l(), i("ul", {
|
|
90
|
+
key: `line-${n}`,
|
|
91
|
+
class: "water-mark-line",
|
|
92
|
+
style: s({ marginBottom: o.spacing })
|
|
93
|
+
}, [(l(!0), i(t, null, d(o.repeatX ? p(T) : 1, (t) => (l(), i("li", {
|
|
94
|
+
key: `item-${t}`,
|
|
95
|
+
class: "water-mark-item",
|
|
96
|
+
style: s(n % 2 == 0 ? { marginLeft: o.repeatX ? o.spacing : 0 } : { marginRight: o.repeatX ? o.spacing : 0 })
|
|
97
|
+
}, [f(e.$slots, "watermark", { coord: {
|
|
98
|
+
row: n,
|
|
99
|
+
col: t
|
|
100
|
+
} })], 4))), 128))], 4))), 128)) : r("", !0)], 4)], 512)) : r("", !0)]));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
export { x as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("vue"),t=require("@centui/core/web");var n={class:`cu-water-mark`},r={class:`water-mark-container`},i=14,a=`#858B9C`,o=(0,e.defineComponent)({name:`cu-water-mark`,__name:`WaterMark`,props:{content:{default:``},spacing:{default:`20vw`},repeatX:{type:Boolean,default:!0},repeatY:{type:Boolean,default:!0},rotate:{default:-30},opacity:{default:.1}},setup(o){let s=o,c=(0,e.useSlots)(),l=(0,e.ref)(),u=(0,e.ref)(),d=typeof process<`u`&&process.env.MAND_ENV===`test`?2:50,f=(0,e.computed)(()=>{let e=c.watermark;return e?e({coord:{row:1,col:1}}).some(e=>!m(e)):!1}),p=(0,e.computed)(()=>f.value||!!s.content);function m(t){if(!t||typeof t!=`object`)return!0;let n=t;if(n.type===e.Comment)return!0;if(n.type===e.Fragment){let e=n.children;return!Array.isArray(e)||e.every(m)}return!1}let h=null,g=2,_=0,v=0,y=0;(0,e.onMounted)(()=>{s.content&&(h=u.value?.getContext(`2d`)??null,h&&(g=Math.max((0,t.getDpr)(),2),b(),x(),S()))}),(0,e.watch)(()=>s.content,(e,t)=>{e!==t&&h&&e&&C()});function b(){let e=l.value,t=u.value;e&&t&&(_=t.width=e.clientWidth*g,v=t.height=e.clientHeight*g,h.scale(1/g,1/g))}function x(){let{spacing:e}=s;if(typeof e==`number`){y=e;return}let[,t=`20`,n=`vw`]=/([0-9]+)([A-Za-z]+)/.exec(e)??[];n===`px`?y=Number(t):n===`vh`?y=Number(t)*window.screen.height/100:n===`vw`&&(y=Number(t)*window.screen.width/100),y*=g}function S(){if(!h)return;let e=s.content.length*i*g,t=Math.ceil(_/(e+y)),n=Math.ceil(v/(i*g+y)),r=i*g;h.font=`${r}px "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif`,h.fillStyle=a;let o=0,c=0;for(let i=0;i<n;i++){o=0;for(let n=0;n<t;n++)h.fillText(s.content,o,c),o+=e;c+=r+y}}function C(){let e=u.value;e&&h&&(h.clearRect(0,0,e.width,e.height),S())}return(t,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,n,[(0,e.createElementVNode)(`div`,r,[(0,e.renderSlot)(t.$slots,`default`)]),p.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:`water-mark-list`,ref_key:`mark`,ref:l},[(0,e.createElementVNode)(`div`,{class:`water-mark-list-wrapper`,style:(0,e.normalizeStyle)({opacity:o.opacity,transform:`rotate(${o.rotate}deg)`})},[o.content?((0,e.openBlock)(),(0,e.createElementBlock)(`canvas`,{key:0,ref_key:`canvas`,ref:u,class:`water-mark-canvas`},null,512)):f.value?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:1},(0,e.renderList)(o.repeatY?(0,e.unref)(d):1,n=>((0,e.openBlock)(),(0,e.createElementBlock)(`ul`,{key:`line-${n}`,class:`water-mark-line`,style:(0,e.normalizeStyle)({marginBottom:o.spacing})},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(o.repeatX?(0,e.unref)(d):1,r=>((0,e.openBlock)(),(0,e.createElementBlock)(`li`,{key:`item-${r}`,class:`water-mark-item`,style:(0,e.normalizeStyle)(n%2==0?{marginLeft:o.repeatX?o.spacing:0}:{marginRight:o.repeatX?o.spacing:0})},[(0,e.renderSlot)(t.$slots,`watermark`,{coord:{row:n,col:r}})],4))),128))],4))),128)):(0,e.createCommentVNode)(``,!0)],4)],512)):(0,e.createCommentVNode)(``,!0)]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ActionBar-Bs5fkyFH.cjs");exports.CuActionBar=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/action-bar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CuActionBar } from "./ActionBar-CF1zMUMC.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./Popup-
|
|
1
|
+
const e=require("./Popup-Ca1jPi0t.cjs");let t=require("vue"),n=require("@centui/core");var r={class:`cu-action-sheet`},i={class:`cu-action-sheet-content`},a={key:0,class:`cu-action-sheet-header`},o={class:`cu-action-sheet-list`},s=[`onClick`],c={class:`cu-action-sheet-item-wrapper`},l=[`innerHTML`],u=(0,t.defineComponent)({name:`cu-action-sheet`,__name:`ActionSheet`,props:{modelValue:{type:Boolean,default:!1},title:{default:``},options:{default:()=>[]},defaultIndex:{default:-1},invalidIndex:{default:-1},cancelText:{default:void 0},maxHeight:{default:400}},emits:[`update:modelValue`,`show`,`hide`,`selected`,`cancel`],setup(u,{emit:d}){let f=u,p=d,m=f.cancelText??(0,n.t)(`md.action_sheet.cancel`),h=(0,t.ref)(f.modelValue),g=(0,t.ref)(f.defaultIndex);(0,t.watch)(()=>f.modelValue,e=>{h.value=e});function _(e){e||S()}function v(){p(`show`)}function y(){p(`hide`),S()}function b(e,t){t===f.invalidIndex||(0,n.inArray)(f.invalidIndex,t)||(g.value=t,p(`selected`,e),S())}function x(){p(`cancel`),S()}function S(){h.value=!1,p(`update:modelValue`,!1)}return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[(0,t.createVNode)(e.t,{class:`inner-popup large-radius`,"model-value":h.value,position:`bottom`,"prevent-scroll":``,"onUpdate:modelValue":_,onShow:v,onHide:y},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,i,[u.title?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,a,(0,t.toDisplayString)(u.title),1)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`ul`,o,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(u.options,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:n,class:(0,t.normalizeClass)({active:n===g.value,disabled:n===u.invalidIndex,"cu-action-sheet-item":!0}),onClick:t=>b(e,n)},[(0,t.createElementVNode)(`div`,c,[(0,t.createElementVNode)(`div`,{class:`cu-action-sheet-item-section`,innerHTML:e.text||e.label},null,8,l)])],10,s))),128)),(0,t.createElementVNode)(`li`,{class:`cu-action-sheet-cancel`,onClick:x},(0,t.toDisplayString)((0,t.unref)(m)),1)])])]),_:1},8,[`model-value`])]))}}),d=()=>{},f=[];function p({value:e=!0,title:n=``,options:r=[],defaultIndex:i=-1,invalidIndex:a=-1,cancelText:o=`取消`,maxHeight:s=400,onShow:c=d,onHide:l=d,onSelected:p=d,onCancel:m=d}){let h=document.createElement(`div`);document.body.appendChild(h);let g={value:!1,close:()=>{}},_=!1,v=!1,y=()=>{if(v)return;v=!0,(0,t.render)(null,h);let e=h.parentNode;e&&e.removeChild(h);let n=f.indexOf(g);n>=0&&f.splice(n,1)},b=()=>{let e=(0,t.createVNode)(u,{modelValue:g.value,title:n,options:r,defaultIndex:i,invalidIndex:a,cancelText:o,maxHeight:s,"onUpdate:modelValue":e=>{g.value=e,e&&b()},onShow:c,onHide:()=>{y(),l()},onSelected:p,onCancel:m});(0,t.render)(e,h),_=!0};return g.close=()=>{v||(_?(g.value=!1,b()):y())},f.push(g),e&&(g.value=!0,b()),g}var m=u;m.create=p,Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return m}});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./Popup-
|
|
1
|
+
import { t as e } from "./Popup-qLk-BsRS.js";
|
|
2
2
|
import { Fragment as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, render as u, renderList as d, toDisplayString as f, unref as p, watch as m, withCtx as h } from "vue";
|
|
3
3
|
import { inArray as g, t as _ } from "@centui/core";
|
|
4
|
-
|
|
4
|
+
// src/components/action-sheet/ActionSheet.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var v = { class: "cu-action-sheet" }, y = { class: "cu-action-sheet-content" }, b = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "cu-action-sheet-header"
|
|
@@ -84,7 +84,14 @@ function O({ value: e = !0, title: t = "", options: n = [], defaultIndex: r = -1
|
|
|
84
84
|
let m = {
|
|
85
85
|
value: !1,
|
|
86
86
|
close: () => {}
|
|
87
|
-
}, h = () => {
|
|
87
|
+
}, h = !1, g = !1, _ = () => {
|
|
88
|
+
if (g) return;
|
|
89
|
+
g = !0, u(null, p);
|
|
90
|
+
let e = p.parentNode;
|
|
91
|
+
e && e.removeChild(p);
|
|
92
|
+
let t = D.indexOf(m);
|
|
93
|
+
t >= 0 && D.splice(t, 1);
|
|
94
|
+
}, v = () => {
|
|
88
95
|
let e = a(T, {
|
|
89
96
|
modelValue: m.value,
|
|
90
97
|
title: t,
|
|
@@ -94,25 +101,21 @@ function O({ value: e = !0, title: t = "", options: n = [], defaultIndex: r = -1
|
|
|
94
101
|
cancelText: o,
|
|
95
102
|
maxHeight: s,
|
|
96
103
|
"onUpdate:modelValue": (e) => {
|
|
97
|
-
m.value = e, e &&
|
|
104
|
+
m.value = e, e && v();
|
|
98
105
|
},
|
|
99
106
|
onShow: c,
|
|
100
107
|
onHide: () => {
|
|
101
|
-
|
|
102
|
-
e && e.removeChild(p);
|
|
103
|
-
let t = D.indexOf(m);
|
|
104
|
-
t >= 0 && D.splice(t, 1), u(null, p), l();
|
|
108
|
+
_(), l();
|
|
105
109
|
},
|
|
106
110
|
onSelected: d,
|
|
107
111
|
onCancel: f
|
|
108
112
|
});
|
|
109
|
-
u(e, p);
|
|
113
|
+
u(e, p), h = !0;
|
|
110
114
|
};
|
|
111
115
|
return m.close = () => {
|
|
112
|
-
m.value = !1,
|
|
113
|
-
}, D.push(m), e && (m.value = !0,
|
|
116
|
+
g || (h ? (m.value = !1, v()) : _());
|
|
117
|
+
}, D.push(m), e && (m.value = !0, v()), m;
|
|
114
118
|
}
|
|
115
119
|
var k = T;
|
|
116
120
|
k.create = O;
|
|
117
|
-
//#endregion
|
|
118
121
|
export { T as n, k as t };
|
package/dist/action-sheet.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./action-sheet-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./action-sheet-BjaReHkr.cjs");exports.CuActionSheet=e.n,exports.default=e.t;
|
package/dist/action-sheet.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as CuActionSheet, t as default };
|
|
1
|
+
export { n as CuActionSheet, t as default } from "./action-sheet-Da8dHevy.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Roller-DALhjhfg.cjs"),t=require("./RollerSuccess
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Roller-DALhjhfg.cjs"),t=require("./ActivityIndicator-BOZRJBDn.cjs"),n=require("./RollerSuccess-BbMzNlkv.cjs");exports.CuActivityIndicator=t.t,exports.CuActivityIndicatorCarousel=t.n,exports.CuActivityIndicatorRolling=e.t,exports.CuActivityIndicatorSpinning=t.r,exports.CuRollerSuccess=n.t;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Roller-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { t as e } from "./Roller-BznN57fL.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "./ActivityIndicator-Cp20c1E0.js";
|
|
3
|
+
import { t as i } from "./RollerSuccess-CTh43Rh0.js";
|
|
4
|
+
export { r as CuActivityIndicator, t as CuActivityIndicatorCarousel, e as CuActivityIndicatorRolling, n as CuActivityIndicatorSpinning, i as CuRollerSuccess };
|
package/dist/agree.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Agree-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Agree-ZswFiFNy.cjs");exports.CuAgree=e.t;
|
package/dist/agree.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as CuAgree };
|
|
1
|
+
export { t as CuAgree } from "./Agree-lAcOo38C.js";
|
package/dist/amount.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Amount-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Amount-CU7Oc4vv.cjs");exports.CuAmount=e.t;
|
package/dist/amount.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as CuAmount };
|
|
1
|
+
export { t as CuAmount } from "./Amount-B2StZGGW.js";
|
package/dist/bill.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Bill-DDVs3Lu3.cjs");exports.CuBill=e.t;
|
package/dist/bill.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/bill';
|
package/dist/bill.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CuBill } from "./Bill-qQ4LdkmR.js";
|
package/dist/button.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Button-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Button-Bu8liJQE.cjs");exports.CuButton=e.t;
|
package/dist/button.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as CuButton };
|
|
1
|
+
export { t as CuButton } from "./Button-D7e-cuA1.js";
|
package/dist/captcha.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Captcha-BEF-de8-.cjs");exports.CuCaptcha=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/captcha';
|
package/dist/captcha.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CuCaptcha } from "./Captcha-CgpynYTc.js";
|
package/dist/cashier.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Cashier-CLJngM0n.cjs");exports.CuCashier=e.t,exports.CuCashierChannel=e.r,exports.CuCashierChannelButton=e.n,exports.CuCashierChannelItem=e.i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/cashier';
|
package/dist/cashier.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CuCashier, r as CuCashierChannel, n as CuCashierChannelButton, i as CuCashierChannelItem } from "./Cashier-CJLfQOXm.js";
|
package/dist/cell-item.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./CellItem-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./CellItem-J0LkwZNL.cjs");exports.CuCellItem=e.t;
|
package/dist/cell-item.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as CuCellItem };
|
|
1
|
+
export { t as CuCellItem } from "./CellItem-BHEh4Cp-.js";
|
package/dist/chart.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Chart-DJ0Q1g1P.cjs");exports.CuChart=e.t;
|
package/dist/chart.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/chart';
|
package/dist/chart.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CuChart } from "./Chart-BINJAx7V.js";
|
package/dist/check-base.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./CheckBoxBase-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./CheckBoxBase-CobK6-tL.cjs");exports.CuCheckBaseBox=e.t;
|
package/dist/check-base.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as CuCheckBaseBox };
|
|
1
|
+
export { t as CuCheckBaseBox } from "./CheckBoxBase-BIPGJ-TD.js";
|
package/dist/check.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./CheckList-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./CheckList-BsKo_Fl3.cjs"),t=require("./CheckBox-DDeCshDK.cjs");exports.CuCheck=e.r,exports.CuCheckBox=t.t,exports.CuCheckGroup=e.n,exports.CuCheckList=e.t;
|
package/dist/check.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { n as e, r as t, t as n } from "./CheckList-ViiCo4yi.js";
|
|
2
|
+
import { t as r } from "./CheckBox-D5bCJUXD.js";
|
|
3
|
+
export { t as CuCheck, r as CuCheckBox, e as CuCheckGroup, n as CuCheckList };
|
package/dist/codebox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Codebox-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Codebox-yLkdTU7w.cjs");exports.CuCodebox=e.t;
|
package/dist/codebox.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as CuCodebox };
|
|
1
|
+
export { t as CuCodebox } from "./Codebox-BLPrFnIv.js";
|
|
@@ -11,9 +11,13 @@ export interface CashierChannel {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
type __VLS_Props = {
|
|
14
|
+
/** @warning 经 v-html 渲染(v2 兼容):勿传不可信内容,XSS 责任在使用方 */
|
|
14
15
|
paymentTitle?: string;
|
|
16
|
+
/** @warning 同 paymentTitle:经 v-html 渲染,勿传不可信内容 */
|
|
15
17
|
paymentAmount?: string;
|
|
18
|
+
/** @warning 同 paymentTitle:经 v-html 渲染,勿传不可信内容 */
|
|
16
19
|
paymentDescribe?: string;
|
|
20
|
+
/** @warning 同 paymentTitle:经 v-html 渲染,勿传不可信内容 */
|
|
17
21
|
moreButtonText?: string;
|
|
18
22
|
payButtonText?: string;
|
|
19
23
|
payButtonDisabled?: boolean;
|
|
@@ -15,10 +15,15 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
15
15
|
icon?: string;
|
|
16
16
|
iconSvg?: boolean;
|
|
17
17
|
closable?: boolean;
|
|
18
|
+
/** @warning 内容经 v-html 渲染(v2 兼容行为):请勿传入不可信来源的字符串,XSS 责任在使用方 */
|
|
18
19
|
content?: string;
|
|
19
20
|
btns?: DialogBtn[];
|
|
20
21
|
/** row | column */
|
|
21
22
|
layout?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 挂载目标。false 表示不搬运;注意本值在 setup 期一次性求值、运行期不响应变更
|
|
25
|
+
* (v2 同为初始化时决定挂载点)。v3 后续版本计划迁移至 Teleport。
|
|
26
|
+
*/
|
|
22
27
|
appendTo?: HTMLElement | null | false;
|
|
23
28
|
hasMask?: boolean;
|
|
24
29
|
maskClosable?: boolean;
|
|
@@ -37,10 +42,15 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
37
42
|
icon?: string;
|
|
38
43
|
iconSvg?: boolean;
|
|
39
44
|
closable?: boolean;
|
|
45
|
+
/** @warning 内容经 v-html 渲染(v2 兼容行为):请勿传入不可信来源的字符串,XSS 责任在使用方 */
|
|
40
46
|
content?: string;
|
|
41
47
|
btns?: DialogBtn[];
|
|
42
48
|
/** row | column */
|
|
43
49
|
layout?: string;
|
|
50
|
+
/**
|
|
51
|
+
* 挂载目标。false 表示不搬运;注意本值在 setup 期一次性求值、运行期不响应变更
|
|
52
|
+
* (v2 同为初始化时决定挂载点)。v3 后续版本计划迁移至 Teleport。
|
|
53
|
+
*/
|
|
44
54
|
appendTo?: HTMLElement | null | false;
|
|
45
55
|
hasMask?: boolean;
|
|
46
56
|
maskClosable?: boolean;
|