centui 0.0.0-stage → 3.0.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/LICENSE +433 -0
- package/README.md +54 -2
- package/dist/Agree-DT46e5q5.cjs +1 -0
- package/dist/Agree-yTGTi4e6.js +44 -0
- package/dist/Amount-De-oObat.cjs +1 -0
- package/dist/Amount-wOtRYOdx.js +62 -0
- package/dist/Button-BIi6CrwM.js +61 -0
- package/dist/Button-Blpwwbnw.cjs +1 -0
- package/dist/CellItem-T78DHako.cjs +1 -0
- package/dist/CellItem-YZD-BxKt.js +72 -0
- package/dist/CheckBoxBase-BDsytL_r.cjs +1 -0
- package/dist/CheckBoxBase-BjyVzGqj.js +40 -0
- package/dist/CheckList-Bfy3B-eN.js +239 -0
- package/dist/CheckList-DEmLmccw.cjs +1 -0
- package/dist/Codebox-Cgj7wyzd.cjs +1 -0
- package/dist/Codebox-D0UtCj11.js +189 -0
- package/dist/DatePicker-B1AVbKhK.cjs +1 -0
- package/dist/DatePicker-TAHuve5t.js +177 -0
- package/dist/Field-CseJzTZz.js +51 -0
- package/dist/Field-DDmHa4zB.cjs +1 -0
- package/dist/FieldItem-Cc7bw5vU.js +88 -0
- package/dist/FieldItem-Dkpx5Kxk.cjs +1 -0
- package/dist/Icon-dWGSK6Ou.js +119 -0
- package/dist/Icon-jaEPn7d7.cjs +31 -0
- package/dist/InputItem-EJ4Y3tpU.cjs +1 -0
- package/dist/InputItem-bhFtp97z.js +322 -0
- package/dist/NoticeBar-DSf_EjTL.cjs +1 -0
- package/dist/NoticeBar-PEYcjXwD.js +84 -0
- package/dist/NumberKeyboard-BX0c0l2r.cjs +1 -0
- package/dist/NumberKeyboard-C7TRF5iC.js +320 -0
- package/dist/Picker-D-TPtSxf.cjs +1 -0
- package/dist/Picker-Dam0LEcc.js +476 -0
- package/dist/Popup-Cm4BuaOo.cjs +1 -0
- package/dist/Popup-DPYBBL95.js +116 -0
- package/dist/PopupTitleBar-B4vwxKC7.cjs +1 -0
- package/dist/PopupTitleBar-nVurLaOe.js +85 -0
- package/dist/Progress-CwIC6scr.js +67 -0
- package/dist/Progress-DukssNvl.cjs +1 -0
- package/dist/Radio-ZHivLdvi.cjs +1 -0
- package/dist/Radio-fsc7_N5K.js +65 -0
- package/dist/RadioGroup-BR_jSDR4.cjs +1 -0
- package/dist/RadioGroup-CMPmk8X_.js +82 -0
- package/dist/RadioList-CkerkQEY.js +127 -0
- package/dist/RadioList-upQgua8Z.cjs +1 -0
- package/dist/Roller-DALhjhfg.cjs +1 -0
- package/dist/Roller-DFJ7jMV0.js +92 -0
- package/dist/RollerSuccess--JecJ7bz.cjs +1 -0
- package/dist/RollerSuccess-CVEmS9gU.js +224 -0
- package/dist/ScrollViewMore-BWph-i1-.cjs +1 -0
- package/dist/ScrollViewMore-BgYJx-TP.js +278 -0
- package/dist/Skeleton--SCiydNl.cjs +1 -0
- package/dist/Skeleton-BG_j23KI.js +55 -0
- package/dist/Slider-D3wrE8hn.cjs +1 -0
- package/dist/Slider-DteN8p-L.js +95 -0
- package/dist/Stepper-1EOk4pCY.js +127 -0
- package/dist/Stepper-BJr4I6_8.cjs +1 -0
- package/dist/SwiperItem-B6TgjCsM.cjs +1 -0
- package/dist/SwiperItem-CKd-XKT7.js +337 -0
- package/dist/Switch-B6DvVj2p.js +30 -0
- package/dist/Switch-BVPjF8CM.cjs +1 -0
- package/dist/Tag-CPv77lC8.cjs +1 -0
- package/dist/Tag-bs5j40pF.js +66 -0
- package/dist/Tip-BFZSiRc1.js +166 -0
- package/dist/Tip-C3brAF9N.cjs +1 -0
- package/dist/action-sheet-DKpi2GLQ.js +118 -0
- package/dist/action-sheet-LJilF3EQ.cjs +1 -0
- package/dist/action-sheet.cjs +1 -0
- package/dist/action-sheet.d.ts +2 -0
- package/dist/action-sheet.js +2 -0
- package/dist/activity-indicator.cjs +1 -0
- package/dist/activity-indicator.d.ts +1 -0
- package/dist/activity-indicator.js +3 -0
- package/dist/agree.cjs +1 -0
- package/dist/agree.d.ts +1 -0
- package/dist/agree.js +2 -0
- package/dist/amount.cjs +1 -0
- package/dist/amount.d.ts +1 -0
- package/dist/amount.js +2 -0
- package/dist/button.cjs +1 -0
- package/dist/button.d.ts +1 -0
- package/dist/button.js +2 -0
- package/dist/cell-item.cjs +1 -0
- package/dist/cell-item.d.ts +1 -0
- package/dist/cell-item.js +2 -0
- package/dist/check-base.cjs +1 -0
- package/dist/check-base.d.ts +1 -0
- package/dist/check-base.js +2 -0
- package/dist/check.cjs +1 -0
- package/dist/check.d.ts +1 -0
- package/dist/check.js +2 -0
- package/dist/codebox.cjs +1 -0
- package/dist/codebox.d.ts +1 -0
- package/dist/codebox.js +2 -0
- package/dist/components/action-bar/ActionBar.vue.d.ts +34 -0
- package/dist/components/action-bar/index.d.ts +2 -0
- package/dist/components/action-sheet/ActionSheet.vue.d.ts +44 -0
- package/dist/components/action-sheet/index.d.ts +25 -0
- package/dist/components/activity-indicator/ActivityIndicator.vue.d.ts +31 -0
- package/dist/components/activity-indicator/Carousel.vue.d.ts +10 -0
- package/dist/components/activity-indicator/CarouselCircle.vue.d.ts +12 -0
- package/dist/components/activity-indicator/Roller.vue.d.ts +37 -0
- package/dist/components/activity-indicator/RollerSuccess.vue.d.ts +14 -0
- package/dist/components/activity-indicator/Spinning.vue.d.ts +10 -0
- package/dist/components/activity-indicator/index.d.ts +5 -0
- package/dist/components/agree/Agree.vue.d.ts +35 -0
- package/dist/components/agree/index.d.ts +1 -0
- package/dist/components/amount/Amount.vue.d.ts +25 -0
- package/dist/components/amount/index.d.ts +1 -0
- package/dist/components/bill/Bill.vue.d.ts +33 -0
- package/dist/components/bill/index.d.ts +1 -0
- package/dist/components/button/Button.vue.d.ts +38 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/captcha/Captcha.vue.d.ts +76 -0
- package/dist/components/captcha/index.d.ts +1 -0
- package/dist/components/cashier/Cashier.vue.d.ts +101 -0
- package/dist/components/cashier/CashierChannel.vue.d.ts +54 -0
- package/dist/components/cashier/CashierChannelButton.vue.d.ts +14 -0
- package/dist/components/cashier/CashierChannelItem.vue.d.ts +30 -0
- package/dist/components/cashier/index.d.ts +4 -0
- package/dist/components/cell-item/CellItem.vue.d.ts +38 -0
- package/dist/components/cell-item/index.d.ts +1 -0
- package/dist/components/chart/Chart.vue.d.ts +30 -0
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/check/Check.vue.d.ts +38 -0
- package/dist/components/check/CheckBox.vue.d.ts +31 -0
- package/dist/components/check/CheckGroup.vue.d.ts +27 -0
- package/dist/components/check/CheckList.vue.d.ts +58 -0
- package/dist/components/check/index.d.ts +6 -0
- package/dist/components/check/shared.d.ts +52 -0
- package/dist/components/check-base/CheckBoxBase.vue.d.ts +25 -0
- package/dist/components/check-base/index.d.ts +1 -0
- package/dist/components/codebox/Codebox.vue.d.ts +58 -0
- package/dist/components/codebox/index.d.ts +1 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +70 -0
- package/dist/components/date-picker/index.d.ts +1 -0
- package/dist/components/detail-item/DetailItem.vue.d.ts +22 -0
- package/dist/components/detail-item/index.d.ts +1 -0
- package/dist/components/dialog/Dialog.vue.d.ts +78 -0
- package/dist/components/dialog/index.d.ts +40 -0
- package/dist/components/drop-menu/DropMenu.vue.d.ts +55 -0
- package/dist/components/drop-menu/index.d.ts +1 -0
- package/dist/components/field/Field.vue.d.ts +30 -0
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/field-item/FieldItem.vue.d.ts +42 -0
- package/dist/components/field-item/index.d.ts +1 -0
- package/dist/components/icon/Icon.vue.d.ts +20 -0
- package/dist/components/icon/default-svg-list.d.ts +2 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon/load-sprite.d.ts +6 -0
- package/dist/components/image-reader/ImageReader.vue.d.ts +46 -0
- package/dist/components/image-reader/index.d.ts +1 -0
- package/dist/components/image-viewer/ImageViewer.vue.d.ts +25 -0
- package/dist/components/image-viewer/index.d.ts +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/input-item/InputItem.vue.d.ts +97 -0
- package/dist/components/input-item/cursor.d.ts +7 -0
- package/dist/components/input-item/index.d.ts +1 -0
- package/dist/components/landscape/Landscape.vue.d.ts +38 -0
- package/dist/components/landscape/index.d.ts +1 -0
- package/dist/components/license-plate/LicensePlate.vue.d.ts +32 -0
- package/dist/components/license-plate/LicensePlateInput.vue.d.ts +14 -0
- package/dist/components/license-plate/LicensePlateKeyboard.vue.d.ts +30 -0
- package/dist/components/license-plate/index.d.ts +3 -0
- package/dist/components/notice-bar/NoticeBar.vue.d.ts +44 -0
- package/dist/components/notice-bar/index.d.ts +1 -0
- package/dist/components/number-keyboard/KeyboardBoard.vue.d.ts +33 -0
- package/dist/components/number-keyboard/KeyboardKey.vue.d.ts +16 -0
- package/dist/components/number-keyboard/NumberKeyboard.vue.d.ts +59 -0
- package/dist/components/number-keyboard/index.d.ts +3 -0
- package/dist/components/picker/Picker.vue.d.ts +64 -0
- package/dist/components/picker/PickerColumn.vue.d.ts +64 -0
- package/dist/components/picker/index.d.ts +3 -0
- package/dist/components/popup/Popup.vue.d.ts +50 -0
- package/dist/components/popup/PopupTitleBar.vue.d.ts +41 -0
- package/dist/components/popup/index.d.ts +2 -0
- package/dist/components/progress/Progress.vue.d.ts +39 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/radio/Radio.vue.d.ts +39 -0
- package/dist/components/radio/RadioBox.vue.d.ts +31 -0
- package/dist/components/radio/RadioGroup.vue.d.ts +24 -0
- package/dist/components/radio/index.d.ts +3 -0
- package/dist/components/radio-list/RadioList.vue.d.ts +72 -0
- package/dist/components/radio-list/index.d.ts +2 -0
- package/dist/components/result-page/ResultPage.vue.d.ts +28 -0
- package/dist/components/result-page/index.d.ts +1 -0
- package/dist/components/ruler/Ruler.vue.d.ts +34 -0
- package/dist/components/ruler/index.d.ts +1 -0
- package/dist/components/scroll-view/ScrollView.vue.d.ts +84 -0
- package/dist/components/scroll-view/ScrollViewMore.vue.d.ts +12 -0
- package/dist/components/scroll-view/ScrollViewRefresh.vue.d.ts +20 -0
- package/dist/components/scroll-view/index.d.ts +3 -0
- package/dist/components/selector/Selector.vue.d.ts +88 -0
- package/dist/components/selector/index.d.ts +2 -0
- package/dist/components/skeleton/Skeleton.vue.d.ts +30 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/slider/Slider.vue.d.ts +24 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/stepper/Stepper.vue.d.ts +32 -0
- package/dist/components/stepper/index.d.ts +1 -0
- package/dist/components/steps/Steps.vue.d.ts +56 -0
- package/dist/components/steps/index.d.ts +2 -0
- package/dist/components/swiper/Swiper.vue.d.ts +57 -0
- package/dist/components/swiper/SwiperItem.vue.d.ts +26 -0
- package/dist/components/swiper/index.d.ts +2 -0
- package/dist/components/switch/Switch.vue.d.ts +16 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/tab-picker/TabPicker.vue.d.ts +78 -0
- package/dist/components/tab-picker/index.d.ts +1 -0
- package/dist/components/tabs/TabBar.vue.d.ts +50 -0
- package/dist/components/tabs/TabPane.vue.d.ts +31 -0
- package/dist/components/tabs/Tabs.vue.d.ts +34 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tag/Tag.vue.d.ts +39 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/textarea-item/TextareaItem.vue.d.ts +80 -0
- package/dist/components/textarea-item/index.d.ts +1 -0
- package/dist/components/tip/Tip.vue.d.ts +98 -0
- package/dist/components/tip/TipContent.vue.d.ts +33 -0
- package/dist/components/tip/index.d.ts +2 -0
- package/dist/components/toast/Toast.vue.d.ts +45 -0
- package/dist/components/toast/index.d.ts +129 -0
- package/dist/components/transition/Transition.vue.d.ts +13 -0
- package/dist/components/transition/index.d.ts +1 -0
- package/dist/components/water-mark/WaterMark.vue.d.ts +35 -0
- package/dist/components/water-mark/index.d.ts +1 -0
- package/dist/date-picker.cjs +1 -0
- package/dist/date-picker.d.ts +1 -0
- package/dist/date-picker.js +2 -0
- package/dist/dialog-0-E4Vyc-.cjs +1 -0
- package/dist/dialog-DHIZ2SMK.js +227 -0
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dialog.js +2 -0
- package/dist/field-item.cjs +1 -0
- package/dist/field-item.d.ts +1 -0
- package/dist/field-item.js +2 -0
- package/dist/field.cjs +1 -0
- package/dist/field.d.ts +1 -0
- package/dist/field.js +2 -0
- package/dist/icon.cjs +1 -0
- package/dist/icon.d.ts +1 -0
- package/dist/icon.js +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +2669 -0
- package/dist/input-item.cjs +1 -0
- package/dist/input-item.d.ts +1 -0
- package/dist/input-item.js +2 -0
- package/dist/notice-bar.cjs +1 -0
- package/dist/notice-bar.d.ts +1 -0
- package/dist/notice-bar.js +2 -0
- package/dist/number-keyboard.cjs +1 -0
- package/dist/number-keyboard.d.ts +1 -0
- package/dist/number-keyboard.js +2 -0
- package/dist/picker.cjs +1 -0
- package/dist/picker.d.ts +1 -0
- package/dist/picker.js +2 -0
- package/dist/popup.cjs +1 -0
- package/dist/popup.d.ts +1 -0
- package/dist/popup.js +3 -0
- package/dist/progress.cjs +1 -0
- package/dist/progress.d.ts +1 -0
- package/dist/progress.js +2 -0
- package/dist/radio-list.cjs +1 -0
- package/dist/radio-list.d.ts +1 -0
- package/dist/radio-list.js +2 -0
- package/dist/radio.cjs +1 -0
- package/dist/radio.d.ts +1 -0
- package/dist/radio.js +3 -0
- package/dist/scroll-view.cjs +1 -0
- package/dist/scroll-view.d.ts +1 -0
- package/dist/scroll-view.js +2 -0
- package/dist/shared-BtSkmaWC.js +37 -0
- package/dist/shared-k9cbQbvK.cjs +1 -0
- package/dist/skeleton.cjs +1 -0
- package/dist/skeleton.d.ts +1 -0
- package/dist/skeleton.js +2 -0
- package/dist/slider.cjs +1 -0
- package/dist/slider.d.ts +1 -0
- package/dist/slider.js +2 -0
- package/dist/stepper.cjs +1 -0
- package/dist/stepper.d.ts +1 -0
- package/dist/stepper.js +2 -0
- package/dist/swiper.cjs +1 -0
- package/dist/swiper.d.ts +1 -0
- package/dist/swiper.js +2 -0
- package/dist/switch.cjs +1 -0
- package/dist/switch.d.ts +1 -0
- package/dist/switch.js +2 -0
- package/dist/tag.cjs +1 -0
- package/dist/tag.d.ts +1 -0
- package/dist/tag.js +2 -0
- package/dist/tip.cjs +1 -0
- package/dist/tip.d.ts +1 -0
- package/dist/tip.js +2 -0
- package/dist/toast-CAeyMc5r.cjs +1 -0
- package/dist/toast-DX-RoB7Q.js +146 -0
- package/dist/toast.cjs +1 -0
- package/dist/toast.d.ts +2 -0
- package/dist/toast.js +2 -0
- package/package.json +195 -3
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { t as e } from "./Roller-DFJ7jMV0.js";
|
|
2
|
+
import { createBlock as t, defineComponent as n, onMounted as r, openBlock as i, ref as a, renderSlot as o, watch as s, withCtx as c } from "vue";
|
|
3
|
+
import { Animate as l } from "@centui/core/web";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/components/progress/Progress.vue
|
|
6
|
+
var u = /* @__PURE__ */ n({
|
|
7
|
+
name: "cu-progress",
|
|
8
|
+
__name: "Progress",
|
|
9
|
+
props: {
|
|
10
|
+
size: { default: 70 },
|
|
11
|
+
width: { default: void 0 },
|
|
12
|
+
color: { default: "#2F86F6" },
|
|
13
|
+
borderColor: { default: "rgba(0, 0, 0, .1)" },
|
|
14
|
+
fill: { default: "transparent" },
|
|
15
|
+
linecap: { default: "round" },
|
|
16
|
+
rotate: { default: 0 },
|
|
17
|
+
value: { default: 0 },
|
|
18
|
+
transition: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
duration: { default: 1e3 }
|
|
23
|
+
},
|
|
24
|
+
setup(n) {
|
|
25
|
+
let u = n, d = typeof window < "u", f = a(0), p = a(!1);
|
|
26
|
+
s(() => u.value, (e, t) => {
|
|
27
|
+
if (!d && !p.value || !u.transition) {
|
|
28
|
+
f.value = e;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
m(t, e);
|
|
32
|
+
}, { immediate: !0 }), r(() => {
|
|
33
|
+
p.value = !0;
|
|
34
|
+
});
|
|
35
|
+
function m(e = 0, t = 0) {
|
|
36
|
+
l.start((n) => {
|
|
37
|
+
f.value = e + (t - e) * n;
|
|
38
|
+
}, () => !0, () => {}, u.duration);
|
|
39
|
+
}
|
|
40
|
+
return (r, a) => (i(), t(e, {
|
|
41
|
+
class: "cu-progress",
|
|
42
|
+
process: f.value,
|
|
43
|
+
size: n.size,
|
|
44
|
+
width: n.width,
|
|
45
|
+
color: n.color,
|
|
46
|
+
"border-color": n.borderColor,
|
|
47
|
+
fill: n.fill,
|
|
48
|
+
linecap: n.linecap,
|
|
49
|
+
rotate: n.rotate
|
|
50
|
+
}, {
|
|
51
|
+
defs: c(() => [o(r.$slots, "defs")]),
|
|
52
|
+
default: c(() => [o(r.$slots, "default")]),
|
|
53
|
+
_: 3
|
|
54
|
+
}, 8, [
|
|
55
|
+
"process",
|
|
56
|
+
"size",
|
|
57
|
+
"width",
|
|
58
|
+
"color",
|
|
59
|
+
"border-color",
|
|
60
|
+
"fill",
|
|
61
|
+
"linecap",
|
|
62
|
+
"rotate"
|
|
63
|
+
]));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
//#endregion
|
|
67
|
+
export { u as t };
|
|
@@ -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=typeof window<`u`,o=(0,t.ref)(0),s=(0,t.ref)(!1);(0,t.watch)(()=>i.value,(e,t)=>{if(!a&&!s.value||!i.transition){o.value=e;return}c(t,e)},{immediate:!0}),(0,t.onMounted)(()=>{s.value=!0});function c(e=0,t=0){n.Animate.start(n=>{o.value=e+(t-e)*n},()=>!0,()=>{},i.duration)}return(n,i)=>((0,t.openBlock)(),(0,t.createBlock)(e.t,{class:`cu-progress`,process:o.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}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Icon-jaEPn7d7.cjs"),t=require("./shared-k9cbQbvK.cjs");let n=require("vue");var r={class:`cu-radio-icon`},i={key:0,class:`cu-radio-label`},a=(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(a,{emit:o}){let s=a,{isChecked:c,onClick:l}=t.n(s,o),u=(0,n.computed)(()=>s.disabled?s.iconDisabled:c.value?s.icon:s.iconInverse);return(t,o)=>((0,n.openBlock)(),(0,n.createElementBlock)(`label`,{class:(0,n.normalizeClass)([`cu-radio`,{"is-disabled":a.disabled,"is-checked":(0,n.unref)(c),"is-inline":a.inline}]),onClick:o[0]||=(...e)=>(0,n.unref)(l)&&(0,n.unref)(l)(...e)},[(0,n.createElementVNode)(`div`,r,[(0,n.createVNode)(e.t,{name:u.value,size:a.size,svg:a.iconSvg},null,8,[`name`,`size`,`svg`])]),t.$slots.default||a.label?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,i,[(0,n.renderSlot)(t.$slots,`default`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(a.label),1)])])):(0,n.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { t as e } from "./Icon-dWGSK6Ou.js";
|
|
2
|
+
import { n as t } from "./shared-BtSkmaWC.js";
|
|
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
|
+
//#region src/components/radio/Radio.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var m = { class: "cu-radio-icon" }, h = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "cu-radio-label"
|
|
8
|
+
}, g = /* @__PURE__ */ c({
|
|
9
|
+
name: "cu-radio",
|
|
10
|
+
__name: "Radio",
|
|
11
|
+
props: {
|
|
12
|
+
name: { type: [
|
|
13
|
+
String,
|
|
14
|
+
Number,
|
|
15
|
+
Boolean
|
|
16
|
+
] },
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: [
|
|
19
|
+
String,
|
|
20
|
+
Number,
|
|
21
|
+
Boolean
|
|
22
|
+
],
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
size: { default: "md" },
|
|
26
|
+
label: { default: "" },
|
|
27
|
+
inline: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
icon: { default: "checked" },
|
|
36
|
+
iconInverse: { default: "check" },
|
|
37
|
+
iconDisabled: { default: "check-disabled" },
|
|
38
|
+
iconSvg: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
emits: ["update:modelValue"],
|
|
44
|
+
setup(c, { emit: g }) {
|
|
45
|
+
let _ = c, { isChecked: v, onClick: y } = t(_, g), b = n(() => _.disabled ? _.iconDisabled : v.value ? _.icon : _.iconInverse);
|
|
46
|
+
return (t, n) => (u(), i("label", {
|
|
47
|
+
class: l(["cu-radio", {
|
|
48
|
+
"is-disabled": c.disabled,
|
|
49
|
+
"is-checked": p(v),
|
|
50
|
+
"is-inline": c.inline
|
|
51
|
+
}]),
|
|
52
|
+
onClick: n[0] ||= (...e) => p(y) && p(y)(...e)
|
|
53
|
+
}, [a("div", m, [s(e, {
|
|
54
|
+
name: b.value,
|
|
55
|
+
size: c.size,
|
|
56
|
+
svg: c.iconSvg
|
|
57
|
+
}, null, 8, [
|
|
58
|
+
"name",
|
|
59
|
+
"size",
|
|
60
|
+
"svg"
|
|
61
|
+
])]), t.$slots.default || c.label ? (u(), i("div", h, [d(t.$slots, "default", {}, () => [o(f(c.label), 1)])])) : r("", !0)], 2));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
//#endregion
|
|
65
|
+
export { g as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./CheckBoxBase-BDsytL_r.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`,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`},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}});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { t as e } from "./CheckBoxBase-BjyVzGqj.js";
|
|
2
|
+
import { n as t } from "./shared-BtSkmaWC.js";
|
|
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
|
+
//#endregion
|
|
5
|
+
//#region src/components/radio/RadioBox.vue
|
|
6
|
+
var f = /* @__PURE__ */ a({
|
|
7
|
+
name: "cu-radio-box",
|
|
8
|
+
__name: "RadioBox",
|
|
9
|
+
props: {
|
|
10
|
+
name: {
|
|
11
|
+
type: [
|
|
12
|
+
String,
|
|
13
|
+
Number,
|
|
14
|
+
Boolean
|
|
15
|
+
],
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: [
|
|
20
|
+
String,
|
|
21
|
+
Number,
|
|
22
|
+
Boolean
|
|
23
|
+
],
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
label: { default: "" },
|
|
27
|
+
disabled: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
iconPosition: { default: "rt" }
|
|
32
|
+
},
|
|
33
|
+
emits: ["update:modelValue"],
|
|
34
|
+
setup(r, { emit: a }) {
|
|
35
|
+
let { isChecked: s, onClick: f } = t(r, a);
|
|
36
|
+
return (t, a) => (o(), n(e, {
|
|
37
|
+
class: "cu-radio-box",
|
|
38
|
+
label: r.label,
|
|
39
|
+
"is-checked": u(s),
|
|
40
|
+
disabled: r.disabled,
|
|
41
|
+
"icon-position": r.iconPosition,
|
|
42
|
+
onClick: u(f)
|
|
43
|
+
}, {
|
|
44
|
+
default: d(() => [c(t.$slots, "default", {}, () => [i(l(r.label), 1)])]),
|
|
45
|
+
_: 3
|
|
46
|
+
}, 8, [
|
|
47
|
+
"label",
|
|
48
|
+
"is-checked",
|
|
49
|
+
"disabled",
|
|
50
|
+
"icon-position",
|
|
51
|
+
"onClick"
|
|
52
|
+
]));
|
|
53
|
+
}
|
|
54
|
+
}), p = { class: "cu-radio-group" }, m = /* @__PURE__ */ a({
|
|
55
|
+
name: "cu-radio-group",
|
|
56
|
+
__name: "RadioGroup",
|
|
57
|
+
props: {
|
|
58
|
+
modelValue: {
|
|
59
|
+
type: [
|
|
60
|
+
String,
|
|
61
|
+
Number,
|
|
62
|
+
Boolean
|
|
63
|
+
],
|
|
64
|
+
default: ""
|
|
65
|
+
},
|
|
66
|
+
max: { default: 0 }
|
|
67
|
+
},
|
|
68
|
+
emits: ["update:modelValue"],
|
|
69
|
+
setup(e, { emit: t }) {
|
|
70
|
+
let n = e, i = t;
|
|
71
|
+
return s("rootGroup", {
|
|
72
|
+
get value() {
|
|
73
|
+
return n.modelValue;
|
|
74
|
+
},
|
|
75
|
+
check(e) {
|
|
76
|
+
i("update:modelValue", e);
|
|
77
|
+
}
|
|
78
|
+
}), (e, t) => (o(), r("div", p, [c(e.$slots, "default")]));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
//#endregion
|
|
82
|
+
export { f as n, m as t };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { t as e } from "./CellItem-YZD-BxKt.js";
|
|
2
|
+
import { t } from "./Radio-fsc7_N5K.js";
|
|
3
|
+
import { t as n } from "./InputItem-bhFtp97z.js";
|
|
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
|
+
//#endregion
|
|
6
|
+
//#region src/components/radio-list/RadioList.vue
|
|
7
|
+
var y = /* @__PURE__ */ u({
|
|
8
|
+
name: "cu-radio-list",
|
|
9
|
+
__name: "RadioList",
|
|
10
|
+
props: {
|
|
11
|
+
options: { default: () => [] },
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: [
|
|
14
|
+
String,
|
|
15
|
+
Number,
|
|
16
|
+
Boolean
|
|
17
|
+
],
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
hasInput: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
inputLabel: { default: "" },
|
|
25
|
+
inputPlaceholder: { default: "" },
|
|
26
|
+
alignCenter: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
isSlotScope: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: void 0
|
|
33
|
+
},
|
|
34
|
+
icon: { default: "checked" },
|
|
35
|
+
iconInverse: { default: "check" },
|
|
36
|
+
iconDisabled: { default: "check-disabled" },
|
|
37
|
+
iconSvg: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
},
|
|
41
|
+
iconSize: { default: "md" },
|
|
42
|
+
iconPosition: { default: "left" }
|
|
43
|
+
},
|
|
44
|
+
emits: ["update:modelValue", "change"],
|
|
45
|
+
setup(u, { expose: y, emit: b }) {
|
|
46
|
+
let x = u, S = b, C = g(), w = p(x.modelValue), T = p(!1), E = p(""), D = i(() => T.value ? E.value : w.value), O = i(() => x.isSlotScope === void 0 ? !!C.default : x.isSlotScope), k = i(() => x.isSlotScope && !x.icon), A = i(() => x.iconPosition === "right" ? "right" : "left");
|
|
47
|
+
_(() => x.modelValue, (e) => {
|
|
48
|
+
e !== w.value && (w.value = e);
|
|
49
|
+
}), _(D, (e) => {
|
|
50
|
+
S("update:modelValue", e);
|
|
51
|
+
});
|
|
52
|
+
function j(e, t) {
|
|
53
|
+
w.value = e.value, T.value = !1, E.value &&= "", S("change", e, t);
|
|
54
|
+
}
|
|
55
|
+
function M(e) {
|
|
56
|
+
w.value = e, T.value = !1;
|
|
57
|
+
}
|
|
58
|
+
function N(e) {
|
|
59
|
+
let t = x.options[e];
|
|
60
|
+
t && M(t.value);
|
|
61
|
+
}
|
|
62
|
+
return y({
|
|
63
|
+
select: M,
|
|
64
|
+
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(e, {
|
|
66
|
+
key: r,
|
|
67
|
+
class: d(["cu-radio-item", { "is-selected": w.value === n.value && !T.value }]),
|
|
68
|
+
title: O.value ? "" : n.text || n.label,
|
|
69
|
+
brief: O.value ? "" : n.brief,
|
|
70
|
+
disabled: n.disabled,
|
|
71
|
+
"no-border": r === u.options.length - 1,
|
|
72
|
+
onClick: (e) => j(n, r)
|
|
73
|
+
}, c({
|
|
74
|
+
default: v(() => [O.value ? h(i.$slots, "default", {
|
|
75
|
+
option: n,
|
|
76
|
+
index: r,
|
|
77
|
+
selected: D.value === n.value
|
|
78
|
+
}, void 0, void 0, 0) : o("", !0)]),
|
|
79
|
+
_: 2
|
|
80
|
+
}, [!u.alignCenter && !T.value && !k.value ? {
|
|
81
|
+
name: A.value,
|
|
82
|
+
fn: v(() => [l(t, {
|
|
83
|
+
name: n.value,
|
|
84
|
+
"model-value": w.value,
|
|
85
|
+
disabled: n.disabled,
|
|
86
|
+
size: u.iconSize,
|
|
87
|
+
icon: u.icon,
|
|
88
|
+
"icon-inverse": u.iconInverse,
|
|
89
|
+
"icon-disabled": u.iconDisabled,
|
|
90
|
+
"icon-svg": u.iconSvg
|
|
91
|
+
}, null, 8, [
|
|
92
|
+
"name",
|
|
93
|
+
"model-value",
|
|
94
|
+
"disabled",
|
|
95
|
+
"size",
|
|
96
|
+
"icon",
|
|
97
|
+
"icon-inverse",
|
|
98
|
+
"icon-disabled",
|
|
99
|
+
"icon-svg"
|
|
100
|
+
])]),
|
|
101
|
+
key: "0"
|
|
102
|
+
} : void 0]), 1032, [
|
|
103
|
+
"class",
|
|
104
|
+
"title",
|
|
105
|
+
"brief",
|
|
106
|
+
"disabled",
|
|
107
|
+
"no-border",
|
|
108
|
+
"onClick"
|
|
109
|
+
]))), 128)), u.hasInput ? (f(), a(n, {
|
|
110
|
+
key: 0,
|
|
111
|
+
ref: "inputItem",
|
|
112
|
+
class: d(["cu-radio-item", { "is-selected": T.value }]),
|
|
113
|
+
title: u.inputLabel,
|
|
114
|
+
placeholder: u.inputPlaceholder,
|
|
115
|
+
"model-value": E.value,
|
|
116
|
+
"onUpdate:modelValue": p[0] ||= (e) => E.value = e,
|
|
117
|
+
onFocus: p[1] ||= (e) => T.value = !0
|
|
118
|
+
}, null, 8, [
|
|
119
|
+
"class",
|
|
120
|
+
"title",
|
|
121
|
+
"placeholder",
|
|
122
|
+
"model-value"
|
|
123
|
+
])) : o("", !0)], 2));
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
//#endregion
|
|
127
|
+
export { y as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./CellItem-T78DHako.cjs"),t=require("./Radio-ZHivLdvi.cjs"),n=require("./InputItem-EJ4Y3tpU.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)(e.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)(t.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}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("vue");var t={class:`cu-activity-indicator-rolling`},n={class:`rolling-container`},r=[`viewBox`],i=[`stroke`,`stroke-width`,`cx`,`cy`,`r`],a={key:0,class:`circle`},o=[`cx`,`cy`,`fill`,`stroke`,`stroke-width`,`stroke-dasharray`,`stroke-linecap`,`r`],s=[`values`],c=[`dur`,`values`],l={class:`content`},u=2,d=(0,e.defineComponent)({name:`cu-activity-indicator-rolling`,__name:`Roller`,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},process:{default:void 0}},setup(d){let f=d,p=(0,e.computed)(()=>f.width||f.size/12),m=(0,e.computed)(()=>f.size/2),h=(0,e.computed)(()=>f.size+2*p.value),g=(0,e.computed)(()=>f.size*3.1415),_=(0,e.computed)(()=>f.process===void 0),v=(0,e.computed)(()=>`${f.process*g.value} ${(1-f.process)*g.value}`);return(f,y)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,t,[(0,e.createElementVNode)(`div`,n,[((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{viewBox:`0 0 ${h.value} ${h.value}`,style:(0,e.normalizeStyle)({width:`${d.size}px`,height:`${d.size}px`,transform:`rotateZ(${d.rotate}deg)`}),preserveAspectRatio:`xMidYMid`,class:`cu-activity-indicator-svg rolling`},[(0,e.createElementVNode)(`circle`,{fill:`none`,stroke:d.borderColor,"stroke-width":p.value,cx:h.value/2,cy:h.value/2,r:m.value},null,8,i),f.$slots.circle?(0,e.renderSlot)(f.$slots,`circle`,{},void 0,void 0,1):((0,e.openBlock)(),(0,e.createElementBlock)(`g`,a,[_.value||(d.process??0)>0?((0,e.openBlock)(),(0,e.createElementBlock)(`circle`,{key:0,class:`stroke`,cx:h.value/2,cy:h.value/2,fill:d.fill,stroke:d.color,"stroke-width":p.value,"stroke-dasharray":_.value?`${110*g.value/125}`:v.value,"stroke-linecap":d.linecap,r:m.value},[_.value?((0,e.openBlock)(),(0,e.createElementBlock)(`animate`,{key:0,attributeName:`stroke-dashoffset`,values:`${360*g.value/125};${140*g.value/125}`,dur:`2.2s`,keyTimes:`0;1`,calcMode:`spline`,fill:`freeze`,keySplines:`0.41,0.314,0.8,0.54`,repeatCount:`indefinite`,begin:`0`},null,8,s)):(0,e.createCommentVNode)(``,!0),_.value?((0,e.openBlock)(),(0,e.createElementBlock)(`animateTransform`,{key:1,dur:`${u}s`,values:`0 ${h.value/2} ${h.value/2};360 ${h.value/2} ${h.value/2}`,attributeName:`transform`,type:`rotate`,calcMode:`linear`,keyTimes:`0;1`,begin:`0`,repeatCount:`indefinite`},null,8,c)):(0,e.createCommentVNode)(``,!0)],8,o)):(0,e.createCommentVNode)(``,!0)])),(0,e.renderSlot)(f.$slots,`defs`)],12,r)),(0,e.createElementVNode)(`div`,l,[(0,e.renderSlot)(f.$slots,`default`)])])]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
//#region src/components/activity-indicator/Roller.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var c = { class: "cu-activity-indicator-rolling" }, l = { class: "rolling-container" }, u = ["viewBox"], d = [
|
|
4
|
+
"stroke",
|
|
5
|
+
"stroke-width",
|
|
6
|
+
"cx",
|
|
7
|
+
"cy",
|
|
8
|
+
"r"
|
|
9
|
+
], f = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "circle"
|
|
12
|
+
}, p = [
|
|
13
|
+
"cx",
|
|
14
|
+
"cy",
|
|
15
|
+
"fill",
|
|
16
|
+
"stroke",
|
|
17
|
+
"stroke-width",
|
|
18
|
+
"stroke-dasharray",
|
|
19
|
+
"stroke-linecap",
|
|
20
|
+
"r"
|
|
21
|
+
], m = ["values"], h = ["dur", "values"], g = { class: "content" }, _ = 2, v = /* @__PURE__ */ i({
|
|
22
|
+
name: "cu-activity-indicator-rolling",
|
|
23
|
+
__name: "Roller",
|
|
24
|
+
props: {
|
|
25
|
+
size: { default: 70 },
|
|
26
|
+
width: { default: void 0 },
|
|
27
|
+
color: { default: "#2F86F6" },
|
|
28
|
+
borderColor: { default: "rgba(0, 0, 0, .1)" },
|
|
29
|
+
fill: { default: "transparent" },
|
|
30
|
+
linecap: { default: "round" },
|
|
31
|
+
rotate: { default: 0 },
|
|
32
|
+
process: { default: void 0 }
|
|
33
|
+
},
|
|
34
|
+
setup(i) {
|
|
35
|
+
let v = i, y = e(() => v.width || v.size / 12), b = e(() => v.size / 2), x = e(() => v.size + 2 * y.value), S = e(() => v.size * 3.1415), C = e(() => v.process === void 0), w = e(() => `${v.process * S.value} ${(1 - v.process) * S.value}`);
|
|
36
|
+
return (e, v) => (o(), n("div", c, [r("div", l, [(o(), n("svg", {
|
|
37
|
+
viewBox: `0 0 ${x.value} ${x.value}`,
|
|
38
|
+
style: a({
|
|
39
|
+
width: `${i.size}px`,
|
|
40
|
+
height: `${i.size}px`,
|
|
41
|
+
transform: `rotateZ(${i.rotate}deg)`
|
|
42
|
+
}),
|
|
43
|
+
preserveAspectRatio: "xMidYMid",
|
|
44
|
+
class: "cu-activity-indicator-svg rolling"
|
|
45
|
+
}, [
|
|
46
|
+
r("circle", {
|
|
47
|
+
fill: "none",
|
|
48
|
+
stroke: i.borderColor,
|
|
49
|
+
"stroke-width": y.value,
|
|
50
|
+
cx: x.value / 2,
|
|
51
|
+
cy: x.value / 2,
|
|
52
|
+
r: b.value
|
|
53
|
+
}, null, 8, d),
|
|
54
|
+
e.$slots.circle ? s(e.$slots, "circle", {}, void 0, void 0, 1) : (o(), n("g", f, [C.value || (i.process ?? 0) > 0 ? (o(), n("circle", {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "stroke",
|
|
57
|
+
cx: x.value / 2,
|
|
58
|
+
cy: x.value / 2,
|
|
59
|
+
fill: i.fill,
|
|
60
|
+
stroke: i.color,
|
|
61
|
+
"stroke-width": y.value,
|
|
62
|
+
"stroke-dasharray": C.value ? `${110 * S.value / 125}` : w.value,
|
|
63
|
+
"stroke-linecap": i.linecap,
|
|
64
|
+
r: b.value
|
|
65
|
+
}, [C.value ? (o(), n("animate", {
|
|
66
|
+
key: 0,
|
|
67
|
+
attributeName: "stroke-dashoffset",
|
|
68
|
+
values: `${360 * S.value / 125};${140 * S.value / 125}`,
|
|
69
|
+
dur: "2.2s",
|
|
70
|
+
keyTimes: "0;1",
|
|
71
|
+
calcMode: "spline",
|
|
72
|
+
fill: "freeze",
|
|
73
|
+
keySplines: "0.41,0.314,0.8,0.54",
|
|
74
|
+
repeatCount: "indefinite",
|
|
75
|
+
begin: "0"
|
|
76
|
+
}, null, 8, m)) : t("", !0), C.value ? (o(), n("animateTransform", {
|
|
77
|
+
key: 1,
|
|
78
|
+
dur: `${_}s`,
|
|
79
|
+
values: `0 ${x.value / 2} ${x.value / 2};360 ${x.value / 2} ${x.value / 2}`,
|
|
80
|
+
attributeName: "transform",
|
|
81
|
+
type: "rotate",
|
|
82
|
+
calcMode: "linear",
|
|
83
|
+
keyTimes: "0;1",
|
|
84
|
+
begin: "0",
|
|
85
|
+
repeatCount: "indefinite"
|
|
86
|
+
}, null, 8, h)) : t("", !0)], 8, p)) : t("", !0)])),
|
|
87
|
+
s(e.$slots, "defs")
|
|
88
|
+
], 12, u)), r("div", g, [s(e.$slots, "default")])])]));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
//#endregion
|
|
92
|
+
export { v as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./Icon-jaEPn7d7.cjs"),t=require("./Roller-DALhjhfg.cjs");let n=require("vue");var r=(0,n.defineComponent)({name:`cu-activity-indicator-spinning`,__name:`Spinning`,props:{size:{default:70},color:{default:`dark`}},setup(t){return(r,i)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([`cu-activity-indicator-spinning`,{dark:t.color===`dark`}])},[(0,n.createVNode)(e.t,{class:`cu-activity-indicator-svg`,name:`spinner`,style:(0,n.normalizeStyle)({width:`${t.size}px`,height:`${t.size}px`})},null,8,[`style`])],2))}}),i=[`cx`,`cy`,`r`],a=[`values`],o=[`values`],s=(0,n.defineComponent)({name:`cu-activity-indicator-carousel-circle`,__name:`CarouselCircle`,props:{size:{default:30},index:{default:0},animateValues:{default:()=>[]}},setup(e){let t=e,r=(0,n.computed)(()=>t.index*t.size*1.5+t.size/2),s=(0,n.computed)(()=>t.animateValues.join(`;`)),c=(0,n.computed)(()=>t.animateValues.map(e=>e*t.size/2).join(`;`));return(t,l)=>((0,n.openBlock)(),(0,n.createElementBlock)(`circle`,{cx:r.value,cy:e.size/2,r:e.size/2},[(0,n.createElementVNode)(`animate`,{attributeName:`fill-opacity`,attributeType:`XML`,begin:`0s`,dur:`1s`,values:s.value,calcMode:`linear`,repeatCount:`indefinite`},null,8,a),(0,n.createElementVNode)(`animate`,{attributeName:`r`,attributeType:`XML`,begin:`0s`,dur:`1s`,values:c.value,calcMode:`linear`,repeatCount:`indefinite`},null,8,o)],8,i))}}),c={class:`cu-activity-indicator-carousel`},l=[`viewBox`,`fill`],u=(0,n.defineComponent)({name:`cu-activity-indicator-carousel`,__name:`Carousel`,props:{size:{default:30},color:{default:`#2F86F6`}},setup(e){let t=e,r=[[1,.8,.6,.6,.6,.8,1],[.6,.8,1,.8,.6,.6,.6],[.6,.6,.6,.8,1,.8,.6]],i=(0,n.computed)(()=>{let e=r.length;return e*t.size+(e-1)*t.size/2}),a=(0,n.computed)(()=>`0 0 ${i.value} ${t.size}`);return(t,o)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,c,[((0,n.openBlock)(),(0,n.createElementBlock)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:a.value,fill:e.color,style:(0,n.normalizeStyle)({width:`${i.value}px`,height:`${e.size}px`}),class:`cu-activity-indicator-svg carouseling`},[((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r,(t,r)=>(0,n.createVNode)(s,{key:`carousel-circle-${r}`,size:e.size,index:r,"animate-values":t},null,8,[`size`,`index`,`animate-values`])),64))],12,l))]))}}),d={class:`indicator-loading`},f=(0,n.defineComponent)({name:`cu-activity-indicator`,__name:`ActivityIndicator`,props:{type:{default:`roller`},size:{default:70},width:{default:void 0},color:{default:void 0},textColor:{default:`#999`},textSize:{default:void 0},vertical:{type:Boolean,default:!1}},setup(e){let i=e,a=(0,n.computed)(()=>i.color??(i.type===`spinner`?`dark`:`#2F86F6`));return(i,o)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([`cu-activity-indicator`,e.type])},[(0,n.createElementVNode)(`div`,{class:(0,n.normalizeClass)([`indicator-container`,{vertical:e.vertical}])},[(0,n.createElementVNode)(`div`,d,[e.type===`roller`?((0,n.openBlock)(),(0,n.createBlock)(t.t,{key:0,size:e.size,color:a.value,width:e.width},null,8,[`size`,`color`,`width`])):e.type===`spinner`?((0,n.openBlock)(),(0,n.createBlock)(r,{key:1,size:e.size,color:a.value},null,8,[`size`,`color`])):e.type===`carousel`?((0,n.openBlock)(),(0,n.createBlock)(u,{key:2,size:e.size,color:a.value},null,8,[`size`,`color`])):(0,n.createCommentVNode)(``,!0)]),i.$slots.default?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,style:(0,n.normalizeStyle)({fontSize:`${e.textSize}px`,color:e.textColor}),class:`cu-activity-indicator-text indicator-text`},[(0,n.renderSlot)(i.$slots,`default`)],4)):(0,n.createCommentVNode)(``,!0)],2)],2))}}),p={class:`cu-activity-indicator-rolling-success`},m={key:0,name:`circle`,slot:`circle`},h=(0,n.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(e){return(r,i)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,p,[(0,n.createVNode)(t.t,{size:e.size,width:e.strokeWidth,fill:`#FFF6F1`,"border-color":`transparent`},{default:(0,n.withCtx)(()=>[e.isSuccess?((0,n.openBlock)(),(0,n.createElementBlock)(`g`,m,[...i[0]||=[(0,n.createElementVNode)(`circle`,{class:`success`,cx:`50`,cy:`50`,fill:`#FFF6F1`,stroke:`none`,r:`40`},null,-1)]])):(0,n.createCommentVNode)(``,!0),e.isSuccess?((0,n.openBlock)(),(0,n.createElementBlock)(`svg`,{key:1,viewBox:`0 0 100 100`,preserveAspectRatio:`xMidYMid`,class:`right`,style:(0,n.normalizeStyle)({transform:`translate(-50%, -50%) scale(${e.size/70})`})},[(0,n.createElementVNode)(`g`,null,[(0,n.createElementVNode)(`line`,{x1:`32`,y1:`47`,x2:`45`,y2:`62`,style:(0,n.normalizeStyle)({strokeWidth:e.strokeWidth,stroke:e.color}),"stroke-dasharray":`20`},null,4),(0,n.createElementVNode)(`line`,{x1:`42`,y1:`62`,x2:`68.4`,y2:`40`,style:(0,n.normalizeStyle)({strokeWidth:e.strokeWidth,stroke:e.color}),"stroke-dasharray":`35`},null,4)])],4)):(0,n.createCommentVNode)(``,!0)]),_:1},8,[`size`,`width`])]))}});Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|