vue-devui 1.0.0-rc.0 → 1.0.0-rc.1

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 (115) hide show
  1. package/README.md +13 -0
  2. package/accordion/index.es.js +6 -3
  3. package/alert/index.es.js +28 -30
  4. package/alert/index.umd.js +1 -1
  5. package/auto-complete/index.es.js +13 -6
  6. package/auto-complete/index.umd.js +1 -1
  7. package/back-top/index.es.js +4 -2
  8. package/badge/index.es.js +1 -1
  9. package/badge/index.umd.js +1 -1
  10. package/badge/style.css +1 -1
  11. package/breadcrumb/index.es.js +2 -1
  12. package/button/index.es.js +39 -40
  13. package/button/index.umd.js +1 -1
  14. package/carousel/index.es.js +38 -53
  15. package/carousel/index.umd.js +1 -1
  16. package/cascader/index.es.js +16 -8
  17. package/cascader/style.css +1 -1
  18. package/color-picker/index.es.js +94 -85
  19. package/color-picker/index.umd.js +7 -7
  20. package/countdown/index.es.js +2 -1
  21. package/date-picker/index.es.js +40 -57
  22. package/date-picker/index.umd.js +1 -1
  23. package/dropdown/index.es.js +117 -62
  24. package/dropdown/index.umd.js +1 -1
  25. package/dropdown/style.css +1 -1
  26. package/editable-select/index.es.js +6 -3
  27. package/form/index.es.js +87 -76
  28. package/form/index.umd.js +11 -11
  29. package/form/style.css +1 -1
  30. package/fullscreen/index.es.js +13 -16
  31. package/fullscreen/index.umd.js +1 -1
  32. package/icon/index.es.js +39 -57
  33. package/icon/index.umd.js +1 -1
  34. package/image-preview/index.es.js +2 -1
  35. package/input-icon/index.es.js +38 -37
  36. package/input-icon/index.umd.js +1 -1
  37. package/input-number/index.es.js +46 -57
  38. package/input-number/index.umd.js +1 -1
  39. package/input-number/style.css +1 -1
  40. package/modal/index.es.js +81 -76
  41. package/modal/index.umd.js +1 -1
  42. package/modal/style.css +1 -1
  43. package/notification/index.es.js +38 -40
  44. package/notification/index.umd.js +1 -1
  45. package/nuxt/components/PanelBody.js +3 -0
  46. package/nuxt/components/PanelFooter.js +3 -0
  47. package/nuxt/components/PanelHeader.js +3 -0
  48. package/nuxt/components/Timeline.js +3 -0
  49. package/nuxt/components/TimelineItem.js +3 -0
  50. package/nuxt/components/alertProps.js +3 -0
  51. package/nuxt/components/fullscreenProps.js +3 -0
  52. package/nuxt/components/iconProps.js +2 -0
  53. package/nuxt/components/paginationProps.js +3 -0
  54. package/nuxt/components/panelProps.js +3 -0
  55. package/nuxt/components/searchProps.js +3 -0
  56. package/overlay/index.es.js +44 -37
  57. package/overlay/index.umd.js +1 -1
  58. package/overlay/style.css +1 -1
  59. package/package.json +8 -43
  60. package/pagination/index.es.js +10 -12
  61. package/pagination/index.umd.js +1 -1
  62. package/panel/index.es.js +45 -32
  63. package/panel/index.umd.js +1 -1
  64. package/popover/index.es.js +44 -37
  65. package/popover/index.umd.js +6 -6
  66. package/popover/style.css +1 -1
  67. package/radio/index.es.js +3 -9
  68. package/radio/index.umd.js +1 -1
  69. package/read-tip/index.es.js +6 -3
  70. package/result/index.es.js +38 -53
  71. package/result/index.umd.js +1 -1
  72. package/ripple/index.es.js +9 -5
  73. package/search/index.es.js +2 -5
  74. package/search/index.umd.js +4 -4
  75. package/select/index.es.js +42 -42
  76. package/select/index.umd.js +1 -1
  77. package/skeleton/index.es.js +17 -17
  78. package/skeleton/index.umd.js +1 -1
  79. package/slider/index.es.js +2 -1
  80. package/splitter/index.es.js +54 -42
  81. package/splitter/index.umd.js +6 -6
  82. package/splitter/style.css +1 -1
  83. package/status/index.es.js +1 -4
  84. package/status/index.umd.js +1 -1
  85. package/status/style.css +1 -1
  86. package/steps-guide/index.es.js +6 -3
  87. package/style.css +1 -1
  88. package/table/index.es.js +117 -62
  89. package/table/index.umd.js +1 -1
  90. package/table/style.css +1 -1
  91. package/tag/index.es.js +2 -1
  92. package/tag-input/index.es.js +4 -2
  93. package/time-picker/index.es.js +43 -42
  94. package/time-picker/index.umd.js +1 -1
  95. package/{time-axis → timeline}/index.d.ts +0 -0
  96. package/{time-axis → timeline}/index.es.js +65 -78
  97. package/timeline/index.umd.js +1 -0
  98. package/{time-axis → timeline}/package.json +1 -1
  99. package/timeline/style.css +1 -0
  100. package/tooltip/index.es.js +44 -37
  101. package/tooltip/index.umd.js +6 -6
  102. package/tooltip/style.css +1 -1
  103. package/transfer/index.es.js +84 -77
  104. package/transfer/index.umd.js +7 -7
  105. package/transfer/style.css +1 -1
  106. package/tree/index.es.js +10 -5
  107. package/tree-select/index.es.js +8 -4
  108. package/upload/index.es.js +38 -40
  109. package/upload/index.umd.js +1 -1
  110. package/vue-devui.es.js +771 -649
  111. package/vue-devui.umd.js +9 -9
  112. package/nuxt/components/TimeAxis.js +0 -3
  113. package/nuxt/components/TimeAxisItem.js +0 -3
  114. package/time-axis/index.umd.js +0 -1
  115. package/time-axis/style.css +0 -1
@@ -21,8 +21,8 @@ var __publicField = (obj, key, value) => {
21
21
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
22
  return value;
23
23
  };
24
- import { computed, defineComponent, inject, createVNode, mergeProps, toRef, provide, ref, watch, withDirectives, resolveDirective, resolveComponent, Teleport, Transition, renderSlot, isVNode, onMounted, onUnmounted, nextTick, unref, toRefs, Fragment, createTextVNode, h, render, reactive } from "vue";
25
- import { offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
24
+ import { computed, defineComponent, inject, createVNode, mergeProps, toRef, provide, ref, watch, withDirectives, resolveDirective, resolveComponent, Teleport, Transition, renderSlot, isVNode, onMounted, onUnmounted, unref, nextTick, toRefs, Fragment, createTextVNode, h, render, reactive } from "vue";
25
+ import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
26
26
  const transferCommon = {
27
27
  showTooltip: {
28
28
  type: Boolean,
@@ -6272,7 +6272,7 @@ const transferDragProps = __spreadProps(__spreadValues(__spreadValues({}, transf
6272
6272
  default: () => null
6273
6273
  }
6274
6274
  });
6275
- var overlay = "";
6275
+ var baseOverlay = "";
6276
6276
  function _isSlot$2(s) {
6277
6277
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
6278
6278
  }
@@ -6319,43 +6319,13 @@ const overlayProps = {
6319
6319
  default: true
6320
6320
  }
6321
6321
  };
6322
- const overlayEmits = ["update:visible", "backdropClick"];
6323
6322
  const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
6324
6323
  overlayStyle: {
6325
6324
  type: [String, Object],
6326
6325
  default: void 0
6327
6326
  }
6328
6327
  });
6329
- const flexibleOverlayProps = {
6330
- modelValue: {
6331
- type: Boolean,
6332
- default: false
6333
- },
6334
- origin: {
6335
- type: Object,
6336
- require: true
6337
- },
6338
- position: {
6339
- type: Array,
6340
- default: ["bottom"]
6341
- },
6342
- offset: {
6343
- type: [Number, Object],
6344
- default: 8
6345
- },
6346
- align: {
6347
- type: String,
6348
- default: null
6349
- },
6350
- showArrow: {
6351
- type: Boolean,
6352
- default: false
6353
- },
6354
- isArrowCenter: {
6355
- type: Boolean,
6356
- default: true
6357
- }
6358
- };
6328
+ const overlayEmits = ["update:visible", "backdropClick"];
6359
6329
  function useOverlayLogic(props, ctx) {
6360
6330
  const backgroundClass = computed(() => {
6361
6331
  return [
@@ -6406,6 +6376,7 @@ function useOverlayLogic(props, ctx) {
6406
6376
  handleOverlayBubbleCancel
6407
6377
  };
6408
6378
  }
6379
+ var fixedOverlay = "";
6409
6380
  defineComponent({
6410
6381
  name: "DFixedOverlay",
6411
6382
  props: fixedOverlayProps,
@@ -6430,6 +6401,36 @@ defineComponent({
6430
6401
  });
6431
6402
  }
6432
6403
  });
6404
+ const flexibleOverlayProps = {
6405
+ modelValue: {
6406
+ type: Boolean,
6407
+ default: false
6408
+ },
6409
+ origin: {
6410
+ type: Object,
6411
+ require: true
6412
+ },
6413
+ position: {
6414
+ type: Array,
6415
+ default: ["bottom"]
6416
+ },
6417
+ offset: {
6418
+ type: [Number, Object],
6419
+ default: 8
6420
+ },
6421
+ align: {
6422
+ type: String,
6423
+ default: null
6424
+ },
6425
+ showArrow: {
6426
+ type: Boolean,
6427
+ default: false
6428
+ },
6429
+ isArrowCenter: {
6430
+ type: Boolean,
6431
+ default: true
6432
+ }
6433
+ };
6433
6434
  function getScrollParent(element) {
6434
6435
  const overflowRegex = /(auto|scroll|hidden)/;
6435
6436
  for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
@@ -6483,6 +6484,7 @@ function useOverlay(props, emit) {
6483
6484
  const overlayEl = unref(overlayRef.value);
6484
6485
  const arrowEl = unref(arrowRef.value);
6485
6486
  const middleware = [
6487
+ shift(),
6486
6488
  offset(props.offset),
6487
6489
  autoPlacement({
6488
6490
  alignment: props.align,
@@ -6517,7 +6519,7 @@ function useOverlay(props, emit) {
6517
6519
  originParent !== window && window.removeEventListener("scroll", updatePosition);
6518
6520
  window.removeEventListener("resize", updatePosition);
6519
6521
  });
6520
- return { arrowRef, overlayRef };
6522
+ return { arrowRef, overlayRef, updatePosition };
6521
6523
  }
6522
6524
  var flexibleOverlay = "";
6523
6525
  const FlexibleOverlay = defineComponent({
@@ -6528,12 +6530,17 @@ const FlexibleOverlay = defineComponent({
6528
6530
  setup(props, {
6529
6531
  slots,
6530
6532
  attrs,
6531
- emit
6533
+ emit,
6534
+ expose
6532
6535
  }) {
6533
6536
  const {
6534
6537
  arrowRef,
6535
- overlayRef
6538
+ overlayRef,
6539
+ updatePosition
6536
6540
  } = useOverlay(props, emit);
6541
+ expose({
6542
+ updatePosition
6543
+ });
6537
6544
  return () => {
6538
6545
  var _a;
6539
6546
  return props.modelValue && createVNode("div", mergeProps({
@@ -6946,55 +6953,53 @@ var DTransferBase = defineComponent({
6946
6953
  }, [createTextVNode("\u65E0\u6570\u636E")])])])]);
6947
6954
  }
6948
6955
  });
6956
+ const iconProps = {
6957
+ name: {
6958
+ type: String,
6959
+ default: "",
6960
+ required: true
6961
+ },
6962
+ size: {
6963
+ type: String,
6964
+ default: "inherit"
6965
+ },
6966
+ color: {
6967
+ type: String,
6968
+ default: "inherit"
6969
+ },
6970
+ classPrefix: {
6971
+ type: String,
6972
+ default: "icon"
6973
+ }
6974
+ };
6949
6975
  var Icon = defineComponent({
6950
6976
  name: "DIcon",
6951
- props: {
6952
- name: {
6953
- type: String,
6954
- required: true
6955
- },
6956
- size: {
6957
- type: String,
6958
- default: "inherit"
6959
- },
6960
- color: {
6961
- type: String,
6962
- default: "inherit"
6963
- },
6964
- classPrefix: {
6965
- type: String,
6966
- default: "icon"
6967
- }
6968
- },
6977
+ props: iconProps,
6969
6978
  setup(props) {
6970
- return __spreadValues({}, props);
6971
- },
6972
- render() {
6973
6979
  const {
6974
6980
  name,
6975
6981
  size,
6976
6982
  color,
6977
6983
  classPrefix
6978
- } = this;
6979
- return /^((https?):)?\/\//.test(name) ? createVNode("img", {
6980
- "src": name,
6981
- "alt": name.split("/")[name.split("/").length - 1],
6982
- "style": {
6983
- width: size,
6984
- verticalAlign: "text-bottom"
6985
- }
6986
- }, null) : createVNode("i", {
6987
- "class": `${classPrefix} ${classPrefix}-${name}`,
6988
- "style": {
6989
- fontSize: size,
6990
- color
6991
- }
6992
- }, null);
6984
+ } = toRefs(props);
6985
+ return () => {
6986
+ return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
6987
+ "src": name.value,
6988
+ "alt": name.value.split("/")[name.value.split("/").length - 1],
6989
+ "style": {
6990
+ width: size.value,
6991
+ verticalAlign: "text-bottom"
6992
+ }
6993
+ }, null) : createVNode("i", {
6994
+ "class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
6995
+ "style": {
6996
+ fontSize: size.value,
6997
+ color: color.value
6998
+ }
6999
+ }, null);
7000
+ };
6993
7001
  }
6994
7002
  });
6995
- Icon.install = function(app) {
6996
- app.component(Icon.name, Icon);
6997
- };
6998
7003
  class View {
6999
7004
  constructor() {
7000
7005
  __publicField(this, "top", "50%");
@@ -7278,6 +7283,7 @@ var DButton = defineComponent({
7278
7283
  }, [icon.value && createVNode(Icon, {
7279
7284
  "name": icon.value,
7280
7285
  "size": "12px",
7286
+ "color": "",
7281
7287
  "class": iconClass.value
7282
7288
  }, null), createVNode("span", {
7283
7289
  "class": "button-content"
@@ -7489,8 +7495,9 @@ var Transfer = defineComponent({
7489
7495
  isFunction("afterTransfer") && props.afterTransfer.call(null, target);
7490
7496
  };
7491
7497
  const changeAllSource = (source, value) => {
7492
- if (source.filterData.every((item) => item.disabled))
7498
+ if (source.filterData.every((item) => item.disabled)) {
7493
7499
  return;
7500
+ }
7494
7501
  source.allChecked = value;
7495
7502
  if (value) {
7496
7503
  source.checkedValues = source.filterData.filter((item) => !item.disabled).map((item) => item.value);