@fountain-ui/core 2.0.0-beta.92 → 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 (878) 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 +101 -71
  26. package/build/commonjs/Button/Button.js.map +1 -1
  27. package/build/commonjs/Button/ButtonProps.js +11 -0
  28. package/build/commonjs/Button/ButtonProps.js.map +1 -1
  29. package/build/commonjs/Button/LegacyButton.js +144 -0
  30. package/build/commonjs/Button/LegacyButton.js.map +1 -0
  31. package/build/commonjs/Button/LegacyButtonProps.js +2 -0
  32. package/build/commonjs/Button/LegacyButtonProps.js.map +1 -0
  33. package/build/commonjs/Button/index.js +2 -2
  34. package/build/commonjs/Button/index.js.map +1 -1
  35. package/build/commonjs/Button/useVariantStyleMap.js +174 -0
  36. package/build/commonjs/Button/useVariantStyleMap.js.map +1 -0
  37. package/build/commonjs/ButtonBase/ButtonBase.js +4 -10
  38. package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
  39. package/build/commonjs/ButtonBase/LegacyButtonBase.js +126 -0
  40. package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +1 -0
  41. package/build/commonjs/ButtonBase/index.js +2 -2
  42. package/build/commonjs/ButtonBase/index.js.map +1 -1
  43. package/build/commonjs/ButtonSet/ButtonSet.js +54 -0
  44. package/build/commonjs/ButtonSet/ButtonSet.js.map +1 -0
  45. package/build/commonjs/ButtonSet/ButtonSetProps.js +11 -0
  46. package/build/commonjs/ButtonSet/ButtonSetProps.js.map +1 -0
  47. package/build/commonjs/ButtonSet/index.js +30 -0
  48. package/build/commonjs/ButtonSet/index.js.map +1 -0
  49. package/build/commonjs/ButtonSet/useVariantStyleMap.js +85 -0
  50. package/build/commonjs/ButtonSet/useVariantStyleMap.js.map +1 -0
  51. package/build/commonjs/Checkbox/Checkbox.js +33 -23
  52. package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
  53. package/build/commonjs/Checkbox/CheckboxProps.js +7 -0
  54. package/build/commonjs/Checkbox/CheckboxProps.js.map +1 -1
  55. package/build/commonjs/Checkbox/LegacyCheckbox.js +65 -0
  56. package/build/commonjs/Checkbox/LegacyCheckbox.js.map +1 -0
  57. package/build/commonjs/Checkbox/LegacyCheckboxProps.js +2 -0
  58. package/build/commonjs/Checkbox/LegacyCheckboxProps.js.map +1 -0
  59. package/build/commonjs/Checkbox/index.js +2 -2
  60. package/build/commonjs/Checkbox/index.js.map +1 -1
  61. package/build/commonjs/Checkbox/useVariantStyleMap.js +70 -0
  62. package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -0
  63. package/build/commonjs/CheckboxGroup/CheckboxGroup.js +50 -0
  64. package/build/commonjs/CheckboxGroup/CheckboxGroup.js.map +1 -0
  65. package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js +2 -0
  66. package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js.map +1 -0
  67. package/build/commonjs/CheckboxGroup/index.js +16 -0
  68. package/build/commonjs/CheckboxGroup/index.js.map +1 -0
  69. package/build/commonjs/Chip/Chip.js +24 -62
  70. package/build/commonjs/Chip/Chip.js.map +1 -1
  71. package/build/commonjs/Chip/ChipProps.js +9 -0
  72. package/build/commonjs/Chip/ChipProps.js.map +1 -1
  73. package/build/commonjs/Chip/LegacyChip.js +98 -0
  74. package/build/commonjs/Chip/LegacyChip.js.map +1 -0
  75. package/build/commonjs/Chip/LegacyChipProps.js +2 -0
  76. package/build/commonjs/Chip/LegacyChipProps.js.map +1 -0
  77. package/build/commonjs/Chip/index.js +2 -2
  78. package/build/commonjs/Chip/index.js.map +1 -1
  79. package/build/commonjs/Chip/useChipStyle.js +113 -0
  80. package/build/commonjs/Chip/useChipStyle.js.map +1 -0
  81. package/build/commonjs/Empty/Empty.js +86 -0
  82. package/build/commonjs/Empty/Empty.js.map +1 -0
  83. package/build/commonjs/Empty/EmptyProps.js +2 -0
  84. package/build/commonjs/Empty/EmptyProps.js.map +1 -0
  85. package/build/commonjs/Empty/index.js +16 -0
  86. package/build/commonjs/Empty/index.js.map +1 -0
  87. package/build/commonjs/IconButton/IconButton.js +39 -42
  88. package/build/commonjs/IconButton/IconButton.js.map +1 -1
  89. package/build/commonjs/IconButton/IconButtonProps.js +7 -0
  90. package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
  91. package/build/commonjs/IconButton/LegacyIconButton.js +89 -0
  92. package/build/commonjs/IconButton/LegacyIconButton.js.map +1 -0
  93. package/build/commonjs/IconButton/LegacyIconButtonProps.js +2 -0
  94. package/build/commonjs/IconButton/LegacyIconButtonProps.js.map +1 -0
  95. package/build/commonjs/IconButton/index.js +2 -2
  96. package/build/commonjs/IconButton/index.js.map +1 -1
  97. package/build/commonjs/Pagination/LegacyPagination.js +145 -0
  98. package/build/commonjs/Pagination/LegacyPagination.js.map +1 -0
  99. package/build/commonjs/Pagination/LegacyPaginationProps.js +2 -0
  100. package/build/commonjs/Pagination/LegacyPaginationProps.js.map +1 -0
  101. package/build/commonjs/Pagination/NumberPagination.js +71 -0
  102. package/build/commonjs/Pagination/NumberPagination.js.map +1 -0
  103. package/build/commonjs/Pagination/Pagination.js +9 -5
  104. package/build/commonjs/Pagination/Pagination.js.map +1 -1
  105. package/build/commonjs/Pagination/PaginationProps.js +7 -0
  106. package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
  107. package/build/commonjs/Pagination/index.js +2 -2
  108. package/build/commonjs/Pagination/index.js.map +1 -1
  109. package/build/commonjs/PaginationItem/LegacyPaginationItem.js +53 -0
  110. package/build/commonjs/PaginationItem/LegacyPaginationItem.js.map +1 -0
  111. package/build/commonjs/PaginationItem/PaginationItem.js +2 -2
  112. package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
  113. package/build/commonjs/Radio/LegacyRadio.js +82 -0
  114. package/build/commonjs/Radio/LegacyRadio.js.map +1 -0
  115. package/build/commonjs/Radio/LegacyRadioProps.js +2 -0
  116. package/build/commonjs/Radio/LegacyRadioProps.js.map +1 -0
  117. package/build/commonjs/Radio/Radio.js +40 -19
  118. package/build/commonjs/Radio/Radio.js.map +1 -1
  119. package/build/commonjs/Radio/RadioProps.js.map +1 -1
  120. package/build/commonjs/Radio/index.js +2 -2
  121. package/build/commonjs/Radio/index.js.map +1 -1
  122. package/build/commonjs/RadioGroup/LegacyRadioGroup.js +31 -0
  123. package/build/commonjs/RadioGroup/LegacyRadioGroup.js.map +1 -0
  124. package/build/commonjs/RadioGroup/RadioGroup.js +28 -2
  125. package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
  126. package/build/commonjs/RadioGroup/index.js +2 -2
  127. package/build/commonjs/RadioGroup/index.js.map +1 -1
  128. package/build/commonjs/ShadowView/ShadowView.js +35 -0
  129. package/build/commonjs/ShadowView/ShadowView.js.map +1 -0
  130. package/build/commonjs/ShadowView/ShadowView.native.js +35 -0
  131. package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -0
  132. package/build/commonjs/ShadowView/ShadowViewProps.js +2 -0
  133. package/build/commonjs/ShadowView/ShadowViewProps.js.map +1 -0
  134. package/build/commonjs/ShadowView/index.js +16 -0
  135. package/build/commonjs/ShadowView/index.js.map +1 -0
  136. package/build/commonjs/Snackbar/LegacySnackbar.js +134 -0
  137. package/build/commonjs/Snackbar/LegacySnackbar.js.map +1 -0
  138. package/build/commonjs/Snackbar/LegacySnackbarProps.js +2 -0
  139. package/build/commonjs/Snackbar/LegacySnackbarProps.js.map +1 -0
  140. package/build/commonjs/Snackbar/Snackbar.js +7 -5
  141. package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
  142. package/build/commonjs/Snackbar/SnackbarProps.js +7 -0
  143. package/build/commonjs/Snackbar/SnackbarProps.js.map +1 -1
  144. package/build/commonjs/Snackbar/index.js +2 -2
  145. package/build/commonjs/Snackbar/index.js.map +1 -1
  146. package/build/commonjs/SnackbarContent/LegacySnackbarContent.js +105 -0
  147. package/build/commonjs/SnackbarContent/LegacySnackbarContent.js.map +1 -0
  148. package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js +2 -0
  149. package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js.map +1 -0
  150. package/build/commonjs/SnackbarContent/SnackbarContent.js +48 -38
  151. package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
  152. package/build/commonjs/SnackbarContent/SnackbarContentProps.js.map +1 -1
  153. package/build/commonjs/SnackbarContent/StatusIcon.js +43 -0
  154. package/build/commonjs/SnackbarContent/StatusIcon.js.map +1 -0
  155. package/build/commonjs/SnackbarContent/index.js +2 -2
  156. package/build/commonjs/SnackbarContent/index.js.map +1 -1
  157. package/build/commonjs/SvgIcon/LegacySvgIcon.js +43 -0
  158. package/build/commonjs/SvgIcon/LegacySvgIcon.js.map +1 -0
  159. package/build/commonjs/SvgIcon/LegacySvgIconProps.js +2 -0
  160. package/build/commonjs/SvgIcon/LegacySvgIconProps.js.map +1 -0
  161. package/build/commonjs/SvgIcon/SvgIcon.js +16 -4
  162. package/build/commonjs/SvgIcon/SvgIcon.js.map +1 -1
  163. package/build/commonjs/SvgIcon/SvgIconProps.js +15 -0
  164. package/build/commonjs/SvgIcon/SvgIconProps.js.map +1 -1
  165. package/build/commonjs/SvgIcon/index.js +2 -2
  166. package/build/commonjs/SvgIcon/index.js.map +1 -1
  167. package/build/commonjs/Tab/LegacyTab.js +126 -0
  168. package/build/commonjs/Tab/LegacyTab.js.map +1 -0
  169. package/build/commonjs/Tab/LegacyTabProps.js +2 -0
  170. package/build/commonjs/Tab/LegacyTabProps.js.map +1 -0
  171. package/build/commonjs/Tab/Tab.js +31 -69
  172. package/build/commonjs/Tab/Tab.js.map +1 -1
  173. package/build/commonjs/Tab/TabIndicator.js.map +1 -1
  174. package/build/commonjs/Tab/TabProps.js +7 -0
  175. package/build/commonjs/Tab/TabProps.js.map +1 -1
  176. package/build/commonjs/Tab/index.js +2 -2
  177. package/build/commonjs/Tab/index.js.map +1 -1
  178. package/build/commonjs/Tab/useVariantStyleMap.js +80 -0
  179. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -0
  180. package/build/commonjs/TabBase/LegacyTabBase.js +57 -0
  181. package/build/commonjs/TabBase/LegacyTabBase.js.map +1 -0
  182. package/build/commonjs/TabBase/TabBase.js +1 -6
  183. package/build/commonjs/TabBase/TabBase.js.map +1 -1
  184. package/build/commonjs/TabBase/index.js +2 -2
  185. package/build/commonjs/TabBase/index.js.map +1 -1
  186. package/build/commonjs/Tabs/LegacyTabIndicator.js +119 -0
  187. package/build/commonjs/Tabs/LegacyTabIndicator.js.map +1 -0
  188. package/build/commonjs/Tabs/LegacyTabIndicatorProps.js +2 -0
  189. package/build/commonjs/Tabs/LegacyTabIndicatorProps.js.map +1 -0
  190. package/build/commonjs/Tabs/LegacyTabs.js +205 -0
  191. package/build/commonjs/Tabs/LegacyTabs.js.map +1 -0
  192. package/build/commonjs/Tabs/LegacyTabsProps.js +2 -0
  193. package/build/commonjs/Tabs/LegacyTabsProps.js.map +1 -0
  194. package/build/commonjs/Tabs/TabIndicator.js +5 -9
  195. package/build/commonjs/Tabs/TabIndicator.js.map +1 -1
  196. package/build/commonjs/Tabs/TabIndicatorProps.js.map +1 -1
  197. package/build/commonjs/Tabs/Tabs.js +10 -9
  198. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  199. package/build/commonjs/Tabs/TabsProps.js +7 -0
  200. package/build/commonjs/Tabs/TabsProps.js.map +1 -1
  201. package/build/commonjs/Tabs/index.js +2 -2
  202. package/build/commonjs/Tabs/index.js.map +1 -1
  203. package/build/commonjs/TextField/LegacyTextField.js +195 -0
  204. package/build/commonjs/TextField/LegacyTextField.js.map +1 -0
  205. package/build/commonjs/TextField/LegacyTextFieldProps.js +2 -0
  206. package/build/commonjs/TextField/LegacyTextFieldProps.js.map +1 -0
  207. package/build/commonjs/TextField/OutlinedTextField.js.map +1 -1
  208. package/build/commonjs/TextField/TextField.js +105 -147
  209. package/build/commonjs/TextField/TextField.js.map +1 -1
  210. package/build/commonjs/TextField/TextFieldProps.js +9 -0
  211. package/build/commonjs/TextField/TextFieldProps.js.map +1 -1
  212. package/build/commonjs/TextField/index.js +2 -2
  213. package/build/commonjs/TextField/index.js.map +1 -1
  214. package/build/commonjs/TextField/useVariantStyleMap.js +103 -0
  215. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -0
  216. package/build/commonjs/Toggle/Toggle.js +110 -0
  217. package/build/commonjs/Toggle/Toggle.js.map +1 -0
  218. package/build/commonjs/Toggle/ToggleProps.js +2 -0
  219. package/build/commonjs/Toggle/ToggleProps.js.map +1 -0
  220. package/build/commonjs/Toggle/index.js +16 -0
  221. package/build/commonjs/Toggle/index.js.map +1 -0
  222. package/build/commonjs/Tooltip/Beaks/Beak.js +69 -0
  223. package/build/commonjs/Tooltip/Beaks/Beak.js.map +1 -0
  224. package/build/commonjs/Tooltip/Beaks/BeakProps.js +2 -0
  225. package/build/commonjs/Tooltip/Beaks/BeakProps.js.map +1 -0
  226. package/build/commonjs/Tooltip/Beaks/HorizontalLargeBeak.js +25 -0
  227. package/build/commonjs/Tooltip/Beaks/HorizontalLargeBeak.js.map +1 -0
  228. package/build/commonjs/Tooltip/Beaks/HorizontalSmallBeak.js +25 -0
  229. package/build/commonjs/Tooltip/Beaks/HorizontalSmallBeak.js.map +1 -0
  230. package/build/commonjs/Tooltip/Beaks/VerticalLargeBeak.js +25 -0
  231. package/build/commonjs/Tooltip/Beaks/VerticalLargeBeak.js.map +1 -0
  232. package/build/commonjs/Tooltip/Beaks/VerticalSmallBeak.js +25 -0
  233. package/build/commonjs/Tooltip/Beaks/VerticalSmallBeak.js.map +1 -0
  234. package/build/commonjs/Tooltip/Beaks/index.js +16 -0
  235. package/build/commonjs/Tooltip/Beaks/index.js.map +1 -0
  236. package/build/commonjs/Tooltip/LegacyTooltip.js +147 -0
  237. package/build/commonjs/Tooltip/LegacyTooltip.js.map +1 -0
  238. package/build/commonjs/Tooltip/LegacyTooltipProps.js +2 -0
  239. package/build/commonjs/Tooltip/LegacyTooltipProps.js.map +1 -0
  240. package/build/commonjs/Tooltip/Tooltip.js +101 -52
  241. package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
  242. package/build/commonjs/Tooltip/TooltipProps.js +11 -0
  243. package/build/commonjs/Tooltip/TooltipProps.js.map +1 -1
  244. package/build/commonjs/Tooltip/index.js +2 -2
  245. package/build/commonjs/Tooltip/index.js.map +1 -1
  246. package/build/commonjs/Typography/LegacyTypography.js +142 -0
  247. package/build/commonjs/Typography/LegacyTypography.js.map +1 -0
  248. package/build/commonjs/Typography/LegacyTypographyProps.js +2 -0
  249. package/build/commonjs/Typography/LegacyTypographyProps.js.map +1 -0
  250. package/build/commonjs/Typography/Typography.js +15 -54
  251. package/build/commonjs/Typography/Typography.js.map +1 -1
  252. package/build/commonjs/Typography/TypographyProps.js +7 -0
  253. package/build/commonjs/Typography/TypographyProps.js.map +1 -1
  254. package/build/commonjs/Typography/index.js +2 -2
  255. package/build/commonjs/Typography/index.js.map +1 -1
  256. package/build/commonjs/hooks/useCollapsibleAppBar.js +13 -5
  257. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  258. package/build/commonjs/index.js +105 -0
  259. package/build/commonjs/index.js.map +1 -1
  260. package/build/commonjs/internal/icons/Check.js +23 -0
  261. package/build/commonjs/internal/icons/Check.js.map +1 -0
  262. package/build/commonjs/internal/icons/CheckCircle.js +27 -0
  263. package/build/commonjs/internal/icons/CheckCircle.js.map +1 -0
  264. package/build/commonjs/internal/icons/CheckboxOn.js +23 -0
  265. package/build/commonjs/internal/icons/CheckboxOn.js.map +1 -0
  266. package/build/commonjs/internal/icons/Clear.js +27 -0
  267. package/build/commonjs/internal/icons/Clear.js.map +1 -0
  268. package/build/commonjs/internal/icons/EyeOff.js +31 -0
  269. package/build/commonjs/internal/icons/EyeOff.js.map +1 -0
  270. package/build/commonjs/internal/icons/EyeOn.js +27 -0
  271. package/build/commonjs/internal/icons/EyeOn.js.map +1 -0
  272. package/build/commonjs/internal/icons/InfoCircle.js +27 -0
  273. package/build/commonjs/internal/icons/InfoCircle.js.map +1 -0
  274. package/build/commonjs/internal/icons/LoadingSpinner/LoadingSpinnerProps.js +2 -0
  275. package/build/commonjs/internal/icons/LoadingSpinner/LoadingSpinnerProps.js.map +1 -0
  276. package/build/commonjs/internal/icons/LoadingSpinner/index.js +36 -0
  277. package/build/commonjs/internal/icons/LoadingSpinner/index.js.map +1 -0
  278. package/build/commonjs/internal/icons/LoadingSpinner/index.native.js +36 -0
  279. package/build/commonjs/internal/icons/LoadingSpinner/index.native.js.map +1 -0
  280. package/build/commonjs/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
  281. package/build/commonjs/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
  282. package/build/commonjs/internal/icons/LoadingSpinner/utils.js +25 -0
  283. package/build/commonjs/internal/icons/LoadingSpinner/utils.js.map +1 -0
  284. package/build/commonjs/internal/icons/Search.js +23 -0
  285. package/build/commonjs/internal/icons/Search.js.map +1 -0
  286. package/build/commonjs/internal/icons/index.js +72 -0
  287. package/build/commonjs/internal/icons/index.js.map +1 -1
  288. package/build/commonjs/styles/createFontStyle.js.map +1 -1
  289. package/build/commonjs/utils/cloneElementSafely.js.map +1 -1
  290. package/build/commonjs/utils/createSvgIcon.js +15 -3
  291. package/build/commonjs/utils/createSvgIcon.js.map +1 -1
  292. package/build/commonjs/utils/index.js.map +1 -1
  293. package/build/module/Accordion/Accordion.js +47 -50
  294. package/build/module/Accordion/Accordion.js.map +1 -1
  295. package/build/module/Accordion/AccordionProps.js +1 -1
  296. package/build/module/Accordion/AccordionProps.js.map +1 -1
  297. package/build/module/Accordion/LegacyAccordion.js +148 -0
  298. package/build/module/Accordion/LegacyAccordion.js.map +1 -0
  299. package/build/module/Accordion/LegacyAccordionProps.js +2 -0
  300. package/build/module/Accordion/LegacyAccordionProps.js.map +1 -0
  301. package/build/module/Accordion/index.js +1 -1
  302. package/build/module/Accordion/index.js.map +1 -1
  303. package/build/module/Accordion/useVariantStyleMap.js +116 -0
  304. package/build/module/Accordion/useVariantStyleMap.js.map +1 -0
  305. package/build/module/Badge/Badge.js +17 -23
  306. package/build/module/Badge/Badge.js.map +1 -1
  307. package/build/module/Badge/BadgeProps.js +5 -1
  308. package/build/module/Badge/BadgeProps.js.map +1 -1
  309. package/build/module/Badge/LegacyBadge.js +48 -0
  310. package/build/module/Badge/LegacyBadge.js.map +1 -0
  311. package/build/module/Badge/LegacyBadgeProps.js +2 -0
  312. package/build/module/Badge/LegacyBadgeProps.js.map +1 -0
  313. package/build/module/Badge/index.js +1 -1
  314. package/build/module/Badge/index.js.map +1 -1
  315. package/build/module/Badge/useVariantStyleMap.js +64 -0
  316. package/build/module/Badge/useVariantStyleMap.js.map +1 -0
  317. package/build/module/Button/Button.js +100 -70
  318. package/build/module/Button/Button.js.map +1 -1
  319. package/build/module/Button/ButtonProps.js +3 -1
  320. package/build/module/Button/ButtonProps.js.map +1 -1
  321. package/build/module/Button/LegacyButton.js +127 -0
  322. package/build/module/Button/LegacyButton.js.map +1 -0
  323. package/build/module/Button/LegacyButtonProps.js +2 -0
  324. package/build/module/Button/LegacyButtonProps.js.map +1 -0
  325. package/build/module/Button/index.js +1 -1
  326. package/build/module/Button/index.js.map +1 -1
  327. package/build/module/Button/useVariantStyleMap.js +164 -0
  328. package/build/module/Button/useVariantStyleMap.js.map +1 -0
  329. package/build/module/ButtonBase/ButtonBase.js +4 -9
  330. package/build/module/ButtonBase/ButtonBase.js.map +1 -1
  331. package/build/module/ButtonBase/LegacyButtonBase.js +106 -0
  332. package/build/module/ButtonBase/LegacyButtonBase.js.map +1 -0
  333. package/build/module/ButtonBase/index.js +1 -1
  334. package/build/module/ButtonBase/index.js.map +1 -1
  335. package/build/module/ButtonSet/ButtonSet.js +34 -0
  336. package/build/module/ButtonSet/ButtonSet.js.map +1 -0
  337. package/build/module/ButtonSet/ButtonSetProps.js +3 -0
  338. package/build/module/ButtonSet/ButtonSetProps.js.map +1 -0
  339. package/build/module/ButtonSet/index.js +3 -0
  340. package/build/module/ButtonSet/index.js.map +1 -0
  341. package/build/module/ButtonSet/useVariantStyleMap.js +76 -0
  342. package/build/module/ButtonSet/useVariantStyleMap.js.map +1 -0
  343. package/build/module/Checkbox/Checkbox.js +32 -26
  344. package/build/module/Checkbox/Checkbox.js.map +1 -1
  345. package/build/module/Checkbox/CheckboxProps.js +1 -1
  346. package/build/module/Checkbox/CheckboxProps.js.map +1 -1
  347. package/build/module/Checkbox/LegacyCheckbox.js +52 -0
  348. package/build/module/Checkbox/LegacyCheckbox.js.map +1 -0
  349. package/build/module/Checkbox/LegacyCheckboxProps.js +2 -0
  350. package/build/module/Checkbox/LegacyCheckboxProps.js.map +1 -0
  351. package/build/module/Checkbox/index.js +1 -1
  352. package/build/module/Checkbox/index.js.map +1 -1
  353. package/build/module/Checkbox/useVariantStyleMap.js +59 -0
  354. package/build/module/Checkbox/useVariantStyleMap.js.map +1 -0
  355. package/build/module/CheckboxGroup/CheckboxGroup.js +34 -0
  356. package/build/module/CheckboxGroup/CheckboxGroup.js.map +1 -0
  357. package/build/module/CheckboxGroup/CheckboxGroupProps.js +2 -0
  358. package/build/module/CheckboxGroup/CheckboxGroupProps.js.map +1 -0
  359. package/build/module/CheckboxGroup/index.js +2 -0
  360. package/build/module/CheckboxGroup/index.js.map +1 -0
  361. package/build/module/Chip/Chip.js +25 -64
  362. package/build/module/Chip/Chip.js.map +1 -1
  363. package/build/module/Chip/ChipProps.js +2 -1
  364. package/build/module/Chip/ChipProps.js.map +1 -1
  365. package/build/module/Chip/LegacyChip.js +84 -0
  366. package/build/module/Chip/LegacyChip.js.map +1 -0
  367. package/build/module/Chip/LegacyChipProps.js +2 -0
  368. package/build/module/Chip/LegacyChipProps.js.map +1 -0
  369. package/build/module/Chip/index.js +1 -1
  370. package/build/module/Chip/index.js.map +1 -1
  371. package/build/module/Chip/useChipStyle.js +104 -0
  372. package/build/module/Chip/useChipStyle.js.map +1 -0
  373. package/build/module/Empty/Empty.js +71 -0
  374. package/build/module/Empty/Empty.js.map +1 -0
  375. package/build/module/Empty/EmptyProps.js +2 -0
  376. package/build/module/Empty/EmptyProps.js.map +1 -0
  377. package/build/module/Empty/index.js +2 -0
  378. package/build/module/Empty/index.js.map +1 -0
  379. package/build/module/IconButton/IconButton.js +36 -40
  380. package/build/module/IconButton/IconButton.js.map +1 -1
  381. package/build/module/IconButton/IconButtonProps.js +1 -1
  382. package/build/module/IconButton/IconButtonProps.js.map +1 -1
  383. package/build/module/IconButton/LegacyIconButton.js +74 -0
  384. package/build/module/IconButton/LegacyIconButton.js.map +1 -0
  385. package/build/module/IconButton/LegacyIconButtonProps.js +2 -0
  386. package/build/module/IconButton/LegacyIconButtonProps.js.map +1 -0
  387. package/build/module/IconButton/index.js +1 -1
  388. package/build/module/IconButton/index.js.map +1 -1
  389. package/build/module/Pagination/LegacyPagination.js +129 -0
  390. package/build/module/Pagination/LegacyPagination.js.map +1 -0
  391. package/build/module/Pagination/LegacyPaginationProps.js +2 -0
  392. package/build/module/Pagination/LegacyPaginationProps.js.map +1 -0
  393. package/build/module/Pagination/NumberPagination.js +57 -0
  394. package/build/module/Pagination/NumberPagination.js.map +1 -0
  395. package/build/module/Pagination/Pagination.js +8 -5
  396. package/build/module/Pagination/Pagination.js.map +1 -1
  397. package/build/module/Pagination/PaginationProps.js +1 -1
  398. package/build/module/Pagination/PaginationProps.js.map +1 -1
  399. package/build/module/Pagination/index.js +1 -1
  400. package/build/module/Pagination/index.js.map +1 -1
  401. package/build/module/PaginationItem/LegacyPaginationItem.js +40 -0
  402. package/build/module/PaginationItem/LegacyPaginationItem.js.map +1 -0
  403. package/build/module/PaginationItem/PaginationItem.js +2 -2
  404. package/build/module/PaginationItem/PaginationItem.js.map +1 -1
  405. package/build/module/Radio/LegacyRadio.js +63 -0
  406. package/build/module/Radio/LegacyRadio.js.map +1 -0
  407. package/build/module/Radio/LegacyRadioProps.js +2 -0
  408. package/build/module/Radio/LegacyRadioProps.js.map +1 -0
  409. package/build/module/Radio/Radio.js +35 -18
  410. package/build/module/Radio/Radio.js.map +1 -1
  411. package/build/module/Radio/RadioProps.js.map +1 -1
  412. package/build/module/Radio/index.js +1 -1
  413. package/build/module/Radio/index.js.map +1 -1
  414. package/build/module/RadioGroup/LegacyRadioGroup.js +18 -0
  415. package/build/module/RadioGroup/LegacyRadioGroup.js.map +1 -0
  416. package/build/module/RadioGroup/RadioGroup.js +21 -2
  417. package/build/module/RadioGroup/RadioGroup.js.map +1 -1
  418. package/build/module/RadioGroup/index.js +1 -1
  419. package/build/module/RadioGroup/index.js.map +1 -1
  420. package/build/module/ShadowView/ShadowView.js +23 -0
  421. package/build/module/ShadowView/ShadowView.js.map +1 -0
  422. package/build/module/ShadowView/ShadowView.native.js +23 -0
  423. package/build/module/ShadowView/ShadowView.native.js.map +1 -0
  424. package/build/module/ShadowView/ShadowViewProps.js +2 -0
  425. package/build/module/ShadowView/ShadowViewProps.js.map +1 -0
  426. package/build/module/ShadowView/index.js +2 -0
  427. package/build/module/ShadowView/index.js.map +1 -0
  428. package/build/module/Snackbar/LegacySnackbar.js +107 -0
  429. package/build/module/Snackbar/LegacySnackbar.js.map +1 -0
  430. package/build/module/Snackbar/LegacySnackbarProps.js +2 -0
  431. package/build/module/Snackbar/LegacySnackbarProps.js.map +1 -0
  432. package/build/module/Snackbar/Snackbar.js +7 -5
  433. package/build/module/Snackbar/Snackbar.js.map +1 -1
  434. package/build/module/Snackbar/SnackbarProps.js +1 -1
  435. package/build/module/Snackbar/SnackbarProps.js.map +1 -1
  436. package/build/module/Snackbar/index.js +1 -1
  437. package/build/module/Snackbar/index.js.map +1 -1
  438. package/build/module/SnackbarContent/LegacySnackbarContent.js +84 -0
  439. package/build/module/SnackbarContent/LegacySnackbarContent.js.map +1 -0
  440. package/build/module/SnackbarContent/LegacySnackbarContentProps.js +2 -0
  441. package/build/module/SnackbarContent/LegacySnackbarContentProps.js.map +1 -0
  442. package/build/module/SnackbarContent/SnackbarContent.js +48 -35
  443. package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
  444. package/build/module/SnackbarContent/SnackbarContentProps.js.map +1 -1
  445. package/build/module/SnackbarContent/StatusIcon.js +31 -0
  446. package/build/module/SnackbarContent/StatusIcon.js.map +1 -0
  447. package/build/module/SnackbarContent/index.js +1 -1
  448. package/build/module/SnackbarContent/index.js.map +1 -1
  449. package/build/module/SvgIcon/LegacySvgIcon.js +30 -0
  450. package/build/module/SvgIcon/LegacySvgIcon.js.map +1 -0
  451. package/build/module/SvgIcon/LegacySvgIconProps.js +2 -0
  452. package/build/module/SvgIcon/LegacySvgIconProps.js.map +1 -0
  453. package/build/module/SvgIcon/SvgIcon.js +15 -4
  454. package/build/module/SvgIcon/SvgIcon.js.map +1 -1
  455. package/build/module/SvgIcon/SvgIconProps.js +7 -1
  456. package/build/module/SvgIcon/SvgIconProps.js.map +1 -1
  457. package/build/module/SvgIcon/index.js +1 -1
  458. package/build/module/SvgIcon/index.js.map +1 -1
  459. package/build/module/Tab/LegacyTab.js +105 -0
  460. package/build/module/Tab/LegacyTab.js.map +1 -0
  461. package/build/module/Tab/LegacyTabProps.js +2 -0
  462. package/build/module/Tab/LegacyTabProps.js.map +1 -0
  463. package/build/module/Tab/Tab.js +30 -66
  464. package/build/module/Tab/Tab.js.map +1 -1
  465. package/build/module/Tab/TabIndicator.js.map +1 -1
  466. package/build/module/Tab/TabProps.js +1 -1
  467. package/build/module/Tab/TabProps.js.map +1 -1
  468. package/build/module/Tab/index.js +1 -1
  469. package/build/module/Tab/index.js.map +1 -1
  470. package/build/module/Tab/useVariantStyleMap.js +70 -0
  471. package/build/module/Tab/useVariantStyleMap.js.map +1 -0
  472. package/build/module/TabBase/LegacyTabBase.js +44 -0
  473. package/build/module/TabBase/LegacyTabBase.js.map +1 -0
  474. package/build/module/TabBase/TabBase.js +1 -5
  475. package/build/module/TabBase/TabBase.js.map +1 -1
  476. package/build/module/TabBase/index.js +1 -1
  477. package/build/module/TabBase/index.js.map +1 -1
  478. package/build/module/Tabs/LegacyTabIndicator.js +98 -0
  479. package/build/module/Tabs/LegacyTabIndicator.js.map +1 -0
  480. package/build/module/Tabs/LegacyTabIndicatorProps.js +2 -0
  481. package/build/module/Tabs/LegacyTabIndicatorProps.js.map +1 -0
  482. package/build/module/Tabs/LegacyTabs.js +180 -0
  483. package/build/module/Tabs/LegacyTabs.js.map +1 -0
  484. package/build/module/Tabs/LegacyTabsProps.js +2 -0
  485. package/build/module/Tabs/LegacyTabsProps.js.map +1 -0
  486. package/build/module/Tabs/TabIndicator.js +5 -9
  487. package/build/module/Tabs/TabIndicator.js.map +1 -1
  488. package/build/module/Tabs/TabIndicatorProps.js.map +1 -1
  489. package/build/module/Tabs/Tabs.js +10 -9
  490. package/build/module/Tabs/Tabs.js.map +1 -1
  491. package/build/module/Tabs/TabsProps.js +1 -1
  492. package/build/module/Tabs/TabsProps.js.map +1 -1
  493. package/build/module/Tabs/index.js +1 -1
  494. package/build/module/Tabs/index.js.map +1 -1
  495. package/build/module/TextField/LegacyTextField.js +169 -0
  496. package/build/module/TextField/LegacyTextField.js.map +1 -0
  497. package/build/module/TextField/LegacyTextFieldProps.js +2 -0
  498. package/build/module/TextField/LegacyTextFieldProps.js.map +1 -0
  499. package/build/module/TextField/OutlinedTextField.js.map +1 -1
  500. package/build/module/TextField/TextField.js +104 -144
  501. package/build/module/TextField/TextField.js.map +1 -1
  502. package/build/module/TextField/TextFieldProps.js +2 -1
  503. package/build/module/TextField/TextFieldProps.js.map +1 -1
  504. package/build/module/TextField/index.js +1 -1
  505. package/build/module/TextField/index.js.map +1 -1
  506. package/build/module/TextField/useVariantStyleMap.js +94 -0
  507. package/build/module/TextField/useVariantStyleMap.js.map +1 -0
  508. package/build/module/Toggle/Toggle.js +90 -0
  509. package/build/module/Toggle/Toggle.js.map +1 -0
  510. package/build/module/Toggle/ToggleProps.js +2 -0
  511. package/build/module/Toggle/ToggleProps.js.map +1 -0
  512. package/build/module/Toggle/index.js +2 -0
  513. package/build/module/Toggle/index.js.map +1 -0
  514. package/build/module/Tooltip/Beaks/Beak.js +56 -0
  515. package/build/module/Tooltip/Beaks/Beak.js.map +1 -0
  516. package/build/module/Tooltip/Beaks/BeakProps.js +2 -0
  517. package/build/module/Tooltip/Beaks/BeakProps.js.map +1 -0
  518. package/build/module/Tooltip/Beaks/HorizontalLargeBeak.js +14 -0
  519. package/build/module/Tooltip/Beaks/HorizontalLargeBeak.js.map +1 -0
  520. package/build/module/Tooltip/Beaks/HorizontalSmallBeak.js +14 -0
  521. package/build/module/Tooltip/Beaks/HorizontalSmallBeak.js.map +1 -0
  522. package/build/module/Tooltip/Beaks/VerticalLargeBeak.js +14 -0
  523. package/build/module/Tooltip/Beaks/VerticalLargeBeak.js.map +1 -0
  524. package/build/module/Tooltip/Beaks/VerticalSmallBeak.js +14 -0
  525. package/build/module/Tooltip/Beaks/VerticalSmallBeak.js.map +1 -0
  526. package/build/module/Tooltip/Beaks/index.js +2 -0
  527. package/build/module/Tooltip/Beaks/index.js.map +1 -0
  528. package/build/module/Tooltip/LegacyTooltip.js +121 -0
  529. package/build/module/Tooltip/LegacyTooltip.js.map +1 -0
  530. package/build/module/Tooltip/LegacyTooltipProps.js +2 -0
  531. package/build/module/Tooltip/LegacyTooltipProps.js.map +1 -0
  532. package/build/module/Tooltip/Tooltip.js +97 -46
  533. package/build/module/Tooltip/Tooltip.js.map +1 -1
  534. package/build/module/Tooltip/TooltipProps.js +3 -1
  535. package/build/module/Tooltip/TooltipProps.js.map +1 -1
  536. package/build/module/Tooltip/index.js +1 -1
  537. package/build/module/Tooltip/index.js.map +1 -1
  538. package/build/module/Typography/LegacyTypography.js +126 -0
  539. package/build/module/Typography/LegacyTypography.js.map +1 -0
  540. package/build/module/Typography/LegacyTypographyProps.js +2 -0
  541. package/build/module/Typography/LegacyTypographyProps.js.map +1 -0
  542. package/build/module/Typography/Typography.js +15 -54
  543. package/build/module/Typography/Typography.js.map +1 -1
  544. package/build/module/Typography/TypographyProps.js +1 -1
  545. package/build/module/Typography/TypographyProps.js.map +1 -1
  546. package/build/module/Typography/index.js +1 -1
  547. package/build/module/Typography/index.js.map +1 -1
  548. package/build/module/hooks/useCollapsibleAppBar.js +14 -6
  549. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  550. package/build/module/index.js +10 -0
  551. package/build/module/index.js.map +1 -1
  552. package/build/module/internal/icons/Check.js +9 -0
  553. package/build/module/internal/icons/Check.js.map +1 -0
  554. package/build/module/internal/icons/CheckCircle.js +13 -0
  555. package/build/module/internal/icons/CheckCircle.js.map +1 -0
  556. package/build/module/internal/icons/CheckboxOn.js +9 -0
  557. package/build/module/internal/icons/CheckboxOn.js.map +1 -0
  558. package/build/module/internal/icons/Clear.js +13 -0
  559. package/build/module/internal/icons/Clear.js.map +1 -0
  560. package/build/module/internal/icons/EyeOff.js +17 -0
  561. package/build/module/internal/icons/EyeOff.js.map +1 -0
  562. package/build/module/internal/icons/EyeOn.js +13 -0
  563. package/build/module/internal/icons/EyeOn.js.map +1 -0
  564. package/build/module/internal/icons/InfoCircle.js +13 -0
  565. package/build/module/internal/icons/InfoCircle.js.map +1 -0
  566. package/build/module/internal/icons/LoadingSpinner/LoadingSpinnerProps.js +2 -0
  567. package/build/module/internal/icons/LoadingSpinner/LoadingSpinnerProps.js.map +1 -0
  568. package/build/module/internal/icons/LoadingSpinner/index.js +23 -0
  569. package/build/module/internal/icons/LoadingSpinner/index.js.map +1 -0
  570. package/build/module/internal/icons/LoadingSpinner/index.native.js +23 -0
  571. package/build/module/internal/icons/LoadingSpinner/index.native.js.map +1 -0
  572. package/build/module/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
  573. package/build/module/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
  574. package/build/module/internal/icons/LoadingSpinner/utils.js +12 -0
  575. package/build/module/internal/icons/LoadingSpinner/utils.js.map +1 -0
  576. package/build/module/internal/icons/Search.js +9 -0
  577. package/build/module/internal/icons/Search.js.map +1 -0
  578. package/build/module/internal/icons/index.js +9 -0
  579. package/build/module/internal/icons/index.js.map +1 -1
  580. package/build/module/styles/createFontStyle.js.map +1 -1
  581. package/build/module/utils/cloneElementSafely.js.map +1 -1
  582. package/build/module/utils/createSvgIcon.js +14 -3
  583. package/build/module/utils/createSvgIcon.js.map +1 -1
  584. package/build/module/utils/index.js.map +1 -1
  585. package/build/typescript/Accordion/Accordion.d.ts +1 -1
  586. package/build/typescript/Accordion/AccordionProps.d.ts +8 -1
  587. package/build/typescript/Accordion/LegacyAccordion.d.ts +3 -0
  588. package/build/typescript/Accordion/LegacyAccordionProps.d.ts +28 -0
  589. package/build/typescript/Accordion/index.d.ts +2 -2
  590. package/build/typescript/Accordion/useVariantStyleMap.d.ts +13 -0
  591. package/build/typescript/Badge/Badge.d.ts +1 -1
  592. package/build/typescript/Badge/BadgeProps.d.ts +28 -2
  593. package/build/typescript/Badge/LegacyBadge.d.ts +3 -0
  594. package/build/typescript/Badge/LegacyBadgeProps.d.ts +34 -0
  595. package/build/typescript/Badge/index.d.ts +2 -2
  596. package/build/typescript/Badge/useVariantStyleMap.d.ts +9 -0
  597. package/build/typescript/Button/ButtonProps.d.ts +18 -11
  598. package/build/typescript/Button/LegacyButton.d.ts +3 -0
  599. package/build/typescript/Button/LegacyButtonProps.d.ts +51 -0
  600. package/build/typescript/Button/index.d.ts +2 -2
  601. package/build/typescript/Button/useVariantStyleMap.d.ts +9 -0
  602. package/build/typescript/ButtonBase/ButtonBase.d.ts +0 -1
  603. package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +5 -0
  604. package/build/typescript/ButtonBase/index.d.ts +1 -1
  605. package/build/typescript/ButtonSet/ButtonSet.d.ts +3 -0
  606. package/build/typescript/ButtonSet/ButtonSetProps.d.ts +20 -0
  607. package/build/typescript/ButtonSet/index.d.ts +3 -0
  608. package/build/typescript/ButtonSet/useVariantStyleMap.d.ts +10 -0
  609. package/build/typescript/Checkbox/CheckboxProps.d.ts +10 -14
  610. package/build/typescript/Checkbox/LegacyCheckbox.d.ts +3 -0
  611. package/build/typescript/Checkbox/LegacyCheckboxProps.d.ts +36 -0
  612. package/build/typescript/Checkbox/index.d.ts +2 -2
  613. package/build/typescript/Checkbox/useVariantStyleMap.d.ts +9 -0
  614. package/build/typescript/CheckboxGroup/CheckboxGroup.d.ts +3 -0
  615. package/build/typescript/CheckboxGroup/CheckboxGroupProps.d.ts +11 -0
  616. package/build/typescript/CheckboxGroup/index.d.ts +2 -0
  617. package/build/typescript/Chip/ChipProps.d.ts +13 -6
  618. package/build/typescript/Chip/LegacyChip.d.ts +3 -0
  619. package/build/typescript/Chip/LegacyChipProps.d.ts +28 -0
  620. package/build/typescript/Chip/index.d.ts +2 -2
  621. package/build/typescript/Chip/useChipStyle.d.ts +11 -0
  622. package/build/typescript/Empty/Empty.d.ts +3 -0
  623. package/build/typescript/Empty/EmptyProps.d.ts +27 -0
  624. package/build/typescript/Empty/index.d.ts +2 -0
  625. package/build/typescript/IconButton/IconButtonProps.d.ts +7 -10
  626. package/build/typescript/IconButton/LegacyIconButton.d.ts +3 -0
  627. package/build/typescript/IconButton/LegacyIconButtonProps.d.ts +30 -0
  628. package/build/typescript/IconButton/index.d.ts +2 -2
  629. package/build/typescript/Pagination/LegacyPagination.d.ts +3 -0
  630. package/build/typescript/Pagination/LegacyPaginationProps.d.ts +71 -0
  631. package/build/typescript/Pagination/NumberPagination.d.ts +8 -0
  632. package/build/typescript/Pagination/PaginationProps.d.ts +7 -0
  633. package/build/typescript/Pagination/index.d.ts +2 -2
  634. package/build/typescript/PaginationItem/LegacyPaginationItem.d.ts +5 -0
  635. package/build/typescript/Radio/LegacyRadio.d.ts +3 -0
  636. package/build/typescript/Radio/LegacyRadioProps.d.ts +43 -0
  637. package/build/typescript/Radio/RadioProps.d.ts +9 -14
  638. package/build/typescript/Radio/index.d.ts +2 -2
  639. package/build/typescript/RadioGroup/LegacyRadioGroup.d.ts +3 -0
  640. package/build/typescript/RadioGroup/index.d.ts +1 -1
  641. package/build/typescript/ShadowView/ShadowView.d.ts +3 -0
  642. package/build/typescript/ShadowView/ShadowView.native.d.ts +3 -0
  643. package/build/typescript/ShadowView/ShadowViewProps.d.ts +11 -0
  644. package/build/typescript/ShadowView/index.d.ts +2 -0
  645. package/build/typescript/Snackbar/LegacySnackbar.d.ts +3 -0
  646. package/build/typescript/Snackbar/LegacySnackbarProps.d.ts +51 -0
  647. package/build/typescript/Snackbar/SnackbarProps.d.ts +9 -2
  648. package/build/typescript/Snackbar/index.d.ts +2 -2
  649. package/build/typescript/SnackbarContent/LegacySnackbarContent.d.ts +3 -0
  650. package/build/typescript/SnackbarContent/LegacySnackbarContentProps.d.ts +26 -0
  651. package/build/typescript/SnackbarContent/SnackbarContentProps.d.ts +5 -24
  652. package/build/typescript/SnackbarContent/StatusIcon.d.ts +7 -0
  653. package/build/typescript/SnackbarContent/index.d.ts +2 -2
  654. package/build/typescript/SvgIcon/LegacySvgIcon.d.ts +3 -0
  655. package/build/typescript/SvgIcon/LegacySvgIconProps.d.ts +35 -0
  656. package/build/typescript/SvgIcon/SvgIconProps.d.ts +17 -6
  657. package/build/typescript/SvgIcon/index.d.ts +2 -2
  658. package/build/typescript/Tab/LegacyTab.d.ts +3 -0
  659. package/build/typescript/Tab/LegacyTabProps.d.ts +58 -0
  660. package/build/typescript/Tab/TabIndicator.d.ts +2 -2
  661. package/build/typescript/Tab/TabProps.d.ts +3 -16
  662. package/build/typescript/Tab/index.d.ts +2 -2
  663. package/build/typescript/Tab/useVariantStyleMap.d.ts +10 -0
  664. package/build/typescript/TabBase/LegacyTabBase.d.ts +3 -0
  665. package/build/typescript/TabBase/index.d.ts +1 -1
  666. package/build/typescript/Tabs/LegacyTabIndicator.d.ts +3 -0
  667. package/build/typescript/Tabs/LegacyTabIndicatorProps.d.ts +28 -0
  668. package/build/typescript/Tabs/LegacyTabs.d.ts +5 -0
  669. package/build/typescript/Tabs/LegacyTabsProps.d.ts +74 -0
  670. package/build/typescript/Tabs/TabIndicatorProps.d.ts +0 -10
  671. package/build/typescript/Tabs/Tabs.d.ts +1 -1
  672. package/build/typescript/Tabs/TabsProps.d.ts +10 -10
  673. package/build/typescript/Tabs/index.d.ts +2 -2
  674. package/build/typescript/TextField/LegacyTextField.d.ts +5 -0
  675. package/build/typescript/TextField/LegacyTextFieldProps.d.ts +67 -0
  676. package/build/typescript/TextField/OutlinedTextField.d.ts +1 -1
  677. package/build/typescript/TextField/TextField.d.ts +1 -1
  678. package/build/typescript/TextField/TextFieldProps.d.ts +25 -51
  679. package/build/typescript/TextField/index.d.ts +2 -2
  680. package/build/typescript/TextField/useVariantStyleMap.d.ts +9 -0
  681. package/build/typescript/Toggle/Toggle.d.ts +3 -0
  682. package/build/typescript/Toggle/ToggleProps.d.ts +19 -0
  683. package/build/typescript/Toggle/index.d.ts +2 -0
  684. package/build/typescript/Tooltip/Beaks/Beak.d.ts +3 -0
  685. package/build/typescript/Tooltip/Beaks/BeakProps.d.ts +4 -0
  686. package/build/typescript/Tooltip/Beaks/HorizontalLargeBeak.d.ts +3 -0
  687. package/build/typescript/Tooltip/Beaks/HorizontalSmallBeak.d.ts +3 -0
  688. package/build/typescript/Tooltip/Beaks/VerticalLargeBeak.d.ts +3 -0
  689. package/build/typescript/Tooltip/Beaks/VerticalSmallBeak.d.ts +3 -0
  690. package/build/typescript/Tooltip/Beaks/index.d.ts +2 -0
  691. package/build/typescript/Tooltip/LegacyTooltip.d.ts +3 -0
  692. package/build/typescript/Tooltip/LegacyTooltipProps.d.ts +72 -0
  693. package/build/typescript/Tooltip/TooltipProps.d.ts +19 -9
  694. package/build/typescript/Tooltip/index.d.ts +2 -2
  695. package/build/typescript/Typography/LegacyTypography.d.ts +5 -0
  696. package/build/typescript/Typography/LegacyTypographyProps.d.ts +81 -0
  697. package/build/typescript/Typography/Typography.d.ts +1 -1
  698. package/build/typescript/Typography/TypographyProps.d.ts +12 -9
  699. package/build/typescript/Typography/index.d.ts +2 -2
  700. package/build/typescript/hooks/useCollapsibleAppBar.d.ts +1 -0
  701. package/build/typescript/index.d.ts +10 -0
  702. package/build/typescript/internal/icons/Check.d.ts +8 -0
  703. package/build/typescript/internal/icons/CheckCircle.d.ts +8 -0
  704. package/build/typescript/internal/icons/Checkbox.d.ts +2 -124
  705. package/build/typescript/internal/icons/CheckboxChecked.d.ts +2 -124
  706. package/build/typescript/internal/icons/CheckboxOn.d.ts +8 -0
  707. package/build/typescript/internal/icons/ChevronDown.d.ts +2 -124
  708. package/build/typescript/internal/icons/ChevronLeft.d.ts +2 -124
  709. package/build/typescript/internal/icons/ChevronRight.d.ts +2 -124
  710. package/build/typescript/internal/icons/Clear.d.ts +8 -0
  711. package/build/typescript/internal/icons/Close.d.ts +2 -124
  712. package/build/typescript/internal/icons/EyeOff.d.ts +8 -0
  713. package/build/typescript/internal/icons/EyeOn.d.ts +8 -0
  714. package/build/typescript/internal/icons/InfoCircle.d.ts +8 -0
  715. package/build/typescript/internal/icons/LoadingSpinner/LoadingSpinnerProps.d.ts +9 -0
  716. package/build/typescript/internal/icons/LoadingSpinner/index.d.ts +3 -0
  717. package/build/typescript/internal/icons/LoadingSpinner/index.native.d.ts +3 -0
  718. package/build/typescript/internal/icons/LoadingSpinner/utils.d.ts +3 -0
  719. package/build/typescript/internal/icons/Radio.d.ts +2 -124
  720. package/build/typescript/internal/icons/RadioChecked.d.ts +2 -124
  721. package/build/typescript/internal/icons/Search.d.ts +8 -0
  722. package/build/typescript/internal/icons/index.d.ts +9 -0
  723. package/build/typescript/styles/createFontStyle.d.ts +1 -1
  724. package/build/typescript/utils/cloneElementSafely.d.ts +1 -2
  725. package/build/typescript/utils/createSvgIcon.d.ts +8 -3
  726. package/build/typescript/utils/index.d.ts +1 -0
  727. package/package.json +2 -2
  728. package/src/Accordion/Accordion.tsx +75 -72
  729. package/src/Accordion/AccordionProps.ts +11 -2
  730. package/src/Accordion/LegacyAccordion.tsx +188 -0
  731. package/src/Accordion/LegacyAccordionProps.ts +34 -0
  732. package/src/Accordion/index.ts +2 -2
  733. package/src/Accordion/useVariantStyleMap.ts +127 -0
  734. package/src/Badge/Badge.tsx +23 -29
  735. package/src/Badge/BadgeProps.ts +35 -2
  736. package/src/Badge/LegacyBadge.tsx +66 -0
  737. package/src/Badge/LegacyBadgeProps.ts +40 -0
  738. package/src/Badge/index.ts +2 -2
  739. package/src/Badge/useVariantStyleMap.ts +73 -0
  740. package/src/Button/Button.tsx +113 -81
  741. package/src/Button/ButtonProps.ts +37 -12
  742. package/src/Button/LegacyButton.tsx +157 -0
  743. package/src/Button/LegacyButtonProps.ts +62 -0
  744. package/src/Button/index.ts +2 -2
  745. package/src/Button/useVariantStyleMap.ts +178 -0
  746. package/src/ButtonBase/ButtonBase.tsx +4 -10
  747. package/src/ButtonBase/LegacyButtonBase.tsx +135 -0
  748. package/src/ButtonBase/index.ts +2 -2
  749. package/src/ButtonSet/ButtonSet.tsx +43 -0
  750. package/src/ButtonSet/ButtonSetProps.ts +27 -0
  751. package/src/ButtonSet/index.ts +3 -0
  752. package/src/ButtonSet/useVariantStyleMap.ts +84 -0
  753. package/src/Checkbox/Checkbox.tsx +48 -33
  754. package/src/Checkbox/CheckboxProps.ts +10 -15
  755. package/src/Checkbox/LegacyCheckbox.tsx +62 -0
  756. package/src/Checkbox/LegacyCheckboxProps.ts +42 -0
  757. package/src/Checkbox/index.ts +2 -2
  758. package/src/Checkbox/useVariantStyleMap.ts +71 -0
  759. package/src/CheckboxGroup/CheckboxGroup.tsx +47 -0
  760. package/src/CheckboxGroup/CheckboxGroupProps.ts +11 -0
  761. package/src/CheckboxGroup/index.ts +2 -0
  762. package/src/Chip/Chip.tsx +26 -82
  763. package/src/Chip/ChipProps.ts +16 -7
  764. package/src/Chip/LegacyChip.tsx +116 -0
  765. package/src/Chip/LegacyChipProps.ts +33 -0
  766. package/src/Chip/index.ts +2 -2
  767. package/src/Chip/useChipStyle.ts +123 -0
  768. package/src/Empty/Empty.tsx +108 -0
  769. package/src/Empty/EmptyProps.ts +31 -0
  770. package/src/Empty/index.ts +2 -0
  771. package/src/IconButton/IconButton.tsx +36 -54
  772. package/src/IconButton/IconButtonProps.ts +12 -12
  773. package/src/IconButton/LegacyIconButton.tsx +97 -0
  774. package/src/IconButton/LegacyIconButtonProps.ts +36 -0
  775. package/src/IconButton/index.ts +2 -2
  776. package/src/Pagination/LegacyPagination.tsx +168 -0
  777. package/src/Pagination/LegacyPaginationProps.ts +85 -0
  778. package/src/Pagination/NumberPagination.tsx +78 -0
  779. package/src/Pagination/Pagination.tsx +15 -5
  780. package/src/Pagination/PaginationProps.ts +9 -0
  781. package/src/Pagination/index.ts +2 -2
  782. package/src/PaginationItem/LegacyPaginationItem.tsx +52 -0
  783. package/src/PaginationItem/PaginationItem.tsx +2 -2
  784. package/src/Radio/LegacyRadio.tsx +72 -0
  785. package/src/Radio/LegacyRadioProps.ts +50 -0
  786. package/src/Radio/Radio.tsx +47 -16
  787. package/src/Radio/RadioProps.ts +10 -16
  788. package/src/Radio/index.ts +2 -2
  789. package/src/RadioGroup/LegacyRadioGroup.tsx +20 -0
  790. package/src/RadioGroup/RadioGroup.tsx +31 -4
  791. package/src/RadioGroup/index.ts +2 -2
  792. package/src/ShadowView/ShadowView.native.tsx +37 -0
  793. package/src/ShadowView/ShadowView.tsx +33 -0
  794. package/src/ShadowView/ShadowViewProps.ts +11 -0
  795. package/src/ShadowView/index.ts +2 -0
  796. package/src/Snackbar/LegacySnackbar.tsx +130 -0
  797. package/src/Snackbar/LegacySnackbarProps.ts +61 -0
  798. package/src/Snackbar/Snackbar.tsx +7 -5
  799. package/src/Snackbar/SnackbarProps.ts +11 -3
  800. package/src/Snackbar/index.ts +2 -2
  801. package/src/SnackbarContent/LegacySnackbarContent.tsx +129 -0
  802. package/src/SnackbarContent/LegacySnackbarContentProps.ts +30 -0
  803. package/src/SnackbarContent/SnackbarContent.tsx +53 -48
  804. package/src/SnackbarContent/SnackbarContentProps.ts +10 -27
  805. package/src/SnackbarContent/StatusIcon.tsx +37 -0
  806. package/src/SnackbarContent/index.ts +2 -2
  807. package/src/SvgIcon/LegacySvgIcon.tsx +36 -0
  808. package/src/SvgIcon/LegacySvgIconProps.ts +41 -0
  809. package/src/SvgIcon/SvgIcon.tsx +19 -5
  810. package/src/SvgIcon/SvgIconProps.ts +33 -6
  811. package/src/SvgIcon/index.ts +2 -2
  812. package/src/Tab/LegacyTab.tsx +141 -0
  813. package/src/Tab/LegacyTabProps.ts +68 -0
  814. package/src/Tab/Tab.tsx +36 -79
  815. package/src/Tab/TabIndicator.tsx +5 -2
  816. package/src/Tab/TabProps.ts +3 -18
  817. package/src/Tab/index.ts +2 -2
  818. package/src/Tab/useVariantStyleMap.ts +86 -0
  819. package/src/TabBase/LegacyTabBase.tsx +55 -0
  820. package/src/TabBase/TabBase.tsx +0 -5
  821. package/src/TabBase/index.ts +2 -2
  822. package/src/Tabs/LegacyTabIndicator.tsx +111 -0
  823. package/src/Tabs/LegacyTabIndicatorProps.ts +33 -0
  824. package/src/Tabs/LegacyTabs.tsx +225 -0
  825. package/src/Tabs/LegacyTabsProps.ts +87 -0
  826. package/src/Tabs/TabIndicator.tsx +6 -12
  827. package/src/Tabs/TabIndicatorProps.ts +0 -13
  828. package/src/Tabs/Tabs.tsx +12 -8
  829. package/src/Tabs/TabsProps.ts +12 -11
  830. package/src/Tabs/index.ts +2 -2
  831. package/src/TextField/LegacyTextField.tsx +168 -0
  832. package/src/TextField/LegacyTextFieldProps.ts +80 -0
  833. package/src/TextField/OutlinedTextField.tsx +1 -1
  834. package/src/TextField/TextField.tsx +155 -137
  835. package/src/TextField/TextFieldProps.ts +27 -57
  836. package/src/TextField/index.tsx +2 -2
  837. package/src/TextField/useVariantStyleMap.ts +100 -0
  838. package/src/Toggle/Toggle.tsx +113 -0
  839. package/src/Toggle/ToggleProps.ts +21 -0
  840. package/src/Toggle/index.ts +2 -0
  841. package/src/Tooltip/Beaks/Beak.tsx +53 -0
  842. package/src/Tooltip/Beaks/BeakProps.ts +4 -0
  843. package/src/Tooltip/Beaks/HorizontalLargeBeak.tsx +18 -0
  844. package/src/Tooltip/Beaks/HorizontalSmallBeak.tsx +18 -0
  845. package/src/Tooltip/Beaks/VerticalLargeBeak.tsx +18 -0
  846. package/src/Tooltip/Beaks/VerticalSmallBeak.tsx +18 -0
  847. package/src/Tooltip/Beaks/index.ts +2 -0
  848. package/src/Tooltip/LegacyTooltip.tsx +167 -0
  849. package/src/Tooltip/LegacyTooltipProps.ts +86 -0
  850. package/src/Tooltip/Tooltip.tsx +114 -66
  851. package/src/Tooltip/TooltipProps.ts +28 -10
  852. package/src/Tooltip/index.ts +2 -2
  853. package/src/Typography/LegacyTypography.tsx +107 -0
  854. package/src/Typography/LegacyTypographyProps.ts +122 -0
  855. package/src/Typography/Typography.tsx +24 -30
  856. package/src/Typography/TypographyProps.ts +29 -34
  857. package/src/Typography/index.ts +2 -2
  858. package/src/hooks/useCollapsibleAppBar.ts +14 -5
  859. package/src/index.ts +15 -0
  860. package/src/internal/icons/Check.tsx +13 -0
  861. package/src/internal/icons/CheckCircle.tsx +20 -0
  862. package/src/internal/icons/CheckboxOn.tsx +13 -0
  863. package/src/internal/icons/Clear.tsx +20 -0
  864. package/src/internal/icons/EyeOff.tsx +25 -0
  865. package/src/internal/icons/EyeOn.tsx +20 -0
  866. package/src/internal/icons/InfoCircle.tsx +21 -0
  867. package/src/internal/icons/LoadingSpinner/LoadingSpinnerProps.ts +11 -0
  868. package/src/internal/icons/LoadingSpinner/index.native.tsx +31 -0
  869. package/src/internal/icons/LoadingSpinner/index.tsx +31 -0
  870. package/src/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
  871. package/src/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
  872. package/src/internal/icons/LoadingSpinner/utils.ts +14 -0
  873. package/src/internal/icons/Search.tsx +15 -0
  874. package/src/internal/icons/index.ts +9 -0
  875. package/src/styles/createFontStyle.ts +1 -1
  876. package/src/utils/cloneElementSafely.ts +1 -1
  877. package/src/utils/createSvgIcon.tsx +29 -6
  878. package/src/utils/index.ts +1 -0
@@ -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
@@ -1 +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":["Tooltip.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Platform, Text, View, ViewProps } from 'react-native';\nimport type { WithTimingConfig } from 'react-native-reanimated';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport { 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 './TooltipProps';\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 children={title}\n // TODO: Should we provide text prop customization?\n numberOfLines={numberOfTitleLines}\n style={textStyle}\n />\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":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,QAAT,EAAmBC,IAAnB,EAAyBC,IAAzB,QAAgD,cAAhD;AAEA,OAAOC,QAAP,IAAmBC,gBAAnB,EAAqCC,cAArC,EAAqDC,UAArD,QAAuE,yBAAvE;AACA,SAASC,GAAT,QAAoB,oBAApB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,mBAAnC;AAEA,OAAOC,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W;MACjB,IAAIA,KAAK,CAACC,WAAN,CAAkBjD,MAAlB,CAAyBrB,MAAzB,KAAoC,CAAxC,EAA2C;QACvC;MACH;;MAEDsB,SAAS,CAAC+C,KAAK,CAACC,WAAN,CAAkBjD,MAAnB,CAAT;IACH,CAPL;IAQI,KAAK,EAAE,CACHG,aADG,EAEHU,kBAFG,EAGHjB,YAHG;EARX,GAcKL,SAAS,KAAK,KAAd,gBACG,oBAAC,KAAD,CAAO,QAAP,QACKuD,UADL,EAEKC,SAFL,CADH,gBAMG,oBAAC,KAAD,CAAO,QAAP,QACKA,SADL,EAEKD,UAFL,CApBR,CAHJ,CADJ;AAgCH;AAAA"}
1
+ {"version":3,"names":["React","useEffect","useState","Platform","Text","View","Animated","useAnimatedStyle","useSharedValue","withTiming","typographyOf","ButtonBase","createFontStyle","css","useTheme","Beak","DEFAULT_BEAK_LAYOUT","offset","placement","INITIAL_LAYOUT","width","height","x","y","ANIMATION_CONFIG","duration","getFlexDirection","useStyles","theme","root","position","zIndex","tooltip","content","backgroundColor","palette","fill","base","paddingHorizontal","spacing","paddingVertical","small","borderRadius","shape","radius","sm","large","paddingBottom","paddingTop","Tooltip","props","beakLayout","children","initialLayout","left","onClose","right","numberOfTitleLines","size","style","title","tooltipStyle","verticalOffset","visible","beakOffset","beakPlacement","styles","layout","setLayout","scale","animatedStyle","transform","value","flexDirection","isVerticalPlacement","totalOffset","tooltipLayoutStyle","alignItems","undefined","overflow","select","web","display","default","contentStyle","flexGrow","flexShrink","nextScaleValue","fontStyle","selector","typo","fontSize","lineHeight","fontFamily","letterSpacing","caption3","regular","color","text","strongInverse","textStyle","beakStyle","translateX","translateY","buttonElem","beakElem","event","nativeEvent"],"sources":["Tooltip.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Platform, Text, View, ViewProps } from 'react-native';\nimport type { WithTimingConfig } from 'react-native-reanimated';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type TooltipProps from './TooltipProps';\nimport type { TooltipBeakLayout, TooltipPlacement, TooltipSize } from './TooltipProps';\nimport Beak from './Beaks';\n\nconst DEFAULT_BEAK_LAYOUT: TooltipBeakLayout = {\n offset: 0,\n placement: 'middle',\n};\n\nconst INITIAL_LAYOUT = { width: 0, height: 0, x: 0, y: 0 };\n\nconst ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 150 };\n\ntype FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';\n\nconst getFlexDirection = (placement: TooltipPlacement): FlexDirection => {\n switch (placement) {\n case 'right':\n return 'row-reverse';\n case 'bottom':\n return 'column-reverse';\n case 'left':\n return 'row';\n case 'top':\n default:\n return 'column';\n }\n};\n\ntype TooltipStyles = NamedStylesStringUnion<'root' | 'content' | 'small' | 'large'>;\n\nconst useStyles: UseStyles<TooltipStyles> = function (): TooltipStyles {\n const theme = useTheme();\n\n return {\n root: {\n position: 'absolute',\n zIndex: theme.zIndex.tooltip,\n },\n content: {\n backgroundColor: theme.palette.fill.base,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n small: {\n borderRadius: theme.shape.radius.sm,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n large: {\n borderRadius: 5,\n paddingBottom: theme.spacing(2.5),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n };\n};\n\nexport default function Tooltip(props: TooltipProps) {\n const {\n beakLayout = DEFAULT_BEAK_LAYOUT,\n children,\n initialLayout = INITIAL_LAYOUT,\n left,\n onClose,\n placement = 'top' as TooltipPlacement,\n right,\n numberOfTitleLines = 1,\n size = 'small' as TooltipSize,\n style,\n title,\n tooltipStyle,\n verticalOffset = 4,\n visible = false,\n } = props;\n\n const {\n offset: beakOffset,\n placement: beakPlacement,\n } = beakLayout;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const [layout, setLayout] = useState(initialLayout);\n\n const scale = useSharedValue(0);\n\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }), []);\n\n const flexDirection = getFlexDirection(placement);\n\n const isVerticalPlacement = placement === 'top' || placement === 'bottom';\n\n const totalOffset = -((isVerticalPlacement ? layout.height : layout.width) + verticalOffset);\n const tooltipLayoutStyle: ViewProps['style'] = {\n alignItems: beakPlacement === 'start'\n ? 'flex-start'\n : beakPlacement === 'end'\n ? 'flex-end'\n : 'center',\n flexDirection,\n left,\n right,\n height: visible ? undefined : 0,\n overflow: visible ? undefined : 'hidden',\n ...Platform.select({\n web: {\n display: visible ? 'flex' : 'none',\n },\n default: {},\n }),\n [placement]: totalOffset,\n };\n\n const contentStyle = css([\n styles.content,\n styles[size],\n isVerticalPlacement\n ? { width: '100%' }\n : { flexGrow: 1, flexShrink: 1 },\n ]);\n\n useEffect(() => {\n const nextScaleValue = visible ? 1 : 0;\n\n scale.value = withTiming(nextScaleValue, ANIMATION_CONFIG);\n }, [visible]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => size === 'large'\n ? typographyOf({\n fontSize: 13,\n lineHeight: 19.5,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n })\n // TODO: change caption2.\n : typo.caption3.regular,\n color: theme.palette.text.strongInverse,\n });\n\n const textStyle = css([\n fontStyle,\n { flexShrink: 1 },\n ]);\n\n const beakStyle = css({\n transform: [isVerticalPlacement ? { translateX: beakOffset } : { translateY: beakOffset }],\n });\n\n const buttonElem = (\n <ButtonBase\n pressEffect={'none'}\n onPress={onClose}\n style={contentStyle}\n >\n <Text\n // TODO: Should we provide text prop customization?\n numberOfLines={numberOfTitleLines}\n style={textStyle}\n >\n {title}\n </Text>\n </ButtonBase>\n );\n\n const beakElem = (\n <View style={beakStyle}>\n <Beak\n fill={theme.palette.fill.base}\n placement={placement}\n size={size}\n />\n </View>\n );\n\n return (\n <View style={style}>\n {children}\n\n <Animated.View\n onLayout={(event) => {\n if (event.nativeEvent.layout.height === 0) {\n return;\n }\n\n setLayout(event.nativeEvent.layout);\n }}\n style={[\n styles.root,\n animatedStyle,\n tooltipLayoutStyle,\n tooltipStyle,\n ]}\n >\n {buttonElem}\n\n {beakElem}\n </Animated.View>\n </View>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,QAAT,EAAmBC,IAAnB,EAAyBC,IAAzB,QAAgD,cAAhD;AAEA,OAAOC,QAAP,IAAmBC,gBAAnB,EAAqCC,cAArC,EAAqDC,UAArD,QAAuE,yBAAvE;AAEA,SAASC,YAAT,QAA6B,qBAA7B;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AAGA,OAAOC,IAAP,MAAiB,SAAjB;AAEA,MAAMC,mBAAsC,GAAG;EAC3CC,MAAM,EAAE,CADmC;EAE3CC,SAAS,EAAE;AAFgC,CAA/C;AAKA,MAAMC,cAAc,GAAG;EAAEC,KAAK,EAAE,CAAT;EAAYC,MAAM,EAAE,CAApB;EAAuBC,CAAC,EAAE,CAA1B;EAA6BC,CAAC,EAAE;AAAhC,CAAvB;AAEA,MAAMC,gBAA4C,GAAG;EAAEC,QAAQ,EAAE;AAAZ,CAArD;;AAIA,MAAMC,gBAAgB,GAAIR,SAAD,IAAgD;EACrE,QAAQA,SAAR;IACI,KAAK,OAAL;MACI,OAAO,aAAP;;IACJ,KAAK,QAAL;MACI,OAAO,gBAAP;;IACJ,KAAK,MAAL;MACI,OAAO,KAAP;;IACJ,KAAK,KAAL;IACA;MACI,OAAO,QAAP;EATR;AAWH,CAZD;;AAgBA,MAAMS,SAAmC,GAAG,YAA2B;EACnE,MAAMC,KAAK,GAAGd,QAAQ,EAAtB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oBAAC,IAAD;IAAM,KAAK,EAAEJ;EAAb,gBACI,oBAAC,IAAD;IACI,IAAI,EAAEzE,KAAK,CAACO,OAAN,CAAcC,IAAd,CAAmBC,IAD7B;IAEI,SAAS,EAAEnB,SAFf;IAGI,IAAI,EAAEwC;EAHV,EADJ,CADJ;EAUA,oBACI,oBAAC,IAAD;IAAM,KAAK,EAAEC;EAAb,GACKP,QADL,eAGI,oBAAC,QAAD,CAAU,IAAV;IACI,QAAQ,EAAGsD,KAAD,IAAW;MACjB,IAAIA,KAAK,CAACC,WAAN,CAAkBxC,MAAlB,CAAyB9C,MAAzB,KAAoC,CAAxC,EAA2C;QACvC;MACH;;MAED+C,SAAS,CAACsC,KAAK,CAACC,WAAN,CAAkBxC,MAAnB,CAAT;IACH,CAPL;IAQI,KAAK,EAAE,CACHD,MAAM,CAACrC,IADJ,EAEHyC,aAFG,EAGHM,kBAHG,EAIHf,YAJG;EARX,GAeK2C,UAfL,EAiBKC,QAjBL,CAHJ,CADJ;AAyBH;AAAA"}
@@ -1,2 +1,4 @@
1
-
1
+ export const tooltipPlacements = ['top', 'bottom', 'left', 'right'];
2
+ export const tooltipSizes = ['small', 'large'];
3
+ export const tooltipBeakPlacements = ['start', 'middle', 'end'];
2
4
  //# sourceMappingURL=TooltipProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["TooltipProps.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 = { height: number, width: number, x: number, y: number };\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
+ {"version":3,"names":["tooltipPlacements","tooltipSizes","tooltipBeakPlacements"],"sources":["TooltipProps.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 const tooltipPlacements = ['top', 'bottom', 'left', 'right'] as const;\nexport type TooltipPlacement = typeof tooltipPlacements[number];\n\nexport const tooltipSizes = ['small', 'large'] as const;\nexport type TooltipSize = typeof tooltipSizes[number];\n\nexport const tooltipBeakPlacements = ['start', 'middle', 'end'] as const;\nexport type TooltipBeakPlacement = typeof tooltipBeakPlacements[number];\n\nexport type TooltipBeakLayout = {\n placement: TooltipBeakPlacement;\n offset: number;\n};\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 beak layout.\n * If 'undefined', the beak will be centered on tooltip.\n */\n beakLayout?: TooltipBeakLayout;\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 /**\n * Determines the size of the tooltip.\n * @default 'small'\n */\n size?: TooltipSize;\n}> {}\n"],"mappings":"AAKA,OAAO,MAAMA,iBAAiB,GAAG,CAAC,KAAD,EAAQ,QAAR,EAAkB,MAAlB,EAA0B,OAA1B,CAA1B;AAGP,OAAO,MAAMC,YAAY,GAAG,CAAC,OAAD,EAAU,OAAV,CAArB;AAGP,OAAO,MAAMC,qBAAqB,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,KAApB,CAA9B"}
@@ -1,2 +1,2 @@
1
- export { default } from './Tooltip';
1
+ export { default } from './LegacyTooltip';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './Tooltip';\nexport type { default as TooltipProps } from './TooltipProps';"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB"}
1
+ {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyTooltip';\nexport type { default as TooltipProps } from './LegacyTooltipProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB"}
@@ -0,0 +1,126 @@
1
+ import React from 'react';
2
+ import { Platform, Text } from 'react-native';
3
+ import { createFontStyle, css, StyleSheet, useTheme } from '../styles';
4
+ const accessibilityMap = {
5
+ h1: {
6
+ accessibilityRole: 'header',
7
+ 'area-level': 1
8
+ },
9
+ h2: {
10
+ accessibilityRole: 'header',
11
+ 'area-level': 2
12
+ },
13
+ h3: {
14
+ accessibilityRole: 'header',
15
+ 'area-level': 3
16
+ },
17
+ subtitle1: {
18
+ accessibilityRole: 'header',
19
+ 'area-level': 6
20
+ },
21
+ subtitle2: {
22
+ accessibilityRole: 'header',
23
+ 'area-level': 6
24
+ },
25
+ body1: {
26
+ accessibilityRole: 'text'
27
+ },
28
+ body2: {
29
+ accessibilityRole: 'text'
30
+ },
31
+ caption1: {
32
+ accessibilityRole: 'text'
33
+ },
34
+ caption2: {
35
+ accessibilityRole: 'text'
36
+ },
37
+ flag: {
38
+ accessibilityRole: 'text'
39
+ }
40
+ };
41
+
42
+ function selectColor(theme, colorProp) {
43
+ var _theme$palette$colorP;
44
+
45
+ const palette = theme.palette.text;
46
+
47
+ switch (colorProp) {
48
+ case 'inherit':
49
+ return Platform.OS === 'web' ? 'inherit' : undefined;
50
+
51
+ case 'textPrimary':
52
+ return palette.primary;
53
+
54
+ case 'textSecondary':
55
+ return palette.secondary;
56
+
57
+ case 'textAccent':
58
+ return palette.accent;
59
+
60
+ case 'textHint':
61
+ return palette.hint;
62
+ }
63
+
64
+ return (_theme$palette$colorP = theme.palette[colorProp]) === null || _theme$palette$colorP === void 0 ? void 0 : _theme$palette$colorP.main;
65
+ }
66
+
67
+ const styles = StyleSheet.create({
68
+ root: {
69
+ flexShrink: 1,
70
+ ...(Platform.OS === 'web' ? {
71
+ maxWidth: '100%'
72
+ } : {})
73
+ }
74
+ });
75
+ const Typography = /*#__PURE__*/React.forwardRef(function Typography(props, ref) {
76
+ const {
77
+ accessibilityRole,
78
+ align = 'inherit',
79
+ ariaLevel,
80
+ disableFontScaling = false,
81
+ children,
82
+ color: colorProp = 'inherit',
83
+ ellipsizeMode = 'tail',
84
+ href,
85
+ numberOfLines,
86
+ onPress,
87
+ selectable,
88
+ style,
89
+ variant = 'body1',
90
+ onLayout,
91
+ onTextLayout
92
+ } = props;
93
+ const theme = useTheme();
94
+ const fontStyle = createFontStyle(theme, {
95
+ selector: typography => typography[variant],
96
+ color: selectColor(theme, colorProp)
97
+ }); // To prevent white-space: pre, word-wrap:break-word style conflicting issue at safari browser.
98
+
99
+ const textWrapStyle = numberOfLines && numberOfLines > 0 && Platform.OS === 'web' ? {
100
+ wordWrap: 'normal'
101
+ } : {};
102
+ const textStyle = css([styles.root, {
103
+ textAlign: align === 'inherit' ? 'auto' : align
104
+ }, textWrapStyle, fontStyle, style]);
105
+ const accessibility = accessibilityMap[variant];
106
+ const variantRole = href !== undefined ? 'link' : accessibility === null || accessibility === void 0 ? void 0 : accessibility.accessibilityRole;
107
+ const variantLevel = accessibility === null || accessibility === void 0 ? void 0 : accessibility['area-level'];
108
+ return /*#__PURE__*/React.createElement(Text, {
109
+ ref: ref,
110
+ accessibilityRole: accessibilityRole || variantRole,
111
+ allowFontScaling: !disableFontScaling,
112
+ "aria-level": ariaLevel || variantLevel,
113
+ children: children,
114
+ ellipsizeMode: ellipsizeMode // @ts-ignore
115
+ ,
116
+ href: href,
117
+ numberOfLines: numberOfLines,
118
+ onPress: onPress,
119
+ selectable: selectable,
120
+ style: textStyle,
121
+ onLayout: onLayout,
122
+ onTextLayout: onTextLayout
123
+ });
124
+ });
125
+ export default /*#__PURE__*/React.memo(Typography);
126
+ //# sourceMappingURL=LegacyTypography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Platform","Text","createFontStyle","css","StyleSheet","useTheme","accessibilityMap","h1","accessibilityRole","h2","h3","subtitle1","subtitle2","body1","body2","caption1","caption2","flag","selectColor","theme","colorProp","palette","text","OS","undefined","primary","secondary","accent","hint","main","styles","create","root","flexShrink","maxWidth","Typography","forwardRef","props","ref","align","ariaLevel","disableFontScaling","children","color","ellipsizeMode","href","numberOfLines","onPress","selectable","style","variant","onLayout","onTextLayout","fontStyle","selector","typography","textWrapStyle","wordWrap","textStyle","textAlign","accessibility","variantRole","variantLevel","memo"],"sources":["LegacyTypography.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, TextStyle } from 'react-native';\nimport type { Theme } from '@fountain-ui/styles';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport TypographyProps, { AccessibilityMap, TypographyColor } from './LegacyTypographyProps';\n\nconst accessibilityMap: AccessibilityMap = {\n h1: { accessibilityRole: 'header', 'area-level': 1 },\n h2: { accessibilityRole: 'header', 'area-level': 2 },\n h3: { accessibilityRole: 'header', 'area-level': 3 },\n subtitle1: { accessibilityRole: 'header', 'area-level': 6 },\n subtitle2: { accessibilityRole: 'header', 'area-level': 6 },\n body1: { accessibilityRole: 'text' },\n body2: { accessibilityRole: 'text' },\n caption1: { accessibilityRole: 'text' },\n caption2: { accessibilityRole: 'text' },\n flag: { accessibilityRole: 'text' },\n};\n\nfunction selectColor(theme: Theme, colorProp: TypographyColor): string | undefined {\n const palette = theme.palette.text;\n\n switch (colorProp) {\n case 'inherit':\n return Platform.OS === 'web' ? 'inherit' : undefined;\n case 'textPrimary':\n return palette.primary;\n case 'textSecondary':\n return palette.secondary;\n case 'textAccent':\n return palette.accent;\n case 'textHint':\n return palette.hint;\n }\n\n return theme.palette[colorProp]?.main;\n}\n\nconst styles = StyleSheet.create({\n root: {\n flexShrink: 1,\n ...(Platform.OS === 'web' ? { maxWidth: '100%' } : {}),\n },\n});\n\nconst Typography = React.forwardRef<Text, TypographyProps>(function Typography(props, ref) {\n const {\n accessibilityRole,\n align = 'inherit',\n ariaLevel,\n disableFontScaling = false,\n children,\n color: colorProp = 'inherit',\n ellipsizeMode = 'tail',\n href,\n numberOfLines,\n onPress,\n selectable,\n style,\n variant = 'body1',\n onLayout,\n onTextLayout,\n } = props;\n\n const theme = useTheme();\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography[variant],\n color: selectColor(theme, colorProp),\n });\n\n // To prevent white-space: pre, word-wrap:break-word style conflicting issue at safari browser.\n const textWrapStyle = numberOfLines && numberOfLines > 0 && Platform.OS === 'web' ? { wordWrap: 'normal' } : {};\n\n const textStyle = css([\n styles.root,\n { textAlign: align === 'inherit' ? 'auto' : align },\n textWrapStyle as TextStyle,\n fontStyle,\n style,\n ]);\n\n const accessibility = accessibilityMap[variant];\n const variantRole = href !== undefined ? 'link' : accessibility?.accessibilityRole;\n const variantLevel = accessibility?.['area-level'];\n\n return (\n <Text\n ref={ref}\n accessibilityRole={accessibilityRole || variantRole}\n allowFontScaling={!disableFontScaling}\n aria-level={ariaLevel || variantLevel}\n children={children}\n ellipsizeMode={ellipsizeMode}\n // @ts-ignore\n href={href}\n numberOfLines={numberOfLines}\n onPress={onPress}\n selectable={selectable}\n style={textStyle}\n onLayout={onLayout}\n onTextLayout={onTextLayout}\n />\n );\n});\n\nexport default React.memo(Typography);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,IAAnB,QAA0C,cAA1C;AAEA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,UAA/B,EAA2CC,QAA3C,QAA2D,WAA3D;AAGA,MAAMC,gBAAkC,GAAG;EACvCC,EAAE,EAAE;IAAEC,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CADmC;EAEvCC,EAAE,EAAE;IAAED,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CAFmC;EAGvCE,EAAE,EAAE;IAAEF,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CAHmC;EAIvCG,SAAS,EAAE;IAAEH,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CAJ4B;EAKvCI,SAAS,EAAE;IAAEJ,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CAL4B;EAMvCK,KAAK,EAAE;IAAEL,iBAAiB,EAAE;EAArB,CANgC;EAOvCM,KAAK,EAAE;IAAEN,iBAAiB,EAAE;EAArB,CAPgC;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EC,IARV;IASI,aAAa,EAAEC,aATnB;IAUI,OAAO,EAAEC,OAVb;IAWI,UAAU,EAAEC,UAXhB;IAYI,KAAK,EAAEU,SAZX;IAaI,QAAQ,EAAEP,QAbd;IAcI,YAAY,EAAEC;EAdlB,EADJ;AAkBH,CA3DkB,CAAnB;AA6DA,4BAAerD,KAAK,CAACgE,IAAN,CAAW5B,UAAX,CAAf"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=LegacyTypographyProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["LegacyTypographyProps.ts"],"sourcesContent":["import React from 'react';\nimport type { AccessibilityProps, TextProps } from 'react-native';\nimport type { ComponentProps } from '../types';\n\nexport type TypographyAlign = 'inherit' | 'left' | 'center' | 'right' | 'justify';\n\nexport type TypographyColor =\n | 'inherit'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'warning'\n | 'error'\n | 'accent'\n | 'textPrimary'\n | 'textSecondary'\n | 'textAccent'\n | 'textHint';\n\nexport type TypographyVariant =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'subtitle1'\n | 'subtitle2'\n | 'body1'\n | 'body2'\n | 'caption1'\n | 'caption2'\n | 'flag'\n | 'button1'\n | 'button2';\n\nexport interface Accessibility {\n accessibilityRole: AccessibilityProps['accessibilityRole'];\n 'area-level'?: number;\n}\n\nexport interface AccessibilityMap extends Partial<{\n [key: string]: Accessibility;\n}> {}\n\nexport default interface TypographyProps extends ComponentProps<{\n /**\n * Applies HTML tag at web and communicates purpose of component at app\n */\n accessibilityRole?: AccessibilityProps['accessibilityRole'];\n\n /**\n * Set the text-align on the component.\n * The value 'justify' is not supported on Android and fallbacks to left.\n * @default 'inherit'\n */\n align?: TypographyAlign;\n\n /**\n * Applies HTML heading level\n */\n ariaLevel?: number;\n\n /**\n * Specifies whether fonts should scale to respect Text Size accessibility settings.\n * @default false\n */\n disableFontScaling?: boolean;\n\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'inherit'\n */\n color?: TypographyColor;\n\n /**\n * The text ellipsis mode.\n * @default 'tail'\n */\n ellipsizeMode?: TextProps['ellipsizeMode'];\n\n /**\n * Internal use only. The hyperlink of the text.\n */\n href?: string;\n\n /**\n * Used to truncate the text with an ellipsis after computing the text\n * layout, including line wrapping, such that the total number of lines\n * does not exceed this number.\n */\n numberOfLines?: TextProps['numberOfLines'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n onPress?: TextProps['onPress'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n selectable?: boolean;\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant?: TypographyVariant;\n\n\n /**\n * Callback that is called when the text layout has been calculated.\n */\n onTextLayout?: TextProps['onTextLayout'];\n\n /**\n * Callback that is called when the layout of the Text component changes.\n */\n onLayout?: TextProps['onLayout'];\n}> {}\n"],"mappings":""}
@@ -1,67 +1,27 @@
1
1
  import React from 'react';
2
2
  import { Platform, Text } from 'react-native';
3
3
  import { createFontStyle, css, StyleSheet, useTheme } from '../styles';
4
- const accessibilityMap = {
5
- h1: {
6
- accessibilityRole: 'header',
7
- 'area-level': 1
8
- },
9
- h2: {
10
- accessibilityRole: 'header',
11
- 'area-level': 2
12
- },
13
- h3: {
14
- accessibilityRole: 'header',
15
- 'area-level': 3
16
- },
17
- subtitle1: {
18
- accessibilityRole: 'header',
19
- 'area-level': 6
20
- },
21
- subtitle2: {
22
- accessibilityRole: 'header',
23
- 'area-level': 6
24
- },
25
- body1: {
26
- accessibilityRole: 'text'
27
- },
28
- body2: {
29
- accessibilityRole: 'text'
30
- },
31
- caption1: {
32
- accessibilityRole: 'text'
33
- },
34
- caption2: {
35
- accessibilityRole: 'text'
36
- },
37
- flag: {
38
- accessibilityRole: 'text'
39
- }
4
+ const accessibilityMap = {// TODO: set accessibilityRole.
5
+ // h1: { accessibilityRole: 'header', 'aria-level': 1 },
6
+ // h2: { accessibilityRole: 'header', 'aria-level': 2 },
7
+ // h3: { accessibilityRole: 'header', 'aria-level': 3 },
8
+ // subtitle1: { accessibilityRole: 'header', 'aria-level': 6 },
9
+ // subtitle2: { accessibilityRole: 'header', 'aria-level': 6 },
10
+ // body1: { accessibilityRole: 'text' },
11
+ // body2: { accessibilityRole: 'text' },
12
+ // caption1: { accessibilityRole: 'text' },
13
+ // caption2: { accessibilityRole: 'text' },
14
+ // flag: { accessibilityRole: 'text' },
40
15
  };
41
16
 
42
17
  function selectColor(theme, colorProp) {
43
- var _theme$palette$colorP;
44
-
45
- const palette = theme.palette.text;
46
-
47
18
  switch (colorProp) {
48
19
  case 'inherit':
49
20
  return Platform.OS === 'web' ? 'inherit' : undefined;
50
21
 
51
- case 'textPrimary':
52
- return palette.primary;
53
-
54
- case 'textSecondary':
55
- return palette.secondary;
56
-
57
- case 'textAccent':
58
- return palette.accent;
59
-
60
- case 'textHint':
61
- return palette.hint;
22
+ default:
23
+ return theme.palette.text[colorProp];
62
24
  }
63
-
64
- return (_theme$palette$colorP = theme.palette[colorProp]) === null || _theme$palette$colorP === void 0 ? void 0 : _theme$palette$colorP.main;
65
25
  }
66
26
 
67
27
  const styles = StyleSheet.create({
@@ -87,12 +47,13 @@ const Typography = /*#__PURE__*/React.forwardRef(function Typography(props, ref)
87
47
  selectable,
88
48
  style,
89
49
  variant = 'body1',
50
+ weight = 'medium',
90
51
  onLayout,
91
52
  onTextLayout
92
53
  } = props;
93
54
  const theme = useTheme();
94
55
  const fontStyle = createFontStyle(theme, {
95
- selector: typography => typography[variant],
56
+ selector: typography => typography[variant][weight],
96
57
  color: selectColor(theme, colorProp)
97
58
  }); // To prevent white-space: pre, word-wrap:break-word style conflicting issue at safari browser.
98
59
 
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","Text","createFontStyle","css","StyleSheet","useTheme","accessibilityMap","h1","accessibilityRole","h2","h3","subtitle1","subtitle2","body1","body2","caption1","caption2","flag","selectColor","theme","colorProp","palette","text","OS","undefined","primary","secondary","accent","hint","main","styles","create","root","flexShrink","maxWidth","Typography","forwardRef","props","ref","align","ariaLevel","disableFontScaling","children","color","ellipsizeMode","href","numberOfLines","onPress","selectable","style","variant","onLayout","onTextLayout","fontStyle","selector","typography","textWrapStyle","wordWrap","textStyle","textAlign","accessibility","variantRole","variantLevel","memo"],"sources":["Typography.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, Text, TextStyle } from 'react-native';\nimport type { Theme } from '@fountain-ui/styles';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport TypographyProps, { AccessibilityMap, TypographyColor } from './TypographyProps';\n\nconst accessibilityMap: AccessibilityMap = {\n h1: { accessibilityRole: 'header', 'area-level': 1 },\n h2: { accessibilityRole: 'header', 'area-level': 2 },\n h3: { accessibilityRole: 'header', 'area-level': 3 },\n subtitle1: { accessibilityRole: 'header', 'area-level': 6 },\n subtitle2: { accessibilityRole: 'header', 'area-level': 6 },\n body1: { accessibilityRole: 'text' },\n body2: { accessibilityRole: 'text' },\n caption1: { accessibilityRole: 'text' },\n caption2: { accessibilityRole: 'text' },\n flag: { accessibilityRole: 'text' },\n};\n\nfunction selectColor(theme: Theme, colorProp: TypographyColor): string | undefined {\n const palette = theme.palette.text;\n\n switch (colorProp) {\n case 'inherit':\n return Platform.OS === 'web' ? 'inherit' : undefined;\n case 'textPrimary':\n return palette.primary;\n case 'textSecondary':\n return palette.secondary;\n case 'textAccent':\n return palette.accent;\n case 'textHint':\n return palette.hint;\n }\n\n return theme.palette[colorProp]?.main;\n}\n\nconst styles = StyleSheet.create({\n root: {\n flexShrink: 1,\n ...(Platform.OS === 'web' ? { maxWidth: '100%' } : {}),\n },\n});\n\nconst Typography = React.forwardRef<Text, TypographyProps>(function Typography(props, ref) {\n const {\n accessibilityRole,\n align = 'inherit',\n ariaLevel,\n disableFontScaling = false,\n children,\n color: colorProp = 'inherit',\n ellipsizeMode = 'tail',\n href,\n numberOfLines,\n onPress,\n selectable,\n style,\n variant = 'body1',\n onLayout,\n onTextLayout,\n } = props;\n\n const theme = useTheme();\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography[variant],\n color: selectColor(theme, colorProp),\n });\n\n // To prevent white-space: pre, word-wrap:break-word style conflicting issue at safari browser.\n const textWrapStyle = numberOfLines && numberOfLines > 0 && Platform.OS === 'web' ? { wordWrap: 'normal' } : {};\n\n const textStyle = css([\n styles.root,\n { textAlign: align === 'inherit' ? 'auto' : align },\n textWrapStyle as TextStyle,\n fontStyle,\n style,\n ]);\n\n const accessibility = accessibilityMap[variant];\n const variantRole = href !== undefined ? 'link' : accessibility?.accessibilityRole;\n const variantLevel = accessibility?.['area-level'];\n\n return (\n <Text\n ref={ref}\n accessibilityRole={accessibilityRole || variantRole}\n allowFontScaling={!disableFontScaling}\n aria-level={ariaLevel || variantLevel}\n children={children}\n ellipsizeMode={ellipsizeMode}\n // @ts-ignore\n href={href}\n numberOfLines={numberOfLines}\n onPress={onPress}\n selectable={selectable}\n style={textStyle}\n onLayout={onLayout}\n onTextLayout={onTextLayout}\n />\n );\n});\n\nexport default React.memo(Typography);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,IAAnB,QAA0C,cAA1C;AAEA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,UAA/B,EAA2CC,QAA3C,QAA2D,WAA3D;AAGA,MAAMC,gBAAkC,GAAG;EACvCC,EAAE,EAAE;IAAEC,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CADmC;EAEvCC,EAAE,EAAE;IAAED,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CAFmC;EAGvCE,EAAE,EAAE;IAAEF,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CAHmC;EAIvCG,SAAS,EAAE;IAAEH,iBAAiB,EAAE,QAArB;IAA+B,cAAc;EAA7C,CAJ4B;EAKvCI,SAAS,EAAE;IAAEJ,iBAAiB,E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I,gBAAgB,EAAE,CAACpB,kBAHvB;IAII,cAAYD,SAAS,IAAIsB,YAJ7B;IAKI,QAAQ,EAAEpB,QALd;IAMI,aAAa,EAAEE,aANnB,CAOI;IAPJ;IAQI,IAAI,EAAEC,IARV;IASI,aAAa,EAAEC,aATnB;IAUI,OAAO,EAAEC,OAVb;IAWI,UAAU,EAAEC,UAXhB;IAYI,KAAK,EAAEU,SAZX;IAaI,QAAQ,EAAEP,QAbd;IAcI,YAAY,EAAEC;EAdlB,EADJ;AAkBH,CA3DkB,CAAnB;AA6DA,4BAAerD,KAAK,CAACgE,IAAN,CAAW5B,UAAX,CAAf"}
1
+ {"version":3,"names":["React","Platform","Text","createFontStyle","css","StyleSheet","useTheme","accessibilityMap","selectColor","theme","colorProp","OS","undefined","palette","text","styles","create","root","flexShrink","maxWidth","Typography","forwardRef","props","ref","accessibilityRole","align","ariaLevel","disableFontScaling","children","color","ellipsizeMode","href","numberOfLines","onPress","selectable","style","variant","weight","onLayout","onTextLayout","fontStyle","selector","typography","textWrapStyle","wordWrap","textStyle","textAlign","accessibility","variantRole","variantLevel","memo"],"sources":["Typography.tsx"],"sourcesContent":["import React from 'react';\nimport type { TextProps, TextStyle } from 'react-native';\nimport { Platform, Text } from 'react-native';\nimport type { FontVariant, FontWeight, Theme } from '@fountain-ui/styles';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport type TypographyProps from './TypographyProps';\nimport type { AccessibilityMap, TypographyAlign, TypographyColor } from './TypographyProps';\n\nconst accessibilityMap: AccessibilityMap = {\n // TODO: set accessibilityRole.\n // h1: { accessibilityRole: 'header', 'aria-level': 1 },\n // h2: { accessibilityRole: 'header', 'aria-level': 2 },\n // h3: { accessibilityRole: 'header', 'aria-level': 3 },\n // subtitle1: { accessibilityRole: 'header', 'aria-level': 6 },\n // subtitle2: { accessibilityRole: 'header', 'aria-level': 6 },\n // body1: { accessibilityRole: 'text' },\n // body2: { accessibilityRole: 'text' },\n // caption1: { accessibilityRole: 'text' },\n // caption2: { accessibilityRole: 'text' },\n // flag: { accessibilityRole: 'text' },\n};\n\nfunction selectColor(theme: Theme, colorProp: TypographyColor): string | undefined {\n switch (colorProp) {\n case 'inherit':\n return Platform.OS === 'web' ? 'inherit' : undefined;\n default:\n return theme.palette.text[colorProp];\n }\n}\n\nconst styles = StyleSheet.create({\n root: {\n flexShrink: 1,\n ...(Platform.OS === 'web' ? { maxWidth: '100%' } : {}),\n },\n});\n\nconst Typography = React.forwardRef<Text, TypographyProps>(function Typography(props, ref) {\n const {\n accessibilityRole,\n align = 'inherit' as TypographyAlign,\n ariaLevel,\n disableFontScaling = false,\n children,\n color: colorProp = 'inherit' as TypographyColor,\n ellipsizeMode = 'tail' as TextProps['ellipsizeMode'],\n href,\n numberOfLines,\n onPress,\n selectable,\n style,\n variant = 'body1' as FontVariant,\n weight = 'medium' as FontWeight,\n onLayout,\n onTextLayout,\n } = props;\n\n const theme = useTheme();\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography[variant][weight],\n color: selectColor(theme, colorProp),\n });\n\n // To prevent white-space: pre, word-wrap:break-word style conflicting issue at safari browser.\n const textWrapStyle = numberOfLines && numberOfLines > 0 && Platform.OS === 'web' ? { wordWrap: 'normal' } : {};\n\n const textStyle = css([\n styles.root,\n { textAlign: align === 'inherit' ? 'auto' : align },\n textWrapStyle as TextStyle,\n fontStyle,\n style,\n ]);\n\n const accessibility = accessibilityMap[variant];\n const variantRole = href !== undefined ? 'link' : accessibility?.accessibilityRole;\n const variantLevel = accessibility?.['area-level'];\n\n return (\n <Text\n ref={ref}\n accessibilityRole={accessibilityRole || variantRole}\n allowFontScaling={!disableFontScaling}\n aria-level={ariaLevel || variantLevel}\n children={children}\n ellipsizeMode={ellipsizeMode}\n // @ts-ignore\n href={href}\n numberOfLines={numberOfLines}\n onPress={onPress}\n selectable={selectable}\n style={textStyle}\n onLayout={onLayout}\n onTextLayout={onTextLayout}\n />\n );\n});\n\nexport default React.memo(Typography);\n"],"mappings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AAEC;EAdlB,EADJ;AAkBH,CA5DkB,CAAnB;AA8DA,4BAAevC,KAAK,CAACkD,IAAN,CAAW9B,UAAX,CAAf"}
@@ -1,2 +1,2 @@
1
-
1
+ export const typographyColors = ['inherit', 'accent', 'accentAlt', 'strong', 'strongInverse', 'base', 'baseInverse', 'baseOpacity', 'baseOpacityInverse', 'weak', 'weakOpacity', 'weakInverse', 'weakOpacityInverse'];
2
2
  //# sourceMappingURL=TypographyProps.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["TypographyProps.ts"],"sourcesContent":["import React from 'react';\nimport type { AccessibilityProps, TextProps } from 'react-native';\nimport type { ComponentProps } from '../types';\n\nexport type TypographyAlign = 'inherit' | 'left' | 'center' | 'right' | 'justify';\n\nexport type TypographyColor =\n | 'inherit'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'warning'\n | 'error'\n | 'accent'\n | 'textPrimary'\n | 'textSecondary'\n | 'textAccent'\n | 'textHint';\n\nexport type TypographyVariant =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'subtitle1'\n | 'subtitle2'\n | 'body1'\n | 'body2'\n | 'caption1'\n | 'caption2'\n | 'flag'\n | 'button1'\n | 'button2';\n\nexport interface Accessibility {\n accessibilityRole: AccessibilityProps['accessibilityRole'];\n 'area-level'?: number;\n}\n\nexport interface AccessibilityMap extends Partial<{\n [key: string]: Accessibility;\n}> {}\n\nexport default interface TypographyProps extends ComponentProps<{\n /**\n * Applies HTML tag at web and communicates purpose of component at app\n */\n accessibilityRole?: AccessibilityProps['accessibilityRole'];\n\n /**\n * Set the text-align on the component.\n * The value 'justify' is not supported on Android and fallbacks to left.\n * @default 'inherit'\n */\n align?: TypographyAlign;\n\n /**\n * Applies HTML heading level\n */\n ariaLevel?: number;\n\n /**\n * Specifies whether fonts should scale to respect Text Size accessibility settings.\n * @default false\n */\n disableFontScaling?: boolean;\n\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'inherit'\n */\n color?: TypographyColor;\n\n /**\n * The text ellipsis mode.\n * @default 'tail'\n */\n ellipsizeMode?: TextProps['ellipsizeMode'];\n\n /**\n * Internal use only. The hyperlink of the text.\n */\n href?: string;\n\n /**\n * Used to truncate the text with an ellipsis after computing the text\n * layout, including line wrapping, such that the total number of lines\n * does not exceed this number.\n */\n numberOfLines?: TextProps['numberOfLines'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n onPress?: TextProps['onPress'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n selectable?: boolean;\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant?: TypographyVariant;\n\n\n /**\n * Callback that is called when the text layout has been calculated.\n */\n onTextLayout?: TextProps['onTextLayout'];\n\n /**\n * Callback that is called when the layout of the Text component changes.\n */\n onLayout?: TextProps['onLayout'];\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":["typographyColors"],"sources":["TypographyProps.ts"],"sourcesContent":["import React from 'react';\nimport type { AccessibilityProps, TextProps, TextStyle } from 'react-native';\nimport type { FontVariant, FontWeight } from '@fountain-ui/styles';\nimport type { ComponentProps } from '../types';\n\nexport type TypographyAlign = 'inherit' | TextStyle['textAlign'];\n\nexport const typographyColors = [\n 'inherit',\n 'accent',\n 'accentAlt',\n 'strong',\n 'strongInverse',\n 'base',\n 'baseInverse',\n 'baseOpacity',\n 'baseOpacityInverse',\n 'weak',\n 'weakOpacity',\n 'weakInverse',\n 'weakOpacityInverse',\n] as const;\n\nexport type TypographyColor = typeof typographyColors[number];\n\nexport interface Accessibility {\n accessibilityRole: AccessibilityProps['accessibilityRole'];\n 'area-level'?: number;\n}\n\nexport type AccessibilityMap = Partial<Record<FontVariant, Accessibility>>;\n\nexport default interface TypographyProps extends ComponentProps<{\n /**\n * Applies HTML tag at web and communicates purpose of component at app\n */\n accessibilityRole?: AccessibilityProps['accessibilityRole'];\n\n /**\n * Set the text-align on the component.\n * The value 'justify' is not supported on Android and fallbacks to left.\n * @default 'inherit'\n */\n align?: TypographyAlign;\n\n /**\n * Applies HTML heading level\n */\n ariaLevel?: number;\n\n /**\n * Specifies whether fonts should scale to respect Text Size accessibility settings.\n * @default false\n */\n disableFontScaling?: boolean;\n\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'inherit'\n */\n color?: TypographyColor;\n\n /**\n * The text ellipsis mode.\n * @default 'tail'\n */\n ellipsizeMode?: TextProps['ellipsizeMode'];\n\n /**\n * Internal use only. The hyperlink of the text.\n */\n href?: string;\n\n /**\n * Used to truncate the text with an ellipsis after computing the text\n * layout, including line wrapping, such that the total number of lines\n * does not exceed this number.\n */\n numberOfLines?: TextProps['numberOfLines'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n onPress?: TextProps['onPress'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n selectable?: boolean;\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant?: FontVariant;\n\n /**\n * Determines the font weight.\n * @default 'medium'\n */\n weight?: FontWeight;\n\n /**\n * Callback that is called when the text layout has been calculated.\n */\n onTextLayout?: TextProps['onTextLayout'];\n\n /**\n * Callback that is called when the layout of the Text component changes.\n */\n onLayout?: TextProps['onLayout'];\n}> {}\n"],"mappings":"AAOA,OAAO,MAAMA,gBAAgB,GAAG,CAC5B,SAD4B,EAE5B,QAF4B,EAG5B,WAH4B,EAI5B,QAJ4B,EAK5B,eAL4B,EAM5B,MAN4B,EAO5B,aAP4B,EAQ5B,aAR4B,EAS5B,oBAT4B,EAU5B,MAV4B,EAW5B,aAX4B,EAY5B,aAZ4B,EAa5B,oBAb4B,CAAzB"}
@@ -1,2 +1,2 @@
1
- export { default } from './Typography';
1
+ export { default } from './LegacyTypography';
2
2
  //# sourceMappingURL=index.js.map