@dynamic-mockups/design-system 0.1.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 (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +396 -0
  3. package/dist/.storybook/ColorTokenSelect.d.ts +14 -0
  4. package/dist/.storybook/colorTokenOptions.d.ts +28 -0
  5. package/dist/.storybook/iconOptions.d.ts +54 -0
  6. package/dist/design-system.css +1 -0
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +87 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/index.mjs +11635 -0
  11. package/dist/index.mjs.map +1 -0
  12. package/dist/src/components/atoms/Accordion/Accordion.d.ts +52 -0
  13. package/dist/src/components/atoms/Accordion/Accordion.stories.d.ts +109 -0
  14. package/dist/src/components/atoms/Accordion/index.d.ts +2 -0
  15. package/dist/src/components/atoms/AlertDialog/AlertDialog.d.ts +66 -0
  16. package/dist/src/components/atoms/AlertDialog/AlertDialog.stories.d.ts +144 -0
  17. package/dist/src/components/atoms/AlertDialog/index.d.ts +2 -0
  18. package/dist/src/components/atoms/Avatar/Avatar.d.ts +54 -0
  19. package/dist/src/components/atoms/Avatar/Avatar.stories.d.ts +119 -0
  20. package/dist/src/components/atoms/Avatar/index.d.ts +2 -0
  21. package/dist/src/components/atoms/Badge/Badge.d.ts +58 -0
  22. package/dist/src/components/atoms/Badge/Badge.stories.d.ts +706 -0
  23. package/dist/src/components/atoms/Badge/index.d.ts +2 -0
  24. package/dist/src/components/atoms/Button/Button.d.ts +63 -0
  25. package/dist/src/components/atoms/Button/Button.stories.d.ts +763 -0
  26. package/dist/src/components/atoms/Button/index.d.ts +2 -0
  27. package/dist/src/components/atoms/Card/Card.d.ts +44 -0
  28. package/dist/src/components/atoms/Card/Card.stories.d.ts +103 -0
  29. package/dist/src/components/atoms/Card/index.d.ts +2 -0
  30. package/dist/src/components/atoms/Checkbox/Checkbox.d.ts +52 -0
  31. package/dist/src/components/atoms/Checkbox/Checkbox.stories.d.ts +168 -0
  32. package/dist/src/components/atoms/Checkbox/index.d.ts +2 -0
  33. package/dist/src/components/atoms/Dialog/Dialog.d.ts +53 -0
  34. package/dist/src/components/atoms/Dialog/Dialog.stories.d.ts +122 -0
  35. package/dist/src/components/atoms/Dialog/index.d.ts +2 -0
  36. package/dist/src/components/atoms/DropdownMenu/DropdownMenu.d.ts +61 -0
  37. package/dist/src/components/atoms/DropdownMenu/DropdownMenu.stories.d.ts +109 -0
  38. package/dist/src/components/atoms/DropdownMenu/index.d.ts +2 -0
  39. package/dist/src/components/atoms/HoverCard/HoverCard.d.ts +38 -0
  40. package/dist/src/components/atoms/HoverCard/HoverCard.stories.d.ts +86 -0
  41. package/dist/src/components/atoms/HoverCard/index.d.ts +2 -0
  42. package/dist/src/components/atoms/Label/Label.d.ts +19 -0
  43. package/dist/src/components/atoms/Label/Label.stories.d.ts +100 -0
  44. package/dist/src/components/atoms/Label/index.d.ts +2 -0
  45. package/dist/src/components/atoms/Popover/Popover.d.ts +44 -0
  46. package/dist/src/components/atoms/Popover/Popover.stories.d.ts +94 -0
  47. package/dist/src/components/atoms/Popover/index.d.ts +2 -0
  48. package/dist/src/components/atoms/Progress/Progress.d.ts +45 -0
  49. package/dist/src/components/atoms/Progress/Progress.stories.d.ts +108 -0
  50. package/dist/src/components/atoms/Progress/index.d.ts +2 -0
  51. package/dist/src/components/atoms/ProgressBar/ProgressBar.d.ts +66 -0
  52. package/dist/src/components/atoms/ProgressBar/ProgressBar.stories.d.ts +439 -0
  53. package/dist/src/components/atoms/ProgressBar/index.d.ts +2 -0
  54. package/dist/src/components/atoms/RadioGroup/RadioGroup.d.ts +46 -0
  55. package/dist/src/components/atoms/RadioGroup/RadioGroup.stories.d.ts +104 -0
  56. package/dist/src/components/atoms/RadioGroup/index.d.ts +2 -0
  57. package/dist/src/components/atoms/ScrollArea/ScrollArea.d.ts +36 -0
  58. package/dist/src/components/atoms/ScrollArea/ScrollArea.stories.d.ts +85 -0
  59. package/dist/src/components/atoms/ScrollArea/index.d.ts +2 -0
  60. package/dist/src/components/atoms/Select/Select.d.ts +55 -0
  61. package/dist/src/components/atoms/Select/Select.stories.d.ts +101 -0
  62. package/dist/src/components/atoms/Select/index.d.ts +2 -0
  63. package/dist/src/components/atoms/Separator/Separator.d.ts +17 -0
  64. package/dist/src/components/atoms/Separator/Separator.stories.d.ts +79 -0
  65. package/dist/src/components/atoms/Separator/index.d.ts +2 -0
  66. package/dist/src/components/atoms/Slider/Slider.d.ts +55 -0
  67. package/dist/src/components/atoms/Slider/Slider.stories.d.ts +115 -0
  68. package/dist/src/components/atoms/Slider/index.d.ts +2 -0
  69. package/dist/src/components/atoms/Stepper/Stepper.d.ts +100 -0
  70. package/dist/src/components/atoms/Stepper/Stepper.stories.d.ts +496 -0
  71. package/dist/src/components/atoms/Stepper/index.d.ts +2 -0
  72. package/dist/src/components/atoms/Switch/Switch.d.ts +49 -0
  73. package/dist/src/components/atoms/Switch/Switch.stories.d.ts +165 -0
  74. package/dist/src/components/atoms/Switch/index.d.ts +2 -0
  75. package/dist/src/components/atoms/Tabs/Tabs.d.ts +35 -0
  76. package/dist/src/components/atoms/Tabs/Tabs.stories.d.ts +83 -0
  77. package/dist/src/components/atoms/Tabs/index.d.ts +2 -0
  78. package/dist/src/components/atoms/Toast/Toast.d.ts +59 -0
  79. package/dist/src/components/atoms/Toast/Toast.stories.d.ts +118 -0
  80. package/dist/src/components/atoms/Toast/index.d.ts +2 -0
  81. package/dist/src/components/atoms/Toggle/Toggle.d.ts +20 -0
  82. package/dist/src/components/atoms/Toggle/Toggle.stories.d.ts +118 -0
  83. package/dist/src/components/atoms/Toggle/index.d.ts +2 -0
  84. package/dist/src/components/atoms/Tooltip/Tooltip.d.ts +32 -0
  85. package/dist/src/components/atoms/Tooltip/Tooltip.stories.d.ts +87 -0
  86. package/dist/src/components/atoms/Tooltip/index.d.ts +2 -0
  87. package/dist/src/components/atoms/index.d.ts +29 -0
  88. package/dist/src/components/index.d.ts +9 -0
  89. package/dist/src/components/molecules/CheckboxChip/CheckboxChip.d.ts +65 -0
  90. package/dist/src/components/molecules/CheckboxChip/CheckboxChip.stories.d.ts +90 -0
  91. package/dist/src/components/molecules/CheckboxChip/CheckboxChipGroup.d.ts +63 -0
  92. package/dist/src/components/molecules/RadioSelector/RadioSelector.d.ts +72 -0
  93. package/dist/src/components/molecules/RadioSelector/RadioSelector.stories.d.ts +118 -0
  94. package/dist/src/components/molecules/index.d.ts +10 -0
  95. package/dist/src/components/organisms/CTABox/CTABox.d.ts +69 -0
  96. package/dist/src/components/organisms/CTABox/CTABox.stories.d.ts +117 -0
  97. package/dist/src/components/organisms/OnboardingInfoBox/OnboardingInfoBox.d.ts +65 -0
  98. package/dist/src/components/organisms/OnboardingInfoBox/OnboardingInfoBox.stories.d.ts +93 -0
  99. package/dist/src/components/organisms/index.d.ts +8 -0
  100. package/dist/src/components/pages/index.d.ts +5 -0
  101. package/dist/src/components/templates/OnboardingTemplate/OnboardingTemplate.d.ts +185 -0
  102. package/dist/src/components/templates/OnboardingTemplate/OnboardingTemplate.stories.d.ts +26 -0
  103. package/dist/src/components/templates/index.d.ts +6 -0
  104. package/dist/src/index.d.ts +21 -0
  105. package/dist/src/tests/storybook/ColorTokenSelect.test.d.ts +4 -0
  106. package/dist/src/theme/ThemeProvider.d.ts +36 -0
  107. package/dist/src/theme/index.d.ts +2 -0
  108. package/dist/src/theme/theme.d.ts +18 -0
  109. package/dist/src/tokens/colorTokens.d.ts +58 -0
  110. package/dist/src/tokens/colorTokens.test.d.ts +4 -0
  111. package/dist/src/tokens/colors.d.ts +168 -0
  112. package/dist/src/tokens/index.d.ts +270 -0
  113. package/dist/src/tokens/radii.d.ts +17 -0
  114. package/dist/src/tokens/shadows.d.ts +16 -0
  115. package/dist/src/tokens/spacing.d.ts +38 -0
  116. package/dist/src/tokens/typography.d.ts +57 -0
  117. package/package.json +104 -0
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Accordion Component
3
+ * An accordion component that extends Radix UI Accordion
4
+ */
5
+ import React from "react";
6
+ import type { AccordionSingleProps, AccordionMultipleProps } from "@radix-ui/react-accordion";
7
+ import { type ColorToken } from "../../../tokens";
8
+ import "./Accordion.scss";
9
+ export type { ColorToken } from "../../../tokens";
10
+ export type AccordionType = "single" | "multiple";
11
+ export interface AccordionItemData {
12
+ value: string;
13
+ trigger: React.ReactNode;
14
+ content: React.ReactNode;
15
+ }
16
+ export interface BaseAccordionProps {
17
+ /**
18
+ * Accordion type - single allows one item open, multiple allows many
19
+ * @default 'single'
20
+ */
21
+ type?: AccordionType;
22
+ /**
23
+ * Array of accordion items
24
+ */
25
+ items: AccordionItemData[];
26
+ /**
27
+ * Default open value(s)
28
+ */
29
+ defaultValue?: string | string[];
30
+ /**
31
+ * Color token for trigger text
32
+ */
33
+ triggerColorToken?: ColorToken;
34
+ /**
35
+ * Color token for content text
36
+ */
37
+ contentColorToken?: ColorToken;
38
+ /**
39
+ * Color token for border
40
+ */
41
+ borderColorToken?: ColorToken;
42
+ /**
43
+ * Color token for background
44
+ */
45
+ backgroundColorToken?: ColorToken;
46
+ /**
47
+ * Custom className
48
+ */
49
+ className?: string;
50
+ }
51
+ export type AccordionProps = BaseAccordionProps & (Omit<AccordionSingleProps, "type" | "children"> | Omit<AccordionMultipleProps, "type" | "children">);
52
+ export declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,109 @@
1
+ import React from "react";
2
+ import type { StoryObj } from "@storybook/react-vite";
3
+ import type { ColorToken } from "./Accordion";
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<import("./Accordion").AccordionProps & React.RefAttributes<HTMLDivElement>>;
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ tags: string[];
11
+ argTypes: {
12
+ type: {
13
+ control: "select";
14
+ options: string[];
15
+ description: string;
16
+ table: {
17
+ category: string;
18
+ };
19
+ };
20
+ items: {
21
+ control: "object";
22
+ description: string;
23
+ table: {
24
+ category: string;
25
+ };
26
+ };
27
+ defaultValue: {
28
+ control: "text";
29
+ description: string;
30
+ table: {
31
+ category: string;
32
+ };
33
+ };
34
+ triggerColorToken: {
35
+ control: "select";
36
+ options: ColorToken[];
37
+ description: string;
38
+ table: {
39
+ category: string;
40
+ };
41
+ };
42
+ contentColorToken: {
43
+ control: "select";
44
+ options: ColorToken[];
45
+ description: string;
46
+ table: {
47
+ category: string;
48
+ };
49
+ };
50
+ borderColorToken: {
51
+ control: "select";
52
+ options: ColorToken[];
53
+ description: string;
54
+ table: {
55
+ category: string;
56
+ };
57
+ };
58
+ backgroundColorToken: {
59
+ control: "select";
60
+ options: ColorToken[];
61
+ description: string;
62
+ table: {
63
+ category: string;
64
+ };
65
+ };
66
+ m: {
67
+ table: {
68
+ disable: boolean;
69
+ };
70
+ };
71
+ mx: {
72
+ table: {
73
+ disable: boolean;
74
+ };
75
+ };
76
+ my: {
77
+ table: {
78
+ disable: boolean;
79
+ };
80
+ };
81
+ mt: {
82
+ table: {
83
+ disable: boolean;
84
+ };
85
+ };
86
+ mr: {
87
+ table: {
88
+ disable: boolean;
89
+ };
90
+ };
91
+ mb: {
92
+ table: {
93
+ disable: boolean;
94
+ };
95
+ };
96
+ ml: {
97
+ table: {
98
+ disable: boolean;
99
+ };
100
+ };
101
+ };
102
+ };
103
+ export default meta;
104
+ type Story = StoryObj<typeof meta>;
105
+ export declare const Single: Story;
106
+ export declare const Multiple: Story;
107
+ export declare const FAQ: Story;
108
+ export declare const RichContent: Story;
109
+ export declare const InteractiveColorPicker: Story;
@@ -0,0 +1,2 @@
1
+ export { Accordion } from "./Accordion";
2
+ export type { AccordionProps, AccordionType, AccordionItemData } from "./Accordion";
@@ -0,0 +1,66 @@
1
+ /**
2
+ * AlertDialog Component
3
+ * An alert dialog component that extends Radix UI AlertDialog
4
+ */
5
+ import React from "react";
6
+ import type { AlertDialogProps as RadixAlertDialogProps } from "@radix-ui/react-alert-dialog";
7
+ import { type ColorToken } from "../../../tokens";
8
+ import "./AlertDialog.scss";
9
+ export type { ColorToken } from "../../../tokens";
10
+ export interface AlertDialogProps extends Omit<RadixAlertDialogProps, "children"> {
11
+ /**
12
+ * Alert dialog trigger element
13
+ */
14
+ trigger?: React.ReactNode;
15
+ /**
16
+ * Alert dialog title
17
+ */
18
+ title: string;
19
+ /**
20
+ * Alert dialog description
21
+ */
22
+ description: string;
23
+ /**
24
+ * Cancel button text
25
+ * @default 'Cancel'
26
+ */
27
+ cancelText?: string;
28
+ /**
29
+ * Action button text
30
+ * @default 'Confirm'
31
+ */
32
+ actionText?: string;
33
+ /**
34
+ * Callback when action button is clicked
35
+ */
36
+ onAction?: () => void;
37
+ /**
38
+ * Callback when cancel button is clicked
39
+ */
40
+ onCancel?: () => void;
41
+ /**
42
+ * Color token for overlay background
43
+ */
44
+ overlayColorToken?: ColorToken;
45
+ /**
46
+ * Color token for dialog background
47
+ */
48
+ backgroundColorToken?: ColorToken;
49
+ /**
50
+ * Color token for title text
51
+ */
52
+ titleColorToken?: ColorToken;
53
+ /**
54
+ * Color token for description text
55
+ */
56
+ descriptionColorToken?: ColorToken;
57
+ /**
58
+ * Color token for action button background
59
+ */
60
+ actionColorToken?: ColorToken;
61
+ /**
62
+ * Custom className
63
+ */
64
+ className?: string;
65
+ }
66
+ export declare const AlertDialog: React.ForwardRefExoticComponent<AlertDialogProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,144 @@
1
+ import React from "react";
2
+ import type { StoryObj } from "@storybook/react-vite";
3
+ import type { ColorToken } from "./AlertDialog";
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<import("./AlertDialog").AlertDialogProps & React.RefAttributes<HTMLDivElement>>;
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ tags: string[];
11
+ argTypes: {
12
+ trigger: {
13
+ control: false;
14
+ description: string;
15
+ table: {
16
+ category: string;
17
+ };
18
+ };
19
+ title: {
20
+ control: "text";
21
+ description: string;
22
+ table: {
23
+ category: string;
24
+ };
25
+ };
26
+ description: {
27
+ control: "text";
28
+ description: string;
29
+ table: {
30
+ category: string;
31
+ };
32
+ };
33
+ cancelText: {
34
+ control: "text";
35
+ description: string;
36
+ table: {
37
+ category: string;
38
+ };
39
+ };
40
+ actionText: {
41
+ control: "text";
42
+ description: string;
43
+ table: {
44
+ category: string;
45
+ };
46
+ };
47
+ onAction: {
48
+ control: false;
49
+ description: string;
50
+ table: {
51
+ category: string;
52
+ };
53
+ };
54
+ onCancel: {
55
+ control: false;
56
+ description: string;
57
+ table: {
58
+ category: string;
59
+ };
60
+ };
61
+ overlayColorToken: {
62
+ control: "select";
63
+ options: ColorToken[];
64
+ description: string;
65
+ table: {
66
+ category: string;
67
+ };
68
+ };
69
+ backgroundColorToken: {
70
+ control: "select";
71
+ options: ColorToken[];
72
+ description: string;
73
+ table: {
74
+ category: string;
75
+ };
76
+ };
77
+ titleColorToken: {
78
+ control: "select";
79
+ options: ColorToken[];
80
+ description: string;
81
+ table: {
82
+ category: string;
83
+ };
84
+ };
85
+ descriptionColorToken: {
86
+ control: "select";
87
+ options: ColorToken[];
88
+ description: string;
89
+ table: {
90
+ category: string;
91
+ };
92
+ };
93
+ actionColorToken: {
94
+ control: "select";
95
+ options: ColorToken[];
96
+ description: string;
97
+ table: {
98
+ category: string;
99
+ };
100
+ };
101
+ m: {
102
+ table: {
103
+ disable: boolean;
104
+ };
105
+ };
106
+ mx: {
107
+ table: {
108
+ disable: boolean;
109
+ };
110
+ };
111
+ my: {
112
+ table: {
113
+ disable: boolean;
114
+ };
115
+ };
116
+ mt: {
117
+ table: {
118
+ disable: boolean;
119
+ };
120
+ };
121
+ mr: {
122
+ table: {
123
+ disable: boolean;
124
+ };
125
+ };
126
+ mb: {
127
+ table: {
128
+ disable: boolean;
129
+ };
130
+ };
131
+ ml: {
132
+ table: {
133
+ disable: boolean;
134
+ };
135
+ };
136
+ };
137
+ };
138
+ export default meta;
139
+ type Story = StoryObj<typeof meta>;
140
+ export declare const Default: Story;
141
+ export declare const CustomText: Story;
142
+ export declare const WithCallback: Story;
143
+ export declare const DangerAction: Story;
144
+ export declare const InteractiveColorPicker: Story;
@@ -0,0 +1,2 @@
1
+ export { AlertDialog } from "./AlertDialog";
2
+ export type { AlertDialogProps } from "./AlertDialog";
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Avatar Component
3
+ * An avatar component that extends Radix UI Avatar
4
+ */
5
+ import React from "react";
6
+ import type { AvatarProps as RadixAvatarProps } from "@radix-ui/themes";
7
+ import { type ColorToken } from "../../../tokens";
8
+ import "./Avatar.scss";
9
+ export type { ColorToken } from "../../../tokens";
10
+ export type AvatarSize = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
11
+ export type AvatarVariant = "solid" | "soft";
12
+ export type AvatarRadius = "none" | "small" | "medium" | "large" | "full";
13
+ export interface AvatarProps extends Omit<RadixAvatarProps, "size" | "variant" | "radius" | "fallback" | "m" | "mx" | "my" | "mt" | "mr" | "mb" | "ml"> {
14
+ /**
15
+ * Avatar size
16
+ * @default '3'
17
+ */
18
+ size?: AvatarSize;
19
+ /**
20
+ * Avatar variant
21
+ * @default 'soft'
22
+ */
23
+ variant?: AvatarVariant;
24
+ /**
25
+ * Border radius preset
26
+ * @default 'full'
27
+ */
28
+ radius?: AvatarRadius;
29
+ /**
30
+ * Image source URL
31
+ */
32
+ src?: string;
33
+ /**
34
+ * Alt text for the image
35
+ */
36
+ alt?: string;
37
+ /**
38
+ * Fallback text (usually initials)
39
+ */
40
+ fallback?: string;
41
+ /**
42
+ * Color token for avatar background
43
+ */
44
+ backgroundColorToken?: ColorToken;
45
+ /**
46
+ * Color token for fallback text
47
+ */
48
+ textColorToken?: ColorToken;
49
+ /**
50
+ * Custom className
51
+ */
52
+ className?: string;
53
+ }
54
+ export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,119 @@
1
+ import React from "react";
2
+ import type { StoryObj } from "@storybook/react-vite";
3
+ import type { ColorToken } from "./Avatar";
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<import("./Avatar").AvatarProps & React.RefAttributes<HTMLSpanElement>>;
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ tags: string[];
11
+ argTypes: {
12
+ size: {
13
+ control: "select";
14
+ options: string[];
15
+ description: string;
16
+ table: {
17
+ category: string;
18
+ };
19
+ };
20
+ variant: {
21
+ control: "select";
22
+ options: string[];
23
+ description: string;
24
+ table: {
25
+ category: string;
26
+ };
27
+ };
28
+ radius: {
29
+ control: "select";
30
+ options: string[];
31
+ description: string;
32
+ table: {
33
+ category: string;
34
+ };
35
+ };
36
+ src: {
37
+ control: "text";
38
+ description: string;
39
+ table: {
40
+ category: string;
41
+ };
42
+ };
43
+ alt: {
44
+ control: "text";
45
+ description: string;
46
+ table: {
47
+ category: string;
48
+ };
49
+ };
50
+ fallback: {
51
+ control: "text";
52
+ description: string;
53
+ table: {
54
+ category: string;
55
+ };
56
+ };
57
+ backgroundColorToken: {
58
+ control: "select";
59
+ options: ColorToken[];
60
+ description: string;
61
+ table: {
62
+ category: string;
63
+ };
64
+ };
65
+ textColorToken: {
66
+ control: "select";
67
+ options: ColorToken[];
68
+ description: string;
69
+ table: {
70
+ category: string;
71
+ };
72
+ };
73
+ m: {
74
+ table: {
75
+ disable: boolean;
76
+ };
77
+ };
78
+ mx: {
79
+ table: {
80
+ disable: boolean;
81
+ };
82
+ };
83
+ my: {
84
+ table: {
85
+ disable: boolean;
86
+ };
87
+ };
88
+ mt: {
89
+ table: {
90
+ disable: boolean;
91
+ };
92
+ };
93
+ mr: {
94
+ table: {
95
+ disable: boolean;
96
+ };
97
+ };
98
+ mb: {
99
+ table: {
100
+ disable: boolean;
101
+ };
102
+ };
103
+ ml: {
104
+ table: {
105
+ disable: boolean;
106
+ };
107
+ };
108
+ };
109
+ };
110
+ export default meta;
111
+ type Story = StoryObj<typeof meta>;
112
+ export declare const WithImage: Story;
113
+ export declare const WithFallback: Story;
114
+ export declare const Sizes: Story;
115
+ export declare const Variants: Story;
116
+ export declare const Radius: Story;
117
+ export declare const WithImages: Story;
118
+ export declare const UserList: Story;
119
+ export declare const InteractiveColorPicker: Story;
@@ -0,0 +1,2 @@
1
+ export { Avatar } from "./Avatar";
2
+ export type { AvatarProps, AvatarSize, AvatarVariant, AvatarRadius } from "./Avatar";
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Badge Component
3
+ * A flexible badge component that extends Radix UI with icon support
4
+ */
5
+ import React from "react";
6
+ import type { BadgeProps as RadixBadgeProps } from "@radix-ui/themes";
7
+ import { type ColorToken } from "../../../tokens";
8
+ import "./Badge.scss";
9
+ export type { ColorToken } from "../../../tokens";
10
+ export type BadgeVariant = "solid" | "soft" | "outline" | "surface";
11
+ export type BadgeSize = "1" | "2" | "3";
12
+ export type BadgeColor = "accent" | "neutral" | "error" | "success" | "warning" | "info" | "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "ruby" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky";
13
+ export interface BadgeProps extends Omit<RadixBadgeProps, "color" | "variant" | "size" | "m" | "mx" | "my" | "mt" | "mr" | "mb" | "ml"> {
14
+ /**
15
+ * Badge variant style
16
+ * @default 'soft'
17
+ */
18
+ variant?: BadgeVariant;
19
+ /**
20
+ * Badge size
21
+ * @default '1'
22
+ */
23
+ size?: BadgeSize;
24
+ /**
25
+ * Badge color - supports custom brand colors and Radix UI colors
26
+ * @default 'accent'
27
+ */
28
+ color?: BadgeColor;
29
+ /**
30
+ * Enable high contrast mode
31
+ * @default false
32
+ */
33
+ highContrast?: boolean;
34
+ /**
35
+ * Color token for the badge background
36
+ * @default undefined (uses color prop)
37
+ */
38
+ backgroundColorToken?: ColorToken;
39
+ /**
40
+ * Color token for the badge text
41
+ * @default undefined (uses variant defaults)
42
+ */
43
+ textColorToken?: ColorToken;
44
+ /**
45
+ * Color token for the badge border (outline variant)
46
+ * @default undefined (uses variant defaults)
47
+ */
48
+ borderColorToken?: ColorToken;
49
+ /**
50
+ * Icon to display before the badge text
51
+ */
52
+ iconStart?: React.ReactNode;
53
+ /**
54
+ * Badge text content
55
+ */
56
+ children?: React.ReactNode;
57
+ }
58
+ export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;