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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (445) hide show
  1. package/build/commonjs/Accordion/Accordion.js +7 -4
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/useVariantStyleMap.js +15 -8
  4. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  5. package/build/commonjs/AppBar/AppBar.js +6 -1
  6. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  7. package/build/commonjs/Badge/Badge.js +4 -3
  8. package/build/commonjs/Badge/Badge.js.map +1 -1
  9. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  10. package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
  11. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
  12. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +5 -2
  13. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  14. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  15. package/build/commonjs/Button/Button.js +26 -12
  16. package/build/commonjs/Button/Button.js.map +1 -1
  17. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  18. package/build/commonjs/Button/useVariantStyleMap.js +3 -1
  19. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
  20. package/build/commonjs/ButtonBase/index.js +2 -2
  21. package/build/commonjs/ButtonBase/index.js.map +1 -1
  22. package/build/commonjs/Checkbox/Checkbox.js +4 -1
  23. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  24. package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
  25. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  26. package/build/commonjs/Chip/Chip.js +21 -14
  27. package/build/commonjs/Chip/Chip.js.map +1 -1
  28. package/build/commonjs/Chip/ChipProps.js +3 -1
  29. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  30. package/build/commonjs/Chip/index.js +6 -0
  31. package/build/commonjs/Chip/index.js.map +1 -1
  32. package/build/commonjs/Chip/useChipStyle.js +29 -19
  33. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  34. package/build/commonjs/Dialog/Dialog.js +7 -10
  35. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  36. package/build/commonjs/Dialog/DialogProps.js +1 -1
  37. package/build/commonjs/Dialog/DialogProps.js.map +1 -1
  38. package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
  39. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
  40. package/build/commonjs/Dialog/useDialogStyle.js +19 -8
  41. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  42. package/build/commonjs/DialogActions/DialogActions.js +0 -1
  43. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  44. package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
  45. package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
  46. package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
  47. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  48. package/build/commonjs/Divider/Divider.js +17 -9
  49. package/build/commonjs/Divider/Divider.js.map +1 -1
  50. package/build/commonjs/Divider/DividerProps.js +1 -1
  51. package/build/commonjs/Divider/DividerProps.js.map +1 -1
  52. package/build/commonjs/Empty/Empty.js +1 -1
  53. package/build/commonjs/Empty/Empty.js.map +1 -1
  54. package/build/commonjs/Flexbox/Flexbox.js +2 -0
  55. package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
  56. package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
  57. package/build/commonjs/IconButton/IconButton.js +3 -0
  58. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  59. package/build/commonjs/IconButton/IconButtonProps.js +1 -1
  60. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  61. package/build/commonjs/ImageCore/ImageCoreNative.js +1 -1
  62. package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
  63. package/build/commonjs/ListItem/ListItem.js +38 -26
  64. package/build/commonjs/ListItem/ListItem.js.map +1 -1
  65. package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
  66. package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
  67. package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
  68. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  69. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  70. package/build/commonjs/ListItemText/ListItemText.js +20 -21
  71. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  72. package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
  73. package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
  74. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  75. package/build/commonjs/Pagination/NumberPagination.js +1 -1
  76. package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
  77. package/build/commonjs/Pagination/Pagination.js +2 -0
  78. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  79. package/build/commonjs/Pagination/PaginationProps.js +3 -1
  80. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  81. package/build/commonjs/Pagination/index.js +6 -0
  82. package/build/commonjs/Pagination/index.js.map +1 -1
  83. package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
  84. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  85. package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
  86. package/build/commonjs/Radio/Radio.js +11 -4
  87. package/build/commonjs/Radio/Radio.js.map +1 -1
  88. package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
  89. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  90. package/build/commonjs/Section/Section.js +32 -0
  91. package/build/commonjs/Section/Section.js.map +1 -0
  92. package/build/commonjs/Section/SectionProps.js +2 -0
  93. package/build/commonjs/Section/SectionProps.js.map +1 -0
  94. package/build/commonjs/Section/index.js +16 -0
  95. package/build/commonjs/Section/index.js.map +1 -0
  96. package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
  97. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  98. package/build/commonjs/SnackbarContent/SnackbarContent.js +26 -9
  99. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  100. package/build/commonjs/Tab/Tab.js +18 -18
  101. package/build/commonjs/Tab/Tab.js.map +1 -1
  102. package/build/commonjs/Tab/TabProps.js +4 -2
  103. package/build/commonjs/Tab/TabProps.js.map +1 -1
  104. package/build/commonjs/Tab/index.js +14 -0
  105. package/build/commonjs/Tab/index.js.map +1 -1
  106. package/build/commonjs/Tab/useVariantStyleMap.js +60 -16
  107. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
  108. package/build/commonjs/TabBase/TabBase.js +1 -8
  109. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  110. package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
  111. package/build/commonjs/Tabs/Tabs.js +9 -5
  112. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  113. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  114. package/build/commonjs/Tabs/useTabsStyle.js +54 -0
  115. package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
  116. package/build/commonjs/TextField/TextField.js +1 -1
  117. package/build/commonjs/TextField/TextField.js.map +1 -1
  118. package/build/commonjs/TextField/useVariantStyleMap.js +4 -3
  119. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  120. package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
  121. package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
  122. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
  123. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  124. package/build/commonjs/Toolbar/BackButton/index.js +16 -0
  125. package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
  126. package/build/commonjs/Toolbar/Toolbar.js +8 -4
  127. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  128. package/build/commonjs/Tooltip/Beaks/index.js +32 -0
  129. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
  130. package/build/commonjs/Tooltip/Tooltip.js +11 -18
  131. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  132. package/build/commonjs/Tooltip/index.js +19 -0
  133. package/build/commonjs/Tooltip/index.js.map +1 -1
  134. package/build/commonjs/Typography/Typography.js +9 -2
  135. package/build/commonjs/Typography/Typography.js.map +1 -1
  136. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  137. package/build/commonjs/hooks/useBreakpointUp.js +4 -1
  138. package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
  139. package/build/commonjs/hooks/useCollapsibleAppBar.js +1 -1
  140. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  141. package/build/commonjs/hooks/useContentContainerStyle.js +21 -28
  142. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  143. package/build/commonjs/hooks/useFadeInAppBar.js +1 -1
  144. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  145. package/build/commonjs/index.js +21 -0
  146. package/build/commonjs/index.js.map +1 -1
  147. package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
  148. package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
  149. package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
  150. package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
  151. package/build/commonjs/internal/icons/ChevronRight.js +4 -2
  152. package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
  153. package/build/commonjs/internal/icons/Close.js +4 -2
  154. package/build/commonjs/internal/icons/Close.js.map +1 -1
  155. package/build/commonjs/internal/icons/index.js +8 -0
  156. package/build/commonjs/internal/icons/index.js.map +1 -1
  157. package/build/module/Accordion/Accordion.js +7 -4
  158. package/build/module/Accordion/Accordion.js.map +1 -1
  159. package/build/module/Accordion/useVariantStyleMap.js +15 -8
  160. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  161. package/build/module/AppBar/AppBar.js +5 -1
  162. package/build/module/AppBar/AppBar.js.map +1 -1
  163. package/build/module/Badge/Badge.js +4 -3
  164. package/build/module/Badge/Badge.js.map +1 -1
  165. package/build/module/Badge/BadgeProps.js.map +1 -1
  166. package/build/module/Badge/useVariantStyleMap.js +2 -2
  167. package/build/module/Badge/useVariantStyleMap.js.map +1 -1
  168. package/build/module/BottomSheetTitle/BottomSheetTitle.js +5 -2
  169. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  170. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  171. package/build/module/Button/Button.js +27 -13
  172. package/build/module/Button/Button.js.map +1 -1
  173. package/build/module/Button/ButtonProps.js.map +1 -1
  174. package/build/module/Button/useVariantStyleMap.js +3 -1
  175. package/build/module/Button/useVariantStyleMap.js.map +1 -1
  176. package/build/module/ButtonBase/index.js +1 -1
  177. package/build/module/ButtonBase/index.js.map +1 -1
  178. package/build/module/Checkbox/Checkbox.js +4 -1
  179. package/build/module/Checkbox/Checkbox.js.map +1 -1
  180. package/build/module/Checkbox/useVariantStyleMap.js +6 -2
  181. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  182. package/build/module/Chip/Chip.js +17 -13
  183. package/build/module/Chip/Chip.js.map +1 -1
  184. package/build/module/Chip/ChipProps.js +1 -0
  185. package/build/module/Chip/ChipProps.js.map +1 -1
  186. package/build/module/Chip/index.js +1 -1
  187. package/build/module/Chip/index.js.map +1 -1
  188. package/build/module/Chip/useChipStyle.js +29 -19
  189. package/build/module/Chip/useChipStyle.js.map +1 -1
  190. package/build/module/Dialog/Dialog.js +7 -9
  191. package/build/module/Dialog/Dialog.js.map +1 -1
  192. package/build/module/Dialog/DialogProps.js +1 -1
  193. package/build/module/Dialog/DialogProps.js.map +1 -1
  194. package/build/module/Dialog/useDialogSectionStyle.js +6 -4
  195. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
  196. package/build/module/Dialog/useDialogStyle.js +18 -8
  197. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  198. package/build/module/DialogActions/DialogActions.js +0 -1
  199. package/build/module/DialogActions/DialogActions.js.map +1 -1
  200. package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
  201. package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
  202. package/build/module/DialogTitle/DialogTitle.js +6 -3
  203. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  204. package/build/module/Divider/Divider.js +7 -0
  205. package/build/module/Divider/Divider.js.map +1 -1
  206. package/build/module/Divider/DividerProps.js +1 -1
  207. package/build/module/Divider/DividerProps.js.map +1 -1
  208. package/build/module/Empty/Empty.js +1 -1
  209. package/build/module/Empty/Empty.js.map +1 -1
  210. package/build/module/Flexbox/Flexbox.js +2 -0
  211. package/build/module/Flexbox/Flexbox.js.map +1 -1
  212. package/build/module/Flexbox/FlexboxProps.js.map +1 -1
  213. package/build/module/IconButton/IconButton.js +3 -0
  214. package/build/module/IconButton/IconButton.js.map +1 -1
  215. package/build/module/IconButton/IconButtonProps.js +1 -1
  216. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  217. package/build/module/ImageCore/ImageCoreNative.js +1 -1
  218. package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
  219. package/build/module/ListItem/ListItem.js +36 -28
  220. package/build/module/ListItem/ListItem.js.map +1 -1
  221. package/build/module/ListItem/ListItemProps.js.map +1 -1
  222. package/build/module/ListItemIcon/ListItemIcon.js +1 -2
  223. package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
  224. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  225. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  226. package/build/module/ListItemText/ListItemText.js +17 -19
  227. package/build/module/ListItemText/ListItemText.js.map +1 -1
  228. package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
  229. package/build/module/ListSubheader/ListSubheader.js +1 -1
  230. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  231. package/build/module/Pagination/NumberPagination.js +1 -1
  232. package/build/module/Pagination/NumberPagination.js.map +1 -1
  233. package/build/module/Pagination/Pagination.js +2 -0
  234. package/build/module/Pagination/Pagination.js.map +1 -1
  235. package/build/module/Pagination/PaginationProps.js +1 -0
  236. package/build/module/Pagination/PaginationProps.js.map +1 -1
  237. package/build/module/Pagination/index.js +1 -1
  238. package/build/module/Pagination/index.js.map +1 -1
  239. package/build/module/PaginationItem/PaginationItem.js +28 -21
  240. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  241. package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
  242. package/build/module/Radio/Radio.js +10 -4
  243. package/build/module/Radio/Radio.js.map +1 -1
  244. package/build/module/RadioGroup/RadioGroup.js +2 -20
  245. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  246. package/build/module/Section/Section.js +19 -0
  247. package/build/module/Section/Section.js.map +1 -0
  248. package/build/module/Section/SectionProps.js +2 -0
  249. package/build/module/Section/SectionProps.js.map +1 -0
  250. package/build/module/Section/index.js +2 -0
  251. package/build/module/Section/index.js.map +1 -0
  252. package/build/module/ShadowView/ShadowView.native.js +4 -0
  253. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  254. package/build/module/SnackbarContent/SnackbarContent.js +26 -9
  255. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  256. package/build/module/Tab/Tab.js +19 -18
  257. package/build/module/Tab/Tab.js.map +1 -1
  258. package/build/module/Tab/TabProps.js +2 -1
  259. package/build/module/Tab/TabProps.js.map +1 -1
  260. package/build/module/Tab/index.js +1 -0
  261. package/build/module/Tab/index.js.map +1 -1
  262. package/build/module/Tab/useVariantStyleMap.js +60 -16
  263. package/build/module/Tab/useVariantStyleMap.js.map +1 -1
  264. package/build/module/TabBase/TabBase.js +1 -8
  265. package/build/module/TabBase/TabBase.js.map +1 -1
  266. package/build/module/TabBase/TabBaseProps.js.map +1 -1
  267. package/build/module/Tabs/Tabs.js +8 -5
  268. package/build/module/Tabs/Tabs.js.map +1 -1
  269. package/build/module/Tabs/TabsProps.js.map +1 -1
  270. package/build/module/Tabs/useTabsStyle.js +44 -0
  271. package/build/module/Tabs/useTabsStyle.js.map +1 -0
  272. package/build/module/TextField/TextField.js +1 -1
  273. package/build/module/TextField/TextField.js.map +1 -1
  274. package/build/module/TextField/useVariantStyleMap.js +4 -3
  275. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  276. package/build/module/Toolbar/BackButton/BackButton.js +32 -0
  277. package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
  278. package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
  279. package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  280. package/build/module/Toolbar/BackButton/index.js +2 -0
  281. package/build/module/Toolbar/BackButton/index.js.map +1 -0
  282. package/build/module/Toolbar/Toolbar.js +7 -3
  283. package/build/module/Toolbar/Toolbar.js.map +1 -1
  284. package/build/module/Tooltip/Beaks/index.js +4 -0
  285. package/build/module/Tooltip/Beaks/index.js.map +1 -1
  286. package/build/module/Tooltip/Tooltip.js +4 -10
  287. package/build/module/Tooltip/Tooltip.js.map +1 -1
  288. package/build/module/Tooltip/index.js +1 -0
  289. package/build/module/Tooltip/index.js.map +1 -1
  290. package/build/module/Typography/Typography.js +9 -2
  291. package/build/module/Typography/Typography.js.map +1 -1
  292. package/build/module/Typography/TypographyProps.js.map +1 -1
  293. package/build/module/hooks/useBreakpointUp.js +4 -1
  294. package/build/module/hooks/useBreakpointUp.js.map +1 -1
  295. package/build/module/hooks/useCollapsibleAppBar.js +1 -1
  296. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  297. package/build/module/hooks/useContentContainerStyle.js +23 -26
  298. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  299. package/build/module/hooks/useFadeInAppBar.js +1 -1
  300. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  301. package/build/module/index.js +2 -0
  302. package/build/module/index.js.map +1 -1
  303. package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
  304. package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
  305. package/build/module/internal/icons/ChevronLeft.js +4 -2
  306. package/build/module/internal/icons/ChevronLeft.js.map +1 -1
  307. package/build/module/internal/icons/ChevronRight.js +4 -2
  308. package/build/module/internal/icons/ChevronRight.js.map +1 -1
  309. package/build/module/internal/icons/Close.js +4 -2
  310. package/build/module/internal/icons/Close.js.map +1 -1
  311. package/build/module/internal/icons/index.js +1 -0
  312. package/build/module/internal/icons/index.js.map +1 -1
  313. package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
  314. package/build/typescript/Badge/BadgeProps.d.ts +10 -5
  315. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +1 -0
  316. package/build/typescript/Button/ButtonProps.d.ts +5 -0
  317. package/build/typescript/ButtonBase/index.d.ts +1 -1
  318. package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
  319. package/build/typescript/Chip/ChipProps.d.ts +11 -4
  320. package/build/typescript/Chip/index.d.ts +1 -1
  321. package/build/typescript/Chip/useChipStyle.d.ts +4 -3
  322. package/build/typescript/Dialog/DialogProps.d.ts +1 -6
  323. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  324. package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +9 -0
  325. package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -1
  326. package/build/typescript/Divider/DividerProps.d.ts +1 -1
  327. package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
  328. package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
  329. package/build/typescript/ListItem/ListItem.d.ts +1 -1
  330. package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
  331. package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
  332. package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
  333. package/build/typescript/Pagination/index.d.ts +2 -2
  334. package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
  335. package/build/typescript/Section/Section.d.ts +3 -0
  336. package/build/typescript/Section/SectionProps.d.ts +6 -0
  337. package/build/typescript/Section/index.d.ts +2 -0
  338. package/build/typescript/Tab/TabProps.d.ts +8 -1
  339. package/build/typescript/Tab/index.d.ts +2 -1
  340. package/build/typescript/Tab/useVariantStyleMap.d.ts +3 -2
  341. package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
  342. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  343. package/build/typescript/Tabs/TabsProps.d.ts +6 -1
  344. package/build/typescript/Tabs/useTabsStyle.d.ts +7 -0
  345. package/build/typescript/Toolbar/BackButton/BackButton.d.ts +3 -0
  346. package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
  347. package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
  348. package/build/typescript/Toolbar/Toolbar.d.ts +6 -1
  349. package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
  350. package/build/typescript/Tooltip/index.d.ts +1 -0
  351. package/build/typescript/Typography/TypographyProps.d.ts +4 -0
  352. package/build/typescript/hooks/useContentContainerStyle.d.ts +4 -8
  353. package/build/typescript/index.d.ts +2 -0
  354. package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
  355. package/build/typescript/internal/icons/index.d.ts +1 -0
  356. package/package.json +5 -5
  357. package/src/Accordion/Accordion.tsx +11 -8
  358. package/src/Accordion/useVariantStyleMap.ts +14 -6
  359. package/src/AppBar/AppBar.tsx +4 -0
  360. package/src/Badge/Badge.tsx +4 -3
  361. package/src/Badge/BadgeProps.ts +12 -6
  362. package/src/Badge/useVariantStyleMap.ts +2 -2
  363. package/src/BottomSheetTitle/BottomSheetTitle.tsx +4 -1
  364. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +1 -0
  365. package/src/Button/Button.tsx +28 -12
  366. package/src/Button/ButtonProps.ts +6 -0
  367. package/src/Button/useVariantStyleMap.ts +1 -1
  368. package/src/ButtonBase/index.ts +1 -1
  369. package/src/Checkbox/Checkbox.tsx +11 -8
  370. package/src/Checkbox/useVariantStyleMap.ts +6 -1
  371. package/src/Chip/Chip.tsx +20 -13
  372. package/src/Chip/ChipProps.ts +13 -4
  373. package/src/Chip/index.ts +1 -1
  374. package/src/Chip/useChipStyle.ts +34 -17
  375. package/src/Dialog/Dialog.tsx +8 -9
  376. package/src/Dialog/DialogProps.ts +1 -7
  377. package/src/Dialog/useDialogSectionStyle.ts +6 -4
  378. package/src/Dialog/useDialogStyle.ts +19 -7
  379. package/src/DialogActions/DialogActions.tsx +0 -1
  380. package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
  381. package/src/DialogTitle/DialogTitle.tsx +6 -1
  382. package/src/Divider/Divider.tsx +5 -0
  383. package/src/Divider/DividerProps.ts +1 -1
  384. package/src/Empty/Empty.tsx +1 -1
  385. package/src/Flexbox/Flexbox.tsx +2 -0
  386. package/src/Flexbox/FlexboxProps.ts +5 -0
  387. package/src/IconButton/IconButton.tsx +2 -0
  388. package/src/IconButton/IconButtonProps.ts +1 -0
  389. package/src/ImageCore/ImageCoreNative.tsx +1 -1
  390. package/src/ListItem/ListItem.tsx +61 -30
  391. package/src/ListItem/ListItemProps.ts +5 -0
  392. package/src/ListItemIcon/ListItemIcon.tsx +1 -2
  393. package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
  394. package/src/ListItemText/ListItemText.tsx +20 -28
  395. package/src/ListItemText/ListItemTextProps.ts +2 -10
  396. package/src/ListSubheader/ListSubheader.tsx +1 -1
  397. package/src/Pagination/NumberPagination.tsx +1 -1
  398. package/src/Pagination/Pagination.tsx +3 -2
  399. package/src/Pagination/PaginationProps.ts +15 -0
  400. package/src/Pagination/index.ts +2 -2
  401. package/src/PaginationItem/PaginationItem.tsx +31 -24
  402. package/src/PaginationItem/PaginationItemProps.ts +7 -0
  403. package/src/Radio/Radio.tsx +12 -3
  404. package/src/RadioGroup/RadioGroup.tsx +2 -28
  405. package/src/Section/Section.tsx +26 -0
  406. package/src/Section/SectionProps.ts +6 -0
  407. package/src/Section/index.ts +2 -0
  408. package/src/ShadowView/ShadowView.native.tsx +4 -0
  409. package/src/SnackbarContent/SnackbarContent.tsx +36 -15
  410. package/src/Tab/Tab.tsx +28 -22
  411. package/src/Tab/TabProps.ts +10 -1
  412. package/src/Tab/index.ts +2 -1
  413. package/src/Tab/useVariantStyleMap.ts +65 -17
  414. package/src/TabBase/TabBase.tsx +1 -9
  415. package/src/TabBase/TabBaseProps.ts +0 -6
  416. package/src/Tabs/Tabs.tsx +7 -6
  417. package/src/Tabs/TabsProps.ts +7 -1
  418. package/src/Tabs/useTabsStyle.ts +49 -0
  419. package/src/TextField/TextField.tsx +1 -1
  420. package/src/TextField/useVariantStyleMap.ts +4 -3
  421. package/src/Toolbar/BackButton/BackButton.tsx +44 -0
  422. package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
  423. package/src/Toolbar/BackButton/index.ts +2 -0
  424. package/src/Toolbar/Toolbar.tsx +6 -1
  425. package/src/Tooltip/Beaks/index.ts +4 -0
  426. package/src/Tooltip/Tooltip.tsx +4 -9
  427. package/src/Tooltip/index.ts +1 -0
  428. package/src/Typography/Typography.tsx +3 -1
  429. package/src/Typography/TypographyProps.ts +5 -0
  430. package/src/hooks/useBreakpointUp.ts +3 -1
  431. package/src/hooks/useCollapsibleAppBar.ts +1 -1
  432. package/src/hooks/useContentContainerStyle.ts +26 -34
  433. package/src/hooks/useFadeInAppBar.ts +1 -1
  434. package/src/index.ts +3 -0
  435. package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
  436. package/src/internal/icons/ChevronLeft.tsx +4 -1
  437. package/src/internal/icons/ChevronRight.tsx +4 -1
  438. package/src/internal/icons/Close.tsx +4 -1
  439. package/src/internal/icons/index.ts +1 -0
  440. package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
  441. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
  442. package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
  443. package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
  444. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
  445. package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
@@ -1 +1 @@
1
- {"version":3,"names":["dialogSizes"],"sources":["DialogProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ModalProps } from '../Modal';\nimport type { OverridableComponentProps } from '../types';\nimport { ANIMATION_TYPE } from '../Modal';\n\nexport const dialogSizes = ['small', 'medium', 'large'] as const;\nexport type DialogSize = typeof dialogSizes[number];\n\nexport default interface DialogProps extends OverridableComponentProps<ModalProps, {\n /**\n * Type of animation used when the dialog opens and closes.\n * @default 'slide'\n */\n animationType?: ANIMATION_TYPE;\n\n /**\n * Dialog children, usually the included sub-components.\n */\n children?: React.ReactNode;\n\n /**\n * If `true`, the dialog is full-screen.\n * @default false\n */\n fullScreen?: boolean;\n\n /**\n * Determines the minWidth of the Dialog.\n * @default 'medium'\n */\n size?: DialogSize;\n\n /**\n * Top element for displaying additional information on the dialog.\n */\n topElement?: React.ReactNode;\n}> {}\n"],"mappings":";;;;;;AAKO,MAAMA,WAAW,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,OAApB,CAApB"}
1
+ {"version":3,"names":["dialogSizes"],"sources":["DialogProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ModalProps } from '../Modal';\nimport type { OverridableComponentProps } from '../types';\nimport { ANIMATION_TYPE } from '../Modal';\n\nexport const dialogSizes = ['small', 'medium', 'large', 'full'] as const;\nexport type DialogSize = typeof dialogSizes[number];\n\nexport default interface DialogProps extends OverridableComponentProps<ModalProps, {\n /**\n * Type of animation used when the dialog opens and closes.\n * @default 'slide'\n */\n animationType?: ANIMATION_TYPE;\n\n /**\n * Dialog children, usually the included sub-components.\n */\n children?: React.ReactNode;\n\n /**\n * Determines the minWidth of the Dialog.\n * @default 'medium'\n */\n size?: DialogSize;\n\n /**\n * Top element for displaying additional information on the dialog.\n */\n topElement?: React.ReactNode;\n}> {}\n"],"mappings":";;;;;;AAKO,MAAMA,WAAW,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,OAApB,EAA6B,MAA7B,CAApB"}
@@ -24,14 +24,16 @@ function useDialogSectionStyle() {
24
24
  return (0, _react.useMemo)(() => {
25
25
  const sizePaddingHorizontalMap = {
26
26
  small: {
27
- paddingHorizontal: theme.spacing(6)
27
+ paddingHorizontal: 24
28
28
  },
29
29
  medium: {
30
- // TODO: need to refactor breakpoints.
31
- paddingHorizontal: theme.spacing(windowWidth >= 448 ? 8 : 6)
30
+ paddingHorizontal: windowWidth >= 448 ? 32 : 24
32
31
  },
33
32
  large: {
34
- paddingHorizontal: theme.spacing(8)
33
+ paddingHorizontal: 32
34
+ },
35
+ full: {
36
+ paddingHorizontal: windowWidth >= 448 ? 32 : 24
35
37
  }
36
38
  };
37
39
  return sizePaddingHorizontalMap[size];
@@ -1 +1 @@
1
- {"version":3,"names":["useDialogSectionStyle","size","useDialogContext","width","windowWidth","useWindowDimensions","theme","useTheme","useMemo","sizePaddingHorizontalMap","small","paddingHorizontal","spacing","medium","large"],"sources":["useDialogSectionStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport { useDialogContext } from './DialogContext';\nimport type { DialogSize } from './DialogProps';\n\nexport default function useDialogSectionStyle() {\n const { size } = useDialogContext();\n\n const { width: windowWidth } = useWindowDimensions();\n\n const theme = useTheme();\n\n return useMemo<FountainUiStyle>(() => {\n const sizePaddingHorizontalMap: Record<DialogSize, FountainUiStyle> = {\n small: {\n paddingHorizontal: theme.spacing(6),\n },\n medium: {\n // TODO: need to refactor breakpoints.\n paddingHorizontal: theme.spacing(windowWidth >= 448 ? 8 : 6),\n },\n large: {\n paddingHorizontal: theme.spacing(8),\n },\n };\n\n return sizePaddingHorizontalMap[size];\n }, [size, theme, windowWidth]);\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AAGe,SAASA,qBAAT,GAAiC;EAC5C,MAAM;IAAEC;EAAF,IAAW,IAAAC,+BAAA,GAAjB;EAEA,MAAM;IAAEC,KAAK,EAAEC;EAAT,IAAyB,IAAAC,gCAAA,GAA/B;EAEA,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO,IAAAC,cAAA,EAAyB,MAAM;IAClC,MAAMC,wBAA6D,GAAG;MAClEC,KAAK,EAAE;QACHC,iBAAiB,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd;MADhB,CAD2D;MAIlEC,MAAM,EAAE;QACJ;QACAF,iBAAiB,EAAEL,KAAK,CAACM,OAAN,CAAcR,WAAW,IAAI,GAAf,GAAqB,CAArB,GAAyB,CAAvC;MAFf,CAJ0D;MAQlEU,KAAK,EAAE;QACHH,iBAAiB,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd;MADhB;IAR2D,CAAtE;IAaA,OAAOH,wBAAwB,CAACR,IAAD,CAA/B;EACH,CAfM,EAeJ,CAACA,IAAD,EAAOK,KAAP,EAAcF,WAAd,CAfI,CAAP;AAgBH"}
1
+ {"version":3,"names":["useDialogSectionStyle","size","useDialogContext","width","windowWidth","useWindowDimensions","theme","useTheme","useMemo","sizePaddingHorizontalMap","small","paddingHorizontal","medium","large","full"],"sources":["useDialogSectionStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport { useDialogContext } from './DialogContext';\nimport type { DialogSize } from './DialogProps';\n\nexport default function useDialogSectionStyle() {\n const { size } = useDialogContext();\n\n const { width: windowWidth } = useWindowDimensions();\n\n const theme = useTheme();\n\n return useMemo<FountainUiStyle>(() => {\n const sizePaddingHorizontalMap: Record<DialogSize, FountainUiStyle> = {\n small: {\n paddingHorizontal: 24,\n },\n medium: {\n paddingHorizontal: windowWidth >= 448 ? 32 : 24,\n },\n large: {\n paddingHorizontal: 32,\n },\n full: {\n paddingHorizontal: windowWidth >= 448 ? 32 : 24,\n },\n };\n\n return sizePaddingHorizontalMap[size];\n }, [size, theme, windowWidth]);\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AAGe,SAASA,qBAAT,GAAiC;EAC5C,MAAM;IAAEC;EAAF,IAAW,IAAAC,+BAAA,GAAjB;EAEA,MAAM;IAAEC,KAAK,EAAEC;EAAT,IAAyB,IAAAC,gCAAA,GAA/B;EAEA,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO,IAAAC,cAAA,EAAyB,MAAM;IAClC,MAAMC,wBAA6D,GAAG;MAClEC,KAAK,EAAE;QACHC,iBAAiB,EAAE;MADhB,CAD2D;MAIlEC,MAAM,EAAE;QACJD,iBAAiB,EAAEP,WAAW,IAAI,GAAf,GAAqB,EAArB,GAA0B;MADzC,CAJ0D;MAOlES,KAAK,EAAE;QACHF,iBAAiB,EAAE;MADhB,CAP2D;MAUlEG,IAAI,EAAE;QACFH,iBAAiB,EAAEP,WAAW,IAAI,GAAf,GAAqB,EAArB,GAA0B;MAD3C;IAV4D,CAAtE;IAeA,OAAOK,wBAAwB,CAACR,IAAD,CAA/B;EACH,CAjBM,EAiBJ,CAACA,IAAD,EAAOK,KAAP,EAAcF,WAAd,CAjBI,CAAP;AAkBH"}
@@ -9,14 +9,20 @@ var _react = require("react");
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
+ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
13
+
12
14
  var _styles = require("../styles");
13
15
 
14
- function useDialogStyle(size, fullScreen) {
16
+ function useDialogStyle(size) {
15
17
  const theme = (0, _styles.useTheme)();
16
18
  const {
17
19
  height: windowHeight,
18
20
  width: windowWidth
19
21
  } = (0, _reactNative.useWindowDimensions)();
22
+ const {
23
+ bottom: bottomSafeAreaInset,
24
+ top: topSafeAreaInset
25
+ } = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
20
26
  return (0, _react.useMemo)(() => {
21
27
  var _sizeStyleMap$size;
22
28
 
@@ -31,31 +37,36 @@ function useDialogStyle(size, fullScreen) {
31
37
  maxWidth: 512,
32
38
  minHeight: 360,
33
39
  width: 512
40
+ },
41
+ full: {
42
+ paddingBottom: bottomSafeAreaInset,
43
+ paddingTop: topSafeAreaInset
34
44
  }
35
45
  };
36
- const containerPaddingVertical = theme.spacing(6);
46
+ const containerPaddingVertical = 24;
37
47
  const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;
38
48
  const dialogMaxWidth = (_sizeStyleMap$size = sizeStyleMap[size]) === null || _sizeStyleMap$size === void 0 ? void 0 : _sizeStyleMap$size.maxWidth;
49
+ const isFullScreen = size === 'full';
39
50
  return {
40
51
  root: {
41
52
  alignItems: 'center',
42
53
  justifyContent: 'center',
43
54
  zIndex: theme.zIndex.dialog
44
55
  },
45
- container: fullScreen ? {
56
+ container: isFullScreen ? {
46
57
  height: '100%',
47
58
  width: '100%'
48
59
  } : {
49
60
  alignItems: 'center',
50
- // TODO: need to refactor breakpoints.
51
- paddingHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4),
61
+ paddingHorizontal: windowWidth > theme.breakpoints.values.xs ? 24 : 16,
52
62
  paddingVertical: containerPaddingVertical,
53
63
  width: '100%'
54
64
  },
55
- paper: fullScreen ? {
65
+ paper: isFullScreen ? {
56
66
  backgroundColor: theme.palette.surface.base,
57
67
  height: '100%',
58
- width: '100%'
68
+ width: '100%',
69
+ ...sizeStyleMap[size]
59
70
  } : {
60
71
  backgroundColor: theme.palette.surface.base,
61
72
  borderRadius: theme.shape.radius.xl,
@@ -74,6 +85,6 @@ function useDialogStyle(size, fullScreen) {
74
85
  width: '100%'
75
86
  }
76
87
  };
77
- }, [theme, windowHeight, windowWidth, size, fullScreen]);
88
+ }, [theme, windowHeight, windowWidth, size, bottomSafeAreaInset, topSafeAreaInset]);
78
89
  }
79
90
  //# sourceMappingURL=useDialogStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useDialogStyle","size","fullScreen","theme","useTheme","height","windowHeight","width","windowWidth","useWindowDimensions","useMemo","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;;AACA;;AAEA;;AAYe,SAASA,cAAT,CAAwBC,IAAxB,EAA0CC,UAA1C,EAA6E;EACxF,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IACFC,MAAM,EAAEC,YADN;IAEFC,KAAK,EAAEC;EAFL,IAGF,IAAAC,gCAAA,GAHJ;EAKA,OAAO,IAAAC,cAAA,EAAQ,MAAM;IAAA;;IACjB,MAAMC,YAAiD,GAAG;MACtDC,KAAK,EAAE;QACHC,QAAQ,EAAE;MADP,CAD+C;MAItDC,MAAM,EAAE;QACJD,QAAQ,EAAE;MADN,CAJ8C;MAOtDE,KAAK,EAAE;QACHF,QAAQ,EAAE,GADP;QAEHG,SAAS,EAAE,GAFR;QAGHT,KAAK,EAAE;MAHJ;IAP+C,CAA1D;IAcA,MAAMU,wBAAwB,GAAGd,KAAK,CAACe,OAAN,CAAc,CAAd,CAAjC;IACA,MAAMC,eAAe,GAAGb,YAAY,GAAGW,wBAAwB,GAAG,CAAlE;IACA,MAAMG,cAAc,yBAAGT,YAAY,CAACV,IAAD,CAAf,uDAAG,mBAAoBY,QAA3C;IAEA,OAAO;MACHQ,IAAI,EAAE;QACFC,UAAU,EAAE,QADV;QAEFC,cAAc,EAAE,QAFd;QAGFC,MAAM,EAAErB,KAAK,CAACqB,MAAN,CAAaC;MAHnB,CADH;MAMHC,SAAS,EAAExB,UAAU,GAAG;QACpBG,MAAM,EAAE,MADY;QAEpBE,KAAK,EAAE;MAFa,CAAH,GAGjB;QACAe,UAAU,EAAE,QADZ;QAEA;QACAK,iBAAiB,EAAExB,KAAK,CAACe,OAAN,CAAcV,WAAW,GAAG,GAAd,GAAoB,CAApB,GAAwB,CAAtC,CAHnB;QAIAoB,eAAe,EAAEX,wBAJjB;QAKAV,KAAK,EAAE;MALP,CATD;MAgBHsB,KAAK,EAAE3B,UAAU,GAAG;QAChB4B,eAAe,EAAE3B,KAAK,CAAC4B,OAAN,CAAcC,OAAd,CAAsBC,IADvB;QAEhB5B,MAAM,EAAE,MAFQ;QAGhBE,KAAK,EAAE;MAHS,CAAH,GAIb;QACAuB,eAAe,EAAE3B,KAAK,CAAC4B,OAAN,CAAcC,OAAd,CAAsBC,IADvC;QAEAC,YAAY,EAAE/B,KAAK,CAACgC,KAAN,CAAYC,MAAZ,CAAmBC,EAFjC;QAGAC,SAAS,EAAEnB,eAHX;QAIAoB,QAAQ,EAAE,QAJV;QAKAhC,KAAK,EAAE,MALP;QAMA,GAAGI,YAAY,CAACV,IAAD;MANf,CApBD;MA4BHuC,mBAAmB,EAAE;QACjB3B,QAAQ,EAAEO,cADO;QAEjBb,KAAK,EAAE;MAFU,CA5BlB;MAgCHkC,iBAAiB,EAAE;QACfC,QAAQ,EAAE,UADK;QAEfC,MAAM,EAAE,CAFO;QAGfpC,KAAK,EAAE;MAHQ;IAhChB,CAAP;EAsCH,CAzDM,EAyDJ,CAACJ,KAAD,EAAQG,YAAR,EAAsBE,WAAtB,EAAmCP,IAAnC,EAAyCC,UAAzC,CAzDI,CAAP;AA0DH"}
1
+ {"version":3,"names":["useDialogStyle","size","theme","useTheme","height","windowHeight","width","windowWidth","useWindowDimensions","bottom","bottomSafeAreaInset","top","topSafeAreaInset","useSafeAreaInsets","useMemo","sizeStyleMap","small","maxWidth","medium","large","minHeight","full","paddingBottom","paddingTop","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: topSafeAreaInset,\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;;AACA;;AACA;;AAEA;;AAYe,SAASA,cAAT,CAAwBC,IAAxB,EAAwD;EACnE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IACFC,MAAM,EAAEC,YADN;IAEFC,KAAK,EAAEC;EAFL,IAGF,IAAAC,gCAAA,GAHJ;EAKA,MAAM;IACFC,MAAM,EAAEC,mBADN;IAEFC,GAAG,EAAEC;EAFH,IAGF,IAAAC,6CAAA,GAHJ;EAKA,OAAO,IAAAC,cAAA,EAAQ,MAAM;IAAA;;IACjB,MAAMC,YAAiD,GAAG;MACtDC,KAAK,EAAE;QACHC,QAAQ,EAAE;MADP,CAD+C;MAItDC,MAAM,EAAE;QACJD,QAAQ,EAAE;MADN,CAJ8C;MAOtDE,KAAK,EAAE;QACHF,QAAQ,EAAE,GADP;QAEHG,SAAS,EAAE,GAFR;QAGHd,KAAK,EAAE;MAHJ,CAP+C;MAYtDe,IAAI,EAAE;QACFC,aAAa,EAAEZ,mBADb;QAEFa,UAAU,EAAEX;MAFV;IAZgD,CAA1D;IAkBA,MAAMY,wBAAwB,GAAG,EAAjC;IACA,MAAMC,eAAe,GAAGpB,YAAY,GAAGmB,wBAAwB,GAAG,CAAlE;IACA,MAAME,cAAc,yBAAGX,YAAY,CAACd,IAAD,CAAf,uDAAG,mBAAoBgB,QAA3C;IAEA,MAAMU,YAAY,GAAG1B,IAAI,KAAK,MAA9B;IAEA,OAAO;MACH2B,IAAI,EAAE;QACFC,UAAU,EAAE,QADV;QAEFC,cAAc,EA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heme)();
22
22
  return {
23
23
  root: {
24
- paddingTop: theme.spacing(2),
25
24
  paddingBottom: theme.spacing(4)
26
25
  }
27
26
  };
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","paddingTop","spacing","paddingBottom","DialogActions","props","children","style","styleProp","otherProps","styles","sectionStyle","useDialogSectionStyle","rootStyle","css"],"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;;AAEA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAyC,GAAG,YAAiC;EAC/E,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAEH,KAAK,CAACI,OAAN,CAAc,CAAd,CADV;MAEFC,aAAa,EAAEL,KAAK,CAACI,OAAN,CAAc,CAAd;IAFb;EADH,CAAP;AAMH,CATD;;AAWe,SAASE,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAGb,SAAS,EAAxB;EAEA,MAAMc,YAAY,GAAG,IAAAC,6BAAA,GAArB;EAEA,MAAMC,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBJ,MAAM,CAACV,IADW,EAElBW,YAFkB,EAGlBH,SAHkB,CAAJ,CAAlB;EAMA,oBACI,6BAAC,eAAD;IACI,KAAK,EAAEK;EADX,GAEQJ,UAFR,GAIKH,QAJL,CADJ;AAQH;;AAAA"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","paddingBottom","spacing","DialogActions","props","children","style","styleProp","otherProps","styles","sectionStyle","useDialogSectionStyle","rootStyle","css"],"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;;AAEA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAyC,GAAG,YAAiC;EAC/E,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,aAAa,EAAEH,KAAK,CAACI,OAAN,CAAc,CAAd;IADb;EADH,CAAP;AAKH,CARD;;AAUe,SAASC,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,GAAG,IAAAC,6BAAA,GAArB;EAEA,MAAMC,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBJ,MAAM,CAACT,IADW,EAElBU,YAFkB,EAGlBH,SAHkB,CAAJ,CAAlB;EAMA,oBACI,6BAAC,eAAD;IACI,KAAK,EAAEK;EADX,GAEQJ,UAFR,GAIKH,QAJL,CADJ;AAQH;;AAAA"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = DialogLargeTitle;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _reactNative = require("react-native");
11
+
12
+ var _styles = require("../styles");
13
+
14
+ var _IconButton = _interopRequireDefault(require("../IconButton"));
15
+
16
+ var _internal = require("../internal");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+
22
+ const styles = _reactNative.StyleSheet.create({
23
+ root: {
24
+ alignItems: 'center',
25
+ height: 64,
26
+ justifyContent: 'center',
27
+ paddingHorizontal: 80,
28
+ width: '100%'
29
+ },
30
+ backButton: {
31
+ height: 40,
32
+ left: 20,
33
+ paddingLeft: 5,
34
+ paddingRight: 11,
35
+ paddingVertical: 8,
36
+ position: 'absolute',
37
+ width: 40
38
+ },
39
+ closeButton: {
40
+ height: 40,
41
+ left: 20,
42
+ padding: 8,
43
+ position: 'absolute',
44
+ width: 40
45
+ }
46
+ });
47
+
48
+ function DialogLargeTitle(props) {
49
+ const {
50
+ children,
51
+ closeButtonType = 'close',
52
+ onClose,
53
+ style: styleProp,
54
+ ...otherProps
55
+ } = props;
56
+ const theme = (0, _styles.useTheme)();
57
+ const fontStyle = (0, _styles.createFontStyle)(theme, {
58
+ selector: typo => typo.header4.semiBold,
59
+ color: theme.palette.text.strong
60
+ });
61
+ const rootStyle = (0, _styles.css)([styles.root, styleProp]);
62
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
63
+ style: rootStyle
64
+ }, otherProps), typeof onClose === 'function' ? closeButtonType === 'back' ? /*#__PURE__*/_react.default.createElement(_IconButton.default, {
65
+ style: styles.backButton,
66
+ onPress: onClose
67
+ }, /*#__PURE__*/_react.default.createElement(_internal.ChevronLeft, {
68
+ color: 'strong',
69
+ size: 'large'
70
+ })) : /*#__PURE__*/_react.default.createElement(_IconButton.default, {
71
+ style: styles.closeButton,
72
+ onPress: onClose
73
+ }, /*#__PURE__*/_react.default.createElement(_internal.Close, {
74
+ color: 'strong',
75
+ size: 'large'
76
+ })) : null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
77
+ style: fontStyle
78
+ }, children));
79
+ }
80
+ //# sourceMappingURL=DialogLargeTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["styles","StyleSheet","create","root","alignItems","height","justifyContent","paddingHorizontal","width","backButton","left","paddingLeft","paddingRight","paddingVertical","position","closeButton","padding","DialogLargeTitle","props","children","closeButtonType","onClose","style","styleProp","otherProps","theme","useTheme","fontStyle","createFontStyle","selector","typo","header4","semiBold","color","palette","text","strong","rootStyle","css"],"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;;AACA;;AAGA;;AACA;;AACA;;;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,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;IAOR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,CADJ;AAkCH"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = DialogTitle;
6
+ exports.default = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -13,6 +13,8 @@ var _Dialog = require("../Dialog");
13
13
 
14
14
  var _styles = require("../styles");
15
15
 
16
+ var _DialogLargeTitle = _interopRequireDefault(require("./DialogLargeTitle"));
17
+
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
20
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -29,7 +31,7 @@ const useStyles = function () {
29
31
  };
30
32
  };
31
33
 
32
- function DialogTitle(props) {
34
+ const DialogTitle = props => {
33
35
  const {
34
36
  children,
35
37
  style: styleProp,
@@ -49,7 +51,9 @@ function DialogTitle(props) {
49
51
  }), typeof children === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
50
52
  style: titleStyle
51
53
  }, children) : children);
52
- }
54
+ };
53
55
 
54
- ;
56
+ DialogTitle.Large = _DialogLargeTitle.default;
57
+ var _default = DialogTitle;
58
+ exports.default = _default;
55
59
  //# sourceMappingURL=DialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","paddingTop","spacing","title","textAlign","DialogTitle","props","children","style","styleProp","otherProps","styles","sectionStyle","useDialogSectionStyle","rootStyle","css","titleFontStyle","createFontStyle","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;;AACA;;AAEA;;AACA;;;;;;AAKA,MAAMA,SAAuC,GAAG,YAA+B;EAC3E,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAEH,KAAK,CAACI,OAAN,CAAc,GAAd;IADV,CADH;IAIHC,KAAK,EAAE;MACHC,SAAS,EAAE;IADR;EAJJ,CAAP;AAQH,CAXD;;AAae,SAASC,WAAT,CAAqBC,KAArB,EAA8C;EACzD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMR,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMY,MAAM,GAAGd,SAAS,EAAxB;EAEA,MAAMe,YAAY,GAAG,IAAAC,6BAAA,GAArB;EAEA,MAAMC,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBJ,MAAM,CAACX,IADW,EAElBY,YAFkB,EAGlBH,SAHkB,CAAJ,CAAlB;EAMA,MAAMO,cAAc,GAAG,IAAAC,uBAAA,EAAgBnB,KAAhB,EAAuB;IAC1CoB,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,OAAX,CAAmBC,QADH;IAE1CC,KAAK,EAAExB,KAAK,CAACyB,OAAN,CAAcC,IAAd,CAAmBC;EAFgB,CAAvB,CAAvB;EAKA,MAAMC,UAAU,GAAG,IAAAX,WAAA,EAAI,CACnBJ,MAAM,CAACR,KADY,EAEnBa,cAFmB,CAAJ,CAAnB;EAKA,oBACI,6BAAC,iBAAD,eACQN,UADR;IAEI,KAAK,EAAEI;EAFX,IAIK,OAAOP,QAAP,KAAoB,QAApB,gBACG,6BAAC,iBAAD;IAAM,KAAK,EAAEmB;EAAb,GACKnB,QADL,CADH,GAIIA,QART,CADJ;AAYH;;AAAA"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","paddingTop","spacing","title","textAlign","DialogTitle","props","children","style","styleProp","otherProps","styles","sectionStyle","useDialogSectionStyle","rootStyle","css","titleFontStyle","createFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","titleStyle","Large","DialogLargeTitle"],"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;;AACA;;AAEA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAuC,GAAG,YAA+B;EAC3E,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAEH,KAAK,CAACI,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,MAAMR,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMY,MAAM,GAAGd,SAAS,EAAxB;EAEA,MAAMe,YAAY,GAAG,IAAAC,6BAAA,GAArB;EAEA,MAAMC,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBJ,MAAM,CAACX,IADW,EAElBY,YAFkB,EAGlBH,SAHkB,CAAJ,CAAlB;EAMA,MAAMO,cAAc,GAAG,IAAAC,uBAAA,EAAgBnB,KAAhB,EAAuB;IAC1CoB,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,OAAX,CAAmBC,QADH;IAE1CC,KAAK,EAAExB,KAAK,CAACyB,OAAN,CAAcC,IAAd,CAAmBC;EAFgB,CAAvB,CAAvB;EAKA,MAAMC,UAAU,GAAG,IAAAX,WAAA,EAAI,CACnBJ,MAAM,CAACR,KADY,EAEnBa,cAFmB,CAAJ,CAAnB;EAKA,oBACI,6BAAC,iBAAD,eACQN,UADR;IAEI,KAAK,EAAEI;EAFX,IAIK,OAAOP,QAAP,KAAoB,QAApB,gBACG,6BAAC,iBAAD;IAAM,KAAK,EAAEmB;EAAb,GACKnB,QADL,CADH,GAIIA,QART,CADJ;AAYH,CAzCD;;AA2CAF,WAAW,CAACsB,KAAZ,GAAoBC,yBAApB;eAEevB,W"}
@@ -9,13 +9,15 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
- var _styles = require("../styles");
12
+ var _styles = require("@fountain-ui/styles");
13
+
14
+ var _styles2 = require("../styles");
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
16
18
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
19
 
18
- const styles = _styles.StyleSheet.create({
20
+ const styles = _styles2.StyleSheet.create({
19
21
  container: {
20
22
  alignSelf: 'stretch',
21
23
  alignItems: 'center'
@@ -39,6 +41,12 @@ function selectBorderColor(theme, variant, vertical) {
39
41
 
40
42
  case 'strong':
41
43
  return vertical ? theme.palette.border.weak : theme.palette.border.base;
44
+
45
+ case 'strongStatic':
46
+ return _styles.commonColors.opacity.white['13'];
47
+
48
+ case 'baseStatic':
49
+ return _styles.commonColors.opacity.white['10'];
42
50
  }
43
51
  }
44
52
 
@@ -54,7 +62,7 @@ function Divider(props) {
54
62
  vertical = false,
55
63
  ...otherProps
56
64
  } = props;
57
- const theme = (0, _styles.useTheme)();
65
+ const theme = (0, _styles2.useTheme)();
58
66
  const borderWidth = borderWidthProp ?? (vertical ? 1 : 0.5);
59
67
  const fontColor = theme.palette.text.weak;
60
68
  const borderColor = selectBorderColor(theme, variant, vertical);
@@ -86,8 +94,8 @@ function Divider(props) {
86
94
  } : {
87
95
  borderBottomWidth: borderWidth
88
96
  };
89
- const containerStyle = (0, _styles.css)([insetStyle, marginStyle, styles.container, vertical ? styles.column : styles.row, childrenProp ? undefined : borderColorStyle, childrenProp ? undefined : borderWidthStyle, style]);
90
- const dividerStyle = (0, _styles.css)([borderColorStyle, borderWidthStyle, styles.divider]);
97
+ const containerStyle = (0, _styles2.css)([insetStyle, marginStyle, styles.container, vertical ? styles.column : styles.row, childrenProp ? undefined : borderColorStyle, childrenProp ? undefined : borderWidthStyle, style]);
98
+ const dividerStyle = (0, _styles2.css)([borderColorStyle, borderWidthStyle, styles.divider]);
91
99
  const dividerMarginSize = theme.spacing(marginBetweenChildren);
92
100
  const startDividerStyle = {
93
101
  display: elementAlign !== 'start' ? 'flex' : 'none',
@@ -105,17 +113,17 @@ function Divider(props) {
105
113
  marginLeft: dividerMarginSize
106
114
  })
107
115
  };
108
- const fontStyle = (0, _styles.createFontStyle)(theme, {
116
+ const fontStyle = (0, _styles2.createFontStyle)(theme, {
109
117
  selector: typo => typo.caption2.medium,
110
118
  color: fontColor
111
119
  });
112
120
  const element = typeof childrenProp === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
113
- style: (0, _styles.css)(fontStyle)
121
+ style: (0, _styles2.css)(fontStyle)
114
122
  }, childrenProp) : childrenProp;
115
123
  const children = childrenProp ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
116
- style: (0, _styles.css)([dividerStyle, startDividerStyle])
124
+ style: (0, _styles2.css)([dividerStyle, startDividerStyle])
117
125
  }), element, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
118
- style: (0, _styles.css)([dividerStyle, endDividerStyle])
126
+ style: (0, _styles2.css)([dividerStyle, endDividerStyle])
119
127
  })) : null;
120
128
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
121
129
  style: containerStyle
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","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","useTheme","fontColor","text","borderColor","marginSize","spacing","insetSize","marginLeft","marginRight","marginTop","marginBottom","marginStyle","insetStyle","borderColorStyle","borderWidthStyle","borderRightWidth","borderBottomWidth","containerStyle","css","undefined","dividerStyle","dividerMarginSize","startDividerStyle","display","endDividerStyle","fontStyle","createFontStyle","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;;AACA;;AAEA;;;;;;AAKA,MAAMA,MAAM,GAAGC,kBAAA,CAAWC,MAAX,CAAkB;EAC7BC,SAAS,EAAE;IACPC,SAAS,EAAE,S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C,IAAIZ,QAAQ,GAAG;MAAE2B,YAAY,EAAEW;IAAhB,CAAH,GAAyC;MAAEb,WAAW,EAAEa;IAAf,CAArD;EAFqC,CAAzC;EAIA,MAAMG,eAA8B,GAAG;IACnCD,OAAO,EAAE5B,YAAY,KAAK,KAAjB,GAAyB,MAAzB,GAAkC,MADR;IAEnC,IAAIZ,QAAQ,GAAG;MAAE0B,SAAS,EAAEY;IAAb,CAAH,GAAsC;MAAEd,UAAU,EAAEc;IAAd,CAAlD;EAFmC,CAAvC;EAKA,MAAMI,SAAS,GAAG,IAAAC,uBAAA,EAAgB7C,KAAhB,EAAuB;IACrC8C,QAAQ,EAAGC,IAAD,IAAUA,IAAI,CAACC,QAAL,CAAcC,MADG;IAErCC,KAAK,EAAE9B;EAF8B,CAAvB,CAAlB;EAKA,MAAM+B,OAAO,GAAG,OAAOtC,YAAP,KAAwB,QAAxB,gBACV,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAwB,WAAA,EAAIO,SAAJ;EAAb,GAA8B/B,YAA9B,CADU,GAEVA,YAFN;EAIA,MAAMD,QAAQ,GAAGC,YAAY,gBACzB,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAwB,WAAA,EAAI,CAACE,YAAD,EAAeE,iBAAf,CAAJ;EAAb,EADJ,EAEKU,OAFL,eAGI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAd,WAAA,EAAI,CAACE,YAAD,EAAeI,eAAf,CAAJ;EAAb,EAHJ,CADyB,GAMzB,IANJ;EAQA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAEP;EADX,GAEQlB,UAFR,GAIKN,QAJL,CADJ;AAQH;;AAAA"}
1
+ {"version":3,"names":["styles","StyleSheet","create","container","alignSelf","alignItems","row","flexDirection","column","divider","flexGrow","selectBorderColor","theme","variant","vertical","palette","border","weaker","weak","base","commonColors","opacity","white","Divider","props","borderWidth","borderWidthProp","children","childrenProp","elementAlign","inset","marginBetweenChildren","style","otherProps","useTheme","fontColor","text","borderColor","marginSize","spacing","insetSize","marginLeft","marginRight","marginTop","marginBottom","marginStyle","insetStyle","borderColorStyle","borderWidthStyle","borderRightWidth","borderBottomWidth","containerStyle","css","undefined","dividerStyle","dividerMarginSize","startDividerStyle","display","endDividerStyle","fontStyle","createFontStyle","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 {...otherProps}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;AAKA,MAAMA,MAAM,GAAGC,mBAAA,CAAWC,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,O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AAjB,GAA2B,MAA3B,GAAoC,MADR;IAErC,IAAIf,QAAQ,GAAG;MAAE8B,YAAY,EAAEW;IAAhB,CAAH,GAAyC;MAAEb,WAAW,EAAEa;IAAf,CAArD;EAFqC,CAAzC;EAIA,MAAMG,eAA8B,GAAG;IACnCD,OAAO,EAAE5B,YAAY,KAAK,KAAjB,GAAyB,MAAzB,GAAkC,MADR;IAEnC,IAAIf,QAAQ,GAAG;MAAE6B,SAAS,EAAEY;IAAb,CAAH,GAAsC;MAAEd,UAAU,EAAEc;IAAd,CAAlD;EAFmC,CAAvC;EAKA,MAAMI,SAAS,GAAG,IAAAC,wBAAA,EAAgBhD,KAAhB,EAAuB;IACrCiD,QAAQ,EAAGC,IAAD,IAAUA,IAAI,CAACC,QAAL,CAAcC,MADG;IAErCC,KAAK,EAAE9B;EAF8B,CAAvB,CAAlB;EAKA,MAAM+B,OAAO,GAAG,OAAOtC,YAAP,KAAwB,QAAxB,gBACV,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAwB,YAAA,EAAIO,SAAJ;EAAb,GAA8B/B,YAA9B,CADU,GAEVA,YAFN;EAIA,MAAMD,QAAQ,GAAGC,YAAY,gBACzB,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAwB,YAAA,EAAI,CAACE,YAAD,EAAeE,iBAAf,CAAJ;EAAb,EADJ,EAEKU,OAFL,eAGI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAd,YAAA,EAAI,CAACE,YAAD,EAAeI,eAAf,CAAJ;EAAb,EAHJ,CADyB,GAMzB,IANJ;EAQA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAEP;EADX,GAEQlB,UAFR,GAIKN,QAJL,CADJ;AAQH;;AAAA"}
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.dividerVariants = exports.dividerElementAligns = void 0;
7
7
  const dividerElementAligns = ['start', 'center', 'end'];
8
8
  exports.dividerElementAligns = dividerElementAligns;
9
- const dividerVariants = ['base', 'strong'];
9
+ const dividerVariants = ['base', 'strong', 'baseStatic', 'strongStatic'];
10
10
  exports.dividerVariants = dividerVariants;
11
11
  //# 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":";;;;;;AAIO,MAAMA,oBAAoB,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,KAApB,CAA7B;;AAGA,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":";;;;;;AAIO,MAAMA,oBAAoB,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,KAApB,CAA7B;;AAGA,MAAMC,eAAe,GAAG,CAAC,MAAD,EAAS,QAAT,EAAmB,YAAnB,EAAiC,cAAjC,CAAxB"}
@@ -57,7 +57,7 @@ function Empty(props) {
57
57
  color: theme.palette.text.strong
58
58
  });
59
59
  const descriptionFontStyle = (0, _styles.createFontStyle)(theme, {
60
- selector: typography => typography.body2.regular,
60
+ selector: typography => typography.body3.regular,
61
61
  color: theme.palette.text.base
62
62
  });
63
63
  return /*#__PURE__*/_react.default.createElement(_Column.default, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","alignItems","flex","justifyContent","paddingHorizontal","spacing","cta","alignSelf","Empty","props","buttonTitle","description","headerContent","headerContentProp","onButtonPress","style","styleProp","title","otherProps","styles","rootStyle","css","cloneElementSafely","titleFontStyle","createFontStyle","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;;AACA;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A7B;EAKA,oBACI,6BAAC,eAAD;IACI,KAAK,EAAEhB;EADX,GAEQF,UAFR,GAIKN,aAAa,gBACV,6BAAC,cAAD,CAAO,QAAP,QACKA,aADL,eAGI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EAHJ,CADU,GAMV,IAVR,eAYI,6BAAC,iBAAD;IACI,QAAQ,EAAEK,KADd;IAEI,KAAK,EAAEM;EAFX,EAZJ,EAiBKZ,WAAW,gBACR,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,6BAAC,iBAAD;IACI,QAAQ,EAAEA,WADd;IAEI,KAAK,EAAEsB;EAFX,EAHJ,CADQ,GASR,IA1BR,EA4BKvB,WAAW,IAAII,aAAf,gBACG,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,6BAAC,eAAD;IACI,QAAQ,EAAEJ,WADd;IAEI,KAAK,EAAE,QAFX;IAGI,OAAO,EAAEI,aAHb;IAII,KAAK,EAAEK,MAAM,CAACb,GAJlB;IAKI,OAAO,EAAE;EALb,EAHJ,CADH,GAYG,IAxCR,CADJ;AA4CH"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","alignItems","flex","justifyContent","paddingHorizontal","spacing","cta","alignSelf","Empty","props","buttonTitle","description","headerContent","headerContentProp","onButtonPress","style","styleProp","title","otherProps","styles","rootStyle","css","cloneElementSafely","titleFontStyle","createFontStyle","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;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAKA,MAAMA,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,IAAI,EAAE,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eAYI,6BAAC,iBAAD;IACI,QAAQ,EAAEK,KADd;IAEI,KAAK,EAAEM;EAFX,EAZJ,EAiBKZ,WAAW,gBACR,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,6BAAC,iBAAD;IACI,QAAQ,EAAEA,WADd;IAEI,KAAK,EAAEsB;EAFX,EAHJ,CADQ,GASR,IA1BR,EA4BKvB,WAAW,IAAII,aAAf,gBACG,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,6BAAC,eAAD;IACI,QAAQ,EAAEJ,WADd;IAEI,KAAK,EAAE,QAFX;IAGI,OAAO,EAAEI,aAHb;IAII,KAAK,EAAEK,MAAM,CAACb,GAJlB;IAKI,OAAO,EAAE;EALb,EAHJ,CADH,GAYG,IAxCR,CADJ;AA4CH"}
@@ -45,6 +45,7 @@ function createFlexbox(direction) {
45
45
  flexGrow,
46
46
  flexShrink,
47
47
  flexWrap,
48
+ gap,
48
49
  children,
49
50
  insets,
50
51
  justifyContent,
@@ -62,6 +63,7 @@ function createFlexbox(direction) {
62
63
  flexGrow,
63
64
  flexShrink,
64
65
  flexWrap,
66
+ gap,
65
67
  justifyContent,
66
68
  overflow
67
69
  };
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","create","row","flexDirection","column","rowReverse","columnReverse","createFlexbox","direction","forwardDirection","reverseDirection","Flexbox","props","theme","useTheme","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","css","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;;AACA;;AACA;;;;;;AAGA,MAAMA,MAAM,GAAGC,kBAAA,CAAWC,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;;AAOe,SAASI,aAAT,CAAuBC,SAAvB,EAAoD;EAC/D,MAAMC,gBAAgB,GAAGD,SAAS,KAAK,KAAd,GAAsBT,MAAM,CAACG,GAA7B,GAAmCH,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A8B,QAApD;EAEA,OAAOG,OAAP;AACH"}
1
+ {"version":3,"names":["styles","StyleSheet","create","row","flexDirection","column","rowReverse","columnReverse","createFlexbox","direction","forwardDirection","reverseDirection","Flexbox","props","theme","useTheme","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","css","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;\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AAO,CAACU,MAAM,CAACU,IAAR,CADtB;MAEEC,UAAU,EAAErB,OAAO,CAACU,MAAM,CAACY,GAAR,CAFrB;MAGEC,YAAY,EAAEvB,OAAO,CAACU,MAAM,CAACc,KAAR,CAHvB;MAIEC,aAAa,EAAEzB,OAAO,CAACU,MAAM,CAACgB,MAAR;IAJxB,CADU,GAOVR,SAPN;IASA,oBACI,6BAAC,iBAAD;MACI,QAAQ,EAAET,QADd;MAEI,KAAK,EAAE,IAAAkB,WAAA,EAAI,CACPlC,SADO,EAEPuB,UAFO,EAGPC,OAHO,EAIPH,KAJO,CAAJ;IAFX,GAQQC,UARR,EADJ;EAYH;;EAEDnB,OAAO,CAACgC,WAAR,GAAsBnC,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":""}
@@ -53,6 +53,9 @@ function selectIconColor(theme, color) {
53
53
  case 'staticStrongInverse':
54
54
  return _styles.commonColors.static.strongInverse;
55
55
 
56
+ case 'staticBaseOpacityInverse':
57
+ return _styles.commonColors.static.baseOpacityInverse;
58
+
56
59
  case 'disabled':
57
60
  return theme.palette.status.disabled;
58
61
  }
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","create","root","alignItems","height","justifyContent","width","loadingSpinner","position","loadingSpinnerSizeMap","small","medium","large","selectIconColor","theme","color","palette","icon","strong","base","commonColors","static","strongInverse","status","disabled","IconButton","props","children","colorProp","onPress","iconSize","isLoading","style","otherProps","useTheme","iconColor","cloneElementSafely","enableV2","fill","size","rootStyle","css","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;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAIA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,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;I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AEIxB,KAAK,EAAEG,qBAAqB,CAACqB,QAAD;EAFhC,CAF4B,CAAJ,CAA5B;;EAQA,MAAMe,WAAW,GAAG,MAAM;IACtB,IAAIrB,QAAJ,EAAc;MACV;IACH;;IAEDK,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO;EACV,CAND;;EAQA,oBACI,6BAAC,mBAAD;IACI,QAAQ,EAAEL,QADd;IAEI,OAAO,EAAEqB,WAFb;IAGI,KAAK,EAAEL;EAHX,GAIQP,UAJR,gBAMI,6BAAC,iBAAD;IAAM,KAAK,EAAES;EAAb,GACKzB,IADL,CANJ,EAUKc,SAAS,gBACN,6BAAC,wBAAD;IAAgB,KAAK,EAAEa;EAAvB,EADM,GAEN,IAZR,CADJ;AAgBH;;AAAA"}
1
+ {"version":3,"names":["styles","StyleSheet","create","root","alignItems","height","justifyContent","width","loadingSpinner","position","loadingSpinnerSizeMap","small","medium","large","selectIconColor","theme","color","palette","icon","strong","base","commonColors","static","strongInverse","baseOpacityInverse","status","disabled","IconButton","props","children","colorProp","onPress","iconSize","isLoading","style","otherProps","useTheme","iconColor","cloneElementSafely","enableV2","fill","size","rootStyle","css","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;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAIA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,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,qBAAk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