@fountain-ui/core 2.0.0-beta.3 → 2.0.0-beta.31

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 (892) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/build/commonjs/Accordion/Accordion.js +6 -8
  3. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  4. package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
  5. package/build/commonjs/Accordion/index.js.map +1 -1
  6. package/build/commonjs/AppBar/AppBar.js +9 -14
  7. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  8. package/build/commonjs/AppBar/AppBarProps.js.map +1 -1
  9. package/build/commonjs/AppBar/index.js.map +1 -1
  10. package/build/commonjs/AspectRatio/AspectRatioNative.js +1 -1
  11. package/build/commonjs/AspectRatio/AspectRatioNative.js.map +1 -1
  12. package/build/commonjs/AspectRatio/AspectRatioProps.js.map +1 -1
  13. package/build/commonjs/AspectRatio/AspectRatioWeb.js +1 -1
  14. package/build/commonjs/AspectRatio/AspectRatioWeb.js.map +1 -1
  15. package/build/commonjs/AspectRatio/index.js.map +1 -1
  16. package/build/commonjs/AspectRatio/index.native.js.map +1 -1
  17. package/build/commonjs/AspectRatio/utils.js +1 -1
  18. package/build/commonjs/AspectRatio/utils.js.map +1 -1
  19. package/build/commonjs/Avatar/Avatar.js.map +1 -1
  20. package/build/commonjs/Avatar/AvatarProps.js.map +1 -1
  21. package/build/commonjs/Avatar/index.js.map +1 -1
  22. package/build/commonjs/Badge/Badge.js +6 -15
  23. package/build/commonjs/Badge/Badge.js.map +1 -1
  24. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  25. package/build/commonjs/Badge/index.js.map +1 -1
  26. package/build/commonjs/Button/Button.js +1 -1
  27. package/build/commonjs/Button/Button.js.map +1 -1
  28. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  29. package/build/commonjs/Button/index.js.map +1 -1
  30. package/build/commonjs/ButtonBase/ButtonBase.js +64 -59
  31. package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
  32. package/build/commonjs/ButtonBase/ButtonBaseProps.js.map +1 -1
  33. package/build/commonjs/ButtonBase/index.js.map +1 -1
  34. package/build/commonjs/Card/Card.js +1 -1
  35. package/build/commonjs/Card/Card.js.map +1 -1
  36. package/build/commonjs/Card/CardProps.js.map +1 -1
  37. package/build/commonjs/Card/index.js.map +1 -1
  38. package/build/commonjs/CardActions/CardActions.js +1 -1
  39. package/build/commonjs/CardActions/CardActions.js.map +1 -1
  40. package/build/commonjs/CardActions/CardActionsProps.js.map +1 -1
  41. package/build/commonjs/CardActions/index.js.map +1 -1
  42. package/build/commonjs/CardContent/CardContent.js +1 -1
  43. package/build/commonjs/CardContent/CardContent.js.map +1 -1
  44. package/build/commonjs/CardContent/CardContentProps.js.map +1 -1
  45. package/build/commonjs/CardContent/index.js.map +1 -1
  46. package/build/commonjs/CardMedia/CardMedia.js +1 -1
  47. package/build/commonjs/CardMedia/CardMedia.js.map +1 -1
  48. package/build/commonjs/CardMedia/CardMediaProps.js.map +1 -1
  49. package/build/commonjs/CardMedia/index.js.map +1 -1
  50. package/build/commonjs/Checkbox/Checkbox.js +1 -1
  51. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  52. package/build/commonjs/Checkbox/CheckboxProps.js.map +1 -1
  53. package/build/commonjs/Checkbox/index.js.map +1 -1
  54. package/build/commonjs/Chip/Chip.js +3 -1
  55. package/build/commonjs/Chip/Chip.js.map +1 -1
  56. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  57. package/build/commonjs/Chip/index.js.map +1 -1
  58. package/build/commonjs/CircularProgress/CircularProgress.js +25 -27
  59. package/build/commonjs/CircularProgress/CircularProgress.js.map +1 -1
  60. package/build/commonjs/CircularProgress/index.js.map +1 -1
  61. package/build/commonjs/Column/Column.js.map +1 -1
  62. package/build/commonjs/Column/ColumnProps.js.map +1 -1
  63. package/build/commonjs/Column/index.js.map +1 -1
  64. package/build/commonjs/Dialog/Dialog.js +1 -1
  65. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  66. package/build/commonjs/Dialog/DialogProps.js.map +1 -1
  67. package/build/commonjs/Dialog/index.js.map +1 -1
  68. package/build/commonjs/DialogActions/DialogActions.js +1 -1
  69. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  70. package/build/commonjs/DialogActions/DialogActionsProps.js.map +1 -1
  71. package/build/commonjs/DialogActions/index.js.map +1 -1
  72. package/build/commonjs/DialogContent/DialogContent.js +1 -1
  73. package/build/commonjs/DialogContent/DialogContent.js.map +1 -1
  74. package/build/commonjs/DialogContent/DialogContentProps.js.map +1 -1
  75. package/build/commonjs/DialogContent/index.js.map +1 -1
  76. package/build/commonjs/DialogMedia/DialogMedia.js +1 -1
  77. package/build/commonjs/DialogMedia/DialogMedia.js.map +1 -1
  78. package/build/commonjs/DialogMedia/DialogMediaProps.js.map +1 -1
  79. package/build/commonjs/DialogMedia/index.js.map +1 -1
  80. package/build/commonjs/DialogTitle/DialogTitle.js +1 -1
  81. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  82. package/build/commonjs/DialogTitle/DialogTitleProps.js.map +1 -1
  83. package/build/commonjs/DialogTitle/index.js.map +1 -1
  84. package/build/commonjs/Divider/Divider.js +1 -1
  85. package/build/commonjs/Divider/Divider.js.map +1 -1
  86. package/build/commonjs/Divider/DividerProps.js.map +1 -1
  87. package/build/commonjs/Divider/index.js.map +1 -1
  88. package/build/commonjs/Fab/Fab.js +1 -1
  89. package/build/commonjs/Fab/Fab.js.map +1 -1
  90. package/build/commonjs/Fab/FabProps.js.map +1 -1
  91. package/build/commonjs/Fab/index.js.map +1 -1
  92. package/build/commonjs/Flexbox/Flexbox.js +1 -1
  93. package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
  94. package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
  95. package/build/commonjs/Flexbox/index.js.map +1 -1
  96. package/build/commonjs/IconButton/IconButton.js +1 -1
  97. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  98. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  99. package/build/commonjs/IconButton/index.js.map +1 -1
  100. package/build/commonjs/Image/Image.js +6 -2
  101. package/build/commonjs/Image/Image.js.map +1 -1
  102. package/build/commonjs/Image/ImageProps.js.map +1 -1
  103. package/build/commonjs/Image/index.js.map +1 -1
  104. package/build/commonjs/ImageCore/ImageCoreNative.js +34 -26
  105. package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
  106. package/build/commonjs/ImageCore/ImageCoreProps.js.map +1 -1
  107. package/build/commonjs/ImageCore/ImageCoreWeb.js.map +1 -1
  108. package/build/commonjs/ImageCore/ImageFileExtensionContext.js +18 -0
  109. package/build/commonjs/ImageCore/ImageFileExtensionContext.js.map +1 -0
  110. package/build/commonjs/ImageCore/ImageFileExtensionProvider.js +42 -0
  111. package/build/commonjs/ImageCore/ImageFileExtensionProvider.js.map +1 -0
  112. package/build/commonjs/ImageCore/index.js +27 -1
  113. package/build/commonjs/ImageCore/index.js.map +1 -1
  114. package/build/commonjs/ImageCore/index.native.js +27 -0
  115. package/build/commonjs/ImageCore/index.native.js.map +1 -1
  116. package/build/commonjs/Link/Link.js +5 -4
  117. package/build/commonjs/Link/Link.js.map +1 -1
  118. package/build/commonjs/Link/LinkProps.js.map +1 -1
  119. package/build/commonjs/Link/index.js.map +1 -1
  120. package/build/commonjs/List/List.js +1 -1
  121. package/build/commonjs/List/List.js.map +1 -1
  122. package/build/commonjs/List/ListProps.js.map +1 -1
  123. package/build/commonjs/List/index.js.map +1 -1
  124. package/build/commonjs/ListItem/ListItem.js +1 -1
  125. package/build/commonjs/ListItem/ListItem.js.map +1 -1
  126. package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
  127. package/build/commonjs/ListItem/index.js.map +1 -1
  128. package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -1
  129. package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
  130. package/build/commonjs/ListItemIcon/ListItemIconProps.js.map +1 -1
  131. package/build/commonjs/ListItemIcon/index.js.map +1 -1
  132. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
  133. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  134. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryActionProps.js.map +1 -1
  135. package/build/commonjs/ListItemSecondaryAction/index.js.map +1 -1
  136. package/build/commonjs/ListItemText/ListItemText.js +1 -1
  137. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  138. package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
  139. package/build/commonjs/ListItemText/index.js.map +1 -1
  140. package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
  141. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  142. package/build/commonjs/ListSubheader/ListSubheaderProps.js.map +1 -1
  143. package/build/commonjs/ListSubheader/index.js.map +1 -1
  144. package/build/commonjs/Menu/Menu.js.map +1 -1
  145. package/build/commonjs/Menu/MenuProps.js.map +1 -1
  146. package/build/commonjs/Menu/index.js.map +1 -1
  147. package/build/commonjs/MenuItem/MenuItem.js.map +1 -1
  148. package/build/commonjs/MenuItem/MenuItemProps.js.map +1 -1
  149. package/build/commonjs/MenuItem/index.js.map +1 -1
  150. package/build/commonjs/Modal/Modal.js +2 -2
  151. package/build/commonjs/Modal/Modal.js.map +1 -1
  152. package/build/commonjs/Modal/ModalProps.js.map +1 -1
  153. package/build/commonjs/Modal/SimpleBackdrop.js +1 -1
  154. package/build/commonjs/Modal/SimpleBackdrop.js.map +1 -1
  155. package/build/commonjs/Modal/SimpleBackdropProps.js.map +1 -1
  156. package/build/commonjs/Modal/index.js +4 -4
  157. package/build/commonjs/Modal/index.js.map +1 -1
  158. package/build/commonjs/Pagination/Pagination.js +10 -7
  159. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  160. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  161. package/build/commonjs/Pagination/index.js.map +1 -1
  162. package/build/commonjs/PaginationItem/PaginationItem.js +1 -1
  163. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  164. package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
  165. package/build/commonjs/PaginationItem/index.js.map +1 -1
  166. package/build/commonjs/Paper/Paper.js +12 -4
  167. package/build/commonjs/Paper/Paper.js.map +1 -1
  168. package/build/commonjs/Paper/PaperProps.js.map +1 -1
  169. package/build/commonjs/Paper/PaperStylesProvider.js +14 -0
  170. package/build/commonjs/Paper/PaperStylesProvider.js.map +1 -0
  171. package/build/commonjs/Paper/index.js.map +1 -1
  172. package/build/commonjs/Paper/usePaperStyles.js +17 -0
  173. package/build/commonjs/Paper/usePaperStyles.js.map +1 -0
  174. package/build/commonjs/Portal/Portal.js.map +1 -1
  175. package/build/commonjs/Portal/PortalConsumer.js +2 -2
  176. package/build/commonjs/Portal/PortalConsumer.js.map +1 -1
  177. package/build/commonjs/Portal/PortalHost.js +2 -2
  178. package/build/commonjs/Portal/PortalHost.js.map +1 -1
  179. package/build/commonjs/Portal/PortalManager.js +11 -8
  180. package/build/commonjs/Portal/PortalManager.js.map +1 -1
  181. package/build/commonjs/Portal/PortalProps.js.map +1 -1
  182. package/build/commonjs/Portal/index.js.map +1 -1
  183. package/build/commonjs/Pressable/index.js.map +1 -1
  184. package/build/commonjs/Radio/Radio.js +3 -8
  185. package/build/commonjs/Radio/Radio.js.map +1 -1
  186. package/build/commonjs/Radio/RadioProps.js.map +1 -1
  187. package/build/commonjs/Radio/index.js.map +1 -1
  188. package/build/commonjs/RadioGroup/RadioContextProvider.js.map +1 -1
  189. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  190. package/build/commonjs/RadioGroup/RadioGroupProps.js.map +1 -1
  191. package/build/commonjs/RadioGroup/index.js.map +1 -1
  192. package/build/commonjs/Row/Row.js.map +1 -1
  193. package/build/commonjs/Row/RowProps.js.map +1 -1
  194. package/build/commonjs/Row/index.js.map +1 -1
  195. package/build/commonjs/Slide/Slide.js +16 -20
  196. package/build/commonjs/Slide/Slide.js.map +1 -1
  197. package/build/commonjs/Slide/SlideProps.js.map +1 -1
  198. package/build/commonjs/Slide/index.js.map +1 -1
  199. package/build/commonjs/Slider/Slider.js +1 -1
  200. package/build/commonjs/Slider/Slider.js.map +1 -1
  201. package/build/commonjs/Slider/SliderProps.js.map +1 -1
  202. package/build/commonjs/Slider/index.js.map +1 -1
  203. package/build/commonjs/Snackbar/Snackbar.js +1 -1
  204. package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
  205. package/build/commonjs/Snackbar/SnackbarProps.js.map +1 -1
  206. package/build/commonjs/Snackbar/index.js.map +1 -1
  207. package/build/commonjs/SnackbarContent/SnackbarContent.js +1 -1
  208. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  209. package/build/commonjs/SnackbarContent/SnackbarContentProps.js.map +1 -1
  210. package/build/commonjs/SnackbarContent/index.js.map +1 -1
  211. package/build/commonjs/Spacer/Spacer.js +1 -1
  212. package/build/commonjs/Spacer/Spacer.js.map +1 -1
  213. package/build/commonjs/Spacer/SpacerProps.js.map +1 -1
  214. package/build/commonjs/Spacer/index.js.map +1 -1
  215. package/build/commonjs/SvgIcon/SvgIcon.js +1 -1
  216. package/build/commonjs/SvgIcon/SvgIcon.js.map +1 -1
  217. package/build/commonjs/SvgIcon/SvgIconProps.js.map +1 -1
  218. package/build/commonjs/SvgIcon/index.js.map +1 -1
  219. package/build/commonjs/Switch/Switch.js +1 -1
  220. package/build/commonjs/Switch/Switch.js.map +1 -1
  221. package/build/commonjs/Switch/SwitchProps.js.map +1 -1
  222. package/build/commonjs/Switch/index.js.map +1 -1
  223. package/build/commonjs/Tab/Tab.js +10 -6
  224. package/build/commonjs/Tab/Tab.js.map +1 -1
  225. package/build/commonjs/Tab/TabIndicator.js.map +1 -1
  226. package/build/commonjs/Tab/TabProps.js.map +1 -1
  227. package/build/commonjs/Tab/index.js.map +1 -1
  228. package/build/commonjs/TabBase/TabBase.js +1 -1
  229. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  230. package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
  231. package/build/commonjs/TabBase/index.js.map +1 -1
  232. package/build/commonjs/Tabs/IndexAwareTab.js +35 -0
  233. package/build/commonjs/Tabs/IndexAwareTab.js.map +1 -0
  234. package/build/commonjs/Tabs/InternalContext.js +17 -0
  235. package/build/commonjs/Tabs/InternalContext.js.map +1 -0
  236. package/build/commonjs/Tabs/ScrollableTabsView.js +35 -0
  237. package/build/commonjs/Tabs/ScrollableTabsView.js.map +1 -0
  238. package/build/commonjs/Tabs/TabCoordinate.js.map +1 -1
  239. package/build/commonjs/Tabs/TabIndicator.js +69 -28
  240. package/build/commonjs/Tabs/TabIndicator.js.map +1 -1
  241. package/build/commonjs/Tabs/TabIndicatorProps.js.map +1 -1
  242. package/build/commonjs/Tabs/Tabs.js +64 -82
  243. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  244. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  245. package/build/commonjs/Tabs/index.js.map +1 -1
  246. package/build/commonjs/Tabs/types.js +2 -0
  247. package/build/commonjs/Tabs/types.js.map +1 -0
  248. package/build/commonjs/Tabs/useIndexStore.js +35 -0
  249. package/build/commonjs/Tabs/useIndexStore.js.map +1 -0
  250. package/build/commonjs/Tabs/useScrollViewReaction.js +69 -0
  251. package/build/commonjs/Tabs/useScrollViewReaction.js.map +1 -0
  252. package/build/commonjs/Tabs/useTabCoordinates.js +30 -0
  253. package/build/commonjs/Tabs/useTabCoordinates.js.map +1 -0
  254. package/build/commonjs/Tabs/utils.js +19 -0
  255. package/build/commonjs/Tabs/utils.js.map +1 -0
  256. package/build/commonjs/TextField/InputLabel.js +11 -7
  257. package/build/commonjs/TextField/InputLabel.js.map +1 -1
  258. package/build/commonjs/TextField/OutlinedTextField.js +1 -2
  259. package/build/commonjs/TextField/OutlinedTextField.js.map +1 -1
  260. package/build/commonjs/TextField/TextField.js +6 -6
  261. package/build/commonjs/TextField/TextField.js.map +1 -1
  262. package/build/commonjs/TextField/TextFieldProps.js.map +1 -1
  263. package/build/commonjs/TextField/index.js.map +1 -1
  264. package/build/commonjs/TextField/utils.js +1 -1
  265. package/build/commonjs/TextField/utils.js.map +1 -1
  266. package/build/commonjs/Toolbar/Toolbar.js +1 -1
  267. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  268. package/build/commonjs/Toolbar/ToolbarProps.js.map +1 -1
  269. package/build/commonjs/Toolbar/index.js.map +1 -1
  270. package/build/commonjs/Tooltip/Tooltip.js +34 -28
  271. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  272. package/build/commonjs/Tooltip/TooltipProps.js.map +1 -1
  273. package/build/commonjs/Tooltip/UpArrow.js +6 -5
  274. package/build/commonjs/Tooltip/UpArrow.js.map +1 -1
  275. package/build/commonjs/Tooltip/UpArrowProps.js.map +1 -1
  276. package/build/commonjs/Tooltip/index.js.map +1 -1
  277. package/build/commonjs/Typography/Typography.js +2 -0
  278. package/build/commonjs/Typography/Typography.js.map +1 -1
  279. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  280. package/build/commonjs/Typography/index.js.map +1 -1
  281. package/build/commonjs/animated/AnimatedAppBar.js.map +1 -1
  282. package/build/commonjs/animated/AnimatedFlatList.js.map +1 -1
  283. package/build/commonjs/animated/AnimatedPressable.js +2 -3
  284. package/build/commonjs/animated/AnimatedPressable.js.map +1 -1
  285. package/build/commonjs/animated/AnimatedTypography.js.map +1 -1
  286. package/build/commonjs/animated/index.js.map +1 -1
  287. package/build/commonjs/hooks/index.js +24 -0
  288. package/build/commonjs/hooks/index.js.map +1 -1
  289. package/build/commonjs/hooks/useAnimatedValue.js +31 -0
  290. package/build/commonjs/hooks/useAnimatedValue.js.map +1 -0
  291. package/build/commonjs/hooks/useAppbarStyles.js.map +1 -1
  292. package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
  293. package/build/commonjs/hooks/useCollapsibleAppBar.js +60 -63
  294. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  295. package/build/commonjs/hooks/useContentContainerStyle.js +2 -1
  296. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  297. package/build/commonjs/hooks/useElevationStyle.js.map +1 -1
  298. package/build/commonjs/hooks/useFadeInAppBar.js +45 -35
  299. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  300. package/build/commonjs/hooks/useImperativeState.js +26 -0
  301. package/build/commonjs/hooks/useImperativeState.js.map +1 -0
  302. package/build/commonjs/hooks/useSyncAnimatedValue.js +40 -0
  303. package/build/commonjs/hooks/useSyncAnimatedValue.js.map +1 -0
  304. package/build/commonjs/hooks/useThrottle.js +4 -8
  305. package/build/commonjs/hooks/useThrottle.js.map +1 -1
  306. package/build/commonjs/hooks/useValidWindowDimensions/index.ios.js +14 -7
  307. package/build/commonjs/hooks/useValidWindowDimensions/index.ios.js.map +1 -1
  308. package/build/commonjs/hooks/useValidWindowDimensions/index.js.map +1 -1
  309. package/build/commonjs/index.js +34 -6
  310. package/build/commonjs/index.js.map +1 -1
  311. package/build/commonjs/internal/hooks/index.js +0 -8
  312. package/build/commonjs/internal/hooks/index.js.map +1 -1
  313. package/build/commonjs/internal/hooks/useHeight.js +6 -9
  314. package/build/commonjs/internal/hooks/useHeight.js.map +1 -1
  315. package/build/commonjs/internal/icons/Checkbox.js.map +1 -1
  316. package/build/commonjs/internal/icons/CheckboxChecked.js +3 -8
  317. package/build/commonjs/internal/icons/CheckboxChecked.js.map +1 -1
  318. package/build/commonjs/internal/icons/ChevronDown.js.map +1 -1
  319. package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
  320. package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
  321. package/build/commonjs/internal/icons/CircularProgress.js.map +1 -1
  322. package/build/commonjs/internal/icons/Close.js.map +1 -1
  323. package/build/commonjs/internal/icons/Radio.js.map +1 -1
  324. package/build/commonjs/internal/icons/RadioChecked.js.map +1 -1
  325. package/build/commonjs/internal/icons/index.js.map +1 -1
  326. package/build/commonjs/internal/index.js.map +1 -1
  327. package/build/commonjs/store/MockStore.js +27 -0
  328. package/build/commonjs/store/MockStore.js.map +1 -0
  329. package/build/commonjs/store/SimpleStore.js +59 -0
  330. package/build/commonjs/store/SimpleStore.js.map +1 -0
  331. package/build/commonjs/store/index.js +24 -0
  332. package/build/commonjs/store/index.js.map +1 -0
  333. package/build/commonjs/store/types.js +2 -0
  334. package/build/commonjs/store/types.js.map +1 -0
  335. package/build/commonjs/styles/EdgeInsets.js +9 -6
  336. package/build/commonjs/styles/EdgeInsets.js.map +1 -1
  337. package/build/commonjs/styles/PredefinedStyles.js.map +1 -1
  338. package/build/commonjs/styles/StyleSheet.js.map +1 -1
  339. package/build/commonjs/styles/ThemeProvider.js.map +1 -1
  340. package/build/commonjs/styles/createFontStyle.js +2 -2
  341. package/build/commonjs/styles/createFontStyle.js.map +1 -1
  342. package/build/commonjs/styles/index.js +14 -14
  343. package/build/commonjs/styles/index.js.map +1 -1
  344. package/build/commonjs/styles/styled.js +4 -4
  345. package/build/commonjs/styles/styled.js.map +1 -1
  346. package/build/commonjs/styles/useTheme.js.map +1 -1
  347. package/build/commonjs/types/index.js.map +1 -1
  348. package/build/commonjs/utils/cloneElementSafely.js.map +1 -1
  349. package/build/commonjs/utils/createSvgIcon.js.map +1 -1
  350. package/build/commonjs/utils/index.js.map +1 -1
  351. package/build/module/Accordion/Accordion.js +6 -6
  352. package/build/module/Accordion/Accordion.js.map +1 -1
  353. package/build/module/Accordion/AccordionProps.js.map +1 -1
  354. package/build/module/Accordion/index.js.map +1 -1
  355. package/build/module/AppBar/AppBar.js +9 -14
  356. package/build/module/AppBar/AppBar.js.map +1 -1
  357. package/build/module/AppBar/AppBarProps.js.map +1 -1
  358. package/build/module/AppBar/index.js.map +1 -1
  359. package/build/module/AspectRatio/AspectRatioNative.js +1 -1
  360. package/build/module/AspectRatio/AspectRatioNative.js.map +1 -1
  361. package/build/module/AspectRatio/AspectRatioProps.js.map +1 -1
  362. package/build/module/AspectRatio/AspectRatioWeb.js +1 -1
  363. package/build/module/AspectRatio/AspectRatioWeb.js.map +1 -1
  364. package/build/module/AspectRatio/index.js.map +1 -1
  365. package/build/module/AspectRatio/index.native.js.map +1 -1
  366. package/build/module/AspectRatio/utils.js.map +1 -1
  367. package/build/module/Avatar/Avatar.js.map +1 -1
  368. package/build/module/Avatar/AvatarProps.js.map +1 -1
  369. package/build/module/Avatar/index.js.map +1 -1
  370. package/build/module/Badge/Badge.js +6 -15
  371. package/build/module/Badge/Badge.js.map +1 -1
  372. package/build/module/Badge/BadgeProps.js.map +1 -1
  373. package/build/module/Badge/index.js.map +1 -1
  374. package/build/module/Button/Button.js +1 -1
  375. package/build/module/Button/Button.js.map +1 -1
  376. package/build/module/Button/ButtonProps.js.map +1 -1
  377. package/build/module/Button/index.js.map +1 -1
  378. package/build/module/ButtonBase/ButtonBase.js +62 -51
  379. package/build/module/ButtonBase/ButtonBase.js.map +1 -1
  380. package/build/module/ButtonBase/ButtonBaseProps.js.map +1 -1
  381. package/build/module/ButtonBase/index.js.map +1 -1
  382. package/build/module/Card/Card.js +1 -1
  383. package/build/module/Card/Card.js.map +1 -1
  384. package/build/module/Card/CardProps.js.map +1 -1
  385. package/build/module/Card/index.js.map +1 -1
  386. package/build/module/CardActions/CardActions.js +1 -1
  387. package/build/module/CardActions/CardActions.js.map +1 -1
  388. package/build/module/CardActions/CardActionsProps.js.map +1 -1
  389. package/build/module/CardActions/index.js.map +1 -1
  390. package/build/module/CardContent/CardContent.js +1 -1
  391. package/build/module/CardContent/CardContent.js.map +1 -1
  392. package/build/module/CardContent/CardContentProps.js.map +1 -1
  393. package/build/module/CardContent/index.js.map +1 -1
  394. package/build/module/CardMedia/CardMedia.js +1 -1
  395. package/build/module/CardMedia/CardMedia.js.map +1 -1
  396. package/build/module/CardMedia/CardMediaProps.js.map +1 -1
  397. package/build/module/CardMedia/index.js.map +1 -1
  398. package/build/module/Checkbox/Checkbox.js +1 -1
  399. package/build/module/Checkbox/Checkbox.js.map +1 -1
  400. package/build/module/Checkbox/CheckboxProps.js.map +1 -1
  401. package/build/module/Checkbox/index.js.map +1 -1
  402. package/build/module/Chip/Chip.js +3 -1
  403. package/build/module/Chip/Chip.js.map +1 -1
  404. package/build/module/Chip/ChipProps.js.map +1 -1
  405. package/build/module/Chip/index.js.map +1 -1
  406. package/build/module/CircularProgress/CircularProgress.js +24 -20
  407. package/build/module/CircularProgress/CircularProgress.js.map +1 -1
  408. package/build/module/CircularProgress/index.js.map +1 -1
  409. package/build/module/Column/Column.js.map +1 -1
  410. package/build/module/Column/ColumnProps.js.map +1 -1
  411. package/build/module/Column/index.js.map +1 -1
  412. package/build/module/Dialog/Dialog.js +1 -1
  413. package/build/module/Dialog/Dialog.js.map +1 -1
  414. package/build/module/Dialog/DialogProps.js.map +1 -1
  415. package/build/module/Dialog/index.js.map +1 -1
  416. package/build/module/DialogActions/DialogActions.js +1 -1
  417. package/build/module/DialogActions/DialogActions.js.map +1 -1
  418. package/build/module/DialogActions/DialogActionsProps.js.map +1 -1
  419. package/build/module/DialogActions/index.js.map +1 -1
  420. package/build/module/DialogContent/DialogContent.js +1 -1
  421. package/build/module/DialogContent/DialogContent.js.map +1 -1
  422. package/build/module/DialogContent/DialogContentProps.js.map +1 -1
  423. package/build/module/DialogContent/index.js.map +1 -1
  424. package/build/module/DialogMedia/DialogMedia.js +1 -1
  425. package/build/module/DialogMedia/DialogMedia.js.map +1 -1
  426. package/build/module/DialogMedia/DialogMediaProps.js.map +1 -1
  427. package/build/module/DialogMedia/index.js.map +1 -1
  428. package/build/module/DialogTitle/DialogTitle.js +1 -1
  429. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  430. package/build/module/DialogTitle/DialogTitleProps.js.map +1 -1
  431. package/build/module/DialogTitle/index.js.map +1 -1
  432. package/build/module/Divider/Divider.js +1 -1
  433. package/build/module/Divider/Divider.js.map +1 -1
  434. package/build/module/Divider/DividerProps.js.map +1 -1
  435. package/build/module/Divider/index.js.map +1 -1
  436. package/build/module/Fab/Fab.js +1 -1
  437. package/build/module/Fab/Fab.js.map +1 -1
  438. package/build/module/Fab/FabProps.js.map +1 -1
  439. package/build/module/Fab/index.js.map +1 -1
  440. package/build/module/Flexbox/Flexbox.js +1 -1
  441. package/build/module/Flexbox/Flexbox.js.map +1 -1
  442. package/build/module/Flexbox/FlexboxProps.js.map +1 -1
  443. package/build/module/Flexbox/index.js.map +1 -1
  444. package/build/module/IconButton/IconButton.js +1 -1
  445. package/build/module/IconButton/IconButton.js.map +1 -1
  446. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  447. package/build/module/IconButton/index.js.map +1 -1
  448. package/build/module/Image/Image.js +6 -2
  449. package/build/module/Image/Image.js.map +1 -1
  450. package/build/module/Image/ImageProps.js.map +1 -1
  451. package/build/module/Image/index.js.map +1 -1
  452. package/build/module/ImageCore/ImageCoreNative.js +28 -25
  453. package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
  454. package/build/module/ImageCore/ImageCoreProps.js.map +1 -1
  455. package/build/module/ImageCore/ImageCoreWeb.js.map +1 -1
  456. package/build/module/ImageCore/ImageFileExtensionContext.js +5 -0
  457. package/build/module/ImageCore/ImageFileExtensionContext.js.map +1 -0
  458. package/build/module/ImageCore/ImageFileExtensionProvider.js +24 -0
  459. package/build/module/ImageCore/ImageFileExtensionProvider.js.map +1 -0
  460. package/build/module/ImageCore/index.js +2 -0
  461. package/build/module/ImageCore/index.js.map +1 -1
  462. package/build/module/ImageCore/index.native.js +2 -0
  463. package/build/module/ImageCore/index.native.js.map +1 -1
  464. package/build/module/Link/Link.js +5 -4
  465. package/build/module/Link/Link.js.map +1 -1
  466. package/build/module/Link/LinkProps.js.map +1 -1
  467. package/build/module/Link/index.js.map +1 -1
  468. package/build/module/List/List.js +1 -1
  469. package/build/module/List/List.js.map +1 -1
  470. package/build/module/List/ListProps.js.map +1 -1
  471. package/build/module/List/index.js.map +1 -1
  472. package/build/module/ListItem/ListItem.js +1 -1
  473. package/build/module/ListItem/ListItem.js.map +1 -1
  474. package/build/module/ListItem/ListItemProps.js.map +1 -1
  475. package/build/module/ListItem/index.js.map +1 -1
  476. package/build/module/ListItemIcon/ListItemIcon.js +1 -1
  477. package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
  478. package/build/module/ListItemIcon/ListItemIconProps.js.map +1 -1
  479. package/build/module/ListItemIcon/index.js.map +1 -1
  480. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
  481. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  482. package/build/module/ListItemSecondaryAction/ListItemSecondaryActionProps.js.map +1 -1
  483. package/build/module/ListItemSecondaryAction/index.js.map +1 -1
  484. package/build/module/ListItemText/ListItemText.js +1 -1
  485. package/build/module/ListItemText/ListItemText.js.map +1 -1
  486. package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
  487. package/build/module/ListItemText/index.js.map +1 -1
  488. package/build/module/ListSubheader/ListSubheader.js +1 -1
  489. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  490. package/build/module/ListSubheader/ListSubheaderProps.js.map +1 -1
  491. package/build/module/ListSubheader/index.js.map +1 -1
  492. package/build/module/Menu/Menu.js.map +1 -1
  493. package/build/module/Menu/MenuProps.js.map +1 -1
  494. package/build/module/Menu/index.js.map +1 -1
  495. package/build/module/MenuItem/MenuItem.js.map +1 -1
  496. package/build/module/MenuItem/MenuItemProps.js.map +1 -1
  497. package/build/module/MenuItem/index.js.map +1 -1
  498. package/build/module/Modal/Modal.js +1 -1
  499. package/build/module/Modal/Modal.js.map +1 -1
  500. package/build/module/Modal/ModalProps.js.map +1 -1
  501. package/build/module/Modal/SimpleBackdrop.js +1 -1
  502. package/build/module/Modal/SimpleBackdrop.js.map +1 -1
  503. package/build/module/Modal/SimpleBackdropProps.js.map +1 -1
  504. package/build/module/Modal/index.js.map +1 -1
  505. package/build/module/Pagination/Pagination.js +10 -7
  506. package/build/module/Pagination/Pagination.js.map +1 -1
  507. package/build/module/Pagination/PaginationProps.js.map +1 -1
  508. package/build/module/Pagination/index.js.map +1 -1
  509. package/build/module/PaginationItem/PaginationItem.js +1 -1
  510. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  511. package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
  512. package/build/module/PaginationItem/index.js.map +1 -1
  513. package/build/module/Paper/Paper.js +11 -4
  514. package/build/module/Paper/Paper.js.map +1 -1
  515. package/build/module/Paper/PaperProps.js.map +1 -1
  516. package/build/module/Paper/PaperStylesProvider.js +4 -0
  517. package/build/module/Paper/PaperStylesProvider.js.map +1 -0
  518. package/build/module/Paper/index.js.map +1 -1
  519. package/build/module/Paper/usePaperStyles.js +7 -0
  520. package/build/module/Paper/usePaperStyles.js.map +1 -0
  521. package/build/module/Portal/Portal.js.map +1 -1
  522. package/build/module/Portal/PortalConsumer.js +2 -2
  523. package/build/module/Portal/PortalConsumer.js.map +1 -1
  524. package/build/module/Portal/PortalHost.js +2 -2
  525. package/build/module/Portal/PortalHost.js.map +1 -1
  526. package/build/module/Portal/PortalManager.js +11 -8
  527. package/build/module/Portal/PortalManager.js.map +1 -1
  528. package/build/module/Portal/PortalProps.js.map +1 -1
  529. package/build/module/Portal/index.js.map +1 -1
  530. package/build/module/Pressable/index.js.map +1 -1
  531. package/build/module/Radio/Radio.js +4 -9
  532. package/build/module/Radio/Radio.js.map +1 -1
  533. package/build/module/Radio/RadioProps.js.map +1 -1
  534. package/build/module/Radio/index.js.map +1 -1
  535. package/build/module/RadioGroup/RadioContextProvider.js.map +1 -1
  536. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  537. package/build/module/RadioGroup/RadioGroupProps.js.map +1 -1
  538. package/build/module/RadioGroup/index.js.map +1 -1
  539. package/build/module/Row/Row.js.map +1 -1
  540. package/build/module/Row/RowProps.js.map +1 -1
  541. package/build/module/Row/index.js.map +1 -1
  542. package/build/module/Slide/Slide.js +19 -15
  543. package/build/module/Slide/Slide.js.map +1 -1
  544. package/build/module/Slide/SlideProps.js.map +1 -1
  545. package/build/module/Slide/index.js.map +1 -1
  546. package/build/module/Slider/Slider.js +1 -1
  547. package/build/module/Slider/Slider.js.map +1 -1
  548. package/build/module/Slider/SliderProps.js.map +1 -1
  549. package/build/module/Slider/index.js.map +1 -1
  550. package/build/module/Snackbar/Snackbar.js +1 -1
  551. package/build/module/Snackbar/Snackbar.js.map +1 -1
  552. package/build/module/Snackbar/SnackbarProps.js.map +1 -1
  553. package/build/module/Snackbar/index.js.map +1 -1
  554. package/build/module/SnackbarContent/SnackbarContent.js +1 -1
  555. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  556. package/build/module/SnackbarContent/SnackbarContentProps.js.map +1 -1
  557. package/build/module/SnackbarContent/index.js.map +1 -1
  558. package/build/module/Spacer/Spacer.js +1 -1
  559. package/build/module/Spacer/Spacer.js.map +1 -1
  560. package/build/module/Spacer/SpacerProps.js.map +1 -1
  561. package/build/module/Spacer/index.js.map +1 -1
  562. package/build/module/SvgIcon/SvgIcon.js +1 -1
  563. package/build/module/SvgIcon/SvgIcon.js.map +1 -1
  564. package/build/module/SvgIcon/SvgIconProps.js.map +1 -1
  565. package/build/module/SvgIcon/index.js.map +1 -1
  566. package/build/module/Switch/Switch.js +1 -1
  567. package/build/module/Switch/Switch.js.map +1 -1
  568. package/build/module/Switch/SwitchProps.js.map +1 -1
  569. package/build/module/Switch/index.js.map +1 -1
  570. package/build/module/Tab/Tab.js +6 -6
  571. package/build/module/Tab/Tab.js.map +1 -1
  572. package/build/module/Tab/TabIndicator.js.map +1 -1
  573. package/build/module/Tab/TabProps.js.map +1 -1
  574. package/build/module/Tab/index.js.map +1 -1
  575. package/build/module/TabBase/TabBase.js +1 -1
  576. package/build/module/TabBase/TabBase.js.map +1 -1
  577. package/build/module/TabBase/TabBaseProps.js.map +1 -1
  578. package/build/module/TabBase/index.js.map +1 -1
  579. package/build/module/Tabs/IndexAwareTab.js +23 -0
  580. package/build/module/Tabs/IndexAwareTab.js.map +1 -0
  581. package/build/module/Tabs/InternalContext.js +7 -0
  582. package/build/module/Tabs/InternalContext.js.map +1 -0
  583. package/build/module/Tabs/ScrollableTabsView.js +22 -0
  584. package/build/module/Tabs/ScrollableTabsView.js.map +1 -0
  585. package/build/module/Tabs/TabCoordinate.js.map +1 -1
  586. package/build/module/Tabs/TabIndicator.js +62 -25
  587. package/build/module/Tabs/TabIndicator.js.map +1 -1
  588. package/build/module/Tabs/TabIndicatorProps.js.map +1 -1
  589. package/build/module/Tabs/Tabs.js +57 -70
  590. package/build/module/Tabs/Tabs.js.map +1 -1
  591. package/build/module/Tabs/TabsProps.js.map +1 -1
  592. package/build/module/Tabs/index.js.map +1 -1
  593. package/build/module/Tabs/types.js +2 -0
  594. package/build/module/Tabs/types.js.map +1 -0
  595. package/build/module/Tabs/useIndexStore.js +25 -0
  596. package/build/module/Tabs/useIndexStore.js.map +1 -0
  597. package/build/module/Tabs/useScrollViewReaction.js +57 -0
  598. package/build/module/Tabs/useScrollViewReaction.js.map +1 -0
  599. package/build/module/Tabs/useTabCoordinates.js +21 -0
  600. package/build/module/Tabs/useTabCoordinates.js.map +1 -0
  601. package/build/module/Tabs/utils.js +9 -0
  602. package/build/module/Tabs/utils.js.map +1 -0
  603. package/build/module/TextField/InputLabel.js +10 -7
  604. package/build/module/TextField/InputLabel.js.map +1 -1
  605. package/build/module/TextField/OutlinedTextField.js +1 -2
  606. package/build/module/TextField/OutlinedTextField.js.map +1 -1
  607. package/build/module/TextField/TextField.js +4 -3
  608. package/build/module/TextField/TextField.js.map +1 -1
  609. package/build/module/TextField/TextFieldProps.js.map +1 -1
  610. package/build/module/TextField/index.js.map +1 -1
  611. package/build/module/TextField/utils.js.map +1 -1
  612. package/build/module/Toolbar/Toolbar.js +1 -1
  613. package/build/module/Toolbar/Toolbar.js.map +1 -1
  614. package/build/module/Toolbar/ToolbarProps.js.map +1 -1
  615. package/build/module/Toolbar/index.js.map +1 -1
  616. package/build/module/Tooltip/Tooltip.js +29 -21
  617. package/build/module/Tooltip/Tooltip.js.map +1 -1
  618. package/build/module/Tooltip/TooltipProps.js.map +1 -1
  619. package/build/module/Tooltip/UpArrow.js +6 -5
  620. package/build/module/Tooltip/UpArrow.js.map +1 -1
  621. package/build/module/Tooltip/UpArrowProps.js.map +1 -1
  622. package/build/module/Tooltip/index.js.map +1 -1
  623. package/build/module/Typography/Typography.js +2 -0
  624. package/build/module/Typography/Typography.js.map +1 -1
  625. package/build/module/Typography/TypographyProps.js.map +1 -1
  626. package/build/module/Typography/index.js.map +1 -1
  627. package/build/module/animated/AnimatedAppBar.js.map +1 -1
  628. package/build/module/animated/AnimatedFlatList.js.map +1 -1
  629. package/build/module/animated/AnimatedPressable.js +2 -3
  630. package/build/module/animated/AnimatedPressable.js.map +1 -1
  631. package/build/module/animated/AnimatedTypography.js.map +1 -1
  632. package/build/module/animated/index.js.map +1 -1
  633. package/build/module/hooks/index.js +3 -0
  634. package/build/module/hooks/index.js.map +1 -1
  635. package/build/module/hooks/useAnimatedValue.js +22 -0
  636. package/build/module/hooks/useAnimatedValue.js.map +1 -0
  637. package/build/module/hooks/useAppbarStyles.js.map +1 -1
  638. package/build/module/hooks/useBreakpointUp.js.map +1 -1
  639. package/build/module/hooks/useCollapsibleAppBar.js +60 -53
  640. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  641. package/build/module/hooks/useContentContainerStyle.js +2 -1
  642. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  643. package/build/module/hooks/useElevationStyle.js.map +1 -1
  644. package/build/module/hooks/useFadeInAppBar.js +48 -28
  645. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  646. package/build/module/hooks/useImperativeState.js +17 -0
  647. package/build/module/hooks/useImperativeState.js.map +1 -0
  648. package/build/module/hooks/useSyncAnimatedValue.js +28 -0
  649. package/build/module/hooks/useSyncAnimatedValue.js.map +1 -0
  650. package/build/module/hooks/useThrottle.js +4 -4
  651. package/build/module/hooks/useThrottle.js.map +1 -1
  652. package/build/module/hooks/useValidWindowDimensions/index.ios.js +15 -9
  653. package/build/module/hooks/useValidWindowDimensions/index.ios.js.map +1 -1
  654. package/build/module/hooks/useValidWindowDimensions/index.js.map +1 -1
  655. package/build/module/index.js +2 -0
  656. package/build/module/index.js.map +1 -1
  657. package/build/module/internal/hooks/index.js +0 -1
  658. package/build/module/internal/hooks/index.js.map +1 -1
  659. package/build/module/internal/hooks/useHeight.js +6 -5
  660. package/build/module/internal/hooks/useHeight.js.map +1 -1
  661. package/build/module/internal/icons/Checkbox.js.map +1 -1
  662. package/build/module/internal/icons/CheckboxChecked.js +3 -8
  663. package/build/module/internal/icons/CheckboxChecked.js.map +1 -1
  664. package/build/module/internal/icons/ChevronDown.js.map +1 -1
  665. package/build/module/internal/icons/ChevronLeft.js.map +1 -1
  666. package/build/module/internal/icons/ChevronRight.js.map +1 -1
  667. package/build/module/internal/icons/CircularProgress.js.map +1 -1
  668. package/build/module/internal/icons/Close.js.map +1 -1
  669. package/build/module/internal/icons/Radio.js.map +1 -1
  670. package/build/module/internal/icons/RadioChecked.js.map +1 -1
  671. package/build/module/internal/icons/index.js.map +1 -1
  672. package/build/module/internal/index.js.map +1 -1
  673. package/build/module/store/MockStore.js +18 -0
  674. package/build/module/store/MockStore.js.map +1 -0
  675. package/build/module/store/SimpleStore.js +50 -0
  676. package/build/module/store/SimpleStore.js.map +1 -0
  677. package/build/module/store/index.js +3 -0
  678. package/build/module/store/index.js.map +1 -0
  679. package/build/module/store/types.js +2 -0
  680. package/build/module/store/types.js.map +1 -0
  681. package/build/module/styles/EdgeInsets.js +9 -6
  682. package/build/module/styles/EdgeInsets.js.map +1 -1
  683. package/build/module/styles/PredefinedStyles.js.map +1 -1
  684. package/build/module/styles/StyleSheet.js.map +1 -1
  685. package/build/module/styles/ThemeProvider.js.map +1 -1
  686. package/build/module/styles/createFontStyle.js +2 -2
  687. package/build/module/styles/createFontStyle.js.map +1 -1
  688. package/build/module/styles/index.js.map +1 -1
  689. package/build/module/styles/styled.js.map +1 -1
  690. package/build/module/styles/useTheme.js.map +1 -1
  691. package/build/module/types/index.js.map +1 -1
  692. package/build/module/utils/cloneElementSafely.js.map +1 -1
  693. package/build/module/utils/createSvgIcon.js.map +1 -1
  694. package/build/module/utils/index.js.map +1 -1
  695. package/build/typescript/Accordion/Accordion.d.ts +0 -1
  696. package/build/typescript/AppBar/AppBarProps.d.ts +1 -1
  697. package/build/typescript/AspectRatio/AspectRatioNative.d.ts +0 -1
  698. package/build/typescript/AspectRatio/AspectRatioWeb.d.ts +0 -1
  699. package/build/typescript/Avatar/Avatar.d.ts +0 -1
  700. package/build/typescript/Badge/Badge.d.ts +0 -1
  701. package/build/typescript/Badge/BadgeProps.d.ts +5 -0
  702. package/build/typescript/Button/Button.d.ts +0 -1
  703. package/build/typescript/ButtonBase/ButtonBase.d.ts +0 -1
  704. package/build/typescript/Card/Card.d.ts +0 -1
  705. package/build/typescript/CardActions/CardActions.d.ts +0 -1
  706. package/build/typescript/CardContent/CardContent.d.ts +0 -1
  707. package/build/typescript/CardMedia/CardMedia.d.ts +0 -1
  708. package/build/typescript/Checkbox/Checkbox.d.ts +0 -1
  709. package/build/typescript/Checkbox/CheckboxProps.d.ts +1 -1
  710. package/build/typescript/Chip/Chip.d.ts +0 -1
  711. package/build/typescript/Chip/ChipProps.d.ts +4 -0
  712. package/build/typescript/CircularProgress/CircularProgress.d.ts +2 -3
  713. package/build/typescript/Column/Column.d.ts +0 -1
  714. package/build/typescript/Dialog/Dialog.d.ts +0 -1
  715. package/build/typescript/DialogActions/DialogActions.d.ts +0 -1
  716. package/build/typescript/DialogContent/DialogContent.d.ts +0 -1
  717. package/build/typescript/DialogMedia/DialogMedia.d.ts +0 -1
  718. package/build/typescript/DialogTitle/DialogTitle.d.ts +0 -1
  719. package/build/typescript/Divider/Divider.d.ts +0 -1
  720. package/build/typescript/Fab/Fab.d.ts +0 -1
  721. package/build/typescript/Flexbox/Flexbox.d.ts +0 -1
  722. package/build/typescript/IconButton/IconButton.d.ts +0 -1
  723. package/build/typescript/Image/Image.d.ts +0 -1
  724. package/build/typescript/Image/ImageProps.d.ts +1 -0
  725. package/build/typescript/ImageCore/ImageCoreNative.d.ts +0 -1
  726. package/build/typescript/ImageCore/ImageCoreWeb.d.ts +0 -1
  727. package/build/typescript/ImageCore/ImageFileExtensionContext.d.ts +3 -0
  728. package/build/typescript/ImageCore/ImageFileExtensionProvider.d.ts +13 -0
  729. package/build/typescript/ImageCore/index.d.ts +2 -0
  730. package/build/typescript/ImageCore/index.native.d.ts +2 -0
  731. package/build/typescript/Link/Link.d.ts +0 -1
  732. package/build/typescript/List/List.d.ts +0 -1
  733. package/build/typescript/ListItem/ListItem.d.ts +0 -1
  734. package/build/typescript/ListItemIcon/ListItemIcon.d.ts +0 -1
  735. package/build/typescript/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +0 -1
  736. package/build/typescript/ListItemText/ListItemText.d.ts +0 -1
  737. package/build/typescript/ListSubheader/ListSubheader.d.ts +0 -1
  738. package/build/typescript/Menu/Menu.d.ts +0 -1
  739. package/build/typescript/MenuItem/MenuItem.d.ts +0 -1
  740. package/build/typescript/Modal/Modal.d.ts +0 -1
  741. package/build/typescript/Pagination/Pagination.d.ts +0 -1
  742. package/build/typescript/Paper/PaperProps.d.ts +5 -0
  743. package/build/typescript/Paper/PaperStylesProvider.d.ts +7 -0
  744. package/build/typescript/Paper/usePaperStyles.d.ts +1 -0
  745. package/build/typescript/Portal/Portal.d.ts +0 -1
  746. package/build/typescript/Radio/Radio.d.ts +0 -1
  747. package/build/typescript/RadioGroup/RadioGroup.d.ts +0 -1
  748. package/build/typescript/Row/Row.d.ts +0 -1
  749. package/build/typescript/Slide/Slide.d.ts +0 -1
  750. package/build/typescript/Slider/Slider.d.ts +1 -1
  751. package/build/typescript/Snackbar/Snackbar.d.ts +0 -1
  752. package/build/typescript/SnackbarContent/SnackbarContent.d.ts +0 -1
  753. package/build/typescript/Spacer/Spacer.d.ts +0 -1
  754. package/build/typescript/SvgIcon/SvgIcon.d.ts +0 -1
  755. package/build/typescript/Switch/Switch.d.ts +0 -1
  756. package/build/typescript/Tab/Tab.d.ts +0 -1
  757. package/build/typescript/TabBase/TabBase.d.ts +0 -1
  758. package/build/typescript/Tabs/IndexAwareTab.d.ts +8 -0
  759. package/build/typescript/Tabs/InternalContext.d.ts +7 -0
  760. package/build/typescript/Tabs/ScrollableTabsView.d.ts +7 -0
  761. package/build/typescript/Tabs/TabIndicator.d.ts +0 -1
  762. package/build/typescript/Tabs/TabIndicatorProps.d.ts +4 -5
  763. package/build/typescript/Tabs/Tabs.d.ts +4 -2
  764. package/build/typescript/Tabs/TabsProps.d.ts +12 -12
  765. package/build/typescript/Tabs/index.d.ts +1 -0
  766. package/build/typescript/Tabs/types.d.ts +9 -0
  767. package/build/typescript/Tabs/useIndexStore.d.ts +3 -0
  768. package/build/typescript/Tabs/useScrollViewReaction.d.ts +8 -0
  769. package/build/typescript/Tabs/useTabCoordinates.d.ts +6 -0
  770. package/build/typescript/Tabs/utils.d.ts +3 -0
  771. package/build/typescript/TextField/InputLabel.d.ts +0 -1
  772. package/build/typescript/Toolbar/Toolbar.d.ts +0 -1
  773. package/build/typescript/Tooltip/Tooltip.d.ts +0 -1
  774. package/build/typescript/Tooltip/TooltipProps.d.ts +15 -1
  775. package/build/typescript/Typography/TypographyProps.d.ts +5 -0
  776. package/build/typescript/animated/AnimatedPressable.d.ts +2 -2
  777. package/build/typescript/hooks/index.d.ts +3 -0
  778. package/build/typescript/hooks/useAnimatedValue.d.ts +2 -0
  779. package/build/typescript/hooks/useCollapsibleAppBar.d.ts +0 -1
  780. package/build/typescript/hooks/useFadeInAppBar.d.ts +3 -4
  781. package/build/typescript/hooks/useImperativeState.d.ts +6 -0
  782. package/build/typescript/hooks/useSyncAnimatedValue.d.ts +6 -0
  783. package/build/typescript/hooks/useValidWindowDimensions/index.ios.d.ts +2 -1
  784. package/build/typescript/index.d.ts +2 -0
  785. package/build/typescript/internal/hooks/index.d.ts +0 -1
  786. package/build/typescript/internal/icons/Checkbox.d.ts +18 -3
  787. package/build/typescript/internal/icons/CheckboxChecked.d.ts +18 -3
  788. package/build/typescript/internal/icons/ChevronDown.d.ts +18 -3
  789. package/build/typescript/internal/icons/ChevronLeft.d.ts +18 -3
  790. package/build/typescript/internal/icons/ChevronRight.d.ts +18 -3
  791. package/build/typescript/internal/icons/CircularProgress.d.ts +0 -1
  792. package/build/typescript/internal/icons/Close.d.ts +18 -3
  793. package/build/typescript/internal/icons/Radio.d.ts +18 -3
  794. package/build/typescript/internal/icons/RadioChecked.d.ts +18 -3
  795. package/build/typescript/store/MockStore.d.ts +7 -0
  796. package/build/typescript/store/SimpleStore.d.ts +10 -0
  797. package/build/typescript/store/index.d.ts +3 -0
  798. package/build/typescript/store/types.d.ts +10 -0
  799. package/build/typescript/types/index.d.ts +6 -0
  800. package/package.json +6 -6
  801. package/src/Accordion/Accordion.tsx +8 -6
  802. package/src/AppBar/AppBar.tsx +13 -21
  803. package/src/AppBar/AppBarProps.ts +1 -1
  804. package/src/Badge/Badge.tsx +6 -16
  805. package/src/Badge/BadgeProps.ts +6 -0
  806. package/src/ButtonBase/ButtonBase.tsx +70 -43
  807. package/src/Checkbox/CheckboxProps.ts +1 -1
  808. package/src/Chip/Chip.tsx +2 -0
  809. package/src/Chip/ChipProps.ts +5 -0
  810. package/src/CircularProgress/CircularProgress.tsx +38 -28
  811. package/src/Image/Image.tsx +7 -1
  812. package/src/Image/ImageProps.ts +2 -0
  813. package/src/ImageCore/ImageCoreNative.tsx +26 -18
  814. package/src/ImageCore/ImageFileExtensionContext.ts +7 -0
  815. package/src/ImageCore/ImageFileExtensionProvider.tsx +32 -0
  816. package/src/ImageCore/index.native.ts +3 -1
  817. package/src/ImageCore/index.ts +4 -1
  818. package/src/Paper/Paper.tsx +14 -8
  819. package/src/Paper/PaperProps.ts +6 -0
  820. package/src/Paper/PaperStylesProvider.tsx +9 -0
  821. package/src/Paper/usePaperStyles.ts +6 -0
  822. package/src/Radio/Radio.tsx +1 -3
  823. package/src/Slide/Slide.tsx +22 -19
  824. package/src/Tab/Tab.tsx +5 -5
  825. package/src/Tabs/IndexAwareTab.tsx +29 -0
  826. package/src/Tabs/InternalContext.ts +13 -0
  827. package/src/Tabs/ScrollableTabsView.tsx +28 -0
  828. package/src/Tabs/TabIndicator.tsx +56 -23
  829. package/src/Tabs/TabIndicatorProps.ts +4 -5
  830. package/src/Tabs/Tabs.tsx +90 -97
  831. package/src/Tabs/TabsProps.ts +15 -23
  832. package/src/Tabs/index.ts +2 -1
  833. package/src/Tabs/types.ts +18 -0
  834. package/src/Tabs/useIndexStore.ts +31 -0
  835. package/src/Tabs/useScrollViewReaction.ts +62 -0
  836. package/src/Tabs/useTabCoordinates.ts +25 -0
  837. package/src/Tabs/utils.ts +14 -0
  838. package/src/TextField/InputLabel.tsx +12 -5
  839. package/src/TextField/OutlinedTextField.tsx +1 -1
  840. package/src/TextField/TextField.tsx +4 -3
  841. package/src/Tooltip/Tooltip.tsx +39 -24
  842. package/src/Tooltip/TooltipProps.ts +18 -1
  843. package/src/Typography/Typography.tsx +2 -0
  844. package/src/Typography/TypographyProps.ts +6 -0
  845. package/src/animated/AnimatedPressable.tsx +1 -2
  846. package/src/hooks/index.ts +3 -0
  847. package/src/hooks/useAnimatedValue.ts +21 -0
  848. package/src/hooks/useCollapsibleAppBar.ts +61 -46
  849. package/src/hooks/useFadeInAppBar.ts +44 -30
  850. package/src/hooks/useImperativeState.ts +24 -0
  851. package/src/hooks/useSyncAnimatedValue.ts +38 -0
  852. package/src/hooks/useThrottle.ts +3 -3
  853. package/src/hooks/useValidWindowDimensions/index.ios.ts +16 -10
  854. package/src/index.ts +4 -0
  855. package/src/internal/hooks/index.ts +0 -1
  856. package/src/internal/hooks/useHeight.ts +4 -4
  857. package/src/internal/icons/CheckboxChecked.tsx +3 -11
  858. package/src/store/MockStore.ts +21 -0
  859. package/src/store/SimpleStore.ts +50 -0
  860. package/src/store/index.ts +3 -0
  861. package/src/store/types.ts +12 -0
  862. package/src/types/index.ts +7 -0
  863. package/build/commonjs/ButtonBase/ButtonBase.ios.js +0 -99
  864. package/build/commonjs/ButtonBase/ButtonBase.ios.js.map +0 -1
  865. package/build/commonjs/ButtonBase/useDisabledReaction/index.js +0 -23
  866. package/build/commonjs/ButtonBase/useDisabledReaction/index.js.map +0 -1
  867. package/build/commonjs/ButtonBase/useDisabledReaction/index.native.js +0 -9
  868. package/build/commonjs/ButtonBase/useDisabledReaction/index.native.js.map +0 -1
  869. package/build/commonjs/ImageCore/ImageCoreNative.ios.js +0 -60
  870. package/build/commonjs/ImageCore/ImageCoreNative.ios.js.map +0 -1
  871. package/build/commonjs/internal/hooks/useWidth.js +0 -29
  872. package/build/commonjs/internal/hooks/useWidth.js.map +0 -1
  873. package/build/module/ButtonBase/ButtonBase.ios.js +0 -80
  874. package/build/module/ButtonBase/ButtonBase.ios.js.map +0 -1
  875. package/build/module/ButtonBase/useDisabledReaction/index.js +0 -12
  876. package/build/module/ButtonBase/useDisabledReaction/index.js.map +0 -1
  877. package/build/module/ButtonBase/useDisabledReaction/index.native.js +0 -2
  878. package/build/module/ButtonBase/useDisabledReaction/index.native.js.map +0 -1
  879. package/build/module/ImageCore/ImageCoreNative.ios.js +0 -45
  880. package/build/module/ImageCore/ImageCoreNative.ios.js.map +0 -1
  881. package/build/module/internal/hooks/useWidth.js +0 -15
  882. package/build/module/internal/hooks/useWidth.js.map +0 -1
  883. package/build/typescript/ButtonBase/ButtonBase.ios.d.ts +0 -3
  884. package/build/typescript/ButtonBase/useDisabledReaction/index.d.ts +0 -2
  885. package/build/typescript/ButtonBase/useDisabledReaction/index.native.d.ts +0 -2
  886. package/build/typescript/ImageCore/ImageCoreNative.ios.d.ts +0 -3
  887. package/build/typescript/internal/hooks/useWidth.d.ts +0 -2
  888. package/src/ButtonBase/ButtonBase.ios.tsx +0 -95
  889. package/src/ButtonBase/useDisabledReaction/index.native.ts +0 -4
  890. package/src/ButtonBase/useDisabledReaction/index.ts +0 -15
  891. package/src/ImageCore/ImageCoreNative.ios.tsx +0 -46
  892. package/src/internal/hooks/useWidth.ts +0 -17
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = Slide;
7
7
 
8
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
@@ -15,13 +15,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
19
 
22
20
  const defaultEnterDuration = 300;
23
21
  const defaultExitDuration = 300;
24
22
 
23
+ const getDisappearingOffsetY = () => _reactNative.Dimensions.get('window').height;
24
+
25
25
  function Slide(props) {
26
26
  const {
27
27
  animatedY: animatedYProp,
@@ -35,44 +35,40 @@ function Slide(props) {
35
35
  style,
36
36
  ...otherProps
37
37
  } = props;
38
- const window = (0, _reactNative.useWindowDimensions)();
39
-
40
- const y = _reactNativeReanimated.default.useSharedValue(window.height);
41
-
38
+ const y = (0, _reactNativeReanimated.useSharedValue)(getDisappearingOffsetY());
42
39
  const animatedY = animatedYProp || y;
43
-
44
- const animatedStyle = _reactNativeReanimated.default.useAnimatedStyle(() => ({
40
+ const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
45
41
  transform: [{
46
42
  translateY: animatedY.value
47
43
  }]
48
- }));
49
-
50
- _react.default.useEffect(() => {
44
+ }), []);
45
+ (0, _react.useEffect)(() => {
51
46
  if (appear) {
47
+ onEnter === null || onEnter === void 0 ? void 0 : onEnter();
48
+ const toValue = 0;
52
49
  const enterConfig = {
53
50
  duration: enterDuration,
54
51
  easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.exp)
55
52
  };
56
- onEnter === null || onEnter === void 0 ? void 0 : onEnter();
57
- animatedY.value = _reactNativeReanimated.default.withTiming(0, enterConfig, isFinished => {
53
+ animatedY.value = (0, _reactNativeReanimated.withTiming)(toValue, enterConfig, isFinished => {
58
54
  if (isFinished && onEntered) {
59
- _reactNativeReanimated.default.runOnJS(onEntered)();
55
+ (0, _reactNativeReanimated.runOnJS)(onEntered)();
60
56
  }
61
57
  });
62
58
  } else {
59
+ onExit === null || onExit === void 0 ? void 0 : onExit();
60
+ const toValue = getDisappearingOffsetY();
63
61
  const exitConfig = {
64
62
  duration: exitDuration,
65
63
  easing: _reactNativeReanimated.Easing.in(_reactNativeReanimated.Easing.ease)
66
64
  };
67
- onExit === null || onExit === void 0 ? void 0 : onExit();
68
- animatedY.value = _reactNativeReanimated.default.withTiming(window.height, exitConfig, isFinished => {
65
+ animatedY.value = (0, _reactNativeReanimated.withTiming)(toValue, exitConfig, isFinished => {
69
66
  if (isFinished && onExited) {
70
- _reactNativeReanimated.default.runOnJS(onExited)();
67
+ (0, _reactNativeReanimated.runOnJS)(onExited)();
71
68
  }
72
69
  });
73
70
  }
74
71
  }, [appear, onEnter, onEntered, onExit, onExited]);
75
-
76
72
  return /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, _extends({
77
73
  style: [animatedStyle, style]
78
74
  }, otherProps));
@@ -1 +1 @@
1
- {"version":3,"sources":["Slide.tsx"],"names":["defaultEnterDuration","defaultExitDuration","Slide","props","animatedY","animatedYProp","appear","enterDuration","exitDuration","onEnter","onEntered","onExit","onExited","style","otherProps","window","y","Animated","useSharedValue","height","animatedStyle","useAnimatedStyle","transform","translateY","value","React","useEffect","enterConfig","duration","easing","Easing","out","exp","withTiming","isFinished","runOnJS","exitConfig","in","ease"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAGA,MAAMA,oBAAoB,GAAG,GAA7B;AACA,MAAMC,mBAAmB,GAAG,GAA5B;;AAEe,SAASC,KAAT,CAAeC,KAAf,EAAkC;AAC7C,QAAM;AACFC,IAAAA,SAAS,EAAEC,aADT;AAEFC,IAAAA,MAFE;AAGFC,IAAAA,aAAa,GAAGP,oBAHd;AAIFQ,IAAAA,YAAY,GAAGP,mBAJb;AAKFQ,IAAAA,OALE;AAMFC,IAAAA,SANE;AAOFC,IAAAA,MAPE;AAQFC,IAAAA,QARE;AASFC,IAAAA,KATE;AAUF,OAAGC;AAVD,MAWFX,KAXJ;AAaA,QAAMY,MAAM,GAAG,uCAAf;;AAEA,QAAMC,CAAC,GAAGC,+BAASC,cAAT,CAAwBH,MAAM,CAACI,MAA/B,CAAV;;AACA,QAAMf,SAAS,GAAGC,aAAa,IAAIW,CAAnC;;AAEA,QAAMI,aAAa,GAAGH,+BAASI,gBAAT,CAA0B,OAAO;AACnDC,IAAAA,SAAS,EAAE,CAAC;AAAEC,MAAAA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esContent":["import React from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport Animated, { Easing } from 'react-native-reanimated';\nimport type SlideProps from './SlideProps';\n\nconst defaultEnterDuration = 300;\nconst defaultExitDuration = 300;\n\nexport default function Slide(props: SlideProps) {\n const {\n animatedY: animatedYProp,\n appear,\n enterDuration = defaultEnterDuration,\n exitDuration = defaultExitDuration,\n onEnter,\n onEntered,\n onExit,\n onExited,\n style,\n ...otherProps\n } = props;\n\n const window = useWindowDimensions();\n\n const y = Animated.useSharedValue(window.height);\n const animatedY = animatedYProp || y;\n\n const animatedStyle = Animated.useAnimatedStyle(() => ({\n transform: [{ translateY: animatedY.value }],\n }));\n\n React.useEffect(() => {\n if (appear) {\n const enterConfig: Animated.WithTimingConfig = {\n duration: enterDuration,\n easing: Easing.out(Easing.exp),\n };\n\n onEnter?.();\n\n animatedY.value = Animated.withTiming(0, enterConfig, isFinished => {\n if (isFinished && onEntered) {\n Animated.runOnJS(onEntered)();\n }\n });\n } else {\n const exitConfig: Animated.WithTimingConfig = {\n duration: exitDuration,\n easing: Easing.in(Easing.ease),\n };\n\n onExit?.();\n\n animatedY.value = Animated.withTiming(window.height, exitConfig, isFinished => {\n if (isFinished && onExited) {\n Animated.runOnJS(onExited)();\n }\n });\n }\n }, [appear, onEnter, onEntered, onExit, onExited]);\n\n return (\n <Animated.View\n style={[\n animatedStyle,\n style,\n ]}\n {...otherProps}\n />\n );\n};\n"]}
1
+ {"version":3,"names":["defaultEnterDuration","defaultExitDuration","getDisappearingOffsetY","Dimensions","get","height","Slide","props","animatedY","animatedYProp","appear","enterDuration","exitDuration","onEnter","onEntered","onExit","onExited","style","otherProps","y","useSharedValue","animatedStyle","useAnimatedStyle","transform","translateY","value","useEffect","toValue","enterConfig","duration","easing","Easing","out","exp","withTiming","isFinished","runOnJS","exitConfig","in","ease"],"sources":["Slide.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Dimensions } from 'react-native';\nimport type { WithTimingConfig } from 'react-native-reanimated';\nimport Animated, { Easing, runOnJS, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport type SlideProps from './SlideProps';\n\nconst defaultEnterDuration = 300;\nconst defaultExitDuration = 300;\n\nconst getDisappearingOffsetY = (): number => Dimensions.get('window').height;\n\nexport default function Slide(props: SlideProps) {\n const {\n animatedY: animatedYProp,\n appear,\n enterDuration = defaultEnterDuration,\n exitDuration = defaultExitDuration,\n onEnter,\n onEntered,\n onExit,\n onExited,\n style,\n ...otherProps\n } = props;\n\n const y = useSharedValue(getDisappearingOffsetY());\n const animatedY = animatedYProp || y;\n\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: animatedY.value }],\n }), []);\n\n useEffect(() => {\n if (appear) {\n onEnter?.();\n\n const toValue = 0;\n const enterConfig: Readonly<WithTimingConfig> = {\n duration: enterDuration,\n easing: Easing.out(Easing.exp),\n };\n\n animatedY.value = withTiming(toValue, enterConfig, isFinished => {\n if (isFinished && onEntered) {\n runOnJS(onEntered)();\n }\n });\n } else {\n onExit?.();\n\n const toValue = getDisappearingOffsetY();\n const exitConfig: Readonly<WithTimingConfig> = {\n duration: exitDuration,\n easing: Easing.in(Easing.ease),\n };\n\n animatedY.value = withTiming(toValue, exitConfig, isFinished => {\n if (isFinished && onExited) {\n runOnJS(onExited)();\n }\n });\n }\n }, [appear, onEnter, onEntered, onExit, onExited]);\n\n return (\n <Animated.View\n style={[\n animatedStyle,\n style,\n ]}\n {...otherProps}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;;;AAGA,MAAMA,oBAAoB,GAAG,GAA7B;AACA,MAAMC,mBAAmB,GAAG,GAA5B;;AAEA,MAAMC,sBAAsB,GAAG,MAAcC,uBAAA,CAAWC,GAAX,CAAe,QAAf,EAAyBC,MAAtE;;AAEe,SAASC,KAAT,CAAeC,KAAf,EAAkC;EAC7C,MAAM;IACFC,SAAS,EAAEC,aADT;IAEFC,MAFE;IAGFC,aAAa,GAAGX,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gCF,UAAU,IAAI;QAC5D,IAAIA,UAAU,IAAInB,QAAlB,EAA4B;UACxB,IAAAoB,8BAAA,EAAQpB,QAAR;QACH;MACJ,CAJiB,CAAlB;IAKH;EACJ,CA9BD,EA8BG,CAACN,MAAD,EAASG,OAAT,EAAkBC,SAAlB,EAA6BC,MAA7B,EAAqCC,QAArC,CA9BH;EAgCA,oBACI,6BAAC,8BAAD,CAAU,IAAV;IACI,KAAK,EAAE,CACHK,aADG,EAEHJ,KAFG;EADX,GAKQC,UALR,EADJ;AASH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["SlideProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport Animated from 'react-native-reanimated';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SlideProps extends OverridableComponentProps<ViewProps, {\n /**\n * y value for animating.\n */\n animatedY?: Animated.SharedValue<number>;\n\n /**\n * If `true`, the component will transition in.\n */\n appear: boolean;\n\n /**\n * The number of milliseconds to enter animation.\n * @default 300\n */\n enterDuration?: number;\n\n /**\n * The number of milliseconds to exit animation.\n * @default 300\n */\n exitDuration?: number;\n\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * Callback fired when the enter transition will start.\n */\n onEnter?: () => void,\n\n /**\n * Callback fired when the enter transition is completed.\n */\n onEntered?: () => void,\n\n /**\n * Callback fired when the exit transition will start.\n */\n onExit?: () => void,\n\n /**\n * Callback fired when the exit transition is completed.\n */\n onExited?: () => void,\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './Slide';\nexport type { default as SlideProps } from './SlideProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Slide';\nexport type { default as SlideProps } from './SlideProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -15,7 +15,7 @@ var _styles = require("../styles");
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  var _default = /*#__PURE__*/_react.default.forwardRef(function Slider(props, ref) {
21
21
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["Slider.tsx"],"names":["React","forwardRef","Slider","props","ref","disabled","step","minimumValue","maximumValue","onSlidingComplete","onValueChange","value","style","otherProps","theme","platformStyle","Platform","select","ios","marginLeft","spacing","marginRight","android","commonStyle","height","minimumTrackTintColor","palette","primary","main","maximumTrackTintColor","tertiary","thumbTintColor","OS","undefined","require"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;4BAGeA,eAAMC,UAAN,CAAwC,SAASC,MAAT,CAAgBC,KAAhB,EAAuBC,GAAvB,EAA4B;AAC/E,QAAM;AACFC,IAAAA,QAAQ,GAAG,KADT;AAEFC,IAAAA,IAAI,GAAG,CAFL;AAGFC,IAAAA,YAAY,GAAG,CAHb;AAIFC,IAAAA,YAAY,GAAG,CAJb;AAKFC,IAAAA,iBALE;AAMFC,IAAAA,aANE;AAOFC,IAAAA,KAAK,GAAG,CAPN;AAQFC,IAAAA,KARE;AASF,OAAGC;AATD,MAUFV,KAVJ;AAYA,QAAMW,KAAK,GAAG,uBAAd;;AACA,QAAMC,aAAa,GAAGC,sBAASC,MAAT,CAAgB;AAClCC,IAAAA,GAAG,EAAE;AACDC,MAAAA,UAAU,EA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I,IAAA,iBAAiB,EAAEA,OAAO,CAAC,2BAAD;AAhB9B,KAiBQrB,UAjBR,EADJ;AAqBH,CArDc,C","sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport RNSlider from '@react-native-community/slider';\nimport { useTheme } from '../styles';\nimport type SliderProps from './SliderProps';\n\nexport default React.forwardRef<RNSlider, SliderProps>(function Slider(props, ref) {\n const {\n disabled = false,\n step = 0,\n minimumValue = 0,\n maximumValue = 1,\n onSlidingComplete,\n onValueChange,\n value = 0,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n const platformStyle = Platform.select({\n ios: {\n marginLeft: -theme.spacing(1),\n marginRight: -theme.spacing(1),\n },\n android: {\n marginLeft: -theme.spacing(4),\n marginRight: -theme.spacing(4),\n },\n });\n const commonStyle = {\n height: 18,\n };\n\n const minimumTrackTintColor = theme.palette.primary.main;\n const maximumTrackTintColor = theme.palette.tertiary.main;\n const thumbTintColor = Platform.OS === 'android' ? theme.palette.primary.main : undefined;\n\n return (\n <RNSlider\n disabled={disabled}\n maximumValue={maximumValue}\n maximumTrackTintColor={maximumTrackTintColor}\n minimumValue={minimumValue}\n minimumTrackTintColor={minimumTrackTintColor}\n onSlidingComplete={onSlidingComplete}\n onValueChange={onValueChange}\n //@ts-ignore\n ref={ref}\n step={step}\n thumbTintColor={thumbTintColor}\n value={value}\n style={[platformStyle, commonStyle, style]}\n thumbImage={require('./resources/knob.png')}\n minimumTrackImage={require('./resources/min-track.png')}\n maximumTrackImage={require('./resources/max-track.png')}\n {...otherProps}\n />\n );\n});\n"]}
1
+ {"version":3,"names":["React","forwardRef","Slider","props","ref","disabled","step","minimumValue","maximumValue","onSlidingComplete","onValueChange","value","style","otherProps","theme","useTheme","platformStyle","Platform","select","ios","marginLeft","spacing","marginRight","android","commonStyle","height","minimumTrackTintColor","palette","primary","main","maximumTrackTintColor","tertiary","thumbTintColor","OS","undefined","require"],"sources":["Slider.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport RNSlider from '@react-native-community/slider';\nimport { useTheme } from '../styles';\nimport type SliderProps from './SliderProps';\n\nexport default React.forwardRef<RNSlider, SliderProps>(function Slider(props, ref) {\n const {\n disabled = false,\n step = 0,\n minimumValue = 0,\n maximumValue = 1,\n onSlidingComplete,\n onValueChange,\n value = 0,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n const platformStyle = Platform.select({\n ios: {\n marginLeft: -theme.spacing(1),\n marginRight: -theme.spacing(1),\n },\n android: {\n marginLeft: -theme.spacing(4),\n marginRight: -theme.spacing(4),\n },\n });\n const commonStyle = {\n height: 18,\n };\n\n const minimumTrackTintColor = theme.palette.primary.main;\n const maximumTrackTintColor = theme.palette.tertiary.main;\n const thumbTintColor = Platform.OS === 'android' ? theme.palette.primary.main : undefined;\n\n return (\n <RNSlider\n disabled={disabled}\n maximumValue={maximumValue}\n maximumTrackTintColor={maximumTrackTintColor}\n minimumValue={minimumValue}\n minimumTrackTintColor={minimumTrackTintColor}\n onSlidingComplete={onSlidingComplete}\n onValueChange={onValueChange}\n //@ts-ignore\n ref={ref}\n step={step}\n thumbTintColor={thumbTintColor}\n value={value}\n style={[platformStyle, commonStyle, style]}\n thumbImage={require('./resources/knob.png')}\n minimumTrackImage={require('./resources/min-track.png')}\n maximumTrackImage={require('./resources/max-track.png')}\n {...otherProps}\n />\n );\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;4BAGeA,cAAA,CAAMC,UAAN,CAAwC,SAASC,MAAT,CAAgBC,KAAhB,EAAuBC,GAAvB,EAA4B;EAC/E,MAAM;IACFC,QAAQ,GAAG,KADT;IAEFC,IAAI,GAAG,CAFL;IAGFC,YAAY,GAAG,CAHb;IAIFC,YAAY,GAAG,CAJb;IAKFC,iBALE;IAMFC,aANE;IAOFC,KAAK,GAAG,CAPN;IAQFC,KARE;IASF,GAAGC;EATD,IAUFV,KAVJ;EAYA,MAAMW,KAAK,GAAG,IAAAC,gBAAA,GAA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,CAAC,2BAAD;EAhB9B,GAiBQtB,UAjBR,EADJ;AAqBH,CArDc,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["SliderProps.ts"],"sourcesContent":["import { SliderProps as RNSliderProps } from '@react-native-community/slider';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SliderProps extends OverridableComponentProps<RNSliderProps, {\n /**\n * If true the user won't be able to move the slider.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Initial minimum value of the slider.\n * @default 0\n */\n minimumValue?: number;\n\n /**\n * Initial maximum value of the slider.\n * @default 1\n */\n maximumValue?: number;\n\n /**\n * Callback that is called when the user releases the slider, regardless if the value has changed.\n */\n onSlidingComplete?: (value: number) => void;\n\n /**\n * Callback continuously called while the user is dragging the slider.\n */\n onValueChange?: (value: number) => void;\n\n /**\n * Step value of the slider. The value should be between 0 and (maximumValue - minimumValue).\n * @default 0\n */\n step?: number;\n\n /**\n * Initial value of the slider. The value should be between minimumValue and maximumValue.\n * @default 0\n */\n value?: number;\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './Slider';\nexport type { default as SliderProps } from './SliderProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Slider';\nexport type { default as SliderProps } from './SliderProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -21,7 +21,7 @@ var _styles2 = require("../styles");
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
24
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
25
 
26
26
  const useStyles = function () {
27
27
  const theme = (0, _styles2.useTheme)();
@@ -1 +1 @@
1
- {"version":3,"sources":["Snackbar.tsx"],"names":["useStyles","theme","insets","root","alignSelf","bottom","spacing","maxWidth","paddingBottom","paddingHorizontal","position","width","zIndex","Snackbar","props","actionLabel","animatedY","autoHideDuration","children","message","onActionPress","onClose","style","visible","otherProps","autoHideTimer","React","useRef","clearAutoHideTimeout","current","clearTimeout","useEffect","setTimeout","styles","exited","setExited","useState"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAoC,GAAG,YAA4B;AACrE,QAAMC,KAAK,GAAG,wBAAd;AACA,QAAMC,MAAM,GAAG,oDAAf;AAEA,SAAO;AACHC,IAAAA,IAAI,EAAE;AACFC,MAAAA,SAAS,EAAE,QADT;AAEFC,MAAAA,MAAM,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd,CAFN;AAGFC,MAAAA,QAAQ,EAAE,GAHR;AAIFC,MAAAA,aAAa,EAAEN,MAAM,CAACG,MAJpB;AAKFI,MAAAA,iBAAiB,EAAER,KAAK,CAACK,OAAN,CAAc,CAAd,CALjB;AAMFI,MAAAA,QAAQ,EAAE,UANR;AAOFC,MAAAA,KAAK,EAAE,MAPL;AAQF;AACAC,MAAAA,MAAM,EAAE;AATN;AADH,GAAP;AAaH,CAjBD;;AAmBe,SAASC,QAAT,CAAkBC,KAAlB,EAAwC;AACnD,QAAM;AACFC,IAAAA,WADE;AAEFC,IAAAA,SAFE;AAGFC,IAAAA,gBAAgB,GAAG,IAHjB;AAIFC,IAAAA,QAJE;AAKFC,IAAAA,OALE;AAMFC,IAAAA,aANE;AAOFC,IAAAA,OAPE;AAQFC,IAAAA,KARE;AASFC,IAAAA,OAAO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KAMKjB,QAAQ,GAAGA,QAAH,gBACL,6BAAC,wBAAD;AACI,IAAA,WAAW,EAAEH,WADjB;AAEI,IAAA,OAAO,EAAEI,OAFb;AAGI,IAAA,aAAa,EAAEC;AAHnB,IAPR,CAPJ,CADJ;AAwBH;;AAAA","sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Slide from '../Slide';\nimport SnackbarContent from '../SnackbarContent';\nimport { useTheme } from '../styles';\nimport type SnackbarProps from './SnackbarProps';\n\ntype SnackBarStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<SnackBarStyles> = function (): SnackBarStyles {\n const theme = useTheme();\n const insets = useSafeAreaInsets();\n\n return {\n root: {\n alignSelf: 'center',\n bottom: theme.spacing(2),\n maxWidth: 480,\n paddingBottom: insets.bottom,\n paddingHorizontal: theme.spacing(2),\n position: 'absolute',\n width: '100%',\n // TODO: Need to remove zIndex.\n zIndex: 32,\n },\n };\n};\n\nexport default function Snackbar(props: SnackbarProps) {\n const {\n actionLabel,\n animatedY,\n autoHideDuration = null,\n children,\n message,\n onActionPress,\n onClose,\n style,\n visible = false,\n ...otherProps\n } = props;\n\n const autoHideTimer = React.useRef<number | null>(null);\n\n const clearAutoHideTimeout = () => {\n if (autoHideTimer.current !== null) {\n clearTimeout(autoHideTimer.current);\n }\n };\n\n React.useEffect(() => {\n return () => {\n clearAutoHideTimeout();\n };\n }, []);\n\n React.useEffect(() => {\n if (visible && autoHideDuration !== null) {\n clearAutoHideTimeout();\n\n // @ts-ignore\n autoHideTimer.current = setTimeout(() => {\n if (onClose) {\n onClose();\n }\n }, autoHideDuration);\n }\n }, [visible, autoHideDuration, onClose]);\n\n const styles = useStyles();\n\n const [exited, setExited] = React.useState(true);\n\n if (!visible && exited) {\n return null;\n }\n\n return (\n <View\n style={css([\n styles.root,\n style,\n ])}\n {...otherProps}\n >\n <Slide\n animatedY={animatedY}\n appear={visible}\n onEnter={() => setExited(false)}\n onExited={() => setExited(true)}\n >\n {children ? children : (\n <SnackbarContent\n actionLabel={actionLabel}\n message={message}\n onActionPress={onActionPress}\n />\n )}\n </Slide>\n </View>\n );\n};\n"]}
1
+ {"version":3,"names":["useStyles","theme","useTheme","insets","useSafeAreaInsets","root","alignSelf","bottom","spacing","maxWidth","paddingBottom","paddingHorizontal","position","width","zIndex","Snackbar","props","actionLabel","animatedY","autoHideDuration","children","message","onActionPress","onClose","style","visible","otherProps","autoHideTimer","React","useRef","clearAutoHideTimeout","current","clearTimeout","useEffect","setTimeout","styles","exited","setExited","useState","css"],"sources":["Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Slide from '../Slide';\nimport SnackbarContent from '../SnackbarContent';\nimport { useTheme } from '../styles';\nimport type SnackbarProps from './SnackbarProps';\n\ntype SnackBarStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<SnackBarStyles> = function (): SnackBarStyles {\n const theme = useTheme();\n const insets = useSafeAreaInsets();\n\n return {\n root: {\n alignSelf: 'center',\n bottom: theme.spacing(2),\n maxWidth: 480,\n paddingBottom: insets.bottom,\n paddingHorizontal: theme.spacing(2),\n position: 'absolute',\n width: '100%',\n // TODO: Need to remove zIndex.\n zIndex: 32,\n },\n };\n};\n\nexport default function Snackbar(props: SnackbarProps) {\n const {\n actionLabel,\n animatedY,\n autoHideDuration = null,\n children,\n message,\n onActionPress,\n onClose,\n style,\n visible = false,\n ...otherProps\n } = props;\n\n const autoHideTimer = React.useRef<number | null>(null);\n\n const clearAutoHideTimeout = () => {\n if (autoHideTimer.current !== null) {\n clearTimeout(autoHideTimer.current);\n }\n };\n\n React.useEffect(() => {\n return () => {\n clearAutoHideTimeout();\n };\n }, []);\n\n React.useEffect(() => {\n if (visible && autoHideDuration !== null) {\n clearAutoHideTimeout();\n\n // @ts-ignore\n autoHideTimer.current = setTimeout(() => {\n if (onClose) {\n onClose();\n }\n }, autoHideDuration);\n }\n }, [visible, autoHideDuration, onClose]);\n\n const styles = useStyles();\n\n const [exited, setExited] = React.useState(true);\n\n if (!visible && exited) {\n return null;\n }\n\n return (\n <View\n style={css([\n styles.root,\n style,\n ])}\n {...otherProps}\n >\n <Slide\n animatedY={animatedY}\n appear={visible}\n onEnter={() => setExited(false)}\n onExited={() => setExited(true)}\n >\n {children ? children : (\n <SnackbarContent\n actionLabel={actionLabel}\n message={message}\n onActionPress={onActionPress}\n />\n )}\n </Slide>\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAoC,GAAG,YAA4B;EACrE,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EACA,MAAMC,MAAM,GAAG,IAAAC,6CAAA,GAAf;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,SAAS,EAAE,QADT;MAEFC,MAAM,EAAEN,KAAK,CAACO,OAAN,CAAc,CAAd,CAFN;MAGFC,QAAQ,EAAE,GAHR;MAIFC,aAAa,EAAEP,MAAM,CAACI,MAJpB;MAKFI,iBAAiB,EAAEV,KAAK,CAACO,OAAN,CAAc,CAAd,CALjB;MAMFI,QAAQ,EAAE,UANR;MAOFC,KAAK,EAAE,MAPL;MAQF;MACAC,MAAM,EAAE;IATN;EADH,CAAP;AAaH,CAjBD;;AAmBe,SAASC,QAAT,CAAkBC,KAAlB,EAAwC;EACnD,MAAM;IACFC,WADE;IAEFC,SAFE;IAGFC,gBAAgB,GAAG,IAHjB;IAIFC,QAJE;IAKFC,OALE;IAMFC,aANE;IAOFC,OAPE;IAQFC,KARE;IASFC,OAAO,GAAG,KATR;IAUF,GAAGC;EAVD,IAWFV,KAXJ;;EAaA,MAAMW,aAAa,GAAGC,cAAA,CAAMC,MAAN,C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EAPR,CAPJ,CADJ;AAwBH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["SnackbarProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport Animated from 'react-native-reanimated';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SnackbarProps extends OverridableComponentProps<ViewProps, {\n /**\n * The text to use for the action component.\n */\n actionLabel?: string,\n\n /**\n * y value for animating.\n */\n animatedY?: Animated.SharedValue<number>;\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onDismiss` function. `onDismiss` should then set the state of the `visible`\n * prop to hide the `Snackbar`. This behavior is disabled by default with\n * the `null` value.\n * @default null\n */\n autoHideDuration?: number | null,\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children?: React.ReactNode;\n\n /**\n * The message to display.\n */\n message?: string,\n\n /**\n * Callback fired when the action component pressed.\n */\n onActionPress?: () => void\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose?: () => void,\n\n /**\n * If `true`, `Snackbar` is shown.\n * @default false\n */\n visible?: boolean,\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './Snackbar';\nexport type { default as SnackbarProps } from './SnackbarProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Snackbar';\nexport type { default as SnackbarProps } from './SnackbarProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -21,7 +21,7 @@ var _Spacer = _interopRequireDefault(require("../Spacer"));
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
24
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
25
 
26
26
  const useStyles = function () {
27
27
  const theme = (0, _styles.useTheme)();
@@ -1 +1 @@
1
- {"version":3,"sources":["SnackbarContent.tsx"],"names":["useStyles","theme","backgroundColor","palette","primary","main","r","g","b","React","useMemo","root","borderRadius","shape","roundness","paddingHorizontal","spacing","paddingVertical","action","alignItems","flexDirection","justifyContent","SnackbarContent","props","actionLabel","message","onActionPress","style","otherProps","styles","messageFontStyle","selector","typo","body2","color","contrastTextColor","labelFontStyle","button2","labelStyle","padding","undefined"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAA2C,GAAG,YAAmC;AACnF,QAAMC,KAAK,GAAG,uBAAd;AAEA,QAAMC,eAAe,GAAGD,KAAK,CAACE,OAAN,CAAcC,OAAd,CAAsBC,IAA9C;;AACA,QAAM,CAACC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,IAAYC,eAAMC,OAAN,CAAc,MAAM,gBAAIR,eAAJ,CAApB,EAA0C,CAACA,eAAD,CAA1C,CAAlB;;AAEA,SAAO;AACHS,IAAAA,IAAI,EAAE;AACFT,MAAAA,eAAe,EAAG,QAAOI,CAAE,KAAIC,CAAE,KAAIC,CAAE,OADrC;AAEFI,MAAAA,YAAY,EAAEX,KAAK,CAACY,KAAN,CAAYC,SAFxB;AAGFC,MAAAA,iBAAiB,EAAEd,KAAK,CAACe,OAAN,CAAc,CAAd,CAHjB;AAIFC,MAAAA,eAAe,EAAEhB,KAAK,CAACe,OAAN,CAAc,CAAd;AAJf,KADH;AAOHE,IAAAA,MAAM,EAAE;AACJC,MAAAA,UAAU,EAAE,QADR;AAEJC,MAAAA,aAAa,EAAE,KA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J,EAgBKN,WAAW,gBACR,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;AAAQ,IAAA,IAAI,EAAE;AAAd,IADJ,eAGI,6BAAC,mBAAD;AACI,IAAA,OAAO,EAAEE,aADb;AAEI,IAAA,WAAW,EAAE;AAFjB,kBAII,6BAAC,iBAAD;AACI,IAAA,QAAQ,EAAEF,WADd;AAEI,IAAA,KAAK,EAAEc;AAFX,IAJJ,CAHJ,CADQ,GAcR,IA9BR,CADJ;AAkCH;;AAAA","sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { rgb } from '@fountain-ui/utils';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase';\nimport Paper from '../Paper';\nimport Spacer from '../Spacer';\nimport type SnackbarContentProps from './SnackbarContentProps';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'action'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n const backgroundColor = theme.palette.primary.main;\n const [r, g, b] = React.useMemo(() => rgb(backgroundColor), [backgroundColor]);\n\n return {\n root: {\n backgroundColor: `rgba(${r}, ${g}, ${b}, .9)`,\n borderRadius: theme.shape.roundness,\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(3),\n },\n action: {\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingVertical: theme.spacing(2),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionLabel,\n message,\n onActionPress,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (typo) => typo.body2,\n color: theme.palette.primary.contrastTextColor,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (typo) => typo.button2,\n color: theme.palette.primary.contrastTextColor,\n });\n\n const labelStyle = css([\n labelFontStyle,\n { padding: theme.spacing(2) },\n ]);\n\n return (\n <Paper\n elevation={0}\n style={css([\n styles.root,\n actionLabel ? styles.action : undefined,\n style,\n ])}\n {...otherProps}\n >\n <Text\n children={message}\n style={css([\n messageFontStyle,\n ])}\n />\n\n {actionLabel ? (\n <React.Fragment>\n <Spacer size={1}/>\n\n <ButtonBase\n onPress={onActionPress}\n pressEffect={'none'}\n >\n <Text\n children={actionLabel}\n style={labelStyle}\n />\n </ButtonBase>\n </React.Fragment>\n ) : null}\n </Paper>\n );\n};\n"]}
1
+ {"version":3,"names":["useStyles","theme","useTheme","backgroundColor","palette","primary","main","r","g","b","React","useMemo","rgb","root","borderRadius","shape","roundness","paddingHorizontal","spacing","paddingVertical","action","alignItems","flexDirection","justifyContent","SnackbarContent","props","actionLabel","message","onActionPress","style","otherProps","styles","messageFontStyle","createFontStyle","selector","typo","body2","color","contrastTextColor","labelFontStyle","button2","labelStyle","css","padding","undefined"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { rgb } from '@fountain-ui/utils';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase';\nimport Paper from '../Paper';\nimport Spacer from '../Spacer';\nimport type SnackbarContentProps from './SnackbarContentProps';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'action'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n const backgroundColor = theme.palette.primary.main;\n const [r, g, b] = React.useMemo(() => rgb(backgroundColor), [backgroundColor]);\n\n return {\n root: {\n backgroundColor: `rgba(${r}, ${g}, ${b}, .9)`,\n borderRadius: theme.shape.roundness,\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(3),\n },\n action: {\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingVertical: theme.spacing(2),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionLabel,\n message,\n onActionPress,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (typo) => typo.body2,\n color: theme.palette.primary.contrastTextColor,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (typo) => typo.button2,\n color: theme.palette.primary.contrastTextColor,\n });\n\n const labelStyle = css([\n labelFontStyle,\n { padding: theme.spacing(2) },\n ]);\n\n return (\n <Paper\n elevation={0}\n style={css([\n styles.root,\n actionLabel ? styles.action : undefined,\n style,\n ])}\n {...otherProps}\n >\n <Text\n children={message}\n style={css([\n messageFontStyle,\n ])}\n />\n\n {actionLabel ? (\n <React.Fragment>\n <Spacer size={1}/>\n\n <ButtonBase\n onPress={onActionPress}\n pressEffect={'none'}\n >\n <Text\n children={actionLabel}\n style={labelStyle}\n />\n </ButtonBase>\n </React.Fragment>\n ) : null}\n </Paper>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAA2C,GAAG,YAAmC;EACnF,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,eAAe,GAAGF,KAAK,CAACG,OAAN,CAAcC,OAAd,CAAsBC,IAA9C;;EACA,MAAM,CAACC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,IAAYC,cAAA,CAAMC,OAAN,CAAc,MAAM,IAAAC,UAAA,EAAIT,eAAJ,CAApB,EAA0C,CAACA,eAAD,CAA1C,CAAlB;;EAEA,OAAO;IACHU,IAAI,EAAE;MACFV,eAAe,EAAG,QAAOI,CAAE,KAAIC,CAAE,KAAIC,CAAE,OADrC;MAEFK,YAAY,EAAEb,KAAK,CAACc,KAAN,CAAYC,SAFxB;MAGFC,iBAAiB,EAAEhB,KAAK,CAACiB,OAAN,CAAc,CAAd,CAHjB;MAIFC,eAA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;IACI,QAAQ,EAAEH,OADd;IAEI,KAAK,EAAE,IAAAe,WAAA,EAAI,CACPV,gBADO,CAAJ;EAFX,EATJ,EAgBKN,WAAW,gBACR,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,6BAAC,mBAAD;IACI,OAAO,EAAEE,aADb;IAEI,WAAW,EAAE;EAFjB,gBAII,6BAAC,iBAAD;IACI,QAAQ,EAAEF,WADd;IAEI,KAAK,EAAEe;EAFX,EAJJ,CAHJ,CADQ,GAcR,IA9BR,CADJ;AAkCH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["SnackbarContentProps.ts"],"sourcesContent":["import type { OverridableComponentProps } from '../types';\nimport type { PaperProps } from '../Paper';\n\nexport default interface SnackbarContentProps extends OverridableComponentProps<PaperProps, {\n /**\n * The text to use for the action component.\n */\n actionLabel?: string,\n\n /**\n * The message to display.\n */\n message?: string,\n\n /**\n * Callback fired when the action component pressed.\n */\n onActionPress?: () => void\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './SnackbarContent';\nexport type { default as SnackbarContentProps } from './SnackbarContentProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './SnackbarContent';\nexport type { default as SnackbarContentProps } from './SnackbarContentProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -13,7 +13,7 @@ var _styles = require("../styles");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  function Spacer(props) {
19
19
  const theme = (0, _styles.useTheme)();
@@ -1 +1 @@
1
- {"version":3,"sources":["Spacer.tsx"],"names":["Spacer","props","theme","flex","size","style","styleProp","otherProps","flexGrow","undefined","flexBasis","spacing","width","height"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAGe,SAASA,MAAT,CAAgBC,KAAhB,EAAoC;AAC/C,QAAMC,KAAK,GAAG,uBAAd;AAEA,QAAM;AACFC,IAAAA,IADE;AAEFC,IAAAA,IAFE;AAGFC,IAAAA,KAAK,EAAEC,SAHL;AAIF,OAAGC;AAJD,MAKFN,KALJ;AAOA,QAAMO,QAAQ,GAAIL,IAAI,KAAKM,SAAT,IAAsBL,IAAI,KAAKK,SAAhC,GAA6C,CAA7C,GAAiDN,IAAlE;AACA,QAAMO,SAAS,GAAGN,IAAI,KAAKK,SAAT,GAAqBP,KAAK,CAACS,OAAN,CAAcP,IAAd,CAArB,GAA2CK,SAA7D,CAX+C,CAa/C;AACA;;AACA,QAAMJ,KAAK,GAAG;AACVG,IAAAA,QADU;AAEVE,IAAAA,SAFU;AAGVE,IAAAA,KAAK,EAAEF,SAHG;AAIVG,IAAAA,MAAM,EAAEH;AAJE,GAAd;AAOA,sBACI,6BAAC,iBAAD;AACI,IAAA,KAAK,EAAE,iBAAI,CACPL,KADO,EAEPC,SAFO,CAAJ;AADX,KAKQC,UALR,EADJ;AASH;;AAAA","sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { css, useTheme } from '../styles';\nimport type SpacerProps from './SpacerProps';\n\nexport default function Spacer(props: SpacerProps) {\n const theme = useTheme();\n\n const {\n flex,\n size,\n style: styleProp,\n ...otherProps\n } = props;\n\n const flexGrow = (flex === undefined && size === undefined) ? 1 : flex;\n const flexBasis = size !== undefined ? theme.spacing(size) : undefined;\n\n // Bug solution of flexBasis at RN.FlatList children\n // under the css precedence, specify width and height to prevent flexBasis bug\n const style = {\n flexGrow,\n flexBasis,\n width: flexBasis,\n height: flexBasis,\n };\n\n return (\n <View\n style={css([\n style,\n styleProp,\n ])}\n {...otherProps}\n />\n );\n};\n"]}
1
+ {"version":3,"names":["Spacer","props","theme","useTheme","flex","size","style","styleProp","otherProps","flexGrow","undefined","flexBasis","spacing","width","height","css"],"sources":["Spacer.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { css, useTheme } from '../styles';\nimport type SpacerProps from './SpacerProps';\n\nexport default function Spacer(props: SpacerProps) {\n const theme = useTheme();\n\n const {\n flex,\n size,\n style: styleProp,\n ...otherProps\n } = props;\n\n const flexGrow = (flex === undefined && size === undefined) ? 1 : flex;\n const flexBasis = size !== undefined ? theme.spacing(size) : undefined;\n\n // Bug solution of flexBasis at RN.FlatList children\n // under the css precedence, specify width and height to prevent flexBasis bug\n const style = {\n flexGrow,\n flexBasis,\n width: flexBasis,\n height: flexBasis,\n };\n\n return (\n <View\n style={css([\n style,\n styleProp,\n ])}\n {...otherProps}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAGe,SAASA,MAAT,CAAgBC,KAAhB,EAAoC;EAC/C,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IACFC,IADE;IAEFC,IAFE;IAGFC,KAAK,EAAEC,SAHL;IAIF,GAAGC;EAJD,IAKFP,KALJ;EAOA,MAAMQ,QAAQ,GAAIL,IAAI,KAAKM,SAAT,IAAsBL,IAAI,KAAKK,SAAhC,GAA6C,CAA7C,GAAiDN,IAAlE;EACA,MAAMO,SAAS,GAAGN,IAAI,KAAKK,SAAT,GAAqBR,KAAK,CAACU,OAAN,CAAcP,IAAd,CAArB,GAA2CK,SAA7D,CAX+C,CAa/C;EACA;;EACA,MAAMJ,KAAK,GAAG;IACVG,QADU;IAEVE,SAFU;IAGVE,KAAK,EAAEF,SAHG;IAIVG,MAAM,EAAEH;EAJE,CAAd;EAOA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAE,IAAAI,WAAA,EAAI,CACPT,KADO,EAEPC,SAFO,CAAJ;EADX,GAKQC,UALR,EADJ;AASH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["SpacerProps.ts"],"sourcesContent":["import type { ViewProps, ViewStyle } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SpacerProps extends OverridableComponentProps<ViewProps, {\n /**\n * It works like `flexGrow`.\n * If neither `flex` nor `size` is supplied, fallback value is 1.\n */\n flex?: ViewStyle['flexGrow'];\n\n /**\n * The size of the spacer. It works as a multiplier factor based on spacing system.\n */\n size?: number;\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './Spacer';\nexport type { default as SpacerProps } from './SpacerProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Spacer';\nexport type { default as SpacerProps } from './SpacerProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -13,7 +13,7 @@ var _styles = require("../styles");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  function SvgIcon(props) {
19
19
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["SvgIcon.tsx"],"names":["SvgIcon","props","color","colorProp","height","style","styleProp","viewBox","width","otherProps","theme","palette","main","flexShrink"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAGe,SAASA,OAAT,CAAiBC,KAAjB,EAAsC;AACjD,QAAM;AACFC,IAAAA,KAAK,EAAEC,SAAS,GAAG,SADjB;AAEFC,IAAAA,MAAM,GAAG,EAFP;AAGFC,IAAAA,KAAK,EAAEC,SAHL;AAIFC,IAAAA,OAAO,GAAG,WAJR;AAKFC,IAAAA,KAAK,GAAG,EALN;AAMF,OAAGC;AAND,MAOYR,KAPlB;AASA,QAAMS,KAAK,GAAG,uBAAd;AAEA,QAAMR,KAAK,GAAGQ,KAAK,CAACC,OAAN,CAAcR,SAAd,EAAyBS,IAAvC;AAEA,QAAMP,KAAK,GAAG,iBAAI,CACd;AAAEQ,IAAAA,UAAU,EAAE;AAAd,GADc,EAEdP,SAFc,CAAJ,CAAd;AAKA,sBACI,6BAAC,uBAAD;AACI,IAAA,KAAK,EAAEJ,KADX;AAEI,IAAA,IAAI,EAAE,cAFV;AAGI,IAAA,MAAM,EAAEE,MAHZ;AAII,IAAA,KAAK,EAAEC,KAJX;AAKI,IAAA,OAAO,EAAEE,OALb;AAMI,IAAA,KAAK,EAAEC;AANX,KAOQC,UAPR,EADJ;AAWH;;AAAA","sourcesContent":["import React from 'react';\nimport Svg from 'react-native-svg';\nimport { css, useTheme } from '../styles';\nimport type SvgIconProps from './SvgIconProps';\n\nexport default function SvgIcon(props: SvgIconProps) {\n const {\n color: colorProp = 'primary',\n height = 24,\n style: styleProp,\n viewBox = '0 0 20 20',\n width = 24,\n ...otherProps\n }: SvgIconProps = props;\n\n const theme = useTheme();\n\n const color = theme.palette[colorProp].main;\n\n const style = css([\n { flexShrink: 0 },\n styleProp,\n ]);\n\n return (\n <Svg\n color={color}\n fill={'currentColor'}\n height={height}\n style={style}\n viewBox={viewBox}\n width={width}\n {...otherProps}\n />\n );\n};\n"]}
1
+ {"version":3,"names":["SvgIcon","props","color","colorProp","height","style","styleProp","viewBox","width","otherProps","theme","useTheme","palette","main","css","flexShrink"],"sources":["SvgIcon.tsx"],"sourcesContent":["import React from 'react';\nimport Svg from 'react-native-svg';\nimport { css, useTheme } from '../styles';\nimport type SvgIconProps from './SvgIconProps';\n\nexport default function SvgIcon(props: SvgIconProps) {\n const {\n color: colorProp = 'primary',\n height = 24,\n style: styleProp,\n viewBox = '0 0 20 20',\n width = 24,\n ...otherProps\n }: SvgIconProps = props;\n\n const theme = useTheme();\n\n const color = theme.palette[colorProp].main;\n\n const style = css([\n { flexShrink: 0 },\n styleProp,\n ]);\n\n return (\n <Svg\n color={color}\n fill={'currentColor'}\n height={height}\n style={style}\n viewBox={viewBox}\n width={width}\n {...otherProps}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAGe,SAASA,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,KAAK,EAAEC,SAAS,GAAG,SADjB;IAEFC,MAAM,GAAG,EAFP;IAGFC,KAAK,EAAEC,SAHL;IAIFC,OAAO,GAAG,WAJR;IAKFC,KAAK,GAAG,EALN;IAMF,GAAGC;EAND,IAOYR,KAPlB;EASA,MAAMS,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMT,KAAK,GAAGQ,KAAK,CAACE,OAAN,CAAcT,SAAd,EAAyBU,IAAvC;EAEA,MAAMR,KAAK,GAAG,IAAAS,WAAA,EAAI,CACd;IAAEC,UAAU,EAAE;EAAd,CADc,EAEdT,SAFc,CAAJ,CAAd;EAKA,oBACI,6BAAC,uBAAD;IACI,KAAK,EAAEJ,KADX;IAEI,IAAI,EAAE,cAFV;IAGI,MAAM,EAAEE,MAHZ;IAII,KAAK,EAAEC,KAJX;IAKI,OAAO,EAAEE,OALb;IAMI,KAAK,EAAEC;EANX,GAOQC,UAPR,EADJ;AAWH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["SvgIconProps.ts"],"sourcesContent":["import React from 'react';\nimport type { SvgProps } from 'react-native-svg';\nimport type { CommonComponentColor, OverridableComponentProps } from '../types';\n\nexport type SvgIconColor = CommonComponentColor;\n\nexport default interface SvgIconProps extends OverridableComponentProps<SvgProps, {\n /**\n * Node passed into the SVG element.\n */\n children: React.ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color?: SvgIconColor;\n\n /**\n * The color of the component. It is treated as higher priority than `color` prop if provided.\n */\n fill?: SvgProps['fill'];\n\n /**\n * The height applied to the icon.\n * @default 24\n */\n height?: SvgProps['height'];\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * @default '0 0 20 20'\n */\n viewBox?: SvgProps['viewBox'];\n\n /**\n * The width applied to the icon.\n * @default 24\n */\n width?: SvgProps['width'];\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './SvgIcon';\nexport type { default as SvgIconProps } from './SvgIconProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './SvgIcon';\nexport type { default as SvgIconProps } from './SvgIconProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -13,7 +13,7 @@ var _styles = require("../styles");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  function Switch(props) {
19
19
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["Switch.tsx"],"names":["Switch","props","checked","color","colorProp","disabled","onChange","style","styleProp","otherProps","theme","accentColor","palette","main","disabledColor","tertiary","notActiveTrackColor","thumbColor","Platform","OS","undefined","trackColor","opacity","true","false"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAGe,SAASA,MAAT,CAAgBC,KAAhB,EAAoC;AAC/C,QAAM;AACFC,IAAAA,OAAO,GAAG,KADR;AAEFC,IAAAA,KAAK,EAAEC,SAAS,GAAG,WAFjB;AAGFC,IAAAA,QAAQ,GAAG,KAHT;AAIFC,IAAAA,QAJE;AAKFC,IAAAA,KAAK,EAAEC,SALL;AAMF,OAAGC;AAND,MAOFR,KAPJ;AASA,QAAMS,KAAK,GAAG,uBAAd;AAEA,QAAMC,WAAW,GAAGD,KAAK,CAACE,OAAN,CAAcR,SAAd,EAAyBS,IAA7C;AACA,QAAMC,aAAa,GAAGJ,KAAK,CAACE,OAAN,CAAcG,QAAd,CAAuBF,IAA7C;AACA,QAAMG,mBAAmB,GAAGN,KAAK,CAACE,OAAN,CAAcG,QAAd,CAAuBF,IAAnD;AAEA,QAAMI,UAAU,GAAGC,sBAASC,EAAT,KAAgB,KAAhB,GACbC,SADa,GAEbf,QAAQ,GACJS,aADI,GAEJ,MAJV;AAMA,QAAMO,UAAU,GAAGH,sBAASC,EAAT,KAAgB,KAAhB,GACbR,WADa,GAEbN,QAAQ,GAAGS,aAAH,GAAmBH,WAFjC;AAIA,QAAMJ,KAAK,GAAG,iBAAI,CACd;AAAEe,IAAAA,OAAO,EAAEjB,QAAQ,GAAG,GAAH,GAAS;AAA5B,GADc,EAEdG,SAFc,CAAJ,CAAd;AAKA,sBACI,6BAAC,mBAAD;AACI,IAAA,KAAK,EAAEN,OADX;AAEI,IAAA,QAAQ,EAAEG,QAFd;AAGI,IAAA,UAAU,EAAEY,UAHhB;AAII,IAAA,aAAa,EAAEZ,QAAQ,GAAGe,SAAH,GAAed,QAJ1C,CAKI;AALJ;AAMI,IAAA,gBAAgB,EAAEe,UANtB;AAOI,IAAA,gBAAgB,EAAEJ,UAPtB;AAQI,IAAA,UAAU,EAAE;AACRM,MAAAA,IAAI,EAAEF,UADE;AAERG,MAAAA,KAAK,EAAER;AAFC,KARhB;AAYI,IAAA,KAAK,EAAET;AAZX,KAaQE,UAbR,EADJ;AAiBH;;AAAA","sourcesContent":["import React from 'react';\nimport { Platform, Switch as RNSwitch } from 'react-native';\nimport { css, useTheme } from '../styles';\nimport type SwitchProps from './SwitchProps';\n\nexport default function Switch(props: SwitchProps) {\n const {\n checked = false,\n color: colorProp = 'secondary',\n disabled = false,\n onChange,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const accentColor = theme.palette[colorProp].main;\n const disabledColor = theme.palette.tertiary.main;\n const notActiveTrackColor = theme.palette.tertiary.main;\n\n const thumbColor = Platform.OS === 'ios'\n ? undefined\n : disabled\n ? disabledColor\n : '#fff';\n\n const trackColor = Platform.OS === 'ios'\n ? accentColor\n : disabled ? disabledColor : accentColor;\n\n const style = css([\n { opacity: disabled ? 0.3 : 1 },\n styleProp,\n ]);\n\n return (\n <RNSwitch\n value={checked}\n disabled={disabled}\n thumbColor={thumbColor}\n onValueChange={disabled ? undefined : onChange}\n //@ts-ignore\n activeTrackColor={trackColor}\n activeThumbColor={thumbColor}\n trackColor={{\n true: trackColor,\n false: notActiveTrackColor,\n }}\n style={style}\n {...otherProps}\n />\n );\n};\n"]}
1
+ {"version":3,"names":["Switch","props","checked","color","colorProp","disabled","onChange","style","styleProp","otherProps","theme","useTheme","accentColor","palette","main","disabledColor","tertiary","notActiveTrackColor","thumbColor","Platform","OS","undefined","trackColor","css","opacity","true","false"],"sources":["Switch.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Switch as RNSwitch } from 'react-native';\nimport { css, useTheme } from '../styles';\nimport type SwitchProps from './SwitchProps';\n\nexport default function Switch(props: SwitchProps) {\n const {\n checked = false,\n color: colorProp = 'secondary',\n disabled = false,\n onChange,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const accentColor = theme.palette[colorProp].main;\n const disabledColor = theme.palette.tertiary.main;\n const notActiveTrackColor = theme.palette.tertiary.main;\n\n const thumbColor = Platform.OS === 'ios'\n ? undefined\n : disabled\n ? disabledColor\n : '#fff';\n\n const trackColor = Platform.OS === 'ios'\n ? accentColor\n : disabled ? disabledColor : accentColor;\n\n const style = css([\n { opacity: disabled ? 0.3 : 1 },\n styleProp,\n ]);\n\n return (\n <RNSwitch\n value={checked}\n disabled={disabled}\n thumbColor={thumbColor}\n onValueChange={disabled ? undefined : onChange}\n //@ts-ignore\n activeTrackColor={trackColor}\n activeThumbColor={thumbColor}\n trackColor={{\n true: trackColor,\n false: notActiveTrackColor,\n }}\n style={style}\n {...otherProps}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAGe,SAASA,MAAT,CAAgBC,KAAhB,EAAoC;EAC/C,MAAM;IACFC,OAAO,GAAG,KADR;IAEFC,KAAK,EAAEC,SAAS,GAAG,WAFjB;IAGFC,QAAQ,GAAG,KAHT;IAIFC,QAJE;IAKFC,KAAK,EAAEC,SALL;IAMF,GAAGC;EAND,IAOFR,KAPJ;EASA,MAAMS,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,WAAW,GAAGF,KAAK,CAACG,OAAN,CAAcT,SAAd,EAAyBU,IAA7C;EACA,MAAMC,aAAa,GAAGL,KAAK,CAACG,OAAN,CAAcG,QAAd,CAAuBF,IAA7C;EACA,MAAMG,mBAAmB,GAAGP,KAAK,CAACG,OAAN,CAAcG,QAAd,CAAuBF,IAAnD;EAEA,MAAMI,UAAU,GAAGC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,GACbC,SADa,GAEbhB,QAAQ,GACJU,aADI,GAEJ,MAJV;EAMA,MAAMO,UAAU,GAAGH,qBAAA,CAASC,EAAT,KAAgB,KAAhB,GACbR,WADa,GAEbP,QAAQ,GAAGU,aAAH,GAAmBH,WAFjC;EAIA,MAAML,KAAK,GAAG,IAAAgB,WAAA,EAAI,CACd;IAAEC,OAAO,EAAEnB,QAAQ,GAAG,GAAH,GAAS;EAA5B,CADc,EAEdG,SAFc,CAAJ,CAAd;EAKA,oBACI,6BAAC,mBAAD;IACI,KAAK,EAAEN,OADX;IAEI,QAAQ,EAAEG,QAFd;IAGI,UAAU,EAAEa,UAHhB;IAII,aAAa,EAAEb,QAAQ,GAAGgB,SAAH,GAAef,QAJ1C,CAKI;IALJ;IAMI,gBAAgB,EAAEgB,UANtB;IAOI,gBAAgB,EAAEJ,UAPtB;IAQI,UAAU,EAAE;MACRO,IAAI,EAAEH,UADE;MAERI,KAAK,EAAET;IAFC,CARhB;IAYI,KAAK,EAAEV;EAZX,GAaQE,UAbR,EADJ;AAiBH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["SwitchProps.ts"],"sourcesContent":["import { SwitchProps as RNSwitchProps } from 'react-native';\nimport type { CommonComponentColor, OverridableComponentProps } from '../types';\n\nexport type SwitchColor = CommonComponentColor;\n\nexport default interface SwitchProps extends OverridableComponentProps<RNSwitchProps, {\n /**\n * If `true`, the component is checked.\n * @default false\n */\n checked?: boolean;\n\n /**\n * The color of the component of 'on' state. It supports those theme colors that make sense for this component.\n * @default 'secondary'\n */\n color?: SwitchColor;\n\n /**\n * If `true`, the switch is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Callback fired when the switch is changed.\n */\n onChange?: (newChecked: boolean) => void;\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './Switch';\nexport type { default as SwitchProps } from './SwitchProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Switch';\nexport type { default as SwitchProps } from './SwitchProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = Tab;
7
7
 
8
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
@@ -19,7 +19,11 @@ var _TabIndicator = _interopRequireDefault(require("./TabIndicator"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
27
 
24
28
  const styles = _styles.StyleSheet.create({
25
29
  root: { // TODO: Remove redundant platform checking
@@ -42,9 +46,9 @@ function Tab(props) {
42
46
  const {
43
47
  badgeVisible = false,
44
48
  children,
45
- enableIndicator,
49
+ enableIndicator = false,
46
50
  icon: defaultIcon,
47
- selected,
51
+ selected = false,
48
52
  selectedIcon,
49
53
  variant = 'primary',
50
54
  style,
@@ -60,7 +64,7 @@ function Tab(props) {
60
64
  });
61
65
  const pressEffect = selected ? 'none' : 'opacity';
62
66
  const icon = selected ? selectedIcon || defaultIcon : defaultIcon;
63
- const iconElement = icon ? /*#__PURE__*/_react.default.cloneElement(icon, {
67
+ const iconElement = icon ? /*#__PURE__*/(0, _react.cloneElement)(icon, {
64
68
  fill: color
65
69
  }) : null;
66
70
  return /*#__PURE__*/_react.default.createElement(_TabBase.default, _extends({
@@ -73,7 +77,7 @@ function Tab(props) {
73
77
  }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
74
78
  children: children,
75
79
  style: (0, _styles.css)(fontStyle)
76
- }), enableIndicator ? /*#__PURE__*/_react.default.createElement(_TabIndicator.default, null) : null);
80
+ }), enableIndicator && selected ? /*#__PURE__*/_react.default.createElement(_TabIndicator.default, null) : null);
77
81
  }
78
82
 
79
83
  ;
@@ -1 +1 @@
1
- {"version":3,"sources":["Tab.tsx"],"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","primary","minHeight","secondary","bottomNavigation","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","variant","style","otherProps","theme","vertical","color","palette","text","hint","tabBaseStyle","fontStyle","selector","typo","h2","button2","flag","pressEffect","iconElement","React","cloneElement","fill"],"mappings":";;;;;;;AAAA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AAAA,QAAQ,EAAGC,IAAD,IAAUZ,OAAO,KAAK,SAAZ,GACdY,IAAI,CAACC,EADS,GAEbb,OAAO,KAAK,WAAZ,GAA0BY,IAAI,CAACE,OAA/B,GAAyCF,IAAI,CAACG,IAHhB;AAIrCV,IAAAA;AAJqC,GAAvB,CAAlB;AAOA,QAAMW,WAAW,GAAGlB,QAAQ,GAAG,MAAH,GAAY,SAAxC;AAEA,QAAMF,IAAI,GAAGE,QAAQ,GAAIC,YAAY,IAAIF,WAApB,GAAmCA,WAAxD;AACA,QAAMoB,WAAW,GAAGrB,IAAI,gBAAGsB,eAAMC,YAAN,CAAmBvB,IAAnB,EAAyB;AAAEwB,IAAAA,IAAI,EAAEf;AAAR,GAAzB,CAAH,GAA+C,IAAvE;AAEA,sBACI,6BAAC,gBAAD;AACI,IAAA,WAAW,EAAEW,WADjB;AAEI,IAAA,KAAK,EAAEP,YAFX;AAGI,IAAA,QAAQ,EAAEL;AAHd,KAIQF,UAJR,gBAMI,6BAAC,cAAD;AACI,IAAA,QAAQ,EAAEe,WADd;AAEI,IAAA,SAAS,EAAE,CAACxB;AAFhB,IANJ,eAWI,6BAAC,iBAAD;AACI,IAAA,QAAQ,EAAEC,QADd;AAEI,IAAA,KAAK,EAAE,iBAAIgB,SAAJ;AAFX,IAXJ,EAgBKf,eAAe,gBAAG,6BAAC,qBAAD,OAAH,GAAqB,IAhBzC,CADJ;AAoBH;;AAAA","sourcesContent":["import React from 'react';\nimport { Platform, Text } from 'react-native';\nimport Badge from '../Badge';\nimport TabBase from '../TabBase';\nimport type TabProps from './TabProps';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport TabIndicator from './TabIndicator';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n },\n primary: {\n minHeight: 48,\n },\n secondary: {\n minHeight: 48,\n },\n bottomNavigation: {\n minHeight: 56,\n },\n});\n\nexport default function Tab(props: TabProps) {\n const {\n badgeVisible = false,\n children,\n enableIndicator,\n icon: defaultIcon,\n selected,\n selectedIcon,\n variant = 'primary',\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const vertical = variant === 'bottom-navigation';\n\n const color = selected ? theme.palette.text.primary : theme.palette.text.hint;\n\n const tabBaseStyle = css([\n styles.root,\n variant === 'primary'\n ? styles.primary\n : (variant === 'secondary' ? styles.secondary : styles.bottomNavigation),\n style,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => variant === 'primary'\n ? typo.h2\n : (variant === 'secondary' ? typo.button2 : typo.flag),\n color,\n });\n\n const pressEffect = selected ? 'none' : 'opacity';\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconElement = icon ? React.cloneElement(icon, { fill: color }) : null;\n\n return (\n <TabBase\n pressEffect={pressEffect}\n style={tabBaseStyle}\n vertical={vertical}\n {...otherProps}\n >\n <Badge\n children={iconElement}\n invisible={!badgeVisible}\n />\n\n <Text\n children={children}\n style={css(fontStyle)}\n />\n\n {enableIndicator ? <TabIndicator/> : null}\n </TabBase>\n );\n};\n"]}
1
+ {"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","primary","minHeight","secondary","bottomNavigation","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","variant","style","otherProps","theme","useTheme","vertical","color","palette","text","hint","tabBaseStyle","css","fontStyle","createFontStyle","selector","typo","h2","button2","flag","pressEffect","iconElement","cloneElement","fill"],"sources":["Tab.tsx"],"sourcesContent":["import React, { cloneElement } from 'react';\nimport { Platform, Text } from 'react-native';\nimport Badge from '../Badge';\nimport TabBase from '../TabBase';\nimport type TabProps from './TabProps';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport TabIndicator from './TabIndicator';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n },\n primary: {\n minHeight: 48,\n },\n secondary: {\n minHeight: 48,\n },\n bottomNavigation: {\n minHeight: 56,\n },\n});\n\nexport default function Tab(props: TabProps) {\n const {\n badgeVisible = false,\n children,\n enableIndicator = false,\n icon: defaultIcon,\n selected = false,\n selectedIcon,\n variant = 'primary',\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const vertical = variant === 'bottom-navigation';\n\n const color = selected ? theme.palette.text.primary : theme.palette.text.hint;\n\n const tabBaseStyle = css([\n styles.root,\n variant === 'primary'\n ? styles.primary\n : (variant === 'secondary' ? styles.secondary : styles.bottomNavigation),\n style,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => variant === 'primary'\n ? typo.h2\n : (variant === 'secondary' ? typo.button2 : typo.flag),\n color,\n });\n\n const pressEffect = selected ? 'none' : 'opacity';\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconElement = icon ? cloneElement(icon, { fill: color }) : null;\n\n return (\n <TabBase\n pressEffect={pressEffect}\n style={tabBaseStyle}\n vertical={vertical}\n {...otherProps}\n >\n <Badge\n children={iconElement}\n invisible={!badgeVisible}\n />\n\n <Text\n children={children}\n style={css(fontStyle)}\n />\n\n {(enableIndicator && selected) ? <TabIndicator/> : null}\n </TabBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,kBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE,EACF;IACA,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,GAAwB;MAAEC,QAAQ,EAAE;IAAZ,CAAxB,GAA+C,EAAnD;EAFE,CADuB;EAK7BC,OAAO,EAAE;IACLC,SAAS,EAAE;EADN,CALoB;EAQ7BC,SAAS,EAAE;IACPD,SAAS,EAAE;EADJ,CARkB;EAW7BE,gBAAgB,EAAE;IACdF,SAAS,EAAE;EADG;AAXW,CAAlB,CAAf;;AAgBe,SAASG,GA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,oBACI,6BAAC,gBAAD;IACI,WAAW,EAAEa,WADjB;IAEI,KAAK,EAAET,YAFX;IAGI,QAAQ,EAAEL;EAHd,GAIQH,UAJR,gBAMI,6BAAC,cAAD;IACI,QAAQ,EAAEkB,WADd;IAEI,SAAS,EAAE,CAAC3B;EAFhB,EANJ,eAWI,6BAAC,iBAAD;IACI,QAAQ,EAAEC,QADd;IAEI,KAAK,EAAE,IAAAiB,WAAA,EAAIC,SAAJ;EAFX,EAXJ,EAgBMjB,eAAe,IAAIG,QAApB,gBAAgC,6BAAC,qBAAD,OAAhC,GAAkD,IAhBvD,CADJ;AAoBH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TabIndicator.tsx"],"names":["useStyles","theme","root","backgroundColor","palette","secondary","main","bottom","height","left","right","position","TabIndicator","styles","React","memo"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAIA,MAAMA,SAAwC,GAAG,YAAgC;AAC7E,QAAMC,KAAK,GAAG,uBAAd;AAEA,SAAO;AACHC,IAAAA,IAAI,EAAE;AACFC,MAAAA,eAAe,EAAEF,KAAK,CAACG,OAAN,CAAcC,SAAd,CAAwBC,IADvC;AAEFC,MAAAA,MAAM,EAAE,CAFN;AAGFC,MAAAA,MAAM,EAAE,CAHN;AAIFC,MAAAA,IAAI,EAAE,EAJJ;AAKFC,MAAAA,KAAK,EAAE,EALL;AAMFC,MAAAA,QAAQ,EAAE;AANR;AADH,GAAP;AAUH,CAbD;;AAeA,MAAMC,YAAY,GAAG,SAASA,YAAT,GAAwB;AACzC,QAAMC,MAAM,GAAGb,SAAS,EAAxB;AAEA,sBACI,6BAAC,iBAAD;AACI,IAAA,KAAK,EAAEa,MAAM,CAACX;AADlB,IADJ;AAKH,CARD;;4BAUeY,eAAMC,IAAN,CAAWH,YAAX,C","sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\n\ntype TabIndicatorStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<TabIndicatorStyles> = function (): TabIndicatorStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: theme.palette.secondary.main,\n bottom: 0,\n height: 4,\n left: 12,\n right: 12,\n position: 'absolute',\n },\n };\n};\n\nconst TabIndicator = function TabIndicator() {\n const styles = useStyles();\n\n return (\n <View\n style={styles.root}\n />\n );\n};\n\nexport default React.memo(TabIndicator);\n"]}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","backgroundColor","palette","secondary","main","bottom","height","left","right","position","TabIndicator","styles","React","memo"],"sources":["TabIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\n\ntype TabIndicatorStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<TabIndicatorStyles> = function (): TabIndicatorStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: theme.palette.secondary.main,\n bottom: 0,\n height: 4,\n left: 12,\n right: 12,\n position: 'absolute',\n },\n };\n};\n\nconst TabIndicator = function TabIndicator() {\n const styles = useStyles();\n\n return (\n <View\n style={styles.root}\n />\n );\n};\n\nexport default React.memo(TabIndicator);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAIA,MAAMA,SAAwC,GAAG,YAAgC;EAC7E,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,eAAe,EAAEH,KAAK,CAACI,OAAN,CAAcC,SAAd,CAAwBC,IADvC;MAEFC,MAAM,EAAE,CAFN;MAGFC,MAAM,EAAE,CAHN;MAIFC,IAAI,EAAE,EAJJ;MAKFC,KAAK,EAAE,EALL;MAMFC,QAAQ,EAAE;IANR;EADH,CAAP;AAUH,CAbD;;AAeA,MAAMC,YAAY,GAAG,SAASA,YAAT,GAAwB;EACzC,MAAMC,MAAM,GAAGd,SAAS,EAAxB;EAEA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAEc,MAAM,CAACX;EADlB,EADJ;AAKH,CARD;;4BAUeY,cAAA,CAAMC,IAAN,CAAWH,YAAX,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["TabProps.ts"],"sourcesContent":["import React from 'react';\nimport type { TabBaseProps } from '../TabBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport type TabVariant = 'primary' | 'secondary' | 'bottom-navigation';\n\nexport default interface TabProps extends OverridableComponentProps<TabBaseProps, {\n /**\n * If `true`, the badge is visible.\n * @default false\n */\n badgeVisible?: boolean;\n\n /**\n * The label of the Tab.\n */\n children: string;\n\n /**\n * If `true`, the indicator is enabled.\n * @default false\n */\n enableIndicator?: boolean;\n\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected?: boolean;\n\n /**\n * Element placed before the children.\n */\n icon?: React.ReactElement;\n\n /**\n * If supplied, use this icon on selected state.\n */\n selectedIcon?: React.ReactElement;\n\n /**\n * The variant to use.\n * @default 'primary'\n */\n variant?: TabVariant;\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabVariant } from './TabProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabVariant } from './TabProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -15,7 +15,7 @@ var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  const useStyles = function () {
21
21
  const theme = (0, _styles2.useTheme)();
@@ -1 +1 @@
1
- {"version":3,"sources":["TabBase.tsx"],"names":["useStyles","theme","root","alignItems","justifyContent","paddingHorizontal","spacing","minHeight","row","flexDirection","column","TabBase","props","children","disabled","onPress","selected","vertical","style","otherProps","styles"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAmC,GAAG,YAA2B;AACnE,QAAMC,KAAK,GAAG,wBAAd;AAEA,SAAO;AACHC,IAAAA,IAAI,EAAE;AACFC,MAAAA,UAAU,EAAE,QADV;AAEFC,MAAAA,cAAc,EAAE,QAFd;AAGFC,MAAAA,iBAAiB,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd,CAHjB;AAIFC,MAAAA,SAAS,EAAE;AAJT,KADH;AAOHC,IAAAA,GAAG,EAAE;AACDC,MAAAA,aAAa,EAAE;AADd,KAPF;AAUHC,IAAAA,MAAM,EAAE;AACJD,MAAAA,aAAa,EAAE;AADX;AAVL,GAAP;AAcH,CAjBD;;AAmBe,SAASE,OAAT,CAAiBC,KAAjB,EAAsC;AACjD,QAAM;AACFC,IAAAA,QADE;AAEFC,IAAAA,QAAQ,GAAG,KAFT;AAGFC,IAAAA,OAHE;AAIFC,IAAAA,QAAQ,GAAG,KAJT;AAKFC,IAAAA,QAAQ,GAAG,KALT;AAMFC,IAAAA,KANE;AAOF,OAAGC;AAPD,MAQFP,KARJ;AAUA,QAAMQ,MAAM,GAAGpB,SAAS,EAAxB;AAEA,sBACI,6BAAC,mBAAD;AACI,IAAA,OAAO,EAAEe,OADb;AAEI,IAAA,QAAQ,EAAED,QAFd;AAGI,IAAA,KAAK,EAAE,iBAAI,CACPM,MAAM,CAAClB,IADA,EAEPe,QAAQ,GAAGG,MAAM,CAACV,MAAV,GAAmBU,MAAM,CAACZ,GAF3B,EAGPU,KAHO,CAAJ;AAHX,KAQQC,UARR,GAUKN,QAVL,CADJ;AAcH;;AAAA","sourcesContent":["import React from 'react';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase';\nimport type TabBaseProps from './TabBaseProps';\n\ntype TabBaseStyles = NamedStylesStringUnion<'root' | 'row' | 'column'>;\n\nconst useStyles: UseStyles<TabBaseStyles> = function (): TabBaseStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(3),\n minHeight: 48,\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n };\n};\n\nexport default function TabBase(props: TabBaseProps) {\n const {\n children,\n disabled = false,\n onPress,\n selected = false,\n vertical = false,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <ButtonBase\n onPress={onPress}\n disabled={disabled}\n style={css([\n styles.root,\n vertical ? styles.column : styles.row,\n style,\n ])}\n {...otherProps}\n >\n {children}\n </ButtonBase>\n );\n};\n"]}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","alignItems","justifyContent","paddingHorizontal","spacing","minHeight","row","flexDirection","column","TabBase","props","children","disabled","onPress","selected","vertical","style","otherProps","styles","css"],"sources":["TabBase.tsx"],"sourcesContent":["import React from 'react';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase';\nimport type TabBaseProps from './TabBaseProps';\n\ntype TabBaseStyles = NamedStylesStringUnion<'root' | 'row' | 'column'>;\n\nconst useStyles: UseStyles<TabBaseStyles> = function (): TabBaseStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(3),\n minHeight: 48,\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n };\n};\n\nexport default function TabBase(props: TabBaseProps) {\n const {\n children,\n disabled = false,\n onPress,\n selected = false,\n vertical = false,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <ButtonBase\n onPress={onPress}\n disabled={disabled}\n style={css([\n styles.root,\n vertical ? styles.column : styles.row,\n style,\n ])}\n {...otherProps}\n >\n {children}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAmC,GAAG,YAA2B;EACnE,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,cAAc,EAAE,QAFd;MAGFC,iBAAiB,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd,CAHjB;MAIFC,SAAS,EAAE;IAJT,CADH;IAOHC,GAAG,EAAE;MACDC,aAAa,EAAE;IADd,CAPF;IAUHC,MAAM,EAAE;MACJD,aAAa,EAAE;IADX;EAVL,CAAP;AAcH,CAjBD;;AAmBe,SAASE,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QADE;IAEFC,QAAQ,GAAG,KAFT;IAGFC,OAHE;IAIFC,QAAQ,GAAG,KAJT;IAKFC,QAAQ,GAAG,KALT;IAMFC,KANE;IAOF,GAAGC;EAPD,IAQFP,KARJ;EAUA,MAAMQ,MAAM,GAAGrB,SAAS,EAAxB;EAEA,oBACI,6BAAC,mBAAD;IACI,OAAO,EAAEgB,OADb;IAEI,QAAQ,EAAED,QAFd;IAGI,KAAK,EAAE,IAAAO,WAAA,EAAI,CACPD,MAAM,CAAClB,IADA,EAEPe,QAAQ,GAAGG,MAAM,CAACV,MAAV,GAAmBU,MAAM,CAACZ,GAF3B,EAGPU,KAHO,CAAJ;EAHX,GAQQC,UARR,GAUKN,QAVL,CADJ;AAcH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["TabBaseProps.ts"],"sourcesContent":["import React from 'react';\nimport type { OverridableComponentProps } from '../types';\nimport type { ButtonBaseProps } from '../ButtonBase';\n\nexport default interface TabBaseProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * Content of the TabBase.\n */\n children: React.ReactNode;\n\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected?: boolean;\n\n /**\n * Orientation of the TabBase. Default is horizontal.\n * @default false\n */\n vertical?: boolean;\n}> {}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './TabBase';\nexport type { default as TabBaseProps } from './TabBaseProps';"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './TabBase';\nexport type { default as TabBaseProps } from './TabBaseProps';"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = IndexAwareTab;
7
+
8
+ var _react = require("react");
9
+
10
+ var _InternalContext = _interopRequireDefault(require("./InternalContext"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ function IndexAwareTab(props) {
15
+ const {
16
+ children,
17
+ index,
18
+ initialIndex
19
+ } = props;
20
+ const [selected, setSelected] = (0, _react.useState)(initialIndex === index);
21
+ const {
22
+ indexStore
23
+ } = (0, _react.useContext)(_InternalContext.default);
24
+ (0, _react.useEffect)(() => {
25
+ return indexStore.subscribe(currentIndex => {
26
+ setSelected(currentIndex === index);
27
+ });
28
+ }, [indexStore, index]);
29
+ return /*#__PURE__*/(0, _react.cloneElement)(children, {
30
+ selected
31
+ });
32
+ }
33
+
34
+ ;
35
+ //# sourceMappingURL=IndexAwareTab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["IndexAwareTab","props","children","index","initialIndex","selected","setSelected","useState","indexStore","useContext","InternalContext","useEffect","subscribe","currentIndex","cloneElement"],"sources":["IndexAwareTab.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React, { cloneElement, useContext, useEffect, useState } from 'react';\nimport InternalContext from './InternalContext';\n\nexport interface IndexAwareTabProps {\n children: ReactElement;\n index: number;\n initialIndex: number;\n}\n\nexport default function IndexAwareTab(props: IndexAwareTabProps) {\n const {\n children,\n index,\n initialIndex,\n } = props;\n\n const [selected, setSelected] = useState(initialIndex === index);\n\n const { indexStore } = useContext(InternalContext);\n\n useEffect(() => {\n return indexStore.subscribe((currentIndex) => {\n setSelected(currentIndex === index);\n });\n }, [indexStore, index]);\n\n return cloneElement(children, { selected });\n};\n"],"mappings":";;;;;;;AACA;;AACA;;;;AAQe,SAASA,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,KAFE;IAGFC;EAHE,IAIFH,KAJJ;EAMA,MAAM,CAACI,QAAD,EAAWC,WAAX,IAA0B,IAAAC,eAAA,EAASH,YAAY,KAAKD,KAA1B,CAAhC;EAEA,MAAM;IAAEK;EAAF,IAAiB,IAAAC,iBAAA,EAAWC,wBAAX,CAAvB;EAEA,IAAAC,gBAAA,EAAU,MAAM;IACZ,OAAOH,UAAU,CAACI,SAAX,CAAsBC,YAAD,IAAkB;MAC1CP,WAAW,CAACO,YAAY,KAAKV,KAAlB,CAAX;IACH,CAFM,CAAP;EAGH,CAJD,EAIG,CAACK,UAAD,EAAaL,KAAb,CAJH;EAMA,oBAAO,IAAAW,mBAAA,EAAaZ,QAAb,EAAuB;IAAEG;EAAF,CAAvB,CAAP;AACH;;AAAA"}