bkui-vue 0.0.1-beta.206 → 0.0.1-beta.208
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 +25 -25
- package/dist/index.esm.js +55 -38
- package/dist/index.umd.js +25 -25
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +6 -0
- package/lib/alert/alert.variable.css +6 -0
- package/lib/backtop/backtop.variable.css +6 -0
- package/lib/badge/badge.variable.css +6 -0
- package/lib/breadcrumb/breadcrumb.variable.css +6 -0
- package/lib/button/button.variable.css +6 -0
- package/lib/card/card.variable.css +6 -0
- package/lib/cascader/cascader.variable.css +6 -0
- package/lib/checkbox/checkbox.variable.css +6 -0
- package/lib/code-diff/code-diff.variable.css +6 -0
- package/lib/collapse/collapse.variable.css +6 -0
- package/lib/color-picker/color-picker.variable.css +6 -0
- package/lib/container/container.variable.css +6 -0
- package/lib/date-picker/date-picker.variable.css +6 -0
- package/lib/directives/index.js +1 -1
- package/lib/divider/divider.variable.css +6 -0
- package/lib/dropdown/dropdown.variable.css +6 -0
- package/lib/exception/exception.variable.css +6 -0
- package/lib/fixed-navbar/fixed-navbar.variable.css +6 -0
- package/lib/form/form.variable.css +6 -0
- package/lib/input/index.js +1 -1
- package/lib/input/input.variable.css +6 -0
- package/lib/link/link.variable.css +6 -0
- package/lib/loading/loading.variable.css +6 -0
- package/lib/menu/menu.variable.css +6 -0
- package/lib/menu/submenu.variable.css +6 -0
- package/lib/message/message.variable.css +6 -0
- package/lib/navigation/navigation.variable.css +6 -0
- package/lib/notify/notify.variable.css +6 -0
- package/lib/pagination/pagination.variable.css +6 -0
- package/lib/popover/index.d.ts +7 -7
- package/lib/popover/popover.d.ts +2 -2
- package/lib/popover/popover.variable.css +6 -0
- package/lib/popover2/index.d.ts +7 -7
- package/lib/popover2/popover2.d.ts +2 -2
- package/lib/popover2/popover2.variable.css +6 -0
- package/lib/process/process.variable.css +6 -0
- package/lib/progress/progress.variable.css +6 -0
- package/lib/radio/radio.variable.css +6 -0
- package/lib/resize-layout/resize-layout.css +3 -3
- package/lib/resize-layout/resize-layout.less +3 -3
- package/lib/resize-layout/resize-layout.variable.css +9 -3
- package/lib/search-select/index.js +1 -1
- package/lib/search-select/search-select.css +196 -199
- package/lib/search-select/search-select.less +195 -47
- package/lib/search-select/search-select.variable.css +217 -214
- package/lib/search-select/utils.d.ts +2 -2
- package/lib/select/index.d.ts +4 -4
- package/lib/select/index.js +1 -1
- package/lib/select/select.d.ts +1 -1
- package/lib/select/select.variable.css +6 -0
- package/lib/sideslider/sideslider.variable.css +6 -0
- package/lib/slider/slider.variable.css +6 -0
- package/lib/steps/steps.variable.css +6 -0
- package/lib/styles/mixins/scroll.variable.css +6 -0
- package/lib/styles/themes/themes.less +9 -0
- package/lib/switcher/switcher.variable.css +6 -0
- package/lib/tab/tab.variable.css +6 -0
- package/lib/table/plugins/head-filter.variable.css +6 -0
- package/lib/table/plugins/head-sort.variable.css +6 -0
- package/lib/table/plugins/settings.variable.css +6 -0
- package/lib/table/table.variable.css +6 -0
- package/lib/tag/tag.variable.css +6 -0
- package/lib/tag-input/tag-input.variable.css +6 -0
- package/lib/time-picker/time-picker.variable.css +6 -0
- package/lib/timeline/timeline.variable.css +6 -0
- package/lib/transfer/transfer.variable.css +6 -0
- package/lib/tree/tree.variable.css +6 -0
- package/lib/upload/upload.variable.css +6 -0
- package/lib/virtual-render/virtual-render.variable.css +6 -0
- package/package.json +1 -1
- package/lib/search-select/menu.css +0 -145
- package/lib/search-select/menu.less +0 -134
- package/lib/search-select/menu.variable.css +0 -145
- package/lib/search-select/selected.css +0 -21
- package/lib/search-select/selected.less +0 -24
- package/lib/search-select/selected.variable.css +0 -21
package/dist/index.esm.js
CHANGED
@@ -9435,7 +9435,9 @@ var Component$y = defineComponent({
|
|
9435
9435
|
ctx.emit(EVENTS$2.UPDATE, val);
|
9436
9436
|
ctx.emit(EVENTS$2.CHANGE, val);
|
9437
9437
|
}
|
9438
|
-
(
|
9438
|
+
if (props2.withValidate) {
|
9439
|
+
(_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "blur");
|
9440
|
+
}
|
9439
9441
|
}
|
9440
9442
|
function eventHandler(eventName) {
|
9441
9443
|
return (e) => {
|
@@ -11192,17 +11194,9 @@ ClickOutside.install = (app) => {
|
|
11192
11194
|
const nodeList = /* @__PURE__ */ new Map();
|
11193
11195
|
const tooltips = {
|
11194
11196
|
beforeMount(el, binding) {
|
11195
|
-
const opts =
|
11196
|
-
|
11197
|
-
|
11198
|
-
} else {
|
11199
|
-
opts.content = binding.value;
|
11200
|
-
}
|
11201
|
-
const { disabled, trigger, content, arrow: arrow2, theme, extCls } = opts;
|
11202
|
-
if (disabled) {
|
11203
|
-
return;
|
11204
|
-
}
|
11205
|
-
const popper2 = renderContent(content, arrow2, theme === "light", extCls);
|
11197
|
+
const opts = getOpts(binding);
|
11198
|
+
const { trigger } = opts.value;
|
11199
|
+
const popper2 = renderContent(opts);
|
11206
11200
|
if (trigger === "hover") {
|
11207
11201
|
let hideTimeout = null;
|
11208
11202
|
el.addEventListener("mouseenter", () => {
|
@@ -11235,13 +11229,14 @@ const tooltips = {
|
|
11235
11229
|
});
|
11236
11230
|
}
|
11237
11231
|
nodeList.set(el, {
|
11238
|
-
|
11232
|
+
binding,
|
11239
11233
|
popper: popper2,
|
11240
11234
|
popperInstance: null
|
11241
11235
|
});
|
11242
11236
|
},
|
11243
11237
|
unmounted(el) {
|
11244
11238
|
hide$1(el);
|
11239
|
+
nodeList.delete(el);
|
11245
11240
|
}
|
11246
11241
|
};
|
11247
11242
|
function initOptions() {
|
@@ -11262,7 +11257,18 @@ function initOptions() {
|
|
11262
11257
|
};
|
11263
11258
|
return defaultOpts;
|
11264
11259
|
}
|
11265
|
-
function
|
11260
|
+
function getOpts(binding) {
|
11261
|
+
const opts = ref(initOptions());
|
11262
|
+
if (typeof binding.value === "object") {
|
11263
|
+
Object.assign(opts.value, binding.value);
|
11264
|
+
} else {
|
11265
|
+
opts.value.content = binding.value;
|
11266
|
+
}
|
11267
|
+
return opts;
|
11268
|
+
}
|
11269
|
+
function renderContent(opts) {
|
11270
|
+
const { content: value, arrow: hasArrow, theme, extCls } = opts.value;
|
11271
|
+
const isLight = theme === "light";
|
11266
11272
|
const zIndex = bkZIndexManager.getPopperIndex();
|
11267
11273
|
const content = document.createElement("div");
|
11268
11274
|
content.className = `bk-popper ${isLight ? "light" : "dark"} ${extCls}`;
|
@@ -11281,7 +11287,8 @@ function renderArrow() {
|
|
11281
11287
|
return arrow2;
|
11282
11288
|
}
|
11283
11289
|
function createPopperInstance(el, popper2) {
|
11284
|
-
const {
|
11290
|
+
const { binding } = nodeList.get(el);
|
11291
|
+
const { placement, distance: distance2, showOnInit } = getOpts(binding).value;
|
11285
11292
|
const popperInstance = createPopper(el, popper2, {
|
11286
11293
|
placement,
|
11287
11294
|
modifiers: [
|
@@ -11298,7 +11305,15 @@ function createPopperInstance(el, popper2) {
|
|
11298
11305
|
return popperInstance;
|
11299
11306
|
}
|
11300
11307
|
function show(el) {
|
11301
|
-
const { popper: popper2,
|
11308
|
+
const { popper: popper2, binding } = nodeList.get(el);
|
11309
|
+
const { disabled, content, arrow: hasArrow, onShow } = getOpts(binding).value;
|
11310
|
+
if (disabled)
|
11311
|
+
return;
|
11312
|
+
popper2.innerText = content;
|
11313
|
+
if (hasArrow) {
|
11314
|
+
const arrow2 = renderArrow();
|
11315
|
+
popper2.appendChild(arrow2);
|
11316
|
+
}
|
11302
11317
|
document.body.appendChild(popper2);
|
11303
11318
|
const popperInstance = createPopperInstance(el, popper2);
|
11304
11319
|
onShow();
|
@@ -11315,7 +11330,8 @@ function show(el) {
|
|
11315
11330
|
function hide$1(el) {
|
11316
11331
|
if (!nodeList.get(el))
|
11317
11332
|
return;
|
11318
|
-
const { popper: popper2, popperInstance,
|
11333
|
+
const { popper: popper2, popperInstance, binding } = nodeList.get(el);
|
11334
|
+
const { onHide } = getOpts(binding).value;
|
11319
11335
|
if (popper2 && document.body.contains(popper2)) {
|
11320
11336
|
popper2.removeAttribute("data-show");
|
11321
11337
|
popperInstance == null ? void 0 : popperInstance.destroy();
|
@@ -15613,6 +15629,7 @@ var Component$j = defineComponent({
|
|
15613
15629
|
"disabled": this.isDisabled,
|
15614
15630
|
"behavior": this.behavior,
|
15615
15631
|
"size": this.size,
|
15632
|
+
"withValidate": false,
|
15616
15633
|
"onInput": this.handleInputChange,
|
15617
15634
|
"onEnter": this.handleInputEnter
|
15618
15635
|
}, {
|
@@ -36519,7 +36536,7 @@ var SearchSelectMenu = defineComponent({
|
|
36519
36536
|
render() {
|
36520
36537
|
var _a, _b, _c;
|
36521
36538
|
return createVNode("div", {
|
36522
|
-
"class": "search-select-menu"
|
36539
|
+
"class": "bk-search-select-menu"
|
36523
36540
|
}, [!!((_a = this.conditions) == null ? void 0 : _a.length) && createVNode("ul", {
|
36524
36541
|
"class": "menu-header"
|
36525
36542
|
}, [this.conditions.map((item) => createVNode("li", {
|
@@ -36557,8 +36574,8 @@ const useSearchSelectProvider = (data2) => {
|
|
36557
36574
|
};
|
36558
36575
|
const useSearchSelectInject = () => inject(SEARCH_SLECT_PROVIDER_KEY);
|
36559
36576
|
var SearchInputMode = /* @__PURE__ */ ((SearchInputMode2) => {
|
36560
|
-
SearchInputMode2[
|
36561
|
-
SearchInputMode2[
|
36577
|
+
SearchInputMode2["DEFAULT"] = "default";
|
36578
|
+
SearchInputMode2["EDIT"] = "edit";
|
36562
36579
|
return SearchInputMode2;
|
36563
36580
|
})(SearchInputMode || {});
|
36564
36581
|
class SelectedItem {
|
@@ -36658,7 +36675,7 @@ var SearchSelectInput = defineComponent({
|
|
36658
36675
|
},
|
36659
36676
|
defautUsingItem: Object,
|
36660
36677
|
mode: {
|
36661
|
-
type:
|
36678
|
+
type: String,
|
36662
36679
|
default: SearchInputMode.DEFAULT
|
36663
36680
|
},
|
36664
36681
|
geMenuList: Function,
|
@@ -37095,7 +37112,7 @@ var SearchSelectInput = defineComponent({
|
|
37095
37112
|
}
|
37096
37113
|
return ((_a2 = this.menuList) == null ? void 0 : _a2.length) ? createVNode("div", {
|
37097
37114
|
"ref": "popoverRef",
|
37098
|
-
"class": "popover
|
37115
|
+
"class": "bk-search-select-popover"
|
37099
37116
|
}, [createVNode(SearchSelectMenu, {
|
37100
37117
|
"list": this.menuList,
|
37101
37118
|
"keyword": this.keyword,
|
@@ -37192,7 +37209,7 @@ var SearchSelected = defineComponent({
|
|
37192
37209
|
},
|
37193
37210
|
render() {
|
37194
37211
|
const contentComponent = (item, index) => this.editKey === `${item.id}_${index}` ? createVNode("div", {
|
37195
|
-
"class": "
|
37212
|
+
"class": "selected-input",
|
37196
37213
|
"key": this.editKey.toString()
|
37197
37214
|
}, [createVNode(SearchSelectInput, {
|
37198
37215
|
"ref": "inputRef",
|
@@ -37208,17 +37225,17 @@ var SearchSelected = defineComponent({
|
|
37208
37225
|
"onAdd": (v2) => this.handleAddSelected(v2, index),
|
37209
37226
|
"onFocus": this.handleInputFocus
|
37210
37227
|
}, null)]) : createVNode("li", {
|
37211
|
-
"class": `search-
|
37228
|
+
"class": `search-container-selected ${!(this.overflowIndex >= 0 ? index < this.overflowIndex : index >= 0) ? "hidden-selected" : ""}`,
|
37212
37229
|
"key": `${item.id}_${index}`
|
37213
37230
|
}, [createVNode("span", {
|
37214
|
-
"class": "
|
37231
|
+
"class": "selected-name",
|
37215
37232
|
"onClick": (e) => this.handleEditSeleted(e, item, index)
|
37216
37233
|
}, [item.inputInnerText]), createVNode(close$1, {
|
37217
|
-
"class": "
|
37234
|
+
"class": "selected-clear",
|
37218
37235
|
"onClick": () => this.handleDeleteSelected(index)
|
37219
37236
|
}, null)]);
|
37220
37237
|
return createVNode(Fragment, null, [this.selectedList.map((item, index) => [this.overflowIndex >= 0 && index === this.overflowIndex && createVNode("div", {
|
37221
|
-
"class": "search-
|
37238
|
+
"class": "search-container-selected overflow-selected"
|
37222
37239
|
}, [createTextVNode("+"), this.selectedList.length - this.overflowIndex]), contentComponent(item, index)])]);
|
37223
37240
|
}
|
37224
37241
|
});
|
@@ -37313,10 +37330,10 @@ var Component = defineComponent({
|
|
37313
37330
|
deep: true
|
37314
37331
|
});
|
37315
37332
|
onMounted(() => {
|
37316
|
-
addListener(wrapRef.value.querySelector(".bk-search-select"), debounceResize);
|
37333
|
+
addListener(wrapRef.value.querySelector(".bk-search-select-container"), debounceResize);
|
37317
37334
|
});
|
37318
37335
|
onBeforeUnmount(() => {
|
37319
|
-
removeListener(wrapRef.value.querySelector(".bk-search-select"), debounceResize);
|
37336
|
+
removeListener(wrapRef.value.querySelector(".bk-search-select-container"), debounceResize);
|
37320
37337
|
});
|
37321
37338
|
useSearchSelectProvider({
|
37322
37339
|
onEditClick,
|
@@ -37346,9 +37363,9 @@ var Component = defineComponent({
|
|
37346
37363
|
overflowIndex.value = -1;
|
37347
37364
|
return;
|
37348
37365
|
}
|
37349
|
-
const inputEl = wrapRef.value.querySelector(".bk-search-select");
|
37350
|
-
const maxWidth = wrapRef.value.querySelector(".search-
|
37351
|
-
const tagList = inputEl.querySelectorAll(".search-
|
37366
|
+
const inputEl = wrapRef.value.querySelector(".bk-search-select-container");
|
37367
|
+
const maxWidth = wrapRef.value.querySelector(".search-container").clientWidth - SELETED_MARGING_RIGHT - 2;
|
37368
|
+
const tagList = inputEl.querySelectorAll(".search-container-selected:not(.overflow-selected)");
|
37352
37369
|
let width = 0;
|
37353
37370
|
let index = 0;
|
37354
37371
|
let i2 = 0;
|
@@ -37421,7 +37438,7 @@ var Component = defineComponent({
|
|
37421
37438
|
render() {
|
37422
37439
|
var _a, _b;
|
37423
37440
|
const maxHeight = `${!this.shrink || this.isFocus ? this.maxHeight : this.minHeight}px`;
|
37424
|
-
const showCondition = this.selectedList.length && this.selectedList.slice(-1)[0].type !== "condition";
|
37441
|
+
const showCondition = !!this.selectedList.length && this.selectedList.slice(-1)[0].type !== "condition";
|
37425
37442
|
const menuSlots = Object.assign({}, this.$slots.menu ? {
|
37426
37443
|
menu: (data2) => {
|
37427
37444
|
var _a2, _b2;
|
@@ -37429,18 +37446,18 @@ var Component = defineComponent({
|
|
37429
37446
|
}
|
37430
37447
|
} : {});
|
37431
37448
|
return createVNode("div", {
|
37432
|
-
"class": "search-select
|
37449
|
+
"class": "bk-search-select",
|
37433
37450
|
"ref": "wrapRef"
|
37434
37451
|
}, [createVNode("div", {
|
37435
37452
|
"class": {
|
37436
|
-
"bk-search-select": true,
|
37453
|
+
"bk-search-select-container": true,
|
37437
37454
|
"is-focus": this.isFocus
|
37438
37455
|
},
|
37439
37456
|
"onClick": this.handleWrapClick
|
37440
37457
|
}, [createVNode("div", {
|
37441
37458
|
"class": "search-prefix"
|
37442
37459
|
}, [(_b = (_a = this.$slots).prepend) == null ? void 0 : _b.call(_a)]), createVNode("div", {
|
37443
|
-
"class": "search-
|
37460
|
+
"class": "search-container",
|
37444
37461
|
"style": {
|
37445
37462
|
maxHeight
|
37446
37463
|
}
|
@@ -37453,7 +37470,7 @@ var Component = defineComponent({
|
|
37453
37470
|
"validateValues": this.validateValues,
|
37454
37471
|
"onDelete": this.handleDeleteSelected
|
37455
37472
|
}, __spreadValues({}, menuSlots)), createVNode("div", {
|
37456
|
-
"class": "search-
|
37473
|
+
"class": "search-container-input"
|
37457
37474
|
}, [createVNode(SearchSelectInput, {
|
37458
37475
|
"ref": "inputRef",
|
37459
37476
|
"data": this.data,
|
@@ -37474,7 +37491,7 @@ var Component = defineComponent({
|
|
37474
37491
|
}, null), this.$slots.append ? this.$slots.append() : createVNode(search, {
|
37475
37492
|
"class": `search-nextfix-icon ${this.isFocus ? "is-focus" : ""}`
|
37476
37493
|
}, null)])]), !!this.validateStr.length && createVNode("div", {
|
37477
|
-
"class": "bk-select-tips"
|
37494
|
+
"class": "bk-search-select-tips"
|
37478
37495
|
}, [this.$slots.validate ? this.$slots.validate() : createVNode(Fragment, null, [createVNode(exclamationCircleShape, {
|
37479
37496
|
"class": "select-tips"
|
37480
37497
|
}, null), this.validateStr || ""])])]);
|