@common-origin/design-system 2.3.0 → 2.4.2

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.
@@ -40,6 +40,11 @@ export interface BoxProps {
40
40
  borderLeft?: keyof typeof tokens.semantic.color.border;
41
41
  bg?: keyof typeof tokens.semantic.color.background;
42
42
  color?: keyof typeof tokens.semantic.color.text;
43
+ shadow?: keyof typeof tokens.base.shadow;
44
+ cursor?: 'auto' | 'default' | 'pointer' | 'wait' | 'text' | 'move' | 'help' | 'not-allowed';
45
+ transition?: string;
46
+ hoverShadow?: keyof typeof tokens.base.shadow;
47
+ hoverTransform?: string;
43
48
  overflow?: 'visible' | 'hidden' | 'scroll' | 'auto';
44
49
  overflowX?: 'visible' | 'hidden' | 'scroll' | 'auto';
45
50
  overflowY?: 'visible' | 'hidden' | 'scroll' | 'auto';
@@ -47,6 +52,11 @@ export interface BoxProps {
47
52
  children?: React.ReactNode;
48
53
  id?: string;
49
54
  style?: React.CSSProperties;
55
+ onClick?: (event: React.MouseEvent) => void;
56
+ onKeyDown?: (event: React.KeyboardEvent) => void;
57
+ tabIndex?: number;
58
+ role?: string;
59
+ 'aria-label'?: string;
50
60
  'data-testid'?: string;
51
61
  }
52
62
  export declare const Box: React.FC<BoxProps>;
@@ -1,8 +1,6 @@
1
- import React from 'react';
2
1
  import { InternalStyledProps } from './types';
3
- export declare const BaseChipStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
4
- export declare const IconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
5
- export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
2
+ export declare const StyledChip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, InternalStyledProps>> & string;
3
+ export declare const IconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
4
+ export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
6
5
  $disabled?: boolean;
7
6
  }>> & string;
8
- export declare const StyledChipWrapper: React.FC<React.PropsWithChildren<InternalStyledProps & React.HTMLAttributes<HTMLSpanElement>>>;
@@ -36,12 +36,13 @@ declare const chip: {
36
36
  };
37
37
  };
38
38
  };
39
- export declare const getVariantStylesAsObject: (variant: ChipVariant, selected?: boolean) => {
40
- backgroundColor: string;
41
- color: string;
42
- };
43
- export declare const getSizeStylesAsObject: (size: BaseChipProps["size"]) => {
44
- font: string;
45
- padding: string;
46
- };
39
+ interface StyledChipProps {
40
+ $variant: ChipVariant;
41
+ $size: BaseChipProps['size'];
42
+ $disabled?: boolean;
43
+ $clickable?: boolean;
44
+ $selected?: boolean;
45
+ }
46
+ export declare const getVariantStyles: ({ $variant, $selected }: StyledChipProps) => string;
47
+ export declare const getSizeStyles: ({ $size }: StyledChipProps) => string;
47
48
  export { chip as chipTokens };
@@ -3,4 +3,4 @@ export type ContainerProps = {
3
3
  children?: React.ReactNode;
4
4
  'data-testid'?: string;
5
5
  } & React.HTMLAttributes<HTMLDivElement>;
6
- export declare const Container: ({ children, ...props }: ContainerProps) => React.JSX.Element;
6
+ export declare const Container: ({ children, ...props }: ContainerProps) => import("react/jsx-runtime").JSX.Element;
@@ -49,6 +49,6 @@ export interface AlertProps {
49
49
  'data-testid'?: string;
50
50
  }
51
51
  export declare const Alert: {
52
- ({ variant, children, title, dismissible, onDismiss, action, inline, ariaLive, "data-testid": dataTestId, ...props }: AlertProps): React.JSX.Element | null;
52
+ ({ variant, children, title, dismissible, onDismiss, action, inline, ariaLive, "data-testid": dataTestId, ...props }: AlertProps): import("react/jsx-runtime").JSX.Element | null;
53
53
  displayName: string;
54
54
  };
@@ -7,4 +7,4 @@ export type CardLargeProps = {
7
7
  onImageClick?: () => void;
8
8
  imageHref?: string;
9
9
  };
10
- export declare const CardLarge: ({ title, excerpt, subtitle, labels, picture, onImageClick, imageHref, }: CardLargeProps) => import("react").JSX.Element;
10
+ export declare const CardLarge: ({ title, excerpt, subtitle, labels, picture, onImageClick, imageHref, }: CardLargeProps) => import("react/jsx-runtime").JSX.Element;
@@ -24,6 +24,6 @@ export interface ListProps {
24
24
  'data-testid'?: string;
25
25
  }
26
26
  export declare const List: {
27
- ({ children, dividers, spacing, className, "data-testid": dataTestId, ...props }: ListProps): React.JSX.Element;
27
+ ({ children, dividers, spacing, className, "data-testid": dataTestId, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
28
28
  displayName: string;
29
29
  };
@@ -66,8 +66,29 @@ export interface ListItemProps {
66
66
  * Test identifier for automated testing
67
67
  */
68
68
  'data-testid'?: string;
69
+ /**
70
+ * Custom ARIA role (e.g., 'option' for combobox)
71
+ * @default 'listitem'
72
+ */
73
+ role?: string;
74
+ /**
75
+ * ARIA selected state (for role="option")
76
+ */
77
+ 'aria-selected'?: boolean;
78
+ /**
79
+ * Custom ID for ARIA references
80
+ */
81
+ id?: string;
82
+ /**
83
+ * Custom tabIndex for focus management
84
+ */
85
+ tabIndex?: number;
86
+ /**
87
+ * Keyboard event handler
88
+ */
89
+ onKeyDown?: (e: React.KeyboardEvent) => void;
69
90
  }
70
91
  export declare const ListItem: {
71
- ({ primary, secondary, badge, icon, expandable, expanded, onToggle, interactive, onClick, disabled, selected, spacing, children, className, "data-testid": dataTestId, ...props }: ListItemProps): React.JSX.Element;
92
+ ({ primary, secondary, badge, icon, expandable, expanded, onToggle, interactive, onClick, disabled, selected, spacing, children, className, "data-testid": dataTestId, role: customRole, "aria-selected": ariaSelected, id, tabIndex: customTabIndex, onKeyDown: customOnKeyDown, ...props }: ListItemProps): import("react/jsx-runtime").JSX.Element;
72
93
  displayName: string;
73
94
  };
@@ -91,6 +91,6 @@ export interface SheetProps {
91
91
  * ```
92
92
  */
93
93
  export declare const Sheet: {
94
- ({ isOpen, onClose, position, variant, width, height, children, closeOnOverlayClick, closeOnEscape, title, "data-testid": dataTestId, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, }: SheetProps): import("react").JSX.Element | null;
94
+ ({ isOpen, onClose, position, variant, width, height, children, closeOnOverlayClick, closeOnEscape, title, "data-testid": dataTestId, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, }: SheetProps): import("react/jsx-runtime").JSX.Element | null;
95
95
  displayName: string;
96
96
  };
@@ -97,6 +97,6 @@ export interface SliderProps {
97
97
  * ```
98
98
  */
99
99
  export declare const Slider: {
100
- ({ min, max, step, value: controlledValue, defaultValue, rangeValue: controlledRangeValue, defaultRangeValue, onChange, onRangeChange, disabled, label, showValueLabel, formatValue, "data-testid": dataTestId, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, }: SliderProps): import("react").JSX.Element;
100
+ ({ min, max, step, value: controlledValue, defaultValue, rangeValue: controlledRangeValue, defaultRangeValue, onChange, onRangeChange, disabled, label, showValueLabel, formatValue, "data-testid": dataTestId, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, }: SliderProps): import("react/jsx-runtime").JSX.Element;
101
101
  displayName: string;
102
102
  };