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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (760) hide show
  1. package/build/commonjs/Accordion/Accordion.js +0 -1
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/index.js +2 -2
  4. package/build/commonjs/Accordion/index.js.map +1 -1
  5. package/build/commonjs/Accordion/useVariantStyleMap.js +4 -2
  6. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
  7. package/build/commonjs/AppBar/AppBar.js +8 -8
  8. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  9. package/build/commonjs/AppBar/AppBarProps.js +7 -0
  10. package/build/commonjs/AppBar/AppBarProps.js.map +1 -1
  11. package/build/commonjs/AppBar/index.js.map +1 -1
  12. package/build/commonjs/Badge/index.js +2 -2
  13. package/build/commonjs/Badge/index.js.map +1 -1
  14. package/build/commonjs/Badge/useVariantStyleMap.js +15 -6
  15. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
  16. package/build/commonjs/{PaginationItem/LegacyPaginationItem.js → BottomSheetActions/BottomSheetActions.js} +10 -23
  17. package/build/commonjs/BottomSheetActions/BottomSheetActions.js.map +1 -0
  18. package/build/commonjs/BottomSheetActions/BottomSheetActionsProps.js +2 -0
  19. package/build/commonjs/BottomSheetActions/BottomSheetActionsProps.js.map +1 -0
  20. package/build/commonjs/BottomSheetActions/index.js +16 -0
  21. package/build/commonjs/BottomSheetActions/index.js.map +1 -0
  22. package/build/commonjs/{SvgIcon/LegacySvgIcon.js → BottomSheetContent/BottomSheetContent.js} +23 -23
  23. package/build/commonjs/BottomSheetContent/BottomSheetContent.js.map +1 -0
  24. package/build/commonjs/BottomSheetContent/BottomSheetContentProps.js +2 -0
  25. package/build/commonjs/BottomSheetContent/BottomSheetContentProps.js.map +1 -0
  26. package/build/commonjs/BottomSheetContent/index.js +16 -0
  27. package/build/commonjs/BottomSheetContent/index.js.map +1 -0
  28. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +73 -0
  29. package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -0
  30. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js +2 -0
  31. package/build/commonjs/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -0
  32. package/build/commonjs/{CheckboxGroup → BottomSheetTitle}/index.js +2 -2
  33. package/build/commonjs/BottomSheetTitle/index.js.map +1 -0
  34. package/build/commonjs/Button/Button.js +5 -8
  35. package/build/commonjs/Button/Button.js.map +1 -1
  36. package/build/commonjs/Button/index.js +2 -2
  37. package/build/commonjs/Button/index.js.map +1 -1
  38. package/build/commonjs/Button/useVariantStyleMap.js +10 -2
  39. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
  40. package/build/commonjs/Checkbox/Checkbox.js +0 -1
  41. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  42. package/build/commonjs/Checkbox/index.js +2 -2
  43. package/build/commonjs/Checkbox/index.js.map +1 -1
  44. package/build/commonjs/Checkbox/useVariantStyleMap.js +4 -1
  45. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
  46. package/build/commonjs/Chip/index.js +2 -2
  47. package/build/commonjs/Chip/index.js.map +1 -1
  48. package/build/commonjs/Chip/useChipStyle.js +15 -3
  49. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  50. package/build/commonjs/Dialog/Dialog.js +10 -21
  51. package/build/commonjs/Dialog/Dialog.js.map +1 -1
  52. package/build/commonjs/Dialog/DialogContext.js +19 -0
  53. package/build/commonjs/Dialog/DialogContext.js.map +1 -0
  54. package/build/commonjs/Dialog/index.js +24 -2
  55. package/build/commonjs/Dialog/index.js.map +1 -1
  56. package/build/commonjs/Dialog/useDialogSectionStyle.js +40 -0
  57. package/build/commonjs/Dialog/useDialogSectionStyle.js.map +1 -0
  58. package/build/commonjs/Dialog/useDialogStyle.js +16 -18
  59. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  60. package/build/commonjs/DialogActions/DialogActions.js +17 -2
  61. package/build/commonjs/DialogActions/DialogActions.js.map +1 -1
  62. package/build/commonjs/DialogActions/index.js +2 -2
  63. package/build/commonjs/DialogActions/index.js.map +1 -1
  64. package/build/commonjs/DialogContent/DialogContent.js +5 -1
  65. package/build/commonjs/DialogContent/DialogContent.js.map +1 -1
  66. package/build/commonjs/DialogContent/index.js +2 -2
  67. package/build/commonjs/DialogContent/index.js.map +1 -1
  68. package/build/commonjs/DialogMedia/DialogMedia.js +1 -0
  69. package/build/commonjs/DialogMedia/DialogMedia.js.map +1 -1
  70. package/build/commonjs/DialogMedia/index.js +2 -2
  71. package/build/commonjs/DialogMedia/index.js.map +1 -1
  72. package/build/commonjs/DialogTitle/DialogTitle.js +4 -1
  73. package/build/commonjs/DialogTitle/DialogTitle.js.map +1 -1
  74. package/build/commonjs/DialogTitle/index.js +2 -2
  75. package/build/commonjs/DialogTitle/index.js.map +1 -1
  76. package/build/commonjs/Divider/index.js +2 -2
  77. package/build/commonjs/Divider/index.js.map +1 -1
  78. package/build/commonjs/Empty/Empty.js +2 -2
  79. package/build/commonjs/Empty/Empty.js.map +1 -1
  80. package/build/commonjs/IconButton/IconButton.js +26 -2
  81. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  82. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  83. package/build/commonjs/IconButton/index.js +2 -2
  84. package/build/commonjs/IconButton/index.js.map +1 -1
  85. package/build/commonjs/ListItemText/ListItemText.js +4 -4
  86. package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
  87. package/build/commonjs/ListSubheader/ListSubheader.js +2 -2
  88. package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
  89. package/build/commonjs/Pagination/Pagination.js +0 -4
  90. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  91. package/build/commonjs/Pagination/index.js +2 -2
  92. package/build/commonjs/Pagination/index.js.map +1 -1
  93. package/build/commonjs/Radio/Radio.js +1 -2
  94. package/build/commonjs/Radio/Radio.js.map +1 -1
  95. package/build/commonjs/Radio/index.js +2 -2
  96. package/build/commonjs/Radio/index.js.map +1 -1
  97. package/build/commonjs/RadioGroup/index.js +2 -2
  98. package/build/commonjs/RadioGroup/index.js.map +1 -1
  99. package/build/commonjs/ShadowView/ShadowView.native.js +17 -5
  100. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
  101. package/build/commonjs/Snackbar/Snackbar.js +1 -1
  102. package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
  103. package/build/commonjs/Snackbar/index.js +2 -2
  104. package/build/commonjs/Snackbar/index.js.map +1 -1
  105. package/build/commonjs/SnackbarContent/SnackbarContent.js +15 -5
  106. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  107. package/build/commonjs/SnackbarContent/StatusIcon.js +0 -2
  108. package/build/commonjs/SnackbarContent/StatusIcon.js.map +1 -1
  109. package/build/commonjs/SnackbarContent/index.js +2 -2
  110. package/build/commonjs/SnackbarContent/index.js.map +1 -1
  111. package/build/commonjs/SvgIcon/index.js +2 -2
  112. package/build/commonjs/SvgIcon/index.js.map +1 -1
  113. package/build/commonjs/Tab/Tab.js +1 -1
  114. package/build/commonjs/Tab/Tab.js.map +1 -1
  115. package/build/commonjs/Tab/index.js +2 -2
  116. package/build/commonjs/Tab/index.js.map +1 -1
  117. package/build/commonjs/TabBase/index.js +2 -2
  118. package/build/commonjs/TabBase/index.js.map +1 -1
  119. package/build/commonjs/Tabs/Tabs.js +15 -3
  120. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  121. package/build/commonjs/Tabs/TabsProps.js +3 -1
  122. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  123. package/build/commonjs/Tabs/index.js +2 -2
  124. package/build/commonjs/Tabs/index.js.map +1 -1
  125. package/build/commonjs/TextField/TextField.js +0 -1
  126. package/build/commonjs/TextField/TextField.js.map +1 -1
  127. package/build/commonjs/TextField/index.js +2 -2
  128. package/build/commonjs/TextField/index.js.map +1 -1
  129. package/build/commonjs/Toggle/Toggle.js +5 -3
  130. package/build/commonjs/Toggle/Toggle.js.map +1 -1
  131. package/build/commonjs/Toolbar/Toolbar.js +17 -6
  132. package/build/commonjs/Toolbar/Toolbar.js.map +1 -1
  133. package/build/commonjs/Toolbar/ToolbarProps.js +7 -0
  134. package/build/commonjs/Toolbar/ToolbarProps.js.map +1 -1
  135. package/build/commonjs/Toolbar/index.js.map +1 -1
  136. package/build/commonjs/Tooltip/Tooltip.js +6 -1
  137. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  138. package/build/commonjs/Tooltip/index.js +2 -2
  139. package/build/commonjs/Tooltip/index.js.map +1 -1
  140. package/build/commonjs/Typography/index.js +2 -2
  141. package/build/commonjs/Typography/index.js.map +1 -1
  142. package/build/commonjs/index.js +63 -21
  143. package/build/commonjs/index.js.map +1 -1
  144. package/build/commonjs/internal/icons/LoadingSpinner/index.js +14 -4
  145. package/build/commonjs/internal/icons/LoadingSpinner/index.js.map +1 -1
  146. package/build/commonjs/internal/icons/LoadingSpinner/index.native.js +14 -4
  147. package/build/commonjs/internal/icons/LoadingSpinner/index.native.js.map +1 -1
  148. package/build/commonjs/utils/createSvgIcon.js +2 -10
  149. package/build/commonjs/utils/createSvgIcon.js.map +1 -1
  150. package/build/module/Accordion/Accordion.js +0 -1
  151. package/build/module/Accordion/Accordion.js.map +1 -1
  152. package/build/module/Accordion/index.js +1 -1
  153. package/build/module/Accordion/index.js.map +1 -1
  154. package/build/module/Accordion/useVariantStyleMap.js +4 -2
  155. package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
  156. package/build/module/AppBar/AppBar.js +8 -8
  157. package/build/module/AppBar/AppBar.js.map +1 -1
  158. package/build/module/AppBar/AppBarProps.js +1 -1
  159. package/build/module/AppBar/AppBarProps.js.map +1 -1
  160. package/build/module/AppBar/index.js.map +1 -1
  161. package/build/module/Badge/index.js +1 -1
  162. package/build/module/Badge/index.js.map +1 -1
  163. package/build/module/Badge/useVariantStyleMap.js +15 -6
  164. package/build/module/Badge/useVariantStyleMap.js.map +1 -1
  165. package/build/module/{PaginationItem/LegacyPaginationItem.js → BottomSheetActions/BottomSheetActions.js} +9 -20
  166. package/build/module/BottomSheetActions/BottomSheetActions.js.map +1 -0
  167. package/build/module/BottomSheetActions/BottomSheetActionsProps.js +2 -0
  168. package/build/module/BottomSheetActions/BottomSheetActionsProps.js.map +1 -0
  169. package/build/module/BottomSheetActions/index.js +2 -0
  170. package/build/module/BottomSheetActions/index.js.map +1 -0
  171. package/build/module/BottomSheetContent/BottomSheetContent.js +32 -0
  172. package/build/module/BottomSheetContent/BottomSheetContent.js.map +1 -0
  173. package/build/module/BottomSheetContent/BottomSheetContentProps.js +2 -0
  174. package/build/module/BottomSheetContent/BottomSheetContentProps.js.map +1 -0
  175. package/build/module/BottomSheetContent/index.js +2 -0
  176. package/build/module/BottomSheetContent/index.js.map +1 -0
  177. package/build/module/BottomSheetTitle/BottomSheetTitle.js +60 -0
  178. package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -0
  179. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js +2 -0
  180. package/build/module/BottomSheetTitle/BottomSheetTitleProps.js.map +1 -0
  181. package/build/module/BottomSheetTitle/index.js +2 -0
  182. package/build/module/BottomSheetTitle/index.js.map +1 -0
  183. package/build/module/Button/Button.js +6 -9
  184. package/build/module/Button/Button.js.map +1 -1
  185. package/build/module/Button/index.js +1 -1
  186. package/build/module/Button/index.js.map +1 -1
  187. package/build/module/Button/useVariantStyleMap.js +10 -2
  188. package/build/module/Button/useVariantStyleMap.js.map +1 -1
  189. package/build/module/Checkbox/Checkbox.js +0 -1
  190. package/build/module/Checkbox/Checkbox.js.map +1 -1
  191. package/build/module/Checkbox/index.js +1 -1
  192. package/build/module/Checkbox/index.js.map +1 -1
  193. package/build/module/Checkbox/useVariantStyleMap.js +4 -1
  194. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
  195. package/build/module/Chip/index.js +1 -1
  196. package/build/module/Chip/index.js.map +1 -1
  197. package/build/module/Chip/useChipStyle.js +14 -3
  198. package/build/module/Chip/useChipStyle.js.map +1 -1
  199. package/build/module/Dialog/Dialog.js +11 -19
  200. package/build/module/Dialog/Dialog.js.map +1 -1
  201. package/build/module/Dialog/DialogContext.js +7 -0
  202. package/build/module/Dialog/DialogContext.js.map +1 -0
  203. package/build/module/Dialog/index.js +3 -1
  204. package/build/module/Dialog/index.js.map +1 -1
  205. package/build/module/Dialog/useDialogSectionStyle.js +29 -0
  206. package/build/module/Dialog/useDialogSectionStyle.js.map +1 -0
  207. package/build/module/Dialog/useDialogStyle.js +16 -18
  208. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  209. package/build/module/DialogActions/DialogActions.js +18 -3
  210. package/build/module/DialogActions/DialogActions.js.map +1 -1
  211. package/build/module/DialogActions/index.js +1 -1
  212. package/build/module/DialogActions/index.js.map +1 -1
  213. package/build/module/DialogContent/DialogContent.js +4 -1
  214. package/build/module/DialogContent/DialogContent.js.map +1 -1
  215. package/build/module/DialogContent/index.js +1 -1
  216. package/build/module/DialogContent/index.js.map +1 -1
  217. package/build/module/DialogMedia/DialogMedia.js +1 -0
  218. package/build/module/DialogMedia/DialogMedia.js.map +1 -1
  219. package/build/module/DialogMedia/index.js +1 -1
  220. package/build/module/DialogMedia/index.js.map +1 -1
  221. package/build/module/DialogTitle/DialogTitle.js +3 -1
  222. package/build/module/DialogTitle/DialogTitle.js.map +1 -1
  223. package/build/module/DialogTitle/index.js +1 -1
  224. package/build/module/DialogTitle/index.js.map +1 -1
  225. package/build/module/Divider/index.js +1 -1
  226. package/build/module/Divider/index.js.map +1 -1
  227. package/build/module/Empty/Empty.js +2 -2
  228. package/build/module/Empty/Empty.js.map +1 -1
  229. package/build/module/IconButton/IconButton.js +25 -3
  230. package/build/module/IconButton/IconButton.js.map +1 -1
  231. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  232. package/build/module/IconButton/index.js +1 -1
  233. package/build/module/IconButton/index.js.map +1 -1
  234. package/build/module/ListItemText/ListItemText.js +4 -4
  235. package/build/module/ListItemText/ListItemText.js.map +1 -1
  236. package/build/module/ListSubheader/ListSubheader.js +2 -2
  237. package/build/module/ListSubheader/ListSubheader.js.map +1 -1
  238. package/build/module/Pagination/Pagination.js +0 -4
  239. package/build/module/Pagination/Pagination.js.map +1 -1
  240. package/build/module/Pagination/index.js +1 -1
  241. package/build/module/Pagination/index.js.map +1 -1
  242. package/build/module/Radio/Radio.js +1 -2
  243. package/build/module/Radio/Radio.js.map +1 -1
  244. package/build/module/Radio/index.js +1 -1
  245. package/build/module/Radio/index.js.map +1 -1
  246. package/build/module/RadioGroup/index.js +1 -1
  247. package/build/module/RadioGroup/index.js.map +1 -1
  248. package/build/module/ShadowView/ShadowView.native.js +17 -5
  249. package/build/module/ShadowView/ShadowView.native.js.map +1 -1
  250. package/build/module/Snackbar/Snackbar.js +1 -1
  251. package/build/module/Snackbar/Snackbar.js.map +1 -1
  252. package/build/module/Snackbar/index.js +1 -1
  253. package/build/module/Snackbar/index.js.map +1 -1
  254. package/build/module/SnackbarContent/SnackbarContent.js +16 -6
  255. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  256. package/build/module/SnackbarContent/StatusIcon.js +0 -2
  257. package/build/module/SnackbarContent/StatusIcon.js.map +1 -1
  258. package/build/module/SnackbarContent/index.js +1 -1
  259. package/build/module/SnackbarContent/index.js.map +1 -1
  260. package/build/module/SvgIcon/index.js +1 -1
  261. package/build/module/SvgIcon/index.js.map +1 -1
  262. package/build/module/Tab/Tab.js +1 -1
  263. package/build/module/Tab/Tab.js.map +1 -1
  264. package/build/module/Tab/index.js +1 -1
  265. package/build/module/Tab/index.js.map +1 -1
  266. package/build/module/TabBase/index.js +1 -1
  267. package/build/module/TabBase/index.js.map +1 -1
  268. package/build/module/Tabs/Tabs.js +15 -3
  269. package/build/module/Tabs/Tabs.js.map +1 -1
  270. package/build/module/Tabs/TabsProps.js +1 -0
  271. package/build/module/Tabs/TabsProps.js.map +1 -1
  272. package/build/module/Tabs/index.js +1 -1
  273. package/build/module/Tabs/index.js.map +1 -1
  274. package/build/module/TextField/TextField.js +0 -1
  275. package/build/module/TextField/TextField.js.map +1 -1
  276. package/build/module/TextField/index.js +1 -1
  277. package/build/module/TextField/index.js.map +1 -1
  278. package/build/module/Toggle/Toggle.js +5 -3
  279. package/build/module/Toggle/Toggle.js.map +1 -1
  280. package/build/module/Toolbar/Toolbar.js +16 -6
  281. package/build/module/Toolbar/Toolbar.js.map +1 -1
  282. package/build/module/Toolbar/ToolbarProps.js +1 -1
  283. package/build/module/Toolbar/ToolbarProps.js.map +1 -1
  284. package/build/module/Toolbar/index.js.map +1 -1
  285. package/build/module/Tooltip/Tooltip.js +6 -1
  286. package/build/module/Tooltip/Tooltip.js.map +1 -1
  287. package/build/module/Tooltip/index.js +1 -1
  288. package/build/module/Tooltip/index.js.map +1 -1
  289. package/build/module/Typography/index.js +1 -1
  290. package/build/module/Typography/index.js.map +1 -1
  291. package/build/module/index.js +6 -2
  292. package/build/module/index.js.map +1 -1
  293. package/build/module/internal/icons/LoadingSpinner/index.js +13 -4
  294. package/build/module/internal/icons/LoadingSpinner/index.js.map +1 -1
  295. package/build/module/internal/icons/LoadingSpinner/index.native.js +13 -4
  296. package/build/module/internal/icons/LoadingSpinner/index.native.js.map +1 -1
  297. package/build/module/utils/createSvgIcon.js +2 -9
  298. package/build/module/utils/createSvgIcon.js.map +1 -1
  299. package/build/typescript/Accordion/index.d.ts +2 -2
  300. package/build/typescript/AppBar/AppBarProps.d.ts +2 -1
  301. package/build/typescript/Badge/index.d.ts +2 -2
  302. package/build/typescript/BottomSheetActions/BottomSheetActions.d.ts +3 -0
  303. package/build/typescript/BottomSheetActions/BottomSheetActionsProps.d.ts +4 -0
  304. package/build/typescript/BottomSheetActions/index.d.ts +2 -0
  305. package/build/typescript/BottomSheetContent/BottomSheetContent.d.ts +3 -0
  306. package/build/typescript/BottomSheetContent/BottomSheetContentProps.d.ts +4 -0
  307. package/build/typescript/BottomSheetContent/index.d.ts +2 -0
  308. package/build/typescript/BottomSheetTitle/BottomSheetTitle.d.ts +3 -0
  309. package/build/typescript/BottomSheetTitle/BottomSheetTitleProps.d.ts +12 -0
  310. package/build/typescript/BottomSheetTitle/index.d.ts +2 -0
  311. package/build/typescript/Button/index.d.ts +2 -2
  312. package/build/typescript/Checkbox/index.d.ts +2 -2
  313. package/build/typescript/Chip/index.d.ts +2 -2
  314. package/build/typescript/Dialog/DialogContext.d.ts +7 -0
  315. package/build/typescript/Dialog/index.d.ts +4 -2
  316. package/build/typescript/Dialog/useDialogSectionStyle.d.ts +2 -0
  317. package/build/typescript/Dialog/useDialogStyle.d.ts +1 -1
  318. package/build/typescript/DialogActions/index.d.ts +1 -1
  319. package/build/typescript/DialogContent/index.d.ts +2 -2
  320. package/build/typescript/DialogMedia/index.d.ts +2 -2
  321. package/build/typescript/DialogTitle/index.d.ts +2 -2
  322. package/build/typescript/Divider/index.d.ts +2 -2
  323. package/build/typescript/IconButton/IconButtonProps.d.ts +5 -0
  324. package/build/typescript/IconButton/index.d.ts +2 -2
  325. package/build/typescript/Pagination/index.d.ts +2 -2
  326. package/build/typescript/Radio/index.d.ts +2 -2
  327. package/build/typescript/RadioGroup/index.d.ts +1 -1
  328. package/build/typescript/Snackbar/index.d.ts +2 -2
  329. package/build/typescript/SnackbarContent/index.d.ts +2 -2
  330. package/build/typescript/SvgIcon/index.d.ts +2 -2
  331. package/build/typescript/Tab/index.d.ts +2 -2
  332. package/build/typescript/TabBase/index.d.ts +1 -1
  333. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  334. package/build/typescript/Tabs/TabsProps.d.ts +8 -1
  335. package/build/typescript/Tabs/index.d.ts +2 -2
  336. package/build/typescript/TextField/index.d.ts +2 -2
  337. package/build/typescript/Toolbar/ToolbarProps.d.ts +9 -2
  338. package/build/typescript/Tooltip/index.d.ts +2 -2
  339. package/build/typescript/Typography/index.d.ts +2 -2
  340. package/build/typescript/index.d.ts +6 -2
  341. package/build/typescript/internal/icons/Check.d.ts +125 -2
  342. package/build/typescript/internal/icons/CheckCircle.d.ts +125 -2
  343. package/build/typescript/internal/icons/Checkbox.d.ts +125 -2
  344. package/build/typescript/internal/icons/CheckboxChecked.d.ts +125 -2
  345. package/build/typescript/internal/icons/CheckboxOn.d.ts +125 -2
  346. package/build/typescript/internal/icons/ChevronDown.d.ts +125 -2
  347. package/build/typescript/internal/icons/ChevronLeft.d.ts +125 -2
  348. package/build/typescript/internal/icons/ChevronRight.d.ts +125 -2
  349. package/build/typescript/internal/icons/Clear.d.ts +125 -2
  350. package/build/typescript/internal/icons/Close.d.ts +125 -2
  351. package/build/typescript/internal/icons/EyeOff.d.ts +125 -2
  352. package/build/typescript/internal/icons/EyeOn.d.ts +125 -2
  353. package/build/typescript/internal/icons/InfoCircle.d.ts +125 -2
  354. package/build/typescript/internal/icons/Radio.d.ts +125 -2
  355. package/build/typescript/internal/icons/RadioChecked.d.ts +125 -2
  356. package/build/typescript/internal/icons/Search.d.ts +125 -2
  357. package/build/typescript/utils/createSvgIcon.d.ts +1 -5
  358. package/package.json +4 -4
  359. package/src/Accordion/Accordion.tsx +0 -1
  360. package/src/Accordion/index.ts +2 -2
  361. package/src/Accordion/useVariantStyleMap.ts +2 -0
  362. package/src/AppBar/AppBar.tsx +7 -13
  363. package/src/AppBar/AppBarProps.ts +2 -1
  364. package/src/AppBar/index.ts +1 -1
  365. package/src/Badge/index.ts +2 -2
  366. package/src/Badge/useVariantStyleMap.ts +17 -7
  367. package/src/BottomSheetActions/BottomSheetActions.tsx +42 -0
  368. package/src/BottomSheetActions/BottomSheetActionsProps.ts +4 -0
  369. package/src/BottomSheetActions/index.ts +2 -0
  370. package/src/BottomSheetContent/BottomSheetContent.tsx +45 -0
  371. package/src/BottomSheetContent/BottomSheetContentProps.ts +4 -0
  372. package/src/BottomSheetContent/index.ts +2 -0
  373. package/src/BottomSheetTitle/BottomSheetTitle.tsx +83 -0
  374. package/src/BottomSheetTitle/BottomSheetTitleProps.ts +12 -0
  375. package/src/BottomSheetTitle/index.ts +2 -0
  376. package/src/Button/Button.tsx +11 -13
  377. package/src/Button/index.ts +2 -2
  378. package/src/Button/useVariantStyleMap.ts +10 -2
  379. package/src/Checkbox/Checkbox.tsx +0 -1
  380. package/src/Checkbox/index.ts +2 -2
  381. package/src/Checkbox/useVariantStyleMap.ts +3 -0
  382. package/src/Chip/index.ts +2 -2
  383. package/src/Chip/useChipStyle.ts +13 -2
  384. package/src/Dialog/Dialog.tsx +9 -19
  385. package/src/Dialog/DialogContext.tsx +14 -0
  386. package/src/Dialog/index.ts +4 -2
  387. package/src/Dialog/useDialogSectionStyle.ts +31 -0
  388. package/src/Dialog/useDialogStyle.ts +14 -22
  389. package/src/DialogActions/DialogActions.tsx +28 -3
  390. package/src/DialogActions/index.ts +1 -1
  391. package/src/DialogContent/DialogContent.tsx +5 -0
  392. package/src/DialogContent/index.ts +2 -2
  393. package/src/DialogMedia/DialogMedia.tsx +1 -0
  394. package/src/DialogMedia/index.ts +2 -2
  395. package/src/DialogTitle/DialogTitle.tsx +4 -0
  396. package/src/DialogTitle/index.ts +2 -2
  397. package/src/Divider/index.ts +2 -2
  398. package/src/Empty/Empty.tsx +2 -3
  399. package/src/IconButton/IconButton.tsx +33 -3
  400. package/src/IconButton/IconButtonProps.ts +6 -0
  401. package/src/IconButton/index.ts +2 -2
  402. package/src/ListItemText/ListItemText.tsx +4 -4
  403. package/src/ListSubheader/ListSubheader.tsx +2 -2
  404. package/src/Pagination/Pagination.tsx +0 -4
  405. package/src/Pagination/index.ts +2 -2
  406. package/src/Radio/Radio.tsx +1 -4
  407. package/src/Radio/index.ts +2 -2
  408. package/src/RadioGroup/index.ts +1 -1
  409. package/src/ShadowView/ShadowView.native.tsx +21 -10
  410. package/src/Snackbar/Snackbar.tsx +1 -1
  411. package/src/Snackbar/index.ts +2 -2
  412. package/src/SnackbarContent/SnackbarContent.tsx +21 -11
  413. package/src/SnackbarContent/StatusIcon.tsx +0 -2
  414. package/src/SnackbarContent/index.ts +2 -2
  415. package/src/SvgIcon/index.ts +2 -2
  416. package/src/Tab/Tab.tsx +1 -1
  417. package/src/Tab/index.ts +2 -2
  418. package/src/TabBase/index.ts +1 -1
  419. package/src/Tabs/Tabs.tsx +17 -3
  420. package/src/Tabs/TabsProps.ts +10 -1
  421. package/src/Tabs/index.ts +2 -2
  422. package/src/TextField/TextField.tsx +0 -1
  423. package/src/TextField/index.tsx +2 -2
  424. package/src/Toggle/Toggle.tsx +7 -5
  425. package/src/Toolbar/Toolbar.tsx +13 -6
  426. package/src/Toolbar/ToolbarProps.ts +11 -2
  427. package/src/Toolbar/index.ts +1 -1
  428. package/src/Tooltip/Tooltip.tsx +6 -1
  429. package/src/Tooltip/index.ts +2 -2
  430. package/src/Typography/index.ts +2 -2
  431. package/src/index.ts +9 -3
  432. package/src/internal/icons/LoadingSpinner/index.native.tsx +17 -7
  433. package/src/internal/icons/LoadingSpinner/index.tsx +17 -7
  434. package/src/utils/createSvgIcon.tsx +3 -21
  435. package/build/commonjs/Accordion/LegacyAccordion.js +0 -171
  436. package/build/commonjs/Accordion/LegacyAccordion.js.map +0 -1
  437. package/build/commonjs/Accordion/LegacyAccordionProps.js +0 -2
  438. package/build/commonjs/Accordion/LegacyAccordionProps.js.map +0 -1
  439. package/build/commonjs/Badge/LegacyBadge.js +0 -61
  440. package/build/commonjs/Badge/LegacyBadge.js.map +0 -1
  441. package/build/commonjs/Badge/LegacyBadgeProps.js +0 -2
  442. package/build/commonjs/Badge/LegacyBadgeProps.js.map +0 -1
  443. package/build/commonjs/Button/LegacyButton.js +0 -144
  444. package/build/commonjs/Button/LegacyButton.js.map +0 -1
  445. package/build/commonjs/Button/LegacyButtonProps.js +0 -2
  446. package/build/commonjs/Button/LegacyButtonProps.js.map +0 -1
  447. package/build/commonjs/Checkbox/LegacyCheckbox.js +0 -65
  448. package/build/commonjs/Checkbox/LegacyCheckbox.js.map +0 -1
  449. package/build/commonjs/Checkbox/LegacyCheckboxProps.js +0 -2
  450. package/build/commonjs/Checkbox/LegacyCheckboxProps.js.map +0 -1
  451. package/build/commonjs/CheckboxGroup/CheckboxGroup.js +0 -50
  452. package/build/commonjs/CheckboxGroup/CheckboxGroup.js.map +0 -1
  453. package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js +0 -2
  454. package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js.map +0 -1
  455. package/build/commonjs/CheckboxGroup/index.js.map +0 -1
  456. package/build/commonjs/Chip/LegacyChip.js +0 -98
  457. package/build/commonjs/Chip/LegacyChip.js.map +0 -1
  458. package/build/commonjs/Chip/LegacyChipProps.js +0 -2
  459. package/build/commonjs/Chip/LegacyChipProps.js.map +0 -1
  460. package/build/commonjs/Dialog/LegacyDialog.js +0 -181
  461. package/build/commonjs/Dialog/LegacyDialog.js.map +0 -1
  462. package/build/commonjs/Dialog/LegacyDialogProps.js +0 -2
  463. package/build/commonjs/Dialog/LegacyDialogProps.js.map +0 -1
  464. package/build/commonjs/DialogActions/LegacyDialogActions.js +0 -30
  465. package/build/commonjs/DialogActions/LegacyDialogActions.js.map +0 -1
  466. package/build/commonjs/DialogContent/LegacyDialogContent.js +0 -36
  467. package/build/commonjs/DialogContent/LegacyDialogContent.js.map +0 -1
  468. package/build/commonjs/DialogContent/LegacyDialogContentProps.js +0 -2
  469. package/build/commonjs/DialogContent/LegacyDialogContentProps.js.map +0 -1
  470. package/build/commonjs/DialogMedia/LegacyDialogMedia.js +0 -33
  471. package/build/commonjs/DialogMedia/LegacyDialogMedia.js.map +0 -1
  472. package/build/commonjs/DialogMedia/LegacyDialogMediaProps.js +0 -2
  473. package/build/commonjs/DialogMedia/LegacyDialogMediaProps.js.map +0 -1
  474. package/build/commonjs/DialogTitle/LegacyDialogTitle.js +0 -36
  475. package/build/commonjs/DialogTitle/LegacyDialogTitle.js.map +0 -1
  476. package/build/commonjs/DialogTitle/LegacyDialogTitleProps.js +0 -2
  477. package/build/commonjs/DialogTitle/LegacyDialogTitleProps.js.map +0 -1
  478. package/build/commonjs/Divider/LegacyDivider.js +0 -114
  479. package/build/commonjs/Divider/LegacyDivider.js.map +0 -1
  480. package/build/commonjs/Divider/LegacyDividerProps.js +0 -2
  481. package/build/commonjs/Divider/LegacyDividerProps.js.map +0 -1
  482. package/build/commonjs/IconButton/LegacyIconButton.js +0 -89
  483. package/build/commonjs/IconButton/LegacyIconButton.js.map +0 -1
  484. package/build/commonjs/IconButton/LegacyIconButtonProps.js +0 -2
  485. package/build/commonjs/IconButton/LegacyIconButtonProps.js.map +0 -1
  486. package/build/commonjs/Pagination/LegacyPagination.js +0 -145
  487. package/build/commonjs/Pagination/LegacyPagination.js.map +0 -1
  488. package/build/commonjs/Pagination/LegacyPaginationProps.js +0 -2
  489. package/build/commonjs/Pagination/LegacyPaginationProps.js.map +0 -1
  490. package/build/commonjs/PaginationItem/LegacyPaginationItem.js.map +0 -1
  491. package/build/commonjs/Radio/LegacyRadio.js +0 -82
  492. package/build/commonjs/Radio/LegacyRadio.js.map +0 -1
  493. package/build/commonjs/Radio/LegacyRadioProps.js +0 -2
  494. package/build/commonjs/Radio/LegacyRadioProps.js.map +0 -1
  495. package/build/commonjs/RadioGroup/LegacyRadioGroup.js +0 -31
  496. package/build/commonjs/RadioGroup/LegacyRadioGroup.js.map +0 -1
  497. package/build/commonjs/Snackbar/LegacySnackbar.js +0 -134
  498. package/build/commonjs/Snackbar/LegacySnackbar.js.map +0 -1
  499. package/build/commonjs/Snackbar/LegacySnackbarProps.js +0 -2
  500. package/build/commonjs/Snackbar/LegacySnackbarProps.js.map +0 -1
  501. package/build/commonjs/SnackbarContent/LegacySnackbarContent.js +0 -105
  502. package/build/commonjs/SnackbarContent/LegacySnackbarContent.js.map +0 -1
  503. package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js +0 -2
  504. package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js.map +0 -1
  505. package/build/commonjs/SvgIcon/LegacySvgIcon.js.map +0 -1
  506. package/build/commonjs/SvgIcon/LegacySvgIconProps.js +0 -2
  507. package/build/commonjs/SvgIcon/LegacySvgIconProps.js.map +0 -1
  508. package/build/commonjs/Tab/LegacyTab.js +0 -126
  509. package/build/commonjs/Tab/LegacyTab.js.map +0 -1
  510. package/build/commonjs/Tab/LegacyTabProps.js +0 -2
  511. package/build/commonjs/Tab/LegacyTabProps.js.map +0 -1
  512. package/build/commonjs/Tab/TabIndicator.js +0 -44
  513. package/build/commonjs/Tab/TabIndicator.js.map +0 -1
  514. package/build/commonjs/TabBase/LegacyTabBase.js +0 -57
  515. package/build/commonjs/TabBase/LegacyTabBase.js.map +0 -1
  516. package/build/commonjs/Tabs/LegacyTabIndicator.js +0 -120
  517. package/build/commonjs/Tabs/LegacyTabIndicator.js.map +0 -1
  518. package/build/commonjs/Tabs/LegacyTabIndicatorProps.js +0 -2
  519. package/build/commonjs/Tabs/LegacyTabIndicatorProps.js.map +0 -1
  520. package/build/commonjs/Tabs/LegacyTabs.js +0 -207
  521. package/build/commonjs/Tabs/LegacyTabs.js.map +0 -1
  522. package/build/commonjs/Tabs/LegacyTabsProps.js +0 -2
  523. package/build/commonjs/Tabs/LegacyTabsProps.js.map +0 -1
  524. package/build/commonjs/TextField/LegacyTextField.js +0 -195
  525. package/build/commonjs/TextField/LegacyTextField.js.map +0 -1
  526. package/build/commonjs/TextField/LegacyTextFieldProps.js +0 -2
  527. package/build/commonjs/TextField/LegacyTextFieldProps.js.map +0 -1
  528. package/build/commonjs/TextField/OutlinedTextField.js +0 -190
  529. package/build/commonjs/TextField/OutlinedTextField.js.map +0 -1
  530. package/build/commonjs/Tooltip/LegacyTooltip.js +0 -147
  531. package/build/commonjs/Tooltip/LegacyTooltip.js.map +0 -1
  532. package/build/commonjs/Tooltip/LegacyTooltipProps.js +0 -2
  533. package/build/commonjs/Tooltip/LegacyTooltipProps.js.map +0 -1
  534. package/build/commonjs/Tooltip/UpArrow.js +0 -34
  535. package/build/commonjs/Tooltip/UpArrow.js.map +0 -1
  536. package/build/commonjs/Tooltip/UpArrowProps.js +0 -2
  537. package/build/commonjs/Tooltip/UpArrowProps.js.map +0 -1
  538. package/build/commonjs/Typography/LegacyTypography.js +0 -142
  539. package/build/commonjs/Typography/LegacyTypography.js.map +0 -1
  540. package/build/commonjs/Typography/LegacyTypographyProps.js +0 -2
  541. package/build/commonjs/Typography/LegacyTypographyProps.js.map +0 -1
  542. package/build/module/Accordion/LegacyAccordion.js +0 -148
  543. package/build/module/Accordion/LegacyAccordion.js.map +0 -1
  544. package/build/module/Accordion/LegacyAccordionProps.js +0 -2
  545. package/build/module/Accordion/LegacyAccordionProps.js.map +0 -1
  546. package/build/module/Badge/LegacyBadge.js +0 -48
  547. package/build/module/Badge/LegacyBadge.js.map +0 -1
  548. package/build/module/Badge/LegacyBadgeProps.js +0 -2
  549. package/build/module/Badge/LegacyBadgeProps.js.map +0 -1
  550. package/build/module/Button/LegacyButton.js +0 -127
  551. package/build/module/Button/LegacyButton.js.map +0 -1
  552. package/build/module/Button/LegacyButtonProps.js +0 -2
  553. package/build/module/Button/LegacyButtonProps.js.map +0 -1
  554. package/build/module/Checkbox/LegacyCheckbox.js +0 -52
  555. package/build/module/Checkbox/LegacyCheckbox.js.map +0 -1
  556. package/build/module/Checkbox/LegacyCheckboxProps.js +0 -2
  557. package/build/module/Checkbox/LegacyCheckboxProps.js.map +0 -1
  558. package/build/module/CheckboxGroup/CheckboxGroup.js +0 -34
  559. package/build/module/CheckboxGroup/CheckboxGroup.js.map +0 -1
  560. package/build/module/CheckboxGroup/CheckboxGroupProps.js +0 -2
  561. package/build/module/CheckboxGroup/CheckboxGroupProps.js.map +0 -1
  562. package/build/module/CheckboxGroup/index.js +0 -2
  563. package/build/module/CheckboxGroup/index.js.map +0 -1
  564. package/build/module/Chip/LegacyChip.js +0 -84
  565. package/build/module/Chip/LegacyChip.js.map +0 -1
  566. package/build/module/Chip/LegacyChipProps.js +0 -2
  567. package/build/module/Chip/LegacyChipProps.js.map +0 -1
  568. package/build/module/Dialog/LegacyDialog.js +0 -160
  569. package/build/module/Dialog/LegacyDialog.js.map +0 -1
  570. package/build/module/Dialog/LegacyDialogProps.js +0 -2
  571. package/build/module/Dialog/LegacyDialogProps.js.map +0 -1
  572. package/build/module/DialogActions/LegacyDialogActions.js +0 -17
  573. package/build/module/DialogActions/LegacyDialogActions.js.map +0 -1
  574. package/build/module/DialogContent/LegacyDialogContent.js +0 -22
  575. package/build/module/DialogContent/LegacyDialogContent.js.map +0 -1
  576. package/build/module/DialogContent/LegacyDialogContentProps.js +0 -2
  577. package/build/module/DialogContent/LegacyDialogContentProps.js.map +0 -1
  578. package/build/module/DialogMedia/LegacyDialogMedia.js +0 -21
  579. package/build/module/DialogMedia/LegacyDialogMedia.js.map +0 -1
  580. package/build/module/DialogMedia/LegacyDialogMediaProps.js +0 -2
  581. package/build/module/DialogMedia/LegacyDialogMediaProps.js.map +0 -1
  582. package/build/module/DialogTitle/LegacyDialogTitle.js +0 -22
  583. package/build/module/DialogTitle/LegacyDialogTitle.js.map +0 -1
  584. package/build/module/DialogTitle/LegacyDialogTitleProps.js +0 -2
  585. package/build/module/DialogTitle/LegacyDialogTitleProps.js.map +0 -1
  586. package/build/module/Divider/LegacyDivider.js +0 -100
  587. package/build/module/Divider/LegacyDivider.js.map +0 -1
  588. package/build/module/Divider/LegacyDividerProps.js +0 -2
  589. package/build/module/Divider/LegacyDividerProps.js.map +0 -1
  590. package/build/module/IconButton/LegacyIconButton.js +0 -74
  591. package/build/module/IconButton/LegacyIconButton.js.map +0 -1
  592. package/build/module/IconButton/LegacyIconButtonProps.js +0 -2
  593. package/build/module/IconButton/LegacyIconButtonProps.js.map +0 -1
  594. package/build/module/Pagination/LegacyPagination.js +0 -129
  595. package/build/module/Pagination/LegacyPagination.js.map +0 -1
  596. package/build/module/Pagination/LegacyPaginationProps.js +0 -2
  597. package/build/module/Pagination/LegacyPaginationProps.js.map +0 -1
  598. package/build/module/PaginationItem/LegacyPaginationItem.js.map +0 -1
  599. package/build/module/Radio/LegacyRadio.js +0 -63
  600. package/build/module/Radio/LegacyRadio.js.map +0 -1
  601. package/build/module/Radio/LegacyRadioProps.js +0 -2
  602. package/build/module/Radio/LegacyRadioProps.js.map +0 -1
  603. package/build/module/RadioGroup/LegacyRadioGroup.js +0 -18
  604. package/build/module/RadioGroup/LegacyRadioGroup.js.map +0 -1
  605. package/build/module/Snackbar/LegacySnackbar.js +0 -107
  606. package/build/module/Snackbar/LegacySnackbar.js.map +0 -1
  607. package/build/module/Snackbar/LegacySnackbarProps.js +0 -2
  608. package/build/module/Snackbar/LegacySnackbarProps.js.map +0 -1
  609. package/build/module/SnackbarContent/LegacySnackbarContent.js +0 -84
  610. package/build/module/SnackbarContent/LegacySnackbarContent.js.map +0 -1
  611. package/build/module/SnackbarContent/LegacySnackbarContentProps.js +0 -2
  612. package/build/module/SnackbarContent/LegacySnackbarContentProps.js.map +0 -1
  613. package/build/module/SvgIcon/LegacySvgIcon.js +0 -30
  614. package/build/module/SvgIcon/LegacySvgIcon.js.map +0 -1
  615. package/build/module/SvgIcon/LegacySvgIconProps.js +0 -2
  616. package/build/module/SvgIcon/LegacySvgIconProps.js.map +0 -1
  617. package/build/module/Tab/LegacyTab.js +0 -105
  618. package/build/module/Tab/LegacyTab.js.map +0 -1
  619. package/build/module/Tab/LegacyTabProps.js +0 -2
  620. package/build/module/Tab/LegacyTabProps.js.map +0 -1
  621. package/build/module/Tab/TabIndicator.js +0 -31
  622. package/build/module/Tab/TabIndicator.js.map +0 -1
  623. package/build/module/TabBase/LegacyTabBase.js +0 -44
  624. package/build/module/TabBase/LegacyTabBase.js.map +0 -1
  625. package/build/module/Tabs/LegacyTabIndicator.js +0 -99
  626. package/build/module/Tabs/LegacyTabIndicator.js.map +0 -1
  627. package/build/module/Tabs/LegacyTabIndicatorProps.js +0 -2
  628. package/build/module/Tabs/LegacyTabIndicatorProps.js.map +0 -1
  629. package/build/module/Tabs/LegacyTabs.js +0 -182
  630. package/build/module/Tabs/LegacyTabs.js.map +0 -1
  631. package/build/module/Tabs/LegacyTabsProps.js +0 -2
  632. package/build/module/Tabs/LegacyTabsProps.js.map +0 -1
  633. package/build/module/TextField/LegacyTextField.js +0 -169
  634. package/build/module/TextField/LegacyTextField.js.map +0 -1
  635. package/build/module/TextField/LegacyTextFieldProps.js +0 -2
  636. package/build/module/TextField/LegacyTextFieldProps.js.map +0 -1
  637. package/build/module/TextField/OutlinedTextField.js +0 -174
  638. package/build/module/TextField/OutlinedTextField.js.map +0 -1
  639. package/build/module/Tooltip/LegacyTooltip.js +0 -121
  640. package/build/module/Tooltip/LegacyTooltip.js.map +0 -1
  641. package/build/module/Tooltip/LegacyTooltipProps.js +0 -2
  642. package/build/module/Tooltip/LegacyTooltipProps.js.map +0 -1
  643. package/build/module/Tooltip/UpArrow.js +0 -22
  644. package/build/module/Tooltip/UpArrow.js.map +0 -1
  645. package/build/module/Tooltip/UpArrowProps.js +0 -2
  646. package/build/module/Tooltip/UpArrowProps.js.map +0 -1
  647. package/build/module/Typography/LegacyTypography.js +0 -126
  648. package/build/module/Typography/LegacyTypography.js.map +0 -1
  649. package/build/module/Typography/LegacyTypographyProps.js +0 -2
  650. package/build/module/Typography/LegacyTypographyProps.js.map +0 -1
  651. package/build/typescript/Accordion/LegacyAccordion.d.ts +0 -3
  652. package/build/typescript/Accordion/LegacyAccordionProps.d.ts +0 -28
  653. package/build/typescript/Badge/LegacyBadge.d.ts +0 -3
  654. package/build/typescript/Badge/LegacyBadgeProps.d.ts +0 -34
  655. package/build/typescript/Button/LegacyButton.d.ts +0 -3
  656. package/build/typescript/Button/LegacyButtonProps.d.ts +0 -51
  657. package/build/typescript/Checkbox/LegacyCheckbox.d.ts +0 -3
  658. package/build/typescript/Checkbox/LegacyCheckboxProps.d.ts +0 -36
  659. package/build/typescript/CheckboxGroup/CheckboxGroup.d.ts +0 -3
  660. package/build/typescript/CheckboxGroup/CheckboxGroupProps.d.ts +0 -11
  661. package/build/typescript/CheckboxGroup/index.d.ts +0 -2
  662. package/build/typescript/Chip/LegacyChip.d.ts +0 -3
  663. package/build/typescript/Chip/LegacyChipProps.d.ts +0 -28
  664. package/build/typescript/Dialog/LegacyDialog.d.ts +0 -3
  665. package/build/typescript/Dialog/LegacyDialogProps.d.ts +0 -25
  666. package/build/typescript/DialogActions/LegacyDialogActions.d.ts +0 -3
  667. package/build/typescript/DialogContent/LegacyDialogContent.d.ts +0 -3
  668. package/build/typescript/DialogContent/LegacyDialogContentProps.d.ts +0 -10
  669. package/build/typescript/DialogMedia/LegacyDialogMedia.d.ts +0 -3
  670. package/build/typescript/DialogMedia/LegacyDialogMediaProps.d.ts +0 -15
  671. package/build/typescript/DialogTitle/LegacyDialogTitle.d.ts +0 -3
  672. package/build/typescript/DialogTitle/LegacyDialogTitleProps.d.ts +0 -15
  673. package/build/typescript/Divider/LegacyDivider.d.ts +0 -3
  674. package/build/typescript/Divider/LegacyDividerProps.d.ts +0 -41
  675. package/build/typescript/IconButton/LegacyIconButton.d.ts +0 -3
  676. package/build/typescript/IconButton/LegacyIconButtonProps.d.ts +0 -30
  677. package/build/typescript/Pagination/LegacyPagination.d.ts +0 -3
  678. package/build/typescript/Pagination/LegacyPaginationProps.d.ts +0 -71
  679. package/build/typescript/PaginationItem/LegacyPaginationItem.d.ts +0 -5
  680. package/build/typescript/Radio/LegacyRadio.d.ts +0 -3
  681. package/build/typescript/Radio/LegacyRadioProps.d.ts +0 -43
  682. package/build/typescript/RadioGroup/LegacyRadioGroup.d.ts +0 -3
  683. package/build/typescript/Snackbar/LegacySnackbar.d.ts +0 -3
  684. package/build/typescript/Snackbar/LegacySnackbarProps.d.ts +0 -51
  685. package/build/typescript/SnackbarContent/LegacySnackbarContent.d.ts +0 -3
  686. package/build/typescript/SnackbarContent/LegacySnackbarContentProps.d.ts +0 -26
  687. package/build/typescript/SvgIcon/LegacySvgIcon.d.ts +0 -3
  688. package/build/typescript/SvgIcon/LegacySvgIconProps.d.ts +0 -35
  689. package/build/typescript/Tab/LegacyTab.d.ts +0 -3
  690. package/build/typescript/Tab/LegacyTabProps.d.ts +0 -58
  691. package/build/typescript/Tab/TabIndicator.d.ts +0 -7
  692. package/build/typescript/TabBase/LegacyTabBase.d.ts +0 -3
  693. package/build/typescript/Tabs/LegacyTabIndicator.d.ts +0 -3
  694. package/build/typescript/Tabs/LegacyTabIndicatorProps.d.ts +0 -32
  695. package/build/typescript/Tabs/LegacyTabs.d.ts +0 -5
  696. package/build/typescript/Tabs/LegacyTabsProps.d.ts +0 -79
  697. package/build/typescript/TextField/LegacyTextField.d.ts +0 -5
  698. package/build/typescript/TextField/LegacyTextFieldProps.d.ts +0 -67
  699. package/build/typescript/TextField/OutlinedTextField.d.ts +0 -17
  700. package/build/typescript/Tooltip/LegacyTooltip.d.ts +0 -3
  701. package/build/typescript/Tooltip/LegacyTooltipProps.d.ts +0 -72
  702. package/build/typescript/Tooltip/UpArrow.d.ts +0 -5
  703. package/build/typescript/Tooltip/UpArrowProps.d.ts +0 -17
  704. package/build/typescript/Typography/LegacyTypography.d.ts +0 -5
  705. package/build/typescript/Typography/LegacyTypographyProps.d.ts +0 -81
  706. package/src/Accordion/LegacyAccordion.tsx +0 -188
  707. package/src/Accordion/LegacyAccordionProps.ts +0 -34
  708. package/src/Badge/LegacyBadge.tsx +0 -66
  709. package/src/Badge/LegacyBadgeProps.ts +0 -40
  710. package/src/Button/LegacyButton.tsx +0 -157
  711. package/src/Button/LegacyButtonProps.ts +0 -62
  712. package/src/Checkbox/LegacyCheckbox.tsx +0 -62
  713. package/src/Checkbox/LegacyCheckboxProps.ts +0 -42
  714. package/src/CheckboxGroup/CheckboxGroup.tsx +0 -47
  715. package/src/CheckboxGroup/CheckboxGroupProps.ts +0 -11
  716. package/src/CheckboxGroup/index.ts +0 -2
  717. package/src/Chip/LegacyChip.tsx +0 -116
  718. package/src/Chip/LegacyChipProps.ts +0 -33
  719. package/src/Dialog/LegacyDialog.tsx +0 -198
  720. package/src/Dialog/LegacyDialogProps.ts +0 -28
  721. package/src/DialogActions/LegacyDialogActions.tsx +0 -23
  722. package/src/DialogContent/LegacyDialogContent.tsx +0 -30
  723. package/src/DialogContent/LegacyDialogContentProps.ts +0 -10
  724. package/src/DialogMedia/LegacyDialogMedia.tsx +0 -21
  725. package/src/DialogMedia/LegacyDialogMediaProps.ts +0 -16
  726. package/src/DialogTitle/LegacyDialogTitle.tsx +0 -30
  727. package/src/DialogTitle/LegacyDialogTitleProps.ts +0 -16
  728. package/src/Divider/LegacyDivider.tsx +0 -114
  729. package/src/Divider/LegacyDividerProps.ts +0 -48
  730. package/src/IconButton/LegacyIconButton.tsx +0 -97
  731. package/src/IconButton/LegacyIconButtonProps.ts +0 -36
  732. package/src/Pagination/LegacyPagination.tsx +0 -168
  733. package/src/Pagination/LegacyPaginationProps.ts +0 -85
  734. package/src/PaginationItem/LegacyPaginationItem.tsx +0 -52
  735. package/src/Radio/LegacyRadio.tsx +0 -72
  736. package/src/Radio/LegacyRadioProps.ts +0 -50
  737. package/src/RadioGroup/LegacyRadioGroup.tsx +0 -20
  738. package/src/Snackbar/LegacySnackbar.tsx +0 -130
  739. package/src/Snackbar/LegacySnackbarProps.ts +0 -61
  740. package/src/SnackbarContent/LegacySnackbarContent.tsx +0 -129
  741. package/src/SnackbarContent/LegacySnackbarContentProps.ts +0 -30
  742. package/src/SvgIcon/LegacySvgIcon.tsx +0 -36
  743. package/src/SvgIcon/LegacySvgIconProps.ts +0 -41
  744. package/src/Tab/LegacyTab.tsx +0 -141
  745. package/src/Tab/LegacyTabProps.ts +0 -68
  746. package/src/Tab/TabIndicator.tsx +0 -38
  747. package/src/TabBase/LegacyTabBase.tsx +0 -55
  748. package/src/Tabs/LegacyTabIndicator.tsx +0 -112
  749. package/src/Tabs/LegacyTabIndicatorProps.ts +0 -37
  750. package/src/Tabs/LegacyTabs.tsx +0 -227
  751. package/src/Tabs/LegacyTabsProps.ts +0 -93
  752. package/src/TextField/LegacyTextField.tsx +0 -168
  753. package/src/TextField/LegacyTextFieldProps.ts +0 -80
  754. package/src/TextField/OutlinedTextField.tsx +0 -234
  755. package/src/Tooltip/LegacyTooltip.tsx +0 -167
  756. package/src/Tooltip/LegacyTooltipProps.ts +0 -86
  757. package/src/Tooltip/UpArrow.tsx +0 -21
  758. package/src/Tooltip/UpArrowProps.ts +0 -19
  759. package/src/Typography/LegacyTypography.tsx +0 -107
  760. package/src/Typography/LegacyTypographyProps.ts +0 -122
@@ -50,7 +50,7 @@ const useStyles = function () {
50
50
  },
51
51
  bottomDivider: {
52
52
  borderBottomColor: theme.palette.border.base,
53
- borderBottomWidth: 1
53
+ borderBottomWidth: 0.5
54
54
  }
55
55
  };
56
56
  };
@@ -60,6 +60,7 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
60
60
 
61
61
  const {
62
62
  children,
63
+ color = 'default',
63
64
  initialIndex = 0,
64
65
  disableIndicator = false,
65
66
  indicatorSize = 'fit-content',
@@ -91,11 +92,16 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
91
92
  setTab
92
93
  }), [sharedIndex]);
93
94
  const styles = useStyles();
95
+ const theme = (0, _styles.useTheme)();
94
96
  const [outerCoordinates, updateCoordinate] = (0, _useTabCoordinates.default)(children);
95
97
  const [innerContentsWidthList, updateInnerContentsWidth] = (0, _useTabInnerContentsWidth.default)(children);
96
98
  const canRenderIndicator = indicatorSize === 'fit-content' ? (0, _utils.isEveryTabCoordinatesDefined)(innerContentsWidthList, children) : (0, _utils.isEveryTabCoordinatesDefined)(outerCoordinates, children);
97
99
  const indexStore = (0, _useIndexStore.default)(sharedIndex);
98
100
  const coordinates = (0, _react.useMemo)(() => {
101
+ if (outerCoordinates.length === 0) {
102
+ return [];
103
+ }
104
+
99
105
  if (indicatorSize !== 'fit-content') {
100
106
  return outerCoordinates;
101
107
  }
@@ -113,7 +119,7 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
113
119
  x2: indicatorStartCoordinate + innerContentWidth
114
120
  };
115
121
  });
116
- }, [outerCoordinates, innerContentsWidthList, indicatorSize]);
122
+ }, [outerCoordinates, innerContentsWidthList]);
117
123
  (0, _react.useEffect)(() => {
118
124
  return indexStore.subscribe(newIndex => {
119
125
  onChange === null || onChange === void 0 ? void 0 : onChange(newIndex);
@@ -180,12 +186,18 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(function Tabs(props, ref) {
180
186
  disabled: disableIndicator,
181
187
  initialIndex: realInitialIndex
182
188
  }) : null;
189
+ const backgroundColorMap = {
190
+ default: theme.palette.background.base,
191
+ alt: theme.palette.background.alt
192
+ };
183
193
  return /*#__PURE__*/_react.default.createElement(_InternalContext.default.Provider, {
184
194
  value: {
185
195
  indexStore
186
196
  }
187
197
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
188
- style: (0, _styles.css)([styles.root, showDivider ? styles.bottomDivider : undefined, scrollable ? undefined : styles.fixedRoot, style])
198
+ style: (0, _styles.css)([styles.root, {
199
+ backgroundColor: backgroundColorMap[color]
200
+ }, showDivider ? styles.bottomDivider : undefined, scrollable ? undefined : styles.fixedRoot, style])
189
201
  }, scrollable ? /*#__PURE__*/_react.default.createElement(_ScrollableTabsView.default, {
190
202
  automaticallyAdjustContentInsets: false,
191
203
  bounces: false,
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","fixedRoot","flexDirection","fixedTab","flex","scrollableContainer","paddingHorizontal","spacing","bottomDivider","borderBottomColor","palette","border","base","borderBottomWidth","Tabs","forwardRef","props","ref","children","initialIndex","disableIndicator","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","showDivider","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","useSyncAnimatedValue","initialValue","sharedIndex","realInitialIndex","currentIndexRef","useRef","setTab","newIndex","currentIndex","current","animatedValue","setValue","useImperativeHandle","styles","outerCoordinates","updateCoordinate","useTabCoordinates","innerContentsWidthList","updateInnerContentsWidth","useTabInnerContentsWidth","canRenderIndicator","isEveryTabCoordinatesDefined","indexStore","useIndexStore","coordinates","useMemo","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","useEffect","subscribe","tabElements","React","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","cloneElement","enableIndicator","undefined","filter","Boolean","tabIndicator","css"],"sources":["Tabs.tsx"],"sourcesContent":["import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport type { GestureResponderEvent, LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport { useSyncAnimatedValue } from '../hooks';\nimport type { TabVariant } from '../Tab/TabProps';\nimport type TabsProps from './TabsProps';\nimport type { TabsInstance } from './types';\nimport TabIndicator from './TabIndicator';\nimport ScrollableTabsView from './ScrollableTabsView';\nimport IndexAwareTab from './IndexAwareTab';\nimport useTabCoordinates from './useTabCoordinates';\nimport useTabInnerContentsWidth from './useTabInnerContentsWidth';\nimport useIndexStore from './useIndexStore';\nimport InternalContext from './InternalContext';\nimport { isEveryTabCoordinatesDefined } from './utils';\n\ntype TabsStyleKeys =\n | 'root'\n | 'fixedRoot'\n | 'fixedTab'\n | 'scrollableContainer'\n | 'bottomDivider';\n\ntype TabsStyles = NamedStylesStringUnion<TabsStyleKeys>;\n\nconst useStyles: UseStyles<TabsStyles> = function (): TabsStyles {\n const theme = useTheme();\n\n return {\n root: {},\n fixedRoot: {\n flexDirection: 'row',\n },\n fixedTab: {\n flex: 1,\n },\n scrollableContainer: {\n paddingHorizontal: theme.spacing(1),\n },\n bottomDivider: {\n borderBottomColor: theme.palette.border.base,\n borderBottomWidth: 1,\n },\n };\n};\n\nconst Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {\n const {\n children,\n initialIndex = 0,\n disableIndicator = false,\n indicatorSize = 'fit-content',\n keyboardDismissMode = 'none',\n keyboardShouldPersistTaps = 'never',\n onChange,\n scrollable = false,\n scrollViewContentContainerStyle,\n showDivider = false,\n style,\n variant = 'default' as TabVariant,\n UNSTABLE_sharedIndex,\n onTabSelected,\n } = props;\n\n const fallbackSharedIndex = useSyncAnimatedValue({ initialValue: initialIndex });\n const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;\n const realInitialIndex = sharedIndex.initialValue;\n\n const currentIndexRef = useRef(initialIndex);\n\n const setTab = (newIndex: number) => {\n const currentIndex = currentIndexRef.current;\n onTabSelected?.(newIndex, currentIndex);\n\n sharedIndex.animatedValue.setValue(newIndex);\n };\n\n useImperativeHandle(\n ref,\n () => ({\n setTab,\n }),\n [sharedIndex],\n );\n\n const styles = useStyles();\n\n const [outerCoordinates, updateCoordinate] = useTabCoordinates(children);\n const [innerContentsWidthList, updateInnerContentsWidth] = useTabInnerContentsWidth(children);\n\n const canRenderIndicator = indicatorSize === 'fit-content'\n ? isEveryTabCoordinatesDefined(innerContentsWidthList, children)\n : isEveryTabCoordinatesDefined(outerCoordinates, children);\n\n const indexStore = useIndexStore(sharedIndex);\n\n const coordinates = useMemo(() => {\n if (indicatorSize !== 'fit-content') {\n return outerCoordinates;\n }\n\n return innerContentsWidthList.map((innerContentWidth, idx) => {\n const { x1: outerX1, x2: outerX2 } = outerCoordinates[idx];\n\n const tabWidth = outerX2 - outerX1;\n const distanceFromParent = (tabWidth - innerContentWidth) / 2;\n const indicatorStartCoordinate = outerX1 + distanceFromParent;\n\n return {\n x1: indicatorStartCoordinate,\n x2: indicatorStartCoordinate + innerContentWidth,\n };\n });\n }, [outerCoordinates, innerContentsWidthList, indicatorSize]);\n\n useEffect(() => {\n return indexStore.subscribe(newIndex => {\n onChange?.(newIndex);\n currentIndexRef.current = newIndex;\n });\n }, [indexStore, onChange]);\n\n const tabElements = React.Children.map(children, (child, index) => {\n if (!child) {\n return null;\n }\n\n const onTabInnerLayout = (event: LayoutChangeEvent) => {\n const { width } = event.nativeEvent.layout;\n\n updateInnerContentsWidth(index, width);\n };\n\n const onLayout = (event: LayoutChangeEvent) => {\n const { x, width } = event.nativeEvent.layout;\n\n updateCoordinate(index, x, width);\n\n // @ts-ignore\n child.props.onLayout?.(event);\n };\n\n const onMouseDown = (e: GestureResponderEvent) => {\n if (keyboardShouldPersistTaps === 'always') {\n e.preventDefault();\n }\n };\n\n const onPress = () => {\n setTab(index);\n\n // @ts-ignore\n child.props.onPress?.();\n };\n\n // @ts-ignore\n const tabElement = cloneElement(child, {\n enableIndicator: !disableIndicator && !canRenderIndicator,\n onTabInnerLayout,\n onLayout,\n onPress,\n onMouseDown,\n variant,\n indicatorSize,\n style: scrollable ? undefined : styles.fixedTab,\n });\n\n return (\n <IndexAwareTab\n children={tabElement}\n index={index}\n initialIndex={realInitialIndex}\n />\n );\n })?.filter(Boolean);\n\n const tabIndicator = canRenderIndicator ? (\n <TabIndicator\n coordinates={coordinates}\n disabled={disableIndicator}\n initialIndex={realInitialIndex}\n />\n ) : null;\n\n return (\n <InternalContext.Provider value={{ indexStore }}>\n <View\n style={css([\n styles.root,\n showDivider ? styles.bottomDivider : undefined,\n scrollable ? undefined : styles.fixedRoot,\n style,\n ])}\n >\n {scrollable ? (\n <ScrollableTabsView\n automaticallyAdjustContentInsets={false}\n bounces={false}\n contentContainerStyle={css([\n styles.scrollableContainer,\n scrollViewContentContainerStyle,\n ])}\n coordinates={coordinates}\n directionalLockEnabled={true}\n horizontal={true}\n initialIndex={realInitialIndex}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n keyboardDismissMode={keyboardDismissMode}\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n >\n {tabElements}\n {tabIndicator}\n </ScrollableTabsView>\n ) : (\n <React.Fragment>\n {tabElements}\n {t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I,OAAO,EAAE,KAFb;IAGI,qBAAqB,EAAE,IAAAqE,WAAA,EAAI,CACvBhD,MAAM,CAACzC,mBADgB,EAEvBqB,+BAFuB,CAAJ,CAH3B;IAOI,WAAW,EAAE+B,WAPjB;IAQI,sBAAsB,EAAE,IAR5B;IASI,UAAU,EAAE,IAThB;IAUI,YAAY,EAAErB,gBAVlB;IAWI,YAAY,EAAE,KAXlB;IAYI,8BAA8B,EAAE,KAZpC;IAaI,4BAA4B,EAAE,KAblC;IAcI,mBAAmB,EAAEd,mBAdzB;IAeI,yBAAyB,EAAEC;EAf/B,GAiBKgD,WAjBL,EAkBKsB,YAlBL,CADO,gBAsBP,6BAAC,cAAD,CAAO,QAAP,QACKtB,WADL,EAEKsB,YAFL,CA9BR,CADJ,CADJ;AAwCH,CAlLY,CAAb;eAoLe/E,I"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","fixedRoot","flexDirection","fixedTab","flex","scrollableContainer","paddingHorizontal","spacing","bottomDivider","borderBottomColor","palette","border","base","borderBottomWidth","Tabs","forwardRef","props","ref","children","color","initialIndex","disableIndicator","indicatorSize","keyboardDismissMode","keyboardShouldPersistTaps","onChange","scrollable","scrollViewContentContainerStyle","showDivider","style","variant","UNSTABLE_sharedIndex","onTabSelected","fallbackSharedIndex","useSyncAnimatedValue","initialValue","sharedIndex","realInitialIndex","currentIndexRef","useRef","setTab","newIndex","currentIndex","current","animatedValue","setValue","useImperativeHandle","styles","outerCoordinates","updateCoordinate","useTabCoordinates","innerContentsWidthList","updateInnerContentsWidth","useTabInnerContentsWidth","canRenderIndicator","isEveryTabCoordinatesDefined","indexStore","useIndexStore","coordinates","useMemo","length","map","innerContentWidth","idx","x1","outerX1","x2","outerX2","tabWidth","distanceFromParent","indicatorStartCoordinate","useEffect","subscribe","tabElements","React","Children","child","index","onTabInnerLayout","event","width","nativeEvent","layout","onLayout","x","onMouseDown","e","preventDefault","onPress","tabElement","cloneElement","enableIndicator","undefined","filter","Boolean","tabIndicator","backgroundColorMap","default","background","alt","css","backgroundColor"],"sources":["Tabs.tsx"],"sourcesContent":["import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport type { GestureResponderEvent, LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport { useSyncAnimatedValue } from '../hooks';\nimport type { TabVariant } from '../Tab';\nimport type TabsProps from './TabsProps';\nimport type { TabsColor } from './TabsProps';\nimport type { TabsInstance } from './types';\nimport TabIndicator from './TabIndicator';\nimport ScrollableTabsView from './ScrollableTabsView';\nimport IndexAwareTab from './IndexAwareTab';\nimport useTabCoordinates from './useTabCoordinates';\nimport useTabInnerContentsWidth from './useTabInnerContentsWidth';\nimport useIndexStore from './useIndexStore';\nimport InternalContext from './InternalContext';\nimport { isEveryTabCoordinatesDefined } from './utils';\n\ntype TabsStyleKeys =\n | 'root'\n | 'fixedRoot'\n | 'fixedTab'\n | 'scrollableContainer'\n | 'bottomDivider';\n\ntype TabsStyles = NamedStylesStringUnion<TabsStyleKeys>;\n\nconst useStyles: UseStyles<TabsStyles> = function (): TabsStyles {\n const theme = useTheme();\n\n return {\n root: {},\n fixedRoot: {\n flexDirection: 'row',\n },\n fixedTab: {\n flex: 1,\n },\n scrollableContainer: {\n paddingHorizontal: theme.spacing(1),\n },\n bottomDivider: {\n borderBottomColor: theme.palette.border.base,\n borderBottomWidth: 0.5,\n },\n };\n};\n\nconst Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {\n const {\n children,\n color = 'default',\n initialIndex = 0,\n disableIndicator = false,\n indicatorSize = 'fit-content',\n keyboardDismissMode = 'none',\n keyboardShouldPersistTaps = 'never',\n onChange,\n scrollable = false,\n scrollViewContentContainerStyle,\n showDivider = false,\n style,\n variant = 'default' as TabVariant,\n UNSTABLE_sharedIndex,\n onTabSelected,\n } = props;\n\n const fallbackSharedIndex = useSyncAnimatedValue({ initialValue: initialIndex });\n const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;\n const realInitialIndex = sharedIndex.initialValue;\n\n const currentIndexRef = useRef(initialIndex);\n\n const setTab = (newIndex: number) => {\n const currentIndex = currentIndexRef.current;\n onTabSelected?.(newIndex, currentIndex);\n\n sharedIndex.animatedValue.setValue(newIndex);\n };\n\n useImperativeHandle(\n ref,\n () => ({\n setTab,\n }),\n [sharedIndex],\n );\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const [outerCoordinates, updateCoordinate] = useTabCoordinates(children);\n const [innerContentsWidthList, updateInnerContentsWidth] = useTabInnerContentsWidth(children);\n\n const canRenderIndicator = indicatorSize === 'fit-content'\n ? isEveryTabCoordinatesDefined(innerContentsWidthList, children)\n : isEveryTabCoordinatesDefined(outerCoordinates, children);\n\n const indexStore = useIndexStore(sharedIndex);\n\n const coordinates = useMemo(() => {\n if (outerCoordinates.length === 0) {\n return [];\n }\n\n if (indicatorSize !== 'fit-content') {\n return outerCoordinates;\n }\n\n return innerContentsWidthList.map((innerContentWidth, idx) => {\n const { x1: outerX1, x2: outerX2 } = outerCoordinates[idx];\n\n const tabWidth = outerX2 - outerX1;\n const distanceFromParent = (tabWidth - innerContentWidth) / 2;\n const indicatorStartCoordinate = outerX1 + distanceFromParent;\n\n return {\n x1: indicatorStartCoordinate,\n x2: indicatorStartCoordinate + innerContentWidth,\n };\n });\n }, [outerCoordinates, innerContentsWidthList]);\n\n useEffect(() => {\n return indexStore.subscribe(newIndex => {\n onChange?.(newIndex);\n currentIndexRef.current = newIndex;\n });\n }, [indexStore, onChange]);\n\n const tabElements = React.Children.map(children, (child, index) => {\n if (!child) {\n return null;\n }\n\n const onTabInnerLayout = (event: LayoutChangeEvent) => {\n const { width } = event.nativeEvent.layout;\n\n updateInnerContentsWidth(index, width);\n };\n\n const onLayout = (event: LayoutChangeEvent) => {\n const { x, width } = event.nativeEvent.layout;\n\n updateCoordinate(index, x, width);\n\n // @ts-ignore\n child.props.onLayout?.(event);\n };\n\n const onMouseDown = (e: GestureResponderEvent) => {\n if (keyboardShouldPersistTaps === 'always') {\n e.preventDefault();\n }\n };\n\n const onPress = () => {\n setTab(index);\n\n // @ts-ignore\n child.props.onPress?.();\n };\n\n // @ts-ignore\n const tabElement = cloneElement(child, {\n enableIndicator: !disableIndicator && !canRenderIndicator,\n onTabInnerLayout,\n onLayout,\n onPress,\n onMouseDown,\n variant,\n indicatorSize,\n style: scrollable ? undefined : styles.fixedTab,\n });\n\n return (\n <IndexAwareTab\n children={tabElement}\n index={index}\n initialIndex={realInitialIndex}\n />\n );\n })?.filter(Boolean);\n\n const tabIndicator = canRenderIndicator ? (\n <TabIndicator\n coordinates={coordinates}\n disabled={disableIndicator}\n initialIndex={realInitialIndex}\n />\n ) : null;\n\n const backgroundColorMap: Record<TabsColor, string> = {\n default: theme.palette.background.base,\n alt: theme.palette.background.alt,\n };\n\n return (\n <InternalContext.Provider value={{ indexStore }}>\n <View\n style={css([\n styles.root,\n { backgroundColor: backgroundColorMap[color] },\n showDivider ? styles.bottomDivider : undefined,\n scrollable ? undefined : styles.fixedRoot,\n style,\n ])}\n >\n {scrollable ? (\n <ScrollableTabsView\n automaticallyAdjustContentInsets={false}\n bounces={false}\n contentContainerStyle={css([\n styles.scrollableContainer,\n scrollViewContentContainerStyle,\n ])}\n coordinates={coordinates}\n directionalLockEnabled={true}\n horizontal={true}\n initialIndex={realInitialIndex}\n scrollsToTop={false}\n showsHorizontalScrollIndicator={false}\n showsVerticalScrollIndicator={false}\n keyboardDismissMode={keyboardDismissMode}\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n >\n {tabElements}\n {tabIndicator}\n </ScrollableTabsView>\n ) : (\n <React.Fragment>\n {tabElements}\n {tabIndicator}\n </React.Fragment>\n )}\n </View>\n </InternalContext.Provider>\n );\n});\n\nexport default Tabs;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA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C7E,KAAD;IAArC,CAFO,EAGPS,WAAW,GAAGmB,MAAM,CAACvC,aAAV,GAA0BoF,SAH9B,EAIPlE,UAAU,GAAGkE,SAAH,GAAe7C,MAAM,CAAC9C,SAJzB,EAKP4B,KALO,CAAJ;EADX,GASKH,UAAU,gBACP,6BAAC,2BAAD;IACI,gCAAgC,EAAE,KADtC;IAEI,OAAO,EAAE,KAFb;IAGI,qBAAqB,EAAE,IAAA0E,WAAA,EAAI,CACvBrD,MAAM,CAAC1C,mBADgB,EAEvBsB,+BAFuB,CAAJ,CAH3B;IAOI,WAAW,EAAE+B,WAPjB;IAQI,sBAAsB,EAAE,IAR5B;IASI,UAAU,EAAE,IAThB;IAUI,YAAY,EAAErB,gBAVlB;IAWI,YAAY,EAAE,KAXlB;IAYI,8BAA8B,EAAE,KAZpC;IAaI,4BAA4B,EAAE,KAblC;IAcI,mBAAmB,EAAEd,mBAdzB;IAeI,yBAAyB,EAAEC;EAf/B,GAiBKiD,WAjBL,EAkBKsB,YAlBL,CADO,gBAsBP,6BAAC,cAAD,CAAO,QAAP,QACKtB,WADL,EAEKsB,YAFL,CA/BR,CADJ,CADJ;AAyCH,CA/LY,CAAb;eAiMejF,I"}
@@ -3,7 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.tabIndicatorSizes = void 0;
6
+ exports.tabsColors = exports.tabIndicatorSizes = void 0;
7
+ const tabsColors = ['default', 'alt'];
8
+ exports.tabsColors = tabsColors;
7
9
  const tabIndicatorSizes = ['fit-content', 'full'];
8
10
  exports.tabIndicatorSizes = tabIndicatorSizes;
9
11
  //# sourceMappingURL=TabsProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tabIndicatorSizes"],"sources":["TabsProps.ts"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { TabVariant } from '../Tab/TabProps';\nimport type { ExtendedStyle, OverridableComponentProps, SyncAnimatedValue } from '../types';\nimport type { KeyboardDismissMode, KeyboardShouldPersistTaps, TabsInstance } from './types';\n\nexport const tabIndicatorSizes = ['fit-content', 'full'] as const;\nexport type TabIndicatorSize = typeof tabIndicatorSizes[number];\n\nexport default interface TabsProps extends OverridableComponentProps<ViewProps, {\n ref?: Ref<TabsInstance>;\n\n /**\n * Collection of Tab components.\n */\n children: ReactNode;\n\n /**\n * If `true`, the indicator is disabled.\n * @default false\n */\n disableIndicator?: boolean;\n\n /**\n * The size of tab indicator.\n * 'full' adjusts the indicator to the size of the Tab,\n * while 'fit-content' adjusts the indicator to the size of the content inside the Tab.\n * @default 'fit-content'\n */\n indicatorSize?: TabIndicatorSize;\n\n /**\n * Index of initial tab that should be selected.\n * @default 0\n */\n initialIndex?: number;\n\n /**\n * keyboard dismissing condition of dragging.\n * @default 'none'\n */\n keyboardDismissMode?: KeyboardDismissMode,\n\n /**\n * keyboard persisting condition of tapping.\n * @default 'never'\n */\n keyboardShouldPersistTaps?: KeyboardShouldPersistTaps,\n\n /**\n * Callback fired when a tab is selected.\n */\n onChange?: (newIndex: number) => void;\n\n /**\n * If `true`, the component will be able to scroll.\n * @default false\n */\n scrollable?: boolean;\n\n /**\n * These styles will be applied to the scroll view content container which wraps all of the child views.\n */\n scrollViewContentContainerStyle?: ExtendedStyle | ExtendedStyle[];\n\n /**\n * Determines whether to display the bottom border.\n * @default false\n */\n showDivider?: boolean;\n\n /**\n * Unstable API.\n */\n UNSTABLE_sharedIndex?: SyncAnimatedValue;\n\n /**\n * The variant to use.\n * @default 'primary'\n */\n variant?: TabVariant;\n\n /**\n * Callback function executed when a Tab is selected.\n * Executed even if the index does not change when a Tab is pressed.\n * Receives the next tab index and the current tab index as parameters.\n */\n onTabSelected?: (newIndex: number, currentIndex: number) => void;\n}> {}\n"],"mappings":";;;;;;AAMO,MAAMA,iBAAiB,GAAG,CAAC,aAAD,EAAgB,MAAhB,CAA1B"}
1
+ {"version":3,"names":["tabsColors","tabIndicatorSizes"],"sources":["TabsProps.ts"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { TabVariant } from '../Tab';\nimport type { ExtendedStyle, OverridableComponentProps, SyncAnimatedValue } from '../types';\nimport type { KeyboardDismissMode, KeyboardShouldPersistTaps, TabsInstance } from './types';\n\nexport const tabsColors = ['default', 'alt'] as const;\nexport type TabsColor = typeof tabsColors[number];\n\nexport const tabIndicatorSizes = ['fit-content', 'full'] as const;\nexport type TabIndicatorSize = typeof tabIndicatorSizes[number];\n\nexport default interface TabsProps extends OverridableComponentProps<ViewProps, {\n ref?: Ref<TabsInstance>;\n\n /**\n * Collection of Tab components.\n */\n children: ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'default'\n */\n color?: TabsColor;\n\n /**\n * If `true`, the indicator is disabled.\n * @default false\n */\n disableIndicator?: boolean;\n\n /**\n * The size of tab indicator.\n * 'full' adjusts the indicator to the size of the Tab,\n * while 'fit-content' adjusts the indicator to the size of the content inside the Tab.\n * @default 'fit-content'\n */\n indicatorSize?: TabIndicatorSize;\n\n /**\n * Index of initial tab that should be selected.\n * @default 0\n */\n initialIndex?: number;\n\n /**\n * keyboard dismissing condition of dragging.\n * @default 'none'\n */\n keyboardDismissMode?: KeyboardDismissMode,\n\n /**\n * keyboard persisting condition of tapping.\n * @default 'never'\n */\n keyboardShouldPersistTaps?: KeyboardShouldPersistTaps,\n\n /**\n * Callback fired when a tab is selected.\n */\n onChange?: (newIndex: number) => void;\n\n /**\n * If `true`, the component will be able to scroll.\n * @default false\n */\n scrollable?: boolean;\n\n /**\n * These styles will be applied to the scroll view content container which wraps all of the child views.\n */\n scrollViewContentContainerStyle?: ExtendedStyle | ExtendedStyle[];\n\n /**\n * Determines whether to display the bottom border.\n * @default false\n */\n showDivider?: boolean;\n\n /**\n * Unstable API.\n */\n UNSTABLE_sharedIndex?: SyncAnimatedValue;\n\n /**\n * The variant to use.\n * @default 'primary'\n */\n variant?: TabVariant;\n\n /**\n * Callback function executed when a Tab is selected.\n * Executed even if the index does not change when a Tab is pressed.\n * Receives the next tab index and the current tab index as parameters.\n */\n onTabSelected?: (newIndex: number, currentIndex: number) => void;\n}> {}\n"],"mappings":";;;;;;AAMO,MAAMA,UAAU,GAAG,CAAC,SAAD,EAAY,KAAZ,CAAnB;;AAGA,MAAMC,iBAAiB,GAAG,CAAC,aAAD,EAAgB,MAAhB,CAA1B"}
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _LegacyTabs.default;
9
+ return _Tabs.default;
10
10
  }
11
11
  });
12
12
 
13
- var _LegacyTabs = _interopRequireDefault(require("./LegacyTabs"));
13
+ var _Tabs = _interopRequireDefault(require("./Tabs"));
14
14
 
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyTabs';\nexport type { default as TabsProps } from './LegacyTabsProps';\nexport type { TabsInstance } from './types';\n"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tabs';\nexport type { default as TabsProps } from './TabsProps';\nexport type { TabsInstance } from './types';\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -111,7 +111,6 @@ const TextField = /*#__PURE__*/_react.default.forwardRef(function TextField(prop
111
111
  style: containerStyle
112
112
  }, isSearch ? isLoading ? /*#__PURE__*/_react.default.createElement(_icons.LoadingSpinner, null) : /*#__PURE__*/_react.default.createElement(_icons.Search, {
113
113
  color: 'base',
114
- enableV2: true,
115
114
  height: 18,
116
115
  width: 18
117
116
  }) : null, /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","create","root","alignItems","flexGrow","input","secureToggleButton","padding","TextField","React","forwardRef","props","ref","autoFocus","containerStyle","containerStyleProp","editable","hint","isLoading","onBlur","onChangeText","onChangeTextProp","onFocus","placeholderTextColor","placeholderTextColorProp","secureTextEntry","secureTextEntryProp","showClearButton","showClearButtonProp","status","style","styleProp","title","value","variant","otherProps","isSearch","disabled","theme","useTheme","isFocused","setIsFocused","useState","setSecureTextEntry","variantStyles","useVariantStyleMap","handleBlur","event","handleFocus","handleSecureTogglePress","current","handleChangeText","text","handleClear","titleFontStyle","createFontStyle","color","palette","strong","inputStyle","css","Platform","OS","outlineWidth","disabledLabel","opacity","length","hintStyle"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\nimport { Platform, StyleSheet, Text, TextInput, View } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css } from '@fountain-ui/styles';\nimport IconButton from '../IconButton/IconButton';\nimport { Clear, EyeOff, EyeOn, LoadingSpinner, Search } from '../internal/icons';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type TextFieldProps from './TextFieldProps';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n flexGrow: 1,\n },\n input: {\n flexGrow: 1,\n },\n secureToggleButton: {\n alignItems: 'flex-end',\n padding: 0,\n },\n});\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n autoFocus,\n containerStyle: containerStyleProp,\n editable = true,\n hint,\n isLoading,\n onBlur,\n onChangeText: onChangeTextProp,\n onFocus,\n placeholderTextColor: placeholderTextColorProp,\n secureTextEntry: secureTextEntryProp,\n showClearButton: showClearButtonProp,\n status = 'default' as TextFieldStatus,\n style: styleProp,\n title,\n value,\n variant = 'default' as TextFieldVariant,\n ...otherProps\n } = props;\n\n const isSearch = variant === 'search';\n\n const disabled = !editable || isLoading;\n\n const theme = useTheme();\n\n const [isFocused, setIsFocused] = useState<boolean>(autoFocus ?? false);\n const [secureTextEntry, setSecureTextEntry] = useState<boolean>(secureTextEntryProp ?? false);\n\n const variantStyles = useVariantStyleMap(variant, status, isFocused);\n\n const handleBlur = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(false);\n onBlur?.(event);\n };\n\n const handleFocus = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(true);\n onFocus?.(event);\n };\n\n const handleSecureTogglePress = () => {\n setSecureTextEntry((current) => !current);\n };\n\n const handleChangeText = (text: string) => {\n onChangeTextProp?.(text);\n };\n\n const handleClear = () => {\n handleChangeText('');\n };\n\n const showClearButton = showClearButtonProp ?? isSearch;\n\n const titleFontStyle = createFontStyle(theme, {\n // selector: (typography) => typography.caption1['semiBold']\n color: theme.palette.text.strong,\n });\n\n const inputStyle = css([\n styles.input,\n variantStyles.inputStyle,\n Platform.OS === 'web' ? { outlineWidth: 0 } as FountainUiStyle : {},\n styleProp,\n ]);\n\n const placeholderTextColor = placeholderTextColorProp ?? theme.palette.status.disabledLabel;\n\n const containerStyle = css([\n styles.root,\n variantStyles.containerStyle,\n { opacity: disabled ? 0.3 : 1 },\n containerStyleProp,\n ]);\n\n return (\n <View>\n {title && !isSearch ? (\n <Text\n children={title}\n style={titleFontStyle}\n />\n ) : null}\n\n <Row style={containerStyle}>\n {isSearch ? (\n isLoading ? (\n <LoadingSpinner/>\n ) : (\n <Search\n color={'base'}\n enableV2={true}\n height={18}\n width={18}\n />\n )\n ) : null}\n\n <TextInput\n autoFocus={autoFocus}\n editable={!disabled}\n onBlur={handleBlur}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n placeholderTextColor={placeholderTextColor}\n ref={ref}\n secureTextEntry={secureTextEntry}\n style={inputStyle}\n value={value}\n {...otherProps}\n />\n\n {showClearButton && value?.length && value.length > 0 ? (\n <IconButton\n color={'base'}\n children={\n <Clear\n height={13.75}\n width={15}\n />\n }\n onPress={handleClear}\n />\n ) : null}\n\n {secureTextEntryProp && !isSearch ? (\n <IconButton\n color={'base'}\n onPress={handleSecureTogglePress}\n style={styles.secureToggleButton}\n >\n {secureTextEntry ? (\n <EyeOff\n height={19}\n width={17.42}\n />\n ) : (\n <EyeOn\n height={19}\n width={17.42}\n />\n )}\n </IconButton>\n ) : null}\n </Row>\n\n {hint && !isSearch ? (\n <Text\n children={hint}\n style={variantStyles.hintStyle}\n />\n ) : null}\n </View>\n );\n});\n\nexport default TextField;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;AAEA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,UAAU,EAAE,QADV;IAEFC,QAAQ,EAAE;EAFR,CADuB;EAK7BC,KAAK,EAAE;IACHD,QAAQ,EAAE;EADP,CALsB;EAQ7BE,kBAAkB,EAAE;IAChBH,UAAU,EAAE,UADI;IAEhBI,OAAO,EAAE;EAFO;AARS,CAAlB,CAAf;;AAcA,MAAMC,SAAS,gBAAGC,cAAA,CAAMC,UAAN,CAA4C,SAASF,SAAT,CAAmBG,KAAnB,EAA0BC,GAA1B,EAA+B;EACzF,MAAM;IACFC,SADE;IAEFC,cAAc,EAAEC,kBAFd;IAGFC,QAAQ,GAAG,IAHT;IAIFC,IAJE;IAKFC,SALE;IAMFC,MANE;IAOFC,YAAY,EAAEC,gBAPZ;IAQFC,OARE;IASFC,oBAAoB,EAAEC,wBATpB;IAUFC,eAAe,EAAEC,mBAVf;IAWFC,eAAe,EAAEC,mBAXf;IAYFC,MAAM,GAAG,SAZP;IAaFC,KAAK,EAAEC,SAbL;IAcFC,KAdE;IAeFC,KAfE;IAgBFC,OAAO,GAAG,SAhBR;IAiBF,GAAGC;EAjBD,IAkBFxB,KAlBJ;EAoBA,MAAMyB,QAAQ,GAAGF,OAAO,KAAK,QAA7B;EAE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A,KAAJ,eAAIA,KAAK,CAAEiC,MAA1B,IAAoCjC,KAAK,CAACiC,MAAN,GAAe,CAAnD,gBACG,6BAAC,mBAAD;IACI,KAAK,EAAE,MADX;IAEI,QAAQ,eACJ,6BAAC,YAAD;MACI,MAAM,EAAE,KADZ;MAEI,KAAK,EAAE;IAFX,EAHR;IAQI,OAAO,EAAEb;EARb,EADH,GAWG,IAvCR,EAyCK3B,mBAAmB,IAAI,CAACU,QAAxB,gBACG,6BAAC,mBAAD;IACI,KAAK,EAAE,MADX;IAEI,OAAO,EAAEa,uBAFb;IAGI,KAAK,EAAElD,MAAM,CAACO;EAHlB,GAKKmB,eAAe,gBACZ,6BAAC,aAAD;IACI,MAAM,EAAE,EADZ;IAEI,KAAK,EAAE;EAFX,EADY,gBAMZ,6BAAC,YAAD;IACI,MAAM,EAAE,EADZ;IAEI,KAAK,EAAE;EAFX,EAXR,CADH,GAkBG,IA3DR,CARJ,EAsEKR,IAAI,IAAI,CAACmB,QAAT,gBACG,6BAAC,iBAAD;IACI,QAAQ,EAAEnB,IADd;IAEI,KAAK,EAAE2B,aAAa,CAACuB;EAFzB,EADH,GAKG,IA3ER,CADJ;AA+EH,CA5JiB,CAAlB;;eA8Je3D,S"}
1
+ {"version":3,"names":["styles","StyleSheet","create","root","alignItems","flexGrow","input","secureToggleButton","padding","TextField","React","forwardRef","props","ref","autoFocus","containerStyle","containerStyleProp","editable","hint","isLoading","onBlur","onChangeText","onChangeTextProp","onFocus","placeholderTextColor","placeholderTextColorProp","secureTextEntry","secureTextEntryProp","showClearButton","showClearButtonProp","status","style","styleProp","title","value","variant","otherProps","isSearch","disabled","theme","useTheme","isFocused","setIsFocused","useState","setSecureTextEntry","variantStyles","useVariantStyleMap","handleBlur","event","handleFocus","handleSecureTogglePress","current","handleChangeText","text","handleClear","titleFontStyle","createFontStyle","color","palette","strong","inputStyle","css","Platform","OS","outlineWidth","disabledLabel","opacity","length","hintStyle"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\nimport { Platform, StyleSheet, Text, TextInput, View } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css } from '@fountain-ui/styles';\nimport IconButton from '../IconButton/IconButton';\nimport { Clear, EyeOff, EyeOn, LoadingSpinner, Search } from '../internal/icons';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type TextFieldProps from './TextFieldProps';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\nconst styles = StyleSheet.create({\n root: {\n alignItems: 'center',\n flexGrow: 1,\n },\n input: {\n flexGrow: 1,\n },\n secureToggleButton: {\n alignItems: 'flex-end',\n padding: 0,\n },\n});\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n autoFocus,\n containerStyle: containerStyleProp,\n editable = true,\n hint,\n isLoading,\n onBlur,\n onChangeText: onChangeTextProp,\n onFocus,\n placeholderTextColor: placeholderTextColorProp,\n secureTextEntry: secureTextEntryProp,\n showClearButton: showClearButtonProp,\n status = 'default' as TextFieldStatus,\n style: styleProp,\n title,\n value,\n variant = 'default' as TextFieldVariant,\n ...otherProps\n } = props;\n\n const isSearch = variant === 'search';\n\n const disabled = !editable || isLoading;\n\n const theme = useTheme();\n\n const [isFocused, setIsFocused] = useState<boolean>(autoFocus ?? false);\n const [secureTextEntry, setSecureTextEntry] = useState<boolean>(secureTextEntryProp ?? false);\n\n const variantStyles = useVariantStyleMap(variant, status, isFocused);\n\n const handleBlur = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(false);\n onBlur?.(event);\n };\n\n const handleFocus = (event: NativeSyntheticEvent<TextInputFocusEventData>) => {\n setIsFocused(true);\n onFocus?.(event);\n };\n\n const handleSecureTogglePress = () => {\n setSecureTextEntry((current) => !current);\n };\n\n const handleChangeText = (text: string) => {\n onChangeTextProp?.(text);\n };\n\n const handleClear = () => {\n handleChangeText('');\n };\n\n const showClearButton = showClearButtonProp ?? isSearch;\n\n const titleFontStyle = createFontStyle(theme, {\n // selector: (typography) => typography.caption1['semiBold']\n color: theme.palette.text.strong,\n });\n\n const inputStyle = css([\n styles.input,\n variantStyles.inputStyle,\n Platform.OS === 'web' ? { outlineWidth: 0 } as FountainUiStyle : {},\n styleProp,\n ]);\n\n const placeholderTextColor = placeholderTextColorProp ?? theme.palette.status.disabledLabel;\n\n const containerStyle = css([\n styles.root,\n variantStyles.containerStyle,\n { opacity: disabled ? 0.3 : 1 },\n containerStyleProp,\n ]);\n\n return (\n <View>\n {title && !isSearch ? (\n <Text\n children={title}\n style={titleFontStyle}\n />\n ) : null}\n\n <Row style={containerStyle}>\n {isSearch ? (\n isLoading ? (\n <LoadingSpinner/>\n ) : (\n <Search\n color={'base'}\n height={18}\n width={18}\n />\n )\n ) : null}\n\n <TextInput\n autoFocus={autoFocus}\n editable={!disabled}\n onBlur={handleBlur}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n placeholderTextColor={placeholderTextColor}\n ref={ref}\n secureTextEntry={secureTextEntry}\n style={inputStyle}\n value={value}\n {...otherProps}\n />\n\n {showClearButton && value?.length && value.length > 0 ? (\n <IconButton\n color={'base'}\n children={\n <Clear\n height={13.75}\n width={15}\n />\n }\n onPress={handleClear}\n />\n ) : null}\n\n {secureTextEntryProp && !isSearch ? (\n <IconButton\n color={'base'}\n onPress={handleSecureTogglePress}\n style={styles.secureToggleButton}\n >\n {secureTextEntry ? (\n <EyeOff\n height={19}\n width={17.42}\n />\n ) : (\n <EyeOn\n height={19}\n width={17.42}\n />\n )}\n </IconButton>\n ) : null}\n </Row>\n\n {hint && !isSearch ? (\n <Text\n children={hint}\n style={variantStyles.hintStyle}\n />\n ) : null}\n </View>\n );\n});\n\nexport default TextField;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;AAEA,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,EADZ;IAEI,KAAK,EAAE;EAFX,EADY,gBAMZ,6BAAC,YAAD;IACI,MAAM,EAAE,EADZ;IAEI,KAAK,EAAE;EAFX,EAXR,CADH,GAkBG,IA1DR,CARJ,EAqEKR,IAAI,IAAI,CAACmB,QAAT,gBACG,6BAAC,iBAAD;IACI,QAAQ,EAAEnB,IADd;IAEI,KAAK,EAAE2B,aAAa,CAACuB;EAFzB,EADH,GAKG,IA1ER,CADJ;AA8EH,CA3JiB,CAAlB;;eA6Je3D,S"}
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _LegacyTextField.default;
9
+ return _TextField.default;
10
10
  }
11
11
  });
12
12
 
13
- var _LegacyTextField = _interopRequireDefault(require("./LegacyTextField"));
13
+ var _TextField = _interopRequireDefault(require("./TextField"));
14
14
 
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export { default } from './LegacyTextField';\nexport type { default as TextFieldProps } from './LegacyTextFieldProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export { default } from './TextField';\nexport type { default as TextFieldProps } from './TextFieldProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -11,7 +11,7 @@ var _reactNative = require("react-native");
11
11
 
12
12
  var _styles = require("@fountain-ui/styles");
13
13
 
14
- var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
14
+ var _ButtonBase = _interopRequireDefault(require("../ButtonBase/ButtonBase"));
15
15
 
16
16
  var _ShadowView = _interopRequireDefault(require("../ShadowView"));
17
17
 
@@ -33,7 +33,6 @@ const useStyles = function () {
33
33
  justifyContent: 'center'
34
34
  },
35
35
  toggle: {
36
- backgroundColor: _styles.commonColors.static.strongInverse,
37
36
  borderRadius: theme.shape.radius.full
38
37
  }
39
38
  };
@@ -51,6 +50,7 @@ const sizeMap = {
51
50
  function Toggle(props) {
52
51
  const {
53
52
  checked = false,
53
+ disabled = false,
54
54
  onChange,
55
55
  style: styleProp,
56
56
  ...otherProps
@@ -76,11 +76,12 @@ function Toggle(props) {
76
76
  outputRange: [paddingHorizontal, containerWidth - toggleSize - paddingHorizontal]
77
77
  });
78
78
  const containerStyle = (0, _styles2.css)([styles.root, {
79
- backgroundColor: checked ? theme.palette.fill.accent : theme.palette.fill.weak,
79
+ backgroundColor: disabled || !checked ? theme.palette.fill.weak : theme.palette.fill.accent,
80
80
  height: containerHeight,
81
81
  width: containerWidth
82
82
  }, styleProp]);
83
83
  const toggleStyle = (0, _styles2.css)([styles.toggle, {
84
+ backgroundColor: disabled ? theme.palette.status.disabledLabel : _styles.commonColors.static.strongInverse,
84
85
  height: toggleSize,
85
86
  width: toggleSize
86
87
  }]);
@@ -95,6 +96,7 @@ function Toggle(props) {
95
96
  };
96
97
 
97
98
  return /*#__PURE__*/_react.default.createElement(_ButtonBase.default, _extends({}, otherProps, {
99
+ disabled: disabled,
98
100
  pressEffect: 'none',
99
101
  onPress: handlePress,
100
102
  style: containerStyle
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","borderRadius","shape","radius","full","justifyContent","toggle","backgroundColor","commonColors","static","strongInverse","sizeMap","medium","containerHeight","containerWidth","paddingHorizontal","toggleSize","Toggle","props","checked","onChange","style","styleProp","otherProps","styles","animation","useRef","Animated","Value","current","useEffect","timing","toValue","duration","useNativeDriver","start","translateX","interpolate","inputRange","outputRange","containerStyle","css","palette","fill","accent","weak","height","width","toggleStyle","animatedStyle","transform","handlePress"],"sources":["Toggle.tsx"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport { Animated } from 'react-native';\nimport { commonColors, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport ShadowView from '../ShadowView';\nimport { css, useTheme } from '../styles';\nimport { ExtendedStyle } from '../types';\nimport type ToggleProps from './ToggleProps';\n\ntype ToggleStyles = NamedStylesStringUnion<'root' | 'toggle'>;\n\nconst useStyles: UseStyles<ToggleStyles> = function (): ToggleStyles {\n const theme = useTheme();\n\n return {\n root: {\n borderRadius: theme.shape.radius.full,\n justifyContent: 'center',\n },\n toggle: {\n backgroundColor: commonColors.static.strongInverse,\n borderRadius: theme.shape.radius.full,\n },\n };\n};\n\nconst sizeMap = {\n medium: {\n containerHeight: 24,\n containerWidth: 42,\n paddingHorizontal: 3,\n toggleSize: 18,\n },\n};\n\nexport default function Toggle(props: ToggleProps) {\n const {\n checked = false,\n onChange,\n style: styleProp,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const animation = useRef(new Animated.Value(checked ? 1 : 0)).current;\n\n const {\n containerHeight,\n containerWidth,\n paddingHorizontal,\n toggleSize,\n } = sizeMap['medium'];\n\n useEffect(() => {\n Animated.timing(animation, {\n toValue: checked ? 1 : 0,\n duration: 150,\n useNativeDriver: false,\n }).start();\n }, [checked]);\n\n const translateX = animation.interpolate({\n inputRange: [0, 1],\n outputRange: [paddingHorizontal, containerWidth - toggleSize - paddingHorizontal],\n });\n\n const containerStyle = css([\n styles.root,\n {\n backgroundColor: checked\n ? theme.palette.fill.accent\n : theme.palette.fill.weak,\n height: containerHeight,\n width: containerWidth,\n },\n styleProp,\n ]);\n\n const toggleStyle = css([\n styles.toggle,\n {\n height: toggleSize,\n width: toggleSize,\n },\n ]);\n\n const animatedStyle = {\n transform: [{ translateX: translateX as unknown }],\n } as ExtendedStyle;\n\n const handlePress = () => {\n onChange?.(!checked);\n };\n\n return (\n <ButtonBase\n {...otherProps}\n pressEffect={'none'}\n onPress={handlePress}\n style={containerStyle}\n >\n <Animated.View style={animatedStyle}>\n <ShadowView\n style={toggleStyle}\n variant={400}\n />\n </Animated.View>\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;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"names":["useStyles","theme","useTheme","root","borderRadius","shape","radius","full","justifyContent","toggle","sizeMap","medium","containerHeight","containerWidth","paddingHorizontal","toggleSize","Toggle","props","checked","disabled","onChange","style","styleProp","otherProps","styles","animation","useRef","Animated","Value","current","useEffect","timing","toValue","duration","useNativeDriver","start","translateX","interpolate","inputRange","outputRange","containerStyle","css","backgroundColor","palette","fill","weak","accent","height","width","toggleStyle","status","disabledLabel","commonColors","static","strongInverse","animatedStyle","transform","handlePress"],"sources":["Toggle.tsx"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport { Animated } from 'react-native';\nimport { commonColors, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport ShadowView from '../ShadowView';\nimport { css, useTheme } from '../styles';\nimport { ExtendedStyle } from '../types';\nimport type ToggleProps from './ToggleProps';\n\ntype ToggleStyles = NamedStylesStringUnion<'root' | 'toggle'>;\n\nconst useStyles: UseStyles<ToggleStyles> = function (): ToggleStyles {\n const theme = useTheme();\n\n return {\n root: {\n borderRadius: theme.shape.radius.full,\n justifyContent: 'center',\n },\n toggle: {\n borderRadius: theme.shape.radius.full,\n },\n };\n};\n\nconst sizeMap = {\n medium: {\n containerHeight: 24,\n containerWidth: 42,\n paddingHorizontal: 3,\n toggleSize: 18,\n },\n};\n\nexport default function Toggle(props: ToggleProps) {\n const {\n checked = false,\n disabled = false,\n onChange,\n style: styleProp,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const animation = useRef(new Animated.Value(checked ? 1 : 0)).current;\n\n const {\n containerHeight,\n containerWidth,\n paddingHorizontal,\n toggleSize,\n } = sizeMap['medium'];\n\n useEffect(() => {\n Animated.timing(animation, {\n toValue: checked ? 1 : 0,\n duration: 150,\n useNativeDriver: false,\n }).start();\n }, [checked]);\n\n const translateX = animation.interpolate({\n inputRange: [0, 1],\n outputRange: [paddingHorizontal, containerWidth - toggleSize - paddingHorizontal],\n });\n\n const containerStyle = css([\n styles.root,\n {\n backgroundColor: disabled || !checked ? theme.palette.fill.weak : theme.palette.fill.accent,\n height: containerHeight,\n width: containerWidth,\n },\n styleProp,\n ]);\n\n const toggleStyle = css([\n styles.toggle,\n {\n backgroundColor: disabled\n ? theme.palette.status.disabledLabel\n : commonColors.static.strongInverse,\n height: toggleSize,\n width: toggleSize,\n },\n ]);\n\n const animatedStyle = {\n transform: [{ translateX: translateX as unknown }],\n } as ExtendedStyle;\n\n const handlePress = () => {\n onChange?.(!checked);\n };\n\n return (\n <ButtonBase\n {...otherProps}\n disabled={disabled}\n pressEffect={'none'}\n onPress={handlePress}\n style={containerStyle}\n >\n <Animated.View style={animatedStyle}>\n <ShadowView\n style={toggleStyle}\n variant={400}\n />\n </Animated.View>\n </ButtonBase>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAMA,MAAMA,SAAkC,GAAG,YAA0B;EACjE,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,YAAY,EAAEH,KAAK,CAACI,KAAN,CAAYC,MAAZ,CAAmBC,IAD/B;MAEFC,cAAc,EAAE;IAFd,CADH;IAKHC,MAAM,EAAE;MACJL,YAAY,EAAEH,KAAK,CAACI,KAAN,CAAYC,MAAZ,CAAmBC;IAD7B;EALL,CAAP;AASH,CAZD;;AAcA,MAAMG,OAAO,GAAG;EACZC,MAAM,EAAE;IACJC,eAAe,EAAE,EADb;IAEJC,cAAc,EAAE,EAFZ;IAGJC,iBAAiB,EAAE,CAHf;IAIJC,UAAU,EAAE;EAJR;AADI,CAAhB;;AASe,SAASC,MAAT,CAAgBC,KAAhB,EAAoC;EAC/C,MAAM;IACFC,OAAO,GAAG,KADR;IAEFC,QAAQ,GAAG,KAFT;IAGFC,QAHE;IAIFC,KAAK,EAAEC,SAJL;IAKF,GAAGC;EALD,IAMFN,KANJ;EAQA,MAAMO,MAAM,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AqBC,aADF,GAEnBC,oBAAA,CAAaC,MAAb,CAAoBC,aAH9B;IAIIP,MAAM,EAAEhC,UAJZ;IAKIiC,KAAK,EAAEjC;EALX,CAFoB,CAAJ,CAApB;EAWA,MAAMwC,aAAa,GAAG;IAClBC,SAAS,EAAE,CAAC;MAAEpB,UAAU,EAAEA;IAAd,CAAD;EADO,CAAtB;;EAIA,MAAMqB,WAAW,GAAG,MAAM;IACtBrC,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAG,CAACF,OAAJ,CAAR;EACH,CAFD;;EAIA,oBACI,6BAAC,mBAAD,eACQK,UADR;IAEI,QAAQ,EAAEJ,QAFd;IAGI,WAAW,EAAE,MAHjB;IAII,OAAO,EAAEsC,WAJb;IAKI,KAAK,EAAEjB;EALX,iBAOI,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAEe;EAAtB,gBACI,6BAAC,mBAAD;IACI,KAAK,EAAEN,WADX;IAEI,OAAO,EAAE;EAFb,EADJ,CAPJ,CADJ;AAgBH;;AAAA"}
@@ -7,7 +7,7 @@ exports.default = Toolbar;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _reactNative = require("react-native");
10
+ var _Row = _interopRequireDefault(require("../Row"));
11
11
 
12
12
  var _styles = require("../styles");
13
13
 
@@ -20,9 +20,7 @@ const useStyles = function () {
20
20
  return {
21
21
  root: {
22
22
  alignItems: 'center',
23
- flexDirection: 'row',
24
- flexWrap: 'nowrap',
25
- minHeight: 56
23
+ flexWrap: 'nowrap'
26
24
  },
27
25
  gutters: {
28
26
  paddingHorizontal: theme.spacing(4)
@@ -30,15 +28,28 @@ const useStyles = function () {
30
28
  };
31
29
  };
32
30
 
31
+ const sizeMap = {
32
+ small: {
33
+ height: 48
34
+ },
35
+ medium: {
36
+ height: 50
37
+ },
38
+ large: {
39
+ height: 56
40
+ }
41
+ };
42
+
33
43
  function Toolbar(props) {
34
44
  const {
35
45
  disableGutters = false,
46
+ size = 'medium',
36
47
  style,
37
48
  ...otherProps
38
49
  } = props;
39
50
  const styles = useStyles();
40
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
41
- style: (0, _styles.css)([styles.root, !disableGutters ? styles.gutters : undefined, style])
51
+ return /*#__PURE__*/_react.default.createElement(_Row.default, _extends({
52
+ style: (0, _styles.css)([styles.root, !disableGutters ? styles.gutters : undefined, sizeMap[size], style])
42
53
  }, otherProps));
43
54
  }
44
55
 
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","alignItems","flexDirection","flexWrap","minHeight","gutters","paddingHorizontal","spacing","Toolbar","props","disableGutters","style","otherProps","styles","css","undefined"],"sources":["Toolbar.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport type ToolbarProps from './ToolbarProps';\nimport { css, useTheme } from '../styles';\n\ntype ToolbarStyles = NamedStylesStringUnion<'root' | 'gutters'>;\n\nconst useStyles: UseStyles<ToolbarStyles> = function (): ToolbarStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n minHeight: 56,\n },\n gutters: {\n paddingHorizontal: theme.spacing(4),\n },\n };\n};\n\nexport default function Toolbar(props: ToolbarProps) {\n const {\n disableGutters = false,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <View\n style={css([\n styles.root,\n !disableGutters ? styles.gutters : undefined,\n style,\n ])}\n {...otherProps}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAGA;;;;;;AAIA,MAAMA,SAAmC,GAAG,YAA2B;EACnE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,aAAa,EAAE,KAFb;MAGFC,QAAQ,EAAE,QAHR;MAIFC,SAAS,EAAE;IAJT,CADH;IAOHC,OAAO,EAAE;MACLC,iBAAiB,EAAER,KAAK,CAACS,OAAN,CAAc,CAAd;IADd;EAPN,CAAP;AAWH,CAdD;;AAgBe,SAASC,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,cAAc,GAAG,KADf;IAEFC,KAFE;IAGF,GAAGC;EAHD,IAIFH,KAJJ;EAMA,MAAMI,MAAM,GAAGhB,SAAS,EAAxB;EAEA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAE,IAAAiB,WAAA,EAAI,CACPD,MAAM,CAACb,IADA,EAEP,CAACU,cAAD,GAAkBG,MAAM,CAACR,OAAzB,GAAmCU,SAF5B,EAGPJ,KAHO,CAAJ;EADX,GAMQC,UANR,EADJ;AAUH;;AAAA"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","alignItems","flexWrap","gutters","paddingHorizontal","spacing","sizeMap","small","height","medium","large","Toolbar","props","disableGutters","size","style","otherProps","styles","css","undefined"],"sources":["Toolbar.tsx"],"sourcesContent":["import React from 'react';\nimport type { FountainUiStyle, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Row from '../Row';\nimport { css, useTheme } from '../styles';\nimport type ToolbarProps from './ToolbarProps';\nimport type { ToolbarSize } from './ToolbarProps';\n\ntype ToolbarStyles = NamedStylesStringUnion<'root' | 'gutters'>;\n\nconst useStyles: UseStyles<ToolbarStyles> = function (): ToolbarStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n flexWrap: 'nowrap',\n },\n gutters: {\n paddingHorizontal: theme.spacing(4),\n },\n };\n};\n\nconst sizeMap: Record<ToolbarSize, FountainUiStyle> = {\n small: { height: 48 },\n medium: { height: 50 },\n large: { height: 56 },\n};\n\nexport default function Toolbar(props: ToolbarProps) {\n const {\n disableGutters = false,\n size = 'medium',\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <Row\n style={css([\n styles.root,\n !disableGutters ? styles.gutters : undefined,\n sizeMap[size],\n style,\n ])}\n {...otherProps}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;;;;;AAMA,MAAMA,SAAmC,GAAG,YAA2B;EACnE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,UAAU,EAAE,QADV;MAEFC,QAAQ,EAAE;IAFR,CADH;IAKHC,OAAO,EAAE;MACLC,iBAAiB,EAAEN,KAAK,CAACO,OAAN,CAAc,CAAd;IADd;EALN,CAAP;AASH,CAZD;;AAcA,MAAMC,OAA6C,GAAG;EAClDC,KAAK,EAAE;IAAEC,MAAM,EAAE;EAAV,CAD2C;EAElDC,MAAM,EAAE;IAAED,MAAM,EAAE;EAAV,CAF0C;EAGlDE,KAAK,EAAE;IAAEF,MAAM,EAAE;EAAV;AAH2C,CAAtD;;AAMe,SAASG,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,cAAc,GAAG,KADf;IAEFC,IAAI,GAAG,QAFL;IAGFC,KAHE;IAIF,GAAGC;EAJD,IAKFJ,KALJ;EAOA,MAAMK,MAAM,GAAGpB,SAAS,EAAxB;EAEA,oBACI,6BAAC,YAAD;IACI,KAAK,EAAE,IAAAqB,WAAA,EAAI,CACPD,MAAM,CAACjB,IADA,EAEP,CAACa,cAAD,GAAkBI,MAAM,CAACd,OAAzB,GAAmCgB,SAF5B,EAGPb,OAAO,CAACQ,IAAD,CAHA,EAIPC,KAJO,CAAJ;EADX,GAOQC,UAPR,EADJ;AAWH;;AAAA"}
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toolbarSizes = void 0;
7
+ const toolbarSizes = ['small', 'medium', 'large'];
8
+ exports.toolbarSizes = toolbarSizes;
2
9
  //# sourceMappingURL=ToolbarProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["ToolbarProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface ToolbarProps extends OverridableComponentProps<ViewProps, {\n /**\n * The content of the component.\n */\n children: React.ReactNode,\n\n /**\n * If `true`, disables gutter padding.\n * @default false\n */\n disableGutters?: boolean,\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":["toolbarSizes"],"sources":["ToolbarProps.ts"],"sourcesContent":["import React from 'react';\nimport type { RowProps } from '../Row';\nimport type { OverridableComponentProps } from '../types';\n\nexport const toolbarSizes = ['small', 'medium', 'large'] as const;\nexport type ToolbarSize = typeof toolbarSizes[number];\n\nexport default interface ToolbarProps extends OverridableComponentProps<RowProps, {\n /**\n * The content of the component.\n */\n children: React.ReactNode,\n\n /**\n * If `true`, disables gutter padding.\n * @default false\n */\n disableGutters?: boolean,\n\n /**\n * Determines the height of the toolbar.\n * @default 'medium'\n */\n size?: ToolbarSize;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,YAAY,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,OAApB,CAArB"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Toolbar';\nexport type { default as ToolbarProps } from './ToolbarProps';"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Toolbar';\nexport type { default as ToolbarProps } from './ToolbarProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -147,7 +147,12 @@ function Tooltip(props) {
147
147
  fontFamily: 'Pretendard-Regular',
148
148
  letterSpacing: 0
149
149
  }) // TODO: change caption2.
150
- : typo.caption3.regular,
150
+ : (0, _styles.typographyOf)({
151
+ fontSize: 11,
152
+ lineHeight: 15.4,
153
+ fontFamily: 'Pretendard-Regular',
154
+ letterSpacing: 0
155
+ }),
151
156
  color: theme.palette.text.strongInverse
152
157
  });
153
158
  const textStyle = (0, _styles2.css)([fontStyle, {
@@ -1 +1 @@
1
- {"version":3,"names":["DEFAULT_BEAK_LAYOUT","offset","placement","INITIAL_LAYOUT","width","height","x","y","ANIMATION_CONFIG","duration","getFlexDirection","useStyles","theme","useTheme","root","position","zIndex","tooltip","content","backgroundColor","palette","fill","base","paddingHorizontal","spacing","paddingVertical","small","borderRadius","shape","radius","sm","large","paddingBottom","paddingTop","Tooltip","props","beakLayout","children","initialLayout","left","onClose","right","numberOfTitleLines","size","style","title","tooltipStyle","verticalOffset","visible","beakOffset","beakPlacement","styles","layout","setLayout","useState","scale","useSharedValue","animatedStyle","useAnimatedStyle","transform","value","flexDirection","isVerticalPlacement","totalOffset","tooltipLayoutStyle","alignItems","undefined","overflow","Platform","select","web","display","default","contentStyle","css","flexGrow","flexShrink","useEffect","nextScaleValue","withTiming","fontStyle","createFontStyle","selector","typo","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","caption3","regular","color","text","strongInverse","textStyle","beakStyle","translateX","translateY","buttonElem","beakElem","event","nativeEvent"],"sources":["Tooltip.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Platform, Text, View, ViewProps } from 'react-native';\nimport type { WithTimingConfig } from 'react-native-reanimated';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type TooltipProps from './TooltipProps';\nimport type { TooltipBeakLayout, TooltipPlacement, TooltipSize } from './TooltipProps';\nimport Beak from './Beaks';\n\nconst DEFAULT_BEAK_LAYOUT: TooltipBeakLayout = {\n offset: 0,\n placement: 'middle',\n};\n\nconst INITIAL_LAYOUT = { width: 0, height: 0, x: 0, y: 0 };\n\nconst ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 150 };\n\ntype FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';\n\nconst getFlexDirection = (placement: TooltipPlacement): FlexDirection => {\n switch (placement) {\n case 'right':\n return 'row-reverse';\n case 'bottom':\n return 'column-reverse';\n case 'left':\n return 'row';\n case 'top':\n default:\n return 'column';\n }\n};\n\ntype TooltipStyles = NamedStylesStringUnion<'root' | 'content' | 'small' | 'large'>;\n\nconst useStyles: UseStyles<TooltipStyles> = function (): TooltipStyles {\n const theme = useTheme();\n\n return {\n root: {\n position: 'absolute',\n zIndex: theme.zIndex.tooltip,\n },\n content: {\n backgroundColor: theme.palette.fill.base,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n small: {\n borderRadius: theme.shape.radius.sm,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n large: {\n borderRadius: 5,\n paddingBottom: theme.spacing(2.5),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n };\n};\n\nexport default function Tooltip(props: TooltipProps) {\n const {\n beakLayout = DEFAULT_BEAK_LAYOUT,\n children,\n initialLayout = INITIAL_LAYOUT,\n left,\n onClose,\n placement = 'top' as TooltipPlacement,\n right,\n numberOfTitleLines = 1,\n size = 'small' as TooltipSize,\n style,\n title,\n tooltipStyle,\n verticalOffset = 4,\n visible = false,\n } = props;\n\n const {\n offset: beakOffset,\n placement: beakPlacement,\n } = beakLayout;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const [layout, setLayout] = useState(initialLayout);\n\n const scale = useSharedValue(0);\n\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }), []);\n\n const flexDirection = getFlexDirection(placement);\n\n const isVerticalPlacement = placement === 'top' || placement === 'bottom';\n\n const totalOffset = -((isVerticalPlacement ? layout.height : layout.width) + verticalOffset);\n const tooltipLayoutStyle: ViewProps['style'] = {\n alignItems: beakPlacement === 'start'\n ? 'flex-start'\n : beakPlacement === 'end'\n ? 'flex-end'\n : 'center',\n flexDirection,\n left,\n right,\n height: visible ? undefined : 0,\n overflow: visible ? undefined : 'hidden',\n ...Platform.select({\n web: {\n display: visible ? 'flex' : 'none',\n },\n default: {},\n }),\n [placement]: totalOffset,\n };\n\n const contentStyle = css([\n styles.content,\n styles[size],\n isVerticalPlacement\n ? { width: '100%' }\n : { flexGrow: 1, flexShrink: 1 },\n ]);\n\n useEffect(() => {\n const nextScaleValue = visible ? 1 : 0;\n\n scale.value = withTiming(nextScaleValue, ANIMATION_CONFIG);\n }, [visible]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => size === 'large'\n ? typographyOf({\n fontSize: 13,\n lineHeight: 19.5,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n })\n // TODO: change caption2.\n : typo.caption3.regular,\n color: theme.palette.text.strongInverse,\n });\n\n const textStyle = css([\n fontStyle,\n { flexShrink: 1 },\n ]);\n\n const beakStyle = css({\n transform: [isVerticalPlacement ? { translateX: beakOffset } : { translateY: beakOffset }],\n });\n\n const buttonElem = (\n <ButtonBase\n pressEffect={'none'}\n onPress={onClose}\n style={contentStyle}\n >\n <Text\n // TODO: Should we provide text prop customization?\n numberOfLines={numberOfTitleLines}\n style={textStyle}\n >\n {title}\n </Text>\n </ButtonBase>\n );\n\n const beakElem = (\n <View style={beakStyle}>\n <Beak\n fill={theme.palette.fill.base}\n placement={placement}\n size={size}\n />\n </View>\n );\n\n return (\n <View style={style}>\n {children}\n\n <Animated.View\n onLayout={(event) => {\n if (event.nativeEvent.layout.height === 0) {\n return;\n }\n\n setLayout(event.nativeEvent.layout);\n }}\n style={[\n styles.root,\n animatedStyle,\n tooltipLayoutStyle,\n tooltipStyle,\n ]}\n >\n {buttonElem}\n\n {beakElem}\n </Animated.View>\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAGA;;;;;;;;AAEA,MAAMA,mBAAsC,GAAG;EAC3CC,MAAM,EAAE,CADmC;EAE3CC,SAAS,EAAE;AAFgC,CAA/C;AAKA,MAAMC,cAAc,GAAG;E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ITIAL_LAYOUT","width","height","x","y","ANIMATION_CONFIG","duration","getFlexDirection","useStyles","theme","useTheme","root","position","zIndex","tooltip","content","backgroundColor","palette","fill","base","paddingHorizontal","spacing","paddingVertical","small","borderRadius","shape","radius","sm","large","paddingBottom","paddingTop","Tooltip","props","beakLayout","children","initialLayout","left","onClose","right","numberOfTitleLines","size","style","title","tooltipStyle","verticalOffset","visible","beakOffset","beakPlacement","styles","layout","setLayout","useState","scale","useSharedValue","animatedStyle","useAnimatedStyle","transform","value","flexDirection","isVerticalPlacement","totalOffset","tooltipLayoutStyle","alignItems","undefined","overflow","Platform","select","web","display","default","contentStyle","css","flexGrow","flexShrink","useEffect","nextScaleValue","withTiming","fontStyle","createFontStyle","selector","typo","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","textStyle","beakStyle","translateX","translateY","buttonElem","beakElem","event","nativeEvent"],"sources":["Tooltip.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Platform, Text, View, ViewProps } from 'react-native';\nimport type { WithTimingConfig } from 'react-native-reanimated';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type TooltipProps from './TooltipProps';\nimport type { TooltipBeakLayout, TooltipPlacement, TooltipSize } from './TooltipProps';\nimport Beak from './Beaks';\n\nconst DEFAULT_BEAK_LAYOUT: TooltipBeakLayout = {\n offset: 0,\n placement: 'middle',\n};\n\nconst INITIAL_LAYOUT = { width: 0, height: 0, x: 0, y: 0 };\n\nconst ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 150 };\n\ntype FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';\n\nconst getFlexDirection = (placement: TooltipPlacement): FlexDirection => {\n switch (placement) {\n case 'right':\n return 'row-reverse';\n case 'bottom':\n return 'column-reverse';\n case 'left':\n return 'row';\n case 'top':\n default:\n return 'column';\n }\n};\n\ntype TooltipStyles = NamedStylesStringUnion<'root' | 'content' | 'small' | 'large'>;\n\nconst useStyles: UseStyles<TooltipStyles> = function (): TooltipStyles {\n const theme = useTheme();\n\n return {\n root: {\n position: 'absolute',\n zIndex: theme.zIndex.tooltip,\n },\n content: {\n backgroundColor: theme.palette.fill.base,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n small: {\n borderRadius: theme.shape.radius.sm,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n large: {\n borderRadius: 5,\n paddingBottom: theme.spacing(2.5),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n };\n};\n\nexport default function Tooltip(props: TooltipProps) {\n const {\n beakLayout = DEFAULT_BEAK_LAYOUT,\n children,\n initialLayout = INITIAL_LAYOUT,\n left,\n onClose,\n placement = 'top' as TooltipPlacement,\n right,\n numberOfTitleLines = 1,\n size = 'small' as TooltipSize,\n style,\n title,\n tooltipStyle,\n verticalOffset = 4,\n visible = false,\n } = props;\n\n const {\n offset: beakOffset,\n placement: beakPlacement,\n } = beakLayout;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const [layout, setLayout] = useState(initialLayout);\n\n const scale = useSharedValue(0);\n\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }), []);\n\n const flexDirection = getFlexDirection(placement);\n\n const isVerticalPlacement = placement === 'top' || placement === 'bottom';\n\n const totalOffset = -((isVerticalPlacement ? layout.height : layout.width) + verticalOffset);\n const tooltipLayoutStyle: ViewProps['style'] = {\n alignItems: beakPlacement === 'start'\n ? 'flex-start'\n : beakPlacement === 'end'\n ? 'flex-end'\n : 'center',\n flexDirection,\n left,\n right,\n height: visible ? undefined : 0,\n overflow: visible ? undefined : 'hidden',\n ...Platform.select({\n web: {\n display: visible ? 'flex' : 'none',\n },\n default: {},\n }),\n [placement]: totalOffset,\n };\n\n const contentStyle = css([\n styles.content,\n styles[size],\n isVerticalPlacement\n ? { width: '100%' }\n : { flexGrow: 1, flexShrink: 1 },\n ]);\n\n useEffect(() => {\n const nextScaleValue = visible ? 1 : 0;\n\n scale.value = withTiming(nextScaleValue, ANIMATION_CONFIG);\n }, [visible]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => size === 'large'\n ? typographyOf({\n fontSize: 13,\n lineHeight: 19.5,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n })\n // TODO: change caption2.\n : typographyOf({\n fontSize: 11,\n lineHeight: 15.4,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const textStyle = css([\n fontStyle,\n { flexShrink: 1 },\n ]);\n\n const beakStyle = css({\n transform: [isVerticalPlacement ? { translateX: beakOffset } : { translateY: beakOffset }],\n });\n\n const buttonElem = (\n <ButtonBase\n pressEffect={'none'}\n onPress={onClose}\n style={contentStyle}\n >\n <Text\n // TODO: Should we provide text prop customization?\n numberOfLines={numberOfTitleLines}\n style={textStyle}\n >\n {title}\n </Text>\n </ButtonBase>\n );\n\n const beakElem = (\n <View style={beakStyle}>\n <Beak\n fill={theme.palette.fill.base}\n placement={placement}\n size={size}\n />\n </View>\n );\n\n return (\n <View style={style}>\n {children}\n\n <Animated.View\n onLayout={(event) => {\n if (event.nativeEvent.layout.height === 0) {\n return;\n }\n\n setLayout(event.nativeEvent.layout);\n }}\n style={[\n styles.root,\n animatedStyle,\n tooltipLayoutStyle,\n tooltipStyle,\n ]}\n >\n {buttonElem}\n\n {beakElem}\n </Animated.View>\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAGA;;;;;;;;AAEA,MAAMA,mBAAsC,GAAG;EAC3CC,MAAM,EAAE,CADmC;EAE3CC,SAAS,EAAE;AAFgC,CAA/C;AAKA,MAAMC,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YAJG;EARX,GAeKkD,UAfL,EAiBKC,QAjBL,CAHJ,CADJ;AAyBH;;AAAA"}
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _LegacyTooltip.default;
9
+ return _Tooltip.default;
10
10
  }
11
11
  });
12
12
 
13
- var _LegacyTooltip = _interopRequireDefault(require("./LegacyTooltip"));
13
+ var _Tooltip = _interopRequireDefault(require("./Tooltip"));
14
14
 
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyTooltip';\nexport type { default as TooltipProps } from './LegacyTooltipProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tooltip';\nexport type { default as TooltipProps } from './TooltipProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _LegacyTypography.default;
9
+ return _Typography.default;
10
10
  }
11
11
  });
12
12
 
13
- var _LegacyTypography = _interopRequireDefault(require("./LegacyTypography"));
13
+ var _Typography = _interopRequireDefault(require("./Typography"));
14
14
 
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyTypography';\nexport type { default as TypographyProps } from './LegacyTypographyProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Typography';\nexport type { default as TypographyProps } from './TypographyProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}