@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,109 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import type { ColorToken } from "./DropdownMenu";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./DropdownMenu").DropdownMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
trigger: {
|
|
13
|
+
control: false;
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
category: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
items: {
|
|
20
|
+
control: "object";
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
category: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
size: {
|
|
27
|
+
control: "select";
|
|
28
|
+
options: string[];
|
|
29
|
+
description: string;
|
|
30
|
+
table: {
|
|
31
|
+
category: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
variant: {
|
|
35
|
+
control: "select";
|
|
36
|
+
options: string[];
|
|
37
|
+
description: string;
|
|
38
|
+
table: {
|
|
39
|
+
category: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
onSelect: {
|
|
43
|
+
control: false;
|
|
44
|
+
description: string;
|
|
45
|
+
table: {
|
|
46
|
+
category: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
backgroundColorToken: {
|
|
50
|
+
control: "select";
|
|
51
|
+
options: ColorToken[];
|
|
52
|
+
description: string;
|
|
53
|
+
table: {
|
|
54
|
+
category: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
textColorToken: {
|
|
58
|
+
control: "select";
|
|
59
|
+
options: ColorToken[];
|
|
60
|
+
description: string;
|
|
61
|
+
table: {
|
|
62
|
+
category: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
m: {
|
|
66
|
+
table: {
|
|
67
|
+
disable: boolean;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
mx: {
|
|
71
|
+
table: {
|
|
72
|
+
disable: boolean;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
my: {
|
|
76
|
+
table: {
|
|
77
|
+
disable: boolean;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
mt: {
|
|
81
|
+
table: {
|
|
82
|
+
disable: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
mr: {
|
|
86
|
+
table: {
|
|
87
|
+
disable: boolean;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
mb: {
|
|
91
|
+
table: {
|
|
92
|
+
disable: boolean;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
ml: {
|
|
96
|
+
table: {
|
|
97
|
+
disable: boolean;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export default meta;
|
|
103
|
+
type Story = StoryObj<typeof meta>;
|
|
104
|
+
export declare const Default: Story;
|
|
105
|
+
export declare const WithColors: Story;
|
|
106
|
+
export declare const WithDisabled: Story;
|
|
107
|
+
export declare const Sizes: Story;
|
|
108
|
+
export declare const Variants: Story;
|
|
109
|
+
export declare const InteractiveColorPicker: Story;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HoverCard Component
|
|
3
|
+
* A hover card component that extends Radix UI HoverCard
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { HoverCard as RadixHoverCard } from "@radix-ui/themes";
|
|
7
|
+
import { type ColorToken } from "../../../tokens";
|
|
8
|
+
import "./HoverCard.scss";
|
|
9
|
+
export type { ColorToken } from "../../../tokens";
|
|
10
|
+
type HoverCardRootProps = React.ComponentPropsWithoutRef<typeof RadixHoverCard.Root>;
|
|
11
|
+
type HoverCardContentProps = React.ComponentPropsWithoutRef<typeof RadixHoverCard.Content>;
|
|
12
|
+
export interface HoverCardProps extends Omit<HoverCardRootProps, "children"> {
|
|
13
|
+
/**
|
|
14
|
+
* Trigger element that shows the hover card
|
|
15
|
+
*/
|
|
16
|
+
trigger: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Content to display in the hover card
|
|
19
|
+
*/
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Color token for hover card background
|
|
23
|
+
*/
|
|
24
|
+
backgroundColorToken?: ColorToken;
|
|
25
|
+
/**
|
|
26
|
+
* Color token for hover card text
|
|
27
|
+
*/
|
|
28
|
+
textColorToken?: ColorToken;
|
|
29
|
+
/**
|
|
30
|
+
* Content props for positioning and styling
|
|
31
|
+
*/
|
|
32
|
+
contentProps?: Partial<HoverCardContentProps>;
|
|
33
|
+
/**
|
|
34
|
+
* Custom className
|
|
35
|
+
*/
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare const HoverCard: React.ForwardRefExoticComponent<HoverCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import type { ColorToken } from "./HoverCard";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./HoverCard").HoverCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
trigger: {
|
|
13
|
+
control: false;
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
category: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
children: {
|
|
20
|
+
control: false;
|
|
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 UserProfile: Story;
|
|
83
|
+
export declare const ProductInfo: Story;
|
|
84
|
+
export declare const Tooltip: Story;
|
|
85
|
+
export declare const LinkPreview: Story;
|
|
86
|
+
export declare const InteractiveColorPicker: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Label Component
|
|
3
|
+
* A label component that extends Radix UI Label
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { TextProps } from "@radix-ui/themes";
|
|
7
|
+
import { type ColorToken } from "../../../tokens";
|
|
8
|
+
import "./Label.scss";
|
|
9
|
+
export type { ColorToken } from "../../../tokens";
|
|
10
|
+
export type LabelSize = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
11
|
+
export type LabelWeight = "light" | "regular" | "medium" | "bold";
|
|
12
|
+
export interface LabelProps extends Omit<TextProps, "size" | "weight" | "as" | "m" | "mx" | "my" | "mt" | "mr" | "mb" | "ml"> {
|
|
13
|
+
size?: LabelSize;
|
|
14
|
+
weight?: LabelWeight;
|
|
15
|
+
textColorToken?: ColorToken;
|
|
16
|
+
htmlFor?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import type { ColorToken } from "./Label";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./Label").LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: {
|
|
13
|
+
control: "text";
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
category: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
size: {
|
|
20
|
+
control: "select";
|
|
21
|
+
options: string[];
|
|
22
|
+
description: string;
|
|
23
|
+
table: {
|
|
24
|
+
category: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
weight: {
|
|
28
|
+
control: "select";
|
|
29
|
+
options: string[];
|
|
30
|
+
description: string;
|
|
31
|
+
table: {
|
|
32
|
+
category: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
htmlFor: {
|
|
36
|
+
control: "text";
|
|
37
|
+
description: string;
|
|
38
|
+
table: {
|
|
39
|
+
category: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
required: {
|
|
43
|
+
control: "boolean";
|
|
44
|
+
description: string;
|
|
45
|
+
table: {
|
|
46
|
+
category: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
textColorToken: {
|
|
50
|
+
control: "select";
|
|
51
|
+
options: ColorToken[];
|
|
52
|
+
description: string;
|
|
53
|
+
table: {
|
|
54
|
+
category: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
m: {
|
|
58
|
+
table: {
|
|
59
|
+
disable: boolean;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
mx: {
|
|
63
|
+
table: {
|
|
64
|
+
disable: boolean;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
my: {
|
|
68
|
+
table: {
|
|
69
|
+
disable: boolean;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
mt: {
|
|
73
|
+
table: {
|
|
74
|
+
disable: boolean;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
mr: {
|
|
78
|
+
table: {
|
|
79
|
+
disable: boolean;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
mb: {
|
|
83
|
+
table: {
|
|
84
|
+
disable: boolean;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
ml: {
|
|
88
|
+
table: {
|
|
89
|
+
disable: boolean;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export default meta;
|
|
95
|
+
type Story = StoryObj<typeof meta>;
|
|
96
|
+
export declare const Default: Story;
|
|
97
|
+
export declare const Required: Story;
|
|
98
|
+
export declare const Sizes: Story;
|
|
99
|
+
export declare const Weights: Story;
|
|
100
|
+
export declare const InteractiveColorPicker: Story;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Popover Component
|
|
3
|
+
* A popover component that extends Radix UI Popover
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Popover as RadixPopover } from "@radix-ui/themes";
|
|
7
|
+
import { type ColorToken } from "../../../tokens";
|
|
8
|
+
import "./Popover.scss";
|
|
9
|
+
export type { ColorToken } from "../../../tokens";
|
|
10
|
+
export type PopoverSize = "1" | "2" | "3" | "4";
|
|
11
|
+
type PopoverRootProps = React.ComponentPropsWithoutRef<typeof RadixPopover.Root>;
|
|
12
|
+
type PopoverContentProps = React.ComponentPropsWithoutRef<typeof RadixPopover.Content>;
|
|
13
|
+
export interface PopoverProps extends Omit<PopoverRootProps, "children"> {
|
|
14
|
+
/**
|
|
15
|
+
* Trigger element that opens the popover
|
|
16
|
+
*/
|
|
17
|
+
trigger: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Content to display in the popover
|
|
20
|
+
*/
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Popover size
|
|
24
|
+
* @default '1'
|
|
25
|
+
*/
|
|
26
|
+
size?: PopoverSize;
|
|
27
|
+
/**
|
|
28
|
+
* Color token for popover background
|
|
29
|
+
*/
|
|
30
|
+
backgroundColorToken?: ColorToken;
|
|
31
|
+
/**
|
|
32
|
+
* Color token for popover text
|
|
33
|
+
*/
|
|
34
|
+
textColorToken?: ColorToken;
|
|
35
|
+
/**
|
|
36
|
+
* Content props for positioning
|
|
37
|
+
*/
|
|
38
|
+
contentProps?: Partial<PopoverContentProps>;
|
|
39
|
+
/**
|
|
40
|
+
* Custom className
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import type { ColorToken } from "./Popover";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./Popover").PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
trigger: {
|
|
13
|
+
control: false;
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
category: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
children: {
|
|
20
|
+
control: false;
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
category: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
size: {
|
|
27
|
+
control: "select";
|
|
28
|
+
options: string[];
|
|
29
|
+
description: string;
|
|
30
|
+
table: {
|
|
31
|
+
category: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
backgroundColorToken: {
|
|
35
|
+
control: "select";
|
|
36
|
+
options: ColorToken[];
|
|
37
|
+
description: string;
|
|
38
|
+
table: {
|
|
39
|
+
category: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
textColorToken: {
|
|
43
|
+
control: "select";
|
|
44
|
+
options: ColorToken[];
|
|
45
|
+
description: string;
|
|
46
|
+
table: {
|
|
47
|
+
category: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
m: {
|
|
51
|
+
table: {
|
|
52
|
+
disable: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
mx: {
|
|
56
|
+
table: {
|
|
57
|
+
disable: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
my: {
|
|
61
|
+
table: {
|
|
62
|
+
disable: boolean;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
mt: {
|
|
66
|
+
table: {
|
|
67
|
+
disable: boolean;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
mr: {
|
|
71
|
+
table: {
|
|
72
|
+
disable: boolean;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
mb: {
|
|
76
|
+
table: {
|
|
77
|
+
disable: boolean;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
ml: {
|
|
81
|
+
table: {
|
|
82
|
+
disable: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export default meta;
|
|
88
|
+
type Story = StoryObj<typeof meta>;
|
|
89
|
+
export declare const Default: Story;
|
|
90
|
+
export declare const Sizes: Story;
|
|
91
|
+
export declare const WithForm: Story;
|
|
92
|
+
export declare const ColorPicker: Story;
|
|
93
|
+
export declare const ShareDialog: Story;
|
|
94
|
+
export declare const InteractiveColorPicker: Story;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress Component
|
|
3
|
+
* A progress component that extends Radix UI Progress
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { ProgressProps as RadixProgressProps } from "@radix-ui/themes";
|
|
7
|
+
import { type ColorToken } from "../../../tokens";
|
|
8
|
+
import "./Progress.scss";
|
|
9
|
+
export type { ColorToken } from "../../../tokens";
|
|
10
|
+
export type ProgressSize = "1" | "2" | "3";
|
|
11
|
+
export type ProgressVariant = "classic" | "surface" | "soft";
|
|
12
|
+
export interface ProgressProps extends Omit<RadixProgressProps, "size" | "variant" | "m" | "mx" | "my" | "mt" | "mr" | "mb" | "ml"> {
|
|
13
|
+
/**
|
|
14
|
+
* Progress size
|
|
15
|
+
* @default '2'
|
|
16
|
+
*/
|
|
17
|
+
size?: ProgressSize;
|
|
18
|
+
/**
|
|
19
|
+
* Progress variant
|
|
20
|
+
* @default 'classic'
|
|
21
|
+
*/
|
|
22
|
+
variant?: ProgressVariant;
|
|
23
|
+
/**
|
|
24
|
+
* Progress value (0-100)
|
|
25
|
+
*/
|
|
26
|
+
value?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum value
|
|
29
|
+
* @default 100
|
|
30
|
+
*/
|
|
31
|
+
max?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Color token for progress bar background
|
|
34
|
+
*/
|
|
35
|
+
backgroundColorToken?: ColorToken;
|
|
36
|
+
/**
|
|
37
|
+
* Color token for progress bar fill
|
|
38
|
+
*/
|
|
39
|
+
fillColorToken?: ColorToken;
|
|
40
|
+
/**
|
|
41
|
+
* Custom className
|
|
42
|
+
*/
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import type { ColorToken } from "./Progress";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./Progress").ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
size: {
|
|
13
|
+
control: "select";
|
|
14
|
+
options: string[];
|
|
15
|
+
description: string;
|
|
16
|
+
table: {
|
|
17
|
+
category: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
variant: {
|
|
21
|
+
control: "select";
|
|
22
|
+
options: string[];
|
|
23
|
+
description: string;
|
|
24
|
+
table: {
|
|
25
|
+
category: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
value: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "range";
|
|
31
|
+
min: number;
|
|
32
|
+
max: number;
|
|
33
|
+
step: number;
|
|
34
|
+
};
|
|
35
|
+
description: string;
|
|
36
|
+
table: {
|
|
37
|
+
category: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
max: {
|
|
41
|
+
control: "number";
|
|
42
|
+
description: string;
|
|
43
|
+
table: {
|
|
44
|
+
category: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
backgroundColorToken: {
|
|
48
|
+
control: "select";
|
|
49
|
+
options: ColorToken[];
|
|
50
|
+
description: string;
|
|
51
|
+
table: {
|
|
52
|
+
category: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
fillColorToken: {
|
|
56
|
+
control: "select";
|
|
57
|
+
options: ColorToken[];
|
|
58
|
+
description: string;
|
|
59
|
+
table: {
|
|
60
|
+
category: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
m: {
|
|
64
|
+
table: {
|
|
65
|
+
disable: boolean;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
mx: {
|
|
69
|
+
table: {
|
|
70
|
+
disable: boolean;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
my: {
|
|
74
|
+
table: {
|
|
75
|
+
disable: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
mt: {
|
|
79
|
+
table: {
|
|
80
|
+
disable: boolean;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
mr: {
|
|
84
|
+
table: {
|
|
85
|
+
disable: boolean;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
mb: {
|
|
89
|
+
table: {
|
|
90
|
+
disable: boolean;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
ml: {
|
|
94
|
+
table: {
|
|
95
|
+
disable: boolean;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export default meta;
|
|
101
|
+
type Story = StoryObj<typeof meta>;
|
|
102
|
+
export declare const Default: Story;
|
|
103
|
+
export declare const Sizes: Story;
|
|
104
|
+
export declare const Variants: Story;
|
|
105
|
+
export declare const DifferentValues: Story;
|
|
106
|
+
export declare const Animated: Story;
|
|
107
|
+
export declare const FileUpload: Story;
|
|
108
|
+
export declare const InteractiveColorPicker: Story;
|