@wishket/design-system 0.2.0 → 0.4.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/dist/Components/Atoms/Badge/Badge.d.ts +3 -0
- package/dist/Components/Atoms/Badge/Badge.stories.d.ts +6 -0
- package/dist/Components/Atoms/Badge/index.d.ts +2 -0
- package/dist/Components/Atoms/LoadingIndicator/LoadingIndicator.d.ts +3 -0
- package/dist/Components/Atoms/LoadingIndicator/LoadingIndicator.parts.d.ts +3 -0
- package/dist/Components/Atoms/LoadingIndicator/LoadingIndicator.stories.d.ts +7 -0
- package/dist/Components/Atoms/LoadingIndicator/LoadingIndicator.types.d.ts +5 -0
- package/dist/Components/Atoms/LoadingIndicator/index.d.ts +2 -0
- package/dist/Components/Atoms/Radio/Radio.d.ts +3 -0
- package/dist/Components/Atoms/Radio/Radio.stories.d.ts +7 -0
- package/dist/Components/Atoms/Radio/Radio.types.d.ts +10 -0
- package/dist/Components/Atoms/Radio/index.d.ts +2 -0
- package/dist/Components/Atoms/index.d.ts +3 -0
- package/dist/Components/Molecules/RadioList/RadioList.d.ts +3 -0
- package/dist/Components/Molecules/RadioList/RadioList.stories.d.ts +7 -0
- package/dist/Components/Molecules/RadioList/RadioList.types.d.ts +14 -0
- package/dist/Components/Molecules/RadioList/RadioListItem.d.ts +13 -0
- package/dist/Components/Molecules/RadioList/index.d.ts +2 -0
- package/dist/Components/Molecules/WithBadge/WithBadge.d.ts +7 -0
- package/dist/Components/Molecules/WithBadge/WithBadge.stories.d.ts +6 -0
- package/dist/Components/Molecules/WithBadge/index.d.ts +2 -0
- package/dist/Components/Molecules/index.d.ts +2 -0
- package/dist/config/tailwind.config.js +32 -22
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/badge.types.d.ts +8 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/radio.types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { LoadingIndicatorSize } from './LoadingIndicator.types';
|
|
2
|
+
export declare const generateBoxSize: (size: LoadingIndicatorSize) => "w-4" | "w-6" | "w-8" | "w-12" | "w-16" | "w-20" | "w-24" | "w-32";
|
|
3
|
+
export declare const generateSpinnerBorderSize: (size: LoadingIndicatorSize) => "border-[3px]" | "border-[4px]" | "border-[6px]" | "border-[8px]" | "border-[10px]" | "border-[12px]" | "border-[14px]" | "border-[16px]";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { LoadingIndicatorProps } from './LoadingIndicator.types';
|
|
3
|
+
import LoadingIndicator from '.';
|
|
4
|
+
declare const meta: Meta<typeof LoadingIndicator>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<LoadingIndicatorProps>;
|
|
7
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Radio from './Radio';
|
|
3
|
+
import { RadioProps } from './Radio.types';
|
|
4
|
+
declare const meta: Meta<typeof Radio>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<RadioProps>;
|
|
7
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { RadioStatus } from '../../../types';
|
|
3
|
+
export interface RadioButtonProps extends RadioStatus {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RadioProps extends RadioButtonProps {
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { default as Typography } from './Typography';
|
|
2
2
|
export { default as Checkbox } from './Checkbox';
|
|
3
|
+
export { default as Badge } from './Badge';
|
|
3
4
|
export { default as Box } from './Box';
|
|
4
5
|
export { default as ProductIcon } from './ProductIcon';
|
|
6
|
+
export { default as Radio } from './Radio';
|
|
5
7
|
export { default as Button } from './Button';
|
|
8
|
+
export { default as LoadingIndicator } from './LoadingIndicator';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { RadioListProps } from './RadioList.types';
|
|
3
|
+
import RadioList from './RadioList';
|
|
4
|
+
declare const meta: Meta<typeof RadioList>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<RadioListProps>;
|
|
7
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { RadioStatus } from '../../../types';
|
|
3
|
+
export interface RadioListData extends Omit<RadioStatus, 'isHover'> {
|
|
4
|
+
label: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface RadioListProps {
|
|
10
|
+
name: string;
|
|
11
|
+
data: RadioListData[];
|
|
12
|
+
className?: string;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { RadioStatus } from '../../../types';
|
|
3
|
+
interface RadioListProps extends RadioStatus {
|
|
4
|
+
label: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
RadioClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const RadioListItem: ({ name, value, label, description, checked, disabled, isError, className, RadioClassName, onChange, }: RadioListProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default RadioListItem;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BadgeType } from '../../../types/badge.types';
|
|
3
|
+
interface WithBadgeProps extends BadgeType {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const WithBadge: ({ text, children, className, variant, showZero, disabled, }: WithBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default WithBadge;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { default as WithBadge } from './WithBadge';
|
|
1
2
|
export { default as GridLayout } from './GridLayout';
|
|
2
3
|
export { default as CheckboxList } from './CheckboxList';
|
|
3
4
|
export { default as CheckboxCard } from './CheckboxCard';
|
|
5
|
+
export { default as RadioList } from './RadioList';
|
|
@@ -8,16 +8,16 @@ module.exports = {
|
|
|
8
8
|
],
|
|
9
9
|
theme: {
|
|
10
10
|
screens: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
mobile: '360px',
|
|
12
|
+
tablet: '720px',
|
|
13
|
+
desktop: '980px',
|
|
14
14
|
},
|
|
15
15
|
extend: {
|
|
16
16
|
gridAutoColumns: {
|
|
17
17
|
'1fr': '1fr',
|
|
18
18
|
},
|
|
19
19
|
spacing: {
|
|
20
|
-
|
|
20
|
+
container: '1200px',
|
|
21
21
|
},
|
|
22
22
|
colors: {
|
|
23
23
|
'w-cyan-10': '#F2FCFF',
|
|
@@ -126,21 +126,29 @@ module.exports = {
|
|
|
126
126
|
'y-primary': '#6B16EE',
|
|
127
127
|
},
|
|
128
128
|
backgroundImage: {
|
|
129
|
-
'gradient-cyan-0':
|
|
130
|
-
'gradient-violet-0':
|
|
131
|
-
'gradient-indigo-0':
|
|
132
|
-
'gradient-cyan-30':
|
|
133
|
-
'gradient-violet-30':
|
|
134
|
-
|
|
135
|
-
'gradient-
|
|
136
|
-
|
|
137
|
-
'gradient-
|
|
138
|
-
'gradient-
|
|
139
|
-
|
|
140
|
-
'gradient-indigo-
|
|
141
|
-
|
|
142
|
-
'gradient-
|
|
143
|
-
'gradient-
|
|
129
|
+
'gradient-cyan-0': 'linear-gradient(0deg, #5db6d4 0%, #369cc2 100%)',
|
|
130
|
+
'gradient-violet-0': 'linear-gradient(0deg, #8e2de2 0%, #5a00db 100%)',
|
|
131
|
+
'gradient-indigo-0': 'linear-gradient(0deg, #5487ba 0%, #26619e 100%)',
|
|
132
|
+
'gradient-cyan-30': 'linear-gradient(30deg, #5db6d4 0%, #369cc2 100%)',
|
|
133
|
+
'gradient-violet-30':
|
|
134
|
+
'linear-gradient(30deg, #8e2de2 0%, #5a00db 100%)',
|
|
135
|
+
'gradient-indigo-30':
|
|
136
|
+
'linear-gradient(30deg, #5487ba 0%, #26619e 100%)',
|
|
137
|
+
'gradient-cyan-45': 'linear-gradient(45deg, #5db6d4 0%, #369cc2 100%)',
|
|
138
|
+
'gradient-violet-45':
|
|
139
|
+
'linear-gradient(45deg, #8e2de2 0%, #5a00db 100%)',
|
|
140
|
+
'gradient-indigo-45':
|
|
141
|
+
'linear-gradient(45deg, #5487ba 0%, #26619e 100%)',
|
|
142
|
+
'gradient-cyan-60': 'linear-gradient(60deg, #5db6d4 0%, #369cc2 100%)',
|
|
143
|
+
'gradient-violet-60':
|
|
144
|
+
'linear-gradient(60deg, #8e2de2 0%, #5a00db 100%)',
|
|
145
|
+
'gradient-indigo-60':
|
|
146
|
+
'linear-gradient(60deg, #5487ba 0%, #26619e 100%)',
|
|
147
|
+
'gradient-cyan-90': 'linear-gradient(90deg, #5db6d4 0%, #369cc2 100%)',
|
|
148
|
+
'gradient-violet-90':
|
|
149
|
+
'linear-gradient(90deg, #8e2de2 0%, #5a00db 100%)',
|
|
150
|
+
'gradient-indigo-90':
|
|
151
|
+
'linear-gradient(90deg, #5487ba 0%, #26619e 100%)',
|
|
144
152
|
},
|
|
145
153
|
gridTemplateAreas: {
|
|
146
154
|
'default-mobile': ['content content content content'],
|
|
@@ -150,13 +158,16 @@ module.exports = {
|
|
|
150
158
|
'default-desktop': [
|
|
151
159
|
'content content content content content content content content content content content content',
|
|
152
160
|
],
|
|
153
|
-
'checkbox-list-item-container':['checkbox label',' . description']
|
|
161
|
+
'checkbox-list-item-container': ['checkbox label', ' . description'],
|
|
162
|
+
'radio-list-item-container': ['radio label', ' . description'],
|
|
154
163
|
},
|
|
155
164
|
gridTemplateRows: {
|
|
156
165
|
'checkbox-list-item-container': 'min-content min-content',
|
|
166
|
+
'radio-list-item-container': 'min-content min-content',
|
|
157
167
|
},
|
|
158
168
|
gridTemplateColumns: {
|
|
159
169
|
'checkbox-list-item-container': '18px min-content',
|
|
170
|
+
'radio-list-item-container': '18px min-content',
|
|
160
171
|
},
|
|
161
172
|
},
|
|
162
173
|
},
|
|
@@ -164,5 +175,4 @@ module.exports = {
|
|
|
164
175
|
variants: {
|
|
165
176
|
gridTemplateAreas: ['responsive'],
|
|
166
177
|
},
|
|
167
|
-
}
|
|
168
|
-
|
|
178
|
+
};
|