vue-amazing-ui 2.4.20 → 2.4.21
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 +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/index.iife.js +55 -55
- package/dist/index.js +3534 -3519
- package/dist/index.umd.cjs +47 -47
- package/dist/style.css +1 -1
- package/es/select/Select.css +1 -1
- package/es/select/Select.vue.js +2 -2
- package/es/select/Select.vue2.js +163 -148
- package/es/utils/resolver.js +1 -1
- package/lib/select/Select.css +1 -1
- package/lib/select/Select.vue.cjs +1 -1
- package/lib/select/Select.vue2.cjs +5 -5
- package/lib/utils/resolver.cjs +1 -1
- package/package.json +142 -142
- /package/es/node_modules/.pnpm/{@vuepic_vue-datepicker@11.0.2_vue@3.5.20_typescript@5.9.2_ → @vuepic_vue-datepicker@11.0.2_vue@3.5.21_typescript@5.9.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css +0 -0
- /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@11.0.2_vue@3.5.20_typescript@5.9.2_ → @vuepic_vue-datepicker@11.0.2_vue@3.5.21_typescript@5.9.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css +0 -0
package/es/select/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.slide-enter[data-v-
|
|
1
|
+
.slide-enter[data-v-3ddc7bae]{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1);animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-enter-active[data-v-3ddc7bae]{animation-name:slideIn-3ddc7bae;animation-play-state:running}@keyframes slideIn-3ddc7bae{0%{transform:scaleY(.8);opacity:0}to{transform:scaleY(1);opacity:1}}.slide-leave[data-v-3ddc7bae]{animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-leave-active[data-v-3ddc7bae]{animation-name:slideOut-3ddc7bae;animation-play-state:running}@keyframes slideOut-3ddc7bae{0%{transform:scaleY(1);opacity:1}to{transform:scaleY(.8);opacity:0}}.select-wrap[data-v-3ddc7bae]{position:relative;display:inline-block;width:var(--select-width);height:var(--select-height);font-size:14px;font-weight:400;color:#000000e0;outline:none;cursor:pointer;transition:all .3s}.select-wrap:not(.select-disabled):hover .select-content-container[data-v-3ddc7bae]{border-color:var(--select-primary-color-hover)}.select-wrap .select-content-container[data-v-3ddc7bae]{position:relative;display:flex;padding:0 11px;border:1px solid #d9d9d9;border-radius:6px;background-color:#fff;width:100%;height:100%;outline:none;transition:all .2s cubic-bezier(.645,.045,.355,1)}.select-wrap .select-content-container[data-v-3ddc7bae]:after{display:inline-block;width:0;visibility:hidden;content:" ";line-height:calc(var(--select-height) - 2px)}.select-wrap .select-content-container .select-search[data-v-3ddc7bae]{position:absolute;inset:0 11px}.select-wrap .select-content-container .select-search .search-input[data-v-3ddc7bae]{margin:0;padding:0;width:100%;height:100%;caret-color:transparent;vertical-align:top;background:transparent;border:none;outline:none;appearance:none;opacity:0;cursor:pointer}.select-wrap .select-content-container .select-search .caret-show[data-v-3ddc7bae]{caret-color:auto}.select-wrap .select-content-container .select-item[data-v-3ddc7bae]{position:relative;padding-right:18px;flex:1;line-height:calc(var(--select-height) - 2px);-webkit-user-select:none;user-select:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition:all .3s}.select-wrap .select-content-container .select-placeholder[data-v-3ddc7bae]{color:#00000040;transition:none;pointer-events:none}.select-wrap .select-content-container .select-item-hidden[data-v-3ddc7bae]{visibility:hidden}.select-wrap .select-content-container .icon-svg[data-v-3ddc7bae]{position:absolute;top:0;bottom:0;right:11px;margin:auto 0;display:inline-block;font-size:12px;color:#00000040;fill:currentColor;opacity:0;-webkit-user-select:none;user-select:none;pointer-events:none}.select-wrap .select-content-container .arrow-svg[data-v-3ddc7bae]{position:absolute;top:0;bottom:0;right:11px;margin:auto 0;display:inline-block;font-size:12px;color:#00000040;fill:currentColor;opacity:0;-webkit-user-select:none;user-select:none;pointer-events:none;transition:transform .3s,opacity .3s}.select-wrap .select-content-container .arrow-rotate[data-v-3ddc7bae]{transform:rotate(180deg)}.select-wrap .select-content-container .search-svg[data-v-3ddc7bae]{position:absolute;top:0;bottom:0;right:11px;margin:auto 0;display:inline-block;font-size:12px;color:#00000040;fill:currentColor;opacity:0;-webkit-user-select:none;user-select:none;pointer-events:none;transition:opacity .3s}.select-wrap .select-content-container .clear-svg[data-v-3ddc7bae]{position:absolute;top:0;bottom:0;right:11px;margin:auto 0;display:inline-block;font-size:12px;color:#00000040;fill:currentColor;opacity:0;-webkit-user-select:none;user-select:none;pointer-events:none;z-index:1;background:#fff;cursor:pointer;transition:color .2s,opacity .3s}.select-wrap .select-content-container .clear-svg[data-v-3ddc7bae]:hover{color:#00000073}.select-wrap .select-content-container .show-svg[data-v-3ddc7bae]{opacity:1;pointer-events:auto}.select-focused:not(.select-disabled) .select-content-container[data-v-3ddc7bae]{border-color:var(--select-primary-color-focus);box-shadow:0 0 0 2px var(--select-primary-shadow-color)}.search-select .select-content-container[data-v-3ddc7bae]{cursor:text}.search-select .select-content-container .select-search .search-input[data-v-3ddc7bae]{cursor:auto;color:inherit;opacity:1}.select-small[data-v-3ddc7bae]{font-size:14px}.select-small .select-content-container[data-v-3ddc7bae]{padding:0 7px;border-radius:4px}.select-small .select-content-container .select-search[data-v-3ddc7bae]{left:7px;right:28px}.select-small .select-content-container .select-item[data-v-3ddc7bae]{padding-right:22px}.select-large[data-v-3ddc7bae]{font-size:16px}.select-large .select-content-container[data-v-3ddc7bae]{padding:0 11px;border-radius:8px}.select-large .select-content-container .select-item[data-v-3ddc7bae]{padding-right:20px}.select-disabled .select-content-container[data-v-3ddc7bae]{color:#00000040;background:#f5f5f5;-webkit-user-select:none;user-select:none;cursor:not-allowed}.select-disabled .select-content-container .select-search .search-input[data-v-3ddc7bae]{cursor:not-allowed}.select-panel-container[data-v-3ddc7bae]{position:absolute;z-index:1000;padding:4px;border-radius:8px;overflow:hidden;background-color:#fff;outline:none;cursor:auto;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.select-panel-container .select-options-panel .select-option[data-v-3ddc7bae]{min-height:32px;display:block;padding:5px 12px;border-radius:4px;color:#000000e0;font-weight:400;font-size:14px;line-height:1.57142857;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition:background .3s ease}.select-panel-container .select-options-panel .option-hover[data-v-3ddc7bae]{background:#0000000a}.select-panel-container .select-options-panel .option-selected[data-v-3ddc7bae]{font-weight:600;background:var(--select-option-bg-color-active)}.select-panel-container .select-options-panel .option-disabled[data-v-3ddc7bae]{color:#00000040;cursor:not-allowed}.select-panel-container .options-panel-empty[data-v-3ddc7bae]{min-width:112px;padding:9px 16px}.select-panel-container .options-panel-empty .empty-wrap[data-v-3ddc7bae]{margin-block:8px}.select-panel-container .options-panel-empty .empty-wrap[data-v-3ddc7bae] .empty-image-wrap{height:35px}
|
package/es/select/Select.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Select.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3ddc7bae"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
package/es/select/Select.vue2.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useInject as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as ze, ref as a, computed as T, watch as q, watchEffect as oe, onMounted as Re, onBeforeUnmount as xe, nextTick as Oe, createElementBlock as y, openBlock as h, normalizeStyle as ae, normalizeClass as C, unref as M, createElementVNode as g, createBlock as Pe, withDirectives as W, vModelText as De, toDisplayString as ne, withModifiers as F, Teleport as He, createVNode as G, Transition as We, withCtx as ue, createCommentVNode as Fe, mergeProps as Ne, Fragment as Ie, renderList as Ue, vShow as J } from "vue";
|
|
2
|
+
import je from "../empty/index.js";
|
|
3
|
+
import Ae from "../scrollbar/index.js";
|
|
4
|
+
import { useInject as Xe, useOptionsSupported as Ye, useMutationObserver as qe, useEventListener as Ge } from "../utils/index.js";
|
|
5
|
+
const Je = { class: "select-search" }, Ke = ["readonly", "disabled"], Qe = ["title"], Ze = ["title", "onMouseenter", "onClick"], ot = /* @__PURE__ */ ze({
|
|
6
6
|
__name: "Select",
|
|
7
7
|
props: {
|
|
8
8
|
options: { default: () => [] },
|
|
@@ -24,8 +24,8 @@ const Ye = { class: "select-search" }, qe = ["readonly", "disabled"], Ge = ["tit
|
|
|
24
24
|
modelValue: { default: void 0 }
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue", "change", "openChange"],
|
|
27
|
-
setup(
|
|
28
|
-
const t =
|
|
27
|
+
setup(se, { emit: ie }) {
|
|
28
|
+
const t = se, N = a(!1), c = a([]), u = a(), z = a(null), f = a(), d = a(!1), R = a(!1), r = a(), n = a(!1), p = a(!0), $ = a(!1), I = a(!1), b = a(!1), x = a(!1), { colorPalettes: U, shadowColor: re } = Xe("Select"), s = a(null), K = a(0), O = a(0), Q = a("bottom"), j = a(null), w = a(), A = a(null), P = a(), X = a(null), Y = a(), ce = a(document.documentElement.clientWidth), D = a(document.documentElement.clientHeight), { isSupported: ve } = Ye("passive"), k = ie, fe = T(() => typeof t.width == "number" ? `${t.width}px` : t.width), de = T(() => {
|
|
29
29
|
const e = {
|
|
30
30
|
small: 24,
|
|
31
31
|
middle: 32,
|
|
@@ -33,219 +33,234 @@ const Ye = { class: "select-search" }, qe = ["readonly", "disabled"], Ge = ["tit
|
|
|
33
33
|
};
|
|
34
34
|
return t.height !== void 0 ? `${t.height}px` : `${e[t.size]}px`;
|
|
35
35
|
});
|
|
36
|
-
|
|
37
|
-
const
|
|
36
|
+
T(() => t.options.length > t.maxDisplay);
|
|
37
|
+
const pe = T(() => ({
|
|
38
38
|
maxHeight: `${t.maxDisplay * 32 + 8}px`
|
|
39
|
-
})),
|
|
40
|
-
const e =
|
|
41
|
-
switch (
|
|
39
|
+
})), me = T(() => {
|
|
40
|
+
const e = w.value?.top ?? 0, l = P.value?.top ?? 0, o = e - l, m = w.value?.bottom ?? 0, L = (P.value?.bottom ?? 0) - m, v = w.value?.left ?? 0, H = P.value?.left ?? 0, i = v - H, E = w.value?.width ?? 0;
|
|
41
|
+
switch (Q.value) {
|
|
42
42
|
case "bottom":
|
|
43
43
|
return {
|
|
44
44
|
transformOrigin: "0 0",
|
|
45
|
-
top: `${
|
|
46
|
-
left: `${
|
|
45
|
+
top: `${o + O.value}px`,
|
|
46
|
+
left: `${i}px`,
|
|
47
47
|
minWidth: `${E}px`,
|
|
48
48
|
width: `${E}px`
|
|
49
49
|
};
|
|
50
50
|
case "top":
|
|
51
51
|
return {
|
|
52
52
|
transformOrigin: "100% 100%",
|
|
53
|
-
bottom: `${
|
|
54
|
-
left: `${
|
|
53
|
+
bottom: `${L + O.value}px`,
|
|
54
|
+
left: `${i}px`,
|
|
55
55
|
minWidth: `${E}px`,
|
|
56
56
|
width: `${E}px`
|
|
57
57
|
};
|
|
58
58
|
default:
|
|
59
59
|
return {
|
|
60
60
|
transformOrigin: "0 0",
|
|
61
|
-
top: `${
|
|
62
|
-
left: `${
|
|
61
|
+
top: `${o + O.value}px`,
|
|
62
|
+
left: `${i}px`,
|
|
63
63
|
minWidth: `${E}px`,
|
|
64
64
|
width: `${E}px`
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
|
|
68
|
+
q(
|
|
69
69
|
() => [t.placement, t.flip],
|
|
70
70
|
() => {
|
|
71
|
-
|
|
71
|
+
V();
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
deep: !0
|
|
75
75
|
}
|
|
76
|
-
),
|
|
77
|
-
e && !
|
|
78
|
-
}),
|
|
79
|
-
k("openChange", e), t.search && !e && (
|
|
80
|
-
}),
|
|
81
|
-
t.search ? (
|
|
82
|
-
|
|
83
|
-
}, 200),
|
|
84
|
-
}),
|
|
85
|
-
|
|
86
|
-
}), ze(() => {
|
|
87
|
-
Q();
|
|
76
|
+
), q(n, (e) => {
|
|
77
|
+
e && !N.value && (N.value = !0);
|
|
78
|
+
}), q(n, (e) => {
|
|
79
|
+
k("openChange", e), t.search && !e && (f.value = void 0, R.value = !1);
|
|
80
|
+
}), oe(() => {
|
|
81
|
+
t.search ? (f.value ? c.value = t.options.filter((e) => typeof t.filter == "function" ? t.filter(f.value, e) : e[t.label].includes(f.value)) : n.value ? c.value = [...t.options] : setTimeout(() => {
|
|
82
|
+
c.value = [...t.options];
|
|
83
|
+
}, 200), c.value.length && f.value ? r.value = c.value[0][t.value] : r.value = null) : c.value = t.options;
|
|
84
|
+
}), oe(() => {
|
|
85
|
+
Ce();
|
|
88
86
|
}), Re(() => {
|
|
89
|
-
|
|
90
|
-
}),
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
_();
|
|
88
|
+
}), xe(() => {
|
|
89
|
+
ee();
|
|
90
|
+
});
|
|
91
|
+
const Z = qe(
|
|
92
|
+
s,
|
|
93
|
+
() => {
|
|
94
|
+
K.value !== s.value?.scrollTop && (K.value = s.value?.scrollTop ?? 0, V());
|
|
95
|
+
},
|
|
96
|
+
{ subtree: !0, attributes: !0 }
|
|
97
|
+
);
|
|
98
|
+
Ge(window, "resize", ge);
|
|
99
|
+
function he() {
|
|
100
|
+
let e = X.value?.parentElement;
|
|
93
101
|
for (; e; ) {
|
|
94
102
|
if (e === document.documentElement) {
|
|
95
|
-
|
|
103
|
+
A.value = document.documentElement;
|
|
96
104
|
return;
|
|
97
105
|
}
|
|
98
106
|
const { position: l } = getComputedStyle(e);
|
|
99
107
|
if (l !== "static") {
|
|
100
|
-
|
|
108
|
+
A.value = e;
|
|
101
109
|
return;
|
|
102
110
|
}
|
|
103
111
|
e = e.parentElement;
|
|
104
112
|
}
|
|
105
113
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
114
|
+
function ge() {
|
|
115
|
+
ce.value = document.documentElement.clientWidth, D.value = document.documentElement.clientHeight, _(), V();
|
|
108
116
|
}
|
|
109
|
-
function
|
|
110
|
-
|
|
117
|
+
function _() {
|
|
118
|
+
ee(), s.value = te(j.value), s.value && s.value.addEventListener(
|
|
111
119
|
"scroll",
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
);
|
|
120
|
+
V,
|
|
121
|
+
ve.value ? { passive: !0 } : void 0
|
|
122
|
+
), s.value === document.documentElement ? Z.start() : Z.stop();
|
|
115
123
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
124
|
+
function ee() {
|
|
125
|
+
s.value && s.value.removeEventListener("scroll", V), s.value = null;
|
|
118
126
|
}
|
|
119
|
-
function
|
|
127
|
+
function be(e) {
|
|
120
128
|
return e === document.documentElement ? null : e.parentElement;
|
|
121
129
|
}
|
|
122
|
-
function
|
|
130
|
+
function te(e) {
|
|
123
131
|
if (e === null) return null;
|
|
124
|
-
const l =
|
|
132
|
+
const l = be(e);
|
|
125
133
|
return l === null ? null : l === document.documentElement ? document.documentElement : ((m) => {
|
|
126
|
-
const { overflow: S, overflowX:
|
|
127
|
-
return /(auto|scroll|overlay)/.test(S +
|
|
128
|
-
})(l) ? l :
|
|
134
|
+
const { overflow: S, overflowX: L, overflowY: v } = getComputedStyle(m);
|
|
135
|
+
return /(auto|scroll|overlay)/.test(S + v + L);
|
|
136
|
+
})(l) ? l : te(l);
|
|
129
137
|
}
|
|
130
|
-
function
|
|
131
|
-
n.value &&
|
|
138
|
+
function V() {
|
|
139
|
+
n.value && le();
|
|
132
140
|
}
|
|
133
|
-
async function
|
|
134
|
-
await
|
|
141
|
+
async function le() {
|
|
142
|
+
await Oe(), he(), P.value = A.value?.getBoundingClientRect(), w.value = j.value?.getBoundingClientRect(), Y.value = X.value?.offsetHeight, O.value = w.value.height + 4, t.flip && (Q.value = ye());
|
|
135
143
|
}
|
|
136
|
-
function
|
|
137
|
-
|
|
144
|
+
function we() {
|
|
145
|
+
if (s.value) {
|
|
146
|
+
const e = s.value.getBoundingClientRect();
|
|
147
|
+
return {
|
|
148
|
+
top: e.top < 0 ? 0 : e.top,
|
|
149
|
+
bottom: e.bottom > D.value ? D.value : e.bottom
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
138
153
|
top: 0,
|
|
139
|
-
bottom:
|
|
154
|
+
bottom: D.value
|
|
140
155
|
};
|
|
141
156
|
}
|
|
142
|
-
function
|
|
143
|
-
const { top: e, bottom: l } =
|
|
144
|
-
return
|
|
145
|
-
function
|
|
157
|
+
function ye() {
|
|
158
|
+
const { top: e, bottom: l } = w.value, { top: o, bottom: m } = we(), S = e - o, L = m - l;
|
|
159
|
+
return v(t.placement, []);
|
|
160
|
+
function v(H, i) {
|
|
146
161
|
if (H === "bottom")
|
|
147
|
-
if (
|
|
148
|
-
if (!
|
|
149
|
-
return
|
|
162
|
+
if (i.includes("bottom")) {
|
|
163
|
+
if (!i.includes("top"))
|
|
164
|
+
return v("top", i);
|
|
150
165
|
} else
|
|
151
|
-
return
|
|
166
|
+
return L < Y.value + 4 ? v("top", [...i, "bottom"]) : "bottom";
|
|
152
167
|
else if (H === "top")
|
|
153
|
-
if (
|
|
154
|
-
if (!
|
|
155
|
-
return
|
|
168
|
+
if (i.includes("top")) {
|
|
169
|
+
if (!i.includes("bottom"))
|
|
170
|
+
return v("bottom", i);
|
|
156
171
|
} else
|
|
157
|
-
return S <
|
|
172
|
+
return S < Y.value + 4 ? v("bottom", [...i, "top"]) : "top";
|
|
158
173
|
return t.placement;
|
|
159
174
|
}
|
|
160
175
|
}
|
|
161
|
-
function
|
|
176
|
+
function Ce() {
|
|
162
177
|
if (t.modelValue) {
|
|
163
178
|
const e = t.options.find((l) => l[t.value] === t.modelValue);
|
|
164
|
-
e ? (u.value = e[t.label],
|
|
179
|
+
e ? (u.value = e[t.label], r.value = e[t.value]) : (u.value = t.modelValue, r.value = null);
|
|
165
180
|
} else
|
|
166
|
-
u.value = null,
|
|
167
|
-
}
|
|
168
|
-
function ye() {
|
|
169
|
-
T.value = !0;
|
|
170
|
-
}
|
|
171
|
-
function Ce() {
|
|
172
|
-
T.value = !1, n.value && (n.value = !1), t.search && (w.value = !1, d.value = !0, R.value = !1);
|
|
181
|
+
u.value = null, r.value = null;
|
|
173
182
|
}
|
|
174
183
|
function $e() {
|
|
175
|
-
|
|
184
|
+
x.value = !0;
|
|
176
185
|
}
|
|
177
186
|
function Be() {
|
|
178
|
-
|
|
187
|
+
x.value = !1, n.value && (n.value = !1), t.search && (b.value = !1, p.value = !0, R.value = !1);
|
|
188
|
+
}
|
|
189
|
+
function Se() {
|
|
190
|
+
d.value = !0, t.allowClear && (u.value || t.search && f.value) && (p.value = !1, $.value = !0, t.search && (b.value = !1));
|
|
191
|
+
}
|
|
192
|
+
function Ee() {
|
|
193
|
+
d.value = !1, t.allowClear && $.value && ($.value = !1, t.search || (p.value = !0)), t.search && (n.value ? (b.value = !0, p.value = !1) : (b.value = !1, p.value = !0));
|
|
179
194
|
}
|
|
180
|
-
function
|
|
181
|
-
|
|
195
|
+
function Me(e, l) {
|
|
196
|
+
d.value = !!l, r.value = e;
|
|
182
197
|
}
|
|
183
|
-
async function
|
|
184
|
-
if (B(), !t.search && z.value && (z.value.style.opacity = "0"), n.value = !n.value, n.value &&
|
|
198
|
+
async function ke() {
|
|
199
|
+
if (B(), !t.search && z.value && (z.value.style.opacity = "0"), n.value = !n.value, n.value && le(), !r.value && u.value) {
|
|
185
200
|
const e = t.options.find((l) => l[t.label] === u.value);
|
|
186
|
-
|
|
201
|
+
r.value = e ? e[t.value] : null;
|
|
187
202
|
}
|
|
188
|
-
t.search && ($.value || (
|
|
203
|
+
t.search && ($.value || (p.value = !n.value, b.value = n.value));
|
|
189
204
|
}
|
|
190
|
-
function
|
|
205
|
+
function Ve(e) {
|
|
191
206
|
R.value = !!e.target?.value;
|
|
192
207
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
208
|
+
function Le() {
|
|
209
|
+
x.value && (B(), I.value = !0), $.value = !1, u.value = null, r.value = null, n.value = !1, b.value = !1, p.value = !0, k("update:modelValue"), k("change");
|
|
195
210
|
}
|
|
196
211
|
function B() {
|
|
197
212
|
z.value?.focus();
|
|
198
213
|
}
|
|
199
|
-
function
|
|
200
|
-
t.modelValue !== e && (u.value = l,
|
|
214
|
+
function Te(e, l, o) {
|
|
215
|
+
t.modelValue !== e && (u.value = l, r.value = e, k("update:modelValue", e), k("change", e, l, o)), I.value = !1, B();
|
|
201
216
|
}
|
|
202
217
|
return (e, l) => (h(), y("div", {
|
|
203
218
|
class: C(["select-wrap", {
|
|
204
|
-
"select-focused":
|
|
219
|
+
"select-focused": x.value,
|
|
205
220
|
"search-select": e.search,
|
|
206
221
|
"select-small": e.size === "small",
|
|
207
222
|
"select-large": e.size === "large",
|
|
208
223
|
"select-disabled": e.disabled
|
|
209
224
|
}]),
|
|
210
|
-
style:
|
|
211
|
-
--select-width: ${
|
|
212
|
-
--select-height: ${
|
|
213
|
-
--select-primary-color-hover: ${M(
|
|
214
|
-
--select-primary-color-focus: ${M(
|
|
215
|
-
--select-primary-shadow-color: ${M(
|
|
225
|
+
style: ae(`
|
|
226
|
+
--select-width: ${fe.value};
|
|
227
|
+
--select-height: ${de.value};
|
|
228
|
+
--select-primary-color-hover: ${M(U)[4]};
|
|
229
|
+
--select-primary-color-focus: ${M(U)[4]};
|
|
230
|
+
--select-primary-shadow-color: ${M(re)};
|
|
216
231
|
`),
|
|
217
|
-
onClick: l[7] || (l[7] = (
|
|
232
|
+
onClick: l[7] || (l[7] = (o) => e.disabled ? () => !1 : ke())
|
|
218
233
|
}, [
|
|
219
234
|
g("div", {
|
|
220
235
|
ref_key: "selectContentRef",
|
|
221
|
-
ref:
|
|
236
|
+
ref: j,
|
|
222
237
|
class: "select-content-container",
|
|
223
|
-
onMouseenter:
|
|
224
|
-
onMouseleave:
|
|
238
|
+
onMouseenter: Se,
|
|
239
|
+
onMouseleave: Ee
|
|
225
240
|
}, [
|
|
226
|
-
g("span",
|
|
241
|
+
g("span", Je, [
|
|
227
242
|
W(g("input", {
|
|
228
243
|
ref_key: "inputRef",
|
|
229
244
|
ref: z,
|
|
230
|
-
class: C(["search-input", { "caret-show": n.value ||
|
|
245
|
+
class: C(["search-input", { "caret-show": n.value || I.value }]),
|
|
231
246
|
type: "text",
|
|
232
247
|
autocomplete: "off",
|
|
233
248
|
readonly: !e.search,
|
|
234
249
|
disabled: e.disabled,
|
|
235
|
-
onInput:
|
|
236
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
237
|
-
onBlur: l[1] || (l[1] = (
|
|
238
|
-
onFocus: l[2] || (l[2] = (
|
|
239
|
-
}, null, 42,
|
|
240
|
-
[
|
|
250
|
+
onInput: Ve,
|
|
251
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => f.value = o),
|
|
252
|
+
onBlur: l[1] || (l[1] = (o) => !d.value && !e.disabled ? Be() : () => !1),
|
|
253
|
+
onFocus: l[2] || (l[2] = (o) => e.disabled ? () => !1 : $e())
|
|
254
|
+
}, null, 42, Ke), [
|
|
255
|
+
[De, f.value]
|
|
241
256
|
])
|
|
242
257
|
]),
|
|
243
258
|
g("span", {
|
|
244
259
|
class: C(["select-item", { "select-placeholder": !u.value || n.value, "select-item-hidden": R.value }]),
|
|
245
260
|
title: u.value
|
|
246
|
-
},
|
|
261
|
+
}, ne(u.value || e.placeholder), 11, Qe),
|
|
247
262
|
(h(), y("svg", {
|
|
248
|
-
class: C(["arrow-svg", { "arrow-rotate": n.value, "show-svg":
|
|
263
|
+
class: C(["arrow-svg", { "arrow-rotate": n.value, "show-svg": p.value }]),
|
|
249
264
|
focusable: "false",
|
|
250
265
|
"data-icon": "down",
|
|
251
266
|
width: "1em",
|
|
@@ -257,7 +272,7 @@ const Ye = { class: "select-search" }, qe = ["readonly", "disabled"], Ge = ["tit
|
|
|
257
272
|
g("path", { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" }, null, -1)
|
|
258
273
|
])], 2)),
|
|
259
274
|
(h(), y("svg", {
|
|
260
|
-
class: C(["search-svg", { "show-svg":
|
|
275
|
+
class: C(["search-svg", { "show-svg": b.value }]),
|
|
261
276
|
focusable: "false",
|
|
262
277
|
"data-icon": "search",
|
|
263
278
|
width: "1em",
|
|
@@ -278,16 +293,16 @@ const Ye = { class: "select-search" }, qe = ["readonly", "disabled"], Ge = ["tit
|
|
|
278
293
|
"aria-hidden": "true",
|
|
279
294
|
"fill-rule": "evenodd",
|
|
280
295
|
viewBox: "64 64 896 896",
|
|
281
|
-
onClick:
|
|
296
|
+
onClick: F(Le, ["stop"])
|
|
282
297
|
}, [...l[10] || (l[10] = [
|
|
283
298
|
g("path", { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" }, null, -1)
|
|
284
299
|
])], 2))
|
|
285
300
|
], 544),
|
|
286
|
-
(h(),
|
|
301
|
+
(h(), Pe(He, {
|
|
287
302
|
disabled: e.to === !1,
|
|
288
303
|
to: e.to === !1 ? null : e.to
|
|
289
304
|
}, [
|
|
290
|
-
|
|
305
|
+
G(We, {
|
|
291
306
|
name: "slide",
|
|
292
307
|
"enter-from-class": "slide-enter",
|
|
293
308
|
"enter-active-class": "slide-enter",
|
|
@@ -296,57 +311,57 @@ const Ye = { class: "select-search" }, qe = ["readonly", "disabled"], Ge = ["tit
|
|
|
296
311
|
"leave-active-class": "slide-leave slide-leave-active",
|
|
297
312
|
"leave-to-class": "slide-leave slide-leave-active"
|
|
298
313
|
}, {
|
|
299
|
-
default:
|
|
300
|
-
|
|
314
|
+
default: ue(() => [
|
|
315
|
+
N.value ? W((h(), y("div", {
|
|
301
316
|
key: 0,
|
|
302
317
|
ref_key: "selectPanelRef",
|
|
303
|
-
ref:
|
|
318
|
+
ref: X,
|
|
304
319
|
class: "select-panel-container",
|
|
305
|
-
style:
|
|
306
|
-
...
|
|
307
|
-
"--select-option-bg-color-active": M(
|
|
320
|
+
style: ae({
|
|
321
|
+
...me.value,
|
|
322
|
+
"--select-option-bg-color-active": M(U)[0]
|
|
308
323
|
})
|
|
309
324
|
}, [
|
|
310
|
-
W(
|
|
311
|
-
style: { ...
|
|
325
|
+
W(G(M(Ae), Ne({
|
|
326
|
+
style: { ...pe.value, "--scrollbar-rail-vertical-right": "2px 0 2px auto" },
|
|
312
327
|
class: "select-options-panel",
|
|
313
|
-
onClick:
|
|
314
|
-
onMouseenter: l[3] || (l[3] = (
|
|
315
|
-
onMouseleave: l[4] || (l[4] = (
|
|
328
|
+
onClick: F(B, ["stop"]),
|
|
329
|
+
onMouseenter: l[3] || (l[3] = (o) => d.value = !0),
|
|
330
|
+
onMouseleave: l[4] || (l[4] = (o) => d.value = !1)
|
|
316
331
|
}, e.scrollbarProps), {
|
|
317
|
-
default:
|
|
318
|
-
(h(!0), y(
|
|
332
|
+
default: ue(() => [
|
|
333
|
+
(h(!0), y(Ie, null, Ue(c.value, (o, m) => (h(), y("p", {
|
|
319
334
|
key: m,
|
|
320
335
|
class: C([
|
|
321
336
|
"select-option",
|
|
322
337
|
{
|
|
323
|
-
"option-hover": !
|
|
324
|
-
"option-selected":
|
|
325
|
-
"option-disabled":
|
|
338
|
+
"option-hover": !o.disabled && o[e.value] === r.value,
|
|
339
|
+
"option-selected": o[e.label] === u.value,
|
|
340
|
+
"option-disabled": o.disabled
|
|
326
341
|
}
|
|
327
342
|
]),
|
|
328
|
-
title:
|
|
329
|
-
onMouseenter: (S) =>
|
|
330
|
-
onClick:
|
|
331
|
-
},
|
|
343
|
+
title: o[e.label],
|
|
344
|
+
onMouseenter: (S) => Me(o[e.value], o.disabled),
|
|
345
|
+
onClick: F((S) => o.disabled ? B() : Te(o[e.value], o[e.label], m), ["stop"])
|
|
346
|
+
}, ne(o[e.label]), 43, Ze))), 128))
|
|
332
347
|
]),
|
|
333
348
|
_: 1
|
|
334
349
|
}, 16, ["style"]), [
|
|
335
|
-
[
|
|
350
|
+
[J, c.value.length]
|
|
336
351
|
]),
|
|
337
352
|
W(g("div", {
|
|
338
353
|
class: "select-options-panel options-panel-empty",
|
|
339
|
-
onClick:
|
|
340
|
-
onMouseenter: l[5] || (l[5] = (
|
|
341
|
-
onMouseleave: l[6] || (l[6] = (
|
|
354
|
+
onClick: F(B, ["stop"]),
|
|
355
|
+
onMouseenter: l[5] || (l[5] = (o) => d.value = !0),
|
|
356
|
+
onMouseleave: l[6] || (l[6] = (o) => d.value = !1)
|
|
342
357
|
}, [
|
|
343
|
-
|
|
358
|
+
G(M(je), { image: "outlined" })
|
|
344
359
|
], 544), [
|
|
345
|
-
[
|
|
360
|
+
[J, !c.value.length]
|
|
346
361
|
])
|
|
347
362
|
], 4)), [
|
|
348
|
-
[
|
|
349
|
-
]) :
|
|
363
|
+
[J, n.value]
|
|
364
|
+
]) : Fe("", !0)
|
|
350
365
|
]),
|
|
351
366
|
_: 1
|
|
352
367
|
})
|
|
@@ -355,5 +370,5 @@ const Ye = { class: "select-search" }, qe = ["readonly", "disabled"], Ge = ["tit
|
|
|
355
370
|
}
|
|
356
371
|
});
|
|
357
372
|
export {
|
|
358
|
-
|
|
373
|
+
ot as default
|
|
359
374
|
};
|
package/es/utils/resolver.js
CHANGED
|
@@ -108,7 +108,7 @@ function p(e, t) {
|
|
|
108
108
|
`vue-amazing-ui/${i}/${s[a]}/${a}.css`
|
|
109
109
|
);
|
|
110
110
|
}), e === "DatePicker" && o.push(
|
|
111
|
-
`vue-amazing-ui/${i}/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.
|
|
111
|
+
`vue-amazing-ui/${i}/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.21_typescript@5.9.2_/node_modules/@vuepic/vue-datepicker/dist/main.css`
|
|
112
112
|
), e === "Swiper" && (o.push(`vue-amazing-ui/${i}/node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/swiper.css`), [
|
|
113
113
|
"effect-cards",
|
|
114
114
|
"effect-creative",
|
package/lib/select/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.slide-enter[data-v-
|
|
1
|
+
.slide-enter[data-v-3ddc7bae]{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1);animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-enter-active[data-v-3ddc7bae]{animation-name:slideIn-3ddc7bae;animation-play-state:running}@keyframes slideIn-3ddc7bae{0%{transform:scaleY(.8);opacity:0}to{transform:scaleY(1);opacity:1}}.slide-leave[data-v-3ddc7bae]{animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-leave-active[data-v-3ddc7bae]{animation-name:slideOut-3ddc7bae;animation-play-state:running}@keyframes slideOut-3ddc7bae{0%{transform:scaleY(1);opacity:1}to{transform:scaleY(.8);opacity:0}}.select-wrap[data-v-3ddc7bae]{position:relative;display:inline-block;width:var(--select-width);height:var(--select-height);font-size:14px;font-weight:400;color:#000000e0;outline:none;cursor:pointer;transition:all .3s}.select-wrap:not(.select-disabled):hover .select-content-container[data-v-3ddc7bae]{border-color:var(--select-primary-color-hover)}.select-wrap .select-content-container[data-v-3ddc7bae]{position:relative;display:flex;padding:0 11px;border:1px solid #d9d9d9;border-radius:6px;background-color:#fff;width:100%;height:100%;outline:none;transition:all .2s cubic-bezier(.645,.045,.355,1)}.select-wrap .select-content-container[data-v-3ddc7bae]:after{display:inline-block;width:0;visibility:hidden;content:" ";line-height:calc(var(--select-height) - 2px)}.select-wrap .select-content-container .select-search[data-v-3ddc7bae]{position:absolute;inset:0 11px}.select-wrap .select-content-container .select-search .search-input[data-v-3ddc7bae]{margin:0;padding:0;width:100%;height:100%;caret-color:transparent;vertical-align:top;background:transparent;border:none;outline:none;appearance:none;opacity:0;cursor:pointer}.select-wrap .select-content-container .select-search .caret-show[data-v-3ddc7bae]{caret-color:auto}.select-wrap .select-content-container .select-item[data-v-3ddc7bae]{position:relative;padding-right:18px;flex:1;line-height:calc(var(--select-height) - 2px);-webkit-user-select:none;user-select:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition:all .3s}.select-wrap .select-content-container .select-placeholder[data-v-3ddc7bae]{color:#00000040;transition:none;pointer-events:none}.select-wrap .select-content-container .select-item-hidden[data-v-3ddc7bae]{visibility:hidden}.select-wrap .select-content-container .icon-svg[data-v-3ddc7bae]{position:absolute;top:0;bottom:0;right:11px;margin:auto 0;display:inline-block;font-size:12px;color:#00000040;fill:currentColor;opacity:0;-webkit-user-select:none;user-select:none;pointer-events:none}.select-wrap .select-content-container .arrow-svg[data-v-3ddc7bae]{position:absolute;top:0;bottom:0;right:11px;margin:auto 0;display:inline-block;font-size:12px;color:#00000040;fill:currentColor;opacity:0;-webkit-user-select:none;user-select:none;pointer-events:none;transition:transform .3s,opacity .3s}.select-wrap .select-content-container .arrow-rotate[data-v-3ddc7bae]{transform:rotate(180deg)}.select-wrap .select-content-container .search-svg[data-v-3ddc7bae]{position:absolute;top:0;bottom:0;right:11px;margin:auto 0;display:inline-block;font-size:12px;color:#00000040;fill:currentColor;opacity:0;-webkit-user-select:none;user-select:none;pointer-events:none;transition:opacity .3s}.select-wrap .select-content-container .clear-svg[data-v-3ddc7bae]{position:absolute;top:0;bottom:0;right:11px;margin:auto 0;display:inline-block;font-size:12px;color:#00000040;fill:currentColor;opacity:0;-webkit-user-select:none;user-select:none;pointer-events:none;z-index:1;background:#fff;cursor:pointer;transition:color .2s,opacity .3s}.select-wrap .select-content-container .clear-svg[data-v-3ddc7bae]:hover{color:#00000073}.select-wrap .select-content-container .show-svg[data-v-3ddc7bae]{opacity:1;pointer-events:auto}.select-focused:not(.select-disabled) .select-content-container[data-v-3ddc7bae]{border-color:var(--select-primary-color-focus);box-shadow:0 0 0 2px var(--select-primary-shadow-color)}.search-select .select-content-container[data-v-3ddc7bae]{cursor:text}.search-select .select-content-container .select-search .search-input[data-v-3ddc7bae]{cursor:auto;color:inherit;opacity:1}.select-small[data-v-3ddc7bae]{font-size:14px}.select-small .select-content-container[data-v-3ddc7bae]{padding:0 7px;border-radius:4px}.select-small .select-content-container .select-search[data-v-3ddc7bae]{left:7px;right:28px}.select-small .select-content-container .select-item[data-v-3ddc7bae]{padding-right:22px}.select-large[data-v-3ddc7bae]{font-size:16px}.select-large .select-content-container[data-v-3ddc7bae]{padding:0 11px;border-radius:8px}.select-large .select-content-container .select-item[data-v-3ddc7bae]{padding-right:20px}.select-disabled .select-content-container[data-v-3ddc7bae]{color:#00000040;background:#f5f5f5;-webkit-user-select:none;user-select:none;cursor:not-allowed}.select-disabled .select-content-container .select-search .search-input[data-v-3ddc7bae]{cursor:not-allowed}.select-panel-container[data-v-3ddc7bae]{position:absolute;z-index:1000;padding:4px;border-radius:8px;overflow:hidden;background-color:#fff;outline:none;cursor:auto;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.select-panel-container .select-options-panel .select-option[data-v-3ddc7bae]{min-height:32px;display:block;padding:5px 12px;border-radius:4px;color:#000000e0;font-weight:400;font-size:14px;line-height:1.57142857;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition:background .3s ease}.select-panel-container .select-options-panel .option-hover[data-v-3ddc7bae]{background:#0000000a}.select-panel-container .select-options-panel .option-selected[data-v-3ddc7bae]{font-weight:600;background:var(--select-option-bg-color-active)}.select-panel-container .select-options-panel .option-disabled[data-v-3ddc7bae]{color:#00000040;cursor:not-allowed}.select-panel-container .options-panel-empty[data-v-3ddc7bae]{min-width:112px;padding:9px 16px}.select-panel-container .options-panel-empty .empty-wrap[data-v-3ddc7bae]{margin-block:8px}.select-panel-container .options-panel-empty .empty-wrap[data-v-3ddc7bae] .empty-image-wrap{height:35px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Select.vue2.cjs");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Select.vue2.cjs");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-3ddc7bae"]]);exports.default=u;
|