@dynamic-mockups/design-system 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +396 -0
- package/dist/.storybook/ColorTokenSelect.d.ts +14 -0
- package/dist/.storybook/colorTokenOptions.d.ts +28 -0
- package/dist/.storybook/iconOptions.d.ts +54 -0
- package/dist/design-system.css +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +87 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +11635 -0
- package/dist/index.mjs.map +1 -0
- package/dist/src/components/atoms/Accordion/Accordion.d.ts +52 -0
- package/dist/src/components/atoms/Accordion/Accordion.stories.d.ts +109 -0
- package/dist/src/components/atoms/Accordion/index.d.ts +2 -0
- package/dist/src/components/atoms/AlertDialog/AlertDialog.d.ts +66 -0
- package/dist/src/components/atoms/AlertDialog/AlertDialog.stories.d.ts +144 -0
- package/dist/src/components/atoms/AlertDialog/index.d.ts +2 -0
- package/dist/src/components/atoms/Avatar/Avatar.d.ts +54 -0
- package/dist/src/components/atoms/Avatar/Avatar.stories.d.ts +119 -0
- package/dist/src/components/atoms/Avatar/index.d.ts +2 -0
- package/dist/src/components/atoms/Badge/Badge.d.ts +58 -0
- package/dist/src/components/atoms/Badge/Badge.stories.d.ts +706 -0
- package/dist/src/components/atoms/Badge/index.d.ts +2 -0
- package/dist/src/components/atoms/Button/Button.d.ts +63 -0
- package/dist/src/components/atoms/Button/Button.stories.d.ts +763 -0
- package/dist/src/components/atoms/Button/index.d.ts +2 -0
- package/dist/src/components/atoms/Card/Card.d.ts +44 -0
- package/dist/src/components/atoms/Card/Card.stories.d.ts +103 -0
- package/dist/src/components/atoms/Card/index.d.ts +2 -0
- package/dist/src/components/atoms/Checkbox/Checkbox.d.ts +52 -0
- package/dist/src/components/atoms/Checkbox/Checkbox.stories.d.ts +168 -0
- package/dist/src/components/atoms/Checkbox/index.d.ts +2 -0
- package/dist/src/components/atoms/Dialog/Dialog.d.ts +53 -0
- package/dist/src/components/atoms/Dialog/Dialog.stories.d.ts +122 -0
- package/dist/src/components/atoms/Dialog/index.d.ts +2 -0
- package/dist/src/components/atoms/DropdownMenu/DropdownMenu.d.ts +61 -0
- package/dist/src/components/atoms/DropdownMenu/DropdownMenu.stories.d.ts +109 -0
- package/dist/src/components/atoms/DropdownMenu/index.d.ts +2 -0
- package/dist/src/components/atoms/HoverCard/HoverCard.d.ts +38 -0
- package/dist/src/components/atoms/HoverCard/HoverCard.stories.d.ts +86 -0
- package/dist/src/components/atoms/HoverCard/index.d.ts +2 -0
- package/dist/src/components/atoms/Label/Label.d.ts +19 -0
- package/dist/src/components/atoms/Label/Label.stories.d.ts +100 -0
- package/dist/src/components/atoms/Label/index.d.ts +2 -0
- package/dist/src/components/atoms/Popover/Popover.d.ts +44 -0
- package/dist/src/components/atoms/Popover/Popover.stories.d.ts +94 -0
- package/dist/src/components/atoms/Popover/index.d.ts +2 -0
- package/dist/src/components/atoms/Progress/Progress.d.ts +45 -0
- package/dist/src/components/atoms/Progress/Progress.stories.d.ts +108 -0
- package/dist/src/components/atoms/Progress/index.d.ts +2 -0
- package/dist/src/components/atoms/ProgressBar/ProgressBar.d.ts +66 -0
- package/dist/src/components/atoms/ProgressBar/ProgressBar.stories.d.ts +439 -0
- package/dist/src/components/atoms/ProgressBar/index.d.ts +2 -0
- package/dist/src/components/atoms/RadioGroup/RadioGroup.d.ts +46 -0
- package/dist/src/components/atoms/RadioGroup/RadioGroup.stories.d.ts +104 -0
- package/dist/src/components/atoms/RadioGroup/index.d.ts +2 -0
- package/dist/src/components/atoms/ScrollArea/ScrollArea.d.ts +36 -0
- package/dist/src/components/atoms/ScrollArea/ScrollArea.stories.d.ts +85 -0
- package/dist/src/components/atoms/ScrollArea/index.d.ts +2 -0
- package/dist/src/components/atoms/Select/Select.d.ts +55 -0
- package/dist/src/components/atoms/Select/Select.stories.d.ts +101 -0
- package/dist/src/components/atoms/Select/index.d.ts +2 -0
- package/dist/src/components/atoms/Separator/Separator.d.ts +17 -0
- package/dist/src/components/atoms/Separator/Separator.stories.d.ts +79 -0
- package/dist/src/components/atoms/Separator/index.d.ts +2 -0
- package/dist/src/components/atoms/Slider/Slider.d.ts +55 -0
- package/dist/src/components/atoms/Slider/Slider.stories.d.ts +115 -0
- package/dist/src/components/atoms/Slider/index.d.ts +2 -0
- package/dist/src/components/atoms/Stepper/Stepper.d.ts +100 -0
- package/dist/src/components/atoms/Stepper/Stepper.stories.d.ts +496 -0
- package/dist/src/components/atoms/Stepper/index.d.ts +2 -0
- package/dist/src/components/atoms/Switch/Switch.d.ts +49 -0
- package/dist/src/components/atoms/Switch/Switch.stories.d.ts +165 -0
- package/dist/src/components/atoms/Switch/index.d.ts +2 -0
- package/dist/src/components/atoms/Tabs/Tabs.d.ts +35 -0
- package/dist/src/components/atoms/Tabs/Tabs.stories.d.ts +83 -0
- package/dist/src/components/atoms/Tabs/index.d.ts +2 -0
- package/dist/src/components/atoms/Toast/Toast.d.ts +59 -0
- package/dist/src/components/atoms/Toast/Toast.stories.d.ts +118 -0
- package/dist/src/components/atoms/Toast/index.d.ts +2 -0
- package/dist/src/components/atoms/Toggle/Toggle.d.ts +20 -0
- package/dist/src/components/atoms/Toggle/Toggle.stories.d.ts +118 -0
- package/dist/src/components/atoms/Toggle/index.d.ts +2 -0
- package/dist/src/components/atoms/Tooltip/Tooltip.d.ts +32 -0
- package/dist/src/components/atoms/Tooltip/Tooltip.stories.d.ts +87 -0
- package/dist/src/components/atoms/Tooltip/index.d.ts +2 -0
- package/dist/src/components/atoms/index.d.ts +29 -0
- package/dist/src/components/index.d.ts +9 -0
- package/dist/src/components/molecules/CheckboxChip/CheckboxChip.d.ts +65 -0
- package/dist/src/components/molecules/CheckboxChip/CheckboxChip.stories.d.ts +90 -0
- package/dist/src/components/molecules/CheckboxChip/CheckboxChipGroup.d.ts +63 -0
- package/dist/src/components/molecules/RadioSelector/RadioSelector.d.ts +72 -0
- package/dist/src/components/molecules/RadioSelector/RadioSelector.stories.d.ts +118 -0
- package/dist/src/components/molecules/index.d.ts +10 -0
- package/dist/src/components/organisms/CTABox/CTABox.d.ts +69 -0
- package/dist/src/components/organisms/CTABox/CTABox.stories.d.ts +117 -0
- package/dist/src/components/organisms/OnboardingInfoBox/OnboardingInfoBox.d.ts +65 -0
- package/dist/src/components/organisms/OnboardingInfoBox/OnboardingInfoBox.stories.d.ts +93 -0
- package/dist/src/components/organisms/index.d.ts +8 -0
- package/dist/src/components/pages/index.d.ts +5 -0
- package/dist/src/components/templates/OnboardingTemplate/OnboardingTemplate.d.ts +185 -0
- package/dist/src/components/templates/OnboardingTemplate/OnboardingTemplate.stories.d.ts +26 -0
- package/dist/src/components/templates/index.d.ts +6 -0
- package/dist/src/index.d.ts +21 -0
- package/dist/src/tests/storybook/ColorTokenSelect.test.d.ts +4 -0
- package/dist/src/theme/ThemeProvider.d.ts +36 -0
- package/dist/src/theme/index.d.ts +2 -0
- package/dist/src/theme/theme.d.ts +18 -0
- package/dist/src/tokens/colorTokens.d.ts +58 -0
- package/dist/src/tokens/colorTokens.test.d.ts +4 -0
- package/dist/src/tokens/colors.d.ts +168 -0
- package/dist/src/tokens/index.d.ts +270 -0
- package/dist/src/tokens/radii.d.ts +17 -0
- package/dist/src/tokens/shadows.d.ts +16 -0
- package/dist/src/tokens/spacing.d.ts +38 -0
- package/dist/src/tokens/typography.d.ts +57 -0
- package/package.json +104 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import type { ColorToken } from "./Tooltip";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./Tooltip").TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: {
|
|
13
|
+
control: false;
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
category: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
content: {
|
|
20
|
+
control: "text";
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
category: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
backgroundColorToken: {
|
|
27
|
+
control: "select";
|
|
28
|
+
options: ColorToken[];
|
|
29
|
+
description: string;
|
|
30
|
+
table: {
|
|
31
|
+
category: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
textColorToken: {
|
|
35
|
+
control: "select";
|
|
36
|
+
options: ColorToken[];
|
|
37
|
+
description: string;
|
|
38
|
+
table: {
|
|
39
|
+
category: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
m: {
|
|
43
|
+
table: {
|
|
44
|
+
disable: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
mx: {
|
|
48
|
+
table: {
|
|
49
|
+
disable: boolean;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
my: {
|
|
53
|
+
table: {
|
|
54
|
+
disable: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
mt: {
|
|
58
|
+
table: {
|
|
59
|
+
disable: boolean;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
mr: {
|
|
63
|
+
table: {
|
|
64
|
+
disable: boolean;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
mb: {
|
|
68
|
+
table: {
|
|
69
|
+
disable: boolean;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
ml: {
|
|
73
|
+
table: {
|
|
74
|
+
disable: boolean;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export default meta;
|
|
80
|
+
type Story = StoryObj<typeof meta>;
|
|
81
|
+
export declare const Default: Story;
|
|
82
|
+
export declare const OnIcon: Story;
|
|
83
|
+
export declare const LongText: Story;
|
|
84
|
+
export declare const OnDisabledButton: Story;
|
|
85
|
+
export declare const MultipleTooltips: Story;
|
|
86
|
+
export declare const WithKeyboardShortcut: Story;
|
|
87
|
+
export declare const InteractiveColorPicker: Story;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atoms
|
|
3
|
+
* Basic building blocks of the design system
|
|
4
|
+
*/
|
|
5
|
+
export * from "./Accordion";
|
|
6
|
+
export * from "./AlertDialog";
|
|
7
|
+
export * from "./Avatar";
|
|
8
|
+
export * from "./Badge";
|
|
9
|
+
export * from "./Button";
|
|
10
|
+
export * from "./Card";
|
|
11
|
+
export * from "./Checkbox";
|
|
12
|
+
export * from "./Dialog";
|
|
13
|
+
export * from "./DropdownMenu";
|
|
14
|
+
export * from "./HoverCard";
|
|
15
|
+
export * from "./Label";
|
|
16
|
+
export * from "./Popover";
|
|
17
|
+
export * from "./Progress";
|
|
18
|
+
export * from "./ProgressBar";
|
|
19
|
+
export * from "./RadioGroup";
|
|
20
|
+
export * from "./ScrollArea";
|
|
21
|
+
export * from "./Select";
|
|
22
|
+
export * from "./Separator";
|
|
23
|
+
export * from "./Slider";
|
|
24
|
+
export * from "./Stepper";
|
|
25
|
+
export * from "./Switch";
|
|
26
|
+
export * from "./Tabs";
|
|
27
|
+
export * from "./Toast";
|
|
28
|
+
export * from "./Toggle";
|
|
29
|
+
export * from "./Tooltip";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CheckboxChip Component
|
|
3
|
+
* A checkbox chip/tag component with optional icon and checked state
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { type ColorToken } from "../../../tokens";
|
|
7
|
+
import "./CheckboxChip.scss";
|
|
8
|
+
export type { ColorToken } from "../../../tokens";
|
|
9
|
+
export interface CheckboxChipProps {
|
|
10
|
+
/**
|
|
11
|
+
* Label text
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the chip is checked
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
checked?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Solar icon name (optional)
|
|
21
|
+
*/
|
|
22
|
+
icon?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the chip is disabled
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Change handler
|
|
30
|
+
*/
|
|
31
|
+
onChange?: (checked: boolean) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Custom className
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Color token for checked border
|
|
38
|
+
*/
|
|
39
|
+
checkedBorderColorToken?: ColorToken;
|
|
40
|
+
/**
|
|
41
|
+
* Color token for checked background
|
|
42
|
+
*/
|
|
43
|
+
checkedBackgroundColorToken?: ColorToken;
|
|
44
|
+
/**
|
|
45
|
+
* Color token for checked text
|
|
46
|
+
*/
|
|
47
|
+
checkedTextColorToken?: ColorToken;
|
|
48
|
+
/**
|
|
49
|
+
* Color token for checked icon
|
|
50
|
+
*/
|
|
51
|
+
checkedIconColorToken?: ColorToken;
|
|
52
|
+
/**
|
|
53
|
+
* Color token for default border
|
|
54
|
+
*/
|
|
55
|
+
defaultBorderColorToken?: ColorToken;
|
|
56
|
+
/**
|
|
57
|
+
* Color token for default text
|
|
58
|
+
*/
|
|
59
|
+
defaultTextColorToken?: ColorToken;
|
|
60
|
+
/**
|
|
61
|
+
* Color token for default icon
|
|
62
|
+
*/
|
|
63
|
+
defaultIconColorToken?: ColorToken;
|
|
64
|
+
}
|
|
65
|
+
export declare const CheckboxChip: React.ForwardRefExoticComponent<CheckboxChipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
declare const chipMeta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./CheckboxChip").CheckboxChipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
label: {
|
|
12
|
+
control: "text";
|
|
13
|
+
description: string;
|
|
14
|
+
table: {
|
|
15
|
+
category: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
icon: {
|
|
19
|
+
control: "text";
|
|
20
|
+
description: string;
|
|
21
|
+
table: {
|
|
22
|
+
category: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
checked: {
|
|
26
|
+
control: "boolean";
|
|
27
|
+
description: string;
|
|
28
|
+
table: {
|
|
29
|
+
category: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
disabled: {
|
|
33
|
+
control: "boolean";
|
|
34
|
+
description: string;
|
|
35
|
+
table: {
|
|
36
|
+
category: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default chipMeta;
|
|
42
|
+
type ChipStory = StoryObj<typeof chipMeta>;
|
|
43
|
+
export declare const UncheckedNoIcon: ChipStory;
|
|
44
|
+
export declare const UncheckedWithIcon: ChipStory;
|
|
45
|
+
export declare const CheckedNoIcon: ChipStory;
|
|
46
|
+
export declare const CheckedWithIcon: ChipStory;
|
|
47
|
+
export declare const Disabled: ChipStory;
|
|
48
|
+
export declare const InteractiveSingleChip: ChipStory;
|
|
49
|
+
declare const groupMeta: {
|
|
50
|
+
title: string;
|
|
51
|
+
component: React.ForwardRefExoticComponent<import("./CheckboxChipGroup").CheckboxChipGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
parameters: {
|
|
53
|
+
layout: string;
|
|
54
|
+
};
|
|
55
|
+
tags: string[];
|
|
56
|
+
argTypes: {
|
|
57
|
+
options: {
|
|
58
|
+
control: "object";
|
|
59
|
+
description: string;
|
|
60
|
+
table: {
|
|
61
|
+
category: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
value: {
|
|
65
|
+
control: "object";
|
|
66
|
+
description: string;
|
|
67
|
+
table: {
|
|
68
|
+
category: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
maxRows: {
|
|
72
|
+
control: "number";
|
|
73
|
+
description: string;
|
|
74
|
+
table: {
|
|
75
|
+
category: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export { groupMeta };
|
|
81
|
+
type GroupStory = StoryObj<typeof groupMeta>;
|
|
82
|
+
export declare const TwoRowsNoScroll: GroupStory;
|
|
83
|
+
export declare const FourRowsFigmaDesign: GroupStory;
|
|
84
|
+
export declare const FiveRowsWithScroll: GroupStory;
|
|
85
|
+
export declare const OneRowNoScroll: GroupStory;
|
|
86
|
+
export declare const ThreeRowsNoScroll: GroupStory;
|
|
87
|
+
export declare const WithoutIcons: GroupStory;
|
|
88
|
+
export declare const MixedIcons: GroupStory;
|
|
89
|
+
export declare const InteractiveGroup: GroupStory;
|
|
90
|
+
export declare const CustomColors: GroupStory;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CheckboxChipGroup Component
|
|
3
|
+
* A group of checkbox chips with automatic scroll handling
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { ColorToken } from "./CheckboxChip";
|
|
7
|
+
import "./CheckboxChip.scss";
|
|
8
|
+
export type { ColorToken } from "../../../tokens";
|
|
9
|
+
export interface CheckboxChipOption {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier
|
|
12
|
+
*/
|
|
13
|
+
value: string;
|
|
14
|
+
/**
|
|
15
|
+
* Display label
|
|
16
|
+
*/
|
|
17
|
+
label: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional icon
|
|
20
|
+
*/
|
|
21
|
+
icon?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the option is disabled
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface CheckboxChipGroupProps {
|
|
28
|
+
/**
|
|
29
|
+
* Array of chip options
|
|
30
|
+
*/
|
|
31
|
+
options: CheckboxChipOption[];
|
|
32
|
+
/**
|
|
33
|
+
* Array of selected values
|
|
34
|
+
*/
|
|
35
|
+
value?: string[];
|
|
36
|
+
/**
|
|
37
|
+
* Change handler
|
|
38
|
+
*/
|
|
39
|
+
onChange?: (value: string[]) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Maximum number of rows before scrolling
|
|
42
|
+
* @default 4
|
|
43
|
+
*/
|
|
44
|
+
maxRows?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Custom className
|
|
47
|
+
*/
|
|
48
|
+
className?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Color tokens for checked state
|
|
51
|
+
*/
|
|
52
|
+
checkedBorderColorToken?: ColorToken;
|
|
53
|
+
checkedBackgroundColorToken?: ColorToken;
|
|
54
|
+
checkedTextColorToken?: ColorToken;
|
|
55
|
+
checkedIconColorToken?: ColorToken;
|
|
56
|
+
/**
|
|
57
|
+
* Color tokens for default state
|
|
58
|
+
*/
|
|
59
|
+
defaultBorderColorToken?: ColorToken;
|
|
60
|
+
defaultTextColorToken?: ColorToken;
|
|
61
|
+
defaultIconColorToken?: ColorToken;
|
|
62
|
+
}
|
|
63
|
+
export declare const CheckboxChipGroup: React.ForwardRefExoticComponent<CheckboxChipGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RadioSelector Component
|
|
3
|
+
* A radio selector component with icon, title, and optional subtext
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { type ColorToken } from "../../../tokens";
|
|
7
|
+
import "./RadioSelector.scss";
|
|
8
|
+
export type { ColorToken } from "../../../tokens";
|
|
9
|
+
export interface RadioSelectorProps {
|
|
10
|
+
/**
|
|
11
|
+
* Current state of the radio selector
|
|
12
|
+
* @default 'default'
|
|
13
|
+
*/
|
|
14
|
+
state?: "default" | "active";
|
|
15
|
+
/**
|
|
16
|
+
* Whether to show the icon
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
showIcon?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to show the body text (subtext)
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
showSubtext?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Solar icon name for the left icon
|
|
27
|
+
* @default 'folder-bold'
|
|
28
|
+
*/
|
|
29
|
+
icon?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Title text
|
|
32
|
+
*/
|
|
33
|
+
title: string;
|
|
34
|
+
/**
|
|
35
|
+
* Subtext description
|
|
36
|
+
*/
|
|
37
|
+
subtext?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the selector is disabled
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Click handler
|
|
45
|
+
*/
|
|
46
|
+
onClick?: () => void;
|
|
47
|
+
/**
|
|
48
|
+
* Custom className
|
|
49
|
+
*/
|
|
50
|
+
className?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Color token for active border
|
|
53
|
+
*/
|
|
54
|
+
activeBorderColorToken?: ColorToken;
|
|
55
|
+
/**
|
|
56
|
+
* Color token for active background
|
|
57
|
+
*/
|
|
58
|
+
activeBackgroundColorToken?: ColorToken;
|
|
59
|
+
/**
|
|
60
|
+
* Color token for active text
|
|
61
|
+
*/
|
|
62
|
+
activeTextColorToken?: ColorToken;
|
|
63
|
+
/**
|
|
64
|
+
* Color token for default border
|
|
65
|
+
*/
|
|
66
|
+
defaultBorderColorToken?: ColorToken;
|
|
67
|
+
/**
|
|
68
|
+
* Color token for default text
|
|
69
|
+
*/
|
|
70
|
+
defaultTextColorToken?: ColorToken;
|
|
71
|
+
}
|
|
72
|
+
export declare const RadioSelector: React.ForwardRefExoticComponent<RadioSelectorProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import type { ColorToken } from "./RadioSelector";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./RadioSelector").RadioSelectorProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
title: {
|
|
13
|
+
control: "text";
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
category: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
subtext: {
|
|
20
|
+
control: "text";
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
category: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
icon: {
|
|
27
|
+
control: "text";
|
|
28
|
+
description: string;
|
|
29
|
+
table: {
|
|
30
|
+
category: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
state: {
|
|
34
|
+
control: "select";
|
|
35
|
+
options: string[];
|
|
36
|
+
description: string;
|
|
37
|
+
table: {
|
|
38
|
+
category: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
showIcon: {
|
|
42
|
+
control: "boolean";
|
|
43
|
+
description: string;
|
|
44
|
+
table: {
|
|
45
|
+
category: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
showSubtext: {
|
|
49
|
+
control: "boolean";
|
|
50
|
+
description: string;
|
|
51
|
+
table: {
|
|
52
|
+
category: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
disabled: {
|
|
56
|
+
control: "boolean";
|
|
57
|
+
description: string;
|
|
58
|
+
table: {
|
|
59
|
+
category: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
activeBorderColorToken: {
|
|
63
|
+
control: "select";
|
|
64
|
+
options: ColorToken[];
|
|
65
|
+
description: string;
|
|
66
|
+
table: {
|
|
67
|
+
category: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
activeBackgroundColorToken: {
|
|
71
|
+
control: "select";
|
|
72
|
+
options: ColorToken[];
|
|
73
|
+
description: string;
|
|
74
|
+
table: {
|
|
75
|
+
category: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
activeTextColorToken: {
|
|
79
|
+
control: "select";
|
|
80
|
+
options: ColorToken[];
|
|
81
|
+
description: string;
|
|
82
|
+
table: {
|
|
83
|
+
category: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
defaultBorderColorToken: {
|
|
87
|
+
control: "select";
|
|
88
|
+
options: ColorToken[];
|
|
89
|
+
description: string;
|
|
90
|
+
table: {
|
|
91
|
+
category: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
defaultTextColorToken: {
|
|
95
|
+
control: "select";
|
|
96
|
+
options: ColorToken[];
|
|
97
|
+
description: string;
|
|
98
|
+
table: {
|
|
99
|
+
category: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
export default meta;
|
|
105
|
+
type Story = StoryObj<typeof meta>;
|
|
106
|
+
export declare const DefaultWithIconAndSubtext: Story;
|
|
107
|
+
export declare const DefaultWithIconNoSubtext: Story;
|
|
108
|
+
export declare const DefaultNoIconWithSubtext: Story;
|
|
109
|
+
export declare const DefaultNoIconNoSubtext: Story;
|
|
110
|
+
export declare const ActiveWithIconAndSubtext: Story;
|
|
111
|
+
export declare const ActiveWithIconNoSubtext: Story;
|
|
112
|
+
export declare const ActiveNoIconWithSubtext: Story;
|
|
113
|
+
export declare const ActiveNoIconNoSubtext: Story;
|
|
114
|
+
export declare const Disabled: Story;
|
|
115
|
+
export declare const DifferentIcons: Story;
|
|
116
|
+
export declare const AllStates: Story;
|
|
117
|
+
export declare const Interactive: Story;
|
|
118
|
+
export declare const TokenCustomization: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Molecules
|
|
3
|
+
* Combinations of atoms that form more complex UI elements
|
|
4
|
+
*/
|
|
5
|
+
export { RadioSelector } from "./RadioSelector/RadioSelector";
|
|
6
|
+
export type { RadioSelectorProps } from "./RadioSelector/RadioSelector";
|
|
7
|
+
export { CheckboxChip } from "./CheckboxChip/CheckboxChip";
|
|
8
|
+
export type { CheckboxChipProps } from "./CheckboxChip/CheckboxChip";
|
|
9
|
+
export { CheckboxChipGroup } from "./CheckboxChip/CheckboxChipGroup";
|
|
10
|
+
export type { CheckboxChipGroupProps, CheckboxChipOption, } from "./CheckboxChip/CheckboxChipGroup";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CTABox Component
|
|
3
|
+
* A call-to-action box with label, heading, description, and action button
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { type ColorToken } from "../../../tokens";
|
|
7
|
+
import "./CTABox.scss";
|
|
8
|
+
export type { ColorToken } from "../../../tokens";
|
|
9
|
+
export interface CTABoxProps {
|
|
10
|
+
/**
|
|
11
|
+
* Small uppercase label text
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Main heading text
|
|
16
|
+
*/
|
|
17
|
+
heading: string;
|
|
18
|
+
/**
|
|
19
|
+
* Description text
|
|
20
|
+
*/
|
|
21
|
+
description: string;
|
|
22
|
+
/**
|
|
23
|
+
* Button text
|
|
24
|
+
* @default 'Get Started'
|
|
25
|
+
*/
|
|
26
|
+
buttonText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Button click handler
|
|
29
|
+
*/
|
|
30
|
+
onButtonClick?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the button is disabled
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
buttonDisabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Custom className
|
|
38
|
+
*/
|
|
39
|
+
className?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Color token for the background
|
|
42
|
+
*/
|
|
43
|
+
backgroundColorToken?: ColorToken;
|
|
44
|
+
/**
|
|
45
|
+
* Color token for the border
|
|
46
|
+
*/
|
|
47
|
+
borderColorToken?: ColorToken;
|
|
48
|
+
/**
|
|
49
|
+
* Color token for the label text
|
|
50
|
+
*/
|
|
51
|
+
labelColorToken?: ColorToken;
|
|
52
|
+
/**
|
|
53
|
+
* Color token for the heading text
|
|
54
|
+
*/
|
|
55
|
+
headingColorToken?: ColorToken;
|
|
56
|
+
/**
|
|
57
|
+
* Color token for the description text
|
|
58
|
+
*/
|
|
59
|
+
descriptionColorToken?: ColorToken;
|
|
60
|
+
/**
|
|
61
|
+
* Color token for the button background
|
|
62
|
+
*/
|
|
63
|
+
buttonBackgroundColorToken?: ColorToken;
|
|
64
|
+
/**
|
|
65
|
+
* Color token for the button text
|
|
66
|
+
*/
|
|
67
|
+
buttonTextColorToken?: ColorToken;
|
|
68
|
+
}
|
|
69
|
+
export declare const CTABox: React.ForwardRefExoticComponent<CTABoxProps & React.RefAttributes<HTMLDivElement>>;
|