vue-devui 1.0.0-rc.9 → 1.0.0

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 (200) hide show
  1. package/README.md +163 -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 +8019 -254
  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 +104 -40
  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 +7772 -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 +12020 -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 +1 -1
  33. package/drawer/index.umd.js +1 -1
  34. package/drawer/style.css +1 -1
  35. package/dropdown/index.es.js +77 -121
  36. package/dropdown/index.umd.js +1 -1
  37. package/dropdown/style.css +1 -1
  38. package/editable-select/index.es.js +324 -104
  39. package/editable-select/index.umd.js +1 -1
  40. package/editable-select/style.css +1 -1
  41. package/form/index.es.js +91 -118
  42. package/form/index.umd.js +14 -14
  43. package/form/style.css +1 -1
  44. package/icon/index.es.js +106 -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 +8088 -169
  49. package/input/index.umd.js +27 -1
  50. package/input/style.css +1 -1
  51. package/input-number/index.es.js +8 -9
  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/style.css +1 -1
  57. package/mention/index.d.ts +7 -0
  58. package/mention/index.es.js +8310 -0
  59. package/mention/index.umd.js +36 -0
  60. package/mention/package.json +7 -0
  61. package/mention/style.css +1 -0
  62. package/menu/index.d.ts +7 -0
  63. package/menu/index.es.js +934 -0
  64. package/menu/index.umd.js +1 -0
  65. package/menu/package.json +7 -0
  66. package/menu/style.css +1 -0
  67. package/message/index.d.ts +7 -0
  68. package/message/index.es.js +538 -0
  69. package/message/index.umd.js +1 -0
  70. package/message/package.json +7 -0
  71. package/message/style.css +1 -0
  72. package/modal/index.es.js +275 -185
  73. package/modal/index.umd.js +1 -1
  74. package/modal/style.css +1 -1
  75. package/notification/index.es.js +143 -72
  76. package/notification/index.umd.js +1 -1
  77. package/notification/style.css +1 -1
  78. package/nuxt/components/Collapse.js +3 -0
  79. package/nuxt/components/CollapseItem.js +3 -0
  80. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  81. package/nuxt/components/DatePickerPro.js +3 -0
  82. package/nuxt/components/IconGroup.js +3 -0
  83. package/nuxt/components/Mention.js +3 -0
  84. package/nuxt/components/Menu.js +3 -0
  85. package/nuxt/components/MenuItem.js +3 -0
  86. package/nuxt/components/Message.js +3 -0
  87. package/nuxt/components/OptionGroup.js +3 -0
  88. package/nuxt/components/RadioButton.js +3 -0
  89. package/nuxt/components/Step.js +3 -0
  90. package/nuxt/components/Steps.js +3 -0
  91. package/nuxt/components/SubMenu.js +3 -0
  92. package/nuxt/components/TABLE_TOKEN.js +3 -0
  93. package/nuxt/components/TimePicker.js +3 -0
  94. package/nuxt/components/TimeSelect.js +3 -0
  95. package/nuxt/components/animationInjectionKey.js +3 -0
  96. package/nuxt/components/collapseItemProps.js +3 -0
  97. package/nuxt/components/collapseProps.js +3 -0
  98. package/nuxt/components/datePickerProCommonProps.js +3 -0
  99. package/nuxt/components/datePickerProPanelProps.js +3 -0
  100. package/nuxt/components/datePickerProProps.js +3 -0
  101. package/nuxt/components/mentionProps.js +3 -0
  102. package/nuxt/components/messageProps.js +3 -0
  103. package/nuxt/components/roundInjectionKey.js +3 -0
  104. package/nuxt/components/skeletonItemProps.js +3 -0
  105. package/nuxt/components/stepProps.js +3 -0
  106. package/nuxt/components/stepsProps.js +3 -0
  107. package/nuxt/components/tableProps.js +3 -0
  108. package/nuxt/components/timerPickerPanelProps.js +3 -0
  109. package/nuxt/components/treeNodeProps.js +3 -0
  110. package/overlay/index.es.js +76 -139
  111. package/overlay/index.umd.js +1 -1
  112. package/overlay/style.css +1 -1
  113. package/package.json +6 -3
  114. package/pagination/index.es.js +175 -7
  115. package/pagination/index.umd.js +1 -1
  116. package/pagination/style.css +1 -1
  117. package/panel/style.css +1 -1
  118. package/popover/index.es.js +101 -162
  119. package/popover/index.umd.js +17 -17
  120. package/popover/style.css +1 -1
  121. package/progress/style.css +1 -1
  122. package/radio/index.es.js +7854 -58
  123. package/radio/index.umd.js +27 -1
  124. package/radio/style.css +1 -1
  125. package/rate/style.css +1 -1
  126. package/result/index.es.js +92 -41
  127. package/result/index.umd.js +1 -1
  128. package/result/style.css +1 -1
  129. package/search/index.es.js +3729 -1206
  130. package/search/index.umd.js +18 -18
  131. package/search/style.css +1 -1
  132. package/select/index.es.js +4426 -2501
  133. package/select/index.umd.js +17 -17
  134. package/select/style.css +1 -1
  135. package/skeleton/index.es.js +87 -261
  136. package/skeleton/index.umd.js +1 -1
  137. package/skeleton/style.css +1 -1
  138. package/slider/index.es.js +116 -143
  139. package/slider/index.umd.js +1 -1
  140. package/slider/style.css +1 -1
  141. package/splitter/index.es.js +256 -147
  142. package/splitter/index.umd.js +16 -16
  143. package/splitter/style.css +1 -1
  144. package/statistic/index.es.js +34 -16
  145. package/statistic/index.umd.js +1 -1
  146. package/statistic/style.css +1 -1
  147. package/status/style.css +1 -1
  148. package/steps/index.d.ts +7 -0
  149. package/steps/index.es.js +386 -0
  150. package/steps/index.umd.js +1 -0
  151. package/steps/package.json +7 -0
  152. package/steps/style.css +1 -0
  153. package/style.css +1 -1
  154. package/switch/index.es.js +7779 -60
  155. package/switch/index.umd.js +27 -1
  156. package/switch/style.css +1 -1
  157. package/table/index.es.js +4092 -1464
  158. package/table/index.umd.js +17 -17
  159. package/table/style.css +1 -1
  160. package/tabs/index.es.js +224 -77
  161. package/tabs/index.umd.js +1 -1
  162. package/tabs/style.css +1 -1
  163. package/tag/index.es.js +5 -1
  164. package/tag/index.umd.js +1 -1
  165. package/tag/style.css +1 -1
  166. package/textarea/index.es.js +3357 -1064
  167. package/textarea/index.umd.js +19 -19
  168. package/textarea/style.css +1 -1
  169. package/time-picker/index.d.ts +7 -0
  170. package/time-picker/index.es.js +9549 -0
  171. package/time-picker/index.umd.js +27 -0
  172. package/time-picker/package.json +7 -0
  173. package/time-picker/style.css +1 -0
  174. package/time-select/index.d.ts +7 -0
  175. package/time-select/index.es.js +9585 -0
  176. package/time-select/index.umd.js +27 -0
  177. package/time-select/package.json +7 -0
  178. package/time-select/style.css +1 -0
  179. package/timeline/index.es.js +92 -41
  180. package/timeline/index.umd.js +1 -1
  181. package/timeline/style.css +1 -1
  182. package/tooltip/index.es.js +100 -163
  183. package/tooltip/index.umd.js +16 -16
  184. package/tooltip/style.css +1 -1
  185. package/tree/index.es.js +11036 -608
  186. package/tree/index.umd.js +27 -1
  187. package/tree/style.css +1 -1
  188. package/upload/index.es.js +389 -105
  189. package/upload/index.umd.js +1 -1
  190. package/upload/style.css +1 -1
  191. package/vue-devui.es.js +17291 -9726
  192. package/vue-devui.umd.js +24 -23
  193. package/date-picker/index.es.js +0 -1298
  194. package/date-picker/index.umd.js +0 -1
  195. package/date-picker/style.css +0 -1
  196. package/nuxt/components/DatePicker.js +0 -3
  197. package/nuxt/components/StickSlider.js +0 -3
  198. package/nuxt/components/formControlProps.js +0 -3
  199. package/nuxt/components/overlayEmits.js +0 -3
  200. 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,107 @@ 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
+ }));
201
+ const onClick = (e) => {
202
+ if (disabled.value) {
203
+ return;
204
+ }
205
+ ctx.emit("click", e);
149
206
  };
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);
207
+ return () => {
208
+ var _a, _b, _c, _d;
209
+ return createVNode("div", {
210
+ "class": wrapClassed.value,
211
+ "onClick": onClick
212
+ }, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
159
213
  };
214
+ }
215
+ });
216
+ var iconGroup = "";
217
+ defineComponent({
218
+ name: "DIconGroup",
219
+ setup(_, ctx) {
220
+ const ns = useNamespace("icon-group");
160
221
  return () => {
161
- return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
222
+ var _a, _b;
223
+ return createVNode("div", {
224
+ "class": ns.b()
225
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
162
226
  };
163
227
  }
164
228
  });