bkui-vue 0.0.1-beta.408 → 0.0.1-beta.409
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 +28 -28
- package/dist/index.esm.js +89 -93
- package/dist/index.umd.js +29 -29
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/card/index.js +1 -1
- package/lib/cascader/cascader.d.ts +1 -1
- package/lib/cascader/index.d.ts +4 -4
- package/lib/collapse/collapse-panel.d.ts +2 -2
- package/lib/collapse/collapse.d.ts +2 -2
- package/lib/collapse/index.d.ts +9 -9
- package/lib/collapse/index.js +1 -1
- package/lib/collapse-transition/collapse-transition.css +93 -0
- package/lib/collapse-transition/collapse-transition.d.ts +15 -0
- package/lib/collapse-transition/collapse-transition.less +111 -0
- package/lib/collapse-transition/collapse-transition.variable.css +213 -0
- package/lib/collapse-transition/index.d.ts +2 -0
- package/lib/collapse-transition/index.js +1 -0
- package/lib/icon/img-error.js +1 -0
- package/lib/icon/index.js +1 -1
- package/lib/search-select/index.js +1 -1
- package/lib/select/index.d.ts +4 -4
- package/lib/select/select.d.ts +1 -1
- package/lib/styles/index.d.ts +1 -0
- package/lib/tree/index.js +1 -1
- package/package.json +2 -2
- package/lib/icon/image-fill.js +0 -1
package/dist/index.esm.js
CHANGED
@@ -33,7 +33,7 @@ var __publicField = (obj, key2, value) => {
|
|
33
33
|
__defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
|
34
34
|
return value;
|
35
35
|
};
|
36
|
-
import { inject, reactive, defineComponent, computed, watch, provide, createVNode, mergeProps, h as h$1, ref, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Transition, createTextVNode,
|
36
|
+
import { inject, reactive, defineComponent, computed, watch, provide, createVNode, mergeProps, h as h$1, ref, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Transition, createTextVNode, withDirectives, vShow, isVNode, renderSlot, Fragment, toRefs, Teleport, resolveDirective, createApp, customRef, onBeforeMount, toRef, shallowRef, onUnmounted, vModelText, unref, watchEffect, markRaw, onUpdated, render as render$1, toRaw, withModifiers, TransitionGroup } from "vue";
|
37
37
|
var reset = "";
|
38
38
|
var alert = "";
|
39
39
|
var affix = "";
|
@@ -44,6 +44,7 @@ var button = "";
|
|
44
44
|
var card = "";
|
45
45
|
var checkbox = "";
|
46
46
|
var collapse = "";
|
47
|
+
var collapseTransition = "";
|
47
48
|
var dialog = "";
|
48
49
|
var exception = "";
|
49
50
|
var fixedNavbar = "";
|
@@ -9603,6 +9604,78 @@ var ButtonGroup = defineComponent({
|
|
9603
9604
|
}
|
9604
9605
|
});
|
9605
9606
|
const BkButton = withInstallProps(Component$x, { ButtonGroup });
|
9607
|
+
var CollapseTransition = defineComponent({
|
9608
|
+
name: "CollapseTransition",
|
9609
|
+
setup(_props, {
|
9610
|
+
slots
|
9611
|
+
}) {
|
9612
|
+
const on2 = {
|
9613
|
+
onBeforeEnter(el) {
|
9614
|
+
if (!el.dataset)
|
9615
|
+
el.dataset = {};
|
9616
|
+
el.dataset.oldPaddingTop = el.style.paddingTop;
|
9617
|
+
el.dataset.oldPaddingBottom = el.style.paddingBottom;
|
9618
|
+
el.style.maxHeight = "0";
|
9619
|
+
el.style.paddingTop = "0";
|
9620
|
+
el.style.paddingBottom = "0";
|
9621
|
+
},
|
9622
|
+
onEnter(el) {
|
9623
|
+
el.dataset.oldOverflow = el.style.overflow;
|
9624
|
+
if (el.scrollHeight !== 0) {
|
9625
|
+
el.style.maxHeight = `${el.scrollHeight}px`;
|
9626
|
+
el.style.paddingTop = el.dataset.oldPaddingTop;
|
9627
|
+
el.style.paddingBottom = el.dataset.oldPaddingBottom;
|
9628
|
+
} else {
|
9629
|
+
el.style.maxHeight = "0";
|
9630
|
+
el.style.paddingTop = el.dataset.oldPaddingTop;
|
9631
|
+
el.style.paddingBottom = el.dataset.oldPaddingBottom;
|
9632
|
+
}
|
9633
|
+
el.style.overflow = "hidden";
|
9634
|
+
},
|
9635
|
+
onAfterEnter(el) {
|
9636
|
+
el.style.maxHeight = "";
|
9637
|
+
el.style.overflow = el.dataset.oldOverflow;
|
9638
|
+
},
|
9639
|
+
onBeforeLeave(el) {
|
9640
|
+
if (!el.dataset)
|
9641
|
+
el.dataset = {};
|
9642
|
+
el.dataset.oldPaddingTop = el.style.paddingTop;
|
9643
|
+
el.dataset.oldPaddingBottom = el.style.paddingBottom;
|
9644
|
+
el.dataset.oldOverflow = el.style.overflow;
|
9645
|
+
el.style.maxHeight = `${el.scrollHeight}px`;
|
9646
|
+
el.style.overflow = "hidden";
|
9647
|
+
},
|
9648
|
+
onLeave(el) {
|
9649
|
+
if (el.scrollHeight !== 0) {
|
9650
|
+
el.style.maxHeight = "0";
|
9651
|
+
el.style.paddingTop = "0";
|
9652
|
+
el.style.paddingBottom = "0";
|
9653
|
+
}
|
9654
|
+
},
|
9655
|
+
onAfterLeave(el) {
|
9656
|
+
el.style.maxHeight = "";
|
9657
|
+
el.style.overflow = el.dataset.oldOverflow;
|
9658
|
+
el.style.paddingTop = el.dataset.oldPaddingTop;
|
9659
|
+
el.style.paddingBottom = el.dataset.oldPaddingBottom;
|
9660
|
+
}
|
9661
|
+
};
|
9662
|
+
return {
|
9663
|
+
on: on2,
|
9664
|
+
slots
|
9665
|
+
};
|
9666
|
+
},
|
9667
|
+
render() {
|
9668
|
+
const name = resolveClassName("collapse-transition");
|
9669
|
+
return createVNode(Transition, mergeProps({
|
9670
|
+
"name": name
|
9671
|
+
}, this.on), {
|
9672
|
+
default: () => [this.slots.default ? this.slots.default() : null]
|
9673
|
+
});
|
9674
|
+
}
|
9675
|
+
});
|
9676
|
+
CollapseTransition.install = (Vue) => {
|
9677
|
+
Vue.component(CollapseTransition.name, CollapseTransition);
|
9678
|
+
};
|
9606
9679
|
const inputType = {
|
9607
9680
|
type: PropTypes.string.def("text"),
|
9608
9681
|
clearable: PropTypes.bool,
|
@@ -9942,7 +10015,7 @@ var Component$v = defineComponent({
|
|
9942
10015
|
};
|
9943
10016
|
},
|
9944
10017
|
render() {
|
9945
|
-
var _a, _b, _c, _d, _e, _f
|
10018
|
+
var _a, _b, _c, _d, _e, _f;
|
9946
10019
|
const wrapperName = "bk-card";
|
9947
10020
|
const cardClass = classes({
|
9948
10021
|
[`${wrapperName}`]: true,
|
@@ -9974,11 +10047,16 @@ var Component$v = defineComponent({
|
|
9974
10047
|
}, [this.$props.isCollapse && ((_c = (_b = (_a = this.$slots).icon) == null ? void 0 : _b.call(_a)) != null ? _c : defaultIcon), (_f = (_e = (_d = this.$slots).header) == null ? void 0 : _e.call(_d)) != null ? _f : defaultHeader, this.$props.isEdit && !this.showInput && createVNode(editLine, {
|
9975
10048
|
"class": `${wrapperName}-edit`,
|
9976
10049
|
"onClick": this.clickEdit
|
9977
|
-
}, null)]) : "",
|
9978
|
-
|
9979
|
-
|
9980
|
-
|
9981
|
-
|
10050
|
+
}, null)]) : "", createVNode(CollapseTransition, null, {
|
10051
|
+
default: () => {
|
10052
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
10053
|
+
return [withDirectives(createVNode("div", null, [createVNode("div", {
|
10054
|
+
"class": `${wrapperName}-body`
|
10055
|
+
}, [(_c2 = (_b2 = (_a2 = this.$slots).default) == null ? void 0 : _b2.call(_a2)) != null ? _c2 : "Content"]), this.$props.showFooter ? createVNode("div", {
|
10056
|
+
"class": `${wrapperName}-footer`
|
10057
|
+
}, [(_f2 = (_e2 = (_d2 = this.$slots).footer) == null ? void 0 : _e2.call(_d2)) != null ? _f2 : "Footer"]) : ""]), [[vShow, this.collapseActive]])];
|
10058
|
+
}
|
10059
|
+
})]);
|
9982
10060
|
}
|
9983
10061
|
});
|
9984
10062
|
const BkCard = withInstall(Component$v);
|
@@ -10240,85 +10318,6 @@ const propsCollapsePanel = __spreadValues({
|
|
10240
10318
|
modelValue: PropTypes.bool.def(false),
|
10241
10319
|
alone: PropTypes.bool.def(false)
|
10242
10320
|
}, CollapsePanelEventProps);
|
10243
|
-
const trimArr$1 = function(s2) {
|
10244
|
-
return (s2 || "").split(" ").filter((item) => !!item.trim());
|
10245
|
-
};
|
10246
|
-
function removeClass$1(el, cls) {
|
10247
|
-
if (!el || !cls)
|
10248
|
-
return;
|
10249
|
-
const classes2 = trimArr$1(cls);
|
10250
|
-
let curClass = el.getAttribute("class") || "";
|
10251
|
-
if (el.classList) {
|
10252
|
-
el.classList.remove(...classes2);
|
10253
|
-
return;
|
10254
|
-
}
|
10255
|
-
classes2.forEach((item) => {
|
10256
|
-
curClass = curClass.replace(` ${item} `, " ");
|
10257
|
-
});
|
10258
|
-
const className = trimArr$1(curClass).join(" ");
|
10259
|
-
el.setAttribute("class", className);
|
10260
|
-
}
|
10261
|
-
function addClass$1(el, cls) {
|
10262
|
-
if (!el)
|
10263
|
-
return;
|
10264
|
-
let className = el.getAttribute("class") || "";
|
10265
|
-
const curClass = trimArr$1(className);
|
10266
|
-
const classes2 = (cls || "").split(" ").filter((item) => !curClass.includes(item) && !!item.trim());
|
10267
|
-
if (el.classList) {
|
10268
|
-
el.classList.add(...classes2);
|
10269
|
-
} else {
|
10270
|
-
className += ` ${classes2.join(" ")}`;
|
10271
|
-
el.setAttribute("class", className);
|
10272
|
-
}
|
10273
|
-
}
|
10274
|
-
const collapseMotion$1 = (emit) => ({
|
10275
|
-
css: true,
|
10276
|
-
onBeforeEnter: (el) => {
|
10277
|
-
addClass$1(el, "collapse-transition");
|
10278
|
-
if (!el.dataset)
|
10279
|
-
el.dataset = {};
|
10280
|
-
el.style.height = "0px";
|
10281
|
-
},
|
10282
|
-
onEnter: (el) => {
|
10283
|
-
el.dataset.oldOverflow = el.style.overflow;
|
10284
|
-
if (el.scrollHeight !== 0) {
|
10285
|
-
el.style.height = `${el.scrollHeight}px`;
|
10286
|
-
el.style.maxHeight = `${el.scrollHeight}px`;
|
10287
|
-
} else {
|
10288
|
-
el.style.height = "0px";
|
10289
|
-
}
|
10290
|
-
el.style.overflow = "hidden";
|
10291
|
-
},
|
10292
|
-
onAfterEnter: (el) => {
|
10293
|
-
el.style.height = "";
|
10294
|
-
el.style.maxHeight = "";
|
10295
|
-
el.style.overflow = el.dataset.oldOverflow;
|
10296
|
-
removeClass$1(el, "collapse-transition");
|
10297
|
-
emit("before-enter");
|
10298
|
-
},
|
10299
|
-
onBeforeLeave: (el) => {
|
10300
|
-
if (!el.dataset)
|
10301
|
-
el.dataset = {};
|
10302
|
-
el.dataset.oldOverflow = el.style.overflow;
|
10303
|
-
el.style.height = `${el.scrollHeight}px`;
|
10304
|
-
el.style.maxHeight = `${el.scrollHeight}px`;
|
10305
|
-
el.style.overflow = "hidden";
|
10306
|
-
},
|
10307
|
-
onLeave: (el) => {
|
10308
|
-
if (el.scrollHeight !== 0) {
|
10309
|
-
addClass$1(el, "collapse-transition");
|
10310
|
-
el.style.transitionProperty = "height";
|
10311
|
-
el.style.height = "0px";
|
10312
|
-
}
|
10313
|
-
},
|
10314
|
-
onAfterLeave: (el) => {
|
10315
|
-
removeClass$1(el, "collapse-transition");
|
10316
|
-
el.style.height = "";
|
10317
|
-
el.style.maxHeight = "";
|
10318
|
-
el.style.overflow = el.dataset.oldOverflow;
|
10319
|
-
emit("after-leave");
|
10320
|
-
}
|
10321
|
-
});
|
10322
10321
|
function _isSlot$7(s2) {
|
10323
10322
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
10324
10323
|
}
|
@@ -10369,7 +10368,6 @@ var CollapsePanel = defineComponent({
|
|
10369
10368
|
});
|
10370
10369
|
}
|
10371
10370
|
}
|
10372
|
-
const transition = ref(collapseMotion$1(emit));
|
10373
10371
|
function getContent() {
|
10374
10372
|
if (props2.content) {
|
10375
10373
|
return props2.content;
|
@@ -10418,7 +10416,7 @@ var CollapsePanel = defineComponent({
|
|
10418
10416
|
"class": `bk-collapse-item ${props2.disabled ? "is-disabled" : ""} ${isActive.value ? "bk-collapse-item-active" : ""}`
|
10419
10417
|
}, [createVNode("div", {
|
10420
10418
|
"onClick": () => clickItem(props2)
|
10421
|
-
}, [renderHeader()]), createVNode(
|
10419
|
+
}, [renderHeader()]), createVNode(CollapseTransition, null, _isSlot$7(_slot = renderPanel()) ? _slot : {
|
10422
10420
|
default: () => [_slot]
|
10423
10421
|
})]);
|
10424
10422
|
};
|
@@ -29960,11 +29958,12 @@ var Component$8 = defineComponent({
|
|
29960
29958
|
} = useEmpty(props2, ctx);
|
29961
29959
|
useNodeDrag(props2, ctx, root, flatData);
|
29962
29960
|
const renderTreeContent = (scopedData) => {
|
29961
|
+
var _a, _b, _c;
|
29963
29962
|
if (scopedData.length) {
|
29964
29963
|
return scopedData.map(renderTreeNode);
|
29965
29964
|
}
|
29966
29965
|
const emptyType = isSearchActive.value ? "search-empty" : "empty";
|
29967
|
-
return renderEmpty(emptyType);
|
29966
|
+
return (_c = (_b = (_a = ctx.slots).empty) == null ? void 0 : _b.call(_a)) != null ? _c : renderEmpty(emptyType);
|
29968
29967
|
};
|
29969
29968
|
return () => createVNode(BkVirtualRender, {
|
29970
29969
|
"class": resolveClassName("tree"),
|
@@ -39201,9 +39200,6 @@ var SearchSelectInput = defineComponent({
|
|
39201
39200
|
return;
|
39202
39201
|
}
|
39203
39202
|
usingItem.value.addValue(item);
|
39204
|
-
if (usingItem.value.multiple) {
|
39205
|
-
keyword.value = "";
|
39206
|
-
}
|
39207
39203
|
const res = await validateUsingItemValues(item);
|
39208
39204
|
if (!res)
|
39209
39205
|
return;
|
@@ -39622,7 +39618,7 @@ var Component = defineComponent({
|
|
39622
39618
|
}) {
|
39623
39619
|
const t2 = useLocale("searchSelect");
|
39624
39620
|
const localConditions = computed(() => {
|
39625
|
-
if (props2.conditions === void 0
|
39621
|
+
if (props2.conditions === void 0) {
|
39626
39622
|
return [{
|
39627
39623
|
id: "or",
|
39628
39624
|
name: t2.value.or
|