@common-origin/design-system 2.15.0 → 2.16.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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/client.esm.js +830 -549
  3. package/dist/client.esm.js.map +1 -1
  4. package/dist/client.js +833 -548
  5. package/dist/client.js.map +1 -1
  6. package/dist/components/atoms/Button/Button.d.ts +13 -1
  7. package/dist/components/atoms/CategoryBadge/CategoryBadge.d.ts +12 -52
  8. package/dist/components/atoms/CategoryBadge/index.d.ts +1 -1
  9. package/dist/components/atoms/CategoryLabel/CategoryLabel.d.ts +69 -0
  10. package/dist/components/atoms/CategoryLabel/index.d.ts +2 -0
  11. package/dist/components/atoms/Chip/BooleanChip.d.ts +6 -1
  12. package/dist/components/atoms/Chip/Chip.d.ts +17 -12
  13. package/dist/components/atoms/Chip/FilterChip.d.ts +10 -24
  14. package/dist/components/atoms/Chip/InputChip.d.ts +27 -0
  15. package/dist/components/atoms/Chip/index.d.ts +1 -0
  16. package/dist/components/atoms/Chip/shared/types.d.ts +15 -1
  17. package/dist/components/atoms/Chip/shared/utils.d.ts +1 -85
  18. package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +9 -55
  19. package/dist/components/atoms/StatusBadge/index.d.ts +1 -1
  20. package/dist/components/atoms/StatusLabel/StatusLabel.d.ts +17 -0
  21. package/dist/components/atoms/StatusLabel/StatusLabelBase.d.ts +49 -0
  22. package/dist/components/atoms/StatusLabel/index.d.ts +2 -0
  23. package/dist/components/atoms/Tag/Tag.d.ts +5 -0
  24. package/dist/components/atoms/index.d.ts +2 -0
  25. package/dist/components/molecules/Alert/Alert.d.ts +15 -2
  26. package/dist/components/molecules/InlineAlert/InlineAlert.d.ts +54 -0
  27. package/dist/components/molecules/InlineAlert/index.d.ts +2 -0
  28. package/dist/components/molecules/Modal/Modal.d.ts +6 -2
  29. package/dist/components/molecules/TabBar/TabBar.d.ts +8 -5
  30. package/dist/components/molecules/index.d.ts +1 -0
  31. package/dist/data.esm.js +89 -11
  32. package/dist/data.esm.js.map +1 -1
  33. package/dist/data.js +89 -11
  34. package/dist/data.js.map +1 -1
  35. package/dist/index.esm.js +1 -1
  36. package/dist/index.js +4 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/styles/tokens.json +89 -11
  39. package/dist/tokens/index.esm.js +89 -11
  40. package/dist/tokens/index.esm.js.map +1 -1
  41. package/dist/tokens/index.js +89 -11
  42. package/dist/tokens/index.js.map +1 -1
  43. package/dist/tokens/types/tokens.d.ts +81 -3
  44. package/dist/tokens.css +769 -0
  45. package/dist/tokens.css.d.ts +4 -0
  46. package/dist/types/tokens.d.ts +81 -3
  47. package/package.json +18 -6
@@ -1,7 +1,19 @@
1
1
  import React from 'react';
2
2
  import { type IconName } from '../Icon';
3
+ /**
4
+ * Button variants. `accent` is the blue call to action one level above `primary`;
5
+ * use at most one per view (decision 0016).
6
+ */
7
+ export type ButtonVariant = 'primary' | 'secondary' | 'naked' | 'accent'
8
+ /** @deprecated Use `accent`. `emphasis` will be removed in 3.0. */
9
+ | 'emphasis' | 'danger';
3
10
  export interface BaseButtonProps {
4
- variant?: 'primary' | 'secondary' | 'naked' | 'emphasis' | 'danger';
11
+ /**
12
+ * Visual style. `accent` is the blue call to action above `primary` (at most one per view).
13
+ * `emphasis` is a deprecated alias for `accent` and will be removed in 3.0.
14
+ * @default 'primary'
15
+ */
16
+ variant?: ButtonVariant;
5
17
  size?: 'small' | 'medium' | 'large';
6
18
  url?: string;
7
19
  purpose?: 'button' | 'link';
@@ -1,69 +1,29 @@
1
- import { ReactNode } from 'react';
2
- import type { IconName } from '../../../types/icons';
3
- /**
4
- * Category color options for CategoryBadge
5
- */
6
- export type CategoryColor = 'blue' | 'purple' | 'pink' | 'yellow' | 'green' | 'red' | 'orange' | 'gray';
7
- /**
8
- * Visual variant options for CategoryBadge
9
- */
10
- export type CategoryVariant = 'filled' | 'outlined' | 'minimal';
1
+ import React from 'react';
2
+ import { type CategoryLabelProps } from '../CategoryLabel/CategoryLabel';
3
+ export type { CategoryColor, CategoryVariant } from '../CategoryLabel/CategoryLabel';
11
4
  /**
12
5
  * Size options for CategoryBadge
6
+ * @deprecated Use `CategoryLabelSize`: CategoryBadge `small` is CategoryLabel `medium`, and
7
+ * `medium` is `large` (decision 0018).
13
8
  */
14
9
  export type CategorySize = 'small' | 'medium';
15
10
  /**
16
11
  * Props for the CategoryBadge component
12
+ * @deprecated Use `CategoryLabelProps`. CategoryBadge is renamed CategoryLabel and is removed in
13
+ * 3.0 (decision 0018).
17
14
  */
18
- export interface CategoryBadgeProps {
19
- /**
20
- * The category text to display
21
- */
22
- children: ReactNode;
23
- /**
24
- * Color scheme for the badge
25
- * @default 'blue'
26
- */
27
- color?: CategoryColor;
28
- /**
29
- * Visual variant of the badge
30
- * @default 'filled'
31
- */
32
- variant?: CategoryVariant;
15
+ export interface CategoryBadgeProps extends Omit<CategoryLabelProps, 'size'> {
33
16
  /**
34
17
  * Size of the badge
35
18
  * @default 'medium'
36
19
  */
37
20
  size?: CategorySize;
38
- /**
39
- * Optional icon name to display
40
- */
41
- icon?: IconName;
42
- /**
43
- * Test identifier for automated testing
44
- */
45
- 'data-testid'?: string;
46
- /**
47
- * Accessible label for the badge
48
- */
49
- 'aria-label'?: string;
50
21
  }
51
22
  /**
52
- * CategoryBadge component for displaying transaction categories
53
- *
54
- * A static label for categorizing content with support for 8 color options,
55
- * 3 visual variants, and optional icons. Perfect for categorizing
56
- * financial transactions or content types.
57
- *
58
- * @example
59
- * ```tsx
60
- * <CategoryBadge color="orange" icon="restaurant">
61
- * Food & Dining
62
- * </CategoryBadge>
23
+ * CategoryBadge displays a category label.
63
24
  *
64
- * <CategoryBadge color="blue" variant="outlined" size="small">
65
- * Travel
66
- * </CategoryBadge>
67
- * ```
25
+ * @deprecated Renamed to `CategoryLabel` (same `color` and `variant`). Map `size="small"` to
26
+ * `"medium"`, and `size="medium"` (or no size) to `"large"`, CategoryLabel's default.
27
+ * CategoryBadge is removed in 3.0 (decision 0018).
68
28
  */
69
29
  export declare const CategoryBadge: React.FC<CategoryBadgeProps>;
@@ -1,2 +1,2 @@
1
1
  export { CategoryBadge } from './CategoryBadge';
2
- export type { CategoryBadgeProps, CategoryColor, CategoryVariant, CategorySize } from './CategoryBadge';
2
+ export type { CategoryBadgeProps, CategorySize } from './CategoryBadge';
@@ -0,0 +1,69 @@
1
+ import { ReactNode } from 'react';
2
+ import type { IconName } from '../../../types/icons';
3
+ /**
4
+ * Category color options for CategoryLabel
5
+ */
6
+ export type CategoryColor = 'blue' | 'purple' | 'pink' | 'yellow' | 'green' | 'red' | 'orange' | 'gray';
7
+ /**
8
+ * Visual variant options for CategoryLabel
9
+ */
10
+ export type CategoryVariant = 'filled' | 'outlined' | 'minimal';
11
+ /**
12
+ * Size options for CategoryLabel: medium (24px) or large (32px), on the decision 0018 scale
13
+ */
14
+ export type CategoryLabelSize = 'medium' | 'large';
15
+ /**
16
+ * Props for the CategoryLabel component
17
+ */
18
+ export interface CategoryLabelProps {
19
+ /**
20
+ * The category text to display
21
+ */
22
+ children: ReactNode;
23
+ /**
24
+ * Color scheme for the label
25
+ * @default 'blue'
26
+ */
27
+ color?: CategoryColor;
28
+ /**
29
+ * Visual variant of the label
30
+ * @default 'filled'
31
+ */
32
+ variant?: CategoryVariant;
33
+ /**
34
+ * Size: medium (24px) or large (32px)
35
+ * @default 'large'
36
+ */
37
+ size?: CategoryLabelSize;
38
+ /**
39
+ * Optional icon name to display
40
+ */
41
+ icon?: IconName;
42
+ /**
43
+ * Test identifier for automated testing
44
+ */
45
+ 'data-testid'?: string;
46
+ /**
47
+ * Accessible label, announced instead of the visible text (for example "Category: Food & Dining").
48
+ * Rendered as visually hidden text, because a plain label has no role that can be named (#78).
49
+ */
50
+ 'aria-label'?: string;
51
+ }
52
+ /**
53
+ * CategoryLabel colour-codes an item's category, such as a transaction's (decision 0018).
54
+ *
55
+ * A static, chip-like label with 8 category colours, 3 visual variants and an optional icon.
56
+ * Category colours carry no status meaning; for status use StatusLabel.
57
+ *
58
+ * @example
59
+ * ```tsx
60
+ * <CategoryLabel color="orange" icon="creditCard">
61
+ * Shopping
62
+ * </CategoryLabel>
63
+ *
64
+ * <CategoryLabel color="blue" variant="outlined" size="medium">
65
+ * Travel
66
+ * </CategoryLabel>
67
+ * ```
68
+ */
69
+ export declare const CategoryLabel: React.FC<CategoryLabelProps>;
@@ -0,0 +1,2 @@
1
+ export { CategoryLabel } from './CategoryLabel';
2
+ export type { CategoryLabelProps, CategoryColor, CategoryVariant, CategoryLabelSize } from './CategoryLabel';
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseChipProps } from './shared/types';
3
+ /** @deprecated Becomes `FilterChipProps` in 3.0 (decision 0016). */
3
4
  export interface BooleanChipProps extends BaseChipProps {
4
5
  /** Whether the chip is in selected state */
5
6
  selected: boolean;
@@ -18,6 +19,10 @@ export interface BooleanChipProps extends BaseChipProps {
18
19
  * - Entire chip is clickable to toggle
19
20
  * - Keyboard activation with Space or Enter
20
21
  * - Uses checkbox role with aria-checked
21
- * - Visual background change when selected
22
+ * - Light-blue fill and blue text when selected and enabled; disabled colours when disabled
23
+ *
24
+ * @deprecated Becomes `FilterChip` in 3.0, with the same props. Keep using `BooleanChip`
25
+ * until you upgrade; in 3.0, replace `FilterChip` with `InputChip` first, then
26
+ * `BooleanChip` with `FilterChip` (decision 0016).
22
27
  */
23
28
  export declare const BooleanChip: React.FC<BooleanChipProps>;
@@ -1,9 +1,17 @@
1
1
  import React from 'react';
2
2
  import { BaseChipProps, ChipVariant, LegacyVariant } from './shared/types';
3
3
  export interface ChipProps extends BaseChipProps {
4
- /** Visual style variant */
4
+ /**
5
+ * Visual style. Only `default` stays in 3.0. `emphasis`, `subtle`, `interactive`, `light`
6
+ * and `dark` are deprecated and will be removed (decision 0016).
7
+ * @default 'default'
8
+ */
5
9
  variant?: ChipVariant | LegacyVariant;
6
- /** Click handler for interactive chips */
10
+ /**
11
+ * Click handler.
12
+ * @deprecated Removed in 3.0: the static Chip is not interactive. For a clickable action use a
13
+ * Button; for a toggle use `BooleanChip` (`FilterChip` in 3.0).
14
+ */
7
15
  onClick?: () => void;
8
16
  /** Custom ARIA role override */
9
17
  role?: string;
@@ -11,18 +19,15 @@ export interface ChipProps extends BaseChipProps {
11
19
  title?: string;
12
20
  }
13
21
  /**
14
- * Chip - Compact element for displaying tags, categories, and labels
22
+ * Chip - a static, non-interactive label for tags, categories and metadata.
15
23
  *
16
- * Use this component for static display chips or simple interactive chips.
17
- * For specialized filtering patterns, use:
18
- * - FilterChip: Dismissible chips for showing applied filters
19
- * - BooleanChip: Toggleable chips for quick filter controls
24
+ * Chips are classified by job (decision 0016):
25
+ * - Chip: a static label (`default` variant only)
26
+ * - InputChip: a removable value, such as an applied filter (formerly `FilterChip`)
27
+ * - BooleanChip: toggles a filter on and off (becomes `FilterChip` in 3.0)
20
28
  *
21
- * Variants:
22
- * - default: Standard gray background
23
- * - emphasis: High-contrast dark background
24
- * - subtle: Light background for secondary info
25
- * - interactive: Blue background with hover states
29
+ * The `emphasis`, `subtle`, `interactive`, `light` and `dark` variants and `onClick` are
30
+ * deprecated and will be removed in 3.0.
26
31
  */
27
32
  export declare const Chip: React.FC<ChipProps>;
28
33
  export interface LegacyChipProps {
@@ -1,27 +1,13 @@
1
- import React from 'react';
2
- import { BaseChipProps } from './shared/types';
3
- export interface FilterChipProps extends BaseChipProps {
4
- /** Whether the filter is in selected/applied state */
5
- selected?: boolean;
6
- /** Callback function when the chip is dismissed via close button or keyboard */
7
- onDismiss?: () => void;
8
- /** Custom ARIA role override */
9
- role?: string;
10
- }
1
+ import { type InputChipProps } from './InputChip';
11
2
  /**
12
- * FilterChip - Chip for displaying filters with selected state and optional dismissal
13
- *
14
- * Use this component to show filters that can be selected/deselected.
15
- * When selected, displays a checkmark and light blue background.
16
- * Optionally dismissible when onDismiss is provided.
3
+ * @deprecated Renamed to `InputChipProps`. In 3.0 `FilterChipProps` becomes the props of the toggle chip.
4
+ */
5
+ export type FilterChipProps = InputChipProps;
6
+ /**
7
+ * FilterChip - a removable chip with an optional selected state.
17
8
  *
18
- * Features:
19
- * - Shows checkmark icon when selected
20
- * - Light blue background when selected
21
- * - Optional close (×) button when onDismiss is provided
22
- * - Keyboard dismissal with Delete or Backspace keys (when dismissible)
23
- * - Non-clickable body (only close button is interactive when present)
24
- * - Uses subtle/interactive background styling based on selected state
25
- * - Announces as "status" to screen readers
9
+ * @deprecated Renamed to `InputChip`; in 3.0 `FilterChip` becomes the toggle chip (today's
10
+ * `BooleanChip`). Replace `FilterChip` with `InputChip` first, then `BooleanChip` with
11
+ * `FilterChip` when you upgrade to 3.0 (decision 0016).
26
12
  */
27
- export declare const FilterChip: React.FC<FilterChipProps>;
13
+ export declare const FilterChip: import("react").FC<InputChipProps>;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { BaseChipProps } from './shared/types';
3
+ export interface InputChipProps extends BaseChipProps {
4
+ /** Whether the filter is in selected/applied state */
5
+ selected?: boolean;
6
+ /** Callback function when the chip is dismissed via close button or keyboard */
7
+ onDismiss?: () => void;
8
+ /** Custom ARIA role override */
9
+ role?: string;
10
+ }
11
+ /**
12
+ * InputChip - A removable value, such as an applied filter, with an optional selected state
13
+ *
14
+ * Use this component to show values the user has entered or applied, such as filters.
15
+ * When selected, displays a checkmark on the light-blue selected treatment (decision 0016).
16
+ * A selected disabled chip uses the disabled colours and keeps its checkmark.
17
+ * Optionally dismissible when onDismiss is provided.
18
+ *
19
+ * Features:
20
+ * - Shows checkmark icon when selected
21
+ * - Light-blue fill and blue text when selected and enabled; disabled colours when disabled
22
+ * - Optional close (×) button when onDismiss is provided
23
+ * - Keyboard dismissal with Delete or Backspace keys (when dismissible)
24
+ * - Non-clickable body (only close button is interactive when present)
25
+ * - Announces as "status" to screen readers
26
+ */
27
+ export declare const InputChip: React.FC<InputChipProps>;
@@ -1,3 +1,4 @@
1
1
  export * from './Chip';
2
+ export * from './InputChip';
2
3
  export * from './FilterChip';
3
4
  export * from './BooleanChip';
@@ -7,7 +7,17 @@ export interface BaseChipProps {
7
7
  'aria-label'?: string;
8
8
  'aria-describedby'?: string;
9
9
  }
10
- export type ChipVariant = 'default' | 'emphasis' | 'subtle' | 'interactive';
10
+ /**
11
+ * Visual variants for the static Chip. Only `default` stays in 3.0 (decision 0016):
12
+ * chips are classified by job, not emphasis.
13
+ */
14
+ export type ChipVariant = 'default'
15
+ /** @deprecated Removed in 3.0. Chips have no emphasis levels; use `default`. */
16
+ | 'emphasis'
17
+ /** @deprecated Removed in 3.0. Use `default`. */
18
+ | 'subtle'
19
+ /** @deprecated Removed in 3.0. For a clickable action use a Button; for a toggle use `BooleanChip` (`FilterChip` in 3.0). */
20
+ | 'interactive';
11
21
  export interface InternalStyledProps {
12
22
  $variant: ChipVariant;
13
23
  $size: BaseChipProps['size'];
@@ -15,4 +25,8 @@ export interface InternalStyledProps {
15
25
  $clickable?: boolean;
16
26
  $selected?: boolean;
17
27
  }
28
+ /**
29
+ * Legacy Chip variants.
30
+ * @deprecated Removed in 3.0. `light` is the same as `default`; `dark` maps to the deprecated `emphasis`. Use `default`.
31
+ */
18
32
  export type LegacyVariant = 'light' | 'dark';
@@ -1,88 +1,4 @@
1
1
  import { ChipVariant, BaseChipProps } from './types';
2
- declare const chip: {
3
- closeButton: {
4
- size: string;
5
- };
6
- default: {
7
- backgroundColor: string;
8
- textColor: string;
9
- borderRadius: string;
10
- padding: string;
11
- font: string;
12
- };
13
- hover: {
14
- backgroundColor: string;
15
- };
16
- active: {
17
- backgroundColor: string;
18
- };
19
- focus: {
20
- outline: string;
21
- outlineOffset: string;
22
- };
23
- disabled: {
24
- backgroundColor: string;
25
- textColor: string;
26
- };
27
- variants: {
28
- emphasis: {
29
- backgroundColor: string;
30
- textColor: string;
31
- hover: {
32
- backgroundColor: string;
33
- };
34
- active: {
35
- backgroundColor: string;
36
- };
37
- disabled: {
38
- backgroundColor: string;
39
- textColor: string;
40
- };
41
- };
42
- subtle: {
43
- backgroundColor: string;
44
- textColor: string;
45
- hover: {
46
- backgroundColor: string;
47
- };
48
- active: {
49
- backgroundColor: string;
50
- };
51
- disabled: {
52
- backgroundColor: string;
53
- textColor: string;
54
- };
55
- };
56
- interactive: {
57
- backgroundColor: string;
58
- textColor: string;
59
- hover: {
60
- backgroundColor: string;
61
- };
62
- active: {
63
- backgroundColor: string;
64
- };
65
- disabled: {
66
- backgroundColor: string;
67
- textColor: string;
68
- };
69
- };
70
- };
71
- sizes: {
72
- small: {
73
- padding: string;
74
- font: string;
75
- };
76
- medium: {
77
- padding: string;
78
- font: string;
79
- };
80
- large: {
81
- padding: string;
82
- font: string;
83
- };
84
- };
85
- };
86
2
  interface StyledChipProps {
87
3
  $variant: ChipVariant;
88
4
  $size: BaseChipProps['size'];
@@ -92,4 +8,4 @@ interface StyledChipProps {
92
8
  }
93
9
  export declare const getVariantStyles: ({ $variant, $selected, $clickable, $disabled }: StyledChipProps) => string;
94
10
  export declare const getSizeStyles: ({ $size }: StyledChipProps) => string;
95
- export { chip as chipTokens };
11
+ export {};
@@ -1,69 +1,23 @@
1
1
  import React from 'react';
2
- /**
3
- * Status type options for StatusBadge
4
- */
5
- export type StatusType = 'pending' | 'completed' | 'failed' | 'cancelled' | 'processing' | 'scheduled';
6
- /**
7
- * Size options for StatusBadge
8
- */
9
- export type StatusSize = 'small' | 'medium';
2
+ import { type StatusLabelProps } from '../StatusLabel/StatusLabelBase';
3
+ export type { StatusType, StatusSize } from '../StatusLabel/StatusLabelBase';
10
4
  /**
11
5
  * Props for the StatusBadge component
6
+ * @deprecated Use `StatusLabelProps`. StatusBadge is renamed StatusLabel and is removed in 3.0
7
+ * (decision 0018).
12
8
  */
13
- export interface StatusBadgeProps {
14
- /**
15
- * The status type to display
16
- */
17
- status: StatusType;
18
- /**
19
- * Optional custom label (defaults to status name)
20
- */
21
- label?: string;
22
- /**
23
- * Size of the badge
24
- * @default 'medium'
25
- */
26
- size?: StatusSize;
9
+ export interface StatusBadgeProps extends StatusLabelProps {
27
10
  /**
28
11
  * Whether to show the icon
29
12
  * @default true
13
+ * @deprecated StatusLabel always shows the icon, so status is never conveyed by colour alone.
30
14
  */
31
15
  showIcon?: boolean;
32
- /**
33
- * Whether status changes should be announced to screen readers
34
- * @default true
35
- */
36
- liveRegion?: boolean;
37
- /**
38
- * Test identifier for automated testing
39
- */
40
- 'data-testid'?: string;
41
- /**
42
- * Accessible label override
43
- */
44
- 'aria-label'?: string;
45
16
  }
46
17
  /**
47
- * StatusBadge component for displaying transaction or task status
48
- *
49
- * Displays status with appropriate color, icon, and supports live updates for screen readers.
50
- * Maps to 6 common status types with semantic color tokens.
51
- *
52
- * @example
53
- * ```tsx
54
- * <StatusBadge status="completed" />
55
- *
56
- * <StatusBadge
57
- * status="pending"
58
- * label="Awaiting approval"
59
- * size="small"
60
- * />
18
+ * StatusBadge displays a transaction or task status.
61
19
  *
62
- * <StatusBadge
63
- * status="failed"
64
- * showIcon={false}
65
- * liveRegion={true}
66
- * />
67
- * ```
20
+ * @deprecated Renamed to `StatusLabel` (same `status`, `size`, `label`, `liveRegion`), which always
21
+ * shows the icon. StatusBadge is removed in 3.0 (decision 0018).
68
22
  */
69
23
  export declare const StatusBadge: React.FC<StatusBadgeProps>;
@@ -1,2 +1,2 @@
1
1
  export { StatusBadge } from './StatusBadge';
2
- export type { StatusBadgeProps, StatusType, StatusSize } from './StatusBadge';
2
+ export type { StatusBadgeProps } from './StatusBadge';
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { type StatusLabelProps } from './StatusLabelBase';
3
+ export type { StatusLabelProps, StatusType, StatusSize } from './StatusLabelBase';
4
+ /**
5
+ * StatusLabel conveys the status of something, such as a transaction or task (decision 0018).
6
+ *
7
+ * Uses only the status colour tokens and always shows an icon with its text, so status is never
8
+ * conveyed by colour alone. Not interactive. Announces changes politely to screen readers.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <StatusLabel status="completed" />
13
+ *
14
+ * <StatusLabel status="pending" label="Awaiting approval" size="small" />
15
+ * ```
16
+ */
17
+ export declare const StatusLabel: React.FC<StatusLabelProps>;
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ /**
3
+ * Status type options for StatusLabel
4
+ */
5
+ export type StatusType = 'pending' | 'completed' | 'failed' | 'cancelled' | 'processing' | 'scheduled';
6
+ /**
7
+ * Size options for StatusLabel
8
+ */
9
+ export type StatusSize = 'small' | 'medium';
10
+ /**
11
+ * Props shared by StatusLabel and the deprecated StatusBadge
12
+ */
13
+ export interface StatusLabelProps {
14
+ /**
15
+ * The status type to display
16
+ */
17
+ status: StatusType;
18
+ /**
19
+ * Optional custom label (defaults to status name)
20
+ */
21
+ label?: string;
22
+ /**
23
+ * Size: small (20px) or medium (24px)
24
+ * @default 'medium'
25
+ */
26
+ size?: StatusSize;
27
+ /**
28
+ * Whether status changes should be announced to screen readers
29
+ * @default true
30
+ */
31
+ liveRegion?: boolean;
32
+ /**
33
+ * Test identifier for automated testing
34
+ */
35
+ 'data-testid'?: string;
36
+ /**
37
+ * Accessible label override. Used as the status's name and announced instead of the visible
38
+ * text and icon (#78).
39
+ */
40
+ 'aria-label'?: string;
41
+ }
42
+ /**
43
+ * Shared implementation of StatusLabel and the deprecated StatusBadge. Internal: not exported
44
+ * from the package. `showIcon` exists only for StatusBadge; StatusLabel always shows the icon
45
+ * (decision 0018).
46
+ */
47
+ export declare const StatusLabelBase: React.FC<StatusLabelProps & {
48
+ showIcon?: boolean;
49
+ }>;
@@ -0,0 +1,2 @@
1
+ export { StatusLabel } from './StatusLabel';
2
+ export type { StatusLabelProps, StatusType, StatusSize } from './StatusLabel';
@@ -14,6 +14,11 @@ export interface TagProps {
14
14
  * @default true
15
15
  */
16
16
  border?: boolean;
17
+ /**
18
+ * Size: small (20px) for dense layouts, or medium (24px). Decision 0018 size scale.
19
+ * @default 'medium'
20
+ */
21
+ size?: 'small' | 'medium';
17
22
  /**
18
23
  * Test identifier for automated testing
19
24
  */
@@ -3,6 +3,7 @@ export * from './Badge';
3
3
  export * from './Box';
4
4
  export * from './Button';
5
5
  export * from './CategoryBadge';
6
+ export * from './CategoryLabel';
6
7
  export * from './Chip';
7
8
  export * from './Container';
8
9
  export * from './Picture';
@@ -14,5 +15,6 @@ export * from './ProgressBar';
14
15
  export * from './Divider';
15
16
  export * from './Stack';
16
17
  export * from './StatusBadge';
18
+ export * from './StatusLabel';
17
19
  export * from './Tag';
18
20
  export * from './Typography';