@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,48 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
18
+ const styled_1 = __importDefault(require("@emotion/styled"));
19
+ const react_2 = require("@emotion/react");
20
+ const useSliderColor_1 = __importDefault(require("./useSliderColor"));
21
+ const Track = styled_1.default.span `
22
+ position: absolute;
23
+ display: block;
24
+ border-radius: 1em;
25
+ background-color: ${({ $color }) => $color.toString()};
26
+ ${({ $orientation }) => $orientation === 'vertical'
27
+ ? (0, react_2.css) `
28
+ left: 50%;
29
+ width: 0.25em;
30
+ margin-left: -0.125em;
31
+ `
32
+ : (0, react_2.css) `
33
+ top: 50%;
34
+ height: 0.25em;
35
+ margin-top: -0.125em;
36
+ `}
37
+ `;
38
+ const SliderTrack = (props, ref) => {
39
+ const { children, color, orientation, disabled, start, end, style } = props, nativeProps = __rest(props, ["children", "color", "orientation", "disabled", "start", "end", "style"]);
40
+ const theme = (0, react_2.useTheme)();
41
+ const $color = (0, useSliderColor_1.default)(color);
42
+ // The position changes on every pointer move: an inline style, not a new emotion class per value
43
+ const position = orientation === 'vertical'
44
+ ? { bottom: `${start}%`, height: `${end - start}%` }
45
+ : { left: `${start}%`, width: `${end - start}%` };
46
+ return (react_1.default.createElement(Track, Object.assign({}, nativeProps, { style: Object.assign(Object.assign({}, position), style), "$color": disabled ? theme.color.textPrimary.mix(theme.color.surface, 0.55) : $color, "$orientation": orientation, ref: ref }), children));
47
+ };
48
+ exports.default = react_1.default.forwardRef(SliderTrack);
@@ -0,0 +1,134 @@
1
+ import React from 'react';
2
+ import { SliderContainerProps, SliderOrientation } from './SliderContainer';
3
+ import { SliderRailProps } from './SliderRail';
4
+ import { SliderTrackProps } from './SliderTrack';
5
+ import { SliderThumbProps } from './SliderThumb';
6
+ import { SliderMarkProps } from './SliderMark';
7
+ import { SliderMarkLabelProps } from './SliderMarkLabel';
8
+ export type { SliderOrientation };
9
+ /**
10
+ * A number for the single slider, a pair of numbers for the range
11
+ */
12
+ export type SliderValue = number | readonly [number, number];
13
+ export interface SliderMarkItem {
14
+ readonly value: number;
15
+ /**
16
+ * The text under the mark (to the right of it for the vertical slider)
17
+ */
18
+ readonly label?: React.ReactNode;
19
+ }
20
+ export type SliderProps<V extends SliderValue = number> = Omit<React.HTMLAttributes<HTMLSpanElement>, 'onChange' | 'defaultValue' | 'color'> & {
21
+ /**
22
+ * The value of the controlled slider: a number, or a pair of numbers for the range. Pass it together with `onChange`
23
+ * Default: undefined
24
+ */
25
+ readonly value?: V;
26
+ /**
27
+ * The initial value of the uncontrolled slider: a number, or a pair of numbers for the range
28
+ * Default: `min`
29
+ */
30
+ readonly defaultValue?: V;
31
+ /**
32
+ * Called on every change of the value while the thumb is dragged or moved by the keyboard.
33
+ * `activeThumb` is the index of the moved thumb: 0 for the single slider, 0 or 1 for the range
34
+ */
35
+ readonly onChange?: (value: V, event: React.SyntheticEvent, activeThumb: number) => void;
36
+ /**
37
+ * Called once the user releases the thumb, and after every key press.
38
+ * Use it for the expensive work, e.g. for requests to the server
39
+ */
40
+ readonly onChangeCommitted?: (value: V, event: React.SyntheticEvent) => void;
41
+ /**
42
+ * The minimum value
43
+ * Default: 0
44
+ */
45
+ readonly min?: number;
46
+ /**
47
+ * The maximum value
48
+ * Default: 100
49
+ */
50
+ readonly max?: number;
51
+ /**
52
+ * The value changes by this amount. It must be greater than zero
53
+ * Default: 1
54
+ */
55
+ readonly step?: number;
56
+ /**
57
+ * `true` shows a mark at every step, an array shows marks at the given values, optionally with labels
58
+ * Default: false
59
+ */
60
+ readonly marks?: boolean | readonly SliderMarkItem[];
61
+ /**
62
+ * Default: `horizontal`
63
+ */
64
+ readonly orientation?: SliderOrientation;
65
+ /**
66
+ * Default: false
67
+ */
68
+ readonly disabled?: boolean;
69
+ /**
70
+ * You can pass the primary, default, secondary name of the colors or your specified color value
71
+ * Default: `default`
72
+ */
73
+ readonly color?: 'default' | 'primary' | 'secondary' | string;
74
+ /**
75
+ * The name of the hidden input with the value, for the form submission.
76
+ * The range creates two inputs with this name
77
+ */
78
+ readonly name?: string;
79
+ /**
80
+ * The label of the thumb for the screen readers.
81
+ * For the range use `getAriaLabel`: the thumbs need different labels
82
+ */
83
+ readonly 'aria-label'?: string;
84
+ /**
85
+ * The id of the element that labels the thumbs
86
+ */
87
+ readonly 'aria-labelledby'?: string;
88
+ /**
89
+ * Returns the label of the thumb for the screen readers. Overrides `aria-label`
90
+ */
91
+ readonly getAriaLabel?: (index: number) => string;
92
+ /**
93
+ * Returns the text the screen readers announce instead of the bare number, e.g. «500 ₽»
94
+ */
95
+ readonly getAriaValueText?: (value: number, index: number) => string;
96
+ readonly overrides?: SliderOverrides;
97
+ };
98
+ export interface SliderOverrides {
99
+ /**
100
+ * The root element. It receives the pointer events
101
+ */
102
+ readonly Container?: React.ComponentType<SliderContainerProps & React.RefAttributes<HTMLSpanElement>>;
103
+ /**
104
+ * The whole line of the slider
105
+ */
106
+ readonly Rail?: React.ComponentType<SliderRailProps & React.RefAttributes<HTMLSpanElement>>;
107
+ /**
108
+ * The filled part of the line
109
+ */
110
+ readonly Track?: React.ComponentType<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
111
+ /**
112
+ * The thumb. It holds the focus and the slider role
113
+ */
114
+ readonly Thumb?: React.ComponentType<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
115
+ /**
116
+ * The dot of the mark on the line
117
+ */
118
+ readonly Mark?: React.ComponentType<SliderMarkProps & React.RefAttributes<HTMLSpanElement>>;
119
+ /**
120
+ * The label of the mark
121
+ */
122
+ readonly MarkLabel?: React.ComponentType<SliderMarkLabelProps & React.RefAttributes<HTMLSpanElement>>;
123
+ }
124
+ /**
125
+ * The slider is generic: the type of the value (a number or a pair of numbers)
126
+ * comes from `value` or `defaultValue` and goes to `onChange`
127
+ */
128
+ type SliderComponent = {
129
+ (props: SliderProps<number> & React.RefAttributes<HTMLSpanElement>): React.ReactElement | null;
130
+ (props: SliderProps<readonly [number, number]> & React.RefAttributes<HTMLSpanElement>): React.ReactElement | null;
131
+ displayName?: string;
132
+ };
133
+ declare const _default: SliderComponent;
134
+ export default _default;
@@ -0,0 +1,249 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ const react_1 = __importDefault(require("react"));
18
+ const SliderContainer_1 = __importDefault(require("./SliderContainer"));
19
+ const SliderRail_1 = __importDefault(require("./SliderRail"));
20
+ const SliderTrack_1 = __importDefault(require("./SliderTrack"));
21
+ const SliderThumb_1 = __importDefault(require("./SliderThumb"));
22
+ const SliderMark_1 = __importDefault(require("./SliderMark"));
23
+ const SliderMarkLabel_1 = __importDefault(require("./SliderMarkLabel"));
24
+ const utils_1 = require("./utils");
25
+ const Slider = (props, ref) => {
26
+ const { value, defaultValue, onChange, onChangeCommitted, min = 0, max = 100, step = 1, marks = false, orientation = 'horizontal', disabled = false, color, name, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, getAriaLabel, getAriaValueText, overrides, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, onLostPointerCapture } = props, nativeProps = __rest(props, ["value", "defaultValue", "onChange", "onChangeCommitted", "min", "max", "step", "marks", "orientation", "disabled", "color", "name", 'aria-label', 'aria-labelledby', "getAriaLabel", "getAriaValueText", "overrides", "onPointerDown", "onPointerMove", "onPointerUp", "onPointerCancel", "onLostPointerCapture"]);
27
+ const overridesMap = react_1.default.useMemo(() => ({
28
+ Container: (overrides === null || overrides === void 0 ? void 0 : overrides.Container) || SliderContainer_1.default,
29
+ Rail: (overrides === null || overrides === void 0 ? void 0 : overrides.Rail) || SliderRail_1.default,
30
+ Track: (overrides === null || overrides === void 0 ? void 0 : overrides.Track) || SliderTrack_1.default,
31
+ Thumb: (overrides === null || overrides === void 0 ? void 0 : overrides.Thumb) || SliderThumb_1.default,
32
+ Mark: (overrides === null || overrides === void 0 ? void 0 : overrides.Mark) || SliderMark_1.default,
33
+ MarkLabel: (overrides === null || overrides === void 0 ? void 0 : overrides.MarkLabel) || SliderMarkLabel_1.default,
34
+ }), [overrides]);
35
+ const isControlled = typeof value !== 'undefined';
36
+ const isRange = Array.isArray(isControlled ? value : defaultValue);
37
+ const [internalValues, setInternalValues] = react_1.default.useState(() => typeof defaultValue === 'undefined'
38
+ ? [min]
39
+ : typeof defaultValue === 'number'
40
+ ? [defaultValue]
41
+ : [...defaultValue]);
42
+ const rawValues = isControlled
43
+ ? typeof value === 'number'
44
+ ? [value]
45
+ : [...value]
46
+ : internalValues;
47
+ // The value from the props may be out of the bounds or in the wrong order: the slider shows the corrected one
48
+ const values = rawValues.map(v => (0, utils_1.clamp)(v, min, max)).sort((a, b) => a - b);
49
+ // The pointer events may come faster than the renders: the handlers read the latest values from the ref
50
+ const valuesRef = react_1.default.useRef(values);
51
+ valuesRef.current = values;
52
+ const containerRef = react_1.default.useRef(null);
53
+ const thumbRefs = react_1.default.useRef([]);
54
+ const dragRef = react_1.default.useRef(null);
55
+ const [activeIndex, setActiveIndex] = react_1.default.useState(null);
56
+ react_1.default.useImperativeHandle(ref, () => containerRef.current);
57
+ // Warn once, not on every render
58
+ const isControlledWithoutOnChange = isControlled && typeof onChange === 'undefined';
59
+ react_1.default.useEffect(() => {
60
+ if (isControlledWithoutOnChange) {
61
+ console.error('The property «onChange» should be passed with prop «value» to make component controlled');
62
+ }
63
+ }, [isControlledWithoutOnChange]);
64
+ react_1.default.useEffect(() => {
65
+ if (!(step > 0)) {
66
+ console.error(`The property «step» should be greater than zero, got «${step}»`);
67
+ }
68
+ }, [step]);
69
+ const toPublicValue = (next) => isRange ? [next[0], next[1]] : next[0];
70
+ /**
71
+ * Moves the thumb to the value. A range thumb can not pass the other one
72
+ */
73
+ const changeValue = (index, nextValue, event) => {
74
+ const current = valuesRef.current;
75
+ const lower = isRange && index === 1 ? current[0] : min;
76
+ const upper = isRange && index === 0 ? current[1] : max;
77
+ const bounded = (0, utils_1.clamp)(nextValue, lower, upper);
78
+ if (bounded === current[index]) {
79
+ return;
80
+ }
81
+ const next = current.map((v, i) => (i === index ? bounded : v));
82
+ valuesRef.current = next;
83
+ if (!isControlled) {
84
+ setInternalValues(next);
85
+ }
86
+ onChange === null || onChange === void 0 ? void 0 : onChange(toPublicValue(next), event, index);
87
+ };
88
+ const getValueFromPointer = (event) => {
89
+ const rect = containerRef.current.getBoundingClientRect();
90
+ const ratio = orientation === 'vertical'
91
+ ? (rect.bottom - event.clientY) / rect.height
92
+ : (event.clientX - rect.left) / rect.width;
93
+ return (0, utils_1.clamp)((0, utils_1.snapToStep)(min + (0, utils_1.clamp)(ratio, 0, 1) * (max - min), min, step), min, max);
94
+ };
95
+ const startDragOf = (index) => {
96
+ var _a;
97
+ setActiveIndex(index);
98
+ (_a = thumbRefs.current[index]) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
99
+ };
100
+ const handlePointerDown = event => {
101
+ onPointerDown === null || onPointerDown === void 0 ? void 0 : onPointerDown(event);
102
+ // Only the main mouse button, a finger or a pen
103
+ if (disabled || event.button !== 0 || event.defaultPrevented) {
104
+ return;
105
+ }
106
+ // Prevents the text selection and the focus on the container, the thumb gets the focus below
107
+ event.preventDefault();
108
+ const pointerValue = getValueFromPointer(event);
109
+ const current = valuesRef.current;
110
+ let index = 0;
111
+ if (isRange) {
112
+ if (current[0] === current[1]) {
113
+ // The thumbs are in the same place: the left one can only go left, the right one can only go right
114
+ index = pointerValue < current[0] ? 0 : pointerValue > current[1] ? 1 : null;
115
+ }
116
+ else {
117
+ index = Math.abs(pointerValue - current[0]) <= Math.abs(pointerValue - current[1]) ? 0 : 1;
118
+ }
119
+ }
120
+ event.currentTarget.setPointerCapture(event.pointerId);
121
+ dragRef.current = { pointerId: event.pointerId, index };
122
+ if (index === null) {
123
+ startDragOf(1);
124
+ return;
125
+ }
126
+ startDragOf(index);
127
+ changeValue(index, pointerValue, event);
128
+ };
129
+ const handlePointerMove = event => {
130
+ onPointerMove === null || onPointerMove === void 0 ? void 0 : onPointerMove(event);
131
+ const drag = dragRef.current;
132
+ if (!drag || drag.pointerId !== event.pointerId) {
133
+ return;
134
+ }
135
+ const pointerValue = getValueFromPointer(event);
136
+ let { index } = drag;
137
+ if (index === null) {
138
+ const current = valuesRef.current[0];
139
+ if (pointerValue === current) {
140
+ return;
141
+ }
142
+ index = pointerValue < current ? 0 : 1;
143
+ dragRef.current = { pointerId: drag.pointerId, index };
144
+ startDragOf(index);
145
+ }
146
+ changeValue(index, pointerValue, event);
147
+ };
148
+ const finishDrag = (event) => {
149
+ const drag = dragRef.current;
150
+ if (!drag || drag.pointerId !== event.pointerId) {
151
+ return;
152
+ }
153
+ dragRef.current = null;
154
+ setActiveIndex(null);
155
+ onChangeCommitted === null || onChangeCommitted === void 0 ? void 0 : onChangeCommitted(toPublicValue(valuesRef.current), event);
156
+ };
157
+ const handlePointerUp = event => {
158
+ onPointerUp === null || onPointerUp === void 0 ? void 0 : onPointerUp(event);
159
+ finishDrag(event);
160
+ };
161
+ const handlePointerCancel = event => {
162
+ onPointerCancel === null || onPointerCancel === void 0 ? void 0 : onPointerCancel(event);
163
+ finishDrag(event);
164
+ };
165
+ const handleLostPointerCapture = event => {
166
+ onLostPointerCapture === null || onLostPointerCapture === void 0 ? void 0 : onLostPointerCapture(event);
167
+ finishDrag(event);
168
+ };
169
+ const handleKeyDown = (index, event) => {
170
+ if (disabled) {
171
+ return;
172
+ }
173
+ const current = valuesRef.current[index];
174
+ // About ten big steps along the whole slider
175
+ const bigStep = step * Math.max(1, Math.round((max - min) / 10 / step));
176
+ let next;
177
+ switch (event.key) {
178
+ case 'ArrowRight':
179
+ case 'ArrowUp':
180
+ next = (0, utils_1.snapToStep)(current + (event.shiftKey ? bigStep : step), min, step);
181
+ break;
182
+ case 'ArrowLeft':
183
+ case 'ArrowDown':
184
+ next = (0, utils_1.snapToStep)(current - (event.shiftKey ? bigStep : step), min, step);
185
+ break;
186
+ case 'PageUp':
187
+ next = (0, utils_1.snapToStep)(current + bigStep, min, step);
188
+ break;
189
+ case 'PageDown':
190
+ next = (0, utils_1.snapToStep)(current - bigStep, min, step);
191
+ break;
192
+ case 'Home':
193
+ next = min;
194
+ break;
195
+ case 'End':
196
+ next = max;
197
+ break;
198
+ default:
199
+ return;
200
+ }
201
+ event.preventDefault();
202
+ const before = valuesRef.current;
203
+ changeValue(index, next, event);
204
+ if (valuesRef.current !== before) {
205
+ onChangeCommitted === null || onChangeCommitted === void 0 ? void 0 : onChangeCommitted(toPublicValue(valuesRef.current), event);
206
+ }
207
+ };
208
+ const markItems = react_1.default.useMemo(() => {
209
+ if (marks === true) {
210
+ if (!(step > 0)) {
211
+ return [];
212
+ }
213
+ const count = Math.floor((max - min) / step) + 1;
214
+ return Array.from({ length: count }, (_, i) => ({
215
+ value: (0, utils_1.snapToStep)(min + i * step, min, step),
216
+ }));
217
+ }
218
+ if (Array.isArray(marks)) {
219
+ return marks.filter(mark => mark.value >= min && mark.value <= max);
220
+ }
221
+ return [];
222
+ }, [marks, min, max, step]);
223
+ const hasMarkLabels = markItems.some(mark => mark.label != null && mark.label !== false);
224
+ const trackStart = isRange ? (0, utils_1.valueToPercent)(values[0], min, max) : 0;
225
+ const trackEnd = (0, utils_1.valueToPercent)(values[values.length - 1], min, max);
226
+ const isInTrack = (v) => (isRange ? v >= values[0] && v <= values[1] : v <= values[0]);
227
+ return (react_1.default.createElement(overridesMap.Container, Object.assign({}, nativeProps, { orientation: orientation, disabled: disabled, hasMarkLabels: hasMarkLabels, onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, onPointerUp: handlePointerUp, onPointerCancel: handlePointerCancel, onLostPointerCapture: handleLostPointerCapture, ref: containerRef }),
228
+ react_1.default.createElement(overridesMap.Rail, { color: color, orientation: orientation, disabled: disabled }),
229
+ react_1.default.createElement(overridesMap.Track, { color: color, orientation: orientation, disabled: disabled, start: trackStart, end: trackEnd }),
230
+ markItems.map(mark => (react_1.default.createElement(react_1.default.Fragment, { key: mark.value },
231
+ react_1.default.createElement(overridesMap.Mark, { orientation: orientation, position: (0, utils_1.valueToPercent)(mark.value, min, max), inTrack: isInTrack(mark.value) }),
232
+ mark.label != null && mark.label !== false && (react_1.default.createElement(overridesMap.MarkLabel, { orientation: orientation, position: (0, utils_1.valueToPercent)(mark.value, min, max), inTrack: isInTrack(mark.value) }, mark.label))))),
233
+ values.map((thumbValue, index) => (react_1.default.createElement(overridesMap.Thumb
234
+ // The thumb is identified by its place: the first or the second
235
+ // eslint-disable-next-line react/no-array-index-key
236
+ , {
237
+ // The thumb is identified by its place: the first or the second
238
+ // eslint-disable-next-line react/no-array-index-key
239
+ key: index, role: "slider", tabIndex: disabled ? -1 : 0, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": thumbValue, "aria-valuetext": getAriaValueText === null || getAriaValueText === void 0 ? void 0 : getAriaValueText(thumbValue, index), "aria-orientation": orientation, "aria-disabled": disabled || undefined, "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel, "aria-labelledby": ariaLabelledby, color: color, orientation: orientation, disabled: disabled, position: (0, utils_1.valueToPercent)(thumbValue, min, max), active: activeIndex === index, index: index,
240
+ // The dragged thumb is above the other one, so the thumbs in the same place stay reachable
241
+ style: activeIndex === index ? { zIndex: 2 } : undefined, onKeyDown: event => handleKeyDown(index, event), ref: (node) => {
242
+ thumbRefs.current[index] = node;
243
+ } }))),
244
+ typeof name !== 'undefined' &&
245
+ values.map((thumbValue, index) => (
246
+ // eslint-disable-next-line react/no-array-index-key
247
+ react_1.default.createElement("input", { key: index, type: "hidden", name: name, value: thumbValue, disabled: disabled })))));
248
+ };
249
+ exports.default = react_1.default.forwardRef(Slider);
@@ -0,0 +1,6 @@
1
+ import Color from '../Color';
2
+ /**
3
+ * Resolves the `color` property of the Slider to the Color instance
4
+ */
5
+ declare const useSliderColor: (color: "default" | "primary" | "secondary" | string | undefined) => Color;
6
+ export default useSliderColor;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_2 = require("@emotion/react");
8
+ const Color_1 = __importDefault(require("../Color"));
9
+ /**
10
+ * Resolves the `color` property of the Slider to the Color instance
11
+ */
12
+ const useSliderColor = (color) => {
13
+ const theme = (0, react_2.useTheme)();
14
+ return react_1.default.useMemo(() => {
15
+ switch (true) {
16
+ case color === 'secondary':
17
+ return theme.color.accentSecondary;
18
+ case typeof color === 'undefined':
19
+ case color === 'default':
20
+ case color === 'primary':
21
+ return theme.color.accentPrimary;
22
+ default:
23
+ try {
24
+ return Color_1.default.fromString(String(color));
25
+ }
26
+ catch (err) {
27
+ console.error(`invalid color value «${color}»`);
28
+ return theme.color.accentPrimary;
29
+ }
30
+ }
31
+ }, [color, theme.color]);
32
+ };
33
+ exports.default = useSliderColor;
@@ -0,0 +1,10 @@
1
+ export declare const clamp: (value: number, min: number, max: number) => number;
2
+ /**
3
+ * Snaps the value to the nearest step counted from `min`.
4
+ * The result is rounded to the precision of `step` and `min`: 0.1 + 0.2 gives 0.3, not 0.30000000000000004
5
+ */
6
+ export declare const snapToStep: (value: number, min: number, step: number) => number;
7
+ /**
8
+ * The position of the value on the rail, from 0 to 100
9
+ */
10
+ export declare const valueToPercent: (value: number, min: number, max: number) => number;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.valueToPercent = exports.snapToStep = exports.clamp = void 0;
4
+ /**
5
+ * Number of digits after the point, e.g. 2 for 0.05
6
+ */
7
+ const countDecimals = (value) => {
8
+ if (Number.isInteger(value)) {
9
+ return 0;
10
+ }
11
+ const [mantissa, exponent] = String(value).split('e-');
12
+ const fraction = (mantissa.split('.')[1] || '').length;
13
+ return exponent ? fraction + Number(exponent) : fraction;
14
+ };
15
+ const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
16
+ exports.clamp = clamp;
17
+ /**
18
+ * Snaps the value to the nearest step counted from `min`.
19
+ * The result is rounded to the precision of `step` and `min`: 0.1 + 0.2 gives 0.3, not 0.30000000000000004
20
+ */
21
+ const snapToStep = (value, min, step) => {
22
+ const snapped = Math.round((value - min) / step) * step + min;
23
+ const decimals = Math.max(countDecimals(step), countDecimals(min));
24
+ return Number(snapped.toFixed(decimals));
25
+ };
26
+ exports.snapToStep = snapToStep;
27
+ /**
28
+ * The position of the value on the rail, from 0 to 100
29
+ */
30
+ const valueToPercent = (value, min, max) => max === min ? 0 : ((value - min) * 100) / (max - min);
31
+ exports.valueToPercent = valueToPercent;
package/Stack/index.d.ts CHANGED
@@ -29,34 +29,46 @@ export type StackProps = React.HTMLAttributes<HTMLDivElement> & {
29
29
  * The stack takes the width of its content (`inline-flex`) instead of the full width
30
30
  */
31
31
  readonly inline?: boolean;
32
+ /**
33
+ * The element of the stack: `ul`, `ol`, `dl`, `nav`, `section` and others.
34
+ * The lists lose the default margins and markers\
35
+ * **Default:** `div`
36
+ */
37
+ readonly as?: React.ElementType;
32
38
  };
33
39
  declare const _default: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
34
40
  /**
35
41
  * `column` — the elements go one under another, `row` — in a line\
36
42
  * **Default:** `column`
37
43
  */
38
- readonly direction?: "row" | "column" | undefined;
44
+ readonly direction?: "column" | "row";
39
45
  /**
40
46
  * The gap between the elements: a step of the theme spacing scale or any CSS length\
41
47
  * **Default:** `md`
42
48
  */
43
- readonly gap?: Spacing | undefined;
49
+ readonly gap?: Spacing;
44
50
  /**
45
51
  * The alignment across the direction (`align-items`)\
46
52
  * **Default:** `stretch` for the column, `center` for the row
47
53
  */
48
- readonly align?: import("csstype").Property.AlignItems | undefined;
54
+ readonly align?: React.CSSProperties["alignItems"];
49
55
  /**
50
56
  * The alignment along the direction (`justify-content`)
51
57
  */
52
- readonly justify?: import("csstype").Property.JustifyContent | undefined;
58
+ readonly justify?: React.CSSProperties["justifyContent"];
53
59
  /**
54
60
  * The elements of the row wrap to the next line when they do not fit
55
61
  */
56
- readonly wrap?: boolean | undefined;
62
+ readonly wrap?: boolean;
57
63
  /**
58
64
  * The stack takes the width of its content (`inline-flex`) instead of the full width
59
65
  */
60
- readonly inline?: boolean | undefined;
66
+ readonly inline?: boolean;
67
+ /**
68
+ * The element of the stack: `ul`, `ol`, `dl`, `nav`, `section` and others.
69
+ * The lists lose the default margins and markers\
70
+ * **Default:** `div`
71
+ */
72
+ readonly as?: React.ElementType;
61
73
  } & React.RefAttributes<HTMLDivElement>>;
62
74
  export default _default;
package/Stack/index.js CHANGED
@@ -17,6 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  const react_1 = __importDefault(require("react"));
18
18
  const styled_1 = __importDefault(require("@emotion/styled"));
19
19
  const spacing_1 = require("../utils/spacing");
20
+ /**
21
+ * The lists are the rows of the elements here: no default margins and markers
22
+ */
23
+ const LIST_TAGS = ['ul', 'ol', 'dl'];
20
24
  const StyledStack = styled_1.default.div `
21
25
  display: ${({ $inline }) => ($inline ? 'inline-flex' : 'flex')};
22
26
  flex-direction: ${({ $direction }) => $direction};
@@ -26,13 +30,14 @@ const StyledStack = styled_1.default.div `
26
30
  gap: ${({ theme, $gap }) => (0, spacing_1.resolveSpacing)(theme, $gap)};
27
31
  /* A flex child shrinks below its content only with min-width: 0 */
28
32
  min-width: 0;
33
+ ${({ $isList }) => ($isList ? 'margin: 0; padding: 0; list-style: none;' : '')}
29
34
  `;
30
35
  /**
31
36
  * The elements in a column or in a row with the same gap between them.
32
37
  * The children stay the plain elements: no wrappers for the items
33
38
  */
34
39
  const Stack = (props, ref) => {
35
- const { children, direction = 'column', gap = 'md', align, justify, wrap = false, inline = false } = props, nativeProps = __rest(props, ["children", "direction", "gap", "align", "justify", "wrap", "inline"]);
36
- return (react_1.default.createElement(StyledStack, Object.assign({}, nativeProps, { "$direction": direction, "$gap": gap, "$align": align, "$justify": justify, "$wrap": wrap, "$inline": inline, ref: ref }), children));
40
+ const { children, direction = 'column', gap = 'md', align, justify, wrap = false, inline = false, as } = props, nativeProps = __rest(props, ["children", "direction", "gap", "align", "justify", "wrap", "inline", "as"]);
41
+ return (react_1.default.createElement(StyledStack, Object.assign({}, nativeProps, { "$direction": direction, "$gap": gap, "$align": align, "$justify": justify, "$wrap": wrap, "$inline": inline, "$isList": Boolean(as && LIST_TAGS.includes(as)), as: as, ref: ref }), children));
37
42
  };
38
43
  exports.default = react_1.default.forwardRef(Stack);
@@ -5,8 +5,8 @@ export type SurfaceContainerProps = React.HTMLAttributes<HTMLDivElement> & {
5
5
  readonly noPadding?: boolean;
6
6
  };
7
7
  declare const _default: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
8
- readonly inline?: boolean | undefined;
9
- readonly rounded?: boolean | undefined;
10
- readonly noPadding?: boolean | undefined;
8
+ readonly inline?: boolean;
9
+ readonly rounded?: boolean;
10
+ readonly noPadding?: boolean;
11
11
  } & React.RefAttributes<HTMLDivElement>>;
12
12
  export default _default;
@@ -17,13 +17,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  const react_1 = __importDefault(require("react"));
18
18
  const styled_1 = __importDefault(require("@emotion/styled"));
19
19
  const react_2 = require("@emotion/react");
20
+ const tokens_1 = require("../ThemeProvider/tokens");
20
21
  const StyledSurfaceContainer = styled_1.default.div `
21
22
  display: ${({ $inline }) => ($inline ? 'inline-flex' : 'flex')};
22
23
  box-sizing: border-box;
23
24
  flex-direction: column;
24
25
  background: ${({ theme }) => theme.color.surface.toString()};
25
26
  color: ${({ theme }) => theme.color.textPrimary.toString()};
26
- box-shadow: ${({ theme }) => `0 0.5em 2em -0.8em ${theme.color.surface.darken(100).alpha(0.4).toString()}`};
27
+ box-shadow: ${({ theme }) => (0, tokens_1.elevation)(theme, 'surface')};
27
28
  border-radius: ${({ theme }) => theme.shape.radiusFactor}em;
28
29
  font-size: 1em;
29
30
 
@@ -4,7 +4,7 @@ export type SurfaceContentProps = React.HTMLAttributes<HTMLDivElement> & {
4
4
  readonly rounded?: boolean;
5
5
  };
6
6
  declare const _default: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
7
- readonly noPadding?: boolean | undefined;
8
- readonly rounded?: boolean | undefined;
7
+ readonly noPadding?: boolean;
8
+ readonly rounded?: boolean;
9
9
  } & React.RefAttributes<HTMLDivElement>>;
10
10
  export default _default;