@aurora-ds/components 0.2.1 → 0.5.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 +1 -0
- package/dist/cjs/components/data-display/chip/Chip.props.d.ts +3 -0
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/layout/accordion/Accordion.d.ts +10 -0
- package/dist/cjs/components/layout/accordion/Accordion.props.d.ts +36 -0
- package/dist/cjs/components/layout/accordion/Accordion.styles.d.ts +7 -0
- package/dist/cjs/components/layout/accordion/index.d.ts +2 -0
- package/dist/cjs/components/layout/text/Text.d.ts +1 -0
- package/dist/cjs/components/layout/text/Text.props.d.ts +3 -0
- package/dist/cjs/components/navigation/drawer-item/DrawerItem.d.ts +10 -0
- package/dist/cjs/components/navigation/drawer-item/DrawerItem.props.d.ts +21 -0
- package/dist/cjs/components/navigation/drawer-item/DrawerItem.styles.d.ts +7 -0
- package/dist/cjs/components/navigation/drawer-item/index.d.ts +2 -0
- package/dist/cjs/constants/globalConstants.d.ts +1 -1
- package/dist/cjs/index.js +175 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/chip.types.d.ts +1 -1
- package/dist/cjs/resources/Icons.d.ts +3 -0
- package/dist/cjs/resources/icons/ChevronDownIcon.d.ts +1 -0
- package/dist/cjs/resources/icons/InfoIcon.d.ts +1 -0
- package/dist/cjs/utils/ui/components/chip/getChipColorStyles.utils.d.ts +2 -38
- package/dist/cjs/utils/ui/components/text/parseTextWithBold.utils.d.ts +7 -0
- package/dist/esm/components/data-display/chip/Chip.props.d.ts +3 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/layout/accordion/Accordion.d.ts +10 -0
- package/dist/esm/components/layout/accordion/Accordion.props.d.ts +36 -0
- package/dist/esm/components/layout/accordion/Accordion.styles.d.ts +7 -0
- package/dist/esm/components/layout/accordion/index.d.ts +2 -0
- package/dist/esm/components/layout/text/Text.d.ts +1 -0
- package/dist/esm/components/layout/text/Text.props.d.ts +3 -0
- package/dist/esm/components/navigation/drawer-item/DrawerItem.d.ts +10 -0
- package/dist/esm/components/navigation/drawer-item/DrawerItem.props.d.ts +21 -0
- package/dist/esm/components/navigation/drawer-item/DrawerItem.styles.d.ts +7 -0
- package/dist/esm/components/navigation/drawer-item/index.d.ts +2 -0
- package/dist/esm/constants/globalConstants.d.ts +1 -1
- package/dist/esm/index.js +175 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/chip.types.d.ts +1 -1
- package/dist/esm/resources/Icons.d.ts +3 -0
- package/dist/esm/resources/icons/ChevronDownIcon.d.ts +1 -0
- package/dist/esm/resources/icons/InfoIcon.d.ts +1 -0
- package/dist/esm/utils/ui/components/chip/getChipColorStyles.utils.d.ts +2 -38
- package/dist/esm/utils/ui/components/text/parseTextWithBold.utils.d.ts +7 -0
- package/dist/index.d.ts +62 -3
- package/package.json +2 -2
|
@@ -3,4 +3,4 @@ export type ChipVariant = 'filled' | 'outlined';
|
|
|
3
3
|
/** Chip color options */
|
|
4
4
|
export type ChipColor = 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
5
5
|
/** Chip size options */
|
|
6
|
-
export type ChipSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
6
|
+
export type ChipSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ChevronDownIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InfoIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +1,6 @@
|
|
|
1
1
|
import { Theme } from '@aurora-ds/theme';
|
|
2
|
-
import { ChipStyleParams } from '@components/data-display/chip/Chip.props
|
|
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
|
-
} | {
|
|
2
|
+
import { ChipStyleParams } from '@components/data-display/chip/Chip.props';
|
|
3
|
+
export declare const getChipColorStyles: (theme: Theme, color: ChipStyleParams["color"], variant: ChipStyleParams["variant"], disabled: ChipStyleParams["disabled"]) => {
|
|
40
4
|
backgroundColor: string;
|
|
41
5
|
color: string;
|
|
42
6
|
borderColor: string;
|
|
@@ -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;
|
package/dist/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ type ChipVariant = 'filled' | 'outlined';
|
|
|
52
52
|
/** Chip color options */
|
|
53
53
|
type ChipColor = 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
54
54
|
/** Chip size options */
|
|
55
|
-
type ChipSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
55
|
+
type ChipSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
56
56
|
|
|
57
57
|
type ChipProps = {
|
|
58
58
|
/** Text label to display */
|
|
@@ -69,6 +69,8 @@ type ChipProps = {
|
|
|
69
69
|
gap?: keyof Theme['spacing'];
|
|
70
70
|
/** Border radius from theme */
|
|
71
71
|
radius?: keyof Theme['radius'];
|
|
72
|
+
/** Disabled state */
|
|
73
|
+
disabled?: boolean;
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
/**
|
|
@@ -100,6 +102,8 @@ type TextProps = PropsWithChildren<{
|
|
|
100
102
|
color?: keyof Theme['colors'];
|
|
101
103
|
/** Font size from theme (overrides variant fontSize if provided) */
|
|
102
104
|
fontSize?: keyof Theme['fontSize'];
|
|
105
|
+
/** Font family override (CSS value) */
|
|
106
|
+
fontFamily?: string;
|
|
103
107
|
/** Maximum number of lines before truncation with ellipsis */
|
|
104
108
|
maxLines?: number;
|
|
105
109
|
/** Add underline text decoration */
|
|
@@ -120,6 +124,7 @@ type TextProps = PropsWithChildren<{
|
|
|
120
124
|
* - Theme-aware colors
|
|
121
125
|
* - Text truncation with `maxLines`
|
|
122
126
|
* - Underline support
|
|
127
|
+
* - Bold text with **double asterisks** syntax
|
|
123
128
|
*/
|
|
124
129
|
declare const Text: FC<TextProps>;
|
|
125
130
|
|
|
@@ -273,5 +278,59 @@ type CardProps = {
|
|
|
273
278
|
*/
|
|
274
279
|
declare const Card: FC<CardProps>;
|
|
275
280
|
|
|
276
|
-
|
|
277
|
-
|
|
281
|
+
type AccordionProps = {
|
|
282
|
+
/** Title displayed in the accordion header */
|
|
283
|
+
title: string;
|
|
284
|
+
/** Content to show/hide when accordion is expanded */
|
|
285
|
+
children: ReactNode;
|
|
286
|
+
/** Whether the accordion is expanded */
|
|
287
|
+
expanded?: boolean;
|
|
288
|
+
/** Default expanded state (for uncontrolled mode) */
|
|
289
|
+
defaultExpanded?: boolean;
|
|
290
|
+
/** Callback fired when the accordion expands or collapses */
|
|
291
|
+
onChange?: (expanded: boolean) => void;
|
|
292
|
+
/** Disabled state */
|
|
293
|
+
disabled?: boolean;
|
|
294
|
+
/** Optional icon to display before title */
|
|
295
|
+
icon?: ReactNode;
|
|
296
|
+
/** Optional background color */
|
|
297
|
+
backgroundColor?: keyof Theme['colors'];
|
|
298
|
+
/** Optional width */
|
|
299
|
+
width?: CSSProperties['width'];
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Accordion component
|
|
304
|
+
*
|
|
305
|
+
* A collapsible container that can show/hide content.
|
|
306
|
+
* Supports controlled and uncontrolled modes.
|
|
307
|
+
*/
|
|
308
|
+
declare const Accordion: FC<AccordionProps>;
|
|
309
|
+
|
|
310
|
+
type DrawerItemProps = {
|
|
311
|
+
/** DrawerItem text label */
|
|
312
|
+
label: string;
|
|
313
|
+
/** Optional icon to display before label */
|
|
314
|
+
startIcon?: ReactNode;
|
|
315
|
+
/** Optional icon to display after label */
|
|
316
|
+
endIcon?: ReactNode;
|
|
317
|
+
/** Click handler */
|
|
318
|
+
onClick?: () => void;
|
|
319
|
+
/** Selected state */
|
|
320
|
+
selected?: boolean;
|
|
321
|
+
/** Disabled state */
|
|
322
|
+
disabled?: boolean;
|
|
323
|
+
/** Optional chip to display */
|
|
324
|
+
chip?: Omit<ChipProps, 'size' | 'disabled'>;
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* DrawerItem component
|
|
329
|
+
*
|
|
330
|
+
* A navigation item for use in drawers/sidebars.
|
|
331
|
+
* Similar to a text button with selected state support.
|
|
332
|
+
*/
|
|
333
|
+
declare const DrawerItem: FC<DrawerItemProps>;
|
|
334
|
+
|
|
335
|
+
export { Accordion, Button, Card, Chip, DrawerItem, Icon, IconButton, Stack, Text };
|
|
336
|
+
export type { AccordionProps, ButtonProps, ButtonVariantStyle, ButtonVariants, CardDirection, CardProps, ChipColor, ChipProps, ChipSize, ChipVariant, DrawerItemProps, IconButtonProps, IconProps, StackAlign, StackDirection, StackJustify, StackProps, StackWrap, TextProps, TextVariantStyle, TextVariants };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurora-ds/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Aurora Design System - React Components Library",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react-dom": "^18.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@aurora-ds/theme": "^1.
|
|
27
|
+
"@aurora-ds/theme": "^1.1.5",
|
|
28
28
|
"@babel/core": "^7.23.0",
|
|
29
29
|
"@babel/preset-env": "^7.23.0",
|
|
30
30
|
"@babel/preset-react": "^7.23.0",
|