bkui-vue 0.0.1-beta.205 → 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 +53 -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.d.ts +4 -2
- package/lib/date-picker/date-picker.variable.css +6 -0
- package/lib/date-picker/index.d.ts +8 -4
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/panel/time.d.ts +4 -2
- package/lib/date-picker/props.d.ts +2 -1
- package/lib/date-picker/time-picker.d.ts +4 -2
- 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/index.d.ts +8 -4
- 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();
|
@@ -23932,7 +23946,8 @@ const datePickerProps = {
|
|
23932
23946
|
default: true
|
23933
23947
|
},
|
23934
23948
|
open: {
|
23935
|
-
type: Boolean
|
23949
|
+
type: Boolean,
|
23950
|
+
default: null
|
23936
23951
|
},
|
23937
23952
|
multiple: {
|
23938
23953
|
type: Boolean,
|
@@ -36518,7 +36533,7 @@ var SearchSelectMenu = defineComponent({
|
|
36518
36533
|
render() {
|
36519
36534
|
var _a, _b, _c;
|
36520
36535
|
return createVNode("div", {
|
36521
|
-
"class": "search-select-menu"
|
36536
|
+
"class": "bk-search-select-menu"
|
36522
36537
|
}, [!!((_a = this.conditions) == null ? void 0 : _a.length) && createVNode("ul", {
|
36523
36538
|
"class": "menu-header"
|
36524
36539
|
}, [this.conditions.map((item) => createVNode("li", {
|
@@ -36556,8 +36571,8 @@ const useSearchSelectProvider = (data2) => {
|
|
36556
36571
|
};
|
36557
36572
|
const useSearchSelectInject = () => inject(SEARCH_SLECT_PROVIDER_KEY);
|
36558
36573
|
var SearchInputMode = /* @__PURE__ */ ((SearchInputMode2) => {
|
36559
|
-
SearchInputMode2[
|
36560
|
-
SearchInputMode2[
|
36574
|
+
SearchInputMode2["DEFAULT"] = "default";
|
36575
|
+
SearchInputMode2["EDIT"] = "edit";
|
36561
36576
|
return SearchInputMode2;
|
36562
36577
|
})(SearchInputMode || {});
|
36563
36578
|
class SelectedItem {
|
@@ -36657,7 +36672,7 @@ var SearchSelectInput = defineComponent({
|
|
36657
36672
|
},
|
36658
36673
|
defautUsingItem: Object,
|
36659
36674
|
mode: {
|
36660
|
-
type:
|
36675
|
+
type: String,
|
36661
36676
|
default: SearchInputMode.DEFAULT
|
36662
36677
|
},
|
36663
36678
|
geMenuList: Function,
|
@@ -37094,7 +37109,7 @@ var SearchSelectInput = defineComponent({
|
|
37094
37109
|
}
|
37095
37110
|
return ((_a2 = this.menuList) == null ? void 0 : _a2.length) ? createVNode("div", {
|
37096
37111
|
"ref": "popoverRef",
|
37097
|
-
"class": "popover
|
37112
|
+
"class": "bk-search-select-popover"
|
37098
37113
|
}, [createVNode(SearchSelectMenu, {
|
37099
37114
|
"list": this.menuList,
|
37100
37115
|
"keyword": this.keyword,
|
@@ -37191,7 +37206,7 @@ var SearchSelected = defineComponent({
|
|
37191
37206
|
},
|
37192
37207
|
render() {
|
37193
37208
|
const contentComponent = (item, index) => this.editKey === `${item.id}_${index}` ? createVNode("div", {
|
37194
|
-
"class": "
|
37209
|
+
"class": "selected-input",
|
37195
37210
|
"key": this.editKey.toString()
|
37196
37211
|
}, [createVNode(SearchSelectInput, {
|
37197
37212
|
"ref": "inputRef",
|
@@ -37207,17 +37222,17 @@ var SearchSelected = defineComponent({
|
|
37207
37222
|
"onAdd": (v2) => this.handleAddSelected(v2, index),
|
37208
37223
|
"onFocus": this.handleInputFocus
|
37209
37224
|
}, null)]) : createVNode("li", {
|
37210
|
-
"class": `search-
|
37225
|
+
"class": `search-container-selected ${!(this.overflowIndex >= 0 ? index < this.overflowIndex : index >= 0) ? "hidden-selected" : ""}`,
|
37211
37226
|
"key": `${item.id}_${index}`
|
37212
37227
|
}, [createVNode("span", {
|
37213
|
-
"class": "
|
37228
|
+
"class": "selected-name",
|
37214
37229
|
"onClick": (e) => this.handleEditSeleted(e, item, index)
|
37215
37230
|
}, [item.inputInnerText]), createVNode(close$1, {
|
37216
|
-
"class": "
|
37231
|
+
"class": "selected-clear",
|
37217
37232
|
"onClick": () => this.handleDeleteSelected(index)
|
37218
37233
|
}, null)]);
|
37219
37234
|
return createVNode(Fragment, null, [this.selectedList.map((item, index) => [this.overflowIndex >= 0 && index === this.overflowIndex && createVNode("div", {
|
37220
|
-
"class": "search-
|
37235
|
+
"class": "search-container-selected overflow-selected"
|
37221
37236
|
}, [createTextVNode("+"), this.selectedList.length - this.overflowIndex]), contentComponent(item, index)])]);
|
37222
37237
|
}
|
37223
37238
|
});
|
@@ -37312,10 +37327,10 @@ var Component = defineComponent({
|
|
37312
37327
|
deep: true
|
37313
37328
|
});
|
37314
37329
|
onMounted(() => {
|
37315
|
-
addListener(wrapRef.value.querySelector(".bk-search-select"), debounceResize);
|
37330
|
+
addListener(wrapRef.value.querySelector(".bk-search-select-container"), debounceResize);
|
37316
37331
|
});
|
37317
37332
|
onBeforeUnmount(() => {
|
37318
|
-
removeListener(wrapRef.value.querySelector(".bk-search-select"), debounceResize);
|
37333
|
+
removeListener(wrapRef.value.querySelector(".bk-search-select-container"), debounceResize);
|
37319
37334
|
});
|
37320
37335
|
useSearchSelectProvider({
|
37321
37336
|
onEditClick,
|
@@ -37345,9 +37360,9 @@ var Component = defineComponent({
|
|
37345
37360
|
overflowIndex.value = -1;
|
37346
37361
|
return;
|
37347
37362
|
}
|
37348
|
-
const inputEl = wrapRef.value.querySelector(".bk-search-select");
|
37349
|
-
const maxWidth = wrapRef.value.querySelector(".search-
|
37350
|
-
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)");
|
37351
37366
|
let width = 0;
|
37352
37367
|
let index = 0;
|
37353
37368
|
let i2 = 0;
|
@@ -37420,7 +37435,7 @@ var Component = defineComponent({
|
|
37420
37435
|
render() {
|
37421
37436
|
var _a, _b;
|
37422
37437
|
const maxHeight = `${!this.shrink || this.isFocus ? this.maxHeight : this.minHeight}px`;
|
37423
|
-
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";
|
37424
37439
|
const menuSlots = Object.assign({}, this.$slots.menu ? {
|
37425
37440
|
menu: (data2) => {
|
37426
37441
|
var _a2, _b2;
|
@@ -37428,18 +37443,18 @@ var Component = defineComponent({
|
|
37428
37443
|
}
|
37429
37444
|
} : {});
|
37430
37445
|
return createVNode("div", {
|
37431
|
-
"class": "search-select
|
37446
|
+
"class": "bk-search-select",
|
37432
37447
|
"ref": "wrapRef"
|
37433
37448
|
}, [createVNode("div", {
|
37434
37449
|
"class": {
|
37435
|
-
"bk-search-select": true,
|
37450
|
+
"bk-search-select-container": true,
|
37436
37451
|
"is-focus": this.isFocus
|
37437
37452
|
},
|
37438
37453
|
"onClick": this.handleWrapClick
|
37439
37454
|
}, [createVNode("div", {
|
37440
37455
|
"class": "search-prefix"
|
37441
37456
|
}, [(_b = (_a = this.$slots).prepend) == null ? void 0 : _b.call(_a)]), createVNode("div", {
|
37442
|
-
"class": "search-
|
37457
|
+
"class": "search-container",
|
37443
37458
|
"style": {
|
37444
37459
|
maxHeight
|
37445
37460
|
}
|
@@ -37452,7 +37467,7 @@ var Component = defineComponent({
|
|
37452
37467
|
"validateValues": this.validateValues,
|
37453
37468
|
"onDelete": this.handleDeleteSelected
|
37454
37469
|
}, __spreadValues({}, menuSlots)), createVNode("div", {
|
37455
|
-
"class": "search-
|
37470
|
+
"class": "search-container-input"
|
37456
37471
|
}, [createVNode(SearchSelectInput, {
|
37457
37472
|
"ref": "inputRef",
|
37458
37473
|
"data": this.data,
|
@@ -37473,7 +37488,7 @@ var Component = defineComponent({
|
|
37473
37488
|
}, null), this.$slots.append ? this.$slots.append() : createVNode(search, {
|
37474
37489
|
"class": `search-nextfix-icon ${this.isFocus ? "is-focus" : ""}`
|
37475
37490
|
}, null)])]), !!this.validateStr.length && createVNode("div", {
|
37476
|
-
"class": "bk-select-tips"
|
37491
|
+
"class": "bk-search-select-tips"
|
37477
37492
|
}, [this.$slots.validate ? this.$slots.validate() : createVNode(Fragment, null, [createVNode(exclamationCircleShape, {
|
37478
37493
|
"class": "select-tips"
|
37479
37494
|
}, null), this.validateStr || ""])])]);
|