@beydesign/storybook 0.0.1 → 0.0.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.
Files changed (234) hide show
  1. package/README.md +60 -40
  2. package/dist/App.js +161 -5
  3. package/dist/assets/animations/loading-animation.json +1 -0
  4. package/dist/index.d.ts +12 -2
  5. package/dist/index.js +12 -4
  6. package/dist/stories/Agent/AgentCard.d.ts +3 -0
  7. package/dist/stories/Agent/AgentCard.js +102 -0
  8. package/dist/stories/Agent/AgentCard.stories.d.ts +13 -0
  9. package/dist/stories/Agent/AgentCard.stories.js +303 -0
  10. package/dist/stories/Agent/AgentCardSkeleton.d.ts +2 -0
  11. package/dist/stories/Agent/AgentCardSkeleton.js +6 -0
  12. package/dist/stories/Agent/AgentCardSkeleton.stories.d.ts +13 -0
  13. package/dist/stories/Agent/AgentCardSkeleton.stories.js +101 -0
  14. package/dist/stories/Agent/CreateNewCard.d.ts +7 -0
  15. package/dist/stories/Agent/CreateNewCard.js +25 -0
  16. package/dist/stories/Agent/CreateNewCard.stories.d.ts +7 -0
  17. package/dist/stories/Agent/CreateNewCard.stories.js +23 -0
  18. package/dist/stories/Agent/index.d.ts +4 -0
  19. package/dist/stories/Agent/index.js +4 -0
  20. package/dist/stories/Agent/types.d.ts +96 -0
  21. package/dist/stories/Agent/types.js +7 -0
  22. package/dist/stories/Buttons/MainButton.d.ts +3 -0
  23. package/dist/stories/Buttons/MainButton.js +302 -0
  24. package/dist/stories/Buttons/MainButton.stories.d.ts +28 -0
  25. package/dist/stories/Buttons/MainButton.stories.js +299 -0
  26. package/dist/stories/Buttons/ToggleButtonGroup.d.ts +3 -0
  27. package/dist/stories/Buttons/ToggleButtonGroup.js +34 -0
  28. package/dist/stories/Buttons/ToggleButtonGroup.stories.d.ts +9 -0
  29. package/dist/stories/Buttons/ToggleButtonGroup.stories.js +78 -0
  30. package/dist/stories/Buttons/index.d.ts +3 -0
  31. package/dist/stories/Buttons/index.js +3 -0
  32. package/dist/stories/{types/button.d.ts → Buttons/types.d.ts} +37 -14
  33. package/dist/stories/{types/button.js → Buttons/types.js} +12 -2
  34. package/dist/stories/Credits/CreditsCard.d.ts +3 -0
  35. package/dist/stories/Credits/CreditsCard.js +53 -0
  36. package/dist/stories/Credits/CreditsCard.stories.d.ts +7 -0
  37. package/dist/stories/Credits/CreditsCard.stories.js +34 -0
  38. package/dist/stories/Credits/CreditsCardSkeleton.d.ts +3 -0
  39. package/dist/stories/Credits/CreditsCardSkeleton.js +30 -0
  40. package/dist/stories/Credits/CreditsCardSkeleton.stories.d.ts +7 -0
  41. package/dist/stories/Credits/CreditsCardSkeleton.stories.js +40 -0
  42. package/dist/stories/Credits/index.d.ts +3 -0
  43. package/dist/stories/Credits/index.js +3 -0
  44. package/dist/stories/Credits/types.d.ts +57 -0
  45. package/dist/stories/Credits/types.js +11 -0
  46. package/dist/stories/EntityCard/EntityCard.d.ts +3 -0
  47. package/dist/stories/EntityCard/EntityCard.js +22 -0
  48. package/dist/stories/EntityCard/EntityCard.stories.d.ts +10 -0
  49. package/dist/stories/EntityCard/EntityCard.stories.js +187 -0
  50. package/dist/stories/EntityCard/EntityCardSkeleton.d.ts +3 -0
  51. package/dist/stories/EntityCard/EntityCardSkeleton.js +9 -0
  52. package/dist/stories/EntityCard/EntityCardSkeleton.stories.d.ts +10 -0
  53. package/dist/stories/EntityCard/EntityCardSkeleton.stories.js +73 -0
  54. package/dist/stories/EntityCard/index.d.ts +3 -0
  55. package/dist/stories/EntityCard/index.js +3 -0
  56. package/dist/stories/EntityCard/types.d.ts +54 -0
  57. package/dist/stories/EntityCard/types.js +1 -0
  58. package/dist/stories/Form/AutoComplete.d.ts +3 -0
  59. package/dist/stories/Form/AutoComplete.js +163 -0
  60. package/dist/stories/Form/AutoComplete.stories.d.ts +6 -0
  61. package/dist/stories/Form/AutoComplete.stories.js +88 -0
  62. package/dist/stories/Form/Checkbox.d.ts +3 -0
  63. package/dist/stories/Form/Checkbox.js +65 -0
  64. package/dist/stories/Form/Checkbox.stories.d.ts +13 -0
  65. package/dist/stories/Form/Checkbox.stories.js +121 -0
  66. package/dist/stories/Form/Dropdown.d.ts +3 -0
  67. package/dist/stories/Form/Dropdown.js +183 -0
  68. package/dist/stories/Form/Dropdown.stories.d.ts +6 -0
  69. package/dist/stories/Form/Dropdown.stories.js +122 -0
  70. package/dist/stories/Form/FileUpload/FileUpload.d.ts +3 -0
  71. package/dist/stories/Form/FileUpload/FileUpload.js +128 -0
  72. package/dist/stories/Form/FileUpload/FileUpload.stories.d.ts +7 -0
  73. package/dist/stories/Form/FileUpload/FileUpload.stories.js +51 -0
  74. package/dist/stories/Form/FileUpload/FileUploading.d.ts +3 -0
  75. package/dist/stories/Form/FileUpload/FileUploading.js +49 -0
  76. package/dist/stories/Form/FileUpload/FileUploading.stories.d.ts +10 -0
  77. package/dist/stories/Form/FileUpload/FileUploading.stories.js +108 -0
  78. package/dist/stories/Form/FileUpload/UploadedFile.d.ts +3 -0
  79. package/dist/stories/Form/FileUpload/UploadedFile.js +12 -0
  80. package/dist/stories/Form/FileUpload/UploadedFile.stories.d.ts +7 -0
  81. package/dist/stories/Form/FileUpload/UploadedFile.stories.js +73 -0
  82. package/dist/stories/Form/FileUpload/index.d.ts +3 -0
  83. package/dist/stories/Form/FileUpload/index.js +3 -0
  84. package/dist/stories/Form/TextArea.d.ts +3 -0
  85. package/dist/stories/Form/TextArea.js +23 -0
  86. package/dist/stories/Form/TextArea.stories.d.ts +161 -0
  87. package/dist/stories/Form/TextArea.stories.js +142 -0
  88. package/dist/stories/Form/TextInput.d.ts +3 -0
  89. package/dist/stories/Form/TextInput.js +57 -0
  90. package/dist/stories/Form/TextInput.stories.d.ts +155 -0
  91. package/dist/stories/Form/TextInput.stories.js +155 -0
  92. package/dist/stories/Form/Toggle.d.ts +3 -0
  93. package/dist/stories/Form/Toggle.js +57 -0
  94. package/dist/stories/Form/Toggle.stories.d.ts +6 -0
  95. package/dist/stories/Form/Toggle.stories.js +79 -0
  96. package/dist/stories/Form/index.d.ts +8 -0
  97. package/dist/stories/Form/index.js +8 -0
  98. package/dist/stories/Form/types.d.ts +274 -0
  99. package/dist/stories/Form/types.js +46 -0
  100. package/dist/stories/Foundations/Colors.d.ts +2 -0
  101. package/dist/stories/Foundations/Colors.js +266 -0
  102. package/dist/stories/Foundations/Colors.stories.d.ts +6 -0
  103. package/dist/stories/Foundations/Colors.stories.js +15 -0
  104. package/dist/stories/Foundations/index.d.ts +1 -0
  105. package/dist/stories/Foundations/index.js +1 -0
  106. package/dist/stories/Navigation/ComplexHeader.d.ts +3 -0
  107. package/dist/stories/Navigation/ComplexHeader.js +21 -0
  108. package/dist/stories/Navigation/ComplexHeader.stories.d.ts +6 -0
  109. package/dist/stories/Navigation/ComplexHeader.stories.js +82 -0
  110. package/dist/stories/Navigation/Header.d.ts +3 -0
  111. package/dist/stories/Navigation/Header.js +9 -0
  112. package/dist/stories/Navigation/Header.stories.d.ts +7 -0
  113. package/dist/stories/Navigation/Header.stories.js +87 -0
  114. package/dist/stories/Navigation/NavItem.d.ts +3 -0
  115. package/dist/stories/Navigation/NavItem.js +66 -0
  116. package/dist/stories/Navigation/NavItem.stories.d.ts +14 -0
  117. package/dist/stories/Navigation/NavItem.stories.js +100 -0
  118. package/dist/stories/Navigation/ProcessHeader.d.ts +3 -0
  119. package/dist/stories/Navigation/ProcessHeader.js +11 -0
  120. package/dist/stories/Navigation/ProcessHeader.stories.d.ts +6 -0
  121. package/dist/stories/Navigation/ProcessHeader.stories.js +76 -0
  122. package/dist/stories/Navigation/Sidebar.d.ts +3 -0
  123. package/dist/stories/Navigation/Sidebar.js +115 -0
  124. package/dist/stories/Navigation/Sidebar.stories.d.ts +11 -0
  125. package/dist/stories/Navigation/Sidebar.stories.js +174 -0
  126. package/dist/stories/Navigation/index.d.ts +6 -0
  127. package/dist/stories/Navigation/index.js +6 -0
  128. package/dist/stories/Navigation/types.d.ts +186 -0
  129. package/dist/stories/Navigation/types.js +21 -0
  130. package/dist/stories/PlanCard/PlanCard.d.ts +3 -0
  131. package/dist/stories/PlanCard/PlanCard.js +13 -0
  132. package/dist/stories/PlanCard/PlanCard.stories.d.ts +9 -0
  133. package/dist/stories/PlanCard/PlanCard.stories.js +125 -0
  134. package/dist/stories/PlanCard/PlanCardSkeleton.d.ts +3 -0
  135. package/dist/stories/PlanCard/PlanCardSkeleton.js +6 -0
  136. package/dist/stories/PlanCard/PlanCardSkeleton.stories.d.ts +7 -0
  137. package/dist/stories/PlanCard/PlanCardSkeleton.stories.js +40 -0
  138. package/dist/stories/PlanCard/index.d.ts +3 -0
  139. package/dist/stories/PlanCard/index.js +3 -0
  140. package/dist/stories/PlanCard/types.d.ts +61 -0
  141. package/dist/stories/PlanCard/types.js +1 -0
  142. package/dist/stories/StripeProduct/StripeProduct.d.ts +3 -0
  143. package/dist/stories/StripeProduct/StripeProduct.js +24 -0
  144. package/dist/stories/StripeProduct/StripeProduct.stories.d.ts +10 -0
  145. package/dist/stories/StripeProduct/StripeProduct.stories.js +110 -0
  146. package/dist/stories/StripeProduct/StripeProductCardSkeleton.d.ts +3 -0
  147. package/dist/stories/StripeProduct/StripeProductCardSkeleton.js +6 -0
  148. package/dist/stories/StripeProduct/StripeProductCardSkeleton.stories.d.ts +16 -0
  149. package/dist/stories/StripeProduct/StripeProductCardSkeleton.stories.js +137 -0
  150. package/dist/stories/StripeProduct/index.d.ts +3 -0
  151. package/dist/stories/StripeProduct/index.js +3 -0
  152. package/dist/stories/StripeProduct/types.d.ts +56 -0
  153. package/dist/stories/StripeProduct/types.js +1 -0
  154. package/dist/stories/Typography/Typography.d.ts +3 -0
  155. package/dist/stories/Typography/Typography.js +22 -0
  156. package/dist/stories/Typography/Typography.stories.d.ts +25 -0
  157. package/dist/stories/Typography/Typography.stories.js +225 -0
  158. package/dist/stories/Typography/index.d.ts +2 -0
  159. package/dist/stories/Typography/index.js +2 -0
  160. package/dist/stories/Typography/types.d.ts +46 -0
  161. package/dist/stories/Typography/types.js +27 -0
  162. package/dist/stories/UI/Avatar.d.ts +3 -0
  163. package/dist/stories/UI/Avatar.js +76 -0
  164. package/dist/stories/UI/Avatar.stories.d.ts +8 -0
  165. package/dist/stories/UI/Avatar.stories.js +76 -0
  166. package/dist/stories/UI/Badge.d.ts +3 -0
  167. package/dist/stories/UI/Badge.js +118 -0
  168. package/dist/stories/UI/Badge.stories.d.ts +11 -0
  169. package/dist/stories/UI/Badge.stories.js +107 -0
  170. package/dist/stories/UI/CheckIcon.d.ts +3 -0
  171. package/dist/stories/UI/CheckIcon.js +36 -0
  172. package/dist/stories/UI/CheckIcon.stories.d.ts +7 -0
  173. package/dist/stories/UI/CheckIcon.stories.js +48 -0
  174. package/dist/stories/UI/FeatureBanner.d.ts +3 -0
  175. package/dist/stories/UI/FeatureBanner.js +34 -0
  176. package/dist/stories/UI/FeatureBanner.stories.d.ts +9 -0
  177. package/dist/stories/UI/FeatureBanner.stories.js +131 -0
  178. package/dist/stories/UI/HintBubble.d.ts +3 -0
  179. package/dist/stories/UI/HintBubble.js +28 -0
  180. package/dist/stories/UI/HintBubble.stories.d.ts +9 -0
  181. package/dist/stories/UI/HintBubble.stories.js +68 -0
  182. package/dist/stories/UI/Logo.d.ts +3 -0
  183. package/dist/stories/UI/Logo.js +60 -0
  184. package/dist/stories/UI/Logo.stories.d.ts +11 -0
  185. package/dist/stories/UI/Logo.stories.js +65 -0
  186. package/dist/stories/UI/Menu.d.ts +3 -0
  187. package/dist/stories/UI/Menu.js +56 -0
  188. package/dist/stories/UI/Menu.stories.d.ts +7 -0
  189. package/dist/stories/UI/Menu.stories.js +80 -0
  190. package/dist/stories/UI/ProgressIndicator.d.ts +3 -0
  191. package/dist/stories/UI/ProgressIndicator.js +35 -0
  192. package/dist/stories/UI/ProgressIndicator.stories.d.ts +10 -0
  193. package/dist/stories/UI/ProgressIndicator.stories.js +98 -0
  194. package/dist/stories/UI/PromoBanner.d.ts +3 -0
  195. package/dist/stories/UI/PromoBanner.js +34 -0
  196. package/dist/stories/UI/PromoBanner.stories.d.ts +9 -0
  197. package/dist/stories/UI/PromoBanner.stories.js +159 -0
  198. package/dist/stories/UI/SkeletonLoader.d.ts +3 -0
  199. package/dist/stories/UI/SkeletonLoader.js +19 -0
  200. package/dist/stories/UI/SkeletonLoader.stories.d.ts +8 -0
  201. package/dist/stories/UI/SkeletonLoader.stories.js +74 -0
  202. package/dist/stories/UI/Stepper.d.ts +3 -0
  203. package/dist/stories/UI/Stepper.js +67 -0
  204. package/dist/stories/UI/Stepper.stories.d.ts +6 -0
  205. package/dist/stories/UI/Stepper.stories.js +65 -0
  206. package/dist/stories/UI/Topbar.d.ts +3 -0
  207. package/dist/stories/UI/Topbar.js +9 -0
  208. package/dist/stories/UI/Topbar.stories.d.ts +6 -0
  209. package/dist/stories/UI/Topbar.stories.js +71 -0
  210. package/dist/stories/UI/index.d.ts +13 -0
  211. package/dist/stories/UI/index.js +13 -0
  212. package/dist/stories/UI/types.d.ts +398 -0
  213. package/dist/stories/UI/types.js +110 -0
  214. package/dist/utils/common.d.ts +2 -0
  215. package/dist/utils/common.js +20 -0
  216. package/dist/utils/icon.d.ts +6 -0
  217. package/dist/utils/icon.js +6 -0
  218. package/dist/utils/index.d.ts +3 -0
  219. package/dist/utils/index.js +3 -0
  220. package/dist/utils/typography.d.ts +14 -0
  221. package/dist/utils/typography.js +46 -0
  222. package/package.json +48 -42
  223. package/dist/stories/Button.d.ts +0 -4
  224. package/dist/stories/Button.js +0 -258
  225. package/dist/stories/Colors.d.ts +0 -5
  226. package/dist/stories/Colors.js +0 -9
  227. package/dist/stories/Header.d.ts +0 -12
  228. package/dist/stories/Header.js +0 -4
  229. package/dist/stories/Header.stories.d.ts +0 -18
  230. package/dist/stories/Header.stories.js +0 -26
  231. package/dist/stories/Page.d.ts +0 -3
  232. package/dist/stories/Page.js +0 -8
  233. package/dist/stories/Page.stories.d.ts +0 -12
  234. package/dist/stories/Page.stories.js +0 -24
@@ -0,0 +1,225 @@
1
+ import { Typography } from './Typography';
2
+ import { TypographySize, TypographyWeight } from './types';
3
+ const meta = {
4
+ title: 'Design System/Components/Typography/Typography',
5
+ component: Typography,
6
+ parameters: {
7
+ layout: 'centered',
8
+ design: {
9
+ type: 'figspec',
10
+ url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=4312-2152&t=mUqFCoPkymh9swiA-1',
11
+ },
12
+ },
13
+ tags: ['autodocs'],
14
+ argTypes: {
15
+ text: {
16
+ control: 'text',
17
+ description: 'Text content of the typography',
18
+ table: {
19
+ type: { summary: 'string' },
20
+ },
21
+ },
22
+ children: {
23
+ control: 'text',
24
+ description: 'Text content of the typography',
25
+ table: {
26
+ type: { summary: 'string' },
27
+ },
28
+ },
29
+ size: {
30
+ control: 'select',
31
+ options: Object.values(TypographySize),
32
+ description: 'Size of the typography',
33
+ table: {
34
+ type: { summary: 'string' },
35
+ defaultValue: { summary: 'HeadingXL' },
36
+ },
37
+ },
38
+ weight: {
39
+ control: 'select',
40
+ options: Object.values(TypographyWeight),
41
+ description: 'Weight of the typography',
42
+ table: {
43
+ type: { summary: 'string' },
44
+ defaultValue: { summary: 'Bold' },
45
+ },
46
+ },
47
+ color: {
48
+ control: 'color',
49
+ description: 'Color of the typography',
50
+ table: {
51
+ type: { summary: 'string' },
52
+ },
53
+ },
54
+ required: {
55
+ control: 'boolean',
56
+ description: 'Whether the typography is required',
57
+ table: {
58
+ type: { summary: 'boolean' },
59
+ },
60
+ },
61
+ className: {
62
+ control: 'text',
63
+ description: 'Class name of the typography',
64
+ table: {
65
+ type: { summary: 'string' },
66
+ },
67
+ },
68
+ textStyle: {
69
+ control: 'object',
70
+ description: 'Style object of the typography',
71
+ table: {
72
+ type: { summary: 'object' },
73
+ },
74
+ },
75
+ title: {
76
+ control: 'text',
77
+ description: 'Title of the typography',
78
+ table: {
79
+ type: { summary: 'string' },
80
+ },
81
+ },
82
+ },
83
+ };
84
+ export default meta;
85
+ export const HeadingXLBold = {
86
+ args: {
87
+ children: 'Typography',
88
+ size: TypographySize.HeadingXL,
89
+ weight: TypographyWeight.Bold,
90
+ required: true,
91
+ },
92
+ };
93
+ export const HeadingXLSemiBold = {
94
+ args: {
95
+ children: 'Typography',
96
+ size: TypographySize.HeadingXL,
97
+ weight: TypographyWeight.SemiBold,
98
+ },
99
+ };
100
+ export const HeadingXLMedium = {
101
+ args: {
102
+ children: 'Typography',
103
+ size: TypographySize.HeadingXL,
104
+ weight: TypographyWeight.Medium,
105
+ },
106
+ };
107
+ export const HeadingXLRegular = {
108
+ args: {
109
+ children: 'Typography',
110
+ size: TypographySize.HeadingXL,
111
+ weight: TypographyWeight.Regular,
112
+ },
113
+ };
114
+ export const HeadingLBold = {
115
+ args: {
116
+ children: 'Typography',
117
+ size: TypographySize.HeadingL,
118
+ weight: TypographyWeight.Bold,
119
+ },
120
+ };
121
+ export const HeadingLSemiBold = {
122
+ args: {
123
+ children: 'Typography',
124
+ size: TypographySize.HeadingL,
125
+ weight: TypographyWeight.SemiBold,
126
+ },
127
+ };
128
+ export const HeadingLMedium = {
129
+ args: {
130
+ children: 'Typography',
131
+ size: TypographySize.HeadingL,
132
+ weight: TypographyWeight.Medium,
133
+ },
134
+ };
135
+ export const HeadingLRegular = {
136
+ args: {
137
+ children: 'Typography',
138
+ size: TypographySize.HeadingL,
139
+ weight: TypographyWeight.Regular,
140
+ },
141
+ };
142
+ export const HeadingMBold = {
143
+ args: {
144
+ children: 'Typography',
145
+ size: TypographySize.HeadingM,
146
+ weight: TypographyWeight.Bold,
147
+ },
148
+ };
149
+ export const Heading2XSRegular = {
150
+ args: {
151
+ children: 'Typography',
152
+ size: TypographySize.Heading2XS,
153
+ weight: TypographyWeight.Regular,
154
+ },
155
+ };
156
+ export const TextLBold = {
157
+ args: {
158
+ children: 'Typography',
159
+ size: TypographySize.TextL,
160
+ weight: TypographyWeight.Bold,
161
+ },
162
+ };
163
+ export const TextLSemiBold = {
164
+ args: {
165
+ children: 'Typography',
166
+ size: TypographySize.TextL,
167
+ weight: TypographyWeight.SemiBold,
168
+ },
169
+ };
170
+ export const TextLMedium = {
171
+ args: {
172
+ children: 'Typography',
173
+ size: TypographySize.TextL,
174
+ weight: TypographyWeight.Medium,
175
+ },
176
+ };
177
+ export const TextLRegular = {
178
+ args: {
179
+ children: 'Typography',
180
+ size: TypographySize.TextL,
181
+ weight: TypographyWeight.Regular,
182
+ },
183
+ };
184
+ export const TextMBold = {
185
+ args: {
186
+ children: 'Typography',
187
+ size: TypographySize.TextM,
188
+ weight: TypographyWeight.Bold,
189
+ },
190
+ };
191
+ export const TextMSemiBold = {
192
+ args: {
193
+ children: 'Typography',
194
+ size: TypographySize.TextM,
195
+ weight: TypographyWeight.SemiBold,
196
+ },
197
+ };
198
+ export const TextMMedium = {
199
+ args: {
200
+ children: 'Typography',
201
+ size: TypographySize.TextM,
202
+ weight: TypographyWeight.Medium,
203
+ },
204
+ };
205
+ export const TextMRegular = {
206
+ args: {
207
+ children: 'Typography',
208
+ size: TypographySize.TextM,
209
+ weight: TypographyWeight.Regular,
210
+ },
211
+ };
212
+ export const TextSBold = {
213
+ args: {
214
+ children: 'Typography',
215
+ size: TypographySize.TextS,
216
+ weight: TypographyWeight.Bold,
217
+ },
218
+ };
219
+ export const TextSSemiBold = {
220
+ args: {
221
+ children: 'Typography',
222
+ size: TypographySize.TextS,
223
+ weight: TypographyWeight.SemiBold,
224
+ },
225
+ };
@@ -0,0 +1,2 @@
1
+ export * from './Typography';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './Typography';
2
+ export * from './types';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Typography size variants
3
+ */
4
+ export declare enum TypographySize {
5
+ HeadingXL = "HeadingXL",
6
+ HeadingL = "HeadingL",
7
+ HeadingM = "HeadingM",
8
+ HeadingS = "HeadingS",
9
+ HeadingXS = "HeadingXS",
10
+ Heading2XS = "Heading2XS",
11
+ TextL = "TextL",
12
+ TextM = "TextM",
13
+ TextS = "TextS",
14
+ TextXS = "TextXS",
15
+ Text2XS = "Text2XS"
16
+ }
17
+ /**
18
+ * Typography weight variants
19
+ */
20
+ export declare enum TypographyWeight {
21
+ Bold = "Bold",
22
+ SemiBold = "SemiBold",
23
+ Medium = "Medium",
24
+ Regular = "Regular"
25
+ }
26
+ /**
27
+ * Typography component props
28
+ */
29
+ export interface TypographyProps {
30
+ /** Text content of the typography */
31
+ text?: string;
32
+ /** Size variant of the typography */
33
+ size?: TypographySize;
34
+ /** Weight variant of the typography */
35
+ weight?: TypographyWeight;
36
+ /** Color variant of the typography */
37
+ color?: string;
38
+ /** CSS class name for additional styling */
39
+ className?: string;
40
+ /** Style object for the text */
41
+ textStyle?: React.CSSProperties;
42
+ /** Whether the typography is required */
43
+ required?: boolean;
44
+ /** Title for the typography */
45
+ title?: string;
46
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Typography size variants
3
+ */
4
+ export var TypographySize;
5
+ (function (TypographySize) {
6
+ TypographySize["HeadingXL"] = "HeadingXL";
7
+ TypographySize["HeadingL"] = "HeadingL";
8
+ TypographySize["HeadingM"] = "HeadingM";
9
+ TypographySize["HeadingS"] = "HeadingS";
10
+ TypographySize["HeadingXS"] = "HeadingXS";
11
+ TypographySize["Heading2XS"] = "Heading2XS";
12
+ TypographySize["TextL"] = "TextL";
13
+ TypographySize["TextM"] = "TextM";
14
+ TypographySize["TextS"] = "TextS";
15
+ TypographySize["TextXS"] = "TextXS";
16
+ TypographySize["Text2XS"] = "Text2XS";
17
+ })(TypographySize || (TypographySize = {}));
18
+ /**
19
+ * Typography weight variants
20
+ */
21
+ export var TypographyWeight;
22
+ (function (TypographyWeight) {
23
+ TypographyWeight["Bold"] = "Bold";
24
+ TypographyWeight["SemiBold"] = "SemiBold";
25
+ TypographyWeight["Medium"] = "Medium";
26
+ TypographyWeight["Regular"] = "Regular";
27
+ })(TypographyWeight || (TypographyWeight = {}));
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { AvatarProps } from './types';
3
+ export declare const Avatar: React.FC<AvatarProps>;
@@ -0,0 +1,76 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AvatarImage, AvatarSize, AvatarStyle } from './types';
3
+ import { Avatar as MuiAvatar, } from '@mui/material';
4
+ import { User } from '@phosphor-icons/react';
5
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
6
+ import { getInitials } from '../../utils';
7
+ export const Avatar = ({ avatarStyle = AvatarStyle.Placeholder, border = false, image = AvatarImage, size = AvatarSize.xxl, style: customStyle, text = 'Scarlett Johansson', }) => {
8
+ const getDimensions = (avatarSize) => {
9
+ switch (avatarSize) {
10
+ case AvatarSize.xs:
11
+ return 24;
12
+ case AvatarSize.sm:
13
+ return 32;
14
+ case AvatarSize.md:
15
+ return 40;
16
+ case AvatarSize.lg:
17
+ return 48;
18
+ case AvatarSize.xl:
19
+ return 56;
20
+ case AvatarSize.xxl:
21
+ return 64;
22
+ default:
23
+ return 40;
24
+ }
25
+ };
26
+ const getColor = (avatarStyle) => {
27
+ switch (avatarStyle) {
28
+ case AvatarStyle.Letters:
29
+ return 'var(--color-foreground-fg-primary)';
30
+ case AvatarStyle.Placeholder:
31
+ return 'var(--color-foreground-fg-tertiary)';
32
+ case AvatarStyle.Picture:
33
+ return 'var(--color-foreground-fg-secondary)';
34
+ default:
35
+ return 'var(--color-foreground-fg-tertiary)';
36
+ }
37
+ };
38
+ const getTextSize = () => {
39
+ if (size === AvatarSize.xxl)
40
+ return TypographySize.TextL;
41
+ else if ([AvatarSize.xl, AvatarSize.lg].includes(size))
42
+ return TypographySize.TextM;
43
+ else if (size === AvatarSize.md)
44
+ return TypographySize.TextS;
45
+ else if (size === AvatarSize.sm)
46
+ return TypographySize.TextXS;
47
+ else if (size === AvatarSize.xs)
48
+ return TypographySize.Text2XS;
49
+ else
50
+ return TypographySize.TextS;
51
+ };
52
+ const dimensions = getDimensions(size);
53
+ const props = {
54
+ sx: {
55
+ width: dimensions,
56
+ height: dimensions,
57
+ border: border
58
+ ? '1px solid var(--color-border-border-component)'
59
+ : 'none',
60
+ backgroundColor: 'var(--color-background-bg-card-highlight)',
61
+ color: getColor(avatarStyle),
62
+ fontSize: getTextSize(),
63
+ borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-11xl)',
64
+ ...customStyle,
65
+ },
66
+ };
67
+ if (avatarStyle === AvatarStyle.Letters) {
68
+ return (_jsx(MuiAvatar, { ...props, children: _jsx(Typography, { size: getTextSize(), weight: TypographyWeight.Medium, children: getInitials(text) }) }));
69
+ }
70
+ else if (avatarStyle === AvatarStyle.Picture) {
71
+ return _jsx(MuiAvatar, { ...props, src: image });
72
+ }
73
+ else {
74
+ return (_jsx(MuiAvatar, { ...props, children: _jsx(User, { size: dimensions / 2, weight: "bold" }) }));
75
+ }
76
+ };
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Avatar } from './Avatar';
3
+ declare const meta: Meta<typeof Avatar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Avatar>;
6
+ export declare const Placeholder: Story;
7
+ export declare const Picture: Story;
8
+ export declare const Letters: Story;
@@ -0,0 +1,76 @@
1
+ import { Avatar } from './Avatar';
2
+ import { AvatarStyle, AvatarSize, AvatarImage } from './types';
3
+ const meta = {
4
+ title: 'Design System/Components/UI/Avatar',
5
+ component: Avatar,
6
+ parameters: {
7
+ layout: 'centered',
8
+ design: {
9
+ type: 'figspec',
10
+ url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=4694-9405&t=HGXFzkH7TV5e4UsD-1',
11
+ },
12
+ },
13
+ tags: ['autodocs'],
14
+ argTypes: {
15
+ text: {
16
+ control: 'text',
17
+ description: 'Avatar text content',
18
+ table: {
19
+ type: { summary: 'string' },
20
+ },
21
+ },
22
+ image: {
23
+ control: 'text',
24
+ description: 'Image URL for the avatar',
25
+ table: {
26
+ type: { summary: 'string' },
27
+ },
28
+ },
29
+ border: {
30
+ control: 'boolean',
31
+ description: 'Whether to show a border around the avatar',
32
+ table: {
33
+ type: { summary: 'boolean' },
34
+ },
35
+ },
36
+ size: {
37
+ control: 'select',
38
+ options: ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'],
39
+ description: 'Size of the avatar',
40
+ table: {
41
+ type: { summary: 'string' },
42
+ defaultValue: { summary: AvatarSize.xxl },
43
+ },
44
+ },
45
+ avatarStyle: {
46
+ control: 'select',
47
+ options: ['Placeholder', 'Letters', 'Picture'],
48
+ description: 'Style of the avatar',
49
+ table: {
50
+ type: { summary: 'string' },
51
+ defaultValue: { summary: AvatarStyle.Placeholder },
52
+ },
53
+ },
54
+ },
55
+ };
56
+ export default meta;
57
+ export const Placeholder = {
58
+ args: {
59
+ size: AvatarSize.xxl,
60
+ avatarStyle: AvatarStyle.Placeholder,
61
+ },
62
+ };
63
+ export const Picture = {
64
+ args: {
65
+ size: AvatarSize.xxl,
66
+ image: AvatarImage,
67
+ avatarStyle: AvatarStyle.Picture,
68
+ },
69
+ };
70
+ export const Letters = {
71
+ args: {
72
+ size: AvatarSize.xxl,
73
+ text: 'Scarlett Johansson',
74
+ avatarStyle: AvatarStyle.Letters,
75
+ },
76
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { BadgeProps } from './types';
3
+ export declare const Badge: React.FC<React.PropsWithChildren<BadgeProps>>;
@@ -0,0 +1,118 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { BadgeColor, BadgeSize } from './types';
3
+ import { Box } from '@mui/material';
4
+ import { Typography, TypographySize, TypographyWeight } from '../Typography';
5
+ import { getIconComponent } from '../../utils';
6
+ export const Badge = ({ color = BadgeColor.Default, size = BadgeSize.md, text, children, style: customStyle, icon = 'Cactus', showIcon = false, fill = true, iconWeight = 'regular', iconSize, iconColor, testId, }) => {
7
+ const getBackgroundColor = (color) => {
8
+ switch (color) {
9
+ case BadgeColor.Default:
10
+ return 'var(--color-background-bg-badge-accent-gray)';
11
+ case BadgeColor.Violet:
12
+ return 'var(--primitives-desktop-primary-brand-violet-100)';
13
+ case BadgeColor.Lemon:
14
+ return 'var(--primitives-desktop-primary-brand-lemon-200)';
15
+ case BadgeColor.Green:
16
+ return 'var(--primitives-desktop-primary-success-100)';
17
+ case BadgeColor.Red:
18
+ return 'var(--primitives-desktop-primary-red-100)';
19
+ case BadgeColor.Yellow:
20
+ return 'var(--primitives-desktop-primary-yellow-100)';
21
+ case BadgeColor.Blue:
22
+ return 'var(--primitives-desktop-secondary-blue-100)';
23
+ case BadgeColor.Cyan:
24
+ return 'var(--primitives-desktop-secondary-cyan-50)';
25
+ case BadgeColor.Pink:
26
+ return 'var(--primitives-desktop-secondary-pink-50)';
27
+ case BadgeColor.DarkTransparent:
28
+ return `var(--primitives-desktop-primary-transparent-black-60)`;
29
+ }
30
+ };
31
+ const getTextColor = () => {
32
+ switch (color) {
33
+ case BadgeColor.Default:
34
+ return 'var(--color-text-text-title)';
35
+ case BadgeColor.Violet:
36
+ return 'var(--primitives-desktop-primary-brand-violet-800)';
37
+ case BadgeColor.Lemon:
38
+ return 'var(--primitives-desktop-primary-brand-lemon-900)';
39
+ case BadgeColor.Green:
40
+ return 'var(--primitives-desktop-primary-success-800)';
41
+ case BadgeColor.Red:
42
+ return 'var(--primitives-desktop-primary-red-800)';
43
+ case BadgeColor.Yellow:
44
+ return 'var(--primitives-desktop-primary-yellow-800)';
45
+ case BadgeColor.Blue:
46
+ return 'var(--primitives-desktop-secondary-blue-800)';
47
+ case BadgeColor.Cyan:
48
+ return 'var(--primitives-desktop-secondary-cyan-800)';
49
+ case BadgeColor.Pink:
50
+ return 'var(--primitives-desktop-secondary-pink-800)';
51
+ case BadgeColor.DarkTransparent:
52
+ return 'var(--color-text-text-white)';
53
+ }
54
+ };
55
+ const getBorder = (color) => {
56
+ switch (color) {
57
+ case BadgeColor.Default:
58
+ return '1px solid var(--primitives-desktop-primary-gray-100)';
59
+ case BadgeColor.Violet:
60
+ return '1px solid var(--primitives-desktop-primary-brand-violet-300)';
61
+ case BadgeColor.Lemon:
62
+ return '1px solid var(--primitives-desktop-primary-brand-lemon-300)';
63
+ case BadgeColor.Green:
64
+ return '1px solid var(--primitives-desktop-primary-success-300)';
65
+ case BadgeColor.Red:
66
+ return '1px solid var(--primitives-desktop-primary-red-300)';
67
+ case BadgeColor.Yellow:
68
+ return '1px solid var(--primitives-desktop-primary-yellow-300)';
69
+ case BadgeColor.Blue:
70
+ return '1px solid var(--primitives-desktop-secondary-blue-300)';
71
+ case BadgeColor.Cyan:
72
+ return '1px solid var(--primitives-desktop-secondary-cyan-300)';
73
+ case BadgeColor.Pink:
74
+ return '1px solid var(--primitives-desktop-secondary-pink-300)';
75
+ case BadgeColor.DarkTransparent:
76
+ return '1px solid rgba(var(--color-background-bg-component-dark), 0.9)';
77
+ }
78
+ };
79
+ const getPadding = (size) => {
80
+ switch (size) {
81
+ case BadgeSize.lg:
82
+ return 'var(--spacing-tokens-size-in-px-spacing-spacing-sm) var(--spacing-tokens-size-in-px-spacing-spacing-lg)';
83
+ case BadgeSize.md:
84
+ return 'var(--spacing-tokens-size-in-px-spacing-spacing-xs) 10px';
85
+ case BadgeSize.xs:
86
+ return 'var(--spacing-tokens-size-in-px-spacing-spacing-xs) var(--spacing-tokens-size-in-px-spacing-spacing-md)';
87
+ }
88
+ };
89
+ const getIconSize = (size) => {
90
+ switch (size) {
91
+ case BadgeSize.lg:
92
+ return '16px';
93
+ case BadgeSize.md:
94
+ return '16px';
95
+ case BadgeSize.xs:
96
+ return '12px';
97
+ }
98
+ };
99
+ const getTypographySize = (size) => {
100
+ switch (size) {
101
+ case BadgeSize.lg:
102
+ return TypographySize.TextS;
103
+ case BadgeSize.md:
104
+ return TypographySize.TextS;
105
+ case BadgeSize.xs:
106
+ return TypographySize.TextXS;
107
+ }
108
+ };
109
+ const backgroundColor = getBackgroundColor(color);
110
+ const border = getBorder(color);
111
+ const padding = getPadding(size);
112
+ const iconProps = {
113
+ size: iconSize || getIconSize(size),
114
+ color: iconColor || getTextColor(),
115
+ weight: iconWeight,
116
+ };
117
+ return (_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "center", bgcolor: fill ? backgroundColor : 'transparent', border: fill ? border : 'none', borderRadius: fill ? 'var(--spacing-tokens-size-in-px-radius-radius-full)' : 'none', padding: padding, margin: 0, gap: "4px", sx: customStyle, "data-testid": testId, children: [showIcon && icon && getIconComponent(icon, iconProps), text && (_jsx(Typography, { size: getTypographySize(size), weight: TypographyWeight.Medium, color: getTextColor(), children: text })), children] }));
118
+ };
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Badge } from './Badge';
3
+ declare const meta: Meta<typeof Badge>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Badge>;
6
+ export declare const Default: Story;
7
+ export declare const Violet: Story;
8
+ export declare const Lemon: Story;
9
+ export declare const Green: Story;
10
+ export declare const Red: Story;
11
+ export declare const Yellow: Story;