bkui-vue 0.0.1-beta.206 → 0.0.1-beta.207
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 +51 -37
- 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/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.variable.css +6 -0
- 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/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
@@ -11192,17 +11192,9 @@ ClickOutside.install = (app) => {
|
|
11192
11192
|
const nodeList = /* @__PURE__ */ new Map();
|
11193
11193
|
const tooltips = {
|
11194
11194
|
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);
|
11195
|
+
const opts = getOpts(binding);
|
11196
|
+
const { trigger } = opts.value;
|
11197
|
+
const popper2 = renderContent(opts);
|
11206
11198
|
if (trigger === "hover") {
|
11207
11199
|
let hideTimeout = null;
|
11208
11200
|
el.addEventListener("mouseenter", () => {
|
@@ -11235,13 +11227,14 @@ const tooltips = {
|
|
11235
11227
|
});
|
11236
11228
|
}
|
11237
11229
|
nodeList.set(el, {
|
11238
|
-
|
11230
|
+
binding,
|
11239
11231
|
popper: popper2,
|
11240
11232
|
popperInstance: null
|
11241
11233
|
});
|
11242
11234
|
},
|
11243
11235
|
unmounted(el) {
|
11244
11236
|
hide$1(el);
|
11237
|
+
nodeList.delete(el);
|
11245
11238
|
}
|
11246
11239
|
};
|
11247
11240
|
function initOptions() {
|
@@ -11262,7 +11255,18 @@ function initOptions() {
|
|
11262
11255
|
};
|
11263
11256
|
return defaultOpts;
|
11264
11257
|
}
|
11265
|
-
function
|
11258
|
+
function getOpts(binding) {
|
11259
|
+
const opts = ref(initOptions());
|
11260
|
+
if (typeof binding.value === "object") {
|
11261
|
+
Object.assign(opts.value, binding.value);
|
11262
|
+
} else {
|
11263
|
+
opts.value.content = binding.value;
|
11264
|
+
}
|
11265
|
+
return opts;
|
11266
|
+
}
|
11267
|
+
function renderContent(opts) {
|
11268
|
+
const { content: value, arrow: hasArrow, theme, extCls } = opts.value;
|
11269
|
+
const isLight = theme === "light";
|
11266
11270
|
const zIndex = bkZIndexManager.getPopperIndex();
|
11267
11271
|
const content = document.createElement("div");
|
11268
11272
|
content.className = `bk-popper ${isLight ? "light" : "dark"} ${extCls}`;
|
@@ -11281,7 +11285,8 @@ function renderArrow() {
|
|
11281
11285
|
return arrow2;
|
11282
11286
|
}
|
11283
11287
|
function createPopperInstance(el, popper2) {
|
11284
|
-
const {
|
11288
|
+
const { binding } = nodeList.get(el);
|
11289
|
+
const { placement, distance: distance2, showOnInit } = getOpts(binding).value;
|
11285
11290
|
const popperInstance = createPopper(el, popper2, {
|
11286
11291
|
placement,
|
11287
11292
|
modifiers: [
|
@@ -11298,7 +11303,15 @@ function createPopperInstance(el, popper2) {
|
|
11298
11303
|
return popperInstance;
|
11299
11304
|
}
|
11300
11305
|
function show(el) {
|
11301
|
-
const { popper: popper2,
|
11306
|
+
const { popper: popper2, binding } = nodeList.get(el);
|
11307
|
+
const { disabled, content, arrow: hasArrow, onShow } = getOpts(binding).value;
|
11308
|
+
if (disabled)
|
11309
|
+
return;
|
11310
|
+
popper2.innerText = content;
|
11311
|
+
if (hasArrow) {
|
11312
|
+
const arrow2 = renderArrow();
|
11313
|
+
popper2.appendChild(arrow2);
|
11314
|
+
}
|
11302
11315
|
document.body.appendChild(popper2);
|
11303
11316
|
const popperInstance = createPopperInstance(el, popper2);
|
11304
11317
|
onShow();
|
@@ -11315,7 +11328,8 @@ function show(el) {
|
|
11315
11328
|
function hide$1(el) {
|
11316
11329
|
if (!nodeList.get(el))
|
11317
11330
|
return;
|
11318
|
-
const { popper: popper2, popperInstance,
|
11331
|
+
const { popper: popper2, popperInstance, binding } = nodeList.get(el);
|
11332
|
+
const { onHide } = getOpts(binding).value;
|
11319
11333
|
if (popper2 && document.body.contains(popper2)) {
|
11320
11334
|
popper2.removeAttribute("data-show");
|
11321
11335
|
popperInstance == null ? void 0 : popperInstance.destroy();
|
@@ -36519,7 +36533,7 @@ var SearchSelectMenu = defineComponent({
|
|
36519
36533
|
render() {
|
36520
36534
|
var _a, _b, _c;
|
36521
36535
|
return createVNode("div", {
|
36522
|
-
"class": "search-select-menu"
|
36536
|
+
"class": "bk-search-select-menu"
|
36523
36537
|
}, [!!((_a = this.conditions) == null ? void 0 : _a.length) && createVNode("ul", {
|
36524
36538
|
"class": "menu-header"
|
36525
36539
|
}, [this.conditions.map((item) => createVNode("li", {
|
@@ -36557,8 +36571,8 @@ const useSearchSelectProvider = (data2) => {
|
|
36557
36571
|
};
|
36558
36572
|
const useSearchSelectInject = () => inject(SEARCH_SLECT_PROVIDER_KEY);
|
36559
36573
|
var SearchInputMode = /* @__PURE__ */ ((SearchInputMode2) => {
|
36560
|
-
SearchInputMode2[
|
36561
|
-
SearchInputMode2[
|
36574
|
+
SearchInputMode2["DEFAULT"] = "default";
|
36575
|
+
SearchInputMode2["EDIT"] = "edit";
|
36562
36576
|
return SearchInputMode2;
|
36563
36577
|
})(SearchInputMode || {});
|
36564
36578
|
class SelectedItem {
|
@@ -36658,7 +36672,7 @@ var SearchSelectInput = defineComponent({
|
|
36658
36672
|
},
|
36659
36673
|
defautUsingItem: Object,
|
36660
36674
|
mode: {
|
36661
|
-
type:
|
36675
|
+
type: String,
|
36662
36676
|
default: SearchInputMode.DEFAULT
|
36663
36677
|
},
|
36664
36678
|
geMenuList: Function,
|
@@ -37095,7 +37109,7 @@ var SearchSelectInput = defineComponent({
|
|
37095
37109
|
}
|
37096
37110
|
return ((_a2 = this.menuList) == null ? void 0 : _a2.length) ? createVNode("div", {
|
37097
37111
|
"ref": "popoverRef",
|
37098
|
-
"class": "popover
|
37112
|
+
"class": "bk-search-select-popover"
|
37099
37113
|
}, [createVNode(SearchSelectMenu, {
|
37100
37114
|
"list": this.menuList,
|
37101
37115
|
"keyword": this.keyword,
|
@@ -37192,7 +37206,7 @@ var SearchSelected = defineComponent({
|
|
37192
37206
|
},
|
37193
37207
|
render() {
|
37194
37208
|
const contentComponent = (item, index) => this.editKey === `${item.id}_${index}` ? createVNode("div", {
|
37195
|
-
"class": "
|
37209
|
+
"class": "selected-input",
|
37196
37210
|
"key": this.editKey.toString()
|
37197
37211
|
}, [createVNode(SearchSelectInput, {
|
37198
37212
|
"ref": "inputRef",
|
@@ -37208,17 +37222,17 @@ var SearchSelected = defineComponent({
|
|
37208
37222
|
"onAdd": (v2) => this.handleAddSelected(v2, index),
|
37209
37223
|
"onFocus": this.handleInputFocus
|
37210
37224
|
}, null)]) : createVNode("li", {
|
37211
|
-
"class": `search-
|
37225
|
+
"class": `search-container-selected ${!(this.overflowIndex >= 0 ? index < this.overflowIndex : index >= 0) ? "hidden-selected" : ""}`,
|
37212
37226
|
"key": `${item.id}_${index}`
|
37213
37227
|
}, [createVNode("span", {
|
37214
|
-
"class": "
|
37228
|
+
"class": "selected-name",
|
37215
37229
|
"onClick": (e) => this.handleEditSeleted(e, item, index)
|
37216
37230
|
}, [item.inputInnerText]), createVNode(close$1, {
|
37217
|
-
"class": "
|
37231
|
+
"class": "selected-clear",
|
37218
37232
|
"onClick": () => this.handleDeleteSelected(index)
|
37219
37233
|
}, null)]);
|
37220
37234
|
return createVNode(Fragment, null, [this.selectedList.map((item, index) => [this.overflowIndex >= 0 && index === this.overflowIndex && createVNode("div", {
|
37221
|
-
"class": "search-
|
37235
|
+
"class": "search-container-selected overflow-selected"
|
37222
37236
|
}, [createTextVNode("+"), this.selectedList.length - this.overflowIndex]), contentComponent(item, index)])]);
|
37223
37237
|
}
|
37224
37238
|
});
|
@@ -37313,10 +37327,10 @@ var Component = defineComponent({
|
|
37313
37327
|
deep: true
|
37314
37328
|
});
|
37315
37329
|
onMounted(() => {
|
37316
|
-
addListener(wrapRef.value.querySelector(".bk-search-select"), debounceResize);
|
37330
|
+
addListener(wrapRef.value.querySelector(".bk-search-select-container"), debounceResize);
|
37317
37331
|
});
|
37318
37332
|
onBeforeUnmount(() => {
|
37319
|
-
removeListener(wrapRef.value.querySelector(".bk-search-select"), debounceResize);
|
37333
|
+
removeListener(wrapRef.value.querySelector(".bk-search-select-container"), debounceResize);
|
37320
37334
|
});
|
37321
37335
|
useSearchSelectProvider({
|
37322
37336
|
onEditClick,
|
@@ -37346,9 +37360,9 @@ var Component = defineComponent({
|
|
37346
37360
|
overflowIndex.value = -1;
|
37347
37361
|
return;
|
37348
37362
|
}
|
37349
|
-
const inputEl = wrapRef.value.querySelector(".bk-search-select");
|
37350
|
-
const maxWidth = wrapRef.value.querySelector(".search-
|
37351
|
-
const tagList = inputEl.querySelectorAll(".search-
|
37363
|
+
const inputEl = wrapRef.value.querySelector(".bk-search-select-container");
|
37364
|
+
const maxWidth = wrapRef.value.querySelector(".search-container").clientWidth - SELETED_MARGING_RIGHT - 2;
|
37365
|
+
const tagList = inputEl.querySelectorAll(".search-container-selected:not(.overflow-selected)");
|
37352
37366
|
let width = 0;
|
37353
37367
|
let index = 0;
|
37354
37368
|
let i2 = 0;
|
@@ -37421,7 +37435,7 @@ var Component = defineComponent({
|
|
37421
37435
|
render() {
|
37422
37436
|
var _a, _b;
|
37423
37437
|
const maxHeight = `${!this.shrink || this.isFocus ? this.maxHeight : this.minHeight}px`;
|
37424
|
-
const showCondition = this.selectedList.length && this.selectedList.slice(-1)[0].type !== "condition";
|
37438
|
+
const showCondition = !!this.selectedList.length && this.selectedList.slice(-1)[0].type !== "condition";
|
37425
37439
|
const menuSlots = Object.assign({}, this.$slots.menu ? {
|
37426
37440
|
menu: (data2) => {
|
37427
37441
|
var _a2, _b2;
|
@@ -37429,18 +37443,18 @@ var Component = defineComponent({
|
|
37429
37443
|
}
|
37430
37444
|
} : {});
|
37431
37445
|
return createVNode("div", {
|
37432
|
-
"class": "search-select
|
37446
|
+
"class": "bk-search-select",
|
37433
37447
|
"ref": "wrapRef"
|
37434
37448
|
}, [createVNode("div", {
|
37435
37449
|
"class": {
|
37436
|
-
"bk-search-select": true,
|
37450
|
+
"bk-search-select-container": true,
|
37437
37451
|
"is-focus": this.isFocus
|
37438
37452
|
},
|
37439
37453
|
"onClick": this.handleWrapClick
|
37440
37454
|
}, [createVNode("div", {
|
37441
37455
|
"class": "search-prefix"
|
37442
37456
|
}, [(_b = (_a = this.$slots).prepend) == null ? void 0 : _b.call(_a)]), createVNode("div", {
|
37443
|
-
"class": "search-
|
37457
|
+
"class": "search-container",
|
37444
37458
|
"style": {
|
37445
37459
|
maxHeight
|
37446
37460
|
}
|
@@ -37453,7 +37467,7 @@ var Component = defineComponent({
|
|
37453
37467
|
"validateValues": this.validateValues,
|
37454
37468
|
"onDelete": this.handleDeleteSelected
|
37455
37469
|
}, __spreadValues({}, menuSlots)), createVNode("div", {
|
37456
|
-
"class": "search-
|
37470
|
+
"class": "search-container-input"
|
37457
37471
|
}, [createVNode(SearchSelectInput, {
|
37458
37472
|
"ref": "inputRef",
|
37459
37473
|
"data": this.data,
|
@@ -37474,7 +37488,7 @@ var Component = defineComponent({
|
|
37474
37488
|
}, null), this.$slots.append ? this.$slots.append() : createVNode(search, {
|
37475
37489
|
"class": `search-nextfix-icon ${this.isFocus ? "is-focus" : ""}`
|
37476
37490
|
}, null)])]), !!this.validateStr.length && createVNode("div", {
|
37477
|
-
"class": "bk-select-tips"
|
37491
|
+
"class": "bk-search-select-tips"
|
37478
37492
|
}, [this.$slots.validate ? this.$slots.validate() : createVNode(Fragment, null, [createVNode(exclamationCircleShape, {
|
37479
37493
|
"class": "select-tips"
|
37480
37494
|
}, null), this.validateStr || ""])])]);
|