btt-ui 1.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/README.md +16 -0
- package/es/_virtual/plugin-vue_export-helper.mjs +9 -0
- package/es/assets/ts/colormap.mjs +5073 -0
- package/es/assets/ts/hotMap.mjs +87 -0
- package/es/assets/ts/utils.mjs +46 -0
- package/es/index.mjs +68 -0
- package/es/src/button/index.mjs +7 -0
- package/es/src/button/src/button.mjs +59 -0
- package/es/src/button/src/style/index.css +212 -0
- package/es/src/button/src/style/variable.css +0 -0
- package/es/src/card/index.mjs +7 -0
- package/es/src/card/src/card.mjs +43 -0
- package/es/src/card/src/style/index.css +81 -0
- package/es/src/checkbox/index.mjs +9 -0
- package/es/src/checkbox/src/checkbox-group.mjs +36 -0
- package/es/src/checkbox/src/checkbox.mjs +33 -0
- package/es/src/checkbox/src/checkbox2.mjs +68 -0
- package/es/src/checkbox/src/style/index.css +111 -0
- package/es/src/collapse/index.mjs +9 -0
- package/es/src/collapse/src/collapse-item.mjs +82 -0
- package/es/src/collapse/src/collapse.mjs +13 -0
- package/es/src/collapse/src/collapse2.mjs +33 -0
- package/es/src/collapse/src/style/index.css +58 -0
- package/es/src/collapse-transition/index.mjs +7 -0
- package/es/src/collapse-transition/src/collapse-transition.mjs +41 -0
- package/es/src/collapse-transition/src/collapse-transition.vue_vue_type_style_index_0_lang.mjs +4 -0
- package/es/src/dialog/index.mjs +6 -0
- package/es/src/dialog/src/dialog.mjs +117 -0
- package/es/src/dialog/src/style/index.css +58 -0
- package/es/src/directives/bubble.mjs +48 -0
- package/es/src/directives/drag.mjs +121 -0
- package/es/src/directives/index.mjs +10 -0
- package/es/src/directives/zoomIn.mjs +43 -0
- package/es/src/drag/index.mjs +7 -0
- package/es/src/drag/src/drag.mjs +78 -0
- package/es/src/drag/src/style/index.css +25 -0
- package/es/src/echarts/index.mjs +7 -0
- package/es/src/echarts/src/index.mjs +113 -0
- package/es/src/echarts/src/style/index.css +30 -0
- package/es/src/echarts/src/ts/factory.mjs +281 -0
- package/es/src/hotmap/index.mjs +7 -0
- package/es/src/hotmap/src/index.mjs +67 -0
- package/es/src/hotmap/src/style/index.css +0 -0
- package/es/src/icon/index.mjs +9 -0
- package/es/src/icon/src/icon.mjs +66 -0
- package/es/src/icon/src/icon2.mjs +86 -0
- package/es/src/icon/src/style/index.css +85 -0
- package/es/src/icon/src/svg/alarm.mjs +4 -0
- package/es/src/icon/src/svg/arrow-down.mjs +4 -0
- package/es/src/icon/src/svg/arrow-left.mjs +4 -0
- package/es/src/icon/src/svg/arrow-right.mjs +4 -0
- package/es/src/icon/src/svg/arrow-up.mjs +4 -0
- package/es/src/icon/src/svg/baocun.mjs +4 -0
- package/es/src/icon/src/svg/caogaoxiang.mjs +4 -0
- package/es/src/icon/src/svg/card.mjs +4 -0
- package/es/src/icon/src/svg/caret-right.mjs +4 -0
- package/es/src/icon/src/svg/chakan.mjs +45 -0
- package/es/src/icon/src/svg/change.mjs +4 -0
- package/es/src/icon/src/svg/chongzhi.mjs +18 -0
- package/es/src/icon/src/svg/circle-close.mjs +4 -0
- package/es/src/icon/src/svg/close.mjs +4 -0
- package/es/src/icon/src/svg/delete.mjs +4 -0
- package/es/src/icon/src/svg/detail.mjs +4 -0
- package/es/src/icon/src/svg/dianhua.mjs +22 -0
- package/es/src/icon/src/svg/disabled.mjs +4 -0
- package/es/src/icon/src/svg/down.mjs +4 -0
- package/es/src/icon/src/svg/download.mjs +12 -0
- package/es/src/icon/src/svg/edit.mjs +4 -0
- package/es/src/icon/src/svg/editor.mjs +4 -0
- package/es/src/icon/src/svg/enable.mjs +4 -0
- package/es/src/icon/src/svg/exit.mjs +4 -0
- package/es/src/icon/src/svg/file-open.mjs +4 -0
- package/es/src/icon/src/svg/handle.mjs +4 -0
- package/es/src/icon/src/svg/lahei.mjs +20 -0
- package/es/src/icon/src/svg/max.mjs +4 -0
- package/es/src/icon/src/svg/measure.mjs +4 -0
- package/es/src/icon/src/svg/min.mjs +4 -0
- package/es/src/icon/src/svg/nan.mjs +17 -0
- package/es/src/icon/src/svg/no.mjs +16 -0
- package/es/src/icon/src/svg/nv.mjs +19 -0
- package/es/src/icon/src/svg/people.mjs +4 -0
- package/es/src/icon/src/svg/player.mjs +19 -0
- package/es/src/icon/src/svg/plus.mjs +4 -0
- package/es/src/icon/src/svg/preview.mjs +44 -0
- package/es/src/icon/src/svg/print.mjs +12 -0
- package/es/src/icon/src/svg/printmb.mjs +4 -0
- package/es/src/icon/src/svg/publish.mjs +4 -0
- package/es/src/icon/src/svg/qiye.mjs +4 -0
- package/es/src/icon/src/svg/quxiao.mjs +4 -0
- package/es/src/icon/src/svg/record.mjs +4 -0
- package/es/src/icon/src/svg/refresh.mjs +4 -0
- package/es/src/icon/src/svg/reset.mjs +4 -0
- package/es/src/icon/src/svg/risk.mjs +4 -0
- package/es/src/icon/src/svg/search.mjs +4 -0
- package/es/src/icon/src/svg/set.mjs +4 -0
- package/es/src/icon/src/svg/shenhe.mjs +4 -0
- package/es/src/icon/src/svg/shenqing.mjs +4 -0
- package/es/src/icon/src/svg/tongbu.mjs +18 -0
- package/es/src/icon/src/svg/up.mjs +4 -0
- package/es/src/icon/src/svg/upload.mjs +9 -0
- package/es/src/icon/src/svg/urging.mjs +4 -0
- package/es/src/icon/src/svg/yes.mjs +18 -0
- package/es/src/icon/src/svg/yuyue.mjs +4 -0
- package/es/src/index.mjs +80 -0
- package/es/src/input/index.mjs +7 -0
- package/es/src/input/src/input.mjs +119 -0
- package/es/src/input/src/style/index.css +52 -0
- package/es/src/link/index.mjs +6 -0
- package/es/src/link/link.mjs +30 -0
- package/es/src/link/style/index.css +44 -0
- package/es/src/link/types.mjs +14 -0
- package/es/src/overlay/index.mjs +7 -0
- package/es/src/overlay/src/overlay.mjs +36 -0
- package/es/src/overlay/src/style/index.css +19 -0
- package/es/src/popper/index.mjs +7 -0
- package/es/src/popper/src/forward-ref.mjs +27 -0
- package/es/src/popper/src/popper.mjs +93 -0
- package/es/src/popper/src/popper2.mjs +100 -0
- package/es/src/popper/src/style/index.css +67 -0
- package/es/src/popper/src/trigger.mjs +68 -0
- package/es/src/popper/src/use-floating.mjs +38 -0
- package/es/src/popper/src/use-nowrap.mjs +13 -0
- package/es/src/popper/src/use-popper-container.mjs +14 -0
- package/es/src/scroll/index.mjs +6 -0
- package/es/src/scroll/src/scroll.mjs +88 -0
- package/es/src/scroll/src/style/index.css +46 -0
- package/es/src/select/index.mjs +9 -0
- package/es/src/select/src/option.mjs +30 -0
- package/es/src/select/src/select.mjs +32 -0
- package/es/src/select/src/select2.mjs +89 -0
- package/es/src/select/src/style/index.css +82 -0
- package/es/src/shake/index.mjs +6 -0
- package/es/src/shake/shake.mjs +25 -0
- package/es/src/shake/style/index.css +20 -0
- package/es/src/sign/index.mjs +7 -0
- package/es/src/sign/src/sign.mjs +137 -0
- package/es/src/sign/src/style/index.css +0 -0
- package/es/src/style/common.css +2518 -0
- package/es/src/style/css-variables.css +88 -0
- package/es/src/style/index.min.css +2254 -0
- package/es/src/style/previewimg.css +109 -0
- package/es/src/style/var.css +5 -0
- package/es/src/style/zoomimg.css +36 -0
- package/es/src/switch/index.mjs +7 -0
- package/es/src/switch/src/style/index.css +96 -0
- package/es/src/switch/src/switch.mjs +79 -0
- package/es/src/tableScroll/index.mjs +7 -0
- package/es/src/tableScroll/src/index.mjs +235 -0
- package/es/src/timeline/index.mjs +7 -0
- package/es/src/timeline/src/style/index.css +63 -0
- package/es/src/timeline/src/timeline.mjs +96 -0
- package/es/src/toast/index.mjs +6 -0
- package/es/src/toast/style/index.css +13 -0
- package/es/src/toast/toast.mjs +17 -0
- package/es/src/tooltip/index.mjs +7 -0
- package/es/src/tooltip/src/style/index.css +4 -0
- package/es/src/tooltip/src/tooltip.mjs +50 -0
- package/es/src/tooltip/src/tooltip2.mjs +22 -0
- package/es/src/tree/index.mjs +7 -0
- package/es/src/tree/src/style/index.css +154 -0
- package/es/src/tree/src/tree.mjs +233 -0
- package/es/src/tree/src/tree2.mjs +67 -0
- package/es/src/tree/src/use-drag.mjs +52 -0
- package/es/src/upload/dragger.mjs +51 -0
- package/es/src/upload/index.mjs +6 -0
- package/es/src/upload/style/drag.css +36 -0
- package/es/src/upload/style/index.css +40 -0
- package/es/src/upload/upload.mjs +76 -0
- package/es/src/uploadFile/index.mjs +6 -0
- package/es/src/uploadFile/src/style/index.css +131 -0
- package/es/src/uploadFile/src/uploadFile.mjs +209 -0
- package/es/src/uploadFile/src/uploadFile2.mjs +17 -0
- package/es/src/wheel/index.mjs +6 -0
- package/es/src/wheel/style/index.css +5 -0
- package/es/src/wheel/wheel.mjs +45 -0
- package/es/src/xgplayer/src/style/index.css +6 -0
- package/es/style.css +1 -0
- package/lib/_virtual/plugin-vue_export-helper.js +1 -0
- package/lib/assets/ts/colormap.js +1 -0
- package/lib/assets/ts/hotMap.js +1 -0
- package/lib/assets/ts/utils.js +1 -0
- package/lib/index.js +1 -0
- package/lib/src/button/index.js +1 -0
- package/lib/src/button/src/button.js +1 -0
- package/lib/src/button/src/style/index.css +212 -0
- package/lib/src/button/src/style/variable.css +0 -0
- package/lib/src/card/index.js +1 -0
- package/lib/src/card/src/card.js +1 -0
- package/lib/src/card/src/style/index.css +81 -0
- package/lib/src/checkbox/index.js +1 -0
- package/lib/src/checkbox/src/checkbox-group.js +1 -0
- package/lib/src/checkbox/src/checkbox.js +1 -0
- package/lib/src/checkbox/src/checkbox2.js +1 -0
- package/lib/src/checkbox/src/style/index.css +111 -0
- package/lib/src/collapse/index.js +1 -0
- package/lib/src/collapse/src/collapse-item.js +1 -0
- package/lib/src/collapse/src/collapse.js +1 -0
- package/lib/src/collapse/src/collapse2.js +1 -0
- package/lib/src/collapse/src/style/index.css +58 -0
- package/lib/src/collapse-transition/index.js +1 -0
- package/lib/src/collapse-transition/src/collapse-transition.js +1 -0
- package/lib/src/collapse-transition/src/collapse-transition.vue_vue_type_style_index_0_lang.js +1 -0
- package/lib/src/dialog/index.js +1 -0
- package/lib/src/dialog/src/dialog.js +1 -0
- package/lib/src/dialog/src/style/index.css +58 -0
- package/lib/src/directives/bubble.js +1 -0
- package/lib/src/directives/drag.js +1 -0
- package/lib/src/directives/index.js +1 -0
- package/lib/src/directives/zoomIn.js +1 -0
- package/lib/src/drag/index.js +1 -0
- package/lib/src/drag/src/drag.js +1 -0
- package/lib/src/drag/src/style/index.css +25 -0
- package/lib/src/echarts/index.js +1 -0
- package/lib/src/echarts/src/index.js +1 -0
- package/lib/src/echarts/src/style/index.css +30 -0
- package/lib/src/echarts/src/ts/factory.js +1 -0
- package/lib/src/hotmap/index.js +1 -0
- package/lib/src/hotmap/src/index.js +1 -0
- package/lib/src/hotmap/src/style/index.css +0 -0
- package/lib/src/icon/index.js +1 -0
- package/lib/src/icon/src/icon.js +1 -0
- package/lib/src/icon/src/icon2.js +1 -0
- package/lib/src/icon/src/style/index.css +85 -0
- package/lib/src/icon/src/svg/alarm.js +1 -0
- package/lib/src/icon/src/svg/arrow-down.js +1 -0
- package/lib/src/icon/src/svg/arrow-left.js +1 -0
- package/lib/src/icon/src/svg/arrow-right.js +1 -0
- package/lib/src/icon/src/svg/arrow-up.js +1 -0
- package/lib/src/icon/src/svg/baocun.js +1 -0
- package/lib/src/icon/src/svg/caogaoxiang.js +1 -0
- package/lib/src/icon/src/svg/card.js +1 -0
- package/lib/src/icon/src/svg/caret-right.js +1 -0
- package/lib/src/icon/src/svg/chakan.js +42 -0
- package/lib/src/icon/src/svg/change.js +1 -0
- package/lib/src/icon/src/svg/chongzhi.js +15 -0
- package/lib/src/icon/src/svg/circle-close.js +1 -0
- package/lib/src/icon/src/svg/close.js +1 -0
- package/lib/src/icon/src/svg/delete.js +1 -0
- package/lib/src/icon/src/svg/detail.js +1 -0
- package/lib/src/icon/src/svg/dianhua.js +19 -0
- package/lib/src/icon/src/svg/disabled.js +1 -0
- package/lib/src/icon/src/svg/down.js +1 -0
- package/lib/src/icon/src/svg/download.js +9 -0
- package/lib/src/icon/src/svg/edit.js +1 -0
- package/lib/src/icon/src/svg/editor.js +1 -0
- package/lib/src/icon/src/svg/enable.js +1 -0
- package/lib/src/icon/src/svg/exit.js +1 -0
- package/lib/src/icon/src/svg/file-open.js +1 -0
- package/lib/src/icon/src/svg/handle.js +1 -0
- package/lib/src/icon/src/svg/lahei.js +17 -0
- package/lib/src/icon/src/svg/max.js +1 -0
- package/lib/src/icon/src/svg/measure.js +1 -0
- package/lib/src/icon/src/svg/min.js +1 -0
- package/lib/src/icon/src/svg/nan.js +14 -0
- package/lib/src/icon/src/svg/no.js +13 -0
- package/lib/src/icon/src/svg/nv.js +16 -0
- package/lib/src/icon/src/svg/people.js +1 -0
- package/lib/src/icon/src/svg/player.js +16 -0
- package/lib/src/icon/src/svg/plus.js +1 -0
- package/lib/src/icon/src/svg/preview.js +41 -0
- package/lib/src/icon/src/svg/print.js +9 -0
- package/lib/src/icon/src/svg/printmb.js +1 -0
- package/lib/src/icon/src/svg/publish.js +1 -0
- package/lib/src/icon/src/svg/qiye.js +1 -0
- package/lib/src/icon/src/svg/quxiao.js +1 -0
- package/lib/src/icon/src/svg/record.js +1 -0
- package/lib/src/icon/src/svg/refresh.js +1 -0
- package/lib/src/icon/src/svg/reset.js +1 -0
- package/lib/src/icon/src/svg/risk.js +1 -0
- package/lib/src/icon/src/svg/search.js +1 -0
- package/lib/src/icon/src/svg/set.js +1 -0
- package/lib/src/icon/src/svg/shenhe.js +1 -0
- package/lib/src/icon/src/svg/shenqing.js +1 -0
- package/lib/src/icon/src/svg/tongbu.js +15 -0
- package/lib/src/icon/src/svg/up.js +1 -0
- package/lib/src/icon/src/svg/upload.js +6 -0
- package/lib/src/icon/src/svg/urging.js +1 -0
- package/lib/src/icon/src/svg/yes.js +15 -0
- package/lib/src/icon/src/svg/yuyue.js +1 -0
- package/lib/src/index.js +1 -0
- package/lib/src/input/index.js +1 -0
- package/lib/src/input/src/input.js +1 -0
- package/lib/src/input/src/style/index.css +52 -0
- package/lib/src/link/index.js +1 -0
- package/lib/src/link/link.js +1 -0
- package/lib/src/link/style/index.css +44 -0
- package/lib/src/link/types.js +1 -0
- package/lib/src/overlay/index.js +1 -0
- package/lib/src/overlay/src/overlay.js +1 -0
- package/lib/src/overlay/src/style/index.css +19 -0
- package/lib/src/popper/index.js +1 -0
- package/lib/src/popper/src/forward-ref.js +1 -0
- package/lib/src/popper/src/popper.js +1 -0
- package/lib/src/popper/src/popper2.js +1 -0
- package/lib/src/popper/src/style/index.css +67 -0
- package/lib/src/popper/src/trigger.js +1 -0
- package/lib/src/popper/src/use-floating.js +1 -0
- package/lib/src/popper/src/use-nowrap.js +1 -0
- package/lib/src/popper/src/use-popper-container.js +1 -0
- package/lib/src/scroll/index.js +1 -0
- package/lib/src/scroll/src/scroll.js +1 -0
- package/lib/src/scroll/src/style/index.css +46 -0
- package/lib/src/select/index.js +1 -0
- package/lib/src/select/src/option.js +1 -0
- package/lib/src/select/src/select.js +1 -0
- package/lib/src/select/src/select2.js +1 -0
- package/lib/src/select/src/style/index.css +82 -0
- package/lib/src/shake/index.js +1 -0
- package/lib/src/shake/shake.js +1 -0
- package/lib/src/shake/style/index.css +20 -0
- package/lib/src/sign/index.js +1 -0
- package/lib/src/sign/src/sign.js +1 -0
- package/lib/src/sign/src/style/index.css +0 -0
- package/lib/src/style/common.css +2518 -0
- package/lib/src/style/css-variables.css +88 -0
- package/lib/src/style/index.min.css +2254 -0
- package/lib/src/style/previewimg.css +109 -0
- package/lib/src/style/var.css +5 -0
- package/lib/src/style/zoomimg.css +36 -0
- package/lib/src/switch/index.js +1 -0
- package/lib/src/switch/src/style/index.css +96 -0
- package/lib/src/switch/src/switch.js +1 -0
- package/lib/src/tableScroll/index.js +1 -0
- package/lib/src/tableScroll/src/index.js +1 -0
- package/lib/src/timeline/index.js +1 -0
- package/lib/src/timeline/src/style/index.css +63 -0
- package/lib/src/timeline/src/timeline.js +1 -0
- package/lib/src/toast/index.js +1 -0
- package/lib/src/toast/style/index.css +13 -0
- package/lib/src/toast/toast.js +1 -0
- package/lib/src/tooltip/index.js +1 -0
- package/lib/src/tooltip/src/style/index.css +4 -0
- package/lib/src/tooltip/src/tooltip.js +1 -0
- package/lib/src/tooltip/src/tooltip2.js +1 -0
- package/lib/src/tree/index.js +1 -0
- package/lib/src/tree/src/style/index.css +154 -0
- package/lib/src/tree/src/tree.js +1 -0
- package/lib/src/tree/src/tree2.js +1 -0
- package/lib/src/tree/src/use-drag.js +1 -0
- package/lib/src/upload/dragger.js +1 -0
- package/lib/src/upload/index.js +1 -0
- package/lib/src/upload/style/drag.css +36 -0
- package/lib/src/upload/style/index.css +40 -0
- package/lib/src/upload/upload.js +1 -0
- package/lib/src/uploadFile/index.js +1 -0
- package/lib/src/uploadFile/src/style/index.css +131 -0
- package/lib/src/uploadFile/src/uploadFile.js +1 -0
- package/lib/src/uploadFile/src/uploadFile2.js +1 -0
- package/lib/src/wheel/index.js +1 -0
- package/lib/src/wheel/style/index.css +5 -0
- package/lib/src/wheel/wheel.js +1 -0
- package/lib/src/xgplayer/src/style/index.css +6 -0
- package/package.json +31 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as m, inject as V, computed as g, openBlock as C, createElementBlock as x, normalizeClass as t, unref as n, withModifiers as y, createElementVNode as u, renderSlot as N, createTextVNode as _, toDisplayString as w } from "vue";
|
|
2
|
+
import { createNamespace as B } from "../../../assets/ts/utils.mjs";
|
|
3
|
+
import { CheckboxProps as E, checkboxGroupContextKey as S } from "./checkbox.mjs";
|
|
4
|
+
import "./style/index.css";
|
|
5
|
+
const j = ["value", "disabled"], z = m({
|
|
6
|
+
name: "k-checkbox"
|
|
7
|
+
}), M = m({
|
|
8
|
+
...z,
|
|
9
|
+
props: E,
|
|
10
|
+
emits: ["update:modelValue"],
|
|
11
|
+
setup(b, { emit: f }) {
|
|
12
|
+
const a = b, k = f, { n: s } = B("checkbox"), l = V(S, void 0), i = g({
|
|
13
|
+
get: () => {
|
|
14
|
+
var e;
|
|
15
|
+
return l && l.group ? (e = l.modelValue) == null ? void 0 : e.value.some((r) => r === a.label) : a.modelValue;
|
|
16
|
+
},
|
|
17
|
+
set: (e) => {
|
|
18
|
+
var o, r, p;
|
|
19
|
+
if (l && l.group) {
|
|
20
|
+
const d = l;
|
|
21
|
+
if (e)
|
|
22
|
+
(p = d.modelValue) == null || p.value.push(a.label);
|
|
23
|
+
else {
|
|
24
|
+
const h = (o = d.modelValue) == null ? void 0 : o.value.findIndex((v) => v === a.label);
|
|
25
|
+
(r = d.modelValue) == null || r.value.splice(h, 1);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
k("update:modelValue", e);
|
|
29
|
+
}
|
|
30
|
+
}), c = () => {
|
|
31
|
+
if (a.disabled)
|
|
32
|
+
return;
|
|
33
|
+
const e = !i.value;
|
|
34
|
+
i.value = e;
|
|
35
|
+
};
|
|
36
|
+
return (e, o) => (C(), x("label", {
|
|
37
|
+
class: t([n(s)(), { "is-checked": i.value, "is-disabled": e.disabled, "is-indeterminate": e.indeterminate }]),
|
|
38
|
+
onClick: o[0] || (o[0] = y(() => {
|
|
39
|
+
}, ["stop"]))
|
|
40
|
+
}, [
|
|
41
|
+
u("span", {
|
|
42
|
+
class: t([n(s)("input")])
|
|
43
|
+
}, [
|
|
44
|
+
u("input", {
|
|
45
|
+
class: t([n(s)("original")]),
|
|
46
|
+
type: "checkbox",
|
|
47
|
+
value: i.value,
|
|
48
|
+
disabled: e.disabled
|
|
49
|
+
}, null, 10, j),
|
|
50
|
+
u("span", {
|
|
51
|
+
class: t(n(s)("inner")),
|
|
52
|
+
onClick: c
|
|
53
|
+
}, null, 2)
|
|
54
|
+
], 2),
|
|
55
|
+
u("span", {
|
|
56
|
+
class: t([n(s)("label")]),
|
|
57
|
+
onClick: c
|
|
58
|
+
}, [
|
|
59
|
+
N(e.$slots, "default", {}, () => [
|
|
60
|
+
_(w(e.label), 1)
|
|
61
|
+
])
|
|
62
|
+
], 2)
|
|
63
|
+
], 2));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
M as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.k-checkbox {
|
|
2
|
+
--k-checkbox-checked-text-color: var(--k-color-primary);
|
|
3
|
+
--k-checkbox-checked-bg-color: var(--k-color-primary);
|
|
4
|
+
--k-checkbox-checked-input-border-color: var(--k-color-primary);
|
|
5
|
+
--k-checkbox-checked-icon-color: var(--k-color-white);
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
margin-right: 30px;
|
|
10
|
+
-webkit-user-select: none;
|
|
11
|
+
-moz-user-select: none;
|
|
12
|
+
user-select: none;
|
|
13
|
+
}
|
|
14
|
+
.k-checkbox.is-checked:not(.is-indeterminate) .k-checkbox__label {
|
|
15
|
+
color: var(--k-checkbox-checked-text-color);
|
|
16
|
+
}
|
|
17
|
+
.k-checkbox.is-checked:not(.is-indeterminate) .k-checkbox__inner {
|
|
18
|
+
background-color: var(--k-checkbox-checked-bg-color);
|
|
19
|
+
border-color: var(--k-checkbox-checked-input-border-color);
|
|
20
|
+
}
|
|
21
|
+
.k-checkbox.is-checked:not(.is-indeterminate) .k-checkbox__inner::after {
|
|
22
|
+
transform: rotate(45deg) scaleY(1);
|
|
23
|
+
}
|
|
24
|
+
.k-checkbox.is-indeterminate .k-checkbox__inner {
|
|
25
|
+
background-color: var(--k-checkbox-checked-bg-color);
|
|
26
|
+
border-color: var(--k-checkbox-checked-input-border-color);
|
|
27
|
+
}
|
|
28
|
+
.k-checkbox.is-indeterminate .k-checkbox__inner::after {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
.k-checkbox.is-indeterminate .k-checkbox__inner::before {
|
|
32
|
+
content: "";
|
|
33
|
+
position: absolute;
|
|
34
|
+
display: block;
|
|
35
|
+
background-color: var(--k-checkbox-checked-icon-color);
|
|
36
|
+
height: 2px;
|
|
37
|
+
transform: scale(0.5);
|
|
38
|
+
left: 0;
|
|
39
|
+
right: 0;
|
|
40
|
+
top: 5px;
|
|
41
|
+
}
|
|
42
|
+
.k-checkbox.is-disabled {
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
.k-checkbox.is-disabled .k-checkbox__label {
|
|
46
|
+
padding: 0 0 0 8px;
|
|
47
|
+
color: var(--k-disabled-text-color);
|
|
48
|
+
}
|
|
49
|
+
.k-checkbox.is-disabled .k-checkbox__input,
|
|
50
|
+
.k-checkbox.is-disabled .k-checkbox__inner {
|
|
51
|
+
background-color: var(--k-disabled-bg-color);
|
|
52
|
+
border-color: var(--k-disabled-border-color);
|
|
53
|
+
}
|
|
54
|
+
.k-checkbox:last-of-type {
|
|
55
|
+
margin-right: 0;
|
|
56
|
+
}
|
|
57
|
+
.k-checkbox__input {
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
outline: none;
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
position: relative;
|
|
63
|
+
width: 14px;
|
|
64
|
+
height: 14px;
|
|
65
|
+
}
|
|
66
|
+
.k-checkbox__inner {
|
|
67
|
+
position: absolute;
|
|
68
|
+
width: 14px;
|
|
69
|
+
height: 14px;
|
|
70
|
+
border: var(--k-border);
|
|
71
|
+
border-radius: 2px;
|
|
72
|
+
transition: all 0.2s;
|
|
73
|
+
text-align: center;
|
|
74
|
+
line-height: 14px;
|
|
75
|
+
color: #fff;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
z-index: 88;
|
|
78
|
+
top: 0;
|
|
79
|
+
z-index: 99;
|
|
80
|
+
background: #fff;
|
|
81
|
+
}
|
|
82
|
+
.k-checkbox__inner::after {
|
|
83
|
+
box-sizing: content-box;
|
|
84
|
+
content: "";
|
|
85
|
+
border: 1px solid var(--k-checkbox-checked-icon-color);
|
|
86
|
+
border-left: 0;
|
|
87
|
+
border-top: 0;
|
|
88
|
+
height: 7px;
|
|
89
|
+
left: 4px;
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 1px;
|
|
92
|
+
transform: rotate(45deg) scaleY(1);
|
|
93
|
+
width: 3px;
|
|
94
|
+
transition: transform 0.15s ease-in 0.05s;
|
|
95
|
+
transform-origin: center;
|
|
96
|
+
}
|
|
97
|
+
.k-checkbox__inner .k-icon {
|
|
98
|
+
transform: translateY(-1px);
|
|
99
|
+
}
|
|
100
|
+
.k-checkbox__original {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
outline: none;
|
|
103
|
+
position: absolute;
|
|
104
|
+
margin: 0;
|
|
105
|
+
width: 0;
|
|
106
|
+
height: 0;
|
|
107
|
+
z-index: -1;
|
|
108
|
+
}
|
|
109
|
+
.k-checkbox__label {
|
|
110
|
+
padding: 0 0 0 8px;
|
|
111
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as m, inject as f, computed as u, openBlock as v, createElementBlock as g, normalizeClass as s, unref as t, createElementVNode as i, renderSlot as c, createTextVNode as y, toDisplayString as b, createVNode as d, Transition as w, mergeProps as k, toHandlers as C, withCtx as N, withDirectives as x, vShow as H } from "vue";
|
|
2
|
+
import { createNamespace as S } from "../../../assets/ts/utils.mjs";
|
|
3
|
+
import { collapseContextKey as _ } from "./collapse.mjs";
|
|
4
|
+
import { Icon as B } from "../../icon/index.mjs";
|
|
5
|
+
import "./style/index.css";
|
|
6
|
+
const E = m({
|
|
7
|
+
name: "k-collapse-item"
|
|
8
|
+
}), z = m({
|
|
9
|
+
...E,
|
|
10
|
+
props: {
|
|
11
|
+
title: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
type: [String, Number],
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
disabled: {
|
|
20
|
+
type: Boolean
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(o) {
|
|
24
|
+
const l = f(_), n = o, r = u(() => l == null ? void 0 : l.activeNames.value.includes(n.name)), { n: a } = S("collapse-item");
|
|
25
|
+
function p() {
|
|
26
|
+
n.disabled || l == null || l.handleItemClick(n.name);
|
|
27
|
+
}
|
|
28
|
+
const h = {
|
|
29
|
+
beforeEnter(e) {
|
|
30
|
+
e.style.height = "0px";
|
|
31
|
+
},
|
|
32
|
+
enter(e) {
|
|
33
|
+
e.scrollHeight !== 0 ? e.style.height = e.scrollHeight + "px" : e.style.height = "0px";
|
|
34
|
+
},
|
|
35
|
+
beforeLeave(e) {
|
|
36
|
+
e.style.height = `${e.scrollHeight}px`, e.style.overflow = "hidden";
|
|
37
|
+
},
|
|
38
|
+
leave(e) {
|
|
39
|
+
e.scrollHeight !== 0 && (e.style.height = "0px");
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
return (e, V) => (v(), g("div", {
|
|
43
|
+
class: s([t(a)(), { "is-active": r.value, "is-disabled": o.disabled }])
|
|
44
|
+
}, [
|
|
45
|
+
i("div", {
|
|
46
|
+
class: s([t(a)("tab")]),
|
|
47
|
+
onClick: p
|
|
48
|
+
}, [
|
|
49
|
+
i("div", {
|
|
50
|
+
class: s([t(a)("tab__head")])
|
|
51
|
+
}, [
|
|
52
|
+
c(e.$slots, "title", {}, () => [
|
|
53
|
+
y(b(o.title), 1)
|
|
54
|
+
]),
|
|
55
|
+
d(t(B), {
|
|
56
|
+
class: s([t(a)("arrow"), { "is-active": r.value }]),
|
|
57
|
+
name: "arrow-right"
|
|
58
|
+
}, null, 8, ["class"])
|
|
59
|
+
], 2)
|
|
60
|
+
], 2),
|
|
61
|
+
d(w, k({ name: "k-collapse" }, C(h)), {
|
|
62
|
+
default: N(() => [
|
|
63
|
+
x(i("div", {
|
|
64
|
+
class: s([t(a)("wrap")])
|
|
65
|
+
}, [
|
|
66
|
+
i("div", {
|
|
67
|
+
class: s([t(a)("content")])
|
|
68
|
+
}, [
|
|
69
|
+
c(e.$slots, "default")
|
|
70
|
+
], 2)
|
|
71
|
+
], 2), [
|
|
72
|
+
[H, r.value]
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
75
|
+
_: 3
|
|
76
|
+
}, 16)
|
|
77
|
+
], 2));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
z as default
|
|
82
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineComponent as s, computed as d, provide as u, openBlock as m, createElementBlock as p, normalizeClass as f, unref as v, renderSlot as _ } from "vue";
|
|
2
|
+
import { createNamespace as C } from "../../../assets/ts/utils.mjs";
|
|
3
|
+
import { CollapseProps as V, collapseContextKey as h } from "./collapse.mjs";
|
|
4
|
+
import "./style/index.css";
|
|
5
|
+
const k = s({
|
|
6
|
+
name: "k-collapse"
|
|
7
|
+
}), B = s({
|
|
8
|
+
...k,
|
|
9
|
+
props: V,
|
|
10
|
+
emits: ["update:modelValue", "change"],
|
|
11
|
+
setup(c, { emit: n }) {
|
|
12
|
+
const l = c, t = n, { n: i } = C("collapse"), o = d({
|
|
13
|
+
get: () => Array.isArray(l.modelValue) && !l.accordion ? l.modelValue : [l.modelValue],
|
|
14
|
+
set: (e) => {
|
|
15
|
+
l.accordion ? t("update:modelValue", e[0]) : t("update:modelValue", [...e]), t("change", e);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return u(h, {
|
|
19
|
+
activeNames: o,
|
|
20
|
+
handleItemClick: (e) => {
|
|
21
|
+
const a = o.value.findIndex((r) => r === e);
|
|
22
|
+
l.accordion ? o.value = a === -1 ? [e] : [] : a === -1 ? o.value = [...o.value, e] : o.value = o.value.filter((r) => r !== e);
|
|
23
|
+
}
|
|
24
|
+
}), (e, a) => (m(), p("div", {
|
|
25
|
+
class: f([v(i)()])
|
|
26
|
+
}, [
|
|
27
|
+
_(e.$slots, "default")
|
|
28
|
+
], 2));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
B as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.k-collapse {
|
|
2
|
+
--k-collapse-header-height: 48px;
|
|
3
|
+
--k-collapse-header-font-size: 13px;
|
|
4
|
+
--k-collapse-bg-color: var(--k-color-white);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.k-collapse-item.is-active .k-collapse-item__tab .k-collapse-item__tab__head {
|
|
8
|
+
border-bottom-color: transparent;
|
|
9
|
+
}
|
|
10
|
+
.k-collapse-item.is-active .k-collapse-item__arrow {
|
|
11
|
+
transform: rotate(90deg);
|
|
12
|
+
}
|
|
13
|
+
.k-collapse-item.is-disabled {
|
|
14
|
+
cursor: not-allowed;
|
|
15
|
+
background-color: var(--k-disabled-bg-color);
|
|
16
|
+
}
|
|
17
|
+
.k-collapse-item.is-disabled .k-collapse-item__tab .k-collapse-item__tab__head,
|
|
18
|
+
.k-collapse-item.is-disabled .k-collapse-item__wrap {
|
|
19
|
+
color: var(--k-disabled-text-color);
|
|
20
|
+
background-color: var(--k-disabled-bg-color);
|
|
21
|
+
}
|
|
22
|
+
.k-collapse-item__tab__head {
|
|
23
|
+
touch-action: manipulation;
|
|
24
|
+
position: relative;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
height: var(--k-collapse-header-height);
|
|
28
|
+
line-height: var(--k-collapse-header-height);
|
|
29
|
+
background-color: var(--k-collapse-bg-color);
|
|
30
|
+
color: var(--k-text-color-primary);
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
border-bottom: 1px solid var(--k-border-color);
|
|
33
|
+
font-size: var(--k-collapse-header-font-size);
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
transition: border-bottom-color var(--k-transition-duration);
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
38
|
+
.k-collapse-item__wrap {
|
|
39
|
+
will-change: height;
|
|
40
|
+
background-color: var(--k-collapse-bg-color);
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
border-bottom: 1px solid var(--k-border-color);
|
|
43
|
+
transition: height 0.3s;
|
|
44
|
+
}
|
|
45
|
+
.k-collapse-item__content {
|
|
46
|
+
padding-bottom: 25px;
|
|
47
|
+
font-size: 13px;
|
|
48
|
+
will-change: height;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
border-bottom: 1px solid var(--k-border-color);
|
|
52
|
+
}
|
|
53
|
+
.k-collapse-item__arrow {
|
|
54
|
+
display: block;
|
|
55
|
+
margin: 0 8px 0 auto;
|
|
56
|
+
transition: transform var(--k-transition-duration);
|
|
57
|
+
font-weight: 300;
|
|
58
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as o, openBlock as e, createBlock as s, Transition as n, mergeProps as i, unref as r, toHandlers as p, withCtx as g, renderSlot as l } from "vue";
|
|
2
|
+
import { createNamespace as m } from "../../../assets/ts/utils.mjs";
|
|
3
|
+
import "./collapse-transition.vue_vue_type_style_index_0_lang.mjs";
|
|
4
|
+
const f = o({
|
|
5
|
+
name: "k-collapse-transition"
|
|
6
|
+
}), T = o({
|
|
7
|
+
...f,
|
|
8
|
+
setup(y) {
|
|
9
|
+
const { n: a } = m("collapse-transition"), d = {
|
|
10
|
+
beforeEnter(t) {
|
|
11
|
+
t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingBottom = t.style.paddingBottom, t.style.maxHeight = 0, t.style.paddingTop = 0, t.style.paddingBottom = 0;
|
|
12
|
+
},
|
|
13
|
+
enter(t) {
|
|
14
|
+
t.dataset.oldOverflow = t.style.overflow, t.scrollHeight !== 0 ? (t.style.maxHeight = `${t.scrollHeight}px`, t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom) : (t.style.maxHeight = 0, t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom), t.style.overflow = "hidden";
|
|
15
|
+
},
|
|
16
|
+
afterEnter(t) {
|
|
17
|
+
t.style.maxHeight = "", t.style.overflow = t.dataset.oldOverflow;
|
|
18
|
+
},
|
|
19
|
+
beforeLeave(t) {
|
|
20
|
+
t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingBottom = t.style.paddingBottom, t.dataset.oldOverflow = t.style.overflow, t.style.maxHeight = `${t.scrollHeight}px`, t.style.overflow = "hidden";
|
|
21
|
+
},
|
|
22
|
+
leave(t) {
|
|
23
|
+
t.scrollHeight !== 0 && (t.style.maxHeight = 0, t.style.paddingTop = 0, t.style.paddingBottom = 0);
|
|
24
|
+
},
|
|
25
|
+
afterLeave(t) {
|
|
26
|
+
t.style.maxHeight = "", t.style.overflow = t.dataset.oldOverflow, t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return (t, c) => (e(), s(n, i({
|
|
30
|
+
name: r(a)()
|
|
31
|
+
}, p(d)), {
|
|
32
|
+
default: g(() => [
|
|
33
|
+
l(t.$slots, "default")
|
|
34
|
+
]),
|
|
35
|
+
_: 3
|
|
36
|
+
}, 16, ["name"]));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
T as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineComponent as V, ref as h, watch as I, openBlock as r, createBlock as b, Teleport as L, unref as o, withModifiers as w, withCtx as M, createElementVNode as x, normalizeClass as d, normalizeStyle as N, createElementBlock as m, renderSlot as g, toDisplayString as R, createCommentVNode as f, createVNode as $, nextTick as O } from "vue";
|
|
2
|
+
import { Overlay as P } from "../../overlay/index.mjs";
|
|
3
|
+
import { createNamespace as S } from "../../../assets/ts/utils.mjs";
|
|
4
|
+
import { Icon as H } from "../../icon/index.mjs";
|
|
5
|
+
import "./style/index.css";
|
|
6
|
+
const X = V({
|
|
7
|
+
name: "k-dialog"
|
|
8
|
+
}), G = V({
|
|
9
|
+
...X,
|
|
10
|
+
props: {
|
|
11
|
+
title: { default: "" },
|
|
12
|
+
showHeader: { type: Boolean, default: !0 },
|
|
13
|
+
showClose: { type: Boolean, default: !0 },
|
|
14
|
+
top: { default: 150 },
|
|
15
|
+
draggable: { type: Boolean, default: !0 },
|
|
16
|
+
width: { default: 1e3 },
|
|
17
|
+
modelValue: { type: Boolean, default: !1 },
|
|
18
|
+
closeOnClickModal: { type: Boolean, default: !1 },
|
|
19
|
+
closeDelay: { default: 0 },
|
|
20
|
+
beforeClose: {},
|
|
21
|
+
zIndex: { default: 2e3 },
|
|
22
|
+
teleportTo: { default: "body" }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:modelValue", "open", "opened", "close", "closed"],
|
|
25
|
+
setup(B, { emit: z }) {
|
|
26
|
+
const { n: l } = S("dialog"), y = h(!1), a = B, v = z;
|
|
27
|
+
y.value = a.modelValue;
|
|
28
|
+
const i = h(), k = h(), C = () => {
|
|
29
|
+
const e = () => {
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
y.value = !1, v("closed"), v("update:modelValue", y.value);
|
|
32
|
+
}, a.closeDelay);
|
|
33
|
+
};
|
|
34
|
+
if (a.beforeClose)
|
|
35
|
+
return a.beforeClose(() => e());
|
|
36
|
+
v("close"), e();
|
|
37
|
+
}, E = () => {
|
|
38
|
+
a.closeOnClickModal && C();
|
|
39
|
+
}, D = () => {
|
|
40
|
+
C();
|
|
41
|
+
};
|
|
42
|
+
let n = !1, u = { x: 0, y: 0 }, c = { x: 0, y: 0 };
|
|
43
|
+
const T = () => {
|
|
44
|
+
let e = 0, s = 0;
|
|
45
|
+
O(() => {
|
|
46
|
+
k.value.style.transform = "translate3d(" + e + "px, " + s + "px, 0)", i.value.addEventListener("pointerdown", function(t) {
|
|
47
|
+
n = !0, t.target.setPointerCapture(t.pointerId), c = { x: t.clientX, y: t.clientY };
|
|
48
|
+
}), i.value.addEventListener("pointermove", function(t) {
|
|
49
|
+
if (n) {
|
|
50
|
+
const p = { x: t.clientX, y: t.clientY };
|
|
51
|
+
u.x = p.x - c.x, u.y = p.y - c.y, c = { x: p.x, y: p.y }, e += u.x, s += u.y, k.value.style.transform = "translate3d(" + e + "px, " + s + "px, 0)", t.preventDefault();
|
|
52
|
+
}
|
|
53
|
+
}), i.value.addEventListener("pointerup", function() {
|
|
54
|
+
n && (n = !1);
|
|
55
|
+
}), i.value.addEventListener("pointercancel", function() {
|
|
56
|
+
n && (n = !1);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
return I(() => a.modelValue, (e) => {
|
|
61
|
+
e && T();
|
|
62
|
+
}), (e, s) => (r(), b(L, { to: e.teleportTo }, [
|
|
63
|
+
e.modelValue ? (r(), b(o(P), {
|
|
64
|
+
key: 0,
|
|
65
|
+
onClick: w(E, ["stop"]),
|
|
66
|
+
"z-index": e.zIndex
|
|
67
|
+
}, {
|
|
68
|
+
default: M(() => [
|
|
69
|
+
x("div", {
|
|
70
|
+
ref_key: "targetRef",
|
|
71
|
+
ref: k,
|
|
72
|
+
class: d([o(l)(), "slide-in-top"]),
|
|
73
|
+
style: N({ top: e.top, width: e.width }),
|
|
74
|
+
onClick: s[0] || (s[0] = w(() => {
|
|
75
|
+
}, ["stop"]))
|
|
76
|
+
}, [
|
|
77
|
+
e.showHeader ? (r(), m("div", {
|
|
78
|
+
key: 0,
|
|
79
|
+
ref_key: "handleRef",
|
|
80
|
+
ref: i,
|
|
81
|
+
class: d([o(l)("header"), e.draggable && "is-draggable"])
|
|
82
|
+
}, [
|
|
83
|
+
g(e.$slots, "header", { close: C }, () => [
|
|
84
|
+
e.title ? (r(), m("span", {
|
|
85
|
+
key: 0,
|
|
86
|
+
class: d([o(l)("title")])
|
|
87
|
+
}, R(e.title), 3)) : f("", !0),
|
|
88
|
+
e.showClose ? (r(), m("button", {
|
|
89
|
+
key: 1,
|
|
90
|
+
class: d([o(l)("headerbtn")]),
|
|
91
|
+
onClick: D
|
|
92
|
+
}, [
|
|
93
|
+
$(o(H), { name: "close" })
|
|
94
|
+
], 2)) : f("", !0)
|
|
95
|
+
])
|
|
96
|
+
], 2)) : f("", !0),
|
|
97
|
+
x("div", {
|
|
98
|
+
class: d([o(l)("body")])
|
|
99
|
+
}, [
|
|
100
|
+
g(e.$slots, "default")
|
|
101
|
+
], 2),
|
|
102
|
+
e.$slots.footer ? (r(), m("div", {
|
|
103
|
+
key: 1,
|
|
104
|
+
class: d([o(l)("footer")])
|
|
105
|
+
}, [
|
|
106
|
+
g(e.$slots, "footer")
|
|
107
|
+
], 2)) : f("", !0)
|
|
108
|
+
], 6)
|
|
109
|
+
]),
|
|
110
|
+
_: 3
|
|
111
|
+
}, 8, ["z-index"])) : f("", !0)
|
|
112
|
+
], 8, ["to"]));
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
export {
|
|
116
|
+
G as default
|
|
117
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.k-dialog {
|
|
2
|
+
--k-dialog-width: 50%;
|
|
3
|
+
--k-dialog-margin-top: 15vh;
|
|
4
|
+
--k-dialog-bg-color: var(--k-bg-color);
|
|
5
|
+
--k-dialog-box-shadow: var(--k-box-shadow);
|
|
6
|
+
--k-dialog-title-font-size: var(--k-font-size-large);
|
|
7
|
+
--k-dialog-content-font-size: 14px;
|
|
8
|
+
--k-dialog-font-line-height: var(--k-font-line-height-primary);
|
|
9
|
+
--k-dialog-padding-primary: 14px;
|
|
10
|
+
--k-dialog-border-radius: var(--k-radius-small);
|
|
11
|
+
position: relative;
|
|
12
|
+
background: var(--k-dialog-bg-color);
|
|
13
|
+
border-radius: var(--k-dialog-border-radius);
|
|
14
|
+
box-shadow: var(--k-dialog-box-shadow);
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
width: var(--k-dialog-width, 50%);
|
|
17
|
+
vertical-align: middle;
|
|
18
|
+
text-align: left;
|
|
19
|
+
display: inline-block;
|
|
20
|
+
}
|
|
21
|
+
.k-dialog__header {
|
|
22
|
+
padding: var(--k-dialog-padding-primary);
|
|
23
|
+
padding-bottom: 10px;
|
|
24
|
+
word-break: break-all;
|
|
25
|
+
}
|
|
26
|
+
.k-dialog__title {
|
|
27
|
+
line-height: var(--k-dialog-font-line-height);
|
|
28
|
+
font-size: var(--k-dialog-title-font-size);
|
|
29
|
+
color: var(--k-text-color-primary);
|
|
30
|
+
}
|
|
31
|
+
.k-dialog__headerbtn {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 6px;
|
|
34
|
+
right: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
width: 54px;
|
|
37
|
+
height: 54px;
|
|
38
|
+
background: transparent;
|
|
39
|
+
border: none;
|
|
40
|
+
outline: none;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
font-size: var(--k-message-close-size, 16px);
|
|
43
|
+
}
|
|
44
|
+
.k-dialog__body {
|
|
45
|
+
padding: calc(var(--k-dialog-padding-primary));
|
|
46
|
+
color: var(--k-text-color-regular);
|
|
47
|
+
font-size: var(--k-dialog-content-font-size);
|
|
48
|
+
word-break: break-all;
|
|
49
|
+
}
|
|
50
|
+
.k-dialog__footer {
|
|
51
|
+
padding: var(--k-dialog-padding-primary);
|
|
52
|
+
padding-top: 10px;
|
|
53
|
+
text-align: right;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
}
|
|
56
|
+
.k-dialog .is-draggable {
|
|
57
|
+
cursor: move;
|
|
58
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
class h {
|
|
2
|
+
constructor(t) {
|
|
3
|
+
this.canvas = document.createElement("canvas"), this.el = t, this.bbox = this.el.getBoundingClientRect(), this.canvas.width = this.bbox.width, this.canvas.height = this.bbox.height, this.ctx = this.canvas.getContext("2d"), this.el.appendChild(this.canvas);
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
class a extends h {
|
|
7
|
+
constructor(t, s) {
|
|
8
|
+
super(t), this.animateHeader = !0, this.bubbles = new Array(), this.num = 50, this.speed = 0.4, this.type = "circle", this.num = s.num, this.speed = s.speed, this.type = s.type, this.setStyle(), this.init();
|
|
9
|
+
}
|
|
10
|
+
init() {
|
|
11
|
+
for (let t = 0; t < this.num; t++)
|
|
12
|
+
this.bubbles.push(new l(this));
|
|
13
|
+
this.animate();
|
|
14
|
+
}
|
|
15
|
+
setStyle() {
|
|
16
|
+
this.el.style.position = "relative", this.canvas.style.position = "absolute", this.canvas.style.zIndex = "1", this.canvas.style.left = "0", this.canvas.style.top = "0", this.canvas.style.pointerEvents = "none";
|
|
17
|
+
}
|
|
18
|
+
animate() {
|
|
19
|
+
this.animateHeader && (this.ctx.clearRect(0, 0, this.bbox.width, this.bbox.height), this.bubbles.forEach((t) => {
|
|
20
|
+
t.draw();
|
|
21
|
+
})), requestAnimationFrame(() => this.animate());
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class l {
|
|
25
|
+
constructor(t) {
|
|
26
|
+
this.pos = { x: 0, y: 0 }, this.alpha = 0, this.alpha_change = 0, this.speed = 1, this.scale = 1, this.scale_change = 0.2, this._bubbleFactory = t, this.init();
|
|
27
|
+
}
|
|
28
|
+
init() {
|
|
29
|
+
this.pos.x = Math.random() * this._bubbleFactory.bbox.width, this.pos.y = this._bubbleFactory.bbox.height + Math.random() * 100, this.alpha = 0.1 + Math.random() * 0.3, this.alpha_change = 2e-4 + Math.random() * 5e-4, this.scale = 0.2 + Math.random() * 0.5, this.scale_change = Math.random() * 2e-3, this.speed = 0.1 + Math.random() * this._bubbleFactory.speed;
|
|
30
|
+
}
|
|
31
|
+
draw() {
|
|
32
|
+
this.alpha <= 0 && this.init();
|
|
33
|
+
let t = this._bubbleFactory.ctx;
|
|
34
|
+
this.pos.y -= this.speed, this.alpha -= this.alpha_change, this.scale += this.scale_change, this._bubbleFactory.type == "circle" ? (t.beginPath(), t.arc(this.pos.x, this.pos.y, this.scale * 10, 0, 2 * Math.PI, !1), t.fillStyle = "rgba(255,255,255," + this.alpha + ")", t.fill()) : (t.lineWidth = 0.6, t.strokeStyle = "rgba(255,255,255," + this.alpha + ")", t.beginPath(), t.moveTo(this.pos.x, this.pos.y), t.lineTo(this.pos.x, this.pos.y - this._bubbleFactory.bbox.height / 3), t.closePath(), t.stroke());
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const n = {
|
|
38
|
+
mounted(e, t) {
|
|
39
|
+
let s = t.value, i = { num: 50, speed: 0.3, type: "circle" };
|
|
40
|
+
s && (i = { ...i, ...s }), new a(e, i);
|
|
41
|
+
},
|
|
42
|
+
unmounted() {
|
|
43
|
+
console.log("distory");
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
n as bubble
|
|
48
|
+
};
|