bkui-vue 0.0.1-beta.380 → 0.0.1-beta.382

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 (87) hide show
  1. package/dist/index.cjs.js +15 -15
  2. package/dist/index.esm.js +108 -107
  3. package/dist/index.umd.js +15 -15
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/alert/alert.d.ts +1 -1
  7. package/lib/alert/index.d.ts +4 -4
  8. package/lib/badge/badge.css +2 -3
  9. package/lib/badge/badge.d.ts +2 -2
  10. package/lib/badge/badge.less +2 -3
  11. package/lib/badge/badge.variable.css +2 -3
  12. package/lib/badge/index.d.ts +7 -7
  13. package/lib/breadcrumb/breadcrumb-item.d.ts +1 -1
  14. package/lib/breadcrumb/index.d.ts +1 -1
  15. package/lib/button/button.d.ts +1 -1
  16. package/lib/button/index.d.ts +4 -4
  17. package/lib/card/card.d.ts +1 -1
  18. package/lib/card/index.d.ts +4 -4
  19. package/lib/cascader/cascader-panel.d.ts +1 -1
  20. package/lib/cascader/cascader.d.ts +2 -2
  21. package/lib/cascader/index.d.ts +8 -8
  22. package/lib/checkbox/checkbox.d.ts +1 -1
  23. package/lib/checkbox/index.d.ts +4 -4
  24. package/lib/color-picker/color-picker.d.ts +1 -1
  25. package/lib/color-picker/index.d.ts +4 -4
  26. package/lib/date-picker/date-picker.d.ts +1 -1
  27. package/lib/date-picker/index.d.ts +4 -4
  28. package/lib/date-picker/panel/time-range.d.ts +2 -2
  29. package/lib/date-picker/panel/time.d.ts +2 -2
  30. package/lib/date-picker/time-picker.d.ts +2 -2
  31. package/lib/dialog/dialog.d.ts +2 -2
  32. package/lib/dialog/index.d.ts +7 -7
  33. package/lib/directives/index.d.ts +1 -1
  34. package/lib/directives/index.js +1 -1
  35. package/lib/divider/divider.d.ts +1 -1
  36. package/lib/divider/index.d.ts +4 -4
  37. package/lib/dropdown/dropdown.d.ts +1 -1
  38. package/lib/dropdown/index.d.ts +4 -4
  39. package/lib/fixed-navbar/fixed-navbar.d.ts +1 -1
  40. package/lib/fixed-navbar/index.d.ts +4 -4
  41. package/lib/form/form-item.d.ts +1 -1
  42. package/lib/form/index.d.ts +1 -1
  43. package/lib/input/index.d.ts +4 -4
  44. package/lib/input/input.d.ts +1 -1
  45. package/lib/link/index.d.ts +4 -4
  46. package/lib/link/link.d.ts +1 -1
  47. package/lib/loading/index.d.ts +4 -4
  48. package/lib/loading/loading.d.ts +1 -1
  49. package/lib/menu/index.d.ts +4 -4
  50. package/lib/menu/menu.d.ts +1 -1
  51. package/lib/modal/index.d.ts +4 -4
  52. package/lib/modal/modal.d.ts +1 -1
  53. package/lib/notify/notifyConstructor.d.ts +1 -1
  54. package/lib/pagination/index.d.ts +4 -4
  55. package/lib/pagination/pagination.d.ts +1 -1
  56. package/lib/popover/index.d.ts +16 -16
  57. package/lib/popover/popover.d.ts +5 -5
  58. package/lib/process/index.d.ts +4 -4
  59. package/lib/process/process.d.ts +1 -1
  60. package/lib/progress/index.d.ts +7 -7
  61. package/lib/progress/progress.d.ts +2 -2
  62. package/lib/resize-layout/index.d.ts +4 -4
  63. package/lib/resize-layout/resize-layout.d.ts +1 -1
  64. package/lib/select/index.d.ts +8 -8
  65. package/lib/select/index.js +1 -1
  66. package/lib/select/optionGroup.d.ts +1 -1
  67. package/lib/select/select.d.ts +2 -2
  68. package/lib/sideslider/index.d.ts +4 -4
  69. package/lib/sideslider/sideslider.d.ts +1 -1
  70. package/lib/slider/index.d.ts +7 -7
  71. package/lib/slider/slider.d.ts +2 -2
  72. package/lib/tab/index.d.ts +1 -1
  73. package/lib/tab/tab-panel.d.ts +1 -1
  74. package/lib/table/index.d.ts +15 -15
  75. package/lib/table/plugins/head-filter.d.ts +1 -1
  76. package/lib/table/props.d.ts +2 -2
  77. package/lib/table/table.d.ts +6 -6
  78. package/lib/tag-input/index.d.ts +7 -7
  79. package/lib/tag-input/tag-input.d.ts +2 -2
  80. package/lib/time-picker/index.d.ts +7 -7
  81. package/lib/timeline/index.d.ts +4 -4
  82. package/lib/timeline/timeline.d.ts +1 -1
  83. package/lib/upload/index.d.ts +7 -7
  84. package/lib/upload/upload-list.d.ts +1 -1
  85. package/lib/upload/upload-trigger.d.ts +1 -1
  86. package/lib/upload/upload.d.ts +2 -2
  87. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -33,7 +33,7 @@ var __publicField = (obj, key2, value) => {
33
33
  __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
34
34
  return value;
35
35
  };
36
- import { inject, createVNode, mergeProps, h as h$1, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Transition, provide, createTextVNode, isVNode, withDirectives, vShow, renderSlot, Fragment, createApp, toRefs, Teleport, resolveDirective, customRef, onBeforeMount, toRef, vModelText, unref, watchEffect, markRaw, onUpdated, render as render$1, onUnmounted, shallowRef, toRaw, withModifiers, TransitionGroup } from "vue";
36
+ import { inject, createVNode, mergeProps, h as h$1, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Transition, provide, createTextVNode, isVNode, withDirectives, vShow, renderSlot, Fragment, shallowRef, onUnmounted, createApp, toRefs, Teleport, resolveDirective, customRef, onBeforeMount, toRef, vModelText, unref, watchEffect, markRaw, onUpdated, render as render$1, toRaw, withModifiers, TransitionGroup } from "vue";
37
37
  var reset = "";
38
38
  var alert = "";
39
39
  var affix = "";
@@ -10941,6 +10941,18 @@ var Component$r = defineComponent({
10941
10941
  }
10942
10942
  });
10943
10943
  const BkLink = withInstall(Component$r);
10944
+ var props = {
10945
+ content: String,
10946
+ type: {
10947
+ type: String,
10948
+ default: "title"
10949
+ },
10950
+ calType: {
10951
+ type: String,
10952
+ default: "dom"
10953
+ },
10954
+ resizeable: Boolean
10955
+ };
10944
10956
  function getActualWidthByCanvas(text, options) {
10945
10957
  const { fontSize = 14, fontFamily = "Microsoft YaHei" } = options;
10946
10958
  const canvas = document.createElement("canvas");
@@ -10963,6 +10975,86 @@ function getActualWidthByDom(text, options, dom = document.body) {
10963
10975
  dom.removeChild(tempDom);
10964
10976
  return clientWidth;
10965
10977
  }
10978
+ var overflow = "";
10979
+ var OverflowTitle = defineComponent({
10980
+ name: "OverflowTitle",
10981
+ props,
10982
+ setup(props2, {
10983
+ slots
10984
+ }) {
10985
+ const boxRef = ref(null);
10986
+ const textRef = ref(null);
10987
+ const isShowTips = ref(false);
10988
+ const textProps = shallowRef();
10989
+ const contentText = computed(() => {
10990
+ var _a;
10991
+ if (props2.content) {
10992
+ return props2.content;
10993
+ }
10994
+ return (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots);
10995
+ });
10996
+ onMounted(() => {
10997
+ const {
10998
+ clientWidth
10999
+ } = boxRef.value;
11000
+ const resizeHandler = debounce(500, () => {
11001
+ isShowTips.value = false;
11002
+ textProps.value = {};
11003
+ let textWidth = 0;
11004
+ if (props2.calType === "dom") {
11005
+ textWidth = getActualWidthByDom(textRef.value.textContent, null, boxRef.value);
11006
+ } else {
11007
+ const {
11008
+ fontSize,
11009
+ fontFamily
11010
+ } = getComputedStyle(boxRef.value);
11011
+ textWidth = getActualWidthByCanvas(contentText.value, {
11012
+ fontSize,
11013
+ fontFamily
11014
+ });
11015
+ }
11016
+ if (textWidth > clientWidth) {
11017
+ isShowTips.value = true;
11018
+ if (props2.type === "title") {
11019
+ textProps.value = {
11020
+ title: textRef.value.innerText
11021
+ };
11022
+ }
11023
+ }
11024
+ });
11025
+ resizeHandler();
11026
+ if (props2.resizeable) {
11027
+ const observer = new ResizeObserver(resizeHandler);
11028
+ observer.observe(boxRef.value);
11029
+ onUnmounted(() => {
11030
+ observer.unobserve(boxRef.value);
11031
+ observer.disconnect();
11032
+ });
11033
+ }
11034
+ });
11035
+ return {
11036
+ boxRef,
11037
+ textRef,
11038
+ isShowTips,
11039
+ contentText,
11040
+ textProps
11041
+ };
11042
+ },
11043
+ render() {
11044
+ return createVNode("div", {
11045
+ "ref": "boxRef",
11046
+ "class": "position-relative"
11047
+ }, [createVNode(Popover, {
11048
+ "disabled": this.type === "title"
11049
+ }, {
11050
+ default: () => createVNode("div", mergeProps({
11051
+ "ref": "textRef",
11052
+ "class": "text-ov"
11053
+ }, this.textProps), [this.contentText]),
11054
+ content: () => this.contentText
11055
+ })]);
11056
+ }
11057
+ });
10966
11058
  const overflowTitle = {
10967
11059
  mounted(el, { value = {} }) {
10968
11060
  const { clientWidth } = el.parentElement;
@@ -10983,6 +11075,7 @@ const overflowTitle = {
10983
11075
  }
10984
11076
  }
10985
11077
  };
11078
+ const BkOverflowTitle = withInstall(OverflowTitle);
10986
11079
  var _populated = false;
10987
11080
  var _ie, _firefox, _opera, _webkit, _chrome;
10988
11081
  var _ie_real_version;
@@ -13755,6 +13848,7 @@ var Component$q = defineComponent({
13755
13848
  }
13756
13849
  });
13757
13850
  const BkPopover = withInstall(Component$q);
13851
+ var Popover = BkPopover;
13758
13852
  var popover = defineComponent({
13759
13853
  name: "Popover2",
13760
13854
  setup() {
@@ -15678,7 +15772,7 @@ var Component$j = defineComponent({
15678
15772
  label: handleGetLabelByValue(value)
15679
15773
  }))];
15680
15774
  } else {
15681
- if (!!modelValue.value || allowEmptyValues.value.includes(modelValue.value)) {
15775
+ if (modelValue.value !== void 0 || allowEmptyValues.value.includes(modelValue.value)) {
15682
15776
  selected.value = [{
15683
15777
  value: modelValue.value,
15684
15778
  label: handleGetLabelByValue(modelValue.value)
@@ -15977,7 +16071,7 @@ var Component$j = defineComponent({
15977
16071
  };
15978
16072
  return createVNode("div", {
15979
16073
  "class": selectClass
15980
- }, [createVNode(BkPopover, mergeProps(this.popoverConfig, {
16074
+ }, [createVNode(Popover, mergeProps(this.popoverConfig, {
15981
16075
  "onClickoutside": this.handleClickOutside,
15982
16076
  "onAfterShow": this.handlePopoverShow,
15983
16077
  "ref": "popoverRef"
@@ -17041,7 +17135,7 @@ var useSmallList = () => {
17041
17135
  "is-disabled": isPagePreDisabled.value
17042
17136
  },
17043
17137
  "onClick": handlePrePage
17044
- }, [createVNode(angleLeft, null, null)]), createVNode(BkPopover, {
17138
+ }, [createVNode(angleLeft, null, null)]), createVNode(Popover, {
17045
17139
  "theme": "light",
17046
17140
  "trigger": "click",
17047
17141
  "arrow": false,
@@ -18269,7 +18363,7 @@ var HeadFilter = defineComponent({
18269
18363
  "class": "list-item is-empty"
18270
18364
  }, [createTextVNode("\u6682\u65E0\u6570\u636E")]);
18271
18365
  };
18272
- return () => createVNode(BkPopover, mergeProps({
18366
+ return () => createVNode(Popover, mergeProps({
18273
18367
  "trigger": "click",
18274
18368
  "isShow": state.isOpen,
18275
18369
  "placement": "bottom-start",
@@ -18495,7 +18589,7 @@ var Settings = defineComponent({
18495
18589
  immediate: true,
18496
18590
  deep: true
18497
18591
  });
18498
- return () => props2.settings ? createVNode(BkPopover, mergeProps({
18592
+ return () => props2.settings ? createVNode(Popover, mergeProps({
18499
18593
  "trigger": "manual",
18500
18594
  "isShow": isShow.value,
18501
18595
  "placement": "bottom-end",
@@ -21058,7 +21152,7 @@ var Component$d = defineComponent({
21058
21152
  "onClick": this.focusInputTrigger,
21059
21153
  "onMouseenter": () => this.isHover = true,
21060
21154
  "onMouseleave": () => this.isHover = false
21061
- }, [createVNode(BkPopover, mergeProps({
21155
+ }, [createVNode(Popover, mergeProps({
21062
21156
  "theme": "light bk-tag-input-popover-content",
21063
21157
  "trigger": "manual",
21064
21158
  "placement": "bottom-start",
@@ -30142,7 +30236,7 @@ var Dropdown = defineComponent({
30142
30236
  const popoverOptions = lodash.exports.merge(basePopoverOptions, this.popoverOptions);
30143
30237
  return createVNode("div", {
30144
30238
  "class": wrapperClasses
30145
- }, [createVNode(BkPopover, mergeProps({
30239
+ }, [createVNode(Popover, mergeProps({
30146
30240
  "ref": "popoverRef"
30147
30241
  }, popoverOptions, {
30148
30242
  "onAfterShow": this.afterShow,
@@ -30587,7 +30681,7 @@ var Component$7 = defineComponent({
30587
30681
  },
30588
30682
  components: {
30589
30683
  CascaderPanel,
30590
- BkPopover
30684
+ BkPopover: Popover
30591
30685
  },
30592
30686
  props: {
30593
30687
  modelValue: PropTypes.arrayOf(PropTypes.oneOfType([q(), String, Number])),
@@ -30780,7 +30874,7 @@ var Component$7 = defineComponent({
30780
30874
  "data-placeholder": this.placeholder,
30781
30875
  "onMouseenter": this.setHover,
30782
30876
  "onMouseleave": this.cancelHover
30783
- }, [suffixIcon(), createVNode(BkPopover, {
30877
+ }, [suffixIcon(), createVNode(Popover, {
30784
30878
  "placement": "bottom-start",
30785
30879
  "theme": "light bk-cascader-popover",
30786
30880
  "trigger": "click",
@@ -30954,7 +31048,7 @@ var SliderButton = defineComponent({
30954
31048
  "style": wrapperStyle.value,
30955
31049
  "onClick": (event) => event.stopPropagation(),
30956
31050
  "onMousedown": onButtonDown
30957
- }, [Boolean(tip.value.content) ? createVNode(BkPopover, {
31051
+ }, [Boolean(tip.value.content) ? createVNode(Popover, {
30958
31052
  "content": tip.value.content,
30959
31053
  "theme": "dark",
30960
31054
  "placement": tip.value.placement,
@@ -38950,7 +39044,7 @@ var SearchSelectInput = defineComponent({
38950
39044
  "onFooterClick": this.handleMenuFooterClick
38951
39045
  }, __spreadValues({}, menuSlots))]) : void 0;
38952
39046
  };
38953
- return createVNode(BkPopover, {
39047
+ return createVNode(Popover, {
38954
39048
  "trigger": "manual",
38955
39049
  "theme": "light",
38956
39050
  "placement": "bottom-start",
@@ -39364,99 +39458,6 @@ var Component = defineComponent({
39364
39458
  }
39365
39459
  });
39366
39460
  const BkSearchSelect = withInstall(Component);
39367
- var props = {
39368
- content: String,
39369
- type: {
39370
- type: String,
39371
- default: "title"
39372
- },
39373
- calType: {
39374
- type: String,
39375
- default: "dom"
39376
- },
39377
- resizeable: Boolean
39378
- };
39379
- var overflow = "";
39380
- var OverflowTitle = defineComponent({
39381
- name: "OverflowTitle",
39382
- props,
39383
- setup(props2, {
39384
- slots
39385
- }) {
39386
- const boxRef = ref(null);
39387
- const textRef = ref(null);
39388
- const isShowTips = ref(false);
39389
- const textProps = shallowRef();
39390
- const contentText = computed(() => {
39391
- var _a;
39392
- if (props2.content) {
39393
- return props2.content;
39394
- }
39395
- return (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots);
39396
- });
39397
- onMounted(() => {
39398
- const {
39399
- clientWidth
39400
- } = boxRef.value;
39401
- const resizeHandler = debounce(500, () => {
39402
- isShowTips.value = false;
39403
- textProps.value = {};
39404
- let textWidth = 0;
39405
- if (props2.calType === "dom") {
39406
- textWidth = getActualWidthByDom(textRef.value.textContent, null, boxRef.value);
39407
- } else {
39408
- const {
39409
- fontSize,
39410
- fontFamily
39411
- } = getComputedStyle(boxRef.value);
39412
- textWidth = getActualWidthByCanvas(contentText.value, {
39413
- fontSize,
39414
- fontFamily
39415
- });
39416
- }
39417
- if (textWidth > clientWidth) {
39418
- isShowTips.value = true;
39419
- if (props2.type === "title") {
39420
- textProps.value = {
39421
- title: textRef.value.innerText
39422
- };
39423
- }
39424
- }
39425
- });
39426
- resizeHandler();
39427
- if (props2.resizeable) {
39428
- const observer = new ResizeObserver(resizeHandler);
39429
- observer.observe(boxRef.value);
39430
- onUnmounted(() => {
39431
- observer.unobserve(boxRef.value);
39432
- observer.disconnect();
39433
- });
39434
- }
39435
- });
39436
- return {
39437
- boxRef,
39438
- textRef,
39439
- isShowTips,
39440
- contentText,
39441
- textProps
39442
- };
39443
- },
39444
- render() {
39445
- return createVNode("div", {
39446
- "ref": "boxRef",
39447
- "class": "position-relative"
39448
- }, [createVNode(BkPopover, {
39449
- "disabled": this.type === "title"
39450
- }, {
39451
- default: () => createVNode("div", mergeProps({
39452
- "ref": "textRef",
39453
- "class": "text-ov"
39454
- }, this.textProps), [this.contentText]),
39455
- content: () => this.contentText
39456
- })]);
39457
- }
39458
- });
39459
- const BkOverflowTitle = withInstall(OverflowTitle);
39460
39461
  var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
39461
39462
  __proto__: null,
39462
39463
  Alert: BkAlert,
@@ -39476,7 +39477,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
39476
39477
  Link: BkLink,
39477
39478
  Loading: BkLoading,
39478
39479
  Modal: BkModal,
39479
- Popover: BkPopover,
39480
+ Popover,
39480
39481
  Popover2: BkPopover2,
39481
39482
  Progress: BkProgress,
39482
39483
  Radio: BkRadio,
@@ -39535,4 +39536,4 @@ var preset = {
39535
39536
  install: createInstall(),
39536
39537
  version: "0.0.1"
39537
39538
  };
39538
- export { createPopoverComponent as $bkPopover, BkAffix as Affix, BkAlert as Alert, BkAnimateNumber as AnimateNumber, BkBacktop as Backtop, BkBadge as Badge, BkBreadcrumb as Breadcrumb, BkButton as Button, BkCard as Card, BkCascader as Cascader, BkCheckbox as Checkbox, BkCodeDiff as CodeDiff, BkCollapse as Collapse, BkColorPicker as ColorPicker, BkContainer as Container, BkDatePicker as DatePicker, BkDialog as Dialog, BkDivider as Divider, BkDropdown as Dropdown, BkException as Exception, BkFixedNavbar as FixedNavbar, BkForm as Form, BkInfoBox as InfoBox, BkInput as Input, BkLink as Link, BkLoading as Loading, BkMenu as Menu, Message, BkModal as Modal, Navigation, Notify, BkOverflowTitle as OverflowTitle, BkPagination as Pagination, BkPopover as Popover, BkPopover2 as Popover2, BkProcess as Process, BkProgress as Progress, BkRadio as Radio, BkRate as Rate, BkResizeLayout as ResizeLayout, BkSearchSelect as SearchSelect, BkSelect as Select, BkSideslider as Sideslider, Slider, BkSteps as Steps, BkSwiper as Swiper, BkSwitcher as Switcher, BkTab as Tab, BkTable as Table, BkTableColumn as TableColumn, BkTag as Tag, TagInput, BkTimeline as TimeLine, BkTimePicker as TimePicker, Transfer, BkTree as Tree, Upload, BkVirtualRender as VirtualRender, ellipsis as bkEllipsis, createInstance as bkEllipsisInstance, tooltips as bkTooltips, ClickOutside as clickoutside, BkContainer as containerProps, preset as default, mousewheel, overflowTitle };
39539
+ export { createPopoverComponent as $bkPopover, BkAffix as Affix, BkAlert as Alert, BkAnimateNumber as AnimateNumber, BkBacktop as Backtop, BkBadge as Badge, BkBreadcrumb as Breadcrumb, BkButton as Button, BkCard as Card, BkCascader as Cascader, BkCheckbox as Checkbox, BkCodeDiff as CodeDiff, BkCollapse as Collapse, BkColorPicker as ColorPicker, BkContainer as Container, BkDatePicker as DatePicker, BkDialog as Dialog, BkDivider as Divider, BkDropdown as Dropdown, BkException as Exception, BkFixedNavbar as FixedNavbar, BkForm as Form, BkInfoBox as InfoBox, BkInput as Input, BkLink as Link, BkLoading as Loading, BkMenu as Menu, Message, BkModal as Modal, Navigation, Notify, BkOverflowTitle as OverflowTitle, BkPagination as Pagination, Popover, BkPopover2 as Popover2, BkProcess as Process, BkProgress as Progress, BkRadio as Radio, BkRate as Rate, BkResizeLayout as ResizeLayout, BkSearchSelect as SearchSelect, BkSelect as Select, BkSideslider as Sideslider, Slider, BkSteps as Steps, BkSwiper as Swiper, BkSwitcher as Switcher, BkTab as Tab, BkTable as Table, BkTableColumn as TableColumn, BkTag as Tag, TagInput, BkTimeline as TimeLine, BkTimePicker as TimePicker, Transfer, BkTree as Tree, Upload, BkVirtualRender as VirtualRender, ellipsis as bkEllipsis, createInstance as bkEllipsisInstance, tooltips as bkTooltips, ClickOutside as clickoutside, BkContainer as containerProps, preset as default, mousewheel, overflowTitle };