@usefui/components 1.5.3 → 1.6.0

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 (38) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.d.mts +237 -1
  3. package/dist/index.d.ts +237 -1
  4. package/dist/index.js +702 -231
  5. package/dist/index.mjs +668 -210
  6. package/package.json +12 -12
  7. package/src/__tests__/MessageBubble.test.tsx +179 -0
  8. package/src/__tests__/Shimmer.test.tsx +122 -0
  9. package/src/__tests__/Tree.test.tsx +275 -0
  10. package/src/accordion/hooks/index.tsx +3 -1
  11. package/src/badge/index.tsx +2 -3
  12. package/src/checkbox/hooks/index.tsx +5 -1
  13. package/src/collapsible/hooks/index.tsx +3 -1
  14. package/src/dialog/hooks/index.tsx +5 -1
  15. package/src/dropdown/hooks/index.tsx +3 -1
  16. package/src/dropdown/index.tsx +9 -9
  17. package/src/field/hooks/index.tsx +5 -1
  18. package/src/index.ts +6 -0
  19. package/src/message-bubble/MessageBubble.stories.tsx +91 -0
  20. package/src/message-bubble/hooks/index.tsx +41 -0
  21. package/src/message-bubble/index.tsx +153 -0
  22. package/src/message-bubble/styles/index.ts +61 -0
  23. package/src/otp-field/hooks/index.tsx +3 -1
  24. package/src/otp-field/index.tsx +5 -3
  25. package/src/sheet/hooks/index.tsx +5 -1
  26. package/src/shimmer/Shimmer.stories.tsx +95 -0
  27. package/src/shimmer/index.tsx +64 -0
  28. package/src/shimmer/styles/index.ts +33 -0
  29. package/src/switch/hooks/index.tsx +5 -1
  30. package/src/tabs/hooks/index.tsx +5 -1
  31. package/src/toolbar/hooks/index.tsx +5 -1
  32. package/src/tree/Tree.stories.tsx +139 -0
  33. package/src/tree/hooks/tree-node-provider.tsx +50 -0
  34. package/src/tree/hooks/tree-provider.tsx +75 -0
  35. package/src/tree/index.tsx +231 -0
  36. package/src/tree/styles/index.ts +23 -0
  37. package/tsconfig.build.json +20 -0
  38. package/tsconfig.json +1 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @usefui/components
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Update dependencies, migrate to React 19, add new components (shimmer,tree,message bubble)
8
+
3
9
  ## 1.5.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -730,6 +730,90 @@ declare const FieldMeta: {
730
730
  displayName: string;
731
731
  };
732
732
 
733
+ type MessageBubbleSide = "left" | "right";
734
+ interface IMessageBubbleContext {
735
+ side: MessageBubbleSide;
736
+ }
737
+ interface IMessageBubbleProperties extends IComponentStyling, React$1.HTMLAttributes<HTMLDivElement> {
738
+ side: MessageBubbleSide;
739
+ }
740
+ interface IMessageBubbleContentProperties extends IComponentStyling, React$1.HTMLAttributes<HTMLDivElement> {
741
+ children: string;
742
+ }
743
+ interface IMessageBubbleMetaProperties extends IComponentStyling, React$1.HTMLAttributes<HTMLDivElement> {
744
+ createdAt: Date;
745
+ }
746
+ declare const MessageBubbleRoot: {
747
+ ({ children }: IReactChildren): React$1.JSX.Element;
748
+ displayName: string;
749
+ };
750
+ /**
751
+ * MessageBubble is used to display a chat message with an optional side and raw layout.
752
+ *
753
+ * **Best practices:**
754
+ *
755
+ * - Always wrap MessageBubble inside a MessageBubble.Root to provide the necessary context.
756
+ * - Use `side` to visually distinguish between sent and received messages.
757
+ * - Pair with MessageBubble.Content and MessageBubble.Meta for a complete message layout.
758
+ *
759
+ * @param {IMessageBubbleProperties} props - The props for the MessageBubble component.
760
+ * @param {"left" | "right"} props.side - The side the bubble is aligned to. Propagated to all child compounds via context.
761
+ * @param {boolean} props.raw - When true, removes default styling for custom layouts.
762
+ * @param {ReactNode} props.children - The content to be rendered inside the bubble.
763
+ * @returns {ReactElement} The MessageBubble component.
764
+ */
765
+ declare const MessageBubble: {
766
+ (props: IMessageBubbleProperties): React$1.JSX.Element;
767
+ displayName: string;
768
+ Root: {
769
+ ({ children }: IReactChildren): React$1.JSX.Element;
770
+ displayName: string;
771
+ };
772
+ Content: {
773
+ (props: IMessageBubbleContentProperties): React$1.JSX.Element;
774
+ displayName: string;
775
+ };
776
+ Meta: {
777
+ (props: IMessageBubbleMetaProperties): React$1.JSX.Element;
778
+ displayName: string;
779
+ };
780
+ };
781
+ /**
782
+ * MessageBubble.Content is used to display the text or rich content of the message.
783
+ *
784
+ * **Best practices:**
785
+ *
786
+ * - Place MessageBubble.Content inside a MessageBubble to inherit the correct side context.
787
+ * - Avoid nesting interactive elements inside the content that may conflict with bubble focus management.
788
+ *
789
+ * @param {IMessageBubbleContentProperties} props - The props for the MessageBubble.Content component.
790
+ * @param {boolean} props.raw - When true, removes default styling for custom layouts.
791
+ * @param {ReactNode} props.children - The message text or rich content to render.
792
+ * @returns {ReactElement} The MessageBubble.Content component.
793
+ */
794
+ declare const MessageBubbleContent: {
795
+ (props: IMessageBubbleContentProperties): React$1.JSX.Element;
796
+ displayName: string;
797
+ };
798
+ /**
799
+ * MessageBubble.Meta is used to display metadata associated with the message, such as its timestamp.
800
+ *
801
+ * **Best practices:**
802
+ *
803
+ * - Always provide a valid `createdAt` date for accurate timestamp display.
804
+ * - Place MessageBubble.Meta after MessageBubble.Content for a natural reading flow.
805
+ * - The side is automatically inherited from context — do not pass it manually.
806
+ *
807
+ * @param {IMessageBubbleMetaProperties} props - The props for the MessageBubble.Meta component.
808
+ * @param {Date} props.createdAt - The date the message was created. Formatted as medium date and short time.
809
+ * @param {boolean} props.raw - When true, removes default styling for custom layouts.
810
+ * @returns {ReactElement} The MessageBubble.Meta component.
811
+ */
812
+ declare const MessageBubbleMeta: {
813
+ (props: IMessageBubbleMetaProperties): React$1.JSX.Element;
814
+ displayName: string;
815
+ };
816
+
733
817
  interface OTPFieldProps {
734
818
  name?: string;
735
819
  id?: string;
@@ -1055,6 +1139,35 @@ declare const SheetTrigger: {
1055
1139
  displayName: string;
1056
1140
  };
1057
1141
 
1142
+ interface ITextShimmerProperties extends IComponentStyling, React$1.HTMLAttributes<HTMLSpanElement> {
1143
+ duration?: number;
1144
+ spread?: number;
1145
+ shimmerColor?: string;
1146
+ baseColor?: string;
1147
+ }
1148
+ /**
1149
+ * Shimmer applies an animated shimmer gradient effect to inline text content.
1150
+ *
1151
+ * **Best practices:**
1152
+ *
1153
+ * - Use to indicate loading states for text content.
1154
+ * - Prefer CSS custom properties for `shimmerColor` and `baseColor` to stay consistent with your design tokens.
1155
+ * - Avoid using on large blocks of text; favour short labels or headings.
1156
+ *
1157
+ * @param {ITextShimmerProperties} props - The props for the Shimmer component.
1158
+ * @param {ReactNode} props.children - The text content to apply the shimmer effect to.
1159
+ * @param {boolean} props.raw - Whether the component is unstyled.
1160
+ * @param {number} props.duration - Animation cycle duration in seconds. Defaults to 2.
1161
+ * @param {number} props.spread - Gradient spread width as a percentage. Defaults to 200.
1162
+ * @param {string} props.shimmerColor - Highlight color of the shimmer. Defaults to `--font-color-alpha-60`.
1163
+ * @param {string} props.baseColor - Base text gradient color. Defaults to `--font-color-alpha-30`.
1164
+ * @returns {ReactElement} The Shimmer component.
1165
+ */
1166
+ declare const Shimmer: {
1167
+ (props: ITextShimmerProperties): React$1.JSX.Element;
1168
+ displayName: string;
1169
+ };
1170
+
1058
1171
  interface IScrollAreaProperties extends React$1.ComponentProps<any> {
1059
1172
  scrollbar?: boolean;
1060
1173
  }
@@ -1498,6 +1611,123 @@ declare const Tooltip: {
1498
1611
  displayName: string;
1499
1612
  };
1500
1613
 
1614
+ interface ITreeComposition {
1615
+ Root: typeof TreeRoot;
1616
+ Node: typeof TreeNode;
1617
+ Trigger: typeof TreeTrigger;
1618
+ Content: typeof TreeContent;
1619
+ }
1620
+ interface ITreeProperties extends IComponentSpacing, React$1.ComponentProps<"ul"> {
1621
+ }
1622
+ interface ITreeRootProperties extends IReactChildren {
1623
+ defaultExpandedIds?: string[];
1624
+ onSelectionChange?: (ids: string[]) => void;
1625
+ }
1626
+ interface ITreeNodeProperties extends IComponentSpacing, React$1.ComponentProps<"li"> {
1627
+ nodeId: string;
1628
+ level?: number;
1629
+ isLast?: boolean;
1630
+ }
1631
+ interface ITreeTriggerProperties extends Omit<IButtonProperties, "value"> {
1632
+ nodeId: string;
1633
+ }
1634
+ interface ITreeContentProperties extends IComponentSpacing, React$1.ComponentProps<"ul"> {
1635
+ nodeId: string;
1636
+ defaultOpen?: boolean;
1637
+ }
1638
+ /**
1639
+ * Tree is used to display a hierarchical list of items.
1640
+ *
1641
+ * **Best practices:**
1642
+ *
1643
+ * - Use a clear and descriptive label for each tree node.
1644
+ * - Ensure that the tree can be operated using only the keyboard.
1645
+ * - Ensure that the focus is properly managed when nodes are expanded/collapsed.
1646
+ *
1647
+ * @param {ITreeProperties} props - The props for the Tree component.
1648
+ * @param {ReactNode} props.children - The content to be rendered inside the tree.
1649
+ * @returns {ReactElement} The Tree component.
1650
+ */
1651
+ declare const Tree: {
1652
+ (props: ITreeProperties): React$1.JSX.Element;
1653
+ displayName: string;
1654
+ Root: {
1655
+ ({ children, defaultExpandedIds, onSelectionChange, }: ITreeRootProperties): React$1.JSX.Element;
1656
+ displayName: string;
1657
+ };
1658
+ Node: {
1659
+ (props: ITreeNodeProperties): React$1.JSX.Element;
1660
+ displayName: string;
1661
+ };
1662
+ Trigger: {
1663
+ (props: ITreeTriggerProperties): React$1.JSX.Element;
1664
+ displayName: string;
1665
+ };
1666
+ Content: {
1667
+ (props: ITreeContentProperties): React$1.JSX.Element;
1668
+ displayName: string;
1669
+ };
1670
+ };
1671
+ declare const TreeRoot: {
1672
+ ({ children, defaultExpandedIds, onSelectionChange, }: ITreeRootProperties): React$1.JSX.Element;
1673
+ displayName: string;
1674
+ };
1675
+ /**
1676
+ * Tree.Node is used to wrap each node of the tree.
1677
+ *
1678
+ * **Best practices:**
1679
+ *
1680
+ * - Provide a unique nodeId for each node.
1681
+ * - Use the level prop to indicate the depth of the node in the hierarchy.
1682
+ *
1683
+ * @param {ITreeNodeProperties} props - The props for the Tree.Node component.
1684
+ * @param {string} props.nodeId - The unique identifier for the node.
1685
+ * @param {number} props.level - The depth level of the node. Defaults to 0.
1686
+ * @param {boolean} props.isLast - Whether the node is the last in its siblings. Defaults to false.
1687
+ * @param {ReactNode} props.children - The content to be rendered inside the node.
1688
+ * @returns {ReactElement} The Tree.Node component.
1689
+ */
1690
+ declare const TreeNode: {
1691
+ (props: ITreeNodeProperties): React$1.JSX.Element;
1692
+ displayName: string;
1693
+ };
1694
+ /**
1695
+ * Tree.Trigger is used to trigger the expansion and collapse of the associated Tree.Content component.
1696
+ *
1697
+ * **Best practices:**
1698
+ *
1699
+ * - Use a clear and descriptive label for the trigger.
1700
+ * - Ensure that the trigger can be operated using only the keyboard.
1701
+ * - Ensure that the focus is properly managed when the trigger is activated.
1702
+ *
1703
+ * @param {ITreeTriggerProperties} props - The props for the Tree.Trigger component.
1704
+ * @param {string} props.nodeId - The value used to bind the Tree.Trigger and Tree.Content components.
1705
+ * @param {ReactNode} props.children - The content to be rendered inside the trigger.
1706
+ * @returns {ReactElement} The Tree.Trigger component.
1707
+ */
1708
+ declare const TreeTrigger: {
1709
+ (props: ITreeTriggerProperties): React$1.JSX.Element;
1710
+ displayName: string;
1711
+ };
1712
+ /**
1713
+ * Tree.Content is used to contain the children of the associated Tree.Trigger component.
1714
+ *
1715
+ * **Best practices:**
1716
+ *
1717
+ * - Ensure that the content is hidden when the associated node is collapsed.
1718
+ * - Ensure that the content is properly focused when the associated node is expanded.
1719
+ *
1720
+ * @param {ITreeContentProperties} props - The props for the Tree.Content component.
1721
+ * @param {string} props.nodeId - The value used to bind the Tree.Content and Tree.Trigger components.
1722
+ * @param {boolean} props.defaultOpen - The initial open state of the content. Defaults to false.
1723
+ * @param {ReactNode} props.children - The content to be rendered inside the node content.
1724
+ * @returns {ReactElement} The Tree.Content component.
1725
+ */
1726
+ declare const TreeContent: {
1727
+ (props: ITreeContentProperties): React$1.JSX.Element;
1728
+ displayName: string;
1729
+ };
1730
+
1501
1731
  declare const useAccordion: () => IComponentAPI;
1502
1732
 
1503
1733
  declare const useCheckbox: () => IComponentAPI;
@@ -1524,4 +1754,10 @@ declare const useTabs: () => IComponentAPI;
1524
1754
 
1525
1755
  declare const useToolbar: () => IComponentAPI;
1526
1756
 
1527
- export { Accordion, AccordionContent, AccordionRoot, AccordionTrigger, AvataStatusEnum, Avatar, Badge, Breadcrumb, type BreadcrumbComposition, BreadcrumbItem, BreadcrumbSeparator, Button, Card, CardBody, type CardComposition, CardGrid, CardMeta, Checkbox, CheckboxIndicator, CheckboxRoot, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, CopyButton, Dialog, DialogControl, DialogMenu, DialogOverlay, DialogRoot, DialogTrigger, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuRoot, DropdownMenuTrigger, Field, FieldLabel, FieldMeta, FieldRoot, FieldWrapper, type IAccordionComposition, type IAccordionContentProperties, type IAccordionProperties, type IAccordionTriggerProperties, type IAvatarProperties, type IButtonProperties, type ICheckboxComposition, type ICheckboxProperties, type ICollapsibleComposition, type ICollapsibleProperties, type IDialogItemProperties, type IDropdownComposition, type IDropdownContentProperties, type IDropdownItemProperties, type IField, type IFieldComposition, type IFieldLabel, type IFieldMeta, type IOTPFieldComposition, type IOverlayProperties, type IPageToolsProperties, type IPageWrapperProperties, type IPortalProperties, type IScrollAreaProperties, type ISheetComposition, type ISheetProperties, type ISwitchComposition, type ISwitchProperties, type ISwitchThumbProperties, type ITabsComposition, type ITabsProperties, type IToggleProperties, type IToolbarBodyProperties, type IToolbarComposition, type IToolbarItemProperties, type IToolbarSectionProperties, MetaVariantEnum, OTPField, OTPFieldSlot, Overlay, Page, PageContent, PageMenu, PageNavigation, PagePanel, PageTools, PageWrapper, Portal, PrivacyField, Resizable, ScrollArea, type ScrollContainerProps, Sheet, SheetRoot, SheetTrigger, Skeleton, type SkeletonProperties, Spinner, Switch, SwitchRoot, SwitchThumb, type TMetaVariant, Table, TableBody, TableCell, TableFooter, TableHead, TableHeadCell, TableRow, Tabs, TabsContent, TabsRoot, TabsTrigger, Textarea, type TextareaProps, Toggle, Toolbar, ToolbarItem, ToolbarRoot, ToolbarSection, ToolbarTrigger, Tooltip, useAccordion, useCheckbox, useCollapsible, useDialog, useDropdownMenu, useField, useSheet, useSwitch, useTabs, useToolbar };
1757
+ declare const useMessageBubble: () => IComponentAPI;
1758
+
1759
+ declare const useTree: () => IComponentAPI;
1760
+
1761
+ declare const useTreeNode: () => IComponentAPI;
1762
+
1763
+ export { Accordion, AccordionContent, AccordionRoot, AccordionTrigger, AvataStatusEnum, Avatar, Badge, Breadcrumb, type BreadcrumbComposition, BreadcrumbItem, BreadcrumbSeparator, Button, Card, CardBody, type CardComposition, CardGrid, CardMeta, Checkbox, CheckboxIndicator, CheckboxRoot, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, CopyButton, Dialog, DialogControl, DialogMenu, DialogOverlay, DialogRoot, DialogTrigger, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuRoot, DropdownMenuTrigger, Field, FieldLabel, FieldMeta, FieldRoot, FieldWrapper, type IAccordionComposition, type IAccordionContentProperties, type IAccordionProperties, type IAccordionTriggerProperties, type IAvatarProperties, type IBadgeProperties, type IButtonProperties, type ICheckboxComposition, type ICheckboxProperties, type ICollapsibleComposition, type ICollapsibleProperties, type IDialogItemProperties, type IDropdownComposition, type IDropdownContentProperties, type IDropdownItemProperties, type IField, type IFieldComposition, type IFieldLabel, type IFieldMeta, type IMessageBubbleContentProperties, type IMessageBubbleContext, type IMessageBubbleMetaProperties, type IMessageBubbleProperties, type IOTPFieldComposition, type IOverlayProperties, type IPageToolsProperties, type IPageWrapperProperties, type IPortalProperties, type IScrollAreaProperties, type ISheetComposition, type ISheetProperties, type ISwitchComposition, type ISwitchProperties, type ISwitchThumbProperties, type ITabsComposition, type ITabsProperties, type ITextShimmerProperties, type IToggleProperties, type IToolbarBodyProperties, type IToolbarComposition, type IToolbarItemProperties, type IToolbarSectionProperties, type ITreeComposition, type ITreeContentProperties, type ITreeNodeProperties, type ITreeProperties, type ITreeRootProperties, type ITreeTriggerProperties, MessageBubble, MessageBubbleContent, MessageBubbleMeta, MessageBubbleRoot, type MessageBubbleSide, MetaVariantEnum, OTPField, OTPFieldSlot, Overlay, Page, PageContent, PageMenu, PageNavigation, PagePanel, PageTools, PageWrapper, Portal, PrivacyField, Resizable, ScrollArea, type ScrollContainerProps, Sheet, SheetRoot, SheetTrigger, Shimmer, Skeleton, type SkeletonProperties, Spinner, Switch, SwitchRoot, SwitchThumb, type TMetaVariant, Table, TableBody, TableCell, TableFooter, TableHead, TableHeadCell, TableRow, Tabs, TabsContent, TabsRoot, TabsTrigger, Textarea, type TextareaProps, Toggle, Toolbar, ToolbarItem, ToolbarRoot, ToolbarSection, ToolbarTrigger, Tooltip, Tree, TreeContent, TreeNode, TreeRoot, TreeTrigger, useAccordion, useCheckbox, useCollapsible, useDialog, useDropdownMenu, useField, useMessageBubble, useSheet, useSwitch, useTabs, useToolbar, useTree, useTreeNode };
package/dist/index.d.ts CHANGED
@@ -730,6 +730,90 @@ declare const FieldMeta: {
730
730
  displayName: string;
731
731
  };
732
732
 
733
+ type MessageBubbleSide = "left" | "right";
734
+ interface IMessageBubbleContext {
735
+ side: MessageBubbleSide;
736
+ }
737
+ interface IMessageBubbleProperties extends IComponentStyling, React$1.HTMLAttributes<HTMLDivElement> {
738
+ side: MessageBubbleSide;
739
+ }
740
+ interface IMessageBubbleContentProperties extends IComponentStyling, React$1.HTMLAttributes<HTMLDivElement> {
741
+ children: string;
742
+ }
743
+ interface IMessageBubbleMetaProperties extends IComponentStyling, React$1.HTMLAttributes<HTMLDivElement> {
744
+ createdAt: Date;
745
+ }
746
+ declare const MessageBubbleRoot: {
747
+ ({ children }: IReactChildren): React$1.JSX.Element;
748
+ displayName: string;
749
+ };
750
+ /**
751
+ * MessageBubble is used to display a chat message with an optional side and raw layout.
752
+ *
753
+ * **Best practices:**
754
+ *
755
+ * - Always wrap MessageBubble inside a MessageBubble.Root to provide the necessary context.
756
+ * - Use `side` to visually distinguish between sent and received messages.
757
+ * - Pair with MessageBubble.Content and MessageBubble.Meta for a complete message layout.
758
+ *
759
+ * @param {IMessageBubbleProperties} props - The props for the MessageBubble component.
760
+ * @param {"left" | "right"} props.side - The side the bubble is aligned to. Propagated to all child compounds via context.
761
+ * @param {boolean} props.raw - When true, removes default styling for custom layouts.
762
+ * @param {ReactNode} props.children - The content to be rendered inside the bubble.
763
+ * @returns {ReactElement} The MessageBubble component.
764
+ */
765
+ declare const MessageBubble: {
766
+ (props: IMessageBubbleProperties): React$1.JSX.Element;
767
+ displayName: string;
768
+ Root: {
769
+ ({ children }: IReactChildren): React$1.JSX.Element;
770
+ displayName: string;
771
+ };
772
+ Content: {
773
+ (props: IMessageBubbleContentProperties): React$1.JSX.Element;
774
+ displayName: string;
775
+ };
776
+ Meta: {
777
+ (props: IMessageBubbleMetaProperties): React$1.JSX.Element;
778
+ displayName: string;
779
+ };
780
+ };
781
+ /**
782
+ * MessageBubble.Content is used to display the text or rich content of the message.
783
+ *
784
+ * **Best practices:**
785
+ *
786
+ * - Place MessageBubble.Content inside a MessageBubble to inherit the correct side context.
787
+ * - Avoid nesting interactive elements inside the content that may conflict with bubble focus management.
788
+ *
789
+ * @param {IMessageBubbleContentProperties} props - The props for the MessageBubble.Content component.
790
+ * @param {boolean} props.raw - When true, removes default styling for custom layouts.
791
+ * @param {ReactNode} props.children - The message text or rich content to render.
792
+ * @returns {ReactElement} The MessageBubble.Content component.
793
+ */
794
+ declare const MessageBubbleContent: {
795
+ (props: IMessageBubbleContentProperties): React$1.JSX.Element;
796
+ displayName: string;
797
+ };
798
+ /**
799
+ * MessageBubble.Meta is used to display metadata associated with the message, such as its timestamp.
800
+ *
801
+ * **Best practices:**
802
+ *
803
+ * - Always provide a valid `createdAt` date for accurate timestamp display.
804
+ * - Place MessageBubble.Meta after MessageBubble.Content for a natural reading flow.
805
+ * - The side is automatically inherited from context — do not pass it manually.
806
+ *
807
+ * @param {IMessageBubbleMetaProperties} props - The props for the MessageBubble.Meta component.
808
+ * @param {Date} props.createdAt - The date the message was created. Formatted as medium date and short time.
809
+ * @param {boolean} props.raw - When true, removes default styling for custom layouts.
810
+ * @returns {ReactElement} The MessageBubble.Meta component.
811
+ */
812
+ declare const MessageBubbleMeta: {
813
+ (props: IMessageBubbleMetaProperties): React$1.JSX.Element;
814
+ displayName: string;
815
+ };
816
+
733
817
  interface OTPFieldProps {
734
818
  name?: string;
735
819
  id?: string;
@@ -1055,6 +1139,35 @@ declare const SheetTrigger: {
1055
1139
  displayName: string;
1056
1140
  };
1057
1141
 
1142
+ interface ITextShimmerProperties extends IComponentStyling, React$1.HTMLAttributes<HTMLSpanElement> {
1143
+ duration?: number;
1144
+ spread?: number;
1145
+ shimmerColor?: string;
1146
+ baseColor?: string;
1147
+ }
1148
+ /**
1149
+ * Shimmer applies an animated shimmer gradient effect to inline text content.
1150
+ *
1151
+ * **Best practices:**
1152
+ *
1153
+ * - Use to indicate loading states for text content.
1154
+ * - Prefer CSS custom properties for `shimmerColor` and `baseColor` to stay consistent with your design tokens.
1155
+ * - Avoid using on large blocks of text; favour short labels or headings.
1156
+ *
1157
+ * @param {ITextShimmerProperties} props - The props for the Shimmer component.
1158
+ * @param {ReactNode} props.children - The text content to apply the shimmer effect to.
1159
+ * @param {boolean} props.raw - Whether the component is unstyled.
1160
+ * @param {number} props.duration - Animation cycle duration in seconds. Defaults to 2.
1161
+ * @param {number} props.spread - Gradient spread width as a percentage. Defaults to 200.
1162
+ * @param {string} props.shimmerColor - Highlight color of the shimmer. Defaults to `--font-color-alpha-60`.
1163
+ * @param {string} props.baseColor - Base text gradient color. Defaults to `--font-color-alpha-30`.
1164
+ * @returns {ReactElement} The Shimmer component.
1165
+ */
1166
+ declare const Shimmer: {
1167
+ (props: ITextShimmerProperties): React$1.JSX.Element;
1168
+ displayName: string;
1169
+ };
1170
+
1058
1171
  interface IScrollAreaProperties extends React$1.ComponentProps<any> {
1059
1172
  scrollbar?: boolean;
1060
1173
  }
@@ -1498,6 +1611,123 @@ declare const Tooltip: {
1498
1611
  displayName: string;
1499
1612
  };
1500
1613
 
1614
+ interface ITreeComposition {
1615
+ Root: typeof TreeRoot;
1616
+ Node: typeof TreeNode;
1617
+ Trigger: typeof TreeTrigger;
1618
+ Content: typeof TreeContent;
1619
+ }
1620
+ interface ITreeProperties extends IComponentSpacing, React$1.ComponentProps<"ul"> {
1621
+ }
1622
+ interface ITreeRootProperties extends IReactChildren {
1623
+ defaultExpandedIds?: string[];
1624
+ onSelectionChange?: (ids: string[]) => void;
1625
+ }
1626
+ interface ITreeNodeProperties extends IComponentSpacing, React$1.ComponentProps<"li"> {
1627
+ nodeId: string;
1628
+ level?: number;
1629
+ isLast?: boolean;
1630
+ }
1631
+ interface ITreeTriggerProperties extends Omit<IButtonProperties, "value"> {
1632
+ nodeId: string;
1633
+ }
1634
+ interface ITreeContentProperties extends IComponentSpacing, React$1.ComponentProps<"ul"> {
1635
+ nodeId: string;
1636
+ defaultOpen?: boolean;
1637
+ }
1638
+ /**
1639
+ * Tree is used to display a hierarchical list of items.
1640
+ *
1641
+ * **Best practices:**
1642
+ *
1643
+ * - Use a clear and descriptive label for each tree node.
1644
+ * - Ensure that the tree can be operated using only the keyboard.
1645
+ * - Ensure that the focus is properly managed when nodes are expanded/collapsed.
1646
+ *
1647
+ * @param {ITreeProperties} props - The props for the Tree component.
1648
+ * @param {ReactNode} props.children - The content to be rendered inside the tree.
1649
+ * @returns {ReactElement} The Tree component.
1650
+ */
1651
+ declare const Tree: {
1652
+ (props: ITreeProperties): React$1.JSX.Element;
1653
+ displayName: string;
1654
+ Root: {
1655
+ ({ children, defaultExpandedIds, onSelectionChange, }: ITreeRootProperties): React$1.JSX.Element;
1656
+ displayName: string;
1657
+ };
1658
+ Node: {
1659
+ (props: ITreeNodeProperties): React$1.JSX.Element;
1660
+ displayName: string;
1661
+ };
1662
+ Trigger: {
1663
+ (props: ITreeTriggerProperties): React$1.JSX.Element;
1664
+ displayName: string;
1665
+ };
1666
+ Content: {
1667
+ (props: ITreeContentProperties): React$1.JSX.Element;
1668
+ displayName: string;
1669
+ };
1670
+ };
1671
+ declare const TreeRoot: {
1672
+ ({ children, defaultExpandedIds, onSelectionChange, }: ITreeRootProperties): React$1.JSX.Element;
1673
+ displayName: string;
1674
+ };
1675
+ /**
1676
+ * Tree.Node is used to wrap each node of the tree.
1677
+ *
1678
+ * **Best practices:**
1679
+ *
1680
+ * - Provide a unique nodeId for each node.
1681
+ * - Use the level prop to indicate the depth of the node in the hierarchy.
1682
+ *
1683
+ * @param {ITreeNodeProperties} props - The props for the Tree.Node component.
1684
+ * @param {string} props.nodeId - The unique identifier for the node.
1685
+ * @param {number} props.level - The depth level of the node. Defaults to 0.
1686
+ * @param {boolean} props.isLast - Whether the node is the last in its siblings. Defaults to false.
1687
+ * @param {ReactNode} props.children - The content to be rendered inside the node.
1688
+ * @returns {ReactElement} The Tree.Node component.
1689
+ */
1690
+ declare const TreeNode: {
1691
+ (props: ITreeNodeProperties): React$1.JSX.Element;
1692
+ displayName: string;
1693
+ };
1694
+ /**
1695
+ * Tree.Trigger is used to trigger the expansion and collapse of the associated Tree.Content component.
1696
+ *
1697
+ * **Best practices:**
1698
+ *
1699
+ * - Use a clear and descriptive label for the trigger.
1700
+ * - Ensure that the trigger can be operated using only the keyboard.
1701
+ * - Ensure that the focus is properly managed when the trigger is activated.
1702
+ *
1703
+ * @param {ITreeTriggerProperties} props - The props for the Tree.Trigger component.
1704
+ * @param {string} props.nodeId - The value used to bind the Tree.Trigger and Tree.Content components.
1705
+ * @param {ReactNode} props.children - The content to be rendered inside the trigger.
1706
+ * @returns {ReactElement} The Tree.Trigger component.
1707
+ */
1708
+ declare const TreeTrigger: {
1709
+ (props: ITreeTriggerProperties): React$1.JSX.Element;
1710
+ displayName: string;
1711
+ };
1712
+ /**
1713
+ * Tree.Content is used to contain the children of the associated Tree.Trigger component.
1714
+ *
1715
+ * **Best practices:**
1716
+ *
1717
+ * - Ensure that the content is hidden when the associated node is collapsed.
1718
+ * - Ensure that the content is properly focused when the associated node is expanded.
1719
+ *
1720
+ * @param {ITreeContentProperties} props - The props for the Tree.Content component.
1721
+ * @param {string} props.nodeId - The value used to bind the Tree.Content and Tree.Trigger components.
1722
+ * @param {boolean} props.defaultOpen - The initial open state of the content. Defaults to false.
1723
+ * @param {ReactNode} props.children - The content to be rendered inside the node content.
1724
+ * @returns {ReactElement} The Tree.Content component.
1725
+ */
1726
+ declare const TreeContent: {
1727
+ (props: ITreeContentProperties): React$1.JSX.Element;
1728
+ displayName: string;
1729
+ };
1730
+
1501
1731
  declare const useAccordion: () => IComponentAPI;
1502
1732
 
1503
1733
  declare const useCheckbox: () => IComponentAPI;
@@ -1524,4 +1754,10 @@ declare const useTabs: () => IComponentAPI;
1524
1754
 
1525
1755
  declare const useToolbar: () => IComponentAPI;
1526
1756
 
1527
- export { Accordion, AccordionContent, AccordionRoot, AccordionTrigger, AvataStatusEnum, Avatar, Badge, Breadcrumb, type BreadcrumbComposition, BreadcrumbItem, BreadcrumbSeparator, Button, Card, CardBody, type CardComposition, CardGrid, CardMeta, Checkbox, CheckboxIndicator, CheckboxRoot, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, CopyButton, Dialog, DialogControl, DialogMenu, DialogOverlay, DialogRoot, DialogTrigger, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuRoot, DropdownMenuTrigger, Field, FieldLabel, FieldMeta, FieldRoot, FieldWrapper, type IAccordionComposition, type IAccordionContentProperties, type IAccordionProperties, type IAccordionTriggerProperties, type IAvatarProperties, type IButtonProperties, type ICheckboxComposition, type ICheckboxProperties, type ICollapsibleComposition, type ICollapsibleProperties, type IDialogItemProperties, type IDropdownComposition, type IDropdownContentProperties, type IDropdownItemProperties, type IField, type IFieldComposition, type IFieldLabel, type IFieldMeta, type IOTPFieldComposition, type IOverlayProperties, type IPageToolsProperties, type IPageWrapperProperties, type IPortalProperties, type IScrollAreaProperties, type ISheetComposition, type ISheetProperties, type ISwitchComposition, type ISwitchProperties, type ISwitchThumbProperties, type ITabsComposition, type ITabsProperties, type IToggleProperties, type IToolbarBodyProperties, type IToolbarComposition, type IToolbarItemProperties, type IToolbarSectionProperties, MetaVariantEnum, OTPField, OTPFieldSlot, Overlay, Page, PageContent, PageMenu, PageNavigation, PagePanel, PageTools, PageWrapper, Portal, PrivacyField, Resizable, ScrollArea, type ScrollContainerProps, Sheet, SheetRoot, SheetTrigger, Skeleton, type SkeletonProperties, Spinner, Switch, SwitchRoot, SwitchThumb, type TMetaVariant, Table, TableBody, TableCell, TableFooter, TableHead, TableHeadCell, TableRow, Tabs, TabsContent, TabsRoot, TabsTrigger, Textarea, type TextareaProps, Toggle, Toolbar, ToolbarItem, ToolbarRoot, ToolbarSection, ToolbarTrigger, Tooltip, useAccordion, useCheckbox, useCollapsible, useDialog, useDropdownMenu, useField, useSheet, useSwitch, useTabs, useToolbar };
1757
+ declare const useMessageBubble: () => IComponentAPI;
1758
+
1759
+ declare const useTree: () => IComponentAPI;
1760
+
1761
+ declare const useTreeNode: () => IComponentAPI;
1762
+
1763
+ export { Accordion, AccordionContent, AccordionRoot, AccordionTrigger, AvataStatusEnum, Avatar, Badge, Breadcrumb, type BreadcrumbComposition, BreadcrumbItem, BreadcrumbSeparator, Button, Card, CardBody, type CardComposition, CardGrid, CardMeta, Checkbox, CheckboxIndicator, CheckboxRoot, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, CopyButton, Dialog, DialogControl, DialogMenu, DialogOverlay, DialogRoot, DialogTrigger, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuRoot, DropdownMenuTrigger, Field, FieldLabel, FieldMeta, FieldRoot, FieldWrapper, type IAccordionComposition, type IAccordionContentProperties, type IAccordionProperties, type IAccordionTriggerProperties, type IAvatarProperties, type IBadgeProperties, type IButtonProperties, type ICheckboxComposition, type ICheckboxProperties, type ICollapsibleComposition, type ICollapsibleProperties, type IDialogItemProperties, type IDropdownComposition, type IDropdownContentProperties, type IDropdownItemProperties, type IField, type IFieldComposition, type IFieldLabel, type IFieldMeta, type IMessageBubbleContentProperties, type IMessageBubbleContext, type IMessageBubbleMetaProperties, type IMessageBubbleProperties, type IOTPFieldComposition, type IOverlayProperties, type IPageToolsProperties, type IPageWrapperProperties, type IPortalProperties, type IScrollAreaProperties, type ISheetComposition, type ISheetProperties, type ISwitchComposition, type ISwitchProperties, type ISwitchThumbProperties, type ITabsComposition, type ITabsProperties, type ITextShimmerProperties, type IToggleProperties, type IToolbarBodyProperties, type IToolbarComposition, type IToolbarItemProperties, type IToolbarSectionProperties, type ITreeComposition, type ITreeContentProperties, type ITreeNodeProperties, type ITreeProperties, type ITreeRootProperties, type ITreeTriggerProperties, MessageBubble, MessageBubbleContent, MessageBubbleMeta, MessageBubbleRoot, type MessageBubbleSide, MetaVariantEnum, OTPField, OTPFieldSlot, Overlay, Page, PageContent, PageMenu, PageNavigation, PagePanel, PageTools, PageWrapper, Portal, PrivacyField, Resizable, ScrollArea, type ScrollContainerProps, Sheet, SheetRoot, SheetTrigger, Shimmer, Skeleton, type SkeletonProperties, Spinner, Switch, SwitchRoot, SwitchThumb, type TMetaVariant, Table, TableBody, TableCell, TableFooter, TableHead, TableHeadCell, TableRow, Tabs, TabsContent, TabsRoot, TabsTrigger, Textarea, type TextareaProps, Toggle, Toolbar, ToolbarItem, ToolbarRoot, ToolbarSection, ToolbarTrigger, Tooltip, Tree, TreeContent, TreeNode, TreeRoot, TreeTrigger, useAccordion, useCheckbox, useCollapsible, useDialog, useDropdownMenu, useField, useMessageBubble, useSheet, useSwitch, useTabs, useToolbar, useTree, useTreeNode };