vue-devui 1.0.0-alpha.1 → 1.0.0-alpha.12

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 (425) hide show
  1. package/README.md +161 -172
  2. package/alert/index.d.ts +7 -0
  3. package/alert/index.es.js +204 -1
  4. package/alert/index.umd.js +1 -1
  5. package/alert/style.css +1 -1
  6. package/auto-complete/index.d.ts +7 -0
  7. package/auto-complete/index.es.js +9051 -0
  8. package/auto-complete/index.umd.js +40 -0
  9. package/auto-complete/package.json +7 -0
  10. package/auto-complete/style.css +1 -0
  11. package/avatar/index.d.ts +7 -0
  12. package/avatar/index.es.js +308 -1
  13. package/avatar/index.umd.js +1 -1
  14. package/avatar/style.css +1 -1
  15. package/badge/index.d.ts +7 -0
  16. package/badge/index.es.js +120 -1
  17. package/badge/index.umd.js +1 -1
  18. package/badge/style.css +1 -1
  19. package/button/index.d.ts +7 -0
  20. package/button/index.es.js +5964 -1
  21. package/button/index.umd.js +27 -1
  22. package/button/style.css +1 -1
  23. package/card/index.d.ts +7 -0
  24. package/card/index.es.js +89 -1
  25. package/card/index.umd.js +1 -1
  26. package/card/style.css +1 -1
  27. package/checkbox/index.d.ts +7 -0
  28. package/checkbox/index.es.js +8207 -1
  29. package/checkbox/index.umd.js +38 -1
  30. package/checkbox/style.css +1 -1
  31. package/collapse/index.d.ts +7 -0
  32. package/collapse/index.es.js +195 -0
  33. package/collapse/index.umd.js +1 -0
  34. package/{carousel → collapse}/package.json +1 -1
  35. package/collapse/style.css +1 -0
  36. package/countdown/index.d.ts +7 -0
  37. package/countdown/index.es.js +217 -0
  38. package/countdown/index.umd.js +1 -0
  39. package/{accordion → countdown}/package.json +1 -1
  40. package/countdown/style.css +1 -0
  41. package/date-picker-pro/index.d.ts +7 -0
  42. package/date-picker-pro/index.es.js +12031 -0
  43. package/date-picker-pro/index.umd.js +38 -0
  44. package/date-picker-pro/package.json +7 -0
  45. package/date-picker-pro/style.css +1 -0
  46. package/drawer/index.d.ts +7 -0
  47. package/drawer/index.es.js +248 -0
  48. package/drawer/index.umd.js +1 -0
  49. package/{anchor → drawer}/package.json +1 -1
  50. package/drawer/style.css +1 -0
  51. package/dropdown/index.d.ts +7 -0
  52. package/dropdown/index.es.js +743 -0
  53. package/dropdown/index.umd.js +1 -0
  54. package/dropdown/package.json +7 -0
  55. package/dropdown/style.css +1 -0
  56. package/editable-select/index.d.ts +7 -0
  57. package/editable-select/index.es.js +991 -1
  58. package/editable-select/index.umd.js +1 -1
  59. package/editable-select/style.css +1 -1
  60. package/form/index.d.ts +7 -0
  61. package/form/index.es.js +7751 -0
  62. package/form/index.umd.js +38 -0
  63. package/{toast → form}/package.json +1 -1
  64. package/form/style.css +1 -0
  65. package/fullscreen/index.d.ts +7 -0
  66. package/fullscreen/index.es.js +166 -0
  67. package/fullscreen/index.umd.js +1 -0
  68. package/fullscreen/package.json +7 -0
  69. package/fullscreen/style.css +1 -0
  70. package/grid/index.d.ts +7 -0
  71. package/grid/index.es.js +271 -0
  72. package/grid/index.umd.js +1 -0
  73. package/{sticky → grid}/package.json +1 -1
  74. package/grid/style.css +1 -0
  75. package/icon/index.d.ts +7 -0
  76. package/icon/index.es.js +218 -1
  77. package/icon/index.umd.js +1 -1
  78. package/icon/style.css +1 -0
  79. package/image-preview/index.d.ts +7 -0
  80. package/image-preview/index.es.js +511 -1
  81. package/image-preview/index.umd.js +1 -1
  82. package/image-preview/style.css +1 -1
  83. package/index.d.ts +7 -0
  84. package/input/index.d.ts +7 -0
  85. package/input/index.es.js +8311 -1
  86. package/input/index.umd.js +38 -1
  87. package/input/style.css +1 -1
  88. package/input-number/index.d.ts +7 -0
  89. package/input-number/index.es.js +308 -1
  90. package/input-number/index.umd.js +1 -1
  91. package/input-number/style.css +1 -1
  92. package/layout/index.d.ts +7 -0
  93. package/layout/index.es.js +115 -0
  94. package/layout/index.umd.js +1 -0
  95. package/layout/package.json +7 -0
  96. package/layout/style.css +1 -0
  97. package/loading/index.d.ts +7 -0
  98. package/loading/index.es.js +272 -1
  99. package/loading/index.umd.js +1 -1
  100. package/loading/style.css +1 -1
  101. package/message/index.d.ts +7 -0
  102. package/message/index.es.js +534 -0
  103. package/message/index.umd.js +1 -0
  104. package/message/package.json +7 -0
  105. package/message/style.css +1 -0
  106. package/modal/index.d.ts +7 -0
  107. package/modal/index.es.js +741 -0
  108. package/modal/index.umd.js +1 -0
  109. package/modal/package.json +7 -0
  110. package/modal/style.css +1 -0
  111. package/notification/index.d.ts +7 -0
  112. package/notification/index.es.js +528 -0
  113. package/notification/index.umd.js +1 -0
  114. package/notification/package.json +7 -0
  115. package/notification/style.css +1 -0
  116. package/nuxt/components/Alert.js +3 -0
  117. package/nuxt/components/Aside.js +3 -0
  118. package/nuxt/components/AutoComplete.js +3 -0
  119. package/nuxt/components/Avatar.js +3 -0
  120. package/nuxt/components/Badge.js +3 -0
  121. package/nuxt/components/Button.js +3 -0
  122. package/nuxt/components/ButtonGroup.js +3 -0
  123. package/nuxt/components/Card.js +3 -0
  124. package/nuxt/components/Checkbox.js +3 -0
  125. package/nuxt/components/CheckboxButton.js +3 -0
  126. package/nuxt/components/CheckboxGroup.js +3 -0
  127. package/nuxt/components/Col.js +3 -0
  128. package/nuxt/components/Collapse.js +3 -0
  129. package/nuxt/components/CollapseItem.js +3 -0
  130. package/nuxt/components/Column.js +3 -0
  131. package/nuxt/components/Content.js +3 -0
  132. package/nuxt/components/Countdown.js +3 -0
  133. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  134. package/nuxt/components/DatePickerPro.js +3 -0
  135. package/nuxt/components/Drawer.js +3 -0
  136. package/nuxt/components/DrawerService.js +3 -0
  137. package/nuxt/components/Dropdown.js +3 -0
  138. package/nuxt/components/DropdownMenu.js +3 -0
  139. package/nuxt/components/DropdownPropsKey.js +3 -0
  140. package/nuxt/components/EditableSelect.js +3 -0
  141. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  142. package/nuxt/components/FORM_TOKEN.js +3 -0
  143. package/nuxt/components/FixedOverlay.js +3 -0
  144. package/nuxt/components/FlexibleOverlay.js +3 -0
  145. package/nuxt/components/Footer.js +3 -0
  146. package/nuxt/components/Form.js +3 -0
  147. package/nuxt/components/FormItem.js +3 -0
  148. package/nuxt/components/FormOperation.js +3 -0
  149. package/nuxt/components/Fullscreen.js +3 -0
  150. package/nuxt/components/Header.js +3 -0
  151. package/nuxt/components/IFileOptions.js +3 -0
  152. package/nuxt/components/IUploadOptions.js +3 -0
  153. package/nuxt/components/Icon.js +3 -0
  154. package/nuxt/components/IconGroup.js +3 -0
  155. package/nuxt/components/ImagePreviewService.js +3 -0
  156. package/nuxt/components/Input.js +3 -0
  157. package/nuxt/components/InputNumber.js +3 -0
  158. package/nuxt/components/LABEL_DATA.js +3 -0
  159. package/nuxt/components/Layout.js +3 -0
  160. package/nuxt/components/Loading.js +3 -0
  161. package/nuxt/components/LoadingOptions.js +3 -0
  162. package/nuxt/components/LoadingService.js +3 -0
  163. package/nuxt/components/Message.js +3 -0
  164. package/nuxt/components/Modal.js +3 -0
  165. package/nuxt/components/Notification.js +3 -0
  166. package/nuxt/components/NotificationService.js +3 -0
  167. package/nuxt/components/Option.js +3 -0
  168. package/nuxt/components/OptionGroup.js +3 -0
  169. package/nuxt/components/Pagination.js +3 -0
  170. package/nuxt/components/Panel.js +3 -0
  171. package/nuxt/components/PanelBody.js +3 -0
  172. package/nuxt/components/PanelFooter.js +3 -0
  173. package/nuxt/components/PanelHeader.js +3 -0
  174. package/nuxt/components/Popover.js +3 -0
  175. package/nuxt/components/Progress.js +3 -0
  176. package/nuxt/components/Radio.js +3 -0
  177. package/nuxt/components/RadioButton.js +3 -0
  178. package/nuxt/components/RadioGroup.js +3 -0
  179. package/nuxt/components/Rate.js +3 -0
  180. package/nuxt/components/Result.js +3 -0
  181. package/nuxt/components/Row.js +3 -0
  182. package/nuxt/components/Search.js +3 -0
  183. package/nuxt/components/Select.js +3 -0
  184. package/nuxt/components/Skeleton.js +3 -0
  185. package/nuxt/components/SkeletonItem.js +3 -0
  186. package/nuxt/components/Slider.js +3 -0
  187. package/nuxt/components/Splitter.js +3 -0
  188. package/nuxt/components/Statistic.js +3 -0
  189. package/nuxt/components/Status.js +3 -0
  190. package/nuxt/components/Step.js +3 -0
  191. package/nuxt/components/Steps.js +3 -0
  192. package/nuxt/components/Switch.js +3 -0
  193. package/nuxt/components/TABLE_TOKEN.js +3 -0
  194. package/nuxt/components/Tab.js +3 -0
  195. package/nuxt/components/Table.js +3 -0
  196. package/nuxt/components/Tabs.js +3 -0
  197. package/nuxt/components/Tag.js +3 -0
  198. package/nuxt/components/Textarea.js +3 -0
  199. package/nuxt/components/TimePicker.js +3 -0
  200. package/nuxt/components/TimeSelect.js +3 -0
  201. package/nuxt/components/Timeline.js +3 -0
  202. package/nuxt/components/TimelineItem.js +3 -0
  203. package/nuxt/components/Tooltip.js +3 -0
  204. package/nuxt/components/Tree.js +3 -0
  205. package/nuxt/components/Upload.js +3 -0
  206. package/nuxt/components/UploadStatus.js +3 -0
  207. package/nuxt/components/alertProps.js +3 -0
  208. package/nuxt/components/animationInjectionKey.js +3 -0
  209. package/nuxt/components/autoCompleteProps.js +3 -0
  210. package/nuxt/components/avatarProps.js +3 -0
  211. package/nuxt/components/badgeProps.js +3 -0
  212. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  213. package/nuxt/components/buttonGroupProps.js +3 -0
  214. package/nuxt/components/buttonProps.js +3 -0
  215. package/nuxt/components/cardProps.js +3 -0
  216. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  217. package/nuxt/components/checkboxGroupProps.js +3 -0
  218. package/nuxt/components/checkboxProps.js +3 -0
  219. package/nuxt/components/colProps.js +3 -0
  220. package/nuxt/components/colPropsBaseClass.js +3 -0
  221. package/nuxt/components/colPropsBaseStyle.js +3 -0
  222. package/nuxt/components/collapseItemProps.js +3 -0
  223. package/nuxt/components/collapseProps.js +3 -0
  224. package/nuxt/components/countdownProps.js +3 -0
  225. package/nuxt/components/datePickerProCommonProps.js +3 -0
  226. package/nuxt/components/datePickerProPanelProps.js +3 -0
  227. package/nuxt/components/datePickerProProps.js +3 -0
  228. package/nuxt/components/dropdownMenuProps.js +3 -0
  229. package/nuxt/components/editableSelectProps.js +3 -0
  230. package/nuxt/components/fixedOverlayProps.js +3 -0
  231. package/nuxt/components/flexibleOverlayProps.js +3 -0
  232. package/nuxt/components/formItemProps.js +3 -0
  233. package/nuxt/components/formProps.js +3 -0
  234. package/nuxt/components/fullscreenProps.js +3 -0
  235. package/nuxt/components/iconProps.js +3 -0
  236. package/nuxt/components/imagePreviewProps.js +3 -0
  237. package/nuxt/components/inputProps.js +3 -0
  238. package/nuxt/components/loadingProps.js +3 -0
  239. package/nuxt/components/messageProps.js +3 -0
  240. package/nuxt/components/modalProps.js +3 -0
  241. package/nuxt/components/notificationProps.js +3 -0
  242. package/nuxt/components/paginationProps.js +3 -0
  243. package/nuxt/components/panelProps.js +3 -0
  244. package/nuxt/components/popoverProps.js +3 -0
  245. package/nuxt/components/progressProps.js +3 -0
  246. package/nuxt/components/rateProps.js +3 -0
  247. package/nuxt/components/resultProps.js +3 -0
  248. package/nuxt/components/roundInjectionKey.js +3 -0
  249. package/nuxt/components/rowProps.js +3 -0
  250. package/nuxt/components/screenSizes.js +3 -0
  251. package/nuxt/components/searchProps.js +3 -0
  252. package/nuxt/components/skeletonItemProps.js +3 -0
  253. package/nuxt/components/skeletonProps.js +3 -0
  254. package/nuxt/components/sliderProps.js +3 -0
  255. package/nuxt/components/splitterProps.js +3 -0
  256. package/nuxt/components/statisticProps.js +3 -0
  257. package/nuxt/components/stepProps.js +3 -0
  258. package/nuxt/components/stepsProps.js +3 -0
  259. package/nuxt/components/svgIconProps.js +3 -0
  260. package/nuxt/components/switchProps.js +3 -0
  261. package/nuxt/components/tableProps.js +3 -0
  262. package/nuxt/components/tabsProps.js +3 -0
  263. package/nuxt/components/tagProps.js +3 -0
  264. package/nuxt/components/textareaProps.js +3 -0
  265. package/nuxt/components/timeAxisProps.js +3 -0
  266. package/nuxt/components/timerPickerPanelProps.js +3 -0
  267. package/nuxt/components/tooltipProps.js +3 -0
  268. package/nuxt/components/treeProps.js +3 -0
  269. package/nuxt/components/uploadProps.js +3 -0
  270. package/nuxt/index.js +13 -0
  271. package/overlay/index.d.ts +7 -0
  272. package/overlay/index.es.js +293 -1
  273. package/overlay/index.umd.js +1 -1
  274. package/overlay/style.css +1 -1
  275. package/package.json +19 -82
  276. package/pagination/index.d.ts +7 -0
  277. package/pagination/index.es.js +820 -1
  278. package/pagination/index.umd.js +1 -1
  279. package/pagination/style.css +1 -1
  280. package/panel/index.d.ts +7 -0
  281. package/panel/index.es.js +218 -1
  282. package/panel/index.umd.js +1 -1
  283. package/panel/style.css +1 -1
  284. package/popover/index.d.ts +7 -0
  285. package/popover/index.es.js +6062 -1
  286. package/popover/index.umd.js +27 -1
  287. package/popover/style.css +1 -1
  288. package/progress/index.d.ts +7 -0
  289. package/progress/index.es.js +207 -1
  290. package/progress/index.umd.js +3 -1
  291. package/progress/style.css +1 -1
  292. package/radio/index.d.ts +7 -0
  293. package/radio/index.es.js +8056 -1
  294. package/radio/index.umd.js +38 -1
  295. package/radio/style.css +1 -1
  296. package/rate/index.d.ts +7 -0
  297. package/rate/index.es.js +242 -1
  298. package/rate/index.umd.js +1 -1
  299. package/rate/style.css +1 -1
  300. package/result/index.d.ts +7 -0
  301. package/result/index.es.js +248 -0
  302. package/result/index.umd.js +1 -0
  303. package/result/package.json +7 -0
  304. package/result/style.css +1 -0
  305. package/ripple/index.d.ts +7 -0
  306. package/ripple/index.es.js +173 -1
  307. package/ripple/index.umd.js +1 -1
  308. package/search/index.d.ts +7 -0
  309. package/search/index.es.js +8504 -2
  310. package/search/index.umd.js +38 -10
  311. package/search/style.css +1 -1
  312. package/select/index.d.ts +7 -0
  313. package/select/index.es.js +9423 -1
  314. package/select/index.umd.js +38 -1
  315. package/select/style.css +1 -1
  316. package/skeleton/index.d.ts +7 -0
  317. package/skeleton/index.es.js +145 -0
  318. package/skeleton/index.umd.js +1 -0
  319. package/skeleton/package.json +7 -0
  320. package/skeleton/style.css +1 -0
  321. package/slider/index.d.ts +7 -0
  322. package/slider/index.es.js +203 -1
  323. package/slider/index.umd.js +1 -1
  324. package/slider/style.css +1 -1
  325. package/splitter/index.d.ts +7 -0
  326. package/splitter/index.es.js +6754 -1
  327. package/splitter/index.umd.js +27 -1
  328. package/splitter/style.css +1 -1
  329. package/statistic/index.d.ts +7 -0
  330. package/statistic/index.es.js +253 -0
  331. package/statistic/index.umd.js +1 -0
  332. package/statistic/package.json +7 -0
  333. package/statistic/style.css +1 -0
  334. package/status/index.d.ts +7 -0
  335. package/status/index.es.js +63 -1
  336. package/status/index.umd.js +1 -1
  337. package/status/style.css +1 -1
  338. package/steps/index.d.ts +7 -0
  339. package/steps/index.es.js +386 -0
  340. package/steps/index.umd.js +1 -0
  341. package/steps/package.json +7 -0
  342. package/steps/style.css +1 -0
  343. package/style.css +1 -1
  344. package/switch/index.d.ts +7 -0
  345. package/switch/index.es.js +7852 -1
  346. package/switch/index.umd.js +38 -1
  347. package/switch/style.css +1 -1
  348. package/table/index.d.ts +7 -0
  349. package/table/index.es.js +11527 -0
  350. package/table/index.umd.js +38 -0
  351. package/table/package.json +7 -0
  352. package/table/style.css +1 -0
  353. package/tabs/index.d.ts +7 -0
  354. package/tabs/index.es.js +407 -1
  355. package/tabs/index.umd.js +1 -1
  356. package/tabs/style.css +1 -1
  357. package/tag/index.d.ts +7 -0
  358. package/tag/index.es.js +156 -0
  359. package/tag/index.umd.js +1 -0
  360. package/tag/package.json +7 -0
  361. package/tag/style.css +1 -0
  362. package/textarea/index.d.ts +7 -0
  363. package/textarea/index.es.js +7986 -0
  364. package/textarea/index.umd.js +46 -0
  365. package/textarea/package.json +7 -0
  366. package/textarea/style.css +1 -0
  367. package/{theme → theme/theme.scss} +0 -0
  368. package/time-picker/index.d.ts +7 -0
  369. package/time-picker/index.es.js +9556 -0
  370. package/time-picker/index.umd.js +38 -0
  371. package/{date-picker → time-picker}/package.json +1 -1
  372. package/time-picker/style.css +1 -0
  373. package/time-select/index.d.ts +7 -0
  374. package/time-select/index.es.js +9604 -0
  375. package/time-select/index.umd.js +38 -0
  376. package/time-select/package.json +7 -0
  377. package/time-select/style.css +1 -0
  378. package/timeline/index.d.ts +7 -0
  379. package/timeline/index.es.js +427 -0
  380. package/timeline/index.umd.js +1 -0
  381. package/timeline/package.json +7 -0
  382. package/timeline/style.css +1 -0
  383. package/tooltip/index.d.ts +7 -0
  384. package/tooltip/index.es.js +5900 -1
  385. package/tooltip/index.umd.js +27 -1
  386. package/tooltip/style.css +1 -1
  387. package/tree/index.d.ts +7 -0
  388. package/tree/index.es.js +10336 -1
  389. package/tree/index.umd.js +38 -1
  390. package/tree/style.css +1 -1
  391. package/upload/index.d.ts +7 -0
  392. package/upload/index.es.js +1398 -1
  393. package/upload/index.umd.js +1 -1
  394. package/upload/style.css +1 -1
  395. package/vue-devui.es.js +27443 -2
  396. package/vue-devui.umd.js +50 -10
  397. package/accordion/index.es.js +0 -1
  398. package/accordion/index.umd.js +0 -1
  399. package/accordion/style.css +0 -1
  400. package/anchor/index.es.js +0 -1
  401. package/anchor/index.umd.js +0 -1
  402. package/anchor/style.css +0 -1
  403. package/carousel/index.es.js +0 -1
  404. package/carousel/index.umd.js +0 -1
  405. package/carousel/style.css +0 -1
  406. package/date-picker/index.es.js +0 -1
  407. package/date-picker/index.umd.js +0 -1
  408. package/date-picker/style.css +0 -1
  409. package/quadrant-diagram/index.es.js +0 -10
  410. package/quadrant-diagram/index.umd.js +0 -10
  411. package/quadrant-diagram/package.json +0 -7
  412. package/quadrant-diagram/style.css +0 -1
  413. package/sticky/index.es.js +0 -1
  414. package/sticky/index.umd.js +0 -1
  415. package/tag-input/index.es.js +0 -1
  416. package/tag-input/index.umd.js +0 -1
  417. package/tag-input/package.json +0 -7
  418. package/tag-input/style.css +0 -1
  419. package/toast/index.es.js +0 -1
  420. package/toast/index.umd.js +0 -1
  421. package/toast/style.css +0 -1
  422. package/transfer/index.es.js +0 -10
  423. package/transfer/index.umd.js +0 -10
  424. package/transfer/package.json +0 -7
  425. package/transfer/style.css +0 -1
@@ -0,0 +1,3 @@
1
+ import '../../input/style.css'
2
+
3
+ export { inputProps as default } from '../../input/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../loading/style.css'
2
+
3
+ export { loadingProps as default } from '../../loading/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../message/style.css'
2
+
3
+ export { messageProps as default } from '../../message/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../modal/style.css'
2
+
3
+ export { modalProps as default } from '../../modal/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../notification/style.css'
2
+
3
+ export { notificationProps as default } from '../../notification/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../pagination/style.css'
2
+
3
+ export { paginationProps as default } from '../../pagination/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../panel/style.css'
2
+
3
+ export { panelProps as default } from '../../panel/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../popover/style.css'
2
+
3
+ export { popoverProps as default } from '../../popover/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../progress/style.css'
2
+
3
+ export { progressProps as default } from '../../progress/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../rate/style.css'
2
+
3
+ export { rateProps as default } from '../../rate/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../result/style.css'
2
+
3
+ export { resultProps as default } from '../../result/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../skeleton/style.css'
2
+
3
+ export { roundInjectionKey as default } from '../../skeleton/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../grid/style.css'
2
+
3
+ export { rowProps as default } from '../../grid/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../grid/style.css'
2
+
3
+ export { screenSizes as default } from '../../grid/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../search/style.css'
2
+
3
+ export { searchProps as default } from '../../search/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../skeleton/style.css'
2
+
3
+ export { skeletonItemProps as default } from '../../skeleton/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../skeleton/style.css'
2
+
3
+ export { skeletonProps as default } from '../../skeleton/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../slider/style.css'
2
+
3
+ export { sliderProps as default } from '../../slider/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../splitter/style.css'
2
+
3
+ export { splitterProps as default } from '../../splitter/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../statistic/style.css'
2
+
3
+ export { statisticProps as default } from '../../statistic/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../steps/style.css'
2
+
3
+ export { stepProps as default } from '../../steps/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../steps/style.css'
2
+
3
+ export { stepsProps as default } from '../../steps/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../icon/style.css'
2
+
3
+ export { svgIconProps as default } from '../../icon/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../switch/style.css'
2
+
3
+ export { switchProps as default } from '../../switch/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../table/style.css'
2
+
3
+ export { tableProps as default } from '../../table/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../tabs/style.css'
2
+
3
+ export { tabsProps as default } from '../../tabs/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../tag/style.css'
2
+
3
+ export { tagProps as default } from '../../tag/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../textarea/style.css'
2
+
3
+ export { textareaProps as default } from '../../textarea/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../timeline/style.css'
2
+
3
+ export { timeAxisProps as default } from '../../timeline/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../date-picker-pro/style.css'
2
+
3
+ export { timerPickerPanelProps as default } from '../../date-picker-pro/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../tooltip/style.css'
2
+
3
+ export { tooltipProps as default } from '../../tooltip/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../tree/style.css'
2
+
3
+ export { treeProps as default } from '../../tree/index.es.js'
@@ -0,0 +1,3 @@
1
+ import '../../upload/style.css'
2
+
3
+ export { uploadProps as default } from '../../upload/index.es.js'
package/nuxt/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import { join } from 'pathe'
2
+ import { defineNuxtModule } from '@nuxt/kit'
3
+
4
+ export default defineNuxtModule({
5
+ hooks: {
6
+ 'components:dirs'(dirs) {
7
+ dirs.push({
8
+ path: join(__dirname,'./components'),
9
+ prefix:'D'
10
+ })
11
+ }
12
+ }
13
+ })
@@ -0,0 +1,7 @@
1
+ import { App } from 'vue';
2
+ declare function install(app: App): void
3
+ declare const _default: {
4
+ install: typeof install;
5
+ version: string;
6
+ };
7
+ export default _default;
@@ -1 +1,293 @@
1
- var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,a=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&i(e,n,t[n]);if(o)for(var n of o(t))r.call(t,n)&&i(e,n,t[n]);return e};"undefined"!=typeof require&&require;import{defineComponent as s,createVNode as c,Teleport as d,Transition as u,renderSlot as p,isVNode as f,computed as v,watch as y,onUnmounted as b,ref as g,withDirectives as h,vShow as m,reactive as w,getCurrentInstance as k,onMounted as C,nextTick as O,toRef as B,onBeforeUnmount as x,isRef as E}from"vue";const j=s({setup:(e,t)=>()=>{let e;return c(d,{to:"#d-overlay-anchor"},{default:()=>{return[c(u,{name:"d-overlay-fade"},(n=e=p(t.slots,"default"),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!f(n)?e:{default:()=>[e]}))];var n}})}}),L={visible:{type:Boolean},"onUpdate:visible":{type:Function},backgroundBlock:{type:Boolean,default:!1},backgroundClass:{type:String,default:""},hasBackdrop:{type:Boolean,default:!0},backdropClick:{type:Function},backdropClose:{type:Boolean,default:!0}};function X(e){const t=v((()=>e.hasBackdrop?["d-overlay-container",e.backgroundClass]:["d-overlay-container","d-overlay-container__disabled"])),n=v((()=>e.hasBackdrop?["d-overlay-panel"]:["d-overlay-panel","d-overlay-container__disabled"])),o=document.body,l=o.style.overflow;return y([()=>e.visible,()=>e.backgroundBlock],(([e,t])=>{t&&(o.style.overflow=e?"hidden":l)})),b((()=>{o.style.overflow=l})),{containerClass:t,panelClass:n,handleBackdropClick:t=>{var n,o;t.preventDefault(),null==(n=e.backdropClick)||n.call(e),e.backdropClose&&(null==(o=e["onUpdate:visible"])||o.call(e,!1))}}}const Y=s({name:"DFixedOverlay",props:(F=a({},L),P={overlayStyle:{type:Object,default:void 0}},t(F,n(P))),setup(e,t){const{containerClass:n,panelClass:o,handleBackdropClick:l}=X(e),r=g(null),i=e=>e.cancelBubble=!0;return()=>c(j,null,{default:()=>[h(c("div",{class:n.value,onClick:l},[c("div",{class:o.value},[c("div",{ref:r,class:"d-overlay",style:e.overlayStyle,onClick:i},[p(t.slots,"default")])])]),[[m,e.visible]])]})}});var F,P;const R=s({name:"DFlexibleOverlay",props:a({origin:{type:Object,require:!0},position:{type:Object,default:()=>({originX:"left",originY:"top",overlayX:"left",overlayY:"top"})}},L),emits:["onUpdate:visible"],setup(e,t){const n=g(null),o=w({position:"absolute"}),l=k();C((async()=>{await O();const t=n.value;if(!t)return;const r=function(e){if(e instanceof Element)return e;if(E(e))return function(e){if(e instanceof Element)return e;if(e&&"object"==typeof e&&e.$el instanceof Element)return e.$el;return null}(e.value);return e}(e.origin);if(!r)return;const i=t=>{const n=function(e,t,n){const o=function(e,t){let n,o;if("center"==t.originX)n=e.left+e.width/2;else{const o=e.left,l=e.right;n="left"==t.originX?o:l}o="center"==t.originY?e.top+e.height/2:"top"==t.originY?e.top:e.bottom;return{x:n,y:o}}(function(e){if(e instanceof Element)return e.getBoundingClientRect();const t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}(n),e);let l;l=t instanceof HTMLElement?t.getBoundingClientRect():t;return function(e,t,n){let o;const{width:l,height:r}=t;o="center"==n.overlayX?e.x-l/2:"left"==n.overlayX?e.x:e.x-l;let i;i="center"==n.overlayY?e.y-r/2:"top"==n.overlayY?e.y:e.y-r;return{x:o,y:i}}(o,l,e)}(e.position,t,r);o.left=`${n.x}px`,o.top=`${n.y}px`},a=()=>i(t.getBoundingClientRect());y(B(e,"visible"),((e,t,n)=>{var o;e?(o=a,window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),window.addEventListener("orientationchange",o)):S(a),n((()=>{S(a)}))})),y(B(e,"position"),(()=>{a()}));const s=new ResizeObserver((e=>{i(e[0].contentRect)}));if(s.observe(t),x((()=>{s.disconnect()}),l),r instanceof Element){const e=new MutationObserver(a);e.observe(r,{attributeFilter:["style"]}),x((()=>{e.disconnect()}),l)}}),l);const{containerClass:r,panelClass:i,handleBackdropClick:a}=X(e);return()=>c(j,null,{default:()=>[h(c("div",{class:r},[c("div",{class:i,style:{position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",display:"flex"},onClick:a},[c("div",{ref:n,class:"d-overlay",style:o,onClick:e=>e.cancelBubble=!0},[p(t.slots,"default")])])]),[[m,e.visible]])]})}});function S(e){window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}R.install=function(e){e.component(R.name,R)},Y.install=function(e){e.component(Y.name,Y)};var z={title:"Overlay 遮罩层",category:"通用",install(e){if(e.use(Y),e.use(R),!document.getElementById("d-overlay-anchor")){const e=document.createElement("div");e.setAttribute("id","d-overlay-anchor"),e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.zIndex="1000",document.body.appendChild(e)}}};export{Y as FixedOverlay,R as FlexibleOverlay,z as default};
1
+ import { watch, onUnmounted, defineComponent, toRefs, createVNode, Transition, mergeProps, ref, nextTick, unref } from "vue";
2
+ import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
3
+ const fixedOverlayProps = {
4
+ modelValue: {
5
+ type: Boolean,
6
+ default: false
7
+ },
8
+ lockScroll: {
9
+ type: Boolean,
10
+ default: true
11
+ },
12
+ closeOnClickOverlay: {
13
+ type: Boolean,
14
+ default: true
15
+ }
16
+ };
17
+ function lockScroll() {
18
+ if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
19
+ const scrollTop = document.documentElement.scrollTop;
20
+ const style = document.documentElement.getAttribute("style");
21
+ document.documentElement.style.position = "fixed";
22
+ document.documentElement.style.top = `-${scrollTop}px`;
23
+ document.documentElement.style.width = document.documentElement.style.width || "100%";
24
+ document.documentElement.style.overflowY = "scroll";
25
+ return () => {
26
+ if (style) {
27
+ document.documentElement.setAttribute("style", style);
28
+ } else {
29
+ document.documentElement.removeAttribute("style");
30
+ }
31
+ document.documentElement.scrollTop = scrollTop;
32
+ };
33
+ }
34
+ return;
35
+ }
36
+ function useFixedOverlay(props, ctx) {
37
+ let lockScrollCb;
38
+ const onClick = (event) => {
39
+ event.preventDefault();
40
+ ctx.emit("click", event);
41
+ if (props.closeOnClickOverlay) {
42
+ ctx.emit("update:modelValue", false);
43
+ }
44
+ };
45
+ const removeBodyAdditions = () => {
46
+ lockScrollCb == null ? void 0 : lockScrollCb();
47
+ };
48
+ watch(() => props.modelValue, (val) => {
49
+ if (val) {
50
+ props.lockScroll && (lockScrollCb = lockScroll());
51
+ } else {
52
+ removeBodyAdditions();
53
+ }
54
+ });
55
+ onUnmounted(removeBodyAdditions);
56
+ return { onClick };
57
+ }
58
+ function createBem(namespace, element, modifier) {
59
+ let cls = namespace;
60
+ if (element) {
61
+ cls += `__${element}`;
62
+ }
63
+ if (modifier) {
64
+ cls += `--${modifier}`;
65
+ }
66
+ return cls;
67
+ }
68
+ function useNamespace(block, needDot = false) {
69
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
70
+ const b = () => createBem(namespace);
71
+ const e = (element) => element ? createBem(namespace, element) : "";
72
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
73
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
74
+ return {
75
+ b,
76
+ e,
77
+ m,
78
+ em
79
+ };
80
+ }
81
+ var fixedOverlay = "";
82
+ const FixedOverlay = defineComponent({
83
+ name: "DFixedOverlay",
84
+ inheritAttrs: false,
85
+ props: fixedOverlayProps,
86
+ emits: ["update:modelValue", "click"],
87
+ setup(props, ctx) {
88
+ const {
89
+ modelValue
90
+ } = toRefs(props);
91
+ const ns = useNamespace("fixed-overlay");
92
+ const {
93
+ onClick
94
+ } = useFixedOverlay(props, ctx);
95
+ return () => createVNode(Transition, {
96
+ "name": ns.m("fade")
97
+ }, {
98
+ default: () => {
99
+ var _a, _b;
100
+ return [modelValue.value && createVNode("div", mergeProps({
101
+ "class": ns.b()
102
+ }, ctx.attrs, {
103
+ "onClick": onClick
104
+ }), [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])];
105
+ }
106
+ });
107
+ }
108
+ });
109
+ const flexibleOverlayProps = {
110
+ modelValue: {
111
+ type: Boolean,
112
+ default: false
113
+ },
114
+ origin: {
115
+ type: Object,
116
+ require: true
117
+ },
118
+ position: {
119
+ type: Array,
120
+ default: ["bottom"]
121
+ },
122
+ offset: {
123
+ type: [Number, Object],
124
+ default: 8
125
+ },
126
+ shiftOffset: {
127
+ type: Number
128
+ },
129
+ align: {
130
+ type: String,
131
+ default: null
132
+ },
133
+ showArrow: {
134
+ type: Boolean,
135
+ default: false
136
+ },
137
+ isArrowCenter: {
138
+ type: Boolean,
139
+ default: true
140
+ }
141
+ };
142
+ function getScrollParent(element) {
143
+ const overflowRegex = /(auto|scroll|hidden)/;
144
+ for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
145
+ const style = window.getComputedStyle(parent);
146
+ if (overflowRegex.test(style.overflow + style.overflowX + style.overflowY)) {
147
+ return parent;
148
+ }
149
+ }
150
+ return window;
151
+ }
152
+ function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
153
+ let { x, y } = point;
154
+ if (!isArrowCenter) {
155
+ const { width, height } = originRect;
156
+ if (x && placement.includes("start")) {
157
+ x = 12;
158
+ }
159
+ if (x && placement.includes("end")) {
160
+ x = Math.round(width - 24);
161
+ }
162
+ if (y && placement.includes("start")) {
163
+ y = 10;
164
+ }
165
+ if (y && placement.includes("end")) {
166
+ y = height - 14;
167
+ }
168
+ }
169
+ return { x, y };
170
+ }
171
+ function useOverlay(props, emit) {
172
+ const overlayRef = ref();
173
+ const arrowRef = ref();
174
+ let originParent = null;
175
+ const updateArrowPosition = (arrowEl, placement, point, overlayEl) => {
176
+ const { x, y } = adjustArrowPosition(props.isArrowCenter, point, placement, overlayEl.getBoundingClientRect());
177
+ const staticSide = {
178
+ top: "bottom",
179
+ right: "left",
180
+ bottom: "top",
181
+ left: "right"
182
+ }[placement.split("-")[0]];
183
+ Object.assign(arrowEl.style, {
184
+ left: x ? `${x}px` : "",
185
+ top: y ? `${y}px` : "",
186
+ right: "",
187
+ bottom: "",
188
+ [staticSide]: "-4px"
189
+ });
190
+ };
191
+ const updatePosition = async () => {
192
+ const hostEl = props.origin;
193
+ const overlayEl = unref(overlayRef.value);
194
+ const arrowEl = unref(arrowRef.value);
195
+ const middleware = [
196
+ offset(props.offset),
197
+ autoPlacement({
198
+ alignment: props.align,
199
+ allowedPlacements: props.position
200
+ })
201
+ ];
202
+ props.showArrow && middleware.push(arrow({ element: arrowEl }));
203
+ props.shiftOffset !== void 0 && middleware.push(shift());
204
+ const { x, y, placement, middlewareData } = await computePosition(hostEl, overlayEl, {
205
+ strategy: "fixed",
206
+ middleware
207
+ });
208
+ let applyX = x;
209
+ let applyY = y;
210
+ if (props.shiftOffset !== void 0) {
211
+ const { x: shiftX, y: shiftY } = middlewareData.shift;
212
+ shiftX < 0 && (applyX -= props.shiftOffset);
213
+ shiftX > 0 && (applyX += props.shiftOffset);
214
+ shiftY < 0 && (applyY -= props.shiftOffset);
215
+ shiftY > 0 && (applyY += props.shiftOffset);
216
+ }
217
+ emit("positionChange", placement);
218
+ Object.assign(overlayEl.style, { top: `${applyY}px`, left: `${applyX}px` });
219
+ props.showArrow && updateArrowPosition(arrowEl, placement, middlewareData.arrow, overlayEl);
220
+ };
221
+ watch(() => props.modelValue, () => {
222
+ if (props.modelValue && props.origin) {
223
+ originParent = getScrollParent(props.origin);
224
+ nextTick(updatePosition);
225
+ originParent == null ? void 0 : originParent.addEventListener("scroll", updatePosition);
226
+ originParent !== window && window.addEventListener("scroll", updatePosition);
227
+ window.addEventListener("resize", updatePosition);
228
+ } else {
229
+ originParent == null ? void 0 : originParent.removeEventListener("scroll", updatePosition);
230
+ originParent !== window && window.removeEventListener("scroll", updatePosition);
231
+ window.removeEventListener("resize", updatePosition);
232
+ }
233
+ });
234
+ onUnmounted(() => {
235
+ originParent == null ? void 0 : originParent.removeEventListener("scroll", updatePosition);
236
+ originParent !== window && window.removeEventListener("scroll", updatePosition);
237
+ window.removeEventListener("resize", updatePosition);
238
+ });
239
+ return { arrowRef, overlayRef, updatePosition };
240
+ }
241
+ var flexibleOverlay = "";
242
+ const FlexibleOverlay = defineComponent({
243
+ name: "DFlexibleOverlay",
244
+ inheritAttrs: false,
245
+ props: flexibleOverlayProps,
246
+ emits: ["update:modelValue", "positionChange"],
247
+ setup(props, {
248
+ slots,
249
+ attrs,
250
+ emit,
251
+ expose
252
+ }) {
253
+ const ns = useNamespace("flexible-overlay");
254
+ const {
255
+ arrowRef,
256
+ overlayRef,
257
+ updatePosition
258
+ } = useOverlay(props, emit);
259
+ expose({
260
+ updatePosition
261
+ });
262
+ return () => {
263
+ var _a;
264
+ return props.modelValue && createVNode("div", mergeProps({
265
+ "ref": overlayRef,
266
+ "class": ns.b()
267
+ }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
268
+ "ref": arrowRef,
269
+ "class": ns.e("arrow")
270
+ }, null)]);
271
+ };
272
+ }
273
+ });
274
+ const inBrowser = typeof window !== "undefined";
275
+ var index = {
276
+ title: "Overlay \u906E\u7F69\u5C42",
277
+ category: "\u901A\u7528",
278
+ status: "100%",
279
+ install(app) {
280
+ app.component(FixedOverlay.name, FixedOverlay);
281
+ app.component(FlexibleOverlay.name, FlexibleOverlay);
282
+ if (inBrowser && !document.getElementById("d-overlay-anchor")) {
283
+ const overlayAnchor = document.createElement("div");
284
+ overlayAnchor.setAttribute("id", "d-overlay-anchor");
285
+ overlayAnchor.style.position = "fixed";
286
+ overlayAnchor.style.left = "0";
287
+ overlayAnchor.style.top = "0";
288
+ overlayAnchor.style.zIndex = "1000";
289
+ document.body.appendChild(overlayAnchor);
290
+ }
291
+ }
292
+ };
293
+ export { FixedOverlay, FlexibleOverlay, index as default, fixedOverlayProps, flexibleOverlayProps };
@@ -1 +1 @@
1
- var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,__spreadValues=(e,t)=>{for(var o in t||(t={}))__hasOwnProp.call(t,o)&&__defNormalProp(e,o,t[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(t))__propIsEnum.call(t,o)&&__defNormalProp(e,o,t[o]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__require="undefined"!=typeof require?require:e=>{throw new Error('Dynamic require of "'+e+'" is not supported')};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).index={},e.Vue)}(this,(function(e,t){"use strict";const o=t.defineComponent({setup:(e,o)=>()=>{let e;return t.createVNode(t.Teleport,{to:"#d-overlay-anchor"},{default:()=>{return[t.createVNode(t.Transition,{name:"d-overlay-fade"},(n=e=t.renderSlot(o.slots,"default"),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?e:{default:()=>[e]}))];var n}})}}),n={visible:{type:Boolean},"onUpdate:visible":{type:Function},backgroundBlock:{type:Boolean,default:!1},backgroundClass:{type:String,default:""},hasBackdrop:{type:Boolean,default:!0},backdropClick:{type:Function},backdropClose:{type:Boolean,default:!0}};function r(e){const o=t.computed((()=>e.hasBackdrop?["d-overlay-container",e.backgroundClass]:["d-overlay-container","d-overlay-container__disabled"])),n=t.computed((()=>e.hasBackdrop?["d-overlay-panel"]:["d-overlay-panel","d-overlay-container__disabled"])),r=document.body,l=r.style.overflow;return t.watch([()=>e.visible,()=>e.backgroundBlock],(([e,t])=>{t&&(r.style.overflow=e?"hidden":l)})),t.onUnmounted((()=>{r.style.overflow=l})),{containerClass:o,panelClass:n,handleBackdropClick:t=>{var o,n;t.preventDefault(),null==(o=e.backdropClick)||o.call(e),e.backdropClose&&(null==(n=e["onUpdate:visible"])||n.call(e,!1))}}}const l=t.defineComponent({name:"DFixedOverlay",props:__spreadProps(__spreadValues({},n),{overlayStyle:{type:Object,default:void 0}}),setup(e,n){const{containerClass:l,panelClass:i,handleBackdropClick:a}=r(e),s=t.ref(null),c=e=>e.cancelBubble=!0;return()=>t.createVNode(o,null,{default:()=>[t.withDirectives(t.createVNode("div",{class:l.value,onClick:a},[t.createVNode("div",{class:i.value},[t.createVNode("div",{ref:s,class:"d-overlay",style:e.overlayStyle,onClick:c},[t.renderSlot(n.slots,"default")])])]),[[t.vShow,e.visible]])]})}}),i=t.defineComponent({name:"DFlexibleOverlay",props:__spreadValues({origin:{type:Object,require:!0},position:{type:Object,default:()=>({originX:"left",originY:"top",overlayX:"left",overlayY:"top"})}},n),emits:["onUpdate:visible"],setup(e,n){const l=t.ref(null),i=t.reactive({position:"absolute"}),s=t.getCurrentInstance();t.onMounted((async()=>{await t.nextTick();const o=l.value;if(!o)return;const n=function(e){if(e instanceof Element)return e;if(t.isRef(e))return function(e){if(e instanceof Element)return e;if(e&&"object"==typeof e&&e.$el instanceof Element)return e.$el;return null}(e.value);return e}(e.origin);if(!n)return;const r=t=>{const o=function(e,t,o){const n=function(e,t){let o,n;if("center"==t.originX)o=e.left+e.width/2;else{const n=e.left,r=e.right;o="left"==t.originX?n:r}n="center"==t.originY?e.top+e.height/2:"top"==t.originY?e.top:e.bottom;return{x:o,y:n}}(function(e){if(e instanceof Element)return e.getBoundingClientRect();const t=e.width||0,o=e.height||0;return{top:e.y,bottom:e.y+o,left:e.x,right:e.x+t,height:o,width:t}}(o),e);let r;r=t instanceof HTMLElement?t.getBoundingClientRect():t;return function(e,t,o){let n;const{width:r,height:l}=t;n="center"==o.overlayX?e.x-r/2:"left"==o.overlayX?e.x:e.x-r;let i;i="center"==o.overlayY?e.y-l/2:"top"==o.overlayY?e.y:e.y-l;return{x:n,y:i}}(n,r,e)}(e.position,t,n);i.left=`${o.x}px`,i.top=`${o.y}px`},c=()=>r(o.getBoundingClientRect());t.watch(t.toRef(e,"visible"),((e,t,o)=>{var n;e?(n=c,window.addEventListener("scroll",n,!0),window.addEventListener("resize",n),window.addEventListener("orientationchange",n)):a(c),o((()=>{a(c)}))})),t.watch(t.toRef(e,"position"),(()=>{c()}));const d=new ResizeObserver((e=>{r(e[0].contentRect)}));if(d.observe(o),t.onBeforeUnmount((()=>{d.disconnect()}),s),n instanceof Element){const e=new MutationObserver(c);e.observe(n,{attributeFilter:["style"]}),t.onBeforeUnmount((()=>{e.disconnect()}),s)}}),s);const{containerClass:c,panelClass:d,handleBackdropClick:p}=r(e);return()=>t.createVNode(o,null,{default:()=>[t.withDirectives(t.createVNode("div",{class:c},[t.createVNode("div",{class:d,style:{position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",display:"flex"},onClick:p},[t.createVNode("div",{ref:l,class:"d-overlay",style:i,onClick:e=>e.cancelBubble=!0},[t.renderSlot(n.slots,"default")])])]),[[t.vShow,e.visible]])]})}});function a(e){window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}i.install=function(e){e.component(i.name,i)},l.install=function(e){e.component(l.name,l)};var s={title:"Overlay 遮罩层",category:"通用",install(e){if(e.use(l),e.use(i),!document.getElementById("d-overlay-anchor")){const e=document.createElement("div");e.setAttribute("id","d-overlay-anchor"),e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.zIndex="1000",document.body.appendChild(e)}}};e.FixedOverlay=l,e.FlexibleOverlay=i,e.default=s,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"}));
1
+ (function(a,l){typeof exports=="object"&&typeof module!="undefined"?l(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],l):(a=typeof globalThis!="undefined"?globalThis:a||self,l(a.index={},a.Vue,a.dom))})(this,function(a,l,f){"use strict";const b={modelValue:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}};function P(){if(document.documentElement.scrollHeight>document.documentElement.clientHeight){const e=document.documentElement.scrollTop,t=document.documentElement.getAttribute("style");return document.documentElement.style.position="fixed",document.documentElement.style.top=`-${e}px`,document.documentElement.style.width=document.documentElement.style.width||"100%",document.documentElement.style.overflowY="scroll",()=>{t?document.documentElement.setAttribute("style",t):document.documentElement.removeAttribute("style"),document.documentElement.scrollTop=e}}}function k(e,t){let o;const i=s=>{s.preventDefault(),t.emit("click",s),e.closeOnClickOverlay&&t.emit("update:modelValue",!1)},n=()=>{o==null||o()};return l.watch(()=>e.modelValue,s=>{s?e.lockScroll&&(o=P()):n()}),l.onUnmounted(n),{onClick:i}}function y(e,t,o){let i=e;return t&&(i+=`__${t}`),o&&(i+=`--${o}`),i}function g(e,t=!1){const o=t?`.devui-${e}`:`devui-${e}`;return{b:()=>y(o),e:d=>d?y(o,d):"",m:d=>d?y(o,"",d):"",em:(d,c)=>d&&c?y(o,d,c):""}}var j="";const O=l.defineComponent({name:"DFixedOverlay",inheritAttrs:!1,props:b,emits:["update:modelValue","click"],setup(e,t){const{modelValue:o}=l.toRefs(e),i=g("fixed-overlay"),{onClick:n}=k(e,t);return()=>l.createVNode(l.Transition,{name:i.m("fade")},{default:()=>{var s,r;return[o.value&&l.createVNode("div",l.mergeProps({class:i.b()},t.attrs,{onClick:n}),[(r=(s=t.slots).default)==null?void 0:r.call(s)])]}})}}),A={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},shiftOffset:{type:Number},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function L(e){const t=/(auto|scroll|hidden)/;for(let o=e;o=o.parentElement;o.parentElement!==document.body){const i=window.getComputedStyle(o);if(t.test(i.overflow+i.overflowX+i.overflowY))return o}return window}function $(e,t,o,i){let{x:n,y:s}=t;if(!e){const{width:r,height:d}=i;n&&o.includes("start")&&(n=12),n&&o.includes("end")&&(n=Math.round(r-24)),s&&o.includes("start")&&(s=10),s&&o.includes("end")&&(s=d-14)}return{x:n,y:s}}function F(e,t){const o=l.ref(),i=l.ref();let n=null;const s=(d,c,u,m)=>{const{x:w,y:v}=$(e.isArrowCenter,u,c,m.getBoundingClientRect()),h={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]];Object.assign(d.style,{left:w?`${w}px`:"",top:v?`${v}px`:"",right:"",bottom:"",[h]:"-4px"})},r=async()=>{const d=e.origin,c=l.unref(o.value),u=l.unref(i.value),m=[f.offset(e.offset),f.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&m.push(f.arrow({element:u})),e.shiftOffset!==void 0&&m.push(f.shift());const{x:w,y:v,placement:h,middlewareData:V}=await f.computePosition(d,c,{strategy:"fixed",middleware:m});let p=w,x=v;if(e.shiftOffset!==void 0){const{x:C,y:B}=V.shift;C<0&&(p-=e.shiftOffset),C>0&&(p+=e.shiftOffset),B<0&&(x-=e.shiftOffset),B>0&&(x+=e.shiftOffset)}t("positionChange",h),Object.assign(c.style,{top:`${x}px`,left:`${p}px`}),e.showArrow&&s(u,h,V.arrow,c)};return l.watch(()=>e.modelValue,()=>{e.modelValue&&e.origin?(n=L(e.origin),l.nextTick(r),n==null||n.addEventListener("scroll",r),n!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(n==null||n.removeEventListener("scroll",r),n!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),l.onUnmounted(()=>{n==null||n.removeEventListener("scroll",r),n!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:i,overlayRef:o,updatePosition:r}}var N="";const E=l.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:A,emits:["update:modelValue","positionChange"],setup(e,{slots:t,attrs:o,emit:i,expose:n}){const s=g("flexible-overlay"),{arrowRef:r,overlayRef:d,updatePosition:c}=F(e,i);return n({updatePosition:c}),()=>{var u;return e.modelValue&&l.createVNode("div",l.mergeProps({ref:d,class:s.b()},o),[(u=t.default)==null?void 0:u.call(t),e.showArrow&&l.createVNode("div",{ref:r,class:s.e("arrow")},null)])}}}),S=typeof window!="undefined";var T={title:"Overlay \u906E\u7F69\u5C42",category:"\u901A\u7528",status:"100%",install(e){if(e.component(O.name,O),e.component(E.name,E),S&&!document.getElementById("d-overlay-anchor")){const t=document.createElement("div");t.setAttribute("id","d-overlay-anchor"),t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.zIndex="1000",document.body.appendChild(t)}}};a.FixedOverlay=O,a.FlexibleOverlay=E,a.default=T,a.fixedOverlayProps=b,a.flexibleOverlayProps=A,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/overlay/style.css CHANGED
@@ -1 +1 @@
1
- .d-overlay-container{position:fixed;top:0;left:0;height:100%;width:100%;display:flex}.d-overlay-container__disabled{pointer-events:none}.d-overlay-container__background{background:rgba(0,0,0,.4)}.d-overlay-container .d-overlay-panel{position:relative;z-index:1000}.d-overlay-container .d-overlay{pointer-events:auto}@keyframes d-overlay-fade{0%{opacity:0}to{opacity:1}}.d-overlay-fade-enter{opacity:0}.d-overlay-fade-enter-active{animation-name:d-overlay-fade;animation-duration:.3s}.d-overlay-fade-leave{opacity:1}.d-overlay-fade-leave-active{animation-name:d-overlay-fade;animation-duration:.3s;animation-direction:reverse}
1
+ .devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 4px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}