bkui-vue 0.0.1-beta.138 → 0.0.1-beta.140

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 (81) hide show
  1. package/dist/index.cjs.js +28 -28
  2. package/dist/index.esm.js +66 -36
  3. package/dist/index.umd.js +33 -33
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/affix.variable.css +11 -0
  7. package/lib/alert/alert.variable.css +11 -0
  8. package/lib/backtop/backtop.variable.css +11 -0
  9. package/lib/badge/badge.variable.css +11 -0
  10. package/lib/breadcrumb/breadcrumb.variable.css +11 -0
  11. package/lib/button/button.less +7 -7
  12. package/lib/button/button.variable.css +11 -0
  13. package/lib/card/card.variable.css +11 -0
  14. package/lib/cascader/cascader.d.ts +4 -1
  15. package/lib/cascader/cascader.variable.css +11 -0
  16. package/lib/cascader/index.d.ts +15 -3
  17. package/lib/cascader/index.js +1 -1
  18. package/lib/checkbox/checkbox.variable.css +11 -0
  19. package/lib/code-diff/code-diff.variable.css +11 -0
  20. package/lib/collapse/collapse.variable.css +11 -0
  21. package/lib/container/container.variable.css +11 -0
  22. package/lib/date-picker/date-picker.variable.css +11 -0
  23. package/lib/divider/divider.variable.css +11 -0
  24. package/lib/dropdown/dropdown.variable.css +11 -0
  25. package/lib/exception/exception.variable.css +11 -0
  26. package/lib/fixed-navbar/fixed-navbar.variable.css +11 -0
  27. package/lib/form/form.variable.css +11 -0
  28. package/lib/input/input.variable.css +11 -0
  29. package/lib/link/link.variable.css +11 -0
  30. package/lib/loading/loading.variable.css +11 -0
  31. package/lib/menu/menu.variable.css +11 -0
  32. package/lib/menu/submenu.variable.css +11 -0
  33. package/lib/message/index.js +1 -1
  34. package/lib/message/message.css +8 -1
  35. package/lib/message/message.less +9 -1
  36. package/lib/message/message.variable.css +19 -1
  37. package/lib/message/messageConstructor.d.ts +2 -2
  38. package/lib/navigation/navigation.variable.css +11 -0
  39. package/lib/notify/index.js +1 -1
  40. package/lib/notify/notify.css +7 -3
  41. package/lib/notify/notify.less +8 -3
  42. package/lib/notify/notify.variable.css +18 -3
  43. package/lib/notify/notifyConstructor.d.ts +2 -2
  44. package/lib/pagination/pagination.variable.css +11 -0
  45. package/lib/popover/popover.variable.css +11 -0
  46. package/lib/popover2/index.js +1 -1
  47. package/lib/popover2/popover2.variable.css +11 -0
  48. package/lib/process/process.variable.css +11 -0
  49. package/lib/progress/progress.variable.css +11 -0
  50. package/lib/radio/radio.css +56 -50
  51. package/lib/radio/radio.less +181 -171
  52. package/lib/radio/radio.variable.css +70 -53
  53. package/lib/resize-layout/resize-layout.variable.css +11 -0
  54. package/lib/select/select.variable.css +11 -0
  55. package/lib/sideslider/index.d.ts +43 -35
  56. package/lib/sideslider/index.js +1 -1
  57. package/lib/sideslider/sideslider.css +6 -7
  58. package/lib/sideslider/sideslider.d.ts +21 -17
  59. package/lib/sideslider/sideslider.less +6 -7
  60. package/lib/sideslider/sideslider.variable.css +17 -7
  61. package/lib/slider/slider.variable.css +11 -0
  62. package/lib/steps/steps.variable.css +11 -0
  63. package/lib/styles/mixins/scroll.variable.css +11 -0
  64. package/lib/styles/themes/themes.less +13 -0
  65. package/lib/switcher/index.js +1 -1
  66. package/lib/switcher/switcher.css +1 -1
  67. package/lib/switcher/switcher.less +1 -24
  68. package/lib/switcher/switcher.variable.css +12 -1
  69. package/lib/tab/tab.variable.css +11 -0
  70. package/lib/table/plugins/head-filter.variable.css +11 -0
  71. package/lib/table/plugins/head-sort.variable.css +11 -0
  72. package/lib/table/plugins/settings.variable.css +11 -0
  73. package/lib/table/table.variable.css +11 -0
  74. package/lib/tag/tag.variable.css +11 -0
  75. package/lib/tag-input/tag-input.variable.css +11 -0
  76. package/lib/timeline/timeline.variable.css +11 -0
  77. package/lib/transfer/transfer.variable.css +11 -0
  78. package/lib/tree/tree.variable.css +11 -0
  79. package/lib/upload/upload.variable.css +11 -0
  80. package/lib/virtual-render/virtual-render.variable.css +11 -0
  81. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -12579,8 +12579,12 @@ var useFloating = (props, ctx, refReference, refContent, refArrow, refRoot) => {
12579
12579
  const showPopover = () => {
12580
12580
  localIsShow.value = true;
12581
12581
  };
12582
+ let popShowTimerId = void 0;
12583
+ let isMouseenter = false;
12582
12584
  const hidePopover = () => {
12583
- localIsShow.value = false;
12585
+ popShowTimerId = setTimeout(() => {
12586
+ localIsShow.value = false;
12587
+ }, 100);
12584
12588
  };
12585
12589
  const hanldePopoverShow = () => {
12586
12590
  var _a;
@@ -12610,10 +12614,29 @@ var useFloating = (props, ctx, refReference, refContent, refArrow, refRoot) => {
12610
12614
  const hanldeClickRef = () => {
12611
12615
  triggerPopover();
12612
12616
  };
12617
+ const handlePopContentMouseEnter = () => {
12618
+ if (props.trigger !== "hover") {
12619
+ return;
12620
+ }
12621
+ if (popShowTimerId) {
12622
+ isMouseenter = true;
12623
+ clearTimeout(popShowTimerId);
12624
+ popShowTimerId = void 0;
12625
+ }
12626
+ };
12627
+ const handlePopContentMouseLeave = () => {
12628
+ if (isMouseenter) {
12629
+ hidePopover();
12630
+ isMouseenter = false;
12631
+ }
12632
+ };
12613
12633
  const resolveTriggerEvents = () => {
12614
12634
  var _a;
12615
12635
  const triggerEvents = {
12616
- hover: [["mouseenter", showPopover], ["mouseleave", hidePopover], ["focus", showPopover], ["blur", hidePopover]],
12636
+ hover: {
12637
+ content: [["mouseenter", handlePopContentMouseEnter], ["mouseleave", handlePopContentMouseLeave]],
12638
+ reference: [["mouseenter", showPopover], ["mouseleave", hidePopover], ["focus", showPopover], ["blur", hidePopover]]
12639
+ },
12617
12640
  click: [["click", hanldeClickRef]],
12618
12641
  manual: [[]]
12619
12642
  };
@@ -12670,6 +12693,8 @@ var usePopperId = (props, prefix = "#") => {
12670
12693
  if (!/^body$/i.test(props.boundary) && typeof props.boundary === "string") {
12671
12694
  if (!isAvailableId(props.boundary)) {
12672
12695
  console.error("props.boundary is not available selector");
12696
+ resolvedBoundary = "body";
12697
+ return;
12673
12698
  }
12674
12699
  resolvedBoundary = props.boundary;
12675
12700
  }
@@ -12763,7 +12788,7 @@ var Component$o = defineComponent({
12763
12788
  if (props.always) {
12764
12789
  showPopover();
12765
12790
  } else {
12766
- addEventToReferenceEl();
12791
+ addEventToPopTargetEl();
12767
12792
  }
12768
12793
  };
12769
12794
  if (!props.always && !props.disabled) {
@@ -12780,13 +12805,26 @@ var Component$o = defineComponent({
12780
12805
  beforeInstanceUnmount();
12781
12806
  }
12782
12807
  });
12783
- const addEventToReferenceEl = () => {
12808
+ const addEventToPopTargetEl = () => {
12784
12809
  const {
12785
- elReference
12810
+ elReference,
12811
+ elContent
12786
12812
  } = resolvePopElements();
12787
12813
  storeEvents = resolveTriggerEvents();
12788
- storeEvents.forEach(([event, listener]) => {
12789
- elReference.addEventListener(event, listener);
12814
+ if (Array.isArray(storeEvents)) {
12815
+ addEventToTargetEl(elReference, storeEvents);
12816
+ } else {
12817
+ const {
12818
+ content: content2,
12819
+ reference: reference2
12820
+ } = storeEvents;
12821
+ addEventToTargetEl(elReference, reference2);
12822
+ addEventToTargetEl(elContent, content2);
12823
+ }
12824
+ };
12825
+ const addEventToTargetEl = (target, evets) => {
12826
+ evets.forEach(([event, listener]) => {
12827
+ target.addEventListener(event, listener);
12790
12828
  });
12791
12829
  };
12792
12830
  const removeEventListener2 = () => {
@@ -14628,14 +14666,6 @@ var Component$h = defineComponent({
14628
14666
  BkButton
14629
14667
  },
14630
14668
  props: __spreadProps(__spreadValues({}, sliderPops), {
14631
- title: {
14632
- type: String,
14633
- default: ""
14634
- },
14635
- extCls: {
14636
- type: String,
14637
- default: ""
14638
- },
14639
14669
  direction: {
14640
14670
  type: String,
14641
14671
  default: "right",
@@ -14704,10 +14734,10 @@ var Component$h = defineComponent({
14704
14734
  }
14705
14735
  };
14706
14736
  const className = `bk-sideslider-wrapper ${props.scrollable ? "scroll-able" : ""} ${props.extCls}`;
14707
- const maxHeight = slots.footer ? "calc(100vh - 114px)" : "calc(100vh - 60px)";
14737
+ const maxHeight = slots.footer ? "calc(100vh - 106px)" : "calc(100vh - 52px)";
14708
14738
  return createVNode(BkModal, mergeProps(props, {
14709
14739
  "maxHeight": maxHeight,
14710
- "extCls": className,
14740
+ "class": className,
14711
14741
  "style": `${props.direction}: 0;`,
14712
14742
  "onHidden": handleHidden,
14713
14743
  "onShown": handleShown,
@@ -14931,9 +14961,6 @@ var Component$f = defineComponent({
14931
14961
  const sizeStr = `bk-switcher-${props.size}`;
14932
14962
  cls[sizeStr] = true;
14933
14963
  }
14934
- if (!props.size) {
14935
- cls["bk-switcher-nomal"] = true;
14936
- }
14937
14964
  return cls;
14938
14965
  });
14939
14966
  watch(() => props.modelValue, () => {
@@ -19042,7 +19069,7 @@ const Message$1 = (constructor, options) => {
19042
19069
  });
19043
19070
  const container2 = document.createElement("div");
19044
19071
  const vm = createVNode(constructor, opts);
19045
- vm.props.onDestory = (id2) => {
19072
+ vm.props.onDestroy = (id2) => {
19046
19073
  close(id2, position, spacing, userOnClose);
19047
19074
  render$1(null, container2);
19048
19075
  };
@@ -19089,7 +19116,7 @@ const messageProps = {
19089
19116
  var MessageConstructor = defineComponent({
19090
19117
  name: "Message",
19091
19118
  props: messageProps,
19092
- emits: ["destory"],
19119
+ emits: ["destroy"],
19093
19120
  setup(props, {
19094
19121
  emit
19095
19122
  }) {
@@ -19122,7 +19149,7 @@ var MessageConstructor = defineComponent({
19122
19149
  });
19123
19150
  watch(visible, () => {
19124
19151
  if (!visible.value) {
19125
- emit("destory", props.id);
19152
+ emit("destroy", props.id);
19126
19153
  }
19127
19154
  });
19128
19155
  return {
@@ -19153,7 +19180,7 @@ var MessageConstructor = defineComponent({
19153
19180
  }, [createVNode("div", {
19154
19181
  "class": "bk-message-icon"
19155
19182
  }, [renderIcon()]), this.message]), this.dismissable && createVNode(error, {
19156
- "class": "bk-message-icon bk-message-close",
19183
+ "class": "bk-message-close",
19157
19184
  "onClick": this.close
19158
19185
  }, null)]), [[vShow, this.visible]])]
19159
19186
  });
@@ -19179,7 +19206,7 @@ const notifyProps = {
19179
19206
  var NotifyConstructor = defineComponent({
19180
19207
  name: "Notify",
19181
19208
  props: notifyProps,
19182
- emits: ["destory"],
19209
+ emits: ["destroy"],
19183
19210
  setup(props, {
19184
19211
  emit
19185
19212
  }) {
@@ -19211,7 +19238,7 @@ var NotifyConstructor = defineComponent({
19211
19238
  });
19212
19239
  watch(visible, () => {
19213
19240
  if (!visible.value) {
19214
- emit("destory", props.id);
19241
+ emit("destroy", props.id);
19215
19242
  }
19216
19243
  });
19217
19244
  return {
@@ -19241,7 +19268,7 @@ var NotifyConstructor = defineComponent({
19241
19268
  "class": "bk-notify-content"
19242
19269
  }, [createVNode("div", {
19243
19270
  "class": "bk-notify-icon"
19244
- }, [renderIcon()]), this.title ? createVNode("h3", {
19271
+ }, [renderIcon()]), this.title ? createVNode("div", {
19245
19272
  "class": "bk-notify-content-header"
19246
19273
  }, [this.title]) : "", createVNode("div", {
19247
19274
  "class": "bk-notify-content-text"
@@ -25952,7 +25979,7 @@ var CascaderPanel = defineComponent({
25952
25979
  "onUpdate:modelValue": ($event) => node.checked = $event,
25953
25980
  "onChange": (val) => this.checkNode(node, val)
25954
25981
  }, null), createVNode("span", {
25955
- "class": "content"
25982
+ "class": "bk-cascader-node-name"
25956
25983
  }, [node.name]), !node.isLeaf ? createVNode(angleRight, {
25957
25984
  "class": "icon-angle-right"
25958
25985
  }, null) : ""]))]))]);
@@ -26059,7 +26086,7 @@ var Component$5 = defineComponent({
26059
26086
  limitOneLine: PropTypes.bool.def(false),
26060
26087
  extCls: PropTypes.string.def("")
26061
26088
  },
26062
- emits: ["update:modelValue"],
26089
+ emits: ["update:modelValue", "change", "clear", "toggle"],
26063
26090
  setup(props, {
26064
26091
  emit
26065
26092
  }) {
@@ -26077,20 +26104,21 @@ var Component$5 = defineComponent({
26077
26104
  const selectedText = ref("");
26078
26105
  const selectedTags = ref([]);
26079
26106
  const updateValue = (val) => {
26080
- emit("update:modelValue", val);
26081
26107
  if (multiple) {
26082
- selectedTags.value = store.getCheckedNodes().map((node2) => ({
26083
- text: node2.pathNames.join(separator2),
26084
- key: node2.id
26108
+ selectedTags.value = store.getCheckedNodes().map((node) => ({
26109
+ text: node.pathNames.join(separator2),
26110
+ key: node.id
26085
26111
  }));
26086
26112
  return;
26087
26113
  }
26088
26114
  if (val.length === 0) {
26089
26115
  selectedText.value = "";
26090
- return;
26116
+ } else {
26117
+ const node = store.getNodeByValue(val);
26118
+ selectedText.value = node.pathNames.join(separator2);
26091
26119
  }
26092
- const node = store.getNodeByValue(val);
26093
- selectedText.value = node.pathNames.join(separator2);
26120
+ emit("update:modelValue", val);
26121
+ emit("change", val);
26094
26122
  };
26095
26123
  const hidePopover = () => {
26096
26124
  panelShow.value = false;
@@ -26098,10 +26126,12 @@ var Component$5 = defineComponent({
26098
26126
  const handleClear = (e) => {
26099
26127
  e.stopPropagation();
26100
26128
  updateValue([]);
26129
+ emit("clear", JSON.parse(JSON.stringify(props.modelValue)));
26101
26130
  };
26102
26131
  const inputClickHandler = (e) => {
26103
26132
  e.stopPropagation();
26104
26133
  panelShow.value = !panelShow.value;
26134
+ emit("toggle", panelShow.value);
26105
26135
  };
26106
26136
  const removeTag = (value, index, e) => {
26107
26137
  e.stopPropagation();