@common-origin/design-system 1.14.0 → 1.15.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.
@@ -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';
@@ -1,3 +1,4 @@
1
+ export * from './Alert';
1
2
  export * from './Breadcrumbs';
2
3
  export * from './CardSmall';
3
4
  export * from './CardLarge';
@@ -6,6 +7,7 @@ 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';