@beydesign/storybook 0.0.1 → 0.0.2
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/README.md +60 -40
- package/dist/App.js +161 -5
- package/dist/assets/animations/loading-animation.json +1 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +12 -4
- package/dist/stories/Agent/AgentCard.d.ts +3 -0
- package/dist/stories/Agent/AgentCard.js +102 -0
- package/dist/stories/Agent/AgentCard.stories.d.ts +13 -0
- package/dist/stories/Agent/AgentCard.stories.js +303 -0
- package/dist/stories/Agent/AgentCardSkeleton.d.ts +2 -0
- package/dist/stories/Agent/AgentCardSkeleton.js +6 -0
- package/dist/stories/Agent/AgentCardSkeleton.stories.d.ts +13 -0
- package/dist/stories/Agent/AgentCardSkeleton.stories.js +101 -0
- package/dist/stories/Agent/CreateNewCard.d.ts +7 -0
- package/dist/stories/Agent/CreateNewCard.js +25 -0
- package/dist/stories/Agent/CreateNewCard.stories.d.ts +7 -0
- package/dist/stories/Agent/CreateNewCard.stories.js +23 -0
- package/dist/stories/Agent/index.d.ts +4 -0
- package/dist/stories/Agent/index.js +4 -0
- package/dist/stories/Agent/types.d.ts +96 -0
- package/dist/stories/Agent/types.js +7 -0
- package/dist/stories/Buttons/MainButton.d.ts +3 -0
- package/dist/stories/Buttons/MainButton.js +302 -0
- package/dist/stories/Buttons/MainButton.stories.d.ts +28 -0
- package/dist/stories/Buttons/MainButton.stories.js +299 -0
- package/dist/stories/Buttons/ToggleButtonGroup.d.ts +3 -0
- package/dist/stories/Buttons/ToggleButtonGroup.js +34 -0
- package/dist/stories/Buttons/ToggleButtonGroup.stories.d.ts +9 -0
- package/dist/stories/Buttons/ToggleButtonGroup.stories.js +78 -0
- package/dist/stories/Buttons/index.d.ts +3 -0
- package/dist/stories/Buttons/index.js +3 -0
- package/dist/stories/{types/button.d.ts → Buttons/types.d.ts} +37 -14
- package/dist/stories/{types/button.js → Buttons/types.js} +12 -2
- package/dist/stories/Credits/CreditsCard.d.ts +3 -0
- package/dist/stories/Credits/CreditsCard.js +53 -0
- package/dist/stories/Credits/CreditsCard.stories.d.ts +7 -0
- package/dist/stories/Credits/CreditsCard.stories.js +34 -0
- package/dist/stories/Credits/CreditsCardSkeleton.d.ts +3 -0
- package/dist/stories/Credits/CreditsCardSkeleton.js +30 -0
- package/dist/stories/Credits/CreditsCardSkeleton.stories.d.ts +7 -0
- package/dist/stories/Credits/CreditsCardSkeleton.stories.js +40 -0
- package/dist/stories/Credits/index.d.ts +3 -0
- package/dist/stories/Credits/index.js +3 -0
- package/dist/stories/Credits/types.d.ts +57 -0
- package/dist/stories/Credits/types.js +11 -0
- package/dist/stories/EntityCard/EntityCard.d.ts +3 -0
- package/dist/stories/EntityCard/EntityCard.js +22 -0
- package/dist/stories/EntityCard/EntityCard.stories.d.ts +10 -0
- package/dist/stories/EntityCard/EntityCard.stories.js +187 -0
- package/dist/stories/EntityCard/EntityCardSkeleton.d.ts +3 -0
- package/dist/stories/EntityCard/EntityCardSkeleton.js +9 -0
- package/dist/stories/EntityCard/EntityCardSkeleton.stories.d.ts +10 -0
- package/dist/stories/EntityCard/EntityCardSkeleton.stories.js +73 -0
- package/dist/stories/EntityCard/index.d.ts +3 -0
- package/dist/stories/EntityCard/index.js +3 -0
- package/dist/stories/EntityCard/types.d.ts +54 -0
- package/dist/stories/EntityCard/types.js +1 -0
- package/dist/stories/Form/AutoComplete.d.ts +3 -0
- package/dist/stories/Form/AutoComplete.js +163 -0
- package/dist/stories/Form/AutoComplete.stories.d.ts +6 -0
- package/dist/stories/Form/AutoComplete.stories.js +88 -0
- package/dist/stories/Form/Checkbox.d.ts +3 -0
- package/dist/stories/Form/Checkbox.js +65 -0
- package/dist/stories/Form/Checkbox.stories.d.ts +13 -0
- package/dist/stories/Form/Checkbox.stories.js +121 -0
- package/dist/stories/Form/Dropdown.d.ts +3 -0
- package/dist/stories/Form/Dropdown.js +183 -0
- package/dist/stories/Form/Dropdown.stories.d.ts +6 -0
- package/dist/stories/Form/Dropdown.stories.js +122 -0
- package/dist/stories/Form/FileUpload/FileUpload.d.ts +3 -0
- package/dist/stories/Form/FileUpload/FileUpload.js +128 -0
- package/dist/stories/Form/FileUpload/FileUpload.stories.d.ts +7 -0
- package/dist/stories/Form/FileUpload/FileUpload.stories.js +51 -0
- package/dist/stories/Form/FileUpload/FileUploading.d.ts +3 -0
- package/dist/stories/Form/FileUpload/FileUploading.js +49 -0
- package/dist/stories/Form/FileUpload/FileUploading.stories.d.ts +10 -0
- package/dist/stories/Form/FileUpload/FileUploading.stories.js +108 -0
- package/dist/stories/Form/FileUpload/UploadedFile.d.ts +3 -0
- package/dist/stories/Form/FileUpload/UploadedFile.js +12 -0
- package/dist/stories/Form/FileUpload/UploadedFile.stories.d.ts +7 -0
- package/dist/stories/Form/FileUpload/UploadedFile.stories.js +73 -0
- package/dist/stories/Form/FileUpload/index.d.ts +3 -0
- package/dist/stories/Form/FileUpload/index.js +3 -0
- package/dist/stories/Form/TextArea.d.ts +3 -0
- package/dist/stories/Form/TextArea.js +23 -0
- package/dist/stories/Form/TextArea.stories.d.ts +161 -0
- package/dist/stories/Form/TextArea.stories.js +142 -0
- package/dist/stories/Form/TextInput.d.ts +3 -0
- package/dist/stories/Form/TextInput.js +57 -0
- package/dist/stories/Form/TextInput.stories.d.ts +155 -0
- package/dist/stories/Form/TextInput.stories.js +155 -0
- package/dist/stories/Form/Toggle.d.ts +3 -0
- package/dist/stories/Form/Toggle.js +57 -0
- package/dist/stories/Form/Toggle.stories.d.ts +6 -0
- package/dist/stories/Form/Toggle.stories.js +79 -0
- package/dist/stories/Form/index.d.ts +8 -0
- package/dist/stories/Form/index.js +8 -0
- package/dist/stories/Form/types.d.ts +274 -0
- package/dist/stories/Form/types.js +46 -0
- package/dist/stories/Foundations/Colors.d.ts +2 -0
- package/dist/stories/Foundations/Colors.js +266 -0
- package/dist/stories/Foundations/Colors.stories.d.ts +6 -0
- package/dist/stories/Foundations/Colors.stories.js +15 -0
- package/dist/stories/Foundations/index.d.ts +1 -0
- package/dist/stories/Foundations/index.js +1 -0
- package/dist/stories/Navigation/ComplexHeader.d.ts +3 -0
- package/dist/stories/Navigation/ComplexHeader.js +21 -0
- package/dist/stories/Navigation/ComplexHeader.stories.d.ts +6 -0
- package/dist/stories/Navigation/ComplexHeader.stories.js +82 -0
- package/dist/stories/Navigation/Header.d.ts +3 -0
- package/dist/stories/Navigation/Header.js +9 -0
- package/dist/stories/Navigation/Header.stories.d.ts +7 -0
- package/dist/stories/Navigation/Header.stories.js +87 -0
- package/dist/stories/Navigation/NavItem.d.ts +3 -0
- package/dist/stories/Navigation/NavItem.js +66 -0
- package/dist/stories/Navigation/NavItem.stories.d.ts +14 -0
- package/dist/stories/Navigation/NavItem.stories.js +100 -0
- package/dist/stories/Navigation/ProcessHeader.d.ts +3 -0
- package/dist/stories/Navigation/ProcessHeader.js +11 -0
- package/dist/stories/Navigation/ProcessHeader.stories.d.ts +6 -0
- package/dist/stories/Navigation/ProcessHeader.stories.js +76 -0
- package/dist/stories/Navigation/Sidebar.d.ts +3 -0
- package/dist/stories/Navigation/Sidebar.js +115 -0
- package/dist/stories/Navigation/Sidebar.stories.d.ts +11 -0
- package/dist/stories/Navigation/Sidebar.stories.js +174 -0
- package/dist/stories/Navigation/index.d.ts +6 -0
- package/dist/stories/Navigation/index.js +6 -0
- package/dist/stories/Navigation/types.d.ts +186 -0
- package/dist/stories/Navigation/types.js +21 -0
- package/dist/stories/PlanCard/PlanCard.d.ts +3 -0
- package/dist/stories/PlanCard/PlanCard.js +13 -0
- package/dist/stories/PlanCard/PlanCard.stories.d.ts +9 -0
- package/dist/stories/PlanCard/PlanCard.stories.js +125 -0
- package/dist/stories/PlanCard/PlanCardSkeleton.d.ts +3 -0
- package/dist/stories/PlanCard/PlanCardSkeleton.js +6 -0
- package/dist/stories/PlanCard/PlanCardSkeleton.stories.d.ts +7 -0
- package/dist/stories/PlanCard/PlanCardSkeleton.stories.js +40 -0
- package/dist/stories/PlanCard/index.d.ts +3 -0
- package/dist/stories/PlanCard/index.js +3 -0
- package/dist/stories/PlanCard/types.d.ts +61 -0
- package/dist/stories/PlanCard/types.js +1 -0
- package/dist/stories/StripeProduct/StripeProduct.d.ts +3 -0
- package/dist/stories/StripeProduct/StripeProduct.js +24 -0
- package/dist/stories/StripeProduct/StripeProduct.stories.d.ts +10 -0
- package/dist/stories/StripeProduct/StripeProduct.stories.js +110 -0
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.d.ts +3 -0
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.js +6 -0
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.stories.d.ts +16 -0
- package/dist/stories/StripeProduct/StripeProductCardSkeleton.stories.js +137 -0
- package/dist/stories/StripeProduct/index.d.ts +3 -0
- package/dist/stories/StripeProduct/index.js +3 -0
- package/dist/stories/StripeProduct/types.d.ts +56 -0
- package/dist/stories/StripeProduct/types.js +1 -0
- package/dist/stories/Typography/Typography.d.ts +3 -0
- package/dist/stories/Typography/Typography.js +22 -0
- package/dist/stories/Typography/Typography.stories.d.ts +25 -0
- package/dist/stories/Typography/Typography.stories.js +225 -0
- package/dist/stories/Typography/index.d.ts +2 -0
- package/dist/stories/Typography/index.js +2 -0
- package/dist/stories/Typography/types.d.ts +46 -0
- package/dist/stories/Typography/types.js +27 -0
- package/dist/stories/UI/Avatar.d.ts +3 -0
- package/dist/stories/UI/Avatar.js +76 -0
- package/dist/stories/UI/Avatar.stories.d.ts +8 -0
- package/dist/stories/UI/Avatar.stories.js +76 -0
- package/dist/stories/UI/Badge.d.ts +3 -0
- package/dist/stories/UI/Badge.js +118 -0
- package/dist/stories/UI/Badge.stories.d.ts +11 -0
- package/dist/stories/UI/Badge.stories.js +107 -0
- package/dist/stories/UI/CheckIcon.d.ts +3 -0
- package/dist/stories/UI/CheckIcon.js +36 -0
- package/dist/stories/UI/CheckIcon.stories.d.ts +7 -0
- package/dist/stories/UI/CheckIcon.stories.js +48 -0
- package/dist/stories/UI/FeatureBanner.d.ts +3 -0
- package/dist/stories/UI/FeatureBanner.js +34 -0
- package/dist/stories/UI/FeatureBanner.stories.d.ts +9 -0
- package/dist/stories/UI/FeatureBanner.stories.js +131 -0
- package/dist/stories/UI/HintBubble.d.ts +3 -0
- package/dist/stories/UI/HintBubble.js +28 -0
- package/dist/stories/UI/HintBubble.stories.d.ts +9 -0
- package/dist/stories/UI/HintBubble.stories.js +68 -0
- package/dist/stories/UI/Logo.d.ts +3 -0
- package/dist/stories/UI/Logo.js +60 -0
- package/dist/stories/UI/Logo.stories.d.ts +11 -0
- package/dist/stories/UI/Logo.stories.js +65 -0
- package/dist/stories/UI/Menu.d.ts +3 -0
- package/dist/stories/UI/Menu.js +56 -0
- package/dist/stories/UI/Menu.stories.d.ts +7 -0
- package/dist/stories/UI/Menu.stories.js +80 -0
- package/dist/stories/UI/ProgressIndicator.d.ts +3 -0
- package/dist/stories/UI/ProgressIndicator.js +35 -0
- package/dist/stories/UI/ProgressIndicator.stories.d.ts +10 -0
- package/dist/stories/UI/ProgressIndicator.stories.js +98 -0
- package/dist/stories/UI/PromoBanner.d.ts +3 -0
- package/dist/stories/UI/PromoBanner.js +34 -0
- package/dist/stories/UI/PromoBanner.stories.d.ts +9 -0
- package/dist/stories/UI/PromoBanner.stories.js +159 -0
- package/dist/stories/UI/SkeletonLoader.d.ts +3 -0
- package/dist/stories/UI/SkeletonLoader.js +19 -0
- package/dist/stories/UI/SkeletonLoader.stories.d.ts +8 -0
- package/dist/stories/UI/SkeletonLoader.stories.js +74 -0
- package/dist/stories/UI/Stepper.d.ts +3 -0
- package/dist/stories/UI/Stepper.js +67 -0
- package/dist/stories/UI/Stepper.stories.d.ts +6 -0
- package/dist/stories/UI/Stepper.stories.js +65 -0
- package/dist/stories/UI/Topbar.d.ts +3 -0
- package/dist/stories/UI/Topbar.js +9 -0
- package/dist/stories/UI/Topbar.stories.d.ts +6 -0
- package/dist/stories/UI/Topbar.stories.js +71 -0
- package/dist/stories/UI/index.d.ts +13 -0
- package/dist/stories/UI/index.js +13 -0
- package/dist/stories/UI/types.d.ts +398 -0
- package/dist/stories/UI/types.js +110 -0
- package/dist/utils/common.d.ts +2 -0
- package/dist/utils/common.js +20 -0
- package/dist/utils/icon.d.ts +6 -0
- package/dist/utils/icon.js +6 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/typography.d.ts +14 -0
- package/dist/utils/typography.js +46 -0
- package/package.json +48 -42
- package/dist/stories/Button.d.ts +0 -4
- package/dist/stories/Button.js +0 -258
- package/dist/stories/Colors.d.ts +0 -5
- package/dist/stories/Colors.js +0 -9
- package/dist/stories/Header.d.ts +0 -12
- package/dist/stories/Header.js +0 -4
- package/dist/stories/Header.stories.d.ts +0 -18
- package/dist/stories/Header.stories.js +0 -26
- package/dist/stories/Page.d.ts +0 -3
- package/dist/stories/Page.js +0 -8
- package/dist/stories/Page.stories.d.ts +0 -12
- package/dist/stories/Page.stories.js +0 -24
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
import { HintBubbleProps } from '../UI';
|
|
3
|
+
import { IconName } from '../../utils';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Text area component props
|
|
7
|
+
*/
|
|
8
|
+
export type TextAreaProps = {
|
|
9
|
+
/** Text area label */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Text area value */
|
|
12
|
+
value: string;
|
|
13
|
+
/** Text area onChange */
|
|
14
|
+
onChange: (value: string) => void;
|
|
15
|
+
/** Text input placeholder */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Text input hint */
|
|
18
|
+
hintText?: string;
|
|
19
|
+
/** Text input error */
|
|
20
|
+
errorText?: string;
|
|
21
|
+
/** Text input disabled */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Whether to apply max length restriction */
|
|
24
|
+
allowMaxLength?: boolean;
|
|
25
|
+
/** Text input max length */
|
|
26
|
+
maxLength?: number;
|
|
27
|
+
/** Text input show max length indicator */
|
|
28
|
+
showMaxLengthIndicator?: boolean;
|
|
29
|
+
/** Text input number of rows */
|
|
30
|
+
numberOfRows?: number;
|
|
31
|
+
/** Text input hint bubble */
|
|
32
|
+
hintBubbleText?: string;
|
|
33
|
+
/** Text input hint bubble props */
|
|
34
|
+
hintBubbleProps?: Omit<HintBubbleProps, 'text'>;
|
|
35
|
+
/** Custom style of the text area */
|
|
36
|
+
style?: SxProps<Theme>;
|
|
37
|
+
/** Whether the text area is required */
|
|
38
|
+
required?: boolean;
|
|
39
|
+
/** Text area label trailing element */
|
|
40
|
+
labelTrailingElement?: React.ReactNode;
|
|
41
|
+
/** Text area label container style */
|
|
42
|
+
labelContainerStyle?: SxProps<Theme>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Text input component props
|
|
46
|
+
*/
|
|
47
|
+
export type TextInputProps = {
|
|
48
|
+
/** Text input label */
|
|
49
|
+
label?: string;
|
|
50
|
+
/** Text input value */
|
|
51
|
+
value: string;
|
|
52
|
+
/** Text input onChange */
|
|
53
|
+
onChange: (value: string) => void;
|
|
54
|
+
/** Text input placeholder */
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
/** Text input type */
|
|
57
|
+
type?: React.InputHTMLAttributes<HTMLInputElement>['type'];
|
|
58
|
+
/** Text input hint */
|
|
59
|
+
hintText?: string;
|
|
60
|
+
/** Text input error */
|
|
61
|
+
errorText?: string;
|
|
62
|
+
/** Text input disabled */
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
/** Text input trailing text */
|
|
65
|
+
trailingText?: string;
|
|
66
|
+
/** Text input hint bubble */
|
|
67
|
+
hintBubbleText?: string;
|
|
68
|
+
/** Text input hint bubble props */
|
|
69
|
+
hintBubbleProps?: Omit<HintBubbleProps, 'text'>;
|
|
70
|
+
/** Text input style */
|
|
71
|
+
style?: SxProps<Theme>;
|
|
72
|
+
/** Whether the text input is required */
|
|
73
|
+
required?: boolean;
|
|
74
|
+
/** Text input label trailing element */
|
|
75
|
+
labelTrailingElement?: React.ReactNode;
|
|
76
|
+
/** Text input label container style */
|
|
77
|
+
labelContainerStyle?: SxProps<Theme>;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to show the password visibility toggle (eye icon).
|
|
80
|
+
* Only applies when `type` is `password`. Defaults to `true`.
|
|
81
|
+
*/
|
|
82
|
+
showPasswordToggle?: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Toggle position variants
|
|
86
|
+
*/
|
|
87
|
+
export declare enum TogglePosition {
|
|
88
|
+
Left = "Left",
|
|
89
|
+
Right = "Right"
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Toggle component props
|
|
93
|
+
*/
|
|
94
|
+
export type ToggleProps = {
|
|
95
|
+
/** Text of the toggle */
|
|
96
|
+
text?: string;
|
|
97
|
+
/** Title of the toggle */
|
|
98
|
+
title?: string;
|
|
99
|
+
/** Whether the toggle is checked */
|
|
100
|
+
checked: boolean;
|
|
101
|
+
/** Callback function when the toggle is checked */
|
|
102
|
+
onChange: (checked: boolean) => void;
|
|
103
|
+
/** Whether the toggle is disabled */
|
|
104
|
+
disabled?: boolean;
|
|
105
|
+
/** Position of the toggle */
|
|
106
|
+
togglePosition?: TogglePosition;
|
|
107
|
+
/** Style of the toggle */
|
|
108
|
+
style?: SxProps<Theme>;
|
|
109
|
+
/** Text color of the toggle */
|
|
110
|
+
textColor?: string;
|
|
111
|
+
/** Title color of the toggle */
|
|
112
|
+
titleColor?: string;
|
|
113
|
+
};
|
|
114
|
+
export declare enum CheckboxType {
|
|
115
|
+
Radio = "Radio",
|
|
116
|
+
Checkbox = "Checkbox"
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Checkbox component props
|
|
120
|
+
*/
|
|
121
|
+
export type CheckboxProps = {
|
|
122
|
+
/** Type variant of the checkbox */
|
|
123
|
+
type?: CheckboxType;
|
|
124
|
+
/** Label of the checkbox */
|
|
125
|
+
label?: string;
|
|
126
|
+
/** Whether the checkbox is checked */
|
|
127
|
+
checked?: boolean;
|
|
128
|
+
/** Whether the checkbox is disabled */
|
|
129
|
+
disabled?: boolean;
|
|
130
|
+
/** Whether the checkbox is read-only */
|
|
131
|
+
required?: boolean;
|
|
132
|
+
/** Event handler for the checkbox */
|
|
133
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
134
|
+
/** Custom style of the checkbox */
|
|
135
|
+
style?: SxProps<Theme>;
|
|
136
|
+
};
|
|
137
|
+
export interface FileUploadProps {
|
|
138
|
+
/** Whether the file upload is disabled */
|
|
139
|
+
disabled?: boolean;
|
|
140
|
+
/** Accepted file types */
|
|
141
|
+
acceptedFileTypes?: string;
|
|
142
|
+
/** Max file size in MB */
|
|
143
|
+
maxFileSizeMB?: number;
|
|
144
|
+
/** Callback function when a file is selected */
|
|
145
|
+
onFileSelect?: (file: File) => void;
|
|
146
|
+
/** Style of the file upload */
|
|
147
|
+
sx?: SxProps<Theme>;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* File type variants
|
|
151
|
+
*/
|
|
152
|
+
export declare enum FileType {
|
|
153
|
+
Sample = "Sample",
|
|
154
|
+
Default = "Default"
|
|
155
|
+
}
|
|
156
|
+
export interface UploadedFileProps {
|
|
157
|
+
/** Type of the uploaded file */
|
|
158
|
+
type?: FileType;
|
|
159
|
+
/** File name */
|
|
160
|
+
fileName: string;
|
|
161
|
+
/** Whether to show the delete button */
|
|
162
|
+
showDelete?: boolean;
|
|
163
|
+
/** Callback function when the delete button is clicked */
|
|
164
|
+
onDelete?: () => void;
|
|
165
|
+
/** Whether to show the download button */
|
|
166
|
+
showDownload?: boolean;
|
|
167
|
+
/** Callback function when the download button is clicked */
|
|
168
|
+
onDownload?: () => void;
|
|
169
|
+
/** Style of the uploaded file */
|
|
170
|
+
sx?: SxProps<Theme>;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* File uploading status variants
|
|
174
|
+
*/
|
|
175
|
+
export declare enum FileUploadingStatus {
|
|
176
|
+
Uploading = "Uploading",
|
|
177
|
+
Success = "Success",
|
|
178
|
+
Error = "Error"
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Progress mode variants
|
|
182
|
+
*/
|
|
183
|
+
export declare enum FileUploadingProgressMode {
|
|
184
|
+
Percentage = "Percentage",
|
|
185
|
+
Animation = "Animation"
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* File uploading component props
|
|
189
|
+
*/
|
|
190
|
+
export interface FileUploadingProps {
|
|
191
|
+
/** Status of the file uploading */
|
|
192
|
+
uploadingStatus: FileUploadingStatus;
|
|
193
|
+
/** Progress mode of the file uploading */
|
|
194
|
+
progressMode?: FileUploadingProgressMode;
|
|
195
|
+
/** Progress of the file uploading */
|
|
196
|
+
uploadProgress?: number;
|
|
197
|
+
/** Style of the file uploading */
|
|
198
|
+
sx?: SxProps<Theme>;
|
|
199
|
+
/** Whether to show the cancel button */
|
|
200
|
+
showCancel?: boolean;
|
|
201
|
+
/** Callback function when the cancel button is clicked */
|
|
202
|
+
onCancel?: () => void;
|
|
203
|
+
/** Whether to show the retry button */
|
|
204
|
+
showRetry?: boolean;
|
|
205
|
+
/** Callback function when the retry button is clicked */
|
|
206
|
+
onRetry?: () => void;
|
|
207
|
+
/** File name */
|
|
208
|
+
fileName: string;
|
|
209
|
+
}
|
|
210
|
+
export interface AutoCompleteProps {
|
|
211
|
+
/** The options to display in the autocomplete */
|
|
212
|
+
options: string[];
|
|
213
|
+
/** The value of the selected option */
|
|
214
|
+
value: string;
|
|
215
|
+
/** The onChange handler for the selected option */
|
|
216
|
+
onChange: (value: string) => void;
|
|
217
|
+
/** The leading icon of the autocomplete */
|
|
218
|
+
leadingIcon?: IconName;
|
|
219
|
+
/** The placeholder of the autocomplete */
|
|
220
|
+
placeholder?: string;
|
|
221
|
+
/** Whether the autocomplete is disabled */
|
|
222
|
+
disabled?: boolean;
|
|
223
|
+
/** The onBlur handler for the autocomplete */
|
|
224
|
+
onBlur?: () => void;
|
|
225
|
+
/** The onFocus handler for the autocomplete */
|
|
226
|
+
onFocus?: () => void;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Dropdown type variants
|
|
230
|
+
*/
|
|
231
|
+
export declare enum DropdownType {
|
|
232
|
+
SingleSelect = "SingleSelect",
|
|
233
|
+
MultiSelect = "MultiSelect"
|
|
234
|
+
}
|
|
235
|
+
type SingleSelectDropdownProps = {
|
|
236
|
+
/** The value of the selected option */
|
|
237
|
+
value: string;
|
|
238
|
+
/** The onChange handler for the selected option */
|
|
239
|
+
onChange: (value: string) => void;
|
|
240
|
+
/** The type of the dropdown */
|
|
241
|
+
type: DropdownType.SingleSelect;
|
|
242
|
+
};
|
|
243
|
+
type MultiSelectDropdownProps = {
|
|
244
|
+
/** The value of the selected options */
|
|
245
|
+
value: string[];
|
|
246
|
+
/** The onChange handler for the selected options */
|
|
247
|
+
onChange: (value: string[]) => void;
|
|
248
|
+
/** The type of the dropdown */
|
|
249
|
+
type: DropdownType.MultiSelect;
|
|
250
|
+
};
|
|
251
|
+
type DropdownBaseProps = SingleSelectDropdownProps | MultiSelectDropdownProps;
|
|
252
|
+
export type DropdownProps = DropdownBaseProps & {
|
|
253
|
+
/** The label of the dropdown */
|
|
254
|
+
label?: string | null;
|
|
255
|
+
/** The options to display in the dropdown */
|
|
256
|
+
options: string[];
|
|
257
|
+
/** The placeholder of the dropdown */
|
|
258
|
+
placeholder?: string;
|
|
259
|
+
/** Whether the dropdown is disabled */
|
|
260
|
+
disabled?: boolean;
|
|
261
|
+
/** Whether the dropdown is required */
|
|
262
|
+
required?: boolean;
|
|
263
|
+
/** Whether to show the leading icon */
|
|
264
|
+
showLeadingIcon?: boolean;
|
|
265
|
+
/** The leading icon of the dropdown */
|
|
266
|
+
leadingIcon?: IconName;
|
|
267
|
+
/** Whether to show the clear button */
|
|
268
|
+
showClear?: boolean;
|
|
269
|
+
/** Whether to show the checkboxes */
|
|
270
|
+
showCheckboxes?: boolean;
|
|
271
|
+
/** Whether to show the ticks */
|
|
272
|
+
showTicks?: boolean;
|
|
273
|
+
};
|
|
274
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toggle position variants
|
|
3
|
+
*/
|
|
4
|
+
export var TogglePosition;
|
|
5
|
+
(function (TogglePosition) {
|
|
6
|
+
TogglePosition["Left"] = "Left";
|
|
7
|
+
TogglePosition["Right"] = "Right";
|
|
8
|
+
})(TogglePosition || (TogglePosition = {}));
|
|
9
|
+
export var CheckboxType;
|
|
10
|
+
(function (CheckboxType) {
|
|
11
|
+
CheckboxType["Radio"] = "Radio";
|
|
12
|
+
CheckboxType["Checkbox"] = "Checkbox";
|
|
13
|
+
})(CheckboxType || (CheckboxType = {}));
|
|
14
|
+
/**
|
|
15
|
+
* File type variants
|
|
16
|
+
*/
|
|
17
|
+
export var FileType;
|
|
18
|
+
(function (FileType) {
|
|
19
|
+
FileType["Sample"] = "Sample";
|
|
20
|
+
FileType["Default"] = "Default";
|
|
21
|
+
})(FileType || (FileType = {}));
|
|
22
|
+
/**
|
|
23
|
+
* File uploading status variants
|
|
24
|
+
*/
|
|
25
|
+
export var FileUploadingStatus;
|
|
26
|
+
(function (FileUploadingStatus) {
|
|
27
|
+
FileUploadingStatus["Uploading"] = "Uploading";
|
|
28
|
+
FileUploadingStatus["Success"] = "Success";
|
|
29
|
+
FileUploadingStatus["Error"] = "Error";
|
|
30
|
+
})(FileUploadingStatus || (FileUploadingStatus = {}));
|
|
31
|
+
/**
|
|
32
|
+
* Progress mode variants
|
|
33
|
+
*/
|
|
34
|
+
export var FileUploadingProgressMode;
|
|
35
|
+
(function (FileUploadingProgressMode) {
|
|
36
|
+
FileUploadingProgressMode["Percentage"] = "Percentage";
|
|
37
|
+
FileUploadingProgressMode["Animation"] = "Animation";
|
|
38
|
+
})(FileUploadingProgressMode || (FileUploadingProgressMode = {}));
|
|
39
|
+
/**
|
|
40
|
+
* Dropdown type variants
|
|
41
|
+
*/
|
|
42
|
+
export var DropdownType;
|
|
43
|
+
(function (DropdownType) {
|
|
44
|
+
DropdownType["SingleSelect"] = "SingleSelect";
|
|
45
|
+
DropdownType["MultiSelect"] = "MultiSelect";
|
|
46
|
+
})(DropdownType || (DropdownType = {}));
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Copy } from '@phosphor-icons/react';
|
|
4
|
+
import styles from './Colors.module.css';
|
|
5
|
+
import { Typography, TypographySize, TypographyWeight } from '../Typography';
|
|
6
|
+
const ColorSwatch = ({ name, value }) => {
|
|
7
|
+
const [copiedName, setCopiedName] = useState(false);
|
|
8
|
+
const [copiedValue, setCopiedValue] = useState(false);
|
|
9
|
+
const isGradient = value.includes('linear-gradient');
|
|
10
|
+
// Get the actual color value from CSS variable
|
|
11
|
+
const getComputedValue = () => {
|
|
12
|
+
const style = getComputedStyle(document.documentElement);
|
|
13
|
+
const varName = value.match(/var\((.*?)\)/)?.[1] || '';
|
|
14
|
+
return style.getPropertyValue(varName).trim();
|
|
15
|
+
};
|
|
16
|
+
const displayValue = isGradient
|
|
17
|
+
? value.replace(/var\((.*?)\)/g, (_, p1) => {
|
|
18
|
+
const style = getComputedStyle(document.documentElement);
|
|
19
|
+
return style.getPropertyValue(p1);
|
|
20
|
+
})
|
|
21
|
+
: getComputedValue();
|
|
22
|
+
const handleCopyName = (e) => {
|
|
23
|
+
e.stopPropagation();
|
|
24
|
+
navigator.clipboard.writeText(name);
|
|
25
|
+
setCopiedName(true);
|
|
26
|
+
setTimeout(() => setCopiedName(false), 1500);
|
|
27
|
+
};
|
|
28
|
+
const handleCopyValue = (e) => {
|
|
29
|
+
e.stopPropagation();
|
|
30
|
+
navigator.clipboard.writeText(displayValue);
|
|
31
|
+
setCopiedValue(true);
|
|
32
|
+
setTimeout(() => setCopiedValue(false), 1500);
|
|
33
|
+
};
|
|
34
|
+
return (_jsxs("div", { className: styles.swatch, children: [_jsx("div", { className: styles.color, style: {
|
|
35
|
+
background: isGradient ? displayValue : value,
|
|
36
|
+
backgroundSize: 'cover',
|
|
37
|
+
} }), _jsxs("div", { className: styles.details, children: [_jsxs("div", { className: styles.name, style: { display: 'flex', alignItems: 'center', gap: '8px' }, children: [_jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Medium, color: "var(--color-text-text-label)", children: name }), _jsx(Copy, { size: 16, onClick: handleCopyName, style: {
|
|
38
|
+
cursor: 'pointer',
|
|
39
|
+
color: 'var(--color-text-text-subtle)',
|
|
40
|
+
} }), copiedName && (_jsx("div", { className: `${styles.copyIndicator} ${styles.visible}`, children: "Copied!" }))] }), _jsxs("div", { className: styles.value, style: { display: 'flex', alignItems: 'center', gap: '8px' }, children: [_jsx(Typography, { size: TypographySize.TextXS, weight: TypographyWeight.Regular, color: "var(--color-text-text-subtle)", children: displayValue }), _jsx(Copy, { size: 16, onClick: handleCopyValue, style: {
|
|
41
|
+
cursor: 'pointer',
|
|
42
|
+
color: 'var(--color-text-text-subtle)',
|
|
43
|
+
} }), copiedValue && (_jsx("div", { className: `${styles.copyIndicator} ${styles.visible}`, children: "Copied!" }))] })] })] }));
|
|
44
|
+
};
|
|
45
|
+
const ColorGroup = ({ title, colors }) => (_jsxs("div", { className: styles.group, children: [_jsx(Typography, { size: TypographySize.TextM, weight: TypographyWeight.Medium, color: "var(--color-text-text-label)", children: title }), _jsx("div", { className: styles.swatchGrid, children: Object.entries(colors).map(([name, value]) => (_jsx(ColorSwatch, { name: name, value: value }, name))) })] }));
|
|
46
|
+
export const Colors = () => {
|
|
47
|
+
// Group colors by their categories
|
|
48
|
+
const primitives = {
|
|
49
|
+
'Brand Violet': {
|
|
50
|
+
'--primitives-desktop-primary-brand-violet-25': 'var(--primitives-desktop-primary-brand-violet-25)',
|
|
51
|
+
'--primitives-desktop-primary-brand-violet-50': 'var(--primitives-desktop-primary-brand-violet-50)',
|
|
52
|
+
'--primitives-desktop-primary-brand-violet-100': 'var(--primitives-desktop-primary-brand-violet-100)',
|
|
53
|
+
'--primitives-desktop-primary-brand-violet-200': 'var(--primitives-desktop-primary-brand-violet-200)',
|
|
54
|
+
'--primitives-desktop-primary-brand-violet-300': 'var(--primitives-desktop-primary-brand-violet-300)',
|
|
55
|
+
'--primitives-desktop-primary-brand-violet-400': 'var(--primitives-desktop-primary-brand-violet-400)',
|
|
56
|
+
'--primitives-desktop-primary-brand-violet-500': 'var(--primitives-desktop-primary-brand-violet-500)',
|
|
57
|
+
'--primitives-desktop-primary-brand-violet-600': 'var(--primitives-desktop-primary-brand-violet-600)',
|
|
58
|
+
'--primitives-desktop-primary-brand-violet-700': 'var(--primitives-desktop-primary-brand-violet-700)',
|
|
59
|
+
'--primitives-desktop-primary-brand-violet-800': 'var(--primitives-desktop-primary-brand-violet-800)',
|
|
60
|
+
'--primitives-desktop-primary-brand-violet-900': 'var(--primitives-desktop-primary-brand-violet-900)',
|
|
61
|
+
'--primitives-desktop-primary-brand-violet-950': 'var(--primitives-desktop-primary-brand-violet-950)',
|
|
62
|
+
},
|
|
63
|
+
Grays: {
|
|
64
|
+
'--primitives-desktop-primary-gray-25': 'var(--primitives-desktop-primary-gray-25)',
|
|
65
|
+
'--primitives-desktop-primary-gray-50': 'var(--primitives-desktop-primary-gray-50)',
|
|
66
|
+
'--primitives-desktop-primary-gray-100': 'var(--primitives-desktop-primary-gray-100)',
|
|
67
|
+
'--primitives-desktop-primary-gray-200': 'var(--primitives-desktop-primary-gray-200)',
|
|
68
|
+
'--primitives-desktop-primary-gray-300': 'var(--primitives-desktop-primary-gray-300)',
|
|
69
|
+
'--primitives-desktop-primary-gray-400': 'var(--primitives-desktop-primary-gray-400)',
|
|
70
|
+
'--primitives-desktop-primary-gray-500': 'var(--primitives-desktop-primary-gray-500)',
|
|
71
|
+
'--primitives-desktop-primary-gray-600': 'var(--primitives-desktop-primary-gray-600)',
|
|
72
|
+
'--primitives-desktop-primary-gray-700': 'var(--primitives-desktop-primary-gray-700)',
|
|
73
|
+
'--primitives-desktop-primary-gray-800': 'var(--primitives-desktop-primary-gray-800)',
|
|
74
|
+
'--primitives-desktop-primary-gray-900': 'var(--primitives-desktop-primary-gray-900)',
|
|
75
|
+
'--primitives-desktop-primary-gray-950': 'var(--primitives-desktop-primary-gray-950)',
|
|
76
|
+
},
|
|
77
|
+
Red: {
|
|
78
|
+
'--primitives-desktop-primary-red-25': 'var(--primitives-desktop-primary-red-25)',
|
|
79
|
+
'--primitives-desktop-primary-red-50': 'var(--primitives-desktop-primary-red-50)',
|
|
80
|
+
'--primitives-desktop-primary-red-100': 'var(--primitives-desktop-primary-red-100)',
|
|
81
|
+
'--primitives-desktop-primary-red-200': 'var(--primitives-desktop-primary-red-200)',
|
|
82
|
+
'--primitives-desktop-primary-red-300': 'var(--primitives-desktop-primary-red-300)',
|
|
83
|
+
'--primitives-desktop-primary-red-400': 'var(--primitives-desktop-primary-red-400)',
|
|
84
|
+
'--primitives-desktop-primary-red-500': 'var(--primitives-desktop-primary-red-500)',
|
|
85
|
+
'--primitives-desktop-primary-red-600': 'var(--primitives-desktop-primary-red-600)',
|
|
86
|
+
'--primitives-desktop-primary-red-700': 'var(--primitives-desktop-primary-red-700)',
|
|
87
|
+
'--primitives-desktop-primary-red-800': 'var(--primitives-desktop-primary-red-800)',
|
|
88
|
+
'--primitives-desktop-primary-red-900': 'var(--primitives-desktop-primary-red-900)',
|
|
89
|
+
'--primitives-desktop-primary-red-950': 'var(--primitives-desktop-primary-red-950)',
|
|
90
|
+
},
|
|
91
|
+
Success: {
|
|
92
|
+
'--primitives-desktop-primary-success-25': 'var(--primitives-desktop-primary-success-25)',
|
|
93
|
+
'--primitives-desktop-primary-success-50': 'var(--primitives-desktop-primary-success-50)',
|
|
94
|
+
'--primitives-desktop-primary-success-100': 'var(--primitives-desktop-primary-success-100)',
|
|
95
|
+
'--primitives-desktop-primary-success-200': 'var(--primitives-desktop-primary-success-200)',
|
|
96
|
+
'--primitives-desktop-primary-success-300': 'var(--primitives-desktop-primary-success-300)',
|
|
97
|
+
'--primitives-desktop-primary-success-400': 'var(--primitives-desktop-primary-success-400)',
|
|
98
|
+
'--primitives-desktop-primary-success-500': 'var(--primitives-desktop-primary-success-500)',
|
|
99
|
+
'--primitives-desktop-primary-success-600': 'var(--primitives-desktop-primary-success-600)',
|
|
100
|
+
'--primitives-desktop-primary-success-700': 'var(--primitives-desktop-primary-success-700)',
|
|
101
|
+
'--primitives-desktop-primary-success-800': 'var(--primitives-desktop-primary-success-800)',
|
|
102
|
+
'--primitives-desktop-primary-success-900': 'var(--primitives-desktop-primary-success-900)',
|
|
103
|
+
'--primitives-desktop-primary-success-950': 'var(--primitives-desktop-primary-success-950)',
|
|
104
|
+
},
|
|
105
|
+
'Brand Lemon': {
|
|
106
|
+
'--primitives-desktop-primary-brand-lemon-25': 'var(--primitives-desktop-primary-brand-lemon-25)',
|
|
107
|
+
'--primitives-desktop-primary-brand-lemon-50': 'var(--primitives-desktop-primary-brand-lemon-50)',
|
|
108
|
+
'--primitives-desktop-primary-brand-lemon-100': 'var(--primitives-desktop-primary-brand-lemon-100)',
|
|
109
|
+
'--primitives-desktop-primary-brand-lemon-200': 'var(--primitives-desktop-primary-brand-lemon-200)',
|
|
110
|
+
'--primitives-desktop-primary-brand-lemon-300': 'var(--primitives-desktop-primary-brand-lemon-300)',
|
|
111
|
+
'--primitives-desktop-primary-brand-lemon-400': 'var(--primitives-desktop-primary-brand-lemon-400)',
|
|
112
|
+
'--primitives-desktop-primary-brand-lemon-500': 'var(--primitives-desktop-primary-brand-lemon-500)',
|
|
113
|
+
'--primitives-desktop-primary-brand-lemon-600': 'var(--primitives-desktop-primary-brand-lemon-600)',
|
|
114
|
+
'--primitives-desktop-primary-brand-lemon-700': 'var(--primitives-desktop-primary-brand-lemon-700)',
|
|
115
|
+
'--primitives-desktop-primary-brand-lemon-800': 'var(--primitives-desktop-primary-brand-lemon-800)',
|
|
116
|
+
'--primitives-desktop-primary-brand-lemon-900': 'var(--primitives-desktop-primary-brand-lemon-900)',
|
|
117
|
+
'--primitives-desktop-primary-brand-lemon-950': 'var(--primitives-desktop-primary-brand-lemon-950)',
|
|
118
|
+
},
|
|
119
|
+
Yellow: {
|
|
120
|
+
'--primitives-desktop-primary-yellow-25': 'var(--primitives-desktop-primary-yellow-25)',
|
|
121
|
+
'--primitives-desktop-primary-yellow-50': 'var(--primitives-desktop-primary-yellow-50)',
|
|
122
|
+
'--primitives-desktop-primary-yellow-100': 'var(--primitives-desktop-primary-yellow-100)',
|
|
123
|
+
'--primitives-desktop-primary-yellow-200': 'var(--primitives-desktop-primary-yellow-200)',
|
|
124
|
+
'--primitives-desktop-primary-yellow-300': 'var(--primitives-desktop-primary-yellow-300)',
|
|
125
|
+
'--primitives-desktop-primary-yellow-400': 'var(--primitives-desktop-primary-yellow-400)',
|
|
126
|
+
'--primitives-desktop-primary-yellow-500': 'var(--primitives-desktop-primary-yellow-500)',
|
|
127
|
+
'--primitives-desktop-primary-yellow-600': 'var(--primitives-desktop-primary-yellow-600)',
|
|
128
|
+
'--primitives-desktop-primary-yellow-700': 'var(--primitives-desktop-primary-yellow-700)',
|
|
129
|
+
'--primitives-desktop-primary-yellow-800': 'var(--primitives-desktop-primary-yellow-800)',
|
|
130
|
+
'--primitives-desktop-primary-yellow-900': 'var(--primitives-desktop-primary-yellow-900)',
|
|
131
|
+
'--primitives-desktop-primary-yellow-950': 'var(--primitives-desktop-primary-yellow-950)',
|
|
132
|
+
},
|
|
133
|
+
Blue: {
|
|
134
|
+
'--primitives-desktop-secondary-blue-25': 'var(--primitives-desktop-secondary-blue-25)',
|
|
135
|
+
'--primitives-desktop-secondary-blue-50': 'var(--primitives-desktop-secondary-blue-50)',
|
|
136
|
+
'--primitives-desktop-secondary-blue-100': 'var(--primitives-desktop-secondary-blue-100)',
|
|
137
|
+
'--primitives-desktop-secondary-blue-200': 'var(--primitives-desktop-secondary-blue-200)',
|
|
138
|
+
'--primitives-desktop-secondary-blue-300': 'var(--primitives-desktop-secondary-blue-300)',
|
|
139
|
+
'--primitives-desktop-secondary-blue-400': 'var(--primitives-desktop-secondary-blue-400)',
|
|
140
|
+
'--primitives-desktop-secondary-blue-500': 'var(--primitives-desktop-secondary-blue-500)',
|
|
141
|
+
'--primitives-desktop-secondary-blue-600': 'var(--primitives-desktop-secondary-blue-600)',
|
|
142
|
+
'--primitives-desktop-secondary-blue-700': 'var(--primitives-desktop-secondary-blue-700)',
|
|
143
|
+
'--primitives-desktop-secondary-blue-800': 'var(--primitives-desktop-secondary-blue-800)',
|
|
144
|
+
'--primitives-desktop-secondary-blue-900': 'var(--primitives-desktop-secondary-blue-900)',
|
|
145
|
+
'--primitives-desktop-secondary-blue-950': 'var(--primitives-desktop-secondary-blue-950)',
|
|
146
|
+
},
|
|
147
|
+
Cyan: {
|
|
148
|
+
'--primitives-desktop-secondary-cyan-25': 'var(--primitives-desktop-secondary-cyan-25)',
|
|
149
|
+
'--primitives-desktop-secondary-cyan-50': 'var(--primitives-desktop-secondary-cyan-50)',
|
|
150
|
+
'--primitives-desktop-secondary-cyan-100': 'var(--primitives-desktop-secondary-cyan-100)',
|
|
151
|
+
'--primitives-desktop-secondary-cyan-200': 'var(--primitives-desktop-secondary-cyan-200)',
|
|
152
|
+
'--primitives-desktop-secondary-cyan-300': 'var(--primitives-desktop-secondary-cyan-300)',
|
|
153
|
+
'--primitives-desktop-secondary-cyan-400': 'var(--primitives-desktop-secondary-cyan-400)',
|
|
154
|
+
'--primitives-desktop-secondary-cyan-500': 'var(--primitives-desktop-secondary-cyan-500)',
|
|
155
|
+
'--primitives-desktop-secondary-cyan-600': 'var(--primitives-desktop-secondary-cyan-600)',
|
|
156
|
+
'--primitives-desktop-secondary-cyan-700': 'var(--primitives-desktop-secondary-cyan-700)',
|
|
157
|
+
'--primitives-desktop-secondary-cyan-800': 'var(--primitives-desktop-secondary-cyan-800)',
|
|
158
|
+
'--primitives-desktop-secondary-cyan-900': 'var(--primitives-desktop-secondary-cyan-900)',
|
|
159
|
+
'--primitives-desktop-secondary-cyan-950': 'var(--primitives-desktop-secondary-cyan-950)',
|
|
160
|
+
},
|
|
161
|
+
Pink: {
|
|
162
|
+
'--primitives-desktop-secondary-pink-25': 'var(--primitives-desktop-secondary-pink-25)',
|
|
163
|
+
'--primitives-desktop-secondary-pink-50': 'var(--primitives-desktop-secondary-pink-50)',
|
|
164
|
+
'--primitives-desktop-secondary-pink-100': 'var(--primitives-desktop-secondary-pink-100)',
|
|
165
|
+
'--primitives-desktop-secondary-pink-200': 'var(--primitives-desktop-secondary-pink-200)',
|
|
166
|
+
'--primitives-desktop-secondary-pink-300': 'var(--primitives-desktop-secondary-pink-300)',
|
|
167
|
+
'--primitives-desktop-secondary-pink-400': 'var(--primitives-desktop-secondary-pink-400)',
|
|
168
|
+
'--primitives-desktop-secondary-pink-500': 'var(--primitives-desktop-secondary-pink-500)',
|
|
169
|
+
'--primitives-desktop-secondary-pink-600': 'var(--primitives-desktop-secondary-pink-600)',
|
|
170
|
+
'--primitives-desktop-secondary-pink-700': 'var(--primitives-desktop-secondary-pink-700)',
|
|
171
|
+
'--primitives-desktop-secondary-pink-800': 'var(--primitives-desktop-secondary-pink-800)',
|
|
172
|
+
'--primitives-desktop-secondary-pink-900': 'var(--primitives-desktop-secondary-pink-900)',
|
|
173
|
+
'--primitives-desktop-secondary-pink-950': 'var(--primitives-desktop-secondary-pink-950)',
|
|
174
|
+
},
|
|
175
|
+
'White & Transparent': {
|
|
176
|
+
'--primitives-desktop-primary-white-0': 'var(--primitives-desktop-primary-white-0)',
|
|
177
|
+
'--primitives-desktop-primary-white-20': 'var(--primitives-desktop-primary-white-20)',
|
|
178
|
+
'--primitives-desktop-primary-white-40': 'var(--primitives-desktop-primary-white-40)',
|
|
179
|
+
'--primitives-desktop-primary-white-100': 'var(--primitives-desktop-primary-white-100)',
|
|
180
|
+
'--primitives-desktop-primary-transparent-violet-50': 'var(--primitives-desktop-primary-transparent-violet-50)',
|
|
181
|
+
'--primitives-desktop-primary-transparent-gray-40': 'var(--primitives-desktop-primary-transparent-gray-40)',
|
|
182
|
+
'--primitives-desktop-primary-transparent-black-60': 'var(--primitives-desktop-primary-transparent-black-60)',
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
const semanticColors = {
|
|
186
|
+
Background: {
|
|
187
|
+
'--color-background-bg-brand-primary': 'var(--color-background-bg-brand-primary)',
|
|
188
|
+
'--color-background-bg-brand-primary-hover': 'var(--color-background-bg-brand-primary-hover)',
|
|
189
|
+
'--color-background-bg-brand-secondary-hover': 'var(--color-background-bg-brand-secondary-hover)',
|
|
190
|
+
'--color-background-bg-error': 'var(--color-background-bg-error)',
|
|
191
|
+
'--color-background-bg-error-solid': 'var(--color-background-bg-error-solid)',
|
|
192
|
+
'--color-background-bg-error-subtle': 'var(--color-background-bg-error-subtle)',
|
|
193
|
+
'--color-background-bg-success': 'var(--color-background-bg-success)',
|
|
194
|
+
'--color-background-bg-white': 'var(--color-background-bg-white)',
|
|
195
|
+
'--color-background-bg-page': 'var(--color-background-bg-page)',
|
|
196
|
+
'--color-background-bg-page-contrast': 'var(--color-background-bg-page-contrast)',
|
|
197
|
+
'--color-background-bg-element': 'var(--color-background-bg-element)',
|
|
198
|
+
'--color-background-bg-component': 'var(--color-background-bg-component)',
|
|
199
|
+
'--color-background-bg-component-hover': 'var(--color-background-bg-component-hover)',
|
|
200
|
+
'--color-background-bg-component-disabled': 'var(--color-background-bg-component-disabled)',
|
|
201
|
+
'--color-background-bg-component-dark': 'var(--color-background-bg-component-dark)',
|
|
202
|
+
'--color-background-bg-card-highlight': 'var(--color-background-bg-card-highlight)',
|
|
203
|
+
'--color-background-bg-card-highlight-hover': 'var(--color-background-bg-card-highlight-hover)',
|
|
204
|
+
'--color-background-bg-component-contrast-subtle': 'var(--color-background-bg-component-contrast-subtle)',
|
|
205
|
+
'--color-background-bg-component-contrast-subtle-hover': 'var(--color-background-bg-component-contrast-subtle-hover)',
|
|
206
|
+
'--color-background-bg-overlay-1': 'var(--color-background-bg-overlay-1)',
|
|
207
|
+
'--color-background-bg-badge-accent-success': 'var(--color-background-bg-badge-accent-success)',
|
|
208
|
+
'--color-background-bg-badge-accent-brand-violet': 'var(--color-background-bg-badge-accent-brand-violet)',
|
|
209
|
+
'--color-background-bg-badge-accent-red': 'var(--color-background-bg-badge-accent-red)',
|
|
210
|
+
'--color-background-bg-badge-accent-gray': 'var(--color-background-bg-badge-accent-gray)',
|
|
211
|
+
'--color-background-bg-badge-accent-yellow': 'var(--color-background-bg-badge-accent-yellow)',
|
|
212
|
+
'--color-background-bg-button-disabled': 'var(--color-background-bg-button-disabled)',
|
|
213
|
+
'--color-background-bg-overlay-2': 'var(--color-background-bg-overlay-2)',
|
|
214
|
+
},
|
|
215
|
+
Border: {
|
|
216
|
+
'--color-border-border-brand': 'var(--color-border-border-brand)',
|
|
217
|
+
'--color-border-border-brand-hover': 'var(--color-border-border-brand-hover)',
|
|
218
|
+
'--color-border-border-divider': 'var(--color-border-border-divider)',
|
|
219
|
+
'--color-border-border-component': 'var(--color-border-border-component)',
|
|
220
|
+
'--color-border-border-component-active': 'var(--color-border-border-component-active)',
|
|
221
|
+
'--color-border-border-subtle': 'var(--color-border-border-subtle)',
|
|
222
|
+
'--color-border-border-error': 'var(--color-border-border-error)',
|
|
223
|
+
'--color-border-border-white': 'var(--color-border-border-white)',
|
|
224
|
+
},
|
|
225
|
+
Text: {
|
|
226
|
+
'--color-text-text-title': 'var(--color-text-text-title)',
|
|
227
|
+
'--color-text-text-label': 'var(--color-text-text-label)',
|
|
228
|
+
'--color-text-text-paragraph': 'var(--color-text-text-paragraph)',
|
|
229
|
+
'--color-text-text-accent': 'var(--color-text-text-accent)',
|
|
230
|
+
'--color-text-text-clicable': 'var(--color-text-text-clicable)',
|
|
231
|
+
'--color-text-text-clicable-hover': 'var(--color-text-text-clicable-hover)',
|
|
232
|
+
'--color-text-text-subtle': 'var(--color-text-text-subtle)',
|
|
233
|
+
'--color-text-text-white': 'var(--color-text-text-white)',
|
|
234
|
+
'--color-text-text-inactive': 'var(--color-text-text-inactive)',
|
|
235
|
+
'--color-text-text-placeholder': 'var(--color-text-text-placeholder)',
|
|
236
|
+
'--color-text-text-error': 'var(--color-text-text-error)',
|
|
237
|
+
'--color-text-text-success': 'var(--color-text-text-success)',
|
|
238
|
+
'--color-text-text-warning': 'var(--color-text-text-warning)',
|
|
239
|
+
'--color-text-text-disabled': 'var(--color-text-text-disabled)',
|
|
240
|
+
},
|
|
241
|
+
Foreground: {
|
|
242
|
+
'--color-foreground-fg-white': 'var(--color-foreground-fg-white)',
|
|
243
|
+
'--color-foreground-fg-disabled': 'var(--color-foreground-fg-disabled)',
|
|
244
|
+
'--color-foreground-fg-primary': 'var(--color-foreground-fg-primary)',
|
|
245
|
+
'--color-foreground-fg-secondary': 'var(--color-foreground-fg-secondary)',
|
|
246
|
+
'--color-foreground-fg-secondary-hover': 'var(--color-foreground-fg-secondary-hover)',
|
|
247
|
+
'--color-foreground-fg-tertiary': 'var(--color-foreground-fg-tertiary)',
|
|
248
|
+
'--color-foreground-fg-tertiary-hover': 'var(--color-foreground-fg-tertiary-hover)',
|
|
249
|
+
'--color-foreground-fg-quaternary': 'var(--color-foreground-fg-quaternary)',
|
|
250
|
+
'--color-foreground-fg-quaternary-hover-brand': 'var(--color-foreground-fg-quaternary-hover-brand)',
|
|
251
|
+
'--color-foreground-fg-quaternary-hover': 'var(--color-foreground-fg-quaternary-hover)',
|
|
252
|
+
'--color-foreground-fg-error': 'var(--color-foreground-fg-error)',
|
|
253
|
+
'--color-foreground-fg-success': 'var(--color-foreground-fg-success)',
|
|
254
|
+
'--color-foreground-fg-warning': 'var(--color-foreground-fg-warning)',
|
|
255
|
+
'--color-foreground-fg-brand-primary': 'var(--color-foreground-fg-brand-primary)',
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
const gradients = {
|
|
259
|
+
'Global Gradients': {
|
|
260
|
+
'--global-logo-gradient': 'var(--global-logo-gradient)',
|
|
261
|
+
'--global-login-gradient': 'var(--global-login-gradient)',
|
|
262
|
+
'--global-bp-gradient': 'var(--global-bp-gradient)',
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
return (_jsxs("div", { className: styles.container, children: [_jsx(Typography, { size: TypographySize.HeadingXL, weight: TypographyWeight.Bold, color: "var(--color-text-text-title)", children: "Color System" }), _jsxs("section", { children: [_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.SemiBold, color: "var(--color-text-text-label)", children: "Gradients" }), Object.entries(gradients).map(([title, colors]) => (_jsx(ColorGroup, { title: title, colors: colors }, title)))] }), _jsxs("section", { children: [_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.SemiBold, color: "var(--color-text-text-label)", children: "Primitive Colors" }), Object.entries(primitives).map(([title, colors]) => (_jsx(ColorGroup, { title: title, colors: colors }, title)))] }), _jsxs("section", { children: [_jsx(Typography, { size: TypographySize.HeadingM, weight: TypographyWeight.SemiBold, color: "var(--color-text-text-label)", children: "Semantic Colors" }), Object.entries(semanticColors).map(([title, colors]) => (_jsx(ColorGroup, { title: title, colors: colors }, title)))] })] }));
|
|
266
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Colors } from './Colors';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Design System/Foundations/Colors',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
component: Colors,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen',
|
|
8
|
+
design: {
|
|
9
|
+
type: 'figspec',
|
|
10
|
+
url: 'https://www.figma.com/design/mIhjz2yJjcpLlIqw6oUivt/Beyond-Presence?node-id=4307-13259&m=dev',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
export const Default = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Colors';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Colors';
|