@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/grid-item/index.js
CHANGED
|
@@ -1,123 +1,87 @@
|
|
|
1
1
|
import './css.js'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (item.span + item.offset >= provide.column.value) {
|
|
87
|
-
start = 0;
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
start += item.span + item.offset;
|
|
91
|
-
if (start > provide.column.value) {
|
|
92
|
-
start = item.span + item.offset;
|
|
93
|
-
} else if (start === provide.column.value) {
|
|
94
|
-
start = 0;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
let occupied = start + offsetComputed.value + spanComputed.value;
|
|
98
|
-
if (occupied > provide.column.value) {
|
|
99
|
-
return `${offsetComputed.value + 1} / span ${spanComputed.value}`;
|
|
100
|
-
}
|
|
101
|
-
return `${start + offsetComputed.value + 1} / span ${spanComputed.value}`;
|
|
102
|
-
});
|
|
103
|
-
return (_ctx, _cache) => {
|
|
104
|
-
return openBlock(), createElementBlock(
|
|
105
|
-
"div",
|
|
106
|
-
{
|
|
107
|
-
class: "pixelium px-grid-item",
|
|
108
|
-
style: normalizeStyle({
|
|
109
|
-
gridColumn: gridColumn.value
|
|
110
|
-
})
|
|
111
|
-
},
|
|
112
|
-
[
|
|
113
|
-
renderSlot(_ctx.$slots, "default")
|
|
114
|
-
],
|
|
115
|
-
4
|
|
116
|
-
/* STYLE */
|
|
117
|
-
);
|
|
118
|
-
};
|
|
119
|
-
}
|
|
2
|
+
import { g as A } from "../vendor.js";
|
|
3
|
+
import { r as GRID_UPDATE } from "../share/const/event-bus-key.js";
|
|
4
|
+
import { n as useIndexOfChildren } from "../share/hook/use-index-of-children.js";
|
|
5
|
+
import { o as GRID_PROVIDE } from "../share/const/provide-key.js";
|
|
6
|
+
import { t as useScreenWidth } from "../share/hook/use-screen-width.js";
|
|
7
|
+
import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderSlot, useId, watch } from "vue";
|
|
8
|
+
var grid_item_default = /* @__PURE__ */ defineComponent({
|
|
9
|
+
name: "GridItem",
|
|
10
|
+
__name: "index",
|
|
11
|
+
props: {
|
|
12
|
+
offset: { default: 0 },
|
|
13
|
+
span: null
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
var _instance$parent;
|
|
17
|
+
const instance = getCurrentInstance();
|
|
18
|
+
const provide$1 = ref((instance === null || instance === void 0 || (_instance$parent = instance.parent) === null || _instance$parent === void 0 ? void 0 : _instance$parent.type.name) === "Grid").value ? inject(GRID_PROVIDE) : void 0;
|
|
19
|
+
const props = __props;
|
|
20
|
+
const id = useId();
|
|
21
|
+
const [index] = useIndexOfChildren(GRID_UPDATE);
|
|
22
|
+
const [widthType] = useScreenWidth();
|
|
23
|
+
const offsetComputed = computed(() => {
|
|
24
|
+
if (A(props.offset)) return props.offset;
|
|
25
|
+
return props.offset[widthType.value] || 0;
|
|
26
|
+
});
|
|
27
|
+
const spanComputed = computed(() => {
|
|
28
|
+
if (props.span === void 0) return (provide$1 === null || provide$1 === void 0 ? void 0 : provide$1.column.value) || 24;
|
|
29
|
+
if (A(props.span)) return props.span;
|
|
30
|
+
return props.span[widthType.value] || 24;
|
|
31
|
+
});
|
|
32
|
+
onMounted(() => {
|
|
33
|
+
provide$1 === null || provide$1 === void 0 || provide$1.itemsStat.value.push({
|
|
34
|
+
id,
|
|
35
|
+
index: index.value,
|
|
36
|
+
offset: offsetComputed.value,
|
|
37
|
+
span: spanComputed.value
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
watch([
|
|
41
|
+
index,
|
|
42
|
+
offsetComputed,
|
|
43
|
+
spanComputed
|
|
44
|
+
], () => {
|
|
45
|
+
const stat = provide$1 === null || provide$1 === void 0 ? void 0 : provide$1.itemsStat.value.find((item) => item.id === id);
|
|
46
|
+
if (stat) {
|
|
47
|
+
stat.index = index.value;
|
|
48
|
+
stat.offset = offsetComputed.value;
|
|
49
|
+
stat.span = spanComputed.value;
|
|
50
|
+
} else provide$1 === null || provide$1 === void 0 || provide$1.itemsStat.value.push({
|
|
51
|
+
id,
|
|
52
|
+
index: index.value,
|
|
53
|
+
offset: offsetComputed.value,
|
|
54
|
+
span: spanComputed.value
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
onBeforeUnmount(() => {
|
|
58
|
+
const idx = provide$1 === null || provide$1 === void 0 ? void 0 : provide$1.itemsStat.value.findIndex((item) => item.id === id);
|
|
59
|
+
if (idx !== void 0 && idx > -1) provide$1 === null || provide$1 === void 0 || provide$1.itemsStat.value.splice(idx, 1);
|
|
60
|
+
});
|
|
61
|
+
const gridColumn = computed(() => {
|
|
62
|
+
if (!provide$1) return;
|
|
63
|
+
if (offsetComputed.value + spanComputed.value > provide$1.column.value) return `${offsetComputed.value + 1} / span ${spanComputed.value}`;
|
|
64
|
+
const preItems = provide$1.itemsStat.value.filter((item) => item.index !== -1 && item.index < index.value);
|
|
65
|
+
if (preItems.length === 0) return `${offsetComputed.value + 1} / span ${spanComputed.value}`;
|
|
66
|
+
let start = 0;
|
|
67
|
+
preItems.forEach((item) => {
|
|
68
|
+
if (item.span + item.offset >= provide$1.column.value) {
|
|
69
|
+
start = 0;
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
start += item.span + item.offset;
|
|
73
|
+
if (start > provide$1.column.value) start = item.span + item.offset;
|
|
74
|
+
else if (start === provide$1.column.value) start = 0;
|
|
75
|
+
});
|
|
76
|
+
if (start + offsetComputed.value + spanComputed.value > provide$1.column.value) return `${offsetComputed.value + 1} / span ${spanComputed.value}`;
|
|
77
|
+
return `${start + offsetComputed.value + 1} / span ${spanComputed.value}`;
|
|
78
|
+
});
|
|
79
|
+
return (_ctx, _cache) => {
|
|
80
|
+
return openBlock(), createElementBlock("div", {
|
|
81
|
+
class: "pixelium px-grid-item",
|
|
82
|
+
style: normalizeStyle({ gridColumn: gridColumn.value })
|
|
83
|
+
}, [renderSlot(_ctx.$slots, "default")], 4);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
120
86
|
});
|
|
121
|
-
export {
|
|
122
|
-
_sfc_main as _
|
|
123
|
-
};
|
|
87
|
+
export { grid_item_default as t };
|
package/es/header/index.js
CHANGED
|
@@ -1,42 +1,33 @@
|
|
|
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
|
-
renderSlot(_ctx.$slots, "default")
|
|
33
|
-
],
|
|
34
|
-
6
|
|
35
|
-
/* CLASS, STYLE */
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
2
|
+
import { _ as E, g as A } from "../vendor.js";
|
|
3
|
+
import { t as useDarkMode } from "../share/hook/use-dark-mode.js";
|
|
4
|
+
import { computed, createElementBlock, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, unref } from "vue";
|
|
5
|
+
var header_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
name: "Header",
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
minHeight: null,
|
|
10
|
+
bordered: { type: Boolean },
|
|
11
|
+
dark: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const darkMode = useDarkMode();
|
|
19
|
+
const minHeight = computed(() => {
|
|
20
|
+
return E(props.minHeight) ? void 0 : A(props.minHeight) ? `${props.minHeight}px` : props.minHeight;
|
|
21
|
+
});
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return openBlock(), createElementBlock("header", {
|
|
24
|
+
class: normalizeClass(["pixelium px-header", {
|
|
25
|
+
"px-header__dark": !unref(darkMode) && !!props.dark,
|
|
26
|
+
"px-header__bordered": !!props.bordered
|
|
27
|
+
}]),
|
|
28
|
+
style: normalizeStyle({ minHeight: minHeight.value })
|
|
29
|
+
}, [renderSlot(_ctx.$slots, "default")], 6);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
39
32
|
});
|
|
40
|
-
export {
|
|
41
|
-
_sfc_main as _
|
|
42
|
-
};
|
|
33
|
+
export { header_default as t };
|
package/es/icon/index.js
CHANGED
|
@@ -1,57 +1,46 @@
|
|
|
1
1
|
import './css.js'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
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
|
-
renderSlot(_ctx.$slots, "default")
|
|
48
|
-
],
|
|
49
|
-
6
|
|
50
|
-
/* CLASS, STYLE */
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
}
|
|
2
|
+
import { g as A } from "../vendor.js";
|
|
3
|
+
import { computed, createElementBlock, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
|
4
|
+
var icon_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "Icon",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
size: { default: "1em" },
|
|
9
|
+
color: { default: "currentColor" },
|
|
10
|
+
rotate: { default: 0 },
|
|
11
|
+
spin: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
flip: { default: "none" }
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const transform = computed(() => {
|
|
20
|
+
let scaleX = 1;
|
|
21
|
+
let scaleY = 1;
|
|
22
|
+
if (props.flip === "horizontal" || props.flip === "both") scaleX = -1;
|
|
23
|
+
if (props.flip === "vertical" || props.flip === "both") scaleY = -1;
|
|
24
|
+
return `scale(${scaleX}, ${scaleY}) rotate(${props.rotate}deg)`;
|
|
25
|
+
});
|
|
26
|
+
const size = computed(() => {
|
|
27
|
+
return A(props.size) ? `${props.size}px` : props.size;
|
|
28
|
+
});
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("div", {
|
|
31
|
+
class: normalizeClass({
|
|
32
|
+
"pixelium px-icon": true,
|
|
33
|
+
"px-animation__loading": !!props.spin
|
|
34
|
+
}),
|
|
35
|
+
style: normalizeStyle({
|
|
36
|
+
height: size.value,
|
|
37
|
+
width: size.value,
|
|
38
|
+
fontSize: size.value,
|
|
39
|
+
color: props.color,
|
|
40
|
+
transform: transform.value
|
|
41
|
+
})
|
|
42
|
+
}, [renderSlot(_ctx.$slots, "default")], 6);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
54
45
|
});
|
|
55
|
-
export {
|
|
56
|
-
_sfc_main as _
|
|
57
|
-
};
|
|
46
|
+
export { icon_default as t };
|
package/es/icons/css-hn.js
CHANGED
package/es/icons/css-pa.js
CHANGED