@aurora-ds/components 0.1.0 → 0.2.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.
- package/README.md +1 -0
- package/dist/cjs/components/data-display/chip/Chip.d.ts +16 -0
- package/dist/cjs/components/data-display/chip/Chip.props.d.ts +27 -0
- package/dist/cjs/components/data-display/chip/Chip.styles.d.ts +4 -0
- package/dist/cjs/components/data-display/chip/index.d.ts +2 -0
- package/dist/cjs/components/data-display/icon/Icon.d.ts +35 -0
- package/dist/cjs/components/data-display/icon/Icon.props.d.ts +14 -0
- package/dist/cjs/components/data-display/icon/Icon.styles.d.ts +3 -0
- package/dist/cjs/components/data-display/icon/index.d.ts +2 -0
- package/dist/cjs/components/index.d.ts +8 -6
- package/dist/cjs/components/inputs/button/Button.d.ts +12 -0
- package/dist/cjs/components/inputs/button/Button.props.d.ts +24 -0
- package/dist/cjs/components/inputs/button/Button.styles.d.ts +18 -0
- package/dist/cjs/components/inputs/button/index.d.ts +2 -0
- package/dist/cjs/components/inputs/icon-button/IconButton.d.ts +4 -0
- package/dist/cjs/components/inputs/icon-button/IconButton.props.d.ts +20 -0
- package/dist/cjs/components/inputs/icon-button/IconButton.styles.d.ts +4 -0
- package/dist/cjs/components/inputs/icon-button/index.d.ts +2 -0
- package/dist/cjs/components/layout/card/Card.d.ts +14 -0
- package/dist/cjs/components/layout/card/Card.props.d.ts +43 -0
- package/dist/cjs/components/layout/card/Card.styles.d.ts +7 -0
- package/dist/cjs/components/layout/card/index.d.ts +2 -0
- package/dist/cjs/components/layout/stack/Stack.d.ts +13 -0
- package/dist/cjs/components/layout/stack/Stack.props.d.ts +33 -0
- package/dist/cjs/components/layout/stack/Stack.styles.d.ts +7 -0
- package/dist/cjs/components/layout/stack/index.d.ts +2 -0
- package/dist/cjs/components/layout/text/Text.d.ts +19 -0
- package/dist/cjs/components/layout/text/Text.props.d.ts +22 -0
- package/dist/cjs/components/layout/text/Text.styles.d.ts +4 -0
- package/dist/cjs/components/layout/text/index.d.ts +2 -0
- package/dist/cjs/index.js +185 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/chip.types.d.ts +6 -0
- package/dist/cjs/utils/ui/components/chip/getChipColorStyles.utils.d.ts +43 -0
- package/dist/cjs/utils/ui/components/chip/getChipContentSize.utils.d.ts +8 -0
- package/dist/cjs/utils/ui/components/chip/getChipSizeStyles.utils.d.ts +12 -0
- package/dist/cjs/utils/ui/components/text/getTextVariantStyles.utils.d.ts +1 -1
- package/dist/esm/components/data-display/chip/Chip.d.ts +16 -0
- package/dist/esm/components/data-display/chip/Chip.props.d.ts +27 -0
- package/dist/esm/components/data-display/chip/Chip.styles.d.ts +4 -0
- package/dist/esm/components/data-display/chip/index.d.ts +2 -0
- package/dist/esm/components/data-display/icon/Icon.d.ts +35 -0
- package/dist/esm/components/data-display/icon/Icon.props.d.ts +14 -0
- package/dist/esm/components/data-display/icon/Icon.styles.d.ts +3 -0
- package/dist/esm/components/data-display/icon/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts +8 -6
- package/dist/esm/components/inputs/button/Button.d.ts +12 -0
- package/dist/esm/components/inputs/button/Button.props.d.ts +24 -0
- package/dist/esm/components/inputs/button/Button.styles.d.ts +18 -0
- package/dist/esm/components/inputs/button/index.d.ts +2 -0
- package/dist/esm/components/inputs/icon-button/IconButton.d.ts +4 -0
- package/dist/esm/components/inputs/icon-button/IconButton.props.d.ts +20 -0
- package/dist/esm/components/inputs/icon-button/IconButton.styles.d.ts +4 -0
- package/dist/esm/components/inputs/icon-button/index.d.ts +2 -0
- package/dist/esm/components/layout/card/Card.d.ts +14 -0
- package/dist/esm/components/layout/card/Card.props.d.ts +43 -0
- package/dist/esm/components/layout/card/Card.styles.d.ts +7 -0
- package/dist/esm/components/layout/card/index.d.ts +2 -0
- package/dist/esm/components/layout/stack/Stack.d.ts +13 -0
- package/dist/esm/components/layout/stack/Stack.props.d.ts +33 -0
- package/dist/esm/components/layout/stack/Stack.styles.d.ts +7 -0
- package/dist/esm/components/layout/stack/index.d.ts +2 -0
- package/dist/esm/components/layout/text/Text.d.ts +19 -0
- package/dist/esm/components/layout/text/Text.props.d.ts +22 -0
- package/dist/esm/components/layout/text/Text.styles.d.ts +4 -0
- package/dist/esm/components/layout/text/index.d.ts +2 -0
- package/dist/esm/index.js +185 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/chip.types.d.ts +6 -0
- package/dist/esm/utils/ui/components/chip/getChipColorStyles.utils.d.ts +43 -0
- package/dist/esm/utils/ui/components/chip/getChipContentSize.utils.d.ts +8 -0
- package/dist/esm/utils/ui/components/chip/getChipSizeStyles.utils.d.ts +12 -0
- package/dist/esm/utils/ui/components/text/getTextVariantStyles.utils.d.ts +1 -1
- package/dist/index.d.ts +46 -2
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Theme } from '@aurora-ds/theme';
|
|
2
|
+
import { ChipStyleParams } from '@components/data-display/chip/Chip.props.ts';
|
|
3
|
+
export declare const getChipColorStyles: (theme: Theme, color: ChipStyleParams["color"], variant: ChipStyleParams["variant"]) => {
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
color: string;
|
|
6
|
+
borderColor: string;
|
|
7
|
+
} | {
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
color: string;
|
|
10
|
+
borderColor: string;
|
|
11
|
+
} | {
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
color: string;
|
|
14
|
+
borderColor: string;
|
|
15
|
+
} | {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
color: string;
|
|
18
|
+
borderColor: string;
|
|
19
|
+
} | {
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
color: string;
|
|
22
|
+
borderColor: string;
|
|
23
|
+
} | {
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
color: string;
|
|
26
|
+
borderColor: string;
|
|
27
|
+
} | {
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
color: string;
|
|
30
|
+
borderColor: string;
|
|
31
|
+
} | {
|
|
32
|
+
backgroundColor: string;
|
|
33
|
+
color: string;
|
|
34
|
+
borderColor: string;
|
|
35
|
+
} | {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
color: string;
|
|
38
|
+
borderColor: string;
|
|
39
|
+
} | {
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
color: string;
|
|
42
|
+
borderColor: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseFontSize } from '@aurora-ds/theme';
|
|
2
|
+
import { ChipStyleParams } from '@components/data-display/chip/Chip.props';
|
|
3
|
+
/**
|
|
4
|
+
* Get chip content size based on the chip size
|
|
5
|
+
* @param size
|
|
6
|
+
* @constructor
|
|
7
|
+
*/
|
|
8
|
+
export declare const getChipContentSize: (size: ChipStyleParams["size"]) => keyof BaseFontSize;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Theme } from '@aurora-ds/theme';
|
|
2
|
+
import { ChipStyleParams } from '@components/data-display/chip/Chip.props';
|
|
3
|
+
/**
|
|
4
|
+
* Get chip size styles based on the theme, size and icon-only state
|
|
5
|
+
* @param theme - Theme object
|
|
6
|
+
* @param size - Chip size
|
|
7
|
+
* @param isIconOnly - Whether the chip has only an icon (no label)
|
|
8
|
+
*/
|
|
9
|
+
export declare const getChipSizeStyles: (theme: Theme, size: ChipStyleParams["size"], isIconOnly: ChipStyleParams["isIconOnly"]) => {
|
|
10
|
+
padding: string;
|
|
11
|
+
fontSize: string;
|
|
12
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,44 @@ type IconProps = PropsWithChildren<{
|
|
|
47
47
|
*/
|
|
48
48
|
declare const Icon: FC<IconProps>;
|
|
49
49
|
|
|
50
|
+
/** Chip variant options */
|
|
51
|
+
type ChipVariant = 'filled' | 'outlined';
|
|
52
|
+
/** Chip color options */
|
|
53
|
+
type ChipColor = 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
54
|
+
/** Chip size options */
|
|
55
|
+
type ChipSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
56
|
+
|
|
57
|
+
type ChipProps = {
|
|
58
|
+
/** Text label to display */
|
|
59
|
+
label?: string;
|
|
60
|
+
/** Icon to display before the label */
|
|
61
|
+
icon?: ReactNode;
|
|
62
|
+
/** Chip variant style */
|
|
63
|
+
variant?: ChipVariant;
|
|
64
|
+
/** Chip color from theme */
|
|
65
|
+
color?: ChipColor;
|
|
66
|
+
/** Chip size */
|
|
67
|
+
size?: ChipSize;
|
|
68
|
+
/** Gap between icon and text (theme spacing key) */
|
|
69
|
+
gap?: keyof Theme['spacing'];
|
|
70
|
+
/** Border radius from theme */
|
|
71
|
+
radius?: keyof Theme['radius'];
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Chip component
|
|
76
|
+
*
|
|
77
|
+
* A compact element for displaying information, tags, or actions.
|
|
78
|
+
*
|
|
79
|
+
* **Variants:**
|
|
80
|
+
* - `filled`: Solid background (default)
|
|
81
|
+
* - `outlined`: Border only
|
|
82
|
+
*
|
|
83
|
+
* **Colors:**
|
|
84
|
+
* - `default`, `primary`, `success`, `warning`, `error`, `info`
|
|
85
|
+
*/
|
|
86
|
+
declare const Chip: FC<ChipProps>;
|
|
87
|
+
|
|
50
88
|
type TextVariants = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label';
|
|
51
89
|
type TextVariantStyle = {
|
|
52
90
|
tag: TextVariants;
|
|
@@ -60,6 +98,8 @@ type TextProps = PropsWithChildren<{
|
|
|
60
98
|
variant?: TextVariants;
|
|
61
99
|
/** Text color from theme */
|
|
62
100
|
color?: keyof Theme['colors'];
|
|
101
|
+
/** Font size from theme (overrides variant fontSize if provided) */
|
|
102
|
+
fontSize?: keyof Theme['fontSize'];
|
|
63
103
|
/** Maximum number of lines before truncation with ellipsis */
|
|
64
104
|
maxLines?: number;
|
|
65
105
|
/** Add underline text decoration */
|
|
@@ -215,6 +255,10 @@ type CardProps = {
|
|
|
215
255
|
align?: StackAlign;
|
|
216
256
|
/** Justification of items on the main axis */
|
|
217
257
|
justify?: StackJustify;
|
|
258
|
+
/** Background color of the card */
|
|
259
|
+
backgroundColor?: keyof Theme['colors'];
|
|
260
|
+
/** Border color of the card */
|
|
261
|
+
borderColor?: keyof Theme['colors'];
|
|
218
262
|
};
|
|
219
263
|
|
|
220
264
|
/**
|
|
@@ -229,5 +273,5 @@ type CardProps = {
|
|
|
229
273
|
*/
|
|
230
274
|
declare const Card: FC<CardProps>;
|
|
231
275
|
|
|
232
|
-
export { Button, Card, Icon, IconButton, Stack, Text };
|
|
233
|
-
export type { ButtonProps, ButtonVariantStyle, ButtonVariants, CardDirection, CardProps, IconButtonProps, IconProps, StackAlign, StackDirection, StackJustify, StackProps, StackWrap, TextProps, TextVariantStyle, TextVariants };
|
|
276
|
+
export { Button, Card, Chip, Icon, IconButton, Stack, Text };
|
|
277
|
+
export type { ButtonProps, ButtonVariantStyle, ButtonVariants, CardDirection, CardProps, ChipColor, ChipProps, ChipSize, ChipVariant, IconButtonProps, IconProps, StackAlign, StackDirection, StackJustify, StackProps, StackWrap, TextProps, TextVariantStyle, TextVariants };
|