@shoplflow/base 0.1.0 → 0.2.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 +201 -0
- package/dist/emotion.d.d.cts +2 -2
- package/dist/emotion.d.d.ts +2 -2
- package/dist/index.cjs +6745 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +190 -207
- package/dist/index.d.ts +190 -207
- package/dist/index.js +6738 -80
- package/dist/index.js.map +1 -1
- package/package.json +31 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { ElementType, ComponentPropsWithoutRef, ComponentPropsWithRef, ReactElement, CSSProperties } from 'react';
|
|
4
|
+
import { CustomDomComponent } from 'framer-motion';
|
|
5
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
6
|
+
import * as _emotion_react from '@emotion/react';
|
|
5
7
|
|
|
6
8
|
type DomainType = 'SHOPL' | 'HADA';
|
|
7
9
|
|
|
8
10
|
interface ShoplflowProviderProps {
|
|
9
11
|
domain?: DomainType;
|
|
10
|
-
children:
|
|
12
|
+
children: React__default.ReactNode;
|
|
11
13
|
}
|
|
12
14
|
declare const ShoplflowProvider: ({ children, domain }: ShoplflowProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
13
15
|
|
|
@@ -16,210 +18,191 @@ type UseDarkModeProps = {
|
|
|
16
18
|
};
|
|
17
19
|
declare function useDomain({ domain }: UseDarkModeProps): null;
|
|
18
20
|
|
|
19
|
-
declare const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
declare const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
declare const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
declare const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
21
|
+
declare const fontWeightTokens: {
|
|
22
|
+
fontWeightRegular: string;
|
|
23
|
+
fontWeightMedium: string;
|
|
24
|
+
fontWeightBold: string;
|
|
25
|
+
};
|
|
26
|
+
declare const borderRadiusTokens: {
|
|
27
|
+
borderRadius04: string;
|
|
28
|
+
borderRadius06: string;
|
|
29
|
+
borderRadius08: string;
|
|
30
|
+
borderRadius12: string;
|
|
31
|
+
borderRadius16: string;
|
|
32
|
+
};
|
|
33
|
+
declare const colorTokens: {
|
|
34
|
+
coolgray300: string;
|
|
35
|
+
coolgray200: string;
|
|
36
|
+
coolgray100: string;
|
|
37
|
+
coolgray50: string;
|
|
38
|
+
navy400: string;
|
|
39
|
+
navy300: string;
|
|
40
|
+
neutral0: string;
|
|
41
|
+
neutral100: string;
|
|
42
|
+
neutral150: string;
|
|
43
|
+
neutral200: string;
|
|
44
|
+
neutral300: string;
|
|
45
|
+
neutral350: string;
|
|
46
|
+
neutral400: string;
|
|
47
|
+
neutral500: string;
|
|
48
|
+
neutral600: string;
|
|
49
|
+
neutral700: string;
|
|
50
|
+
neutral400_5: string;
|
|
51
|
+
red300: string;
|
|
52
|
+
red200: string;
|
|
53
|
+
red100: string;
|
|
54
|
+
ocean300: string;
|
|
55
|
+
ocean200: string;
|
|
56
|
+
ocean100: string;
|
|
57
|
+
purple400: string;
|
|
58
|
+
purple300: string;
|
|
59
|
+
purple100: string;
|
|
60
|
+
yellow300: string;
|
|
61
|
+
yellow200: string;
|
|
62
|
+
yellow100: string;
|
|
63
|
+
green300: string;
|
|
64
|
+
green200: string;
|
|
65
|
+
green100: string;
|
|
66
|
+
shopl400: string;
|
|
67
|
+
shopl300: string;
|
|
68
|
+
shopl200: string;
|
|
69
|
+
shopl150: string;
|
|
70
|
+
shopl100: string;
|
|
71
|
+
hada400: string;
|
|
72
|
+
hada300: string;
|
|
73
|
+
hada200: string;
|
|
74
|
+
hada150: string;
|
|
75
|
+
hada100: string;
|
|
76
|
+
background: string;
|
|
77
|
+
primary100: string;
|
|
78
|
+
primary150: string;
|
|
79
|
+
primary200: string;
|
|
80
|
+
primary300: string;
|
|
81
|
+
primary400: string;
|
|
82
|
+
};
|
|
83
|
+
declare const spacingTokens: {
|
|
84
|
+
spacing04: string;
|
|
85
|
+
spacing06: string;
|
|
86
|
+
spacing08: string;
|
|
87
|
+
spacing12: string;
|
|
88
|
+
spacing16: string;
|
|
89
|
+
spacing20: string;
|
|
90
|
+
spacing24: string;
|
|
91
|
+
spacing30: string;
|
|
92
|
+
spacing32: string;
|
|
93
|
+
spacing40: string;
|
|
94
|
+
};
|
|
95
|
+
declare const typographyTokens: {
|
|
96
|
+
heading1_700: string;
|
|
97
|
+
heading1_400: string;
|
|
98
|
+
heading2_700: string;
|
|
99
|
+
heading2_400: string;
|
|
100
|
+
heading3_700: string;
|
|
101
|
+
heading3_400: string;
|
|
102
|
+
title1_700: string;
|
|
103
|
+
title1_400: string;
|
|
104
|
+
title2_700: string;
|
|
105
|
+
title2_500: string;
|
|
106
|
+
title2_400: string;
|
|
107
|
+
body1_700: string;
|
|
108
|
+
body1_500: string;
|
|
109
|
+
body1_400: string;
|
|
110
|
+
body2_700: string;
|
|
111
|
+
body2_500: string;
|
|
112
|
+
body2_400: string;
|
|
113
|
+
body3_400: string;
|
|
114
|
+
body3_500: string;
|
|
115
|
+
caption_400: string;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type ColorTokens = keyof typeof colorTokens;
|
|
119
|
+
type SpacingTokens = keyof typeof spacingTokens;
|
|
120
|
+
type BorderRadiusTokens = keyof typeof borderRadiusTokens;
|
|
121
|
+
type FontWeightTokens = keyof typeof fontWeightTokens;
|
|
122
|
+
type TypographyTokens = keyof typeof typographyTokens;
|
|
85
123
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
tokens_coolgray300 as coolgray300,
|
|
163
|
-
tokens_coolgray50 as coolgray50,
|
|
164
|
-
tokens_fontWeightBold as fontWeightBold,
|
|
165
|
-
tokens_fontWeightMedium as fontWeightMedium,
|
|
166
|
-
tokens_fontWeightRegular as fontWeightRegular,
|
|
167
|
-
tokens_green100 as green100,
|
|
168
|
-
tokens_green200 as green200,
|
|
169
|
-
tokens_green300 as green300,
|
|
170
|
-
tokens_hada100 as hada100,
|
|
171
|
-
tokens_hada150 as hada150,
|
|
172
|
-
tokens_hada200 as hada200,
|
|
173
|
-
tokens_hada300 as hada300,
|
|
174
|
-
tokens_hada400 as hada400,
|
|
175
|
-
tokens_navy300 as navy300,
|
|
176
|
-
tokens_navy400 as navy400,
|
|
177
|
-
tokens_neutral0 as neutral0,
|
|
178
|
-
tokens_neutral100 as neutral100,
|
|
179
|
-
tokens_neutral150 as neutral150,
|
|
180
|
-
tokens_neutral200 as neutral200,
|
|
181
|
-
tokens_neutral300 as neutral300,
|
|
182
|
-
tokens_neutral350 as neutral350,
|
|
183
|
-
tokens_neutral400 as neutral400,
|
|
184
|
-
tokens_neutral400_5 as neutral400_5,
|
|
185
|
-
tokens_neutral500 as neutral500,
|
|
186
|
-
tokens_neutral600 as neutral600,
|
|
187
|
-
tokens_neutral700 as neutral700,
|
|
188
|
-
tokens_ocean100 as ocean100,
|
|
189
|
-
tokens_ocean200 as ocean200,
|
|
190
|
-
tokens_ocean300 as ocean300,
|
|
191
|
-
tokens_primary100 as primary100,
|
|
192
|
-
tokens_primary150 as primary150,
|
|
193
|
-
tokens_primary200 as primary200,
|
|
194
|
-
tokens_primary300 as primary300,
|
|
195
|
-
tokens_primary400 as primary400,
|
|
196
|
-
tokens_purple100 as purple100,
|
|
197
|
-
tokens_purple300 as purple300,
|
|
198
|
-
tokens_purple400 as purple400,
|
|
199
|
-
tokens_red100 as red100,
|
|
200
|
-
tokens_red200 as red200,
|
|
201
|
-
tokens_red300 as red300,
|
|
202
|
-
tokens_shopl100 as shopl100,
|
|
203
|
-
tokens_shopl150 as shopl150,
|
|
204
|
-
tokens_shopl200 as shopl200,
|
|
205
|
-
tokens_shopl300 as shopl300,
|
|
206
|
-
tokens_shopl400 as shopl400,
|
|
207
|
-
tokens_spacing04 as spacing04,
|
|
208
|
-
tokens_spacing06 as spacing06,
|
|
209
|
-
tokens_spacing08 as spacing08,
|
|
210
|
-
tokens_spacing12 as spacing12,
|
|
211
|
-
tokens_spacing16 as spacing16,
|
|
212
|
-
tokens_spacing20 as spacing20,
|
|
213
|
-
tokens_spacing24 as spacing24,
|
|
214
|
-
tokens_spacing30 as spacing30,
|
|
215
|
-
tokens_spacing32 as spacing32,
|
|
216
|
-
tokens_spacing40 as spacing40,
|
|
217
|
-
tokens_yellow100 as yellow100,
|
|
218
|
-
tokens_yellow200 as yellow200,
|
|
219
|
-
tokens_yellow300 as yellow300,
|
|
220
|
-
};
|
|
124
|
+
type StringElementType = ElementType & string;
|
|
125
|
+
type HTMLPropsWithOutRef<T extends StringElementType> = ComponentPropsWithoutRef<T>;
|
|
126
|
+
type RenderConfigProps = {
|
|
127
|
+
/**
|
|
128
|
+
* 랜더하려고 하는 HTML tag로 변환할 수 있습니다.
|
|
129
|
+
*
|
|
130
|
+
* 예를 들어 a tag로 변환한다면 as='a'로 작성해주세요.
|
|
131
|
+
*
|
|
132
|
+
* @see https://emotion.sh/docs/styled#as-prop
|
|
133
|
+
*/
|
|
134
|
+
as?: StringElementType;
|
|
135
|
+
};
|
|
136
|
+
interface ChildrenProps<Children = React__default.ReactNode> {
|
|
137
|
+
/**
|
|
138
|
+
* 컴포넌트 내부에 들어갈 children을 설정합니다.
|
|
139
|
+
*/
|
|
140
|
+
children?: Children;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
type StackGenericProps<T extends StringElementType = 'div'> = RenderConfigProps & StackProps & HTMLPropsWithOutRef<T>;
|
|
144
|
+
type StackComponentType = <T extends StringElementType = 'div'>(props: StackGenericProps<T> & Pick<ComponentPropsWithRef<T>, 'ref'>) => ReactElement | null;
|
|
145
|
+
type MotionStackComponentType<T extends StringElementType = 'div'> = CustomDomComponent<RenderConfigProps & HTMLPropsWithOutRef<T> & StackProps>;
|
|
146
|
+
interface StackProps extends StackOptionProps, ChildrenProps {
|
|
147
|
+
}
|
|
148
|
+
interface StackOptionProps {
|
|
149
|
+
/**
|
|
150
|
+
* 요소들의 align-items 값
|
|
151
|
+
*/
|
|
152
|
+
align?: CSSProperties['alignItems'];
|
|
153
|
+
/**
|
|
154
|
+
* 요소들의 justify-content 값
|
|
155
|
+
*/
|
|
156
|
+
justify?: CSSProperties['justifyContent'];
|
|
157
|
+
/**
|
|
158
|
+
* 요소들의 flex-direction 값
|
|
159
|
+
* (값: row, column)
|
|
160
|
+
*/
|
|
161
|
+
direction?: CSSProperties['flexDirection'];
|
|
162
|
+
/**
|
|
163
|
+
* 요소들 사이의 간격
|
|
164
|
+
*/
|
|
165
|
+
spacing?: SpacingTokens;
|
|
166
|
+
/**
|
|
167
|
+
* flex-wrap 설정
|
|
168
|
+
*/
|
|
169
|
+
flexWrap?: CSSProperties['flexWrap'];
|
|
170
|
+
/**
|
|
171
|
+
* width 설정
|
|
172
|
+
*/
|
|
173
|
+
width?: CSSProperties['width'];
|
|
174
|
+
/**
|
|
175
|
+
* height 설정
|
|
176
|
+
*/
|
|
177
|
+
height?: CSSProperties['height'];
|
|
178
|
+
/**
|
|
179
|
+
* flex 설정
|
|
180
|
+
*/
|
|
181
|
+
flex?: CSSProperties['flex'];
|
|
182
|
+
/**
|
|
183
|
+
* background 설정
|
|
184
|
+
*/
|
|
185
|
+
background?: ColorTokens;
|
|
186
|
+
/**
|
|
187
|
+
* border-radius 설정
|
|
188
|
+
*/
|
|
189
|
+
radius?: BorderRadiusTokens;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
interface StackType extends StackComponentType {
|
|
193
|
+
Vertical: StackComponentType;
|
|
194
|
+
Horizontal: StackComponentType;
|
|
195
|
+
}
|
|
196
|
+
declare const Stack: StackType;
|
|
197
|
+
interface MotionStackType extends MotionStackComponentType {
|
|
198
|
+
Vertical: MotionStackComponentType;
|
|
199
|
+
Horizontal: MotionStackComponentType;
|
|
221
200
|
}
|
|
201
|
+
declare const MotionStack: MotionStackType;
|
|
222
202
|
|
|
223
|
-
|
|
203
|
+
declare const StyledStack: _emotion_styled.StyledComponent<{
|
|
204
|
+
theme?: _emotion_react.Theme | undefined;
|
|
205
|
+
as?: React.ElementType<any> | undefined;
|
|
206
|
+
} & StackOptionProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
224
207
|
|
|
225
|
-
export {
|
|
208
|
+
export { BorderRadiusTokens, ColorTokens, FontWeightTokens, MotionStack, MotionStackComponentType, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackGenericProps, StackOptionProps, StackProps, StyledStack, TypographyTokens, borderRadiusTokens, colorTokens, fontWeightTokens, spacingTokens, typographyTokens, useDomain };
|