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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (445) hide show
  1. package/build/commonjs/Accordion/Accordion.js +7 -4
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/useVariantStyleMap.js +15 -8
  4. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  5. package/build/commonjs/AppBar/AppBar.js +6 -1
  6. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  7. package/build/commonjs/Badge/Badge.js +4 -3
  8. package/build/commonjs/Badge/Badge.js.map +1 -1
  9. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  10. package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
  11. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
  12. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +5 -2
  13. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  14. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  15. package/build/commonjs/Button/Button.js +26 -12
  16. package/build/commonjs/Button/Button.js.map +1 -1
  17. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  18. package/build/commonjs/Button/useVariantStyleMap.js +3 -1
  19. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
  20. package/build/commonjs/ButtonBase/index.js +2 -2
  21. package/build/commonjs/ButtonBase/index.js.map +1 -1
  22. package/build/commonjs/Checkbox/Checkbox.js +4 -1
  23. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  24. package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
  25. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  26. package/build/commonjs/Chip/Chip.js +21 -14
  27. package/build/commonjs/Chip/Chip.js.map +1 -1
  28. package/build/commonjs/Chip/ChipProps.js +3 -1
  29. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  30. package/build/commonjs/Chip/index.js +6 -0
  31. package/build/commonjs/Chip/index.js.map +1 -1
  32. package/build/commonjs/Chip/useChipStyle.js +29 -19
  33. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  34. package/build/commonjs/Dialog/Dialog.js +7 -10
  35. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  36. package/build/commonjs/Dialog/DialogProps.js +1 -1
  37. package/build/commonjs/Dialog/DialogProps.js.map +1 -1
  38. package/build/commonjs/Dialog/useDialogSectionStyle.js +6 -4
  39. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -1
  40. package/build/commonjs/Dialog/useDialogStyle.js +19 -8
  41. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  42. package/build/commonjs/DialogActions/DialogActions.js +0 -1
  43. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  44. package/build/commonjs/DialogTitle/DialogLargeTitle.js +80 -0
  45. package/build/commonjs/DialogTitle/DialogLargeTitle.js.map +1 -0
  46. package/build/commonjs/DialogTitle/DialogTitle.js +8 -4
  47. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  48. package/build/commonjs/Divider/Divider.js +17 -9
  49. package/build/commonjs/Divider/Divider.js.map +1 -1
  50. package/build/commonjs/Divider/DividerProps.js +1 -1
  51. package/build/commonjs/Divider/DividerProps.js.map +1 -1
  52. package/build/commonjs/Empty/Empty.js +1 -1
  53. package/build/commonjs/Empty/Empty.js.map +1 -1
  54. package/build/commonjs/Flexbox/Flexbox.js +2 -0
  55. package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
  56. package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
  57. package/build/commonjs/IconButton/IconButton.js +3 -0
  58. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  59. package/build/commonjs/IconButton/IconButtonProps.js +1 -1
  60. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  61. package/build/commonjs/ImageCore/ImageCoreNative.js +1 -1
  62. package/build/commonjs/ImageCore/ImageCoreNative.js.map +1 -1
  63. package/build/commonjs/ListItem/ListItem.js +38 -26
  64. package/build/commonjs/ListItem/ListItem.js.map +1 -1
  65. package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
  66. package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
  67. package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
  68. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  69. package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  70. package/build/commonjs/ListItemText/ListItemText.js +20 -21
  71. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  72. package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
  73. package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
  74. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  75. package/build/commonjs/Pagination/NumberPagination.js +1 -1
  76. package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
  77. package/build/commonjs/Pagination/Pagination.js +2 -0
  78. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  79. package/build/commonjs/Pagination/PaginationProps.js +3 -1
  80. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  81. package/build/commonjs/Pagination/index.js +6 -0
  82. package/build/commonjs/Pagination/index.js.map +1 -1
  83. package/build/commonjs/PaginationItem/PaginationItem.js +32 -22
  84. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  85. package/build/commonjs/PaginationItem/PaginationItemProps.js.map +1 -1
  86. package/build/commonjs/Radio/Radio.js +11 -4
  87. package/build/commonjs/Radio/Radio.js.map +1 -1
  88. package/build/commonjs/RadioGroup/RadioGroup.js +2 -27
  89. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  90. package/build/commonjs/Section/Section.js +32 -0
  91. package/build/commonjs/Section/Section.js.map +1 -0
  92. package/build/commonjs/Section/SectionProps.js +2 -0
  93. package/build/commonjs/Section/SectionProps.js.map +1 -0
  94. package/build/commonjs/Section/index.js +16 -0
  95. package/build/commonjs/Section/index.js.map +1 -0
  96. package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
  97. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  98. package/build/commonjs/SnackbarContent/SnackbarContent.js +26 -9
  99. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  100. package/build/commonjs/Tab/Tab.js +18 -18
  101. package/build/commonjs/Tab/Tab.js.map +1 -1
  102. package/build/commonjs/Tab/TabProps.js +4 -2
  103. package/build/commonjs/Tab/TabProps.js.map +1 -1
  104. package/build/commonjs/Tab/index.js +14 -0
  105. package/build/commonjs/Tab/index.js.map +1 -1
  106. package/build/commonjs/Tab/useVariantStyleMap.js +60 -16
  107. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
  108. package/build/commonjs/TabBase/TabBase.js +1 -8
  109. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  110. package/build/commonjs/TabBase/TabBaseProps.js.map +1 -1
  111. package/build/commonjs/Tabs/Tabs.js +9 -5
  112. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  113. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  114. package/build/commonjs/Tabs/useTabsStyle.js +54 -0
  115. package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
  116. package/build/commonjs/TextField/TextField.js +1 -1
  117. package/build/commonjs/TextField/TextField.js.map +1 -1
  118. package/build/commonjs/TextField/useVariantStyleMap.js +4 -3
  119. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  120. package/build/commonjs/Toolbar/BackButton/BackButton.js +47 -0
  121. package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -0
  122. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js +2 -0
  123. package/build/commonjs/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  124. package/build/commonjs/Toolbar/BackButton/index.js +16 -0
  125. package/build/commonjs/Toolbar/BackButton/index.js.map +1 -0
  126. package/build/commonjs/Toolbar/Toolbar.js +8 -4
  127. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  128. package/build/commonjs/Tooltip/Beaks/index.js +32 -0
  129. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
  130. package/build/commonjs/Tooltip/Tooltip.js +11 -18
  131. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  132. package/build/commonjs/Tooltip/index.js +19 -0
  133. package/build/commonjs/Tooltip/index.js.map +1 -1
  134. package/build/commonjs/Typography/Typography.js +9 -2
  135. package/build/commonjs/Typography/Typography.js.map +1 -1
  136. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  137. package/build/commonjs/hooks/useBreakpointUp.js +4 -1
  138. package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
  139. package/build/commonjs/hooks/useCollapsibleAppBar.js +1 -1
  140. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  141. package/build/commonjs/hooks/useContentContainerStyle.js +21 -28
  142. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  143. package/build/commonjs/hooks/useFadeInAppBar.js +1 -1
  144. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  145. package/build/commonjs/index.js +21 -0
  146. package/build/commonjs/index.js.map +1 -1
  147. package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
  148. package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
  149. package/build/commonjs/internal/icons/ChevronLeft.js +4 -2
  150. package/build/commonjs/internal/icons/ChevronLeft.js.map +1 -1
  151. package/build/commonjs/internal/icons/ChevronRight.js +4 -2
  152. package/build/commonjs/internal/icons/ChevronRight.js.map +1 -1
  153. package/build/commonjs/internal/icons/Close.js +4 -2
  154. package/build/commonjs/internal/icons/Close.js.map +1 -1
  155. package/build/commonjs/internal/icons/index.js +8 -0
  156. package/build/commonjs/internal/icons/index.js.map +1 -1
  157. package/build/module/Accordion/Accordion.js +7 -4
  158. package/build/module/Accordion/Accordion.js.map +1 -1
  159. package/build/module/Accordion/useVariantStyleMap.js +15 -8
  160. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  161. package/build/module/AppBar/AppBar.js +5 -1
  162. package/build/module/AppBar/AppBar.js.map +1 -1
  163. package/build/module/Badge/Badge.js +4 -3
  164. package/build/module/Badge/Badge.js.map +1 -1
  165. package/build/module/Badge/BadgeProps.js.map +1 -1
  166. package/build/module/Badge/useVariantStyleMap.js +2 -2
  167. package/build/module/Badge/useVariantStyleMap.js.map +1 -1
  168. package/build/module/BottomSheetTitle/BottomSheetTitle.js +5 -2
  169. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
  170. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -1
  171. package/build/module/Button/Button.js +27 -13
  172. package/build/module/Button/Button.js.map +1 -1
  173. package/build/module/Button/ButtonProps.js.map +1 -1
  174. package/build/module/Button/useVariantStyleMap.js +3 -1
  175. package/build/module/Button/useVariantStyleMap.js.map +1 -1
  176. package/build/module/ButtonBase/index.js +1 -1
  177. package/build/module/ButtonBase/index.js.map +1 -1
  178. package/build/module/Checkbox/Checkbox.js +4 -1
  179. package/build/module/Checkbox/Checkbox.js.map +1 -1
  180. package/build/module/Checkbox/useVariantStyleMap.js +6 -2
  181. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  182. package/build/module/Chip/Chip.js +17 -13
  183. package/build/module/Chip/Chip.js.map +1 -1
  184. package/build/module/Chip/ChipProps.js +1 -0
  185. package/build/module/Chip/ChipProps.js.map +1 -1
  186. package/build/module/Chip/index.js +1 -1
  187. package/build/module/Chip/index.js.map +1 -1
  188. package/build/module/Chip/useChipStyle.js +29 -19
  189. package/build/module/Chip/useChipStyle.js.map +1 -1
  190. package/build/module/Dialog/Dialog.js +7 -9
  191. package/build/module/Dialog/Dialog.js.map +1 -1
  192. package/build/module/Dialog/DialogProps.js +1 -1
  193. package/build/module/Dialog/DialogProps.js.map +1 -1
  194. package/build/module/Dialog/useDialogSectionStyle.js +6 -4
  195. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -1
  196. package/build/module/Dialog/useDialogStyle.js +18 -8
  197. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  198. package/build/module/DialogActions/DialogActions.js +0 -1
  199. package/build/module/DialogActions/DialogActions.js.map +1 -1
  200. package/build/module/DialogTitle/DialogLargeTitle.js +65 -0
  201. package/build/module/DialogTitle/DialogLargeTitle.js.map +1 -0
  202. package/build/module/DialogTitle/DialogTitle.js +6 -3
  203. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  204. package/build/module/Divider/Divider.js +7 -0
  205. package/build/module/Divider/Divider.js.map +1 -1
  206. package/build/module/Divider/DividerProps.js +1 -1
  207. package/build/module/Divider/DividerProps.js.map +1 -1
  208. package/build/module/Empty/Empty.js +1 -1
  209. package/build/module/Empty/Empty.js.map +1 -1
  210. package/build/module/Flexbox/Flexbox.js +2 -0
  211. package/build/module/Flexbox/Flexbox.js.map +1 -1
  212. package/build/module/Flexbox/FlexboxProps.js.map +1 -1
  213. package/build/module/IconButton/IconButton.js +3 -0
  214. package/build/module/IconButton/IconButton.js.map +1 -1
  215. package/build/module/IconButton/IconButtonProps.js +1 -1
  216. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  217. package/build/module/ImageCore/ImageCoreNative.js +1 -1
  218. package/build/module/ImageCore/ImageCoreNative.js.map +1 -1
  219. package/build/module/ListItem/ListItem.js +36 -28
  220. package/build/module/ListItem/ListItem.js.map +1 -1
  221. package/build/module/ListItem/ListItemProps.js.map +1 -1
  222. package/build/module/ListItemIcon/ListItemIcon.js +1 -2
  223. package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
  224. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
  225. package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
  226. package/build/module/ListItemText/ListItemText.js +17 -19
  227. package/build/module/ListItemText/ListItemText.js.map +1 -1
  228. package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
  229. package/build/module/ListSubheader/ListSubheader.js +1 -1
  230. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  231. package/build/module/Pagination/NumberPagination.js +1 -1
  232. package/build/module/Pagination/NumberPagination.js.map +1 -1
  233. package/build/module/Pagination/Pagination.js +2 -0
  234. package/build/module/Pagination/Pagination.js.map +1 -1
  235. package/build/module/Pagination/PaginationProps.js +1 -0
  236. package/build/module/Pagination/PaginationProps.js.map +1 -1
  237. package/build/module/Pagination/index.js +1 -1
  238. package/build/module/Pagination/index.js.map +1 -1
  239. package/build/module/PaginationItem/PaginationItem.js +28 -21
  240. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  241. package/build/module/PaginationItem/PaginationItemProps.js.map +1 -1
  242. package/build/module/Radio/Radio.js +10 -4
  243. package/build/module/Radio/Radio.js.map +1 -1
  244. package/build/module/RadioGroup/RadioGroup.js +2 -20
  245. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  246. package/build/module/Section/Section.js +19 -0
  247. package/build/module/Section/Section.js.map +1 -0
  248. package/build/module/Section/SectionProps.js +2 -0
  249. package/build/module/Section/SectionProps.js.map +1 -0
  250. package/build/module/Section/index.js +2 -0
  251. package/build/module/Section/index.js.map +1 -0
  252. package/build/module/ShadowView/ShadowView.native.js +4 -0
  253. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  254. package/build/module/SnackbarContent/SnackbarContent.js +26 -9
  255. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  256. package/build/module/Tab/Tab.js +19 -18
  257. package/build/module/Tab/Tab.js.map +1 -1
  258. package/build/module/Tab/TabProps.js +2 -1
  259. package/build/module/Tab/TabProps.js.map +1 -1
  260. package/build/module/Tab/index.js +1 -0
  261. package/build/module/Tab/index.js.map +1 -1
  262. package/build/module/Tab/useVariantStyleMap.js +60 -16
  263. package/build/module/Tab/useVariantStyleMap.js.map +1 -1
  264. package/build/module/TabBase/TabBase.js +1 -8
  265. package/build/module/TabBase/TabBase.js.map +1 -1
  266. package/build/module/TabBase/TabBaseProps.js.map +1 -1
  267. package/build/module/Tabs/Tabs.js +8 -5
  268. package/build/module/Tabs/Tabs.js.map +1 -1
  269. package/build/module/Tabs/TabsProps.js.map +1 -1
  270. package/build/module/Tabs/useTabsStyle.js +44 -0
  271. package/build/module/Tabs/useTabsStyle.js.map +1 -0
  272. package/build/module/TextField/TextField.js +1 -1
  273. package/build/module/TextField/TextField.js.map +1 -1
  274. package/build/module/TextField/useVariantStyleMap.js +4 -3
  275. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  276. package/build/module/Toolbar/BackButton/BackButton.js +32 -0
  277. package/build/module/Toolbar/BackButton/BackButton.js.map +1 -0
  278. package/build/module/Toolbar/BackButton/BackButtonProps.js +2 -0
  279. package/build/module/Toolbar/BackButton/BackButtonProps.js.map +1 -0
  280. package/build/module/Toolbar/BackButton/index.js +2 -0
  281. package/build/module/Toolbar/BackButton/index.js.map +1 -0
  282. package/build/module/Toolbar/Toolbar.js +7 -3
  283. package/build/module/Toolbar/Toolbar.js.map +1 -1
  284. package/build/module/Tooltip/Beaks/index.js +4 -0
  285. package/build/module/Tooltip/Beaks/index.js.map +1 -1
  286. package/build/module/Tooltip/Tooltip.js +4 -10
  287. package/build/module/Tooltip/Tooltip.js.map +1 -1
  288. package/build/module/Tooltip/index.js +1 -0
  289. package/build/module/Tooltip/index.js.map +1 -1
  290. package/build/module/Typography/Typography.js +9 -2
  291. package/build/module/Typography/Typography.js.map +1 -1
  292. package/build/module/Typography/TypographyProps.js.map +1 -1
  293. package/build/module/hooks/useBreakpointUp.js +4 -1
  294. package/build/module/hooks/useBreakpointUp.js.map +1 -1
  295. package/build/module/hooks/useCollapsibleAppBar.js +1 -1
  296. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  297. package/build/module/hooks/useContentContainerStyle.js +23 -26
  298. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  299. package/build/module/hooks/useFadeInAppBar.js +1 -1
  300. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  301. package/build/module/index.js +2 -0
  302. package/build/module/index.js.map +1 -1
  303. package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
  304. package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
  305. package/build/module/internal/icons/ChevronLeft.js +4 -2
  306. package/build/module/internal/icons/ChevronLeft.js.map +1 -1
  307. package/build/module/internal/icons/ChevronRight.js +4 -2
  308. package/build/module/internal/icons/ChevronRight.js.map +1 -1
  309. package/build/module/internal/icons/Close.js +4 -2
  310. package/build/module/internal/icons/Close.js.map +1 -1
  311. package/build/module/internal/icons/index.js +1 -0
  312. package/build/module/internal/icons/index.js.map +1 -1
  313. package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
  314. package/build/typescript/Badge/BadgeProps.d.ts +10 -5
  315. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +1 -0
  316. package/build/typescript/Button/ButtonProps.d.ts +5 -0
  317. package/build/typescript/ButtonBase/index.d.ts +1 -1
  318. package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
  319. package/build/typescript/Chip/ChipProps.d.ts +11 -4
  320. package/build/typescript/Chip/index.d.ts +1 -1
  321. package/build/typescript/Chip/useChipStyle.d.ts +4 -3
  322. package/build/typescript/Dialog/DialogProps.d.ts +1 -6
  323. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  324. package/build/typescript/DialogTitle/DialogLargeTitle.d.ts +9 -0
  325. package/build/typescript/DialogTitle/DialogTitle.d.ts +6 -1
  326. package/build/typescript/Divider/DividerProps.d.ts +1 -1
  327. package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
  328. package/build/typescript/IconButton/IconButtonProps.d.ts +1 -1
  329. package/build/typescript/ListItem/ListItem.d.ts +1 -1
  330. package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
  331. package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
  332. package/build/typescript/Pagination/PaginationProps.d.ts +12 -0
  333. package/build/typescript/Pagination/index.d.ts +2 -2
  334. package/build/typescript/PaginationItem/PaginationItemProps.d.ts +6 -0
  335. package/build/typescript/Section/Section.d.ts +3 -0
  336. package/build/typescript/Section/SectionProps.d.ts +6 -0
  337. package/build/typescript/Section/index.d.ts +2 -0
  338. package/build/typescript/Tab/TabProps.d.ts +8 -1
  339. package/build/typescript/Tab/index.d.ts +2 -1
  340. package/build/typescript/Tab/useVariantStyleMap.d.ts +3 -2
  341. package/build/typescript/TabBase/TabBaseProps.d.ts +0 -5
  342. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  343. package/build/typescript/Tabs/TabsProps.d.ts +6 -1
  344. package/build/typescript/Tabs/useTabsStyle.d.ts +7 -0
  345. package/build/typescript/Toolbar/BackButton/BackButton.d.ts +3 -0
  346. package/build/typescript/Toolbar/BackButton/BackButtonProps.d.ts +4 -0
  347. package/build/typescript/Toolbar/BackButton/index.d.ts +2 -0
  348. package/build/typescript/Toolbar/Toolbar.d.ts +6 -1
  349. package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
  350. package/build/typescript/Tooltip/index.d.ts +1 -0
  351. package/build/typescript/Typography/TypographyProps.d.ts +4 -0
  352. package/build/typescript/hooks/useContentContainerStyle.d.ts +4 -8
  353. package/build/typescript/index.d.ts +2 -0
  354. package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
  355. package/build/typescript/internal/icons/index.d.ts +1 -0
  356. package/package.json +5 -5
  357. package/src/Accordion/Accordion.tsx +11 -8
  358. package/src/Accordion/useVariantStyleMap.ts +14 -6
  359. package/src/AppBar/AppBar.tsx +4 -0
  360. package/src/Badge/Badge.tsx +4 -3
  361. package/src/Badge/BadgeProps.ts +12 -6
  362. package/src/Badge/useVariantStyleMap.ts +2 -2
  363. package/src/BottomSheetTitle/BottomSheetTitle.tsx +4 -1
  364. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +1 -0
  365. package/src/Button/Button.tsx +28 -12
  366. package/src/Button/ButtonProps.ts +6 -0
  367. package/src/Button/useVariantStyleMap.ts +1 -1
  368. package/src/ButtonBase/index.ts +1 -1
  369. package/src/Checkbox/Checkbox.tsx +11 -8
  370. package/src/Checkbox/useVariantStyleMap.ts +6 -1
  371. package/src/Chip/Chip.tsx +20 -13
  372. package/src/Chip/ChipProps.ts +13 -4
  373. package/src/Chip/index.ts +1 -1
  374. package/src/Chip/useChipStyle.ts +34 -17
  375. package/src/Dialog/Dialog.tsx +8 -9
  376. package/src/Dialog/DialogProps.ts +1 -7
  377. package/src/Dialog/useDialogSectionStyle.ts +6 -4
  378. package/src/Dialog/useDialogStyle.ts +19 -7
  379. package/src/DialogActions/DialogActions.tsx +0 -1
  380. package/src/DialogTitle/DialogLargeTitle.tsx +95 -0
  381. package/src/DialogTitle/DialogTitle.tsx +6 -1
  382. package/src/Divider/Divider.tsx +5 -0
  383. package/src/Divider/DividerProps.ts +1 -1
  384. package/src/Empty/Empty.tsx +1 -1
  385. package/src/Flexbox/Flexbox.tsx +2 -0
  386. package/src/Flexbox/FlexboxProps.ts +5 -0
  387. package/src/IconButton/IconButton.tsx +2 -0
  388. package/src/IconButton/IconButtonProps.ts +1 -0
  389. package/src/ImageCore/ImageCoreNative.tsx +1 -1
  390. package/src/ListItem/ListItem.tsx +61 -30
  391. package/src/ListItem/ListItemProps.ts +5 -0
  392. package/src/ListItemIcon/ListItemIcon.tsx +1 -2
  393. package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
  394. package/src/ListItemText/ListItemText.tsx +20 -28
  395. package/src/ListItemText/ListItemTextProps.ts +2 -10
  396. package/src/ListSubheader/ListSubheader.tsx +1 -1
  397. package/src/Pagination/NumberPagination.tsx +1 -1
  398. package/src/Pagination/Pagination.tsx +3 -2
  399. package/src/Pagination/PaginationProps.ts +15 -0
  400. package/src/Pagination/index.ts +2 -2
  401. package/src/PaginationItem/PaginationItem.tsx +31 -24
  402. package/src/PaginationItem/PaginationItemProps.ts +7 -0
  403. package/src/Radio/Radio.tsx +12 -3
  404. package/src/RadioGroup/RadioGroup.tsx +2 -28
  405. package/src/Section/Section.tsx +26 -0
  406. package/src/Section/SectionProps.ts +6 -0
  407. package/src/Section/index.ts +2 -0
  408. package/src/ShadowView/ShadowView.native.tsx +4 -0
  409. package/src/SnackbarContent/SnackbarContent.tsx +36 -15
  410. package/src/Tab/Tab.tsx +28 -22
  411. package/src/Tab/TabProps.ts +10 -1
  412. package/src/Tab/index.ts +2 -1
  413. package/src/Tab/useVariantStyleMap.ts +65 -17
  414. package/src/TabBase/TabBase.tsx +1 -9
  415. package/src/TabBase/TabBaseProps.ts +0 -6
  416. package/src/Tabs/Tabs.tsx +7 -6
  417. package/src/Tabs/TabsProps.ts +7 -1
  418. package/src/Tabs/useTabsStyle.ts +49 -0
  419. package/src/TextField/TextField.tsx +1 -1
  420. package/src/TextField/useVariantStyleMap.ts +4 -3
  421. package/src/Toolbar/BackButton/BackButton.tsx +44 -0
  422. package/src/Toolbar/BackButton/BackButtonProps.ts +4 -0
  423. package/src/Toolbar/BackButton/index.ts +2 -0
  424. package/src/Toolbar/Toolbar.tsx +6 -1
  425. package/src/Tooltip/Beaks/index.ts +4 -0
  426. package/src/Tooltip/Tooltip.tsx +4 -9
  427. package/src/Tooltip/index.ts +1 -0
  428. package/src/Typography/Typography.tsx +3 -1
  429. package/src/Typography/TypographyProps.ts +5 -0
  430. package/src/hooks/useBreakpointUp.ts +3 -1
  431. package/src/hooks/useCollapsibleAppBar.ts +1 -1
  432. package/src/hooks/useContentContainerStyle.ts +26 -34
  433. package/src/hooks/useFadeInAppBar.ts +1 -1
  434. package/src/index.ts +3 -0
  435. package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
  436. package/src/internal/icons/ChevronLeft.tsx +4 -1
  437. package/src/internal/icons/ChevronRight.tsx +4 -1
  438. package/src/internal/icons/Close.tsx +4 -1
  439. package/src/internal/icons/index.ts +1 -0
  440. package/build/commonjs/ButtonBase/LegacyButtonBase.js +0 -126
  441. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +0 -1
  442. package/build/module/ButtonBase/LegacyButtonBase.js +0 -106
  443. package/build/module/ButtonBase/LegacyButtonBase.js.map +0 -1
  444. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +0 -5
  445. package/src/ButtonBase/LegacyButtonBase.tsx +0 -135
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["PaginationItemProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface PaginationItemProps extends OverridableComponentProps<ViewProps, {\n /**\n * If `true`, the pagination item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * If `true` the pagination item is selected.\n * @default false\n */\n selected?: boolean;\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["PaginationItemProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\nimport { PaginationColor } from '../Pagination';\n\nexport default interface PaginationItemProps extends OverridableComponentProps<ViewProps, {\n /**\n * Set color of dot.\n * @default 'base'\n */\n color?: PaginationColor;\n\n /**\n * If `true`, the pagination item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * If `true` the pagination item is selected.\n * @default false\n */\n selected?: boolean;\n}> {}\n"],"mappings":""}
@@ -29,17 +29,22 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
29
29
 
30
30
  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
31
 
32
+ const DEFAULT_START_ICON_SIZE = 21;
33
+
32
34
  const useStyles = function () {
33
35
  const theme = (0, _styles.useTheme)();
34
36
  return {
35
37
  root: {
36
38
  alignItems: 'center',
39
+ borderBottomColor: theme.palette.border.weak,
40
+ borderBottomWidth: 0.5,
37
41
  flexDirection: 'row',
38
- gap: theme.spacing(8),
39
- justifyContent: 'space-between'
42
+ gap: 32,
43
+ justifyContent: 'space-between',
44
+ paddingVertical: 14
40
45
  },
41
46
  content: {
42
- gap: theme.spacing(2),
47
+ gap: 8,
43
48
  minHeight: 20
44
49
  }
45
50
  };
@@ -78,7 +83,9 @@ function Radio(props) {
78
83
  const checkedIcon = checkIconProp ?? defaultCheckedIcon;
79
84
  const icon = isChecked ? checkedIcon : null;
80
85
  const startIcon = (0, _utils.cloneElementSafely)(startIconProp, {
81
- color: 'strong'
86
+ color: 'strong',
87
+ height: DEFAULT_START_ICON_SIZE,
88
+ width: DEFAULT_START_ICON_SIZE
82
89
  });
83
90
  const rootStyle = (0, _styles.css)([styles.root, style]);
84
91
  const fontStyle = (0, _styles.createFontStyle)(theme, {
@@ -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,S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X,CAAiBC,OADN;IAErCR,KAAK,EAAEjC,KAAK,CAAC0C,OAAN,CAAcC,IAAd,CAAmBC;EAFW,CAAvB,CAAlB;EAKA,oBACI,6BAAC,mBAAD;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","otherProps","styles","context","useContext","RadioContext","handlePress","isChecked","defaultCheckedIcon","icon","cloneElementSafely","color","height","width","rootStyle","css","fontStyle","createFontStyle","selector","typography","body1","regular","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\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 ...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, {\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 <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;;;;;;;;;;AAGA,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,MAAd,CAAqBC,IAFtC;MAGFC,iBAAiB,EAAE,GAHjB;MAIFC,aAAa,E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,KAAK,EAAE1C;EAHyC,CAAlC,CAAlB;EAMA,MAAM2C,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBb,MAAM,CAAC3B,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,EAAEY,WAFb;IAGI,KAAK,EAAEQ;EAHX,GAIQb,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,EAAEyB;EAFX,EANJ,CANJ,EAkBKP,IAlBL,CADJ;AAsBH;;AAAA"}
@@ -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"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = Section;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _reactNative = require("react-native");
11
+
12
+ var _hooks = require("../hooks");
13
+
14
+ var _styles = require("../styles");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ function Section(props) {
19
+ const {
20
+ children,
21
+ maxWidth,
22
+ style: styleProp
23
+ } = props;
24
+ const styles = (0, _hooks.useContentContainerStyle)({
25
+ maxWidth
26
+ });
27
+ const rootStyle = (0, _styles.css)([styles, styleProp]);
28
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
29
+ style: rootStyle
30
+ }, children);
31
+ }
32
+ //# sourceMappingURL=Section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Section","props","children","maxWidth","style","styleProp","styles","useContentContainerStyle","rootStyle","css"],"sources":["Section.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { useContentContainerStyle } from '../hooks';\nimport { css } from '../styles';\nimport type SectionProps from './SectionProps';\n\nexport default function Section(props: SectionProps) {\n const {\n children,\n maxWidth,\n style: styleProp,\n } = props;\n\n const styles = useContentContainerStyle({ maxWidth });\n\n const rootStyle = css([\n styles,\n styleProp,\n ]);\n\n return (\n <View style={rootStyle}>\n {children}\n </View>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAGe,SAASA,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QADE;IAEFC,QAFE;IAGFC,KAAK,EAAEC;EAHL,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAG,IAAAC,+BAAA,EAAyB;IAAEJ;EAAF,CAAzB,CAAf;EAEA,MAAMK,SAAS,GAAG,IAAAC,WAAA,EAAI,CAClBH,MADkB,EAElBD,SAFkB,CAAJ,CAAlB;EAKA,oBACI,6BAAC,iBAAD;IAAM,KAAK,EAAEG;EAAb,GACKN,QADL,CADJ;AAKH"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=SectionProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["SectionProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SectionProps extends OverridableComponentProps<ViewProps, {\n maxWidth?: number;\n}> {}\n"],"mappings":""}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Section.default;
10
+ }
11
+ });
12
+
13
+ var _Section = _interopRequireDefault(require("./Section"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Section';\nexport type { default as SectionProps } from './SectionProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -29,6 +29,8 @@ function ShadowView(props) {
29
29
  const {
30
30
  borderRadius,
31
31
  height,
32
+ maxHeight,
33
+ maxWidth,
32
34
  width
33
35
  } = styleProp;
34
36
  return nativeShadows.reduce((accumulator, nativeShadow) => {
@@ -37,6 +39,8 @@ function ShadowView(props) {
37
39
  }, {
38
40
  borderRadius: borderRadius ?? 0,
39
41
  height,
42
+ maxHeight,
43
+ maxWidth,
40
44
  width
41
45
  }])
42
46
  }, accumulator);
@@ -1 +1 @@
1
- {"version":3,"names":["ShadowView","props","children","style","styleProp","variant","otherProps","theme","useTheme","nativeShadows","shadow","borderRadius","height","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 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 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;EAHE,IAIFT,SAJJ;EAMA,OAAOK,aAAa,CAACK,MAAd,CAAqB,CAACC,WAAD,EAAcC,YAAd,KAA+B;IACvD,oBACI,6BAAC,iBAAD;MACI,KAAK,EAAE,IAAAC,WAAA,EAAI,CACP,EAAE,GAAGD;MAAL,CADO,EAEP;QACIL,YAAY,EAAEA,YAAY,IAAI,CADlC;QAEIC,MAFJ;QAGIC;MAHJ,CAFO,CAAJ;IADX,GAUKE,WAVL,CADJ;EAcH,CAfM,eAgBH,6BAAC,iBAAD;IACI,KAAK,EAAEX;EADX,GAEQE,UAFR,GAIKJ,QAJL,CAhBG,CAAP;AAuBH"}
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"}
@@ -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,18 +70,23 @@ 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,
67
- fontFamily: 'Pretendard-SemiBold',
73
+ fontSize: 15,
74
+ lineHeight: 19.5,
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,
76
- fontFamily: 'Pretendard-Regular',
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,
89
+ fontFamily: 'PretendardStd-Regular',
77
90
  letterSpacing: 0
78
91
  }),
79
92
  color: theme.palette.text.strongInverse
@@ -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: 'Pretendard-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: 'Pretendard-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;EACnF,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,aAAa,EAAE,KADb;MAEFC,UAAU,EAAE,QAF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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,CAAd,CARjB;MASFE,UAAU,EAAEf,KAAK,CAACa,OAAN,CAAc,CAAd;IATV,CADH;IAYHG,YAAY,EAAE;MACVC,UAAU,EAAEjB,KAAK,CA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AD;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");
@@ -45,39 +43,41 @@ function Tab(props) {
45
43
  icon: defaultIcon,
46
44
  selected = false,
47
45
  selectedIcon,
46
+ size = 'medium',
48
47
  variant = 'default',
49
48
  style: styleProp,
50
49
  onTabInnerLayout,
51
50
  ...otherProps
52
51
  } = props;
53
- const theme = (0, _styles.useTheme)();
54
- const vertical = variant === 'bottom-navigation';
55
52
  const {
56
53
  container: containerStyle,
54
+ iconContainer: iconContainerStyle,
57
55
  inner: innerStyle,
58
56
  label: labelStyle
59
- } = (0, _useVariantStyleMap.default)(variant, selected);
57
+ } = (0, _useVariantStyleMap.default)(variant, selected, size);
60
58
  const tabBaseStyle = (0, _styles.css)([styles.root, containerStyle, styleProp]);
61
59
  const tabInnerStyle = (0, _styles.css)([styles.filledInner, innerStyle]);
62
- const pressEffect = selected ? 'none' : 'opacity';
63
60
  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
- });
61
+ const iconElement = (0, _utils.cloneElementSafely)(icon);
68
62
  const tabElement = typeof children !== 'string' ? (0, _utils.cloneElementSafely)(children, {
69
63
  selected
70
64
  }) : /*#__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, {
65
+ horizontalOffset: -4,
66
+ invisible: !badgeVisible,
67
+ verticalOffset: -4
68
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
69
+ style: iconContainerStyle
70
+ }, iconElement)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
71
+ style: (0, _styles.css)(labelStyle)
72
+ }, children)) : /*#__PURE__*/_react.default.createElement(_Badge.default, {
73
+ horizontalOffset: -7,
74
+ invisible: !badgeVisible,
75
+ verticalOffset: 3
76
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
75
77
  style: (0, _styles.css)(labelStyle)
76
- }, children));
78
+ }, children)));
77
79
  return /*#__PURE__*/_react.default.createElement(_TabBase.default, _extends({
78
- pressEffect: pressEffect,
79
- style: tabBaseStyle,
80
- vertical: vertical
80
+ style: tabBaseStyle
81
81
  }, otherProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
82
82
  onLayout: onTabInnerLayout,
83
83
  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;IAOFC,OAAO,GAAG,SAPR;IAQFC,KAAK,EAAEC,SARL;IASFC,gBATE;IAUF,GAAGC;EAVD,IAWFZ,KAXJ;EAaA,MAAMa,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,QAAQ,GAAGP,OAAO,KAAK,mBAA7B;EAEA,MAAM;IACFQ,SAAS,EAAEC,cADT;IAEFC,KAAK,EAAEC,U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,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","selected","selectedIcon","size","variant","style","styleProp","onTabInnerLayout","otherProps","container","containerStyle","iconContainer","iconContainerStyle","inner","innerStyle","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 { 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 selected = false,\n selectedIcon,\n size = 'medium' as TabSize,\n variant = 'default' as TabVariant,\n style: styleProp,\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);\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 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;;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;IAOFC,IAAI,GAAG,QAPL;IAQFC,OAAO,GAAG,SARR;IASFC,KAAK,EAAEC,SATL;IAUFC,gBAVE;IAWF,GAAGC;EAXD,IAYFb,KAZJ;EAcA,MAAM;IACFc,SAAS,EAAEC,cADT;IAEFC,aAAa,EAAEC,kBAFb;IAGFC,KAAK,EAAEC,UAHL;IAIFC,KAAK,EAAEC;EAJL,IAKF,IAAAC,2BAAA,EAAmBb,O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AAzC,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 { 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 * 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"],"mappings":";;;;;;AAKO,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"}