@fountain-ui/core 3.0.0-alpha.2 → 3.0.0-alpha.21

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 (445) hide show
  1. package/build/commonjs/Accordion/Accordion.js +7 -4
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/useVariantStyleMap.js +15 -8
  4. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  5. package/build/commonjs/AppBar/AppBar.js +6 -1
  6. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  7. package/build/commonjs/Badge/Badge.js +4 -3
  8. package/build/commonjs/Badge/Badge.js.map +1 -1
  9. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  10. package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
  11. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
  12. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +5 -2
  13. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  14. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  15. package/build/commonjs/Button/Button.js +26 -12
  16. package/build/commonjs/Button/Button.js.map +1 -1
  17. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  18. package/build/commonjs/Button/useVariantStyleMap.js +3 -1
  19. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
  20. package/build/commonjs/ButtonBase/index.js +2 -2
  21. package/build/commonjs/ButtonBase/index.js.map +1 -1
  22. package/build/commonjs/Checkbox/Checkbox.js +4 -1
  23. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  24. package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
  25. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  26. package/build/commonjs/Chip/Chip.js +21 -14
  27. package/build/commonjs/Chip/Chip.js.map +1 -1
  28. package/build/commonjs/Chip/ChipProps.js +3 -1
  29. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  30. package/build/commonjs/Chip/index.js +6 -0
  31. package/build/commonjs/Chip/index.js.map +1 -1
  32. package/build/commonjs/Chip/useChipStyle.js +29 -19
  33. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  34. package/build/commonjs/Dialog/Dialog.js +7 -10
  35. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  36. package/build/commonjs/Dialog/DialogProps.js +1 -1
  37. package/build/commonjs/Dialog/DialogProps.js.map +1 -1
  38. package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
  39. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
  40. package/build/commonjs/Dialog/useDialogStyle.js +19 -8
  41. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  42. package/build/commonjs/DialogActions/DialogActions.js +0 -1
  43. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  44. package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
  45. package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
  46. package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
  47. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  48. package/build/commonjs/Divider/Divider.js +17 -9
  49. package/build/commonjs/Divider/Divider.js.map +1 -1
  50. package/build/commonjs/Divider/DividerProps.js +1 -1
  51. package/build/commonjs/Divider/DividerProps.js.map +1 -1
  52. package/build/commonjs/Empty/Empty.js +1 -1
  53. package/build/commonjs/Empty/Empty.js.map +1 -1
  54. package/build/commonjs/Flexbox/Flexbox.js +2 -0
  55. package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
  56. package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
  57. package/build/commonjs/IconButton/IconButton.js +3 -0
  58. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  59. package/build/commonjs/IconButton/IconButtonProps.js +1 -1
  60. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  61. package/build/commonjs/ImageCore/ImageCoreNative.js +1 -1
  62. package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
  63. package/build/commonjs/ListItem/ListItem.js +38 -26
  64. package/build/commonjs/ListItem/ListItem.js.map +1 -1
  65. package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
  66. package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
  67. package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
  68. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  69. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  70. package/build/commonjs/ListItemText/ListItemText.js +20 -21
  71. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  72. package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
  73. package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
  74. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  75. package/build/commonjs/Pagination/NumberPagination.js +1 -1
  76. package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
  77. package/build/commonjs/Pagination/Pagination.js +2 -0
  78. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  79. package/build/commonjs/Pagination/PaginationProps.js +3 -1
  80. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  81. package/build/commonjs/Pagination/index.js +6 -0
  82. package/build/commonjs/Pagination/index.js.map +1 -1
  83. package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
  84. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  85. package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
  86. package/build/commonjs/Radio/Radio.js +11 -4
  87. package/build/commonjs/Radio/Radio.js.map +1 -1
  88. package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
  89. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  90. package/build/commonjs/Section/Section.js +32 -0
  91. package/build/commonjs/Section/Section.js.map +1 -0
  92. package/build/commonjs/Section/SectionProps.js +2 -0
  93. package/build/commonjs/Section/SectionProps.js.map +1 -0
  94. package/build/commonjs/Section/index.js +16 -0
  95. package/build/commonjs/Section/index.js.map +1 -0
  96. package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
  97. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  98. package/build/commonjs/SnackbarContent/SnackbarContent.js +26 -9
  99. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  100. package/build/commonjs/Tab/Tab.js +18 -18
  101. package/build/commonjs/Tab/Tab.js.map +1 -1
  102. package/build/commonjs/Tab/TabProps.js +4 -2
  103. package/build/commonjs/Tab/TabProps.js.map +1 -1
  104. package/build/commonjs/Tab/index.js +14 -0
  105. package/build/commonjs/Tab/index.js.map +1 -1
  106. package/build/commonjs/Tab/useVariantStyleMap.js +60 -16
  107. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
  108. package/build/commonjs/TabBase/TabBase.js +1 -8
  109. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  110. package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
  111. package/build/commonjs/Tabs/Tabs.js +9 -5
  112. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  113. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  114. package/build/commonjs/Tabs/useTabsStyle.js +54 -0
  115. package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
  116. package/build/commonjs/TextField/TextField.js +1 -1
  117. package/build/commonjs/TextField/TextField.js.map +1 -1
  118. package/build/commonjs/TextField/useVariantStyleMap.js +4 -3
  119. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  120. package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
  121. package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
  122. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
  123. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  124. package/build/commonjs/Toolbar/BackButton/index.js +16 -0
  125. package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
  126. package/build/commonjs/Toolbar/Toolbar.js +8 -4
  127. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  128. package/build/commonjs/Tooltip/Beaks/index.js +32 -0
  129. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
  130. package/build/commonjs/Tooltip/Tooltip.js +11 -18
  131. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  132. package/build/commonjs/Tooltip/index.js +19 -0
  133. package/build/commonjs/Tooltip/index.js.map +1 -1
  134. package/build/commonjs/Typography/Typography.js +9 -2
  135. package/build/commonjs/Typography/Typography.js.map +1 -1
  136. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  137. package/build/commonjs/hooks/useBreakpointUp.js +4 -1
  138. package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
  139. package/build/commonjs/hooks/useCollapsibleAppBar.js +1 -1
  140. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  141. package/build/commonjs/hooks/useContentContainerStyle.js +21 -28
  142. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  143. package/build/commonjs/hooks/useFadeInAppBar.js +1 -1
  144. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  145. package/build/commonjs/index.js +21 -0
  146. package/build/commonjs/index.js.map +1 -1
  147. package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
  148. package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
  149. package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
  150. package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
  151. package/build/commonjs/internal/icons/ChevronRight.js +4 -2
  152. package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
  153. package/build/commonjs/internal/icons/Close.js +4 -2
  154. package/build/commonjs/internal/icons/Close.js.map +1 -1
  155. package/build/commonjs/internal/icons/index.js +8 -0
  156. package/build/commonjs/internal/icons/index.js.map +1 -1
  157. package/build/module/Accordion/Accordion.js +7 -4
  158. package/build/module/Accordion/Accordion.js.map +1 -1
  159. package/build/module/Accordion/useVariantStyleMap.js +15 -8
  160. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  161. package/build/module/AppBar/AppBar.js +5 -1
  162. package/build/module/AppBar/AppBar.js.map +1 -1
  163. package/build/module/Badge/Badge.js +4 -3
  164. package/build/module/Badge/Badge.js.map +1 -1
  165. package/build/module/Badge/BadgeProps.js.map +1 -1
  166. package/build/module/Badge/useVariantStyleMap.js +2 -2
  167. package/build/module/Badge/useVariantStyleMap.js.map +1 -1
  168. package/build/module/BottomSheetTitle/BottomSheetTitle.js +5 -2
  169. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  170. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  171. package/build/module/Button/Button.js +27 -13
  172. package/build/module/Button/Button.js.map +1 -1
  173. package/build/module/Button/ButtonProps.js.map +1 -1
  174. package/build/module/Button/useVariantStyleMap.js +3 -1
  175. package/build/module/Button/useVariantStyleMap.js.map +1 -1
  176. package/build/module/ButtonBase/index.js +1 -1
  177. package/build/module/ButtonBase/index.js.map +1 -1
  178. package/build/module/Checkbox/Checkbox.js +4 -1
  179. package/build/module/Checkbox/Checkbox.js.map +1 -1
  180. package/build/module/Checkbox/useVariantStyleMap.js +6 -2
  181. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  182. package/build/module/Chip/Chip.js +17 -13
  183. package/build/module/Chip/Chip.js.map +1 -1
  184. package/build/module/Chip/ChipProps.js +1 -0
  185. package/build/module/Chip/ChipProps.js.map +1 -1
  186. package/build/module/Chip/index.js +1 -1
  187. package/build/module/Chip/index.js.map +1 -1
  188. package/build/module/Chip/useChipStyle.js +29 -19
  189. package/build/module/Chip/useChipStyle.js.map +1 -1
  190. package/build/module/Dialog/Dialog.js +7 -9
  191. package/build/module/Dialog/Dialog.js.map +1 -1
  192. package/build/module/Dialog/DialogProps.js +1 -1
  193. package/build/module/Dialog/DialogProps.js.map +1 -1
  194. package/build/module/Dialog/useDialogSectionStyle.js +6 -4
  195. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
  196. package/build/module/Dialog/useDialogStyle.js +18 -8
  197. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  198. package/build/module/DialogActions/DialogActions.js +0 -1
  199. package/build/module/DialogActions/DialogActions.js.map +1 -1
  200. package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
  201. package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
  202. package/build/module/DialogTitle/DialogTitle.js +6 -3
  203. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  204. package/build/module/Divider/Divider.js +7 -0
  205. package/build/module/Divider/Divider.js.map +1 -1
  206. package/build/module/Divider/DividerProps.js +1 -1
  207. package/build/module/Divider/DividerProps.js.map +1 -1
  208. package/build/module/Empty/Empty.js +1 -1
  209. package/build/module/Empty/Empty.js.map +1 -1
  210. package/build/module/Flexbox/Flexbox.js +2 -0
  211. package/build/module/Flexbox/Flexbox.js.map +1 -1
  212. package/build/module/Flexbox/FlexboxProps.js.map +1 -1
  213. package/build/module/IconButton/IconButton.js +3 -0
  214. package/build/module/IconButton/IconButton.js.map +1 -1
  215. package/build/module/IconButton/IconButtonProps.js +1 -1
  216. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  217. package/build/module/ImageCore/ImageCoreNative.js +1 -1
  218. package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
  219. package/build/module/ListItem/ListItem.js +36 -28
  220. package/build/module/ListItem/ListItem.js.map +1 -1
  221. package/build/module/ListItem/ListItemProps.js.map +1 -1
  222. package/build/module/ListItemIcon/ListItemIcon.js +1 -2
  223. package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
  224. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  225. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  226. package/build/module/ListItemText/ListItemText.js +17 -19
  227. package/build/module/ListItemText/ListItemText.js.map +1 -1
  228. package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
  229. package/build/module/ListSubheader/ListSubheader.js +1 -1
  230. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  231. package/build/module/Pagination/NumberPagination.js +1 -1
  232. package/build/module/Pagination/NumberPagination.js.map +1 -1
  233. package/build/module/Pagination/Pagination.js +2 -0
  234. package/build/module/Pagination/Pagination.js.map +1 -1
  235. package/build/module/Pagination/PaginationProps.js +1 -0
  236. package/build/module/Pagination/PaginationProps.js.map +1 -1
  237. package/build/module/Pagination/index.js +1 -1
  238. package/build/module/Pagination/index.js.map +1 -1
  239. package/build/module/PaginationItem/PaginationItem.js +28 -21
  240. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  241. package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
  242. package/build/module/Radio/Radio.js +10 -4
  243. package/build/module/Radio/Radio.js.map +1 -1
  244. package/build/module/RadioGroup/RadioGroup.js +2 -20
  245. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  246. package/build/module/Section/Section.js +19 -0
  247. package/build/module/Section/Section.js.map +1 -0
  248. package/build/module/Section/SectionProps.js +2 -0
  249. package/build/module/Section/SectionProps.js.map +1 -0
  250. package/build/module/Section/index.js +2 -0
  251. package/build/module/Section/index.js.map +1 -0
  252. package/build/module/ShadowView/ShadowView.native.js +4 -0
  253. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  254. package/build/module/SnackbarContent/SnackbarContent.js +26 -9
  255. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  256. package/build/module/Tab/Tab.js +19 -18
  257. package/build/module/Tab/Tab.js.map +1 -1
  258. package/build/module/Tab/TabProps.js +2 -1
  259. package/build/module/Tab/TabProps.js.map +1 -1
  260. package/build/module/Tab/index.js +1 -0
  261. package/build/module/Tab/index.js.map +1 -1
  262. package/build/module/Tab/useVariantStyleMap.js +60 -16
  263. package/build/module/Tab/useVariantStyleMap.js.map +1 -1
  264. package/build/module/TabBase/TabBase.js +1 -8
  265. package/build/module/TabBase/TabBase.js.map +1 -1
  266. package/build/module/TabBase/TabBaseProps.js.map +1 -1
  267. package/build/module/Tabs/Tabs.js +8 -5
  268. package/build/module/Tabs/Tabs.js.map +1 -1
  269. package/build/module/Tabs/TabsProps.js.map +1 -1
  270. package/build/module/Tabs/useTabsStyle.js +44 -0
  271. package/build/module/Tabs/useTabsStyle.js.map +1 -0
  272. package/build/module/TextField/TextField.js +1 -1
  273. package/build/module/TextField/TextField.js.map +1 -1
  274. package/build/module/TextField/useVariantStyleMap.js +4 -3
  275. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  276. package/build/module/Toolbar/BackButton/BackButton.js +32 -0
  277. package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
  278. package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
  279. package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  280. package/build/module/Toolbar/BackButton/index.js +2 -0
  281. package/build/module/Toolbar/BackButton/index.js.map +1 -0
  282. package/build/module/Toolbar/Toolbar.js +7 -3
  283. package/build/module/Toolbar/Toolbar.js.map +1 -1
  284. package/build/module/Tooltip/Beaks/index.js +4 -0
  285. package/build/module/Tooltip/Beaks/index.js.map +1 -1
  286. package/build/module/Tooltip/Tooltip.js +4 -10
  287. package/build/module/Tooltip/Tooltip.js.map +1 -1
  288. package/build/module/Tooltip/index.js +1 -0
  289. package/build/module/Tooltip/index.js.map +1 -1
  290. package/build/module/Typography/Typography.js +9 -2
  291. package/build/module/Typography/Typography.js.map +1 -1
  292. package/build/module/Typography/TypographyProps.js.map +1 -1
  293. package/build/module/hooks/useBreakpointUp.js +4 -1
  294. package/build/module/hooks/useBreakpointUp.js.map +1 -1
  295. package/build/module/hooks/useCollapsibleAppBar.js +1 -1
  296. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  297. package/build/module/hooks/useContentContainerStyle.js +23 -26
  298. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  299. package/build/module/hooks/useFadeInAppBar.js +1 -1
  300. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  301. package/build/module/index.js +2 -0
  302. package/build/module/index.js.map +1 -1
  303. package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
  304. package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
  305. package/build/module/internal/icons/ChevronLeft.js +4 -2
  306. package/build/module/internal/icons/ChevronLeft.js.map +1 -1
  307. package/build/module/internal/icons/ChevronRight.js +4 -2
  308. package/build/module/internal/icons/ChevronRight.js.map +1 -1
  309. package/build/module/internal/icons/Close.js +4 -2
  310. package/build/module/internal/icons/Close.js.map +1 -1
  311. package/build/module/internal/icons/index.js +1 -0
  312. package/build/module/internal/icons/index.js.map +1 -1
  313. package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
  314. package/build/typescript/Badge/BadgeProps.d.ts +10 -5
  315. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +1 -0
  316. package/build/typescript/Button/ButtonProps.d.ts +5 -0
  317. package/build/typescript/ButtonBase/index.d.ts +1 -1
  318. package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
  319. package/build/typescript/Chip/ChipProps.d.ts +11 -4
  320. package/build/typescript/Chip/index.d.ts +1 -1
  321. package/build/typescript/Chip/useChipStyle.d.ts +4 -3
  322. package/build/typescript/Dialog/DialogProps.d.ts +1 -6
  323. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  324. package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +9 -0
  325. package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -1
  326. package/build/typescript/Divider/DividerProps.d.ts +1 -1
  327. package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
  328. package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
  329. package/build/typescript/ListItem/ListItem.d.ts +1 -1
  330. package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
  331. package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
  332. package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
  333. package/build/typescript/Pagination/index.d.ts +2 -2
  334. package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
  335. package/build/typescript/Section/Section.d.ts +3 -0
  336. package/build/typescript/Section/SectionProps.d.ts +6 -0
  337. package/build/typescript/Section/index.d.ts +2 -0
  338. package/build/typescript/Tab/TabProps.d.ts +8 -1
  339. package/build/typescript/Tab/index.d.ts +2 -1
  340. package/build/typescript/Tab/useVariantStyleMap.d.ts +3 -2
  341. package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
  342. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  343. package/build/typescript/Tabs/TabsProps.d.ts +6 -1
  344. package/build/typescript/Tabs/useTabsStyle.d.ts +7 -0
  345. package/build/typescript/Toolbar/BackButton/BackButton.d.ts +3 -0
  346. package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
  347. package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
  348. package/build/typescript/Toolbar/Toolbar.d.ts +6 -1
  349. package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
  350. package/build/typescript/Tooltip/index.d.ts +1 -0
  351. package/build/typescript/Typography/TypographyProps.d.ts +4 -0
  352. package/build/typescript/hooks/useContentContainerStyle.d.ts +4 -8
  353. package/build/typescript/index.d.ts +2 -0
  354. package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
  355. package/build/typescript/internal/icons/index.d.ts +1 -0
  356. package/package.json +5 -5
  357. package/src/Accordion/Accordion.tsx +11 -8
  358. package/src/Accordion/useVariantStyleMap.ts +14 -6
  359. package/src/AppBar/AppBar.tsx +4 -0
  360. package/src/Badge/Badge.tsx +4 -3
  361. package/src/Badge/BadgeProps.ts +12 -6
  362. package/src/Badge/useVariantStyleMap.ts +2 -2
  363. package/src/BottomSheetTitle/BottomSheetTitle.tsx +4 -1
  364. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +1 -0
  365. package/src/Button/Button.tsx +28 -12
  366. package/src/Button/ButtonProps.ts +6 -0
  367. package/src/Button/useVariantStyleMap.ts +1 -1
  368. package/src/ButtonBase/index.ts +1 -1
  369. package/src/Checkbox/Checkbox.tsx +11 -8
  370. package/src/Checkbox/useVariantStyleMap.ts +6 -1
  371. package/src/Chip/Chip.tsx +20 -13
  372. package/src/Chip/ChipProps.ts +13 -4
  373. package/src/Chip/index.ts +1 -1
  374. package/src/Chip/useChipStyle.ts +34 -17
  375. package/src/Dialog/Dialog.tsx +8 -9
  376. package/src/Dialog/DialogProps.ts +1 -7
  377. package/src/Dialog/useDialogSectionStyle.ts +6 -4
  378. package/src/Dialog/useDialogStyle.ts +19 -7
  379. package/src/DialogActions/DialogActions.tsx +0 -1
  380. package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
  381. package/src/DialogTitle/DialogTitle.tsx +6 -1
  382. package/src/Divider/Divider.tsx +5 -0
  383. package/src/Divider/DividerProps.ts +1 -1
  384. package/src/Empty/Empty.tsx +1 -1
  385. package/src/Flexbox/Flexbox.tsx +2 -0
  386. package/src/Flexbox/FlexboxProps.ts +5 -0
  387. package/src/IconButton/IconButton.tsx +2 -0
  388. package/src/IconButton/IconButtonProps.ts +1 -0
  389. package/src/ImageCore/ImageCoreNative.tsx +1 -1
  390. package/src/ListItem/ListItem.tsx +61 -30
  391. package/src/ListItem/ListItemProps.ts +5 -0
  392. package/src/ListItemIcon/ListItemIcon.tsx +1 -2
  393. package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
  394. package/src/ListItemText/ListItemText.tsx +20 -28
  395. package/src/ListItemText/ListItemTextProps.ts +2 -10
  396. package/src/ListSubheader/ListSubheader.tsx +1 -1
  397. package/src/Pagination/NumberPagination.tsx +1 -1
  398. package/src/Pagination/Pagination.tsx +3 -2
  399. package/src/Pagination/PaginationProps.ts +15 -0
  400. package/src/Pagination/index.ts +2 -2
  401. package/src/PaginationItem/PaginationItem.tsx +31 -24
  402. package/src/PaginationItem/PaginationItemProps.ts +7 -0
  403. package/src/Radio/Radio.tsx +12 -3
  404. package/src/RadioGroup/RadioGroup.tsx +2 -28
  405. package/src/Section/Section.tsx +26 -0
  406. package/src/Section/SectionProps.ts +6 -0
  407. package/src/Section/index.ts +2 -0
  408. package/src/ShadowView/ShadowView.native.tsx +4 -0
  409. package/src/SnackbarContent/SnackbarContent.tsx +36 -15
  410. package/src/Tab/Tab.tsx +28 -22
  411. package/src/Tab/TabProps.ts +10 -1
  412. package/src/Tab/index.ts +2 -1
  413. package/src/Tab/useVariantStyleMap.ts +65 -17
  414. package/src/TabBase/TabBase.tsx +1 -9
  415. package/src/TabBase/TabBaseProps.ts +0 -6
  416. package/src/Tabs/Tabs.tsx +7 -6
  417. package/src/Tabs/TabsProps.ts +7 -1
  418. package/src/Tabs/useTabsStyle.ts +49 -0
  419. package/src/TextField/TextField.tsx +1 -1
  420. package/src/TextField/useVariantStyleMap.ts +4 -3
  421. package/src/Toolbar/BackButton/BackButton.tsx +44 -0
  422. package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
  423. package/src/Toolbar/BackButton/index.ts +2 -0
  424. package/src/Toolbar/Toolbar.tsx +6 -1
  425. package/src/Tooltip/Beaks/index.ts +4 -0
  426. package/src/Tooltip/Tooltip.tsx +4 -9
  427. package/src/Tooltip/index.ts +1 -0
  428. package/src/Typography/Typography.tsx +3 -1
  429. package/src/Typography/TypographyProps.ts +5 -0
  430. package/src/hooks/useBreakpointUp.ts +3 -1
  431. package/src/hooks/useCollapsibleAppBar.ts +1 -1
  432. package/src/hooks/useContentContainerStyle.ts +26 -34
  433. package/src/hooks/useFadeInAppBar.ts +1 -1
  434. package/src/index.ts +3 -0
  435. package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
  436. package/src/internal/icons/ChevronLeft.tsx +4 -1
  437. package/src/internal/icons/ChevronRight.tsx +4 -1
  438. package/src/internal/icons/Close.tsx +4 -1
  439. package/src/internal/icons/index.ts +1 -0
  440. package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
  441. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
  442. package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
  443. package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
  444. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
  445. package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
@@ -3,9 +3,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
3
3
  import React from 'react';
4
4
  import { Platform, Text, View } from 'react-native';
5
5
  import Badge from '../Badge';
6
- import Spacer from '../Spacer';
7
6
  import TabBase from '../TabBase';
8
- import { css, StyleSheet, useTheme } from '../styles';
7
+ import { css, StyleSheet } from '../styles';
9
8
  import { cloneElementSafely } from '../utils';
10
9
  import useVariantStyleMap from './useVariantStyleMap';
11
10
  const styles = StyleSheet.create({
@@ -27,39 +26,41 @@ export default function Tab(props) {
27
26
  icon: defaultIcon,
28
27
  selected = false,
29
28
  selectedIcon,
29
+ size = 'medium',
30
30
  variant = 'default',
31
31
  style: styleProp,
32
32
  onTabInnerLayout,
33
33
  ...otherProps
34
34
  } = props;
35
- const theme = useTheme();
36
- const vertical = variant === 'bottom-navigation';
37
35
  const {
38
36
  container: containerStyle,
37
+ iconContainer: iconContainerStyle,
39
38
  inner: innerStyle,
40
39
  label: labelStyle
41
- } = useVariantStyleMap(variant, selected);
40
+ } = useVariantStyleMap(variant, selected, size);
42
41
  const tabBaseStyle = css([styles.root, containerStyle, styleProp]);
43
42
  const tabInnerStyle = css([styles.filledInner, innerStyle]);
44
- const pressEffect = selected ? 'none' : 'opacity';
45
43
  const icon = selected ? selectedIcon || defaultIcon : defaultIcon;
46
- const iconColor = selected ? theme.palette.icon.strong : theme.palette.icon.base;
47
- const iconElement = cloneElementSafely(icon, {
48
- fill: iconColor
49
- });
44
+ const iconElement = cloneElementSafely(icon);
50
45
  const tabElement = typeof children !== 'string' ? cloneElementSafely(children, {
51
46
  selected
52
47
  }) : /*#__PURE__*/React.createElement(React.Fragment, null, iconElement ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Badge, {
53
- invisible: !badgeVisible
54
- }, iconElement), /*#__PURE__*/React.createElement(Spacer, {
55
- size: 1.25
56
- })) : null, /*#__PURE__*/React.createElement(Text, {
48
+ horizontalOffset: -4,
49
+ invisible: !badgeVisible,
50
+ verticalOffset: -4
51
+ }, /*#__PURE__*/React.createElement(View, {
52
+ style: iconContainerStyle
53
+ }, iconElement)), /*#__PURE__*/React.createElement(Text, {
57
54
  style: css(labelStyle)
58
- }, children));
55
+ }, children)) : /*#__PURE__*/React.createElement(Badge, {
56
+ horizontalOffset: -7,
57
+ invisible: !badgeVisible,
58
+ verticalOffset: 3
59
+ }, /*#__PURE__*/React.createElement(Text, {
60
+ style: css(labelStyle)
61
+ }, children)));
59
62
  return /*#__PURE__*/React.createElement(TabBase, _extends({
60
- pressEffect: pressEffect,
61
- style: tabBaseStyle,
62
- vertical: vertical
63
+ style: tabBaseStyle
63
64
  }, otherProps), /*#__PURE__*/React.createElement(View, {
64
65
  onLayout: onTabInnerLayout,
65
66
  style: tabInnerStyle
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","Text","View","Badge","Spacer","TabBase","css","StyleSheet","useTheme","cloneElementSafely","useVariantStyleMap","styles","create","root","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","variant","style","styleProp","onTabInnerLayout","otherProps","theme","vertical","container","containerStyle","inner","innerStyle","label","labelStyle","tabBaseStyle","tabInnerStyle","pressEffect","iconColor","palette","strong","base","iconElement","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,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,IAAnB,EAAyBC,IAAzB,QAAqC,cAArC;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,MAAP,MAAmB,WA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IAAI,GAAGE,QAAQ,GAAIC,YAAY,IAAIF,WAApB,GAAmCA,WAAxD;EACA,MAAMmB,SAAS,GAAGlB,QAAQ,GAAGO,KAAK,CAACY,OAAN,CAAcrB,IAAd,CAAmBsB,MAAtB,GAA+Bb,KAAK,CAACY,OAAN,CAAcrB,IAAd,CAAmBuB,IAA5E;EACA,MAAMC,WAAW,GAAGvC,kBAAkB,CAACe,IAAD,EAAO;IAAEyB,IAAI,EAAEL;EAAR,CAAP,CAAtC;EAEA,MAAMM,UAAU,GAAG,OAAO5B,QAAP,KAAoB,QAApB,GACfb,kBAAkB,CAACa,QAAD,EAAW;IACzBI;EADyB,CAAX,CADH,gBAKf,oBAAC,KAAD,CAAO,QAAP,QACKsB,WAAW,gBACR,oBAAC,KAAD,CAAO,QAAP,qBACI,oBAAC,KAAD;IAAO,SAAS,EAAE,CAAC3B;EAAnB,GACK2B,WADL,CADJ,eAKI,oBAAC,MAAD;IAAQ,IAAI,EAAE;EAAd,EALJ,CADQ,GAQR,IATR,eAWI,oBAAC,IAAD;IAAM,KAAK,EAAE1C,GAAG,CAACkC,UAAD;EAAhB,GACKlB,QADL,CAXJ,CALJ;EAsBA,oBACI,oBAAC,OAAD;IACI,WAAW,EAAEqB,WADjB;IAEI,KAAK,EAAEF,YAFX;IAGI,QAAQ,EAAEP;EAHd,GAIQF,UAJR,gBAMI,oBAAC,IAAD;IAAM,QAAQ,EAAED,gBAAhB;IAAkC,KAAK,EAAEW;EAAzC,GACKQ,UADL,CANJ,CADJ;AAYH;AAAA"}
1
+ {"version":3,"names":["React","Platform","Text","View","Badge","TabBase","css","StyleSheet","cloneElementSafely","useVariantStyleMap","styles","create","root","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","size","variant","style","styleProp","onTabInnerLayout","otherProps","container","containerStyle","iconContainer","iconContainerStyle","inner","innerStyle","label","labelStyle","tabBaseStyle","tabInnerStyle","iconElement","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 { 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 selected = false,\n selectedIcon,\n size = 'medium' as TabSize,\n variant = 'default' as TabVariant,\n style: styleProp,\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);\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 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}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,GAAG,CAAC,CACtBI,MAAM,CAACK,WADe,EAEtBuB,UAFsB,CAAD,CAAzB;EAKA,MAAMf,IAAI,GAAGE,QAAQ,GAAIC,YAAY,IAAIF,WAApB,GAAmCA,WAAxD;EACA,MAAMmB,WAAW,GAAGnC,kBAAkB,CAACe,IAAD,CAAtC;EAEA,MAAMqB,UAAU,GAAG,OAAOvB,QAAP,KAAoB,QAApB,GACfb,kBAAkB,CAACa,QAAD,EAAW;IACzBI;EADyB,CAAX,CADH,gBAKf,oBAAC,KAAD,CAAO,QAAP,QACKkB,WAAW,gBACR,oBAAC,KAAD,CAAO,QAAP,qBACI,oBAAC,KAAD;IACI,gBAAgB,EAAE,CAAC,CADvB;IAEI,SAAS,EAAE,CAACvB,YAFhB;IAGI,cAAc,EAAE,CAAC;EAHrB,gBAKI,oBAAC,IAAD;IAAM,KAAK,EAAEgB;EAAb,GACKO,WADL,CALJ,CADJ,eAWI,oBAAC,IAAD;IAAM,KAAK,EAAErC,GAAG,CAACkC,UAAD;EAAhB,GACKnB,QADL,CAXJ,CADQ,gBAiBR,oBAAC,KAAD;IACI,gBAAgB,EAAE,CAAC,CADvB;IAEI,SAAS,EAAE,CAACD,YAFhB;IAGI,cAAc,EAAE;EAHpB,gBAKI,oBAAC,IAAD;IAAM,KAAK,EAAEd,GAAG,CAACkC,UAAD;EAAhB,GACKnB,QADL,CALJ,CAlBR,CALJ;EAoCA,oBACI,oBAAC,OAAD;IACI,KAAK,EAAEoB;EADX,GAEQT,UAFR,gBAII,oBAAC,IAAD;IAAM,QAAQ,EAAED,gBAAhB;IAAkC,KAAK,EAAEW;EAAzC,GACKE,UADL,CAJJ,CADJ;AAUH;AAAA"}
@@ -1,2 +1,3 @@
1
- export const tabVariants = ['default', 'circular', 'bottom-navigation'];
1
+ export const tabSizes = ['small', 'medium'];
2
+ export const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'];
2
3
  //# sourceMappingURL=TabProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tabVariants"],"sources":["TabProps.ts"],"sourcesContent":["import React from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport type { TabBaseProps } from '../TabBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport const tabVariants = ['default', 'circular', 'bottom-navigation'] as const;\nexport type TabVariant = typeof tabVariants[number];\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 | React.ReactElement;\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 'default'\n */\n variant?: TabVariant;\n\n /**\n * Function to be passed to the child component's onLayout prop.\n */\n onTabInnerLayout?: (event: LayoutChangeEvent) => void;\n}> {}\n"],"mappings":"AAKA,OAAO,MAAMA,WAAW,GAAG,CAAC,SAAD,EAAY,UAAZ,EAAwB,mBAAxB,CAApB"}
1
+ {"version":3,"names":["tabSizes","tabVariants"],"sources":["TabProps.ts"],"sourcesContent":["import React from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport type { TabBaseProps } from '../TabBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport const tabSizes = ['small', 'medium'] as const;\nexport type TabSize = typeof tabSizes[number];\n\nexport const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'] as const;\nexport type TabVariant = typeof tabVariants[number];\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 | React.ReactElement;\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 size of the Tab.\n * @default 'medium'\n */\n size?: TabSize;\n\n /**\n * The variant to use.\n * @default 'default'\n */\n variant?: TabVariant;\n\n /**\n * Function to be passed to the child component's onLayout prop.\n */\n onTabInnerLayout?: (event: LayoutChangeEvent) => void;\n}> {}\n"],"mappings":"AAKA,OAAO,MAAMA,QAAQ,GAAG,CAAC,OAAD,EAAU,QAAV,CAAjB;AAGP,OAAO,MAAMC,WAAW,GAAG,CAAC,SAAD,EAAY,UAAZ,EAAwB,eAAxB,EAAyC,mBAAzC,CAApB"}
@@ -1,2 +1,3 @@
1
1
  export { default } from './Tab';
2
+ export { tabSizes, tabVariants } from './TabProps';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabVariant } from './TabProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB"}
1
+ {"version":3,"names":["default","tabSizes","tabVariants"],"sources":["index.ts"],"sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabSize, TabVariant } from './TabProps';\nexport { tabSizes, tabVariants } from './TabProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,QAAT,EAAmBC,WAAnB,QAAsC,YAAtC"}
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
  import { typographyOf } from '@fountain-ui/styles';
3
3
  import { createFontStyle, useTheme } from '../styles';
4
- export default function useVariantStyleMap(variant, selected) {
4
+ export default function useVariantStyleMap(variant, selected, size) {
5
5
  const theme = useTheme();
6
6
  return useMemo(() => {
7
7
  switch (variant) {
@@ -14,17 +14,48 @@ export default function useVariantStyleMap(variant, selected) {
14
14
  inner: {
15
15
  backgroundColor: selected ? theme.palette.fill.base : theme.palette.fill.weaker,
16
16
  borderRadius: theme.shape.radius.full,
17
- paddingHorizontal: theme.spacing(4),
18
- paddingVertical: theme.spacing(1.75)
17
+ flexDirection: 'row',
18
+ gap: 5,
19
+ paddingBottom: 7.5,
20
+ paddingHorizontal: 14,
21
+ paddingTop: 6.5
22
+ },
23
+ label: createFontStyle(theme, {
24
+ selector: _ => typographyOf({
25
+ fontSize: size === 'small' ? 14 : 15,
26
+ lineHeight: size === 'small' ? 18.2 : 19.5,
27
+ fontFamily: 'PretendardStd-SemiBold',
28
+ letterSpacing: 0
29
+ }),
30
+ color: selected ? theme.palette.text.strongInverse : theme.palette.text.base
31
+ })
32
+ };
33
+
34
+ case 'circular-home':
35
+ return {
36
+ container: {
37
+ paddingBottom: 4,
38
+ paddingHorizontal: 3
39
+ },
40
+ inner: {
41
+ backgroundColor: selected ? theme.palette.fill.base : theme.palette.surface.base,
42
+ borderRadius: theme.shape.radius.full,
43
+ borderWidth: selected ? undefined : 0.5,
44
+ borderColor: selected ? undefined : theme.palette.border.weak,
45
+ flexDirection: 'row',
46
+ gap: 5,
47
+ paddingBottom: 7.5,
48
+ paddingHorizontal: 14,
49
+ paddingTop: 6.5
19
50
  },
20
51
  label: createFontStyle(theme, {
21
52
  selector: _ => typographyOf({
22
53
  fontSize: 14,
23
54
  lineHeight: 18.2,
24
- fontFamily: 'Pretendard-SemiBold',
25
- letterSpacing: 0
55
+ fontFamily: 'LexendDeca-Medium',
56
+ letterSpacing: -0.28
26
57
  }),
27
- color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong
58
+ color: selected ? theme.palette.text.strongInverse : theme.palette.text.base
28
59
  })
29
60
  };
30
61
 
@@ -34,15 +65,22 @@ export default function useVariantStyleMap(variant, selected) {
34
65
  alignItems: 'center',
35
66
  height: 49,
36
67
  justifyContent: 'flex-start',
37
- paddingTop: theme.spacing(2.625),
68
+ paddingTop: 10.5,
38
69
  width: 48
39
70
  },
71
+ iconContainer: {
72
+ padding: 0.75
73
+ },
74
+ inner: {
75
+ flexDirection: 'column',
76
+ gap: 4.75
77
+ },
40
78
  label: createFontStyle(theme, {
41
79
  selector: _ => typographyOf({
42
- fontSize: 10,
43
- lineHeight: 10,
44
- fontFamily: 'Pretendard-Medium',
45
- letterSpacing: -0.1
80
+ fontSize: 10.5,
81
+ lineHeight: 10.5,
82
+ fontFamily: 'PretendardStd-Medium',
83
+ letterSpacing: -0.105
46
84
  }),
47
85
  color: selected ? theme.palette.text.strong : theme.palette.text.base
48
86
  })
@@ -52,19 +90,25 @@ export default function useVariantStyleMap(variant, selected) {
52
90
  default:
53
91
  return {
54
92
  container: {
55
- padding: theme.spacing(2.5)
93
+ paddingHorizontal: 10
94
+ },
95
+ inner: {
96
+ flexDirection: 'row',
97
+ gap: 5,
98
+ paddingHorizontal: 1,
99
+ paddingVertical: 10
56
100
  },
57
101
  label: createFontStyle(theme, {
58
102
  selector: _ => typographyOf({
59
- fontSize: 15,
60
- lineHeight: 18.75,
61
- fontFamily: 'Pretendard-SemiBold',
103
+ fontSize: size === 'small' ? 15 : 16,
104
+ lineHeight: size === 'small' ? 18.75 : 20,
105
+ fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',
62
106
  letterSpacing: 0
63
107
  }),
64
108
  color: selected ? theme.palette.text.strong : theme.palette.text.base
65
109
  })
66
110
  };
67
111
  }
68
- }, [theme, variant, selected]);
112
+ }, [theme, variant, selected, size]);
69
113
  }
70
114
  //# sourceMappingURL=useVariantStyleMap.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","typographyOf","createFontStyle","useTheme","useVariantStyleMap","variant","selected","theme","container","paddingHorizontal","spacing","paddingVertical","inner","backgroundColor","palette","fill","base","weaker","borderRadius","shape","radius","full","label","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","strong","alignItems","height","justifyContent","paddingTop","width","padding"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TabVariant } from './TabProps';\n\ninterface VariantStyle {\n container: FountainUiStyle;\n inner?: FountainUiStyle;\n label: TextStyle;\n}\n\nexport default function useVariantStyleMap(variant: TabVariant, selected: boolean): VariantStyle {\n const theme = useTheme();\n\n return useMemo<VariantStyle>(() => {\n switch (variant) {\n case 'circular':\n return {\n container: {\n paddingHorizontal: theme.spacing(0.75),\n paddingVertical: theme.spacing(1),\n },\n inner: {\n backgroundColor: selected\n ? theme.palette.fill.base\n : theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(1.75),\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: selected\n ? theme.palette.text.strongInverse\n : theme.palette.text.strong,\n }),\n };\n case 'bottom-navigation':\n return {\n container: {\n alignItems: 'center',\n height: 49,\n justifyContent: 'flex-start',\n paddingTop: theme.spacing(2.625),\n width: 48,\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 10,\n lineHeight: 10,\n fontFamily: 'Pretendard-Medium',\n letterSpacing: -0.1,\n }),\n color: selected\n ? theme.palette.text.strong\n : theme.palette.text.base,\n }),\n };\n case 'default':\n default:\n return {\n container: {\n padding: theme.spacing(2.5),\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 15,\n lineHeight: 18.75,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: selected\n ? theme.palette.text.strong\n : theme.palette.text.base,\n }),\n };\n }\n }, [theme, variant, selected]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAGA,SAASC,YAAT,QAA6B,qBAA7B;A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7B,KAAK,CAACG,OAAN,CAAc,KAAd,CAJL;YAKP2B,KAAK,EAAE;UALA,CADR;UAQHf,KAAK,EAAEpB,eAAe,CAACK,KAAD,EAAQ;YAC1BgB,QAAQ,EAAGC,CAAD,IAAOvB,YAAY,CAAC;cAC1BwB,QAAQ,EAAE,EADgB;cAE1BC,UAAU,EAAE,EAFc;cAG1BC,UAAU,EAAE,mBAHc;cAI1BC,aAAa,EAAE,CAAC;YAJU,CAAD,CADH;YAO1BC,KAAK,EAAEvB,QAAQ,GACTC,KAAK,CAACO,OAAN,CAAcgB,IAAd,CAAmBE,MADV,GAETzB,KAAK,CAACO,OAAN,CAAcgB,IAAd,CAAmBd;UATC,CAAR;QARnB,CAAP;;MAoBJ,KAAK,SAAL;MACA;QACI,OAAO;UACHR,SAAS,EAAE;YACP8B,OAAO,EAAE/B,KAAK,CAACG,OAAN,CAAc,GAAd;UADF,CADR;UAIHY,KAAK,EAAEpB,eAAe,CAACK,KAAD,EAAQ;YAC1BgB,QAAQ,EAAGC,CAAD,IAAOvB,YAAY,CAAC;cAC1BwB,QAAQ,EAAE,EADgB;cAE1BC,UAAU,EAAE,KAFc;cAG1BC,UAAU,EAAE,qBAHc;cAI1BC,aAAa,EAAE;YAJW,CAAD,CADH;YAO1BC,KAAK,EAAEvB,QAAQ,GACTC,KAAK,CAACO,OAAN,CAAcgB,IAAd,CAAmBE,MADV,GAETzB,KAAK,CAACO,OAAN,CAAcgB,IAAd,CAAmBd;UATC,CAAR;QAJnB,CAAP;IAlDR;EAmEH,CApEa,EAoEX,CAACT,KAAD,EAAQF,OAAR,EAAiBC,QAAjB,CApEW,CAAd;AAqEH"}
1
+ {"version":3,"names":["useMemo","typographyOf","createFontStyle","useTheme","useVariantStyleMap","variant","selected","size","theme","container","paddingHorizontal","spacing","paddingVertical","inner","backgroundColor","palette","fill","base","weaker","borderRadius","shape","radius","full","flexDirection","gap","paddingBottom","paddingTop","label","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","surface","borderWidth","undefined","borderColor","border","weak","alignItems","height","justifyContent","width","iconContainer","padding","strong"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TabSize, TabVariant } from './TabProps';\n\ninterface VariantStyle {\n container: FountainUiStyle;\n iconContainer?: FountainUiStyle;\n inner?: FountainUiStyle;\n label: TextStyle;\n}\n\nexport default function useVariantStyleMap(variant: TabVariant, selected: boolean, size: TabSize): VariantStyle {\n const theme = useTheme();\n\n return useMemo<VariantStyle>(() => {\n switch (variant) {\n case 'circular':\n return {\n container: {\n paddingHorizontal: theme.spacing(0.75),\n paddingVertical: theme.spacing(1),\n },\n inner: {\n backgroundColor: selected\n ? theme.palette.fill.base\n : theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n flexDirection: 'row',\n gap: 5,\n paddingBottom: 7.5,\n paddingHorizontal: 14,\n paddingTop: 6.5,\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: size === 'small' ? 14 : 15,\n lineHeight: size === 'small' ? 18.2 : 19.5,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: selected\n ? theme.palette.text.strongInverse\n : theme.palette.text.base,\n }),\n };\n case 'circular-home':\n return {\n container: {\n paddingBottom: 4,\n paddingHorizontal: 3,\n },\n inner: {\n backgroundColor: selected\n ? theme.palette.fill.base\n : theme.palette.surface.base,\n borderRadius: theme.shape.radius.full,\n borderWidth: selected ? undefined : 0.5,\n borderColor: selected ? undefined : theme.palette.border.weak,\n flexDirection: 'row',\n gap: 5,\n paddingBottom: 7.5,\n paddingHorizontal: 14,\n paddingTop: 6.5,\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'LexendDeca-Medium',\n letterSpacing: -0.28,\n }),\n color: selected\n ? theme.palette.text.strongInverse\n : theme.palette.text.base,\n }),\n };\n case 'bottom-navigation':\n return {\n container: {\n alignItems: 'center',\n height: 49,\n justifyContent: 'flex-start',\n paddingTop: 10.5,\n width: 48,\n },\n iconContainer: {\n padding: 0.75,\n },\n inner: {\n flexDirection: 'column',\n gap: 4.75,\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 10.5,\n lineHeight: 10.5,\n fontFamily: 'PretendardStd-Medium',\n letterSpacing: -0.105,\n }),\n color: selected\n ? theme.palette.text.strong\n : theme.palette.text.base,\n }),\n };\n case 'default':\n default:\n return {\n container: {\n paddingHorizontal: 10,\n },\n inner: {\n flexDirection: 'row',\n gap: 5,\n paddingHorizontal: 1,\n paddingVertical: 10,\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: size === 'small' ? 15 : 16,\n lineHeight: size === 'small' ? 18.75 : 20,\n fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',\n letterSpacing: 0,\n }),\n color: selected\n ? theme.palette.text.strong\n : theme.palette.text.base,\n }),\n };\n }\n }, [theme, variant, selected, size]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAGA,SAASC,YAAT,QAA6B,qBAA7B;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;AAUA,eAAe,SAASC,kBAAT,CAA4BC,OAA5B,EAAiDC,QAAjD,EAAoEC,IAApE,EAAiG;EAC5G,MAAMC,KAAK,GAAGL,QAAQ,EAAtB;EAEA,OAAOH,OAAO,CAAe,MAAM;IAC/B,QAAQK,OAAR;MACI,KAAK,UAAL;QACI,OAAO;UACHI,SAAS,EAAE;YACPC,iBAAiB,EAAEF,KAAK,CAACG,OAAN,CAAc,IAAd,CADZ;YAEPC,eAAe,EAAEJ,KAAK,CAACG,OAAN,CAAc,CAAd;UAFV,CADR;UAKHE,KAAK,EAAE;YACHC,eA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R;QAfnB,CAAP;;MA2BJ,KAAK,SAAL;MACA;QACI,OAAO;UACHR,SAAS,EAAE;YACPC,iBAAiB,EAAE;UADZ,CADR;UAIHG,KAAK,EAAE;YACHU,aAAa,EAAE,KADZ;YAEHC,GAAG,EAAE,CAFF;YAGHd,iBAAiB,EAAE,CAHhB;YAIHE,eAAe,EAAE;UAJd,CAJJ;UAUHe,KAAK,EAAEzB,eAAe,CAACM,KAAD,EAAQ;YAC1BoB,QAAQ,EAAGC,CAAD,IAAO5B,YAAY,CAAC;cAC1B6B,QAAQ,EAAEvB,IAAI,KAAK,OAAT,GAAmB,EAAnB,GAAwB,EADR;cAE1BwB,UAAU,EAAExB,IAAI,KAAK,OAAT,GAAmB,KAAnB,GAA2B,EAFb;cAG1ByB,UAAU,EAAE1B,QAAQ,GAAG,wBAAH,GAA8B,sBAHxB;cAI1B2B,aAAa,EAAE;YAJW,CAAD,CADH;YAO1BC,KAAK,EAAE5B,QAAQ,GACTE,KAAK,CAACO,OAAN,CAAcoB,IAAd,CAAmBc,MADV,GAETzC,KAAK,CAACO,OAAN,CAAcoB,IAAd,CAAmBlB;UATC,CAAR;QAVnB,CAAP;IA3FR;EAkHH,CAnHa,EAmHX,CAACT,KAAD,EAAQH,OAAR,EAAiBC,QAAjB,EAA2BC,IAA3B,CAnHW,CAAd;AAoHH"}
@@ -9,12 +9,6 @@ const useStyles = function () {
9
9
  root: {
10
10
  alignItems: 'center',
11
11
  justifyContent: 'center'
12
- },
13
- row: {
14
- flexDirection: 'row'
15
- },
16
- column: {
17
- flexDirection: 'column'
18
12
  }
19
13
  };
20
14
  };
@@ -25,7 +19,6 @@ export default function TabBase(props) {
25
19
  disabled = false,
26
20
  onPress,
27
21
  selected = false,
28
- vertical = false,
29
22
  style,
30
23
  ...otherProps
31
24
  } = props;
@@ -33,7 +26,7 @@ export default function TabBase(props) {
33
26
  return /*#__PURE__*/React.createElement(ButtonBase, _extends({
34
27
  onPress: onPress,
35
28
  disabled: disabled,
36
- style: css([styles.root, vertical ? styles.column : styles.row, style])
29
+ style: css([styles.root, style])
37
30
  }, otherProps), children);
38
31
  }
39
32
  ;
@@ -1 +1 @@
1
- {"version":3,"names":["React","css","ButtonBase","useStyles","root","alignItems","justifyContent","row","flexDirection","column","TabBase","props","children","disabled","onPress","selected","vertical","style","otherProps","styles"],"sources":["TabBase.tsx"],"sourcesContent":["import React from 'react';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/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 return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\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,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,GAAT,QAAuD,qBAAvD;AACA,OAAOC,UAAP,MAAuB,eAAvB;;AAKA,MAAMC,SAAmC,GAAG,YAA2B;EACnE,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,cAAc,EAAE;IAFd,CADH;IAKHC,GAAG,EAAE;MACDC,aAAa,EAAE;IADd,CALF;IAQHC,MAAM,EAAE;MACJD,aAAa,EAAE;IADX;EARL,CAAP;AAYH,CAbD;;AAeA,eAAe,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,GAAGhB,SAAS,EAAxB;EAEA,oBACI,oBAAC,UAAD;IACI,OAAO,EAAEW,OADb;IAEI,QAAQ,EAAED,QAFd;IAGI,KAAK,EAAEZ,GAAG,CAAC,CACPkB,MAAM,CAACf,IADA,EAEPY,QAAQ,GAAGG,MAAM,CAACV,MAAV,GAAmBU,MAAM,CAACZ,GAF3B,EAGPU,KAHO,CAAD;EAHd,GAQQC,UARR,GAUKN,QAVL,CADJ;AAcH;AAAA"}
1
+ {"version":3,"names":["React","css","ButtonBase","useStyles","root","alignItems","justifyContent","TabBase","props","children","disabled","onPress","selected","style","otherProps","styles"],"sources":["TabBase.tsx"],"sourcesContent":["import React from 'react';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport type TabBaseProps from './TabBaseProps';\n\ntype TabBaseStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<TabBaseStyles> = function (): TabBaseStyles {\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n };\n};\n\nexport default function TabBase(props: TabBaseProps) {\n const {\n children,\n disabled = false,\n onPress,\n selected = 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 style,\n ])}\n {...otherProps}\n >\n {children}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,GAAT,QAAuD,qBAAvD;AACA,OAAOC,UAAP,MAAuB,eAAvB;;AAKA,MAAMC,SAAmC,GAAG,YAA2B;EACnE,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,cAAc,EAAE;IAFd;EADH,CAAP;AAMH,CAPD;;AASA,eAAe,SAASC,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QADE;IAEFC,QAAQ,GAAG,KAFT;IAGFC,OAHE;IAIFC,QAAQ,GAAG,KAJT;IAKFC,KALE;IAMF,GAAGC;EAND,IAOFN,KAPJ;EASA,MAAMO,MAAM,GAAGZ,SAAS,EAAxB;EAEA,oBACI,oBAAC,UAAD;IACI,OAAO,EAAEQ,OADb;IAEI,QAAQ,EAAED,QAFd;IAGI,KAAK,EAAET,GAAG,CAAC,CACPc,MAAM,CAACX,IADA,EAEPS,KAFO,CAAD;EAHd,GAOQC,UAPR,GASKL,QATL,CADJ;AAaH;AAAA"}
@@ -1 +1 @@
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
+ {"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"],"mappings":""}
@@ -10,6 +10,7 @@ import useTabInnerContentsWidth from './useTabInnerContentsWidth';
10
10
  import useIndexStore from './useIndexStore';
11
11
  import InternalContext from './InternalContext';
12
12
  import { isEveryTabCoordinatesDefined } from './utils';
13
+ import useTabsStyle from './useTabsStyle';
13
14
 
14
15
  const useStyles = function () {
15
16
  const theme = useTheme();
@@ -21,9 +22,6 @@ const useStyles = function () {
21
22
  fixedTab: {
22
23
  flex: 1
23
24
  },
24
- scrollableContainer: {
25
- paddingHorizontal: theme.spacing(1)
26
- },
27
25
  bottomDivider: {
28
26
  borderBottomColor: theme.palette.border.base,
29
27
  borderBottomWidth: 0.5
@@ -46,6 +44,7 @@ const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
46
44
  scrollable = false,
47
45
  scrollViewContentContainerStyle,
48
46
  showDivider = false,
47
+ size = 'medium',
49
48
  style,
50
49
  variant = 'default',
51
50
  UNSTABLE_sharedIndex,
@@ -57,6 +56,9 @@ const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
57
56
  const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;
58
57
  const realInitialIndex = sharedIndex.initialValue;
59
58
  const currentIndexRef = useRef(initialIndex);
59
+ const {
60
+ container: containerStyle
61
+ } = useTabsStyle(variant, size);
60
62
 
61
63
  const setTab = newIndex => {
62
64
  const currentIndex = currentIndexRef.current;
@@ -147,6 +149,7 @@ const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
147
149
  onLayout,
148
150
  onPress,
149
151
  onMouseDown,
152
+ size,
150
153
  variant,
151
154
  indicatorSize,
152
155
  style: scrollable ? undefined : styles.fixedTab
@@ -171,13 +174,13 @@ const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
171
174
  indexStore
172
175
  }
173
176
  }, /*#__PURE__*/React.createElement(View, {
174
- style: css([styles.root, {
177
+ style: css([styles.root, containerStyle, {
175
178
  backgroundColor: backgroundColorMap[color]
176
179
  }, showDivider ? styles.bottomDivider : undefined, scrollable ? undefined : styles.fixedRoot, style])
177
180
  }, scrollable ? /*#__PURE__*/React.createElement(ScrollableTabsView, {
178
181
  automaticallyAdjustContentInsets: false,
179
182
  bounces: false,
180
- contentContainerStyle: css([styles.scrollableContainer, scrollViewContentContainerStyle]),
183
+ contentContainerStyle: css([scrollViewContentContainerStyle]),
181
184
  coordinates: coordinates,
182
185
  directionalLockEnabled: true,
183
186
  horizontal: true,
@@ -1 +1 @@
1
- {"version":3,"names":["React","cloneElement","forwardRef","useEffect","useImperativeHandle","useMemo","useRef","View","css","useTheme","useSyncAnimatedValue","TabIndicator","ScrollableTabsView","IndexAwareTab","useTabCoordinates","useTabInnerContentsWidth","useIndexStore","InternalContext","isEveryTabCoordinatesDefined","useStyles","theme","root","fixedRoot","flexDirection","fixedTab","flex","scrollableContainer","paddingHorizontal","spacing","bottomDivider","borderBottomColor","palette","border","base","borderBottomWidth","Tabs","props","ref","children","color","initialIndex","disableIndicator","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","showDivider","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","initialValue","sharedIndex","realInitialIndex","currentIndexRef","setTab","newIndex","currentIndex","current","animatedValue","setValue","styles","outerCoordinates","updateCoordinate","innerContentsWidthList","updateInnerContentsWidth","canRenderIndicator","indexStore","coordinates","length","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","subscribe","tabElements","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","enableIndicator","undefined","filter","Boolean","tabIndicator","backgroundColorMap","default","background","alt","backgroundColor"],"sources":["Tabs.tsx"],"sourcesContent":["import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport type { GestureResponderEvent, LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport { useSyncAnimatedValue } from '../hooks';\nimport type { TabVariant } from '../Tab';\nimport type TabsProps from './TabsProps';\nimport type { TabsColor } from './TabsProps';\nimport type { TabsInstance } from './types';\nimport TabIndicator from './TabIndicator';\nimport ScrollableTabsView from './ScrollableTabsView';\nimport IndexAwareTab from './IndexAwareTab';\nimport useTabCoordinates from './useTabCoordinates';\nimport useTabInnerContentsWidth from './useTabInnerContentsWidth';\nimport useIndexStore from './useIndexStore';\nimport InternalContext from './InternalContext';\nimport { isEveryTabCoordinatesDefined } from './utils';\n\ntype TabsStyleKeys =\n | 'root'\n | 'fixedRoot'\n | 'fixedTab'\n | 'scrollableContainer'\n | 'bottomDivider';\n\ntype TabsStyles = NamedStylesStringUnion<TabsStyleKeys>;\n\nconst useStyles: UseStyles<TabsStyles> = function (): TabsStyles {\n const theme = useTheme();\n\n return {\n root: {},\n fixedRoot: {\n flexDirection: 'row',\n },\n fixedTab: {\n flex: 1,\n },\n scrollableContainer: {\n paddingHorizontal: theme.spacing(1),\n },\n bottomDivider: {\n borderBottomColor: theme.palette.border.base,\n borderBottomWidth: 0.5,\n },\n };\n};\n\nconst Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {\n const {\n children,\n color = 'default',\n initialIndex = 0,\n disableIndicator = false,\n indicatorSize = 'fit-content',\n keyboardDismissMode = 'none',\n keyboardShouldPersistTaps = 'never',\n onChange,\n scrollable = false,\n scrollViewContentContainerStyle,\n showDivider = false,\n style,\n variant = 'default' as TabVariant,\n UNSTABLE_sharedIndex,\n onTabSelected,\n } = props;\n\n const fallbackSharedIndex = useSyncAnimatedValue({ initialValue: initialIndex });\n const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;\n const realInitialIndex = sharedIndex.initialValue;\n\n const currentIndexRef = useRef(initialIndex);\n\n const setTab = (newIndex: number) => {\n const currentIndex = currentIndexRef.current;\n onTabSelected?.(newIndex, currentIndex);\n\n sharedIndex.animatedValue.setValue(newIndex);\n };\n\n useImperativeHandle(\n ref,\n () => ({\n setTab,\n }),\n [sharedIndex],\n );\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const [outerCoordinates, updateCoordinate] = useTabCoordinates(children);\n const [innerContentsWidthList, updateInnerContentsWidth] = useTabInnerContentsWidth(children);\n\n const canRenderIndicator = indicatorSize === 'fit-content'\n ? isEveryTabCoordinatesDefined(innerContentsWidthList, children)\n : isEveryTabCoordinatesDefined(outerCoordinates, children);\n\n const indexStore = useIndexStore(sharedIndex);\n\n const coordinates = useMemo(() => {\n if (outerCoordinates.length === 0) {\n return [];\n }\n\n if (indicatorSize !== 'fit-content') {\n return outerCoordinates;\n }\n\n return innerContentsWidthList.map((innerContentWidth, idx) => {\n const { x1: outerX1, x2: outerX2 } = outerCoordinates[idx];\n\n const tabWidth = outerX2 - outerX1;\n const distanceFromParent = (tabWidth - innerContentWidth) / 2;\n const indicatorStartCoordinate = outerX1 + distanceFromParent;\n\n return {\n x1: indicatorStartCoordinate,\n x2: indicatorStartCoordinate + innerContentWidth,\n };\n });\n }, [outerCoordinates, innerContentsWidthList]);\n\n useEffect(() => {\n return indexStore.subscribe(newIndex => {\n onChange?.(newIndex);\n currentIndexRef.current = newIndex;\n });\n }, [indexStore, onChange]);\n\n const tabElements = React.Children.map(children, (child, index) => {\n if (!child) {\n return null;\n }\n\n const onTabInnerLayout = (event: LayoutChangeEvent) => {\n const { width } = event.nativeEvent.layout;\n\n updateInnerContentsWidth(index, width);\n };\n\n const onLayout = (event: LayoutChangeEvent) => {\n const { x, width } = event.nativeEvent.layout;\n\n updateCoordinate(index, x, width);\n\n // @ts-ignore\n child.props.onLayout?.(event);\n };\n\n const onMouseDown = (e: GestureResponderEvent) => {\n if (keyboardShouldPersistTaps === 'always') {\n e.preventDefault();\n }\n };\n\n const onPress = () => {\n setTab(index);\n\n // @ts-ignore\n child.props.onPress?.();\n };\n\n // @ts-ignore\n const tabElement = cloneElement(child, {\n enableIndicator: !disableIndicator && !canRenderIndicator,\n onTabInnerLayout,\n onLayout,\n onPress,\n onMouseDown,\n variant,\n indicatorSize,\n style: scrollable ? undefined : styles.fixedTab,\n });\n\n return (\n <IndexAwareTab\n children={tabElement}\n index={index}\n initialIndex={realInitialIndex}\n />\n );\n })?.filter(Boolean);\n\n const tabIndicator = canRenderIndicator ? (\n <TabIndicator\n coordinates={coordinates}\n disabled={disableIndicator}\n initialIndex={realInitialIndex}\n />\n ) : null;\n\n const backgroundColorMap: Record<TabsColor, string> = {\n default: theme.palette.background.base,\n alt: theme.palette.background.alt,\n };\n\n return (\n <InternalContext.Provider value={{ indexStore }}>\n <View\n style={css([\n styles.root,\n { backgroundColor: backgroundColorMap[color] },\n showDivider ? styles.bottomDivider : undefined,\n scrollable ? undefined : styles.fixedRoot,\n style,\n ])}\n >\n {scrollable ? (\n <ScrollableTabsView\n automaticallyAdjustContentInsets={false}\n bounces={false}\n contentContainerStyle={css([\n styles.scrollableContainer,\n scrollViewContentContainerStyle,\n ])}\n coordinates={coordinates}\n directionalLockEnabled={true}\n horizontal={true}\n initialIndex={realInitialIndex}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n keyboardDismissMode={keyboardDismissMode}\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n >\n {tabElements}\n {tabIndicator}\n </ScrollableTabsView>\n ) : (\n <React.Fragment>\n {tabElements}\n {tabIndicator}\n </React.Fragment>\n )}\n </View>\n </InternalContext.Provider>\n );\n});\n\nexport default Tabs;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,YAAhB,EAA8BC,UAA9B,EAA0CC,SAA1C,EAAqDC,mBAArD,EAA0EC,OAA1E,EAAmFC,MAAnF,QAAiG,OAAjG;AAEA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;AACA,SAASC,oBAAT,QAAqC,UAArC;AAKA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,kBAAP,MAA+B,sBAA/B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,wBAAP,MAAqC,4BAArC;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,eAAP,MAA4B,mBAA5B;AACA,SAAS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EAIPvD,UAAU,GAAGuD,SAAH,GAAerC,MAAM,CAAC1C,SAJzB,EAKP2B,KALO,CAAD;EADd,GASKH,UAAU,gBACP,oBAAC,kBAAD;IACI,gCAAgC,EAAE,KADtC;IAEI,OAAO,EAAE,KAFb;IAGI,qBAAqB,EAAEtC,GAAG,CAAC,CACvBwD,MAAM,CAACtC,mBADgB,EAEvBqB,+BAFuB,CAAD,CAH9B;IAOI,WAAW,EAAEwB,WAPjB;IAQI,sBAAsB,EAAE,IAR5B;IASI,UAAU,EAAE,IAThB;IAUI,YAAY,EAAEf,gBAVlB;IAWI,YAAY,EAAE,KAXlB;IAYI,8BAA8B,EAAE,KAZpC;IAaI,4BAA4B,EAAE,KAblC;IAcI,mBAAmB,EAAEb,mBAdzB;IAeI,yBAAyB,EAAEC;EAf/B,GAiBKwC,WAjBL,EAkBKoB,YAlBL,CADO,gBAsBP,oBAAC,KAAD,CAAO,QAAP,QACKpB,WADL,EAEKoB,YAFL,CA/BR,CADJ,CADJ;AAyCH,CA/LsB,CAAvB;AAiMA,eAAerE,IAAf"}
1
+ {"version":3,"names":["React","cloneElement","forwardRef","useEffect","useImperativeHandle","useMemo","useRef","View","css","useTheme","useSyncAnimatedValue","TabIndicator","ScrollableTabsView","IndexAwareTab","useTabCoordinates","useTabInnerContentsWidth","useIndexStore","InternalContext","isEveryTabCoordinatesDefined","useTabsStyle","useStyles","theme","root","fixedRoot","flexDirection","fixedTab","flex","bottomDivider","borderBottomColor","palette","border","base","borderBottomWidth","Tabs","props","ref","children","color","initialIndex","disableIndicator","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","showDivider","size","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","initialValue","sharedIndex","realInitialIndex","currentIndexRef","container","containerStyle","setTab","newIndex","currentIndex","current","animatedValue","setValue","styles","outerCoordinates","updateCoordinate","innerContentsWidthList","updateInnerContentsWidth","canRenderIndicator","indexStore","coordinates","length","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","subscribe","tabElements","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","enableIndicator","undefined","filter","Boolean","tabIndicator","backgroundColorMap","default","background","alt","backgroundColor"],"sources":["Tabs.tsx"],"sourcesContent":["import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport type { GestureResponderEvent, LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport { useSyncAnimatedValue } from '../hooks';\nimport type { TabSize, TabVariant } from '../Tab';\nimport type TabsProps from './TabsProps';\nimport type { TabsColor } from './TabsProps';\nimport type { TabsInstance } from './types';\nimport TabIndicator from './TabIndicator';\nimport ScrollableTabsView from './ScrollableTabsView';\nimport IndexAwareTab from './IndexAwareTab';\nimport useTabCoordinates from './useTabCoordinates';\nimport useTabInnerContentsWidth from './useTabInnerContentsWidth';\nimport useIndexStore from './useIndexStore';\nimport InternalContext from './InternalContext';\nimport { isEveryTabCoordinatesDefined } from './utils';\nimport useTabsStyle from './useTabsStyle';\n\ntype TabsStyleKeys =\n | 'root'\n | 'fixedRoot'\n | 'fixedTab'\n | 'bottomDivider';\n\ntype TabsStyles = NamedStylesStringUnion<TabsStyleKeys>;\n\nconst useStyles: UseStyles<TabsStyles> = function (): TabsStyles {\n const theme = useTheme();\n\n return {\n root: {},\n fixedRoot: {\n flexDirection: 'row',\n },\n fixedTab: {\n flex: 1,\n },\n bottomDivider: {\n borderBottomColor: theme.palette.border.base,\n borderBottomWidth: 0.5,\n },\n };\n};\n\nconst Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {\n const {\n children,\n color = 'default',\n initialIndex = 0,\n disableIndicator = false,\n indicatorSize = 'fit-content',\n keyboardDismissMode = 'none',\n keyboardShouldPersistTaps = 'never',\n onChange,\n scrollable = false,\n scrollViewContentContainerStyle,\n showDivider = false,\n size = 'medium' as TabSize,\n style,\n variant = 'default' as TabVariant,\n UNSTABLE_sharedIndex,\n onTabSelected,\n } = props;\n\n const fallbackSharedIndex = useSyncAnimatedValue({ initialValue: initialIndex });\n const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;\n const realInitialIndex = sharedIndex.initialValue;\n\n const currentIndexRef = useRef(initialIndex);\n\n const { container: containerStyle } = useTabsStyle(variant, size);\n\n const setTab = (newIndex: number) => {\n const currentIndex = currentIndexRef.current;\n onTabSelected?.(newIndex, currentIndex);\n\n sharedIndex.animatedValue.setValue(newIndex);\n };\n\n useImperativeHandle(\n ref,\n () => ({\n setTab,\n }),\n [sharedIndex],\n );\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const [outerCoordinates, updateCoordinate] = useTabCoordinates(children);\n const [innerContentsWidthList, updateInnerContentsWidth] = useTabInnerContentsWidth(children);\n\n const canRenderIndicator = indicatorSize === 'fit-content'\n ? isEveryTabCoordinatesDefined(innerContentsWidthList, children)\n : isEveryTabCoordinatesDefined(outerCoordinates, children);\n\n const indexStore = useIndexStore(sharedIndex);\n\n const coordinates = useMemo(() => {\n if (outerCoordinates.length === 0) {\n return [];\n }\n\n if (indicatorSize !== 'fit-content') {\n return outerCoordinates;\n }\n\n return innerContentsWidthList.map((innerContentWidth, idx) => {\n const { x1: outerX1, x2: outerX2 } = outerCoordinates[idx];\n\n const tabWidth = outerX2 - outerX1;\n const distanceFromParent = (tabWidth - innerContentWidth) / 2;\n const indicatorStartCoordinate = outerX1 + distanceFromParent;\n\n return {\n x1: indicatorStartCoordinate,\n x2: indicatorStartCoordinate + innerContentWidth,\n };\n });\n }, [outerCoordinates, innerContentsWidthList]);\n\n useEffect(() => {\n return indexStore.subscribe(newIndex => {\n onChange?.(newIndex);\n currentIndexRef.current = newIndex;\n });\n }, [indexStore, onChange]);\n\n const tabElements = React.Children.map(children, (child, index) => {\n if (!child) {\n return null;\n }\n\n const onTabInnerLayout = (event: LayoutChangeEvent) => {\n const { width } = event.nativeEvent.layout;\n\n updateInnerContentsWidth(index, width);\n };\n\n const onLayout = (event: LayoutChangeEvent) => {\n const { x, width } = event.nativeEvent.layout;\n\n updateCoordinate(index, x, width);\n\n // @ts-ignore\n child.props.onLayout?.(event);\n };\n\n const onMouseDown = (e: GestureResponderEvent) => {\n if (keyboardShouldPersistTaps === 'always') {\n e.preventDefault();\n }\n };\n\n const onPress = () => {\n setTab(index);\n\n // @ts-ignore\n child.props.onPress?.();\n };\n\n // @ts-ignore\n const tabElement = cloneElement(child, {\n enableIndicator: !disableIndicator && !canRenderIndicator,\n onTabInnerLayout,\n onLayout,\n onPress,\n onMouseDown,\n size,\n variant,\n indicatorSize,\n style: scrollable ? undefined : styles.fixedTab,\n });\n\n return (\n <IndexAwareTab\n children={tabElement}\n index={index}\n initialIndex={realInitialIndex}\n />\n );\n })?.filter(Boolean);\n\n const tabIndicator = canRenderIndicator ? (\n <TabIndicator\n coordinates={coordinates}\n disabled={disableIndicator}\n initialIndex={realInitialIndex}\n />\n ) : null;\n\n const backgroundColorMap: Record<TabsColor, string> = {\n default: theme.palette.background.base,\n alt: theme.palette.background.alt,\n };\n\n return (\n <InternalContext.Provider value={{ indexStore }}>\n <View\n style={css([\n styles.root,\n containerStyle,\n { backgroundColor: backgroundColorMap[color] },\n showDivider ? styles.bottomDivider : undefined,\n scrollable ? undefined : styles.fixedRoot,\n style,\n ])}\n >\n {scrollable ? (\n <ScrollableTabsView\n automaticallyAdjustContentInsets={false}\n bounces={false}\n contentContainerStyle={css([\n scrollViewContentContainerStyle,\n ])}\n coordinates={coordinates}\n directionalLockEnabled={true}\n horizontal={true}\n initialIndex={realInitialIndex}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n keyboardDismissMode={keyboardDismissMode}\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n >\n {tabElements}\n {tabIndicator}\n </ScrollableTabsView>\n ) : (\n <React.Fragment>\n {tabElements}\n {tabIndicator}\n </React.Fragment>\n )}\n </View>\n </InternalContext.Provider>\n );\n});\n\nexport default Tabs;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,YAAhB,EAA8BC,UAA9B,EAA0CC,SAA1C,EAAqDC,mBAArD,EAA0EC,OAA1E,EAAmFC,MAAnF,QAAiG,OAAjG;AAEA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;AACA,SAASC,oBAAT,QAAqC,UAArC;AAKA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,kBAAP,MAA+B,sBAA/B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,wBAAP,MAAqC,4BAArC;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,eAAP,MAA4B,mBAA5B;AACA,SAASC,4BAAT,QAA6C,SAA7C;AACA,OAAOC,YAAP,MAAyB,gBAAzB;;AAUA,MAAMC,SAAgC,GAAG,YAAwB;EAC7D,MAAMC,KAAK,GAAGZ,QAAQ,EAAtB;EAEA,OAAO;IACHa,IAAI,EAAE,EADH;IAEHC,SAAS,EAAE;MACPC,aAAa,EAAE;IADR,CAFR;IAKHC,QAAQ,EAAE;MACNC,IAAI,EAAE;IADA,CALP;IAQHC,aAAa,EAAE;MACXC,iBAAiB,EAAEP,KAAK,CAACQ,OAAN,CAAcC,MAAd,CAAqBC,IAD7B;MAEXC,iBAAiB,EAAE;IAFR;EARZ,CAAP;AAaH,CAhBD;;AAkBA,MAAMC,IAAI,gBAAG/B,UAAU,CAA0B,SAAS+B,IAAT,CAAcC,KAAd,EAAqBC,GAArB,EAA0B;EAAA;;EACvE,MAAM;IACFC,QADE;IAEFC,KAAK,GAAG,SAFN;IAGFC,YAAY,GAAG,CAHb;IAIFC,gBAAgB,GAA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,YAjBL,CADO,gBAqBP,oBAAC,KAAD,CAAO,QAAP,QACKpB,WADL,EAEKoB,YAFL,CA/BR,CADJ,CADJ;AAyCH,CAnMsB,CAAvB;AAqMA,eAAexE,IAAf"}
@@ -1 +1 @@
1
- {"version":3,"names":["tabsColors","tabIndicatorSizes"],"sources":["TabsProps.ts"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { TabVariant } from '../Tab';\nimport type { ExtendedStyle, OverridableComponentProps, SyncAnimatedValue } from '../types';\nimport type { KeyboardDismissMode, KeyboardShouldPersistTaps, TabsInstance } from './types';\n\nexport const tabsColors = ['default', 'alt'] as const;\nexport type TabsColor = typeof tabsColors[number];\n\nexport const tabIndicatorSizes = ['fit-content', 'full'] as const;\nexport type TabIndicatorSize = typeof tabIndicatorSizes[number];\n\nexport default interface TabsProps extends OverridableComponentProps<ViewProps, {\n ref?: Ref<TabsInstance>;\n\n /**\n * Collection of Tab components.\n */\n children: ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'default'\n */\n color?: TabsColor;\n\n /**\n * If `true`, the indicator is disabled.\n * @default false\n */\n disableIndicator?: boolean;\n\n /**\n * The size of tab indicator.\n * 'full' adjusts the indicator to the size of the Tab,\n * while 'fit-content' adjusts the indicator to the size of the content inside the Tab.\n * @default 'fit-content'\n */\n indicatorSize?: TabIndicatorSize;\n\n /**\n * Index of initial tab that should be selected.\n * @default 0\n */\n initialIndex?: number;\n\n /**\n * keyboard dismissing condition of dragging.\n * @default 'none'\n */\n keyboardDismissMode?: KeyboardDismissMode,\n\n /**\n * keyboard persisting condition of tapping.\n * @default 'never'\n */\n keyboardShouldPersistTaps?: KeyboardShouldPersistTaps,\n\n /**\n * Callback fired when a tab is selected.\n */\n onChange?: (newIndex: number) => void;\n\n /**\n * If `true`, the component will be able to scroll.\n * @default false\n */\n scrollable?: boolean;\n\n /**\n * These styles will be applied to the scroll view content container which wraps all of the child views.\n */\n scrollViewContentContainerStyle?: ExtendedStyle | ExtendedStyle[];\n\n /**\n * Determines whether to display the bottom border.\n * @default false\n */\n showDivider?: boolean;\n\n /**\n * Unstable API.\n */\n UNSTABLE_sharedIndex?: SyncAnimatedValue;\n\n /**\n * The variant to use.\n * @default 'primary'\n */\n variant?: TabVariant;\n\n /**\n * Callback function executed when a Tab is selected.\n * Executed even if the index does not change when a Tab is pressed.\n * Receives the next tab index and the current tab index as parameters.\n */\n onTabSelected?: (newIndex: number, currentIndex: number) => void;\n}> {}\n"],"mappings":"AAMA,OAAO,MAAMA,UAAU,GAAG,CAAC,SAAD,EAAY,KAAZ,CAAnB;AAGP,OAAO,MAAMC,iBAAiB,GAAG,CAAC,aAAD,EAAgB,MAAhB,CAA1B"}
1
+ {"version":3,"names":["tabsColors","tabIndicatorSizes"],"sources":["TabsProps.ts"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { TabSize, TabVariant } from '../Tab';\nimport type { ExtendedStyle, OverridableComponentProps, SyncAnimatedValue } from '../types';\nimport type { KeyboardDismissMode, KeyboardShouldPersistTaps, TabsInstance } from './types';\n\nexport const tabsColors = ['default', 'alt'] as const;\nexport type TabsColor = typeof tabsColors[number];\n\nexport const tabIndicatorSizes = ['fit-content', 'full'] as const;\nexport type TabIndicatorSize = typeof tabIndicatorSizes[number];\n\nexport default interface TabsProps extends OverridableComponentProps<ViewProps, {\n ref?: Ref<TabsInstance>;\n\n /**\n * Collection of Tab components.\n */\n children: ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'default'\n */\n color?: TabsColor;\n\n /**\n * If `true`, the indicator is disabled.\n * @default false\n */\n disableIndicator?: boolean;\n\n /**\n * The size of tab indicator.\n * 'full' adjusts the indicator to the size of the Tab,\n * while 'fit-content' adjusts the indicator to the size of the content inside the Tab.\n * @default 'fit-content'\n */\n indicatorSize?: TabIndicatorSize;\n\n /**\n * Index of initial tab that should be selected.\n * @default 0\n */\n initialIndex?: number;\n\n /**\n * keyboard dismissing condition of dragging.\n * @default 'none'\n */\n keyboardDismissMode?: KeyboardDismissMode,\n\n /**\n * keyboard persisting condition of tapping.\n * @default 'never'\n */\n keyboardShouldPersistTaps?: KeyboardShouldPersistTaps,\n\n /**\n * Callback fired when a tab is selected.\n */\n onChange?: (newIndex: number) => void;\n\n /**\n * If `true`, the component will be able to scroll.\n * @default false\n */\n scrollable?: boolean;\n\n /**\n * These styles will be applied to the scroll view content container which wraps all of the child views.\n */\n scrollViewContentContainerStyle?: ExtendedStyle | ExtendedStyle[];\n\n /**\n * Determines whether to display the bottom border.\n * @default false\n */\n showDivider?: boolean;\n\n /**\n * The size of the Tab.\n * @default 'medium'\n */\n size?: TabSize;\n\n /**\n * Unstable API.\n */\n UNSTABLE_sharedIndex?: SyncAnimatedValue;\n\n /**\n * The variant to use.\n * @default 'primary'\n */\n variant?: TabVariant;\n\n /**\n * Callback function executed when a Tab is selected.\n * Executed even if the index does not change when a Tab is pressed.\n * Receives the next tab index and the current tab index as parameters.\n */\n onTabSelected?: (newIndex: number, currentIndex: number) => void;\n}> {}\n"],"mappings":"AAMA,OAAO,MAAMA,UAAU,GAAG,CAAC,SAAD,EAAY,KAAZ,CAAnB;AAGP,OAAO,MAAMC,iBAAiB,GAAG,CAAC,aAAD,EAAgB,MAAhB,CAA1B"}
@@ -0,0 +1,44 @@
1
+ import { useMemo } from 'react';
2
+ import { useBreakpointUp } from '../hooks';
3
+ import { useTheme } from '../styles';
4
+ export default function useTabsStyle(variant, size) {
5
+ const theme = useTheme();
6
+ const isTablet = useBreakpointUp('md', true, false);
7
+ return useMemo(() => {
8
+ switch (variant) {
9
+ case 'circular':
10
+ return {
11
+ container: {
12
+ paddingBottom: 8,
13
+ paddingHorizontal: isTablet ? 20 : size === 'small' ? 8 : 12
14
+ }
15
+ };
16
+
17
+ case 'circular-home':
18
+ return {
19
+ container: {
20
+ paddingBottom: 8,
21
+ paddingHorizontal: isTablet ? 20 : 8
22
+ }
23
+ };
24
+
25
+ case 'bottom-navigation':
26
+ return {
27
+ container: {
28
+ borderTopColor: theme.palette.border.base,
29
+ borderTopWidth: 0.5,
30
+ paddingHorizontal: 24
31
+ }
32
+ };
33
+
34
+ case 'default':
35
+ default:
36
+ return {
37
+ container: {
38
+ paddingHorizontal: isTablet ? 14 : 6
39
+ }
40
+ };
41
+ }
42
+ }, [theme, variant, isTablet, size]);
43
+ }
44
+ //# sourceMappingURL=useTabsStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMemo","useBreakpointUp","useTheme","useTabsStyle","variant","size","theme","isTablet","container","paddingBottom","paddingHorizontal","borderTopColor","palette","border","base","borderTopWidth"],"sources":["useTabsStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { useBreakpointUp } from '../hooks';\nimport { useTheme } from '../styles';\nimport type { TabSize, TabVariant } from '../Tab';\n\ninterface TabsStyle {\n container: FountainUiStyle;\n}\n\nexport default function useTabsStyle(variant: TabVariant, size: TabSize) {\n const theme = useTheme();\n\n const isTablet = useBreakpointUp('md', true, false);\n\n return useMemo<TabsStyle>(() => {\n switch (variant) {\n case 'circular':\n return {\n container: {\n paddingBottom: 8,\n paddingHorizontal: isTablet ? 20 : (size === 'small' ? 8 : 12),\n },\n };\n case 'circular-home':\n return {\n container: {\n paddingBottom: 8,\n paddingHorizontal: isTablet ? 20 : 8,\n },\n };\n case 'bottom-navigation':\n return {\n container: {\n borderTopColor: theme.palette.border.base,\n borderTopWidth: 0.5,\n paddingHorizontal: 24,\n },\n };\n case 'default':\n default:\n return {\n container: {\n paddingHorizontal: isTablet ? 14 : 6,\n },\n };\n }\n }, [theme, variant, isTablet, size]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,eAAT,QAAgC,UAAhC;AACA,SAASC,QAAT,QAAyB,WAAzB;AAOA,eAAe,SAASC,YAAT,CAAsBC,OAAtB,EAA2CC,IAA3C,EAA0D;EACrE,MAAMC,KAAK,GAAGJ,QAAQ,EAAtB;EAEA,MAAMK,QAAQ,GAAGN,eAAe,CAAC,IAAD,EAAO,IAAP,EAAa,KAAb,CAAhC;EAEA,OAAOD,OAAO,CAAY,MAAM;IAC5B,QAAQI,OAAR;MACI,KAAK,UAAL;QACI,OAAO;UACHI,SAAS,EAAE;YACPC,aAAa,EAAE,CADR;YAEPC,iBAAiB,EAAEH,QAAQ,GAAG,EAAH,GAASF,IAAI,KAAK,OAAT,GAAmB,CAAnB,GAAuB;UAFpD;QADR,CAAP;;MAMJ,KAAK,eAAL;QACI,OAAO;UACHG,SAAS,EAAE;YACPC,aAAa,EAAE,CADR;YAEPC,iBAAiB,EAAEH,QAAQ,GAAG,EAAH,GAAQ;UAF5B;QADR,CAAP;;MAMJ,KAAK,mBAAL;QACI,OAAO;UACHC,SAAS,EAAE;YACPG,cAAc,EAAEL,KAAK,CAACM,OAAN,CAAcC,MAAd,CAAqBC,IAD9B;YAEPC,cAAc,EAAE,GAFT;YAGPL,iBAAiB,EAAE;UAHZ;QADR,CAAP;;MAOJ,KAAK,SAAL;MACA;QACI,OAAO;UACHF,SAAS,EAAE;YACPE,iBAAiB,EAAEH,QAAQ,GAAG,EAAH,GAAQ;UAD5B;QADR,CAAP;IAzBR;EA+BH,CAhCa,EAgCX,CAACD,KAAD,EAAQF,OAAR,EAAiBG,QAAjB,EAA2BF,IAA3B,CAhCW,CAAd;AAiCH"}
@@ -72,7 +72,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(props, ref) {
72
72
 
73
73
  const showClearButton = showClearButtonProp ?? isSearch;
74
74
  const titleFontStyle = createFontStyle(theme, {
75
- // selector: (typography) => typography.caption1['semiBold']
75
+ selector: typography => typography.caption1['semiBold'],
76
76
  color: theme.palette.text.strong
77
77
  });
78
78
  const inputStyle = css([styles.input, variantStyles.inputStyle, Platform.OS === 'web' ? {