@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,125 @@
1
+ "use client";
2
+
3
+ import type { Placement } from "@react-types/overlays";
4
+ import { HelpCircle } from "@untitledui/icons";
5
+ import { Tooltip, TooltipTrigger } from "@/components/base/tooltip/tooltip";
6
+
7
+ const PLACEMENTS: { label: string; value: Placement }[] = [
8
+ {
9
+ label: "Top left",
10
+ value: "top left",
11
+ },
12
+ {
13
+ label: "Top",
14
+ value: "top",
15
+ },
16
+ {
17
+ label: "Top right",
18
+ value: "top right",
19
+ },
20
+ {
21
+ label: "Bottom left",
22
+ value: "bottom left",
23
+ },
24
+ {
25
+ label: "Bottom",
26
+ value: "bottom",
27
+ },
28
+ {
29
+ label: "Bottom right",
30
+ value: "bottom right",
31
+ },
32
+
33
+ {
34
+ label: "Left",
35
+ value: "left",
36
+ },
37
+
38
+ {
39
+ label: "Right",
40
+ value: "right",
41
+ },
42
+ ];
43
+
44
+ export const DefaultDemo = () => {
45
+ return (
46
+ <Tooltip title="This is a tooltip">
47
+ <TooltipTrigger className="group relative flex cursor-pointer flex-col items-center gap-2 text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover">
48
+ <HelpCircle className="size-4" />
49
+ </TooltipTrigger>
50
+ </Tooltip>
51
+ );
52
+ };
53
+
54
+ export const WithArrowDemo = () => {
55
+ return (
56
+ <Tooltip arrow title="This is a tooltip">
57
+ <TooltipTrigger className="group relative flex cursor-pointer flex-col items-center gap-2 text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover">
58
+ <HelpCircle className="size-4" />
59
+ </TooltipTrigger>
60
+ </Tooltip>
61
+ );
62
+ };
63
+
64
+ export const WithSupportingTextDemo = () => {
65
+ return (
66
+ <Tooltip
67
+ title="This is a tooltip"
68
+ description="Tooltips are used to describe or identify an element. In most scenarios, tooltip help the user understand meaning, function or alt-text."
69
+ >
70
+ <TooltipTrigger className="group relative flex cursor-pointer flex-col items-center gap-2 text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover">
71
+ <HelpCircle className="size-4" />
72
+ </TooltipTrigger>
73
+ </Tooltip>
74
+ );
75
+ };
76
+
77
+ export const TooltipDemo = () => (
78
+ <div className="grid grid-cols-3 gap-12">
79
+ {PLACEMENTS.map((side, index) => (
80
+ <div key={index} className="flex flex-col items-center justify-center gap-1 text-center">
81
+ <Tooltip placement={side.value} title="This is a tooltip">
82
+ <TooltipTrigger className="cursor-pointer text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover">
83
+ <HelpCircle className="size-4" />
84
+ </TooltipTrigger>
85
+ </Tooltip>
86
+ <span className="text-xs whitespace-nowrap text-secondary">{side.label}</span>
87
+ </div>
88
+ ))}
89
+ </div>
90
+ );
91
+
92
+ export const TooltipWithArrow = () => (
93
+ <div className="grid grid-cols-3 gap-12">
94
+ {PLACEMENTS.map((side) => (
95
+ <div key={side.value} className="flex flex-col items-center justify-center gap-1 text-center">
96
+ <Tooltip arrow placement={side.value} title="This is a tooltip">
97
+ <TooltipTrigger className="cursor-pointer text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover">
98
+ <HelpCircle className="size-4" />
99
+ </TooltipTrigger>
100
+ </Tooltip>
101
+ <span className="text-xs whitespace-nowrap text-secondary">{side.label}</span>
102
+ </div>
103
+ ))}
104
+ </div>
105
+ );
106
+
107
+ export const TooltipWithArrowSupportingText = () => (
108
+ <div className="grid grid-cols-3 gap-12">
109
+ {PLACEMENTS.map((side) => (
110
+ <div key={side.value} className="flex flex-col items-center justify-center gap-1 text-center">
111
+ <Tooltip
112
+ arrow
113
+ placement={side.value}
114
+ title="This is a tooltip"
115
+ description="Tooltips are used to describe or identify an element. In most scenarios, tooltip help the user understand meaning, function or alt-text."
116
+ >
117
+ <TooltipTrigger className="cursor-pointer text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover">
118
+ <HelpCircle className="size-4" />
119
+ </TooltipTrigger>
120
+ </Tooltip>
121
+ <span className="text-xs whitespace-nowrap text-secondary">{side.label}</span>
122
+ </div>
123
+ ))}
124
+ </div>
125
+ );
@@ -0,0 +1,21 @@
1
+ import type { FC } from "react";
2
+ import * as Tooltips from "@/components/base/tooltip/tooltip.demo";
3
+
4
+ export default {
5
+ title: "Base components/Tooltips",
6
+ decorators: [
7
+ (Story: FC) => (
8
+ <div className="flex min-h-screen items-center justify-center bg-primary p-16">
9
+ <Story />
10
+ </div>
11
+ ),
12
+ ],
13
+ };
14
+
15
+ export const Tooltip = () => <Tooltips.TooltipDemo />;
16
+
17
+ export const TooltipWithArrow = () => <Tooltips.TooltipWithArrow />;
18
+ TooltipWithArrow.storyName = "Tooltip with arrow";
19
+
20
+ export const TooltipWithArrowSupportingText = () => <Tooltips.TooltipWithArrowSupportingText />;
21
+ TooltipWithArrowSupportingText.storyName = "Tooltip with arrow supporting text";
@@ -0,0 +1,160 @@
1
+ "use client";
2
+
3
+ import { CheckCircle } from "@untitledui/icons";
4
+ import { FeaturedIcon } from "@/components/foundations/featured-icon/featured-icon";
5
+
6
+ export const DefaultDemo = () => {
7
+ return (
8
+ <div className="flex flex-col items-center gap-8 md:flex-row md:gap-10">
9
+ <FeaturedIcon color="brand" icon={CheckCircle} theme="light" size="lg" />
10
+ <FeaturedIcon color="brand" icon={CheckCircle} theme="gradient" size="lg" />
11
+ <FeaturedIcon color="brand" icon={CheckCircle} theme="dark" size="lg" />
12
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="lg" />
13
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern-neue" size="lg" />
14
+ <FeaturedIcon color="brand" icon={CheckCircle} theme="outline" size="lg" />
15
+ </div>
16
+ );
17
+ };
18
+
19
+ export const LightDemo = () => {
20
+ return (
21
+ <div className="flex flex-col items-start gap-8">
22
+ {(["brand", "gray", "error", "warning", "success"] as const).map((color) => (
23
+ <div key={color} className="flex gap-4">
24
+ <FeaturedIcon color={color} icon={CheckCircle} theme="light" size="sm" />
25
+ <FeaturedIcon color={color} icon={CheckCircle} theme="light" size="md" />
26
+ <FeaturedIcon color={color} icon={CheckCircle} theme="light" size="lg" />
27
+ <FeaturedIcon color={color} icon={CheckCircle} theme="light" size="xl" />
28
+ </div>
29
+ ))}
30
+ </div>
31
+ );
32
+ };
33
+
34
+ export const GradientDemo = () => {
35
+ return (
36
+ <div className="flex flex-col items-start gap-8">
37
+ {(["brand", "gray", "error", "warning", "success"] as const).map((color) => (
38
+ <div key={color} className="flex gap-4">
39
+ <FeaturedIcon color={color} icon={CheckCircle} theme="gradient" size="sm" />
40
+ <FeaturedIcon color={color} icon={CheckCircle} theme="gradient" size="md" />
41
+ <FeaturedIcon color={color} icon={CheckCircle} theme="gradient" size="lg" />
42
+ <FeaturedIcon color={color} icon={CheckCircle} theme="gradient" size="xl" />
43
+ </div>
44
+ ))}
45
+ </div>
46
+ );
47
+ };
48
+
49
+ export const DarkDemo = () => {
50
+ return (
51
+ <div className="flex flex-col items-start gap-8">
52
+ {(["brand", "gray", "error", "warning", "success"] as const).map((color) => (
53
+ <div key={color} className="flex gap-4">
54
+ <FeaturedIcon color={color} icon={CheckCircle} theme="dark" size="sm" />
55
+ <FeaturedIcon color={color} icon={CheckCircle} theme="dark" size="md" />
56
+ <FeaturedIcon color={color} icon={CheckCircle} theme="dark" size="lg" />
57
+ <FeaturedIcon color={color} icon={CheckCircle} theme="dark" size="xl" />
58
+ </div>
59
+ ))}
60
+ </div>
61
+ );
62
+ };
63
+
64
+ export const OutlineDemo = () => {
65
+ return (
66
+ <div className="flex flex-col items-start gap-8">
67
+ {(["brand", "gray", "error", "warning", "success"] as const).map((color) => (
68
+ <div key={color} className="flex gap-8">
69
+ <FeaturedIcon color={color} icon={CheckCircle} theme="outline" size="sm" />
70
+ <FeaturedIcon color={color} icon={CheckCircle} theme="outline" size="md" />
71
+ <FeaturedIcon color={color} icon={CheckCircle} theme="outline" size="lg" />
72
+ <FeaturedIcon color={color} icon={CheckCircle} theme="outline" size="xl" />
73
+ </div>
74
+ ))}
75
+ </div>
76
+ );
77
+ };
78
+
79
+ export const ModernDemo = () => {
80
+ return (
81
+ <div className="flex items-start gap-4">
82
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="sm" />
83
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="md" />
84
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="lg" />
85
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="xl" />
86
+ </div>
87
+ );
88
+ };
89
+
90
+ export const ModernNeueDemo = () => {
91
+ return (
92
+ <div className="flex items-start gap-4">
93
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern-neue" size="sm" />
94
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern-neue" size="md" />
95
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern-neue" size="lg" />
96
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern-neue" size="xl" />
97
+ </div>
98
+ );
99
+ };
100
+
101
+ export const FeaturedIcons = () => {
102
+ return (
103
+ <div className="grid w-max grid-cols-2 gap-12">
104
+ <div className="flex flex-col items-start gap-8">
105
+ {(["brand", "gray", "error", "warning", "success"] as const).map((color) => (
106
+ <div key={color} className="flex gap-4">
107
+ <FeaturedIcon color={color} icon={CheckCircle} theme="light" size="sm" />
108
+ <FeaturedIcon color={color} icon={CheckCircle} theme="light" size="md" />
109
+ <FeaturedIcon color={color} icon={CheckCircle} theme="light" size="lg" />
110
+ <FeaturedIcon color={color} icon={CheckCircle} theme="light" size="xl" />
111
+ </div>
112
+ ))}
113
+ </div>
114
+
115
+ <div className="flex flex-col items-start gap-8">
116
+ {(["brand", "gray", "error", "warning", "success"] as const).map((color) => (
117
+ <div key={color} className="flex gap-4">
118
+ <FeaturedIcon color={color} icon={CheckCircle} theme="gradient" size="sm" />
119
+ <FeaturedIcon color={color} icon={CheckCircle} theme="gradient" size="md" />
120
+ <FeaturedIcon color={color} icon={CheckCircle} theme="gradient" size="lg" />
121
+ <FeaturedIcon color={color} icon={CheckCircle} theme="gradient" size="xl" />
122
+ </div>
123
+ ))}
124
+ </div>
125
+
126
+ <div className="flex flex-col items-start gap-8">
127
+ {(["brand", "gray", "error", "warning", "success"] as const).map((color) => (
128
+ <div key={color} className="flex gap-4">
129
+ <FeaturedIcon color={color} icon={CheckCircle} theme="dark" size="sm" />
130
+ <FeaturedIcon color={color} icon={CheckCircle} theme="dark" size="md" />
131
+ <FeaturedIcon color={color} icon={CheckCircle} theme="dark" size="lg" />
132
+ <FeaturedIcon color={color} icon={CheckCircle} theme="dark" size="xl" />
133
+ </div>
134
+ ))}
135
+ </div>
136
+
137
+ <div className="flex items-start gap-4">
138
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="sm" />
139
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="md" />
140
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="lg" />
141
+ <FeaturedIcon color="gray" icon={CheckCircle} theme="modern" size="xl" />
142
+ </div>
143
+ </div>
144
+ );
145
+ };
146
+
147
+ export const FeaturedIconsOutline = () => {
148
+ return (
149
+ <div className="flex flex-col gap-8">
150
+ {(["brand", "gray", "error", "warning", "success"] as const).map((color) => (
151
+ <div key={color} className="flex gap-8">
152
+ <FeaturedIcon color={color} icon={CheckCircle} theme="outline" size="sm" />
153
+ <FeaturedIcon color={color} icon={CheckCircle} theme="outline" size="md" />
154
+ <FeaturedIcon color={color} icon={CheckCircle} theme="outline" size="lg" />
155
+ <FeaturedIcon color={color} icon={CheckCircle} theme="outline" size="xl" />
156
+ </div>
157
+ ))}
158
+ </div>
159
+ );
160
+ };
@@ -0,0 +1,25 @@
1
+ import type { FC } from "react";
2
+ import * as Demos from "./featured-icon.demo";
3
+
4
+ export default {
5
+ title: "Base components/Featured Icons",
6
+ decorators: [
7
+ (Story: FC) => (
8
+ <div className="flex min-h-screen w-full overflow-auto bg-primary p-8">
9
+ <Story />
10
+ </div>
11
+ ),
12
+ ],
13
+ };
14
+
15
+ export const Light = () => <Demos.LightDemo />;
16
+
17
+ export const Gradient = () => <Demos.GradientDemo />;
18
+
19
+ export const Dark = () => <Demos.DarkDemo />;
20
+
21
+ export const Modern = () => <Demos.ModernDemo />;
22
+
23
+ export const ModernNeue = () => <Demos.ModernNeueDemo />;
24
+
25
+ export const Outline = () => <Demos.OutlineDemo />;
@@ -0,0 +1,106 @@
1
+ import { CreditCard } from "./credit-card";
2
+
3
+ export const CreditCardExample = () => (
4
+ <div className="flex items-center justify-center">
5
+ <CreditCard type="brand-dark" company="Untitled." cardNumber="1234 1234 1234 1234" cardHolder="OLIVIA RHYE" cardExpiration="06/28" />
6
+ </div>
7
+ );
8
+
9
+ // Normal types
10
+ export const CreditCardTransparent = () => (
11
+ <div className="flex items-center justify-center">
12
+ <CreditCard type="transparent" />
13
+ </div>
14
+ );
15
+
16
+ export const CreditCardTransparentGradient = () => (
17
+ <div className="flex items-center justify-center">
18
+ <CreditCard type="transparent-gradient" />
19
+ </div>
20
+ );
21
+
22
+ export const CreditCardBrandDark = () => (
23
+ <div className="flex items-center justify-center">
24
+ <CreditCard type="brand-dark" />
25
+ </div>
26
+ );
27
+
28
+ export const CreditCardBrandLight = () => (
29
+ <div className="flex items-center justify-center">
30
+ <CreditCard type="brand-light" />
31
+ </div>
32
+ );
33
+
34
+ export const CreditCardGrayDark = () => (
35
+ <div className="flex items-center justify-center">
36
+ <CreditCard type="gray-dark" />
37
+ </div>
38
+ );
39
+
40
+ export const CreditCardGrayLight = () => (
41
+ <div className="flex items-center justify-center">
42
+ <CreditCard type="gray-light" />
43
+ </div>
44
+ );
45
+
46
+ // Strip types
47
+ export const CreditCardTransparentStrip = () => (
48
+ <div className="flex items-center justify-center">
49
+ <CreditCard type="transparent-strip" />
50
+ </div>
51
+ );
52
+
53
+ export const CreditCardGrayStrip = () => (
54
+ <div className="flex items-center justify-center">
55
+ <CreditCard type="gray-strip" />
56
+ </div>
57
+ );
58
+
59
+ export const CreditCardGradientStrip = () => (
60
+ <div className="flex items-center justify-center">
61
+ <CreditCard type="gradient-strip" />
62
+ </div>
63
+ );
64
+
65
+ export const CreditCardSalmonStrip = () => (
66
+ <div className="flex items-center justify-center">
67
+ <CreditCard type="salmon-strip" />
68
+ </div>
69
+ );
70
+
71
+ // Vertical strip types
72
+ export const CreditCardGrayStripVertical = () => (
73
+ <div className="flex items-center justify-center">
74
+ <CreditCard type="gray-strip-vertical" />
75
+ </div>
76
+ );
77
+
78
+ export const CreditCardGradientStripVertical = () => (
79
+ <div className="flex items-center justify-center">
80
+ <CreditCard type="gradient-strip-vertical" />
81
+ </div>
82
+ );
83
+
84
+ export const CreditCardSalmonStripVertical = () => (
85
+ <div className="flex items-center justify-center">
86
+ <CreditCard type="salmon-strip-vertical" />
87
+ </div>
88
+ );
89
+
90
+ export const CreditCardCustomization = () => (
91
+ <div className="flex flex-col gap-8">
92
+ <div className="flex items-center justify-center">
93
+ <CreditCard type="brand-dark" company="Brex" cardNumber="5678 9012 3456 7890" cardHolder="PEDRO FRANCESCHI" cardExpiration="12/28" />
94
+ </div>
95
+ <div className="flex items-center justify-center">
96
+ <CreditCard type="gradient-strip" company="Apple Inc." cardNumber="0987 6543 2109 8765" cardHolder="TIM COOK" cardExpiration="06/29" />
97
+ </div>
98
+ </div>
99
+ );
100
+
101
+ export const CreditCardSizes = () => (
102
+ <div className="flex flex-col items-center gap-8">
103
+ <CreditCard type="brand-dark" width={240} />
104
+ <CreditCard type="brand-dark" width={316} />
105
+ </div>
106
+ );
@@ -0,0 +1,41 @@
1
+ import type { FC } from "react";
2
+ import { CreditCard } from "./credit-card";
3
+
4
+ export default {
5
+ title: "Shared Assets/Miscellaneous assets/Credit Card",
6
+ decorators: [
7
+ (Story: FC) => (
8
+ <div className="min-h-screen bg-secondary p-8">
9
+ <Story />
10
+ </div>
11
+ ),
12
+ ],
13
+ };
14
+
15
+ export const CreditCardStory = () => (
16
+ <div className="flex gap-8">
17
+ <div className="flex flex-col gap-8">
18
+ <CreditCard type="transparent" />
19
+ <CreditCard type="transparent-gradient" />
20
+ <CreditCard type="brand-dark" />
21
+ <CreditCard type="brand-light" />
22
+ <CreditCard type="gray-dark" />
23
+ <CreditCard type="gray-light" />
24
+ </div>
25
+
26
+ <div className="flex flex-col gap-8">
27
+ <CreditCard type="transparent-strip" />
28
+ <CreditCard type="gray-strip" />
29
+ <CreditCard type="gradient-strip" />
30
+ <CreditCard type="salmon-strip" />
31
+ </div>
32
+
33
+ <div className="flex flex-col gap-8">
34
+ <CreditCard type="gray-strip-vertical" />
35
+ <CreditCard type="gradient-strip-vertical" />
36
+ <CreditCard type="salmon-strip-vertical" />
37
+ </div>
38
+ </div>
39
+ );
40
+
41
+ CreditCardStory.storyName = "Credit card";