@pixelium/web-vue 0.0.2 → 0.0.3-beta
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 +42 -0
- package/README.zh.md +6 -3
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/coverage-final.json +106 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +926 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/dist/font.css +1 -1
- package/dist/index.d.ts +1593 -248
- package/dist/normalize.css +2 -0
- package/dist/pixelium-vue-icon-hn.cjs +1 -1
- package/dist/pixelium-vue-icon-hn.css +2 -1
- package/dist/pixelium-vue-icon-hn.js +8533 -8154
- package/dist/pixelium-vue-icon-hn.umd.cjs +1 -1
- package/dist/pixelium-vue-icon-pa.cjs +1 -1
- package/dist/pixelium-vue-icon-pa.css +2 -1
- package/dist/pixelium-vue-icon-pa.js +10625 -10143
- package/dist/pixelium-vue-icon-pa.umd.cjs +1 -1
- package/dist/pixelium-vue.cjs +2 -2
- package/dist/pixelium-vue.css +2 -1
- package/dist/pixelium-vue.js +7402 -5852
- package/dist/pixelium-vue.umd.cjs +2 -2
- package/es/aside/index.js +46 -151
- package/es/auto-complete/draw.d.ts +1 -1
- package/es/auto-complete/draw.js +26 -51
- package/es/auto-complete/index.css +92 -32
- package/es/auto-complete/index.d.ts +12 -15
- package/es/auto-complete/index.js +338 -400
- package/es/auto-complete/type.d.ts +25 -13
- package/es/avatar/css.js +2 -0
- package/es/avatar/draw.d.ts +2 -0
- package/es/avatar/draw.js +11 -0
- package/es/avatar/index.css +49 -0
- package/es/avatar/index.d.ts +15 -0
- package/es/avatar/index.js +110 -0
- package/es/avatar/type.d.ts +34 -0
- package/es/button/draw.d.ts +4 -4
- package/es/button/draw.js +213 -297
- package/es/button/index.css +40 -30
- package/es/button/index.d.ts +0 -4
- package/es/button/index.js +230 -256
- package/es/button/type.d.ts +3 -3
- package/es/button-group/index.css +0 -3
- package/es/button-group/index.d.ts +1 -2
- package/es/button-group/index.js +59 -31
- package/es/button-group/type.d.ts +21 -4
- package/es/checkbox/css.js +2 -0
- package/es/checkbox/draw.d.ts +4 -0
- package/es/checkbox/draw.js +46 -0
- package/es/checkbox/index.css +85 -0
- package/es/checkbox/index.d.ts +31 -0
- package/es/checkbox/index.js +206 -0
- package/es/checkbox/type.d.ts +88 -0
- package/es/checkbox-group/css.js +2 -0
- package/es/checkbox-group/index.css +20 -0
- package/es/checkbox-group/index.d.ts +23 -0
- package/es/checkbox-group/index.js +84 -0
- package/es/checkbox-group/type.d.ts +78 -0
- package/es/col/index.d.ts +2 -2
- package/es/col/index.js +43 -58
- package/es/container/index.js +18 -31
- package/es/divider/index.js +39 -53
- package/es/empty/index.css +4 -4
- package/es/empty/index.js +16 -71
- package/es/entry.js +102 -0
- package/es/footer/index.js +31 -40
- package/es/form/css.js +1 -0
- package/es/form/index.d.ts +27 -0
- package/es/form/index.js +125 -0
- package/es/form/type.d.ts +238 -0
- package/es/form/use-form.d.ts +4 -0
- package/es/form/use-form.js +48 -0
- package/es/form-item/css.js +2 -0
- package/es/form-item/index.css +77 -0
- package/es/form-item/index.d.ts +37 -0
- package/es/form-item/index.js +318 -0
- package/es/form-item/type.d.ts +96 -0
- package/es/grid/index.js +56 -75
- package/es/grid-item/css.js +0 -1
- package/es/grid-item/index.d.ts +1 -1
- package/es/grid-item/index.js +85 -121
- package/es/header/index.js +31 -40
- package/es/icon/index.js +44 -55
- package/es/icons/css-hn.js +0 -1
- package/es/icons/css-pa.js +0 -1
- package/es/icons/icon-hn.js +10337 -15986
- package/es/icons/icon-pa.js +12573 -17447
- package/es/image/css.js +2 -0
- package/es/image/index.css +69 -0
- package/es/image/index.d.ts +35 -0
- package/es/image/index.js +199 -0
- package/es/image/type.d.ts +126 -0
- package/es/index.css +1 -515
- package/es/index.d.ts +22 -2
- package/es/index.js +143 -123
- package/es/input/draw.d.ts +1 -1
- package/es/input/draw.js +26 -51
- package/es/input/index.css +85 -33
- package/es/input/index.d.ts +9 -16
- package/es/input/index.js +319 -423
- package/es/input/type.d.ts +3 -3
- package/es/input-group/index.css +0 -1
- package/es/input-group/index.d.ts +2 -2
- package/es/input-group/index.js +66 -37
- package/es/input-group/type.d.ts +16 -4
- package/es/input-group-label/draw.d.ts +1 -1
- package/es/input-group-label/draw.js +26 -51
- package/es/input-group-label/index.css +33 -22
- package/es/input-group-label/index.d.ts +1 -4
- package/es/input-group-label/index.js +104 -127
- package/es/input-group-label/type.d.ts +3 -3
- package/es/input-number/draw.d.ts +1 -1
- package/es/input-number/draw.js +26 -51
- package/es/input-number/index.css +90 -35
- package/es/input-number/index.d.ts +9 -16
- package/es/input-number/index.js +428 -536
- package/es/input-number/type.d.ts +3 -3
- package/es/input-tag/draw.d.ts +1 -1
- package/es/input-tag/draw.js +26 -48
- package/es/input-tag/index.css +100 -33
- package/es/input-tag/index.d.ts +7 -13
- package/es/input-tag/index.js +442 -467
- package/es/input-tag/type.d.ts +24 -13
- package/es/link/index.js +75 -106
- package/es/main/index.js +11 -15
- package/es/mask/index.js +94 -115
- package/es/message/index.css +1 -1
- package/es/message/index.js +168 -346
- package/es/message-box/css.js +1 -1
- package/es/message-box/index.js +98 -114
- package/es/message-box/message-box-wrapped.js +33 -46
- package/es/message-box/message-box.js +79 -111
- package/es/option-list/index.css +13 -13
- package/es/option-list/index.d.ts +4 -31
- package/es/option-list/index.js +99 -167
- package/es/option-list/type.d.ts +5 -1
- package/es/pixelate/pixel.d.ts +5 -0
- package/es/pixelate/pixel.js +70 -0
- package/es/pixelate/pixelate.worker.d.ts +1 -0
- package/es/popover/index.d.ts +13 -99
- package/es/popover/index.js +75 -238
- package/es/popover/type.d.ts +7 -2
- package/es/popup/css.js +1 -0
- package/es/popup/index.d.ts +210 -0
- package/es/popup/index.js +203 -0
- package/es/popup/type.d.ts +105 -0
- package/es/popup-content/draw.d.ts +2 -2
- package/es/popup-content/draw.js +98 -143
- package/es/popup-content/index.css +11 -11
- package/es/popup-content/index.d.ts +1 -0
- package/es/popup-content/index.js +253 -1576
- package/es/popup-content/type.d.ts +1 -0
- package/es/popup-trigger/index.d.ts +8 -2
- package/es/popup-trigger/index.js +122 -95
- package/es/popup-trigger/type.d.ts +4 -1
- package/es/popup-wrapper/css.js +2 -0
- package/es/popup-wrapper/index.css +14 -0
- package/es/popup-wrapper/index.d.ts +18 -0
- package/es/popup-wrapper/index.js +67 -0
- package/es/popup-wrapper/type.d.ts +9 -0
- package/es/radio/css.js +1 -0
- package/es/radio/draw.d.ts +4 -0
- package/es/radio/draw.js +47 -0
- package/es/radio/index.d.ts +30 -0
- package/es/radio/index.js +190 -0
- package/es/radio/style.css +73 -0
- package/es/radio/type.d.ts +76 -0
- package/es/radio-group/css.js +2 -0
- package/es/radio-group/index.css +20 -0
- package/es/radio-group/index.d.ts +23 -0
- package/es/radio-group/index.js +77 -0
- package/es/radio-group/type.d.ts +77 -0
- package/es/row/index.js +56 -70
- package/es/select/draw.d.ts +1 -1
- package/es/select/draw.js +26 -51
- package/es/select/index.css +118 -36
- package/es/select/index.d.ts +14 -16
- package/es/select/index.js +625 -672
- package/es/select/type.d.ts +60 -25
- package/es/share/const/event-bus-key.js +1 -6
- package/es/share/const/index.d.ts +4 -0
- package/es/share/const/index.js +22 -24
- package/es/share/const/provide-key.d.ts +5 -0
- package/es/share/const/provide-key.js +6 -5
- package/es/share/const/style.d.ts +6 -0
- package/es/share/const/style.js +7 -0
- package/es/share/hook/use-cancelable-delay.d.ts +1 -0
- package/es/share/hook/use-cancelable-delay.js +42 -0
- package/es/share/hook/use-click-outside-listener.d.ts +1 -1
- package/es/share/hook/use-click-outside-listener.js +28 -41
- package/es/share/hook/use-composition.js +17 -15
- package/es/share/hook/use-controlled-mode.d.ts +3 -3
- package/es/share/hook/use-controlled-mode.js +20 -23
- package/es/share/hook/use-dark-mode.js +51 -65
- package/es/share/hook/use-index-of-children.d.ts +2 -1
- package/es/share/hook/use-index-of-children.js +47 -45
- package/es/share/hook/use-lazy-load.d.ts +10 -0
- package/es/share/hook/use-lazy-load.js +133 -0
- package/es/share/hook/use-props-detect.d.ts +2 -0
- package/es/share/hook/use-resize-observer.d.ts +1 -2
- package/es/share/hook/use-resize-observer.js +28 -20
- package/es/share/hook/use-screen-width.js +27 -36
- package/es/share/hook/use-smooth-transition.d.ts +2 -0
- package/es/share/hook/use-smooth-transition.js +65 -0
- package/es/share/hook/use-textarea-height.js +86 -92
- package/es/share/hook/use-theme-mode.js +41 -42
- package/es/share/hook/use-transition-end.d.ts +2 -0
- package/es/share/hook/use-transition-end.js +12 -0
- package/es/share/hook/use-watch-global-css-var.js +12 -16
- package/es/share/hook/use-window-resize-listener.d.ts +1 -0
- package/es/share/hook/use-window-resize-listener.js +15 -0
- package/es/share/hook/use-z-index.js +30 -27
- package/es/share/type/index.d.ts +18 -3
- package/es/share/util/color.d.ts +5 -3
- package/es/share/util/color.js +156 -149
- package/es/share/util/common.d.ts +7 -2
- package/es/share/util/common.js +127 -65
- package/es/share/util/console.d.ts +3 -3
- package/es/share/util/console.js +10 -7
- package/es/share/util/dom.d.ts +19 -0
- package/es/share/util/dom.js +88 -0
- package/es/share/util/env.d.ts +1 -0
- package/es/share/util/env.js +5 -4
- package/es/share/util/event-bus.js +3 -20
- package/es/share/util/lru-cache.js +29 -33
- package/es/share/util/pixel.d.ts +4 -0
- package/es/share/util/plot.d.ts +8 -3
- package/es/share/util/plot.js +457 -229
- package/es/share/util/reactivity.d.ts +8 -0
- package/es/share/util/reactivity.js +23 -0
- package/es/share/util/render.js +31 -41
- package/es/share/util/theme.d.ts +3 -0
- package/es/share/util/theme.js +77 -57
- package/es/slider/css.js +2 -0
- package/es/slider/draw.d.ts +25 -0
- package/es/slider/draw.js +113 -0
- package/es/slider/index.css +119 -0
- package/es/slider/index.d.ts +66 -0
- package/es/slider/index.js +503 -0
- package/es/slider/type.d.ts +162 -0
- package/es/slider/util.d.ts +37 -0
- package/es/slider/util.js +130 -0
- package/es/space/index.css +24 -29
- package/es/space/index.js +73 -97
- package/es/spin/index.css +18 -17
- package/es/spin/index.js +72 -102
- package/es/spin/type.d.ts +11 -5
- package/es/switch/css.js +2 -0
- package/es/switch/draw.d.ts +2 -0
- package/es/switch/draw.js +18 -0
- package/es/switch/index.css +121 -0
- package/es/switch/index.d.ts +42 -0
- package/es/switch/index.js +259 -0
- package/es/switch/type.d.ts +133 -0
- package/es/tag/draw.d.ts +2 -2
- package/es/tag/draw.js +80 -127
- package/es/tag/index.css +38 -22
- package/es/tag/index.d.ts +2 -2
- package/es/tag/index.js +121 -190
- package/es/tag/type.d.ts +3 -3
- package/es/text-outline/css.js +2 -0
- package/es/text-outline/index.css +4 -0
- package/es/text-outline/index.d.ts +17 -0
- package/es/text-outline/index.js +33 -0
- package/es/text-outline/type.d.ts +23 -0
- package/es/textarea/draw.js +9 -11
- package/es/textarea/index.css +37 -23
- package/es/textarea/index.d.ts +8 -14
- package/es/textarea/index.js +274 -262
- package/es/tooltip/index.d.ts +100 -4
- package/es/tooltip/index.js +70 -226
- package/es/tooltip/type.d.ts +7 -2
- package/es/vendor.js +504 -0
- package/es/virtual-list/css.js +2 -0
- package/es/virtual-list/index.css +25 -0
- package/es/virtual-list/index.d.ts +11 -0
- package/es/virtual-list/index.js +313 -0
- package/es/virtual-list/type.d.ts +26 -0
- package/package.json +10 -16
- package/es/grid-item/index.css +0 -0
- /package/es/message-box/{message-box.css → index.css} +0 -0
package/es/aside/index.js
CHANGED
|
@@ -1,153 +1,48 @@
|
|
|
1
1
|
import './css.js'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
function en(n) {
|
|
48
|
-
return n === void 0;
|
|
49
|
-
}
|
|
50
|
-
function $(n) {
|
|
51
|
-
return Array.isArray(n);
|
|
52
|
-
}
|
|
53
|
-
function R(n) {
|
|
54
|
-
return k(n) && (typeof n == "number" ? n === 1 / 0 || n === -1 / 0 : n.valueOf() === 1 / 0 || n.valueOf() === -1 / 0);
|
|
55
|
-
}
|
|
56
|
-
function z(n) {
|
|
57
|
-
return k(n) && (typeof n == "number" ? Number.isNaN(n) : Number.isNaN(n.valueOf()));
|
|
58
|
-
}
|
|
59
|
-
function N(n) {
|
|
60
|
-
return n == null;
|
|
61
|
-
}
|
|
62
|
-
function Gn(...n) {
|
|
63
|
-
return n.reduce((e, t) => {
|
|
64
|
-
if (N(t))
|
|
65
|
-
return e;
|
|
66
|
-
const s = Object.keys(t);
|
|
67
|
-
for (const o of s) {
|
|
68
|
-
const c = e[o], i = t[o];
|
|
69
|
-
(N(c) || !N(i)) && (e[o] = i);
|
|
70
|
-
}
|
|
71
|
-
return e;
|
|
72
|
-
}, {});
|
|
73
|
-
}
|
|
74
|
-
function Ne(n, e, t) {
|
|
75
|
-
let s, o;
|
|
76
|
-
const { immediate: c = false, maxWait: i } = t || {};
|
|
77
|
-
return function(...l) {
|
|
78
|
-
i !== void 0 && !o && (o = setTimeout(() => {
|
|
79
|
-
o = void 0, n.apply(this, l);
|
|
80
|
-
}, i)), !s && c && n.apply(this, l), s && clearTimeout(s), s = setTimeout(() => {
|
|
81
|
-
o && (clearTimeout(o), o = void 0), n.apply(this, l);
|
|
82
|
-
}, e);
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
// @ts-ignore
|
|
86
|
-
typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
87
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
88
|
-
...{ name: "Aside" },
|
|
89
|
-
__name: "index",
|
|
90
|
-
props: {
|
|
91
|
-
width: null,
|
|
92
|
-
bordered: { type: Boolean, default: false },
|
|
93
|
-
side: { default: "left" },
|
|
94
|
-
dark: { type: Boolean, default: false }
|
|
95
|
-
},
|
|
96
|
-
setup(__props) {
|
|
97
|
-
var _a;
|
|
98
|
-
const instance = getCurrentInstance();
|
|
99
|
-
const inner = ref(((_a = instance == null ? void 0 : instance.parent) == null ? void 0 : _a.type) === _sfc_main$1);
|
|
100
|
-
const asideCounter = inner.value ? inject("px-container-provide") : void 0;
|
|
101
|
-
onMounted(() => {
|
|
102
|
-
if (asideCounter) {
|
|
103
|
-
asideCounter.value += 1;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
onBeforeUnmount(() => {
|
|
107
|
-
if (asideCounter) {
|
|
108
|
-
asideCounter.value -= 1;
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
const props = __props;
|
|
112
|
-
const darkMode = useDarkMode();
|
|
113
|
-
const width = computed(() => {
|
|
114
|
-
return N(props.width) ? void 0 : k(props.width) ? `${props.width}px` : props.width;
|
|
115
|
-
});
|
|
116
|
-
return (_ctx, _cache) => {
|
|
117
|
-
return openBlock(), createElementBlock(
|
|
118
|
-
"aside",
|
|
119
|
-
{
|
|
120
|
-
class: normalizeClass(["pixelium px-aside", {
|
|
121
|
-
"px-aside__dark": !unref(darkMode) && !!props.dark,
|
|
122
|
-
"px-aside__bordered": !!props.bordered,
|
|
123
|
-
[`px-aside__${props.side}`]: true
|
|
124
|
-
}]),
|
|
125
|
-
style: normalizeStyle({
|
|
126
|
-
width: width.value
|
|
127
|
-
})
|
|
128
|
-
},
|
|
129
|
-
[
|
|
130
|
-
renderSlot(_ctx.$slots, "default")
|
|
131
|
-
],
|
|
132
|
-
6
|
|
133
|
-
/* CLASS, STYLE */
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
}
|
|
2
|
+
import { _ as E, g as A } from "../vendor.js";
|
|
3
|
+
import { t as useDarkMode } from "../share/hook/use-dark-mode.js";
|
|
4
|
+
import { r as CONTAINER_PROVIDE } from "../share/const/provide-key.js";
|
|
5
|
+
import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderSlot, unref } from "vue";
|
|
6
|
+
var aside_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "Aside",
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
width: null,
|
|
11
|
+
bordered: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
side: { default: "left" },
|
|
16
|
+
dark: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
var _instance$parent;
|
|
23
|
+
const instance = getCurrentInstance();
|
|
24
|
+
const asideCounter = ref((instance === null || instance === void 0 || (_instance$parent = instance.parent) === null || _instance$parent === void 0 ? void 0 : _instance$parent.type.name) === "Container").value ? inject(CONTAINER_PROVIDE) : void 0;
|
|
25
|
+
onMounted(() => {
|
|
26
|
+
if (asideCounter) asideCounter.value += 1;
|
|
27
|
+
});
|
|
28
|
+
onBeforeUnmount(() => {
|
|
29
|
+
if (asideCounter) asideCounter.value -= 1;
|
|
30
|
+
});
|
|
31
|
+
const props = __props;
|
|
32
|
+
const darkMode = useDarkMode();
|
|
33
|
+
const width = computed(() => {
|
|
34
|
+
return E(props.width) ? void 0 : A(props.width) ? `${props.width}px` : props.width;
|
|
35
|
+
});
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
return openBlock(), createElementBlock("aside", {
|
|
38
|
+
class: normalizeClass(["pixelium px-aside", {
|
|
39
|
+
"px-aside__dark": !unref(darkMode) && !!props.dark,
|
|
40
|
+
"px-aside__bordered": !!props.bordered,
|
|
41
|
+
[`px-aside__${props.side}`]: true
|
|
42
|
+
}]),
|
|
43
|
+
style: normalizeStyle({ width: width.value })
|
|
44
|
+
}, [renderSlot(_ctx.$slots, "default")], 6);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
137
47
|
});
|
|
138
|
-
export {
|
|
139
|
-
$,
|
|
140
|
-
Cn as C,
|
|
141
|
-
Gn as G,
|
|
142
|
-
N,
|
|
143
|
-
Pn as P,
|
|
144
|
-
R,
|
|
145
|
-
_sfc_main as _,
|
|
146
|
-
Ne as a,
|
|
147
|
-
d,
|
|
148
|
-
en as e,
|
|
149
|
-
k,
|
|
150
|
-
m,
|
|
151
|
-
p,
|
|
152
|
-
z
|
|
153
|
-
};
|
|
48
|
+
export { aside_default as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { RgbaColor } from '../share/type';
|
|
2
|
-
export declare const drawBorder: (ctx: CanvasRenderingContext2D, width: number, height: number, center: [number, number][], borderRadius: number[], rad: [number, number][], borderColor: RgbaColor, pixelSize: number, inner: boolean, first: boolean, last: boolean) => void;
|
|
2
|
+
export declare const drawBorder: (ctx: CanvasRenderingContext2D, width: number, height: number, center: [number, number][], borderRadius: number[], rad: [number, number][], borderColor: RgbaColor, pixelSize: number, inner: boolean, first: boolean, last: boolean, nextIsTextButton: boolean) => void;
|
package/es/auto-complete/draw.js
CHANGED
|
@@ -1,52 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const drawBorder = (ctx, width, height, center, borderRadius, rad, borderColor, pixelSize, inner, first, last) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
width - pixelSize,
|
|
27
|
-
center[1][1],
|
|
28
|
-
pixelSize,
|
|
29
|
-
center[2][1] - center[1][1] + pixelSize
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
if (center[3][0] < center[2][0] + pixelSize) {
|
|
33
|
-
ctx.fillRect(
|
|
34
|
-
center[3][0],
|
|
35
|
-
height - pixelSize,
|
|
36
|
-
center[2][0] - center[3][0] + pixelSize,
|
|
37
|
-
pixelSize
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
if (center[3][1] + pixelSize > center[0][1] && !(inner && !first)) {
|
|
41
|
-
ctx.fillRect(0, center[0][1], pixelSize, center[3][1] - center[0][1] + pixelSize);
|
|
42
|
-
}
|
|
43
|
-
if (inner && !first) {
|
|
44
|
-
ctx.fillRect(pixelSize / 2, 0, pixelSize / 2, height);
|
|
45
|
-
}
|
|
46
|
-
if (inner && !last) {
|
|
47
|
-
ctx.fillRect(width - 2 * pixelSize - 1, 0, pixelSize, height);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
drawBorder as d
|
|
1
|
+
import { a as drawCircle } from "../share/util/plot.js";
|
|
2
|
+
import { a as rgbaColor2string } from "../share/util/color.js";
|
|
3
|
+
const drawBorder = (ctx, width, height, center, borderRadius, rad, borderColor, pixelSize, inner, first, last, nextIsTextButton) => {
|
|
4
|
+
ctx.fillStyle = rgbaColor2string(borderColor);
|
|
5
|
+
for (let i = 0; i < 4; i++) if (borderRadius[i] > pixelSize) {
|
|
6
|
+
if (i === 1 || i === 2 ? inner && last || !inner : true) drawCircle(ctx, center[i][0], center[i][1], borderRadius[i], rad[i][0], rad[i][1], pixelSize);
|
|
7
|
+
}
|
|
8
|
+
if (center[1][0] + pixelSize > center[0][0]) {
|
|
9
|
+
let length = center[1][0] - center[0][0] + pixelSize;
|
|
10
|
+
if (inner && !last) length -= pixelSize;
|
|
11
|
+
ctx.fillRect(center[0][0], 0, length, pixelSize);
|
|
12
|
+
}
|
|
13
|
+
if (center[2][1] + pixelSize > center[1][1] && (inner && last || !inner)) ctx.fillRect(width - pixelSize, center[1][1], pixelSize, center[2][1] - center[1][1] + pixelSize);
|
|
14
|
+
if (center[3][0] < center[2][0] + pixelSize) {
|
|
15
|
+
let length = center[2][0] - center[3][0] + pixelSize;
|
|
16
|
+
if (inner && !last) length -= pixelSize;
|
|
17
|
+
ctx.fillRect(center[3][0], height - pixelSize, length, pixelSize);
|
|
18
|
+
}
|
|
19
|
+
if ((!inner || first) && center[3][1] + pixelSize > center[0][1]) ctx.fillRect(0, center[0][1], pixelSize, center[3][1] - center[0][1] + pixelSize);
|
|
20
|
+
if (inner && !first) ctx.fillRect(pixelSize / 2, 0, pixelSize / 2, height);
|
|
21
|
+
if (inner && !last) {
|
|
22
|
+
let length = pixelSize;
|
|
23
|
+
if (nextIsTextButton) length /= 2;
|
|
24
|
+
ctx.fillRect(width - 2 * pixelSize - 1, 0, length, height);
|
|
25
|
+
}
|
|
52
26
|
};
|
|
27
|
+
export { drawBorder as t };
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
div.px-auto-complete {
|
|
2
|
-
font-size: var(--text-size);
|
|
3
|
-
}
|
|
4
1
|
.px-auto-complete {
|
|
5
2
|
--auto-complete-size: var(--px-medium-size);
|
|
6
|
-
--px-medium-padding-x: var(--px-interval-2);
|
|
7
|
-
--px-large-padding-x: var(--px-interval-3);
|
|
8
|
-
--px-small-padding-x: var(--px-interval-2);
|
|
9
|
-
--padding-x-size: var(--px-medium-padding-x);
|
|
10
|
-
--text-size: var(--px-medium-font-size);
|
|
11
3
|
z-index: 0;
|
|
12
4
|
position: relative;
|
|
13
5
|
background-color: transparent;
|
|
@@ -16,16 +8,32 @@ div.px-auto-complete {
|
|
|
16
8
|
border-style: solid;
|
|
17
9
|
color: var(--px-neutral-10);
|
|
18
10
|
display: flex;
|
|
19
|
-
padding: 0
|
|
11
|
+
padding: 0 8px;
|
|
20
12
|
box-sizing: border-box;
|
|
21
13
|
height: var(--auto-complete-size);
|
|
22
14
|
cursor: text;
|
|
15
|
+
transition: 0.25s all;
|
|
16
|
+
}
|
|
17
|
+
.px-auto-complete.px-auto-complete {
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
}
|
|
20
|
+
.px-auto-complete.px-auto-complete__small.px-auto-complete__inner {
|
|
21
|
+
padding-right: calc(8px + 1px + 1 * var(--px-bit));
|
|
22
|
+
}
|
|
23
|
+
.px-auto-complete.px-auto-complete__small.px-auto-complete__inner:last-child {
|
|
24
|
+
padding-right: 8px;
|
|
23
25
|
}
|
|
24
|
-
.px-auto-complete__inner {
|
|
25
|
-
padding-right: calc(
|
|
26
|
+
.px-auto-complete.px-auto-complete__medium.px-auto-complete__inner {
|
|
27
|
+
padding-right: calc(8px + 1px + 1 * var(--px-bit));
|
|
26
28
|
}
|
|
27
|
-
.px-auto-complete__inner:last-child {
|
|
28
|
-
padding-right:
|
|
29
|
+
.px-auto-complete.px-auto-complete__medium.px-auto-complete__inner:last-child {
|
|
30
|
+
padding-right: 8px;
|
|
31
|
+
}
|
|
32
|
+
.px-auto-complete.px-auto-complete__large.px-auto-complete__inner {
|
|
33
|
+
padding-right: calc(12px + 1px + 1 * var(--px-bit));
|
|
34
|
+
}
|
|
35
|
+
.px-auto-complete.px-auto-complete__large.px-auto-complete__inner:last-child {
|
|
36
|
+
padding-right: 12px;
|
|
29
37
|
}
|
|
30
38
|
.px-auto-complete-inner {
|
|
31
39
|
height: 100%;
|
|
@@ -33,8 +41,7 @@ div.px-auto-complete {
|
|
|
33
41
|
background-color: transparent;
|
|
34
42
|
box-sizing: border-box;
|
|
35
43
|
width: 100%;
|
|
36
|
-
|
|
37
|
-
line-height: var(--px-line-height);
|
|
44
|
+
line-height: 1.5;
|
|
38
45
|
font-family: var(--px-font);
|
|
39
46
|
padding: 0;
|
|
40
47
|
}
|
|
@@ -50,14 +57,14 @@ div.px-auto-complete {
|
|
|
50
57
|
opacity: 1;
|
|
51
58
|
}
|
|
52
59
|
.px-auto-complete__large {
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
padding: 0 12px;
|
|
61
|
+
font-size: 15px;
|
|
55
62
|
--auto-complete-size: var(--px-large-size);
|
|
56
63
|
}
|
|
57
64
|
.px-auto-complete__small {
|
|
58
|
-
|
|
65
|
+
padding: 0 8px;
|
|
66
|
+
font-size: 12px;
|
|
59
67
|
--auto-complete-size: var(--px-small-size);
|
|
60
|
-
--text-size: var(--px-small-font-size);
|
|
61
68
|
}
|
|
62
69
|
.px-auto-complete__disabled {
|
|
63
70
|
cursor: not-allowed;
|
|
@@ -75,33 +82,86 @@ div.px-auto-complete {
|
|
|
75
82
|
align-items: center;
|
|
76
83
|
}
|
|
77
84
|
.px-auto-complete-prefix-wrapper {
|
|
78
|
-
margin-right:
|
|
85
|
+
margin-right: 8px;
|
|
79
86
|
}
|
|
80
87
|
.px-auto-complete-suffix-wrapper,
|
|
81
88
|
.px-auto-complete-loading-wrapper,
|
|
82
89
|
.px-auto-complete-close-wrapper {
|
|
83
|
-
margin-left:
|
|
90
|
+
margin-left: 8px;
|
|
91
|
+
}
|
|
92
|
+
.px-auto-complete.px-auto-complete__small .px-auto-complete-inner {
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
}
|
|
95
|
+
.px-auto-complete.px-auto-complete__small .px-auto-complete-close-wrapper .px-auto-complete-icon-placeholder {
|
|
96
|
+
width: 12px;
|
|
97
|
+
height: 12px;
|
|
98
|
+
}
|
|
99
|
+
.px-auto-complete.px-auto-complete__small .px-auto-complete-close-wrapper .px-auto-complete-icon {
|
|
100
|
+
width: 12px;
|
|
101
|
+
height: 12px;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
fill: var(--px-neutral-8);
|
|
104
|
+
transition: 0.25s;
|
|
105
|
+
}
|
|
106
|
+
.px-auto-complete.px-auto-complete__small .px-auto-complete-close-wrapper .px-auto-complete-icon:hover {
|
|
107
|
+
fill: var(--px-neutral-7);
|
|
108
|
+
}
|
|
109
|
+
.px-auto-complete.px-auto-complete__small .px-auto-complete-close-wrapper .px-auto-complete-icon:active {
|
|
110
|
+
fill: var(--px-neutral-9);
|
|
111
|
+
}
|
|
112
|
+
.px-auto-complete.px-auto-complete__small .px-auto-complete-loading-wrapper .px-auto-complete-icon {
|
|
113
|
+
width: 12px;
|
|
114
|
+
height: 12px;
|
|
115
|
+
fill: var(--px-primary-6);
|
|
116
|
+
}
|
|
117
|
+
.px-auto-complete.px-auto-complete__medium .px-auto-complete-inner {
|
|
118
|
+
font-size: 14px;
|
|
119
|
+
}
|
|
120
|
+
.px-auto-complete.px-auto-complete__medium .px-auto-complete-close-wrapper .px-auto-complete-icon-placeholder {
|
|
121
|
+
width: 14px;
|
|
122
|
+
height: 14px;
|
|
123
|
+
}
|
|
124
|
+
.px-auto-complete.px-auto-complete__medium .px-auto-complete-close-wrapper .px-auto-complete-icon {
|
|
125
|
+
width: 14px;
|
|
126
|
+
height: 14px;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
fill: var(--px-neutral-8);
|
|
129
|
+
transition: 0.25s;
|
|
130
|
+
}
|
|
131
|
+
.px-auto-complete.px-auto-complete__medium .px-auto-complete-close-wrapper .px-auto-complete-icon:hover {
|
|
132
|
+
fill: var(--px-neutral-7);
|
|
133
|
+
}
|
|
134
|
+
.px-auto-complete.px-auto-complete__medium .px-auto-complete-close-wrapper .px-auto-complete-icon:active {
|
|
135
|
+
fill: var(--px-neutral-9);
|
|
136
|
+
}
|
|
137
|
+
.px-auto-complete.px-auto-complete__medium .px-auto-complete-loading-wrapper .px-auto-complete-icon {
|
|
138
|
+
width: 14px;
|
|
139
|
+
height: 14px;
|
|
140
|
+
fill: var(--px-primary-6);
|
|
141
|
+
}
|
|
142
|
+
.px-auto-complete.px-auto-complete__large .px-auto-complete-inner {
|
|
143
|
+
font-size: 15px;
|
|
84
144
|
}
|
|
85
|
-
.px-auto-complete-close-wrapper .px-auto-complete-icon-placeholder {
|
|
86
|
-
width:
|
|
87
|
-
height:
|
|
145
|
+
.px-auto-complete.px-auto-complete__large .px-auto-complete-close-wrapper .px-auto-complete-icon-placeholder {
|
|
146
|
+
width: 15px;
|
|
147
|
+
height: 15px;
|
|
88
148
|
}
|
|
89
|
-
.px-auto-complete-close-wrapper .px-auto-complete-icon {
|
|
90
|
-
width:
|
|
91
|
-
height:
|
|
149
|
+
.px-auto-complete.px-auto-complete__large .px-auto-complete-close-wrapper .px-auto-complete-icon {
|
|
150
|
+
width: 15px;
|
|
151
|
+
height: 15px;
|
|
92
152
|
cursor: pointer;
|
|
93
153
|
fill: var(--px-neutral-8);
|
|
94
154
|
transition: 0.25s;
|
|
95
155
|
}
|
|
96
|
-
.px-auto-complete-close-wrapper .px-auto-complete-icon:hover {
|
|
156
|
+
.px-auto-complete.px-auto-complete__large .px-auto-complete-close-wrapper .px-auto-complete-icon:hover {
|
|
97
157
|
fill: var(--px-neutral-7);
|
|
98
158
|
}
|
|
99
|
-
.px-auto-complete-close-wrapper .px-auto-complete-icon:active {
|
|
159
|
+
.px-auto-complete.px-auto-complete__large .px-auto-complete-close-wrapper .px-auto-complete-icon:active {
|
|
100
160
|
fill: var(--px-neutral-9);
|
|
101
161
|
}
|
|
102
|
-
.px-auto-complete-loading-wrapper .px-auto-complete-icon {
|
|
103
|
-
width:
|
|
104
|
-
height:
|
|
162
|
+
.px-auto-complete.px-auto-complete__large .px-auto-complete-loading-wrapper .px-auto-complete-icon {
|
|
163
|
+
width: 15px;
|
|
164
|
+
height: 15px;
|
|
105
165
|
fill: var(--px-primary-6);
|
|
106
166
|
}
|
|
107
167
|
.px-auto-complete-prefix-wrapper,
|
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
import type { AutoCompleteGroupOption, AutoCompleteOption, AutoCompleteProps } from './type';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<AutoCompleteProps, {
|
|
3
|
-
|
|
4
|
-
blur: () => void;
|
|
5
|
-
clear: () => Promise<void>;
|
|
6
|
-
select: () => void;
|
|
1
|
+
import type { AutoCompleteExpose, AutoCompleteGroupOption, AutoCompleteOption, AutoCompleteProps } from './type';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<AutoCompleteProps, AutoCompleteExpose & {
|
|
3
|
+
getElementRendered: () => HTMLDivElement | null;
|
|
7
4
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
-
input: (value: string, e: Event) => any;
|
|
9
|
-
select: (value: string, option: string | AutoCompleteOption, e: MouseEvent) => any;
|
|
10
|
-
change: (value: string, e?: Event | undefined) => any;
|
|
11
5
|
clear: (value: string) => any;
|
|
6
|
+
change: (value: string, e?: Event | undefined) => any;
|
|
12
7
|
blur: (e: FocusEvent) => any;
|
|
8
|
+
input: (value: string, e: Event) => any;
|
|
13
9
|
focus: (e: FocusEvent) => any;
|
|
10
|
+
select: (value: string, option: string | AutoCompleteOption, e: MouseEvent) => any;
|
|
14
11
|
"update:modelValue": (value: string) => any;
|
|
15
12
|
}, string, import("vue").PublicProps, Readonly<AutoCompleteProps> & Readonly<{
|
|
16
|
-
onInput?: ((value: string, e: Event) => any) | undefined;
|
|
17
|
-
onSelect?: ((value: string, option: string | AutoCompleteOption, e: MouseEvent) => any) | undefined;
|
|
18
|
-
onChange?: ((value: string, e?: Event | undefined) => any) | undefined;
|
|
19
13
|
onClear?: ((value: string) => any) | undefined;
|
|
14
|
+
onChange?: ((value: string, e?: Event | undefined) => any) | undefined;
|
|
20
15
|
onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
16
|
+
onInput?: ((value: string, e: Event) => any) | undefined;
|
|
21
17
|
onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
18
|
+
onSelect?: ((value: string, option: string | AutoCompleteOption, e: MouseEvent) => any) | undefined;
|
|
22
19
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
20
|
}>, {
|
|
24
|
-
shape: "default" | "round";
|
|
25
|
-
size: "medium" | "large" | "small";
|
|
26
21
|
disabled: boolean;
|
|
27
|
-
loading: boolean;
|
|
28
22
|
readonly: boolean;
|
|
23
|
+
loading: boolean;
|
|
29
24
|
clearable: boolean;
|
|
30
25
|
status: "success" | "warning" | "error" | "normal";
|
|
31
26
|
options: (string | AutoCompleteOption | AutoCompleteGroupOption)[];
|
|
27
|
+
virtualScroll: boolean;
|
|
32
28
|
showPopoverEmpty: boolean;
|
|
33
29
|
append: boolean;
|
|
30
|
+
optionsDestroyOnHide: boolean;
|
|
34
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
32
|
export default _default;
|