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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (481) hide show
  1. package/build/commonjs/Accordion/Accordion.js +15 -8
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
  4. package/build/commonjs/Accordion/useVariantStyleMap.js +15 -8
  5. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  6. package/build/commonjs/AppBar/AppBar.js +7 -2
  7. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  8. package/build/commonjs/Badge/Badge.js +4 -3
  9. package/build/commonjs/Badge/Badge.js.map +1 -1
  10. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  11. package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
  12. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
  13. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +5 -2
  14. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  15. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  16. package/build/commonjs/Button/Button.js +26 -12
  17. package/build/commonjs/Button/Button.js.map +1 -1
  18. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  19. package/build/commonjs/Button/useVariantStyleMap.js +9 -0
  20. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
  21. package/build/commonjs/ButtonBase/ButtonBase.js +1 -1
  22. package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
  23. package/build/commonjs/ButtonBase/index.js +2 -2
  24. package/build/commonjs/ButtonBase/index.js.map +1 -1
  25. package/build/commonjs/Checkbox/Checkbox.js +4 -1
  26. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  27. package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
  28. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  29. package/build/commonjs/Chip/Chip.js +25 -14
  30. package/build/commonjs/Chip/Chip.js.map +1 -1
  31. package/build/commonjs/Chip/ChipProps.js +3 -1
  32. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  33. package/build/commonjs/Chip/index.js +6 -0
  34. package/build/commonjs/Chip/index.js.map +1 -1
  35. package/build/commonjs/Chip/useChipStyle.js +51 -31
  36. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  37. package/build/commonjs/Dialog/Dialog.js +10 -12
  38. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  39. package/build/commonjs/Dialog/DialogProps.js +1 -1
  40. package/build/commonjs/Dialog/DialogProps.js.map +1 -1
  41. package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
  42. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
  43. package/build/commonjs/Dialog/useDialogStyle.js +19 -8
  44. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  45. package/build/commonjs/DialogActions/DialogActions.js +0 -1
  46. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  47. package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
  48. package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
  49. package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
  50. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  51. package/build/commonjs/Divider/Divider.js +17 -9
  52. package/build/commonjs/Divider/Divider.js.map +1 -1
  53. package/build/commonjs/Divider/DividerProps.js +1 -1
  54. package/build/commonjs/Divider/DividerProps.js.map +1 -1
  55. package/build/commonjs/Empty/Empty.js +1 -1
  56. package/build/commonjs/Empty/Empty.js.map +1 -1
  57. package/build/commonjs/Flexbox/Flexbox.js +2 -0
  58. package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
  59. package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
  60. package/build/commonjs/IconButton/IconButton.js +3 -0
  61. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  62. package/build/commonjs/IconButton/IconButtonProps.js +1 -1
  63. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  64. package/build/commonjs/Image/Image.js +2 -2
  65. package/build/commonjs/Image/Image.js.map +1 -1
  66. package/build/commonjs/ImageCore/ImageCoreNative.js +1 -1
  67. package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
  68. package/build/commonjs/ListItem/ListItem.js +38 -26
  69. package/build/commonjs/ListItem/ListItem.js.map +1 -1
  70. package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
  71. package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
  72. package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
  73. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  74. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  75. package/build/commonjs/ListItemText/ListItemText.js +20 -21
  76. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  77. package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
  78. package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
  79. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  80. package/build/commonjs/Pagination/NumberPagination.js +4 -2
  81. package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
  82. package/build/commonjs/Pagination/Pagination.js +2 -0
  83. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  84. package/build/commonjs/Pagination/PaginationProps.js +3 -1
  85. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  86. package/build/commonjs/Pagination/index.js +6 -0
  87. package/build/commonjs/Pagination/index.js.map +1 -1
  88. package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
  89. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  90. package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
  91. package/build/commonjs/Radio/Radio.js +11 -4
  92. package/build/commonjs/Radio/Radio.js.map +1 -1
  93. package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
  94. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  95. package/build/commonjs/Section/Section.js +32 -0
  96. package/build/commonjs/Section/Section.js.map +1 -0
  97. package/build/commonjs/Section/SectionProps.js +2 -0
  98. package/build/commonjs/Section/SectionProps.js.map +1 -0
  99. package/build/commonjs/Section/index.js +16 -0
  100. package/build/commonjs/Section/index.js.map +1 -0
  101. package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
  102. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  103. package/build/commonjs/SnackbarContent/SnackbarContent.js +26 -9
  104. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  105. package/build/commonjs/Tab/Tab.js +21 -19
  106. package/build/commonjs/Tab/Tab.js.map +1 -1
  107. package/build/commonjs/Tab/TabProps.js +4 -2
  108. package/build/commonjs/Tab/TabProps.js.map +1 -1
  109. package/build/commonjs/Tab/index.js +14 -0
  110. package/build/commonjs/Tab/index.js.map +1 -1
  111. package/build/commonjs/Tab/useVariantStyleMap.js +59 -18
  112. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
  113. package/build/commonjs/TabBase/TabBase.js +1 -8
  114. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  115. package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
  116. package/build/commonjs/Tabs/Tabs.js +23 -7
  117. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  118. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  119. package/build/commonjs/Tabs/index.js.map +1 -1
  120. package/build/commonjs/Tabs/useTabsStyle.js +80 -0
  121. package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
  122. package/build/commonjs/TextField/TextField.js +48 -12
  123. package/build/commonjs/TextField/TextField.js.map +1 -1
  124. package/build/commonjs/TextField/useVariantStyleMap.js +29 -29
  125. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  126. package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
  127. package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
  128. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
  129. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  130. package/build/commonjs/Toolbar/BackButton/index.js +16 -0
  131. package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
  132. package/build/commonjs/Toolbar/Toolbar.js +8 -4
  133. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  134. package/build/commonjs/Tooltip/Beaks/index.js +32 -0
  135. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
  136. package/build/commonjs/Tooltip/Tooltip.js +11 -18
  137. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  138. package/build/commonjs/Tooltip/index.js +19 -0
  139. package/build/commonjs/Tooltip/index.js.map +1 -1
  140. package/build/commonjs/Typography/Typography.js +9 -2
  141. package/build/commonjs/Typography/Typography.js.map +1 -1
  142. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  143. package/build/commonjs/hooks/useBreakpointUp.js +4 -1
  144. package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
  145. package/build/commonjs/hooks/useCollapsibleAppBar.js +3 -10
  146. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  147. package/build/commonjs/hooks/useContentContainerStyle.js +39 -25
  148. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  149. package/build/commonjs/hooks/useFadeInAppBar.js +2 -2
  150. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  151. package/build/commonjs/index.js +21 -0
  152. package/build/commonjs/index.js.map +1 -1
  153. package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
  154. package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
  155. package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
  156. package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
  157. package/build/commonjs/internal/icons/ChevronRight.js +4 -2
  158. package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
  159. package/build/commonjs/internal/icons/ChipClose.js +23 -0
  160. package/build/commonjs/internal/icons/ChipClose.js.map +1 -0
  161. package/build/commonjs/internal/icons/Clear.js +3 -3
  162. package/build/commonjs/internal/icons/Clear.js.map +1 -1
  163. package/build/commonjs/internal/icons/Close.js +4 -2
  164. package/build/commonjs/internal/icons/Close.js.map +1 -1
  165. package/build/commonjs/internal/icons/Search.js +2 -2
  166. package/build/commonjs/internal/icons/Search.js.map +1 -1
  167. package/build/commonjs/internal/icons/index.js +16 -0
  168. package/build/commonjs/internal/icons/index.js.map +1 -1
  169. package/build/module/Accordion/Accordion.js +15 -8
  170. package/build/module/Accordion/Accordion.js.map +1 -1
  171. package/build/module/Accordion/AccordionProps.js.map +1 -1
  172. package/build/module/Accordion/useVariantStyleMap.js +15 -8
  173. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  174. package/build/module/AppBar/AppBar.js +6 -2
  175. package/build/module/AppBar/AppBar.js.map +1 -1
  176. package/build/module/Badge/Badge.js +4 -3
  177. package/build/module/Badge/Badge.js.map +1 -1
  178. package/build/module/Badge/BadgeProps.js.map +1 -1
  179. package/build/module/Badge/useVariantStyleMap.js +2 -2
  180. package/build/module/Badge/useVariantStyleMap.js.map +1 -1
  181. package/build/module/BottomSheetTitle/BottomSheetTitle.js +5 -2
  182. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  183. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  184. package/build/module/Button/Button.js +27 -13
  185. package/build/module/Button/Button.js.map +1 -1
  186. package/build/module/Button/ButtonProps.js.map +1 -1
  187. package/build/module/Button/useVariantStyleMap.js +9 -0
  188. package/build/module/Button/useVariantStyleMap.js.map +1 -1
  189. package/build/module/ButtonBase/ButtonBase.js +1 -1
  190. package/build/module/ButtonBase/ButtonBase.js.map +1 -1
  191. package/build/module/ButtonBase/index.js +1 -1
  192. package/build/module/ButtonBase/index.js.map +1 -1
  193. package/build/module/Checkbox/Checkbox.js +4 -1
  194. package/build/module/Checkbox/Checkbox.js.map +1 -1
  195. package/build/module/Checkbox/useVariantStyleMap.js +6 -2
  196. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  197. package/build/module/Chip/Chip.js +21 -13
  198. package/build/module/Chip/Chip.js.map +1 -1
  199. package/build/module/Chip/ChipProps.js +1 -0
  200. package/build/module/Chip/ChipProps.js.map +1 -1
  201. package/build/module/Chip/index.js +1 -1
  202. package/build/module/Chip/index.js.map +1 -1
  203. package/build/module/Chip/useChipStyle.js +51 -31
  204. package/build/module/Chip/useChipStyle.js.map +1 -1
  205. package/build/module/Dialog/Dialog.js +10 -11
  206. package/build/module/Dialog/Dialog.js.map +1 -1
  207. package/build/module/Dialog/DialogProps.js +1 -1
  208. package/build/module/Dialog/DialogProps.js.map +1 -1
  209. package/build/module/Dialog/useDialogSectionStyle.js +6 -4
  210. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
  211. package/build/module/Dialog/useDialogStyle.js +18 -8
  212. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  213. package/build/module/DialogActions/DialogActions.js +0 -1
  214. package/build/module/DialogActions/DialogActions.js.map +1 -1
  215. package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
  216. package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
  217. package/build/module/DialogTitle/DialogTitle.js +6 -3
  218. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  219. package/build/module/Divider/Divider.js +7 -0
  220. package/build/module/Divider/Divider.js.map +1 -1
  221. package/build/module/Divider/DividerProps.js +1 -1
  222. package/build/module/Divider/DividerProps.js.map +1 -1
  223. package/build/module/Empty/Empty.js +1 -1
  224. package/build/module/Empty/Empty.js.map +1 -1
  225. package/build/module/Flexbox/Flexbox.js +2 -0
  226. package/build/module/Flexbox/Flexbox.js.map +1 -1
  227. package/build/module/Flexbox/FlexboxProps.js.map +1 -1
  228. package/build/module/IconButton/IconButton.js +3 -0
  229. package/build/module/IconButton/IconButton.js.map +1 -1
  230. package/build/module/IconButton/IconButtonProps.js +1 -1
  231. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  232. package/build/module/Image/Image.js +2 -2
  233. package/build/module/Image/Image.js.map +1 -1
  234. package/build/module/ImageCore/ImageCoreNative.js +1 -1
  235. package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
  236. package/build/module/ListItem/ListItem.js +36 -28
  237. package/build/module/ListItem/ListItem.js.map +1 -1
  238. package/build/module/ListItem/ListItemProps.js.map +1 -1
  239. package/build/module/ListItemIcon/ListItemIcon.js +1 -2
  240. package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
  241. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  242. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  243. package/build/module/ListItemText/ListItemText.js +17 -19
  244. package/build/module/ListItemText/ListItemText.js.map +1 -1
  245. package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
  246. package/build/module/ListSubheader/ListSubheader.js +1 -1
  247. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  248. package/build/module/Pagination/NumberPagination.js +4 -2
  249. package/build/module/Pagination/NumberPagination.js.map +1 -1
  250. package/build/module/Pagination/Pagination.js +2 -0
  251. package/build/module/Pagination/Pagination.js.map +1 -1
  252. package/build/module/Pagination/PaginationProps.js +1 -0
  253. package/build/module/Pagination/PaginationProps.js.map +1 -1
  254. package/build/module/Pagination/index.js +1 -1
  255. package/build/module/Pagination/index.js.map +1 -1
  256. package/build/module/PaginationItem/PaginationItem.js +28 -21
  257. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  258. package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
  259. package/build/module/Radio/Radio.js +10 -4
  260. package/build/module/Radio/Radio.js.map +1 -1
  261. package/build/module/RadioGroup/RadioGroup.js +2 -20
  262. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  263. package/build/module/Section/Section.js +19 -0
  264. package/build/module/Section/Section.js.map +1 -0
  265. package/build/module/Section/SectionProps.js +2 -0
  266. package/build/module/Section/SectionProps.js.map +1 -0
  267. package/build/module/Section/index.js +2 -0
  268. package/build/module/Section/index.js.map +1 -0
  269. package/build/module/ShadowView/ShadowView.native.js +4 -0
  270. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  271. package/build/module/SnackbarContent/SnackbarContent.js +26 -9
  272. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  273. package/build/module/Tab/Tab.js +22 -19
  274. package/build/module/Tab/Tab.js.map +1 -1
  275. package/build/module/Tab/TabProps.js +2 -1
  276. package/build/module/Tab/TabProps.js.map +1 -1
  277. package/build/module/Tab/index.js +1 -0
  278. package/build/module/Tab/index.js.map +1 -1
  279. package/build/module/Tab/useVariantStyleMap.js +59 -18
  280. package/build/module/Tab/useVariantStyleMap.js.map +1 -1
  281. package/build/module/TabBase/TabBase.js +1 -8
  282. package/build/module/TabBase/TabBase.js.map +1 -1
  283. package/build/module/TabBase/TabBaseProps.js.map +1 -1
  284. package/build/module/Tabs/Tabs.js +21 -7
  285. package/build/module/Tabs/Tabs.js.map +1 -1
  286. package/build/module/Tabs/TabsProps.js.map +1 -1
  287. package/build/module/Tabs/index.js.map +1 -1
  288. package/build/module/Tabs/useTabsStyle.js +70 -0
  289. package/build/module/Tabs/useTabsStyle.js.map +1 -0
  290. package/build/module/TextField/TextField.js +48 -12
  291. package/build/module/TextField/TextField.js.map +1 -1
  292. package/build/module/TextField/useVariantStyleMap.js +29 -29
  293. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  294. package/build/module/Toolbar/BackButton/BackButton.js +32 -0
  295. package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
  296. package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
  297. package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  298. package/build/module/Toolbar/BackButton/index.js +2 -0
  299. package/build/module/Toolbar/BackButton/index.js.map +1 -0
  300. package/build/module/Toolbar/Toolbar.js +7 -3
  301. package/build/module/Toolbar/Toolbar.js.map +1 -1
  302. package/build/module/Tooltip/Beaks/index.js +4 -0
  303. package/build/module/Tooltip/Beaks/index.js.map +1 -1
  304. package/build/module/Tooltip/Tooltip.js +4 -10
  305. package/build/module/Tooltip/Tooltip.js.map +1 -1
  306. package/build/module/Tooltip/index.js +1 -0
  307. package/build/module/Tooltip/index.js.map +1 -1
  308. package/build/module/Typography/Typography.js +9 -2
  309. package/build/module/Typography/Typography.js.map +1 -1
  310. package/build/module/Typography/TypographyProps.js.map +1 -1
  311. package/build/module/hooks/useBreakpointUp.js +4 -1
  312. package/build/module/hooks/useBreakpointUp.js.map +1 -1
  313. package/build/module/hooks/useCollapsibleAppBar.js +4 -10
  314. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  315. package/build/module/hooks/useContentContainerStyle.js +43 -25
  316. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  317. package/build/module/hooks/useFadeInAppBar.js +2 -2
  318. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  319. package/build/module/index.js +2 -0
  320. package/build/module/index.js.map +1 -1
  321. package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
  322. package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
  323. package/build/module/internal/icons/ChevronLeft.js +4 -2
  324. package/build/module/internal/icons/ChevronLeft.js.map +1 -1
  325. package/build/module/internal/icons/ChevronRight.js +4 -2
  326. package/build/module/internal/icons/ChevronRight.js.map +1 -1
  327. package/build/module/internal/icons/ChipClose.js +9 -0
  328. package/build/module/internal/icons/ChipClose.js.map +1 -0
  329. package/build/module/internal/icons/Clear.js +3 -3
  330. package/build/module/internal/icons/Clear.js.map +1 -1
  331. package/build/module/internal/icons/Close.js +4 -2
  332. package/build/module/internal/icons/Close.js.map +1 -1
  333. package/build/module/internal/icons/Search.js +2 -2
  334. package/build/module/internal/icons/Search.js.map +1 -1
  335. package/build/module/internal/icons/index.js +2 -0
  336. package/build/module/internal/icons/index.js.map +1 -1
  337. package/build/typescript/Accordion/AccordionProps.d.ts +4 -1
  338. package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
  339. package/build/typescript/Badge/BadgeProps.d.ts +10 -5
  340. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +1 -0
  341. package/build/typescript/Button/ButtonProps.d.ts +5 -0
  342. package/build/typescript/ButtonBase/index.d.ts +1 -1
  343. package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
  344. package/build/typescript/Chip/ChipProps.d.ts +11 -4
  345. package/build/typescript/Chip/index.d.ts +1 -1
  346. package/build/typescript/Chip/useChipStyle.d.ts +6 -3
  347. package/build/typescript/Dialog/DialogProps.d.ts +1 -6
  348. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  349. package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +9 -0
  350. package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -1
  351. package/build/typescript/Divider/DividerProps.d.ts +1 -1
  352. package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
  353. package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
  354. package/build/typescript/ListItem/ListItem.d.ts +1 -1
  355. package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
  356. package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
  357. package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
  358. package/build/typescript/Pagination/index.d.ts +2 -2
  359. package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
  360. package/build/typescript/Section/Section.d.ts +3 -0
  361. package/build/typescript/Section/SectionProps.d.ts +6 -0
  362. package/build/typescript/Section/index.d.ts +2 -0
  363. package/build/typescript/Tab/TabProps.d.ts +21 -2
  364. package/build/typescript/Tab/index.d.ts +2 -1
  365. package/build/typescript/Tab/useVariantStyleMap.d.ts +4 -2
  366. package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
  367. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  368. package/build/typescript/Tabs/TabsProps.d.ts +6 -1
  369. package/build/typescript/Tabs/index.d.ts +1 -1
  370. package/build/typescript/Tabs/useTabsStyle.d.ts +8 -0
  371. package/build/typescript/TextField/useVariantStyleMap.d.ts +2 -0
  372. package/build/typescript/Toolbar/BackButton/BackButton.d.ts +3 -0
  373. package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
  374. package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
  375. package/build/typescript/Toolbar/Toolbar.d.ts +6 -1
  376. package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
  377. package/build/typescript/Tooltip/index.d.ts +1 -0
  378. package/build/typescript/Typography/TypographyProps.d.ts +4 -0
  379. package/build/typescript/hooks/useCollapsibleAppBar.d.ts +0 -1
  380. package/build/typescript/hooks/useContentContainerStyle.d.ts +5 -8
  381. package/build/typescript/index.d.ts +2 -0
  382. package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
  383. package/build/typescript/internal/icons/ChipClose.d.ts +131 -0
  384. package/build/typescript/internal/icons/index.d.ts +2 -0
  385. package/package.json +5 -5
  386. package/src/Accordion/Accordion.tsx +18 -9
  387. package/src/Accordion/AccordionProps.ts +4 -2
  388. package/src/Accordion/useVariantStyleMap.ts +14 -6
  389. package/src/AppBar/AppBar.tsx +5 -1
  390. package/src/Badge/Badge.tsx +4 -3
  391. package/src/Badge/BadgeProps.ts +12 -6
  392. package/src/Badge/useVariantStyleMap.ts +2 -2
  393. package/src/BottomSheetTitle/BottomSheetTitle.tsx +4 -1
  394. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +1 -0
  395. package/src/Button/Button.tsx +28 -12
  396. package/src/Button/ButtonProps.ts +6 -0
  397. package/src/Button/useVariantStyleMap.ts +9 -0
  398. package/src/ButtonBase/ButtonBase.tsx +1 -1
  399. package/src/ButtonBase/index.ts +1 -1
  400. package/src/Checkbox/Checkbox.tsx +11 -8
  401. package/src/Checkbox/useVariantStyleMap.ts +6 -1
  402. package/src/Chip/Chip.tsx +24 -13
  403. package/src/Chip/ChipProps.ts +13 -4
  404. package/src/Chip/index.ts +1 -1
  405. package/src/Chip/useChipStyle.ts +59 -29
  406. package/src/Dialog/Dialog.tsx +12 -11
  407. package/src/Dialog/DialogProps.ts +1 -7
  408. package/src/Dialog/useDialogSectionStyle.ts +6 -4
  409. package/src/Dialog/useDialogStyle.ts +19 -7
  410. package/src/DialogActions/DialogActions.tsx +0 -1
  411. package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
  412. package/src/DialogTitle/DialogTitle.tsx +6 -1
  413. package/src/Divider/Divider.tsx +5 -0
  414. package/src/Divider/DividerProps.ts +1 -1
  415. package/src/Empty/Empty.tsx +1 -1
  416. package/src/Flexbox/Flexbox.tsx +2 -0
  417. package/src/Flexbox/FlexboxProps.ts +5 -0
  418. package/src/IconButton/IconButton.tsx +2 -0
  419. package/src/IconButton/IconButtonProps.ts +1 -0
  420. package/src/Image/Image.tsx +3 -3
  421. package/src/ImageCore/ImageCoreNative.tsx +1 -1
  422. package/src/ListItem/ListItem.tsx +61 -30
  423. package/src/ListItem/ListItemProps.ts +5 -0
  424. package/src/ListItemIcon/ListItemIcon.tsx +1 -2
  425. package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
  426. package/src/ListItemText/ListItemText.tsx +20 -28
  427. package/src/ListItemText/ListItemTextProps.ts +2 -10
  428. package/src/ListSubheader/ListSubheader.tsx +1 -1
  429. package/src/Pagination/NumberPagination.tsx +7 -2
  430. package/src/Pagination/Pagination.tsx +3 -2
  431. package/src/Pagination/PaginationProps.ts +15 -0
  432. package/src/Pagination/index.ts +2 -2
  433. package/src/PaginationItem/PaginationItem.tsx +31 -24
  434. package/src/PaginationItem/PaginationItemProps.ts +7 -0
  435. package/src/Radio/Radio.tsx +12 -3
  436. package/src/RadioGroup/RadioGroup.tsx +2 -28
  437. package/src/Section/Section.tsx +26 -0
  438. package/src/Section/SectionProps.ts +6 -0
  439. package/src/Section/index.ts +2 -0
  440. package/src/ShadowView/ShadowView.native.tsx +4 -0
  441. package/src/SnackbarContent/SnackbarContent.tsx +36 -15
  442. package/src/Tab/Tab.tsx +32 -22
  443. package/src/Tab/TabProps.ts +25 -2
  444. package/src/Tab/index.ts +2 -1
  445. package/src/Tab/useVariantStyleMap.ts +72 -19
  446. package/src/TabBase/TabBase.tsx +1 -9
  447. package/src/TabBase/TabBaseProps.ts +0 -6
  448. package/src/Tabs/Tabs.tsx +26 -8
  449. package/src/Tabs/TabsProps.ts +7 -1
  450. package/src/Tabs/index.ts +1 -1
  451. package/src/Tabs/useTabsStyle.ts +77 -0
  452. package/src/TextField/TextField.tsx +69 -26
  453. package/src/TextField/useVariantStyleMap.ts +29 -27
  454. package/src/Toolbar/BackButton/BackButton.tsx +44 -0
  455. package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
  456. package/src/Toolbar/BackButton/index.ts +2 -0
  457. package/src/Toolbar/Toolbar.tsx +6 -1
  458. package/src/Tooltip/Beaks/index.ts +4 -0
  459. package/src/Tooltip/Tooltip.tsx +4 -9
  460. package/src/Tooltip/index.ts +1 -0
  461. package/src/Typography/Typography.tsx +3 -1
  462. package/src/Typography/TypographyProps.ts +5 -0
  463. package/src/hooks/useBreakpointUp.ts +3 -1
  464. package/src/hooks/useCollapsibleAppBar.ts +4 -23
  465. package/src/hooks/useContentContainerStyle.ts +43 -31
  466. package/src/hooks/useFadeInAppBar.ts +2 -2
  467. package/src/index.ts +3 -0
  468. package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
  469. package/src/internal/icons/ChevronLeft.tsx +4 -1
  470. package/src/internal/icons/ChevronRight.tsx +4 -1
  471. package/src/internal/icons/ChipClose.tsx +13 -0
  472. package/src/internal/icons/Clear.tsx +3 -3
  473. package/src/internal/icons/Close.tsx +4 -1
  474. package/src/internal/icons/Search.tsx +2 -2
  475. package/src/internal/icons/index.ts +2 -0
  476. package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
  477. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
  478. package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
  479. package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
  480. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
  481. package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
@@ -1,12 +1,17 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useWindowDimensions } from 'react-native';
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
3
4
  import { useTheme } from '../styles';
4
- export default function useDialogStyle(size, fullScreen) {
5
+ export default function useDialogStyle(size) {
5
6
  const theme = useTheme();
6
7
  const {
7
8
  height: windowHeight,
8
9
  width: windowWidth
9
10
  } = useWindowDimensions();
11
+ const {
12
+ bottom: bottomSafeAreaInset,
13
+ top: topSafeAreaInset
14
+ } = useSafeAreaInsets();
10
15
  return useMemo(() => {
11
16
  var _sizeStyleMap$size;
12
17
 
@@ -21,31 +26,36 @@ export default function useDialogStyle(size, fullScreen) {
21
26
  maxWidth: 512,
22
27
  minHeight: 360,
23
28
  width: 512
29
+ },
30
+ full: {
31
+ paddingBottom: bottomSafeAreaInset,
32
+ paddingTop: Math.max(0, topSafeAreaInset - 3)
24
33
  }
25
34
  };
26
- const containerPaddingVertical = theme.spacing(6);
35
+ const containerPaddingVertical = 24;
27
36
  const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;
28
37
  const dialogMaxWidth = (_sizeStyleMap$size = sizeStyleMap[size]) === null || _sizeStyleMap$size === void 0 ? void 0 : _sizeStyleMap$size.maxWidth;
38
+ const isFullScreen = size === 'full';
29
39
  return {
30
40
  root: {
31
41
  alignItems: 'center',
32
42
  justifyContent: 'center',
33
43
  zIndex: theme.zIndex.dialog
34
44
  },
35
- container: fullScreen ? {
45
+ container: isFullScreen ? {
36
46
  height: '100%',
37
47
  width: '100%'
38
48
  } : {
39
49
  alignItems: 'center',
40
- // TODO: need to refactor breakpoints.
41
- paddingHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4),
50
+ paddingHorizontal: windowWidth > theme.breakpoints.values.xs ? 24 : 16,
42
51
  paddingVertical: containerPaddingVertical,
43
52
  width: '100%'
44
53
  },
45
- paper: fullScreen ? {
54
+ paper: isFullScreen ? {
46
55
  backgroundColor: theme.palette.surface.base,
47
56
  height: '100%',
48
- width: '100%'
57
+ width: '100%',
58
+ ...sizeStyleMap[size]
49
59
  } : {
50
60
  backgroundColor: theme.palette.surface.base,
51
61
  borderRadius: theme.shape.radius.xl,
@@ -64,6 +74,6 @@ export default function useDialogStyle(size, fullScreen) {
64
74
  width: '100%'
65
75
  }
66
76
  };
67
- }, [theme, windowHeight, windowWidth, size, fullScreen]);
77
+ }, [theme, windowHeight, windowWidth, size, bottomSafeAreaInset, topSafeAreaInset]);
68
78
  }
69
79
  //# sourceMappingURL=useDialogStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useWindowDimensions","useTheme","useDialogStyle","size","fullScreen","theme","height","windowHeight","width","windowWidth","sizeStyleMap","small","maxWidth","medium","large","minHeight","containerPaddingVertical","spacing","dialogMaxHeight","dialogMaxWidth","root","alignItems","justifyContent","zIndex","dialog","container","paddingHorizontal","paddingVertical","paper","backgroundColor","palette","surface","base","borderRadius","shape","radius","xl","maxHeight","overflow","topElementContainer","topElementContent","position","bottom"],"sources":["useDialogStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport type { FountainUiStyle, NamedStylesStringUnion } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { DialogSize } from './DialogProps';\n\ntype DialogStyleKeys =\n | 'root'\n | 'container'\n | 'paper'\n | 'topElementContainer'\n | 'topElementContent';\n\ntype DialogStyles = NamedStylesStringUnion<DialogStyleKeys>;\n\nexport default function useDialogStyle(size: DialogSize, fullScreen: boolean): DialogStyles {\n const theme = useTheme();\n\n const {\n height: windowHeight,\n width: windowWidth,\n } = useWindowDimensions();\n\n return useMemo(() => {\n const sizeStyleMap: Record<DialogSize, FountainUiStyle> = {\n small: {\n maxWidth: 260,\n },\n medium: {\n maxWidth: 400,\n },\n large: {\n maxWidth: 512,\n minHeight: 360,\n width: 512,\n },\n };\n\n const containerPaddingVertical = theme.spacing(6);\n const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;\n const dialogMaxWidth = sizeStyleMap[size]?.maxWidth;\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: theme.zIndex.dialog,\n },\n container: fullScreen ? {\n height: '100%',\n width: '100%',\n } : {\n alignItems: 'center',\n // TODO: need to refactor breakpoints.\n paddingHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4),\n paddingVertical: containerPaddingVertical,\n width: '100%',\n },\n paper: fullScreen ? {\n backgroundColor: theme.palette.surface.base,\n height: '100%',\n width: '100%',\n } : {\n backgroundColor: theme.palette.surface.base,\n borderRadius: theme.shape.radius.xl,\n maxHeight: dialogMaxHeight,\n overflow: 'hidden',\n width: '100%',\n ...sizeStyleMap[size],\n },\n topElementContainer: {\n maxWidth: dialogMaxWidth,\n width: '100%',\n },\n topElementContent: {\n position: 'absolute',\n bottom: 0,\n width: '100%',\n },\n };\n }, [theme, windowHeight, windowWidth, size, fullScreen]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AACA,SAASC,mBAAT,QAAoC,cAApC;AAEA,SAASC,QAAT,QAAyB,WAAzB;AAYA,eAAe,SAASC,cAAT,CAAwBC,IAAxB,EAA0CC,UAA1C,EAA6E;EACxF,MAAMC,KAAK,GAAGJ,QAAQ,EAAtB;EAEA,MAAM;IACFK,MAAM,EAAEC,YADN;IAEFC,KAAK,EAAEC;EAFL,IAGFT,mBAAmB,EAHvB;EAKA,OAAOD,OAAO,CAAC,MAAM;IAAA;;IACjB,MAAMW,YAAiD,GAAG;MACtDC,KAAK,EAAE;QACHC,QAAQ,EAAE;MADP,CAD+C;MAItDC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EAAE;QACjB3B,QAAQ,EAAEO,cADO;QAEjBX,KAAK,EAAE;MAFU,CA5BlB;MAgCHgC,iBAAiB,EAAE;QACfC,QAAQ,EAAE,UADK;QAEfC,MAAM,EAAE,CAFO;QAGflC,KAAK,EAAE;MAHQ;IAhChB,CAAP;EAsCH,CAzDa,EAyDX,CAACH,KAAD,EAAQE,YAAR,EAAsBE,WAAtB,EAAmCN,IAAnC,EAAyCC,UAAzC,CAzDW,CAAd;AA0DH"}
1
+ {"version":3,"names":["useMemo","useWindowDimensions","useSafeAreaInsets","useTheme","useDialogStyle","size","theme","height","windowHeight","width","windowWidth","bottom","bottomSafeAreaInset","top","topSafeAreaInset","sizeStyleMap","small","maxWidth","medium","large","minHeight","full","paddingBottom","paddingTop","Math","max","containerPaddingVertical","dialogMaxHeight","dialogMaxWidth","isFullScreen","root","alignItems","justifyContent","zIndex","dialog","container","paddingHorizontal","breakpoints","values","xs","paddingVertical","paper","backgroundColor","palette","surface","base","borderRadius","shape","radius","xl","maxHeight","overflow","topElementContainer","topElementContent","position"],"sources":["useDialogStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport type { FountainUiStyle, NamedStylesStringUnion } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { DialogSize } from './DialogProps';\n\ntype DialogStyleKeys =\n | 'root'\n | 'container'\n | 'paper'\n | 'topElementContainer'\n | 'topElementContent';\n\ntype DialogStyles = NamedStylesStringUnion<DialogStyleKeys>;\n\nexport default function useDialogStyle(size: DialogSize): DialogStyles {\n const theme = useTheme();\n\n const {\n height: windowHeight,\n width: windowWidth,\n } = useWindowDimensions();\n\n const {\n bottom: bottomSafeAreaInset,\n top: topSafeAreaInset,\n } = useSafeAreaInsets();\n\n return useMemo(() => {\n const sizeStyleMap: Record<DialogSize, FountainUiStyle> = {\n small: {\n maxWidth: 260,\n },\n medium: {\n maxWidth: 400,\n },\n large: {\n maxWidth: 512,\n minHeight: 360,\n width: 512,\n },\n full: {\n paddingBottom: bottomSafeAreaInset,\n paddingTop: Math.max(0, topSafeAreaInset - 3),\n },\n };\n\n const containerPaddingVertical = 24;\n const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;\n const dialogMaxWidth = sizeStyleMap[size]?.maxWidth;\n\n const isFullScreen = size === 'full';\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: theme.zIndex.dialog,\n },\n container: isFullScreen ? {\n height: '100%',\n width: '100%',\n } : {\n alignItems: 'center',\n paddingHorizontal: windowWidth > theme.breakpoints.values.xs ? 24 : 16,\n paddingVertical: containerPaddingVertical,\n width: '100%',\n },\n paper: isFullScreen ? {\n backgroundColor: theme.palette.surface.base,\n height: '100%',\n width: '100%',\n ...sizeStyleMap[size],\n } : {\n backgroundColor: theme.palette.surface.base,\n borderRadius: theme.shape.radius.xl,\n maxHeight: dialogMaxHeight,\n overflow: 'hidden',\n width: '100%',\n ...sizeStyleMap[size],\n },\n topElementContainer: {\n maxWidth: dialogMaxWidth,\n width: '100%',\n },\n topElementContent: {\n position: 'absolute',\n bottom: 0,\n width: '100%',\n },\n };\n }, [theme, windowHeight, windowWidth, size, bottomSafeAreaInset, topSafeAreaInset]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AACA,SAASC,mBAAT,QAAoC,cAApC;AACA,SAASC,iBAAT,QAAkC,gCAAlC;AAEA,SAASC,QAAT,QAAyB,WAAzB;AAYA,eAAe,SAASC,cAAT,CAAwBC,IAAxB,EAAwD;EACnE,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,MAAM;IACFI,MAAM,EAAEC,YADN;IAEFC,KAAK,EAAEC;EAFL,IAGFT,mBAAmB,EAHvB;EAKA,MAAM;IACFU,MAAM,EAAEC,mBADN;IAEFC,GAAG,EAAEC;EAFH,IAGFZ,iBAAiB,EAHrB;EAKA,OAAOF,OAAO,CAAC,MAAM;IAA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MAJG,CAAH,GAKf;QACAqC,eAAe,EAAEpC,KAAK,CAACqC,OAAN,CAAcC,OAAd,CAAsBC,IADvC;QAEAC,YAAY,EAAExC,KAAK,CAACyC,KAAN,CAAYC,MAAZ,CAAmBC,EAFjC;QAGAC,SAAS,EAAEvB,eAHX;QAIAwB,QAAQ,EAAE,QAJV;QAKA1C,KAAK,EAAE,MALP;QAMA,GAAGM,YAAY,CAACV,IAAD;MANf,CApBD;MA4BH+C,mBAAmB,EAAE;QACjBnC,QAAQ,EAAEW,cADO;QAEjBnB,KAAK,EAAE;MAFU,CA5BlB;MAgCH4C,iBAAiB,EAAE;QACfC,QAAQ,EAAE,UADK;QAEf3C,MAAM,EAAE,CAFO;QAGfF,KAAK,EAAE;MAHQ;IAhChB,CAAP;EAsCH,CA/Da,EA+DX,CAACH,KAAD,EAAQE,YAAR,EAAsBE,WAAtB,EAAmCL,IAAnC,EAAyCO,mBAAzC,EAA8DE,gBAA9D,CA/DW,CAAd;AAgEH"}
@@ -9,7 +9,6 @@ const useStyles = function () {
9
9
  const theme = useTheme();
10
10
  return {
11
11
  root: {
12
- paddingTop: theme.spacing(2),
13
12
  paddingBottom: theme.spacing(4)
14
13
  }
15
14
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","Column","useDialogSectionStyle","css","useTheme","useStyles","theme","root","paddingTop","spacing","paddingBottom","DialogActions","props","children","style","styleProp","otherProps","styles","sectionStyle","rootStyle"],"sources":["DialogActions.tsx"],"sourcesContent":["import React from 'react';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { css, useTheme } from '../styles';\nimport type DialogActionsProps from './DialogActionsProps';\n\ntype DialogActionsStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<DialogActionsStyles> = function (): DialogActionsStyles {\n const theme = useTheme();\n\n return {\n root: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(4),\n },\n };\n};\n\nexport default function DialogActions(props: DialogActionsProps) {\n const {\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const sectionStyle = useDialogSectionStyle();\n\n const rootStyle = css([\n styles.root,\n sectionStyle,\n styleProp,\n ]);\n\n return (\n <Column\n style={rootStyle}\n {...otherProps}\n >\n {children}\n </Column>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAKA,MAAMC,SAAyC,GAAG,YAAiC;EAC/E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAc,CAAd,CADV;MAEFC,aAAa,EAAEJ,KAAK,CAACG,OAAN,CAAc,CAAd;IAFb;EADH,CAAP;AAMH,CATD;;AAWA,eAAe,SAASE,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAGZ,SAAS,EAAxB;EAEA,MAAMa,YAAY,GAAGhB,qBAAqB,EAA1C;EAEA,MAAMiB,SAAS,GAAGhB,GAAG,CAAC,CAClBc,MAAM,CAACV,IADW,EAElBW,YAFkB,EAGlBH,SAHkB,CAAD,CAArB;EAMA,oBACI,oBAAC,MAAD;IACI,KAAK,EAAEI;EADX,GAEQH,UAFR,GAIKH,QAJL,CADJ;AAQH;AAAA"}
1
+ {"version":3,"names":["React","Column","useDialogSectionStyle","css","useTheme","useStyles","theme","root","paddingBottom","spacing","DialogActions","props","children","style","styleProp","otherProps","styles","sectionStyle","rootStyle"],"sources":["DialogActions.tsx"],"sourcesContent":["import React from 'react';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { css, useTheme } from '../styles';\nimport type DialogActionsProps from './DialogActionsProps';\n\ntype DialogActionsStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<DialogActionsStyles> = function (): DialogActionsStyles {\n const theme = useTheme();\n\n return {\n root: {\n paddingBottom: theme.spacing(4),\n },\n };\n};\n\nexport default function DialogActions(props: DialogActionsProps) {\n const {\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const sectionStyle = useDialogSectionStyle();\n\n const rootStyle = css([\n styles.root,\n sectionStyle,\n styleProp,\n ]);\n\n return (\n <Column\n style={rootStyle}\n {...otherProps}\n >\n {children}\n </Column>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAKA,MAAMC,SAAyC,GAAG,YAAiC;EAC/E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,aAAa,EAAEF,KAAK,CAACG,OAAN,CAAc,CAAd;IADb;EADH,CAAP;AAKH,CARD;;AAUA,eAAe,SAASC,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAGX,SAAS,EAAxB;EAEA,MAAMY,YAAY,GAAGf,qBAAqB,EAA1C;EAEA,MAAMgB,SAAS,GAAGf,GAAG,CAAC,CAClBa,MAAM,CAACT,IADW,EAElBU,YAFkB,EAGlBH,SAHkB,CAAD,CAArB;EAMA,oBACI,oBAAC,MAAD;IACI,KAAK,EAAEI;EADX,GAEQH,UAFR,GAIKH,QAJL,CADJ;AAQH;AAAA"}
@@ -0,0 +1,65 @@
1
+ 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); }
2
+
3
+ import React from 'react';
4
+ import { StyleSheet, Text, View } from 'react-native';
5
+ import { createFontStyle, css, useTheme } from '../styles';
6
+ import IconButton from '../IconButton';
7
+ import { ChevronLeft, Close } from '../internal';
8
+ const styles = StyleSheet.create({
9
+ root: {
10
+ alignItems: 'center',
11
+ height: 64,
12
+ justifyContent: 'center',
13
+ paddingHorizontal: 80,
14
+ width: '100%'
15
+ },
16
+ backButton: {
17
+ height: 40,
18
+ left: 20,
19
+ paddingLeft: 5,
20
+ paddingRight: 11,
21
+ paddingVertical: 8,
22
+ position: 'absolute',
23
+ width: 40
24
+ },
25
+ closeButton: {
26
+ height: 40,
27
+ left: 20,
28
+ padding: 8,
29
+ position: 'absolute',
30
+ width: 40
31
+ }
32
+ });
33
+ export default function DialogLargeTitle(props) {
34
+ const {
35
+ children,
36
+ closeButtonType = 'close',
37
+ onClose,
38
+ style: styleProp,
39
+ ...otherProps
40
+ } = props;
41
+ const theme = useTheme();
42
+ const fontStyle = createFontStyle(theme, {
43
+ selector: typo => typo.header4.semiBold,
44
+ color: theme.palette.text.strong
45
+ });
46
+ const rootStyle = css([styles.root, styleProp]);
47
+ return /*#__PURE__*/React.createElement(View, _extends({
48
+ style: rootStyle
49
+ }, otherProps), typeof onClose === 'function' ? closeButtonType === 'back' ? /*#__PURE__*/React.createElement(IconButton, {
50
+ style: styles.backButton,
51
+ onPress: onClose
52
+ }, /*#__PURE__*/React.createElement(ChevronLeft, {
53
+ color: 'strong',
54
+ size: 'large'
55
+ })) : /*#__PURE__*/React.createElement(IconButton, {
56
+ style: styles.closeButton,
57
+ onPress: onClose
58
+ }, /*#__PURE__*/React.createElement(Close, {
59
+ color: 'strong',
60
+ size: 'large'
61
+ })) : null, /*#__PURE__*/React.createElement(Text, {
62
+ style: fontStyle
63
+ }, children));
64
+ }
65
+ //# sourceMappingURL=DialogLargeTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","Text","View","createFontStyle","css","useTheme","IconButton","ChevronLeft","Close","styles","create","root","alignItems","height","justifyContent","paddingHorizontal","width","backButton","left","paddingLeft","paddingRight","paddingVertical","position","closeButton","padding","DialogLargeTitle","props","children","closeButtonType","onClose","style","styleProp","otherProps","theme","fontStyle","selector","typo","header4","semiBold","color","palette","text","strong","rootStyle"],"sources":["DialogLargeTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport type { DialogProps } from '../Dialog';\nimport type DialogTitleProps from './DialogTitleProps';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport IconButton from '../IconButton';\nimport { ChevronLeft, Close } from '../internal';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n height: 64,\n justifyContent: 'center',\n paddingHorizontal: 80,\n width: '100%',\n },\n backButton: {\n height: 40,\n left: 20,\n paddingLeft: 5,\n paddingRight: 11,\n paddingVertical: 8,\n position: 'absolute',\n width: 40,\n },\n closeButton: {\n height: 40,\n left: 20,\n padding: 8,\n position: 'absolute',\n width: 40,\n },\n});\n\ninterface DialogLargeTitleProps extends DialogTitleProps {\n closeButtonType?: 'back' | 'close';\n onClose: DialogProps['onClose'];\n}\n\nexport default function DialogLargeTitle(props: DialogLargeTitleProps) {\n const {\n children,\n closeButtonType = 'close',\n onClose,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.header4.semiBold,\n color: theme.palette.text.strong,\n });\n\n const rootStyle = css([\n styles.root,\n styleProp,\n ]);\n\n return (\n <View\n style={rootStyle}\n {...otherProps}\n >\n {typeof onClose === 'function' ? (\n closeButtonType === 'back' ? (\n <IconButton\n style={styles.backButton}\n onPress={onClose}\n >\n <ChevronLeft\n color={'strong'}\n size={'large'}\n />\n </IconButton>\n ) : (\n <IconButton\n style={styles.closeButton}\n onPress={onClose}\n >\n <Close\n color={'strong'}\n size={'large'}\n />\n </IconButton>\n )\n ) : null}\n\n <Text style={fontStyle}>\n {children}\n </Text>\n </View>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,EAAqBC,IAArB,EAA2BC,IAA3B,QAAuC,cAAvC;AAGA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,WAAT,EAAsBC,KAAtB,QAAmC,aAAnC;AAEA,MAAMC,MAAM,GAAGT,UAAU,CAACU,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,UAAU,EAAE,QADV;IAEFC,MAAM,EAAE,EAFN;IAGFC,cAAc,EAAE,QAHd;IAIFC,iBAAiB,EAAE,EAJjB;IAKFC,KAAK,EAAE;EALL,CADuB;EAQ7BC,UAAU,EAAE;IACRJ,MAAM,EAAE,EADA;IAERK,IAAI,EAAE,EAFE;IAGRC,WAAW,EAAE,CAHL;IAIRC,YAAY,EAAE,EAJN;IAKRC,eAAe,EAAE,CALT;IAMRC,QAAQ,EAAE,UANF;IAORN,KAAK,EAAE;EAPC,CARiB;EAiB7BO,WAAW,EAAE;IACTV,MAAM,EAAE,EADC;IAETK,IAAI,EAAE,EAFG;IAGTM,OAAO,EAAE,CAHA;IAITF,QAAQ,EAAE,UAJD;IAKTN,KAAK,EAAE;EALE;AAjBgB,CAAlB,CAAf;AA+BA,eAAe,SAASS,gBAAT,CAA0BC,KAA1B,EAAwD;EACnE,MAAM;IACFC,QADE;IAEFC,eAAe,GAAG,OAFhB;IAGFC,OAHE;IAIFC,KAAK,EAAEC,SAJL;IAKF,GAAGC;EALD,IAMFN,KANJ;EAQA,MAAMO,KAAK,GAAG5B,QAAQ,EAAtB;EAEA,MAAM6B,SAAS,GAAG/B,eAAe,CAAC8B,KAAD,EAAQ;IACrCE,QAAQ,EAAGC,IAAD,IAAUA,IAAI,CAACC,OAAL,CAAaC,QADI;IAErCC,KAAK,EAAEN,KAAK,CAACO,OAAN,CAAcC,IAAd,CAAmBC;EAFW,CAAR,CAAjC;EAKA,MAAMC,SAAS,GAAGvC,GAAG,CAAC,CAClBK,MAAM,CAACE,IADW,EAElBoB,SAFkB,CAAD,CAArB;EAKA,oBACI,oBAAC,IAAD;IACI,KAAK,EAAEY;EADX,GAEQX,UAFR,GAIK,OAAOH,OAAP,KAAmB,UAAnB,GACGD,eAAe,KAAK,MAApB,gBACI,oBAAC,UAAD;IACI,KAAK,EAAEnB,MAAM,CAACQ,UADlB;IAEI,OAAO,EAAEY;EAFb,gBAII,oBAAC,WAAD;IACI,KAAK,EAAE,QADX;IAEI,IAAI,EAAE;EAFV,EAJJ,CADJ,gBAWI,oBAAC,UAAD;IACI,KAAK,EAAEpB,MAAM,CAACc,WADlB;IAEI,OAAO,EAAEM;EAFb,gBAII,oBAAC,KAAD;IACI,KAAK,EAAE,QADX;IAEI,IAAI,EAAE;EAFV,EAJJ,CAZP,GAsBG,IA1BR,eA4BI,oBAAC,IAAD;IAAM,KAAK,EAAEK;EAAb,GACKP,QADL,CA5BJ,CADJ;AAkCH"}
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  import { Text, View } from 'react-native';
5
5
  import { useDialogSectionStyle } from '../Dialog';
6
6
  import { createFontStyle, css, useTheme } from '../styles';
7
+ import DialogLargeTitle from './DialogLargeTitle';
7
8
 
8
9
  const useStyles = function () {
9
10
  const theme = useTheme();
@@ -17,7 +18,7 @@ const useStyles = function () {
17
18
  };
18
19
  };
19
20
 
20
- export default function DialogTitle(props) {
21
+ const DialogTitle = props => {
21
22
  const {
22
23
  children,
23
24
  style: styleProp,
@@ -37,6 +38,8 @@ export default function DialogTitle(props) {
37
38
  }), typeof children === 'string' ? /*#__PURE__*/React.createElement(Text, {
38
39
  style: titleStyle
39
40
  }, children) : children);
40
- }
41
- ;
41
+ };
42
+
43
+ DialogTitle.Large = DialogLargeTitle;
44
+ export default DialogTitle;
42
45
  //# sourceMappingURL=DialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","useDialogSectionStyle","createFontStyle","css","useTheme","useStyles","theme","root","paddingTop","spacing","title","textAlign","DialogTitle","props","children","style","styleProp","otherProps","styles","sectionStyle","rootStyle","titleFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","titleStyle"],"sources":["DialogTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type DialogTitleProps from './DialogTitleProps';\n\ntype DialogTitleStyles = NamedStylesStringUnion<'root' | 'title'>;\n\nconst useStyles: UseStyles<DialogTitleStyles> = function (): DialogTitleStyles {\n const theme = useTheme();\n\n return {\n root: {\n paddingTop: theme.spacing(6.5),\n },\n title: {\n textAlign: 'center',\n },\n };\n};\n\nexport default function DialogTitle(props: DialogTitleProps) {\n const {\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const sectionStyle = useDialogSectionStyle();\n\n const rootStyle = css([\n styles.root,\n sectionStyle,\n styleProp,\n ]);\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.header3.semiBold,\n color: theme.palette.text.strong,\n });\n\n const titleStyle = css([\n styles.title,\n titleFontStyle,\n ]);\n\n return (\n <View\n {...otherProps}\n style={rootStyle}\n >\n {typeof children === 'string' ? (\n <Text style={titleStyle}>\n {children}\n </Text>\n ) : (children)}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAEA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;;AAKA,MAAMC,SAAuC,GAAG,YAA+B;EAC3E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAc,GAAd;IADV,CADH;IAIHC,KAAK,EAAE;MACHC,SAAS,EAAE;IADR;EAJJ,CAAP;AAQH,CAXD;;AAaA,eAAe,SAASC,WAAT,CAAqBC,KAArB,EAA8C;EACzD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMP,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMc,MAAM,GAAGb,SAAS,EAAxB;EAEA,MAAMc,YAAY,GAAGlB,qBAAqB,EAA1C;EAEA,MAAMmB,SAAS,GAAGjB,GAAG,CAAC,CAClBe,MAAM,CAACX,IADW,EAElBY,YAFkB,EAGlBH,SAHkB,CAAD,CAArB;EAMA,MAAMK,cAAc,GAAGnB,eAAe,CAACI,KAAD,EAAQ;IAC1CgB,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,OAAX,CAAmBC,QADH;IAE1CC,KAAK,EAAEpB,KAAK,CAACqB,OAAN,CAAcC,IAAd,CAAmBC;EAFgB,CAAR,CAAtC;EAKA,MAAMC,UAAU,GAAG3B,GAAG,CAAC,CACnBe,MAAM,CAACR,KADY,EAEnBW,cAFmB,CAAD,CAAtB;EAKA,oBACI,oBAAC,IAAD,eACQJ,UADR;IAEI,KAAK,EAAEG;EAFX,IAIK,OAAON,QAAP,KAAoB,QAApB,gBACG,oBAAC,IAAD;IAAM,KAAK,EAAEgB;EAAb,GACKhB,QADL,CADH,GAIIA,QART,CADJ;AAYH;AAAA"}
1
+ {"version":3,"names":["React","Text","View","useDialogSectionStyle","createFontStyle","css","useTheme","DialogLargeTitle","useStyles","theme","root","paddingTop","spacing","title","textAlign","DialogTitle","props","children","style","styleProp","otherProps","styles","sectionStyle","rootStyle","titleFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","titleStyle","Large"],"sources":["DialogTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport DialogLargeTitle from './DialogLargeTitle';\nimport type DialogTitleProps from './DialogTitleProps';\n\ntype DialogTitleStyles = NamedStylesStringUnion<'root' | 'title'>;\n\nconst useStyles: UseStyles<DialogTitleStyles> = function (): DialogTitleStyles {\n const theme = useTheme();\n\n return {\n root: {\n paddingTop: theme.spacing(6.5),\n },\n title: {\n textAlign: 'center',\n },\n };\n};\n\nconst DialogTitle = (props: DialogTitleProps) => {\n const {\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const sectionStyle = useDialogSectionStyle();\n\n const rootStyle = css([\n styles.root,\n sectionStyle,\n styleProp,\n ]);\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.header3.semiBold,\n color: theme.palette.text.strong,\n });\n\n const titleStyle = css([\n styles.title,\n titleFontStyle,\n ]);\n\n return (\n <View\n {...otherProps}\n style={rootStyle}\n >\n {typeof children === 'string' ? (\n <Text style={titleStyle}>\n {children}\n </Text>\n ) : (children)}\n </View>\n );\n};\n\nDialogTitle.Large = DialogLargeTitle;\n\nexport default DialogTitle;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAEA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,OAAOC,gBAAP,MAA6B,oBAA7B;;AAKA,MAAMC,SAAuC,GAAG,YAA+B;EAC3E,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,OAAO;IACHI,IAAI,EAAE;MACFC,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAc,GAAd;IADV,CADH;IAIHC,KAAK,EAAE;MACHC,SAAS,EAAE;IADR;EAJJ,CAAP;AAQH,CAXD;;AAaA,MAAMC,WAAW,GAAIC,KAAD,IAA6B;EAC7C,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMP,KAAK,GAAGH,QAAQ,EAAtB;EAEA,MAAMe,MAAM,GAAGb,SAAS,EAAxB;EAEA,MAAMc,YAAY,GAAGnB,qBAAqB,EAA1C;EAEA,MAAMoB,SAAS,GAAGlB,GAAG,CAAC,CAClBgB,MAAM,CAACX,IADW,EAElBY,YAFkB,EAGlBH,SAHkB,CAAD,CAArB;EAMA,MAAMK,cAAc,GAAGpB,eAAe,CAACK,KAAD,EAAQ;IAC1CgB,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,OAAX,CAAmBC,QADH;IAE1CC,KAAK,EAAEpB,KAAK,CAACqB,OAAN,CAAcC,IAAd,CAAmBC;EAFgB,CAAR,CAAtC;EAKA,MAAMC,UAAU,GAAG5B,GAAG,CAAC,CACnBgB,MAAM,CAACR,KADY,EAEnBW,cAFmB,CAAD,CAAtB;EAKA,oBACI,oBAAC,IAAD,eACQJ,UADR;IAEI,KAAK,EAAEG;EAFX,IAIK,OAAON,QAAP,KAAoB,QAApB,gBACG,oBAAC,IAAD;IAAM,KAAK,EAAEgB;EAAb,GACKhB,QADL,CADH,GAIIA,QART,CADJ;AAYH,CAzCD;;AA2CAF,WAAW,CAACmB,KAAZ,GAAoB3B,gBAApB;AAEA,eAAeQ,WAAf"}
@@ -2,6 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
 
3
3
  import React from 'react';
4
4
  import { Text, View } from 'react-native';
5
+ import { commonColors } from '@fountain-ui/styles';
5
6
  import { createFontStyle, css, StyleSheet, useTheme } from '../styles';
6
7
  const styles = StyleSheet.create({
7
8
  container: {
@@ -27,6 +28,12 @@ function selectBorderColor(theme, variant, vertical) {
27
28
 
28
29
  case 'strong':
29
30
  return vertical ? theme.palette.border.weak : theme.palette.border.base;
31
+
32
+ case 'strongStatic':
33
+ return commonColors.opacity.white['13'];
34
+
35
+ case 'baseStatic':
36
+ return commonColors.opacity.white['10'];
30
37
  }
31
38
  }
32
39
 
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","createFontStyle","css","StyleSheet","useTheme","styles","create","container","alignSelf","alignItems","row","flexDirection","column","divider","flexGrow","selectBorderColor","theme","variant","vertical","palette","border","weaker","weak","base","Divider","props","borderWidth","borderWidthProp","children","childrenProp","elementAlign","inset","marginBetweenChildren","style","otherProps","fontColor","text","borderColor","marginSize","spacing","insetSize","marginLeft","marginRight","marginTop","marginBottom","marginStyle","insetStyle","borderColorStyle","borderWidthStyle","borderRightWidth","borderBottomWidth","containerStyle","undefined","dividerStyle","dividerMarginSize","startDividerStyle","display","endDividerStyle","fontStyle","selector","typo","caption2","medium","color","element"],"sources":["Divider.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport type { Theme } from '@fountain-ui/styles';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport { ExtendedStyle } from '../types';\nimport type DividerProps from './DividerProps';\nimport type { DividerVariant } from './DividerProps';\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: 'stretch',\n alignItems: 'center',\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n divider: {\n flexGrow: 1,\n },\n});\n\nfunction selectBorderColor(theme: Theme, variant: DividerVariant, vertical: boolean) {\n switch (variant) {\n default:\n case 'base':\n return vertical ? theme.palette.border.weaker : theme.palette.border.weak;\n case 'strong':\n return vertical ? theme.palette.border.weak : theme.palette.border.base;\n }\n}\n\nexport default function Divider(props: DividerProps) {\n const {\n borderWidth: borderWidthProp,\n children: childrenProp,\n elementAlign = 'center',\n inset = 0,\n marginBetweenChildren = 2,\n style,\n variant = 'base' as DividerVariant,\n vertical = false,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const borderWidth = borderWidthProp ?? (vertical ? 1 : 0.5);\n const fontColor = theme.palette.text.weak;\n const borderColor = selectBorderColor(theme, variant, vertical);\n const marginSize = theme.spacing(1);\n const insetSize = theme.spacing(inset);\n\n const marginLeft = marginSize;\n const marginRight = marginSize;\n const marginTop = marginSize;\n const marginBottom = marginSize;\n\n const marginStyle = vertical\n ? { marginLeft, marginRight }\n : { marginTop, marginBottom };\n\n const insetStyle = vertical\n ? { marginTop: insetSize, marginBottom: insetSize }\n : { marginLeft: insetSize, marginRight: insetSize };\n\n const borderColorStyle = { borderColor };\n const borderWidthStyle = (vertical ? { borderRightWidth: borderWidth } : { borderBottomWidth: borderWidth });\n\n const containerStyle = css([\n insetStyle,\n marginStyle,\n styles.container,\n vertical ? styles.column : styles.row,\n childrenProp ? undefined : borderColorStyle,\n childrenProp ? undefined : borderWidthStyle,\n style,\n ]);\n\n const dividerStyle = css([\n borderColorStyle,\n borderWidthStyle,\n styles.divider,\n ]);\n\n const dividerMarginSize = theme.spacing(marginBetweenChildren);\n const startDividerStyle: ExtendedStyle = {\n display: elementAlign !== 'start' ? 'flex' : 'none',\n ...(vertical ? { marginBottom: dividerMarginSize } : { marginRight: dividerMarginSize }),\n };\n const endDividerStyle: ExtendedStyle = {\n display: elementAlign !== 'end' ? 'flex' : 'none',\n ...(vertical ? { marginTop: dividerMarginSize } : { marginLeft: dividerMarginSize }),\n };\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption2.medium,\n color: fontColor,\n });\n\n const element = typeof childrenProp === 'string'\n ? <Text style={css(fontStyle)}>{childrenProp}</Text>\n : childrenProp;\n\n const children = childrenProp ? (\n <React.Fragment>\n <View style={css([dividerStyle, startDividerStyle])}/>\n {element}\n <View style={css([dividerStyle, endDividerStyle])}/>\n </React.Fragment>\n ) : null;\n\n return (\n <View\n style={containerStyle}\n {...otherProps}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAEA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,UAA/B,EAA2CC,QAA3C,QAA2D,WAA3D;AAKA,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAX,CAAkB;EAC7BC,SAAS,EAAE;IACPC,SAAS,EAAE,SADJ;IAEPC,UAAU,EAAE;EAFL,CADkB;EAK7BC,GAAG,EAAE;IACDC,aAAa,EAAE;EADd,CALwB;EAQ7BC,MAAM,EAAE;IACJD,aAAa,EAAE;EADX,CARqB;EAW7BE,OAAO,EAAE;IACLC,QAAQ,EAAE;EADL;AAXoB,CAAlB,CAAf;;AAgBA,SAASC,iBAAT,CAA2BC,KAA3B,EAAyCC,OAAzC,EAAkEC,QAAlE,EAAqF;EACjF,QAAQD,OAAR;IACI;IACA,KAAK,MAAL;MACI,OAAOC,QAAQ,GAAGF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBC,MAAxB,GAAiCL,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBE,IAArE;;IACJ,KAAK,QAAL;MACI,OAAOJ,QAAQ,GAAGF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBE,IAAxB,GAA+BN,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBG,IAAnE;EALR;AAOH;;AAED,eAAe,SAASC,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,WAAW,EAAEC,eADX;IAEFC,QAAQ,EAAEC,YAFR;IAGFC,YAAY,GAAG,QAHb;IAIFC,KAAK,GAAG,CAJN;IAKFC,qBAAqB,GAAG,CALtB;IAMFC,KANE;IAOFhB,OAAO,GAAG,MAPR;IAQFC,QAAQ,GAAG,KART;IASF,GAAGgB;EATD,IAUFT,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eI,eAAf,CAAD;EAAhB,EAHJ,CADyB,GAMzB,IANJ;EAQA,oBACI,oBAAC,IAAD;IACI,KAAK,EAAEN;EADX,GAEQjB,UAFR,GAIKN,QAJL,CADJ;AAQH;AAAA"}
1
+ {"version":3,"names":["React","Text","View","commonColors","createFontStyle","css","StyleSheet","useTheme","styles","create","container","alignSelf","alignItems","row","flexDirection","column","divider","flexGrow","selectBorderColor","theme","variant","vertical","palette","border","weaker","weak","base","opacity","white","Divider","props","borderWidth","borderWidthProp","children","childrenProp","elementAlign","inset","marginBetweenChildren","style","otherProps","fontColor","text","borderColor","marginSize","spacing","insetSize","marginLeft","marginRight","marginTop","marginBottom","marginStyle","insetStyle","borderColorStyle","borderWidthStyle","borderRightWidth","borderBottomWidth","containerStyle","undefined","dividerStyle","dividerMarginSize","startDividerStyle","display","endDividerStyle","fontStyle","selector","typo","caption2","medium","color","element"],"sources":["Divider.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport type { Theme } from '@fountain-ui/styles';\nimport { commonColors } from '@fountain-ui/styles';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport { ExtendedStyle } from '../types';\nimport type DividerProps from './DividerProps';\nimport type { DividerVariant } from './DividerProps';\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: 'stretch',\n alignItems: 'center',\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n divider: {\n flexGrow: 1,\n },\n});\n\nfunction selectBorderColor(theme: Theme, variant: DividerVariant, vertical: boolean) {\n switch (variant) {\n default:\n case 'base':\n return vertical ? theme.palette.border.weaker : theme.palette.border.weak;\n case 'strong':\n return vertical ? theme.palette.border.weak : theme.palette.border.base;\n case 'strongStatic':\n return commonColors.opacity.white['13'];\n case 'baseStatic':\n return commonColors.opacity.white['10'];\n }\n}\n\nexport default function Divider(props: DividerProps) {\n const {\n borderWidth: borderWidthProp,\n children: childrenProp,\n elementAlign = 'center',\n inset = 0,\n marginBetweenChildren = 2,\n style,\n variant = 'base' as DividerVariant,\n vertical = false,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const borderWidth = borderWidthProp ?? (vertical ? 1 : 0.5);\n const fontColor = theme.palette.text.weak;\n const borderColor = selectBorderColor(theme, variant, vertical);\n const marginSize = theme.spacing(1);\n const insetSize = theme.spacing(inset);\n\n const marginLeft = marginSize;\n const marginRight = marginSize;\n const marginTop = marginSize;\n const marginBottom = marginSize;\n\n const marginStyle = vertical\n ? { marginLeft, marginRight }\n : { marginTop, marginBottom };\n\n const insetStyle = vertical\n ? { marginTop: insetSize, marginBottom: insetSize }\n : { marginLeft: insetSize, marginRight: insetSize };\n\n const borderColorStyle = { borderColor };\n const borderWidthStyle = (vertical ? { borderRightWidth: borderWidth } : { borderBottomWidth: borderWidth });\n\n const containerStyle = css([\n insetStyle,\n marginStyle,\n styles.container,\n vertical ? styles.column : styles.row,\n childrenProp ? undefined : borderColorStyle,\n childrenProp ? undefined : borderWidthStyle,\n style,\n ]);\n\n const dividerStyle = css([\n borderColorStyle,\n borderWidthStyle,\n styles.divider,\n ]);\n\n const dividerMarginSize = theme.spacing(marginBetweenChildren);\n const startDividerStyle: ExtendedStyle = {\n display: elementAlign !== 'start' ? 'flex' : 'none',\n ...(vertical ? { marginBottom: dividerMarginSize } : { marginRight: dividerMarginSize }),\n };\n const endDividerStyle: ExtendedStyle = {\n display: elementAlign !== 'end' ? 'flex' : 'none',\n ...(vertical ? { marginTop: dividerMarginSize } : { marginLeft: dividerMarginSize }),\n };\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption2.medium,\n color: fontColor,\n });\n\n const element = typeof childrenProp === 'string'\n ? <Text style={css(fontStyle)}>{childrenProp}</Text>\n : childrenProp;\n\n const children = childrenProp ? (\n <React.Fragment>\n <View style={css([dividerStyle, startDividerStyle])}/>\n {element}\n <View style={css([dividerStyle, endDividerStyle])}/>\n </React.Fragment>\n ) : null;\n\n return (\n <View\n style={containerStyle}\n {...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AE7B,GAAG,CAAC,CAACqD,YAAD,EAAeE,iBAAf,CAAD;EAAhB,EADJ,EAEKS,OAFL,eAGI,oBAAC,IAAD;IAAM,KAAK,EAAEhE,GAAG,CAAC,CAACqD,YAAD,EAAeI,eAAf,CAAD;EAAhB,EAHJ,CADyB,GAMzB,IANJ;EAQA,oBACI,oBAAC,IAAD;IACI,KAAK,EAAEN;EADX,GAEQjB,UAFR,GAIKN,QAJL,CADJ;AAQH;AAAA"}
@@ -1,3 +1,3 @@
1
1
  export const dividerElementAligns = ['start', 'center', 'end'];
2
- export const dividerVariants = ['base', 'strong'];
2
+ export const dividerVariants = ['base', 'strong', 'baseStatic', 'strongStatic'];
3
3
  //# sourceMappingURL=DividerProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["dividerElementAligns","dividerVariants"],"sources":["DividerProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const dividerElementAligns = ['start', 'center', 'end'] as const;\nexport type DividerElementAlign = typeof dividerElementAligns[number];\n\nexport const dividerVariants = ['base', 'strong'] as const;\nexport type DividerVariant = typeof dividerVariants[number];\n\nexport default interface DividerProps extends OverridableComponentProps<ViewProps, {\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The size of the inset. It works as a multiplier factor based on spacing system.\n * @default 0\n */\n inset?: number;\n\n /**\n * If `true`, the divider orientation is set to vertical.\n * @default false\n */\n vertical?: boolean;\n\n /**\n * The size of margin between child element and the divider. It works as a multiplier factor based on spacing system.\n * @default 2\n */\n marginBetweenChildren?: number;\n\n /**\n * The size of border width. It works as an actual pixel-based border width value of a divider.\n * @default if vertical is true 1, otherwise 0.5\n */\n borderWidth?: number;\n\n /**\n * Set position of children.\n * @default center\n */\n elementAlign?: DividerElementAlign;\n\n /**\n * Select the style of the divider based on this value.\n * @default base\n */\n variant?: DividerVariant;\n}> {}\n"],"mappings":"AAIA,OAAO,MAAMA,oBAAoB,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,KAApB,CAA7B;AAGP,OAAO,MAAMC,eAAe,GAAG,CAAC,MAAD,EAAS,QAAT,CAAxB"}
1
+ {"version":3,"names":["dividerElementAligns","dividerVariants"],"sources":["DividerProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const dividerElementAligns = ['start', 'center', 'end'] as const;\nexport type DividerElementAlign = typeof dividerElementAligns[number];\n\nexport const dividerVariants = ['base', 'strong', 'baseStatic', 'strongStatic'] as const;\nexport type DividerVariant = typeof dividerVariants[number];\n\nexport default interface DividerProps extends OverridableComponentProps<ViewProps, {\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The size of the inset. It works as a multiplier factor based on spacing system.\n * @default 0\n */\n inset?: number;\n\n /**\n * If `true`, the divider orientation is set to vertical.\n * @default false\n */\n vertical?: boolean;\n\n /**\n * The size of margin between child element and the divider. It works as a multiplier factor based on spacing system.\n * @default 2\n */\n marginBetweenChildren?: number;\n\n /**\n * The size of border width. It works as an actual pixel-based border width value of a divider.\n * @default if vertical is true 1, otherwise 0.5\n */\n borderWidth?: number;\n\n /**\n * Set position of children.\n * @default center\n */\n elementAlign?: DividerElementAlign;\n\n /**\n * Select the style of the divider based on this value.\n * @default base\n */\n variant?: DividerVariant;\n}> {}\n"],"mappings":"AAIA,OAAO,MAAMA,oBAAoB,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,KAApB,CAA7B;AAGP,OAAO,MAAMC,eAAe,GAAG,CAAC,MAAD,EAAS,QAAT,EAAmB,YAAnB,EAAiC,cAAjC,CAAxB"}
@@ -42,7 +42,7 @@ export default function Empty(props) {
42
42
  color: theme.palette.text.strong
43
43
  });
44
44
  const descriptionFontStyle = createFontStyle(theme, {
45
- selector: typography => typography.body2.regular,
45
+ selector: typography => typography.body3.regular,
46
46
  color: theme.palette.text.base
47
47
  });
48
48
  return /*#__PURE__*/React.createElement(Column, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","Button","Column","Spacer","createFontStyle","css","useTheme","cloneElementSafely","useStyles","theme","root","alignItems","flex","justifyContent","paddingHorizontal","spacing","cta","alignSelf","Empty","props","buttonTitle","description","headerContent","headerContentProp","onButtonPress","style","styleProp","title","otherProps","styles","rootStyle","titleFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","descriptionFontStyle","body2","regular","base"],"sources":["Empty.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Button from '../Button/Button';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type { FalsyReactElement } from '../utils';\nimport { cloneElementSafely } from '../utils';\nimport type EmptyProps from './EmptyProps';\n\ntype EmptyStyles = NamedStylesStringUnion<'root' | 'cta'>;\n\nconst useStyles: UseStyles<EmptyStyles> = function (): EmptyStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(5),\n },\n cta: {\n alignSelf: 'center',\n },\n };\n};\n\nexport default function Empty(props: EmptyProps) {\n const {\n buttonTitle,\n description,\n headerContent: headerContentProp,\n onButtonPress,\n style: styleProp,\n title,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const rootStyle = css([\n styles.root,\n styleProp,\n ]);\n\n const headerContent = cloneElementSafely(headerContentProp as FalsyReactElement);\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.header3.semiBold,\n color: theme.palette.text.strong,\n });\n\n const descriptionFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body2.regular,\n color: theme.palette.text.base,\n });\n\n return (\n <Column\n style={rootStyle}\n {...otherProps}\n >\n {headerContent ? (\n <React.Fragment>\n {headerContent}\n\n <Spacer size={6}/>\n </React.Fragment>\n ) : null}\n\n <Text\n children={title}\n style={titleFontStyle}\n />\n\n {description ? (\n <React.Fragment>\n <Spacer size={2}/>\n\n <Text\n children={description}\n style={descriptionFontStyle}\n />\n </React.Fragment>\n ) : null}\n\n {buttonTitle && onButtonPress ? (\n <React.Fragment>\n <Spacer size={6}/>\n\n <Button\n children={buttonTitle}\n color={'accent'}\n onPress={onButtonPress}\n style={styles.cta}\n variant={'capsuleSolid'}\n />\n </React.Fragment>\n ) : null}\n </Column>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AAEA,SAASC,kBAAT,QAAmC,UAAnC;;AAKA,MAAMC,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,OAAO;IACHI,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,IAAI,EAAE,CAFJ;MAGFC,cAAc,EAAE,QAHd;MAIFC,iBAAiB,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd;IAJjB,CADH;IAOHC,GAAG,EAAE;MACDC,SAAS,EAAE;IADV;EAPF,CAAP;AAWH,CAdD;;AAgBA,eAAe,SAASC,KAAT,CAAeC,KAAf,EAAkC;EAC7C,MAAM;IACFC,WADE;IAEFC,WAFE;IAGFC,aAAa,EAAEC,iBAHb;IAIFC,aAJE;IAKFC,KAAK,EAAEC,SALL;IAMFC,KANE;IAOF,GAAGC;EAPD,IAQFT,KARJ;EAUA,MAAMU,MAAM,GAAGrB,SAAS,EAAxB;EAEA,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,MAAMwB,SAAS,GAAGzB,GAAG,CAAC,CAClBwB,MAAM,CAACnB,IADW,EAElBgB,SAFkB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CADJ;AA4CH"}
1
+ {"version":3,"names":["React","Text","Button","Column","Spacer","createFontStyle","css","useTheme","cloneElementSafely","useStyles","theme","root","alignItems","flex","justifyContent","paddingHorizontal","spacing","cta","alignSelf","Empty","props","buttonTitle","description","headerContent","headerContentProp","onButtonPress","style","styleProp","title","otherProps","styles","rootStyle","titleFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","descriptionFontStyle","body3","regular","base"],"sources":["Empty.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Button from '../Button/Button';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type { FalsyReactElement } from '../utils';\nimport { cloneElementSafely } from '../utils';\nimport type EmptyProps from './EmptyProps';\n\ntype EmptyStyles = NamedStylesStringUnion<'root' | 'cta'>;\n\nconst useStyles: UseStyles<EmptyStyles> = function (): EmptyStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n paddingHorizontal: theme.spacing(5),\n },\n cta: {\n alignSelf: 'center',\n },\n };\n};\n\nexport default function Empty(props: EmptyProps) {\n const {\n buttonTitle,\n description,\n headerContent: headerContentProp,\n onButtonPress,\n style: styleProp,\n title,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const rootStyle = css([\n styles.root,\n styleProp,\n ]);\n\n const headerContent = cloneElementSafely(headerContentProp as FalsyReactElement);\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.header3.semiBold,\n color: theme.palette.text.strong,\n });\n\n const descriptionFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body3.regular,\n color: theme.palette.text.base,\n });\n\n return (\n <Column\n style={rootStyle}\n {...otherProps}\n >\n {headerContent ? (\n <React.Fragment>\n {headerContent}\n\n <Spacer size={6}/>\n </React.Fragment>\n ) : null}\n\n <Text\n children={title}\n style={titleFontStyle}\n />\n\n {description ? (\n <React.Fragment>\n <Spacer size={2}/>\n\n <Text\n children={description}\n style={descriptionFontStyle}\n />\n </React.Fragment>\n ) : null}\n\n {buttonTitle && onButtonPress ? (\n <React.Fragment>\n <Spacer size={6}/>\n\n <Button\n children={buttonTitle}\n color={'accent'}\n onPress={onButtonPress}\n style={styles.cta}\n variant={'capsuleSolid'}\n />\n </React.Fragment>\n ) : null}\n </Column>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AAEA,SAASC,kBAAT,QAAmC,UAAnC;;AAKA,MAAMC,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,OAAO;IACHI,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,IAAI,EAAE,CAFJ;MAGFC,cAAc,EAAE,QAHd;MAIFC,iBAAiB,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd;IAJjB,CADH;IAOHC,GAAG,EAAE;MACDC,SAAS,EAAE;IADV;EAPF,CAAP;AAWH,CAdD;;AAgBA,eAAe,SAASC,KAAT,CAAeC,KAAf,EAAkC;EAC7C,MAAM;IACFC,WADE;IAEFC,WAFE;IAGFC,aAAa,EAAEC,iBAHb;IAIFC,aAJE;IAKFC,KAAK,EAAEC,SALL;IAMFC,KANE;IAOF,GAAGC;EAPD,IAQFT,KARJ;EAUA,MAAMU,MAAM,GAAGrB,SAAS,EAAxB;EAEA,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,MAAMwB,SAAS,GAAGzB,GAAG,CAAC,CAClBwB,MAAM,CAACnB,IADW,EAElBgB,SAFkB,CAAD,CA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CH"}
@@ -32,6 +32,7 @@ export default function createFlexbox(direction) {
32
32
  flexGrow,
33
33
  flexShrink,
34
34
  flexWrap,
35
+ gap,
35
36
  children,
36
37
  insets,
37
38
  justifyContent,
@@ -49,6 +50,7 @@ export default function createFlexbox(direction) {
49
50
  flexGrow,
50
51
  flexShrink,
51
52
  flexWrap,
53
+ gap,
52
54
  justifyContent,
53
55
  overflow
54
56
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","css","StyleSheet","useTheme","styles","create","row","flexDirection","column","rowReverse","columnReverse","createFlexbox","direction","forwardDirection","reverseDirection","Flexbox","props","theme","spacing","alignContent","alignItems","alignSelf","flexBasis","flexGrow","flexShrink","flexWrap","children","insets","justifyContent","overflow","reversed","style","otherProps","propStyles","padding","undefined","paddingLeft","left","paddingTop","top","paddingRight","right","paddingBottom","bottom","displayName"],"sources":["Flexbox.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport type FlexboxProps from './FlexboxProps';\n\nconst styles = StyleSheet.create({\n row: { flexDirection: 'row' },\n column: { flexDirection: 'column' },\n rowReverse: { flexDirection: 'row-reverse' },\n columnReverse: { flexDirection: 'column-reverse' },\n});\n\nexport default function createFlexbox(direction: 'row' | 'column') {\n const forwardDirection = direction === 'row' ? styles.row : styles.column;\n const reverseDirection = direction === 'row' ? styles.rowReverse : styles.columnReverse;\n\n function Flexbox(props: FlexboxProps) {\n const theme = useTheme();\n\n const spacing = theme.spacing;\n\n const {\n alignContent,\n alignItems,\n alignSelf,\n flexBasis,\n flexGrow,\n flexShrink,\n flexWrap,\n children,\n insets,\n justifyContent,\n overflow,\n reversed,\n style,\n ...otherProps\n } = props;\n\n const direction = reversed ? reverseDirection : forwardDirection;\n\n const propStyles = {\n alignContent,\n alignItems,\n alignSelf,\n flexBasis,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n overflow,\n };\n\n const padding = insets !== undefined\n ? {\n paddingLeft: spacing(insets.left),\n paddingTop: spacing(insets.top),\n paddingRight: spacing(insets.right),\n paddingBottom: spacing(insets.bottom),\n }\n : undefined;\n\n return (\n <View\n children={children}\n style={css([\n direction,\n propStyles,\n padding,\n style,\n ])}\n {...otherProps}\n />\n );\n }\n\n Flexbox.displayName = direction === 'row' ? 'Row' : 'Column';\n\n return Flexbox;\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,SAASC,GAAT,EAAcC,UAAd,EAA0BC,QAA1B,QAA0C,WAA1C;AAGA,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAX,CAAkB;EAC7BC,GAAG,EAAE;IAAEC,aAAa,EAAE;EAAjB,CADwB;EAE7BC,MAAM,EAAE;IAAED,aAAa,EAAE;EAAjB,CAFqB;EAG7BE,UAAU,EAAE;IAAEF,aAAa,EAAE;EAAjB,CAHiB;EAI7BG,aAAa,EAAE;IAAEH,aAAa,EAAE;EAAjB;AAJc,CAAlB,CAAf;AAOA,eAAe,SAASI,aAAT,CAAuBC,SAAvB,EAAoD;EAC/D,MAAMC,gBAAgB,GAAGD,SAAS,KAAK,KAAd,GAAsBR,MAAM,CAACE,GAA7B,GAAmCF,MAAM,CAACI,MAAnE;EACA,MAAMM,gBAAgB,GAAGF,SAAS,KAAK,KAAd,GAAsBR,MAAM,CAACK,UAA7B,GAA0CL,MAAM,CAACM,aAA1E;;EAEA,SAASK,OAAT,CAAiBC,KAAjB,EAAsC;IAClC,MAAMC,KAAK,GAAGd,QAAQ,EAAtB;IAEA,MAAMe,OAAO,GAAGD,KAAK,CAACC,OAAtB;IAEA,MAAM;MACFC,YADE;MAEFC,UAFE;MAGFC,SAHE;MAIFC,SAJE;MAKFC,QALE;MAMFC,UANE;MAOFC,QAPE;MAQFC,QARE;MASFC,MATE;MAUFC,cAVE;MAWFC,QAXE;MAYFC,QAZE;MAaFC,KAbE;MAcF,GAAGC;IAdD,IAeFhB,KAfJ;IAiBA,MAAMJ,SAAS,GAAGkB,QAAQ,GAAGhB,gBAAH,GAAsBD,gBAAhD;IAEA,MAAMoB,UAAU,GAAG;MACfd,YADe;MAEfC,UAFe;MAGfC,SAHe;MAIfC,SAJe;MAKfC,QALe;MAMfC,UANe;MAOfC,QAPe;MAQfG,cARe;MASfC;IATe,CAAnB;IAYA,MAAMK,OAAO,GAAGP,MAAM,KAAKQ,SAAX,GACV;MACEC,WAAW,EAAElB,OAAO,CAACS,MAAM,CAACU,IAAR,CADtB;MAEEC,UAAU,EAAEpB,OAAO,CAACS,MAAM,CAACY,GAAR,CAFrB;MAGEC,YAAY,EAAEtB,OAAO,CAACS,MAAM,CAACc,KAAR,CAHvB;MAIEC,aAAa,EAAExB,OAAO,CAACS,MAAM,CAACgB,MAAR;IAJxB,CADU,GAOVR,SAPN;IASA,oBACI,oBAAC,IAAD;MACI,QAAQ,EAAET,QADd;MAEI,KAAK,EAAEzB,GAAG,CAAC,CACPW,SADO,EAEPqB,UAFO,EAGPC,OAHO,EAIPH,KAJO,CAAD;IAFd,GAQQC,UARR,EADJ;EAYH;;EAEDjB,OAAO,CAAC6B,WAAR,GAAsBhC,SAAS,KAAK,KAAd,GAAsB,KAAtB,GAA8B,QAApD;EAEA,OAAOG,OAAP;AACH"}
1
+ {"version":3,"names":["React","View","css","StyleSheet","useTheme","styles","create","row","flexDirection","column","rowReverse","columnReverse","createFlexbox","direction","forwardDirection","reverseDirection","Flexbox","props","theme","spacing","alignContent","alignItems","alignSelf","flexBasis","flexGrow","flexShrink","flexWrap","gap","children","insets","justifyContent","overflow","reversed","style","otherProps","propStyles","padding","undefined","paddingLeft","left","paddingTop","top","paddingRight","right","paddingBottom","bottom","displayName"],"sources":["Flexbox.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport type FlexboxProps from './FlexboxProps';\n\nconst styles = StyleSheet.create({\n row: { flexDirection: 'row' },\n column: { flexDirection: 'column' },\n rowReverse: { flexDirection: 'row-reverse' },\n columnReverse: { flexDirection: 'column-reverse' },\n});\n\nexport default function createFlexbox(direction: 'row' | 'column') {\n const forwardDirection = direction === 'row' ? styles.row : styles.column;\n const reverseDirection = direction === 'row' ? styles.rowReverse : styles.columnReverse;\n\n function Flexbox(props: FlexboxProps) {\n const theme = useTheme();\n\n const spacing = theme.spacing;\n\n const {\n alignContent,\n alignItems,\n alignSelf,\n flexBasis,\n flexGrow,\n flexShrink,\n flexWrap,\n gap,\n children,\n insets,\n justifyContent,\n overflow,\n reversed,\n style,\n ...otherProps\n } = props;\n\n const direction = reversed ? reverseDirection : forwardDirection;\n\n const propStyles = {\n alignContent,\n alignItems,\n alignSelf,\n flexBasis,\n flexGrow,\n flexShrink,\n flexWrap,\n gap,\n justifyContent,\n overflow,\n };\n\n const padding = insets !== undefined\n ? {\n paddingLeft: spacing(insets.left),\n paddingTop: spacing(insets.top),\n paddingRight: spacing(insets.right),\n paddingBottom: spacing(insets.bottom),\n }\n : undefined;\n\n return (\n <View\n children={children}\n style={css([\n direction,\n propStyles,\n padding,\n style,\n ])}\n {...otherProps}\n />\n );\n }\n\n Flexbox.displayName = direction === 'row' ? 'Row' : 'Column';\n\n return Flexbox;\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,SAASC,GAAT,EAAcC,UAAd,EAA0BC,QAA1B,QAA0C,WAA1C;AAGA,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAX,CAAkB;EAC7BC,GAAG,EAAE;IAAEC,aAAa,EAAE;EAAjB,CADwB;EAE7BC,MAAM,EAAE;IAAED,aAAa,EAAE;EAAjB,CAFqB;EAG7BE,UAAU,EAAE;IAAEF,aAAa,EAAE;EAAjB,CAHiB;EAI7BG,aAAa,EAAE;IAAEH,aAAa,EAAE;EAAjB;AAJc,CAAlB,CAAf;AAOA,eAAe,SAASI,aAAT,CAAuBC,SAAvB,EAAoD;EAC/D,M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ARR,EADJ;EAYH;;EAEDlB,OAAO,CAAC8B,WAAR,GAAsBjC,SAAS,KAAK,KAAd,GAAsB,KAAtB,GAA8B,QAApD;EAEA,OAAOG,OAAP;AACH"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["FlexboxProps.ts"],"sourcesContent":["import React from 'react';\nimport type { FlexStyle, ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\nimport type { EdgeInsetsType } from '../styles';\n\nexport default interface FlexboxProps extends OverridableComponentProps<ViewProps, {\n /**\n * Controls how rows align in the cross direction.\n * @default 'stretch'\n */\n alignContent?: FlexStyle['alignContent'];\n\n /**\n * Aligns children in the cross direction.\n * @default 'stretch'\n */\n alignItems?: FlexStyle['alignItems'];\n\n /**\n * Controls how a child aligns in the cross direction,\n * overriding the `alignItems` of the parent.\n * @default 'auto'\n */\n alignSelf?: FlexStyle['alignSelf'];\n\n /**\n * Providing the default size of an item along the main axis.\n */\n flexBasis?: FlexStyle['flexBasis'];\n\n /**\n * Describes how any space within a container should be distributed\n * among its children along the main axis.\n */\n flexGrow?: FlexStyle['flexGrow'];\n\n /**\n * Describes how to shrink children along the main axis in the case\n * in which the total size of the children overflows the size of the\n * container on the main axis.\n */\n flexShrink?: FlexStyle['flexShrink'];\n\n /**\n * Controls whether children can wrap around after they hit\n * the end of a flex container.\n * @default 'nowrap'\n */\n flexWrap?: FlexStyle['flexWrap'];\n\n /**\n * Content of this component.\n */\n children: React.ReactNode;\n\n /**\n * The amount of space by which to inset the child.\n */\n insets?: EdgeInsetsType;\n\n /**\n * Aligns children in the main direction.\n * @default 'flex-start'\n */\n justifyContent?: FlexStyle['justifyContent'];\n\n /**\n * Controls how children are measured and displayed.\n * @default 'visible'\n */\n overflow?: FlexStyle['overflow'];\n\n /**\n * Reverse flex direction.\n * @default false\n */\n reversed?: boolean;\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["FlexboxProps.ts"],"sourcesContent":["import React from 'react';\nimport type { FlexStyle, ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\nimport type { EdgeInsetsType } from '../styles';\n\nexport default interface FlexboxProps extends OverridableComponentProps<ViewProps, {\n /**\n * Controls how rows align in the cross direction.\n * @default 'stretch'\n */\n alignContent?: FlexStyle['alignContent'];\n\n /**\n * Aligns children in the cross direction.\n * @default 'stretch'\n */\n alignItems?: FlexStyle['alignItems'];\n\n /**\n * Controls how a child aligns in the cross direction,\n * overriding the `alignItems` of the parent.\n * @default 'auto'\n */\n alignSelf?: FlexStyle['alignSelf'];\n\n /**\n * Providing the default size of an item along the main axis.\n */\n flexBasis?: FlexStyle['flexBasis'];\n\n /**\n * Describes how any space within a container should be distributed\n * among its children along the main axis.\n */\n flexGrow?: FlexStyle['flexGrow'];\n\n /**\n * Describes how to shrink children along the main axis in the case\n * in which the total size of the children overflows the size of the\n * container on the main axis.\n */\n flexShrink?: FlexStyle['flexShrink'];\n\n /**\n * Controls whether children can wrap around after they hit\n * the end of a flex container.\n * @default 'nowrap'\n */\n flexWrap?: FlexStyle['flexWrap'];\n\n /**\n * Defines the spacing between items in a flex container.\n */\n gap?: number | undefined;\n\n /**\n * Content of this component.\n */\n children: React.ReactNode;\n\n /**\n * The amount of space by which to inset the child.\n */\n insets?: EdgeInsetsType;\n\n /**\n * Aligns children in the main direction.\n * @default 'flex-start'\n */\n justifyContent?: FlexStyle['justifyContent'];\n\n /**\n * Controls how children are measured and displayed.\n * @default 'visible'\n */\n overflow?: FlexStyle['overflow'];\n\n /**\n * Reverse flex direction.\n * @default false\n */\n reversed?: boolean;\n}> {}\n"],"mappings":""}
@@ -36,6 +36,9 @@ function selectIconColor(theme, color) {
36
36
  case 'staticStrongInverse':
37
37
  return commonColors.static.strongInverse;
38
38
 
39
+ case 'staticBaseOpacityInverse':
40
+ return commonColors.static.baseOpacityInverse;
41
+
39
42
  case 'disabled':
40
43
  return theme.palette.status.disabled;
41
44
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","View","commonColors","ButtonBase","LoadingSpinner","css","useTheme","cloneElementSafely","styles","create","root","alignItems","height","justifyContent","width","loadingSpinner","position","loadingSpinnerSizeMap","small","medium","large","selectIconColor","theme","color","palette","icon","strong","base","static","strongInverse","status","disabled","IconButton","props","children","colorProp","onPress","iconSize","isLoading","style","otherProps","iconColor","enableV2","fill","size","rootStyle","contentStyle","opacity","loadingSpinnerStyle","handlePress"],"sources":["IconButton.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { commonColors, Theme } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { LoadingSpinner } from '../internal';\nimport { css, useTheme } from '../styles';\nimport type { SvgIconSize } from '../SvgIcon/SvgIconProps';\nimport { cloneElementSafely } from '../utils';\nimport type IconButtonProps from './IconButtonProps';\nimport type { IconButtonColor } from './IconButtonProps';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n height: 32,\n justifyContent: 'center',\n width: 32,\n },\n loadingSpinner: {\n position: 'absolute',\n },\n});\n\nconst loadingSpinnerSizeMap: Record<SvgIconSize, number> = {\n small: 14,\n medium: 16,\n large: 18,\n};\n\nfunction selectIconColor(theme: Theme, color: IconButtonColor) {\n switch (color) {\n default:\n case 'strong':\n return theme.palette.icon.strong;\n case 'base':\n return theme.palette.icon.base;\n case 'staticStrongInverse':\n return commonColors.static.strongInverse;\n case 'disabled':\n return theme.palette.status.disabled;\n }\n}\n\nexport default function IconButton(props: IconButtonProps) {\n const {\n children,\n color: colorProp = 'strong' as IconButtonColor,\n disabled = false,\n onPress,\n iconSize = 'medium' as SvgIconSize,\n isLoading = false,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const color: IconButtonColor = disabled ? 'disabled' : colorProp;\n const iconColor = selectIconColor(theme, color);\n\n const icon = cloneElementSafely(children, {\n enableV2: true,\n fill: iconColor,\n size: iconSize,\n });\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const contentStyle = css({\n opacity: isLoading ? 0 : 1,\n });\n\n const loadingSpinnerStyle = css([\n styles.loadingSpinner,\n {\n height: loadingSpinnerSizeMap[iconSize],\n width: loadingSpinnerSizeMap[iconSize],\n },\n ]);\n\n const handlePress = () => {\n if (disabled) {\n return;\n }\n\n onPress?.();\n };\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <View style={contentStyle}>\n {icon}\n </View>\n\n {isLoading ? (\n <LoadingSpinner style={loadingSpinnerStyle}/>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,EAAqBC,IAArB,QAAiC,cAAjC;AACA,SAASC,YAAT,QAAoC,qBAApC;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,cAAT,QAA+B,aAA/B;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;AAEA,SAASC,kBAAT,QAAmC,UAAnC;AAIA,MAAMC,MAAM,GAAGR,UAAU,CAACS,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,UAAU,EAAE,QADV;IAEFC,MAAM,EAAE,EAFN;IAGFC,cAAc,EAAE,QAHd;IAIFC,KAAK,EAAE;EAJL,CADuB;EAO7BC,cAAc,EAAE;IACZC,QAAQ,EAAE;EADE;AAPa,CAAlB,CAAf;AAYA,MAAMC,qBAAkD,GAAG;EACvDC,KAAK,EAAE,EADgD;EAEvDC,MAAM,EAAE,EAF+C;EAGvDC,KAAK,EAAE;AAHgD,CAA3D;;AAMA,SAASC,eAAT,CAAyBC,KAAzB,EAAuCC,KAAvC,EAA+D;EAC3D,QAAQA,KAAR;IACI;IACA,KAAK,QAAL;MACI,OAAOD,KAAK,CAACE,OAAN,CAAcC,IAAd,CAAmBC,MAA1B;;IACJ,KAAK,MAAL;MACI,OAAOJ,KAAK,CAACE,OAAN,CAAcC,IAAd,CAAmBE,IAA1B;;IACJ,KAAK,qBAAL;MAC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A,oBACI,oBAAC,UAAD;IACI,QAAQ,EAAEL,QADd;IAEI,OAAO,EAAEkB,WAFb;IAGI,KAAK,EAAEJ;EAHX,GAIQL,UAJR,gBAMI,oBAAC,IAAD;IAAM,KAAK,EAAEM;EAAb,GACKrB,IADL,CANJ,EAUKa,SAAS,gBACN,oBAAC,cAAD;IAAgB,KAAK,EAAEU;EAAvB,EADM,GAEN,IAZR,CADJ;AAgBH;AAAA"}
1
+ {"version":3,"names":["React","StyleSheet","View","commonColors","ButtonBase","LoadingSpinner","css","useTheme","cloneElementSafely","styles","create","root","alignItems","height","justifyContent","width","loadingSpinner","position","loadingSpinnerSizeMap","small","medium","large","selectIconColor","theme","color","palette","icon","strong","base","static","strongInverse","baseOpacityInverse","status","disabled","IconButton","props","children","colorProp","onPress","iconSize","isLoading","style","otherProps","iconColor","enableV2","fill","size","rootStyle","contentStyle","opacity","loadingSpinnerStyle","handlePress"],"sources":["IconButton.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { commonColors, Theme } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { LoadingSpinner } from '../internal';\nimport { css, useTheme } from '../styles';\nimport type { SvgIconSize } from '../SvgIcon/SvgIconProps';\nimport { cloneElementSafely } from '../utils';\nimport type IconButtonProps from './IconButtonProps';\nimport type { IconButtonColor } from './IconButtonProps';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n height: 32,\n justifyContent: 'center',\n width: 32,\n },\n loadingSpinner: {\n position: 'absolute',\n },\n});\n\nconst loadingSpinnerSizeMap: Record<SvgIconSize, number> = {\n small: 14,\n medium: 16,\n large: 18,\n};\n\nfunction selectIconColor(theme: Theme, color: IconButtonColor) {\n switch (color) {\n default:\n case 'strong':\n return theme.palette.icon.strong;\n case 'base':\n return theme.palette.icon.base;\n case 'staticStrongInverse':\n return commonColors.static.strongInverse;\n case 'staticBaseOpacityInverse':\n return commonColors.static.baseOpacityInverse;\n case 'disabled':\n return theme.palette.status.disabled;\n }\n}\n\nexport default function IconButton(props: IconButtonProps) {\n const {\n children,\n color: colorProp = 'strong' as IconButtonColor,\n disabled = false,\n onPress,\n iconSize = 'medium' as SvgIconSize,\n isLoading = false,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const color: IconButtonColor = disabled ? 'disabled' : colorProp;\n const iconColor = selectIconColor(theme, color);\n\n const icon = cloneElementSafely(children, {\n enableV2: true,\n fill: iconColor,\n size: iconSize,\n });\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const contentStyle = css({\n opacity: isLoading ? 0 : 1,\n });\n\n const loadingSpinnerStyle = css([\n styles.loadingSpinner,\n {\n height: loadingSpinnerSizeMap[iconSize],\n width: loadingSpinnerSizeMap[iconSize],\n },\n ]);\n\n const handlePress = () => {\n if (disabled) {\n return;\n }\n\n onPress?.();\n };\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <View style={contentStyle}>\n {icon}\n </View>\n\n {isLoading ? (\n <LoadingSpinner style={loadingSpinnerStyle}/>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,EAAqBC,IAArB,QAAiC,cAAjC;AACA,SAASC,YAAT,QAAoC,qBAApC;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,cAAT,QAA+B,aAA/B;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;AAEA,SAASC,kBAAT,QAAmC,UAAnC;AAIA,MAAMC,MAAM,GAAGR,UAAU,CAACS,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,UAAU,EAAE,QADV;IAEFC,MAAM,EAAE,EAFN;IAGFC,cAAc,EAAE,QAHd;IAIFC,KAAK,EAAE;EAJL,CADuB;EAO7BC,cAAc,EAAE;IACZC,QAAQ,EAAE;EADE;AAPa,CAAlB,CAAf;AAYA,MAAMC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ArB;EAKA,MAAMO,YAAY,GAAG1C,GAAG,CAAC;IACrB2C,OAAO,EAAET,SAAS,GAAG,CAAH,GAAO;EADJ,CAAD,CAAxB;EAIA,MAAMU,mBAAmB,GAAG5C,GAAG,CAAC,CAC5BG,MAAM,CAACO,cADqB,EAE5B;IACIH,MAAM,EAAEK,qBAAqB,CAACqB,QAAD,CADjC;IAEIxB,KAAK,EAAEG,qBAAqB,CAACqB,QAAD;EAFhC,CAF4B,CAAD,CAA/B;;EAQA,MAAMY,WAAW,GAAG,MAAM;IACtB,IAAIlB,QAAJ,EAAc;MACV;IACH;;IAEDK,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO;EACV,CAND;;EAQA,oBACI,oBAAC,UAAD;IACI,QAAQ,EAAEL,QADd;IAEI,OAAO,EAAEkB,WAFb;IAGI,KAAK,EAAEJ;EAHX,GAIQL,UAJR,gBAMI,oBAAC,IAAD;IAAM,KAAK,EAAEM;EAAb,GACKtB,IADL,CANJ,EAUKc,SAAS,gBACN,oBAAC,cAAD;IAAgB,KAAK,EAAEU;EAAvB,EADM,GAEN,IAZR,CADJ;AAgBH;AAAA"}
@@ -1,2 +1,2 @@
1
- export const iconButtonColors = ['strong', 'base', 'staticStrongInverse', 'disabled'];
1
+ export const iconButtonColors = ['strong', 'base', 'staticStrongInverse', 'staticBaseOpacityInverse', 'disabled'];
2
2
  //# sourceMappingURL=IconButtonProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["iconButtonColors"],"sources":["IconButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { SvgIconSize } from '../SvgIcon/SvgIconProps';\nimport type { OverridableComponentProps } from '../types';\n\nexport const iconButtonColors = [\n 'strong',\n 'base',\n 'staticStrongInverse',\n 'disabled',\n] as const;\nexport type IconButtonColor = typeof iconButtonColors[number];\n\nexport default interface IconButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The icon element.\n */\n children: React.ReactElement;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'strong'\n */\n color?: IconButtonColor;\n\n /**\n * Determines the size of the icon that goes inside the button.\n * @default 'medium'\n */\n iconSize?: SvgIconSize;\n\n /**\n * Determines whether to show the loading status or not.\n * @default false\n */\n isLoading?: boolean;\n}> {}\n"],"mappings":"AAKA,OAAO,MAAMA,gBAAgB,GAAG,CAC5B,QAD4B,EAE5B,MAF4B,EAG5B,qBAH4B,EAI5B,UAJ4B,CAAzB"}
1
+ {"version":3,"names":["iconButtonColors"],"sources":["IconButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { SvgIconSize } from '../SvgIcon/SvgIconProps';\nimport type { OverridableComponentProps } from '../types';\n\nexport const iconButtonColors = [\n 'strong',\n 'base',\n 'staticStrongInverse',\n 'staticBaseOpacityInverse',\n 'disabled',\n] as const;\nexport type IconButtonColor = typeof iconButtonColors[number];\n\nexport default interface IconButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The icon element.\n */\n children: React.ReactElement;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'strong'\n */\n color?: IconButtonColor;\n\n /**\n * Determines the size of the icon that goes inside the button.\n * @default 'medium'\n */\n iconSize?: SvgIconSize;\n\n /**\n * Determines whether to show the loading status or not.\n * @default false\n */\n isLoading?: boolean;\n}> {}\n"],"mappings":"AAKA,OAAO,MAAMA,gBAAgB,GAAG,CAC5B,QAD4B,EAE5B,MAF4B,EAG5B,qBAH4B,EAI5B,0BAJ4B,EAK5B,UAL4B,CAAzB"}
@@ -17,9 +17,9 @@ const useStyles = function () {
17
17
  backgroundColor: theme.palette.paper.grey
18
18
  },
19
19
  outlined: {
20
- borderWidth: StyleSheet.hairlineWidth,
20
+ borderWidth: 0.5,
21
21
  borderStyle: 'solid',
22
- borderColor: theme.palette.paper.grey
22
+ borderColor: theme.palette.border.weak
23
23
  },
24
24
  error: {
25
25
  alignItems: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","Text","View","ImageCore","css","StyleSheet","useTheme","useStyles","theme","root","rounded","borderRadius","shape","roundness","overflow","placeholder","backgroundColor","palette","paper","grey","outlined","borderWidth","hairlineWidth","borderStyle","borderColor","error","alignItems","height","justifyContent","width","errorText","color","text","primary","fontFamily","fontSize","letterSpacing","lineHeight","textAlign","determinePlaceholderMode","props","disablePlaceholder","Image","alt","cache","disableDrag","disableLongClick","disableOutline","loading","onError","onErrorProp","onLoad","onLoadProp","overlaidChildren","resizeMode","source","style","square","otherProps","failed","setFailed","styles","placeholderMode","undefined","absoluteFill","zIndex","uri"],"sources":["Image.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport type { ImageCoreProps } from '../ImageCore';\nimport ImageCore from '../ImageCore';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport type ImageProps from './ImageProps';\n\ntype PlaceholderMode =\n | 'default'\n | 'custom'\n | 'none';\n\ntype ImageStyleKeys =\n | 'root'\n | 'rounded'\n | 'placeholder'\n | 'outlined'\n | 'error'\n | 'errorText';\n\ntype ImageStyles = NamedStylesStringUnion<ImageStyleKeys>;\n\nconst useStyles: UseStyles<ImageStyles> = function (): ImageStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rounded: {\n borderRadius: theme.shape.roundness,\n overflow: 'hidden',\n },\n placeholder: {\n backgroundColor: theme.palette.paper.grey,\n },\n outlined: {\n borderWidth: StyleSheet.hairlineWidth,\n borderStyle: 'solid',\n borderColor: theme.palette.paper.grey,\n },\n error: {\n alignItems: 'center',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n errorText: {\n color: theme.palette.text.primary,\n fontFamily: 'Inter-Medium',\n fontSize: 12,\n letterSpacing: 0,\n lineHeight: 18,\n textAlign: 'center',\n },\n };\n};\n\nfunction determinePlaceholderMode(props: ImageProps): PlaceholderMode {\n if (props.disablePlaceholder) {\n return 'none';\n }\n\n return props.placeholder ? 'custom' : 'default';\n}\n\nexport default function Image(props: ImageProps) {\n const {\n alt,\n cache = 'immutable',\n disableDrag,\n disableLongClick,\n disableOutline,\n disablePlaceholder,\n error,\n loading = 'lazy',\n onError: onErrorProp,\n onLoad: onLoadProp,\n overlaidChildren,\n placeholder,\n resizeMode = 'cover',\n source,\n style,\n square = false,\n ...otherProps\n } = props;\n\n const [failed, setFailed] = useState(false);\n\n const styles = useStyles();\n\n const onLoad: ImageCoreProps['onLoad'] = () => {\n setFailed(false);\n\n onLoadProp?.();\n };\n\n const onError: ImageCoreProps['onError'] = () => {\n setFailed(true);\n\n onErrorProp?.();\n };\n\n const placeholderMode = determinePlaceholderMode(props);\n\n return (\n <View\n style={css([\n styles.root,\n !disableOutline ? styles.outlined : undefined,\n !square ? styles.rounded : undefined,\n placeholderMode === 'default' ? styles.placeholder : undefined,\n style,\n ])}\n {...otherProps}\n >\n {placeholderMode === 'custom' ? (\n <View\n style={css([\n StyleSheet.absoluteFill,\n { zIndex: -1 },\n ])}\n >\n {placeholder}\n </View>\n ) : null}\n\n {failed ? (\n <View style={styles.error}>\n {error ?? (\n <Text\n children={alt}\n style={styles.errorText}\n />\n )}\n </View>\n ) : source.uri ? (\n <ImageCore\n alt={alt}\n cache={cache}\n disableDrag={disableDrag}\n disableLongClick={disableLongClick}\n height={'100%'}\n loading={loading}\n onError={onError}\n onLoad={onLoad}\n resizeMode={resizeMode}\n source={source}\n width={'100%'}\n />\n ) : null}\n\n {overlaidChildren ? (\n <View style={StyleSheet.absoluteFill}>\n {overlaidChildren}\n </View>\n ) : null}\n </View>\n );\n};"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAGA,OAAOC,SAAP,MAAsB,cAAtB;AACA,SAASC,GAAT,EAAcC,UAAd,EAA0BC,QAA1B,QAA0C,WAA1C;;AAk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B,MAAM,CAAC/B;EAFlB,EAFR,CADG,GASHyB,MAAM,CAACW,GAAP,gBACA,oBAAC,SAAD;IACI,GAAG,EAAEvB,GADT;IAEI,KAAK,EAAEC,KAFX;IAGI,WAAW,EAAEC,WAHjB;IAII,gBAAgB,EAAEC,gBAJtB;IAKI,MAAM,EAAE,MALZ;IAMI,OAAO,EAAEE,OANb;IAOI,OAAO,EAAEC,OAPb;IAQI,MAAM,EAAEE,MARZ;IASI,UAAU,EAAEG,UAThB;IAUI,MAAM,EAAEC,MAVZ;IAWI,KAAK,EAAE;EAXX,EADA,GAcA,IA5CR,EA8CKF,gBAAgB,gBACb,oBAAC,IAAD;IAAM,KAAK,EAAEhD,UAAU,CAAC2D;EAAxB,GACKX,gBADL,CADa,GAIb,IAlDR,CADJ;AAsDH;AAAA"}
1
+ {"version":3,"names":["React","useState","Text","View","ImageCore","css","StyleSheet","useTheme","useStyles","theme","root","rounded","borderRadius","shape","roundness","overflow","placeholder","backgroundColor","palette","paper","grey","outlined","borderWidth","borderStyle","borderColor","border","weak","error","alignItems","height","justifyContent","width","errorText","color","text","primary","fontFamily","fontSize","letterSpacing","lineHeight","textAlign","determinePlaceholderMode","props","disablePlaceholder","Image","alt","cache","disableDrag","disableLongClick","disableOutline","loading","onError","onErrorProp","onLoad","onLoadProp","overlaidChildren","resizeMode","source","style","square","otherProps","failed","setFailed","styles","placeholderMode","undefined","absoluteFill","zIndex","uri"],"sources":["Image.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport type { ImageCoreProps } from '../ImageCore';\nimport ImageCore from '../ImageCore';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport type ImageProps from './ImageProps';\n\ntype PlaceholderMode =\n | 'default'\n | 'custom'\n | 'none';\n\ntype ImageStyleKeys =\n | 'root'\n | 'rounded'\n | 'placeholder'\n | 'outlined'\n | 'error'\n | 'errorText';\n\ntype ImageStyles = NamedStylesStringUnion<ImageStyleKeys>;\n\nconst useStyles: UseStyles<ImageStyles> = function (): ImageStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rounded: {\n borderRadius: theme.shape.roundness,\n overflow: 'hidden',\n },\n placeholder: {\n backgroundColor: theme.palette.paper.grey,\n },\n outlined: {\n borderWidth: 0.5,\n borderStyle: 'solid',\n borderColor: theme.palette.border.weak,\n },\n error: {\n alignItems: 'center',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n errorText: {\n color: theme.palette.text.primary,\n fontFamily: 'Inter-Medium',\n fontSize: 12,\n letterSpacing: 0,\n lineHeight: 18,\n textAlign: 'center',\n },\n };\n};\n\nfunction determinePlaceholderMode(props: ImageProps): PlaceholderMode {\n if (props.disablePlaceholder) {\n return 'none';\n }\n\n return props.placeholder ? 'custom' : 'default';\n}\n\nexport default function Image(props: ImageProps) {\n const {\n alt,\n cache = 'immutable',\n disableDrag,\n disableLongClick,\n disableOutline,\n disablePlaceholder,\n error,\n loading = 'lazy',\n onError: onErrorProp,\n onLoad: onLoadProp,\n overlaidChildren,\n placeholder,\n resizeMode = 'cover',\n source,\n style,\n square = false,\n ...otherProps\n } = props;\n\n const [failed, setFailed] = useState(false);\n\n const styles = useStyles();\n\n const onLoad: ImageCoreProps['onLoad'] = () => {\n setFailed(false);\n\n onLoadProp?.();\n };\n\n const onError: ImageCoreProps['onError'] = () => {\n setFailed(true);\n\n onErrorProp?.();\n };\n\n const placeholderMode = determinePlaceholderMode(props);\n\n return (\n <View\n style={css([\n styles.root,\n !disableOutline ? styles.outlined : undefined,\n !square ? styles.rounded : undefined,\n placeholderMode === 'default' ? styles.placeholder : undefined,\n style,\n ])}\n {...otherProps}\n >\n {placeholderMode === 'custom' ? (\n <View\n style={css([\n StyleSheet.absoluteFill,\n { zIndex: -1 },\n ])}\n >\n {placeholder}\n </View>\n ) : null}\n\n {failed ? (\n <View style={styles.error}>\n {error ?? (\n <Text\n children={alt}\n style={styles.errorText}\n />\n )}\n </View>\n ) : source.uri ? (\n <ImageCore\n alt={alt}\n cache={cache}\n disableDrag={disableDrag}\n disableLongClick={disableLongClick}\n height={'100%'}\n loading={loading}\n onError={onError}\n onLoad={onLoad}\n resizeMode={resizeMode}\n source={source}\n width={'100%'}\n />\n ) : null}\n\n {overlaidChildren ? (\n <View style={StyleSheet.absoluteFill}>\n {overlaidChildren}\n </View>\n ) : null}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAGA,OAAOC,SAAP,MAAsB,cAAtB;AACA,SAASC,GAAT,EAAcC,UAAd,EAA0BC,QAA1B,QAA0C,WAA1C;;AAkBA,MAAMC,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE,EADH;IAEHC,OAAO,EAAE;MACLC,YAAY,EAAEH,KAAK,CAACI,KAAN,CAAYC,SADrB;MAELC,QAAQ,EAAE;IAFL,CAFN;IAMHC,WAAW,EAAE;MACTC,eAAe,EAAER,KAAK,CAACS,OAAN,CAAcC,KAAd,CAAoBC;IAD5B,CANV;IASHC,QAAQ,EAAE;MACNC,WAAW,EAAE,GADP;MAENC,WAAW,EAAE,OAFP;MAGNC,WAAW,EAAEf,KAAK,CAACS,OAAN,CAAcO,MAAd,CAAqBC;IAH5B,CATP;IAcHC,KAAK,EAAE;MACHC,UAAU,EAAE,QADT;MAEHC,MAAM,EAAE,MAFL;MAGHC,cAAc,EAAE,QAHb;MAIHC,KAAK,EAAE;IAJJ,CAdJ;IAoBHC,SAAS,EAAE;MACPC,KAAK,EAAExB,KAAK,CAACS,OAAN,CAAcgB,IAAd,CAAmBC,OADnB;MAEPC,UAAU,EAAE,cAFL;MAGPC,QAAQ,EAAE,EAHH;MAIPC,aAAa,EAAE,CAJR;MAKPC,UAAU,EAAE,EALL;MAMPC,SAA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BsD,SAHpB,EAIPD,eAAe,KAAK,SAApB,GAAgCD,MAAM,CAAC/C,WAAvC,GAAqDiD,SAJ9C,EAKPP,KALO,CAAD;EADd,GAQQE,UARR,GAUKI,eAAe,KAAK,QAApB,gBACG,oBAAC,IAAD;IACI,KAAK,EAAE3D,GAAG,CAAC,CACPC,UAAU,CAAC4D,YADJ,EAEP;MAAEC,MAAM,EAAE,CAAC;IAAX,CAFO,CAAD;EADd,GAMKnD,WANL,CADH,GASG,IAnBR,EAqBK6C,MAAM,gBACH,oBAAC,IAAD;IAAM,KAAK,EAAEE,MAAM,CAACpC;EAApB,GACKA,KAAK,iBACF,oBAAC,IAAD;IACI,QAAQ,EAAEkB,GADd;IAEI,KAAK,EAAEkB,MAAM,CAAC/B;EAFlB,EAFR,CADG,GASHyB,MAAM,CAACW,GAAP,gBACA,oBAAC,SAAD;IACI,GAAG,EAAEvB,GADT;IAEI,KAAK,EAAEC,KAFX;IAGI,WAAW,EAAEC,WAHjB;IAII,gBAAgB,EAAEC,gBAJtB;IAKI,MAAM,EAAE,MALZ;IAMI,OAAO,EAAEE,OANb;IAOI,OAAO,EAAEC,OAPb;IAQI,MAAM,EAAEE,MARZ;IASI,UAAU,EAAEG,UAThB;IAUI,MAAM,EAAEC,MAVZ;IAWI,KAAK,EAAE;EAXX,EADA,GAcA,IA5CR,EA8CKF,gBAAgB,gBACb,oBAAC,IAAD;IAAM,KAAK,EAAEjD,UAAU,CAAC4D;EAAxB,GACKX,gBADL,CADa,GAIb,IAlDR,CADJ;AAsDH;AAAA"}
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useContext } from 'react';
2
2
  import { Animated } from 'react-native';
3
- import FastImage from 'react-native-fast-image';
3
+ import FastImage from '@d11/react-native-fast-image';
4
4
  import { useAnimatedValue } from '../hooks';
5
5
  import { isNotAndroid12 } from '../utils';
6
6
  import ImageFileExtensionContext from './ImageFileExtensionContext'; // @ts-ignore
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useContext","Animated","FastImage","useAnimatedValue","isNotAndroid12","ImageFileExtensionContext","AnimatedFastImage","createAnimatedComponent","INITIAL_OPACITY","LOADED_OPACITY","ANIMATION_DURATION","ImageCore","props","cache","height","onError","onLoad","resizeMode","source","width","opacity","acceptHeader","handleLoad","timing","toValue","duration","useNativeDriver","start","uri","headers"],"sources":["ImageCoreNative.tsx"],"sourcesContent":["import React, { useCallback, useContext } from 'react';\nimport { Animated } from 'react-native';\nimport FastImage from 'react-native-fast-image';\nimport { useAnimatedValue } from '../hooks';\nimport { isNotAndroid12 } from '../utils';\nimport type ImageCoreProps from './ImageCoreProps';\nimport ImageFileExtensionContext from './ImageFileExtensionContext';\n\n// @ts-ignore\nconst AnimatedFastImage = Animated.createAnimatedComponent(FastImage);\n\nconst INITIAL_OPACITY = 0;\nconst LOADED_OPACITY = 1;\n\nconst ANIMATION_DURATION = 200;\n\nexport default function ImageCore(props: ImageCoreProps) {\n const {\n cache,\n height,\n onError,\n onLoad,\n resizeMode,\n source,\n width,\n } = props;\n\n const opacity = useAnimatedValue(INITIAL_OPACITY);\n\n const acceptHeader = useContext(ImageFileExtensionContext);\n\n const handleLoad = useCallback(() => {\n Animated.timing(opacity, {\n toValue: LOADED_OPACITY,\n duration: ANIMATION_DURATION,\n useNativeDriver: isNotAndroid12,\n }).start();\n\n onLoad?.();\n }, [onLoad]);\n\n return (\n <AnimatedFastImage\n onError={onError}\n onLoad={handleLoad}\n resizeMode={resizeMode}\n source={{\n cache,\n uri: source.uri,\n headers: {\n 'Accept': acceptHeader,\n },\n }}\n style={[\n { opacity },\n { width, height },\n ]}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,UAA7B,QAA+C,OAA/C;AACA,SAASC,QAAT,QAAyB,cAAzB;AACA,OAAOC,SAAP,MAAsB,yBAAtB;AACA,SAASC,gBAAT,QAAiC,UAAjC;AACA,SAASC,cAAT,QAA+B,UAA/B;AAEA,OAAOC,yBAAP,MAAsC,6BAAtC,C,CAEA;;AACA,MAAMC,iBAAiB,GAAGL,QAAQ,CAACM,uBAAT,CAAiCL,SAAjC,CAA1B;AAEA,MAAMM,eAAe,GAAG,CAAxB;AACA,MAAMC,cAAc,GAAG,CAAvB;AAEA,MAAMC,kBAAkB,GAAG,GAA3B;AAEA,eAAe,SAASC,SAAT,CAAmBC,KAAnB,EAA0C;EACrD,MAAM;IACFC,KADE;IAEFC,MAFE;IAGFC,OAHE;IAIFC,MAJE;IAKFC,UALE;IAMFC,MANE;IAOFC;EAPE,IAQFP,KARJ;EAUA,MAAMQ,OAAO,GAAGjB,gBAAgB,CAACK,eAAD,CAAhC;EAEA,MAAMa,YAAY,GAAGrB,UAAU,CAACK,yBAAD,CAA/B;EAEA,MAAMiB,UAAU,GAAGvB,WAAW,CAAC,MAAM;IACjCE,QAAQ,CAACsB,MAAT,CAAgBH,OAAhB,EAAyB;MACrBI,OAAO,EAAEf,cADY;MAErBgB,QAAQ,EAAEf,kBAFW;MAGrBgB,eAAe,EAAEtB;IAHI,CAAzB,EAIGuB,KAJH;IAMAX,MAAM,SAAN,IAAAA,MAAM,WAAN,YAAAA,MAAM;EACT,CAR6B,EAQ3B,CAACA,MAAD,CAR2B,CAA9B;EAUA,oBACI,oBAAC,iBAAD;IACI,OAAO,EAAED,OADb;IAEI,MAAM,EAAEO,UAFZ;IAGI,UAAU,EAAEL,UAHhB;IAII,MAAM,EAAE;MACJJ,KADI;MAEJe,GAAG,EAAEV,MAAM,CAACU,GAFR;MAGJC,OAAO,EAAE;QACL,UAAUR;MADL;IAHL,CAJZ;IAWI,KAAK,EAAE,CACH;MAAED;IAAF,CADG,EAEH;MAAED,KAAF;MAASL;IAAT,CAFG;EAXX,EADJ;AAkBH;AAAA"}
1
+ {"version":3,"names":["React","useCallback","useContext","Animated","FastImage","useAnimatedValue","isNotAndroid12","ImageFileExtensionContext","AnimatedFastImage","createAnimatedComponent","INITIAL_OPACITY","LOADED_OPACITY","ANIMATION_DURATION","ImageCore","props","cache","height","onError","onLoad","resizeMode","source","width","opacity","acceptHeader","handleLoad","timing","toValue","duration","useNativeDriver","start","uri","headers"],"sources":["ImageCoreNative.tsx"],"sourcesContent":["import React, { useCallback, useContext } from 'react';\nimport { Animated } from 'react-native';\nimport FastImage from '@d11/react-native-fast-image';\nimport { useAnimatedValue } from '../hooks';\nimport { isNotAndroid12 } from '../utils';\nimport type ImageCoreProps from './ImageCoreProps';\nimport ImageFileExtensionContext from './ImageFileExtensionContext';\n\n// @ts-ignore\nconst AnimatedFastImage = Animated.createAnimatedComponent(FastImage);\n\nconst INITIAL_OPACITY = 0;\nconst LOADED_OPACITY = 1;\n\nconst ANIMATION_DURATION = 200;\n\nexport default function ImageCore(props: ImageCoreProps) {\n const {\n cache,\n height,\n onError,\n onLoad,\n resizeMode,\n source,\n width,\n } = props;\n\n const opacity = useAnimatedValue(INITIAL_OPACITY);\n\n const acceptHeader = useContext(ImageFileExtensionContext);\n\n const handleLoad = useCallback(() => {\n Animated.timing(opacity, {\n toValue: LOADED_OPACITY,\n duration: ANIMATION_DURATION,\n useNativeDriver: isNotAndroid12,\n }).start();\n\n onLoad?.();\n }, [onLoad]);\n\n return (\n <AnimatedFastImage\n onError={onError}\n onLoad={handleLoad}\n resizeMode={resizeMode}\n source={{\n cache,\n uri: source.uri,\n headers: {\n 'Accept': acceptHeader,\n },\n }}\n style={[\n { opacity },\n { width, height },\n ]}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,UAA7B,QAA+C,OAA/C;AACA,SAASC,QAAT,QAAyB,cAAzB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,SAASC,gBAAT,QAAiC,UAAjC;AACA,SAASC,cAAT,QAA+B,UAA/B;AAEA,OAAOC,yBAAP,MAAsC,6BAAtC,C,CAEA;;AACA,MAAMC,iBAAiB,GAAGL,QAAQ,CAACM,uBAAT,CAAiCL,SAAjC,CAA1B;AAEA,MAAMM,eAAe,GA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