vue-devui 1.0.0-rc.0 → 1.0.0-rc.11

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 (353) hide show
  1. package/README.md +78 -116
  2. package/alert/index.es.js +74 -45
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8190 -296
  6. package/auto-complete/index.umd.js +29 -1
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +153 -146
  9. package/avatar/index.umd.js +1 -1
  10. package/avatar/style.css +1 -1
  11. package/badge/index.es.js +34 -5
  12. package/badge/index.umd.js +1 -1
  13. package/badge/style.css +1 -1
  14. package/button/index.es.js +5741 -127
  15. package/button/index.umd.js +27 -1
  16. package/button/style.css +1 -1
  17. package/card/index.es.js +63 -35
  18. package/card/index.umd.js +1 -1
  19. package/card/style.css +1 -1
  20. package/checkbox/index.es.js +8068 -255
  21. package/checkbox/index.umd.js +27 -1
  22. package/checkbox/style.css +1 -1
  23. package/{accordion → collapse}/index.d.ts +0 -0
  24. package/collapse/index.es.js +379 -0
  25. package/collapse/index.umd.js +1 -0
  26. package/{anchor → collapse}/package.json +1 -1
  27. package/collapse/style.css +1 -0
  28. package/countdown/index.es.js +5 -7
  29. package/countdown/index.umd.js +1 -1
  30. package/date-picker/index.es.js +8167 -288
  31. package/date-picker/index.umd.js +27 -1
  32. package/date-picker/style.css +1 -1
  33. package/drawer/index.es.js +31 -4
  34. package/drawer/index.umd.js +1 -1
  35. package/drawer/style.css +1 -1
  36. package/dropdown/index.es.js +297 -181
  37. package/dropdown/index.umd.js +1 -1
  38. package/dropdown/style.css +1 -1
  39. package/editable-select/index.es.js +525 -154
  40. package/editable-select/index.umd.js +1 -1
  41. package/editable-select/style.css +1 -1
  42. package/form/index.es.js +1048 -1176
  43. package/form/index.umd.js +16 -16
  44. package/form/style.css +1 -1
  45. package/fullscreen/index.es.js +42 -21
  46. package/fullscreen/index.umd.js +1 -1
  47. package/fullscreen/style.css +1 -1
  48. package/grid/index.es.js +101 -86
  49. package/grid/index.umd.js +1 -1
  50. package/grid/style.css +1 -1
  51. package/icon/index.es.js +197 -56
  52. package/icon/index.umd.js +1 -1
  53. package/icon/style.css +1 -0
  54. package/image-preview/index.es.js +55 -31
  55. package/image-preview/index.umd.js +1 -1
  56. package/image-preview/style.css +1 -1
  57. package/input/index.es.js +8074 -144
  58. package/input/index.umd.js +27 -1
  59. package/input/style.css +1 -1
  60. package/input-number/index.es.js +269 -183
  61. package/input-number/index.umd.js +1 -1
  62. package/input-number/style.css +1 -1
  63. package/layout/index.es.js +40 -25
  64. package/layout/index.umd.js +1 -1
  65. package/layout/style.css +1 -1
  66. package/loading/index.es.js +74 -35
  67. package/loading/index.umd.js +1 -1
  68. package/loading/style.css +1 -1
  69. package/modal/index.es.js +412 -204
  70. package/modal/index.umd.js +1 -1
  71. package/modal/style.css +1 -1
  72. package/notification/index.es.js +307 -57
  73. package/notification/index.umd.js +1 -1
  74. package/notification/style.css +1 -1
  75. package/nuxt/components/ButtonGroup.js +3 -0
  76. package/nuxt/components/CheckboxButton.js +3 -0
  77. package/nuxt/components/CheckboxGroup.js +3 -0
  78. package/nuxt/components/Collapse.js +3 -0
  79. package/nuxt/components/CollapseItem.js +3 -0
  80. package/nuxt/components/DropdownPropsKey.js +3 -0
  81. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  82. package/nuxt/components/FORM_TOKEN.js +3 -0
  83. package/nuxt/components/Icon.js +1 -0
  84. package/nuxt/components/IconGroup.js +3 -0
  85. package/nuxt/components/LABEL_DATA.js +3 -0
  86. package/nuxt/components/LoadingOptions.js +3 -0
  87. package/nuxt/components/Option.js +3 -0
  88. package/nuxt/components/PanelBody.js +3 -0
  89. package/nuxt/components/PanelFooter.js +3 -0
  90. package/nuxt/components/PanelHeader.js +3 -0
  91. package/nuxt/components/RadioButton.js +3 -0
  92. package/nuxt/components/TABLE_TOKEN.js +3 -0
  93. package/nuxt/components/Tab.js +3 -0
  94. package/nuxt/components/TimeSelect.js +3 -0
  95. package/nuxt/components/Timeline.js +3 -0
  96. package/nuxt/components/TimelineItem.js +3 -0
  97. package/nuxt/components/alertProps.js +3 -0
  98. package/nuxt/components/autoCompleteProps.js +3 -0
  99. package/nuxt/components/avatarProps.js +3 -0
  100. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  101. package/nuxt/components/buttonGroupProps.js +3 -0
  102. package/nuxt/components/cardProps.js +3 -0
  103. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  104. package/nuxt/components/checkboxGroupProps.js +3 -0
  105. package/nuxt/components/checkboxProps.js +3 -0
  106. package/nuxt/components/colProps.js +3 -0
  107. package/nuxt/components/colPropsBaseClass.js +3 -0
  108. package/nuxt/components/colPropsBaseStyle.js +3 -0
  109. package/nuxt/components/collapseItemProps.js +3 -0
  110. package/nuxt/components/collapseProps.js +3 -0
  111. package/nuxt/components/countdownProps.js +3 -0
  112. package/nuxt/components/editableSelectProps.js +3 -0
  113. package/nuxt/components/formItemProps.js +3 -0
  114. package/nuxt/components/formProps.js +3 -0
  115. package/nuxt/components/fullscreenProps.js +3 -0
  116. package/nuxt/components/iconProps.js +3 -0
  117. package/nuxt/components/imagePreviewProps.js +3 -0
  118. package/nuxt/components/inputProps.js +3 -0
  119. package/nuxt/components/loadingProps.js +3 -0
  120. package/nuxt/components/modalProps.js +3 -0
  121. package/nuxt/components/paginationProps.js +3 -0
  122. package/nuxt/components/panelProps.js +3 -0
  123. package/nuxt/components/progressProps.js +3 -0
  124. package/nuxt/components/rateProps.js +3 -0
  125. package/nuxt/components/resultProps.js +3 -0
  126. package/nuxt/components/rowProps.js +3 -0
  127. package/nuxt/components/screenSizes.js +3 -0
  128. package/nuxt/components/searchProps.js +3 -0
  129. package/nuxt/components/skeletonProps.js +3 -0
  130. package/nuxt/components/sliderProps.js +3 -0
  131. package/nuxt/components/splitterProps.js +3 -0
  132. package/nuxt/components/statisticProps.js +3 -0
  133. package/nuxt/components/svgIconProps.js +3 -0
  134. package/nuxt/components/switchProps.js +3 -0
  135. package/nuxt/components/tableProps.js +3 -0
  136. package/nuxt/components/tabsProps.js +3 -0
  137. package/nuxt/components/tagProps.js +3 -0
  138. package/nuxt/components/textareaProps.js +3 -0
  139. package/nuxt/components/timeAxisProps.js +3 -0
  140. package/nuxt/components/treeProps.js +3 -0
  141. package/overlay/index.es.js +127 -149
  142. package/overlay/index.umd.js +1 -1
  143. package/overlay/style.css +1 -1
  144. package/package.json +11 -44
  145. package/pagination/index.es.js +158 -148
  146. package/pagination/index.umd.js +1 -1
  147. package/pagination/style.css +1 -1
  148. package/panel/index.es.js +45 -32
  149. package/panel/index.umd.js +1 -1
  150. package/panel/style.css +1 -1
  151. package/popover/index.es.js +317 -246
  152. package/popover/index.umd.js +15 -15
  153. package/popover/style.css +1 -1
  154. package/progress/index.es.js +110 -56
  155. package/progress/index.umd.js +3 -3
  156. package/progress/style.css +1 -1
  157. package/radio/index.es.js +7972 -157
  158. package/radio/index.umd.js +27 -1
  159. package/radio/style.css +1 -1
  160. package/rate/index.es.js +77 -55
  161. package/rate/index.umd.js +1 -1
  162. package/rate/style.css +1 -1
  163. package/result/index.es.js +184 -57
  164. package/result/index.umd.js +1 -1
  165. package/result/style.css +1 -1
  166. package/ripple/index.es.js +47 -42
  167. package/ripple/index.umd.js +1 -1
  168. package/search/index.es.js +3653 -1122
  169. package/search/index.umd.js +18 -18
  170. package/search/style.css +1 -1
  171. package/select/index.es.js +9170 -596
  172. package/select/index.umd.js +27 -1
  173. package/select/style.css +1 -1
  174. package/skeleton/index.es.js +63 -41
  175. package/skeleton/index.umd.js +1 -1
  176. package/skeleton/style.css +1 -1
  177. package/slider/index.es.js +144 -137
  178. package/slider/index.umd.js +1 -1
  179. package/slider/style.css +1 -1
  180. package/splitter/index.es.js +469 -349
  181. package/splitter/index.umd.js +15 -15
  182. package/splitter/style.css +1 -1
  183. package/statistic/index.es.js +41 -34
  184. package/statistic/index.umd.js +1 -1
  185. package/statistic/style.css +1 -1
  186. package/status/index.es.js +27 -6
  187. package/status/index.umd.js +1 -1
  188. package/status/style.css +1 -1
  189. package/style.css +1 -1
  190. package/switch/index.es.js +7802 -64
  191. package/switch/index.umd.js +27 -1
  192. package/switch/style.css +1 -1
  193. package/table/index.es.js +10459 -1511
  194. package/table/index.umd.js +27 -1
  195. package/table/style.css +1 -1
  196. package/tabs/index.es.js +344 -141
  197. package/tabs/index.umd.js +1 -1
  198. package/tabs/style.css +1 -1
  199. package/tag/index.es.js +49 -24
  200. package/tag/index.umd.js +1 -1
  201. package/tag/style.css +1 -1
  202. package/textarea/index.es.js +7921 -83
  203. package/textarea/index.umd.js +35 -1
  204. package/textarea/style.css +1 -1
  205. package/{anchor → time-select}/index.d.ts +0 -0
  206. package/{color-picker → time-select}/index.es.js +4171 -2898
  207. package/time-select/index.umd.js +27 -0
  208. package/{breadcrumb → time-select}/package.json +1 -1
  209. package/time-select/style.css +1 -0
  210. package/{back-top → timeline}/index.d.ts +0 -0
  211. package/timeline/index.es.js +425 -0
  212. package/timeline/index.umd.js +1 -0
  213. package/{back-top → timeline}/package.json +1 -1
  214. package/timeline/style.css +1 -0
  215. package/tooltip/index.es.js +308 -236
  216. package/tooltip/index.umd.js +15 -15
  217. package/tooltip/style.css +1 -1
  218. package/tree/index.es.js +5198 -1850
  219. package/tree/index.umd.js +18 -18
  220. package/tree/style.css +1 -1
  221. package/upload/index.es.js +427 -132
  222. package/upload/index.umd.js +1 -1
  223. package/upload/style.css +1 -1
  224. package/vue-devui.es.js +12064 -15841
  225. package/vue-devui.umd.js +30 -20
  226. package/accordion/index.es.js +0 -720
  227. package/accordion/index.umd.js +0 -1
  228. package/accordion/package.json +0 -7
  229. package/accordion/style.css +0 -1
  230. package/anchor/index.es.js +0 -263
  231. package/anchor/index.umd.js +0 -1
  232. package/anchor/style.css +0 -1
  233. package/back-top/index.es.js +0 -128
  234. package/back-top/index.umd.js +0 -1
  235. package/back-top/style.css +0 -1
  236. package/breadcrumb/index.d.ts +0 -7
  237. package/breadcrumb/index.es.js +0 -127
  238. package/breadcrumb/index.umd.js +0 -1
  239. package/breadcrumb/style.css +0 -1
  240. package/carousel/index.d.ts +0 -7
  241. package/carousel/index.es.js +0 -329
  242. package/carousel/index.umd.js +0 -1
  243. package/carousel/package.json +0 -7
  244. package/carousel/style.css +0 -1
  245. package/cascader/index.d.ts +0 -7
  246. package/cascader/index.es.js +0 -5963
  247. package/cascader/index.umd.js +0 -27
  248. package/cascader/package.json +0 -7
  249. package/cascader/style.css +0 -1
  250. package/color-picker/index.d.ts +0 -7
  251. package/color-picker/index.umd.js +0 -27
  252. package/color-picker/package.json +0 -7
  253. package/color-picker/style.css +0 -1
  254. package/comment/index.d.ts +0 -7
  255. package/comment/index.es.js +0 -86
  256. package/comment/index.umd.js +0 -1
  257. package/comment/package.json +0 -7
  258. package/comment/style.css +0 -1
  259. package/dragdrop/index.d.ts +0 -7
  260. package/dragdrop/index.es.js +0 -157
  261. package/dragdrop/index.umd.js +0 -1
  262. package/dragdrop/package.json +0 -7
  263. package/gantt/index.d.ts +0 -7
  264. package/gantt/index.es.js +0 -523
  265. package/gantt/index.umd.js +0 -1
  266. package/gantt/package.json +0 -7
  267. package/gantt/style.css +0 -1
  268. package/input-icon/index.d.ts +0 -7
  269. package/input-icon/index.es.js +0 -331
  270. package/input-icon/index.umd.js +0 -1
  271. package/input-icon/package.json +0 -7
  272. package/input-icon/style.css +0 -1
  273. package/list/index.d.ts +0 -7
  274. package/list/index.es.js +0 -39
  275. package/list/index.umd.js +0 -1
  276. package/list/package.json +0 -7
  277. package/list/style.css +0 -1
  278. package/nav-sprite/index.d.ts +0 -7
  279. package/nav-sprite/index.es.js +0 -68
  280. package/nav-sprite/index.umd.js +0 -1
  281. package/nav-sprite/package.json +0 -7
  282. package/nuxt/components/Accordion.js +0 -3
  283. package/nuxt/components/Anchor.js +0 -3
  284. package/nuxt/components/BackTop.js +0 -3
  285. package/nuxt/components/Breadcrumb.js +0 -3
  286. package/nuxt/components/Carousel.js +0 -3
  287. package/nuxt/components/CarouselItem.js +0 -3
  288. package/nuxt/components/Cascader.js +0 -3
  289. package/nuxt/components/ColorPicker.js +0 -3
  290. package/nuxt/components/Comment.js +0 -3
  291. package/nuxt/components/FormControl.js +0 -3
  292. package/nuxt/components/FormLabel.js +0 -3
  293. package/nuxt/components/Gantt.js +0 -3
  294. package/nuxt/components/InputIcon.js +0 -3
  295. package/nuxt/components/List.js +0 -3
  296. package/nuxt/components/ListItem.js +0 -3
  297. package/nuxt/components/NavSprite.js +0 -2
  298. package/nuxt/components/QuadrantDiagram.js +0 -3
  299. package/nuxt/components/ReadTip.js +0 -3
  300. package/nuxt/components/StepsGuide.js +0 -3
  301. package/nuxt/components/Sticky.js +0 -2
  302. package/nuxt/components/TagInput.js +0 -3
  303. package/nuxt/components/TimeAxis.js +0 -3
  304. package/nuxt/components/TimeAxisItem.js +0 -3
  305. package/nuxt/components/TimePicker.js +0 -3
  306. package/nuxt/components/Transfer.js +0 -3
  307. package/nuxt/components/TreeSelect.js +0 -3
  308. package/nuxt/components/overlayEmits.js +0 -3
  309. package/nuxt/components/overlayProps.js +0 -3
  310. package/quadrant-diagram/index.d.ts +0 -7
  311. package/quadrant-diagram/index.es.js +0 -5728
  312. package/quadrant-diagram/index.umd.js +0 -27
  313. package/quadrant-diagram/package.json +0 -7
  314. package/quadrant-diagram/style.css +0 -1
  315. package/read-tip/index.d.ts +0 -7
  316. package/read-tip/index.es.js +0 -258
  317. package/read-tip/index.umd.js +0 -1
  318. package/read-tip/package.json +0 -7
  319. package/read-tip/style.css +0 -1
  320. package/steps-guide/index.d.ts +0 -7
  321. package/steps-guide/index.es.js +0 -239
  322. package/steps-guide/index.umd.js +0 -1
  323. package/steps-guide/package.json +0 -7
  324. package/steps-guide/style.css +0 -1
  325. package/sticky/index.d.ts +0 -7
  326. package/sticky/index.es.js +0 -197
  327. package/sticky/index.umd.js +0 -1
  328. package/sticky/package.json +0 -7
  329. package/tag-input/index.d.ts +0 -7
  330. package/tag-input/index.es.js +0 -329
  331. package/tag-input/index.umd.js +0 -1
  332. package/tag-input/package.json +0 -7
  333. package/tag-input/style.css +0 -1
  334. package/time-axis/index.d.ts +0 -7
  335. package/time-axis/index.es.js +0 -299
  336. package/time-axis/index.umd.js +0 -1
  337. package/time-axis/package.json +0 -7
  338. package/time-axis/style.css +0 -1
  339. package/time-picker/index.d.ts +0 -7
  340. package/time-picker/index.es.js +0 -1237
  341. package/time-picker/index.umd.js +0 -1
  342. package/time-picker/package.json +0 -7
  343. package/time-picker/style.css +0 -1
  344. package/transfer/index.d.ts +0 -7
  345. package/transfer/index.es.js +0 -7608
  346. package/transfer/index.umd.js +0 -27
  347. package/transfer/package.json +0 -7
  348. package/transfer/style.css +0 -1
  349. package/tree-select/index.d.ts +0 -7
  350. package/tree-select/index.es.js +0 -623
  351. package/tree-select/index.umd.js +0 -1
  352. package/tree-select/package.json +0 -7
  353. package/tree-select/style.css +0 -1
@@ -19,9 +19,9 @@ const DEFAULT_PLUGIN_OPTIONS = {
19
19
  color: "currentColor",
20
20
  initialOpacity: 0.2,
21
21
  finalOpacity: 0.1,
22
- duration: 0.8,
22
+ duration: 400,
23
23
  easing: "ease-out",
24
- delayTime: 75,
24
+ delay: 75,
25
25
  disabled: false
26
26
  };
27
27
  const createContainer = ({
@@ -53,7 +53,7 @@ const createrippleElement = (x, y, size, options) => {
53
53
  rippleElement.style.borderRadius = "50%";
54
54
  rippleElement.style.opacity = `${options.initialOpacity}`;
55
55
  rippleElement.style.transform = `translate(-50%,-50%) scale(0)`;
56
- rippleElement.style.transition = `transform ${options.duration}s ${options.easing}, opacity ${options.duration}s ${options.easing}`;
56
+ rippleElement.style.transition = `transform ${options.duration / 1e3}s ${options.easing}, opacity ${options.duration / 1e3}s ${options.easing}`;
57
57
  return rippleElement;
58
58
  };
59
59
  function magnitude(x1, y1, x2, y2) {
@@ -73,6 +73,13 @@ const getRelativePointer = ({ x, y }, { top, left }) => ({
73
73
  y: y - top
74
74
  });
75
75
  const RIPPLE_COUNT = "vRippleCountInternal";
76
+ function setRippleCount(el, count) {
77
+ el.dataset[RIPPLE_COUNT] = count.toString();
78
+ }
79
+ function getRippleCount(el) {
80
+ var _a;
81
+ return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
82
+ }
76
83
  function incrementRippleCount(el) {
77
84
  const count = getRippleCount(el);
78
85
  setRippleCount(el, count + 1);
@@ -81,13 +88,6 @@ function decrementRippleCount(el) {
81
88
  const count = getRippleCount(el);
82
89
  setRippleCount(el, count - 1);
83
90
  }
84
- function setRippleCount(el, count) {
85
- el.dataset[RIPPLE_COUNT] = count.toString();
86
- }
87
- function getRippleCount(el) {
88
- var _a;
89
- return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
90
- }
91
91
  function deleteRippleCount(el) {
92
92
  delete el.dataset[RIPPLE_COUNT];
93
93
  }
@@ -99,27 +99,10 @@ const ripple = (event, el, options) => {
99
99
  const size = MULTIPLE_NUMBER * getDistanceToFurthestCorner(x, y, rect);
100
100
  const rippleContainer = createContainer(computedStyles);
101
101
  const rippleEl = createrippleElement(x, y, size, options);
102
- incrementRippleCount(el);
103
102
  let originalPositionValue = "";
104
- if (computedStyles.position === "static") {
105
- if (el.style.position)
106
- originalPositionValue = el.style.position;
107
- el.style.position = "relative";
108
- }
109
- rippleContainer.appendChild(rippleEl);
110
- el.appendChild(rippleContainer);
111
103
  let shouldDissolveripple = false;
112
- const releaseripple = (e) => {
113
- if (typeof e !== "undefined") {
114
- document.removeEventListener("pointerup", releaseripple);
115
- document.removeEventListener("pointercancel", releaseripple);
116
- }
117
- if (shouldDissolveripple)
118
- dissolveripple();
119
- else
120
- shouldDissolveripple = true;
121
- };
122
- const dissolveripple = () => {
104
+ let token = null;
105
+ function dissolveripple() {
123
106
  rippleEl.style.transition = "opacity 150ms linear";
124
107
  rippleEl.style.opacity = "0";
125
108
  setTimeout(() => {
@@ -130,24 +113,44 @@ const ripple = (event, el, options) => {
130
113
  el.style.position = originalPositionValue;
131
114
  }
132
115
  }, 150);
133
- };
116
+ }
117
+ function releaseripple(e) {
118
+ if (typeof e !== "undefined") {
119
+ document.removeEventListener("pointerup", releaseripple);
120
+ document.removeEventListener("pointercancel", releaseripple);
121
+ }
122
+ if (shouldDissolveripple) {
123
+ dissolveripple();
124
+ } else {
125
+ shouldDissolveripple = true;
126
+ }
127
+ }
128
+ function cancelripple() {
129
+ clearTimeout(token);
130
+ rippleContainer.remove();
131
+ document.removeEventListener("pointerup", releaseripple);
132
+ document.removeEventListener("pointercancel", releaseripple);
133
+ document.removeEventListener("pointercancel", cancelripple);
134
+ }
135
+ incrementRippleCount(el);
136
+ if (computedStyles.position === "static") {
137
+ if (el.style.position) {
138
+ originalPositionValue = el.style.position;
139
+ }
140
+ el.style.position = "relative";
141
+ }
142
+ rippleContainer.appendChild(rippleEl);
143
+ el.appendChild(rippleContainer);
134
144
  document.addEventListener("pointerup", releaseripple);
135
145
  document.addEventListener("pointercancel", releaseripple);
136
- const token = setTimeout(() => {
146
+ token = setTimeout(() => {
137
147
  document.removeEventListener("pointercancel", cancelripple);
138
148
  requestAnimationFrame(() => {
139
149
  rippleEl.style.transform = `translate(-50%,-50%) scale(1)`;
140
150
  rippleEl.style.opacity = `${options.finalOpacity}`;
141
- setTimeout(() => releaseripple(), options.duration * 1e3);
151
+ setTimeout(() => releaseripple(), options.duration);
142
152
  });
143
- }, options.delayTime);
144
- const cancelripple = () => {
145
- clearTimeout(token);
146
- rippleContainer.remove();
147
- document.removeEventListener("pointerup", releaseripple);
148
- document.removeEventListener("pointercancel", releaseripple);
149
- document.removeEventListener("pointercancel", cancelripple);
150
- };
153
+ }, options.delay);
151
154
  document.addEventListener("pointercancel", cancelripple);
152
155
  };
153
156
  const optionMap = /* @__PURE__ */ new WeakMap();
@@ -158,10 +161,12 @@ var RippleDirective = {
158
161
  optionMap.set(el, (_a = binding.value) != null ? _a : {});
159
162
  el.addEventListener("pointerdown", (event) => {
160
163
  const options = optionMap.get(el);
161
- if (binding.value && binding.value.disabled)
164
+ if (binding.value && binding.value.disabled) {
162
165
  return;
163
- if (options === false)
166
+ }
167
+ if (options === false) {
164
168
  return;
169
+ }
165
170
  ripple(event, el, __spreadValues(__spreadValues({}, globalOptions), options));
166
171
  });
167
172
  },
@@ -1 +1 @@
1
- var B=Object.defineProperty;var T=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var $=(s,r,a)=>r in s?B(s,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[r]=a,y=(s,r)=>{for(var a in r||(r={}))F.call(r,a)&&$(s,a,r[a]);if(T)for(var a of T(r))j.call(r,a)&&$(s,a,r[a]);return s};(function(s,r){typeof exports=="object"&&typeof module!="undefined"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(s=typeof globalThis!="undefined"?globalThis:s||self,r(s.index={}))})(this,function(s){"use strict";const r={directive:"ripple",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.8,easing:"ease-out",delayTime:75,disabled:!1},a=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:i,borderBottomRightRadius:o})=>{const n=document.createElement("div");return n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.borderRadius=`${t} ${e} ${o} ${i}`,n.style.overflow="hidden",n.style.pointerEvents="none",n.style.webkitMaskImage="-webkit-radial-gradient(white, black)",n},w=(t,e,i,o)=>{const n=document.createElement("div");return n.style.position="absolute",n.style.width=`${i}px`,n.style.height=`${i}px`,n.style.top=`${e}px`,n.style.left=`${t}px`,n.style.background=o.color,n.style.borderRadius="50%",n.style.opacity=`${o.initialOpacity}`,n.style.transform="translate(-50%,-50%) scale(0)",n.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,n};function u(t,e,i,o){const n=t-i,l=e-o;return Math.sqrt(n*n+l*l)}function M(t,e,{width:i,height:o}){const n=u(t,e,0,0),l=u(t,e,i,0),d=u(t,e,0,o),g=u(t,e,i,o);return Math.max(n,l,d,g)}const O=({x:t,y:e},{top:i,left:o})=>({x:t-o,y:e-i}),f="vRippleCountInternal";function P(t){const e=v(t);R(t,e+1)}function k(t){const e=v(t);R(t,e-1)}function R(t,e){t.dataset[f]=e.toString()}function v(t){var e;return parseInt((e=t.dataset[f])!=null?e:"0",10)}function I(t){delete t.dataset[f]}const x=2.05,S=(t,e,i)=>{const o=e.getBoundingClientRect(),n=window.getComputedStyle(e),{x:l,y:d}=O(t,o),g=x*M(l,d,o),m=a(n),p=w(l,d,g,i);P(e);let h="";n.position==="static"&&(e.style.position&&(h=e.style.position),e.style.position="relative"),m.appendChild(p),e.appendChild(m);let b=!1;const c=A=>{typeof A!="undefined"&&(document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",c)),b?U():b=!0},U=()=>{p.style.transition="opacity 150ms linear",p.style.opacity="0",setTimeout(()=>{m.remove(),k(e),v(e)===0&&(I(e),e.style.position=h)},150)};document.addEventListener("pointerup",c),document.addEventListener("pointercancel",c);const N=setTimeout(()=>{document.removeEventListener("pointercancel",C),requestAnimationFrame(()=>{p.style.transform="translate(-50%,-50%) scale(1)",p.style.opacity=`${i.finalOpacity}`,setTimeout(()=>c(),i.duration*1e3)})},i.delayTime),C=()=>{clearTimeout(N),m.remove(),document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",c),document.removeEventListener("pointercancel",C)};document.addEventListener("pointercancel",C)},E=new WeakMap,_=y({},r);var L={mounted(t,e){var i;E.set(t,(i=e.value)!=null?i:{}),t.addEventListener("pointerdown",o=>{const n=E.get(t);e.value&&e.value.disabled||n!==!1&&S(o,t,y(y({},_),n))})},updated(t,e){var i;E.set(t,(i=e.value)!=null?i:{})}},D={title:"Ripple \u6C34\u6CE2\u7EB9",category:"\u901A\u7528",status:"100%",install(t){t.directive("Ripple",L)}};s.RippleDirective=L,s.default=D,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
1
+ var B=Object.defineProperty;var T=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var w=(s,r,l)=>r in s?B(s,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[r]=l,f=(s,r)=>{for(var l in r||(r={}))F.call(r,l)&&w(s,l,r[l]);if(T)for(var l of T(r))j.call(r,l)&&w(s,l,r[l]);return s};(function(s,r){typeof exports=="object"&&typeof module!="undefined"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(s=typeof globalThis!="undefined"?globalThis:s||self,r(s.index={}))})(this,function(s){"use strict";const r={directive:"ripple",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:400,easing:"ease-out",delay:75,disabled:!1},l=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:i,borderBottomRightRadius:o})=>{const n=document.createElement("div");return n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.borderRadius=`${t} ${e} ${o} ${i}`,n.style.overflow="hidden",n.style.pointerEvents="none",n.style.webkitMaskImage="-webkit-radial-gradient(white, black)",n},M=(t,e,i,o)=>{const n=document.createElement("div");return n.style.position="absolute",n.style.width=`${i}px`,n.style.height=`${i}px`,n.style.top=`${e}px`,n.style.left=`${t}px`,n.style.background=o.color,n.style.borderRadius="50%",n.style.opacity=`${o.initialOpacity}`,n.style.transform="translate(-50%,-50%) scale(0)",n.style.transition=`transform ${o.duration/1e3}s ${o.easing}, opacity ${o.duration/1e3}s ${o.easing}`,n};function u(t,e,i,o){const n=t-i,a=e-o;return Math.sqrt(n*n+a*a)}function O(t,e,{width:i,height:o}){const n=u(t,e,0,0),a=u(t,e,i,0),d=u(t,e,0,o),g=u(t,e,i,o);return Math.max(n,a,d,g)}const P=({x:t,y:e},{top:i,left:o})=>({x:t-o,y:e-i}),y="vRippleCountInternal";function R(t,e){t.dataset[y]=e.toString()}function v(t){var e;return parseInt((e=t.dataset[y])!=null?e:"0",10)}function k(t){const e=v(t);R(t,e+1)}function I(t){const e=v(t);R(t,e-1)}function x(t){delete t.dataset[y]}const S=2.05,_=(t,e,i)=>{const o=e.getBoundingClientRect(),n=window.getComputedStyle(e),{x:a,y:d}=P(t,o),g=S*O(a,d,o),m=l(n),p=M(a,d,g,i);let h="",b=!1,$=null;function N(){p.style.transition="opacity 150ms linear",p.style.opacity="0",setTimeout(()=>{m.remove(),I(e),v(e)===0&&(x(e),e.style.position=h)},150)}function c(A){typeof A!="undefined"&&(document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",c)),b?N():b=!0}function C(){clearTimeout($),m.remove(),document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",c),document.removeEventListener("pointercancel",C)}k(e),n.position==="static"&&(e.style.position&&(h=e.style.position),e.style.position="relative"),m.appendChild(p),e.appendChild(m),document.addEventListener("pointerup",c),document.addEventListener("pointercancel",c),$=setTimeout(()=>{document.removeEventListener("pointercancel",C),requestAnimationFrame(()=>{p.style.transform="translate(-50%,-50%) scale(1)",p.style.opacity=`${i.finalOpacity}`,setTimeout(()=>c(),i.duration)})},i.delay),document.addEventListener("pointercancel",C)},E=new WeakMap,D=f({},r);var L={mounted(t,e){var i;E.set(t,(i=e.value)!=null?i:{}),t.addEventListener("pointerdown",o=>{const n=E.get(t);e.value&&e.value.disabled||n!==!1&&_(o,t,f(f({},D),n))})},updated(t,e){var i;E.set(t,(i=e.value)!=null?i:{})}},U={title:"Ripple \u6C34\u6CE2\u7EB9",category:"\u901A\u7528",status:"100%",install(t){t.directive("Ripple",L)}};s.RippleDirective=L,s.default=U,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});