@react-fabric/core 1.0.0-beta.4 → 1.0.0-beta.41

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 (347) hide show
  1. package/{src/components/actionLabel/ActionLabel.module.css → css/components/_actionLabel.css} +4 -4
  2. package/{src/overlays/alert/Alert.module.css → css/components/_alert.css} +3 -3
  3. package/{src/components/animations/Animations.module.css → css/components/_animations.css} +9 -9
  4. package/{src/components/avatar/Avatar.module.css → css/components/_avatar.css} +11 -11
  5. package/{src/components/badge/Badge.module.css → css/components/_badge.css} +19 -17
  6. package/{src/components/breadcrumbs/Breadcrumbs.module.css → css/components/_breadcrumbs.css} +49 -44
  7. package/{src/components/button/Button.module.css → css/components/_button.css} +68 -78
  8. package/{src/components/card/Card.module.css → css/components/_card.css} +32 -28
  9. package/{src/components/chip/Chip.module.css → css/components/_chip.css} +15 -11
  10. package/{src/components/collapsable/Collapsable.module.css → css/components/_collapsable.css} +3 -3
  11. package/css/components/_divider.css +32 -0
  12. package/{src/components/dropdown/Dropdown.module.css → css/components/_dropdown.css} +2 -2
  13. package/{src/overlays/flyout/Flyout.module.css → css/components/_flyout.css} +6 -6
  14. package/{src/components/icon/Icon.module.css → css/components/_icon.css} +8 -5
  15. package/{src/components/media/Media.module.css → css/components/_media.css} +17 -17
  16. package/{src/components/menu/Menu.module.css → css/components/_menu.css} +15 -16
  17. package/{src/overlays/message/Message.module.css → css/components/_message.css} +2 -2
  18. package/{src/components/meter/Meter.module.css → css/components/_meter.css} +10 -10
  19. package/{src/overlays/modal/Modal.module.css → css/components/_modal.css} +6 -6
  20. package/{src/components/panel/Panel.module.css → css/components/_panel.css} +17 -17
  21. package/{src/components/progress/Progress.module.css → css/components/_progress.css} +7 -10
  22. package/{src/components/tabpanel/TabPanel.module.css → css/components/_tabPanel.css} +73 -84
  23. package/{src/overlays/toast/Toast.module.css → css/components/_toast.css} +2 -2
  24. package/css/components/_tooltip.css +29 -0
  25. package/{src/core/content/Content.module.css → css/components/index.css} +25 -18
  26. package/{src/core/aside/Aside.module.css → css/core/_aside.css} +42 -42
  27. package/{src/core/section/Section.module.css → css/core/_content.css} +5 -3
  28. package/{src/core/boundary/ErrorBoundary.module.css → css/core/_errorboundary.css} +9 -9
  29. package/{src/core/headfoot/HeadFoot.module.css → css/core/_headfoot.css} +4 -10
  30. package/{src/core/page/Page.module.css → css/core/_page.css} +10 -14
  31. package/{src/core/responsive/Responsive.module.css → css/core/_responsive.css} +10 -10
  32. package/css/core/_section.css +28 -0
  33. package/{src/core/theme/Theme.module.css → css/core/_theme.css} +3 -3
  34. package/{src/typography/Typography.module.css → css/core/_typography.css} +14 -12
  35. package/{src/core/viewport/Viewport.module.css → css/core/_viewport.css} +7 -3
  36. package/css/core/index.css +33 -0
  37. package/css/reset/_gradients.css +8 -8
  38. package/css/reset/_reset.css +41 -223
  39. package/css/reset/_text.css +14 -29
  40. package/css/reset/_theme.css +315 -32
  41. package/css/reset/index.css +4 -4
  42. package/css/styles.css +7 -6
  43. package/css/theme/_colors.css +320 -0
  44. package/css/theme/_utilities.css +530 -0
  45. package/css/theme/index.css +44 -0
  46. package/dist/cjs/components/actionLabel/ActionLabel.js +3 -3
  47. package/dist/cjs/components/animations/Animations.js +29 -18
  48. package/dist/cjs/components/avatar/Avatar.js +10 -13
  49. package/dist/cjs/components/avatar/AvatarGroup.js +3 -3
  50. package/dist/cjs/components/badge/Badge.js +5 -5
  51. package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +10 -8
  52. package/dist/cjs/components/button/Button.js +18 -14
  53. package/dist/cjs/components/button/ButtonGroup.js +4 -3
  54. package/dist/cjs/components/button/ConfirmButton.js +7 -2
  55. package/dist/cjs/components/button/ToggleButtonGroup.js +3 -3
  56. package/dist/cjs/components/callout/Callout.js +15 -4
  57. package/dist/cjs/components/card/Card.js +8 -7
  58. package/dist/cjs/components/card/CardCover.js +10 -5
  59. package/dist/cjs/components/chip/Chip.js +11 -7
  60. package/dist/cjs/components/collapsable/Collapsable.js +5 -5
  61. package/dist/cjs/components/divider/Divider.js +10 -7
  62. package/dist/cjs/components/dropdown/Dropdown.js +5 -4
  63. package/dist/cjs/components/dropdown/DropdownTool.js +4 -3
  64. package/dist/cjs/components/empty/EmptyContent.js +6 -3
  65. package/dist/cjs/components/icon/Icon.js +15 -14
  66. package/dist/cjs/components/media/Media.js +116 -75
  67. package/dist/cjs/components/menu/ContextMenu.js +30 -10
  68. package/dist/cjs/components/menu/Menu.js +39 -20
  69. package/dist/cjs/components/menu/MenuItem.js +30 -16
  70. package/dist/cjs/components/meter/Meter.js +2 -3
  71. package/dist/cjs/components/navigator/Navigator.js +16 -9
  72. package/dist/cjs/components/panel/Panel.js +10 -9
  73. package/dist/cjs/components/panel/PanelGroup.js +1 -2
  74. package/dist/cjs/components/progress/ProgressBar.js +6 -5
  75. package/dist/cjs/components/progress/ProgressCircle.js +6 -4
  76. package/dist/cjs/components/tabpanel/Tab.js +58 -38
  77. package/dist/cjs/components/tabpanel/TabPanel.js +20 -16
  78. package/dist/cjs/core/aside/Aside.js +11 -10
  79. package/dist/cjs/core/boundary/ErrorBoundary.js +6 -7
  80. package/dist/cjs/core/boundary/ErrorIcon.js +1 -2
  81. package/dist/cjs/core/content/Content.js +9 -7
  82. package/dist/cjs/core/headfoot/HeadFoot.js +2 -20
  83. package/dist/cjs/core/page/Page.js +3 -3
  84. package/dist/cjs/core/responsive/Responsive.js +3 -4
  85. package/dist/cjs/core/section/Section.js +1 -2
  86. package/dist/cjs/core/theme/ThemeProvider.js +7 -8
  87. package/dist/cjs/core/viewport/Viewport.js +4 -2
  88. package/dist/cjs/hooks/useNavigator.js +6 -4
  89. package/dist/cjs/hotkeys/HotKeyLabel.js +1 -1
  90. package/dist/cjs/hotkeys/HotKeyWrapper.js +3 -1
  91. package/dist/cjs/index.js +6 -2
  92. package/dist/cjs/overlays/alert/Alert.js +19 -13
  93. package/dist/cjs/overlays/flyout/Flyout.js +49 -60
  94. package/dist/cjs/overlays/message/Message.js +6 -3
  95. package/dist/cjs/overlays/modal/Modal.js +11 -11
  96. package/dist/cjs/overlays/toast/Toast.js +17 -9
  97. package/dist/cjs/overlays/tooltip/Tooltip.js +20 -8
  98. package/dist/cjs/types/icons.js +4 -0
  99. package/dist/cjs/typography/Abbr.js +2 -3
  100. package/dist/cjs/typography/{Link.js → Anchor.js} +5 -4
  101. package/dist/cjs/typography/Mark.js +2 -3
  102. package/dist/cjs/typography/Text.js +3 -4
  103. package/dist/cjs/typography/Title.js +3 -3
  104. package/dist/cjs/utils/cloneElement.js +44 -0
  105. package/dist/cjs/utils/getColor.js +1 -18
  106. package/dist/esm/components/actionLabel/ActionLabel.js +3 -3
  107. package/dist/esm/components/animations/Animations.js +30 -19
  108. package/dist/esm/components/avatar/Avatar.js +11 -14
  109. package/dist/esm/components/avatar/AvatarGroup.js +3 -3
  110. package/dist/esm/components/badge/Badge.js +5 -5
  111. package/dist/esm/components/breadcrumbs/Breadcrumbs.js +10 -8
  112. package/dist/esm/components/button/Button.js +18 -14
  113. package/dist/esm/components/button/ButtonGroup.js +5 -4
  114. package/dist/esm/components/button/ConfirmButton.js +7 -2
  115. package/dist/esm/components/button/ToggleButtonGroup.js +4 -4
  116. package/dist/esm/components/callout/Callout.js +15 -4
  117. package/dist/esm/components/card/Card.js +8 -7
  118. package/dist/esm/components/card/CardCover.js +10 -5
  119. package/dist/esm/components/chip/Chip.js +12 -8
  120. package/dist/esm/components/collapsable/Collapsable.js +5 -5
  121. package/dist/esm/components/divider/Divider.js +11 -8
  122. package/dist/esm/components/dropdown/Dropdown.js +5 -4
  123. package/dist/esm/components/dropdown/DropdownTool.js +4 -3
  124. package/dist/esm/components/empty/EmptyContent.js +6 -3
  125. package/dist/esm/components/icon/Icon.js +15 -14
  126. package/dist/esm/components/media/Media.js +117 -76
  127. package/dist/esm/components/menu/ContextMenu.js +32 -12
  128. package/dist/esm/components/menu/Menu.js +41 -22
  129. package/dist/esm/components/menu/MenuItem.js +24 -10
  130. package/dist/esm/components/meter/Meter.js +2 -3
  131. package/dist/esm/components/navigator/Navigator.js +16 -9
  132. package/dist/esm/components/panel/Panel.js +10 -9
  133. package/dist/esm/components/panel/PanelGroup.js +1 -2
  134. package/dist/esm/components/progress/ProgressBar.js +6 -5
  135. package/dist/esm/components/progress/ProgressCircle.js +6 -4
  136. package/dist/esm/components/tabpanel/Tab.js +59 -39
  137. package/dist/esm/components/tabpanel/TabPanel.js +20 -16
  138. package/dist/esm/core/aside/Aside.js +11 -10
  139. package/dist/esm/core/boundary/ErrorBoundary.js +6 -7
  140. package/dist/esm/core/boundary/ErrorIcon.js +1 -2
  141. package/dist/esm/core/content/Content.js +9 -7
  142. package/dist/esm/core/headfoot/HeadFoot.js +2 -20
  143. package/dist/esm/core/page/Page.js +3 -3
  144. package/dist/esm/core/responsive/Responsive.js +3 -4
  145. package/dist/esm/core/section/Section.js +1 -2
  146. package/dist/esm/core/theme/ThemeProvider.js +7 -8
  147. package/dist/esm/core/viewport/Viewport.js +4 -2
  148. package/dist/esm/hooks/useNavigator.js +7 -5
  149. package/dist/esm/hotkeys/HotKeyLabel.js +1 -1
  150. package/dist/esm/hotkeys/HotKeyWrapper.js +3 -1
  151. package/dist/esm/index.js +3 -1
  152. package/dist/esm/overlays/alert/Alert.js +20 -14
  153. package/dist/esm/overlays/flyout/Flyout.js +52 -63
  154. package/dist/esm/overlays/message/Message.js +7 -4
  155. package/dist/esm/overlays/modal/Modal.js +12 -12
  156. package/dist/esm/overlays/toast/Toast.js +18 -10
  157. package/dist/esm/overlays/tooltip/Tooltip.js +20 -8
  158. package/dist/esm/types/icons.js +4 -0
  159. package/dist/esm/typography/Abbr.js +2 -3
  160. package/dist/esm/typography/{Link.js → Anchor.js} +6 -5
  161. package/dist/esm/typography/Mark.js +2 -3
  162. package/dist/esm/typography/Text.js +4 -5
  163. package/dist/esm/typography/Title.js +4 -4
  164. package/dist/esm/utils/cloneElement.js +44 -0
  165. package/dist/esm/utils/getColor.js +2 -16
  166. package/dist/types/components/actionLabel/ActionLabel.d.ts +2 -2
  167. package/dist/types/components/animations/Animations.d.ts +5 -5
  168. package/dist/types/components/avatar/Avatar.d.ts +3 -3
  169. package/dist/types/components/badge/Badge.d.ts +5 -1
  170. package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +2 -2
  171. package/dist/types/components/button/Button.d.ts +7 -5
  172. package/dist/types/components/button/ButtonGroup.d.ts +2 -2
  173. package/dist/types/components/button/ConfirmButton.d.ts +6 -1
  174. package/dist/types/components/callout/Callout.d.ts +2 -2
  175. package/dist/types/components/card/Card.d.ts +3 -3
  176. package/dist/types/components/chip/Chip.d.ts +3 -3
  177. package/dist/types/components/collapsable/Collapsable.d.ts +5 -1
  178. package/dist/types/components/divider/Divider.d.ts +7 -3
  179. package/dist/types/components/dropdown/DropdownTool.d.ts +2 -1
  180. package/dist/types/components/empty/EmptyContent.d.ts +6 -2
  181. package/dist/types/components/icon/Icon.d.ts +3 -3
  182. package/dist/types/components/media/Media.d.ts +2 -2
  183. package/dist/types/components/menu/ContextMenu.d.ts +2 -1
  184. package/dist/types/components/menu/MenuItem.d.ts +1 -1
  185. package/dist/types/components/menu/types.d.ts +2 -2
  186. package/dist/types/components/navigator/Navigator.d.ts +4 -4
  187. package/dist/types/components/progress/ProgressBar.d.ts +2 -2
  188. package/dist/types/components/progress/ProgressCircle.d.ts +2 -2
  189. package/dist/types/components/tabpanel/Tab.d.ts +5 -5
  190. package/dist/types/components/tabpanel/TabPanel.d.ts +10 -1
  191. package/dist/types/core/content/Content.d.ts +3 -2
  192. package/dist/types/core/headfoot/HeadFoot.d.ts +1 -9
  193. package/dist/types/core/responsive/Responsive.d.ts +1 -1
  194. package/dist/types/core/theme/ThemeProvider.d.ts +4 -4
  195. package/dist/types/hooks/useOverlayService.d.ts +3 -5
  196. package/dist/types/index.d.ts +3 -0
  197. package/dist/types/overlays/alert/Alert.d.ts +2 -2
  198. package/dist/types/overlays/flyout/Flyout.d.ts +3 -2
  199. package/dist/types/overlays/message/Message.d.ts +2 -2
  200. package/dist/types/overlays/modal/Modal.d.ts +4 -3
  201. package/dist/types/overlays/toast/Toast.d.ts +2 -2
  202. package/dist/types/overlays/tooltip/Tooltip.d.ts +1 -1
  203. package/dist/types/types/icons.d.ts +4 -0
  204. package/dist/types/types/index.d.ts +18 -6
  205. package/dist/types/typography/Abbr.d.ts +6 -2
  206. package/dist/types/typography/Anchor.d.ts +25 -0
  207. package/dist/types/typography/Mark.d.ts +2 -2
  208. package/dist/types/typography/index.d.ts +1 -1
  209. package/dist/types/utils/cloneElement.d.ts +2 -0
  210. package/dist/types/utils/getColor.d.ts +1 -4
  211. package/dist/types/utils/index.d.ts +1 -0
  212. package/package.json +7 -9
  213. package/src/components/actionLabel/ActionLabel.tsx +15 -6
  214. package/src/components/animations/Animations.tsx +29 -23
  215. package/src/components/avatar/Avatar.tsx +74 -88
  216. package/src/components/avatar/AvatarGroup.tsx +4 -4
  217. package/src/components/badge/Badge.tsx +11 -7
  218. package/src/components/breadcrumbs/Breadcrumbs.tsx +13 -9
  219. package/src/components/button/Button.tsx +27 -22
  220. package/src/components/button/ButtonGroup.tsx +7 -7
  221. package/src/components/button/ConfirmButton.tsx +15 -5
  222. package/src/components/button/ToggleButtonGroup.tsx +5 -5
  223. package/src/components/callout/Callout.tsx +26 -11
  224. package/src/components/card/Card.tsx +10 -7
  225. package/src/components/card/CardCover.tsx +11 -6
  226. package/src/components/chip/Chip.tsx +17 -13
  227. package/src/components/collapsable/Collapsable.tsx +9 -4
  228. package/src/components/divider/Divider.tsx +15 -10
  229. package/src/components/dropdown/Dropdown.tsx +5 -5
  230. package/src/components/dropdown/DropdownTool.tsx +5 -3
  231. package/src/components/empty/EmptyContent.tsx +17 -2
  232. package/src/components/icon/Icon.tsx +55 -67
  233. package/src/components/media/Media.tsx +141 -106
  234. package/src/components/menu/ContextMenu.tsx +36 -11
  235. package/src/components/menu/Menu.tsx +51 -30
  236. package/src/components/menu/MenuItem.tsx +19 -9
  237. package/src/components/menu/types.ts +2 -2
  238. package/src/components/meter/Meter.tsx +2 -3
  239. package/src/components/navigator/Navigator.tsx +19 -5
  240. package/src/components/panel/Panel.tsx +10 -9
  241. package/src/components/panel/PanelGroup.tsx +1 -2
  242. package/src/components/progress/ProgressBar.tsx +8 -9
  243. package/src/components/progress/ProgressCircle.tsx +6 -9
  244. package/src/components/tabpanel/Tab.tsx +81 -64
  245. package/src/components/tabpanel/TabPanel.tsx +34 -12
  246. package/src/core/aside/Aside.tsx +11 -10
  247. package/src/core/boundary/ErrorBoundary.tsx +8 -7
  248. package/src/core/boundary/ErrorIcon.tsx +1 -2
  249. package/src/core/content/Content.tsx +17 -12
  250. package/src/core/headfoot/HeadFoot.tsx +2 -35
  251. package/src/core/page/Page.tsx +3 -3
  252. package/src/core/responsive/Responsive.tsx +8 -7
  253. package/src/core/section/Section.tsx +1 -2
  254. package/src/core/theme/ThemeProvider.tsx +11 -12
  255. package/src/core/viewport/Viewport.tsx +1 -2
  256. package/src/hooks/useNavigator.tsx +10 -5
  257. package/src/hooks/useOverlayService.tsx +12 -6
  258. package/src/hotkeys/HotKeyLabel.tsx +1 -1
  259. package/src/hotkeys/HotKeyWrapper.tsx +3 -1
  260. package/src/index.ts +4 -0
  261. package/src/overlays/alert/Alert.tsx +25 -31
  262. package/src/overlays/flyout/Flyout.tsx +71 -84
  263. package/src/overlays/message/Message.tsx +10 -7
  264. package/src/overlays/modal/Modal.tsx +20 -15
  265. package/src/overlays/toast/Toast.tsx +18 -27
  266. package/src/overlays/tooltip/Tooltip.tsx +30 -9
  267. package/src/types/icons.ts +9 -0
  268. package/src/types/index.ts +251 -27
  269. package/src/typography/Abbr.tsx +15 -9
  270. package/src/typography/{Link.tsx → Anchor.tsx} +8 -13
  271. package/src/typography/Mark.tsx +4 -9
  272. package/src/typography/Text.tsx +4 -12
  273. package/src/typography/Title.tsx +2 -6
  274. package/src/typography/index.ts +1 -1
  275. package/src/utils/cloneElement.ts +44 -0
  276. package/src/utils/getColor.ts +1 -17
  277. package/src/utils/index.ts +1 -0
  278. package/css/index.js +0 -250
  279. package/css/tailwind/colors.ts +0 -158
  280. package/dist/cjs/components/actionLabel/ActionLabel.module.css +0 -1
  281. package/dist/cjs/components/animations/Animations.module.css +0 -1
  282. package/dist/cjs/components/avatar/Avatar.module.css +0 -1
  283. package/dist/cjs/components/badge/Badge.module.css +0 -1
  284. package/dist/cjs/components/breadcrumbs/Breadcrumbs.module.css +0 -1
  285. package/dist/cjs/components/button/Button.module.css +0 -1
  286. package/dist/cjs/components/card/Card.module.css +0 -1
  287. package/dist/cjs/components/chip/Chip.module.css +0 -1
  288. package/dist/cjs/components/collapsable/Collapsable.module.css +0 -1
  289. package/dist/cjs/components/dropdown/Dropdown.module.css +0 -1
  290. package/dist/cjs/components/icon/Icon.module.css +0 -1
  291. package/dist/cjs/components/media/Media.module.css +0 -1
  292. package/dist/cjs/components/menu/Menu.module.css +0 -1
  293. package/dist/cjs/components/meter/Meter.module.css +0 -1
  294. package/dist/cjs/components/panel/Panel.module.css +0 -1
  295. package/dist/cjs/components/progress/Progress.module.css +0 -1
  296. package/dist/cjs/components/tabpanel/TabPanel.module.css +0 -1
  297. package/dist/cjs/core/aside/Aside.module.css +0 -1
  298. package/dist/cjs/core/boundary/ErrorBoundary.module.css +0 -1
  299. package/dist/cjs/core/content/Content.module.css +0 -1
  300. package/dist/cjs/core/headfoot/HeadFoot.module.css +0 -1
  301. package/dist/cjs/core/page/Page.module.css +0 -1
  302. package/dist/cjs/core/responsive/Responsive.module.css +0 -1
  303. package/dist/cjs/core/section/Section.module.css +0 -1
  304. package/dist/cjs/core/theme/Theme.module.css +0 -1
  305. package/dist/cjs/core/viewport/Viewport.module.css +0 -1
  306. package/dist/cjs/overlays/alert/Alert.module.css +0 -1
  307. package/dist/cjs/overlays/flyout/Flyout.module.css +0 -1
  308. package/dist/cjs/overlays/message/Message.module.css +0 -1
  309. package/dist/cjs/overlays/modal/Modal.module.css +0 -1
  310. package/dist/cjs/overlays/toast/Toast.module.css +0 -1
  311. package/dist/cjs/overlays/tooltip/Tooltip.module.css +0 -1
  312. package/dist/cjs/typography/Typography.module.css +0 -1
  313. package/dist/esm/components/actionLabel/ActionLabel.module.css +0 -1
  314. package/dist/esm/components/animations/Animations.module.css +0 -1
  315. package/dist/esm/components/avatar/Avatar.module.css +0 -1
  316. package/dist/esm/components/badge/Badge.module.css +0 -1
  317. package/dist/esm/components/breadcrumbs/Breadcrumbs.module.css +0 -1
  318. package/dist/esm/components/button/Button.module.css +0 -1
  319. package/dist/esm/components/card/Card.module.css +0 -1
  320. package/dist/esm/components/chip/Chip.module.css +0 -1
  321. package/dist/esm/components/collapsable/Collapsable.module.css +0 -1
  322. package/dist/esm/components/dropdown/Dropdown.module.css +0 -1
  323. package/dist/esm/components/icon/Icon.module.css +0 -1
  324. package/dist/esm/components/media/Media.module.css +0 -1
  325. package/dist/esm/components/menu/Menu.module.css +0 -1
  326. package/dist/esm/components/meter/Meter.module.css +0 -1
  327. package/dist/esm/components/panel/Panel.module.css +0 -1
  328. package/dist/esm/components/progress/Progress.module.css +0 -1
  329. package/dist/esm/components/tabpanel/TabPanel.module.css +0 -1
  330. package/dist/esm/core/aside/Aside.module.css +0 -1
  331. package/dist/esm/core/boundary/ErrorBoundary.module.css +0 -1
  332. package/dist/esm/core/content/Content.module.css +0 -1
  333. package/dist/esm/core/headfoot/HeadFoot.module.css +0 -1
  334. package/dist/esm/core/page/Page.module.css +0 -1
  335. package/dist/esm/core/responsive/Responsive.module.css +0 -1
  336. package/dist/esm/core/section/Section.module.css +0 -1
  337. package/dist/esm/core/theme/Theme.module.css +0 -1
  338. package/dist/esm/core/viewport/Viewport.module.css +0 -1
  339. package/dist/esm/overlays/alert/Alert.module.css +0 -1
  340. package/dist/esm/overlays/flyout/Flyout.module.css +0 -1
  341. package/dist/esm/overlays/message/Message.module.css +0 -1
  342. package/dist/esm/overlays/modal/Modal.module.css +0 -1
  343. package/dist/esm/overlays/toast/Toast.module.css +0 -1
  344. package/dist/esm/overlays/tooltip/Tooltip.module.css +0 -1
  345. package/dist/esm/typography/Typography.module.css +0 -1
  346. package/dist/types/typography/Link.d.ts +0 -25
  347. package/src/overlays/tooltip/Tooltip.module.css +0 -53
@@ -30,8 +30,14 @@ import {
30
30
  useInteractions,
31
31
  useRole,
32
32
  } from "@floating-ui/react";
33
+ import { isString } from "@react-fabric/utilities";
33
34
  import classNames from "classnames";
34
- import { useCallback, useEffect } from "react";
35
+ import {
36
+ type ElementType,
37
+ isValidElement,
38
+ useCallback,
39
+ useEffect,
40
+ } from "react";
35
41
  import { Loading } from "../../components/animations/Animations";
36
42
  import { Icon } from "../../components/icon/Icon";
37
43
  import { Header } from "../../core/headfoot/HeadFoot";
@@ -45,13 +51,13 @@ import {
45
51
  type TestProps,
46
52
  } from "../../types";
47
53
  import { CoreIcons } from "../../types/icons";
48
- import classes from "./Modal.module.css";
49
54
 
50
55
  export interface ModalProps
51
56
  extends AriaProps,
52
57
  TestProps,
53
- IconProps,
58
+ Omit<IconProps, "icon">,
54
59
  ChildrenProp {
60
+ icon?: string | ElementType<IconProps>;
55
61
  /**
56
62
  * header className
57
63
  */
@@ -95,7 +101,7 @@ export interface ModalProps
95
101
  /**
96
102
  * close handler
97
103
  */
98
- onClose: (...args: AnyObject) => void;
104
+ onClose?: (...args: AnyObject) => void;
99
105
  /**
100
106
  * before close handler, return false to prevent close
101
107
  */
@@ -163,9 +169,6 @@ export const Modal = ({
163
169
  useEffect(() => {
164
170
  setTimeout(() => {
165
171
  refs.floating.current && (refs.floating.current.dataset.show = "true");
166
- refs.floating.current
167
- ?.querySelector<HTMLElement>("[role='dialog']")
168
- ?.focus();
169
172
  }, 50);
170
173
  }, []);
171
174
 
@@ -173,15 +176,15 @@ export const Modal = ({
173
176
  <FloatingPortal>
174
177
  <FloatingOverlay
175
178
  lockScroll
176
- style={{ zIndex: "var(--z-overlay-mask)" }}
177
- className="bg-base/50 backdrop-blur-sm grid place-items-center"
179
+ style={{ zIndex: "var(--z-overlay-mask)", overflow: "hidden" }}
180
+ className="bg-tint-100/20 backdrop-blur-sm grid place-items-center p-16"
178
181
  >
179
182
  <FloatingFocusManager context={context}>
180
183
  <dialog
181
184
  className={classNames(
182
- classes.modal,
185
+ "fabric-modal",
183
186
  "rounded-capped relative overflow-hidden flex flex-col flex-nowrap",
184
- "ring-1 ring-tint-100 ring-offset-1 focus-within:ring-primary-300 shadow-xl",
187
+ "ring-2 ring-offset-2 ring-tint-100 focus-within:ring-primary-300 shadow-xl",
185
188
  size === "sm" && "w-[20rem]",
186
189
  size === "md" && "w-[40rem]",
187
190
  size === "lg" && "w-[60vw]",
@@ -201,9 +204,10 @@ export const Modal = ({
201
204
  <HotKeyWrapper>
202
205
  <Header
203
206
  flex
204
- className={classNames(classes.modalHeader, headerClassName)}
207
+ align="center"
208
+ className={classNames("fabric-modalHeader", headerClassName)}
205
209
  >
206
- {icon && (
210
+ {isString(icon) && (
207
211
  <Icon
208
212
  icon={icon}
209
213
  bg={iconBg}
@@ -212,12 +216,13 @@ export const Modal = ({
212
216
  rtlFlip={rtlFlip}
213
217
  />
214
218
  )}
219
+ {isValidElement(icon) && icon}
215
220
  <label className="flex-1 truncate py-2 px-1">{title}</label>
216
221
  {actions}
217
222
  <Icon
218
223
  data-ref="panelClose"
219
224
  className={classNames(
220
- classes.panelAction,
225
+ "fabric-panelAction",
221
226
  "cursor-pointer p-1 text-xl self-stretch",
222
227
  )}
223
228
  icon={CoreIcons.close}
@@ -228,7 +233,7 @@ export const Modal = ({
228
233
  <div
229
234
  role="dialog"
230
235
  className={classNames(
231
- classes.modalBody,
236
+ "fabric-modalBody",
232
237
  "flex-1 grid overflow-hidden",
233
238
  )}
234
239
  {...({ tabIndex: 0 } as AnyObject)}
@@ -27,10 +27,9 @@ import { useTranslation } from "react-i18next";
27
27
  import { AnimationIndicator } from "../../components/animations/Animations";
28
28
  import { Button } from "../../components/button/Button";
29
29
  import { Icon } from "../../components/icon/Icon";
30
- import { type ColorType, type Elements, type IconProps } from "../../types";
30
+ import { type ColorState, type Elements, type IconProps } from "../../types";
31
31
  import { CoreIcons } from "../../types/icons";
32
- import { getBgClass, getBorderClass, getColorClass } from "../../utils";
33
- import classes from "./Toast.module.css";
32
+ import { getColor } from "../../utils";
34
33
 
35
34
  export interface ToastProps extends Omit<IconProps, "iconBg" | "iconColor"> {
36
35
  /**
@@ -48,7 +47,7 @@ export interface ToastProps extends Omit<IconProps, "iconBg" | "iconColor"> {
48
47
  /**
49
48
  * theme color
50
49
  */
51
- color?: ColorType;
50
+ color?: ColorState;
52
51
  /**
53
52
  * extra action button
54
53
  */
@@ -87,31 +86,16 @@ export const Toast = ({
87
86
  );
88
87
  switch (color) {
89
88
  case "danger":
90
- return (
91
- <AnimationIndicator
92
- type="cross"
93
- className={getColorClass(color + "-600")}
94
- />
95
- );
89
+ return <AnimationIndicator type="cross" color={"danger-600"} />;
96
90
  case "success":
97
- return (
98
- <AnimationIndicator
99
- type="check"
100
- className={getColorClass(color + "-600")}
101
- />
102
- );
91
+ return <AnimationIndicator type="check" color={"success-600"} />;
103
92
  case "warning":
104
- return (
105
- <AnimationIndicator
106
- type="exclaim"
107
- className={getColorClass(color + "-600")}
108
- />
109
- );
93
+ return <AnimationIndicator type="exclaim" color={"warning-600"} />;
110
94
  default:
111
95
  return (
112
96
  <AnimationIndicator
113
97
  type={type === "confirm" ? "question" : "info"}
114
- className={getColorClass(color + "-600")}
98
+ color={`${color}-600`}
115
99
  />
116
100
  );
117
101
  }
@@ -138,22 +122,29 @@ export const Toast = ({
138
122
  <div
139
123
  role="alert"
140
124
  className={classNames(
141
- classes.toast,
142
- getBorderClass(color + "-300"),
125
+ "fabric-toast",
143
126
  "flex flex-nowrap max-w-sm bg-base min-w-72 border pointer-events-auto relative overflow-hidden rounded-capped mt-4 select-none",
144
127
  )}
128
+ style={{
129
+ borderColor: getColor(color + "-300"),
130
+ }}
145
131
  ref={elRef}
146
132
  >
147
133
  <div
148
- className={classNames("flex-initial p-2", getBgClass(color + "-100"))}
134
+ className={classNames("flex-initial p-2")}
135
+ style={{
136
+ backgroundColor: getColor(color + "-300"),
137
+ }}
149
138
  >
150
139
  {iconType}
151
140
  </div>
152
141
  <div
153
142
  className={classNames(
154
- getBgClass(color + "-50/50"),
155
143
  "flex flex-col flex-1 flex-nowrap overflow-hidden p-2",
156
144
  )}
145
+ style={{
146
+ backgroundColor: getColor(color + "-50"),
147
+ }}
157
148
  >
158
149
  <div className="flex flex-nowrap gap-2 items-start">
159
150
  <div className="font-medium flex-1">{title}</div>
@@ -51,7 +51,7 @@ import { Icon } from "../../components/icon/Icon";
51
51
  import { useIsRtl } from "../../hooks/useIsRtl";
52
52
  import { type RefProp, type TooltipType } from "../../types";
53
53
  import { CoreIcons } from "../../types/icons";
54
- import classes from "./Tooltip.module.css";
54
+ import { getColor } from "../../utils";
55
55
 
56
56
  export interface TooltipProps extends TooltipType, RefProp {
57
57
  /**
@@ -82,6 +82,7 @@ export const Tooltip = ({
82
82
  ref,
83
83
  children,
84
84
  color,
85
+ textColor,
85
86
  content,
86
87
  open,
87
88
  copyContent,
@@ -153,7 +154,7 @@ export const Tooltip = ({
153
154
  return (
154
155
  <span
155
156
  role="none"
156
- className="ms-2 cursor-pointer text-invert flex-content opacity-75 hover:opacity-90 active:opacity-60"
157
+ className="ms-2 cursor-pointer text-dimmed flex-content opacity-75 hover:opacity-90 active:opacity-60"
157
158
  onClick={handler}
158
159
  >
159
160
  <Icon icon={CoreIcons.copy} />
@@ -173,25 +174,45 @@ export const Tooltip = ({
173
174
  <FloatingPortal>
174
175
  <dfn
175
176
  data-ref="tooltip"
176
- data-color={color}
177
177
  className={classNames(
178
- classes.tooltip,
179
- "select-none text-sm not-italic flex py-1 px-2 rounded shadow-md bg-current",
178
+ "fabric-tooltip z-(--z-tooltip)",
179
+ "select-none text-sm not-italic flex py-1 px-2 !max-w-lg rounded shadow-md bg-muted",
180
180
  )}
181
181
  ref={refs.setFloating}
182
- style={floatingStyles}
182
+ style={{
183
+ color: textColor ? getColor(textColor) : undefined,
184
+ backgroundColor: color ? getColor(color) : undefined,
185
+ ...floatingStyles,
186
+ }}
183
187
  {...getFloatingProps()}
184
188
  >
185
189
  <span
186
190
  className={classNames(
187
- "font-medium text-invert flex-1",
188
- isString(content) && "whitespace-pre-wrap",
191
+ "font-medium flex-1 break-all",
192
+ !textColor && "contrast",
193
+ isString(content) && "whitespace-pre-wrap mixed-lang",
189
194
  )}
195
+ style={{
196
+ color: textColor
197
+ ? undefined
198
+ : color
199
+ ? getColor(color)
200
+ : "var(--bg-color-muted)",
201
+ }}
190
202
  >
191
203
  {content}
192
204
  </span>
193
205
  {copyEl}
194
- <FloatingArrow ref={arrowRef} context={context} />
206
+ <FloatingArrow
207
+ ref={arrowRef}
208
+ context={context}
209
+ strokeWidth={0.5}
210
+ className="fill-muted stroke-dimmed"
211
+ style={{
212
+ stroke: color ? getColor(color) : undefined,
213
+ fill: color ? getColor(color) : undefined,
214
+ }}
215
+ />
195
216
  </dfn>
196
217
  </FloatingPortal>
197
218
  )}
@@ -100,6 +100,11 @@ export module CoreIcons {
100
100
  export const colapseAll =
101
101
  "M18.707 21.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414zM5.293 2.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
102
102
 
103
+ export const expandAllVar =
104
+ "M13,9V15H16L12,19L8,15H11V9H8L12,5L16,9H13M4,2H20V4H4V2M4,20H20V22H4V20Z";
105
+ export const colapseAllVar =
106
+ "M4,12H20V14H4V12M4,9H20V11H4V9M16,4L12,8L8,4H11V1H13V4H16M8,19L12,15L16,19H13V22H11V19H8Z";
107
+
103
108
  export const folderClosed =
104
109
  "M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z";
105
110
  export const folderOpen =
@@ -249,6 +254,7 @@ export module CoreIcons {
249
254
  "M5.541 2.159c-0.153-0.1-0.34-0.159-0.541-0.159-0.552 0-1 0.448-1 1v18c-0.001 0.182 0.050 0.372 0.159 0.541 0.299 0.465 0.917 0.599 1.382 0.3l14-9c0.114-0.072 0.219-0.174 0.3-0.3 0.299-0.465 0.164-1.083-0.3-1.382zM6 4.832l11.151 7.168-11.151 7.168z";
250
255
  export const pause =
251
256
  "M6 3c-0.552 0-1 0.448-1 1v16c0 0.552 0.448 1 1 1h4c0.552 0 1-0.448 1-1v-16c0-0.552-0.448-1-1-1zM7 5h2v14h-2zM14 3c-0.552 0-1 0.448-1 1v16c0 0.552 0.448 1 1 1h4c0.552 0 1-0.448 1-1v-16c0-0.552-0.448-1-1-1zM15 5h2v14h-2z";
257
+ export const stop = "M18,18H6V6H18V18Z";
252
258
  export const volumeOn =
253
259
  "M10 7.081v9.839l-3.375-2.7c-0.17-0.137-0.388-0.22-0.625-0.22h-3v-4h3c0.218 0.001 0.439-0.071 0.625-0.219zM10.375 4.219l-4.726 3.781h-3.649c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1h3.649l4.726 3.781c0.431 0.345 1.061 0.275 1.406-0.156 0.148-0.185 0.22-0.407 0.219-0.625v-14c0-0.552-0.448-1-1-1-0.237 0-0.455 0.083-0.625 0.219zM18.363 5.637c1.757 1.758 2.635 4.059 2.635 6.364 0 2.304-0.878 4.605-2.635 6.362-0.39 0.391-0.39 1.024 0 1.414s1.024 0.39 1.414 0c2.147-2.147 3.22-4.963 3.221-7.776s-1.074-5.63-3.221-7.778c-0.39-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414zM14.833 9.167c0.781 0.781 1.171 1.803 1.171 2.828s-0.39 2.047-1.171 2.828c-0.39 0.391-0.39 1.024 0 1.414s1.024 0.39 1.414 0c1.171-1.171 1.757-2.708 1.757-4.242s-0.586-3.071-1.757-4.242c-0.39-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
254
260
  export const volumeOff =
@@ -348,6 +354,9 @@ export module CoreIcons {
348
354
  export const colorPicker =
349
355
  "M19.35,11.72L17.22,13.85L15.81,12.43L8.1,20.14L3.5,22L2,20.5L3.86,15.9L11.57,8.19L10.15,6.78L12.28,4.65L19.35,11.72M16.76,3C17.93,1.83 19.83,1.83 21,3C22.17,4.17 22.17,6.07 21,7.24L19.08,9.16L14.84,4.92L16.76,3M5.56,17.03L4.5,19.5L6.97,18.44L14.4,11L13,9.6L5.56,17.03Z";
350
356
 
357
+ export const list =
358
+ "M11 15H17V17H11V15M9 7H7V9H9V7M11 13H17V11H11V13M11 9H17V7H11V9M9 11H7V13H9V11M21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5M19 5H5V19H19V5M9 15H7V17H9V15Z";
359
+
351
360
  /**
352
361
  * alert icons
353
362
  */
@@ -25,11 +25,15 @@
25
25
  import { type Placement } from "@floating-ui/react";
26
26
  import { type JSXElementConstructor, type Ref } from "react";
27
27
 
28
+ export type ModalProps<P = unknown> = P & {
29
+ onClose: (...args: AnyObject) => void;
30
+ };
31
+
28
32
  export type SizeType = "xs" | "sm" | "md" | "lg" | "xl";
29
33
 
30
34
  export type SizeTypeWithZero = "xs" | "sm" | "md" | "lg" | "xl" | 0;
31
35
 
32
- export type ColorType =
36
+ export type ColorState =
33
37
  | "primary"
34
38
  | "accent"
35
39
  | "info"
@@ -37,21 +41,240 @@ export type ColorType =
37
41
  | "success"
38
42
  | "warning";
39
43
 
44
+ export type ColorType =
45
+ | "primary-50"
46
+ | "primary-100"
47
+ | "primary-200"
48
+ | "primary-300"
49
+ | "primary-400"
50
+ | "primary-500"
51
+ | "primary-600"
52
+ | "primary-700"
53
+ | "primary-800"
54
+ | "primary-900"
55
+ | "primary-950"
56
+ | "accent-50"
57
+ | "accent-100"
58
+ | "accent-200"
59
+ | "accent-300"
60
+ | "accent-400"
61
+ | "accent-500"
62
+ | "accent-600"
63
+ | "accent-700"
64
+ | "accent-800"
65
+ | "accent-900"
66
+ | "accent-950"
67
+ | "info-50"
68
+ | "info-100"
69
+ | "info-200"
70
+ | "info-300"
71
+ | "info-400"
72
+ | "info-500"
73
+ | "info-600"
74
+ | "info-700"
75
+ | "info-800"
76
+ | "info-900"
77
+ | "info-950"
78
+ | "danger-50"
79
+ | "danger-100"
80
+ | "danger-200"
81
+ | "danger-300"
82
+ | "danger-400"
83
+ | "danger-500"
84
+ | "danger-600"
85
+ | "danger-700"
86
+ | "danger-800"
87
+ | "danger-900"
88
+ | "danger-950"
89
+ | "success-50"
90
+ | "success-100"
91
+ | "success-200"
92
+ | "success-300"
93
+ | "success-400"
94
+ | "success-500"
95
+ | "success-600"
96
+ | "success-700"
97
+ | "success-800"
98
+ | "success-900"
99
+ | "success-950"
100
+ | "warning-50"
101
+ | "warning-100"
102
+ | "warning-200"
103
+ | "warning-300"
104
+ | "warning-400"
105
+ | "warning-500"
106
+ | "warning-600"
107
+ | "warning-700"
108
+ | "warning-800"
109
+ | "warning-900"
110
+ | "warning-950";
111
+
40
112
  export type PaletteType =
41
- | "scarlet"
42
- | "pumpkin"
43
- | "marigold"
44
- | "avacado"
45
- | "jade"
46
- | "denim"
47
- | "iris"
48
- | "lilac"
49
- | "coral"
50
- | "wood"
51
- | "silver"
52
- | "steel"
53
- | "olive"
54
- | "sand";
113
+ | "scarlet-50"
114
+ | "scarlet-100"
115
+ | "scarlet-200"
116
+ | "scarlet-300"
117
+ | "scarlet-400"
118
+ | "scarlet-500"
119
+ | "scarlet-600"
120
+ | "scarlet-700"
121
+ | "scarlet-800"
122
+ | "scarlet-900"
123
+ | "scarlet-950"
124
+ | "pumpkin-50"
125
+ | "pumpkin-100"
126
+ | "pumpkin-200"
127
+ | "pumpkin-300"
128
+ | "pumpkin-400"
129
+ | "pumpkin-500"
130
+ | "pumpkin-600"
131
+ | "pumpkin-700"
132
+ | "pumpkin-800"
133
+ | "pumpkin-900"
134
+ | "pumpkin-950"
135
+ | "marigold-50"
136
+ | "marigold-100"
137
+ | "marigold-200"
138
+ | "marigold-300"
139
+ | "marigold-400"
140
+ | "marigold-500"
141
+ | "marigold-600"
142
+ | "marigold-700"
143
+ | "marigold-800"
144
+ | "marigold-900"
145
+ | "marigold-950"
146
+ | "avacado-50"
147
+ | "avacado-100"
148
+ | "avacado-200"
149
+ | "avacado-300"
150
+ | "avacado-400"
151
+ | "avacado-500"
152
+ | "avacado-600"
153
+ | "avacado-700"
154
+ | "avacado-800"
155
+ | "avacado-900"
156
+ | "avacado-950"
157
+ | "jade-50"
158
+ | "jade-100"
159
+ | "jade-200"
160
+ | "jade-300"
161
+ | "jade-400"
162
+ | "jade-500"
163
+ | "jade-600"
164
+ | "jade-700"
165
+ | "jade-800"
166
+ | "jade-900"
167
+ | "jade-950"
168
+ | "denim-50"
169
+ | "denim-100"
170
+ | "denim-200"
171
+ | "denim-300"
172
+ | "denim-400"
173
+ | "denim-500"
174
+ | "denim-600"
175
+ | "denim-700"
176
+ | "denim-800"
177
+ | "denim-900"
178
+ | "denim-950"
179
+ | "iris-50"
180
+ | "iris-100"
181
+ | "iris-200"
182
+ | "iris-300"
183
+ | "iris-400"
184
+ | "iris-500"
185
+ | "iris-600"
186
+ | "iris-700"
187
+ | "iris-800"
188
+ | "iris-900"
189
+ | "iris-950"
190
+ | "lilac-50"
191
+ | "lilac-100"
192
+ | "lilac-200"
193
+ | "lilac-300"
194
+ | "lilac-400"
195
+ | "lilac-500"
196
+ | "lilac-600"
197
+ | "lilac-700"
198
+ | "lilac-800"
199
+ | "lilac-900"
200
+ | "lilac-950"
201
+ | "coral-50"
202
+ | "coral-100"
203
+ | "coral-200"
204
+ | "coral-300"
205
+ | "coral-400"
206
+ | "coral-500"
207
+ | "coral-600"
208
+ | "coral-700"
209
+ | "coral-800"
210
+ | "coral-900"
211
+ | "coral-950"
212
+ | "wood-50"
213
+ | "wood-100"
214
+ | "wood-200"
215
+ | "wood-300"
216
+ | "wood-400"
217
+ | "wood-500"
218
+ | "wood-600"
219
+ | "wood-700"
220
+ | "wood-800"
221
+ | "wood-900"
222
+ | "wood-950"
223
+ | "silver-50"
224
+ | "silver-100"
225
+ | "silver-200"
226
+ | "silver-300"
227
+ | "silver-400"
228
+ | "silver-500"
229
+ | "silver-600"
230
+ | "silver-700"
231
+ | "silver-800"
232
+ | "silver-900"
233
+ | "silver-950"
234
+ | "steel-50"
235
+ | "steel-100"
236
+ | "steel-200"
237
+ | "steel-300"
238
+ | "steel-400"
239
+ | "steel-500"
240
+ | "steel-600"
241
+ | "steel-700"
242
+ | "steel-800"
243
+ | "steel-900"
244
+ | "steel-950"
245
+ | "olive-50"
246
+ | "olive-100"
247
+ | "olive-200"
248
+ | "olive-300"
249
+ | "olive-400"
250
+ | "olive-500"
251
+ | "olive-600"
252
+ | "olive-700"
253
+ | "olive-800"
254
+ | "olive-900"
255
+ | "olive-950"
256
+ | "sand-50"
257
+ | "sand-100"
258
+ | "sand-200"
259
+ | "sand-300"
260
+ | "sand-400"
261
+ | "sand-500"
262
+ | "sand-600"
263
+ | "sand-700"
264
+ | "sand-800"
265
+ | "sand-900"
266
+ | "sand-950"
267
+ | "tint-50"
268
+ | "tint-100"
269
+ | "tint-200"
270
+ | "tint-300"
271
+ | "tint-400"
272
+ | "tint-500"
273
+ | "tint-600"
274
+ | "tint-700"
275
+ | "tint-800"
276
+ | "tint-900"
277
+ | "tint-950";
55
278
 
56
279
  export type ColorWithGrays = ColorType | "invert" | "dimmed" | "muted";
57
280
 
@@ -78,7 +301,11 @@ export interface TooltipType {
78
301
  /**
79
302
  * tooltip color
80
303
  */
81
- color?: ColorType;
304
+ color?: ColorType | PaletteType | string;
305
+ /**
306
+ * text color
307
+ */
308
+ textColor?: ColorType | PaletteType | string;
82
309
  /**
83
310
  * tooltip placement
84
311
  */
@@ -122,15 +349,7 @@ export interface TestProps {
122
349
  "data-test-value"?: AnyObject;
123
350
  }
124
351
 
125
- export type Elements<T> =
126
- | React.ReactElement<T>
127
- | React.ReactPortal
128
- | React.ReactNode
129
- | string
130
- | number
131
- | boolean
132
- | null
133
- | undefined;
352
+ export type Elements<T> = React.ReactElement<T> | React.ReactNode;
134
353
 
135
354
  export type AriaProps = React.AriaAttributes;
136
355
 
@@ -179,11 +398,11 @@ export interface IconProps {
179
398
  /**
180
399
  * icon background color
181
400
  */
182
- iconBg?: ColorType | string;
401
+ iconBg?: ColorType | PaletteType | string;
183
402
  /**
184
403
  * icon color
185
404
  */
186
- iconColor?: ColorType | string;
405
+ iconColor?: ColorType | PaletteType | string;
187
406
  }
188
407
 
189
408
  export interface CollapseProps {
@@ -239,3 +458,8 @@ export interface SizeObject {
239
458
  width: number;
240
459
  height: number;
241
460
  }
461
+
462
+ export interface ScrollObject extends PositionObject, SizeObject {
463
+ scrollWidth?: number;
464
+ scrollHeight: number;
465
+ }
@@ -26,9 +26,13 @@ import classNames from "classnames";
26
26
  import { Fragment, useCallback, useMemo } from "react";
27
27
  import { useMemoDebugger } from "../hooks/useEffectDebugger";
28
28
  import { Tooltip, getTooltipProps } from "../overlays/tooltip/Tooltip";
29
- import { type ChildProp, type ColorType, type CssProp } from "../types";
30
- import { getColor, getColorClass } from "../utils";
31
- import classes from "./Typography.module.css";
29
+ import {
30
+ type ChildProp,
31
+ type ColorType,
32
+ type CssProp,
33
+ type PaletteType,
34
+ } from "../types";
35
+ import { getColor } from "../utils";
32
36
 
33
37
  interface AbbrTextProps {
34
38
  children: string;
@@ -49,11 +53,7 @@ const AbbrText = ({ color, children, tooltip, content }: AbbrTextProps) => {
49
53
  return (
50
54
  <TooltipWrapper {...tooltipProps}>
51
55
  <abbr
52
- className={classNames(
53
- classes.abbr,
54
- "whitespace-nowrap",
55
- color && getColorClass(color),
56
- )}
56
+ className={classNames("fabric-abbr", "whitespace-nowrap")}
57
57
  style={
58
58
  color ? ({ "--abbr-color": getColor(color) } as AnyObject) : undefined
59
59
  }
@@ -74,7 +74,13 @@ export interface AbbrProps extends ChildProp<string>, CssProp {
74
74
  *
75
75
  * [textPart, tooltip, color (class name or color string)]
76
76
  */
77
- abbr: Array<[textPart: string, tooltip: string, color?: ColorType | string]>;
77
+ abbr: Array<
78
+ [
79
+ textPart: string,
80
+ tooltip: string,
81
+ color?: ColorType | PaletteType | string,
82
+ ]
83
+ >;
78
84
  /**
79
85
  * renderer callback
80
86
  */