@aurora-ds/components 0.1.0 → 0.2.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 (74) hide show
  1. package/dist/cjs/components/data-display/chip/Chip.d.ts +16 -0
  2. package/dist/cjs/components/data-display/chip/Chip.props.d.ts +27 -0
  3. package/dist/cjs/components/data-display/chip/Chip.styles.d.ts +4 -0
  4. package/dist/cjs/components/data-display/chip/index.d.ts +2 -0
  5. package/dist/cjs/components/data-display/icon/Icon.d.ts +35 -0
  6. package/dist/cjs/components/data-display/icon/Icon.props.d.ts +14 -0
  7. package/dist/cjs/components/data-display/icon/Icon.styles.d.ts +3 -0
  8. package/dist/cjs/components/data-display/icon/index.d.ts +2 -0
  9. package/dist/cjs/components/index.d.ts +8 -6
  10. package/dist/cjs/components/inputs/button/Button.d.ts +12 -0
  11. package/dist/cjs/components/inputs/button/Button.props.d.ts +24 -0
  12. package/dist/cjs/components/inputs/button/Button.styles.d.ts +18 -0
  13. package/dist/cjs/components/inputs/button/index.d.ts +2 -0
  14. package/dist/cjs/components/inputs/icon-button/IconButton.d.ts +4 -0
  15. package/dist/cjs/components/inputs/icon-button/IconButton.props.d.ts +20 -0
  16. package/dist/cjs/components/inputs/icon-button/IconButton.styles.d.ts +4 -0
  17. package/dist/cjs/components/inputs/icon-button/index.d.ts +2 -0
  18. package/dist/cjs/components/layout/card/Card.d.ts +14 -0
  19. package/dist/cjs/components/layout/card/Card.props.d.ts +43 -0
  20. package/dist/cjs/components/layout/card/Card.styles.d.ts +7 -0
  21. package/dist/cjs/components/layout/card/index.d.ts +2 -0
  22. package/dist/cjs/components/layout/stack/Stack.d.ts +13 -0
  23. package/dist/cjs/components/layout/stack/Stack.props.d.ts +33 -0
  24. package/dist/cjs/components/layout/stack/Stack.styles.d.ts +7 -0
  25. package/dist/cjs/components/layout/stack/index.d.ts +2 -0
  26. package/dist/cjs/components/layout/text/Text.d.ts +19 -0
  27. package/dist/cjs/components/layout/text/Text.props.d.ts +22 -0
  28. package/dist/cjs/components/layout/text/Text.styles.d.ts +4 -0
  29. package/dist/cjs/components/layout/text/index.d.ts +2 -0
  30. package/dist/cjs/index.js +185 -10
  31. package/dist/cjs/index.js.map +1 -1
  32. package/dist/cjs/interfaces/chip.types.d.ts +6 -0
  33. package/dist/cjs/utils/ui/components/chip/getChipColorStyles.utils.d.ts +43 -0
  34. package/dist/cjs/utils/ui/components/chip/getChipContentSize.utils.d.ts +8 -0
  35. package/dist/cjs/utils/ui/components/chip/getChipSizeStyles.utils.d.ts +12 -0
  36. package/dist/cjs/utils/ui/components/text/getTextVariantStyles.utils.d.ts +1 -1
  37. package/dist/esm/components/data-display/chip/Chip.d.ts +16 -0
  38. package/dist/esm/components/data-display/chip/Chip.props.d.ts +27 -0
  39. package/dist/esm/components/data-display/chip/Chip.styles.d.ts +4 -0
  40. package/dist/esm/components/data-display/chip/index.d.ts +2 -0
  41. package/dist/esm/components/data-display/icon/Icon.d.ts +35 -0
  42. package/dist/esm/components/data-display/icon/Icon.props.d.ts +14 -0
  43. package/dist/esm/components/data-display/icon/Icon.styles.d.ts +3 -0
  44. package/dist/esm/components/data-display/icon/index.d.ts +2 -0
  45. package/dist/esm/components/index.d.ts +8 -6
  46. package/dist/esm/components/inputs/button/Button.d.ts +12 -0
  47. package/dist/esm/components/inputs/button/Button.props.d.ts +24 -0
  48. package/dist/esm/components/inputs/button/Button.styles.d.ts +18 -0
  49. package/dist/esm/components/inputs/button/index.d.ts +2 -0
  50. package/dist/esm/components/inputs/icon-button/IconButton.d.ts +4 -0
  51. package/dist/esm/components/inputs/icon-button/IconButton.props.d.ts +20 -0
  52. package/dist/esm/components/inputs/icon-button/IconButton.styles.d.ts +4 -0
  53. package/dist/esm/components/inputs/icon-button/index.d.ts +2 -0
  54. package/dist/esm/components/layout/card/Card.d.ts +14 -0
  55. package/dist/esm/components/layout/card/Card.props.d.ts +43 -0
  56. package/dist/esm/components/layout/card/Card.styles.d.ts +7 -0
  57. package/dist/esm/components/layout/card/index.d.ts +2 -0
  58. package/dist/esm/components/layout/stack/Stack.d.ts +13 -0
  59. package/dist/esm/components/layout/stack/Stack.props.d.ts +33 -0
  60. package/dist/esm/components/layout/stack/Stack.styles.d.ts +7 -0
  61. package/dist/esm/components/layout/stack/index.d.ts +2 -0
  62. package/dist/esm/components/layout/text/Text.d.ts +19 -0
  63. package/dist/esm/components/layout/text/Text.props.d.ts +22 -0
  64. package/dist/esm/components/layout/text/Text.styles.d.ts +4 -0
  65. package/dist/esm/components/layout/text/index.d.ts +2 -0
  66. package/dist/esm/index.js +185 -11
  67. package/dist/esm/index.js.map +1 -1
  68. package/dist/esm/interfaces/chip.types.d.ts +6 -0
  69. package/dist/esm/utils/ui/components/chip/getChipColorStyles.utils.d.ts +43 -0
  70. package/dist/esm/utils/ui/components/chip/getChipContentSize.utils.d.ts +8 -0
  71. package/dist/esm/utils/ui/components/chip/getChipSizeStyles.utils.d.ts +12 -0
  72. package/dist/esm/utils/ui/components/text/getTextVariantStyles.utils.d.ts +1 -1
  73. package/dist/index.d.ts +46 -2
  74. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { ChipProps } from '@components/data-display/chip/Chip.props';
3
+ /**
4
+ * Chip component
5
+ *
6
+ * A compact element for displaying information, tags, or actions.
7
+ *
8
+ * **Variants:**
9
+ * - `filled`: Solid background (default)
10
+ * - `outlined`: Border only
11
+ *
12
+ * **Colors:**
13
+ * - `default`, `primary`, `success`, `warning`, `error`, `info`
14
+ */
15
+ declare const Chip: FC<ChipProps>;
16
+ export default Chip;
@@ -0,0 +1,27 @@
1
+ import { Theme } from '@aurora-ds/theme';
2
+ import { ReactNode } from 'react';
3
+ import { ChipColor, ChipSize, ChipVariant } from '@interfaces/chip.types';
4
+ export type ChipProps = {
5
+ /** Text label to display */
6
+ label?: string;
7
+ /** Icon to display before the label */
8
+ icon?: ReactNode;
9
+ /** Chip variant style */
10
+ variant?: ChipVariant;
11
+ /** Chip color from theme */
12
+ color?: ChipColor;
13
+ /** Chip size */
14
+ size?: ChipSize;
15
+ /** Gap between icon and text (theme spacing key) */
16
+ gap?: keyof Theme['spacing'];
17
+ /** Border radius from theme */
18
+ radius?: keyof Theme['radius'];
19
+ };
20
+ export type ChipStyleParams = {
21
+ variant: ChipVariant;
22
+ color: ChipColor;
23
+ size: ChipSize;
24
+ isIconOnly: boolean;
25
+ gap?: keyof Theme['spacing'];
26
+ radius?: keyof Theme['radius'];
27
+ };
@@ -0,0 +1,4 @@
1
+ import { ChipStyleParams } from '@components/data-display/chip/Chip.props';
2
+ export declare const CHIP_STYLES: {
3
+ root: (args_0: ChipStyleParams) => string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Chip } from '@components/data-display/chip/Chip';
2
+ export type { ChipProps } from '@components/data-display/chip/Chip.props';
@@ -0,0 +1,35 @@
1
+ import { FC } from 'react';
2
+ import { IconProps } from '@components/data-display/icon/Icon.props.ts';
3
+ /**
4
+ * Icon component - Wrapper for SVG icons with theme-aware styling
5
+ *
6
+ * **Features:**
7
+ * - Theme-aware sizing via font sizes
8
+ * - Color and fill support from theme
9
+ * - Optional background with padding and border radius
10
+ * - Transition animation on color changes
11
+ *
12
+ * **Usage:**
13
+ * ```tsx
14
+ * import { SomeIcon } from 'some-icon-library'
15
+ *
16
+ * <Icon size="md" color="primary">
17
+ * <SomeIcon />
18
+ * </Icon>
19
+ * ```
20
+ *
21
+ * **With background:**
22
+ * ```tsx
23
+ * <Icon
24
+ * size="lg"
25
+ * color="onPrimary"
26
+ * backgroundColor="primary"
27
+ * padding="sm"
28
+ * borderRadius="full"
29
+ * >
30
+ * <SomeIcon />
31
+ * </Icon>
32
+ * ```
33
+ */
34
+ declare const Icon: FC<IconProps>;
35
+ export default Icon;
@@ -0,0 +1,14 @@
1
+ import { Theme } from '@aurora-ds/theme';
2
+ import { PropsWithChildren } from 'react';
3
+ export type IconProps = PropsWithChildren<{
4
+ /** Icon size based on theme font sizes */
5
+ size?: keyof Theme['fontSize'];
6
+ /** Icon stroke/line color from theme */
7
+ color?: keyof Theme['colors'];
8
+ /** Background color from theme */
9
+ backgroundColor?: keyof Theme['colors'];
10
+ /** Padding from theme spacing */
11
+ padding?: keyof Theme['spacing'];
12
+ /** Border radius from theme */
13
+ borderRadius?: keyof Theme['radius'];
14
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const ICON_STYLES: {
2
+ root: (size?: keyof import("@aurora-ds/theme").BaseFontSize | undefined, color?: keyof import("@aurora-ds/theme").BaseColors | undefined, backgroundColor?: keyof import("@aurora-ds/theme").BaseColors | undefined, padding?: keyof import("@aurora-ds/theme").BaseSpacing | undefined, borderRadius?: keyof import("@aurora-ds/theme").BaseRadius | undefined) => string;
3
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Icon } from '@components/data-display/icon/Icon.tsx';
2
+ export type { IconProps } from '@components/data-display/icon/Icon.props.ts';
@@ -1,10 +1,12 @@
1
- export * from '@components/icon';
2
- export * from '@components/text';
3
- export * from '@components/button';
4
- export * from '@components/icon-button';
5
- export * from '@components/stack';
6
- export * from '@components/card';
1
+ export * from '@components/data-display/icon';
2
+ export * from '@components/data-display/chip';
3
+ export * from '@components/layout/text';
4
+ export * from '@components/inputs/button';
5
+ export * from '@components/inputs/icon-button';
6
+ export * from '@components/layout/stack';
7
+ export * from '@components/layout/card';
7
8
  export type { ButtonVariants, ButtonVariantStyle } from '@interfaces/button.types';
8
9
  export type { TextVariants, TextVariantStyle } from '@interfaces/text.types';
9
10
  export type { StackDirection, StackAlign, StackJustify, StackWrap } from '@interfaces/stack.types';
10
11
  export type { CardDirection } from '@interfaces/card.types';
12
+ export type { ChipVariant, ChipColor, ChipSize } from '@interfaces/chip.types';
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { ButtonProps } from '@components/inputs/button/Button.props.ts';
3
+ /**
4
+ * Button component
5
+ *
6
+ * **Variants:**
7
+ * - `contained`: Solid background button (default)
8
+ * - `outlined`: Border only button
9
+ * - `text`: Text only button without background
10
+ */
11
+ declare const Button: FC<ButtonProps>;
12
+ export default Button;
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from 'react';
2
+ import { ButtonVariants } from '@interfaces/button.types.ts';
3
+ export type ButtonProps = {
4
+ /** Button text label */
5
+ label: string;
6
+ /** Optional icon to display before label */
7
+ startIcon?: ReactNode;
8
+ /** Optional icon to display after label */
9
+ endIcon?: ReactNode;
10
+ /** Click handler */
11
+ onClick?: () => void;
12
+ /** Visual variant of the button */
13
+ variant?: ButtonVariants;
14
+ /** Button type attribute */
15
+ type?: 'button' | 'submit';
16
+ /** Active/pressed state */
17
+ active?: boolean;
18
+ /** Disabled state */
19
+ disabled?: boolean;
20
+ };
21
+ export type ButtonStyleParams = {
22
+ variant?: ButtonVariants;
23
+ active?: boolean;
24
+ };
@@ -0,0 +1,18 @@
1
+ import { ButtonStyleParams } from '@components/inputs/button/Button.props.ts';
2
+ /**
3
+ * Button styles using createStyles from @aurora-ds/theme
4
+ *
5
+ * Override via className with createStyles:
6
+ * ```tsx
7
+ * const myStyles = createStyles((theme) => ({
8
+ * custom: {
9
+ * backgroundColor: theme.colors.accent,
10
+ * ':hover': { backgroundColor: theme.colors.accentHover }
11
+ * }
12
+ * }))
13
+ * <Button className={myStyles.custom} label="Custom" />
14
+ * ```
15
+ */
16
+ export declare const BUTTON_STYLES: {
17
+ root: (args_0: ButtonStyleParams) => string;
18
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Button } from '@components/inputs/button/Button.tsx';
2
+ export type { ButtonProps } from '@components/inputs/button/Button.props.ts';
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { IconButtonProps } from '@components/inputs/icon-button/IconButton.props.ts';
3
+ declare const IconButton: FC<IconButtonProps>;
4
+ export default IconButton;
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import { ButtonVariants } from '@/interfaces';
3
+ export type IconButtonProps = {
4
+ /** IconButton icon */
5
+ icon?: ReactNode;
6
+ /** Click handler */
7
+ onClick?: () => void;
8
+ /** Visual variant of the button */
9
+ variant?: ButtonVariants;
10
+ /** Button type attribute */
11
+ type?: 'button' | 'submit';
12
+ /** Active/pressed state */
13
+ active?: boolean;
14
+ /** Disabled state */
15
+ disabled?: boolean;
16
+ };
17
+ export type IconButtonStyleParams = {
18
+ variant?: ButtonVariants;
19
+ active?: boolean;
20
+ };
@@ -0,0 +1,4 @@
1
+ import { IconButtonStyleParams } from '@components/inputs/icon-button/IconButton.props.ts';
2
+ export declare const ICON_BUTTON_STYLES: {
3
+ root: (args_0: IconButtonStyleParams) => string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as IconButton } from '@components/inputs/icon-button/IconButton.tsx';
2
+ export type { IconButtonProps } from '@components/inputs/icon-button/IconButton.props.ts';
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { CardProps } from '@components/layout/card/Card.props.ts';
3
+ /**
4
+ * Card component
5
+ *
6
+ * A container component with a background, border radius, and optional shadow.
7
+ * Uses a Stack layout internally for organizing children.
8
+ *
9
+ * **Direction:**
10
+ * - `column`: Vertical layout (default)
11
+ * - `row`: Horizontal layout
12
+ */
13
+ declare const Card: FC<CardProps>;
14
+ export default Card;
@@ -0,0 +1,43 @@
1
+ import { Theme } from '@aurora-ds/theme';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ import { CardDirection } from '@interfaces/card.types.ts';
4
+ import { StackAlign, StackJustify } from '@interfaces/stack.types.ts';
5
+ export type CardProps = {
6
+ /** Card children elements */
7
+ children: ReactNode;
8
+ /** Flex direction of the card content */
9
+ direction?: CardDirection;
10
+ /** Padding inside the card (theme spacing key) */
11
+ padding?: keyof Theme['spacing'];
12
+ /** Width of the card */
13
+ width?: CSSProperties['width'];
14
+ /** Height of the card */
15
+ height?: CSSProperties['height'];
16
+ /** Gap between children (theme spacing key) */
17
+ gap?: keyof Theme['spacing'];
18
+ /** Border radius of the card */
19
+ radius?: keyof Theme['radius'];
20
+ /** Shadow depth of the card */
21
+ shadow?: keyof Theme['shadows'];
22
+ /** Alignment of items on the cross axis */
23
+ align?: StackAlign;
24
+ /** Justification of items on the main axis */
25
+ justify?: StackJustify;
26
+ /** Background color of the card */
27
+ backgroundColor?: keyof Theme['colors'];
28
+ /** Border color of the card */
29
+ borderColor?: keyof Theme['colors'];
30
+ };
31
+ export type CardStyleParams = {
32
+ direction: CardDirection;
33
+ padding?: keyof Theme['spacing'];
34
+ width?: CSSProperties['width'];
35
+ height?: CSSProperties['height'];
36
+ gap?: keyof Theme['spacing'];
37
+ radius: keyof Theme['radius'];
38
+ shadow: keyof Theme['shadows'];
39
+ align?: StackAlign;
40
+ justify?: StackJustify;
41
+ backgroundColor: keyof Theme['colors'];
42
+ borderColor?: keyof Theme['colors'];
43
+ };
@@ -0,0 +1,7 @@
1
+ import { CardStyleParams } from '@components/layout/card/Card.props.ts';
2
+ /**
3
+ * Card styles using createStyles from @aurora-ds/theme
4
+ */
5
+ export declare const CARD_STYLES: {
6
+ root: (args_0: CardStyleParams) => string;
7
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Card } from '@components/layout/card/Card.tsx';
2
+ export type { CardProps } from '@components/layout/card/Card.props.ts';
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { StackProps } from '@components/layout/stack/Stack.props.ts';
3
+ /**
4
+ * Stack component
5
+ *
6
+ * A flexbox container for laying out children in a row or column.
7
+ *
8
+ * **Direction:**
9
+ * - `row`: Horizontal layout (default)
10
+ * - `column`: Vertical layout
11
+ */
12
+ declare const Stack: FC<StackProps>;
13
+ export default Stack;
@@ -0,0 +1,33 @@
1
+ import { Theme } from '@aurora-ds/theme';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ import { StackAlign, StackDirection, StackJustify, StackWrap } from '@interfaces/stack.types.ts';
4
+ export type StackProps = {
5
+ /** Stack children elements */
6
+ children: ReactNode;
7
+ /** Flex direction of the stack */
8
+ direction?: StackDirection;
9
+ /** Gap between children (theme spacing or CSS value) */
10
+ gap?: keyof Theme['spacing'];
11
+ /** Width of the stack container */
12
+ width?: CSSProperties['width'];
13
+ /** Height of the stack container */
14
+ height?: CSSProperties['height'];
15
+ /** Alignment of items on the cross axis */
16
+ align?: StackAlign;
17
+ /** Justification of items on the main axis */
18
+ justify?: StackJustify;
19
+ /** Whether items should wrap */
20
+ wrap?: StackWrap;
21
+ /** Padding inside the stack */
22
+ padding?: keyof Theme['spacing'];
23
+ };
24
+ export type StackStyleParams = {
25
+ direction: StackDirection;
26
+ gap?: keyof Theme['spacing'];
27
+ width?: CSSProperties['width'];
28
+ height?: CSSProperties['height'];
29
+ align?: StackAlign;
30
+ justify?: StackJustify;
31
+ wrap?: StackWrap;
32
+ padding?: keyof Theme['spacing'];
33
+ };
@@ -0,0 +1,7 @@
1
+ import { StackStyleParams } from '@components/layout/stack/Stack.props.ts';
2
+ /**
3
+ * Stack styles using createStyles from @aurora-ds/theme
4
+ */
5
+ export declare const STACK_STYLES: {
6
+ root: (args_0: StackStyleParams) => string;
7
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Stack } from '@components/layout/stack/Stack.tsx';
2
+ export type { StackProps } from '@components/layout/stack/Stack.props.ts';
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ import { TextProps } from '@components/layout/text/Text.props.ts';
3
+ /**
4
+ * Text component - Renders semantic HTML elements based on variant
5
+ *
6
+ * **Variants:**
7
+ * - `h1-h6`: Heading elements with appropriate styling
8
+ * - `p`: Paragraph element with relaxed line height
9
+ * - `span`: Inline text element (default)
10
+ * - `label`: Label element with medium font weight
11
+ *
12
+ * **Features:**
13
+ * - Automatic HTML tag selection based on variant
14
+ * - Theme-aware colors
15
+ * - Text truncation with `maxLines`
16
+ * - Underline support
17
+ */
18
+ declare const Text: FC<TextProps>;
19
+ export default Text;
@@ -0,0 +1,22 @@
1
+ import { Theme } from '@aurora-ds/theme';
2
+ import { PropsWithChildren } from 'react';
3
+ import { TextVariants } from '@interfaces/text.types';
4
+ export type TextProps = PropsWithChildren<{
5
+ /** Text variant that determines the HTML tag and default styling */
6
+ variant?: TextVariants;
7
+ /** Text color from theme */
8
+ color?: keyof Theme['colors'];
9
+ /** Font size from theme (overrides variant fontSize if provided) */
10
+ fontSize?: keyof Theme['fontSize'];
11
+ /** Maximum number of lines before truncation with ellipsis */
12
+ maxLines?: number;
13
+ /** Add underline text decoration */
14
+ underline?: boolean;
15
+ }>;
16
+ export type TextStyleParams = {
17
+ variant?: TextVariants;
18
+ color?: keyof Theme['colors'];
19
+ fontSize?: keyof Theme['fontSize'];
20
+ maxLines?: number;
21
+ underline?: boolean;
22
+ };
@@ -0,0 +1,4 @@
1
+ import { TextStyleParams } from '@components/layout/text/Text.props.ts';
2
+ export declare const TEXT_STYLES: {
3
+ root: (args_0: TextStyleParams) => string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Text } from '@components/layout/text/Text.tsx';
2
+ export type { TextProps } from '@components/layout/text/Text.props.ts';