@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
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import './css.js'
|
|
2
|
+
import { B as y } from "../vendor.js";
|
|
3
|
+
import { i as FORM_ITEM_PROVIDE, n as CHECKBOX_GROUP_PROVIDE } from "../share/const/provide-key.js";
|
|
4
|
+
import { t as createProvideComputed } from "../share/util/reactivity.js";
|
|
5
|
+
import { t as useControlledMode } from "../share/hook/use-controlled-mode.js";
|
|
6
|
+
import { t as checkbox_default } from "../checkbox/index.js";
|
|
7
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, inject, normalizeClass, openBlock, provide, renderList, renderSlot, toDisplayString, toRef, unref, withCtx } from "vue";
|
|
8
|
+
var _hoisted_1 = { class: "px-checkbox-group-inner" };
|
|
9
|
+
var checkbox_group_default = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "CheckboxGroup",
|
|
11
|
+
__name: "index",
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: null,
|
|
14
|
+
defaultValue: null,
|
|
15
|
+
disabled: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
readonly: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
variant: null,
|
|
24
|
+
direction: { default: "horizontal" },
|
|
25
|
+
options: null,
|
|
26
|
+
size: null
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:modelValue", "change"],
|
|
29
|
+
setup(__props, { emit: __emit }) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const emits = __emit;
|
|
32
|
+
const [modelValue, updateModelValue] = useControlledMode("modelValue", props, emits, {
|
|
33
|
+
transform: (val) => {
|
|
34
|
+
return val || [];
|
|
35
|
+
},
|
|
36
|
+
defaultField: "defaultValue"
|
|
37
|
+
});
|
|
38
|
+
const formItemProvide = inject(FORM_ITEM_PROVIDE);
|
|
39
|
+
const disabledComputed = createProvideComputed("disabled", [formItemProvide, props], "or");
|
|
40
|
+
const readonlyComputed = createProvideComputed("readonly", [formItemProvide, props], "or");
|
|
41
|
+
const getKey = (option) => {
|
|
42
|
+
if (y(option)) return option;
|
|
43
|
+
else return option.key ?? option.value;
|
|
44
|
+
};
|
|
45
|
+
const sizeComputed = createProvideComputed("size", () => [
|
|
46
|
+
props.size && props,
|
|
47
|
+
formItemProvide,
|
|
48
|
+
props
|
|
49
|
+
], "nullish", (val) => val || "medium");
|
|
50
|
+
provide(CHECKBOX_GROUP_PROVIDE, {
|
|
51
|
+
modelValue,
|
|
52
|
+
disabled: disabledComputed,
|
|
53
|
+
readonly: readonlyComputed,
|
|
54
|
+
variant: toRef(props, "variant"),
|
|
55
|
+
size: sizeComputed,
|
|
56
|
+
updateValue: (value, checked) => {
|
|
57
|
+
const newValue = (modelValue.value || []).slice();
|
|
58
|
+
if (checked) {
|
|
59
|
+
if (!newValue.includes(value)) newValue.push(value);
|
|
60
|
+
} else {
|
|
61
|
+
const idx = newValue.indexOf(value);
|
|
62
|
+
if (idx >= 0) newValue.splice(idx, 1);
|
|
63
|
+
}
|
|
64
|
+
modelValue.value = newValue;
|
|
65
|
+
updateModelValue(newValue);
|
|
66
|
+
emits("change", newValue);
|
|
67
|
+
formItemProvide === null || formItemProvide === void 0 || formItemProvide.changeHandler();
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
return (_ctx, _cache) => {
|
|
71
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["pixelium px-checkbox-group", { [`px-checkbox-group__${props.direction}`]: props.direction }]) }, [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "default", {}, () => [props.options ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.options, (option) => {
|
|
72
|
+
return openBlock(), createBlock(checkbox_default, {
|
|
73
|
+
key: getKey(option),
|
|
74
|
+
value: unref(y)(option) ? option : option.value,
|
|
75
|
+
disabled: unref(y)(option) ? false : option.disabled
|
|
76
|
+
}, {
|
|
77
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(y)(option) ? option : option.label), 1)]),
|
|
78
|
+
_: 2
|
|
79
|
+
}, 1032, ["value", "disabled"]);
|
|
80
|
+
}), 128)) : createCommentVNode("v-if", true)])])], 2);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export { checkbox_group_default as t };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { Option } from '../share/type';
|
|
3
|
+
import type { Nullish } from 'parsnip-kit';
|
|
4
|
+
export interface CheckboxGroupOption<T = any> extends Option<T> {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
key?: string | number | symbol;
|
|
7
|
+
}
|
|
8
|
+
export type CheckboxGroupProps = {
|
|
9
|
+
/**
|
|
10
|
+
* @property {any[] | null} [modelValue]
|
|
11
|
+
* @version 0.0.3
|
|
12
|
+
*/
|
|
13
|
+
modelValue?: any[] | null;
|
|
14
|
+
/**
|
|
15
|
+
* @property {any[] | null} [defaultValue]
|
|
16
|
+
* @version 0.0.3
|
|
17
|
+
*/
|
|
18
|
+
defaultValue?: any[] | null;
|
|
19
|
+
/**
|
|
20
|
+
* @property {boolean} [disabled=false]
|
|
21
|
+
* @version 0.0.3
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @property {boolean} [readonly=false]
|
|
26
|
+
* @version 0.0.3
|
|
27
|
+
*/
|
|
28
|
+
readonly?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @property {'normal' | 'retro'} [variant]
|
|
31
|
+
* @version 0.0.3
|
|
32
|
+
*/
|
|
33
|
+
variant?: 'normal' | 'retro';
|
|
34
|
+
/**
|
|
35
|
+
* @property {'horizontal' | 'vertical'} [direction='horizontal']
|
|
36
|
+
* @version 0.0.3
|
|
37
|
+
*/
|
|
38
|
+
direction?: 'horizontal' | 'vertical';
|
|
39
|
+
/**
|
|
40
|
+
* @property {(CheckboxGroupOption | string)[]} [options]
|
|
41
|
+
* @version 0.0.3
|
|
42
|
+
*/
|
|
43
|
+
options?: (CheckboxGroupOption | string)[];
|
|
44
|
+
/**
|
|
45
|
+
* @property {'medium' | 'large' | 'small'} [size='medium']
|
|
46
|
+
* @version 0.0.3
|
|
47
|
+
*/
|
|
48
|
+
size?: 'medium' | 'large' | 'small';
|
|
49
|
+
};
|
|
50
|
+
export type CheckboxGroupEvents = {
|
|
51
|
+
/**
|
|
52
|
+
* @event update:modelValue
|
|
53
|
+
* @param {any[]} value
|
|
54
|
+
* @version 0.0.3
|
|
55
|
+
*/
|
|
56
|
+
'update:modelValue': [value: any[]];
|
|
57
|
+
/**
|
|
58
|
+
* @event change
|
|
59
|
+
* @param {any[]} value
|
|
60
|
+
* @version 0.0.3
|
|
61
|
+
*/
|
|
62
|
+
change: [value: any[]];
|
|
63
|
+
};
|
|
64
|
+
export type CheckboxGroupSlots = {
|
|
65
|
+
/**
|
|
66
|
+
* @slot default
|
|
67
|
+
* @version 0.0.3
|
|
68
|
+
*/
|
|
69
|
+
default: {};
|
|
70
|
+
};
|
|
71
|
+
export type CheckboxGroupProvide = {
|
|
72
|
+
size: ComputedRef<'medium' | 'large' | 'small' | undefined>;
|
|
73
|
+
variant: Ref<CheckboxGroupProps['variant']>;
|
|
74
|
+
disabled: ComputedRef<boolean | undefined>;
|
|
75
|
+
readonly: ComputedRef<boolean | undefined>;
|
|
76
|
+
modelValue: Ref<any[] | Nullish>;
|
|
77
|
+
updateValue: (value: any, checked: boolean) => void;
|
|
78
|
+
};
|
package/es/col/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_1) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<ColProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColProps> & Readonly<{}>, {
|
|
7
|
-
span: number | import("
|
|
8
|
-
offset: number | import("
|
|
7
|
+
span: number | import("..").ValueWithDeviceWidth<number>;
|
|
8
|
+
offset: number | import("..").ValueWithDeviceWidth<number>;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
11
|
export default _default;
|
package/es/col/index.js
CHANGED
|
@@ -1,60 +1,45 @@
|
|
|
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
|
-
paddingRight: unref(gutter) ? unref(gutter).x / 2 + "px" : void 0,
|
|
45
|
-
paddingTop: unref(gutter) ? unref(gutter).y / 2 + "px" : void 0,
|
|
46
|
-
paddingBottom: unref(gutter) ? unref(gutter).y / 2 + "px" : void 0
|
|
47
|
-
})
|
|
48
|
-
},
|
|
49
|
-
[
|
|
50
|
-
renderSlot(_ctx.$slots, "default")
|
|
51
|
-
],
|
|
52
|
-
6
|
|
53
|
-
/* CLASS, STYLE */
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
2
|
+
import { g as A } from "../vendor.js";
|
|
3
|
+
import { t as useScreenWidth } from "../share/hook/use-screen-width.js";
|
|
4
|
+
import { computed, createElementBlock, defineComponent, getCurrentInstance, inject, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref } from "vue";
|
|
5
|
+
var col_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
name: "Col",
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
offset: { default: 0 },
|
|
10
|
+
span: { default: 24 }
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
var _instance$parent;
|
|
14
|
+
const props = __props;
|
|
15
|
+
const [widthType] = useScreenWidth();
|
|
16
|
+
const offsetComputed = computed(() => {
|
|
17
|
+
if (A(props.offset)) return props.offset;
|
|
18
|
+
return props.offset[widthType.value] || 0;
|
|
19
|
+
});
|
|
20
|
+
const spanComputed = computed(() => {
|
|
21
|
+
if (A(props.span)) return props.span;
|
|
22
|
+
return props.span[widthType.value] || 24;
|
|
23
|
+
});
|
|
24
|
+
const instance = getCurrentInstance();
|
|
25
|
+
const gutter = ref((instance === null || instance === void 0 || (_instance$parent = instance.parent) === null || _instance$parent === void 0 ? void 0 : _instance$parent.type.name) === "Row").value && inject("px-row-provide") || ref({
|
|
26
|
+
x: 0,
|
|
27
|
+
y: 0
|
|
28
|
+
});
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("div", {
|
|
31
|
+
class: normalizeClass(["pixelium px-col", {
|
|
32
|
+
[`px-col__span-${spanComputed.value}`]: true,
|
|
33
|
+
[`px-col__offset-${offsetComputed.value}`]: true
|
|
34
|
+
}]),
|
|
35
|
+
style: normalizeStyle({
|
|
36
|
+
paddingLeft: unref(gutter) ? unref(gutter).x / 2 + "px" : void 0,
|
|
37
|
+
paddingRight: unref(gutter) ? unref(gutter).x / 2 + "px" : void 0,
|
|
38
|
+
paddingTop: unref(gutter) ? unref(gutter).y / 2 + "px" : void 0,
|
|
39
|
+
paddingBottom: unref(gutter) ? unref(gutter).y / 2 + "px" : void 0
|
|
40
|
+
})
|
|
41
|
+
}, [renderSlot(_ctx.$slots, "default")], 6);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
57
44
|
});
|
|
58
|
-
export {
|
|
59
|
-
_sfc_main as _
|
|
60
|
-
};
|
|
45
|
+
export { col_default as t };
|
package/es/container/index.js
CHANGED
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
import './css.js'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[`px-container__${props.direction}`]: !!props.direction
|
|
20
|
-
}])
|
|
21
|
-
},
|
|
22
|
-
[
|
|
23
|
-
renderSlot(_ctx.$slots, "default")
|
|
24
|
-
],
|
|
25
|
-
2
|
|
26
|
-
/* CLASS */
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
2
|
+
import { r as CONTAINER_PROVIDE } from "../share/const/provide-key.js";
|
|
3
|
+
import { createElementBlock, defineComponent, normalizeClass, openBlock, provide, ref, renderSlot } from "vue";
|
|
4
|
+
var container_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "Container",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: { direction: null },
|
|
8
|
+
setup(__props) {
|
|
9
|
+
const aside = ref(0);
|
|
10
|
+
provide(CONTAINER_PROVIDE, aside);
|
|
11
|
+
const props = __props;
|
|
12
|
+
return (_ctx, _cache) => {
|
|
13
|
+
return openBlock(), createElementBlock("section", { class: normalizeClass(["pixelium px-container", {
|
|
14
|
+
"px-container__has-aside": !!aside.value,
|
|
15
|
+
[`px-container__${props.direction}`]: !!props.direction
|
|
16
|
+
}]) }, [renderSlot(_ctx.$slots, "default")], 2);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
30
19
|
});
|
|
31
|
-
export {
|
|
32
|
-
_sfc_main as _
|
|
33
|
-
};
|
|
20
|
+
export { container_default as t };
|
package/es/divider/index.js
CHANGED
|
@@ -1,55 +1,41 @@
|
|
|
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
|
-
marginTop: props.direction === "horizontal" ? marginComputed.value : void 0,
|
|
41
|
-
marginBottom: props.direction === "horizontal" ? marginComputed.value : void 0,
|
|
42
|
-
borderBottomWidth: props.direction === "horizontal" ? sizeComputed.value : void 0,
|
|
43
|
-
borderRightWidth: props.direction === "vertical" ? sizeComputed.value : void 0
|
|
44
|
-
})
|
|
45
|
-
},
|
|
46
|
-
null,
|
|
47
|
-
6
|
|
48
|
-
/* CLASS, STYLE */
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
2
|
+
import { _ as E, g as A } from "../vendor.js";
|
|
3
|
+
import { computed, createElementBlock, defineComponent, normalizeClass, normalizeStyle, openBlock } from "vue";
|
|
4
|
+
var divider_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "Divider",
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
direction: { default: "horizontal" },
|
|
9
|
+
variant: { default: "solid" },
|
|
10
|
+
margin: null,
|
|
11
|
+
size: null
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const marginComputed = computed(() => {
|
|
16
|
+
if (E(props.margin)) return;
|
|
17
|
+
return A(props.margin) ? `${props.margin}px` : props.margin;
|
|
18
|
+
});
|
|
19
|
+
const sizeComputed = computed(() => {
|
|
20
|
+
if (E(props.size)) return;
|
|
21
|
+
return A(props.size) ? `${props.size}px` : props.size;
|
|
22
|
+
});
|
|
23
|
+
return (_ctx, _cache) => {
|
|
24
|
+
return openBlock(), createElementBlock("div", {
|
|
25
|
+
class: normalizeClass(["pixelium px-divider", {
|
|
26
|
+
[`px-divider__${props.direction}`]: true,
|
|
27
|
+
[`px-divider__${props.variant}`]: true
|
|
28
|
+
}]),
|
|
29
|
+
style: normalizeStyle({
|
|
30
|
+
marginLeft: props.direction === "vertical" ? marginComputed.value : void 0,
|
|
31
|
+
marginRight: props.direction === "vertical" ? marginComputed.value : void 0,
|
|
32
|
+
marginTop: props.direction === "horizontal" ? marginComputed.value : void 0,
|
|
33
|
+
marginBottom: props.direction === "horizontal" ? marginComputed.value : void 0,
|
|
34
|
+
borderBottomWidth: props.direction === "horizontal" ? sizeComputed.value : void 0,
|
|
35
|
+
borderRightWidth: props.direction === "vertical" ? sizeComputed.value : void 0
|
|
36
|
+
})
|
|
37
|
+
}, null, 6);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
52
40
|
});
|
|
53
|
-
export {
|
|
54
|
-
_sfc_main as _
|
|
55
|
-
};
|
|
41
|
+
export { divider_default as t };
|
package/es/empty/index.css
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
align-items: center;
|
|
6
6
|
}
|
|
7
7
|
.px-empty .px-empty-icon {
|
|
8
|
-
width:
|
|
9
|
-
height:
|
|
8
|
+
width: 36px;
|
|
9
|
+
height: 36px;
|
|
10
10
|
}
|
|
11
11
|
.px-empty-icon-wrapper {
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: center;
|
|
15
|
-
font-size:
|
|
15
|
+
font-size: 36px;
|
|
16
16
|
}
|
|
17
17
|
.px-empty-description {
|
|
18
|
-
margin-top:
|
|
18
|
+
margin-top: 4px;
|
|
19
19
|
}
|
package/es/empty/index.js
CHANGED
|
@@ -1,73 +1,18 @@
|
|
|
1
1
|
import './css.js'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
fill: "none",
|
|
18
|
-
viewBox: "0 0 24 24"
|
|
19
|
-
},
|
|
20
|
-
[..._cache[0] || (_cache[0] = [
|
|
21
|
-
createElementVNode(
|
|
22
|
-
"path",
|
|
23
|
-
{
|
|
24
|
-
fill: "currentColor",
|
|
25
|
-
d: "M11 22h10V8h-2V6h-2v2h-2V6h2V4h-2V2H3v12h2V4h8v6h6v10h-8zm-4-2H5v2H3v-2h2v-2H3v-2h2v2h2v-2h2v2H7zm0 0h2v2H7z"
|
|
26
|
-
},
|
|
27
|
-
null,
|
|
28
|
-
-1
|
|
29
|
-
/* CACHED */
|
|
30
|
-
)
|
|
31
|
-
])],
|
|
32
|
-
4
|
|
33
|
-
/* STYLE */
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
2
|
+
import { n as file_delete_default } from "../vendor.js";
|
|
3
|
+
import { createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref } from "vue";
|
|
4
|
+
var _hoisted_1 = { class: "pixelium px-empty" };
|
|
5
|
+
var _hoisted_2 = { class: "px-empty-icon-wrapper" };
|
|
6
|
+
var _hoisted_3 = { class: "px-empty-description" };
|
|
7
|
+
var empty_default = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "Empty",
|
|
9
|
+
__name: "index",
|
|
10
|
+
props: { description: { default: "No Data" } },
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "image", {}, () => [createVNode(unref(file_delete_default), { class: "px-empty-icon" })])]), createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(props.description), 1)])])]);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
37
17
|
});
|
|
38
|
-
|
|
39
|
-
const _hoisted_2 = { class: "px-empty-icon-wrapper" };
|
|
40
|
-
const _hoisted_3 = { class: "px-empty-description" };
|
|
41
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
|
-
...{
|
|
43
|
-
name: "Empty"
|
|
44
|
-
},
|
|
45
|
-
__name: "index",
|
|
46
|
-
props: {
|
|
47
|
-
description: { default: "No Data" }
|
|
48
|
-
},
|
|
49
|
-
setup(__props) {
|
|
50
|
-
const props = __props;
|
|
51
|
-
return (_ctx, _cache) => {
|
|
52
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
53
|
-
createElementVNode("div", _hoisted_2, [
|
|
54
|
-
renderSlot(_ctx.$slots, "image", {}, () => [
|
|
55
|
-
createVNode(unref(FileDelete), { class: "px-empty-icon" })
|
|
56
|
-
])
|
|
57
|
-
]),
|
|
58
|
-
createElementVNode("div", _hoisted_3, [
|
|
59
|
-
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
60
|
-
createTextVNode(
|
|
61
|
-
toDisplayString(props.description),
|
|
62
|
-
1
|
|
63
|
-
/* TEXT */
|
|
64
|
-
)
|
|
65
|
-
])
|
|
66
|
-
])
|
|
67
|
-
]);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
export {
|
|
72
|
-
_sfc_main as _
|
|
73
|
-
};
|
|
18
|
+
export { empty_default as t };
|
package/es/entry.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { t as inBrowser } from "./share/util/env.js";
|
|
2
|
+
import { t as button_default } from "./button/index.js";
|
|
3
|
+
import { t as button_group_default } from "./button-group/index.js";
|
|
4
|
+
import { t as link_default } from "./link/index.js";
|
|
5
|
+
import { t as message_box_default } from "./message-box/index.js";
|
|
6
|
+
import { t as message_box_wrapped_default } from "./message-box/message-box-wrapped.js";
|
|
7
|
+
import { t as row_default } from "./row/index.js";
|
|
8
|
+
import { t as col_default } from "./col/index.js";
|
|
9
|
+
import { t as divider_default } from "./divider/index.js";
|
|
10
|
+
import { t as space_default } from "./space/index.js";
|
|
11
|
+
import { t as grid_default } from "./grid/index.js";
|
|
12
|
+
import { t as grid_item_default } from "./grid-item/index.js";
|
|
13
|
+
import { t as container_default } from "./container/index.js";
|
|
14
|
+
import { t as main_default } from "./main/index.js";
|
|
15
|
+
import { t as aside_default } from "./aside/index.js";
|
|
16
|
+
import { t as header_default } from "./header/index.js";
|
|
17
|
+
import { t as footer_default } from "./footer/index.js";
|
|
18
|
+
import { t as useThemeMode } from "./share/hook/use-theme-mode.js";
|
|
19
|
+
import { t as icon_default } from "./icon/index.js";
|
|
20
|
+
import { t as input_default } from "./input/index.js";
|
|
21
|
+
import { t as input_number_default } from "./input-number/index.js";
|
|
22
|
+
import { t as textarea_default } from "./textarea/index.js";
|
|
23
|
+
import { t as tag_default } from "./tag/index.js";
|
|
24
|
+
import { t as input_group_default } from "./input-group/index.js";
|
|
25
|
+
import { t as input_group_label_default } from "./input-group-label/index.js";
|
|
26
|
+
import { t as popover_default } from "./popover/index.js";
|
|
27
|
+
import { t as input_tag_default } from "./input-tag/index.js";
|
|
28
|
+
import { t as tooltip_default } from "./tooltip/index.js";
|
|
29
|
+
import { t as empty_default } from "./empty/index.js";
|
|
30
|
+
import { t as virtual_list_default } from "./virtual-list/index.js";
|
|
31
|
+
import { t as auto_complete_default } from "./auto-complete/index.js";
|
|
32
|
+
import { t as mask_default } from "./mask/index.js";
|
|
33
|
+
import { t as spin_default } from "./spin/index.js";
|
|
34
|
+
import { t as select_default } from "./select/index.js";
|
|
35
|
+
import { t as image_default } from "./image/index.js";
|
|
36
|
+
import { t as avatar_default } from "./avatar/index.js";
|
|
37
|
+
import { t as form_default } from "./form/index.js";
|
|
38
|
+
import { t as form_item_default } from "./form-item/index.js";
|
|
39
|
+
import { t as switch_default } from "./switch/index.js";
|
|
40
|
+
import { t as slider_default } from "./slider/index.js";
|
|
41
|
+
import { t as radio_default } from "./radio/index.js";
|
|
42
|
+
import { t as radio_group_default } from "./radio-group/index.js";
|
|
43
|
+
import { t as checkbox_default } from "./checkbox/index.js";
|
|
44
|
+
import { t as checkbox_group_default } from "./checkbox-group/index.js";
|
|
45
|
+
import { t as text_outline_default } from "./text-outline/index.js";
|
|
46
|
+
var components = [
|
|
47
|
+
button_default,
|
|
48
|
+
button_group_default,
|
|
49
|
+
link_default,
|
|
50
|
+
message_box_wrapped_default,
|
|
51
|
+
row_default,
|
|
52
|
+
col_default,
|
|
53
|
+
divider_default,
|
|
54
|
+
space_default,
|
|
55
|
+
grid_default,
|
|
56
|
+
grid_item_default,
|
|
57
|
+
container_default,
|
|
58
|
+
main_default,
|
|
59
|
+
aside_default,
|
|
60
|
+
header_default,
|
|
61
|
+
footer_default,
|
|
62
|
+
icon_default,
|
|
63
|
+
input_default,
|
|
64
|
+
input_number_default,
|
|
65
|
+
textarea_default,
|
|
66
|
+
input_group_default,
|
|
67
|
+
input_group_label_default,
|
|
68
|
+
tag_default,
|
|
69
|
+
input_tag_default,
|
|
70
|
+
tooltip_default,
|
|
71
|
+
popover_default,
|
|
72
|
+
empty_default,
|
|
73
|
+
auto_complete_default,
|
|
74
|
+
mask_default,
|
|
75
|
+
spin_default,
|
|
76
|
+
select_default,
|
|
77
|
+
virtual_list_default,
|
|
78
|
+
image_default,
|
|
79
|
+
avatar_default,
|
|
80
|
+
form_default,
|
|
81
|
+
form_item_default,
|
|
82
|
+
switch_default,
|
|
83
|
+
slider_default,
|
|
84
|
+
radio_default,
|
|
85
|
+
radio_group_default,
|
|
86
|
+
checkbox_default,
|
|
87
|
+
checkbox_group_default,
|
|
88
|
+
text_outline_default
|
|
89
|
+
];
|
|
90
|
+
var defaultPrefix = "Px";
|
|
91
|
+
var install = (app, options = { prefix: defaultPrefix }) => {
|
|
92
|
+
components.forEach((component) => {
|
|
93
|
+
if (component.name) app.component(options.prefix + component.name, component);
|
|
94
|
+
});
|
|
95
|
+
if (options.attachToApp !== false) app.config.globalProperties.PixeliumVue = {
|
|
96
|
+
message: message_box_default,
|
|
97
|
+
useThemeMode
|
|
98
|
+
};
|
|
99
|
+
if (options.attachToWindow !== false && inBrowser()) window.$message = message_box_default;
|
|
100
|
+
};
|
|
101
|
+
var lib_default = { install };
|
|
102
|
+
export { lib_default as n, install as t };
|