vue-devui 1.0.0-rc.2 → 1.0.0-rc.5

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 (174) hide show
  1. package/README.md +9 -0
  2. package/auto-complete/index.es.js +132 -58
  3. package/auto-complete/index.umd.js +5 -3
  4. package/auto-complete/style.css +1 -1
  5. package/avatar/index.es.js +77 -81
  6. package/avatar/index.umd.js +1 -1
  7. package/button/index.es.js +23 -15
  8. package/button/index.umd.js +1 -1
  9. package/button/style.css +1 -1
  10. package/card/index.es.js +3 -6
  11. package/card/index.umd.js +1 -1
  12. package/checkbox/index.es.js +5 -11
  13. package/checkbox/index.umd.js +1 -1
  14. package/comment/index.es.js +4 -6
  15. package/comment/index.umd.js +1 -1
  16. package/countdown/index.es.js +3 -6
  17. package/countdown/index.umd.js +1 -1
  18. package/{tag-input → date-picker}/index.d.ts +0 -0
  19. package/date-picker/index.es.js +1151 -0
  20. package/date-picker/index.umd.js +1 -0
  21. package/date-picker/package.json +7 -0
  22. package/date-picker/style.css +1 -0
  23. package/drawer/index.d.ts +7 -0
  24. package/drawer/index.es.js +236 -0
  25. package/drawer/index.umd.js +1 -0
  26. package/{tag-input → drawer}/package.json +1 -1
  27. package/drawer/style.css +1 -0
  28. package/dropdown/index.d.ts +7 -0
  29. package/dropdown/index.es.js +716 -0
  30. package/dropdown/index.umd.js +1 -0
  31. package/dropdown/package.json +7 -0
  32. package/dropdown/style.css +1 -0
  33. package/editable-select/index.es.js +2 -5
  34. package/editable-select/index.umd.js +1 -1
  35. package/form/index.d.ts +7 -0
  36. package/form/index.es.js +7888 -0
  37. package/form/index.umd.js +27 -0
  38. package/form/package.json +7 -0
  39. package/form/style.css +1 -0
  40. package/grid/index.es.js +30 -36
  41. package/grid/index.umd.js +1 -1
  42. package/image-preview/index.es.js +19 -19
  43. package/image-preview/index.umd.js +1 -1
  44. package/input/index.es.js +2 -5
  45. package/input/index.umd.js +1 -1
  46. package/input-number/index.d.ts +7 -0
  47. package/input-number/index.es.js +229 -0
  48. package/input-number/index.umd.js +1 -0
  49. package/input-number/package.json +7 -0
  50. package/input-number/style.css +1 -0
  51. package/layout/index.es.js +9 -22
  52. package/layout/index.umd.js +1 -1
  53. package/loading/index.es.js +40 -25
  54. package/loading/index.umd.js +1 -1
  55. package/modal/index.es.js +70 -50
  56. package/modal/index.umd.js +1 -1
  57. package/notification/index.es.js +100 -10
  58. package/notification/index.umd.js +1 -1
  59. package/notification/style.css +1 -1
  60. package/nuxt/components/Column.js +3 -0
  61. package/nuxt/components/DatePicker.js +3 -0
  62. package/nuxt/components/Drawer.js +3 -0
  63. package/nuxt/components/DrawerService.js +3 -0
  64. package/nuxt/components/Dropdown.js +3 -0
  65. package/nuxt/components/DropdownMenu.js +3 -0
  66. package/nuxt/components/DropdownPropsKey.js +3 -0
  67. package/nuxt/components/Form.js +3 -0
  68. package/nuxt/components/FormControl.js +3 -0
  69. package/nuxt/components/FormItem.js +3 -0
  70. package/nuxt/components/FormLabel.js +3 -0
  71. package/nuxt/components/FormOperation.js +3 -0
  72. package/nuxt/components/InputNumber.js +3 -0
  73. package/nuxt/components/LoadingOptions.js +3 -0
  74. package/nuxt/components/Select.js +3 -0
  75. package/nuxt/components/StickSlider.js +3 -0
  76. package/nuxt/components/Tab.js +3 -0
  77. package/nuxt/components/Table.js +3 -0
  78. package/nuxt/components/Tabs.js +3 -0
  79. package/nuxt/components/Tooltip.js +3 -0
  80. package/nuxt/components/autoCompleteProps.js +3 -0
  81. package/nuxt/components/avatarProps.js +3 -0
  82. package/nuxt/components/cardProps.js +3 -0
  83. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  84. package/nuxt/components/checkboxGroupProps.js +3 -0
  85. package/nuxt/components/checkboxProps.js +3 -0
  86. package/nuxt/components/colProps.js +3 -0
  87. package/nuxt/components/colPropsBaseClass.js +3 -0
  88. package/nuxt/components/colPropsBaseStyle.js +3 -0
  89. package/nuxt/components/commentProps.js +3 -0
  90. package/nuxt/components/countdownProps.js +3 -0
  91. package/nuxt/components/dropdownMenuProps.js +3 -0
  92. package/nuxt/components/editableSelectProps.js +3 -0
  93. package/nuxt/components/imagePreviewProps.js +3 -0
  94. package/nuxt/components/inputProps.js +3 -0
  95. package/nuxt/components/loadingProps.js +3 -0
  96. package/nuxt/components/modalProps.js +3 -0
  97. package/nuxt/components/progressProps.js +3 -0
  98. package/nuxt/components/rateProps.js +3 -0
  99. package/nuxt/components/readTipProps.js +3 -0
  100. package/nuxt/components/resultProps.js +3 -0
  101. package/nuxt/components/rowProps.js +3 -0
  102. package/nuxt/components/screenSizes.js +3 -0
  103. package/nuxt/components/skeletonProps.js +3 -0
  104. package/nuxt/components/sliderProps.js +3 -0
  105. package/nuxt/components/splitterProps.js +3 -0
  106. package/nuxt/components/statisticProps.js +3 -0
  107. package/nuxt/components/switchProps.js +3 -0
  108. package/nuxt/components/tabsProps.js +3 -0
  109. package/nuxt/components/textareaProps.js +3 -0
  110. package/nuxt/components/timeAxisProps.js +3 -0
  111. package/nuxt/components/tooltipProps.js +3 -0
  112. package/overlay/index.es.js +20 -8
  113. package/overlay/index.umd.js +1 -1
  114. package/package.json +2 -2
  115. package/pagination/index.es.js +14 -13
  116. package/pagination/index.umd.js +1 -1
  117. package/popover/index.es.js +20 -8
  118. package/popover/index.umd.js +12 -12
  119. package/progress/index.es.js +33 -35
  120. package/progress/index.umd.js +3 -3
  121. package/rate/index.es.js +31 -41
  122. package/rate/index.umd.js +1 -1
  123. package/read-tip/index.es.js +34 -34
  124. package/read-tip/index.umd.js +1 -1
  125. package/read-tip/style.css +1 -1
  126. package/result/index.es.js +2 -5
  127. package/result/index.umd.js +1 -1
  128. package/search/index.es.js +11 -11
  129. package/search/index.umd.js +8 -8
  130. package/select/index.d.ts +7 -0
  131. package/select/index.es.js +696 -0
  132. package/select/index.umd.js +1 -0
  133. package/select/package.json +7 -0
  134. package/select/style.css +1 -0
  135. package/skeleton/index.es.js +9 -12
  136. package/skeleton/index.umd.js +1 -1
  137. package/slider/index.es.js +1 -4
  138. package/slider/index.umd.js +1 -1
  139. package/splitter/index.es.js +23 -14
  140. package/splitter/index.umd.js +15 -15
  141. package/statistic/index.es.js +7 -18
  142. package/statistic/index.umd.js +1 -1
  143. package/style.css +1 -1
  144. package/switch/index.es.js +4 -7
  145. package/switch/index.umd.js +1 -1
  146. package/switch/style.css +1 -1
  147. package/table/index.d.ts +7 -0
  148. package/table/index.es.js +2376 -0
  149. package/table/index.umd.js +1 -0
  150. package/table/package.json +7 -0
  151. package/table/style.css +1 -0
  152. package/tabs/index.d.ts +7 -0
  153. package/tabs/index.es.js +194 -0
  154. package/tabs/index.umd.js +1 -0
  155. package/tabs/package.json +7 -0
  156. package/tabs/style.css +1 -0
  157. package/textarea/index.es.js +2 -5
  158. package/textarea/index.umd.js +1 -1
  159. package/timeline/index.es.js +10 -16
  160. package/timeline/index.umd.js +1 -1
  161. package/tooltip/index.d.ts +7 -0
  162. package/tooltip/index.es.js +5847 -0
  163. package/tooltip/index.umd.js +27 -0
  164. package/tooltip/package.json +7 -0
  165. package/tooltip/style.css +1 -0
  166. package/upload/index.es.js +160 -67
  167. package/upload/index.umd.js +1 -1
  168. package/upload/style.css +1 -1
  169. package/vue-devui.es.js +16936 -24821
  170. package/vue-devui.umd.js +24 -22
  171. package/nuxt/components/TagInput.js +0 -3
  172. package/tag-input/index.es.js +0 -331
  173. package/tag-input/index.umd.js +0 -1
  174. package/tag-input/style.css +0 -1
@@ -53,9 +53,10 @@ var Comment = defineComponent({
53
53
  "src": avatar,
54
54
  "alt": "comment-avatar"
55
55
  }, null) : avatar]);
56
+ const actionsList = Array.isArray(actions) ? actions : [actions];
56
57
  const actionDom = actions ? createVNode("ul", {
57
58
  "class": `devui-comment-actions`
58
- }, [getAction(Array.isArray(actions) ? actions : [actions])]) : null;
59
+ }, [getAction(actionsList)]) : null;
59
60
  return createVNode("div", {
60
61
  "class": "devui-comment"
61
62
  }, [avatarDom, createVNode("div", {
@@ -72,15 +73,12 @@ var Comment = defineComponent({
72
73
  };
73
74
  }
74
75
  });
75
- Comment.install = function(app) {
76
- app.component(Comment.name, Comment);
77
- };
78
76
  var index = {
79
77
  title: "Comment \u8BC4\u8BBA",
80
78
  category: "\u6570\u636E\u5C55\u793A",
81
79
  status: "100%",
82
80
  install(app) {
83
- app.use(Comment);
81
+ app.component(Comment.name, Comment);
84
82
  }
85
83
  };
86
- export { Comment, index as default };
84
+ export { Comment, commentProps, index as default };
@@ -1 +1 @@
1
- (function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.index={},n.Vue))})(this,function(n,e){"use strict";const b={actions:{type:Object,default:null},author:{type:Object,default:null},avatar:{type:Object,default:null},content:{type:Object,default:null},datetime:{type:Object,default:null}};var T="",c=e.defineComponent({name:"DComment",props:b,emits:[],slots:["actions","author","avatar","content","datetime"],setup(a,{slots:t}){return()=>{var m,u,r,f,l,v,y,h,V,p;const j=o=>!o||!o.length?null:o.map((D,N)=>e.createVNode("li",{key:`devui-comment-action-${N}`,class:`devui-comment-action-${N}`},[D])),i=(u=a.actions)!=null?u:(m=t.actions)==null?void 0:m.call(t),C=(f=a.author)!=null?f:(r=t.author)==null?void 0:r.call(t),d=(v=a.avatar)!=null?v:(l=t.avatar)==null?void 0:l.call(t),O=(h=a.content)!=null?h:(y=t.content)==null?void 0:y.call(t),A=(p=a.datetime)!=null?p:(V=t.datetime)==null?void 0:V.call(t),s=e.createVNode("div",{class:"devui-comment-avatar"},[typeof d=="string"?e.createVNode("img",{src:d,alt:"comment-avatar"},null):d]),B=i?e.createVNode("ul",{class:"devui-comment-actions"},[j(Array.isArray(i)?i:[i])]):null;return e.createVNode("div",{class:"devui-comment"},[s,e.createVNode("div",{class:"devui-comment-right"},[e.createVNode("div",{class:"devui-comment-head"},[e.createVNode("div",{class:"devui-comment-author"},[C]),e.createVNode("div",{class:"devui-comment-datetime"},[A])]),e.createVNode("div",{class:"devui-comment-content"},[O]),B])])}}});c.install=function(a){a.component(c.name,c)};var g={title:"Comment \u8BC4\u8BBA",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(a){a.use(c)}};n.Comment=c,n.default=g,Object.defineProperty(n,"__esModule",{value:!0}),n[Symbol.toStringTag]="Module"});
1
+ (function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.index={},n.Vue))})(this,function(n,e){"use strict";const m={actions:{type:Object,default:null},author:{type:Object,default:null},avatar:{type:Object,default:null},content:{type:Object,default:null},datetime:{type:Object,default:null}};var P="",i=e.defineComponent({name:"DComment",props:m,emits:[],slots:["actions","author","avatar","content","datetime"],setup(a,{slots:t}){return()=>{var u,r,f,v,l,y,h,V,p,N;const j=d=>!d||!d.length?null:d.map((L,b)=>e.createVNode("li",{key:`devui-comment-action-${b}`,class:`devui-comment-action-${b}`},[L])),c=(r=a.actions)!=null?r:(u=t.actions)==null?void 0:u.call(t),C=(v=a.author)!=null?v:(f=t.author)==null?void 0:f.call(t),o=(y=a.avatar)!=null?y:(l=t.avatar)==null?void 0:l.call(t),O=(V=a.content)!=null?V:(h=t.content)==null?void 0:h.call(t),A=(N=a.datetime)!=null?N:(p=t.datetime)==null?void 0:p.call(t),s=e.createVNode("div",{class:"devui-comment-avatar"},[typeof o=="string"?e.createVNode("img",{src:o,alt:"comment-avatar"},null):o]),B=Array.isArray(c)?c:[c],D=c?e.createVNode("ul",{class:"devui-comment-actions"},[j(B)]):null;return e.createVNode("div",{class:"devui-comment"},[s,e.createVNode("div",{class:"devui-comment-right"},[e.createVNode("div",{class:"devui-comment-head"},[e.createVNode("div",{class:"devui-comment-author"},[C]),e.createVNode("div",{class:"devui-comment-datetime"},[A])]),e.createVNode("div",{class:"devui-comment-content"},[O]),D])])}}}),g={title:"Comment \u8BC4\u8BBA",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(a){a.component(i.name,i)}};n.Comment=i,n.commentProps=m,n.default=g,Object.defineProperty(n,"__esModule",{value:!0}),n[Symbol.toStringTag]="Module"});
@@ -23,7 +23,6 @@ const countdownProps = {
23
23
  }
24
24
  }
25
25
  };
26
- var countdown = "";
27
26
  const getFormatTime = (leftTime) => {
28
27
  const timeformat = /* @__PURE__ */ new Map([["Y", 0], ["M", 0], ["D", 0], ["H", 0], ["m", 0], ["s", 0], ["S", 0]]);
29
28
  const year = Math.floor(leftTime / (365 * 24 * 60 * 60 * 1e3));
@@ -96,6 +95,7 @@ const numFormat = (n, len) => {
96
95
  return str + n;
97
96
  }
98
97
  };
98
+ var countdown = "";
99
99
  var Countdown = defineComponent({
100
100
  name: "DCountdown",
101
101
  props: countdownProps,
@@ -163,15 +163,12 @@ var Countdown = defineComponent({
163
163
  };
164
164
  }
165
165
  });
166
- Countdown.install = function(app) {
167
- app.component(Countdown.name, Countdown);
168
- };
169
166
  var index = {
170
167
  title: "Countdown \u5012\u8BA1\u65F6",
171
168
  category: "\u6570\u636E\u5C55\u793A",
172
169
  status: "100%",
173
170
  install(app) {
174
- app.use(Countdown);
171
+ app.component(Countdown.name, Countdown);
175
172
  }
176
173
  };
177
- export { Countdown, index as default };
174
+ export { Countdown, countdownProps, index as default };
@@ -1 +1 @@
1
- (function(r,a){typeof exports=="object"&&typeof module!="undefined"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(r=typeof globalThis!="undefined"?globalThis:r||self,a(r.index={},r.Vue))})(this,function(r,a){"use strict";const w={value:{type:Number,required:!0},format:{type:String,default:"HH:mm:ss"},prefix:{type:String,default:""},suffix:{type:String,default:""},valueStyle:{type:Object,default:()=>({})}};var T="";const M=e=>{const t=new Map([["Y",0],["M",0],["D",0],["H",0],["m",0],["s",0],["S",0]]),n=Math.floor(e/(365*24*60*60*1e3)),s=Math.floor(e/(30*24*60*60*1e3)%12),o=Math.floor(e/(24*60*60*1e3)%30),u=Math.floor(e/(60*60*1e3)%24),h=Math.floor(e/(60*1e3)%60),f=Math.floor(e/1e3%60),S=e%1e3;return t.set("Y",n),t.set("M",s),t.set("D",o),t.set("H",u),t.set("m",h),t.set("s",f),t.set("S",S),t},p=(e,t)=>{const n=new Map([["Y",0],["M",0],["D",0],["H",0],["m",0],["s",0],["S",0]]),s=new Map([["Y",12],["M",30],["D",24],["H",60],["m",60],["s",1e3],["S",1]]);let o=0;for(const u of n.keys())e.has(u)?(n.set(u,t.get(u)+o),o=0):o+=t.get(u)*s.get(u);return!e.has("S")&&t.get("S")>500&&n.set("s",n.get("s")+1),n},y=e=>{const t=new Set(["Y","M","D","H","m","s","S"]),n=[];for(let s=0;s<e.length;s++){const o=e[s];n.length===0||n[n.length-1].k!==o||!t.has(o)?n.push({k:o,n:1}):n[n.length-1].n++}return n},v=e=>{const t=new Set(["Y","M","D","H","m","s","S"]),n=new Set;for(let s=0;s<e.length;s++){const o=e[s];t.has(o)&&n.add(o)}return n},D=(e,t)=>{const n=10**t-1;if(e>=n)return e;{const s=t-e.toString().length;let o="";for(let u=0;u<s;u++)o+="0";return o+e}};var l=a.defineComponent({name:"DCountdown",props:w,emits:["onChange","onFinish"],setup(e,t){const n=a.ref(),s=v(e.format),o=y(e.format),u=a.ref(""),h=c=>{const i=new Set(["Y","M","D","H","m","s","S"]),m=o.reduce((d,g)=>i.has(g.k)?d+D(c.get(g.k),g.n):d+g.k,"");u.value=m},f=()=>{const c=new Date(e.value).getTime(),i=c>new Date().getTime()?c-new Date().getTime():0,m=M(i),d=p(s,m);return!t.slots.default&&h(d),t.emit("onChange",{leftTime:i,formatTime:m,legalTime:d}),i},S=()=>{f(),!n.value&&(n.value=setInterval(()=>{f()===0&&(t.emit("onFinish"),clearInterval(n.value))},s.has("S")?100:1e3))};return a.onMounted(()=>{S()}),a.onUnmounted(()=>{clearInterval(n.value)}),()=>a.createVNode("div",{class:"devui-countdown"},[t.slots.default?t.slots.default():a.createVNode("div",{class:"countdown-content",style:e.valueStyle},[a.createVNode("span",{class:"countdown-prefix"},[e.prefix]),a.createVNode("span",{class:"countdown-value"},[u.value]),a.createVNode("span",{class:"countdown-suffix"},[e.suffix])])])}});l.install=function(e){e.component(l.name,l)};var H={title:"Countdown \u5012\u8BA1\u65F6",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(e){e.use(l)}};r.Countdown=l,r.default=H,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"});
1
+ (function(u,a){typeof exports=="object"&&typeof module!="undefined"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(u=typeof globalThis!="undefined"?globalThis:u||self,a(u.index={},u.Vue))})(this,function(u,a){"use strict";const w={value:{type:Number,required:!0},format:{type:String,default:"HH:mm:ss"},prefix:{type:String,default:""},suffix:{type:String,default:""},valueStyle:{type:Object,default:()=>({})}},M=e=>{const t=new Map([["Y",0],["M",0],["D",0],["H",0],["m",0],["s",0],["S",0]]),n=Math.floor(e/(365*24*60*60*1e3)),s=Math.floor(e/(30*24*60*60*1e3)%12),o=Math.floor(e/(24*60*60*1e3)%30),r=Math.floor(e/(60*60*1e3)%24),h=Math.floor(e/(60*1e3)%60),d=Math.floor(e/1e3%60),S=e%1e3;return t.set("Y",n),t.set("M",s),t.set("D",o),t.set("H",r),t.set("m",h),t.set("s",d),t.set("S",S),t},p=(e,t)=>{const n=new Map([["Y",0],["M",0],["D",0],["H",0],["m",0],["s",0],["S",0]]),s=new Map([["Y",12],["M",30],["D",24],["H",60],["m",60],["s",1e3],["S",1]]);let o=0;for(const r of n.keys())e.has(r)?(n.set(r,t.get(r)+o),o=0):o+=t.get(r)*s.get(r);return!e.has("S")&&t.get("S")>500&&n.set("s",n.get("s")+1),n},y=e=>{const t=new Set(["Y","M","D","H","m","s","S"]),n=[];for(let s=0;s<e.length;s++){const o=e[s];n.length===0||n[n.length-1].k!==o||!t.has(o)?n.push({k:o,n:1}):n[n.length-1].n++}return n},v=e=>{const t=new Set(["Y","M","D","H","m","s","S"]),n=new Set;for(let s=0;s<e.length;s++){const o=e[s];t.has(o)&&n.add(o)}return n},D=(e,t)=>{const n=10**t-1;if(e>=n)return e;{const s=t-e.toString().length;let o="";for(let r=0;r<s;r++)o+="0";return o+e}};var T="",g=a.defineComponent({name:"DCountdown",props:w,emits:["onChange","onFinish"],setup(e,t){const n=a.ref(),s=v(e.format),o=y(e.format),r=a.ref(""),h=c=>{const l=new Set(["Y","M","D","H","m","s","S"]),f=o.reduce((i,m)=>l.has(m.k)?i+D(c.get(m.k),m.n):i+m.k,"");r.value=f},d=()=>{const c=new Date(e.value).getTime(),l=c>new Date().getTime()?c-new Date().getTime():0,f=M(l),i=p(s,f);return!t.slots.default&&h(i),t.emit("onChange",{leftTime:l,formatTime:f,legalTime:i}),l},S=()=>{d(),!n.value&&(n.value=setInterval(()=>{d()===0&&(t.emit("onFinish"),clearInterval(n.value))},s.has("S")?100:1e3))};return a.onMounted(()=>{S()}),a.onUnmounted(()=>{clearInterval(n.value)}),()=>a.createVNode("div",{class:"devui-countdown"},[t.slots.default?t.slots.default():a.createVNode("div",{class:"countdown-content",style:e.valueStyle},[a.createVNode("span",{class:"countdown-prefix"},[e.prefix]),a.createVNode("span",{class:"countdown-value"},[r.value]),a.createVNode("span",{class:"countdown-suffix"},[e.suffix])])])}}),H={title:"Countdown \u5012\u8BA1\u65F6",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(e){e.component(g.name,g)}};u.Countdown=g,u.countdownProps=w,u.default=H,Object.defineProperty(u,"__esModule",{value:!0}),u[Symbol.toStringTag]="Module"});
File without changes