@aurora-ds/components 0.24.9 → 0.25.1

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 (77) hide show
  1. package/README.md +35 -7
  2. package/dist/cjs/components/actions/button/Button.d.ts +8 -0
  3. package/dist/cjs/components/actions/button/Button.props.d.ts +10 -0
  4. package/dist/cjs/components/actions/button/utils/getButtonSizeStyles.utils.d.ts +12 -0
  5. package/dist/cjs/components/actions/button/utils/getButtonVariantStyles.utils.d.ts +7 -0
  6. package/dist/cjs/components/actions/icon-button/IconButton.d.ts +13 -0
  7. package/dist/cjs/components/actions/icon-button/IconButton.props.d.ts +11 -1
  8. package/dist/cjs/components/actions/icon-button/utils/getIconButtonSizeStyles.utils.d.ts +9 -0
  9. package/dist/cjs/components/data-display/avatar/Avatar.d.ts +16 -1
  10. package/dist/cjs/components/data-display/avatar/Avatar.props.d.ts +18 -4
  11. package/dist/cjs/components/data-display/avatar/utils/getAvatarSizes.utils.d.ts +11 -0
  12. package/dist/cjs/components/data-display/chip/utils/getChipColorStyles.utils.d.ts +12 -0
  13. package/dist/cjs/components/data-display/chip/utils/getChipContentSize.utils.d.ts +6 -0
  14. package/dist/cjs/components/data-display/chip/utils/getChipSizeStyles.utils.d.ts +10 -0
  15. package/dist/cjs/components/data-display/status/utils/getStatusColorStyles.utils.d.ts +7 -0
  16. package/dist/cjs/components/data-display/status/utils/getStatusContentSize.utils.d.ts +8 -0
  17. package/dist/cjs/components/data-display/status/utils/getStatusSizeStyles.utils.d.ts +12 -0
  18. package/dist/cjs/components/forms/date-picker/calendar/calendar-grid/CalendarGrid.props.d.ts +1 -1
  19. package/dist/cjs/components/forms/date-picker/utils/datePicker.utils.d.ts +13 -0
  20. package/dist/cjs/components/forms/input/Input.props.d.ts +9 -1
  21. package/dist/cjs/components/forms/select/Select.d.ts +18 -0
  22. package/dist/cjs/components/forms/select/Select.props.d.ts +14 -0
  23. package/dist/cjs/components/forms/textarea/TextArea.props.d.ts +9 -1
  24. package/dist/cjs/components/foundation/text/Text.props.d.ts +2 -0
  25. package/dist/cjs/components/foundation/text/utils/getTextVariantStyles.utils.d.ts +7 -0
  26. package/dist/cjs/components/foundation/text/utils/getTruncateTextStyles.utils.d.ts +21 -0
  27. package/dist/cjs/components/foundation/text/utils/parseTextWithBold.utils.d.ts +7 -0
  28. package/dist/cjs/components/navigation/breadcrumb/utils/buildBreadcrumbChildren.utils.d.ts +5 -0
  29. package/dist/cjs/components/navigation/breadcrumb/utils/flattenChildren.utils.d.ts +5 -0
  30. package/dist/cjs/components/navigation/breadcrumb/utils/insertSeparators.utils.d.ts +5 -0
  31. package/dist/cjs/components/navigation/breadcrumb/utils/isSeparator.utils.d.ts +5 -0
  32. package/dist/cjs/components/overlay/alert/Alert.d.ts +5 -0
  33. package/dist/cjs/components/overlay/alert/utils/getAlertIcon.utils.d.ts +8 -0
  34. package/dist/cjs/components/overlay/alert/utils/getAlertPositionStyles.utils.d.ts +8 -0
  35. package/dist/cjs/components/overlay/alert/utils/getAlertVariantColors.utils.d.ts +14 -0
  36. package/dist/cjs/components/overlay/modal/Modal.d.ts +24 -0
  37. package/dist/cjs/index.js +234 -28
  38. package/dist/cjs/index.js.map +1 -1
  39. package/dist/esm/components/actions/button/Button.d.ts +8 -0
  40. package/dist/esm/components/actions/button/Button.props.d.ts +10 -0
  41. package/dist/esm/components/actions/button/utils/getButtonSizeStyles.utils.d.ts +12 -0
  42. package/dist/esm/components/actions/button/utils/getButtonVariantStyles.utils.d.ts +7 -0
  43. package/dist/esm/components/actions/icon-button/IconButton.d.ts +13 -0
  44. package/dist/esm/components/actions/icon-button/IconButton.props.d.ts +11 -1
  45. package/dist/esm/components/actions/icon-button/utils/getIconButtonSizeStyles.utils.d.ts +9 -0
  46. package/dist/esm/components/data-display/avatar/Avatar.d.ts +16 -1
  47. package/dist/esm/components/data-display/avatar/Avatar.props.d.ts +18 -4
  48. package/dist/esm/components/data-display/avatar/utils/getAvatarSizes.utils.d.ts +11 -0
  49. package/dist/esm/components/data-display/chip/utils/getChipColorStyles.utils.d.ts +12 -0
  50. package/dist/esm/components/data-display/chip/utils/getChipContentSize.utils.d.ts +6 -0
  51. package/dist/esm/components/data-display/chip/utils/getChipSizeStyles.utils.d.ts +10 -0
  52. package/dist/esm/components/data-display/status/utils/getStatusColorStyles.utils.d.ts +7 -0
  53. package/dist/esm/components/data-display/status/utils/getStatusContentSize.utils.d.ts +8 -0
  54. package/dist/esm/components/data-display/status/utils/getStatusSizeStyles.utils.d.ts +12 -0
  55. package/dist/esm/components/forms/date-picker/calendar/calendar-grid/CalendarGrid.props.d.ts +1 -1
  56. package/dist/esm/components/forms/date-picker/utils/datePicker.utils.d.ts +13 -0
  57. package/dist/esm/components/forms/input/Input.props.d.ts +9 -1
  58. package/dist/esm/components/forms/select/Select.d.ts +18 -0
  59. package/dist/esm/components/forms/select/Select.props.d.ts +14 -0
  60. package/dist/esm/components/forms/textarea/TextArea.props.d.ts +9 -1
  61. package/dist/esm/components/foundation/text/Text.props.d.ts +2 -0
  62. package/dist/esm/components/foundation/text/utils/getTextVariantStyles.utils.d.ts +7 -0
  63. package/dist/esm/components/foundation/text/utils/getTruncateTextStyles.utils.d.ts +21 -0
  64. package/dist/esm/components/foundation/text/utils/parseTextWithBold.utils.d.ts +7 -0
  65. package/dist/esm/components/navigation/breadcrumb/utils/buildBreadcrumbChildren.utils.d.ts +5 -0
  66. package/dist/esm/components/navigation/breadcrumb/utils/flattenChildren.utils.d.ts +5 -0
  67. package/dist/esm/components/navigation/breadcrumb/utils/insertSeparators.utils.d.ts +5 -0
  68. package/dist/esm/components/navigation/breadcrumb/utils/isSeparator.utils.d.ts +5 -0
  69. package/dist/esm/components/overlay/alert/Alert.d.ts +5 -0
  70. package/dist/esm/components/overlay/alert/utils/getAlertIcon.utils.d.ts +8 -0
  71. package/dist/esm/components/overlay/alert/utils/getAlertPositionStyles.utils.d.ts +8 -0
  72. package/dist/esm/components/overlay/alert/utils/getAlertVariantColors.utils.d.ts +14 -0
  73. package/dist/esm/components/overlay/modal/Modal.d.ts +24 -0
  74. package/dist/esm/index.js +235 -29
  75. package/dist/esm/index.js.map +1 -1
  76. package/dist/index.d.ts +153 -8
  77. package/package.json +2 -2
@@ -7,6 +7,14 @@ import { ButtonProps } from '@components/actions/button/Button.props.ts';
7
7
  * - `contained`: Solid background button (default)
8
8
  * - `outlined`: Border only button
9
9
  * - `text`: Text only button without background
10
+ * - `destructive`: Danger/delete action button
11
+ *
12
+ * **Accessibility:**
13
+ * - Use `ariaLabel` when the button has no visible text or the label is unclear
14
+ * - Use `ariaPressed` for toggle buttons to indicate their state
15
+ * - Use `ariaBusy` when the button triggers an async action
16
+ * - Use `ariaExpanded` when the button controls a collapsible section
17
+ * - Use `ariaControls` to reference the controlled element
10
18
  */
11
19
  declare const Button: FC<ButtonProps>;
12
20
  export default Button;
@@ -38,6 +38,16 @@ export type ButtonProps = {
38
38
  role?: string;
39
39
  /** Tab index for keyboard navigation */
40
40
  tabIndex?: number;
41
+ /** Whether the button is in a pressed/active state (for toggle buttons) */
42
+ ariaPressed?: boolean;
43
+ /** Whether the button is in a loading/busy state */
44
+ ariaBusy?: boolean;
45
+ /** Whether the button controls an expandable section */
46
+ ariaExpanded?: boolean;
47
+ /** Whether the button has a popup (menu, dialog, etc.) */
48
+ ariaHasPopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
49
+ /** ID of the element controlled by this button */
50
+ ariaControls?: string;
41
51
  };
42
52
  export type ButtonStyleParams = {
43
53
  variant?: ButtonVariants;
@@ -0,0 +1,12 @@
1
+ import { ThemeContract } from '@/interfaces';
2
+ import { IconButtonSizes } from '@interfaces/button.types.ts';
3
+ type ButtonSizeConfig = {
4
+ height: number;
5
+ padding: {
6
+ vertical: keyof ThemeContract['spacing'];
7
+ horizontal: keyof ThemeContract['spacing'];
8
+ };
9
+ fontSize: keyof ThemeContract['fontSize'];
10
+ };
11
+ export declare const getButtonSizeStyles: () => Record<IconButtonSizes, ButtonSizeConfig>;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Theme } from '@aurora-ds/theme';
2
+ import { ButtonVariants, ButtonVariantStyle } from '@interfaces/button.types.ts';
3
+ /**
4
+ * Get button variant styles based on the theme
5
+ * @param theme
6
+ */
7
+ export declare const getButtonVariantStyles: (theme: Theme) => Record<ButtonVariants, ButtonVariantStyle>;
@@ -1,4 +1,17 @@
1
1
  import { FC } from 'react';
2
2
  import { IconButtonProps } from '@components/actions/icon-button/IconButton.props.ts';
3
+ /**
4
+ * IconButton component
5
+ *
6
+ * A button that displays only an icon without text.
7
+ *
8
+ * **⚠️ Accessibility:** Always provide an `ariaLabel` for icon-only buttons
9
+ * so screen readers can describe the action.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <IconButton icon={<CloseIcon />} ariaLabel="Close dialog" onClick={onClose} />
14
+ * ```
15
+ */
3
16
  declare const IconButton: FC<IconButtonProps>;
4
17
  export default IconButton;
@@ -23,7 +23,7 @@ export type IconButtonProps = {
23
23
  activeBackgroundColor?: keyof ThemeContract['colors'];
24
24
  /** Size of the icon button */
25
25
  size?: IconButtonSizes;
26
- /** Accessibility label for screen readers */
26
+ /** Accessibility label for screen readers (strongly recommended for icon-only buttons) */
27
27
  ariaLabel?: string;
28
28
  /** ID of element that labels this button */
29
29
  ariaLabelledBy?: string;
@@ -33,6 +33,16 @@ export type IconButtonProps = {
33
33
  role?: string;
34
34
  /** Tab index for keyboard navigation */
35
35
  tabIndex?: number;
36
+ /** Whether the button is in a pressed/active state (for toggle buttons) */
37
+ ariaPressed?: boolean;
38
+ /** Whether the button is in a loading/busy state */
39
+ ariaBusy?: boolean;
40
+ /** Whether the button controls an expandable section */
41
+ ariaExpanded?: boolean;
42
+ /** Whether the button has a popup (menu, dialog, etc.) */
43
+ ariaHasPopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
44
+ /** ID of the element controlled by this button */
45
+ ariaControls?: string;
36
46
  };
37
47
  export type IconButtonStyleParams = {
38
48
  variant?: IconButtonVariants;
@@ -0,0 +1,9 @@
1
+ import { ThemeContract } from '@/interfaces';
2
+ import { IconButtonSizes } from '@interfaces/button.types.ts';
3
+ type IconButtonSizeConfig = {
4
+ size: number;
5
+ padding: keyof ThemeContract['spacing'];
6
+ iconSize: keyof ThemeContract['fontSize'];
7
+ };
8
+ export declare const getIconButtonSizeStyles: () => Record<IconButtonSizes, IconButtonSizeConfig>;
9
+ export {};
@@ -3,7 +3,22 @@ import { AvatarProps } from '@components/data-display/avatar/Avatar.props.ts';
3
3
  /**
4
4
  * Avatar component
5
5
  *
6
- * Displays a user's avatar with optional image or fallback text.
6
+ * Displays a user's avatar with an optional image or fallback initials.
7
+ *
8
+ * **Accessibility:**
9
+ * - When `onClick` is provided, the avatar becomes a focusable button
10
+ * with keyboard support (Enter/Space activates the click)
11
+ * - Provide `label` or `ariaLabel` for screen readers
12
+ * - For decorative avatars, both can be omitted
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * // Static avatar with image
17
+ * <Avatar image="/user.jpg" label="Jane Doe" />
18
+ *
19
+ * // Interactive avatar (clickable)
20
+ * <Avatar label="JD" onClick={() => openProfile()} ariaLabel="Open Jane's profile" />
21
+ * ```
7
22
  */
8
23
  declare const Avatar: FC<AvatarProps>;
9
24
  export default Avatar;
@@ -1,12 +1,18 @@
1
- import { MouseEvent } from 'react';
1
+ import { KeyboardEvent, MouseEvent } from 'react';
2
2
  import { AvatarSize } from '@interfaces/avatar.types.ts';
3
3
  export type AvatarProps = {
4
4
  /** Image source URL */
5
5
  image?: string;
6
- /** Fallback text to display when no image */
6
+ /**
7
+ * Fallback text to display when no image (initials, name, etc.)
8
+ * Also used as the image `alt` text for accessibility.
9
+ */
7
10
  label?: string;
8
- /** Click handler */
9
- onClick?: (e: MouseEvent<HTMLDivElement>) => void;
11
+ /**
12
+ * Click handler. When provided, the avatar becomes interactive
13
+ * with `role="button"` and keyboard support (Enter/Space).
14
+ */
15
+ onClick?: (e: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>) => void;
10
16
  /** Size of the avatar */
11
17
  size?: AvatarSize;
12
18
  /** Text color for the label */
@@ -15,6 +21,13 @@ export type AvatarProps = {
15
21
  borderColor?: string;
16
22
  /** Background color */
17
23
  backgroundColor?: string;
24
+ /**
25
+ * Accessibility label for screen readers.
26
+ * Defaults to `label` prop when not provided.
27
+ */
28
+ ariaLabel?: string;
29
+ /** Tab index for keyboard navigation (auto-set when onClick is provided) */
30
+ tabIndex?: number;
18
31
  };
19
32
  export type AvatarStyleParams = {
20
33
  hasImage?: boolean;
@@ -22,4 +35,5 @@ export type AvatarStyleParams = {
22
35
  color?: string;
23
36
  borderColor?: string;
24
37
  backgroundColor?: string;
38
+ clickable?: boolean;
25
39
  };
@@ -0,0 +1,11 @@
1
+ import { ThemeContract } from '@/interfaces';
2
+ import { AvatarSize } from '@interfaces/avatar.types.ts';
3
+ /**
4
+ * Get avatar sizes configuration based on the theme
5
+ * @param theme
6
+ */
7
+ export declare const getAvatarSizes: (theme: Theme) => Record<AvatarSize, {
8
+ size: number;
9
+ fontSize: keyof ThemeContract["fontSize"];
10
+ overlap: string;
11
+ }>;
@@ -0,0 +1,12 @@
1
+ import { Theme } from '@theme/theme.types.ts';
2
+ export type ChipColor = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
3
+ export type ChipVariant = 'filled' | 'outlined';
4
+ export type ChipColorResult = {
5
+ backgroundColor: string;
6
+ color: string;
7
+ borderColor: string;
8
+ };
9
+ /**
10
+ * Returns background/text/border colors for a Chip based on its color, variant, and disabled state.
11
+ */
12
+ export declare const getChipColorStyles: (theme: Theme, color: ChipColor, variant: ChipVariant, disabled: boolean) => ChipColorResult;
@@ -0,0 +1,6 @@
1
+ import { ChipSize } from '@components/data-display/chip/utils/getChipSizeStyles.utils';
2
+ /**
3
+ * Returns the icon/font size key for a Chip based on its size.
4
+ * Maps: xs → 'xs', sm → 'sm', md → 'sm', lg → 'md'
5
+ */
6
+ export declare const getChipContentSize: (size: ChipSize) => "xs" | "sm" | "md";
@@ -0,0 +1,10 @@
1
+ import { Theme } from '@theme/theme.types.ts';
2
+ export type ChipSize = 'xs' | 'sm' | 'md' | 'lg';
3
+ export type ChipSizeResult = {
4
+ padding: string;
5
+ fontSize: string;
6
+ };
7
+ /**
8
+ * Returns padding and fontSize styles for a Chip based on its size and whether it is icon-only.
9
+ */
10
+ export declare const getChipSizeStyles: (theme: Theme, size: ChipSize, isIconOnly: boolean) => ChipSizeResult;
@@ -0,0 +1,7 @@
1
+ import { StatusColor, ThemeContract } from '@/interfaces';
2
+ import { StatusStyleParams } from '@components/data-display/status/Status.props.ts';
3
+ export declare const getStatusColorStyles: (theme: ThemeContract, color: StatusStyleParams["color"], variant: StatusStyleParams["variant"], disabled: StatusStyleParams["disabled"]) => {
4
+ backgroundColor: string;
5
+ borderColor: string;
6
+ };
7
+ export declare const getStatusTextColor: (color: StatusColor, disabled: boolean) => keyof ThemeContract["colors"];
@@ -0,0 +1,8 @@
1
+ import { StatusStyleParams } from '@components/data-display/status/Status.props.ts';
2
+ import { ThemeFontSizeContract } from '@interfaces/theme.contracts';
3
+ /**
4
+ * Get status content size based on the status size
5
+ * @param size
6
+ * @constructor
7
+ */
8
+ export declare const getStatusContentSize: (size: StatusStyleParams["size"]) => keyof ThemeFontSizeContract;
@@ -0,0 +1,12 @@
1
+ import { ThemeContract } from '@/interfaces';
2
+ import { StatusStyleParams } from '@components/data-display/status/Status.props.ts';
3
+ /**
4
+ * Get status size styles based on the theme, size and icon-only state
5
+ * @param theme - Theme object
6
+ * @param size - Status size
7
+ * @param isIconOnly - Whether the status has only an icon (no label)
8
+ */
9
+ export declare const getStatusSizeStyles: (theme: ThemeContract, size: StatusStyleParams["size"], isIconOnly: StatusStyleParams["isIconOnly"]) => {
10
+ padding: string;
11
+ fontSize: string;
12
+ };
@@ -1,4 +1,4 @@
1
- import { CalendarDay } from '@utils/ui/components/date-picker/datePicker.utils.ts';
1
+ import { CalendarDay } from '@components/forms/date-picker/utils/datePicker.utils';
2
2
  export type CalendarView = 'days' | 'months' | 'years';
3
3
  export type CalendarGridProps = {
4
4
  /** Current view mode */
@@ -0,0 +1,13 @@
1
+ import { DateFormat } from '@components/forms/date-picker/DatePicker.props';
2
+ export declare const formatDate: (date: Date | null, format?: DateFormat) => string;
3
+ export declare const parseDate: (value: string, format?: DateFormat) => Date | null;
4
+ export declare const getDateSeparator: (format: DateFormat) => string;
5
+ export declare const formatInputValue: (value: string, format: DateFormat) => string;
6
+ export interface CalendarDay {
7
+ date: Date;
8
+ isCurrentMonth: boolean;
9
+ isSelected: boolean;
10
+ isToday: boolean;
11
+ isDisabled: boolean;
12
+ }
13
+ export declare const getCalendarDays: (year: number, month: number, selectedDate?: Date | null, minDate?: Date, maxDate?: Date) => CalendarDay[];
@@ -20,7 +20,7 @@ export type InputProps = {
20
20
  disabled?: boolean;
21
21
  /** Input type */
22
22
  type?: 'text' | 'password' | 'email' | 'number';
23
- /** Accessibility label */
23
+ /** Accessibility label (defaults to `label` if not provided) */
24
24
  ariaLabel?: string;
25
25
  /** Icon to display before the input */
26
26
  startIcon?: ReactNode;
@@ -28,6 +28,13 @@ export type InputProps = {
28
28
  endIcon?: ReactNode;
29
29
  /** Custom width for the input */
30
30
  width?: CSSProperties['width'];
31
+ /**
32
+ * Error message to display below the input.
33
+ * When provided, `aria-invalid="true"` and `aria-errormessage` are set automatically.
34
+ */
35
+ error?: string;
36
+ /** Unique HTML id for the input element (required when using `error`) */
37
+ id?: string;
31
38
  };
32
39
  export type InputStyleParams = {
33
40
  disabled?: boolean;
@@ -35,4 +42,5 @@ export type InputStyleParams = {
35
42
  hasEndIcon?: boolean;
36
43
  hasPasswordToggle?: boolean;
37
44
  width?: CSSProperties['width'];
45
+ hasError?: boolean;
38
46
  };
@@ -2,6 +2,24 @@ import { FC } from 'react';
2
2
  import { SelectProps } from '@components/forms/select/Select.props';
3
3
  /**
4
4
  * Select component that uses Menu for dropdown
5
+ *
6
+ * **Accessibility:**
7
+ * - Uses `role="combobox"` with `aria-expanded` and `aria-haspopup="listbox"`
8
+ * - Keyboard support: Enter/Space opens, Escape closes
9
+ * - When `error` is provided, `aria-invalid="true"` and `aria-errormessage` are set
10
+ * - `mandatory` adds `aria-required="true"`
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Select
15
+ * options={[{ value: 'fr', label: 'France' }]}
16
+ * value={country}
17
+ * onChange={setCountry}
18
+ * label="Country"
19
+ * mandatory
20
+ * error={countryError}
21
+ * />
22
+ * ```
5
23
  */
6
24
  declare const Select: FC<SelectProps>;
7
25
  export { Select };
@@ -32,9 +32,23 @@ export type SelectProps = {
32
32
  * Width of the select
33
33
  */
34
34
  width?: string | number;
35
+ /**
36
+ * Error message to display below the select.
37
+ * When provided, `aria-invalid="true"` and `aria-errormessage` are set automatically.
38
+ */
39
+ error?: string;
40
+ /**
41
+ * Unique HTML id for the select trigger (required when using `error`)
42
+ */
43
+ id?: string;
44
+ /**
45
+ * Accessibility label for screen readers (defaults to `label`)
46
+ */
47
+ ariaLabel?: string;
35
48
  };
36
49
  export type SelectStyleParams = {
37
50
  disabled?: boolean;
38
51
  width?: string | number;
39
52
  isOpen?: boolean;
53
+ hasError?: boolean;
40
54
  };
@@ -16,7 +16,7 @@ export type TextAreaProps = {
16
16
  placeholder?: string;
17
17
  /** Whether the textarea is disabled */
18
18
  disabled?: boolean;
19
- /** Accessibility label */
19
+ /** Accessibility label (defaults to `label` if not provided) */
20
20
  ariaLabel?: string;
21
21
  /** Custom width for the textarea */
22
22
  width?: CSSProperties['width'];
@@ -24,8 +24,16 @@ export type TextAreaProps = {
24
24
  minRows?: number;
25
25
  /** Maximum number of visible text lines (adds scroll when exceeded) */
26
26
  maxRows?: number;
27
+ /**
28
+ * Error message to display below the textarea.
29
+ * When provided, `aria-invalid="true"` and `aria-errormessage` are set automatically.
30
+ */
31
+ error?: string;
32
+ /** Unique HTML id for the textarea element (required when using `error`) */
33
+ id?: string;
27
34
  };
28
35
  export type TextAreaStyleParams = {
29
36
  disabled?: boolean;
30
37
  width?: CSSProperties['width'];
38
+ hasError?: boolean;
31
39
  };
@@ -26,6 +26,8 @@ export type TextProps = PropsWithChildren<{
26
26
  role?: string;
27
27
  /** Tab index for keyboard navigation */
28
28
  tabIndex?: number;
29
+ /** HTML id attribute (used for aria-labelledby / aria-describedby references) */
30
+ id?: string;
29
31
  }>;
30
32
  export type TextStyleParams = {
31
33
  variant?: TextVariants;
@@ -0,0 +1,7 @@
1
+ import { ThemeContract } from '@/interfaces';
2
+ import { TextVariants, TextVariantStyle } from '@interfaces/text.types.ts';
3
+ /**
4
+ * Get text variant styles based on the theme
5
+ * @param theme
6
+ */
7
+ export declare const getTextVariantStyles: (theme: ThemeContract) => Record<TextVariants, TextVariantStyle>;
@@ -0,0 +1,21 @@
1
+ export declare const getTruncateTextStyles: (maxLines: number) => {
2
+ whiteSpace: "nowrap";
3
+ overflow: string;
4
+ textOverflow: string;
5
+ display?: undefined;
6
+ WebkitLineClamp?: undefined;
7
+ WebkitBoxOrient?: undefined;
8
+ overflowWrap?: undefined;
9
+ wordBreak?: undefined;
10
+ lineClamp?: undefined;
11
+ } | {
12
+ overflow: string;
13
+ textOverflow: string;
14
+ display: string;
15
+ WebkitLineClamp: number;
16
+ WebkitBoxOrient: "vertical";
17
+ whiteSpace: "normal";
18
+ overflowWrap: "break-word";
19
+ wordBreak: "break-word";
20
+ lineClamp: number;
21
+ };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Parses text content and converts **bold** syntax to <strong> elements
4
+ * @param children - The content to parse (string or ReactNode)
5
+ * @returns Parsed content with bold text wrapped in <strong> elements
6
+ */
7
+ export declare const parseTextWithBold: (children: ReactNode) => ReactNode;
@@ -0,0 +1,5 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ /**
3
+ * Builds the breadcrumb children with ellipsis logic
4
+ */
5
+ export declare const buildBreadcrumbChildren: (items: ReactNode[], maxItems: number | undefined, EllipsisComponent: ComponentType, SeparatorComponent: ComponentType) => ReactNode[];
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Flattens children, extracting children from Fragments
4
+ */
5
+ export declare const flattenChildren: (children: ReactNode) => ReactNode[];
@@ -0,0 +1,5 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ /**
3
+ * Inserts separators between breadcrumb items automatically
4
+ */
5
+ export declare const insertSeparators: (items: ReactNode[], SeparatorComponent: ComponentType) => ReactNode[];
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Checks if a React element is a BreadcrumbSeparator
4
+ */
5
+ export declare const isSeparator: (child: ReactNode) => boolean;
@@ -18,6 +18,11 @@ import { AlertProps } from '@components/overlay/alert/Alert.props';
18
18
  * - Smooth animations
19
19
  * - Dynamic height calculation for proper stacking
20
20
  *
21
+ * **Accessibility:**
22
+ * - Uses `role="alert"` for screen reader announcements
23
+ * - Error alerts use `aria-live="assertive"` for urgent announcements
24
+ * - Other variants use `aria-live="polite"` to avoid interrupting users
25
+ *
21
26
  * @example
22
27
  * ```tsx
23
28
  * <Alert
@@ -0,0 +1,8 @@
1
+ import { JSX } from 'react';
2
+ import { AlertVariant } from '@interfaces/alert.types';
3
+ /**
4
+ * Get icon component for alert variant
5
+ * @param variant - Alert variant
6
+ * @returns JSX Element for the icon
7
+ */
8
+ export declare const getAlertIcon: (variant: AlertVariant) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { AlertPosition } from '@interfaces/alert.types';
2
+ /**
3
+ * Get position styles for alert
4
+ * @param position - Alert position
5
+ * @param offsetY - Vertical offset for stacking (in pixels)
6
+ * @returns Object with CSS position styles (top/bottom + left/right)
7
+ */
8
+ export declare const getAlertPositionStyles: (position: AlertPosition, offsetY: number) => Record<string, string>;
@@ -0,0 +1,14 @@
1
+ import { ThemeContract } from '@/interfaces';
2
+ import { AlertVariant } from '@interfaces/alert.types';
3
+ export interface AlertVariantColors {
4
+ background: string;
5
+ border: string;
6
+ iconColor: 'info' | 'warning' | 'error' | 'success' | 'text';
7
+ }
8
+ /**
9
+ * Get colors for alert variants
10
+ * @param theme - Aurora theme
11
+ * @param variant - Alert variant
12
+ * @returns Colors for the variant
13
+ */
14
+ export declare const getAlertVariantColors: (theme: ThemeContract, variant: AlertVariant) => AlertVariantColors;
@@ -1,4 +1,28 @@
1
1
  import { FC } from 'react';
2
2
  import { ModalProps } from '@components/overlay/modal/Modal.props';
3
+ /**
4
+ * Modal component
5
+ *
6
+ * An overlay dialog for focused interactions.
7
+ *
8
+ * **Accessibility:**
9
+ * - Uses `role="dialog"` and `aria-modal="true"` for screen readers
10
+ * - `aria-labelledby` links to the modal title
11
+ * - Focus is trapped inside the modal while it is open
12
+ * - Focus returns to the triggering element when closed
13
+ * - Escape key closes the modal
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <Modal
18
+ * isOpen={isOpen}
19
+ * onClose={() => setIsOpen(false)}
20
+ * label="Confirm deletion"
21
+ * action={{ label: 'Delete', onClick: handleDelete }}
22
+ * >
23
+ * <Text>Are you sure you want to delete this item?</Text>
24
+ * </Modal>
25
+ * ```
26
+ */
3
27
  declare const Modal: FC<ModalProps>;
4
28
  export default Modal;