@vchasno/ui-kit 0.3.35 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (808) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +33 -43
  3. package/dist/{Datepicker/types/components → components}/Alert/Alert.d.ts +5 -4
  4. package/dist/components/Alert/Alert.js +2 -0
  5. package/dist/components/Alert/Alert.js.map +1 -0
  6. package/dist/components/BlackTooltip/BlackTooltip.d.ts +10 -0
  7. package/dist/components/BlackTooltip/BlackTooltip.js +2 -0
  8. package/dist/components/BlackTooltip/BlackTooltip.js.map +1 -0
  9. package/dist/{ProjectsPopover/types/components → components}/BubbleBox/BubbleBox.d.ts +4 -3
  10. package/dist/components/BubbleBox/BubbleBox.js +2 -0
  11. package/dist/components/BubbleBox/BubbleBox.js.map +1 -0
  12. package/dist/components/BubbleBox/utils.d.ts +3 -0
  13. package/dist/components/BubbleBox/utils.js +2 -0
  14. package/dist/components/BubbleBox/utils.js.map +1 -0
  15. package/dist/components/Button/Button.d.ts +13 -0
  16. package/dist/components/Button/Button.js +2 -0
  17. package/dist/components/Button/Button.js.map +1 -0
  18. package/dist/{Menu/types/components → components}/Checkbox/Checkbox.d.ts +5 -4
  19. package/dist/components/Checkbox/Checkbox.js +2 -0
  20. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  21. package/dist/{Menu/types/components → components}/Datepicker/DatePicker.d.ts +6 -5
  22. package/dist/components/Datepicker/DatePicker.js +2 -0
  23. package/dist/components/Datepicker/DatePicker.js.map +1 -0
  24. package/dist/{Datepicker/types/components → components}/FlexBox/FlexBox.d.ts +5 -4
  25. package/dist/components/FlexBox/FlexBox.js +2 -0
  26. package/dist/components/FlexBox/FlexBox.js.map +1 -0
  27. package/dist/{ProjectsPopover/types/components → components}/FollowUs/FollowUs.d.ts +6 -5
  28. package/dist/components/FollowUs/FollowUs.js +2 -0
  29. package/dist/components/FollowUs/FollowUs.js.map +1 -0
  30. package/dist/components/FollowUs/config.d.ts +5 -0
  31. package/dist/components/FollowUs/config.js +2 -0
  32. package/dist/components/FollowUs/config.js.map +1 -0
  33. package/dist/components/FollowUs/images/fb.png.js +2 -0
  34. package/dist/components/FollowUs/images/fb.png.js.map +1 -0
  35. package/dist/components/FollowUs/images/instagram.png.js +2 -0
  36. package/dist/components/FollowUs/images/instagram.png.js.map +1 -0
  37. package/dist/components/FollowUs/images/telegram.png.js +2 -0
  38. package/dist/components/FollowUs/images/telegram.png.js.map +1 -0
  39. package/dist/components/FollowUs/images/tiktok.png.js +2 -0
  40. package/dist/components/FollowUs/images/tiktok.png.js.map +1 -0
  41. package/dist/components/FollowUs/images/youtube.png.js +2 -0
  42. package/dist/components/FollowUs/images/youtube.png.js.map +1 -0
  43. package/dist/components/FollowUs/types.d.ts +3 -0
  44. package/dist/{Menu/types/components → components}/Input/Input.d.ts +6 -5
  45. package/dist/components/Input/Input.js +2 -0
  46. package/dist/components/Input/Input.js.map +1 -0
  47. package/dist/components/InputMeta/InputMeta.d.ts +9 -0
  48. package/dist/components/InputMeta/InputMeta.js +2 -0
  49. package/dist/components/InputMeta/InputMeta.js.map +1 -0
  50. package/dist/{ProjectsPopover/types/components → components}/LabelText/LabelText.d.ts +4 -3
  51. package/dist/components/LabelText/LabelText.js +2 -0
  52. package/dist/components/LabelText/LabelText.js.map +1 -0
  53. package/dist/{ProjectsPopover/types/components → components}/MaskInput/MaskInput.d.ts +6 -5
  54. package/dist/components/MaskInput/MaskInput.js +2 -0
  55. package/dist/components/MaskInput/MaskInput.js.map +1 -0
  56. package/dist/{Menu/index.d.ts → components/Menu/Menu.d.ts} +4 -9
  57. package/dist/components/Menu/Menu.js +2 -0
  58. package/dist/components/Menu/Menu.js.map +1 -0
  59. package/dist/components/MenuButton/MenuButton.d.ts +8 -0
  60. package/dist/components/MenuButton/MenuButton.js +2 -0
  61. package/dist/components/MenuButton/MenuButton.js.map +1 -0
  62. package/dist/components/MenuItem/MenuItem.d.ts +8 -0
  63. package/dist/components/MenuItem/MenuItem.js +2 -0
  64. package/dist/components/MenuItem/MenuItem.js.map +1 -0
  65. package/dist/{Datepicker/types/components → components}/MobileAppLinks/MobileAppLinks.d.ts +7 -6
  66. package/dist/components/MobileAppLinks/MobileAppLinks.js +2 -0
  67. package/dist/components/MobileAppLinks/MobileAppLinks.js.map +1 -0
  68. package/dist/components/MobileAppLinks/config.d.ts +5 -0
  69. package/dist/components/MobileAppLinks/config.js +2 -0
  70. package/dist/components/MobileAppLinks/config.js.map +1 -0
  71. package/dist/components/MobileAppLinks/images/apple.png.js +2 -0
  72. package/dist/components/MobileAppLinks/images/apple.png.js.map +1 -0
  73. package/dist/components/MobileAppLinks/images/google.png.js +2 -0
  74. package/dist/components/MobileAppLinks/images/google.png.js.map +1 -0
  75. package/dist/components/MobileAppLinks/types.d.ts +6 -0
  76. package/dist/{Menu/types/components → components}/Pagination/Pagination.d.ts +4 -3
  77. package/dist/components/Pagination/Pagination.js +2 -0
  78. package/dist/components/Pagination/Pagination.js.map +1 -0
  79. package/dist/components/Pagination/utils.js +2 -0
  80. package/dist/components/Pagination/utils.js.map +1 -0
  81. package/dist/components/Paragraph/Paragraph.d.ts +11 -0
  82. package/dist/components/Paragraph/Paragraph.js +2 -0
  83. package/dist/components/Paragraph/Paragraph.js.map +1 -0
  84. package/dist/{Datepicker/types/components → components}/ProjectsPopover/ProductLink.d.ts +5 -4
  85. package/dist/components/ProjectsPopover/ProductLink.js +2 -0
  86. package/dist/components/ProjectsPopover/ProductLink.js.map +1 -0
  87. package/dist/components/ProjectsPopover/ProjectsPopover.d.ts +14 -0
  88. package/dist/components/ProjectsPopover/ProjectsPopover.js +2 -0
  89. package/dist/components/ProjectsPopover/ProjectsPopover.js.map +1 -0
  90. package/dist/components/ProjectsPopover/mappers.js +2 -0
  91. package/dist/components/ProjectsPopover/mappers.js.map +1 -0
  92. package/dist/components/ProjectsPopover/types.d.ts +7 -0
  93. package/dist/components/ProjectsPopover/types.js +2 -0
  94. package/dist/components/ProjectsPopover/types.js.map +1 -0
  95. package/dist/components/ProjectsPopover/utils.js +2 -0
  96. package/dist/components/ProjectsPopover/utils.js.map +1 -0
  97. package/dist/{ProjectsPopover/types/components → components}/PulseDot/PulseDot.d.ts +4 -3
  98. package/dist/components/PulseDot/PulseDot.js +2 -0
  99. package/dist/components/PulseDot/PulseDot.js.map +1 -0
  100. package/dist/components/Select/Label.js +2 -0
  101. package/dist/components/Select/Label.js.map +1 -0
  102. package/dist/components/Select/Select.d.ts +12 -0
  103. package/dist/components/Select/Select.js +2 -0
  104. package/dist/components/Select/Select.js.map +1 -0
  105. package/dist/components/Select/SelectCreatable.d.ts +13 -0
  106. package/dist/components/Select/SelectCreatable.js +2 -0
  107. package/dist/components/Select/SelectCreatable.js.map +1 -0
  108. package/dist/components/Select/customComponents.js +2 -0
  109. package/dist/components/Select/customComponents.js.map +1 -0
  110. package/dist/components/Select/defaultProps.js +2 -0
  111. package/dist/components/Select/defaultProps.js.map +1 -0
  112. package/dist/components/Select/types.d.ts +6 -0
  113. package/dist/components/Select/utils.js +2 -0
  114. package/dist/components/Select/utils.js.map +1 -0
  115. package/dist/components/Snackbar/ActionButton.d.ts +5 -0
  116. package/dist/components/Snackbar/ActionButton.js +2 -0
  117. package/dist/components/Snackbar/ActionButton.js.map +1 -0
  118. package/dist/{Snackbar/index.d.ts → components/Snackbar/Snackbar.d.ts} +1 -4
  119. package/dist/components/Snackbar/Snackbar.js +2 -0
  120. package/dist/components/Snackbar/Snackbar.js.map +1 -0
  121. package/dist/components/Snackbar/WithAction.js +2 -0
  122. package/dist/components/Snackbar/WithAction.js.map +1 -0
  123. package/dist/{ProjectsPopover/types/components → components}/Spinner/Spinner.d.ts +4 -3
  124. package/dist/components/Spinner/Spinner.js +2 -0
  125. package/dist/components/Spinner/Spinner.js.map +1 -0
  126. package/dist/{ProjectsPopover/types/components → components}/SplashLogo/SplashLogo.d.ts +4 -3
  127. package/dist/components/SplashLogo/SplashLogo.js +2 -0
  128. package/dist/components/SplashLogo/SplashLogo.js.map +1 -0
  129. package/dist/components/SplashLogo/dataUrls.js +2 -0
  130. package/dist/components/SplashLogo/dataUrls.js.map +1 -0
  131. package/dist/{Datepicker/types/components → components}/SvgBorder/SvgBorder.d.ts +4 -3
  132. package/dist/components/SvgBorder/SvgBorder.js +2 -0
  133. package/dist/components/SvgBorder/SvgBorder.js.map +1 -0
  134. package/dist/components/SvgBorder/utils.d.ts +3 -0
  135. package/dist/components/SvgBorder/utils.js +2 -0
  136. package/dist/components/SvgBorder/utils.js.map +1 -0
  137. package/dist/{Menu/types/components → components}/Switch/Switch.d.ts +5 -4
  138. package/dist/components/Switch/Switch.js +2 -0
  139. package/dist/components/Switch/Switch.js.map +1 -0
  140. package/dist/{ProjectsPopover/types/components → components}/Tabs/Tabs.d.ts +5 -4
  141. package/dist/components/Tabs/Tabs.js +2 -0
  142. package/dist/components/Tabs/Tabs.js.map +1 -0
  143. package/dist/{Datepicker/types/components → components}/Text/Text.d.ts +5 -4
  144. package/dist/components/Text/Text.js +2 -0
  145. package/dist/components/Text/Text.js.map +1 -0
  146. package/dist/{Datepicker/types/components → components}/TextAreaInput/TextAreaInput.d.ts +6 -5
  147. package/dist/components/TextAreaInput/TextAreaInput.js +2 -0
  148. package/dist/components/TextAreaInput/TextAreaInput.js.map +1 -0
  149. package/dist/components/TextInput/TextInput.d.ts +11 -0
  150. package/dist/components/TextInput/TextInput.js +2 -0
  151. package/dist/components/TextInput/TextInput.js.map +1 -0
  152. package/dist/components/Title/Title.d.ts +11 -0
  153. package/dist/components/Title/Title.js +2 -0
  154. package/dist/components/Title/Title.js.map +1 -0
  155. package/dist/{Datepicker/types/components → components}/types.d.ts +13 -11
  156. package/dist/css/vchasno-ui.css +1 -0
  157. package/dist/{Datepicker/types/hooks → hooks}/useClientRect.d.ts +4 -1
  158. package/dist/hooks/useClientRect.js +2 -0
  159. package/dist/hooks/useClientRect.js.map +1 -0
  160. package/dist/index.d.ts +35 -319
  161. package/dist/index.js +1 -13396
  162. package/dist/index.js.map +1 -1
  163. package/dist/utils/react.js +2 -0
  164. package/dist/utils/react.js.map +1 -0
  165. package/package.json +12 -54
  166. package/dist/Datepicker/index.cjs.js +0 -15714
  167. package/dist/Datepicker/index.cjs.js.map +0 -1
  168. package/dist/Datepicker/index.d.ts +0 -41
  169. package/dist/Datepicker/index.js +0 -15694
  170. package/dist/Datepicker/index.js.map +0 -1
  171. package/dist/Datepicker/types/components/Alert/index.d.ts +0 -2
  172. package/dist/Datepicker/types/components/BlackTooltip/BlackTooltip.d.ts +0 -5
  173. package/dist/Datepicker/types/components/BlackTooltip/index.d.ts +0 -2
  174. package/dist/Datepicker/types/components/BubbleBox/BubbleBox.d.ts +0 -17
  175. package/dist/Datepicker/types/components/BubbleBox/index.d.ts +0 -3
  176. package/dist/Datepicker/types/components/BubbleBox/utils.d.ts +0 -1
  177. package/dist/Datepicker/types/components/Button/Button.d.ts +0 -12
  178. package/dist/Datepicker/types/components/Button/index.d.ts +0 -2
  179. package/dist/Datepicker/types/components/Checkbox/Checkbox.d.ts +0 -11
  180. package/dist/Datepicker/types/components/Checkbox/index.d.ts +0 -2
  181. package/dist/Datepicker/types/components/Datepicker/DatePicker.d.ts +0 -20
  182. package/dist/Datepicker/types/components/Datepicker/index.d.ts +0 -2
  183. package/dist/Datepicker/types/components/FlexBox/index.d.ts +0 -2
  184. package/dist/Datepicker/types/components/FollowUs/FollowUs.d.ts +0 -14
  185. package/dist/Datepicker/types/components/FollowUs/config.d.ts +0 -4
  186. package/dist/Datepicker/types/components/FollowUs/index.d.ts +0 -2
  187. package/dist/Datepicker/types/components/FollowUs/types.d.ts +0 -1
  188. package/dist/Datepicker/types/components/Input/Input.d.ts +0 -15
  189. package/dist/Datepicker/types/components/Input/index.d.ts +0 -2
  190. package/dist/Datepicker/types/components/InputMeta/InputMeta.d.ts +0 -8
  191. package/dist/Datepicker/types/components/InputMeta/index.d.ts +0 -2
  192. package/dist/Datepicker/types/components/LabelText/LabelText.d.ts +0 -8
  193. package/dist/Datepicker/types/components/LabelText/index.d.ts +0 -1
  194. package/dist/Datepicker/types/components/MaskInput/MaskInput.d.ts +0 -11
  195. package/dist/Datepicker/types/components/MaskInput/index.d.ts +0 -2
  196. package/dist/Datepicker/types/components/Menu/Menu.d.ts +0 -11
  197. package/dist/Datepicker/types/components/Menu/index.d.ts +0 -2
  198. package/dist/Datepicker/types/components/MenuButton/MenuButton.d.ts +0 -7
  199. package/dist/Datepicker/types/components/MenuButton/index.d.ts +0 -2
  200. package/dist/Datepicker/types/components/MenuItem/MenuItem.d.ts +0 -7
  201. package/dist/Datepicker/types/components/MenuItem/index.d.ts +0 -2
  202. package/dist/Datepicker/types/components/MobileAppLinks/config.d.ts +0 -4
  203. package/dist/Datepicker/types/components/MobileAppLinks/index.d.ts +0 -2
  204. package/dist/Datepicker/types/components/MobileAppLinks/types.d.ts +0 -4
  205. package/dist/Datepicker/types/components/Pagination/Pagination.d.ts +0 -16
  206. package/dist/Datepicker/types/components/Pagination/index.d.ts +0 -2
  207. package/dist/Datepicker/types/components/Pagination/utils.d.ts +0 -1
  208. package/dist/Datepicker/types/components/Paragraph/Paragraph.d.ts +0 -11
  209. package/dist/Datepicker/types/components/Paragraph/index.d.ts +0 -2
  210. package/dist/Datepicker/types/components/ProjectsPopover/ProjectsPopover.d.ts +0 -13
  211. package/dist/Datepicker/types/components/ProjectsPopover/index.d.ts +0 -2
  212. package/dist/Datepicker/types/components/ProjectsPopover/mappers.d.ts +0 -7
  213. package/dist/Datepicker/types/components/ProjectsPopover/types.d.ts +0 -8
  214. package/dist/Datepicker/types/components/ProjectsPopover/utils.d.ts +0 -11
  215. package/dist/Datepicker/types/components/PulseDot/PulseDot.d.ts +0 -22
  216. package/dist/Datepicker/types/components/PulseDot/index.d.ts +0 -2
  217. package/dist/Datepicker/types/components/Select/Label.d.ts +0 -6
  218. package/dist/Datepicker/types/components/Select/Select.d.ts +0 -39
  219. package/dist/Datepicker/types/components/Select/SelectCreatable.d.ts +0 -13
  220. package/dist/Datepicker/types/components/Select/customComponents.d.ts +0 -10
  221. package/dist/Datepicker/types/components/Select/defaultProps.d.ts +0 -6
  222. package/dist/Datepicker/types/components/Select/index.d.ts +0 -5
  223. package/dist/Datepicker/types/components/Select/types.d.ts +0 -9
  224. package/dist/Datepicker/types/components/Select/utils.d.ts +0 -2
  225. package/dist/Datepicker/types/components/Snackbar/ActionButton.d.ts +0 -6
  226. package/dist/Datepicker/types/components/Snackbar/Snackbar.d.ts +0 -15
  227. package/dist/Datepicker/types/components/Snackbar/WithAction.d.ts +0 -3
  228. package/dist/Datepicker/types/components/Snackbar/index.d.ts +0 -2
  229. package/dist/Datepicker/types/components/Spinner/Spinner.d.ts +0 -18
  230. package/dist/Datepicker/types/components/Spinner/index.d.ts +0 -2
  231. package/dist/Datepicker/types/components/SplashLogo/SplashLogo.d.ts +0 -12
  232. package/dist/Datepicker/types/components/SplashLogo/dataUrls.d.ts +0 -6
  233. package/dist/Datepicker/types/components/SplashLogo/index.d.ts +0 -2
  234. package/dist/Datepicker/types/components/SvgBorder/index.d.ts +0 -3
  235. package/dist/Datepicker/types/components/SvgBorder/utils.d.ts +0 -1
  236. package/dist/Datepicker/types/components/Switch/Switch.d.ts +0 -14
  237. package/dist/Datepicker/types/components/Switch/index.d.ts +0 -2
  238. package/dist/Datepicker/types/components/Tabs/Tabs.d.ts +0 -19
  239. package/dist/Datepicker/types/components/Tabs/index.d.ts +0 -2
  240. package/dist/Datepicker/types/components/Text/index.d.ts +0 -2
  241. package/dist/Datepicker/types/components/TextAreaInput/index.d.ts +0 -2
  242. package/dist/Datepicker/types/components/TextInput/TextInput.d.ts +0 -10
  243. package/dist/Datepicker/types/components/TextInput/index.d.ts +0 -2
  244. package/dist/Datepicker/types/components/Title/Title.d.ts +0 -11
  245. package/dist/Datepicker/types/components/Title/index.d.ts +0 -2
  246. package/dist/Datepicker/types/components/index.d.ts +0 -46
  247. package/dist/Datepicker/types/index.d.ts +0 -2
  248. package/dist/Datepicker/types/utils/react.d.ts +0 -6
  249. package/dist/Menu/index.cjs.js +0 -2970
  250. package/dist/Menu/index.cjs.js.map +0 -1
  251. package/dist/Menu/index.js +0 -2968
  252. package/dist/Menu/index.js.map +0 -1
  253. package/dist/Menu/types/components/Alert/Alert.d.ts +0 -20
  254. package/dist/Menu/types/components/Alert/index.d.ts +0 -2
  255. package/dist/Menu/types/components/BlackTooltip/BlackTooltip.d.ts +0 -5
  256. package/dist/Menu/types/components/BlackTooltip/index.d.ts +0 -2
  257. package/dist/Menu/types/components/BubbleBox/BubbleBox.d.ts +0 -17
  258. package/dist/Menu/types/components/BubbleBox/index.d.ts +0 -3
  259. package/dist/Menu/types/components/BubbleBox/utils.d.ts +0 -1
  260. package/dist/Menu/types/components/Button/Button.d.ts +0 -12
  261. package/dist/Menu/types/components/Button/index.d.ts +0 -2
  262. package/dist/Menu/types/components/Checkbox/index.d.ts +0 -2
  263. package/dist/Menu/types/components/Datepicker/index.d.ts +0 -2
  264. package/dist/Menu/types/components/FlexBox/FlexBox.d.ts +0 -16
  265. package/dist/Menu/types/components/FlexBox/index.d.ts +0 -2
  266. package/dist/Menu/types/components/FollowUs/FollowUs.d.ts +0 -14
  267. package/dist/Menu/types/components/FollowUs/config.d.ts +0 -4
  268. package/dist/Menu/types/components/FollowUs/index.d.ts +0 -2
  269. package/dist/Menu/types/components/FollowUs/types.d.ts +0 -1
  270. package/dist/Menu/types/components/Input/index.d.ts +0 -2
  271. package/dist/Menu/types/components/InputMeta/InputMeta.d.ts +0 -8
  272. package/dist/Menu/types/components/InputMeta/index.d.ts +0 -2
  273. package/dist/Menu/types/components/LabelText/LabelText.d.ts +0 -8
  274. package/dist/Menu/types/components/LabelText/index.d.ts +0 -1
  275. package/dist/Menu/types/components/MaskInput/MaskInput.d.ts +0 -11
  276. package/dist/Menu/types/components/MaskInput/index.d.ts +0 -2
  277. package/dist/Menu/types/components/Menu/Menu.d.ts +0 -11
  278. package/dist/Menu/types/components/Menu/index.d.ts +0 -2
  279. package/dist/Menu/types/components/MenuButton/MenuButton.d.ts +0 -7
  280. package/dist/Menu/types/components/MenuButton/index.d.ts +0 -2
  281. package/dist/Menu/types/components/MenuItem/MenuItem.d.ts +0 -7
  282. package/dist/Menu/types/components/MenuItem/index.d.ts +0 -2
  283. package/dist/Menu/types/components/MobileAppLinks/MobileAppLinks.d.ts +0 -16
  284. package/dist/Menu/types/components/MobileAppLinks/config.d.ts +0 -4
  285. package/dist/Menu/types/components/MobileAppLinks/index.d.ts +0 -2
  286. package/dist/Menu/types/components/MobileAppLinks/types.d.ts +0 -4
  287. package/dist/Menu/types/components/Pagination/index.d.ts +0 -2
  288. package/dist/Menu/types/components/Pagination/utils.d.ts +0 -1
  289. package/dist/Menu/types/components/Paragraph/Paragraph.d.ts +0 -11
  290. package/dist/Menu/types/components/Paragraph/index.d.ts +0 -2
  291. package/dist/Menu/types/components/ProjectsPopover/ProductLink.d.ts +0 -13
  292. package/dist/Menu/types/components/ProjectsPopover/ProjectsPopover.d.ts +0 -13
  293. package/dist/Menu/types/components/ProjectsPopover/index.d.ts +0 -2
  294. package/dist/Menu/types/components/ProjectsPopover/mappers.d.ts +0 -7
  295. package/dist/Menu/types/components/ProjectsPopover/types.d.ts +0 -8
  296. package/dist/Menu/types/components/ProjectsPopover/utils.d.ts +0 -11
  297. package/dist/Menu/types/components/PulseDot/PulseDot.d.ts +0 -22
  298. package/dist/Menu/types/components/PulseDot/index.d.ts +0 -2
  299. package/dist/Menu/types/components/Select/Label.d.ts +0 -6
  300. package/dist/Menu/types/components/Select/Select.d.ts +0 -39
  301. package/dist/Menu/types/components/Select/SelectCreatable.d.ts +0 -13
  302. package/dist/Menu/types/components/Select/customComponents.d.ts +0 -10
  303. package/dist/Menu/types/components/Select/defaultProps.d.ts +0 -6
  304. package/dist/Menu/types/components/Select/index.d.ts +0 -5
  305. package/dist/Menu/types/components/Select/types.d.ts +0 -9
  306. package/dist/Menu/types/components/Select/utils.d.ts +0 -2
  307. package/dist/Menu/types/components/Snackbar/ActionButton.d.ts +0 -6
  308. package/dist/Menu/types/components/Snackbar/Snackbar.d.ts +0 -15
  309. package/dist/Menu/types/components/Snackbar/WithAction.d.ts +0 -3
  310. package/dist/Menu/types/components/Snackbar/index.d.ts +0 -2
  311. package/dist/Menu/types/components/Spinner/Spinner.d.ts +0 -18
  312. package/dist/Menu/types/components/Spinner/index.d.ts +0 -2
  313. package/dist/Menu/types/components/SplashLogo/SplashLogo.d.ts +0 -12
  314. package/dist/Menu/types/components/SplashLogo/dataUrls.d.ts +0 -6
  315. package/dist/Menu/types/components/SplashLogo/index.d.ts +0 -2
  316. package/dist/Menu/types/components/SvgBorder/SvgBorder.d.ts +0 -18
  317. package/dist/Menu/types/components/SvgBorder/index.d.ts +0 -3
  318. package/dist/Menu/types/components/SvgBorder/utils.d.ts +0 -1
  319. package/dist/Menu/types/components/Switch/index.d.ts +0 -2
  320. package/dist/Menu/types/components/Tabs/Tabs.d.ts +0 -19
  321. package/dist/Menu/types/components/Tabs/index.d.ts +0 -2
  322. package/dist/Menu/types/components/Text/Text.d.ts +0 -14
  323. package/dist/Menu/types/components/Text/index.d.ts +0 -2
  324. package/dist/Menu/types/components/TextAreaInput/TextAreaInput.d.ts +0 -12
  325. package/dist/Menu/types/components/TextAreaInput/index.d.ts +0 -2
  326. package/dist/Menu/types/components/TextInput/TextInput.d.ts +0 -10
  327. package/dist/Menu/types/components/TextInput/index.d.ts +0 -2
  328. package/dist/Menu/types/components/Title/Title.d.ts +0 -11
  329. package/dist/Menu/types/components/Title/index.d.ts +0 -2
  330. package/dist/Menu/types/components/index.d.ts +0 -46
  331. package/dist/Menu/types/components/types.d.ts +0 -37
  332. package/dist/Menu/types/hooks/useClientRect.d.ts +0 -5
  333. package/dist/Menu/types/index.d.ts +0 -2
  334. package/dist/Menu/types/utils/react.d.ts +0 -6
  335. package/dist/ProjectsPopover/index.cjs.js +0 -12660
  336. package/dist/ProjectsPopover/index.cjs.js.map +0 -1
  337. package/dist/ProjectsPopover/index.d.ts +0 -28
  338. package/dist/ProjectsPopover/index.js +0 -12640
  339. package/dist/ProjectsPopover/index.js.map +0 -1
  340. package/dist/ProjectsPopover/types/components/Alert/Alert.d.ts +0 -20
  341. package/dist/ProjectsPopover/types/components/Alert/index.d.ts +0 -2
  342. package/dist/ProjectsPopover/types/components/BlackTooltip/BlackTooltip.d.ts +0 -5
  343. package/dist/ProjectsPopover/types/components/BlackTooltip/index.d.ts +0 -2
  344. package/dist/ProjectsPopover/types/components/BubbleBox/index.d.ts +0 -3
  345. package/dist/ProjectsPopover/types/components/BubbleBox/utils.d.ts +0 -1
  346. package/dist/ProjectsPopover/types/components/Button/Button.d.ts +0 -12
  347. package/dist/ProjectsPopover/types/components/Button/index.d.ts +0 -2
  348. package/dist/ProjectsPopover/types/components/Checkbox/Checkbox.d.ts +0 -11
  349. package/dist/ProjectsPopover/types/components/Checkbox/index.d.ts +0 -2
  350. package/dist/ProjectsPopover/types/components/Datepicker/DatePicker.d.ts +0 -20
  351. package/dist/ProjectsPopover/types/components/Datepicker/index.d.ts +0 -2
  352. package/dist/ProjectsPopover/types/components/FlexBox/FlexBox.d.ts +0 -16
  353. package/dist/ProjectsPopover/types/components/FlexBox/index.d.ts +0 -2
  354. package/dist/ProjectsPopover/types/components/FollowUs/config.d.ts +0 -4
  355. package/dist/ProjectsPopover/types/components/FollowUs/index.d.ts +0 -2
  356. package/dist/ProjectsPopover/types/components/FollowUs/types.d.ts +0 -1
  357. package/dist/ProjectsPopover/types/components/Input/Input.d.ts +0 -15
  358. package/dist/ProjectsPopover/types/components/Input/index.d.ts +0 -2
  359. package/dist/ProjectsPopover/types/components/InputMeta/InputMeta.d.ts +0 -8
  360. package/dist/ProjectsPopover/types/components/InputMeta/index.d.ts +0 -2
  361. package/dist/ProjectsPopover/types/components/LabelText/index.d.ts +0 -1
  362. package/dist/ProjectsPopover/types/components/MaskInput/index.d.ts +0 -2
  363. package/dist/ProjectsPopover/types/components/Menu/Menu.d.ts +0 -11
  364. package/dist/ProjectsPopover/types/components/Menu/index.d.ts +0 -2
  365. package/dist/ProjectsPopover/types/components/MenuButton/MenuButton.d.ts +0 -7
  366. package/dist/ProjectsPopover/types/components/MenuButton/index.d.ts +0 -2
  367. package/dist/ProjectsPopover/types/components/MenuItem/MenuItem.d.ts +0 -7
  368. package/dist/ProjectsPopover/types/components/MenuItem/index.d.ts +0 -2
  369. package/dist/ProjectsPopover/types/components/MobileAppLinks/MobileAppLinks.d.ts +0 -16
  370. package/dist/ProjectsPopover/types/components/MobileAppLinks/config.d.ts +0 -4
  371. package/dist/ProjectsPopover/types/components/MobileAppLinks/index.d.ts +0 -2
  372. package/dist/ProjectsPopover/types/components/MobileAppLinks/types.d.ts +0 -4
  373. package/dist/ProjectsPopover/types/components/Pagination/Pagination.d.ts +0 -16
  374. package/dist/ProjectsPopover/types/components/Pagination/index.d.ts +0 -2
  375. package/dist/ProjectsPopover/types/components/Pagination/utils.d.ts +0 -1
  376. package/dist/ProjectsPopover/types/components/Paragraph/Paragraph.d.ts +0 -11
  377. package/dist/ProjectsPopover/types/components/Paragraph/index.d.ts +0 -2
  378. package/dist/ProjectsPopover/types/components/ProjectsPopover/ProductLink.d.ts +0 -13
  379. package/dist/ProjectsPopover/types/components/ProjectsPopover/ProjectsPopover.d.ts +0 -13
  380. package/dist/ProjectsPopover/types/components/ProjectsPopover/index.d.ts +0 -2
  381. package/dist/ProjectsPopover/types/components/ProjectsPopover/mappers.d.ts +0 -7
  382. package/dist/ProjectsPopover/types/components/ProjectsPopover/types.d.ts +0 -8
  383. package/dist/ProjectsPopover/types/components/ProjectsPopover/utils.d.ts +0 -11
  384. package/dist/ProjectsPopover/types/components/PulseDot/index.d.ts +0 -2
  385. package/dist/ProjectsPopover/types/components/Select/Label.d.ts +0 -6
  386. package/dist/ProjectsPopover/types/components/Select/Select.d.ts +0 -39
  387. package/dist/ProjectsPopover/types/components/Select/SelectCreatable.d.ts +0 -13
  388. package/dist/ProjectsPopover/types/components/Select/customComponents.d.ts +0 -10
  389. package/dist/ProjectsPopover/types/components/Select/defaultProps.d.ts +0 -6
  390. package/dist/ProjectsPopover/types/components/Select/index.d.ts +0 -5
  391. package/dist/ProjectsPopover/types/components/Select/types.d.ts +0 -9
  392. package/dist/ProjectsPopover/types/components/Select/utils.d.ts +0 -2
  393. package/dist/ProjectsPopover/types/components/Snackbar/ActionButton.d.ts +0 -6
  394. package/dist/ProjectsPopover/types/components/Snackbar/Snackbar.d.ts +0 -15
  395. package/dist/ProjectsPopover/types/components/Snackbar/WithAction.d.ts +0 -3
  396. package/dist/ProjectsPopover/types/components/Snackbar/index.d.ts +0 -2
  397. package/dist/ProjectsPopover/types/components/Spinner/index.d.ts +0 -2
  398. package/dist/ProjectsPopover/types/components/SplashLogo/dataUrls.d.ts +0 -6
  399. package/dist/ProjectsPopover/types/components/SplashLogo/index.d.ts +0 -2
  400. package/dist/ProjectsPopover/types/components/SvgBorder/SvgBorder.d.ts +0 -18
  401. package/dist/ProjectsPopover/types/components/SvgBorder/index.d.ts +0 -3
  402. package/dist/ProjectsPopover/types/components/SvgBorder/utils.d.ts +0 -1
  403. package/dist/ProjectsPopover/types/components/Switch/Switch.d.ts +0 -14
  404. package/dist/ProjectsPopover/types/components/Switch/index.d.ts +0 -2
  405. package/dist/ProjectsPopover/types/components/Tabs/index.d.ts +0 -2
  406. package/dist/ProjectsPopover/types/components/Text/Text.d.ts +0 -14
  407. package/dist/ProjectsPopover/types/components/Text/index.d.ts +0 -2
  408. package/dist/ProjectsPopover/types/components/TextAreaInput/TextAreaInput.d.ts +0 -12
  409. package/dist/ProjectsPopover/types/components/TextAreaInput/index.d.ts +0 -2
  410. package/dist/ProjectsPopover/types/components/TextInput/TextInput.d.ts +0 -10
  411. package/dist/ProjectsPopover/types/components/TextInput/index.d.ts +0 -2
  412. package/dist/ProjectsPopover/types/components/Title/Title.d.ts +0 -11
  413. package/dist/ProjectsPopover/types/components/Title/index.d.ts +0 -2
  414. package/dist/ProjectsPopover/types/components/index.d.ts +0 -46
  415. package/dist/ProjectsPopover/types/components/types.d.ts +0 -37
  416. package/dist/ProjectsPopover/types/hooks/useClientRect.d.ts +0 -5
  417. package/dist/ProjectsPopover/types/index.d.ts +0 -2
  418. package/dist/ProjectsPopover/types/utils/react.d.ts +0 -6
  419. package/dist/Select/index.cjs.js +0 -7805
  420. package/dist/Select/index.cjs.js.map +0 -1
  421. package/dist/Select/index.d.ts +0 -73
  422. package/dist/Select/index.js +0 -7782
  423. package/dist/Select/index.js.map +0 -1
  424. package/dist/Select/types/components/Alert/Alert.d.ts +0 -20
  425. package/dist/Select/types/components/Alert/index.d.ts +0 -2
  426. package/dist/Select/types/components/BlackTooltip/BlackTooltip.d.ts +0 -5
  427. package/dist/Select/types/components/BlackTooltip/index.d.ts +0 -2
  428. package/dist/Select/types/components/BubbleBox/BubbleBox.d.ts +0 -17
  429. package/dist/Select/types/components/BubbleBox/index.d.ts +0 -3
  430. package/dist/Select/types/components/BubbleBox/utils.d.ts +0 -1
  431. package/dist/Select/types/components/Button/Button.d.ts +0 -12
  432. package/dist/Select/types/components/Button/index.d.ts +0 -2
  433. package/dist/Select/types/components/Checkbox/Checkbox.d.ts +0 -11
  434. package/dist/Select/types/components/Checkbox/index.d.ts +0 -2
  435. package/dist/Select/types/components/Datepicker/DatePicker.d.ts +0 -20
  436. package/dist/Select/types/components/Datepicker/index.d.ts +0 -2
  437. package/dist/Select/types/components/FlexBox/FlexBox.d.ts +0 -16
  438. package/dist/Select/types/components/FlexBox/index.d.ts +0 -2
  439. package/dist/Select/types/components/FollowUs/FollowUs.d.ts +0 -14
  440. package/dist/Select/types/components/FollowUs/config.d.ts +0 -4
  441. package/dist/Select/types/components/FollowUs/index.d.ts +0 -2
  442. package/dist/Select/types/components/FollowUs/types.d.ts +0 -1
  443. package/dist/Select/types/components/Input/Input.d.ts +0 -15
  444. package/dist/Select/types/components/Input/index.d.ts +0 -2
  445. package/dist/Select/types/components/InputMeta/InputMeta.d.ts +0 -8
  446. package/dist/Select/types/components/InputMeta/index.d.ts +0 -2
  447. package/dist/Select/types/components/LabelText/LabelText.d.ts +0 -8
  448. package/dist/Select/types/components/LabelText/index.d.ts +0 -1
  449. package/dist/Select/types/components/MaskInput/MaskInput.d.ts +0 -11
  450. package/dist/Select/types/components/MaskInput/index.d.ts +0 -2
  451. package/dist/Select/types/components/Menu/Menu.d.ts +0 -11
  452. package/dist/Select/types/components/Menu/index.d.ts +0 -2
  453. package/dist/Select/types/components/MenuButton/MenuButton.d.ts +0 -7
  454. package/dist/Select/types/components/MenuButton/index.d.ts +0 -2
  455. package/dist/Select/types/components/MenuItem/MenuItem.d.ts +0 -7
  456. package/dist/Select/types/components/MenuItem/index.d.ts +0 -2
  457. package/dist/Select/types/components/MobileAppLinks/MobileAppLinks.d.ts +0 -16
  458. package/dist/Select/types/components/MobileAppLinks/config.d.ts +0 -4
  459. package/dist/Select/types/components/MobileAppLinks/index.d.ts +0 -2
  460. package/dist/Select/types/components/MobileAppLinks/types.d.ts +0 -4
  461. package/dist/Select/types/components/Pagination/Pagination.d.ts +0 -16
  462. package/dist/Select/types/components/Pagination/index.d.ts +0 -2
  463. package/dist/Select/types/components/Pagination/utils.d.ts +0 -1
  464. package/dist/Select/types/components/Paragraph/Paragraph.d.ts +0 -11
  465. package/dist/Select/types/components/Paragraph/index.d.ts +0 -2
  466. package/dist/Select/types/components/ProjectsPopover/ProductLink.d.ts +0 -13
  467. package/dist/Select/types/components/ProjectsPopover/ProjectsPopover.d.ts +0 -13
  468. package/dist/Select/types/components/ProjectsPopover/index.d.ts +0 -2
  469. package/dist/Select/types/components/ProjectsPopover/mappers.d.ts +0 -7
  470. package/dist/Select/types/components/ProjectsPopover/types.d.ts +0 -8
  471. package/dist/Select/types/components/ProjectsPopover/utils.d.ts +0 -11
  472. package/dist/Select/types/components/PulseDot/PulseDot.d.ts +0 -22
  473. package/dist/Select/types/components/PulseDot/index.d.ts +0 -2
  474. package/dist/Select/types/components/Select/Label.d.ts +0 -6
  475. package/dist/Select/types/components/Select/Select.d.ts +0 -39
  476. package/dist/Select/types/components/Select/SelectCreatable.d.ts +0 -13
  477. package/dist/Select/types/components/Select/customComponents.d.ts +0 -10
  478. package/dist/Select/types/components/Select/defaultProps.d.ts +0 -6
  479. package/dist/Select/types/components/Select/index.d.ts +0 -5
  480. package/dist/Select/types/components/Select/types.d.ts +0 -9
  481. package/dist/Select/types/components/Select/utils.d.ts +0 -2
  482. package/dist/Select/types/components/Snackbar/ActionButton.d.ts +0 -6
  483. package/dist/Select/types/components/Snackbar/Snackbar.d.ts +0 -15
  484. package/dist/Select/types/components/Snackbar/WithAction.d.ts +0 -3
  485. package/dist/Select/types/components/Snackbar/index.d.ts +0 -2
  486. package/dist/Select/types/components/Spinner/Spinner.d.ts +0 -18
  487. package/dist/Select/types/components/Spinner/index.d.ts +0 -2
  488. package/dist/Select/types/components/SplashLogo/SplashLogo.d.ts +0 -12
  489. package/dist/Select/types/components/SplashLogo/dataUrls.d.ts +0 -6
  490. package/dist/Select/types/components/SplashLogo/index.d.ts +0 -2
  491. package/dist/Select/types/components/SvgBorder/SvgBorder.d.ts +0 -18
  492. package/dist/Select/types/components/SvgBorder/index.d.ts +0 -3
  493. package/dist/Select/types/components/SvgBorder/utils.d.ts +0 -1
  494. package/dist/Select/types/components/Switch/Switch.d.ts +0 -14
  495. package/dist/Select/types/components/Switch/index.d.ts +0 -2
  496. package/dist/Select/types/components/Tabs/Tabs.d.ts +0 -19
  497. package/dist/Select/types/components/Tabs/index.d.ts +0 -2
  498. package/dist/Select/types/components/Text/Text.d.ts +0 -14
  499. package/dist/Select/types/components/Text/index.d.ts +0 -2
  500. package/dist/Select/types/components/TextAreaInput/TextAreaInput.d.ts +0 -12
  501. package/dist/Select/types/components/TextAreaInput/index.d.ts +0 -2
  502. package/dist/Select/types/components/TextInput/TextInput.d.ts +0 -10
  503. package/dist/Select/types/components/TextInput/index.d.ts +0 -2
  504. package/dist/Select/types/components/Title/Title.d.ts +0 -11
  505. package/dist/Select/types/components/Title/index.d.ts +0 -2
  506. package/dist/Select/types/components/index.d.ts +0 -46
  507. package/dist/Select/types/components/types.d.ts +0 -37
  508. package/dist/Select/types/hooks/useClientRect.d.ts +0 -5
  509. package/dist/Select/types/index.d.ts +0 -2
  510. package/dist/Select/types/utils/react.d.ts +0 -6
  511. package/dist/SelectCreatable/index.cjs.js +0 -7890
  512. package/dist/SelectCreatable/index.cjs.js.map +0 -1
  513. package/dist/SelectCreatable/index.d.ts +0 -42
  514. package/dist/SelectCreatable/index.js +0 -7870
  515. package/dist/SelectCreatable/index.js.map +0 -1
  516. package/dist/SelectCreatable/types/components/Alert/Alert.d.ts +0 -20
  517. package/dist/SelectCreatable/types/components/Alert/index.d.ts +0 -2
  518. package/dist/SelectCreatable/types/components/BlackTooltip/BlackTooltip.d.ts +0 -5
  519. package/dist/SelectCreatable/types/components/BlackTooltip/index.d.ts +0 -2
  520. package/dist/SelectCreatable/types/components/BubbleBox/BubbleBox.d.ts +0 -17
  521. package/dist/SelectCreatable/types/components/BubbleBox/index.d.ts +0 -3
  522. package/dist/SelectCreatable/types/components/BubbleBox/utils.d.ts +0 -1
  523. package/dist/SelectCreatable/types/components/Button/Button.d.ts +0 -12
  524. package/dist/SelectCreatable/types/components/Button/index.d.ts +0 -2
  525. package/dist/SelectCreatable/types/components/Checkbox/Checkbox.d.ts +0 -11
  526. package/dist/SelectCreatable/types/components/Checkbox/index.d.ts +0 -2
  527. package/dist/SelectCreatable/types/components/Datepicker/DatePicker.d.ts +0 -20
  528. package/dist/SelectCreatable/types/components/Datepicker/index.d.ts +0 -2
  529. package/dist/SelectCreatable/types/components/FlexBox/FlexBox.d.ts +0 -16
  530. package/dist/SelectCreatable/types/components/FlexBox/index.d.ts +0 -2
  531. package/dist/SelectCreatable/types/components/FollowUs/FollowUs.d.ts +0 -14
  532. package/dist/SelectCreatable/types/components/FollowUs/config.d.ts +0 -4
  533. package/dist/SelectCreatable/types/components/FollowUs/index.d.ts +0 -2
  534. package/dist/SelectCreatable/types/components/FollowUs/types.d.ts +0 -1
  535. package/dist/SelectCreatable/types/components/Input/Input.d.ts +0 -15
  536. package/dist/SelectCreatable/types/components/Input/index.d.ts +0 -2
  537. package/dist/SelectCreatable/types/components/InputMeta/InputMeta.d.ts +0 -8
  538. package/dist/SelectCreatable/types/components/InputMeta/index.d.ts +0 -2
  539. package/dist/SelectCreatable/types/components/LabelText/LabelText.d.ts +0 -8
  540. package/dist/SelectCreatable/types/components/LabelText/index.d.ts +0 -1
  541. package/dist/SelectCreatable/types/components/MaskInput/MaskInput.d.ts +0 -11
  542. package/dist/SelectCreatable/types/components/MaskInput/index.d.ts +0 -2
  543. package/dist/SelectCreatable/types/components/Menu/Menu.d.ts +0 -11
  544. package/dist/SelectCreatable/types/components/Menu/index.d.ts +0 -2
  545. package/dist/SelectCreatable/types/components/MenuButton/MenuButton.d.ts +0 -7
  546. package/dist/SelectCreatable/types/components/MenuButton/index.d.ts +0 -2
  547. package/dist/SelectCreatable/types/components/MenuItem/MenuItem.d.ts +0 -7
  548. package/dist/SelectCreatable/types/components/MenuItem/index.d.ts +0 -2
  549. package/dist/SelectCreatable/types/components/MobileAppLinks/MobileAppLinks.d.ts +0 -16
  550. package/dist/SelectCreatable/types/components/MobileAppLinks/config.d.ts +0 -4
  551. package/dist/SelectCreatable/types/components/MobileAppLinks/index.d.ts +0 -2
  552. package/dist/SelectCreatable/types/components/MobileAppLinks/types.d.ts +0 -4
  553. package/dist/SelectCreatable/types/components/Pagination/Pagination.d.ts +0 -16
  554. package/dist/SelectCreatable/types/components/Pagination/index.d.ts +0 -2
  555. package/dist/SelectCreatable/types/components/Pagination/utils.d.ts +0 -1
  556. package/dist/SelectCreatable/types/components/Paragraph/Paragraph.d.ts +0 -11
  557. package/dist/SelectCreatable/types/components/Paragraph/index.d.ts +0 -2
  558. package/dist/SelectCreatable/types/components/ProjectsPopover/ProductLink.d.ts +0 -13
  559. package/dist/SelectCreatable/types/components/ProjectsPopover/ProjectsPopover.d.ts +0 -13
  560. package/dist/SelectCreatable/types/components/ProjectsPopover/index.d.ts +0 -2
  561. package/dist/SelectCreatable/types/components/ProjectsPopover/mappers.d.ts +0 -7
  562. package/dist/SelectCreatable/types/components/ProjectsPopover/types.d.ts +0 -8
  563. package/dist/SelectCreatable/types/components/ProjectsPopover/utils.d.ts +0 -11
  564. package/dist/SelectCreatable/types/components/PulseDot/PulseDot.d.ts +0 -22
  565. package/dist/SelectCreatable/types/components/PulseDot/index.d.ts +0 -2
  566. package/dist/SelectCreatable/types/components/Select/Label.d.ts +0 -6
  567. package/dist/SelectCreatable/types/components/Select/Select.d.ts +0 -39
  568. package/dist/SelectCreatable/types/components/Select/SelectCreatable.d.ts +0 -13
  569. package/dist/SelectCreatable/types/components/Select/customComponents.d.ts +0 -10
  570. package/dist/SelectCreatable/types/components/Select/defaultProps.d.ts +0 -6
  571. package/dist/SelectCreatable/types/components/Select/index.d.ts +0 -5
  572. package/dist/SelectCreatable/types/components/Select/types.d.ts +0 -9
  573. package/dist/SelectCreatable/types/components/Select/utils.d.ts +0 -2
  574. package/dist/SelectCreatable/types/components/Snackbar/ActionButton.d.ts +0 -6
  575. package/dist/SelectCreatable/types/components/Snackbar/Snackbar.d.ts +0 -15
  576. package/dist/SelectCreatable/types/components/Snackbar/WithAction.d.ts +0 -3
  577. package/dist/SelectCreatable/types/components/Snackbar/index.d.ts +0 -2
  578. package/dist/SelectCreatable/types/components/Spinner/Spinner.d.ts +0 -18
  579. package/dist/SelectCreatable/types/components/Spinner/index.d.ts +0 -2
  580. package/dist/SelectCreatable/types/components/SplashLogo/SplashLogo.d.ts +0 -12
  581. package/dist/SelectCreatable/types/components/SplashLogo/dataUrls.d.ts +0 -6
  582. package/dist/SelectCreatable/types/components/SplashLogo/index.d.ts +0 -2
  583. package/dist/SelectCreatable/types/components/SvgBorder/SvgBorder.d.ts +0 -18
  584. package/dist/SelectCreatable/types/components/SvgBorder/index.d.ts +0 -3
  585. package/dist/SelectCreatable/types/components/SvgBorder/utils.d.ts +0 -1
  586. package/dist/SelectCreatable/types/components/Switch/Switch.d.ts +0 -14
  587. package/dist/SelectCreatable/types/components/Switch/index.d.ts +0 -2
  588. package/dist/SelectCreatable/types/components/Tabs/Tabs.d.ts +0 -19
  589. package/dist/SelectCreatable/types/components/Tabs/index.d.ts +0 -2
  590. package/dist/SelectCreatable/types/components/Text/Text.d.ts +0 -14
  591. package/dist/SelectCreatable/types/components/Text/index.d.ts +0 -2
  592. package/dist/SelectCreatable/types/components/TextAreaInput/TextAreaInput.d.ts +0 -12
  593. package/dist/SelectCreatable/types/components/TextAreaInput/index.d.ts +0 -2
  594. package/dist/SelectCreatable/types/components/TextInput/TextInput.d.ts +0 -10
  595. package/dist/SelectCreatable/types/components/TextInput/index.d.ts +0 -2
  596. package/dist/SelectCreatable/types/components/Title/Title.d.ts +0 -11
  597. package/dist/SelectCreatable/types/components/Title/index.d.ts +0 -2
  598. package/dist/SelectCreatable/types/components/index.d.ts +0 -46
  599. package/dist/SelectCreatable/types/components/types.d.ts +0 -37
  600. package/dist/SelectCreatable/types/hooks/useClientRect.d.ts +0 -5
  601. package/dist/SelectCreatable/types/index.d.ts +0 -2
  602. package/dist/SelectCreatable/types/utils/react.d.ts +0 -6
  603. package/dist/Snackbar/index.cjs.js +0 -13109
  604. package/dist/Snackbar/index.cjs.js.map +0 -1
  605. package/dist/Snackbar/index.js +0 -13086
  606. package/dist/Snackbar/index.js.map +0 -1
  607. package/dist/Snackbar/types/components/Alert/Alert.d.ts +0 -20
  608. package/dist/Snackbar/types/components/Alert/index.d.ts +0 -2
  609. package/dist/Snackbar/types/components/BlackTooltip/BlackTooltip.d.ts +0 -5
  610. package/dist/Snackbar/types/components/BlackTooltip/index.d.ts +0 -2
  611. package/dist/Snackbar/types/components/BubbleBox/BubbleBox.d.ts +0 -17
  612. package/dist/Snackbar/types/components/BubbleBox/index.d.ts +0 -3
  613. package/dist/Snackbar/types/components/BubbleBox/utils.d.ts +0 -1
  614. package/dist/Snackbar/types/components/Button/Button.d.ts +0 -12
  615. package/dist/Snackbar/types/components/Button/index.d.ts +0 -2
  616. package/dist/Snackbar/types/components/Checkbox/Checkbox.d.ts +0 -11
  617. package/dist/Snackbar/types/components/Checkbox/index.d.ts +0 -2
  618. package/dist/Snackbar/types/components/Datepicker/DatePicker.d.ts +0 -20
  619. package/dist/Snackbar/types/components/Datepicker/index.d.ts +0 -2
  620. package/dist/Snackbar/types/components/FlexBox/FlexBox.d.ts +0 -16
  621. package/dist/Snackbar/types/components/FlexBox/index.d.ts +0 -2
  622. package/dist/Snackbar/types/components/FollowUs/FollowUs.d.ts +0 -14
  623. package/dist/Snackbar/types/components/FollowUs/config.d.ts +0 -4
  624. package/dist/Snackbar/types/components/FollowUs/index.d.ts +0 -2
  625. package/dist/Snackbar/types/components/FollowUs/types.d.ts +0 -1
  626. package/dist/Snackbar/types/components/Input/Input.d.ts +0 -15
  627. package/dist/Snackbar/types/components/Input/index.d.ts +0 -2
  628. package/dist/Snackbar/types/components/InputMeta/InputMeta.d.ts +0 -8
  629. package/dist/Snackbar/types/components/InputMeta/index.d.ts +0 -2
  630. package/dist/Snackbar/types/components/LabelText/LabelText.d.ts +0 -8
  631. package/dist/Snackbar/types/components/LabelText/index.d.ts +0 -1
  632. package/dist/Snackbar/types/components/MaskInput/MaskInput.d.ts +0 -11
  633. package/dist/Snackbar/types/components/MaskInput/index.d.ts +0 -2
  634. package/dist/Snackbar/types/components/Menu/Menu.d.ts +0 -11
  635. package/dist/Snackbar/types/components/Menu/index.d.ts +0 -2
  636. package/dist/Snackbar/types/components/MenuButton/MenuButton.d.ts +0 -7
  637. package/dist/Snackbar/types/components/MenuButton/index.d.ts +0 -2
  638. package/dist/Snackbar/types/components/MenuItem/MenuItem.d.ts +0 -7
  639. package/dist/Snackbar/types/components/MenuItem/index.d.ts +0 -2
  640. package/dist/Snackbar/types/components/MobileAppLinks/MobileAppLinks.d.ts +0 -16
  641. package/dist/Snackbar/types/components/MobileAppLinks/config.d.ts +0 -4
  642. package/dist/Snackbar/types/components/MobileAppLinks/index.d.ts +0 -2
  643. package/dist/Snackbar/types/components/MobileAppLinks/types.d.ts +0 -4
  644. package/dist/Snackbar/types/components/Pagination/Pagination.d.ts +0 -16
  645. package/dist/Snackbar/types/components/Pagination/index.d.ts +0 -2
  646. package/dist/Snackbar/types/components/Pagination/utils.d.ts +0 -1
  647. package/dist/Snackbar/types/components/Paragraph/Paragraph.d.ts +0 -11
  648. package/dist/Snackbar/types/components/Paragraph/index.d.ts +0 -2
  649. package/dist/Snackbar/types/components/ProjectsPopover/ProductLink.d.ts +0 -13
  650. package/dist/Snackbar/types/components/ProjectsPopover/ProjectsPopover.d.ts +0 -13
  651. package/dist/Snackbar/types/components/ProjectsPopover/index.d.ts +0 -2
  652. package/dist/Snackbar/types/components/ProjectsPopover/mappers.d.ts +0 -7
  653. package/dist/Snackbar/types/components/ProjectsPopover/types.d.ts +0 -8
  654. package/dist/Snackbar/types/components/ProjectsPopover/utils.d.ts +0 -11
  655. package/dist/Snackbar/types/components/PulseDot/PulseDot.d.ts +0 -22
  656. package/dist/Snackbar/types/components/PulseDot/index.d.ts +0 -2
  657. package/dist/Snackbar/types/components/Select/Label.d.ts +0 -6
  658. package/dist/Snackbar/types/components/Select/Select.d.ts +0 -39
  659. package/dist/Snackbar/types/components/Select/SelectCreatable.d.ts +0 -13
  660. package/dist/Snackbar/types/components/Select/customComponents.d.ts +0 -10
  661. package/dist/Snackbar/types/components/Select/defaultProps.d.ts +0 -6
  662. package/dist/Snackbar/types/components/Select/index.d.ts +0 -5
  663. package/dist/Snackbar/types/components/Select/types.d.ts +0 -9
  664. package/dist/Snackbar/types/components/Select/utils.d.ts +0 -2
  665. package/dist/Snackbar/types/components/Snackbar/ActionButton.d.ts +0 -6
  666. package/dist/Snackbar/types/components/Snackbar/Snackbar.d.ts +0 -15
  667. package/dist/Snackbar/types/components/Snackbar/WithAction.d.ts +0 -3
  668. package/dist/Snackbar/types/components/Snackbar/index.d.ts +0 -2
  669. package/dist/Snackbar/types/components/Spinner/Spinner.d.ts +0 -18
  670. package/dist/Snackbar/types/components/Spinner/index.d.ts +0 -2
  671. package/dist/Snackbar/types/components/SplashLogo/SplashLogo.d.ts +0 -12
  672. package/dist/Snackbar/types/components/SplashLogo/dataUrls.d.ts +0 -6
  673. package/dist/Snackbar/types/components/SplashLogo/index.d.ts +0 -2
  674. package/dist/Snackbar/types/components/SvgBorder/SvgBorder.d.ts +0 -18
  675. package/dist/Snackbar/types/components/SvgBorder/index.d.ts +0 -3
  676. package/dist/Snackbar/types/components/SvgBorder/utils.d.ts +0 -1
  677. package/dist/Snackbar/types/components/Switch/Switch.d.ts +0 -14
  678. package/dist/Snackbar/types/components/Switch/index.d.ts +0 -2
  679. package/dist/Snackbar/types/components/Tabs/Tabs.d.ts +0 -19
  680. package/dist/Snackbar/types/components/Tabs/index.d.ts +0 -2
  681. package/dist/Snackbar/types/components/Text/Text.d.ts +0 -14
  682. package/dist/Snackbar/types/components/Text/index.d.ts +0 -2
  683. package/dist/Snackbar/types/components/TextAreaInput/TextAreaInput.d.ts +0 -12
  684. package/dist/Snackbar/types/components/TextAreaInput/index.d.ts +0 -2
  685. package/dist/Snackbar/types/components/TextInput/TextInput.d.ts +0 -10
  686. package/dist/Snackbar/types/components/TextInput/index.d.ts +0 -2
  687. package/dist/Snackbar/types/components/Title/Title.d.ts +0 -11
  688. package/dist/Snackbar/types/components/Title/index.d.ts +0 -2
  689. package/dist/Snackbar/types/components/index.d.ts +0 -46
  690. package/dist/Snackbar/types/components/types.d.ts +0 -37
  691. package/dist/Snackbar/types/hooks/useClientRect.d.ts +0 -5
  692. package/dist/Snackbar/types/index.d.ts +0 -2
  693. package/dist/Snackbar/types/utils/react.d.ts +0 -6
  694. package/dist/css/Alert.global.css +0 -79
  695. package/dist/css/BubbleBox.global.css +0 -47
  696. package/dist/css/Button.global.css +0 -198
  697. package/dist/css/Checkbox.global.css +0 -76
  698. package/dist/css/DatePicker.global.css +0 -654
  699. package/dist/css/FollowUs.global.css +0 -25
  700. package/dist/css/Input.global.css +0 -98
  701. package/dist/css/InputMeta.global.css +0 -25
  702. package/dist/css/LabelText.global.css +0 -76
  703. package/dist/css/MaskInput.global.css +0 -12
  704. package/dist/css/Menu.global.css +0 -117
  705. package/dist/css/MenuButton.global.css +0 -18
  706. package/dist/css/MenuItem.global.css +0 -30
  707. package/dist/css/MobileAppLinks.global.css +0 -22
  708. package/dist/css/Pagination.global.css +0 -51
  709. package/dist/css/Paragraph.global.css +0 -17
  710. package/dist/css/ProjectsPopover.global.css +0 -111
  711. package/dist/css/Select.global.css +0 -209
  712. package/dist/css/Snackbar.global.css +0 -31
  713. package/dist/css/Spinner.global.css +0 -47
  714. package/dist/css/SplashLogo.global.css +0 -29
  715. package/dist/css/SvgBorder.global.css +0 -32
  716. package/dist/css/Switch.global.css +0 -81
  717. package/dist/css/Tabs.global.css +0 -122
  718. package/dist/css/Text.global.css +0 -77
  719. package/dist/css/TextAreaInput.global.css +0 -39
  720. package/dist/css/TextInput.global.css +0 -22
  721. package/dist/css/Title.global.css +0 -48
  722. package/dist/types/components/Alert/Alert.d.ts +0 -20
  723. package/dist/types/components/Alert/index.d.ts +0 -2
  724. package/dist/types/components/BlackTooltip/BlackTooltip.d.ts +0 -5
  725. package/dist/types/components/BlackTooltip/index.d.ts +0 -2
  726. package/dist/types/components/BubbleBox/BubbleBox.d.ts +0 -17
  727. package/dist/types/components/BubbleBox/index.d.ts +0 -3
  728. package/dist/types/components/BubbleBox/utils.d.ts +0 -1
  729. package/dist/types/components/Button/Button.d.ts +0 -12
  730. package/dist/types/components/Button/index.d.ts +0 -2
  731. package/dist/types/components/Checkbox/Checkbox.d.ts +0 -11
  732. package/dist/types/components/Checkbox/index.d.ts +0 -2
  733. package/dist/types/components/Datepicker/DatePicker.d.ts +0 -20
  734. package/dist/types/components/Datepicker/index.d.ts +0 -2
  735. package/dist/types/components/FlexBox/FlexBox.d.ts +0 -16
  736. package/dist/types/components/FlexBox/index.d.ts +0 -2
  737. package/dist/types/components/FollowUs/FollowUs.d.ts +0 -14
  738. package/dist/types/components/FollowUs/config.d.ts +0 -4
  739. package/dist/types/components/FollowUs/index.d.ts +0 -2
  740. package/dist/types/components/FollowUs/types.d.ts +0 -1
  741. package/dist/types/components/Input/Input.d.ts +0 -15
  742. package/dist/types/components/Input/index.d.ts +0 -2
  743. package/dist/types/components/InputMeta/InputMeta.d.ts +0 -8
  744. package/dist/types/components/InputMeta/index.d.ts +0 -2
  745. package/dist/types/components/LabelText/LabelText.d.ts +0 -8
  746. package/dist/types/components/LabelText/index.d.ts +0 -1
  747. package/dist/types/components/MaskInput/MaskInput.d.ts +0 -11
  748. package/dist/types/components/MaskInput/index.d.ts +0 -2
  749. package/dist/types/components/Menu/Menu.d.ts +0 -11
  750. package/dist/types/components/Menu/index.d.ts +0 -2
  751. package/dist/types/components/MenuButton/MenuButton.d.ts +0 -7
  752. package/dist/types/components/MenuButton/index.d.ts +0 -2
  753. package/dist/types/components/MenuItem/MenuItem.d.ts +0 -7
  754. package/dist/types/components/MenuItem/index.d.ts +0 -2
  755. package/dist/types/components/MobileAppLinks/MobileAppLinks.d.ts +0 -16
  756. package/dist/types/components/MobileAppLinks/config.d.ts +0 -4
  757. package/dist/types/components/MobileAppLinks/index.d.ts +0 -2
  758. package/dist/types/components/MobileAppLinks/types.d.ts +0 -4
  759. package/dist/types/components/Pagination/Pagination.d.ts +0 -16
  760. package/dist/types/components/Pagination/index.d.ts +0 -2
  761. package/dist/types/components/Pagination/utils.d.ts +0 -1
  762. package/dist/types/components/Paragraph/Paragraph.d.ts +0 -11
  763. package/dist/types/components/Paragraph/index.d.ts +0 -2
  764. package/dist/types/components/ProjectsPopover/ProductLink.d.ts +0 -13
  765. package/dist/types/components/ProjectsPopover/ProjectsPopover.d.ts +0 -13
  766. package/dist/types/components/ProjectsPopover/index.d.ts +0 -2
  767. package/dist/types/components/ProjectsPopover/mappers.d.ts +0 -7
  768. package/dist/types/components/ProjectsPopover/types.d.ts +0 -8
  769. package/dist/types/components/ProjectsPopover/utils.d.ts +0 -11
  770. package/dist/types/components/PulseDot/PulseDot.d.ts +0 -22
  771. package/dist/types/components/PulseDot/index.d.ts +0 -2
  772. package/dist/types/components/Select/Label.d.ts +0 -6
  773. package/dist/types/components/Select/Select.d.ts +0 -39
  774. package/dist/types/components/Select/SelectCreatable.d.ts +0 -13
  775. package/dist/types/components/Select/customComponents.d.ts +0 -10
  776. package/dist/types/components/Select/defaultProps.d.ts +0 -6
  777. package/dist/types/components/Select/index.d.ts +0 -5
  778. package/dist/types/components/Select/types.d.ts +0 -9
  779. package/dist/types/components/Select/utils.d.ts +0 -2
  780. package/dist/types/components/Snackbar/ActionButton.d.ts +0 -6
  781. package/dist/types/components/Snackbar/Snackbar.d.ts +0 -15
  782. package/dist/types/components/Snackbar/WithAction.d.ts +0 -3
  783. package/dist/types/components/Snackbar/index.d.ts +0 -2
  784. package/dist/types/components/Spinner/Spinner.d.ts +0 -18
  785. package/dist/types/components/Spinner/index.d.ts +0 -2
  786. package/dist/types/components/SplashLogo/SplashLogo.d.ts +0 -12
  787. package/dist/types/components/SplashLogo/dataUrls.d.ts +0 -6
  788. package/dist/types/components/SplashLogo/index.d.ts +0 -2
  789. package/dist/types/components/SvgBorder/SvgBorder.d.ts +0 -18
  790. package/dist/types/components/SvgBorder/index.d.ts +0 -3
  791. package/dist/types/components/SvgBorder/utils.d.ts +0 -1
  792. package/dist/types/components/Switch/Switch.d.ts +0 -14
  793. package/dist/types/components/Switch/index.d.ts +0 -2
  794. package/dist/types/components/Tabs/Tabs.d.ts +0 -19
  795. package/dist/types/components/Tabs/index.d.ts +0 -2
  796. package/dist/types/components/Text/Text.d.ts +0 -14
  797. package/dist/types/components/Text/index.d.ts +0 -2
  798. package/dist/types/components/TextAreaInput/TextAreaInput.d.ts +0 -12
  799. package/dist/types/components/TextAreaInput/index.d.ts +0 -2
  800. package/dist/types/components/TextInput/TextInput.d.ts +0 -10
  801. package/dist/types/components/TextInput/index.d.ts +0 -2
  802. package/dist/types/components/Title/Title.d.ts +0 -11
  803. package/dist/types/components/Title/index.d.ts +0 -2
  804. package/dist/types/components/index.d.ts +0 -46
  805. package/dist/types/components/types.d.ts +0 -37
  806. package/dist/types/hooks/useClientRect.d.ts +0 -5
  807. package/dist/types/index.d.ts +0 -2
  808. package/dist/types/utils/react.d.ts +0 -6
@@ -1,2970 +0,0 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var jsxRuntime = require('react/jsx-runtime');
5
- var reactDom = require('react-dom');
6
-
7
- /******************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise, SuppressedError, Symbol */
22
-
23
-
24
- var __assign = function() {
25
- __assign = Object.assign || function __assign(t) {
26
- for (var s, i = 1, n = arguments.length; i < n; i++) {
27
- s = arguments[i];
28
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
29
- }
30
- return t;
31
- };
32
- return __assign.apply(this, arguments);
33
- };
34
-
35
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
36
- var e = new Error(message);
37
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
38
- };
39
-
40
- function getDefaultExportFromCjs (x) {
41
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
42
- }
43
-
44
- var classnames = {exports: {}};
45
-
46
- /*!
47
- Copyright (c) 2018 Jed Watson.
48
- Licensed under the MIT License (MIT), see
49
- http://jedwatson.github.io/classnames
50
- */
51
-
52
- (function (module) {
53
- /* global define */
54
-
55
- (function () {
56
-
57
- var hasOwn = {}.hasOwnProperty;
58
-
59
- function classNames () {
60
- var classes = '';
61
-
62
- for (var i = 0; i < arguments.length; i++) {
63
- var arg = arguments[i];
64
- if (arg) {
65
- classes = appendClass(classes, parseValue(arg));
66
- }
67
- }
68
-
69
- return classes;
70
- }
71
-
72
- function parseValue (arg) {
73
- if (typeof arg === 'string' || typeof arg === 'number') {
74
- return arg;
75
- }
76
-
77
- if (typeof arg !== 'object') {
78
- return '';
79
- }
80
-
81
- if (Array.isArray(arg)) {
82
- return classNames.apply(null, arg);
83
- }
84
-
85
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
86
- return arg.toString();
87
- }
88
-
89
- var classes = '';
90
-
91
- for (var key in arg) {
92
- if (hasOwn.call(arg, key) && arg[key]) {
93
- classes = appendClass(classes, key);
94
- }
95
- }
96
-
97
- return classes;
98
- }
99
-
100
- function appendClass (value, newClass) {
101
- if (!newClass) {
102
- return value;
103
- }
104
-
105
- if (value) {
106
- return value + ' ' + newClass;
107
- }
108
-
109
- return value + newClass;
110
- }
111
-
112
- if (module.exports) {
113
- classNames.default = classNames;
114
- module.exports = classNames;
115
- } else {
116
- window.classNames = classNames;
117
- }
118
- }());
119
- } (classnames));
120
-
121
- var classnamesExports = classnames.exports;
122
- var cn = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
123
-
124
- var propTypes = {exports: {}};
125
-
126
- var reactIs = {exports: {}};
127
-
128
- var reactIs_production_min = {};
129
-
130
- /** @license React v16.13.1
131
- * react-is.production.min.js
132
- *
133
- * Copyright (c) Facebook, Inc. and its affiliates.
134
- *
135
- * This source code is licensed under the MIT license found in the
136
- * LICENSE file in the root directory of this source tree.
137
- */
138
-
139
- var hasRequiredReactIs_production_min;
140
-
141
- function requireReactIs_production_min () {
142
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
143
- hasRequiredReactIs_production_min = 1;
144
- var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
145
- Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
146
- function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
147
- reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
148
- reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
149
- reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
150
- return reactIs_production_min;
151
- }
152
-
153
- var reactIs_development = {};
154
-
155
- /** @license React v16.13.1
156
- * react-is.development.js
157
- *
158
- * Copyright (c) Facebook, Inc. and its affiliates.
159
- *
160
- * This source code is licensed under the MIT license found in the
161
- * LICENSE file in the root directory of this source tree.
162
- */
163
-
164
- var hasRequiredReactIs_development;
165
-
166
- function requireReactIs_development () {
167
- if (hasRequiredReactIs_development) return reactIs_development;
168
- hasRequiredReactIs_development = 1;
169
-
170
-
171
-
172
- if (process.env.NODE_ENV !== "production") {
173
- (function() {
174
-
175
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
176
- // nor polyfill, then a plain number is used for performance.
177
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
178
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
179
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
180
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
181
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
182
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
183
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
184
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
185
- // (unstable) APIs that have been removed. Can we remove the symbols?
186
-
187
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
188
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
189
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
190
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
191
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
192
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
193
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
194
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
195
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
196
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
197
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
198
-
199
- function isValidElementType(type) {
200
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
201
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
202
- }
203
-
204
- function typeOf(object) {
205
- if (typeof object === 'object' && object !== null) {
206
- var $$typeof = object.$$typeof;
207
-
208
- switch ($$typeof) {
209
- case REACT_ELEMENT_TYPE:
210
- var type = object.type;
211
-
212
- switch (type) {
213
- case REACT_ASYNC_MODE_TYPE:
214
- case REACT_CONCURRENT_MODE_TYPE:
215
- case REACT_FRAGMENT_TYPE:
216
- case REACT_PROFILER_TYPE:
217
- case REACT_STRICT_MODE_TYPE:
218
- case REACT_SUSPENSE_TYPE:
219
- return type;
220
-
221
- default:
222
- var $$typeofType = type && type.$$typeof;
223
-
224
- switch ($$typeofType) {
225
- case REACT_CONTEXT_TYPE:
226
- case REACT_FORWARD_REF_TYPE:
227
- case REACT_LAZY_TYPE:
228
- case REACT_MEMO_TYPE:
229
- case REACT_PROVIDER_TYPE:
230
- return $$typeofType;
231
-
232
- default:
233
- return $$typeof;
234
- }
235
-
236
- }
237
-
238
- case REACT_PORTAL_TYPE:
239
- return $$typeof;
240
- }
241
- }
242
-
243
- return undefined;
244
- } // AsyncMode is deprecated along with isAsyncMode
245
-
246
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
247
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
248
- var ContextConsumer = REACT_CONTEXT_TYPE;
249
- var ContextProvider = REACT_PROVIDER_TYPE;
250
- var Element = REACT_ELEMENT_TYPE;
251
- var ForwardRef = REACT_FORWARD_REF_TYPE;
252
- var Fragment = REACT_FRAGMENT_TYPE;
253
- var Lazy = REACT_LAZY_TYPE;
254
- var Memo = REACT_MEMO_TYPE;
255
- var Portal = REACT_PORTAL_TYPE;
256
- var Profiler = REACT_PROFILER_TYPE;
257
- var StrictMode = REACT_STRICT_MODE_TYPE;
258
- var Suspense = REACT_SUSPENSE_TYPE;
259
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
260
-
261
- function isAsyncMode(object) {
262
- {
263
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
264
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
265
-
266
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
267
- }
268
- }
269
-
270
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
271
- }
272
- function isConcurrentMode(object) {
273
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
274
- }
275
- function isContextConsumer(object) {
276
- return typeOf(object) === REACT_CONTEXT_TYPE;
277
- }
278
- function isContextProvider(object) {
279
- return typeOf(object) === REACT_PROVIDER_TYPE;
280
- }
281
- function isElement(object) {
282
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
283
- }
284
- function isForwardRef(object) {
285
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
286
- }
287
- function isFragment(object) {
288
- return typeOf(object) === REACT_FRAGMENT_TYPE;
289
- }
290
- function isLazy(object) {
291
- return typeOf(object) === REACT_LAZY_TYPE;
292
- }
293
- function isMemo(object) {
294
- return typeOf(object) === REACT_MEMO_TYPE;
295
- }
296
- function isPortal(object) {
297
- return typeOf(object) === REACT_PORTAL_TYPE;
298
- }
299
- function isProfiler(object) {
300
- return typeOf(object) === REACT_PROFILER_TYPE;
301
- }
302
- function isStrictMode(object) {
303
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
304
- }
305
- function isSuspense(object) {
306
- return typeOf(object) === REACT_SUSPENSE_TYPE;
307
- }
308
-
309
- reactIs_development.AsyncMode = AsyncMode;
310
- reactIs_development.ConcurrentMode = ConcurrentMode;
311
- reactIs_development.ContextConsumer = ContextConsumer;
312
- reactIs_development.ContextProvider = ContextProvider;
313
- reactIs_development.Element = Element;
314
- reactIs_development.ForwardRef = ForwardRef;
315
- reactIs_development.Fragment = Fragment;
316
- reactIs_development.Lazy = Lazy;
317
- reactIs_development.Memo = Memo;
318
- reactIs_development.Portal = Portal;
319
- reactIs_development.Profiler = Profiler;
320
- reactIs_development.StrictMode = StrictMode;
321
- reactIs_development.Suspense = Suspense;
322
- reactIs_development.isAsyncMode = isAsyncMode;
323
- reactIs_development.isConcurrentMode = isConcurrentMode;
324
- reactIs_development.isContextConsumer = isContextConsumer;
325
- reactIs_development.isContextProvider = isContextProvider;
326
- reactIs_development.isElement = isElement;
327
- reactIs_development.isForwardRef = isForwardRef;
328
- reactIs_development.isFragment = isFragment;
329
- reactIs_development.isLazy = isLazy;
330
- reactIs_development.isMemo = isMemo;
331
- reactIs_development.isPortal = isPortal;
332
- reactIs_development.isProfiler = isProfiler;
333
- reactIs_development.isStrictMode = isStrictMode;
334
- reactIs_development.isSuspense = isSuspense;
335
- reactIs_development.isValidElementType = isValidElementType;
336
- reactIs_development.typeOf = typeOf;
337
- })();
338
- }
339
- return reactIs_development;
340
- }
341
-
342
- var hasRequiredReactIs;
343
-
344
- function requireReactIs () {
345
- if (hasRequiredReactIs) return reactIs.exports;
346
- hasRequiredReactIs = 1;
347
-
348
- if (process.env.NODE_ENV === 'production') {
349
- reactIs.exports = requireReactIs_production_min();
350
- } else {
351
- reactIs.exports = requireReactIs_development();
352
- }
353
- return reactIs.exports;
354
- }
355
-
356
- /*
357
- object-assign
358
- (c) Sindre Sorhus
359
- @license MIT
360
- */
361
-
362
- var objectAssign;
363
- var hasRequiredObjectAssign;
364
-
365
- function requireObjectAssign () {
366
- if (hasRequiredObjectAssign) return objectAssign;
367
- hasRequiredObjectAssign = 1;
368
- /* eslint-disable no-unused-vars */
369
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
370
- var hasOwnProperty = Object.prototype.hasOwnProperty;
371
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
372
-
373
- function toObject(val) {
374
- if (val === null || val === undefined) {
375
- throw new TypeError('Object.assign cannot be called with null or undefined');
376
- }
377
-
378
- return Object(val);
379
- }
380
-
381
- function shouldUseNative() {
382
- try {
383
- if (!Object.assign) {
384
- return false;
385
- }
386
-
387
- // Detect buggy property enumeration order in older V8 versions.
388
-
389
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
390
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
391
- test1[5] = 'de';
392
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
393
- return false;
394
- }
395
-
396
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
397
- var test2 = {};
398
- for (var i = 0; i < 10; i++) {
399
- test2['_' + String.fromCharCode(i)] = i;
400
- }
401
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
402
- return test2[n];
403
- });
404
- if (order2.join('') !== '0123456789') {
405
- return false;
406
- }
407
-
408
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
409
- var test3 = {};
410
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
411
- test3[letter] = letter;
412
- });
413
- if (Object.keys(Object.assign({}, test3)).join('') !==
414
- 'abcdefghijklmnopqrst') {
415
- return false;
416
- }
417
-
418
- return true;
419
- } catch (err) {
420
- // We don't expect any of the above to throw, but better to be safe.
421
- return false;
422
- }
423
- }
424
-
425
- objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
426
- var from;
427
- var to = toObject(target);
428
- var symbols;
429
-
430
- for (var s = 1; s < arguments.length; s++) {
431
- from = Object(arguments[s]);
432
-
433
- for (var key in from) {
434
- if (hasOwnProperty.call(from, key)) {
435
- to[key] = from[key];
436
- }
437
- }
438
-
439
- if (getOwnPropertySymbols) {
440
- symbols = getOwnPropertySymbols(from);
441
- for (var i = 0; i < symbols.length; i++) {
442
- if (propIsEnumerable.call(from, symbols[i])) {
443
- to[symbols[i]] = from[symbols[i]];
444
- }
445
- }
446
- }
447
- }
448
-
449
- return to;
450
- };
451
- return objectAssign;
452
- }
453
-
454
- /**
455
- * Copyright (c) 2013-present, Facebook, Inc.
456
- *
457
- * This source code is licensed under the MIT license found in the
458
- * LICENSE file in the root directory of this source tree.
459
- */
460
-
461
- var ReactPropTypesSecret_1;
462
- var hasRequiredReactPropTypesSecret;
463
-
464
- function requireReactPropTypesSecret () {
465
- if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
466
- hasRequiredReactPropTypesSecret = 1;
467
-
468
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
469
-
470
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
471
- return ReactPropTypesSecret_1;
472
- }
473
-
474
- var has;
475
- var hasRequiredHas;
476
-
477
- function requireHas () {
478
- if (hasRequiredHas) return has;
479
- hasRequiredHas = 1;
480
- has = Function.call.bind(Object.prototype.hasOwnProperty);
481
- return has;
482
- }
483
-
484
- /**
485
- * Copyright (c) 2013-present, Facebook, Inc.
486
- *
487
- * This source code is licensed under the MIT license found in the
488
- * LICENSE file in the root directory of this source tree.
489
- */
490
-
491
- var checkPropTypes_1;
492
- var hasRequiredCheckPropTypes;
493
-
494
- function requireCheckPropTypes () {
495
- if (hasRequiredCheckPropTypes) return checkPropTypes_1;
496
- hasRequiredCheckPropTypes = 1;
497
-
498
- var printWarning = function() {};
499
-
500
- if (process.env.NODE_ENV !== 'production') {
501
- var ReactPropTypesSecret = requireReactPropTypesSecret();
502
- var loggedTypeFailures = {};
503
- var has = requireHas();
504
-
505
- printWarning = function(text) {
506
- var message = 'Warning: ' + text;
507
- if (typeof console !== 'undefined') {
508
- console.error(message);
509
- }
510
- try {
511
- // --- Welcome to debugging React ---
512
- // This error was thrown as a convenience so that you can use this stack
513
- // to find the callsite that caused this warning to fire.
514
- throw new Error(message);
515
- } catch (x) { /**/ }
516
- };
517
- }
518
-
519
- /**
520
- * Assert that the values match with the type specs.
521
- * Error messages are memorized and will only be shown once.
522
- *
523
- * @param {object} typeSpecs Map of name to a ReactPropType
524
- * @param {object} values Runtime values that need to be type-checked
525
- * @param {string} location e.g. "prop", "context", "child context"
526
- * @param {string} componentName Name of the component for error messages.
527
- * @param {?Function} getStack Returns the component stack.
528
- * @private
529
- */
530
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
531
- if (process.env.NODE_ENV !== 'production') {
532
- for (var typeSpecName in typeSpecs) {
533
- if (has(typeSpecs, typeSpecName)) {
534
- var error;
535
- // Prop type validation may throw. In case they do, we don't want to
536
- // fail the render phase where it didn't fail before. So we log it.
537
- // After these have been cleaned up, we'll let them throw.
538
- try {
539
- // This is intentionally an invariant that gets caught. It's the same
540
- // behavior as without this statement except with a better message.
541
- if (typeof typeSpecs[typeSpecName] !== 'function') {
542
- var err = Error(
543
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
544
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
545
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
546
- );
547
- err.name = 'Invariant Violation';
548
- throw err;
549
- }
550
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
551
- } catch (ex) {
552
- error = ex;
553
- }
554
- if (error && !(error instanceof Error)) {
555
- printWarning(
556
- (componentName || 'React class') + ': type specification of ' +
557
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
558
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
559
- 'You may have forgotten to pass an argument to the type checker ' +
560
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
561
- 'shape all require an argument).'
562
- );
563
- }
564
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
565
- // Only monitor this failure once because there tends to be a lot of the
566
- // same error.
567
- loggedTypeFailures[error.message] = true;
568
-
569
- var stack = getStack ? getStack() : '';
570
-
571
- printWarning(
572
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
573
- );
574
- }
575
- }
576
- }
577
- }
578
- }
579
-
580
- /**
581
- * Resets warning cache when testing.
582
- *
583
- * @private
584
- */
585
- checkPropTypes.resetWarningCache = function() {
586
- if (process.env.NODE_ENV !== 'production') {
587
- loggedTypeFailures = {};
588
- }
589
- };
590
-
591
- checkPropTypes_1 = checkPropTypes;
592
- return checkPropTypes_1;
593
- }
594
-
595
- /**
596
- * Copyright (c) 2013-present, Facebook, Inc.
597
- *
598
- * This source code is licensed under the MIT license found in the
599
- * LICENSE file in the root directory of this source tree.
600
- */
601
-
602
- var factoryWithTypeCheckers;
603
- var hasRequiredFactoryWithTypeCheckers;
604
-
605
- function requireFactoryWithTypeCheckers () {
606
- if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
607
- hasRequiredFactoryWithTypeCheckers = 1;
608
-
609
- var ReactIs = requireReactIs();
610
- var assign = requireObjectAssign();
611
-
612
- var ReactPropTypesSecret = requireReactPropTypesSecret();
613
- var has = requireHas();
614
- var checkPropTypes = requireCheckPropTypes();
615
-
616
- var printWarning = function() {};
617
-
618
- if (process.env.NODE_ENV !== 'production') {
619
- printWarning = function(text) {
620
- var message = 'Warning: ' + text;
621
- if (typeof console !== 'undefined') {
622
- console.error(message);
623
- }
624
- try {
625
- // --- Welcome to debugging React ---
626
- // This error was thrown as a convenience so that you can use this stack
627
- // to find the callsite that caused this warning to fire.
628
- throw new Error(message);
629
- } catch (x) {}
630
- };
631
- }
632
-
633
- function emptyFunctionThatReturnsNull() {
634
- return null;
635
- }
636
-
637
- factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
638
- /* global Symbol */
639
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
640
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
641
-
642
- /**
643
- * Returns the iterator method function contained on the iterable object.
644
- *
645
- * Be sure to invoke the function with the iterable as context:
646
- *
647
- * var iteratorFn = getIteratorFn(myIterable);
648
- * if (iteratorFn) {
649
- * var iterator = iteratorFn.call(myIterable);
650
- * ...
651
- * }
652
- *
653
- * @param {?object} maybeIterable
654
- * @return {?function}
655
- */
656
- function getIteratorFn(maybeIterable) {
657
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
658
- if (typeof iteratorFn === 'function') {
659
- return iteratorFn;
660
- }
661
- }
662
-
663
- /**
664
- * Collection of methods that allow declaration and validation of props that are
665
- * supplied to React components. Example usage:
666
- *
667
- * var Props = require('ReactPropTypes');
668
- * var MyArticle = React.createClass({
669
- * propTypes: {
670
- * // An optional string prop named "description".
671
- * description: Props.string,
672
- *
673
- * // A required enum prop named "category".
674
- * category: Props.oneOf(['News','Photos']).isRequired,
675
- *
676
- * // A prop named "dialog" that requires an instance of Dialog.
677
- * dialog: Props.instanceOf(Dialog).isRequired
678
- * },
679
- * render: function() { ... }
680
- * });
681
- *
682
- * A more formal specification of how these methods are used:
683
- *
684
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
685
- * decl := ReactPropTypes.{type}(.isRequired)?
686
- *
687
- * Each and every declaration produces a function with the same signature. This
688
- * allows the creation of custom validation functions. For example:
689
- *
690
- * var MyLink = React.createClass({
691
- * propTypes: {
692
- * // An optional string or URI prop named "href".
693
- * href: function(props, propName, componentName) {
694
- * var propValue = props[propName];
695
- * if (propValue != null && typeof propValue !== 'string' &&
696
- * !(propValue instanceof URI)) {
697
- * return new Error(
698
- * 'Expected a string or an URI for ' + propName + ' in ' +
699
- * componentName
700
- * );
701
- * }
702
- * }
703
- * },
704
- * render: function() {...}
705
- * });
706
- *
707
- * @internal
708
- */
709
-
710
- var ANONYMOUS = '<<anonymous>>';
711
-
712
- // Important!
713
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
714
- var ReactPropTypes = {
715
- array: createPrimitiveTypeChecker('array'),
716
- bigint: createPrimitiveTypeChecker('bigint'),
717
- bool: createPrimitiveTypeChecker('boolean'),
718
- func: createPrimitiveTypeChecker('function'),
719
- number: createPrimitiveTypeChecker('number'),
720
- object: createPrimitiveTypeChecker('object'),
721
- string: createPrimitiveTypeChecker('string'),
722
- symbol: createPrimitiveTypeChecker('symbol'),
723
-
724
- any: createAnyTypeChecker(),
725
- arrayOf: createArrayOfTypeChecker,
726
- element: createElementTypeChecker(),
727
- elementType: createElementTypeTypeChecker(),
728
- instanceOf: createInstanceTypeChecker,
729
- node: createNodeChecker(),
730
- objectOf: createObjectOfTypeChecker,
731
- oneOf: createEnumTypeChecker,
732
- oneOfType: createUnionTypeChecker,
733
- shape: createShapeTypeChecker,
734
- exact: createStrictShapeTypeChecker,
735
- };
736
-
737
- /**
738
- * inlined Object.is polyfill to avoid requiring consumers ship their own
739
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
740
- */
741
- /*eslint-disable no-self-compare*/
742
- function is(x, y) {
743
- // SameValue algorithm
744
- if (x === y) {
745
- // Steps 1-5, 7-10
746
- // Steps 6.b-6.e: +0 != -0
747
- return x !== 0 || 1 / x === 1 / y;
748
- } else {
749
- // Step 6.a: NaN == NaN
750
- return x !== x && y !== y;
751
- }
752
- }
753
- /*eslint-enable no-self-compare*/
754
-
755
- /**
756
- * We use an Error-like object for backward compatibility as people may call
757
- * PropTypes directly and inspect their output. However, we don't use real
758
- * Errors anymore. We don't inspect their stack anyway, and creating them
759
- * is prohibitively expensive if they are created too often, such as what
760
- * happens in oneOfType() for any type before the one that matched.
761
- */
762
- function PropTypeError(message, data) {
763
- this.message = message;
764
- this.data = data && typeof data === 'object' ? data: {};
765
- this.stack = '';
766
- }
767
- // Make `instanceof Error` still work for returned errors.
768
- PropTypeError.prototype = Error.prototype;
769
-
770
- function createChainableTypeChecker(validate) {
771
- if (process.env.NODE_ENV !== 'production') {
772
- var manualPropTypeCallCache = {};
773
- var manualPropTypeWarningCount = 0;
774
- }
775
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
776
- componentName = componentName || ANONYMOUS;
777
- propFullName = propFullName || propName;
778
-
779
- if (secret !== ReactPropTypesSecret) {
780
- if (throwOnDirectAccess) {
781
- // New behavior only for users of `prop-types` package
782
- var err = new Error(
783
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
784
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
785
- 'Read more at http://fb.me/use-check-prop-types'
786
- );
787
- err.name = 'Invariant Violation';
788
- throw err;
789
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
790
- // Old behavior for people using React.PropTypes
791
- var cacheKey = componentName + ':' + propName;
792
- if (
793
- !manualPropTypeCallCache[cacheKey] &&
794
- // Avoid spamming the console because they are often not actionable except for lib authors
795
- manualPropTypeWarningCount < 3
796
- ) {
797
- printWarning(
798
- 'You are manually calling a React.PropTypes validation ' +
799
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
800
- 'and will throw in the standalone `prop-types` package. ' +
801
- 'You may be seeing this warning due to a third-party PropTypes ' +
802
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
803
- );
804
- manualPropTypeCallCache[cacheKey] = true;
805
- manualPropTypeWarningCount++;
806
- }
807
- }
808
- }
809
- if (props[propName] == null) {
810
- if (isRequired) {
811
- if (props[propName] === null) {
812
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
813
- }
814
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
815
- }
816
- return null;
817
- } else {
818
- return validate(props, propName, componentName, location, propFullName);
819
- }
820
- }
821
-
822
- var chainedCheckType = checkType.bind(null, false);
823
- chainedCheckType.isRequired = checkType.bind(null, true);
824
-
825
- return chainedCheckType;
826
- }
827
-
828
- function createPrimitiveTypeChecker(expectedType) {
829
- function validate(props, propName, componentName, location, propFullName, secret) {
830
- var propValue = props[propName];
831
- var propType = getPropType(propValue);
832
- if (propType !== expectedType) {
833
- // `propValue` being instance of, say, date/regexp, pass the 'object'
834
- // check, but we can offer a more precise error message here rather than
835
- // 'of type `object`'.
836
- var preciseType = getPreciseType(propValue);
837
-
838
- return new PropTypeError(
839
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
840
- {expectedType: expectedType}
841
- );
842
- }
843
- return null;
844
- }
845
- return createChainableTypeChecker(validate);
846
- }
847
-
848
- function createAnyTypeChecker() {
849
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
850
- }
851
-
852
- function createArrayOfTypeChecker(typeChecker) {
853
- function validate(props, propName, componentName, location, propFullName) {
854
- if (typeof typeChecker !== 'function') {
855
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
856
- }
857
- var propValue = props[propName];
858
- if (!Array.isArray(propValue)) {
859
- var propType = getPropType(propValue);
860
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
861
- }
862
- for (var i = 0; i < propValue.length; i++) {
863
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
864
- if (error instanceof Error) {
865
- return error;
866
- }
867
- }
868
- return null;
869
- }
870
- return createChainableTypeChecker(validate);
871
- }
872
-
873
- function createElementTypeChecker() {
874
- function validate(props, propName, componentName, location, propFullName) {
875
- var propValue = props[propName];
876
- if (!isValidElement(propValue)) {
877
- var propType = getPropType(propValue);
878
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
879
- }
880
- return null;
881
- }
882
- return createChainableTypeChecker(validate);
883
- }
884
-
885
- function createElementTypeTypeChecker() {
886
- function validate(props, propName, componentName, location, propFullName) {
887
- var propValue = props[propName];
888
- if (!ReactIs.isValidElementType(propValue)) {
889
- var propType = getPropType(propValue);
890
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
891
- }
892
- return null;
893
- }
894
- return createChainableTypeChecker(validate);
895
- }
896
-
897
- function createInstanceTypeChecker(expectedClass) {
898
- function validate(props, propName, componentName, location, propFullName) {
899
- if (!(props[propName] instanceof expectedClass)) {
900
- var expectedClassName = expectedClass.name || ANONYMOUS;
901
- var actualClassName = getClassName(props[propName]);
902
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
903
- }
904
- return null;
905
- }
906
- return createChainableTypeChecker(validate);
907
- }
908
-
909
- function createEnumTypeChecker(expectedValues) {
910
- if (!Array.isArray(expectedValues)) {
911
- if (process.env.NODE_ENV !== 'production') {
912
- if (arguments.length > 1) {
913
- printWarning(
914
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
915
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
916
- );
917
- } else {
918
- printWarning('Invalid argument supplied to oneOf, expected an array.');
919
- }
920
- }
921
- return emptyFunctionThatReturnsNull;
922
- }
923
-
924
- function validate(props, propName, componentName, location, propFullName) {
925
- var propValue = props[propName];
926
- for (var i = 0; i < expectedValues.length; i++) {
927
- if (is(propValue, expectedValues[i])) {
928
- return null;
929
- }
930
- }
931
-
932
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
933
- var type = getPreciseType(value);
934
- if (type === 'symbol') {
935
- return String(value);
936
- }
937
- return value;
938
- });
939
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
940
- }
941
- return createChainableTypeChecker(validate);
942
- }
943
-
944
- function createObjectOfTypeChecker(typeChecker) {
945
- function validate(props, propName, componentName, location, propFullName) {
946
- if (typeof typeChecker !== 'function') {
947
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
948
- }
949
- var propValue = props[propName];
950
- var propType = getPropType(propValue);
951
- if (propType !== 'object') {
952
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
953
- }
954
- for (var key in propValue) {
955
- if (has(propValue, key)) {
956
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
957
- if (error instanceof Error) {
958
- return error;
959
- }
960
- }
961
- }
962
- return null;
963
- }
964
- return createChainableTypeChecker(validate);
965
- }
966
-
967
- function createUnionTypeChecker(arrayOfTypeCheckers) {
968
- if (!Array.isArray(arrayOfTypeCheckers)) {
969
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
970
- return emptyFunctionThatReturnsNull;
971
- }
972
-
973
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
974
- var checker = arrayOfTypeCheckers[i];
975
- if (typeof checker !== 'function') {
976
- printWarning(
977
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
978
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
979
- );
980
- return emptyFunctionThatReturnsNull;
981
- }
982
- }
983
-
984
- function validate(props, propName, componentName, location, propFullName) {
985
- var expectedTypes = [];
986
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
987
- var checker = arrayOfTypeCheckers[i];
988
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
989
- if (checkerResult == null) {
990
- return null;
991
- }
992
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
993
- expectedTypes.push(checkerResult.data.expectedType);
994
- }
995
- }
996
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
997
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
998
- }
999
- return createChainableTypeChecker(validate);
1000
- }
1001
-
1002
- function createNodeChecker() {
1003
- function validate(props, propName, componentName, location, propFullName) {
1004
- if (!isNode(props[propName])) {
1005
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1006
- }
1007
- return null;
1008
- }
1009
- return createChainableTypeChecker(validate);
1010
- }
1011
-
1012
- function invalidValidatorError(componentName, location, propFullName, key, type) {
1013
- return new PropTypeError(
1014
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1015
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1016
- );
1017
- }
1018
-
1019
- function createShapeTypeChecker(shapeTypes) {
1020
- function validate(props, propName, componentName, location, propFullName) {
1021
- var propValue = props[propName];
1022
- var propType = getPropType(propValue);
1023
- if (propType !== 'object') {
1024
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1025
- }
1026
- for (var key in shapeTypes) {
1027
- var checker = shapeTypes[key];
1028
- if (typeof checker !== 'function') {
1029
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1030
- }
1031
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1032
- if (error) {
1033
- return error;
1034
- }
1035
- }
1036
- return null;
1037
- }
1038
- return createChainableTypeChecker(validate);
1039
- }
1040
-
1041
- function createStrictShapeTypeChecker(shapeTypes) {
1042
- function validate(props, propName, componentName, location, propFullName) {
1043
- var propValue = props[propName];
1044
- var propType = getPropType(propValue);
1045
- if (propType !== 'object') {
1046
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1047
- }
1048
- // We need to check all keys in case some are required but missing from props.
1049
- var allKeys = assign({}, props[propName], shapeTypes);
1050
- for (var key in allKeys) {
1051
- var checker = shapeTypes[key];
1052
- if (has(shapeTypes, key) && typeof checker !== 'function') {
1053
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1054
- }
1055
- if (!checker) {
1056
- return new PropTypeError(
1057
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1058
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1059
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1060
- );
1061
- }
1062
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1063
- if (error) {
1064
- return error;
1065
- }
1066
- }
1067
- return null;
1068
- }
1069
-
1070
- return createChainableTypeChecker(validate);
1071
- }
1072
-
1073
- function isNode(propValue) {
1074
- switch (typeof propValue) {
1075
- case 'number':
1076
- case 'string':
1077
- case 'undefined':
1078
- return true;
1079
- case 'boolean':
1080
- return !propValue;
1081
- case 'object':
1082
- if (Array.isArray(propValue)) {
1083
- return propValue.every(isNode);
1084
- }
1085
- if (propValue === null || isValidElement(propValue)) {
1086
- return true;
1087
- }
1088
-
1089
- var iteratorFn = getIteratorFn(propValue);
1090
- if (iteratorFn) {
1091
- var iterator = iteratorFn.call(propValue);
1092
- var step;
1093
- if (iteratorFn !== propValue.entries) {
1094
- while (!(step = iterator.next()).done) {
1095
- if (!isNode(step.value)) {
1096
- return false;
1097
- }
1098
- }
1099
- } else {
1100
- // Iterator will provide entry [k,v] tuples rather than values.
1101
- while (!(step = iterator.next()).done) {
1102
- var entry = step.value;
1103
- if (entry) {
1104
- if (!isNode(entry[1])) {
1105
- return false;
1106
- }
1107
- }
1108
- }
1109
- }
1110
- } else {
1111
- return false;
1112
- }
1113
-
1114
- return true;
1115
- default:
1116
- return false;
1117
- }
1118
- }
1119
-
1120
- function isSymbol(propType, propValue) {
1121
- // Native Symbol.
1122
- if (propType === 'symbol') {
1123
- return true;
1124
- }
1125
-
1126
- // falsy value can't be a Symbol
1127
- if (!propValue) {
1128
- return false;
1129
- }
1130
-
1131
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1132
- if (propValue['@@toStringTag'] === 'Symbol') {
1133
- return true;
1134
- }
1135
-
1136
- // Fallback for non-spec compliant Symbols which are polyfilled.
1137
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1138
- return true;
1139
- }
1140
-
1141
- return false;
1142
- }
1143
-
1144
- // Equivalent of `typeof` but with special handling for array and regexp.
1145
- function getPropType(propValue) {
1146
- var propType = typeof propValue;
1147
- if (Array.isArray(propValue)) {
1148
- return 'array';
1149
- }
1150
- if (propValue instanceof RegExp) {
1151
- // Old webkits (at least until Android 4.0) return 'function' rather than
1152
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1153
- // passes PropTypes.object.
1154
- return 'object';
1155
- }
1156
- if (isSymbol(propType, propValue)) {
1157
- return 'symbol';
1158
- }
1159
- return propType;
1160
- }
1161
-
1162
- // This handles more types than `getPropType`. Only used for error messages.
1163
- // See `createPrimitiveTypeChecker`.
1164
- function getPreciseType(propValue) {
1165
- if (typeof propValue === 'undefined' || propValue === null) {
1166
- return '' + propValue;
1167
- }
1168
- var propType = getPropType(propValue);
1169
- if (propType === 'object') {
1170
- if (propValue instanceof Date) {
1171
- return 'date';
1172
- } else if (propValue instanceof RegExp) {
1173
- return 'regexp';
1174
- }
1175
- }
1176
- return propType;
1177
- }
1178
-
1179
- // Returns a string that is postfixed to a warning about an invalid type.
1180
- // For example, "undefined" or "of type array"
1181
- function getPostfixForTypeWarning(value) {
1182
- var type = getPreciseType(value);
1183
- switch (type) {
1184
- case 'array':
1185
- case 'object':
1186
- return 'an ' + type;
1187
- case 'boolean':
1188
- case 'date':
1189
- case 'regexp':
1190
- return 'a ' + type;
1191
- default:
1192
- return type;
1193
- }
1194
- }
1195
-
1196
- // Returns class name of the object, if any.
1197
- function getClassName(propValue) {
1198
- if (!propValue.constructor || !propValue.constructor.name) {
1199
- return ANONYMOUS;
1200
- }
1201
- return propValue.constructor.name;
1202
- }
1203
-
1204
- ReactPropTypes.checkPropTypes = checkPropTypes;
1205
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1206
- ReactPropTypes.PropTypes = ReactPropTypes;
1207
-
1208
- return ReactPropTypes;
1209
- };
1210
- return factoryWithTypeCheckers;
1211
- }
1212
-
1213
- /**
1214
- * Copyright (c) 2013-present, Facebook, Inc.
1215
- *
1216
- * This source code is licensed under the MIT license found in the
1217
- * LICENSE file in the root directory of this source tree.
1218
- */
1219
-
1220
- var factoryWithThrowingShims;
1221
- var hasRequiredFactoryWithThrowingShims;
1222
-
1223
- function requireFactoryWithThrowingShims () {
1224
- if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
1225
- hasRequiredFactoryWithThrowingShims = 1;
1226
-
1227
- var ReactPropTypesSecret = requireReactPropTypesSecret();
1228
-
1229
- function emptyFunction() {}
1230
- function emptyFunctionWithReset() {}
1231
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
1232
-
1233
- factoryWithThrowingShims = function() {
1234
- function shim(props, propName, componentName, location, propFullName, secret) {
1235
- if (secret === ReactPropTypesSecret) {
1236
- // It is still safe when called from React.
1237
- return;
1238
- }
1239
- var err = new Error(
1240
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1241
- 'Use PropTypes.checkPropTypes() to call them. ' +
1242
- 'Read more at http://fb.me/use-check-prop-types'
1243
- );
1244
- err.name = 'Invariant Violation';
1245
- throw err;
1246
- } shim.isRequired = shim;
1247
- function getShim() {
1248
- return shim;
1249
- } // Important!
1250
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1251
- var ReactPropTypes = {
1252
- array: shim,
1253
- bigint: shim,
1254
- bool: shim,
1255
- func: shim,
1256
- number: shim,
1257
- object: shim,
1258
- string: shim,
1259
- symbol: shim,
1260
-
1261
- any: shim,
1262
- arrayOf: getShim,
1263
- element: shim,
1264
- elementType: shim,
1265
- instanceOf: getShim,
1266
- node: shim,
1267
- objectOf: getShim,
1268
- oneOf: getShim,
1269
- oneOfType: getShim,
1270
- shape: getShim,
1271
- exact: getShim,
1272
-
1273
- checkPropTypes: emptyFunctionWithReset,
1274
- resetWarningCache: emptyFunction
1275
- };
1276
-
1277
- ReactPropTypes.PropTypes = ReactPropTypes;
1278
-
1279
- return ReactPropTypes;
1280
- };
1281
- return factoryWithThrowingShims;
1282
- }
1283
-
1284
- /**
1285
- * Copyright (c) 2013-present, Facebook, Inc.
1286
- *
1287
- * This source code is licensed under the MIT license found in the
1288
- * LICENSE file in the root directory of this source tree.
1289
- */
1290
-
1291
- if (process.env.NODE_ENV !== 'production') {
1292
- var ReactIs = requireReactIs();
1293
-
1294
- // By explicitly using `prop-types` you are opting into new development behavior.
1295
- // http://fb.me/prop-types-in-prod
1296
- var throwOnDirectAccess = true;
1297
- propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1298
- } else {
1299
- // By explicitly using `prop-types` you are opting into new production behavior.
1300
- // http://fb.me/prop-types-in-prod
1301
- propTypes.exports = requireFactoryWithThrowingShims()();
1302
- }
1303
-
1304
- var propTypesExports = propTypes.exports;
1305
-
1306
- const isMenuOpen = state => !!state && state[0] === 'o';
1307
- const batchedUpdates = reactDom.unstable_batchedUpdates || (callback => callback());
1308
- const values = Object.values || (obj => Object.keys(obj).map(key => obj[key]));
1309
- const floatEqual = (a, b, diff = 0.0001) => Math.abs(a - b) < diff;
1310
- const getTransition = (transition, name) => transition === true || !!(transition && transition[name]);
1311
- const safeCall = (fn, arg) => typeof fn === 'function' ? fn(arg) : fn;
1312
- const internalKey = '_szhsinMenu';
1313
- const getName = component => component[internalKey];
1314
- const defineName = (name, component) => Object.defineProperty(component, internalKey, {
1315
- value: name
1316
- });
1317
- const mergeProps = (target, source) => {
1318
- source && Object.keys(source).forEach(key => {
1319
- const targetProp = target[key];
1320
- const sourceProp = source[key];
1321
- if (typeof sourceProp === 'function' && targetProp) {
1322
- target[key] = (...arg) => {
1323
- sourceProp(...arg);
1324
- targetProp(...arg);
1325
- };
1326
- } else {
1327
- target[key] = sourceProp;
1328
- }
1329
- });
1330
- return target;
1331
- };
1332
- const parsePadding = paddingStr => {
1333
- if (typeof paddingStr !== 'string') return {
1334
- top: 0,
1335
- right: 0,
1336
- bottom: 0,
1337
- left: 0
1338
- };
1339
- const padding = paddingStr.trim().split(/\s+/, 4).map(parseFloat);
1340
- const top = !isNaN(padding[0]) ? padding[0] : 0;
1341
- const right = !isNaN(padding[1]) ? padding[1] : top;
1342
- return {
1343
- top,
1344
- right,
1345
- bottom: !isNaN(padding[2]) ? padding[2] : top,
1346
- left: !isNaN(padding[3]) ? padding[3] : right
1347
- };
1348
- };
1349
- const getScrollAncestor = node => {
1350
- while (node) {
1351
- node = node.parentNode;
1352
- if (!node || node === document.body || !node.parentNode) return;
1353
- const {
1354
- overflow,
1355
- overflowX,
1356
- overflowY
1357
- } = getComputedStyle(node);
1358
- if (/auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX)) return node;
1359
- }
1360
- };
1361
- function commonProps(isDisabled, isHovering) {
1362
- return {
1363
- 'aria-disabled': isDisabled || undefined,
1364
- tabIndex: isHovering ? 0 : -1
1365
- };
1366
- }
1367
- function indexOfNode(nodeList, node) {
1368
- for (let i = 0; i < nodeList.length; i++) {
1369
- if (nodeList[i] === node) return i;
1370
- }
1371
- return -1;
1372
- }
1373
-
1374
- const stylePropTypes = name => ({
1375
- [name ? `${name}ClassName` : 'className']: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.func])
1376
- });
1377
- const menuPropTypes = {
1378
- className: propTypesExports.string,
1379
- ...stylePropTypes('menu'),
1380
- arrowProps: propTypesExports.object,
1381
- focusProps: propTypesExports.object,
1382
- menuStyle: propTypesExports.object,
1383
- arrow: propTypesExports.bool,
1384
- setDownOverflow: propTypesExports.bool,
1385
- gap: propTypesExports.number,
1386
- shift: propTypesExports.number,
1387
- align: /*#__PURE__*/propTypesExports.oneOf(['start', 'center', 'end']),
1388
- direction: /*#__PURE__*/propTypesExports.oneOf(['left', 'right', 'top', 'bottom']),
1389
- position: /*#__PURE__*/propTypesExports.oneOf(['auto', 'anchor', 'initial']),
1390
- overflow: /*#__PURE__*/propTypesExports.oneOf(['auto', 'visible', 'hidden'])
1391
- };
1392
- const rootMenuPropTypes = {
1393
- ...menuPropTypes,
1394
- containerProps: propTypesExports.object,
1395
- initialMounted: propTypesExports.bool,
1396
- unmountOnClose: propTypesExports.bool,
1397
- transition: /*#__PURE__*/propTypesExports.oneOfType([propTypesExports.bool, /*#__PURE__*/propTypesExports.exact({
1398
- open: propTypesExports.bool,
1399
- close: propTypesExports.bool,
1400
- item: propTypesExports.bool
1401
- })]),
1402
- transitionTimeout: propTypesExports.number,
1403
- boundingBoxRef: propTypesExports.object,
1404
- boundingBoxPadding: propTypesExports.string,
1405
- reposition: /*#__PURE__*/propTypesExports.oneOf(['auto', 'initial']),
1406
- repositionFlag: /*#__PURE__*/propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
1407
- viewScroll: /*#__PURE__*/propTypesExports.oneOf(['auto', 'close', 'initial']),
1408
- submenuOpenDelay: propTypesExports.number,
1409
- submenuCloseDelay: propTypesExports.number,
1410
- portal: /*#__PURE__*/propTypesExports.oneOfType([propTypesExports.bool, /*#__PURE__*/propTypesExports.exact({
1411
- target: propTypesExports.object,
1412
- stablePosition: propTypesExports.bool
1413
- })]),
1414
- theming: propTypesExports.string,
1415
- onItemClick: propTypesExports.func
1416
- };
1417
- const uncontrolledMenuPropTypes = {
1418
- instanceRef: /*#__PURE__*/propTypesExports.oneOfType([propTypesExports.object, propTypesExports.func]),
1419
- onMenuChange: propTypesExports.func
1420
- };
1421
-
1422
- const useBEM = ({
1423
- block,
1424
- element,
1425
- modifiers,
1426
- className
1427
- }) => React.useMemo(() => {
1428
- const blockElement = element ? `${block}__${element}` : block;
1429
- let classString = blockElement;
1430
- modifiers && Object.keys(modifiers).forEach(name => {
1431
- const value = modifiers[name];
1432
- if (value) classString += ` ${blockElement}--${value === true ? name : `${name}-${value}`}`;
1433
- });
1434
- let expandedClassName = typeof className === 'function' ? className(modifiers) : className;
1435
- if (typeof expandedClassName === 'string') {
1436
- expandedClassName = expandedClassName.trim();
1437
- if (expandedClassName) classString += ` ${expandedClassName}`;
1438
- }
1439
- return classString;
1440
- }, [block, element, modifiers, className]);
1441
-
1442
- const menuContainerClass = 'szh-menu-container';
1443
- const menuClass = 'szh-menu';
1444
- const menuButtonClass = 'szh-menu-button';
1445
- const menuArrowClass = 'arrow';
1446
- const menuItemClass = 'item';
1447
- const HoverItemContext = /*#__PURE__*/React.createContext();
1448
- const MenuListItemContext = /*#__PURE__*/React.createContext({});
1449
- const MenuListContext = /*#__PURE__*/React.createContext({});
1450
- const EventHandlersContext = /*#__PURE__*/React.createContext({});
1451
- const RadioGroupContext = /*#__PURE__*/React.createContext({});
1452
- const SettingsContext = /*#__PURE__*/React.createContext({});
1453
- const Keys = /*#__PURE__*/Object.freeze({
1454
- ENTER: 'Enter',
1455
- ESC: 'Escape',
1456
- SPACE: ' ',
1457
- HOME: 'Home',
1458
- END: 'End',
1459
- LEFT: 'ArrowLeft',
1460
- RIGHT: 'ArrowRight',
1461
- UP: 'ArrowUp',
1462
- DOWN: 'ArrowDown'
1463
- });
1464
- const HoverActionTypes = /*#__PURE__*/Object.freeze({
1465
- RESET: 0,
1466
- SET: 1,
1467
- UNSET: 2,
1468
- INCREASE: 3,
1469
- DECREASE: 4,
1470
- FIRST: 5,
1471
- LAST: 6,
1472
- SET_INDEX: 7
1473
- });
1474
- const CloseReason = /*#__PURE__*/Object.freeze({
1475
- CLICK: 'click',
1476
- CANCEL: 'cancel',
1477
- BLUR: 'blur',
1478
- SCROLL: 'scroll'
1479
- });
1480
- const FocusPositions = /*#__PURE__*/Object.freeze({
1481
- FIRST: 'first',
1482
- LAST: 'last'
1483
- });
1484
- const MenuStateMap = /*#__PURE__*/Object.freeze({
1485
- entering: 'opening',
1486
- entered: 'open',
1487
- exiting: 'closing',
1488
- exited: 'closed'
1489
- });
1490
- const positionAbsolute = 'absolute';
1491
- const roleNone = 'presentation';
1492
- const roleMenuitem = 'menuitem';
1493
- const dummyItemProps = {
1494
- 'aria-hidden': true,
1495
- role: roleMenuitem
1496
- };
1497
-
1498
- const MenuButton$1 = /*#__PURE__*/defineName('MenuButton', /*#__PURE__*/React.forwardRef(function MenuButton({
1499
- className,
1500
- isOpen,
1501
- disabled,
1502
- children,
1503
- ...restProps
1504
- }, ref) {
1505
- const modifiers = React.useMemo(() => ({
1506
- open: isOpen
1507
- }), [isOpen]);
1508
- return /*#__PURE__*/jsxRuntime.jsx("button", {
1509
- "aria-haspopup": true,
1510
- "aria-expanded": isOpen,
1511
- "aria-disabled": disabled || undefined,
1512
- type: "button",
1513
- disabled: disabled,
1514
- ...restProps,
1515
- ref: ref,
1516
- className: useBEM({
1517
- block: menuButtonClass,
1518
- modifiers,
1519
- className
1520
- }),
1521
- children: children
1522
- });
1523
- }));
1524
- process.env.NODE_ENV !== "production" ? MenuButton$1.propTypes = {
1525
- ...stylePropTypes(),
1526
- isOpen: propTypesExports.bool,
1527
- disabled: propTypesExports.bool
1528
- } : void 0;
1529
-
1530
- const MenuContainer = ({
1531
- className,
1532
- containerRef,
1533
- containerProps,
1534
- children,
1535
- isOpen,
1536
- theming,
1537
- transition,
1538
- onClose
1539
- }) => {
1540
- const itemTransition = getTransition(transition, 'item');
1541
- const onKeyDown = ({
1542
- key
1543
- }) => {
1544
- switch (key) {
1545
- case Keys.ESC:
1546
- safeCall(onClose, {
1547
- key,
1548
- reason: CloseReason.CANCEL
1549
- });
1550
- break;
1551
- }
1552
- };
1553
- const onBlur = e => {
1554
- if (isOpen && !e.currentTarget.contains(e.relatedTarget)) {
1555
- safeCall(onClose, {
1556
- reason: CloseReason.BLUR
1557
- });
1558
- }
1559
- };
1560
- return /*#__PURE__*/jsxRuntime.jsx("div", {
1561
- ...mergeProps({
1562
- onKeyDown,
1563
- onBlur
1564
- }, containerProps),
1565
- className: useBEM({
1566
- block: menuContainerClass,
1567
- modifiers: React.useMemo(() => ({
1568
- theme: theming,
1569
- itemTransition
1570
- }), [theming, itemTransition]),
1571
- className
1572
- }),
1573
- style: {
1574
- position: 'absolute',
1575
- ...(containerProps == null ? void 0 : containerProps.style)
1576
- },
1577
- ref: containerRef,
1578
- children: children
1579
- });
1580
- };
1581
-
1582
- const createSubmenuCtx = () => {
1583
- let timer,
1584
- count = 0;
1585
- return {
1586
- toggle: isOpen => {
1587
- isOpen ? count++ : count--;
1588
- count = Math.max(count, 0);
1589
- },
1590
- on: (closeDelay, pending, settled) => {
1591
- if (count) {
1592
- if (!timer) timer = setTimeout(() => {
1593
- timer = 0;
1594
- pending();
1595
- }, closeDelay);
1596
- } else {
1597
- settled == null || settled();
1598
- }
1599
- },
1600
- off: () => {
1601
- if (timer) {
1602
- clearTimeout(timer);
1603
- timer = 0;
1604
- }
1605
- }
1606
- };
1607
- };
1608
-
1609
- const useItems = (menuRef, focusRef) => {
1610
- const [hoverItem, setHoverItem] = React.useState();
1611
- const stateRef = React.useRef({
1612
- items: [],
1613
- hoverIndex: -1,
1614
- sorted: false
1615
- });
1616
- const mutableState = stateRef.current;
1617
- const updateItems = React.useCallback((item, isMounted) => {
1618
- const {
1619
- items
1620
- } = mutableState;
1621
- if (!item) {
1622
- mutableState.items = [];
1623
- } else if (isMounted) {
1624
- items.push(item);
1625
- } else {
1626
- const index = items.indexOf(item);
1627
- if (index > -1) {
1628
- items.splice(index, 1);
1629
- if (item.contains(document.activeElement)) {
1630
- focusRef.current.focus();
1631
- setHoverItem();
1632
- }
1633
- }
1634
- }
1635
- mutableState.hoverIndex = -1;
1636
- mutableState.sorted = false;
1637
- }, [mutableState, focusRef]);
1638
- const dispatch = React.useCallback((actionType, item, nextIndex) => {
1639
- const {
1640
- items,
1641
- hoverIndex
1642
- } = mutableState;
1643
- const sortItems = () => {
1644
- if (mutableState.sorted) return;
1645
- const orderedNodes = menuRef.current.querySelectorAll('.szh-menu__item');
1646
- items.sort((a, b) => indexOfNode(orderedNodes, a) - indexOfNode(orderedNodes, b));
1647
- mutableState.sorted = true;
1648
- };
1649
- let index = -1,
1650
- newItem = undefined;
1651
- switch (actionType) {
1652
- case HoverActionTypes.RESET:
1653
- break;
1654
- case HoverActionTypes.SET:
1655
- newItem = item;
1656
- break;
1657
- case HoverActionTypes.UNSET:
1658
- newItem = prevItem => prevItem === item ? undefined : prevItem;
1659
- break;
1660
- case HoverActionTypes.FIRST:
1661
- sortItems();
1662
- index = 0;
1663
- newItem = items[index];
1664
- break;
1665
- case HoverActionTypes.LAST:
1666
- sortItems();
1667
- index = items.length - 1;
1668
- newItem = items[index];
1669
- break;
1670
- case HoverActionTypes.SET_INDEX:
1671
- sortItems();
1672
- index = nextIndex;
1673
- newItem = items[index];
1674
- break;
1675
- case HoverActionTypes.INCREASE:
1676
- sortItems();
1677
- index = hoverIndex;
1678
- if (index < 0) index = items.indexOf(item);
1679
- index++;
1680
- if (index >= items.length) index = 0;
1681
- newItem = items[index];
1682
- break;
1683
- case HoverActionTypes.DECREASE:
1684
- sortItems();
1685
- index = hoverIndex;
1686
- if (index < 0) index = items.indexOf(item);
1687
- index--;
1688
- if (index < 0) index = items.length - 1;
1689
- newItem = items[index];
1690
- break;
1691
- default:
1692
- if (process.env.NODE_ENV !== 'production') throw new Error(`[React-Menu] Unknown hover action type: ${actionType}`);
1693
- }
1694
- if (!newItem) index = -1;
1695
- setHoverItem(newItem);
1696
- mutableState.hoverIndex = index;
1697
- }, [menuRef, mutableState]);
1698
- return {
1699
- hoverItem,
1700
- dispatch,
1701
- updateItems
1702
- };
1703
- };
1704
-
1705
- const getPositionHelpers = (containerRef, menuRef, menuScroll, boundingBoxPadding) => {
1706
- const menuRect = menuRef.current.getBoundingClientRect();
1707
- const containerRect = containerRef.current.getBoundingClientRect();
1708
- const boundingRect = menuScroll === window ? {
1709
- left: 0,
1710
- top: 0,
1711
- right: document.documentElement.clientWidth,
1712
- bottom: window.innerHeight
1713
- } : menuScroll.getBoundingClientRect();
1714
- const padding = parsePadding(boundingBoxPadding);
1715
- const getLeftOverflow = x => x + containerRect.left - boundingRect.left - padding.left;
1716
- const getRightOverflow = x => x + containerRect.left + menuRect.width - boundingRect.right + padding.right;
1717
- const getTopOverflow = y => y + containerRect.top - boundingRect.top - padding.top;
1718
- const getBottomOverflow = y => y + containerRect.top + menuRect.height - boundingRect.bottom + padding.bottom;
1719
- const confineHorizontally = x => {
1720
- let leftOverflow = getLeftOverflow(x);
1721
- if (leftOverflow < 0) {
1722
- x -= leftOverflow;
1723
- } else {
1724
- const rightOverflow = getRightOverflow(x);
1725
- if (rightOverflow > 0) {
1726
- x -= rightOverflow;
1727
- leftOverflow = getLeftOverflow(x);
1728
- if (leftOverflow < 0) x -= leftOverflow;
1729
- }
1730
- }
1731
- return x;
1732
- };
1733
- const confineVertically = y => {
1734
- let topOverflow = getTopOverflow(y);
1735
- if (topOverflow < 0) {
1736
- y -= topOverflow;
1737
- } else {
1738
- const bottomOverflow = getBottomOverflow(y);
1739
- if (bottomOverflow > 0) {
1740
- y -= bottomOverflow;
1741
- topOverflow = getTopOverflow(y);
1742
- if (topOverflow < 0) y -= topOverflow;
1743
- }
1744
- }
1745
- return y;
1746
- };
1747
- return {
1748
- menuRect,
1749
- containerRect,
1750
- getLeftOverflow,
1751
- getRightOverflow,
1752
- getTopOverflow,
1753
- getBottomOverflow,
1754
- confineHorizontally,
1755
- confineVertically
1756
- };
1757
- };
1758
-
1759
- const placeArrowVertical = ({
1760
- arrowRef,
1761
- menuY,
1762
- anchorRect,
1763
- containerRect,
1764
- menuRect
1765
- }) => {
1766
- let y = anchorRect.top - containerRect.top - menuY + anchorRect.height / 2;
1767
- const offset = arrowRef.current.offsetHeight * 1.25;
1768
- y = Math.max(offset, y);
1769
- y = Math.min(y, menuRect.height - offset);
1770
- return y;
1771
- };
1772
-
1773
- const placeLeftorRight = ({
1774
- anchorRect,
1775
- containerRect,
1776
- menuRect,
1777
- placeLeftorRightY,
1778
- placeLeftX,
1779
- placeRightX,
1780
- getLeftOverflow,
1781
- getRightOverflow,
1782
- confineHorizontally,
1783
- confineVertically,
1784
- arrowRef,
1785
- arrow,
1786
- direction,
1787
- position
1788
- }) => {
1789
- let computedDirection = direction;
1790
- let y = placeLeftorRightY;
1791
- if (position !== 'initial') {
1792
- y = confineVertically(y);
1793
- if (position === 'anchor') {
1794
- y = Math.min(y, anchorRect.bottom - containerRect.top);
1795
- y = Math.max(y, anchorRect.top - containerRect.top - menuRect.height);
1796
- }
1797
- }
1798
- let x, leftOverflow, rightOverflow;
1799
- if (computedDirection === 'left') {
1800
- x = placeLeftX;
1801
- if (position !== 'initial') {
1802
- leftOverflow = getLeftOverflow(x);
1803
- if (leftOverflow < 0) {
1804
- rightOverflow = getRightOverflow(placeRightX);
1805
- if (rightOverflow <= 0 || -leftOverflow > rightOverflow) {
1806
- x = placeRightX;
1807
- computedDirection = 'right';
1808
- }
1809
- }
1810
- }
1811
- } else {
1812
- x = placeRightX;
1813
- if (position !== 'initial') {
1814
- rightOverflow = getRightOverflow(x);
1815
- if (rightOverflow > 0) {
1816
- leftOverflow = getLeftOverflow(placeLeftX);
1817
- if (leftOverflow >= 0 || -leftOverflow < rightOverflow) {
1818
- x = placeLeftX;
1819
- computedDirection = 'left';
1820
- }
1821
- }
1822
- }
1823
- }
1824
- if (position === 'auto') x = confineHorizontally(x);
1825
- const arrowY = arrow ? placeArrowVertical({
1826
- menuY: y,
1827
- arrowRef,
1828
- anchorRect,
1829
- containerRect,
1830
- menuRect
1831
- }) : undefined;
1832
- return {
1833
- arrowY,
1834
- x,
1835
- y,
1836
- computedDirection
1837
- };
1838
- };
1839
-
1840
- const placeArrowHorizontal = ({
1841
- arrowRef,
1842
- menuX,
1843
- anchorRect,
1844
- containerRect,
1845
- menuRect
1846
- }) => {
1847
- let x = anchorRect.left - containerRect.left - menuX + anchorRect.width / 2;
1848
- const offset = arrowRef.current.offsetWidth * 1.25;
1849
- x = Math.max(offset, x);
1850
- x = Math.min(x, menuRect.width - offset);
1851
- return x;
1852
- };
1853
-
1854
- const placeToporBottom = ({
1855
- anchorRect,
1856
- containerRect,
1857
- menuRect,
1858
- placeToporBottomX,
1859
- placeTopY,
1860
- placeBottomY,
1861
- getTopOverflow,
1862
- getBottomOverflow,
1863
- confineHorizontally,
1864
- confineVertically,
1865
- arrowRef,
1866
- arrow,
1867
- direction,
1868
- position
1869
- }) => {
1870
- let computedDirection = direction === 'top' ? 'top' : 'bottom';
1871
- let x = placeToporBottomX;
1872
- if (position !== 'initial') {
1873
- x = confineHorizontally(x);
1874
- if (position === 'anchor') {
1875
- x = Math.min(x, anchorRect.right - containerRect.left);
1876
- x = Math.max(x, anchorRect.left - containerRect.left - menuRect.width);
1877
- }
1878
- }
1879
- let y, topOverflow, bottomOverflow;
1880
- if (computedDirection === 'top') {
1881
- y = placeTopY;
1882
- if (position !== 'initial') {
1883
- topOverflow = getTopOverflow(y);
1884
- if (topOverflow < 0) {
1885
- bottomOverflow = getBottomOverflow(placeBottomY);
1886
- if (bottomOverflow <= 0 || -topOverflow > bottomOverflow) {
1887
- y = placeBottomY;
1888
- computedDirection = 'bottom';
1889
- }
1890
- }
1891
- }
1892
- } else {
1893
- y = placeBottomY;
1894
- if (position !== 'initial') {
1895
- bottomOverflow = getBottomOverflow(y);
1896
- if (bottomOverflow > 0) {
1897
- topOverflow = getTopOverflow(placeTopY);
1898
- if (topOverflow >= 0 || -topOverflow < bottomOverflow) {
1899
- y = placeTopY;
1900
- computedDirection = 'top';
1901
- }
1902
- }
1903
- }
1904
- }
1905
- if (position === 'auto') y = confineVertically(y);
1906
- const arrowX = arrow ? placeArrowHorizontal({
1907
- menuX: x,
1908
- arrowRef,
1909
- anchorRect,
1910
- containerRect,
1911
- menuRect
1912
- }) : undefined;
1913
- return {
1914
- arrowX,
1915
- x,
1916
- y,
1917
- computedDirection
1918
- };
1919
- };
1920
-
1921
- const positionMenu = ({
1922
- arrow,
1923
- align,
1924
- direction,
1925
- gap,
1926
- shift,
1927
- position,
1928
- anchorRect,
1929
- arrowRef,
1930
- positionHelpers
1931
- }) => {
1932
- const {
1933
- menuRect,
1934
- containerRect
1935
- } = positionHelpers;
1936
- const isHorizontal = direction === 'left' || direction === 'right';
1937
- let horizontalOffset = isHorizontal ? gap : shift;
1938
- let verticalOffset = isHorizontal ? shift : gap;
1939
- if (arrow) {
1940
- const arrowElt = arrowRef.current;
1941
- if (isHorizontal) {
1942
- horizontalOffset += arrowElt.offsetWidth;
1943
- } else {
1944
- verticalOffset += arrowElt.offsetHeight;
1945
- }
1946
- }
1947
- const placeLeftX = anchorRect.left - containerRect.left - menuRect.width - horizontalOffset;
1948
- const placeRightX = anchorRect.right - containerRect.left + horizontalOffset;
1949
- const placeTopY = anchorRect.top - containerRect.top - menuRect.height - verticalOffset;
1950
- const placeBottomY = anchorRect.bottom - containerRect.top + verticalOffset;
1951
- let placeToporBottomX, placeLeftorRightY;
1952
- if (align === 'end') {
1953
- placeToporBottomX = anchorRect.right - containerRect.left - menuRect.width;
1954
- placeLeftorRightY = anchorRect.bottom - containerRect.top - menuRect.height;
1955
- } else if (align === 'center') {
1956
- placeToporBottomX = anchorRect.left - containerRect.left - (menuRect.width - anchorRect.width) / 2;
1957
- placeLeftorRightY = anchorRect.top - containerRect.top - (menuRect.height - anchorRect.height) / 2;
1958
- } else {
1959
- placeToporBottomX = anchorRect.left - containerRect.left;
1960
- placeLeftorRightY = anchorRect.top - containerRect.top;
1961
- }
1962
- placeToporBottomX += horizontalOffset;
1963
- placeLeftorRightY += verticalOffset;
1964
- const options = {
1965
- ...positionHelpers,
1966
- anchorRect,
1967
- placeLeftX,
1968
- placeRightX,
1969
- placeLeftorRightY,
1970
- placeTopY,
1971
- placeBottomY,
1972
- placeToporBottomX,
1973
- arrowRef,
1974
- arrow,
1975
- direction,
1976
- position
1977
- };
1978
- switch (direction) {
1979
- case 'left':
1980
- case 'right':
1981
- return placeLeftorRight(options);
1982
- case 'top':
1983
- case 'bottom':
1984
- default:
1985
- return placeToporBottom(options);
1986
- }
1987
- };
1988
-
1989
- const useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? React.useLayoutEffect : React.useEffect;
1990
-
1991
- function setRef(ref, instance) {
1992
- typeof ref === 'function' ? ref(instance) : ref.current = instance;
1993
- }
1994
- const useCombinedRef = (refA, refB) => React.useMemo(() => {
1995
- if (!refA) return refB;
1996
- if (!refB) return refA;
1997
- return instance => {
1998
- setRef(refA, instance);
1999
- setRef(refB, instance);
2000
- };
2001
- }, [refA, refB]);
2002
-
2003
- const offScreen = -9999;
2004
- const MenuList = ({
2005
- ariaLabel,
2006
- menuClassName,
2007
- menuStyle,
2008
- arrow,
2009
- arrowProps = {},
2010
- anchorPoint,
2011
- anchorRef,
2012
- containerRef,
2013
- containerProps,
2014
- focusProps,
2015
- externalRef,
2016
- parentScrollingRef,
2017
- align = 'start',
2018
- direction = 'bottom',
2019
- position = 'auto',
2020
- overflow = 'visible',
2021
- setDownOverflow,
2022
- repositionFlag,
2023
- captureFocus = true,
2024
- state,
2025
- endTransition,
2026
- isDisabled,
2027
- menuItemFocus,
2028
- gap = 0,
2029
- shift = 0,
2030
- children,
2031
- onClose,
2032
- ...restProps
2033
- }) => {
2034
- const [menuPosition, setMenuPosition] = React.useState({
2035
- x: offScreen,
2036
- y: offScreen
2037
- });
2038
- const [arrowPosition, setArrowPosition] = React.useState({});
2039
- const [overflowData, setOverflowData] = React.useState();
2040
- const [expandedDirection, setExpandedDirection] = React.useState(direction);
2041
- const [submenuCtx] = React.useState(createSubmenuCtx);
2042
- const [reposSubmenu, forceReposSubmenu] = React.useReducer(c => c + 1, 1);
2043
- const {
2044
- transition,
2045
- boundingBoxRef,
2046
- boundingBoxPadding,
2047
- rootMenuRef,
2048
- rootAnchorRef,
2049
- scrollNodesRef,
2050
- reposition,
2051
- viewScroll,
2052
- submenuCloseDelay
2053
- } = React.useContext(SettingsContext);
2054
- const {
2055
- submenuCtx: parentSubmenuCtx,
2056
- reposSubmenu: reposFlag = repositionFlag
2057
- } = React.useContext(MenuListContext);
2058
- const menuRef = React.useRef(null);
2059
- const focusRef = React.useRef();
2060
- const arrowRef = React.useRef();
2061
- const prevOpen = React.useRef(false);
2062
- const latestMenuSize = React.useRef({
2063
- width: 0,
2064
- height: 0
2065
- });
2066
- const latestHandlePosition = React.useRef(() => {});
2067
- const {
2068
- hoverItem,
2069
- dispatch,
2070
- updateItems
2071
- } = useItems(menuRef, focusRef);
2072
- const isOpen = isMenuOpen(state);
2073
- const openTransition = getTransition(transition, 'open');
2074
- const closeTransition = getTransition(transition, 'close');
2075
- const scrollNodes = scrollNodesRef.current;
2076
- const onKeyDown = e => {
2077
- switch (e.key) {
2078
- case Keys.HOME:
2079
- dispatch(HoverActionTypes.FIRST);
2080
- break;
2081
- case Keys.END:
2082
- dispatch(HoverActionTypes.LAST);
2083
- break;
2084
- case Keys.UP:
2085
- dispatch(HoverActionTypes.DECREASE, hoverItem);
2086
- break;
2087
- case Keys.DOWN:
2088
- dispatch(HoverActionTypes.INCREASE, hoverItem);
2089
- break;
2090
- case Keys.SPACE:
2091
- if (e.target && e.target.className.indexOf(menuClass) !== -1) {
2092
- e.preventDefault();
2093
- }
2094
- return;
2095
- default:
2096
- return;
2097
- }
2098
- e.preventDefault();
2099
- e.stopPropagation();
2100
- };
2101
- const onAnimationEnd = () => {
2102
- if (state === 'closing') {
2103
- setOverflowData();
2104
- }
2105
- safeCall(endTransition);
2106
- };
2107
- const onPointerMove = e => {
2108
- e.stopPropagation();
2109
- submenuCtx.on(submenuCloseDelay, () => {
2110
- dispatch(HoverActionTypes.RESET);
2111
- focusRef.current.focus();
2112
- });
2113
- };
2114
- const onPointerLeave = e => {
2115
- if (e.target === e.currentTarget) submenuCtx.off();
2116
- };
2117
- const handlePosition = React.useCallback(noOverflowCheck => {
2118
- var _anchorRef$current;
2119
- const anchorRect = anchorRef ? (_anchorRef$current = anchorRef.current) == null ? void 0 : _anchorRef$current.getBoundingClientRect() : anchorPoint ? {
2120
- left: anchorPoint.x,
2121
- right: anchorPoint.x,
2122
- top: anchorPoint.y,
2123
- bottom: anchorPoint.y,
2124
- width: 0,
2125
- height: 0
2126
- } : null;
2127
- if (!anchorRect) {
2128
- if (process.env.NODE_ENV !== 'production') {
2129
- console.warn('[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open.');
2130
- }
2131
- return;
2132
- }
2133
- if (!scrollNodes.menu) {
2134
- scrollNodes.menu = (boundingBoxRef ? boundingBoxRef.current : getScrollAncestor(rootMenuRef.current)) || window;
2135
- }
2136
- const positionHelpers = getPositionHelpers(containerRef, menuRef, scrollNodes.menu, boundingBoxPadding);
2137
- let {
2138
- arrowX,
2139
- arrowY,
2140
- x,
2141
- y,
2142
- computedDirection
2143
- } = positionMenu({
2144
- arrow,
2145
- align,
2146
- direction,
2147
- gap,
2148
- shift,
2149
- position,
2150
- anchorRect,
2151
- arrowRef,
2152
- positionHelpers
2153
- });
2154
- const {
2155
- menuRect
2156
- } = positionHelpers;
2157
- let menuHeight = menuRect.height;
2158
- if (!noOverflowCheck && overflow !== 'visible') {
2159
- const {
2160
- getTopOverflow,
2161
- getBottomOverflow
2162
- } = positionHelpers;
2163
- let height, overflowAmt;
2164
- const prevHeight = latestMenuSize.current.height;
2165
- const bottomOverflow = getBottomOverflow(y);
2166
- if (bottomOverflow > 0 || floatEqual(bottomOverflow, 0) && floatEqual(menuHeight, prevHeight)) {
2167
- height = menuHeight - bottomOverflow;
2168
- overflowAmt = bottomOverflow;
2169
- } else {
2170
- const topOverflow = getTopOverflow(y);
2171
- if (topOverflow < 0 || floatEqual(topOverflow, 0) && floatEqual(menuHeight, prevHeight)) {
2172
- height = menuHeight + topOverflow;
2173
- overflowAmt = 0 - topOverflow;
2174
- if (height >= 0) y -= topOverflow;
2175
- }
2176
- }
2177
- if (height >= 0) {
2178
- menuHeight = height;
2179
- setOverflowData({
2180
- height,
2181
- overflowAmt
2182
- });
2183
- } else {
2184
- setOverflowData();
2185
- }
2186
- }
2187
- if (arrow) setArrowPosition({
2188
- x: arrowX,
2189
- y: arrowY
2190
- });
2191
- setMenuPosition({
2192
- x,
2193
- y
2194
- });
2195
- setExpandedDirection(computedDirection);
2196
- latestMenuSize.current = {
2197
- width: menuRect.width,
2198
- height: menuHeight
2199
- };
2200
- }, [arrow, align, boundingBoxPadding, direction, gap, shift, position, overflow, anchorPoint, anchorRef, containerRef, boundingBoxRef, rootMenuRef, scrollNodes]);
2201
- useIsomorphicLayoutEffect(() => {
2202
- if (isOpen) {
2203
- handlePosition();
2204
- if (prevOpen.current) forceReposSubmenu();
2205
- }
2206
- prevOpen.current = isOpen;
2207
- latestHandlePosition.current = handlePosition;
2208
- }, [isOpen, handlePosition, reposFlag]);
2209
- useIsomorphicLayoutEffect(() => {
2210
- if (overflowData && !setDownOverflow) menuRef.current.scrollTop = 0;
2211
- }, [overflowData, setDownOverflow]);
2212
- useIsomorphicLayoutEffect(() => updateItems, [updateItems]);
2213
- React.useEffect(() => {
2214
- let {
2215
- menu: menuScroll
2216
- } = scrollNodes;
2217
- if (!isOpen || !menuScroll) return;
2218
- menuScroll = menuScroll.addEventListener ? menuScroll : window;
2219
- if (!scrollNodes.anchors) {
2220
- scrollNodes.anchors = [];
2221
- let anchorScroll = getScrollAncestor(rootAnchorRef && rootAnchorRef.current);
2222
- while (anchorScroll && anchorScroll !== menuScroll) {
2223
- scrollNodes.anchors.push(anchorScroll);
2224
- anchorScroll = getScrollAncestor(anchorScroll);
2225
- }
2226
- }
2227
- let scroll = viewScroll;
2228
- if (scrollNodes.anchors.length && scroll === 'initial') scroll = 'auto';
2229
- if (scroll === 'initial') return;
2230
- const handleScroll = () => {
2231
- if (scroll === 'auto') {
2232
- batchedUpdates(() => handlePosition(true));
2233
- } else {
2234
- safeCall(onClose, {
2235
- reason: CloseReason.SCROLL
2236
- });
2237
- }
2238
- };
2239
- const scrollObservers = scrollNodes.anchors.concat(viewScroll !== 'initial' ? menuScroll : []);
2240
- scrollObservers.forEach(o => o.addEventListener('scroll', handleScroll));
2241
- return () => scrollObservers.forEach(o => o.removeEventListener('scroll', handleScroll));
2242
- }, [rootAnchorRef, scrollNodes, isOpen, onClose, viewScroll, handlePosition]);
2243
- const hasOverflow = !!overflowData && overflowData.overflowAmt > 0;
2244
- React.useEffect(() => {
2245
- if (hasOverflow || !isOpen || !parentScrollingRef) return;
2246
- const handleScroll = () => batchedUpdates(handlePosition);
2247
- const parentScroll = parentScrollingRef.current;
2248
- parentScroll.addEventListener('scroll', handleScroll);
2249
- return () => parentScroll.removeEventListener('scroll', handleScroll);
2250
- }, [isOpen, hasOverflow, parentScrollingRef, handlePosition]);
2251
- React.useEffect(() => {
2252
- if (typeof ResizeObserver !== 'function' || reposition === 'initial') return;
2253
- const resizeObserver = new ResizeObserver(([entry]) => {
2254
- const {
2255
- borderBoxSize,
2256
- target
2257
- } = entry;
2258
- let width, height;
2259
- if (borderBoxSize) {
2260
- const {
2261
- inlineSize,
2262
- blockSize
2263
- } = borderBoxSize[0] || borderBoxSize;
2264
- width = inlineSize;
2265
- height = blockSize;
2266
- } else {
2267
- const borderRect = target.getBoundingClientRect();
2268
- width = borderRect.width;
2269
- height = borderRect.height;
2270
- }
2271
- if (width === 0 || height === 0) return;
2272
- if (floatEqual(width, latestMenuSize.current.width, 1) && floatEqual(height, latestMenuSize.current.height, 1)) return;
2273
- reactDom.flushSync(() => {
2274
- latestHandlePosition.current();
2275
- forceReposSubmenu();
2276
- });
2277
- });
2278
- const observeTarget = menuRef.current;
2279
- resizeObserver.observe(observeTarget, {
2280
- box: 'border-box'
2281
- });
2282
- return () => resizeObserver.unobserve(observeTarget);
2283
- }, [reposition]);
2284
- React.useEffect(() => {
2285
- if (!isOpen) {
2286
- dispatch(HoverActionTypes.RESET);
2287
- if (!closeTransition) setOverflowData();
2288
- return;
2289
- }
2290
- const {
2291
- position,
2292
- alwaysUpdate
2293
- } = menuItemFocus || {};
2294
- const setItemFocus = () => {
2295
- if (position === FocusPositions.FIRST) {
2296
- dispatch(HoverActionTypes.FIRST);
2297
- } else if (position === FocusPositions.LAST) {
2298
- dispatch(HoverActionTypes.LAST);
2299
- } else if (position >= -1) {
2300
- dispatch(HoverActionTypes.SET_INDEX, undefined, position);
2301
- }
2302
- };
2303
- if (alwaysUpdate) {
2304
- setItemFocus();
2305
- } else if (captureFocus) {
2306
- const id = setTimeout(() => {
2307
- const menuElt = menuRef.current;
2308
- if (menuElt && !menuElt.contains(document.activeElement)) {
2309
- focusRef.current.focus();
2310
- setItemFocus();
2311
- }
2312
- }, openTransition ? 170 : 100);
2313
- return () => clearTimeout(id);
2314
- }
2315
- }, [isOpen, openTransition, closeTransition, captureFocus, menuItemFocus, dispatch]);
2316
- const itemContext = React.useMemo(() => ({
2317
- isParentOpen: isOpen,
2318
- submenuCtx,
2319
- dispatch,
2320
- updateItems
2321
- }), [isOpen, submenuCtx, dispatch, updateItems]);
2322
- let maxHeight, overflowAmt;
2323
- if (overflowData) {
2324
- setDownOverflow ? overflowAmt = overflowData.overflowAmt : maxHeight = overflowData.height;
2325
- }
2326
- const listContext = React.useMemo(() => ({
2327
- reposSubmenu,
2328
- submenuCtx,
2329
- overflow,
2330
- overflowAmt,
2331
- parentMenuRef: menuRef,
2332
- parentDir: expandedDirection
2333
- }), [reposSubmenu, submenuCtx, overflow, overflowAmt, expandedDirection]);
2334
- const overflowStyle = maxHeight >= 0 ? {
2335
- maxHeight,
2336
- overflow
2337
- } : undefined;
2338
- const modifiers = React.useMemo(() => ({
2339
- state,
2340
- dir: expandedDirection
2341
- }), [state, expandedDirection]);
2342
- const arrowModifiers = React.useMemo(() => ({
2343
- dir: expandedDirection
2344
- }), [expandedDirection]);
2345
- const _arrowClassName = useBEM({
2346
- block: menuClass,
2347
- element: menuArrowClass,
2348
- modifiers: arrowModifiers,
2349
- className: arrowProps.className
2350
- });
2351
- const menu = /*#__PURE__*/jsxRuntime.jsxs("ul", {
2352
- role: "menu",
2353
- "aria-label": ariaLabel,
2354
- ...commonProps(isDisabled),
2355
- ...mergeProps({
2356
- onPointerEnter: parentSubmenuCtx == null ? void 0 : parentSubmenuCtx.off,
2357
- onPointerMove,
2358
- onPointerLeave,
2359
- onKeyDown,
2360
- onAnimationEnd
2361
- }, restProps),
2362
- ref: useCombinedRef(externalRef, menuRef),
2363
- className: useBEM({
2364
- block: menuClass,
2365
- modifiers,
2366
- className: menuClassName
2367
- }),
2368
- style: {
2369
- ...menuStyle,
2370
- ...overflowStyle,
2371
- margin: 0,
2372
- display: state === 'closed' ? 'none' : undefined,
2373
- position: positionAbsolute,
2374
- left: menuPosition.x,
2375
- top: menuPosition.y
2376
- },
2377
- children: [/*#__PURE__*/jsxRuntime.jsx("li", {
2378
- tabIndex: -1,
2379
- style: {
2380
- position: positionAbsolute,
2381
- left: 0,
2382
- top: 0,
2383
- display: 'block',
2384
- outline: 'none'
2385
- },
2386
- ref: focusRef,
2387
- ...dummyItemProps,
2388
- ...focusProps
2389
- }), arrow && /*#__PURE__*/jsxRuntime.jsx("li", {
2390
- ...dummyItemProps,
2391
- ...arrowProps,
2392
- className: _arrowClassName,
2393
- style: {
2394
- display: 'block',
2395
- position: positionAbsolute,
2396
- left: arrowPosition.x,
2397
- top: arrowPosition.y,
2398
- ...arrowProps.style
2399
- },
2400
- ref: arrowRef
2401
- }), /*#__PURE__*/jsxRuntime.jsx(MenuListContext.Provider, {
2402
- value: listContext,
2403
- children: /*#__PURE__*/jsxRuntime.jsx(MenuListItemContext.Provider, {
2404
- value: itemContext,
2405
- children: /*#__PURE__*/jsxRuntime.jsx(HoverItemContext.Provider, {
2406
- value: hoverItem,
2407
- children: safeCall(children, modifiers)
2408
- })
2409
- })
2410
- })]
2411
- });
2412
- return containerProps ? /*#__PURE__*/jsxRuntime.jsx(MenuContainer, {
2413
- ...containerProps,
2414
- isOpen: isOpen,
2415
- children: menu
2416
- }) : menu;
2417
- };
2418
-
2419
- const ControlledMenu = /*#__PURE__*/React.forwardRef(function ControlledMenu({
2420
- 'aria-label': ariaLabel,
2421
- className,
2422
- containerProps,
2423
- initialMounted,
2424
- unmountOnClose,
2425
- transition,
2426
- transitionTimeout,
2427
- boundingBoxRef,
2428
- boundingBoxPadding,
2429
- reposition = 'auto',
2430
- submenuOpenDelay = 300,
2431
- submenuCloseDelay = 150,
2432
- viewScroll = 'initial',
2433
- portal,
2434
- theming,
2435
- onItemClick,
2436
- ...restProps
2437
- }, externalRef) {
2438
- const containerRef = React.useRef(null);
2439
- const scrollNodesRef = React.useRef({});
2440
- const {
2441
- anchorRef,
2442
- state,
2443
- onClose
2444
- } = restProps;
2445
- const settings = React.useMemo(() => ({
2446
- initialMounted,
2447
- unmountOnClose,
2448
- transition,
2449
- transitionTimeout,
2450
- boundingBoxRef,
2451
- boundingBoxPadding,
2452
- rootMenuRef: containerRef,
2453
- rootAnchorRef: anchorRef,
2454
- scrollNodesRef,
2455
- reposition,
2456
- viewScroll,
2457
- submenuOpenDelay,
2458
- submenuCloseDelay
2459
- }), [initialMounted, unmountOnClose, transition, transitionTimeout, anchorRef, boundingBoxRef, boundingBoxPadding, reposition, viewScroll, submenuOpenDelay, submenuCloseDelay]);
2460
- const eventHandlers = React.useMemo(() => ({
2461
- handleClick(event, isCheckorRadio) {
2462
- if (!event.stopPropagation) safeCall(onItemClick, event);
2463
- let keepOpen = event.keepOpen;
2464
- if (keepOpen === undefined) {
2465
- keepOpen = isCheckorRadio && event.key === Keys.SPACE;
2466
- }
2467
- if (!keepOpen) {
2468
- safeCall(onClose, {
2469
- value: event.value,
2470
- key: event.key,
2471
- reason: CloseReason.CLICK
2472
- });
2473
- }
2474
- },
2475
- handleClose(key) {
2476
- safeCall(onClose, {
2477
- key,
2478
- reason: CloseReason.CLICK
2479
- });
2480
- }
2481
- }), [onItemClick, onClose]);
2482
- if (!state) return null;
2483
- const menuList = /*#__PURE__*/jsxRuntime.jsx(SettingsContext.Provider, {
2484
- value: settings,
2485
- children: /*#__PURE__*/jsxRuntime.jsx(EventHandlersContext.Provider, {
2486
- value: eventHandlers,
2487
- children: /*#__PURE__*/jsxRuntime.jsx(MenuList, {
2488
- ...restProps,
2489
- ariaLabel: ariaLabel || 'Menu',
2490
- externalRef: externalRef,
2491
- containerRef: containerRef,
2492
- containerProps: {
2493
- className,
2494
- containerRef,
2495
- containerProps,
2496
- theming,
2497
- transition,
2498
- onClose
2499
- }
2500
- })
2501
- })
2502
- });
2503
- if (portal === true && typeof document !== 'undefined') {
2504
- return /*#__PURE__*/reactDom.createPortal(menuList, document.body);
2505
- } else if (portal) {
2506
- return portal.target ? /*#__PURE__*/reactDom.createPortal(menuList, portal.target) : portal.stablePosition ? null : menuList;
2507
- }
2508
- return menuList;
2509
- });
2510
- process.env.NODE_ENV !== "production" ? ControlledMenu.propTypes = {
2511
- ...rootMenuPropTypes,
2512
- state: /*#__PURE__*/propTypesExports.oneOf( /*#__PURE__*/values(MenuStateMap)),
2513
- anchorPoint: /*#__PURE__*/propTypesExports.exact({
2514
- x: propTypesExports.number,
2515
- y: propTypesExports.number
2516
- }),
2517
- anchorRef: propTypesExports.object,
2518
- captureFocus: propTypesExports.bool,
2519
- menuItemFocus: /*#__PURE__*/propTypesExports.exact({
2520
- position: /*#__PURE__*/propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
2521
- alwaysUpdate: propTypesExports.bool
2522
- }),
2523
- onClose: propTypesExports.func
2524
- } : void 0;
2525
-
2526
- const PRE_ENTER = 0;
2527
- const ENTERING = 1;
2528
- const ENTERED = 2;
2529
- const PRE_EXIT = 3;
2530
- const EXITING = 4;
2531
- const EXITED = 5;
2532
- const UNMOUNTED = 6;
2533
- const STATUS = ['preEnter', 'entering', 'entered', 'preExit', 'exiting', 'exited', 'unmounted'];
2534
- const getState = status => ({
2535
- _s: status,
2536
- status: STATUS[status],
2537
- isEnter: status < PRE_EXIT,
2538
- isMounted: status !== UNMOUNTED,
2539
- isResolved: status === ENTERED || status > EXITING
2540
- });
2541
- const startOrEnd = unmounted => unmounted ? UNMOUNTED : EXITED;
2542
- const getEndStatus = (status, unmountOnExit) => {
2543
- switch (status) {
2544
- case ENTERING:
2545
- case PRE_ENTER:
2546
- return ENTERED;
2547
- case EXITING:
2548
- case PRE_EXIT:
2549
- return startOrEnd(unmountOnExit);
2550
- }
2551
- };
2552
- const getTimeout = timeout => typeof timeout === 'object' ? [timeout.enter, timeout.exit] : [timeout, timeout];
2553
- const nextTick = (transitState, status) => setTimeout(() => {
2554
- // Reading document.body.offsetTop can force browser to repaint before transition to the next state
2555
- isNaN(document.body.offsetTop) || transitState(status + 1);
2556
- }, 0);
2557
-
2558
- const updateState = (status, setState, latestState, timeoutId, onChange) => {
2559
- clearTimeout(timeoutId.current);
2560
- const state = getState(status);
2561
- setState(state);
2562
- latestState.current = state;
2563
- onChange && onChange({
2564
- current: state
2565
- });
2566
- };
2567
- const useTransition = ({
2568
- enter = true,
2569
- exit = true,
2570
- preEnter,
2571
- preExit,
2572
- timeout,
2573
- initialEntered,
2574
- mountOnEnter,
2575
- unmountOnExit,
2576
- onStateChange: onChange
2577
- } = {}) => {
2578
- const [state, setState] = React.useState(() => getState(initialEntered ? ENTERED : startOrEnd(mountOnEnter)));
2579
- const latestState = React.useRef(state);
2580
- const timeoutId = React.useRef();
2581
- const [enterTimeout, exitTimeout] = getTimeout(timeout);
2582
- const endTransition = React.useCallback(() => {
2583
- const status = getEndStatus(latestState.current._s, unmountOnExit);
2584
- status && updateState(status, setState, latestState, timeoutId, onChange);
2585
- }, [onChange, unmountOnExit]);
2586
- const toggle = React.useCallback(toEnter => {
2587
- const transitState = status => {
2588
- updateState(status, setState, latestState, timeoutId, onChange);
2589
- switch (status) {
2590
- case ENTERING:
2591
- if (enterTimeout >= 0) timeoutId.current = setTimeout(endTransition, enterTimeout);
2592
- break;
2593
- case EXITING:
2594
- if (exitTimeout >= 0) timeoutId.current = setTimeout(endTransition, exitTimeout);
2595
- break;
2596
- case PRE_ENTER:
2597
- case PRE_EXIT:
2598
- timeoutId.current = nextTick(transitState, status);
2599
- break;
2600
- }
2601
- };
2602
- const enterStage = latestState.current.isEnter;
2603
- if (typeof toEnter !== 'boolean') toEnter = !enterStage;
2604
- if (toEnter) {
2605
- !enterStage && transitState(enter ? preEnter ? PRE_ENTER : ENTERING : ENTERED);
2606
- } else {
2607
- enterStage && transitState(exit ? preExit ? PRE_EXIT : EXITING : startOrEnd(unmountOnExit));
2608
- }
2609
- }, [endTransition, onChange, enter, exit, preEnter, preExit, enterTimeout, exitTimeout, unmountOnExit]);
2610
- React.useEffect(() => () => clearTimeout(timeoutId.current), []);
2611
- return [state, toggle, endTransition];
2612
- };
2613
-
2614
- const useMenuState = ({
2615
- initialOpen,
2616
- initialMounted,
2617
- unmountOnClose,
2618
- transition,
2619
- transitionTimeout = 500
2620
- } = {}) => {
2621
- const [{
2622
- status
2623
- }, toggleMenu, endTransition] = useTransition({
2624
- initialEntered: initialOpen,
2625
- mountOnEnter: !initialMounted,
2626
- unmountOnExit: unmountOnClose,
2627
- timeout: transitionTimeout,
2628
- enter: getTransition(transition, 'open'),
2629
- exit: getTransition(transition, 'close')
2630
- });
2631
- return [{
2632
- state: MenuStateMap[status],
2633
- endTransition
2634
- }, toggleMenu];
2635
- };
2636
-
2637
- const useMenuStateAndFocus = options => {
2638
- const [menuProps, toggleMenu] = useMenuState(options);
2639
- const [menuItemFocus, setMenuItemFocus] = React.useState();
2640
- const openMenu = (position, alwaysUpdate) => {
2641
- setMenuItemFocus({
2642
- position,
2643
- alwaysUpdate
2644
- });
2645
- toggleMenu(true);
2646
- };
2647
- return [{
2648
- menuItemFocus,
2649
- ...menuProps
2650
- }, toggleMenu, openMenu];
2651
- };
2652
-
2653
- const useClick = (state, onToggle) => {
2654
- if (process.env.NODE_ENV !== 'production' && typeof onToggle !== 'function') {
2655
- throw new Error('[React-Menu] useClick/useHover requires a function in the second parameter.');
2656
- }
2657
- const [skipOpen] = React.useState({});
2658
- return {
2659
- onMouseDown: () => {
2660
- skipOpen.v = state && state !== 'closed';
2661
- },
2662
- onClick: e => skipOpen.v ? skipOpen.v = false : onToggle(true, e)
2663
- };
2664
- };
2665
-
2666
- const useMenuChange = (onMenuChange, isOpen) => {
2667
- const prevOpen = React.useRef(isOpen);
2668
- React.useEffect(() => {
2669
- if (prevOpen.current !== isOpen) safeCall(onMenuChange, {
2670
- open: isOpen
2671
- });
2672
- prevOpen.current = isOpen;
2673
- }, [onMenuChange, isOpen]);
2674
- };
2675
-
2676
- const Menu$2 = /*#__PURE__*/React.forwardRef(function Menu({
2677
- 'aria-label': ariaLabel,
2678
- captureFocus: _,
2679
- initialOpen: _1,
2680
- menuButton,
2681
- instanceRef,
2682
- onMenuChange,
2683
- ...restProps
2684
- }, externalRef) {
2685
- const [stateProps, toggleMenu, openMenu] = useMenuStateAndFocus(restProps);
2686
- const {
2687
- state
2688
- } = stateProps;
2689
- const isOpen = isMenuOpen(state);
2690
- const buttonRef = React.useRef(null);
2691
- const anchorProps = useClick(state, (_, e) => openMenu(!e.detail ? FocusPositions.FIRST : undefined));
2692
- const handleClose = React.useCallback(e => {
2693
- toggleMenu(false);
2694
- if (e.key) buttonRef.current.focus();
2695
- }, [toggleMenu]);
2696
- const onKeyDown = e => {
2697
- switch (e.key) {
2698
- case Keys.UP:
2699
- openMenu(FocusPositions.LAST);
2700
- break;
2701
- case Keys.DOWN:
2702
- openMenu(FocusPositions.FIRST);
2703
- break;
2704
- default:
2705
- return;
2706
- }
2707
- e.preventDefault();
2708
- };
2709
- const button = safeCall(menuButton, {
2710
- open: isOpen
2711
- });
2712
- if (!button || !button.type) throw new Error('Menu requires a menuButton prop.');
2713
- const buttonProps = {
2714
- ref: useCombinedRef(button.ref, buttonRef),
2715
- ...mergeProps({
2716
- onKeyDown,
2717
- ...anchorProps
2718
- }, button.props)
2719
- };
2720
- if (getName(button.type) === 'MenuButton') {
2721
- buttonProps.isOpen = isOpen;
2722
- }
2723
- const renderButton = /*#__PURE__*/React.cloneElement(button, buttonProps);
2724
- useMenuChange(onMenuChange, isOpen);
2725
- React.useImperativeHandle(instanceRef, () => ({
2726
- openMenu,
2727
- closeMenu: () => toggleMenu(false)
2728
- }));
2729
- return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
2730
- children: [renderButton, /*#__PURE__*/jsxRuntime.jsx(ControlledMenu, {
2731
- ...restProps,
2732
- ...stateProps,
2733
- "aria-label": ariaLabel || (typeof button.props.children === 'string' ? button.props.children : 'Menu'),
2734
- anchorRef: buttonRef,
2735
- ref: externalRef,
2736
- onClose: handleClose
2737
- })]
2738
- });
2739
- });
2740
- process.env.NODE_ENV !== "production" ? Menu$2.propTypes = {
2741
- ...rootMenuPropTypes,
2742
- ...uncontrolledMenuPropTypes,
2743
- menuButton: propTypesExports.oneOfType([propTypesExports.element, propTypesExports.func]).isRequired
2744
- } : void 0;
2745
-
2746
- const withHovering = (name, WrappedComponent) => {
2747
- const Component = /*#__PURE__*/React.memo(WrappedComponent);
2748
- const WithHovering = /*#__PURE__*/React.forwardRef((props, ref) => {
2749
- const itemRef = React.useRef(null);
2750
- return /*#__PURE__*/jsxRuntime.jsx(Component, {
2751
- ...props,
2752
- itemRef: itemRef,
2753
- externalRef: ref,
2754
- isHovering: React.useContext(HoverItemContext) === itemRef.current
2755
- });
2756
- });
2757
- WithHovering.displayName = `WithHovering(${name})`;
2758
- return WithHovering;
2759
- };
2760
-
2761
- const useItemEffect = (isDisabled, itemRef, updateItems) => {
2762
- useIsomorphicLayoutEffect(() => {
2763
- if (process.env.NODE_ENV !== 'production' && !updateItems) {
2764
- throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${itemRef.current.outerHTML}`);
2765
- }
2766
- if (isDisabled) return;
2767
- const item = itemRef.current;
2768
- updateItems(item, true);
2769
- return () => {
2770
- updateItems(item);
2771
- };
2772
- }, [isDisabled, itemRef, updateItems]);
2773
- };
2774
-
2775
- const useItemState = (itemRef, focusRef, isHovering, isDisabled) => {
2776
- const {
2777
- submenuCloseDelay
2778
- } = React.useContext(SettingsContext);
2779
- const {
2780
- isParentOpen,
2781
- submenuCtx,
2782
- dispatch,
2783
- updateItems
2784
- } = React.useContext(MenuListItemContext);
2785
- const setHover = () => {
2786
- !isHovering && !isDisabled && dispatch(HoverActionTypes.SET, itemRef.current);
2787
- };
2788
- const unsetHover = () => {
2789
- !isDisabled && dispatch(HoverActionTypes.UNSET, itemRef.current);
2790
- };
2791
- const onBlur = e => {
2792
- if (isHovering && !e.currentTarget.contains(e.relatedTarget)) unsetHover();
2793
- };
2794
- const onPointerMove = e => {
2795
- if (!isDisabled) {
2796
- e.stopPropagation();
2797
- submenuCtx.on(submenuCloseDelay, setHover, setHover);
2798
- }
2799
- };
2800
- const onPointerLeave = (_, keepHover) => {
2801
- submenuCtx.off();
2802
- !keepHover && unsetHover();
2803
- };
2804
- useItemEffect(isDisabled, itemRef, updateItems);
2805
- React.useEffect(() => {
2806
- if (isHovering && isParentOpen) {
2807
- focusRef.current && focusRef.current.focus();
2808
- }
2809
- }, [focusRef, isHovering, isParentOpen]);
2810
- return {
2811
- setHover,
2812
- onBlur,
2813
- onPointerMove,
2814
- onPointerLeave
2815
- };
2816
- };
2817
-
2818
- const MenuItem$1 = /*#__PURE__*/withHovering('MenuItem', function MenuItem({
2819
- className,
2820
- value,
2821
- href,
2822
- type,
2823
- checked,
2824
- disabled,
2825
- children,
2826
- onClick,
2827
- isHovering,
2828
- itemRef,
2829
- externalRef,
2830
- ...restProps
2831
- }) {
2832
- const isDisabled = !!disabled;
2833
- const {
2834
- setHover,
2835
- ...restStateProps
2836
- } = useItemState(itemRef, itemRef, isHovering, isDisabled);
2837
- const eventHandlers = React.useContext(EventHandlersContext);
2838
- const radioGroup = React.useContext(RadioGroupContext);
2839
- const isRadio = type === 'radio';
2840
- const isCheckBox = type === 'checkbox';
2841
- const isAnchor = !!href && !isDisabled && !isRadio && !isCheckBox;
2842
- const isChecked = isRadio ? radioGroup.value === value : isCheckBox ? !!checked : false;
2843
- const handleClick = e => {
2844
- if (isDisabled) {
2845
- e.stopPropagation();
2846
- e.preventDefault();
2847
- return;
2848
- }
2849
- const event = {
2850
- value,
2851
- syntheticEvent: e
2852
- };
2853
- if (e.key !== undefined) event.key = e.key;
2854
- if (isCheckBox) event.checked = !isChecked;
2855
- if (isRadio) event.name = radioGroup.name;
2856
- safeCall(onClick, event);
2857
- if (isRadio) safeCall(radioGroup.onRadioChange, event);
2858
- eventHandlers.handleClick(event, isCheckBox || isRadio);
2859
- };
2860
- const handleKeyDown = e => {
2861
- if (!isHovering) return;
2862
- switch (e.key) {
2863
- case Keys.ENTER:
2864
- e.preventDefault();
2865
- case Keys.SPACE:
2866
- isAnchor ? itemRef.current.click() : handleClick(e);
2867
- }
2868
- };
2869
- const modifiers = React.useMemo(() => ({
2870
- type,
2871
- disabled: isDisabled,
2872
- hover: isHovering,
2873
- checked: isChecked,
2874
- anchor: isAnchor
2875
- }), [type, isDisabled, isHovering, isChecked, isAnchor]);
2876
- const mergedProps = mergeProps({
2877
- ...restStateProps,
2878
- onPointerDown: setHover,
2879
- onKeyDown: handleKeyDown,
2880
- onClick: handleClick
2881
- }, restProps);
2882
- const menuItemProps = {
2883
- role: isRadio ? 'menuitemradio' : isCheckBox ? 'menuitemcheckbox' : roleMenuitem,
2884
- 'aria-checked': isRadio || isCheckBox ? isChecked : undefined,
2885
- ...commonProps(isDisabled, isHovering),
2886
- ...mergedProps,
2887
- ref: useCombinedRef(externalRef, itemRef),
2888
- className: useBEM({
2889
- block: menuClass,
2890
- element: menuItemClass,
2891
- modifiers,
2892
- className
2893
- }),
2894
- children: React.useMemo(() => safeCall(children, modifiers), [children, modifiers])
2895
- };
2896
- return isAnchor ? /*#__PURE__*/jsxRuntime.jsx("li", {
2897
- role: roleNone,
2898
- children: /*#__PURE__*/jsxRuntime.jsx("a", {
2899
- href: href,
2900
- ...menuItemProps
2901
- })
2902
- }) : /*#__PURE__*/jsxRuntime.jsx("li", {
2903
- ...menuItemProps
2904
- });
2905
- });
2906
- process.env.NODE_ENV !== "production" ? MenuItem$1.propTypes = {
2907
- ...stylePropTypes(),
2908
- value: propTypesExports.any,
2909
- href: propTypesExports.string,
2910
- type: /*#__PURE__*/propTypesExports.oneOf(['checkbox', 'radio']),
2911
- checked: propTypesExports.bool,
2912
- disabled: propTypesExports.bool,
2913
- children: /*#__PURE__*/propTypesExports.oneOfType([propTypesExports.node, propTypesExports.func]),
2914
- onClick: propTypesExports.func
2915
- } : void 0;
2916
-
2917
- function styleInject(css, ref) {
2918
- if ( ref === void 0 ) ref = {};
2919
- var insertAt = ref.insertAt;
2920
-
2921
- if (!css || typeof document === 'undefined') { return; }
2922
-
2923
- var head = document.head || document.getElementsByTagName('head')[0];
2924
- var style = document.createElement('style');
2925
- style.type = 'text/css';
2926
-
2927
- if (insertAt === 'top') {
2928
- if (head.firstChild) {
2929
- head.insertBefore(style, head.firstChild);
2930
- } else {
2931
- head.appendChild(style);
2932
- }
2933
- } else {
2934
- head.appendChild(style);
2935
- }
2936
-
2937
- if (style.styleSheet) {
2938
- style.styleSheet.cssText = css;
2939
- } else {
2940
- style.appendChild(document.createTextNode(css));
2941
- }
2942
- }
2943
-
2944
- var css_248z$2 = ".szh-menu-button {\n box-sizing: border-box;\n}\n\n.vchasno-ui-menu-button {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 5px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n transition: background-color var(--vchasno-ui-transition-duration-sec);\n}\n\n.vchasno-ui-menu-button:hover {\n background-color: var(--vchasno-ui-menu-button-bg);\n}\n";
2945
- styleInject(css_248z$2);
2946
-
2947
- var MenuButton = React.forwardRef(function (props, ref) {
2948
- return (React.createElement(MenuButton$1, __assign({}, props, { className: cn('vchasno-ui-menu-button', props.className), ref: ref })));
2949
- });
2950
- MenuButton.displayName = 'MenuButton';
2951
-
2952
- var css_248z$1 = ".szh-menu__item {\n position: relative;\n display: flex;\n align-items: center;\n padding: 10px 12px;\n cursor: pointer;\n transition: background-color var(--vchasno-ui-transition-duration-sec);\n}\n\n.szh-menu__item + .szh-menu__item {\n margin-top: 4px;\n}\n\n.szh-menu__item:focus {\n outline: none;\n}\n\n.szh-menu__item--hover {\n background-color: var(--vchasno-ui-menu-item-hover-bg);\n}\n\n.szh-menu__item--focusable {\n background-color: inherit;\n cursor: default;\n}\n\n.szh-menu__item--disabled {\n color: #aaa;\n cursor: default;\n}\n";
2953
- styleInject(css_248z$1);
2954
-
2955
- var MenuItem = React.forwardRef(function (props, ref) {
2956
- return React.createElement(MenuItem$1, __assign({}, props, { ref: ref }));
2957
- });
2958
- MenuItem.displayName = 'MenuButton';
2959
-
2960
- var css_248z = ".szh-menu {\n z-index: 100;\n width: max-content;\n min-width: 10rem;\n box-sizing: border-box;\n padding: 8px;\n border: 1px solid var(--vchasno-ui-input-border-color-default);\n border-radius: 4px;\n margin: 0;\n background-color: #fff;\n color: #212529;\n list-style: none;\n user-select: none;\n}\n\n.szh-menu:focus {\n outline: none;\n}\n\n.szh-menu__arrow {\n z-index: -1;\n width: 0.75rem;\n height: 0.75rem;\n box-sizing: border-box;\n border: 1px solid transparent;\n border-top-color: rgb(0 0 0 / 10%);\n border-left-color: rgb(0 0 0 / 10%);\n background-color: #fff;\n}\n\n.szh-menu__arrow--dir-left {\n right: -0.375rem;\n transform: translateY(-50%) rotate(135deg);\n}\n\n.szh-menu__arrow--dir-right {\n left: -0.375rem;\n transform: translateY(-50%) rotate(-45deg);\n}\n\n.szh-menu__arrow--dir-top {\n bottom: -0.375rem;\n transform: translateX(-50%) rotate(-135deg);\n}\n\n.szh-menu__arrow--dir-bottom {\n top: -0.375rem;\n transform: translateX(-50%) rotate(45deg);\n}\n\n.szh-menu__group {\n box-sizing: border-box;\n}\n\n.szh-menu__radio-group {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.szh-menu__divider {\n height: 1px;\n margin: 0.5rem 0;\n background-color: rgb(0 0 0 / 12%);\n}\n\n.szh-menu-container--itemTransition .szh-menu__item {\n transition-duration: 0.15s;\n transition-property: background-color, color;\n transition-timing-function: ease-in-out;\n}\n\n.szh-menu__item--type-radio {\n padding-left: 2.2rem;\n}\n\n.szh-menu__item--type-radio::before {\n position: absolute;\n top: 0.55rem;\n left: 0.8rem;\n content: \"○\";\n font-size: 0.8rem;\n}\n\n.szh-menu__item--type-radio.szh-menu__item--checked::before {\n content: \"●\";\n}\n\n.szh-menu__item--type-checkbox {\n padding-left: 2.2rem;\n}\n\n.szh-menu__item--type-checkbox::before {\n position: absolute;\n left: 0.8rem;\n}\n\n.szh-menu__item--type-checkbox.szh-menu__item--checked::before {\n content: \"✔\";\n}\n\n.szh-menu__submenu > .szh-menu__item {\n padding-right: 2.5rem;\n}\n\n.szh-menu__submenu > .szh-menu__item::after {\n position: absolute;\n right: 1rem;\n content: \"❯\";\n}\n\n.szh-menu__header {\n padding: 0.2rem 1.5rem;\n color: #888;\n font-size: 0.8rem;\n text-transform: uppercase;\n}\n";
2961
- styleInject(css_248z);
2962
-
2963
- var Menu = React.forwardRef(function (props, ref) {
2964
- return React.createElement(Menu$2, __assign({ gap: 3, direction: "bottom", align: "end" }, props, { ref: ref }));
2965
- });
2966
- Menu.displayName = 'Menu';
2967
- var Menu$1 = Object.assign(Menu, { Button: MenuButton, Item: MenuItem });
2968
-
2969
- module.exports = Menu$1;
2970
- //# sourceMappingURL=index.cjs.js.map