@teamturing/react-kit 1.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/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/core/Chip/index.d.ts +25 -0
- package/dist/core/GradientText/index.d.ts +287 -0
- package/dist/core/Grid/index.d.ts +25 -0
- package/dist/core/IconButton/index.d.ts +53 -0
- package/dist/core/IconToggleButton/index.d.ts +28 -0
- package/dist/core/ItemList/index.d.ts +10 -0
- package/dist/core/Space/index.d.ts +8 -0
- package/dist/core/Spinner/index.d.ts +487 -0
- package/dist/core/Stack/index.d.ts +19 -0
- package/dist/core/StyledIcon/index.d.ts +10 -0
- package/dist/core/Text/index.d.ts +10 -0
- package/dist/core/View/index.d.ts +8 -0
- package/dist/core/_UnstyledButton.d.ts +6 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +4010 -0
- package/dist/utils/forcePixelValue.d.ts +6 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/isArray.d.ts +1 -0
- package/dist/utils/isNullable.d.ts +1 -0
- package/dist/utils/styled-system/index.d.ts +31 -0
- package/esm/_virtual/_commonjsHelpers.js +5 -0
- package/esm/_virtual/_rollupPluginBabelHelpers.js +16 -0
- package/esm/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +12 -0
- package/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +9 -0
- package/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +51 -0
- package/esm/node_modules/@styled-system/background/dist/index.esm.js +16 -0
- package/esm/node_modules/@styled-system/border/dist/index.esm.js +131 -0
- package/esm/node_modules/@styled-system/color/dist/index.esm.js +17 -0
- package/esm/node_modules/@styled-system/core/dist/index.esm.js +178 -0
- package/esm/node_modules/@styled-system/css/dist/index.esm.js +209 -0
- package/esm/node_modules/@styled-system/flexbox/dist/index.esm.js +21 -0
- package/esm/node_modules/@styled-system/grid/dist/index.esm.js +34 -0
- package/esm/node_modules/@styled-system/layout/dist/index.esm.js +47 -0
- package/esm/node_modules/@styled-system/position/dist/index.esm.js +35 -0
- package/esm/node_modules/@styled-system/shadow/dist/index.esm.js +14 -0
- package/esm/node_modules/@styled-system/space/dist/index.esm.js +121 -0
- package/esm/node_modules/@styled-system/typography/dist/index.esm.js +33 -0
- package/esm/node_modules/@styled-system/variant/dist/index.esm.js +40 -0
- package/esm/node_modules/object-assign/index.js +83 -0
- package/esm/node_modules/styled-components/dist/styled-components.esm.js +657 -0
- package/esm/node_modules/styled-system/dist/index.esm.js +77 -0
- package/esm/node_modules/stylis/src/Enum.js +11 -0
- package/esm/node_modules/stylis/src/Middleware.js +85 -0
- package/esm/node_modules/stylis/src/Parser.js +187 -0
- package/esm/node_modules/stylis/src/Prefixer.js +197 -0
- package/esm/node_modules/stylis/src/Serializer.js +39 -0
- package/esm/node_modules/stylis/src/Tokenizer.js +242 -0
- package/esm/node_modules/stylis/src/Utility.js +128 -0
- package/esm/node_modules/tslib/tslib.es6.js +44 -0
- package/esm/packages/icons/src/ProgressGradient.js +41 -0
- package/esm/packages/react-kit/src/core/Chip/index.js +179 -0
- package/esm/packages/react-kit/src/core/GradientText/index.js +13 -0
- package/esm/packages/react-kit/src/core/Grid/index.js +106 -0
- package/esm/packages/react-kit/src/core/IconButton/index.js +212 -0
- package/esm/packages/react-kit/src/core/IconToggleButton/index.js +105 -0
- package/esm/packages/react-kit/src/core/ItemList/index.js +11 -0
- package/esm/packages/react-kit/src/core/Space/index.js +12 -0
- package/esm/packages/react-kit/src/core/Spinner/index.js +23 -0
- package/esm/packages/react-kit/src/core/Stack/index.js +57 -0
- package/esm/packages/react-kit/src/core/StyledIcon/index.js +20 -0
- package/esm/packages/react-kit/src/core/Text/index.js +49 -0
- package/esm/packages/react-kit/src/core/View/index.js +18 -0
- package/esm/packages/react-kit/src/core/_UnstyledButton.js +14 -0
- package/esm/packages/react-kit/src/index.js +12 -0
- package/esm/packages/react-kit/src/utils/forcePixelValue.js +8 -0
- package/esm/packages/react-kit/src/utils/isArray.js +3 -0
- package/esm/packages/react-kit/src/utils/isNullable.js +3 -0
- package/esm/packages/react-kit/src/utils/styled-system/index.js +27 -0
- package/esm/packages/token-studio/src/foundation/palette/index.js +90 -0
- package/esm/packages/token-studio/src/foundation/rounding/index.js +13 -0
- package/esm/packages/token-studio/src/foundation/spacing/index.js +56 -0
- package/esm/packages/token-studio/src/foundation/typography/fontSize/index.js +18 -0
- package/esm/packages/token-studio/src/foundation/typography/fontWeight/index.js +13 -0
- package/esm/packages/token-studio/src/foundation/typography/lineHeight/index.js +6 -0
- package/esm/packages/token-studio/src/token/color/index.js +140 -0
- package/esm/packages/token-studio/src/token/radii/index.js +15 -0
- package/esm/packages/token-studio/src/token/space/index.js +55 -0
- package/esm/packages/token-studio/src/token/typography/fontSizes.js +17 -0
- package/esm/packages/token-studio/src/token/typography/fontWeights.js +9 -0
- package/esm/packages/token-studio/src/token/typography/index.js +133 -0
- package/esm/packages/token-studio/src/token/typography/lineHeights.js +8 -0
- package/package.json +59 -0
- package/src/index.ts +12 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,4010 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React$1 = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
var n = Object.create(null);
|
|
7
|
+
if (e) {
|
|
8
|
+
Object.keys(e).forEach(function (k) {
|
|
9
|
+
if (k !== 'default') {
|
|
10
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return e[k]; }
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React$1);
|
|
23
|
+
|
|
24
|
+
const gray = {
|
|
25
|
+
gray50: '#F9FAFB',
|
|
26
|
+
gray100: '#F3F4F6',
|
|
27
|
+
gray200: '#E5E7EB',
|
|
28
|
+
gray300: '#D1D5DB',
|
|
29
|
+
gray400: '#8D94A0',
|
|
30
|
+
gray500: '#7A828D',
|
|
31
|
+
gray600: '#6F7680',
|
|
32
|
+
gray700: '#575C64',
|
|
33
|
+
gray800: '#43484E',
|
|
34
|
+
gray900: '#33373B'
|
|
35
|
+
};
|
|
36
|
+
const violet = {
|
|
37
|
+
violet50: '#F3EFFD',
|
|
38
|
+
violet100: '#E8E1FB',
|
|
39
|
+
violet200: '#D9CDF9',
|
|
40
|
+
violet300: '#C6B5F6',
|
|
41
|
+
violet400: '#9C7EEF',
|
|
42
|
+
violet500: '#835EEB',
|
|
43
|
+
violet600: '#7756D6',
|
|
44
|
+
violet700: '#5D43A7',
|
|
45
|
+
violet800: '#483481',
|
|
46
|
+
violet900: '#372763'
|
|
47
|
+
};
|
|
48
|
+
const green = {
|
|
49
|
+
green50: '#E9FAF6',
|
|
50
|
+
green100: '#BAEFE2',
|
|
51
|
+
green200: '#98E8D4',
|
|
52
|
+
green300: '#69DDC0',
|
|
53
|
+
green400: '#4CD6B4',
|
|
54
|
+
green500: '#1FCCA1',
|
|
55
|
+
green600: '#1CBA93',
|
|
56
|
+
green700: '#169172',
|
|
57
|
+
green800: '#117059',
|
|
58
|
+
green900: '#0D5644'
|
|
59
|
+
};
|
|
60
|
+
const yellow = {
|
|
61
|
+
yellow50: '#FFF9E6',
|
|
62
|
+
yellow100: '#FFECB2',
|
|
63
|
+
yellow200: '#FFE28D',
|
|
64
|
+
yellow300: '#FFD559',
|
|
65
|
+
yellow400: '#FFCD39',
|
|
66
|
+
yellow500: '#FFC107',
|
|
67
|
+
yellow600: '#E8B006',
|
|
68
|
+
yellow700: '#B58905',
|
|
69
|
+
yellow800: '#8C6A04',
|
|
70
|
+
yellow900: '#6B5103'
|
|
71
|
+
};
|
|
72
|
+
const red = {
|
|
73
|
+
red50: '#FEE9EB',
|
|
74
|
+
red100: '#FBBCC0',
|
|
75
|
+
red200: '#F99CA2',
|
|
76
|
+
red300: '#F66E78',
|
|
77
|
+
red400: '#F5525D',
|
|
78
|
+
red500: '#F22735',
|
|
79
|
+
red600: '#DC2330',
|
|
80
|
+
red700: '#AC1C26',
|
|
81
|
+
red800: '#85151D',
|
|
82
|
+
red900: '#661016'
|
|
83
|
+
};
|
|
84
|
+
const blue = {
|
|
85
|
+
blue50: '#edf2fd',
|
|
86
|
+
blue100: '#c6d8fa',
|
|
87
|
+
blue200: '#abc5f7',
|
|
88
|
+
blue300: '#84aaf4',
|
|
89
|
+
blue400: '#6d99f1',
|
|
90
|
+
blue500: '#4880ee',
|
|
91
|
+
blue600: '#4274d9',
|
|
92
|
+
blue700: '#335ba9',
|
|
93
|
+
blue800: '#284683',
|
|
94
|
+
blue900: '#1e3664'
|
|
95
|
+
};
|
|
96
|
+
const shade = {
|
|
97
|
+
transparent: '#FFFFFF00',
|
|
98
|
+
white: '#FFFFFF',
|
|
99
|
+
white10A: '#FFFFFF1A',
|
|
100
|
+
black: '#000000',
|
|
101
|
+
black60A: '#00000099'
|
|
102
|
+
};
|
|
103
|
+
const palette = {
|
|
104
|
+
...gray,
|
|
105
|
+
...violet,
|
|
106
|
+
...green,
|
|
107
|
+
...yellow,
|
|
108
|
+
...red,
|
|
109
|
+
...blue,
|
|
110
|
+
...shade
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const textColor = {
|
|
114
|
+
'text/primary': palette.violet500,
|
|
115
|
+
'text/accent/blue': palette.blue500,
|
|
116
|
+
'text/accent/green': palette.green500,
|
|
117
|
+
'text/accent/yellow': palette.yellow500,
|
|
118
|
+
'text/accent/red': palette.red500,
|
|
119
|
+
'text/neutral/subtlest': palette.gray400,
|
|
120
|
+
'text/neutral/subtler': palette.gray500,
|
|
121
|
+
'text/neutral/subtle': palette.gray700,
|
|
122
|
+
'text/neutral': palette.gray900,
|
|
123
|
+
'text/inverse': palette.white,
|
|
124
|
+
'text/inverse/subtle': palette.gray200,
|
|
125
|
+
'text/inverse/subtler': palette.gray300,
|
|
126
|
+
'text/disabled': palette.gray400,
|
|
127
|
+
'text/success': palette.green500,
|
|
128
|
+
'text/warning': palette.yellow500,
|
|
129
|
+
'text/danger': palette.red500,
|
|
130
|
+
'text/selected/neutral': palette.gray900
|
|
131
|
+
};
|
|
132
|
+
const bgColor = {
|
|
133
|
+
'bg/secondary': palette.violet50,
|
|
134
|
+
'bg/secondary/hovered': palette.violet200,
|
|
135
|
+
'bg/secondary/pressed': palette.violet200,
|
|
136
|
+
'bg/primary': palette.violet500,
|
|
137
|
+
'bg/primary/hovered': palette.violet700,
|
|
138
|
+
'bg/primary/pressed': palette.violet700,
|
|
139
|
+
'bg/neutral/subtler': palette.transparent,
|
|
140
|
+
'bg/neutral/subtler/hovered': palette.gray100,
|
|
141
|
+
'bg/neutral/subtler/pressed': palette.gray100,
|
|
142
|
+
'bg/neutral/subtle': palette.gray50,
|
|
143
|
+
'bg/neutral/subtle/hovered': palette.gray200,
|
|
144
|
+
'bg/neutral/subtle/pressed': palette.gray200,
|
|
145
|
+
'bg/neutral': palette.gray100,
|
|
146
|
+
'bg/neutral/hovered': palette.gray300,
|
|
147
|
+
'bg/neutral/pressed': palette.gray300,
|
|
148
|
+
'bg/neutral/bold': palette.gray700,
|
|
149
|
+
'bg/neutral/bold/hovered': palette.gray900,
|
|
150
|
+
'bg/neutral/bold/pressed': palette.gray900,
|
|
151
|
+
'bg/neutral/bolder': palette.gray900,
|
|
152
|
+
'bg/neutral/bolder/hovered': palette.black,
|
|
153
|
+
'bg/neutral/bolder/pressed': palette.black,
|
|
154
|
+
'bg/disabled': palette.gray100,
|
|
155
|
+
'bg/disabled/subtlest': palette.transparent,
|
|
156
|
+
'bg/input': palette.white,
|
|
157
|
+
'bg/accent/green/subtlest': palette.green50,
|
|
158
|
+
'bg/accent/yellow/subtlest': palette.yellow50,
|
|
159
|
+
'bg/accent/red/subtlest': palette.red50,
|
|
160
|
+
'bg/accent/red/subtle': palette.red400,
|
|
161
|
+
'bg/accent/red': palette.red500,
|
|
162
|
+
'bg/accent/gray/subtlest': palette.gray200,
|
|
163
|
+
'bg/accent/blue/subtlest': palette.blue50,
|
|
164
|
+
'bg/selected/violet': palette.violet500,
|
|
165
|
+
'bg/selected/neutral': palette.gray900,
|
|
166
|
+
'bg/selected/neutral/subtle': palette.gray100,
|
|
167
|
+
'bg/inverse': palette.black,
|
|
168
|
+
'bg/inverse/subtlest': palette.white10A,
|
|
169
|
+
'bg/success': palette.green50,
|
|
170
|
+
'bg/success/bold': palette.green500,
|
|
171
|
+
'bg/warning': palette.yellow50,
|
|
172
|
+
'bg/warning/bold': palette.yellow500,
|
|
173
|
+
'bg/danger': palette.red50,
|
|
174
|
+
'bg/danger/bold': palette.red400,
|
|
175
|
+
'bg/danger/bold/hovered': palette.red600,
|
|
176
|
+
'bg/danger/bold/pressed': palette.red600
|
|
177
|
+
};
|
|
178
|
+
const borderColor = {
|
|
179
|
+
'border/neutral/subtle': palette.gray100,
|
|
180
|
+
'border/neutral': palette.gray200,
|
|
181
|
+
'border/neutral/bolder': palette.gray300,
|
|
182
|
+
'border/input': palette.gray200,
|
|
183
|
+
'border/inverse': palette.white10A,
|
|
184
|
+
'border/disabled': palette.gray100,
|
|
185
|
+
'border/primary': palette.violet500,
|
|
186
|
+
'border/hovered': palette.blue300,
|
|
187
|
+
'border/focused': palette.blue500,
|
|
188
|
+
'border/danger': palette.red500,
|
|
189
|
+
'border/success': palette.green500
|
|
190
|
+
};
|
|
191
|
+
const iconColor = {
|
|
192
|
+
'icon/neutral': palette.gray300,
|
|
193
|
+
'icon/neutral/bold': palette.gray400,
|
|
194
|
+
'icon/neutral/bolder': palette.gray700,
|
|
195
|
+
'icon/accent/gray': palette.gray900,
|
|
196
|
+
'icon/accent/blue': palette.blue500,
|
|
197
|
+
'icon/accent/blue/bold': palette.blue700,
|
|
198
|
+
'icon/accent/green': palette.green500,
|
|
199
|
+
'icon/accent/yellow': palette.yellow500,
|
|
200
|
+
'icon/accent/red': palette.red500,
|
|
201
|
+
'icon/inverse': palette.white,
|
|
202
|
+
'icon/disabled': palette.gray300,
|
|
203
|
+
'icon/disabled/subtler': palette.gray200,
|
|
204
|
+
'icon/selected/primary': palette.violet500,
|
|
205
|
+
'icon/selected/neutral': palette.gray900,
|
|
206
|
+
'icon/primary': palette.violet500,
|
|
207
|
+
'icon/primary/subtle': palette.violet300,
|
|
208
|
+
'icon/primary/bold': palette.violet700,
|
|
209
|
+
'icon/success': palette.green500,
|
|
210
|
+
'icon/warning': palette.yellow500,
|
|
211
|
+
'icon/danger': palette.red500
|
|
212
|
+
};
|
|
213
|
+
const linkColor = {
|
|
214
|
+
'link': palette.blue500,
|
|
215
|
+
'link/hovered': palette.blue700,
|
|
216
|
+
'link/pressed': palette.blue700,
|
|
217
|
+
'link/neutral': palette.gray500,
|
|
218
|
+
'link/neutral/hovered': palette.gray700,
|
|
219
|
+
'link/neutral/pressed': palette.gray700,
|
|
220
|
+
'link/neutral/bold': palette.gray700,
|
|
221
|
+
'link/neutral/bold/hovered': palette.gray900,
|
|
222
|
+
'link/neutral/bold/pressed': palette.gray900,
|
|
223
|
+
'link/disabled': palette.gray700
|
|
224
|
+
};
|
|
225
|
+
const dimColor = {
|
|
226
|
+
dim: palette.black60A
|
|
227
|
+
};
|
|
228
|
+
const scaleColor = {
|
|
229
|
+
'scale/violet/0': palette.violet50,
|
|
230
|
+
'scale/violet/1': palette.violet100,
|
|
231
|
+
'scale/violet/2': palette.violet200,
|
|
232
|
+
'scale/violet/3': palette.violet300,
|
|
233
|
+
'scale/violet/4': palette.violet400,
|
|
234
|
+
'scale/violet/5': palette.violet500,
|
|
235
|
+
'scale/violet/6': palette.violet600,
|
|
236
|
+
'scale/violet/7': palette.violet700,
|
|
237
|
+
'scale/violet/8': palette.violet800,
|
|
238
|
+
'scale/violet/9': palette.violet900
|
|
239
|
+
};
|
|
240
|
+
const color$1 = {
|
|
241
|
+
...textColor,
|
|
242
|
+
...bgColor,
|
|
243
|
+
...borderColor,
|
|
244
|
+
...iconColor,
|
|
245
|
+
...linkColor,
|
|
246
|
+
...dimColor,
|
|
247
|
+
...scaleColor
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
const rounding = {
|
|
251
|
+
rounding0: 0,
|
|
252
|
+
rounding4: 4,
|
|
253
|
+
rounding8: 8,
|
|
254
|
+
rounding12: 12,
|
|
255
|
+
rounding16: 16,
|
|
256
|
+
rounding20: 20,
|
|
257
|
+
rounding24: 24,
|
|
258
|
+
rounding32: 32,
|
|
259
|
+
rounding9999: 9999
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
const radii = {
|
|
263
|
+
none: rounding.rounding0,
|
|
264
|
+
xxs: rounding.rounding4,
|
|
265
|
+
xs: rounding.rounding8,
|
|
266
|
+
s: rounding.rounding12,
|
|
267
|
+
m: rounding.rounding16,
|
|
268
|
+
l: rounding.rounding20,
|
|
269
|
+
xl: rounding.rounding24,
|
|
270
|
+
xxl: rounding.rounding32,
|
|
271
|
+
full: rounding.rounding9999
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
const unit = 4;
|
|
275
|
+
const spacing = {
|
|
276
|
+
spacing0: 0 * unit,
|
|
277
|
+
// 0
|
|
278
|
+
spacing1: 1,
|
|
279
|
+
// 1
|
|
280
|
+
spacing2: 0.5 * unit,
|
|
281
|
+
// 2
|
|
282
|
+
spacing4: 1 * unit,
|
|
283
|
+
// 4
|
|
284
|
+
spacing6: 1.5 * unit,
|
|
285
|
+
// 6
|
|
286
|
+
spacing8: 2 * unit,
|
|
287
|
+
// 8
|
|
288
|
+
spacing12: 3 * unit,
|
|
289
|
+
// 12
|
|
290
|
+
spacing16: 4 * unit,
|
|
291
|
+
// 16
|
|
292
|
+
spacing20: 5 * unit,
|
|
293
|
+
// 20
|
|
294
|
+
spacing24: 6 * unit,
|
|
295
|
+
// 24
|
|
296
|
+
spacing28: 7 * unit,
|
|
297
|
+
// 28
|
|
298
|
+
spacing32: 8 * unit,
|
|
299
|
+
// 32
|
|
300
|
+
spacing40: 10 * unit,
|
|
301
|
+
// 40
|
|
302
|
+
spacing48: 12 * unit,
|
|
303
|
+
// 48
|
|
304
|
+
spacing56: 14 * unit,
|
|
305
|
+
// 56
|
|
306
|
+
spacing64: 16 * unit,
|
|
307
|
+
// 64
|
|
308
|
+
spacing72: 18 * unit,
|
|
309
|
+
// 72
|
|
310
|
+
spacing80: 20 * unit,
|
|
311
|
+
// 80
|
|
312
|
+
spacing96: 24 * unit,
|
|
313
|
+
// 96
|
|
314
|
+
spacing112: 28 * unit,
|
|
315
|
+
// 112
|
|
316
|
+
spacing120: 30 * unit,
|
|
317
|
+
// 120
|
|
318
|
+
spacing128: 32 * unit,
|
|
319
|
+
// 128
|
|
320
|
+
spacing160: 40 * unit,
|
|
321
|
+
// 160
|
|
322
|
+
spacing192: 48 * unit,
|
|
323
|
+
// 192
|
|
324
|
+
spacing200: 50 * unit,
|
|
325
|
+
// 200
|
|
326
|
+
spacing320: 80 * unit // 320
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
const space$1 = {
|
|
330
|
+
'-80': -spacing.spacing320,
|
|
331
|
+
'-50': -spacing.spacing200,
|
|
332
|
+
'-48': -spacing.spacing192,
|
|
333
|
+
'-40': -spacing.spacing160,
|
|
334
|
+
'-32': -spacing.spacing128,
|
|
335
|
+
'-30': -spacing.spacing120,
|
|
336
|
+
'-28': -spacing.spacing112,
|
|
337
|
+
'-24': -spacing.spacing96,
|
|
338
|
+
'-20': -spacing.spacing80,
|
|
339
|
+
'-18': -spacing.spacing72,
|
|
340
|
+
'-16': -spacing.spacing64,
|
|
341
|
+
'-14': -spacing.spacing56,
|
|
342
|
+
'-12': -spacing.spacing48,
|
|
343
|
+
'-10': -spacing.spacing40,
|
|
344
|
+
'-8': -spacing.spacing32,
|
|
345
|
+
'-7': -spacing.spacing28,
|
|
346
|
+
'-6': -spacing.spacing24,
|
|
347
|
+
'-5': -spacing.spacing20,
|
|
348
|
+
'-4': -spacing.spacing16,
|
|
349
|
+
'-3': -spacing.spacing12,
|
|
350
|
+
'-2': -spacing.spacing8,
|
|
351
|
+
'-1': -spacing.spacing4,
|
|
352
|
+
'-0.5': -spacing.spacing2,
|
|
353
|
+
'-0.25': -spacing.spacing1,
|
|
354
|
+
0: spacing.spacing0,
|
|
355
|
+
0.25: spacing.spacing1,
|
|
356
|
+
0.5: spacing.spacing2,
|
|
357
|
+
1: spacing.spacing4,
|
|
358
|
+
2: spacing.spacing8,
|
|
359
|
+
3: spacing.spacing12,
|
|
360
|
+
4: spacing.spacing16,
|
|
361
|
+
5: spacing.spacing20,
|
|
362
|
+
6: spacing.spacing24,
|
|
363
|
+
7: spacing.spacing28,
|
|
364
|
+
8: spacing.spacing32,
|
|
365
|
+
10: spacing.spacing40,
|
|
366
|
+
12: spacing.spacing48,
|
|
367
|
+
14: spacing.spacing56,
|
|
368
|
+
16: spacing.spacing64,
|
|
369
|
+
18: spacing.spacing72,
|
|
370
|
+
20: spacing.spacing80,
|
|
371
|
+
24: spacing.spacing96,
|
|
372
|
+
28: spacing.spacing112,
|
|
373
|
+
30: spacing.spacing120,
|
|
374
|
+
32: spacing.spacing128,
|
|
375
|
+
40: spacing.spacing160,
|
|
376
|
+
48: spacing.spacing192,
|
|
377
|
+
50: spacing.spacing200,
|
|
378
|
+
80: spacing.spacing320
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
const fontSize$1 = {
|
|
382
|
+
fontSize50: 10,
|
|
383
|
+
fontSize100: 12,
|
|
384
|
+
fontSize200: 14,
|
|
385
|
+
fontSize300: 16,
|
|
386
|
+
fontSize400: 18,
|
|
387
|
+
fontSize500: 20,
|
|
388
|
+
fontSize600: 22,
|
|
389
|
+
fontSize700: 24,
|
|
390
|
+
fontSize800: 28,
|
|
391
|
+
fontSize900: 32,
|
|
392
|
+
fontSize1000: 40,
|
|
393
|
+
fontSize1100: 48,
|
|
394
|
+
fontSize1200: 64,
|
|
395
|
+
fontSize1300: 100
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
const fontWeight$1 = {
|
|
399
|
+
fontWeight100: 100,
|
|
400
|
+
fontWeight200: 200,
|
|
401
|
+
fontWeight300: 300,
|
|
402
|
+
fontWeight400: 400,
|
|
403
|
+
fontWeight500: 500,
|
|
404
|
+
fontWeight600: 600,
|
|
405
|
+
fontWeight700: 700,
|
|
406
|
+
fontWeight800: 800,
|
|
407
|
+
fontWeight900: 900
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
const lineHeight$1 = {
|
|
411
|
+
lineHeight1: 1.4,
|
|
412
|
+
lineHeight2: 1.5
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
const fontSizes = {
|
|
416
|
+
xxs: fontSize$1.fontSize100,
|
|
417
|
+
xs: fontSize$1.fontSize200,
|
|
418
|
+
s: fontSize$1.fontSize300,
|
|
419
|
+
m: fontSize$1.fontSize500,
|
|
420
|
+
l: fontSize$1.fontSize700,
|
|
421
|
+
xl: fontSize$1.fontSize800,
|
|
422
|
+
xxl: fontSize$1.fontSize900,
|
|
423
|
+
display4: fontSize$1.fontSize1000,
|
|
424
|
+
display3: fontSize$1.fontSize1100,
|
|
425
|
+
display2: fontSize$1.fontSize1200,
|
|
426
|
+
display1: fontSize$1.fontSize1300
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
const fontWeights = {
|
|
430
|
+
regular: fontWeight$1.fontWeight400,
|
|
431
|
+
medium: fontWeight$1.fontWeight500,
|
|
432
|
+
bold: fontWeight$1.fontWeight700
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
const lineHeights = {
|
|
436
|
+
1: lineHeight$1.lineHeight1,
|
|
437
|
+
2: lineHeight$1.lineHeight2
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
const typography$1 = {
|
|
441
|
+
'display1': {
|
|
442
|
+
fontSize: fontSizes.display1,
|
|
443
|
+
fontWeight: fontWeights.bold,
|
|
444
|
+
lineHeight: lineHeights[1]
|
|
445
|
+
},
|
|
446
|
+
'display2': {
|
|
447
|
+
fontSize: fontSizes.display2,
|
|
448
|
+
fontWeight: fontWeights.bold,
|
|
449
|
+
lineHeight: lineHeights[1]
|
|
450
|
+
},
|
|
451
|
+
'display3': {
|
|
452
|
+
fontSize: fontSizes.display3,
|
|
453
|
+
fontWeight: fontWeights.bold,
|
|
454
|
+
lineHeight: lineHeights[1]
|
|
455
|
+
},
|
|
456
|
+
'display4': {
|
|
457
|
+
fontSize: fontSizes.display4,
|
|
458
|
+
fontWeight: fontWeights.bold,
|
|
459
|
+
lineHeight: lineHeights[2]
|
|
460
|
+
},
|
|
461
|
+
'xxl/regular': {
|
|
462
|
+
fontSize: fontSizes.xxl,
|
|
463
|
+
fontWeight: fontWeights.regular,
|
|
464
|
+
lineHeight: lineHeights[2]
|
|
465
|
+
},
|
|
466
|
+
'xxl': {
|
|
467
|
+
fontSize: fontSizes.xxl,
|
|
468
|
+
fontWeight: fontWeights.medium,
|
|
469
|
+
lineHeight: lineHeights[2]
|
|
470
|
+
},
|
|
471
|
+
'xxl/bold': {
|
|
472
|
+
fontSize: fontSizes.xxl,
|
|
473
|
+
fontWeight: fontWeights.bold,
|
|
474
|
+
lineHeight: lineHeights[2]
|
|
475
|
+
},
|
|
476
|
+
'xl/regular': {
|
|
477
|
+
fontSize: fontSizes.xl,
|
|
478
|
+
fontWeight: fontWeights.regular,
|
|
479
|
+
lineHeight: lineHeights[2]
|
|
480
|
+
},
|
|
481
|
+
'xl': {
|
|
482
|
+
fontSize: fontSizes.xl,
|
|
483
|
+
fontWeight: fontWeights.medium,
|
|
484
|
+
lineHeight: lineHeights[2]
|
|
485
|
+
},
|
|
486
|
+
'xl/bold': {
|
|
487
|
+
fontSize: fontSizes.xl,
|
|
488
|
+
fontWeight: fontWeights.bold,
|
|
489
|
+
lineHeight: lineHeights[2]
|
|
490
|
+
},
|
|
491
|
+
'l/regular': {
|
|
492
|
+
fontSize: fontSizes.l,
|
|
493
|
+
fontWeight: fontWeights.regular,
|
|
494
|
+
lineHeight: lineHeights[2]
|
|
495
|
+
},
|
|
496
|
+
'l': {
|
|
497
|
+
fontSize: fontSizes.l,
|
|
498
|
+
fontWeight: fontWeights.medium,
|
|
499
|
+
lineHeight: lineHeights[2]
|
|
500
|
+
},
|
|
501
|
+
'l/bold': {
|
|
502
|
+
fontSize: fontSizes.l,
|
|
503
|
+
fontWeight: fontWeights.bold,
|
|
504
|
+
lineHeight: lineHeights[2]
|
|
505
|
+
},
|
|
506
|
+
'm/regular': {
|
|
507
|
+
fontSize: fontSizes.m,
|
|
508
|
+
fontWeight: fontWeights.regular,
|
|
509
|
+
lineHeight: lineHeights[2]
|
|
510
|
+
},
|
|
511
|
+
'm': {
|
|
512
|
+
fontSize: fontSizes.m,
|
|
513
|
+
fontWeight: fontWeights.medium,
|
|
514
|
+
lineHeight: lineHeights[2]
|
|
515
|
+
},
|
|
516
|
+
'm/bold': {
|
|
517
|
+
fontSize: fontSizes.m,
|
|
518
|
+
fontWeight: fontWeights.bold,
|
|
519
|
+
lineHeight: lineHeights[2]
|
|
520
|
+
},
|
|
521
|
+
's/regular': {
|
|
522
|
+
fontSize: fontSizes.s,
|
|
523
|
+
fontWeight: fontWeights.regular,
|
|
524
|
+
lineHeight: lineHeights[2]
|
|
525
|
+
},
|
|
526
|
+
's': {
|
|
527
|
+
fontSize: fontSizes.s,
|
|
528
|
+
fontWeight: fontWeights.medium,
|
|
529
|
+
lineHeight: lineHeights[2]
|
|
530
|
+
},
|
|
531
|
+
's/bold': {
|
|
532
|
+
fontSize: fontSizes.s,
|
|
533
|
+
fontWeight: fontWeights.bold,
|
|
534
|
+
lineHeight: lineHeights[2]
|
|
535
|
+
},
|
|
536
|
+
'xs/regular': {
|
|
537
|
+
fontSize: fontSizes.xs,
|
|
538
|
+
fontWeight: fontWeights.regular,
|
|
539
|
+
lineHeight: lineHeights[2]
|
|
540
|
+
},
|
|
541
|
+
'xs': {
|
|
542
|
+
fontSize: fontSizes.xs,
|
|
543
|
+
fontWeight: fontWeights.medium,
|
|
544
|
+
lineHeight: lineHeights[2]
|
|
545
|
+
},
|
|
546
|
+
'xs/bold': {
|
|
547
|
+
fontSize: fontSizes.xs,
|
|
548
|
+
fontWeight: fontWeights.bold,
|
|
549
|
+
lineHeight: lineHeights[2]
|
|
550
|
+
},
|
|
551
|
+
'xxs/regular': {
|
|
552
|
+
fontSize: fontSizes.xxs,
|
|
553
|
+
fontWeight: fontWeights.regular,
|
|
554
|
+
lineHeight: lineHeights[2]
|
|
555
|
+
},
|
|
556
|
+
'xxs': {
|
|
557
|
+
fontSize: fontSizes.xxs,
|
|
558
|
+
fontWeight: fontWeights.medium,
|
|
559
|
+
lineHeight: lineHeights[2]
|
|
560
|
+
},
|
|
561
|
+
'xxs/bold': {
|
|
562
|
+
fontSize: fontSizes.xxs,
|
|
563
|
+
fontWeight: fontWeights.bold,
|
|
564
|
+
lineHeight: lineHeights[2]
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
/******************************************************************************
|
|
569
|
+
Copyright (c) Microsoft Corporation.
|
|
570
|
+
|
|
571
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
572
|
+
purpose with or without fee is hereby granted.
|
|
573
|
+
|
|
574
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
575
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
576
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
577
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
578
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
579
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
580
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
581
|
+
***************************************************************************** */
|
|
582
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
var __assign = function() {
|
|
586
|
+
__assign = Object.assign || function __assign(t) {
|
|
587
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
588
|
+
s = arguments[i];
|
|
589
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
590
|
+
}
|
|
591
|
+
return t;
|
|
592
|
+
};
|
|
593
|
+
return __assign.apply(this, arguments);
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
function __spreadArray(to, from, pack) {
|
|
597
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
598
|
+
if (ar || !(i in from)) {
|
|
599
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
600
|
+
ar[i] = from[i];
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
607
|
+
var e = new Error(message);
|
|
608
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
function memoize(fn) {
|
|
612
|
+
var cache = Object.create(null);
|
|
613
|
+
return function (arg) {
|
|
614
|
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
615
|
+
return cache[arg];
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
|
620
|
+
|
|
621
|
+
var isPropValid = /* #__PURE__ */memoize(function (prop) {
|
|
622
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
|
623
|
+
/* o */ && prop.charCodeAt(1) === 110
|
|
624
|
+
/* n */ && prop.charCodeAt(2) < 91;
|
|
625
|
+
}
|
|
626
|
+
/* Z+1 */);
|
|
627
|
+
|
|
628
|
+
function getDefaultExportFromCjs (x) {
|
|
629
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
var MS = '-ms-';
|
|
633
|
+
var MOZ = '-moz-';
|
|
634
|
+
var WEBKIT = '-webkit-';
|
|
635
|
+
var COMMENT = 'comm';
|
|
636
|
+
var RULESET = 'rule';
|
|
637
|
+
var DECLARATION = 'decl';
|
|
638
|
+
var IMPORT = '@import';
|
|
639
|
+
var KEYFRAMES = '@keyframes';
|
|
640
|
+
var LAYER = '@layer';
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* @param {number}
|
|
644
|
+
* @return {number}
|
|
645
|
+
*/
|
|
646
|
+
var abs = Math.abs;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* @param {number}
|
|
650
|
+
* @return {string}
|
|
651
|
+
*/
|
|
652
|
+
var from = String.fromCharCode;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* @param {object}
|
|
656
|
+
* @return {object}
|
|
657
|
+
*/
|
|
658
|
+
var assign$1 = Object.assign;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* @param {string} value
|
|
662
|
+
* @param {number} length
|
|
663
|
+
* @return {number}
|
|
664
|
+
*/
|
|
665
|
+
function hash(value, length) {
|
|
666
|
+
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* @param {string} value
|
|
671
|
+
* @return {string}
|
|
672
|
+
*/
|
|
673
|
+
function trim(value) {
|
|
674
|
+
return value.trim();
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* @param {string} value
|
|
679
|
+
* @param {RegExp} pattern
|
|
680
|
+
* @return {string?}
|
|
681
|
+
*/
|
|
682
|
+
function match(value, pattern) {
|
|
683
|
+
return (value = pattern.exec(value)) ? value[0] : value;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* @param {string} value
|
|
688
|
+
* @param {(string|RegExp)} pattern
|
|
689
|
+
* @param {string} replacement
|
|
690
|
+
* @return {string}
|
|
691
|
+
*/
|
|
692
|
+
function replace(value, pattern, replacement) {
|
|
693
|
+
return value.replace(pattern, replacement);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* @param {string} value
|
|
698
|
+
* @param {string} search
|
|
699
|
+
* @return {number}
|
|
700
|
+
*/
|
|
701
|
+
function indexof(value, search) {
|
|
702
|
+
return value.indexOf(search);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* @param {string} value
|
|
707
|
+
* @param {number} index
|
|
708
|
+
* @return {number}
|
|
709
|
+
*/
|
|
710
|
+
function charat(value, index) {
|
|
711
|
+
return value.charCodeAt(index) | 0;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* @param {string} value
|
|
716
|
+
* @param {number} begin
|
|
717
|
+
* @param {number} end
|
|
718
|
+
* @return {string}
|
|
719
|
+
*/
|
|
720
|
+
function substr(value, begin, end) {
|
|
721
|
+
return value.slice(begin, end);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* @param {string} value
|
|
726
|
+
* @return {number}
|
|
727
|
+
*/
|
|
728
|
+
function strlen(value) {
|
|
729
|
+
return value.length;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* @param {any[]} value
|
|
734
|
+
* @return {number}
|
|
735
|
+
*/
|
|
736
|
+
function sizeof(value) {
|
|
737
|
+
return value.length;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* @param {any} value
|
|
742
|
+
* @param {any[]} array
|
|
743
|
+
* @return {any}
|
|
744
|
+
*/
|
|
745
|
+
function append(value, array) {
|
|
746
|
+
return array.push(value), value;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* @param {string[]} array
|
|
751
|
+
* @param {function} callback
|
|
752
|
+
* @return {string}
|
|
753
|
+
*/
|
|
754
|
+
function combine(array, callback) {
|
|
755
|
+
return array.map(callback).join('');
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* @param {string[]} array
|
|
760
|
+
* @param {RegExp} pattern
|
|
761
|
+
* @return {string[]}
|
|
762
|
+
*/
|
|
763
|
+
function filter(array, pattern) {
|
|
764
|
+
return array.filter(function (value) {
|
|
765
|
+
return !match(value, pattern);
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
var line = 1;
|
|
770
|
+
var column = 1;
|
|
771
|
+
var length = 0;
|
|
772
|
+
var position$1 = 0;
|
|
773
|
+
var character = 0;
|
|
774
|
+
var characters = '';
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* @param {string} value
|
|
778
|
+
* @param {object | null} root
|
|
779
|
+
* @param {object | null} parent
|
|
780
|
+
* @param {string} type
|
|
781
|
+
* @param {string[] | string} props
|
|
782
|
+
* @param {object[] | string} children
|
|
783
|
+
* @param {object[]} siblings
|
|
784
|
+
* @param {number} length
|
|
785
|
+
*/
|
|
786
|
+
function node(value, root, parent, type, props, children, length, siblings) {
|
|
787
|
+
return {
|
|
788
|
+
value: value,
|
|
789
|
+
root: root,
|
|
790
|
+
parent: parent,
|
|
791
|
+
type: type,
|
|
792
|
+
props: props,
|
|
793
|
+
children: children,
|
|
794
|
+
line: line,
|
|
795
|
+
column: column,
|
|
796
|
+
length: length,
|
|
797
|
+
return: '',
|
|
798
|
+
siblings: siblings
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* @param {object} root
|
|
804
|
+
* @param {object} props
|
|
805
|
+
* @return {object}
|
|
806
|
+
*/
|
|
807
|
+
function copy(root, props) {
|
|
808
|
+
return assign$1(node('', null, null, '', null, null, 0, root.siblings), root, {
|
|
809
|
+
length: -root.length
|
|
810
|
+
}, props);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* @param {object} root
|
|
815
|
+
*/
|
|
816
|
+
function lift(root) {
|
|
817
|
+
while (root.root) root = copy(root.root, {
|
|
818
|
+
children: [root]
|
|
819
|
+
});
|
|
820
|
+
append(root, root.siblings);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* @return {number}
|
|
825
|
+
*/
|
|
826
|
+
function char() {
|
|
827
|
+
return character;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* @return {number}
|
|
832
|
+
*/
|
|
833
|
+
function prev() {
|
|
834
|
+
character = position$1 > 0 ? charat(characters, --position$1) : 0;
|
|
835
|
+
if (column--, character === 10) column = 1, line--;
|
|
836
|
+
return character;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* @return {number}
|
|
841
|
+
*/
|
|
842
|
+
function next() {
|
|
843
|
+
character = position$1 < length ? charat(characters, position$1++) : 0;
|
|
844
|
+
if (column++, character === 10) column = 1, line++;
|
|
845
|
+
return character;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* @return {number}
|
|
850
|
+
*/
|
|
851
|
+
function peek() {
|
|
852
|
+
return charat(characters, position$1);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* @return {number}
|
|
857
|
+
*/
|
|
858
|
+
function caret() {
|
|
859
|
+
return position$1;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* @param {number} begin
|
|
864
|
+
* @param {number} end
|
|
865
|
+
* @return {string}
|
|
866
|
+
*/
|
|
867
|
+
function slice(begin, end) {
|
|
868
|
+
return substr(characters, begin, end);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* @param {number} type
|
|
873
|
+
* @return {number}
|
|
874
|
+
*/
|
|
875
|
+
function token(type) {
|
|
876
|
+
switch (type) {
|
|
877
|
+
// \0 \t \n \r \s whitespace token
|
|
878
|
+
case 0:
|
|
879
|
+
case 9:
|
|
880
|
+
case 10:
|
|
881
|
+
case 13:
|
|
882
|
+
case 32:
|
|
883
|
+
return 5;
|
|
884
|
+
// ! + , / > @ ~ isolate token
|
|
885
|
+
case 33:
|
|
886
|
+
case 43:
|
|
887
|
+
case 44:
|
|
888
|
+
case 47:
|
|
889
|
+
case 62:
|
|
890
|
+
case 64:
|
|
891
|
+
case 126:
|
|
892
|
+
// ; { } breakpoint token
|
|
893
|
+
case 59:
|
|
894
|
+
case 123:
|
|
895
|
+
case 125:
|
|
896
|
+
return 4;
|
|
897
|
+
// : accompanied token
|
|
898
|
+
case 58:
|
|
899
|
+
return 3;
|
|
900
|
+
// " ' ( [ opening delimit token
|
|
901
|
+
case 34:
|
|
902
|
+
case 39:
|
|
903
|
+
case 40:
|
|
904
|
+
case 91:
|
|
905
|
+
return 2;
|
|
906
|
+
// ) ] closing delimit token
|
|
907
|
+
case 41:
|
|
908
|
+
case 93:
|
|
909
|
+
return 1;
|
|
910
|
+
}
|
|
911
|
+
return 0;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* @param {string} value
|
|
916
|
+
* @return {any[]}
|
|
917
|
+
*/
|
|
918
|
+
function alloc(value) {
|
|
919
|
+
return line = column = 1, length = strlen(characters = value), position$1 = 0, [];
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* @param {any} value
|
|
924
|
+
* @return {any}
|
|
925
|
+
*/
|
|
926
|
+
function dealloc(value) {
|
|
927
|
+
return characters = '', value;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* @param {number} type
|
|
932
|
+
* @return {string}
|
|
933
|
+
*/
|
|
934
|
+
function delimit(type) {
|
|
935
|
+
return trim(slice(position$1 - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* @param {number} type
|
|
940
|
+
* @return {string}
|
|
941
|
+
*/
|
|
942
|
+
function whitespace(type) {
|
|
943
|
+
while (character = peek()) if (character < 33) next();else break;
|
|
944
|
+
return token(type) > 2 || token(character) > 3 ? '' : ' ';
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* @param {number} index
|
|
949
|
+
* @param {number} count
|
|
950
|
+
* @return {string}
|
|
951
|
+
*/
|
|
952
|
+
function escaping(index, count) {
|
|
953
|
+
while (--count && next())
|
|
954
|
+
// not 0-9 A-F a-f
|
|
955
|
+
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break;
|
|
956
|
+
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* @param {number} type
|
|
961
|
+
* @return {number}
|
|
962
|
+
*/
|
|
963
|
+
function delimiter(type) {
|
|
964
|
+
while (next()) switch (character) {
|
|
965
|
+
// ] ) " '
|
|
966
|
+
case type:
|
|
967
|
+
return position$1;
|
|
968
|
+
// " '
|
|
969
|
+
case 34:
|
|
970
|
+
case 39:
|
|
971
|
+
if (type !== 34 && type !== 39) delimiter(character);
|
|
972
|
+
break;
|
|
973
|
+
// (
|
|
974
|
+
case 40:
|
|
975
|
+
if (type === 41) delimiter(type);
|
|
976
|
+
break;
|
|
977
|
+
// \
|
|
978
|
+
case 92:
|
|
979
|
+
next();
|
|
980
|
+
break;
|
|
981
|
+
}
|
|
982
|
+
return position$1;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* @param {number} type
|
|
987
|
+
* @param {number} index
|
|
988
|
+
* @return {number}
|
|
989
|
+
*/
|
|
990
|
+
function commenter(type, index) {
|
|
991
|
+
while (next())
|
|
992
|
+
// //
|
|
993
|
+
if (type + character === 47 + 10) break;
|
|
994
|
+
// /*
|
|
995
|
+
else if (type + character === 42 + 42 && peek() === 47) break;
|
|
996
|
+
return '/*' + slice(index, position$1 - 1) + '*' + from(type === 47 ? type : next());
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* @param {number} index
|
|
1001
|
+
* @return {string}
|
|
1002
|
+
*/
|
|
1003
|
+
function identifier(index) {
|
|
1004
|
+
while (!token(peek())) next();
|
|
1005
|
+
return slice(index, position$1);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* @param {string} value
|
|
1010
|
+
* @return {object[]}
|
|
1011
|
+
*/
|
|
1012
|
+
function compile(value) {
|
|
1013
|
+
return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value));
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* @param {string} value
|
|
1018
|
+
* @param {object} root
|
|
1019
|
+
* @param {object?} parent
|
|
1020
|
+
* @param {string[]} rule
|
|
1021
|
+
* @param {string[]} rules
|
|
1022
|
+
* @param {string[]} rulesets
|
|
1023
|
+
* @param {number[]} pseudo
|
|
1024
|
+
* @param {number[]} points
|
|
1025
|
+
* @param {string[]} declarations
|
|
1026
|
+
* @return {object}
|
|
1027
|
+
*/
|
|
1028
|
+
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
1029
|
+
var index = 0;
|
|
1030
|
+
var offset = 0;
|
|
1031
|
+
var length = pseudo;
|
|
1032
|
+
var atrule = 0;
|
|
1033
|
+
var property = 0;
|
|
1034
|
+
var previous = 0;
|
|
1035
|
+
var variable = 1;
|
|
1036
|
+
var scanning = 1;
|
|
1037
|
+
var ampersand = 1;
|
|
1038
|
+
var character = 0;
|
|
1039
|
+
var type = '';
|
|
1040
|
+
var props = rules;
|
|
1041
|
+
var children = rulesets;
|
|
1042
|
+
var reference = rule;
|
|
1043
|
+
var characters = type;
|
|
1044
|
+
while (scanning) switch (previous = character, character = next()) {
|
|
1045
|
+
// (
|
|
1046
|
+
case 40:
|
|
1047
|
+
if (previous != 108 && charat(characters, length - 1) == 58) {
|
|
1048
|
+
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1) ampersand = -1;
|
|
1049
|
+
break;
|
|
1050
|
+
}
|
|
1051
|
+
// " ' [
|
|
1052
|
+
case 34:
|
|
1053
|
+
case 39:
|
|
1054
|
+
case 91:
|
|
1055
|
+
characters += delimit(character);
|
|
1056
|
+
break;
|
|
1057
|
+
// \t \n \r \s
|
|
1058
|
+
case 9:
|
|
1059
|
+
case 10:
|
|
1060
|
+
case 13:
|
|
1061
|
+
case 32:
|
|
1062
|
+
characters += whitespace(previous);
|
|
1063
|
+
break;
|
|
1064
|
+
// \
|
|
1065
|
+
case 92:
|
|
1066
|
+
characters += escaping(caret() - 1, 7);
|
|
1067
|
+
continue;
|
|
1068
|
+
// /
|
|
1069
|
+
case 47:
|
|
1070
|
+
switch (peek()) {
|
|
1071
|
+
case 42:
|
|
1072
|
+
case 47:
|
|
1073
|
+
append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
|
|
1074
|
+
break;
|
|
1075
|
+
default:
|
|
1076
|
+
characters += '/';
|
|
1077
|
+
}
|
|
1078
|
+
break;
|
|
1079
|
+
// {
|
|
1080
|
+
case 123 * variable:
|
|
1081
|
+
points[index++] = strlen(characters) * ampersand;
|
|
1082
|
+
// } ; \0
|
|
1083
|
+
case 125 * variable:
|
|
1084
|
+
case 59:
|
|
1085
|
+
case 0:
|
|
1086
|
+
switch (character) {
|
|
1087
|
+
// \0 }
|
|
1088
|
+
case 0:
|
|
1089
|
+
case 125:
|
|
1090
|
+
scanning = 0;
|
|
1091
|
+
// ;
|
|
1092
|
+
case 59 + offset:
|
|
1093
|
+
if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
1094
|
+
if (property > 0 && strlen(characters) - length) append(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations);
|
|
1095
|
+
break;
|
|
1096
|
+
// @ ;
|
|
1097
|
+
case 59:
|
|
1098
|
+
characters += ';';
|
|
1099
|
+
// { rule/at-rule
|
|
1100
|
+
default:
|
|
1101
|
+
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets);
|
|
1102
|
+
if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
1103
|
+
// d l m s
|
|
1104
|
+
case 100:
|
|
1105
|
+
case 108:
|
|
1106
|
+
case 109:
|
|
1107
|
+
case 115:
|
|
1108
|
+
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children);
|
|
1109
|
+
break;
|
|
1110
|
+
default:
|
|
1111
|
+
parse(characters, reference, reference, reference, [''], children, 0, points, children);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
|
|
1115
|
+
break;
|
|
1116
|
+
// :
|
|
1117
|
+
case 58:
|
|
1118
|
+
length = 1 + strlen(characters), property = previous;
|
|
1119
|
+
default:
|
|
1120
|
+
if (variable < 1) if (character == 123) --variable;else if (character == 125 && variable++ == 0 && prev() == 125) continue;
|
|
1121
|
+
switch (characters += from(character), character * variable) {
|
|
1122
|
+
// &
|
|
1123
|
+
case 38:
|
|
1124
|
+
ampersand = offset > 0 ? 1 : (characters += '\f', -1);
|
|
1125
|
+
break;
|
|
1126
|
+
// ,
|
|
1127
|
+
case 44:
|
|
1128
|
+
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
|
|
1129
|
+
break;
|
|
1130
|
+
// @
|
|
1131
|
+
case 64:
|
|
1132
|
+
// -
|
|
1133
|
+
if (peek() === 45) characters += delimit(next());
|
|
1134
|
+
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
|
|
1135
|
+
break;
|
|
1136
|
+
// -
|
|
1137
|
+
case 45:
|
|
1138
|
+
if (previous === 45 && strlen(characters) == 2) variable = 0;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
return rulesets;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* @param {string} value
|
|
1146
|
+
* @param {object} root
|
|
1147
|
+
* @param {object?} parent
|
|
1148
|
+
* @param {number} index
|
|
1149
|
+
* @param {number} offset
|
|
1150
|
+
* @param {string[]} rules
|
|
1151
|
+
* @param {number[]} points
|
|
1152
|
+
* @param {string} type
|
|
1153
|
+
* @param {string[]} props
|
|
1154
|
+
* @param {string[]} children
|
|
1155
|
+
* @param {number} length
|
|
1156
|
+
* @param {object[]} siblings
|
|
1157
|
+
* @return {object}
|
|
1158
|
+
*/
|
|
1159
|
+
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {
|
|
1160
|
+
var post = offset - 1;
|
|
1161
|
+
var rule = offset === 0 ? rules : [''];
|
|
1162
|
+
var size = sizeof(rule);
|
|
1163
|
+
for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x]))) props[k++] = z;
|
|
1164
|
+
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings);
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* @param {number} value
|
|
1169
|
+
* @param {object} root
|
|
1170
|
+
* @param {object?} parent
|
|
1171
|
+
* @param {object[]} siblings
|
|
1172
|
+
* @return {object}
|
|
1173
|
+
*/
|
|
1174
|
+
function comment(value, root, parent, siblings) {
|
|
1175
|
+
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* @param {string} value
|
|
1180
|
+
* @param {object} root
|
|
1181
|
+
* @param {object?} parent
|
|
1182
|
+
* @param {number} length
|
|
1183
|
+
* @param {object[]} siblings
|
|
1184
|
+
* @return {object}
|
|
1185
|
+
*/
|
|
1186
|
+
function declaration(value, root, parent, length, siblings) {
|
|
1187
|
+
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* @param {string} value
|
|
1192
|
+
* @param {number} length
|
|
1193
|
+
* @param {object[]} children
|
|
1194
|
+
* @return {string}
|
|
1195
|
+
*/
|
|
1196
|
+
function prefix(value, length, children) {
|
|
1197
|
+
switch (hash(value, length)) {
|
|
1198
|
+
// color-adjust
|
|
1199
|
+
case 5103:
|
|
1200
|
+
return WEBKIT + 'print-' + value + value;
|
|
1201
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
1202
|
+
case 5737:
|
|
1203
|
+
case 4201:
|
|
1204
|
+
case 3177:
|
|
1205
|
+
case 3433:
|
|
1206
|
+
case 1641:
|
|
1207
|
+
case 4457:
|
|
1208
|
+
case 2921:
|
|
1209
|
+
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
1210
|
+
case 5572:
|
|
1211
|
+
case 6356:
|
|
1212
|
+
case 5844:
|
|
1213
|
+
case 3191:
|
|
1214
|
+
case 6645:
|
|
1215
|
+
case 3005:
|
|
1216
|
+
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
1217
|
+
case 6391:
|
|
1218
|
+
case 5879:
|
|
1219
|
+
case 5623:
|
|
1220
|
+
case 6135:
|
|
1221
|
+
case 4599:
|
|
1222
|
+
case 4855:
|
|
1223
|
+
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
1224
|
+
case 4215:
|
|
1225
|
+
case 6389:
|
|
1226
|
+
case 5109:
|
|
1227
|
+
case 5365:
|
|
1228
|
+
case 5621:
|
|
1229
|
+
case 3829:
|
|
1230
|
+
return WEBKIT + value + value;
|
|
1231
|
+
// tab-size
|
|
1232
|
+
case 4789:
|
|
1233
|
+
return MOZ + value + value;
|
|
1234
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
1235
|
+
case 5349:
|
|
1236
|
+
case 4246:
|
|
1237
|
+
case 4810:
|
|
1238
|
+
case 6968:
|
|
1239
|
+
case 2756:
|
|
1240
|
+
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
1241
|
+
// writing-mode
|
|
1242
|
+
case 5936:
|
|
1243
|
+
switch (charat(value, length + 11)) {
|
|
1244
|
+
// vertical-l(r)
|
|
1245
|
+
case 114:
|
|
1246
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
1247
|
+
// vertical-r(l)
|
|
1248
|
+
case 108:
|
|
1249
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
1250
|
+
// horizontal(-)tb
|
|
1251
|
+
case 45:
|
|
1252
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
1253
|
+
// default: fallthrough to below
|
|
1254
|
+
}
|
|
1255
|
+
// flex, flex-direction, scroll-snap-type, writing-mode
|
|
1256
|
+
case 6828:
|
|
1257
|
+
case 4268:
|
|
1258
|
+
case 2903:
|
|
1259
|
+
return WEBKIT + value + MS + value + value;
|
|
1260
|
+
// order
|
|
1261
|
+
case 6165:
|
|
1262
|
+
return WEBKIT + value + MS + 'flex-' + value + value;
|
|
1263
|
+
// align-items
|
|
1264
|
+
case 5187:
|
|
1265
|
+
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
|
1266
|
+
// align-self
|
|
1267
|
+
case 5443:
|
|
1268
|
+
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value;
|
|
1269
|
+
// align-content
|
|
1270
|
+
case 4675:
|
|
1271
|
+
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value;
|
|
1272
|
+
// flex-shrink
|
|
1273
|
+
case 5548:
|
|
1274
|
+
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
|
1275
|
+
// flex-basis
|
|
1276
|
+
case 5292:
|
|
1277
|
+
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
|
1278
|
+
// flex-grow
|
|
1279
|
+
case 6060:
|
|
1280
|
+
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
|
1281
|
+
// transition
|
|
1282
|
+
case 4554:
|
|
1283
|
+
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
|
1284
|
+
// cursor
|
|
1285
|
+
case 6187:
|
|
1286
|
+
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
|
1287
|
+
// background, background-image
|
|
1288
|
+
case 5495:
|
|
1289
|
+
case 3959:
|
|
1290
|
+
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
|
1291
|
+
// justify-content
|
|
1292
|
+
case 4968:
|
|
1293
|
+
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
|
1294
|
+
// justify-self
|
|
1295
|
+
case 4200:
|
|
1296
|
+
if (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value;
|
|
1297
|
+
break;
|
|
1298
|
+
// grid-template-(columns|rows)
|
|
1299
|
+
case 2592:
|
|
1300
|
+
case 3360:
|
|
1301
|
+
return MS + replace(value, 'template-', '') + value;
|
|
1302
|
+
// grid-(row|column)-start
|
|
1303
|
+
case 4384:
|
|
1304
|
+
case 3616:
|
|
1305
|
+
if (children && children.some(function (element, index) {
|
|
1306
|
+
return length = index, match(element.props, /grid-\w+-end/);
|
|
1307
|
+
})) {
|
|
1308
|
+
return ~indexof(value + (children = children[length].value), 'span') ? value : MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span') ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ';';
|
|
1309
|
+
}
|
|
1310
|
+
return MS + replace(value, '-start', '') + value;
|
|
1311
|
+
// grid-(row|column)-end
|
|
1312
|
+
case 4896:
|
|
1313
|
+
case 4128:
|
|
1314
|
+
return children && children.some(function (element) {
|
|
1315
|
+
return match(element.props, /grid-\w+-start/);
|
|
1316
|
+
}) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value;
|
|
1317
|
+
// (margin|padding)-inline-(start|end)
|
|
1318
|
+
case 4095:
|
|
1319
|
+
case 3583:
|
|
1320
|
+
case 4068:
|
|
1321
|
+
case 2532:
|
|
1322
|
+
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
|
1323
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
1324
|
+
case 8116:
|
|
1325
|
+
case 7059:
|
|
1326
|
+
case 5753:
|
|
1327
|
+
case 5535:
|
|
1328
|
+
case 5445:
|
|
1329
|
+
case 5701:
|
|
1330
|
+
case 4933:
|
|
1331
|
+
case 4677:
|
|
1332
|
+
case 5533:
|
|
1333
|
+
case 5789:
|
|
1334
|
+
case 5021:
|
|
1335
|
+
case 4765:
|
|
1336
|
+
// stretch, max-content, min-content, fill-available
|
|
1337
|
+
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
|
1338
|
+
// (m)ax-content, (m)in-content
|
|
1339
|
+
case 109:
|
|
1340
|
+
// -
|
|
1341
|
+
if (charat(value, length + 4) !== 45) break;
|
|
1342
|
+
// (f)ill-available, (f)it-content
|
|
1343
|
+
case 102:
|
|
1344
|
+
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
1345
|
+
// (s)tretch
|
|
1346
|
+
case 115:
|
|
1347
|
+
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value;
|
|
1348
|
+
}
|
|
1349
|
+
break;
|
|
1350
|
+
// grid-(column|row)
|
|
1351
|
+
case 5152:
|
|
1352
|
+
case 5920:
|
|
1353
|
+
return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function (_, a, b, c, d, e, f) {
|
|
1354
|
+
return MS + a + ':' + b + f + (c ? MS + a + '-span:' + (d ? e : +e - +b) + f : '') + value;
|
|
1355
|
+
});
|
|
1356
|
+
// position: sticky
|
|
1357
|
+
case 4949:
|
|
1358
|
+
// stick(y)?
|
|
1359
|
+
if (charat(value, length + 6) === 121) return replace(value, ':', ':' + WEBKIT) + value;
|
|
1360
|
+
break;
|
|
1361
|
+
// display: (flex|inline-flex|grid|inline-grid)
|
|
1362
|
+
case 6444:
|
|
1363
|
+
switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
|
|
1364
|
+
// (inline-)?fle(x)
|
|
1365
|
+
case 120:
|
|
1366
|
+
return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
|
1367
|
+
// (inline-)?gri(d)
|
|
1368
|
+
case 100:
|
|
1369
|
+
return replace(value, ':', ':' + MS) + value;
|
|
1370
|
+
}
|
|
1371
|
+
break;
|
|
1372
|
+
// scroll-margin, scroll-margin-(top|right|bottom|left)
|
|
1373
|
+
case 5719:
|
|
1374
|
+
case 2647:
|
|
1375
|
+
case 2135:
|
|
1376
|
+
case 3927:
|
|
1377
|
+
case 2391:
|
|
1378
|
+
return replace(value, 'scroll-', 'scroll-snap-') + value;
|
|
1379
|
+
}
|
|
1380
|
+
return value;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* @param {object[]} children
|
|
1385
|
+
* @param {function} callback
|
|
1386
|
+
* @return {string}
|
|
1387
|
+
*/
|
|
1388
|
+
function serialize(children, callback) {
|
|
1389
|
+
var output = '';
|
|
1390
|
+
for (var i = 0; i < children.length; i++) output += callback(children[i], i, children, callback) || '';
|
|
1391
|
+
return output;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* @param {object} element
|
|
1396
|
+
* @param {number} index
|
|
1397
|
+
* @param {object[]} children
|
|
1398
|
+
* @param {function} callback
|
|
1399
|
+
* @return {string}
|
|
1400
|
+
*/
|
|
1401
|
+
function stringify(element, index, children, callback) {
|
|
1402
|
+
switch (element.type) {
|
|
1403
|
+
case LAYER:
|
|
1404
|
+
if (element.children.length) break;
|
|
1405
|
+
case IMPORT:
|
|
1406
|
+
case DECLARATION:
|
|
1407
|
+
return element.return = element.return || element.value;
|
|
1408
|
+
case COMMENT:
|
|
1409
|
+
return '';
|
|
1410
|
+
case KEYFRAMES:
|
|
1411
|
+
return element.return = element.value + '{' + serialize(element.children, callback) + '}';
|
|
1412
|
+
case RULESET:
|
|
1413
|
+
if (!strlen(element.value = element.props.join(','))) return '';
|
|
1414
|
+
}
|
|
1415
|
+
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '';
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* @param {function[]} collection
|
|
1420
|
+
* @return {function}
|
|
1421
|
+
*/
|
|
1422
|
+
function middleware(collection) {
|
|
1423
|
+
var length = sizeof(collection);
|
|
1424
|
+
return function (element, index, children, callback) {
|
|
1425
|
+
var output = '';
|
|
1426
|
+
for (var i = 0; i < length; i++) output += collection[i](element, index, children, callback) || '';
|
|
1427
|
+
return output;
|
|
1428
|
+
};
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* @param {function} callback
|
|
1433
|
+
* @return {function}
|
|
1434
|
+
*/
|
|
1435
|
+
function rulesheet(callback) {
|
|
1436
|
+
return function (element) {
|
|
1437
|
+
if (!element.root) if (element = element.return) callback(element);
|
|
1438
|
+
};
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* @param {object} element
|
|
1443
|
+
* @param {number} index
|
|
1444
|
+
* @param {object[]} children
|
|
1445
|
+
* @param {function} callback
|
|
1446
|
+
*/
|
|
1447
|
+
function prefixer(element, index, children, callback) {
|
|
1448
|
+
if (element.length > -1) if (!element.return) switch (element.type) {
|
|
1449
|
+
case DECLARATION:
|
|
1450
|
+
element.return = prefix(element.value, element.length, children);
|
|
1451
|
+
return;
|
|
1452
|
+
case KEYFRAMES:
|
|
1453
|
+
return serialize([copy(element, {
|
|
1454
|
+
value: replace(element.value, '@', '@' + WEBKIT)
|
|
1455
|
+
})], callback);
|
|
1456
|
+
case RULESET:
|
|
1457
|
+
if (element.length) return combine(children = element.props, function (value) {
|
|
1458
|
+
switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
|
|
1459
|
+
// :read-(only|write)
|
|
1460
|
+
case ':read-only':
|
|
1461
|
+
case ':read-write':
|
|
1462
|
+
lift(copy(element, {
|
|
1463
|
+
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
|
1464
|
+
}));
|
|
1465
|
+
lift(copy(element, {
|
|
1466
|
+
props: [value]
|
|
1467
|
+
}));
|
|
1468
|
+
assign$1(element, {
|
|
1469
|
+
props: filter(children, callback)
|
|
1470
|
+
});
|
|
1471
|
+
break;
|
|
1472
|
+
// :placeholder
|
|
1473
|
+
case '::placeholder':
|
|
1474
|
+
lift(copy(element, {
|
|
1475
|
+
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
|
1476
|
+
}));
|
|
1477
|
+
lift(copy(element, {
|
|
1478
|
+
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
|
1479
|
+
}));
|
|
1480
|
+
lift(copy(element, {
|
|
1481
|
+
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
|
1482
|
+
}));
|
|
1483
|
+
lift(copy(element, {
|
|
1484
|
+
props: [value]
|
|
1485
|
+
}));
|
|
1486
|
+
assign$1(element, {
|
|
1487
|
+
props: filter(children, callback)
|
|
1488
|
+
});
|
|
1489
|
+
break;
|
|
1490
|
+
}
|
|
1491
|
+
return '';
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
var unitlessKeys = {
|
|
1497
|
+
animationIterationCount: 1,
|
|
1498
|
+
aspectRatio: 1,
|
|
1499
|
+
borderImageOutset: 1,
|
|
1500
|
+
borderImageSlice: 1,
|
|
1501
|
+
borderImageWidth: 1,
|
|
1502
|
+
boxFlex: 1,
|
|
1503
|
+
boxFlexGroup: 1,
|
|
1504
|
+
boxOrdinalGroup: 1,
|
|
1505
|
+
columnCount: 1,
|
|
1506
|
+
columns: 1,
|
|
1507
|
+
flex: 1,
|
|
1508
|
+
flexGrow: 1,
|
|
1509
|
+
flexPositive: 1,
|
|
1510
|
+
flexShrink: 1,
|
|
1511
|
+
flexNegative: 1,
|
|
1512
|
+
flexOrder: 1,
|
|
1513
|
+
gridRow: 1,
|
|
1514
|
+
gridRowEnd: 1,
|
|
1515
|
+
gridRowSpan: 1,
|
|
1516
|
+
gridRowStart: 1,
|
|
1517
|
+
gridColumn: 1,
|
|
1518
|
+
gridColumnEnd: 1,
|
|
1519
|
+
gridColumnSpan: 1,
|
|
1520
|
+
gridColumnStart: 1,
|
|
1521
|
+
msGridRow: 1,
|
|
1522
|
+
msGridRowSpan: 1,
|
|
1523
|
+
msGridColumn: 1,
|
|
1524
|
+
msGridColumnSpan: 1,
|
|
1525
|
+
fontWeight: 1,
|
|
1526
|
+
lineHeight: 1,
|
|
1527
|
+
opacity: 1,
|
|
1528
|
+
order: 1,
|
|
1529
|
+
orphans: 1,
|
|
1530
|
+
tabSize: 1,
|
|
1531
|
+
widows: 1,
|
|
1532
|
+
zIndex: 1,
|
|
1533
|
+
zoom: 1,
|
|
1534
|
+
WebkitLineClamp: 1,
|
|
1535
|
+
// SVG-related properties
|
|
1536
|
+
fillOpacity: 1,
|
|
1537
|
+
floodOpacity: 1,
|
|
1538
|
+
stopOpacity: 1,
|
|
1539
|
+
strokeDasharray: 1,
|
|
1540
|
+
strokeDashoffset: 1,
|
|
1541
|
+
strokeMiterlimit: 1,
|
|
1542
|
+
strokeOpacity: 1,
|
|
1543
|
+
strokeWidth: 1
|
|
1544
|
+
};
|
|
1545
|
+
|
|
1546
|
+
var f = "undefined" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled",
|
|
1547
|
+
y = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && "" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.SC_DISABLE_SPEEDY && "" !== process.env.SC_DISABLE_SPEEDY ? "false" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : "production" !== process.env.NODE_ENV),
|
|
1548
|
+
g = /invalid hook call/i,
|
|
1549
|
+
S = new Set(),
|
|
1550
|
+
w = function (t, n) {
|
|
1551
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
1552
|
+
var o = n ? ' with the id of "'.concat(n, '"') : "",
|
|
1553
|
+
s = "The component ".concat(t).concat(o, " has been created dynamically.\n") + "You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",
|
|
1554
|
+
i = console.error;
|
|
1555
|
+
try {
|
|
1556
|
+
var a = !0;
|
|
1557
|
+
console.error = function (t) {
|
|
1558
|
+
for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];
|
|
1559
|
+
g.test(t) ? (a = !1, S.delete(s)) : i.apply(void 0, __spreadArray([t], n, !1));
|
|
1560
|
+
}, React$1.useRef(), a && !S.has(s) && (console.warn(s), S.add(s));
|
|
1561
|
+
} catch (e) {
|
|
1562
|
+
g.test(e.message) && S.delete(s);
|
|
1563
|
+
} finally {
|
|
1564
|
+
console.error = i;
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
b = Object.freeze([]),
|
|
1569
|
+
E = Object.freeze({});
|
|
1570
|
+
function N(e, t, n) {
|
|
1571
|
+
return void 0 === n && (n = E), e.theme !== n.theme && e.theme || t || n.theme;
|
|
1572
|
+
}
|
|
1573
|
+
var P = new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]),
|
|
1574
|
+
_ = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,
|
|
1575
|
+
C = /(^-|-$)/g;
|
|
1576
|
+
function I(e) {
|
|
1577
|
+
return e.replace(_, "-").replace(C, "");
|
|
1578
|
+
}
|
|
1579
|
+
var A = /(a)(d)/gi,
|
|
1580
|
+
O = function (e) {
|
|
1581
|
+
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
1582
|
+
};
|
|
1583
|
+
function D(e) {
|
|
1584
|
+
var t,
|
|
1585
|
+
n = "";
|
|
1586
|
+
for (t = Math.abs(e); t > 52; t = t / 52 | 0) n = O(t % 52) + n;
|
|
1587
|
+
return (O(t % 52) + n).replace(A, "$1-$2");
|
|
1588
|
+
}
|
|
1589
|
+
var R,
|
|
1590
|
+
T = function (e, t) {
|
|
1591
|
+
for (var n = t.length; n;) e = 33 * e ^ t.charCodeAt(--n);
|
|
1592
|
+
return e;
|
|
1593
|
+
},
|
|
1594
|
+
j = function (e) {
|
|
1595
|
+
return T(5381, e);
|
|
1596
|
+
};
|
|
1597
|
+
function x(e) {
|
|
1598
|
+
return D(j(e) >>> 0);
|
|
1599
|
+
}
|
|
1600
|
+
function k(e) {
|
|
1601
|
+
return "production" !== process.env.NODE_ENV && "string" == typeof e && e || e.displayName || e.name || "Component";
|
|
1602
|
+
}
|
|
1603
|
+
function V(e) {
|
|
1604
|
+
return "string" == typeof e && ("production" === process.env.NODE_ENV || e.charAt(0) === e.charAt(0).toLowerCase());
|
|
1605
|
+
}
|
|
1606
|
+
var F = "function" == typeof Symbol && Symbol.for,
|
|
1607
|
+
M = F ? Symbol.for("react.memo") : 60115,
|
|
1608
|
+
$ = F ? Symbol.for("react.forward_ref") : 60112,
|
|
1609
|
+
z = {
|
|
1610
|
+
childContextTypes: !0,
|
|
1611
|
+
contextType: !0,
|
|
1612
|
+
contextTypes: !0,
|
|
1613
|
+
defaultProps: !0,
|
|
1614
|
+
displayName: !0,
|
|
1615
|
+
getDefaultProps: !0,
|
|
1616
|
+
getDerivedStateFromError: !0,
|
|
1617
|
+
getDerivedStateFromProps: !0,
|
|
1618
|
+
mixins: !0,
|
|
1619
|
+
propTypes: !0,
|
|
1620
|
+
type: !0
|
|
1621
|
+
},
|
|
1622
|
+
B = {
|
|
1623
|
+
name: !0,
|
|
1624
|
+
length: !0,
|
|
1625
|
+
prototype: !0,
|
|
1626
|
+
caller: !0,
|
|
1627
|
+
callee: !0,
|
|
1628
|
+
arguments: !0,
|
|
1629
|
+
arity: !0
|
|
1630
|
+
},
|
|
1631
|
+
G = {
|
|
1632
|
+
$$typeof: !0,
|
|
1633
|
+
compare: !0,
|
|
1634
|
+
defaultProps: !0,
|
|
1635
|
+
displayName: !0,
|
|
1636
|
+
propTypes: !0,
|
|
1637
|
+
type: !0
|
|
1638
|
+
},
|
|
1639
|
+
L = ((R = {})[$] = {
|
|
1640
|
+
$$typeof: !0,
|
|
1641
|
+
render: !0,
|
|
1642
|
+
defaultProps: !0,
|
|
1643
|
+
displayName: !0,
|
|
1644
|
+
propTypes: !0
|
|
1645
|
+
}, R[M] = G, R);
|
|
1646
|
+
function Y(e) {
|
|
1647
|
+
return ("type" in (t = e) && t.type.$$typeof) === M ? G : "$$typeof" in e ? L[e.$$typeof] : z;
|
|
1648
|
+
var t;
|
|
1649
|
+
}
|
|
1650
|
+
var W = Object.defineProperty,
|
|
1651
|
+
q = Object.getOwnPropertyNames,
|
|
1652
|
+
H = Object.getOwnPropertySymbols,
|
|
1653
|
+
U = Object.getOwnPropertyDescriptor,
|
|
1654
|
+
J = Object.getPrototypeOf,
|
|
1655
|
+
X = Object.prototype;
|
|
1656
|
+
function Z(e, t, n) {
|
|
1657
|
+
if ("string" != typeof t) {
|
|
1658
|
+
if (X) {
|
|
1659
|
+
var o = J(t);
|
|
1660
|
+
o && o !== X && Z(e, o, n);
|
|
1661
|
+
}
|
|
1662
|
+
var r = q(t);
|
|
1663
|
+
H && (r = r.concat(H(t)));
|
|
1664
|
+
for (var s = Y(e), i = Y(t), a = 0; a < r.length; ++a) {
|
|
1665
|
+
var c = r[a];
|
|
1666
|
+
if (!(c in B || n && n[c] || i && c in i || s && c in s)) {
|
|
1667
|
+
var l = U(t, c);
|
|
1668
|
+
try {
|
|
1669
|
+
W(e, c, l);
|
|
1670
|
+
} catch (e) {}
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
return e;
|
|
1675
|
+
}
|
|
1676
|
+
function K(e) {
|
|
1677
|
+
return "function" == typeof e;
|
|
1678
|
+
}
|
|
1679
|
+
function Q(e) {
|
|
1680
|
+
return "object" == typeof e && "styledComponentId" in e;
|
|
1681
|
+
}
|
|
1682
|
+
function ee(e, t) {
|
|
1683
|
+
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
1684
|
+
}
|
|
1685
|
+
function te(e, t) {
|
|
1686
|
+
if (0 === e.length) return "";
|
|
1687
|
+
for (var n = e[0], o = 1; o < e.length; o++) n += t ? t + e[o] : e[o];
|
|
1688
|
+
return n;
|
|
1689
|
+
}
|
|
1690
|
+
function ne(e) {
|
|
1691
|
+
return null !== e && "object" == typeof e && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
1692
|
+
}
|
|
1693
|
+
function oe(e, t, n) {
|
|
1694
|
+
if (void 0 === n && (n = !1), !n && !ne(e) && !Array.isArray(e)) return t;
|
|
1695
|
+
if (Array.isArray(t)) for (var o = 0; o < t.length; o++) e[o] = oe(e[o], t[o]);else if (ne(t)) for (var o in t) e[o] = oe(e[o], t[o]);
|
|
1696
|
+
return e;
|
|
1697
|
+
}
|
|
1698
|
+
function re(e, t) {
|
|
1699
|
+
Object.defineProperty(e, "toString", {
|
|
1700
|
+
value: t
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
var se = "production" !== process.env.NODE_ENV ? {
|
|
1704
|
+
1: "Cannot create styled-component for component: %s.\n\n",
|
|
1705
|
+
2: "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",
|
|
1706
|
+
3: "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
|
|
1707
|
+
4: "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",
|
|
1708
|
+
5: "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",
|
|
1709
|
+
6: "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",
|
|
1710
|
+
7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',
|
|
1711
|
+
8: 'ThemeProvider: Please make your "theme" prop an object.\n\n',
|
|
1712
|
+
9: "Missing document `<head>`\n\n",
|
|
1713
|
+
10: "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",
|
|
1714
|
+
11: "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",
|
|
1715
|
+
12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",
|
|
1716
|
+
13: "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",
|
|
1717
|
+
14: 'ThemeProvider: "theme" prop is required.\n\n',
|
|
1718
|
+
15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",
|
|
1719
|
+
16: "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",
|
|
1720
|
+
17: "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",
|
|
1721
|
+
18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"
|
|
1722
|
+
} : {};
|
|
1723
|
+
function ie() {
|
|
1724
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
1725
|
+
for (var n = e[0], o = [], r = 1, s = e.length; r < s; r += 1) o.push(e[r]);
|
|
1726
|
+
return o.forEach(function (e) {
|
|
1727
|
+
n = n.replace(/%[a-z]/, e);
|
|
1728
|
+
}), n;
|
|
1729
|
+
}
|
|
1730
|
+
function ae(t) {
|
|
1731
|
+
for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];
|
|
1732
|
+
return "production" === process.env.NODE_ENV ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t, " for more information.").concat(n.length > 0 ? " Args: ".concat(n.join(", ")) : "")) : new Error(ie.apply(void 0, __spreadArray([se[t]], n, !1)).trim());
|
|
1733
|
+
}
|
|
1734
|
+
var ce = function () {
|
|
1735
|
+
function e(e) {
|
|
1736
|
+
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e;
|
|
1737
|
+
}
|
|
1738
|
+
return e.prototype.indexOfGroup = function (e) {
|
|
1739
|
+
for (var t = 0, n = 0; n < e; n++) t += this.groupSizes[n];
|
|
1740
|
+
return t;
|
|
1741
|
+
}, e.prototype.insertRules = function (e, t) {
|
|
1742
|
+
if (e >= this.groupSizes.length) {
|
|
1743
|
+
for (var n = this.groupSizes, o = n.length, r = o; e >= r;) if ((r <<= 1) < 0) throw ae(16, "".concat(e));
|
|
1744
|
+
this.groupSizes = new Uint32Array(r), this.groupSizes.set(n), this.length = r;
|
|
1745
|
+
for (var s = o; s < r; s++) this.groupSizes[s] = 0;
|
|
1746
|
+
}
|
|
1747
|
+
for (var i = this.indexOfGroup(e + 1), a = (s = 0, t.length); s < a; s++) this.tag.insertRule(i, t[s]) && (this.groupSizes[e]++, i++);
|
|
1748
|
+
}, e.prototype.clearGroup = function (e) {
|
|
1749
|
+
if (e < this.length) {
|
|
1750
|
+
var t = this.groupSizes[e],
|
|
1751
|
+
n = this.indexOfGroup(e),
|
|
1752
|
+
o = n + t;
|
|
1753
|
+
this.groupSizes[e] = 0;
|
|
1754
|
+
for (var r = n; r < o; r++) this.tag.deleteRule(n);
|
|
1755
|
+
}
|
|
1756
|
+
}, e.prototype.getGroup = function (e) {
|
|
1757
|
+
var t = "";
|
|
1758
|
+
if (e >= this.length || 0 === this.groupSizes[e]) return t;
|
|
1759
|
+
for (var n = this.groupSizes[e], o = this.indexOfGroup(e), r = o + n, s = o; s < r; s++) t += "".concat(this.tag.getRule(s)).concat("/*!sc*/\n");
|
|
1760
|
+
return t;
|
|
1761
|
+
}, e;
|
|
1762
|
+
}(),
|
|
1763
|
+
le = new Map(),
|
|
1764
|
+
ue = new Map(),
|
|
1765
|
+
pe = 1,
|
|
1766
|
+
de = function (e) {
|
|
1767
|
+
if (le.has(e)) return le.get(e);
|
|
1768
|
+
for (; ue.has(pe);) pe++;
|
|
1769
|
+
var t = pe++;
|
|
1770
|
+
if ("production" !== process.env.NODE_ENV && ((0 | t) < 0 || t > 1073741824)) throw ae(16, "".concat(t));
|
|
1771
|
+
return le.set(e, t), ue.set(t, e), t;
|
|
1772
|
+
},
|
|
1773
|
+
he = (function (e) {
|
|
1774
|
+
for (var t = e.getTag(), n = t.length, o = "", r = function (n) {
|
|
1775
|
+
var r = function (e) {
|
|
1776
|
+
return ue.get(e);
|
|
1777
|
+
}(n);
|
|
1778
|
+
if (void 0 === r) return "continue";
|
|
1779
|
+
var s = e.names.get(r),
|
|
1780
|
+
i = t.getGroup(n);
|
|
1781
|
+
if (void 0 === s || 0 === i.length) return "continue";
|
|
1782
|
+
var a = "".concat(f, ".g").concat(n, '[id="').concat(r, '"]'),
|
|
1783
|
+
c = "";
|
|
1784
|
+
void 0 !== s && s.forEach(function (e) {
|
|
1785
|
+
e.length > 0 && (c += "".concat(e, ","));
|
|
1786
|
+
}), o += "".concat(i).concat(a, '{content:"').concat(c, '"}').concat("/*!sc*/\n");
|
|
1787
|
+
}, s = 0; s < n; s++) r(s);
|
|
1788
|
+
return o;
|
|
1789
|
+
});
|
|
1790
|
+
function fe() {
|
|
1791
|
+
return "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : null;
|
|
1792
|
+
}
|
|
1793
|
+
var me = function (e) {
|
|
1794
|
+
var t = document.head,
|
|
1795
|
+
n = e || t,
|
|
1796
|
+
o = document.createElement("style"),
|
|
1797
|
+
r = function (e) {
|
|
1798
|
+
var t = Array.from(e.querySelectorAll("style[".concat(f, "]")));
|
|
1799
|
+
return t[t.length - 1];
|
|
1800
|
+
}(n),
|
|
1801
|
+
s = void 0 !== r ? r.nextSibling : null;
|
|
1802
|
+
o.setAttribute(f, "active"), o.setAttribute("data-styled-version", "6.0.7");
|
|
1803
|
+
var i = fe();
|
|
1804
|
+
return i && o.setAttribute("nonce", i), n.insertBefore(o, s), o;
|
|
1805
|
+
},
|
|
1806
|
+
ye = function () {
|
|
1807
|
+
function e(e) {
|
|
1808
|
+
this.element = me(e), this.element.appendChild(document.createTextNode("")), this.sheet = function (e) {
|
|
1809
|
+
if (e.sheet) return e.sheet;
|
|
1810
|
+
for (var t = document.styleSheets, n = 0, o = t.length; n < o; n++) {
|
|
1811
|
+
var r = t[n];
|
|
1812
|
+
if (r.ownerNode === e) return r;
|
|
1813
|
+
}
|
|
1814
|
+
throw ae(17);
|
|
1815
|
+
}(this.element), this.length = 0;
|
|
1816
|
+
}
|
|
1817
|
+
return e.prototype.insertRule = function (e, t) {
|
|
1818
|
+
try {
|
|
1819
|
+
return this.sheet.insertRule(t, e), this.length++, !0;
|
|
1820
|
+
} catch (e) {
|
|
1821
|
+
return !1;
|
|
1822
|
+
}
|
|
1823
|
+
}, e.prototype.deleteRule = function (e) {
|
|
1824
|
+
this.sheet.deleteRule(e), this.length--;
|
|
1825
|
+
}, e.prototype.getRule = function (e) {
|
|
1826
|
+
var t = this.sheet.cssRules[e];
|
|
1827
|
+
return t && t.cssText ? t.cssText : "";
|
|
1828
|
+
}, e;
|
|
1829
|
+
}(),
|
|
1830
|
+
ve = function () {
|
|
1831
|
+
function e(e) {
|
|
1832
|
+
this.element = me(e), this.nodes = this.element.childNodes, this.length = 0;
|
|
1833
|
+
}
|
|
1834
|
+
return e.prototype.insertRule = function (e, t) {
|
|
1835
|
+
if (e <= this.length && e >= 0) {
|
|
1836
|
+
var n = document.createTextNode(t);
|
|
1837
|
+
return this.element.insertBefore(n, this.nodes[e] || null), this.length++, !0;
|
|
1838
|
+
}
|
|
1839
|
+
return !1;
|
|
1840
|
+
}, e.prototype.deleteRule = function (e) {
|
|
1841
|
+
this.element.removeChild(this.nodes[e]), this.length--;
|
|
1842
|
+
}, e.prototype.getRule = function (e) {
|
|
1843
|
+
return e < this.length ? this.nodes[e].textContent : "";
|
|
1844
|
+
}, e;
|
|
1845
|
+
}(),
|
|
1846
|
+
ge = function () {
|
|
1847
|
+
function e(e) {
|
|
1848
|
+
this.rules = [], this.length = 0;
|
|
1849
|
+
}
|
|
1850
|
+
return e.prototype.insertRule = function (e, t) {
|
|
1851
|
+
return e <= this.length && (this.rules.splice(e, 0, t), this.length++, !0);
|
|
1852
|
+
}, e.prototype.deleteRule = function (e) {
|
|
1853
|
+
this.rules.splice(e, 1), this.length--;
|
|
1854
|
+
}, e.prototype.getRule = function (e) {
|
|
1855
|
+
return e < this.length ? this.rules[e] : "";
|
|
1856
|
+
}, e;
|
|
1857
|
+
}(),
|
|
1858
|
+
Se = {
|
|
1859
|
+
isServer: !0,
|
|
1860
|
+
useCSSOMInjection: !y
|
|
1861
|
+
},
|
|
1862
|
+
we = function () {
|
|
1863
|
+
function e(e, n, o) {
|
|
1864
|
+
void 0 === e && (e = E), void 0 === n && (n = {});
|
|
1865
|
+
var r = this;
|
|
1866
|
+
this.options = __assign(__assign({}, Se), e), this.gs = n, this.names = new Map(o), this.server = !!e.isServer, re(this, function () {
|
|
1867
|
+
return he(r);
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
return e.registerId = function (e) {
|
|
1871
|
+
return de(e);
|
|
1872
|
+
}, e.prototype.reconstructWithOptions = function (n, o) {
|
|
1873
|
+
return void 0 === o && (o = !0), new e(__assign(__assign({}, this.options), n), this.gs, o && this.names || void 0);
|
|
1874
|
+
}, e.prototype.allocateGSInstance = function (e) {
|
|
1875
|
+
return this.gs[e] = (this.gs[e] || 0) + 1;
|
|
1876
|
+
}, e.prototype.getTag = function () {
|
|
1877
|
+
return this.tag || (this.tag = (e = function (e) {
|
|
1878
|
+
var t = e.useCSSOMInjection,
|
|
1879
|
+
n = e.target;
|
|
1880
|
+
return e.isServer ? new ge(n) : t ? new ye(n) : new ve(n);
|
|
1881
|
+
}(this.options), new ce(e)));
|
|
1882
|
+
var e;
|
|
1883
|
+
}, e.prototype.hasNameForId = function (e, t) {
|
|
1884
|
+
return this.names.has(e) && this.names.get(e).has(t);
|
|
1885
|
+
}, e.prototype.registerName = function (e, t) {
|
|
1886
|
+
if (de(e), this.names.has(e)) this.names.get(e).add(t);else {
|
|
1887
|
+
var n = new Set();
|
|
1888
|
+
n.add(t), this.names.set(e, n);
|
|
1889
|
+
}
|
|
1890
|
+
}, e.prototype.insertRules = function (e, t, n) {
|
|
1891
|
+
this.registerName(e, t), this.getTag().insertRules(de(e), n);
|
|
1892
|
+
}, e.prototype.clearNames = function (e) {
|
|
1893
|
+
this.names.has(e) && this.names.get(e).clear();
|
|
1894
|
+
}, e.prototype.clearRules = function (e) {
|
|
1895
|
+
this.getTag().clearGroup(de(e)), this.clearNames(e);
|
|
1896
|
+
}, e.prototype.clearTag = function () {
|
|
1897
|
+
this.tag = void 0;
|
|
1898
|
+
}, e;
|
|
1899
|
+
}(),
|
|
1900
|
+
be = /&/g,
|
|
1901
|
+
Ee = /^\s*\/\/.*$/gm;
|
|
1902
|
+
function Ne(e, t) {
|
|
1903
|
+
return e.map(function (e) {
|
|
1904
|
+
return "rule" === e.type && (e.value = "".concat(t, " ").concat(e.value), e.value = e.value.replaceAll(",", ",".concat(t, " ")), e.props = e.props.map(function (e) {
|
|
1905
|
+
return "".concat(t, " ").concat(e);
|
|
1906
|
+
})), Array.isArray(e.children) && "@keyframes" !== e.type && (e.children = Ne(e.children, t)), e;
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
function Pe(e) {
|
|
1910
|
+
var t,
|
|
1911
|
+
n,
|
|
1912
|
+
o,
|
|
1913
|
+
r = void 0 === e ? E : e,
|
|
1914
|
+
s = r.options,
|
|
1915
|
+
i = void 0 === s ? E : s,
|
|
1916
|
+
a = r.plugins,
|
|
1917
|
+
c = void 0 === a ? b : a,
|
|
1918
|
+
l = function (e, o, r) {
|
|
1919
|
+
return r === n || r.startsWith(n) && r.endsWith(n) && r.replaceAll(n, "").length > 0 ? ".".concat(t) : e;
|
|
1920
|
+
},
|
|
1921
|
+
u = c.slice();
|
|
1922
|
+
u.push(function (e) {
|
|
1923
|
+
e.type === RULESET && e.value.includes("&") && (e.props[0] = e.props[0].replace(be, n).replace(o, l));
|
|
1924
|
+
}), i.prefix && u.push(prefixer), u.push(stringify);
|
|
1925
|
+
var p = function (e, r, s, a) {
|
|
1926
|
+
void 0 === r && (r = ""), void 0 === s && (s = ""), void 0 === a && (a = "&"), t = a, n = r, o = new RegExp("\\".concat(n, "\\b"), "g");
|
|
1927
|
+
var c = e.replace(Ee, ""),
|
|
1928
|
+
l = compile(s || r ? "".concat(s, " ").concat(r, " { ").concat(c, " }") : c);
|
|
1929
|
+
i.namespace && (l = Ne(l, i.namespace));
|
|
1930
|
+
var p = [];
|
|
1931
|
+
return serialize(l, middleware(u.concat(rulesheet(function (e) {
|
|
1932
|
+
return p.push(e);
|
|
1933
|
+
})))), p;
|
|
1934
|
+
};
|
|
1935
|
+
return p.hash = c.length ? c.reduce(function (e, t) {
|
|
1936
|
+
return t.name || ae(15), T(e, t.name);
|
|
1937
|
+
}, 5381).toString() : "", p;
|
|
1938
|
+
}
|
|
1939
|
+
var _e = new we(),
|
|
1940
|
+
Ce = Pe(),
|
|
1941
|
+
Ie = /*#__PURE__*/React$1.createContext({
|
|
1942
|
+
shouldForwardProp: void 0,
|
|
1943
|
+
styleSheet: _e,
|
|
1944
|
+
stylis: Ce
|
|
1945
|
+
});
|
|
1946
|
+
Ie.Consumer;
|
|
1947
|
+
function De() {
|
|
1948
|
+
return React$1.useContext(Ie);
|
|
1949
|
+
}
|
|
1950
|
+
var Te = function () {
|
|
1951
|
+
function e(e, t) {
|
|
1952
|
+
var n = this;
|
|
1953
|
+
this.inject = function (e, t) {
|
|
1954
|
+
void 0 === t && (t = Ce);
|
|
1955
|
+
var o = n.name + t.hash;
|
|
1956
|
+
e.hasNameForId(n.id, o) || e.insertRules(n.id, o, t(n.rules, o, "@keyframes"));
|
|
1957
|
+
}, this.name = e, this.id = "sc-keyframes-".concat(e), this.rules = t, re(this, function () {
|
|
1958
|
+
throw ae(12, String(n.name));
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
return e.prototype.getName = function (e) {
|
|
1962
|
+
return void 0 === e && (e = Ce), this.name + e.hash;
|
|
1963
|
+
}, e;
|
|
1964
|
+
}(),
|
|
1965
|
+
je = function (e) {
|
|
1966
|
+
return e >= "A" && e <= "Z";
|
|
1967
|
+
};
|
|
1968
|
+
function xe(e) {
|
|
1969
|
+
for (var t = "", n = 0; n < e.length; n++) {
|
|
1970
|
+
var o = e[n];
|
|
1971
|
+
if (1 === n && "-" === o && "-" === e[0]) return e;
|
|
1972
|
+
je(o) ? t += "-" + o.toLowerCase() : t += o;
|
|
1973
|
+
}
|
|
1974
|
+
return t.startsWith("ms-") ? "-" + t : t;
|
|
1975
|
+
}
|
|
1976
|
+
var ke = function (e) {
|
|
1977
|
+
return null == e || !1 === e || "" === e;
|
|
1978
|
+
},
|
|
1979
|
+
Ve = function (t) {
|
|
1980
|
+
var n,
|
|
1981
|
+
o,
|
|
1982
|
+
r = [];
|
|
1983
|
+
for (var s in t) {
|
|
1984
|
+
var i = t[s];
|
|
1985
|
+
t.hasOwnProperty(s) && !ke(i) && (Array.isArray(i) && i.isCss || K(i) ? r.push("".concat(xe(s), ":"), i, ";") : ne(i) ? r.push.apply(r, __spreadArray(__spreadArray(["".concat(s, " {")], Ve(i), !1), ["}"], !1)) : r.push("".concat(xe(s), ": ").concat((n = s, null == (o = i) || "boolean" == typeof o || "" === o ? "" : "number" != typeof o || 0 === o || n in unitlessKeys || n.startsWith("--") ? String(o).trim() : "".concat(o, "px")), ";")));
|
|
1986
|
+
}
|
|
1987
|
+
return r;
|
|
1988
|
+
};
|
|
1989
|
+
function Fe(e, t, n, o) {
|
|
1990
|
+
if (ke(e)) return [];
|
|
1991
|
+
if (Q(e)) return [".".concat(e.styledComponentId)];
|
|
1992
|
+
if (K(e)) {
|
|
1993
|
+
if (!K(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e];
|
|
1994
|
+
var r = e(t);
|
|
1995
|
+
return "production" === process.env.NODE_ENV || "object" != typeof r || Array.isArray(r) || r instanceof Te || ne(r) || null === r || console.error("".concat(k(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Fe(r, t, n, o);
|
|
1996
|
+
}
|
|
1997
|
+
var s;
|
|
1998
|
+
return e instanceof Te ? n ? (e.inject(n, o), [e.getName(o)]) : [e] : ne(e) ? Ve(e) : Array.isArray(e) ? Array.prototype.concat.apply(b, e.map(function (e) {
|
|
1999
|
+
return Fe(e, t, n, o);
|
|
2000
|
+
})) : [e.toString()];
|
|
2001
|
+
}
|
|
2002
|
+
function Me(e) {
|
|
2003
|
+
for (var t = 0; t < e.length; t += 1) {
|
|
2004
|
+
var n = e[t];
|
|
2005
|
+
if (K(n) && !Q(n)) return !1;
|
|
2006
|
+
}
|
|
2007
|
+
return !0;
|
|
2008
|
+
}
|
|
2009
|
+
var $e = j("6.0.7"),
|
|
2010
|
+
ze = function () {
|
|
2011
|
+
function e(e, t, n) {
|
|
2012
|
+
this.rules = e, this.staticRulesId = "", this.isStatic = "production" === process.env.NODE_ENV && (void 0 === n || n.isStatic) && Me(e), this.componentId = t, this.baseHash = T($e, t), this.baseStyle = n, we.registerId(t);
|
|
2013
|
+
}
|
|
2014
|
+
return e.prototype.generateAndInjectStyles = function (e, t, n) {
|
|
2015
|
+
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, t, n) : "";
|
|
2016
|
+
if (this.isStatic && !n.hash) {
|
|
2017
|
+
if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) o = ee(o, this.staticRulesId);else {
|
|
2018
|
+
var r = te(Fe(this.rules, e, t, n)),
|
|
2019
|
+
s = D(T(this.baseHash, r) >>> 0);
|
|
2020
|
+
if (!t.hasNameForId(this.componentId, s)) {
|
|
2021
|
+
var i = n(r, ".".concat(s), void 0, this.componentId);
|
|
2022
|
+
t.insertRules(this.componentId, s, i);
|
|
2023
|
+
}
|
|
2024
|
+
o = ee(o, s), this.staticRulesId = s;
|
|
2025
|
+
}
|
|
2026
|
+
} else {
|
|
2027
|
+
for (var a = T(this.baseHash, n.hash), c = "", l = 0; l < this.rules.length; l++) {
|
|
2028
|
+
var u = this.rules[l];
|
|
2029
|
+
if ("string" == typeof u) c += u, "production" !== process.env.NODE_ENV && (a = T(a, u));else if (u) {
|
|
2030
|
+
var p = te(Fe(u, e, t, n));
|
|
2031
|
+
a = T(a, p), c += p;
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
if (c) {
|
|
2035
|
+
var d = D(a >>> 0);
|
|
2036
|
+
t.hasNameForId(this.componentId, d) || t.insertRules(this.componentId, d, n(c, ".".concat(d), void 0, this.componentId)), o = ee(o, d);
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
return o;
|
|
2040
|
+
}, e;
|
|
2041
|
+
}(),
|
|
2042
|
+
Be = /*#__PURE__*/React$1.createContext(void 0);
|
|
2043
|
+
Be.Consumer;
|
|
2044
|
+
var We = {},
|
|
2045
|
+
qe = new Set();
|
|
2046
|
+
function He(e, r, s) {
|
|
2047
|
+
var i = Q(e),
|
|
2048
|
+
a = e,
|
|
2049
|
+
c = !V(e),
|
|
2050
|
+
p = r.attrs,
|
|
2051
|
+
d = void 0 === p ? b : p,
|
|
2052
|
+
h = r.componentId,
|
|
2053
|
+
f = void 0 === h ? function (e, t) {
|
|
2054
|
+
var n = "string" != typeof e ? "sc" : I(e);
|
|
2055
|
+
We[n] = (We[n] || 0) + 1;
|
|
2056
|
+
var o = "".concat(n, "-").concat(x("6.0.7" + n + We[n]));
|
|
2057
|
+
return t ? "".concat(t, "-").concat(o) : o;
|
|
2058
|
+
}(r.displayName, r.parentComponentId) : h,
|
|
2059
|
+
m = r.displayName,
|
|
2060
|
+
y = void 0 === m ? function (e) {
|
|
2061
|
+
return V(e) ? "styled.".concat(e) : "Styled(".concat(k(e), ")");
|
|
2062
|
+
}(e) : m,
|
|
2063
|
+
v = r.displayName && r.componentId ? "".concat(I(r.displayName), "-").concat(r.componentId) : r.componentId || f,
|
|
2064
|
+
g = i && a.attrs ? a.attrs.concat(d).filter(Boolean) : d,
|
|
2065
|
+
S = r.shouldForwardProp;
|
|
2066
|
+
if (i && a.shouldForwardProp) {
|
|
2067
|
+
var _ = a.shouldForwardProp;
|
|
2068
|
+
if (r.shouldForwardProp) {
|
|
2069
|
+
var C = r.shouldForwardProp;
|
|
2070
|
+
S = function (e, t) {
|
|
2071
|
+
return _(e, t) && C(e, t);
|
|
2072
|
+
};
|
|
2073
|
+
} else S = _;
|
|
2074
|
+
}
|
|
2075
|
+
var A = new ze(s, v, i ? a.componentStyle : void 0);
|
|
2076
|
+
function O(e, r) {
|
|
2077
|
+
return function (e, r, s) {
|
|
2078
|
+
var i = e.attrs,
|
|
2079
|
+
a = e.componentStyle,
|
|
2080
|
+
c = e.defaultProps,
|
|
2081
|
+
p = e.foldedComponentIds,
|
|
2082
|
+
d = e.styledComponentId,
|
|
2083
|
+
h = e.target,
|
|
2084
|
+
f = React$1.useContext(Be),
|
|
2085
|
+
m = De(),
|
|
2086
|
+
y = e.shouldForwardProp || m.shouldForwardProp;
|
|
2087
|
+
"production" !== process.env.NODE_ENV && React$1.useDebugValue(d);
|
|
2088
|
+
var v = function (e, n, o) {
|
|
2089
|
+
for (var r, s = __assign(__assign({}, n), {
|
|
2090
|
+
className: void 0,
|
|
2091
|
+
theme: o
|
|
2092
|
+
}), i = 0; i < e.length; i += 1) {
|
|
2093
|
+
var a = K(r = e[i]) ? r(s) : r;
|
|
2094
|
+
for (var c in a) s[c] = "className" === c ? ee(s[c], a[c]) : "style" === c ? __assign(__assign({}, s[c]), a[c]) : a[c];
|
|
2095
|
+
}
|
|
2096
|
+
return n.className && (s.className = ee(s.className, n.className)), s;
|
|
2097
|
+
}(i, r, N(r, f, c) || E),
|
|
2098
|
+
g = v.as || h,
|
|
2099
|
+
S = {};
|
|
2100
|
+
for (var w in v) void 0 === v[w] || "$" === w[0] || "as" === w || "theme" === w || ("forwardedAs" === w ? S.as = v.forwardedAs : y && !y(w, g) || (S[w] = v[w], y || "development" !== process.env.NODE_ENV || isPropValid(w) || qe.has(w) || !P.has(g) || (qe.add(w), console.warn('styled-components: it looks like an unknown prop "'.concat(w, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
|
|
2101
|
+
var b = function (e, t) {
|
|
2102
|
+
var n = De(),
|
|
2103
|
+
o = e.generateAndInjectStyles(t, n.styleSheet, n.stylis);
|
|
2104
|
+
return "production" !== process.env.NODE_ENV && React$1.useDebugValue(o), o;
|
|
2105
|
+
}(a, v);
|
|
2106
|
+
"production" !== process.env.NODE_ENV && e.warnTooManyClasses && e.warnTooManyClasses(b);
|
|
2107
|
+
var _ = ee(p, d);
|
|
2108
|
+
return b && (_ += " " + b), v.className && (_ += " " + v.className), S[V(g) && !P.has(g) ? "class" : "className"] = _, S.ref = s, /*#__PURE__*/React$1.createElement(g, S);
|
|
2109
|
+
}(D, e, r);
|
|
2110
|
+
}
|
|
2111
|
+
"production" !== process.env.NODE_ENV && (O.displayName = y);
|
|
2112
|
+
var D = /*#__PURE__*/React$1.forwardRef(O);
|
|
2113
|
+
return D.attrs = g, D.componentStyle = A, D.shouldForwardProp = S, "production" !== process.env.NODE_ENV && (D.displayName = y), D.foldedComponentIds = i ? ee(a.foldedComponentIds, a.styledComponentId) : "", D.styledComponentId = v, D.target = i ? a.target : e, Object.defineProperty(D, "defaultProps", {
|
|
2114
|
+
get: function () {
|
|
2115
|
+
return this._foldedDefaultProps;
|
|
2116
|
+
},
|
|
2117
|
+
set: function (e) {
|
|
2118
|
+
this._foldedDefaultProps = i ? function (e) {
|
|
2119
|
+
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
2120
|
+
for (var o = 0, r = t; o < r.length; o++) oe(e, r[o], !0);
|
|
2121
|
+
return e;
|
|
2122
|
+
}({}, a.defaultProps, e) : e;
|
|
2123
|
+
}
|
|
2124
|
+
}), "production" !== process.env.NODE_ENV && (w(y, v), D.warnTooManyClasses = function (e, t) {
|
|
2125
|
+
var n = {},
|
|
2126
|
+
o = !1;
|
|
2127
|
+
return function (r) {
|
|
2128
|
+
if (!o && (n[r] = !0, Object.keys(n).length >= 200)) {
|
|
2129
|
+
var s = t ? ' with the id of "'.concat(t, '"') : "";
|
|
2130
|
+
console.warn("Over ".concat(200, " classes were generated for component ").concat(e).concat(s, ".\n") + "Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"), o = !0, n = {};
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
}(y, v)), re(D, function () {
|
|
2134
|
+
return ".".concat(D.styledComponentId);
|
|
2135
|
+
}), c && Z(D, e, {
|
|
2136
|
+
attrs: !0,
|
|
2137
|
+
componentStyle: !0,
|
|
2138
|
+
displayName: !0,
|
|
2139
|
+
foldedComponentIds: !0,
|
|
2140
|
+
shouldForwardProp: !0,
|
|
2141
|
+
styledComponentId: !0,
|
|
2142
|
+
target: !0
|
|
2143
|
+
}), D;
|
|
2144
|
+
}
|
|
2145
|
+
function Ue(e, t) {
|
|
2146
|
+
for (var n = [e[0]], o = 0, r = t.length; o < r; o += 1) n.push(t[o], e[o + 1]);
|
|
2147
|
+
return n;
|
|
2148
|
+
}
|
|
2149
|
+
var Je = function (e) {
|
|
2150
|
+
return Object.assign(e, {
|
|
2151
|
+
isCss: !0
|
|
2152
|
+
});
|
|
2153
|
+
};
|
|
2154
|
+
function Xe(t) {
|
|
2155
|
+
for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];
|
|
2156
|
+
if (K(t) || ne(t)) {
|
|
2157
|
+
var r = t;
|
|
2158
|
+
return Je(Fe(Ue(b, __spreadArray([r], n, !0))));
|
|
2159
|
+
}
|
|
2160
|
+
var s = t;
|
|
2161
|
+
return 0 === n.length && 1 === s.length && "string" == typeof s[0] ? Fe(s) : Je(Fe(Ue(s, n)));
|
|
2162
|
+
}
|
|
2163
|
+
function Ze(n, o, r) {
|
|
2164
|
+
if (void 0 === r && (r = E), !o) throw ae(1, o);
|
|
2165
|
+
var s = function (t) {
|
|
2166
|
+
for (var s = [], i = 1; i < arguments.length; i++) s[i - 1] = arguments[i];
|
|
2167
|
+
return n(o, r, Xe.apply(void 0, __spreadArray([t], s, !1)));
|
|
2168
|
+
};
|
|
2169
|
+
return s.attrs = function (e) {
|
|
2170
|
+
return Ze(n, o, __assign(__assign({}, r), {
|
|
2171
|
+
attrs: Array.prototype.concat(r.attrs, e).filter(Boolean)
|
|
2172
|
+
}));
|
|
2173
|
+
}, s.withConfig = function (e) {
|
|
2174
|
+
return Ze(n, o, __assign(__assign({}, r), e));
|
|
2175
|
+
}, s;
|
|
2176
|
+
}
|
|
2177
|
+
var Ke = function (e) {
|
|
2178
|
+
return Ze(He, e);
|
|
2179
|
+
},
|
|
2180
|
+
Qe = Ke;
|
|
2181
|
+
P.forEach(function (e) {
|
|
2182
|
+
Qe[e] = Ke(e);
|
|
2183
|
+
});
|
|
2184
|
+
function nt(t) {
|
|
2185
|
+
for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];
|
|
2186
|
+
"production" !== process.env.NODE_ENV && "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");
|
|
2187
|
+
var r = te(Xe.apply(void 0, __spreadArray([t], n, !1))),
|
|
2188
|
+
s = x(r);
|
|
2189
|
+
return new Te(s, r);
|
|
2190
|
+
}
|
|
2191
|
+
"production" !== process.env.NODE_ENV && "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"), "production" !== process.env.NODE_ENV && process;
|
|
2192
|
+
|
|
2193
|
+
/*
|
|
2194
|
+
object-assign
|
|
2195
|
+
(c) Sindre Sorhus
|
|
2196
|
+
@license MIT
|
|
2197
|
+
*/
|
|
2198
|
+
/* eslint-disable no-unused-vars */
|
|
2199
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
2200
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2201
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
2202
|
+
function toObject(val) {
|
|
2203
|
+
if (val === null || val === undefined) {
|
|
2204
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
2205
|
+
}
|
|
2206
|
+
return Object(val);
|
|
2207
|
+
}
|
|
2208
|
+
function shouldUseNative() {
|
|
2209
|
+
try {
|
|
2210
|
+
if (!Object.assign) {
|
|
2211
|
+
return false;
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
2215
|
+
|
|
2216
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
2217
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
2218
|
+
test1[5] = 'de';
|
|
2219
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
2220
|
+
return false;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
2224
|
+
var test2 = {};
|
|
2225
|
+
for (var i = 0; i < 10; i++) {
|
|
2226
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
2227
|
+
}
|
|
2228
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
2229
|
+
return test2[n];
|
|
2230
|
+
});
|
|
2231
|
+
if (order2.join('') !== '0123456789') {
|
|
2232
|
+
return false;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
2236
|
+
var test3 = {};
|
|
2237
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
2238
|
+
test3[letter] = letter;
|
|
2239
|
+
});
|
|
2240
|
+
if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
|
|
2241
|
+
return false;
|
|
2242
|
+
}
|
|
2243
|
+
return true;
|
|
2244
|
+
} catch (err) {
|
|
2245
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
2246
|
+
return false;
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
2250
|
+
var from;
|
|
2251
|
+
var to = toObject(target);
|
|
2252
|
+
var symbols;
|
|
2253
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
2254
|
+
from = Object(arguments[s]);
|
|
2255
|
+
for (var key in from) {
|
|
2256
|
+
if (hasOwnProperty.call(from, key)) {
|
|
2257
|
+
to[key] = from[key];
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
if (getOwnPropertySymbols) {
|
|
2261
|
+
symbols = getOwnPropertySymbols(from);
|
|
2262
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
2263
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
2264
|
+
to[symbols[i]] = from[symbols[i]];
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
return to;
|
|
2270
|
+
};
|
|
2271
|
+
var assign = /*@__PURE__*/getDefaultExportFromCjs(objectAssign);
|
|
2272
|
+
|
|
2273
|
+
var merge = function merge(a, b) {
|
|
2274
|
+
var result = assign({}, a, b);
|
|
2275
|
+
for (var key in a) {
|
|
2276
|
+
var _assign;
|
|
2277
|
+
if (!a[key] || typeof b[key] !== 'object') continue;
|
|
2278
|
+
assign(result, (_assign = {}, _assign[key] = assign(a[key], b[key]), _assign));
|
|
2279
|
+
}
|
|
2280
|
+
return result;
|
|
2281
|
+
}; // sort object-value responsive styles
|
|
2282
|
+
|
|
2283
|
+
var sort = function sort(obj) {
|
|
2284
|
+
var next = {};
|
|
2285
|
+
Object.keys(obj).sort(function (a, b) {
|
|
2286
|
+
return a.localeCompare(b, undefined, {
|
|
2287
|
+
numeric: true,
|
|
2288
|
+
sensitivity: 'base'
|
|
2289
|
+
});
|
|
2290
|
+
}).forEach(function (key) {
|
|
2291
|
+
next[key] = obj[key];
|
|
2292
|
+
});
|
|
2293
|
+
return next;
|
|
2294
|
+
};
|
|
2295
|
+
var defaults$4 = {
|
|
2296
|
+
breakpoints: [40, 52, 64].map(function (n) {
|
|
2297
|
+
return n + 'em';
|
|
2298
|
+
})
|
|
2299
|
+
};
|
|
2300
|
+
var createMediaQuery = function createMediaQuery(n) {
|
|
2301
|
+
return "@media screen and (min-width: " + n + ")";
|
|
2302
|
+
};
|
|
2303
|
+
var getValue = function getValue(n, scale) {
|
|
2304
|
+
return get$1(scale, n, n);
|
|
2305
|
+
};
|
|
2306
|
+
var get$1 = function get(obj, key, def, p, undef) {
|
|
2307
|
+
key = key && key.split ? key.split('.') : [key];
|
|
2308
|
+
for (p = 0; p < key.length; p++) {
|
|
2309
|
+
obj = obj ? obj[key[p]] : undef;
|
|
2310
|
+
}
|
|
2311
|
+
return obj === undef ? def : obj;
|
|
2312
|
+
};
|
|
2313
|
+
var createParser = function createParser(config) {
|
|
2314
|
+
var cache = {};
|
|
2315
|
+
var parse = function parse(props) {
|
|
2316
|
+
var styles = {};
|
|
2317
|
+
var shouldSort = false;
|
|
2318
|
+
var isCacheDisabled = props.theme && props.theme.disableStyledSystemCache;
|
|
2319
|
+
for (var key in props) {
|
|
2320
|
+
if (!config[key]) continue;
|
|
2321
|
+
var sx = config[key];
|
|
2322
|
+
var raw = props[key];
|
|
2323
|
+
var scale = get$1(props.theme, sx.scale, sx.defaults);
|
|
2324
|
+
if (typeof raw === 'object') {
|
|
2325
|
+
cache.breakpoints = !isCacheDisabled && cache.breakpoints || get$1(props.theme, 'breakpoints', defaults$4.breakpoints);
|
|
2326
|
+
if (Array.isArray(raw)) {
|
|
2327
|
+
cache.media = !isCacheDisabled && cache.media || [null].concat(cache.breakpoints.map(createMediaQuery));
|
|
2328
|
+
styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));
|
|
2329
|
+
continue;
|
|
2330
|
+
}
|
|
2331
|
+
if (raw !== null) {
|
|
2332
|
+
styles = merge(styles, parseResponsiveObject(cache.breakpoints, sx, scale, raw, props));
|
|
2333
|
+
shouldSort = true;
|
|
2334
|
+
}
|
|
2335
|
+
continue;
|
|
2336
|
+
}
|
|
2337
|
+
assign(styles, sx(raw, scale, props));
|
|
2338
|
+
} // sort object-based responsive styles
|
|
2339
|
+
|
|
2340
|
+
if (shouldSort) {
|
|
2341
|
+
styles = sort(styles);
|
|
2342
|
+
}
|
|
2343
|
+
return styles;
|
|
2344
|
+
};
|
|
2345
|
+
parse.config = config;
|
|
2346
|
+
parse.propNames = Object.keys(config);
|
|
2347
|
+
parse.cache = cache;
|
|
2348
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
2349
|
+
return k !== 'config';
|
|
2350
|
+
});
|
|
2351
|
+
if (keys.length > 1) {
|
|
2352
|
+
keys.forEach(function (key) {
|
|
2353
|
+
var _createParser;
|
|
2354
|
+
parse[key] = createParser((_createParser = {}, _createParser[key] = config[key], _createParser));
|
|
2355
|
+
});
|
|
2356
|
+
}
|
|
2357
|
+
return parse;
|
|
2358
|
+
};
|
|
2359
|
+
var parseResponsiveStyle = function parseResponsiveStyle(mediaQueries, sx, scale, raw, _props) {
|
|
2360
|
+
var styles = {};
|
|
2361
|
+
raw.slice(0, mediaQueries.length).forEach(function (value, i) {
|
|
2362
|
+
var media = mediaQueries[i];
|
|
2363
|
+
var style = sx(value, scale, _props);
|
|
2364
|
+
if (!media) {
|
|
2365
|
+
assign(styles, style);
|
|
2366
|
+
} else {
|
|
2367
|
+
var _assign2;
|
|
2368
|
+
assign(styles, (_assign2 = {}, _assign2[media] = assign({}, styles[media], style), _assign2));
|
|
2369
|
+
}
|
|
2370
|
+
});
|
|
2371
|
+
return styles;
|
|
2372
|
+
};
|
|
2373
|
+
var parseResponsiveObject = function parseResponsiveObject(breakpoints, sx, scale, raw, _props) {
|
|
2374
|
+
var styles = {};
|
|
2375
|
+
for (var key in raw) {
|
|
2376
|
+
var breakpoint = breakpoints[key];
|
|
2377
|
+
var value = raw[key];
|
|
2378
|
+
var style = sx(value, scale, _props);
|
|
2379
|
+
if (!breakpoint) {
|
|
2380
|
+
assign(styles, style);
|
|
2381
|
+
} else {
|
|
2382
|
+
var _assign3;
|
|
2383
|
+
var media = createMediaQuery(breakpoint);
|
|
2384
|
+
assign(styles, (_assign3 = {}, _assign3[media] = assign({}, styles[media], style), _assign3));
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
return styles;
|
|
2388
|
+
};
|
|
2389
|
+
var createStyleFunction = function createStyleFunction(_ref) {
|
|
2390
|
+
var properties = _ref.properties,
|
|
2391
|
+
property = _ref.property,
|
|
2392
|
+
scale = _ref.scale,
|
|
2393
|
+
_ref$transform = _ref.transform,
|
|
2394
|
+
transform = _ref$transform === void 0 ? getValue : _ref$transform,
|
|
2395
|
+
defaultScale = _ref.defaultScale;
|
|
2396
|
+
properties = properties || [property];
|
|
2397
|
+
var sx = function sx(value, scale, _props) {
|
|
2398
|
+
var result = {};
|
|
2399
|
+
var n = transform(value, scale, _props);
|
|
2400
|
+
if (n === null) return;
|
|
2401
|
+
properties.forEach(function (prop) {
|
|
2402
|
+
result[prop] = n;
|
|
2403
|
+
});
|
|
2404
|
+
return result;
|
|
2405
|
+
};
|
|
2406
|
+
sx.scale = scale;
|
|
2407
|
+
sx.defaults = defaultScale;
|
|
2408
|
+
return sx;
|
|
2409
|
+
}; // new v5 API
|
|
2410
|
+
|
|
2411
|
+
var system = function system(args) {
|
|
2412
|
+
if (args === void 0) {
|
|
2413
|
+
args = {};
|
|
2414
|
+
}
|
|
2415
|
+
var config = {};
|
|
2416
|
+
Object.keys(args).forEach(function (key) {
|
|
2417
|
+
var conf = args[key];
|
|
2418
|
+
if (conf === true) {
|
|
2419
|
+
// shortcut definition
|
|
2420
|
+
config[key] = createStyleFunction({
|
|
2421
|
+
property: key,
|
|
2422
|
+
scale: key
|
|
2423
|
+
});
|
|
2424
|
+
return;
|
|
2425
|
+
}
|
|
2426
|
+
if (typeof conf === 'function') {
|
|
2427
|
+
config[key] = conf;
|
|
2428
|
+
return;
|
|
2429
|
+
}
|
|
2430
|
+
config[key] = createStyleFunction(conf);
|
|
2431
|
+
});
|
|
2432
|
+
var parser = createParser(config);
|
|
2433
|
+
return parser;
|
|
2434
|
+
};
|
|
2435
|
+
var compose = function compose() {
|
|
2436
|
+
var config = {};
|
|
2437
|
+
for (var _len = arguments.length, parsers = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2438
|
+
parsers[_key] = arguments[_key];
|
|
2439
|
+
}
|
|
2440
|
+
parsers.forEach(function (parser) {
|
|
2441
|
+
if (!parser || !parser.config) return;
|
|
2442
|
+
assign(config, parser.config);
|
|
2443
|
+
});
|
|
2444
|
+
var parser = createParser(config);
|
|
2445
|
+
return parser;
|
|
2446
|
+
};
|
|
2447
|
+
|
|
2448
|
+
var isNumber$1 = function isNumber(n) {
|
|
2449
|
+
return typeof n === 'number' && !isNaN(n);
|
|
2450
|
+
};
|
|
2451
|
+
var getWidth = function getWidth(n, scale) {
|
|
2452
|
+
return get$1(scale, n, !isNumber$1(n) || n > 1 ? n : n * 100 + '%');
|
|
2453
|
+
};
|
|
2454
|
+
var config$7 = {
|
|
2455
|
+
width: {
|
|
2456
|
+
property: 'width',
|
|
2457
|
+
scale: 'sizes',
|
|
2458
|
+
transform: getWidth
|
|
2459
|
+
},
|
|
2460
|
+
height: {
|
|
2461
|
+
property: 'height',
|
|
2462
|
+
scale: 'sizes'
|
|
2463
|
+
},
|
|
2464
|
+
minWidth: {
|
|
2465
|
+
property: 'minWidth',
|
|
2466
|
+
scale: 'sizes'
|
|
2467
|
+
},
|
|
2468
|
+
minHeight: {
|
|
2469
|
+
property: 'minHeight',
|
|
2470
|
+
scale: 'sizes'
|
|
2471
|
+
},
|
|
2472
|
+
maxWidth: {
|
|
2473
|
+
property: 'maxWidth',
|
|
2474
|
+
scale: 'sizes'
|
|
2475
|
+
},
|
|
2476
|
+
maxHeight: {
|
|
2477
|
+
property: 'maxHeight',
|
|
2478
|
+
scale: 'sizes'
|
|
2479
|
+
},
|
|
2480
|
+
size: {
|
|
2481
|
+
properties: ['width', 'height'],
|
|
2482
|
+
scale: 'sizes'
|
|
2483
|
+
},
|
|
2484
|
+
overflow: true,
|
|
2485
|
+
overflowX: true,
|
|
2486
|
+
overflowY: true,
|
|
2487
|
+
display: true,
|
|
2488
|
+
verticalAlign: true
|
|
2489
|
+
};
|
|
2490
|
+
var layout = system(config$7);
|
|
2491
|
+
|
|
2492
|
+
var config$6 = {
|
|
2493
|
+
color: {
|
|
2494
|
+
property: 'color',
|
|
2495
|
+
scale: 'colors'
|
|
2496
|
+
},
|
|
2497
|
+
backgroundColor: {
|
|
2498
|
+
property: 'backgroundColor',
|
|
2499
|
+
scale: 'colors'
|
|
2500
|
+
},
|
|
2501
|
+
opacity: true
|
|
2502
|
+
};
|
|
2503
|
+
config$6.bg = config$6.backgroundColor;
|
|
2504
|
+
var color = system(config$6);
|
|
2505
|
+
|
|
2506
|
+
var defaults$3 = {
|
|
2507
|
+
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
|
|
2508
|
+
};
|
|
2509
|
+
var config$5 = {
|
|
2510
|
+
fontFamily: {
|
|
2511
|
+
property: 'fontFamily',
|
|
2512
|
+
scale: 'fonts'
|
|
2513
|
+
},
|
|
2514
|
+
fontSize: {
|
|
2515
|
+
property: 'fontSize',
|
|
2516
|
+
scale: 'fontSizes',
|
|
2517
|
+
defaultScale: defaults$3.fontSizes
|
|
2518
|
+
},
|
|
2519
|
+
fontWeight: {
|
|
2520
|
+
property: 'fontWeight',
|
|
2521
|
+
scale: 'fontWeights'
|
|
2522
|
+
},
|
|
2523
|
+
lineHeight: {
|
|
2524
|
+
property: 'lineHeight',
|
|
2525
|
+
scale: 'lineHeights'
|
|
2526
|
+
},
|
|
2527
|
+
letterSpacing: {
|
|
2528
|
+
property: 'letterSpacing',
|
|
2529
|
+
scale: 'letterSpacings'
|
|
2530
|
+
},
|
|
2531
|
+
textAlign: true,
|
|
2532
|
+
fontStyle: true
|
|
2533
|
+
};
|
|
2534
|
+
var typography = system(config$5);
|
|
2535
|
+
|
|
2536
|
+
var config$4 = {
|
|
2537
|
+
alignItems: true,
|
|
2538
|
+
alignContent: true,
|
|
2539
|
+
justifyItems: true,
|
|
2540
|
+
justifyContent: true,
|
|
2541
|
+
flexWrap: true,
|
|
2542
|
+
flexDirection: true,
|
|
2543
|
+
// item
|
|
2544
|
+
flex: true,
|
|
2545
|
+
flexGrow: true,
|
|
2546
|
+
flexShrink: true,
|
|
2547
|
+
flexBasis: true,
|
|
2548
|
+
justifySelf: true,
|
|
2549
|
+
alignSelf: true,
|
|
2550
|
+
order: true
|
|
2551
|
+
};
|
|
2552
|
+
var flexbox = system(config$4);
|
|
2553
|
+
|
|
2554
|
+
var defaults$2 = {
|
|
2555
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
|
|
2556
|
+
};
|
|
2557
|
+
var config$3 = {
|
|
2558
|
+
gridGap: {
|
|
2559
|
+
property: 'gridGap',
|
|
2560
|
+
scale: 'space',
|
|
2561
|
+
defaultScale: defaults$2.space
|
|
2562
|
+
},
|
|
2563
|
+
gridColumnGap: {
|
|
2564
|
+
property: 'gridColumnGap',
|
|
2565
|
+
scale: 'space',
|
|
2566
|
+
defaultScale: defaults$2.space
|
|
2567
|
+
},
|
|
2568
|
+
gridRowGap: {
|
|
2569
|
+
property: 'gridRowGap',
|
|
2570
|
+
scale: 'space',
|
|
2571
|
+
defaultScale: defaults$2.space
|
|
2572
|
+
},
|
|
2573
|
+
gridColumn: true,
|
|
2574
|
+
gridRow: true,
|
|
2575
|
+
gridAutoFlow: true,
|
|
2576
|
+
gridAutoColumns: true,
|
|
2577
|
+
gridAutoRows: true,
|
|
2578
|
+
gridTemplateColumns: true,
|
|
2579
|
+
gridTemplateRows: true,
|
|
2580
|
+
gridTemplateAreas: true,
|
|
2581
|
+
gridArea: true
|
|
2582
|
+
};
|
|
2583
|
+
var grid = system(config$3);
|
|
2584
|
+
|
|
2585
|
+
var config$2 = {
|
|
2586
|
+
border: {
|
|
2587
|
+
property: 'border',
|
|
2588
|
+
scale: 'borders'
|
|
2589
|
+
},
|
|
2590
|
+
borderWidth: {
|
|
2591
|
+
property: 'borderWidth',
|
|
2592
|
+
scale: 'borderWidths'
|
|
2593
|
+
},
|
|
2594
|
+
borderStyle: {
|
|
2595
|
+
property: 'borderStyle',
|
|
2596
|
+
scale: 'borderStyles'
|
|
2597
|
+
},
|
|
2598
|
+
borderColor: {
|
|
2599
|
+
property: 'borderColor',
|
|
2600
|
+
scale: 'colors'
|
|
2601
|
+
},
|
|
2602
|
+
borderRadius: {
|
|
2603
|
+
property: 'borderRadius',
|
|
2604
|
+
scale: 'radii'
|
|
2605
|
+
},
|
|
2606
|
+
borderTop: {
|
|
2607
|
+
property: 'borderTop',
|
|
2608
|
+
scale: 'borders'
|
|
2609
|
+
},
|
|
2610
|
+
borderTopLeftRadius: {
|
|
2611
|
+
property: 'borderTopLeftRadius',
|
|
2612
|
+
scale: 'radii'
|
|
2613
|
+
},
|
|
2614
|
+
borderTopRightRadius: {
|
|
2615
|
+
property: 'borderTopRightRadius',
|
|
2616
|
+
scale: 'radii'
|
|
2617
|
+
},
|
|
2618
|
+
borderRight: {
|
|
2619
|
+
property: 'borderRight',
|
|
2620
|
+
scale: 'borders'
|
|
2621
|
+
},
|
|
2622
|
+
borderBottom: {
|
|
2623
|
+
property: 'borderBottom',
|
|
2624
|
+
scale: 'borders'
|
|
2625
|
+
},
|
|
2626
|
+
borderBottomLeftRadius: {
|
|
2627
|
+
property: 'borderBottomLeftRadius',
|
|
2628
|
+
scale: 'radii'
|
|
2629
|
+
},
|
|
2630
|
+
borderBottomRightRadius: {
|
|
2631
|
+
property: 'borderBottomRightRadius',
|
|
2632
|
+
scale: 'radii'
|
|
2633
|
+
},
|
|
2634
|
+
borderLeft: {
|
|
2635
|
+
property: 'borderLeft',
|
|
2636
|
+
scale: 'borders'
|
|
2637
|
+
},
|
|
2638
|
+
borderX: {
|
|
2639
|
+
properties: ['borderLeft', 'borderRight'],
|
|
2640
|
+
scale: 'borders'
|
|
2641
|
+
},
|
|
2642
|
+
borderY: {
|
|
2643
|
+
properties: ['borderTop', 'borderBottom'],
|
|
2644
|
+
scale: 'borders'
|
|
2645
|
+
}
|
|
2646
|
+
};
|
|
2647
|
+
config$2.borderTopWidth = {
|
|
2648
|
+
property: 'borderTopWidth',
|
|
2649
|
+
scale: 'borderWidths'
|
|
2650
|
+
};
|
|
2651
|
+
config$2.borderTopColor = {
|
|
2652
|
+
property: 'borderTopColor',
|
|
2653
|
+
scale: 'colors'
|
|
2654
|
+
};
|
|
2655
|
+
config$2.borderTopStyle = {
|
|
2656
|
+
property: 'borderTopStyle',
|
|
2657
|
+
scale: 'borderStyles'
|
|
2658
|
+
};
|
|
2659
|
+
config$2.borderTopLeftRadius = {
|
|
2660
|
+
property: 'borderTopLeftRadius',
|
|
2661
|
+
scale: 'radii'
|
|
2662
|
+
};
|
|
2663
|
+
config$2.borderTopRightRadius = {
|
|
2664
|
+
property: 'borderTopRightRadius',
|
|
2665
|
+
scale: 'radii'
|
|
2666
|
+
};
|
|
2667
|
+
config$2.borderBottomWidth = {
|
|
2668
|
+
property: 'borderBottomWidth',
|
|
2669
|
+
scale: 'borderWidths'
|
|
2670
|
+
};
|
|
2671
|
+
config$2.borderBottomColor = {
|
|
2672
|
+
property: 'borderBottomColor',
|
|
2673
|
+
scale: 'colors'
|
|
2674
|
+
};
|
|
2675
|
+
config$2.borderBottomStyle = {
|
|
2676
|
+
property: 'borderBottomStyle',
|
|
2677
|
+
scale: 'borderStyles'
|
|
2678
|
+
};
|
|
2679
|
+
config$2.borderBottomLeftRadius = {
|
|
2680
|
+
property: 'borderBottomLeftRadius',
|
|
2681
|
+
scale: 'radii'
|
|
2682
|
+
};
|
|
2683
|
+
config$2.borderBottomRightRadius = {
|
|
2684
|
+
property: 'borderBottomRightRadius',
|
|
2685
|
+
scale: 'radii'
|
|
2686
|
+
};
|
|
2687
|
+
config$2.borderLeftWidth = {
|
|
2688
|
+
property: 'borderLeftWidth',
|
|
2689
|
+
scale: 'borderWidths'
|
|
2690
|
+
};
|
|
2691
|
+
config$2.borderLeftColor = {
|
|
2692
|
+
property: 'borderLeftColor',
|
|
2693
|
+
scale: 'colors'
|
|
2694
|
+
};
|
|
2695
|
+
config$2.borderLeftStyle = {
|
|
2696
|
+
property: 'borderLeftStyle',
|
|
2697
|
+
scale: 'borderStyles'
|
|
2698
|
+
};
|
|
2699
|
+
config$2.borderRightWidth = {
|
|
2700
|
+
property: 'borderRightWidth',
|
|
2701
|
+
scale: 'borderWidths'
|
|
2702
|
+
};
|
|
2703
|
+
config$2.borderRightColor = {
|
|
2704
|
+
property: 'borderRightColor',
|
|
2705
|
+
scale: 'colors'
|
|
2706
|
+
};
|
|
2707
|
+
config$2.borderRightStyle = {
|
|
2708
|
+
property: 'borderRightStyle',
|
|
2709
|
+
scale: 'borderStyles'
|
|
2710
|
+
};
|
|
2711
|
+
var border = system(config$2);
|
|
2712
|
+
|
|
2713
|
+
var config$1 = {
|
|
2714
|
+
background: true,
|
|
2715
|
+
backgroundImage: true,
|
|
2716
|
+
backgroundSize: true,
|
|
2717
|
+
backgroundPosition: true,
|
|
2718
|
+
backgroundRepeat: true
|
|
2719
|
+
};
|
|
2720
|
+
config$1.bgImage = config$1.backgroundImage;
|
|
2721
|
+
config$1.bgSize = config$1.backgroundSize;
|
|
2722
|
+
config$1.bgPosition = config$1.backgroundPosition;
|
|
2723
|
+
config$1.bgRepeat = config$1.backgroundRepeat;
|
|
2724
|
+
var background = system(config$1);
|
|
2725
|
+
|
|
2726
|
+
var defaults$1 = {
|
|
2727
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
|
|
2728
|
+
};
|
|
2729
|
+
var config = {
|
|
2730
|
+
position: true,
|
|
2731
|
+
zIndex: {
|
|
2732
|
+
property: 'zIndex',
|
|
2733
|
+
scale: 'zIndices'
|
|
2734
|
+
},
|
|
2735
|
+
top: {
|
|
2736
|
+
property: 'top',
|
|
2737
|
+
scale: 'space',
|
|
2738
|
+
defaultScale: defaults$1.space
|
|
2739
|
+
},
|
|
2740
|
+
right: {
|
|
2741
|
+
property: 'right',
|
|
2742
|
+
scale: 'space',
|
|
2743
|
+
defaultScale: defaults$1.space
|
|
2744
|
+
},
|
|
2745
|
+
bottom: {
|
|
2746
|
+
property: 'bottom',
|
|
2747
|
+
scale: 'space',
|
|
2748
|
+
defaultScale: defaults$1.space
|
|
2749
|
+
},
|
|
2750
|
+
left: {
|
|
2751
|
+
property: 'left',
|
|
2752
|
+
scale: 'space',
|
|
2753
|
+
defaultScale: defaults$1.space
|
|
2754
|
+
}
|
|
2755
|
+
};
|
|
2756
|
+
var position = system(config);
|
|
2757
|
+
|
|
2758
|
+
var defaults = {
|
|
2759
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
|
|
2760
|
+
};
|
|
2761
|
+
var isNumber = function isNumber(n) {
|
|
2762
|
+
return typeof n === 'number' && !isNaN(n);
|
|
2763
|
+
};
|
|
2764
|
+
var getMargin = function getMargin(n, scale) {
|
|
2765
|
+
if (!isNumber(n)) {
|
|
2766
|
+
return get$1(scale, n, n);
|
|
2767
|
+
}
|
|
2768
|
+
var isNegative = n < 0;
|
|
2769
|
+
var absolute = Math.abs(n);
|
|
2770
|
+
var value = get$1(scale, absolute, absolute);
|
|
2771
|
+
if (!isNumber(value)) {
|
|
2772
|
+
return isNegative ? '-' + value : value;
|
|
2773
|
+
}
|
|
2774
|
+
return value * (isNegative ? -1 : 1);
|
|
2775
|
+
};
|
|
2776
|
+
var configs = {};
|
|
2777
|
+
configs.margin = {
|
|
2778
|
+
margin: {
|
|
2779
|
+
property: 'margin',
|
|
2780
|
+
scale: 'space',
|
|
2781
|
+
transform: getMargin,
|
|
2782
|
+
defaultScale: defaults.space
|
|
2783
|
+
},
|
|
2784
|
+
marginTop: {
|
|
2785
|
+
property: 'marginTop',
|
|
2786
|
+
scale: 'space',
|
|
2787
|
+
transform: getMargin,
|
|
2788
|
+
defaultScale: defaults.space
|
|
2789
|
+
},
|
|
2790
|
+
marginRight: {
|
|
2791
|
+
property: 'marginRight',
|
|
2792
|
+
scale: 'space',
|
|
2793
|
+
transform: getMargin,
|
|
2794
|
+
defaultScale: defaults.space
|
|
2795
|
+
},
|
|
2796
|
+
marginBottom: {
|
|
2797
|
+
property: 'marginBottom',
|
|
2798
|
+
scale: 'space',
|
|
2799
|
+
transform: getMargin,
|
|
2800
|
+
defaultScale: defaults.space
|
|
2801
|
+
},
|
|
2802
|
+
marginLeft: {
|
|
2803
|
+
property: 'marginLeft',
|
|
2804
|
+
scale: 'space',
|
|
2805
|
+
transform: getMargin,
|
|
2806
|
+
defaultScale: defaults.space
|
|
2807
|
+
},
|
|
2808
|
+
marginX: {
|
|
2809
|
+
properties: ['marginLeft', 'marginRight'],
|
|
2810
|
+
scale: 'space',
|
|
2811
|
+
transform: getMargin,
|
|
2812
|
+
defaultScale: defaults.space
|
|
2813
|
+
},
|
|
2814
|
+
marginY: {
|
|
2815
|
+
properties: ['marginTop', 'marginBottom'],
|
|
2816
|
+
scale: 'space',
|
|
2817
|
+
transform: getMargin,
|
|
2818
|
+
defaultScale: defaults.space
|
|
2819
|
+
}
|
|
2820
|
+
};
|
|
2821
|
+
configs.margin.m = configs.margin.margin;
|
|
2822
|
+
configs.margin.mt = configs.margin.marginTop;
|
|
2823
|
+
configs.margin.mr = configs.margin.marginRight;
|
|
2824
|
+
configs.margin.mb = configs.margin.marginBottom;
|
|
2825
|
+
configs.margin.ml = configs.margin.marginLeft;
|
|
2826
|
+
configs.margin.mx = configs.margin.marginX;
|
|
2827
|
+
configs.margin.my = configs.margin.marginY;
|
|
2828
|
+
configs.padding = {
|
|
2829
|
+
padding: {
|
|
2830
|
+
property: 'padding',
|
|
2831
|
+
scale: 'space',
|
|
2832
|
+
defaultScale: defaults.space
|
|
2833
|
+
},
|
|
2834
|
+
paddingTop: {
|
|
2835
|
+
property: 'paddingTop',
|
|
2836
|
+
scale: 'space',
|
|
2837
|
+
defaultScale: defaults.space
|
|
2838
|
+
},
|
|
2839
|
+
paddingRight: {
|
|
2840
|
+
property: 'paddingRight',
|
|
2841
|
+
scale: 'space',
|
|
2842
|
+
defaultScale: defaults.space
|
|
2843
|
+
},
|
|
2844
|
+
paddingBottom: {
|
|
2845
|
+
property: 'paddingBottom',
|
|
2846
|
+
scale: 'space',
|
|
2847
|
+
defaultScale: defaults.space
|
|
2848
|
+
},
|
|
2849
|
+
paddingLeft: {
|
|
2850
|
+
property: 'paddingLeft',
|
|
2851
|
+
scale: 'space',
|
|
2852
|
+
defaultScale: defaults.space
|
|
2853
|
+
},
|
|
2854
|
+
paddingX: {
|
|
2855
|
+
properties: ['paddingLeft', 'paddingRight'],
|
|
2856
|
+
scale: 'space',
|
|
2857
|
+
defaultScale: defaults.space
|
|
2858
|
+
},
|
|
2859
|
+
paddingY: {
|
|
2860
|
+
properties: ['paddingTop', 'paddingBottom'],
|
|
2861
|
+
scale: 'space',
|
|
2862
|
+
defaultScale: defaults.space
|
|
2863
|
+
}
|
|
2864
|
+
};
|
|
2865
|
+
configs.padding.p = configs.padding.padding;
|
|
2866
|
+
configs.padding.pt = configs.padding.paddingTop;
|
|
2867
|
+
configs.padding.pr = configs.padding.paddingRight;
|
|
2868
|
+
configs.padding.pb = configs.padding.paddingBottom;
|
|
2869
|
+
configs.padding.pl = configs.padding.paddingLeft;
|
|
2870
|
+
configs.padding.px = configs.padding.paddingX;
|
|
2871
|
+
configs.padding.py = configs.padding.paddingY;
|
|
2872
|
+
var margin = system(configs.margin);
|
|
2873
|
+
var padding = system(configs.padding);
|
|
2874
|
+
var space = compose(margin, padding);
|
|
2875
|
+
|
|
2876
|
+
var shadow = system({
|
|
2877
|
+
boxShadow: {
|
|
2878
|
+
property: 'boxShadow',
|
|
2879
|
+
scale: 'shadows'
|
|
2880
|
+
},
|
|
2881
|
+
textShadow: {
|
|
2882
|
+
property: 'textShadow',
|
|
2883
|
+
scale: 'shadows'
|
|
2884
|
+
}
|
|
2885
|
+
});
|
|
2886
|
+
|
|
2887
|
+
function _extends$1() {
|
|
2888
|
+
_extends$1 = Object.assign || function (target) {
|
|
2889
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2890
|
+
var source = arguments[i];
|
|
2891
|
+
for (var key in source) {
|
|
2892
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2893
|
+
target[key] = source[key];
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
return target;
|
|
2898
|
+
};
|
|
2899
|
+
return _extends$1.apply(this, arguments);
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
// based on https://github.com/developit/dlv
|
|
2903
|
+
var get = function get(obj, key, def, p, undef) {
|
|
2904
|
+
key = key && key.split ? key.split('.') : [key];
|
|
2905
|
+
for (p = 0; p < key.length; p++) {
|
|
2906
|
+
obj = obj ? obj[key[p]] : undef;
|
|
2907
|
+
}
|
|
2908
|
+
return obj === undef ? def : obj;
|
|
2909
|
+
};
|
|
2910
|
+
var defaultBreakpoints = [40, 52, 64].map(function (n) {
|
|
2911
|
+
return n + 'em';
|
|
2912
|
+
});
|
|
2913
|
+
var defaultTheme = {
|
|
2914
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
2915
|
+
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
|
|
2916
|
+
};
|
|
2917
|
+
var aliases = {
|
|
2918
|
+
bg: 'backgroundColor',
|
|
2919
|
+
m: 'margin',
|
|
2920
|
+
mt: 'marginTop',
|
|
2921
|
+
mr: 'marginRight',
|
|
2922
|
+
mb: 'marginBottom',
|
|
2923
|
+
ml: 'marginLeft',
|
|
2924
|
+
mx: 'marginX',
|
|
2925
|
+
my: 'marginY',
|
|
2926
|
+
p: 'padding',
|
|
2927
|
+
pt: 'paddingTop',
|
|
2928
|
+
pr: 'paddingRight',
|
|
2929
|
+
pb: 'paddingBottom',
|
|
2930
|
+
pl: 'paddingLeft',
|
|
2931
|
+
px: 'paddingX',
|
|
2932
|
+
py: 'paddingY'
|
|
2933
|
+
};
|
|
2934
|
+
var multiples = {
|
|
2935
|
+
marginX: ['marginLeft', 'marginRight'],
|
|
2936
|
+
marginY: ['marginTop', 'marginBottom'],
|
|
2937
|
+
paddingX: ['paddingLeft', 'paddingRight'],
|
|
2938
|
+
paddingY: ['paddingTop', 'paddingBottom'],
|
|
2939
|
+
size: ['width', 'height']
|
|
2940
|
+
};
|
|
2941
|
+
var scales = {
|
|
2942
|
+
color: 'colors',
|
|
2943
|
+
backgroundColor: 'colors',
|
|
2944
|
+
borderColor: 'colors',
|
|
2945
|
+
margin: 'space',
|
|
2946
|
+
marginTop: 'space',
|
|
2947
|
+
marginRight: 'space',
|
|
2948
|
+
marginBottom: 'space',
|
|
2949
|
+
marginLeft: 'space',
|
|
2950
|
+
marginX: 'space',
|
|
2951
|
+
marginY: 'space',
|
|
2952
|
+
padding: 'space',
|
|
2953
|
+
paddingTop: 'space',
|
|
2954
|
+
paddingRight: 'space',
|
|
2955
|
+
paddingBottom: 'space',
|
|
2956
|
+
paddingLeft: 'space',
|
|
2957
|
+
paddingX: 'space',
|
|
2958
|
+
paddingY: 'space',
|
|
2959
|
+
top: 'space',
|
|
2960
|
+
right: 'space',
|
|
2961
|
+
bottom: 'space',
|
|
2962
|
+
left: 'space',
|
|
2963
|
+
gridGap: 'space',
|
|
2964
|
+
gridColumnGap: 'space',
|
|
2965
|
+
gridRowGap: 'space',
|
|
2966
|
+
gap: 'space',
|
|
2967
|
+
columnGap: 'space',
|
|
2968
|
+
rowGap: 'space',
|
|
2969
|
+
fontFamily: 'fonts',
|
|
2970
|
+
fontSize: 'fontSizes',
|
|
2971
|
+
fontWeight: 'fontWeights',
|
|
2972
|
+
lineHeight: 'lineHeights',
|
|
2973
|
+
letterSpacing: 'letterSpacings',
|
|
2974
|
+
border: 'borders',
|
|
2975
|
+
borderTop: 'borders',
|
|
2976
|
+
borderRight: 'borders',
|
|
2977
|
+
borderBottom: 'borders',
|
|
2978
|
+
borderLeft: 'borders',
|
|
2979
|
+
borderWidth: 'borderWidths',
|
|
2980
|
+
borderStyle: 'borderStyles',
|
|
2981
|
+
borderRadius: 'radii',
|
|
2982
|
+
borderTopRightRadius: 'radii',
|
|
2983
|
+
borderTopLeftRadius: 'radii',
|
|
2984
|
+
borderBottomRightRadius: 'radii',
|
|
2985
|
+
borderBottomLeftRadius: 'radii',
|
|
2986
|
+
borderTopWidth: 'borderWidths',
|
|
2987
|
+
borderTopColor: 'colors',
|
|
2988
|
+
borderTopStyle: 'borderStyles',
|
|
2989
|
+
borderBottomWidth: 'borderWidths',
|
|
2990
|
+
borderBottomColor: 'colors',
|
|
2991
|
+
borderBottomStyle: 'borderStyles',
|
|
2992
|
+
borderLeftWidth: 'borderWidths',
|
|
2993
|
+
borderLeftColor: 'colors',
|
|
2994
|
+
borderLeftStyle: 'borderStyles',
|
|
2995
|
+
borderRightWidth: 'borderWidths',
|
|
2996
|
+
borderRightColor: 'colors',
|
|
2997
|
+
borderRightStyle: 'borderStyles',
|
|
2998
|
+
outlineColor: 'colors',
|
|
2999
|
+
boxShadow: 'shadows',
|
|
3000
|
+
textShadow: 'shadows',
|
|
3001
|
+
zIndex: 'zIndices',
|
|
3002
|
+
width: 'sizes',
|
|
3003
|
+
minWidth: 'sizes',
|
|
3004
|
+
maxWidth: 'sizes',
|
|
3005
|
+
height: 'sizes',
|
|
3006
|
+
minHeight: 'sizes',
|
|
3007
|
+
maxHeight: 'sizes',
|
|
3008
|
+
flexBasis: 'sizes',
|
|
3009
|
+
size: 'sizes',
|
|
3010
|
+
// svg
|
|
3011
|
+
fill: 'colors',
|
|
3012
|
+
stroke: 'colors'
|
|
3013
|
+
};
|
|
3014
|
+
var positiveOrNegative = function positiveOrNegative(scale, value) {
|
|
3015
|
+
if (typeof value !== 'number' || value >= 0) {
|
|
3016
|
+
return get(scale, value, value);
|
|
3017
|
+
}
|
|
3018
|
+
var absolute = Math.abs(value);
|
|
3019
|
+
var n = get(scale, absolute, absolute);
|
|
3020
|
+
if (typeof n === 'string') return '-' + n;
|
|
3021
|
+
return n * -1;
|
|
3022
|
+
};
|
|
3023
|
+
var transforms = ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'top', 'bottom', 'left', 'right'].reduce(function (acc, curr) {
|
|
3024
|
+
var _extends2;
|
|
3025
|
+
return _extends$1({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));
|
|
3026
|
+
}, {});
|
|
3027
|
+
var responsive = function responsive(styles) {
|
|
3028
|
+
return function (theme) {
|
|
3029
|
+
var next = {};
|
|
3030
|
+
var breakpoints = get(theme, 'breakpoints', defaultBreakpoints);
|
|
3031
|
+
var mediaQueries = [null].concat(breakpoints.map(function (n) {
|
|
3032
|
+
return "@media screen and (min-width: " + n + ")";
|
|
3033
|
+
}));
|
|
3034
|
+
for (var key in styles) {
|
|
3035
|
+
var value = typeof styles[key] === 'function' ? styles[key](theme) : styles[key];
|
|
3036
|
+
if (value == null) continue;
|
|
3037
|
+
if (!Array.isArray(value)) {
|
|
3038
|
+
next[key] = value;
|
|
3039
|
+
continue;
|
|
3040
|
+
}
|
|
3041
|
+
for (var i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
|
|
3042
|
+
var media = mediaQueries[i];
|
|
3043
|
+
if (!media) {
|
|
3044
|
+
next[key] = value[i];
|
|
3045
|
+
continue;
|
|
3046
|
+
}
|
|
3047
|
+
next[media] = next[media] || {};
|
|
3048
|
+
if (value[i] == null) continue;
|
|
3049
|
+
next[media][key] = value[i];
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
return next;
|
|
3053
|
+
};
|
|
3054
|
+
};
|
|
3055
|
+
var css = function css(args) {
|
|
3056
|
+
return function (props) {
|
|
3057
|
+
if (props === void 0) {
|
|
3058
|
+
props = {};
|
|
3059
|
+
}
|
|
3060
|
+
var theme = _extends$1({}, defaultTheme, {}, props.theme || props);
|
|
3061
|
+
var result = {};
|
|
3062
|
+
var obj = typeof args === 'function' ? args(theme) : args;
|
|
3063
|
+
var styles = responsive(obj)(theme);
|
|
3064
|
+
for (var key in styles) {
|
|
3065
|
+
var x = styles[key];
|
|
3066
|
+
var val = typeof x === 'function' ? x(theme) : x;
|
|
3067
|
+
if (key === 'variant') {
|
|
3068
|
+
var variant = css(get(theme, val))(theme);
|
|
3069
|
+
result = _extends$1({}, result, {}, variant);
|
|
3070
|
+
continue;
|
|
3071
|
+
}
|
|
3072
|
+
if (val && typeof val === 'object') {
|
|
3073
|
+
result[key] = css(val)(theme);
|
|
3074
|
+
continue;
|
|
3075
|
+
}
|
|
3076
|
+
var prop = get(aliases, key, key);
|
|
3077
|
+
var scaleName = get(scales, prop);
|
|
3078
|
+
var scale = get(theme, scaleName, get(theme, prop, {}));
|
|
3079
|
+
var transform = get(transforms, prop, get);
|
|
3080
|
+
var value = transform(scale, val, val);
|
|
3081
|
+
if (multiples[prop]) {
|
|
3082
|
+
var dirs = multiples[prop];
|
|
3083
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
3084
|
+
result[dirs[i]] = value;
|
|
3085
|
+
}
|
|
3086
|
+
} else {
|
|
3087
|
+
result[prop] = value;
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
return result;
|
|
3091
|
+
};
|
|
3092
|
+
};
|
|
3093
|
+
var css$1 = css;
|
|
3094
|
+
|
|
3095
|
+
var variant = function variant(_ref) {
|
|
3096
|
+
var _config;
|
|
3097
|
+
var scale = _ref.scale,
|
|
3098
|
+
_ref$prop = _ref.prop,
|
|
3099
|
+
prop = _ref$prop === void 0 ? 'variant' : _ref$prop,
|
|
3100
|
+
_ref$variants = _ref.variants,
|
|
3101
|
+
variants = _ref$variants === void 0 ? {} : _ref$variants,
|
|
3102
|
+
key = _ref.key;
|
|
3103
|
+
var sx;
|
|
3104
|
+
if (Object.keys(variants).length) {
|
|
3105
|
+
sx = function sx(value, scale, props) {
|
|
3106
|
+
return css$1(get$1(scale, value, null))(props.theme);
|
|
3107
|
+
};
|
|
3108
|
+
} else {
|
|
3109
|
+
sx = function sx(value, scale) {
|
|
3110
|
+
return get$1(scale, value, null);
|
|
3111
|
+
};
|
|
3112
|
+
}
|
|
3113
|
+
sx.scale = scale || key;
|
|
3114
|
+
sx.defaults = variants;
|
|
3115
|
+
var config = (_config = {}, _config[prop] = sx, _config);
|
|
3116
|
+
var parser = createParser(config);
|
|
3117
|
+
return parser;
|
|
3118
|
+
};
|
|
3119
|
+
variant({
|
|
3120
|
+
key: 'buttons'
|
|
3121
|
+
});
|
|
3122
|
+
variant({
|
|
3123
|
+
key: 'textStyles',
|
|
3124
|
+
prop: 'textStyle'
|
|
3125
|
+
});
|
|
3126
|
+
variant({
|
|
3127
|
+
key: 'colorStyles',
|
|
3128
|
+
prop: 'colors'
|
|
3129
|
+
});
|
|
3130
|
+
|
|
3131
|
+
layout.width;
|
|
3132
|
+
layout.height;
|
|
3133
|
+
layout.minWidth;
|
|
3134
|
+
layout.minHeight;
|
|
3135
|
+
layout.maxWidth;
|
|
3136
|
+
layout.maxHeight;
|
|
3137
|
+
layout.size;
|
|
3138
|
+
layout.verticalAlign;
|
|
3139
|
+
layout.display;
|
|
3140
|
+
layout.overflow;
|
|
3141
|
+
layout.overflowX;
|
|
3142
|
+
layout.overflowY;
|
|
3143
|
+
color.opacity;
|
|
3144
|
+
var fontSize = typography.fontSize;
|
|
3145
|
+
typography.fontFamily;
|
|
3146
|
+
var fontWeight = typography.fontWeight,
|
|
3147
|
+
lineHeight = typography.lineHeight,
|
|
3148
|
+
textAlign = typography.textAlign;
|
|
3149
|
+
typography.fontStyle;
|
|
3150
|
+
typography.letterSpacing;
|
|
3151
|
+
flexbox.alignItems;
|
|
3152
|
+
flexbox.alignContent;
|
|
3153
|
+
flexbox.justifyItems;
|
|
3154
|
+
flexbox.justifyContent;
|
|
3155
|
+
flexbox.flexWrap;
|
|
3156
|
+
flexbox.flexDirection;
|
|
3157
|
+
flexbox.flex;
|
|
3158
|
+
flexbox.flexGrow;
|
|
3159
|
+
flexbox.flexShrink;
|
|
3160
|
+
flexbox.flexBasis;
|
|
3161
|
+
flexbox.justifySelf;
|
|
3162
|
+
flexbox.alignSelf;
|
|
3163
|
+
flexbox.order;
|
|
3164
|
+
grid.gridGap;
|
|
3165
|
+
grid.gridColumnGap;
|
|
3166
|
+
grid.gridRowGap;
|
|
3167
|
+
grid.gridColumn;
|
|
3168
|
+
grid.gridRow;
|
|
3169
|
+
grid.gridAutoFlow;
|
|
3170
|
+
grid.gridAutoColumns;
|
|
3171
|
+
grid.gridAutoRows;
|
|
3172
|
+
grid.gridTemplateColumns;
|
|
3173
|
+
grid.gridTemplateRows;
|
|
3174
|
+
grid.gridTemplateAreas;
|
|
3175
|
+
grid.gridArea;
|
|
3176
|
+
border.borderWidth;
|
|
3177
|
+
border.borderStyle;
|
|
3178
|
+
border.borderColor;
|
|
3179
|
+
border.borderTop;
|
|
3180
|
+
border.borderRight;
|
|
3181
|
+
border.borderBottom;
|
|
3182
|
+
border.borderLeft;
|
|
3183
|
+
border.borderRadius;
|
|
3184
|
+
background.backgroundImage;
|
|
3185
|
+
background.backgroundSize;
|
|
3186
|
+
background.backgroundPosition;
|
|
3187
|
+
background.backgroundRepeat;
|
|
3188
|
+
position.zIndex;
|
|
3189
|
+
position.top;
|
|
3190
|
+
position.right;
|
|
3191
|
+
position.bottom;
|
|
3192
|
+
position.left;
|
|
3193
|
+
|
|
3194
|
+
// Support CSS custom properties in the `sx` prop
|
|
3195
|
+
|
|
3196
|
+
const sx = props => css$1(props.sx);
|
|
3197
|
+
const textDecoration = system({
|
|
3198
|
+
textDecoration: {
|
|
3199
|
+
property: 'textDecoration',
|
|
3200
|
+
scale: 'textDecoration'
|
|
3201
|
+
}
|
|
3202
|
+
});
|
|
3203
|
+
const whiteSpace = system({
|
|
3204
|
+
whiteSpace: {
|
|
3205
|
+
property: 'whiteSpace',
|
|
3206
|
+
scale: 'whiteSpace'
|
|
3207
|
+
}
|
|
3208
|
+
});
|
|
3209
|
+
const wordBreak = system({
|
|
3210
|
+
wordBreak: {
|
|
3211
|
+
property: 'wordBreak',
|
|
3212
|
+
scale: 'wordBreak'
|
|
3213
|
+
}
|
|
3214
|
+
});
|
|
3215
|
+
|
|
3216
|
+
const Chip = ({
|
|
3217
|
+
children,
|
|
3218
|
+
size = 'm',
|
|
3219
|
+
variant = 'primary',
|
|
3220
|
+
leadingIcon: LeadingIcon,
|
|
3221
|
+
trailingIcon: TrailingIcon,
|
|
3222
|
+
sx
|
|
3223
|
+
}) => /*#__PURE__*/React.createElement(BaseChip, {
|
|
3224
|
+
sx: sx,
|
|
3225
|
+
size: size,
|
|
3226
|
+
variant: variant,
|
|
3227
|
+
leadingIcon: LeadingIcon,
|
|
3228
|
+
trailingIcon: TrailingIcon
|
|
3229
|
+
}, LeadingIcon ? /*#__PURE__*/React.createElement(LeadingIcon, null) : null, children, TrailingIcon ? /*#__PURE__*/React.createElement(TrailingIcon, null) : null);
|
|
3230
|
+
const BaseChip = Qe.span({
|
|
3231
|
+
position: 'relative',
|
|
3232
|
+
width: 'fit-content',
|
|
3233
|
+
borderRadius: radii.full,
|
|
3234
|
+
outline: 'none',
|
|
3235
|
+
display: 'flex',
|
|
3236
|
+
flexDirection: 'row',
|
|
3237
|
+
alignItems: 'center'
|
|
3238
|
+
}, ({
|
|
3239
|
+
leadingIcon,
|
|
3240
|
+
trailingIcon
|
|
3241
|
+
}) => variant({
|
|
3242
|
+
prop: 'size',
|
|
3243
|
+
variants: {
|
|
3244
|
+
l: {
|
|
3245
|
+
'pl': leadingIcon ? 2 : 3,
|
|
3246
|
+
'pr': trailingIcon ? 2 : 3,
|
|
3247
|
+
'py': 1,
|
|
3248
|
+
'fontSize': typography$1['s'].fontSize,
|
|
3249
|
+
'fontWeight': typography$1['s'].fontWeight,
|
|
3250
|
+
'lineHeight': typography$1['s'].lineHeight,
|
|
3251
|
+
'columnGap': 1,
|
|
3252
|
+
'& svg': {
|
|
3253
|
+
width: 16,
|
|
3254
|
+
height: 16
|
|
3255
|
+
}
|
|
3256
|
+
},
|
|
3257
|
+
m: {
|
|
3258
|
+
'pl': leadingIcon ? 2 : 3,
|
|
3259
|
+
'pr': trailingIcon ? 2 : 3,
|
|
3260
|
+
'py': 1,
|
|
3261
|
+
'fontSize': typography$1['xs'].fontSize,
|
|
3262
|
+
'fontWeight': typography$1['xs'].fontWeight,
|
|
3263
|
+
'lineHeight': typography$1['xs'].lineHeight,
|
|
3264
|
+
'columnGap': 0.5,
|
|
3265
|
+
'& svg': {
|
|
3266
|
+
width: 16,
|
|
3267
|
+
height: 16
|
|
3268
|
+
}
|
|
3269
|
+
},
|
|
3270
|
+
s: {
|
|
3271
|
+
'pl': !leadingIcon && trailingIcon ? 3 : 2,
|
|
3272
|
+
'pr': leadingIcon && !trailingIcon ? 3 : 2,
|
|
3273
|
+
'py': 0.5,
|
|
3274
|
+
'fontSize': typography$1['xxs'].fontSize,
|
|
3275
|
+
'fontWeight': typography$1['xxs'].fontWeight,
|
|
3276
|
+
'lineHeight': typography$1['xxs'].lineHeight,
|
|
3277
|
+
'columnGap': 0.5,
|
|
3278
|
+
'& svg': {
|
|
3279
|
+
width: 12,
|
|
3280
|
+
height: 12
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
}), variant({
|
|
3285
|
+
prop: 'variant',
|
|
3286
|
+
variants: {
|
|
3287
|
+
'primary': {
|
|
3288
|
+
'backgroundColor': color$1['bg/primary'],
|
|
3289
|
+
'color': color$1['text/inverse'],
|
|
3290
|
+
'& svg': {
|
|
3291
|
+
color: color$1['icon/inverse']
|
|
3292
|
+
}
|
|
3293
|
+
},
|
|
3294
|
+
'secondary': {
|
|
3295
|
+
'backgroundColor': color$1['bg/secondary'],
|
|
3296
|
+
'color': color$1['text/primary'],
|
|
3297
|
+
'& svg': {
|
|
3298
|
+
color: color$1['icon/primary']
|
|
3299
|
+
}
|
|
3300
|
+
},
|
|
3301
|
+
'outlined-primary': {
|
|
3302
|
+
'backgroundColor': color$1['bg/neutral/subtler'],
|
|
3303
|
+
'color': color$1['text/primary'],
|
|
3304
|
+
'& svg': {
|
|
3305
|
+
color: color$1['icon/primary']
|
|
3306
|
+
},
|
|
3307
|
+
':after': {
|
|
3308
|
+
content: '""',
|
|
3309
|
+
position: 'absolute',
|
|
3310
|
+
top: 0,
|
|
3311
|
+
right: 0,
|
|
3312
|
+
bottom: 0,
|
|
3313
|
+
left: 0,
|
|
3314
|
+
borderWidth: 1,
|
|
3315
|
+
borderStyle: 'solid',
|
|
3316
|
+
borderColor: color$1['border/primary'],
|
|
3317
|
+
borderRadius: radii.full,
|
|
3318
|
+
boxSizing: 'border-box'
|
|
3319
|
+
}
|
|
3320
|
+
},
|
|
3321
|
+
'outlined-neutral': {
|
|
3322
|
+
'backgroundColor': color$1['bg/neutral/subtler'],
|
|
3323
|
+
'color': color$1['text/neutral/subtle'],
|
|
3324
|
+
'& svg': {
|
|
3325
|
+
color: color$1['icon/neutral/bolder']
|
|
3326
|
+
},
|
|
3327
|
+
':after': {
|
|
3328
|
+
content: '""',
|
|
3329
|
+
position: 'absolute',
|
|
3330
|
+
top: 0,
|
|
3331
|
+
right: 0,
|
|
3332
|
+
bottom: 0,
|
|
3333
|
+
left: 0,
|
|
3334
|
+
borderWidth: 1,
|
|
3335
|
+
borderStyle: 'solid',
|
|
3336
|
+
borderColor: color$1['border/neutral/bolder'],
|
|
3337
|
+
borderRadius: radii.full,
|
|
3338
|
+
boxSizing: 'border-box'
|
|
3339
|
+
}
|
|
3340
|
+
},
|
|
3341
|
+
'neutral': {
|
|
3342
|
+
'backgroundColor': color$1['bg/neutral'],
|
|
3343
|
+
'color': color$1['text/neutral/subtle'],
|
|
3344
|
+
'& svg': {
|
|
3345
|
+
color: color$1['icon/neutral/bolder']
|
|
3346
|
+
}
|
|
3347
|
+
},
|
|
3348
|
+
'red': {
|
|
3349
|
+
'backgroundColor': color$1['bg/accent/red/subtlest'],
|
|
3350
|
+
'color': color$1['text/accent/red'],
|
|
3351
|
+
'& svg': {
|
|
3352
|
+
color: color$1['icon/accent/red']
|
|
3353
|
+
}
|
|
3354
|
+
},
|
|
3355
|
+
'red-accent': {
|
|
3356
|
+
'backgroundColor': color$1['bg/accent/red'],
|
|
3357
|
+
'color': color$1['text/inverse'],
|
|
3358
|
+
'& svg': {
|
|
3359
|
+
color: color$1['icon/inverse']
|
|
3360
|
+
}
|
|
3361
|
+
},
|
|
3362
|
+
'yellow': {
|
|
3363
|
+
'backgroundColor': color$1['bg/accent/yellow/subtlest'],
|
|
3364
|
+
'color': color$1['text/accent/yellow'],
|
|
3365
|
+
'& svg': {
|
|
3366
|
+
color: color$1['icon/accent/yellow']
|
|
3367
|
+
}
|
|
3368
|
+
},
|
|
3369
|
+
'green': {
|
|
3370
|
+
'backgroundColor': color$1['bg/accent/green/subtlest'],
|
|
3371
|
+
'color': color$1['text/accent/green'],
|
|
3372
|
+
'& svg': {
|
|
3373
|
+
color: color$1['icon/accent/green']
|
|
3374
|
+
}
|
|
3375
|
+
},
|
|
3376
|
+
'dim': {
|
|
3377
|
+
'backgroundColor': color$1['dim'],
|
|
3378
|
+
'color': color$1['text/inverse'],
|
|
3379
|
+
'& svg': {
|
|
3380
|
+
color: color$1['icon/inverse']
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3384
|
+
}), sx);
|
|
3385
|
+
|
|
3386
|
+
const Text = Qe.span({
|
|
3387
|
+
'display': 'block',
|
|
3388
|
+
'whiteSpace': 'pre-wrap',
|
|
3389
|
+
'& > span': {
|
|
3390
|
+
display: 'inline'
|
|
3391
|
+
}
|
|
3392
|
+
}, variant({
|
|
3393
|
+
prop: 'typography',
|
|
3394
|
+
variants: {
|
|
3395
|
+
'display1': typography$1.display1,
|
|
3396
|
+
'display2': typography$1.display2,
|
|
3397
|
+
'display3': typography$1.display3,
|
|
3398
|
+
'display4': typography$1.display4,
|
|
3399
|
+
'xxl/regular': typography$1['xxl/regular'],
|
|
3400
|
+
'xxl': typography$1['xxl'],
|
|
3401
|
+
'xxl/bold': typography$1['xxl/bold'],
|
|
3402
|
+
'xl/regular': typography$1['xl/regular'],
|
|
3403
|
+
'xl': typography$1['xl'],
|
|
3404
|
+
'xl/bold': typography$1['xl/bold'],
|
|
3405
|
+
'l/regular': typography$1['l/regular'],
|
|
3406
|
+
'l': typography$1['l'],
|
|
3407
|
+
'l/bold': typography$1['l/bold'],
|
|
3408
|
+
'm/regular': typography$1['m/regular'],
|
|
3409
|
+
'm': typography$1['m'],
|
|
3410
|
+
'm/bold': typography$1['m/bold'],
|
|
3411
|
+
's/regular': typography$1['s/regular'],
|
|
3412
|
+
's': typography$1['s'],
|
|
3413
|
+
's/bold': typography$1['s/bold'],
|
|
3414
|
+
'xs/regular': typography$1['xs/regular'],
|
|
3415
|
+
'xs': typography$1['xs'],
|
|
3416
|
+
'xs/bold': typography$1['xs/bold'],
|
|
3417
|
+
'xxs/regular': typography$1['xxs/regular'],
|
|
3418
|
+
'xxs': typography$1['xxs'],
|
|
3419
|
+
'xxs/bold': typography$1['xxs/bold']
|
|
3420
|
+
}
|
|
3421
|
+
}), compose(wordBreak, whiteSpace, textDecoration, fontSize, fontWeight, lineHeight, color, textAlign), sx);
|
|
3422
|
+
Text.defaultProps = {
|
|
3423
|
+
color: 'text/neutral'
|
|
3424
|
+
};
|
|
3425
|
+
|
|
3426
|
+
const GradientText = Qe(Text)`
|
|
3427
|
+
background: ${({
|
|
3428
|
+
theme
|
|
3429
|
+
}) => `linear-gradient(${theme.gradients['text/accent']})`};
|
|
3430
|
+
background-clip: text;
|
|
3431
|
+
-webkit-background-clip: text;
|
|
3432
|
+
-webkit-text-fill-color: transparent;
|
|
3433
|
+
`;
|
|
3434
|
+
|
|
3435
|
+
function _extends() {
|
|
3436
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
3437
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
3438
|
+
var source = arguments[i];
|
|
3439
|
+
for (var key in source) {
|
|
3440
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3441
|
+
target[key] = source[key];
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
}
|
|
3445
|
+
return target;
|
|
3446
|
+
};
|
|
3447
|
+
return _extends.apply(this, arguments);
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
/**
|
|
3451
|
+
* CSS에서 사용할 수 있는 픽셀값으로 강제합니다.
|
|
3452
|
+
*/
|
|
3453
|
+
const forcePixelValue = value => {
|
|
3454
|
+
return typeof value === 'string' ? value : `${value}px`;
|
|
3455
|
+
};
|
|
3456
|
+
|
|
3457
|
+
const isArray = value => Array.isArray(value);
|
|
3458
|
+
|
|
3459
|
+
const isNullable = value => value === null || value === undefined;
|
|
3460
|
+
|
|
3461
|
+
const View = Qe.div`
|
|
3462
|
+
${compose(layout, color, flexbox, background, border, position, shadow)}
|
|
3463
|
+
${sx}
|
|
3464
|
+
`;
|
|
3465
|
+
|
|
3466
|
+
const Grid = /*#__PURE__*/React$1.forwardRef(({
|
|
3467
|
+
children,
|
|
3468
|
+
wrap: propWrap = true,
|
|
3469
|
+
gapX = 0,
|
|
3470
|
+
gapY = 0,
|
|
3471
|
+
as,
|
|
3472
|
+
...props
|
|
3473
|
+
}, ref) => {
|
|
3474
|
+
const wrap = Array.isArray(propWrap) ? propWrap.map(value => value === true ? 'true' : 'false') : propWrap === true ? 'true' : 'false';
|
|
3475
|
+
return /*#__PURE__*/React.createElement(BaseGrid, _extends({
|
|
3476
|
+
ref: ref,
|
|
3477
|
+
gapX: gapX,
|
|
3478
|
+
gapY: gapY,
|
|
3479
|
+
wrap: wrap,
|
|
3480
|
+
as: as
|
|
3481
|
+
}, props), children);
|
|
3482
|
+
});
|
|
3483
|
+
const BaseGrid = Qe(View)({
|
|
3484
|
+
display: 'flex',
|
|
3485
|
+
flexDirection: 'row'
|
|
3486
|
+
}, variant({
|
|
3487
|
+
prop: 'gapX',
|
|
3488
|
+
variants: Object.fromEntries(Object.entries(space$1).map(([key, value]) => {
|
|
3489
|
+
const styleValue = {
|
|
3490
|
+
'& > *': {
|
|
3491
|
+
px: forcePixelValue(value / 2)
|
|
3492
|
+
},
|
|
3493
|
+
'mx': forcePixelValue(-value / 2)
|
|
3494
|
+
};
|
|
3495
|
+
return [key, styleValue];
|
|
3496
|
+
}))
|
|
3497
|
+
}), variant({
|
|
3498
|
+
prop: 'gapY',
|
|
3499
|
+
variants: Object.fromEntries(Object.entries(space$1).map(([key, value]) => {
|
|
3500
|
+
const styleValue = {
|
|
3501
|
+
'& > *': {
|
|
3502
|
+
mt: forcePixelValue(value)
|
|
3503
|
+
},
|
|
3504
|
+
'mt': forcePixelValue(-value)
|
|
3505
|
+
};
|
|
3506
|
+
return [key, styleValue];
|
|
3507
|
+
}))
|
|
3508
|
+
}), variant({
|
|
3509
|
+
prop: 'wrap',
|
|
3510
|
+
variants: {
|
|
3511
|
+
true: {
|
|
3512
|
+
flexWrap: 'wrap'
|
|
3513
|
+
},
|
|
3514
|
+
false: {
|
|
3515
|
+
flexWrap: 'nowrap'
|
|
3516
|
+
}
|
|
3517
|
+
}
|
|
3518
|
+
}));
|
|
3519
|
+
const mapValueToResponsiveValueProps = (value, propsAccessor) => {
|
|
3520
|
+
if (isNullable(value) || typeof value === 'object' && !isArray(value)) return null;
|
|
3521
|
+
if (!isArray(value)) return propsAccessor(value);
|
|
3522
|
+
return value.reduce((acc, cur) => {
|
|
3523
|
+
const curProps = propsAccessor(cur);
|
|
3524
|
+
const curPropKeys = Object.keys(curProps);
|
|
3525
|
+
return Object.fromEntries(curPropKeys.map(curPropKey => [curPropKey, acc[curPropKey] === undefined || acc[curPropKey] === null ? [curProps[curPropKey]] : isArray(acc[curPropKey]) ? [...acc[curPropKey], curProps[curPropKey]] : [acc[curPropKey], curProps[curPropKey]]]));
|
|
3526
|
+
}, {});
|
|
3527
|
+
};
|
|
3528
|
+
const Unit = ({
|
|
3529
|
+
size,
|
|
3530
|
+
as,
|
|
3531
|
+
children,
|
|
3532
|
+
...props
|
|
3533
|
+
}) => {
|
|
3534
|
+
const getFlexGrowBySize = size => size === 'max' ? 1 : size === 'min' ? 0 : 1;
|
|
3535
|
+
const getFlexBySize = size => size === 'max' ? 1 : size === 'min' ? 'none' : 'none';
|
|
3536
|
+
const getFlexBasisBySize = size => {
|
|
3537
|
+
const percentage = Math.round(size * 100 * 10000) / 10000;
|
|
3538
|
+
return size === 'max' ? 'auto' : size === 'min' ? 'auto' : `${percentage}%`;
|
|
3539
|
+
};
|
|
3540
|
+
const getWidthBySize = size => size === 'max' ? 'auto' : size === 'min' ? 'auto' : 'none';
|
|
3541
|
+
const getMaxWidthBySize = size => {
|
|
3542
|
+
const percentage = Math.round(size * 100 * 10000) / 10000;
|
|
3543
|
+
return size === 'max' ? '100%' : size === 'min' ? 'none' : `${percentage}%`;
|
|
3544
|
+
};
|
|
3545
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, mapValueToResponsiveValueProps(size, value => ({
|
|
3546
|
+
display: value === 0 ? 'none' : 'initial',
|
|
3547
|
+
flowGrow: getFlexGrowBySize(value),
|
|
3548
|
+
flex: getFlexBySize(value),
|
|
3549
|
+
flexBasis: getFlexBasisBySize(value),
|
|
3550
|
+
width: getWidthBySize(value),
|
|
3551
|
+
maxWidth: getMaxWidthBySize(value)
|
|
3552
|
+
})), {
|
|
3553
|
+
as: as
|
|
3554
|
+
}, props), children);
|
|
3555
|
+
};
|
|
3556
|
+
var index$1 = Object.assign(Grid, {
|
|
3557
|
+
Unit
|
|
3558
|
+
});
|
|
3559
|
+
|
|
3560
|
+
const SvgProgressGradient = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
3561
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3562
|
+
width: "1em",
|
|
3563
|
+
height: "1em",
|
|
3564
|
+
fill: "none",
|
|
3565
|
+
viewBox: "0 0 24 24"
|
|
3566
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3567
|
+
fill: "currentColor",
|
|
3568
|
+
fillRule: "evenodd",
|
|
3569
|
+
d: "M12 1.4a1.1 1.1 0 0 0-1.1 1.1v3.042a1.1 1.1 0 0 0 2.2 0V2.5A1.101 1.101 0 0 0 12 1.4Z",
|
|
3570
|
+
clipRule: "evenodd"
|
|
3571
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3572
|
+
fill: "currentColor",
|
|
3573
|
+
fillRule: "evenodd",
|
|
3574
|
+
d: "M6.656 8.211a1.097 1.097 0 0 0 1.556 0 1.101 1.101 0 0 0 0-1.556L6.06 4.505A1.101 1.101 0 0 0 4.505 6.06l2.15 2.151h.001Z",
|
|
3575
|
+
clipRule: "evenodd",
|
|
3576
|
+
opacity: 0.16
|
|
3577
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3578
|
+
fill: "currentColor",
|
|
3579
|
+
fillRule: "evenodd",
|
|
3580
|
+
d: "M6.642 12a1.1 1.1 0 0 0-1.1-1.1H2.5a1.1 1.1 0 0 0 0 2.2h3.042a1.1 1.1 0 0 0 1.1-1.1Z",
|
|
3581
|
+
clipRule: "evenodd",
|
|
3582
|
+
opacity: 0.32
|
|
3583
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3584
|
+
fill: "currentColor",
|
|
3585
|
+
fillRule: "evenodd",
|
|
3586
|
+
d: "m6.656 15.789-2.151 2.15a1.101 1.101 0 0 0 1.556 1.556l2.15-2.15a1.101 1.101 0 0 0-1.555-1.556ZM12 17.358a1.1 1.1 0 0 0-1.1 1.1V21.5a1.1 1.1 0 0 0 2.2 0v-3.042a1.1 1.1 0 0 0-1.1-1.1Z",
|
|
3587
|
+
clipRule: "evenodd",
|
|
3588
|
+
opacity: 0.56
|
|
3589
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
3590
|
+
fill: "currentColor",
|
|
3591
|
+
fillRule: "evenodd",
|
|
3592
|
+
d: "M17.344 15.789a1.1 1.1 0 0 0-1.556 1.556l2.151 2.15a1.098 1.098 0 0 0 1.878-.778 1.1 1.1 0 0 0-.322-.778l-2.15-2.15h-.001ZM21.5 10.9h-3.042a1.1 1.1 0 0 0 0 2.2H21.5a1.1 1.1 0 0 0 0-2.2ZM16.566 8.534c.281 0 .563-.107.778-.322l2.151-2.151a1.1 1.1 0 0 0-1.556-1.556l-2.15 2.15a1.1 1.1 0 0 0 .777 1.879Z",
|
|
3593
|
+
clipRule: "evenodd",
|
|
3594
|
+
opacity: 0.72
|
|
3595
|
+
}));
|
|
3596
|
+
|
|
3597
|
+
const spin = nt`
|
|
3598
|
+
from {
|
|
3599
|
+
transform: rotate(0);
|
|
3600
|
+
}
|
|
3601
|
+
to {
|
|
3602
|
+
transform: rotate(360deg);
|
|
3603
|
+
}
|
|
3604
|
+
`;
|
|
3605
|
+
const Spinner = Qe(SvgProgressGradient)`
|
|
3606
|
+
animation: ${spin} 1000ms infinite steps(8, end);
|
|
3607
|
+
`;
|
|
3608
|
+
Spinner.defaultProps = {
|
|
3609
|
+
width: 32,
|
|
3610
|
+
height: 32,
|
|
3611
|
+
color: color$1['icon/neutral']
|
|
3612
|
+
};
|
|
3613
|
+
|
|
3614
|
+
const UnstyledButton = Qe.button`
|
|
3615
|
+
background: none;
|
|
3616
|
+
border: 0;
|
|
3617
|
+
padding: 0;
|
|
3618
|
+
outline: none;
|
|
3619
|
+
cursor: pointer;
|
|
3620
|
+
|
|
3621
|
+
${sx}
|
|
3622
|
+
`;
|
|
3623
|
+
|
|
3624
|
+
const IconButton = /*#__PURE__*/React$1.forwardRef(({
|
|
3625
|
+
icon: Icon,
|
|
3626
|
+
size = 'm',
|
|
3627
|
+
variant = 'primary',
|
|
3628
|
+
disabled = false,
|
|
3629
|
+
loading = false,
|
|
3630
|
+
type = 'button',
|
|
3631
|
+
...props
|
|
3632
|
+
}, ref) => {
|
|
3633
|
+
return /*#__PURE__*/React.createElement(BaseIconButton, _extends({
|
|
3634
|
+
ref: ref,
|
|
3635
|
+
type: type,
|
|
3636
|
+
icon: Icon,
|
|
3637
|
+
size: size,
|
|
3638
|
+
variant: variant,
|
|
3639
|
+
disabled: disabled || loading,
|
|
3640
|
+
$disabled: disabled,
|
|
3641
|
+
$loading: loading
|
|
3642
|
+
}, props), !loading ? /*#__PURE__*/React.createElement(Icon, null) : /*#__PURE__*/React.createElement(Spinner, {
|
|
3643
|
+
color: 'currentColor'
|
|
3644
|
+
}));
|
|
3645
|
+
});
|
|
3646
|
+
const BaseIconButton = Qe(UnstyledButton)(({
|
|
3647
|
+
$loading,
|
|
3648
|
+
$disabled
|
|
3649
|
+
}) => ({
|
|
3650
|
+
'position': 'relative',
|
|
3651
|
+
'borderRadius': radii.full,
|
|
3652
|
+
'transition': 'background-color 100ms, color 100ms',
|
|
3653
|
+
'& svg': {
|
|
3654
|
+
display: 'block',
|
|
3655
|
+
pointerEvents: 'none'
|
|
3656
|
+
},
|
|
3657
|
+
'cursor': $loading ? 'progress' : $disabled ? 'not-allowed' : 'pointer',
|
|
3658
|
+
':focus-visible': {
|
|
3659
|
+
outlineColor: color$1['border/focused'],
|
|
3660
|
+
outlineStyle: 'solid',
|
|
3661
|
+
outlineWidth: 2,
|
|
3662
|
+
outlineOffset: 2
|
|
3663
|
+
}
|
|
3664
|
+
}), variant({
|
|
3665
|
+
prop: 'size',
|
|
3666
|
+
variants: {
|
|
3667
|
+
l: {
|
|
3668
|
+
'p': 3,
|
|
3669
|
+
'& svg': {
|
|
3670
|
+
width: 24,
|
|
3671
|
+
height: 24
|
|
3672
|
+
}
|
|
3673
|
+
},
|
|
3674
|
+
m: {
|
|
3675
|
+
'p': 2,
|
|
3676
|
+
'& svg': {
|
|
3677
|
+
width: 24,
|
|
3678
|
+
height: 24
|
|
3679
|
+
}
|
|
3680
|
+
},
|
|
3681
|
+
s: {
|
|
3682
|
+
'p': 2,
|
|
3683
|
+
'& svg': {
|
|
3684
|
+
width: 16,
|
|
3685
|
+
height: 16
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
}), ({
|
|
3690
|
+
$disabled
|
|
3691
|
+
}) => variant({
|
|
3692
|
+
prop: 'variant',
|
|
3693
|
+
variants: {
|
|
3694
|
+
'primary': {
|
|
3695
|
+
'backgroundColor': color$1['bg/primary'],
|
|
3696
|
+
'color': color$1['icon/inverse'],
|
|
3697
|
+
':hover:not(:disabled)': {
|
|
3698
|
+
backgroundColor: color$1['bg/primary/hovered']
|
|
3699
|
+
},
|
|
3700
|
+
':active:not(:disabled)': {
|
|
3701
|
+
backgroundColor: color$1['bg/primary/pressed']
|
|
3702
|
+
},
|
|
3703
|
+
...($disabled ? {
|
|
3704
|
+
backgroundColor: color$1['bg/disabled'],
|
|
3705
|
+
color: color$1['icon/disabled']
|
|
3706
|
+
} : {})
|
|
3707
|
+
},
|
|
3708
|
+
'secondary': {
|
|
3709
|
+
'backgroundColor': color$1['bg/secondary'],
|
|
3710
|
+
'color': color$1['icon/primary'],
|
|
3711
|
+
':hover:not(:disabled)': {
|
|
3712
|
+
backgroundColor: color$1['bg/secondary/hovered']
|
|
3713
|
+
},
|
|
3714
|
+
':active:not(:disabled)': {
|
|
3715
|
+
backgroundColor: color$1['bg/secondary/pressed']
|
|
3716
|
+
},
|
|
3717
|
+
...($disabled ? {
|
|
3718
|
+
backgroundColor: color$1['bg/disabled'],
|
|
3719
|
+
color: color$1['icon/disabled']
|
|
3720
|
+
} : {})
|
|
3721
|
+
},
|
|
3722
|
+
'tertiary': {
|
|
3723
|
+
'backgroundColor': color$1['bg/neutral'],
|
|
3724
|
+
'color': color$1['icon/accent/gray'],
|
|
3725
|
+
':hover:not(:disabled)': {
|
|
3726
|
+
backgroundColor: color$1['bg/neutral/hovered']
|
|
3727
|
+
},
|
|
3728
|
+
':active:not(:disabled)': {
|
|
3729
|
+
backgroundColor: color$1['bg/neutral/pressed']
|
|
3730
|
+
},
|
|
3731
|
+
...($disabled ? {
|
|
3732
|
+
backgroundColor: color$1['bg/disabled'],
|
|
3733
|
+
color: color$1['icon/disabled']
|
|
3734
|
+
} : {})
|
|
3735
|
+
},
|
|
3736
|
+
'outlined': {
|
|
3737
|
+
'backgroundColor': color$1['bg/neutral/subtler'],
|
|
3738
|
+
'color': color$1['icon/neutral/bolder'],
|
|
3739
|
+
':after': {
|
|
3740
|
+
content: '""',
|
|
3741
|
+
position: 'absolute',
|
|
3742
|
+
top: 0,
|
|
3743
|
+
right: 0,
|
|
3744
|
+
bottom: 0,
|
|
3745
|
+
left: 0,
|
|
3746
|
+
borderWidth: 1,
|
|
3747
|
+
borderStyle: 'solid',
|
|
3748
|
+
borderColor: color$1['border/neutral/bolder'],
|
|
3749
|
+
borderRadius: radii.full,
|
|
3750
|
+
boxSizing: 'border-box'
|
|
3751
|
+
},
|
|
3752
|
+
':hover:not(:disabled)': {
|
|
3753
|
+
backgroundColor: color$1['bg/neutral/subtler/hovered']
|
|
3754
|
+
},
|
|
3755
|
+
':active:not(:disabled)': {
|
|
3756
|
+
backgroundColor: color$1['bg/neutral/subtler/pressed']
|
|
3757
|
+
},
|
|
3758
|
+
...($disabled ? {
|
|
3759
|
+
'backgroundColor': color$1['bg/disabled'],
|
|
3760
|
+
'color': color$1['icon/disabled'],
|
|
3761
|
+
':after': {
|
|
3762
|
+
display: 'none'
|
|
3763
|
+
}
|
|
3764
|
+
} : {})
|
|
3765
|
+
},
|
|
3766
|
+
'plain-bold': {
|
|
3767
|
+
'backgroundColor': color$1['bg/neutral/subtler'],
|
|
3768
|
+
'color': color$1['icon/neutral/bolder'],
|
|
3769
|
+
':hover:not(:disabled)': {
|
|
3770
|
+
color: color$1['icon/accent/gray']
|
|
3771
|
+
},
|
|
3772
|
+
':active:not(:disabled)': {
|
|
3773
|
+
color: color$1['icon/accent/gray']
|
|
3774
|
+
},
|
|
3775
|
+
...($disabled ? {
|
|
3776
|
+
backgroundColor: color$1['bg/disabled/subtlest'],
|
|
3777
|
+
color: color$1['icon/disabled']
|
|
3778
|
+
} : {})
|
|
3779
|
+
},
|
|
3780
|
+
'plain': {
|
|
3781
|
+
'backgroundColor': color$1['bg/neutral/subtler'],
|
|
3782
|
+
'color': color$1['icon/neutral/bold'],
|
|
3783
|
+
':hover:not(:disabled)': {
|
|
3784
|
+
color: color$1['icon/neutral/bolder']
|
|
3785
|
+
},
|
|
3786
|
+
':active:not(:disabled)': {
|
|
3787
|
+
color: color$1['icon/neutral/bolder']
|
|
3788
|
+
},
|
|
3789
|
+
...($disabled ? {
|
|
3790
|
+
backgroundColor: color$1['bg/disabled/subtlest'],
|
|
3791
|
+
color: color$1['icon/disabled/subtler']
|
|
3792
|
+
} : {})
|
|
3793
|
+
},
|
|
3794
|
+
'plain-subtle': {
|
|
3795
|
+
'backgroundColor': color$1['bg/neutral/subtler'],
|
|
3796
|
+
'color': color$1['icon/neutral'],
|
|
3797
|
+
':hover:not(:disabled)': {
|
|
3798
|
+
color: color$1['icon/neutral/bold']
|
|
3799
|
+
},
|
|
3800
|
+
':active:not(:disabled)': {
|
|
3801
|
+
color: color$1['icon/neutral/bold']
|
|
3802
|
+
},
|
|
3803
|
+
...($disabled ? {
|
|
3804
|
+
backgroundColor: color$1['bg/disabled/subtlest'],
|
|
3805
|
+
color: color$1['icon/disabled/subtler']
|
|
3806
|
+
} : {})
|
|
3807
|
+
},
|
|
3808
|
+
'danger': {
|
|
3809
|
+
'backgroundColor': color$1['bg/danger/bold'],
|
|
3810
|
+
'color': color$1['icon/inverse'],
|
|
3811
|
+
':hover:not(:disabled)': {
|
|
3812
|
+
backgroundColor: color$1['bg/danger/bold/hovered']
|
|
3813
|
+
},
|
|
3814
|
+
':active:not(:disabled)': {
|
|
3815
|
+
backgroundColor: color$1['bg/danger/bold/pressed']
|
|
3816
|
+
},
|
|
3817
|
+
...($disabled ? {
|
|
3818
|
+
backgroundColor: color$1['bg/disabled'],
|
|
3819
|
+
color: color$1['icon/disabled']
|
|
3820
|
+
} : {})
|
|
3821
|
+
}
|
|
3822
|
+
}
|
|
3823
|
+
}));
|
|
3824
|
+
|
|
3825
|
+
const IconToggleButton = ({
|
|
3826
|
+
icon: Icon,
|
|
3827
|
+
size = 'm',
|
|
3828
|
+
variant = 'primary',
|
|
3829
|
+
selected = false,
|
|
3830
|
+
disabled = false,
|
|
3831
|
+
sx,
|
|
3832
|
+
...props
|
|
3833
|
+
}) => {
|
|
3834
|
+
return /*#__PURE__*/React.createElement(BaseIconToggleButton, _extends({
|
|
3835
|
+
icon: Icon,
|
|
3836
|
+
size: size,
|
|
3837
|
+
variant: variant,
|
|
3838
|
+
selected: selected,
|
|
3839
|
+
type: 'button',
|
|
3840
|
+
disabled: disabled,
|
|
3841
|
+
$disabled: disabled,
|
|
3842
|
+
sx: sx
|
|
3843
|
+
}, props), /*#__PURE__*/React.createElement(Icon, null));
|
|
3844
|
+
};
|
|
3845
|
+
const BaseIconToggleButton = Qe(UnstyledButton)(({
|
|
3846
|
+
$disabled
|
|
3847
|
+
}) => ({
|
|
3848
|
+
'position': 'relative',
|
|
3849
|
+
'borderRadius': radii.full,
|
|
3850
|
+
'transition': 'background-color 100ms, color 100ms',
|
|
3851
|
+
'& svg': {
|
|
3852
|
+
display: 'block'
|
|
3853
|
+
},
|
|
3854
|
+
'cursor': $disabled ? 'not-allowed' : 'pointer',
|
|
3855
|
+
':focus-visible': {
|
|
3856
|
+
outlineColor: color$1['border/focused'],
|
|
3857
|
+
outlineStyle: 'solid',
|
|
3858
|
+
outlineWidth: 2,
|
|
3859
|
+
outlineOffset: 2
|
|
3860
|
+
}
|
|
3861
|
+
}), variant({
|
|
3862
|
+
prop: 'size',
|
|
3863
|
+
variants: {
|
|
3864
|
+
l: {
|
|
3865
|
+
'p': 3,
|
|
3866
|
+
'& svg': {
|
|
3867
|
+
width: 24,
|
|
3868
|
+
height: 24
|
|
3869
|
+
}
|
|
3870
|
+
},
|
|
3871
|
+
m: {
|
|
3872
|
+
'p': 2,
|
|
3873
|
+
'& svg': {
|
|
3874
|
+
width: 24,
|
|
3875
|
+
height: 24
|
|
3876
|
+
}
|
|
3877
|
+
},
|
|
3878
|
+
s: {
|
|
3879
|
+
'p': 2,
|
|
3880
|
+
'& svg': {
|
|
3881
|
+
width: 16,
|
|
3882
|
+
height: 16
|
|
3883
|
+
}
|
|
3884
|
+
}
|
|
3885
|
+
}
|
|
3886
|
+
}), ({
|
|
3887
|
+
selected,
|
|
3888
|
+
$disabled
|
|
3889
|
+
}) => variant({
|
|
3890
|
+
prop: 'variant',
|
|
3891
|
+
variants: {
|
|
3892
|
+
primary: {
|
|
3893
|
+
...(selected ? {
|
|
3894
|
+
backgroundColor: color$1['bg/selected/violet'],
|
|
3895
|
+
color: color$1['icon/inverse']
|
|
3896
|
+
} : {
|
|
3897
|
+
backgroundColor: color$1['bg/neutral'],
|
|
3898
|
+
color: color$1['icon/accent/gray']
|
|
3899
|
+
}),
|
|
3900
|
+
...($disabled ? {
|
|
3901
|
+
backgroundColor: color$1['bg/disabled'],
|
|
3902
|
+
color: color$1['icon/disabled']
|
|
3903
|
+
} : {})
|
|
3904
|
+
},
|
|
3905
|
+
plain: {
|
|
3906
|
+
backgroundColor: color$1['bg/neutral/subtler'],
|
|
3907
|
+
...(selected ? {
|
|
3908
|
+
color: color$1['icon/selected/primary']
|
|
3909
|
+
} : {
|
|
3910
|
+
color: color$1['icon/neutral']
|
|
3911
|
+
}),
|
|
3912
|
+
...($disabled ? {
|
|
3913
|
+
backgroundColor: color$1['bg/disabled/subtlest'],
|
|
3914
|
+
color: color$1['icon/disabled/subtler']
|
|
3915
|
+
} : {})
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
}), sx);
|
|
3919
|
+
|
|
3920
|
+
const ItemList = ({
|
|
3921
|
+
items,
|
|
3922
|
+
renderItem,
|
|
3923
|
+
renderItemWrapper = children => children,
|
|
3924
|
+
emptyState = null
|
|
3925
|
+
}) => {
|
|
3926
|
+
if (items.length === 0) return emptyState;
|
|
3927
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, items.map((item, i) => renderItemWrapper(renderItem(item, i), item, i)));
|
|
3928
|
+
};
|
|
3929
|
+
|
|
3930
|
+
const Space = Qe.div`
|
|
3931
|
+
width: inherit;
|
|
3932
|
+
${space};
|
|
3933
|
+
${sx}
|
|
3934
|
+
`;
|
|
3935
|
+
|
|
3936
|
+
const Stack = /*#__PURE__*/React$1.forwardRef(({
|
|
3937
|
+
gapX = 0,
|
|
3938
|
+
gapY = 0,
|
|
3939
|
+
children,
|
|
3940
|
+
alignItems = 'center',
|
|
3941
|
+
...props
|
|
3942
|
+
}, ref) => /*#__PURE__*/React.createElement(BaseStack, _extends({
|
|
3943
|
+
ref: ref,
|
|
3944
|
+
alignItems: alignItems,
|
|
3945
|
+
gapX: gapX,
|
|
3946
|
+
gapY: gapY
|
|
3947
|
+
}, props), children));
|
|
3948
|
+
const BaseStack = Qe(View)({
|
|
3949
|
+
display: 'flex',
|
|
3950
|
+
flexDirection: 'row',
|
|
3951
|
+
flexWrap: 'wrap'
|
|
3952
|
+
}, variant({
|
|
3953
|
+
prop: 'gapX',
|
|
3954
|
+
variants: Object.fromEntries(Object.entries(space$1).map(([key, value]) => {
|
|
3955
|
+
const styleValue = {
|
|
3956
|
+
'& > *': {
|
|
3957
|
+
px: forcePixelValue(value / 2)
|
|
3958
|
+
},
|
|
3959
|
+
'mx': forcePixelValue(-value / 2)
|
|
3960
|
+
};
|
|
3961
|
+
return [key, styleValue];
|
|
3962
|
+
}))
|
|
3963
|
+
}), variant({
|
|
3964
|
+
prop: 'gapY',
|
|
3965
|
+
variants: Object.fromEntries(Object.entries(space$1).map(([key, value]) => {
|
|
3966
|
+
const styleValue = {
|
|
3967
|
+
'& > *': {
|
|
3968
|
+
mt: forcePixelValue(value)
|
|
3969
|
+
},
|
|
3970
|
+
'mt': forcePixelValue(-value)
|
|
3971
|
+
};
|
|
3972
|
+
return [key, styleValue];
|
|
3973
|
+
}))
|
|
3974
|
+
}));
|
|
3975
|
+
const Item = ({
|
|
3976
|
+
children,
|
|
3977
|
+
...props
|
|
3978
|
+
}) => /*#__PURE__*/React.createElement(View, props, children);
|
|
3979
|
+
var index = Object.assign(Stack, {
|
|
3980
|
+
Item
|
|
3981
|
+
});
|
|
3982
|
+
|
|
3983
|
+
const StyledIcon = ({
|
|
3984
|
+
icon: Icon,
|
|
3985
|
+
sx,
|
|
3986
|
+
...props
|
|
3987
|
+
}) => /*#__PURE__*/React.createElement(View, _extends({}, props, {
|
|
3988
|
+
color: props.color,
|
|
3989
|
+
sx: {
|
|
3990
|
+
'& svg': {
|
|
3991
|
+
display: 'inline-flex',
|
|
3992
|
+
width: '100%',
|
|
3993
|
+
height: '100%'
|
|
3994
|
+
},
|
|
3995
|
+
...sx
|
|
3996
|
+
}
|
|
3997
|
+
}), /*#__PURE__*/React.createElement(Icon, null));
|
|
3998
|
+
|
|
3999
|
+
exports.Chip = Chip;
|
|
4000
|
+
exports.GradientText = GradientText;
|
|
4001
|
+
exports.Grid = index$1;
|
|
4002
|
+
exports.IconButton = IconButton;
|
|
4003
|
+
exports.IconToggleButton = IconToggleButton;
|
|
4004
|
+
exports.ItemList = ItemList;
|
|
4005
|
+
exports.Space = Space;
|
|
4006
|
+
exports.Spinner = Spinner;
|
|
4007
|
+
exports.Stack = index;
|
|
4008
|
+
exports.StyledIcon = StyledIcon;
|
|
4009
|
+
exports.Text = Text;
|
|
4010
|
+
exports.View = View;
|