@algorithm-shift/design-system 1.2.10 → 1.2.12
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/dist/index.css +1 -2314
- package/dist/index.css.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Basic/Image/Image.stories.tsx +13 -0
- package/src/components/Basic/Image/Image.tsx +52 -0
- package/src/components/Basic/Shape/Shape.tsx +16 -0
- package/src/components/Basic/Typography/Typography.stories.tsx +18 -0
- package/src/components/Basic/Typography/Typography.tsx +31 -0
- package/src/components/DataDisplay/Table/Table.stories.tsx +35 -0
- package/src/components/DataDisplay/Table/Table.tsx +15 -0
- package/src/components/DataDisplay/index.ts +1 -0
- package/src/components/Global/SelectDropdown.tsx +61 -0
- package/src/components/Global/TinyMceEditor.tsx +81 -0
- package/src/components/Inputs/Checkbox/Checkbox.tsx +18 -0
- package/src/components/Inputs/DatePicker/DatePicker.tsx +81 -0
- package/src/components/Inputs/DateRange/DateRange.tsx +64 -0
- package/src/components/Inputs/Dropdown/Dropdown.tsx +62 -0
- package/src/components/Inputs/EmailInput/EmailInput.tsx +64 -0
- package/src/components/Inputs/FileInput/FileInput.tsx +24 -0
- package/src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx +24 -0
- package/src/components/Inputs/NumberInput/NumberInput.tsx +66 -0
- package/src/components/Inputs/PasswordInput/PasswordInput.tsx +66 -0
- package/src/components/Inputs/PhoneInput/PhoneInput.tsx +58 -0
- package/src/components/Inputs/RadioInput/RadioInput.tsx +24 -0
- package/src/components/Inputs/RichText/RichText.tsx +10 -0
- package/src/components/Inputs/SearchInput/SearchInput.tsx +64 -0
- package/src/components/Inputs/SwitchToggle/SwitchToggle.tsx +22 -0
- package/src/components/Inputs/TextInput/TextInput.tsx +59 -0
- package/src/components/Inputs/Textarea/Textarea.tsx +58 -0
- package/src/components/Inputs/UrlInput/UrlInput.tsx +66 -0
- package/src/components/Layout/Flex.tsx +13 -0
- package/src/components/Layout/Grid.tsx +13 -0
- package/src/components/Navigation/Logo/Logo.stories.tsx +25 -0
- package/src/components/Navigation/Logo/Logo.tsx +33 -0
- package/src/components/Navigation/Notification/Notification.stories.tsx +20 -0
- package/src/components/Navigation/Notification/Notification.tsx +20 -0
- package/src/components/Navigation/Profile/Profile.stories.tsx +20 -0
- package/src/components/Navigation/Profile/Profile.tsx +25 -0
- package/src/components/Navigation/Spacer/Spacer.stories.tsx +18 -0
- package/src/components/Navigation/Spacer/Spacer.tsx +11 -0
- package/src/components/Navigation/Stages/Stages.stories.tsx +24 -0
- package/src/components/Navigation/Stages/Stages.tsx +49 -0
- package/src/components/Navigation/Tabs/Tabs.stories.tsx +38 -0
- package/src/components/Navigation/Tabs/Tabs.tsx +72 -0
- package/src/components/Navigation/index.ts +6 -0
- package/src/components/index.ts +27 -0
- package/src/components/ui/button.stories.tsx +24 -0
- package/src/components/ui/button.tsx +59 -0
- package/src/components/ui/calendar.tsx +211 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/data-table.tsx +138 -0
- package/src/components/ui/dropdown-menu.tsx +258 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/label.tsx +22 -0
- package/src/components/ui/popover.tsx +46 -0
- package/src/components/ui/radio-group.tsx +43 -0
- package/src/components/ui/select.tsx +183 -0
- package/src/components/ui/switch.tsx +29 -0
- package/src/components/ui/table.tsx +121 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/global.css +6 -0
- package/src/index.css +119 -0
- package/src/index.ts +4 -0
- package/src/lib/utils.ts +6 -0
- package/src/stories/Button.stories.ts +54 -0
- package/src/stories/Button.tsx +35 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.ts +34 -0
- package/src/stories/Header.tsx +54 -0
- package/src/stories/Page.stories.ts +33 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
- package/src/types/global.d.ts +85 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.storybook-header {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
align-items: center;
|
|
5
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
6
|
+
padding: 15px 20px;
|
|
7
|
+
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.storybook-header svg {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.storybook-header h1 {
|
|
16
|
+
display: inline-block;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
margin: 6px 0 6px 10px;
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
font-size: 20px;
|
|
21
|
+
line-height: 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.storybook-header button + button {
|
|
25
|
+
margin-left: 10px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.storybook-header .welcome {
|
|
29
|
+
margin-right: 10px;
|
|
30
|
+
color: #333;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.storybook-page {
|
|
2
|
+
margin: 0 auto;
|
|
3
|
+
padding: 48px 20px;
|
|
4
|
+
max-width: 600px;
|
|
5
|
+
color: #333;
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
line-height: 24px;
|
|
8
|
+
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.storybook-page h2 {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
vertical-align: top;
|
|
14
|
+
margin: 0 0 4px;
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
font-size: 32px;
|
|
17
|
+
line-height: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.storybook-page p {
|
|
21
|
+
margin: 1em 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.storybook-page a {
|
|
25
|
+
color: inherit;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.storybook-page ul {
|
|
29
|
+
margin: 1em 0;
|
|
30
|
+
padding-left: 30px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.storybook-page li {
|
|
34
|
+
margin-bottom: 8px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.storybook-page .tip {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
vertical-align: top;
|
|
40
|
+
margin-right: 10px;
|
|
41
|
+
border-radius: 1em;
|
|
42
|
+
background: #e7fdd8;
|
|
43
|
+
padding: 4px 12px;
|
|
44
|
+
color: #357a14;
|
|
45
|
+
font-weight: 700;
|
|
46
|
+
font-size: 11px;
|
|
47
|
+
line-height: 12px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.storybook-page .tip-wrapper {
|
|
51
|
+
margin-top: 40px;
|
|
52
|
+
margin-bottom: 40px;
|
|
53
|
+
font-size: 13px;
|
|
54
|
+
line-height: 20px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.storybook-page .tip-wrapper svg {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
vertical-align: top;
|
|
60
|
+
margin-top: 3px;
|
|
61
|
+
margin-right: 4px;
|
|
62
|
+
width: 12px;
|
|
63
|
+
height: 12px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.storybook-page .tip-wrapper svg path {
|
|
67
|
+
fill: #1ea7fd;
|
|
68
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export interface ElementProps {
|
|
2
|
+
children?: React.ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface TypographyProps extends ElementProps {
|
|
8
|
+
tagName?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
|
|
9
|
+
textContent?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ImageProps extends ElementProps {
|
|
13
|
+
imageUrl?: string;
|
|
14
|
+
altText?: string;
|
|
15
|
+
imageUrlExternal?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type InputProperties = {
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
regexPattern?: string;
|
|
21
|
+
errorMessage?: string;
|
|
22
|
+
noOfCharacters?: number;
|
|
23
|
+
isRequired?: boolean;
|
|
24
|
+
isEditable?: boolean;
|
|
25
|
+
isDisabled?: boolean;
|
|
26
|
+
isReadonly?: boolean;
|
|
27
|
+
isAutocomplete?: boolean;
|
|
28
|
+
label?: string;
|
|
29
|
+
text?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export interface TextInputProps extends ElementProps, InputProperties { }
|
|
33
|
+
export interface EmailInputProps extends ElementProps, InputProperties { }
|
|
34
|
+
export interface PasswordInputProps extends ElementProps, InputProperties { }
|
|
35
|
+
export interface NumberInputProps extends ElementProps, InputProperties { }
|
|
36
|
+
export interface TextAreaProps extends ElementProps, InputProperties { }
|
|
37
|
+
export interface UrlInputProps extends ElementProps, InputProperties { }
|
|
38
|
+
export interface SearchInputProps extends ElementProps, InputProperties { }
|
|
39
|
+
export interface FileInputProps extends ElementProps, Pick<InputProperties, 'placeholder'> { }
|
|
40
|
+
export interface CheckboxInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
|
|
41
|
+
export interface RadioInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
|
|
42
|
+
export interface MultiCheckboxInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
|
|
43
|
+
export interface RichTextInputProps extends ElementProps { }
|
|
44
|
+
export interface SelectDropdownInputProps extends ElementProps, InputProperties { }
|
|
45
|
+
export interface SwitchToggleInputProps extends ElementProps, Pick<InputProperties, 'text'> { }
|
|
46
|
+
export interface PhoneInputProps extends ElementProps, InputProperties { }
|
|
47
|
+
export interface DateRangeInputProps extends ElementProps { }
|
|
48
|
+
export interface DatePickerInputProps extends ElementProps, InputProperties {
|
|
49
|
+
minimumDate?: string;
|
|
50
|
+
customMinimumDate?: string;
|
|
51
|
+
maximumDate?: string;
|
|
52
|
+
customMaximumDate?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface TableProps extends ElementProps {
|
|
56
|
+
columns?: Record<string, any>;
|
|
57
|
+
rowActions?: Record<string, any>;
|
|
58
|
+
data?: Record<string, any>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface TabsProps extends ElementProps {
|
|
62
|
+
tabs?: Record<string, any>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface StagesProps extends ElementProps {
|
|
66
|
+
stages?: Record<string, any>;
|
|
67
|
+
isShowBtn?: boolean;
|
|
68
|
+
buttonText?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface ProfileProps extends ElementProps {
|
|
72
|
+
profileType?: 'avatar' | 'initial';
|
|
73
|
+
showName?: boolean;
|
|
74
|
+
userName?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface NotificationProps extends ElementProps {
|
|
78
|
+
badgeType?: 'number' | 'dot';
|
|
79
|
+
badgeCount?: number;
|
|
80
|
+
hideBadgeWhenZero?: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface LogoProps extends ElementProps {
|
|
84
|
+
imageUrl?: string;
|
|
85
|
+
}
|