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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/build/commonjs/Accordion/Accordion.js +15 -8
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
  4. package/build/commonjs/Accordion/useVariantStyleMap.js +15 -8
  5. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  6. package/build/commonjs/AppBar/AppBar.js +7 -2
  7. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  8. package/build/commonjs/Badge/Badge.js +4 -3
  9. package/build/commonjs/Badge/Badge.js.map +1 -1
  10. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  11. package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
  12. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
  13. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +5 -2
  14. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  15. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  16. package/build/commonjs/Button/Button.js +26 -12
  17. package/build/commonjs/Button/Button.js.map +1 -1
  18. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  19. package/build/commonjs/ButtonBase/ButtonBase.js +1 -1
  20. package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
  21. package/build/commonjs/ButtonBase/index.js +2 -2
  22. package/build/commonjs/ButtonBase/index.js.map +1 -1
  23. package/build/commonjs/Checkbox/Checkbox.js +4 -1
  24. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  25. package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
  26. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  27. package/build/commonjs/Chip/Chip.js +25 -14
  28. package/build/commonjs/Chip/Chip.js.map +1 -1
  29. package/build/commonjs/Chip/ChipProps.js +3 -1
  30. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  31. package/build/commonjs/Chip/index.js +6 -0
  32. package/build/commonjs/Chip/index.js.map +1 -1
  33. package/build/commonjs/Chip/useChipStyle.js +51 -31
  34. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  35. package/build/commonjs/Dialog/Dialog.js +10 -12
  36. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  37. package/build/commonjs/Dialog/DialogProps.js +1 -1
  38. package/build/commonjs/Dialog/DialogProps.js.map +1 -1
  39. package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
  40. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
  41. package/build/commonjs/Dialog/useDialogStyle.js +19 -8
  42. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  43. package/build/commonjs/DialogActions/DialogActions.js +0 -1
  44. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  45. package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
  46. package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
  47. package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
  48. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  49. package/build/commonjs/Divider/Divider.js +17 -9
  50. package/build/commonjs/Divider/Divider.js.map +1 -1
  51. package/build/commonjs/Divider/DividerProps.js +1 -1
  52. package/build/commonjs/Divider/DividerProps.js.map +1 -1
  53. package/build/commonjs/Empty/Empty.js +1 -1
  54. package/build/commonjs/Empty/Empty.js.map +1 -1
  55. package/build/commonjs/Flexbox/Flexbox.js +2 -0
  56. package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
  57. package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
  58. package/build/commonjs/IconButton/IconButton.js +3 -0
  59. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  60. package/build/commonjs/IconButton/IconButtonProps.js +1 -1
  61. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  62. package/build/commonjs/Image/Image.js +2 -2
  63. package/build/commonjs/Image/Image.js.map +1 -1
  64. package/build/commonjs/ImageCore/ImageCoreNative.js +1 -1
  65. package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
  66. package/build/commonjs/ListItem/ListItem.js +38 -26
  67. package/build/commonjs/ListItem/ListItem.js.map +1 -1
  68. package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
  69. package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
  70. package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
  71. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  72. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  73. package/build/commonjs/ListItemText/ListItemText.js +20 -21
  74. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  75. package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
  76. package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
  77. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  78. package/build/commonjs/Pagination/NumberPagination.js +4 -2
  79. package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
  80. package/build/commonjs/Pagination/Pagination.js +2 -0
  81. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  82. package/build/commonjs/Pagination/PaginationProps.js +3 -1
  83. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  84. package/build/commonjs/Pagination/index.js +6 -0
  85. package/build/commonjs/Pagination/index.js.map +1 -1
  86. package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
  87. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  88. package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
  89. package/build/commonjs/Radio/Radio.js +11 -4
  90. package/build/commonjs/Radio/Radio.js.map +1 -1
  91. package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
  92. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  93. package/build/commonjs/Section/Section.js +32 -0
  94. package/build/commonjs/Section/Section.js.map +1 -0
  95. package/build/commonjs/Section/SectionProps.js +2 -0
  96. package/build/commonjs/Section/SectionProps.js.map +1 -0
  97. package/build/commonjs/Section/index.js +16 -0
  98. package/build/commonjs/Section/index.js.map +1 -0
  99. package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
  100. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  101. package/build/commonjs/SnackbarContent/SnackbarContent.js +26 -9
  102. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  103. package/build/commonjs/Tab/Tab.js +21 -19
  104. package/build/commonjs/Tab/Tab.js.map +1 -1
  105. package/build/commonjs/Tab/TabProps.js +4 -2
  106. package/build/commonjs/Tab/TabProps.js.map +1 -1
  107. package/build/commonjs/Tab/index.js +14 -0
  108. package/build/commonjs/Tab/index.js.map +1 -1
  109. package/build/commonjs/Tab/useVariantStyleMap.js +59 -18
  110. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
  111. package/build/commonjs/TabBase/TabBase.js +1 -8
  112. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  113. package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
  114. package/build/commonjs/Tabs/Tabs.js +23 -7
  115. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  116. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  117. package/build/commonjs/Tabs/index.js.map +1 -1
  118. package/build/commonjs/Tabs/useTabsStyle.js +80 -0
  119. package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
  120. package/build/commonjs/TextField/TextField.js +48 -12
  121. package/build/commonjs/TextField/TextField.js.map +1 -1
  122. package/build/commonjs/TextField/useVariantStyleMap.js +29 -29
  123. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  124. package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
  125. package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
  126. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
  127. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  128. package/build/commonjs/Toolbar/BackButton/index.js +16 -0
  129. package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
  130. package/build/commonjs/Toolbar/Toolbar.js +8 -4
  131. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  132. package/build/commonjs/Tooltip/Beaks/index.js +32 -0
  133. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
  134. package/build/commonjs/Tooltip/Tooltip.js +11 -18
  135. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  136. package/build/commonjs/Tooltip/index.js +19 -0
  137. package/build/commonjs/Tooltip/index.js.map +1 -1
  138. package/build/commonjs/Typography/Typography.js +9 -2
  139. package/build/commonjs/Typography/Typography.js.map +1 -1
  140. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  141. package/build/commonjs/hooks/useBreakpointUp.js +4 -1
  142. package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
  143. package/build/commonjs/hooks/useCollapsibleAppBar.js +3 -10
  144. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  145. package/build/commonjs/hooks/useContentContainerStyle.js +39 -25
  146. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  147. package/build/commonjs/hooks/useFadeInAppBar.js +2 -2
  148. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  149. package/build/commonjs/index.js +21 -0
  150. package/build/commonjs/index.js.map +1 -1
  151. package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
  152. package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
  153. package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
  154. package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
  155. package/build/commonjs/internal/icons/ChevronRight.js +4 -2
  156. package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
  157. package/build/commonjs/internal/icons/ChipClose.js +23 -0
  158. package/build/commonjs/internal/icons/ChipClose.js.map +1 -0
  159. package/build/commonjs/internal/icons/Clear.js +3 -3
  160. package/build/commonjs/internal/icons/Clear.js.map +1 -1
  161. package/build/commonjs/internal/icons/Close.js +4 -2
  162. package/build/commonjs/internal/icons/Close.js.map +1 -1
  163. package/build/commonjs/internal/icons/Search.js +2 -2
  164. package/build/commonjs/internal/icons/Search.js.map +1 -1
  165. package/build/commonjs/internal/icons/index.js +16 -0
  166. package/build/commonjs/internal/icons/index.js.map +1 -1
  167. package/build/module/Accordion/Accordion.js +15 -8
  168. package/build/module/Accordion/Accordion.js.map +1 -1
  169. package/build/module/Accordion/AccordionProps.js.map +1 -1
  170. package/build/module/Accordion/useVariantStyleMap.js +15 -8
  171. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  172. package/build/module/AppBar/AppBar.js +6 -2
  173. package/build/module/AppBar/AppBar.js.map +1 -1
  174. package/build/module/Badge/Badge.js +4 -3
  175. package/build/module/Badge/Badge.js.map +1 -1
  176. package/build/module/Badge/BadgeProps.js.map +1 -1
  177. package/build/module/Badge/useVariantStyleMap.js +2 -2
  178. package/build/module/Badge/useVariantStyleMap.js.map +1 -1
  179. package/build/module/BottomSheetTitle/BottomSheetTitle.js +5 -2
  180. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  181. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  182. package/build/module/Button/Button.js +27 -13
  183. package/build/module/Button/Button.js.map +1 -1
  184. package/build/module/Button/ButtonProps.js.map +1 -1
  185. package/build/module/ButtonBase/ButtonBase.js +1 -1
  186. package/build/module/ButtonBase/ButtonBase.js.map +1 -1
  187. package/build/module/ButtonBase/index.js +1 -1
  188. package/build/module/ButtonBase/index.js.map +1 -1
  189. package/build/module/Checkbox/Checkbox.js +4 -1
  190. package/build/module/Checkbox/Checkbox.js.map +1 -1
  191. package/build/module/Checkbox/useVariantStyleMap.js +6 -2
  192. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  193. package/build/module/Chip/Chip.js +21 -13
  194. package/build/module/Chip/Chip.js.map +1 -1
  195. package/build/module/Chip/ChipProps.js +1 -0
  196. package/build/module/Chip/ChipProps.js.map +1 -1
  197. package/build/module/Chip/index.js +1 -1
  198. package/build/module/Chip/index.js.map +1 -1
  199. package/build/module/Chip/useChipStyle.js +51 -31
  200. package/build/module/Chip/useChipStyle.js.map +1 -1
  201. package/build/module/Dialog/Dialog.js +10 -11
  202. package/build/module/Dialog/Dialog.js.map +1 -1
  203. package/build/module/Dialog/DialogProps.js +1 -1
  204. package/build/module/Dialog/DialogProps.js.map +1 -1
  205. package/build/module/Dialog/useDialogSectionStyle.js +6 -4
  206. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
  207. package/build/module/Dialog/useDialogStyle.js +18 -8
  208. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  209. package/build/module/DialogActions/DialogActions.js +0 -1
  210. package/build/module/DialogActions/DialogActions.js.map +1 -1
  211. package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
  212. package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
  213. package/build/module/DialogTitle/DialogTitle.js +6 -3
  214. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  215. package/build/module/Divider/Divider.js +7 -0
  216. package/build/module/Divider/Divider.js.map +1 -1
  217. package/build/module/Divider/DividerProps.js +1 -1
  218. package/build/module/Divider/DividerProps.js.map +1 -1
  219. package/build/module/Empty/Empty.js +1 -1
  220. package/build/module/Empty/Empty.js.map +1 -1
  221. package/build/module/Flexbox/Flexbox.js +2 -0
  222. package/build/module/Flexbox/Flexbox.js.map +1 -1
  223. package/build/module/Flexbox/FlexboxProps.js.map +1 -1
  224. package/build/module/IconButton/IconButton.js +3 -0
  225. package/build/module/IconButton/IconButton.js.map +1 -1
  226. package/build/module/IconButton/IconButtonProps.js +1 -1
  227. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  228. package/build/module/Image/Image.js +2 -2
  229. package/build/module/Image/Image.js.map +1 -1
  230. package/build/module/ImageCore/ImageCoreNative.js +1 -1
  231. package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
  232. package/build/module/ListItem/ListItem.js +36 -28
  233. package/build/module/ListItem/ListItem.js.map +1 -1
  234. package/build/module/ListItem/ListItemProps.js.map +1 -1
  235. package/build/module/ListItemIcon/ListItemIcon.js +1 -2
  236. package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
  237. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  238. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  239. package/build/module/ListItemText/ListItemText.js +17 -19
  240. package/build/module/ListItemText/ListItemText.js.map +1 -1
  241. package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
  242. package/build/module/ListSubheader/ListSubheader.js +1 -1
  243. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  244. package/build/module/Pagination/NumberPagination.js +4 -2
  245. package/build/module/Pagination/NumberPagination.js.map +1 -1
  246. package/build/module/Pagination/Pagination.js +2 -0
  247. package/build/module/Pagination/Pagination.js.map +1 -1
  248. package/build/module/Pagination/PaginationProps.js +1 -0
  249. package/build/module/Pagination/PaginationProps.js.map +1 -1
  250. package/build/module/Pagination/index.js +1 -1
  251. package/build/module/Pagination/index.js.map +1 -1
  252. package/build/module/PaginationItem/PaginationItem.js +28 -21
  253. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  254. package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
  255. package/build/module/Radio/Radio.js +10 -4
  256. package/build/module/Radio/Radio.js.map +1 -1
  257. package/build/module/RadioGroup/RadioGroup.js +2 -20
  258. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  259. package/build/module/Section/Section.js +19 -0
  260. package/build/module/Section/Section.js.map +1 -0
  261. package/build/module/Section/SectionProps.js +2 -0
  262. package/build/module/Section/SectionProps.js.map +1 -0
  263. package/build/module/Section/index.js +2 -0
  264. package/build/module/Section/index.js.map +1 -0
  265. package/build/module/ShadowView/ShadowView.native.js +4 -0
  266. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  267. package/build/module/SnackbarContent/SnackbarContent.js +26 -9
  268. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  269. package/build/module/Tab/Tab.js +22 -19
  270. package/build/module/Tab/Tab.js.map +1 -1
  271. package/build/module/Tab/TabProps.js +2 -1
  272. package/build/module/Tab/TabProps.js.map +1 -1
  273. package/build/module/Tab/index.js +1 -0
  274. package/build/module/Tab/index.js.map +1 -1
  275. package/build/module/Tab/useVariantStyleMap.js +59 -18
  276. package/build/module/Tab/useVariantStyleMap.js.map +1 -1
  277. package/build/module/TabBase/TabBase.js +1 -8
  278. package/build/module/TabBase/TabBase.js.map +1 -1
  279. package/build/module/TabBase/TabBaseProps.js.map +1 -1
  280. package/build/module/Tabs/Tabs.js +21 -7
  281. package/build/module/Tabs/Tabs.js.map +1 -1
  282. package/build/module/Tabs/TabsProps.js.map +1 -1
  283. package/build/module/Tabs/index.js.map +1 -1
  284. package/build/module/Tabs/useTabsStyle.js +70 -0
  285. package/build/module/Tabs/useTabsStyle.js.map +1 -0
  286. package/build/module/TextField/TextField.js +48 -12
  287. package/build/module/TextField/TextField.js.map +1 -1
  288. package/build/module/TextField/useVariantStyleMap.js +29 -29
  289. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  290. package/build/module/Toolbar/BackButton/BackButton.js +32 -0
  291. package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
  292. package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
  293. package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  294. package/build/module/Toolbar/BackButton/index.js +2 -0
  295. package/build/module/Toolbar/BackButton/index.js.map +1 -0
  296. package/build/module/Toolbar/Toolbar.js +7 -3
  297. package/build/module/Toolbar/Toolbar.js.map +1 -1
  298. package/build/module/Tooltip/Beaks/index.js +4 -0
  299. package/build/module/Tooltip/Beaks/index.js.map +1 -1
  300. package/build/module/Tooltip/Tooltip.js +4 -10
  301. package/build/module/Tooltip/Tooltip.js.map +1 -1
  302. package/build/module/Tooltip/index.js +1 -0
  303. package/build/module/Tooltip/index.js.map +1 -1
  304. package/build/module/Typography/Typography.js +9 -2
  305. package/build/module/Typography/Typography.js.map +1 -1
  306. package/build/module/Typography/TypographyProps.js.map +1 -1
  307. package/build/module/hooks/useBreakpointUp.js +4 -1
  308. package/build/module/hooks/useBreakpointUp.js.map +1 -1
  309. package/build/module/hooks/useCollapsibleAppBar.js +4 -10
  310. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  311. package/build/module/hooks/useContentContainerStyle.js +43 -25
  312. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  313. package/build/module/hooks/useFadeInAppBar.js +2 -2
  314. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  315. package/build/module/index.js +2 -0
  316. package/build/module/index.js.map +1 -1
  317. package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
  318. package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
  319. package/build/module/internal/icons/ChevronLeft.js +4 -2
  320. package/build/module/internal/icons/ChevronLeft.js.map +1 -1
  321. package/build/module/internal/icons/ChevronRight.js +4 -2
  322. package/build/module/internal/icons/ChevronRight.js.map +1 -1
  323. package/build/module/internal/icons/ChipClose.js +9 -0
  324. package/build/module/internal/icons/ChipClose.js.map +1 -0
  325. package/build/module/internal/icons/Clear.js +3 -3
  326. package/build/module/internal/icons/Clear.js.map +1 -1
  327. package/build/module/internal/icons/Close.js +4 -2
  328. package/build/module/internal/icons/Close.js.map +1 -1
  329. package/build/module/internal/icons/Search.js +2 -2
  330. package/build/module/internal/icons/Search.js.map +1 -1
  331. package/build/module/internal/icons/index.js +2 -0
  332. package/build/module/internal/icons/index.js.map +1 -1
  333. package/build/typescript/Accordion/AccordionProps.d.ts +4 -1
  334. package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
  335. package/build/typescript/Badge/BadgeProps.d.ts +10 -5
  336. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +1 -0
  337. package/build/typescript/Button/ButtonProps.d.ts +5 -0
  338. package/build/typescript/ButtonBase/index.d.ts +1 -1
  339. package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
  340. package/build/typescript/Chip/ChipProps.d.ts +11 -4
  341. package/build/typescript/Chip/index.d.ts +1 -1
  342. package/build/typescript/Chip/useChipStyle.d.ts +6 -3
  343. package/build/typescript/Dialog/DialogProps.d.ts +1 -6
  344. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  345. package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +9 -0
  346. package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -1
  347. package/build/typescript/Divider/DividerProps.d.ts +1 -1
  348. package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
  349. package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
  350. package/build/typescript/ListItem/ListItem.d.ts +1 -1
  351. package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
  352. package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
  353. package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
  354. package/build/typescript/Pagination/index.d.ts +2 -2
  355. package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
  356. package/build/typescript/Section/Section.d.ts +3 -0
  357. package/build/typescript/Section/SectionProps.d.ts +6 -0
  358. package/build/typescript/Section/index.d.ts +2 -0
  359. package/build/typescript/Tab/TabProps.d.ts +21 -2
  360. package/build/typescript/Tab/index.d.ts +2 -1
  361. package/build/typescript/Tab/useVariantStyleMap.d.ts +4 -2
  362. package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
  363. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  364. package/build/typescript/Tabs/TabsProps.d.ts +6 -1
  365. package/build/typescript/Tabs/index.d.ts +1 -1
  366. package/build/typescript/Tabs/useTabsStyle.d.ts +8 -0
  367. package/build/typescript/TextField/useVariantStyleMap.d.ts +2 -0
  368. package/build/typescript/Toolbar/BackButton/BackButton.d.ts +3 -0
  369. package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
  370. package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
  371. package/build/typescript/Toolbar/Toolbar.d.ts +6 -1
  372. package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
  373. package/build/typescript/Tooltip/index.d.ts +1 -0
  374. package/build/typescript/Typography/TypographyProps.d.ts +4 -0
  375. package/build/typescript/hooks/useCollapsibleAppBar.d.ts +0 -1
  376. package/build/typescript/hooks/useContentContainerStyle.d.ts +5 -8
  377. package/build/typescript/index.d.ts +2 -0
  378. package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
  379. package/build/typescript/internal/icons/ChipClose.d.ts +131 -0
  380. package/build/typescript/internal/icons/index.d.ts +2 -0
  381. package/package.json +5 -5
  382. package/src/Accordion/Accordion.tsx +18 -9
  383. package/src/Accordion/AccordionProps.ts +4 -2
  384. package/src/Accordion/useVariantStyleMap.ts +14 -6
  385. package/src/AppBar/AppBar.tsx +5 -1
  386. package/src/Badge/Badge.tsx +4 -3
  387. package/src/Badge/BadgeProps.ts +12 -6
  388. package/src/Badge/useVariantStyleMap.ts +2 -2
  389. package/src/BottomSheetTitle/BottomSheetTitle.tsx +4 -1
  390. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +1 -0
  391. package/src/Button/Button.tsx +28 -12
  392. package/src/Button/ButtonProps.ts +6 -0
  393. package/src/ButtonBase/ButtonBase.tsx +1 -1
  394. package/src/ButtonBase/index.ts +1 -1
  395. package/src/Checkbox/Checkbox.tsx +11 -8
  396. package/src/Checkbox/useVariantStyleMap.ts +6 -1
  397. package/src/Chip/Chip.tsx +24 -13
  398. package/src/Chip/ChipProps.ts +13 -4
  399. package/src/Chip/index.ts +1 -1
  400. package/src/Chip/useChipStyle.ts +59 -29
  401. package/src/Dialog/Dialog.tsx +12 -11
  402. package/src/Dialog/DialogProps.ts +1 -7
  403. package/src/Dialog/useDialogSectionStyle.ts +6 -4
  404. package/src/Dialog/useDialogStyle.ts +19 -7
  405. package/src/DialogActions/DialogActions.tsx +0 -1
  406. package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
  407. package/src/DialogTitle/DialogTitle.tsx +6 -1
  408. package/src/Divider/Divider.tsx +5 -0
  409. package/src/Divider/DividerProps.ts +1 -1
  410. package/src/Empty/Empty.tsx +1 -1
  411. package/src/Flexbox/Flexbox.tsx +2 -0
  412. package/src/Flexbox/FlexboxProps.ts +5 -0
  413. package/src/IconButton/IconButton.tsx +2 -0
  414. package/src/IconButton/IconButtonProps.ts +1 -0
  415. package/src/Image/Image.tsx +3 -3
  416. package/src/ImageCore/ImageCoreNative.tsx +1 -1
  417. package/src/ListItem/ListItem.tsx +61 -30
  418. package/src/ListItem/ListItemProps.ts +5 -0
  419. package/src/ListItemIcon/ListItemIcon.tsx +1 -2
  420. package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
  421. package/src/ListItemText/ListItemText.tsx +20 -28
  422. package/src/ListItemText/ListItemTextProps.ts +2 -10
  423. package/src/ListSubheader/ListSubheader.tsx +1 -1
  424. package/src/Pagination/NumberPagination.tsx +7 -2
  425. package/src/Pagination/Pagination.tsx +3 -2
  426. package/src/Pagination/PaginationProps.ts +15 -0
  427. package/src/Pagination/index.ts +2 -2
  428. package/src/PaginationItem/PaginationItem.tsx +31 -24
  429. package/src/PaginationItem/PaginationItemProps.ts +7 -0
  430. package/src/Radio/Radio.tsx +12 -3
  431. package/src/RadioGroup/RadioGroup.tsx +2 -28
  432. package/src/Section/Section.tsx +26 -0
  433. package/src/Section/SectionProps.ts +6 -0
  434. package/src/Section/index.ts +2 -0
  435. package/src/ShadowView/ShadowView.native.tsx +4 -0
  436. package/src/SnackbarContent/SnackbarContent.tsx +36 -15
  437. package/src/Tab/Tab.tsx +32 -22
  438. package/src/Tab/TabProps.ts +25 -2
  439. package/src/Tab/index.ts +2 -1
  440. package/src/Tab/useVariantStyleMap.ts +72 -19
  441. package/src/TabBase/TabBase.tsx +1 -9
  442. package/src/TabBase/TabBaseProps.ts +0 -6
  443. package/src/Tabs/Tabs.tsx +26 -8
  444. package/src/Tabs/TabsProps.ts +7 -1
  445. package/src/Tabs/index.ts +1 -1
  446. package/src/Tabs/useTabsStyle.ts +77 -0
  447. package/src/TextField/TextField.tsx +69 -26
  448. package/src/TextField/useVariantStyleMap.ts +29 -27
  449. package/src/Toolbar/BackButton/BackButton.tsx +44 -0
  450. package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
  451. package/src/Toolbar/BackButton/index.ts +2 -0
  452. package/src/Toolbar/Toolbar.tsx +6 -1
  453. package/src/Tooltip/Beaks/index.ts +4 -0
  454. package/src/Tooltip/Tooltip.tsx +4 -9
  455. package/src/Tooltip/index.ts +1 -0
  456. package/src/Typography/Typography.tsx +3 -1
  457. package/src/Typography/TypographyProps.ts +5 -0
  458. package/src/hooks/useBreakpointUp.ts +3 -1
  459. package/src/hooks/useCollapsibleAppBar.ts +4 -23
  460. package/src/hooks/useContentContainerStyle.ts +43 -31
  461. package/src/hooks/useFadeInAppBar.ts +2 -2
  462. package/src/index.ts +3 -0
  463. package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
  464. package/src/internal/icons/ChevronLeft.tsx +4 -1
  465. package/src/internal/icons/ChevronRight.tsx +4 -1
  466. package/src/internal/icons/ChipClose.tsx +13 -0
  467. package/src/internal/icons/Clear.tsx +3 -3
  468. package/src/internal/icons/Close.tsx +4 -1
  469. package/src/internal/icons/Search.tsx +2 -2
  470. package/src/internal/icons/index.ts +2 -0
  471. package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
  472. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
  473. package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
  474. package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
  475. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
  476. package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
@@ -1,36 +1,44 @@
1
1
  import { useMemo } from 'react';
2
2
  import { createFontStyle, useTheme } from '../styles';
3
- // TODO: need to refactoring...
4
- export default function useChipStyle(size, startElementVariant, isEndElement) {
3
+ const closeButtonContainerStyleMap = {
4
+ small: {
5
+ marginLeft: 8,
6
+ paddingTop: 1
7
+ },
8
+ large: {
9
+ marginLeft: 10,
10
+ paddingTop: 1
11
+ }
12
+ };
13
+ const closeIconSize = {
14
+ small: {
15
+ height: 14,
16
+ width: 8.17
17
+ },
18
+ large: {
19
+ height: 16,
20
+ width: 9
21
+ }
22
+ }; // TODO: need to refactoring...
23
+
24
+ export default function useChipStyle(size, startElementVariant, color, selected) {
5
25
  const theme = useTheme();
6
26
  return useMemo(() => {
7
- var _variantStyleMap$star, _variantStyleMap$star2;
27
+ var _variantStyleMap$star, _variantStyleMap$star2, _variantStyleMap$star3;
8
28
 
9
29
  const fontStyleMap = {
10
30
  small: createFontStyle(theme, {
11
31
  selector: typography => typography.caption1.medium,
12
- color: theme.palette.text.strong
32
+ color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong
13
33
  }),
14
34
  large: createFontStyle(theme, {
15
35
  selector: typography => typography.body2.medium,
16
- color: theme.palette.text.strong
36
+ color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong
17
37
  })
18
38
  };
19
- const endElementStyleMap = {
20
- small: {
21
- height: 14,
22
- marginLeft: theme.spacing(2),
23
- width: 8.17
24
- },
25
- large: {
26
- height: 16,
27
- marginLeft: theme.spacing(2.5),
28
- width: 9
29
- }
30
- };
31
39
  const baseContainerStyle = {
32
40
  alignItems: 'center',
33
- backgroundColor: theme.palette.fill.weaker,
41
+ backgroundColor: selected ? theme.palette.fill.base : color === 'white' ? theme.palette.surface.base : theme.palette.fill.weaker,
34
42
  borderRadius: theme.shape.radius.full,
35
43
  flexDirection: 'row',
36
44
  overflow: 'hidden'
@@ -45,9 +53,11 @@ export default function useChipStyle(size, startElementVariant, isEndElement) {
45
53
  },
46
54
  startElement: {
47
55
  borderRadius: theme.shape.radius.full,
48
- height: isLarge ? 24 : 22,
49
- marginRight: theme.spacing(isLarge ? 1.5 : 1.25),
50
- width: isLarge ? 24 : 22
56
+ height: isLarge ? 26 : 23,
57
+ width: isLarge ? 26 : 23
58
+ },
59
+ startElementContainer: {
60
+ marginRight: theme.spacing(isLarge ? 1.5 : 1.25)
51
61
  }
52
62
  },
53
63
  icon: {
@@ -57,11 +67,16 @@ export default function useChipStyle(size, startElementVariant, isEndElement) {
57
67
  paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25)
58
68
  },
59
69
  startElement: {
70
+ color: selected ? theme.palette.icon.strongInverse : theme.palette.icon.strong,
71
+ height: isLarge ? 17 : 16,
72
+ width: isLarge ? 17 : 16
73
+ },
74
+ startElementContainer: {
60
75
  alignItems: 'center',
61
- height: isLarge ? 22 : 20,
76
+ height: isLarge ? 24 : 21,
62
77
  justifyContent: 'center',
63
78
  marginRight: theme.spacing(isLarge ? 1 : 0.75),
64
- width: isLarge ? 22 : 20
79
+ width: isLarge ? 24 : 21
65
80
  }
66
81
  },
67
82
  image: {
@@ -71,15 +86,18 @@ export default function useChipStyle(size, startElementVariant, isEndElement) {
71
86
  },
72
87
  startElement: {
73
88
  borderRadius: theme.shape.radius.full,
74
- height: isLarge ? 34 : 30,
75
- marginRight: theme.spacing(1.5),
76
- width: isLarge ? 45 : 40
89
+ height: isLarge ? 36 : 31,
90
+ width: isLarge ? 48 : 40
91
+ },
92
+ startElementContainer: {
93
+ marginRight: theme.spacing(1.5)
77
94
  }
78
95
  },
79
96
  default: {
80
97
  container: {
81
98
  paddingBottom: theme.spacing(1.75),
82
- paddingHorizontal: theme.spacing(isLarge ? 3.5 : 3),
99
+ paddingLeft: theme.spacing(isLarge ? 3.5 : 3),
100
+ paddingRight: theme.spacing(isLarge ? 3.5 : 3),
83
101
  paddingTop: theme.spacing(1.5)
84
102
  }
85
103
  }
@@ -87,14 +105,16 @@ export default function useChipStyle(size, startElementVariant, isEndElement) {
87
105
  return {
88
106
  container: { ...baseContainerStyle,
89
107
  ...((_variantStyleMap$star = variantStyleMap[startElementVariant]) === null || _variantStyleMap$star === void 0 ? void 0 : _variantStyleMap$star.container),
90
- ...(isEndElement ? {
108
+ ...(selected ? {
91
109
  paddingRight: theme.spacing(isLarge ? 2.5 : 2.25)
92
110
  } : {})
93
111
  },
94
- endElement: endElementStyleMap[size],
112
+ closeButtonContainer: closeButtonContainerStyleMap[size],
113
+ closeIconSize: closeIconSize[size],
95
114
  label: fontStyleMap[size],
96
- startElement: (_variantStyleMap$star2 = variantStyleMap[startElementVariant]) === null || _variantStyleMap$star2 === void 0 ? void 0 : _variantStyleMap$star2.startElement
115
+ startElement: (_variantStyleMap$star2 = variantStyleMap[startElementVariant]) === null || _variantStyleMap$star2 === void 0 ? void 0 : _variantStyleMap$star2.startElement,
116
+ startElementContainer: (_variantStyleMap$star3 = variantStyleMap[startElementVariant]) === null || _variantStyleMap$star3 === void 0 ? void 0 : _variantStyleMap$star3.startElementContainer
97
117
  };
98
- }, [theme, size, startElementVariant]);
118
+ }, [theme, size, startElementVariant, color, selected]);
99
119
  }
100
120
  //# sourceMappingURL=useChipStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","createFontStyle","useTheme","useChipStyle","size","startElementVariant","isEndElement","theme","fontStyleMap","small","selector","typography","caption1","medium","color","palette","text","strong","large","body2","endElementStyleMap","height","marginLeft","spacing","width","baseContainerStyle","alignItems","backgroundColor","fill","weaker","borderRadius","shape","radius","full","flexDirection","overflow","isLarge","variantStyleMap","avatar","container","paddingLeft","paddingRight","paddingVertical","startElement","marginRight","icon","justifyContent","image","default","paddingBottom","paddingHorizontal","paddingTop","endElement","label"],"sources":["useChipStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { ChipSize, ChipStartElementVariant } from './ChipProps';\n\ninterface ChipStyle {\n container: FountainUiStyle;\n endElement?: FountainUiStyle;\n label: TextStyle;\n startElement?: FountainUiStyle;\n}\n\ntype VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;\n\n// TODO: need to refactoring...\nexport default function useChipStyle(\n size: ChipSize,\n startElementVariant: ChipStartElementVariant,\n isEndElement: boolean,\n): ChipStyle {\n const theme = useTheme();\n\n return useMemo<ChipStyle>(() => {\n const fontStyleMap: Record<ChipSize, TextStyle> = {\n small: createFontStyle(theme, {\n selector: (typography) => typography.caption1.medium,\n color: theme.palette.text.strong,\n }),\n large: createFontStyle(theme, {\n selector: (typography) => typography.body2.medium,\n color: theme.palette.text.strong,\n }),\n };\n\n const endElementStyleMap: Record<ChipSize, FountainUiStyle> = {\n small: {\n height: 14,\n marginLeft: theme.spacing(2),\n width: 8.17,\n },\n large: {\n height: 16,\n marginLeft: theme.spacing(2.5),\n width: 9,\n },\n };\n\n const baseContainerStyle: FountainUiStyle = {\n alignItems: 'center',\n backgroundColor: theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n flexDirection: 'row',\n overflow: 'hidden',\n };\n\n const isLarge = size === 'large';\n\n const variantStyleMap: VariantStyleMap = {\n avatar: {\n container: {\n paddingLeft: theme.spacing(isLarge ? 1.5 : 1.25),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.25 : 1),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 24 : 22,\n marginRight: theme.spacing(isLarge ? 1.5 : 1.25),\n width: isLarge ? 24 : 22,\n },\n },\n icon: {\n container: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n startElement: {\n alignItems: 'center',\n height: isLarge ? 22 : 20,\n justifyContent: 'center',\n marginRight: theme.spacing(isLarge ? 1 : 0.75),\n width: isLarge ? 22 : 20,\n },\n },\n image: {\n container: {\n alignItems: 'center',\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 34 : 30,\n marginRight: theme.spacing(1.5),\n width: isLarge ? 45 : 40,\n },\n },\n default: {\n container: {\n paddingBottom: theme.spacing(1.75),\n paddingHorizontal: theme.spacing(isLarge ? 3.5 : 3),\n paddingTop: theme.spacing(1.5),\n },\n },\n };\n\n return {\n container: {\n ...baseContainerStyle,\n ...variantStyleMap[startElementVariant]?.container,\n ...(isEndElement ? { paddingRight: theme.spacing(isLarge ? 2.5 : 2.25) } : {}),\n },\n endElement: endElementStyleMap[size],\n label: fontStyleMap[size],\n startElement: variantStyleMap[startElementVariant]?.startElement,\n };\n }, [theme, size, startElementVariant]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAGA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;AAYA;AACA,eAAe,SAASC,YAAT,CACXC,IADW,EAEXC,mBAFW,EAGXC,YAHW,EAIF;EACT,MAAMC,KAAK,GAAGL,QAAQ,EAAtB;EAEA,OAAOF,OAAO,CAAY,MAAM;IAAA;;IAC5B,MAAMQ,YAAyC,GAAG;MAC9CC,KAAK,EAAER,eAAe,CAACM,KAAD,EAAQ;QAC1BG,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,QAAX,CAAoBC,MADpB;QAE1BC,KAAK,EAAEP,KAAK,CAACQ,OAAN,CAAcC,IAAd,CAAmBC;MAFA,CAAR,CADwB;MAK9CC,KAAK,EAAEjB,eAAe,CAACM,KAAD,EAAQ;QAC1BG,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACQ,KAAX,CAAiBN,MADjB;QAE1BC,KAAK,EAAEP,KAAK,CAACQ,OAAN,CAAcC,IAAd,CAAmBC;MAFA,CAAR;IALwB,CAAlD;IAWA,MAAMG,k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kBADI;QAEP,6BAAGY,eAAe,CAAChC,mBAAD,CAAlB,0DAAG,sBAAsCkC,SAAzC,CAFO;QAGP,IAAIjC,YAAY,GAAG;UAAEmC,YAAY,EAAElC,KAAK,CAACgB,OAAN,CAAca,OAAO,GAAG,GAAH,GAAS,IAA9B;QAAhB,CAAH,GAA2D,EAA3E;MAHO,CADR;MAMHgB,UAAU,EAAEhC,kBAAkB,CAAChB,IAAD,CAN3B;MAOHiD,KAAK,EAAE7C,YAAY,CAACJ,IAAD,CAPhB;MAQHuC,YAAY,4BAAEN,eAAe,CAAChC,mBAAD,CAAjB,2DAAE,uBAAsCsC;IARjD,CAAP;EAUH,CA9Fa,EA8FX,CAACpC,KAAD,EAAQH,IAAR,EAAcC,mBAAd,CA9FW,CAAd;AA+FH"}
1
+ {"version":3,"names":["useMemo","createFontStyle","useTheme","closeButtonContainerStyleMap","small","marginLeft","paddingTop","large","closeIconSize","height","width","useChipStyle","size","startElementVariant","color","selected","theme","fontStyleMap","selector","typography","caption1","medium","palette","text","strongInverse","strong","body2","baseContainerStyle","alignItems","backgroundColor","fill","base","surface","weaker","borderRadius","shape","radius","full","flexDirection","overflow","isLarge","variantStyleMap","avatar","container","paddingLeft","spacing","paddingRight","paddingVertical","startElement","startElementContainer","marginRight","icon","justifyContent","image","default","paddingBottom","closeButtonContainer","label"],"sources":["useChipStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport type { SvgIconProps } from '../SvgIcon';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { ChipColor, ChipSize, ChipStartElementVariant } from './ChipProps';\n\ninterface ChipStyle {\n container: FountainUiStyle;\n closeButtonContainer?: FountainUiStyle;\n closeIconSize?: Pick<SvgIconProps, 'height' | 'width'>;\n label: TextStyle;\n startElement?: FountainUiStyle;\n startElementContainer?: FountainUiStyle;\n}\n\ntype VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;\n\nconst closeButtonContainerStyleMap: Record<ChipSize, FountainUiStyle> = {\n small: {\n marginLeft: 8,\n paddingTop: 1,\n },\n large: {\n marginLeft: 10,\n paddingTop: 1,\n },\n};\n\nconst closeIconSize: Record<ChipSize, ChipStyle['closeIconSize']> = {\n small: {\n height: 14,\n width: 8.17,\n },\n large: {\n height: 16,\n width: 9,\n },\n};\n\n// TODO: need to refactoring...\nexport default function useChipStyle(\n size: ChipSize,\n startElementVariant: ChipStartElementVariant,\n color: ChipColor,\n selected: boolean,\n): ChipStyle {\n const theme = useTheme();\n\n return useMemo<ChipStyle>(() => {\n const fontStyleMap: Record<ChipSize, TextStyle> = {\n small: createFontStyle(theme, {\n selector: (typography) => typography.caption1.medium,\n color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,\n }),\n large: createFontStyle(theme, {\n selector: (typography) => typography.body2.medium,\n color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,\n }),\n };\n\n const baseContainerStyle: FountainUiStyle = {\n alignItems: 'center',\n backgroundColor: selected ? theme.palette.fill.base\n : color === 'white'\n ? theme.palette.surface.base\n : theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n flexDirection: 'row',\n overflow: 'hidden',\n };\n\n const isLarge = size === 'large';\n\n const variantStyleMap: VariantStyleMap = {\n avatar: {\n container: {\n paddingLeft: theme.spacing(isLarge ? 1.5 : 1.25),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.25 : 1),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 26 : 23,\n width: isLarge ? 26 : 23,\n },\n startElementContainer: {\n marginRight: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n },\n icon: {\n container: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n startElement: {\n color: selected\n ? theme.palette.icon.strongInverse\n : theme.palette.icon.strong,\n height: isLarge ? 17 : 16,\n width: isLarge ? 17 : 16,\n },\n startElementContainer: {\n alignItems: 'center',\n height: isLarge ? 24 : 21,\n justifyContent: 'center',\n marginRight: theme.spacing(isLarge ? 1 : 0.75),\n width: isLarge ? 24 : 21,\n },\n },\n image: {\n container: {\n alignItems: 'center',\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 36 : 31,\n width: isLarge ? 48 : 40,\n },\n startElementContainer: {\n marginRight: theme.spacing(1.5),\n },\n },\n default: {\n container: {\n paddingBottom: theme.spacing(1.75),\n paddingLeft: theme.spacing(isLarge ? 3.5 : 3),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingTop: theme.spacing(1.5),\n },\n },\n };\n\n return {\n container: {\n ...baseContainerStyle,\n ...variantStyleMap[startElementVariant]?.container,\n ...(selected ? { paddingRight: theme.spacing(isLarge ? 2.5 : 2.25) } : {}),\n },\n closeButtonContainer: closeButtonContainerStyleMap[size],\n closeIconSize: closeIconSize[size],\n label: fontStyleMap[size],\n startElement: variantStyleMap[startElementVariant]?.startElement,\n startElementContainer: variantStyleMap[startElementVariant]?.startElementContainer,\n };\n }, [theme, size, startElementVariant, color, selected]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAIA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;AAcA,MAAMC,4BAA+D,GAAG;EACpEC,KAAK,EAAE;IACHC,UAAU,EAAE,CADT;IAEHC,UAAU,EAAE;EAFT,CAD6D;EAKpEC,KAAK,EAAE;IACHF,UAAU,EAAE,EADT;IAEHC,UAAU,EAAE;EAFT;AAL6D,CAAxE;AAWA,MAAME,aAA2D,GAAG;EAChEJ,KAAK,EAAE;IACHK,MAAM,EAAE,EADL;IAEHC,KAAK,EAAE;EAFJ,CADyD;EAKhEH,KAAK,EAAE;IACHE,MAAM,EAAE,EADL;IAEHC,KAAK,E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L,OAAO,GAAG,GAAH,GAAS,IAA9B;QAAhB,CAAH,GAA2D,EAAvE;MAHO,CADR;MAMHgB,oBAAoB,EAAErD,4BAA4B,CAACS,IAAD,CAN/C;MAOHJ,aAAa,EAAEA,aAAa,CAACI,IAAD,CAPzB;MAQH6C,KAAK,EAAExC,YAAY,CAACL,IAAD,CARhB;MASHoC,YAAY,4BAAEP,eAAe,CAAC5B,mBAAD,CAAjB,2DAAE,uBAAsCmC,YATjD;MAUHC,qBAAqB,4BAAER,eAAe,CAAC5B,mBAAD,CAAjB,2DAAE,uBAAsCoC;IAV1D,CAAP;EAYH,CAlGa,EAkGX,CAACjC,KAAD,EAAQJ,IAAR,EAAcC,mBAAd,EAAmCC,KAAnC,EAA0CC,QAA1C,CAlGW,CAAd;AAmGH"}
@@ -8,12 +8,11 @@ import Modal, { ANIMATION_TYPE } from '../Modal';
8
8
  import ShadowView from '../ShadowView';
9
9
  import { DialogProvider } from './DialogContext';
10
10
  import useDialogStyle from './useDialogStyle';
11
- const TOP_ELEMENT_OFFSET = 20;
11
+ const TOP_ELEMENT_HIDDEN_OFFSET = 16;
12
12
  export default function Dialog(props) {
13
13
  const {
14
14
  animationType = ANIMATION_TYPE.SLIDE,
15
15
  children,
16
- fullScreen = false,
17
16
  hideBackdrop,
18
17
  onClose,
19
18
  style: styleProp,
@@ -22,7 +21,7 @@ export default function Dialog(props) {
22
21
  topElement,
23
22
  ...otherProps
24
23
  } = props;
25
- const styles = useDialogStyle(size, fullScreen);
24
+ const styles = useDialogStyle(size);
26
25
  const {
27
26
  height: screenHeight
28
27
  } = useWindowDimensions();
@@ -40,8 +39,9 @@ export default function Dialog(props) {
40
39
  return [];
41
40
  }
42
41
 
42
+ const topElementHeightWithoutOffset = Math.max(0, topElementHeight - TOP_ELEMENT_HIDDEN_OFFSET);
43
43
  return [{
44
- toValue: (topElementHeight - TOP_ELEMENT_OFFSET) / 2,
44
+ toValue: topElementHeightWithoutOffset / 2,
45
45
  type: ANIMATION_TYPE.SLIDE
46
46
  }];
47
47
  }, [topElementHeight]);
@@ -51,7 +51,7 @@ export default function Dialog(props) {
51
51
  toValue: 0,
52
52
  type: ANIMATION_TYPE.FADE
53
53
  }];
54
- } else if (animationType === ANIMATION_TYPE.SLIDE && !fullScreen) {
54
+ } else if (animationType === ANIMATION_TYPE.SLIDE) {
55
55
  return [{
56
56
  toValue: screenHeight,
57
57
  type: ANIMATION_TYPE.SLIDE
@@ -67,14 +67,14 @@ export default function Dialog(props) {
67
67
  toValue: screenHeight,
68
68
  type: ANIMATION_TYPE.SLIDE
69
69
  }];
70
- }, [animationType, fullScreen, screenHeight]);
70
+ }, [animationType, screenHeight]);
71
71
  const openAnimation = useMemo(() => {
72
72
  if (animationType === ANIMATION_TYPE.FADE) {
73
73
  return [{
74
74
  toValue: 1,
75
75
  type: ANIMATION_TYPE.FADE
76
76
  }];
77
- } else if (animationType === ANIMATION_TYPE.SLIDE && !fullScreen) {
77
+ } else if (animationType === ANIMATION_TYPE.SLIDE) {
78
78
  return [{
79
79
  toValue: 0,
80
80
  type: ANIMATION_TYPE.SLIDE
@@ -90,8 +90,8 @@ export default function Dialog(props) {
90
90
  toValue: 0,
91
91
  type: ANIMATION_TYPE.SLIDE
92
92
  }];
93
- }, [animationType, fullScreen]);
94
- const initialOpacity = animationType === ANIMATION_TYPE.SLIDE && fullScreen ? 1 : undefined;
93
+ }, [animationType]);
94
+ const initialOpacity = animationType === ANIMATION_TYPE.SLIDE ? 1 : undefined;
95
95
  const initialTranslateY = animationType === ANIMATION_TYPE.FADE ? 0 : undefined;
96
96
  const paperStyle = css([styles.paper, styleProp]);
97
97
  return /*#__PURE__*/React.createElement(Modal, _extends({
@@ -110,7 +110,7 @@ export default function Dialog(props) {
110
110
  size
111
111
  }
112
112
  }, topElement ? /*#__PURE__*/React.createElement(Column, {
113
- style: fullScreen ? undefined : styles.topElementContainer
113
+ style: styles.topElementContainer
114
114
  }, /*#__PURE__*/React.createElement(Column, {
115
115
  style: styles.topElementContent,
116
116
  onLayout: handleTopElementLayout
@@ -119,5 +119,4 @@ export default function Dialog(props) {
119
119
  style: paperStyle
120
120
  }, children)));
121
121
  }
122
- ;
123
122
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMemo","useState","useWindowDimensions","css","Column","Modal","ANIMATION_TYPE","ShadowView","DialogProvider","useDialogStyle","TOP_ELEMENT_OFFSET","Dialog","props","animationType","SLIDE","children","fullScreen","hideBackdrop","onClose","style","styleProp","size","visible","topElement","otherProps","styles","height","screenHeight","topElementHeight","setTopElementHeight","handleTopElementLayout","event","nativeEvent","layout","offsetAnimation","toValue","type","closeAnimation","FADE","duration","openAnimation","delay","initialOpacity","undefined","initialTranslateY","paperStyle","paper","container","root","topElementContainer","topElementContent"],"sources":["Dialog.tsx"],"sourcesContent":["import React, { useMemo, useState } from 'react';\nimport { LayoutChangeEvent, useWindowDimensions } from 'react-native';\nimport { css } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport Modal, { ANIMATION_TYPE, AnimationUnit } from '../Modal';\nimport ShadowView from '../ShadowView';\nimport type DialogProps from './DialogProps';\nimport { DialogProvider } from './DialogContext';\nimport useDialogStyle from './useDialogStyle';\n\nconst TOP_ELEMENT_OFFSET = 20;\n\nexport default function Dialog(props: DialogProps) {\n const {\n animationType = ANIMATION_TYPE.SLIDE,\n children,\n fullScreen = false,\n hideBackdrop,\n onClose,\n style: styleProp,\n size = 'medium',\n visible,\n topElement,\n ...otherProps\n } = props;\n\n const styles = useDialogStyle(size, fullScreen);\n\n const { height: screenHeight } = useWindowDimensions();\n\n const [topElementHeight, setTopElementHeight] = useState(0);\n const handleTopElementLayout = (event: LayoutChangeEvent) => {\n const { height } = event.nativeEvent.layout;\n setTopElementHeight(height);\n };\n\n const offsetAnimation = useMemo<AnimationUnit[]>(() => {\n if (topElementHeight === 0) {\n return [];\n }\n\n return [{\n toValue: (topElementHeight - TOP_ELEMENT_OFFSET) / 2,\n type: ANIMATION_TYPE.SLIDE,\n }];\n }, [topElementHeight]);\n\n const closeAnimation = useMemo<AnimationUnit[]>(() => {\n if (animationType === ANIMATION_TYPE.FADE) {\n return [{\n toValue: 0,\n type: ANIMATION_TYPE.FADE,\n }];\n } else if (animationType === ANIMATION_TYPE.SLIDE && !fullScreen) {\n return [\n {\n toValue: screenHeight,\n type: ANIMATION_TYPE.SLIDE,\n },\n {\n duration: 150,\n toValue: 0,\n type: ANIMATION_TYPE.FADE,\n },\n ];\n }\n\n return [{\n duration: 150,\n toValue: screenHeight,\n type: ANIMATION_TYPE.SLIDE,\n }];\n }, [animationType, fullScreen, screenHeight]);\n\n const openAnimation = useMemo<AnimationUnit[]>(() => {\n if (animationType === ANIMATION_TYPE.FADE) {\n return [{\n toValue: 1,\n type: ANIMATION_TYPE.FADE,\n }];\n } else if (animationType === ANIMATION_TYPE.SLIDE && !fullScreen) {\n return [\n {\n toValue: 0,\n type: ANIMATION_TYPE.SLIDE,\n },\n {\n delay: 50,\n duration: 150,\n toValue: 1,\n type: ANIMATION_TYPE.FADE,\n },\n ];\n }\n\n return [{\n toValue: 0,\n type: ANIMATION_TYPE.SLIDE,\n }];\n }, [animationType, fullScreen]);\n\n const initialOpacity = animationType === ANIMATION_TYPE.SLIDE && fullScreen ? 1 : undefined;\n\n const initialTranslateY = animationType === ANIMATION_TYPE.FADE ? 0 : undefined;\n\n const paperStyle = css([\n styles.paper,\n styleProp,\n ]);\n\n return (\n <Modal\n animationStyle={styles.container}\n closeAnimation={closeAnimation}\n hideBackdrop={hideBackdrop || animationType === ANIMATION_TYPE.FADE}\n initialOpacity={initialOpacity}\n initialTranslateY={initialTranslateY}\n onClose={onClose}\n openAnimation={openAnimation}\n offsetAnimation={offsetAnimation}\n visible={visible}\n style={styles.root}\n {...otherProps}\n >\n <DialogProvider value={{ size }}>\n {topElement ? (\n <Column style={fullScreen ? undefined : styles.topElementContainer}>\n <Column\n style={styles.topElementContent}\n onLayout={handleTopElementLayout}\n >\n {topElement}\n </Column>\n </Column>\n ) : null}\n\n <ShadowView\n variant={600}\n style={paperStyle}\n >\n {children}\n </ShadowView>\n </DialogProvider>\n </Modal>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,EAAyBC,QAAzB,QAAyC,OAAzC;AACA,SAA4BC,mBAA5B,QAAuD,cAAvD;AACA,SAASC,GAAT,QAAoB,qBAApB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,KAAP,IAAgBC,cAAhB,QAAqD,UAArD;AACA,OAAOC,UAAP,MAAuB,eAAvB;AAEA,SAASC,cAAT,QAA+B,iBAA/B;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AAEA,MAAMC,kBAAkB,GAAG,EAA3B;AAEA,eAAe,SAASC,MAAT,CAAgBC,KAAhB,EAAoC;EAC/C,MAAM;IACFC,aAAa,GAAGP,cAAc,CAACQ,KAD7B;IAEFC,QAFE;IAGFC,UAAU,GAAG,KAHX;IAIFC,YAJE;IAKFC,OALE;IAMFC,KAAK,EAAEC,SANL;IAOFC,IAAI,GAAG,QAPL;IAQFC,OARE;IASFC,UATE;IAUF,GAAGC;EAVD,IAWFZ,KAXJ;EAaA,MAAMa,MAAM,GAAGhB,cAAc,CAACY,IAAD,EAAOL,UAAP,CAA7B;EAEA,MAAM;IAAEU,MAAM,EAAEC;EAAV,IAA2BzB,mBAAmB,EAApD;EAEA,MAAM,CAAC0B,gBAAD,EAAmBC,mBAAnB,IAA0C5B,QAAQ,CAAC,CAAD,CAAxD;;EACA,MAAM6B,sBAAsB,GAAIC,KAAD,IAA8B;IACzD,MAAM;MAAEL;IAAF,IAAaK,KAAK,CAACC,WAAN,CAAkBC,MAArC;IACAJ,mBAAmB,CAACH,MAAD,CAAnB;EACH,CAHD;;EAKA,MAAMQ,eAAe,GAAGlC,OAAO,CAAkB,MAAM;IACnD,IAAI4B,gBAAgB,KAAK,CAAzB,EAA4B;MACxB,OAAO,EAAP;IACH;;IAED,OAAO,CAAC;MACJO,O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ASP,IAVR,eAYI,oBAAC,UAAD;IACI,OAAO,EAAE,GADb;IAEI,KAAK,EAAEsB;EAFX,GAIK9B,QAJL,CAZJ,CAbJ,CADJ;AAmCH;AAAA"}
1
+ {"version":3,"names":["React","useMemo","useState","useWindowDimensions","css","Column","Modal","ANIMATION_TYPE","ShadowView","DialogProvider","useDialogStyle","TOP_ELEMENT_HIDDEN_OFFSET","Dialog","props","animationType","SLIDE","children","hideBackdrop","onClose","style","styleProp","size","visible","topElement","otherProps","styles","height","screenHeight","topElementHeight","setTopElementHeight","handleTopElementLayout","event","nativeEvent","layout","offsetAnimation","topElementHeightWithoutOffset","Math","max","toValue","type","closeAnimation","FADE","duration","openAnimation","delay","initialOpacity","undefined","initialTranslateY","paperStyle","paper","container","root","topElementContainer","topElementContent"],"sources":["Dialog.tsx"],"sourcesContent":["import React, { useMemo, useState } from 'react';\nimport { LayoutChangeEvent, useWindowDimensions } from 'react-native';\nimport { css } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport Modal, { ANIMATION_TYPE, AnimationUnit } from '../Modal';\nimport ShadowView from '../ShadowView';\nimport type DialogProps from './DialogProps';\nimport { DialogProvider } from './DialogContext';\nimport useDialogStyle from './useDialogStyle';\n\nconst TOP_ELEMENT_HIDDEN_OFFSET = 16;\n\nexport default function Dialog(props: DialogProps) {\n const {\n animationType = ANIMATION_TYPE.SLIDE,\n children,\n hideBackdrop,\n onClose,\n style: styleProp,\n size = 'medium',\n visible,\n topElement,\n ...otherProps\n } = props;\n\n const styles = useDialogStyle(size);\n\n const { height: screenHeight } = useWindowDimensions();\n\n const [topElementHeight, setTopElementHeight] = useState(0);\n const handleTopElementLayout = (event: LayoutChangeEvent) => {\n const { height } = event.nativeEvent.layout;\n setTopElementHeight(height);\n };\n\n const offsetAnimation = useMemo<AnimationUnit[]>(() => {\n if (topElementHeight === 0) {\n return [];\n }\n\n const topElementHeightWithoutOffset = Math.max(0, topElementHeight - TOP_ELEMENT_HIDDEN_OFFSET);\n\n return [{\n toValue: (topElementHeightWithoutOffset) / 2,\n type: ANIMATION_TYPE.SLIDE,\n }];\n }, [topElementHeight]);\n\n const closeAnimation = useMemo<AnimationUnit[]>(() => {\n if (animationType === ANIMATION_TYPE.FADE) {\n return [{\n toValue: 0,\n type: ANIMATION_TYPE.FADE,\n }];\n } else if (animationType === ANIMATION_TYPE.SLIDE) {\n return [\n {\n toValue: screenHeight,\n type: ANIMATION_TYPE.SLIDE,\n },\n {\n duration: 150,\n toValue: 0,\n type: ANIMATION_TYPE.FADE,\n },\n ];\n }\n\n return [{\n duration: 150,\n toValue: screenHeight,\n type: ANIMATION_TYPE.SLIDE,\n }];\n }, [animationType, screenHeight]);\n\n const openAnimation = useMemo<AnimationUnit[]>(() => {\n if (animationType === ANIMATION_TYPE.FADE) {\n return [{\n toValue: 1,\n type: ANIMATION_TYPE.FADE,\n }];\n } else if (animationType === ANIMATION_TYPE.SLIDE) {\n return [\n {\n toValue: 0,\n type: ANIMATION_TYPE.SLIDE,\n },\n {\n delay: 50,\n duration: 150,\n toValue: 1,\n type: ANIMATION_TYPE.FADE,\n },\n ];\n }\n\n return [{\n toValue: 0,\n type: ANIMATION_TYPE.SLIDE,\n }];\n }, [animationType]);\n\n const initialOpacity = animationType === ANIMATION_TYPE.SLIDE ? 1 : undefined;\n\n const initialTranslateY = animationType === ANIMATION_TYPE.FADE ? 0 : undefined;\n\n const paperStyle = css([\n styles.paper,\n styleProp,\n ]);\n\n return (\n <Modal\n animationStyle={styles.container}\n closeAnimation={closeAnimation}\n hideBackdrop={hideBackdrop || animationType === ANIMATION_TYPE.FADE}\n initialOpacity={initialOpacity}\n initialTranslateY={initialTranslateY}\n onClose={onClose}\n openAnimation={openAnimation}\n offsetAnimation={offsetAnimation}\n visible={visible}\n style={styles.root}\n {...otherProps}\n >\n <DialogProvider value={{ size }}>\n {topElement ? (\n <Column style={styles.topElementContainer}>\n <Column\n style={styles.topElementContent}\n onLayout={handleTopElementLayout}\n >\n {topElement}\n </Column>\n </Column>\n ) : null}\n\n <ShadowView\n variant={600}\n style={paperStyle}\n >\n {children}\n </ShadowView>\n </DialogProvider>\n </Modal>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,EAAyBC,QAAzB,QAAyC,OAAzC;AACA,SAA4BC,mBAA5B,QAAuD,cAAvD;AACA,SAASC,GAAT,QAAoB,qBAApB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,KAAP,IAAgBC,cAAhB,QAAqD,UAArD;AACA,OAAOC,UAAP,MAAuB,eAAvB;AAEA,SAASC,cAAT,QAA+B,iBAA/B;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AAEA,MAAMC,yBAAyB,GAAG,EAAlC;AAEA,eAAe,SAASC,MAAT,CAAgBC,KAAhB,EAAoC;EAC/C,MAAM;IACFC,aAAa,GAAGP,cAAc,CAACQ,KAD7B;IAEFC,QAFE;IAGFC,YAHE;IAIFC,OAJE;IAKFC,KAAK,EAAEC,SALL;IAMFC,IAAI,GAAG,QANL;IAOFC,OAPE;IAQFC,UARE;IASF,GAAGC;EATD,IAUFX,KAVJ;EAYA,MAAMY,MAAM,GAAGf,cAAc,CAACW,IAAD,CAA7B;EAEA,MAAM;IAAEK,MAAM,EAAEC;EAAV,IAA2BxB,mBAAmB,EAApD;EAEA,MAAM,CAACyB,gBAAD,EAAmBC,mBAAnB,IAA0C3B,QAAQ,CAAC,CAAD,CAAxD;;EACA,MAAM4B,sBAAsB,GAAIC,KAAD,IAA8B;IACzD,MAAM;MAAEL;IAAF,IAAaK,KAAK,CAACC,WAAN,CAAkBC,MAArC;IACAJ,mBAAmB,CAACH,MAAD,CAAnB;EACH,CAHD;;EAKA,MAAMQ,eAAe,GAAGjC,OAAO,CAAkB,MAAM;IACnD,IAAI2B,gBAAgB,KAAK,CAAzB,EAA4B;MACxB,OAAO,EAAP;IACH;;IAED,MAAMO,6BAA6B,GAAGC,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYT,gBAA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IKhC,QAJL,CAZJ,CAbJ,CADJ;AAmCH"}
@@ -1,2 +1,2 @@
1
- export const dialogSizes = ['small', 'medium', 'large'];
1
+ export const dialogSizes = ['small', 'medium', 'large', 'full'];
2
2
  //# sourceMappingURL=DialogProps.js.map
@@ -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":"AAKA,OAAO,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":"AAKA,OAAO,MAAMA,WAAW,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,OAApB,EAA6B,MAA7B,CAApB"}
@@ -13,14 +13,16 @@ export default function useDialogSectionStyle() {
13
13
  return useMemo(() => {
14
14
  const sizePaddingHorizontalMap = {
15
15
  small: {
16
- paddingHorizontal: theme.spacing(6)
16
+ paddingHorizontal: 24
17
17
  },
18
18
  medium: {
19
- // TODO: need to refactor breakpoints.
20
- paddingHorizontal: theme.spacing(windowWidth >= 448 ? 8 : 6)
19
+ paddingHorizontal: windowWidth >= 448 ? 32 : 24
21
20
  },
22
21
  large: {
23
- paddingHorizontal: theme.spacing(8)
22
+ paddingHorizontal: 32
23
+ },
24
+ full: {
25
+ paddingHorizontal: windowWidth >= 448 ? 32 : 24
24
26
  }
25
27
  };
26
28
  return sizePaddingHorizontalMap[size];
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useWindowDimensions","useTheme","useDialogContext","useDialogSectionStyle","size","width","windowWidth","theme","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,SAASA,OAAT,QAAwB,OAAxB;AACA,SAASC,mBAAT,QAAoC,cAApC;AAEA,SAASC,QAAT,QAAyB,WAAzB;AACA,SAASC,gBAAT,QAAiC,iBAAjC;AAGA,eAAe,SAASC,qBAAT,GAAiC;EAC5C,MAAM;IAAEC;EAAF,IAAWF,gBAAgB,EAAjC;EAEA,MAAM;IAAEG,KAAK,EAAEC;EAAT,IAAyBN,mBAAmB,EAAlD;EAEA,MAAMO,KAAK,GAAGN,QAAQ,EAAtB;EAEA,OAAOF,OAAO,CAAkB,MAAM;IAClC,MAAMS,wBAA6D,GAAG;MAClEC,KAAK,EAAE;QACHC,iBAAiB,EAAEH,KAAK,CAACI,OAAN,CAAc,CAAd;MADhB,CAD2D;MAIlEC,MAAM,EAAE;QACJ;QACAF,iBAAiB,EAAEH,KAAK,CAACI,OAAN,CAAcL,WAAW,IAAI,GAAf,GAAqB,CAArB,GAAyB,CAAvC;MAFf,CAJ0D;MAQlEO,KAAK,EAAE;QACHH,iBAAiB,EAAEH,KAAK,CAACI,OAAN,CAAc,CAAd;MADhB;IAR2D,CAAtE;IAaA,OAAOH,wBAAwB,CAACJ,IAAD,CAA/B;EACH,CAfa,EAeX,CAACA,IAAD,EAAOG,KAAP,EAAcD,WAAd,CAfW,CAAd;AAgBH"}
1
+ {"version":3,"names":["useMemo","useWindowDimensions","useTheme","useDialogContext","useDialogSectionStyle","size","width","windowWidth","theme","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,SAASA,OAAT,QAAwB,OAAxB;AACA,SAASC,mBAAT,QAAoC,cAApC;AAEA,SAASC,QAAT,QAAyB,WAAzB;AACA,SAASC,gBAAT,QAAiC,iBAAjC;AAGA,eAAe,SAASC,qBAAT,GAAiC;EAC5C,MAAM;IAAEC;EAAF,IAAWF,gBAAgB,EAAjC;EAEA,MAAM;IAAEG,KAAK,EAAEC;EAAT,IAAyBN,mBAAmB,EAAlD;EAEA,MAAMO,KAAK,GAAGN,QAAQ,EAAtB;EAEA,OAAOF,OAAO,CAAkB,MAAM;IAClC,MAAMS,wBAA6D,GAAG;MAClEC,KAAK,EAAE;QACHC,iBAAiB,EAAE;MADhB,CAD2D;MAIlEC,MAAM,EAAE;QACJD,iBAAiB,EAAEJ,WAAW,IAAI,GAAf,GAAqB,EAArB,GAA0B;MADzC,CAJ0D;MAOlEM,KAAK,EAAE;QACHF,iBAAiB,EAAE;MADhB,CAP2D;MAUlEG,IAAI,EAAE;QACFH,iBAAiB,EAAEJ,WAAW,IAAI,GAAf,GAAqB,EAArB,GAA0B;MAD3C;IAV4D,CAAtE;IAeA,OAAOE,wBAAwB,CAACJ,IAAD,CAA/B;EACH,CAjBa,EAiBX,CAACA,IAAD,EAAOG,KAAP,EAAcD,WAAd,CAjBW,CAAd;AAkBH"}
@@ -1,12 +1,17 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useWindowDimensions } from 'react-native';
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
3
4
  import { useTheme } from '../styles';
4
- export default function useDialogStyle(size, fullScreen) {
5
+ export default function useDialogStyle(size) {
5
6
  const theme = useTheme();
6
7
  const {
7
8
  height: windowHeight,
8
9
  width: windowWidth
9
10
  } = useWindowDimensions();
11
+ const {
12
+ bottom: bottomSafeAreaInset,
13
+ top: topSafeAreaInset
14
+ } = useSafeAreaInsets();
10
15
  return useMemo(() => {
11
16
  var _sizeStyleMap$size;
12
17
 
@@ -21,31 +26,36 @@ export default function useDialogStyle(size, fullScreen) {
21
26
  maxWidth: 512,
22
27
  minHeight: 360,
23
28
  width: 512
29
+ },
30
+ full: {
31
+ paddingBottom: bottomSafeAreaInset,
32
+ paddingTop: Math.max(0, topSafeAreaInset - 3)
24
33
  }
25
34
  };
26
- const containerPaddingVertical = theme.spacing(6);
35
+ const containerPaddingVertical = 24;
27
36
  const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;
28
37
  const dialogMaxWidth = (_sizeStyleMap$size = sizeStyleMap[size]) === null || _sizeStyleMap$size === void 0 ? void 0 : _sizeStyleMap$size.maxWidth;
38
+ const isFullScreen = size === 'full';
29
39
  return {
30
40
  root: {
31
41
  alignItems: 'center',
32
42
  justifyContent: 'center',
33
43
  zIndex: theme.zIndex.dialog
34
44
  },
35
- container: fullScreen ? {
45
+ container: isFullScreen ? {
36
46
  height: '100%',
37
47
  width: '100%'
38
48
  } : {
39
49
  alignItems: 'center',
40
- // TODO: need to refactor breakpoints.
41
- paddingHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4),
50
+ paddingHorizontal: windowWidth > theme.breakpoints.values.xs ? 24 : 16,
42
51
  paddingVertical: containerPaddingVertical,
43
52
  width: '100%'
44
53
  },
45
- paper: fullScreen ? {
54
+ paper: isFullScreen ? {
46
55
  backgroundColor: theme.palette.surface.base,
47
56
  height: '100%',
48
- width: '100%'
57
+ width: '100%',
58
+ ...sizeStyleMap[size]
49
59
  } : {
50
60
  backgroundColor: theme.palette.surface.base,
51
61
  borderRadius: theme.shape.radius.xl,
@@ -64,6 +74,6 @@ export default function useDialogStyle(size, fullScreen) {
64
74
  width: '100%'
65
75
  }
66
76
  };
67
- }, [theme, windowHeight, windowWidth, size, fullScreen]);
77
+ }, [theme, windowHeight, windowWidth, size, bottomSafeAreaInset, topSafeAreaInset]);
68
78
  }
69
79
  //# sourceMappingURL=useDialogStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useWindowDimensions","useTheme","useDialogStyle","size","fullScreen","theme","height","windowHeight","width","windowWidth","sizeStyleMap","small","maxWidth","medium","large","minHeight","containerPaddingVertical","spacing","dialogMaxHeight","dialogMaxWidth","root","alignItems","justifyContent","zIndex","dialog","container","paddingHorizontal","paddingVertical","paper","backgroundColor","palette","surface","base","borderRadius","shape","radius","xl","maxHeight","overflow","topElementContainer","topElementContent","position","bottom"],"sources":["useDialogStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport type { FountainUiStyle, NamedStylesStringUnion } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { DialogSize } from './DialogProps';\n\ntype DialogStyleKeys =\n | 'root'\n | 'container'\n | 'paper'\n | 'topElementContainer'\n | 'topElementContent';\n\ntype DialogStyles = NamedStylesStringUnion<DialogStyleKeys>;\n\nexport default function useDialogStyle(size: DialogSize, fullScreen: boolean): DialogStyles {\n const theme = useTheme();\n\n const {\n height: windowHeight,\n width: windowWidth,\n } = useWindowDimensions();\n\n return useMemo(() => {\n const sizeStyleMap: Record<DialogSize, FountainUiStyle> = {\n small: {\n maxWidth: 260,\n },\n medium: {\n maxWidth: 400,\n },\n large: {\n maxWidth: 512,\n minHeight: 360,\n width: 512,\n },\n };\n\n const containerPaddingVertical = theme.spacing(6);\n const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;\n const dialogMaxWidth = sizeStyleMap[size]?.maxWidth;\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: theme.zIndex.dialog,\n },\n container: fullScreen ? {\n height: '100%',\n width: '100%',\n } : {\n alignItems: 'center',\n // TODO: need to refactor breakpoints.\n paddingHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4),\n paddingVertical: containerPaddingVertical,\n width: '100%',\n },\n paper: fullScreen ? {\n backgroundColor: theme.palette.surface.base,\n height: '100%',\n width: '100%',\n } : {\n backgroundColor: theme.palette.surface.base,\n borderRadius: theme.shape.radius.xl,\n maxHeight: dialogMaxHeight,\n overflow: 'hidden',\n width: '100%',\n ...sizeStyleMap[size],\n },\n topElementContainer: {\n maxWidth: dialogMaxWidth,\n width: '100%',\n },\n topElementContent: {\n position: 'absolute',\n bottom: 0,\n width: '100%',\n },\n };\n }, [theme, windowHeight, windowWidth, size, fullScreen]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AACA,SAASC,mBAAT,QAAoC,cAApC;AAEA,SAASC,QAAT,QAAyB,WAAzB;AAYA,eAAe,SAASC,cAAT,CAAwBC,IAAxB,EAA0CC,UAA1C,EAA6E;EACxF,MAAMC,KAAK,GAAGJ,QAAQ,EAAtB;EAEA,MAAM;IACFK,MAAM,EAAEC,YADN;IAEFC,KAAK,EAAEC;EAFL,IAGFT,mBAAmB,EAHvB;EAKA,OAAOD,OAAO,CAAC,MAAM;IAAA;;IACjB,MAAMW,YAAiD,GAAG;MACtDC,KAAK,EAAE;QACHC,QAAQ,EAAE;MADP,CAD+C;MAItDC,MAAM,EAAE;QACJD,QAAQ,EAAE;MADN,CAJ8C;MAOtDE,KAAK,EAAE;QACHF,QAAQ,EAAE,GADP;QAEHG,SAAS,EAAE,GAFR;QAGHP,KAAK,EAAE;MAHJ;IAP+C,CAA1D;IAcA,MAAMQ,wBAAwB,GAAGX,KAAK,CAACY,OAAN,CAAc,CAAd,CAAjC;IACA,MAAMC,eAAe,GAAGX,YAAY,GAAGS,wBAAwB,GAAG,CAAlE;IACA,MAAMG,cAAc,yBAAGT,YAAY,CAACP,IAAD,CAAf,uDAAG,mBAAoBS,QAA3C;IAEA,OAAO;MACHQ,IAAI,EAAE;QACFC,UAAU,EAAE,QADV;QAEFC,cAAc,EAAE,QAFd;QAGFC,MAAM,EAAElB,KAAK,CAACkB,MAAN,CAAaC;MAHnB,CADH;MAMHC,SAAS,EAAErB,UAAU,GAAG;QACpBE,MAAM,EAAE,MADY;QAEpBE,KAAK,EAAE;MAFa,CAAH,GAGjB;QACAa,UAAU,EAAE,QADZ;QAEA;QACAK,iBAAiB,EAAErB,KAAK,CAACY,OAAN,CAAcR,WAAW,GAAG,GAAd,GAAoB,CAApB,GAAwB,CAAtC,CAHnB;QAIAkB,eAAe,EAAEX,wBAJjB;QAKAR,KAAK,EAAE;MALP,CATD;MAgBHoB,KAAK,EAAExB,UAAU,GAAG;QAChByB,eAAe,EAAExB,KAAK,CAACyB,OAAN,CAAcC,OAAd,CAAsBC,IADvB;QAEhB1B,MAAM,EAAE,MAFQ;QAGhBE,KAAK,EAAE;MAHS,CAAH,GAIb;QACAqB,eAAe,EAAExB,KAAK,CAACyB,OAAN,CAAcC,OAAd,CAAsBC,IADvC;QAEAC,YAAY,EAAE5B,KAAK,CAAC6B,KAAN,CAAYC,MAAZ,CAAmBC,EAFjC;QAGAC,SAAS,EAAEnB,eAHX;QAIAoB,QAAQ,EAAE,QAJV;QAKA9B,KAAK,EAAE,MALP;QAMA,GAAGE,YAAY,CAACP,IAAD;MANf,CApBD;MA4BHoC,mBAAmB,EAAE;QACjB3B,QAAQ,EAAEO,cADO;QAEjBX,KAAK,EAAE;MAFU,CA5BlB;MAgCHgC,iBAAiB,EAAE;QACfC,QAAQ,EAAE,UADK;QAEfC,MAAM,EAAE,CAFO;QAGflC,KAAK,EAAE;MAHQ;IAhChB,CAAP;EAsCH,CAzDa,EAyDX,CAACH,KAAD,EAAQE,YAAR,EAAsBE,WAAtB,EAAmCN,IAAnC,EAAyCC,UAAzC,CAzDW,CAAd;AA0DH"}
1
+ {"version":3,"names":["useMemo","useWindowDimensions","useSafeAreaInsets","useTheme","useDialogStyle","size","theme","height","windowHeight","width","windowWidth","bottom","bottomSafeAreaInset","top","topSafeAreaInset","sizeStyleMap","small","maxWidth","medium","large","minHeight","full","paddingBottom","paddingTop","Math","max","containerPaddingVertical","dialogMaxHeight","dialogMaxWidth","isFullScreen","root","alignItems","justifyContent","zIndex","dialog","container","paddingHorizontal","breakpoints","values","xs","paddingVertical","paper","backgroundColor","palette","surface","base","borderRadius","shape","radius","xl","maxHeight","overflow","topElementContainer","topElementContent","position"],"sources":["useDialogStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport type { FountainUiStyle, NamedStylesStringUnion } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { DialogSize } from './DialogProps';\n\ntype DialogStyleKeys =\n | 'root'\n | 'container'\n | 'paper'\n | 'topElementContainer'\n | 'topElementContent';\n\ntype DialogStyles = NamedStylesStringUnion<DialogStyleKeys>;\n\nexport default function useDialogStyle(size: DialogSize): DialogStyles {\n const theme = useTheme();\n\n const {\n height: windowHeight,\n width: windowWidth,\n } = useWindowDimensions();\n\n const {\n bottom: bottomSafeAreaInset,\n top: topSafeAreaInset,\n } = useSafeAreaInsets();\n\n return useMemo(() => {\n const sizeStyleMap: Record<DialogSize, FountainUiStyle> = {\n small: {\n maxWidth: 260,\n },\n medium: {\n maxWidth: 400,\n },\n large: {\n maxWidth: 512,\n minHeight: 360,\n width: 512,\n },\n full: {\n paddingBottom: bottomSafeAreaInset,\n paddingTop: Math.max(0, topSafeAreaInset - 3),\n },\n };\n\n const containerPaddingVertical = 24;\n const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;\n const dialogMaxWidth = sizeStyleMap[size]?.maxWidth;\n\n const isFullScreen = size === 'full';\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: theme.zIndex.dialog,\n },\n container: isFullScreen ? {\n height: '100%',\n width: '100%',\n } : {\n alignItems: 'center',\n paddingHorizontal: windowWidth > theme.breakpoints.values.xs ? 24 : 16,\n paddingVertical: containerPaddingVertical,\n width: '100%',\n },\n paper: isFullScreen ? {\n backgroundColor: theme.palette.surface.base,\n height: '100%',\n width: '100%',\n ...sizeStyleMap[size],\n } : {\n backgroundColor: theme.palette.surface.base,\n borderRadius: theme.shape.radius.xl,\n maxHeight: dialogMaxHeight,\n overflow: 'hidden',\n width: '100%',\n ...sizeStyleMap[size],\n },\n topElementContainer: {\n maxWidth: dialogMaxWidth,\n width: '100%',\n },\n topElementContent: {\n position: 'absolute',\n bottom: 0,\n width: '100%',\n },\n };\n }, [theme, windowHeight, windowWidth, size, bottomSafeAreaInset, topSafeAreaInset]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AACA,SAASC,mBAAT,QAAoC,cAApC;AACA,SAASC,iBAAT,QAAkC,gCAAlC;AAEA,SAASC,QAAT,QAAyB,WAAzB;AAYA,eAAe,SAASC,cAAT,CAAwBC,IAAxB,EAAwD;EACnE,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,MAAM;IACFI,MAAM,EAAEC,YADN;IAEFC,KAAK,EAAEC;EAFL,IAGFT,mBAAmB,EAHvB;EAKA,MAAM;IACFU,MAAM,EAAEC,mBADN;IAEFC,GAAG,EAAEC;EAFH,IAGFZ,iBAAiB,EAHrB;EAKA,OAAOF,OAAO,CAAC,MAAM;IAAA;;IACjB,MAAMe,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;QAGHX,KAAK,EAAE;MAHJ,CAP+C;MAYtDY,IAAI,EAAE;QACFC,aAAa,EAAEV,mBADb;QAEFW,UAAU,EAAEC,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYX,gBAAgB,GAAG,CAA/B;MAFV;IAZgD,CAA1D;IAkBA,MAAMY,wBAA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Q,EAAE,UADK;QAEf3C,MAAM,EAAE,CAFO;QAGfF,KAAK,EAAE;MAHQ;IAhChB,CAAP;EAsCH,CA/Da,EA+DX,CAACH,KAAD,EAAQE,YAAR,EAAsBE,WAAtB,EAAmCL,IAAnC,EAAyCO,mBAAzC,EAA8DE,gBAA9D,CA/DW,CAAd;AAgEH"}
@@ -9,7 +9,6 @@ const useStyles = function () {
9
9
  const theme = useTheme();
10
10
  return {
11
11
  root: {
12
- paddingTop: theme.spacing(2),
13
12
  paddingBottom: theme.spacing(4)
14
13
  }
15
14
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","Column","useDialogSectionStyle","css","useTheme","useStyles","theme","root","paddingTop","spacing","paddingBottom","DialogActions","props","children","style","styleProp","otherProps","styles","sectionStyle","rootStyle"],"sources":["DialogActions.tsx"],"sourcesContent":["import React from 'react';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { css, useTheme } from '../styles';\nimport type DialogActionsProps from './DialogActionsProps';\n\ntype DialogActionsStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<DialogActionsStyles> = function (): DialogActionsStyles {\n const theme = useTheme();\n\n return {\n root: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(4),\n },\n };\n};\n\nexport default function DialogActions(props: DialogActionsProps) {\n const {\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const sectionStyle = useDialogSectionStyle();\n\n const rootStyle = css([\n styles.root,\n sectionStyle,\n styleProp,\n ]);\n\n return (\n <Column\n style={rootStyle}\n {...otherProps}\n >\n {children}\n </Column>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAKA,MAAMC,SAAyC,GAAG,YAAiC;EAC/E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAc,CAAd,CADV;MAEFC,aAAa,EAAEJ,KAAK,CAACG,OAAN,CAAc,CAAd;IAFb;EADH,CAAP;AAMH,CATD;;AAWA,eAAe,SAASE,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAGZ,SAAS,EAAxB;EAEA,MAAMa,YAAY,GAAGhB,qBAAqB,EAA1C;EAEA,MAAMiB,SAAS,GAAGhB,GAAG,CAAC,CAClBc,MAAM,CAACV,IADW,EAElBW,YAFkB,EAGlBH,SAHkB,CAAD,CAArB;EAMA,oBACI,oBAAC,MAAD;IACI,KAAK,EAAEI;EADX,GAEQH,UAFR,GAIKH,QAJL,CADJ;AAQH;AAAA"}
1
+ {"version":3,"names":["React","Column","useDialogSectionStyle","css","useTheme","useStyles","theme","root","paddingBottom","spacing","DialogActions","props","children","style","styleProp","otherProps","styles","sectionStyle","rootStyle"],"sources":["DialogActions.tsx"],"sourcesContent":["import React from 'react';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { css, useTheme } from '../styles';\nimport type DialogActionsProps from './DialogActionsProps';\n\ntype DialogActionsStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<DialogActionsStyles> = function (): DialogActionsStyles {\n const theme = useTheme();\n\n return {\n root: {\n paddingBottom: theme.spacing(4),\n },\n };\n};\n\nexport default function DialogActions(props: DialogActionsProps) {\n const {\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const sectionStyle = useDialogSectionStyle();\n\n const rootStyle = css([\n styles.root,\n sectionStyle,\n styleProp,\n ]);\n\n return (\n <Column\n style={rootStyle}\n {...otherProps}\n >\n {children}\n </Column>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAKA,MAAMC,SAAyC,GAAG,YAAiC;EAC/E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,aAAa,EAAEF,KAAK,CAACG,OAAN,CAAc,CAAd;IADb;EADH,CAAP;AAKH,CARD;;AAUA,eAAe,SAASC,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAGX,SAAS,EAAxB;EAEA,MAAMY,YAAY,GAAGf,qBAAqB,EAA1C;EAEA,MAAMgB,SAAS,GAAGf,GAAG,CAAC,CAClBa,MAAM,CAACT,IADW,EAElBU,YAFkB,EAGlBH,SAHkB,CAAD,CAArB;EAMA,oBACI,oBAAC,MAAD;IACI,KAAK,EAAEI;EADX,GAEQH,UAFR,GAIKH,QAJL,CADJ;AAQH;AAAA"}
@@ -0,0 +1,65 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import { StyleSheet, Text, View } from 'react-native';
5
+ import { createFontStyle, css, useTheme } from '../styles';
6
+ import IconButton from '../IconButton';
7
+ import { ChevronLeft, Close } from '../internal';
8
+ const styles = StyleSheet.create({
9
+ root: {
10
+ alignItems: 'center',
11
+ height: 64,
12
+ justifyContent: 'center',
13
+ paddingHorizontal: 80,
14
+ width: '100%'
15
+ },
16
+ backButton: {
17
+ height: 40,
18
+ left: 20,
19
+ paddingLeft: 5,
20
+ paddingRight: 11,
21
+ paddingVertical: 8,
22
+ position: 'absolute',
23
+ width: 40
24
+ },
25
+ closeButton: {
26
+ height: 40,
27
+ left: 20,
28
+ padding: 8,
29
+ position: 'absolute',
30
+ width: 40
31
+ }
32
+ });
33
+ export default function DialogLargeTitle(props) {
34
+ const {
35
+ children,
36
+ closeButtonType = 'close',
37
+ onClose,
38
+ style: styleProp,
39
+ ...otherProps
40
+ } = props;
41
+ const theme = useTheme();
42
+ const fontStyle = createFontStyle(theme, {
43
+ selector: typo => typo.header4.semiBold,
44
+ color: theme.palette.text.strong
45
+ });
46
+ const rootStyle = css([styles.root, styleProp]);
47
+ return /*#__PURE__*/React.createElement(View, _extends({
48
+ style: rootStyle
49
+ }, otherProps), typeof onClose === 'function' ? closeButtonType === 'back' ? /*#__PURE__*/React.createElement(IconButton, {
50
+ style: styles.backButton,
51
+ onPress: onClose
52
+ }, /*#__PURE__*/React.createElement(ChevronLeft, {
53
+ color: 'strong',
54
+ size: 'large'
55
+ })) : /*#__PURE__*/React.createElement(IconButton, {
56
+ style: styles.closeButton,
57
+ onPress: onClose
58
+ }, /*#__PURE__*/React.createElement(Close, {
59
+ color: 'strong',
60
+ size: 'large'
61
+ })) : null, /*#__PURE__*/React.createElement(Text, {
62
+ style: fontStyle
63
+ }, children));
64
+ }
65
+ //# sourceMappingURL=DialogLargeTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","Text","View","createFontStyle","css","useTheme","IconButton","ChevronLeft","Close","styles","create","root","alignItems","height","justifyContent","paddingHorizontal","width","backButton","left","paddingLeft","paddingRight","paddingVertical","position","closeButton","padding","DialogLargeTitle","props","children","closeButtonType","onClose","style","styleProp","otherProps","theme","fontStyle","selector","typo","header4","semiBold","color","palette","text","strong","rootStyle"],"sources":["DialogLargeTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport type { DialogProps } from '../Dialog';\nimport type DialogTitleProps from './DialogTitleProps';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport IconButton from '../IconButton';\nimport { ChevronLeft, Close } from '../internal';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n height: 64,\n justifyContent: 'center',\n paddingHorizontal: 80,\n width: '100%',\n },\n backButton: {\n height: 40,\n left: 20,\n paddingLeft: 5,\n paddingRight: 11,\n paddingVertical: 8,\n position: 'absolute',\n width: 40,\n },\n closeButton: {\n height: 40,\n left: 20,\n padding: 8,\n position: 'absolute',\n width: 40,\n },\n});\n\ninterface DialogLargeTitleProps extends DialogTitleProps {\n closeButtonType?: 'back' | 'close';\n onClose: DialogProps['onClose'];\n}\n\nexport default function DialogLargeTitle(props: DialogLargeTitleProps) {\n const {\n children,\n closeButtonType = 'close',\n onClose,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.header4.semiBold,\n color: theme.palette.text.strong,\n });\n\n const rootStyle = css([\n styles.root,\n styleProp,\n ]);\n\n return (\n <View\n style={rootStyle}\n {...otherProps}\n >\n {typeof onClose === 'function' ? (\n closeButtonType === 'back' ? (\n <IconButton\n style={styles.backButton}\n onPress={onClose}\n >\n <ChevronLeft\n color={'strong'}\n size={'large'}\n />\n </IconButton>\n ) : (\n <IconButton\n style={styles.closeButton}\n onPress={onClose}\n >\n <Close\n color={'strong'}\n size={'large'}\n />\n </IconButton>\n )\n ) : null}\n\n <Text style={fontStyle}>\n {children}\n </Text>\n </View>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,EAAqBC,IAArB,EAA2BC,IAA3B,QAAuC,cAAvC;AAGA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,OAAOC,UAAP,MAAuB,eAAvB;AAC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AApB,gBACI,oBAAC,UAAD;IACI,KAAK,EAAEnB,MAAM,CAACQ,UADlB;IAEI,OAAO,EAAEY;EAFb,gBAII,oBAAC,WAAD;IACI,KAAK,EAAE,QADX;IAEI,IAAI,EAAE;EAFV,EAJJ,CADJ,gBAWI,oBAAC,UAAD;IACI,KAAK,EAAEpB,MAAM,CAACc,WADlB;IAEI,OAAO,EAAEM;EAFb,gBAII,oBAAC,KAAD;IACI,KAAK,EAAE,QADX;IAEI,IAAI,EAAE;EAFV,EAJJ,CAZP,GAsBG,IA1BR,eA4BI,oBAAC,IAAD;IAAM,KAAK,EAAEK;EAAb,GACKP,QADL,CA5BJ,CADJ;AAkCH"}
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  import { Text, View } from 'react-native';
5
5
  import { useDialogSectionStyle } from '../Dialog';
6
6
  import { createFontStyle, css, useTheme } from '../styles';
7
+ import DialogLargeTitle from './DialogLargeTitle';
7
8
 
8
9
  const useStyles = function () {
9
10
  const theme = useTheme();
@@ -17,7 +18,7 @@ const useStyles = function () {
17
18
  };
18
19
  };
19
20
 
20
- export default function DialogTitle(props) {
21
+ const DialogTitle = props => {
21
22
  const {
22
23
  children,
23
24
  style: styleProp,
@@ -37,6 +38,8 @@ export default function DialogTitle(props) {
37
38
  }), typeof children === 'string' ? /*#__PURE__*/React.createElement(Text, {
38
39
  style: titleStyle
39
40
  }, children) : children);
40
- }
41
- ;
41
+ };
42
+
43
+ DialogTitle.Large = DialogLargeTitle;
44
+ export default DialogTitle;
42
45
  //# sourceMappingURL=DialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","useDialogSectionStyle","createFontStyle","css","useTheme","useStyles","theme","root","paddingTop","spacing","title","textAlign","DialogTitle","props","children","style","styleProp","otherProps","styles","sectionStyle","rootStyle","titleFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","titleStyle"],"sources":["DialogTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type DialogTitleProps from './DialogTitleProps';\n\ntype DialogTitleStyles = NamedStylesStringUnion<'root' | 'title'>;\n\nconst useStyles: UseStyles<DialogTitleStyles> = function (): DialogTitleStyles {\n const theme = useTheme();\n\n return {\n root: {\n paddingTop: theme.spacing(6.5),\n },\n title: {\n textAlign: 'center',\n },\n };\n};\n\nexport default function DialogTitle(props: DialogTitleProps) {\n const {\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const sectionStyle = useDialogSectionStyle();\n\n const rootStyle = css([\n styles.root,\n sectionStyle,\n styleProp,\n ]);\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.header3.semiBold,\n color: theme.palette.text.strong,\n });\n\n const titleStyle = css([\n styles.title,\n titleFontStyle,\n ]);\n\n return (\n <View\n {...otherProps}\n style={rootStyle}\n >\n {typeof children === 'string' ? (\n <Text style={titleStyle}>\n {children}\n </Text>\n ) : (children)}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAEA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;;AAKA,MAAMC,SAAuC,GAAG,YAA+B;EAC3E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAc,GAAd;IADV,CADH;IAIHC,KAAK,EAAE;MACHC,SAAS,EAAE;IADR;EAJJ,CAAP;AAQH,CAXD;;AAaA,eAAe,SAASC,WAAT,CAAqBC,KAArB,EAA8C;EACzD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMP,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMc,MAAM,GAAGb,SAAS,EAAxB;EAEA,MAAMc,YAAY,GAAGlB,qBAAqB,EAA1C;EAEA,MAAMmB,SAAS,GAAGjB,GAAG,CAAC,CAClBe,MAAM,CAACX,IADW,EAElBY,YAFkB,EAGlBH,SAHkB,CAAD,CAArB;EAMA,MAAMK,cAAc,GAAGnB,eAAe,CAACI,KAAD,EAAQ;IAC1CgB,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,OAAX,CAAmBC,QADH;IAE1CC,KAAK,EAAEpB,KAAK,CAACqB,OAAN,CAAcC,IAAd,CAAmBC;EAFgB,CAAR,CAAtC;EAKA,MAAMC,UAAU,GAAG3B,GAAG,CAAC,CACnBe,MAAM,CAACR,KADY,EAEnBW,cAFmB,CAAD,CAAtB;EAKA,oBACI,oBAAC,IAAD,eACQJ,UADR;IAEI,KAAK,EAAEG;EAFX,IAIK,OAAON,QAAP,KAAoB,QAApB,gBACG,oBAAC,IAAD;IAAM,KAAK,EAAEgB;EAAb,GACKhB,QADL,CADH,GAIIA,QART,CADJ;AAYH;AAAA"}
1
+ {"version":3,"names":["React","Text","View","useDialogSectionStyle","createFontStyle","css","useTheme","DialogLargeTitle","useStyles","theme","root","paddingTop","spacing","title","textAlign","DialogTitle","props","children","style","styleProp","otherProps","styles","sectionStyle","rootStyle","titleFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","titleStyle","Large"],"sources":["DialogTitle.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport DialogLargeTitle from './DialogLargeTitle';\nimport type DialogTitleProps from './DialogTitleProps';\n\ntype DialogTitleStyles = NamedStylesStringUnion<'root' | 'title'>;\n\nconst useStyles: UseStyles<DialogTitleStyles> = function (): DialogTitleStyles {\n const theme = useTheme();\n\n return {\n root: {\n paddingTop: theme.spacing(6.5),\n },\n title: {\n textAlign: 'center',\n },\n };\n};\n\nconst DialogTitle = (props: DialogTitleProps) => {\n const {\n children,\n style: styleProp,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const sectionStyle = useDialogSectionStyle();\n\n const rootStyle = css([\n styles.root,\n sectionStyle,\n styleProp,\n ]);\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (typography) => typography.header3.semiBold,\n color: theme.palette.text.strong,\n });\n\n const titleStyle = css([\n styles.title,\n titleFontStyle,\n ]);\n\n return (\n <View\n {...otherProps}\n style={rootStyle}\n >\n {typeof children === 'string' ? (\n <Text style={titleStyle}>\n {children}\n </Text>\n ) : (children)}\n </View>\n );\n};\n\nDialogTitle.Large = DialogLargeTitle;\n\nexport default DialogTitle;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAEA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,OAAOC,gBAAP,MAA6B,oBAA7B;;AAKA,MAAMC,SAAuC,GAAG,YAA+B;EAC3E,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,OAAO;IACHI,IAAI,EAAE;MACFC,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAc,GAAd;IADV,CADH;IAIHC,KAAK,EAAE;MACHC,SAAS,EAAE;IADR;EAJJ,CAAP;AAQH,CAXD;;AAaA,MAAMC,WAAW,GAAIC,KAAD,IAA6B;EAC7C,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGF,GAAGC;EAHD,IAIFJ,KAJJ;EAMA,MAAMP,KAAK,GAAGH,QAAQ,EAAtB;EAEA,MAAMe,MAAM,GAAGb,SAAS,EAAxB;EAEA,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