hzzt-plus 0.0.1-dev-08 → 0.0.2-dev-01
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/dist/index.full.js +5788 -52
- package/dist/index.full.min.js +18 -18
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +18 -18
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +5788 -54
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/icon/index.d.ts +5 -0
- package/es/components/icon/index.mjs +17 -0
- package/es/components/icon/index.mjs.map +1 -0
- package/es/components/icon/src/index.mjs +34 -0
- package/es/components/icon/src/index.mjs.map +1 -0
- package/es/components/icon/src/index.vue.d.ts +102 -0
- package/es/components/icon/style/css.d.ts +2 -0
- package/es/components/icon/style/css.mjs +3 -0
- package/es/components/icon/style/css.mjs.map +1 -0
- package/es/components/icon/style/index.d.ts +2 -0
- package/es/components/icon/style/index.mjs +3 -0
- package/es/components/icon/style/index.mjs.map +1 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +1 -0
- package/es/components/index.mjs.map +1 -1
- package/es/directives/height/index.mjs +14 -16
- package/es/directives/height/index.mjs.map +1 -1
- package/es/directives/highlight/index.d.ts +3 -0
- package/es/directives/highlight/index.mjs +30 -0
- package/es/directives/highlight/index.mjs.map +1 -0
- package/es/directives/index.d.ts +1 -0
- package/es/directives/index.mjs +1 -0
- package/es/directives/index.mjs.map +1 -1
- package/es/index.mjs +2 -0
- package/es/index.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/icon/index.d.ts +5 -0
- package/lib/components/icon/index.js +42 -0
- package/lib/components/icon/index.js.map +1 -0
- package/lib/components/icon/src/index.js +38 -0
- package/lib/components/icon/src/index.js.map +1 -0
- package/lib/components/icon/src/index.vue.d.ts +102 -0
- package/lib/components/icon/style/css.d.ts +2 -0
- package/lib/components/icon/style/css.js +6 -0
- package/lib/components/icon/style/css.js.map +1 -0
- package/lib/components/icon/style/index.d.ts +2 -0
- package/lib/components/icon/style/index.js +6 -0
- package/lib/components/icon/style/index.js.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/directives/height/index.js +14 -16
- package/lib/directives/height/index.js.map +1 -1
- package/lib/directives/highlight/index.d.ts +3 -0
- package/lib/directives/highlight/index.js +34 -0
- package/lib/directives/highlight/index.js.map +1 -0
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/index.js +2 -0
- package/lib/directives/index.js.map +1 -1
- package/lib/index.js +21 -17
- package/lib/index.js.map +1 -1
- package/lib/utils/vue/icon.js +14 -14
- package/lib/utils/vue/icon.js.map +1 -1
- package/package.json +1 -1
- package/theme/hzzt-icon.css +0 -0
- package/theme/src/icon.scss +0 -0
- package/theme/src/index.scss +1 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
name: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
type: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
name: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
type: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
}>> & {
|
|
21
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
22
|
+
}>>;
|
|
23
|
+
attrs: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
componentName: import("vue").ComputedRef<string>;
|
|
27
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
28
|
+
readonly size: {
|
|
29
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
30
|
+
readonly required: false;
|
|
31
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
32
|
+
__epPropKey: true;
|
|
33
|
+
};
|
|
34
|
+
readonly color: {
|
|
35
|
+
readonly type: import("vue").PropType<string>;
|
|
36
|
+
readonly required: false;
|
|
37
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
38
|
+
__epPropKey: true;
|
|
39
|
+
};
|
|
40
|
+
}, {
|
|
41
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
42
|
+
readonly size: {
|
|
43
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
44
|
+
readonly required: false;
|
|
45
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
46
|
+
__epPropKey: true;
|
|
47
|
+
};
|
|
48
|
+
readonly color: {
|
|
49
|
+
readonly type: import("vue").PropType<string>;
|
|
50
|
+
readonly required: false;
|
|
51
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
52
|
+
__epPropKey: true;
|
|
53
|
+
};
|
|
54
|
+
}>> & {
|
|
55
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
56
|
+
}>>;
|
|
57
|
+
ns: {
|
|
58
|
+
namespace: import("vue").ComputedRef<string>;
|
|
59
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
60
|
+
e: (element?: string | undefined) => string;
|
|
61
|
+
m: (modifier?: string | undefined) => string;
|
|
62
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
63
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
64
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
65
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
66
|
+
is: {
|
|
67
|
+
(name: string, state: boolean | undefined): string;
|
|
68
|
+
(name: string): string;
|
|
69
|
+
};
|
|
70
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
71
|
+
cssVarName: (name: string) => string;
|
|
72
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
73
|
+
cssVarBlockName: (name: string) => string;
|
|
74
|
+
};
|
|
75
|
+
style: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
76
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
77
|
+
readonly size: {
|
|
78
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
79
|
+
readonly required: false;
|
|
80
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
81
|
+
__epPropKey: true;
|
|
82
|
+
};
|
|
83
|
+
readonly color: {
|
|
84
|
+
readonly type: import("vue").PropType<string>;
|
|
85
|
+
readonly required: false;
|
|
86
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
87
|
+
__epPropKey: true;
|
|
88
|
+
};
|
|
89
|
+
}>>, {}>> & Record<string, any>;
|
|
90
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
91
|
+
name: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
required: true;
|
|
94
|
+
};
|
|
95
|
+
type: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
}>>, {
|
|
100
|
+
type: string;
|
|
101
|
+
}>;
|
|
102
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var index$1 = require('./dropdown/index.js');
|
|
|
7
7
|
var index$2 = require('./collapse/index.js');
|
|
8
8
|
var index$3 = require('./config-provider/index.js');
|
|
9
9
|
var index$4 = require('./tab/index.js');
|
|
10
|
+
var index$5 = require('./icon/index.js');
|
|
10
11
|
var configProviderProps = require('./config-provider/src/config-provider-props.js');
|
|
11
12
|
var constants = require('./config-provider/src/constants.js');
|
|
12
13
|
var useGlobalConfig = require('./config-provider/src/hooks/use-global-config.js');
|
|
@@ -18,6 +19,7 @@ exports.HzztDropdown = index$1.HzztDropdown;
|
|
|
18
19
|
exports.HzztCollapse = index$2.HzztCollapse;
|
|
19
20
|
exports.HzztConfigProvider = index$3.HzztConfigProvider;
|
|
20
21
|
exports.HzztTab = index$4.HzztTab;
|
|
22
|
+
exports.HzztIcon = index$5.HzztIcon;
|
|
21
23
|
exports.configProviderProps = configProviderProps.configProviderProps;
|
|
22
24
|
exports.configProviderContextKey = constants.configProviderContextKey;
|
|
23
25
|
exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -21,24 +21,22 @@ function handler() {
|
|
|
21
21
|
}
|
|
22
22
|
const Height = {
|
|
23
23
|
mounted(el, binding) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
nodeList.set(element, []);
|
|
24
|
+
if (!nodeList.has(el)) {
|
|
25
|
+
nodeList.set(el, []);
|
|
27
26
|
}
|
|
28
|
-
nodeList.get(
|
|
29
|
-
documentHandler: createDocumentHandler(
|
|
27
|
+
nodeList.get(el).push({
|
|
28
|
+
documentHandler: createDocumentHandler(el, binding),
|
|
30
29
|
bindingFn: binding.value
|
|
31
30
|
});
|
|
32
31
|
},
|
|
33
32
|
updated(el, binding) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
nodeList.set(element, []);
|
|
33
|
+
if (!nodeList.has(el)) {
|
|
34
|
+
nodeList.set(el, []);
|
|
37
35
|
}
|
|
38
|
-
const handlers = nodeList.get(
|
|
36
|
+
const handlers = nodeList.get(el);
|
|
39
37
|
const oldHandlerIndex = handlers.findIndex((item) => item.bindingFn === binding.oldValue);
|
|
40
38
|
const newHandler = {
|
|
41
|
-
documentHandler: createDocumentHandler(
|
|
39
|
+
documentHandler: createDocumentHandler(el, binding),
|
|
42
40
|
bindingFn: binding.value
|
|
43
41
|
};
|
|
44
42
|
if (oldHandlerIndex >= 0) {
|
|
@@ -47,16 +45,16 @@ const Height = {
|
|
|
47
45
|
handlers.push(newHandler);
|
|
48
46
|
}
|
|
49
47
|
},
|
|
50
|
-
unmounted(el
|
|
51
|
-
|
|
52
|
-
nodeList.delete(element);
|
|
48
|
+
unmounted(el) {
|
|
49
|
+
nodeList.delete(el);
|
|
53
50
|
}
|
|
54
51
|
};
|
|
55
|
-
function createDocumentHandler(el,
|
|
52
|
+
function createDocumentHandler(el, binding) {
|
|
53
|
+
const { element, distY, type } = getEffectiveValue(el, binding.value);
|
|
56
54
|
const cssProp = type ? type + "Height" : "height";
|
|
57
|
-
el.style[cssProp] =
|
|
55
|
+
el.style[cssProp] = element.clientHeight + distY + "px";
|
|
58
56
|
return function() {
|
|
59
|
-
el.style[cssProp] =
|
|
57
|
+
el.style[cssProp] = element.clientHeight + distY + "px";
|
|
60
58
|
};
|
|
61
59
|
}
|
|
62
60
|
function getEffectiveValue(el, val) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/directives/height/index.ts"],"sourcesContent":["import {isClient, isNumber, isObject} from '@hzzt-plus/utils'\n\nimport type {\n DirectiveBinding,\n ObjectDirective,\n} from 'vue'\n\ntype DocumentHandler = <T>() => void\ntype FlushList = Map<\n HTMLElement,\n {\n documentHandler: DocumentHandler\n bindingFn: (...args: unknown[]) => unknown\n }[]\n>\n\nconst nodeList: FlushList = new Map();\n\nif (isClient) {\n window.addEventListener('resize', handler);\n document.addEventListener('fullscreenchange', handler);\n}\n\nfunction handler() {\n for (const handlers of nodeList.values()) {\n for (const {documentHandler} of handlers) {\n documentHandler()\n }\n }\n}\n\n// v-height\n// 默认高度为当前元素的父元素高度\n\n// v-height = el\n// 当前元素的高度设置为el的高度\n\n// v-height = 60\n// 当前元素的高度设置为父元素高度+60px\n\n// v-height = {el: el, distY: 60}\n// 当前元素的高度设置为el的高度+60px\nconst Height: ObjectDirective = {\n // 当被绑定的元素插入到 DOM 中时……\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/directives/height/index.ts"],"sourcesContent":["import {isClient, isNumber, isObject} from '@hzzt-plus/utils'\n\nimport type {\n DirectiveBinding,\n ObjectDirective,\n} from 'vue'\n\ntype DocumentHandler = <T>() => void\ntype FlushList = Map<\n HTMLElement,\n {\n documentHandler: DocumentHandler\n bindingFn: (...args: unknown[]) => unknown\n }[]\n>\n\nconst nodeList: FlushList = new Map();\n\nif (isClient) {\n window.addEventListener('resize', handler);\n document.addEventListener('fullscreenchange', handler);\n}\n\nfunction handler() {\n for (const handlers of nodeList.values()) {\n for (const {documentHandler} of handlers) {\n documentHandler()\n }\n }\n}\n\n// v-height\n// 默认高度为当前元素的父元素高度\n\n// v-height = el\n// 当前元素的高度设置为el的高度\n\n// v-height = 60\n// 当前元素的高度设置为父元素高度+60px\n\n// v-height = {el: el, distY: 60}\n// 当前元素的高度设置为el的高度+60px\nconst Height: ObjectDirective = {\n // 当被绑定的元素插入到 DOM 中时……\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n if (!nodeList.has(el)) {\n nodeList.set(el, []);\n }\n nodeList.get(el)!.push({\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value,\n })\n },\n updated(el: HTMLElement, binding: DirectiveBinding) {\n if (!nodeList.has(el)) {\n nodeList.set(el, []);\n }\n const handlers = nodeList.get(el)!\n const oldHandlerIndex = handlers.findIndex(\n (item) => item.bindingFn === binding.oldValue\n )\n const newHandler = {\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value,\n }\n\n if (oldHandlerIndex >= 0) {\n // replace the old handler to the new handler\n handlers.splice(oldHandlerIndex, 1, newHandler)\n } else {\n handlers.push(newHandler)\n }\n },\n // 只调用一次,指令与元素解绑时调用。\n unmounted(el: HTMLElement) {\n nodeList.delete(el);\n },\n};\n\nfunction createDocumentHandler(el: HTMLElement, binding: DirectiveBinding) {\n const {element, distY, type} = getEffectiveValue(el, binding.value);\n const cssProp = type ? (type + 'Height') : 'height';\n el.style[cssProp] = element.clientHeight + distY + 'px';\n return function () {\n el.style[cssProp] = element.clientHeight + distY + 'px';\n }\n}\n\nfunction getEffectiveValue(el, val) {\n let element = el.parentElement;\n let distY = 0;\n let type = '';\n if (!val) {\n element = el.parentElement;\n distY = 0;\n } else if (val instanceof HTMLElement) {\n element = val;\n distY = 0;\n } else if (isNumber(val)) {\n element = el.parentElement;\n distY = val;\n } else if (isObject(val)) {\n element = val?.el || el.parentElement;\n distY = val?.distY || 0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,CAAC;AACjC,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC;AAChB,EAAE,IAAI,IAAI,GAAG,EAAE,CAAC;AAChB,EAAE,IAAI,CAAC,GAAG,EAAE;AACZ,IAAI,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC;AAC/B,IAAI,KAAK,GAAG,CAAC,CAAC;AACd,GAAG,MAAM,IAAI,GAAG,YAAY,WAAW,EAAE;AACzC,IAAI,OAAO,GAAG,GAAG,CAAC;AAClB,IAAI,KAAK,GAAG,CAAC,CAAC;AACd,GAAG,MAAM,IAAIC,cAAQ,CAAC,GAAG,CAAC,EAAE;AAC5B,IAAI,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC;AAC/B,IAAI,KAAK,GAAG,GAAG,CAAC;AAChB,GAAG,MAAM,IAAIC,eAAQ,CAAC,GAAG,CAAC,EAAE;AAC5B,IAAI,OAAO,GAAG,CAAC,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,aAAa,CAAC;AAClE,IAAI,KAAK,GAAG,CAAC,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC;AACpD,IAAI,IAAI,GAAG,CAAC,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,KAAK,EAAE,CAAC;AACnD,GAAG;AACH,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAClC;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const Highlight = {
|
|
6
|
+
beforeMount: handle,
|
|
7
|
+
updated: handle
|
|
8
|
+
};
|
|
9
|
+
function handle(el, binding) {
|
|
10
|
+
const { form = false } = binding.modifiers;
|
|
11
|
+
const { color = "#ff0000", fontSize = "16px", show = true } = binding.value || {};
|
|
12
|
+
el.style.color = show ? color : "";
|
|
13
|
+
el.style.fontSize = show ? fontSize : "";
|
|
14
|
+
if (form) {
|
|
15
|
+
setCssText(el, show, "--el-text-color-regular", color);
|
|
16
|
+
setCssText(el, show, "--font-size", fontSize);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function setCssText(el, show, prop, value) {
|
|
20
|
+
let cssText = el.style.cssText;
|
|
21
|
+
if (show) {
|
|
22
|
+
let cssText2 = el.style.cssText;
|
|
23
|
+
if (!~cssText2.indexOf(prop)) {
|
|
24
|
+
cssText2 = `${cssText2};${prop}: ${value}`;
|
|
25
|
+
}
|
|
26
|
+
el.style.cssText = cssText2;
|
|
27
|
+
} else {
|
|
28
|
+
cssText = cssText.replace(`${prop}: ${value};`, "");
|
|
29
|
+
el.style.cssText = cssText;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
exports["default"] = Highlight;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/directives/highlight/index.ts"],"sourcesContent":["import type {DirectiveBinding, ObjectDirective} from \"vue\";\n\nconst Highlight: ObjectDirective = {\n // 只调用一次,指令第一次绑定到元素时调用。在这里可以进行一次性的初始化设置。\n beforeMount: handle,\n updated: handle,\n};\n\nfunction handle(el: HTMLElement, binding: DirectiveBinding) {\n const {form = false} = binding.modifiers;\n const {color = '#ff0000', fontSize = '16px', show = true} = binding.value || {};\n el.style.color = show ? color : '';\n el.style.fontSize = show ? fontSize : '';\n if (form) {\n setCssText(el, show, '--el-text-color-regular', color);\n setCssText(el, show, '--font-size', fontSize);\n }\n}\n\nfunction setCssText(el: HTMLElement, show: boolean, prop: string, value: string) {\n let cssText = el.style.cssText;\n if (show) {\n let cssText = el.style.cssText;\n if (!~cssText.indexOf(prop)) {\n cssText = `${cssText};${prop}: ${value}`;\n }\n el.style.c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AAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AACjD,KAAK;AACL,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC;AAChC,GAAG,MAAM;AACT,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACxD,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,GAAG;AACH;;;;"}
|
package/lib/directives/index.js
CHANGED
|
@@ -5,10 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var index = require('./download/index.js');
|
|
6
6
|
var index$1 = require('./height/index.js');
|
|
7
7
|
var index$2 = require('./blur/index.js');
|
|
8
|
+
var index$3 = require('./highlight/index.js');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
exports.Download = index["default"];
|
|
12
13
|
exports.Height = index$1["default"];
|
|
13
14
|
exports.Blur = index$2["default"];
|
|
15
|
+
exports.Highlight = index$3["default"];
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -16,14 +16,16 @@ var constants = require('./components/config-provider/src/constants.js');
|
|
|
16
16
|
var useGlobalConfig = require('./components/config-provider/src/hooks/use-global-config.js');
|
|
17
17
|
var index$3 = require('./components/config-provider/index.js');
|
|
18
18
|
var index$4 = require('./components/tab/index.js');
|
|
19
|
+
var index$5 = require('./components/icon/index.js');
|
|
19
20
|
var key = require('./constants/key.js');
|
|
20
21
|
var size = require('./constants/size.js');
|
|
21
22
|
var date = require('./constants/date.js');
|
|
22
|
-
var index$
|
|
23
|
-
var index$
|
|
24
|
-
var index$
|
|
25
|
-
var index$
|
|
26
|
-
var index$
|
|
23
|
+
var index$6 = require('./directives/download/index.js');
|
|
24
|
+
var index$7 = require('./directives/height/index.js');
|
|
25
|
+
var index$8 = require('./directives/blur/index.js');
|
|
26
|
+
var index$9 = require('./directives/highlight/index.js');
|
|
27
|
+
var index$a = require('./hooks/use-locale/index.js');
|
|
28
|
+
var index$b = require('./hooks/use-size/index.js');
|
|
27
29
|
|
|
28
30
|
const install = defaults["default"].install;
|
|
29
31
|
const version = defaults["default"].version;
|
|
@@ -39,23 +41,25 @@ exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
|
|
|
39
41
|
exports.useGlobalConfig = useGlobalConfig.useGlobalConfig;
|
|
40
42
|
exports.HzztConfigProvider = index$3.HzztConfigProvider;
|
|
41
43
|
exports.HzztTab = index$4.HzztTab;
|
|
44
|
+
exports.HzztIcon = index$5.HzztIcon;
|
|
42
45
|
exports.INSTALLED_KEY = key.INSTALLED_KEY;
|
|
43
46
|
exports.componentSizeMap = size.componentSizeMap;
|
|
44
47
|
exports.componentSizes = size.componentSizes;
|
|
45
48
|
exports.WEEK_DAYS = date.WEEK_DAYS;
|
|
46
49
|
exports.datePickTypes = date.datePickTypes;
|
|
47
|
-
exports.Download = index$
|
|
48
|
-
exports.Height = index$
|
|
49
|
-
exports.Blur = index$
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
50
|
+
exports.Download = index$6["default"];
|
|
51
|
+
exports.Height = index$7["default"];
|
|
52
|
+
exports.Blur = index$8["default"];
|
|
53
|
+
exports.Highlight = index$9["default"];
|
|
54
|
+
exports.buildLocaleContext = index$a.buildLocaleContext;
|
|
55
|
+
exports.buildTranslator = index$a.buildTranslator;
|
|
56
|
+
exports.localeContextKey = index$a.localeContextKey;
|
|
57
|
+
exports.translate = index$a.translate;
|
|
58
|
+
exports.useLocale = index$a.useLocale;
|
|
59
|
+
exports.SIZE_INJECTION_KEY = index$b.SIZE_INJECTION_KEY;
|
|
60
|
+
exports.useGlobalSize = index$b.useGlobalSize;
|
|
61
|
+
exports.useSizeProp = index$b.useSizeProp;
|
|
62
|
+
exports.useSizeProps = index$b.useSizeProps;
|
|
59
63
|
exports.install = install;
|
|
60
64
|
exports.version = version;
|
|
61
65
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":["installer"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/utils/vue/icon.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var Icons = require('@element-plus/icons-vue');
|
|
6
6
|
require('./props/index.js');
|
|
7
7
|
var runtime = require('./props/runtime.js');
|
|
8
8
|
|
|
@@ -12,25 +12,25 @@ const iconPropType = runtime.definePropType([
|
|
|
12
12
|
Function
|
|
13
13
|
]);
|
|
14
14
|
const CloseComponents = {
|
|
15
|
-
Close:
|
|
15
|
+
Close: Icons.Close
|
|
16
16
|
};
|
|
17
17
|
const TypeComponents = {
|
|
18
|
-
Close:
|
|
19
|
-
SuccessFilled:
|
|
20
|
-
InfoFilled:
|
|
21
|
-
WarningFilled:
|
|
22
|
-
CircleCloseFilled:
|
|
18
|
+
Close: Icons.Close,
|
|
19
|
+
SuccessFilled: Icons.SuccessFilled,
|
|
20
|
+
InfoFilled: Icons.InfoFilled,
|
|
21
|
+
WarningFilled: Icons.WarningFilled,
|
|
22
|
+
CircleCloseFilled: Icons.CircleCloseFilled
|
|
23
23
|
};
|
|
24
24
|
const TypeComponentsMap = {
|
|
25
|
-
success:
|
|
26
|
-
warning:
|
|
27
|
-
error:
|
|
28
|
-
info:
|
|
25
|
+
success: Icons.SuccessFilled,
|
|
26
|
+
warning: Icons.WarningFilled,
|
|
27
|
+
error: Icons.CircleCloseFilled,
|
|
28
|
+
info: Icons.InfoFilled
|
|
29
29
|
};
|
|
30
30
|
const ValidateComponentsMap = {
|
|
31
|
-
validating:
|
|
32
|
-
success:
|
|
33
|
-
error:
|
|
31
|
+
validating: Icons.Loading,
|
|
32
|
+
success: Icons.CircleCheck,
|
|
33
|
+
error: Icons.CircleClose
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
exports.CloseComponents = CloseComponents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../../../packages/utils/vue/icon.ts"],"sourcesContent":["import {\n CircleCheck,\n CircleClose,\n CircleCloseFilled,\n Close,\n InfoFilled,\n Loading,\n SuccessFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { definePropType } from './props'\n\nimport type { Component } from 'vue'\n\nexport const iconPropType = definePropType<string | Component>([\n String,\n Object,\n Function,\n])\n\nexport const CloseComponents = {\n Close,\n}\n\nexport const TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled,\n}\n\nexport const TypeComponentsMap = {\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled,\n}\n\nexport const ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose,\n}\n"],"names":["definePropType","Close","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","Loading","CircleCheck","CircleClose"],"mappings":";;;;;;;;AAWY,MAAC,YAAY,GAAGA,sBAAc,CAAC;AAC3C,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,SAAEC,
|
|
1
|
+
{"version":3,"file":"icon.js","sources":["../../../../../packages/utils/vue/icon.ts"],"sourcesContent":["import {\n CircleCheck,\n CircleClose,\n CircleCloseFilled,\n Close,\n InfoFilled,\n Loading,\n SuccessFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { definePropType } from './props'\n\nimport type { Component } from 'vue'\n\nexport const iconPropType = definePropType<string | Component>([\n String,\n Object,\n Function,\n])\n\nexport const CloseComponents = {\n Close,\n}\n\nexport const TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled,\n}\n\nexport const TypeComponentsMap = {\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled,\n}\n\nexport const ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose,\n}\n"],"names":["definePropType","Close","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","Loading","CircleCheck","CircleClose"],"mappings":";;;;;;;;AAWY,MAAC,YAAY,GAAGA,sBAAc,CAAC;AAC3C,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,SAAEC,WAAK;AACP,EAAE;AACU,MAAC,cAAc,GAAG;AAC9B,SAAEA,WAAK;AACP,iBAAEC,mBAAa;AACf,cAAEC,gBAAU;AACZ,iBAAEC,mBAAa;AACf,qBAAEC,uBAAiB;AACnB,EAAE;AACU,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAEH,mBAAa;AACxB,EAAE,OAAO,EAAEE,mBAAa;AACxB,EAAE,KAAK,EAAEC,uBAAiB;AAC1B,EAAE,IAAI,EAAEF,gBAAU;AAClB,EAAE;AACU,MAAC,qBAAqB,GAAG;AACrC,EAAE,UAAU,EAAEG,aAAO;AACrB,EAAE,OAAO,EAAEC,iBAAW;AACtB,EAAE,KAAK,EAAEC,iBAAW;AACpB;;;;;;;;"}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
package/theme/src/index.scss
CHANGED