@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,94 @@
1
+ import { useMemo } from 'react';
2
+ import { typographyOf } from '@fountain-ui/styles';
3
+ import { createFontStyle, useTheme } from '../styles';
4
+
5
+ function useStatusColor(theme, status) {
6
+ switch (status) {
7
+ default:
8
+ case 'default':
9
+ return {
10
+ borderColor: theme.palette.border.base,
11
+ hintColor: theme.palette.text.weak
12
+ };
13
+
14
+ case 'success':
15
+ return {
16
+ borderColor: theme.palette.status.success,
17
+ hintColor: theme.palette.status.success
18
+ };
19
+
20
+ case 'error':
21
+ return {
22
+ borderColor: theme.palette.status.danger,
23
+ hintColor: theme.palette.status.danger
24
+ };
25
+ }
26
+ }
27
+
28
+ export default function useVariantStyleMap(variant, status, isFocused) {
29
+ const theme = useTheme();
30
+ const {
31
+ borderColor,
32
+ hintColor
33
+ } = useStatusColor(theme, status);
34
+ return useMemo(() => {
35
+ switch (variant) {
36
+ default:
37
+ case 'default':
38
+ return {
39
+ containerStyle: {
40
+ borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,
41
+ borderBottomWidth: 1
42
+ },
43
+ inputStyle: {
44
+ paddingRight: theme.spacing(4),
45
+ paddingVertical: theme.spacing(4),
46
+ ...createFontStyle(theme, {
47
+ selector: _ => typographyOf({
48
+ fontSize: 18,
49
+ lineHeight: 27,
50
+ fontFamily: 'Pretendard-SemiBold',
51
+ letterSpacing: 0
52
+ }),
53
+ color: theme.palette.text.strong
54
+ })
55
+ },
56
+ hintStyle: {
57
+ marginTop: theme.spacing(2),
58
+ ...createFontStyle(theme, {
59
+ // selector: (typography) => typography.caption1['regular']
60
+ color: hintColor
61
+ })
62
+ }
63
+ };
64
+
65
+ case 'search':
66
+ return {
67
+ containerStyle: {
68
+ backgroundColor: theme.palette.surface.supportive,
69
+ borderColor: theme.palette.border.base,
70
+ borderRadius: theme.shape.radius.md,
71
+ borderWidth: 0.5,
72
+ paddingLeft: theme.spacing(3),
73
+ paddingRight: theme.spacing(0.5)
74
+ },
75
+ inputStyle: {
76
+ paddingBottom: theme.spacing(2.5),
77
+ paddingLeft: theme.spacing(2),
78
+ paddingRight: theme.spacing(1),
79
+ paddingTop: theme.spacing(2.25),
80
+ ...createFontStyle(theme, {
81
+ selector: _ => typographyOf({
82
+ fontSize: 16,
83
+ lineHeight: 19.2,
84
+ fontFamily: 'Pretendard-SemiBold',
85
+ letterSpacing: -0.16
86
+ }),
87
+ color: theme.palette.text.strong
88
+ })
89
+ }
90
+ };
91
+ }
92
+ }, [theme, borderColor, hintColor, variant, isFocused]);
93
+ }
94
+ //# sourceMappingURL=useVariantStyleMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMemo","typographyOf","createFontStyle","useTheme","useStatusColor","theme","status","borderColor","palette","border","base","hintColor","text","weak","success","danger","useVariantStyleMap","variant","isFocused","containerStyle","borderBottomColor","strong","borderBottomWidth","inputStyle","paddingRight","spacing","paddingVertical","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","hintStyle","marginTop","backgroundColor","surface","supportive","borderRadius","shape","radius","md","borderWidth","paddingLeft","paddingBottom","paddingTop"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle, Theme } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\n\ninterface VariantStyleMap {\n containerStyle?: FountainUiStyle;\n inputStyle?: FountainUiStyle;\n hintStyle?: FountainUiStyle;\n}\n\nfunction useStatusColor(theme: Theme, status: TextFieldStatus): { borderColor: string; hintColor: string; } {\n switch (status) {\n default:\n case 'default':\n return {\n borderColor: theme.palette.border.base,\n hintColor: theme.palette.text.weak,\n };\n case 'success':\n return {\n borderColor: theme.palette.status.success,\n hintColor: theme.palette.status.success,\n };\n case 'error':\n return {\n borderColor: theme.palette.status.danger,\n hintColor: theme.palette.status.danger,\n };\n }\n}\n\nexport default function useVariantStyleMap(variant: TextFieldVariant, status: TextFieldStatus, isFocused: boolean): VariantStyleMap {\n const theme = useTheme();\n\n const {\n borderColor,\n hintColor,\n } = useStatusColor(theme, status);\n\n return useMemo(() => {\n switch (variant) {\n default:\n case 'default':\n return {\n containerStyle: {\n borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,\n borderBottomWidth: 1,\n },\n inputStyle: {\n paddingRight: theme.spacing(4),\n paddingVertical: theme.spacing(4),\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 18,\n lineHeight: 27,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n },\n hintStyle: {\n marginTop: theme.spacing(2),\n ...createFontStyle(theme, {\n // selector: (typography) => typography.caption1['regular']\n color: hintColor,\n }),\n },\n };\n case 'search':\n return {\n containerStyle: {\n backgroundColor: theme.palette.surface.supportive,\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.md,\n borderWidth: 0.5,\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(0.5),\n },\n inputStyle: {\n paddingBottom: theme.spacing(2.5),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(1),\n paddingTop: theme.spacing(2.25),\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 19.2,\n fontFamily: 'Pretendard-SemiBold',\n letterSpacing: -0.16,\n }),\n color: theme.palette.text.strong,\n }),\n },\n };\n }\n }, [theme, borderColor, hintColor, variant, isFocused]);\n}\n"],"mappings":"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"}
@@ -0,0 +1,56 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import HorizontalLargeBeak from './HorizontalLargeBeak';
5
+ import HorizontalSmallBeak from './HorizontalSmallBeak';
6
+ import VerticalLargeBeak from './VerticalLargeBeak';
7
+ import VerticalSmallBeak from './VerticalSmallBeak';
8
+
9
+ const getBeakComponent = (placement, size) => {
10
+ if (placement === 'top' || placement === 'bottom') {
11
+ if (size === 'small') return {
12
+ Component: HorizontalSmallBeak,
13
+ rotate: placement === 'top' ? '180deg' : '0deg'
14
+ };
15
+ if (size === 'large') return {
16
+ Component: HorizontalLargeBeak,
17
+ rotate: placement === 'top' ? '180deg' : '0deg'
18
+ };
19
+ }
20
+
21
+ if (placement === 'left' || placement === 'right') {
22
+ if (size === 'small') return {
23
+ Component: VerticalSmallBeak,
24
+ rotate: placement === 'left' ? '180deg' : '0deg'
25
+ };
26
+ if (size === 'large') return {
27
+ Component: VerticalLargeBeak,
28
+ rotate: placement === 'left' ? '180deg' : '0deg'
29
+ };
30
+ }
31
+
32
+ return {
33
+ Component: () => null,
34
+ rotate: '0deg'
35
+ };
36
+ };
37
+
38
+ export default function Beak(props) {
39
+ const {
40
+ placement = 'top',
41
+ size = 'small',
42
+ ...otherProps
43
+ } = props;
44
+ const {
45
+ Component,
46
+ rotate
47
+ } = getBeakComponent(placement, size);
48
+ return /*#__PURE__*/React.createElement(Component, _extends({}, otherProps, {
49
+ style: {
50
+ transform: [{
51
+ rotate
52
+ }]
53
+ }
54
+ }));
55
+ }
56
+ //# sourceMappingURL=Beak.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","HorizontalLargeBeak","HorizontalSmallBeak","VerticalLargeBeak","VerticalSmallBeak","getBeakComponent","placement","size","Component","rotate","Beak","props","otherProps","transform"],"sources":["Beak.tsx"],"sourcesContent":["import React from 'react';\nimport type { TooltipPlacement, TooltipSize } from '../TooltipProps';\nimport type BeakProps from './BeakProps';\nimport HorizontalLargeBeak from './HorizontalLargeBeak';\nimport HorizontalSmallBeak from './HorizontalSmallBeak';\nimport VerticalLargeBeak from './VerticalLargeBeak';\nimport VerticalSmallBeak from './VerticalSmallBeak';\n\nconst getBeakComponent = (placement: TooltipPlacement, size: TooltipSize) => {\n if (placement === 'top' || placement === 'bottom') {\n if (size === 'small') return {\n Component: HorizontalSmallBeak,\n rotate: placement === 'top' ? '180deg' : '0deg',\n };\n if (size === 'large') return {\n Component: HorizontalLargeBeak,\n rotate: placement === 'top' ? '180deg' : '0deg',\n };\n }\n\n if (placement === 'left' || placement === 'right') {\n if (size === 'small') return {\n Component: VerticalSmallBeak,\n rotate: placement === 'left' ? '180deg' : '0deg',\n };\n if (size === 'large') return {\n Component: VerticalLargeBeak,\n rotate: placement === 'left' ? '180deg' : '0deg',\n };\n }\n\n return {\n Component: () => null,\n rotate: '0deg',\n };\n};\n\nexport default function Beak(props: BeakProps) {\n const {\n placement = 'top' as TooltipPlacement,\n size = 'small' as TooltipSize,\n ...otherProps\n } = props;\n\n const { Component, rotate } = getBeakComponent(placement, size);\n\n return (\n <Component\n {...otherProps}\n style={{ transform: [{ rotate }] }}\n />\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAGA,OAAOC,mBAAP,MAAgC,uBAAhC;AACA,OAAOC,mBAAP,MAAgC,uBAAhC;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,SAAD,EAA8BC,IAA9B,KAAoD;EACzE,IAAID,SAAS,KAAK,KAAd,IAAuBA,SAAS,KAAK,QAAzC,EAAmD;IAC/C,IAAIC,IAAI,KAAK,OAAb,EAAsB,OAAO;MACzBC,SAAS,EAAEN,mBADc;MAEzBO,MAAM,EAAEH,SAAS,KAAK,KAAd,GAAsB,QAAtB,GAAiC;IAFhB,CAAP;IAItB,IAAIC,IAAI,KAAK,OAAb,EAAsB,OAAO;MACzBC,SAAS,EAAEP,mBADc;MAEzBQ,MAAM,EAAEH,SAAS,KAAK,KAAd,GAAsB,QAAtB,GAAiC;IAFhB,CAAP;EAIzB;;EAED,IAAIA,SAAS,KAAK,MAAd,IAAwBA,SAAS,KAAK,OAA1C,EAAmD;IAC/C,IAAIC,IAAI,KAAK,OAAb,EAAsB,OAAO;MACzBC,SAAS,EAAEJ,iBADc;MAEzBK,MAAM,EAAEH,SAAS,KAAK,MAAd,GAAuB,QAAvB,GAAkC;IAFjB,CAAP;IAItB,IAAIC,IAAI,KAAK,OAAb,EAAsB,OAAO;MACzBC,SAAS,EAAEL,iBADc;MAEzBM,MAAM,EAAEH,SAAS,KAAK,MAAd,GAAuB,QAAvB,GAAkC;IAFjB,CAAP;EAIzB;;EAED,OAAO;IACHE,SAAS,EAAE,MAAM,IADd;IAEHC,MAAM,EAAE;EAFL,CAAP;AAIH,CA3BD;;AA6BA,eAAe,SAASC,IAAT,CAAcC,KAAd,EAAgC;EAC3C,MAAM;IACFL,SAAS,GAAG,KADV;IAEFC,IAAI,GAAG,OAFL;IAGF,GAAGK;EAHD,IAIFD,KAJJ;EAMA,MAAM;IAAEH,SAAF;IAAaC;EAAb,IAAwBJ,gBAAgB,CAACC,SAAD,EAAYC,IAAZ,CAA9C;EAEA,oBACI,oBAAC,SAAD,eACQK,UADR;IAEI,KAAK,EAAE;MAAEC,SAAS,EAAE,CAAC;QAAEJ;MAAF,CAAD;IAAb;EAFX,GADJ;AAMH"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=BeakProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["BeakProps.ts"],"sourcesContent":["import type { SvgProps } from 'react-native-svg';\nimport type TooltipProps from '../TooltipProps';\n\nexport default interface BeakProps extends SvgProps, Pick<TooltipProps, 'placement' | 'size'> {}\n"],"mappings":""}
@@ -0,0 +1,14 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import { Path, Svg } from 'react-native-svg';
5
+ export default function HorizontalLargeBeak(props) {
6
+ return /*#__PURE__*/React.createElement(Svg, _extends({
7
+ height: 5,
8
+ viewBox: '0 0 13 5',
9
+ width: 13
10
+ }, props), /*#__PURE__*/React.createElement(Path, {
11
+ d: "M5.81034 0.656815L1.82931 4.44828C1.45743 4.80245 0.963553 5 0.45 5H12.55C12.0364 5 11.5426 4.80245 11.1707 4.44828L7.18966 0.656815C6.80345 0.288998 6.19655 0.288999 5.81034 0.656815Z"
12
+ }));
13
+ }
14
+ //# sourceMappingURL=HorizontalLargeBeak.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Path","Svg","HorizontalLargeBeak","props"],"sources":["HorizontalLargeBeak.tsx"],"sourcesContent":["import React from 'react';\nimport type { SvgProps } from 'react-native-svg';\nimport { Path, Svg } from 'react-native-svg';\n\nexport default function HorizontalLargeBeak(props: SvgProps) {\n return (\n <Svg\n height={5}\n viewBox={'0 0 13 5'}\n width={13}\n {...props}\n >\n <Path\n d=\"M5.81034 0.656815L1.82931 4.44828C1.45743 4.80245 0.963553 5 0.45 5H12.55C12.0364 5 11.5426 4.80245 11.1707 4.44828L7.18966 0.656815C6.80345 0.288998 6.19655 0.288999 5.81034 0.656815Z\"\n />\n </Svg>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,EAAeC,GAAf,QAA0B,kBAA1B;AAEA,eAAe,SAASC,mBAAT,CAA6BC,KAA7B,EAA8C;EACzD,oBACI,oBAAC,GAAD;IACI,MAAM,EAAE,CADZ;IAEI,OAAO,EAAE,UAFb;IAGI,KAAK,EAAE;EAHX,GAIQA,KAJR,gBAMI,oBAAC,IAAD;IACI,CAAC,EAAC;EADN,EANJ,CADJ;AAYH"}
@@ -0,0 +1,14 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import { Path, Svg } from 'react-native-svg';
5
+ export default function HorizontalSmallBeak(props) {
6
+ return /*#__PURE__*/React.createElement(Svg, _extends({
7
+ height: 4,
8
+ viewBox: '0 0 11 4',
9
+ width: 11
10
+ }, props), /*#__PURE__*/React.createElement(Path, {
11
+ d: "M5.11034 0.656814L2.17931 3.44828C1.80743 3.80245 1.31355 4 0.800001 4H10.8C10.2864 4 9.79257 3.80245 9.42069 3.44828L6.48966 0.656815C6.10345 0.288998 5.49655 0.288998 5.11034 0.656814Z"
12
+ }));
13
+ }
14
+ //# sourceMappingURL=HorizontalSmallBeak.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Path","Svg","HorizontalSmallBeak","props"],"sources":["HorizontalSmallBeak.tsx"],"sourcesContent":["import React from 'react';\nimport type { SvgProps } from 'react-native-svg';\nimport { Path, Svg } from 'react-native-svg';\n\nexport default function HorizontalSmallBeak(props: SvgProps) {\n return (\n <Svg\n height={4}\n viewBox={'0 0 11 4'}\n width={11}\n {...props}\n >\n <Path\n d=\"M5.11034 0.656814L2.17931 3.44828C1.80743 3.80245 1.31355 4 0.800001 4H10.8C10.2864 4 9.79257 3.80245 9.42069 3.44828L6.48966 0.656815C6.10345 0.288998 5.49655 0.288998 5.11034 0.656814Z\"\n />\n </Svg>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,EAAeC,GAAf,QAA0B,kBAA1B;AAEA,eAAe,SAASC,mBAAT,CAA6BC,KAA7B,EAA8C;EACzD,oBACI,oBAAC,GAAD;IACI,MAAM,EAAE,CADZ;IAEI,OAAO,EAAE,UAFb;IAGI,KAAK,EAAE;EAHX,GAIQA,KAJR,gBAMI,oBAAC,IAAD;IACI,CAAC,EAAC;EADN,EANJ,CADJ;AAYH"}
@@ -0,0 +1,14 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import { Path, Svg } from 'react-native-svg';
5
+ export default function VerticalLargeBeak(props) {
6
+ return /*#__PURE__*/React.createElement(Svg, _extends({
7
+ height: 28,
8
+ viewBox: '0 0 5 28',
9
+ width: 5
10
+ }, props), /*#__PURE__*/React.createElement(Path, {
11
+ d: "M0.656815 13.3103L4.44828 9.32931C4.80245 8.95743 5 8.46355 5 7.95V20.05C5 19.5364 4.80245 19.0426 4.44828 18.6707L0.656815 14.6897C0.288998 14.3034 0.288998 13.6966 0.656815 13.3103Z"
12
+ }));
13
+ }
14
+ //# sourceMappingURL=VerticalLargeBeak.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Path","Svg","VerticalLargeBeak","props"],"sources":["VerticalLargeBeak.tsx"],"sourcesContent":["import React from 'react';\nimport type { SvgProps } from 'react-native-svg';\nimport { Path, Svg } from 'react-native-svg';\n\nexport default function VerticalLargeBeak(props: SvgProps) {\n return (\n <Svg\n height={28}\n viewBox={'0 0 5 28'}\n width={5}\n {...props}\n >\n <Path\n d=\"M0.656815 13.3103L4.44828 9.32931C4.80245 8.95743 5 8.46355 5 7.95V20.05C5 19.5364 4.80245 19.0426 4.44828 18.6707L0.656815 14.6897C0.288998 14.3034 0.288998 13.6966 0.656815 13.3103Z\"\n />\n </Svg>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,EAAeC,GAAf,QAA0B,kBAA1B;AAEA,eAAe,SAASC,iBAAT,CAA2BC,KAA3B,EAA4C;EACvD,oBACI,oBAAC,GAAD;IACI,MAAM,EAAE,EADZ;IAEI,OAAO,EAAE,UAFb;IAGI,KAAK,EAAE;EAHX,GAIQA,KAJR,gBAMI,oBAAC,IAAD;IACI,CAAC,EAAC;EADN,EANJ,CADJ;AAYH"}
@@ -0,0 +1,14 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import { Path, Svg } from 'react-native-svg';
5
+ export default function VerticalSmallBeak(props) {
6
+ return /*#__PURE__*/React.createElement(Svg, _extends({
7
+ height: 11,
8
+ viewBox: '0 0 4 11',
9
+ width: 4
10
+ }, props), /*#__PURE__*/React.createElement(Path, {
11
+ d: "M0.656815 4.81034L3.44828 1.87931C3.80245 1.50742 4 1.01355 4 0.499994L4 10.5C4 9.98644 3.80245 9.49257 3.44828 9.12068L0.656816 6.18965C0.288999 5.80344 0.288999 5.19655 0.656815 4.81034Z"
12
+ }));
13
+ }
14
+ //# sourceMappingURL=VerticalSmallBeak.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Path","Svg","VerticalSmallBeak","props"],"sources":["VerticalSmallBeak.tsx"],"sourcesContent":["import React from 'react';\nimport type { SvgProps } from 'react-native-svg';\nimport { Path, Svg } from 'react-native-svg';\n\nexport default function VerticalSmallBeak(props: SvgProps) {\n return (\n <Svg\n height={11}\n viewBox={'0 0 4 11'}\n width={4}\n {...props}\n >\n <Path\n d=\"M0.656815 4.81034L3.44828 1.87931C3.80245 1.50742 4 1.01355 4 0.499994L4 10.5C4 9.98644 3.80245 9.49257 3.44828 9.12068L0.656816 6.18965C0.288999 5.80344 0.288999 5.19655 0.656815 4.81034Z\"\n />\n </Svg>\n );\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,EAAeC,GAAf,QAA0B,kBAA1B;AAEA,eAAe,SAASC,iBAAT,CAA2BC,KAA3B,EAA4C;EACvD,oBACI,oBAAC,GAAD;IACI,MAAM,EAAE,EADZ;IAEI,OAAO,EAAE,UAFb;IAGI,KAAK,EAAE;EAHX,GAIQA,KAJR,gBAMI,oBAAC,IAAD;IACI,CAAC,EAAC;EADN,EANJ,CADJ;AAYH"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Beak';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './Beak';\nexport type { default as BeakProps } from './BeakProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,QAAxB"}
@@ -0,0 +1,121 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { Platform, Text, View } from 'react-native';
3
+ import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
4
+ import { rgb } from '@fountain-ui/utils';
5
+ import ButtonBase from '../ButtonBase';
6
+ import { createFontStyle, css, useTheme } from '../styles';
7
+ import { Close as CloseIcon } from '../internal/icons';
8
+ import UpArrow from './UpArrow';
9
+ const DEFAULT_OPACITY = 0.8;
10
+ const INITIAL_LAYOUT = {
11
+ width: 0,
12
+ height: 0,
13
+ x: 0,
14
+ y: 0
15
+ };
16
+ const ANIMATION_CONFIG = {
17
+ duration: 150
18
+ };
19
+ export default function Tooltip(props) {
20
+ const {
21
+ arrowLayout,
22
+ children,
23
+ initialLayout = INITIAL_LAYOUT,
24
+ left,
25
+ onClose,
26
+ placement = 'top',
27
+ right,
28
+ numberOfTitleLines = 1,
29
+ style,
30
+ title,
31
+ tooltipStyle,
32
+ verticalOffset = 4,
33
+ visible = false
34
+ } = props;
35
+ const theme = useTheme();
36
+ const [layout, setLayout] = useState(initialLayout);
37
+ const scale = useSharedValue(0);
38
+ const animatedStyle = useAnimatedStyle(() => ({
39
+ transform: [{
40
+ scale: scale.value
41
+ }]
42
+ }), []);
43
+ const [r, g, b] = rgb(theme.palette.primary.main);
44
+ const totalVerticalOffset = -(layout.height + verticalOffset);
45
+ const tooltipLayoutStyle = {
46
+ alignItems: (arrowLayout === null || arrowLayout === void 0 ? void 0 : arrowLayout.placement) === 'left' ? 'flex-start' : (arrowLayout === null || arrowLayout === void 0 ? void 0 : arrowLayout.placement) === 'right' ? 'flex-end' : 'center',
47
+ bottom: placement === 'bottom' ? totalVerticalOffset : undefined,
48
+ left,
49
+ position: 'absolute',
50
+ right,
51
+ top: placement === 'top' ? totalVerticalOffset : undefined,
52
+ zIndex: theme.zIndex.tooltip,
53
+ height: visible ? undefined : 0,
54
+ overflow: visible ? undefined : 'hidden',
55
+ ...Platform.select({
56
+ web: {
57
+ display: visible ? 'flex' : 'none'
58
+ },
59
+ default: {}
60
+ })
61
+ };
62
+ useEffect(() => {
63
+ const nextScaleValue = visible ? 1 : 0;
64
+ scale.value = withTiming(nextScaleValue, ANIMATION_CONFIG);
65
+ }, [visible]);
66
+ const touchableStyle = {
67
+ alignItems: 'center',
68
+ backgroundColor: `rgba(${r}, ${g}, ${b}, ${DEFAULT_OPACITY})`,
69
+ borderRadius: theme.shape.roundness,
70
+ flexDirection: 'row',
71
+ padding: theme.spacing(2),
72
+ width: '100%'
73
+ };
74
+ const fontStyle = createFontStyle(theme, {
75
+ selector: typo => typo.caption2,
76
+ color: theme.palette.primary.contrastTextColor
77
+ });
78
+ const textStyle = css([fontStyle, {
79
+ marginRight: theme.spacing(2),
80
+ flexShrink: 1
81
+ }]);
82
+ const arrowStyle = css({ ...(arrowLayout && {
83
+ [arrowLayout.placement]: arrowLayout.offset
84
+ })
85
+ });
86
+ const buttonElem = /*#__PURE__*/React.createElement(ButtonBase, {
87
+ pressEffect: 'none',
88
+ onPress: onClose
89
+ }, /*#__PURE__*/React.createElement(View, {
90
+ style: css(touchableStyle)
91
+ }, /*#__PURE__*/React.createElement(Text // TODO: Should we provide text prop customization?
92
+ , {
93
+ numberOfLines: numberOfTitleLines,
94
+ style: textStyle
95
+ }, title), /*#__PURE__*/React.createElement(CloseIcon, {
96
+ fill: theme.palette.primary.contrastTextColor,
97
+ width: 20,
98
+ height: 20
99
+ })));
100
+ const arrowElem = /*#__PURE__*/React.createElement(View, {
101
+ style: arrowStyle
102
+ }, /*#__PURE__*/React.createElement(UpArrow, {
103
+ upsideDown: placement === 'top',
104
+ fill: theme.palette.primary.main,
105
+ opacity: DEFAULT_OPACITY
106
+ }));
107
+ return /*#__PURE__*/React.createElement(View, {
108
+ style: style
109
+ }, children, /*#__PURE__*/React.createElement(Animated.View, {
110
+ onLayout: event => {
111
+ if (event.nativeEvent.layout.height === 0) {
112
+ return;
113
+ }
114
+
115
+ setLayout(event.nativeEvent.layout);
116
+ },
117
+ style: [animatedStyle, tooltipLayoutStyle, tooltipStyle]
118
+ }, placement === 'top' ? /*#__PURE__*/React.createElement(React.Fragment, null, buttonElem, arrowElem) : /*#__PURE__*/React.createElement(React.Fragment, null, arrowElem, buttonElem)));
119
+ }
120
+ ;
121
+ //# sourceMappingURL=LegacyTooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useState","Platform","Text","View","Animated","useAnimatedStyle","useSharedValue","withTiming","rgb","ButtonBase","createFontStyle","css","useTheme","Close","CloseIcon","UpArrow","DEFAULT_OPACITY","INITIAL_LAYOUT","width","height","x","y","ANIMATION_CONFIG","duration","Tooltip","props","arrowLayout","children","initialLayout","left","onClose","placement","right","numberOfTitleLines","style","title","tooltipStyle","verticalOffset","visible","theme","layout","setLayout","scale","animatedStyle","transform","value","r","g","b","palette","primary","main","totalVerticalOffset","tooltipLayoutStyle","alignItems","bottom","undefined","position","top","zIndex","tooltip","overflow","select","web","display","default","nextScaleValue","touchableStyle","backgroundColor","borderRadius","shape","roundness","flexDirection","padding","spacing","fontStyle","selector","typo","caption2","color","contrastTextColor","textStyle","marginRight","flexShrink","arrowStyle","offset","buttonElem","arrowElem","event","nativeEvent"],"sources":["LegacyTooltip.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Platform, Text, View, ViewProps } from 'react-native';\nimport type { WithTimingConfig } from 'react-native-reanimated';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport { rgb } from '@fountain-ui/utils';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { Close as CloseIcon } from '../internal/icons';\nimport type TooltipProps from './LegacyTooltipProps';\nimport UpArrow from './UpArrow';\n\nconst DEFAULT_OPACITY = 0.8;\nconst INITIAL_LAYOUT = { width: 0, height: 0, x: 0, y: 0 };\n\nconst ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 150 };\n\nexport default function Tooltip(props: TooltipProps) {\n const {\n arrowLayout,\n children,\n initialLayout = INITIAL_LAYOUT,\n left,\n onClose,\n placement = 'top',\n right,\n numberOfTitleLines = 1,\n style,\n title,\n tooltipStyle,\n verticalOffset = 4,\n visible = false,\n } = props;\n\n const theme = useTheme();\n\n const [layout, setLayout] = useState(initialLayout);\n\n const scale = useSharedValue(0);\n\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }), []);\n\n const [r, g, b] = rgb(theme.palette.primary.main);\n\n const totalVerticalOffset = -(layout.height + verticalOffset);\n const tooltipLayoutStyle: ViewProps['style'] = {\n alignItems: arrowLayout?.placement === 'left'\n ? 'flex-start'\n : arrowLayout?.placement === 'right'\n ? 'flex-end'\n : 'center',\n bottom: placement === 'bottom' ? totalVerticalOffset : undefined,\n left,\n position: 'absolute',\n right,\n top: placement === 'top' ? totalVerticalOffset : undefined,\n zIndex: theme.zIndex.tooltip,\n height: visible ? undefined : 0,\n overflow: visible ? undefined : 'hidden',\n ...Platform.select({\n web: {\n display: visible ? 'flex' : 'none',\n },\n default: {},\n }),\n };\n\n useEffect(() => {\n const nextScaleValue = visible ? 1 : 0;\n\n scale.value = withTiming(nextScaleValue, ANIMATION_CONFIG);\n }, [visible]);\n\n const touchableStyle: ViewProps['style'] = {\n alignItems: 'center',\n backgroundColor: `rgba(${r}, ${g}, ${b}, ${DEFAULT_OPACITY})`,\n borderRadius: theme.shape.roundness,\n flexDirection: 'row',\n padding: theme.spacing(2),\n width: '100%',\n };\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption2,\n color: theme.palette.primary.contrastTextColor,\n });\n\n const textStyle = css([\n fontStyle,\n {\n marginRight: theme.spacing(2),\n flexShrink: 1,\n },\n ]);\n\n const arrowStyle = css({\n ...(arrowLayout && {\n [arrowLayout.placement]: arrowLayout.offset,\n }),\n });\n\n const buttonElem = (\n <ButtonBase\n pressEffect={'none'}\n onPress={onClose}\n >\n <View style={css(touchableStyle)}>\n <Text\n // TODO: Should we provide text prop customization?\n numberOfLines={numberOfTitleLines}\n style={textStyle}\n >\n {title}\n </Text>\n <CloseIcon\n fill={theme.palette.primary.contrastTextColor}\n width={20}\n height={20}\n />\n </View>\n </ButtonBase>\n );\n\n const arrowElem = (\n <View style={arrowStyle}>\n <UpArrow\n upsideDown={placement === 'top'}\n fill={theme.palette.primary.main}\n opacity={DEFAULT_OPACITY}\n />\n </View>\n );\n\n return (\n <View style={style}>\n {children}\n\n <Animated.View\n onLayout={(event) => {\n if (event.nativeEvent.layout.height === 0) {\n return;\n }\n\n setLayout(event.nativeEvent.layout);\n }}\n style={[\n animatedStyle,\n tooltipLayoutStyle,\n tooltipStyle,\n ]}\n >\n {placement === 'top' ? (\n <React.Fragment>\n {buttonElem}\n {arrowElem}\n </React.Fragment>\n ) : (\n <React.Fragment>\n {arrowElem}\n {buttonElem}\n </React.Fragment>\n )}\n </Animated.View>\n </View>\n );\n};\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=LegacyTooltipProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["LegacyTooltipProps.ts"],"sourcesContent":["import React from 'react';\nimport type { TextProps, ViewProps } from 'react-native';\nimport type { ComponentProps } from '../types';\nimport type { ButtonProps } from '../Button';\n\nexport type TooltipPlacement = 'top' | 'bottom';\n\nexport type TooltipArrowPlacement = 'left' | 'right';\n\nexport type TooltipInitialLayout = {\n height: number;\n width: number;\n x: number;\n y: number;\n};\n\nexport default interface TooltipProps extends ComponentProps<{\n /**\n * Tooltip reference element.\n */\n children: React.ReactNode;\n\n /**\n * Left position relative to reference element.\n */\n left?: number;\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose?: () => void;\n\n /**\n * Tooltip placement.\n * @default 'top'\n */\n placement?: TooltipPlacement;\n\n /**\n * Right position relative to reference element.\n */\n right?: number;\n\n /**\n * Tooltip title.\n */\n title: ButtonProps['children'];\n\n /**\n * Additional style for tooltip wrapper.\n */\n tooltipStyle?: ViewProps['style'];\n\n /**\n * The additional amount to vertically shift.\n * @default 4\n */\n verticalOffset?: number;\n\n /**\n * If `true`, the tooltip is shown.\n * @default false\n */\n visible?: boolean;\n\n /**\n * Tooltip arrow layout.\n * If 'undefined', the arrow will be centered on tooltip.\n */\n arrowLayout?: {\n placement: TooltipArrowPlacement;\n offset: number;\n }\n\n /**\n * number of tooltip's title lines\n * @default 1\n */\n numberOfTitleLines?: TextProps['numberOfLines'];\n\n /**\n * position of tooltip before onLayout call\n * @default { height: 0, width: 0 , x: 0, y: 0}\n */\n initialLayout?: TooltipInitialLayout;\n}> {}\n"],"mappings":""}
@@ -1,12 +1,14 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { Platform, Text, View } from 'react-native';
3
3
  import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
4
- import { rgb } from '@fountain-ui/utils';
4
+ import { typographyOf } from '@fountain-ui/styles';
5
5
  import ButtonBase from '../ButtonBase';
6
6
  import { createFontStyle, css, useTheme } from '../styles';
7
- import { Close as CloseIcon } from '../internal/icons';
8
- import UpArrow from './UpArrow';
9
- const DEFAULT_OPACITY = 0.8;
7
+ import Beak from './Beaks';
8
+ const DEFAULT_BEAK_LAYOUT = {
9
+ offset: 0,
10
+ placement: 'middle'
11
+ };
10
12
  const INITIAL_LAYOUT = {
11
13
  width: 0,
12
14
  height: 0,
@@ -16,9 +18,53 @@ const INITIAL_LAYOUT = {
16
18
  const ANIMATION_CONFIG = {
17
19
  duration: 150
18
20
  };
21
+
22
+ const getFlexDirection = placement => {
23
+ switch (placement) {
24
+ case 'right':
25
+ return 'row-reverse';
26
+
27
+ case 'bottom':
28
+ return 'column-reverse';
29
+
30
+ case 'left':
31
+ return 'row';
32
+
33
+ case 'top':
34
+ default:
35
+ return 'column';
36
+ }
37
+ };
38
+
39
+ const useStyles = function () {
40
+ const theme = useTheme();
41
+ return {
42
+ root: {
43
+ position: 'absolute',
44
+ zIndex: theme.zIndex.tooltip
45
+ },
46
+ content: {
47
+ backgroundColor: theme.palette.fill.base,
48
+ paddingHorizontal: theme.spacing(2),
49
+ paddingVertical: theme.spacing(1.5)
50
+ },
51
+ small: {
52
+ borderRadius: theme.shape.radius.sm,
53
+ paddingHorizontal: theme.spacing(2),
54
+ paddingVertical: theme.spacing(1.5)
55
+ },
56
+ large: {
57
+ borderRadius: 5,
58
+ paddingBottom: theme.spacing(2.5),
59
+ paddingHorizontal: theme.spacing(4),
60
+ paddingTop: theme.spacing(2)
61
+ }
62
+ };
63
+ };
64
+
19
65
  export default function Tooltip(props) {
20
66
  const {
21
- arrowLayout,
67
+ beakLayout = DEFAULT_BEAK_LAYOUT,
22
68
  children,
23
69
  initialLayout = INITIAL_LAYOUT,
24
70
  left,
@@ -26,13 +72,19 @@ export default function Tooltip(props) {
26
72
  placement = 'top',
27
73
  right,
28
74
  numberOfTitleLines = 1,
75
+ size = 'small',
29
76
  style,
30
77
  title,
31
78
  tooltipStyle,
32
79
  verticalOffset = 4,
33
80
  visible = false
34
81
  } = props;
82
+ const {
83
+ offset: beakOffset,
84
+ placement: beakPlacement
85
+ } = beakLayout;
35
86
  const theme = useTheme();
87
+ const styles = useStyles();
36
88
  const [layout, setLayout] = useState(initialLayout);
37
89
  const scale = useSharedValue(0);
38
90
  const animatedStyle = useAnimatedStyle(() => ({
@@ -40,16 +92,14 @@ export default function Tooltip(props) {
40
92
  scale: scale.value
41
93
  }]
42
94
  }), []);
43
- const [r, g, b] = rgb(theme.palette.primary.main);
44
- const totalVerticalOffset = -(layout.height + verticalOffset);
95
+ const flexDirection = getFlexDirection(placement);
96
+ const isVerticalPlacement = placement === 'top' || placement === 'bottom';
97
+ const totalOffset = -((isVerticalPlacement ? layout.height : layout.width) + verticalOffset);
45
98
  const tooltipLayoutStyle = {
46
- alignItems: (arrowLayout === null || arrowLayout === void 0 ? void 0 : arrowLayout.placement) === 'left' ? 'flex-start' : (arrowLayout === null || arrowLayout === void 0 ? void 0 : arrowLayout.placement) === 'right' ? 'flex-end' : 'center',
47
- bottom: placement === 'bottom' ? totalVerticalOffset : undefined,
99
+ alignItems: beakPlacement === 'start' ? 'flex-start' : beakPlacement === 'end' ? 'flex-end' : 'center',
100
+ flexDirection,
48
101
  left,
49
- position: 'absolute',
50
102
  right,
51
- top: placement === 'top' ? totalVerticalOffset : undefined,
52
- zIndex: theme.zIndex.tooltip,
53
103
  height: visible ? undefined : 0,
54
104
  overflow: visible ? undefined : 'hidden',
55
105
  ...Platform.select({
@@ -57,53 +107,54 @@ export default function Tooltip(props) {
57
107
  display: visible ? 'flex' : 'none'
58
108
  },
59
109
  default: {}
60
- })
110
+ }),
111
+ [placement]: totalOffset
61
112
  };
113
+ const contentStyle = css([styles.content, styles[size], isVerticalPlacement ? {
114
+ width: '100%'
115
+ } : {
116
+ flexGrow: 1,
117
+ flexShrink: 1
118
+ }]);
62
119
  useEffect(() => {
63
120
  const nextScaleValue = visible ? 1 : 0;
64
121
  scale.value = withTiming(nextScaleValue, ANIMATION_CONFIG);
65
122
  }, [visible]);
66
- const touchableStyle = {
67
- alignItems: 'center',
68
- backgroundColor: `rgba(${r}, ${g}, ${b}, ${DEFAULT_OPACITY})`,
69
- borderRadius: theme.shape.roundness,
70
- flexDirection: 'row',
71
- padding: theme.spacing(2),
72
- width: '100%'
73
- };
74
123
  const fontStyle = createFontStyle(theme, {
75
- selector: typo => typo.caption2,
76
- color: theme.palette.primary.contrastTextColor
124
+ selector: typo => size === 'large' ? typographyOf({
125
+ fontSize: 13,
126
+ lineHeight: 19.5,
127
+ fontFamily: 'Pretendard-Regular',
128
+ letterSpacing: 0
129
+ }) // TODO: change caption2.
130
+ : typo.caption3.regular,
131
+ color: theme.palette.text.strongInverse
77
132
  });
78
133
  const textStyle = css([fontStyle, {
79
- marginRight: theme.spacing(2),
80
134
  flexShrink: 1
81
135
  }]);
82
- const arrowStyle = css({ ...(arrowLayout && {
83
- [arrowLayout.placement]: arrowLayout.offset
84
- })
136
+ const beakStyle = css({
137
+ transform: [isVerticalPlacement ? {
138
+ translateX: beakOffset
139
+ } : {
140
+ translateY: beakOffset
141
+ }]
85
142
  });
86
143
  const buttonElem = /*#__PURE__*/React.createElement(ButtonBase, {
87
144
  pressEffect: 'none',
88
- onPress: onClose
89
- }, /*#__PURE__*/React.createElement(View, {
90
- style: css(touchableStyle)
91
- }, /*#__PURE__*/React.createElement(Text, {
92
- children: title // TODO: Should we provide text prop customization?
93
- ,
145
+ onPress: onClose,
146
+ style: contentStyle
147
+ }, /*#__PURE__*/React.createElement(Text // TODO: Should we provide text prop customization?
148
+ , {
94
149
  numberOfLines: numberOfTitleLines,
95
150
  style: textStyle
96
- }), /*#__PURE__*/React.createElement(CloseIcon, {
97
- fill: theme.palette.primary.contrastTextColor,
98
- width: 20,
99
- height: 20
100
- })));
101
- const arrowElem = /*#__PURE__*/React.createElement(View, {
102
- style: arrowStyle
103
- }, /*#__PURE__*/React.createElement(UpArrow, {
104
- upsideDown: placement === 'top',
105
- fill: theme.palette.primary.main,
106
- opacity: DEFAULT_OPACITY
151
+ }, title));
152
+ const beakElem = /*#__PURE__*/React.createElement(View, {
153
+ style: beakStyle
154
+ }, /*#__PURE__*/React.createElement(Beak, {
155
+ fill: theme.palette.fill.base,
156
+ placement: placement,
157
+ size: size
107
158
  }));
108
159
  return /*#__PURE__*/React.createElement(View, {
109
160
  style: style
@@ -115,8 +166,8 @@ export default function Tooltip(props) {
115
166
 
116
167
  setLayout(event.nativeEvent.layout);
117
168
  },
118
- style: [animatedStyle, tooltipLayoutStyle, tooltipStyle]
119
- }, placement === 'top' ? /*#__PURE__*/React.createElement(React.Fragment, null, buttonElem, arrowElem) : /*#__PURE__*/React.createElement(React.Fragment, null, arrowElem, buttonElem)));
169
+ style: [styles.root, animatedStyle, tooltipLayoutStyle, tooltipStyle]
170
+ }, buttonElem, beakElem));
120
171
  }
121
172
  ;
122
173
  //# sourceMappingURL=Tooltip.js.map