@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.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/components/application/app-navigation/base-components/featured-cards.demo.tsx +86 -0
- package/components/application/app-navigation/base-components/featured-cards.story.tsx +49 -0
- package/components/application/app-navigation/header-navigation.demo.tsx +59 -0
- package/components/application/app-navigation/header-navigation.story.tsx +23 -0
- package/components/application/app-navigation/sidebar-navigation.demo.tsx +409 -0
- package/components/application/app-navigation/sidebar-navigation.story.tsx +47 -0
- package/components/application/carousel/carousel.demo.tsx +107 -0
- package/components/application/carousel/carousel.story.tsx +21 -0
- package/components/application/charts/activity-gauges.demo.tsx +251 -0
- package/components/application/charts/activity-gauges.story.tsx +27 -0
- package/components/application/charts/bar-charts.demo.tsx +506 -0
- package/components/application/charts/bar-charts.story.tsx +36 -0
- package/components/application/charts/line-charts.demo.tsx +604 -0
- package/components/application/charts/line-charts.story.tsx +43 -0
- package/components/application/charts/pie-charts.demo.tsx +193 -0
- package/components/application/charts/pie-charts.story.tsx +30 -0
- package/components/application/charts/progress-circles.demo.tsx +110 -0
- package/components/application/charts/progress-circles.story.tsx +33 -0
- package/components/application/charts/radar-charts.demo.tsx +203 -0
- package/components/application/charts/radar-charts.story.tsx +18 -0
- package/components/application/date-picker/date-picker.demo.tsx +217 -0
- package/components/application/date-picker/date-picker.story.tsx +44 -0
- package/components/application/file-upload/file-upload.demo.tsx +292 -0
- package/components/application/file-upload/file-upload.story.tsx +70 -0
- package/components/application/loading-indicator/loading-indicator.demo.tsx +73 -0
- package/components/application/loading-indicator/loading-indicator.story.tsx +22 -0
- package/components/application/pagination/pagination.demo.tsx +104 -0
- package/components/application/pagination/pagination.story.tsx +54 -0
- package/components/application/table/table.demo.tsx +1038 -0
- package/components/application/table/table.story.tsx +119 -0
- package/components/application/tabs/tabs.demo.tsx +322 -0
- package/components/application/tabs/tabs.story.tsx +43 -0
- package/components/base/avatar/avatar.demo.tsx +865 -0
- package/components/base/avatar/avatar.story.tsx +27 -0
- package/components/base/badges/badge-groups.demo.tsx +357 -0
- package/components/base/badges/badge-groups.story.tsx +25 -0
- package/components/base/badges/badges.demo.tsx +497 -0
- package/components/base/badges/badges.story.tsx +83 -0
- package/components/base/button-group/button-group.demo.tsx +131 -0
- package/components/base/button-group/button-group.story.tsx +16 -0
- package/components/base/buttons/app-store-buttons.demo.tsx +129 -0
- package/components/base/buttons/app-store-buttons.story.tsx +13 -0
- package/components/base/buttons/buttons.demo.tsx +1022 -0
- package/components/base/buttons/buttons.story.tsx +42 -0
- package/components/base/buttons/social-buttons.demo.tsx +432 -0
- package/components/base/buttons/social-buttons.story.tsx +20 -0
- package/components/base/checkbox/checkbox.demo.tsx +62 -0
- package/components/base/checkbox/checkbox.story.tsx +18 -0
- package/components/base/dropdown/dropdown.demo.tsx +137 -0
- package/components/base/dropdown/dropdown.story.tsx +22 -0
- package/components/base/input/inputs.demo.tsx +758 -0
- package/components/base/input/inputs.story.tsx +52 -0
- package/components/base/pin-input/pin-input.demo.tsx +126 -0
- package/components/base/pin-input/pin-input.story.tsx +22 -0
- package/components/base/progress-indicators/progress-indicators.demo.tsx +54 -0
- package/components/base/progress-indicators/progress-indicators.story.tsx +57 -0
- package/components/base/radio-buttons/radio-buttons.demo.tsx +77 -0
- package/components/base/radio-buttons/radio-buttons.story.tsx +19 -0
- package/components/base/select/select.demo.tsx +936 -0
- package/components/base/select/select.story.tsx +43 -0
- package/components/base/slider/slider.demo.tsx +19 -0
- package/components/base/slider/slider.story.tsx +26 -0
- package/components/base/tags/tags.demo.tsx +341 -0
- package/components/base/tags/tags.story.tsx +28 -0
- package/components/base/textarea/textarea.demo.tsx +25 -0
- package/components/base/textarea/textarea.story.tsx +15 -0
- package/components/base/toggle/toggle.demo.tsx +76 -0
- package/components/base/toggle/toggle.story.tsx +23 -0
- package/components/base/tooltip/tooltip.demo.tsx +125 -0
- package/components/base/tooltip/tooltip.story.tsx +21 -0
- package/components/foundations/featured-icon/featured-icon.demo.tsx +160 -0
- package/components/foundations/featured-icon/featured-icon.story.tsx +25 -0
- package/components/shared-assets/credit-card/credit-card.demo.tsx +106 -0
- package/components/shared-assets/credit-card/credit-card.story.tsx +41 -0
- package/dist/index.d.mts +1417 -0
- package/dist/index.d.ts +1417 -0
- package/dist/index.js +10435 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +10345 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +126 -0
- package/styles/globals.css +65 -0
- package/styles/theme.css +430 -0
- package/styles/tokens-mapped.css +233 -0
- package/styles/tokens.css +807 -0
- package/styles/typography.css +430 -0
- package/tokens/design-tokens.dtcg.json +3515 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import * as Inputs from "@/components/base/input/inputs.demo";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Base components/Inputs",
|
|
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
|
+
const DefaultDecorator = (Story: FC) => (
|
|
16
|
+
<div className="w-full max-w-xs">
|
|
17
|
+
<Story />
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const WiderDecorator = (Story: FC) => (
|
|
22
|
+
<div className="w-full max-w-100">
|
|
23
|
+
<Story />
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export const Default = () => <Inputs.Default />;
|
|
28
|
+
Default.decorators = [DefaultDecorator];
|
|
29
|
+
|
|
30
|
+
export const LeadingIcon = () => <Inputs.LeadingIcon />;
|
|
31
|
+
LeadingIcon.decorators = [DefaultDecorator];
|
|
32
|
+
LeadingIcon.storyName = "Leading icon";
|
|
33
|
+
|
|
34
|
+
export const LeadingDropdown = () => <Inputs.LeadingDropdown />;
|
|
35
|
+
LeadingDropdown.decorators = [DefaultDecorator];
|
|
36
|
+
LeadingDropdown.storyName = "Leading dropdown";
|
|
37
|
+
|
|
38
|
+
export const TrailingDropdown = () => <Inputs.TrailingDropdown />;
|
|
39
|
+
TrailingDropdown.decorators = [DefaultDecorator];
|
|
40
|
+
TrailingDropdown.storyName = "Trailing dropdown";
|
|
41
|
+
|
|
42
|
+
export const LeadingText = () => <Inputs.LeadingText />;
|
|
43
|
+
LeadingText.decorators = [DefaultDecorator];
|
|
44
|
+
LeadingText.storyName = "Leading text";
|
|
45
|
+
|
|
46
|
+
export const PaymentInputs = () => <Inputs.PaymentInputs />;
|
|
47
|
+
PaymentInputs.decorators = [DefaultDecorator];
|
|
48
|
+
PaymentInputs.storyName = "Payment inputs";
|
|
49
|
+
|
|
50
|
+
export const TrailingButton = () => <Inputs.TrailingButton />;
|
|
51
|
+
TrailingButton.decorators = [WiderDecorator];
|
|
52
|
+
TrailingButton.storyName = "Trailing button";
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { PinInput } from "@/components/base/pin-input/pin-input";
|
|
4
|
+
|
|
5
|
+
export const FourDigitsDemo = () => {
|
|
6
|
+
return (
|
|
7
|
+
<PinInput>
|
|
8
|
+
<PinInput.Label>Secure code</PinInput.Label>
|
|
9
|
+
<PinInput.Group maxLength={4}>
|
|
10
|
+
<PinInput.Slot index={0} />
|
|
11
|
+
<PinInput.Slot index={1} />
|
|
12
|
+
<PinInput.Slot index={2} />
|
|
13
|
+
<PinInput.Slot index={3} />
|
|
14
|
+
</PinInput.Group>
|
|
15
|
+
<PinInput.Description>This is a hint text to help user.</PinInput.Description>
|
|
16
|
+
</PinInput>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const DisabledDemo = () => {
|
|
21
|
+
return (
|
|
22
|
+
<PinInput disabled>
|
|
23
|
+
<PinInput.Label>Secure code</PinInput.Label>
|
|
24
|
+
<PinInput.Group maxLength={4}>
|
|
25
|
+
<PinInput.Slot index={0} />
|
|
26
|
+
<PinInput.Slot index={1} />
|
|
27
|
+
<PinInput.Slot index={2} />
|
|
28
|
+
<PinInput.Slot index={3} />
|
|
29
|
+
</PinInput.Group>
|
|
30
|
+
<PinInput.Description>This is a hint text to help user.</PinInput.Description>
|
|
31
|
+
</PinInput>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const SizesDemo = () => {
|
|
36
|
+
return (
|
|
37
|
+
<div className="flex flex-col gap-8">
|
|
38
|
+
<PinInput size="sm">
|
|
39
|
+
<PinInput.Label>Secure code</PinInput.Label>
|
|
40
|
+
<PinInput.Group maxLength={4}>
|
|
41
|
+
<PinInput.Slot index={0} />
|
|
42
|
+
<PinInput.Slot index={1} />
|
|
43
|
+
<PinInput.Slot index={2} />
|
|
44
|
+
<PinInput.Slot index={3} />
|
|
45
|
+
</PinInput.Group>
|
|
46
|
+
<PinInput.Description>This is a hint text to help user.</PinInput.Description>
|
|
47
|
+
</PinInput>
|
|
48
|
+
|
|
49
|
+
<PinInput size="md">
|
|
50
|
+
<PinInput.Label>Secure code</PinInput.Label>
|
|
51
|
+
<PinInput.Group maxLength={4}>
|
|
52
|
+
<PinInput.Slot index={0} />
|
|
53
|
+
<PinInput.Slot index={1} />
|
|
54
|
+
<PinInput.Slot index={2} />
|
|
55
|
+
<PinInput.Slot index={3} />
|
|
56
|
+
</PinInput.Group>
|
|
57
|
+
<PinInput.Description>This is a hint text to help user.</PinInput.Description>
|
|
58
|
+
</PinInput>
|
|
59
|
+
|
|
60
|
+
<PinInput size="lg">
|
|
61
|
+
<PinInput.Label>Secure code</PinInput.Label>
|
|
62
|
+
<PinInput.Group maxLength={4}>
|
|
63
|
+
<PinInput.Slot index={0} />
|
|
64
|
+
<PinInput.Slot index={1} />
|
|
65
|
+
<PinInput.Slot index={2} />
|
|
66
|
+
<PinInput.Slot index={3} />
|
|
67
|
+
</PinInput.Group>
|
|
68
|
+
<PinInput.Description>This is a hint text to help user.</PinInput.Description>
|
|
69
|
+
</PinInput>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const VerificationCodeInputSM = () => {
|
|
75
|
+
return (
|
|
76
|
+
<PinInput size="sm">
|
|
77
|
+
<PinInput.Label>Secure code</PinInput.Label>
|
|
78
|
+
<PinInput.Group maxLength={6}>
|
|
79
|
+
<PinInput.Slot index={0} />
|
|
80
|
+
<PinInput.Slot index={1} />
|
|
81
|
+
<PinInput.Slot index={2} />
|
|
82
|
+
<PinInput.Separator />
|
|
83
|
+
<PinInput.Slot index={3} />
|
|
84
|
+
<PinInput.Slot index={4} />
|
|
85
|
+
<PinInput.Slot index={5} />
|
|
86
|
+
</PinInput.Group>
|
|
87
|
+
<PinInput.Description>This is a hint text to help user.</PinInput.Description>
|
|
88
|
+
</PinInput>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const VerificationCodeInputMD = () => {
|
|
93
|
+
return (
|
|
94
|
+
<PinInput size="md">
|
|
95
|
+
<PinInput.Label>Secure code</PinInput.Label>
|
|
96
|
+
<PinInput.Group maxLength={6}>
|
|
97
|
+
<PinInput.Slot index={0} />
|
|
98
|
+
<PinInput.Slot index={1} />
|
|
99
|
+
<PinInput.Slot index={2} />
|
|
100
|
+
<PinInput.Separator />
|
|
101
|
+
<PinInput.Slot index={3} />
|
|
102
|
+
<PinInput.Slot index={4} />
|
|
103
|
+
<PinInput.Slot index={5} />
|
|
104
|
+
</PinInput.Group>
|
|
105
|
+
<PinInput.Description>This is a hint text to help user.</PinInput.Description>
|
|
106
|
+
</PinInput>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const VerificationCodeInputLG = () => {
|
|
111
|
+
return (
|
|
112
|
+
<PinInput size="lg">
|
|
113
|
+
<PinInput.Label>Secure code</PinInput.Label>
|
|
114
|
+
<PinInput.Group maxLength={6}>
|
|
115
|
+
<PinInput.Slot index={0} />
|
|
116
|
+
<PinInput.Slot index={1} />
|
|
117
|
+
<PinInput.Slot index={2} />
|
|
118
|
+
<PinInput.Separator />
|
|
119
|
+
<PinInput.Slot index={3} />
|
|
120
|
+
<PinInput.Slot index={4} />
|
|
121
|
+
<PinInput.Slot index={5} />
|
|
122
|
+
</PinInput.Group>
|
|
123
|
+
<PinInput.Description>This is a hint text to help user.</PinInput.Description>
|
|
124
|
+
</PinInput>
|
|
125
|
+
);
|
|
126
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import * as PinInputs from "@/components/base/pin-input/pin-input.demo";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Base components/Inputs/Verification code input",
|
|
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 VerificationCodeInputSm = () => <PinInputs.VerificationCodeInputSM />;
|
|
16
|
+
VerificationCodeInputSm.storyName = "Verification code input sm";
|
|
17
|
+
|
|
18
|
+
export const VerificationCodeInputMd = () => <PinInputs.VerificationCodeInputMD />;
|
|
19
|
+
VerificationCodeInputMd.storyName = "Verification code input md";
|
|
20
|
+
|
|
21
|
+
export const VerificationCodeInputLg = () => <PinInputs.VerificationCodeInputLG />;
|
|
22
|
+
VerificationCodeInputLg.storyName = "Verification code input lg";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { ProgressBarCircle, ProgressBarHalfCircle } from "@/components/base/progress-indicators/progress-circles";
|
|
4
|
+
import { ProgressBar } from "@/components/base/progress-indicators/progress-indicators";
|
|
5
|
+
|
|
6
|
+
export const ProgressBarDefault = () => <ProgressBar min={0} max={100} value={40} />;
|
|
7
|
+
|
|
8
|
+
export const ProgressBarTextRight = () => <ProgressBar labelPosition="right" min={0} max={100} value={40} />;
|
|
9
|
+
|
|
10
|
+
export const ProgressBarTextBottom = () => <ProgressBar labelPosition="bottom" min={0} max={100} value={40} />;
|
|
11
|
+
|
|
12
|
+
export const ProgressBarTextTopFloating = () => <ProgressBar labelPosition="top-floating" min={0} max={100} value={40} />;
|
|
13
|
+
|
|
14
|
+
export const ProgressBarTextBottomFloating = () => <ProgressBar labelPosition="bottom-floating" min={0} max={100} value={40} />;
|
|
15
|
+
|
|
16
|
+
export const CircleProgressBar = () => (
|
|
17
|
+
<div className="flex flex-col items-start gap-10 md:flex-row">
|
|
18
|
+
<ProgressBarCircle size="xxs" min={0} max={100} value={40} />
|
|
19
|
+
<ProgressBarCircle size="xs" min={0} max={100} value={40} />
|
|
20
|
+
<ProgressBarCircle size="sm" min={0} max={100} value={40} />
|
|
21
|
+
{/* <ProgressBarCircle size="md" min={0} max={100} value={40} /> */}
|
|
22
|
+
{/* <ProgressBarCircle size="lg" min={0} max={100} value={40} /> */}
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const CircleProgressBarLabel = () => (
|
|
27
|
+
<div className="flex flex-col items-start gap-10 md:flex-row">
|
|
28
|
+
<ProgressBarCircle size="xxs" label="Users" min={0} max={100} value={40} />
|
|
29
|
+
<ProgressBarCircle size="xs" label="Active users" min={0} max={100} value={40} />
|
|
30
|
+
<ProgressBarCircle size="sm" label="Active users" min={0} max={100} value={40} />
|
|
31
|
+
{/* <ProgressBarCircle size="md" label="Active users" min={0} max={100} value={40} /> */}
|
|
32
|
+
{/* <ProgressBarCircle size="lg" label="Active users" min={0} max={100} value={40} /> */}
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export const HalfCircleProgressBar = () => (
|
|
37
|
+
<div className="flex flex-col items-start gap-10 md:flex-row">
|
|
38
|
+
<ProgressBarHalfCircle size="xxs" min={0} max={100} value={40} />
|
|
39
|
+
<ProgressBarHalfCircle size="xs" min={0} max={100} value={40} />
|
|
40
|
+
<ProgressBarHalfCircle size="sm" min={0} max={100} value={40} />
|
|
41
|
+
{/* <ProgressBarHalfCircle size="md" min={0} max={100} value={40} /> */}
|
|
42
|
+
{/* <ProgressBarHalfCircle size="lg" min={0} max={100} value={40} /> */}
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
export const HalfCircleProgressBarLabel = () => (
|
|
47
|
+
<div className="flex flex-col items-start gap-10 md:flex-row">
|
|
48
|
+
<ProgressBarHalfCircle size="xxs" label="Users" min={0} max={100} value={40} />
|
|
49
|
+
<ProgressBarHalfCircle size="xs" label="Active users" min={0} max={100} value={40} />
|
|
50
|
+
<ProgressBarHalfCircle size="sm" label="Active users" min={0} max={100} value={40} />
|
|
51
|
+
{/* <ProgressBarHalfCircle size="md" label="Active users" min={0} max={100} value={40} /> */}
|
|
52
|
+
{/* <ProgressBarHalfCircle size="lg" label="Active users" min={0} max={100} value={40} /> */}
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import * as Demos from "./progress-indicators.demo";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Base components/Progress indicators",
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const DefaultDecorator = (Story: FC) => (
|
|
9
|
+
<div className="flex min-h-screen w-screen bg-primary p-16">
|
|
10
|
+
<div className="w-full max-w-xs">
|
|
11
|
+
<Story />
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const WiderDecorator = (Story: FC) => (
|
|
17
|
+
<div className="flex min-h-screen w-full bg-primary p-16">
|
|
18
|
+
<div className="w-100">
|
|
19
|
+
<Story />
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export const Default = () => <Demos.ProgressBarDefault />;
|
|
25
|
+
Default.decorators = [DefaultDecorator];
|
|
26
|
+
|
|
27
|
+
export const TextRight = () => <Demos.ProgressBarTextRight />;
|
|
28
|
+
TextRight.decorators = [DefaultDecorator];
|
|
29
|
+
TextRight.storyName = "Text right";
|
|
30
|
+
|
|
31
|
+
export const TextBottom = () => <Demos.ProgressBarTextBottom />;
|
|
32
|
+
TextBottom.decorators = [DefaultDecorator];
|
|
33
|
+
TextBottom.storyName = "Text bottom";
|
|
34
|
+
|
|
35
|
+
export const TextTopFloating = () => <Demos.ProgressBarTextTopFloating />;
|
|
36
|
+
TextTopFloating.decorators = [DefaultDecorator];
|
|
37
|
+
TextTopFloating.storyName = "Text top floating";
|
|
38
|
+
|
|
39
|
+
export const TextBottomFloating = () => <Demos.ProgressBarTextBottomFloating />;
|
|
40
|
+
TextBottomFloating.decorators = [DefaultDecorator];
|
|
41
|
+
TextBottomFloating.storyName = "Text bottom floating";
|
|
42
|
+
|
|
43
|
+
export const CircleProgressBar = () => <Demos.CircleProgressBar />;
|
|
44
|
+
CircleProgressBar.decorators = [WiderDecorator];
|
|
45
|
+
CircleProgressBar.storyName = "Circle progress bar";
|
|
46
|
+
|
|
47
|
+
export const CircleProgressBarLabel = () => <Demos.CircleProgressBarLabel />;
|
|
48
|
+
CircleProgressBarLabel.decorators = [WiderDecorator];
|
|
49
|
+
CircleProgressBarLabel.storyName = "Circle progress bar label";
|
|
50
|
+
|
|
51
|
+
export const HalfCircleProgressBar = () => <Demos.HalfCircleProgressBar />;
|
|
52
|
+
HalfCircleProgressBar.decorators = [WiderDecorator];
|
|
53
|
+
HalfCircleProgressBar.storyName = "Half circle progress bar";
|
|
54
|
+
|
|
55
|
+
export const HalfCircleProgressBarLabel = () => <Demos.HalfCircleProgressBarLabel />;
|
|
56
|
+
HalfCircleProgressBarLabel.decorators = [WiderDecorator];
|
|
57
|
+
HalfCircleProgressBarLabel.storyName = "Half circle progress bar label";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { RadioButton, RadioGroup } from "@/components/base/radio-buttons/radio-buttons";
|
|
4
|
+
|
|
5
|
+
export const WithLabelDemo = () => {
|
|
6
|
+
return (
|
|
7
|
+
<RadioGroup aria-label="Pricing plans" defaultValue="basic">
|
|
8
|
+
<RadioButton label="Basic plan" value="basic" />
|
|
9
|
+
<RadioButton label="Business plan" value="business" />
|
|
10
|
+
<RadioButton label="Enterprise plan" value="enterprise" />
|
|
11
|
+
</RadioGroup>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const WithLabelAndHintDemo = () => {
|
|
16
|
+
return (
|
|
17
|
+
<RadioGroup aria-label="Pricing plans" defaultValue="basic">
|
|
18
|
+
<RadioButton label="Basic plan" hint="Up to 10 users and 20 GB data." value="basic" />
|
|
19
|
+
<RadioButton label="Business plan" hint="Up to 20 users and 40 GB data." value="business" />
|
|
20
|
+
<RadioButton label="Enterprise plan" hint="Unlimited users and unlimited data." value="enterprise" />
|
|
21
|
+
</RadioGroup>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const DisabledDemo = () => {
|
|
26
|
+
return (
|
|
27
|
+
<RadioGroup aria-label="Pricing plans" isDisabled defaultValue="basic">
|
|
28
|
+
<RadioButton label="Basic plan" hint="Up to 10 users and 20 GB data." value="basic" />
|
|
29
|
+
<RadioButton label="Business plan" hint="Up to 20 users and 40 GB data." value="business" />
|
|
30
|
+
<RadioButton label="Enterprise plan" hint="Unlimited users and unlimited data." value="enterprise" />
|
|
31
|
+
</RadioGroup>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const DisabledIndividualItemDemo = () => {
|
|
36
|
+
return (
|
|
37
|
+
<RadioGroup aria-label="Pricing plans" defaultValue="basic">
|
|
38
|
+
<RadioButton label="Basic plan" hint="Up to 10 users and 20 GB data." value="basic" />
|
|
39
|
+
<RadioButton label="Business plan" hint="Up to 20 users and 40 GB data." value="business" />
|
|
40
|
+
<RadioButton isDisabled label="Enterprise plan" hint="Unlimited users and unlimited data." value="enterprise" />
|
|
41
|
+
</RadioGroup>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const RadioButtons = () => {
|
|
46
|
+
return (
|
|
47
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
48
|
+
<RadioGroup aria-label="Pricing plans" defaultValue="basic">
|
|
49
|
+
<RadioButton label="Basic plan" hint="Up to 10 users and 20 GB data." value="basic" />
|
|
50
|
+
<RadioButton label="Business plan" hint="Up to 20 users and 40 GB data." value="business" />
|
|
51
|
+
<RadioButton label="Enterprise plan" hint="Unlimited users and unlimited data." value="enterprise" />
|
|
52
|
+
</RadioGroup>
|
|
53
|
+
<RadioGroup aria-label="Pricing plans" defaultValue="basic" size="md">
|
|
54
|
+
<RadioButton label="Basic plan" hint="Up to 10 users and 20 GB data." value="basic" />
|
|
55
|
+
<RadioButton label="Business plan" hint="Up to 20 users and 40 GB data." value="business" />
|
|
56
|
+
<RadioButton label="Enterprise plan" hint="Unlimited users and unlimited data." value="enterprise" />
|
|
57
|
+
</RadioGroup>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const RadioButtonsBase = () => {
|
|
63
|
+
return (
|
|
64
|
+
<div className="grid grid-cols-2 gap-8">
|
|
65
|
+
<RadioGroup aria-label="Radio Button Example" defaultValue="option3">
|
|
66
|
+
<RadioButton value="option1" />
|
|
67
|
+
<RadioButton value="option2" />
|
|
68
|
+
<RadioButton isDisabled value="option3" />
|
|
69
|
+
</RadioGroup>
|
|
70
|
+
<RadioGroup aria-label="Radio Button Example" defaultValue="option3" size="md">
|
|
71
|
+
<RadioButton value="option1" />
|
|
72
|
+
<RadioButton value="option2" />
|
|
73
|
+
<RadioButton isDisabled value="option3" />
|
|
74
|
+
</RadioGroup>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import * as Radio from "@/components/base/radio-buttons/radio-buttons.demo";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Base components/Radio buttons",
|
|
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 RadioButtons = () => <Radio.RadioButtons />;
|
|
16
|
+
RadioButtons.storyName = "Radio buttons";
|
|
17
|
+
|
|
18
|
+
export const RadioButtonsBase = () => <Radio.RadioButtonsBase />;
|
|
19
|
+
RadioButtonsBase.storyName = "Radio buttons base";
|