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

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 (343) 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/icon/Icon.js +15 -14
  65. package/dist/cjs/components/media/Media.js +116 -75
  66. package/dist/cjs/components/menu/ContextMenu.js +30 -10
  67. package/dist/cjs/components/menu/Menu.js +39 -20
  68. package/dist/cjs/components/menu/MenuItem.js +30 -16
  69. package/dist/cjs/components/meter/Meter.js +2 -3
  70. package/dist/cjs/components/navigator/Navigator.js +16 -9
  71. package/dist/cjs/components/panel/Panel.js +10 -9
  72. package/dist/cjs/components/panel/PanelGroup.js +1 -2
  73. package/dist/cjs/components/progress/ProgressBar.js +6 -5
  74. package/dist/cjs/components/progress/ProgressCircle.js +6 -4
  75. package/dist/cjs/components/tabpanel/Tab.js +58 -38
  76. package/dist/cjs/components/tabpanel/TabPanel.js +20 -16
  77. package/dist/cjs/core/aside/Aside.js +11 -10
  78. package/dist/cjs/core/boundary/ErrorBoundary.js +6 -7
  79. package/dist/cjs/core/boundary/ErrorIcon.js +1 -2
  80. package/dist/cjs/core/content/Content.js +9 -7
  81. package/dist/cjs/core/headfoot/HeadFoot.js +2 -20
  82. package/dist/cjs/core/page/Page.js +3 -3
  83. package/dist/cjs/core/responsive/Responsive.js +3 -4
  84. package/dist/cjs/core/section/Section.js +1 -2
  85. package/dist/cjs/core/theme/ThemeProvider.js +7 -8
  86. package/dist/cjs/core/viewport/Viewport.js +4 -2
  87. package/dist/cjs/hooks/useNavigator.js +6 -4
  88. package/dist/cjs/hotkeys/HotKeyLabel.js +1 -1
  89. package/dist/cjs/hotkeys/HotKeyWrapper.js +3 -1
  90. package/dist/cjs/index.js +6 -2
  91. package/dist/cjs/overlays/alert/Alert.js +19 -13
  92. package/dist/cjs/overlays/flyout/Flyout.js +42 -44
  93. package/dist/cjs/overlays/message/Message.js +6 -3
  94. package/dist/cjs/overlays/modal/Modal.js +9 -10
  95. package/dist/cjs/overlays/toast/Toast.js +17 -9
  96. package/dist/cjs/overlays/tooltip/Tooltip.js +20 -8
  97. package/dist/cjs/types/icons.js +4 -0
  98. package/dist/cjs/typography/Abbr.js +2 -3
  99. package/dist/cjs/typography/{Link.js → Anchor.js} +5 -4
  100. package/dist/cjs/typography/Mark.js +2 -3
  101. package/dist/cjs/typography/Text.js +3 -4
  102. package/dist/cjs/typography/Title.js +3 -3
  103. package/dist/cjs/utils/cloneElement.js +44 -0
  104. package/dist/cjs/utils/getColor.js +1 -18
  105. package/dist/esm/components/actionLabel/ActionLabel.js +3 -3
  106. package/dist/esm/components/animations/Animations.js +30 -19
  107. package/dist/esm/components/avatar/Avatar.js +11 -14
  108. package/dist/esm/components/avatar/AvatarGroup.js +3 -3
  109. package/dist/esm/components/badge/Badge.js +5 -5
  110. package/dist/esm/components/breadcrumbs/Breadcrumbs.js +10 -8
  111. package/dist/esm/components/button/Button.js +18 -14
  112. package/dist/esm/components/button/ButtonGroup.js +5 -4
  113. package/dist/esm/components/button/ConfirmButton.js +7 -2
  114. package/dist/esm/components/button/ToggleButtonGroup.js +4 -4
  115. package/dist/esm/components/callout/Callout.js +15 -4
  116. package/dist/esm/components/card/Card.js +8 -7
  117. package/dist/esm/components/card/CardCover.js +10 -5
  118. package/dist/esm/components/chip/Chip.js +12 -8
  119. package/dist/esm/components/collapsable/Collapsable.js +5 -5
  120. package/dist/esm/components/divider/Divider.js +11 -8
  121. package/dist/esm/components/dropdown/Dropdown.js +5 -4
  122. package/dist/esm/components/dropdown/DropdownTool.js +4 -3
  123. package/dist/esm/components/icon/Icon.js +15 -14
  124. package/dist/esm/components/media/Media.js +117 -76
  125. package/dist/esm/components/menu/ContextMenu.js +32 -12
  126. package/dist/esm/components/menu/Menu.js +41 -22
  127. package/dist/esm/components/menu/MenuItem.js +24 -10
  128. package/dist/esm/components/meter/Meter.js +2 -3
  129. package/dist/esm/components/navigator/Navigator.js +16 -9
  130. package/dist/esm/components/panel/Panel.js +10 -9
  131. package/dist/esm/components/panel/PanelGroup.js +1 -2
  132. package/dist/esm/components/progress/ProgressBar.js +6 -5
  133. package/dist/esm/components/progress/ProgressCircle.js +6 -4
  134. package/dist/esm/components/tabpanel/Tab.js +59 -39
  135. package/dist/esm/components/tabpanel/TabPanel.js +20 -16
  136. package/dist/esm/core/aside/Aside.js +11 -10
  137. package/dist/esm/core/boundary/ErrorBoundary.js +6 -7
  138. package/dist/esm/core/boundary/ErrorIcon.js +1 -2
  139. package/dist/esm/core/content/Content.js +9 -7
  140. package/dist/esm/core/headfoot/HeadFoot.js +2 -20
  141. package/dist/esm/core/page/Page.js +3 -3
  142. package/dist/esm/core/responsive/Responsive.js +3 -4
  143. package/dist/esm/core/section/Section.js +1 -2
  144. package/dist/esm/core/theme/ThemeProvider.js +7 -8
  145. package/dist/esm/core/viewport/Viewport.js +4 -2
  146. package/dist/esm/hooks/useNavigator.js +7 -5
  147. package/dist/esm/hotkeys/HotKeyLabel.js +1 -1
  148. package/dist/esm/hotkeys/HotKeyWrapper.js +3 -1
  149. package/dist/esm/index.js +3 -1
  150. package/dist/esm/overlays/alert/Alert.js +20 -14
  151. package/dist/esm/overlays/flyout/Flyout.js +43 -45
  152. package/dist/esm/overlays/message/Message.js +7 -4
  153. package/dist/esm/overlays/modal/Modal.js +10 -11
  154. package/dist/esm/overlays/toast/Toast.js +18 -10
  155. package/dist/esm/overlays/tooltip/Tooltip.js +20 -8
  156. package/dist/esm/types/icons.js +4 -0
  157. package/dist/esm/typography/Abbr.js +2 -3
  158. package/dist/esm/typography/{Link.js → Anchor.js} +6 -5
  159. package/dist/esm/typography/Mark.js +2 -3
  160. package/dist/esm/typography/Text.js +4 -5
  161. package/dist/esm/typography/Title.js +4 -4
  162. package/dist/esm/utils/cloneElement.js +44 -0
  163. package/dist/esm/utils/getColor.js +2 -16
  164. package/dist/types/components/actionLabel/ActionLabel.d.ts +2 -2
  165. package/dist/types/components/animations/Animations.d.ts +5 -5
  166. package/dist/types/components/avatar/Avatar.d.ts +3 -3
  167. package/dist/types/components/badge/Badge.d.ts +5 -1
  168. package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +2 -2
  169. package/dist/types/components/button/Button.d.ts +7 -5
  170. package/dist/types/components/button/ButtonGroup.d.ts +2 -2
  171. package/dist/types/components/button/ConfirmButton.d.ts +6 -1
  172. package/dist/types/components/callout/Callout.d.ts +2 -2
  173. package/dist/types/components/card/Card.d.ts +3 -3
  174. package/dist/types/components/chip/Chip.d.ts +3 -3
  175. package/dist/types/components/collapsable/Collapsable.d.ts +5 -1
  176. package/dist/types/components/divider/Divider.d.ts +7 -3
  177. package/dist/types/components/dropdown/DropdownTool.d.ts +2 -1
  178. package/dist/types/components/icon/Icon.d.ts +3 -3
  179. package/dist/types/components/media/Media.d.ts +2 -2
  180. package/dist/types/components/menu/ContextMenu.d.ts +2 -1
  181. package/dist/types/components/menu/MenuItem.d.ts +1 -1
  182. package/dist/types/components/menu/types.d.ts +2 -2
  183. package/dist/types/components/navigator/Navigator.d.ts +4 -4
  184. package/dist/types/components/progress/ProgressBar.d.ts +2 -2
  185. package/dist/types/components/progress/ProgressCircle.d.ts +2 -2
  186. package/dist/types/components/tabpanel/Tab.d.ts +5 -5
  187. package/dist/types/components/tabpanel/TabPanel.d.ts +10 -1
  188. package/dist/types/core/content/Content.d.ts +3 -2
  189. package/dist/types/core/headfoot/HeadFoot.d.ts +1 -9
  190. package/dist/types/core/responsive/Responsive.d.ts +1 -1
  191. package/dist/types/core/theme/ThemeProvider.d.ts +4 -4
  192. package/dist/types/hooks/useOverlayService.d.ts +3 -5
  193. package/dist/types/index.d.ts +3 -0
  194. package/dist/types/overlays/alert/Alert.d.ts +2 -2
  195. package/dist/types/overlays/flyout/Flyout.d.ts +3 -2
  196. package/dist/types/overlays/message/Message.d.ts +2 -2
  197. package/dist/types/overlays/modal/Modal.d.ts +4 -3
  198. package/dist/types/overlays/toast/Toast.d.ts +2 -2
  199. package/dist/types/overlays/tooltip/Tooltip.d.ts +1 -1
  200. package/dist/types/types/icons.d.ts +4 -0
  201. package/dist/types/types/index.d.ts +18 -6
  202. package/dist/types/typography/Abbr.d.ts +6 -2
  203. package/dist/types/typography/Anchor.d.ts +25 -0
  204. package/dist/types/typography/Mark.d.ts +2 -2
  205. package/dist/types/typography/index.d.ts +1 -1
  206. package/dist/types/utils/cloneElement.d.ts +2 -0
  207. package/dist/types/utils/getColor.d.ts +1 -4
  208. package/dist/types/utils/index.d.ts +1 -0
  209. package/package.json +7 -9
  210. package/src/components/actionLabel/ActionLabel.tsx +15 -6
  211. package/src/components/animations/Animations.tsx +29 -23
  212. package/src/components/avatar/Avatar.tsx +74 -88
  213. package/src/components/avatar/AvatarGroup.tsx +4 -4
  214. package/src/components/badge/Badge.tsx +11 -7
  215. package/src/components/breadcrumbs/Breadcrumbs.tsx +13 -9
  216. package/src/components/button/Button.tsx +27 -22
  217. package/src/components/button/ButtonGroup.tsx +7 -7
  218. package/src/components/button/ConfirmButton.tsx +15 -5
  219. package/src/components/button/ToggleButtonGroup.tsx +5 -5
  220. package/src/components/callout/Callout.tsx +26 -11
  221. package/src/components/card/Card.tsx +10 -7
  222. package/src/components/card/CardCover.tsx +11 -6
  223. package/src/components/chip/Chip.tsx +17 -13
  224. package/src/components/collapsable/Collapsable.tsx +9 -4
  225. package/src/components/divider/Divider.tsx +15 -10
  226. package/src/components/dropdown/Dropdown.tsx +5 -5
  227. package/src/components/dropdown/DropdownTool.tsx +5 -3
  228. package/src/components/icon/Icon.tsx +55 -67
  229. package/src/components/media/Media.tsx +141 -106
  230. package/src/components/menu/ContextMenu.tsx +36 -11
  231. package/src/components/menu/Menu.tsx +51 -30
  232. package/src/components/menu/MenuItem.tsx +19 -9
  233. package/src/components/menu/types.ts +2 -2
  234. package/src/components/meter/Meter.tsx +2 -3
  235. package/src/components/navigator/Navigator.tsx +19 -5
  236. package/src/components/panel/Panel.tsx +10 -9
  237. package/src/components/panel/PanelGroup.tsx +1 -2
  238. package/src/components/progress/ProgressBar.tsx +8 -9
  239. package/src/components/progress/ProgressCircle.tsx +6 -9
  240. package/src/components/tabpanel/Tab.tsx +81 -64
  241. package/src/components/tabpanel/TabPanel.tsx +34 -12
  242. package/src/core/aside/Aside.tsx +11 -10
  243. package/src/core/boundary/ErrorBoundary.tsx +8 -7
  244. package/src/core/boundary/ErrorIcon.tsx +1 -2
  245. package/src/core/content/Content.tsx +17 -12
  246. package/src/core/headfoot/HeadFoot.tsx +2 -35
  247. package/src/core/page/Page.tsx +3 -3
  248. package/src/core/responsive/Responsive.tsx +8 -7
  249. package/src/core/section/Section.tsx +1 -2
  250. package/src/core/theme/ThemeProvider.tsx +11 -12
  251. package/src/core/viewport/Viewport.tsx +1 -2
  252. package/src/hooks/useNavigator.tsx +10 -5
  253. package/src/hooks/useOverlayService.tsx +12 -6
  254. package/src/hotkeys/HotKeyLabel.tsx +1 -1
  255. package/src/hotkeys/HotKeyWrapper.tsx +3 -1
  256. package/src/index.ts +4 -0
  257. package/src/overlays/alert/Alert.tsx +25 -31
  258. package/src/overlays/flyout/Flyout.tsx +65 -64
  259. package/src/overlays/message/Message.tsx +10 -7
  260. package/src/overlays/modal/Modal.tsx +18 -13
  261. package/src/overlays/toast/Toast.tsx +18 -27
  262. package/src/overlays/tooltip/Tooltip.tsx +30 -9
  263. package/src/types/icons.ts +9 -0
  264. package/src/types/index.ts +240 -27
  265. package/src/typography/Abbr.tsx +15 -9
  266. package/src/typography/{Link.tsx → Anchor.tsx} +8 -13
  267. package/src/typography/Mark.tsx +4 -9
  268. package/src/typography/Text.tsx +4 -12
  269. package/src/typography/Title.tsx +2 -6
  270. package/src/typography/index.ts +1 -1
  271. package/src/utils/cloneElement.ts +44 -0
  272. package/src/utils/getColor.ts +1 -17
  273. package/src/utils/index.ts +1 -0
  274. package/css/index.js +0 -250
  275. package/css/tailwind/colors.ts +0 -158
  276. package/dist/cjs/components/actionLabel/ActionLabel.module.css +0 -1
  277. package/dist/cjs/components/animations/Animations.module.css +0 -1
  278. package/dist/cjs/components/avatar/Avatar.module.css +0 -1
  279. package/dist/cjs/components/badge/Badge.module.css +0 -1
  280. package/dist/cjs/components/breadcrumbs/Breadcrumbs.module.css +0 -1
  281. package/dist/cjs/components/button/Button.module.css +0 -1
  282. package/dist/cjs/components/card/Card.module.css +0 -1
  283. package/dist/cjs/components/chip/Chip.module.css +0 -1
  284. package/dist/cjs/components/collapsable/Collapsable.module.css +0 -1
  285. package/dist/cjs/components/dropdown/Dropdown.module.css +0 -1
  286. package/dist/cjs/components/icon/Icon.module.css +0 -1
  287. package/dist/cjs/components/media/Media.module.css +0 -1
  288. package/dist/cjs/components/menu/Menu.module.css +0 -1
  289. package/dist/cjs/components/meter/Meter.module.css +0 -1
  290. package/dist/cjs/components/panel/Panel.module.css +0 -1
  291. package/dist/cjs/components/progress/Progress.module.css +0 -1
  292. package/dist/cjs/components/tabpanel/TabPanel.module.css +0 -1
  293. package/dist/cjs/core/aside/Aside.module.css +0 -1
  294. package/dist/cjs/core/boundary/ErrorBoundary.module.css +0 -1
  295. package/dist/cjs/core/content/Content.module.css +0 -1
  296. package/dist/cjs/core/headfoot/HeadFoot.module.css +0 -1
  297. package/dist/cjs/core/page/Page.module.css +0 -1
  298. package/dist/cjs/core/responsive/Responsive.module.css +0 -1
  299. package/dist/cjs/core/section/Section.module.css +0 -1
  300. package/dist/cjs/core/theme/Theme.module.css +0 -1
  301. package/dist/cjs/core/viewport/Viewport.module.css +0 -1
  302. package/dist/cjs/overlays/alert/Alert.module.css +0 -1
  303. package/dist/cjs/overlays/flyout/Flyout.module.css +0 -1
  304. package/dist/cjs/overlays/message/Message.module.css +0 -1
  305. package/dist/cjs/overlays/modal/Modal.module.css +0 -1
  306. package/dist/cjs/overlays/toast/Toast.module.css +0 -1
  307. package/dist/cjs/overlays/tooltip/Tooltip.module.css +0 -1
  308. package/dist/cjs/typography/Typography.module.css +0 -1
  309. package/dist/esm/components/actionLabel/ActionLabel.module.css +0 -1
  310. package/dist/esm/components/animations/Animations.module.css +0 -1
  311. package/dist/esm/components/avatar/Avatar.module.css +0 -1
  312. package/dist/esm/components/badge/Badge.module.css +0 -1
  313. package/dist/esm/components/breadcrumbs/Breadcrumbs.module.css +0 -1
  314. package/dist/esm/components/button/Button.module.css +0 -1
  315. package/dist/esm/components/card/Card.module.css +0 -1
  316. package/dist/esm/components/chip/Chip.module.css +0 -1
  317. package/dist/esm/components/collapsable/Collapsable.module.css +0 -1
  318. package/dist/esm/components/dropdown/Dropdown.module.css +0 -1
  319. package/dist/esm/components/icon/Icon.module.css +0 -1
  320. package/dist/esm/components/media/Media.module.css +0 -1
  321. package/dist/esm/components/menu/Menu.module.css +0 -1
  322. package/dist/esm/components/meter/Meter.module.css +0 -1
  323. package/dist/esm/components/panel/Panel.module.css +0 -1
  324. package/dist/esm/components/progress/Progress.module.css +0 -1
  325. package/dist/esm/components/tabpanel/TabPanel.module.css +0 -1
  326. package/dist/esm/core/aside/Aside.module.css +0 -1
  327. package/dist/esm/core/boundary/ErrorBoundary.module.css +0 -1
  328. package/dist/esm/core/content/Content.module.css +0 -1
  329. package/dist/esm/core/headfoot/HeadFoot.module.css +0 -1
  330. package/dist/esm/core/page/Page.module.css +0 -1
  331. package/dist/esm/core/responsive/Responsive.module.css +0 -1
  332. package/dist/esm/core/section/Section.module.css +0 -1
  333. package/dist/esm/core/theme/Theme.module.css +0 -1
  334. package/dist/esm/core/viewport/Viewport.module.css +0 -1
  335. package/dist/esm/overlays/alert/Alert.module.css +0 -1
  336. package/dist/esm/overlays/flyout/Flyout.module.css +0 -1
  337. package/dist/esm/overlays/message/Message.module.css +0 -1
  338. package/dist/esm/overlays/modal/Modal.module.css +0 -1
  339. package/dist/esm/overlays/toast/Toast.module.css +0 -1
  340. package/dist/esm/overlays/tooltip/Tooltip.module.css +0 -1
  341. package/dist/esm/typography/Typography.module.css +0 -1
  342. package/dist/types/typography/Link.d.ts +0 -25
  343. package/src/overlays/tooltip/Tooltip.module.css +0 -53
@@ -38,6 +38,8 @@ export declare namespace CoreIcons {
38
38
  const collapseActive = "M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
39
39
  const expandAll = "M5.293 16.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.414zM18.707 7.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.414z";
40
40
  const colapseAll = "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";
41
+ const expandAllVar = "M13,9V15H16L12,19L8,15H11V9H8L12,5L16,9H13M4,2H20V4H4V2M4,20H20V22H4V20Z";
42
+ const colapseAllVar = "M4,12H20V14H4V12M4,9H20V11H4V9M16,4L12,8L8,4H11V1H13V4H16M8,19L12,15L16,19H13V22H11V19H8Z";
41
43
  const folderClosed = "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";
42
44
  const folderOpen = "M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z";
43
45
  const zoomIn = "M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414zM8 12h2v2c0 0.552 0.448 1 1 1s1-0.448 1-1v-2h2c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2v-2c0-0.552-0.448-1-1-1s-1 0.448-1 1v2h-2c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
@@ -105,6 +107,7 @@ export declare namespace CoreIcons {
105
107
  const mic = "M12 2c0.553 0 1.051 0.223 1.414 0.586s0.586 0.861 0.586 1.414v8c0 0.553-0.223 1.051-0.586 1.414s-0.861 0.586-1.414 0.586-1.051-0.223-1.414-0.586-0.586-0.861-0.586-1.414v-8c0-0.553 0.223-1.051 0.586-1.414s0.861-0.586 1.414-0.586zM12 0c-1.104 0-2.106 0.449-2.828 1.172s-1.172 1.724-1.172 2.828v8c0 1.104 0.449 2.106 1.172 2.828s1.724 1.172 2.828 1.172 2.106-0.449 2.828-1.172 1.172-1.724 1.172-2.828v-8c0-1.104-0.449-2.106-1.172-2.828s-1.724-1.172-2.828-1.172zM8 24h8c0.552 0 1-0.448 1-1s-0.448-1-1-1h-3v-2.062c1.809-0.226 3.432-1.056 4.657-2.281 1.446-1.447 2.343-3.448 2.343-5.657v-2c0-0.552-0.448-1-1-1s-1 0.448-1 1v2c0 1.657-0.67 3.156-1.757 4.243s-2.586 1.757-4.243 1.757-3.156-0.67-4.243-1.757-1.757-2.586-1.757-4.243v-2c0-0.552-0.448-1-1-1s-1 0.448-1 1v2c0 2.209 0.897 4.21 2.343 5.657 1.225 1.225 2.847 2.055 4.657 2.281v2.062h-3c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
106
108
  const play = "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";
107
109
  const pause = "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";
110
+ const stop = "M18,18H6V6H18V18Z";
108
111
  const volumeOn = "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";
109
112
  const volumeOff = "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.219zM16.293 9.707l2.293 2.293-2.293 2.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l2.293-2.293 2.293 2.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-2.293-2.293 2.293-2.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-2.293 2.293-2.293-2.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
110
113
  const alignLeft = "M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z";
@@ -152,6 +155,7 @@ export declare namespace CoreIcons {
152
155
  const radioOn = "M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z";
153
156
  const colorSwatch = "M16 14V12H17.61C17.85 12.71 18 13.39 18 14H16M15.58 8C15.12 7.29 14.65 6.61 14.2 6H14V8H15.58M16 12V10H14V12H16M16 8.68V10H16.74C16.5 9.56 16.26 9.11 16 8.68M12 16V14H14V12H12V10H14V8H12V6H14V5.73C12.9 4.26 12 3.25 12 3.25S6 10 6 14C6 17.31 8.69 20 12 20V18H14V16H12M14 19.65C14.75 19.39 15.42 19 16 18.46V18H14V19.65M14 16H16V14H14V16M16 18H16.46C17 17.42 17.39 16.75 17.65 16H16V18Z";
154
157
  const colorPicker = "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";
158
+ const list = "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";
155
159
  /**
156
160
  * alert icons
157
161
  */
@@ -1,9 +1,13 @@
1
1
  import { type Placement } from "@floating-ui/react";
2
2
  import { type JSXElementConstructor, type Ref } from "react";
3
+ export type ModalProps<P = unknown> = P & {
4
+ onClose: (...args: AnyObject) => void;
5
+ };
3
6
  export type SizeType = "xs" | "sm" | "md" | "lg" | "xl";
4
7
  export type SizeTypeWithZero = "xs" | "sm" | "md" | "lg" | "xl" | 0;
5
- export type ColorType = "primary" | "accent" | "info" | "danger" | "success" | "warning";
6
- export type PaletteType = "scarlet" | "pumpkin" | "marigold" | "avacado" | "jade" | "denim" | "iris" | "lilac" | "coral" | "wood" | "silver" | "steel" | "olive" | "sand";
8
+ export type ColorState = "primary" | "accent" | "info" | "danger" | "success" | "warning";
9
+ export type ColorType = "primary-50" | "accent-50" | "info-50" | "danger-50" | "success-50" | "warning-50" | "primary-100" | "accent-100" | "info-100" | "danger-100" | "success-100" | "warning-100" | "primary-200" | "accent-200" | "info-200" | "danger-200" | "success-200" | "warning-200" | "primary-300" | "accent-300" | "info-300" | "danger-300" | "success-300" | "warning-300" | "primary-400" | "accent-400" | "info-400" | "danger-400" | "success-400" | "warning-400" | "primary-500" | "accent-500" | "info-500" | "danger-500" | "success-500" | "warning-500" | "primary-600" | "accent-600" | "info-600" | "danger-600" | "success-600" | "warning-600" | "primary-700" | "accent-700" | "info-700" | "danger-700" | "success-700" | "warning-700" | "primary-800" | "accent-800" | "info-800" | "danger-800" | "success-800" | "warning-800" | "primary-900" | "accent-900" | "info-900" | "danger-900" | "success-900" | "warning-900" | "primary-950" | "accent-950" | "info-950" | "danger-950" | "success-950" | "warning-950";
10
+ export type PaletteType = "scarlet-50" | "pumpkin-50" | "marigold-50" | "avacado-50" | "jade-50" | "denim-50" | "iris-50" | "lilac-50" | "coral-50" | "wood-50" | "silver-50" | "steel-50" | "olive-50" | "sand-50" | "scarlet-100" | "pumpkin-100" | "marigold-100" | "avacado-100" | "jade-100" | "denim-100" | "iris-100" | "lilac-100" | "coral-100" | "wood-100" | "silver-100" | "steel-100" | "olive-100" | "sand-100" | "scarlet-200" | "pumpkin-200" | "marigold-200" | "avacado-200" | "jade-200" | "denim-200" | "iris-200" | "lilac-200" | "coral-200" | "wood-200" | "silver-200" | "steel-200" | "olive-200" | "sand-200" | "scarlet-300" | "pumpkin-300" | "marigold-300" | "avacado-300" | "jade-300" | "denim-300" | "iris-300" | "lilac-300" | "coral-300" | "wood-300" | "silver-300" | "steel-300" | "olive-300" | "sand-300" | "scarlet-400" | "pumpkin-400" | "marigold-400" | "avacado-400" | "jade-400" | "denim-400" | "iris-400" | "lilac-400" | "coral-400" | "wood-400" | "silver-400" | "steel-400" | "olive-400" | "sand-400" | "scarlet-500" | "pumpkin-500" | "marigold-500" | "avacado-500" | "jade-500" | "denim-500" | "iris-500" | "lilac-500" | "coral-500" | "wood-500" | "silver-500" | "steel-500" | "olive-500" | "sand-500" | "scarlet-600" | "pumpkin-600" | "marigold-600" | "avacado-600" | "jade-600" | "denim-600" | "iris-600" | "lilac-600" | "coral-600" | "wood-600" | "silver-600" | "steel-600" | "olive-600" | "sand-600" | "scarlet-700" | "pumpkin-700" | "marigold-700" | "avacado-700" | "jade-700" | "denim-700" | "iris-700" | "lilac-700" | "coral-700" | "wood-700" | "silver-700" | "steel-700" | "olive-700" | "sand-700" | "scarlet-800" | "pumpkin-800" | "marigold-800" | "avacado-800" | "jade-800" | "denim-800" | "iris-800" | "lilac-800" | "coral-800" | "wood-800" | "silver-800" | "steel-800" | "olive-800" | "sand-800" | "scarlet-900" | "pumpkin-900" | "marigold-900" | "avacado-900" | "jade-900" | "denim-900" | "iris-900" | "lilac-900" | "coral-900" | "wood-900" | "silver-900" | "steel-900" | "olive-900" | "sand-900" | "scarlet-950" | "pumpkin-950" | "marigold-950" | "avacado-950" | "jade-950" | "denim-950" | "iris-950" | "lilac-950" | "coral-950" | "wood-950" | "silver-950" | "steel-950" | "olive-950" | "sand-950";
7
11
  export type ColorWithGrays = ColorType | "invert" | "dimmed" | "muted";
8
12
  export declare const ThemeColors: string[];
9
13
  export interface TooltipType {
@@ -14,7 +18,11 @@ export interface TooltipType {
14
18
  /**
15
19
  * tooltip color
16
20
  */
17
- color?: ColorType;
21
+ color?: ColorType | PaletteType | string;
22
+ /**
23
+ * text color
24
+ */
25
+ textColor?: ColorType | PaletteType | string;
18
26
  /**
19
27
  * tooltip placement
20
28
  */
@@ -54,7 +62,7 @@ export interface TestProps {
54
62
  */
55
63
  "data-test-value"?: AnyObject;
56
64
  }
57
- export type Elements<T> = React.ReactElement<T> | React.ReactPortal | React.ReactNode | string | number | boolean | null | undefined;
65
+ export type Elements<T> = React.ReactElement<T> | React.ReactNode;
58
66
  export type AriaProps = React.AriaAttributes;
59
67
  /**
60
68
  * For wrapping components
@@ -84,11 +92,11 @@ export interface IconProps {
84
92
  /**
85
93
  * icon background color
86
94
  */
87
- iconBg?: ColorType | string;
95
+ iconBg?: ColorType | PaletteType | string;
88
96
  /**
89
97
  * icon color
90
98
  */
91
- iconColor?: ColorType | string;
99
+ iconColor?: ColorType | PaletteType | string;
92
100
  }
93
101
  export interface CollapseProps {
94
102
  /**
@@ -138,3 +146,7 @@ export interface SizeObject {
138
146
  width: number;
139
147
  height: number;
140
148
  }
149
+ export interface ScrollObject extends PositionObject, SizeObject {
150
+ scrollWidth?: number;
151
+ scrollHeight: number;
152
+ }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { type ChildProp, type ColorType, type CssProp } from "../types";
2
+ import { type ChildProp, type ColorType, type CssProp, type PaletteType } from "../types";
3
3
  export interface AbbrProps extends ChildProp<string>, CssProp {
4
4
  /**
5
5
  * content to copy using the tooltip copy action
@@ -10,7 +10,11 @@ export interface AbbrProps extends ChildProp<string>, CssProp {
10
10
  *
11
11
  * [textPart, tooltip, color (class name or color string)]
12
12
  */
13
- abbr: Array<[textPart: string, tooltip: string, color?: ColorType | string]>;
13
+ abbr: Array<[
14
+ textPart: string,
15
+ tooltip: string,
16
+ color?: ColorType | PaletteType | string
17
+ ]>;
14
18
  /**
15
19
  * renderer callback
16
20
  */
@@ -0,0 +1,25 @@
1
+ import { type MouseEventHandler } from "react";
2
+ import { type AriaProps, type ChildrenProp, type ColorType, type CssProp, type PaletteType, type PolymorphicProps, type RefProp, type SizeType } from "../types";
3
+ export interface AnchorProps extends ChildrenProp, CssProp, RefProp, AriaProps {
4
+ /**
5
+ * link background (CSS color / tailwind color)
6
+ */
7
+ bg?: ColorType | PaletteType | string;
8
+ /**
9
+ * link color (CSS color / tailwind color)
10
+ */
11
+ color?: ColorType | PaletteType | string;
12
+ /**
13
+ * link size
14
+ */
15
+ size?: SizeType | number | string;
16
+ /**
17
+ * font family
18
+ */
19
+ family?: "sans" | "serif" | "mono";
20
+ onClick?: MouseEventHandler;
21
+ }
22
+ /**
23
+ * Typography link component
24
+ */
25
+ export declare const Anchor: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "a">({ ref, as, children, className, bg, color, family, size, ...aria }: AnchorProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { type ChildProp, type ColorType } from "../types";
2
+ import { type ChildProp, type ColorType, type PaletteType } from "../types";
3
3
  export interface MarkProps extends ChildProp<string> {
4
4
  /**
5
5
  * texts to match and abbreviate within
6
6
  *
7
7
  * [textPart, color (class name or color string)]
8
8
  */
9
- mark: Array<[textPart: string, color?: ColorType | string]>;
9
+ mark: Array<[textPart: string, color?: ColorType | PaletteType | string]>;
10
10
  /**
11
11
  * renderer callback
12
12
  */
@@ -1,6 +1,6 @@
1
1
  export { Abbr } from "./Abbr";
2
+ export { Anchor } from "./Anchor";
2
3
  export { Copy } from "./Copy";
3
- export { Link } from "./Link";
4
4
  export { Mark } from "./Mark";
5
5
  export { Text } from "./Text";
6
6
  export { Title } from "./Title";
@@ -0,0 +1,2 @@
1
+ import { type ReactNode } from "react";
2
+ export declare const cloneChildren: (children: ReactNode, callback: (child: ReactNode, index: number) => ReactNode) => ReactNode;
@@ -1,4 +1 @@
1
- export declare const getColor: (color: string) => string | undefined;
2
- export declare const getBgClass: (bg: string) => string | undefined;
3
- export declare const getColorClass: (color: string) => string | undefined;
4
- export declare const getBorderClass: (color: string) => string | undefined;
1
+ export declare const getColor: (color: string) => string;
@@ -1,3 +1,4 @@
1
1
  export * from "./calculateDimensions";
2
+ export * from "./cloneElement";
2
3
  export * from "./getColor";
3
4
  export * from "./nodeCheck";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/core",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.40",
4
4
  "description": "RUF: Core package",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -36,25 +36,23 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@floating-ui/react": "^0.26.24",
39
- "@react-fabric/utilities": "^1.0.0-beta.4",
40
- "@tailwindcss/container-queries": "^0.1.1",
41
- "@tailwindcss/forms": "^0.5.7",
42
- "@tailwindcss/typography": "^0.5.13",
39
+ "@react-fabric/utilities": "^1.0.0-beta.40",
40
+ "@tailwindcss/postcss": "~4.0.14",
43
41
  "boring-avatars": "^1.10.2",
44
42
  "classnames": "^2.5.1",
45
43
  "color": "^4.2.3",
46
44
  "resize-observer-polyfill": "^1.5.1",
47
- "tailwindcss": "^3.4.4"
45
+ "tailwindcss": "^4.0.14"
48
46
  },
49
47
  "peerDependencies": {
50
48
  "i18next": "^23.15.1",
51
- "react": ">=18.0.0 <20.0.0",
52
- "react-dom": ">=18.0.0 <20.0.0",
49
+ "react": "^19.0.0",
50
+ "react-dom": "^19.0.0",
53
51
  "react-i18next": "^15.0.2"
54
52
  },
55
53
  "engines": {
56
54
  "node": ">=18.12.0",
57
55
  "npm": ">=8.19.0"
58
56
  },
59
- "gitHead": "47b0aede19252a3a3ef8df75c08a21caabde8100"
57
+ "gitHead": "ede05c84683697d85e28a0ae380cb9b74d693f51"
60
58
  }
@@ -22,12 +22,20 @@
22
22
  */
23
23
 
24
24
  import classNames from "classnames";
25
- import { type ReactElement, useCallback } from "react";
26
- import { type AriaProps, type ChildProp, type CssProp } from "../../types";
25
+ import { useCallback, type ReactElement } from "react";
26
+ import {
27
+ type AriaProps,
28
+ type ChildProp,
29
+ type CssProp,
30
+ type TestProps,
31
+ } from "../../types";
27
32
  import { ButtonGroup } from "../button/ButtonGroup";
28
- import classes from "./ActionLabel.module.css";
29
33
 
30
- export interface ActionLabelProps extends AriaProps, CssProp, ChildProp {
34
+ export interface ActionLabelProps
35
+ extends AriaProps,
36
+ CssProp,
37
+ ChildProp,
38
+ TestProps {
31
39
  /**
32
40
  * action buttons aligment
33
41
  */
@@ -75,7 +83,7 @@ export const ActionLabel = ({
75
83
  <div
76
84
  className={classNames(
77
85
  className,
78
- classes.actionLabel,
86
+ "fabric-actionLabel",
79
87
  "flex overflow-hidden gap-1 items-center cursor-default select-none",
80
88
  )}
81
89
  data-disabled={disabled}
@@ -83,8 +91,9 @@ export const ActionLabel = ({
83
91
  >
84
92
  <ButtonGroup
85
93
  ref={calculateBasis}
94
+ data-inner-clickable
86
95
  className={classNames(
87
- classes.actions,
96
+ "fabric-actions",
88
97
  "overflow-hidden flex-content",
89
98
  align === "end" && "order-2",
90
99
  )}
@@ -30,19 +30,18 @@ import {
30
30
  type CssProp,
31
31
  type PaletteType,
32
32
  } from "../../types";
33
- import { getColor, getColorClass } from "../../utils";
34
- import classes from "./Animations.module.css";
33
+ import { getColor } from "../../utils";
35
34
 
36
35
  export interface AnimationProps extends CssProp, AriaProps {
37
36
  type?: "info" | "check" | "cross" | "question" | "exclaim";
38
37
  /**
39
38
  * icon color
40
39
  */
41
- color?: ColorType | PaletteType;
40
+ color?: ColorType | PaletteType | string;
42
41
  /**
43
42
  * icon mark color
44
43
  */
45
- strokeColor?: ColorType | PaletteType;
44
+ strokeColor?: ColorType | PaletteType | string;
46
45
  }
47
46
 
48
47
  export const AnimationIndicator = ({
@@ -80,10 +79,9 @@ export const AnimationIndicator = ({
80
79
  <svg
81
80
  data-ref="animated-indicator"
82
81
  className={classNames(
83
- classes.checkAnimation,
82
+ "fabric-checkAnimation",
84
83
  className,
85
84
  "inline-block rounded-full",
86
- color && getColorClass(color),
87
85
  )}
88
86
  style={styles}
89
87
  xmlns="http://www.w3.org/2000/svg"
@@ -91,12 +89,14 @@ export const AnimationIndicator = ({
91
89
  aria-hidden="true"
92
90
  {...aria}
93
91
  >
94
- <circle className={classes.circlePart} cx="26" cy="26" r="25" />
92
+ <circle className={"fabric-circlePart"} cx="26" cy="26" r="25" />
95
93
  <path
96
- className={classNames(
97
- classes.iconPart,
98
- getColorClass(strokeColor ?? "invert"),
99
- )}
94
+ className={classNames("fabric-iconPart")}
95
+ style={{
96
+ color: strokeColor
97
+ ? getColor(strokeColor)
98
+ : "var(--text-color-invert)",
99
+ }}
100
100
  d={path}
101
101
  />
102
102
  </svg>
@@ -104,10 +104,10 @@ export const AnimationIndicator = ({
104
104
  };
105
105
 
106
106
  export const AnimationBars = ({
107
- color = "tint",
107
+ color = "tint-500",
108
108
  size = "2rem",
109
109
  }: {
110
- color?: ColorType | string;
110
+ color?: ColorType | PaletteType | string;
111
111
  size?: number | string;
112
112
  }) => {
113
113
  return (
@@ -118,12 +118,12 @@ export const AnimationBars = ({
118
118
  >
119
119
  <div
120
120
  className={classNames(
121
- "outline outline-tint-500/20 p-4 bg-base/50 backdrop-blur-sm rounded",
121
+ "outline outline-tint-500/20 p-4 bg-tint-50/50 backdrop-blur-sm rounded",
122
122
  )}
123
123
  >
124
124
  <div
125
- className={classNames(classes.bars, getColorClass(color + "-500/50"))}
126
- style={{ width: size }}
125
+ className={classNames("fabric-bars")}
126
+ style={{ width: size, color: getColor(color) }}
127
127
  />
128
128
  </div>
129
129
  </div>
@@ -134,7 +134,7 @@ export const AnimationSpinner = ({
134
134
  color = "tint-700",
135
135
  size = "2rem",
136
136
  }: {
137
- color?: ColorType | string;
137
+ color?: ColorType | PaletteType | string;
138
138
  size?: number | string;
139
139
  }) => {
140
140
  return (
@@ -142,15 +142,16 @@ export const AnimationSpinner = ({
142
142
  className={classNames(
143
143
  "absolute inset-0 z-10 flex justify-center items-center cursor-wait",
144
144
  )}
145
+ data-ref="spinner"
145
146
  >
146
147
  <div
147
148
  className={classNames(
148
- "outline outline-tint-500/20 p-4 bg-base/50 backdrop-blur-sm rounded",
149
+ "outline outline-tint-500/20 p-4 bg-tint-50/50 backdrop-blur-sm rounded",
149
150
  )}
150
151
  >
151
152
  <div
152
- className={classNames(classes.spinner, getColorClass(color))}
153
- style={{ width: size }}
153
+ className={classNames("fabric-spinner")}
154
+ style={{ width: size, color: getColor(color) }}
154
155
  />
155
156
  </div>
156
157
  </div>
@@ -161,18 +162,23 @@ export const Loading = () => {
161
162
  return (
162
163
  <div
163
164
  className={classNames(
164
- classes.loader,
165
+ "fabric-loader",
165
166
  "area-[loader] relative overflow-x-clip",
166
167
  )}
168
+ data-ref="loading"
167
169
  >
168
170
  <div className="absolute z-10 py-px inset-x-0 top-0 after:h-0.5 after:block after:bg-primary-500" />
169
171
  </div>
170
172
  );
171
173
  };
172
174
 
173
- export const Skeleton = () => {
175
+ export const Skeleton = ({ className, ...rest }: CssProp) => {
174
176
  return (
175
- <div className={classNames("p-2 animate-pulse flex gap-2 max-w-lg")}>
177
+ <div
178
+ className={classNames(className, "p-2 animate-pulse flex gap-2 max-w-lg")}
179
+ data-ref="skeleton"
180
+ {...rest}
181
+ >
176
182
  <div className="bg-tint-100 rounded aspect-square h-12" />
177
183
  <div className="flex-1 flex flex-col gap-2">
178
184
  <div className="bg-tint-100 h-3 rounded-full" />
@@ -24,9 +24,9 @@
24
24
  import { isSvgPath } from "@react-fabric/utilities";
25
25
  import BoringAvatar from "boring-avatars";
26
26
  import classNames from "classnames";
27
- import { useState } from "react";
28
- import { useMemoDebugger } from "../../hooks/useEffectDebugger";
27
+ import { useMemo, useState } from "react";
29
28
  import {
29
+ type PaletteType,
30
30
  type AriaProps,
31
31
  type ColorType,
32
32
  type CssProp,
@@ -34,8 +34,7 @@ import {
34
34
  type SizeType,
35
35
  type TestProps,
36
36
  } from "../../types";
37
- import { getBgClass, getColor, getColorClass } from "../../utils";
38
- import classes from "./Avatar.module.css";
37
+ import { getColor } from "../../utils";
39
38
 
40
39
  export interface AvatarProps extends CssProp, AriaProps, TestProps, RefProp {
41
40
  /**
@@ -57,11 +56,11 @@ export interface AvatarProps extends CssProp, AriaProps, TestProps, RefProp {
57
56
  /**
58
57
  * background color (CSS color / tailwind color)
59
58
  */
60
- bg?: ColorType | string;
59
+ bg?: ColorType | PaletteType | string;
61
60
  /**
62
61
  * icon color (CSS color / tailwind color)
63
62
  */
64
- color?: ColorType | string;
63
+ color?: ColorType | PaletteType | string;
65
64
  /**
66
65
  * icon size
67
66
  */
@@ -109,99 +108,86 @@ export const Avatar = ({
109
108
  const [fallback, setFallback] = useState(true);
110
109
 
111
110
  /** ***************** style map *******************/
112
- const styles = useMemoDebugger(
113
- () => {
114
- const s: KeyValue = {};
115
- if (bg) {
116
- s.backgroundColor = getColor(bg);
117
- }
118
- if (color) {
119
- s.color = getColor(color);
120
- }
121
- if (size && !(size in SizeMap)) {
122
- s.fontSize = size;
123
- }
124
- if (size && size in SizeMap) {
125
- s.fontSize = SizeMap[size];
126
- }
127
- return s;
128
- },
129
- [bg, color, size],
130
- "Avatar styles",
131
- );
111
+ const styles = useMemo(() => {
112
+ const s: KeyValue = {};
113
+ if (bg) {
114
+ s.backgroundColor = getColor(bg);
115
+ }
116
+ if (color) {
117
+ s.color = getColor(color);
118
+ }
119
+ if (size && !(size in SizeMap)) {
120
+ s.fontSize = size;
121
+ }
122
+ if (size && size in SizeMap) {
123
+ s.fontSize = SizeMap[size];
124
+ }
125
+ return s;
126
+ }, [bg, color, size]);
132
127
 
133
128
  /** ***************** render icon *******************/
134
- const avatarImage = useMemoDebugger(
135
- () => {
136
- setFallback(!avatar);
129
+ const avatarImage = useMemo(() => {
130
+ setFallback(!avatar);
131
+ return (
132
+ avatar && (
133
+ <div className="contents">
134
+ <div
135
+ className={classNames(
136
+ "fabric-imgPlaceholder",
137
+ "absolute inset-0 bg-gray animate-pulse",
138
+ )}
139
+ />
140
+ <img
141
+ src={avatar}
142
+ alt={avatar}
143
+ className="align-baseline"
144
+ onError={() => setFallback(true)}
145
+ onLoad={(e) => e.currentTarget.previousElementSibling?.remove()}
146
+ />
147
+ </div>
148
+ )
149
+ );
150
+ }, [avatar]);
151
+
152
+ const fallbackAvatar = useMemo(() => {
153
+ if (fallbackIcon) {
154
+ return isSvgPath(fallbackIcon) ? (
155
+ <svg viewBox={viewBox}>
156
+ <path fill="currentColor" d={fallbackIcon.toString()} />
157
+ </svg>
158
+ ) : (
159
+ <i className={fallbackIcon} />
160
+ );
161
+ }
162
+ if (variant === "text") {
163
+ const [, first, second, group] = name.match(
164
+ /(?=(\w).* (\w).*)|(?=(\w\w).*)/,
165
+ ) as string[];
137
166
  return (
138
- avatar && (
139
- <div className="contents">
140
- <div
141
- className={classNames(
142
- classes.imgPlaceholder,
143
- "absolute inset-0 bg-gray animate-pulse",
144
- )}
145
- />
146
- <img
147
- src={avatar}
148
- alt={avatar}
149
- className="align-baseline"
150
- onError={() => setFallback(true)}
151
- onLoad={(e) => e.currentTarget.previousElementSibling?.remove()}
152
- />
153
- </div>
154
- )
167
+ <svg role="img">
168
+ <text
169
+ x="50%"
170
+ y="50%"
171
+ dy=".1em"
172
+ dominantBaseline="middle"
173
+ textAnchor="middle"
174
+ style={{ fontSize: ".5em", fontWeight: 500 }}
175
+ >
176
+ {group ?? `${first}${second}`}
177
+ </text>
178
+ </svg>
155
179
  );
156
- },
157
- [avatar],
158
- "Avatar icon",
159
- );
160
-
161
- const fallbackAvatar = useMemoDebugger(
162
- () => {
163
- if (fallbackIcon) {
164
- return isSvgPath(fallbackIcon) ? (
165
- <svg viewBox={viewBox}>
166
- <path fill="currentColor" d={fallbackIcon.toString()} />
167
- </svg>
168
- ) : (
169
- <i className={fallbackIcon} />
170
- );
171
- }
172
- if (variant === "text") {
173
- const [, first, second, group] =
174
- name.match(/(?=(\w).* (\w).*)|(?=(\w\w).*)/) ?? [];
175
- return (
176
- <svg role="img">
177
- <text
178
- x="50%"
179
- y="50%"
180
- dy=".1em"
181
- dominantBaseline="middle"
182
- textAnchor="middle"
183
- style={{ fontSize: ".5em", fontWeight: 500 }}
184
- >
185
- {group ?? `${first}${second}`}
186
- </text>
187
- </svg>
188
- );
189
- }
190
- return <BoringAvatar square size={64} variant={variant} name={name} />;
191
- },
192
- [name, variant, fallbackIcon],
193
- "Avatar fallback",
194
- );
180
+ }
181
+ return <BoringAvatar square size={64} variant={variant} name={name} />;
182
+ }, [name, variant, fallbackIcon]);
195
183
 
196
184
  return (
197
185
  <dfn
198
186
  role="presentation"
199
187
  className={classNames(
200
- classes.avatar,
188
+ "fabric-avatar",
201
189
  className,
202
190
  "select-none relative overflow-hidden inline-block box-content leading-none not-italic text-center",
203
- bg && getBgClass(bg),
204
- color && getColorClass(color),
205
191
  !rounded && "rounded",
206
192
  rounded && "rounded-full",
207
193
  )}
@@ -31,7 +31,6 @@ import {
31
31
  type SizeType,
32
32
  } from "../../types";
33
33
  import { type AvatarProps } from "./Avatar";
34
- import classes from "./Avatar.module.css";
35
34
 
36
35
  type AvatarChild =
37
36
  | ReactElement<Omit<AvatarProps, "size" | "rounded">>
@@ -104,7 +103,7 @@ export const AvatarGroup = ({
104
103
  {...aria}
105
104
  ref={ref as AnyObject}
106
105
  className={classNames(
107
- classes.avatarGroup,
106
+ "fabric-avatarGroup",
108
107
  className,
109
108
  "inline-flex flex-nowrap",
110
109
  !rounded && "rounded",
@@ -115,10 +114,11 @@ export const AvatarGroup = ({
115
114
  {avatars}
116
115
  {!!diff && (
117
116
  <dfn
117
+ data-ref="avatarCount"
118
118
  className={classNames(
119
- classes.avatar,
119
+ "fabric-avatar",
120
120
  "select-none relative overflow-hidden inline-block box-content leading-none not-italic text-center",
121
- classes.extra,
121
+ "fabric-avatarGroup--extra",
122
122
  )}
123
123
  >
124
124
  <svg>