@fountain-ui/core 3.0.0-alpha.3 → 3.0.0-alpha.30

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 (476) hide show
  1. package/build/commonjs/Accordion/Accordion.js +15 -8
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
  4. package/build/commonjs/Accordion/useVariantStyleMap.js +15 -8
  5. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  6. package/build/commonjs/AppBar/AppBar.js +7 -2
  7. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  8. package/build/commonjs/Badge/Badge.js +4 -3
  9. package/build/commonjs/Badge/Badge.js.map +1 -1
  10. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  11. package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
  12. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
  13. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +5 -2
  14. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  15. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  16. package/build/commonjs/Button/Button.js +26 -12
  17. package/build/commonjs/Button/Button.js.map +1 -1
  18. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  19. package/build/commonjs/ButtonBase/ButtonBase.js +1 -1
  20. package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
  21. package/build/commonjs/ButtonBase/index.js +2 -2
  22. package/build/commonjs/ButtonBase/index.js.map +1 -1
  23. package/build/commonjs/Checkbox/Checkbox.js +4 -1
  24. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  25. package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
  26. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  27. package/build/commonjs/Chip/Chip.js +25 -14
  28. package/build/commonjs/Chip/Chip.js.map +1 -1
  29. package/build/commonjs/Chip/ChipProps.js +3 -1
  30. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  31. package/build/commonjs/Chip/index.js +6 -0
  32. package/build/commonjs/Chip/index.js.map +1 -1
  33. package/build/commonjs/Chip/useChipStyle.js +51 -31
  34. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  35. package/build/commonjs/Dialog/Dialog.js +10 -12
  36. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  37. package/build/commonjs/Dialog/DialogProps.js +1 -1
  38. package/build/commonjs/Dialog/DialogProps.js.map +1 -1
  39. package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
  40. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
  41. package/build/commonjs/Dialog/useDialogStyle.js +19 -8
  42. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  43. package/build/commonjs/DialogActions/DialogActions.js +0 -1
  44. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  45. package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
  46. package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
  47. package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
  48. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  49. package/build/commonjs/Divider/Divider.js +17 -9
  50. package/build/commonjs/Divider/Divider.js.map +1 -1
  51. package/build/commonjs/Divider/DividerProps.js +1 -1
  52. package/build/commonjs/Divider/DividerProps.js.map +1 -1
  53. package/build/commonjs/Empty/Empty.js +1 -1
  54. package/build/commonjs/Empty/Empty.js.map +1 -1
  55. package/build/commonjs/Flexbox/Flexbox.js +2 -0
  56. package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
  57. package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
  58. package/build/commonjs/IconButton/IconButton.js +3 -0
  59. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  60. package/build/commonjs/IconButton/IconButtonProps.js +1 -1
  61. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  62. package/build/commonjs/Image/Image.js +2 -2
  63. package/build/commonjs/Image/Image.js.map +1 -1
  64. package/build/commonjs/ImageCore/ImageCoreNative.js +1 -1
  65. package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
  66. package/build/commonjs/ListItem/ListItem.js +38 -26
  67. package/build/commonjs/ListItem/ListItem.js.map +1 -1
  68. package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
  69. package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
  70. package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
  71. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  72. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  73. package/build/commonjs/ListItemText/ListItemText.js +20 -21
  74. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  75. package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
  76. package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
  77. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  78. package/build/commonjs/Pagination/NumberPagination.js +4 -2
  79. package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
  80. package/build/commonjs/Pagination/Pagination.js +2 -0
  81. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  82. package/build/commonjs/Pagination/PaginationProps.js +3 -1
  83. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  84. package/build/commonjs/Pagination/index.js +6 -0
  85. package/build/commonjs/Pagination/index.js.map +1 -1
  86. package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
  87. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  88. package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
  89. package/build/commonjs/Radio/Radio.js +11 -4
  90. package/build/commonjs/Radio/Radio.js.map +1 -1
  91. package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
  92. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  93. package/build/commonjs/Section/Section.js +32 -0
  94. package/build/commonjs/Section/Section.js.map +1 -0
  95. package/build/commonjs/Section/SectionProps.js +2 -0
  96. package/build/commonjs/Section/SectionProps.js.map +1 -0
  97. package/build/commonjs/Section/index.js +16 -0
  98. package/build/commonjs/Section/index.js.map +1 -0
  99. package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
  100. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  101. package/build/commonjs/SnackbarContent/SnackbarContent.js +26 -9
  102. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  103. package/build/commonjs/Tab/Tab.js +21 -19
  104. package/build/commonjs/Tab/Tab.js.map +1 -1
  105. package/build/commonjs/Tab/TabProps.js +4 -2
  106. package/build/commonjs/Tab/TabProps.js.map +1 -1
  107. package/build/commonjs/Tab/index.js +14 -0
  108. package/build/commonjs/Tab/index.js.map +1 -1
  109. package/build/commonjs/Tab/useVariantStyleMap.js +59 -18
  110. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
  111. package/build/commonjs/TabBase/TabBase.js +1 -8
  112. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  113. package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
  114. package/build/commonjs/Tabs/Tabs.js +23 -7
  115. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  116. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  117. package/build/commonjs/Tabs/index.js.map +1 -1
  118. package/build/commonjs/Tabs/useTabsStyle.js +80 -0
  119. package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
  120. package/build/commonjs/TextField/TextField.js +48 -12
  121. package/build/commonjs/TextField/TextField.js.map +1 -1
  122. package/build/commonjs/TextField/useVariantStyleMap.js +29 -29
  123. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  124. package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
  125. package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
  126. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
  127. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  128. package/build/commonjs/Toolbar/BackButton/index.js +16 -0
  129. package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
  130. package/build/commonjs/Toolbar/Toolbar.js +8 -4
  131. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  132. package/build/commonjs/Tooltip/Beaks/index.js +32 -0
  133. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
  134. package/build/commonjs/Tooltip/Tooltip.js +11 -18
  135. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  136. package/build/commonjs/Tooltip/index.js +19 -0
  137. package/build/commonjs/Tooltip/index.js.map +1 -1
  138. package/build/commonjs/Typography/Typography.js +9 -2
  139. package/build/commonjs/Typography/Typography.js.map +1 -1
  140. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  141. package/build/commonjs/hooks/useBreakpointUp.js +4 -1
  142. package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
  143. package/build/commonjs/hooks/useCollapsibleAppBar.js +3 -10
  144. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  145. package/build/commonjs/hooks/useContentContainerStyle.js +39 -25
  146. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  147. package/build/commonjs/hooks/useFadeInAppBar.js +2 -2
  148. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  149. package/build/commonjs/index.js +21 -0
  150. package/build/commonjs/index.js.map +1 -1
  151. package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
  152. package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
  153. package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
  154. package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
  155. package/build/commonjs/internal/icons/ChevronRight.js +4 -2
  156. package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
  157. package/build/commonjs/internal/icons/ChipClose.js +23 -0
  158. package/build/commonjs/internal/icons/ChipClose.js.map +1 -0
  159. package/build/commonjs/internal/icons/Clear.js +3 -3
  160. package/build/commonjs/internal/icons/Clear.js.map +1 -1
  161. package/build/commonjs/internal/icons/Close.js +4 -2
  162. package/build/commonjs/internal/icons/Close.js.map +1 -1
  163. package/build/commonjs/internal/icons/Search.js +2 -2
  164. package/build/commonjs/internal/icons/Search.js.map +1 -1
  165. package/build/commonjs/internal/icons/index.js +16 -0
  166. package/build/commonjs/internal/icons/index.js.map +1 -1
  167. package/build/module/Accordion/Accordion.js +15 -8
  168. package/build/module/Accordion/Accordion.js.map +1 -1
  169. package/build/module/Accordion/AccordionProps.js.map +1 -1
  170. package/build/module/Accordion/useVariantStyleMap.js +15 -8
  171. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  172. package/build/module/AppBar/AppBar.js +6 -2
  173. package/build/module/AppBar/AppBar.js.map +1 -1
  174. package/build/module/Badge/Badge.js +4 -3
  175. package/build/module/Badge/Badge.js.map +1 -1
  176. package/build/module/Badge/BadgeProps.js.map +1 -1
  177. package/build/module/Badge/useVariantStyleMap.js +2 -2
  178. package/build/module/Badge/useVariantStyleMap.js.map +1 -1
  179. package/build/module/BottomSheetTitle/BottomSheetTitle.js +5 -2
  180. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  181. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  182. package/build/module/Button/Button.js +27 -13
  183. package/build/module/Button/Button.js.map +1 -1
  184. package/build/module/Button/ButtonProps.js.map +1 -1
  185. package/build/module/ButtonBase/ButtonBase.js +1 -1
  186. package/build/module/ButtonBase/ButtonBase.js.map +1 -1
  187. package/build/module/ButtonBase/index.js +1 -1
  188. package/build/module/ButtonBase/index.js.map +1 -1
  189. package/build/module/Checkbox/Checkbox.js +4 -1
  190. package/build/module/Checkbox/Checkbox.js.map +1 -1
  191. package/build/module/Checkbox/useVariantStyleMap.js +6 -2
  192. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  193. package/build/module/Chip/Chip.js +21 -13
  194. package/build/module/Chip/Chip.js.map +1 -1
  195. package/build/module/Chip/ChipProps.js +1 -0
  196. package/build/module/Chip/ChipProps.js.map +1 -1
  197. package/build/module/Chip/index.js +1 -1
  198. package/build/module/Chip/index.js.map +1 -1
  199. package/build/module/Chip/useChipStyle.js +51 -31
  200. package/build/module/Chip/useChipStyle.js.map +1 -1
  201. package/build/module/Dialog/Dialog.js +10 -11
  202. package/build/module/Dialog/Dialog.js.map +1 -1
  203. package/build/module/Dialog/DialogProps.js +1 -1
  204. package/build/module/Dialog/DialogProps.js.map +1 -1
  205. package/build/module/Dialog/useDialogSectionStyle.js +6 -4
  206. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
  207. package/build/module/Dialog/useDialogStyle.js +18 -8
  208. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  209. package/build/module/DialogActions/DialogActions.js +0 -1
  210. package/build/module/DialogActions/DialogActions.js.map +1 -1
  211. package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
  212. package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
  213. package/build/module/DialogTitle/DialogTitle.js +6 -3
  214. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  215. package/build/module/Divider/Divider.js +7 -0
  216. package/build/module/Divider/Divider.js.map +1 -1
  217. package/build/module/Divider/DividerProps.js +1 -1
  218. package/build/module/Divider/DividerProps.js.map +1 -1
  219. package/build/module/Empty/Empty.js +1 -1
  220. package/build/module/Empty/Empty.js.map +1 -1
  221. package/build/module/Flexbox/Flexbox.js +2 -0
  222. package/build/module/Flexbox/Flexbox.js.map +1 -1
  223. package/build/module/Flexbox/FlexboxProps.js.map +1 -1
  224. package/build/module/IconButton/IconButton.js +3 -0
  225. package/build/module/IconButton/IconButton.js.map +1 -1
  226. package/build/module/IconButton/IconButtonProps.js +1 -1
  227. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  228. package/build/module/Image/Image.js +2 -2
  229. package/build/module/Image/Image.js.map +1 -1
  230. package/build/module/ImageCore/ImageCoreNative.js +1 -1
  231. package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
  232. package/build/module/ListItem/ListItem.js +36 -28
  233. package/build/module/ListItem/ListItem.js.map +1 -1
  234. package/build/module/ListItem/ListItemProps.js.map +1 -1
  235. package/build/module/ListItemIcon/ListItemIcon.js +1 -2
  236. package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
  237. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  238. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  239. package/build/module/ListItemText/ListItemText.js +17 -19
  240. package/build/module/ListItemText/ListItemText.js.map +1 -1
  241. package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
  242. package/build/module/ListSubheader/ListSubheader.js +1 -1
  243. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  244. package/build/module/Pagination/NumberPagination.js +4 -2
  245. package/build/module/Pagination/NumberPagination.js.map +1 -1
  246. package/build/module/Pagination/Pagination.js +2 -0
  247. package/build/module/Pagination/Pagination.js.map +1 -1
  248. package/build/module/Pagination/PaginationProps.js +1 -0
  249. package/build/module/Pagination/PaginationProps.js.map +1 -1
  250. package/build/module/Pagination/index.js +1 -1
  251. package/build/module/Pagination/index.js.map +1 -1
  252. package/build/module/PaginationItem/PaginationItem.js +28 -21
  253. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  254. package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
  255. package/build/module/Radio/Radio.js +10 -4
  256. package/build/module/Radio/Radio.js.map +1 -1
  257. package/build/module/RadioGroup/RadioGroup.js +2 -20
  258. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  259. package/build/module/Section/Section.js +19 -0
  260. package/build/module/Section/Section.js.map +1 -0
  261. package/build/module/Section/SectionProps.js +2 -0
  262. package/build/module/Section/SectionProps.js.map +1 -0
  263. package/build/module/Section/index.js +2 -0
  264. package/build/module/Section/index.js.map +1 -0
  265. package/build/module/ShadowView/ShadowView.native.js +4 -0
  266. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  267. package/build/module/SnackbarContent/SnackbarContent.js +26 -9
  268. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  269. package/build/module/Tab/Tab.js +22 -19
  270. package/build/module/Tab/Tab.js.map +1 -1
  271. package/build/module/Tab/TabProps.js +2 -1
  272. package/build/module/Tab/TabProps.js.map +1 -1
  273. package/build/module/Tab/index.js +1 -0
  274. package/build/module/Tab/index.js.map +1 -1
  275. package/build/module/Tab/useVariantStyleMap.js +59 -18
  276. package/build/module/Tab/useVariantStyleMap.js.map +1 -1
  277. package/build/module/TabBase/TabBase.js +1 -8
  278. package/build/module/TabBase/TabBase.js.map +1 -1
  279. package/build/module/TabBase/TabBaseProps.js.map +1 -1
  280. package/build/module/Tabs/Tabs.js +21 -7
  281. package/build/module/Tabs/Tabs.js.map +1 -1
  282. package/build/module/Tabs/TabsProps.js.map +1 -1
  283. package/build/module/Tabs/index.js.map +1 -1
  284. package/build/module/Tabs/useTabsStyle.js +70 -0
  285. package/build/module/Tabs/useTabsStyle.js.map +1 -0
  286. package/build/module/TextField/TextField.js +48 -12
  287. package/build/module/TextField/TextField.js.map +1 -1
  288. package/build/module/TextField/useVariantStyleMap.js +29 -29
  289. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  290. package/build/module/Toolbar/BackButton/BackButton.js +32 -0
  291. package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
  292. package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
  293. package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  294. package/build/module/Toolbar/BackButton/index.js +2 -0
  295. package/build/module/Toolbar/BackButton/index.js.map +1 -0
  296. package/build/module/Toolbar/Toolbar.js +7 -3
  297. package/build/module/Toolbar/Toolbar.js.map +1 -1
  298. package/build/module/Tooltip/Beaks/index.js +4 -0
  299. package/build/module/Tooltip/Beaks/index.js.map +1 -1
  300. package/build/module/Tooltip/Tooltip.js +4 -10
  301. package/build/module/Tooltip/Tooltip.js.map +1 -1
  302. package/build/module/Tooltip/index.js +1 -0
  303. package/build/module/Tooltip/index.js.map +1 -1
  304. package/build/module/Typography/Typography.js +9 -2
  305. package/build/module/Typography/Typography.js.map +1 -1
  306. package/build/module/Typography/TypographyProps.js.map +1 -1
  307. package/build/module/hooks/useBreakpointUp.js +4 -1
  308. package/build/module/hooks/useBreakpointUp.js.map +1 -1
  309. package/build/module/hooks/useCollapsibleAppBar.js +4 -10
  310. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  311. package/build/module/hooks/useContentContainerStyle.js +43 -25
  312. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  313. package/build/module/hooks/useFadeInAppBar.js +2 -2
  314. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  315. package/build/module/index.js +2 -0
  316. package/build/module/index.js.map +1 -1
  317. package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
  318. package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
  319. package/build/module/internal/icons/ChevronLeft.js +4 -2
  320. package/build/module/internal/icons/ChevronLeft.js.map +1 -1
  321. package/build/module/internal/icons/ChevronRight.js +4 -2
  322. package/build/module/internal/icons/ChevronRight.js.map +1 -1
  323. package/build/module/internal/icons/ChipClose.js +9 -0
  324. package/build/module/internal/icons/ChipClose.js.map +1 -0
  325. package/build/module/internal/icons/Clear.js +3 -3
  326. package/build/module/internal/icons/Clear.js.map +1 -1
  327. package/build/module/internal/icons/Close.js +4 -2
  328. package/build/module/internal/icons/Close.js.map +1 -1
  329. package/build/module/internal/icons/Search.js +2 -2
  330. package/build/module/internal/icons/Search.js.map +1 -1
  331. package/build/module/internal/icons/index.js +2 -0
  332. package/build/module/internal/icons/index.js.map +1 -1
  333. package/build/typescript/Accordion/AccordionProps.d.ts +4 -1
  334. package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
  335. package/build/typescript/Badge/BadgeProps.d.ts +10 -5
  336. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +1 -0
  337. package/build/typescript/Button/ButtonProps.d.ts +5 -0
  338. package/build/typescript/ButtonBase/index.d.ts +1 -1
  339. package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
  340. package/build/typescript/Chip/ChipProps.d.ts +11 -4
  341. package/build/typescript/Chip/index.d.ts +1 -1
  342. package/build/typescript/Chip/useChipStyle.d.ts +6 -3
  343. package/build/typescript/Dialog/DialogProps.d.ts +1 -6
  344. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  345. package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +9 -0
  346. package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -1
  347. package/build/typescript/Divider/DividerProps.d.ts +1 -1
  348. package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
  349. package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
  350. package/build/typescript/ListItem/ListItem.d.ts +1 -1
  351. package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
  352. package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
  353. package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
  354. package/build/typescript/Pagination/index.d.ts +2 -2
  355. package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
  356. package/build/typescript/Section/Section.d.ts +3 -0
  357. package/build/typescript/Section/SectionProps.d.ts +6 -0
  358. package/build/typescript/Section/index.d.ts +2 -0
  359. package/build/typescript/Tab/TabProps.d.ts +21 -2
  360. package/build/typescript/Tab/index.d.ts +2 -1
  361. package/build/typescript/Tab/useVariantStyleMap.d.ts +4 -2
  362. package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
  363. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  364. package/build/typescript/Tabs/TabsProps.d.ts +6 -1
  365. package/build/typescript/Tabs/index.d.ts +1 -1
  366. package/build/typescript/Tabs/useTabsStyle.d.ts +8 -0
  367. package/build/typescript/TextField/useVariantStyleMap.d.ts +2 -0
  368. package/build/typescript/Toolbar/BackButton/BackButton.d.ts +3 -0
  369. package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
  370. package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
  371. package/build/typescript/Toolbar/Toolbar.d.ts +6 -1
  372. package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
  373. package/build/typescript/Tooltip/index.d.ts +1 -0
  374. package/build/typescript/Typography/TypographyProps.d.ts +4 -0
  375. package/build/typescript/hooks/useCollapsibleAppBar.d.ts +0 -1
  376. package/build/typescript/hooks/useContentContainerStyle.d.ts +5 -8
  377. package/build/typescript/index.d.ts +2 -0
  378. package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
  379. package/build/typescript/internal/icons/ChipClose.d.ts +131 -0
  380. package/build/typescript/internal/icons/index.d.ts +2 -0
  381. package/package.json +5 -5
  382. package/src/Accordion/Accordion.tsx +18 -9
  383. package/src/Accordion/AccordionProps.ts +4 -2
  384. package/src/Accordion/useVariantStyleMap.ts +14 -6
  385. package/src/AppBar/AppBar.tsx +5 -1
  386. package/src/Badge/Badge.tsx +4 -3
  387. package/src/Badge/BadgeProps.ts +12 -6
  388. package/src/Badge/useVariantStyleMap.ts +2 -2
  389. package/src/BottomSheetTitle/BottomSheetTitle.tsx +4 -1
  390. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +1 -0
  391. package/src/Button/Button.tsx +28 -12
  392. package/src/Button/ButtonProps.ts +6 -0
  393. package/src/ButtonBase/ButtonBase.tsx +1 -1
  394. package/src/ButtonBase/index.ts +1 -1
  395. package/src/Checkbox/Checkbox.tsx +11 -8
  396. package/src/Checkbox/useVariantStyleMap.ts +6 -1
  397. package/src/Chip/Chip.tsx +24 -13
  398. package/src/Chip/ChipProps.ts +13 -4
  399. package/src/Chip/index.ts +1 -1
  400. package/src/Chip/useChipStyle.ts +59 -29
  401. package/src/Dialog/Dialog.tsx +12 -11
  402. package/src/Dialog/DialogProps.ts +1 -7
  403. package/src/Dialog/useDialogSectionStyle.ts +6 -4
  404. package/src/Dialog/useDialogStyle.ts +19 -7
  405. package/src/DialogActions/DialogActions.tsx +0 -1
  406. package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
  407. package/src/DialogTitle/DialogTitle.tsx +6 -1
  408. package/src/Divider/Divider.tsx +5 -0
  409. package/src/Divider/DividerProps.ts +1 -1
  410. package/src/Empty/Empty.tsx +1 -1
  411. package/src/Flexbox/Flexbox.tsx +2 -0
  412. package/src/Flexbox/FlexboxProps.ts +5 -0
  413. package/src/IconButton/IconButton.tsx +2 -0
  414. package/src/IconButton/IconButtonProps.ts +1 -0
  415. package/src/Image/Image.tsx +3 -3
  416. package/src/ImageCore/ImageCoreNative.tsx +1 -1
  417. package/src/ListItem/ListItem.tsx +61 -30
  418. package/src/ListItem/ListItemProps.ts +5 -0
  419. package/src/ListItemIcon/ListItemIcon.tsx +1 -2
  420. package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
  421. package/src/ListItemText/ListItemText.tsx +20 -28
  422. package/src/ListItemText/ListItemTextProps.ts +2 -10
  423. package/src/ListSubheader/ListSubheader.tsx +1 -1
  424. package/src/Pagination/NumberPagination.tsx +7 -2
  425. package/src/Pagination/Pagination.tsx +3 -2
  426. package/src/Pagination/PaginationProps.ts +15 -0
  427. package/src/Pagination/index.ts +2 -2
  428. package/src/PaginationItem/PaginationItem.tsx +31 -24
  429. package/src/PaginationItem/PaginationItemProps.ts +7 -0
  430. package/src/Radio/Radio.tsx +12 -3
  431. package/src/RadioGroup/RadioGroup.tsx +2 -28
  432. package/src/Section/Section.tsx +26 -0
  433. package/src/Section/SectionProps.ts +6 -0
  434. package/src/Section/index.ts +2 -0
  435. package/src/ShadowView/ShadowView.native.tsx +4 -0
  436. package/src/SnackbarContent/SnackbarContent.tsx +36 -15
  437. package/src/Tab/Tab.tsx +32 -22
  438. package/src/Tab/TabProps.ts +25 -2
  439. package/src/Tab/index.ts +2 -1
  440. package/src/Tab/useVariantStyleMap.ts +72 -19
  441. package/src/TabBase/TabBase.tsx +1 -9
  442. package/src/TabBase/TabBaseProps.ts +0 -6
  443. package/src/Tabs/Tabs.tsx +26 -8
  444. package/src/Tabs/TabsProps.ts +7 -1
  445. package/src/Tabs/index.ts +1 -1
  446. package/src/Tabs/useTabsStyle.ts +77 -0
  447. package/src/TextField/TextField.tsx +69 -26
  448. package/src/TextField/useVariantStyleMap.ts +29 -27
  449. package/src/Toolbar/BackButton/BackButton.tsx +44 -0
  450. package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
  451. package/src/Toolbar/BackButton/index.ts +2 -0
  452. package/src/Toolbar/Toolbar.tsx +6 -1
  453. package/src/Tooltip/Beaks/index.ts +4 -0
  454. package/src/Tooltip/Tooltip.tsx +4 -9
  455. package/src/Tooltip/index.ts +1 -0
  456. package/src/Typography/Typography.tsx +3 -1
  457. package/src/Typography/TypographyProps.ts +5 -0
  458. package/src/hooks/useBreakpointUp.ts +3 -1
  459. package/src/hooks/useCollapsibleAppBar.ts +4 -23
  460. package/src/hooks/useContentContainerStyle.ts +43 -31
  461. package/src/hooks/useFadeInAppBar.ts +2 -2
  462. package/src/index.ts +3 -0
  463. package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
  464. package/src/internal/icons/ChevronLeft.tsx +4 -1
  465. package/src/internal/icons/ChevronRight.tsx +4 -1
  466. package/src/internal/icons/ChipClose.tsx +13 -0
  467. package/src/internal/icons/Clear.tsx +3 -3
  468. package/src/internal/icons/Close.tsx +4 -1
  469. package/src/internal/icons/Search.tsx +2 -2
  470. package/src/internal/icons/index.ts +2 -0
  471. package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
  472. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
  473. package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
  474. package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
  475. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
  476. package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
@@ -1 +1 @@
1
- {"version":3,"names":["paginationVariants"],"sources":["PaginationProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const paginationVariants = ['dot', 'number'] as const;\nexport type PaginationVariant = typeof paginationVariants[number];\n\nexport interface PaginationRenderItemParams {\n /**\n * Index of the pagination item.\n */\n index: number;\n\n /**\n * If `true`, the pagination item is disabled.\n */\n disabled: boolean;\n\n /**\n * If `true` the pagination item is selected.\n */\n selected: boolean;\n}\n\nexport default interface PaginationProps extends OverridableComponentProps<ViewProps, {\n /**\n * The Number of pages that change when the button is pressed\n * @default 1\n */\n bundleSize?: number,\n\n /**\n * The pagination will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n * The total number of pages.\n */\n count: number,\n\n /**\n * If `true`, the pagination is disabled.\n * @default false\n */\n disabled?: boolean;\n\n\n /**\n * If `true`, hide the page indicator.\n * @default false\n */\n hideIndicator?: boolean,\n\n /**\n * If `true`, hide the next-page button.\n * @default false\n */\n hideNextButton?: boolean,\n\n /**\n * If `true`, hide the previous-page button.\n * @default false\n */\n hidePrevButton?: boolean,\n\n /**\n * If `true`, pagination is infinite.\n * @default false\n */\n infinite?: boolean,\n\n /**\n * Callback fired when the page is changed.\n */\n onChange?: (page: number) => void,\n\n /**\n * The current page number.\n */\n page: number;\n\n /**\n * Render the item.\n * @default (item) => <PaginationItem {...item} />\n */\n renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;\n\n /**\n * Determines design variations of the component.\n * @default 'dot'\n */\n variant?: PaginationVariant;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,kBAAkB,GAAG,CAAC,KAAD,EAAQ,QAAR,CAA3B"}
1
+ {"version":3,"names":["paginationColors","paginationVariants"],"sources":["PaginationProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const paginationColors = ['base', 'static'] as const;\nexport type PaginationColor = typeof paginationColors[number];\n\nexport const paginationVariants = ['dot', 'number'] as const;\nexport type PaginationVariant = typeof paginationVariants[number];\n\nexport interface PaginationRenderItemParams {\n /**\n * Set color of dot.\n * @default 'base'\n */\n color?: PaginationColor;\n\n /**\n * Index of the pagination item.\n */\n index: number;\n\n /**\n * If `true`, the pagination item is disabled.\n */\n disabled: boolean;\n\n /**\n * If `true` the pagination item is selected.\n */\n selected: boolean;\n}\n\nexport default interface PaginationProps extends OverridableComponentProps<ViewProps, {\n /**\n * The Number of pages that change when the button is pressed\n * @default 1\n */\n bundleSize?: number,\n\n /**\n * The pagination will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n * Set color of dot.\n * @default 'base'\n */\n color?: PaginationColor;\n\n /**\n * The total number of pages.\n */\n count: number,\n\n /**\n * If `true`, the pagination is disabled.\n * @default false\n */\n disabled?: boolean;\n\n\n /**\n * If `true`, hide the page indicator.\n * @default false\n */\n hideIndicator?: boolean,\n\n /**\n * If `true`, hide the next-page button.\n * @default false\n */\n hideNextButton?: boolean,\n\n /**\n * If `true`, hide the previous-page button.\n * @default false\n */\n hidePrevButton?: boolean,\n\n /**\n * If `true`, pagination is infinite.\n * @default false\n */\n infinite?: boolean,\n\n /**\n * Callback fired when the page is changed.\n */\n onChange?: (page: number) => void,\n\n /**\n * The current page number.\n */\n page: number;\n\n /**\n * Render the item.\n * @default (item) => <PaginationItem {...item} />\n */\n renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;\n\n /**\n * Determines design variations of the component.\n * @default 'dot'\n */\n variant?: PaginationVariant;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,gBAAgB,GAAG,CAAC,MAAD,EAAS,QAAT,CAAzB;;AAGA,MAAMC,kBAAkB,GAAG,CAAC,KAAD,EAAQ,QAAR,CAA3B"}
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "default", {
9
9
  return _Pagination.default;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "paginationColors", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _PaginationProps.paginationColors;
16
+ }
17
+ });
12
18
  Object.defineProperty(exports, "paginationVariants", {
13
19
  enumerable: true,
14
20
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Pagination';\nexport type { default as PaginationProps } from './PaginationProps';\nexport { paginationVariants } from './PaginationProps';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Pagination';\nexport type { default as PaginationProps, PaginationColor, PaginationVariant } from './PaginationProps';\nexport { paginationColors, paginationVariants } from './PaginationProps';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
@@ -9,41 +9,51 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
- var _styles = require("../styles");
12
+ var _styles = require("@fountain-ui/styles");
13
+
14
+ var _styles2 = require("../styles");
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
16
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); }
17
19
 
18
- const useStyles = function () {
19
- const theme = (0, _styles.useTheme)();
20
- const size = 6;
21
- return {
22
- root: {
23
- width: size,
24
- height: size,
25
- borderRadius: size * 0.5,
26
- marginHorizontal: theme.spacing(1)
27
- },
28
- selected: {
29
- backgroundColor: theme.palette.fill.base
30
- },
31
- unselected: {
32
- backgroundColor: theme.palette.status.disabled
33
- }
34
- };
35
- };
20
+ const DEFAULT_SIZE = 6;
21
+
22
+ const styles = _reactNative.StyleSheet.create({
23
+ root: {
24
+ width: DEFAULT_SIZE,
25
+ height: DEFAULT_SIZE,
26
+ borderRadius: DEFAULT_SIZE * 0.5,
27
+ marginHorizontal: 4
28
+ }
29
+ });
30
+
31
+ function getBackgroundColor(color, selected) {
32
+ const theme = (0, _styles2.useTheme)();
33
+
34
+ switch (color) {
35
+ case 'static':
36
+ return selected ? _styles.commonColors.static.strongInverse : _styles.commonColors.static.weakOpacityInverse;
37
+
38
+ case 'base':
39
+ default:
40
+ return selected ? theme.palette.fill.base : theme.palette.status.disabled;
41
+ }
42
+ }
36
43
 
37
44
  function PaginationItem(props) {
38
45
  const {
46
+ color = 'base',
39
47
  disabled,
40
- selected,
48
+ selected = false,
41
49
  style,
42
50
  ...otherProps
43
51
  } = props;
44
- const styles = useStyles();
52
+ const backgroundColor = getBackgroundColor(color, selected);
45
53
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
46
- style: (0, _styles.css)([styles.root, selected ? styles.selected : styles.unselected, style])
54
+ style: (0, _styles2.css)([styles.root, {
55
+ backgroundColor
56
+ }, style])
47
57
  }, otherProps));
48
58
  }
49
59
 
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","size","root","width","height","borderRadius","marginHorizontal","spacing","selected","backgroundColor","palette","fill","base","unselected","status","disabled","PaginationItem","props","style","otherProps","styles","css","React","memo"],"sources":["PaginationItem.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type PaginationItemProps from './PaginationItemProps';\n\ntype PaginationItemStyles = NamedStylesStringUnion<'root' | 'selected' | 'unselected'>;\n\nconst useStyles: UseStyles<PaginationItemStyles> = function (): PaginationItemStyles {\n const theme = useTheme();\n\n const size = 6;\n\n return {\n root: {\n width: size,\n height: size,\n borderRadius: size * 0.5,\n marginHorizontal: theme.spacing(1),\n },\n selected: {\n backgroundColor: theme.palette.fill.base,\n },\n unselected: {\n backgroundColor: theme.palette.status.disabled,\n },\n };\n};\n\nfunction PaginationItem(props: PaginationItemProps) {\n const {\n disabled,\n selected,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <View\n style={css([\n styles.root,\n selected ? styles.selected : styles.unselected,\n style,\n ])}\n {...otherProps}\n />\n );\n}\n\nexport default React.memo(PaginationItem);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAKA,MAAMA,SAA0C,GAAG,YAAkC;EACjF,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,IAAI,GAAG,CAAb;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,KAAK,EAAEF,IADL;MAEFG,MAAM,EAAEH,IAFN;MAGFI,YAAY,EAAEJ,IAAI,GAAG,GAHnB;MAIFK,gBAAgB,EAAEP,KAAK,CAACQ,OAAN,CAAc,CAAd;IAJhB,CADH;IAOHC,QAAQ,EAAE;MACNC,eAAe,EAAEV,KAAK,CAACW,OAAN,CAAcC,IAAd,CAAmBC;IAD9B,CAPP;IAUHC,UAAU,EAAE;MACRJ,eAAe,EAAEV,KAAK,CAACW,OAAN,CAAcI,MAAd,CAAqBC;IAD9B;EAVT,CAAP;AAcH,CAnBD;;AAqBA,SAASC,cAAT,CAAwBC,KAAxB,EAAoD;EAChD,MAAM;IACFF,QADE;IAEFP,QAFE;IAGFU,KAHE;IAIF,GAAGC;EAJD,IAKFF,KALJ;EAOA,MAAMG,MAAM,GAAGtB,SAAS,EAAxB;EAEA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAE,IAAAuB,WAAA,EAAI,CACPD,MAAM,CAAClB,IADA,EAEPM,QAAQ,GAAGY,MAAM,CAACZ,QAAV,GAAqBY,MAAM,CAACP,UAF7B,EAGPK,KAHO,CAAJ;EADX,GAMQC,UANR,EADJ;AAUH;;4BAEcG,cAAA,CAAMC,IAAN,CAAWP,cAAX,C"}
1
+ {"version":3,"names":["DEFAULT_SIZE","styles","StyleSheet","create","root","width","height","borderRadius","marginHorizontal","getBackgroundColor","color","selected","theme","useTheme","commonColors","static","strongInverse","weakOpacityInverse","palette","fill","base","status","disabled","PaginationItem","props","style","otherProps","backgroundColor","css","React","memo"],"sources":["PaginationItem.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, View, ViewStyle } from 'react-native';\nimport { commonColors, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { PaginationColor } from '../Pagination';\nimport { css, useTheme } from '../styles';\nimport type PaginationItemProps from './PaginationItemProps';\n\nconst DEFAULT_SIZE = 6;\n\nconst styles = StyleSheet.create({\n root: {\n width: DEFAULT_SIZE,\n height: DEFAULT_SIZE,\n borderRadius: DEFAULT_SIZE * 0.5,\n marginHorizontal: 4,\n },\n});\n\nfunction getBackgroundColor(color: PaginationColor, selected: boolean): ViewStyle['backgroundColor'] {\n const theme = useTheme();\n\n switch (color) {\n case 'static':\n return selected\n ? commonColors.static.strongInverse\n : commonColors.static.weakOpacityInverse;\n case 'base':\n default:\n return selected\n ? theme.palette.fill.base\n : theme.palette.status.disabled;\n\n }\n}\n\nfunction PaginationItem(props: PaginationItemProps) {\n const {\n color = 'base' as PaginationColor,\n disabled,\n selected = false,\n style,\n ...otherProps\n } = props;\n\n const backgroundColor = getBackgroundColor(color, selected);\n\n return (\n <View\n style={css([\n styles.root,\n { backgroundColor },\n style,\n ])}\n {...otherProps}\n />\n );\n}\n\nexport default React.memo(PaginationItem);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;AAGA,MAAMA,YAAY,GAAG,CAArB;;AAEA,MAAMC,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,KAAK,EAAEL,YADL;IAEFM,MAAM,EAAEN,YAFN;IAGFO,YAAY,EAAEP,YAAY,GAAG,GAH3B;IAIFQ,gBAAgB,EAAE;EAJhB;AADuB,CAAlB,CAAf;;AASA,SAASC,kBAAT,CAA4BC,KAA5B,EAAoDC,QAApD,EAAqG;EACjG,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;;EAEA,QAAQH,KAAR;IACI,KAAK,QAAL;MACI,OAAOC,QAAQ,GACTG,oBAAA,CAAaC,MAAb,CAAoBC,aADX,GAETF,oBAAA,CAAaC,MAAb,CAAoBE,kBAF1B;;IAGJ,KAAK,MAAL;IACA;MACI,OAAON,QAAQ,GACTC,KAAK,CAACM,OAAN,CAAcC,IAAd,CAAmBC,IADV,GAETR,KAAK,CAACM,OAAN,CAAcG,MAAd,CAAqBC,QAF3B;EAPR;AAYH;;AAED,SAASC,cAAT,CAAwBC,KAAxB,EAAoD;EAChD,MAAM;IACFd,KAAK,GAAG,MADN;IAEFY,QAFE;IAGFX,QAAQ,GAAG,KAHT;IAIFc,KAJE;IAKF,GAAGC;EALD,IAMFF,KANJ;EAQA,MAAMG,eAAe,GAAGlB,kBAAkB,CAACC,KAAD,EAAQC,QAAR,CAA1C;EAEA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAE,IAAAiB,YAAA,EAAI,CACP3B,MAAM,CAACG,IADA,EAEP;MAAEuB;IAAF,CAFO,EAGPF,KAHO,CAAJ;EADX,GAMQC,UANR,EADJ;AAUH;;4BAEcG,cAAA,CAAMC,IAAN,CAAWP,cAAX,C"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["PaginationItemProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface PaginationItemProps extends OverridableComponentProps<ViewProps, {\n /**\n * If `true`, the pagination item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * If `true` the pagination item is selected.\n * @default false\n */\n selected?: boolean;\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["PaginationItemProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\nimport { PaginationColor } from '../Pagination';\n\nexport default interface PaginationItemProps extends OverridableComponentProps<ViewProps, {\n /**\n * Set color of dot.\n * @default 'base'\n */\n color?: PaginationColor;\n\n /**\n * If `true`, the pagination item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * If `true` the pagination item is selected.\n * @default false\n */\n selected?: boolean;\n}> {}\n"],"mappings":""}
@@ -29,17 +29,22 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
29
29
 
30
30
  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); }
31
31
 
32
+ const DEFAULT_START_ICON_SIZE = 21;
33
+
32
34
  const useStyles = function () {
33
35
  const theme = (0, _styles.useTheme)();
34
36
  return {
35
37
  root: {
36
38
  alignItems: 'center',
39
+ borderBottomColor: theme.palette.border.weak,
40
+ borderBottomWidth: 0.5,
37
41
  flexDirection: 'row',
38
- gap: theme.spacing(8),
39
- justifyContent: 'space-between'
42
+ gap: 32,
43
+ justifyContent: 'space-between',
44
+ paddingVertical: 14
40
45
  },
41
46
  content: {
42
- gap: theme.spacing(2),
47
+ gap: 8,
43
48
  minHeight: 20
44
49
  }
45
50
  };
@@ -78,7 +83,9 @@ function Radio(props) {
78
83
  const checkedIcon = checkIconProp ?? defaultCheckedIcon;
79
84
  const icon = isChecked ? checkedIcon : null;
80
85
  const startIcon = (0, _utils.cloneElementSafely)(startIconProp, {
81
- color: 'strong'
86
+ color: 'strong',
87
+ height: DEFAULT_START_ICON_SIZE,
88
+ width: DEFAULT_START_ICON_SIZE
82
89
  });
83
90
  const rootStyle = (0, _styles.css)([styles.root, style]);
84
91
  const fontStyle = (0, _styles.createFontStyle)(theme, {
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","alignItems","flexDirection","gap","spacing","justifyContent","content","minHeight","Radio","props","checked","children","checkedIcon","checkIconProp","disabled","onChange","onChangeProp","startIcon","startIconProp","style","value","otherProps","styles","context","useContext","RadioContext","handlePress","isChecked","defaultCheckedIcon","icon","cloneElementSafely","color","rootStyle","css","fontStyle","createFontStyle","selector","typography","body1","regular","palette","text","strong"],"sources":["Radio.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { Check as CheckedIcon } from '../internal';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport { RadioContext } from '../RadioGroup/RadioContextProvider';\nimport type RadioProps from './RadioProps';\n\ntype RadioStyles = NamedStylesStringUnion<'root' | 'content'>;\n\nconst useStyles: UseStyles<RadioStyles> = function (): RadioStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: theme.spacing(8),\n justifyContent: 'space-between',\n },\n content: {\n gap: theme.spacing(2),\n minHeight: 20,\n },\n };\n};\n\nexport default function Radio(props: RadioProps) {\n const {\n checked = false,\n children,\n checkedIcon: checkIconProp,\n disabled = false,\n onChange: onChangeProp,\n startIcon: startIconProp,\n style,\n value,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const context = useContext(RadioContext);\n\n const handlePress = () => {\n const onChange = context?.onChange ?? onChangeProp;\n if (onChange) {\n onChange(value);\n }\n };\n\n const isChecked = context?.value === value ?? checked;\n\n const defaultCheckedIcon = (\n <CheckedIcon color={'accent'}/>\n );\n\n const checkedIcon = checkIconProp ?? defaultCheckedIcon;\n const icon = isChecked ? checkedIcon : null;\n\n const startIcon = cloneElementSafely(startIconProp, { color: 'strong' });\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body1.regular,\n color: theme.palette.text.strong,\n });\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <Row\n alignItems={'center'}\n style={styles.content}\n >\n {startIcon}\n\n <Text\n children={children}\n style={fontStyle}\n />\n </Row>\n\n {icon}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAKA,MAAMA,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,aAAa,EAAE,KAFb;MAGFC,GAAG,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd,CAHH;MAIFC,cAAc,EAAE;IAJd,CADH;IAOHC,OAAO,EAAE;MACLH,GAAG,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd,CADA;MAELG,SAAS,EAAE;IAFN;EAPN,CAAP;AAYH,CAfD;;AAiBe,SAASC,KAAT,CAAeC,KAAf,EAAkC;EAC7C,MAAM;IACFC,OAAO,GAAG,KADR;IAEFC,QAFE;IAGFC,WAAW,EAAEC,aAHX;IAIFC,QAAQ,GAAG,KAJT;IAKFC,QAAQ,EAAEC,YALR;IAMFC,SAAS,EAAEC,aANT;IAOFC,KAPE;IAQFC,KARE;IASF,GAAGC;EATD,IAUFZ,KAVJ;EAYA,MAAMX,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMuB,MAAM,GAAGzB,SAAS,EAAxB;EAEA,MAAM0B,OAAO,GAAG,IAAAC,iBAAA,EAAWC,kCAAX,CAAhB;;EAEA,MAAMC,WAAW,GAAG,MAAM;IACtB,MAAMX,QAAQ,GAAG,CAAAQ,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAER,QAAT,KAAqBC,YAAtC;;IACA,IAAID,QAAJ,EAAc;MACVA,QAAQ,CAACK,KAAD,CAAR;IACH;EACJ,CALD;;EAOA,MAAMO,SAAS,GAAG,CAAAJ,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAEH,KAAT,MAAmBA,KAAnB,IAA4BV,OAA9C;;EAEA,MAAMkB,kBAAkB,gBACpB,6BAAC,eAAD;IAAa,KAAK,EAAE;EAApB,EADJ;;EAIA,MAAMhB,WAAW,GAAGC,aAAa,IAAIe,kBAArC;EACA,MAAMC,IAAI,GAAGF,SAAS,GAAGf,WAAH,GAAiB,IAAvC;EAEA,MAAMK,SAAS,GAAG,IAAAa,yBAAA,EAAmBZ,aAAnB,EAAkC;IAAEa,KAAK,EAAE;EAAT,CAAlC,CAAlB;EAEA,MAAMC,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBX,MAAM,CAACtB,IADW,EAElBmB,KAFkB,CAAJ,CAAlB;EAKA,MAAMe,SAAS,GAAG,IAAAC,uBAAA,EAAgBrC,KAAhB,EAAuB;IACrCsC,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,KAAX,CAAiBC,OADN;IAErCR,KAAK,EAAEjC,KAAK,CAAC0C,OAAN,CAAcC,IAAd,CAAmBC;EAFW,CAAvB,CAAlB;EAKA,oBACI,6BAAC,mBAAD;IACI,QAAQ,EAAE5B,QADd;IAEI,OAAO,EAAEY,WAFb;IAGI,KAAK,EAAEM;EAHX,GAIQX,UAJR,gBAMI,6BAAC,YAAD;IACI,UAAU,EAAE,QADhB;IAEI,KAAK,EAAEC,MAAM,CAAChB;EAFlB,GAIKW,SAJL,eAMI,6BAAC,iBAAD;IACI,QAAQ,EAAEN,QADd;IAEI,KAAK,EAAEuB;EAFX,EANJ,CANJ,EAkBKL,IAlBL,CADJ;AAsBH;;AAAA"}
1
+ {"version":3,"names":["DEFAULT_START_ICON_SIZE","useStyles","theme","useTheme","root","alignItems","borderBottomColor","palette","border","weak","borderBottomWidth","flexDirection","gap","justifyContent","paddingVertical","content","minHeight","Radio","props","checked","children","checkedIcon","checkIconProp","disabled","onChange","onChangeProp","startIcon","startIconProp","style","value","otherProps","styles","context","useContext","RadioContext","handlePress","isChecked","defaultCheckedIcon","icon","cloneElementSafely","color","height","width","rootStyle","css","fontStyle","createFontStyle","selector","typography","body1","regular","text","strong"],"sources":["Radio.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { Check as CheckedIcon } from '../internal';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport { RadioContext } from '../RadioGroup/RadioContextProvider';\nimport type RadioProps from './RadioProps';\n\nconst DEFAULT_START_ICON_SIZE = 21;\n\ntype RadioStyles = NamedStylesStringUnion<'root' | 'content'>;\n\nconst useStyles: UseStyles<RadioStyles> = function (): RadioStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 0.5,\n flexDirection: 'row',\n gap: 32,\n justifyContent: 'space-between',\n paddingVertical: 14,\n },\n content: {\n gap: 8,\n minHeight: 20,\n },\n };\n};\n\nexport default function Radio(props: RadioProps) {\n const {\n checked = false,\n children,\n checkedIcon: checkIconProp,\n disabled = false,\n onChange: onChangeProp,\n startIcon: startIconProp,\n style,\n value,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const context = useContext(RadioContext);\n\n const handlePress = () => {\n const onChange = context?.onChange ?? onChangeProp;\n if (onChange) {\n onChange(value);\n }\n };\n\n const isChecked = context?.value === value ?? checked;\n\n const defaultCheckedIcon = (\n <CheckedIcon color={'accent'}/>\n );\n\n const checkedIcon = checkIconProp ?? defaultCheckedIcon;\n const icon = isChecked ? checkedIcon : null;\n\n const startIcon = cloneElementSafely(startIconProp, {\n color: 'strong',\n height: DEFAULT_START_ICON_SIZE,\n width: DEFAULT_START_ICON_SIZE,\n });\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body1.regular,\n color: theme.palette.text.strong,\n });\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <Row\n alignItems={'center'}\n style={styles.content}\n >\n {startIcon}\n\n <Text\n children={children}\n style={fontStyle}\n />\n </Row>\n\n {icon}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAGA,MAAMA,uBAAuB,GAAG,EAAhC;;AAIA,MAAMC,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,iBAAiB,EAAEJ,KAAK,CAACK,OAAN,CAAcC,MAAd,CAAqBC,IAFtC;MAGFC,iBAAiB,EAAE,GAHjB;MAIFC,aAAa,EAAE,KAJb;MAKFC,GAAG,EAAE,EALH;MAMFC,cAAc,EAAE,eANd;MAOFC,eAAe,EAAE;IAPf,CADH;IAUHC,OAAO,EAAE;MACLH,GAAG,EAAE,CADA;MAELI,SAAS,EAAE;IAFN;EAVN,CAAP;AAeH,CAlBD;;AAoBe,SAASC,KAAT,CAAeC,KAAf,EAAkC;EAC7C,MAAM;IACFC,OAAO,GAAG,KADR;IAEFC,QAFE;IAGFC,WAAW,EAAEC,aAHX;IAIFC,QAAQ,GAAG,KAJT;IAKFC,QAAQ,EAAEC,YALR;IAMFC,SAAS,EAAEC,aANT;IAOFC,KAPE;IAQFC,KARE;IASF,GAAGC;EATD,IAUFZ,KAVJ;EAYA,MAAMhB,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM4B,MAAM,GAAG9B,SAAS,EAAxB;EAEA,MAAM+B,OAAO,GAAG,IAAAC,iBAAA,EAAWC,kCAAX,CAAhB;;EAEA,MAAMC,WAAW,GAAG,MAAM;IACtB,MAAMX,QAAQ,GAAG,CAAAQ,OAAO,S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,IAlBL,CADJ;AAsBH;;AAAA"}
@@ -5,33 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = RadioGroup;
7
7
 
8
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
- var _styles = require("../styles");
13
-
14
- var _utils = require("../utils");
15
-
16
12
  var _RadioContextProvider = _interopRequireDefault(require("./RadioContextProvider"));
17
13
 
18
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
15
 
20
- 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); }
21
-
22
- 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; }
23
-
24
- const useStyles = function () {
25
- const theme = (0, _styles.useTheme)();
26
- return {
27
- root: {
28
- borderBottomColor: theme.palette.border.weak,
29
- borderBottomWidth: 0.5,
30
- paddingVertical: theme.spacing(3.5)
31
- }
32
- };
33
- };
34
-
35
16
  function RadioGroup(props) {
36
17
  const {
37
18
  children,
@@ -39,18 +20,12 @@ function RadioGroup(props) {
39
20
  onChange,
40
21
  ...otherProps
41
22
  } = props;
42
- const styles = useStyles();
43
-
44
- const radios = _react.Children.map(children, child => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
45
- style: styles.root
46
- }, (0, _utils.cloneElementSafely)(child)));
47
-
48
23
  return /*#__PURE__*/_react.default.createElement(_RadioContextProvider.default, {
49
24
  value: {
50
25
  value,
51
26
  onChange
52
27
  }
53
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, otherProps, radios));
28
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, otherProps, children));
54
29
  }
55
30
 
56
31
  ;
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","borderBottomColor","palette","border","weak","borderBottomWidth","paddingVertical","spacing","RadioGroup","props","children","value","onChange","otherProps","styles","radios","Children","map","child","cloneElementSafely"],"sources":["RadioGroup.tsx"],"sourcesContent":["import React, { Children } from 'react';\nimport { View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { FalsyReactElement } from '../utils';\nimport { cloneElementSafely } from '../utils';\nimport RadioContextProvider from './RadioContextProvider';\nimport type RadioGroupProps from './RadioGroupProps';\n\ntype RadioItemStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<RadioItemStyles> = function (): RadioItemStyles {\n const theme = useTheme();\n\n return {\n root: {\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 0.5,\n paddingVertical: theme.spacing(3.5),\n },\n };\n};\n\nexport default function RadioGroup(props: RadioGroupProps) {\n const {\n children,\n value,\n onChange,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const radios = Children.map(children, (child) => (\n <View style={styles.root}>\n {cloneElementSafely(child as FalsyReactElement)}\n </View>\n ));\n\n return (\n <RadioContextProvider value={{ value, onChange }}>\n <View {...otherProps}>\n {radios}\n </View>\n </RadioContextProvider>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;;;;;;;AAKA,MAAMA,SAAqC,GAAG,YAA6B;EACvE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,iBAAiB,EAAEH,KAAK,CAACI,OAAN,CAAcC,MAAd,CAAqBC,IADtC;MAEFC,iBAAiB,EAAE,GAFjB;MAGFC,eAAe,EAAER,KAAK,CAACS,OAAN,CAAc,GAAd;IAHf;EADH,CAAP;AAOH,CAVD;;AAYe,SAASC,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAFE;IAGFC,QAHE;IAIF,GAAGC;EAJD,IAKFJ,KALJ;EAOA,MAAMK,MAAM,GAAGjB,SAAS,EAAxB;;EAEA,MAAMkB,MAAM,GAAGC,eAAA,CAASC,GAAT,CAAaP,QAAb,EAAwBQ,KAAD,iBAClC,6BAAC,iBAAD;IAAM,KAAK,EAAEJ,MAAM,CAACd;EAApB,GACK,IAAAmB,yBAAA,EAAmBD,KAAnB,CADL,CADW,CAAf;;EAMA,oBACI,6BAAC,6BAAD;IAAsB,KAAK,EAAE;MAAEP,KAAF;MAASC;IAAT;EAA7B,gBACI,6BAAC,iBAAD,EAAUC,UAAV,EACKE,MADL,CADJ,CADJ;AAOH;;AAAA"}
1
+ {"version":3,"names":["RadioGroup","props","children","value","onChange","otherProps"],"sources":["RadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport RadioContextProvider from './RadioContextProvider';\nimport type RadioGroupProps from './RadioGroupProps';\n\nexport default function RadioGroup(props: RadioGroupProps) {\n const {\n children,\n value,\n onChange,\n ...otherProps\n } = props;\n\n return (\n <RadioContextProvider value={{ value, onChange }}>\n <View {...otherProps}>\n {children}\n </View>\n </RadioContextProvider>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAFE;IAGFC,QAHE;IAIF,GAAGC;EAJD,IAKFJ,KALJ;EAOA,oBACI,6BAAC,6BAAD;IAAsB,KAAK,EAAE;MAAEE,KAAF;MAASC;IAAT;EAA7B,gBACI,6BAAC,iBAAD,EAAUC,UAAV,EACKH,QADL,CADJ,CADJ;AAOH;;AAAA"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = Section;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _reactNative = require("react-native");
11
+
12
+ var _hooks = require("../hooks");
13
+
14
+ var _styles = require("../styles");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ function Section(props) {
19
+ const {
20
+ children,
21
+ maxWidth,
22
+ style: styleProp
23
+ } = props;
24
+ const styles = (0, _hooks.useContentContainerStyle)({
25
+ maxWidth
26
+ });
27
+ const rootStyle = (0, _styles.css)([styles, styleProp]);
28
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
29
+ style: rootStyle
30
+ }, children);
31
+ }
32
+ //# sourceMappingURL=Section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Section","props","children","maxWidth","style","styleProp","styles","useContentContainerStyle","rootStyle","css"],"sources":["Section.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { useContentContainerStyle } from '../hooks';\nimport { css } from '../styles';\nimport type SectionProps from './SectionProps';\n\nexport default function Section(props: SectionProps) {\n const {\n children,\n maxWidth,\n style: styleProp,\n } = props;\n\n const styles = useContentContainerStyle({ maxWidth });\n\n const rootStyle = css([\n styles,\n styleProp,\n ]);\n\n return (\n <View style={rootStyle}>\n {children}\n </View>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAGe,SAASA,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QADE;IAEFC,QAFE;IAGFC,KAAK,EAAEC;EAHL,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAG,IAAAC,+BAAA,EAAyB;IAAEJ;EAAF,CAAzB,CAAf;EAEA,MAAMK,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBH,MADkB,EAElBD,SAFkB,CAAJ,CAAlB;EAKA,oBACI,6BAAC,iBAAD;IAAM,KAAK,EAAEG;EAAb,GACKN,QADL,CADJ;AAKH"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=SectionProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["SectionProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SectionProps extends OverridableComponentProps<ViewProps, {\n maxWidth?: number;\n}> {}\n"],"mappings":""}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Section.default;
10
+ }
11
+ });
12
+
13
+ var _Section = _interopRequireDefault(require("./Section"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Section';\nexport type { default as SectionProps } from './SectionProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -29,6 +29,8 @@ function ShadowView(props) {
29
29
  const {
30
30
  borderRadius,
31
31
  height,
32
+ maxHeight,
33
+ maxWidth,
32
34
  width
33
35
  } = styleProp;
34
36
  return nativeShadows.reduce((accumulator, nativeShadow) => {
@@ -37,6 +39,8 @@ function ShadowView(props) {
37
39
  }, {
38
40
  borderRadius: borderRadius ?? 0,
39
41
  height,
42
+ maxHeight,
43
+ maxWidth,
40
44
  width
41
45
  }])
42
46
  }, accumulator);
@@ -1 +1 @@
1
- {"version":3,"names":["ShadowView","props","children","style","styleProp","variant","otherProps","theme","useTheme","nativeShadows","shadow","borderRadius","height","width","reduce","accumulator","nativeShadow","css"],"sources":["ShadowView.native.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { FountainUiStyle, ShadowVariant } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type ShadowViewProps from './ShadowViewProps';\n\nexport default function ShadowView(props: ShadowViewProps) {\n const {\n children,\n style: styleProp = {},\n variant = 100 as ShadowVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const { nativeShadows } = theme.shadow[variant];\n\n const {\n borderRadius,\n height,\n width,\n } = styleProp as FountainUiStyle;\n\n return nativeShadows.reduce((accumulator, nativeShadow) => {\n return (\n <View\n style={css([\n { ...nativeShadow },\n {\n borderRadius: borderRadius ?? 0,\n height,\n width,\n },\n ])}\n >\n {accumulator}\n </View>\n );\n }, (\n <View\n style={styleProp}\n {...otherProps}\n >\n {children}\n </View>\n ));\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAAS,GAAG,EAFjB;IAGFC,OAAO,GAAG,GAHR;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IAAEC;EAAF,IAAoBF,KAAK,CAACG,MAAN,CAAaL,OAAb,CAA1B;EAEA,MAAM;IACFM,YADE;IAEFC,MAFE;IAGFC;EAHE,IAIFT,SAJJ;EAMA,OAAOK,aAAa,CAACK,MAAd,CAAqB,CAACC,WAAD,EAAcC,YAAd,KAA+B;IACvD,oBACI,6BAAC,iBAAD;MACI,KAAK,EAAE,IAAAC,WAAA,EAAI,CACP,EAAE,GAAGD;MAAL,CADO,EAEP;QACIL,YAAY,EAAEA,YAAY,IAAI,CADlC;QAEIC,MAFJ;QAGIC;MAHJ,CAFO,CAAJ;IADX,GAUKE,WAVL,CADJ;EAcH,CAfM,eAgBH,6BAAC,iBAAD;IACI,KAAK,EAAEX;EADX,GAEQE,UAFR,GAIKJ,QAJL,CAhBG,CAAP;AAuBH"}
1
+ {"version":3,"names":["ShadowView","props","children","style","styleProp","variant","otherProps","theme","useTheme","nativeShadows","shadow","borderRadius","height","maxHeight","maxWidth","width","reduce","accumulator","nativeShadow","css"],"sources":["ShadowView.native.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { FountainUiStyle, ShadowVariant } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type ShadowViewProps from './ShadowViewProps';\n\nexport default function ShadowView(props: ShadowViewProps) {\n const {\n children,\n style: styleProp = {},\n variant = 100 as ShadowVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const { nativeShadows } = theme.shadow[variant];\n\n const {\n borderRadius,\n height,\n maxHeight,\n maxWidth,\n width,\n } = styleProp as FountainUiStyle;\n\n return nativeShadows.reduce((accumulator, nativeShadow) => {\n return (\n <View\n style={css([\n { ...nativeShadow },\n {\n borderRadius: borderRadius ?? 0,\n height,\n maxHeight,\n maxWidth,\n width,\n },\n ])}\n >\n {accumulator}\n </View>\n );\n }, (\n <View\n style={styleProp}\n {...otherProps}\n >\n {children}\n </View>\n ));\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAAS,GAAG,EAFjB;IAGFC,OAAO,GAAG,GAHR;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IAAEC;EAAF,IAAoBF,KAAK,CAACG,MAAN,CAAaL,OAAb,CAA1B;EAEA,MAAM;IACFM,YADE;IAEFC,MAFE;IAGFC,SAHE;IAIFC,QAJE;IAKFC;EALE,IAMFX,SANJ;EAQA,OAAOK,aAAa,CAACO,MAAd,CAAqB,CAACC,WAAD,EAAcC,YAAd,KAA+B;IACvD,oBACI,6BAAC,iBAAD;MACI,KAAK,EAAE,IAAAC,WAAA,EAAI,CACP,EAAE,GAAGD;MAAL,CADO,EAEP;QACIP,YAAY,EAAEA,YAAY,IAAI,CADlC;QAEIC,MAFJ;QAGIC,SAHJ;QAIIC,QAJJ;QAKIC;MALJ,CAFO,CAAJ;IADX,GAYKE,WAZL,CADJ;EAgBH,CAjBM,eAkBH,6BAAC,iBAAD;IACI,KAAK,EAAEb;EADX,GAEQE,UAFR,GAIKJ,QAJL,CAlBG,CAAP;AAyBH"}
@@ -43,6 +43,14 @@ const useStyles = function () {
43
43
  },
44
44
  actionButton: {
45
45
  marginLeft: theme.spacing(6)
46
+ },
47
+ actionLabel: {
48
+ paddingBottom: theme.spacing(1.5),
49
+ paddingTop: theme.spacing(1.25)
50
+ },
51
+ actionElement: {
52
+ paddingLeft: theme.spacing(2),
53
+ paddingVertical: theme.spacing(1.25)
46
54
  }
47
55
  };
48
56
  };
@@ -62,18 +70,23 @@ function SnackbarContent(props) {
62
70
  const theme = (0, _styles2.useTheme)();
63
71
  const titleFontStyle = (0, _styles2.createFontStyle)(theme, {
64
72
  selector: _ => (0, _styles.typographyOf)({
65
- fontSize: 14,
66
- lineHeight: 18.2,
67
- fontFamily: 'Pretendard-SemiBold',
73
+ fontSize: 15,
74
+ lineHeight: 19.5,
75
+ fontFamily: 'PretendardStd-SemiBold',
68
76
  letterSpacing: 0
69
77
  }),
70
78
  color: theme.palette.text.strongInverse
71
79
  });
72
80
  const messageFontStyle = (0, _styles2.createFontStyle)(theme, {
73
- selector: _ => (0, _styles.typographyOf)({
74
- fontSize: 13,
75
- lineHeight: 16.9,
76
- fontFamily: 'Pretendard-Regular',
81
+ selector: _ => title ? (0, _styles.typographyOf)({
82
+ fontSize: 12,
83
+ lineHeight: 15.6,
84
+ fontFamily: 'PretendardStd-Regular',
85
+ letterSpacing: 0
86
+ }) : (0, _styles.typographyOf)({
87
+ fontSize: 14,
88
+ lineHeight: 18.2,
89
+ fontFamily: 'PretendardStd-Regular',
77
90
  letterSpacing: 0
78
91
  }),
79
92
  color: theme.palette.text.strongInverse
@@ -113,10 +126,14 @@ function SnackbarContent(props) {
113
126
  flex: 1
114
127
  }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
115
128
  style: styles.actionButton
116
- }, typeof actionContent === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
129
+ }, typeof actionContent === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
130
+ style: styles.actionLabel
131
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
117
132
  children: actionContent,
118
133
  style: labelFontStyle
119
- }) : actionContent)) : null);
134
+ })) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
135
+ style: styles.actionElement
136
+ }, actionContent))) : null);
120
137
  }
121
138
 
122
139
  ;
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","alignItems","alignSelf","backgroundColor","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","css","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.9,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.25,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n color: theme.palette.text.accent,\n });\n\n const hasActionButton = !!(actionContent && onPress);\n\n const rootStyle = css([\n styles.root,\n startIcon ? { borderRadius: theme.shape.radius.xl } : undefined,\n hasActionButton ? { width: '100%' } : undefined,\n styleProp,\n ]);\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={rootStyle}\n {...otherProps}\n >\n {startIcon ? (\n <React.Fragment>\n {startIcon}\n\n <Spacer size={3}/>\n </React.Fragment>\n ) : status !== 'info' ? (\n <React.Fragment>\n <StatusIcon status={status}/>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Column>\n {title ? (\n <Typography\n children={title}\n style={css([titleFontStyle])}\n />\n ) : null}\n\n <Text\n children={message}\n style={css([messageFontStyle])}\n />\n </Column>\n\n {actionContent ? (\n <React.Fragment>\n <Spacer flex={1}/>\n\n <View style={styles.actionButton}>\n {typeof actionContent === 'string' ? (\n <Text\n children={actionContent}\n style={labelFontStyle}\n />\n ) : (actionContent)}\n </View>\n </React.Fragment>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAIA,MAAMA,SAA2C,GAAG,YAAmC;EACnF,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,aAAa,EAAE,KADb;MAEFC,UAAU,EAAE,QAFV;MAGFC,SAAS,EAAE,QAHT;MAIFC,eAAe,EAAEN,KAAK,CAACO,OAAN,CAAcC,OAAd,CAAsBC,MAJrC;MAKFC,YAAY,EAAE,EALZ;MAMFC,QAAQ,EAAE,GANR;MAOFC,aAAa,EAAEZ,KAAK,CAACa,OAAN,CAAc,IAAd,CAPb;MAQFC,iBAAiB,EAAEd,KAAK,CAACa,OAAN,CAAc,CAAd,CARjB;MASFE,UAAU,EAAEf,KAAK,CAACa,OAAN,CAAc,CAAd;IATV,CADH;IAYHG,YAAY,EAAE;MACVC,UAAU,EAAEjB,KAAK,CAACa,OAAN,CAAc,CAAd;IADF;EAZX,CAAP;AAgBH,CAnBD;;AAqBe,SAASK,eAAT,CAAyBC,KAAzB,EAAsD;EACjE,MAAM;IACFC,aADE;IAEFC,OAFE;IAGFC,KAHE;IAIFC,OAJE;IAKFC,KAAK,EAAEC,SALL;IAMFC,MAAM,GAAG,MANP;IAOFC,SAPE;IAQF,GAAGC;EARD,IASFT,KATJ;EAWA,MAAMU,MAAM,GAAG9B,SAAS,EAAx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or","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","actionLabel","actionElement","paddingLeft","paddingVertical","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","css","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton' | 'actionLabel' | 'actionElement'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n actionLabel: {\n paddingBottom: theme.spacing(1.5),\n paddingTop: theme.spacing(1.25),\n },\n actionElement: {\n paddingLeft: theme.spacing(2),\n paddingVertical: theme.spacing(1.25),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 15,\n lineHeight: 19.5,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (_) => title\n ? typographyOf({\n fontSize: 12,\n lineHeight: 15.6,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n })\n : typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.25,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n color: theme.palette.text.accent,\n });\n\n const hasActionButton = !!(actionContent && onPress);\n\n const rootStyle = css([\n styles.root,\n startIcon ? { borderRadius: theme.shape.radius.xl } : undefined,\n hasActionButton ? { width: '100%' } : undefined,\n styleProp,\n ]);\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={rootStyle}\n {...otherProps}\n >\n {startIcon ? (\n <React.Fragment>\n {startIcon}\n\n <Spacer size={3}/>\n </React.Fragment>\n ) : status !== 'info' ? (\n <React.Fragment>\n <StatusIcon status={status}/>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Column>\n {title ? (\n <Typography\n children={title}\n style={css([titleFontStyle])}\n />\n ) : null}\n\n <Text\n children={message}\n style={css([messageFontStyle])}\n />\n </Column>\n\n {actionContent ? (\n <React.Fragment>\n <Spacer flex={1}/>\n\n <View style={styles.actionButton}>\n {typeof actionContent === 'string' ? (\n <View style={styles.actionLabel}>\n <Text\n children={actionContent}\n style={labelFontStyle}\n />\n </View>\n ) : (\n <View style={styles.actionElement}>\n {actionContent}\n </View>\n )}\n </View>\n </React.Fragment>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;A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ADH,gBAQG,6BAAC,iBAAD;IAAM,KAAK,EAAEd,MAAM,CAACd;EAApB,GACKK,aADL,CATR,CAHJ,CADU,GAmBV,IArDR,CADJ;AAyDH;;AAAA"}
@@ -11,8 +11,6 @@ var _reactNative = require("react-native");
11
11
 
12
12
  var _Badge = _interopRequireDefault(require("../Badge"));
13
13
 
14
- var _Spacer = _interopRequireDefault(require("../Spacer"));
15
-
16
14
  var _TabBase = _interopRequireDefault(require("../TabBase"));
17
15
 
18
16
  var _styles = require("../styles");
@@ -43,41 +41,45 @@ function Tab(props) {
43
41
  children,
44
42
  enableIndicator = false,
45
43
  icon: defaultIcon,
44
+ parentColor = 'default',
46
45
  selected = false,
47
46
  selectedIcon,
47
+ size = 'medium',
48
48
  variant = 'default',
49
49
  style: styleProp,
50
+ innerStyle: innerStyleProp,
50
51
  onTabInnerLayout,
51
52
  ...otherProps
52
53
  } = props;
53
- const theme = (0, _styles.useTheme)();
54
- const vertical = variant === 'bottom-navigation';
55
54
  const {
56
55
  container: containerStyle,
56
+ iconContainer: iconContainerStyle,
57
57
  inner: innerStyle,
58
58
  label: labelStyle
59
- } = (0, _useVariantStyleMap.default)(variant, selected);
59
+ } = (0, _useVariantStyleMap.default)(variant, selected, size, parentColor);
60
60
  const tabBaseStyle = (0, _styles.css)([styles.root, containerStyle, styleProp]);
61
- const tabInnerStyle = (0, _styles.css)([styles.filledInner, innerStyle]);
62
- const pressEffect = selected ? 'none' : 'opacity';
61
+ const tabInnerStyle = (0, _styles.css)([styles.filledInner, innerStyle, innerStyleProp]);
63
62
  const icon = selected ? selectedIcon || defaultIcon : defaultIcon;
64
- const iconColor = selected ? theme.palette.icon.strong : theme.palette.icon.base;
65
- const iconElement = (0, _utils.cloneElementSafely)(icon, {
66
- fill: iconColor
67
- });
63
+ const iconElement = (0, _utils.cloneElementSafely)(icon);
68
64
  const tabElement = typeof children !== 'string' ? (0, _utils.cloneElementSafely)(children, {
69
65
  selected
70
66
  }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconElement ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Badge.default, {
71
- invisible: !badgeVisible
72
- }, iconElement), /*#__PURE__*/_react.default.createElement(_Spacer.default, {
73
- size: 1.25
74
- })) : null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
67
+ horizontalOffset: -4,
68
+ invisible: !badgeVisible,
69
+ verticalOffset: -4
70
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
71
+ style: iconContainerStyle
72
+ }, iconElement)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
73
+ style: (0, _styles.css)(labelStyle)
74
+ }, children)) : /*#__PURE__*/_react.default.createElement(_Badge.default, {
75
+ horizontalOffset: -7,
76
+ invisible: !badgeVisible,
77
+ verticalOffset: 3
78
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
75
79
  style: (0, _styles.css)(labelStyle)
76
- }, children));
80
+ }, children)));
77
81
  return /*#__PURE__*/_react.default.createElement(_TabBase.default, _extends({
78
- pressEffect: pressEffect,
79
- style: tabBaseStyle,
80
- vertical: vertical
82
+ style: tabBaseStyle
81
83
  }, otherProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
82
84
  onLayout: onTabInnerLayout,
83
85
  style: tabInnerStyle
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","variant","style","styleProp","onTabInnerLayout","otherProps","theme","useTheme","vertical","container","containerStyle","inner","innerStyle","label","labelStyle","useVariantStyleMap","tabBaseStyle","css","tabInnerStyle","pressEffect","iconColor","palette","strong","base","iconElement","cloneElementSafely","fill","tabElement"],"sources":["Tab.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Badge from '../Badge';\nimport Spacer from '../Spacer';\nimport TabBase from '../TabBase';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type TabProps from './TabProps';\nimport type { TabVariant } from './TabProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n },\n filledInner: {\n alignItems: 'center',\n justifyContent: 'center',\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 = 'default' as TabVariant,\n style: styleProp,\n onTabInnerLayout,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const vertical = variant === 'bottom-navigation';\n\n const {\n container: containerStyle,\n inner: innerStyle,\n label: labelStyle,\n } = useVariantStyleMap(variant, selected);\n\n const tabBaseStyle = css([\n styles.root,\n containerStyle,\n styleProp,\n ]);\n\n const tabInnerStyle = css([\n styles.filledInner,\n innerStyle,\n ]);\n\n const pressEffect = selected ? 'none' : 'opacity';\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconColor = selected ? theme.palette.icon.strong : theme.palette.icon.base;\n const iconElement = cloneElementSafely(icon, { fill: iconColor });\n\n const tabElement = typeof children !== 'string' ? (\n cloneElementSafely(children, {\n selected,\n })\n ) : (\n <React.Fragment>\n {iconElement ? (\n <React.Fragment>\n <Badge invisible={!badgeVisible}>\n {iconElement}\n </Badge>\n\n <Spacer size={1.25}/>\n </React.Fragment>\n ) : null}\n\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </React.Fragment>\n );\n\n return (\n <TabBase\n pressEffect={pressEffect}\n style={tabBaseStyle}\n vertical={vertical}\n {...otherProps}\n >\n <View onLayout={onTabInnerLayout} style={tabInnerStyle}>\n {tabElement}\n </View>\n </TabBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;AAEA,MA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,GAA+BhB,KAAK,CAACe,OAAN,CAAcxB,IAAd,CAAmB0B,IAA5E;EACA,MAAMC,WAAW,GAAG,IAAAC,yBAAA,EAAmB5B,IAAnB,EAAyB;IAAE6B,IAAI,EAAEN;EAAR,CAAzB,CAApB;EAEA,MAAMO,UAAU,GAAG,OAAOhC,QAAP,KAAoB,QAApB,GACf,IAAA8B,yBAAA,EAAmB9B,QAAnB,EAA6B;IACzBI;EADyB,CAA7B,CADe,gBAKf,6BAAC,cAAD,CAAO,QAAP,QACKyB,WAAW,gBACR,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,cAAD;IAAO,SAAS,EAAE,CAAC9B;EAAnB,GACK8B,WADL,CADJ,eAKI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EALJ,CADQ,GAQR,IATR,eAWI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAP,WAAA,EAAIH,UAAJ;EAAb,GACKnB,QADL,CAXJ,CALJ;EAsBA,oBACI,6BAAC,gBAAD;IACI,WAAW,EAAEwB,WADjB;IAEI,KAAK,EAAEH,YAFX;IAGI,QAAQ,EAAER;EAHd,GAIQH,UAJR,gBAMI,6BAAC,iBAAD;IAAM,QAAQ,EAAED,gBAAhB;IAAkC,KAAK,EAAEc;EAAzC,GACKS,UADL,CANJ,CADJ;AAYH;;AAAA"}
1
+ {"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","parentColor","selected","selectedIcon","size","variant","style","styleProp","innerStyle","innerStyleProp","onTabInnerLayout","otherProps","container","containerStyle","iconContainer","iconContainerStyle","inner","label","labelStyle","useVariantStyleMap","tabBaseStyle","css","tabInnerStyle","iconElement","cloneElementSafely","tabElement"],"sources":["Tab.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Badge from '../Badge';\nimport TabBase from '../TabBase';\nimport type { TabsColor } from '../Tabs';\nimport { css, StyleSheet } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type TabProps from './TabProps';\nimport type { TabSize, TabVariant } from './TabProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n },\n filledInner: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport default function Tab(props: TabProps) {\n const {\n badgeVisible = false,\n children,\n enableIndicator = false,\n icon: defaultIcon,\n parentColor = 'default' as TabsColor,\n selected = false,\n selectedIcon,\n size = 'medium' as TabSize,\n variant = 'default' as TabVariant,\n style: styleProp,\n innerStyle: innerStyleProp,\n onTabInnerLayout,\n ...otherProps\n } = props;\n\n const {\n container: containerStyle,\n iconContainer: iconContainerStyle,\n inner: innerStyle,\n label: labelStyle,\n } = useVariantStyleMap(variant, selected, size, parentColor);\n\n const tabBaseStyle = css([\n styles.root,\n containerStyle,\n styleProp,\n ]);\n\n const tabInnerStyle = css([\n styles.filledInner,\n innerStyle,\n innerStyleProp,\n ]);\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconElement = cloneElementSafely(icon);\n\n const tabElement = typeof children !== 'string' ? (\n cloneElementSafely(children, {\n selected,\n })\n ) : (\n <React.Fragment>\n {iconElement ? (\n <React.Fragment>\n <Badge\n horizontalOffset={-4}\n invisible={!badgeVisible}\n verticalOffset={-4}\n >\n <View style={iconContainerStyle}>\n {iconElement}\n </View>\n </Badge>\n\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </React.Fragment>\n ) : (\n <Badge\n horizontalOffset={-7}\n invisible={!badgeVisible}\n verticalOffset={3}\n >\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </Badge>\n )}\n </React.Fragment>\n );\n\n return (\n <TabBase\n style={tabBaseStyle}\n {...otherProps}\n >\n <View onLayout={onTabInnerLayout} style={tabInnerStyle}>\n {tabElement}\n </View>\n </TabBase>\n );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MuB,WAAW,GAAG,IAAAC,yBAAA,EAAmBzB,IAAnB,CAApB;EAEA,MAAM0B,UAAU,GAAG,OAAO5B,QAAP,KAAoB,QAApB,GACf,IAAA2B,yBAAA,EAAmB3B,QAAnB,EAA6B;IACzBK;EADyB,CAA7B,CADe,gBAKf,6BAAC,cAAD,CAAO,QAAP,QACKqB,WAAW,gBACR,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,cAAD;IACI,gBAAgB,EAAE,CAAC,CADvB;IAEI,SAAS,EAAE,CAAC3B,YAFhB;IAGI,cAAc,EAAE,CAAC;EAHrB,gBAKI,6BAAC,iBAAD;IAAM,KAAK,EAAEmB;EAAb,GACKQ,WADL,CALJ,CADJ,eAWI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAF,WAAA,EAAIH,UAAJ;EAAb,GACKrB,QADL,CAXJ,CADQ,gBAiBR,6BAAC,cAAD;IACI,gBAAgB,EAAE,CAAC,CADvB;IAEI,SAAS,EAAE,CAACD,YAFhB;IAGI,cAAc,EAAE;EAHpB,gBAKI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAyB,WAAA,EAAIH,UAAJ;EAAb,GACKrB,QADL,CALJ,CAlBR,CALJ;EAoCA,oBACI,6BAAC,gBAAD;IACI,KAAK,EAAEuB;EADX,GAEQT,UAFR,gBAII,6BAAC,iBAAD;IAAM,QAAQ,EAAED,gBAAhB;IAAkC,KAAK,EAAEY;EAAzC,GACKG,UADL,CAJJ,CADJ;AAUH;;AAAA"}
@@ -3,7 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.tabVariants = void 0;
7
- const tabVariants = ['default', 'circular', 'bottom-navigation'];
6
+ exports.tabVariants = exports.tabSizes = void 0;
7
+ const tabSizes = ['small', 'medium'];
8
+ exports.tabSizes = tabSizes;
9
+ const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'];
8
10
  exports.tabVariants = tabVariants;
9
11
  //# sourceMappingURL=TabProps.js.map