@fountain-ui/core 2.0.0-beta.93 → 2.0.0-beta.94

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 (579) hide show
  1. package/build/commonjs/Accordion/Accordion.js +50 -52
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/AccordionProps.js +7 -0
  4. package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
  5. package/build/commonjs/Accordion/LegacyAccordion.js +171 -0
  6. package/build/commonjs/Accordion/LegacyAccordion.js.map +1 -0
  7. package/build/commonjs/Accordion/LegacyAccordionProps.js +2 -0
  8. package/build/commonjs/Accordion/LegacyAccordionProps.js.map +1 -0
  9. package/build/commonjs/Accordion/index.js +2 -2
  10. package/build/commonjs/Accordion/index.js.map +1 -1
  11. package/build/commonjs/Accordion/useVariantStyleMap.js +126 -0
  12. package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -0
  13. package/build/commonjs/Badge/Badge.js +16 -20
  14. package/build/commonjs/Badge/Badge.js.map +1 -1
  15. package/build/commonjs/Badge/BadgeProps.js +15 -0
  16. package/build/commonjs/Badge/BadgeProps.js.map +1 -1
  17. package/build/commonjs/Badge/LegacyBadge.js +61 -0
  18. package/build/commonjs/Badge/LegacyBadge.js.map +1 -0
  19. package/build/commonjs/Badge/LegacyBadgeProps.js +2 -0
  20. package/build/commonjs/Badge/LegacyBadgeProps.js.map +1 -0
  21. package/build/commonjs/Badge/index.js +2 -2
  22. package/build/commonjs/Badge/index.js.map +1 -1
  23. package/build/commonjs/Badge/useVariantStyleMap.js +74 -0
  24. package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -0
  25. package/build/commonjs/Button/Button.js +65 -23
  26. package/build/commonjs/Button/Button.js.map +1 -1
  27. package/build/commonjs/Button/ButtonProps.js +1 -1
  28. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  29. package/build/commonjs/Button/useVariantStyleMap.js +86 -7
  30. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
  31. package/build/commonjs/ButtonBase/ButtonBase.js +4 -10
  32. package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
  33. package/build/commonjs/ButtonBase/LegacyButtonBase.js +126 -0
  34. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +1 -0
  35. package/build/commonjs/ButtonBase/index.js +2 -2
  36. package/build/commonjs/ButtonBase/index.js.map +1 -1
  37. package/build/commonjs/Chip/Chip.js +24 -62
  38. package/build/commonjs/Chip/Chip.js.map +1 -1
  39. package/build/commonjs/Chip/ChipProps.js +9 -0
  40. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  41. package/build/commonjs/Chip/LegacyChip.js +98 -0
  42. package/build/commonjs/Chip/LegacyChip.js.map +1 -0
  43. package/build/commonjs/Chip/LegacyChipProps.js +2 -0
  44. package/build/commonjs/Chip/LegacyChipProps.js.map +1 -0
  45. package/build/commonjs/Chip/index.js +2 -2
  46. package/build/commonjs/Chip/index.js.map +1 -1
  47. package/build/commonjs/Chip/useChipStyle.js +113 -0
  48. package/build/commonjs/Chip/useChipStyle.js.map +1 -0
  49. package/build/commonjs/Empty/Empty.js +86 -0
  50. package/build/commonjs/Empty/Empty.js.map +1 -0
  51. package/build/commonjs/Empty/EmptyProps.js +2 -0
  52. package/build/commonjs/Empty/EmptyProps.js.map +1 -0
  53. package/build/commonjs/Empty/index.js +16 -0
  54. package/build/commonjs/Empty/index.js.map +1 -0
  55. package/build/commonjs/IconButton/LegacyIconButton.js +3 -2
  56. package/build/commonjs/IconButton/LegacyIconButton.js.map +1 -1
  57. package/build/commonjs/IconButton/LegacyIconButtonProps.js.map +1 -1
  58. package/build/commonjs/Pagination/LegacyPagination.js +145 -0
  59. package/build/commonjs/Pagination/LegacyPagination.js.map +1 -0
  60. package/build/commonjs/Pagination/LegacyPaginationProps.js +2 -0
  61. package/build/commonjs/Pagination/LegacyPaginationProps.js.map +1 -0
  62. package/build/commonjs/Pagination/NumberPagination.js +71 -0
  63. package/build/commonjs/Pagination/NumberPagination.js.map +1 -0
  64. package/build/commonjs/Pagination/Pagination.js +9 -5
  65. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  66. package/build/commonjs/Pagination/PaginationProps.js +7 -0
  67. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  68. package/build/commonjs/Pagination/index.js +2 -2
  69. package/build/commonjs/Pagination/index.js.map +1 -1
  70. package/build/commonjs/PaginationItem/LegacyPaginationItem.js +53 -0
  71. package/build/commonjs/PaginationItem/LegacyPaginationItem.js.map +1 -0
  72. package/build/commonjs/PaginationItem/PaginationItem.js +2 -2
  73. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  74. package/build/commonjs/Snackbar/LegacySnackbar.js +134 -0
  75. package/build/commonjs/Snackbar/LegacySnackbar.js.map +1 -0
  76. package/build/commonjs/Snackbar/LegacySnackbarProps.js +2 -0
  77. package/build/commonjs/Snackbar/LegacySnackbarProps.js.map +1 -0
  78. package/build/commonjs/Snackbar/Snackbar.js +7 -5
  79. package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
  80. package/build/commonjs/Snackbar/SnackbarProps.js +7 -0
  81. package/build/commonjs/Snackbar/SnackbarProps.js.map +1 -1
  82. package/build/commonjs/Snackbar/index.js +2 -2
  83. package/build/commonjs/Snackbar/index.js.map +1 -1
  84. package/build/commonjs/SnackbarContent/LegacySnackbarContent.js +105 -0
  85. package/build/commonjs/SnackbarContent/LegacySnackbarContent.js.map +1 -0
  86. package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js +2 -0
  87. package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js.map +1 -0
  88. package/build/commonjs/SnackbarContent/SnackbarContent.js +48 -38
  89. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  90. package/build/commonjs/SnackbarContent/SnackbarContentProps.js.map +1 -1
  91. package/build/commonjs/SnackbarContent/StatusIcon.js +43 -0
  92. package/build/commonjs/SnackbarContent/StatusIcon.js.map +1 -0
  93. package/build/commonjs/SnackbarContent/index.js +2 -2
  94. package/build/commonjs/SnackbarContent/index.js.map +1 -1
  95. package/build/commonjs/Tab/LegacyTab.js +126 -0
  96. package/build/commonjs/Tab/LegacyTab.js.map +1 -0
  97. package/build/commonjs/Tab/LegacyTabProps.js +2 -0
  98. package/build/commonjs/Tab/LegacyTabProps.js.map +1 -0
  99. package/build/commonjs/Tab/Tab.js +31 -69
  100. package/build/commonjs/Tab/Tab.js.map +1 -1
  101. package/build/commonjs/Tab/TabIndicator.js.map +1 -1
  102. package/build/commonjs/Tab/TabProps.js +7 -0
  103. package/build/commonjs/Tab/TabProps.js.map +1 -1
  104. package/build/commonjs/Tab/index.js +2 -2
  105. package/build/commonjs/Tab/index.js.map +1 -1
  106. package/build/commonjs/Tab/useVariantStyleMap.js +80 -0
  107. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -0
  108. package/build/commonjs/TabBase/LegacyTabBase.js +57 -0
  109. package/build/commonjs/TabBase/LegacyTabBase.js.map +1 -0
  110. package/build/commonjs/TabBase/TabBase.js +1 -6
  111. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  112. package/build/commonjs/TabBase/index.js +2 -2
  113. package/build/commonjs/TabBase/index.js.map +1 -1
  114. package/build/commonjs/Tabs/LegacyTabIndicator.js +119 -0
  115. package/build/commonjs/Tabs/LegacyTabIndicator.js.map +1 -0
  116. package/build/commonjs/Tabs/LegacyTabIndicatorProps.js +2 -0
  117. package/build/commonjs/Tabs/LegacyTabIndicatorProps.js.map +1 -0
  118. package/build/commonjs/Tabs/LegacyTabs.js +205 -0
  119. package/build/commonjs/Tabs/LegacyTabs.js.map +1 -0
  120. package/build/commonjs/Tabs/LegacyTabsProps.js +2 -0
  121. package/build/commonjs/Tabs/LegacyTabsProps.js.map +1 -0
  122. package/build/commonjs/Tabs/TabIndicator.js +5 -9
  123. package/build/commonjs/Tabs/TabIndicator.js.map +1 -1
  124. package/build/commonjs/Tabs/TabIndicatorProps.js.map +1 -1
  125. package/build/commonjs/Tabs/Tabs.js +10 -9
  126. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  127. package/build/commonjs/Tabs/TabsProps.js +7 -0
  128. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  129. package/build/commonjs/Tabs/index.js +2 -2
  130. package/build/commonjs/Tabs/index.js.map +1 -1
  131. package/build/commonjs/TextField/LegacyTextField.js +195 -0
  132. package/build/commonjs/TextField/LegacyTextField.js.map +1 -0
  133. package/build/commonjs/TextField/LegacyTextFieldProps.js +2 -0
  134. package/build/commonjs/TextField/LegacyTextFieldProps.js.map +1 -0
  135. package/build/commonjs/TextField/OutlinedTextField.js.map +1 -1
  136. package/build/commonjs/TextField/TextField.js +105 -147
  137. package/build/commonjs/TextField/TextField.js.map +1 -1
  138. package/build/commonjs/TextField/TextFieldProps.js +9 -0
  139. package/build/commonjs/TextField/TextFieldProps.js.map +1 -1
  140. package/build/commonjs/TextField/index.js +2 -2
  141. package/build/commonjs/TextField/index.js.map +1 -1
  142. package/build/commonjs/TextField/useVariantStyleMap.js +103 -0
  143. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -0
  144. package/build/commonjs/Tooltip/Beaks/Beak.js +69 -0
  145. package/build/commonjs/Tooltip/Beaks/Beak.js.map +1 -0
  146. package/build/commonjs/Tooltip/Beaks/BeakProps.js +2 -0
  147. package/build/commonjs/Tooltip/Beaks/BeakProps.js.map +1 -0
  148. package/build/commonjs/Tooltip/Beaks/HorizontalLargeBeak.js +25 -0
  149. package/build/commonjs/Tooltip/Beaks/HorizontalLargeBeak.js.map +1 -0
  150. package/build/commonjs/Tooltip/Beaks/HorizontalSmallBeak.js +25 -0
  151. package/build/commonjs/Tooltip/Beaks/HorizontalSmallBeak.js.map +1 -0
  152. package/build/commonjs/Tooltip/Beaks/VerticalLargeBeak.js +25 -0
  153. package/build/commonjs/Tooltip/Beaks/VerticalLargeBeak.js.map +1 -0
  154. package/build/commonjs/Tooltip/Beaks/VerticalSmallBeak.js +25 -0
  155. package/build/commonjs/Tooltip/Beaks/VerticalSmallBeak.js.map +1 -0
  156. package/build/commonjs/Tooltip/Beaks/index.js +16 -0
  157. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -0
  158. package/build/commonjs/Tooltip/LegacyTooltip.js +147 -0
  159. package/build/commonjs/Tooltip/LegacyTooltip.js.map +1 -0
  160. package/build/commonjs/Tooltip/LegacyTooltipProps.js +2 -0
  161. package/build/commonjs/Tooltip/LegacyTooltipProps.js.map +1 -0
  162. package/build/commonjs/Tooltip/Tooltip.js +101 -52
  163. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  164. package/build/commonjs/Tooltip/TooltipProps.js +11 -0
  165. package/build/commonjs/Tooltip/TooltipProps.js.map +1 -1
  166. package/build/commonjs/Tooltip/index.js +2 -2
  167. package/build/commonjs/Tooltip/index.js.map +1 -1
  168. package/build/commonjs/hooks/useCollapsibleAppBar.js +2 -3
  169. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  170. package/build/commonjs/index.js +21 -0
  171. package/build/commonjs/index.js.map +1 -1
  172. package/build/commonjs/internal/icons/CheckCircle.js +27 -0
  173. package/build/commonjs/internal/icons/CheckCircle.js.map +1 -0
  174. package/build/commonjs/internal/icons/Clear.js +27 -0
  175. package/build/commonjs/internal/icons/Clear.js.map +1 -0
  176. package/build/commonjs/internal/icons/EyeOff.js +31 -0
  177. package/build/commonjs/internal/icons/EyeOff.js.map +1 -0
  178. package/build/commonjs/internal/icons/EyeOn.js +27 -0
  179. package/build/commonjs/internal/icons/EyeOn.js.map +1 -0
  180. package/build/commonjs/internal/icons/InfoCircle.js +27 -0
  181. package/build/commonjs/internal/icons/InfoCircle.js.map +1 -0
  182. package/build/commonjs/internal/icons/LoadingSpinner/LoadingSpinnerProps.js +2 -0
  183. package/build/commonjs/internal/icons/LoadingSpinner/LoadingSpinnerProps.js.map +1 -0
  184. package/build/commonjs/internal/icons/LoadingSpinner/index.js +36 -0
  185. package/build/commonjs/internal/icons/LoadingSpinner/index.js.map +1 -0
  186. package/build/commonjs/internal/icons/LoadingSpinner/index.native.js +36 -0
  187. package/build/commonjs/internal/icons/LoadingSpinner/index.native.js.map +1 -0
  188. package/build/commonjs/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
  189. package/build/commonjs/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
  190. package/build/commonjs/internal/icons/LoadingSpinner/utils.js +25 -0
  191. package/build/commonjs/internal/icons/LoadingSpinner/utils.js.map +1 -0
  192. package/build/commonjs/internal/icons/Search.js +23 -0
  193. package/build/commonjs/internal/icons/Search.js.map +1 -0
  194. package/build/commonjs/internal/icons/index.js +56 -0
  195. package/build/commonjs/internal/icons/index.js.map +1 -1
  196. package/build/module/Accordion/Accordion.js +47 -50
  197. package/build/module/Accordion/Accordion.js.map +1 -1
  198. package/build/module/Accordion/AccordionProps.js +1 -1
  199. package/build/module/Accordion/AccordionProps.js.map +1 -1
  200. package/build/module/Accordion/LegacyAccordion.js +148 -0
  201. package/build/module/Accordion/LegacyAccordion.js.map +1 -0
  202. package/build/module/Accordion/LegacyAccordionProps.js +2 -0
  203. package/build/module/Accordion/LegacyAccordionProps.js.map +1 -0
  204. package/build/module/Accordion/index.js +1 -1
  205. package/build/module/Accordion/index.js.map +1 -1
  206. package/build/module/Accordion/useVariantStyleMap.js +116 -0
  207. package/build/module/Accordion/useVariantStyleMap.js.map +1 -0
  208. package/build/module/Badge/Badge.js +17 -23
  209. package/build/module/Badge/Badge.js.map +1 -1
  210. package/build/module/Badge/BadgeProps.js +5 -1
  211. package/build/module/Badge/BadgeProps.js.map +1 -1
  212. package/build/module/Badge/LegacyBadge.js +48 -0
  213. package/build/module/Badge/LegacyBadge.js.map +1 -0
  214. package/build/module/Badge/LegacyBadgeProps.js +2 -0
  215. package/build/module/Badge/LegacyBadgeProps.js.map +1 -0
  216. package/build/module/Badge/index.js +1 -1
  217. package/build/module/Badge/index.js.map +1 -1
  218. package/build/module/Badge/useVariantStyleMap.js +64 -0
  219. package/build/module/Badge/useVariantStyleMap.js.map +1 -0
  220. package/build/module/Button/Button.js +59 -19
  221. package/build/module/Button/Button.js.map +1 -1
  222. package/build/module/Button/ButtonProps.js +1 -1
  223. package/build/module/Button/ButtonProps.js.map +1 -1
  224. package/build/module/Button/useVariantStyleMap.js +86 -7
  225. package/build/module/Button/useVariantStyleMap.js.map +1 -1
  226. package/build/module/ButtonBase/ButtonBase.js +4 -9
  227. package/build/module/ButtonBase/ButtonBase.js.map +1 -1
  228. package/build/module/ButtonBase/LegacyButtonBase.js +106 -0
  229. package/build/module/ButtonBase/LegacyButtonBase.js.map +1 -0
  230. package/build/module/ButtonBase/index.js +1 -1
  231. package/build/module/ButtonBase/index.js.map +1 -1
  232. package/build/module/Chip/Chip.js +25 -64
  233. package/build/module/Chip/Chip.js.map +1 -1
  234. package/build/module/Chip/ChipProps.js +2 -1
  235. package/build/module/Chip/ChipProps.js.map +1 -1
  236. package/build/module/Chip/LegacyChip.js +84 -0
  237. package/build/module/Chip/LegacyChip.js.map +1 -0
  238. package/build/module/Chip/LegacyChipProps.js +2 -0
  239. package/build/module/Chip/LegacyChipProps.js.map +1 -0
  240. package/build/module/Chip/index.js +1 -1
  241. package/build/module/Chip/index.js.map +1 -1
  242. package/build/module/Chip/useChipStyle.js +104 -0
  243. package/build/module/Chip/useChipStyle.js.map +1 -0
  244. package/build/module/Empty/Empty.js +71 -0
  245. package/build/module/Empty/Empty.js.map +1 -0
  246. package/build/module/Empty/EmptyProps.js +2 -0
  247. package/build/module/Empty/EmptyProps.js.map +1 -0
  248. package/build/module/Empty/index.js +2 -0
  249. package/build/module/Empty/index.js.map +1 -0
  250. package/build/module/IconButton/LegacyIconButton.js +3 -2
  251. package/build/module/IconButton/LegacyIconButton.js.map +1 -1
  252. package/build/module/IconButton/LegacyIconButtonProps.js.map +1 -1
  253. package/build/module/Pagination/LegacyPagination.js +129 -0
  254. package/build/module/Pagination/LegacyPagination.js.map +1 -0
  255. package/build/module/Pagination/LegacyPaginationProps.js +2 -0
  256. package/build/module/Pagination/LegacyPaginationProps.js.map +1 -0
  257. package/build/module/Pagination/NumberPagination.js +57 -0
  258. package/build/module/Pagination/NumberPagination.js.map +1 -0
  259. package/build/module/Pagination/Pagination.js +8 -5
  260. package/build/module/Pagination/Pagination.js.map +1 -1
  261. package/build/module/Pagination/PaginationProps.js +1 -1
  262. package/build/module/Pagination/PaginationProps.js.map +1 -1
  263. package/build/module/Pagination/index.js +1 -1
  264. package/build/module/Pagination/index.js.map +1 -1
  265. package/build/module/PaginationItem/LegacyPaginationItem.js +40 -0
  266. package/build/module/PaginationItem/LegacyPaginationItem.js.map +1 -0
  267. package/build/module/PaginationItem/PaginationItem.js +2 -2
  268. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  269. package/build/module/Snackbar/LegacySnackbar.js +107 -0
  270. package/build/module/Snackbar/LegacySnackbar.js.map +1 -0
  271. package/build/module/Snackbar/LegacySnackbarProps.js +2 -0
  272. package/build/module/Snackbar/LegacySnackbarProps.js.map +1 -0
  273. package/build/module/Snackbar/Snackbar.js +7 -5
  274. package/build/module/Snackbar/Snackbar.js.map +1 -1
  275. package/build/module/Snackbar/SnackbarProps.js +1 -1
  276. package/build/module/Snackbar/SnackbarProps.js.map +1 -1
  277. package/build/module/Snackbar/index.js +1 -1
  278. package/build/module/Snackbar/index.js.map +1 -1
  279. package/build/module/SnackbarContent/LegacySnackbarContent.js +84 -0
  280. package/build/module/SnackbarContent/LegacySnackbarContent.js.map +1 -0
  281. package/build/module/SnackbarContent/LegacySnackbarContentProps.js +2 -0
  282. package/build/module/SnackbarContent/LegacySnackbarContentProps.js.map +1 -0
  283. package/build/module/SnackbarContent/SnackbarContent.js +48 -35
  284. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  285. package/build/module/SnackbarContent/SnackbarContentProps.js.map +1 -1
  286. package/build/module/SnackbarContent/StatusIcon.js +31 -0
  287. package/build/module/SnackbarContent/StatusIcon.js.map +1 -0
  288. package/build/module/SnackbarContent/index.js +1 -1
  289. package/build/module/SnackbarContent/index.js.map +1 -1
  290. package/build/module/Tab/LegacyTab.js +105 -0
  291. package/build/module/Tab/LegacyTab.js.map +1 -0
  292. package/build/module/Tab/LegacyTabProps.js +2 -0
  293. package/build/module/Tab/LegacyTabProps.js.map +1 -0
  294. package/build/module/Tab/Tab.js +30 -66
  295. package/build/module/Tab/Tab.js.map +1 -1
  296. package/build/module/Tab/TabIndicator.js.map +1 -1
  297. package/build/module/Tab/TabProps.js +1 -1
  298. package/build/module/Tab/TabProps.js.map +1 -1
  299. package/build/module/Tab/index.js +1 -1
  300. package/build/module/Tab/index.js.map +1 -1
  301. package/build/module/Tab/useVariantStyleMap.js +70 -0
  302. package/build/module/Tab/useVariantStyleMap.js.map +1 -0
  303. package/build/module/TabBase/LegacyTabBase.js +44 -0
  304. package/build/module/TabBase/LegacyTabBase.js.map +1 -0
  305. package/build/module/TabBase/TabBase.js +1 -5
  306. package/build/module/TabBase/TabBase.js.map +1 -1
  307. package/build/module/TabBase/index.js +1 -1
  308. package/build/module/TabBase/index.js.map +1 -1
  309. package/build/module/Tabs/LegacyTabIndicator.js +98 -0
  310. package/build/module/Tabs/LegacyTabIndicator.js.map +1 -0
  311. package/build/module/Tabs/LegacyTabIndicatorProps.js +2 -0
  312. package/build/module/Tabs/LegacyTabIndicatorProps.js.map +1 -0
  313. package/build/module/Tabs/LegacyTabs.js +180 -0
  314. package/build/module/Tabs/LegacyTabs.js.map +1 -0
  315. package/build/module/Tabs/LegacyTabsProps.js +2 -0
  316. package/build/module/Tabs/LegacyTabsProps.js.map +1 -0
  317. package/build/module/Tabs/TabIndicator.js +5 -9
  318. package/build/module/Tabs/TabIndicator.js.map +1 -1
  319. package/build/module/Tabs/TabIndicatorProps.js.map +1 -1
  320. package/build/module/Tabs/Tabs.js +10 -9
  321. package/build/module/Tabs/Tabs.js.map +1 -1
  322. package/build/module/Tabs/TabsProps.js +1 -1
  323. package/build/module/Tabs/TabsProps.js.map +1 -1
  324. package/build/module/Tabs/index.js +1 -1
  325. package/build/module/Tabs/index.js.map +1 -1
  326. package/build/module/TextField/LegacyTextField.js +169 -0
  327. package/build/module/TextField/LegacyTextField.js.map +1 -0
  328. package/build/module/TextField/LegacyTextFieldProps.js +2 -0
  329. package/build/module/TextField/LegacyTextFieldProps.js.map +1 -0
  330. package/build/module/TextField/OutlinedTextField.js.map +1 -1
  331. package/build/module/TextField/TextField.js +104 -144
  332. package/build/module/TextField/TextField.js.map +1 -1
  333. package/build/module/TextField/TextFieldProps.js +2 -1
  334. package/build/module/TextField/TextFieldProps.js.map +1 -1
  335. package/build/module/TextField/index.js +1 -1
  336. package/build/module/TextField/index.js.map +1 -1
  337. package/build/module/TextField/useVariantStyleMap.js +94 -0
  338. package/build/module/TextField/useVariantStyleMap.js.map +1 -0
  339. package/build/module/Tooltip/Beaks/Beak.js +56 -0
  340. package/build/module/Tooltip/Beaks/Beak.js.map +1 -0
  341. package/build/module/Tooltip/Beaks/BeakProps.js +2 -0
  342. package/build/module/Tooltip/Beaks/BeakProps.js.map +1 -0
  343. package/build/module/Tooltip/Beaks/HorizontalLargeBeak.js +14 -0
  344. package/build/module/Tooltip/Beaks/HorizontalLargeBeak.js.map +1 -0
  345. package/build/module/Tooltip/Beaks/HorizontalSmallBeak.js +14 -0
  346. package/build/module/Tooltip/Beaks/HorizontalSmallBeak.js.map +1 -0
  347. package/build/module/Tooltip/Beaks/VerticalLargeBeak.js +14 -0
  348. package/build/module/Tooltip/Beaks/VerticalLargeBeak.js.map +1 -0
  349. package/build/module/Tooltip/Beaks/VerticalSmallBeak.js +14 -0
  350. package/build/module/Tooltip/Beaks/VerticalSmallBeak.js.map +1 -0
  351. package/build/module/Tooltip/Beaks/index.js +2 -0
  352. package/build/module/Tooltip/Beaks/index.js.map +1 -0
  353. package/build/module/Tooltip/LegacyTooltip.js +121 -0
  354. package/build/module/Tooltip/LegacyTooltip.js.map +1 -0
  355. package/build/module/Tooltip/LegacyTooltipProps.js +2 -0
  356. package/build/module/Tooltip/LegacyTooltipProps.js.map +1 -0
  357. package/build/module/Tooltip/Tooltip.js +97 -46
  358. package/build/module/Tooltip/Tooltip.js.map +1 -1
  359. package/build/module/Tooltip/TooltipProps.js +3 -1
  360. package/build/module/Tooltip/TooltipProps.js.map +1 -1
  361. package/build/module/Tooltip/index.js +1 -1
  362. package/build/module/Tooltip/index.js.map +1 -1
  363. package/build/module/hooks/useCollapsibleAppBar.js +2 -3
  364. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  365. package/build/module/index.js +2 -0
  366. package/build/module/index.js.map +1 -1
  367. package/build/module/internal/icons/CheckCircle.js +13 -0
  368. package/build/module/internal/icons/CheckCircle.js.map +1 -0
  369. package/build/module/internal/icons/Clear.js +13 -0
  370. package/build/module/internal/icons/Clear.js.map +1 -0
  371. package/build/module/internal/icons/EyeOff.js +17 -0
  372. package/build/module/internal/icons/EyeOff.js.map +1 -0
  373. package/build/module/internal/icons/EyeOn.js +13 -0
  374. package/build/module/internal/icons/EyeOn.js.map +1 -0
  375. package/build/module/internal/icons/InfoCircle.js +13 -0
  376. package/build/module/internal/icons/InfoCircle.js.map +1 -0
  377. package/build/module/internal/icons/LoadingSpinner/LoadingSpinnerProps.js +2 -0
  378. package/build/module/internal/icons/LoadingSpinner/LoadingSpinnerProps.js.map +1 -0
  379. package/build/module/internal/icons/LoadingSpinner/index.js +23 -0
  380. package/build/module/internal/icons/LoadingSpinner/index.js.map +1 -0
  381. package/build/module/internal/icons/LoadingSpinner/index.native.js +23 -0
  382. package/build/module/internal/icons/LoadingSpinner/index.native.js.map +1 -0
  383. package/build/module/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
  384. package/build/module/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
  385. package/build/module/internal/icons/LoadingSpinner/utils.js +12 -0
  386. package/build/module/internal/icons/LoadingSpinner/utils.js.map +1 -0
  387. package/build/module/internal/icons/Search.js +9 -0
  388. package/build/module/internal/icons/Search.js.map +1 -0
  389. package/build/module/internal/icons/index.js +7 -0
  390. package/build/module/internal/icons/index.js.map +1 -1
  391. package/build/typescript/Accordion/Accordion.d.ts +1 -1
  392. package/build/typescript/Accordion/AccordionProps.d.ts +8 -1
  393. package/build/typescript/Accordion/LegacyAccordion.d.ts +3 -0
  394. package/build/typescript/Accordion/LegacyAccordionProps.d.ts +28 -0
  395. package/build/typescript/Accordion/index.d.ts +2 -2
  396. package/build/typescript/Accordion/useVariantStyleMap.d.ts +13 -0
  397. package/build/typescript/Badge/Badge.d.ts +1 -1
  398. package/build/typescript/Badge/BadgeProps.d.ts +28 -2
  399. package/build/typescript/Badge/LegacyBadge.d.ts +3 -0
  400. package/build/typescript/Badge/LegacyBadgeProps.d.ts +34 -0
  401. package/build/typescript/Badge/index.d.ts +2 -2
  402. package/build/typescript/Badge/useVariantStyleMap.d.ts +9 -0
  403. package/build/typescript/Button/ButtonProps.d.ts +6 -1
  404. package/build/typescript/Button/useVariantStyleMap.d.ts +2 -2
  405. package/build/typescript/ButtonBase/ButtonBase.d.ts +0 -1
  406. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +5 -0
  407. package/build/typescript/ButtonBase/index.d.ts +1 -1
  408. package/build/typescript/Chip/ChipProps.d.ts +13 -6
  409. package/build/typescript/Chip/LegacyChip.d.ts +3 -0
  410. package/build/typescript/Chip/LegacyChipProps.d.ts +28 -0
  411. package/build/typescript/Chip/index.d.ts +2 -2
  412. package/build/typescript/Chip/useChipStyle.d.ts +11 -0
  413. package/build/typescript/Empty/Empty.d.ts +3 -0
  414. package/build/typescript/Empty/EmptyProps.d.ts +27 -0
  415. package/build/typescript/Empty/index.d.ts +2 -0
  416. package/build/typescript/IconButton/LegacyIconButtonProps.d.ts +4 -0
  417. package/build/typescript/Pagination/LegacyPagination.d.ts +3 -0
  418. package/build/typescript/Pagination/LegacyPaginationProps.d.ts +71 -0
  419. package/build/typescript/Pagination/NumberPagination.d.ts +8 -0
  420. package/build/typescript/Pagination/PaginationProps.d.ts +7 -0
  421. package/build/typescript/Pagination/index.d.ts +2 -2
  422. package/build/typescript/PaginationItem/LegacyPaginationItem.d.ts +5 -0
  423. package/build/typescript/Snackbar/LegacySnackbar.d.ts +3 -0
  424. package/build/typescript/Snackbar/LegacySnackbarProps.d.ts +51 -0
  425. package/build/typescript/Snackbar/SnackbarProps.d.ts +9 -2
  426. package/build/typescript/Snackbar/index.d.ts +2 -2
  427. package/build/typescript/SnackbarContent/LegacySnackbarContent.d.ts +3 -0
  428. package/build/typescript/SnackbarContent/LegacySnackbarContentProps.d.ts +26 -0
  429. package/build/typescript/SnackbarContent/SnackbarContentProps.d.ts +5 -24
  430. package/build/typescript/SnackbarContent/StatusIcon.d.ts +7 -0
  431. package/build/typescript/SnackbarContent/index.d.ts +2 -2
  432. package/build/typescript/Tab/LegacyTab.d.ts +3 -0
  433. package/build/typescript/Tab/LegacyTabProps.d.ts +58 -0
  434. package/build/typescript/Tab/TabIndicator.d.ts +2 -2
  435. package/build/typescript/Tab/TabProps.d.ts +3 -16
  436. package/build/typescript/Tab/index.d.ts +2 -2
  437. package/build/typescript/Tab/useVariantStyleMap.d.ts +10 -0
  438. package/build/typescript/TabBase/LegacyTabBase.d.ts +3 -0
  439. package/build/typescript/TabBase/index.d.ts +1 -1
  440. package/build/typescript/Tabs/LegacyTabIndicator.d.ts +3 -0
  441. package/build/typescript/Tabs/LegacyTabIndicatorProps.d.ts +28 -0
  442. package/build/typescript/Tabs/LegacyTabs.d.ts +5 -0
  443. package/build/typescript/Tabs/LegacyTabsProps.d.ts +74 -0
  444. package/build/typescript/Tabs/TabIndicatorProps.d.ts +0 -10
  445. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  446. package/build/typescript/Tabs/TabsProps.d.ts +10 -10
  447. package/build/typescript/Tabs/index.d.ts +2 -2
  448. package/build/typescript/TextField/LegacyTextField.d.ts +5 -0
  449. package/build/typescript/TextField/LegacyTextFieldProps.d.ts +67 -0
  450. package/build/typescript/TextField/OutlinedTextField.d.ts +1 -1
  451. package/build/typescript/TextField/TextField.d.ts +1 -1
  452. package/build/typescript/TextField/TextFieldProps.d.ts +25 -51
  453. package/build/typescript/TextField/index.d.ts +2 -2
  454. package/build/typescript/TextField/useVariantStyleMap.d.ts +9 -0
  455. package/build/typescript/Tooltip/Beaks/Beak.d.ts +3 -0
  456. package/build/typescript/Tooltip/Beaks/BeakProps.d.ts +4 -0
  457. package/build/typescript/Tooltip/Beaks/HorizontalLargeBeak.d.ts +3 -0
  458. package/build/typescript/Tooltip/Beaks/HorizontalSmallBeak.d.ts +3 -0
  459. package/build/typescript/Tooltip/Beaks/VerticalLargeBeak.d.ts +3 -0
  460. package/build/typescript/Tooltip/Beaks/VerticalSmallBeak.d.ts +3 -0
  461. package/build/typescript/Tooltip/Beaks/index.d.ts +2 -0
  462. package/build/typescript/Tooltip/LegacyTooltip.d.ts +3 -0
  463. package/build/typescript/Tooltip/LegacyTooltipProps.d.ts +72 -0
  464. package/build/typescript/Tooltip/TooltipProps.d.ts +19 -9
  465. package/build/typescript/Tooltip/index.d.ts +2 -2
  466. package/build/typescript/index.d.ts +2 -0
  467. package/build/typescript/internal/icons/CheckCircle.d.ts +8 -0
  468. package/build/typescript/internal/icons/Clear.d.ts +8 -0
  469. package/build/typescript/internal/icons/EyeOff.d.ts +8 -0
  470. package/build/typescript/internal/icons/EyeOn.d.ts +8 -0
  471. package/build/typescript/internal/icons/InfoCircle.d.ts +8 -0
  472. package/build/typescript/internal/icons/LoadingSpinner/LoadingSpinnerProps.d.ts +9 -0
  473. package/build/typescript/internal/icons/LoadingSpinner/index.d.ts +3 -0
  474. package/build/typescript/internal/icons/LoadingSpinner/index.native.d.ts +3 -0
  475. package/build/typescript/internal/icons/LoadingSpinner/utils.d.ts +3 -0
  476. package/build/typescript/internal/icons/Search.d.ts +8 -0
  477. package/build/typescript/internal/icons/index.d.ts +7 -0
  478. package/package.json +2 -2
  479. package/src/Accordion/Accordion.tsx +75 -72
  480. package/src/Accordion/AccordionProps.ts +11 -2
  481. package/src/Accordion/LegacyAccordion.tsx +188 -0
  482. package/src/Accordion/LegacyAccordionProps.ts +34 -0
  483. package/src/Accordion/index.ts +2 -2
  484. package/src/Accordion/useVariantStyleMap.ts +127 -0
  485. package/src/Badge/Badge.tsx +23 -29
  486. package/src/Badge/BadgeProps.ts +35 -2
  487. package/src/Badge/LegacyBadge.tsx +66 -0
  488. package/src/Badge/LegacyBadgeProps.ts +40 -0
  489. package/src/Badge/index.ts +2 -2
  490. package/src/Badge/useVariantStyleMap.ts +73 -0
  491. package/src/Button/Button.tsx +72 -22
  492. package/src/Button/ButtonProps.ts +8 -0
  493. package/src/Button/useVariantStyleMap.ts +88 -9
  494. package/src/ButtonBase/ButtonBase.tsx +4 -10
  495. package/src/ButtonBase/LegacyButtonBase.tsx +135 -0
  496. package/src/ButtonBase/index.ts +2 -2
  497. package/src/Chip/Chip.tsx +26 -82
  498. package/src/Chip/ChipProps.ts +16 -7
  499. package/src/Chip/LegacyChip.tsx +116 -0
  500. package/src/Chip/LegacyChipProps.ts +33 -0
  501. package/src/Chip/index.ts +2 -2
  502. package/src/Chip/useChipStyle.ts +123 -0
  503. package/src/Empty/Empty.tsx +108 -0
  504. package/src/Empty/EmptyProps.ts +31 -0
  505. package/src/Empty/index.ts +2 -0
  506. package/src/IconButton/LegacyIconButton.tsx +3 -2
  507. package/src/IconButton/LegacyIconButtonProps.ts +5 -0
  508. package/src/Pagination/LegacyPagination.tsx +168 -0
  509. package/src/Pagination/LegacyPaginationProps.ts +85 -0
  510. package/src/Pagination/NumberPagination.tsx +78 -0
  511. package/src/Pagination/Pagination.tsx +15 -5
  512. package/src/Pagination/PaginationProps.ts +9 -0
  513. package/src/Pagination/index.ts +2 -2
  514. package/src/PaginationItem/LegacyPaginationItem.tsx +52 -0
  515. package/src/PaginationItem/PaginationItem.tsx +2 -2
  516. package/src/Snackbar/LegacySnackbar.tsx +130 -0
  517. package/src/Snackbar/LegacySnackbarProps.ts +61 -0
  518. package/src/Snackbar/Snackbar.tsx +7 -5
  519. package/src/Snackbar/SnackbarProps.ts +11 -3
  520. package/src/Snackbar/index.ts +2 -2
  521. package/src/SnackbarContent/LegacySnackbarContent.tsx +129 -0
  522. package/src/SnackbarContent/LegacySnackbarContentProps.ts +30 -0
  523. package/src/SnackbarContent/SnackbarContent.tsx +53 -48
  524. package/src/SnackbarContent/SnackbarContentProps.ts +10 -27
  525. package/src/SnackbarContent/StatusIcon.tsx +37 -0
  526. package/src/SnackbarContent/index.ts +2 -2
  527. package/src/Tab/LegacyTab.tsx +141 -0
  528. package/src/Tab/LegacyTabProps.ts +68 -0
  529. package/src/Tab/Tab.tsx +36 -79
  530. package/src/Tab/TabIndicator.tsx +5 -2
  531. package/src/Tab/TabProps.ts +3 -18
  532. package/src/Tab/index.ts +2 -2
  533. package/src/Tab/useVariantStyleMap.ts +86 -0
  534. package/src/TabBase/LegacyTabBase.tsx +55 -0
  535. package/src/TabBase/TabBase.tsx +0 -5
  536. package/src/TabBase/index.ts +2 -2
  537. package/src/Tabs/LegacyTabIndicator.tsx +111 -0
  538. package/src/Tabs/LegacyTabIndicatorProps.ts +33 -0
  539. package/src/Tabs/LegacyTabs.tsx +225 -0
  540. package/src/Tabs/LegacyTabsProps.ts +87 -0
  541. package/src/Tabs/TabIndicator.tsx +6 -12
  542. package/src/Tabs/TabIndicatorProps.ts +0 -13
  543. package/src/Tabs/Tabs.tsx +12 -8
  544. package/src/Tabs/TabsProps.ts +12 -11
  545. package/src/Tabs/index.ts +2 -2
  546. package/src/TextField/LegacyTextField.tsx +168 -0
  547. package/src/TextField/LegacyTextFieldProps.ts +80 -0
  548. package/src/TextField/OutlinedTextField.tsx +1 -1
  549. package/src/TextField/TextField.tsx +155 -137
  550. package/src/TextField/TextFieldProps.ts +27 -57
  551. package/src/TextField/index.tsx +2 -2
  552. package/src/TextField/useVariantStyleMap.ts +100 -0
  553. package/src/Tooltip/Beaks/Beak.tsx +53 -0
  554. package/src/Tooltip/Beaks/BeakProps.ts +4 -0
  555. package/src/Tooltip/Beaks/HorizontalLargeBeak.tsx +18 -0
  556. package/src/Tooltip/Beaks/HorizontalSmallBeak.tsx +18 -0
  557. package/src/Tooltip/Beaks/VerticalLargeBeak.tsx +18 -0
  558. package/src/Tooltip/Beaks/VerticalSmallBeak.tsx +18 -0
  559. package/src/Tooltip/Beaks/index.ts +2 -0
  560. package/src/Tooltip/LegacyTooltip.tsx +167 -0
  561. package/src/Tooltip/LegacyTooltipProps.ts +86 -0
  562. package/src/Tooltip/Tooltip.tsx +114 -66
  563. package/src/Tooltip/TooltipProps.ts +28 -10
  564. package/src/Tooltip/index.ts +2 -2
  565. package/src/hooks/useCollapsibleAppBar.ts +2 -3
  566. package/src/index.ts +3 -0
  567. package/src/internal/icons/CheckCircle.tsx +20 -0
  568. package/src/internal/icons/Clear.tsx +20 -0
  569. package/src/internal/icons/EyeOff.tsx +25 -0
  570. package/src/internal/icons/EyeOn.tsx +20 -0
  571. package/src/internal/icons/InfoCircle.tsx +21 -0
  572. package/src/internal/icons/LoadingSpinner/LoadingSpinnerProps.ts +11 -0
  573. package/src/internal/icons/LoadingSpinner/index.native.tsx +31 -0
  574. package/src/internal/icons/LoadingSpinner/index.tsx +31 -0
  575. package/src/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
  576. package/src/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
  577. package/src/internal/icons/LoadingSpinner/utils.ts +14 -0
  578. package/src/internal/icons/Search.tsx +15 -0
  579. package/src/internal/icons/index.ts +7 -0
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = NumberPagination;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _reactNative = require("react-native");
11
+
12
+ var _styles = require("@fountain-ui/styles");
13
+
14
+ var _Divider = _interopRequireDefault(require("../Divider"));
15
+
16
+ var _Row = _interopRequireDefault(require("../Row"));
17
+
18
+ var _styles2 = require("../styles");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ const useStyles = function () {
23
+ const theme = (0, _styles2.useTheme)();
24
+ return {
25
+ root: {
26
+ backgroundColor: _styles.commonColors.static.weakOpacity,
27
+ borderRadius: theme.shape.radius.full,
28
+ paddingHorizontal: theme.spacing(1.25),
29
+ paddingVertical: theme.spacing(0.5)
30
+ },
31
+ divider: {
32
+ alignSelf: 'center',
33
+ borderColor: _styles.commonColors.static.weakOpacityInverse,
34
+ height: 6
35
+ }
36
+ };
37
+ };
38
+
39
+ function NumberPagination(props) {
40
+ const {
41
+ currentPage,
42
+ maxPage
43
+ } = props;
44
+ const styles = useStyles();
45
+ const theme = (0, _styles2.useTheme)();
46
+ const typography = (0, _styles.typographyOf)({
47
+ fontSize: 9.5,
48
+ lineHeight: 11.4,
49
+ fontFamily: 'Pretendard-SemiBold',
50
+ letterSpacing: -0.19
51
+ });
52
+ const currentFontStyle = (0, _styles2.createFontStyle)(theme, {
53
+ selector: _ => typography,
54
+ color: _styles.commonColors.static.strongInverse
55
+ });
56
+ const countFontStyle = (0, _styles2.createFontStyle)(theme, {
57
+ selector: _ => typography,
58
+ color: _styles.commonColors.static.baseOpacityInverse
59
+ });
60
+ return /*#__PURE__*/_react.default.createElement(_Row.default, {
61
+ style: styles.root
62
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
63
+ style: currentFontStyle
64
+ }, currentPage + 1), /*#__PURE__*/_react.default.createElement(_Divider.default, {
65
+ style: styles.divider,
66
+ vertical: true
67
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
68
+ style: countFontStyle
69
+ }, maxPage));
70
+ }
71
+ //# sourceMappingURL=NumberPagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","backgroundColor","commonColors","static","weakOpacity","borderRadius","shape","radius","full","paddingHorizontal","spacing","paddingVertical","divider","alignSelf","borderColor","weakOpacityInverse","height","NumberPagination","props","currentPage","maxPage","styles","typography","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","currentFontStyle","createFontStyle","selector","_","color","strongInverse","countFontStyle","baseOpacityInverse"],"sources":["NumberPagination.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { commonColors, typographyOf } from '@fountain-ui/styles';\nimport Divider from '../Divider';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type PaginationProps from './PaginationProps';\n\ntype NumberPaginationStyles = NamedStylesStringUnion<'root' | 'divider'>;\n\nconst useStyles: UseStyles<NumberPaginationStyles> = function (): NumberPaginationStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: commonColors.static.weakOpacity,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(1.25),\n paddingVertical: theme.spacing(0.5),\n },\n divider: {\n alignSelf: 'center',\n borderColor: commonColors.static.weakOpacityInverse,\n height: 6,\n },\n };\n};\n\ninterface NumberPaginationProps {\n currentPage: PaginationProps['page'];\n maxPage: PaginationProps['count'];\n}\n\nexport default function NumberPagination(props: NumberPaginationProps) {\n const {\n currentPage,\n maxPage,\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const typography = typographyOf({\n fontSize: 9.5,\n lineHeight: 11.4,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: -0.19,\n });\n\n const currentFontStyle = createFontStyle(theme, {\n selector: (_) => typography,\n color: commonColors.static.strongInverse,\n });\n\n const countFontStyle = createFontStyle(theme, {\n selector: (_) => typography,\n color: commonColors.static.baseOpacityInverse,\n });\n\n return (\n <Row style={styles.root}>\n <Text style={currentFontStyle}>\n {currentPage + 1}\n </Text>\n\n <Divider\n style={styles.divider}\n vertical={true}\n />\n\n <Text style={countFontStyle}>\n {maxPage}\n </Text>\n </Row>\n );\n}\n"],"mapp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BAAA,CAAaC,MAAb,CAAoBgC;EAFe,CAAvB,CAAvB;EAKA,oBACI,6BAAC,YAAD;IAAK,KAAK,EAAEd,MAAM,CAACrB;EAAnB,gBACI,6BAAC,iBAAD;IAAM,KAAK,EAAE4B;EAAb,GACKT,WAAW,GAAG,CADnB,CADJ,eAKI,6BAAC,gBAAD;IACI,KAAK,EAAEE,MAAM,CAACT,OADlB;IAEI,QAAQ,EAAE;EAFd,EALJ,eAUI,6BAAC,iBAAD;IAAM,KAAK,EAAEsB;EAAb,GACKd,OADL,CAVJ,CADJ;AAgBH"}
@@ -19,6 +19,8 @@ var _IconButton = _interopRequireDefault(require("../IconButton"));
19
19
 
20
20
  var _PaginationItem = _interopRequireDefault(require("../PaginationItem"));
21
21
 
22
+ var _NumberPagination = _interopRequireDefault(require("./NumberPagination"));
23
+
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
24
26
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -82,6 +84,7 @@ function Pagination(props) {
82
84
  }, rest));
83
85
  },
84
86
  style,
87
+ variant = 'dot',
85
88
  ...otherProps
86
89
  } = props;
87
90
  const styles = useStyles();
@@ -107,22 +110,23 @@ function Pagination(props) {
107
110
  };
108
111
 
109
112
  const prevButton = !hidePrevButton ? /*#__PURE__*/_react.default.createElement(_IconButton.default, {
110
- children: /*#__PURE__*/_react.default.createElement(_icons.ChevronLeft, null),
111
113
  color: 'tertiary',
112
114
  disabled: disabled || !infinite && page <= firstPage,
113
115
  onPress: handlePrevPress,
114
116
  size: 'small',
115
117
  style: children ? styles.prevAnchor : styles.prevInline
116
- }) : null;
118
+ }, /*#__PURE__*/_react.default.createElement(_icons.ChevronLeft, null)) : null;
117
119
  const nextButton = !hideNextButton ? /*#__PURE__*/_react.default.createElement(_IconButton.default, {
118
- children: /*#__PURE__*/_react.default.createElement(_icons.ChevronRight, null),
119
120
  color: 'tertiary',
120
121
  disabled: disabled || !infinite && page + bundleSize > lastPage,
121
122
  onPress: handleNextPress,
122
123
  size: 'small',
123
124
  style: children ? styles.nextAnchor : styles.nextInline
124
- }) : null;
125
- const items = !hideIndicator ? (0, _utils.times)(i => renderItem({
125
+ }, /*#__PURE__*/_react.default.createElement(_icons.ChevronRight, null)) : null;
126
+ const items = !hideIndicator ? variant === 'number' ? /*#__PURE__*/_react.default.createElement(_NumberPagination.default, {
127
+ currentPage: page,
128
+ maxPage: count
129
+ }) : (0, _utils.times)(i => renderItem({
126
130
  index: i,
127
131
  disabled,
128
132
  selected: i === page
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","root","rootInline","flexDirection","alignItems","rootAnchor","items","justifyContent","marginTop","spacing","arrowContainer","prevInline","marginRight","prevAnchor","position","left","nextInline","marginLeft","nextAnchor","right","Pagination","props","bundleSize","children","count","disabled","hideIndicator","hideNextButton","hidePrevButton","infinite","onChange","page","renderItem","index","rest","style","otherProps","styles","firstPage","lastPage","handleChange","nextPage","handlePrevPress","prevPage","handleNextPress","prevButton","nextButton","times","i","selected","containerProps","css"],"sources":["Pagination.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { times } from '@fountain-ui/utils';\nimport { ChevronLeft, ChevronRight } from '../internal/icons';\nimport { css, useTheme } from '../styles';\nimport IconButton from '../IconButton';\nimport PaginationItem from '../PaginationItem';\nimport type PaginationProps from './PaginationProps';\n\ntype PaginationStyleKeys =\n | 'root'\n | 'rootInline'\n | 'rootAnchor'\n | 'items'\n | 'arrowContainer'\n | 'prevInline'\n | 'prevAnchor'\n | 'nextInline'\n | 'nextAnchor';\n\ntype PaginationStyles = NamedStylesStringUnion<PaginationStyleKeys>;\n\nconst useStyles: UseStyles<PaginationStyles> = function (): PaginationStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rootInline: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n rootAnchor: {\n flexDirection: 'column',\n },\n items: {\n flexDirection: 'row',\n justifyContent: 'center',\n marginTop: theme.spacing(2),\n },\n arrowContainer: {\n flexDirection: 'column',\n justifyContent: 'center',\n },\n prevInline: {\n marginRight: theme.spacing(1),\n },\n prevAnchor: {\n position: 'absolute',\n left: -24,\n },\n nextInline: {\n marginLeft: theme.spacing(1),\n },\n nextAnchor: {\n position: 'absolute',\n right: -24,\n },\n };\n};\n\nexport default function Pagination(props: PaginationProps) {\n const {\n bundleSize = 1,\n children,\n count,\n disabled = false,\n hideIndicator = false,\n hideNextButton = false,\n hidePrevButton = false,\n infinite = false,\n onChange,\n page,\n renderItem = ({ index, ...rest }) => <PaginationItem key={`${index}`} {...rest}/>,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const firstPage = 0;\n const lastPage = count - 1;\n\n const handleChange = (nextPage: number) => {\n if (nextPage >= firstPage && nextPage <= lastPage) {\n if (onChange) {\n onChange(nextPage);\n }\n }\n };\n\n const handlePrevPress = () => {\n const prevPage = page - bundleSize >= firstPage\n ? page - bundleSize\n : (infinite ? count - bundleSize + page : firstPage);\n\n handleChange(prevPage);\n };\n\n const handleNextPress = () => {\n const nextPage = page + bundleSize <= lastPage\n ? page + bundleSize\n : (infinite ? page + bundleSize - count : lastPage);\n\n handleChange(nextPage);\n };\n\n const prevButton = !hidePrevButton ? (\n <IconButton\n children={<ChevronLeft/>}\n color={'tertiary'}\n disabled={disabled || (!infinite && page <= firstPage)}\n onPress={handlePrevPress}\n size={'small'}\n style={children ? styles.prevAnchor : styles.prevInline}\n />\n ) : null;\n\n const nextButton = !hideNextButton ? (\n <IconButton\n children={<ChevronRight/>}\n color={'tertiary'}\n disabled={disabled || (!infinite && page + bundleSize > lastPage)}\n onPress={handleNextPress}\n size={'small'}\n style={children ? styles.nextAnchor : styles.nextInline}\n />\n ) : null;\n\n const items = !hideIndicator ? (\n times(i => renderItem({ index: i, disabled, selected: i === page }), count)\n ) : null;\n\n const containerProps = {\n style: css([\n styles.root,\n children ? styles.rootAnchor : styles.rootInline,\n style,\n ]),\n ...otherProps,\n };\n\n if (children) {\n return (\n <View {...containerProps}>\n <View style={css(styles.arrowContainer)}>\n {children}\n {prevButton}\n {nextButton}\n </View>\n\n <View style={css(styles.items)}>\n {items}\n </View>\n </View>\n );\n }\n\n return (\n <View {...containerProps}>\n {prevButton}\n {items}\n {nextButton}\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;AAgBA,MAAMA,SAAsC,GAAG,YAA8B;EACzE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE,EADH;IAEHC,UAAU,EAAE;MACRC,aAAa,EAAE,KADP;MAERC,UAAU,EAAE;IAFJ,CAFT;IAMHC,UAAU,EAAE;MACRF,aAAa,EAAE;IADP,CANT;IASHG,KAAK,EAAE;MACHH,aAAa,EAAE,KADZ;MAEHI,cAAc,EAAE,QAFb;MAGHC,SAAS,EAAET,KAAK,CAACU,OAAN,CAAc,CAAd;IAHR,CATJ;IAcHC,cAAc,EAAE;MACZP,aAAa,EAAE,QADH;MAEZI,cAAc,EAAE;IAFJ,CAdb;IAkBHI,UAAU,EAAE;MACRC,WAAW,EAAEb,KAAK,CAACU,OAAN,CAAc,CAAd;IADL,CAlBT;IAqBHI,UAAU,EAAE;MACRC,QAAQ,EAAE,UADF;MAERC,IAAI,EAAE,CAAC;IAFC,CArBT;IAyBHC,UAAU,EAAE;MACRC,UAAU,EAAElB,KAAK,CAACU,OAAN,CAAc,CAAd;IADJ,CAzBT;IA4BHS,UAAU,EAAE;MACRJ,QAAQ,EAAE,UADF;MAERK,KAAK,EAAE,CAAC;IAFA;EA5BT,CAAP;AAiCH,CApCD;;AAsCe,SAASC,UAAT,CAA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AK,EAAE,IAAAC,WAAA,EAAId,MAAM,CAAC3B,cAAX;IAAb,GACKa,QADL,EAEKsB,UAFL,EAGKC,UAHL,CADJ,eAOI,6BAAC,iBAAD;MAAM,KAAK,EAAE,IAAAK,WAAA,EAAId,MAAM,CAAC/B,KAAX;IAAb,GACKA,KADL,CAPJ,CADJ;EAaH;;EAED,oBACI,6BAAC,iBAAD,EAAU4C,cAAV,EACKL,UADL,EAEKvC,KAFL,EAGKwC,UAHL,CADJ;AAOH;;AAAA"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","root","rootInline","flexDirection","alignItems","rootAnchor","items","justifyContent","marginTop","spacing","arrowContainer","prevInline","marginRight","prevAnchor","position","left","nextInline","marginLeft","nextAnchor","right","Pagination","props","bundleSize","children","count","disabled","hideIndicator","hideNextButton","hidePrevButton","infinite","onChange","page","renderItem","index","rest","style","variant","otherProps","styles","firstPage","lastPage","handleChange","nextPage","handlePrevPress","prevPage","handleNextPress","prevButton","nextButton","times","i","selected","containerProps","css"],"sources":["Pagination.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { times } from '@fountain-ui/utils';\nimport { ChevronLeft, ChevronRight } from '../internal/icons';\nimport { css, useTheme } from '../styles';\nimport IconButton from '../IconButton';\nimport PaginationItem from '../PaginationItem';\nimport NumberPagination from './NumberPagination';\nimport type PaginationProps from './PaginationProps';\nimport type { PaginationVariant } from './PaginationProps';\n\ntype PaginationStyleKeys =\n | 'root'\n | 'rootInline'\n | 'rootAnchor'\n | 'items'\n | 'arrowContainer'\n | 'prevInline'\n | 'prevAnchor'\n | 'nextInline'\n | 'nextAnchor';\n\ntype PaginationStyles = NamedStylesStringUnion<PaginationStyleKeys>;\n\nconst useStyles: UseStyles<PaginationStyles> = function (): PaginationStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rootInline: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n rootAnchor: {\n flexDirection: 'column',\n },\n items: {\n flexDirection: 'row',\n justifyContent: 'center',\n marginTop: theme.spacing(2),\n },\n arrowContainer: {\n flexDirection: 'column',\n justifyContent: 'center',\n },\n prevInline: {\n marginRight: theme.spacing(1),\n },\n prevAnchor: {\n position: 'absolute',\n left: -24,\n },\n nextInline: {\n marginLeft: theme.spacing(1),\n },\n nextAnchor: {\n position: 'absolute',\n right: -24,\n },\n };\n};\n\nexport default function Pagination(props: PaginationProps) {\n const {\n bundleSize = 1,\n children,\n count,\n disabled = false,\n hideIndicator = false,\n hideNextButton = false,\n hidePrevButton = false,\n infinite = false,\n onChange,\n page,\n renderItem = ({ index, ...rest }) => <PaginationItem key={`${index}`} {...rest}/>,\n style,\n variant = 'dot' as PaginationVariant,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const firstPage = 0;\n const lastPage = count - 1;\n\n const handleChange = (nextPage: number) => {\n if (nextPage >= firstPage && nextPage <= lastPage) {\n if (onChange) {\n onChange(nextPage);\n }\n }\n };\n\n const handlePrevPress = () => {\n const prevPage = page - bundleSize >= firstPage\n ? page - bundleSize\n : (infinite ? count - bundleSize + page : firstPage);\n\n handleChange(prevPage);\n };\n\n const handleNextPress = () => {\n const nextPage = page + bundleSize <= lastPage\n ? page + bundleSize\n : (infinite ? page + bundleSize - count : lastPage);\n\n handleChange(nextPage);\n };\n\n const prevButton = !hidePrevButton ? (\n <IconButton\n color={'tertiary'}\n disabled={disabled || (!infinite && page <= firstPage)}\n onPress={handlePrevPress}\n size={'small'}\n style={children ? styles.prevAnchor : styles.prevInline}\n >\n <ChevronLeft/>\n </IconButton>\n ) : null;\n\n const nextButton = !hideNextButton ? (\n <IconButton\n color={'tertiary'}\n disabled={disabled || (!infinite && page + bundleSize > lastPage)}\n onPress={handleNextPress}\n size={'small'}\n style={children ? styles.nextAnchor : styles.nextInline}\n >\n <ChevronRight/>\n </IconButton>\n ) : null;\n\n const items = !hideIndicator ? (\n variant === 'number' ? (\n <NumberPagination\n currentPage={page}\n maxPage={count}\n />\n ) : times(i => renderItem({ index: i, disabled, selected: i === page }), count)\n ) : null;\n\n const containerProps = {\n style: css([\n styles.root,\n children ? styles.rootAnchor : styles.rootInline,\n style,\n ]),\n ...otherProps,\n };\n\n if (children) {\n return (\n <View {...containerProps}>\n <View style={css(styles.arrowContainer)}>\n {children}\n {prevButton}\n {nextButton}\n </View>\n\n <View style={css(styles.items)}>\n {items}\n </View>\n </View>\n );\n }\n\n return (\n <View {...containerProps}>\n {prevButton}\n {items}\n {nextButton}\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAiBA,MAAMA,SAAsC,GAAG,YAA8B;EACzE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE,EADH;IAEHC,UAAU,EAAE;MACRC,aAAa,EAAE,KADP;MAERC,UAAU,EAAE;IAFJ,CAFT;IAMHC,UAAU,EAAE;MACRF,aAAa,EAAE;IADP,CANT;IASHG,KAAK,EAAE;MACHH,aAAa,EAAE,KADZ;MAEHI,cAAc,EAAE,QAFb;MAGHC,SAAS,EAAET,KAAK,CAACU,OAAN,CAAc,CAAd;IAHR,CATJ;IAcHC,cAAc,EAAE;MACZP,aAAa,EAAE,QADH;MAEZI,cAAc,EAAE;IAFJ,CAdb;IAkBHI,UAAU,EAAE;MACRC,WAAW,EAAEb,KAAK,CAACU,OAAN,CAAc,CAAd;IADL,CAlBT;IAqBHI,UAAU,EAAE;MACRC,QAAQ,EAAE,UADF;MAERC,IAAI,EAAE,CAAC;IAFC,CArBT;IAyBHC,UAAU,EAAE;MACRC,UAAU,EAAElB,KAAK,CAACU,OAAN,CAAc,CAAd;IADJ,CAzBT;IA4BHS,UAAU,EAAE;MACRJ,QAAQ,EAAE,UADF;MAERK,KAAK,EAAE,CAAC;IAFA;EA5BT,CAAP;AAiCH,CApCD;;AAsCe,SAASC,UAAT,CAAoBC,KAApB,E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ANgB,CAAvB;;EASA,IAAId,QAAJ,EAAc;IACV,oBACI,6BAAC,iBAAD,EAAU4B,cAAV,eACI,6BAAC,iBAAD;MAAM,KAAK,EAAE,IAAAC,WAAA,EAAId,MAAM,CAAC5B,cAAX;IAAb,GACKa,QADL,EAEKuB,UAFL,EAGKC,UAHL,CADJ,eAOI,6BAAC,iBAAD;MAAM,KAAK,EAAE,IAAAK,WAAA,EAAId,MAAM,CAAChC,KAAX;IAAb,GACKA,KADL,CAPJ,CADJ;EAaH;;EAED,oBACI,6BAAC,iBAAD,EAAU6C,cAAV,EACKL,UADL,EAEKxC,KAFL,EAGKyC,UAHL,CADJ;AAOH;;AAAA"}
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.paginationVariants = void 0;
7
+ const paginationVariants = ['dot', 'number'];
8
+ exports.paginationVariants = paginationVariants;
2
9
  //# sourceMappingURL=PaginationProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["PaginationProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport interface PaginationRenderItemParams {\n /**\n * Index of the pagination item.\n */\n index: number;\n\n /**\n * If `true`, the pagination item is disabled.\n */\n disabled: boolean;\n\n /**\n * If `true` the pagination item is selected.\n */\n selected: boolean;\n}\n\nexport default interface PaginationProps extends OverridableComponentProps<ViewProps, {\n /**\n * The Number of pages that change when the button is pressed\n * @default 1\n */\n bundleSize?: number,\n\n /**\n * The pagination will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n * The total number of pages.\n */\n count: number,\n\n /**\n * If `true`, the pagination is disabled.\n * @default false\n */\n disabled?: boolean;\n\n\n /**\n * If `true`, hide the page indicator.\n * @default false\n */\n hideIndicator?: boolean,\n\n /**\n * If `true`, hide the next-page button.\n * @default false\n */\n hideNextButton?: boolean,\n\n /**\n * If `true`, hide the previous-page button.\n * @default false\n */\n hidePrevButton?: boolean,\n\n /**\n * If `true`, pagination is infinite.\n * @default false\n */\n infinite?: boolean,\n\n /**\n * Callback fired when the page is changed.\n */\n onChange?: (page: number) => void,\n\n /**\n * The current page number.\n */\n page: number;\n\n /**\n * Render the item.\n * @default (item) => <PaginationItem {...item} />\n */\n renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":["paginationVariants"],"sources":["PaginationProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const paginationVariants = ['dot', 'number'] as const;\nexport type PaginationVariant = typeof paginationVariants[number];\n\nexport interface PaginationRenderItemParams {\n /**\n * Index of the pagination item.\n */\n index: number;\n\n /**\n * If `true`, the pagination item is disabled.\n */\n disabled: boolean;\n\n /**\n * If `true` the pagination item is selected.\n */\n selected: boolean;\n}\n\nexport default interface PaginationProps extends OverridableComponentProps<ViewProps, {\n /**\n * The Number of pages that change when the button is pressed\n * @default 1\n */\n bundleSize?: number,\n\n /**\n * The pagination will be added relative to this node.\n */\n children?: React.ReactNode;\n\n /**\n * The total number of pages.\n */\n count: number,\n\n /**\n * If `true`, the pagination is disabled.\n * @default false\n */\n disabled?: boolean;\n\n\n /**\n * If `true`, hide the page indicator.\n * @default false\n */\n hideIndicator?: boolean,\n\n /**\n * If `true`, hide the next-page button.\n * @default false\n */\n hideNextButton?: boolean,\n\n /**\n * If `true`, hide the previous-page button.\n * @default false\n */\n hidePrevButton?: boolean,\n\n /**\n * If `true`, pagination is infinite.\n * @default false\n */\n infinite?: boolean,\n\n /**\n * Callback fired when the page is changed.\n */\n onChange?: (page: number) => void,\n\n /**\n * The current page number.\n */\n page: number;\n\n /**\n * Render the item.\n * @default (item) => <PaginationItem {...item} />\n */\n renderItem?: (params: PaginationRenderItemParams) => React.ReactNode;\n\n /**\n * Determines design variations of the component.\n * @default 'dot'\n */\n variant?: PaginationVariant;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,kBAAkB,GAAG,CAAC,KAAD,EAAQ,QAAR,CAA3B"}
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _Pagination.default;
9
+ return _LegacyPagination.default;
10
10
  }
11
11
  });
12
12
 
13
- var _Pagination = _interopRequireDefault(require("./Pagination"));
13
+ var _LegacyPagination = _interopRequireDefault(require("./LegacyPagination"));
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 './Pagination';\nexport type { default as PaginationProps } from './PaginationProps';"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyPagination';\nexport type { default as PaginationProps } from './LegacyPaginationProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _reactNative = require("react-native");
11
+
12
+ var _styles = require("../styles");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
+
18
+ const useStyles = function () {
19
+ const theme = (0, _styles.useTheme)();
20
+ const size = 6;
21
+ return {
22
+ root: {
23
+ width: size,
24
+ height: size,
25
+ borderRadius: size * 0.5,
26
+ marginHorizontal: theme.spacing(1)
27
+ },
28
+ selected: {
29
+ backgroundColor: theme.palette.secondary.main
30
+ },
31
+ unselected: {
32
+ backgroundColor: '#D1D1D1'
33
+ }
34
+ };
35
+ };
36
+
37
+ function PaginationItem(props) {
38
+ const {
39
+ disabled,
40
+ selected,
41
+ style,
42
+ ...otherProps
43
+ } = props;
44
+ const styles = useStyles();
45
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
46
+ style: (0, _styles.css)([styles.root, selected ? styles.selected : styles.unselected, style])
47
+ }, otherProps));
48
+ }
49
+
50
+ var _default = /*#__PURE__*/_react.default.memo(PaginationItem);
51
+
52
+ exports.default = _default;
53
+ //# sourceMappingURL=LegacyPaginationItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useStyles","theme","useTheme","size","root","width","height","borderRadius","marginHorizontal","spacing","selected","backgroundColor","palette","secondary","main","unselected","PaginationItem","props","disabled","style","otherProps","styles","css","React","memo"],"sources":["LegacyPaginationItem.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type PaginationItemProps from './PaginationItemProps';\n\ntype PaginationItemStyles = NamedStylesStringUnion<'root' | 'selected' | 'unselected'>;\n\nconst useStyles: UseStyles<PaginationItemStyles> = function (): PaginationItemStyles {\n const theme = useTheme();\n\n const size = 6;\n\n return {\n root: {\n width: size,\n height: size,\n borderRadius: size * 0.5,\n marginHorizontal: theme.spacing(1),\n },\n selected: {\n backgroundColor: theme.palette.secondary.main,\n },\n unselected: {\n backgroundColor: '#D1D1D1',\n },\n };\n};\n\nfunction PaginationItem(props: PaginationItemProps) {\n const {\n disabled,\n selected,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <View\n style={css([\n styles.root,\n selected ? styles.selected : styles.unselected,\n style,\n ])}\n {...otherProps}\n />\n );\n}\n\nexport default React.memo(PaginationItem);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAKA,MAAMA,SAA0C,GAAG,YAAkC;EACjF,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,IAAI,GAAG,CAAb;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,KAAK,EAAEF,IADL;MAEFG,MAAM,EAAEH,IAFN;MAGFI,YAAY,EAAEJ,IAAI,GAAG,GAHnB;MAIFK,gBAAgB,EAAEP,KAAK,CAACQ,OAAN,CAAc,CAAd;IAJhB,CADH;IAOHC,QAAQ,EAAE;MACNC,eAAe,EAAEV,KAAK,CAACW,OAAN,CAAcC,SAAd,CAAwBC;IADnC,CAPP;IAUHC,UAAU,EAAE;MACRJ,eAAe,EAAE;IADT;EAVT,CAAP;AAcH,CAnBD;;AAqBA,SAASK,cAAT,CAAwBC,KAAxB,EAAoD;EAChD,MAAM;IACFC,QADE;IAEFR,QAFE;IAGFS,KAHE;IAIF,GAAGC;EAJD,IAKFH,KALJ;EAOA,MAAMI,MAAM,GAAGrB,SAAS,EAAxB;EAEA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAE,IAAAsB,WAAA,EAAI,CACPD,MAAM,CAACjB,IADA,EAEPM,QAAQ,GAAGW,MAAM,CAACX,QAAV,GAAqBW,MAAM,CAACN,UAF7B,EAGPI,KAHO,CAAJ;EADX,GAMQC,UANR,EADJ;AAUH;;4BAEcG,cAAA,CAAMC,IAAN,CAAWR,cAAX,C"}
@@ -26,10 +26,10 @@ const useStyles = function () {
26
26
  marginHorizontal: theme.spacing(1)
27
27
  },
28
28
  selected: {
29
- backgroundColor: theme.palette.secondary.main
29
+ backgroundColor: theme.palette.fill.base
30
30
  },
31
31
  unselected: {
32
- backgroundColor: '#D1D1D1'
32
+ backgroundColor: theme.palette.status.disabled
33
33
  }
34
34
  };
35
35
  };
@@ -1 +1 @@
1
- {"version":3,"names":["useStyles","theme","useTheme","size","root","width","height","borderRadius","marginHorizontal","spacing","selected","backgroundColor","palette","secondary","main","unselected","PaginationItem","props","disabled","style","otherProps","styles","css","React","memo"],"sources":["PaginationItem.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type PaginationItemProps from './PaginationItemProps';\n\ntype PaginationItemStyles = NamedStylesStringUnion<'root' | 'selected' | 'unselected'>;\n\nconst useStyles: UseStyles<PaginationItemStyles> = function (): PaginationItemStyles {\n const theme = useTheme();\n\n const size = 6;\n\n return {\n root: {\n width: size,\n height: size,\n borderRadius: size * 0.5,\n marginHorizontal: theme.spacing(1),\n },\n selected: {\n backgroundColor: theme.palette.secondary.main,\n },\n unselected: {\n backgroundColor: '#D1D1D1',\n },\n };\n};\n\nfunction PaginationItem(props: PaginationItemProps) {\n const {\n disabled,\n selected,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <View\n style={css([\n styles.root,\n selected ? styles.selected : styles.unselected,\n style,\n ])}\n {...otherProps}\n />\n );\n}\n\nexport default React.memo(PaginationItem);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAKA,MAAMA,SAA0C,GAAG,YAAkC;EACjF,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,IAAI,GAAG,CAAb;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,KAAK,EAAEF,IADL;MAEFG,MAAM,EAAEH,IAFN;MAGFI,YAAY,EAAEJ,IAAI,GAAG,GAHnB;MAIFK,gBAAgB,EAAEP,KAAK,CAACQ,OAAN,CAAc,CAAd;IAJhB,CADH;IAOHC,QAAQ,EAAE;MACNC,eAAe,EAAEV,KAAK,CAACW,OAAN,CAAcC,SAAd,CAAwBC;IADnC,CAPP;IAUHC,UAAU,EAAE;MACRJ,eAAe,EAAE;IADT;EAVT,CAAP;AAcH,CAnBD;;AAqBA,SAASK,cAAT,CAAwBC,KAAxB,EAAoD;EAChD,MAAM;IACFC,QADE;IAEFR,QAFE;IAGFS,KAHE;IAIF,GAAGC;EAJD,IAKFH,KALJ;EAOA,MAAMI,MAAM,GAAGrB,SAAS,EAAxB;EAEA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAE,IAAAsB,WAAA,EAAI,CACPD,MAAM,CAACjB,IADA,EAEPM,QAAQ,GAAGW,MAAM,CAACX,QAAV,GAAqBW,MAAM,CAACN,UAF7B,EAGPI,KAHO,CAAJ;EADX,GAMQC,UANR,EADJ;AAUH;;4BAEcG,cAAA,CAAMC,IAAN,CAAWR,cAAX,C"}
1
+ {"version":3,"names":["useStyles","theme","useTheme","size","root","width","height","borderRadius","marginHorizontal","spacing","selected","backgroundColor","palette","fill","base","unselected","status","disabled","PaginationItem","props","style","otherProps","styles","css","React","memo"],"sources":["PaginationItem.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type PaginationItemProps from './PaginationItemProps';\n\ntype PaginationItemStyles = NamedStylesStringUnion<'root' | 'selected' | 'unselected'>;\n\nconst useStyles: UseStyles<PaginationItemStyles> = function (): PaginationItemStyles {\n const theme = useTheme();\n\n const size = 6;\n\n return {\n root: {\n width: size,\n height: size,\n borderRadius: size * 0.5,\n marginHorizontal: theme.spacing(1),\n },\n selected: {\n backgroundColor: theme.palette.fill.base,\n },\n unselected: {\n backgroundColor: theme.palette.status.disabled,\n },\n };\n};\n\nfunction PaginationItem(props: PaginationItemProps) {\n const {\n disabled,\n selected,\n style,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n return (\n <View\n style={css([\n styles.root,\n selected ? styles.selected : styles.unselected,\n style,\n ])}\n {...otherProps}\n />\n );\n}\n\nexport default React.memo(PaginationItem);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAKA,MAAMA,SAA0C,GAAG,YAAkC;EACjF,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,IAAI,GAAG,CAAb;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,KAAK,EAAEF,IADL;MAEFG,MAAM,EAAEH,IAFN;MAGFI,YAAY,EAAEJ,IAAI,GAAG,GAHnB;MAIFK,gBAAgB,EAAEP,KAAK,CAACQ,OAAN,CAAc,CAAd;IAJhB,CADH;IAOHC,QAAQ,EAAE;MACNC,eAAe,EAAEV,KAAK,CAACW,OAAN,CAAcC,IAAd,CAAmBC;IAD9B,CAPP;IAUHC,UAAU,EAAE;MACRJ,eAAe,EAAEV,KAAK,CAACW,OAAN,CAAcI,MAAd,CAAqBC;IAD9B;EAVT,CAAP;AAcH,CAnBD;;AAqBA,SAASC,cAAT,CAAwBC,KAAxB,EAAoD;EAChD,MAAM;IACFF,QADE;IAEFP,QAFE;IAGFU,KAHE;IAIF,GAAGC;EAJD,IAKFF,KALJ;EAOA,MAAMG,MAAM,GAAGtB,SAAS,EAAxB;EAEA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAE,IAAAuB,WAAA,EAAI,CACPD,MAAM,CAAClB,IADA,EAEPM,QAAQ,GAAGY,MAAM,CAACZ,QAAV,GAAqBY,MAAM,CAACP,UAF7B,EAGPK,KAHO,CAAJ;EADX,GAMQC,UANR,EADJ;AAUH;;4BAEcG,cAAA,CAAMC,IAAN,CAAWP,cAAX,C"}
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = Snackbar;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _reactNative = require("react-native");
11
+
12
+ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
13
+
14
+ var _Slide = _interopRequireDefault(require("../Slide"));
15
+
16
+ var _SnackbarContent = _interopRequireDefault(require("../SnackbarContent"));
17
+
18
+ var _hooks = require("../hooks");
19
+
20
+ var _styles = require("../styles");
21
+
22
+ var _utils = require("../utils");
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
+
28
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
+
30
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
31
+
32
+ const fadeDuration = 300;
33
+ const fadeAnimationDelay = 100;
34
+
35
+ const useStyles = function () {
36
+ const theme = (0, _styles.useTheme)();
37
+ const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
38
+ return {
39
+ root: {
40
+ alignSelf: 'center',
41
+ bottom: theme.spacing(2),
42
+ maxWidth: 480,
43
+ paddingBottom: insets.bottom,
44
+ paddingHorizontal: theme.spacing(2),
45
+ position: 'absolute',
46
+ width: '100%',
47
+ // TODO: Need to remove zIndex.
48
+ zIndex: 32
49
+ }
50
+ };
51
+ };
52
+
53
+ function Snackbar(props) {
54
+ const {
55
+ actionLabel,
56
+ animatedY,
57
+ autoHideDuration = null,
58
+ children,
59
+ message,
60
+ title,
61
+ startIcon,
62
+ onActionPress,
63
+ onClose,
64
+ style,
65
+ visible = false,
66
+ ...otherProps
67
+ } = props;
68
+
69
+ const autoHideTimer = _react.default.useRef(null);
70
+
71
+ const clearAutoHideTimeout = () => {
72
+ if (autoHideTimer.current !== null) {
73
+ clearTimeout(autoHideTimer.current);
74
+ }
75
+ };
76
+
77
+ _react.default.useEffect(() => {
78
+ return () => {
79
+ clearAutoHideTimeout();
80
+ };
81
+ }, []);
82
+
83
+ _react.default.useEffect(() => {
84
+ if (visible && autoHideDuration !== null) {
85
+ clearAutoHideTimeout(); // @ts-ignore
86
+
87
+ autoHideTimer.current = setTimeout(() => {
88
+ if (onClose) {
89
+ onClose();
90
+ }
91
+ }, autoHideDuration);
92
+ }
93
+ }, [visible, autoHideDuration, onClose]);
94
+
95
+ const styles = useStyles();
96
+
97
+ const [exited, setExited] = _react.default.useState(true);
98
+
99
+ const animatedOpacity = (0, _hooks.useAnimatedValue)(0);
100
+ const animatedStyle = {
101
+ opacity: animatedOpacity
102
+ };
103
+ (0, _react.useEffect)(() => {
104
+ _reactNative.Animated.timing(animatedOpacity, {
105
+ toValue: visible ? 1 : 0,
106
+ duration: fadeDuration,
107
+ delay: visible ? fadeAnimationDelay : 0,
108
+ easing: _reactNative.Easing.out(_reactNative.Easing.exp),
109
+ useNativeDriver: _utils.isNotAndroid12
110
+ }).start();
111
+ }, [visible]);
112
+
113
+ if (!visible && exited) {
114
+ return null;
115
+ }
116
+
117
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, _extends({
118
+ style: [animatedStyle, styles.root, style]
119
+ }, otherProps), /*#__PURE__*/_react.default.createElement(_Slide.default, {
120
+ animatedY: animatedY,
121
+ appear: visible,
122
+ onEnter: () => setExited(false),
123
+ onExited: () => setExited(true)
124
+ }, children ? children : /*#__PURE__*/_react.default.createElement(_SnackbarContent.default, {
125
+ title: title,
126
+ startIcon: startIcon,
127
+ actionLabel: actionLabel,
128
+ message: message,
129
+ onActionPress: onActionPress
130
+ })));
131
+ }
132
+
133
+ ;
134
+ //# sourceMappingURL=LegacySnackbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["fadeDuration","fadeAnimationDelay","useStyles","theme","useTheme","insets","useSafeAreaInsets","root","alignSelf","bottom","spacing","maxWidth","paddingBottom","paddingHorizontal","position","width","zIndex","Snackbar","props","actionLabel","animatedY","autoHideDuration","children","message","title","startIcon","onActionPress","onClose","style","visible","otherProps","autoHideTimer","React","useRef","clearAutoHideTimeout","current","clearTimeout","useEffect","setTimeout","styles","exited","setExited","useState","animatedOpacity","useAnimatedValue","animatedStyle","opacity","Animated","timing","toValue","duration","delay","easing","Easing","out","exp","useNativeDriver","isNotAndroid12","start"],"sources":["LegacySnackbar.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Animated, Easing } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Slide from '../Slide';\nimport SnackbarContent from '../SnackbarContent';\nimport { useAnimatedValue } from '../hooks';\nimport { useTheme } from '../styles';\nimport { isNotAndroid12 } from '../utils';\nimport type SnackbarProps from './LegacySnackbarProps';\n\ntype SnackBarStyles = NamedStylesStringUnion<'root'>;\n\nconst fadeDuration = 300;\nconst fadeAnimationDelay = 100;\n\nconst useStyles: UseStyles<SnackBarStyles> = function (): SnackBarStyles {\n const theme = useTheme();\n const insets = useSafeAreaInsets();\n\n return {\n root: {\n alignSelf: 'center',\n bottom: theme.spacing(2),\n maxWidth: 480,\n paddingBottom: insets.bottom,\n paddingHorizontal: theme.spacing(2),\n position: 'absolute',\n width: '100%',\n // TODO: Need to remove zIndex.\n zIndex: 32,\n },\n };\n};\n\nexport default function Snackbar(props: SnackbarProps) {\n const {\n actionLabel,\n animatedY,\n autoHideDuration = null,\n children,\n message,\n title,\n startIcon,\n onActionPress,\n onClose,\n style,\n visible = false,\n ...otherProps\n } = props;\n\n const autoHideTimer = React.useRef<number | null>(null);\n\n const clearAutoHideTimeout = () => {\n if (autoHideTimer.current !== null) {\n clearTimeout(autoHideTimer.current);\n }\n };\n\n React.useEffect(() => {\n return () => {\n clearAutoHideTimeout();\n };\n }, []);\n\n React.useEffect(() => {\n if (visible && autoHideDuration !== null) {\n clearAutoHideTimeout();\n\n // @ts-ignore\n autoHideTimer.current = setTimeout(() => {\n if (onClose) {\n onClose();\n }\n }, autoHideDuration);\n }\n }, [visible, autoHideDuration, onClose]);\n\n const styles = useStyles();\n\n const [exited, setExited] = React.useState(true);\n\n const animatedOpacity = useAnimatedValue(0);\n\n const animatedStyle = {\n opacity: animatedOpacity,\n };\n\n useEffect(() => {\n Animated.timing(animatedOpacity, {\n toValue: visible ? 1 : 0,\n duration: fadeDuration,\n delay: visible ? fadeAnimationDelay : 0,\n easing: Easing.out(Easing.exp),\n useNativeDriver: isNotAndroid12,\n }).start();\n }, [visible]);\n\n if (!visible && exited) {\n return null;\n }\n\n return (\n <Animated.View\n style={[\n animatedStyle,\n styles.root,\n style,\n ]}\n {...otherProps}\n >\n <Slide\n animatedY={animatedY}\n appear={visible}\n onEnter={() => setExited(false)}\n onExited={() => setExited(true)}\n >\n {children ? children : (\n <SnackbarContent\n title={title}\n startIcon={startIcon}\n actionLabel={actionLabel}\n message={message}\n onActionPress={onActionPress}\n />\n )}\n </Slide>\n </Animated.View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAKA,MAAMA,YAAY,GAAG,GAArB;AACA,MAAMC,kBAAkB,GAAG,GAA3B;;AAEA,MAAMC,SAAoC,GAAG,YAA4B;EACrE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EACA,MAAMC,MAAM,GAAG,IAAAC,6CAAA,GAAf;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,SAAS,EAAE,QADT;MAEFC,MAAM,EAAEN,KAAK,CAAC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{"version":3,"names":[],"sources":["LegacySnackbarProps.ts"],"sourcesContent":["import React from 'react';\n\nimport type { Animated, ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SnackbarProps extends OverridableComponentProps<ViewProps, {\n /**\n * The text to use for the action component.\n */\n actionLabel?: string;\n\n /**\n * y value for animating.\n */\n animatedY?: Animated.Value;\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onDismiss` function. `onDismiss` should then set the state of the `visible`\n * prop to hide the `Snackbar`. This behavior is disabled by default with\n * the `null` value.\n * @default null\n */\n autoHideDuration?: number | null;\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children?: React.ReactNode;\n\n /**\n * The message to display.\n */\n message?: string;\n\n /**\n * Callback fired when the action component pressed.\n */\n onActionPress?: () => void;\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose?: () => void;\n\n /**\n * Element placed before the title and message.\n */\n startIcon?: React.ReactElement;\n\n /**\n * The title to display.\n */\n title?: string;\n\n /**\n * If `true`, `Snackbar` is shown.\n * @default false\n */\n visible?: boolean;\n}> {}\n"],"mappings":""}
@@ -13,7 +13,7 @@ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
13
13
 
14
14
  var _Slide = _interopRequireDefault(require("../Slide"));
15
15
 
16
- var _SnackbarContent = _interopRequireDefault(require("../SnackbarContent"));
16
+ var _SnackbarContent = _interopRequireDefault(require("../SnackbarContent/SnackbarContent"));
17
17
 
18
18
  var _hooks = require("../hooks");
19
19
 
@@ -52,14 +52,15 @@ const useStyles = function () {
52
52
 
53
53
  function Snackbar(props) {
54
54
  const {
55
- actionLabel,
55
+ actionContent,
56
56
  animatedY,
57
57
  autoHideDuration = null,
58
58
  children,
59
59
  message,
60
60
  title,
61
61
  startIcon,
62
- onActionPress,
62
+ status = 'info',
63
+ onPress,
63
64
  onClose,
64
65
  style,
65
66
  visible = false,
@@ -124,9 +125,10 @@ function Snackbar(props) {
124
125
  }, children ? children : /*#__PURE__*/_react.default.createElement(_SnackbarContent.default, {
125
126
  title: title,
126
127
  startIcon: startIcon,
127
- actionLabel: actionLabel,
128
+ status: status,
129
+ actionContent: actionContent,
128
130
  message: message,
129
- onActionPress: onActionPress
131
+ onPress: onPress
130
132
  })));
131
133
  }
132
134
 
@@ -1 +1 @@
1
- {"version":3,"names":["fadeDuration","fadeAnimationDelay","useStyles","theme","useTheme","insets","useSafeAreaInsets","root","alignSelf","bottom","spacing","maxWidth","paddingBottom","paddingHorizontal","position","width","zIndex","Snackbar","props","actionLabel","animatedY","autoHideDuration","children","message","title","startIcon","onActionPress","onClose","style","visible","otherProps","autoHideTimer","React","useRef","clearAutoHideTimeout","current","clearTimeout","useEffect","setTimeout","styles","exited","setExited","useState","animatedOpacity","useAnimatedValue","animatedStyle","opacity","Animated","timing","toValue","duration","delay","easing","Easing","out","exp","useNativeDriver","isNotAndroid12","start"],"sources":["Snackbar.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Animated, Easing } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Slide from '../Slide';\nimport SnackbarContent from '../SnackbarContent';\nimport { useAnimatedValue } from '../hooks';\nimport { useTheme } from '../styles';\nimport { isNotAndroid12 } from '../utils';\nimport type SnackbarProps from './SnackbarProps';\n\ntype SnackBarStyles = NamedStylesStringUnion<'root'>;\n\nconst fadeDuration = 300;\nconst fadeAnimationDelay = 100;\n\nconst useStyles: UseStyles<SnackBarStyles> = function (): SnackBarStyles {\n const theme = useTheme();\n const insets = useSafeAreaInsets();\n\n return {\n root: {\n alignSelf: 'center',\n bottom: theme.spacing(2),\n maxWidth: 480,\n paddingBottom: insets.bottom,\n paddingHorizontal: theme.spacing(2),\n position: 'absolute',\n width: '100%',\n // TODO: Need to remove zIndex.\n zIndex: 32,\n },\n };\n};\n\nexport default function Snackbar(props: SnackbarProps) {\n const {\n actionLabel,\n animatedY,\n autoHideDuration = null,\n children,\n message,\n title,\n startIcon,\n onActionPress,\n onClose,\n style,\n visible = false,\n ...otherProps\n } = props;\n\n const autoHideTimer = React.useRef<number | null>(null);\n\n const clearAutoHideTimeout = () => {\n if (autoHideTimer.current !== null) {\n clearTimeout(autoHideTimer.current);\n }\n };\n\n React.useEffect(() => {\n return () => {\n clearAutoHideTimeout();\n };\n }, []);\n\n React.useEffect(() => {\n if (visible && autoHideDuration !== null) {\n clearAutoHideTimeout();\n\n // @ts-ignore\n autoHideTimer.current = setTimeout(() => {\n if (onClose) {\n onClose();\n }\n }, autoHideDuration);\n }\n }, [visible, autoHideDuration, onClose]);\n\n const styles = useStyles();\n\n const [exited, setExited] = React.useState(true);\n\n const animatedOpacity = useAnimatedValue(0);\n\n const animatedStyle = {\n opacity: animatedOpacity,\n };\n\n useEffect(() => {\n Animated.timing(animatedOpacity, {\n toValue: visible ? 1 : 0,\n duration: fadeDuration,\n delay: visible ? fadeAnimationDelay : 0,\n easing: Easing.out(Easing.exp),\n useNativeDriver: isNotAndroid12,\n }).start();\n }, [visible]);\n\n if (!visible && exited) {\n return null;\n }\n\n return (\n <Animated.View\n style={[\n animatedStyle,\n styles.root,\n style,\n ]}\n {...otherProps}\n >\n <Slide\n animatedY={animatedY}\n appear={visible}\n onEnter={() => setExited(false)}\n onExited={() => setExited(true)}\n >\n {children ? children : (\n <SnackbarContent\n title={title}\n startIcon={startIcon}\n actionLabel={actionLabel}\n message={message}\n onActionPress={onActionPress}\n />\n )}\n </Slide>\n </Animated.View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAKA,MAAMA,YAAY,GAAG,GAArB;AACA,MAAMC,kBAAkB,GAAG,GAA3B;;AAEA,MAAMC,SAAoC,GAAG,YAA4B;EACrE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EACA,MAAMC,MAAM,GAAG,IAAAC,6CAAA,GAAf;EAEA,OAAO;IACHC,IAAI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AnimationDelay","useStyles","theme","useTheme","insets","useSafeAreaInsets","root","alignSelf","bottom","spacing","maxWidth","paddingBottom","paddingHorizontal","position","width","zIndex","Snackbar","props","actionContent","animatedY","autoHideDuration","children","message","title","startIcon","status","onPress","onClose","style","visible","otherProps","autoHideTimer","React","useRef","clearAutoHideTimeout","current","clearTimeout","useEffect","setTimeout","styles","exited","setExited","useState","animatedOpacity","useAnimatedValue","animatedStyle","opacity","Animated","timing","toValue","duration","delay","easing","Easing","out","exp","useNativeDriver","isNotAndroid12","start"],"sources":["Snackbar.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Animated, Easing } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport Slide from '../Slide';\nimport SnackbarContent from '../SnackbarContent/SnackbarContent';\nimport { useAnimatedValue } from '../hooks';\nimport { useTheme } from '../styles';\nimport { isNotAndroid12 } from '../utils';\nimport type SnackbarProps from './SnackbarProps';\n\ntype SnackBarStyles = NamedStylesStringUnion<'root'>;\n\nconst fadeDuration = 300;\nconst fadeAnimationDelay = 100;\n\nconst useStyles: UseStyles<SnackBarStyles> = function (): SnackBarStyles {\n const theme = useTheme();\n const insets = useSafeAreaInsets();\n\n return {\n root: {\n alignSelf: 'center',\n bottom: theme.spacing(2),\n maxWidth: 480,\n paddingBottom: insets.bottom,\n paddingHorizontal: theme.spacing(2),\n position: 'absolute',\n width: '100%',\n // TODO: Need to remove zIndex.\n zIndex: 32,\n },\n };\n};\n\nexport default function Snackbar(props: SnackbarProps) {\n const {\n actionContent,\n animatedY,\n autoHideDuration = null,\n children,\n message,\n title,\n startIcon,\n status = 'info',\n onPress,\n onClose,\n style,\n visible = false,\n ...otherProps\n } = props;\n\n const autoHideTimer = React.useRef<number | null>(null);\n\n const clearAutoHideTimeout = () => {\n if (autoHideTimer.current !== null) {\n clearTimeout(autoHideTimer.current);\n }\n };\n\n React.useEffect(() => {\n return () => {\n clearAutoHideTimeout();\n };\n }, []);\n\n React.useEffect(() => {\n if (visible && autoHideDuration !== null) {\n clearAutoHideTimeout();\n\n // @ts-ignore\n autoHideTimer.current = setTimeout(() => {\n if (onClose) {\n onClose();\n }\n }, autoHideDuration);\n }\n }, [visible, autoHideDuration, onClose]);\n\n const styles = useStyles();\n\n const [exited, setExited] = React.useState(true);\n\n const animatedOpacity = useAnimatedValue(0);\n\n const animatedStyle = {\n opacity: animatedOpacity,\n };\n\n useEffect(() => {\n Animated.timing(animatedOpacity, {\n toValue: visible ? 1 : 0,\n duration: fadeDuration,\n delay: visible ? fadeAnimationDelay : 0,\n easing: Easing.out(Easing.exp),\n useNativeDriver: isNotAndroid12,\n }).start();\n }, [visible]);\n\n if (!visible && exited) {\n return null;\n }\n\n return (\n <Animated.View\n style={[\n animatedStyle,\n styles.root,\n style,\n ]}\n {...otherProps}\n >\n <Slide\n animatedY={animatedY}\n appear={visible}\n onEnter={() => setExited(false)}\n onExited={() => setExited(true)}\n >\n {children ? children : (\n <SnackbarContent\n title={title}\n startIcon={startIcon}\n status={status}\n actionContent={actionContent}\n message={message}\n onPress={onPress}\n />\n )}\n </Slide>\n </Animated.View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAKA,MAAMA,YAAY,GAAG,GAArB;AACA,MAAMC,kBAAkB,GAAG,GAA3B;;AAEA,MAAMC,SAAoC,GAAG,YAA4B;EACrE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EACA,MAAMC,MAAM,GAAG,IAAAC,6CAAA,GAAf;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,SAAS,EAAE,QADT;MAEFC,MAAM,EAAEN,KAAK,CAACO,OAAN,CAAc,CAAd,CAFN;MAGFC,QAAQ,EAAE,GAHR;MAIFC,aAAa,EAAEP,MAAM,CAACI,MAJpB;MAKFI,iBAAiB,EAAEV,KAAK,CAACO,OAAN,CAA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CAAjB,CAAxB;EAEA,MAAMC,aAAa,GAAG;IAClBC,OAAO,EAAEH;EADS,CAAtB;EAIA,IAAAN,gBAAA,EAAU,MAAM;IACZU,qBAAA,CAASC,MAAT,CAAgBL,eAAhB,EAAiC;MAC7BM,OAAO,EAAEpB,OAAO,GAAG,CAAH,GAAO,CADM;MAE7BqB,QAAQ,EAAEnD,YAFmB;MAG7BoD,KAAK,EAAEtB,OAAO,GAAG7B,kBAAH,GAAwB,CAHT;MAI7BoD,MAAM,EAAEC,mBAAA,CAAOC,GAAP,CAAWD,mBAAA,CAAOE,GAAlB,CAJqB;MAK7BC,eAAe,EAAEC;IALY,CAAjC,EAMGC,KANH;EAOH,CARD,EAQG,CAAC7B,OAAD,CARH;;EAUA,IAAI,CAACA,OAAD,IAAYW,MAAhB,EAAwB;IACpB,OAAO,IAAP;EACH;;EAED,oBACI,6BAAC,qBAAD,CAAU,IAAV;IACI,KAAK,EAAE,CACHK,aADG,EAEHN,MAAM,CAACjC,IAFJ,EAGHsB,KAHG;EADX,GAMQE,UANR,gBAQI,6BAAC,cAAD;IACI,SAAS,EAAEX,SADf;IAEI,MAAM,EAAEU,OAFZ;IAGI,OAAO,EAAE,MAAMY,SAAS,CAAC,KAAD,CAH5B;IAII,QAAQ,EAAE,MAAMA,SAAS,CAAC,IAAD;EAJ7B,GAMKpB,QAAQ,GAAGA,QAAH,gBACL,6BAAC,wBAAD;IACI,KAAK,EAAEE,KADX;IAEI,SAAS,EAAEC,SAFf;IAGI,MAAM,EAAEC,MAHZ;IAII,aAAa,EAAEP,aAJnB;IAKI,OAAO,EAAEI,OALb;IAMI,OAAO,EAAEI;EANb,EAPR,CARJ,CADJ;AA4BH;;AAAA"}
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.snackbarStatus = void 0;
7
+ const snackbarStatus = ['info', 'success', 'fail'];
8
+ exports.snackbarStatus = snackbarStatus;
2
9
  //# sourceMappingURL=SnackbarProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["SnackbarProps.ts"],"sourcesContent":["import React from 'react';\n\nimport type { Animated, ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SnackbarProps extends OverridableComponentProps<ViewProps, {\n /**\n * The text to use for the action component.\n */\n actionLabel?: string;\n\n /**\n * y value for animating.\n */\n animatedY?: Animated.Value;\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onDismiss` function. `onDismiss` should then set the state of the `visible`\n * prop to hide the `Snackbar`. This behavior is disabled by default with\n * the `null` value.\n * @default null\n */\n autoHideDuration?: number | null;\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children?: React.ReactNode;\n\n /**\n * The message to display.\n */\n message?: string;\n\n /**\n * Callback fired when the action component pressed.\n */\n onActionPress?: () => void;\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose?: () => void;\n\n /**\n * Element placed before the title and message.\n */\n startIcon?: React.ReactElement;\n\n /**\n * The title to display.\n */\n title?: string;\n\n /**\n * If `true`, `Snackbar` is shown.\n * @default false\n */\n visible?: boolean;\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":["snackbarStatus"],"sources":["SnackbarProps.ts"],"sourcesContent":["import React from 'react';\nimport type { Animated, ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport const snackbarStatus = ['info', 'success', 'fail'] as const;\nexport type SnackbarStatus = typeof snackbarStatus[number];\n\nexport default interface SnackbarProps extends OverridableComponentProps<ViewProps, {\n /**\n * The text to use for the action component.\n */\n actionContent?: string | React.ReactNode;\n\n /**\n * y value for animating.\n */\n animatedY?: Animated.Value;\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onDismiss` function. `onDismiss` should then set the state of the `visible`\n * prop to hide the `Snackbar`. This behavior is disabled by default with\n * the `null` value.\n * @default null\n */\n autoHideDuration?: number | null;\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children?: React.ReactNode;\n\n /**\n * The message to display.\n */\n message?: string;\n\n /**\n * Callback fired when the action component pressed.\n */\n onPress?: () => void;\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose?: () => void;\n\n /**\n * Element placed before the title and message.\n */\n startIcon?: React.ReactElement;\n\n /**\n * The status of the snackbar, which determines its visual style and optional icon.\n * @default 'info'\n */\n status?: SnackbarStatus;\n\n /**\n * The title to display.\n */\n title?: string;\n\n /**\n * If `true`, `Snackbar` is shown.\n * @default false\n */\n visible?: boolean;\n}> {}\n"],"mappings":";;;;;;AAIO,MAAMA,cAAc,GAAG,CAAC,MAAD,EAAS,SAAT,EAAoB,MAApB,CAAvB"}
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _Snackbar.default;
9
+ return _LegacySnackbar.default;
10
10
  }
11
11
  });
12
12
 
13
- var _Snackbar = _interopRequireDefault(require("./Snackbar"));
13
+ var _LegacySnackbar = _interopRequireDefault(require("./LegacySnackbar"));
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 './Snackbar';\nexport type { default as SnackbarProps } from './SnackbarProps';"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacySnackbar';\nexport type { default as SnackbarProps } from './LegacySnackbarProps';\n"],"mappings":";;;;;;;;;;;;AAAA"}