@altruist03/ui 0.1.0 → 0.2.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 (207) hide show
  1. package/assets/images/noData.webp +0 -0
  2. package/dist/index.js +15237 -650
  3. package/dist/index.js.map +1 -1
  4. package/dist/noData-XPRHKMFR.webp +0 -0
  5. package/package.json +21 -7
  6. package/src/ThemeProvider/ThemeContext.tsx +75 -0
  7. package/src/ThemeProvider/index.ts +7 -0
  8. package/src/assets/images/noData.webp +0 -0
  9. package/src/assets.d.ts +10 -0
  10. package/src/components/Accordion/Accordion.stories.tsx +64 -0
  11. package/src/components/Accordion/Accordion.tsx +219 -0
  12. package/src/components/Accordion/Accordion.types.ts +16 -0
  13. package/src/components/Avatar/Avatar.stories.tsx +304 -0
  14. package/src/components/Avatar/Avatar.tsx +211 -0
  15. package/src/components/Avatar/Avatar.types.ts +33 -0
  16. package/src/components/Badge/Badge.stories.tsx +143 -0
  17. package/src/components/Badge/Badge.tsx +138 -0
  18. package/src/components/Badge/Badge.types.ts +24 -0
  19. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +114 -0
  20. package/src/components/Breadcrumb/Breadcrumb.tsx +120 -0
  21. package/src/components/Breadcrumb/Breadcrumb.types.ts +22 -0
  22. package/src/components/Button/Button.stories.tsx +457 -0
  23. package/src/components/Button/Button.tsx +202 -0
  24. package/src/components/Button/Button.types.ts +18 -0
  25. package/src/components/Checkbox/Checkbox.stories.tsx +254 -0
  26. package/src/components/Checkbox/Checkbox.tsx +352 -0
  27. package/src/components/Checkbox/Checkbox.types.ts +123 -0
  28. package/src/components/CloseButton/CloseButton.stories.tsx +100 -0
  29. package/src/components/CloseButton/CloseButton.tsx +117 -0
  30. package/src/components/CloseButton/CloseButton.types.ts +15 -0
  31. package/src/components/CollapsibleSearch/CollapsibleSearch.tsx +120 -0
  32. package/src/components/DataTable/DataTable.stories.tsx +233 -0
  33. package/src/components/DataTable/DataTable.tsx +968 -0
  34. package/src/components/DataTable/DataTable.types.ts +49 -0
  35. package/src/components/DatePicker/DatePicker.stories.tsx +341 -0
  36. package/src/components/DatePicker/DatePicker.tsx +669 -0
  37. package/src/components/DatePicker/DatePicker.types.ts +105 -0
  38. package/src/components/DatePicker/DateTimePicker.tsx +35 -0
  39. package/src/components/DateRangePicker/DateRangePicker.tsx +179 -0
  40. package/src/components/DateRangePicker/DateRangePicker.types.ts +34 -0
  41. package/src/components/Drawer/Drawer.stories.tsx +243 -0
  42. package/src/components/Drawer/Drawer.tsx +196 -0
  43. package/src/components/Drawer/Drawer.types.ts +60 -0
  44. package/src/components/FileUpload/FileUpload.stories.tsx +162 -0
  45. package/src/components/FileUpload/FileUpload.tsx +216 -0
  46. package/src/components/FileUpload/FileUpload.types.ts +80 -0
  47. package/src/components/FilterPopover/FilterPopover.stories.tsx +173 -0
  48. package/src/components/FilterPopover/FilterPopover.tsx +310 -0
  49. package/src/components/FilterPopover/FilterPopover.types.ts +26 -0
  50. package/src/components/ImageViewer/ImageViewerToolbar.jsx +81 -0
  51. package/src/components/ImageViewer/useImagePanRotate.js +102 -0
  52. package/src/components/IpWhitelistField/IpWhitelistField.stories.tsx +138 -0
  53. package/src/components/IpWhitelistField/IpWhitelistField.tsx +164 -0
  54. package/src/components/IpWhitelistField/IpWhitelistField.types.ts +42 -0
  55. package/src/components/Loader/Loader.stories.tsx +95 -0
  56. package/src/components/Loader/Loader.tsx +132 -0
  57. package/src/components/Loader/Loader.types.ts +6 -0
  58. package/src/components/Menu/Menu.tsx +143 -0
  59. package/src/components/Menu/Menu.types.ts +28 -0
  60. package/src/components/MenuButton/MenuButton.stories.tsx +140 -0
  61. package/src/components/MenuButton/MenuButton.tsx +45 -0
  62. package/src/components/MenuButton/MenuButton.types.ts +21 -0
  63. package/src/components/Modal/Modal.stories.tsx +266 -0
  64. package/src/components/Modal/Modal.tsx +399 -0
  65. package/src/components/Modal/index.ts +2 -0
  66. package/src/components/Modal/types.ts +126 -0
  67. package/src/components/Pagination/Pagination.stories.tsx +167 -0
  68. package/src/components/Pagination/Pagination.tsx +266 -0
  69. package/src/components/Pagination/Pagination.types.ts +20 -0
  70. package/src/components/PeriodSelector/PeriodSelector.stories.tsx +50 -0
  71. package/src/components/PeriodSelector/PeriodSelector.tsx +47 -0
  72. package/src/components/PeriodSelector/PeriodSelector.types.ts +10 -0
  73. package/src/components/PhoneField/PhoneField.stories.tsx +141 -0
  74. package/src/components/PhoneField/PhoneField.tsx +284 -0
  75. package/src/components/PhoneField/PhoneField.types.ts +89 -0
  76. package/src/components/PhoneField/countryCodes.ts +236 -0
  77. package/src/components/Progress/Progress.stories.tsx +83 -0
  78. package/src/components/Progress/Progress.tsx +91 -0
  79. package/src/components/Progress/Progress.types.ts +22 -0
  80. package/src/components/RadioButton/RadioButton.stories.tsx +332 -0
  81. package/src/components/RadioButton/RadioButton.tsx +427 -0
  82. package/src/components/RadioButton/RadioButton.types.ts +117 -0
  83. package/src/components/ReportCard/ReportCard.tsx +183 -0
  84. package/src/components/ReportCard/ReportCard.types.ts +17 -0
  85. package/src/components/SectionIcon/SectionIcon.tsx +87 -0
  86. package/src/components/SectionIcon/SectionIcon.types.ts +23 -0
  87. package/src/components/SegmentedInputField/SegmentedInputField.stories.tsx +165 -0
  88. package/src/components/SegmentedInputField/SegmentedInputField.tsx +174 -0
  89. package/src/components/SegmentedInputField/SegmentedInputField.types.ts +51 -0
  90. package/src/components/SelectScroll/SelectScroll.stories.tsx +336 -0
  91. package/src/components/SelectScroll/SelectScroll.tsx +1119 -0
  92. package/src/components/SelectScroll/SelectScroll.types.ts +60 -0
  93. package/src/components/Selector/Selector.stories.tsx +382 -0
  94. package/src/components/Selector/Selector.tsx +1310 -0
  95. package/src/components/Selector/Selector.types.ts +71 -0
  96. package/src/components/Skeleton/Skeleton.stories.tsx +133 -0
  97. package/src/components/Skeleton/Skeleton.tsx +20 -0
  98. package/src/components/Skeleton/Skeleton.types.ts +3 -0
  99. package/src/components/Spinner/Spinner.stories.tsx +84 -0
  100. package/src/components/Spinner/Spinner.tsx +79 -0
  101. package/src/components/Spinner/Spinner.types.ts +8 -0
  102. package/src/components/StatCard/StatCard.stories.tsx +125 -0
  103. package/src/components/StatCard/StatCard.tsx +167 -0
  104. package/src/components/StatCard/StatCard.types.ts +20 -0
  105. package/src/components/StatusBadge/StatusBadge.stories.tsx +179 -0
  106. package/src/components/StatusBadge/StatusBadge.tsx +74 -0
  107. package/src/components/StatusBadge/StatusBadge.types.ts +23 -0
  108. package/src/components/Stepper/Stepper.stories.tsx +85 -0
  109. package/src/components/Stepper/Stepper.tsx +138 -0
  110. package/src/components/Stepper/Stepper.types.ts +16 -0
  111. package/src/components/SubTabs/SubTabs.stories.tsx +128 -0
  112. package/src/components/SubTabs/SubTabs.tsx +279 -0
  113. package/src/components/SubTabs/SubTabs.types.ts +44 -0
  114. package/src/components/SummaryCard/SummaryCard.stories.tsx +100 -0
  115. package/src/components/SummaryCard/SummaryCard.tsx +141 -0
  116. package/src/components/SummaryCard/SummaryCard.types.ts +22 -0
  117. package/src/components/Switch/Switch.stories.tsx +59 -0
  118. package/src/components/Switch/Switch.tsx +217 -0
  119. package/src/components/Switch/Switch.types.ts +22 -0
  120. package/src/components/Tabs/Tabs.stories.tsx +178 -0
  121. package/src/components/Tabs/Tabs.tsx +197 -0
  122. package/src/components/Tabs/Tabs.types.ts +34 -0
  123. package/src/components/TextField/TextField.stories.tsx +249 -0
  124. package/src/components/TextField/TextField.tsx +462 -0
  125. package/src/components/TextField/TextField.types.ts +141 -0
  126. package/src/components/Toast/Toast.stories.tsx +237 -0
  127. package/src/components/Toast/Toast.tsx +246 -0
  128. package/src/components/Toast/Toast.types.ts +31 -0
  129. package/src/components/ToggleButton/ToggleButton.stories.tsx +105 -0
  130. package/src/components/ToggleButton/ToggleButton.tsx +267 -0
  131. package/src/components/ToggleButton/ToggleButton.types.ts +19 -0
  132. package/src/components/UploadDropzone/UploadDropzone.jsx +78 -0
  133. package/src/components/UploadDropzone2/UploadDropzone.stories.tsx +94 -0
  134. package/src/components/UploadDropzone2/UploadDropzone.tsx +222 -0
  135. package/src/components/UploadDropzone2/UploadDropzone.types.ts +54 -0
  136. package/src/components/ViewEditToggle/ViewEditToggle.stories.tsx +40 -0
  137. package/src/components/ViewEditToggle/ViewEditToggle.tsx +239 -0
  138. package/src/components/ViewEditToggle/ViewEditToggle.types.ts +27 -0
  139. package/src/components/index.ts +157 -0
  140. package/src/icons/ReportDollarIcon.tsx +71 -0
  141. package/src/icons/index.ts +27 -0
  142. package/src/index.ts +214 -0
  143. package/src/storybook/preview.tsx +64 -0
  144. package/src/theme/index.ts +4 -0
  145. package/src/theme/types.d.ts +1 -0
  146. package/src/themes/cpc.ts +4 -0
  147. package/src/themes/firebird.ts +4 -0
  148. package/src/tokens/brands/cpc/themes/dark.json +82 -0
  149. package/src/tokens/brands/cpc/themes/light.json +1 -0
  150. package/src/tokens/brands/default/brand.json +20 -0
  151. package/src/tokens/brands/firebird/themes/dark.json +28 -0
  152. package/src/tokens/brands/firebird/themes/light.json +20 -0
  153. package/src/tokens/button.ts +24 -0
  154. package/src/tokens/components/accordion.json +52 -0
  155. package/src/tokens/components/avatar.json +40 -0
  156. package/src/tokens/components/badge.json +41 -0
  157. package/src/tokens/components/breadcrumb.json +13 -0
  158. package/src/tokens/components/button.json +67 -0
  159. package/src/tokens/components/card.json +39 -0
  160. package/src/tokens/components/checkbox.json +64 -0
  161. package/src/tokens/components/closebutton.json +55 -0
  162. package/src/tokens/components/datatable.json +40 -0
  163. package/src/tokens/components/datepicker.json +99 -0
  164. package/src/tokens/components/drawer.json +23 -0
  165. package/src/tokens/components/field.json +29 -0
  166. package/src/tokens/components/fileupload.json +57 -0
  167. package/src/tokens/components/filterpopover.json +29 -0
  168. package/src/tokens/components/input.json +31 -0
  169. package/src/tokens/components/ipwhitelistfield.json +16 -0
  170. package/src/tokens/components/loader.json +15 -0
  171. package/src/tokens/components/menu.json +21 -0
  172. package/src/tokens/components/modal.json +25 -0
  173. package/src/tokens/components/pagination.json +45 -0
  174. package/src/tokens/components/phonefield.json +41 -0
  175. package/src/tokens/components/progress.json +12 -0
  176. package/src/tokens/components/radio.json +87 -0
  177. package/src/tokens/components/reportcard.json +17 -0
  178. package/src/tokens/components/selector.json +87 -0
  179. package/src/tokens/components/selectscroll.json +65 -0
  180. package/src/tokens/components/skeleton.json +6 -0
  181. package/src/tokens/components/stepper.json +38 -0
  182. package/src/tokens/components/subtabs.json +45 -0
  183. package/src/tokens/components/switch.json +55 -0
  184. package/src/tokens/components/tabs.json +38 -0
  185. package/src/tokens/components/textfield.json +59 -0
  186. package/src/tokens/components/togglebutton.json +48 -0
  187. package/src/tokens/components/uploaddropzone.json +61 -0
  188. package/src/tokens/drawer.ts +37 -0
  189. package/src/tokens/foundation/breakpoints.json +10 -0
  190. package/src/tokens/foundation/colors.json +122 -0
  191. package/src/tokens/foundation/opacity.json +16 -0
  192. package/src/tokens/foundation/radius.json +14 -0
  193. package/src/tokens/foundation/size.json +38 -0
  194. package/src/tokens/foundation/spacing.json +19 -0
  195. package/src/tokens/foundation/typography.json +43 -0
  196. package/src/tokens/index.ts +3665 -0
  197. package/src/tokens/modal.ts +42 -0
  198. package/src/tokens/semantic/color.json +148 -0
  199. package/src/tokens/semantic/field.json +28 -0
  200. package/src/tokens/semantic/opacity.json +5 -0
  201. package/src/tokens/semantic/size.json +722 -0
  202. package/src/tokens/semantic/spacing.json +27 -0
  203. package/src/tokens/semantic/typography.json +87 -0
  204. package/src/utils/scrollLock.ts +44 -0
  205. package/dist/index.css +0 -514
  206. package/dist/index.css.map +0 -1
  207. package/dist/index.d.ts +0 -289
@@ -0,0 +1,91 @@
1
+ import { ProgressProps } from "./Progress.types";
2
+ import { useTokens } from "../../ThemeProvider/ThemeContext";
3
+ import { getProgressTokensFromResolved } from "../../tokens";
4
+
5
+ export const Progress = ({
6
+ color,
7
+ className = "",
8
+ variant = "determinate",
9
+ value = 0,
10
+ }: ProgressProps) => {
11
+ const resolvedTokens = useTokens();
12
+ const tokens = getProgressTokensFromResolved(resolvedTokens);
13
+
14
+ const trackColor = tokens.trackBackground;
15
+ const barColor = color ?? tokens.barBackground;
16
+ const height = tokens.height;
17
+ const borderRadius = tokens.borderRadius;
18
+
19
+ const isIndeterminate = variant === "indeterminate";
20
+
21
+ return (
22
+ <div
23
+ className={className}
24
+ style={{
25
+ display: "flex",
26
+ alignItems: "center",
27
+ width: "100%",
28
+ }}
29
+ >
30
+ <style>
31
+ {`
32
+ @keyframes progress-indeterminate-1 {
33
+ 0% { left: -35%; width: 33%; }
34
+ 60% { left: 100%; width: 45%; }
35
+ 100% { left: 100%; width: 45%; }
36
+ }
37
+ @keyframes progress-indeterminate-2 {
38
+ 0% { left: -100%; width: 90%; }
39
+ 60% { left: 107%; width: 10%; }
40
+ 100% { left: 107%; width: 10%; }
41
+ }
42
+ `}
43
+ </style>
44
+ <div
45
+ style={{
46
+ height: height,
47
+ borderRadius: borderRadius,
48
+ width: "100%",
49
+ backgroundColor: trackColor,
50
+ position: "relative",
51
+ overflow: "hidden",
52
+ }}
53
+ >
54
+ {!isIndeterminate ? (
55
+ <div
56
+ style={{
57
+ height: "100%",
58
+ borderRadius: borderRadius,
59
+ backgroundColor: barColor,
60
+ width: `${Math.min(Math.max(value, 0), 100)}%`,
61
+ transition: "width 0.4s ease",
62
+ }}
63
+ />
64
+ ) : (
65
+ <>
66
+ <div
67
+ style={{
68
+ height: "100%",
69
+ borderRadius: borderRadius,
70
+ backgroundColor: barColor,
71
+ position: "absolute",
72
+ animation:
73
+ "progress-indeterminate-1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite",
74
+ }}
75
+ />
76
+ <div
77
+ style={{
78
+ height: "100%",
79
+ borderRadius: borderRadius,
80
+ backgroundColor: barColor,
81
+ position: "absolute",
82
+ animation:
83
+ "progress-indeterminate-2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite",
84
+ }}
85
+ />
86
+ </>
87
+ )}
88
+ </div>
89
+ </div>
90
+ );
91
+ };
@@ -0,0 +1,22 @@
1
+ export type ProgressVariant = "determinate" | "indeterminate";
2
+
3
+ export interface ProgressProps {
4
+ /**
5
+ * The value of the progress bar (0-100).
6
+ * Only used for the 'determinate' variant.
7
+ */
8
+ value?: number;
9
+ /**
10
+ * Custom color for the progress bar.
11
+ */
12
+ color?: string;
13
+ /**
14
+ * The variant of the progress bar.
15
+ * @default "determinate"
16
+ */
17
+ variant?: ProgressVariant;
18
+ /**
19
+ * Additional CSS class name.
20
+ */
21
+ className?: string;
22
+ }
@@ -0,0 +1,332 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { RadioButton, RadioButtonGroup } from "./RadioButton";
3
+
4
+ const meta: Meta<typeof RadioButtonGroup> = {
5
+ title: "Design System/RadioButton",
6
+ component: RadioButtonGroup,
7
+ tags: [],
8
+ decorators: [
9
+ (Story) => (
10
+ <div style={{ padding: "24px", maxWidth: "600px" }}>
11
+ <Story />
12
+ </div>
13
+ ),
14
+ ],
15
+ args: {
16
+ label: "Heading",
17
+ options: [
18
+ { label: "Male", value: "male" },
19
+ { label: "Female", value: "female" },
20
+ ],
21
+ direction: "horizontal",
22
+ size: "md",
23
+ disabled: false,
24
+ } as any,
25
+ argTypes: {
26
+ label: {
27
+ control: { type: "text" },
28
+ description: "The heading/label displayed above the radio button group",
29
+ },
30
+ helperText: {
31
+ control: { type: "text" },
32
+ description: "Helper or error text displayed below the group",
33
+ },
34
+ error: {
35
+ control: { type: "boolean" },
36
+ description: "Shows error state (red border, helper text in error color)",
37
+ },
38
+ direction: {
39
+ control: { type: "radio" },
40
+ options: ["horizontal", "vertical"],
41
+ description: "Layout direction of the radio buttons",
42
+ },
43
+ size: {
44
+ control: { type: "select" },
45
+ options: ["sm", "md", "lg"],
46
+ description: "Size variant: sm, md, or lg",
47
+ },
48
+ disabled: {
49
+ control: { type: "boolean" },
50
+ description: "Disable all radio buttons in the group",
51
+ },
52
+ },
53
+ };
54
+
55
+ export default meta;
56
+
57
+ type Story = StoryObj<typeof RadioButtonGroup>;
58
+
59
+ export const Playground: Story = {
60
+ args: {
61
+ label: "Heading",
62
+ options: [
63
+ { label: "Male", value: "male" },
64
+ { label: "Female", value: "female" },
65
+ ],
66
+ direction: "horizontal",
67
+ size: "md",
68
+ },
69
+ };
70
+
71
+ export const Showcase: Story = {
72
+ render: () => (
73
+ <div style={{ display: "flex", flexDirection: "column", gap: "32px" }}>
74
+ {/* Basic Horizontal Radio Button Group */}
75
+ <div>
76
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
77
+ Basic Radio Buttons (Horizontal)
78
+ </h3>
79
+ <RadioButtonGroup
80
+ label="Heading"
81
+ options={[
82
+ { label: "Male", value: "male" },
83
+ { label: "Female", value: "female" },
84
+ ]}
85
+ direction="horizontal"
86
+ />
87
+ </div>
88
+
89
+ {/* Basic Vertical Radio Button Group */}
90
+ <div>
91
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
92
+ Basic Radio Buttons (Vertical)
93
+ </h3>
94
+ <RadioButtonGroup
95
+ label="Heading"
96
+ options={[
97
+ { label: "Option 1", value: "option1" },
98
+ { label: "Option 2", value: "option2" },
99
+ { label: "Option 3", value: "option3" },
100
+ ]}
101
+ direction="vertical"
102
+ />
103
+ </div>
104
+
105
+ {/* Radio Button Group with Default Selection */}
106
+ <div>
107
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
108
+ With Default Selection
109
+ </h3>
110
+ <RadioButtonGroup
111
+ label="Gender"
112
+ options={[
113
+ { label: "Male", value: "male" },
114
+ { label: "Female", value: "female" },
115
+ { label: "Other", value: "other" },
116
+ ]}
117
+ defaultValue="female"
118
+ direction="horizontal"
119
+ />
120
+ </div>
121
+
122
+ {/* Disabled Radio Button Group */}
123
+ <div>
124
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
125
+ Disabled Radio Buttons
126
+ </h3>
127
+ <RadioButtonGroup
128
+ label="Heading"
129
+ options={[
130
+ { label: "Male", value: "male" },
131
+ { label: "Female", value: "female" },
132
+ ]}
133
+ disabled
134
+ direction="horizontal"
135
+ />
136
+ </div>
137
+
138
+ {/* Radio Button Group with Individual Disabled Options */}
139
+ <div>
140
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
141
+ With Individual Disabled Options
142
+ </h3>
143
+ <RadioButtonGroup
144
+ label="Payment Method"
145
+ options={[
146
+ { label: "Credit Card", value: "credit" },
147
+ { label: "Debit Card", value: "debit", disabled: true },
148
+ { label: "PayPal", value: "paypal" },
149
+ ]}
150
+ direction="horizontal"
151
+ />
152
+ </div>
153
+
154
+ {/* Individual Radio Button Example */}
155
+ <div>
156
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
157
+ Individual Radio Buttons
158
+ </h3>
159
+ <div style={{ display: "flex", gap: "24px" }}>
160
+ <RadioButton label="Selected" value="selected" checked name="individual" />
161
+ <RadioButton label="Unselected" value="unselected" name="individual" />
162
+ </div>
163
+ </div>
164
+
165
+ {/* Individual Radio Button with Description */}
166
+ <div>
167
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
168
+ Individual Radio Buttons with Description
169
+ </h3>
170
+ <div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
171
+ <RadioButton
172
+ label="Premium Plan"
173
+ description="Best for businesses with high traffic and advanced features"
174
+ value="premium"
175
+ checked
176
+ name="plans"
177
+ />
178
+ <RadioButton
179
+ label="Basic Plan"
180
+ description="Perfect for small businesses getting started"
181
+ value="basic"
182
+ name="plans"
183
+ />
184
+ </div>
185
+ </div>
186
+
187
+ {/* Radio Button Group with Descriptions */}
188
+ <div>
189
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
190
+ Radio Button Group with Descriptions
191
+ </h3>
192
+ <RadioButtonGroup
193
+ label="Select a Plan"
194
+ options={[
195
+ {
196
+ label: "Premium Plan",
197
+ value: "premium",
198
+ description: "Best for businesses with high traffic and advanced features",
199
+ },
200
+ {
201
+ label: "Basic Plan",
202
+ value: "basic",
203
+ description: "Perfect for small businesses getting started",
204
+ },
205
+ {
206
+ label: "Enterprise Plan",
207
+ value: "enterprise",
208
+ description: "Custom solutions for large organizations",
209
+ },
210
+ ]}
211
+ direction="vertical"
212
+ />
213
+ </div>
214
+
215
+ {/* Radio Button Group with Descriptions (Horizontal) */}
216
+ <div>
217
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
218
+ Radio Button Group with Descriptions (Horizontal)
219
+ </h3>
220
+ <RadioButtonGroup
221
+ label="Payment Frequency"
222
+ options={[
223
+ {
224
+ label: "Monthly",
225
+ value: "monthly",
226
+ description: "Pay $29/month",
227
+ },
228
+ {
229
+ label: "Yearly",
230
+ value: "yearly",
231
+ description: "Pay $290/year (Save 17%)",
232
+ },
233
+ ]}
234
+ direction="horizontal"
235
+ />
236
+ </div>
237
+
238
+ {/* Without Label */}
239
+ <div>
240
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
241
+ Without Heading Label
242
+ </h3>
243
+ <RadioButtonGroup
244
+ options={[
245
+ { label: "Option A", value: "a" },
246
+ { label: "Option B", value: "b" },
247
+ { label: "Option C", value: "c" },
248
+ ]}
249
+ direction="horizontal"
250
+ />
251
+ </div>
252
+
253
+ {/* Helper Text */}
254
+ <div>
255
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
256
+ With Helper Text
257
+ </h3>
258
+ <RadioButtonGroup
259
+ label="Select your preference"
260
+ helperText="Choose the option that best fits your needs"
261
+ options={[
262
+ { label: "Option A", value: "a" },
263
+ { label: "Option B", value: "b" },
264
+ ]}
265
+ direction="horizontal"
266
+ />
267
+ </div>
268
+
269
+ {/* Error State */}
270
+ <div>
271
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
272
+ Error State
273
+ </h3>
274
+ <RadioButtonGroup
275
+ label="Select your preference"
276
+ helperText="Please select an option to continue"
277
+ error
278
+ options={[
279
+ { label: "Option A", value: "a" },
280
+ { label: "Option B", value: "b" },
281
+ ]}
282
+ direction="horizontal"
283
+ />
284
+ </div>
285
+
286
+ {/* Size variants: sm, md, lg */}
287
+ <div>
288
+ <h3 style={{ fontSize: "18px", fontWeight: "bold", marginBottom: "16px" }}>
289
+ Size Variants (sm, md, lg)
290
+ </h3>
291
+ <div style={{ display: "flex", flexDirection: "column", gap: "24px" }}>
292
+ <div>
293
+ <h4 style={{ fontSize: "14px", fontWeight: 600, marginBottom: "8px" }}>Small (sm)</h4>
294
+ <RadioButtonGroup
295
+ label="Choose one"
296
+ options={[
297
+ { label: "Option 1", value: "1" },
298
+ { label: "Option 2", value: "2" },
299
+ ]}
300
+ size="sm"
301
+ direction="horizontal"
302
+ />
303
+ </div>
304
+ <div>
305
+ <h4 style={{ fontSize: "14px", fontWeight: 600, marginBottom: "8px" }}>Medium (md)</h4>
306
+ <RadioButtonGroup
307
+ label="Choose one"
308
+ options={[
309
+ { label: "Option 1", value: "1" },
310
+ { label: "Option 2", value: "2" },
311
+ ]}
312
+ size="md"
313
+ direction="horizontal"
314
+ />
315
+ </div>
316
+ <div>
317
+ <h4 style={{ fontSize: "14px", fontWeight: 600, marginBottom: "8px" }}>Large (lg)</h4>
318
+ <RadioButtonGroup
319
+ label="Choose one"
320
+ options={[
321
+ { label: "Option 1", value: "1" },
322
+ { label: "Option 2", value: "2" },
323
+ ]}
324
+ size="lg"
325
+ direction="horizontal"
326
+ />
327
+ </div>
328
+ </div>
329
+ </div>
330
+ </div>
331
+ ),
332
+ };