@react-fabric/core 1.0.0-beta.3 → 1.0.0-beta.31

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 (207) hide show
  1. package/css/index.js +14 -14
  2. package/css/reset/_reset.css +1 -1
  3. package/dist/cjs/components/actionLabel/ActionLabel.js +1 -0
  4. package/dist/cjs/components/animations/Animations.js +14 -7
  5. package/dist/cjs/components/avatar/Avatar.js +8 -10
  6. package/dist/cjs/components/avatar/AvatarGroup.js +1 -0
  7. package/dist/cjs/components/badge/Badge.js +5 -4
  8. package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +5 -2
  9. package/dist/cjs/components/button/Button.js +5 -4
  10. package/dist/cjs/components/button/Button.module.css +1 -1
  11. package/dist/cjs/components/button/ButtonGroup.js +3 -1
  12. package/dist/cjs/components/button/ConfirmButton.js +7 -2
  13. package/dist/cjs/components/button/ToggleButtonGroup.js +2 -1
  14. package/dist/cjs/components/callout/Callout.js +7 -2
  15. package/dist/cjs/components/card/Card.js +5 -3
  16. package/dist/cjs/components/card/CardCover.js +1 -1
  17. package/dist/cjs/components/chip/Chip.js +9 -4
  18. package/dist/cjs/components/chip/Chip.module.css +1 -1
  19. package/dist/cjs/components/collapsable/Collapsable.js +3 -2
  20. package/dist/cjs/components/divider/Divider.js +4 -3
  21. package/dist/cjs/components/divider/Divider.module.css +1 -0
  22. package/dist/cjs/components/dropdown/Dropdown.js +4 -2
  23. package/dist/cjs/components/dropdown/DropdownTool.js +4 -3
  24. package/dist/cjs/components/icon/Icon.js +14 -12
  25. package/dist/cjs/components/icon/Icon.module.css +1 -1
  26. package/dist/cjs/components/menu/ContextMenu.js +30 -10
  27. package/dist/cjs/components/menu/Menu.js +39 -20
  28. package/dist/cjs/components/menu/MenuItem.js +29 -14
  29. package/dist/cjs/components/navigator/Navigator.js +16 -9
  30. package/dist/cjs/components/panel/Panel.js +3 -1
  31. package/dist/cjs/components/progress/ProgressBar.js +2 -1
  32. package/dist/cjs/components/progress/ProgressCircle.js +2 -1
  33. package/dist/cjs/components/tabpanel/Tab.js +58 -37
  34. package/dist/cjs/components/tabpanel/TabPanel.js +19 -14
  35. package/dist/cjs/components/tabpanel/TabPanel.module.css +1 -1
  36. package/dist/cjs/core/aside/Aside.js +6 -2
  37. package/dist/cjs/core/content/Content.js +8 -5
  38. package/dist/cjs/core/headfoot/HeadFoot.js +3 -2
  39. package/dist/cjs/core/headfoot/HeadFoot.module.css +1 -1
  40. package/dist/cjs/core/page/Page.js +1 -0
  41. package/dist/cjs/core/responsive/Responsive.js +1 -1
  42. package/dist/cjs/core/section/Section.module.css +1 -1
  43. package/dist/cjs/hooks/useNavigator.js +6 -4
  44. package/dist/cjs/index.js +7 -2
  45. package/dist/cjs/overlays/alert/Alert.js +42 -17
  46. package/dist/cjs/overlays/alert/Alert.module.css +1 -1
  47. package/dist/cjs/overlays/flyout/Flyout.js +40 -42
  48. package/dist/cjs/overlays/message/Message.js +1 -1
  49. package/dist/cjs/overlays/modal/Modal.js +4 -5
  50. package/dist/cjs/overlays/toast/Toast.js +1 -1
  51. package/dist/cjs/overlays/tooltip/Tooltip.js +3 -3
  52. package/dist/cjs/overlays/tooltip/Tooltip.module.css +1 -1
  53. package/dist/cjs/types/icons.js +3 -0
  54. package/dist/cjs/typography/Abbr.js +1 -1
  55. package/dist/cjs/typography/{Link.js → Anchor.js} +4 -3
  56. package/dist/cjs/typography/Mark.js +1 -1
  57. package/dist/cjs/typography/Text.js +2 -2
  58. package/dist/cjs/typography/Title.js +3 -2
  59. package/dist/cjs/typography/Typography.module.css +1 -1
  60. package/dist/cjs/utils/cloneElement.js +44 -0
  61. package/dist/esm/components/actionLabel/ActionLabel.js +1 -0
  62. package/dist/esm/components/animations/Animations.js +14 -7
  63. package/dist/esm/components/avatar/Avatar.js +9 -11
  64. package/dist/esm/components/avatar/AvatarGroup.js +1 -0
  65. package/dist/esm/components/badge/Badge.js +5 -4
  66. package/dist/esm/components/breadcrumbs/Breadcrumbs.js +5 -2
  67. package/dist/esm/components/button/Button.js +5 -4
  68. package/dist/esm/components/button/Button.module.css +1 -1
  69. package/dist/esm/components/button/ButtonGroup.js +4 -2
  70. package/dist/esm/components/button/ConfirmButton.js +7 -2
  71. package/dist/esm/components/button/ToggleButtonGroup.js +3 -2
  72. package/dist/esm/components/callout/Callout.js +7 -2
  73. package/dist/esm/components/card/Card.js +5 -3
  74. package/dist/esm/components/card/CardCover.js +1 -1
  75. package/dist/esm/components/chip/Chip.js +9 -4
  76. package/dist/esm/components/chip/Chip.module.css +1 -1
  77. package/dist/esm/components/collapsable/Collapsable.js +3 -2
  78. package/dist/esm/components/divider/Divider.js +4 -3
  79. package/dist/esm/components/divider/Divider.module.css +1 -0
  80. package/dist/esm/components/dropdown/Dropdown.js +4 -2
  81. package/dist/esm/components/dropdown/DropdownTool.js +4 -3
  82. package/dist/esm/components/icon/Icon.js +14 -12
  83. package/dist/esm/components/icon/Icon.module.css +1 -1
  84. package/dist/esm/components/menu/ContextMenu.js +32 -12
  85. package/dist/esm/components/menu/Menu.js +41 -22
  86. package/dist/esm/components/menu/MenuItem.js +23 -8
  87. package/dist/esm/components/navigator/Navigator.js +16 -9
  88. package/dist/esm/components/panel/Panel.js +3 -1
  89. package/dist/esm/components/progress/ProgressBar.js +2 -1
  90. package/dist/esm/components/progress/ProgressCircle.js +2 -1
  91. package/dist/esm/components/tabpanel/Tab.js +59 -38
  92. package/dist/esm/components/tabpanel/TabPanel.js +19 -14
  93. package/dist/esm/components/tabpanel/TabPanel.module.css +1 -1
  94. package/dist/esm/core/aside/Aside.js +6 -2
  95. package/dist/esm/core/content/Content.js +8 -5
  96. package/dist/esm/core/headfoot/HeadFoot.js +3 -2
  97. package/dist/esm/core/headfoot/HeadFoot.module.css +1 -1
  98. package/dist/esm/core/page/Page.js +1 -0
  99. package/dist/esm/core/responsive/Responsive.js +1 -1
  100. package/dist/esm/core/section/Section.module.css +1 -1
  101. package/dist/esm/hooks/useNavigator.js +7 -5
  102. package/dist/esm/index.js +4 -1
  103. package/dist/esm/overlays/alert/Alert.js +31 -6
  104. package/dist/esm/overlays/alert/Alert.module.css +1 -1
  105. package/dist/esm/overlays/flyout/Flyout.js +41 -43
  106. package/dist/esm/overlays/message/Message.js +1 -1
  107. package/dist/esm/overlays/modal/Modal.js +5 -6
  108. package/dist/esm/overlays/toast/Toast.js +1 -1
  109. package/dist/esm/overlays/tooltip/Tooltip.js +3 -3
  110. package/dist/esm/overlays/tooltip/Tooltip.module.css +1 -1
  111. package/dist/esm/types/icons.js +3 -0
  112. package/dist/esm/typography/Abbr.js +1 -1
  113. package/dist/esm/typography/{Link.js → Anchor.js} +4 -3
  114. package/dist/esm/typography/Mark.js +1 -1
  115. package/dist/esm/typography/Text.js +2 -2
  116. package/dist/esm/typography/Title.js +3 -2
  117. package/dist/esm/typography/Typography.module.css +1 -1
  118. package/dist/esm/utils/cloneElement.js +44 -0
  119. package/dist/types/components/actionLabel/ActionLabel.d.ts +2 -2
  120. package/dist/types/components/animations/Animations.d.ts +1 -1
  121. package/dist/types/components/badge/Badge.d.ts +5 -1
  122. package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +2 -2
  123. package/dist/types/components/button/Button.d.ts +5 -3
  124. package/dist/types/components/button/ConfirmButton.d.ts +6 -1
  125. package/dist/types/components/card/Card.d.ts +3 -3
  126. package/dist/types/components/chip/Chip.d.ts +1 -1
  127. package/dist/types/components/collapsable/Collapsable.d.ts +5 -1
  128. package/dist/types/components/dropdown/DropdownTool.d.ts +2 -1
  129. package/dist/types/components/media/Media.d.ts +2 -2
  130. package/dist/types/components/menu/ContextMenu.d.ts +2 -1
  131. package/dist/types/components/menu/MenuItem.d.ts +1 -1
  132. package/dist/types/components/navigator/Navigator.d.ts +3 -3
  133. package/dist/types/components/tabpanel/Tab.d.ts +4 -4
  134. package/dist/types/components/tabpanel/TabPanel.d.ts +10 -1
  135. package/dist/types/core/aside/Aside.d.ts +7 -3
  136. package/dist/types/core/content/Content.d.ts +3 -2
  137. package/dist/types/core/responsive/Responsive.d.ts +1 -1
  138. package/dist/types/core/theme/ThemeProvider.d.ts +1 -1
  139. package/dist/types/hooks/useOverlayService.d.ts +3 -3
  140. package/dist/types/index.d.ts +3 -0
  141. package/dist/types/overlays/alert/Alert.d.ts +9 -1
  142. package/dist/types/overlays/flyout/Flyout.d.ts +3 -2
  143. package/dist/types/overlays/modal/Modal.d.ts +4 -3
  144. package/dist/types/types/icons.d.ts +3 -0
  145. package/dist/types/types/index.d.ts +8 -1
  146. package/dist/types/typography/{Link.d.ts → Anchor.d.ts} +2 -2
  147. package/dist/types/typography/index.d.ts +1 -1
  148. package/dist/types/utils/cloneElement.d.ts +2 -0
  149. package/dist/types/utils/index.d.ts +1 -0
  150. package/package.json +5 -5
  151. package/src/components/actionLabel/ActionLabel.tsx +13 -3
  152. package/src/components/animations/Animations.tsx +9 -3
  153. package/src/components/avatar/Avatar.tsx +69 -81
  154. package/src/components/avatar/AvatarGroup.tsx +1 -0
  155. package/src/components/badge/Badge.tsx +9 -4
  156. package/src/components/breadcrumbs/Breadcrumbs.tsx +9 -4
  157. package/src/components/button/Button.module.css +8 -1
  158. package/src/components/button/Button.tsx +12 -9
  159. package/src/components/button/ButtonGroup.tsx +3 -2
  160. package/src/components/button/ConfirmButton.tsx +15 -5
  161. package/src/components/button/ToggleButtonGroup.tsx +3 -2
  162. package/src/components/callout/Callout.tsx +12 -3
  163. package/src/components/card/Card.tsx +4 -0
  164. package/src/components/chip/Chip.module.css +4 -1
  165. package/src/components/chip/Chip.tsx +9 -4
  166. package/src/components/collapsable/Collapsable.tsx +6 -0
  167. package/src/components/divider/Divider.module.css +32 -0
  168. package/src/components/divider/Divider.tsx +3 -2
  169. package/src/components/dropdown/Dropdown.tsx +3 -2
  170. package/src/components/dropdown/DropdownTool.tsx +4 -2
  171. package/src/components/icon/Icon.module.css +0 -1
  172. package/src/components/icon/Icon.tsx +48 -58
  173. package/src/components/media/Media.tsx +2 -2
  174. package/src/components/menu/ContextMenu.tsx +36 -11
  175. package/src/components/menu/Menu.tsx +51 -30
  176. package/src/components/menu/MenuItem.tsx +14 -3
  177. package/src/components/navigator/Navigator.tsx +17 -4
  178. package/src/components/panel/Panel.tsx +3 -1
  179. package/src/components/tabpanel/Tab.tsx +77 -61
  180. package/src/components/tabpanel/TabPanel.module.css +54 -65
  181. package/src/components/tabpanel/TabPanel.tsx +33 -10
  182. package/src/core/aside/Aside.tsx +17 -3
  183. package/src/core/content/Content.tsx +16 -10
  184. package/src/core/headfoot/HeadFoot.module.css +2 -0
  185. package/src/core/headfoot/HeadFoot.tsx +1 -1
  186. package/src/core/page/Page.tsx +1 -0
  187. package/src/core/responsive/Responsive.tsx +3 -2
  188. package/src/core/section/Section.module.css +1 -1
  189. package/src/core/theme/ThemeProvider.tsx +1 -1
  190. package/src/hooks/useNavigator.tsx +10 -5
  191. package/src/hooks/useOverlayService.tsx +12 -4
  192. package/src/index.ts +4 -0
  193. package/src/overlays/alert/Alert.module.css +1 -1
  194. package/src/overlays/alert/Alert.tsx +30 -4
  195. package/src/overlays/flyout/Flyout.tsx +63 -62
  196. package/src/overlays/modal/Modal.tsx +13 -8
  197. package/src/overlays/tooltip/Tooltip.module.css +7 -7
  198. package/src/overlays/tooltip/Tooltip.tsx +4 -4
  199. package/src/types/icons.ts +6 -0
  200. package/src/types/index.ts +10 -9
  201. package/src/typography/{Link.tsx → Anchor.tsx} +3 -3
  202. package/src/typography/Text.tsx +1 -1
  203. package/src/typography/Title.tsx +0 -1
  204. package/src/typography/Typography.module.css +4 -2
  205. package/src/typography/index.ts +1 -1
  206. package/src/utils/cloneElement.ts +44 -0
  207. package/src/utils/index.ts +1 -0
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { type Placement } from "@floating-ui/react";
2
3
  import { type CallbackReturn, type PolymorphicProps, type RefProp } from "../../types";
3
4
  import { type BaseProps, type ButtonProps } from "./Button";
4
5
  interface ExtendedProps extends Omit<BaseProps, "onClick">, RefProp {
@@ -14,6 +15,10 @@ interface ExtendedProps extends Omit<BaseProps, "onClick">, RefProp {
14
15
  * ok label
15
16
  */
16
17
  cancelLabel?: string;
18
+ /**
19
+ * dropdown placement
20
+ */
21
+ placement?: Placement;
17
22
  /**
18
23
  * click handler, return Promise to autoset loading state
19
24
  */
@@ -23,5 +28,5 @@ export type ConfirmButtonProps = ExtendedProps & ButtonProps;
23
28
  /**
24
29
  * Button with confirmation dropdown
25
30
  */
26
- export declare const ConfirmButton: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ ref, message, color, okLabel, cancelLabel, onClick, loading, actionMessage, showActionDone, showActionDoneEvent, ...props }: ConfirmButtonProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const ConfirmButton: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ ref, message, color, okLabel, cancelLabel, onClick, loading, placement, actionMessage, showActionDone, showActionDoneEvent, ...props }: ConfirmButtonProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
27
32
  export {};
@@ -1,8 +1,8 @@
1
1
  import { type MouseEventHandler } from "react";
2
2
  import { type ContentProps } from "../../core/content/Content";
3
3
  import { type HeadFootProps } from "../../core/headfoot/HeadFoot";
4
- import { type AriaProps, type ChildrenProp, type CssProp, type TestProps } from "../../types";
5
- export interface CardProps extends CssProp, AriaProps, TestProps, ChildrenProp<React.ReactElement<HeadFootProps | ContentProps>> {
4
+ import { type AriaProps, type ChildrenProp, type CssProp, type RefProp, type TestProps } from "../../types";
5
+ export interface CardProps extends CssProp, AriaProps, TestProps, RefProp<HTMLDivElement>, ChildrenProp<React.ReactElement<HeadFootProps | ContentProps>> {
6
6
  /**
7
7
  * apply flex fill styling
8
8
  */
@@ -36,4 +36,4 @@ export interface CardProps extends CssProp, AriaProps, TestProps, ChildrenProp<R
36
36
  */
37
37
  dragData?: KeyValue;
38
38
  }
39
- export declare const Card: ({ children, className, bodyClassName, selected, selectedRibbon, onClick, flex, draggable, dragKey, dragData, ...aria }: CardProps) => import("react/jsx-runtime").JSX.Element;
39
+ export declare const Card: ({ children, className, bodyClassName, selected, selectedRibbon, onClick, flex, draggable, dragKey, dragData, ref, ...aria }: CardProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,7 @@ export interface ChipProps extends CssProp, AriaProps, IconProps, TestProps, Chi
4
4
  /**
5
5
  * chip size
6
6
  */
7
- size?: SizeType;
7
+ size?: SizeType | number | string;
8
8
  /**
9
9
  * chip color (CSS color / tailwind color)
10
10
  */
@@ -18,6 +18,10 @@ export interface CollapsableProps extends CssProp, AriaProps, TestProps, RefProp
18
18
  * header button className
19
19
  */
20
20
  headerClassName?: string;
21
+ /**
22
+ * Header position sticky
23
+ */
24
+ stickyHeader?: boolean;
21
25
  /**
22
26
  * open state icon
23
27
  */
@@ -43,5 +47,5 @@ export interface CollapsableProps extends CssProp, AriaProps, TestProps, RefProp
43
47
  */
44
48
  onClose?: () => void;
45
49
  }
46
- export declare const Collapsable: ({ ref, disabled, className, bodyClassName, headerClassName, children, iconAlign, iconClosed, iconOpen, open, onClose, onOpen, ...aria }: CollapsableProps) => import("react/jsx-runtime").JSX.Element;
50
+ export declare const Collapsable: ({ ref, disabled, className, bodyClassName, headerClassName, children, iconAlign, stickyHeader, iconClosed, iconOpen, open, onClose, onOpen, ...aria }: CollapsableProps) => import("react/jsx-runtime").JSX.Element;
47
51
  export {};
@@ -1,6 +1,7 @@
1
1
  import { type ChildProp, type CssProp } from "../../types";
2
2
  import { type DropdownProps } from "./Dropdown";
3
- export declare const DropdownTool: ({ children, className, groupHover, ...props }: ChildProp & CssProp & Omit<DropdownProps, "children"> & {
3
+ export declare const DropdownTool: ({ children, className, groupHover, icon, ...props }: ChildProp & CssProp & Omit<DropdownProps, "children"> & {
4
+ icon?: string;
4
5
  /**
5
6
  * hide until group hovered
6
7
  */
@@ -1,5 +1,5 @@
1
- import { type AriaProps, type CssProp } from "../../types";
2
- export interface BaseProps extends CssProp, AriaProps {
1
+ import { type AriaProps, type CssProp, type TestProps } from "../../types";
2
+ export interface BaseProps extends CssProp, TestProps, AriaProps {
3
3
  /**
4
4
  * media source
5
5
  */
@@ -3,5 +3,6 @@ import { type ChildrenProp } from "../../types";
3
3
  import { type Menu } from "./Menu";
4
4
  export interface ContextMenuProps extends ChildrenProp {
5
5
  menu: React.ReactElement<typeof Menu>;
6
+ disabled?: boolean;
6
7
  }
7
- export declare const ContextMenu: ({ children, menu }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const ContextMenu: ({ children, menu, disabled }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type PolymorphicProps } from "../../types";
3
3
  import { type MenuItemProps } from "./types";
4
- export declare const MenuItem: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ as, label, color, className, icon, iconBg, iconColor, appendLabel, rtlFlip, altIcon, id, active, disabled, onClick, badge, hotKey, minimal, "data-open": childOpen, ref, ...aria }: MenuItemProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const MenuItem: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ as, label, color, className, icon, iconBg, iconColor, appendLabel, rtlFlip, altIcon, id, active, disabled, onClick, badge, hotKey, tabIndex, minimal, "data-open": childOpen, ref, ...aria }: MenuItemProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { type AriaProps, type ColorType, type CssProp, type TestProps } from "../../types";
2
- export interface NavigatorProps extends CssProp, AriaProps, TestProps {
1
+ import { type ChildProp, type AriaProps, type ColorType, type CssProp, type TestProps } from "../../types";
2
+ export interface NavigatorProps extends CssProp, AriaProps, TestProps, Partial<ChildProp> {
3
3
  /**
4
4
  * navigator button color
5
5
  */
@@ -9,4 +9,4 @@ export interface NavigatorProps extends CssProp, AriaProps, TestProps {
9
9
  */
10
10
  onNavigate: (dir: -1 | 1) => void;
11
11
  }
12
- export declare const Navigator: ({ className, onNavigate, color, ...aria }: NavigatorProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const Navigator: ({ className, onNavigate, color, children, ...aria }: NavigatorProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { type ReactElement } from "react";
2
- import { type AriaProps, type BadgeType, type CallbackReturn, type ChildrenProp, type ColorType, type CssProp, type IconProps, type PolymorphicProps, type RefProp, type TestProps } from "../../types";
3
- export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaProps, TestProps, IconProps {
2
+ import { type AriaProps, type BadgeType, type CallbackReturn, type ChildrenProp, type ColorType, type CssProp, type IconProps, type PolymorphicProps, type RefProp, type TestProps, type TooltipProp } from "../../types";
3
+ export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaProps, TestProps, IconProps, TooltipProp {
4
4
  /**
5
5
  * tab id
6
6
  */
@@ -16,7 +16,7 @@ export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaP
16
16
  /**
17
17
  * tab badge
18
18
  */
19
- badge?: BadgeType;
19
+ badge?: string | number | BadgeType;
20
20
  /**
21
21
  * disabled
22
22
  */
@@ -42,4 +42,4 @@ export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaP
42
42
  */
43
43
  onClick?: (id: string) => CallbackReturn;
44
44
  }
45
- export declare const Tab: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ ref, as, id, className, label, icon, iconBg, iconColor, rtlFlip, badge, disabled, onClose, active, minimal, onClick, tabFlex, color, actions, activeClassName, ...aria }: TabProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
45
+ export declare const Tab: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">({ ref, as, id, className, label, icon, iconBg, iconColor, rtlFlip, badge, disabled, onClose, active, onClick, tabFlex, color, actions, tooltip, activeClassName, ...aria }: TabProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { type ReactNode } from "react";
1
2
  import { type CallbackReturn, type ChildrenProp } from "../../types";
2
3
  import { Tab } from "./Tab";
3
4
  export interface TabPanelProps extends ChildrenProp<typeof Tab> {
@@ -29,6 +30,14 @@ export interface TabPanelProps extends ChildrenProp<typeof Tab> {
29
30
  * tab list className
30
31
  */
31
32
  headerClassName?: string;
33
+ /**
34
+ * append element
35
+ */
36
+ append?: ReactNode;
37
+ /**
38
+ * prepend element
39
+ */
40
+ prepend?: ReactNode;
32
41
  /**
33
42
  * change handler
34
43
  */
@@ -38,4 +47,4 @@ export interface TabPanelProps extends ChildrenProp<typeof Tab> {
38
47
  */
39
48
  onBeforeChange?: (nextTab: string, currentTab?: string) => CallbackReturn;
40
49
  }
41
- export declare const TabPanel: ({ children, headerClassName, orientation, activeTab, justify, variant, tabFlex, gap, onBeforeChange, onChange, }: TabPanelProps) => import("react/jsx-runtime").JSX.Element;
50
+ export declare const TabPanel: ({ children, headerClassName, orientation, activeTab, justify, variant, tabFlex, append, prepend, gap, onBeforeChange, onChange, }: TabPanelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from "react";
2
- import { type ChildrenProp, type CollapseProps, type Elements, type IconProps, type TestProps } from "../../types";
3
- export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, TestProps {
2
+ import { type ChildrenProp, type CollapseProps, type CssProp, type Elements, type IconProps, type TestProps } from "../../types";
3
+ export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, CssProp, TestProps {
4
4
  /**
5
5
  * page title
6
6
  */
@@ -17,6 +17,10 @@ export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, Test
17
17
  * header class
18
18
  */
19
19
  headerClassName?: string;
20
+ /**
21
+ * header class
22
+ */
23
+ bodyClassName?: string;
20
24
  /**
21
25
  * show loading indicator
22
26
  */
@@ -49,4 +53,4 @@ export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, Test
49
53
  /**
50
54
  * Side panel
51
55
  */
52
- export declare const Aside: ({ children, title, icon, iconBg, iconColor, rtlFlip, headerClassName, resizeable, flyout, onFlyout, collapsed, collapsable, onCollapse, actions, loading, align, width: wd, minWidth, maxWidth, "data-testid": testId, "data-test-value": testValue, }: AsideProps) => import("react/jsx-runtime").JSX.Element;
56
+ export declare const Aside: ({ children, title, icon, iconBg, iconColor, rtlFlip, className, bodyClassName, headerClassName, resizeable, flyout, onFlyout, collapsed, collapsable, onCollapse, actions, loading, align, width: wd, minWidth, maxWidth, "data-testid": testId, "data-test-value": testValue, }: AsideProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,10 @@
1
- import { type ChildrenProp, type CssProp, type PositionObject, type RefProp, type SizeObject, type TestProps } from "../../types";
1
+ import { type MouseEvent } from "react";
2
+ import { type ChildrenProp, type CssProp, type RefProp, type ScrollObject, type SizeObject, type TestProps } from "../../types";
2
3
  export interface ContentProps extends ChildrenProp, CssProp, RefProp, TestProps {
3
4
  /**
4
5
  * scroll vevent handler
5
6
  */
6
- onScroll?: (event: PositionObject) => void;
7
+ onScroll?: (scroll: ScrollObject, event: MouseEvent<HTMLDivElement>) => void;
7
8
  /**
8
9
  * scroll vevent handler
9
10
  */
@@ -39,7 +39,7 @@ export interface ColProps extends AriaProps, CssProp, TestProps, Partial<Childre
39
39
  /**
40
40
  * column flex
41
41
  */
42
- flex?: "auto" | "fill" | "full";
42
+ flex?: "auto" | "fill" | "full" | "content";
43
43
  /**
44
44
  * stretch inner content
45
45
  */
@@ -29,7 +29,7 @@ export interface ThemeProps {
29
29
  /**
30
30
  * component rounding
31
31
  */
32
- rounding?: "minimal" | "normal" | "full";
32
+ rounding?: "sm" | "md" | "full";
33
33
  }
34
34
  /**
35
35
  * Theme override
@@ -1,6 +1,6 @@
1
- import { type FC, type ReactNode } from "react";
2
- type OverlayComponent = FC<{
3
- onClose: (args?: AnyObject) => void;
1
+ import { type ElementType, type ReactNode } from "react";
2
+ type OverlayComponent = ElementType<{
3
+ onClose: (...args: AnyObject) => void;
4
4
  [key: string]: AnyObject;
5
5
  }>;
6
6
  export declare const useOverlayService: (ModalOrFlyout: OverlayComponent) => [
@@ -15,5 +15,8 @@ export * from "./hooks/useResizeObserver";
15
15
  export * from "./hooks/useStorage";
16
16
  export { HotKey } from "./hotkeys/HotKey";
17
17
  export { HotKeyLabel } from "./hotkeys/HotKeyLabel";
18
+ export { HotKeyWrapper } from "./hotkeys/HotKeyWrapper";
19
+ export { type ModalProps } from "./types";
18
20
  export { CoreIcons } from "./types/icons";
21
+ export { cloneChildren } from "./utils";
19
22
  export { ApplicationProvider, useApplicationContext, useGlobals, useNotificationService, } from "./context/Global";
@@ -29,5 +29,13 @@ export interface AlertProps extends Omit<IconProps, "iconBg" | "iconColor"> {
29
29
  * cancel label
30
30
  */
31
31
  cancelLabel?: string;
32
+ /**
33
+ * placeholder for prompt
34
+ */
35
+ placeholder?: string;
36
+ /**
37
+ * default value for prompt
38
+ */
39
+ defaultValue?: string;
32
40
  }
33
- export declare const Alert: ({ title, message, color, icon, rtlFlip, actions, onClose, type, okLabel, cancelLabel, }: AlertProps) => import("react/jsx-runtime").JSX.Element;
41
+ export declare const Alert: ({ title, message, color, icon, rtlFlip, actions, onClose, type, okLabel, cancelLabel, placeholder, defaultValue, }: AlertProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
- /// <reference types="react" />
1
+ import { type ElementType } from "react";
2
2
  import { type AriaProps, type CallbackReturn, type ChildrenProp, type Elements, type IconProps, type TestProps } from "../../types";
3
- export interface FlyoutProps extends AriaProps, TestProps, IconProps, ChildrenProp {
3
+ export interface FlyoutProps extends AriaProps, TestProps, Omit<IconProps, "icon">, ChildrenProp {
4
+ icon?: string | ElementType<IconProps>;
4
5
  /**
5
6
  * flyout alignment
6
7
  */
@@ -1,6 +1,7 @@
1
- /// <reference types="react" />
1
+ import { type ElementType } from "react";
2
2
  import { type AriaProps, type CallbackReturn, type ChildrenProp, type Elements, type IconProps, type TestProps } from "../../types";
3
- export interface ModalProps extends AriaProps, TestProps, IconProps, ChildrenProp {
3
+ export interface ModalProps extends AriaProps, TestProps, Omit<IconProps, "icon">, ChildrenProp {
4
+ icon?: string | ElementType<IconProps>;
4
5
  /**
5
6
  * header className
6
7
  */
@@ -44,7 +45,7 @@ export interface ModalProps extends AriaProps, TestProps, IconProps, ChildrenPro
44
45
  /**
45
46
  * close handler
46
47
  */
47
- onClose: (...args: AnyObject) => void;
48
+ onClose?: (...args: AnyObject) => void;
48
49
  /**
49
50
  * before close handler, return false to prevent close
50
51
  */
@@ -34,6 +34,8 @@ export declare namespace CoreIcons {
34
34
  const caretUp = "M7,15L12,10L17,15H7Z";
35
35
  const expand = "M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h3v3c0 0.552 0.448 1 1 1s1-0.448 1-1v-3h3c0.552 0 1-0.448 1-1s-0.448-1-1-1h-3v-3c0-0.552-0.448-1-1-1s-1 0.448-1 1v3h-3c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
36
36
  const collapse = "M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h8c0.552 0 1-0.448 1-1s-0.448-1-1-1h-8c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
37
+ const expandActive = "M17,13H13V17H11V13H7V11H11V7H13V11H17M19,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";
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";
37
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";
38
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";
39
41
  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";
@@ -103,6 +105,7 @@ export declare namespace CoreIcons {
103
105
  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";
104
106
  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";
105
107
  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";
108
+ const stop = "M18,18H6V6H18V18Z";
106
109
  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";
107
110
  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";
108
111
  const alignLeft = "M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z";
@@ -1,5 +1,8 @@
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
8
  export type ColorType = "primary" | "accent" | "info" | "danger" | "success" | "warning";
@@ -54,7 +57,7 @@ export interface TestProps {
54
57
  */
55
58
  "data-test-value"?: AnyObject;
56
59
  }
57
- export type Elements<T> = React.ReactElement<T> | React.ReactPortal | React.ReactNode | string | number | boolean | null | undefined;
60
+ export type Elements<T> = React.ReactElement<T> | React.ReactNode;
58
61
  export type AriaProps = React.AriaAttributes;
59
62
  /**
60
63
  * For wrapping components
@@ -138,3 +141,7 @@ export interface SizeObject {
138
141
  width: number;
139
142
  height: number;
140
143
  }
144
+ export interface ScrollObject extends PositionObject, SizeObject {
145
+ scrollWidth?: number;
146
+ scrollHeight: number;
147
+ }
@@ -1,6 +1,6 @@
1
1
  import { type MouseEventHandler } from "react";
2
2
  import { type AriaProps, type ChildrenProp, type ColorType, type CssProp, type PolymorphicProps, type RefProp, type SizeType } from "../types";
3
- export interface LinkProps extends ChildrenProp, CssProp, RefProp, AriaProps {
3
+ export interface AnchorProps extends ChildrenProp, CssProp, RefProp, AriaProps {
4
4
  /**
5
5
  * link background (CSS color / tailwind color)
6
6
  */
@@ -22,4 +22,4 @@ export interface LinkProps extends ChildrenProp, CssProp, RefProp, AriaProps {
22
22
  /**
23
23
  * Typography link component
24
24
  */
25
- export declare const Link: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "a">({ ref, as, children, className, bg, color, family, size, ...aria }: LinkProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
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,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,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.3",
3
+ "version": "1.0.0-beta.31",
4
4
  "description": "RUF: Core package",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@floating-ui/react": "^0.26.24",
39
- "@react-fabric/utilities": "^1.0.0-beta.1",
39
+ "@react-fabric/utilities": "^1.0.0-beta.31",
40
40
  "@tailwindcss/container-queries": "^0.1.1",
41
41
  "@tailwindcss/forms": "^0.5.7",
42
42
  "@tailwindcss/typography": "^0.5.13",
@@ -48,13 +48,13 @@
48
48
  },
49
49
  "peerDependencies": {
50
50
  "i18next": "^23.15.1",
51
- "react": ">=18.0.0 <20.0.0",
52
- "react-dom": ">=18.0.0 <20.0.0",
51
+ "react": "^19.0.0",
52
+ "react-dom": "^19.0.0",
53
53
  "react-i18next": "^15.0.2"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=18.12.0",
57
57
  "npm": ">=8.19.0"
58
58
  },
59
- "gitHead": "2ce2a968f48d6ffc338f5da3a0cf67232d0c6864"
59
+ "gitHead": "de71c6875264d385666d0fa441785b9884951561"
60
60
  }
@@ -22,12 +22,21 @@
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
33
  import classes from "./ActionLabel.module.css";
29
34
 
30
- export interface ActionLabelProps extends AriaProps, CssProp, ChildProp {
35
+ export interface ActionLabelProps
36
+ extends AriaProps,
37
+ CssProp,
38
+ ChildProp,
39
+ TestProps {
31
40
  /**
32
41
  * action buttons aligment
33
42
  */
@@ -83,6 +92,7 @@ export const ActionLabel = ({
83
92
  >
84
93
  <ButtonGroup
85
94
  ref={calculateBasis}
95
+ data-inner-clickable
86
96
  className={classNames(
87
97
  classes.actions,
88
98
  "overflow-hidden flex-content",
@@ -104,7 +104,7 @@ export const AnimationIndicator = ({
104
104
  };
105
105
 
106
106
  export const AnimationBars = ({
107
- color = "tint-700",
107
+ color = "tint",
108
108
  size = "2rem",
109
109
  }: {
110
110
  color?: ColorType | string;
@@ -142,6 +142,7 @@ 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(
@@ -164,15 +165,20 @@ export const Loading = () => {
164
165
  classes.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" />