@mmb-digital/design-system-web 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/.babelrc.json +16 -0
- package/.eslintrc.js +165 -0
- package/.prettierrc.js +15 -0
- package/.storybook/main.ts +23 -0
- package/.storybook/preview.tsx +27 -0
- package/dist/cjs/index.js +131 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/jest.config.d.ts +7 -0
- package/dist/cjs/types/src/components/button/button.d.ts +4 -0
- package/dist/cjs/types/src/components/button/button.styles.d.ts +4 -0
- package/dist/cjs/types/src/components/button/button.test.d.ts +1 -0
- package/dist/cjs/types/src/components/button/button.types.d.ts +29 -0
- package/dist/cjs/types/src/components/form/hint/formHint.d.ts +4 -0
- package/dist/cjs/types/src/components/form/hint/formHint.style.d.ts +1 -0
- package/dist/cjs/types/src/components/form/hint/formHint.types.d.ts +4 -0
- package/dist/cjs/types/src/components/slider/slider/slider.d.ts +5 -0
- package/dist/cjs/types/src/components/slider/slider/slider.style.d.ts +5 -0
- package/dist/cjs/types/src/components/slider/slider/slider.types.d.ts +47 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/default/sliderFunctionDefault.d.ts +2 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/default/sliderStep.d.ts +7 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/default/sliderStep.test.d.ts +1 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderFunctionLinearVisualSteps.d.ts +2 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderMax.d.ts +8 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderMax.test.d.ts +1 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderValueByValue.d.ts +9 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderValueByValue.test.d.ts +1 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/linearVisualSteps/valueBySliderValue.d.ts +2 -0
- package/dist/cjs/types/src/components/slider/slider/sliderFunction/linearVisualSteps/valueBySliderValue.test.d.ts +1 -0
- package/dist/cjs/types/src/components/slider/slider/sliderHandleSvgHandler.d.ts +2 -0
- package/dist/cjs/types/src/components/storeButton/assets/androidSvg.d.ts +8 -0
- package/dist/cjs/types/src/components/storeButton/assets/appleSvg.d.ts +8 -0
- package/dist/cjs/types/src/components/storeButton/storeButton.d.ts +4 -0
- package/dist/cjs/types/src/components/storeButton/storeButton.styles.d.ts +3 -0
- package/dist/cjs/types/src/components/storeButton/storeButton.test.d.ts +1 -0
- package/dist/cjs/types/src/components/storeButton/storeButton.types.d.ts +13 -0
- package/dist/cjs/types/src/icons/systemIcon.d.ts +8 -0
- package/dist/cjs/types/src/index.d.ts +1 -0
- package/dist/cjs/types/src/provider/storybook/storybookProvider.d.ts +4 -0
- package/dist/cjs/types/src/provider/storybook/storybookProvider.types.d.ts +4 -0
- package/dist/cjs/types/src/provider/styledComponents/theme/styledComponentsThemeProvider.d.ts +4 -0
- package/dist/cjs/types/src/provider/styledComponents/theme/styledComponentsThemeProvider.types..d.ts +4 -0
- package/dist/cjs/types/src/style/styledComponents/theme.d.ts +441 -0
- package/dist/esm/index.js +131 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/jest.config.d.ts +7 -0
- package/dist/esm/types/src/components/button/button.d.ts +4 -0
- package/dist/esm/types/src/components/button/button.styles.d.ts +4 -0
- package/dist/esm/types/src/components/button/button.test.d.ts +1 -0
- package/dist/esm/types/src/components/button/button.types.d.ts +29 -0
- package/dist/esm/types/src/components/form/hint/formHint.d.ts +4 -0
- package/dist/esm/types/src/components/form/hint/formHint.style.d.ts +1 -0
- package/dist/esm/types/src/components/form/hint/formHint.types.d.ts +4 -0
- package/dist/esm/types/src/components/slider/slider/slider.d.ts +5 -0
- package/dist/esm/types/src/components/slider/slider/slider.style.d.ts +5 -0
- package/dist/esm/types/src/components/slider/slider/slider.types.d.ts +47 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/default/sliderFunctionDefault.d.ts +2 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/default/sliderStep.d.ts +7 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/default/sliderStep.test.d.ts +1 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderFunctionLinearVisualSteps.d.ts +2 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderMax.d.ts +8 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderMax.test.d.ts +1 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderValueByValue.d.ts +9 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderValueByValue.test.d.ts +1 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/linearVisualSteps/valueBySliderValue.d.ts +2 -0
- package/dist/esm/types/src/components/slider/slider/sliderFunction/linearVisualSteps/valueBySliderValue.test.d.ts +1 -0
- package/dist/esm/types/src/components/slider/slider/sliderHandleSvgHandler.d.ts +2 -0
- package/dist/esm/types/src/components/storeButton/assets/androidSvg.d.ts +8 -0
- package/dist/esm/types/src/components/storeButton/assets/appleSvg.d.ts +8 -0
- package/dist/esm/types/src/components/storeButton/storeButton.d.ts +4 -0
- package/dist/esm/types/src/components/storeButton/storeButton.styles.d.ts +3 -0
- package/dist/esm/types/src/components/storeButton/storeButton.test.d.ts +1 -0
- package/dist/esm/types/src/components/storeButton/storeButton.types.d.ts +13 -0
- package/dist/esm/types/src/icons/systemIcon.d.ts +8 -0
- package/dist/esm/types/src/index.d.ts +1 -0
- package/dist/esm/types/src/provider/storybook/storybookProvider.d.ts +4 -0
- package/dist/esm/types/src/provider/storybook/storybookProvider.types.d.ts +4 -0
- package/dist/esm/types/src/provider/styledComponents/theme/styledComponentsThemeProvider.d.ts +4 -0
- package/dist/esm/types/src/provider/styledComponents/theme/styledComponentsThemeProvider.types..d.ts +4 -0
- package/dist/esm/types/src/style/styledComponents/theme.d.ts +441 -0
- package/jest.config.ts +197 -0
- package/package.json +97 -0
- package/readme.md +39 -0
- package/rollup.config.js +33 -0
- package/src/@types/json.d.ts +5 -0
- package/src/@types/styledComponentCssProps.d.ts +11 -0
- package/src/@types/styledComponentTheme.d.ts +9 -0
- package/src/components/button/button.stories.tsx +97 -0
- package/src/components/button/button.styles.ts +162 -0
- package/src/components/button/button.test.tsx +25 -0
- package/src/components/button/button.tsx +31 -0
- package/src/components/button/button.types.ts +33 -0
- package/src/components/form/hint/formHint.style.ts +10 -0
- package/src/components/form/hint/formHint.tsx +13 -0
- package/src/components/form/hint/formHint.types.ts +5 -0
- package/src/components/slider/slider/slider.stories.tsx +176 -0
- package/src/components/slider/slider/slider.style.ts +29 -0
- package/src/components/slider/slider/slider.tsx +136 -0
- package/src/components/slider/slider/slider.types.ts +58 -0
- package/src/components/slider/slider/sliderFunction/default/sliderFunctionDefault.ts +21 -0
- package/src/components/slider/slider/sliderFunction/default/sliderStep.test.ts +90 -0
- package/src/components/slider/slider/sliderFunction/default/sliderStep.ts +18 -0
- package/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderFunctionLinearVisualSteps.ts +28 -0
- package/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderMax.test.ts +83 -0
- package/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderMax.ts +34 -0
- package/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderValueByValue.test.ts +249 -0
- package/src/components/slider/slider/sliderFunction/linearVisualSteps/sliderValueByValue.ts +41 -0
- package/src/components/slider/slider/sliderFunction/linearVisualSteps/valueBySliderValue.test.ts +204 -0
- package/src/components/slider/slider/sliderFunction/linearVisualSteps/valueBySliderValue.ts +35 -0
- package/src/components/slider/slider/sliderHandleSvgHandler.ts +26 -0
- package/src/components/storeButton/assets/androidSvg.tsx +159 -0
- package/src/components/storeButton/assets/appleSvg.tsx +31 -0
- package/src/components/storeButton/storeButton.stories.tsx +67 -0
- package/src/components/storeButton/storeButton.styles.ts +36 -0
- package/src/components/storeButton/storeButton.test.tsx +22 -0
- package/src/components/storeButton/storeButton.tsx +30 -0
- package/src/components/storeButton/storeButton.types.tsx +15 -0
- package/src/icons/systemIcon.tsx +26 -0
- package/src/index.ts +1 -0
- package/src/provider/storybook/storybookProvider.tsx +11 -0
- package/src/provider/storybook/storybookProvider.types.ts +5 -0
- package/src/provider/styledComponents/theme/styledComponentsThemeProvider.tsx +14 -0
- package/src/provider/styledComponents/theme/styledComponentsThemeProvider.types..ts +5 -0
- package/src/style/styledComponents/mmb_variables-5224.json +958 -0
- package/src/style/styledComponents/theme.ts +450 -0
- package/stylelint.config.js +15 -0
- package/tsconfig.json +29 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
export declare const theme: {
|
|
2
|
+
palette: {
|
|
3
|
+
gold100: string;
|
|
4
|
+
gold200: string;
|
|
5
|
+
gold500: string;
|
|
6
|
+
gold600: string;
|
|
7
|
+
gold700: string;
|
|
8
|
+
gold800: string;
|
|
9
|
+
pink100: string;
|
|
10
|
+
pink200: string;
|
|
11
|
+
pink300: string;
|
|
12
|
+
pink400: string;
|
|
13
|
+
pink500: string;
|
|
14
|
+
pink600: string;
|
|
15
|
+
pink700: string;
|
|
16
|
+
pink800: string;
|
|
17
|
+
pink900: string;
|
|
18
|
+
pink1000: string;
|
|
19
|
+
grey100: string;
|
|
20
|
+
grey200: string;
|
|
21
|
+
grey300: string;
|
|
22
|
+
grey400: string;
|
|
23
|
+
grey500: string;
|
|
24
|
+
grey600: string;
|
|
25
|
+
grey700: string;
|
|
26
|
+
grey800: string;
|
|
27
|
+
grey900: string;
|
|
28
|
+
grey1000: string;
|
|
29
|
+
black: string;
|
|
30
|
+
white: string;
|
|
31
|
+
transparent: string;
|
|
32
|
+
yellow100: string;
|
|
33
|
+
yellow200: string;
|
|
34
|
+
yellow300: string;
|
|
35
|
+
yellow400: string;
|
|
36
|
+
yellow500: string;
|
|
37
|
+
yellow600: string;
|
|
38
|
+
yellow700: string;
|
|
39
|
+
yellow800: string;
|
|
40
|
+
yellow900: string;
|
|
41
|
+
yellow1000: string;
|
|
42
|
+
green100: string;
|
|
43
|
+
green200: string;
|
|
44
|
+
green300: string;
|
|
45
|
+
green400: string;
|
|
46
|
+
green500: string;
|
|
47
|
+
green600: string;
|
|
48
|
+
green700: string;
|
|
49
|
+
green800: string;
|
|
50
|
+
green900: string;
|
|
51
|
+
green1000: string;
|
|
52
|
+
red100: string;
|
|
53
|
+
red200: string;
|
|
54
|
+
red300: string;
|
|
55
|
+
red400: string;
|
|
56
|
+
red500: string;
|
|
57
|
+
red600: string;
|
|
58
|
+
red700: string;
|
|
59
|
+
red800: string;
|
|
60
|
+
red900: string;
|
|
61
|
+
red1000: string;
|
|
62
|
+
blue100: string;
|
|
63
|
+
blue200: string;
|
|
64
|
+
blue300: string;
|
|
65
|
+
blue400: string;
|
|
66
|
+
blue500: string;
|
|
67
|
+
blue600: string;
|
|
68
|
+
blue700: string;
|
|
69
|
+
blue800: string;
|
|
70
|
+
blue900: string;
|
|
71
|
+
blue1000: string;
|
|
72
|
+
};
|
|
73
|
+
colors: {
|
|
74
|
+
fg: {
|
|
75
|
+
neutral: {
|
|
76
|
+
default: {
|
|
77
|
+
light: string;
|
|
78
|
+
dark: string;
|
|
79
|
+
};
|
|
80
|
+
subtle: {
|
|
81
|
+
light: string;
|
|
82
|
+
dark: string;
|
|
83
|
+
};
|
|
84
|
+
subtlest: {
|
|
85
|
+
light: string;
|
|
86
|
+
dark: string;
|
|
87
|
+
};
|
|
88
|
+
white: {
|
|
89
|
+
light: string;
|
|
90
|
+
dark: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
disabled: {
|
|
94
|
+
light: string;
|
|
95
|
+
dark: string;
|
|
96
|
+
};
|
|
97
|
+
inverse: {
|
|
98
|
+
light: string;
|
|
99
|
+
dark: string;
|
|
100
|
+
};
|
|
101
|
+
link: {
|
|
102
|
+
default: {
|
|
103
|
+
light: string;
|
|
104
|
+
dark: string;
|
|
105
|
+
};
|
|
106
|
+
hover: {
|
|
107
|
+
light: string;
|
|
108
|
+
dark: string;
|
|
109
|
+
};
|
|
110
|
+
pressed: {
|
|
111
|
+
light: string;
|
|
112
|
+
dark: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
success: {
|
|
116
|
+
light: string;
|
|
117
|
+
dark: string;
|
|
118
|
+
};
|
|
119
|
+
warning: {
|
|
120
|
+
light: string;
|
|
121
|
+
dark: string;
|
|
122
|
+
};
|
|
123
|
+
error: {
|
|
124
|
+
light: string;
|
|
125
|
+
dark: string;
|
|
126
|
+
};
|
|
127
|
+
info: {
|
|
128
|
+
light: string;
|
|
129
|
+
dark: string;
|
|
130
|
+
};
|
|
131
|
+
promo: {
|
|
132
|
+
light: string;
|
|
133
|
+
dark: string;
|
|
134
|
+
};
|
|
135
|
+
brand: {
|
|
136
|
+
default: {
|
|
137
|
+
light: string;
|
|
138
|
+
dark: string;
|
|
139
|
+
};
|
|
140
|
+
bold: {
|
|
141
|
+
light: string;
|
|
142
|
+
dark: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
accent: {
|
|
146
|
+
default: {
|
|
147
|
+
light: string;
|
|
148
|
+
dark: string;
|
|
149
|
+
};
|
|
150
|
+
bold: {
|
|
151
|
+
light: string;
|
|
152
|
+
dark: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
bg: {
|
|
157
|
+
neutral: {
|
|
158
|
+
default: {
|
|
159
|
+
light: string;
|
|
160
|
+
dark: string;
|
|
161
|
+
};
|
|
162
|
+
subtle: {
|
|
163
|
+
light: string;
|
|
164
|
+
dark: string;
|
|
165
|
+
};
|
|
166
|
+
subtlest: {
|
|
167
|
+
light: string;
|
|
168
|
+
dark: string;
|
|
169
|
+
};
|
|
170
|
+
white: {
|
|
171
|
+
light: string;
|
|
172
|
+
dark: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
disabled: {
|
|
176
|
+
light: string;
|
|
177
|
+
dark: string;
|
|
178
|
+
};
|
|
179
|
+
promo: {
|
|
180
|
+
default: {
|
|
181
|
+
light: string;
|
|
182
|
+
dark: string;
|
|
183
|
+
};
|
|
184
|
+
bold: {
|
|
185
|
+
light: string;
|
|
186
|
+
dark: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
error: {
|
|
190
|
+
default: {
|
|
191
|
+
light: string;
|
|
192
|
+
dark: string;
|
|
193
|
+
};
|
|
194
|
+
bold: {
|
|
195
|
+
light: string;
|
|
196
|
+
dark: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
warning: {
|
|
200
|
+
default: {
|
|
201
|
+
light: string;
|
|
202
|
+
dark: string;
|
|
203
|
+
};
|
|
204
|
+
bold: {
|
|
205
|
+
light: string;
|
|
206
|
+
dark: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
inverse: {
|
|
210
|
+
light: string;
|
|
211
|
+
dark: string;
|
|
212
|
+
};
|
|
213
|
+
success: {
|
|
214
|
+
default: {
|
|
215
|
+
light: string;
|
|
216
|
+
dark: string;
|
|
217
|
+
};
|
|
218
|
+
bold: {
|
|
219
|
+
light: string;
|
|
220
|
+
dark: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
info: {
|
|
224
|
+
default: {
|
|
225
|
+
light: string;
|
|
226
|
+
dark: string;
|
|
227
|
+
};
|
|
228
|
+
bold: {
|
|
229
|
+
light: string;
|
|
230
|
+
dark: string;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
accent: {
|
|
234
|
+
light: string;
|
|
235
|
+
dark: string;
|
|
236
|
+
};
|
|
237
|
+
brand: {
|
|
238
|
+
default: {
|
|
239
|
+
light: string;
|
|
240
|
+
dark: string;
|
|
241
|
+
hover: {
|
|
242
|
+
light: string;
|
|
243
|
+
dark: string;
|
|
244
|
+
};
|
|
245
|
+
pressed: {
|
|
246
|
+
light: string;
|
|
247
|
+
dark: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
bold: {
|
|
251
|
+
light: string;
|
|
252
|
+
dark: string;
|
|
253
|
+
hover: {
|
|
254
|
+
light: string;
|
|
255
|
+
dark: string;
|
|
256
|
+
};
|
|
257
|
+
pressed: {
|
|
258
|
+
light: string;
|
|
259
|
+
dark: string;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
surface: {
|
|
265
|
+
overlay: {
|
|
266
|
+
light: string;
|
|
267
|
+
dark: string;
|
|
268
|
+
};
|
|
269
|
+
risen: {
|
|
270
|
+
light: string;
|
|
271
|
+
dark: string;
|
|
272
|
+
};
|
|
273
|
+
default: {
|
|
274
|
+
light: string;
|
|
275
|
+
dark: string;
|
|
276
|
+
};
|
|
277
|
+
sunken: {
|
|
278
|
+
light: string;
|
|
279
|
+
dark: string;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
border: {
|
|
283
|
+
neutral: {
|
|
284
|
+
default: {
|
|
285
|
+
light: string;
|
|
286
|
+
dark: string;
|
|
287
|
+
};
|
|
288
|
+
subtle: {
|
|
289
|
+
light: string;
|
|
290
|
+
dark: string;
|
|
291
|
+
};
|
|
292
|
+
subtlest: {
|
|
293
|
+
light: string;
|
|
294
|
+
dark: string;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
disabled: {
|
|
298
|
+
light: string;
|
|
299
|
+
dark: string;
|
|
300
|
+
};
|
|
301
|
+
success: {
|
|
302
|
+
light: string;
|
|
303
|
+
dark: string;
|
|
304
|
+
};
|
|
305
|
+
warning: {
|
|
306
|
+
light: string;
|
|
307
|
+
dark: string;
|
|
308
|
+
};
|
|
309
|
+
error: {
|
|
310
|
+
light: string;
|
|
311
|
+
dark: string;
|
|
312
|
+
};
|
|
313
|
+
promo: {
|
|
314
|
+
light: string;
|
|
315
|
+
dark: string;
|
|
316
|
+
};
|
|
317
|
+
brand: {
|
|
318
|
+
bold: {
|
|
319
|
+
light: string;
|
|
320
|
+
dark: string;
|
|
321
|
+
};
|
|
322
|
+
default: {
|
|
323
|
+
light: string;
|
|
324
|
+
dark: string;
|
|
325
|
+
};
|
|
326
|
+
subtle: {
|
|
327
|
+
light: string;
|
|
328
|
+
dark: string;
|
|
329
|
+
};
|
|
330
|
+
subtlest: {
|
|
331
|
+
light: string;
|
|
332
|
+
dark: string;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
inverse: {
|
|
336
|
+
light: string;
|
|
337
|
+
dark: string;
|
|
338
|
+
};
|
|
339
|
+
accent: {
|
|
340
|
+
light: string;
|
|
341
|
+
dark: string;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
icon: {
|
|
345
|
+
bg: {
|
|
346
|
+
light: string;
|
|
347
|
+
dark: string;
|
|
348
|
+
};
|
|
349
|
+
brand: {
|
|
350
|
+
light: string;
|
|
351
|
+
dark: string;
|
|
352
|
+
};
|
|
353
|
+
neutral: {
|
|
354
|
+
light: string;
|
|
355
|
+
dark: string;
|
|
356
|
+
};
|
|
357
|
+
inverse: {
|
|
358
|
+
light: string;
|
|
359
|
+
dark: string;
|
|
360
|
+
};
|
|
361
|
+
disabled: {
|
|
362
|
+
light: string;
|
|
363
|
+
dark: string;
|
|
364
|
+
};
|
|
365
|
+
error: {
|
|
366
|
+
light: string;
|
|
367
|
+
dark: string;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
shadow: {
|
|
371
|
+
buttonFocus: string;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
font: {
|
|
375
|
+
size: {
|
|
376
|
+
body: {
|
|
377
|
+
xs: string;
|
|
378
|
+
sm: string;
|
|
379
|
+
md: string;
|
|
380
|
+
lg: string;
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
lineHeight: {
|
|
384
|
+
body: {
|
|
385
|
+
xs: string;
|
|
386
|
+
sm: string;
|
|
387
|
+
md: string;
|
|
388
|
+
lg: string;
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
weight: {
|
|
392
|
+
thin: number;
|
|
393
|
+
extraLight: number;
|
|
394
|
+
light: number;
|
|
395
|
+
normal: number;
|
|
396
|
+
medium: number;
|
|
397
|
+
semiBold: number;
|
|
398
|
+
bold: number;
|
|
399
|
+
extraBold: number;
|
|
400
|
+
heavy: number;
|
|
401
|
+
ultra: number;
|
|
402
|
+
};
|
|
403
|
+
letterSpacing: {
|
|
404
|
+
body: {
|
|
405
|
+
md: string;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
spacing: {
|
|
410
|
+
xxs: string;
|
|
411
|
+
xs: string;
|
|
412
|
+
sm: string;
|
|
413
|
+
md: string;
|
|
414
|
+
lg: string;
|
|
415
|
+
xl: string;
|
|
416
|
+
xxl: string;
|
|
417
|
+
xxxl: string;
|
|
418
|
+
xxxxl: string;
|
|
419
|
+
xxxxxl: string;
|
|
420
|
+
};
|
|
421
|
+
borderRadius: {
|
|
422
|
+
xxs: string;
|
|
423
|
+
xs: string;
|
|
424
|
+
sm: string;
|
|
425
|
+
md: string;
|
|
426
|
+
lg: string;
|
|
427
|
+
xl: string;
|
|
428
|
+
full: string;
|
|
429
|
+
};
|
|
430
|
+
container: {
|
|
431
|
+
xl: string;
|
|
432
|
+
};
|
|
433
|
+
breakpoints: {
|
|
434
|
+
xs: string;
|
|
435
|
+
sm: string;
|
|
436
|
+
md: string;
|
|
437
|
+
lg: string;
|
|
438
|
+
xl: string;
|
|
439
|
+
xxl: string;
|
|
440
|
+
};
|
|
441
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import"react";import e,{css as t}from"styled-components";var o,r,i;!function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary"}(o||(o={})),function(e){e.MD="md",e.SM="sm",e.XL="xl",e.XS="xs",e.XXL="xxl"}(r||(r={})),function(e){e.BUTTON="button",e.RESET="reset",e.SUBMIT="submit"}(i||(i={})),e.button`
|
|
2
|
+
/* common styles */
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-shrink: 0;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
|
|
9
|
+
/* type specific styles */
|
|
10
|
+
${({buttonStyle:e})=>{switch(e){case o.PRIMARY:return t`
|
|
11
|
+
color: ${({theme:e})=>e.colors.fg.neutral.white.light};
|
|
12
|
+
background-color: ${({theme:e})=>e.colors.bg.brand.bold.light};
|
|
13
|
+
border: 1px solid ${({theme:e})=>e.colors.border.brand.bold.light};
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
background-color: ${({theme:e})=>e.colors.bg.brand.bold.hover.light};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:focus {
|
|
20
|
+
box-shadow: ${({theme:e})=>e.colors.shadow.buttonFocus};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:active {
|
|
24
|
+
background-color: ${({theme:e})=>e.colors.bg.brand.bold.pressed.light};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:disabled {
|
|
28
|
+
color: ${({theme:e})=>e.colors.fg.disabled.light};
|
|
29
|
+
background-color: ${({theme:e})=>e.colors.bg.disabled.light};
|
|
30
|
+
border: 1px solid ${({theme:e})=>e.colors.bg.disabled.light};
|
|
31
|
+
}
|
|
32
|
+
`;case o.SECONDARY:return t`
|
|
33
|
+
color: ${({theme:e})=>e.colors.fg.neutral.subtle.light};
|
|
34
|
+
background-color: ${({theme:e})=>e.colors.bg.neutral.white.light};
|
|
35
|
+
border: 1px solid ${({theme:e})=>e.colors.border.neutral.subtle.light};
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: ${({theme:e})=>e.colors.bg.brand.default.light};
|
|
39
|
+
border: 2px solid ${({theme:e})=>e.colors.border.brand.subtle.light};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:focus {
|
|
43
|
+
box-shadow: ${({theme:e})=>e.colors.shadow.buttonFocus};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:active {
|
|
47
|
+
background-color: ${({theme:e})=>e.colors.bg.brand.default.pressed.light};
|
|
48
|
+
border: 2px solid ${({theme:e})=>e.colors.border.brand.subtle.light};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:disabled {
|
|
52
|
+
color: ${({theme:e})=>e.colors.fg.disabled.light};
|
|
53
|
+
background-color: ${({theme:e})=>e.colors.bg.neutral.white.light};
|
|
54
|
+
border: 1px solid ${({theme:e})=>e.colors.bg.disabled.light};
|
|
55
|
+
}
|
|
56
|
+
`;case o.TERTIARY:return t`
|
|
57
|
+
color: ${({theme:e})=>e.colors.fg.neutral.subtle.light};
|
|
58
|
+
background-color: ${({theme:e})=>e.colors.bg.neutral.white.light};
|
|
59
|
+
border: none;
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
background-color: ${({theme:e})=>e.colors.bg.brand.default.light};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:focus {
|
|
66
|
+
box-shadow: ${({theme:e})=>e.colors.shadow.buttonFocus};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:active {
|
|
70
|
+
background-color: ${({theme:e})=>e.colors.bg.brand.default.pressed.light};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:disabled {
|
|
74
|
+
color: ${({theme:e})=>e.colors.fg.disabled.light};
|
|
75
|
+
background-color: ${({theme:e})=>e.colors.bg.neutral.white.light};
|
|
76
|
+
}
|
|
77
|
+
`;default:return""}}}
|
|
78
|
+
|
|
79
|
+
/* size specific styles */
|
|
80
|
+
${({size:e})=>{switch(e){case r.XS:return t`
|
|
81
|
+
gap: ${({theme:e})=>e.spacing.xxs};
|
|
82
|
+
min-height: ${({theme:e})=>e.spacing.xl};
|
|
83
|
+
padding: ${({theme:e})=>e.spacing.xxs} ${({theme:e})=>e.spacing.xs};
|
|
84
|
+
font-size: ${({theme:e})=>e.font.size.body.xs};
|
|
85
|
+
font-weight: ${({theme:e})=>e.font.weight.medium};
|
|
86
|
+
line-height: ${({theme:e})=>e.font.lineHeight.body.xs};
|
|
87
|
+
letter-spacing: ${({theme:e})=>e.font.letterSpacing.body.md};
|
|
88
|
+
border-radius: ${({theme:e})=>e.borderRadius.xxs};
|
|
89
|
+
`;case r.SM:return t`
|
|
90
|
+
gap: ${({theme:e})=>e.spacing.xxs};
|
|
91
|
+
min-height: ${({theme:e})=>e.spacing.xl};
|
|
92
|
+
padding: ${({theme:e})=>e.spacing.xxs} ${({theme:e})=>e.spacing.xs};
|
|
93
|
+
font-size: ${({theme:e})=>e.font.size.body.sm};
|
|
94
|
+
font-weight: ${({theme:e})=>e.font.weight.medium};
|
|
95
|
+
line-height: ${({theme:e})=>e.font.lineHeight.body.sm};
|
|
96
|
+
letter-spacing: ${({theme:e})=>e.font.letterSpacing.body.md};
|
|
97
|
+
border-radius: ${({theme:e})=>e.borderRadius.xxs};
|
|
98
|
+
`;case r.MD:return t`
|
|
99
|
+
gap: ${({theme:e})=>e.spacing.xxs};
|
|
100
|
+
min-height: ${({theme:e})=>e.spacing.xxl};
|
|
101
|
+
padding: ${({theme:e})=>e.spacing.xs} ${({theme:e})=>e.spacing.sm};
|
|
102
|
+
font-size: ${({theme:e})=>e.font.size.body.sm};
|
|
103
|
+
font-weight: ${({theme:e})=>e.font.weight.medium};
|
|
104
|
+
line-height: ${({theme:e})=>e.font.lineHeight.body.sm};
|
|
105
|
+
letter-spacing: ${({theme:e})=>e.font.letterSpacing.body.md};
|
|
106
|
+
border-radius: ${({theme:e})=>e.borderRadius.xs};
|
|
107
|
+
`;case r.XL:return t`
|
|
108
|
+
gap: ${({theme:e})=>e.spacing.xs};
|
|
109
|
+
min-height: ${({theme:e})=>e.spacing.xxxl};
|
|
110
|
+
padding: ${({theme:e})=>e.spacing.sm};
|
|
111
|
+
font-size: ${({theme:e})=>e.font.size.body.md};
|
|
112
|
+
font-weight: ${({theme:e})=>e.font.weight.medium};
|
|
113
|
+
line-height: ${({theme:e})=>e.font.lineHeight.body.md};
|
|
114
|
+
border-radius: ${({theme:e})=>e.borderRadius.xs};
|
|
115
|
+
`;case r.XXL:return t`
|
|
116
|
+
gap: ${({theme:e})=>e.spacing.sm};
|
|
117
|
+
min-height: ${({theme:e})=>e.spacing.xxxxl};
|
|
118
|
+
padding: ${({theme:e})=>e.spacing.md} ${({theme:e})=>e.spacing.xl};
|
|
119
|
+
font-size: ${({theme:e})=>e.font.size.body.lg};
|
|
120
|
+
font-weight: ${({theme:e})=>e.font.weight.medium};
|
|
121
|
+
line-height: ${({theme:e})=>e.font.lineHeight.body.lg};
|
|
122
|
+
border-radius: ${({theme:e})=>e.borderRadius.sm};
|
|
123
|
+
`;default:return t`
|
|
124
|
+
border-radius: ${({theme:e})=>e.borderRadius.xxs};
|
|
125
|
+
`}}}
|
|
126
|
+
`,e.div`
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
height: 100%;
|
|
130
|
+
`;
|
|
131
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/button/button.types.ts","../../../src/components/button/button.styles.ts"],"sourcesContent":[null,null],"names":["ButtonStyle","ButtonSize","ButtonType","styled","button","buttonStyle","PRIMARY","css","theme","colors","fg","neutral","white","light","bg","brand","bold","border","hover","shadow","buttonFocus","pressed","disabled","SECONDARY","subtle","default","TERTIARY","size","XS","spacing","xxs","xl","xs","font","body","weight","medium","lineHeight","letterSpacing","md","borderRadius","SM","sm","MD","xxl","XL","xxxl","XXL","xxxxl","lg","div"],"mappings":"yDAEA,IAAYA,EAMAC,EAQAC,GAdZ,SAAYF,GACXA,EAA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BACjC,EAAG5B,WAAYA,EAAMyB,KAAKI,WAAWH,KAAKK;sBACxC,EAAG/B,WAAYA,EAAMgC,aAAaR;MAErD,KAAK/B,EAAW8C,IACf,OAAOxC,CAAG;YACF,EAAGC,WAAYA,EAAMqB,QAAQa;mBACtB,EAAGlC,WAAYA,EAAMqB,QAAQmB;gBAChC,EAAGxC,WAAYA,EAAMqB,QAAQU,MAAM,EAAG/B,WAAYA,EAAMqB,QAAQE;kBAC9D,EAAGvB,WAAYA,EAAMyB,KAAKN,KAAKO,KAAKe;oBAClC,EAAGzC,WAAYA,EAAMyB,KAAKE,OAAOC;oBACjC,EAAG5B,WAAYA,EAAMyB,KAAKI,WAAWH,KAAKe;sBACxC,EAAGzC,WAAYA,EAAMgC,aAAaE;MAErD,QACC,OAAOnC,CAAG;sBACQ,EAAGC,WAAYA,EAAMgC,aAAaV;MAErD;EAI8B3B,EAAO+C,GAAmB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props } from './button.types';
|
|
3
|
+
export declare const ButtonStyled: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Partial<Props>>>;
|
|
4
|
+
export declare const IconWrapperStyled: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Partial<Props>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare enum ButtonStyle {
|
|
3
|
+
PRIMARY = "primary",
|
|
4
|
+
SECONDARY = "secondary",
|
|
5
|
+
TERTIARY = "tertiary"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ButtonSize {
|
|
8
|
+
MD = "md",
|
|
9
|
+
SM = "sm",
|
|
10
|
+
XL = "xl",
|
|
11
|
+
XS = "xs",
|
|
12
|
+
XXL = "xxl"
|
|
13
|
+
}
|
|
14
|
+
export declare enum ButtonType {
|
|
15
|
+
BUTTON = "button",
|
|
16
|
+
RESET = "reset",
|
|
17
|
+
SUBMIT = "submit"
|
|
18
|
+
}
|
|
19
|
+
export interface Props {
|
|
20
|
+
buttonStyle: ButtonStyle;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
displayOnlyIcon?: boolean;
|
|
24
|
+
iconLeft?: ReactNode;
|
|
25
|
+
iconRight?: ReactNode;
|
|
26
|
+
onClick?: () => void;
|
|
27
|
+
size: ButtonSize;
|
|
28
|
+
type?: ButtonType;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hint: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const sliderWrapper: import("styled-components").RuleSet<object>;
|
|
2
|
+
export declare const wrapper: import("styled-components").RuleSet<object>;
|
|
3
|
+
export declare const labelsWrapper: import("styled-components").RuleSet<object>;
|
|
4
|
+
export declare const hintLeft: import("styled-components").RuleSet<object>;
|
|
5
|
+
export declare const hintRight: import("styled-components").RuleSet<object>;
|