ods-component-lib 1.22.2 → 1.22.3

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 (261) hide show
  1. package/dist/_virtual/index5.js +2 -3
  2. package/dist/_virtual/index5.js.map +1 -1
  3. package/dist/_virtual/index6.js +3 -2
  4. package/dist/_virtual/index6.js.map +1 -1
  5. package/dist/components/antd/currencyInput/CurrencySelect.js +15 -14
  6. package/dist/components/antd/currencyInput/CurrencySelect.js.map +1 -1
  7. package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js +6 -6
  8. package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
  9. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js +20 -20
  10. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js.map +1 -1
  11. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js.map +1 -1
  12. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js +101 -98
  13. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js.map +1 -1
  14. package/dist/node_modules/@ant-design/cssinjs/es/util/index.js +29 -27
  15. package/dist/node_modules/@ant-design/cssinjs/es/util/index.js.map +1 -1
  16. package/dist/node_modules/@rc-component/async-validator/es/index.js +20 -20
  17. package/dist/node_modules/@rc-component/async-validator/es/index.js.map +1 -1
  18. package/dist/node_modules/@rc-component/async-validator/es/messages.js +1 -0
  19. package/dist/node_modules/@rc-component/async-validator/es/messages.js.map +1 -1
  20. package/dist/node_modules/@rc-component/async-validator/es/rule/type.js +18 -8
  21. package/dist/node_modules/@rc-component/async-validator/es/rule/type.js.map +1 -1
  22. package/dist/node_modules/@rc-component/async-validator/es/util.js +1 -1
  23. package/dist/node_modules/@rc-component/async-validator/es/util.js.map +1 -1
  24. package/dist/node_modules/@rc-component/async-validator/es/validator/index.js +1 -0
  25. package/dist/node_modules/@rc-component/async-validator/es/validator/index.js.map +1 -1
  26. package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js +88 -68
  27. package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js.map +1 -1
  28. package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js +75 -96
  29. package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js.map +1 -1
  30. package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js +22 -20
  31. package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js.map +1 -1
  32. package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js +92 -100
  33. package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js.map +1 -1
  34. package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js +40 -29
  35. package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js.map +1 -1
  36. package/dist/node_modules/@rc-component/form/es/hooks/useForm.js +115 -100
  37. package/dist/node_modules/@rc-component/form/es/hooks/useForm.js.map +1 -1
  38. package/dist/node_modules/@rc-component/form/es/utils/NameMap.js +28 -22
  39. package/dist/node_modules/@rc-component/form/es/utils/NameMap.js.map +1 -1
  40. package/dist/node_modules/@rc-component/form/es/utils/messages.js +1 -0
  41. package/dist/node_modules/@rc-component/form/es/utils/messages.js.map +1 -1
  42. package/dist/node_modules/@rc-component/image/es/Preview/index.js +111 -105
  43. package/dist/node_modules/@rc-component/image/es/Preview/index.js.map +1 -1
  44. package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js +42 -22
  45. package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js.map +1 -1
  46. package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js +18 -54
  47. package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js.map +1 -1
  48. package/dist/node_modules/@rc-component/resize-observer/es/index.js.map +1 -1
  49. package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js +50 -0
  50. package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js.map +1 -0
  51. package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js +50 -50
  52. package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js.map +1 -1
  53. package/dist/node_modules/@rc-component/select/es/SelectInput/index.js +85 -80
  54. package/dist/node_modules/@rc-component/select/es/SelectInput/index.js.map +1 -1
  55. package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js +85 -80
  56. package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js.map +1 -1
  57. package/dist/node_modules/@rc-component/trigger/es/Popup/index.js +74 -72
  58. package/dist/node_modules/@rc-component/trigger/es/Popup/index.js.map +1 -1
  59. package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js +10 -9
  60. package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js.map +1 -1
  61. package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js +27 -27
  62. package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js.map +1 -1
  63. package/dist/node_modules/@rc-component/trigger/es/index.js +150 -140
  64. package/dist/node_modules/@rc-component/trigger/es/index.js.map +1 -1
  65. package/dist/node_modules/@rc-component/util/es/Dom/focus.js +65 -20
  66. package/dist/node_modules/@rc-component/util/es/Dom/focus.js.map +1 -1
  67. package/dist/node_modules/@rc-component/util/es/ref.js +1 -1
  68. package/dist/node_modules/antd/es/_util/wave/WaveEffect.js +53 -48
  69. package/dist/node_modules/antd/es/_util/wave/WaveEffect.js.map +1 -1
  70. package/dist/node_modules/antd/es/_util/wave/style.js +8 -7
  71. package/dist/node_modules/antd/es/_util/wave/style.js.map +1 -1
  72. package/dist/node_modules/antd/es/alert/Alert.js +133 -128
  73. package/dist/node_modules/antd/es/alert/Alert.js.map +1 -1
  74. package/dist/node_modules/antd/es/badge/Badge.js +29 -28
  75. package/dist/node_modules/antd/es/badge/Badge.js.map +1 -1
  76. package/dist/node_modules/antd/es/badge/style/index.js +1 -1
  77. package/dist/node_modules/antd/es/badge/style/index.js.map +1 -1
  78. package/dist/node_modules/antd/es/button/buttonHelpers.js +47 -41
  79. package/dist/node_modules/antd/es/button/buttonHelpers.js.map +1 -1
  80. package/dist/node_modules/antd/es/button/style/variant.js +132 -132
  81. package/dist/node_modules/antd/es/button/style/variant.js.map +1 -1
  82. package/dist/node_modules/antd/es/calendar/generateCalendar.js +55 -57
  83. package/dist/node_modules/antd/es/calendar/generateCalendar.js.map +1 -1
  84. package/dist/node_modules/antd/es/calendar/style/index.js +18 -18
  85. package/dist/node_modules/antd/es/calendar/style/index.js.map +1 -1
  86. package/dist/node_modules/antd/es/card/CardGrid.js.map +1 -1
  87. package/dist/node_modules/antd/es/card/style/index.js +15 -7
  88. package/dist/node_modules/antd/es/card/style/index.js.map +1 -1
  89. package/dist/node_modules/antd/es/checkbox/Group.js +32 -30
  90. package/dist/node_modules/antd/es/checkbox/Group.js.map +1 -1
  91. package/dist/node_modules/antd/es/collapse/Collapse.js +61 -61
  92. package/dist/node_modules/antd/es/collapse/Collapse.js.map +1 -1
  93. package/dist/node_modules/antd/es/config-provider/index.js +76 -71
  94. package/dist/node_modules/antd/es/config-provider/index.js.map +1 -1
  95. package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js +29 -31
  96. package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js.map +1 -1
  97. package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js +7 -9
  98. package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js.map +1 -1
  99. package/dist/node_modules/antd/es/date-picker/generatePicker/{SuffixIcon.js → useSuffixIcon.js} +4 -4
  100. package/dist/node_modules/antd/es/date-picker/generatePicker/useSuffixIcon.js.map +1 -0
  101. package/dist/node_modules/antd/es/date-picker/style/panel.js +4 -4
  102. package/dist/node_modules/antd/es/date-picker/style/panel.js.map +1 -1
  103. package/dist/node_modules/antd/es/drawer/useFocusable.js +14 -0
  104. package/dist/node_modules/antd/es/drawer/useFocusable.js.map +1 -0
  105. package/dist/node_modules/antd/es/form/style/index.js +24 -24
  106. package/dist/node_modules/antd/es/form/style/index.js.map +1 -1
  107. package/dist/node_modules/antd/es/grid/col.js +56 -54
  108. package/dist/node_modules/antd/es/grid/col.js.map +1 -1
  109. package/dist/node_modules/antd/es/grid/style/index.js +50 -50
  110. package/dist/node_modules/antd/es/grid/style/index.js.map +1 -1
  111. package/dist/node_modules/antd/es/input/style/index.js +1 -0
  112. package/dist/node_modules/antd/es/input/style/index.js.map +1 -1
  113. package/dist/node_modules/antd/es/input-number/index.js +91 -91
  114. package/dist/node_modules/antd/es/input-number/index.js.map +1 -1
  115. package/dist/node_modules/antd/es/input-number/style/index.js +80 -79
  116. package/dist/node_modules/antd/es/input-number/style/index.js.map +1 -1
  117. package/dist/node_modules/antd/es/layout/style/sider.js +9 -9
  118. package/dist/node_modules/antd/es/layout/style/sider.js.map +1 -1
  119. package/dist/node_modules/antd/es/menu/MenuItem.js +6 -6
  120. package/dist/node_modules/antd/es/menu/MenuItem.js.map +1 -1
  121. package/dist/node_modules/antd/es/menu/SubMenu.js +8 -8
  122. package/dist/node_modules/antd/es/menu/SubMenu.js.map +1 -1
  123. package/dist/node_modules/antd/es/menu/style/horizontal.js +1 -1
  124. package/dist/node_modules/antd/es/menu/style/horizontal.js.map +1 -1
  125. package/dist/node_modules/antd/es/menu/style/index.js +58 -58
  126. package/dist/node_modules/antd/es/menu/style/index.js.map +1 -1
  127. package/dist/node_modules/antd/es/menu/style/vertical.js +1 -1
  128. package/dist/node_modules/antd/es/menu/style/vertical.js.map +1 -1
  129. package/dist/node_modules/antd/es/modal/ConfirmDialog.js +117 -112
  130. package/dist/node_modules/antd/es/modal/ConfirmDialog.js.map +1 -1
  131. package/dist/node_modules/antd/es/modal/Modal.js +115 -109
  132. package/dist/node_modules/antd/es/modal/Modal.js.map +1 -1
  133. package/dist/node_modules/antd/es/modal/style/index.js +83 -80
  134. package/dist/node_modules/antd/es/modal/style/index.js.map +1 -1
  135. package/dist/node_modules/antd/es/pagination/Pagination.js +85 -81
  136. package/dist/node_modules/antd/es/pagination/Pagination.js.map +1 -1
  137. package/dist/node_modules/antd/es/pagination/style/bordered.js +2 -2
  138. package/dist/node_modules/antd/es/pagination/style/bordered.js.map +1 -1
  139. package/dist/node_modules/antd/es/pagination/style/index.js +98 -132
  140. package/dist/node_modules/antd/es/pagination/style/index.js.map +1 -1
  141. package/dist/node_modules/antd/es/popover/index.js +77 -82
  142. package/dist/node_modules/antd/es/popover/index.js.map +1 -1
  143. package/dist/node_modules/antd/es/popover/style/index.js +65 -63
  144. package/dist/node_modules/antd/es/popover/style/index.js.map +1 -1
  145. package/dist/node_modules/antd/es/radio/context.js +3 -3
  146. package/dist/node_modules/antd/es/radio/context.js.map +1 -1
  147. package/dist/node_modules/antd/es/radio/group.js +31 -29
  148. package/dist/node_modules/antd/es/radio/group.js.map +1 -1
  149. package/dist/node_modules/antd/es/radio/style/index.js +1 -1
  150. package/dist/node_modules/antd/es/radio/style/index.js.map +1 -1
  151. package/dist/node_modules/antd/es/select/style/dropdown.js +1 -1
  152. package/dist/node_modules/antd/es/select/style/dropdown.js.map +1 -1
  153. package/dist/node_modules/antd/es/select/style/select-input-multiple.js +71 -69
  154. package/dist/node_modules/antd/es/select/style/select-input-multiple.js.map +1 -1
  155. package/dist/node_modules/antd/es/select/style/select-input.js +104 -98
  156. package/dist/node_modules/antd/es/select/style/select-input.js.map +1 -1
  157. package/dist/node_modules/antd/es/space/Item.js +2 -2
  158. package/dist/node_modules/antd/es/space/Item.js.map +1 -1
  159. package/dist/node_modules/antd/es/space/index.js +4 -4
  160. package/dist/node_modules/antd/es/space/index.js.map +1 -1
  161. package/dist/node_modules/antd/es/space/style/addon.js +47 -46
  162. package/dist/node_modules/antd/es/space/style/addon.js.map +1 -1
  163. package/dist/node_modules/antd/es/steps/PanelArrow.js +2 -2
  164. package/dist/node_modules/antd/es/steps/PanelArrow.js.map +1 -1
  165. package/dist/node_modules/antd/es/steps/ProgressIcon.js +12 -10
  166. package/dist/node_modules/antd/es/steps/ProgressIcon.js.map +1 -1
  167. package/dist/node_modules/antd/es/steps/index.js +108 -106
  168. package/dist/node_modules/antd/es/steps/index.js.map +1 -1
  169. package/dist/node_modules/antd/es/steps/style/horizontal.js +13 -11
  170. package/dist/node_modules/antd/es/steps/style/horizontal.js.map +1 -1
  171. package/dist/node_modules/antd/es/steps/style/icon.js +23 -18
  172. package/dist/node_modules/antd/es/steps/style/icon.js.map +1 -1
  173. package/dist/node_modules/antd/es/steps/style/index.js +41 -41
  174. package/dist/node_modules/antd/es/steps/style/index.js.map +1 -1
  175. package/dist/node_modules/antd/es/steps/style/inline.js +28 -23
  176. package/dist/node_modules/antd/es/steps/style/inline.js.map +1 -1
  177. package/dist/node_modules/antd/es/steps/style/label-placement.js +44 -39
  178. package/dist/node_modules/antd/es/steps/style/label-placement.js.map +1 -1
  179. package/dist/node_modules/antd/es/steps/style/nav.js +29 -27
  180. package/dist/node_modules/antd/es/steps/style/nav.js.map +1 -1
  181. package/dist/node_modules/antd/es/steps/style/panel.js +61 -56
  182. package/dist/node_modules/antd/es/steps/style/panel.js.map +1 -1
  183. package/dist/node_modules/antd/es/steps/style/progress-dot.js +28 -26
  184. package/dist/node_modules/antd/es/steps/style/progress-dot.js.map +1 -1
  185. package/dist/node_modules/antd/es/steps/style/progress.js +24 -57
  186. package/dist/node_modules/antd/es/steps/style/progress.js.map +1 -1
  187. package/dist/node_modules/antd/es/steps/style/rtl.js +10 -8
  188. package/dist/node_modules/antd/es/steps/style/rtl.js.map +1 -1
  189. package/dist/node_modules/antd/es/steps/style/small.js +21 -16
  190. package/dist/node_modules/antd/es/steps/style/small.js.map +1 -1
  191. package/dist/node_modules/antd/es/steps/style/status.js +187 -176
  192. package/dist/node_modules/antd/es/steps/style/status.js.map +1 -1
  193. package/dist/node_modules/antd/es/steps/style/util.js +18 -16
  194. package/dist/node_modules/antd/es/steps/style/util.js.map +1 -1
  195. package/dist/node_modules/antd/es/steps/style/vertical.js +21 -16
  196. package/dist/node_modules/antd/es/steps/style/vertical.js.map +1 -1
  197. package/dist/node_modules/antd/es/style/placementArrow.js +31 -29
  198. package/dist/node_modules/antd/es/style/placementArrow.js.map +1 -1
  199. package/dist/node_modules/antd/es/table/InternalTable.js +65 -62
  200. package/dist/node_modules/antd/es/table/InternalTable.js.map +1 -1
  201. package/dist/node_modules/antd/es/table/TableMeasureRowContext.js +6 -0
  202. package/dist/node_modules/antd/es/table/TableMeasureRowContext.js.map +1 -0
  203. package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js +145 -137
  204. package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js.map +1 -1
  205. package/dist/node_modules/antd/es/table/style/index.js +3 -3
  206. package/dist/node_modules/antd/es/table/style/index.js.map +1 -1
  207. package/dist/node_modules/antd/es/table/style/radius.js +10 -0
  208. package/dist/node_modules/antd/es/table/style/radius.js.map +1 -1
  209. package/dist/node_modules/antd/es/table/style/virtual.js +5 -5
  210. package/dist/node_modules/antd/es/table/style/virtual.js.map +1 -1
  211. package/dist/node_modules/antd/es/theme/util/genStyleUtils.js +29 -32
  212. package/dist/node_modules/antd/es/theme/util/genStyleUtils.js.map +1 -1
  213. package/dist/node_modules/antd/es/timeline/Timeline.js +76 -74
  214. package/dist/node_modules/antd/es/timeline/Timeline.js.map +1 -1
  215. package/dist/node_modules/antd/es/timeline/style/horizontal.js +21 -18
  216. package/dist/node_modules/antd/es/timeline/style/horizontal.js.map +1 -1
  217. package/dist/node_modules/antd/es/timeline/style/index.js +85 -70
  218. package/dist/node_modules/antd/es/timeline/style/index.js.map +1 -1
  219. package/dist/node_modules/antd/es/timeline/useItems.js +38 -37
  220. package/dist/node_modules/antd/es/timeline/useItems.js.map +1 -1
  221. package/dist/node_modules/antd/es/tooltip/PurePanel.js +27 -27
  222. package/dist/node_modules/antd/es/tooltip/PurePanel.js.map +1 -1
  223. package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js +17 -22
  224. package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js.map +1 -1
  225. package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js +27 -26
  226. package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js.map +1 -1
  227. package/dist/node_modules/antd/es/tooltip/index.js +50 -50
  228. package/dist/node_modules/antd/es/tooltip/index.js.map +1 -1
  229. package/dist/node_modules/antd/es/tooltip/style/index.js +55 -52
  230. package/dist/node_modules/antd/es/tooltip/style/index.js.map +1 -1
  231. package/dist/node_modules/antd/es/tooltip/util.js +13 -12
  232. package/dist/node_modules/antd/es/tooltip/util.js.map +1 -1
  233. package/dist/node_modules/antd/es/tree/DirectoryTree.js +42 -41
  234. package/dist/node_modules/antd/es/tree/DirectoryTree.js.map +1 -1
  235. package/dist/node_modules/antd/es/version/version.js +1 -1
  236. package/dist/node_modules/antd/es/version/version.js.map +1 -1
  237. package/dist/node_modules/canvg/lib/index.es.js +84 -84
  238. package/dist/node_modules/canvg/lib/index.es.js.map +1 -1
  239. package/dist/node_modules/compute-scroll-into-view/dist/index.js +17 -17
  240. package/dist/node_modules/compute-scroll-into-view/dist/index.js.map +1 -1
  241. package/dist/node_modules/dompurify/dist/purify.es.js +217 -223
  242. package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
  243. package/dist/node_modules/fflate/esm/browser.js +295 -335
  244. package/dist/node_modules/fflate/esm/browser.js.map +1 -1
  245. package/dist/node_modules/jspdf/dist/jspdf.es.min.js +1771 -1781
  246. package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
  247. package/dist/node_modules/raf/index.js +1 -1
  248. package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  249. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  250. package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
  251. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  252. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
  253. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  254. package/dist/node_modules/uuid/dist/esm-browser/v4.js +6 -9
  255. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  256. package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  257. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  258. package/package.json +1 -1
  259. package/dist/node_modules/antd/es/date-picker/generatePicker/SuffixIcon.js.map +0 -1
  260. package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
  261. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
@@ -1,30 +1,31 @@
1
- import c from "./isVisible.js";
2
- function u(t, n = !1) {
3
- if (c(t)) {
4
- const e = t.nodeName.toLowerCase(), s = (
1
+ import { useEffect as m } from "react";
2
+ import E from "./isVisible.js";
3
+ function f(t, e = !1) {
4
+ if (E(t)) {
5
+ const n = t.nodeName.toLowerCase(), s = (
5
6
  // Focusable element
6
- ["input", "select", "textarea", "button"].includes(e) || // Editable element
7
+ ["input", "select", "textarea", "button"].includes(n) || // Editable element
7
8
  t.isContentEditable || // Anchor with href element
8
- e === "a" && !!t.getAttribute("href")
9
- ), a = t.getAttribute("tabindex"), i = Number(a);
10
- let r = null;
11
- return a && !Number.isNaN(i) ? r = i : s && r === null && (r = 0), s && t.disabled && (r = null), r !== null && (r >= 0 || n && r < 0);
9
+ n === "a" && !!t.getAttribute("href")
10
+ ), u = t.getAttribute("tabindex"), r = Number(u);
11
+ let o = null;
12
+ return u && !Number.isNaN(r) ? o = r : s && o === null && (o = 0), s && t.disabled && (o = null), o !== null && (o >= 0 || e && o < 0);
12
13
  }
13
14
  return !1;
14
15
  }
15
- function f(t, n = !1) {
16
- const e = [...t.querySelectorAll("*")].filter((s) => u(s, n));
17
- return u(t, n) && e.unshift(t), e;
16
+ function d(t, e = !1) {
17
+ const n = [...t.querySelectorAll("*")].filter((s) => f(s, e));
18
+ return f(t, e) && n.unshift(t), n;
18
19
  }
19
- function o(t, n) {
20
+ function v(t, e) {
20
21
  if (!t) return;
21
- t.focus(n);
22
+ t.focus(e);
22
23
  const {
23
- cursor: e
24
- } = n || {};
25
- if (e && (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement)) {
24
+ cursor: n
25
+ } = e || {};
26
+ if (n && (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement)) {
26
27
  const s = t.value.length;
27
- switch (e) {
28
+ switch (n) {
28
29
  case "start":
29
30
  t.setSelectionRange(0, 0);
30
31
  break;
@@ -36,8 +37,52 @@ function o(t, n) {
36
37
  }
37
38
  }
38
39
  }
40
+ let c = null, i = [];
41
+ function b() {
42
+ return i[i.length - 1];
43
+ }
44
+ function w(t) {
45
+ const {
46
+ activeElement: e
47
+ } = document;
48
+ return t === e || t.contains(e);
49
+ }
50
+ function l() {
51
+ const t = b(), {
52
+ activeElement: e
53
+ } = document;
54
+ if (t && !w(t)) {
55
+ const n = d(t);
56
+ (n.includes(c) ? c : n[0])?.focus();
57
+ } else
58
+ c = e;
59
+ }
60
+ function a(t) {
61
+ if (t.key === "Tab") {
62
+ const {
63
+ activeElement: e
64
+ } = document, n = b(), s = d(n), u = s[s.length - 1];
65
+ t.shiftKey && e === s[0] ? c = u : !t.shiftKey && e === u && (c = s[0]);
66
+ }
67
+ }
68
+ function g(t) {
69
+ return t && (i = i.filter((e) => e !== t), i.push(t), window.addEventListener("focusin", l), window.addEventListener("keydown", a, !0), l()), () => {
70
+ c = null, i = i.filter((e) => e !== t), i.length === 0 && (window.removeEventListener("focusin", l), window.removeEventListener("keydown", a, !0));
71
+ };
72
+ }
73
+ function y(t, e) {
74
+ m(() => {
75
+ if (t) {
76
+ const n = e();
77
+ if (n)
78
+ return g(n);
79
+ }
80
+ }, [t]);
81
+ }
39
82
  export {
40
- f as getFocusNodeList,
41
- o as triggerFocus
83
+ d as getFocusNodeList,
84
+ g as lockFocus,
85
+ v as triggerFocus,
86
+ y as useLockFocus
42
87
  };
43
88
  //# sourceMappingURL=focus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focus.js","sources":["../../../../../../node_modules/@rc-component/util/es/Dom/focus.js"],"sourcesContent":["import { useEffect } from 'react';\nimport isVisible from \"./isVisible\";\nfunction focusable(node, includePositive = false) {\n if (isVisible(node)) {\n const nodeName = node.nodeName.toLowerCase();\n const isFocusableElement =\n // Focusable element\n ['input', 'select', 'textarea', 'button'].includes(nodeName) ||\n // Editable element\n node.isContentEditable ||\n // Anchor with href element\n nodeName === 'a' && !!node.getAttribute('href');\n\n // Get tabIndex\n const tabIndexAttr = node.getAttribute('tabindex');\n const tabIndexNum = Number(tabIndexAttr);\n\n // Parse as number if validate\n let tabIndex = null;\n if (tabIndexAttr && !Number.isNaN(tabIndexNum)) {\n tabIndex = tabIndexNum;\n } else if (isFocusableElement && tabIndex === null) {\n tabIndex = 0;\n }\n\n // Block focusable if disabled\n if (isFocusableElement && node.disabled) {\n tabIndex = null;\n }\n return tabIndex !== null && (tabIndex >= 0 || includePositive && tabIndex < 0);\n }\n return false;\n}\nexport function getFocusNodeList(node, includePositive = false) {\n const res = [...node.querySelectorAll('*')].filter(child => {\n return focusable(child, includePositive);\n });\n if (focusable(node, includePositive)) {\n res.unshift(node);\n }\n return res;\n}\n// Used for `rc-input` `rc-textarea` `rc-input-number`\n/**\n * Focus element and set cursor position for input/textarea elements.\n */\nexport function triggerFocus(element, option) {\n if (!element) return;\n element.focus(option);\n\n // Selection content\n const {\n cursor\n } = option || {};\n if (cursor && (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement)) {\n const len = element.value.length;\n switch (cursor) {\n case 'start':\n element.setSelectionRange(0, 0);\n break;\n case 'end':\n element.setSelectionRange(len, len);\n break;\n default:\n element.setSelectionRange(0, len);\n }\n }\n}\n\n// ======================================================\n// == Lock Focus ==\n// ======================================================\nlet lastFocusElement = null;\nlet focusElements = [];\nfunction getLastElement() {\n return focusElements[focusElements.length - 1];\n}\nfunction hasFocus(element) {\n const {\n activeElement\n } = document;\n return element === activeElement || element.contains(activeElement);\n}\nfunction syncFocus() {\n const lastElement = getLastElement();\n const {\n activeElement\n } = document;\n if (lastElement && !hasFocus(lastElement)) {\n const focusableList = getFocusNodeList(lastElement);\n const matchElement = focusableList.includes(lastFocusElement) ? lastFocusElement : focusableList[0];\n matchElement?.focus();\n } else {\n lastFocusElement = activeElement;\n }\n}\nfunction onWindowKeyDown(e) {\n if (e.key === 'Tab') {\n const {\n activeElement\n } = document;\n const lastElement = getLastElement();\n const focusableList = getFocusNodeList(lastElement);\n const last = focusableList[focusableList.length - 1];\n if (e.shiftKey && activeElement === focusableList[0]) {\n // Tab backward on first focusable element\n lastFocusElement = last;\n } else if (!e.shiftKey && activeElement === last) {\n // Tab forward on last focusable element\n lastFocusElement = focusableList[0];\n }\n }\n}\n\n/**\n * Lock focus in the element.\n * It will force back to the first focusable element when focus leaves the element.\n */\nexport function lockFocus(element) {\n if (element) {\n // Refresh focus elements\n focusElements = focusElements.filter(ele => ele !== element);\n focusElements.push(element);\n\n // Just add event since it will de-duplicate\n window.addEventListener('focusin', syncFocus);\n window.addEventListener('keydown', onWindowKeyDown, true);\n syncFocus();\n }\n\n // Always return unregister function\n return () => {\n lastFocusElement = null;\n focusElements = focusElements.filter(ele => ele !== element);\n if (focusElements.length === 0) {\n window.removeEventListener('focusin', syncFocus);\n window.removeEventListener('keydown', onWindowKeyDown, true);\n }\n };\n}\n\n/**\n * Lock focus within an element.\n * When locked, focus will be restricted to focusable elements within the specified element.\n * If multiple elements are locked, only the last locked element will be effective.\n */\nexport function useLockFocus(lock, getElement) {\n useEffect(() => {\n if (lock) {\n const element = getElement();\n if (element) {\n return lockFocus(element);\n }\n }\n }, [lock]);\n}"],"names":["focusable","node","includePositive","isVisible","nodeName","isFocusableElement","tabIndexAttr","tabIndexNum","tabIndex","getFocusNodeList","res","child","triggerFocus","element","option","cursor","len"],"mappings":";AAEA,SAASA,EAAUC,GAAMC,IAAkB,IAAO;AAChD,MAAIC,EAAUF,CAAI,GAAG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../../../node_modules/@rc-component/util/es/Dom/focus.js"],"sourcesContent":["import { useEffect } from 'react';\nimport isVisible from \"./isVisible\";\nfunction focusable(node, includePositive = false) {\n if (isVisible(node)) {\n const nodeName = node.nodeName.toLowerCase();\n const isFocusableElement =\n // Focusable element\n ['input', 'select', 'textarea', 'button'].includes(nodeName) ||\n // Editable element\n node.isContentEditable ||\n // Anchor with href element\n nodeName === 'a' && !!node.getAttribute('href');\n\n // Get tabIndex\n const tabIndexAttr = node.getAttribute('tabindex');\n const tabIndexNum = Number(tabIndexAttr);\n\n // Parse as number if validate\n let tabIndex = null;\n if (tabIndexAttr && !Number.isNaN(tabIndexNum)) {\n tabIndex = tabIndexNum;\n } else if (isFocusableElement && tabIndex === null) {\n tabIndex = 0;\n }\n\n // Block focusable if disabled\n if (isFocusableElement && node.disabled) {\n tabIndex = null;\n }\n return tabIndex !== null && (tabIndex >= 0 || includePositive && tabIndex < 0);\n }\n return false;\n}\nexport function getFocusNodeList(node, includePositive = false) {\n const res = [...node.querySelectorAll('*')].filter(child => {\n return focusable(child, includePositive);\n });\n if (focusable(node, includePositive)) {\n res.unshift(node);\n }\n return res;\n}\n// Used for `rc-input` `rc-textarea` `rc-input-number`\n/**\n * Focus element and set cursor position for input/textarea elements.\n */\nexport function triggerFocus(element, option) {\n if (!element) return;\n element.focus(option);\n\n // Selection content\n const {\n cursor\n } = option || {};\n if (cursor && (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement)) {\n const len = element.value.length;\n switch (cursor) {\n case 'start':\n element.setSelectionRange(0, 0);\n break;\n case 'end':\n element.setSelectionRange(len, len);\n break;\n default:\n element.setSelectionRange(0, len);\n }\n }\n}\n\n// ======================================================\n// == Lock Focus ==\n// ======================================================\nlet lastFocusElement = null;\nlet focusElements = [];\nfunction getLastElement() {\n return focusElements[focusElements.length - 1];\n}\nfunction hasFocus(element) {\n const {\n activeElement\n } = document;\n return element === activeElement || element.contains(activeElement);\n}\nfunction syncFocus() {\n const lastElement = getLastElement();\n const {\n activeElement\n } = document;\n if (lastElement && !hasFocus(lastElement)) {\n const focusableList = getFocusNodeList(lastElement);\n const matchElement = focusableList.includes(lastFocusElement) ? lastFocusElement : focusableList[0];\n matchElement?.focus();\n } else {\n lastFocusElement = activeElement;\n }\n}\nfunction onWindowKeyDown(e) {\n if (e.key === 'Tab') {\n const {\n activeElement\n } = document;\n const lastElement = getLastElement();\n const focusableList = getFocusNodeList(lastElement);\n const last = focusableList[focusableList.length - 1];\n if (e.shiftKey && activeElement === focusableList[0]) {\n // Tab backward on first focusable element\n lastFocusElement = last;\n } else if (!e.shiftKey && activeElement === last) {\n // Tab forward on last focusable element\n lastFocusElement = focusableList[0];\n }\n }\n}\n\n/**\n * Lock focus in the element.\n * It will force back to the first focusable element when focus leaves the element.\n */\nexport function lockFocus(element) {\n if (element) {\n // Refresh focus elements\n focusElements = focusElements.filter(ele => ele !== element);\n focusElements.push(element);\n\n // Just add event since it will de-duplicate\n window.addEventListener('focusin', syncFocus);\n window.addEventListener('keydown', onWindowKeyDown, true);\n syncFocus();\n }\n\n // Always return unregister function\n return () => {\n lastFocusElement = null;\n focusElements = focusElements.filter(ele => ele !== element);\n if (focusElements.length === 0) {\n window.removeEventListener('focusin', syncFocus);\n window.removeEventListener('keydown', onWindowKeyDown, true);\n }\n };\n}\n\n/**\n * Lock focus within an element.\n * When locked, focus will be restricted to focusable elements within the specified element.\n * If multiple elements are locked, only the last locked element will be effective.\n */\nexport function useLockFocus(lock, getElement) {\n useEffect(() => {\n if (lock) {\n const element = getElement();\n if (element) {\n return lockFocus(element);\n }\n }\n }, [lock]);\n}"],"names":["focusable","node","includePositive","isVisible","nodeName","isFocusableElement","tabIndexAttr","tabIndexNum","tabIndex","getFocusNodeList","res","child","triggerFocus","element","option","cursor","len","lastFocusElement","focusElements","getLastElement","hasFocus","activeElement","syncFocus","lastElement","focusableList","onWindowKeyDown","e","last","lockFocus","ele","useLockFocus","lock","getElement","useEffect"],"mappings":";;AAEA,SAASA,EAAU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,oBAAoB,WAAWG,GAAiB,EAAI;AAAA,EAE/D;AACF;AAOO,SAASK,EAAaC,GAAMC,GAAY;AAC7C,EAAAC,EAAU,MAAM;AACd,QAAIF,GAAM;AACR,YAAMlB,IAAUmB,EAAU;AAC1B,UAAInB;AACF,eAAOe,EAAUf,CAAO;AAAA,IAE5B;AAAA,EACF,GAAG,CAACkB,CAAI,CAAC;AACX;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
1
  import { isValidElement as u, version as p } from "react";
2
- import { r as s } from "../../../../_virtual/index5.js";
2
+ import { r as s } from "../../../../_virtual/index6.js";
3
3
  import c from "./hooks/useMemo.js";
4
4
  import l from "./React/isFragment.js";
5
5
  const n = Number(p.split(".")[0]), a = (t, r) => {
@@ -1,66 +1,71 @@
1
- import * as t from "react";
2
- import O from "../../../../@rc-component/motion/es/CSSMotion.js";
3
- import d from "../../../../@rc-component/util/es/raf.js";
4
- import { render as q, unmount as H } from "../../../../@rc-component/util/es/React/render.js";
5
- import { composeRef as _ } from "../../../../@rc-component/util/es/ref.js";
6
- import { clsx as j } from "../../../../clsx/dist/clsx.js";
7
- import { TARGET_CLS as D } from "./interface.js";
8
- import { getTargetWaveColor as G } from "./util.js";
1
+ import * as e from "react";
2
+ import H from "../../../../@rc-component/motion/es/CSSMotion.js";
3
+ import p from "../../../../@rc-component/util/es/raf.js";
4
+ import { render as _, unmount as j } from "../../../../@rc-component/util/es/React/render.js";
5
+ import { composeRef as D } from "../../../../@rc-component/util/es/ref.js";
6
+ import { clsx as G } from "../../../../clsx/dist/clsx.js";
7
+ import "../../config-provider/index.js";
8
+ import { genCssVar as M } from "../../theme/util/genStyleUtils.js";
9
+ import { TARGET_CLS as V } from "./interface.js";
10
+ import { getTargetWaveColor as $ } from "./util.js";
11
+ import { ConfigContext as I } from "../../config-provider/context.js";
9
12
  function c(s) {
10
13
  return Number.isNaN(s) ? 0 : s;
11
14
  }
12
- const M = (s) => {
15
+ const J = (s) => {
13
16
  const {
14
17
  className: i,
15
- target: e,
18
+ target: t,
16
19
  component: n,
17
- colorSource: p
18
- } = s, l = t.useRef(null), [f, b] = t.useState(null), [h, R] = t.useState([]), [S, v] = t.useState(0), [y, N] = t.useState(0), [E, C] = t.useState(0), [w, T] = t.useState(0), [W, g] = t.useState(!1), m = {
19
- left: S,
20
- top: y,
21
- width: E,
22
- height: w,
23
- borderRadius: h.map((r) => `${r}px`).join(" ")
20
+ colorSource: d
21
+ } = s, m = e.useRef(null), {
22
+ getPrefixCls: b
23
+ } = e.useContext(I), h = b(), [R] = M(h, "wave"), [f, v] = e.useState(null), [S, C] = e.useState([]), [N, y] = e.useState(0), [x, E] = e.useState(0), [g, w] = e.useState(0), [T, W] = e.useState(0), [L, k] = e.useState(!1), l = {
24
+ left: N,
25
+ top: x,
26
+ width: g,
27
+ height: T,
28
+ borderRadius: S.map((r) => `${r}px`).join(" ")
24
29
  };
25
- f && (m["--wave-color"] = f);
30
+ f && (l[R("color")] = f);
26
31
  function u() {
27
- const r = getComputedStyle(e);
28
- b(G(e, p));
32
+ const r = getComputedStyle(t);
33
+ v($(t, d));
29
34
  const o = r.position === "static", {
30
35
  borderLeftWidth: a,
31
- borderTopWidth: L
36
+ borderTopWidth: z
32
37
  } = r;
33
- v(o ? e.offsetLeft : c(-Number.parseFloat(a))), N(o ? e.offsetTop : c(-Number.parseFloat(L))), C(e.offsetWidth), T(e.offsetHeight);
38
+ y(o ? t.offsetLeft : c(-Number.parseFloat(a))), E(o ? t.offsetTop : c(-Number.parseFloat(z))), w(t.offsetWidth), W(t.offsetHeight);
34
39
  const {
35
- borderTopLeftRadius: k,
36
- borderTopRightRadius: B,
37
- borderBottomLeftRadius: z,
38
- borderBottomRightRadius: A
40
+ borderTopLeftRadius: A,
41
+ borderTopRightRadius: F,
42
+ borderBottomLeftRadius: O,
43
+ borderBottomRightRadius: P
39
44
  } = r;
40
- R([k, B, A, z].map((F) => c(Number.parseFloat(F))));
45
+ C([A, F, P, O].map((q) => c(Number.parseFloat(q))));
41
46
  }
42
- if (t.useEffect(() => {
43
- if (e) {
44
- const r = d(() => {
45
- u(), g(!0);
47
+ if (e.useEffect(() => {
48
+ if (t) {
49
+ const r = p(() => {
50
+ u(), k(!0);
46
51
  });
47
52
  let o;
48
- return typeof ResizeObserver < "u" && (o = new ResizeObserver(u), o.observe(e)), () => {
49
- d.cancel(r), o?.disconnect();
53
+ return typeof ResizeObserver < "u" && (o = new ResizeObserver(u), o.observe(t)), () => {
54
+ p.cancel(r), o?.disconnect();
50
55
  };
51
56
  }
52
- }, [e]), !W)
57
+ }, [t]), !L)
53
58
  return null;
54
- const x = (n === "Checkbox" || n === "Radio") && e?.classList.contains(D);
55
- return /* @__PURE__ */ t.createElement(O, {
59
+ const B = (n === "Checkbox" || n === "Radio") && t?.classList.contains(V);
60
+ return /* @__PURE__ */ e.createElement(H, {
56
61
  visible: !0,
57
62
  motionAppear: !0,
58
63
  motionName: "wave-motion",
59
64
  motionDeadline: 5e3,
60
65
  onAppearEnd: (r, o) => {
61
66
  if (o.deadline || o.propertyName === "opacity") {
62
- const a = l.current?.parentElement;
63
- H(a).then(() => {
67
+ const a = m.current?.parentElement;
68
+ j(a).then(() => {
64
69
  a?.remove();
65
70
  });
66
71
  }
@@ -68,26 +73,26 @@ const M = (s) => {
68
73
  }
69
74
  }, ({
70
75
  className: r
71
- }, o) => /* @__PURE__ */ t.createElement("div", {
72
- ref: _(l, o),
73
- className: j(i, r, {
74
- "wave-quick": x
76
+ }, o) => /* @__PURE__ */ e.createElement("div", {
77
+ ref: D(m, o),
78
+ className: G(i, r, {
79
+ "wave-quick": B
75
80
  }),
76
- style: m
81
+ style: l
77
82
  }));
78
- }, V = (s, i) => {
83
+ }, se = (s, i) => {
79
84
  const {
80
- component: e
85
+ component: t
81
86
  } = i;
82
- if (e === "Checkbox" && !s.querySelector("input")?.checked)
87
+ if (t === "Checkbox" && !s.querySelector("input")?.checked)
83
88
  return;
84
89
  const n = document.createElement("div");
85
- n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", s?.insertBefore(n, s?.firstChild), q(/* @__PURE__ */ t.createElement(M, {
90
+ n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", s?.insertBefore(n, s?.firstChild), _(/* @__PURE__ */ e.createElement(J, {
86
91
  ...i,
87
92
  target: s
88
93
  }), n);
89
94
  };
90
95
  export {
91
- V as default
96
+ se as default
92
97
  };
93
98
  //# sourceMappingURL=WaveEffect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WaveEffect.js","sources":["../../../../../../node_modules/antd/es/_util/wave/WaveEffect.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport CSSMotion from '@rc-component/motion';\nimport raf from \"@rc-component/util/es/raf\";\nimport { render, unmount } from \"@rc-component/util/es/React/render\";\nimport { composeRef } from \"@rc-component/util/es/ref\";\nimport { clsx } from 'clsx';\nimport { TARGET_CLS } from './interface';\nimport { getTargetWaveColor } from './util';\nfunction validateNum(value) {\n return Number.isNaN(value) ? 0 : value;\n}\nconst WaveEffect = props => {\n const {\n className,\n target,\n component,\n colorSource\n } = props;\n const divRef = React.useRef(null);\n // ===================== Effect =====================\n const [color, setWaveColor] = React.useState(null);\n const [borderRadius, setBorderRadius] = React.useState([]);\n const [left, setLeft] = React.useState(0);\n const [top, setTop] = React.useState(0);\n const [width, setWidth] = React.useState(0);\n const [height, setHeight] = React.useState(0);\n const [enabled, setEnabled] = React.useState(false);\n const waveStyle = {\n left,\n top,\n width,\n height,\n borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')\n };\n if (color) {\n waveStyle['--wave-color'] = color;\n }\n function syncPos() {\n const nodeStyle = getComputedStyle(target);\n // Get wave color from target\n setWaveColor(getTargetWaveColor(target, colorSource));\n const isStatic = nodeStyle.position === 'static';\n // Rect\n const {\n borderLeftWidth,\n borderTopWidth\n } = nodeStyle;\n setLeft(isStatic ? target.offsetLeft : validateNum(-Number.parseFloat(borderLeftWidth)));\n setTop(isStatic ? target.offsetTop : validateNum(-Number.parseFloat(borderTopWidth)));\n setWidth(target.offsetWidth);\n setHeight(target.offsetHeight);\n // Get border radius\n const {\n borderTopLeftRadius,\n borderTopRightRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius\n } = nodeStyle;\n setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(Number.parseFloat(radius))));\n }\n React.useEffect(() => {\n if (target) {\n // We need delay to check position here\n // since UI may change after click\n const id = raf(() => {\n syncPos();\n setEnabled(true);\n });\n // Add resize observer to follow size\n let resizeObserver;\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(syncPos);\n resizeObserver.observe(target);\n }\n return () => {\n raf.cancel(id);\n resizeObserver?.disconnect();\n };\n }\n }, [target]);\n if (!enabled) {\n return null;\n }\n const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && target?.classList.contains(TARGET_CLS);\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: true,\n motionAppear: true,\n motionName: \"wave-motion\",\n motionDeadline: 5000,\n onAppearEnd: (_, event) => {\n if (event.deadline || event.propertyName === 'opacity') {\n const holder = divRef.current?.parentElement;\n unmount(holder).then(() => {\n holder?.remove();\n });\n }\n return false;\n }\n }, ({\n className: motionClassName\n }, ref) => (/*#__PURE__*/React.createElement(\"div\", {\n ref: composeRef(divRef, ref),\n className: clsx(className, motionClassName, {\n 'wave-quick': isSmallComponent\n }),\n style: waveStyle\n })));\n};\nconst showWaveEffect = (target, info) => {\n const {\n component\n } = info;\n // Skip for unchecked checkbox\n if (component === 'Checkbox' && !target.querySelector('input')?.checked) {\n return;\n }\n // Create holder\n const holder = document.createElement('div');\n holder.style.position = 'absolute';\n holder.style.left = '0px';\n holder.style.top = '0px';\n target?.insertBefore(holder, target?.firstChild);\n render(/*#__PURE__*/React.createElement(WaveEffect, {\n ...info,\n target: target\n }), holder);\n};\nexport default showWaveEffect;"],"names":["validateNum","value","WaveEffect","props","className","target","component","colorSource","divRef","React","color","setWaveColor","borderRadius","setBorderRadius","left","setLeft","top","setTop","width","setWidth","height","setHeight","enabled","setEnabled","waveStyle","radius","syncPos","nodeStyle","getTargetWaveColor","isStatic","borderLeftWidth","borderTopWidth","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","id","raf","resizeObserver","isSmallComponent","TARGET_CLS","CSSMotion","_","event","holder","unmount","motionClassName","ref","composeRef","clsx","showWaveEffect","info","render"],"mappings":";;;;;;;;AAUA,SAASA,EAAYC,GAAO;AAC1B,SAAO,OAAO,MAAMA,CAAK,IAAI,IAAIA;AACnC;AACA,MAAMC,IAAa,CAAAC,MAAS;AAC1B,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,EACJ,IAAMJ,GACEK,IAASC,EAAM,OAAO,IAAI,GAE1B,CAACC,GAAOC,CAAY,IAAIF,EAAM,SAAS,IAAI,GAC3C,CAACG,GAAcC,CAAe,IAAIJ,EAAM,SAAS,CAAA,CAAE,GACnD,CAACK,GAAMC,CAAO,IAAIN,EAAM,SAAS,CAAC,GAClC,CAACO,GAAKC,CAAM,IAAIR,EAAM,SAAS,CAAC,GAChC,CAACS,GAAOC,CAAQ,IAAIV,EAAM,SAAS,CAAC,GACpC,CAACW,GAAQC,CAAS,IAAIZ,EAAM,SAAS,CAAC,GACtC,CAACa,GAASC,CAAU,IAAId,EAAM,SAAS,EAAK,GAC5Ce,IAAY;AAAA,IAChB,MAAAV;AAAA,IACA,KAAAE;AAAA,IACA,OAAAE;AAAA,IACA,QAAAE;AAAA,IACA,cAAcR,EAAa,IAAI,CAAAa,MAAU,GAAGA,CAAM,IAAI,EAAE,KAAK,GAAG;AAAA,EACpE;AACE,EAAIf,MACFc,EAAU,cAAc,IAAId;AAE9B,WAASgB,IAAU;AACjB,UAAMC,IAAY,iBAAiBtB,CAAM;AAEzC,IAAAM,EAAaiB,EAAmBvB,GAAQE,CAAW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AYA,EAAM,iBAAiB,WAAW;AACtD,cAAMC,IAASpC,EAAO,SAAS;AAC/B,QAAAqC,EAAQD,CAAM,EAAE,KAAK,MAAM;AACzB,UAAAA,GAAQ,OAAM;AAAA,QAChB,CAAC;AAAA,MACH;AACA,aAAO;AAAA,IACT;AAAA,EACJ,GAAK,CAAC;AAAA,IACF,WAAWE;AAAA,EACf,GAAKC,MAAsB,gBAAAtC,EAAM,cAAc,OAAO;AAAA,IAClD,KAAKuC,EAAWxC,GAAQuC,CAAG;AAAA,IAC3B,WAAWE,EAAK7C,GAAW0C,GAAiB;AAAA,MAC1C,cAAcP;AAAA,IACpB,CAAK;AAAA,IACD,OAAOf;AAAA,EACX,CAAG,CAAE;AACL,GACM0B,IAAiB,CAAC7C,GAAQ8C,MAAS;AACvC,QAAM;AAAA,IACJ,WAAA7C;AAAA,EACJ,IAAM6C;AAEJ,MAAI7C,MAAc,cAAc,CAACD,EAAO,cAAc,OAAO,GAAG;AAC9D;AAGF,QAAMuC,IAAS,SAAS,cAAc,KAAK;AAC3C,EAAAA,EAAO,MAAM,WAAW,YACxBA,EAAO,MAAM,OAAO,OACpBA,EAAO,MAAM,MAAM,OACnBvC,GAAQ,aAAauC,GAAQvC,GAAQ,UAAU,GAC/C+C,EAAoB,gBAAA3C,EAAM,cAAcP,GAAY;AAAA,IAClD,GAAGiD;AAAA,IACH,QAAQ9C;AAAA,EACZ,CAAG,GAAGuC,CAAM;AACZ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"WaveEffect.js","sources":["../../../../../../node_modules/antd/es/_util/wave/WaveEffect.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport CSSMotion from '@rc-component/motion';\nimport raf from \"@rc-component/util/es/raf\";\nimport { render, unmount } from \"@rc-component/util/es/React/render\";\nimport { composeRef } from \"@rc-component/util/es/ref\";\nimport { clsx } from 'clsx';\nimport { ConfigContext } from '../../config-provider';\nimport { genCssVar } from '../../theme/util/genStyleUtils';\nimport { TARGET_CLS } from './interface';\nimport { getTargetWaveColor } from './util';\nfunction validateNum(value) {\n return Number.isNaN(value) ? 0 : value;\n}\nconst WaveEffect = props => {\n const {\n className,\n target,\n component,\n colorSource\n } = props;\n const divRef = React.useRef(null);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const rootPrefixCls = getPrefixCls();\n const [varName] = genCssVar(rootPrefixCls, 'wave');\n // ===================== Effect =====================\n const [color, setWaveColor] = React.useState(null);\n const [borderRadius, setBorderRadius] = React.useState([]);\n const [left, setLeft] = React.useState(0);\n const [top, setTop] = React.useState(0);\n const [width, setWidth] = React.useState(0);\n const [height, setHeight] = React.useState(0);\n const [enabled, setEnabled] = React.useState(false);\n const waveStyle = {\n left,\n top,\n width,\n height,\n borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')\n };\n if (color) {\n waveStyle[varName('color')] = color;\n }\n function syncPos() {\n const nodeStyle = getComputedStyle(target);\n // Get wave color from target\n setWaveColor(getTargetWaveColor(target, colorSource));\n const isStatic = nodeStyle.position === 'static';\n // Rect\n const {\n borderLeftWidth,\n borderTopWidth\n } = nodeStyle;\n setLeft(isStatic ? target.offsetLeft : validateNum(-Number.parseFloat(borderLeftWidth)));\n setTop(isStatic ? target.offsetTop : validateNum(-Number.parseFloat(borderTopWidth)));\n setWidth(target.offsetWidth);\n setHeight(target.offsetHeight);\n // Get border radius\n const {\n borderTopLeftRadius,\n borderTopRightRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius\n } = nodeStyle;\n setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(Number.parseFloat(radius))));\n }\n React.useEffect(() => {\n if (target) {\n // We need delay to check position here\n // since UI may change after click\n const id = raf(() => {\n syncPos();\n setEnabled(true);\n });\n // Add resize observer to follow size\n let resizeObserver;\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(syncPos);\n resizeObserver.observe(target);\n }\n return () => {\n raf.cancel(id);\n resizeObserver?.disconnect();\n };\n }\n }, [target]);\n if (!enabled) {\n return null;\n }\n const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && target?.classList.contains(TARGET_CLS);\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: true,\n motionAppear: true,\n motionName: \"wave-motion\",\n motionDeadline: 5000,\n onAppearEnd: (_, event) => {\n if (event.deadline || event.propertyName === 'opacity') {\n const holder = divRef.current?.parentElement;\n unmount(holder).then(() => {\n holder?.remove();\n });\n }\n return false;\n }\n }, ({\n className: motionClassName\n }, ref) => (/*#__PURE__*/React.createElement(\"div\", {\n ref: composeRef(divRef, ref),\n className: clsx(className, motionClassName, {\n 'wave-quick': isSmallComponent\n }),\n style: waveStyle\n })));\n};\nconst showWaveEffect = (target, info) => {\n const {\n component\n } = info;\n // Skip for unchecked checkbox\n if (component === 'Checkbox' && !target.querySelector('input')?.checked) {\n return;\n }\n // Create holder\n const holder = document.createElement('div');\n holder.style.position = 'absolute';\n holder.style.left = '0px';\n holder.style.top = '0px';\n target?.insertBefore(holder, target?.firstChild);\n render(/*#__PURE__*/React.createElement(WaveEffect, {\n ...info,\n target: target\n }), holder);\n};\nexport default showWaveEffect;"],"names":["validateNum","value","WaveEffect","props","className","target","component","colorSource","divRef","React","getPrefixCls","ConfigContext","rootPrefixCls","varName","genCssVar","color","setWaveColor","borderRadius","setBorderRadius","left","setLeft","top","setTop","width","setWidth","height","setHeight","enabled","setEnabled","waveStyle","radius","syncPos","nodeStyle","getTargetWaveColor","isStatic","borderLeftWidth","borderTopWidth","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","id","raf","resizeObserver","isSmallComponent","TARGET_CLS","CSSMotion","_","event","holder","unmount","motionClassName","ref","composeRef","clsx","showWaveEffect","info","render"],"mappings":";;;;;;;;;;;AAYA,SAASA,EAAYC,GAAO;AAC1B,SAAO,OAAO,MAAMA,CAAK,IAAI,IAAIA;AACnC;AACA,MAAMC,IAAa,CAAAC,MAAS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EAAM,cAAc,OAAO;AAAA,IAClD,KAAK4C,EAAW7C,GAAQ4C,CAAG;AAAA,IAC3B,WAAWE,EAAKlD,GAAW+C,GAAiB;AAAA,MAC1C,cAAcP;AAAA,IACpB,CAAK;AAAA,IACD,OAAOf;AAAA,EACX,CAAG,CAAE;AACL,GACM0B,KAAiB,CAAClD,GAAQmD,MAAS;AACvC,QAAM;AAAA,IACJ,WAAAlD;AAAA,EACJ,IAAMkD;AAEJ,MAAIlD,MAAc,cAAc,CAACD,EAAO,cAAc,OAAO,GAAG;AAC9D;AAGF,QAAM4C,IAAS,SAAS,cAAc,KAAK;AAC3C,EAAAA,EAAO,MAAM,WAAW,YACxBA,EAAO,MAAM,OAAO,OACpBA,EAAO,MAAM,MAAM,OACnB5C,GAAQ,aAAa4C,GAAQ5C,GAAQ,UAAU,GAC/CoD,EAAoB,gBAAAhD,EAAM,cAAcP,GAAY;AAAA,IAClD,GAAGsD;AAAA,IACH,QAAQnD;AAAA,EACZ,CAAG,GAAG4C,CAAM;AACZ;","x_google_ignoreList":[0]}
@@ -1,16 +1,17 @@
1
- import { genComponentStyleHook as n } from "../../theme/util/genStyleUtils.js";
2
- const i = (o) => {
1
+ import { genComponentStyleHook as i, genCssVar as e } from "../../theme/util/genStyleUtils.js";
2
+ const s = (o) => {
3
3
  const {
4
4
  componentCls: t,
5
- colorPrimary: a
6
- } = o;
5
+ colorPrimary: n,
6
+ antCls: a
7
+ } = o, [, r] = e(a, "wave");
7
8
  return {
8
9
  [t]: {
9
10
  position: "absolute",
10
11
  background: "transparent",
11
12
  pointerEvents: "none",
12
13
  boxSizing: "border-box",
13
- color: `var(--wave-color, ${a})`,
14
+ color: r("color", n),
14
15
  boxShadow: "0 0 0 0 currentcolor",
15
16
  opacity: 0.2,
16
17
  // =================== Motion ===================
@@ -26,8 +27,8 @@ const i = (o) => {
26
27
  }
27
28
  }
28
29
  };
29
- }, e = n("Wave", i);
30
+ }, l = i("Wave", s);
30
31
  export {
31
- e as default
32
+ l as default
32
33
  };
33
34
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../../../node_modules/antd/es/_util/wave/style.js"],"sourcesContent":["import { genComponentStyleHook } from '../../theme/internal';\nconst genWaveStyle = token => {\n const {\n componentCls,\n colorPrimary\n } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n background: 'transparent',\n pointerEvents: 'none',\n boxSizing: 'border-box',\n color: `var(--wave-color, ${colorPrimary})`,\n boxShadow: `0 0 0 0 currentcolor`,\n opacity: 0.2,\n // =================== Motion ===================\n '&.wave-motion-appear': {\n transition: [`box-shadow 0.4s ${token.motionEaseOutCirc}`, `opacity 2s ${token.motionEaseOutCirc}`].join(','),\n '&-active': {\n boxShadow: `0 0 0 6px currentcolor`,\n opacity: 0\n },\n '&.wave-quick': {\n transition: [`box-shadow ${token.motionDurationSlow} ${token.motionEaseInOut}`, `opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`].join(',')\n }\n }\n }\n };\n};\nexport default genComponentStyleHook('Wave', genWaveStyle);"],"names":["genWaveStyle","token","componentCls","colorPrimary","useStyle","genComponentStyleHook"],"mappings":";AACA,MAAMA,IAAe,CAAAC,MAAS;AAC5B,QAAM;AAAA,IACJ,cAAAC;AAAA,IACA,cAAAC;AAAA,EACJ,IAAMF;AACJ,SAAO;AAAA,IACL,CAACC,CAAY,GAAG;AAAA,MACd,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,WAAW;AAAA,MACX,OAAO,qBAAqBC,CAAY;AAAA,MACxC,WAAW;AAAA,MACX,SAAS;AAAA;AAAA,MAET,wBAAwB;AAAA,QACtB,YAAY,CAAC,mBAAmBF,EAAM,iBAAiB,IAAI,cAAcA,EAAM,iBAAiB,EAAE,EAAE,KAAK,GAAG;AAAA,QAC5G,YAAY;AAAA,UACV,WAAW;AAAA,UACX,SAAS;AAAA,QACnB;AAAA,QACQ,gBAAgB;AAAA,UACd,YAAY,CAAC,cAAcA,EAAM,kBAAkB,IAAIA,EAAM,eAAe,IAAI,WAAWA,EAAM,kBAAkB,IAAIA,EAAM,eAAe,EAAE,EAAE,KAAK,GAAG;AAAA,QAClK;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,GACAG,IAAeC,EAAsB,QAAQL,CAAY;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"style.js","sources":["../../../../../../node_modules/antd/es/_util/wave/style.js"],"sourcesContent":["import { genComponentStyleHook } from '../../theme/internal';\nimport { genCssVar } from '../../theme/util/genStyleUtils';\nconst genWaveStyle = token => {\n const {\n componentCls,\n colorPrimary,\n antCls\n } = token;\n const [, varRef] = genCssVar(antCls, 'wave');\n return {\n [componentCls]: {\n position: 'absolute',\n background: 'transparent',\n pointerEvents: 'none',\n boxSizing: 'border-box',\n color: varRef('color', colorPrimary),\n boxShadow: `0 0 0 0 currentcolor`,\n opacity: 0.2,\n // =================== Motion ===================\n '&.wave-motion-appear': {\n transition: [`box-shadow 0.4s ${token.motionEaseOutCirc}`, `opacity 2s ${token.motionEaseOutCirc}`].join(','),\n '&-active': {\n boxShadow: `0 0 0 6px currentcolor`,\n opacity: 0\n },\n '&.wave-quick': {\n transition: [`box-shadow ${token.motionDurationSlow} ${token.motionEaseInOut}`, `opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`].join(',')\n }\n }\n }\n };\n};\nexport default genComponentStyleHook('Wave', genWaveStyle);"],"names":["genWaveStyle","token","componentCls","colorPrimary","antCls","varRef","genCssVar","useStyle","genComponentStyleHook"],"mappings":";AAEA,MAAMA,IAAe,CAAAC,MAAS;AAC5B,QAAM;AAAA,IACJ,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,QAAAC;AAAA,EACJ,IAAMH,GACE,CAAA,EAAGI,CAAM,IAAIC,EAAUF,GAAQ,MAAM;AAC3C,SAAO;AAAA,IACL,CAACF,CAAY,GAAG;AAAA,MACd,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,WAAW;AAAA,MACX,OAAOG,EAAO,SAASF,CAAY;AAAA,MACnC,WAAW;AAAA,MACX,SAAS;AAAA;AAAA,MAET,wBAAwB;AAAA,QACtB,YAAY,CAAC,mBAAmBF,EAAM,iBAAiB,IAAI,cAAcA,EAAM,iBAAiB,EAAE,EAAE,KAAK,GAAG;AAAA,QAC5G,YAAY;AAAA,UACV,WAAW;AAAA,UACX,SAAS;AAAA,QACnB;AAAA,QACQ,gBAAgB;AAAA,UACd,YAAY,CAAC,cAAcA,EAAM,kBAAkB,IAAIA,EAAM,eAAe,IAAI,WAAWA,EAAM,kBAAkB,IAAIA,EAAM,eAAe,EAAE,EAAE,KAAK,GAAG;AAAA,QAClK;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,GACAM,IAAeC,EAAsB,QAAQR,CAAY;","x_google_ignoreList":[0]}