@aurora-ds/components 0.2.0 → 0.4.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 (39) hide show
  1. package/README.md +2 -0
  2. package/dist/cjs/components/data-display/chip/Chip.props.d.ts +3 -0
  3. package/dist/cjs/components/index.d.ts +2 -0
  4. package/dist/cjs/components/layout/accordion/Accordion.d.ts +10 -0
  5. package/dist/cjs/components/layout/accordion/Accordion.props.d.ts +36 -0
  6. package/dist/cjs/components/layout/accordion/Accordion.styles.d.ts +7 -0
  7. package/dist/cjs/components/layout/accordion/index.d.ts +2 -0
  8. package/dist/cjs/components/navigation/drawer-item/DrawerItem.d.ts +10 -0
  9. package/dist/cjs/components/navigation/drawer-item/DrawerItem.props.d.ts +32 -0
  10. package/dist/cjs/components/navigation/drawer-item/DrawerItem.styles.d.ts +7 -0
  11. package/dist/cjs/components/navigation/drawer-item/index.d.ts +2 -0
  12. package/dist/cjs/constants/globalConstants.d.ts +1 -1
  13. package/dist/cjs/index.js +140 -6
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/cjs/interfaces/chip.types.d.ts +1 -1
  16. package/dist/cjs/resources/Icons.d.ts +3 -0
  17. package/dist/cjs/resources/icons/ChevronDownIcon.d.ts +1 -0
  18. package/dist/cjs/resources/icons/InfoIcon.d.ts +1 -0
  19. package/dist/cjs/utils/ui/components/chip/getChipColorStyles.utils.d.ts +2 -38
  20. package/dist/esm/components/data-display/chip/Chip.props.d.ts +3 -0
  21. package/dist/esm/components/index.d.ts +2 -0
  22. package/dist/esm/components/layout/accordion/Accordion.d.ts +10 -0
  23. package/dist/esm/components/layout/accordion/Accordion.props.d.ts +36 -0
  24. package/dist/esm/components/layout/accordion/Accordion.styles.d.ts +7 -0
  25. package/dist/esm/components/layout/accordion/index.d.ts +2 -0
  26. package/dist/esm/components/navigation/drawer-item/DrawerItem.d.ts +10 -0
  27. package/dist/esm/components/navigation/drawer-item/DrawerItem.props.d.ts +32 -0
  28. package/dist/esm/components/navigation/drawer-item/DrawerItem.styles.d.ts +7 -0
  29. package/dist/esm/components/navigation/drawer-item/index.d.ts +2 -0
  30. package/dist/esm/constants/globalConstants.d.ts +1 -1
  31. package/dist/esm/index.js +140 -8
  32. package/dist/esm/index.js.map +1 -1
  33. package/dist/esm/interfaces/chip.types.d.ts +1 -1
  34. package/dist/esm/resources/Icons.d.ts +3 -0
  35. package/dist/esm/resources/icons/ChevronDownIcon.d.ts +1 -0
  36. package/dist/esm/resources/icons/InfoIcon.d.ts +1 -0
  37. package/dist/esm/utils/ui/components/chip/getChipColorStyles.utils.d.ts +2 -38
  38. package/dist/index.d.ts +69 -3
  39. 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,3 @@
1
+ import { ChevronDownIcon } from '@resources/icons/ChevronDownIcon.tsx';
2
+ import { InfoIcon } from '@resources/icons/InfoIcon.tsx';
3
+ export { ChevronDownIcon, InfoIcon, };
@@ -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.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
- } | {
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;
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
  /**
@@ -273,5 +275,69 @@ type CardProps = {
273
275
  */
274
276
  declare const Card: FC<CardProps>;
275
277
 
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 };
278
+ type AccordionProps = {
279
+ /** Title displayed in the accordion header */
280
+ title: string;
281
+ /** Content to show/hide when accordion is expanded */
282
+ children: ReactNode;
283
+ /** Whether the accordion is expanded */
284
+ expanded?: boolean;
285
+ /** Default expanded state (for uncontrolled mode) */
286
+ defaultExpanded?: boolean;
287
+ /** Callback fired when the accordion expands or collapses */
288
+ onChange?: (expanded: boolean) => void;
289
+ /** Disabled state */
290
+ disabled?: boolean;
291
+ /** Optional icon to display before title */
292
+ icon?: ReactNode;
293
+ /** Optional background color */
294
+ backgroundColor?: keyof Theme['colors'];
295
+ /** Optional width */
296
+ width?: CSSProperties['width'];
297
+ };
298
+
299
+ /**
300
+ * Accordion component
301
+ *
302
+ * A collapsible container that can show/hide content.
303
+ * Supports controlled and uncontrolled modes.
304
+ */
305
+ declare const Accordion: FC<AccordionProps>;
306
+
307
+ type DrawerItemProps = {
308
+ /** DrawerItem text label */
309
+ label: string;
310
+ /** Optional icon to display before label */
311
+ startIcon?: ReactNode;
312
+ /** Optional icon to display after label */
313
+ endIcon?: ReactNode;
314
+ /** Click handler */
315
+ onClick?: () => void;
316
+ /** Selected state */
317
+ selected?: boolean;
318
+ /** Disabled state */
319
+ disabled?: boolean;
320
+ /** Optional chip to display */
321
+ chip?: DrawerItemChip;
322
+ };
323
+ type DrawerItemChip = {
324
+ /** Chip text label */
325
+ label?: string;
326
+ /** Chip icon */
327
+ icon?: ReactNode;
328
+ /** Chip color */
329
+ color?: ChipColor;
330
+ /** Chip variant */
331
+ variant?: ChipVariant;
332
+ };
333
+
334
+ /**
335
+ * DrawerItem component
336
+ *
337
+ * A navigation item for use in drawers/sidebars.
338
+ * Similar to a text button with selected state support.
339
+ */
340
+ declare const DrawerItem: FC<DrawerItemProps>;
341
+
342
+ export { Accordion, Button, Card, Chip, DrawerItem, Icon, IconButton, Stack, Text };
343
+ 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.2.0",
3
+ "version": "0.4.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.0.3",
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",