@fountain-ui/core 2.0.0-beta.98 → 3.0.0-alpha.1

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 (760) hide show
  1. package/build/commonjs/Accordion/Accordion.js +0 -1
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/index.js +2 -2
  4. package/build/commonjs/Accordion/index.js.map +1 -1
  5. package/build/commonjs/Accordion/useVariantStyleMap.js +4 -2
  6. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  7. package/build/commonjs/AppBar/AppBar.js +8 -8
  8. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  9. package/build/commonjs/AppBar/AppBarProps.js +7 -0
  10. package/build/commonjs/AppBar/AppBarProps.js.map +1 -1
  11. package/build/commonjs/AppBar/index.js.map +1 -1
  12. package/build/commonjs/Badge/index.js +2 -2
  13. package/build/commonjs/Badge/index.js.map +1 -1
  14. package/build/commonjs/Badge/useVariantStyleMap.js +15 -6
  15. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
  16. package/build/commonjs/{PaginationItem/LegacyPaginationItem.js → BottomSheetActions/BottomSheetActions.js} +10 -23
  17. package/build/commonjs/BottomSheetActions/BottomSheetActions.js.map +1 -0
  18. package/build/commonjs/BottomSheetActions/BottomSheetActionsProps.js +2 -0
  19. package/build/commonjs/BottomSheetActions/BottomSheetActionsProps.js.map +1 -0
  20. package/build/commonjs/BottomSheetActions/index.js +16 -0
  21. package/build/commonjs/BottomSheetActions/index.js.map +1 -0
  22. package/build/commonjs/{SvgIcon/LegacySvgIcon.js → BottomSheetContent/BottomSheetContent.js} +23 -23
  23. package/build/commonjs/BottomSheetContent/BottomSheetContent.js.map +1 -0
  24. package/build/commonjs/BottomSheetContent/BottomSheetContentProps.js +2 -0
  25. package/build/commonjs/BottomSheetContent/BottomSheetContentProps.js.map +1 -0
  26. package/build/commonjs/BottomSheetContent/index.js +16 -0
  27. package/build/commonjs/BottomSheetContent/index.js.map +1 -0
  28. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +73 -0
  29. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -0
  30. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js +2 -0
  31. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -0
  32. package/build/commonjs/{CheckboxGroup → BottomSheetTitle}/index.js +2 -2
  33. package/build/commonjs/BottomSheetTitle/index.js.map +1 -0
  34. package/build/commonjs/Button/Button.js +5 -8
  35. package/build/commonjs/Button/Button.js.map +1 -1
  36. package/build/commonjs/Button/index.js +2 -2
  37. package/build/commonjs/Button/index.js.map +1 -1
  38. package/build/commonjs/Button/useVariantStyleMap.js +10 -2
  39. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
  40. package/build/commonjs/Checkbox/Checkbox.js +0 -1
  41. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  42. package/build/commonjs/Checkbox/index.js +2 -2
  43. package/build/commonjs/Checkbox/index.js.map +1 -1
  44. package/build/commonjs/Checkbox/useVariantStyleMap.js +4 -1
  45. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  46. package/build/commonjs/Chip/index.js +2 -2
  47. package/build/commonjs/Chip/index.js.map +1 -1
  48. package/build/commonjs/Chip/useChipStyle.js +15 -3
  49. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  50. package/build/commonjs/Dialog/Dialog.js +10 -21
  51. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  52. package/build/commonjs/Dialog/DialogContext.js +19 -0
  53. package/build/commonjs/Dialog/DialogContext.js.map +1 -0
  54. package/build/commonjs/Dialog/index.js +24 -2
  55. package/build/commonjs/Dialog/index.js.map +1 -1
  56. package/build/commonjs/Dialog/useDialogSectionStyle.js +40 -0
  57. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -0
  58. package/build/commonjs/Dialog/useDialogStyle.js +16 -18
  59. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  60. package/build/commonjs/DialogActions/DialogActions.js +17 -2
  61. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  62. package/build/commonjs/DialogActions/index.js +2 -2
  63. package/build/commonjs/DialogActions/index.js.map +1 -1
  64. package/build/commonjs/DialogContent/DialogContent.js +5 -1
  65. package/build/commonjs/DialogContent/DialogContent.js.map +1 -1
  66. package/build/commonjs/DialogContent/index.js +2 -2
  67. package/build/commonjs/DialogContent/index.js.map +1 -1
  68. package/build/commonjs/DialogMedia/DialogMedia.js +1 -0
  69. package/build/commonjs/DialogMedia/DialogMedia.js.map +1 -1
  70. package/build/commonjs/DialogMedia/index.js +2 -2
  71. package/build/commonjs/DialogMedia/index.js.map +1 -1
  72. package/build/commonjs/DialogTitle/DialogTitle.js +4 -1
  73. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  74. package/build/commonjs/DialogTitle/index.js +2 -2
  75. package/build/commonjs/DialogTitle/index.js.map +1 -1
  76. package/build/commonjs/Divider/index.js +2 -2
  77. package/build/commonjs/Divider/index.js.map +1 -1
  78. package/build/commonjs/Empty/Empty.js +2 -2
  79. package/build/commonjs/Empty/Empty.js.map +1 -1
  80. package/build/commonjs/IconButton/IconButton.js +26 -2
  81. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  82. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  83. package/build/commonjs/IconButton/index.js +2 -2
  84. package/build/commonjs/IconButton/index.js.map +1 -1
  85. package/build/commonjs/ListItemText/ListItemText.js +4 -4
  86. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  87. package/build/commonjs/ListSubheader/ListSubheader.js +2 -2
  88. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  89. package/build/commonjs/Pagination/Pagination.js +0 -4
  90. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  91. package/build/commonjs/Pagination/index.js +2 -2
  92. package/build/commonjs/Pagination/index.js.map +1 -1
  93. package/build/commonjs/Radio/Radio.js +1 -2
  94. package/build/commonjs/Radio/Radio.js.map +1 -1
  95. package/build/commonjs/Radio/index.js +2 -2
  96. package/build/commonjs/Radio/index.js.map +1 -1
  97. package/build/commonjs/RadioGroup/index.js +2 -2
  98. package/build/commonjs/RadioGroup/index.js.map +1 -1
  99. package/build/commonjs/ShadowView/ShadowView.native.js +17 -5
  100. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  101. package/build/commonjs/Snackbar/Snackbar.js +1 -1
  102. package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
  103. package/build/commonjs/Snackbar/index.js +2 -2
  104. package/build/commonjs/Snackbar/index.js.map +1 -1
  105. package/build/commonjs/SnackbarContent/SnackbarContent.js +15 -5
  106. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  107. package/build/commonjs/SnackbarContent/StatusIcon.js +0 -2
  108. package/build/commonjs/SnackbarContent/StatusIcon.js.map +1 -1
  109. package/build/commonjs/SnackbarContent/index.js +2 -2
  110. package/build/commonjs/SnackbarContent/index.js.map +1 -1
  111. package/build/commonjs/SvgIcon/index.js +2 -2
  112. package/build/commonjs/SvgIcon/index.js.map +1 -1
  113. package/build/commonjs/Tab/Tab.js +1 -1
  114. package/build/commonjs/Tab/Tab.js.map +1 -1
  115. package/build/commonjs/Tab/index.js +2 -2
  116. package/build/commonjs/Tab/index.js.map +1 -1
  117. package/build/commonjs/TabBase/index.js +2 -2
  118. package/build/commonjs/TabBase/index.js.map +1 -1
  119. package/build/commonjs/Tabs/Tabs.js +15 -3
  120. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  121. package/build/commonjs/Tabs/TabsProps.js +3 -1
  122. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  123. package/build/commonjs/Tabs/index.js +2 -2
  124. package/build/commonjs/Tabs/index.js.map +1 -1
  125. package/build/commonjs/TextField/TextField.js +0 -1
  126. package/build/commonjs/TextField/TextField.js.map +1 -1
  127. package/build/commonjs/TextField/index.js +2 -2
  128. package/build/commonjs/TextField/index.js.map +1 -1
  129. package/build/commonjs/Toggle/Toggle.js +5 -3
  130. package/build/commonjs/Toggle/Toggle.js.map +1 -1
  131. package/build/commonjs/Toolbar/Toolbar.js +17 -6
  132. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  133. package/build/commonjs/Toolbar/ToolbarProps.js +7 -0
  134. package/build/commonjs/Toolbar/ToolbarProps.js.map +1 -1
  135. package/build/commonjs/Toolbar/index.js.map +1 -1
  136. package/build/commonjs/Tooltip/Tooltip.js +6 -1
  137. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  138. package/build/commonjs/Tooltip/index.js +2 -2
  139. package/build/commonjs/Tooltip/index.js.map +1 -1
  140. package/build/commonjs/Typography/index.js +2 -2
  141. package/build/commonjs/Typography/index.js.map +1 -1
  142. package/build/commonjs/index.js +63 -21
  143. package/build/commonjs/index.js.map +1 -1
  144. package/build/commonjs/internal/icons/LoadingSpinner/index.js +14 -4
  145. package/build/commonjs/internal/icons/LoadingSpinner/index.js.map +1 -1
  146. package/build/commonjs/internal/icons/LoadingSpinner/index.native.js +14 -4
  147. package/build/commonjs/internal/icons/LoadingSpinner/index.native.js.map +1 -1
  148. package/build/commonjs/utils/createSvgIcon.js +2 -10
  149. package/build/commonjs/utils/createSvgIcon.js.map +1 -1
  150. package/build/module/Accordion/Accordion.js +0 -1
  151. package/build/module/Accordion/Accordion.js.map +1 -1
  152. package/build/module/Accordion/index.js +1 -1
  153. package/build/module/Accordion/index.js.map +1 -1
  154. package/build/module/Accordion/useVariantStyleMap.js +4 -2
  155. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  156. package/build/module/AppBar/AppBar.js +8 -8
  157. package/build/module/AppBar/AppBar.js.map +1 -1
  158. package/build/module/AppBar/AppBarProps.js +1 -1
  159. package/build/module/AppBar/AppBarProps.js.map +1 -1
  160. package/build/module/AppBar/index.js.map +1 -1
  161. package/build/module/Badge/index.js +1 -1
  162. package/build/module/Badge/index.js.map +1 -1
  163. package/build/module/Badge/useVariantStyleMap.js +15 -6
  164. package/build/module/Badge/useVariantStyleMap.js.map +1 -1
  165. package/build/module/{PaginationItem/LegacyPaginationItem.js → BottomSheetActions/BottomSheetActions.js} +9 -20
  166. package/build/module/BottomSheetActions/BottomSheetActions.js.map +1 -0
  167. package/build/module/BottomSheetActions/BottomSheetActionsProps.js +2 -0
  168. package/build/module/BottomSheetActions/BottomSheetActionsProps.js.map +1 -0
  169. package/build/module/BottomSheetActions/index.js +2 -0
  170. package/build/module/BottomSheetActions/index.js.map +1 -0
  171. package/build/module/BottomSheetContent/BottomSheetContent.js +32 -0
  172. package/build/module/BottomSheetContent/BottomSheetContent.js.map +1 -0
  173. package/build/module/BottomSheetContent/BottomSheetContentProps.js +2 -0
  174. package/build/module/BottomSheetContent/BottomSheetContentProps.js.map +1 -0
  175. package/build/module/BottomSheetContent/index.js +2 -0
  176. package/build/module/BottomSheetContent/index.js.map +1 -0
  177. package/build/module/BottomSheetTitle/BottomSheetTitle.js +60 -0
  178. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -0
  179. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js +2 -0
  180. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -0
  181. package/build/module/BottomSheetTitle/index.js +2 -0
  182. package/build/module/BottomSheetTitle/index.js.map +1 -0
  183. package/build/module/Button/Button.js +6 -9
  184. package/build/module/Button/Button.js.map +1 -1
  185. package/build/module/Button/index.js +1 -1
  186. package/build/module/Button/index.js.map +1 -1
  187. package/build/module/Button/useVariantStyleMap.js +10 -2
  188. package/build/module/Button/useVariantStyleMap.js.map +1 -1
  189. package/build/module/Checkbox/Checkbox.js +0 -1
  190. package/build/module/Checkbox/Checkbox.js.map +1 -1
  191. package/build/module/Checkbox/index.js +1 -1
  192. package/build/module/Checkbox/index.js.map +1 -1
  193. package/build/module/Checkbox/useVariantStyleMap.js +4 -1
  194. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  195. package/build/module/Chip/index.js +1 -1
  196. package/build/module/Chip/index.js.map +1 -1
  197. package/build/module/Chip/useChipStyle.js +14 -3
  198. package/build/module/Chip/useChipStyle.js.map +1 -1
  199. package/build/module/Dialog/Dialog.js +11 -19
  200. package/build/module/Dialog/Dialog.js.map +1 -1
  201. package/build/module/Dialog/DialogContext.js +7 -0
  202. package/build/module/Dialog/DialogContext.js.map +1 -0
  203. package/build/module/Dialog/index.js +3 -1
  204. package/build/module/Dialog/index.js.map +1 -1
  205. package/build/module/Dialog/useDialogSectionStyle.js +29 -0
  206. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -0
  207. package/build/module/Dialog/useDialogStyle.js +16 -18
  208. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  209. package/build/module/DialogActions/DialogActions.js +18 -3
  210. package/build/module/DialogActions/DialogActions.js.map +1 -1
  211. package/build/module/DialogActions/index.js +1 -1
  212. package/build/module/DialogActions/index.js.map +1 -1
  213. package/build/module/DialogContent/DialogContent.js +4 -1
  214. package/build/module/DialogContent/DialogContent.js.map +1 -1
  215. package/build/module/DialogContent/index.js +1 -1
  216. package/build/module/DialogContent/index.js.map +1 -1
  217. package/build/module/DialogMedia/DialogMedia.js +1 -0
  218. package/build/module/DialogMedia/DialogMedia.js.map +1 -1
  219. package/build/module/DialogMedia/index.js +1 -1
  220. package/build/module/DialogMedia/index.js.map +1 -1
  221. package/build/module/DialogTitle/DialogTitle.js +3 -1
  222. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  223. package/build/module/DialogTitle/index.js +1 -1
  224. package/build/module/DialogTitle/index.js.map +1 -1
  225. package/build/module/Divider/index.js +1 -1
  226. package/build/module/Divider/index.js.map +1 -1
  227. package/build/module/Empty/Empty.js +2 -2
  228. package/build/module/Empty/Empty.js.map +1 -1
  229. package/build/module/IconButton/IconButton.js +25 -3
  230. package/build/module/IconButton/IconButton.js.map +1 -1
  231. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  232. package/build/module/IconButton/index.js +1 -1
  233. package/build/module/IconButton/index.js.map +1 -1
  234. package/build/module/ListItemText/ListItemText.js +4 -4
  235. package/build/module/ListItemText/ListItemText.js.map +1 -1
  236. package/build/module/ListSubheader/ListSubheader.js +2 -2
  237. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  238. package/build/module/Pagination/Pagination.js +0 -4
  239. package/build/module/Pagination/Pagination.js.map +1 -1
  240. package/build/module/Pagination/index.js +1 -1
  241. package/build/module/Pagination/index.js.map +1 -1
  242. package/build/module/Radio/Radio.js +1 -2
  243. package/build/module/Radio/Radio.js.map +1 -1
  244. package/build/module/Radio/index.js +1 -1
  245. package/build/module/Radio/index.js.map +1 -1
  246. package/build/module/RadioGroup/index.js +1 -1
  247. package/build/module/RadioGroup/index.js.map +1 -1
  248. package/build/module/ShadowView/ShadowView.native.js +17 -5
  249. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  250. package/build/module/Snackbar/Snackbar.js +1 -1
  251. package/build/module/Snackbar/Snackbar.js.map +1 -1
  252. package/build/module/Snackbar/index.js +1 -1
  253. package/build/module/Snackbar/index.js.map +1 -1
  254. package/build/module/SnackbarContent/SnackbarContent.js +16 -6
  255. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  256. package/build/module/SnackbarContent/StatusIcon.js +0 -2
  257. package/build/module/SnackbarContent/StatusIcon.js.map +1 -1
  258. package/build/module/SnackbarContent/index.js +1 -1
  259. package/build/module/SnackbarContent/index.js.map +1 -1
  260. package/build/module/SvgIcon/index.js +1 -1
  261. package/build/module/SvgIcon/index.js.map +1 -1
  262. package/build/module/Tab/Tab.js +1 -1
  263. package/build/module/Tab/Tab.js.map +1 -1
  264. package/build/module/Tab/index.js +1 -1
  265. package/build/module/Tab/index.js.map +1 -1
  266. package/build/module/TabBase/index.js +1 -1
  267. package/build/module/TabBase/index.js.map +1 -1
  268. package/build/module/Tabs/Tabs.js +15 -3
  269. package/build/module/Tabs/Tabs.js.map +1 -1
  270. package/build/module/Tabs/TabsProps.js +1 -0
  271. package/build/module/Tabs/TabsProps.js.map +1 -1
  272. package/build/module/Tabs/index.js +1 -1
  273. package/build/module/Tabs/index.js.map +1 -1
  274. package/build/module/TextField/TextField.js +0 -1
  275. package/build/module/TextField/TextField.js.map +1 -1
  276. package/build/module/TextField/index.js +1 -1
  277. package/build/module/TextField/index.js.map +1 -1
  278. package/build/module/Toggle/Toggle.js +5 -3
  279. package/build/module/Toggle/Toggle.js.map +1 -1
  280. package/build/module/Toolbar/Toolbar.js +16 -6
  281. package/build/module/Toolbar/Toolbar.js.map +1 -1
  282. package/build/module/Toolbar/ToolbarProps.js +1 -1
  283. package/build/module/Toolbar/ToolbarProps.js.map +1 -1
  284. package/build/module/Toolbar/index.js.map +1 -1
  285. package/build/module/Tooltip/Tooltip.js +6 -1
  286. package/build/module/Tooltip/Tooltip.js.map +1 -1
  287. package/build/module/Tooltip/index.js +1 -1
  288. package/build/module/Tooltip/index.js.map +1 -1
  289. package/build/module/Typography/index.js +1 -1
  290. package/build/module/Typography/index.js.map +1 -1
  291. package/build/module/index.js +6 -2
  292. package/build/module/index.js.map +1 -1
  293. package/build/module/internal/icons/LoadingSpinner/index.js +13 -4
  294. package/build/module/internal/icons/LoadingSpinner/index.js.map +1 -1
  295. package/build/module/internal/icons/LoadingSpinner/index.native.js +13 -4
  296. package/build/module/internal/icons/LoadingSpinner/index.native.js.map +1 -1
  297. package/build/module/utils/createSvgIcon.js +2 -9
  298. package/build/module/utils/createSvgIcon.js.map +1 -1
  299. package/build/typescript/Accordion/index.d.ts +2 -2
  300. package/build/typescript/AppBar/AppBarProps.d.ts +2 -1
  301. package/build/typescript/Badge/index.d.ts +2 -2
  302. package/build/typescript/BottomSheetActions/BottomSheetActions.d.ts +3 -0
  303. package/build/typescript/BottomSheetActions/BottomSheetActionsProps.d.ts +4 -0
  304. package/build/typescript/BottomSheetActions/index.d.ts +2 -0
  305. package/build/typescript/BottomSheetContent/BottomSheetContent.d.ts +3 -0
  306. package/build/typescript/BottomSheetContent/BottomSheetContentProps.d.ts +4 -0
  307. package/build/typescript/BottomSheetContent/index.d.ts +2 -0
  308. package/build/typescript/BottomSheetTitle/BottomSheetTitle.d.ts +3 -0
  309. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +12 -0
  310. package/build/typescript/BottomSheetTitle/index.d.ts +2 -0
  311. package/build/typescript/Button/index.d.ts +2 -2
  312. package/build/typescript/Checkbox/index.d.ts +2 -2
  313. package/build/typescript/Chip/index.d.ts +2 -2
  314. package/build/typescript/Dialog/DialogContext.d.ts +7 -0
  315. package/build/typescript/Dialog/index.d.ts +4 -2
  316. package/build/typescript/Dialog/useDialogSectionStyle.d.ts +2 -0
  317. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  318. package/build/typescript/DialogActions/index.d.ts +1 -1
  319. package/build/typescript/DialogContent/index.d.ts +2 -2
  320. package/build/typescript/DialogMedia/index.d.ts +2 -2
  321. package/build/typescript/DialogTitle/index.d.ts +2 -2
  322. package/build/typescript/Divider/index.d.ts +2 -2
  323. package/build/typescript/IconButton/IconButtonProps.d.ts +5 -0
  324. package/build/typescript/IconButton/index.d.ts +2 -2
  325. package/build/typescript/Pagination/index.d.ts +2 -2
  326. package/build/typescript/Radio/index.d.ts +2 -2
  327. package/build/typescript/RadioGroup/index.d.ts +1 -1
  328. package/build/typescript/Snackbar/index.d.ts +2 -2
  329. package/build/typescript/SnackbarContent/index.d.ts +2 -2
  330. package/build/typescript/SvgIcon/index.d.ts +2 -2
  331. package/build/typescript/Tab/index.d.ts +2 -2
  332. package/build/typescript/TabBase/index.d.ts +1 -1
  333. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  334. package/build/typescript/Tabs/TabsProps.d.ts +8 -1
  335. package/build/typescript/Tabs/index.d.ts +2 -2
  336. package/build/typescript/TextField/index.d.ts +2 -2
  337. package/build/typescript/Toolbar/ToolbarProps.d.ts +9 -2
  338. package/build/typescript/Tooltip/index.d.ts +2 -2
  339. package/build/typescript/Typography/index.d.ts +2 -2
  340. package/build/typescript/index.d.ts +6 -2
  341. package/build/typescript/internal/icons/Check.d.ts +125 -2
  342. package/build/typescript/internal/icons/CheckCircle.d.ts +125 -2
  343. package/build/typescript/internal/icons/Checkbox.d.ts +125 -2
  344. package/build/typescript/internal/icons/CheckboxChecked.d.ts +125 -2
  345. package/build/typescript/internal/icons/CheckboxOn.d.ts +125 -2
  346. package/build/typescript/internal/icons/ChevronDown.d.ts +125 -2
  347. package/build/typescript/internal/icons/ChevronLeft.d.ts +125 -2
  348. package/build/typescript/internal/icons/ChevronRight.d.ts +125 -2
  349. package/build/typescript/internal/icons/Clear.d.ts +125 -2
  350. package/build/typescript/internal/icons/Close.d.ts +125 -2
  351. package/build/typescript/internal/icons/EyeOff.d.ts +125 -2
  352. package/build/typescript/internal/icons/EyeOn.d.ts +125 -2
  353. package/build/typescript/internal/icons/InfoCircle.d.ts +125 -2
  354. package/build/typescript/internal/icons/Radio.d.ts +125 -2
  355. package/build/typescript/internal/icons/RadioChecked.d.ts +125 -2
  356. package/build/typescript/internal/icons/Search.d.ts +125 -2
  357. package/build/typescript/utils/createSvgIcon.d.ts +1 -5
  358. package/package.json +4 -4
  359. package/src/Accordion/Accordion.tsx +0 -1
  360. package/src/Accordion/index.ts +2 -2
  361. package/src/Accordion/useVariantStyleMap.ts +2 -0
  362. package/src/AppBar/AppBar.tsx +7 -13
  363. package/src/AppBar/AppBarProps.ts +2 -1
  364. package/src/AppBar/index.ts +1 -1
  365. package/src/Badge/index.ts +2 -2
  366. package/src/Badge/useVariantStyleMap.ts +17 -7
  367. package/src/BottomSheetActions/BottomSheetActions.tsx +42 -0
  368. package/src/BottomSheetActions/BottomSheetActionsProps.ts +4 -0
  369. package/src/BottomSheetActions/index.ts +2 -0
  370. package/src/BottomSheetContent/BottomSheetContent.tsx +45 -0
  371. package/src/BottomSheetContent/BottomSheetContentProps.ts +4 -0
  372. package/src/BottomSheetContent/index.ts +2 -0
  373. package/src/BottomSheetTitle/BottomSheetTitle.tsx +83 -0
  374. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +12 -0
  375. package/src/BottomSheetTitle/index.ts +2 -0
  376. package/src/Button/Button.tsx +11 -13
  377. package/src/Button/index.ts +2 -2
  378. package/src/Button/useVariantStyleMap.ts +10 -2
  379. package/src/Checkbox/Checkbox.tsx +0 -1
  380. package/src/Checkbox/index.ts +2 -2
  381. package/src/Checkbox/useVariantStyleMap.ts +3 -0
  382. package/src/Chip/index.ts +2 -2
  383. package/src/Chip/useChipStyle.ts +13 -2
  384. package/src/Dialog/Dialog.tsx +9 -19
  385. package/src/Dialog/DialogContext.tsx +14 -0
  386. package/src/Dialog/index.ts +4 -2
  387. package/src/Dialog/useDialogSectionStyle.ts +31 -0
  388. package/src/Dialog/useDialogStyle.ts +14 -22
  389. package/src/DialogActions/DialogActions.tsx +28 -3
  390. package/src/DialogActions/index.ts +1 -1
  391. package/src/DialogContent/DialogContent.tsx +5 -0
  392. package/src/DialogContent/index.ts +2 -2
  393. package/src/DialogMedia/DialogMedia.tsx +1 -0
  394. package/src/DialogMedia/index.ts +2 -2
  395. package/src/DialogTitle/DialogTitle.tsx +4 -0
  396. package/src/DialogTitle/index.ts +2 -2
  397. package/src/Divider/index.ts +2 -2
  398. package/src/Empty/Empty.tsx +2 -3
  399. package/src/IconButton/IconButton.tsx +33 -3
  400. package/src/IconButton/IconButtonProps.ts +6 -0
  401. package/src/IconButton/index.ts +2 -2
  402. package/src/ListItemText/ListItemText.tsx +4 -4
  403. package/src/ListSubheader/ListSubheader.tsx +2 -2
  404. package/src/Pagination/Pagination.tsx +0 -4
  405. package/src/Pagination/index.ts +2 -2
  406. package/src/Radio/Radio.tsx +1 -4
  407. package/src/Radio/index.ts +2 -2
  408. package/src/RadioGroup/index.ts +1 -1
  409. package/src/ShadowView/ShadowView.native.tsx +21 -10
  410. package/src/Snackbar/Snackbar.tsx +1 -1
  411. package/src/Snackbar/index.ts +2 -2
  412. package/src/SnackbarContent/SnackbarContent.tsx +21 -11
  413. package/src/SnackbarContent/StatusIcon.tsx +0 -2
  414. package/src/SnackbarContent/index.ts +2 -2
  415. package/src/SvgIcon/index.ts +2 -2
  416. package/src/Tab/Tab.tsx +1 -1
  417. package/src/Tab/index.ts +2 -2
  418. package/src/TabBase/index.ts +1 -1
  419. package/src/Tabs/Tabs.tsx +17 -3
  420. package/src/Tabs/TabsProps.ts +10 -1
  421. package/src/Tabs/index.ts +2 -2
  422. package/src/TextField/TextField.tsx +0 -1
  423. package/src/TextField/index.tsx +2 -2
  424. package/src/Toggle/Toggle.tsx +7 -5
  425. package/src/Toolbar/Toolbar.tsx +13 -6
  426. package/src/Toolbar/ToolbarProps.ts +11 -2
  427. package/src/Toolbar/index.ts +1 -1
  428. package/src/Tooltip/Tooltip.tsx +6 -1
  429. package/src/Tooltip/index.ts +2 -2
  430. package/src/Typography/index.ts +2 -2
  431. package/src/index.ts +9 -3
  432. package/src/internal/icons/LoadingSpinner/index.native.tsx +17 -7
  433. package/src/internal/icons/LoadingSpinner/index.tsx +17 -7
  434. package/src/utils/createSvgIcon.tsx +3 -21
  435. package/build/commonjs/Accordion/LegacyAccordion.js +0 -171
  436. package/build/commonjs/Accordion/LegacyAccordion.js.map +0 -1
  437. package/build/commonjs/Accordion/LegacyAccordionProps.js +0 -2
  438. package/build/commonjs/Accordion/LegacyAccordionProps.js.map +0 -1
  439. package/build/commonjs/Badge/LegacyBadge.js +0 -61
  440. package/build/commonjs/Badge/LegacyBadge.js.map +0 -1
  441. package/build/commonjs/Badge/LegacyBadgeProps.js +0 -2
  442. package/build/commonjs/Badge/LegacyBadgeProps.js.map +0 -1
  443. package/build/commonjs/Button/LegacyButton.js +0 -144
  444. package/build/commonjs/Button/LegacyButton.js.map +0 -1
  445. package/build/commonjs/Button/LegacyButtonProps.js +0 -2
  446. package/build/commonjs/Button/LegacyButtonProps.js.map +0 -1
  447. package/build/commonjs/Checkbox/LegacyCheckbox.js +0 -65
  448. package/build/commonjs/Checkbox/LegacyCheckbox.js.map +0 -1
  449. package/build/commonjs/Checkbox/LegacyCheckboxProps.js +0 -2
  450. package/build/commonjs/Checkbox/LegacyCheckboxProps.js.map +0 -1
  451. package/build/commonjs/CheckboxGroup/CheckboxGroup.js +0 -50
  452. package/build/commonjs/CheckboxGroup/CheckboxGroup.js.map +0 -1
  453. package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js +0 -2
  454. package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js.map +0 -1
  455. package/build/commonjs/CheckboxGroup/index.js.map +0 -1
  456. package/build/commonjs/Chip/LegacyChip.js +0 -98
  457. package/build/commonjs/Chip/LegacyChip.js.map +0 -1
  458. package/build/commonjs/Chip/LegacyChipProps.js +0 -2
  459. package/build/commonjs/Chip/LegacyChipProps.js.map +0 -1
  460. package/build/commonjs/Dialog/LegacyDialog.js +0 -181
  461. package/build/commonjs/Dialog/LegacyDialog.js.map +0 -1
  462. package/build/commonjs/Dialog/LegacyDialogProps.js +0 -2
  463. package/build/commonjs/Dialog/LegacyDialogProps.js.map +0 -1
  464. package/build/commonjs/DialogActions/LegacyDialogActions.js +0 -30
  465. package/build/commonjs/DialogActions/LegacyDialogActions.js.map +0 -1
  466. package/build/commonjs/DialogContent/LegacyDialogContent.js +0 -36
  467. package/build/commonjs/DialogContent/LegacyDialogContent.js.map +0 -1
  468. package/build/commonjs/DialogContent/LegacyDialogContentProps.js +0 -2
  469. package/build/commonjs/DialogContent/LegacyDialogContentProps.js.map +0 -1
  470. package/build/commonjs/DialogMedia/LegacyDialogMedia.js +0 -33
  471. package/build/commonjs/DialogMedia/LegacyDialogMedia.js.map +0 -1
  472. package/build/commonjs/DialogMedia/LegacyDialogMediaProps.js +0 -2
  473. package/build/commonjs/DialogMedia/LegacyDialogMediaProps.js.map +0 -1
  474. package/build/commonjs/DialogTitle/LegacyDialogTitle.js +0 -36
  475. package/build/commonjs/DialogTitle/LegacyDialogTitle.js.map +0 -1
  476. package/build/commonjs/DialogTitle/LegacyDialogTitleProps.js +0 -2
  477. package/build/commonjs/DialogTitle/LegacyDialogTitleProps.js.map +0 -1
  478. package/build/commonjs/Divider/LegacyDivider.js +0 -114
  479. package/build/commonjs/Divider/LegacyDivider.js.map +0 -1
  480. package/build/commonjs/Divider/LegacyDividerProps.js +0 -2
  481. package/build/commonjs/Divider/LegacyDividerProps.js.map +0 -1
  482. package/build/commonjs/IconButton/LegacyIconButton.js +0 -89
  483. package/build/commonjs/IconButton/LegacyIconButton.js.map +0 -1
  484. package/build/commonjs/IconButton/LegacyIconButtonProps.js +0 -2
  485. package/build/commonjs/IconButton/LegacyIconButtonProps.js.map +0 -1
  486. package/build/commonjs/Pagination/LegacyPagination.js +0 -145
  487. package/build/commonjs/Pagination/LegacyPagination.js.map +0 -1
  488. package/build/commonjs/Pagination/LegacyPaginationProps.js +0 -2
  489. package/build/commonjs/Pagination/LegacyPaginationProps.js.map +0 -1
  490. package/build/commonjs/PaginationItem/LegacyPaginationItem.js.map +0 -1
  491. package/build/commonjs/Radio/LegacyRadio.js +0 -82
  492. package/build/commonjs/Radio/LegacyRadio.js.map +0 -1
  493. package/build/commonjs/Radio/LegacyRadioProps.js +0 -2
  494. package/build/commonjs/Radio/LegacyRadioProps.js.map +0 -1
  495. package/build/commonjs/RadioGroup/LegacyRadioGroup.js +0 -31
  496. package/build/commonjs/RadioGroup/LegacyRadioGroup.js.map +0 -1
  497. package/build/commonjs/Snackbar/LegacySnackbar.js +0 -134
  498. package/build/commonjs/Snackbar/LegacySnackbar.js.map +0 -1
  499. package/build/commonjs/Snackbar/LegacySnackbarProps.js +0 -2
  500. package/build/commonjs/Snackbar/LegacySnackbarProps.js.map +0 -1
  501. package/build/commonjs/SnackbarContent/LegacySnackbarContent.js +0 -105
  502. package/build/commonjs/SnackbarContent/LegacySnackbarContent.js.map +0 -1
  503. package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js +0 -2
  504. package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js.map +0 -1
  505. package/build/commonjs/SvgIcon/LegacySvgIcon.js.map +0 -1
  506. package/build/commonjs/SvgIcon/LegacySvgIconProps.js +0 -2
  507. package/build/commonjs/SvgIcon/LegacySvgIconProps.js.map +0 -1
  508. package/build/commonjs/Tab/LegacyTab.js +0 -126
  509. package/build/commonjs/Tab/LegacyTab.js.map +0 -1
  510. package/build/commonjs/Tab/LegacyTabProps.js +0 -2
  511. package/build/commonjs/Tab/LegacyTabProps.js.map +0 -1
  512. package/build/commonjs/Tab/TabIndicator.js +0 -44
  513. package/build/commonjs/Tab/TabIndicator.js.map +0 -1
  514. package/build/commonjs/TabBase/LegacyTabBase.js +0 -57
  515. package/build/commonjs/TabBase/LegacyTabBase.js.map +0 -1
  516. package/build/commonjs/Tabs/LegacyTabIndicator.js +0 -120
  517. package/build/commonjs/Tabs/LegacyTabIndicator.js.map +0 -1
  518. package/build/commonjs/Tabs/LegacyTabIndicatorProps.js +0 -2
  519. package/build/commonjs/Tabs/LegacyTabIndicatorProps.js.map +0 -1
  520. package/build/commonjs/Tabs/LegacyTabs.js +0 -207
  521. package/build/commonjs/Tabs/LegacyTabs.js.map +0 -1
  522. package/build/commonjs/Tabs/LegacyTabsProps.js +0 -2
  523. package/build/commonjs/Tabs/LegacyTabsProps.js.map +0 -1
  524. package/build/commonjs/TextField/LegacyTextField.js +0 -195
  525. package/build/commonjs/TextField/LegacyTextField.js.map +0 -1
  526. package/build/commonjs/TextField/LegacyTextFieldProps.js +0 -2
  527. package/build/commonjs/TextField/LegacyTextFieldProps.js.map +0 -1
  528. package/build/commonjs/TextField/OutlinedTextField.js +0 -190
  529. package/build/commonjs/TextField/OutlinedTextField.js.map +0 -1
  530. package/build/commonjs/Tooltip/LegacyTooltip.js +0 -147
  531. package/build/commonjs/Tooltip/LegacyTooltip.js.map +0 -1
  532. package/build/commonjs/Tooltip/LegacyTooltipProps.js +0 -2
  533. package/build/commonjs/Tooltip/LegacyTooltipProps.js.map +0 -1
  534. package/build/commonjs/Tooltip/UpArrow.js +0 -34
  535. package/build/commonjs/Tooltip/UpArrow.js.map +0 -1
  536. package/build/commonjs/Tooltip/UpArrowProps.js +0 -2
  537. package/build/commonjs/Tooltip/UpArrowProps.js.map +0 -1
  538. package/build/commonjs/Typography/LegacyTypography.js +0 -142
  539. package/build/commonjs/Typography/LegacyTypography.js.map +0 -1
  540. package/build/commonjs/Typography/LegacyTypographyProps.js +0 -2
  541. package/build/commonjs/Typography/LegacyTypographyProps.js.map +0 -1
  542. package/build/module/Accordion/LegacyAccordion.js +0 -148
  543. package/build/module/Accordion/LegacyAccordion.js.map +0 -1
  544. package/build/module/Accordion/LegacyAccordionProps.js +0 -2
  545. package/build/module/Accordion/LegacyAccordionProps.js.map +0 -1
  546. package/build/module/Badge/LegacyBadge.js +0 -48
  547. package/build/module/Badge/LegacyBadge.js.map +0 -1
  548. package/build/module/Badge/LegacyBadgeProps.js +0 -2
  549. package/build/module/Badge/LegacyBadgeProps.js.map +0 -1
  550. package/build/module/Button/LegacyButton.js +0 -127
  551. package/build/module/Button/LegacyButton.js.map +0 -1
  552. package/build/module/Button/LegacyButtonProps.js +0 -2
  553. package/build/module/Button/LegacyButtonProps.js.map +0 -1
  554. package/build/module/Checkbox/LegacyCheckbox.js +0 -52
  555. package/build/module/Checkbox/LegacyCheckbox.js.map +0 -1
  556. package/build/module/Checkbox/LegacyCheckboxProps.js +0 -2
  557. package/build/module/Checkbox/LegacyCheckboxProps.js.map +0 -1
  558. package/build/module/CheckboxGroup/CheckboxGroup.js +0 -34
  559. package/build/module/CheckboxGroup/CheckboxGroup.js.map +0 -1
  560. package/build/module/CheckboxGroup/CheckboxGroupProps.js +0 -2
  561. package/build/module/CheckboxGroup/CheckboxGroupProps.js.map +0 -1
  562. package/build/module/CheckboxGroup/index.js +0 -2
  563. package/build/module/CheckboxGroup/index.js.map +0 -1
  564. package/build/module/Chip/LegacyChip.js +0 -84
  565. package/build/module/Chip/LegacyChip.js.map +0 -1
  566. package/build/module/Chip/LegacyChipProps.js +0 -2
  567. package/build/module/Chip/LegacyChipProps.js.map +0 -1
  568. package/build/module/Dialog/LegacyDialog.js +0 -160
  569. package/build/module/Dialog/LegacyDialog.js.map +0 -1
  570. package/build/module/Dialog/LegacyDialogProps.js +0 -2
  571. package/build/module/Dialog/LegacyDialogProps.js.map +0 -1
  572. package/build/module/DialogActions/LegacyDialogActions.js +0 -17
  573. package/build/module/DialogActions/LegacyDialogActions.js.map +0 -1
  574. package/build/module/DialogContent/LegacyDialogContent.js +0 -22
  575. package/build/module/DialogContent/LegacyDialogContent.js.map +0 -1
  576. package/build/module/DialogContent/LegacyDialogContentProps.js +0 -2
  577. package/build/module/DialogContent/LegacyDialogContentProps.js.map +0 -1
  578. package/build/module/DialogMedia/LegacyDialogMedia.js +0 -21
  579. package/build/module/DialogMedia/LegacyDialogMedia.js.map +0 -1
  580. package/build/module/DialogMedia/LegacyDialogMediaProps.js +0 -2
  581. package/build/module/DialogMedia/LegacyDialogMediaProps.js.map +0 -1
  582. package/build/module/DialogTitle/LegacyDialogTitle.js +0 -22
  583. package/build/module/DialogTitle/LegacyDialogTitle.js.map +0 -1
  584. package/build/module/DialogTitle/LegacyDialogTitleProps.js +0 -2
  585. package/build/module/DialogTitle/LegacyDialogTitleProps.js.map +0 -1
  586. package/build/module/Divider/LegacyDivider.js +0 -100
  587. package/build/module/Divider/LegacyDivider.js.map +0 -1
  588. package/build/module/Divider/LegacyDividerProps.js +0 -2
  589. package/build/module/Divider/LegacyDividerProps.js.map +0 -1
  590. package/build/module/IconButton/LegacyIconButton.js +0 -74
  591. package/build/module/IconButton/LegacyIconButton.js.map +0 -1
  592. package/build/module/IconButton/LegacyIconButtonProps.js +0 -2
  593. package/build/module/IconButton/LegacyIconButtonProps.js.map +0 -1
  594. package/build/module/Pagination/LegacyPagination.js +0 -129
  595. package/build/module/Pagination/LegacyPagination.js.map +0 -1
  596. package/build/module/Pagination/LegacyPaginationProps.js +0 -2
  597. package/build/module/Pagination/LegacyPaginationProps.js.map +0 -1
  598. package/build/module/PaginationItem/LegacyPaginationItem.js.map +0 -1
  599. package/build/module/Radio/LegacyRadio.js +0 -63
  600. package/build/module/Radio/LegacyRadio.js.map +0 -1
  601. package/build/module/Radio/LegacyRadioProps.js +0 -2
  602. package/build/module/Radio/LegacyRadioProps.js.map +0 -1
  603. package/build/module/RadioGroup/LegacyRadioGroup.js +0 -18
  604. package/build/module/RadioGroup/LegacyRadioGroup.js.map +0 -1
  605. package/build/module/Snackbar/LegacySnackbar.js +0 -107
  606. package/build/module/Snackbar/LegacySnackbar.js.map +0 -1
  607. package/build/module/Snackbar/LegacySnackbarProps.js +0 -2
  608. package/build/module/Snackbar/LegacySnackbarProps.js.map +0 -1
  609. package/build/module/SnackbarContent/LegacySnackbarContent.js +0 -84
  610. package/build/module/SnackbarContent/LegacySnackbarContent.js.map +0 -1
  611. package/build/module/SnackbarContent/LegacySnackbarContentProps.js +0 -2
  612. package/build/module/SnackbarContent/LegacySnackbarContentProps.js.map +0 -1
  613. package/build/module/SvgIcon/LegacySvgIcon.js +0 -30
  614. package/build/module/SvgIcon/LegacySvgIcon.js.map +0 -1
  615. package/build/module/SvgIcon/LegacySvgIconProps.js +0 -2
  616. package/build/module/SvgIcon/LegacySvgIconProps.js.map +0 -1
  617. package/build/module/Tab/LegacyTab.js +0 -105
  618. package/build/module/Tab/LegacyTab.js.map +0 -1
  619. package/build/module/Tab/LegacyTabProps.js +0 -2
  620. package/build/module/Tab/LegacyTabProps.js.map +0 -1
  621. package/build/module/Tab/TabIndicator.js +0 -31
  622. package/build/module/Tab/TabIndicator.js.map +0 -1
  623. package/build/module/TabBase/LegacyTabBase.js +0 -44
  624. package/build/module/TabBase/LegacyTabBase.js.map +0 -1
  625. package/build/module/Tabs/LegacyTabIndicator.js +0 -99
  626. package/build/module/Tabs/LegacyTabIndicator.js.map +0 -1
  627. package/build/module/Tabs/LegacyTabIndicatorProps.js +0 -2
  628. package/build/module/Tabs/LegacyTabIndicatorProps.js.map +0 -1
  629. package/build/module/Tabs/LegacyTabs.js +0 -182
  630. package/build/module/Tabs/LegacyTabs.js.map +0 -1
  631. package/build/module/Tabs/LegacyTabsProps.js +0 -2
  632. package/build/module/Tabs/LegacyTabsProps.js.map +0 -1
  633. package/build/module/TextField/LegacyTextField.js +0 -169
  634. package/build/module/TextField/LegacyTextField.js.map +0 -1
  635. package/build/module/TextField/LegacyTextFieldProps.js +0 -2
  636. package/build/module/TextField/LegacyTextFieldProps.js.map +0 -1
  637. package/build/module/TextField/OutlinedTextField.js +0 -174
  638. package/build/module/TextField/OutlinedTextField.js.map +0 -1
  639. package/build/module/Tooltip/LegacyTooltip.js +0 -121
  640. package/build/module/Tooltip/LegacyTooltip.js.map +0 -1
  641. package/build/module/Tooltip/LegacyTooltipProps.js +0 -2
  642. package/build/module/Tooltip/LegacyTooltipProps.js.map +0 -1
  643. package/build/module/Tooltip/UpArrow.js +0 -22
  644. package/build/module/Tooltip/UpArrow.js.map +0 -1
  645. package/build/module/Tooltip/UpArrowProps.js +0 -2
  646. package/build/module/Tooltip/UpArrowProps.js.map +0 -1
  647. package/build/module/Typography/LegacyTypography.js +0 -126
  648. package/build/module/Typography/LegacyTypography.js.map +0 -1
  649. package/build/module/Typography/LegacyTypographyProps.js +0 -2
  650. package/build/module/Typography/LegacyTypographyProps.js.map +0 -1
  651. package/build/typescript/Accordion/LegacyAccordion.d.ts +0 -3
  652. package/build/typescript/Accordion/LegacyAccordionProps.d.ts +0 -28
  653. package/build/typescript/Badge/LegacyBadge.d.ts +0 -3
  654. package/build/typescript/Badge/LegacyBadgeProps.d.ts +0 -34
  655. package/build/typescript/Button/LegacyButton.d.ts +0 -3
  656. package/build/typescript/Button/LegacyButtonProps.d.ts +0 -51
  657. package/build/typescript/Checkbox/LegacyCheckbox.d.ts +0 -3
  658. package/build/typescript/Checkbox/LegacyCheckboxProps.d.ts +0 -36
  659. package/build/typescript/CheckboxGroup/CheckboxGroup.d.ts +0 -3
  660. package/build/typescript/CheckboxGroup/CheckboxGroupProps.d.ts +0 -11
  661. package/build/typescript/CheckboxGroup/index.d.ts +0 -2
  662. package/build/typescript/Chip/LegacyChip.d.ts +0 -3
  663. package/build/typescript/Chip/LegacyChipProps.d.ts +0 -28
  664. package/build/typescript/Dialog/LegacyDialog.d.ts +0 -3
  665. package/build/typescript/Dialog/LegacyDialogProps.d.ts +0 -25
  666. package/build/typescript/DialogActions/LegacyDialogActions.d.ts +0 -3
  667. package/build/typescript/DialogContent/LegacyDialogContent.d.ts +0 -3
  668. package/build/typescript/DialogContent/LegacyDialogContentProps.d.ts +0 -10
  669. package/build/typescript/DialogMedia/LegacyDialogMedia.d.ts +0 -3
  670. package/build/typescript/DialogMedia/LegacyDialogMediaProps.d.ts +0 -15
  671. package/build/typescript/DialogTitle/LegacyDialogTitle.d.ts +0 -3
  672. package/build/typescript/DialogTitle/LegacyDialogTitleProps.d.ts +0 -15
  673. package/build/typescript/Divider/LegacyDivider.d.ts +0 -3
  674. package/build/typescript/Divider/LegacyDividerProps.d.ts +0 -41
  675. package/build/typescript/IconButton/LegacyIconButton.d.ts +0 -3
  676. package/build/typescript/IconButton/LegacyIconButtonProps.d.ts +0 -30
  677. package/build/typescript/Pagination/LegacyPagination.d.ts +0 -3
  678. package/build/typescript/Pagination/LegacyPaginationProps.d.ts +0 -71
  679. package/build/typescript/PaginationItem/LegacyPaginationItem.d.ts +0 -5
  680. package/build/typescript/Radio/LegacyRadio.d.ts +0 -3
  681. package/build/typescript/Radio/LegacyRadioProps.d.ts +0 -43
  682. package/build/typescript/RadioGroup/LegacyRadioGroup.d.ts +0 -3
  683. package/build/typescript/Snackbar/LegacySnackbar.d.ts +0 -3
  684. package/build/typescript/Snackbar/LegacySnackbarProps.d.ts +0 -51
  685. package/build/typescript/SnackbarContent/LegacySnackbarContent.d.ts +0 -3
  686. package/build/typescript/SnackbarContent/LegacySnackbarContentProps.d.ts +0 -26
  687. package/build/typescript/SvgIcon/LegacySvgIcon.d.ts +0 -3
  688. package/build/typescript/SvgIcon/LegacySvgIconProps.d.ts +0 -35
  689. package/build/typescript/Tab/LegacyTab.d.ts +0 -3
  690. package/build/typescript/Tab/LegacyTabProps.d.ts +0 -58
  691. package/build/typescript/Tab/TabIndicator.d.ts +0 -7
  692. package/build/typescript/TabBase/LegacyTabBase.d.ts +0 -3
  693. package/build/typescript/Tabs/LegacyTabIndicator.d.ts +0 -3
  694. package/build/typescript/Tabs/LegacyTabIndicatorProps.d.ts +0 -32
  695. package/build/typescript/Tabs/LegacyTabs.d.ts +0 -5
  696. package/build/typescript/Tabs/LegacyTabsProps.d.ts +0 -79
  697. package/build/typescript/TextField/LegacyTextField.d.ts +0 -5
  698. package/build/typescript/TextField/LegacyTextFieldProps.d.ts +0 -67
  699. package/build/typescript/TextField/OutlinedTextField.d.ts +0 -17
  700. package/build/typescript/Tooltip/LegacyTooltip.d.ts +0 -3
  701. package/build/typescript/Tooltip/LegacyTooltipProps.d.ts +0 -72
  702. package/build/typescript/Tooltip/UpArrow.d.ts +0 -5
  703. package/build/typescript/Tooltip/UpArrowProps.d.ts +0 -17
  704. package/build/typescript/Typography/LegacyTypography.d.ts +0 -5
  705. package/build/typescript/Typography/LegacyTypographyProps.d.ts +0 -81
  706. package/src/Accordion/LegacyAccordion.tsx +0 -188
  707. package/src/Accordion/LegacyAccordionProps.ts +0 -34
  708. package/src/Badge/LegacyBadge.tsx +0 -66
  709. package/src/Badge/LegacyBadgeProps.ts +0 -40
  710. package/src/Button/LegacyButton.tsx +0 -157
  711. package/src/Button/LegacyButtonProps.ts +0 -62
  712. package/src/Checkbox/LegacyCheckbox.tsx +0 -62
  713. package/src/Checkbox/LegacyCheckboxProps.ts +0 -42
  714. package/src/CheckboxGroup/CheckboxGroup.tsx +0 -47
  715. package/src/CheckboxGroup/CheckboxGroupProps.ts +0 -11
  716. package/src/CheckboxGroup/index.ts +0 -2
  717. package/src/Chip/LegacyChip.tsx +0 -116
  718. package/src/Chip/LegacyChipProps.ts +0 -33
  719. package/src/Dialog/LegacyDialog.tsx +0 -198
  720. package/src/Dialog/LegacyDialogProps.ts +0 -28
  721. package/src/DialogActions/LegacyDialogActions.tsx +0 -23
  722. package/src/DialogContent/LegacyDialogContent.tsx +0 -30
  723. package/src/DialogContent/LegacyDialogContentProps.ts +0 -10
  724. package/src/DialogMedia/LegacyDialogMedia.tsx +0 -21
  725. package/src/DialogMedia/LegacyDialogMediaProps.ts +0 -16
  726. package/src/DialogTitle/LegacyDialogTitle.tsx +0 -30
  727. package/src/DialogTitle/LegacyDialogTitleProps.ts +0 -16
  728. package/src/Divider/LegacyDivider.tsx +0 -114
  729. package/src/Divider/LegacyDividerProps.ts +0 -48
  730. package/src/IconButton/LegacyIconButton.tsx +0 -97
  731. package/src/IconButton/LegacyIconButtonProps.ts +0 -36
  732. package/src/Pagination/LegacyPagination.tsx +0 -168
  733. package/src/Pagination/LegacyPaginationProps.ts +0 -85
  734. package/src/PaginationItem/LegacyPaginationItem.tsx +0 -52
  735. package/src/Radio/LegacyRadio.tsx +0 -72
  736. package/src/Radio/LegacyRadioProps.ts +0 -50
  737. package/src/RadioGroup/LegacyRadioGroup.tsx +0 -20
  738. package/src/Snackbar/LegacySnackbar.tsx +0 -130
  739. package/src/Snackbar/LegacySnackbarProps.ts +0 -61
  740. package/src/SnackbarContent/LegacySnackbarContent.tsx +0 -129
  741. package/src/SnackbarContent/LegacySnackbarContentProps.ts +0 -30
  742. package/src/SvgIcon/LegacySvgIcon.tsx +0 -36
  743. package/src/SvgIcon/LegacySvgIconProps.ts +0 -41
  744. package/src/Tab/LegacyTab.tsx +0 -141
  745. package/src/Tab/LegacyTabProps.ts +0 -68
  746. package/src/Tab/TabIndicator.tsx +0 -38
  747. package/src/TabBase/LegacyTabBase.tsx +0 -55
  748. package/src/Tabs/LegacyTabIndicator.tsx +0 -112
  749. package/src/Tabs/LegacyTabIndicatorProps.ts +0 -37
  750. package/src/Tabs/LegacyTabs.tsx +0 -227
  751. package/src/Tabs/LegacyTabsProps.ts +0 -93
  752. package/src/TextField/LegacyTextField.tsx +0 -168
  753. package/src/TextField/LegacyTextFieldProps.ts +0 -80
  754. package/src/TextField/OutlinedTextField.tsx +0 -234
  755. package/src/Tooltip/LegacyTooltip.tsx +0 -167
  756. package/src/Tooltip/LegacyTooltipProps.ts +0 -86
  757. package/src/Tooltip/UpArrow.tsx +0 -21
  758. package/src/Tooltip/UpArrowProps.ts +0 -19
  759. package/src/Typography/LegacyTypography.tsx +0 -107
  760. package/src/Typography/LegacyTypographyProps.ts +0 -122
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","createFontStyle","useTheme","useChipStyle","size","startElementVariant","isEndElement","theme","fontStyleMap","small","color","palette","text","strong","large","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 // TODO: select typography.\n // selector: (typography) => typography.caption1.medium,\n color: theme.palette.text.strong,\n }),\n large: createFontStyle(theme, {\n // TODO: select typography.\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 height: 'fit-content',\n overflow: 'hidden',\n width: 'fit-content',\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;QAC1B;QACA;QACAG,KAAK,EAAEH,KAAK,CAACI,OAAN,CAAcC,IAAd,CAAmBC;MAHA,CAAR,CADwB;MAM9CC,KAAK,EAAEb,eAAe,CAACM,KAAD,EAAQ;QAC1B;QACA;QACAG,KAAK,EAAEH,KAAK,CAACI,OAAN,CAAcC,IAAd,CAAmBC;MAHA,CAAR;IANwB,CAAlD;IAaA,MAAME,kBAAqD,GAAG;MAC1DN,KAAK,EAAE;QACHO,MAAM,EAAE,EADL;QAEHC,UAAU,EAAEV,KAAK,CAACW,OAAN,CAAc,CAAd,CAFT;QAGHC,KAAK,EAAE;MAHJ,CADmD;MAM1DL,KAAK,EAAE;QACHE,MAAM,EAAE,EADL;QAEHC,UAAU,EAAEV,KAAK,CAACW,OAAN,CAAc,GAAd,CAFT;QAGHC,KAAK,EAAE;MAHJ;IANmD,CAA9D;IAaA,MAAMC,kBAAmC,GAAG;MACxCC,UAAU,EAAE,QAD4B;MAExCC,eAAe,EAAEf,KAAK,CAACI,OAAN,CAAcY,IAAd,CAAmBC,MAFI;MAGxCC,YAAY,EAAElB,KAAK,CAACmB,KAAN,CAAYC,MAAZ,CAAmBC,IAHO;MAIxCC,aAAa,EAAE,KAJyB;MAKxCb,MAAM,EAAE,aALgC;MAMxCc,QAAQ,EAAE,QAN8B;MAOxCX,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yOf","useChipStyle","size","startElementVariant","isEndElement","theme","fontStyleMap","small","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","palette","text","strong","large","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';\nimport { typographyOf } from '@fountain-ui/styles';\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 // TODO: select typography.\n // selector: (typography) => typography.caption1.medium,\n selector: (_) => typographyOf({\n fontSize: 12,\n lineHeight: 16.8,\n fontFamily: 'Pretendard-Medium',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n large: createFontStyle(theme, {\n // TODO: select typography.\n // selector: (typography) => typography.body2.medium,\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 21,\n fontFamily: 'Pretendard-Medium',\n letterSpacing: 0,\n }),\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,OAA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Y,4BAAEN,eAAe,CAACjC,mBAAD,CAAjB,2DAAE,uBAAsCuC;IARjD,CAAP;EAUH,CA5Ga,EA4GX,CAACrC,KAAD,EAAQH,IAAR,EAAcC,mBAAd,CA5GW,CAAd;AA6GH"}
@@ -1,13 +1,12 @@
1
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
2
 
3
- import React, { Children, useMemo, useState } from 'react';
3
+ import React, { useMemo, useState } from 'react';
4
4
  import { useWindowDimensions } from 'react-native';
5
5
  import { css } from '@fountain-ui/styles';
6
6
  import Column from '../Column';
7
- import DialogMedia from '../DialogMedia/DialogMedia';
8
7
  import Modal, { ANIMATION_TYPE } from '../Modal';
9
- import Paper from '../Paper';
10
- import { cloneElementSafely } from '../utils';
8
+ import ShadowView from '../ShadowView';
9
+ import { DialogProvider } from './DialogContext';
11
10
  import useDialogStyle from './useDialogStyle';
12
11
  const TOP_ELEMENT_OFFSET = 20;
13
12
  export default function Dialog(props) {
@@ -95,16 +94,6 @@ export default function Dialog(props) {
95
94
  const initialOpacity = animationType === ANIMATION_TYPE.SLIDE && fullScreen ? 1 : undefined;
96
95
  const initialTranslateY = animationType === ANIMATION_TYPE.FADE ? 0 : undefined;
97
96
  const paperStyle = css([styles.paper, styleProp]);
98
- const contents = Children.map(children, child => {
99
- // @ts-ignore
100
- if (child.type === DialogMedia) {
101
- return cloneElementSafely(child, {
102
- style: styles.mediaWrapper
103
- });
104
- }
105
-
106
- return child;
107
- });
108
97
  return /*#__PURE__*/React.createElement(Modal, _extends({
109
98
  animationStyle: styles.container,
110
99
  closeAnimation: closeAnimation,
@@ -116,16 +105,19 @@ export default function Dialog(props) {
116
105
  offsetAnimation: offsetAnimation,
117
106
  visible: visible,
118
107
  style: styles.root
119
- }, otherProps), /*#__PURE__*/React.createElement(React.Fragment, null, topElement ? /*#__PURE__*/React.createElement(Column, {
108
+ }, otherProps), /*#__PURE__*/React.createElement(DialogProvider, {
109
+ value: {
110
+ size
111
+ }
112
+ }, topElement ? /*#__PURE__*/React.createElement(Column, {
120
113
  style: fullScreen ? undefined : styles.topElementContainer
121
114
  }, /*#__PURE__*/React.createElement(Column, {
122
115
  style: styles.topElementContent,
123
116
  onLayout: handleTopElementLayout
124
- }, topElement)) : null, /*#__PURE__*/React.createElement(Paper, {
125
- elevation: 6,
126
- square: fullScreen,
117
+ }, topElement)) : null, /*#__PURE__*/React.createElement(ShadowView, {
118
+ variant: 600,
127
119
  style: paperStyle
128
- }, contents)));
120
+ }, children)));
129
121
  }
130
122
  ;
131
123
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Children","useMemo","useState","useWindowDimensions","css","Column","DialogMedia","Modal","ANIMATION_TYPE","Paper","cloneElementSafely","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","contents","map","child","mediaWrapper","container","root","topElementContainer","topElementContent"],"sources":["Dialog.tsx"],"sourcesContent":["import React, { Children, useMemo, useState } from 'react';\nimport { LayoutChangeEvent, useWindowDimensions } from 'react-native';\nimport { css } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport DialogMedia from '../DialogMedia/DialogMedia';\nimport Modal, { ANIMATION_TYPE, AnimationUnit } from '../Modal';\nimport Paper from '../Paper';\nimport { cloneElementSafely, FalsyReactElement } from '../utils';\nimport type DialogProps from './DialogProps';\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 const contents = Children.map(children, (child) => {\n // @ts-ignore\n if (child.type === DialogMedia) {\n return cloneElementSafely(child as FalsyReactElement, { style: styles.mediaWrapper });\n }\n return child;\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 <React.Fragment>\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 <Paper\n elevation={6}\n square={fullScreen}\n style={paperStyle}\n >\n {contents}\n </Paper>\n </React.Fragment>\n </Modal>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,OAA1B,EAAmCC,QAAnC,QAAmD,OAAnD;AACA,SAA4BC,mBAA5B,QAAuD,cAAvD;AACA,SAASC,GAAT,QAAoB,qBAApB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,WAAP,MAAwB,4BAAxB;AACA,OAAOC,KAAP,IAAgBC,cAAhB,QAAqD,UAArD;AACA,OAAOC,KAAP,MAAkB,UAAlB;AACA,SAASC,kBAAT,QAAsD,UAAtD;AAEA,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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AAwBkC,KAAD,IAAW;IAC/C;IACA,IAAIA,KAAK,CAACb,IAAN,KAAehC,WAAnB,EAAgC;MAC5B,OAAOI,kBAAkB,CAACyC,KAAD,EAA6B;QAAE9B,KAAK,EAAEM,MAAM,CAACyB;MAAhB,CAA7B,CAAzB;IACH;;IACD,OAAOD,KAAP;EACH,CANgB,CAAjB;EAQA,oBACI,oBAAC,KAAD;IACI,cAAc,EAAExB,MAAM,CAAC0B,SAD3B;IAEI,cAAc,EAAEd,cAFpB;IAGI,YAAY,EAAEpB,YAAY,IAAIJ,aAAa,KAAKP,cAAc,CAACgC,IAHnE;IAII,cAAc,EAAEI,cAJpB;IAKI,iBAAiB,EAAEE,iBALvB;IAMI,OAAO,EAAE1B,OANb;IAOI,aAAa,EAAEsB,aAPnB;IAQI,eAAe,EAAEN,eARrB;IASI,OAAO,EAAEZ,OATb;IAUI,KAAK,EAAEG,MAAM,CAAC2B;EAVlB,GAWQ5B,UAXR,gBAaI,oBAAC,KAAD,CAAO,QAAP,QACKD,UAAU,gBACP,oBAAC,MAAD;IAAQ,KAAK,EAAEP,UAAU,GAAG2B,SAAH,GAAelB,MAAM,CAAC4B;EAA/C,gBACI,oBAAC,MAAD;IACI,KAAK,EAAE5B,MAAM,CAAC6B,iBADlB;IAEI,QAAQ,EAAExB;EAFd,GAIKP,UAJL,CADJ,CADO,GASP,IAVR,eAYI,oBAAC,KAAD;IACI,SAAS,EAAE,CADf;IAEI,MAAM,EAAEP,UAFZ;IAGI,KAAK,EAAE6B;EAHX,GAKKE,QALL,CAZJ,CAbJ,CADJ;AAoCH;AAAA"}
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;AAC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2D2B,SAAlF;EAEA,MAAMC,iBAAiB,GAAG/B,aAAa,KAAKP,cAAc,CAACgC,IAAjC,GAAwC,CAAxC,GAA4CK,SAAtE;EAEA,MAAME,UAAU,GAAG1C,GAAG,CAAC,CACnBsB,MAAM,CAACqB,KADY,EAEnB1B,SAFmB,CAAD,CAAtB;EAKA,oBACI,oBAAC,KAAD;IACI,cAAc,EAAEK,MAAM,CAACsB,SAD3B;IAEI,cAAc,EAAEV,cAFpB;IAGI,YAAY,EAAEpB,YAAY,IAAIJ,aAAa,KAAKP,cAAc,CAACgC,IAHnE;IAII,cAAc,EAAEI,cAJpB;IAKI,iBAAiB,EAAEE,iBALvB;IAMI,OAAO,EAAE1B,OANb;IAOI,aAAa,EAAEsB,aAPnB;IAQI,eAAe,EAAEN,eARrB;IASI,OAAO,EAAEZ,OATb;IAUI,KAAK,EAAEG,MAAM,CAACuB;EAVlB,GAWQxB,UAXR,gBAaI,oBAAC,cAAD;IAAgB,KAAK,EAAE;MAAEH;IAAF;EAAvB,GACKE,UAAU,gBACP,oBAAC,MAAD;IAAQ,KAAK,EAAEP,UAAU,GAAG2B,SAAH,GAAelB,MAAM,CAACwB;EAA/C,gBACI,oBAAC,MAAD;IACI,KAAK,EAAExB,MAAM,CAACyB,iBADlB;IAEI,QAAQ,EAAEpB;EAFd,GAIKP,UAJL,CADJ,CADO,GASP,IAVR,eAYI,oBAAC,UAAD;IACI,OAAO,EAAE,GADb;IAEI,KAAK,EAAEsB;EAFX,GAIK9B,QAJL,CAZJ,CAbJ,CADJ;AAmCH;AAAA"}
@@ -0,0 +1,7 @@
1
+ import { createContext, useContext } from 'react';
2
+ const DialogContext = /*#__PURE__*/createContext({
3
+ size: 'medium'
4
+ });
5
+ export const DialogProvider = DialogContext.Provider;
6
+ export const useDialogContext = () => useContext(DialogContext);
7
+ //# sourceMappingURL=DialogContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","DialogContext","size","DialogProvider","Provider","useDialogContext"],"sources":["DialogContext.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { DialogSize } from './DialogProps';\n\nexport type Context = {\n size: DialogSize;\n};\n\nconst DialogContext = createContext<Context>({\n size: 'medium',\n});\n\nexport const DialogProvider = DialogContext.Provider;\n\nexport const useDialogContext = () => useContext(DialogContext);\n"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,UAAxB,QAA0C,OAA1C;AAOA,MAAMC,aAAa,gBAAGF,aAAa,CAAU;EACzCG,IAAI,EAAE;AADmC,CAAV,CAAnC;AAIA,OAAO,MAAMC,cAAc,GAAGF,aAAa,CAACG,QAArC;AAEP,OAAO,MAAMC,gBAAgB,GAAG,MAAML,UAAU,CAACC,aAAD,CAAzC"}
@@ -1,2 +1,4 @@
1
- export { default } from './LegacyDialog';
1
+ export { default } from './Dialog';
2
+ export { DialogProvider, useDialogContext } from './DialogContext';
3
+ export { default as useDialogSectionStyle } from './useDialogSectionStyle';
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyDialog';\nexport type { default as DialogProps } from './LegacyDialogProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,gBAAxB"}
1
+ {"version":3,"names":["default","DialogProvider","useDialogContext","useDialogSectionStyle"],"sources":["index.ts"],"sourcesContent":["export { default } from './Dialog';\nexport type { default as DialogProps } from './DialogProps';\nexport { DialogProvider, useDialogContext } from './DialogContext';\nexport { default as useDialogSectionStyle } from './useDialogSectionStyle';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,UAAxB;AAEA,SAASC,cAAT,EAAyBC,gBAAzB,QAAiD,iBAAjD;AACA,SAASF,OAAO,IAAIG,qBAApB,QAAiD,yBAAjD"}
@@ -0,0 +1,29 @@
1
+ import { useMemo } from 'react';
2
+ import { useWindowDimensions } from 'react-native';
3
+ import { useTheme } from '../styles';
4
+ import { useDialogContext } from './DialogContext';
5
+ export default function useDialogSectionStyle() {
6
+ const {
7
+ size
8
+ } = useDialogContext();
9
+ const {
10
+ width: windowWidth
11
+ } = useWindowDimensions();
12
+ const theme = useTheme();
13
+ return useMemo(() => {
14
+ const sizePaddingHorizontalMap = {
15
+ small: {
16
+ paddingHorizontal: theme.spacing(6)
17
+ },
18
+ medium: {
19
+ // TODO: need to refactor breakpoints.
20
+ paddingHorizontal: theme.spacing(windowWidth >= 448 ? 8 : 6)
21
+ },
22
+ large: {
23
+ paddingHorizontal: theme.spacing(8)
24
+ }
25
+ };
26
+ return sizePaddingHorizontalMap[size];
27
+ }, [size, theme, windowWidth]);
28
+ }
29
+ //# sourceMappingURL=useDialogSectionStyle.js.map
@@ -0,0 +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"}
@@ -8,29 +8,24 @@ export default function useDialogStyle(size, fullScreen) {
8
8
  width: windowWidth
9
9
  } = useWindowDimensions();
10
10
  return useMemo(() => {
11
- var _sizeStyleMap$size, _sizeStyleMap$size2;
11
+ var _sizeStyleMap$size;
12
12
 
13
13
  const sizeStyleMap = {
14
14
  small: {
15
- maxWidth: 260,
16
- paddingHorizontal: theme.spacing(6)
15
+ maxWidth: 260
17
16
  },
18
17
  medium: {
19
- maxWidth: 400,
20
- // TODO: need to refactor breakpoints.
21
- paddingHorizontal: theme.spacing(windowWidth >= 448 ? 8 : 6)
18
+ maxWidth: 400
22
19
  },
23
20
  large: {
24
21
  maxWidth: 512,
25
22
  minHeight: 360,
26
- paddingHorizontal: theme.spacing(8),
27
23
  width: 512
28
24
  }
29
25
  };
30
- const marginVertical = theme.spacing(6);
31
- const dialogMaxHeight = windowHeight - marginVertical * 2;
32
- const paddingHorizontal = (_sizeStyleMap$size = sizeStyleMap[size]) === null || _sizeStyleMap$size === void 0 ? void 0 : _sizeStyleMap$size.paddingHorizontal;
33
- const dialogMaxWidth = (_sizeStyleMap$size2 = sizeStyleMap[size]) === null || _sizeStyleMap$size2 === void 0 ? void 0 : _sizeStyleMap$size2.maxWidth;
26
+ const containerPaddingVertical = theme.spacing(6);
27
+ const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;
28
+ const dialogMaxWidth = (_sizeStyleMap$size = sizeStyleMap[size]) === null || _sizeStyleMap$size === void 0 ? void 0 : _sizeStyleMap$size.maxWidth;
34
29
  return {
35
30
  root: {
36
31
  alignItems: 'center',
@@ -41,13 +36,19 @@ export default function useDialogStyle(size, fullScreen) {
41
36
  height: '100%',
42
37
  width: '100%'
43
38
  } : {
39
+ alignItems: 'center',
44
40
  // TODO: need to refactor breakpoints.
45
- marginHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4)
41
+ paddingHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4),
42
+ paddingVertical: containerPaddingVertical,
43
+ width: '100%'
46
44
  },
47
45
  paper: fullScreen ? {
48
- flexGrow: 1
46
+ backgroundColor: theme.palette.surface.base,
47
+ height: '100%',
48
+ width: '100%'
49
49
  } : {
50
- marginVertical,
50
+ backgroundColor: theme.palette.surface.base,
51
+ borderRadius: theme.shape.radius.xl,
51
52
  maxHeight: dialogMaxHeight,
52
53
  overflow: 'hidden',
53
54
  width: '100%',
@@ -59,11 +60,8 @@ export default function useDialogStyle(size, fullScreen) {
59
60
  },
60
61
  topElementContent: {
61
62
  position: 'absolute',
62
- bottom: -1 * theme.spacing(4),
63
+ bottom: 0,
63
64
  width: '100%'
64
- },
65
- mediaWrapper: {
66
- marginHorizontal: theme.spacing(4) - (paddingHorizontal ?? 0)
67
65
  }
68
66
  };
69
67
  }, [theme, windowHeight, windowWidth, size, fullScreen]);
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useWindowDimensions","useTheme","useDialogStyle","size","fullScreen","theme","height","windowHeight","width","windowWidth","sizeStyleMap","small","maxWidth","paddingHorizontal","spacing","medium","large","minHeight","marginVertical","dialogMaxHeight","dialogMaxWidth","root","alignItems","justifyContent","zIndex","dialog","container","marginHorizontal","paper","flexGrow","maxHeight","overflow","topElementContainer","topElementContent","position","bottom","mediaWrapper"],"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 SizeStyleMap = FountainUiStyle & {\n maxWidth: number;\n paddingHorizontal: number;\n}\n\ntype DialogStyleKeys =\n | 'root'\n | 'container'\n | 'paper'\n | 'topElementContainer'\n | 'topElementContent'\n | 'mediaWrapper';\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, SizeStyleMap> = {\n small: {\n maxWidth: 260,\n paddingHorizontal: theme.spacing(6),\n },\n medium: {\n maxWidth: 400,\n // TODO: need to refactor breakpoints.\n paddingHorizontal: theme.spacing(windowWidth >= 448 ? 8 : 6),\n },\n large: {\n maxWidth: 512,\n minHeight: 360,\n paddingHorizontal: theme.spacing(8),\n width: 512,\n },\n };\n\n const marginVertical = theme.spacing(6);\n const dialogMaxHeight = windowHeight - marginVertical * 2;\n const paddingHorizontal = sizeStyleMap[size]?.paddingHorizontal;\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 // TODO: need to refactor breakpoints.\n marginHorizontal: theme.spacing(windowWidth > 320 ? 6 : 4),\n },\n paper: fullScreen ? {\n flexGrow: 1,\n } : {\n marginVertical,\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: -1 * theme.spacing(4),\n width: '100%',\n },\n mediaWrapper: {\n marginHorizontal: theme.spacing(4) - (paddingHorizontal ?? 0),\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;AAkBA,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,YAA8C,GAAG;MACnDC,KAAK,EAAE;QACHC,QAAQ,EAAE,GADP;QAEHC,iBAAiB,EAAER,KAAK,CAACS,OAAN,CAAc,CAAd;MAFhB,CAD4C;MAKnDC,MAAM,EAAE;QACJH,QAAQ,EAAE,GADN;QAEJ;QACAC,iBAAiB,EAAER,KAAK,CAACS,OAAN,CAAcL,WAAW,IAAI,GAAf,GAAqB,CAArB,GAAyB,CAAvC;MAHf,CAL2C;MAUnDO,KAAK,EAAE;QACHJ,QAAQ,EAAE,GADP;QAEHK,SAAS,EAAE,GAFR;QAGHJ,iBAAiB,EAAER,KAAK,CAACS,OAAN,CAAc,CAAd,CAHhB;QAIHN,KAAK,EAAE;MAJJ;IAV4C,CAAvD;IAkBA,MAAMU,cAAc,GAAGb,KAAK,CAACS,OAAN,CAAc,CAAd,CAAvB;IACA,MAAMK,eAAe,GAAGZ,YAAY,G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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"}
@@ -2,15 +2,30 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
 
3
3
  import React from 'react';
4
4
  import Column from '../Column';
5
- import { EdgeInsets } from '../styles';
5
+ import { useDialogSectionStyle } from '../Dialog';
6
+ import { css, useTheme } from '../styles';
7
+
8
+ const useStyles = function () {
9
+ const theme = useTheme();
10
+ return {
11
+ root: {
12
+ paddingTop: theme.spacing(2),
13
+ paddingBottom: theme.spacing(4)
14
+ }
15
+ };
16
+ };
17
+
6
18
  export default function DialogActions(props) {
7
19
  const {
8
20
  children,
21
+ style: styleProp,
9
22
  ...otherProps
10
23
  } = props;
24
+ const styles = useStyles();
25
+ const sectionStyle = useDialogSectionStyle();
26
+ const rootStyle = css([styles.root, sectionStyle, styleProp]);
11
27
  return /*#__PURE__*/React.createElement(Column, _extends({
12
- alignItems: 'center',
13
- insets: EdgeInsets.fromLTRB(0, 2, 0, 4)
28
+ style: rootStyle
14
29
  }, otherProps), children);
15
30
  }
16
31
  ;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Column","EdgeInsets","DialogActions","props","children","otherProps","fromLTRB"],"sources":["DialogActions.tsx"],"sourcesContent":["import React from 'react';\nimport Column from '../Column';\nimport { EdgeInsets } from '../styles';\nimport type DialogActionsProps from './DialogActionsProps';\n\nexport default function DialogActions(props: DialogActionsProps) {\n const {\n children,\n ...otherProps\n } = props;\n\n return (\n <Column\n alignItems={'center'}\n insets={EdgeInsets.fromLTRB(0, 2, 0, 4)}\n {...otherProps}\n >\n {children}\n </Column>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,UAAT,QAA2B,WAA3B;AAGA,eAAe,SAASC,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEF,GAAGC;EAFD,IAGFF,KAHJ;EAKA,oBACI,oBAAC,MAAD;IACI,UAAU,EAAE,QADhB;IAEI,MAAM,EAAEF,UAAU,CAACK,QAAX,CAAoB,CAApB,EAAuB,CAAvB,EAA0B,CAA1B,EAA6B,CAA7B;EAFZ,GAGQD,UAHR,GAKKD,QALL,CADJ;AASH;AAAA"}
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,2 +1,2 @@
1
- export { default } from './LegacyDialogActions';
1
+ export { default } from './DialogActions';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyDialogActions';\nexport type { default as DialogActionsProps } from './DialogActionsProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,uBAAxB"}
1
+ {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './DialogActions';\nexport type { default as DialogActionsProps } from './DialogActionsProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB"}
@@ -2,6 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
 
3
3
  import React from 'react';
4
4
  import { ScrollView, Text } from 'react-native';
5
+ import { useDialogSectionStyle } from '../Dialog';
5
6
  import { createFontStyle, css, useTheme } from '../styles';
6
7
 
7
8
  const useStyles = function () {
@@ -24,7 +25,8 @@ export default function DialogContent(props) {
24
25
  } = props;
25
26
  const theme = useTheme();
26
27
  const styles = useStyles();
27
- const rootStyle = css([styles.root, styleProp]);
28
+ const sectionStyle = useDialogSectionStyle();
29
+ const rootStyle = css([styles.root, sectionStyle, styleProp]);
28
30
  const contentFontStyle = createFontStyle(theme, {
29
31
  // TODO: select typography.
30
32
  // selector: (typography) => typography.body2.regular,
@@ -34,6 +36,7 @@ export default function DialogContent(props) {
34
36
  textAlign
35
37
  }]);
36
38
  return /*#__PURE__*/React.createElement(ScrollView, _extends({
39
+ bounces: false,
37
40
  style: rootStyle
38
41
  }, otherProps), typeof children === 'string' ? /*#__PURE__*/React.createElement(Text, {
39
42
  style: contentStyle
@@ -1 +1 @@
1
- {"version":3,"names":["React","ScrollView","Text","createFontStyle","css","useTheme","useStyles","theme","root","flexGrow","flexShrink","marginVertical","spacing","DialogContent","props","children","style","styleProp","textAlign","otherProps","styles","rootStyle","contentFontStyle","color","palette","text","base","contentStyle"],"sources":["DialogContent.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, Text, TextStyle } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type DialogContentProps from './DialogContentProps';\n\ntype DialogContentStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<DialogContentStyles> = function (): DialogContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexGrow: 1,\n flexShrink: 1,\n marginVertical: theme.spacing(4),\n },\n };\n};\n\nexport default function DialogContent(props: DialogContentProps) {\n const {\n children,\n style: styleProp,\n textAlign = 'left' as TextStyle['textAlign'],\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const rootStyle = css([\n styles.root,\n styleProp,\n ]);\n\n const contentFontStyle = createFontStyle(theme, {\n // TODO: select typography.\n // selector: (typography) => typography.body2.regular,\n color: theme.palette.text.base,\n });\n\n const contentStyle = css([\n contentFontStyle,\n { textAlign },\n ]);\n\n return (\n <ScrollView\n style={rootStyle}\n {...otherProps}\n >\n {typeof children === 'string' ? (\n <Text style={contentStyle}>\n {children}\n </Text>\n ) : (children)}\n </ScrollView>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,EAAqBC,IAArB,QAA4C,cAA5C;AAEA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;;AAKA,MAAMC,SAAyC,GAAG,YAAiC;EAC/E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,QAAQ,EAAE,CADR;MAEFC,UAAU,EAAE,CAFV;MAGFC,cAAc,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd;IAHd;EADH,CAAP;AAOH,CAVD;;AAYA,eAAe,SAASC,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGFC,SAAS,GAAG,MAHV;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMP,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMe,MAAM,GAAGd,SAAS,EAAxB;EAEA,MAAMe,SAAS,GAAGjB,GAAG,CAAC,CAClBgB,MAAM,CAACZ,IADW,EAElBS,SAFkB,CAAD,CAArB;EAKA,MAAMK,gBAAgB,GAAGnB,eAAe,CAACI,KAAD,EAAQ;IAC5C;IACA;IACAgB,KAAK,EAAEhB,KAAK,CAACiB,OAAN,CAAcC,IAAd,CAAmBC;EAHkB,CAAR,CAAxC;EAMA,MAAMC,YAAY,GAAGvB,GAAG,CAAC,CACrBkB,gBADqB,EAErB;IAAEJ;EAAF,CAFqB,CAAD,CAAxB;EAKA,oBACI,oBAAC,UAAD;IACI,KAAK,EAAEG;EADX,GAEQF,UAFR,GAIK,OAAOJ,QAAP,KAAoB,QAApB,gBACG,oBAAC,IAAD;IAAM,KAAK,EAAEY;EAAb,GACKZ,QADL,CADH,GAIIA,QART,CADJ;AAYH;AAAA"}
1
+ {"version":3,"names":["React","ScrollView","Text","useDialogSectionStyle","createFontStyle","css","useTheme","useStyles","theme","root","flexGrow","flexShrink","marginVertical","spacing","DialogContent","props","children","style","styleProp","textAlign","otherProps","styles","sectionStyle","rootStyle","contentFontStyle","color","palette","text","base","contentStyle"],"sources":["DialogContent.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, Text, TextStyle } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useDialogSectionStyle } from '../Dialog';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type DialogContentProps from './DialogContentProps';\n\ntype DialogContentStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<DialogContentStyles> = function (): DialogContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexGrow: 1,\n flexShrink: 1,\n marginVertical: theme.spacing(4),\n },\n };\n};\n\nexport default function DialogContent(props: DialogContentProps) {\n const {\n children,\n style: styleProp,\n textAlign = 'left' as TextStyle['textAlign'],\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 contentFontStyle = createFontStyle(theme, {\n // TODO: select typography.\n // selector: (typography) => typography.body2.regular,\n color: theme.palette.text.base,\n });\n\n const contentStyle = css([\n contentFontStyle,\n { textAlign },\n ]);\n\n return (\n <ScrollView\n bounces={false}\n style={rootStyle}\n {...otherProps}\n >\n {typeof children === 'string' ? (\n <Text style={contentStyle}>\n {children}\n </Text>\n ) : (children)}\n </ScrollView>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,EAAqBC,IAArB,QAA4C,cAA5C;AAEA,SAASC,qBAAT,QAAsC,WAAtC;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;;AAKA,MAAMC,SAAyC,GAAG,YAAiC;EAC/E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,QAAQ,EAAE,CADR;MAEFC,UAAU,EAAE,CAFV;MAGFC,cAAc,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd;IAHd;EADH,CAAP;AAOH,CAVD;;AAYA,eAAe,SAASC,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAFL;IAGFC,SAAS,GAAG,MAHV;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMP,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMe,MAAM,GAAGd,SAAS,EAAxB;EAEA,MAAMe,YAAY,GAAGnB,qBAAqB,EAA1C;EAEA,MAAMoB,SAAS,GAAGlB,GAAG,CAAC,CAClBgB,MAAM,CAACZ,IADW,EAElBa,YAFkB,EAGlBJ,SAHkB,CAAD,CAArB;EAMA,MAAMM,gBAAgB,GAAGpB,eAAe,CAACI,KAAD,EAAQ;IAC5C;IACA;IACAiB,KAAK,EAAEjB,KAAK,CAACkB,OAAN,CAAcC,IAAd,CAAmBC;EAHkB,CAAR,CAAxC;EAMA,MAAMC,YAAY,GAAGxB,GAAG,CAAC,CACrBmB,gBADqB,EAErB;IAAEL;EAAF,CAFqB,CAAD,CAAxB;EAKA,oBACI,oBAAC,UAAD;IACI,OAAO,EAAE,KADb;IAEI,KAAK,EAAEI;EAFX,GAGQH,UAHR,GAKK,OAAOJ,QAAP,KAAoB,QAApB,gBACG,oBAAC,IAAD;IAAM,KAAK,EAAEa;EAAb,GACKb,QADL,CADH,GAIIA,QATT,CADJ;AAaH;AAAA"}
@@ -1,2 +1,2 @@
1
- export { default } from './LegacyDialogContent';
1
+ export { default } from './DialogContent';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyDialogContent';\nexport type { default as DialogContentProps } from './LegacyDialogContentProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,uBAAxB"}
1
+ {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './DialogContent';\nexport type { default as DialogContentProps } from './DialogContentProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB"}
@@ -13,6 +13,7 @@ const useStyles = function () {
13
13
  paddingTop: theme.spacing(8)
14
14
  },
15
15
  image: {
16
+ paddingHorizontal: theme.spacing(4),
16
17
  paddingTop: theme.spacing(4)
17
18
  }
18
19
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","css","useTheme","useStyles","theme","icon","alignItems","justifyContent","paddingTop","spacing","image","DialogMedia","props","children","variant","style","styleProp","otherProps","styles","rootStyle"],"sources":["DialogMedia.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type DialogMediaProps from './DialogMediaProps';\nimport type { DialogMediaVariant } from './DialogMediaProps';\n\ntype DialogMediaStyles = NamedStylesStringUnion<DialogMediaVariant>;\n\nconst useStyles: UseStyles<DialogMediaStyles> = function (): DialogMediaStyles {\n const theme = useTheme();\n\n return {\n icon: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingTop: theme.spacing(8),\n },\n image: {\n paddingTop: theme.spacing(4),\n },\n };\n};\n\nexport default function DialogMedia(props: DialogMediaProps) {\n const {\n children,\n variant = 'image',\n style: styleProp,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const rootStyle = css([\n styles[variant],\n styleProp,\n ]);\n\n return (\n <View\n style={rootStyle}\n {...otherProps}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAMA,MAAMC,SAAuC,GAAG,YAA+B;EAC3E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,cAAc,EAAE,QAFd;MAGFC,UAAU,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd;IAHV,CADH;IAMHC,KAAK,EAAE;MACHF,UAAU,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd;IADT;EANJ,CAAP;AAUH,CAbD;;AAeA,eAAe,SAASE,WAAT,CAAqBC,KAArB,EAA8C;EACzD,MAAM;IACFC,QADE;IAEFC,OAAO,GAAG,OAFR;IAGFC,KAAK,EAAEC,SAHL;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,MAAM,GAAGf,SAAS,EAAxB;EAEA,MAAMgB,SAAS,GAAGlB,GAAG,CAAC,CAClBiB,MAAM,CAACJ,OAAD,CADY,EAElBE,SAFkB,CAAD,CAArB;EAKA,oBACI,oBAAC,IAAD;IACI,KAAK,EAAEG;EADX,GAEQF,UAFR,GAIKJ,QAJL,CADJ;AAQH;AAAA"}
1
+ {"version":3,"names":["React","View","css","useTheme","useStyles","theme","icon","alignItems","justifyContent","paddingTop","spacing","image","paddingHorizontal","DialogMedia","props","children","variant","style","styleProp","otherProps","styles","rootStyle"],"sources":["DialogMedia.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type DialogMediaProps from './DialogMediaProps';\nimport type { DialogMediaVariant } from './DialogMediaProps';\n\ntype DialogMediaStyles = NamedStylesStringUnion<DialogMediaVariant>;\n\nconst useStyles: UseStyles<DialogMediaStyles> = function (): DialogMediaStyles {\n const theme = useTheme();\n\n return {\n icon: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingTop: theme.spacing(8),\n },\n image: {\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(4),\n },\n };\n};\n\nexport default function DialogMedia(props: DialogMediaProps) {\n const {\n children,\n variant = 'image',\n style: styleProp,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const rootStyle = css([\n styles[variant],\n styleProp,\n ]);\n\n return (\n <View\n style={rootStyle}\n {...otherProps}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAMA,MAAMC,SAAuC,GAAG,YAA+B;EAC3E,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,cAAc,EAAE,QAFd;MAGFC,UAAU,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd;IAHV,CADH;IAMHC,KAAK,EAAE;MACHC,iBAAiB,EAAEP,KAAK,CAACK,OAAN,CAAc,CAAd,CADhB;MAEHD,UAAU,EAAEJ,KAAK,CAACK,OAAN,CAAc,CAAd;IAFT;EANJ,CAAP;AAWH,CAdD;;AAgBA,eAAe,SAASG,WAAT,CAAqBC,KAArB,EAA8C;EACzD,MAAM;IACFC,QADE;IAEFC,OAAO,GAAG,OAFR;IAGFC,KAAK,EAAEC,SAHL;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,MAAM,GAAGhB,SAAS,EAAxB;EAEA,MAAMiB,SAAS,GAAGnB,GAAG,CAAC,CAClBkB,MAAM,CAACJ,OAAD,CADY,EAElBE,SAFkB,CAAD,CAArB;EAKA,oBACI,oBAAC,IAAD;IACI,KAAK,EAAEG;EADX,GAEQF,UAFR,GAIKJ,QAJL,CADJ;AAQH;AAAA"}
@@ -1,2 +1,2 @@
1
- export { default } from './LegacyDialogMedia';
1
+ export { default } from './DialogMedia';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyDialogMedia';\nexport type { default as DialogMediaProps } from './LegacyDialogMediaProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,qBAAxB"}
1
+ {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './DialogMedia';\nexport type { default as DialogMediaProps } from './DialogMediaProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB"}
@@ -2,6 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
 
3
3
  import React from 'react';
4
4
  import { Text, View } from 'react-native';
5
+ import { useDialogSectionStyle } from '../Dialog';
5
6
  import { createFontStyle, css, useTheme } from '../styles';
6
7
 
7
8
  const useStyles = function () {
@@ -24,7 +25,8 @@ export default function DialogTitle(props) {
24
25
  } = props;
25
26
  const theme = useTheme();
26
27
  const styles = useStyles();
27
- const rootStyle = css([styles.root, styleProp]);
28
+ const sectionStyle = useDialogSectionStyle();
29
+ const rootStyle = css([styles.root, sectionStyle, styleProp]);
28
30
  const titleFontStyle = createFontStyle(theme, {
29
31
  selector: typography => typography.header3.semiBold,
30
32
  color: theme.palette.text.strong
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","createFontStyle","css","useTheme","useStyles","theme","root","paddingTop","spacing","title","textAlign","DialogTitle","props","children","style","styleProp","otherProps","styles","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 { 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 rootStyle = css([\n styles.root,\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,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,SAAS,GAAGhB,GAAG,CAAC,CAClBe,MAAM,CAACX,IADW,EAElBS,SAFkB,CAAD,CAArB;EAKA,MAAMI,cAAc,GAAGlB,eAAe,CAACI,KAAD,EAAQ;IAC1Ce,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,OAAX,CAAmBC,QADH;IAE1CC,KAAK,EAAEnB,KAAK,CAACoB,OAAN,CAAcC,IAAd,CAAmBC;EAFgB,CAAR,CAAtC;EAKA,MAAMC,UAAU,GAAG1B,GAAG,CAAC,CACnBe,MAAM,CAACR,KADY,EAEnBU,cAFmB,CAAD,CAAtB;EAKA,oBACI,oBAAC,IAAD,eACQH,UADR;IAEI,KAAK,EAAEE;EAFX,IAIK,OAAOL,QAAP,KAAoB,QAApB,gBACG,oBAAC,IAAD;IAAM,KAAK,EAAEe;EAAb,GACKf,QADL,CADH,GAIIA,QART,CADJ;AAYH;AAAA"}
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,2 +1,2 @@
1
- export { default } from './LegacyDialogTitle';
1
+ export { default } from './DialogTitle';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyDialogTitle';\nexport type { default as DialogTitleProps } from './LegacyDialogTitleProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,qBAAxB"}
1
+ {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './DialogTitle';\nexport type { default as DialogTitleProps } from './DialogTitleProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB"}
@@ -1,2 +1,2 @@
1
- export { default } from './LegacyDivider';
1
+ export { default } from './Divider';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyDivider';\nexport type { default as DividerProps } from './LegacyDividerProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB"}
1
+ {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './Divider';\nexport type { default as DividerProps } from './DividerProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB"}
@@ -15,7 +15,7 @@ const useStyles = function () {
15
15
  alignItems: 'center',
16
16
  flex: 1,
17
17
  justifyContent: 'center',
18
- paddingHorizontal: theme.spacing(12)
18
+ paddingHorizontal: theme.spacing(5)
19
19
  },
20
20
  cta: {
21
21
  alignSelf: 'center'
@@ -65,7 +65,7 @@ export default function Empty(props) {
65
65
  color: 'accent',
66
66
  onPress: onButtonPress,
67
67
  style: styles.cta,
68
- variant: 'solid'
68
+ variant: 'capsuleSolid'
69
69
  })) : null);
70
70
  }
71
71
  //# sourceMappingURL=Empty.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","Button","Column","Spacer","createFontStyle","css","useTheme","cloneElementSafely","useStyles","theme","root","alignItems","flex","justifyContent","paddingHorizontal","spacing","cta","alignSelf","Empty","props","buttonTitle","description","headerContent","headerContentProp","onButtonPress","style","styleProp","title","otherProps","styles","rootStyle","titleFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","descriptionFontStyle","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(12),\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 // TODO: select typography.\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 {/* TODO: change Capsule solid variant. */}\n <Button\n children={buttonTitle}\n color={'accent'}\n onPress={onButtonPress}\n style={styles.cta}\n variant={'solid'}\n />\n </React.Fragment>\n ) : null}\n </Column>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C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KAAD,CAAO,QAAP,QACKA,aADL,eAGI,oBAAC,MAAD;IAAQ,IAAI,EAAE;EAAd,EAHJ,CADU,GAMV,IAVR,eAYI,oBAAC,IAAD;IACI,QAAQ,EAAEK,KADd;IAEI,KAAK,EAAEI;EAFX,EAZJ,EAiBKV,WAAW,gBACR,oBAAC,KAAD,CAAO,QAAP,qBACI,oBAAC,MAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,oBAAC,IAAD;IACI,QAAQ,EAAEA,WADd;IAEI,KAAK,EAAEmB;EAFX,EAHJ,CADQ,GASR,IA1BR,EA4BKpB,WAAW,IAAII,aAAf,gBACG,oBAAC,KAAD,CAAO,QAAP,qBACI,oBAAC,MAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAII,oBAAC,MAAD;IACI,QAAQ,EAAEJ,WADd;IAEI,KAAK,EAAE,QAFX;IAGI,OAAO,EAAEI,aAHb;IAII,KAAK,EAAEK,MAAM,CAACb,GAJlB;IAKI,OAAO,EAAE;EALb,EAJJ,CADH,GAaG,IAzCR,CADJ;AA6CH"}
1
+ {"version":3,"names":["React","Text","Button","Column","Spacer","createFontStyle","css","useTheme","cloneElementSafely","useStyles","theme","root","alignItems","flex","justifyContent","paddingHorizontal","spacing","cta","alignSelf","Empty","props","buttonTitle","description","headerContent","headerContentProp","onButtonPress","style","styleProp","title","otherProps","styles","rootStyle","titleFontStyle","selector","typography","header3","semiBold","color","palette","text","strong","descriptionFontStyle","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 // TODO: select typography.\n // selector: (typography) => typography.body2.regular,\n color: theme.palette.text.base,\n });\n\n return (\n <Column\n style={rootStyle}\n {...otherProps}\n >\n {headerContent ? (\n <React.Fragment>\n {headerContent}\n\n <Spacer size={6}/>\n </React.Fragment>\n ) : null}\n\n <Text\n children={title}\n style={titleFontStyle}\n />\n\n {description ? (\n <React.Fragment>\n <Spacer size={2}/>\n\n <Text\n children={description}\n style={descriptionFontStyle}\n />\n </React.Fragment>\n ) : null}\n\n {buttonTitle && onButtonPress ? (\n <React.Fragment>\n <Spacer size={6}/>\n\n <Button\n children={buttonTitle}\n color={'accent'}\n onPress={onButtonPress}\n style={styles.cta}\n variant={'capsuleSolid'}\n />\n </React.Fragment>\n ) : null}\n </Column>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AAEA,SAASC,kBAAT,QAAmC,UAAnC;;AAKA,MAAMC,SAAiC,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