@fountain-ui/core 3.0.0-alpha.5 → 3.0.0-alpha.50

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 (607) hide show
  1. package/build/commonjs/Accordion/Accordion.js +20 -13
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
  4. package/build/commonjs/Accordion/useVariantStyleMap.js +13 -6
  5. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  6. package/build/commonjs/AppBar/AppBar.js +1 -1
  7. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  8. package/build/commonjs/AspectRatio/AspectRatioNative.js +1 -1
  9. package/build/commonjs/AspectRatio/AspectRatioNative.js.map +1 -1
  10. package/build/commonjs/AspectRatio/AspectRatioWeb.js +1 -1
  11. package/build/commonjs/AspectRatio/AspectRatioWeb.js.map +1 -1
  12. package/build/commonjs/Badge/Badge.js +4 -3
  13. package/build/commonjs/Badge/Badge.js.map +1 -1
  14. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  15. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +7 -3
  16. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  17. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  18. package/build/commonjs/Button/Button.js +26 -12
  19. package/build/commonjs/Button/Button.js.map +1 -1
  20. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  21. package/build/commonjs/Button/useVariantStyleMap.js +18 -0
  22. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
  23. package/build/commonjs/ButtonBase/ButtonBase.js +1 -1
  24. package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
  25. package/build/commonjs/ButtonBase/index.js +2 -2
  26. package/build/commonjs/ButtonBase/index.js.map +1 -1
  27. package/build/commonjs/Checkbox/Checkbox.js +4 -1
  28. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  29. package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
  30. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  31. package/build/commonjs/Chip/Chip.js +27 -14
  32. package/build/commonjs/Chip/Chip.js.map +1 -1
  33. package/build/commonjs/Chip/ChipProps.js +5 -1
  34. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  35. package/build/commonjs/Chip/index.js +12 -0
  36. package/build/commonjs/Chip/index.js.map +1 -1
  37. package/build/commonjs/Chip/useChipStyle.js +59 -32
  38. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  39. package/build/commonjs/Dialog/Dialog.js +11 -12
  40. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  41. package/build/commonjs/Dialog/DialogProps.js +1 -1
  42. package/build/commonjs/Dialog/DialogProps.js.map +1 -1
  43. package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
  44. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
  45. package/build/commonjs/Dialog/useDialogStyle.js +19 -8
  46. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  47. package/build/commonjs/DialogActions/DialogActions.js +0 -1
  48. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  49. package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
  50. package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
  51. package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
  52. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  53. package/build/commonjs/Divider/Divider.js +17 -9
  54. package/build/commonjs/Divider/Divider.js.map +1 -1
  55. package/build/commonjs/Divider/DividerProps.js +1 -1
  56. package/build/commonjs/Divider/DividerProps.js.map +1 -1
  57. package/build/commonjs/Empty/Empty.js +1 -1
  58. package/build/commonjs/Empty/Empty.js.map +1 -1
  59. package/build/commonjs/Flexbox/Flexbox.js +2 -0
  60. package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
  61. package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
  62. package/build/commonjs/IconButton/IconButton.js +3 -0
  63. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  64. package/build/commonjs/IconButton/IconButtonProps.js +1 -1
  65. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  66. package/build/commonjs/Image/Image.js +13 -4
  67. package/build/commonjs/Image/Image.js.map +1 -1
  68. package/build/commonjs/Image/ImageProps.js.map +1 -1
  69. package/build/commonjs/Image/OverlayCloseButton/OverlayCloseButton.js +46 -0
  70. package/build/commonjs/Image/OverlayCloseButton/OverlayCloseButton.js.map +1 -0
  71. package/build/commonjs/Image/OverlayCloseButton/OverlayCloseButtonProps.js +2 -0
  72. package/build/commonjs/Image/OverlayCloseButton/OverlayCloseButtonProps.js.map +1 -0
  73. package/build/commonjs/Image/OverlayCloseButton/index.js +16 -0
  74. package/build/commonjs/Image/OverlayCloseButton/index.js.map +1 -0
  75. package/build/commonjs/Image/preload.js +10 -0
  76. package/build/commonjs/Image/preload.js.map +1 -0
  77. package/build/commonjs/Image/preload.native.js +22 -0
  78. package/build/commonjs/Image/preload.native.js.map +1 -0
  79. package/build/commonjs/ImageCore/ImageCoreNative.js +13 -10
  80. package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
  81. package/build/commonjs/ImageCore/ImageCoreProps.js.map +1 -1
  82. package/build/commonjs/ListItem/ListItem.js +5 -15
  83. package/build/commonjs/ListItem/ListItem.js.map +1 -1
  84. package/build/commonjs/ListItemText/ListItemText.js +2 -2
  85. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  86. package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
  87. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  88. package/build/commonjs/Modal/Modal.js +29 -20
  89. package/build/commonjs/Modal/Modal.js.map +1 -1
  90. package/build/commonjs/Modal/ModalProps.js.map +1 -1
  91. package/build/commonjs/Pagination/NumberPagination.js +4 -2
  92. package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
  93. package/build/commonjs/Pagination/Pagination.js +2 -0
  94. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  95. package/build/commonjs/Pagination/PaginationProps.js +3 -1
  96. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  97. package/build/commonjs/Pagination/index.js +6 -0
  98. package/build/commonjs/Pagination/index.js.map +1 -1
  99. package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
  100. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  101. package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
  102. package/build/commonjs/Radio/Radio.js +31 -8
  103. package/build/commonjs/Radio/Radio.js.map +1 -1
  104. package/build/commonjs/Radio/RadioProps.js.map +1 -1
  105. package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
  106. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  107. package/build/commonjs/ShadowView/ShadowView.native.js +1 -1
  108. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  109. package/build/commonjs/Slider/Slider.js +22 -18
  110. package/build/commonjs/Slider/Slider.js.map +1 -1
  111. package/build/commonjs/SnackbarContent/SnackbarContent.js +24 -7
  112. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  113. package/build/commonjs/Tab/Tab.js +21 -19
  114. package/build/commonjs/Tab/Tab.js.map +1 -1
  115. package/build/commonjs/Tab/TabProps.js +4 -2
  116. package/build/commonjs/Tab/TabProps.js.map +1 -1
  117. package/build/commonjs/Tab/index.js +14 -0
  118. package/build/commonjs/Tab/index.js.map +1 -1
  119. package/build/commonjs/Tab/useVariantStyleMap.js +57 -16
  120. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
  121. package/build/commonjs/TabBase/TabBase.js +1 -8
  122. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  123. package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
  124. package/build/commonjs/Tabs/Tabs.js +32 -11
  125. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  126. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  127. package/build/commonjs/Tabs/index.js.map +1 -1
  128. package/build/commonjs/Tabs/useTabsStyle.js +81 -0
  129. package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
  130. package/build/commonjs/TextField/TextField.js +99 -17
  131. package/build/commonjs/TextField/TextField.js.map +1 -1
  132. package/build/commonjs/TextField/TextFieldProps.js +3 -1
  133. package/build/commonjs/TextField/TextFieldProps.js.map +1 -1
  134. package/build/commonjs/TextField/useVariantStyleMap.js +50 -30
  135. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  136. package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
  137. package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
  138. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
  139. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  140. package/build/commonjs/Toolbar/BackButton/index.js +16 -0
  141. package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
  142. package/build/commonjs/Toolbar/Toolbar.js +22 -12
  143. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  144. package/build/commonjs/Toolbar/ToolbarProps.js.map +1 -1
  145. package/build/commonjs/Tooltip/Beaks/index.js +32 -0
  146. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
  147. package/build/commonjs/Tooltip/Tooltip.js +23 -23
  148. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  149. package/build/commonjs/Tooltip/TooltipProps.js.map +1 -1
  150. package/build/commonjs/Tooltip/index.js +19 -0
  151. package/build/commonjs/Tooltip/index.js.map +1 -1
  152. package/build/commonjs/Typography/Typography.js +9 -2
  153. package/build/commonjs/Typography/Typography.js.map +1 -1
  154. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  155. package/build/commonjs/hooks/useCollapsibleAppBar.js +21 -13
  156. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  157. package/build/commonjs/hooks/useContentContainerStyle.js +35 -17
  158. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  159. package/build/commonjs/hooks/useFadeInAppBar.js +4 -4
  160. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  161. package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
  162. package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
  163. package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
  164. package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
  165. package/build/commonjs/internal/icons/ChevronRight.js +4 -2
  166. package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
  167. package/build/commonjs/internal/icons/ChipClose.js +23 -0
  168. package/build/commonjs/internal/icons/ChipClose.js.map +1 -0
  169. package/build/commonjs/internal/icons/Clear.js +3 -3
  170. package/build/commonjs/internal/icons/Clear.js.map +1 -1
  171. package/build/commonjs/internal/icons/Close.js +4 -2
  172. package/build/commonjs/internal/icons/Close.js.map +1 -1
  173. package/build/commonjs/internal/icons/CloseCircleFillPierced.js +23 -0
  174. package/build/commonjs/internal/icons/CloseCircleFillPierced.js.map +1 -0
  175. package/build/commonjs/internal/icons/Search.js +2 -2
  176. package/build/commonjs/internal/icons/Search.js.map +1 -1
  177. package/build/commonjs/internal/icons/index.js +24 -0
  178. package/build/commonjs/internal/icons/index.js.map +1 -1
  179. package/build/module/Accordion/Accordion.js +20 -13
  180. package/build/module/Accordion/Accordion.js.map +1 -1
  181. package/build/module/Accordion/AccordionProps.js.map +1 -1
  182. package/build/module/Accordion/useVariantStyleMap.js +13 -6
  183. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  184. package/build/module/AppBar/AppBar.js +1 -1
  185. package/build/module/AppBar/AppBar.js.map +1 -1
  186. package/build/module/AspectRatio/AspectRatioNative.js +1 -1
  187. package/build/module/AspectRatio/AspectRatioNative.js.map +1 -1
  188. package/build/module/AspectRatio/AspectRatioWeb.js +1 -1
  189. package/build/module/AspectRatio/AspectRatioWeb.js.map +1 -1
  190. package/build/module/Badge/Badge.js +4 -3
  191. package/build/module/Badge/Badge.js.map +1 -1
  192. package/build/module/Badge/BadgeProps.js.map +1 -1
  193. package/build/module/BottomSheetTitle/BottomSheetTitle.js +7 -3
  194. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  195. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  196. package/build/module/Button/Button.js +27 -13
  197. package/build/module/Button/Button.js.map +1 -1
  198. package/build/module/Button/ButtonProps.js.map +1 -1
  199. package/build/module/Button/useVariantStyleMap.js +18 -0
  200. package/build/module/Button/useVariantStyleMap.js.map +1 -1
  201. package/build/module/ButtonBase/ButtonBase.js +1 -1
  202. package/build/module/ButtonBase/ButtonBase.js.map +1 -1
  203. package/build/module/ButtonBase/index.js +1 -1
  204. package/build/module/ButtonBase/index.js.map +1 -1
  205. package/build/module/Checkbox/Checkbox.js +4 -1
  206. package/build/module/Checkbox/Checkbox.js.map +1 -1
  207. package/build/module/Checkbox/useVariantStyleMap.js +6 -2
  208. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  209. package/build/module/Chip/Chip.js +23 -13
  210. package/build/module/Chip/Chip.js.map +1 -1
  211. package/build/module/Chip/ChipProps.js +2 -0
  212. package/build/module/Chip/ChipProps.js.map +1 -1
  213. package/build/module/Chip/index.js +1 -1
  214. package/build/module/Chip/index.js.map +1 -1
  215. package/build/module/Chip/useChipStyle.js +59 -32
  216. package/build/module/Chip/useChipStyle.js.map +1 -1
  217. package/build/module/Dialog/Dialog.js +11 -11
  218. package/build/module/Dialog/Dialog.js.map +1 -1
  219. package/build/module/Dialog/DialogProps.js +1 -1
  220. package/build/module/Dialog/DialogProps.js.map +1 -1
  221. package/build/module/Dialog/useDialogSectionStyle.js +6 -4
  222. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
  223. package/build/module/Dialog/useDialogStyle.js +18 -8
  224. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  225. package/build/module/DialogActions/DialogActions.js +0 -1
  226. package/build/module/DialogActions/DialogActions.js.map +1 -1
  227. package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
  228. package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
  229. package/build/module/DialogTitle/DialogTitle.js +6 -3
  230. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  231. package/build/module/Divider/Divider.js +7 -0
  232. package/build/module/Divider/Divider.js.map +1 -1
  233. package/build/module/Divider/DividerProps.js +1 -1
  234. package/build/module/Divider/DividerProps.js.map +1 -1
  235. package/build/module/Empty/Empty.js +1 -1
  236. package/build/module/Empty/Empty.js.map +1 -1
  237. package/build/module/Flexbox/Flexbox.js +2 -0
  238. package/build/module/Flexbox/Flexbox.js.map +1 -1
  239. package/build/module/Flexbox/FlexboxProps.js.map +1 -1
  240. package/build/module/IconButton/IconButton.js +3 -0
  241. package/build/module/IconButton/IconButton.js.map +1 -1
  242. package/build/module/IconButton/IconButtonProps.js +1 -1
  243. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  244. package/build/module/Image/Image.js +11 -4
  245. package/build/module/Image/Image.js.map +1 -1
  246. package/build/module/Image/ImageProps.js.map +1 -1
  247. package/build/module/Image/OverlayCloseButton/OverlayCloseButton.js +31 -0
  248. package/build/module/Image/OverlayCloseButton/OverlayCloseButton.js.map +1 -0
  249. package/build/module/Image/OverlayCloseButton/OverlayCloseButtonProps.js +2 -0
  250. package/build/module/Image/OverlayCloseButton/OverlayCloseButtonProps.js.map +1 -0
  251. package/build/module/Image/OverlayCloseButton/index.js +2 -0
  252. package/build/module/Image/OverlayCloseButton/index.js.map +1 -0
  253. package/build/module/Image/preload.js +3 -0
  254. package/build/module/Image/preload.js.map +1 -0
  255. package/build/module/Image/preload.native.js +12 -0
  256. package/build/module/Image/preload.native.js.map +1 -0
  257. package/build/module/ImageCore/ImageCoreNative.js +14 -10
  258. package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
  259. package/build/module/ImageCore/ImageCoreProps.js.map +1 -1
  260. package/build/module/ListItem/ListItem.js +5 -15
  261. package/build/module/ListItem/ListItem.js.map +1 -1
  262. package/build/module/ListItemText/ListItemText.js +2 -2
  263. package/build/module/ListItemText/ListItemText.js.map +1 -1
  264. package/build/module/ListSubheader/ListSubheader.js +1 -1
  265. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  266. package/build/module/Modal/Modal.js +30 -21
  267. package/build/module/Modal/Modal.js.map +1 -1
  268. package/build/module/Modal/ModalProps.js.map +1 -1
  269. package/build/module/Pagination/NumberPagination.js +4 -2
  270. package/build/module/Pagination/NumberPagination.js.map +1 -1
  271. package/build/module/Pagination/Pagination.js +2 -0
  272. package/build/module/Pagination/Pagination.js.map +1 -1
  273. package/build/module/Pagination/PaginationProps.js +1 -0
  274. package/build/module/Pagination/PaginationProps.js.map +1 -1
  275. package/build/module/Pagination/index.js +1 -1
  276. package/build/module/Pagination/index.js.map +1 -1
  277. package/build/module/PaginationItem/PaginationItem.js +28 -21
  278. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  279. package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
  280. package/build/module/Radio/Radio.js +28 -8
  281. package/build/module/Radio/Radio.js.map +1 -1
  282. package/build/module/Radio/RadioProps.js.map +1 -1
  283. package/build/module/RadioGroup/RadioGroup.js +2 -20
  284. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  285. package/build/module/ShadowView/ShadowView.native.js +2 -2
  286. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  287. package/build/module/Slider/Slider.js +22 -18
  288. package/build/module/Slider/Slider.js.map +1 -1
  289. package/build/module/SnackbarContent/SnackbarContent.js +24 -7
  290. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  291. package/build/module/Tab/Tab.js +22 -19
  292. package/build/module/Tab/Tab.js.map +1 -1
  293. package/build/module/Tab/TabProps.js +2 -1
  294. package/build/module/Tab/TabProps.js.map +1 -1
  295. package/build/module/Tab/index.js +1 -0
  296. package/build/module/Tab/index.js.map +1 -1
  297. package/build/module/Tab/useVariantStyleMap.js +57 -16
  298. package/build/module/Tab/useVariantStyleMap.js.map +1 -1
  299. package/build/module/TabBase/TabBase.js +1 -8
  300. package/build/module/TabBase/TabBase.js.map +1 -1
  301. package/build/module/TabBase/TabBaseProps.js.map +1 -1
  302. package/build/module/Tabs/Tabs.js +31 -12
  303. package/build/module/Tabs/Tabs.js.map +1 -1
  304. package/build/module/Tabs/TabsProps.js.map +1 -1
  305. package/build/module/Tabs/index.js.map +1 -1
  306. package/build/module/Tabs/useTabsStyle.js +71 -0
  307. package/build/module/Tabs/useTabsStyle.js.map +1 -0
  308. package/build/module/TextField/TextField.js +99 -18
  309. package/build/module/TextField/TextField.js.map +1 -1
  310. package/build/module/TextField/TextFieldProps.js +1 -0
  311. package/build/module/TextField/TextFieldProps.js.map +1 -1
  312. package/build/module/TextField/useVariantStyleMap.js +49 -30
  313. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  314. package/build/module/Toolbar/BackButton/BackButton.js +32 -0
  315. package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
  316. package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
  317. package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  318. package/build/module/Toolbar/BackButton/index.js +2 -0
  319. package/build/module/Toolbar/BackButton/index.js.map +1 -0
  320. package/build/module/Toolbar/Toolbar.js +20 -12
  321. package/build/module/Toolbar/Toolbar.js.map +1 -1
  322. package/build/module/Toolbar/ToolbarProps.js.map +1 -1
  323. package/build/module/Tooltip/Beaks/index.js +4 -0
  324. package/build/module/Tooltip/Beaks/index.js.map +1 -1
  325. package/build/module/Tooltip/Tooltip.js +17 -16
  326. package/build/module/Tooltip/Tooltip.js.map +1 -1
  327. package/build/module/Tooltip/TooltipProps.js.map +1 -1
  328. package/build/module/Tooltip/index.js +1 -0
  329. package/build/module/Tooltip/index.js.map +1 -1
  330. package/build/module/Typography/Typography.js +9 -2
  331. package/build/module/Typography/Typography.js.map +1 -1
  332. package/build/module/Typography/TypographyProps.js.map +1 -1
  333. package/build/module/hooks/useCollapsibleAppBar.js +22 -13
  334. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  335. package/build/module/hooks/useContentContainerStyle.js +32 -13
  336. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  337. package/build/module/hooks/useFadeInAppBar.js +4 -4
  338. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  339. package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
  340. package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
  341. package/build/module/internal/icons/ChevronLeft.js +4 -2
  342. package/build/module/internal/icons/ChevronLeft.js.map +1 -1
  343. package/build/module/internal/icons/ChevronRight.js +4 -2
  344. package/build/module/internal/icons/ChevronRight.js.map +1 -1
  345. package/build/module/internal/icons/ChipClose.js +9 -0
  346. package/build/module/internal/icons/ChipClose.js.map +1 -0
  347. package/build/module/internal/icons/Clear.js +3 -3
  348. package/build/module/internal/icons/Clear.js.map +1 -1
  349. package/build/module/internal/icons/Close.js +4 -2
  350. package/build/module/internal/icons/Close.js.map +1 -1
  351. package/build/module/internal/icons/CloseCircleFillPierced.js +9 -0
  352. package/build/module/internal/icons/CloseCircleFillPierced.js.map +1 -0
  353. package/build/module/internal/icons/Search.js +2 -2
  354. package/build/module/internal/icons/Search.js.map +1 -1
  355. package/build/module/internal/icons/index.js +3 -0
  356. package/build/module/internal/icons/index.js.map +1 -1
  357. package/build/typescript/Accordion/Accordion.d.ts +0 -1
  358. package/build/typescript/Accordion/AccordionProps.d.ts +4 -1
  359. package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
  360. package/build/typescript/AspectRatio/AspectRatioNative.d.ts +0 -1
  361. package/build/typescript/AspectRatio/AspectRatioWeb.d.ts +0 -1
  362. package/build/typescript/Avatar/Avatar.d.ts +0 -1
  363. package/build/typescript/Badge/Badge.d.ts +0 -1
  364. package/build/typescript/Badge/BadgeProps.d.ts +10 -5
  365. package/build/typescript/BottomSheetActions/BottomSheetActions.d.ts +0 -1
  366. package/build/typescript/BottomSheetContent/BottomSheetContent.d.ts +0 -1
  367. package/build/typescript/BottomSheetTitle/BottomSheetTitle.d.ts +0 -1
  368. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +3 -3
  369. package/build/typescript/Button/Button.d.ts +0 -1
  370. package/build/typescript/Button/ButtonProps.d.ts +5 -0
  371. package/build/typescript/ButtonBase/ButtonBase.d.ts +0 -1
  372. package/build/typescript/ButtonBase/index.d.ts +1 -1
  373. package/build/typescript/ButtonSet/ButtonSet.d.ts +0 -1
  374. package/build/typescript/Card/Card.d.ts +0 -1
  375. package/build/typescript/CardActions/CardActions.d.ts +0 -1
  376. package/build/typescript/CardContent/CardContent.d.ts +0 -1
  377. package/build/typescript/CardMedia/CardMedia.d.ts +0 -1
  378. package/build/typescript/Checkbox/Checkbox.d.ts +0 -1
  379. package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
  380. package/build/typescript/Chip/Chip.d.ts +0 -1
  381. package/build/typescript/Chip/ChipProps.d.ts +18 -4
  382. package/build/typescript/Chip/index.d.ts +2 -2
  383. package/build/typescript/Chip/useChipStyle.d.ts +6 -3
  384. package/build/typescript/CircularProgress/CircularProgress.d.ts +0 -1
  385. package/build/typescript/Column/Column.d.ts +0 -1
  386. package/build/typescript/Dialog/Dialog.d.ts +0 -1
  387. package/build/typescript/Dialog/DialogProps.d.ts +1 -6
  388. package/build/typescript/Dialog/useDialogSectionStyle.d.ts +1 -2
  389. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  390. package/build/typescript/DialogActions/DialogActions.d.ts +0 -1
  391. package/build/typescript/DialogContent/DialogContent.d.ts +0 -1
  392. package/build/typescript/DialogMedia/DialogMedia.d.ts +0 -1
  393. package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +8 -0
  394. package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -2
  395. package/build/typescript/Divider/Divider.d.ts +0 -1
  396. package/build/typescript/Divider/DividerProps.d.ts +1 -1
  397. package/build/typescript/Empty/Empty.d.ts +0 -1
  398. package/build/typescript/Fab/Fab.d.ts +0 -1
  399. package/build/typescript/Flexbox/Flexbox.d.ts +0 -1
  400. package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
  401. package/build/typescript/IconButton/IconButton.d.ts +0 -1
  402. package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
  403. package/build/typescript/Image/Image.d.ts +6 -2
  404. package/build/typescript/Image/ImageProps.d.ts +6 -0
  405. package/build/typescript/Image/OverlayCloseButton/OverlayCloseButton.d.ts +2 -0
  406. package/build/typescript/Image/OverlayCloseButton/OverlayCloseButtonProps.d.ts +3 -0
  407. package/build/typescript/Image/OverlayCloseButton/index.d.ts +2 -0
  408. package/build/typescript/Image/preload.d.ts +2 -0
  409. package/build/typescript/Image/preload.native.d.ts +2 -0
  410. package/build/typescript/ImageCore/ImageCoreNative.d.ts +0 -1
  411. package/build/typescript/ImageCore/ImageCoreProps.d.ts +1 -0
  412. package/build/typescript/ImageCore/ImageCoreWeb.d.ts +0 -1
  413. package/build/typescript/Link/Link.d.ts +0 -1
  414. package/build/typescript/List/List.d.ts +0 -1
  415. package/build/typescript/ListItem/ListItem.d.ts +0 -1
  416. package/build/typescript/ListItemIcon/ListItemIcon.d.ts +0 -1
  417. package/build/typescript/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +0 -1
  418. package/build/typescript/ListItemText/ListItemText.d.ts +0 -1
  419. package/build/typescript/ListSubheader/ListSubheader.d.ts +0 -1
  420. package/build/typescript/Menu/Menu.d.ts +0 -1
  421. package/build/typescript/MenuItem/MenuItem.d.ts +0 -1
  422. package/build/typescript/Modal/AnimatedContainer/index.d.ts +0 -1
  423. package/build/typescript/Modal/Modal.d.ts +0 -1
  424. package/build/typescript/Modal/ModalProps.d.ts +8 -0
  425. package/build/typescript/Pagination/NumberPagination.d.ts +0 -1
  426. package/build/typescript/Pagination/Pagination.d.ts +0 -1
  427. package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
  428. package/build/typescript/Pagination/index.d.ts +2 -2
  429. package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
  430. package/build/typescript/Portal/Portal.d.ts +0 -1
  431. package/build/typescript/Radio/Radio.d.ts +0 -1
  432. package/build/typescript/Radio/RadioProps.d.ts +4 -0
  433. package/build/typescript/RadioGroup/RadioGroup.d.ts +0 -1
  434. package/build/typescript/Row/Row.d.ts +0 -1
  435. package/build/typescript/Section/Section.d.ts +0 -1
  436. package/build/typescript/ShadowView/ShadowView.d.ts +0 -1
  437. package/build/typescript/ShadowView/ShadowView.native.d.ts +0 -1
  438. package/build/typescript/Slide/Slide.d.ts +0 -1
  439. package/build/typescript/Slider/Slider.d.ts +1 -1
  440. package/build/typescript/Snackbar/Snackbar.d.ts +0 -1
  441. package/build/typescript/SnackbarContent/SnackbarContent.d.ts +0 -1
  442. package/build/typescript/SnackbarContent/StatusIcon.d.ts +0 -1
  443. package/build/typescript/Spacer/Spacer.d.ts +0 -1
  444. package/build/typescript/SvgIcon/SvgIcon.d.ts +0 -1
  445. package/build/typescript/Switch/Switch.d.ts +0 -1
  446. package/build/typescript/Tab/Tab.d.ts +0 -1
  447. package/build/typescript/Tab/TabProps.d.ts +21 -2
  448. package/build/typescript/Tab/index.d.ts +2 -1
  449. package/build/typescript/Tab/useVariantStyleMap.d.ts +4 -2
  450. package/build/typescript/TabBase/TabBase.d.ts +0 -1
  451. package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
  452. package/build/typescript/Tabs/ScrollableTabsView.d.ts +0 -1
  453. package/build/typescript/Tabs/TabIndicator.d.ts +0 -1
  454. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  455. package/build/typescript/Tabs/TabsProps.d.ts +6 -1
  456. package/build/typescript/Tabs/index.d.ts +1 -1
  457. package/build/typescript/Tabs/useTabsStyle.d.ts +8 -0
  458. package/build/typescript/TextField/TextFieldProps.d.ts +13 -0
  459. package/build/typescript/TextField/useVariantStyleMap.d.ts +4 -2
  460. package/build/typescript/Toggle/Toggle.d.ts +0 -1
  461. package/build/typescript/Toolbar/BackButton/BackButton.d.ts +2 -0
  462. package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
  463. package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
  464. package/build/typescript/Toolbar/Toolbar.d.ts +6 -2
  465. package/build/typescript/Toolbar/ToolbarProps.d.ts +0 -5
  466. package/build/typescript/Tooltip/Beaks/Beak.d.ts +0 -1
  467. package/build/typescript/Tooltip/Beaks/HorizontalLargeBeak.d.ts +0 -1
  468. package/build/typescript/Tooltip/Beaks/HorizontalSmallBeak.d.ts +0 -1
  469. package/build/typescript/Tooltip/Beaks/VerticalLargeBeak.d.ts +0 -1
  470. package/build/typescript/Tooltip/Beaks/VerticalSmallBeak.d.ts +0 -1
  471. package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
  472. package/build/typescript/Tooltip/Tooltip.d.ts +0 -1
  473. package/build/typescript/Tooltip/TooltipProps.d.ts +2 -2
  474. package/build/typescript/Tooltip/index.d.ts +1 -0
  475. package/build/typescript/Typography/TypographyProps.d.ts +4 -0
  476. package/build/typescript/animated/AnimatedAppBar.d.ts +1 -2
  477. package/build/typescript/animated/AnimatedFlatList.d.ts +1 -2
  478. package/build/typescript/animated/AnimatedTypography.d.ts +1 -2
  479. package/build/typescript/hooks/useCollapsibleAppBar.d.ts +2 -1
  480. package/build/typescript/hooks/useContentContainerStyle.d.ts +2 -1
  481. package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +358 -0
  482. package/build/typescript/internal/icons/Check.d.ts +300 -73
  483. package/build/typescript/internal/icons/CheckCircle.d.ts +300 -73
  484. package/build/typescript/internal/icons/Checkbox.d.ts +300 -73
  485. package/build/typescript/internal/icons/CheckboxChecked.d.ts +300 -73
  486. package/build/typescript/internal/icons/CheckboxOn.d.ts +300 -73
  487. package/build/typescript/internal/icons/ChevronDown.d.ts +300 -73
  488. package/build/typescript/internal/icons/ChevronLeft.d.ts +300 -73
  489. package/build/typescript/internal/icons/ChevronRight.d.ts +300 -73
  490. package/build/typescript/internal/icons/ChipClose.d.ts +358 -0
  491. package/build/typescript/internal/icons/CircularProgress.d.ts +0 -1
  492. package/build/typescript/internal/icons/Clear.d.ts +300 -73
  493. package/build/typescript/internal/icons/Close.d.ts +300 -73
  494. package/build/typescript/internal/icons/CloseCircleFillPierced.d.ts +358 -0
  495. package/build/typescript/internal/icons/EyeOff.d.ts +300 -73
  496. package/build/typescript/internal/icons/EyeOn.d.ts +300 -73
  497. package/build/typescript/internal/icons/InfoCircle.d.ts +300 -73
  498. package/build/typescript/internal/icons/LoadingSpinner/index.d.ts +0 -1
  499. package/build/typescript/internal/icons/LoadingSpinner/index.native.d.ts +0 -1
  500. package/build/typescript/internal/icons/Radio.d.ts +300 -73
  501. package/build/typescript/internal/icons/RadioChecked.d.ts +300 -73
  502. package/build/typescript/internal/icons/Search.d.ts +300 -73
  503. package/build/typescript/internal/icons/index.d.ts +3 -0
  504. package/package.json +10 -10
  505. package/src/Accordion/Accordion.tsx +23 -14
  506. package/src/Accordion/AccordionProps.ts +4 -2
  507. package/src/Accordion/useVariantStyleMap.ts +12 -4
  508. package/src/AppBar/AppBar.tsx +2 -2
  509. package/src/AspectRatio/AspectRatioNative.tsx +2 -2
  510. package/src/AspectRatio/AspectRatioWeb.tsx +3 -3
  511. package/src/Badge/Badge.tsx +4 -3
  512. package/src/Badge/BadgeProps.ts +12 -6
  513. package/src/BottomSheetTitle/BottomSheetTitle.tsx +6 -2
  514. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +3 -3
  515. package/src/Button/Button.tsx +28 -12
  516. package/src/Button/ButtonProps.ts +6 -0
  517. package/src/Button/useVariantStyleMap.ts +18 -0
  518. package/src/ButtonBase/ButtonBase.tsx +1 -1
  519. package/src/ButtonBase/index.ts +1 -1
  520. package/src/Checkbox/Checkbox.tsx +11 -8
  521. package/src/Checkbox/useVariantStyleMap.ts +6 -1
  522. package/src/Chip/Chip.tsx +27 -13
  523. package/src/Chip/ChipProps.ts +22 -4
  524. package/src/Chip/index.ts +2 -2
  525. package/src/Chip/useChipStyle.ts +75 -29
  526. package/src/Dialog/Dialog.tsx +13 -11
  527. package/src/Dialog/DialogProps.ts +1 -7
  528. package/src/Dialog/useDialogSectionStyle.ts +6 -4
  529. package/src/Dialog/useDialogStyle.ts +19 -7
  530. package/src/DialogActions/DialogActions.tsx +0 -1
  531. package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
  532. package/src/DialogTitle/DialogTitle.tsx +6 -1
  533. package/src/Divider/Divider.tsx +5 -0
  534. package/src/Divider/DividerProps.ts +1 -1
  535. package/src/Empty/Empty.tsx +1 -1
  536. package/src/Flexbox/Flexbox.tsx +2 -0
  537. package/src/Flexbox/FlexboxProps.ts +5 -0
  538. package/src/IconButton/IconButton.tsx +2 -0
  539. package/src/IconButton/IconButtonProps.ts +1 -0
  540. package/src/Image/Image.tsx +13 -4
  541. package/src/Image/ImageProps.ts +7 -0
  542. package/src/Image/OverlayCloseButton/OverlayCloseButton.tsx +41 -0
  543. package/src/Image/OverlayCloseButton/OverlayCloseButtonProps.ts +3 -0
  544. package/src/Image/OverlayCloseButton/index.ts +2 -0
  545. package/src/Image/preload.native.ts +6 -0
  546. package/src/Image/preload.ts +5 -0
  547. package/src/ImageCore/ImageCoreNative.tsx +13 -10
  548. package/src/ImageCore/ImageCoreProps.ts +1 -0
  549. package/src/ListItem/ListItem.tsx +5 -15
  550. package/src/ListItemText/ListItemText.tsx +2 -2
  551. package/src/ListSubheader/ListSubheader.tsx +1 -1
  552. package/src/Modal/Modal.tsx +12 -4
  553. package/src/Modal/ModalProps.ts +9 -0
  554. package/src/Pagination/NumberPagination.tsx +7 -2
  555. package/src/Pagination/Pagination.tsx +3 -2
  556. package/src/Pagination/PaginationProps.ts +15 -0
  557. package/src/Pagination/index.ts +2 -2
  558. package/src/PaginationItem/PaginationItem.tsx +31 -24
  559. package/src/PaginationItem/PaginationItemProps.ts +7 -0
  560. package/src/Radio/Radio.tsx +46 -17
  561. package/src/Radio/RadioProps.ts +6 -0
  562. package/src/RadioGroup/RadioGroup.tsx +2 -28
  563. package/src/ShadowView/ShadowView.native.tsx +2 -2
  564. package/src/Slider/Slider.tsx +1 -0
  565. package/src/SnackbarContent/SnackbarContent.tsx +35 -14
  566. package/src/Tab/Tab.tsx +32 -22
  567. package/src/Tab/TabProps.ts +25 -2
  568. package/src/Tab/index.ts +2 -1
  569. package/src/Tab/useVariantStyleMap.ts +70 -17
  570. package/src/TabBase/TabBase.tsx +1 -9
  571. package/src/TabBase/TabBaseProps.ts +0 -6
  572. package/src/Tabs/Tabs.tsx +40 -13
  573. package/src/Tabs/TabsProps.ts +7 -1
  574. package/src/Tabs/index.ts +1 -1
  575. package/src/Tabs/useTabsStyle.ts +79 -0
  576. package/src/TextField/TextField.tsx +142 -47
  577. package/src/TextField/TextFieldProps.ts +16 -0
  578. package/src/TextField/useVariantStyleMap.ts +57 -30
  579. package/src/Toolbar/BackButton/BackButton.tsx +42 -0
  580. package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
  581. package/src/Toolbar/BackButton/index.ts +2 -0
  582. package/src/Toolbar/Toolbar.tsx +26 -17
  583. package/src/Toolbar/ToolbarProps.ts +0 -6
  584. package/src/Tooltip/Beaks/index.ts +4 -0
  585. package/src/Tooltip/Tooltip.tsx +16 -13
  586. package/src/Tooltip/TooltipProps.ts +2 -2
  587. package/src/Tooltip/index.ts +1 -0
  588. package/src/Typography/Typography.tsx +3 -1
  589. package/src/Typography/TypographyProps.ts +5 -0
  590. package/src/hooks/useCollapsibleAppBar.ts +27 -24
  591. package/src/hooks/useContentContainerStyle.ts +29 -12
  592. package/src/hooks/useFadeInAppBar.ts +4 -4
  593. package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
  594. package/src/internal/icons/ChevronLeft.tsx +4 -1
  595. package/src/internal/icons/ChevronRight.tsx +4 -1
  596. package/src/internal/icons/ChipClose.tsx +13 -0
  597. package/src/internal/icons/Clear.tsx +3 -3
  598. package/src/internal/icons/Close.tsx +4 -1
  599. package/src/internal/icons/CloseCircleFillPierced.tsx +13 -0
  600. package/src/internal/icons/Search.tsx +2 -2
  601. package/src/internal/icons/index.ts +3 -0
  602. package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
  603. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
  604. package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
  605. package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
  606. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
  607. package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
@@ -11,6 +11,8 @@ var _reactNative = require("react-native");
11
11
 
12
12
  var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
13
13
 
14
+ var _Column = _interopRequireDefault(require("../Column"));
15
+
14
16
  var _internal = require("../internal");
15
17
 
16
18
  var _Row = _interopRequireDefault(require("../Row"));
@@ -21,6 +23,8 @@ var _utils = require("../utils");
21
23
 
22
24
  var _RadioContextProvider = require("../RadioGroup/RadioContextProvider");
23
25
 
26
+ var _Typography = _interopRequireDefault(require("../Typography"));
27
+
24
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
29
 
26
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -29,17 +33,22 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
29
33
 
30
34
  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); }
31
35
 
36
+ const DEFAULT_START_ICON_SIZE = 21;
37
+
32
38
  const useStyles = function () {
33
39
  const theme = (0, _styles.useTheme)();
34
40
  return {
35
41
  root: {
36
42
  alignItems: 'center',
43
+ borderBottomColor: theme.palette.border.weak,
44
+ borderBottomWidth: 0.5,
37
45
  flexDirection: 'row',
38
- gap: theme.spacing(8),
39
- justifyContent: 'space-between'
46
+ gap: 32,
47
+ justifyContent: 'space-between',
48
+ paddingVertical: 14
40
49
  },
41
50
  content: {
42
- gap: theme.spacing(2),
51
+ gap: 8,
43
52
  minHeight: 20
44
53
  }
45
54
  };
@@ -55,6 +64,7 @@ function Radio(props) {
55
64
  startIcon: startIconProp,
56
65
  style,
57
66
  value,
67
+ description,
58
68
  ...otherProps
59
69
  } = props;
60
70
  const theme = (0, _styles.useTheme)();
@@ -69,16 +79,17 @@ function Radio(props) {
69
79
  }
70
80
  };
71
81
 
72
- const isChecked = (context === null || context === void 0 ? void 0 : context.value) === value ?? checked;
82
+ const isChecked = context ? context.value === value : checked;
73
83
 
74
84
  const defaultCheckedIcon = /*#__PURE__*/_react.default.createElement(_internal.Check, {
75
85
  color: 'accent'
76
86
  });
77
87
 
78
88
  const checkedIcon = checkIconProp ?? defaultCheckedIcon;
79
- const icon = isChecked ? checkedIcon : null;
80
89
  const startIcon = (0, _utils.cloneElementSafely)(startIconProp, {
81
- color: 'strong'
90
+ color: 'strong',
91
+ height: DEFAULT_START_ICON_SIZE,
92
+ width: DEFAULT_START_ICON_SIZE
82
93
  });
83
94
  const rootStyle = (0, _styles.css)([styles.root, style]);
84
95
  const fontStyle = (0, _styles.createFontStyle)(theme, {
@@ -89,13 +100,25 @@ function Radio(props) {
89
100
  disabled: disabled,
90
101
  onPress: handlePress,
91
102
  style: rootStyle
92
- }, otherProps), /*#__PURE__*/_react.default.createElement(_Row.default, {
103
+ }, otherProps), /*#__PURE__*/_react.default.createElement(_Column.default, {
104
+ gap: 2,
105
+ flexShrink: 1
106
+ }, /*#__PURE__*/_react.default.createElement(_Row.default, {
93
107
  alignItems: 'center',
94
108
  style: styles.content
95
109
  }, startIcon, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
96
110
  children: children,
97
111
  style: fontStyle
98
- })), icon);
112
+ })), description ? /*#__PURE__*/_react.default.createElement(_Typography.default, {
113
+ variant: 'body3',
114
+ color: 'base',
115
+ weight: 'regular',
116
+ children: description
117
+ }) : null), /*#__PURE__*/_react.default.createElement(_Column.default, {
118
+ style: {
119
+ opacity: Number(isChecked)
120
+ }
121
+ }, checkedIcon));
99
122
  }
100
123
 
101
124
  ;
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","alignItems","flexDirection","gap","spacing","justifyContent","content","minHeight","Radio","props","checked","children","checkedIcon","checkIconProp","disabled","onChange","onChangeProp","startIcon","startIconProp","style","value","otherProps","styles","context","useContext","RadioContext","handlePress","isChecked","defaultCheckedIcon","icon","cloneElementSafely","color","rootStyle","css","fontStyle","createFontStyle","selector","typography","body1","regular","palette","text","strong"],"sources":["Radio.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { Check as CheckedIcon } from '../internal';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport { RadioContext } from '../RadioGroup/RadioContextProvider';\nimport type RadioProps from './RadioProps';\n\ntype RadioStyles = NamedStylesStringUnion<'root' | 'content'>;\n\nconst useStyles: UseStyles<RadioStyles> = function (): RadioStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: theme.spacing(8),\n justifyContent: 'space-between',\n },\n content: {\n gap: theme.spacing(2),\n minHeight: 20,\n },\n };\n};\n\nexport default function Radio(props: RadioProps) {\n const {\n checked = false,\n children,\n checkedIcon: checkIconProp,\n disabled = false,\n onChange: onChangeProp,\n startIcon: startIconProp,\n style,\n value,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const context = useContext(RadioContext);\n\n const handlePress = () => {\n const onChange = context?.onChange ?? onChangeProp;\n if (onChange) {\n onChange(value);\n }\n };\n\n const isChecked = context?.value === value ?? checked;\n\n const defaultCheckedIcon = (\n <CheckedIcon color={'accent'}/>\n );\n\n const checkedIcon = checkIconProp ?? defaultCheckedIcon;\n const icon = isChecked ? checkedIcon : null;\n\n const startIcon = cloneElementSafely(startIconProp, { color: 'strong' });\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body1.regular,\n color: theme.palette.text.strong,\n });\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <Row\n alignItems={'center'}\n style={styles.content}\n >\n {startIcon}\n\n <Text\n children={children}\n style={fontStyle}\n />\n </Row>\n\n {icon}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAKA,MAAMA,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,aAAa,EAAE,KAFb;MAGFC,GAAG,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd,CAHH;MAIFC,cAAc,EAAE;IAJd,CADH;IAOHC,OAAO,EAAE;MACLH,GAAG,EAAEL,KAAK,CAACM,OAAN,CAAc,CAAd,CADA;MAELG,SAAS,EAAE;IAFN;EAPN,CAAP;AAYH,CAfD;;AAiBe,SAASC,KAAT,CAAeC,KAAf,EAAkC;EAC7C,MAAM;IACFC,OAAO,GAAG,KADR;IAEFC,QAFE;IAGFC,WAAW,EAAEC,aAHX;IAIFC,QAAQ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BAAD;IACI,QAAQ,EAAE5B,QADd;IAEI,OAAO,EAAEY,WAFb;IAGI,KAAK,EAAEM;EAHX,GAIQX,UAJR,gBAMI,6BAAC,YAAD;IACI,UAAU,EAAE,QADhB;IAEI,KAAK,EAAEC,MAAM,CAAChB;EAFlB,GAIKW,SAJL,eAMI,6BAAC,iBAAD;IACI,QAAQ,EAAEN,QADd;IAEI,KAAK,EAAEuB;EAFX,EANJ,CANJ,EAkBKL,IAlBL,CADJ;AAsBH;;AAAA"}
1
+ {"version":3,"names":["DEFAULT_START_ICON_SIZE","useStyles","theme","useTheme","root","alignItems","borderBottomColor","palette","border","weak","borderBottomWidth","flexDirection","gap","justifyContent","paddingVertical","content","minHeight","Radio","props","checked","children","checkedIcon","checkIconProp","disabled","onChange","onChangeProp","startIcon","startIconProp","style","value","description","otherProps","styles","context","useContext","RadioContext","handlePress","isChecked","defaultCheckedIcon","cloneElementSafely","color","height","width","rootStyle","css","fontStyle","createFontStyle","selector","typography","body1","regular","text","strong","opacity","Number"],"sources":["Radio.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport Column from '../Column';\nimport { Check as CheckedIcon } from '../internal';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport { RadioContext } from '../RadioGroup/RadioContextProvider';\nimport type RadioProps from './RadioProps';\nimport Typography from '../Typography';\n\nconst DEFAULT_START_ICON_SIZE = 21;\n\ntype RadioStyles = NamedStylesStringUnion<'root' | 'content'>;\n\nconst useStyles: UseStyles<RadioStyles> = function (): RadioStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 0.5,\n flexDirection: 'row',\n gap: 32,\n justifyContent: 'space-between',\n paddingVertical: 14,\n },\n content: {\n gap: 8,\n minHeight: 20,\n },\n };\n};\n\nexport default function Radio(props: RadioProps) {\n const {\n checked = false,\n children,\n checkedIcon: checkIconProp,\n disabled = false,\n onChange: onChangeProp,\n startIcon: startIconProp,\n style,\n value,\n description,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const context = useContext(RadioContext);\n\n const handlePress = () => {\n const onChange = context?.onChange ?? onChangeProp;\n if (onChange) {\n onChange(value);\n }\n };\n\n const isChecked = context\n ? context.value === value\n : checked;\n\n const defaultCheckedIcon = (\n <CheckedIcon color={'accent'}/>\n );\n\n const checkedIcon = checkIconProp ?? defaultCheckedIcon;\n\n const startIcon = cloneElementSafely(startIconProp, {\n color: 'strong',\n height: DEFAULT_START_ICON_SIZE,\n width: DEFAULT_START_ICON_SIZE,\n });\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body1.regular,\n color: theme.palette.text.strong,\n });\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <Column\n gap={2}\n flexShrink={1}\n >\n <Row\n alignItems={'center'}\n style={styles.content}\n >\n {startIcon}\n\n <Text\n children={children}\n style={fontStyle}\n />\n </Row>\n\n {description ? (\n <Typography\n variant={'body3'}\n color={'base'}\n weight={'regular'}\n children={description}\n />\n ) : null}\n </Column>\n\n <Column style={{ opacity: Number(isChecked) }}>\n {checkedIcon}\n </Column>\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AAEA,MAAMA,uBAAuB,GAAG,EAAhC;;AAIA,MAAMC,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,iBAAiB,EAAEJ,KAAK,CAACK,OAAN,CAAcC,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C;EAHyC,CAAlC,CAAlB;EAMA,MAAM2C,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBZ,MAAM,CAAC5B,IADW,EAElBwB,KAFkB,CAAJ,CAAlB;EAKA,MAAMiB,SAAS,GAAG,IAAAC,uBAAA,EAAgB5C,KAAhB,EAAuB;IACrC6C,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,KAAX,CAAiBC,OADN;IAErCV,KAAK,EAAEtC,KAAK,CAACK,OAAN,CAAc4C,IAAd,CAAmBC;EAFW,CAAvB,CAAlB;EAKA,oBACI,6BAAC,mBAAD;IACI,QAAQ,EAAE7B,QADd;IAEI,OAAO,EAAEa,WAFb;IAGI,KAAK,EAAEO;EAHX,GAIQZ,UAJR,gBAMI,6BAAC,eAAD;IACI,GAAG,EAAE,CADT;IAEI,UAAU,EAAE;EAFhB,gBAII,6BAAC,YAAD;IACI,UAAU,EAAE,QADhB;IAEI,KAAK,EAAEC,MAAM,CAACjB;EAFlB,GAIKW,SAJL,eAMI,6BAAC,iBAAD;IACI,QAAQ,EAAEN,QADd;IAEI,KAAK,EAAEyB;EAFX,EANJ,CAJJ,EAgBKf,WAAW,gBACR,6BAAC,mBAAD;IACI,OAAO,EAAE,OADb;IAEI,KAAK,EAAE,MAFX;IAGI,MAAM,EAAE,SAHZ;IAII,QAAQ,EAAEA;EAJd,EADQ,GAOR,IAvBR,CANJ,eAgCI,6BAAC,eAAD;IAAQ,KAAK,EAAE;MAAEuB,OAAO,EAAEC,MAAM,CAACjB,SAAD;IAAjB;EAAf,GACKhB,WADL,CAhCJ,CADJ;AAsCH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["RadioProps.ts"],"sourcesContent":["import React from 'react';\nimport type { OverridableComponentProps } from '../types';\nimport type { ButtonBaseProps } from '../ButtonBase';\n\ntype BaseProps = Omit<ButtonBaseProps, 'onPress' | 'children'>;\n\nexport default interface RadioProps extends OverridableComponentProps<BaseProps, {\n /**\n * If `true`, the component is checked.\n * @default false\n */\n checked?: boolean;\n\n /**\n * Custom icon element to display when the radio is checked.\n */\n checkedIcon?: React.ReactNode;\n\n /**\n * Content which is sharing pressable next to radio.\n */\n children?: string;\n\n /**\n * If `true`, the radio is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Callback fired when the component is pressed.\n */\n onChange?: (newValue: string) => void;\n\n /**\n * Element placed before the children.\n */\n startIcon?: React.ReactElement;\n\n /**\n * Value of the component.\n */\n value: string;\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["RadioProps.ts"],"sourcesContent":["import React from 'react';\nimport type { OverridableComponentProps } from '../types';\nimport type { ButtonBaseProps } from '../ButtonBase';\n\ntype BaseProps = Omit<ButtonBaseProps, 'onPress' | 'children'>;\n\nexport default interface RadioProps extends OverridableComponentProps<BaseProps, {\n /**\n * If `true`, the component is checked.\n * @default false\n */\n checked?: boolean;\n\n /**\n * Custom icon element to display when the radio is checked.\n */\n checkedIcon?: React.ReactNode;\n\n /**\n * Content which is sharing pressable next to radio.\n */\n children?: string;\n\n /**\n * If `true`, the radio is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Callback fired when the component is pressed.\n */\n onChange?: (newValue: string) => void;\n\n /**\n * Element placed before the children.\n */\n startIcon?: React.ReactElement;\n\n /**\n * Value of the component.\n */\n value: string;\n\n\n /**\n * Helper text displayed below the children.\n */\n description?: string;\n}> {}\n"],"mappings":""}
@@ -5,33 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = RadioGroup;
7
7
 
8
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
- var _styles = require("../styles");
13
-
14
- var _utils = require("../utils");
15
-
16
12
  var _RadioContextProvider = _interopRequireDefault(require("./RadioContextProvider"));
17
13
 
18
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
15
 
20
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- const useStyles = function () {
25
- const theme = (0, _styles.useTheme)();
26
- return {
27
- root: {
28
- borderBottomColor: theme.palette.border.weak,
29
- borderBottomWidth: 0.5,
30
- paddingVertical: theme.spacing(3.5)
31
- }
32
- };
33
- };
34
-
35
16
  function RadioGroup(props) {
36
17
  const {
37
18
  children,
@@ -39,18 +20,12 @@ function RadioGroup(props) {
39
20
  onChange,
40
21
  ...otherProps
41
22
  } = props;
42
- const styles = useStyles();
43
-
44
- const radios = _react.Children.map(children, child => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
45
- style: styles.root
46
- }, (0, _utils.cloneElementSafely)(child)));
47
-
48
23
  return /*#__PURE__*/_react.default.createElement(_RadioContextProvider.default, {
49
24
  value: {
50
25
  value,
51
26
  onChange
52
27
  }
53
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, otherProps, radios));
28
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, otherProps, children));
54
29
  }
55
30
 
56
31
  ;
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","borderBottomColor","palette","border","weak","borderBottomWidth","paddingVertical","spacing","RadioGroup","props","children","value","onChange","otherProps","styles","radios","Children","map","child","cloneElementSafely"],"sources":["RadioGroup.tsx"],"sourcesContent":["import React, { Children } from 'react';\nimport { View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { FalsyReactElement } from '../utils';\nimport { cloneElementSafely } from '../utils';\nimport RadioContextProvider from './RadioContextProvider';\nimport type RadioGroupProps from './RadioGroupProps';\n\ntype RadioItemStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<RadioItemStyles> = function (): RadioItemStyles {\n const theme = useTheme();\n\n return {\n root: {\n borderBottomColor: theme.palette.border.weak,\n borderBottomWidth: 0.5,\n paddingVertical: theme.spacing(3.5),\n },\n };\n};\n\nexport default function RadioGroup(props: RadioGroupProps) {\n const {\n children,\n value,\n onChange,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const radios = Children.map(children, (child) => (\n <View style={styles.root}>\n {cloneElementSafely(child as FalsyReactElement)}\n </View>\n ));\n\n return (\n <RadioContextProvider value={{ value, onChange }}>\n <View {...otherProps}>\n {radios}\n </View>\n </RadioContextProvider>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;;;;;;;AAKA,MAAMA,SAAqC,GAAG,YAA6B;EACvE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,iBAAiB,EAAEH,KAAK,CAACI,OAAN,CAAcC,MAAd,CAAqBC,IADtC;MAEFC,iBAAiB,EAAE,GAFjB;MAGFC,eAAe,EAAER,KAAK,CAACS,OAAN,CAAc,GAAd;IAHf;EADH,CAAP;AAOH,CAVD;;AAYe,SAASC,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAFE;IAGFC,QAHE;IAIF,GAAGC;EAJD,IAKFJ,KALJ;EAOA,MAAMK,MAAM,GAAGjB,SAAS,EAAxB;;EAEA,MAAMkB,MAAM,GAAGC,eAAA,CAASC,GAAT,CAAaP,QAAb,EAAwBQ,KAAD,iBAClC,6BAAC,iBAAD;IAAM,KAAK,EAAEJ,MAAM,CAACd;EAApB,GACK,IAAAmB,yBAAA,EAAmBD,KAAnB,CADL,CADW,CAAf;;EAMA,oBACI,6BAAC,6BAAD;IAAsB,KAAK,EAAE;MAAEP,KAAF;MAASC;IAAT;EAA7B,gBACI,6BAAC,iBAAD,EAAUC,UAAV,EACKE,MADL,CADJ,CADJ;AAOH;;AAAA"}
1
+ {"version":3,"names":["RadioGroup","props","children","value","onChange","otherProps"],"sources":["RadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport RadioContextProvider from './RadioContextProvider';\nimport type RadioGroupProps from './RadioGroupProps';\n\nexport default function RadioGroup(props: RadioGroupProps) {\n const {\n children,\n value,\n onChange,\n ...otherProps\n } = props;\n\n return (\n <RadioContextProvider value={{ value, onChange }}>\n <View {...otherProps}>\n {children}\n </View>\n </RadioContextProvider>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAFE;IAGFC,QAHE;IAIF,GAAGC;EAJD,IAKFJ,KALJ;EAOA,oBACI,6BAAC,6BAAD;IAAsB,KAAK,EAAE;MAAEE,KAAF;MAASC;IAAT;EAA7B,gBACI,6BAAC,iBAAD,EAAUC,UAAV,EACKH,QADL,CADJ,CADJ;AAOH;;AAAA"}
@@ -32,7 +32,7 @@ function ShadowView(props) {
32
32
  maxHeight,
33
33
  maxWidth,
34
34
  width
35
- } = styleProp;
35
+ } = _reactNative.StyleSheet.flatten(styleProp) ?? {};
36
36
  return nativeShadows.reduce((accumulator, nativeShadow) => {
37
37
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
38
38
  style: (0, _styles.css)([{ ...nativeShadow
@@ -1 +1 @@
1
- {"version":3,"names":["ShadowView","props","children","style","styleProp","variant","otherProps","theme","useTheme","nativeShadows","shadow","borderRadius","height","maxHeight","maxWidth","width","reduce","accumulator","nativeShadow","css"],"sources":["ShadowView.native.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { FountainUiStyle, ShadowVariant } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type ShadowViewProps from './ShadowViewProps';\n\nexport default function ShadowView(props: ShadowViewProps) {\n const {\n children,\n style: styleProp = {},\n variant = 100 as ShadowVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const { nativeShadows } = theme.shadow[variant];\n\n const {\n borderRadius,\n height,\n maxHeight,\n maxWidth,\n width,\n } = styleProp as FountainUiStyle;\n\n return nativeShadows.reduce((accumulator, nativeShadow) => {\n return (\n <View\n style={css([\n { ...nativeShadow },\n {\n borderRadius: borderRadius ?? 0,\n height,\n maxHeight,\n maxWidth,\n width,\n },\n ])}\n >\n {accumulator}\n </View>\n );\n }, (\n <View\n style={styleProp}\n {...otherProps}\n >\n {children}\n </View>\n ));\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAAS,GAAG,EAFjB;IAGFC,OAAO,GAAG,GAHR;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IAAEC;EAAF,IAAoBF,KAAK,CAACG,MAAN,CAAaL,OAAb,CAA1B;EAEA,MAAM;IACFM,YADE;IAEFC,MAFE;IAGFC,SAHE;IAIFC,QAJE;IAKFC;EALE,IAMFX,SANJ;EAQA,OAAOK,aAAa,CAACO,MAAd,CAAqB,CAACC,WAAD,EAAcC,YAAd,KAA+B;IACvD,oBACI,6BAAC,iBAAD;MACI,KAAK,EAAE,IAAAC,WAAA,EAAI,CACP,EAAE,GAAGD;MAAL,CADO,EAEP;QACIP,YAAY,EAAEA,YAAY,IAAI,CADlC;QAEIC,MAFJ;QAGIC,SAHJ;QAIIC,QAJJ;QAKIC;MALJ,CAFO,CAAJ;IADX,GAYKE,WAZL,CADJ;EAgBH,CAjBM,eAkBH,6BAAC,iBAAD;IACI,KAAK,EAAEb;EADX,GAEQE,UAFR,GAIKJ,QAJL,CAlBG,CAAP;AAyBH"}
1
+ {"version":3,"names":["ShadowView","props","children","style","styleProp","variant","otherProps","theme","useTheme","nativeShadows","shadow","borderRadius","height","maxHeight","maxWidth","width","StyleSheet","flatten","reduce","accumulator","nativeShadow","css"],"sources":["ShadowView.native.tsx"],"sourcesContent":["import React from 'react';\nimport { View, StyleSheet } from 'react-native';\nimport type { FountainUiStyle, ShadowVariant } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type ShadowViewProps from './ShadowViewProps';\n\nexport default function ShadowView(props: ShadowViewProps) {\n const {\n children,\n style: styleProp = {},\n variant = 100 as ShadowVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const { nativeShadows } = theme.shadow[variant];\n\n const {\n borderRadius,\n height,\n maxHeight,\n maxWidth,\n width,\n } = StyleSheet.flatten(styleProp) as FountainUiStyle ?? {};\n\n return nativeShadows.reduce((accumulator, nativeShadow) => {\n return (\n <View\n style={css([\n { ...nativeShadow },\n {\n borderRadius: borderRadius ?? 0,\n height,\n maxHeight,\n maxWidth,\n width,\n },\n ])}\n >\n {accumulator}\n </View>\n );\n }, (\n <View\n style={styleProp}\n {...otherProps}\n >\n {children}\n </View>\n ));\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAGe,SAASA,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAAS,GAAG,EAFjB;IAGFC,OAAO,GAAG,GAHR;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAM;IAAEC;EAAF,IAAoBF,KAAK,CAACG,MAAN,CAAaL,OAAb,CAA1B;EAEA,MAAM;IACFM,YADE;IAEFC,MAFE;IAGFC,SAHE;IAIFC,QAJE;IAKFC;EALE,IAMFC,uBAAA,CAAWC,OAAX,CAAmBb,SAAnB,KAAoD,EANxD;EAQA,OAAOK,aAAa,CAACS,MAAd,CAAqB,CAACC,WAAD,EAAcC,YAAd,KAA+B;IACvD,oBACI,6BAAC,iBAAD;MACI,KAAK,EAAE,IAAAC,WAAA,EAAI,CACP,EAAE,GAAGD;MAAL,CADO,EAEP;QACIT,YAAY,EAAEA,YAAY,IAAI,CADlC;QAEIC,MAFJ;QAGIC,SAHJ;QAIIC,QAJJ;QAKIC;MALJ,CAFO,CAAJ;IADX,GAYKI,WAZL,CADJ;EAgBH,CAjBM,eAkBH,6BAAC,iBAAD;IACI,KAAK,EAAEf;EADX,GAEQE,UAFR,GAIKJ,QAJL,CAlBG,CAAP;AAyBH"}
@@ -48,24 +48,28 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function Slider(props, ref
48
48
  const minimumTrackTintColor = theme.palette.primary.main;
49
49
  const maximumTrackTintColor = theme.palette.tertiary.main;
50
50
  const thumbTintColor = _reactNative.Platform.OS === 'android' ? theme.palette.primary.main : undefined;
51
- return /*#__PURE__*/_react.default.createElement(_slider.default, _extends({
52
- disabled: disabled,
53
- maximumValue: maximumValue,
54
- maximumTrackTintColor: maximumTrackTintColor,
55
- minimumValue: minimumValue,
56
- minimumTrackTintColor: minimumTrackTintColor,
57
- onSlidingComplete: onSlidingComplete,
58
- onValueChange: onValueChange //@ts-ignore
59
- ,
60
- ref: ref,
61
- step: step,
62
- thumbTintColor: thumbTintColor,
63
- value: value,
64
- style: [platformStyle, commonStyle, style],
65
- thumbImage: require('./resources/knob.png'),
66
- minimumTrackImage: require('./resources/min-track.png'),
67
- maximumTrackImage: require('./resources/max-track.png')
68
- }, otherProps));
51
+ return (
52
+ /*#__PURE__*/
53
+ // @ts-ignore - @react-native-community/slider has incorrect type definitions for JSX usage
54
+ _react.default.createElement(_slider.default, _extends({
55
+ disabled: disabled,
56
+ maximumValue: maximumValue,
57
+ maximumTrackTintColor: maximumTrackTintColor,
58
+ minimumValue: minimumValue,
59
+ minimumTrackTintColor: minimumTrackTintColor,
60
+ onSlidingComplete: onSlidingComplete,
61
+ onValueChange: onValueChange //@ts-ignore
62
+ ,
63
+ ref: ref,
64
+ step: step,
65
+ thumbTintColor: thumbTintColor,
66
+ value: value,
67
+ style: [platformStyle, commonStyle, style],
68
+ thumbImage: require('./resources/knob.png'),
69
+ minimumTrackImage: require('./resources/min-track.png'),
70
+ maximumTrackImage: require('./resources/max-track.png')
71
+ }, otherProps))
72
+ );
69
73
  });
70
74
 
71
75
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"names":["React","forwardRef","Slider","props","ref","disabled","step","minimumValue","maximumValue","onSlidingComplete","onValueChange","value","style","otherProps","theme","useTheme","platformStyle","Platform","select","ios","marginLeft","spacing","marginRight","android","commonStyle","height","minimumTrackTintColor","palette","primary","main","maximumTrackTintColor","tertiary","thumbTintColor","OS","undefined","require"],"sources":["Slider.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport RNSlider from '@react-native-community/slider';\nimport { useTheme } from '../styles';\nimport type SliderProps from './SliderProps';\n\nexport default React.forwardRef<RNSlider, SliderProps>(function Slider(props, ref) {\n const {\n disabled = false,\n step = 0,\n minimumValue = 0,\n maximumValue = 1,\n onSlidingComplete,\n onValueChange,\n value = 0,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n const platformStyle = Platform.select({\n ios: {\n marginLeft: -theme.spacing(1),\n marginRight: -theme.spacing(1),\n },\n android: {\n marginLeft: -theme.spacing(4),\n marginRight: -theme.spacing(4),\n },\n });\n const commonStyle = {\n height: 18,\n };\n\n const minimumTrackTintColor = theme.palette.primary.main;\n const maximumTrackTintColor = theme.palette.tertiary.main;\n const thumbTintColor = Platform.OS === 'android' ? theme.palette.primary.main : undefined;\n\n return (\n <RNSlider\n disabled={disabled}\n maximumValue={maximumValue}\n maximumTrackTintColor={maximumTrackTintColor}\n minimumValue={minimumValue}\n minimumTrackTintColor={minimumTrackTintColor}\n onSlidingComplete={onSlidingComplete}\n onValueChange={onValueChange}\n //@ts-ignore\n ref={ref}\n step={step}\n thumbTintColor={thumbTintColor}\n value={value}\n style={[platformStyle, commonStyle, style]}\n thumbImage={require('./resources/knob.png')}\n minimumTrackImage={require('./resources/min-track.png')}\n maximumTrackImage={require('./resources/max-track.png')}\n {...otherProps}\n />\n );\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;4BAGeA,cAAA,CAAMC,UAAN,CAAwC,SAASC,MAAT,CAAgBC,KAAhB,EAAuBC,GAAvB,EAA4B;EAC/E,MAAM;IACFC,QAAQ,GAAG,KADT;IAEFC,IAAI,GAAG,CAFL;IAGFC,YAAY,GAAG,CAHb;IAIFC,YAAY,GAAG,CAJb;IAKFC,iBALE;IAMFC,aANE;IAOFC,KAAK,GAAG,CAPN;IAQFC,KARE;IASF,GAAGC;EATD,IAUFV,KAVJ;EAYA,MAAMW,KAAK,GAAG,IAAAC,gBAAA,GAAd;;EACA,MAAMC,aAAa,GAAGC,qBAAA,CAASC,MAAT,CAAgB;IAClCC,GAAG,EAAE;MACDC,UAAU,EAAE,CAACN,KAAK,CAACO,OAAN,CAAc,CAAd,CADZ;MAEDC,WAAW,EAAE,CAACR,KAAK,CAACO,OAAN,CAAc,CAAd;IAFb,CAD6B;IAKlCE,OAAO,EAAE;MACLH,UAAU,EAAE,CAACN,KAAK,CAACO,OAAN,CAAc,CAAd,CADR;MAELC,WAAW,EAAE,CAACR,KAAK,CAACO,OAAN,CAAc,CAAd;IAFT;EALyB,CAAhB,CAAtB;;EAUA,MAAMG,WAAW,GAAG;IAChBC,MAAM,EAAE;EADQ,CAApB;EAIA,MAAMC,qBAAqB,GAAGZ,KAAK,CAACa,OAAN,CAAcC,OAAd,CAAsBC,IAApD;EACA,MAAMC,qBAAqB,GAAGhB,KAAK,CAACa,OAAN,CAAcI,QAAd,CAAuBF,IAArD;EACA,MAAMG,cAAc,GAAGf,qBAAA,CAASgB,EAAT,KAAgB,SAAhB,GAA4BnB,KAAK,CAACa,OAAN,CAAcC,OAAd,CAAsBC,IAAlD,GAAyDK,SAAhF;EAEA,oBACI,6BAAC,eAAD;IACI,QAAQ,EAAE7B,QADd;IAEI,YAAY,EAAEG,YAFlB;IAGI,qBAAqB,EAAEsB,qBAH3B;IAII,YAAY,EAAEvB,YAJlB;IAKI,qBAAqB,EAAEmB,qBAL3B;IAMI,iBAAiB,EAAEjB,iBANvB;IAOI,aAAa,EAAEC,aAPnB,CAQI;IARJ;IASI,GAAG,EAAEN,GATT;IAUI,IAAI,EAAEE,IAVV;IAWI,cAAc,EAAE0B,cAXpB;IAYI,KAAK,EAAErB,KAZX;IAaI,KAAK,EAAE,CAACK,aAAD,EAAgBQ,WAAhB,EAA6BZ,KAA7B,CAbX;IAcI,UAAU,EAAEuB,OAAO,CAAC,sBAAD,CAdvB;IAeI,iBAAiB,EAAEA,OAAO,CAAC,2BAAD,CAf9B;IAgBI,iBAAiB,EAAEA,OAAO,CAAC,2BAAD;EAhB9B,GAiBQtB,UAjBR,EADJ;AAqBH,CArDc,C"}
1
+ {"version":3,"names":["React","forwardRef","Slider","props","ref","disabled","step","minimumValue","maximumValue","onSlidingComplete","onValueChange","value","style","otherProps","theme","useTheme","platformStyle","Platform","select","ios","marginLeft","spacing","marginRight","android","commonStyle","height","minimumTrackTintColor","palette","primary","main","maximumTrackTintColor","tertiary","thumbTintColor","OS","undefined","require"],"sources":["Slider.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport RNSlider from '@react-native-community/slider';\nimport { useTheme } from '../styles';\nimport type SliderProps from './SliderProps';\n\nexport default React.forwardRef<RNSlider, SliderProps>(function Slider(props, ref) {\n const {\n disabled = false,\n step = 0,\n minimumValue = 0,\n maximumValue = 1,\n onSlidingComplete,\n onValueChange,\n value = 0,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n const platformStyle = Platform.select({\n ios: {\n marginLeft: -theme.spacing(1),\n marginRight: -theme.spacing(1),\n },\n android: {\n marginLeft: -theme.spacing(4),\n marginRight: -theme.spacing(4),\n },\n });\n const commonStyle = {\n height: 18,\n };\n\n const minimumTrackTintColor = theme.palette.primary.main;\n const maximumTrackTintColor = theme.palette.tertiary.main;\n const thumbTintColor = Platform.OS === 'android' ? theme.palette.primary.main : undefined;\n\n return (\n // @ts-ignore - @react-native-community/slider has incorrect type definitions for JSX usage\n <RNSlider\n disabled={disabled}\n maximumValue={maximumValue}\n maximumTrackTintColor={maximumTrackTintColor}\n minimumValue={minimumValue}\n minimumTrackTintColor={minimumTrackTintColor}\n onSlidingComplete={onSlidingComplete}\n onValueChange={onValueChange}\n //@ts-ignore\n ref={ref}\n step={step}\n thumbTintColor={thumbTintColor}\n value={value}\n style={[platformStyle, commonStyle, style]}\n thumbImage={require('./resources/knob.png')}\n minimumTrackImage={require('./resources/min-track.png')}\n maximumTrackImage={require('./resources/max-track.png')}\n {...otherProps}\n />\n );\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;4BAGeA,cAAA,CAAMC,UAAN,CAAwC,SAASC,MAAT,CAAgBC,KAAhB,EAAuBC,GAAvB,EAA4B;EAC/E,MAAM;IACFC,QAAQ,GAAG,KADT;IAEFC,IAAI,GAAG,CAFL;IAGFC,YAAY,GAAG,CAHb;IAIFC,YAAY,GAAG,CAJb;IAKFC,iBALE;IAMFC,aANE;IAOFC,KAAK,GAAG,CAPN;IAQFC,KARE;IASF,GAAGC;EATD,IAUFV,KAVJ;EAYA,MAAMW,KAAK,GAAG,IAAAC,gBAAA,GAAd;;EACA,MAAMC,aAAa,GA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IAhB9B,GAiBQtB,UAjBR;EAFJ;AAsBH,CAtDc,C"}
@@ -43,6 +43,14 @@ const useStyles = function () {
43
43
  },
44
44
  actionButton: {
45
45
  marginLeft: theme.spacing(6)
46
+ },
47
+ actionLabel: {
48
+ paddingBottom: theme.spacing(1.5),
49
+ paddingTop: theme.spacing(1.25)
50
+ },
51
+ actionElement: {
52
+ paddingLeft: theme.spacing(2),
53
+ paddingVertical: theme.spacing(1.25)
46
54
  }
47
55
  };
48
56
  };
@@ -62,17 +70,22 @@ function SnackbarContent(props) {
62
70
  const theme = (0, _styles2.useTheme)();
63
71
  const titleFontStyle = (0, _styles2.createFontStyle)(theme, {
64
72
  selector: _ => (0, _styles.typographyOf)({
65
- fontSize: 14,
66
- lineHeight: 18.2,
73
+ fontSize: 15,
74
+ lineHeight: 19.5,
67
75
  fontFamily: 'PretendardStd-SemiBold',
68
76
  letterSpacing: 0
69
77
  }),
70
78
  color: theme.palette.text.strongInverse
71
79
  });
72
80
  const messageFontStyle = (0, _styles2.createFontStyle)(theme, {
73
- selector: _ => (0, _styles.typographyOf)({
74
- fontSize: 13,
75
- lineHeight: 16.9,
81
+ selector: _ => title ? (0, _styles.typographyOf)({
82
+ fontSize: 12,
83
+ lineHeight: 15.6,
84
+ fontFamily: 'PretendardStd-Regular',
85
+ letterSpacing: 0
86
+ }) : (0, _styles.typographyOf)({
87
+ fontSize: 14,
88
+ lineHeight: 18.2,
76
89
  fontFamily: 'PretendardStd-Regular',
77
90
  letterSpacing: 0
78
91
  }),
@@ -113,10 +126,14 @@ function SnackbarContent(props) {
113
126
  flex: 1
114
127
  }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
115
128
  style: styles.actionButton
116
- }, typeof actionContent === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
129
+ }, typeof actionContent === 'string' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
130
+ style: styles.actionLabel
131
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
117
132
  children: actionContent,
118
133
  style: labelFontStyle
119
- }) : actionContent)) : null);
134
+ })) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
135
+ style: styles.actionElement
136
+ }, actionContent))) : null);
120
137
  }
121
138
 
122
139
  ;
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","alignItems","alignSelf","backgroundColor","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","css","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.9,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.25,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n color: theme.palette.text.accent,\n });\n\n const hasActionButton = !!(actionContent && onPress);\n\n const rootStyle = css([\n styles.root,\n startIcon ? { borderRadius: theme.shape.radius.xl } : undefined,\n hasActionButton ? { width: '100%' } : undefined,\n styleProp,\n ]);\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={rootStyle}\n {...otherProps}\n >\n {startIcon ? (\n <React.Fragment>\n {startIcon}\n\n <Spacer size={3}/>\n </React.Fragment>\n ) : status !== 'info' ? (\n <React.Fragment>\n <StatusIcon status={status}/>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Column>\n {title ? (\n <Typography\n children={title}\n style={css([titleFontStyle])}\n />\n ) : null}\n\n <Text\n children={message}\n style={css([messageFontStyle])}\n />\n </Column>\n\n {actionContent ? (\n <React.Fragment>\n <Spacer flex={1}/>\n\n <View style={styles.actionButton}>\n {typeof actionContent === 'string' ? (\n <Text\n children={actionContent}\n style={labelFontStyle}\n />\n ) : (actionContent)}\n </View>\n </React.Fragment>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAIA,MAAMA,SAA2C,GAAG,YAAmC;EACn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C,mBAAD;IAAY,MAAM,EAAEA;EAApB,EADJ,eAGI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EAHJ,CADA,GAMA,IAlBR,eAoBI,6BAAC,eAAD,QACKJ,KAAK,gBACF,6BAAC,mBAAD;IACI,QAAQ,EAAEA,KADd;IAEI,KAAK,EAAE,IAAAwB,YAAA,EAAI,CAAChB,cAAD,CAAJ;EAFX,EADE,GAKF,IANR,eAQI,6BAAC,iBAAD;IACI,QAAQ,EAAET,OADd;IAEI,KAAK,EAAE,IAAAyB,YAAA,EAAI,CAACJ,gBAAD,CAAJ;EAFX,EARJ,CApBJ,EAkCKtB,aAAa,gBACV,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,6BAAC,iBAAD;IAAM,KAAK,EAAES,MAAM,CAACb;EAApB,GACK,OAAOI,aAAP,KAAyB,QAAzB,gBACG,6BAAC,iBAAD;IACI,QAAQ,EAAEA,aADd;IAEI,KAAK,EAAEuB;EAFX,EADH,GAKIvB,aANT,CAHJ,CADU,GAaV,IA/CR,CADJ;AAmDH;;AAAA"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","flexDirection","alignItems","alignSelf","backgroundColor","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","actionLabel","actionElement","paddingLeft","paddingVertical","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","createFontStyle","selector","_","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","css","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton' | 'actionLabel' | 'actionElement'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n actionLabel: {\n paddingBottom: theme.spacing(1.5),\n paddingTop: theme.spacing(1.25),\n },\n actionElement: {\n paddingLeft: theme.spacing(2),\n paddingVertical: theme.spacing(1.25),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 15,\n lineHeight: 19.5,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (_) => title\n ? typographyOf({\n fontSize: 12,\n lineHeight: 15.6,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n })\n : typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.25,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n color: theme.palette.text.accent,\n });\n\n const hasActionButton = !!(actionContent && onPress);\n\n const rootStyle = css([\n styles.root,\n startIcon ? { borderRadius: theme.shape.radius.xl } : undefined,\n hasActionButton ? { width: '100%' } : undefined,\n styleProp,\n ]);\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={rootStyle}\n {...otherProps}\n >\n {startIcon ? (\n <React.Fragment>\n {startIcon}\n\n <Spacer size={3}/>\n </React.Fragment>\n ) : status !== 'info' ? (\n <React.Fragment>\n <StatusIcon status={status}/>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Column>\n {title ? (\n <Typography\n children={title}\n style={css([titleFontStyle])}\n />\n ) : null}\n\n <Text\n children={message}\n style={css([messageFontStyle])}\n />\n </Column>\n\n {actionContent ? (\n <React.Fragment>\n <Spacer flex={1}/>\n\n <View style={styles.actionButton}>\n {typeof actionContent === 'string' ? (\n <View style={styles.actionLabel}>\n <Text\n children={actionContent}\n style={labelFontStyle}\n />\n </View>\n ) : (\n <View style={styles.actionElement}>\n {actionContent}\n </View>\n )}\n </View>\n </React.Fragment>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAIA,MAAMA,SAA2C,GAAG,YAAmC;EACnF,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,aAAa,EAAE,KADb;MAEFC,UAAU,EAAE,QAFV;MAGFC,SAAS,EAAE,QAHT;MAIFC,eAAe,EAAEN,KAAK,CAACO,OAAN,CAAcC,OAAd,CAAsBC,MAJrC;MAKFC,YAAY,EAAE,EALZ;MAMFC,QAAQ,EAAE,GANR;MAOFC,aAAa,EAAEZ,KAAK,CAACa,OAAN,CAAc,IAAd,CAPb;MAQFC,iBAAiB,EAAEd,KAAK,CAACa,OAAN,CAAc,C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,MAAM,KAAK,MAAX,gBACA,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,mBAAD;IAAY,MAAM,EAAEA;EAApB,EADJ,eAGI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EAHJ,CADA,GAMA,IAlBR,eAoBI,6BAAC,eAAD,QACKJ,KAAK,gBACF,6BAAC,mBAAD;IACI,QAAQ,EAAEA,KADd;IAEI,KAAK,EAAE,IAAAwB,YAAA,EAAI,CAAChB,cAAD,CAAJ;EAFX,EADE,GAKF,IANR,eAQI,6BAAC,iBAAD;IACI,QAAQ,EAAET,OADd;IAEI,KAAK,EAAE,IAAAyB,YAAA,EAAI,CAACJ,gBAAD,CAAJ;EAFX,EARJ,CApBJ,EAkCKtB,aAAa,gBACV,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,eAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,6BAAC,iBAAD;IAAM,KAAK,EAAES,MAAM,CAACjB;EAApB,GACK,OAAOQ,aAAP,KAAyB,QAAzB,gBACG,6BAAC,iBAAD;IAAM,KAAK,EAAES,MAAM,CAACf;EAApB,gBACI,6BAAC,iBAAD;IACI,QAAQ,EAAEM,aADd;IAEI,KAAK,EAAEuB;EAFX,EADJ,CADH,gBAQG,6BAAC,iBAAD;IAAM,KAAK,EAAEd,MAAM,CAACd;EAApB,GACKK,aADL,CATR,CAHJ,CADU,GAmBV,IArDR,CADJ;AAyDH;;AAAA"}
@@ -11,8 +11,6 @@ var _reactNative = require("react-native");
11
11
 
12
12
  var _Badge = _interopRequireDefault(require("../Badge"));
13
13
 
14
- var _Spacer = _interopRequireDefault(require("../Spacer"));
15
-
16
14
  var _TabBase = _interopRequireDefault(require("../TabBase"));
17
15
 
18
16
  var _styles = require("../styles");
@@ -43,41 +41,45 @@ function Tab(props) {
43
41
  children,
44
42
  enableIndicator = false,
45
43
  icon: defaultIcon,
44
+ parentColor = 'default',
46
45
  selected = false,
47
46
  selectedIcon,
47
+ size = 'medium',
48
48
  variant = 'default',
49
49
  style: styleProp,
50
+ innerStyle: innerStyleProp,
50
51
  onTabInnerLayout,
51
52
  ...otherProps
52
53
  } = props;
53
- const theme = (0, _styles.useTheme)();
54
- const vertical = variant === 'bottom-navigation';
55
54
  const {
56
55
  container: containerStyle,
56
+ iconContainer: iconContainerStyle,
57
57
  inner: innerStyle,
58
58
  label: labelStyle
59
- } = (0, _useVariantStyleMap.default)(variant, selected);
59
+ } = (0, _useVariantStyleMap.default)(variant, selected, size, parentColor);
60
60
  const tabBaseStyle = (0, _styles.css)([styles.root, containerStyle, styleProp]);
61
- const tabInnerStyle = (0, _styles.css)([styles.filledInner, innerStyle]);
62
- const pressEffect = selected ? 'none' : 'opacity';
61
+ const tabInnerStyle = (0, _styles.css)([styles.filledInner, innerStyle, innerStyleProp]);
63
62
  const icon = selected ? selectedIcon || defaultIcon : defaultIcon;
64
- const iconColor = selected ? theme.palette.icon.strong : theme.palette.icon.base;
65
- const iconElement = (0, _utils.cloneElementSafely)(icon, {
66
- fill: iconColor
67
- });
63
+ const iconElement = (0, _utils.cloneElementSafely)(icon);
68
64
  const tabElement = typeof children !== 'string' ? (0, _utils.cloneElementSafely)(children, {
69
65
  selected
70
66
  }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconElement ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Badge.default, {
71
- invisible: !badgeVisible
72
- }, iconElement), /*#__PURE__*/_react.default.createElement(_Spacer.default, {
73
- size: 1.25
74
- })) : null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
67
+ horizontalOffset: -4,
68
+ invisible: !badgeVisible,
69
+ verticalOffset: -4
70
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
71
+ style: iconContainerStyle
72
+ }, iconElement)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
73
+ style: (0, _styles.css)(labelStyle)
74
+ }, children)) : /*#__PURE__*/_react.default.createElement(_Badge.default, {
75
+ horizontalOffset: -7,
76
+ invisible: !badgeVisible,
77
+ verticalOffset: 3
78
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
75
79
  style: (0, _styles.css)(labelStyle)
76
- }, children));
80
+ }, children)));
77
81
  return /*#__PURE__*/_react.default.createElement(_TabBase.default, _extends({
78
- pressEffect: pressEffect,
79
- style: tabBaseStyle,
80
- vertical: vertical
82
+ style: tabBaseStyle
81
83
  }, otherProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
82
84
  onLayout: onTabInnerLayout,
83
85
  style: tabInnerStyle
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","selected","selectedIcon","variant","style","styleProp","onTabInnerLayout","otherProps","theme","useTheme","vertical","container","containerStyle","inner","innerStyle","label","labelStyle","useVariantStyleMap","tabBaseStyle","css","tabInnerStyle","pressEffect","iconColor","palette","strong","base","iconElement","cloneElementSafely","fill","tabElement"],"sources":["Tab.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Badge from '../Badge';\nimport Spacer from '../Spacer';\nimport TabBase from '../TabBase';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type TabProps from './TabProps';\nimport type { TabVariant } from './TabProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n },\n filledInner: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport default function Tab(props: TabProps) {\n const {\n badgeVisible = false,\n children,\n enableIndicator = false,\n icon: defaultIcon,\n selected = false,\n selectedIcon,\n variant = 'default' as TabVariant,\n style: styleProp,\n onTabInnerLayout,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const vertical = variant === 'bottom-navigation';\n\n const {\n container: containerStyle,\n inner: innerStyle,\n label: labelStyle,\n } = useVariantStyleMap(variant, selected);\n\n const tabBaseStyle = css([\n styles.root,\n containerStyle,\n styleProp,\n ]);\n\n const tabInnerStyle = css([\n styles.filledInner,\n innerStyle,\n ]);\n\n const pressEffect = selected ? 'none' : 'opacity';\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconColor = selected ? theme.palette.icon.strong : theme.palette.icon.base;\n const iconElement = cloneElementSafely(icon, { fill: iconColor });\n\n const tabElement = typeof children !== 'string' ? (\n cloneElementSafely(children, {\n selected,\n })\n ) : (\n <React.Fragment>\n {iconElement ? (\n <React.Fragment>\n <Badge invisible={!badgeVisible}>\n {iconElement}\n </Badge>\n\n <Spacer size={1.25}/>\n </React.Fragment>\n ) : null}\n\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </React.Fragment>\n );\n\n return (\n <TabBase\n pressEffect={pressEffect}\n style={tabBaseStyle}\n vertical={vertical}\n {...otherProps}\n >\n <View onLayout={onTabInnerLayout} style={tabInnerStyle}>\n {tabElement}\n </View>\n </TabBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;AAEA,MAAMA,MAAM,GAAGC,kBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE,EACF;IACA,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,GAAwB;MAAEC,QAAQ,EAAE;IAAZ,CAAxB,GAA+C,EAAnD;EAFE,CADuB;EAK7BC,WAAW,EAAE;IACTC,UAAU,EAAE,QADH;IAETC,cAAc,EAAE;EAFP;AALgB,CAAlB,CAAf;;AAWe,SAASC,GAAT,CAAaC,KAAb,EAA8B;EACzC,MAAM;IACFC,YAAY,GAAG,KADb;IAEFC,QAFE;IAGFC,eAAe,GAAG,KAHhB;IAIFC,IAAI,EAAEC,WAJJ;IAKFC,QAAQ,GAAG,KALT;IAMFC,YANE;IAO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AAQ,IAAI,EAAE;EAAd,EALJ,CADQ,GAQR,IATR,eAWI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAP,WAAA,EAAIH,UAAJ;EAAb,GACKnB,QADL,CAXJ,CALJ;EAsBA,oBACI,6BAAC,gBAAD;IACI,WAAW,EAAEwB,WADjB;IAEI,KAAK,EAAEH,YAFX;IAGI,QAAQ,EAAER;EAHd,GAIQH,UAJR,gBAMI,6BAAC,iBAAD;IAAM,QAAQ,EAAED,gBAAhB;IAAkC,KAAK,EAAEc;EAAzC,GACKS,UADL,CANJ,CADJ;AAYH;;AAAA"}
1
+ {"version":3,"names":["styles","StyleSheet","create","root","Platform","OS","minWidth","filledInner","alignItems","justifyContent","Tab","props","badgeVisible","children","enableIndicator","icon","defaultIcon","parentColor","selected","selectedIcon","size","variant","style","styleProp","innerStyle","innerStyleProp","onTabInnerLayout","otherProps","container","containerStyle","iconContainer","iconContainerStyle","inner","label","labelStyle","useVariantStyleMap","tabBaseStyle","css","tabInnerStyle","iconElement","cloneElementSafely","tabElement"],"sources":["Tab.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, View } from 'react-native';\nimport Badge from '../Badge';\nimport TabBase from '../TabBase';\nimport type { TabsColor } from '../Tabs';\nimport { css, StyleSheet } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type TabProps from './TabProps';\nimport type { TabSize, TabVariant } from './TabProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n // TODO: Remove redundant platform checking\n ...(Platform.OS === 'web' ? { minWidth: 'auto' } : {}),\n },\n filledInner: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport default function Tab(props: TabProps) {\n const {\n badgeVisible = false,\n children,\n enableIndicator = false,\n icon: defaultIcon,\n parentColor = 'default' as TabsColor,\n selected = false,\n selectedIcon,\n size = 'medium' as TabSize,\n variant = 'default' as TabVariant,\n style: styleProp,\n innerStyle: innerStyleProp,\n onTabInnerLayout,\n ...otherProps\n } = props;\n\n const {\n container: containerStyle,\n iconContainer: iconContainerStyle,\n inner: innerStyle,\n label: labelStyle,\n } = useVariantStyleMap(variant, selected, size, parentColor);\n\n const tabBaseStyle = css([\n styles.root,\n containerStyle,\n styleProp,\n ]);\n\n const tabInnerStyle = css([\n styles.filledInner,\n innerStyle,\n innerStyleProp,\n ]);\n\n const icon = selected ? (selectedIcon || defaultIcon) : defaultIcon;\n const iconElement = cloneElementSafely(icon);\n\n const tabElement = typeof children !== 'string' ? (\n cloneElementSafely(children, {\n selected,\n })\n ) : (\n <React.Fragment>\n {iconElement ? (\n <React.Fragment>\n <Badge\n horizontalOffset={-4}\n invisible={!badgeVisible}\n verticalOffset={-4}\n >\n <View style={iconContainerStyle}>\n {iconElement}\n </View>\n </Badge>\n\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </React.Fragment>\n ) : (\n <Badge\n horizontalOffset={-7}\n invisible={!badgeVisible}\n verticalOffset={3}\n >\n <Text style={css(labelStyle)}>\n {children}\n </Text>\n </Badge>\n )}\n </React.Fragment>\n );\n\n return (\n <TabBase\n style={tabBaseStyle}\n {...otherProps}\n >\n <View onLayout={onTabInnerLayout} style={tabInnerStyle}>\n {tabElement}\n </View>\n </TabBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAGA;;;;;;AAEA,MAAMA,MAAM,GAAGC,kBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE,EACF;IACA,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,GAAwB;MAAEC,QAAQ,EAAE;IAAZ,CAAxB,GAA+C,EAAnD;EAFE,CADuB;EAK7BC,WAAW,EAAE;IACTC,UAAU,EAAE,QADH;IAETC,cAAc,EAAE;EAFP;AALgB,CAAlB,CAAf;;AAWe,SAASC,GAAT,CAAaC,KAAb,EAA8B;EACzC,MAAM;IACFC,YAAY,GAAG,KADb;IAEFC,QAFE;IAGFC,eAAe,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,iBAAD;IAAM,KAAK,EAAE,IAAAF,WAAA,EAAIH,UAAJ;EAAb,GACKrB,QADL,CAXJ,CADQ,gBAiBR,6BAAC,cAAD;IACI,gBAAgB,EAAE,CAAC,CADvB;IAEI,SAAS,EAAE,CAACD,YAFhB;IAGI,cAAc,EAAE;EAHpB,gBAKI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAyB,WAAA,EAAIH,UAAJ;EAAb,GACKrB,QADL,CALJ,CAlBR,CALJ;EAoCA,oBACI,6BAAC,gBAAD;IACI,KAAK,EAAEuB;EADX,GAEQT,UAFR,gBAII,6BAAC,iBAAD;IAAM,QAAQ,EAAED,gBAAhB;IAAkC,KAAK,EAAEY;EAAzC,GACKG,UADL,CAJJ,CADJ;AAUH;;AAAA"}
@@ -3,7 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.tabVariants = void 0;
7
- const tabVariants = ['default', 'circular', 'bottom-navigation'];
6
+ exports.tabVariants = exports.tabSizes = void 0;
7
+ const tabSizes = ['small', 'medium'];
8
+ exports.tabSizes = tabSizes;
9
+ const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'];
8
10
  exports.tabVariants = tabVariants;
9
11
  //# sourceMappingURL=TabProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tabVariants"],"sources":["TabProps.ts"],"sourcesContent":["import React from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport type { TabBaseProps } from '../TabBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport const tabVariants = ['default', 'circular', 'bottom-navigation'] as const;\nexport type TabVariant = typeof tabVariants[number];\n\nexport default interface TabProps extends OverridableComponentProps<TabBaseProps, {\n /**\n * If `true`, the badge is visible.\n * @default false\n */\n badgeVisible?: boolean;\n\n /**\n * The label of the Tab.\n */\n children: string | React.ReactElement;\n\n /**\n * If `true`, the indicator is enabled.\n * @default false\n */\n enableIndicator?: boolean;\n\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected?: boolean;\n\n /**\n * Element placed before the children.\n */\n icon?: React.ReactElement;\n\n /**\n * If supplied, use this icon on selected state.\n */\n selectedIcon?: React.ReactElement;\n\n /**\n * The variant to use.\n * @default 'default'\n */\n variant?: TabVariant;\n\n /**\n * Function to be passed to the child component's onLayout prop.\n */\n onTabInnerLayout?: (event: LayoutChangeEvent) => void;\n}> {}\n"],"mappings":";;;;;;AAKO,MAAMA,WAAW,GAAG,CAAC,SAAD,EAAY,UAAZ,EAAwB,mBAAxB,CAApB"}
1
+ {"version":3,"names":["tabSizes","tabVariants"],"sources":["TabProps.ts"],"sourcesContent":["import React from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport type { TabBaseProps } from '../TabBase';\nimport type { TabsColor } from '../Tabs';\nimport type { ExtendedStyle, OverridableComponentProps } from '../types';\n\nexport const tabSizes = ['small', 'medium'] as const;\nexport type TabSize = typeof tabSizes[number];\n\nexport const tabVariants = ['default', 'circular', 'circular-home', 'bottom-navigation'] as const;\nexport type TabVariant = typeof tabVariants[number];\n\nexport default interface TabProps extends OverridableComponentProps<TabBaseProps, {\n /**\n * If `true`, the badge is visible.\n * @default false\n */\n badgeVisible?: boolean;\n\n /**\n * The label of the Tab.\n */\n children: string | React.ReactElement;\n\n /**\n * If `true`, the indicator is enabled.\n * @default false\n */\n enableIndicator?: boolean;\n\n /**\n * The color value inherited from the parent Tabs component.\n * This allows Tab components to apply consistent styling based on the Tabs container's color scheme.\n * @default 'default'\n */\n parentColor?: TabsColor;\n\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected?: boolean;\n\n /**\n * Element placed before the children.\n */\n icon?: React.ReactElement;\n\n /**\n * If supplied, use this icon on selected state.\n */\n selectedIcon?: React.ReactElement;\n\n /**\n * The size of the Tab.\n * @default 'medium'\n */\n size?: TabSize;\n\n /**\n * The variant to use.\n * @default 'default'\n */\n variant?: TabVariant;\n\n /**\n * Function to be passed to the child component's onLayout prop.\n */\n onTabInnerLayout?: (event: LayoutChangeEvent) => void;\n\n /**\n * Custom style to apply to the inner container of the Tab.\n * This allows customization of the tab's inner layout and appearance.\n */\n innerStyle?: ExtendedStyle | ExtendedStyle[];\n}> {}\n"],"mappings":";;;;;;AAMO,MAAMA,QAAQ,GAAG,CAAC,OAAD,EAAU,QAAV,CAAjB;;AAGA,MAAMC,WAAW,GAAG,CAAC,SAAD,EAAY,UAAZ,EAAwB,eAAxB,EAAyC,mBAAzC,CAApB"}
@@ -9,8 +9,22 @@ Object.defineProperty(exports, "default", {
9
9
  return _Tab.default;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "tabSizes", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _TabProps.tabSizes;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "tabVariants", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _TabProps.tabVariants;
22
+ }
23
+ });
12
24
 
13
25
  var _Tab = _interopRequireDefault(require("./Tab"));
14
26
 
27
+ var _TabProps = require("./TabProps");
28
+
15
29
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabVariant } from './TabProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tab';\nexport type { default as TabProps, TabSize, TabVariant } from './TabProps';\nexport { tabSizes, tabVariants } from './TabProps';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA"}