@aurora-ds/components 0.20.0 → 0.21.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.
Files changed (31) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/data-display/status/Status.d.ts +16 -0
  3. package/dist/cjs/components/data-display/status/Status.props.d.ts +40 -0
  4. package/dist/cjs/components/data-display/status/Status.styles.d.ts +4 -0
  5. package/dist/cjs/components/data-display/status/index.d.ts +2 -0
  6. package/dist/cjs/components/index.d.ts +2 -2
  7. package/dist/cjs/components/navigation/drawer-item/DrawerItem.props.d.ts +2 -2
  8. package/dist/cjs/index.js +106 -34
  9. package/dist/cjs/index.js.map +1 -1
  10. package/dist/cjs/interfaces/index.d.ts +1 -1
  11. package/dist/cjs/interfaces/status.types.d.ts +6 -0
  12. package/dist/cjs/interfaces/theme.contracts.d.ts +8 -0
  13. package/dist/cjs/utils/ui/components/data-display/status/getStatusColorStyles.utils.d.ts +7 -0
  14. package/dist/cjs/utils/ui/components/data-display/status/getStatusContentSize.utils.d.ts +8 -0
  15. package/dist/cjs/utils/ui/components/data-display/status/getStatusSizeStyles.utils.d.ts +12 -0
  16. package/dist/esm/components/data-display/status/Status.d.ts +16 -0
  17. package/dist/esm/components/data-display/status/Status.props.d.ts +40 -0
  18. package/dist/esm/components/data-display/status/Status.styles.d.ts +4 -0
  19. package/dist/esm/components/data-display/status/index.d.ts +2 -0
  20. package/dist/esm/components/index.d.ts +2 -2
  21. package/dist/esm/components/navigation/drawer-item/DrawerItem.props.d.ts +2 -2
  22. package/dist/esm/index.js +106 -34
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/interfaces/index.d.ts +1 -1
  25. package/dist/esm/interfaces/status.types.d.ts +6 -0
  26. package/dist/esm/interfaces/theme.contracts.d.ts +8 -0
  27. package/dist/esm/utils/ui/components/data-display/status/getStatusColorStyles.utils.d.ts +7 -0
  28. package/dist/esm/utils/ui/components/data-display/status/getStatusContentSize.utils.d.ts +8 -0
  29. package/dist/esm/utils/ui/components/data-display/status/getStatusSizeStyles.utils.d.ts +12 -0
  30. package/dist/index.d.ts +30 -22
  31. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  export * from '@interfaces/alert.types';
2
2
  export * from '@interfaces/button.types';
3
3
  export * from '@interfaces/text.types';
4
- export * from '@interfaces/chip.types';
4
+ export * from '@interfaces/status.types';
5
5
  export * from '@interfaces/avatar.types';
6
6
  export * from '@interfaces/select.types';
7
7
  export type { ThemeContract, ThemeColorContract, ThemeSpacingContract, ThemeRadiusContract, ThemeFontSizeContract, ThemeFontWeightContract, ThemeLineHeightContract, ThemeOpacityContract, ThemeShadowsContract, ThemeTransitionContract, ThemeBreakpointsContract, ThemeZIndexContract, } from '@interfaces/theme.contracts';
@@ -0,0 +1,6 @@
1
+ /** Status variant options */
2
+ export type StatusVariant = 'filled' | 'outlined';
3
+ /** Status color options */
4
+ export type StatusColor = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'highlight' | 'accent' | 'new' | 'rose' | 'yellow';
5
+ /** Status size options */
6
+ export type StatusSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
@@ -61,6 +61,14 @@ export interface ThemeColorContract {
61
61
  highlightSubtle: string;
62
62
  accent: string;
63
63
  accentSubtle: string;
64
+ default: string;
65
+ defaultSubtle: string;
66
+ new: string;
67
+ newSubtle: string;
68
+ rose: string;
69
+ roseSubtle: string;
70
+ yellow: string;
71
+ yellowSubtle: string;
64
72
  link: string;
65
73
  linkHover: string;
66
74
  linkActive: string;
@@ -0,0 +1,7 @@
1
+ import { ThemeContract } from '@/interfaces';
2
+ import { StatusStyleParams } from '@components/data-display/status/Status.props.ts';
3
+ export declare const getStatusColorStyles: (theme: ThemeContract, color: StatusStyleParams["color"], variant: StatusStyleParams["variant"], disabled: StatusStyleParams["disabled"]) => {
4
+ backgroundColor: string;
5
+ color: string;
6
+ borderColor: string;
7
+ };
@@ -0,0 +1,8 @@
1
+ import { StatusStyleParams } from '@components/data-display/status/Status.props.ts';
2
+ import { ThemeFontSizeContract } from '@interfaces/theme.contracts';
3
+ /**
4
+ * Get status content size based on the status size
5
+ * @param size
6
+ * @constructor
7
+ */
8
+ export declare const getStatusContentSize: (size: StatusStyleParams["size"]) => keyof ThemeFontSizeContract;
@@ -0,0 +1,12 @@
1
+ import { ThemeContract } from '@/interfaces';
2
+ import { StatusStyleParams } from '@components/data-display/status/Status.props.ts';
3
+ /**
4
+ * Get status size styles based on the theme, size and icon-only state
5
+ * @param theme - Theme object
6
+ * @param size - Status size
7
+ * @param isIconOnly - Whether the status has only an icon (no label)
8
+ */
9
+ export declare const getStatusSizeStyles: (theme: ThemeContract, size: StatusStyleParams["size"], isIconOnly: StatusStyleParams["isIconOnly"]) => {
10
+ padding: string;
11
+ fontSize: string;
12
+ };
package/dist/index.d.ts CHANGED
@@ -54,12 +54,12 @@ type TextVariantStyle = {
54
54
  lineHeight: number;
55
55
  };
56
56
 
57
- /** Chip variant options */
58
- type ChipVariant = 'filled' | 'outlined';
59
- /** Chip color options */
60
- type ChipColor = 'default' | 'success' | 'warning' | 'error' | 'info';
61
- /** Chip size options */
62
- type ChipSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
57
+ /** Status variant options */
58
+ type StatusVariant = 'filled' | 'outlined';
59
+ /** Status color options */
60
+ type StatusColor = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'highlight' | 'accent' | 'new' | 'rose' | 'yellow';
61
+ /** Status size options */
62
+ type StatusSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
63
63
 
64
64
  /** Avatar size variants */
65
65
  type AvatarSize = 'small' | 'medium' | 'large';
@@ -133,6 +133,14 @@ interface ThemeColorContract {
133
133
  highlightSubtle: string;
134
134
  accent: string;
135
135
  accentSubtle: string;
136
+ default: string;
137
+ defaultSubtle: string;
138
+ new: string;
139
+ newSubtle: string;
140
+ rose: string;
141
+ roseSubtle: string;
142
+ yellow: string;
143
+ yellowSubtle: string;
136
144
  link: string;
137
145
  linkHover: string;
138
146
  linkActive: string;
@@ -408,17 +416,17 @@ type TextProps = PropsWithChildren<{
408
416
  */
409
417
  declare const Text: FC<TextProps>;
410
418
 
411
- type ChipProps = {
419
+ type StatusProps = {
412
420
  /** Text label to display */
413
421
  label?: string;
414
422
  /** Icon to display before the label */
415
423
  icon?: ReactNode;
416
- /** Chip variant style */
417
- variant?: ChipVariant;
418
- /** Chip color from theme */
419
- color?: ChipColor;
420
- /** Chip size */
421
- size?: ChipSize;
424
+ /** Status variant style */
425
+ variant?: StatusVariant;
426
+ /** Status color from theme */
427
+ color?: StatusColor;
428
+ /** Status size */
429
+ size?: StatusSize;
422
430
  /** Gap between icon and text (theme spacing key) */
423
431
  gap?: keyof ThemeContract['spacing'];
424
432
  /** Border radius from theme */
@@ -427,9 +435,9 @@ type ChipProps = {
427
435
  disabled?: boolean;
428
436
  /** Accessibility label for screen readers */
429
437
  ariaLabel?: string;
430
- /** ID of element that labels this chip */
438
+ /** ID of element that labels this status */
431
439
  ariaLabelledBy?: string;
432
- /** ID of element that describes this chip */
440
+ /** ID of element that describes this status */
433
441
  ariaDescribedBy?: string;
434
442
  /** ARIA role */
435
443
  role?: string;
@@ -438,18 +446,18 @@ type ChipProps = {
438
446
  };
439
447
 
440
448
  /**
441
- * Chip component
449
+ * Status component
442
450
  *
443
- * A compact element for displaying information, tags, or actions.
451
+ * A compact element for displaying status, tags, or information.
444
452
  *
445
453
  * **Variants:**
446
454
  * - `filled`: Solid background (default)
447
455
  * - `outlined`: Border only
448
456
  *
449
457
  * **Colors:**
450
- * - `default`, `primary`, `success`, `warning`, `error`, `info`
458
+ * - `default`, `primary`, `success`, `warning`, `error`, `info`, `highlight`, `accent`, `new`, `rose`, `yellow`
451
459
  */
452
- declare const Chip: FC<ChipProps>;
460
+ declare const Status: FC<StatusProps>;
453
461
 
454
462
  type AvatarProps = {
455
463
  /** Image source URL */
@@ -1120,7 +1128,7 @@ type DrawerItemProps = {
1120
1128
  /** Disabled state */
1121
1129
  disabled?: boolean;
1122
1130
  /** Optional chip to display */
1123
- chip?: Omit<ChipProps, 'size' | 'disabled'>;
1131
+ chip?: Omit<StatusProps, 'size' | 'disabled'>;
1124
1132
  /** Accessibility label for screen readers */
1125
1133
  ariaLabel?: string;
1126
1134
  /** ID of element that labels this item */
@@ -1463,5 +1471,5 @@ declare module '@aurora-ds/theme' {
1463
1471
  */
1464
1472
  declare const defaultTheme: Theme;
1465
1473
 
1466
- export { Accordion, Alert, AlertProvider, Avatar, AvatarGroup, Breadcrumb, BreadcrumbEllipsis, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Chip, _default as DatePicker, DrawerItem, _default$3 as Form, Grid, Icon, IconButton, _default$2 as Input, Menu, MenuGroup, MenuItem, Modal, Page, PageSection, Pagination, Select, Separator, Skeleton, Stack, TabItem, Tabs, Text, _default$1 as TextArea, defaultTheme, useAlert, useAnchorPosition, useClickOutside, useTransitionRender };
1467
- export type { AccordionProps, AlertContextValue, AlertPosition, AlertProps, AlertProviderProps, AlertVariant, AnchorOrigin, AnchorPosition, AvatarGroupProps, AvatarProps, BreadcrumbEllipsisProps, BreadcrumbLinkProps, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparatorProps, ButtonProps, ButtonVariantStyle, ButtonVariants, CardProps, ChipColor, ChipProps, ChipSize, ChipVariant, DateFormat, DatePickerProps, DrawerItemProps, FormProps, GridProps, IconButtonProps, IconProps, InputProps, MenuGroupProps, MenuItemProps, MenuProps, ModalProps, PageProps, PageSectionProps, PaginationProps, SelectOption, SelectProps, SeparatorProps, ShowAlertOptions, SkeletonProps, StackProps, TabItemProps, TabsProps, TextAreaProps, TextProps, TextVariantStyle, TextVariants, Theme, ThemeBreakpointsContract, ThemeColorContract, ThemeContract, ThemeFontSizeContract, ThemeFontWeightContract, ThemeLineHeightContract, ThemeOpacityContract, ThemeRadiusContract, ThemeShadowsContract, ThemeSpacingContract, ThemeTransitionContract, ThemeZIndexContract, UseTransitionRenderReturnType };
1474
+ export { Accordion, Alert, AlertProvider, Avatar, AvatarGroup, Breadcrumb, BreadcrumbEllipsis, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, Button, Card, _default as DatePicker, DrawerItem, _default$3 as Form, Grid, Icon, IconButton, _default$2 as Input, Menu, MenuGroup, MenuItem, Modal, Page, PageSection, Pagination, Select, Separator, Skeleton, Stack, Status, TabItem, Tabs, Text, _default$1 as TextArea, defaultTheme, useAlert, useAnchorPosition, useClickOutside, useTransitionRender };
1475
+ export type { AccordionProps, AlertContextValue, AlertPosition, AlertProps, AlertProviderProps, AlertVariant, AnchorOrigin, AnchorPosition, AvatarGroupProps, AvatarProps, BreadcrumbEllipsisProps, BreadcrumbLinkProps, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparatorProps, ButtonProps, ButtonVariantStyle, ButtonVariants, CardProps, DateFormat, DatePickerProps, DrawerItemProps, FormProps, GridProps, IconButtonProps, IconProps, InputProps, MenuGroupProps, MenuItemProps, MenuProps, ModalProps, PageProps, PageSectionProps, PaginationProps, SelectOption, SelectProps, SeparatorProps, ShowAlertOptions, SkeletonProps, StackProps, StatusColor, StatusProps, StatusSize, StatusVariant, TabItemProps, TabsProps, TextAreaProps, TextProps, TextVariantStyle, TextVariants, Theme, ThemeBreakpointsContract, ThemeColorContract, ThemeContract, ThemeFontSizeContract, ThemeFontWeightContract, ThemeLineHeightContract, ThemeOpacityContract, ThemeRadiusContract, ThemeShadowsContract, ThemeSpacingContract, ThemeTransitionContract, ThemeZIndexContract, UseTransitionRenderReturnType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurora-ds/components",
3
- "version": "0.20.0",
3
+ "version": "0.21.1",
4
4
  "type": "module",
5
5
  "description": "Aurora DS - React Components Library",
6
6
  "main": "dist/cjs/index.js",