bkui-vue 0.0.1-beta.343 → 0.0.1-beta.344
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +24 -24
- package/dist/index.esm.js +49 -30
- package/dist/index.umd.js +24 -24
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/index.js +1 -1
- package/lib/checkbox/checkbox.d.ts +4 -10
- package/lib/checkbox/common.d.ts +1 -0
- package/lib/checkbox/index.d.ts +8 -16
- package/lib/checkbox/index.js +1 -1
- package/lib/collapse/collapse-panel.d.ts +2 -7
- package/lib/collapse/index.d.ts +2 -7
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/props.d.ts +1 -3
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/dialog/index.d.ts +4 -4
- package/lib/dialog/props.d.ts +1 -1
- package/lib/form/form.css +0 -1
- package/lib/form/form.less +0 -1
- package/lib/form/form.variable.css +0 -1
- package/lib/modal/index.d.ts +5 -5
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +2 -2
- package/lib/modal/props.mixin.d.ts +1 -2
- package/lib/sideslider/index.d.ts +4 -4
- package/lib/sideslider/sideslider.d.ts +2 -2
- package/lib/tab/index.d.ts +2 -2
- package/lib/tab/index.js +1 -1
- package/lib/tab/props.d.ts +1 -2
- package/lib/tab/tab-panel.d.ts +2 -2
- package/lib/tab/tab.css +0 -1
- package/lib/tab/tab.less +0 -1
- package/lib/tab/tab.variable.css +0 -1
- package/lib/tag-input/tag-input.d.ts +28 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -7889,11 +7889,6 @@ var SizeEnum = /* @__PURE__ */ ((SizeEnum2) => {
|
|
7889
7889
|
SizeEnum2["DEFAULT"] = "default";
|
7890
7890
|
return SizeEnum2;
|
7891
7891
|
})(SizeEnum || {});
|
7892
|
-
var RenderDirectiveEnum = /* @__PURE__ */ ((RenderDirectiveEnum2) => {
|
7893
|
-
RenderDirectiveEnum2["IF"] = "if";
|
7894
|
-
RenderDirectiveEnum2["SHOW"] = "show";
|
7895
|
-
return RenderDirectiveEnum2;
|
7896
|
-
})(RenderDirectiveEnum || {});
|
7897
7892
|
function renderDirectiveType() {
|
7898
7893
|
return j("renderDirective", {
|
7899
7894
|
default: "show"
|
@@ -9166,8 +9161,25 @@ var BreadcrumbItem = defineComponent({
|
|
9166
9161
|
const classCtx = classes({
|
9167
9162
|
"bk-breadcrumb-item": true
|
9168
9163
|
}, `${props2.extCls || ""}`);
|
9164
|
+
const renderSeparator = () => {
|
9165
|
+
if (slots.separator) {
|
9166
|
+
return slots.separator();
|
9167
|
+
}
|
9168
|
+
if (parent.separatorClass) {
|
9169
|
+
return createVNode("i", {
|
9170
|
+
"class": `bk-breadcrumb-separator ${parent.separatorClass}`
|
9171
|
+
}, null);
|
9172
|
+
}
|
9173
|
+
if (parent.separator) {
|
9174
|
+
return createVNode("span", {
|
9175
|
+
"class": "bk-breadcrumb-separator",
|
9176
|
+
"role": "presentation"
|
9177
|
+
}, [parent == null ? void 0 : parent.separator]);
|
9178
|
+
}
|
9179
|
+
return null;
|
9180
|
+
};
|
9169
9181
|
return () => {
|
9170
|
-
var _a
|
9182
|
+
var _a;
|
9171
9183
|
return createVNode("span", {
|
9172
9184
|
"class": classCtx
|
9173
9185
|
}, [createVNode("span", {
|
@@ -9175,12 +9187,7 @@ var BreadcrumbItem = defineComponent({
|
|
9175
9187
|
"class": `bk-breadcrumb-item-inner ${props2.to ? "is-link" : ""}`,
|
9176
9188
|
"role": "link",
|
9177
9189
|
"onClick": handleClick
|
9178
|
-
}, [(_a = slots
|
9179
|
-
"class": `bk-breadcrumb-separator ${parent.separatorClass}`
|
9180
|
-
}, null) : createVNode("span", {
|
9181
|
-
"class": "bk-breadcrumb-separator",
|
9182
|
-
"role": "presentation"
|
9183
|
-
}, [parent == null ? void 0 : parent.separator])]);
|
9190
|
+
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSeparator()]);
|
9184
9191
|
};
|
9185
9192
|
}
|
9186
9193
|
});
|
@@ -9337,10 +9344,10 @@ var Component$y = defineComponent({
|
|
9337
9344
|
if (isHover.value && !props2.text)
|
9338
9345
|
return "white";
|
9339
9346
|
if (props2.text && props2.disabled)
|
9340
|
-
return
|
9347
|
+
return;
|
9341
9348
|
return props2.hoverTheme || props2.theme;
|
9342
9349
|
}
|
9343
|
-
return
|
9350
|
+
return !props2.theme ? void 0 : "white";
|
9344
9351
|
});
|
9345
9352
|
const loadingSize = computed(() => isText.value || props2.size === BkLoadingSize.Small ? BkLoadingSize.Mini : BkLoadingSize.Small);
|
9346
9353
|
const handleClick = (e) => {
|
@@ -9798,6 +9805,7 @@ const useCheckbox = () => {
|
|
9798
9805
|
} = currentInstance;
|
9799
9806
|
const checkboxGroup = inject(checkboxGroupKey, EMPTY_OBJ);
|
9800
9807
|
const isGroup = !isEmptyObj(checkboxGroup);
|
9808
|
+
const inputRef = ref();
|
9801
9809
|
const isChecked = ref(props2.checked);
|
9802
9810
|
const isDisabled = computed(() => {
|
9803
9811
|
if (isGroup && checkboxGroup.props.disabled) {
|
@@ -9805,6 +9813,19 @@ const useCheckbox = () => {
|
|
9805
9813
|
}
|
9806
9814
|
return props2.disabled;
|
9807
9815
|
});
|
9816
|
+
const triggerChange = () => {
|
9817
|
+
const nextValue = isChecked.value ? props2.trueLabel : props2.falseLabel;
|
9818
|
+
emit("update:modelValue", nextValue);
|
9819
|
+
emit("change", nextValue);
|
9820
|
+
if (isGroup) {
|
9821
|
+
checkboxGroup.handleChange();
|
9822
|
+
}
|
9823
|
+
nextTick(() => {
|
9824
|
+
if (inputRef.value.checked !== isChecked.value) {
|
9825
|
+
inputRef.value.checked = isChecked.value;
|
9826
|
+
}
|
9827
|
+
});
|
9828
|
+
};
|
9808
9829
|
if (isGroup) {
|
9809
9830
|
watch(() => checkboxGroup.props.modelValue, (modelValue) => {
|
9810
9831
|
isChecked.value = modelValue.includes(props2.label);
|
@@ -9821,6 +9842,10 @@ const useCheckbox = () => {
|
|
9821
9842
|
immediate: true
|
9822
9843
|
});
|
9823
9844
|
}
|
9845
|
+
watch(() => props2.checked, () => {
|
9846
|
+
isChecked.value = props2.checked;
|
9847
|
+
triggerChange();
|
9848
|
+
});
|
9824
9849
|
const setChecked = (value = true) => {
|
9825
9850
|
isChecked.value = value;
|
9826
9851
|
};
|
@@ -9830,17 +9855,7 @@ const useCheckbox = () => {
|
|
9830
9855
|
}
|
9831
9856
|
const $targetInput = event.target;
|
9832
9857
|
isChecked.value = $targetInput.checked;
|
9833
|
-
|
9834
|
-
emit("update:modelValue", nextValue);
|
9835
|
-
emit("change", nextValue);
|
9836
|
-
if (isGroup) {
|
9837
|
-
checkboxGroup.handleChange();
|
9838
|
-
}
|
9839
|
-
nextTick(() => {
|
9840
|
-
if ($targetInput.checked !== isChecked.value) {
|
9841
|
-
$targetInput.checked = isChecked.value;
|
9842
|
-
}
|
9843
|
-
});
|
9858
|
+
triggerChange();
|
9844
9859
|
};
|
9845
9860
|
onMounted(() => {
|
9846
9861
|
if (isGroup) {
|
@@ -9853,6 +9868,7 @@ const useCheckbox = () => {
|
|
9853
9868
|
}
|
9854
9869
|
});
|
9855
9870
|
return {
|
9871
|
+
inputRef,
|
9856
9872
|
isChecked,
|
9857
9873
|
isDisabled,
|
9858
9874
|
setChecked,
|
@@ -9860,10 +9876,10 @@ const useCheckbox = () => {
|
|
9860
9876
|
};
|
9861
9877
|
};
|
9862
9878
|
const checkboxProps = {
|
9863
|
-
modelValue: PropTypes.oneOfType([String, Number, Boolean])
|
9879
|
+
modelValue: PropTypes.oneOfType([String, Number, Boolean]),
|
9864
9880
|
label: PropTypes.oneOfType([String, Number, Boolean]),
|
9865
9881
|
trueLabel: PropTypes.oneOfType([String, Number, Boolean]).def(true),
|
9866
|
-
falseLabel: PropTypes.oneOfType([String, Number, Boolean]).def(
|
9882
|
+
falseLabel: PropTypes.oneOfType([String, Number, Boolean]).def(false),
|
9867
9883
|
disabled: PropTypes.bool.def(false),
|
9868
9884
|
checked: PropTypes.bool.def(false),
|
9869
9885
|
indeterminate: PropTypes.bool,
|
@@ -9880,12 +9896,14 @@ var Component$v = defineComponent({
|
|
9880
9896
|
focus: handleFocus
|
9881
9897
|
}] = useFocus$1();
|
9882
9898
|
const {
|
9899
|
+
inputRef,
|
9883
9900
|
isChecked,
|
9884
9901
|
isDisabled,
|
9885
9902
|
setChecked,
|
9886
9903
|
handleChange
|
9887
9904
|
} = useCheckbox();
|
9888
9905
|
return {
|
9906
|
+
inputRef,
|
9889
9907
|
isFocus,
|
9890
9908
|
isChecked,
|
9891
9909
|
isDisabled,
|
@@ -9917,6 +9935,7 @@ var Component$v = defineComponent({
|
|
9917
9935
|
}, [createVNode("span", {
|
9918
9936
|
"class": [resolveClassName("checkbox-input"), this.size]
|
9919
9937
|
}, [createVNode("input", {
|
9938
|
+
"ref": "inputRef",
|
9920
9939
|
"role": "checkbox",
|
9921
9940
|
"type": "checkbox",
|
9922
9941
|
"class": "bk-checkbox-original",
|
@@ -10012,7 +10031,7 @@ const propsCollapsePanel = __spreadValues({
|
|
10012
10031
|
content: PropTypes.string,
|
10013
10032
|
disabled: PropTypes.bool.def(false),
|
10014
10033
|
isFormList: PropTypes.bool.def(false),
|
10015
|
-
renderDirective: renderDirectiveType()
|
10034
|
+
renderDirective: renderDirectiveType(),
|
10016
10035
|
modelValue: PropTypes.bool.def(false)
|
10017
10036
|
}, CollapsePanelEventProps);
|
10018
10037
|
const trimArr$1 = function(s2) {
|
@@ -10310,7 +10329,7 @@ const propsMixin$1 = {
|
|
10310
10329
|
direction: PropTypes.string,
|
10311
10330
|
title: PropTypes.string.def(""),
|
10312
10331
|
animateType: PropTypes.string.def("slide"),
|
10313
|
-
renderDirective: renderDirectiveType,
|
10332
|
+
renderDirective: renderDirectiveType(),
|
10314
10333
|
beforeClose: PropTypes.custom(() => true),
|
10315
10334
|
dialogType: dialogTypeUnion(),
|
10316
10335
|
multiInstance: PropTypes.bool.def(true),
|
@@ -20466,7 +20485,7 @@ const tabPanelProps = {
|
|
20466
20485
|
visible: PropTypes.bool.def(true),
|
20467
20486
|
disabled: PropTypes.bool,
|
20468
20487
|
sortable: PropTypes.bool,
|
20469
|
-
renderDirective: renderDirectiveType,
|
20488
|
+
renderDirective: renderDirectiveType(),
|
20470
20489
|
panel: PropTypes.string || PropTypes.func
|
20471
20490
|
};
|
20472
20491
|
var TabNav = defineComponent({
|