@via-profit/ui-kit 0.4.0 → 0.6.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 (1060) hide show
  1. package/Accordion/AccordionActions.d.ts +1 -1
  2. package/Accordion/AccordionActions.js +2 -1
  3. package/Accordion/AccordionContainer.d.ts +1 -1
  4. package/Accordion/AccordionContainer.js +2 -13
  5. package/Accordion/AccordionContent.d.ts +1 -1
  6. package/Accordion/AccordionContent.js +5 -1
  7. package/Accordion/AccordionHeader.d.ts +2 -2
  8. package/Accordion/AccordionHeader.js +8 -2
  9. package/Accordion/index.d.ts +9 -9
  10. package/Accordion/index.js +17 -7
  11. package/Autocomplete/AutocompleteContainer.d.ts +2 -2
  12. package/Autocomplete/AutocompleteContainer.js +17 -7
  13. package/Autocomplete/AutocompleteItem.js +2 -1
  14. package/Autocomplete/context.d.ts +3 -3
  15. package/Autocomplete/index.d.ts +2 -2
  16. package/Avatar/AvatarContainer.d.ts +2 -2
  17. package/Avatar/AvatarPicture.d.ts +2 -2
  18. package/Badge/BadgeBase.d.ts +1 -1
  19. package/Badge/BadgeContainer.d.ts +1 -1
  20. package/Badge/BadgeDeleteButton.d.ts +2 -2
  21. package/Badge/BadgeStyled.js +3 -1
  22. package/Badge/index.d.ts +1 -1
  23. package/Button/ButtonBase.d.ts +10 -2
  24. package/Button/ButtonBase.js +2 -2
  25. package/Button/ButtonContainer.d.ts +20 -2
  26. package/Button/ButtonContainer.js +28 -7
  27. package/Button/ButtonIconWrapper.d.ts +1 -1
  28. package/Button/ButtonStyled.d.ts +3 -2
  29. package/Button/ButtonStyled.js +3 -167
  30. package/Button/ButtonTextWrapper.d.ts +1 -1
  31. package/Button/buttonVariants.d.ts +16 -0
  32. package/Button/buttonVariants.js +169 -0
  33. package/Button/index.d.ts +1 -1
  34. package/ButtonGroup/index.js +4 -3
  35. package/CHANGELOG.md +70 -1
  36. package/Calendar/CalendarComponent.js +17 -7
  37. package/Calendar/CalendarControlButton.d.ts +2 -2
  38. package/Calendar/CalendarPaper.js +2 -1
  39. package/Calendar/CalendarWeekDayLabel.d.ts +2 -2
  40. package/Calendar/CalendarWeekRowButton.d.ts +1 -1
  41. package/Calendar/IconChevronDown.js +17 -7
  42. package/Calendar/index.d.ts +1 -1
  43. package/Calendar/index.js +17 -7
  44. package/Checkbox/CheckboxAsterisk.js +17 -7
  45. package/Checkbox/CheckboxBox.d.ts +2 -2
  46. package/Checkbox/CheckboxBox.js +3 -1
  47. package/Checkbox/CheckboxContainer.d.ts +2 -2
  48. package/Checkbox/CheckboxErrorText.js +17 -7
  49. package/Checkbox/index.d.ts +10 -10
  50. package/Checkbox/useCheckboxColor.d.ts +1 -1
  51. package/ClickOutside/index.js +5 -2
  52. package/DatePicker/index.d.ts +1 -1
  53. package/ErrorBoundary/RenderError.d.ts +2 -0
  54. package/ErrorBoundary/RenderError.js +20 -13
  55. package/ErrorBoundary/index.d.ts +20 -7
  56. package/ErrorBoundary/index.js +7 -8
  57. package/Grid/index.d.ts +17 -5
  58. package/Grid/index.js +7 -2
  59. package/LoadingIndicator/LoadingOverlay.js +17 -7
  60. package/LoadingIndicator/Spinner.js +17 -7
  61. package/LoadingIndicator/SpinnerCircle.d.ts +2 -3
  62. package/Menu/MenuContainer.d.ts +2 -2
  63. package/Menu/MenuContainer.js +18 -8
  64. package/Menu/MenuItem.js +5 -1
  65. package/Menu/MenuList.js +2 -1
  66. package/Menu/context.d.ts +1 -1
  67. package/Menu/index.d.ts +1 -1
  68. package/Modal/BaseModal/ModalInner.js +2 -0
  69. package/Modal/BaseModal/ModalWrapper.js +30 -37
  70. package/Modal/BaseModal/context.d.ts +1 -1
  71. package/Modal/ConfirmBox/ConfirmBoxContent.js +5 -1
  72. package/Modal/ConfirmBox/ConfirmBoxFooter.js +5 -1
  73. package/Modal/ConfirmBox/ConfirmBoxHeader.js +5 -1
  74. package/Modal/Dialog/DialogInner.js +5 -1
  75. package/Modal/Dialog/index.js +17 -7
  76. package/Modal/Drawer/DrawerCloseIcon.js +17 -7
  77. package/Modal/Drawer/DrawerFooter.js +5 -1
  78. package/Modal/Drawer/DrawerHeader.d.ts +4 -4
  79. package/Modal/Drawer/DrawerHeader.js +5 -1
  80. package/Modal/Drawer/index.js +17 -7
  81. package/Modal/MessageBox/MessageBoxContent.js +5 -1
  82. package/Modal/MessageBox/MessageBoxFooter.js +5 -1
  83. package/Modal/MessageBox/MessageBoxHeader.js +5 -1
  84. package/Modal/MessageBox/index.js +17 -7
  85. package/Modal/index.js +17 -7
  86. package/Pagination/PaginationContainer.d.ts +9 -0
  87. package/Pagination/PaginationContainer.js +34 -0
  88. package/Pagination/PaginationGap.d.ts +4 -0
  89. package/Pagination/PaginationGap.js +22 -0
  90. package/Pagination/PaginationIcons.d.ts +6 -0
  91. package/Pagination/PaginationIcons.js +21 -0
  92. package/Pagination/PaginationItem.d.ts +44 -0
  93. package/Pagination/PaginationItem.js +59 -0
  94. package/Pagination/getPaginationItems.d.ts +22 -0
  95. package/Pagination/getPaginationItems.js +42 -0
  96. package/Pagination/index.d.ts +104 -0
  97. package/Pagination/index.js +98 -0
  98. package/Pagination/usePagination.d.ts +105 -0
  99. package/Pagination/usePagination.js +66 -0
  100. package/PhoneField/CountryFlagComponent.d.ts +1 -1
  101. package/PhoneField/CountryFlagComponent.js +1 -1
  102. package/PhoneField/UnknownFlag.d.ts +1 -2
  103. package/PhoneField/UnknownFlag.js +2 -2
  104. package/PhoneField/flags/BY.js +49 -0
  105. package/PhoneField/flags/CN.js +45 -0
  106. package/PhoneField/flags/IL.js +45 -0
  107. package/PhoneField/flags/JP.js +44 -0
  108. package/PhoneField/flags/KZ.js +45 -0
  109. package/PhoneField/flags/RU.js +46 -0
  110. package/PhoneField/flags/UA.js +44 -0
  111. package/PhoneField/flags/US.js +48 -0
  112. package/PhoneField/flags/Unknown.js +52 -0
  113. package/PhoneField/templates.d.ts +2 -2
  114. package/PhoneField/templates.js +8 -8
  115. package/PhoneField/usePhoneUtils.js +1 -1
  116. package/Radio/RadioBox.d.ts +1 -1
  117. package/Radio/RadioBox.js +3 -1
  118. package/Radio/RadioContainer.d.ts +2 -2
  119. package/Radio/index.d.ts +5 -5
  120. package/Radio/useRadioColor.d.ts +1 -1
  121. package/RadioGroup/RadioGroupAsterisk.js +17 -7
  122. package/RadioGroup/RadioGroupErrorText.js +17 -7
  123. package/RadioGroup/RadioGroupItems.d.ts +1 -1
  124. package/RadioGroup/index.d.ts +11 -11
  125. package/Selectbox/SelectboxButton.d.ts +4 -4
  126. package/Selectbox/SelectboxButton.js +27 -10
  127. package/Selectbox/SelectboxButtonWrapper.d.ts +2 -2
  128. package/Selectbox/SelectboxButtonWrapper.js +19 -10
  129. package/Selectbox/SelectboxMenu.d.ts +2 -2
  130. package/Selectbox/SelectboxMenu.js +17 -7
  131. package/Selectbox/index.d.ts +2 -2
  132. package/Selectbox/index.js +17 -7
  133. package/Slider/SliderContainer.d.ts +19 -0
  134. package/Slider/SliderContainer.js +50 -0
  135. package/Slider/SliderMark.d.ts +25 -0
  136. package/Slider/SliderMark.js +40 -0
  137. package/Slider/SliderMarkLabel.d.ts +25 -0
  138. package/Slider/SliderMarkLabel.js +34 -0
  139. package/Slider/SliderRail.d.ts +13 -0
  140. package/Slider/SliderRail.js +49 -0
  141. package/Slider/SliderThumb.d.ts +37 -0
  142. package/Slider/SliderThumb.js +71 -0
  143. package/Slider/SliderTrack.d.ts +29 -0
  144. package/Slider/SliderTrack.js +48 -0
  145. package/Slider/index.d.ts +134 -0
  146. package/Slider/index.js +249 -0
  147. package/Slider/useSliderColor.d.ts +6 -0
  148. package/Slider/useSliderColor.js +33 -0
  149. package/Slider/utils.d.ts +10 -0
  150. package/Slider/utils.js +31 -0
  151. package/Stack/index.d.ts +18 -6
  152. package/Stack/index.js +7 -2
  153. package/Surface/SurfaceContainer.d.ts +3 -3
  154. package/Surface/SurfaceContainer.js +2 -1
  155. package/Surface/SurfaceContent.d.ts +2 -2
  156. package/Surface/SurfaceContent.js +18 -11
  157. package/Surface/SurfaceFooter.d.ts +2 -2
  158. package/Surface/SurfaceFooter.js +5 -1
  159. package/Surface/SurfaceHeader.d.ts +2 -2
  160. package/Surface/SurfaceHeader.js +6 -2
  161. package/Surface/SurfaceSubheader.d.ts +2 -2
  162. package/Surface/SurfaceSubheader.js +6 -2
  163. package/Surface/index.d.ts +10 -10
  164. package/Surface/index.js +17 -7
  165. package/Swiper/Swiper.d.ts +15 -15
  166. package/Swiper/Swiper.js +17 -7
  167. package/Swiper/SwiperContainer.d.ts +2 -2
  168. package/Swiper/SwiperSlide.js +17 -7
  169. package/Swiper/SwiperSlidesRenderer.js +17 -7
  170. package/Swiper/SwiperTrack.d.ts +2 -2
  171. package/Swiper/SwiperTrack.js +17 -7
  172. package/Swiper/SwiperWrapper.d.ts +2 -2
  173. package/Swiper/SwiperWrapper.js +19 -7
  174. package/Switch/SwitchAsterisk.js +17 -7
  175. package/Switch/SwitchContainer.d.ts +2 -2
  176. package/Switch/SwitchDot.d.ts +1 -1
  177. package/Switch/SwitchDot.js +2 -4
  178. package/Switch/SwitchErrorText.js +17 -7
  179. package/Switch/SwitchToggleWrapper.js +2 -0
  180. package/Switch/SwitchTrack.d.ts +1 -1
  181. package/Switch/index.d.ts +9 -9
  182. package/Switch/useSwitchColor.d.ts +1 -1
  183. package/Table/Table.d.ts +1 -1
  184. package/Table/Table.js +2 -1
  185. package/Table/TableCaption.js +5 -1
  186. package/Table/TableCell.js +6 -2
  187. package/Table/TableFooter.js +2 -1
  188. package/Table/TableHeaderCell.js +6 -2
  189. package/Tabs/Tab.d.ts +14 -0
  190. package/Tabs/Tab.js +131 -0
  191. package/Tabs/TabList.d.ts +4 -0
  192. package/Tabs/TabList.js +104 -0
  193. package/Tabs/TabPanel.d.ts +26 -0
  194. package/Tabs/TabPanel.js +51 -0
  195. package/Tabs/Tabs.d.ts +79 -0
  196. package/Tabs/Tabs.js +80 -0
  197. package/Tabs/context.d.ts +23 -0
  198. package/Tabs/context.js +16 -0
  199. package/Tabs/index.d.ts +10 -0
  200. package/Tabs/index.js +14 -0
  201. package/Tabs/useTabsColor.d.ts +6 -0
  202. package/Tabs/useTabsColor.js +33 -0
  203. package/TextArea/TextAreaIconWrapper.d.ts +3 -3
  204. package/TextArea/TextAreaIconWrapper.js +17 -7
  205. package/TextArea/TextAreaInput.js +23 -8
  206. package/TextArea/index.js +17 -7
  207. package/TextField/TextFieldContainer.js +17 -7
  208. package/TextField/TextFieldErrorText.js +17 -7
  209. package/TextField/TextFieldIconWrapper.d.ts +3 -3
  210. package/TextField/TextFieldIconWrapper.js +17 -7
  211. package/TextField/TextFieldInput.js +23 -8
  212. package/TextField/TextFieldInputWrapper.d.ts +5 -5
  213. package/TextField/TextFieldInputWrapper.js +22 -9
  214. package/TextField/TextFieldLabel.js +17 -7
  215. package/TextField/TextFieldLabelAsterisk.js +17 -7
  216. package/TextField/index.d.ts +1 -1
  217. package/TextField/index.js +17 -7
  218. package/ThemeProvider/createTheme.js +8 -2
  219. package/ThemeProvider/index.d.ts +87 -1
  220. package/ThemeProvider/index.js +1 -0
  221. package/ThemeProvider/tokens.d.ts +66 -0
  222. package/ThemeProvider/tokens.js +90 -0
  223. package/Toast/ToastAction.d.ts +4 -0
  224. package/Toast/ToastAction.js +32 -0
  225. package/Toast/ToastCard.d.ts +20 -0
  226. package/Toast/ToastCard.js +89 -0
  227. package/Toast/ToastCloseButton.d.ts +4 -0
  228. package/Toast/ToastCloseButton.js +48 -0
  229. package/Toast/ToastContainer.d.ts +88 -0
  230. package/Toast/ToastContainer.js +154 -0
  231. package/Toast/ToastIcon.d.ts +11 -0
  232. package/Toast/ToastIcon.js +71 -0
  233. package/Toast/ToastItem.d.ts +29 -0
  234. package/Toast/ToastItem.js +120 -0
  235. package/Toast/index.d.ts +6 -0
  236. package/Toast/index.js +11 -0
  237. package/Toast/store.d.ts +155 -0
  238. package/Toast/store.js +75 -0
  239. package/Tooltip/TooltipArrow.d.ts +15 -0
  240. package/Tooltip/TooltipArrow.js +62 -0
  241. package/Tooltip/TooltipContainer.d.ts +4 -0
  242. package/Tooltip/TooltipContainer.js +54 -0
  243. package/Tooltip/index.d.ts +78 -0
  244. package/Tooltip/index.js +195 -0
  245. package/Typography/Base.d.ts +2 -3
  246. package/Typography/Blockquote.d.ts +2 -3
  247. package/Typography/List.d.ts +6 -7
  248. package/Typography/Paragraph.d.ts +1 -1
  249. package/Typography/Paragraph.js +17 -7
  250. package/Typography/SectionDescription.d.ts +2 -3
  251. package/Typography/U.d.ts +2 -3
  252. package/esm/Accordion/AccordionActions.js +27 -0
  253. package/esm/Accordion/AccordionContainer.js +45 -0
  254. package/esm/Accordion/AccordionContent.js +43 -0
  255. package/esm/Accordion/AccordionHeader.js +71 -0
  256. package/esm/Accordion/Chevron.js +8 -0
  257. package/esm/Accordion/index.js +52 -0
  258. package/esm/Autocomplete/AutocompleteContainer.js +403 -0
  259. package/esm/Autocomplete/AutocompleteItem.js +39 -0
  260. package/esm/Autocomplete/AutocompleteTagsInput.js +59 -0
  261. package/esm/Autocomplete/IconClear.js +4 -0
  262. package/esm/Autocomplete/context.js +58 -0
  263. package/esm/Autocomplete/index.js +32 -0
  264. package/esm/Avatar/AvatarBase.js +30 -0
  265. package/esm/Avatar/AvatarContainer.js +34 -0
  266. package/esm/Avatar/AvatarIconWrapper.js +25 -0
  267. package/esm/Avatar/AvatarOnlineBadge.js +31 -0
  268. package/esm/Avatar/AvatarPicture.js +69 -0
  269. package/esm/Avatar/AvatarTextWrapper.js +31 -0
  270. package/esm/Avatar/index.js +107 -0
  271. package/esm/Badge/BadgeBase.js +48 -0
  272. package/esm/Badge/BadgeContainer.js +38 -0
  273. package/esm/Badge/BadgeDeleteButton.js +87 -0
  274. package/esm/Badge/BadgeIconWrapper.js +24 -0
  275. package/esm/Badge/BadgeOutlined.js +7 -0
  276. package/esm/Badge/BadgeStandard.js +7 -0
  277. package/esm/Badge/BadgeStyled.js +122 -0
  278. package/esm/Badge/BadgeTextWrapper.js +25 -0
  279. package/esm/Badge/index.js +5 -0
  280. package/esm/Button/ButtonBase.js +37 -0
  281. package/esm/Button/ButtonContainer.js +73 -0
  282. package/esm/Button/ButtonIconWrapper.js +32 -0
  283. package/esm/Button/ButtonOutlined.js +7 -0
  284. package/esm/Button/ButtonPlain.js +7 -0
  285. package/esm/Button/ButtonStandard.js +7 -0
  286. package/esm/Button/ButtonStyled.js +36 -0
  287. package/esm/Button/ButtonTextWrapper.js +30 -0
  288. package/esm/Button/buttonVariants.js +162 -0
  289. package/esm/Button/index.js +5 -0
  290. package/esm/ButtonGroup/ButtonGroupContext.js +6 -0
  291. package/esm/ButtonGroup/index.js +128 -0
  292. package/esm/Calendar/CalendarBody.js +25 -0
  293. package/esm/Calendar/CalendarCell.js +62 -0
  294. package/esm/Calendar/CalendarComponent.js +665 -0
  295. package/esm/Calendar/CalendarControlButton.js +39 -0
  296. package/esm/Calendar/CalendarDateContainer.js +24 -0
  297. package/esm/Calendar/CalendarDayBadge.js +70 -0
  298. package/esm/Calendar/CalendarEmptyCell.js +32 -0
  299. package/esm/Calendar/CalendarFooter.js +37 -0
  300. package/esm/Calendar/CalendarHeader.js +29 -0
  301. package/esm/Calendar/CalendarHeading.js +28 -0
  302. package/esm/Calendar/CalendarIconNext.js +4 -0
  303. package/esm/Calendar/CalendarIconPrev.js +4 -0
  304. package/esm/Calendar/CalendarMonthCell.js +28 -0
  305. package/esm/Calendar/CalendarMonthsSelector.js +25 -0
  306. package/esm/Calendar/CalendarPaper.js +29 -0
  307. package/esm/Calendar/CalendarSubheading.js +25 -0
  308. package/esm/Calendar/CalendarToolbar.js +26 -0
  309. package/esm/Calendar/CalendarWeekDayCell.js +27 -0
  310. package/esm/Calendar/CalendarWeekDayLabel.js +14 -0
  311. package/esm/Calendar/CalendarWeekDayWeekNumber.js +33 -0
  312. package/esm/Calendar/CalendarWeekDaysBar.js +34 -0
  313. package/esm/Calendar/CalendarWeekRow.js +25 -0
  314. package/esm/Calendar/CalendarWeekRowButton.js +26 -0
  315. package/esm/Calendar/CalendarYearCell.js +28 -0
  316. package/esm/Calendar/CalendarYearsSelector.js +59 -0
  317. package/esm/Calendar/IconChevronDown.js +6 -0
  318. package/esm/Calendar/index.js +8 -0
  319. package/esm/Calendar/use-calendar.js +155 -0
  320. package/esm/Checkbox/CheckboxAsterisk.js +25 -0
  321. package/esm/Checkbox/CheckboxBox.js +85 -0
  322. package/esm/Checkbox/CheckboxContainer.js +33 -0
  323. package/esm/Checkbox/CheckboxErrorText.js +48 -0
  324. package/esm/Checkbox/CheckboxIcon.js +52 -0
  325. package/esm/Checkbox/CheckboxTextWrapper.js +24 -0
  326. package/esm/Checkbox/CheckboxWrapper.js +24 -0
  327. package/esm/Checkbox/index.js +66 -0
  328. package/esm/Checkbox/useCheckboxColor.js +28 -0
  329. package/esm/ClickOutside/index.js +55 -0
  330. package/esm/Color/Color.js +324 -0
  331. package/esm/Color/ColorGenerator.js +137 -0
  332. package/esm/Color/ColorParser.js +320 -0
  333. package/esm/Color/index.js +5 -0
  334. package/esm/DatePicker/DatePickerIcon.js +4 -0
  335. package/esm/DatePicker/index.js +176 -0
  336. package/esm/DatePicker/useDatePickerFormat.js +121 -0
  337. package/esm/ErrorBoundary/RenderError.js +49 -0
  338. package/esm/ErrorBoundary/index.js +25 -0
  339. package/esm/Grid/index.js +43 -0
  340. package/esm/Highlighted/HighlightedContainer.js +17 -0
  341. package/esm/Highlighted/HighlightedMark.js +25 -0
  342. package/esm/Highlighted/HighlightedText.js +17 -0
  343. package/esm/Highlighted/index.js +50 -0
  344. package/esm/Image/index.js +40 -0
  345. package/esm/LoadingIndicator/LoadingOverlay.js +35 -0
  346. package/esm/LoadingIndicator/Spinner.js +53 -0
  347. package/esm/LoadingIndicator/SpinnerCircle.js +27 -0
  348. package/esm/LoadingIndicator/index.js +6 -0
  349. package/esm/MaskedField/index.js +74 -0
  350. package/esm/MaskedField/templates.js +80 -0
  351. package/esm/MaskedField/useMasked.js +106 -0
  352. package/esm/Menu/MenuContainer.js +365 -0
  353. package/esm/Menu/MenuItem.js +68 -0
  354. package/esm/Menu/MenuList.js +81 -0
  355. package/esm/Menu/context.js +41 -0
  356. package/esm/Menu/index.js +10 -0
  357. package/esm/Modal/BaseModal/ModalInner.js +42 -0
  358. package/esm/Modal/BaseModal/ModalInnerContainer.js +38 -0
  359. package/esm/Modal/BaseModal/ModalOverlay.js +28 -0
  360. package/esm/Modal/BaseModal/ModalWrapper.js +165 -0
  361. package/esm/Modal/BaseModal/RenderModal.js +31 -0
  362. package/esm/Modal/BaseModal/context.js +41 -0
  363. package/esm/Modal/BaseModal/index.js +49 -0
  364. package/esm/Modal/BaseModal/useDialogID.js +7 -0
  365. package/esm/Modal/ConfirmBox/ConfirmBoxContainer.js +27 -0
  366. package/esm/Modal/ConfirmBox/ConfirmBoxContent.js +26 -0
  367. package/esm/Modal/ConfirmBox/ConfirmBoxFooter.js +45 -0
  368. package/esm/Modal/ConfirmBox/ConfirmBoxHeader.js +30 -0
  369. package/esm/Modal/ConfirmBox/index.js +46 -0
  370. package/esm/Modal/Dialog/DialogInner.js +26 -0
  371. package/esm/Modal/Dialog/index.js +30 -0
  372. package/esm/Modal/Drawer/DrawerCloseIcon.js +12 -0
  373. package/esm/Modal/Drawer/DrawerContainer.js +26 -0
  374. package/esm/Modal/Drawer/DrawerContent.js +26 -0
  375. package/esm/Modal/Drawer/DrawerFooter.js +25 -0
  376. package/esm/Modal/Drawer/DrawerHeader.js +60 -0
  377. package/esm/Modal/Drawer/DrawerInner.js +145 -0
  378. package/esm/Modal/Drawer/index.js +49 -0
  379. package/esm/Modal/MessageBox/MessageBoxContainer.js +23 -0
  380. package/esm/Modal/MessageBox/MessageBoxContent.js +26 -0
  381. package/esm/Modal/MessageBox/MessageBoxFooter.js +44 -0
  382. package/esm/Modal/MessageBox/MessageBoxHeader.js +30 -0
  383. package/esm/Modal/MessageBox/index.js +47 -0
  384. package/esm/Modal/index.js +30 -0
  385. package/esm/NoSSR/index.js +10 -0
  386. package/esm/Pagination/PaginationContainer.js +29 -0
  387. package/esm/Pagination/PaginationGap.js +17 -0
  388. package/esm/Pagination/PaginationIcons.js +15 -0
  389. package/esm/Pagination/PaginationItem.js +54 -0
  390. package/esm/Pagination/getPaginationItems.js +40 -0
  391. package/esm/Pagination/index.js +77 -0
  392. package/esm/Pagination/usePagination.js +61 -0
  393. package/esm/PhoneField/CountryFlagComponent.js +39 -0
  394. package/esm/PhoneField/UnknownFlag.js +6 -0
  395. package/esm/PhoneField/flags/BY.js +11 -0
  396. package/esm/PhoneField/flags/CN.js +7 -0
  397. package/esm/PhoneField/flags/IL.js +7 -0
  398. package/esm/PhoneField/flags/JP.js +6 -0
  399. package/esm/PhoneField/flags/KZ.js +7 -0
  400. package/esm/PhoneField/flags/RU.js +8 -0
  401. package/esm/PhoneField/flags/UA.js +6 -0
  402. package/esm/PhoneField/flags/US.js +10 -0
  403. package/esm/PhoneField/flags/Unknown.js +14 -0
  404. package/esm/PhoneField/flags/isLabelled.js +5 -0
  405. package/esm/PhoneField/index.js +71 -0
  406. package/esm/PhoneField/templates.js +39 -0
  407. package/esm/PhoneField/usePhoneUtils.js +156 -0
  408. package/esm/Popper/Popper.js +97 -0
  409. package/esm/Popper/PopperContainer.js +27 -0
  410. package/esm/Popper/index.js +5 -0
  411. package/esm/Popper/usePopper.js +514 -0
  412. package/esm/Radio/RadioBox.js +97 -0
  413. package/esm/Radio/RadioContainer.js +33 -0
  414. package/esm/Radio/RadioTextWrapper.js +24 -0
  415. package/esm/Radio/index.js +44 -0
  416. package/esm/Radio/useRadioColor.js +28 -0
  417. package/esm/RadioGroup/RadioGroupAsterisk.js +25 -0
  418. package/esm/RadioGroup/RadioGroupContainer.js +31 -0
  419. package/esm/RadioGroup/RadioGroupContext.js +6 -0
  420. package/esm/RadioGroup/RadioGroupErrorText.js +48 -0
  421. package/esm/RadioGroup/RadioGroupItems.js +25 -0
  422. package/esm/RadioGroup/RadioGroupLegend.js +32 -0
  423. package/esm/RadioGroup/index.js +57 -0
  424. package/esm/Selectbox/SelectboxButton.js +59 -0
  425. package/esm/Selectbox/SelectboxButtonWrapper.js +33 -0
  426. package/esm/Selectbox/SelectboxChevronIcon.js +23 -0
  427. package/esm/Selectbox/SelectboxContainer.js +23 -0
  428. package/esm/Selectbox/SelectboxMenu.js +30 -0
  429. package/esm/Selectbox/index.js +128 -0
  430. package/esm/Slider/SliderContainer.js +45 -0
  431. package/esm/Slider/SliderMark.js +35 -0
  432. package/esm/Slider/SliderMarkLabel.js +29 -0
  433. package/esm/Slider/SliderRail.js +44 -0
  434. package/esm/Slider/SliderThumb.js +66 -0
  435. package/esm/Slider/SliderTrack.js +43 -0
  436. package/esm/Slider/index.js +244 -0
  437. package/esm/Slider/useSliderColor.js +28 -0
  438. package/esm/Slider/utils.js +25 -0
  439. package/esm/Stack/index.js +38 -0
  440. package/esm/Surface/SurfaceContainer.js +41 -0
  441. package/esm/Surface/SurfaceContent.js +41 -0
  442. package/esm/Surface/SurfaceFooter.js +30 -0
  443. package/esm/Surface/SurfaceHeader.js +29 -0
  444. package/esm/Surface/SurfaceSubheader.js +28 -0
  445. package/esm/Surface/index.js +43 -0
  446. package/esm/Swiper/Swiper.js +518 -0
  447. package/esm/Swiper/SwiperContainer.js +7 -0
  448. package/esm/Swiper/SwiperSlide.js +29 -0
  449. package/esm/Swiper/SwiperSlidesRenderer.js +52 -0
  450. package/esm/Swiper/SwiperTrack.js +31 -0
  451. package/esm/Swiper/SwiperWrapper.js +41 -0
  452. package/esm/Swiper/index.js +7 -0
  453. package/esm/Switch/SwitchAsterisk.js +25 -0
  454. package/esm/Switch/SwitchContainer.js +47 -0
  455. package/esm/Switch/SwitchDot.js +98 -0
  456. package/esm/Switch/SwitchErrorText.js +48 -0
  457. package/esm/Switch/SwitchTextWrapper.js +25 -0
  458. package/esm/Switch/SwitchToggleWrapper.js +53 -0
  459. package/esm/Switch/SwitchTrack.js +39 -0
  460. package/esm/Switch/SwitchWrapper.js +26 -0
  461. package/esm/Switch/index.js +61 -0
  462. package/esm/Switch/useSwitchColor.js +28 -0
  463. package/esm/Table/Table.js +41 -0
  464. package/esm/Table/TableBody.js +27 -0
  465. package/esm/Table/TableCaption.js +28 -0
  466. package/esm/Table/TableCell.js +27 -0
  467. package/esm/Table/TableFooter.js +33 -0
  468. package/esm/Table/TableHeader.js +29 -0
  469. package/esm/Table/TableHeaderCell.js +33 -0
  470. package/esm/Table/TableRow.js +21 -0
  471. package/esm/Table/index.js +18 -0
  472. package/esm/Tabs/Tab.js +126 -0
  473. package/esm/Tabs/TabList.js +99 -0
  474. package/esm/Tabs/TabPanel.js +46 -0
  475. package/esm/Tabs/Tabs.js +75 -0
  476. package/esm/Tabs/context.js +9 -0
  477. package/esm/Tabs/index.js +5 -0
  478. package/esm/Tabs/useTabsColor.js +28 -0
  479. package/esm/TextArea/TextAreaIconWrapper.js +25 -0
  480. package/esm/TextArea/TextAreaInput.js +51 -0
  481. package/esm/TextArea/index.js +66 -0
  482. package/esm/TextField/TextFieldContainer.js +26 -0
  483. package/esm/TextField/TextFieldErrorText.js +48 -0
  484. package/esm/TextField/TextFieldIconWrapper.js +46 -0
  485. package/esm/TextField/TextFieldInput.js +51 -0
  486. package/esm/TextField/TextFieldInputWrapper.js +62 -0
  487. package/esm/TextField/TextFieldLabel.js +23 -0
  488. package/esm/TextField/TextFieldLabelAsterisk.js +24 -0
  489. package/esm/TextField/index.js +86 -0
  490. package/esm/ThemeProvider/createTheme.js +46 -0
  491. package/esm/ThemeProvider/index.js +10 -0
  492. package/esm/ThemeProvider/tokens.js +79 -0
  493. package/esm/Toast/ToastAction.js +27 -0
  494. package/esm/Toast/ToastCard.js +83 -0
  495. package/esm/Toast/ToastCloseButton.js +43 -0
  496. package/esm/Toast/ToastContainer.js +149 -0
  497. package/esm/Toast/ToastIcon.js +66 -0
  498. package/esm/Toast/ToastItem.js +115 -0
  499. package/esm/Toast/index.js +4 -0
  500. package/esm/Toast/store.js +72 -0
  501. package/esm/Tooltip/TooltipArrow.js +57 -0
  502. package/esm/Tooltip/TooltipContainer.js +49 -0
  503. package/esm/Tooltip/index.js +190 -0
  504. package/esm/Typography/Base.js +11 -0
  505. package/esm/Typography/Blockquote.js +18 -0
  506. package/esm/Typography/Del.js +22 -0
  507. package/esm/Typography/Em.js +22 -0
  508. package/esm/Typography/H1.js +23 -0
  509. package/esm/Typography/H2.js +23 -0
  510. package/esm/Typography/H3.js +23 -0
  511. package/esm/Typography/H4.js +23 -0
  512. package/esm/Typography/H5.js +23 -0
  513. package/esm/Typography/H6.js +23 -0
  514. package/esm/Typography/List.js +26 -0
  515. package/esm/Typography/Paragraph.js +24 -0
  516. package/esm/Typography/SectionDescription.js +11 -0
  517. package/esm/Typography/SectionTitle.js +44 -0
  518. package/esm/Typography/Span.js +22 -0
  519. package/esm/Typography/Strong.js +22 -0
  520. package/esm/Typography/U.js +5 -0
  521. package/esm/Typography/index.js +20 -0
  522. package/esm/index.js +1 -0
  523. package/esm/utils/TabManager.js +139 -0
  524. package/esm/utils/getElementRef.js +13 -0
  525. package/esm/utils/spacing.js +10 -0
  526. package/package.json +1597 -74
  527. package/utils/getElementRef.d.ts +8 -0
  528. package/utils/getElementRef.js +18 -0
  529. package/CountryFlags/AC.js +0 -57
  530. package/CountryFlags/AD.js +0 -43
  531. package/CountryFlags/AE.js +0 -36
  532. package/CountryFlags/AF.js +0 -37
  533. package/CountryFlags/AG.js +0 -39
  534. package/CountryFlags/AI.js +0 -41
  535. package/CountryFlags/AL.js +0 -39
  536. package/CountryFlags/AM.d.ts +0 -3
  537. package/CountryFlags/AM.js +0 -35
  538. package/CountryFlags/AO.d.ts +0 -3
  539. package/CountryFlags/AO.js +0 -39
  540. package/CountryFlags/AQ.d.ts +0 -3
  541. package/CountryFlags/AQ.js +0 -34
  542. package/CountryFlags/AR.d.ts +0 -3
  543. package/CountryFlags/AR.js +0 -35
  544. package/CountryFlags/AS.d.ts +0 -3
  545. package/CountryFlags/AS.js +0 -37
  546. package/CountryFlags/AT.d.ts +0 -3
  547. package/CountryFlags/AT.js +0 -34
  548. package/CountryFlags/AU.d.ts +0 -3
  549. package/CountryFlags/AU.js +0 -45
  550. package/CountryFlags/AW.d.ts +0 -3
  551. package/CountryFlags/AW.js +0 -37
  552. package/CountryFlags/AX.d.ts +0 -3
  553. package/CountryFlags/AX.js +0 -35
  554. package/CountryFlags/AZ.d.ts +0 -3
  555. package/CountryFlags/AZ.js +0 -38
  556. package/CountryFlags/BA.d.ts +0 -3
  557. package/CountryFlags/BA.js +0 -44
  558. package/CountryFlags/BB.d.ts +0 -3
  559. package/CountryFlags/BB.js +0 -36
  560. package/CountryFlags/BD.d.ts +0 -3
  561. package/CountryFlags/BD.js +0 -34
  562. package/CountryFlags/BE.d.ts +0 -3
  563. package/CountryFlags/BE.js +0 -35
  564. package/CountryFlags/BF.d.ts +0 -3
  565. package/CountryFlags/BF.js +0 -35
  566. package/CountryFlags/BG.d.ts +0 -3
  567. package/CountryFlags/BG.js +0 -35
  568. package/CountryFlags/BH.d.ts +0 -3
  569. package/CountryFlags/BH.js +0 -34
  570. package/CountryFlags/BI.d.ts +0 -3
  571. package/CountryFlags/BI.js +0 -40
  572. package/CountryFlags/BJ.d.ts +0 -3
  573. package/CountryFlags/BJ.js +0 -35
  574. package/CountryFlags/BL.d.ts +0 -3
  575. package/CountryFlags/BL.js +0 -43
  576. package/CountryFlags/BM.d.ts +0 -3
  577. package/CountryFlags/BM.js +0 -44
  578. package/CountryFlags/BN.d.ts +0 -3
  579. package/CountryFlags/BN.js +0 -38
  580. package/CountryFlags/BO.d.ts +0 -3
  581. package/CountryFlags/BO.js +0 -35
  582. package/CountryFlags/BQ.d.ts +0 -3
  583. package/CountryFlags/BQ.js +0 -37
  584. package/CountryFlags/BR.d.ts +0 -3
  585. package/CountryFlags/BR.js +0 -36
  586. package/CountryFlags/BS.d.ts +0 -3
  587. package/CountryFlags/BS.js +0 -36
  588. package/CountryFlags/BT.d.ts +0 -3
  589. package/CountryFlags/BT.js +0 -35
  590. package/CountryFlags/BV.d.ts +0 -3
  591. package/CountryFlags/BV.js +0 -37
  592. package/CountryFlags/BW.d.ts +0 -3
  593. package/CountryFlags/BW.js +0 -36
  594. package/CountryFlags/BY.js +0 -39
  595. package/CountryFlags/BZ.d.ts +0 -3
  596. package/CountryFlags/BZ.js +0 -40
  597. package/CountryFlags/CA.d.ts +0 -3
  598. package/CountryFlags/CA.js +0 -35
  599. package/CountryFlags/CC.d.ts +0 -3
  600. package/CountryFlags/CC.js +0 -37
  601. package/CountryFlags/CD.d.ts +0 -3
  602. package/CountryFlags/CD.js +0 -36
  603. package/CountryFlags/CF.d.ts +0 -3
  604. package/CountryFlags/CF.js +0 -40
  605. package/CountryFlags/CG.d.ts +0 -3
  606. package/CountryFlags/CG.js +0 -35
  607. package/CountryFlags/CH.d.ts +0 -3
  608. package/CountryFlags/CH.js +0 -34
  609. package/CountryFlags/CI.d.ts +0 -3
  610. package/CountryFlags/CI.js +0 -35
  611. package/CountryFlags/CK.d.ts +0 -3
  612. package/CountryFlags/CK.js +0 -38
  613. package/CountryFlags/CL.d.ts +0 -3
  614. package/CountryFlags/CL.js +0 -36
  615. package/CountryFlags/CM.d.ts +0 -3
  616. package/CountryFlags/CM.js +0 -36
  617. package/CountryFlags/CN.js +0 -35
  618. package/CountryFlags/CO.d.ts +0 -3
  619. package/CountryFlags/CO.js +0 -35
  620. package/CountryFlags/CR.d.ts +0 -3
  621. package/CountryFlags/CR.js +0 -35
  622. package/CountryFlags/CU.d.ts +0 -3
  623. package/CountryFlags/CU.js +0 -38
  624. package/CountryFlags/CV.d.ts +0 -3
  625. package/CountryFlags/CV.js +0 -37
  626. package/CountryFlags/CW.d.ts +0 -3
  627. package/CountryFlags/CW.js +0 -36
  628. package/CountryFlags/CX.d.ts +0 -3
  629. package/CountryFlags/CX.js +0 -39
  630. package/CountryFlags/CY.d.ts +0 -3
  631. package/CountryFlags/CY.js +0 -38
  632. package/CountryFlags/CZ.d.ts +0 -3
  633. package/CountryFlags/CZ.js +0 -35
  634. package/CountryFlags/DE.d.ts +0 -3
  635. package/CountryFlags/DE.js +0 -35
  636. package/CountryFlags/DJ.d.ts +0 -3
  637. package/CountryFlags/DJ.js +0 -36
  638. package/CountryFlags/DK.d.ts +0 -3
  639. package/CountryFlags/DK.js +0 -34
  640. package/CountryFlags/DM.d.ts +0 -3
  641. package/CountryFlags/DM.js +0 -43
  642. package/CountryFlags/DO.d.ts +0 -3
  643. package/CountryFlags/DO.js +0 -42
  644. package/CountryFlags/DZ.d.ts +0 -3
  645. package/CountryFlags/DZ.js +0 -37
  646. package/CountryFlags/EC.d.ts +0 -3
  647. package/CountryFlags/EC.js +0 -39
  648. package/CountryFlags/EE.d.ts +0 -3
  649. package/CountryFlags/EE.js +0 -35
  650. package/CountryFlags/EG.d.ts +0 -3
  651. package/CountryFlags/EG.js +0 -36
  652. package/CountryFlags/EH.d.ts +0 -3
  653. package/CountryFlags/EH.js +0 -38
  654. package/CountryFlags/ER.d.ts +0 -3
  655. package/CountryFlags/ER.js +0 -44
  656. package/CountryFlags/ES.d.ts +0 -3
  657. package/CountryFlags/ES.js +0 -38
  658. package/CountryFlags/ET.d.ts +0 -3
  659. package/CountryFlags/ET.js +0 -41
  660. package/CountryFlags/EU.d.ts +0 -3
  661. package/CountryFlags/EU.js +0 -34
  662. package/CountryFlags/FI.d.ts +0 -3
  663. package/CountryFlags/FI.js +0 -34
  664. package/CountryFlags/FJ.d.ts +0 -3
  665. package/CountryFlags/FJ.js +0 -40
  666. package/CountryFlags/FK.d.ts +0 -3
  667. package/CountryFlags/FK.js +0 -47
  668. package/CountryFlags/FM.d.ts +0 -3
  669. package/CountryFlags/FM.js +0 -35
  670. package/CountryFlags/FO.d.ts +0 -3
  671. package/CountryFlags/FO.js +0 -35
  672. package/CountryFlags/FR.d.ts +0 -3
  673. package/CountryFlags/FR.js +0 -35
  674. package/CountryFlags/GA.d.ts +0 -3
  675. package/CountryFlags/GA.js +0 -35
  676. package/CountryFlags/GB.d.ts +0 -3
  677. package/CountryFlags/GB.js +0 -40
  678. package/CountryFlags/GD.d.ts +0 -3
  679. package/CountryFlags/GD.js +0 -42
  680. package/CountryFlags/GE.d.ts +0 -3
  681. package/CountryFlags/GE.js +0 -35
  682. package/CountryFlags/GEAB.d.ts +0 -3
  683. package/CountryFlags/GEAB.js +0 -44
  684. package/CountryFlags/GEOS.d.ts +0 -3
  685. package/CountryFlags/GEOS.js +0 -35
  686. package/CountryFlags/GF.d.ts +0 -3
  687. package/CountryFlags/GF.js +0 -35
  688. package/CountryFlags/GG.d.ts +0 -3
  689. package/CountryFlags/GG.js +0 -35
  690. package/CountryFlags/GH.d.ts +0 -3
  691. package/CountryFlags/GH.js +0 -36
  692. package/CountryFlags/GI.d.ts +0 -3
  693. package/CountryFlags/GI.js +0 -38
  694. package/CountryFlags/GL.d.ts +0 -3
  695. package/CountryFlags/GL.js +0 -36
  696. package/CountryFlags/GM.d.ts +0 -3
  697. package/CountryFlags/GM.js +0 -36
  698. package/CountryFlags/GN.d.ts +0 -3
  699. package/CountryFlags/GN.js +0 -35
  700. package/CountryFlags/GP.d.ts +0 -3
  701. package/CountryFlags/GP.js +0 -35
  702. package/CountryFlags/GQ.d.ts +0 -3
  703. package/CountryFlags/GQ.js +0 -41
  704. package/CountryFlags/GR.d.ts +0 -3
  705. package/CountryFlags/GR.js +0 -39
  706. package/CountryFlags/GS.d.ts +0 -3
  707. package/CountryFlags/GS.js +0 -53
  708. package/CountryFlags/GT.d.ts +0 -3
  709. package/CountryFlags/GT.js +0 -37
  710. package/CountryFlags/GU.d.ts +0 -3
  711. package/CountryFlags/GU.js +0 -41
  712. package/CountryFlags/GW.d.ts +0 -3
  713. package/CountryFlags/GW.js +0 -36
  714. package/CountryFlags/GY.d.ts +0 -3
  715. package/CountryFlags/GY.js +0 -37
  716. package/CountryFlags/HK.d.ts +0 -3
  717. package/CountryFlags/HK.js +0 -36
  718. package/CountryFlags/HM.d.ts +0 -3
  719. package/CountryFlags/HM.js +0 -45
  720. package/CountryFlags/HN.d.ts +0 -3
  721. package/CountryFlags/HN.js +0 -35
  722. package/CountryFlags/HR.d.ts +0 -3
  723. package/CountryFlags/HR.js +0 -42
  724. package/CountryFlags/HT.d.ts +0 -3
  725. package/CountryFlags/HT.js +0 -40
  726. package/CountryFlags/HU.d.ts +0 -3
  727. package/CountryFlags/HU.js +0 -35
  728. package/CountryFlags/IC.d.ts +0 -3
  729. package/CountryFlags/IC.js +0 -35
  730. package/CountryFlags/ID.d.ts +0 -3
  731. package/CountryFlags/ID.js +0 -34
  732. package/CountryFlags/IE.d.ts +0 -3
  733. package/CountryFlags/IE.js +0 -35
  734. package/CountryFlags/IL.d.ts +0 -3
  735. package/CountryFlags/IL.js +0 -35
  736. package/CountryFlags/IM.d.ts +0 -3
  737. package/CountryFlags/IM.js +0 -35
  738. package/CountryFlags/IN.d.ts +0 -3
  739. package/CountryFlags/IN.js +0 -39
  740. package/CountryFlags/IO.d.ts +0 -3
  741. package/CountryFlags/IO.js +0 -45
  742. package/CountryFlags/IQ.d.ts +0 -3
  743. package/CountryFlags/IQ.js +0 -37
  744. package/CountryFlags/IR.d.ts +0 -3
  745. package/CountryFlags/IR.js +0 -38
  746. package/CountryFlags/IS.d.ts +0 -3
  747. package/CountryFlags/IS.js +0 -35
  748. package/CountryFlags/IT.d.ts +0 -3
  749. package/CountryFlags/IT.js +0 -35
  750. package/CountryFlags/JE.d.ts +0 -3
  751. package/CountryFlags/JE.js +0 -36
  752. package/CountryFlags/JM.d.ts +0 -3
  753. package/CountryFlags/JM.js +0 -36
  754. package/CountryFlags/JO.d.ts +0 -3
  755. package/CountryFlags/JO.js +0 -37
  756. package/CountryFlags/JP.d.ts +0 -3
  757. package/CountryFlags/JP.js +0 -34
  758. package/CountryFlags/KE.d.ts +0 -3
  759. package/CountryFlags/KE.js +0 -42
  760. package/CountryFlags/KG.d.ts +0 -3
  761. package/CountryFlags/KG.js +0 -39
  762. package/CountryFlags/KH.d.ts +0 -3
  763. package/CountryFlags/KH.js +0 -36
  764. package/CountryFlags/KI.d.ts +0 -3
  765. package/CountryFlags/KI.js +0 -39
  766. package/CountryFlags/KM.d.ts +0 -3
  767. package/CountryFlags/KM.js +0 -41
  768. package/CountryFlags/KN.d.ts +0 -3
  769. package/CountryFlags/KN.js +0 -38
  770. package/CountryFlags/KP.d.ts +0 -3
  771. package/CountryFlags/KP.js +0 -39
  772. package/CountryFlags/KR.d.ts +0 -3
  773. package/CountryFlags/KR.js +0 -42
  774. package/CountryFlags/KW.d.ts +0 -3
  775. package/CountryFlags/KW.js +0 -36
  776. package/CountryFlags/KY.d.ts +0 -3
  777. package/CountryFlags/KY.js +0 -45
  778. package/CountryFlags/KZ.d.ts +0 -3
  779. package/CountryFlags/KZ.js +0 -35
  780. package/CountryFlags/LA.d.ts +0 -3
  781. package/CountryFlags/LA.js +0 -36
  782. package/CountryFlags/LB.d.ts +0 -3
  783. package/CountryFlags/LB.js +0 -37
  784. package/CountryFlags/LC.d.ts +0 -3
  785. package/CountryFlags/LC.js +0 -36
  786. package/CountryFlags/LI.d.ts +0 -3
  787. package/CountryFlags/LI.js +0 -35
  788. package/CountryFlags/LK.d.ts +0 -3
  789. package/CountryFlags/LK.js +0 -40
  790. package/CountryFlags/LR.d.ts +0 -3
  791. package/CountryFlags/LR.js +0 -37
  792. package/CountryFlags/LS.d.ts +0 -3
  793. package/CountryFlags/LS.js +0 -37
  794. package/CountryFlags/LT.d.ts +0 -3
  795. package/CountryFlags/LT.js +0 -35
  796. package/CountryFlags/LU.d.ts +0 -3
  797. package/CountryFlags/LU.js +0 -35
  798. package/CountryFlags/LV.d.ts +0 -3
  799. package/CountryFlags/LV.js +0 -35
  800. package/CountryFlags/LY.d.ts +0 -3
  801. package/CountryFlags/LY.js +0 -38
  802. package/CountryFlags/MA.d.ts +0 -3
  803. package/CountryFlags/MA.js +0 -34
  804. package/CountryFlags/MC.d.ts +0 -3
  805. package/CountryFlags/MC.js +0 -34
  806. package/CountryFlags/MD.d.ts +0 -3
  807. package/CountryFlags/MD.js +0 -36
  808. package/CountryFlags/ME.d.ts +0 -3
  809. package/CountryFlags/ME.js +0 -36
  810. package/CountryFlags/MF.d.ts +0 -3
  811. package/CountryFlags/MF.js +0 -37
  812. package/CountryFlags/MG.d.ts +0 -3
  813. package/CountryFlags/MG.js +0 -35
  814. package/CountryFlags/MH.d.ts +0 -3
  815. package/CountryFlags/MH.js +0 -36
  816. package/CountryFlags/MK.d.ts +0 -3
  817. package/CountryFlags/MK.js +0 -37
  818. package/CountryFlags/ML.d.ts +0 -3
  819. package/CountryFlags/ML.js +0 -35
  820. package/CountryFlags/MM.d.ts +0 -3
  821. package/CountryFlags/MM.js +0 -36
  822. package/CountryFlags/MN.d.ts +0 -3
  823. package/CountryFlags/MN.js +0 -41
  824. package/CountryFlags/MO.d.ts +0 -3
  825. package/CountryFlags/MO.js +0 -38
  826. package/CountryFlags/MP.d.ts +0 -3
  827. package/CountryFlags/MP.js +0 -39
  828. package/CountryFlags/MQ.d.ts +0 -3
  829. package/CountryFlags/MQ.js +0 -36
  830. package/CountryFlags/MR.d.ts +0 -3
  831. package/CountryFlags/MR.js +0 -36
  832. package/CountryFlags/MS.d.ts +0 -3
  833. package/CountryFlags/MS.js +0 -44
  834. package/CountryFlags/MT.d.ts +0 -3
  835. package/CountryFlags/MT.js +0 -35
  836. package/CountryFlags/MU.d.ts +0 -3
  837. package/CountryFlags/MU.js +0 -36
  838. package/CountryFlags/MV.d.ts +0 -3
  839. package/CountryFlags/MV.js +0 -35
  840. package/CountryFlags/MW.d.ts +0 -3
  841. package/CountryFlags/MW.js +0 -36
  842. package/CountryFlags/MX.d.ts +0 -3
  843. package/CountryFlags/MX.js +0 -37
  844. package/CountryFlags/MY.d.ts +0 -3
  845. package/CountryFlags/MY.js +0 -37
  846. package/CountryFlags/MZ.d.ts +0 -3
  847. package/CountryFlags/MZ.js +0 -38
  848. package/CountryFlags/NA.d.ts +0 -3
  849. package/CountryFlags/NA.js +0 -37
  850. package/CountryFlags/NC.d.ts +0 -3
  851. package/CountryFlags/NC.js +0 -42
  852. package/CountryFlags/NE.d.ts +0 -3
  853. package/CountryFlags/NE.js +0 -36
  854. package/CountryFlags/NF.d.ts +0 -3
  855. package/CountryFlags/NF.js +0 -35
  856. package/CountryFlags/NG.d.ts +0 -3
  857. package/CountryFlags/NG.js +0 -35
  858. package/CountryFlags/NI.d.ts +0 -3
  859. package/CountryFlags/NI.js +0 -39
  860. package/CountryFlags/NL.d.ts +0 -3
  861. package/CountryFlags/NL.js +0 -35
  862. package/CountryFlags/NO.d.ts +0 -3
  863. package/CountryFlags/NO.js +0 -35
  864. package/CountryFlags/NP.d.ts +0 -3
  865. package/CountryFlags/NP.js +0 -38
  866. package/CountryFlags/NR.d.ts +0 -3
  867. package/CountryFlags/NR.js +0 -35
  868. package/CountryFlags/NU.d.ts +0 -3
  869. package/CountryFlags/NU.js +0 -57
  870. package/CountryFlags/NZ.d.ts +0 -3
  871. package/CountryFlags/NZ.js +0 -45
  872. package/CountryFlags/OM.d.ts +0 -3
  873. package/CountryFlags/OM.js +0 -38
  874. package/CountryFlags/PA.d.ts +0 -3
  875. package/CountryFlags/PA.js +0 -37
  876. package/CountryFlags/PE.d.ts +0 -3
  877. package/CountryFlags/PE.js +0 -35
  878. package/CountryFlags/PF.d.ts +0 -3
  879. package/CountryFlags/PF.js +0 -39
  880. package/CountryFlags/PG.d.ts +0 -3
  881. package/CountryFlags/PG.js +0 -37
  882. package/CountryFlags/PH.d.ts +0 -3
  883. package/CountryFlags/PH.js +0 -37
  884. package/CountryFlags/PK.d.ts +0 -3
  885. package/CountryFlags/PK.js +0 -38
  886. package/CountryFlags/PL.d.ts +0 -3
  887. package/CountryFlags/PL.js +0 -36
  888. package/CountryFlags/PM.d.ts +0 -3
  889. package/CountryFlags/PM.js +0 -36
  890. package/CountryFlags/PN.d.ts +0 -3
  891. package/CountryFlags/PN.js +0 -47
  892. package/CountryFlags/PR.d.ts +0 -3
  893. package/CountryFlags/PR.js +0 -37
  894. package/CountryFlags/PS.d.ts +0 -3
  895. package/CountryFlags/PS.js +0 -36
  896. package/CountryFlags/PT.d.ts +0 -3
  897. package/CountryFlags/PT.js +0 -37
  898. package/CountryFlags/PW.d.ts +0 -3
  899. package/CountryFlags/PW.js +0 -34
  900. package/CountryFlags/PY.d.ts +0 -3
  901. package/CountryFlags/PY.js +0 -37
  902. package/CountryFlags/QA.d.ts +0 -3
  903. package/CountryFlags/QA.js +0 -34
  904. package/CountryFlags/RE.d.ts +0 -3
  905. package/CountryFlags/RE.js +0 -36
  906. package/CountryFlags/RO.d.ts +0 -3
  907. package/CountryFlags/RO.js +0 -35
  908. package/CountryFlags/RS.d.ts +0 -3
  909. package/CountryFlags/RS.js +0 -39
  910. package/CountryFlags/RU.d.ts +0 -3
  911. package/CountryFlags/RU.js +0 -36
  912. package/CountryFlags/RW.d.ts +0 -3
  913. package/CountryFlags/RW.js +0 -36
  914. package/CountryFlags/SA.d.ts +0 -3
  915. package/CountryFlags/SA.js +0 -37
  916. package/CountryFlags/SB.d.ts +0 -3
  917. package/CountryFlags/SB.js +0 -37
  918. package/CountryFlags/SC.d.ts +0 -3
  919. package/CountryFlags/SC.js +0 -37
  920. package/CountryFlags/SD.d.ts +0 -3
  921. package/CountryFlags/SD.js +0 -36
  922. package/CountryFlags/SE.d.ts +0 -3
  923. package/CountryFlags/SE.js +0 -34
  924. package/CountryFlags/SG.d.ts +0 -3
  925. package/CountryFlags/SG.js +0 -37
  926. package/CountryFlags/SH.d.ts +0 -3
  927. package/CountryFlags/SH.js +0 -47
  928. package/CountryFlags/SI.d.ts +0 -3
  929. package/CountryFlags/SI.js +0 -38
  930. package/CountryFlags/SJ.d.ts +0 -3
  931. package/CountryFlags/SJ.js +0 -35
  932. package/CountryFlags/SK.d.ts +0 -3
  933. package/CountryFlags/SK.js +0 -39
  934. package/CountryFlags/SL.d.ts +0 -3
  935. package/CountryFlags/SL.js +0 -35
  936. package/CountryFlags/SM.d.ts +0 -3
  937. package/CountryFlags/SM.js +0 -39
  938. package/CountryFlags/SN.d.ts +0 -3
  939. package/CountryFlags/SN.js +0 -36
  940. package/CountryFlags/SO.d.ts +0 -3
  941. package/CountryFlags/SO.js +0 -34
  942. package/CountryFlags/SR.d.ts +0 -3
  943. package/CountryFlags/SR.js +0 -37
  944. package/CountryFlags/SS.d.ts +0 -3
  945. package/CountryFlags/SS.js +0 -38
  946. package/CountryFlags/ST.d.ts +0 -3
  947. package/CountryFlags/ST.js +0 -37
  948. package/CountryFlags/SV.d.ts +0 -3
  949. package/CountryFlags/SV.js +0 -38
  950. package/CountryFlags/SX.d.ts +0 -3
  951. package/CountryFlags/SX.js +0 -41
  952. package/CountryFlags/SY.d.ts +0 -3
  953. package/CountryFlags/SY.js +0 -37
  954. package/CountryFlags/SZ.d.ts +0 -3
  955. package/CountryFlags/SZ.js +0 -39
  956. package/CountryFlags/TA.d.ts +0 -3
  957. package/CountryFlags/TA.js +0 -51
  958. package/CountryFlags/TC.d.ts +0 -3
  959. package/CountryFlags/TC.js +0 -48
  960. package/CountryFlags/TD.d.ts +0 -3
  961. package/CountryFlags/TD.js +0 -35
  962. package/CountryFlags/TF.d.ts +0 -3
  963. package/CountryFlags/TF.js +0 -38
  964. package/CountryFlags/TG.d.ts +0 -3
  965. package/CountryFlags/TG.js +0 -37
  966. package/CountryFlags/TH.d.ts +0 -3
  967. package/CountryFlags/TH.js +0 -36
  968. package/CountryFlags/TJ.d.ts +0 -3
  969. package/CountryFlags/TJ.js +0 -37
  970. package/CountryFlags/TK.d.ts +0 -3
  971. package/CountryFlags/TK.js +0 -37
  972. package/CountryFlags/TL.d.ts +0 -3
  973. package/CountryFlags/TL.js +0 -36
  974. package/CountryFlags/TM.d.ts +0 -3
  975. package/CountryFlags/TM.js +0 -49
  976. package/CountryFlags/TN.d.ts +0 -3
  977. package/CountryFlags/TN.js +0 -37
  978. package/CountryFlags/TO.d.ts +0 -3
  979. package/CountryFlags/TO.js +0 -35
  980. package/CountryFlags/TR.d.ts +0 -3
  981. package/CountryFlags/TR.js +0 -34
  982. package/CountryFlags/TT.d.ts +0 -3
  983. package/CountryFlags/TT.js +0 -35
  984. package/CountryFlags/TV.d.ts +0 -3
  985. package/CountryFlags/TV.js +0 -40
  986. package/CountryFlags/TW.d.ts +0 -3
  987. package/CountryFlags/TW.js +0 -37
  988. package/CountryFlags/TZ.d.ts +0 -3
  989. package/CountryFlags/TZ.js +0 -36
  990. package/CountryFlags/UA.d.ts +0 -3
  991. package/CountryFlags/UA.js +0 -34
  992. package/CountryFlags/UG.d.ts +0 -3
  993. package/CountryFlags/UG.js +0 -39
  994. package/CountryFlags/UM.d.ts +0 -3
  995. package/CountryFlags/UM.js +0 -38
  996. package/CountryFlags/US.d.ts +0 -3
  997. package/CountryFlags/US.js +0 -38
  998. package/CountryFlags/UY.d.ts +0 -3
  999. package/CountryFlags/UY.js +0 -37
  1000. package/CountryFlags/UZ.d.ts +0 -3
  1001. package/CountryFlags/UZ.js +0 -39
  1002. package/CountryFlags/Uknown.d.ts +0 -7
  1003. package/CountryFlags/Uknown.js +0 -12
  1004. package/CountryFlags/Unknown.d.ts +0 -3
  1005. package/CountryFlags/Unknown.js +0 -42
  1006. package/CountryFlags/VA.d.ts +0 -3
  1007. package/CountryFlags/VA.js +0 -36
  1008. package/CountryFlags/VC.d.ts +0 -3
  1009. package/CountryFlags/VC.js +0 -36
  1010. package/CountryFlags/VE.d.ts +0 -3
  1011. package/CountryFlags/VE.js +0 -36
  1012. package/CountryFlags/VG.d.ts +0 -3
  1013. package/CountryFlags/VG.js +0 -49
  1014. package/CountryFlags/VI.d.ts +0 -3
  1015. package/CountryFlags/VI.js +0 -45
  1016. package/CountryFlags/VN.d.ts +0 -3
  1017. package/CountryFlags/VN.js +0 -34
  1018. package/CountryFlags/VU.d.ts +0 -3
  1019. package/CountryFlags/VU.js +0 -39
  1020. package/CountryFlags/WF.d.ts +0 -3
  1021. package/CountryFlags/WF.js +0 -37
  1022. package/CountryFlags/WS.d.ts +0 -3
  1023. package/CountryFlags/WS.js +0 -36
  1024. package/CountryFlags/XK.d.ts +0 -3
  1025. package/CountryFlags/XK.js +0 -36
  1026. package/CountryFlags/YE.d.ts +0 -3
  1027. package/CountryFlags/YE.js +0 -35
  1028. package/CountryFlags/YT.d.ts +0 -3
  1029. package/CountryFlags/YT.js +0 -39
  1030. package/CountryFlags/ZA.d.ts +0 -3
  1031. package/CountryFlags/ZA.js +0 -38
  1032. package/CountryFlags/ZM.d.ts +0 -3
  1033. package/CountryFlags/ZM.js +0 -37
  1034. package/CountryFlags/ZW.d.ts +0 -3
  1035. package/CountryFlags/ZW.js +0 -43
  1036. package/CountryFlags/index.d.ts +0 -258
  1037. package/CountryFlags/index.js +0 -526
  1038. package/ErrorBoundary/Fallback.d.ts +0 -3
  1039. package/ErrorBoundary/Fallback.js +0 -51
  1040. package/Menu/AutoHeightWrapper.d.ts +0 -6
  1041. package/Menu/AutoHeightWrapper.js +0 -43
  1042. package/Menu/MeasuredItem.d.ts +0 -10
  1043. package/Menu/MeasuredItem.js +0 -51
  1044. package/Menu/VirtualizedItem.d.ts +0 -22
  1045. package/Menu/VirtualizedItem.js +0 -69
  1046. package/Menu/VirtualizedList.d.ts +0 -18
  1047. package/Menu/VirtualizedList.js +0 -26
  1048. package/Menu/VirtualizedListComponent.d.ts +0 -20
  1049. package/Menu/VirtualizedListComponent.js +0 -305
  1050. /package/{CountryFlags → PhoneField/flags}/BY.d.ts +0 -0
  1051. /package/{CountryFlags → PhoneField/flags}/CN.d.ts +0 -0
  1052. /package/{CountryFlags/AC.d.ts → PhoneField/flags/IL.d.ts} +0 -0
  1053. /package/{CountryFlags/AD.d.ts → PhoneField/flags/JP.d.ts} +0 -0
  1054. /package/{CountryFlags/AE.d.ts → PhoneField/flags/KZ.d.ts} +0 -0
  1055. /package/{CountryFlags/AF.d.ts → PhoneField/flags/RU.d.ts} +0 -0
  1056. /package/{CountryFlags/AG.d.ts → PhoneField/flags/UA.d.ts} +0 -0
  1057. /package/{CountryFlags/AI.d.ts → PhoneField/flags/US.d.ts} +0 -0
  1058. /package/{CountryFlags/AL.d.ts → PhoneField/flags/Unknown.d.ts} +0 -0
  1059. /package/{CountryFlags → PhoneField/flags}/isLabelled.d.ts +0 -0
  1060. /package/{CountryFlags → PhoneField/flags}/isLabelled.js +0 -0
@@ -0,0 +1,97 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import React from 'react';
13
+ import ReactDOM from 'react-dom';
14
+ import Container from './PopperContainer';
15
+ import { usePopper } from './usePopper';
16
+ export * from './usePopper';
17
+ export const PORTAL_ID = 'ui-kit-portal';
18
+ const Popper = (props, ref) => {
19
+ const { isOpen, children, anchorElement, zIndex, overrides, anchorPos = 'auto', positionStrategy = 'fixed', viewportMargin = 30, autoFlip = false, alternativePlacements, offset = 0, onAnchorPosChanged } = props, nativeProps = __rest(props, ["isOpen", "children", "anchorElement", "zIndex", "overrides", "anchorPos", "positionStrategy", "viewportMargin", "autoFlip", "alternativePlacements", "offset", "onAnchorPosChanged"]);
20
+ const [domLoaded, setDomLoaded] = React.useState(false);
21
+ const { actualPlacement, style, popperRef, isVisible } = usePopper({
22
+ anchorElement,
23
+ anchorPos,
24
+ positionStrategy,
25
+ autoFlip,
26
+ offset,
27
+ viewportMargin,
28
+ alternativePlacements,
29
+ isOpen,
30
+ });
31
+ const overridesMap = React.useMemo(() => ({
32
+ Container: (overrides === null || overrides === void 0 ? void 0 : overrides.Container) || Container,
33
+ }), [overrides]);
34
+ /**
35
+ * Client render detection
36
+ */
37
+ React.useEffect(() => {
38
+ setDomLoaded(true);
39
+ }, []);
40
+ const portalEl = React.useMemo(() => {
41
+ if (typeof window === 'undefined') {
42
+ return undefined;
43
+ }
44
+ const node = window.document.body.querySelector(`#${PORTAL_ID}`);
45
+ if (node) {
46
+ return node;
47
+ }
48
+ const newNode = window.document.createElement('div');
49
+ newNode.setAttribute('id', PORTAL_ID);
50
+ window.document.body.appendChild(newNode);
51
+ return newNode;
52
+ }, []);
53
+ const onAnchorPosChangedRef = React.useRef(onAnchorPosChanged);
54
+ onAnchorPosChangedRef.current = onAnchorPosChanged;
55
+ const prevPlacementRef = React.useRef(actualPlacement);
56
+ React.useEffect(() => {
57
+ var _a;
58
+ if (prevPlacementRef.current !== actualPlacement) {
59
+ prevPlacementRef.current = actualPlacement;
60
+ (_a = onAnchorPosChangedRef.current) === null || _a === void 0 ? void 0 : _a.call(onAnchorPosChangedRef, actualPlacement);
61
+ }
62
+ }, [actualPlacement]);
63
+ const childrenMemo = React.useMemo(() => children, [children]);
64
+ const renderNode = React.useCallback(() => (React.createElement(overridesMap.Container, Object.assign({}, nativeProps, { style: Object.assign(Object.assign(Object.assign(Object.assign({}, style), nativeProps.style), { opacity: isVisible ? 1 : 0, pointerEvents: isVisible ? 'auto' : 'none' }), (positionStrategy === 'fixed' && {
65
+ position: 'fixed',
66
+ })), zIndex: zIndex, positionStrategy: positionStrategy, "data-popper-placement": actualPlacement, "data-popper-strategy": positionStrategy, ref: el => {
67
+ popperRef.current = el;
68
+ if (ref) {
69
+ if (typeof ref === 'function') {
70
+ ref(el);
71
+ }
72
+ if (typeof ref === 'object') {
73
+ ref.current = el;
74
+ }
75
+ }
76
+ } }), childrenMemo)), [
77
+ overridesMap,
78
+ nativeProps,
79
+ style,
80
+ isVisible,
81
+ // getTransformOrigin,
82
+ actualPlacement,
83
+ positionStrategy,
84
+ zIndex,
85
+ childrenMemo,
86
+ popperRef,
87
+ ref,
88
+ ]);
89
+ if (!isOpen) {
90
+ return null;
91
+ }
92
+ if (positionStrategy === 'fixed') {
93
+ return domLoaded && portalEl ? ReactDOM.createPortal(renderNode(), portalEl, PORTAL_ID) : null;
94
+ }
95
+ return renderNode();
96
+ };
97
+ export default React.forwardRef(Popper);
@@ -0,0 +1,27 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import React from 'react';
13
+ import styled from '@emotion/styled';
14
+ const StyledContainer = styled.div `
15
+ position: ${({ $positionStrategy }) => $positionStrategy};
16
+ z-index: ${({ theme, $zIndex, $positionStrategy }) => {
17
+ if (typeof $zIndex !== 'undefined') {
18
+ return $zIndex;
19
+ }
20
+ return $positionStrategy === 'fixed' ? theme.zIndex.modal : undefined;
21
+ }};
22
+ `;
23
+ const PopperContainer = (props, ref) => {
24
+ const { children, zIndex, positionStrategy = 'fixed' } = props, nativeProps = __rest(props, ["children", "zIndex", "positionStrategy"]);
25
+ return (React.createElement(StyledContainer, Object.assign({ "$zIndex": zIndex, "$positionStrategy": positionStrategy }, nativeProps, { ref: ref }), children));
26
+ };
27
+ export default React.forwardRef(PopperContainer);
@@ -0,0 +1,5 @@
1
+ import Popper from './Popper';
2
+ export * from './Popper';
3
+ export * from './PopperContainer';
4
+ export * from './usePopper';
5
+ export default Popper;
@@ -0,0 +1,514 @@
1
+ import React from 'react';
2
+ /**
3
+ * Finds the closest scrollable ancestor of an element.
4
+ * A scrollable element is one that has overflow set to auto, scroll, or overlay
5
+ * and has content that overflows, allowing scrolling.
6
+ *
7
+ * @param element - The element to start searching from
8
+ * @param includeHidden - Whether to consider elements with overflow: hidden
9
+ * @returns The closest scrollable ancestor or window if none found
10
+ */
11
+ export const findScrollableAncestor = (element, includeHidden = false) => {
12
+ if (!element) {
13
+ return null;
14
+ }
15
+ // Helper to check if an element is scrollable
16
+ const isScrollable = (el) => {
17
+ const style = window.getComputedStyle(el);
18
+ const overflow = style.overflow + style.overflowY + style.overflowX;
19
+ // Check if element has overflow that enables scrolling
20
+ const hasOverflow = overflow.includes('auto') ||
21
+ overflow.includes('scroll') ||
22
+ (includeHidden && overflow.includes('hidden'));
23
+ if (!hasOverflow) {
24
+ return false;
25
+ }
26
+ // Check if element actually has scrollable content
27
+ return el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth;
28
+ };
29
+ // Start from parent (skip the element itself)
30
+ let parent = element.parentElement;
31
+ while (parent) {
32
+ if (isScrollable(parent)) {
33
+ return parent;
34
+ }
35
+ parent = parent.parentElement;
36
+ }
37
+ // If no scrollable ancestor found, return window (which is scrollable)
38
+ return window;
39
+ };
40
+ const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
41
+ export const usePopper = (props) => {
42
+ const { anchorElement, anchorPos = 'auto', positionStrategy = 'fixed', autoFlip = false, offset = 0, viewportMargin = 10, isOpen = false, alternativePlacements, } = props;
43
+ const [actualPlacement, setActualPlacement] = React.useState(anchorPos);
44
+ const [style, setStyle] = React.useState(null);
45
+ const [isVisible, setIsVisible] = React.useState(false);
46
+ const popperRef = React.useRef(null);
47
+ // Finding the nearest scrollable ancestor
48
+ const scrollableAncestor = React.useMemo(() => {
49
+ if (!anchorElement || typeof window === 'undefined') {
50
+ return null;
51
+ }
52
+ return findScrollableAncestor(anchorElement);
53
+ }, [anchorElement]);
54
+ // Reset actualPlacement only when the preferred placement itself changes.
55
+ // Comparing with actualPlacement here would immediately revert every flip.
56
+ const prevAnchorPosRef = React.useRef(anchorPos);
57
+ React.useEffect(() => {
58
+ if (prevAnchorPosRef.current !== anchorPos) {
59
+ prevAnchorPosRef.current = anchorPos;
60
+ setActualPlacement(anchorPos);
61
+ }
62
+ }, [anchorPos]);
63
+ const getPositionStyle = React.useCallback((props) => {
64
+ var _a;
65
+ const { place, anchorRect, popperRect, forViewportCheck = false } = props;
66
+ const [direction, modifier = ''] = place.split('-');
67
+ let left = anchorRect.left;
68
+ let top = anchorRect.top;
69
+ let width = undefined;
70
+ // Calculating the position relative to the viewport
71
+ switch (direction) {
72
+ case 'top':
73
+ top = anchorRect.top - popperRect.height - offset;
74
+ if (modifier === 'fill') {
75
+ left = anchorRect.left;
76
+ width = anchorRect.width;
77
+ }
78
+ else if (modifier === 'left' || modifier === 'start') {
79
+ left = anchorRect.left;
80
+ }
81
+ else if (modifier === 'right' || modifier === 'end') {
82
+ left = anchorRect.right - popperRect.width;
83
+ }
84
+ else {
85
+ left = anchorRect.left + (anchorRect.width - popperRect.width) / 2;
86
+ }
87
+ break;
88
+ case 'bottom':
89
+ top = anchorRect.bottom + offset;
90
+ if (modifier === 'fill') {
91
+ left = anchorRect.left;
92
+ width = anchorRect.width;
93
+ }
94
+ else if (modifier === 'left' || modifier === 'start') {
95
+ left = anchorRect.left;
96
+ }
97
+ else if (modifier === 'right' || modifier === 'end') {
98
+ left = anchorRect.right - popperRect.width;
99
+ }
100
+ else {
101
+ left = anchorRect.left + (anchorRect.width - popperRect.width) / 2;
102
+ }
103
+ break;
104
+ case 'left':
105
+ left = anchorRect.left - popperRect.width - offset;
106
+ if (modifier === 'top' || modifier === 'start') {
107
+ top = anchorRect.top;
108
+ }
109
+ else if (modifier === 'bottom' || modifier === 'end') {
110
+ top = anchorRect.bottom - popperRect.height;
111
+ }
112
+ else {
113
+ top = anchorRect.top + (anchorRect.height - popperRect.height) / 2;
114
+ }
115
+ break;
116
+ case 'right':
117
+ left = anchorRect.right + offset;
118
+ if (modifier === 'top' || modifier === 'start') {
119
+ top = anchorRect.top;
120
+ }
121
+ else if (modifier === 'bottom' || modifier === 'end') {
122
+ top = anchorRect.bottom - popperRect.height;
123
+ }
124
+ else {
125
+ top = anchorRect.top + (anchorRect.height - popperRect.height) / 2;
126
+ }
127
+ break;
128
+ default:
129
+ left = anchorRect.left + (anchorRect.width - popperRect.width) / 2;
130
+ top = anchorRect.bottom + offset;
131
+ }
132
+ // Returning the viewport coordinates for verification or the final coordinates
133
+ if (forViewportCheck) {
134
+ return { left, top, width };
135
+ }
136
+ // For the final positioning, we take into account the strategy
137
+ if (positionStrategy === 'absolute') {
138
+ // Для absolute позиционирования нужно учитывать:
139
+ // 1. Прокрутку страницы (scrollX/scrollY)
140
+ // 2. Позицию относительно ближайшего positioned ancestor
141
+ // Получаем offset родителя с позиционированием
142
+ let offsetParent = ((_a = popperRef.current) === null || _a === void 0 ? void 0 : _a.offsetParent) || null;
143
+ // Если нет offsetParent или это body, используем document.documentElement
144
+ if (!offsetParent || offsetParent === document.body) {
145
+ offsetParent = document.documentElement;
146
+ }
147
+ const offsetParentRect = offsetParent.getBoundingClientRect();
148
+ // Вычисляем позицию относительно offsetParent
149
+ // left/top уже относительно viewport, вычитаем позицию offsetParent
150
+ let relativeLeft = left - offsetParentRect.left;
151
+ let relativeTop = top - offsetParentRect.top;
152
+ // Добавляем прокрутку offsetParent (если он скроллится)
153
+ if (offsetParent !== document.documentElement && offsetParent !== document.body) {
154
+ relativeLeft += offsetParent.scrollLeft || 0;
155
+ relativeTop += offsetParent.scrollTop || 0;
156
+ }
157
+ else {
158
+ // Для document.documentElement используем window.scroll
159
+ relativeLeft += window.scrollX;
160
+ relativeTop += window.scrollY;
161
+ }
162
+ return {
163
+ left: relativeLeft,
164
+ top: relativeTop,
165
+ width,
166
+ };
167
+ }
168
+ return { left, top, width };
169
+ }, [offset, positionStrategy]);
170
+ const clampPopperToContainer = React.useCallback((style, popperRect) => {
171
+ if (positionStrategy === 'absolute') {
172
+ return style;
173
+ }
174
+ const viewportMinLeft = viewportMargin;
175
+ const viewportMaxLeft = window.innerWidth - popperRect.width - viewportMargin;
176
+ const viewportMinTop = viewportMargin;
177
+ const viewportMaxTop = window.innerHeight - popperRect.height - viewportMargin;
178
+ return {
179
+ left: Math.max(viewportMinLeft, Math.min(style.left, viewportMaxLeft)),
180
+ top: Math.max(viewportMinTop, Math.min(style.top, viewportMaxTop)),
181
+ width: style.width,
182
+ };
183
+ }, [positionStrategy, viewportMargin]);
184
+ const checkIfViewportFits = React.useCallback((style, popperRect) => {
185
+ const left = style.left;
186
+ const top = style.top;
187
+ const right = left + popperRect.width;
188
+ const bottom = top + popperRect.height;
189
+ const viewportWidth = window.innerWidth;
190
+ const viewportHeight = window.innerHeight;
191
+ const isWithinHorizontal = left >= viewportMargin && right <= viewportWidth - viewportMargin;
192
+ const isWithinVertical = top >= viewportMargin && bottom <= viewportHeight - viewportMargin;
193
+ return isWithinHorizontal && isWithinVertical;
194
+ }, [viewportMargin]);
195
+ const placementsOrder = React.useMemo(() => {
196
+ const basePlacements = {
197
+ top: ['top', 'top-left', 'top-right', 'top-start', 'top-end'],
198
+ bottom: ['bottom', 'bottom-left', 'bottom-right', 'bottom-start', 'bottom-end'],
199
+ left: ['left', 'left-top', 'left-bottom'],
200
+ right: ['right', 'right-top', 'right-bottom'],
201
+ };
202
+ const allPlacements = [
203
+ ...basePlacements.top,
204
+ ...basePlacements.bottom,
205
+ ...basePlacements.left,
206
+ ...basePlacements.right,
207
+ ];
208
+ const order = {};
209
+ allPlacements.forEach(placement => {
210
+ const [direction] = placement.split('-');
211
+ // Priority: same direction > opposite > the rest
212
+ const opposite = direction === 'top'
213
+ ? 'bottom'
214
+ : direction === 'bottom'
215
+ ? 'top'
216
+ : direction === 'left'
217
+ ? 'right'
218
+ : 'left';
219
+ order[placement] = [
220
+ placement,
221
+ ...basePlacements[direction].filter(p => p !== placement),
222
+ ...(basePlacements[opposite] || []),
223
+ ...(direction !== 'left' && direction !== 'right' ? basePlacements.left : []),
224
+ ...(direction !== 'left' && direction !== 'right' ? basePlacements.right : []),
225
+ ];
226
+ });
227
+ // console.log(order);
228
+ return order;
229
+ }, []);
230
+ // #region Get Preferred Placements
231
+ const getPreferredPlacements = React.useCallback((preferredPlacement, anchorRect, popperRect) => {
232
+ var _a, _b, _c, _d, _e, _f, _g, _h;
233
+ const tryPlacement = (placement) => {
234
+ const viewportStyle = getPositionStyle({
235
+ place: placement,
236
+ anchorRect,
237
+ popperRect,
238
+ forViewportCheck: true,
239
+ });
240
+ if (!checkIfViewportFits(viewportStyle, popperRect)) {
241
+ return null;
242
+ }
243
+ const finalStyle = getPositionStyle({
244
+ place: placement,
245
+ anchorRect,
246
+ popperRect,
247
+ forViewportCheck: false,
248
+ });
249
+ return {
250
+ found: true,
251
+ placement,
252
+ style: clampPopperToContainer(finalStyle, popperRect),
253
+ };
254
+ };
255
+ const fallback = (placement) => {
256
+ const finalStyle = getPositionStyle({
257
+ place: placement,
258
+ anchorRect,
259
+ popperRect,
260
+ forViewportCheck: false,
261
+ });
262
+ return {
263
+ found: false,
264
+ placement,
265
+ style: clampPopperToContainer(finalStyle, popperRect),
266
+ };
267
+ };
268
+ const isAuto = preferredPlacement.startsWith('auto');
269
+ const isFill = preferredPlacement.endsWith('fill');
270
+ // -------------------------------------------------------
271
+ // 1. EXPLICIT (top, bottom, left, right, top-left, ...)
272
+ // -------------------------------------------------------
273
+ if (!isAuto && !isFill) {
274
+ if (!autoFlip) {
275
+ return (_a = tryPlacement(preferredPlacement)) !== null && _a !== void 0 ? _a : fallback(preferredPlacement);
276
+ }
277
+ // Формируем порядок без дубликатов
278
+ const order = Array.from(new Set([
279
+ preferredPlacement,
280
+ ...((_b = alternativePlacements === null || alternativePlacements === void 0 ? void 0 : alternativePlacements.filter(p => !p.startsWith('auto') && !p.endsWith('fill'))) !== null && _b !== void 0 ? _b : []),
281
+ ...((_c = placementsOrder[preferredPlacement]) !== null && _c !== void 0 ? _c : []),
282
+ ]));
283
+ for (const p of order) {
284
+ const r = tryPlacement(p);
285
+ if (r)
286
+ return r;
287
+ }
288
+ return fallback(preferredPlacement);
289
+ }
290
+ // -------------------------------------------------------
291
+ // 2. FILL (bottom-fill, top-fill)
292
+ // -------------------------------------------------------
293
+ if (isFill) {
294
+ const [dir] = preferredPlacement.split('-');
295
+ if (!autoFlip) {
296
+ return (_d = tryPlacement(preferredPlacement)) !== null && _d !== void 0 ? _d : fallback(preferredPlacement);
297
+ }
298
+ const opposite = dir === 'bottom' ? 'top-fill' : 'bottom-fill';
299
+ // Формируем порядок: fill сначала, потом обычные позиции из альтернатив, потом дефолтные
300
+ const order = Array.from(new Set([
301
+ preferredPlacement,
302
+ opposite,
303
+ // Обычные позиции из alternativePlacements (не auto и не fill)
304
+ ...((_e = alternativePlacements === null || alternativePlacements === void 0 ? void 0 : alternativePlacements.filter(p => !p.startsWith('auto') && !p.endsWith('fill'))) !== null && _e !== void 0 ? _e : []),
305
+ // Обычные позиции из дефолтного порядка (не fill)
306
+ ...((_g = (_f = placementsOrder[preferredPlacement]) === null || _f === void 0 ? void 0 : _f.filter(p => !p.endsWith('fill'))) !== null && _g !== void 0 ? _g : []),
307
+ ]));
308
+ for (const p of order) {
309
+ const r = tryPlacement(p);
310
+ if (r)
311
+ return r;
312
+ }
313
+ return fallback(preferredPlacement);
314
+ }
315
+ // -------------------------------------------------------
316
+ // 3. AUTO
317
+ // -------------------------------------------------------
318
+ if (isAuto) {
319
+ // Если autoFlip выключен - просто используем дефолтное направление
320
+ if (!autoFlip) {
321
+ const [, dir = 'bottom'] = preferredPlacement.split('-');
322
+ const defaultPlacement = dir;
323
+ return (_h = tryPlacement(defaultPlacement)) !== null && _h !== void 0 ? _h : fallback(defaultPlacement);
324
+ }
325
+ const [, dir = 'bottom'] = preferredPlacement.split('-');
326
+ const base = (alternativePlacements === null || alternativePlacements === void 0 ? void 0 : alternativePlacements.length)
327
+ ? alternativePlacements
328
+ : [
329
+ 'bottom',
330
+ 'bottom-start',
331
+ 'bottom-end',
332
+ 'bottom-left',
333
+ 'bottom-right',
334
+ 'top',
335
+ 'top-left',
336
+ 'top-right',
337
+ 'top-start',
338
+ 'top-end',
339
+ 'left',
340
+ 'left-top',
341
+ 'left-bottom',
342
+ 'right',
343
+ 'right-top',
344
+ 'right-bottom',
345
+ ];
346
+ const sorted = [...base].sort((a, b) => {
347
+ const ad = a.split('-')[0];
348
+ const bd = b.split('-')[0];
349
+ if (ad === dir && bd !== dir)
350
+ return -1;
351
+ if (ad !== dir && bd === dir)
352
+ return 1;
353
+ return 0;
354
+ });
355
+ for (const p of sorted) {
356
+ const r = tryPlacement(p);
357
+ if (r)
358
+ return r;
359
+ }
360
+ return fallback(dir);
361
+ }
362
+ // -------------------------------------------------------
363
+ // 4. SUPER FALLBACK
364
+ // -------------------------------------------------------
365
+ return fallback('bottom');
366
+ }, [
367
+ autoFlip,
368
+ getPositionStyle,
369
+ checkIfViewportFits,
370
+ clampPopperToContainer,
371
+ placementsOrder,
372
+ alternativePlacements,
373
+ ]);
374
+ // #region Calculate Position
375
+ const calculatePosition = React.useCallback(() => {
376
+ if (!anchorElement || !popperRef.current) {
377
+ return;
378
+ }
379
+ const anchorRect = anchorElement.getBoundingClientRect();
380
+ const popperRect = popperRef.current.getBoundingClientRect();
381
+ const { style, placement } = getPreferredPlacements(anchorPos, anchorRect, popperRect);
382
+ setActualPlacement(placement);
383
+ setStyle(style);
384
+ }, [anchorElement, anchorPos, getPreferredPlacements]);
385
+ const frameRef = React.useRef(null);
386
+ const scheduleUpdate = React.useCallback(() => {
387
+ if (frameRef.current !== null) {
388
+ return;
389
+ }
390
+ frameRef.current = window.requestAnimationFrame(() => {
391
+ frameRef.current = null;
392
+ calculatePosition();
393
+ });
394
+ }, [calculatePosition]);
395
+ // Cancel the pending frame on unmount
396
+ React.useEffect(() => () => {
397
+ if (frameRef.current !== null) {
398
+ window.cancelAnimationFrame(frameRef.current);
399
+ frameRef.current = null;
400
+ }
401
+ }, []);
402
+ /**
403
+ * Close popper logic
404
+ */
405
+ React.useEffect(() => {
406
+ if (!isOpen) {
407
+ setIsVisible(false);
408
+ setStyle(null);
409
+ }
410
+ }, [isOpen]);
411
+ /**
412
+ * Open popper logic.
413
+ * Runs after every render because the popper node can appear later than `isOpen`
414
+ * becomes true (e.g. the portal is rendered only after the client mount)
415
+ */
416
+ useIsomorphicLayoutEffect(() => {
417
+ if (isOpen && !isVisible && anchorElement && popperRef.current) {
418
+ calculatePosition();
419
+ setIsVisible(true);
420
+ }
421
+ });
422
+ /**
423
+ * Recalculate position when the positioning params are changed
424
+ */
425
+ React.useEffect(() => {
426
+ if (isOpen && isVisible) {
427
+ calculatePosition();
428
+ }
429
+ // eslint-disable-next-line react-hooks/exhaustive-deps
430
+ }, [calculatePosition]);
431
+ /**
432
+ * The anchor element changes
433
+ */
434
+ React.useEffect(() => {
435
+ if (!isOpen || !anchorElement) {
436
+ return;
437
+ }
438
+ const observer = new MutationObserver(scheduleUpdate);
439
+ observer.observe(anchorElement, {
440
+ attributes: true,
441
+ childList: true,
442
+ subtree: true,
443
+ });
444
+ // eslint-disable-next-line consistent-return
445
+ return () => {
446
+ observer.disconnect();
447
+ };
448
+ }, [isOpen, anchorElement, scheduleUpdate]);
449
+ /**
450
+ * The size of the anchor or popper changes
451
+ */
452
+ React.useEffect(() => {
453
+ if (!isOpen || !isVisible || typeof ResizeObserver === 'undefined') {
454
+ return;
455
+ }
456
+ const observer = new ResizeObserver(scheduleUpdate);
457
+ if (anchorElement) {
458
+ observer.observe(anchorElement);
459
+ }
460
+ if (popperRef.current) {
461
+ observer.observe(popperRef.current);
462
+ }
463
+ // eslint-disable-next-line consistent-return
464
+ return () => {
465
+ observer.disconnect();
466
+ };
467
+ }, [isOpen, isVisible, anchorElement, scheduleUpdate]);
468
+ /**
469
+ * On scroll of any ancestor (captured on window) - recalculate position
470
+ */
471
+ React.useEffect(() => {
472
+ if (!isOpen) {
473
+ return;
474
+ }
475
+ const handleScroll = (event) => {
476
+ var _a;
477
+ // Scrolling inside the popper does not move it
478
+ if (event.target instanceof Node && ((_a = popperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
479
+ return;
480
+ }
481
+ scheduleUpdate();
482
+ };
483
+ window.addEventListener('scroll', handleScroll, { passive: true, capture: true });
484
+ // eslint-disable-next-line consistent-return
485
+ return () => {
486
+ window.removeEventListener('scroll', handleScroll, { capture: true });
487
+ };
488
+ }, [isOpen, scheduleUpdate]);
489
+ /**
490
+ * On window resize - recalculate position
491
+ */
492
+ React.useEffect(() => {
493
+ if (!isOpen) {
494
+ return;
495
+ }
496
+ window.addEventListener('resize', scheduleUpdate);
497
+ // eslint-disable-next-line consistent-return
498
+ return () => {
499
+ window.removeEventListener('resize', scheduleUpdate);
500
+ };
501
+ }, [scheduleUpdate, isOpen]);
502
+ return {
503
+ actualPlacement,
504
+ style,
505
+ popperRef,
506
+ isVisible,
507
+ scrollableAncestor,
508
+ calculatePosition,
509
+ setActualPlacement,
510
+ setStyle,
511
+ setIsVisible,
512
+ };
513
+ };
514
+ export default usePopper;