@web_xiaobai/business-ui 0.0.38 → 0.0.39
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/boden-business-ui.es.js +446 -428
- package/dist/boden-business-ui.umd.js +33 -33
- package/package.json +1 -1
|
@@ -4772,7 +4772,8 @@ var index_cssr_default$92 = cB$3("base-clear", "\n flex-shrink: 0;\n height: 1em
|
|
|
4772
4772
|
originalTransform: "translateX(-50%) translateY(-50%)"
|
|
4773
4773
|
})]),
|
|
4774
4774
|
cE$3("container", "\n animation: rotator 3s linear infinite both;\n ", [cE$3("icon", "\n height: 1em;\n width: 1em;\n ")])
|
|
4775
|
-
])]), duration$1 = "1.6s"
|
|
4775
|
+
])]), duration$1 = "1.6s";
|
|
4776
|
+
const exposedLoadingProps$1 = {
|
|
4776
4777
|
strokeWidth: {
|
|
4777
4778
|
type: Number,
|
|
4778
4779
|
default: 28
|
|
@@ -4780,8 +4781,17 @@ var index_cssr_default$92 = cB$3("base-clear", "\n flex-shrink: 0;\n height: 1em
|
|
|
4780
4781
|
stroke: {
|
|
4781
4782
|
type: String,
|
|
4782
4783
|
default: void 0
|
|
4784
|
+
},
|
|
4785
|
+
scale: {
|
|
4786
|
+
type: Number,
|
|
4787
|
+
default: 1
|
|
4788
|
+
},
|
|
4789
|
+
radius: {
|
|
4790
|
+
type: Number,
|
|
4791
|
+
default: 100
|
|
4783
4792
|
}
|
|
4784
|
-
}
|
|
4793
|
+
};
|
|
4794
|
+
var Loading_default$1 = defineComponent({
|
|
4785
4795
|
name: "BaseLoading",
|
|
4786
4796
|
props: Object.assign({
|
|
4787
4797
|
clsPrefix: {
|
|
@@ -4791,14 +4801,6 @@ var index_cssr_default$92 = cB$3("base-clear", "\n flex-shrink: 0;\n height: 1em
|
|
|
4791
4801
|
show: {
|
|
4792
4802
|
type: Boolean,
|
|
4793
4803
|
default: !0
|
|
4794
|
-
},
|
|
4795
|
-
scale: {
|
|
4796
|
-
type: Number,
|
|
4797
|
-
default: 1
|
|
4798
|
-
},
|
|
4799
|
-
radius: {
|
|
4800
|
-
type: Number,
|
|
4801
|
-
default: 100
|
|
4802
4804
|
}
|
|
4803
4805
|
}, exposedLoadingProps$1),
|
|
4804
4806
|
setup(_) {
|
|
@@ -5065,6 +5067,7 @@ var light_default$56 = {
|
|
|
5065
5067
|
onResize: Function,
|
|
5066
5068
|
internalOnUpdateScrollLeft: Function,
|
|
5067
5069
|
internalHoistYRail: Boolean,
|
|
5070
|
+
internalExposeWidthCssVar: Boolean,
|
|
5068
5071
|
yPlacement: {
|
|
5069
5072
|
type: String,
|
|
5070
5073
|
default: "right"
|
|
@@ -5316,6 +5319,7 @@ var light_default$56 = {
|
|
|
5316
5319
|
handleContainerResize: W6,
|
|
5317
5320
|
handleYScrollMouseDown: u8,
|
|
5318
5321
|
handleXScrollMouseDown: s8,
|
|
5322
|
+
containerWidth: z,
|
|
5319
5323
|
cssVars: C ? void 0 : p8,
|
|
5320
5324
|
themeClass: m8?.themeClass,
|
|
5321
5325
|
onRender: m8?.onRender
|
|
@@ -5360,7 +5364,7 @@ var light_default$56 = {
|
|
|
5360
5364
|
role: "none",
|
|
5361
5365
|
ref: "containerRef",
|
|
5362
5366
|
class: [`${C}-scrollbar-container`, this.containerClass],
|
|
5363
|
-
style: this.containerStyle,
|
|
5367
|
+
style: [this.containerStyle, this.internalExposeWidthCssVar ? { "--n-scrollbar-current-width": pxfy$1(this.containerWidth) } : void 0],
|
|
5364
5368
|
onScroll: this.handleScroll,
|
|
5365
5369
|
onWheel: this.onWheel
|
|
5366
5370
|
}, h(VResizeObserver_default$1, { onResize: this.handleContentResize }, { default: () => h("div", {
|
|
@@ -6870,123 +6874,128 @@ var Input_default = defineComponent({
|
|
|
6870
6874
|
props: inputProps$1,
|
|
6871
6875
|
slots: Object,
|
|
6872
6876
|
setup(_) {
|
|
6873
|
-
let { mergedClsPrefixRef: S, mergedBorderedRef: C, inlineThemeDisabled: T, mergedRtlRef: E } = useConfig$1(_),
|
|
6877
|
+
let { mergedClsPrefixRef: S, mergedBorderedRef: C, inlineThemeDisabled: T, mergedRtlRef: E, mergedComponentPropsRef: D } = useConfig$1(_), O = use_theme_default$3("Input", "-input", input_cssr_default$1, light_default$55, _, S);
|
|
6874
6878
|
isSafari$1 && useStyle$1("-input-safari", safariStyle$1, S);
|
|
6875
|
-
let
|
|
6879
|
+
let k = ref(null), P = ref(null), F = ref(null), I = ref(null), L = ref(null), R = ref(null), z = ref(null), B = useCursor$1(z), V = ref(null), { localeRef: W } = useLocale$1("Input"), G = ref(_.defaultValue), K = toRef(_, "value"), q = useMergedState$1(K, G), J = useFormItem$1(_, { mergedSize: (S) => {
|
|
6880
|
+
let { size: C } = _;
|
|
6881
|
+
if (C) return C;
|
|
6882
|
+
let { mergedSize: T } = S || {};
|
|
6883
|
+
return T?.value ? T.value : D?.value?.Input?.size || "medium";
|
|
6884
|
+
} }), { mergedSizeRef: Y, mergedDisabledRef: X, mergedStatusRef: x6 } = J, Z = ref(!1), S6 = ref(!1), Q = ref(!1), C6 = ref(!1), w6 = null, T6 = computed(() => {
|
|
6876
6885
|
let { placeholder: S, pair: C } = _;
|
|
6877
|
-
return C ? Array.isArray(S) ? S : S === void 0 ? ["", ""] : [S, S] : S === void 0 ? [
|
|
6878
|
-
}), T6 = computed(() => {
|
|
6879
|
-
let { value: _ } = S6, { value: S } = K, { value: C } = w6;
|
|
6880
|
-
return !_ && (isEmptyInputValue$1(S) || Array.isArray(S) && isEmptyInputValue$1(S[0])) && C[0];
|
|
6886
|
+
return C ? Array.isArray(S) ? S : S === void 0 ? ["", ""] : [S, S] : S === void 0 ? [W.value.placeholder] : [S];
|
|
6881
6887
|
}), E6 = computed(() => {
|
|
6882
|
-
let { value: _ } =
|
|
6888
|
+
let { value: _ } = Q, { value: S } = q, { value: C } = T6;
|
|
6889
|
+
return !_ && (isEmptyInputValue$1(S) || Array.isArray(S) && isEmptyInputValue$1(S[0])) && C[0];
|
|
6890
|
+
}), O6 = computed(() => {
|
|
6891
|
+
let { value: _ } = Q, { value: S } = q, { value: C } = T6;
|
|
6883
6892
|
return !_ && C[1] && (isEmptyInputValue$1(S) || Array.isArray(S) && isEmptyInputValue$1(S[1]));
|
|
6884
|
-
}),
|
|
6885
|
-
if (
|
|
6886
|
-
let { value: S } =
|
|
6887
|
-
return _.pair ? !!(Array.isArray(S) && (S[0] || S[1])) && (
|
|
6888
|
-
}),
|
|
6893
|
+
}), k6 = use_memo_default$1(() => _.internalForceFocus || Z.value), j6 = use_memo_default$1(() => {
|
|
6894
|
+
if (X.value || _.readonly || !_.clearable || !k6.value && !S6.value) return !1;
|
|
6895
|
+
let { value: S } = q, { value: C } = k6;
|
|
6896
|
+
return _.pair ? !!(Array.isArray(S) && (S[0] || S[1])) && (S6.value || C) : !!S && (S6.value || C);
|
|
6897
|
+
}), M6 = computed(() => {
|
|
6889
6898
|
let { showPasswordOn: S } = _;
|
|
6890
6899
|
if (S) return S;
|
|
6891
6900
|
if (_.showPasswordToggle) return "click";
|
|
6892
|
-
}),
|
|
6901
|
+
}), P6 = ref(!1), F6 = computed(() => {
|
|
6893
6902
|
let { textDecoration: S } = _;
|
|
6894
6903
|
return S ? Array.isArray(S) ? S.map((_) => ({ textDecoration: _ })) : [{ textDecoration: S }] : ["", ""];
|
|
6895
|
-
}),
|
|
6904
|
+
}), I6 = ref(void 0), L6 = () => {
|
|
6896
6905
|
if (_.type === "textarea") {
|
|
6897
6906
|
let { autosize: S } = _;
|
|
6898
|
-
if (S && (
|
|
6899
|
-
let { paddingTop: C, paddingBottom: T, lineHeight: E } = window.getComputedStyle(
|
|
6900
|
-
if (!
|
|
6907
|
+
if (S && (I6.value = V.value?.$el?.offsetWidth), !P.value || typeof S == "boolean") return;
|
|
6908
|
+
let { paddingTop: C, paddingBottom: T, lineHeight: E } = window.getComputedStyle(P.value), D = Number(C.slice(0, -2)), O = Number(T.slice(0, -2)), k = Number(E.slice(0, -2)), { value: A } = F;
|
|
6909
|
+
if (!A) return;
|
|
6901
6910
|
if (S.minRows) {
|
|
6902
|
-
let _ = Math.max(S.minRows, 1), C = `${D + O +
|
|
6903
|
-
|
|
6911
|
+
let _ = Math.max(S.minRows, 1), C = `${D + O + k * _}px`;
|
|
6912
|
+
A.style.minHeight = C;
|
|
6904
6913
|
}
|
|
6905
6914
|
if (S.maxRows) {
|
|
6906
|
-
let _ = `${D + O +
|
|
6907
|
-
|
|
6915
|
+
let _ = `${D + O + k * S.maxRows}px`;
|
|
6916
|
+
A.style.maxHeight = _;
|
|
6908
6917
|
}
|
|
6909
6918
|
}
|
|
6910
|
-
},
|
|
6919
|
+
}, R6 = computed(() => {
|
|
6911
6920
|
let { maxlength: S } = _;
|
|
6912
6921
|
return S === void 0 ? void 0 : Number(S);
|
|
6913
6922
|
});
|
|
6914
6923
|
onMounted(() => {
|
|
6915
|
-
let { value: _ } =
|
|
6916
|
-
Array.isArray(_) ||
|
|
6924
|
+
let { value: _ } = q;
|
|
6925
|
+
Array.isArray(_) || k8(_);
|
|
6917
6926
|
});
|
|
6918
|
-
let
|
|
6919
|
-
function z6(S, C) {
|
|
6920
|
-
let { onUpdateValue: T, "onUpdate:value": E, onInput: D } = _, { nTriggerFormInput: O } = q;
|
|
6921
|
-
T && call(T, S, C), E && call(E, S, C), D && call(D, S, C), W.value = S, O();
|
|
6922
|
-
}
|
|
6927
|
+
let z6 = getCurrentInstance().proxy;
|
|
6923
6928
|
function V6(S, C) {
|
|
6924
|
-
let {
|
|
6925
|
-
T && call(T, S, C),
|
|
6929
|
+
let { onUpdateValue: T, "onUpdate:value": E, onInput: D } = _, { nTriggerFormInput: O } = J;
|
|
6930
|
+
T && call(T, S, C), E && call(E, S, C), D && call(D, S, C), G.value = S, O();
|
|
6926
6931
|
}
|
|
6927
|
-
function H6(S) {
|
|
6928
|
-
let {
|
|
6929
|
-
|
|
6932
|
+
function H6(S, C) {
|
|
6933
|
+
let { onChange: T } = _, { nTriggerFormChange: E } = J;
|
|
6934
|
+
T && call(T, S, C), G.value = S, E();
|
|
6930
6935
|
}
|
|
6931
6936
|
function U6(S) {
|
|
6932
|
-
let {
|
|
6937
|
+
let { onBlur: C } = _, { nTriggerFormBlur: T } = J;
|
|
6933
6938
|
C && call(C, S), T();
|
|
6934
6939
|
}
|
|
6935
6940
|
function W6(S) {
|
|
6941
|
+
let { onFocus: C } = _, { nTriggerFormFocus: T } = J;
|
|
6942
|
+
C && call(C, S), T();
|
|
6943
|
+
}
|
|
6944
|
+
function q6(S) {
|
|
6936
6945
|
let { onClear: C } = _;
|
|
6937
6946
|
C && call(C, S);
|
|
6938
6947
|
}
|
|
6939
|
-
function
|
|
6948
|
+
function J6(S) {
|
|
6940
6949
|
let { onInputBlur: C } = _;
|
|
6941
6950
|
C && call(C, S);
|
|
6942
6951
|
}
|
|
6943
|
-
function
|
|
6952
|
+
function Y6(S) {
|
|
6944
6953
|
let { onInputFocus: C } = _;
|
|
6945
6954
|
C && call(C, S);
|
|
6946
6955
|
}
|
|
6947
|
-
function
|
|
6956
|
+
function X6() {
|
|
6948
6957
|
let { onDeactivate: S } = _;
|
|
6949
6958
|
S && call(S);
|
|
6950
6959
|
}
|
|
6951
|
-
function
|
|
6960
|
+
function Z6() {
|
|
6952
6961
|
let { onActivate: S } = _;
|
|
6953
6962
|
S && call(S);
|
|
6954
6963
|
}
|
|
6955
|
-
function
|
|
6964
|
+
function Q6(S) {
|
|
6956
6965
|
let { onClick: C } = _;
|
|
6957
6966
|
C && call(C, S);
|
|
6958
6967
|
}
|
|
6959
|
-
function
|
|
6968
|
+
function $6(S) {
|
|
6960
6969
|
let { onWrapperFocus: C } = _;
|
|
6961
6970
|
C && call(C, S);
|
|
6962
6971
|
}
|
|
6963
|
-
function
|
|
6972
|
+
function e8(S) {
|
|
6964
6973
|
let { onWrapperBlur: C } = _;
|
|
6965
6974
|
C && call(C, S);
|
|
6966
6975
|
}
|
|
6967
|
-
function
|
|
6968
|
-
|
|
6976
|
+
function t8() {
|
|
6977
|
+
Q.value = !0;
|
|
6969
6978
|
}
|
|
6970
|
-
function
|
|
6971
|
-
|
|
6979
|
+
function n8(_) {
|
|
6980
|
+
Q.value = !1, _.target === R.value ? r8(_, 1) : r8(_, 0);
|
|
6972
6981
|
}
|
|
6973
|
-
function
|
|
6982
|
+
function r8(S, C = 0, T = "input") {
|
|
6974
6983
|
let E = S.target.value;
|
|
6975
|
-
if (
|
|
6976
|
-
let { value: _ } =
|
|
6984
|
+
if (k8(E), S instanceof InputEvent && !S.isComposing && (Q.value = !1), _.type === "textarea") {
|
|
6985
|
+
let { value: _ } = V;
|
|
6977
6986
|
_ && _.syncUnifiedContainer();
|
|
6978
6987
|
}
|
|
6979
|
-
if (
|
|
6980
|
-
|
|
6981
|
-
let D =
|
|
6982
|
-
if (D) if (!_.pair) T === "input" ?
|
|
6988
|
+
if (w6 = E, Q.value) return;
|
|
6989
|
+
B.recordCursor();
|
|
6990
|
+
let D = i8(E);
|
|
6991
|
+
if (D) if (!_.pair) T === "input" ? V6(E, { source: C }) : H6(E, { source: C });
|
|
6983
6992
|
else {
|
|
6984
|
-
let { value: _ } =
|
|
6985
|
-
_ = Array.isArray(_) ? [_[0], _[1]] : ["", ""], _[C] = E, T === "input" ?
|
|
6993
|
+
let { value: _ } = q;
|
|
6994
|
+
_ = Array.isArray(_) ? [_[0], _[1]] : ["", ""], _[C] = E, T === "input" ? V6(_, { source: C }) : H6(_, { source: C });
|
|
6986
6995
|
}
|
|
6987
|
-
|
|
6996
|
+
z6.$forceUpdate(), D || nextTick(B.restoreCursor);
|
|
6988
6997
|
}
|
|
6989
|
-
function
|
|
6998
|
+
function i8(S) {
|
|
6990
6999
|
let { countGraphemes: C, maxlength: T, minlength: E } = _;
|
|
6991
7000
|
if (C) {
|
|
6992
7001
|
let _;
|
|
@@ -6995,181 +7004,181 @@ var Input_default = defineComponent({
|
|
|
6995
7004
|
let { allowInput: D } = _;
|
|
6996
7005
|
return typeof D == "function" ? D(S) : !0;
|
|
6997
7006
|
}
|
|
6998
|
-
function
|
|
6999
|
-
|
|
7000
|
-
}
|
|
7001
|
-
function a8(_, S) {
|
|
7002
|
-
J6(_), x6.value = !0, Q.value = !0, X6(), c8(_, "focus"), S === 0 ? R.value = I.value : S === 1 ? R.value = L.value : S === 2 && (R.value = k.value);
|
|
7007
|
+
function a8(_) {
|
|
7008
|
+
J6(_), _.relatedTarget === k.value && X6(), _.relatedTarget !== null && (_.relatedTarget === L.value || _.relatedTarget === R.value || _.relatedTarget === P.value) || (C6.value = !1), l8(_, "blur"), z.value = null;
|
|
7003
7009
|
}
|
|
7004
|
-
function o8(S) {
|
|
7005
|
-
_.
|
|
7010
|
+
function o8(_, S) {
|
|
7011
|
+
Y6(_), Z.value = !0, C6.value = !0, Z6(), l8(_, "focus"), S === 0 ? z.value = L.value : S === 1 ? z.value = R.value : S === 2 && (z.value = P.value);
|
|
7006
7012
|
}
|
|
7007
7013
|
function s8(S) {
|
|
7008
|
-
_.passivelyActivated && (
|
|
7014
|
+
_.passivelyActivated && (e8(S), l8(S, "blur"));
|
|
7009
7015
|
}
|
|
7010
|
-
function c8(
|
|
7011
|
-
_.
|
|
7016
|
+
function c8(S) {
|
|
7017
|
+
_.passivelyActivated && (Z.value = !0, $6(S), l8(S, "focus"));
|
|
7012
7018
|
}
|
|
7013
7019
|
function l8(_, S) {
|
|
7014
|
-
|
|
7020
|
+
_.relatedTarget !== null && (_.relatedTarget === L.value || _.relatedTarget === R.value || _.relatedTarget === P.value || _.relatedTarget === k.value) || (S === "focus" ? (W6(_), Z.value = !0) : S === "blur" && (U6(_), Z.value = !1));
|
|
7015
7021
|
}
|
|
7016
|
-
function u8(_) {
|
|
7017
|
-
|
|
7022
|
+
function u8(_, S) {
|
|
7023
|
+
r8(_, S, "change");
|
|
7018
7024
|
}
|
|
7019
7025
|
function d8(_) {
|
|
7020
|
-
|
|
7026
|
+
Q6(_);
|
|
7021
7027
|
}
|
|
7022
|
-
function f8() {
|
|
7023
|
-
_
|
|
7028
|
+
function f8(_) {
|
|
7029
|
+
q6(_), p8();
|
|
7024
7030
|
}
|
|
7025
|
-
function p8(
|
|
7031
|
+
function p8() {
|
|
7032
|
+
_.pair ? (V6(["", ""], { source: "clear" }), H6(["", ""], { source: "clear" })) : (V6("", { source: "clear" }), H6("", { source: "clear" }));
|
|
7033
|
+
}
|
|
7034
|
+
function m8(S) {
|
|
7026
7035
|
let { onMousedown: C } = _;
|
|
7027
7036
|
C && C(S);
|
|
7028
7037
|
let { tagName: T } = S.target;
|
|
7029
7038
|
if (T !== "INPUT" && T !== "TEXTAREA") {
|
|
7030
7039
|
if (_.resizable) {
|
|
7031
|
-
let { value: _ } =
|
|
7040
|
+
let { value: _ } = k;
|
|
7032
7041
|
if (_) {
|
|
7033
7042
|
let { left: C, top: T, width: E, height: D } = _.getBoundingClientRect();
|
|
7034
7043
|
if (C + E - 14 < S.clientX && S.clientX < C + E && T + D - 14 < S.clientY && S.clientY < T + D) return;
|
|
7035
7044
|
}
|
|
7036
7045
|
}
|
|
7037
|
-
S.preventDefault(),
|
|
7046
|
+
S.preventDefault(), Z.value || C8();
|
|
7038
7047
|
}
|
|
7039
7048
|
}
|
|
7040
|
-
function m8() {
|
|
7041
|
-
var S;
|
|
7042
|
-
Z.value = !0, _.type === "textarea" && ((S = B.value) == null || S.handleMouseEnterWrapper());
|
|
7043
|
-
}
|
|
7044
7049
|
function h8() {
|
|
7045
7050
|
var S;
|
|
7046
|
-
|
|
7051
|
+
S6.value = !0, _.type === "textarea" && ((S = V.value) == null || S.handleMouseEnterWrapper());
|
|
7047
7052
|
}
|
|
7048
7053
|
function g8() {
|
|
7049
|
-
|
|
7054
|
+
var S;
|
|
7055
|
+
S6.value = !1, _.type === "textarea" && ((S = V.value) == null || S.handleMouseLeaveWrapper());
|
|
7050
7056
|
}
|
|
7051
|
-
function _8(
|
|
7052
|
-
|
|
7057
|
+
function _8() {
|
|
7058
|
+
X.value || M6.value === "click" && (P6.value = !P6.value);
|
|
7059
|
+
}
|
|
7060
|
+
function v8(_) {
|
|
7061
|
+
if (X.value) return;
|
|
7053
7062
|
_.preventDefault();
|
|
7054
7063
|
let S = (_) => {
|
|
7055
7064
|
_.preventDefault(), off$1("mouseup", document, S);
|
|
7056
7065
|
};
|
|
7057
|
-
if (on$1("mouseup", document, S),
|
|
7058
|
-
|
|
7066
|
+
if (on$1("mouseup", document, S), M6.value !== "mousedown") return;
|
|
7067
|
+
P6.value = !0;
|
|
7059
7068
|
let C = () => {
|
|
7060
|
-
|
|
7069
|
+
P6.value = !1, off$1("mouseup", document, C);
|
|
7061
7070
|
};
|
|
7062
7071
|
on$1("mouseup", document, C);
|
|
7063
7072
|
}
|
|
7064
|
-
function
|
|
7073
|
+
function y8(S) {
|
|
7065
7074
|
_.onKeyup && call(_.onKeyup, S);
|
|
7066
7075
|
}
|
|
7067
|
-
function
|
|
7076
|
+
function b8(S) {
|
|
7068
7077
|
switch (_.onKeydown && call(_.onKeydown, S), S.key) {
|
|
7069
7078
|
case "Escape":
|
|
7070
|
-
|
|
7079
|
+
S8();
|
|
7071
7080
|
break;
|
|
7072
7081
|
case "Enter":
|
|
7073
|
-
|
|
7082
|
+
x8(S);
|
|
7074
7083
|
break;
|
|
7075
7084
|
}
|
|
7076
7085
|
}
|
|
7077
|
-
function
|
|
7086
|
+
function x8(S) {
|
|
7078
7087
|
var C, T;
|
|
7079
7088
|
if (_.passivelyActivated) {
|
|
7080
|
-
let { value: E } =
|
|
7089
|
+
let { value: E } = C6;
|
|
7081
7090
|
if (E) {
|
|
7082
|
-
_.internalDeactivateOnEnter &&
|
|
7091
|
+
_.internalDeactivateOnEnter && S8();
|
|
7083
7092
|
return;
|
|
7084
7093
|
}
|
|
7085
|
-
S.preventDefault(), _.type === "textarea" ? (C =
|
|
7094
|
+
S.preventDefault(), _.type === "textarea" ? (C = P.value) == null || C.focus() : (T = L.value) == null || T.focus();
|
|
7086
7095
|
}
|
|
7087
7096
|
}
|
|
7088
|
-
function
|
|
7089
|
-
_.passivelyActivated && (
|
|
7097
|
+
function S8() {
|
|
7098
|
+
_.passivelyActivated && (C6.value = !1, nextTick(() => {
|
|
7090
7099
|
var _;
|
|
7091
|
-
(_ =
|
|
7100
|
+
(_ = k.value) == null || _.focus();
|
|
7092
7101
|
}));
|
|
7093
7102
|
}
|
|
7094
|
-
function S8() {
|
|
7095
|
-
var S, C, T;
|
|
7096
|
-
Y.value || (_.passivelyActivated ? (S = O.value) == null || S.focus() : ((C = k.value) == null || C.focus(), (T = I.value) == null || T.focus()));
|
|
7097
|
-
}
|
|
7098
7103
|
function C8() {
|
|
7099
|
-
|
|
7104
|
+
var S, C, T;
|
|
7105
|
+
X.value || (_.passivelyActivated ? (S = k.value) == null || S.focus() : ((C = P.value) == null || C.focus(), (T = L.value) == null || T.focus()));
|
|
7100
7106
|
}
|
|
7101
7107
|
function w8() {
|
|
7102
|
-
|
|
7103
|
-
(_ = k.value) == null || _.select(), (S = I.value) == null || S.select();
|
|
7108
|
+
k.value?.contains(document.activeElement) && document.activeElement.blur();
|
|
7104
7109
|
}
|
|
7105
7110
|
function T8() {
|
|
7106
|
-
|
|
7111
|
+
var _, S;
|
|
7112
|
+
(_ = P.value) == null || _.select(), (S = L.value) == null || S.select();
|
|
7107
7113
|
}
|
|
7108
7114
|
function E8() {
|
|
7109
|
-
|
|
7110
|
-
_?.contains(document.activeElement) && _ !== document.activeElement && x8();
|
|
7115
|
+
X.value || (P.value ? P.value.focus() : L.value && L.value.focus());
|
|
7111
7116
|
}
|
|
7112
|
-
function D8(
|
|
7117
|
+
function D8() {
|
|
7118
|
+
let { value: _ } = k;
|
|
7119
|
+
_?.contains(document.activeElement) && _ !== document.activeElement && S8();
|
|
7120
|
+
}
|
|
7121
|
+
function O8(S) {
|
|
7113
7122
|
if (_.type === "textarea") {
|
|
7114
|
-
let { value: _ } =
|
|
7123
|
+
let { value: _ } = P;
|
|
7115
7124
|
_?.scrollTo(S);
|
|
7116
7125
|
} else {
|
|
7117
|
-
let { value: _ } =
|
|
7126
|
+
let { value: _ } = L;
|
|
7118
7127
|
_?.scrollTo(S);
|
|
7119
7128
|
}
|
|
7120
7129
|
}
|
|
7121
|
-
function
|
|
7130
|
+
function k8(S) {
|
|
7122
7131
|
let { type: C, pair: T, autosize: E } = _;
|
|
7123
7132
|
if (!T && E) if (C === "textarea") {
|
|
7124
|
-
let { value: _ } =
|
|
7133
|
+
let { value: _ } = F;
|
|
7125
7134
|
_ && (_.textContent = `${S ?? ""}\r\n`);
|
|
7126
7135
|
} else {
|
|
7127
|
-
let { value: _ } =
|
|
7136
|
+
let { value: _ } = I;
|
|
7128
7137
|
_ && (S ? _.textContent = S : _.innerHTML = " ");
|
|
7129
7138
|
}
|
|
7130
7139
|
}
|
|
7131
|
-
function
|
|
7132
|
-
|
|
7140
|
+
function A8() {
|
|
7141
|
+
L6();
|
|
7133
7142
|
}
|
|
7134
|
-
let
|
|
7135
|
-
function
|
|
7143
|
+
let j8 = ref({ top: "0" });
|
|
7144
|
+
function M8(_) {
|
|
7136
7145
|
var S;
|
|
7137
7146
|
let { scrollTop: C } = _.target;
|
|
7138
|
-
|
|
7147
|
+
j8.value.top = `${-C}px`, (S = V.value) == null || S.syncUnifiedContainer();
|
|
7139
7148
|
}
|
|
7140
|
-
let
|
|
7149
|
+
let N8 = null;
|
|
7141
7150
|
watchEffect(() => {
|
|
7142
7151
|
let { autosize: S, type: C } = _;
|
|
7143
|
-
S && C === "textarea" ?
|
|
7144
|
-
!Array.isArray(_) && _ !==
|
|
7145
|
-
}) :
|
|
7152
|
+
S && C === "textarea" ? N8 = watch(q, (_) => {
|
|
7153
|
+
!Array.isArray(_) && _ !== w6 && k8(_);
|
|
7154
|
+
}) : N8?.();
|
|
7146
7155
|
});
|
|
7147
|
-
let
|
|
7156
|
+
let P8 = null;
|
|
7148
7157
|
watchEffect(() => {
|
|
7149
|
-
_.type === "textarea" ?
|
|
7158
|
+
_.type === "textarea" ? P8 = watch(q, (_) => {
|
|
7150
7159
|
var S;
|
|
7151
|
-
!Array.isArray(_) && _ !==
|
|
7152
|
-
}) :
|
|
7160
|
+
!Array.isArray(_) && _ !== w6 && ((S = V.value) == null || S.syncUnifiedContainer());
|
|
7161
|
+
}) : P8?.();
|
|
7153
7162
|
}), provide(inputInjectionKey$1, {
|
|
7154
|
-
mergedValueRef:
|
|
7155
|
-
maxlengthRef:
|
|
7163
|
+
mergedValueRef: q,
|
|
7164
|
+
maxlengthRef: R6,
|
|
7156
7165
|
mergedClsPrefixRef: S,
|
|
7157
7166
|
countGraphemesRef: toRef(_, "countGraphemes")
|
|
7158
7167
|
});
|
|
7159
|
-
let
|
|
7160
|
-
wrapperElRef:
|
|
7161
|
-
inputElRef:
|
|
7162
|
-
textareaElRef:
|
|
7163
|
-
isCompositing:
|
|
7164
|
-
clear:
|
|
7165
|
-
focus:
|
|
7166
|
-
blur:
|
|
7167
|
-
select:
|
|
7168
|
-
deactivate:
|
|
7169
|
-
activate:
|
|
7170
|
-
scrollTo:
|
|
7171
|
-
},
|
|
7172
|
-
let { value: _ } =
|
|
7168
|
+
let F8 = {
|
|
7169
|
+
wrapperElRef: k,
|
|
7170
|
+
inputElRef: L,
|
|
7171
|
+
textareaElRef: P,
|
|
7172
|
+
isCompositing: Q,
|
|
7173
|
+
clear: p8,
|
|
7174
|
+
focus: C8,
|
|
7175
|
+
blur: w8,
|
|
7176
|
+
select: T8,
|
|
7177
|
+
deactivate: D8,
|
|
7178
|
+
activate: E8,
|
|
7179
|
+
scrollTo: O8
|
|
7180
|
+
}, I8 = useRtl$1("Input", E, S), L8 = computed(() => {
|
|
7181
|
+
let { value: _ } = Y, { common: { cubicBezierEaseInOut: S }, self: { color: C, borderRadius: T, textColor: E, caretColor: D, caretColorError: k, caretColorWarning: A, textDecorationColor: P, border: F, borderDisabled: I, borderHover: L, borderFocus: R, placeholderColor: z, placeholderColorDisabled: B, lineHeightTextarea: V, colorDisabled: U, colorFocus: W, textColorDisabled: G, boxShadowFocus: K, iconSize: q, colorFocusWarning: J, boxShadowFocusWarning: X, borderWarning: b6, borderFocusWarning: x6, borderHoverWarning: Z, colorFocusError: S6, boxShadowFocusError: Q, borderError: C6, borderFocusError: w6, borderHoverError: T6, clearSize: E6, clearColor: D6, clearColorHover: O6, clearColorPressed: k6, iconColor: A6, iconColorDisabled: j6, suffixTextColor: M6, countTextColor: N6, countTextColorDisabled: P6, iconColorHover: F6, iconColorPressed: I6, loadingColor: L6, loadingColorError: R6, loadingColorWarning: z6, fontWeight: B6, [createKey$2("padding", _)]: V6, [createKey$2("fontSize", _)]: H6, [createKey$2("height", _)]: U6 } } = O.value, { left: W6, right: G6 } = getMargin$1(V6);
|
|
7173
7182
|
return {
|
|
7174
7183
|
"--n-bezier": S,
|
|
7175
7184
|
"--n-count-text-color": N6,
|
|
@@ -7182,7 +7191,7 @@ var Input_default = defineComponent({
|
|
|
7182
7191
|
"--n-padding-left": W6,
|
|
7183
7192
|
"--n-padding-right": G6,
|
|
7184
7193
|
"--n-text-color": E,
|
|
7185
|
-
"--n-caret-color":
|
|
7194
|
+
"--n-caret-color": D,
|
|
7186
7195
|
"--n-text-decoration-color": P,
|
|
7187
7196
|
"--n-border": F,
|
|
7188
7197
|
"--n-border-disabled": I,
|
|
@@ -7198,7 +7207,7 @@ var Input_default = defineComponent({
|
|
|
7198
7207
|
"--n-box-shadow-focus": K,
|
|
7199
7208
|
"--n-loading-color": L6,
|
|
7200
7209
|
"--n-caret-color-warning": A,
|
|
7201
|
-
"--n-color-focus-warning":
|
|
7210
|
+
"--n-color-focus-warning": J,
|
|
7202
7211
|
"--n-box-shadow-focus-warning": X,
|
|
7203
7212
|
"--n-border-warning": b6,
|
|
7204
7213
|
"--n-border-focus-warning": x6,
|
|
@@ -7221,62 +7230,62 @@ var Input_default = defineComponent({
|
|
|
7221
7230
|
"--n-icon-color-disabled": j6,
|
|
7222
7231
|
"--n-suffix-text-color": M6
|
|
7223
7232
|
};
|
|
7224
|
-
}),
|
|
7225
|
-
let { value: _ } =
|
|
7233
|
+
}), R8 = T ? useThemeClass$1("input", computed(() => {
|
|
7234
|
+
let { value: _ } = Y;
|
|
7226
7235
|
return _[0];
|
|
7227
|
-
}),
|
|
7228
|
-
return Object.assign(Object.assign({},
|
|
7229
|
-
wrapperElRef:
|
|
7230
|
-
inputElRef:
|
|
7231
|
-
inputMirrorElRef:
|
|
7232
|
-
inputEl2Ref:
|
|
7233
|
-
textareaElRef:
|
|
7234
|
-
textareaMirrorElRef:
|
|
7235
|
-
textareaScrollbarInstRef:
|
|
7236
|
-
rtlEnabled:
|
|
7237
|
-
uncontrolledValue:
|
|
7238
|
-
mergedValue:
|
|
7239
|
-
passwordVisible:
|
|
7240
|
-
mergedPlaceholder:
|
|
7241
|
-
showPlaceholder1:
|
|
7242
|
-
showPlaceholder2:
|
|
7243
|
-
mergedFocus:
|
|
7244
|
-
isComposing:
|
|
7245
|
-
activated:
|
|
7246
|
-
showClearButton:
|
|
7247
|
-
mergedSize:
|
|
7248
|
-
mergedDisabled:
|
|
7249
|
-
textDecorationStyle:
|
|
7236
|
+
}), L8, _) : void 0;
|
|
7237
|
+
return Object.assign(Object.assign({}, F8), {
|
|
7238
|
+
wrapperElRef: k,
|
|
7239
|
+
inputElRef: L,
|
|
7240
|
+
inputMirrorElRef: I,
|
|
7241
|
+
inputEl2Ref: R,
|
|
7242
|
+
textareaElRef: P,
|
|
7243
|
+
textareaMirrorElRef: F,
|
|
7244
|
+
textareaScrollbarInstRef: V,
|
|
7245
|
+
rtlEnabled: I8,
|
|
7246
|
+
uncontrolledValue: G,
|
|
7247
|
+
mergedValue: q,
|
|
7248
|
+
passwordVisible: P6,
|
|
7249
|
+
mergedPlaceholder: T6,
|
|
7250
|
+
showPlaceholder1: E6,
|
|
7251
|
+
showPlaceholder2: O6,
|
|
7252
|
+
mergedFocus: k6,
|
|
7253
|
+
isComposing: Q,
|
|
7254
|
+
activated: C6,
|
|
7255
|
+
showClearButton: j6,
|
|
7256
|
+
mergedSize: Y,
|
|
7257
|
+
mergedDisabled: X,
|
|
7258
|
+
textDecorationStyle: F6,
|
|
7250
7259
|
mergedClsPrefix: S,
|
|
7251
7260
|
mergedBordered: C,
|
|
7252
|
-
mergedShowPasswordOn:
|
|
7253
|
-
placeholderStyle:
|
|
7254
|
-
mergedStatus:
|
|
7255
|
-
textAreaScrollContainerWidth:
|
|
7256
|
-
handleTextAreaScroll:
|
|
7257
|
-
handleCompositionStart:
|
|
7258
|
-
handleCompositionEnd:
|
|
7259
|
-
handleInput:
|
|
7260
|
-
handleInputBlur:
|
|
7261
|
-
handleInputFocus:
|
|
7262
|
-
handleWrapperBlur:
|
|
7263
|
-
handleWrapperFocus:
|
|
7264
|
-
handleMouseEnter:
|
|
7265
|
-
handleMouseLeave:
|
|
7266
|
-
handleMouseDown:
|
|
7267
|
-
handleChange:
|
|
7268
|
-
handleClick:
|
|
7269
|
-
handleClear:
|
|
7270
|
-
handlePasswordToggleClick:
|
|
7271
|
-
handlePasswordToggleMousedown:
|
|
7272
|
-
handleWrapperKeydown:
|
|
7273
|
-
handleWrapperKeyup:
|
|
7274
|
-
handleTextAreaMirrorResize:
|
|
7275
|
-
getTextareaScrollContainer: () =>
|
|
7276
|
-
mergedTheme:
|
|
7277
|
-
cssVars: T ? void 0 :
|
|
7278
|
-
themeClass:
|
|
7279
|
-
onRender:
|
|
7261
|
+
mergedShowPasswordOn: M6,
|
|
7262
|
+
placeholderStyle: j8,
|
|
7263
|
+
mergedStatus: x6,
|
|
7264
|
+
textAreaScrollContainerWidth: I6,
|
|
7265
|
+
handleTextAreaScroll: M8,
|
|
7266
|
+
handleCompositionStart: t8,
|
|
7267
|
+
handleCompositionEnd: n8,
|
|
7268
|
+
handleInput: r8,
|
|
7269
|
+
handleInputBlur: a8,
|
|
7270
|
+
handleInputFocus: o8,
|
|
7271
|
+
handleWrapperBlur: s8,
|
|
7272
|
+
handleWrapperFocus: c8,
|
|
7273
|
+
handleMouseEnter: h8,
|
|
7274
|
+
handleMouseLeave: g8,
|
|
7275
|
+
handleMouseDown: m8,
|
|
7276
|
+
handleChange: u8,
|
|
7277
|
+
handleClick: d8,
|
|
7278
|
+
handleClear: f8,
|
|
7279
|
+
handlePasswordToggleClick: _8,
|
|
7280
|
+
handlePasswordToggleMousedown: v8,
|
|
7281
|
+
handleWrapperKeydown: b8,
|
|
7282
|
+
handleWrapperKeyup: y8,
|
|
7283
|
+
handleTextAreaMirrorResize: A8,
|
|
7284
|
+
getTextareaScrollContainer: () => P.value,
|
|
7285
|
+
mergedTheme: O,
|
|
7286
|
+
cssVars: T ? void 0 : L8,
|
|
7287
|
+
themeClass: R8?.themeClass,
|
|
7288
|
+
onRender: R8?.onRender
|
|
7280
7289
|
});
|
|
7281
7290
|
},
|
|
7282
7291
|
render() {
|
|
@@ -7285,6 +7294,7 @@ var Input_default = defineComponent({
|
|
|
7285
7294
|
ref: "wrapperElRef",
|
|
7286
7295
|
class: [
|
|
7287
7296
|
`${_}-input`,
|
|
7297
|
+
`${_}-input--${this.mergedSize}-size`,
|
|
7288
7298
|
T,
|
|
7289
7299
|
C && `${_}-input--${C}-status`,
|
|
7290
7300
|
{
|
|
@@ -8120,10 +8130,7 @@ var DropdownOption_default$1 = defineComponent({
|
|
|
8120
8130
|
type: Boolean,
|
|
8121
8131
|
default: !0
|
|
8122
8132
|
},
|
|
8123
|
-
size:
|
|
8124
|
-
type: String,
|
|
8125
|
-
default: "medium"
|
|
8126
|
-
},
|
|
8133
|
+
size: String,
|
|
8127
8134
|
inverted: Boolean,
|
|
8128
8135
|
placement: {
|
|
8129
8136
|
type: String,
|
|
@@ -8180,27 +8187,27 @@ var Dropdown_default$1 = defineComponent({
|
|
|
8180
8187
|
useKeyboard$2({ keydown: {
|
|
8181
8188
|
ArrowUp: {
|
|
8182
8189
|
prevent: !0,
|
|
8183
|
-
handler:
|
|
8190
|
+
handler: X
|
|
8184
8191
|
},
|
|
8185
8192
|
ArrowRight: {
|
|
8186
8193
|
prevent: !0,
|
|
8187
|
-
handler:
|
|
8194
|
+
handler: Y
|
|
8188
8195
|
},
|
|
8189
8196
|
ArrowDown: {
|
|
8190
8197
|
prevent: !0,
|
|
8191
|
-
handler:
|
|
8198
|
+
handler: b6
|
|
8192
8199
|
},
|
|
8193
8200
|
ArrowLeft: {
|
|
8194
8201
|
prevent: !0,
|
|
8195
|
-
handler:
|
|
8202
|
+
handler: J
|
|
8196
8203
|
},
|
|
8197
8204
|
Enter: {
|
|
8198
8205
|
prevent: !0,
|
|
8199
|
-
handler:
|
|
8206
|
+
handler: x6
|
|
8200
8207
|
},
|
|
8201
|
-
Escape:
|
|
8208
|
+
Escape: q
|
|
8202
8209
|
} }, L);
|
|
8203
|
-
let { mergedClsPrefixRef: R, inlineThemeDisabled: z } = useConfig$1(_), B = use_theme_default$3("Dropdown", "-dropdown", index_cssr_default$85, light_default$50, _, R);
|
|
8210
|
+
let { mergedClsPrefixRef: R, inlineThemeDisabled: z, mergedComponentPropsRef: B } = useConfig$1(_), V = computed(() => _.size || B?.value?.Dropdown?.size || "medium"), U = use_theme_default$3("Dropdown", "-dropdown", index_cssr_default$85, light_default$50, _, R);
|
|
8204
8211
|
provide(dropdownInjectionKey$1, {
|
|
8205
8212
|
labelFieldRef: toRef(_, "labelField"),
|
|
8206
8213
|
childrenFieldRef: toRef(_, "childrenField"),
|
|
@@ -8216,52 +8223,52 @@ var Dropdown_default$1 = defineComponent({
|
|
|
8216
8223
|
nodePropsRef: toRef(_, "nodeProps"),
|
|
8217
8224
|
renderOptionRef: toRef(_, "renderOption"),
|
|
8218
8225
|
menuPropsRef: toRef(_, "menuProps"),
|
|
8219
|
-
doSelect:
|
|
8220
|
-
doUpdateShow:
|
|
8226
|
+
doSelect: W,
|
|
8227
|
+
doUpdateShow: G
|
|
8221
8228
|
}), watch(C, (S) => {
|
|
8222
|
-
!_.animated && !S &&
|
|
8229
|
+
!_.animated && !S && K();
|
|
8223
8230
|
});
|
|
8224
|
-
function
|
|
8231
|
+
function W(S, C) {
|
|
8225
8232
|
let { onSelect: T } = _;
|
|
8226
8233
|
T && call(T, S, C);
|
|
8227
8234
|
}
|
|
8228
|
-
function
|
|
8235
|
+
function G(C) {
|
|
8229
8236
|
let { "onUpdate:show": T, onUpdateShow: E } = _;
|
|
8230
8237
|
T && call(T, C), E && call(E, C), S.value = C;
|
|
8231
8238
|
}
|
|
8232
|
-
function W() {
|
|
8233
|
-
D.value = null, O.value = null, k.value = null;
|
|
8234
|
-
}
|
|
8235
|
-
function G() {
|
|
8236
|
-
U(!1);
|
|
8237
|
-
}
|
|
8238
8239
|
function K() {
|
|
8239
|
-
|
|
8240
|
+
D.value = null, O.value = null, k.value = null;
|
|
8240
8241
|
}
|
|
8241
8242
|
function q() {
|
|
8242
|
-
|
|
8243
|
+
G(!1);
|
|
8243
8244
|
}
|
|
8244
8245
|
function J() {
|
|
8245
|
-
|
|
8246
|
+
S6("left");
|
|
8246
8247
|
}
|
|
8247
8248
|
function Y() {
|
|
8248
|
-
|
|
8249
|
+
S6("right");
|
|
8249
8250
|
}
|
|
8250
8251
|
function X() {
|
|
8251
|
-
|
|
8252
|
-
_?.isLeaf && C.value && (V(_.key, _.rawNode), U(!1));
|
|
8252
|
+
S6("up");
|
|
8253
8253
|
}
|
|
8254
8254
|
function b6() {
|
|
8255
|
+
S6("down");
|
|
8256
|
+
}
|
|
8257
|
+
function x6() {
|
|
8258
|
+
let _ = Z();
|
|
8259
|
+
_?.isLeaf && C.value && (W(_.key, _.rawNode), G(!1));
|
|
8260
|
+
}
|
|
8261
|
+
function Z() {
|
|
8255
8262
|
let { value: _ } = T, { value: S } = P;
|
|
8256
8263
|
return !_ || S === null ? null : _.getNode(S) ?? null;
|
|
8257
8264
|
}
|
|
8258
|
-
function
|
|
8265
|
+
function S6(_) {
|
|
8259
8266
|
let { value: S } = P, { value: { getFirstAvailableNode: C } } = T, E = null;
|
|
8260
8267
|
if (S === null) {
|
|
8261
8268
|
let _ = C();
|
|
8262
8269
|
_ !== null && (E = _.key);
|
|
8263
8270
|
} else {
|
|
8264
|
-
let S =
|
|
8271
|
+
let S = Z();
|
|
8265
8272
|
if (S) {
|
|
8266
8273
|
let C;
|
|
8267
8274
|
switch (_) {
|
|
@@ -8283,8 +8290,8 @@ var Dropdown_default$1 = defineComponent({
|
|
|
8283
8290
|
}
|
|
8284
8291
|
E !== null && (D.value = null, O.value = E);
|
|
8285
8292
|
}
|
|
8286
|
-
let
|
|
8287
|
-
let {
|
|
8293
|
+
let Q = computed(() => {
|
|
8294
|
+
let { inverted: S } = _, C = V.value, { common: { cubicBezierEaseInOut: T }, self: E } = U.value, { padding: D, dividerColor: O, borderRadius: k, optionOpacityDisabled: A, [createKey$2("optionIconSuffixWidth", C)]: P, [createKey$2("optionSuffixWidth", C)]: F, [createKey$2("optionIconPrefixWidth", C)]: I, [createKey$2("optionPrefixWidth", C)]: L, [createKey$2("fontSize", C)]: R, [createKey$2("optionHeight", C)]: z, [createKey$2("optionIconSize", C)]: B } = E, W = {
|
|
8288
8295
|
"--n-bezier": T,
|
|
8289
8296
|
"--n-font-size": R,
|
|
8290
8297
|
"--n-padding": D,
|
|
@@ -8294,24 +8301,25 @@ var Dropdown_default$1 = defineComponent({
|
|
|
8294
8301
|
"--n-option-icon-prefix-width": I,
|
|
8295
8302
|
"--n-option-suffix-width": F,
|
|
8296
8303
|
"--n-option-icon-suffix-width": P,
|
|
8297
|
-
"--n-option-icon-size":
|
|
8304
|
+
"--n-option-icon-size": B,
|
|
8298
8305
|
"--n-divider-color": O,
|
|
8299
8306
|
"--n-option-opacity-disabled": A
|
|
8300
8307
|
};
|
|
8301
|
-
return
|
|
8302
|
-
}),
|
|
8308
|
+
return S ? (W["--n-color"] = E.colorInverted, W["--n-option-color-hover"] = E.optionColorHoverInverted, W["--n-option-color-active"] = E.optionColorActiveInverted, W["--n-option-text-color"] = E.optionTextColorInverted, W["--n-option-text-color-hover"] = E.optionTextColorHoverInverted, W["--n-option-text-color-active"] = E.optionTextColorActiveInverted, W["--n-option-text-color-child-active"] = E.optionTextColorChildActiveInverted, W["--n-prefix-color"] = E.prefixColorInverted, W["--n-suffix-color"] = E.suffixColorInverted, W["--n-group-header-text-color"] = E.groupHeaderTextColorInverted) : (W["--n-color"] = E.color, W["--n-option-color-hover"] = E.optionColorHover, W["--n-option-color-active"] = E.optionColorActive, W["--n-option-text-color"] = E.optionTextColor, W["--n-option-text-color-hover"] = E.optionTextColorHover, W["--n-option-text-color-active"] = E.optionTextColorActive, W["--n-option-text-color-child-active"] = E.optionTextColorChildActive, W["--n-prefix-color"] = E.prefixColor, W["--n-suffix-color"] = E.suffixColor, W["--n-group-header-text-color"] = E.groupHeaderTextColor), W;
|
|
8309
|
+
}), C6 = z ? useThemeClass$1("dropdown", computed(() => `${V.value[0]}${_.inverted ? "i" : ""}`), Q, _) : void 0;
|
|
8303
8310
|
return {
|
|
8304
8311
|
mergedClsPrefix: R,
|
|
8305
|
-
mergedTheme:
|
|
8312
|
+
mergedTheme: U,
|
|
8313
|
+
mergedSize: V,
|
|
8306
8314
|
tmNodes: E,
|
|
8307
8315
|
mergedShow: C,
|
|
8308
8316
|
handleAfterLeave: () => {
|
|
8309
|
-
_.animated &&
|
|
8317
|
+
_.animated && K();
|
|
8310
8318
|
},
|
|
8311
|
-
doUpdateShow:
|
|
8312
|
-
cssVars: z ? void 0 :
|
|
8313
|
-
themeClass:
|
|
8314
|
-
onRender:
|
|
8319
|
+
doUpdateShow: G,
|
|
8320
|
+
cssVars: z ? void 0 : Q,
|
|
8321
|
+
themeClass: C6?.themeClass,
|
|
8322
|
+
onRender: C6?.onRender
|
|
8315
8323
|
};
|
|
8316
8324
|
},
|
|
8317
8325
|
render() {
|
|
@@ -8324,6 +8332,7 @@ var Dropdown_default$1 = defineComponent({
|
|
|
8324
8332
|
class: [
|
|
8325
8333
|
_,
|
|
8326
8334
|
`${O}-dropdown`,
|
|
8335
|
+
`${O}-dropdown--${this.mergedSize}-size`,
|
|
8327
8336
|
this.themeClass
|
|
8328
8337
|
],
|
|
8329
8338
|
clsPrefix: O,
|
|
@@ -8666,7 +8675,14 @@ var Form_default = defineComponent({
|
|
|
8666
8675
|
let S = T.value;
|
|
8667
8676
|
(S === void 0 || _ >= S) && (T.value = _);
|
|
8668
8677
|
};
|
|
8669
|
-
function D(
|
|
8678
|
+
function D() {
|
|
8679
|
+
var _;
|
|
8680
|
+
for (let S of keysOf$1(C)) {
|
|
8681
|
+
let T = C[S];
|
|
8682
|
+
for (let S of T) (_ = S.invalidateLabelWidth) == null || _.call(S);
|
|
8683
|
+
}
|
|
8684
|
+
}
|
|
8685
|
+
function O(_) {
|
|
8670
8686
|
return __awaiter$6(this, arguments, void 0, function* (_, S = () => !0) {
|
|
8671
8687
|
return yield new Promise((T, E) => {
|
|
8672
8688
|
let D = [];
|
|
@@ -8683,7 +8699,7 @@ var Form_default = defineComponent({
|
|
|
8683
8699
|
});
|
|
8684
8700
|
});
|
|
8685
8701
|
}
|
|
8686
|
-
function
|
|
8702
|
+
function k() {
|
|
8687
8703
|
for (let _ of keysOf$1(C)) {
|
|
8688
8704
|
let S = C[_];
|
|
8689
8705
|
for (let _ of S) _.restoreValidation();
|
|
@@ -8694,11 +8710,12 @@ var Form_default = defineComponent({
|
|
|
8694
8710
|
maxChildLabelWidthRef: T,
|
|
8695
8711
|
deriveMaxChildLabelWidth: E
|
|
8696
8712
|
}), provide(formItemInstsInjectionKey, { formItems: C });
|
|
8697
|
-
let
|
|
8698
|
-
validate:
|
|
8699
|
-
restoreValidation:
|
|
8713
|
+
let A = {
|
|
8714
|
+
validate: O,
|
|
8715
|
+
restoreValidation: k,
|
|
8716
|
+
invalidateLabelWidth: D
|
|
8700
8717
|
};
|
|
8701
|
-
return Object.assign(
|
|
8718
|
+
return Object.assign(A, { mergedClsPrefix: S });
|
|
8702
8719
|
},
|
|
8703
8720
|
render() {
|
|
8704
8721
|
let { mergedClsPrefix: _ } = this;
|
|
@@ -9325,8 +9342,8 @@ var form_item_cssr_default = cB$3("form-item", "\n display: grid;\n line-height:
|
|
|
9325
9342
|
])])
|
|
9326
9343
|
]);
|
|
9327
9344
|
function formItemSize(_) {
|
|
9328
|
-
let S = inject(formInjectionKey, null);
|
|
9329
|
-
return { mergedSize: computed(() => _.size === void 0 ? S?.props.size === void 0 ? "medium" : S.props.size : _.size) };
|
|
9345
|
+
let S = inject(formInjectionKey, null), { mergedComponentPropsRef: C } = useConfig$1(_);
|
|
9346
|
+
return { mergedSize: computed(() => _.size === void 0 ? S?.props.size === void 0 ? C?.value?.Form?.size || "medium" : S.props.size : _.size) };
|
|
9330
9347
|
}
|
|
9331
9348
|
function formItemMisc(_) {
|
|
9332
9349
|
let S = inject(formInjectionKey, null), C = computed(() => {
|
|
@@ -9478,16 +9495,25 @@ function wrapValidator(_, S) {
|
|
|
9478
9495
|
var FormItem_default = defineComponent({
|
|
9479
9496
|
name: "FormItem",
|
|
9480
9497
|
props: formItemProps,
|
|
9498
|
+
slots: Object,
|
|
9481
9499
|
setup(_) {
|
|
9482
9500
|
useInjectionInstanceCollection(formItemInstsInjectionKey, "formItems", toRef(_, "path"));
|
|
9483
|
-
let { mergedClsPrefixRef: S, inlineThemeDisabled: C } = useConfig$1(_), T = inject(formInjectionKey, null), E = formItemSize(_), D = formItemMisc(_), { validationErrored: O, validationWarned: k } = D, { mergedRequired: P, mergedRules: F } = formItemRule(_), { mergedSize: I } = E, { mergedLabelPlacement: L, mergedLabelAlign: R, mergedRequireMarkPlacement: z } = D, B = ref([]), V = ref(createId$1()), U = T ? toRef(T.props, "disabled") : ref(!1),
|
|
9501
|
+
let { mergedClsPrefixRef: S, inlineThemeDisabled: C } = useConfig$1(_), T = inject(formInjectionKey, null), E = formItemSize(_), D = formItemMisc(_), { validationErrored: O, validationWarned: k } = D, { mergedRequired: P, mergedRules: F } = formItemRule(_), { mergedSize: I } = E, { mergedLabelPlacement: L, mergedLabelAlign: R, mergedRequireMarkPlacement: z } = D, B = ref([]), V = ref(createId$1()), U = ref(null), W = T ? toRef(T.props, "disabled") : ref(!1), G = use_theme_default$3("Form", "-form-item", form_item_cssr_default, light_default$48, _, S);
|
|
9484
9502
|
watch(toRef(_, "path"), () => {
|
|
9485
|
-
_.ignorePathChange ||
|
|
9503
|
+
_.ignorePathChange || J();
|
|
9486
9504
|
});
|
|
9487
|
-
function
|
|
9505
|
+
function q() {
|
|
9506
|
+
if (!D.isAutoLabelWidth.value) return;
|
|
9507
|
+
let _ = U.value;
|
|
9508
|
+
if (_ !== null) {
|
|
9509
|
+
let S = _.style.whiteSpace;
|
|
9510
|
+
_.style.whiteSpace = "nowrap", _.style.width = "", T?.deriveMaxChildLabelWidth(Number(getComputedStyle(_).width.slice(0, -2))), _.style.whiteSpace = S;
|
|
9511
|
+
}
|
|
9512
|
+
}
|
|
9513
|
+
function J() {
|
|
9488
9514
|
B.value = [], O.value = !1, k.value = !1, _.feedback && (V.value = createId$1());
|
|
9489
9515
|
}
|
|
9490
|
-
let
|
|
9516
|
+
let Y = (...S) => __awaiter$5(this, [...S], void 0, function* (S = null, C = () => !0, E = { suppressWarning: !0 }) {
|
|
9491
9517
|
let { path: D } = _;
|
|
9492
9518
|
E ? E.first ||= _.first : E = {};
|
|
9493
9519
|
let { value: A } = F, P = T ? get_default$1(T.props.model, D || "") : void 0, I = {}, L = {}, R = (S ? A.filter((_) => Array.isArray(_.trigger) ? _.trigger.includes(S) : _.trigger === S) : A).filter(C).map((_, S) => {
|
|
@@ -9503,8 +9529,8 @@ var FormItem_default = defineComponent({
|
|
|
9503
9529
|
warnings: void 0
|
|
9504
9530
|
};
|
|
9505
9531
|
if (!R.length) return U;
|
|
9506
|
-
let W = D ?? "__n_no_path__",
|
|
9507
|
-
|
|
9532
|
+
let W = D ?? "__n_no_path__", G = new Schema({ [W]: z }), K = new Schema({ [W]: V }), { validateMessages: q } = T?.props || {};
|
|
9533
|
+
q && (G.messages(q), K.messages(q));
|
|
9508
9534
|
let Y = (_) => {
|
|
9509
9535
|
B.value = _.map((_) => {
|
|
9510
9536
|
let S = _?.message || "";
|
|
@@ -9518,35 +9544,35 @@ var FormItem_default = defineComponent({
|
|
|
9518
9544
|
};
|
|
9519
9545
|
if (z.length) {
|
|
9520
9546
|
let _ = yield new Promise((_) => {
|
|
9521
|
-
|
|
9547
|
+
G.validate({ [W]: P }, E, _);
|
|
9522
9548
|
});
|
|
9523
9549
|
_?.length && (U.valid = !1, U.errors = _, Y(_));
|
|
9524
9550
|
}
|
|
9525
9551
|
if (V.length && !U.errors) {
|
|
9526
9552
|
let _ = yield new Promise((_) => {
|
|
9527
|
-
|
|
9553
|
+
K.validate({ [W]: P }, E, _);
|
|
9528
9554
|
});
|
|
9529
9555
|
_?.length && (Y(_), U.warnings = _);
|
|
9530
9556
|
}
|
|
9531
|
-
return !U.errors && !U.warnings ?
|
|
9557
|
+
return !U.errors && !U.warnings ? J() : (O.value = !!U.errors, k.value = !!U.warnings), U;
|
|
9532
9558
|
});
|
|
9533
|
-
function J() {
|
|
9534
|
-
q("blur");
|
|
9535
|
-
}
|
|
9536
|
-
function Y() {
|
|
9537
|
-
q("change");
|
|
9538
|
-
}
|
|
9539
9559
|
function X() {
|
|
9540
|
-
|
|
9560
|
+
Y("blur");
|
|
9541
9561
|
}
|
|
9542
9562
|
function b6() {
|
|
9543
|
-
|
|
9563
|
+
Y("change");
|
|
9544
9564
|
}
|
|
9545
|
-
function x6(
|
|
9565
|
+
function x6() {
|
|
9566
|
+
Y("focus");
|
|
9567
|
+
}
|
|
9568
|
+
function Z() {
|
|
9569
|
+
Y("input");
|
|
9570
|
+
}
|
|
9571
|
+
function S6(_, S) {
|
|
9546
9572
|
return __awaiter$5(this, void 0, void 0, function* () {
|
|
9547
9573
|
let C, T, E, D;
|
|
9548
9574
|
return typeof _ == "string" ? (C = _, T = S) : typeof _ == "object" && _ && (C = _.trigger, T = _.callback, E = _.shouldRuleBeApplied, D = _.options), yield new Promise((_, S) => {
|
|
9549
|
-
|
|
9575
|
+
Y(C, E, D).then(({ valid: C, errors: E, warnings: D }) => {
|
|
9550
9576
|
C ? (T && T(void 0, { warnings: D }), _({ warnings: D })) : (T && T(E, { warnings: D }), S(E));
|
|
9551
9577
|
});
|
|
9552
9578
|
});
|
|
@@ -9554,30 +9580,24 @@ var FormItem_default = defineComponent({
|
|
|
9554
9580
|
}
|
|
9555
9581
|
provide(formItemInjectionKey$1, {
|
|
9556
9582
|
path: toRef(_, "path"),
|
|
9557
|
-
disabled:
|
|
9583
|
+
disabled: W,
|
|
9558
9584
|
mergedSize: E.mergedSize,
|
|
9559
9585
|
mergedValidationStatus: D.mergedValidationStatus,
|
|
9560
|
-
restoreValidation:
|
|
9561
|
-
handleContentBlur:
|
|
9562
|
-
handleContentChange:
|
|
9563
|
-
handleContentFocus:
|
|
9564
|
-
handleContentInput:
|
|
9565
|
-
});
|
|
9566
|
-
let Z = {
|
|
9567
|
-
validate: x6,
|
|
9568
|
-
restoreValidation: G,
|
|
9569
|
-
internalValidate: q
|
|
9570
|
-
}, S6 = ref(null);
|
|
9571
|
-
onMounted(() => {
|
|
9572
|
-
if (!D.isAutoLabelWidth.value) return;
|
|
9573
|
-
let _ = S6.value;
|
|
9574
|
-
if (_ !== null) {
|
|
9575
|
-
let S = _.style.whiteSpace;
|
|
9576
|
-
_.style.whiteSpace = "nowrap", _.style.width = "", T?.deriveMaxChildLabelWidth(Number(getComputedStyle(_).width.slice(0, -2))), _.style.whiteSpace = S;
|
|
9577
|
-
}
|
|
9586
|
+
restoreValidation: J,
|
|
9587
|
+
handleContentBlur: X,
|
|
9588
|
+
handleContentChange: b6,
|
|
9589
|
+
handleContentFocus: x6,
|
|
9590
|
+
handleContentInput: Z
|
|
9578
9591
|
});
|
|
9579
|
-
let Q =
|
|
9580
|
-
|
|
9592
|
+
let Q = {
|
|
9593
|
+
validate: S6,
|
|
9594
|
+
restoreValidation: J,
|
|
9595
|
+
internalValidate: Y,
|
|
9596
|
+
invalidateLabelWidth: q
|
|
9597
|
+
};
|
|
9598
|
+
onMounted(q);
|
|
9599
|
+
let C6 = computed(() => {
|
|
9600
|
+
let { value: _ } = I, { value: S } = L, C = S === "top" ? "vertical" : "horizontal", { common: { cubicBezierEaseInOut: T }, self: { labelTextColor: E, asteriskColor: D, lineHeight: O, feedbackTextColor: k, feedbackTextColorWarning: A, feedbackTextColorError: P, feedbackPadding: F, labelFontWeight: z, [createKey$2("labelHeight", _)]: B, [createKey$2("blankHeight", _)]: V, [createKey$2("feedbackFontSize", _)]: U, [createKey$2("feedbackHeight", _)]: W, [createKey$2("labelPadding", C)]: K, [createKey$2("labelTextAlign", C)]: q, [createKey$2(createKey$2("labelFontSize", S), _)]: J } } = G.value, Y = R.value ?? q;
|
|
9581
9601
|
return S === "top" && (Y = Y === "right" ? "flex-end" : "flex-start"), {
|
|
9582
9602
|
"--n-bezier": T,
|
|
9583
9603
|
"--n-line-height": O,
|
|
@@ -9591,23 +9611,23 @@ var FormItem_default = defineComponent({
|
|
|
9591
9611
|
"--n-label-text-color": E,
|
|
9592
9612
|
"--n-feedback-padding": F,
|
|
9593
9613
|
"--n-feedback-font-size": U,
|
|
9594
|
-
"--n-feedback-height":
|
|
9614
|
+
"--n-feedback-height": W,
|
|
9595
9615
|
"--n-feedback-text-color": k,
|
|
9596
9616
|
"--n-feedback-text-color-warning": A,
|
|
9597
9617
|
"--n-feedback-text-color-error": P
|
|
9598
9618
|
};
|
|
9599
|
-
}),
|
|
9619
|
+
}), w6 = C ? useThemeClass$1("form-item", computed(() => `${I.value[0]}${L.value[0]}${R.value?.[0] || ""}`), C6, _) : void 0, T6 = computed(() => L.value === "left" && z.value === "left" && R.value === "left");
|
|
9600
9620
|
return Object.assign(Object.assign(Object.assign(Object.assign({
|
|
9601
|
-
labelElementRef:
|
|
9621
|
+
labelElementRef: U,
|
|
9602
9622
|
mergedClsPrefix: S,
|
|
9603
9623
|
mergedRequired: P,
|
|
9604
9624
|
feedbackId: V,
|
|
9605
9625
|
renderExplains: B,
|
|
9606
|
-
reverseColSpace:
|
|
9607
|
-
}, D), E),
|
|
9608
|
-
cssVars: C ? void 0 :
|
|
9609
|
-
themeClass:
|
|
9610
|
-
onRender:
|
|
9626
|
+
reverseColSpace: T6
|
|
9627
|
+
}, D), E), Q), {
|
|
9628
|
+
cssVars: C ? void 0 : C6,
|
|
9629
|
+
themeClass: w6?.themeClass,
|
|
9630
|
+
onRender: w6?.onRender
|
|
9611
9631
|
});
|
|
9612
9632
|
},
|
|
9613
9633
|
render() {
|
|
@@ -9736,6 +9756,7 @@ var FormItemGridItem_default = defineComponent({
|
|
|
9736
9756
|
name: "FormItemGridItem",
|
|
9737
9757
|
alias: ["FormItemGi"],
|
|
9738
9758
|
props: formItemGiProps,
|
|
9759
|
+
slots: Object,
|
|
9739
9760
|
setup() {
|
|
9740
9761
|
let _ = ref(null);
|
|
9741
9762
|
return {
|
|
@@ -10948,10 +10969,7 @@ const tabsProps$1 = Object.assign(Object.assign({}, use_theme_default$3.props),
|
|
|
10948
10969
|
},
|
|
10949
10970
|
closable: Boolean,
|
|
10950
10971
|
justifyContent: String,
|
|
10951
|
-
size:
|
|
10952
|
-
type: String,
|
|
10953
|
-
default: "medium"
|
|
10954
|
-
},
|
|
10972
|
+
size: String,
|
|
10955
10973
|
placement: {
|
|
10956
10974
|
type: String,
|
|
10957
10975
|
default: "top"
|
|
@@ -10988,28 +11006,28 @@ var Tabs_default = defineComponent({
|
|
|
10988
11006
|
process.env.NODE_ENV !== "production" && watchEffect(() => {
|
|
10989
11007
|
_.labelSize !== void 0 && warnOnce$1("tabs", "`label-size` is deprecated, please use `size` instead."), _.activeName !== void 0 && warnOnce$1("tabs", "`active-name` is deprecated, please use `value` instead."), _.onActiveNameChange !== void 0 && warnOnce$1("tabs", "`on-active-name-change` is deprecated, please use `on-update:value` instead.");
|
|
10990
11008
|
});
|
|
10991
|
-
let { mergedClsPrefixRef: C, inlineThemeDisabled: T } = useConfig$1(_),
|
|
11009
|
+
let { mergedClsPrefixRef: C, inlineThemeDisabled: T, mergedComponentPropsRef: E } = useConfig$1(_), D = use_theme_default$3("Tabs", "-tabs", index_cssr_default$83, light_default$44, _, C), O = ref(null), k = ref(null), P = ref(null), F = ref(null), I = ref(null), L = ref(null), R = ref(!0), z = ref(!0), B = useCompitable$1(_, ["labelSize", "size"]), V = computed(() => B.value ? B.value : E?.value?.Tabs?.size || "medium"), U = useCompitable$1(_, ["activeName", "value"]), W = ref(U.value ?? _.defaultValue ?? (S.default ? flatten$4(S.default())[0]?.props?.name : null)), G = useMergedState$1(U, W), K = { id: 0 }, q = computed(() => {
|
|
10992
11010
|
if (!(!_.justifyContent || _.type === "card")) return {
|
|
10993
11011
|
display: "flex",
|
|
10994
11012
|
justifyContent: _.justifyContent
|
|
10995
11013
|
};
|
|
10996
11014
|
});
|
|
10997
|
-
watch(
|
|
10998
|
-
|
|
11015
|
+
watch(G, () => {
|
|
11016
|
+
K.id = 0, Z(), S6();
|
|
10999
11017
|
});
|
|
11000
|
-
function
|
|
11001
|
-
let { value: _ } =
|
|
11002
|
-
return _ === null ? null :
|
|
11018
|
+
function J() {
|
|
11019
|
+
let { value: _ } = G;
|
|
11020
|
+
return _ === null ? null : O.value?.querySelector(`[data-name="${_}"]`);
|
|
11003
11021
|
}
|
|
11004
|
-
function
|
|
11022
|
+
function Y(S) {
|
|
11005
11023
|
if (_.type === "card") return;
|
|
11006
|
-
let { value: T } =
|
|
11024
|
+
let { value: T } = k;
|
|
11007
11025
|
if (!T) return;
|
|
11008
11026
|
let E = T.style.opacity === "0";
|
|
11009
11027
|
if (S) {
|
|
11010
11028
|
let D = `${C.value}-tabs-bar--disabled`, { barWidth: O, placement: k } = _;
|
|
11011
11029
|
if (S.dataset.disabled === "true" ? T.classList.add(D) : T.classList.remove(D), ["top", "bottom"].includes(k)) {
|
|
11012
|
-
if (
|
|
11030
|
+
if (x6([
|
|
11013
11031
|
"top",
|
|
11014
11032
|
"maxHeight",
|
|
11015
11033
|
"height"
|
|
@@ -11019,7 +11037,7 @@ var Tabs_default = defineComponent({
|
|
|
11019
11037
|
} else T.style.left = `${S.offsetLeft}px`, T.style.maxWidth = `${S.offsetWidth}px`;
|
|
11020
11038
|
T.style.width = "8192px", E && (T.style.transition = "none"), T.offsetWidth, E && (T.style.transition = "", T.style.opacity = "1");
|
|
11021
11039
|
} else {
|
|
11022
|
-
if (
|
|
11040
|
+
if (x6([
|
|
11023
11041
|
"left",
|
|
11024
11042
|
"maxWidth",
|
|
11025
11043
|
"width"
|
|
@@ -11031,24 +11049,24 @@ var Tabs_default = defineComponent({
|
|
|
11031
11049
|
}
|
|
11032
11050
|
}
|
|
11033
11051
|
}
|
|
11034
|
-
function
|
|
11052
|
+
function X() {
|
|
11035
11053
|
if (_.type === "card") return;
|
|
11036
|
-
let { value: S } =
|
|
11054
|
+
let { value: S } = k;
|
|
11037
11055
|
S && (S.style.opacity = "0");
|
|
11038
11056
|
}
|
|
11039
|
-
function
|
|
11040
|
-
let { value: S } =
|
|
11057
|
+
function x6(_) {
|
|
11058
|
+
let { value: S } = k;
|
|
11041
11059
|
if (S) for (let C of _) S.style[C] = "";
|
|
11042
11060
|
}
|
|
11043
|
-
function
|
|
11061
|
+
function Z() {
|
|
11044
11062
|
if (_.type === "card") return;
|
|
11045
|
-
let S =
|
|
11046
|
-
S ?
|
|
11063
|
+
let S = J();
|
|
11064
|
+
S ? Y(S) : X();
|
|
11047
11065
|
}
|
|
11048
|
-
function
|
|
11049
|
-
let _ =
|
|
11066
|
+
function S6() {
|
|
11067
|
+
let _ = I.value?.$el;
|
|
11050
11068
|
if (!_) return;
|
|
11051
|
-
let S =
|
|
11069
|
+
let S = J();
|
|
11052
11070
|
if (!S) return;
|
|
11053
11071
|
let { scrollLeft: C, offsetWidth: T } = _, { offsetLeft: E, offsetWidth: D } = S;
|
|
11054
11072
|
C > E ? _.scrollTo({
|
|
@@ -11061,28 +11079,28 @@ var Tabs_default = defineComponent({
|
|
|
11061
11079
|
behavior: "smooth"
|
|
11062
11080
|
});
|
|
11063
11081
|
}
|
|
11064
|
-
let
|
|
11065
|
-
function
|
|
11066
|
-
let S =
|
|
11082
|
+
let Q = ref(null), C6 = 0, w6 = null;
|
|
11083
|
+
function T6(_) {
|
|
11084
|
+
let S = Q.value;
|
|
11067
11085
|
if (S) {
|
|
11068
|
-
|
|
11069
|
-
let C = `${
|
|
11086
|
+
C6 = _.getBoundingClientRect().height;
|
|
11087
|
+
let C = `${C6}px`, T = () => {
|
|
11070
11088
|
S.style.height = C, S.style.maxHeight = C;
|
|
11071
11089
|
};
|
|
11072
|
-
|
|
11090
|
+
w6 ? (T(), w6(), w6 = null) : w6 = T;
|
|
11073
11091
|
}
|
|
11074
11092
|
}
|
|
11075
|
-
function
|
|
11076
|
-
let S =
|
|
11093
|
+
function E6(_) {
|
|
11094
|
+
let S = Q.value;
|
|
11077
11095
|
if (S) {
|
|
11078
11096
|
let C = _.getBoundingClientRect().height, T = () => {
|
|
11079
|
-
document.body.offsetHeight, S.style.maxHeight = `${C}px`, S.style.height = `${Math.max(
|
|
11097
|
+
document.body.offsetHeight, S.style.maxHeight = `${C}px`, S.style.height = `${Math.max(C6, C)}px`;
|
|
11080
11098
|
};
|
|
11081
|
-
|
|
11099
|
+
w6 ? (w6(), w6 = null, T()) : w6 = T;
|
|
11082
11100
|
}
|
|
11083
11101
|
}
|
|
11084
|
-
function
|
|
11085
|
-
let S =
|
|
11102
|
+
function O6() {
|
|
11103
|
+
let S = Q.value;
|
|
11086
11104
|
if (S) {
|
|
11087
11105
|
S.style.maxHeight = "", S.style.height = "";
|
|
11088
11106
|
let { paneWrapperStyle: C } = _;
|
|
@@ -11093,82 +11111,82 @@ var Tabs_default = defineComponent({
|
|
|
11093
11111
|
}
|
|
11094
11112
|
}
|
|
11095
11113
|
}
|
|
11096
|
-
let
|
|
11097
|
-
function
|
|
11098
|
-
let S =
|
|
11099
|
-
for (let T of
|
|
11114
|
+
let k6 = { value: [] }, j6 = ref("next");
|
|
11115
|
+
function M6(_) {
|
|
11116
|
+
let S = G.value, C = "next";
|
|
11117
|
+
for (let T of k6.value) {
|
|
11100
11118
|
if (T === S) break;
|
|
11101
11119
|
if (T === _) {
|
|
11102
11120
|
C = "prev";
|
|
11103
11121
|
break;
|
|
11104
11122
|
}
|
|
11105
11123
|
}
|
|
11106
|
-
|
|
11124
|
+
j6.value = C, P6(_);
|
|
11107
11125
|
}
|
|
11108
|
-
function
|
|
11126
|
+
function P6(S) {
|
|
11109
11127
|
let { onActiveNameChange: C, onUpdateValue: T, "onUpdate:value": E } = _;
|
|
11110
|
-
C && call(C, S), T && call(T, S), E && call(E, S),
|
|
11128
|
+
C && call(C, S), T && call(T, S), E && call(E, S), W.value = S;
|
|
11111
11129
|
}
|
|
11112
|
-
function
|
|
11130
|
+
function F6(S) {
|
|
11113
11131
|
let { onClose: C } = _;
|
|
11114
11132
|
C && call(C, S);
|
|
11115
11133
|
}
|
|
11116
|
-
let
|
|
11117
|
-
function
|
|
11118
|
-
let { value: _ } =
|
|
11134
|
+
let I6 = !0;
|
|
11135
|
+
function L6() {
|
|
11136
|
+
let { value: _ } = k;
|
|
11119
11137
|
if (!_) return;
|
|
11120
|
-
|
|
11138
|
+
I6 ||= !1;
|
|
11121
11139
|
let S = "transition-disabled";
|
|
11122
|
-
_.classList.add(S),
|
|
11140
|
+
_.classList.add(S), Z(), _.classList.remove(S);
|
|
11123
11141
|
}
|
|
11124
|
-
let
|
|
11125
|
-
function
|
|
11126
|
-
let S =
|
|
11142
|
+
let R6 = ref(null);
|
|
11143
|
+
function z6({ transitionDisabled: _ }) {
|
|
11144
|
+
let S = O.value;
|
|
11127
11145
|
if (!S) return;
|
|
11128
11146
|
_ && S.classList.add("transition-disabled");
|
|
11129
|
-
let C =
|
|
11130
|
-
C &&
|
|
11147
|
+
let C = J();
|
|
11148
|
+
C && R6.value && (R6.value.style.width = `${C.offsetWidth}px`, R6.value.style.height = `${C.offsetHeight}px`, R6.value.style.transform = `translateX(${C.offsetLeft - depx$1(getComputedStyle(S).paddingLeft)}px)`, _ && R6.value.offsetWidth), _ && S.classList.remove("transition-disabled");
|
|
11131
11149
|
}
|
|
11132
|
-
watch([
|
|
11150
|
+
watch([G], () => {
|
|
11133
11151
|
_.type === "segment" && nextTick(() => {
|
|
11134
|
-
|
|
11152
|
+
z6({ transitionDisabled: !1 });
|
|
11135
11153
|
});
|
|
11136
11154
|
}), onMounted(() => {
|
|
11137
|
-
_.type === "segment" &&
|
|
11155
|
+
_.type === "segment" && z6({ transitionDisabled: !0 });
|
|
11138
11156
|
});
|
|
11139
|
-
let
|
|
11140
|
-
function
|
|
11141
|
-
if (S.contentRect.width === 0 && S.contentRect.height === 0 ||
|
|
11142
|
-
|
|
11157
|
+
let V6 = 0;
|
|
11158
|
+
function H6(S) {
|
|
11159
|
+
if (S.contentRect.width === 0 && S.contentRect.height === 0 || V6 === S.contentRect.width) return;
|
|
11160
|
+
V6 = S.contentRect.width;
|
|
11143
11161
|
let { type: C } = _;
|
|
11144
|
-
if ((C === "line" || C === "bar") && (
|
|
11162
|
+
if ((C === "line" || C === "bar") && (I6 || _.justifyContent?.startsWith("space")) && L6(), C !== "segment") {
|
|
11145
11163
|
let { placement: S } = _;
|
|
11146
|
-
|
|
11164
|
+
X6((S === "top" || S === "bottom" ? I.value?.$el : L.value) || null);
|
|
11147
11165
|
}
|
|
11148
11166
|
}
|
|
11149
|
-
let
|
|
11167
|
+
let U6 = throttle$2(H6, 64);
|
|
11150
11168
|
watch([() => _.justifyContent, () => _.size], () => {
|
|
11151
11169
|
nextTick(() => {
|
|
11152
11170
|
let { type: S } = _;
|
|
11153
|
-
(S === "line" || S === "bar") &&
|
|
11171
|
+
(S === "line" || S === "bar") && L6();
|
|
11154
11172
|
});
|
|
11155
11173
|
});
|
|
11156
|
-
let
|
|
11157
|
-
function
|
|
11174
|
+
let W6 = ref(!1);
|
|
11175
|
+
function q6(S) {
|
|
11158
11176
|
let { target: C, contentRect: { width: T, height: E } } = S, D = C.parentElement.parentElement.offsetWidth, O = C.parentElement.parentElement.offsetHeight, { placement: k } = _;
|
|
11159
|
-
if (!
|
|
11177
|
+
if (!W6.value) k === "top" || k === "bottom" ? D < T && (W6.value = !0) : O < E && (W6.value = !0);
|
|
11160
11178
|
else {
|
|
11161
|
-
let { value: _ } =
|
|
11179
|
+
let { value: _ } = F;
|
|
11162
11180
|
if (!_) return;
|
|
11163
|
-
k === "top" || k === "bottom" ? D - T > _.$el.offsetWidth && (
|
|
11181
|
+
k === "top" || k === "bottom" ? D - T > _.$el.offsetWidth && (W6.value = !1) : O - E > _.$el.offsetHeight && (W6.value = !1);
|
|
11164
11182
|
}
|
|
11165
|
-
|
|
11183
|
+
X6(I.value?.$el || null);
|
|
11166
11184
|
}
|
|
11167
|
-
let
|
|
11168
|
-
function
|
|
11185
|
+
let J6 = throttle$2(q6, 64);
|
|
11186
|
+
function Y6() {
|
|
11169
11187
|
let { onAdd: S } = _;
|
|
11170
11188
|
S && S(), nextTick(() => {
|
|
11171
|
-
let _ =
|
|
11189
|
+
let _ = J(), { value: S } = I;
|
|
11172
11190
|
!_ || !S || S.scrollTo({
|
|
11173
11191
|
left: _.offsetLeft,
|
|
11174
11192
|
top: 0,
|
|
@@ -11176,19 +11194,19 @@ var Tabs_default = defineComponent({
|
|
|
11176
11194
|
});
|
|
11177
11195
|
});
|
|
11178
11196
|
}
|
|
11179
|
-
function
|
|
11197
|
+
function X6(S) {
|
|
11180
11198
|
if (!S) return;
|
|
11181
11199
|
let { placement: C } = _;
|
|
11182
11200
|
if (C === "top" || C === "bottom") {
|
|
11183
11201
|
let { scrollLeft: _, scrollWidth: C, offsetWidth: T } = S;
|
|
11184
|
-
|
|
11202
|
+
R.value = _ <= 0, z.value = _ + T >= C;
|
|
11185
11203
|
} else {
|
|
11186
11204
|
let { scrollTop: _, scrollHeight: C, offsetHeight: T } = S;
|
|
11187
|
-
|
|
11205
|
+
R.value = _ <= 0, z.value = _ + T >= C;
|
|
11188
11206
|
}
|
|
11189
11207
|
}
|
|
11190
|
-
let
|
|
11191
|
-
|
|
11208
|
+
let Z6 = throttle$2((_) => {
|
|
11209
|
+
X6(_.target);
|
|
11192
11210
|
}, 64);
|
|
11193
11211
|
provide(tabsInjectionKey$1, {
|
|
11194
11212
|
triggerRef: toRef(_, "trigger"),
|
|
@@ -11201,31 +11219,31 @@ var Tabs_default = defineComponent({
|
|
|
11201
11219
|
mergedClsPrefixRef: C,
|
|
11202
11220
|
typeRef: toRef(_, "type"),
|
|
11203
11221
|
closableRef: toRef(_, "closable"),
|
|
11204
|
-
valueRef:
|
|
11205
|
-
tabChangeIdRef:
|
|
11222
|
+
valueRef: G,
|
|
11223
|
+
tabChangeIdRef: K,
|
|
11206
11224
|
onBeforeLeaveRef: toRef(_, "onBeforeLeave"),
|
|
11207
|
-
activateTab:
|
|
11208
|
-
handleClose:
|
|
11209
|
-
handleAdd:
|
|
11225
|
+
activateTab: M6,
|
|
11226
|
+
handleClose: F6,
|
|
11227
|
+
handleAdd: Y6
|
|
11210
11228
|
}), onFontsReady$1(() => {
|
|
11211
|
-
|
|
11229
|
+
Z(), S6();
|
|
11212
11230
|
}), watchEffect(() => {
|
|
11213
|
-
let { value: _ } =
|
|
11231
|
+
let { value: _ } = P;
|
|
11214
11232
|
if (!_) return;
|
|
11215
11233
|
let { value: S } = C, T = `${S}-tabs-nav-scroll-wrapper--shadow-start`, E = `${S}-tabs-nav-scroll-wrapper--shadow-end`;
|
|
11216
|
-
|
|
11234
|
+
R.value ? _.classList.remove(T) : _.classList.add(T), z.value ? _.classList.remove(E) : _.classList.add(E);
|
|
11217
11235
|
});
|
|
11218
|
-
let
|
|
11219
|
-
|
|
11220
|
-
} },
|
|
11221
|
-
|
|
11222
|
-
},
|
|
11223
|
-
let { value: S } =
|
|
11236
|
+
let Q6 = { syncBarPosition: () => {
|
|
11237
|
+
Z();
|
|
11238
|
+
} }, $6 = () => {
|
|
11239
|
+
z6({ transitionDisabled: !0 });
|
|
11240
|
+
}, e8 = computed(() => {
|
|
11241
|
+
let { value: S } = V, { type: C } = _, T = {
|
|
11224
11242
|
card: "Card",
|
|
11225
11243
|
bar: "Bar",
|
|
11226
11244
|
line: "Line",
|
|
11227
11245
|
segment: "Segment"
|
|
11228
|
-
}[C],
|
|
11246
|
+
}[C], E = `${S}${T}`, { self: { barColor: O, closeIconColor: k, closeIconColorHover: A, closeIconColorPressed: P, tabColor: F, tabBorderColor: I, paneTextColor: L, tabFontWeight: R, tabBorderRadius: z, tabFontWeightActive: B, colorSegment: U, fontWeightStrong: W, tabColorSegment: G, closeSize: K, closeIconSize: q, closeColorHover: J, closeColorPressed: Y, closeBorderRadius: X, [createKey$2("panePadding", S)]: b6, [createKey$2("tabPadding", E)]: x6, [createKey$2("tabPaddingVertical", E)]: Z, [createKey$2("tabGap", E)]: S6, [createKey$2("tabGap", `${E}Vertical`)]: Q, [createKey$2("tabTextColor", C)]: C6, [createKey$2("tabTextColorActive", C)]: w6, [createKey$2("tabTextColorHover", C)]: T6, [createKey$2("tabTextColorDisabled", C)]: E6, [createKey$2("tabFontSize", S)]: D6 }, common: { cubicBezierEaseInOut: O6 } } = D.value;
|
|
11229
11247
|
return {
|
|
11230
11248
|
"--n-bezier": O6,
|
|
11231
11249
|
"--n-color-segment": U,
|
|
@@ -11237,7 +11255,7 @@ var Tabs_default = defineComponent({
|
|
|
11237
11255
|
"--n-tab-text-color-hover": T6,
|
|
11238
11256
|
"--n-pane-text-color": L,
|
|
11239
11257
|
"--n-tab-border-color": I,
|
|
11240
|
-
"--n-tab-border-radius":
|
|
11258
|
+
"--n-tab-border-radius": z,
|
|
11241
11259
|
"--n-close-size": K,
|
|
11242
11260
|
"--n-close-icon-size": q,
|
|
11243
11261
|
"--n-close-color-hover": J,
|
|
@@ -11248,7 +11266,7 @@ var Tabs_default = defineComponent({
|
|
|
11248
11266
|
"--n-close-icon-color-pressed": P,
|
|
11249
11267
|
"--n-tab-color": F,
|
|
11250
11268
|
"--n-tab-font-weight": R,
|
|
11251
|
-
"--n-tab-font-weight-active":
|
|
11269
|
+
"--n-tab-font-weight-active": B,
|
|
11252
11270
|
"--n-tab-padding": x6,
|
|
11253
11271
|
"--n-tab-padding-vertical": Z,
|
|
11254
11272
|
"--n-tab-gap": S6,
|
|
@@ -11260,35 +11278,35 @@ var Tabs_default = defineComponent({
|
|
|
11260
11278
|
"--n-font-weight-strong": W,
|
|
11261
11279
|
"--n-tab-color-segment": G
|
|
11262
11280
|
};
|
|
11263
|
-
}),
|
|
11281
|
+
}), t8 = T ? useThemeClass$1("tabs", computed(() => `${V.value[0]}${_.type[0]}`), e8, _) : void 0;
|
|
11264
11282
|
return Object.assign({
|
|
11265
11283
|
mergedClsPrefix: C,
|
|
11266
|
-
mergedValue:
|
|
11284
|
+
mergedValue: G,
|
|
11267
11285
|
renderedNames: /* @__PURE__ */ new Set(),
|
|
11268
|
-
segmentCapsuleElRef:
|
|
11269
|
-
tabsPaneWrapperRef:
|
|
11270
|
-
tabsElRef:
|
|
11271
|
-
barElRef:
|
|
11272
|
-
addTabInstRef:
|
|
11273
|
-
xScrollInstRef:
|
|
11274
|
-
scrollWrapperElRef:
|
|
11275
|
-
addTabFixed:
|
|
11276
|
-
tabWrapperStyle:
|
|
11277
|
-
handleNavResize:
|
|
11278
|
-
mergedSize:
|
|
11279
|
-
handleScroll:
|
|
11280
|
-
handleTabsResize:
|
|
11281
|
-
cssVars: T ? void 0 :
|
|
11282
|
-
themeClass:
|
|
11283
|
-
animationDirection:
|
|
11284
|
-
renderNameListRef:
|
|
11285
|
-
yScrollElRef:
|
|
11286
|
-
handleSegmentResize:
|
|
11287
|
-
onAnimationBeforeLeave:
|
|
11288
|
-
onAnimationEnter:
|
|
11289
|
-
onAnimationAfterEnter:
|
|
11290
|
-
onRender:
|
|
11291
|
-
},
|
|
11286
|
+
segmentCapsuleElRef: R6,
|
|
11287
|
+
tabsPaneWrapperRef: Q,
|
|
11288
|
+
tabsElRef: O,
|
|
11289
|
+
barElRef: k,
|
|
11290
|
+
addTabInstRef: F,
|
|
11291
|
+
xScrollInstRef: I,
|
|
11292
|
+
scrollWrapperElRef: P,
|
|
11293
|
+
addTabFixed: W6,
|
|
11294
|
+
tabWrapperStyle: q,
|
|
11295
|
+
handleNavResize: U6,
|
|
11296
|
+
mergedSize: V,
|
|
11297
|
+
handleScroll: Z6,
|
|
11298
|
+
handleTabsResize: J6,
|
|
11299
|
+
cssVars: T ? void 0 : e8,
|
|
11300
|
+
themeClass: t8?.themeClass,
|
|
11301
|
+
animationDirection: j6,
|
|
11302
|
+
renderNameListRef: k6,
|
|
11303
|
+
yScrollElRef: L,
|
|
11304
|
+
handleSegmentResize: $6,
|
|
11305
|
+
onAnimationBeforeLeave: T6,
|
|
11306
|
+
onAnimationEnter: E6,
|
|
11307
|
+
onAnimationAfterEnter: O6,
|
|
11308
|
+
onRender: t8?.onRender
|
|
11309
|
+
}, Q6);
|
|
11292
11310
|
},
|
|
11293
11311
|
render() {
|
|
11294
11312
|
let { mergedClsPrefix: _, type: S, placement: C, addTabFixed: T, addable: E, mergedSize: D, renderNameListRef: O, onRender: k, paneWrapperClass: A, paneWrapperStyle: P, $slots: { default: F, prefix: I, suffix: L } } = this;
|