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.
Files changed (82) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +55 -38
  3. package/dist/index.umd.js +25 -25
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/affix.variable.css +6 -0
  7. package/lib/alert/alert.variable.css +6 -0
  8. package/lib/backtop/backtop.variable.css +6 -0
  9. package/lib/badge/badge.variable.css +6 -0
  10. package/lib/breadcrumb/breadcrumb.variable.css +6 -0
  11. package/lib/button/button.variable.css +6 -0
  12. package/lib/card/card.variable.css +6 -0
  13. package/lib/cascader/cascader.variable.css +6 -0
  14. package/lib/checkbox/checkbox.variable.css +6 -0
  15. package/lib/code-diff/code-diff.variable.css +6 -0
  16. package/lib/collapse/collapse.variable.css +6 -0
  17. package/lib/color-picker/color-picker.variable.css +6 -0
  18. package/lib/container/container.variable.css +6 -0
  19. package/lib/date-picker/date-picker.variable.css +6 -0
  20. package/lib/directives/index.js +1 -1
  21. package/lib/divider/divider.variable.css +6 -0
  22. package/lib/dropdown/dropdown.variable.css +6 -0
  23. package/lib/exception/exception.variable.css +6 -0
  24. package/lib/fixed-navbar/fixed-navbar.variable.css +6 -0
  25. package/lib/form/form.variable.css +6 -0
  26. package/lib/input/index.js +1 -1
  27. package/lib/input/input.variable.css +6 -0
  28. package/lib/link/link.variable.css +6 -0
  29. package/lib/loading/loading.variable.css +6 -0
  30. package/lib/menu/menu.variable.css +6 -0
  31. package/lib/menu/submenu.variable.css +6 -0
  32. package/lib/message/message.variable.css +6 -0
  33. package/lib/navigation/navigation.variable.css +6 -0
  34. package/lib/notify/notify.variable.css +6 -0
  35. package/lib/pagination/pagination.variable.css +6 -0
  36. package/lib/popover/index.d.ts +7 -7
  37. package/lib/popover/popover.d.ts +2 -2
  38. package/lib/popover/popover.variable.css +6 -0
  39. package/lib/popover2/index.d.ts +7 -7
  40. package/lib/popover2/popover2.d.ts +2 -2
  41. package/lib/popover2/popover2.variable.css +6 -0
  42. package/lib/process/process.variable.css +6 -0
  43. package/lib/progress/progress.variable.css +6 -0
  44. package/lib/radio/radio.variable.css +6 -0
  45. package/lib/resize-layout/resize-layout.css +3 -3
  46. package/lib/resize-layout/resize-layout.less +3 -3
  47. package/lib/resize-layout/resize-layout.variable.css +9 -3
  48. package/lib/search-select/index.js +1 -1
  49. package/lib/search-select/search-select.css +196 -199
  50. package/lib/search-select/search-select.less +195 -47
  51. package/lib/search-select/search-select.variable.css +217 -214
  52. package/lib/search-select/utils.d.ts +2 -2
  53. package/lib/select/index.d.ts +4 -4
  54. package/lib/select/index.js +1 -1
  55. package/lib/select/select.d.ts +1 -1
  56. package/lib/select/select.variable.css +6 -0
  57. package/lib/sideslider/sideslider.variable.css +6 -0
  58. package/lib/slider/slider.variable.css +6 -0
  59. package/lib/steps/steps.variable.css +6 -0
  60. package/lib/styles/mixins/scroll.variable.css +6 -0
  61. package/lib/styles/themes/themes.less +9 -0
  62. package/lib/switcher/switcher.variable.css +6 -0
  63. package/lib/tab/tab.variable.css +6 -0
  64. package/lib/table/plugins/head-filter.variable.css +6 -0
  65. package/lib/table/plugins/head-sort.variable.css +6 -0
  66. package/lib/table/plugins/settings.variable.css +6 -0
  67. package/lib/table/table.variable.css +6 -0
  68. package/lib/tag/tag.variable.css +6 -0
  69. package/lib/tag-input/tag-input.variable.css +6 -0
  70. package/lib/time-picker/time-picker.variable.css +6 -0
  71. package/lib/timeline/timeline.variable.css +6 -0
  72. package/lib/transfer/transfer.variable.css +6 -0
  73. package/lib/tree/tree.variable.css +6 -0
  74. package/lib/upload/upload.variable.css +6 -0
  75. package/lib/virtual-render/virtual-render.variable.css +6 -0
  76. package/package.json +1 -1
  77. package/lib/search-select/menu.css +0 -145
  78. package/lib/search-select/menu.less +0 -134
  79. package/lib/search-select/menu.variable.css +0 -145
  80. package/lib/search-select/selected.css +0 -21
  81. package/lib/search-select/selected.less +0 -24
  82. 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
- (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "blur");
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 = initOptions();
11196
- if (typeof binding.value === "object") {
11197
- Object.assign(opts, binding.value);
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
- opts,
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 renderContent(value, hasArrow, isLight, extCls) {
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 { placement, distance: distance2, showOnInit } = nodeList.get(el).opts;
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, opts: { onShow } } = nodeList.get(el);
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, opts: { onHide } } = nodeList.get(el);
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[SearchInputMode2["DEFAULT"] = 0] = "DEFAULT";
36561
- SearchInputMode2[SearchInputMode2["EDIT"] = 1] = "EDIT";
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: Object,
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-content"
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": "search-seleted-input",
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-input-chip ${!(this.overflowIndex >= 0 ? index < this.overflowIndex : index >= 0) ? "hidden-chip" : ""}`,
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": "chip-name",
37231
+ "class": "selected-name",
37215
37232
  "onClick": (e) => this.handleEditSeleted(e, item, index)
37216
37233
  }, [item.inputInnerText]), createVNode(close$1, {
37217
- "class": "chip-clear",
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-input-chip overflow-chip"
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-input").clientWidth - SELETED_MARGING_RIGHT - 2;
37351
- const tagList = inputEl.querySelectorAll(".search-input-chip:not(.overflow-chip)");
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-wrap",
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-input",
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-input-input"
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 || ""])])]);