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
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./Icon-
|
|
1
|
+
const e=require("./Icon-83WWqE5z.cjs");let t=require("vue");var n=[`innerHTML`],r={key:1,class:`title-bar-title`},i=[`innerHTML`],a=[`innerHTML`],o={key:2,class:`title-bar-title`},s=[`innerHTML`],c=(0,t.defineComponent)({name:`cu-popup-title-bar`,__name:`PopupTitleBar`,props:{title:{default:``},describe:{default:``},okText:{default:``},cancelText:{default:``},largeRadius:{type:Boolean,default:!1},onlyClose:{type:Boolean,default:!1},titleAlign:{default:`center`}},emits:[`confirm`,`cancel`],setup(c,{emit:l}){let u=c,d=l,f=(0,t.inject)(`mdPopupLargeRadius`,null);(0,t.watch)(()=>u.largeRadius,e=>{f&&(f.value=e)},{immediate:!0});function p(e){e.preventDefault()}return(l,u)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`cu-popup-title-bar`,[`title-align-${c.titleAlign}`,{large:!!c.describe,"large-radius":c.largeRadius}]]),onTouchmove:p},[c.onlyClose?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[c.cancelText?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`title-bar-left cu-popup-cancel`,innerHTML:c.cancelText,onClick:u[0]||=e=>d(`cancel`)},null,8,n)):l.$slots.cancel?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`title-bar-left cu-popup-cancel`,onClick:u[1]||=e=>d(`cancel`)},[(0,t.renderSlot)(l.$slots,`cancel`)])):(0,t.createCommentVNode)(``,!0)],64)),c.title?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[c.title?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:0,class:`title`,innerHTML:c.title},null,8,i)):(0,t.createCommentVNode)(``,!0),c.describe?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,{key:1,class:`describe`,innerHTML:c.describe},null,8,a)):(0,t.createCommentVNode)(``,!0)])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,o,[(0,t.renderSlot)(l.$slots,`title`)])),c.onlyClose?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:3},[c.okText?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`title-bar-right cu-popup-confirm`,innerHTML:c.okText,onClick:u[2]||=e=>d(`confirm`)},null,8,s)):l.$slots.confirm?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`title-bar-right cu-popup-confirm`,onClick:u[3]||=e=>d(`confirm`)},[(0,t.renderSlot)(l.$slots,`confirm`)])):(0,t.createCommentVNode)(``,!0)],64)),c.onlyClose?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:4,class:`title-bar-right cu-popup-close`,onClick:u[4]||=e=>d(`cancel`)},[(0,t.createVNode)(e.t,{name:`close`,size:`lg`})])):(0,t.createCommentVNode)(``,!0)],34))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Roller-DALhjhfg.cjs");let t=require("vue"),n=require("@centui/core/web");var r=(0,t.defineComponent)({name:`cu-progress`,__name:`Progress`,props:{size:{default:70},width:{default:void 0},color:{default:`#2F86F6`},borderColor:{default:`rgba(0, 0, 0, .1)`},fill:{default:`transparent`},linecap:{default:`round`},rotate:{default:0},value:{default:0},transition:{type:Boolean,default:!1},duration:{default:1e3}},setup(r){let i=r,a=(0,t.ref)(0),o=(0,t.ref)(!1),s=0;(0,t.watch)(()=>i.value,(e,t)=>{!o.value||!i.transition?a.value=e:c(t,e)},{immediate:!0}),(0,t.onMounted)(()=>{o.value=!0}),(0,t.onBeforeUnmount)(()=>{s&&=(n.Animate.stop(s),0)});function c(e=0,t=0){s&&=(n.Animate.stop(s),0),s=n.Animate.start(n=>{a.value=e+(t-e)*n},()=>!0,()=>{s=0},i.duration)}return(n,i)=>((0,t.openBlock)(),(0,t.createBlock)(e.t,{class:`cu-progress`,process:a.value,size:r.size,width:r.width,color:r.color,"border-color":r.borderColor,fill:r.fill,linecap:r.linecap,rotate:r.rotate},{defs:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`defs`)]),default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`)]),_:3},8,[`process`,`size`,`width`,`color`,`border-color`,`fill`,`linecap`,`rotate`]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as e } from "./Roller-
|
|
2
|
-
import { createBlock as t, defineComponent as n,
|
|
3
|
-
import { Animate as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var u = /* @__PURE__ */ n({
|
|
1
|
+
import { t as e } from "./Roller-BznN57fL.js";
|
|
2
|
+
import { createBlock as t, defineComponent as n, onBeforeUnmount as r, onMounted as i, openBlock as a, ref as o, renderSlot as s, watch as c, withCtx as l } from "vue";
|
|
3
|
+
import { Animate as u } from "@centui/core/web";
|
|
4
|
+
// src/components/progress/Progress.vue
|
|
5
|
+
var d = /* @__PURE__ */ n({
|
|
7
6
|
name: "cu-progress",
|
|
8
7
|
__name: "Progress",
|
|
9
8
|
props: {
|
|
@@ -22,22 +21,22 @@ var u = /* @__PURE__ */ n({
|
|
|
22
21
|
duration: { default: 1e3 }
|
|
23
22
|
},
|
|
24
23
|
setup(n) {
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
m(t, e);
|
|
32
|
-
}, { immediate: !0 }), r(() => {
|
|
24
|
+
let d = n, f = o(0), p = o(!1), m = 0;
|
|
25
|
+
c(() => d.value, (e, t) => {
|
|
26
|
+
!p.value || !d.transition ? f.value = e : h(t, e);
|
|
27
|
+
}, { immediate: !0 }), i(() => {
|
|
33
28
|
p.value = !0;
|
|
29
|
+
}), r(() => {
|
|
30
|
+
m &&= (u.stop(m), 0);
|
|
34
31
|
});
|
|
35
|
-
function
|
|
36
|
-
|
|
32
|
+
function h(e = 0, t = 0) {
|
|
33
|
+
m &&= (u.stop(m), 0), m = u.start((n) => {
|
|
37
34
|
f.value = e + (t - e) * n;
|
|
38
|
-
}, () => !0, () => {
|
|
35
|
+
}, () => !0, () => {
|
|
36
|
+
m = 0;
|
|
37
|
+
}, d.duration);
|
|
39
38
|
}
|
|
40
|
-
return (r,
|
|
39
|
+
return (r, i) => (a(), t(e, {
|
|
41
40
|
class: "cu-progress",
|
|
42
41
|
process: f.value,
|
|
43
42
|
size: n.size,
|
|
@@ -48,8 +47,8 @@ var u = /* @__PURE__ */ n({
|
|
|
48
47
|
linecap: n.linecap,
|
|
49
48
|
rotate: n.rotate
|
|
50
49
|
}, {
|
|
51
|
-
defs:
|
|
52
|
-
default:
|
|
50
|
+
defs: l(() => [s(r.$slots, "defs")]),
|
|
51
|
+
default: l(() => [s(r.$slots, "default")]),
|
|
53
52
|
_: 3
|
|
54
53
|
}, 8, [
|
|
55
54
|
"process",
|
|
@@ -63,5 +62,4 @@ var u = /* @__PURE__ */ n({
|
|
|
63
62
|
]));
|
|
64
63
|
}
|
|
65
64
|
});
|
|
66
|
-
|
|
67
|
-
export { u as t };
|
|
65
|
+
export { d as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Icon-83WWqE5z.cjs"),t=require("./shared-k9cbQbvK.cjs");let n=require("vue");var r=[`aria-checked`,`aria-disabled`],i={class:`cu-radio-icon`},a={key:0,class:`cu-radio-label`},o=(0,n.defineComponent)({name:`cu-radio`,__name:`Radio`,props:{name:{type:[String,Number,Boolean]},modelValue:{type:[String,Number,Boolean],default:``},size:{default:`md`},label:{default:``},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},icon:{default:`checked`},iconInverse:{default:`check`},iconDisabled:{default:`check-disabled`},iconSvg:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(o,{emit:s}){let c=o,{isChecked:l,onClick:u}=t.n(c,s),d=(0,n.computed)(()=>c.disabled?c.iconDisabled:l.value?c.icon:c.iconInverse);return(t,s)=>((0,n.openBlock)(),(0,n.createElementBlock)(`label`,{class:(0,n.normalizeClass)([`cu-radio`,{"is-disabled":o.disabled,"is-checked":(0,n.unref)(l),"is-inline":o.inline}]),role:`radio`,"aria-checked":(0,n.unref)(l),"aria-disabled":o.disabled,onClick:s[0]||=(...e)=>(0,n.unref)(u)&&(0,n.unref)(u)(...e)},[(0,n.createElementVNode)(`div`,i,[(0,n.createVNode)(e.t,{name:d.value,size:o.size,svg:o.iconSvg},null,8,[`name`,`size`,`svg`])]),t.$slots.default||o.label?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,a,[(0,n.renderSlot)(t.$slots,`default`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(o.label),1)])])):(0,n.createCommentVNode)(``,!0)],10,r))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as e } from "./Icon-
|
|
2
|
-
import { n as t } from "./shared-
|
|
1
|
+
import { t as e } from "./Icon-BgCtu0ZV.js";
|
|
2
|
+
import { n as t } from "./shared-C9XlLe7F.js";
|
|
3
3
|
import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p } from "vue";
|
|
4
|
-
|
|
5
|
-
var m = { class: "cu-radio-icon" },
|
|
4
|
+
// src/components/radio/Radio.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var m = ["aria-checked", "aria-disabled"], h = { class: "cu-radio-icon" }, g = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "cu-radio-label"
|
|
8
|
-
},
|
|
8
|
+
}, _ = /* @__PURE__ */ c({
|
|
9
9
|
name: "cu-radio",
|
|
10
10
|
__name: "Radio",
|
|
11
11
|
props: {
|
|
@@ -41,25 +41,27 @@ var m = { class: "cu-radio-icon" }, h = {
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
emits: ["update:modelValue"],
|
|
44
|
-
setup(c, { emit:
|
|
45
|
-
let
|
|
44
|
+
setup(c, { emit: _ }) {
|
|
45
|
+
let v = c, { isChecked: y, onClick: b } = t(v, _), x = n(() => v.disabled ? v.iconDisabled : y.value ? v.icon : v.iconInverse);
|
|
46
46
|
return (t, n) => (u(), i("label", {
|
|
47
47
|
class: l(["cu-radio", {
|
|
48
48
|
"is-disabled": c.disabled,
|
|
49
|
-
"is-checked": p(
|
|
49
|
+
"is-checked": p(y),
|
|
50
50
|
"is-inline": c.inline
|
|
51
51
|
}]),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
role: "radio",
|
|
53
|
+
"aria-checked": p(y),
|
|
54
|
+
"aria-disabled": c.disabled,
|
|
55
|
+
onClick: n[0] ||= (...e) => p(b) && p(b)(...e)
|
|
56
|
+
}, [a("div", h, [s(e, {
|
|
57
|
+
name: x.value,
|
|
55
58
|
size: c.size,
|
|
56
59
|
svg: c.iconSvg
|
|
57
60
|
}, null, 8, [
|
|
58
61
|
"name",
|
|
59
62
|
"size",
|
|
60
63
|
"svg"
|
|
61
|
-
])]), t.$slots.default || c.label ? (u(), i("div",
|
|
64
|
+
])]), t.$slots.default || c.label ? (u(), i("div", g, [d(t.$slots, "default", {}, () => [o(f(c.label), 1)])])) : r("", !0)], 10, m));
|
|
62
65
|
}
|
|
63
66
|
});
|
|
64
|
-
|
|
65
|
-
export { g as t };
|
|
67
|
+
export { _ as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./CheckBoxBase-
|
|
2
|
-
import { n as t } from "./shared-
|
|
1
|
+
import { t as e } from "./CheckBoxBase-BIPGJ-TD.js";
|
|
2
|
+
import { n as t } from "./shared-C9XlLe7F.js";
|
|
3
3
|
import { createBlock as n, createElementBlock as r, createTextVNode as i, defineComponent as a, openBlock as o, provide as s, renderSlot as c, toDisplayString as l, unref as u, withCtx as d } from "vue";
|
|
4
|
-
|
|
5
|
-
//#region src/components/radio/RadioBox.vue
|
|
4
|
+
// src/components/radio/RadioBox.vue
|
|
6
5
|
var f = /* @__PURE__ */ a({
|
|
7
6
|
name: "cu-radio-box",
|
|
8
7
|
__name: "RadioBox",
|
|
@@ -35,6 +34,7 @@ var f = /* @__PURE__ */ a({
|
|
|
35
34
|
let { isChecked: s, onClick: f } = t(r, a);
|
|
36
35
|
return (t, a) => (o(), n(e, {
|
|
37
36
|
class: "cu-radio-box",
|
|
37
|
+
role: "radio",
|
|
38
38
|
label: r.label,
|
|
39
39
|
"is-checked": u(s),
|
|
40
40
|
disabled: r.disabled,
|
|
@@ -51,7 +51,10 @@ var f = /* @__PURE__ */ a({
|
|
|
51
51
|
"onClick"
|
|
52
52
|
]));
|
|
53
53
|
}
|
|
54
|
-
}), p = {
|
|
54
|
+
}), p = {
|
|
55
|
+
class: "cu-radio-group",
|
|
56
|
+
role: "radiogroup"
|
|
57
|
+
}, m = /* @__PURE__ */ a({
|
|
55
58
|
name: "cu-radio-group",
|
|
56
59
|
__name: "RadioGroup",
|
|
57
60
|
props: {
|
|
@@ -78,5 +81,4 @@ var f = /* @__PURE__ */ a({
|
|
|
78
81
|
}), (e, t) => (o(), r("div", p, [c(e.$slots, "default")]));
|
|
79
82
|
}
|
|
80
83
|
});
|
|
81
|
-
//#endregion
|
|
82
84
|
export { f as n, m as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./CheckBoxBase-CobK6-tL.cjs"),t=require("./shared-k9cbQbvK.cjs");let n=require("vue");var r=(0,n.defineComponent)({name:`cu-radio-box`,__name:`RadioBox`,props:{name:{type:[String,Number,Boolean],default:!0},modelValue:{type:[String,Number,Boolean],default:!1},label:{default:``},disabled:{type:Boolean,default:!1},iconPosition:{default:`rt`}},emits:[`update:modelValue`],setup(r,{emit:i}){let{isChecked:a,onClick:o}=t.n(r,i);return(t,i)=>((0,n.openBlock)(),(0,n.createBlock)(e.t,{class:`cu-radio-box`,role:`radio`,label:r.label,"is-checked":(0,n.unref)(a),disabled:r.disabled,"icon-position":r.iconPosition,onClick:(0,n.unref)(o)},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`default`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(r.label),1)])]),_:3},8,[`label`,`is-checked`,`disabled`,`icon-position`,`onClick`]))}}),i={class:`cu-radio-group`,role:`radiogroup`},a=(0,n.defineComponent)({name:`cu-radio-group`,__name:`RadioGroup`,props:{modelValue:{type:[String,Number,Boolean],default:``},max:{default:0}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=e,a=t;return(0,n.provide)(`rootGroup`,{get value(){return r.modelValue},check(e){a(`update:modelValue`,e)}}),(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,i,[(0,n.renderSlot)(e.$slots,`default`)]))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./
|
|
1
|
+
const e=require("./Radio-B_MxJ65X.cjs"),t=require("./CellItem-J0LkwZNL.cjs"),n=require("./InputItem-DO5Yo_IH.cjs");let r=require("vue");var i=(0,r.defineComponent)({name:`cu-radio-list`,__name:`RadioList`,props:{options:{default:()=>[]},modelValue:{type:[String,Number,Boolean],default:``},hasInput:{type:Boolean,default:!1},inputLabel:{default:``},inputPlaceholder:{default:``},alignCenter:{type:Boolean,default:!1},isSlotScope:{type:Boolean,default:void 0},icon:{default:`checked`},iconInverse:{default:`check`},iconDisabled:{default:`check-disabled`},iconSvg:{type:Boolean,default:!1},iconSize:{default:`md`},iconPosition:{default:`left`}},emits:[`update:modelValue`,`change`],setup(i,{expose:a,emit:o}){let s=i,c=o,l=(0,r.useSlots)(),u=(0,r.ref)(s.modelValue),d=(0,r.ref)(!1),f=(0,r.ref)(``),p=(0,r.computed)(()=>d.value?f.value:u.value),m=(0,r.computed)(()=>s.isSlotScope===void 0?!!l.default:s.isSlotScope),h=(0,r.computed)(()=>s.isSlotScope&&!s.icon),g=(0,r.computed)(()=>s.iconPosition===`right`?`right`:`left`);(0,r.watch)(()=>s.modelValue,e=>{e!==u.value&&(u.value=e)}),(0,r.watch)(p,e=>{c(`update:modelValue`,e)});function _(e,t){u.value=e.value,d.value=!1,f.value&&=``,c(`change`,e,t)}function v(e){u.value=e,d.value=!1}function y(e){let t=s.options[e];t&&v(t.value)}return a({select:v,selectByIndex:y}),(a,o)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{class:(0,r.normalizeClass)([`cu-radio-list`,{"is-align-center":i.alignCenter}])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(i.options,(n,o)=>((0,r.openBlock)(),(0,r.createBlock)(t.t,{key:o,class:(0,r.normalizeClass)([`cu-radio-item`,{"is-selected":u.value===n.value&&!d.value}]),title:m.value?``:n.text||n.label,brief:m.value?``:n.brief,disabled:n.disabled,"no-border":o===i.options.length-1,onClick:e=>_(n,o)},(0,r.createSlots)({default:(0,r.withCtx)(()=>[m.value?(0,r.renderSlot)(a.$slots,`default`,{option:n,index:o,selected:p.value===n.value},void 0,void 0,0):(0,r.createCommentVNode)(``,!0)]),_:2},[!i.alignCenter&&!d.value&&!h.value?{name:g.value,fn:(0,r.withCtx)(()=>[(0,r.createVNode)(e.t,{name:n.value,"model-value":u.value,disabled:n.disabled,size:i.iconSize,icon:i.icon,"icon-inverse":i.iconInverse,"icon-disabled":i.iconDisabled,"icon-svg":i.iconSvg},null,8,[`name`,`model-value`,`disabled`,`size`,`icon`,`icon-inverse`,`icon-disabled`,`icon-svg`])]),key:`0`}:void 0]),1032,[`class`,`title`,`brief`,`disabled`,`no-border`,`onClick`]))),128)),i.hasInput?((0,r.openBlock)(),(0,r.createBlock)(n.t,{key:0,ref:`inputItem`,class:(0,r.normalizeClass)([`cu-radio-item`,{"is-selected":d.value}]),title:i.inputLabel,placeholder:i.inputPlaceholder,"model-value":f.value,"onUpdate:modelValue":o[0]||=e=>f.value=e,onFocus:o[1]||=e=>d.value=!0},null,8,[`class`,`title`,`placeholder`,`model-value`])):(0,r.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { t as n } from "./InputItem-
|
|
1
|
+
import { t as e } from "./Radio-DY-ZX0BP.js";
|
|
2
|
+
import { t } from "./CellItem-BHEh4Cp-.js";
|
|
3
|
+
import { t as n } from "./InputItem-yHsLFvKt.js";
|
|
4
4
|
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createSlots as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, renderSlot as h, useSlots as g, watch as _, withCtx as v } from "vue";
|
|
5
|
-
|
|
6
|
-
//#region src/components/radio-list/RadioList.vue
|
|
5
|
+
// src/components/radio-list/RadioList.vue
|
|
7
6
|
var y = /* @__PURE__ */ u({
|
|
8
7
|
name: "cu-radio-list",
|
|
9
8
|
__name: "RadioList",
|
|
@@ -62,7 +61,7 @@ var y = /* @__PURE__ */ u({
|
|
|
62
61
|
return y({
|
|
63
62
|
select: M,
|
|
64
63
|
selectByIndex: N
|
|
65
|
-
}), (i, p) => (f(), s("div", { class: d(["cu-radio-list", { "is-align-center": u.alignCenter }]) }, [(f(!0), s(r, null, m(u.options, (n, r) => (f(), a(
|
|
64
|
+
}), (i, p) => (f(), s("div", { class: d(["cu-radio-list", { "is-align-center": u.alignCenter }]) }, [(f(!0), s(r, null, m(u.options, (n, r) => (f(), a(t, {
|
|
66
65
|
key: r,
|
|
67
66
|
class: d(["cu-radio-item", { "is-selected": w.value === n.value && !T.value }]),
|
|
68
67
|
title: O.value ? "" : n.text || n.label,
|
|
@@ -79,7 +78,7 @@ var y = /* @__PURE__ */ u({
|
|
|
79
78
|
_: 2
|
|
80
79
|
}, [!u.alignCenter && !T.value && !k.value ? {
|
|
81
80
|
name: A.value,
|
|
82
|
-
fn: v(() => [l(
|
|
81
|
+
fn: v(() => [l(e, {
|
|
83
82
|
name: n.value,
|
|
84
83
|
"model-value": w.value,
|
|
85
84
|
disabled: n.disabled,
|
|
@@ -123,5 +122,4 @@ var y = /* @__PURE__ */ u({
|
|
|
123
122
|
])) : o("", !0)], 2));
|
|
124
123
|
}
|
|
125
124
|
});
|
|
126
|
-
//#endregion
|
|
127
125
|
export { y as t };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { t as e } from "./Button-D7e-cuA1.js";
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderList as d, toDisplayString as f, withCtx as p } from "vue";
|
|
3
|
+
import { t as m } from "@centui/core";
|
|
4
|
+
// src/components/result-page/ResultPage.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var h = { class: "cu-result" }, g = { class: "cu-result-image" }, _ = ["src"], v = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "cu-result-text"
|
|
8
|
+
}, y = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "cu-result-subtext"
|
|
11
|
+
}, b = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "cu-result-buttons"
|
|
14
|
+
}, x = /* @__PURE__ */ c({
|
|
15
|
+
name: "cu-result-page",
|
|
16
|
+
__name: "ResultPage",
|
|
17
|
+
props: {
|
|
18
|
+
type: { default: "empty" },
|
|
19
|
+
imgUrl: { default: "" },
|
|
20
|
+
text: { default: "" },
|
|
21
|
+
subtext: { default: "" },
|
|
22
|
+
buttons: { default: () => [] }
|
|
23
|
+
},
|
|
24
|
+
setup(c) {
|
|
25
|
+
let x = c, S = n(() => x.imgUrl || `//manhattan.didistatic.com/static/manhattan/mand-mobile/result-page/2.1/${x.type}.png`), C = n(() => x.text || {
|
|
26
|
+
network: m("md.result_page.networkError"),
|
|
27
|
+
empty: m("md.result_page.noInformation")
|
|
28
|
+
}[x.type] || ""), w = n(() => x.subtext || { lost: m("md.result_page.lostWay") }[x.type] || "");
|
|
29
|
+
return (n, m) => (u(), a("div", h, [
|
|
30
|
+
o("div", g, [o("img", {
|
|
31
|
+
src: S.value,
|
|
32
|
+
class: l(!c.imgUrl && c.type)
|
|
33
|
+
}, null, 10, _)]),
|
|
34
|
+
C.value ? (u(), a("div", v, f(C.value), 1)) : i("", !0),
|
|
35
|
+
w.value ? (u(), a("div", y, f(w.value), 1)) : i("", !0),
|
|
36
|
+
c.buttons.length ? (u(), a("div", b, [(u(!0), a(t, null, d(c.buttons, (t, n) => (u(), r(e, {
|
|
37
|
+
key: n,
|
|
38
|
+
type: t.type,
|
|
39
|
+
plain: t.plain === void 0 || t.plain,
|
|
40
|
+
round: t.round,
|
|
41
|
+
inactive: t.inactive,
|
|
42
|
+
loading: t.loading,
|
|
43
|
+
icon: t.icon,
|
|
44
|
+
"icon-svg": t.iconSvg,
|
|
45
|
+
size: "small",
|
|
46
|
+
inline: "",
|
|
47
|
+
onClick: (e) => t.handler?.()
|
|
48
|
+
}, {
|
|
49
|
+
default: p(() => [s(f(t.text), 1)]),
|
|
50
|
+
_: 2
|
|
51
|
+
}, 1032, [
|
|
52
|
+
"type",
|
|
53
|
+
"plain",
|
|
54
|
+
"round",
|
|
55
|
+
"inactive",
|
|
56
|
+
"loading",
|
|
57
|
+
"icon",
|
|
58
|
+
"icon-svg",
|
|
59
|
+
"onClick"
|
|
60
|
+
]))), 128))])) : i("", !0)
|
|
61
|
+
]));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export { x as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Button-Bu8liJQE.cjs");let t=require("vue"),n=require("@centui/core");var r={class:`cu-result`},i={class:`cu-result-image`},a=[`src`],o={key:0,class:`cu-result-text`},s={key:1,class:`cu-result-subtext`},c={key:2,class:`cu-result-buttons`},l=(0,t.defineComponent)({name:`cu-result-page`,__name:`ResultPage`,props:{type:{default:`empty`},imgUrl:{default:``},text:{default:``},subtext:{default:``},buttons:{default:()=>[]}},setup(l){let u=l,d=(0,t.computed)(()=>u.imgUrl||`//manhattan.didistatic.com/static/manhattan/mand-mobile/result-page/2.1/${u.type}.png`),f=(0,t.computed)(()=>u.text||{network:(0,n.t)(`md.result_page.networkError`),empty:(0,n.t)(`md.result_page.noInformation`)}[u.type]||``),p=(0,t.computed)(()=>u.subtext||{lost:(0,n.t)(`md.result_page.lostWay`)}[u.type]||``);return(n,u)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[(0,t.createElementVNode)(`div`,i,[(0,t.createElementVNode)(`img`,{src:d.value,class:(0,t.normalizeClass)(!l.imgUrl&&l.type)},null,10,a)]),f.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,o,(0,t.toDisplayString)(f.value),1)):(0,t.createCommentVNode)(``,!0),p.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,s,(0,t.toDisplayString)(p.value),1)):(0,t.createCommentVNode)(``,!0),l.buttons.length?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,c,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.buttons,(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:r,type:n.type,plain:n.plain===void 0||n.plain,round:n.round,inactive:n.inactive,loading:n.loading,icon:n.icon,"icon-svg":n.iconSvg,size:`small`,inline:``,onClick:e=>n.handler?.()},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.text),1)]),_:2},1032,[`type`,`plain`,`round`,`inactive`,`loading`,`icon`,`icon-svg`,`onClick`]))),128))])):(0,t.createCommentVNode)(``,!0)]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeStyle as a, openBlock as o, renderSlot as s } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/components/activity-indicator/Roller.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var c = { class: "cu-activity-indicator-rolling" }, l = { class: "rolling-container" }, u = ["viewBox"], d = [
|
|
4
4
|
"stroke",
|
|
5
5
|
"stroke-width",
|
|
@@ -88,5 +88,4 @@ var c = { class: "cu-activity-indicator-rolling" }, l = { class: "rolling-contai
|
|
|
88
88
|
], 12, u)), r("div", g, [s(e.$slots, "default")])])]));
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
//#endregion
|
|
92
91
|
export { v as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Roller-DALhjhfg.cjs");let t=require("vue");var n={class:`cu-activity-indicator-rolling-success`},r=(0,t.defineComponent)({name:`cu-activity-indicator-rolling-success`,__name:`RollerSuccess`,props:{isSuccess:{type:Boolean,default:!0},size:{default:70},color:{default:`#28AA8F`},strokeWidth:{default:8}},setup(r){return(i,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,n,[(0,t.createVNode)(e.t,{size:r.size,width:r.strokeWidth,fill:`#FFF6F1`,"border-color":`transparent`},(0,t.createSlots)({default:(0,t.withCtx)(()=>[r.isSuccess?((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,{key:0,viewBox:`0 0 100 100`,preserveAspectRatio:`xMidYMid`,class:`right`,style:(0,t.normalizeStyle)({transform:`translate(-50%, -50%) scale(${r.size/70})`})},[(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`line`,{x1:`32`,y1:`47`,x2:`45`,y2:`62`,style:(0,t.normalizeStyle)({strokeWidth:r.strokeWidth,stroke:r.color}),"stroke-dasharray":`20`},null,4),(0,t.createElementVNode)(`line`,{x1:`42`,y1:`62`,x2:`68.4`,y2:`40`,style:(0,t.normalizeStyle)({strokeWidth:r.strokeWidth,stroke:r.color}),"stroke-dasharray":`35`},null,4)])],4)):(0,t.createCommentVNode)(``,!0)]),_:2},[r.isSuccess?{name:`circle`,fn:(0,t.withCtx)(()=>[a[0]||=(0,t.createElementVNode)(`g`,{name:`circle`},[(0,t.createElementVNode)(`circle`,{class:`success`,cx:`50`,cy:`50`,fill:`#FFF6F1`,stroke:`none`,r:`40`})],-1)]),key:`0`}:void 0]),1032,[`size`,`width`])]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { t as e } from "./Roller-BznN57fL.js";
|
|
2
|
+
import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, createSlots as i, createVNode as a, defineComponent as o, normalizeStyle as s, openBlock as c, withCtx as l } from "vue";
|
|
3
|
+
// src/components/activity-indicator/RollerSuccess.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var u = { class: "cu-activity-indicator-rolling-success" }, d = /* @__PURE__ */ o({
|
|
5
|
+
name: "cu-activity-indicator-rolling-success",
|
|
6
|
+
__name: "RollerSuccess",
|
|
7
|
+
props: {
|
|
8
|
+
isSuccess: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: !0
|
|
11
|
+
},
|
|
12
|
+
size: { default: 70 },
|
|
13
|
+
color: { default: "#28AA8F" },
|
|
14
|
+
strokeWidth: { default: 8 }
|
|
15
|
+
},
|
|
16
|
+
setup(o) {
|
|
17
|
+
return (d, f) => (c(), n("div", u, [a(e, {
|
|
18
|
+
size: o.size,
|
|
19
|
+
width: o.strokeWidth,
|
|
20
|
+
fill: "#FFF6F1",
|
|
21
|
+
"border-color": "transparent"
|
|
22
|
+
}, i({
|
|
23
|
+
default: l(() => [o.isSuccess ? (c(), n("svg", {
|
|
24
|
+
key: 0,
|
|
25
|
+
viewBox: "0 0 100 100",
|
|
26
|
+
preserveAspectRatio: "xMidYMid",
|
|
27
|
+
class: "right",
|
|
28
|
+
style: s({ transform: `translate(-50%, -50%) scale(${o.size / 70})` })
|
|
29
|
+
}, [r("g", null, [r("line", {
|
|
30
|
+
x1: "32",
|
|
31
|
+
y1: "47",
|
|
32
|
+
x2: "45",
|
|
33
|
+
y2: "62",
|
|
34
|
+
style: s({
|
|
35
|
+
strokeWidth: o.strokeWidth,
|
|
36
|
+
stroke: o.color
|
|
37
|
+
}),
|
|
38
|
+
"stroke-dasharray": "20"
|
|
39
|
+
}, null, 4), r("line", {
|
|
40
|
+
x1: "42",
|
|
41
|
+
y1: "62",
|
|
42
|
+
x2: "68.4",
|
|
43
|
+
y2: "40",
|
|
44
|
+
style: s({
|
|
45
|
+
strokeWidth: o.strokeWidth,
|
|
46
|
+
stroke: o.color
|
|
47
|
+
}),
|
|
48
|
+
"stroke-dasharray": "35"
|
|
49
|
+
}, null, 4)])], 4)) : t("", !0)]),
|
|
50
|
+
_: 2
|
|
51
|
+
}, [o.isSuccess ? {
|
|
52
|
+
name: "circle",
|
|
53
|
+
fn: l(() => [f[0] ||= r("g", { name: "circle" }, [r("circle", {
|
|
54
|
+
class: "success",
|
|
55
|
+
cx: "50",
|
|
56
|
+
cy: "50",
|
|
57
|
+
fill: "#FFF6F1",
|
|
58
|
+
stroke: "none",
|
|
59
|
+
r: "40"
|
|
60
|
+
})], -1)]),
|
|
61
|
+
key: "0"
|
|
62
|
+
} : void 0]), 1032, ["size", "width"])]));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export { d as t };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, onBeforeUnmount as a, onMounted as o, openBlock as s, ref as c, watch as l } from "vue";
|
|
2
|
+
import { throttle as u } from "@centui/core";
|
|
3
|
+
import { Scroller as d } from "@centui/core/web";
|
|
4
|
+
// src/components/ruler/Ruler.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var f = 60, p = 2, m = 30, h = /* @__PURE__ */ r({
|
|
6
|
+
name: "cu-ruler",
|
|
7
|
+
__name: "Ruler",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: 0 },
|
|
10
|
+
value: { default: 0 },
|
|
11
|
+
scope: { default: () => [0, 100] },
|
|
12
|
+
step: { default: 10 },
|
|
13
|
+
unit: { default: 1 },
|
|
14
|
+
min: { default: 0 },
|
|
15
|
+
max: { default: 100 },
|
|
16
|
+
stepTextPosition: { default: "top" },
|
|
17
|
+
stepTextRender: {
|
|
18
|
+
type: Function,
|
|
19
|
+
default: () => void 0
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: [
|
|
23
|
+
"update:modelValue",
|
|
24
|
+
"input",
|
|
25
|
+
"change"
|
|
26
|
+
],
|
|
27
|
+
setup(r, { emit: h }) {
|
|
28
|
+
let g = r, _ = e(() => g.modelValue || g.value), v = h, y = c(), b = null, x = null, S = c(!1), C = c(!1), w = c(!1), T = c(0), E = 0, D = e(() => Math.ceil((g.scope[1] - g.scope[0]) / g.unit)), O = e(() => (y.value?.clientWidth ?? 0) * p), k = e(() => {
|
|
29
|
+
let [e, t] = g.scope;
|
|
30
|
+
return g.min > t ? e : g.min > e ? g.min : e;
|
|
31
|
+
}), A = e(() => {
|
|
32
|
+
let [e, t] = g.scope;
|
|
33
|
+
return e > g.max || g.max > t ? t : g.max;
|
|
34
|
+
}), j = e(() => Math.ceil((k.value - g.scope[0]) / g.unit) * m), M = e(() => Math.ceil((g.scope[1] - A.value) / g.unit) * m), N = e(() => g.stepTextPosition === "bottom");
|
|
35
|
+
l(() => _.value, () => {
|
|
36
|
+
if (w.value) return;
|
|
37
|
+
E = 0, w.value = !0;
|
|
38
|
+
let e = I();
|
|
39
|
+
L(e), x?.scrollTo(e, 0, !0);
|
|
40
|
+
}), o(() => {
|
|
41
|
+
b = y.value?.getContext("2d") ?? null, P(), T.value = O.value, F();
|
|
42
|
+
});
|
|
43
|
+
function P() {
|
|
44
|
+
let e = y.value;
|
|
45
|
+
e && b && (e.width = O.value, e.height = 120, b.scale(1 / p, 1));
|
|
46
|
+
}
|
|
47
|
+
function F() {
|
|
48
|
+
let e = u((e) => L(e), 10), t = new d((t) => {
|
|
49
|
+
S.value ? e(t) : L(t);
|
|
50
|
+
}, {
|
|
51
|
+
scrollingX: !0,
|
|
52
|
+
scrollingY: !1,
|
|
53
|
+
snapping: !0,
|
|
54
|
+
snappingVelocity: 1,
|
|
55
|
+
animationDuration: 200,
|
|
56
|
+
inRequestAnimationFrame: !0,
|
|
57
|
+
scrollingComplete: () => {
|
|
58
|
+
w.value = !1;
|
|
59
|
+
}
|
|
60
|
+
}), n = D.value * m + O.value - j.value - M.value, r = I();
|
|
61
|
+
L(r), t.setDimensions(O.value, f, n, f), t.setSnapSize(m, 0), t.scrollTo(r, 0, !1), x = t, S.value = !0;
|
|
62
|
+
}
|
|
63
|
+
function I() {
|
|
64
|
+
let [e] = g.scope;
|
|
65
|
+
return T.value = O.value - Math.ceil((k.value - e) / g.unit) * m, _.value <= k.value ? 0 : _.value >= A.value ? D.value * m : Math.ceil((_.value - k.value) / g.unit) * m;
|
|
66
|
+
}
|
|
67
|
+
function L(e) {
|
|
68
|
+
b && (e = +e.toFixed(2), E = e, T.value += E - e, b.clearRect(0, 0, O.value * 4, 240), R());
|
|
69
|
+
}
|
|
70
|
+
function R() {
|
|
71
|
+
if (!b) return;
|
|
72
|
+
let e = b, [t] = g.scope, n = 120 - (N.value ? 62 : 0), r = Math.round(g.step / g.unit);
|
|
73
|
+
e.lineWidth = 2, e.font = "44px DIDIFD-Medium, \"Helvetica Neue\",Helvetica,\"PingFang SC\",\"Hiragino Sans GB\",\"Microsoft YaHei\",\"微软雅黑\",Arial,sans-serif";
|
|
74
|
+
for (let i = 0; i <= D.value; i++) {
|
|
75
|
+
let a = T.value + i * m;
|
|
76
|
+
if (!(a < 0 || a > O.value * 2)) {
|
|
77
|
+
if (a < T.value + j.value || a > T.value + 1 + D.value * m - M.value ? (e.fillStyle = "#E2E4EA", e.strokeStyle = "#E2E4EA") : (e.fillStyle = "#C5CAD5", e.strokeStyle = "#858B9C"), e.beginPath(), e.moveTo(a, n), i % r === 0) {
|
|
78
|
+
let r = z(t + g.unit * i), o = String(r).length * 22 / 2;
|
|
79
|
+
e.fillText(String(r), a - o, 44 + (N.value ? 70 : 0)), e.lineTo(a, n - 40);
|
|
80
|
+
} else e.lineTo(a, n - 20);
|
|
81
|
+
e.stroke();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
e.strokeStyle = "#E2E4EA", e.beginPath(), e.moveTo(T.value, n), e.lineTo(T.value + D.value * m, n), e.stroke(), W();
|
|
85
|
+
}
|
|
86
|
+
function z(e) {
|
|
87
|
+
return g.stepTextRender?.(e) ?? e;
|
|
88
|
+
}
|
|
89
|
+
let B = !1, V = null;
|
|
90
|
+
function H(e) {
|
|
91
|
+
if (C.value || B) return;
|
|
92
|
+
e.preventDefault(), e.stopPropagation(), x?.doTouchStart(Array.from(e.touches), e.timeStamp), C.value = !0, B = !0, w.value = !0;
|
|
93
|
+
let t = (e) => {
|
|
94
|
+
e.preventDefault(), e.stopPropagation(), C.value && x?.doTouchMove(Array.from(e.touches), e.timeStamp, e.scale);
|
|
95
|
+
}, n = (e) => {
|
|
96
|
+
e.preventDefault(), e.stopPropagation(), C.value = !1, B = !1, x?.doTouchEnd(e.timeStamp), window.removeEventListener("touchmove", t), window.removeEventListener("touchend", n), V = null;
|
|
97
|
+
};
|
|
98
|
+
window.addEventListener("touchmove", t, { passive: !1 }), window.addEventListener("touchend", n), V = () => {
|
|
99
|
+
window.removeEventListener("touchmove", t), window.removeEventListener("touchend", n);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
let U = (e) => {
|
|
103
|
+
e.preventDefault();
|
|
104
|
+
};
|
|
105
|
+
a(() => {
|
|
106
|
+
V?.(), V = null, C.value = !1, B = !1, w.value && x?.doTouchEnd(Date.now()), x = null;
|
|
107
|
+
});
|
|
108
|
+
function W() {
|
|
109
|
+
if (!S.value) return;
|
|
110
|
+
let [e] = g.scope;
|
|
111
|
+
if (T.value > O.value) {
|
|
112
|
+
G(k.value);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
let t = T.value >= 0 ? Math.abs(T.value - O.value) : Math.abs(T.value) + O.value, n = e + Math.round(t / m) * g.unit;
|
|
116
|
+
n > A.value && (n = A.value), n < k.value && (n = k.value), G(n);
|
|
117
|
+
}
|
|
118
|
+
function G(e) {
|
|
119
|
+
v("update:modelValue", e), v("input", e), v("change", e);
|
|
120
|
+
}
|
|
121
|
+
return (e, r) => (s(), t("div", {
|
|
122
|
+
class: "cu-ruler",
|
|
123
|
+
onTouchstart: H,
|
|
124
|
+
onTouchend: U
|
|
125
|
+
}, [
|
|
126
|
+
n("canvas", {
|
|
127
|
+
ref_key: "canvas",
|
|
128
|
+
ref: y,
|
|
129
|
+
class: "cu-ruler-canvas"
|
|
130
|
+
}, null, 512),
|
|
131
|
+
n("div", { class: i(["cu-ruler-cursor", [N.value && "cu-ruler-cursor-bottom"]]) }, null, 2),
|
|
132
|
+
r[0] ||= n("div", { class: "cu-ruler-arrow" }, null, -1)
|
|
133
|
+
], 32));
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
export { h as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("vue"),t=require("@centui/core"),n=require("@centui/core/web");var r=60,i=2,a=30,o=(0,e.defineComponent)({name:`cu-ruler`,__name:`Ruler`,props:{modelValue:{default:0},value:{default:0},scope:{default:()=>[0,100]},step:{default:10},unit:{default:1},min:{default:0},max:{default:100},stepTextPosition:{default:`top`},stepTextRender:{type:Function,default:()=>void 0}},emits:[`update:modelValue`,`input`,`change`],setup(o,{emit:s}){let c=o,l=(0,e.computed)(()=>c.modelValue||c.value),u=s,d=(0,e.ref)(),f=null,p=null,m=(0,e.ref)(!1),h=(0,e.ref)(!1),g=(0,e.ref)(!1),_=(0,e.ref)(0),v=0,y=(0,e.computed)(()=>Math.ceil((c.scope[1]-c.scope[0])/c.unit)),b=(0,e.computed)(()=>(d.value?.clientWidth??0)*i),x=(0,e.computed)(()=>{let[e,t]=c.scope;return c.min>t?e:c.min>e?c.min:e}),S=(0,e.computed)(()=>{let[e,t]=c.scope;return e>c.max||c.max>t?t:c.max}),C=(0,e.computed)(()=>Math.ceil((x.value-c.scope[0])/c.unit)*a),w=(0,e.computed)(()=>Math.ceil((c.scope[1]-S.value)/c.unit)*a),T=(0,e.computed)(()=>c.stepTextPosition===`bottom`);(0,e.watch)(()=>l.value,()=>{if(g.value)return;v=0,g.value=!0;let e=O();k(e),p?.scrollTo(e,0,!0)}),(0,e.onMounted)(()=>{f=d.value?.getContext(`2d`)??null,E(),_.value=b.value,D()});function E(){let e=d.value;e&&f&&(e.width=b.value,e.height=120,f.scale(1/i,1))}function D(){let e=(0,t.throttle)(e=>k(e),10),i=new n.Scroller(t=>{m.value?e(t):k(t)},{scrollingX:!0,scrollingY:!1,snapping:!0,snappingVelocity:1,animationDuration:200,inRequestAnimationFrame:!0,scrollingComplete:()=>{g.value=!1}}),o=y.value*a+b.value-C.value-w.value,s=O();k(s),i.setDimensions(b.value,r,o,r),i.setSnapSize(a,0),i.scrollTo(s,0,!1),p=i,m.value=!0}function O(){let[e]=c.scope;return _.value=b.value-Math.ceil((x.value-e)/c.unit)*a,l.value<=x.value?0:l.value>=S.value?y.value*a:Math.ceil((l.value-x.value)/c.unit)*a}function k(e){f&&(e=+e.toFixed(2),v=e,_.value+=v-e,f.clearRect(0,0,b.value*4,240),A())}function A(){if(!f)return;let e=f,[t]=c.scope,n=120-(T.value?62:0),r=Math.round(c.step/c.unit);e.lineWidth=2,e.font=`44px DIDIFD-Medium, "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif`;for(let i=0;i<=y.value;i++){let o=_.value+i*a;if(!(o<0||o>b.value*2)){if(o<_.value+C.value||o>_.value+1+y.value*a-w.value?(e.fillStyle=`#E2E4EA`,e.strokeStyle=`#E2E4EA`):(e.fillStyle=`#C5CAD5`,e.strokeStyle=`#858B9C`),e.beginPath(),e.moveTo(o,n),i%r===0){let r=j(t+c.unit*i),a=String(r).length*22/2;e.fillText(String(r),o-a,44+(T.value?70:0)),e.lineTo(o,n-40)}else e.lineTo(o,n-20);e.stroke()}}e.strokeStyle=`#E2E4EA`,e.beginPath(),e.moveTo(_.value,n),e.lineTo(_.value+y.value*a,n),e.stroke(),I()}function j(e){return c.stepTextRender?.(e)??e}let M=!1,N=null;function P(e){if(h.value||M)return;e.preventDefault(),e.stopPropagation(),p?.doTouchStart(Array.from(e.touches),e.timeStamp),h.value=!0,M=!0,g.value=!0;let t=e=>{e.preventDefault(),e.stopPropagation(),h.value&&p?.doTouchMove(Array.from(e.touches),e.timeStamp,e.scale)},n=e=>{e.preventDefault(),e.stopPropagation(),h.value=!1,M=!1,p?.doTouchEnd(e.timeStamp),window.removeEventListener(`touchmove`,t),window.removeEventListener(`touchend`,n),N=null};window.addEventListener(`touchmove`,t,{passive:!1}),window.addEventListener(`touchend`,n),N=()=>{window.removeEventListener(`touchmove`,t),window.removeEventListener(`touchend`,n)}}let F=e=>{e.preventDefault()};(0,e.onBeforeUnmount)(()=>{N?.(),N=null,h.value=!1,M=!1,g.value&&p?.doTouchEnd(Date.now()),p=null});function I(){if(!m.value)return;let[e]=c.scope;if(_.value>b.value){L(x.value);return}let t=_.value>=0?Math.abs(_.value-b.value):Math.abs(_.value)+b.value,n=e+Math.round(t/a)*c.unit;n>S.value&&(n=S.value),n<x.value&&(n=x.value),L(n)}function L(e){u(`update:modelValue`,e),u(`input`,e),u(`change`,e)}return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`cu-ruler`,onTouchstart:P,onTouchend:F},[(0,e.createElementVNode)(`canvas`,{ref_key:`canvas`,ref:d,class:`cu-ruler-canvas`},null,512),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`cu-ruler-cursor`,[T.value&&`cu-ruler-cursor-bottom`]])},null,2),n[0]||=(0,e.createElementVNode)(`div`,{class:`cu-ruler-arrow`},null,-1)],32))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|