@gsk_poc/untitled-ui-base 0.1.1

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 (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -0
  3. package/components/application/app-navigation/base-components/featured-cards.demo.tsx +86 -0
  4. package/components/application/app-navigation/base-components/featured-cards.story.tsx +49 -0
  5. package/components/application/app-navigation/header-navigation.demo.tsx +59 -0
  6. package/components/application/app-navigation/header-navigation.story.tsx +23 -0
  7. package/components/application/app-navigation/sidebar-navigation.demo.tsx +409 -0
  8. package/components/application/app-navigation/sidebar-navigation.story.tsx +47 -0
  9. package/components/application/carousel/carousel.demo.tsx +107 -0
  10. package/components/application/carousel/carousel.story.tsx +21 -0
  11. package/components/application/charts/activity-gauges.demo.tsx +251 -0
  12. package/components/application/charts/activity-gauges.story.tsx +27 -0
  13. package/components/application/charts/bar-charts.demo.tsx +506 -0
  14. package/components/application/charts/bar-charts.story.tsx +36 -0
  15. package/components/application/charts/line-charts.demo.tsx +604 -0
  16. package/components/application/charts/line-charts.story.tsx +43 -0
  17. package/components/application/charts/pie-charts.demo.tsx +193 -0
  18. package/components/application/charts/pie-charts.story.tsx +30 -0
  19. package/components/application/charts/progress-circles.demo.tsx +110 -0
  20. package/components/application/charts/progress-circles.story.tsx +33 -0
  21. package/components/application/charts/radar-charts.demo.tsx +203 -0
  22. package/components/application/charts/radar-charts.story.tsx +18 -0
  23. package/components/application/date-picker/date-picker.demo.tsx +217 -0
  24. package/components/application/date-picker/date-picker.story.tsx +44 -0
  25. package/components/application/file-upload/file-upload.demo.tsx +292 -0
  26. package/components/application/file-upload/file-upload.story.tsx +70 -0
  27. package/components/application/loading-indicator/loading-indicator.demo.tsx +73 -0
  28. package/components/application/loading-indicator/loading-indicator.story.tsx +22 -0
  29. package/components/application/pagination/pagination.demo.tsx +104 -0
  30. package/components/application/pagination/pagination.story.tsx +54 -0
  31. package/components/application/table/table.demo.tsx +1038 -0
  32. package/components/application/table/table.story.tsx +119 -0
  33. package/components/application/tabs/tabs.demo.tsx +322 -0
  34. package/components/application/tabs/tabs.story.tsx +43 -0
  35. package/components/base/avatar/avatar.demo.tsx +865 -0
  36. package/components/base/avatar/avatar.story.tsx +27 -0
  37. package/components/base/badges/badge-groups.demo.tsx +357 -0
  38. package/components/base/badges/badge-groups.story.tsx +25 -0
  39. package/components/base/badges/badges.demo.tsx +497 -0
  40. package/components/base/badges/badges.story.tsx +83 -0
  41. package/components/base/button-group/button-group.demo.tsx +131 -0
  42. package/components/base/button-group/button-group.story.tsx +16 -0
  43. package/components/base/buttons/app-store-buttons.demo.tsx +129 -0
  44. package/components/base/buttons/app-store-buttons.story.tsx +13 -0
  45. package/components/base/buttons/buttons.demo.tsx +1022 -0
  46. package/components/base/buttons/buttons.story.tsx +42 -0
  47. package/components/base/buttons/social-buttons.demo.tsx +432 -0
  48. package/components/base/buttons/social-buttons.story.tsx +20 -0
  49. package/components/base/checkbox/checkbox.demo.tsx +62 -0
  50. package/components/base/checkbox/checkbox.story.tsx +18 -0
  51. package/components/base/dropdown/dropdown.demo.tsx +137 -0
  52. package/components/base/dropdown/dropdown.story.tsx +22 -0
  53. package/components/base/input/inputs.demo.tsx +758 -0
  54. package/components/base/input/inputs.story.tsx +52 -0
  55. package/components/base/pin-input/pin-input.demo.tsx +126 -0
  56. package/components/base/pin-input/pin-input.story.tsx +22 -0
  57. package/components/base/progress-indicators/progress-indicators.demo.tsx +54 -0
  58. package/components/base/progress-indicators/progress-indicators.story.tsx +57 -0
  59. package/components/base/radio-buttons/radio-buttons.demo.tsx +77 -0
  60. package/components/base/radio-buttons/radio-buttons.story.tsx +19 -0
  61. package/components/base/select/select.demo.tsx +936 -0
  62. package/components/base/select/select.story.tsx +43 -0
  63. package/components/base/slider/slider.demo.tsx +19 -0
  64. package/components/base/slider/slider.story.tsx +26 -0
  65. package/components/base/tags/tags.demo.tsx +341 -0
  66. package/components/base/tags/tags.story.tsx +28 -0
  67. package/components/base/textarea/textarea.demo.tsx +25 -0
  68. package/components/base/textarea/textarea.story.tsx +15 -0
  69. package/components/base/toggle/toggle.demo.tsx +76 -0
  70. package/components/base/toggle/toggle.story.tsx +23 -0
  71. package/components/base/tooltip/tooltip.demo.tsx +125 -0
  72. package/components/base/tooltip/tooltip.story.tsx +21 -0
  73. package/components/foundations/featured-icon/featured-icon.demo.tsx +160 -0
  74. package/components/foundations/featured-icon/featured-icon.story.tsx +25 -0
  75. package/components/shared-assets/credit-card/credit-card.demo.tsx +106 -0
  76. package/components/shared-assets/credit-card/credit-card.story.tsx +41 -0
  77. package/dist/index.d.mts +1417 -0
  78. package/dist/index.d.ts +1417 -0
  79. package/dist/index.js +10435 -0
  80. package/dist/index.js.map +1 -0
  81. package/dist/index.mjs +10345 -0
  82. package/dist/index.mjs.map +1 -0
  83. package/package.json +126 -0
  84. package/styles/globals.css +65 -0
  85. package/styles/theme.css +430 -0
  86. package/styles/tokens-mapped.css +233 -0
  87. package/styles/tokens.css +807 -0
  88. package/styles/typography.css +430 -0
  89. package/tokens/design-tokens.dtcg.json +3515 -0
@@ -0,0 +1,27 @@
1
+ import type { FC } from "react";
2
+ import * as Avatar from "@/components/base/avatar/avatar.demo";
3
+
4
+ export default {
5
+ title: "Base components/Avatars",
6
+ decorators: [
7
+ (Story: FC) => (
8
+ <div className="flex min-h-screen w-full bg-primary p-4">
9
+ <Story />
10
+ </div>
11
+ ),
12
+ ],
13
+ };
14
+
15
+ export const Group = () => <Avatar.Group />;
16
+
17
+ export const Default = () => <Avatar.Default />;
18
+
19
+ export const Placeholder = () => <Avatar.Placeholder />;
20
+
21
+ export const Initials = () => <Avatar.Initials />;
22
+
23
+ export const LabelGroup = () => <Avatar.LabelGroup />;
24
+ LabelGroup.storyName = "Label group";
25
+
26
+ export const ProfilePhoto = () => <Avatar.ProfilePhoto />;
27
+ ProfilePhoto.storyName = "Profile photo";
@@ -0,0 +1,357 @@
1
+ "use client";
2
+
3
+ import { BadgeGroup } from "@/components/base/badges/badge-groups";
4
+
5
+ const variants = [
6
+ {
7
+ color: "gray",
8
+ text: "We've just released a new feature",
9
+ addonText: "New feature",
10
+ },
11
+ {
12
+ color: "brand",
13
+ text: "We've just released a new feature",
14
+ addonText: "New feature",
15
+ },
16
+ {
17
+ color: "error",
18
+ text: "There was a problem with that action",
19
+ addonText: "Error",
20
+ },
21
+ {
22
+ color: "warning",
23
+ text: "Just to let you know this might be a problem",
24
+ addonText: "Warning",
25
+ },
26
+ {
27
+ color: "success",
28
+ text: "You've updated your profile and details",
29
+ addonText: "New feature",
30
+ },
31
+ ] as const;
32
+
33
+ const sizes = ["md", "lg"] as const;
34
+
35
+ export const PillColorLeadingGray = () => {
36
+ return (
37
+ <div className="flex flex-col items-start gap-4">
38
+ <BadgeGroup addonText="New feature" color="gray" theme="light" align="leading" size="md">
39
+ We've just released a new feature
40
+ </BadgeGroup>
41
+ <BadgeGroup addonText="New feature" color="gray" theme="light" align="leading" size="lg">
42
+ We've just released a new feature
43
+ </BadgeGroup>
44
+ </div>
45
+ );
46
+ };
47
+
48
+ export const PillColorLeadingBrand = () => {
49
+ return (
50
+ <div className="flex flex-col items-start gap-4">
51
+ <BadgeGroup addonText="New feature" color="brand" theme="light" align="leading" size="md">
52
+ We've just released a new feature
53
+ </BadgeGroup>
54
+ <BadgeGroup addonText="New feature" color="brand" theme="light" align="leading" size="lg">
55
+ We've just released a new feature
56
+ </BadgeGroup>
57
+ </div>
58
+ );
59
+ };
60
+
61
+ export const PillColorLeadingError = () => {
62
+ return (
63
+ <div className="flex flex-col items-start gap-4">
64
+ <BadgeGroup addonText="Error" color="error" theme="light" align="leading" size="md">
65
+ There was a problem with that action
66
+ </BadgeGroup>
67
+ <BadgeGroup addonText="Error" color="error" theme="light" align="leading" size="lg">
68
+ There was a problem with that action
69
+ </BadgeGroup>
70
+ </div>
71
+ );
72
+ };
73
+
74
+ export const PillColorLeadingWarning = () => {
75
+ return (
76
+ <div className="flex flex-col items-start gap-4">
77
+ <BadgeGroup addonText="Warning" color="warning" theme="light" align="leading" size="md">
78
+ Just to let you know this might be a problem
79
+ </BadgeGroup>
80
+ <BadgeGroup addonText="Warning" color="warning" theme="light" align="leading" size="lg">
81
+ Just to let you know this might be a problem
82
+ </BadgeGroup>
83
+ </div>
84
+ );
85
+ };
86
+
87
+ export const PillColorLeadingSuccess = () => {
88
+ return (
89
+ <div className="flex flex-col items-start gap-4">
90
+ <BadgeGroup addonText="Success" color="success" theme="light" align="leading" size="md">
91
+ You've updated your profile and details
92
+ </BadgeGroup>
93
+ <BadgeGroup addonText="Success" color="success" theme="light" align="leading" size="lg">
94
+ You've updated your profile and details
95
+ </BadgeGroup>
96
+ </div>
97
+ );
98
+ };
99
+
100
+ export const PillColorTrailingGray = () => {
101
+ return (
102
+ <div className="flex flex-col items-start gap-4">
103
+ <BadgeGroup addonText="New feature" color="gray" theme="light" align="trailing" size="md">
104
+ We've just released a new feature
105
+ </BadgeGroup>
106
+ <BadgeGroup addonText="New feature" color="gray" theme="light" align="trailing" size="lg">
107
+ We've just released a new feature
108
+ </BadgeGroup>
109
+ </div>
110
+ );
111
+ };
112
+
113
+ export const PillColorTrailingBrand = () => {
114
+ return (
115
+ <div className="flex flex-col items-start gap-4">
116
+ <BadgeGroup addonText="New feature" color="brand" theme="light" align="trailing" size="md">
117
+ We've just released a new feature
118
+ </BadgeGroup>
119
+ <BadgeGroup addonText="New feature" color="brand" theme="light" align="trailing" size="lg">
120
+ We've just released a new feature
121
+ </BadgeGroup>
122
+ </div>
123
+ );
124
+ };
125
+
126
+ export const PillColorTrailingError = () => {
127
+ return (
128
+ <div className="flex flex-col items-start gap-4">
129
+ <BadgeGroup addonText="Error" color="error" theme="light" align="trailing" size="md">
130
+ There was a problem with that action
131
+ </BadgeGroup>
132
+ <BadgeGroup addonText="Error" color="error" theme="light" align="trailing" size="lg">
133
+ There was a problem with that action
134
+ </BadgeGroup>
135
+ </div>
136
+ );
137
+ };
138
+
139
+ export const PillColorTrailingWarning = () => {
140
+ return (
141
+ <div className="flex flex-col items-start gap-4">
142
+ <BadgeGroup addonText="Warning" color="warning" theme="light" align="trailing" size="md">
143
+ Just to let you know this might be a problem
144
+ </BadgeGroup>
145
+ <BadgeGroup addonText="Warning" color="warning" theme="light" align="trailing" size="lg">
146
+ Just to let you know this might be a problem
147
+ </BadgeGroup>
148
+ </div>
149
+ );
150
+ };
151
+
152
+ export const PillColorTrailingSuccess = () => {
153
+ return (
154
+ <div className="flex flex-col items-start gap-4">
155
+ <BadgeGroup addonText="Success" color="success" theme="light" align="trailing" size="md">
156
+ You've updated your profile and details
157
+ </BadgeGroup>
158
+ <BadgeGroup addonText="Success" color="success" theme="light" align="trailing" size="lg">
159
+ You've updated your profile and details
160
+ </BadgeGroup>
161
+ </div>
162
+ );
163
+ };
164
+
165
+ export const BadgeModernLeadingGray = () => {
166
+ return (
167
+ <div className="flex flex-col items-start gap-4">
168
+ <BadgeGroup addonText="New feature" color="gray" theme="modern" align="leading" size="md">
169
+ We've just released a new feature
170
+ </BadgeGroup>
171
+ <BadgeGroup addonText="New feature" color="gray" theme="modern" align="leading" size="lg">
172
+ We've just released a new feature
173
+ </BadgeGroup>
174
+ </div>
175
+ );
176
+ };
177
+
178
+ export const BadgeModernLeadingBrand = () => {
179
+ return (
180
+ <div className="flex flex-col items-start gap-4">
181
+ <BadgeGroup addonText="New feature" color="brand" theme="modern" align="leading" size="md">
182
+ We've just released a new feature
183
+ </BadgeGroup>
184
+ <BadgeGroup addonText="New feature" color="brand" theme="modern" align="leading" size="lg">
185
+ We've just released a new feature
186
+ </BadgeGroup>
187
+ </div>
188
+ );
189
+ };
190
+
191
+ export const BadgeModernLeadingError = () => {
192
+ return (
193
+ <div className="flex flex-col items-start gap-4">
194
+ <BadgeGroup addonText="Error" color="error" theme="modern" align="leading" size="md">
195
+ There was a problem with that action
196
+ </BadgeGroup>
197
+ <BadgeGroup addonText="Error" color="error" theme="modern" align="leading" size="lg">
198
+ There was a problem with that action
199
+ </BadgeGroup>
200
+ </div>
201
+ );
202
+ };
203
+
204
+ export const BadgeModernLeadingWarning = () => {
205
+ return (
206
+ <div className="flex flex-col items-start gap-4">
207
+ <BadgeGroup addonText="Warning" color="warning" theme="modern" align="leading" size="md">
208
+ Just to let you know this might be a problem
209
+ </BadgeGroup>
210
+ <BadgeGroup addonText="Warning" color="warning" theme="modern" align="leading" size="lg">
211
+ Just to let you know this might be a problem
212
+ </BadgeGroup>
213
+ </div>
214
+ );
215
+ };
216
+
217
+ export const BadgeModernLeadingSuccess = () => {
218
+ return (
219
+ <div className="flex flex-col items-start gap-4">
220
+ <BadgeGroup addonText="Success" color="success" theme="modern" align="leading" size="md">
221
+ You've updated your profile and details
222
+ </BadgeGroup>
223
+ <BadgeGroup addonText="Success" color="success" theme="modern" align="leading" size="lg">
224
+ You've updated your profile and details
225
+ </BadgeGroup>
226
+ </div>
227
+ );
228
+ };
229
+
230
+ export const BadgeModernTrailingGray = () => {
231
+ return (
232
+ <div className="flex flex-col items-start gap-4">
233
+ <BadgeGroup addonText="New feature" color="gray" theme="modern" align="trailing" size="md">
234
+ We've just released a new feature
235
+ </BadgeGroup>
236
+ <BadgeGroup addonText="New feature" color="gray" theme="modern" align="trailing" size="lg">
237
+ We've just released a new feature
238
+ </BadgeGroup>
239
+ </div>
240
+ );
241
+ };
242
+
243
+ export const BadgeModernTrailingBrand = () => {
244
+ return (
245
+ <div className="flex flex-col items-start gap-4">
246
+ <BadgeGroup addonText="New feature" color="brand" theme="modern" align="trailing" size="md">
247
+ We've just released a new feature
248
+ </BadgeGroup>
249
+ <BadgeGroup addonText="New feature" color="brand" theme="modern" align="trailing" size="lg">
250
+ We've just released a new feature
251
+ </BadgeGroup>
252
+ </div>
253
+ );
254
+ };
255
+
256
+ export const BadgeModernTrailingError = () => {
257
+ return (
258
+ <div className="flex flex-col items-start gap-4">
259
+ <BadgeGroup addonText="Error" color="error" theme="modern" align="trailing" size="md">
260
+ There was a problem with that action
261
+ </BadgeGroup>
262
+ <BadgeGroup addonText="Error" color="error" theme="modern" align="trailing" size="lg">
263
+ There was a problem with that action
264
+ </BadgeGroup>
265
+ </div>
266
+ );
267
+ };
268
+
269
+ export const BadgeModernTrailingWarning = () => {
270
+ return (
271
+ <div className="flex flex-col items-start gap-4">
272
+ <BadgeGroup addonText="Warning" color="warning" theme="modern" align="trailing" size="md">
273
+ Just to let you know this might be a problem
274
+ </BadgeGroup>
275
+ <BadgeGroup addonText="Warning" color="warning" theme="modern" align="trailing" size="lg">
276
+ Just to let you know this might be a problem
277
+ </BadgeGroup>
278
+ </div>
279
+ );
280
+ };
281
+
282
+ export const BadgeModernTrailingSuccess = () => {
283
+ return (
284
+ <div className="flex flex-col items-start gap-4">
285
+ <BadgeGroup addonText="Success" color="success" theme="modern" align="trailing" size="md">
286
+ You've updated your profile and details
287
+ </BadgeGroup>
288
+ <BadgeGroup addonText="Success" color="success" theme="modern" align="trailing" size="lg">
289
+ You've updated your profile and details
290
+ </BadgeGroup>
291
+ </div>
292
+ );
293
+ };
294
+
295
+ export const PillColorLeading = () => {
296
+ return (
297
+ <div className="grid grid-cols-2 content-start gap-x-8 gap-y-4">
298
+ {variants.map((variant) =>
299
+ sizes.map((size) => (
300
+ <div key={`${variant.color}-${size}`} className="flex flex-col gap-3.5">
301
+ <BadgeGroup {...variant} theme="light" align="leading" size={size}>
302
+ {variant.text}
303
+ </BadgeGroup>
304
+ </div>
305
+ )),
306
+ )}
307
+ </div>
308
+ );
309
+ };
310
+
311
+ export const PillColorTrailing = () => {
312
+ return (
313
+ <div className="grid grid-cols-2 content-start gap-x-8 gap-y-4">
314
+ {variants.map((variant) =>
315
+ sizes.map((size) => (
316
+ <div key={`${variant.color}-${size}`} className="flex flex-col gap-3.5">
317
+ <BadgeGroup {...variant} theme="light" align="trailing" size={size}>
318
+ {variant.text}
319
+ </BadgeGroup>
320
+ </div>
321
+ )),
322
+ )}
323
+ </div>
324
+ );
325
+ };
326
+
327
+ export const BadgeModernLeading = () => {
328
+ return (
329
+ <div className="grid grid-cols-2 content-start gap-x-8 gap-y-4">
330
+ {variants.map((variant) =>
331
+ sizes.map((size) => (
332
+ <div key={`${variant.color}-${size}`} className="flex flex-col gap-3.5">
333
+ <BadgeGroup {...variant} theme="modern" align="leading" size={size}>
334
+ {variant.text}
335
+ </BadgeGroup>
336
+ </div>
337
+ )),
338
+ )}
339
+ </div>
340
+ );
341
+ };
342
+
343
+ export const BadgeModernTrailing = () => {
344
+ return (
345
+ <div className="grid grid-cols-2 content-start gap-x-8 gap-y-4">
346
+ {variants.map((variant) =>
347
+ sizes.map((size) => (
348
+ <div key={`${variant.color}-${size}`} className="flex flex-col gap-3.5">
349
+ <BadgeGroup {...variant} theme="modern" align="trailing" size={size}>
350
+ {variant.text}
351
+ </BadgeGroup>
352
+ </div>
353
+ )),
354
+ )}
355
+ </div>
356
+ );
357
+ };
@@ -0,0 +1,25 @@
1
+ import type { FC } from "react";
2
+ import * as BadgeGroup from "@/components/base/badges/badge-groups.demo";
3
+
4
+ export default {
5
+ title: "Base components/Badge groups",
6
+ decorators: [
7
+ (Story: FC) => (
8
+ <div className="flex h-screen w-full bg-primary p-4">
9
+ <Story />
10
+ </div>
11
+ ),
12
+ ],
13
+ };
14
+
15
+ export const PillColorLeading = () => <BadgeGroup.PillColorLeading />;
16
+ PillColorLeading.storyName = "Pill color leading";
17
+
18
+ export const PillColorTrailing = () => <BadgeGroup.PillColorTrailing />;
19
+ PillColorTrailing.storyName = "Pill color trailing";
20
+
21
+ export const BadgeModernLeading = () => <BadgeGroup.BadgeModernLeading />;
22
+ BadgeModernLeading.storyName = "Badge modern leading";
23
+
24
+ export const BadgeModernTrailing = () => <BadgeGroup.BadgeModernTrailing />;
25
+ BadgeModernTrailing.storyName = "Badge modern trailing";