vue-devui 1.0.0-rc.9 → 1.0.2

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 (208) hide show
  1. package/README.md +189 -149
  2. package/alert/index.es.js +12 -7
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8036 -260
  6. package/auto-complete/index.umd.js +29 -3
  7. package/auto-complete/style.css +1 -1
  8. package/badge/index.es.js +8 -2
  9. package/badge/index.umd.js +1 -1
  10. package/badge/style.css +1 -1
  11. package/button/index.es.js +110 -45
  12. package/button/index.umd.js +15 -15
  13. package/button/style.css +1 -1
  14. package/card/index.es.js +5 -1
  15. package/card/index.umd.js +1 -1
  16. package/card/style.css +1 -1
  17. package/checkbox/index.es.js +7778 -81
  18. package/checkbox/index.umd.js +27 -1
  19. package/checkbox/style.css +1 -1
  20. package/{date-picker → collapse}/index.d.ts +0 -0
  21. package/collapse/index.es.js +213 -0
  22. package/collapse/index.umd.js +1 -0
  23. package/{date-picker → collapse}/package.json +1 -1
  24. package/collapse/style.css +1 -0
  25. package/countdown/index.es.js +56 -13
  26. package/countdown/index.umd.js +1 -1
  27. package/date-picker-pro/index.d.ts +7 -0
  28. package/date-picker-pro/index.es.js +12022 -0
  29. package/date-picker-pro/index.umd.js +27 -0
  30. package/date-picker-pro/package.json +7 -0
  31. package/date-picker-pro/style.css +1 -0
  32. package/drawer/index.es.js +22 -5
  33. package/drawer/index.umd.js +1 -1
  34. package/drawer/style.css +1 -1
  35. package/dropdown/index.es.js +92 -123
  36. package/dropdown/index.umd.js +1 -1
  37. package/dropdown/style.css +1 -1
  38. package/editable-select/index.es.js +374 -149
  39. package/editable-select/index.umd.js +1 -1
  40. package/editable-select/style.css +1 -1
  41. package/form/index.es.js +102 -123
  42. package/form/index.umd.js +14 -14
  43. package/form/style.css +1 -1
  44. package/icon/index.es.js +107 -41
  45. package/icon/index.umd.js +1 -1
  46. package/icon/style.css +1 -1
  47. package/image-preview/style.css +1 -1
  48. package/input/index.es.js +8097 -170
  49. package/input/index.umd.js +27 -1
  50. package/input/style.css +1 -1
  51. package/input-number/index.es.js +34 -32
  52. package/input-number/index.umd.js +1 -1
  53. package/input-number/style.css +1 -1
  54. package/layout/index.es.js +1 -1
  55. package/layout/index.umd.js +1 -1
  56. package/loading/index.es.js +51 -51
  57. package/loading/index.umd.js +1 -1
  58. package/loading/style.css +1 -1
  59. package/mention/index.d.ts +7 -0
  60. package/mention/index.es.js +8326 -0
  61. package/mention/index.umd.js +36 -0
  62. package/mention/package.json +7 -0
  63. package/mention/style.css +1 -0
  64. package/menu/index.d.ts +7 -0
  65. package/menu/index.es.js +921 -0
  66. package/menu/index.umd.js +1 -0
  67. package/menu/package.json +7 -0
  68. package/menu/style.css +1 -0
  69. package/message/index.d.ts +7 -0
  70. package/message/index.es.js +539 -0
  71. package/message/index.umd.js +1 -0
  72. package/message/package.json +7 -0
  73. package/message/style.css +1 -0
  74. package/modal/index.es.js +390 -185
  75. package/modal/index.umd.js +1 -1
  76. package/modal/style.css +1 -1
  77. package/notification/index.es.js +148 -79
  78. package/notification/index.umd.js +1 -1
  79. package/notification/style.css +1 -1
  80. package/nuxt/components/Collapse.js +3 -0
  81. package/nuxt/components/CollapseItem.js +3 -0
  82. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  83. package/nuxt/components/DatePickerPro.js +3 -0
  84. package/nuxt/components/IconGroup.js +3 -0
  85. package/nuxt/components/Mention.js +3 -0
  86. package/nuxt/components/Menu.js +3 -0
  87. package/nuxt/components/MenuItem.js +3 -0
  88. package/nuxt/components/Message.js +3 -0
  89. package/nuxt/components/OptionGroup.js +3 -0
  90. package/nuxt/components/RadioButton.js +3 -0
  91. package/nuxt/components/Step.js +3 -0
  92. package/nuxt/components/Steps.js +3 -0
  93. package/nuxt/components/SubMenu.js +3 -0
  94. package/nuxt/components/TABLE_TOKEN.js +3 -0
  95. package/nuxt/components/TimePicker.js +3 -0
  96. package/nuxt/components/TimeSelect.js +3 -0
  97. package/nuxt/components/animationInjectionKey.js +3 -0
  98. package/nuxt/components/collapseItemProps.js +3 -0
  99. package/nuxt/components/collapseProps.js +3 -0
  100. package/nuxt/components/datePickerProCommonProps.js +3 -0
  101. package/nuxt/components/datePickerProPanelProps.js +3 -0
  102. package/nuxt/components/datePickerProProps.js +3 -0
  103. package/nuxt/components/mentionProps.js +3 -0
  104. package/nuxt/components/messageProps.js +3 -0
  105. package/nuxt/components/paginationInjectionKey.js +3 -0
  106. package/nuxt/components/roundInjectionKey.js +3 -0
  107. package/nuxt/components/skeletonItemProps.js +3 -0
  108. package/nuxt/components/stepProps.js +3 -0
  109. package/nuxt/components/stepsProps.js +3 -0
  110. package/nuxt/components/tableProps.js +3 -0
  111. package/nuxt/components/timerPickerPanelProps.js +3 -0
  112. package/nuxt/components/treeNodeProps.js +3 -0
  113. package/overlay/index.es.js +87 -140
  114. package/overlay/index.umd.js +1 -1
  115. package/overlay/style.css +1 -1
  116. package/package.json +7 -4
  117. package/pagination/index.es.js +10180 -129
  118. package/pagination/index.umd.js +27 -1
  119. package/pagination/style.css +1 -1
  120. package/panel/index.es.js +4 -0
  121. package/panel/index.umd.js +1 -1
  122. package/panel/style.css +1 -1
  123. package/popover/index.es.js +111 -164
  124. package/popover/index.umd.js +16 -16
  125. package/popover/style.css +1 -1
  126. package/progress/style.css +1 -1
  127. package/radio/index.es.js +7860 -58
  128. package/radio/index.umd.js +27 -1
  129. package/radio/style.css +1 -1
  130. package/rate/style.css +1 -1
  131. package/result/index.es.js +93 -41
  132. package/result/index.umd.js +1 -1
  133. package/result/style.css +1 -1
  134. package/search/index.es.js +3737 -1206
  135. package/search/index.umd.js +18 -18
  136. package/search/style.css +1 -1
  137. package/select/index.es.js +4446 -2499
  138. package/select/index.umd.js +17 -17
  139. package/select/style.css +1 -1
  140. package/skeleton/index.es.js +87 -261
  141. package/skeleton/index.umd.js +1 -1
  142. package/skeleton/style.css +1 -1
  143. package/slider/index.es.js +116 -143
  144. package/slider/index.umd.js +1 -1
  145. package/slider/style.css +1 -1
  146. package/splitter/index.es.js +284 -152
  147. package/splitter/index.umd.js +16 -16
  148. package/splitter/style.css +1 -1
  149. package/statistic/index.es.js +34 -16
  150. package/statistic/index.umd.js +1 -1
  151. package/statistic/style.css +1 -1
  152. package/status/index.es.js +4 -0
  153. package/status/index.umd.js +1 -1
  154. package/status/style.css +1 -1
  155. package/steps/index.d.ts +7 -0
  156. package/steps/index.es.js +387 -0
  157. package/steps/index.umd.js +1 -0
  158. package/steps/package.json +7 -0
  159. package/steps/style.css +1 -0
  160. package/style.css +1 -1
  161. package/switch/index.es.js +7785 -60
  162. package/switch/index.umd.js +27 -1
  163. package/switch/style.css +1 -1
  164. package/table/index.es.js +4224 -1502
  165. package/table/index.umd.js +17 -17
  166. package/table/style.css +1 -1
  167. package/tabs/index.es.js +281 -83
  168. package/tabs/index.umd.js +1 -1
  169. package/tabs/style.css +1 -1
  170. package/tag/index.es.js +5 -1
  171. package/tag/index.umd.js +1 -1
  172. package/tag/style.css +1 -1
  173. package/textarea/index.es.js +3362 -1061
  174. package/textarea/index.umd.js +19 -19
  175. package/textarea/style.css +1 -1
  176. package/time-picker/index.d.ts +7 -0
  177. package/time-picker/index.es.js +9549 -0
  178. package/time-picker/index.umd.js +27 -0
  179. package/time-picker/package.json +7 -0
  180. package/time-picker/style.css +1 -0
  181. package/time-select/index.d.ts +7 -0
  182. package/time-select/index.es.js +9610 -0
  183. package/time-select/index.umd.js +27 -0
  184. package/time-select/package.json +7 -0
  185. package/time-select/style.css +1 -0
  186. package/timeline/index.es.js +93 -41
  187. package/timeline/index.umd.js +1 -1
  188. package/timeline/style.css +1 -1
  189. package/tooltip/index.es.js +127 -168
  190. package/tooltip/index.umd.js +16 -16
  191. package/tooltip/style.css +1 -1
  192. package/tree/index.es.js +11045 -607
  193. package/tree/index.umd.js +27 -1
  194. package/tree/style.css +1 -1
  195. package/upload/index.es.js +394 -111
  196. package/upload/index.umd.js +1 -1
  197. package/upload/style.css +1 -1
  198. package/vue-devui.es.js +19687 -11762
  199. package/vue-devui.umd.js +24 -23
  200. package/date-picker/index.es.js +0 -1298
  201. package/date-picker/index.umd.js +0 -1
  202. package/date-picker/style.css +0 -1
  203. package/nuxt/components/DatePicker.js +0 -3
  204. package/nuxt/components/Loading.js +0 -3
  205. package/nuxt/components/StickSlider.js +0 -3
  206. package/nuxt/components/formControlProps.js +0 -3
  207. package/nuxt/components/overlayEmits.js +0 -3
  208. package/nuxt/components/overlayProps.js +0 -3
@@ -19,9 +19,6 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, ref, h, render, inject, withDirectives, resolveDirective, provide, toRef } from "vue";
22
- function isUrl(value) {
23
- return /^((http|https):)?\/\//.test(value);
24
- }
25
22
  const DEFAULT_PREFIX = "icon";
26
23
  const iconProps = {
27
24
  name: {
@@ -44,6 +41,17 @@ const iconProps = {
44
41
  classPrefix: {
45
42
  type: String,
46
43
  default: DEFAULT_PREFIX
44
+ },
45
+ operable: {
46
+ type: Boolean,
47
+ default: false
48
+ },
49
+ disabled: {
50
+ type: Boolean,
51
+ default: false
52
+ },
53
+ rotate: {
54
+ type: [Number, String]
47
55
  }
48
56
  };
49
57
  const svgIconProps = {
@@ -114,51 +122,108 @@ var svgIcon = defineComponent({
114
122
  };
115
123
  }
116
124
  });
125
+ function isUrl(value) {
126
+ return /^((http|https):)?\/\//.test(value);
127
+ }
128
+ function useIconDom(props, ctx) {
129
+ const {
130
+ component,
131
+ name,
132
+ size,
133
+ color,
134
+ classPrefix,
135
+ rotate
136
+ } = toRefs(props);
137
+ const ns = useNamespace("icon");
138
+ const iconSize = computed(() => {
139
+ return typeof size.value === "number" ? `${size.value}px` : size.value;
140
+ });
141
+ const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
142
+ const imgIconDom = () => {
143
+ return createVNode("img", mergeProps({
144
+ "src": name.value,
145
+ "alt": name.value.split("/")[name.value.split("/").length - 1],
146
+ "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
147
+ "style": {
148
+ width: iconSize.value || "",
149
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
150
+ verticalAlign: "middle"
151
+ }
152
+ }, ctx.attrs), null);
153
+ };
154
+ const svgIconDom = () => {
155
+ return createVNode(IconComponent, mergeProps({
156
+ "name": name.value,
157
+ "color": color.value,
158
+ "size": iconSize.value,
159
+ "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
160
+ "style": {
161
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
162
+ }
163
+ }, ctx.attrs), null);
164
+ };
165
+ const fontIconDom = () => {
166
+ const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
167
+ return createVNode("i", mergeProps({
168
+ "class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
169
+ "style": {
170
+ fontSize: iconSize.value,
171
+ color: color.value,
172
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
173
+ }
174
+ }, ctx.attrs), null);
175
+ };
176
+ const iconDom = () => {
177
+ return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
178
+ };
179
+ return {
180
+ iconDom
181
+ };
182
+ }
117
183
  var Icon = defineComponent({
118
184
  name: "DIcon",
119
185
  props: iconProps,
120
- setup(props, {
121
- attrs
122
- }) {
186
+ emits: ["click"],
187
+ setup(props, ctx) {
123
188
  const {
124
- component,
125
- name,
126
- size,
127
- color,
128
- classPrefix
189
+ disabled,
190
+ operable
129
191
  } = toRefs(props);
130
- const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
131
- const iconSize = computed(() => {
132
- return typeof size.value === "number" ? `${size.value}px` : size.value;
133
- });
134
- const svgIconDom = () => {
135
- return createVNode(IconComponent, mergeProps({
136
- "name": name.value,
137
- "color": color.value,
138
- "size": iconSize.value
139
- }, attrs), null);
140
- };
141
- const imgIconDom = () => {
142
- return createVNode("img", mergeProps({
143
- "src": name.value,
144
- "alt": name.value.split("/")[name.value.split("/").length - 1],
145
- "style": {
146
- width: iconSize.value || ""
147
- }
148
- }, attrs), null);
192
+ const {
193
+ iconDom
194
+ } = useIconDom(props, ctx);
195
+ const ns = useNamespace("icon");
196
+ const wrapClassed = computed(() => ({
197
+ [ns.e("container")]: true,
198
+ [ns.m("disabled")]: disabled.value,
199
+ [ns.m("operable")]: operable.value,
200
+ [ns.m("no-slots")]: !Object.keys(ctx.slots).length
201
+ }));
202
+ const onClick = (e) => {
203
+ if (disabled.value) {
204
+ return;
205
+ }
206
+ ctx.emit("click", e);
149
207
  };
150
- const fontIconDom = () => {
151
- const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
152
- return createVNode("i", mergeProps({
153
- "class": [classPrefix.value, fontIconClass],
154
- "style": {
155
- fontSize: iconSize.value,
156
- color: color.value
157
- }
158
- }, attrs), null);
208
+ return () => {
209
+ var _a, _b, _c, _d;
210
+ return createVNode("div", {
211
+ "class": wrapClassed.value,
212
+ "onClick": onClick
213
+ }, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
159
214
  };
215
+ }
216
+ });
217
+ var iconGroup = "";
218
+ defineComponent({
219
+ name: "DIconGroup",
220
+ setup(_, ctx) {
221
+ const ns = useNamespace("icon-group");
160
222
  return () => {
161
- return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
223
+ var _a, _b;
224
+ return createVNode("div", {
225
+ "class": ns.b()
226
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
162
227
  };
163
228
  }
164
229
  });
@@ -194,7 +259,7 @@ class LoadingOptions {
194
259
  }
195
260
  var loading = "";
196
261
  var Loading = defineComponent({
197
- name: "DLoading",
262
+ name: "Loading",
198
263
  inheritAttrs: false,
199
264
  props: loadingProps,
200
265
  setup(props) {
@@ -347,12 +412,12 @@ const handleProps = (el, vprops) => {
347
412
  const props = __spreadValues(__spreadValues({}, new LoadingOptions()), vprops);
348
413
  const loadingTemplateRef = props.loadingTemplateRef;
349
414
  const loadingInstance = createComponent(loadingConstructor, __spreadValues({}, props), loadingTemplateRef ? () => loadingTemplateRef : null);
350
- el.style.position = props.positionType;
415
+ el.style.position = props.positionType || "relative";
351
416
  el.options = props;
352
417
  el.instance = loadingInstance;
353
418
  el.mask = (_a = loadingInstance == null ? void 0 : loadingInstance.proxy) == null ? void 0 : _a.$el;
354
419
  };
355
- const loadingDirective = {
420
+ const LoadingDirective = {
356
421
  mounted: function(el, binding, vnode) {
357
422
  handleProps(el, vnode.props);
358
423
  removeAttribute(el);
@@ -5854,7 +5919,7 @@ var button = "";
5854
5919
  var Button = defineComponent({
5855
5920
  name: "DButton",
5856
5921
  directives: {
5857
- dLoading: loadingDirective
5922
+ Loading: LoadingDirective
5858
5923
  },
5859
5924
  props: buttonProps,
5860
5925
  emits: ["click"],
@@ -5887,7 +5952,7 @@ var Button = defineComponent({
5887
5952
  "class": iconClass.value
5888
5953
  }, null), createVNode("span", {
5889
5954
  "class": "button-content"
5890
- }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])]), [[resolveDirective("dLoading"), loading2.value]]);
5955
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])]), [[resolveDirective("loading"), loading2.value]]);
5891
5956
  };
5892
5957
  }
5893
5958
  });