@common-origin/design-system 1.13.0 → 1.15.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.
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ export interface AlertProps {
3
+ /**
4
+ * Visual style variant affecting background, border, and icon colors
5
+ * - error: Critical issues, validation errors (crossCircle icon)
6
+ * - warning: Cautions, potential issues (bell icon)
7
+ * - info: Tips, helper text, neutral information (info icon)
8
+ * - success: Confirmations, successful operations (checkRing icon)
9
+ * @default 'info'
10
+ */
11
+ variant?: 'error' | 'warning' | 'info' | 'success';
12
+ /**
13
+ * Alert message content
14
+ */
15
+ children: React.ReactNode;
16
+ /**
17
+ * Optional title/heading for the alert
18
+ */
19
+ title?: string;
20
+ /**
21
+ * Show close/dismiss button
22
+ * @default false
23
+ */
24
+ dismissible?: boolean;
25
+ /**
26
+ * Callback function when alert is dismissed
27
+ */
28
+ onDismiss?: () => void;
29
+ /**
30
+ * Optional action button or component
31
+ */
32
+ action?: React.ReactNode;
33
+ /**
34
+ * Compact inline variant with reduced padding
35
+ * @default false
36
+ */
37
+ inline?: boolean;
38
+ /**
39
+ * ARIA live region behavior
40
+ * - polite: Non-urgent announcements
41
+ * - assertive: Important, time-sensitive information
42
+ * - off: Not announced
43
+ * @default 'polite'
44
+ */
45
+ ariaLive?: 'polite' | 'assertive' | 'off';
46
+ /**
47
+ * Test identifier for automated testing
48
+ */
49
+ 'data-testid'?: string;
50
+ }
51
+ export declare const Alert: {
52
+ ({ variant, children, title, dismissible, onDismiss, action, inline, ariaLive, "data-testid": dataTestId, ...props }: AlertProps): React.JSX.Element | null;
53
+ displayName: string;
54
+ };
@@ -0,0 +1 @@
1
+ export * from './Alert';
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ export interface ListProps {
3
+ /**
4
+ * ListItem components
5
+ */
6
+ children: React.ReactNode;
7
+ /**
8
+ * Show dividers between items
9
+ * @default true
10
+ */
11
+ dividers?: boolean;
12
+ /**
13
+ * Vertical spacing between items
14
+ * @default 'comfortable'
15
+ */
16
+ spacing?: 'compact' | 'comfortable';
17
+ /**
18
+ * Additional CSS class name
19
+ */
20
+ className?: string;
21
+ /**
22
+ * Test identifier for automated testing
23
+ */
24
+ 'data-testid'?: string;
25
+ }
26
+ export declare const List: {
27
+ ({ children, dividers, spacing, className, "data-testid": dataTestId, ...props }: ListProps): React.JSX.Element;
28
+ displayName: string;
29
+ };
@@ -0,0 +1,73 @@
1
+ import React from 'react';
2
+ export interface ListItemProps {
3
+ /**
4
+ * Main text/content
5
+ */
6
+ primary: React.ReactNode;
7
+ /**
8
+ * Secondary text (smaller, subdued color)
9
+ */
10
+ secondary?: React.ReactNode;
11
+ /**
12
+ * Badge/chip component on the right
13
+ */
14
+ badge?: React.ReactNode;
15
+ /**
16
+ * Left icon or avatar component
17
+ */
18
+ icon?: React.ReactNode;
19
+ /**
20
+ * Can be expanded to show children content
21
+ * @default false
22
+ */
23
+ expandable?: boolean;
24
+ /**
25
+ * Expansion state (controlled)
26
+ * @default false
27
+ */
28
+ expanded?: boolean;
29
+ /**
30
+ * Called when expansion is toggled
31
+ */
32
+ onToggle?: () => void;
33
+ /**
34
+ * Enable hover/click interactive states
35
+ * @default false
36
+ */
37
+ interactive?: boolean;
38
+ /**
39
+ * Click handler for interactive items
40
+ */
41
+ onClick?: () => void;
42
+ /**
43
+ * Disabled state
44
+ * @default false
45
+ */
46
+ disabled?: boolean;
47
+ /**
48
+ * Selected/active state
49
+ * @default false
50
+ */
51
+ selected?: boolean;
52
+ /**
53
+ * Spacing variant from parent List
54
+ * @default 'comfortable'
55
+ */
56
+ spacing?: 'compact' | 'comfortable';
57
+ /**
58
+ * Expanded content (shown when expanded=true)
59
+ */
60
+ children?: React.ReactNode;
61
+ /**
62
+ * Additional CSS class name
63
+ */
64
+ className?: string;
65
+ /**
66
+ * Test identifier for automated testing
67
+ */
68
+ 'data-testid'?: string;
69
+ }
70
+ 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;
72
+ displayName: string;
73
+ };
@@ -0,0 +1,4 @@
1
+ export { List } from './List';
2
+ export type { ListProps } from './List';
3
+ export { ListItem } from './ListItem';
4
+ export type { ListItemProps } from './ListItem';
@@ -0,0 +1,96 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Props for the Sheet component
4
+ */
5
+ export interface SheetProps {
6
+ /**
7
+ * Whether the sheet is open
8
+ */
9
+ isOpen: boolean;
10
+ /**
11
+ * Callback fired when the sheet should close
12
+ */
13
+ onClose: () => void;
14
+ /**
15
+ * Position of the sheet
16
+ * @default 'right'
17
+ */
18
+ position?: 'top' | 'right' | 'bottom' | 'left';
19
+ /**
20
+ * Variant of the sheet
21
+ * - 'sheet': Full height/width edge-to-edge
22
+ * - 'drawer': Floating with rounded corners and margin
23
+ * @default 'sheet'
24
+ */
25
+ variant?: 'sheet' | 'drawer';
26
+ /**
27
+ * Width of the sheet (for left/right positions)
28
+ * @default '400px'
29
+ */
30
+ width?: string;
31
+ /**
32
+ * Height of the sheet (for top/bottom positions)
33
+ * @default '400px'
34
+ */
35
+ height?: string;
36
+ /**
37
+ * Content to display in the sheet
38
+ */
39
+ children?: ReactNode;
40
+ /**
41
+ * Whether clicking the overlay should close the sheet
42
+ * @default true
43
+ */
44
+ closeOnOverlayClick?: boolean;
45
+ /**
46
+ * Whether pressing Escape should close the sheet
47
+ * @default true
48
+ */
49
+ closeOnEscape?: boolean;
50
+ /**
51
+ * Optional title for the sheet (improves accessibility)
52
+ */
53
+ title?: string;
54
+ /**
55
+ * Test identifier for automated testing
56
+ */
57
+ 'data-testid'?: string;
58
+ /**
59
+ * Accessible label for the sheet
60
+ */
61
+ 'aria-label'?: string;
62
+ /**
63
+ * ID of element describing the sheet
64
+ */
65
+ 'aria-describedby'?: string;
66
+ }
67
+ /**
68
+ * Sheet component for side panels and drawers
69
+ *
70
+ * Provides a sliding panel that appears from any edge of the screen.
71
+ * Can be used for navigation menus, filters, forms, or additional content.
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * // Right-positioned sheet (default)
76
+ * <Sheet isOpen={isOpen} onClose={() => setIsOpen(false)}>
77
+ * <h2>Sheet Content</h2>
78
+ * <p>Your content here</p>
79
+ * </Sheet>
80
+ *
81
+ * // Drawer variant from bottom
82
+ * <Sheet
83
+ * isOpen={isOpen}
84
+ * onClose={() => setIsOpen(false)}
85
+ * position="bottom"
86
+ * variant="drawer"
87
+ * height="60vh"
88
+ * >
89
+ * <h2>Mobile Menu</h2>
90
+ * </Sheet>
91
+ * ```
92
+ */
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;
95
+ displayName: string;
96
+ };
@@ -0,0 +1,2 @@
1
+ export { Sheet } from './Sheet';
2
+ export type { SheetProps } from './Sheet';
@@ -1,3 +1,4 @@
1
+ export * from './Alert';
1
2
  export * from './Breadcrumbs';
2
3
  export * from './CardSmall';
3
4
  export * from './CardLarge';
@@ -6,8 +7,10 @@ export * from './ChipGroup';
6
7
  export * from './CodeBlock';
7
8
  export * from './FeatureBlock';
8
9
  export * from './Dropdown';
10
+ export * from './List';
9
11
  export * from './NumberInput';
10
12
  export * from './PageTitle';
11
13
  export * from './PasswordField';
14
+ export * from './Sheet';
12
15
  export * from './Slider';
13
16
  export * from './TextField';