vue-devui 1.0.0-beta.9 → 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 (294) hide show
  1. package/README.md +100 -72
  2. package/accordion/index.es.js +525 -39
  3. package/accordion/index.umd.js +1 -1
  4. package/accordion/style.css +1 -1
  5. package/alert/index.es.js +34 -37
  6. package/alert/index.umd.js +1 -1
  7. package/alert/style.css +1 -1
  8. package/{time-axis → auto-complete}/index.d.ts +0 -0
  9. package/auto-complete/index.es.js +983 -0
  10. package/auto-complete/index.umd.js +1 -0
  11. package/auto-complete/package.json +7 -0
  12. package/auto-complete/style.css +1 -0
  13. package/back-top/index.es.js +5 -3
  14. package/back-top/index.umd.js +1 -1
  15. package/badge/index.es.js +13 -19
  16. package/badge/index.umd.js +1 -1
  17. package/badge/style.css +1 -1
  18. package/breadcrumb/index.es.js +2 -1
  19. package/button/index.es.js +296 -117
  20. package/button/index.umd.js +1 -1
  21. package/button/style.css +1 -1
  22. package/carousel/index.es.js +43 -57
  23. package/carousel/index.umd.js +1 -1
  24. package/cascader/index.es.js +5412 -784
  25. package/cascader/index.umd.js +27 -1
  26. package/cascader/style.css +1 -1
  27. package/checkbox/style.css +1 -1
  28. package/{toast → color-picker}/index.d.ts +0 -0
  29. package/color-picker/index.es.js +8196 -0
  30. package/color-picker/index.umd.js +27 -0
  31. package/color-picker/package.json +7 -0
  32. package/color-picker/style.css +1 -0
  33. package/comment/index.es.js +42 -13
  34. package/comment/index.umd.js +1 -1
  35. package/comment/style.css +1 -1
  36. package/countdown/index.es.js +27 -17
  37. package/countdown/index.umd.js +1 -1
  38. package/countdown/style.css +1 -1
  39. package/date-picker/index.es.js +48 -66
  40. package/date-picker/index.umd.js +1 -1
  41. package/date-picker/style.css +1 -1
  42. package/dragdrop/index.es.js +135 -10
  43. package/dragdrop/index.umd.js +1 -1
  44. package/drawer/index.es.js +169 -223
  45. package/drawer/index.umd.js +1 -1
  46. package/drawer/style.css +1 -1
  47. package/dropdown/index.es.js +463 -300
  48. package/dropdown/index.umd.js +1 -1
  49. package/dropdown/style.css +1 -1
  50. package/editable-select/index.es.js +293 -5660
  51. package/editable-select/index.umd.js +1 -27
  52. package/editable-select/style.css +1 -1
  53. package/form/index.es.js +6210 -531
  54. package/form/index.umd.js +27 -1
  55. package/form/style.css +1 -1
  56. package/fullscreen/index.es.js +112 -133
  57. package/fullscreen/index.umd.js +1 -1
  58. package/fullscreen/style.css +1 -1
  59. package/gantt/index.es.js +6 -18
  60. package/gantt/index.umd.js +1 -1
  61. package/gantt/style.css +1 -1
  62. package/grid/index.es.js +1 -1
  63. package/grid/style.css +1 -1
  64. package/icon/index.es.js +39 -56
  65. package/icon/index.umd.js +1 -1
  66. package/image-preview/index.es.js +35 -16
  67. package/image-preview/index.umd.js +1 -1
  68. package/input/index.es.js +4 -5
  69. package/input/index.umd.js +1 -1
  70. package/input/style.css +1 -1
  71. package/input-icon/index.es.js +42 -41
  72. package/input-icon/index.umd.js +1 -1
  73. package/input-icon/style.css +1 -1
  74. package/input-number/index.es.js +46 -56
  75. package/input-number/index.umd.js +1 -1
  76. package/input-number/style.css +1 -1
  77. package/list/index.d.ts +7 -0
  78. package/list/index.es.js +39 -0
  79. package/list/index.umd.js +1 -0
  80. package/{toast → list}/package.json +1 -1
  81. package/list/style.css +1 -0
  82. package/loading/index.es.js +2 -2
  83. package/modal/index.es.js +304 -765
  84. package/modal/index.umd.js +1 -1
  85. package/modal/style.css +1 -1
  86. package/nav-sprite/index.es.js +1 -675
  87. package/nav-sprite/index.umd.js +1 -1
  88. package/notification/index.d.ts +7 -0
  89. package/notification/index.es.js +284 -0
  90. package/notification/index.umd.js +1 -0
  91. package/notification/package.json +7 -0
  92. package/notification/style.css +1 -0
  93. package/nuxt/components/Accordion.js +3 -0
  94. package/nuxt/components/Alert.js +3 -0
  95. package/nuxt/components/Anchor.js +3 -0
  96. package/nuxt/components/Aside.js +3 -0
  97. package/nuxt/components/AutoComplete.js +3 -0
  98. package/nuxt/components/Avatar.js +3 -0
  99. package/nuxt/components/BackTop.js +3 -0
  100. package/nuxt/components/Badge.js +3 -0
  101. package/nuxt/components/Breadcrumb.js +3 -0
  102. package/nuxt/components/Button.js +3 -0
  103. package/nuxt/components/Card.js +3 -0
  104. package/nuxt/components/Carousel.js +3 -0
  105. package/nuxt/components/CarouselItem.js +3 -0
  106. package/nuxt/components/Cascader.js +3 -0
  107. package/nuxt/components/Checkbox.js +3 -0
  108. package/nuxt/components/Col.js +3 -0
  109. package/nuxt/components/ColorPicker.js +3 -0
  110. package/nuxt/components/Column.js +3 -0
  111. package/nuxt/components/Comment.js +3 -0
  112. package/nuxt/components/Content.js +3 -0
  113. package/nuxt/components/Countdown.js +3 -0
  114. package/nuxt/components/DatePicker.js +3 -0
  115. package/nuxt/components/Drawer.js +3 -0
  116. package/nuxt/components/DrawerService.js +3 -0
  117. package/nuxt/components/Dropdown.js +3 -0
  118. package/nuxt/components/DropdownMenu.js +3 -0
  119. package/nuxt/components/EditableSelect.js +3 -0
  120. package/nuxt/components/FixedOverlay.js +3 -0
  121. package/nuxt/components/FlexibleOverlay.js +3 -0
  122. package/nuxt/components/Footer.js +3 -0
  123. package/nuxt/components/Form.js +3 -0
  124. package/nuxt/components/FormControl.js +3 -0
  125. package/nuxt/components/FormItem.js +3 -0
  126. package/nuxt/components/FormLabel.js +3 -0
  127. package/nuxt/components/FormOperation.js +3 -0
  128. package/nuxt/components/Fullscreen.js +3 -0
  129. package/nuxt/components/Gantt.js +3 -0
  130. package/nuxt/components/Header.js +3 -0
  131. package/nuxt/components/IFileOptions.js +3 -0
  132. package/nuxt/components/IUploadOptions.js +3 -0
  133. package/nuxt/components/Icon.js +2 -0
  134. package/nuxt/components/ImagePreviewService.js +3 -0
  135. package/nuxt/components/Input.js +3 -0
  136. package/nuxt/components/InputIcon.js +3 -0
  137. package/nuxt/components/InputNumber.js +3 -0
  138. package/nuxt/components/Layout.js +3 -0
  139. package/nuxt/components/List.js +3 -0
  140. package/nuxt/components/ListItem.js +3 -0
  141. package/nuxt/components/Loading.js +3 -0
  142. package/nuxt/components/LoadingService.js +3 -0
  143. package/nuxt/components/Modal.js +3 -0
  144. package/nuxt/components/NavSprite.js +2 -0
  145. package/nuxt/components/Notification.js +3 -0
  146. package/nuxt/components/NotificationService.js +3 -0
  147. package/nuxt/components/Pagination.js +3 -0
  148. package/nuxt/components/Panel.js +3 -0
  149. package/nuxt/components/PanelBody.js +3 -0
  150. package/nuxt/components/PanelFooter.js +3 -0
  151. package/nuxt/components/PanelHeader.js +3 -0
  152. package/nuxt/components/Popover.js +3 -0
  153. package/nuxt/components/Progress.js +3 -0
  154. package/nuxt/components/QuadrantDiagram.js +3 -0
  155. package/nuxt/components/Radio.js +3 -0
  156. package/nuxt/components/RadioGroup.js +3 -0
  157. package/nuxt/components/Rate.js +3 -0
  158. package/nuxt/components/ReadTip.js +3 -0
  159. package/nuxt/components/Result.js +3 -0
  160. package/nuxt/components/Row.js +3 -0
  161. package/nuxt/components/Search.js +3 -0
  162. package/nuxt/components/Select.js +3 -0
  163. package/nuxt/components/Skeleton.js +3 -0
  164. package/nuxt/components/SkeletonItem.js +3 -0
  165. package/nuxt/components/Slider.js +3 -0
  166. package/nuxt/components/Splitter.js +3 -0
  167. package/nuxt/components/Statistic.js +3 -0
  168. package/nuxt/components/Status.js +3 -0
  169. package/nuxt/components/StepsGuide.js +3 -0
  170. package/nuxt/components/StickSlider.js +3 -0
  171. package/nuxt/components/Sticky.js +2 -0
  172. package/nuxt/components/Switch.js +3 -0
  173. package/nuxt/components/Table.js +3 -0
  174. package/nuxt/components/Tabs.js +3 -0
  175. package/nuxt/components/Tag.js +3 -0
  176. package/nuxt/components/TagInput.js +3 -0
  177. package/nuxt/components/Textarea.js +3 -0
  178. package/nuxt/components/TimePicker.js +3 -0
  179. package/nuxt/components/Timeline.js +3 -0
  180. package/nuxt/components/TimelineItem.js +3 -0
  181. package/nuxt/components/Tooltip.js +3 -0
  182. package/nuxt/components/Transfer.js +3 -0
  183. package/nuxt/components/Tree.js +3 -0
  184. package/nuxt/components/TreeSelect.js +3 -0
  185. package/nuxt/components/Upload.js +3 -0
  186. package/nuxt/components/UploadStatus.js +3 -0
  187. package/nuxt/components/alertProps.js +3 -0
  188. package/nuxt/components/badgeProps.js +3 -0
  189. package/nuxt/components/buttonProps.js +3 -0
  190. package/nuxt/components/dropdownMenuProps.js +3 -0
  191. package/nuxt/components/fixedOverlayProps.js +3 -0
  192. package/nuxt/components/flexibleOverlayProps.js +3 -0
  193. package/nuxt/components/fullscreenProps.js +3 -0
  194. package/nuxt/components/iconProps.js +2 -0
  195. package/nuxt/components/notificationProps.js +3 -0
  196. package/nuxt/components/overlayEmits.js +3 -0
  197. package/nuxt/components/overlayProps.js +3 -0
  198. package/nuxt/components/paginationProps.js +3 -0
  199. package/nuxt/components/panelProps.js +3 -0
  200. package/nuxt/components/popoverProps.js +3 -0
  201. package/nuxt/components/searchProps.js +3 -0
  202. package/nuxt/components/tooltipProps.js +3 -0
  203. package/nuxt/components/uploadProps.js +3 -0
  204. package/nuxt/index.js +13 -0
  205. package/overlay/index.es.js +156 -205
  206. package/overlay/index.umd.js +1 -1
  207. package/overlay/style.css +1 -1
  208. package/package.json +12 -55
  209. package/pagination/index.es.js +11 -13
  210. package/pagination/index.umd.js +1 -1
  211. package/pagination/style.css +1 -1
  212. package/panel/index.es.js +48 -35
  213. package/panel/index.umd.js +1 -1
  214. package/popover/index.es.js +5954 -189
  215. package/popover/index.umd.js +27 -1
  216. package/popover/style.css +1 -1
  217. package/progress/index.es.js +8 -8
  218. package/progress/index.umd.js +3 -3
  219. package/quadrant-diagram/index.es.js +5405 -166
  220. package/quadrant-diagram/index.umd.js +27 -1
  221. package/radio/index.es.js +8 -14
  222. package/radio/index.umd.js +1 -1
  223. package/radio/style.css +1 -1
  224. package/read-tip/index.es.js +6 -3
  225. package/read-tip/style.css +1 -1
  226. package/result/index.es.js +38 -52
  227. package/result/index.umd.js +1 -1
  228. package/ripple/index.es.js +10 -6
  229. package/search/index.es.js +5428 -200
  230. package/search/index.umd.js +27 -1
  231. package/search/style.css +1 -1
  232. package/select/index.es.js +43 -42
  233. package/select/index.umd.js +1 -1
  234. package/select/style.css +1 -1
  235. package/skeleton/index.es.js +17 -17
  236. package/skeleton/index.umd.js +1 -1
  237. package/slider/index.es.js +4 -6
  238. package/slider/index.umd.js +1 -1
  239. package/slider/style.css +1 -1
  240. package/splitter/index.es.js +5896 -39
  241. package/splitter/index.umd.js +27 -1
  242. package/splitter/style.css +1 -1
  243. package/statistic/index.es.js +19 -32
  244. package/statistic/index.umd.js +1 -1
  245. package/statistic/style.css +1 -1
  246. package/status/index.es.js +1 -4
  247. package/status/index.umd.js +1 -1
  248. package/status/style.css +1 -1
  249. package/steps-guide/index.es.js +6 -3
  250. package/sticky/index.umd.js +1 -1
  251. package/style.css +1 -1
  252. package/table/index.es.js +753 -358
  253. package/table/index.umd.js +1 -1
  254. package/table/style.css +1 -1
  255. package/tabs/index.es.js +3 -4
  256. package/tabs/index.umd.js +1 -1
  257. package/tabs/style.css +1 -1
  258. package/tag/index.es.js +4 -3
  259. package/tag/index.umd.js +1 -1
  260. package/tag/style.css +1 -1
  261. package/tag-input/index.es.js +4 -14
  262. package/tag-input/index.umd.js +1 -1
  263. package/textarea/style.css +1 -1
  264. package/{theme → theme/theme.scss} +0 -0
  265. package/time-picker/index.es.js +309 -123
  266. package/time-picker/index.umd.js +1 -1
  267. package/time-picker/style.css +1 -1
  268. package/timeline/index.d.ts +7 -0
  269. package/{time-axis → timeline}/index.es.js +65 -77
  270. package/timeline/index.umd.js +1 -0
  271. package/{time-axis → timeline}/package.json +1 -1
  272. package/timeline/style.css +1 -0
  273. package/tooltip/index.es.js +5805 -141
  274. package/tooltip/index.umd.js +27 -1
  275. package/tooltip/style.css +1 -1
  276. package/transfer/index.es.js +6521 -630
  277. package/transfer/index.umd.js +27 -1
  278. package/transfer/style.css +1 -1
  279. package/tree/index.es.js +5781 -193
  280. package/tree/index.umd.js +27 -1
  281. package/tree/style.css +1 -1
  282. package/tree-select/index.es.js +138 -39
  283. package/tree-select/index.umd.js +1 -1
  284. package/tree-select/style.css +1 -1
  285. package/upload/index.es.js +450 -2669
  286. package/upload/index.umd.js +1 -1
  287. package/upload/style.css +1 -1
  288. package/vue-devui.es.js +14414 -14096
  289. package/vue-devui.umd.js +19 -19
  290. package/time-axis/index.umd.js +0 -1
  291. package/time-axis/style.css +0 -1
  292. package/toast/index.es.js +0 -2059
  293. package/toast/index.umd.js +0 -1
  294. package/toast/style.css +0 -1
@@ -17,8 +17,9 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, withDirectives, vShow, ref, reactive, toRef, isRef } from "vue";
21
- var overlay = "";
20
+ import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps } from "vue";
21
+ import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
22
+ var baseOverlay = "";
22
23
  function _isSlot(s) {
23
24
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
24
25
  }
@@ -42,9 +43,6 @@ const overlayProps = {
42
43
  visible: {
43
44
  type: Boolean
44
45
  },
45
- "onUpdate:visible": {
46
- type: Function
47
- },
48
46
  backgroundBlock: {
49
47
  type: Boolean,
50
48
  default: false
@@ -68,29 +66,14 @@ const overlayProps = {
68
66
  default: true
69
67
  }
70
68
  };
71
- const overlayEmits = ["onUpdate:visible", "backdropClick"];
72
69
  const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
73
70
  overlayStyle: {
74
71
  type: [String, Object],
75
72
  default: void 0
76
73
  }
77
74
  });
78
- const flexibleOverlayProps = __spreadValues({
79
- origin: {
80
- type: Object,
81
- require: true
82
- },
83
- position: {
84
- type: Object,
85
- default: () => ({
86
- originX: "left",
87
- originY: "top",
88
- overlayX: "left",
89
- overlayY: "top"
90
- })
91
- }
92
- }, overlayProps);
93
- function useOverlayLogic(props) {
75
+ const overlayEmits = ["update:visible", "backdropClick"];
76
+ function useOverlayLogic(props, ctx) {
94
77
  const backgroundClass = computed(() => {
95
78
  return [
96
79
  "devui-overlay-background",
@@ -102,11 +85,11 @@ function useOverlayLogic(props) {
102
85
  return "devui-overlay";
103
86
  });
104
87
  const handleBackdropClick = (event) => {
105
- var _a, _b;
88
+ var _a;
106
89
  event.preventDefault();
107
90
  (_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
108
91
  if (props.backdropClose) {
109
- (_b = props["onUpdate:visible"]) == null ? void 0 : _b.call(props, false);
92
+ ctx.emit("update:visible", false);
110
93
  }
111
94
  };
112
95
  const handleOverlayBubbleCancel = (event) => event.cancelBubble = true;
@@ -140,6 +123,7 @@ function useOverlayLogic(props) {
140
123
  handleOverlayBubbleCancel
141
124
  };
142
125
  }
126
+ var fixedOverlay = "";
143
127
  const FixedOverlay = defineComponent({
144
128
  name: "DFixedOverlay",
145
129
  props: fixedOverlayProps,
@@ -150,9 +134,9 @@ const FixedOverlay = defineComponent({
150
134
  overlayClass,
151
135
  handleBackdropClick,
152
136
  handleOverlayBubbleCancel
153
- } = useOverlayLogic(props);
137
+ } = useOverlayLogic(props, ctx);
154
138
  return () => createVNode(CommonOverlay, null, {
155
- default: () => [withDirectives(createVNode("div", {
139
+ default: () => [props.visible && createVNode("div", {
156
140
  "class": backgroundClass.value,
157
141
  "style": props.backgroundStyle,
158
142
  "onClick": handleBackdropClick
@@ -160,203 +144,170 @@ const FixedOverlay = defineComponent({
160
144
  "class": overlayClass.value,
161
145
  "style": props.overlayStyle,
162
146
  "onClick": handleOverlayBubbleCancel
163
- }, [renderSlot(ctx.slots, "default")])]), [[vShow, props.visible]])]
147
+ }, [renderSlot(ctx.slots, "default")])])]
164
148
  });
165
149
  }
166
150
  });
167
- function isComponent(target) {
168
- return !!(target == null ? void 0 : target.$el);
169
- }
170
- function getElement(element) {
171
- if (element instanceof Element) {
172
- return element;
173
- }
174
- if (element && typeof element === "object" && element.$el instanceof Element) {
175
- return element.$el;
176
- }
177
- return null;
178
- }
179
- const FlexibleOverlay = defineComponent({
180
- name: "DFlexibleOverlay",
181
- props: flexibleOverlayProps,
182
- emits: overlayEmits,
183
- setup(props, ctx) {
184
- const overlayRef = ref(null);
185
- const positionedStyle = reactive({
186
- position: "absolute"
187
- });
188
- onMounted(async () => {
189
- const handleRectChange = (position, rect, origin) => {
190
- const point = calculatePosition(position, rect, origin);
191
- positionedStyle.left = `${point.x}px`;
192
- positionedStyle.top = `${point.y}px`;
193
- };
194
- const locationElements = computed(() => {
195
- const overlay2 = overlayRef.value;
196
- const origin = getOrigin(props.origin);
197
- if (!overlay2 || !origin) {
198
- return;
199
- }
200
- return {
201
- origin,
202
- overlay: overlay2
203
- };
204
- });
205
- const visibleRef = toRef(props, "visible");
206
- const positionRef = toRef(props, "position");
207
- watch([locationElements, visibleRef, positionRef], async ([locationElements2, visible, position], ov, onInvalidate) => {
208
- if (!visible || !locationElements2) {
209
- return;
210
- }
211
- const {
212
- origin,
213
- overlay: overlay2
214
- } = locationElements2;
215
- handleRectChange(position, overlay2.getBoundingClientRect(), origin);
216
- const unsubscriptions = [subscribeLayoutEvent(() => handleRectChange(position, overlay2.getBoundingClientRect(), origin)), subscribeOverlayResize(overlay2, (entries) => handleRectChange(position, entries[0].contentRect, origin)), subscribeOriginResize(origin, () => handleRectChange(position, overlay2.getBoundingClientRect(), origin))];
217
- onInvalidate(() => {
218
- unsubscriptions.forEach((fn) => fn());
219
- });
220
- });
221
- });
222
- const {
223
- backgroundClass,
224
- overlayClass,
225
- handleBackdropClick,
226
- handleOverlayBubbleCancel
227
- } = useOverlayLogic(props);
228
- return () => createVNode(CommonOverlay, null, {
229
- default: () => [withDirectives(createVNode("div", {
230
- "style": props.backgroundStyle,
231
- "class": backgroundClass.value,
232
- "onClick": handleBackdropClick
233
- }, [createVNode("div", {
234
- "ref": overlayRef,
235
- "class": overlayClass.value,
236
- "style": positionedStyle,
237
- "onClick": handleOverlayBubbleCancel
238
- }, [renderSlot(ctx.slots, "default")])]), [[vShow, props.visible]])]
239
- });
240
- }
241
- });
242
- function getOrigin(origin) {
243
- if (origin instanceof Element) {
244
- return origin;
245
- }
246
- if (isRef(origin)) {
247
- return getElement(origin.value);
248
- }
249
- if (isComponent(origin)) {
250
- return getElement(origin);
251
- }
252
- return origin;
253
- }
254
- function calculatePosition(position, rect, origin) {
255
- const originRect = getOriginRect(origin);
256
- const originPoint = getOriginRelativePoint(originRect, position);
257
- return getOverlayPoint(originPoint, rect, position);
258
- }
259
- function getOriginRect(origin) {
260
- if (origin instanceof Element) {
261
- return origin.getBoundingClientRect();
262
- }
263
- const width = origin.width || 0;
264
- const height = origin.height || 0;
265
- return {
266
- top: origin.y,
267
- bottom: origin.y + height,
268
- left: origin.x,
269
- right: origin.x + width,
270
- height,
271
- width
272
- };
273
- }
274
- function getOverlayPoint(originPoint, rect, position) {
275
- let x;
276
- const {
277
- width,
278
- height
279
- } = rect;
280
- if (position.overlayX == "center") {
281
- x = originPoint.x - width / 2;
282
- } else {
283
- x = position.overlayX == "left" ? originPoint.x : originPoint.x - width;
151
+ const flexibleOverlayProps = {
152
+ modelValue: {
153
+ type: Boolean,
154
+ default: false
155
+ },
156
+ origin: {
157
+ type: Object,
158
+ require: true
159
+ },
160
+ position: {
161
+ type: Array,
162
+ default: ["bottom"]
163
+ },
164
+ offset: {
165
+ type: [Number, Object],
166
+ default: 8
167
+ },
168
+ align: {
169
+ type: String,
170
+ default: null
171
+ },
172
+ showArrow: {
173
+ type: Boolean,
174
+ default: false
175
+ },
176
+ isArrowCenter: {
177
+ type: Boolean,
178
+ default: true
284
179
  }
285
- let y;
286
- if (position.overlayY == "center") {
287
- y = originPoint.y - height / 2;
288
- } else {
289
- y = position.overlayY == "top" ? originPoint.y : originPoint.y - height;
180
+ };
181
+ function getScrollParent(element) {
182
+ const overflowRegex = /(auto|scroll|hidden)/;
183
+ for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
184
+ const style = window.getComputedStyle(parent);
185
+ if (overflowRegex.test(style.overflow + style.overflowX + style.overflowY)) {
186
+ return parent;
187
+ }
290
188
  }
291
- return {
292
- x,
293
- y
294
- };
189
+ return window;
295
190
  }
296
- function getOriginRelativePoint(originRect, position) {
297
- let x;
298
- if (position.originX == "center") {
299
- x = originRect.left + originRect.width / 2;
300
- } else {
301
- const startX = originRect.left;
302
- const endX = originRect.right;
303
- x = position.originX == "left" ? startX : endX;
304
- }
305
- let y;
306
- if (position.originY == "center") {
307
- y = originRect.top + originRect.height / 2;
308
- } else {
309
- y = position.originY == "top" ? originRect.top : originRect.bottom;
191
+ function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
192
+ let { x, y } = point;
193
+ if (!isArrowCenter) {
194
+ const { width, height } = originRect;
195
+ if (x && placement.includes("start")) {
196
+ x = 12;
197
+ }
198
+ if (x && placement.includes("end")) {
199
+ x = Math.round(width - 24);
200
+ }
201
+ if (y && placement.includes("start")) {
202
+ y = 10;
203
+ }
204
+ if (y && placement.includes("end")) {
205
+ y = height - 14;
206
+ }
310
207
  }
311
- return {
312
- x,
313
- y
314
- };
208
+ return { x, y };
315
209
  }
316
- function subscribeLayoutEvent(event) {
317
- window.addEventListener("scroll", event, true);
318
- window.addEventListener("resize", event);
319
- window.addEventListener("orientationchange", event);
320
- return () => {
321
- window.removeEventListener("scroll", event, true);
322
- window.removeEventListener("resize", event);
323
- window.removeEventListener("orientationchange", event);
210
+ function useOverlay(props, emit) {
211
+ const overlayRef = ref();
212
+ const arrowRef = ref();
213
+ const updateArrowPosition = (arrowEl, placement, point, overlayEl) => {
214
+ const { x, y } = adjustArrowPosition(props.isArrowCenter, point, placement, overlayEl.getBoundingClientRect());
215
+ const staticSide = {
216
+ top: "bottom",
217
+ right: "left",
218
+ bottom: "top",
219
+ left: "right"
220
+ }[placement.split("-")[0]];
221
+ Object.assign(arrowEl.style, {
222
+ left: x ? `${x}px` : "",
223
+ top: y ? `${y}px` : "",
224
+ right: "",
225
+ bottom: "",
226
+ [staticSide]: "-4px"
227
+ });
324
228
  };
325
- }
326
- function subscribeOverlayResize(overlay2, callback) {
327
- if (overlay2 instanceof Element) {
328
- const resizeObserver = new ResizeObserver(callback);
329
- resizeObserver.observe(overlay2);
330
- return () => resizeObserver.disconnect();
331
- }
332
- return () => {
229
+ const updatePosition = async () => {
230
+ const hostEl = props.origin;
231
+ const overlayEl = unref(overlayRef.value);
232
+ const arrowEl = unref(arrowRef.value);
233
+ const middleware = [
234
+ shift(),
235
+ offset(props.offset),
236
+ autoPlacement({
237
+ alignment: props.align,
238
+ allowedPlacements: props.position
239
+ })
240
+ ];
241
+ props.showArrow && middleware.push(arrow({ element: arrowEl }));
242
+ const { x, y, placement, middlewareData } = await computePosition(hostEl, overlayEl, {
243
+ strategy: "fixed",
244
+ middleware
245
+ });
246
+ emit("positionChange", placement);
247
+ Object.assign(overlayEl.style, { top: `${y}px`, left: `${x}px` });
248
+ props.showArrow && updateArrowPosition(arrowEl, placement, middlewareData.arrow, overlayEl);
333
249
  };
250
+ watch(() => props.modelValue, () => {
251
+ const originParent = getScrollParent(props.origin);
252
+ if (props.modelValue && props.origin) {
253
+ nextTick(updatePosition);
254
+ originParent.addEventListener("scroll", updatePosition);
255
+ originParent !== window && window.addEventListener("scroll", updatePosition);
256
+ window.addEventListener("resize", updatePosition);
257
+ } else {
258
+ originParent.removeEventListener("scroll", updatePosition);
259
+ originParent !== window && window.removeEventListener("scroll", updatePosition);
260
+ window.removeEventListener("resize", updatePosition);
261
+ }
262
+ });
263
+ onUnmounted(() => {
264
+ const originParent = getScrollParent(props.origin);
265
+ originParent.removeEventListener("scroll", updatePosition);
266
+ originParent !== window && window.removeEventListener("scroll", updatePosition);
267
+ window.removeEventListener("resize", updatePosition);
268
+ });
269
+ return { arrowRef, overlayRef, updatePosition };
334
270
  }
335
- function subscribeOriginResize(origin, callback) {
336
- if (origin instanceof Element) {
337
- const observer = new MutationObserver(callback);
338
- observer.observe(origin, {
339
- attributeFilter: ["style"]
271
+ var flexibleOverlay = "";
272
+ const FlexibleOverlay = defineComponent({
273
+ name: "DFlexibleOverlay",
274
+ inheritAttrs: false,
275
+ props: flexibleOverlayProps,
276
+ emits: ["update:modelValue", "positionChange"],
277
+ setup(props, {
278
+ slots,
279
+ attrs,
280
+ emit,
281
+ expose
282
+ }) {
283
+ const {
284
+ arrowRef,
285
+ overlayRef,
286
+ updatePosition
287
+ } = useOverlay(props, emit);
288
+ expose({
289
+ updatePosition
340
290
  });
341
- return () => observer.disconnect();
291
+ return () => {
292
+ var _a;
293
+ return props.modelValue && createVNode("div", mergeProps({
294
+ "ref": overlayRef,
295
+ "class": "devui-flexible-overlay"
296
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
297
+ "ref": arrowRef,
298
+ "class": "devui-flexible-overlay-arrow"
299
+ }, null)]);
300
+ };
342
301
  }
343
- return () => {
344
- };
345
- }
302
+ });
346
303
  const inBrowser = typeof window !== "undefined";
347
- FlexibleOverlay.install = function(app) {
348
- app.component(FlexibleOverlay.name, FlexibleOverlay);
349
- };
350
- FixedOverlay.install = function(app) {
351
- app.component(FixedOverlay.name, FixedOverlay);
352
- };
353
304
  var index = {
354
305
  title: "Overlay \u906E\u7F69\u5C42",
355
306
  category: "\u901A\u7528",
356
307
  status: "100%",
357
308
  install(app) {
358
- app.use(FixedOverlay);
359
- app.use(FlexibleOverlay);
309
+ app.component(FixedOverlay.name, FixedOverlay);
310
+ app.component(FlexibleOverlay.name, FlexibleOverlay);
360
311
  if (inBrowser && !document.getElementById("d-overlay-anchor")) {
361
312
  const overlayAnchor = document.createElement("div");
362
313
  overlayAnchor.setAttribute("id", "d-overlay-anchor");
@@ -368,4 +319,4 @@ var index = {
368
319
  }
369
320
  }
370
321
  };
371
- export { FixedOverlay, FlexibleOverlay, index as default };
322
+ export { FixedOverlay, FlexibleOverlay, index as default, fixedOverlayProps, flexibleOverlayProps, overlayEmits, overlayProps };
@@ -1 +1 @@
1
- var J=Object.defineProperty,K=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var F=(r,t,a)=>t in r?J(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,p=(r,t)=>{for(var a in t||(t={}))W.call(t,a)&&F(r,a,t[a]);if(j)for(var a of j(t))Z.call(t,a)&&F(r,a,t[a]);return r},V=(r,t)=>K(r,Q(t));(function(r,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(r=typeof globalThis!="undefined"?globalThis:r||self,t(r.index={},r.Vue))})(this,function(r,t){"use strict";var a="";function N(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const B=t.defineComponent({setup(e,n){return()=>{let o;return t.createVNode(t.Teleport,{to:"#d-overlay-anchor"},{default:()=>[t.createVNode(t.Transition,{name:"devui-overlay-fade"},N(o=t.renderSlot(n.slots,"default"))?o:{default:()=>[o]})]})}}}),x={visible:{type:Boolean},"onUpdate:visible":{type:Function},backgroundBlock:{type:Boolean,default:!1},backgroundClass:{type:String,default:""},backgroundStyle:{type:[String,Object]},onBackdropClick:{type:Function},backdropClose:{type:Boolean,default:!0},hasBackdrop:{type:Boolean,default:!0}},E=["onUpdate:visible","backdropClick"],L=V(p({},x),{overlayStyle:{type:[String,Object],default:void 0}}),X=p({origin:{type:Object,require:!0},position:{type:Object,default:()=>({originX:"left",originY:"top",overlayX:"left",overlayY:"top"})}},x);function S(e){const n=t.computed(()=>["devui-overlay-background",e.backgroundClass,e.hasBackdrop?"devui-overlay-background__color":"devui-overlay-background__disabled"]),o=t.computed(()=>"devui-overlay"),i=l=>{var s,f;l.preventDefault(),(s=e.onBackdropClick)==null||s.call(e),e.backdropClose&&((f=e["onUpdate:visible"])==null||f.call(e,!1))},c=l=>l.cancelBubble=!0;return t.onMounted(()=>{const l=document.body,s=l.style.overflow,f=l.style.position;t.watch([()=>e.visible,()=>e.backgroundBlock],([d,w])=>{if(w){const C=l.getBoundingClientRect().y;d?(l.style.overflowY="scroll",l.style.position=d?"fixed":"",l.style.top=`${C}px`):(l.style.overflowY=s,l.style.position=f,l.style.top="",window.scrollTo(0,-C))}}),t.onUnmounted(()=>{document.body.style.overflow=s})}),{backgroundClass:n,overlayClass:o,handleBackdropClick:i,handleOverlayBubbleCancel:c}}const v=t.defineComponent({name:"DFixedOverlay",props:L,emits:E,setup(e,n){const{backgroundClass:o,overlayClass:i,handleBackdropClick:c,handleOverlayBubbleCancel:l}=S(e);return()=>t.createVNode(B,null,{default:()=>[t.withDirectives(t.createVNode("div",{class:o.value,style:e.backgroundStyle,onClick:c},[t.createVNode("div",{class:i.value,style:e.overlayStyle,onClick:l},[t.renderSlot(n.slots,"default")])]),[[t.vShow,e.visible]])]})}});function Y(e){return!!(e==null?void 0:e.$el)}function R(e){return e instanceof Element?e:e&&typeof e=="object"&&e.$el instanceof Element?e.$el:null}const h=t.defineComponent({name:"DFlexibleOverlay",props:X,emits:E,setup(e,n){const o=t.ref(null),i=t.reactive({position:"absolute"});t.onMounted(async()=>{const d=(u,y,b)=>{const g=z(u,y,b);i.left=`${g.x}px`,i.top=`${g.y}px`},w=t.computed(()=>{const u=o.value,y=_(e.origin);if(!(!u||!y))return{origin:y,overlay:u}}),C=t.toRef(e,"visible"),I=t.toRef(e,"position");t.watch([w,C,I],async([u,y,b],g,G)=>{if(!y||!u)return;const{origin:m,overlay:k}=u;d(b,k.getBoundingClientRect(),m);const H=[M(()=>d(b,k.getBoundingClientRect(),m)),P(k,O=>d(b,O[0].contentRect,m)),U(m,()=>d(b,k.getBoundingClientRect(),m))];G(()=>{H.forEach(O=>O())})})});const{backgroundClass:c,overlayClass:l,handleBackdropClick:s,handleOverlayBubbleCancel:f}=S(e);return()=>t.createVNode(B,null,{default:()=>[t.withDirectives(t.createVNode("div",{style:e.backgroundStyle,class:c.value,onClick:s},[t.createVNode("div",{ref:o,class:l.value,style:i,onClick:f},[t.renderSlot(n.slots,"default")])]),[[t.vShow,e.visible]])]})}});function _(e){return e instanceof Element?e:t.isRef(e)?R(e.value):Y(e)?R(e):e}function z(e,n,o){const i=T(o),c=D(i,e);return $(c,n,e)}function T(e){if(e instanceof Element)return e.getBoundingClientRect();const n=e.width||0,o=e.height||0;return{top:e.y,bottom:e.y+o,left:e.x,right:e.x+n,height:o,width:n}}function $(e,n,o){let i;const{width:c,height:l}=n;o.overlayX=="center"?i=e.x-c/2:i=o.overlayX=="left"?e.x:e.x-c;let s;return o.overlayY=="center"?s=e.y-l/2:s=o.overlayY=="top"?e.y:e.y-l,{x:i,y:s}}function D(e,n){let o;if(n.originX=="center")o=e.left+e.width/2;else{const c=e.left,l=e.right;o=n.originX=="left"?c:l}let i;return n.originY=="center"?i=e.top+e.height/2:i=n.originY=="top"?e.top:e.bottom,{x:o,y:i}}function M(e){return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}}function P(e,n){if(e instanceof Element){const o=new ResizeObserver(n);return o.observe(e),()=>o.disconnect()}return()=>{}}function U(e,n){if(e instanceof Element){const o=new MutationObserver(n);return o.observe(e,{attributeFilter:["style"]}),()=>o.disconnect()}return()=>{}}const A=typeof window!="undefined";h.install=function(e){e.component(h.name,h)},v.install=function(e){e.component(v.name,v)};var q={title:"Overlay \u906E\u7F69\u5C42",category:"\u901A\u7528",status:"100%",install(e){if(e.use(v),e.use(h),A&&!document.getElementById("d-overlay-anchor")){const n=document.createElement("div");n.setAttribute("id","d-overlay-anchor"),n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.zIndex="1000",document.body.appendChild(n)}}};r.FixedOverlay=v,r.FlexibleOverlay=h,r.default=q,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"});
1
+ var _=Object.defineProperty,R=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var x=(n,e,a)=>e in n?_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[e]=a,B=(n,e)=>{for(var a in e||(e={}))$.call(e,a)&&x(n,a,e[a]);if(O)for(var a of O(e))z.call(e,a)&&x(n,a,e[a]);return n},E=(n,e)=>R(n,T(e));(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.index={},n.Vue,n.dom))})(this,function(n,e,a){"use strict";var D="";function P(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const S=e.defineComponent({setup(t,l){return()=>{let r;return e.createVNode(e.Teleport,{to:"#d-overlay-anchor"},{default:()=>[e.createVNode(e.Transition,{name:"devui-overlay-fade"},P(r=e.renderSlot(l.slots,"default"))?r:{default:()=>[r]})]})}}}),g={visible:{type:Boolean},backgroundBlock:{type:Boolean,default:!1},backgroundClass:{type:String,default:""},backgroundStyle:{type:[String,Object]},onBackdropClick:{type:Function},backdropClose:{type:Boolean,default:!0},hasBackdrop:{type:Boolean,default:!0}},p=E(B({},g),{overlayStyle:{type:[String,Object],default:void 0}}),h=["update:visible","backdropClick"];function V(t,l){const r=e.computed(()=>["devui-overlay-background",t.backgroundClass,t.hasBackdrop?"devui-overlay-background__color":"devui-overlay-background__disabled"]),s=e.computed(()=>"devui-overlay"),c=o=>{var d;o.preventDefault(),(d=t.onBackdropClick)==null||d.call(t),t.backdropClose&&l.emit("update:visible",!1)},i=o=>o.cancelBubble=!0;return e.onMounted(()=>{const o=document.body,d=o.style.overflow,u=o.style.position;e.watch([()=>t.visible,()=>t.backgroundBlock],([f,v])=>{if(v){const y=o.getBoundingClientRect().y;f?(o.style.overflowY="scroll",o.style.position=f?"fixed":"",o.style.top=`${y}px`):(o.style.overflowY=d,o.style.position=u,o.style.top="",window.scrollTo(0,-y))}}),e.onUnmounted(()=>{document.body.style.overflow=d})}),{backgroundClass:r,overlayClass:s,handleBackdropClick:c,handleOverlayBubbleCancel:i}}var M="";const b=e.defineComponent({name:"DFixedOverlay",props:p,emits:h,setup(t,l){const{backgroundClass:r,overlayClass:s,handleBackdropClick:c,handleOverlayBubbleCancel:i}=V(t,l);return()=>e.createVNode(S,null,{default:()=>[t.visible&&e.createVNode("div",{class:r.value,style:t.backgroundStyle,onClick:c},[e.createVNode("div",{class:s.value,style:t.overlayStyle,onClick:i},[e.renderSlot(l.slots,"default")])])]})}}),k={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function C(t){const l=/(auto|scroll|hidden)/;for(let r=t;r=r.parentElement;r.parentElement!==document.body){const s=window.getComputedStyle(r);if(l.test(s.overflow+s.overflowX+s.overflowY))return r}return window}function A(t,l,r,s){let{x:c,y:i}=l;if(!t){const{width:o,height:d}=s;c&&r.includes("start")&&(c=12),c&&r.includes("end")&&(c=Math.round(o-24)),i&&r.includes("start")&&(i=10),i&&r.includes("end")&&(i=d-14)}return{x:c,y:i}}function j(t,l){const r=e.ref(),s=e.ref(),c=(o,d,u,f)=>{const{x:v,y}=A(t.isArrowCenter,u,d,f.getBoundingClientRect()),w={top:"bottom",right:"left",bottom:"top",left:"right"}[d.split("-")[0]];Object.assign(o.style,{left:v?`${v}px`:"",top:y?`${y}px`:"",right:"",bottom:"",[w]:"-4px"})},i=async()=>{const o=t.origin,d=e.unref(r.value),u=e.unref(s.value),f=[a.shift(),a.offset(t.offset),a.autoPlacement({alignment:t.align,allowedPlacements:t.position})];t.showArrow&&f.push(a.arrow({element:u}));const{x:v,y,placement:w,middlewareData:F}=await a.computePosition(o,d,{strategy:"fixed",middleware:f});l("positionChange",w),Object.assign(d.style,{top:`${y}px`,left:`${v}px`}),t.showArrow&&c(u,w,F.arrow,d)};return e.watch(()=>t.modelValue,()=>{const o=C(t.origin);t.modelValue&&t.origin?(e.nextTick(i),o.addEventListener("scroll",i),o!==window&&window.addEventListener("scroll",i),window.addEventListener("resize",i)):(o.removeEventListener("scroll",i),o!==window&&window.removeEventListener("scroll",i),window.removeEventListener("resize",i))}),e.onUnmounted(()=>{const o=C(t.origin);o.removeEventListener("scroll",i),o!==window&&window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}),{arrowRef:s,overlayRef:r,updatePosition:i}}var q="";const m=e.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:k,emits:["update:modelValue","positionChange"],setup(t,{slots:l,attrs:r,emit:s,expose:c}){const{arrowRef:i,overlayRef:o,updatePosition:d}=j(t,s);return c({updatePosition:d}),()=>{var u;return t.modelValue&&e.createVNode("div",e.mergeProps({ref:o,class:"devui-flexible-overlay"},r),[(u=l.default)==null?void 0:u.call(l),t.showArrow&&e.createVNode("div",{ref:i,class:"devui-flexible-overlay-arrow"},null)])}}}),L=typeof window!="undefined";var N={title:"Overlay \u906E\u7F69\u5C42",category:"\u901A\u7528",status:"100%",install(t){if(t.component(b.name,b),t.component(m.name,m),L&&!document.getElementById("d-overlay-anchor")){const l=document.createElement("div");l.setAttribute("id","d-overlay-anchor"),l.style.position="fixed",l.style.left="0",l.style.top="0",l.style.zIndex="1000",document.body.appendChild(l)}}};n.FixedOverlay=b,n.FlexibleOverlay=m,n.default=N,n.fixedOverlayProps=p,n.flexibleOverlayProps=k,n.overlayEmits=h,n.overlayProps=g,Object.defineProperty(n,"__esModule",{value:!0}),n[Symbol.toStringTag]="Module"});
package/overlay/style.css CHANGED
@@ -1 +1 @@
1
- .devui-overlay-background{position:fixed;top:0;left:0;height:100vh;width:100vw;display:flex}.devui-overlay-background__color{background:rgba(0,0,0,.4)}.devui-overlay-background .devui-overlay{position:relative;z-index:1000;pointer-events:auto}.devui-overlay-background__disabled{pointer-events:none}@keyframes d-overlay-fade{0%{opacity:0}to{opacity:1}}.devui-overlay-fade-enter{opacity:0}.devui-overlay-fade-enter-active{animation-name:d-overlay-fade;animation-duration:.3s}.devui-overlay-fade-leave{opacity:1}.devui-overlay-fade-leave-active{animation-name:d-overlay-fade;animation-duration:.3s;animation-direction:reverse}
1
+ @keyframes d-overlay-fade{0%{opacity:0}to{opacity:1}}.devui-overlay-fade-enter{opacity:0}.devui-overlay-fade-enter-active{animation-name:d-overlay-fade;animation-duration:.3s}.devui-overlay-fade-leave{opacity:1}.devui-overlay-fade-leave-active{animation-name:d-overlay-fade;animation-duration:.3s;animation-direction:reverse}.devui-overlay-background{position:fixed;top:0;left:0;height:100vh;width:100vw;display:flex}.devui-overlay-background__color{background:rgba(0,0,0,.4)}.devui-overlay-background .devui-overlay{position:relative;z-index:1000;pointer-events:auto}.devui-overlay-background__disabled{pointer-events:none}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-connected-overlay, 0 2px 8px 0) var(--devui-shadow, rgba(0, 0, 0, .2));z-index:1000}.devui-flexible-overlay-arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-devui",
3
- "version": "1.0.0-beta.9",
3
+ "version": "1.0.0-rc.1",
4
4
  "license": "MIT",
5
5
  "description": "DevUI components based on Vite and Vue3",
6
6
  "keywords": [
@@ -15,69 +15,26 @@
15
15
  "jsx",
16
16
  "devui"
17
17
  ],
18
+ "homepage": "https://vue-devui.github.io/",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git@github.com:DevCloudFE/vue-devui.git"
22
+ },
18
23
  "main": "vue-devui.umd.js",
19
24
  "module": "vue-devui.es.js",
20
25
  "style": "style.css",
21
26
  "dependencies": {
22
27
  "@devui-design/icons": "^1.3.0",
28
+ "@floating-ui/dom": "^0.4.0",
23
29
  "@types/lodash-es": "^4.17.4",
30
+ "@vueuse/core": "^7.7.1",
24
31
  "async-validator": "^4.0.2",
32
+ "devui-theme": "^0.0.1",
33
+ "fs-extra": "^10.0.0",
34
+ "lodash": "^4.17.21",
25
35
  "lodash-es": "^4.17.20",
26
36
  "mitt": "^3.0.0",
27
37
  "vue": "^3.1.1",
28
38
  "vue-router": "^4.0.3"
29
- },
30
- "devDependencies": {
31
- "@babel/parser": "^7.15.5",
32
- "@babel/preset-env": "^7.14.5",
33
- "@babel/preset-typescript": "^7.14.5",
34
- "@babel/traverse": "^7.15.4",
35
- "@commitlint/cli": "^11.0.0",
36
- "@commitlint/config-conventional": "^11.0.0",
37
- "@ls-lint/ls-lint": "^1.10.0",
38
- "@types/chalk": "^2.2.0",
39
- "@types/commander": "^2.12.2",
40
- "@types/jest": "^26.0.23",
41
- "@types/ora": "^3.2.0",
42
- "@typescript-eslint/eslint-plugin": "^4.27.0",
43
- "@typescript-eslint/parser": "^4.27.0",
44
- "@vitejs/plugin-vue": "^1.3.0",
45
- "@vitejs/plugin-vue-jsx": "^1.1.0",
46
- "@vue/babel-plugin-jsx": "^1.0.6",
47
- "@vue/compiler-sfc": "^3.0.5",
48
- "@vue/test-utils": "^2.0.0-rc.9",
49
- "@vuedx/typecheck": "^0.4.1",
50
- "@vuedx/typescript-plugin-vue": "^0.4.1",
51
- "babel-jest": "^27.0.2",
52
- "chalk": "^4.1.2",
53
- "commander": "^8.1.0",
54
- "esbuild-register": "^2.6.0",
55
- "eslint": "^7.28.0",
56
- "eslint-plugin-import": "^2.24.2",
57
- "eslint-plugin-vue": "^7.11.1",
58
- "husky": "^7.0.4",
59
- "inquirer": "^8.1.2",
60
- "jest": "^27.0.4",
61
- "lint-staged": "^11.0.0",
62
- "ora": "^5.4.1",
63
- "patch-vue-directive-ssr": "^0.0.1",
64
- "sass": "^1.32.2",
65
- "shelljs": "^0.8.4",
66
- "stylelint": "^13.13.1",
67
- "stylelint-config-recommended-scss": "^4.3.0",
68
- "stylelint-config-standard": "^22.0.0",
69
- "stylelint-scss": "^3.20.1",
70
- "typescript": "^4.3.2",
71
- "vite": "^2.4.4",
72
- "vite-plugin-md": "^0.6.0",
73
- "vite-svg-loader": "^2.2.0",
74
- "vitepress": "0.20.1",
75
- "vitepress-theme-demoblock": "1.3.2",
76
- "vue-tsc": "^0.2.2",
77
- "yarn": "^1.22.11"
78
- },
79
- "lint-staged": {
80
- "{src,devui}/**/*.{js,ts,jsx,tsx,vue}": "eslint --fix",
81
- "{src,devui}/**/*.{scss,css}": "stylelint --fix"
82
39
  }
83
- }
40
+ }