@aurora-ds/components 0.10.0 → 0.15.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 (97) hide show
  1. package/README.md +16 -5
  2. package/dist/cjs/components/actions/button/Button.props.d.ts +2 -2
  3. package/dist/cjs/components/actions/icon-button/IconButton.props.d.ts +2 -2
  4. package/dist/cjs/components/data-display/avatar/Avatar.d.ts +9 -0
  5. package/dist/cjs/components/data-display/avatar/Avatar.props.d.ts +25 -0
  6. package/dist/cjs/components/data-display/avatar/Avatar.styles.d.ts +10 -0
  7. package/dist/cjs/components/data-display/avatar/AvatarGroup.d.ts +9 -0
  8. package/dist/cjs/components/data-display/avatar/avatar-group/AvatarGroup.d.ts +9 -0
  9. package/dist/cjs/components/data-display/avatar/avatar-group/AvatarGroup.props.d.ts +10 -0
  10. package/dist/cjs/components/data-display/avatar/avatar-group/AvatarGroup.styles.d.ts +14 -0
  11. package/dist/cjs/components/data-display/avatar/index.d.ts +4 -0
  12. package/dist/cjs/components/index.d.ts +4 -0
  13. package/dist/cjs/components/layout/separator/Separator.d.ts +9 -0
  14. package/dist/cjs/components/layout/separator/Separator.props.d.ts +17 -0
  15. package/dist/cjs/components/layout/separator/Separator.styles.d.ts +7 -0
  16. package/dist/cjs/components/layout/separator/index.d.ts +2 -0
  17. package/dist/cjs/components/navigation/tabs/Tabs.d.ts +7 -0
  18. package/dist/cjs/components/navigation/tabs/Tabs.props.d.ts +12 -0
  19. package/dist/cjs/components/navigation/tabs/Tabs.styles.d.ts +7 -0
  20. package/dist/cjs/components/navigation/tabs/index.d.ts +4 -0
  21. package/dist/cjs/components/navigation/tabs/tab-item/TabItem.d.ts +7 -0
  22. package/dist/cjs/components/navigation/tabs/tab-item/TabItem.props.d.ts +10 -0
  23. package/dist/cjs/components/navigation/tabs/tab-item/TabItem.styles.d.ts +6 -0
  24. package/dist/cjs/components/overlay/menu/Menu.d.ts +4 -0
  25. package/dist/cjs/components/overlay/menu/Menu.props.d.ts +9 -0
  26. package/dist/cjs/components/overlay/menu/Menu.styles.d.ts +4 -0
  27. package/dist/cjs/components/overlay/menu/MenuGroup/MenuGroup.d.ts +4 -0
  28. package/dist/cjs/components/overlay/menu/MenuGroup/MenuGroup.props.d.ts +4 -0
  29. package/dist/cjs/components/overlay/menu/MenuGroup/MenuGroup.styles.d.ts +3 -0
  30. package/dist/cjs/components/overlay/menu/MenuGroup/index.d.ts +2 -0
  31. package/dist/cjs/components/overlay/menu/MenuItem/MenuItem.d.ts +4 -0
  32. package/dist/cjs/components/overlay/menu/MenuItem/MenuItem.props.d.ts +6 -0
  33. package/dist/cjs/components/overlay/menu/MenuItem/MenuItem.styles.d.ts +3 -0
  34. package/dist/cjs/components/overlay/menu/MenuItem/index.d.ts +2 -0
  35. package/dist/cjs/components/overlay/menu/index.d.ts +6 -0
  36. package/dist/cjs/constants/globalConstants.d.ts +1 -0
  37. package/dist/cjs/hooks/index.d.ts +5 -0
  38. package/dist/cjs/hooks/useAnchorPosition.d.ts +17 -0
  39. package/dist/cjs/hooks/useAnchorPosition.types.d.ts +5 -0
  40. package/dist/cjs/hooks/useClickOutside.d.ts +8 -0
  41. package/dist/cjs/hooks/useTransitionRender.d.ts +7 -0
  42. package/dist/cjs/hooks/useTransitionRender.types.d.ts +4 -0
  43. package/dist/cjs/index.d.ts +1 -0
  44. package/dist/cjs/index.js +420 -33
  45. package/dist/cjs/index.js.map +1 -1
  46. package/dist/cjs/interfaces/avatar.types.d.ts +2 -0
  47. package/dist/cjs/interfaces/index.d.ts +1 -0
  48. package/dist/cjs/utils/ui/components/data-display/avatar/getAvatarSizes.utils.d.ts +11 -0
  49. package/dist/esm/components/actions/button/Button.props.d.ts +2 -2
  50. package/dist/esm/components/actions/icon-button/IconButton.props.d.ts +2 -2
  51. package/dist/esm/components/data-display/avatar/Avatar.d.ts +9 -0
  52. package/dist/esm/components/data-display/avatar/Avatar.props.d.ts +25 -0
  53. package/dist/esm/components/data-display/avatar/Avatar.styles.d.ts +10 -0
  54. package/dist/esm/components/data-display/avatar/AvatarGroup.d.ts +9 -0
  55. package/dist/esm/components/data-display/avatar/avatar-group/AvatarGroup.d.ts +9 -0
  56. package/dist/esm/components/data-display/avatar/avatar-group/AvatarGroup.props.d.ts +10 -0
  57. package/dist/esm/components/data-display/avatar/avatar-group/AvatarGroup.styles.d.ts +14 -0
  58. package/dist/esm/components/data-display/avatar/index.d.ts +4 -0
  59. package/dist/esm/components/index.d.ts +4 -0
  60. package/dist/esm/components/layout/separator/Separator.d.ts +9 -0
  61. package/dist/esm/components/layout/separator/Separator.props.d.ts +17 -0
  62. package/dist/esm/components/layout/separator/Separator.styles.d.ts +7 -0
  63. package/dist/esm/components/layout/separator/index.d.ts +2 -0
  64. package/dist/esm/components/navigation/tabs/Tabs.d.ts +7 -0
  65. package/dist/esm/components/navigation/tabs/Tabs.props.d.ts +12 -0
  66. package/dist/esm/components/navigation/tabs/Tabs.styles.d.ts +7 -0
  67. package/dist/esm/components/navigation/tabs/index.d.ts +4 -0
  68. package/dist/esm/components/navigation/tabs/tab-item/TabItem.d.ts +7 -0
  69. package/dist/esm/components/navigation/tabs/tab-item/TabItem.props.d.ts +10 -0
  70. package/dist/esm/components/navigation/tabs/tab-item/TabItem.styles.d.ts +6 -0
  71. package/dist/esm/components/overlay/menu/Menu.d.ts +4 -0
  72. package/dist/esm/components/overlay/menu/Menu.props.d.ts +9 -0
  73. package/dist/esm/components/overlay/menu/Menu.styles.d.ts +4 -0
  74. package/dist/esm/components/overlay/menu/MenuGroup/MenuGroup.d.ts +4 -0
  75. package/dist/esm/components/overlay/menu/MenuGroup/MenuGroup.props.d.ts +4 -0
  76. package/dist/esm/components/overlay/menu/MenuGroup/MenuGroup.styles.d.ts +3 -0
  77. package/dist/esm/components/overlay/menu/MenuGroup/index.d.ts +2 -0
  78. package/dist/esm/components/overlay/menu/MenuItem/MenuItem.d.ts +4 -0
  79. package/dist/esm/components/overlay/menu/MenuItem/MenuItem.props.d.ts +6 -0
  80. package/dist/esm/components/overlay/menu/MenuItem/MenuItem.styles.d.ts +3 -0
  81. package/dist/esm/components/overlay/menu/MenuItem/index.d.ts +2 -0
  82. package/dist/esm/components/overlay/menu/index.d.ts +6 -0
  83. package/dist/esm/constants/globalConstants.d.ts +1 -0
  84. package/dist/esm/hooks/index.d.ts +5 -0
  85. package/dist/esm/hooks/useAnchorPosition.d.ts +17 -0
  86. package/dist/esm/hooks/useAnchorPosition.types.d.ts +5 -0
  87. package/dist/esm/hooks/useClickOutside.d.ts +8 -0
  88. package/dist/esm/hooks/useTransitionRender.d.ts +7 -0
  89. package/dist/esm/hooks/useTransitionRender.types.d.ts +4 -0
  90. package/dist/esm/index.d.ts +1 -0
  91. package/dist/esm/index.js +378 -2
  92. package/dist/esm/index.js.map +1 -1
  93. package/dist/esm/interfaces/avatar.types.d.ts +2 -0
  94. package/dist/esm/interfaces/index.d.ts +1 -0
  95. package/dist/esm/utils/ui/components/data-display/avatar/getAvatarSizes.utils.d.ts +11 -0
  96. package/dist/index.d.ts +161 -5
  97. package/package.json +1 -1
package/README.md CHANGED
@@ -47,15 +47,26 @@ function App() {
47
47
  | Component | Description |
48
48
  |-----------|-------------|
49
49
  | **Accordion** | Collapsible container to show/hide content |
50
- | **Button** | Button with variants (contained, outlined, text), icons, and states |
50
+ | **Avatar** | User avatar display component with image or initials |
51
+ | **AvatarGroup** | Group of avatars with overlapping display |
51
52
  | **Breadcrumb** | Navigation component for hierarchical page structures |
52
- | **IconButton** | Icon-only button component |
53
- | **Input** | Input field component with controlled value and change handler |
54
- | **Text** | Typography component with semantic HTML tags (h1-h6, p, span, label) |
55
- | **Stack** | Flexbox container for horizontal/vertical layouts |
53
+ | **Button** | Button with variants (contained, outlined, text), icons, and states |
56
54
  | **Card** | Container with background, border radius, and shadow |
57
55
  | **Chip** | Compact element for tags, labels, or status indicators |
56
+ | **DrawerItem** | Item in a drawer navigation |
57
+ | **Form** | Form container component |
58
+ | **Grid** | Grid layout component |
58
59
  | **Icon** | Icon wrapper component |
60
+ | **IconButton** | Icon-only button component |
61
+ | **Input** | Input field component with controlled value and change handler |
62
+ | **Menu** | Dropdown menu component positioned absolutely |
63
+ | **Page** | Page layout component |
64
+ | **PageSection** | Section within a page |
65
+ | **Separator** | Visual separator component |
66
+ | **Stack** | Flexbox container for horizontal/vertical layouts |
67
+ | **Tabs** | Tab navigation component with multiple sections, used with `TabItem` |
68
+ | **Text** | Typography component with semantic HTML tags (h1-h6, p, span, label) |
69
+ | **TextArea** | Multi-line text input component |
59
70
 
60
71
  ## License
61
72
 
@@ -1,5 +1,5 @@
1
1
  import { Theme } from '@aurora-ds/theme';
2
- import { ReactNode } from 'react';
2
+ import { ReactNode, MouseEvent } from 'react';
3
3
  import { ButtonVariants, IconButtonSizes } from '@interfaces/button.types.ts';
4
4
  export type ButtonProps = {
5
5
  /** Button text label */
@@ -9,7 +9,7 @@ export type ButtonProps = {
9
9
  /** Optional icon to display after label */
10
10
  endIcon?: ReactNode;
11
11
  /** Click handler */
12
- onClick?: () => void;
12
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
13
13
  /** Visual variant of the button */
14
14
  variant?: ButtonVariants;
15
15
  /** Button type attribute */
@@ -1,11 +1,11 @@
1
1
  import { Theme } from '@aurora-ds/theme';
2
- import { ReactNode } from 'react';
2
+ import { MouseEvent, ReactNode } from 'react';
3
3
  import { IconButtonSizes, IconButtonVariants } from '@/interfaces';
4
4
  export type IconButtonProps = {
5
5
  /** IconButton icon */
6
6
  icon?: ReactNode;
7
7
  /** Click handler */
8
- onClick?: () => void;
8
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
9
9
  /** Visual variant of the button */
10
10
  variant?: IconButtonVariants;
11
11
  /** Button type attribute */
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { AvatarProps } from '@components/data-display/avatar/Avatar.props.ts';
3
+ /**
4
+ * Avatar component
5
+ *
6
+ * Displays a user's avatar with optional image or fallback text.
7
+ */
8
+ declare const Avatar: FC<AvatarProps>;
9
+ export default Avatar;
@@ -0,0 +1,25 @@
1
+ import { MouseEvent } from 'react';
2
+ import { AvatarSize } from '@interfaces/avatar.types.ts';
3
+ export type AvatarProps = {
4
+ /** Image source URL */
5
+ image?: string;
6
+ /** Fallback text to display when no image */
7
+ label?: string;
8
+ /** Click handler */
9
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
10
+ /** Size of the avatar */
11
+ size?: AvatarSize;
12
+ /** Text color for the label */
13
+ color?: string;
14
+ /** Border color */
15
+ borderColor?: string;
16
+ /** Background color */
17
+ backgroundColor?: string;
18
+ };
19
+ export type AvatarStyleParams = {
20
+ hasImage?: boolean;
21
+ size?: AvatarSize;
22
+ color?: string;
23
+ borderColor?: string;
24
+ backgroundColor?: string;
25
+ };
@@ -0,0 +1,10 @@
1
+ import { AvatarStyleParams } from '@components/data-display/avatar/Avatar.props.ts';
2
+ /**
3
+ * Avatar styles using createStyles from @aurora-ds/theme
4
+ */
5
+ export declare const AVATAR_STYLES: {
6
+ root: (args_0: AvatarStyleParams & {
7
+ clickable?: boolean;
8
+ }) => string;
9
+ image: string;
10
+ };
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { AvatarGroupProps } from '@components/data-display/avatar/Avatar.props.ts';
3
+ /**
4
+ * AvatarGroup component
5
+ *
6
+ * Groups multiple avatars with optional compact overlapping and limit.
7
+ */
8
+ declare const AvatarGroup: FC<AvatarGroupProps>;
9
+ export default AvatarGroup;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { AvatarGroupProps } from '@/components';
3
+ /**
4
+ * AvatarGroup component
5
+ *
6
+ * Groups multiple avatars with overlapping display and optional limit.
7
+ */
8
+ declare const AvatarGroup: FC<AvatarGroupProps>;
9
+ export default AvatarGroup;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import { AvatarSize } from '@/interfaces';
3
+ export type AvatarGroupProps = {
4
+ /** Avatar children */
5
+ children: ReactNode;
6
+ /** Maximum number of avatars to display */
7
+ limit?: number;
8
+ /** Size of the avatars in the group */
9
+ size?: AvatarSize;
10
+ };
@@ -0,0 +1,14 @@
1
+ import { AvatarSize } from '@/interfaces';
2
+ /**
3
+ * AvatarGroup styles using createStyles from @aurora-ds/theme
4
+ */
5
+ export declare const AVATAR_GROUP_STYLES: {
6
+ root: string;
7
+ child: (args_0: {
8
+ size?: AvatarSize;
9
+ }) => string;
10
+ firstChild: string;
11
+ more: (args_0: {
12
+ size?: AvatarSize;
13
+ }) => string;
14
+ };
@@ -0,0 +1,4 @@
1
+ export { default as Avatar } from '@components/data-display/avatar/Avatar.tsx';
2
+ export { default as AvatarGroup } from '@components/data-display/avatar/avatar-group/AvatarGroup.tsx';
3
+ export type { AvatarProps } from '@components/data-display/avatar/Avatar.props.ts';
4
+ export type { AvatarGroupProps } from '@components/data-display/avatar/avatar-group/AvatarGroup.props.ts';
@@ -1,6 +1,7 @@
1
1
  export * from '@components/foundation/icon';
2
2
  export * from '@components/foundation/text';
3
3
  export * from '@components/data-display/chip';
4
+ export * from '@components/data-display/avatar';
4
5
  export * from '@components/actions/button';
5
6
  export * from '@components/actions/icon-button';
6
7
  export * from '@components/forms/form';
@@ -9,11 +10,14 @@ export * from '@components/forms/textarea';
9
10
  export * from '@components/layout/stack';
10
11
  export * from '@components/layout/card';
11
12
  export * from '@components/layout/grid';
13
+ export * from '@components/layout/separator';
12
14
  export * from '@components/layout/page-construction/page-section';
13
15
  export * from '@components/layout/page-construction/page';
14
16
  export * from '@components/overlay/accordion';
17
+ export * from '@components/overlay/menu';
15
18
  export * from '@components/navigation/drawer-item';
16
19
  export * from '@components/navigation/breadcrumb';
20
+ export * from '@components/navigation/tabs';
17
21
  export type { ButtonVariants, ButtonVariantStyle } from '@interfaces/button.types';
18
22
  export type { TextVariants, TextVariantStyle } from '@interfaces/text.types';
19
23
  export type { ChipVariant, ChipColor, ChipSize } from '@interfaces/chip.types';
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { SeparatorProps } from '@components/layout/separator/Separator.props.ts';
3
+ /**
4
+ * Separator component
5
+ *
6
+ * A simple separator line for horizontal or vertical division.
7
+ */
8
+ declare const Separator: FC<SeparatorProps>;
9
+ export default Separator;
@@ -0,0 +1,17 @@
1
+ import { Theme } from '@aurora-ds/theme';
2
+ export type SeparatorProps = {
3
+ /** Direction of the separator */
4
+ direction?: 'horizontal' | 'vertical';
5
+ /** Custom width (overrides default) */
6
+ width?: string | number;
7
+ /** Custom height (overrides default) */
8
+ height?: string | number;
9
+ /** Custom color (overrides default) */
10
+ color?: keyof Theme['colors'];
11
+ };
12
+ export type SeparatorStyleParams = {
13
+ direction?: 'horizontal' | 'vertical';
14
+ color?: keyof Theme['colors'];
15
+ width?: string | number;
16
+ height?: string | number;
17
+ };
@@ -0,0 +1,7 @@
1
+ import { SeparatorStyleParams } from '@components/layout/separator/Separator.props.ts';
2
+ /**
3
+ * Separator styles using createStyles from @aurora-ds/theme
4
+ */
5
+ export declare const SEPARATOR_STYLES: {
6
+ root: (args_0: SeparatorStyleParams) => string;
7
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Separator } from '@components/layout/separator/Separator.tsx';
2
+ export type { SeparatorProps } from '@components/layout/separator/Separator.props.ts';
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { TabsProps } from '@components/navigation/tabs/Tabs.props';
3
+ /**
4
+ * Tabs component for navigation between multiple sections
5
+ */
6
+ declare const Tabs: FC<TabsProps>;
7
+ export default Tabs;
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export type TabsProps = {
3
+ /** Children TabItem components */
4
+ children: ReactNode;
5
+ /** Currently active tab value or index */
6
+ activeTab?: string | number;
7
+ /** Width of the tabs container, default 100% */
8
+ width?: string;
9
+ };
10
+ export type TabsStyleParams = {
11
+ width?: string;
12
+ };
@@ -0,0 +1,7 @@
1
+ import { TabsStyleParams } from '@components/navigation/tabs/Tabs.props';
2
+ /**
3
+ * Tabs styles using createStyles from @aurora-ds/theme
4
+ */
5
+ export declare const TABS_STYLES: {
6
+ root: (args_0: TabsStyleParams) => string;
7
+ };
@@ -0,0 +1,4 @@
1
+ export { default as Tabs } from '@components/navigation/tabs/Tabs.tsx';
2
+ export type { TabsProps } from '@components/navigation/tabs/Tabs.props.ts';
3
+ export { default as TabItem } from '@components/navigation/tabs/tab-item/TabItem.tsx';
4
+ export type { TabItemProps } from '@components/navigation/tabs/tab-item/TabItem.props.ts';
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { TabItemProps } from '@components/navigation/tabs/tab-item/TabItem.props.ts';
3
+ /**
4
+ * TabItem component for use inside Tabs
5
+ */
6
+ declare const TabItem: FC<TabItemProps>;
7
+ export default TabItem;
@@ -0,0 +1,10 @@
1
+ export type TabItemProps = {
2
+ /** Label of the tab */
3
+ label: string;
4
+ /** Optional value associated with the tab */
5
+ value?: string | number;
6
+ /** Whether the tab is active */
7
+ isActive?: boolean;
8
+ /** Click handler */
9
+ onClick?: () => void;
10
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Tabs styles using createStyles from @aurora-ds/theme
3
+ */
4
+ export declare const TAB_ITEM_STYLES: {
5
+ tab: (isActive: boolean) => string;
6
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { MenuProps } from '@components/overlay/menu/Menu.props';
3
+ declare const Menu: FC<MenuProps>;
4
+ export default Menu;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ import { AnchorOrigin } from '@hooks/useAnchorPosition.types';
3
+ export type MenuProps = {
4
+ anchor: HTMLElement | null;
5
+ onClose: () => void;
6
+ children: ReactNode;
7
+ anchorOrigin?: AnchorOrigin;
8
+ width?: string;
9
+ };
@@ -0,0 +1,4 @@
1
+ import { AnchorOrigin, AnchorPosition } from '@hooks/useAnchorPosition.types';
2
+ export declare const MENU_STYLES: {
3
+ root: (isFadingIn: boolean, anchorOrigin: AnchorOrigin, position: AnchorPosition, width?: string | undefined) => string;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { MenuGroupProps } from '@components/overlay/menu/MenuGroup/MenuGroup.props';
3
+ declare const MenuGroup: FC<MenuGroupProps>;
4
+ export default MenuGroup;
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export type MenuGroupProps = {
3
+ children: ReactNode;
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare const MENU_GROUP_STYLES: {
2
+ root: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ export { default as MenuGroup } from './MenuGroup.tsx';
2
+ export type { MenuGroupProps } from './MenuGroup.props';
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { MenuItemProps } from '@components/overlay/menu/MenuItem/MenuItem.props';
3
+ declare const MenuItem: FC<MenuItemProps>;
4
+ export default MenuItem;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export type MenuItemProps = {
3
+ label: string;
4
+ icon?: ReactNode;
5
+ onClick: () => void;
6
+ };
@@ -0,0 +1,3 @@
1
+ export declare const MENU_ITEM_STYLES: {
2
+ root: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ export { default as MenuItem } from './MenuItem.tsx';
2
+ export type { MenuItemProps } from './MenuItem.props';
@@ -0,0 +1,6 @@
1
+ export { default as Menu } from './Menu';
2
+ export type { MenuProps } from './Menu.props';
3
+ export { MenuGroup } from './MenuGroup';
4
+ export type { MenuGroupProps } from './MenuGroup/MenuGroup.props';
5
+ export { MenuItem } from './MenuItem';
6
+ export type { MenuItemProps } from './MenuItem/MenuItem.props';
@@ -1,2 +1,3 @@
1
1
  export declare const BUTTON_SIZE = 36;
2
2
  export declare const DRAWER_ITEM_HEIGHT = 32;
3
+ export declare const DEFAULT_TRANSITION_DURATION_MS = 150;
@@ -0,0 +1,5 @@
1
+ export { useAnchorPosition } from '@hooks/useAnchorPosition';
2
+ export type { AnchorOrigin, AnchorPosition } from '@hooks/useAnchorPosition.types';
3
+ export { useClickOutside } from '@hooks/useClickOutside';
4
+ export { useTransitionRender } from '@hooks/useTransitionRender';
5
+ export type { UseTransitionRenderReturnType } from '@hooks/useTransitionRender.types';
@@ -0,0 +1,17 @@
1
+ import { RefObject } from 'react';
2
+ import { AnchorOrigin, AnchorPosition } from '@hooks/useAnchorPosition.types';
3
+ type UseAnchorPositionParams = {
4
+ anchor: HTMLElement | null;
5
+ menuRef: RefObject<HTMLDivElement | null>;
6
+ anchorOrigin?: AnchorOrigin;
7
+ isVisible: boolean;
8
+ };
9
+ /**
10
+ * Hook pour calculer la position d'un élément par rapport à son ancre
11
+ * @param anchor - Élément HTML servant d'ancre
12
+ * @param menuRef - Référence vers l'élément à positionner
13
+ * @param anchorOrigin - Origine de l'ancrage ('left' ou 'right')
14
+ * @param isVisible - Si l'élément est visible (pour recalculer la position)
15
+ */
16
+ export declare const useAnchorPosition: ({ anchor, menuRef, anchorOrigin, isVisible }: UseAnchorPositionParams) => AnchorPosition;
17
+ export {};
@@ -0,0 +1,5 @@
1
+ export type AnchorPosition = {
2
+ top: number;
3
+ left: number;
4
+ } | null;
5
+ export type AnchorOrigin = 'left' | 'right';
@@ -0,0 +1,8 @@
1
+ import { RefObject } from 'react';
2
+ /**
3
+ * Gestion d'un click en dehors d'un ou plusieurs éléments
4
+ * @param refs Tableau de références à écouter
5
+ * @param onClickOutside Callback si clic à l'extérieur
6
+ * @param shouldTrigger Activation du comportement
7
+ */
8
+ export declare const useClickOutside: (refs: RefObject<HTMLElement | null>[], onClickOutside: () => void, shouldTrigger?: boolean) => void;
@@ -0,0 +1,7 @@
1
+ import { UseTransitionRenderReturnType } from '@hooks/useTransitionRender.types';
2
+ /**
3
+ * Hook pour gérer les animations de transition lors des renders
4
+ * @param isOpen - État d'ouverture
5
+ * @param duration - Durée de la transition en ms
6
+ */
7
+ export declare const useTransitionRender: (isOpen: boolean, duration?: number) => UseTransitionRenderReturnType;
@@ -0,0 +1,4 @@
1
+ export type UseTransitionRenderReturnType = {
2
+ isVisible: boolean;
3
+ isFadingIn: boolean;
4
+ };
@@ -1,2 +1,3 @@
1
1
  export * from '@components/index';
2
+ export * from '@hooks/index';
2
3
  import '@styles/globals.css';