@tagplus/components 5.3.8 → 5.3.11
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/es/node_modules/@element-plus/icons-vue/dist/index.mjs +20 -29
- package/dist/es/node_modules/@popperjs/core/dist/index.mjs +586 -0
- package/dist/es/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +0 -5
- package/dist/es/node_modules/@vueuse/core/index.mjs +58 -103
- package/dist/es/node_modules/@vueuse/shared/index.mjs +16 -47
- package/dist/es/node_modules/element-plus/es/constants/size.mjs +6 -1
- package/dist/es/node_modules/element-plus/es/hooks/use-focus-controller/index.mjs +14 -39
- package/dist/es/node_modules/element-plus/es/hooks/use-id/index.mjs +5 -8
- package/dist/es/node_modules/element-plus/es/hooks/use-locale/index.mjs +7 -12
- package/dist/es/node_modules/element-plus/es/hooks/use-namespace/index.mjs +7 -22
- package/dist/es/node_modules/element-plus/es/hooks/use-prop/index.mjs +1 -4
- package/dist/es/node_modules/element-plus/es/hooks/use-size/index.mjs +3 -3
- package/dist/es/node_modules/element-plus/es/locale/lang/en.mjs +28 -31
- package/dist/es/node_modules/element-plus/es/utils/dom/aria.mjs +6 -14
- package/dist/es/node_modules/element-plus/es/utils/error.mjs +4 -3
- package/dist/es/node_modules/element-plus/es/utils/vue/props/runtime.mjs +19 -25
- package/dist/es/src/components/Autosuggest/Autosuggest.vue.mjs +1 -1
- package/dist/es/src/components/Autosuggest/autosuggest-props.mjs +2 -2
- package/dist/es/src/components/Autosuggest/option.vue.mjs +2 -2
- package/dist/es/src/components/Autosuggest/select-dropdown.vue.mjs +2 -2
- package/dist/es/src/components/Autosuggest/useSelect.mjs +1 -1
- package/dist/es/src/components/Inline/Inline.vue.mjs +1 -1
- package/dist/es/src/components/InputNumber/InputNumber.vue.mjs +25 -9
- package/dist/es/src/components/InputNumber/input-number.mjs +10 -2
- package/dist/es/src/components/Loader/Loader.vue.mjs +1 -1
- package/dist/es/src/components/Money/Money.vue.mjs +1 -1
- package/dist/es/src/components/OptionsList/OptionsList.vue.mjs +1 -1
- package/dist/es/src/components/OptionsListItem/OptionsListItem.vue.mjs +1 -1
- package/dist/es/src/components/Percent/Percent.vue.mjs +3 -3
- package/dist/es/src/components/Skeleton/Skeleton.vue.mjs +1 -1
- package/dist/es/src/components/Step/Step.vue.mjs +1 -1
- package/dist/es/src/components/Tip/Tip.vue.mjs +7 -9
- package/dist/es/src/utils/constants.mjs +2 -2
- package/dist/es/src/utils/use-derived-namespace.mjs +1 -1
- package/dist/es/src/utils/use-form-common-props.mjs +1 -1
- package/dist/es/src/utils/use-id.mjs +2 -2
- package/dist/lib/node_modules/@element-plus/icons-vue/dist/index.js +19 -28
- package/dist/lib/node_modules/@popperjs/core/dist/index.js +586 -0
- package/dist/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -5
- package/dist/lib/node_modules/@vueuse/core/index.js +56 -100
- package/dist/lib/node_modules/@vueuse/shared/index.js +15 -46
- package/dist/lib/node_modules/element-plus/es/constants/size.js +6 -1
- package/dist/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +14 -39
- package/dist/lib/node_modules/element-plus/es/hooks/use-id/index.js +5 -8
- package/dist/lib/node_modules/element-plus/es/hooks/use-locale/index.js +6 -11
- package/dist/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +7 -22
- package/dist/lib/node_modules/element-plus/es/hooks/use-prop/index.js +1 -4
- package/dist/lib/node_modules/element-plus/es/hooks/use-size/index.js +3 -3
- package/dist/lib/node_modules/element-plus/es/locale/lang/en.js +28 -31
- package/dist/lib/node_modules/element-plus/es/utils/dom/aria.js +6 -14
- package/dist/lib/node_modules/element-plus/es/utils/error.js +4 -3
- package/dist/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +19 -25
- package/dist/lib/src/components/Autosuggest/autosuggest-props.js +2 -2
- package/dist/lib/src/components/Autosuggest/option.vue.js +2 -2
- package/dist/lib/src/components/Autosuggest/select-dropdown.vue.js +1 -1
- package/dist/lib/src/components/Autosuggest/useSelect.js +1 -1
- package/dist/lib/src/components/InputNumber/InputNumber.vue.js +24 -8
- package/dist/lib/src/components/InputNumber/input-number.js +10 -2
- package/dist/lib/src/components/Percent/Percent.vue.js +2 -2
- package/dist/lib/src/components/Tip/Tip.vue.js +6 -8
- package/dist/lib/src/utils/constants.js +2 -2
- package/dist/lib/src/utils/use-derived-namespace.js +1 -1
- package/dist/lib/src/utils/use-form-common-props.js +1 -1
- package/dist/lib/src/utils/use-id.js +1 -1
- package/package.json +1 -1
- package/dist/es/node_modules/@popperjs/core/lib/enums.mjs +0 -22
- package/dist/es/node_modules/element-plus/es/utils/types.mjs +0 -9
- package/dist/lib/node_modules/@popperjs/core/lib/enums.js +0 -22
- package/dist/lib/node_modules/element-plus/es/utils/types.js +0 -9
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("../shared/index.js");
|
|
4
4
|
const vue = require("vue");
|
|
5
|
+
const defaultWindow = index.isClient ? window : void 0;
|
|
5
6
|
function unrefElement(elRef) {
|
|
6
7
|
var _a;
|
|
7
|
-
const plain = index.
|
|
8
|
+
const plain = index.toValue(elRef);
|
|
8
9
|
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
9
10
|
}
|
|
10
|
-
const defaultWindow = index.isClient ? window : void 0;
|
|
11
11
|
function useEventListener(...args) {
|
|
12
12
|
let target;
|
|
13
13
|
let events;
|
|
14
14
|
let listeners;
|
|
15
15
|
let options;
|
|
16
|
-
if (
|
|
16
|
+
if (typeof args[0] === "string" || Array.isArray(args[0])) {
|
|
17
17
|
[events, listeners, options] = args;
|
|
18
18
|
target = defaultWindow;
|
|
19
19
|
} else {
|
|
@@ -34,14 +34,21 @@ function useEventListener(...args) {
|
|
|
34
34
|
el.addEventListener(event, listener, options2);
|
|
35
35
|
return () => el.removeEventListener(event, listener, options2);
|
|
36
36
|
};
|
|
37
|
-
const stopWatch = vue.watch(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
const stopWatch = vue.watch(
|
|
38
|
+
() => [unrefElement(target), index.toValue(options)],
|
|
39
|
+
([el, options2]) => {
|
|
40
|
+
cleanup();
|
|
41
|
+
if (!el)
|
|
42
|
+
return;
|
|
43
|
+
const optionsClone = index.isObject(options2) ? { ...options2 } : options2;
|
|
44
|
+
cleanups.push(
|
|
45
|
+
...events.flatMap((event) => {
|
|
46
|
+
return listeners.map((listener) => register(el, event, listener, optionsClone));
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
},
|
|
50
|
+
{ immediate: true, flush: "post" }
|
|
51
|
+
);
|
|
45
52
|
const stop = () => {
|
|
46
53
|
stopWatch();
|
|
47
54
|
cleanup();
|
|
@@ -49,33 +56,25 @@ function useEventListener(...args) {
|
|
|
49
56
|
index.tryOnScopeDispose(stop);
|
|
50
57
|
return stop;
|
|
51
58
|
}
|
|
52
|
-
function
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
function useMounted() {
|
|
60
|
+
const isMounted = vue.ref(false);
|
|
61
|
+
const instance = vue.getCurrentInstance();
|
|
62
|
+
if (instance) {
|
|
63
|
+
vue.onMounted(() => {
|
|
64
|
+
isMounted.value = true;
|
|
65
|
+
}, instance);
|
|
66
|
+
}
|
|
67
|
+
return isMounted;
|
|
68
|
+
}
|
|
69
|
+
function useSupported(callback) {
|
|
70
|
+
const isMounted = useMounted();
|
|
71
|
+
return vue.computed(() => {
|
|
72
|
+
isMounted.value;
|
|
73
|
+
return Boolean(callback());
|
|
74
|
+
});
|
|
58
75
|
}
|
|
59
|
-
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
60
|
-
const globalKey = "__vueuse_ssr_handlers__";
|
|
61
|
-
_global[globalKey] = _global[globalKey] || {};
|
|
62
|
-
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
63
|
-
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
64
|
-
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
65
|
-
var __objRest$2 = (source, exclude) => {
|
|
66
|
-
var target = {};
|
|
67
|
-
for (var prop in source)
|
|
68
|
-
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
69
|
-
target[prop] = source[prop];
|
|
70
|
-
if (source != null && __getOwnPropSymbols$g)
|
|
71
|
-
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
72
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
73
|
-
target[prop] = source[prop];
|
|
74
|
-
}
|
|
75
|
-
return target;
|
|
76
|
-
};
|
|
77
76
|
function useResizeObserver(target, callback, options = {}) {
|
|
78
|
-
const
|
|
77
|
+
const { window: window2 = defaultWindow, ...observerOptions } = options;
|
|
79
78
|
let observer;
|
|
80
79
|
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
|
81
80
|
const cleanup = () => {
|
|
@@ -84,13 +83,24 @@ function useResizeObserver(target, callback, options = {}) {
|
|
|
84
83
|
observer = void 0;
|
|
85
84
|
}
|
|
86
85
|
};
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
const targets = vue.computed(() => {
|
|
87
|
+
const _targets = index.toValue(target);
|
|
88
|
+
return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
|
|
89
|
+
});
|
|
90
|
+
const stopWatch = vue.watch(
|
|
91
|
+
targets,
|
|
92
|
+
(els) => {
|
|
93
|
+
cleanup();
|
|
94
|
+
if (isSupported.value && window2) {
|
|
95
|
+
observer = new ResizeObserver(callback);
|
|
96
|
+
for (const _el of els) {
|
|
97
|
+
if (_el)
|
|
98
|
+
observer.observe(_el, observerOptions);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{ immediate: true, flush: "post" }
|
|
103
|
+
);
|
|
94
104
|
const stop = () => {
|
|
95
105
|
cleanup();
|
|
96
106
|
stopWatch();
|
|
@@ -101,70 +111,16 @@ function useResizeObserver(target, callback, options = {}) {
|
|
|
101
111
|
stop
|
|
102
112
|
};
|
|
103
113
|
}
|
|
104
|
-
exports.SwipeDirection = void 0;
|
|
105
|
-
(function(SwipeDirection2) {
|
|
106
|
-
SwipeDirection2["UP"] = "UP";
|
|
107
|
-
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
108
|
-
SwipeDirection2["DOWN"] = "DOWN";
|
|
109
|
-
SwipeDirection2["LEFT"] = "LEFT";
|
|
110
|
-
SwipeDirection2["NONE"] = "NONE";
|
|
111
|
-
})(exports.SwipeDirection || (exports.SwipeDirection = {}));
|
|
112
|
-
var __defProp = Object.defineProperty;
|
|
113
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
114
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
115
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
116
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
117
|
-
var __spreadValues = (a, b) => {
|
|
118
|
-
for (var prop in b || (b = {}))
|
|
119
|
-
if (__hasOwnProp.call(b, prop))
|
|
120
|
-
__defNormalProp(a, prop, b[prop]);
|
|
121
|
-
if (__getOwnPropSymbols)
|
|
122
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
123
|
-
if (__propIsEnum.call(b, prop))
|
|
124
|
-
__defNormalProp(a, prop, b[prop]);
|
|
125
|
-
}
|
|
126
|
-
return a;
|
|
127
|
-
};
|
|
128
|
-
const _TransitionPresets = {
|
|
129
|
-
easeInSine: [0.12, 0, 0.39, 0],
|
|
130
|
-
easeOutSine: [0.61, 1, 0.88, 1],
|
|
131
|
-
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
132
|
-
easeInQuad: [0.11, 0, 0.5, 0],
|
|
133
|
-
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
134
|
-
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
135
|
-
easeInCubic: [0.32, 0, 0.67, 0],
|
|
136
|
-
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
137
|
-
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
138
|
-
easeInQuart: [0.5, 0, 0.75, 0],
|
|
139
|
-
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
140
|
-
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
141
|
-
easeInQuint: [0.64, 0, 0.78, 0],
|
|
142
|
-
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
143
|
-
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
144
|
-
easeInExpo: [0.7, 0, 0.84, 0],
|
|
145
|
-
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
146
|
-
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
147
|
-
easeInCirc: [0.55, 0, 1, 0.45],
|
|
148
|
-
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
149
|
-
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
150
|
-
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
151
|
-
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
152
|
-
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
153
|
-
};
|
|
154
|
-
__spreadValues({
|
|
155
|
-
linear: index.identity
|
|
156
|
-
}, _TransitionPresets);
|
|
157
114
|
exports.computedEager = index.computedEager;
|
|
158
115
|
exports.eagerComputed = index.computedEager;
|
|
159
|
-
exports.identity = index.identity;
|
|
160
116
|
exports.isClient = index.isClient;
|
|
161
|
-
exports.
|
|
117
|
+
exports.isObject = index.isObject;
|
|
162
118
|
exports.noop = index.noop;
|
|
163
|
-
exports.
|
|
164
|
-
exports.tryOnMounted = index.tryOnMounted;
|
|
119
|
+
exports.toValue = index.toValue;
|
|
165
120
|
exports.tryOnScopeDispose = index.tryOnScopeDispose;
|
|
166
121
|
exports.defaultWindow = defaultWindow;
|
|
167
122
|
exports.unrefElement = unrefElement;
|
|
168
123
|
exports.useEventListener = useEventListener;
|
|
124
|
+
exports.useMounted = useMounted;
|
|
169
125
|
exports.useResizeObserver = useResizeObserver;
|
|
170
126
|
exports.useSupported = useSupported;
|
|
@@ -1,47 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
var __defProp$9 = Object.defineProperty;
|
|
5
|
-
var __defProps$6 = Object.defineProperties;
|
|
6
|
-
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
7
|
-
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
8
|
-
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues$9 = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp$b.call(b, prop))
|
|
14
|
-
__defNormalProp$9(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols$b)
|
|
16
|
-
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
17
|
-
if (__propIsEnum$b.call(b, prop))
|
|
18
|
-
__defNormalProp$9(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
23
4
|
function computedEager(fn, options) {
|
|
24
|
-
var
|
|
5
|
+
var _a;
|
|
25
6
|
const result = vue.shallowRef();
|
|
26
7
|
vue.watchEffect(() => {
|
|
27
8
|
result.value = fn();
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
}, {
|
|
10
|
+
...options,
|
|
11
|
+
flush: (_a = void 0) != null ? _a : "sync"
|
|
12
|
+
});
|
|
31
13
|
return vue.readonly(result);
|
|
32
14
|
}
|
|
33
|
-
var _a;
|
|
34
|
-
const isClient = typeof window !== "undefined";
|
|
35
|
-
const isString = (val) => typeof val === "string";
|
|
36
|
-
const noop = () => {
|
|
37
|
-
};
|
|
38
|
-
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
39
|
-
function resolveUnref(r) {
|
|
40
|
-
return typeof r === "function" ? r() : vue.unref(r);
|
|
41
|
-
}
|
|
42
|
-
function identity(arg) {
|
|
43
|
-
return arg;
|
|
44
|
-
}
|
|
45
15
|
function tryOnScopeDispose(fn) {
|
|
46
16
|
if (vue.getCurrentScope()) {
|
|
47
17
|
vue.onScopeDispose(fn);
|
|
@@ -49,20 +19,19 @@ function tryOnScopeDispose(fn) {
|
|
|
49
19
|
}
|
|
50
20
|
return false;
|
|
51
21
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
vue.onMounted(fn);
|
|
55
|
-
else if (sync)
|
|
56
|
-
fn();
|
|
57
|
-
else
|
|
58
|
-
vue.nextTick(fn);
|
|
22
|
+
function toValue(r) {
|
|
23
|
+
return typeof r === "function" ? r() : vue.unref(r);
|
|
59
24
|
}
|
|
25
|
+
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
26
|
+
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
27
|
+
const toString = Object.prototype.toString;
|
|
28
|
+
const isObject = (val) => toString.call(val) === "[object Object]";
|
|
29
|
+
const noop = () => {
|
|
30
|
+
};
|
|
60
31
|
exports.computedEager = computedEager;
|
|
61
32
|
exports.eagerComputed = computedEager;
|
|
62
|
-
exports.identity = identity;
|
|
63
33
|
exports.isClient = isClient;
|
|
64
|
-
exports.
|
|
34
|
+
exports.isObject = isObject;
|
|
65
35
|
exports.noop = noop;
|
|
66
|
-
exports.
|
|
67
|
-
exports.tryOnMounted = tryOnMounted;
|
|
36
|
+
exports.toValue = toValue;
|
|
68
37
|
exports.tryOnScopeDispose = tryOnScopeDispose;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const componentSizes = [
|
|
3
|
+
const componentSizes = [
|
|
4
|
+
"",
|
|
5
|
+
"default",
|
|
6
|
+
"small",
|
|
7
|
+
"large"
|
|
8
|
+
];
|
|
4
9
|
exports.componentSizes = componentSizes;
|
|
@@ -1,65 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const index = require("../../../../@vueuse/core/index.js");
|
|
5
|
-
const types = require("../../utils/types.js");
|
|
6
3
|
const aria = require("../../utils/dom/aria.js");
|
|
7
4
|
const shared_esmBundler = require("../../../../@vue/shared/dist/shared.esm-bundler.js");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
afterBlur
|
|
14
|
-
} = {}) {
|
|
15
|
-
const instance = vue.getCurrentInstance();
|
|
16
|
-
const { emit } = instance;
|
|
5
|
+
require("lodash-es");
|
|
6
|
+
const index = require("../../../../@vueuse/core/index.js");
|
|
7
|
+
const vue = require("vue");
|
|
8
|
+
function useFocusController(target, { disabled, beforeFocus, afterFocus, beforeBlur, afterBlur } = {}) {
|
|
9
|
+
const { emit } = vue.getCurrentInstance();
|
|
17
10
|
const wrapperRef = vue.shallowRef();
|
|
18
11
|
const isFocused = vue.ref(false);
|
|
19
12
|
const handleFocus = (event) => {
|
|
20
13
|
const cancelFocus = shared_esmBundler.isFunction(beforeFocus) ? beforeFocus(event) : false;
|
|
21
|
-
if (vue.unref(disabled) || isFocused.value || cancelFocus)
|
|
22
|
-
return;
|
|
14
|
+
if (vue.unref(disabled) || isFocused.value || cancelFocus) return;
|
|
23
15
|
isFocused.value = true;
|
|
24
16
|
emit("focus", event);
|
|
25
|
-
afterFocus
|
|
17
|
+
afterFocus?.();
|
|
26
18
|
};
|
|
27
19
|
const handleBlur = (event) => {
|
|
28
|
-
var _a;
|
|
29
20
|
const cancelBlur = shared_esmBundler.isFunction(beforeBlur) ? beforeBlur(event) : false;
|
|
30
|
-
if (vue.unref(disabled) || event.relatedTarget &&
|
|
31
|
-
return;
|
|
21
|
+
if (vue.unref(disabled) || event.relatedTarget && wrapperRef.value?.contains(event.relatedTarget) || cancelBlur) return;
|
|
32
22
|
isFocused.value = false;
|
|
33
23
|
emit("blur", event);
|
|
34
|
-
afterBlur
|
|
24
|
+
afterBlur?.();
|
|
35
25
|
};
|
|
36
26
|
const handleClick = (event) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return;
|
|
40
|
-
(_b = target.value) == null ? void 0 : _b.focus();
|
|
27
|
+
if (vue.unref(disabled) || aria.isFocusable(event.target) || wrapperRef.value?.contains(document.activeElement) && wrapperRef.value !== document.activeElement) return;
|
|
28
|
+
target.value?.focus();
|
|
41
29
|
};
|
|
42
30
|
vue.watch([wrapperRef, () => vue.unref(disabled)], ([el, disabled2]) => {
|
|
43
|
-
if (!el)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
el.removeAttribute("tabindex");
|
|
47
|
-
} else {
|
|
48
|
-
el.setAttribute("tabindex", "-1");
|
|
49
|
-
}
|
|
31
|
+
if (!el) return;
|
|
32
|
+
if (disabled2) el.removeAttribute("tabindex");
|
|
33
|
+
else el.setAttribute("tabindex", "-1");
|
|
50
34
|
});
|
|
51
35
|
index.useEventListener(wrapperRef, "focus", handleFocus, true);
|
|
52
36
|
index.useEventListener(wrapperRef, "blur", handleBlur, true);
|
|
53
37
|
index.useEventListener(wrapperRef, "click", handleClick, true);
|
|
54
|
-
if (process.env.NODE_ENV === "test") {
|
|
55
|
-
vue.onMounted(() => {
|
|
56
|
-
const targetEl = types.isElement(target.value) ? target.value : document.querySelector("input,textarea");
|
|
57
|
-
if (targetEl) {
|
|
58
|
-
index.useEventListener(targetEl, "focus", handleFocus, true);
|
|
59
|
-
index.useEventListener(targetEl, "blur", handleBlur, true);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
38
|
return {
|
|
64
39
|
isFocused,
|
|
65
40
|
wrapperRef,
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const index$1 = require("../use-namespace/index.js");
|
|
5
3
|
const error = require("../../utils/error.js");
|
|
4
|
+
const index$1 = require("../use-namespace/index.js");
|
|
5
|
+
const vue = require("vue");
|
|
6
6
|
const index = require("../../../../@vueuse/shared/index.js");
|
|
7
7
|
const defaultIdInjection = {
|
|
8
8
|
prefix: Math.floor(Math.random() * 1e4),
|
|
9
9
|
current: 0
|
|
10
10
|
};
|
|
11
|
-
const ID_INJECTION_KEY = Symbol("elIdInjection");
|
|
11
|
+
const ID_INJECTION_KEY = /* @__PURE__ */ Symbol("elIdInjection");
|
|
12
12
|
const useIdInjection = () => {
|
|
13
13
|
return vue.getCurrentInstance() ? vue.inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
|
|
14
14
|
};
|
|
15
15
|
const useId = (deterministicId) => {
|
|
16
16
|
const idInjection = useIdInjection();
|
|
17
|
-
if (!index.isClient && idInjection === defaultIdInjection)
|
|
18
|
-
error.debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
17
|
+
if (!index.isClient && idInjection === defaultIdInjection) error.debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
19
18
|
usage: app.provide(ID_INJECTION_KEY, {
|
|
20
19
|
prefix: number,
|
|
21
20
|
current: number,
|
|
22
21
|
})`);
|
|
23
|
-
}
|
|
24
22
|
const namespace = index$1.useGetDerivedNamespace();
|
|
25
|
-
|
|
26
|
-
return idRef;
|
|
23
|
+
return index.computedEager(() => vue.unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
|
|
27
24
|
};
|
|
28
25
|
exports.ID_INJECTION_KEY = ID_INJECTION_KEY;
|
|
29
26
|
exports.useId = useId;
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const lodashEs = require("lodash-es");
|
|
5
3
|
const en = require("../../locale/lang/en.js");
|
|
4
|
+
const lodashEs = require("lodash-es");
|
|
5
|
+
const vue = require("vue");
|
|
6
6
|
const buildTranslator = (locale) => (path, option) => translate(path, option, vue.unref(locale));
|
|
7
|
-
const translate = (path, option, locale) => lodashEs.get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
|
|
8
|
-
var _a;
|
|
9
|
-
return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
|
|
10
|
-
});
|
|
7
|
+
const translate = (path, option, locale) => lodashEs.get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => `${option?.[key] ?? `{${key}}`}`);
|
|
11
8
|
const buildLocaleContext = (locale) => {
|
|
12
|
-
const lang = vue.computed(() => vue.unref(locale).name);
|
|
13
|
-
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale);
|
|
14
9
|
return {
|
|
15
|
-
lang,
|
|
16
|
-
locale:
|
|
10
|
+
lang: vue.computed(() => vue.unref(locale).name),
|
|
11
|
+
locale: vue.isRef(locale) ? locale : vue.ref(locale),
|
|
17
12
|
t: buildTranslator(locale)
|
|
18
13
|
};
|
|
19
14
|
};
|
|
20
|
-
const localeContextKey = Symbol("localeContextKey");
|
|
15
|
+
const localeContextKey = /* @__PURE__ */ Symbol("localeContextKey");
|
|
21
16
|
const useLocale = (localeOverrides) => {
|
|
22
17
|
const locale = vue.inject(localeContextKey, vue.ref());
|
|
23
18
|
return buildLocaleContext(vue.computed(() => locale.value || en.default));
|
|
@@ -5,24 +5,17 @@ const defaultNamespace = "el";
|
|
|
5
5
|
const statePrefix = "is-";
|
|
6
6
|
const _bem = (namespace, block, blockSuffix, element, modifier) => {
|
|
7
7
|
let cls = `${namespace}-${block}`;
|
|
8
|
-
if (blockSuffix) {
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
if (element) {
|
|
12
|
-
cls += `__${element}`;
|
|
13
|
-
}
|
|
14
|
-
if (modifier) {
|
|
15
|
-
cls += `--${modifier}`;
|
|
16
|
-
}
|
|
8
|
+
if (blockSuffix) cls += `-${blockSuffix}`;
|
|
9
|
+
if (element) cls += `__${element}`;
|
|
10
|
+
if (modifier) cls += `--${modifier}`;
|
|
17
11
|
return cls;
|
|
18
12
|
};
|
|
19
|
-
const namespaceContextKey = Symbol("namespaceContextKey");
|
|
13
|
+
const namespaceContextKey = /* @__PURE__ */ Symbol("namespaceContextKey");
|
|
20
14
|
const useGetDerivedNamespace = (namespaceOverrides) => {
|
|
21
15
|
const derivedNamespace = vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(defaultNamespace)) : vue.ref(defaultNamespace);
|
|
22
|
-
|
|
16
|
+
return vue.computed(() => {
|
|
23
17
|
return vue.unref(derivedNamespace) || defaultNamespace;
|
|
24
18
|
});
|
|
25
|
-
return namespace;
|
|
26
19
|
};
|
|
27
20
|
const useNamespace = (block, namespaceOverrides) => {
|
|
28
21
|
const namespace = useGetDerivedNamespace();
|
|
@@ -39,20 +32,12 @@ const useNamespace = (block, namespaceOverrides) => {
|
|
|
39
32
|
};
|
|
40
33
|
const cssVar = (object) => {
|
|
41
34
|
const styles = {};
|
|
42
|
-
for (const key in object) {
|
|
43
|
-
if (object[key]) {
|
|
44
|
-
styles[`--${namespace.value}-${key}`] = object[key];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
35
|
+
for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
|
|
47
36
|
return styles;
|
|
48
37
|
};
|
|
49
38
|
const cssVarBlock = (object) => {
|
|
50
39
|
const styles = {};
|
|
51
|
-
for (const key in object) {
|
|
52
|
-
if (object[key]) {
|
|
53
|
-
styles[`--${namespace.value}-${block}-${key}`] = object[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
40
|
+
for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
|
|
56
41
|
return styles;
|
|
57
42
|
};
|
|
58
43
|
const cssVarName = (name) => `--${namespace.value}-${name}`;
|
|
@@ -3,9 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const useProp = (name) => {
|
|
5
5
|
const vm = vue.getCurrentInstance();
|
|
6
|
-
return vue.computed(() =>
|
|
7
|
-
var _a, _b;
|
|
8
|
-
return (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[name];
|
|
9
|
-
});
|
|
6
|
+
return vue.computed(() => vm?.proxy?.$props?.[name]);
|
|
10
7
|
};
|
|
11
8
|
exports.useProp = useProp;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const runtime = require("../../utils/vue/props/runtime.js");
|
|
5
3
|
const size = require("../../constants/size.js");
|
|
4
|
+
const runtime = require("../../utils/vue/props/runtime.js");
|
|
5
|
+
const vue = require("vue");
|
|
6
6
|
const useSizeProp = runtime.buildProp({
|
|
7
7
|
type: String,
|
|
8
8
|
values: size.componentSizes,
|
|
9
9
|
required: false
|
|
10
10
|
});
|
|
11
|
-
const SIZE_INJECTION_KEY = Symbol("size");
|
|
11
|
+
const SIZE_INJECTION_KEY = /* @__PURE__ */ Symbol("size");
|
|
12
12
|
const useGlobalSize = () => {
|
|
13
13
|
const injectedSize = vue.inject(SIZE_INJECTION_KEY, {});
|
|
14
14
|
return vue.computed(() => {
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
var
|
|
3
|
+
var en_default = {
|
|
4
4
|
name: "en",
|
|
5
5
|
el: {
|
|
6
|
-
breadcrumb: {
|
|
7
|
-
label: "Breadcrumb"
|
|
8
|
-
},
|
|
6
|
+
breadcrumb: { label: "Breadcrumb" },
|
|
9
7
|
colorpicker: {
|
|
10
8
|
confirm: "OK",
|
|
11
9
|
clear: "Clear",
|
|
12
10
|
defaultLabel: "color picker",
|
|
13
11
|
description: "current color is {color}. press enter to select a new color.",
|
|
14
|
-
alphaLabel: "pick alpha value"
|
|
12
|
+
alphaLabel: "pick alpha value",
|
|
13
|
+
alphaDescription: "alpha {alpha}, current color is {color}",
|
|
14
|
+
hueLabel: "pick hue value",
|
|
15
|
+
hueDescription: "hue {hue}, current color is {color}",
|
|
16
|
+
svLabel: "pick saturation and brightness value",
|
|
17
|
+
svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
|
|
18
|
+
predefineDescription: "select {value} as the color"
|
|
15
19
|
},
|
|
16
20
|
datepicker: {
|
|
17
21
|
now: "Now",
|
|
@@ -46,7 +50,6 @@ var English = {
|
|
|
46
50
|
month10: "October",
|
|
47
51
|
month11: "November",
|
|
48
52
|
month12: "December",
|
|
49
|
-
week: "week",
|
|
50
53
|
weeks: {
|
|
51
54
|
sun: "Sun",
|
|
52
55
|
mon: "Mon",
|
|
@@ -90,12 +93,8 @@ var English = {
|
|
|
90
93
|
noData: "No data",
|
|
91
94
|
placeholder: "Select"
|
|
92
95
|
},
|
|
93
|
-
mention: {
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
dropdown: {
|
|
97
|
-
toggleDropdown: "Toggle Dropdown"
|
|
98
|
-
},
|
|
96
|
+
mention: { loading: "Loading" },
|
|
97
|
+
dropdown: { toggleDropdown: "Toggle Dropdown" },
|
|
99
98
|
cascader: {
|
|
100
99
|
noMatch: "No matching data",
|
|
101
100
|
loading: "Loading",
|
|
@@ -115,12 +114,8 @@ var English = {
|
|
|
115
114
|
nextPages: "Next {pager} pages",
|
|
116
115
|
deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
|
|
117
116
|
},
|
|
118
|
-
dialog: {
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
drawer: {
|
|
122
|
-
close: "Close this dialog"
|
|
123
|
-
},
|
|
117
|
+
dialog: { close: "Close this dialog" },
|
|
118
|
+
drawer: { close: "Close this dialog" },
|
|
124
119
|
messagebox: {
|
|
125
120
|
title: "Message",
|
|
126
121
|
confirm: "OK",
|
|
@@ -144,16 +139,22 @@ var English = {
|
|
|
144
139
|
confirmFilter: "Confirm",
|
|
145
140
|
resetFilter: "Reset",
|
|
146
141
|
clearFilter: "All",
|
|
147
|
-
sumText: "Sum"
|
|
148
|
-
|
|
142
|
+
sumText: "Sum",
|
|
143
|
+
selectAllLabel: "Select all rows",
|
|
144
|
+
selectRowLabel: "Select this row",
|
|
145
|
+
expandRowLabel: "Expand this row",
|
|
146
|
+
collapseRowLabel: "Collapse this row",
|
|
147
|
+
sortLabel: "Sort by {column}",
|
|
148
|
+
filterLabel: "Filter by {column}"
|
|
149
|
+
},
|
|
150
|
+
tag: { close: "Close this tag" },
|
|
149
151
|
tour: {
|
|
150
152
|
next: "Next",
|
|
151
153
|
previous: "Previous",
|
|
152
|
-
finish: "Finish"
|
|
153
|
-
|
|
154
|
-
tree: {
|
|
155
|
-
emptyText: "No Data"
|
|
154
|
+
finish: "Finish",
|
|
155
|
+
close: "Close this dialog"
|
|
156
156
|
},
|
|
157
|
+
tree: { emptyText: "No Data" },
|
|
157
158
|
transfer: {
|
|
158
159
|
noMatch: "No matching data",
|
|
159
160
|
noData: "No data",
|
|
@@ -162,12 +163,8 @@ var English = {
|
|
|
162
163
|
noCheckedFormat: "{total} items",
|
|
163
164
|
hasCheckedFormat: "{checked}/{total} checked"
|
|
164
165
|
},
|
|
165
|
-
image: {
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
pageHeader: {
|
|
169
|
-
title: "Back"
|
|
170
|
-
},
|
|
166
|
+
image: { error: "FAILED" },
|
|
167
|
+
pageHeader: { title: "Back" },
|
|
171
168
|
popconfirm: {
|
|
172
169
|
confirmButtonText: "Yes",
|
|
173
170
|
cancelButtonText: "No"
|
|
@@ -179,4 +176,4 @@ var English = {
|
|
|
179
176
|
}
|
|
180
177
|
}
|
|
181
178
|
};
|
|
182
|
-
exports.default =
|
|
179
|
+
exports.default = en_default;
|