@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
@@ -11,7 +11,7 @@ var _styles = require("@fountain-ui/styles");
11
11
 
12
12
  var _styles2 = require("../styles");
13
13
 
14
- function useVariantStyleMap(variant, selected) {
14
+ function useVariantStyleMap(variant, selected, size) {
15
15
  const theme = (0, _styles2.useTheme)();
16
16
  return (0, _react.useMemo)(() => {
17
17
  switch (variant) {
@@ -24,17 +24,48 @@ function useVariantStyleMap(variant, selected) {
24
24
  inner: {
25
25
  backgroundColor: selected ? theme.palette.fill.base : theme.palette.fill.weaker,
26
26
  borderRadius: theme.shape.radius.full,
27
- paddingHorizontal: theme.spacing(4),
28
- paddingVertical: theme.spacing(1.75)
27
+ flexDirection: 'row',
28
+ gap: 5,
29
+ paddingBottom: 7.5,
30
+ paddingHorizontal: 14,
31
+ paddingTop: 6.5
32
+ },
33
+ label: (0, _styles2.createFontStyle)(theme, {
34
+ selector: _ => (0, _styles.typographyOf)({
35
+ fontSize: size === 'small' ? 14 : 15,
36
+ lineHeight: size === 'small' ? 18.2 : 19.5,
37
+ fontFamily: 'PretendardStd-SemiBold',
38
+ letterSpacing: 0
39
+ }),
40
+ color: selected ? theme.palette.text.strongInverse : theme.palette.text.base
41
+ })
42
+ };
43
+
44
+ case 'circular-home':
45
+ return {
46
+ container: {
47
+ paddingBottom: 4,
48
+ paddingHorizontal: 3
49
+ },
50
+ inner: {
51
+ backgroundColor: selected ? theme.palette.fill.base : theme.palette.surface.base,
52
+ borderRadius: theme.shape.radius.full,
53
+ borderWidth: selected ? undefined : 0.5,
54
+ borderColor: selected ? undefined : theme.palette.border.weak,
55
+ flexDirection: 'row',
56
+ gap: 5,
57
+ paddingBottom: 7.5,
58
+ paddingHorizontal: 14,
59
+ paddingTop: 6.5
29
60
  },
30
61
  label: (0, _styles2.createFontStyle)(theme, {
31
62
  selector: _ => (0, _styles.typographyOf)({
32
63
  fontSize: 14,
33
64
  lineHeight: 18.2,
34
- fontFamily: 'Pretendard-SemiBold',
35
- letterSpacing: 0
65
+ fontFamily: 'LexendDeca-Medium',
66
+ letterSpacing: -0.28
36
67
  }),
37
- color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong
68
+ color: selected ? theme.palette.text.strongInverse : theme.palette.text.base
38
69
  })
39
70
  };
40
71
 
@@ -44,15 +75,22 @@ function useVariantStyleMap(variant, selected) {
44
75
  alignItems: 'center',
45
76
  height: 49,
46
77
  justifyContent: 'flex-start',
47
- paddingTop: theme.spacing(2.625),
78
+ paddingTop: 10.5,
48
79
  width: 48
49
80
  },
81
+ iconContainer: {
82
+ padding: 0.75
83
+ },
84
+ inner: {
85
+ flexDirection: 'column',
86
+ gap: 4.75
87
+ },
50
88
  label: (0, _styles2.createFontStyle)(theme, {
51
89
  selector: _ => (0, _styles.typographyOf)({
52
- fontSize: 10,
53
- lineHeight: 10,
54
- fontFamily: 'Pretendard-Medium',
55
- letterSpacing: -0.1
90
+ fontSize: 10.5,
91
+ lineHeight: 10.5,
92
+ fontFamily: 'PretendardStd-Medium',
93
+ letterSpacing: -0.105
56
94
  }),
57
95
  color: selected ? theme.palette.text.strong : theme.palette.text.base
58
96
  })
@@ -62,19 +100,25 @@ function useVariantStyleMap(variant, selected) {
62
100
  default:
63
101
  return {
64
102
  container: {
65
- padding: theme.spacing(2.5)
103
+ paddingHorizontal: 10
104
+ },
105
+ inner: {
106
+ flexDirection: 'row',
107
+ gap: 5,
108
+ paddingHorizontal: 1,
109
+ paddingVertical: 10
66
110
  },
67
111
  label: (0, _styles2.createFontStyle)(theme, {
68
112
  selector: _ => (0, _styles.typographyOf)({
69
- fontSize: 15,
70
- lineHeight: 18.75,
71
- fontFamily: 'Pretendard-SemiBold',
113
+ fontSize: size === 'small' ? 15 : 16,
114
+ lineHeight: size === 'small' ? 18.75 : 20,
115
+ fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',
72
116
  letterSpacing: 0
73
117
  }),
74
118
  color: selected ? theme.palette.text.strong : theme.palette.text.base
75
119
  })
76
120
  };
77
121
  }
78
- }, [theme, variant, selected]);
122
+ }, [theme, variant, selected, size]);
79
123
  }
80
124
  //# sourceMappingURL=useVariantStyleMap.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useVariantStyleMap","variant","selected","theme","useTheme","useMemo","container","paddingHorizontal","spacing","paddingVertical","inner","backgroundColor","palette","fill","base","weaker","borderRadius","shape","radius","full","label","createFontStyle","selector","_","typographyOf","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;;AAGA;;AACA;;AASe,SAASA,kBAAT,CAA4BC,OAA5B,EAAiDC,QAAjD,EAAkF;EAC7F,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO,IAAAC,cAAA,EAAsB,MAAM;IAC/B,QAAQJ,OAAR;MACI,KAAK,UAAL;QACI,OAAO;UACHK,SAAS,EAAE;YACPC,iBAAiB,EAAEJ,KAAK,CAACK,OAAN,CAAc,IAAd,CADZ;YAEPC,eAAe,EAAEN,KAAK,CAACK,OAAN,CAAc,CAAd;UAFV,CADR;UAKHE,KAAK,EAAE;YACHC,eAAe,EAAET,QAAQ,GACnBC,KAAK,CAACS,OAAN,CAAcC,IAAd,CAAmBC,IADA,GAEnBX,KAAK,CAACS,OAAN,CAAcC,IAAd,CAAmBE,MAHtB;YAIHC,YAAY,EAAEb,KAAK,CAACc,KAAN,CAAYC,MAAZ,CAAmBC,IAJ9B;YAKHZ,iBAAiB,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd,CALhB;YAMHC,eAAe,EAAEN,KAAK,CAACK,OAAN,CAAc,IAAd;UANd,CALJ;UAaHY,KAAK,EAAE,IAAAC,wBA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UAAU,EAAE,KAFc;cAG1BC,UAAU,EAAE,qBAHc;cAI1BC,aAAa,EAAE;YAJW,CAAb,CADS;YAO1BC,KAAK,EAAE3B,QAAQ,GACTC,KAAK,CAACS,OAAN,CAAckB,IAAd,CAAmBE,MADV,GAET7B,KAAK,CAACS,OAAN,CAAckB,IAAd,CAAmBhB;UATC,CAAvB;QAJJ,CAAP;IAlDR;EAmEH,CApEM,EAoEJ,CAACX,KAAD,EAAQF,OAAR,EAAiBC,QAAjB,CApEI,CAAP;AAqEH"}
1
+ {"version":3,"names":["useVariantStyleMap","variant","selected","size","theme","useTheme","useMemo","container","paddingHorizontal","spacing","paddingVertical","inner","backgroundColor","palette","fill","base","weaker","borderRadius","shape","radius","full","flexDirection","gap","paddingBottom","paddingTop","label","createFontStyle","selector","_","typographyOf","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.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AvB;QAVJ,CAAP;IA3FR;EAkHH,CAnHM,EAmHJ,CAACX,KAAD,EAAQH,OAAR,EAAiBC,QAAjB,EAA2BC,IAA3B,CAnHI,CAAP;AAoHH"}
@@ -20,12 +20,6 @@ const useStyles = function () {
20
20
  root: {
21
21
  alignItems: 'center',
22
22
  justifyContent: 'center'
23
- },
24
- row: {
25
- flexDirection: 'row'
26
- },
27
- column: {
28
- flexDirection: 'column'
29
23
  }
30
24
  };
31
25
  };
@@ -36,7 +30,6 @@ function TabBase(props) {
36
30
  disabled = false,
37
31
  onPress,
38
32
  selected = false,
39
- vertical = false,
40
33
  style,
41
34
  ...otherProps
42
35
  } = props;
@@ -44,7 +37,7 @@ function TabBase(props) {
44
37
  return /*#__PURE__*/_react.default.createElement(_ButtonBase.default, _extends({
45
38
  onPress: onPress,
46
39
  disabled: disabled,
47
- style: (0, _styles.css)([styles.root, vertical ? styles.column : styles.row, style])
40
+ style: (0, _styles.css)([styles.root, style])
48
41
  }, otherProps), children);
49
42
  }
50
43
 
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","root","alignItems","justifyContent","row","flexDirection","column","TabBase","props","children","disabled","onPress","selected","vertical","style","otherProps","styles","css"],"sources":["TabBase.tsx"],"sourcesContent":["import React from 'react';\nimport { css, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport 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;;AACA;;AACA;;;;;;AAKA,MAAMA,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;;AAee,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,6BAAC,mBAAD;IACI,OAAO,EAAEW,OADb;IAEI,QAAQ,EAAED,QAFd;IAGI,KAAK,EAAE,IAAAO,WAAA,EAAI,CACPD,MAAM,CAACf,IADA,EAEPY,QAAQ,GAAGG,MAAM,CAACV,MAAV,GAAmBU,MAAM,CAACZ,GAF3B,EAGPU,KAHO,CAAJ;EAHX,GAQQC,UARR,GAUKN,QAVL,CADJ;AAcH;;AAAA"}
1
+ {"version":3,"names":["useStyles","root","alignItems","justifyContent","TabBase","props","children","disabled","onPress","selected","style","otherProps","styles","css"],"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;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAmC,GAAG,YAA2B;EACnE,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,cAAc,EAAE;IAFd;EADH,CAAP;AAMH,CAPD;;AASe,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,6BAAC,mBAAD;IACI,OAAO,EAAEQ,OADb;IAEI,QAAQ,EAAED,QAFd;IAGI,KAAK,EAAE,IAAAM,WAAA,EAAI,CACPD,MAAM,CAACX,IADA,EAEPS,KAFO,CAAJ;EAHX,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":""}
@@ -29,6 +29,8 @@ var _InternalContext = _interopRequireDefault(require("./InternalContext"));
29
29
 
30
30
  var _utils = require("./utils");
31
31
 
32
+ var _useTabsStyle = _interopRequireDefault(require("./useTabsStyle"));
33
+
32
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
35
 
34
36
  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); }
@@ -45,9 +47,6 @@ const useStyles = function () {
45
47
  fixedTab: {
46
48
  flex: 1
47
49
  },
48
- scrollableContainer: {
49
- paddingHorizontal: theme.spacing(1)
50
- },
51
50
  bottomDivider: {
52
51
  borderBottomColor: theme.palette.border.base,
53
52
  borderBottomWidth: 0.5
@@ -70,6 +69,7 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
70
69
  scrollable = false,
71
70
  scrollViewContentContainerStyle,
72
71
  showDivider = false,
72
+ size = 'medium',
73
73
  style,
74
74
  variant = 'default',
75
75
  UNSTABLE_sharedIndex,
@@ -81,6 +81,9 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
81
81
  const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;
82
82
  const realInitialIndex = sharedIndex.initialValue;
83
83
  const currentIndexRef = (0, _react.useRef)(initialIndex);
84
+ const {
85
+ container: containerStyle
86
+ } = (0, _useTabsStyle.default)(variant, size);
84
87
 
85
88
  const setTab = newIndex => {
86
89
  const currentIndex = currentIndexRef.current;
@@ -171,6 +174,7 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
171
174
  onLayout,
172
175
  onPress,
173
176
  onMouseDown,
177
+ size,
174
178
  variant,
175
179
  indicatorSize,
176
180
  style: scrollable ? undefined : styles.fixedTab
@@ -195,13 +199,13 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
195
199
  indexStore
196
200
  }
197
201
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
198
- style: (0, _styles.css)([styles.root, {
202
+ style: (0, _styles.css)([styles.root, containerStyle, {
199
203
  backgroundColor: backgroundColorMap[color]
200
204
  }, showDivider ? styles.bottomDivider : undefined, scrollable ? undefined : styles.fixedRoot, style])
201
205
  }, scrollable ? /*#__PURE__*/_react.default.createElement(_ScrollableTabsView.default, {
202
206
  automaticallyAdjustContentInsets: false,
203
207
  bounces: false,
204
- contentContainerStyle: (0, _styles.css)([styles.scrollableContainer, scrollViewContentContainerStyle]),
208
+ contentContainerStyle: (0, _styles.css)([scrollViewContentContainerStyle]),
205
209
  coordinates: coordinates,
206
210
  directionalLockEnabled: true,
207
211
  horizontal: true,
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","fixedRoot","flexDirection","fixedTab","flex","scrollableContainer","paddingHorizontal","spacing","bottomDivider","borderBottomColor","palette","border","base","borderBottomWidth","Tabs","forwardRef","props","ref","children","color","initialIndex","disableIndicator","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","showDivider","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","useSyncAnimatedValue","initialValue","sharedIndex","realInitialIndex","currentIndexRef","useRef","setTab","newIndex","currentIndex","current","animatedValue","setValue","useImperativeHandle","styles","outerCoordinates","updateCoordinate","useTabCoordinates","innerContentsWidthList","updateInnerContentsWidth","useTabInnerContentsWidth","canRenderIndicator","isEveryTabCoordinatesDefined","indexStore","useIndexStore","coordinates","useMemo","length","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","useEffect","subscribe","tabElements","React","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","cloneElement","enableIndicator","undefined","filter","Boolean","tabIndicator","backgroundColorMap","default","background","alt","css","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;;AAEA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAWA,MAAMA,SAAgC,GAAG,YAAwB;EAC7D,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE,EADH;IAEHC,SAAS,EAAE;MACPC,aAAa,EAAE;IADR,CAFR;IAKHC,QAAQ,EAAE;MACNC,IAAI,EAAE;IADA,CALP;IAQHC,mBAAmB,EAAE;MACjBC,iBAAiB,EAAER,KAAK,CAACS,OAAN,CAAc,CAAd;IADF,CARlB;IAWHC,aAAa,EAAE;MACXC,iBAAiB,EAAEX,KAAK,CAACY,OAAN,CAAcC,MAAd,CAAqBC,IAD7B;MAEXC,iBAAiB,EAAE;IAFR;EAXZ,CAAP;AAgBH,CAnBD;;AAqBA,MAAMC,IAAI,gBAAG,IAAAC,iBAAA,EAAoC,SAASD,IAAT,CAAcE,KAAd,EAAqBC,GAArB,EAA0B;EAAA;;EACvE,MAAM;IACFC,QADE;IAEFC,KAAK,GAAG,SAFN;IAGFC,YAAY,GAAG,CAHb;IAIFC,gBAAgB,GAAG,KAJjB;IAKFC,aAAa,GAAG,aALd;IAMFC,mBAAmB,GAAG,MANpB;IAOFC,yBAAyB,GAAG,OAP1B;IAQFC,QARE;IASFC,UAAU,GAAG,KATX;IAUFC,+BAVE;IAWFC,WAAW,GAAG,KAXZ;IAYFC,KAZE;IAaFC,OAAO,GAAG,SAbR;IAcFC,oBAdE;IAeFC;EAfE,IAgBFhB,KAhBJ;EAkBA,MAAMiB,mBAAmB,GAAG,IAAAC,2BAAA,EAAqB;IAAEC,YAAY,EAAEf;EAAhB,CAArB,CAA5B;EACA,MAAMgB,WAAW,GA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KA,oBACI,6BAAC,wBAAD,CAAiB,QAAjB;IAA0B,KAAK,EAAE;MAAE3C;IAAF;EAAjC,gBACI,6BAAC,iBAAD;IACI,KAAK,EAAE,IAAA4C,WAAA,EAAI,CACPrD,MAAM,CAAC/C,IADA,EAEP;MAAEqG,eAAe,EAAEL,kBAAkB,CAAC7E,KAAD;IAArC,CAFO,EAGPS,WAAW,GAAGmB,MAAM,CAACvC,aAAV,GAA0BoF,SAH9B,EAIPlE,UAAU,GAAGkE,SAAH,GAAe7C,MAAM,CAAC9C,SAJzB,EAKP4B,KALO,CAAJ;EADX,GASKH,UAAU,gBACP,6BAAC,2BAAD;IACI,gCAAgC,EAAE,KADtC;IAEI,OAAO,EAAE,KAFb;IAGI,qBAAqB,EAAE,IAAA0E,WAAA,EAAI,CACvBrD,MAAM,CAAC1C,mBADgB,EAEvBsB,+BAFuB,CAAJ,CAH3B;IAOI,WAAW,EAAE+B,WAPjB;IAQI,sBAAsB,EAAE,IAR5B;IASI,UAAU,EAAE,IAThB;IAUI,YAAY,EAAErB,gBAVlB;IAWI,YAAY,EAAE,KAXlB;IAYI,8BAA8B,EAAE,KAZpC;IAaI,4BAA4B,EAAE,KAblC;IAcI,mBAAmB,EAAEd,mBAdzB;IAeI,yBAAyB,EAAEC;EAf/B,GAiBKiD,WAjBL,EAkBKsB,YAlBL,CADO,gBAsBP,6BAAC,cAAD,CAAO,QAAP,QACKtB,WADL,EAEKsB,YAFL,CA/BR,CADJ,CADJ;AAyCH,CA/LY,CAAb;eAiMejF,I"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","fixedRoot","flexDirection","fixedTab","flex","bottomDivider","borderBottomColor","palette","border","base","borderBottomWidth","Tabs","forwardRef","props","ref","children","color","initialIndex","disableIndicator","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","showDivider","size","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","useSyncAnimatedValue","initialValue","sharedIndex","realInitialIndex","currentIndexRef","useRef","container","containerStyle","useTabsStyle","setTab","newIndex","currentIndex","current","animatedValue","setValue","useImperativeHandle","styles","outerCoordinates","updateCoordinate","useTabCoordinates","innerContentsWidthList","updateInnerContentsWidth","useTabInnerContentsWidth","canRenderIndicator","isEveryTabCoordinatesDefined","indexStore","useIndexStore","coordinates","useMemo","length","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","useEffect","subscribe","tabElements","React","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","cloneElement","enableIndicator","undefined","filter","Boolean","tabIndicator","backgroundColorMap","default","background","alt","css","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;;AAEA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAUA,MAAMA,SAAgC,GAAG,YAAwB;EAC7D,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE,EADH;IAEHC,SAAS,EAAE;MACPC,aAAa,EAAE;IADR,CAFR;IAKHC,QAAQ,EAAE;MACNC,IAAI,EAAE;IADA,CALP;IAQHC,aAAa,EAAE;MACXC,iBAAiB,EAAER,KAAK,CAACS,OAAN,CAAcC,MAAd,CAAqBC,IAD7B;MAEXC,iBAAiB,EAAE;IAFR;EARZ,CAAP;AAaH,CAhBD;;AAkBA,MAAMC,IAAI,gBAAG,IAAAC,iBAAA,EAAoC,SAASD,IAAT,CAAcE,KAAd,EAAqBC,GAArB,EAA0B;EAAA;;EACvE,MAAM;IACFC,QADE;IAEFC,KAAK,GAAG,SAFN;IAGFC,YAAY,GAAG,CAHb;IAIFC,gBAAgB,GAAG,KAJjB;IAKFC,aAAa,GAAG,aALd;IAMFC,mBAAmB,GAAG,MANpB;IAOFC,yBAAyB,GAAG,OAP1B;IAQFC,QARE;IASFC,UAAU,GAAG,KATX;IAUFC,+BAVE;IAWFC,WAAW,GAAG,KAXZ;IAYFC,IAAI,GAAG,QAZL;IAaFC,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MerF,I"}
@@ -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":";;;;;;AAMO,MAAMA,UAAU,GAAG,CAAC,SAAD,EAAY,KAAZ,CAAnB;;AAGA,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":";;;;;;AAMO,MAAMA,UAAU,GAAG,CAAC,SAAD,EAAY,KAAZ,CAAnB;;AAGA,MAAMC,iBAAiB,GAAG,CAAC,aAAD,EAAgB,MAAhB,CAA1B"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = useTabsStyle;
7
+
8
+ var _react = require("react");
9
+
10
+ var _hooks = require("../hooks");
11
+
12
+ var _styles = require("../styles");
13
+
14
+ function useTabsStyle(variant, size) {
15
+ const theme = (0, _styles.useTheme)();
16
+ const isTablet = (0, _hooks.useBreakpointUp)('md', true, false);
17
+ return (0, _react.useMemo)(() => {
18
+ switch (variant) {
19
+ case 'circular':
20
+ return {
21
+ container: {
22
+ paddingBottom: 8,
23
+ paddingHorizontal: isTablet ? 20 : size === 'small' ? 8 : 12
24
+ }
25
+ };
26
+
27
+ case 'circular-home':
28
+ return {
29
+ container: {
30
+ paddingBottom: 8,
31
+ paddingHorizontal: isTablet ? 20 : 8
32
+ }
33
+ };
34
+
35
+ case 'bottom-navigation':
36
+ return {
37
+ container: {
38
+ borderTopColor: theme.palette.border.base,
39
+ borderTopWidth: 0.5,
40
+ paddingHorizontal: 24
41
+ }
42
+ };
43
+
44
+ case 'default':
45
+ default:
46
+ return {
47
+ container: {
48
+ paddingHorizontal: isTablet ? 14 : 6
49
+ }
50
+ };
51
+ }
52
+ }, [theme, variant, isTablet, size]);
53
+ }
54
+ //# sourceMappingURL=useTabsStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useTabsStyle","variant","size","theme","useTheme","isTablet","useBreakpointUp","useMemo","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;;AAEA;;AACA;;AAOe,SAASA,YAAT,CAAsBC,OAAtB,EAA2CC,IAA3C,EAA0D;EACrE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,QAAQ,GAAG,IAAAC,sBAAA,EAAgB,IAAhB,EAAsB,IAAtB,EAA4B,KAA5B,CAAjB;EAEA,OAAO,IAAAC,cAAA,EAAmB,MAAM;IAC5B,QAAQN,OAAR;MACI,KAAK,UAAL;QACI,OAAO;UACHO,SAAS,EAAE;YACPC,aAAa,EAAE,CADR;YAEPC,iBAAiB,EAAEL,QAAQ,GAAG,EAAH,GAASH,IAAI,KAAK,OAAT,GAAmB,CAAnB,GAAuB;UAFpD;QADR,CAAP;;MAMJ,KAAK,eAAL;QACI,OAAO;UACHM,SAAS,EAAE;YACPC,aAAa,EAAE,CADR;YAEPC,iBAAiB,EAAEL,QAAQ,GAAG,EAAH,GAAQ;UAF5B;QADR,CAAP;;MAMJ,KAAK,mBAAL;QACI,OAAO;UACHG,SAAS,EAAE;YACPG,cAAc,EAAER,KAAK,CAACS,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,EAAEL,QAAQ,GAAG,EAAH,GAAQ;UAD5B;QADR,CAAP;IAzBR;EA+BH,CAhCM,EAgCJ,CAACF,KAAD,EAAQF,OAAR,EAAiBI,QAAjB,EAA2BH,IAA3B,CAhCI,CAAP;AAiCH"}
@@ -94,7 +94,7 @@ const TextField = /*#__PURE__*/_react.default.forwardRef(function TextField(prop
94
94
 
95
95
  const showClearButton = showClearButtonProp ?? isSearch;
96
96
  const titleFontStyle = (0, _styles2.createFontStyle)(theme, {
97
- // selector: (typography) => typography.caption1['semiBold']
97
+ selector: typography => typography.caption1['semiBold'],
98
98
  color: theme.palette.text.strong
99
99
  });
100
100
  const inputStyle = (0, _styles.css)([styles.input, variantStyles.inputStyle, _reactNative.Platform.OS === 'web' ? {
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","create","root","alignItems","flexGrow","input","secureToggleButton","padding","TextField","React","forwardRef","props","ref","autoFocus","containerStyle","containerStyleProp","editable","hint","isLoading","onBlur","onChangeText","onChangeTextProp","onFocus","placeholderTextColor","placeholderTextColorProp","secureTextEntry","secureTextEntryProp","showClearButton","showClearButtonProp","status","style","styleProp","title","value","variant","otherProps","isSearch","disabled","theme","useTheme","isFocused","setIsFocused","useState","setSecureTextEntry","variantStyles","useVariantStyleMap","handleBlur","event","handleFocus","handleSecureTogglePress","current","handleChangeText","text","handleClear","titleFontStyle","createFontStyle","color","palette","strong","inputStyle","css","Platform","OS","outlineWidth","disabledLabel","opacity","length","hintStyle"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\nimport { Platform, StyleSheet, Text, TextInput, View } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css } from '@fountain-ui/styles';\nimport IconButton from '../IconButton/IconButton';\nimport { Clear, EyeOff, EyeOn, LoadingSpinner, Search } from '../internal/icons';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type TextFieldProps from './TextFieldProps';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n flexGrow: 1,\n },\n input: {\n flexGrow: 1,\n },\n secureToggleButton: {\n alignItems: 'flex-end',\n padding: 0,\n },\n});\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n autoFocus,\n containerStyle: containerStyleProp,\n editable = true,\n hint,\n isLoading,\n onBlur,\n onChangeText: onChangeTextProp,\n onFocus,\n placeholderTextColor: placeholderTextColorProp,\n secureTextEntry: secureTextEntryProp,\n showClearButton: showClearButtonProp,\n status = 'default' as TextFieldStatus,\n style: styleProp,\n title,\n value,\n variant = 'default' as TextFieldVariant,\n ...otherProps\n } = props;\n\n const isSearch = variant === 'search';\n\n const disabled = !editable || isLoading;\n\n const theme = useTheme();\n\n const [isFocused, setIsFocused] = useState<boolean>(autoFocus ?? false);\n const [secureTextEntry, setSecureTextEntry] = useState<boolean>(secureTextEntryProp ?? false);\n\n const variantStyles = useVariantStyleMap(variant, status, isFocused);\n\n const handleBlur = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(false);\n onBlur?.(event);\n };\n\n const handleFocus = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(true);\n onFocus?.(event);\n };\n\n const handleSecureTogglePress = () => {\n setSecureTextEntry((current) => !current);\n };\n\n const handleChangeText = (text: string) => {\n onChangeTextProp?.(text);\n };\n\n const handleClear = () => {\n handleChangeText('');\n };\n\n const showClearButton = showClearButtonProp ?? isSearch;\n\n const titleFontStyle = createFontStyle(theme, {\n // selector: (typography) => typography.caption1['semiBold']\n color: theme.palette.text.strong,\n });\n\n const inputStyle = css([\n styles.input,\n variantStyles.inputStyle,\n Platform.OS === 'web' ? { outlineWidth: 0 } as FountainUiStyle : {},\n styleProp,\n ]);\n\n const placeholderTextColor = placeholderTextColorProp ?? theme.palette.status.disabledLabel;\n\n const containerStyle = css([\n styles.root,\n variantStyles.containerStyle,\n { opacity: disabled ? 0.3 : 1 },\n containerStyleProp,\n ]);\n\n return (\n <View>\n {title && !isSearch ? (\n <Text\n children={title}\n style={titleFontStyle}\n />\n ) : null}\n\n <Row style={containerStyle}>\n {isSearch ? (\n isLoading ? (\n <LoadingSpinner/>\n ) : (\n <Search\n color={'base'}\n height={18}\n width={18}\n />\n )\n ) : null}\n\n <TextInput\n autoFocus={autoFocus}\n editable={!disabled}\n onBlur={handleBlur}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n placeholderTextColor={placeholderTextColor}\n ref={ref}\n secureTextEntry={secureTextEntry}\n style={inputStyle}\n value={value}\n {...otherProps}\n />\n\n {showClearButton && value?.length && value.length > 0 ? (\n <IconButton\n color={'base'}\n children={\n <Clear\n height={13.75}\n width={15}\n />\n }\n onPress={handleClear}\n />\n ) : null}\n\n {secureTextEntryProp && !isSearch ? (\n <IconButton\n color={'base'}\n onPress={handleSecureTogglePress}\n style={styles.secureToggleButton}\n >\n {secureTextEntry ? (\n <EyeOff\n height={19}\n width={17.42}\n />\n ) : (\n <EyeOn\n height={19}\n width={17.42}\n />\n )}\n </IconButton>\n ) : null}\n </Row>\n\n {hint && !isSearch ? (\n <Text\n children={hint}\n style={variantStyles.hintStyle}\n />\n ) : null}\n </View>\n );\n});\n\nexport default TextField;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,UAAU,EAAE,QADV;IAEFC,QAAQ,EAAE;EAFR,CADuB;EAK7BC,KAAK,EAAE;IACHD,QAAQ,EAAE;EADP,CALsB;EAQ7BE,kBAAkB,EAAE;IAChBH,UAAU,EAAE,UADI;IAEhBI,OAAO,EAAE;EAFO;AARS,CAAlB,CAAf;;AAcA,MAAMC,SAAS,gBAAGC,cAAA,CAAMC,UAAN,CAA4C,SAASF,SAAT,CAAmBG,KAAnB,EAA0BC,GAA1B,EAA+B;EACzF,MAAM;IACFC,SADE;IAEFC,cAAc,EAAEC,kBAFd;IAGFC,QAAQ,GAAG,IAHT;IAIFC,IAJE;IAKFC,SALE;IAMFC,MANE;IAOFC,YAAY,EAAEC,gBAPZ;IAQFC,OARE;IASFC,oBAAoB,EAAEC,wBATpB;IAUFC,eAAe,EAAEC,mBAVf;IAWFC,eAAe,EAAEC,mBAXf;IAYFC,MAAM,GAAG,SAZP;IAaFC,KAAK,EAAEC,SAbL;IAcFC,KAdE;IAeFC,KAfE;IAgBFC,OAAO,GAAG,SAhBR;IAiBF,GAAGC;EAjBD,IAkBFxB,KAlBJ;EAoBA,MAAMyB,QAAQ,GAAGF,OAAO,KAAK,QAA7B;EAEA,MAAMG,QAAQ,GAA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jC,KAAK,CAACiC,MAAN,GAAe,CAAnD,gBACG,6BAAC,mBAAD;IACI,KAAK,EAAE,MADX;IAEI,QAAQ,eACJ,6BAAC,YAAD;MACI,MAAM,EAAE,KADZ;MAEI,KAAK,EAAE;IAFX,EAHR;IAQI,OAAO,EAAEb;EARb,EADH,GAWG,IAtCR,EAwCK3B,mBAAmB,IAAI,CAACU,QAAxB,gBACG,6BAAC,mBAAD;IACI,KAAK,EAAE,MADX;IAEI,OAAO,EAAEa,uBAFb;IAGI,KAAK,EAAElD,MAAM,CAACO;EAHlB,GAKKmB,eAAe,gBACZ,6BAAC,aAAD;IACI,MAAM,EAAE,EADZ;IAEI,KAAK,EAAE;EAFX,EADY,gBAMZ,6BAAC,YAAD;IACI,MAAM,EAAE,EADZ;IAEI,KAAK,EAAE;EAFX,EAXR,CADH,GAkBG,IA1DR,CARJ,EAqEKR,IAAI,IAAI,CAACmB,QAAT,gBACG,6BAAC,iBAAD;IACI,QAAQ,EAAEnB,IADd;IAEI,KAAK,EAAE2B,aAAa,CAACuB;EAFzB,EADH,GAKG,IA1ER,CADJ;AA8EH,CA3JiB,CAAlB;;eA6Je3D,S"}
1
+ {"version":3,"names":["styles","StyleSheet","create","root","alignItems","flexGrow","input","secureToggleButton","padding","TextField","React","forwardRef","props","ref","autoFocus","containerStyle","containerStyleProp","editable","hint","isLoading","onBlur","onChangeText","onChangeTextProp","onFocus","placeholderTextColor","placeholderTextColorProp","secureTextEntry","secureTextEntryProp","showClearButton","showClearButtonProp","status","style","styleProp","title","value","variant","otherProps","isSearch","disabled","theme","useTheme","isFocused","setIsFocused","useState","setSecureTextEntry","variantStyles","useVariantStyleMap","handleBlur","event","handleFocus","handleSecureTogglePress","current","handleChangeText","text","handleClear","titleFontStyle","createFontStyle","selector","typography","caption1","color","palette","strong","inputStyle","css","Platform","OS","outlineWidth","disabledLabel","opacity","length","hintStyle"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\nimport { Platform, StyleSheet, Text, TextInput, View } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css } from '@fountain-ui/styles';\nimport IconButton from '../IconButton/IconButton';\nimport { Clear, EyeOff, EyeOn, LoadingSpinner, Search } from '../internal/icons';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type TextFieldProps from './TextFieldProps';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n flexGrow: 1,\n },\n input: {\n flexGrow: 1,\n },\n secureToggleButton: {\n alignItems: 'flex-end',\n padding: 0,\n },\n});\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n autoFocus,\n containerStyle: containerStyleProp,\n editable = true,\n hint,\n isLoading,\n onBlur,\n onChangeText: onChangeTextProp,\n onFocus,\n placeholderTextColor: placeholderTextColorProp,\n secureTextEntry: secureTextEntryProp,\n showClearButton: showClearButtonProp,\n status = 'default' as TextFieldStatus,\n style: styleProp,\n title,\n value,\n variant = 'default' as TextFieldVariant,\n ...otherProps\n } = props;\n\n const isSearch = variant === 'search';\n\n const disabled = !editable || isLoading;\n\n const theme = useTheme();\n\n const [isFocused, setIsFocused] = useState<boolean>(autoFocus ?? false);\n const [secureTextEntry, setSecureTextEntry] = useState<boolean>(secureTextEntryProp ?? false);\n\n const variantStyles = useVariantStyleMap(variant, status, isFocused);\n\n const handleBlur = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(false);\n onBlur?.(event);\n };\n\n const handleFocus = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(true);\n onFocus?.(event);\n };\n\n const handleSecureTogglePress = () => {\n setSecureTextEntry((current) => !current);\n };\n\n const handleChangeText = (text: string) => {\n onChangeTextProp?.(text);\n };\n\n const handleClear = () => {\n handleChangeText('');\n };\n\n const showClearButton = showClearButtonProp ?? isSearch;\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.caption1['semiBold'],\n color: theme.palette.text.strong,\n });\n\n const inputStyle = css([\n styles.input,\n variantStyles.inputStyle,\n Platform.OS === 'web' ? { outlineWidth: 0 } as FountainUiStyle : {},\n styleProp,\n ]);\n\n const placeholderTextColor = placeholderTextColorProp ?? theme.palette.status.disabledLabel;\n\n const containerStyle = css([\n styles.root,\n variantStyles.containerStyle,\n { opacity: disabled ? 0.3 : 1 },\n containerStyleProp,\n ]);\n\n return (\n <View>\n {title && !isSearch ? (\n <Text\n children={title}\n style={titleFontStyle}\n />\n ) : null}\n\n <Row style={containerStyle}>\n {isSearch ? (\n isLoading ? (\n <LoadingSpinner/>\n ) : (\n <Search\n color={'base'}\n height={18}\n width={18}\n />\n )\n ) : null}\n\n <TextInput\n autoFocus={autoFocus}\n editable={!disabled}\n onBlur={handleBlur}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n placeholderTextColor={placeholderTextColor}\n ref={ref}\n secureTextEntry={secureTextEntry}\n style={inputStyle}\n value={value}\n {...otherProps}\n />\n\n {showClearButton && value?.length && value.length > 0 ? (\n <IconButton\n color={'base'}\n children={\n <Clear\n height={13.75}\n width={15}\n />\n }\n onPress={handleClear}\n />\n ) : null}\n\n {secureTextEntryProp && !isSearch ? (\n <IconButton\n color={'base'}\n onPress={handleSecureTogglePress}\n style={styles.secureToggleButton}\n >\n {secureTextEntry ? (\n <EyeOff\n height={19}\n width={17.42}\n />\n ) : (\n <EyeOn\n height={19}\n width={17.42}\n />\n )}\n </IconButton>\n ) : null}\n </Row>\n\n {hint && !isSearch ? (\n <Text\n children={hint}\n style={variantStyles.hintStyle}\n />\n ) : null}\n </View>\n );\n});\n\nexport default TextField;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAW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Ae,gBACZ,6BAAC,aAAD;IACI,MAAM,EAAE,EADZ;IAEI,KAAK,EAAE;EAFX,EADY,gBAMZ,6BAAC,YAAD;IACI,MAAM,EAAE,EADZ;IAEI,KAAK,EAAE;EAFX,EAXR,CADH,GAkBG,IA1DR,CARJ,EAqEKR,IAAI,IAAI,CAACmB,QAAT,gBACG,6BAAC,iBAAD;IACI,QAAQ,EAAEnB,IADd;IAEI,KAAK,EAAE2B,aAAa,CAAC0B;EAFzB,EADH,GAKG,IA1ER,CADJ;AA8EH,CA3JiB,CAAlB;;eA6Je9D,S"}
@@ -50,13 +50,14 @@ function useVariantStyleMap(variant, status, isFocused) {
50
50
  borderBottomWidth: 1
51
51
  },
52
52
  inputStyle: {
53
+ paddingLeft: 0,
53
54
  paddingRight: theme.spacing(4),
54
55
  paddingVertical: theme.spacing(4),
55
56
  ...(0, _styles2.createFontStyle)(theme, {
56
57
  selector: _ => (0, _styles.typographyOf)({
57
58
  fontSize: 18,
58
59
  lineHeight: 27,
59
- fontFamily: 'Pretendard-SemiBold',
60
+ fontFamily: 'PretendardStd-SemiBold',
60
61
  letterSpacing: 0
61
62
  }),
62
63
  color: theme.palette.text.strong
@@ -65,7 +66,7 @@ function useVariantStyleMap(variant, status, isFocused) {
65
66
  hintStyle: {
66
67
  marginTop: theme.spacing(2),
67
68
  ...(0, _styles2.createFontStyle)(theme, {
68
- // selector: (typography) => typography.caption1['regular']
69
+ selector: typography => typography.caption1['regular'],
69
70
  color: hintColor
70
71
  })
71
72
  }
@@ -90,7 +91,7 @@ function useVariantStyleMap(variant, status, isFocused) {
90
91
  selector: _ => (0, _styles.typographyOf)({
91
92
  fontSize: 16,
92
93
  lineHeight: 19.2,
93
- fontFamily: 'Pretendard-SemiBold',
94
+ fontFamily: 'PretendardStd-SemiBold',
94
95
  letterSpacing: -0.16
95
96
  }),
96
97
  color: theme.palette.text.strong
@@ -1 +1 @@
1
- {"version":3,"names":["useStatusColor","theme","status","borderColor","palette","border","base","hintColor","text","weak","success","danger","useVariantStyleMap","variant","isFocused","useTheme","useMemo","containerStyle","borderBottomColor","strong","borderBottomWidth","inputStyle","paddingRight","spacing","paddingVertical","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","hintStyle","marginTop","backgroundColor","surface","supportive","borderRadius","shape","radius","md","borderWidth","paddingLeft","paddingBottom","paddingTop"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle, Theme } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\n\ninterface VariantStyleMap {\n containerStyle?: FountainUiStyle;\n inputStyle?: FountainUiStyle;\n hintStyle?: FountainUiStyle;\n}\n\nfunction useStatusColor(theme: Theme, status: TextFieldStatus): { borderColor: string; hintColor: string; } {\n switch (status) {\n default:\n case 'default':\n return {\n borderColor: theme.palette.border.base,\n hintColor: theme.palette.text.weak,\n };\n case 'success':\n return {\n borderColor: theme.palette.status.success,\n hintColor: theme.palette.status.success,\n };\n case 'error':\n return {\n borderColor: theme.palette.status.danger,\n hintColor: theme.palette.status.danger,\n };\n }\n}\n\nexport default function useVariantStyleMap(variant: TextFieldVariant, status: TextFieldStatus, isFocused: boolean): VariantStyleMap {\n const theme = useTheme();\n\n const {\n borderColor,\n hintColor,\n } = useStatusColor(theme, status);\n\n return useMemo(() => {\n switch (variant) {\n default:\n case 'default':\n return {\n containerStyle: {\n borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,\n borderBottomWidth: 1,\n },\n inputStyle: {\n paddingRight: theme.spacing(4),\n paddingVertical: theme.spacing(4),\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 18,\n lineHeight: 27,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n },\n hintStyle: {\n marginTop: theme.spacing(2),\n ...createFontStyle(theme, {\n // selector: (typography) => typography.caption1['regular']\n color: hintColor,\n }),\n },\n };\n case 'search':\n return {\n containerStyle: {\n backgroundColor: theme.palette.surface.supportive,\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.md,\n borderWidth: 0.5,\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(0.5),\n },\n inputStyle: {\n paddingBottom: theme.spacing(2.5),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(1),\n paddingTop: theme.spacing(2.25),\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 19.2,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: -0.16,\n }),\n color: theme.palette.text.strong,\n }),\n },\n };\n }\n }, [theme, borderColor, hintColor, variant, isFocused]);\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AASA,SAASA,cAAT,CAAwBC,KAAxB,EAAsCC,MAAtC,EAA4G;EACxG,QAAQA,MAAR;IACI;IACA,KAAK,SAAL;MACI,OAAO;QACHC,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBC,IAD/B;QAEHC,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcI,IAAd,CAAmBC;MAF3B,CAAP;;IAIJ,KAAK,SAAL;MACI,OAAO;QACHN,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBQ,OAD/B;QAEHH,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBQ;MAF7B,CAAP;;IAIJ,KAAK,OAAL;MACI,OAAO;QACHP,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBS,MAD/B;QAEHJ,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBS;MAF7B,CAAP;EAbR;AAkBH;;AAEc,SAASC,kBAAT,CAA4BC,OAA5B,EAAuDX,MAAvD,EAAgFY,SAAhF,EAAqH;EAChI,MAA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tC,KAAK,CAACuC,KAAN,CAAYC,MAAZ,CAAmBC,EAHrB;YAIZC,WAAW,EAAE,GAJD;YAKZC,WAAW,EAAE3C,KAAK,CAACsB,OAAN,CAAc,CAAd,CALD;YAMZD,YAAY,EAAErB,KAAK,CAACsB,OAAN,CAAc,GAAd;UANF,CADb;UASHF,UAAU,EAAE;YACRwB,aAAa,EAAE5C,KAAK,CAACsB,OAAN,CAAc,GAAd,CADP;YAERqB,WAAW,EAAE3C,KAAK,CAACsB,OAAN,CAAc,CAAd,CAFL;YAGRD,YAAY,EAAErB,KAAK,CAACsB,OAAN,CAAc,CAAd,CAHN;YAIRuB,UAAU,EAAE7C,KAAK,CAACsB,OAAN,CAAc,IAAd,CAJJ;YAKR,GAAG,IAAAE,wBAAA,EAAgBxB,KAAhB,EAAuB;cACtByB,QAAQ,EAAGC,CAAD,IAAO,IAAAC,oBAAA,EAAa;gBAC1BC,QAAQ,EAAE,EADgB;gBAE1BC,UAAU,EAAE,IAFc;gBAG1BC,UAAU,EAAE,qBAHc;gBAI1BC,aAAa,EAAE,CAAC;cAJU,CAAb,CADK;cAOtBC,KAAK,EAAEhC,KAAK,CAACG,OAAN,CAAcI,IAAd,CAAmBW;YAPJ,CAAvB;UALK;QATT,CAAP;IA9BR;EAwDH,CAzDM,EAyDJ,CAAClB,KAAD,EAAQE,WAAR,EAAqBI,SAArB,EAAgCM,OAAhC,EAAyCC,SAAzC,CAzDI,CAAP;AA0DH"}
1
+ {"version":3,"names":["useStatusColor","theme","status","borderColor","palette","border","base","hintColor","text","weak","success","danger","useVariantStyleMap","variant","isFocused","useTheme","useMemo","containerStyle","borderBottomColor","strong","borderBottomWidth","inputStyle","paddingLeft","paddingRight","spacing","paddingVertical","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","hintStyle","marginTop","typography","caption1","backgroundColor","surface","supportive","borderRadius","shape","radius","md","borderWidth","paddingBottom","paddingTop"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle, Theme } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\n\ninterface VariantStyleMap {\n containerStyle?: FountainUiStyle;\n inputStyle?: FountainUiStyle;\n hintStyle?: FountainUiStyle;\n}\n\nfunction useStatusColor(theme: Theme, status: TextFieldStatus): { borderColor: string; hintColor: string; } {\n switch (status) {\n default:\n case 'default':\n return {\n borderColor: theme.palette.border.base,\n hintColor: theme.palette.text.weak,\n };\n case 'success':\n return {\n borderColor: theme.palette.status.success,\n hintColor: theme.palette.status.success,\n };\n case 'error':\n return {\n borderColor: theme.palette.status.danger,\n hintColor: theme.palette.status.danger,\n };\n }\n}\n\nexport default function useVariantStyleMap(variant: TextFieldVariant, status: TextFieldStatus, isFocused: boolean): VariantStyleMap {\n const theme = useTheme();\n\n const {\n borderColor,\n hintColor,\n } = useStatusColor(theme, status);\n\n return useMemo(() => {\n switch (variant) {\n default:\n case 'default':\n return {\n containerStyle: {\n borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,\n borderBottomWidth: 1,\n },\n inputStyle: {\n paddingLeft: 0,\n paddingRight: theme.spacing(4),\n paddingVertical: theme.spacing(4),\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 18,\n lineHeight: 27,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n },\n hintStyle: {\n marginTop: theme.spacing(2),\n ...createFontStyle(theme, {\n selector: (typography) => typography.caption1['regular'],\n color: hintColor,\n }),\n },\n };\n case 'search':\n return {\n containerStyle: {\n backgroundColor: theme.palette.surface.supportive,\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.md,\n borderWidth: 0.5,\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(0.5),\n },\n inputStyle: {\n paddingBottom: theme.spacing(2.5),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(1),\n paddingTop: theme.spacing(2.25),\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 19.2,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: -0.16,\n }),\n color: theme.palette.text.strong,\n }),\n },\n };\n }\n }, [theme, borderColor, hintColor, variant, isFocused]);\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AASA,SAASA,cAAT,CAAwBC,KAAxB,EAAsCC,MAAtC,EAA4G;EACxG,QAAQA,MAAR;IACI;IACA,KAAK,SAAL;MACI,OAAO;QACHC,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBC,IAD/B;QAEHC,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcI,IAAd,CAAmBC;MAF3B,CAAP;;IAIJ,KAAK,SAAL;MACI,OAAO;QACHN,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBQ,OAD/B;QAEHH,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBQ;MAF7B,CAAP;;IAIJ,KAAK,OAAL;MACI,OAAO;QACHP,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBS,MAD/B;QAEHJ,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBS;MAF7B,CAAP;EAbR;AAkBH;;AAEc,SAASC,kBAAT,CAA4BC,OAA5B,EAAuDX,MAAvD,EAAgFY,SAAhF,EAAqH;EAChI,MAAMb,KAAK,GAAG,IAAAc,iBAAA,GAAd;EAEA,MAAM;IACFZ,WADE;IAEFI;EAFE,IAGFP,cAAc,CAACC,KAAD,EAAQC,MAAR,CAHlB;EAKA,OAAO,IAAAc,cAAA,EAAQ,MAAM;IACjB,QAAQH,OAAR;MACI;MACA,KAAK,SAAL;QACI,OAAO;UACHI,cAAc,EAAE;YACZC,iBAAiB,EAAEh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AY,EAAEtB,KAAK,CAACuB,OAAN,CAAc,GAAd;UANF,CADb;UASHH,UAAU,EAAE;YACR0B,aAAa,EAAE9C,KAAK,CAACuB,OAAN,CAAc,GAAd,CADP;YAERF,WAAW,EAAErB,KAAK,CAACuB,OAAN,CAAc,CAAd,CAFL;YAGRD,YAAY,EAAEtB,KAAK,CAACuB,OAAN,CAAc,CAAd,CAHN;YAIRwB,UAAU,EAAE/C,KAAK,CAACuB,OAAN,CAAc,IAAd,CAJJ;YAKR,GAAG,IAAAE,wBAAA,EAAgBzB,KAAhB,EAAuB;cACtB0B,QAAQ,EAAGC,CAAD,IAAO,IAAAC,oBAAA,EAAa;gBAC1BC,QAAQ,EAAE,EADgB;gBAE1BC,UAAU,EAAE,IAFc;gBAG1BC,UAAU,EAAE,wBAHc;gBAI1BC,aAAa,EAAE,CAAC;cAJU,CAAb,CADK;cAOtBC,KAAK,EAAEjC,KAAK,CAACG,OAAN,CAAcI,IAAd,CAAmBW;YAPJ,CAAvB;UALK;QATT,CAAP;IA/BR;EAyDH,CA1DM,EA0DJ,CAAClB,KAAD,EAAQE,WAAR,EAAqBI,SAArB,EAAgCM,OAAhC,EAAyCC,SAAzC,CA1DI,CAAP;AA2DH"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = BackButton;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _reactNative = require("react-native");
11
+
12
+ var _IconButton = _interopRequireDefault(require("../../IconButton"));
13
+
14
+ var _internal = require("../../internal");
15
+
16
+ var _styles = require("@fountain-ui/styles");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+
22
+ const styles = _reactNative.StyleSheet.create({
23
+ root: {
24
+ height: 40,
25
+ left: 4,
26
+ paddingLeft: 5,
27
+ paddingRight: 11,
28
+ paddingVertical: 8,
29
+ position: 'absolute',
30
+ width: 40
31
+ }
32
+ });
33
+
34
+ function BackButton(props) {
35
+ const {
36
+ style: styleProp,
37
+ ...otherProps
38
+ } = props;
39
+ const rootStyle = (0, _styles.css)([styles.root, styleProp]);
40
+ return /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
41
+ style: rootStyle
42
+ }, otherProps), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_internal.AppBarChevronLeft, {
43
+ height: 18,
44
+ width: 10
45
+ })));
46
+ }
47
+ //# sourceMappingURL=BackButton.js.map