@aurora-ds/components 0.1.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.
- package/README.md +58 -0
- package/dist/cjs/components/button/Button.d.ts +12 -0
- package/dist/cjs/components/button/Button.props.d.ts +24 -0
- package/dist/cjs/components/button/Button.styles.d.ts +18 -0
- package/dist/cjs/components/button/index.d.ts +2 -0
- package/dist/cjs/components/card/Card.d.ts +14 -0
- package/dist/cjs/components/card/Card.props.d.ts +37 -0
- package/dist/cjs/components/card/Card.styles.d.ts +7 -0
- package/dist/cjs/components/card/index.d.ts +2 -0
- package/dist/cjs/components/icon/Icon.d.ts +35 -0
- package/dist/cjs/components/icon/Icon.props.d.ts +14 -0
- package/dist/cjs/components/icon/Icon.styles.d.ts +3 -0
- package/dist/cjs/components/icon/index.d.ts +2 -0
- package/dist/cjs/components/icon-button/IconButton.d.ts +4 -0
- package/dist/cjs/components/icon-button/IconButton.props.d.ts +20 -0
- package/dist/cjs/components/icon-button/IconButton.styles.d.ts +4 -0
- package/dist/cjs/components/icon-button/index.d.ts +2 -0
- package/dist/cjs/components/index.d.ts +10 -0
- package/dist/cjs/components/stack/Stack.d.ts +13 -0
- package/dist/cjs/components/stack/Stack.props.d.ts +33 -0
- package/dist/cjs/components/stack/Stack.styles.d.ts +7 -0
- package/dist/cjs/components/stack/index.d.ts +2 -0
- package/dist/cjs/components/text/Text.d.ts +19 -0
- package/dist/cjs/components/text/Text.props.d.ts +19 -0
- package/dist/cjs/components/text/Text.styles.d.ts +4 -0
- package/dist/cjs/components/text/index.d.ts +2 -0
- package/dist/cjs/constants/globalConstants.d.ts +2 -0
- package/dist/cjs/index.css +1 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +1767 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interfaces/button.types.d.ts +22 -0
- package/dist/cjs/interfaces/card.types.d.ts +3 -0
- package/dist/cjs/interfaces/index.d.ts +4 -0
- package/dist/cjs/interfaces/stack.types.d.ts +7 -0
- package/dist/cjs/interfaces/text.types.d.ts +7 -0
- package/dist/cjs/utils/ui/components/button/getButtonVariantStyles.utils.d.ts +7 -0
- package/dist/cjs/utils/ui/components/text/getTextVariantStyles.utils.d.ts +7 -0
- package/dist/cjs/utils/ui/components/text/getTruncateTextStyles.utils.d.ts +17 -0
- package/dist/esm/components/button/Button.d.ts +12 -0
- package/dist/esm/components/button/Button.props.d.ts +24 -0
- package/dist/esm/components/button/Button.styles.d.ts +18 -0
- package/dist/esm/components/button/index.d.ts +2 -0
- package/dist/esm/components/card/Card.d.ts +14 -0
- package/dist/esm/components/card/Card.props.d.ts +37 -0
- package/dist/esm/components/card/Card.styles.d.ts +7 -0
- package/dist/esm/components/card/index.d.ts +2 -0
- package/dist/esm/components/icon/Icon.d.ts +35 -0
- package/dist/esm/components/icon/Icon.props.d.ts +14 -0
- package/dist/esm/components/icon/Icon.styles.d.ts +3 -0
- package/dist/esm/components/icon/index.d.ts +2 -0
- package/dist/esm/components/icon-button/IconButton.d.ts +4 -0
- package/dist/esm/components/icon-button/IconButton.props.d.ts +20 -0
- package/dist/esm/components/icon-button/IconButton.styles.d.ts +4 -0
- package/dist/esm/components/icon-button/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts +10 -0
- package/dist/esm/components/stack/Stack.d.ts +13 -0
- package/dist/esm/components/stack/Stack.props.d.ts +33 -0
- package/dist/esm/components/stack/Stack.styles.d.ts +7 -0
- package/dist/esm/components/stack/index.d.ts +2 -0
- package/dist/esm/components/text/Text.d.ts +19 -0
- package/dist/esm/components/text/Text.props.d.ts +19 -0
- package/dist/esm/components/text/Text.styles.d.ts +4 -0
- package/dist/esm/components/text/index.d.ts +2 -0
- package/dist/esm/constants/globalConstants.d.ts +2 -0
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +1760 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interfaces/button.types.d.ts +22 -0
- package/dist/esm/interfaces/card.types.d.ts +3 -0
- package/dist/esm/interfaces/index.d.ts +4 -0
- package/dist/esm/interfaces/stack.types.d.ts +7 -0
- package/dist/esm/interfaces/text.types.d.ts +7 -0
- package/dist/esm/utils/ui/components/button/getButtonVariantStyles.utils.d.ts +7 -0
- package/dist/esm/utils/ui/components/text/getTextVariantStyles.utils.d.ts +7 -0
- package/dist/esm/utils/ui/components/text/getTruncateTextStyles.utils.d.ts +17 -0
- package/dist/index.d.ts +233 -0
- package/package.json +77 -0
|
@@ -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,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,10 @@
|
|
|
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';
|
|
7
|
+
export type { ButtonVariants, ButtonVariantStyle } from '@interfaces/button.types';
|
|
8
|
+
export type { TextVariants, TextVariantStyle } from '@interfaces/text.types';
|
|
9
|
+
export type { StackDirection, StackAlign, StackJustify, StackWrap } from '@interfaces/stack.types';
|
|
10
|
+
export type { CardDirection } from '@interfaces/card.types';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { StackProps } from '@components/stack/Stack.props';
|
|
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';
|
|
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,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TextProps } from '@components/text/Text.props';
|
|
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,19 @@
|
|
|
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
|
+
/** Maximum number of lines before truncation with ellipsis */
|
|
10
|
+
maxLines?: number;
|
|
11
|
+
/** Add underline text decoration */
|
|
12
|
+
underline?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
export type TextStyleParams = {
|
|
15
|
+
variant?: TextVariants;
|
|
16
|
+
color?: keyof Theme['colors'];
|
|
17
|
+
maxLines?: number;
|
|
18
|
+
underline?: boolean;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");*,:after,:before{box-sizing:border-box}body{font-family:Inter,sans-serif}
|