teachable-design-system 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/checked.png +0 -0
- package/dist/assets/icon_size.png +0 -0
- package/dist/assets/icons/arrow-down.png +0 -0
- package/dist/assets/icons/checked.png +0 -0
- package/dist/assets/icons/icon_size.png +0 -0
- package/dist/assets/images/.gitkeep +0 -0
- package/dist/assets/index.ts +1 -0
- package/dist/index.cjs.js +181 -2366
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +721 -0
- package/dist/index.esm.js +152 -2323
- package/dist/index.esm.js.map +1 -1
- package/dist/types/assets/index.d.ts +1 -0
- package/dist/types/components/Button/Button.d.ts +3 -0
- package/dist/{src → types}/components/Button/Button.d.ts.map +1 -1
- package/dist/types/components/CheckBox/CheckBox.d.ts +3 -0
- package/dist/{src → types}/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/dist/{src → types}/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/{src → types}/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/types/components/Input/Input.d.ts +3 -0
- package/dist/{src → types}/components/Input/Input.d.ts.map +1 -1
- package/dist/types/components/Sidebar/Sidebar.d.ts +3 -0
- package/dist/types/components/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/{src → types}/components/TabBar/TabBar.d.ts +1 -2
- package/dist/{src → types}/components/TabBar/TabBar.d.ts.map +1 -1
- package/dist/types/foundation/index.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -0
- package/package.json +2 -1
- package/src/components/Button/Button.tsx +2 -4
- package/src/components/CheckBox/CheckBox.tsx +1 -3
- package/src/components/Input/Input.tsx +1 -3
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/TabBar/TabBar.tsx +1 -3
- package/dist/src/assets/index.d.ts +0 -2
- package/dist/src/components/Button/Button.d.ts +0 -4
- package/dist/src/components/CheckBox/CheckBox.d.ts +0 -4
- package/dist/src/components/Input/Input.d.ts +0 -4
- package/dist/src/components/Sidebar/Sidebar.d.ts +0 -3
- package/dist/src/components/Sidebar/Sidebar.d.ts.map +0 -1
- package/dist/src/foundation/index.d.ts +0 -2
- package/dist/src/types/index.d.ts +0 -2
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- /package/dist/{src → types}/assets/index.d.ts.map +0 -0
- /package/dist/{src → types}/components/Button/index.d.ts +0 -0
- /package/dist/{src → types}/components/Button/index.d.ts.map +0 -0
- /package/dist/{src → types}/components/Button/style.d.ts +0 -0
- /package/dist/{src → types}/components/Button/style.d.ts.map +0 -0
- /package/dist/{src → types}/components/CheckBox/index.d.ts +0 -0
- /package/dist/{src → types}/components/CheckBox/index.d.ts.map +0 -0
- /package/dist/{src → types}/components/CheckBox/style.d.ts +0 -0
- /package/dist/{src → types}/components/CheckBox/style.d.ts.map +0 -0
- /package/dist/{src → types}/components/Dropdown/index.d.ts +0 -0
- /package/dist/{src → types}/components/Dropdown/index.d.ts.map +0 -0
- /package/dist/{src → types}/components/Dropdown/style.d.ts +0 -0
- /package/dist/{src → types}/components/Dropdown/style.d.ts.map +0 -0
- /package/dist/{src → types}/components/Input/index.d.ts +0 -0
- /package/dist/{src → types}/components/Input/index.d.ts.map +0 -0
- /package/dist/{src → types}/components/Input/style.d.ts +0 -0
- /package/dist/{src → types}/components/Input/style.d.ts.map +0 -0
- /package/dist/{src → types}/components/Sidebar/index.d.ts +0 -0
- /package/dist/{src → types}/components/Sidebar/index.d.ts.map +0 -0
- /package/dist/{src → types}/components/Sidebar/style.d.ts +0 -0
- /package/dist/{src → types}/components/Sidebar/style.d.ts.map +0 -0
- /package/dist/{src → types}/components/TabBar/index.d.ts +0 -0
- /package/dist/{src → types}/components/TabBar/index.d.ts.map +0 -0
- /package/dist/{src → types}/components/TabBar/style.d.ts +0 -0
- /package/dist/{src → types}/components/TabBar/style.d.ts.map +0 -0
- /package/dist/{src → types}/components/index.d.ts +0 -0
- /package/dist/{src → types}/components/index.d.ts.map +0 -0
- /package/dist/{src → types}/foundation/index.d.ts.map +0 -0
- /package/dist/{src → types}/index.d.ts +0 -0
- /package/dist/{src → types}/index.d.ts.map +0 -0
- /package/dist/{src → types}/style/index.d.ts +0 -0
- /package/dist/{src → types}/style/index.d.ts.map +0 -0
- /package/dist/{src → types}/style/theme/colors.d.ts +0 -0
- /package/dist/{src → types}/style/theme/colors.d.ts.map +0 -0
- /package/dist/{src → types}/style/theme/index.d.ts +0 -0
- /package/dist/{src → types}/style/theme/index.d.ts.map +0 -0
- /package/dist/{src → types}/style/theme/typography.d.ts +0 -0
- /package/dist/{src → types}/style/theme/typography.d.ts.map +0 -0
- /package/dist/{src → types}/types/Dropdown.types.d.ts +0 -0
- /package/dist/{src → types}/types/Dropdown.types.d.ts.map +0 -0
- /package/dist/{src → types}/types/Sidebar.types.d.ts +0 -0
- /package/dist/{src → types}/types/Sidebar.types.d.ts.map +0 -0
- /package/dist/{src → types}/types/button.types.d.ts +0 -0
- /package/dist/{src → types}/types/button.types.d.ts.map +0 -0
- /package/dist/{src → types}/types/checkBox.types.d.ts +0 -0
- /package/dist/{src → types}/types/checkBox.types.d.ts.map +0 -0
- /package/dist/{src → types}/types/index.d.ts.map +0 -0
- /package/dist/{src → types}/types/input.types.d.ts +0 -0
- /package/dist/{src → types}/types/input.types.d.ts.map +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,2301 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import '
|
|
7
|
-
|
|
8
|
-
var isDevelopment$3 = false;
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
|
|
12
|
-
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
13
|
-
|
|
14
|
-
high performance StyleSheet for css-in-js systems
|
|
15
|
-
|
|
16
|
-
- uses multiple style tags behind the scenes for millions of rules
|
|
17
|
-
- uses `insertRule` for appending in production for *much* faster performance
|
|
18
|
-
|
|
19
|
-
// usage
|
|
20
|
-
|
|
21
|
-
import { StyleSheet } from '@emotion/sheet'
|
|
22
|
-
|
|
23
|
-
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
24
|
-
|
|
25
|
-
styleSheet.insert('#box { border: 1px solid red; }')
|
|
26
|
-
- appends a css rule into the stylesheet
|
|
27
|
-
|
|
28
|
-
styleSheet.flush()
|
|
29
|
-
- empties the stylesheet of all its contents
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
function sheetForTag(tag) {
|
|
34
|
-
if (tag.sheet) {
|
|
35
|
-
return tag.sheet;
|
|
36
|
-
} // this weirdness brought to you by firefox
|
|
37
|
-
|
|
38
|
-
/* istanbul ignore next */
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
42
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
|
43
|
-
return document.styleSheets[i];
|
|
44
|
-
}
|
|
45
|
-
} // this function should always return with a value
|
|
46
|
-
// TS can't understand it though so we make it stop complaining here
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return undefined;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function createStyleElement(options) {
|
|
53
|
-
var tag = document.createElement('style');
|
|
54
|
-
tag.setAttribute('data-emotion', options.key);
|
|
55
|
-
|
|
56
|
-
if (options.nonce !== undefined) {
|
|
57
|
-
tag.setAttribute('nonce', options.nonce);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
tag.appendChild(document.createTextNode(''));
|
|
61
|
-
tag.setAttribute('data-s', '');
|
|
62
|
-
return tag;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
var StyleSheet = /*#__PURE__*/function () {
|
|
66
|
-
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
67
|
-
function StyleSheet(options) {
|
|
68
|
-
var _this = this;
|
|
69
|
-
|
|
70
|
-
this._insertTag = function (tag) {
|
|
71
|
-
var before;
|
|
72
|
-
|
|
73
|
-
if (_this.tags.length === 0) {
|
|
74
|
-
if (_this.insertionPoint) {
|
|
75
|
-
before = _this.insertionPoint.nextSibling;
|
|
76
|
-
} else if (_this.prepend) {
|
|
77
|
-
before = _this.container.firstChild;
|
|
78
|
-
} else {
|
|
79
|
-
before = _this.before;
|
|
80
|
-
}
|
|
81
|
-
} else {
|
|
82
|
-
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
_this.container.insertBefore(tag, before);
|
|
86
|
-
|
|
87
|
-
_this.tags.push(tag);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
this.isSpeedy = options.speedy === undefined ? !isDevelopment$3 : options.speedy;
|
|
91
|
-
this.tags = [];
|
|
92
|
-
this.ctr = 0;
|
|
93
|
-
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
94
|
-
|
|
95
|
-
this.key = options.key;
|
|
96
|
-
this.container = options.container;
|
|
97
|
-
this.prepend = options.prepend;
|
|
98
|
-
this.insertionPoint = options.insertionPoint;
|
|
99
|
-
this.before = null;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
var _proto = StyleSheet.prototype;
|
|
103
|
-
|
|
104
|
-
_proto.hydrate = function hydrate(nodes) {
|
|
105
|
-
nodes.forEach(this._insertTag);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
_proto.insert = function insert(rule) {
|
|
109
|
-
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
110
|
-
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
111
|
-
// and you can only have one source map per style tag
|
|
112
|
-
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
113
|
-
this._insertTag(createStyleElement(this));
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
var tag = this.tags[this.tags.length - 1];
|
|
117
|
-
|
|
118
|
-
if (this.isSpeedy) {
|
|
119
|
-
var sheet = sheetForTag(tag);
|
|
120
|
-
|
|
121
|
-
try {
|
|
122
|
-
// this is the ultrafast version, works across browsers
|
|
123
|
-
// the big drawback is that the css won't be editable in devtools
|
|
124
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
125
|
-
} catch (e) {
|
|
126
|
-
}
|
|
127
|
-
} else {
|
|
128
|
-
tag.appendChild(document.createTextNode(rule));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
this.ctr++;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
_proto.flush = function flush() {
|
|
135
|
-
this.tags.forEach(function (tag) {
|
|
136
|
-
var _tag$parentNode;
|
|
137
|
-
|
|
138
|
-
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
139
|
-
});
|
|
140
|
-
this.tags = [];
|
|
141
|
-
this.ctr = 0;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
return StyleSheet;
|
|
145
|
-
}();
|
|
146
|
-
|
|
147
|
-
var MS = '-ms-';
|
|
148
|
-
var MOZ = '-moz-';
|
|
149
|
-
var WEBKIT = '-webkit-';
|
|
150
|
-
|
|
151
|
-
var COMMENT = 'comm';
|
|
152
|
-
var RULESET = 'rule';
|
|
153
|
-
var DECLARATION = 'decl';
|
|
154
|
-
var IMPORT = '@import';
|
|
155
|
-
var KEYFRAMES = '@keyframes';
|
|
156
|
-
var LAYER = '@layer';
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* @param {number}
|
|
160
|
-
* @return {number}
|
|
161
|
-
*/
|
|
162
|
-
var abs = Math.abs;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* @param {number}
|
|
166
|
-
* @return {string}
|
|
167
|
-
*/
|
|
168
|
-
var from = String.fromCharCode;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @param {object}
|
|
172
|
-
* @return {object}
|
|
173
|
-
*/
|
|
174
|
-
var assign = Object.assign;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* @param {string} value
|
|
178
|
-
* @param {number} length
|
|
179
|
-
* @return {number}
|
|
180
|
-
*/
|
|
181
|
-
function hash (value, length) {
|
|
182
|
-
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @param {string} value
|
|
187
|
-
* @return {string}
|
|
188
|
-
*/
|
|
189
|
-
function trim (value) {
|
|
190
|
-
return value.trim()
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* @param {string} value
|
|
195
|
-
* @param {RegExp} pattern
|
|
196
|
-
* @return {string?}
|
|
197
|
-
*/
|
|
198
|
-
function match (value, pattern) {
|
|
199
|
-
return (value = pattern.exec(value)) ? value[0] : value
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* @param {string} value
|
|
204
|
-
* @param {(string|RegExp)} pattern
|
|
205
|
-
* @param {string} replacement
|
|
206
|
-
* @return {string}
|
|
207
|
-
*/
|
|
208
|
-
function replace (value, pattern, replacement) {
|
|
209
|
-
return value.replace(pattern, replacement)
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* @param {string} value
|
|
214
|
-
* @param {string} search
|
|
215
|
-
* @return {number}
|
|
216
|
-
*/
|
|
217
|
-
function indexof (value, search) {
|
|
218
|
-
return value.indexOf(search)
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* @param {string} value
|
|
223
|
-
* @param {number} index
|
|
224
|
-
* @return {number}
|
|
225
|
-
*/
|
|
226
|
-
function charat (value, index) {
|
|
227
|
-
return value.charCodeAt(index) | 0
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* @param {string} value
|
|
232
|
-
* @param {number} begin
|
|
233
|
-
* @param {number} end
|
|
234
|
-
* @return {string}
|
|
235
|
-
*/
|
|
236
|
-
function substr (value, begin, end) {
|
|
237
|
-
return value.slice(begin, end)
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* @param {string} value
|
|
242
|
-
* @return {number}
|
|
243
|
-
*/
|
|
244
|
-
function strlen (value) {
|
|
245
|
-
return value.length
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* @param {any[]} value
|
|
250
|
-
* @return {number}
|
|
251
|
-
*/
|
|
252
|
-
function sizeof (value) {
|
|
253
|
-
return value.length
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* @param {any} value
|
|
258
|
-
* @param {any[]} array
|
|
259
|
-
* @return {any}
|
|
260
|
-
*/
|
|
261
|
-
function append (value, array) {
|
|
262
|
-
return array.push(value), value
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* @param {string[]} array
|
|
267
|
-
* @param {function} callback
|
|
268
|
-
* @return {string}
|
|
269
|
-
*/
|
|
270
|
-
function combine (array, callback) {
|
|
271
|
-
return array.map(callback).join('')
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
var line = 1;
|
|
275
|
-
var column = 1;
|
|
276
|
-
var length = 0;
|
|
277
|
-
var position = 0;
|
|
278
|
-
var character = 0;
|
|
279
|
-
var characters = '';
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* @param {string} value
|
|
283
|
-
* @param {object | null} root
|
|
284
|
-
* @param {object | null} parent
|
|
285
|
-
* @param {string} type
|
|
286
|
-
* @param {string[] | string} props
|
|
287
|
-
* @param {object[] | string} children
|
|
288
|
-
* @param {number} length
|
|
289
|
-
*/
|
|
290
|
-
function node (value, root, parent, type, props, children, length) {
|
|
291
|
-
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* @param {object} root
|
|
296
|
-
* @param {object} props
|
|
297
|
-
* @return {object}
|
|
298
|
-
*/
|
|
299
|
-
function copy (root, props) {
|
|
300
|
-
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* @return {number}
|
|
305
|
-
*/
|
|
306
|
-
function char () {
|
|
307
|
-
return character
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* @return {number}
|
|
312
|
-
*/
|
|
313
|
-
function prev () {
|
|
314
|
-
character = position > 0 ? charat(characters, --position) : 0;
|
|
315
|
-
|
|
316
|
-
if (column--, character === 10)
|
|
317
|
-
column = 1, line--;
|
|
318
|
-
|
|
319
|
-
return character
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* @return {number}
|
|
324
|
-
*/
|
|
325
|
-
function next () {
|
|
326
|
-
character = position < length ? charat(characters, position++) : 0;
|
|
327
|
-
|
|
328
|
-
if (column++, character === 10)
|
|
329
|
-
column = 1, line++;
|
|
330
|
-
|
|
331
|
-
return character
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* @return {number}
|
|
336
|
-
*/
|
|
337
|
-
function peek () {
|
|
338
|
-
return charat(characters, position)
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* @return {number}
|
|
343
|
-
*/
|
|
344
|
-
function caret () {
|
|
345
|
-
return position
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* @param {number} begin
|
|
350
|
-
* @param {number} end
|
|
351
|
-
* @return {string}
|
|
352
|
-
*/
|
|
353
|
-
function slice (begin, end) {
|
|
354
|
-
return substr(characters, begin, end)
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* @param {number} type
|
|
359
|
-
* @return {number}
|
|
360
|
-
*/
|
|
361
|
-
function token (type) {
|
|
362
|
-
switch (type) {
|
|
363
|
-
// \0 \t \n \r \s whitespace token
|
|
364
|
-
case 0: case 9: case 10: case 13: case 32:
|
|
365
|
-
return 5
|
|
366
|
-
// ! + , / > @ ~ isolate token
|
|
367
|
-
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
|
368
|
-
// ; { } breakpoint token
|
|
369
|
-
case 59: case 123: case 125:
|
|
370
|
-
return 4
|
|
371
|
-
// : accompanied token
|
|
372
|
-
case 58:
|
|
373
|
-
return 3
|
|
374
|
-
// " ' ( [ opening delimit token
|
|
375
|
-
case 34: case 39: case 40: case 91:
|
|
376
|
-
return 2
|
|
377
|
-
// ) ] closing delimit token
|
|
378
|
-
case 41: case 93:
|
|
379
|
-
return 1
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
return 0
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* @param {string} value
|
|
387
|
-
* @return {any[]}
|
|
388
|
-
*/
|
|
389
|
-
function alloc (value) {
|
|
390
|
-
return line = column = 1, length = strlen(characters = value), position = 0, []
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* @param {any} value
|
|
395
|
-
* @return {any}
|
|
396
|
-
*/
|
|
397
|
-
function dealloc (value) {
|
|
398
|
-
return characters = '', value
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* @param {number} type
|
|
403
|
-
* @return {string}
|
|
404
|
-
*/
|
|
405
|
-
function delimit (type) {
|
|
406
|
-
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* @param {number} type
|
|
411
|
-
* @return {string}
|
|
412
|
-
*/
|
|
413
|
-
function whitespace (type) {
|
|
414
|
-
while (character = peek())
|
|
415
|
-
if (character < 33)
|
|
416
|
-
next();
|
|
417
|
-
else
|
|
418
|
-
break
|
|
419
|
-
|
|
420
|
-
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* @param {number} index
|
|
425
|
-
* @param {number} count
|
|
426
|
-
* @return {string}
|
|
427
|
-
*/
|
|
428
|
-
function escaping (index, count) {
|
|
429
|
-
while (--count && next())
|
|
430
|
-
// not 0-9 A-F a-f
|
|
431
|
-
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
|
|
432
|
-
break
|
|
433
|
-
|
|
434
|
-
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* @param {number} type
|
|
439
|
-
* @return {number}
|
|
440
|
-
*/
|
|
441
|
-
function delimiter (type) {
|
|
442
|
-
while (next())
|
|
443
|
-
switch (character) {
|
|
444
|
-
// ] ) " '
|
|
445
|
-
case type:
|
|
446
|
-
return position
|
|
447
|
-
// " '
|
|
448
|
-
case 34: case 39:
|
|
449
|
-
if (type !== 34 && type !== 39)
|
|
450
|
-
delimiter(character);
|
|
451
|
-
break
|
|
452
|
-
// (
|
|
453
|
-
case 40:
|
|
454
|
-
if (type === 41)
|
|
455
|
-
delimiter(type);
|
|
456
|
-
break
|
|
457
|
-
// \
|
|
458
|
-
case 92:
|
|
459
|
-
next();
|
|
460
|
-
break
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
return position
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* @param {number} type
|
|
468
|
-
* @param {number} index
|
|
469
|
-
* @return {number}
|
|
470
|
-
*/
|
|
471
|
-
function commenter (type, index) {
|
|
472
|
-
while (next())
|
|
473
|
-
// //
|
|
474
|
-
if (type + character === 47 + 10)
|
|
475
|
-
break
|
|
476
|
-
// /*
|
|
477
|
-
else if (type + character === 42 + 42 && peek() === 47)
|
|
478
|
-
break
|
|
479
|
-
|
|
480
|
-
return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* @param {number} index
|
|
485
|
-
* @return {string}
|
|
486
|
-
*/
|
|
487
|
-
function identifier (index) {
|
|
488
|
-
while (!token(peek()))
|
|
489
|
-
next();
|
|
490
|
-
|
|
491
|
-
return slice(index, position)
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* @param {string} value
|
|
496
|
-
* @return {object[]}
|
|
497
|
-
*/
|
|
498
|
-
function compile (value) {
|
|
499
|
-
return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* @param {string} value
|
|
504
|
-
* @param {object} root
|
|
505
|
-
* @param {object?} parent
|
|
506
|
-
* @param {string[]} rule
|
|
507
|
-
* @param {string[]} rules
|
|
508
|
-
* @param {string[]} rulesets
|
|
509
|
-
* @param {number[]} pseudo
|
|
510
|
-
* @param {number[]} points
|
|
511
|
-
* @param {string[]} declarations
|
|
512
|
-
* @return {object}
|
|
513
|
-
*/
|
|
514
|
-
function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
515
|
-
var index = 0;
|
|
516
|
-
var offset = 0;
|
|
517
|
-
var length = pseudo;
|
|
518
|
-
var atrule = 0;
|
|
519
|
-
var property = 0;
|
|
520
|
-
var previous = 0;
|
|
521
|
-
var variable = 1;
|
|
522
|
-
var scanning = 1;
|
|
523
|
-
var ampersand = 1;
|
|
524
|
-
var character = 0;
|
|
525
|
-
var type = '';
|
|
526
|
-
var props = rules;
|
|
527
|
-
var children = rulesets;
|
|
528
|
-
var reference = rule;
|
|
529
|
-
var characters = type;
|
|
530
|
-
|
|
531
|
-
while (scanning)
|
|
532
|
-
switch (previous = character, character = next()) {
|
|
533
|
-
// (
|
|
534
|
-
case 40:
|
|
535
|
-
if (previous != 108 && charat(characters, length - 1) == 58) {
|
|
536
|
-
if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1)
|
|
537
|
-
ampersand = -1;
|
|
538
|
-
break
|
|
539
|
-
}
|
|
540
|
-
// " ' [
|
|
541
|
-
case 34: case 39: case 91:
|
|
542
|
-
characters += delimit(character);
|
|
543
|
-
break
|
|
544
|
-
// \t \n \r \s
|
|
545
|
-
case 9: case 10: case 13: case 32:
|
|
546
|
-
characters += whitespace(previous);
|
|
547
|
-
break
|
|
548
|
-
// \
|
|
549
|
-
case 92:
|
|
550
|
-
characters += escaping(caret() - 1, 7);
|
|
551
|
-
continue
|
|
552
|
-
// /
|
|
553
|
-
case 47:
|
|
554
|
-
switch (peek()) {
|
|
555
|
-
case 42: case 47:
|
|
556
|
-
append(comment(commenter(next(), caret()), root, parent), declarations);
|
|
557
|
-
break
|
|
558
|
-
default:
|
|
559
|
-
characters += '/';
|
|
560
|
-
}
|
|
561
|
-
break
|
|
562
|
-
// {
|
|
563
|
-
case 123 * variable:
|
|
564
|
-
points[index++] = strlen(characters) * ampersand;
|
|
565
|
-
// } ; \0
|
|
566
|
-
case 125 * variable: case 59: case 0:
|
|
567
|
-
switch (character) {
|
|
568
|
-
// \0 }
|
|
569
|
-
case 0: case 125: scanning = 0;
|
|
570
|
-
// ;
|
|
571
|
-
case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
572
|
-
if (property > 0 && (strlen(characters) - length))
|
|
573
|
-
append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
|
574
|
-
break
|
|
575
|
-
// @ ;
|
|
576
|
-
case 59: characters += ';';
|
|
577
|
-
// { rule/at-rule
|
|
578
|
-
default:
|
|
579
|
-
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
|
580
|
-
|
|
581
|
-
if (character === 123)
|
|
582
|
-
if (offset === 0)
|
|
583
|
-
parse(characters, root, reference, reference, props, rulesets, length, points, children);
|
|
584
|
-
else
|
|
585
|
-
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
586
|
-
// d l m s
|
|
587
|
-
case 100: case 108: case 109: case 115:
|
|
588
|
-
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
|
589
|
-
break
|
|
590
|
-
default:
|
|
591
|
-
parse(characters, reference, reference, reference, [''], children, 0, points, children);
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
|
|
596
|
-
break
|
|
597
|
-
// :
|
|
598
|
-
case 58:
|
|
599
|
-
length = 1 + strlen(characters), property = previous;
|
|
600
|
-
default:
|
|
601
|
-
if (variable < 1)
|
|
602
|
-
if (character == 123)
|
|
603
|
-
--variable;
|
|
604
|
-
else if (character == 125 && variable++ == 0 && prev() == 125)
|
|
605
|
-
continue
|
|
606
|
-
|
|
607
|
-
switch (characters += from(character), character * variable) {
|
|
608
|
-
// &
|
|
609
|
-
case 38:
|
|
610
|
-
ampersand = offset > 0 ? 1 : (characters += '\f', -1);
|
|
611
|
-
break
|
|
612
|
-
// ,
|
|
613
|
-
case 44:
|
|
614
|
-
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
|
|
615
|
-
break
|
|
616
|
-
// @
|
|
617
|
-
case 64:
|
|
618
|
-
// -
|
|
619
|
-
if (peek() === 45)
|
|
620
|
-
characters += delimit(next());
|
|
621
|
-
|
|
622
|
-
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
|
|
623
|
-
break
|
|
624
|
-
// -
|
|
625
|
-
case 45:
|
|
626
|
-
if (previous === 45 && strlen(characters) == 2)
|
|
627
|
-
variable = 0;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
return rulesets
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
* @param {string} value
|
|
636
|
-
* @param {object} root
|
|
637
|
-
* @param {object?} parent
|
|
638
|
-
* @param {number} index
|
|
639
|
-
* @param {number} offset
|
|
640
|
-
* @param {string[]} rules
|
|
641
|
-
* @param {number[]} points
|
|
642
|
-
* @param {string} type
|
|
643
|
-
* @param {string[]} props
|
|
644
|
-
* @param {string[]} children
|
|
645
|
-
* @param {number} length
|
|
646
|
-
* @return {object}
|
|
647
|
-
*/
|
|
648
|
-
function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {
|
|
649
|
-
var post = offset - 1;
|
|
650
|
-
var rule = offset === 0 ? rules : [''];
|
|
651
|
-
var size = sizeof(rule);
|
|
652
|
-
|
|
653
|
-
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
654
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
|
|
655
|
-
if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
|
|
656
|
-
props[k++] = z;
|
|
657
|
-
|
|
658
|
-
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* @param {number} value
|
|
663
|
-
* @param {object} root
|
|
664
|
-
* @param {object?} parent
|
|
665
|
-
* @return {object}
|
|
666
|
-
*/
|
|
667
|
-
function comment (value, root, parent) {
|
|
668
|
-
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* @param {string} value
|
|
673
|
-
* @param {object} root
|
|
674
|
-
* @param {object?} parent
|
|
675
|
-
* @param {number} length
|
|
676
|
-
* @return {object}
|
|
677
|
-
*/
|
|
678
|
-
function declaration (value, root, parent, length) {
|
|
679
|
-
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* @param {object[]} children
|
|
684
|
-
* @param {function} callback
|
|
685
|
-
* @return {string}
|
|
686
|
-
*/
|
|
687
|
-
function serialize (children, callback) {
|
|
688
|
-
var output = '';
|
|
689
|
-
var length = sizeof(children);
|
|
690
|
-
|
|
691
|
-
for (var i = 0; i < length; i++)
|
|
692
|
-
output += callback(children[i], i, children, callback) || '';
|
|
693
|
-
|
|
694
|
-
return output
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* @param {object} element
|
|
699
|
-
* @param {number} index
|
|
700
|
-
* @param {object[]} children
|
|
701
|
-
* @param {function} callback
|
|
702
|
-
* @return {string}
|
|
703
|
-
*/
|
|
704
|
-
function stringify (element, index, children, callback) {
|
|
705
|
-
switch (element.type) {
|
|
706
|
-
case LAYER: if (element.children.length) break
|
|
707
|
-
case IMPORT: case DECLARATION: return element.return = element.return || element.value
|
|
708
|
-
case COMMENT: return ''
|
|
709
|
-
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
|
|
710
|
-
case RULESET: element.value = element.props.join(',');
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* @param {function[]} collection
|
|
718
|
-
* @return {function}
|
|
719
|
-
*/
|
|
720
|
-
function middleware (collection) {
|
|
721
|
-
var length = sizeof(collection);
|
|
722
|
-
|
|
723
|
-
return function (element, index, children, callback) {
|
|
724
|
-
var output = '';
|
|
725
|
-
|
|
726
|
-
for (var i = 0; i < length; i++)
|
|
727
|
-
output += collection[i](element, index, children, callback) || '';
|
|
728
|
-
|
|
729
|
-
return output
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* @param {function} callback
|
|
735
|
-
* @return {function}
|
|
736
|
-
*/
|
|
737
|
-
function rulesheet (callback) {
|
|
738
|
-
return function (element) {
|
|
739
|
-
if (!element.root)
|
|
740
|
-
if (element = element.return)
|
|
741
|
-
callback(element);
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
var weakMemoize = function weakMemoize(func) {
|
|
746
|
-
var cache = new WeakMap();
|
|
747
|
-
return function (arg) {
|
|
748
|
-
if (cache.has(arg)) {
|
|
749
|
-
// Use non-null assertion because we just checked that the cache `has` it
|
|
750
|
-
// This allows us to remove `undefined` from the return value
|
|
751
|
-
return cache.get(arg);
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
var ret = func(arg);
|
|
755
|
-
cache.set(arg, ret);
|
|
756
|
-
return ret;
|
|
757
|
-
};
|
|
758
|
-
};
|
|
759
|
-
|
|
760
|
-
function memoize(fn) {
|
|
761
|
-
var cache = Object.create(null);
|
|
762
|
-
return function (arg) {
|
|
763
|
-
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
764
|
-
return cache[arg];
|
|
765
|
-
};
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
var isBrowser$4 = typeof document !== 'undefined';
|
|
769
|
-
|
|
770
|
-
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
771
|
-
var previous = 0;
|
|
772
|
-
var character = 0;
|
|
773
|
-
|
|
774
|
-
while (true) {
|
|
775
|
-
previous = character;
|
|
776
|
-
character = peek(); // &\f
|
|
777
|
-
|
|
778
|
-
if (previous === 38 && character === 12) {
|
|
779
|
-
points[index] = 1;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
if (token(character)) {
|
|
783
|
-
break;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
next();
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
return slice(begin, position);
|
|
790
|
-
};
|
|
791
|
-
|
|
792
|
-
var toRules = function toRules(parsed, points) {
|
|
793
|
-
// pretend we've started with a comma
|
|
794
|
-
var index = -1;
|
|
795
|
-
var character = 44;
|
|
796
|
-
|
|
797
|
-
do {
|
|
798
|
-
switch (token(character)) {
|
|
799
|
-
case 0:
|
|
800
|
-
// &\f
|
|
801
|
-
if (character === 38 && peek() === 12) {
|
|
802
|
-
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
|
803
|
-
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
|
804
|
-
// and when it should just concatenate the outer and inner selectors
|
|
805
|
-
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
|
806
|
-
points[index] = 1;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
|
810
|
-
break;
|
|
811
|
-
|
|
812
|
-
case 2:
|
|
813
|
-
parsed[index] += delimit(character);
|
|
814
|
-
break;
|
|
815
|
-
|
|
816
|
-
case 4:
|
|
817
|
-
// comma
|
|
818
|
-
if (character === 44) {
|
|
819
|
-
// colon
|
|
820
|
-
parsed[++index] = peek() === 58 ? '&\f' : '';
|
|
821
|
-
points[index] = parsed[index].length;
|
|
822
|
-
break;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
// fallthrough
|
|
826
|
-
|
|
827
|
-
default:
|
|
828
|
-
parsed[index] += from(character);
|
|
829
|
-
}
|
|
830
|
-
} while (character = next());
|
|
831
|
-
|
|
832
|
-
return parsed;
|
|
833
|
-
};
|
|
834
|
-
|
|
835
|
-
var getRules = function getRules(value, points) {
|
|
836
|
-
return dealloc(toRules(alloc(value), points));
|
|
837
|
-
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
var fixedElements = /* #__PURE__ */new WeakMap();
|
|
841
|
-
var compat = function compat(element) {
|
|
842
|
-
if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
|
|
843
|
-
// negative .length indicates that this rule has been already prefixed
|
|
844
|
-
element.length < 1) {
|
|
845
|
-
return;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
var value = element.value;
|
|
849
|
-
var parent = element.parent;
|
|
850
|
-
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
851
|
-
|
|
852
|
-
while (parent.type !== 'rule') {
|
|
853
|
-
parent = parent.parent;
|
|
854
|
-
if (!parent) return;
|
|
855
|
-
} // short-circuit for the simplest case
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
if (element.props.length === 1 && value.charCodeAt(0) !== 58
|
|
859
|
-
/* colon */
|
|
860
|
-
&& !fixedElements.get(parent)) {
|
|
861
|
-
return;
|
|
862
|
-
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
|
|
863
|
-
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
if (isImplicitRule) {
|
|
867
|
-
return;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
fixedElements.set(element, true);
|
|
871
|
-
var points = [];
|
|
872
|
-
var rules = getRules(value, points);
|
|
873
|
-
var parentRules = parent.props;
|
|
874
|
-
|
|
875
|
-
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
876
|
-
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
877
|
-
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
};
|
|
881
|
-
var removeLabel = function removeLabel(element) {
|
|
882
|
-
if (element.type === 'decl') {
|
|
883
|
-
var value = element.value;
|
|
884
|
-
|
|
885
|
-
if ( // charcode for l
|
|
886
|
-
value.charCodeAt(0) === 108 && // charcode for b
|
|
887
|
-
value.charCodeAt(2) === 98) {
|
|
888
|
-
// this ignores label
|
|
889
|
-
element["return"] = '';
|
|
890
|
-
element.value = '';
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
/* eslint-disable no-fallthrough */
|
|
896
|
-
|
|
897
|
-
function prefix(value, length) {
|
|
898
|
-
switch (hash(value, length)) {
|
|
899
|
-
// color-adjust
|
|
900
|
-
case 5103:
|
|
901
|
-
return WEBKIT + 'print-' + value + value;
|
|
902
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
903
|
-
|
|
904
|
-
case 5737:
|
|
905
|
-
case 4201:
|
|
906
|
-
case 3177:
|
|
907
|
-
case 3433:
|
|
908
|
-
case 1641:
|
|
909
|
-
case 4457:
|
|
910
|
-
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
911
|
-
|
|
912
|
-
case 5572:
|
|
913
|
-
case 6356:
|
|
914
|
-
case 5844:
|
|
915
|
-
case 3191:
|
|
916
|
-
case 6645:
|
|
917
|
-
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
918
|
-
|
|
919
|
-
case 6391:
|
|
920
|
-
case 5879:
|
|
921
|
-
case 5623:
|
|
922
|
-
case 6135:
|
|
923
|
-
case 4599:
|
|
924
|
-
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
925
|
-
|
|
926
|
-
case 4215:
|
|
927
|
-
case 6389:
|
|
928
|
-
case 5109:
|
|
929
|
-
case 5365:
|
|
930
|
-
case 5621:
|
|
931
|
-
case 3829:
|
|
932
|
-
return WEBKIT + value + value;
|
|
933
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
934
|
-
|
|
935
|
-
case 5349:
|
|
936
|
-
case 4246:
|
|
937
|
-
case 4810:
|
|
938
|
-
case 6968:
|
|
939
|
-
case 2756:
|
|
940
|
-
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
941
|
-
// flex, flex-direction
|
|
942
|
-
|
|
943
|
-
case 6828:
|
|
944
|
-
case 4268:
|
|
945
|
-
return WEBKIT + value + MS + value + value;
|
|
946
|
-
// order
|
|
947
|
-
|
|
948
|
-
case 6165:
|
|
949
|
-
return WEBKIT + value + MS + 'flex-' + value + value;
|
|
950
|
-
// align-items
|
|
951
|
-
|
|
952
|
-
case 5187:
|
|
953
|
-
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
|
|
954
|
-
// align-self
|
|
955
|
-
|
|
956
|
-
case 5443:
|
|
957
|
-
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
|
|
958
|
-
// align-content
|
|
959
|
-
|
|
960
|
-
case 4675:
|
|
961
|
-
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
|
|
962
|
-
// flex-shrink
|
|
963
|
-
|
|
964
|
-
case 5548:
|
|
965
|
-
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
|
|
966
|
-
// flex-basis
|
|
967
|
-
|
|
968
|
-
case 5292:
|
|
969
|
-
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
|
|
970
|
-
// flex-grow
|
|
971
|
-
|
|
972
|
-
case 6060:
|
|
973
|
-
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
|
|
974
|
-
// transition
|
|
975
|
-
|
|
976
|
-
case 4554:
|
|
977
|
-
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
|
|
978
|
-
// cursor
|
|
979
|
-
|
|
980
|
-
case 6187:
|
|
981
|
-
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
|
|
982
|
-
// background, background-image
|
|
983
|
-
|
|
984
|
-
case 5495:
|
|
985
|
-
case 3959:
|
|
986
|
-
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
|
|
987
|
-
// justify-content
|
|
988
|
-
|
|
989
|
-
case 4968:
|
|
990
|
-
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
|
|
991
|
-
// (margin|padding)-inline-(start|end)
|
|
992
|
-
|
|
993
|
-
case 4095:
|
|
994
|
-
case 3583:
|
|
995
|
-
case 4068:
|
|
996
|
-
case 2532:
|
|
997
|
-
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
|
|
998
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
999
|
-
|
|
1000
|
-
case 8116:
|
|
1001
|
-
case 7059:
|
|
1002
|
-
case 5753:
|
|
1003
|
-
case 5535:
|
|
1004
|
-
case 5445:
|
|
1005
|
-
case 5701:
|
|
1006
|
-
case 4933:
|
|
1007
|
-
case 4677:
|
|
1008
|
-
case 5533:
|
|
1009
|
-
case 5789:
|
|
1010
|
-
case 5021:
|
|
1011
|
-
case 4765:
|
|
1012
|
-
// stretch, max-content, min-content, fill-available
|
|
1013
|
-
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
|
|
1014
|
-
// (m)ax-content, (m)in-content
|
|
1015
|
-
case 109:
|
|
1016
|
-
// -
|
|
1017
|
-
if (charat(value, length + 4) !== 45) break;
|
|
1018
|
-
// (f)ill-available, (f)it-content
|
|
1019
|
-
|
|
1020
|
-
case 102:
|
|
1021
|
-
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
1022
|
-
// (s)tretch
|
|
1023
|
-
|
|
1024
|
-
case 115:
|
|
1025
|
-
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
|
|
1026
|
-
}
|
|
1027
|
-
break;
|
|
1028
|
-
// position: sticky
|
|
1029
|
-
|
|
1030
|
-
case 4949:
|
|
1031
|
-
// (s)ticky?
|
|
1032
|
-
if (charat(value, length + 1) !== 115) break;
|
|
1033
|
-
// display: (flex|inline-flex)
|
|
1034
|
-
|
|
1035
|
-
case 6444:
|
|
1036
|
-
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
|
|
1037
|
-
// stic(k)y
|
|
1038
|
-
case 107:
|
|
1039
|
-
return replace(value, ':', ':' + WEBKIT) + value;
|
|
1040
|
-
// (inline-)?fl(e)x
|
|
1041
|
-
|
|
1042
|
-
case 101:
|
|
1043
|
-
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
break;
|
|
1047
|
-
// writing-mode
|
|
1048
|
-
|
|
1049
|
-
case 5936:
|
|
1050
|
-
switch (charat(value, length + 11)) {
|
|
1051
|
-
// vertical-l(r)
|
|
1052
|
-
case 114:
|
|
1053
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
1054
|
-
// vertical-r(l)
|
|
1055
|
-
|
|
1056
|
-
case 108:
|
|
1057
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
1058
|
-
// horizontal(-)tb
|
|
1059
|
-
|
|
1060
|
-
case 45:
|
|
1061
|
-
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
return WEBKIT + value + MS + value + value;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
return value;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
var prefixer = function prefixer(element, index, children, callback) {
|
|
1071
|
-
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
|
1072
|
-
case DECLARATION:
|
|
1073
|
-
element["return"] = prefix(element.value, element.length);
|
|
1074
|
-
break;
|
|
1075
|
-
|
|
1076
|
-
case KEYFRAMES:
|
|
1077
|
-
return serialize([copy(element, {
|
|
1078
|
-
value: replace(element.value, '@', '@' + WEBKIT)
|
|
1079
|
-
})], callback);
|
|
1080
|
-
|
|
1081
|
-
case RULESET:
|
|
1082
|
-
if (element.length) return combine(element.props, function (value) {
|
|
1083
|
-
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
|
1084
|
-
// :read-(only|write)
|
|
1085
|
-
case ':read-only':
|
|
1086
|
-
case ':read-write':
|
|
1087
|
-
return serialize([copy(element, {
|
|
1088
|
-
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
|
|
1089
|
-
})], callback);
|
|
1090
|
-
// :placeholder
|
|
1091
|
-
|
|
1092
|
-
case '::placeholder':
|
|
1093
|
-
return serialize([copy(element, {
|
|
1094
|
-
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
|
|
1095
|
-
}), copy(element, {
|
|
1096
|
-
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
|
|
1097
|
-
}), copy(element, {
|
|
1098
|
-
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
|
|
1099
|
-
})], callback);
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
return '';
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
};
|
|
1106
|
-
|
|
1107
|
-
var getServerStylisCache = isBrowser$4 ? undefined : weakMemoize(function () {
|
|
1108
|
-
return memoize(function () {
|
|
1109
|
-
return {};
|
|
1110
|
-
});
|
|
1111
|
-
});
|
|
1112
|
-
var defaultStylisPlugins = [prefixer];
|
|
1113
|
-
|
|
1114
|
-
var createCache = function createCache(options) {
|
|
1115
|
-
var key = options.key;
|
|
1116
|
-
|
|
1117
|
-
if (isBrowser$4 && key === 'css') {
|
|
1118
|
-
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
1119
|
-
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
1120
|
-
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
1121
|
-
// that creating a cache works inside of render of a React component
|
|
1122
|
-
|
|
1123
|
-
Array.prototype.forEach.call(ssrStyles, function (node) {
|
|
1124
|
-
// we want to only move elements which have a space in the data-emotion attribute value
|
|
1125
|
-
// because that indicates that it is an Emotion 11 server-side rendered style elements
|
|
1126
|
-
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
|
|
1127
|
-
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
|
|
1128
|
-
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
|
|
1129
|
-
// will not result in the Emotion 10 styles being destroyed
|
|
1130
|
-
var dataEmotionAttribute = node.getAttribute('data-emotion');
|
|
1131
|
-
|
|
1132
|
-
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
|
1133
|
-
return;
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
document.head.appendChild(node);
|
|
1137
|
-
node.setAttribute('data-s', '');
|
|
1138
|
-
});
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
1142
|
-
|
|
1143
|
-
var inserted = {};
|
|
1144
|
-
var container;
|
|
1145
|
-
var nodesToHydrate = [];
|
|
1146
|
-
|
|
1147
|
-
if (isBrowser$4) {
|
|
1148
|
-
container = options.container || document.head;
|
|
1149
|
-
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
1150
|
-
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1151
|
-
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
|
1152
|
-
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1153
|
-
|
|
1154
|
-
for (var i = 1; i < attrib.length; i++) {
|
|
1155
|
-
inserted[attrib[i]] = true;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
nodesToHydrate.push(node);
|
|
1159
|
-
});
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
var _insert;
|
|
1163
|
-
|
|
1164
|
-
var omnipresentPlugins = [compat, removeLabel];
|
|
1165
|
-
|
|
1166
|
-
if (!getServerStylisCache) {
|
|
1167
|
-
var currentSheet;
|
|
1168
|
-
var finalizingPlugins = [stringify, rulesheet(function (rule) {
|
|
1169
|
-
currentSheet.insert(rule);
|
|
1170
|
-
})];
|
|
1171
|
-
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
1172
|
-
|
|
1173
|
-
var stylis = function stylis(styles) {
|
|
1174
|
-
return serialize(compile(styles), serializer);
|
|
1175
|
-
};
|
|
1176
|
-
|
|
1177
|
-
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
1178
|
-
currentSheet = sheet;
|
|
1179
|
-
|
|
1180
|
-
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1181
|
-
|
|
1182
|
-
if (shouldCache) {
|
|
1183
|
-
cache.inserted[serialized.name] = true;
|
|
1184
|
-
}
|
|
1185
|
-
};
|
|
1186
|
-
} else {
|
|
1187
|
-
var _finalizingPlugins = [stringify];
|
|
1188
|
-
|
|
1189
|
-
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
1190
|
-
|
|
1191
|
-
var _stylis = function _stylis(styles) {
|
|
1192
|
-
return serialize(compile(styles), _serializer);
|
|
1193
|
-
};
|
|
1194
|
-
|
|
1195
|
-
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1196
|
-
|
|
1197
|
-
var getRules = function getRules(selector, serialized) {
|
|
1198
|
-
var name = serialized.name;
|
|
1199
|
-
|
|
1200
|
-
if (serverStylisCache[name] === undefined) {
|
|
1201
|
-
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
return serverStylisCache[name];
|
|
1205
|
-
};
|
|
1206
|
-
|
|
1207
|
-
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
|
1208
|
-
var name = serialized.name;
|
|
1209
|
-
var rules = getRules(selector, serialized);
|
|
1210
|
-
|
|
1211
|
-
if (cache.compat === undefined) {
|
|
1212
|
-
// in regular mode, we don't set the styles on the inserted cache
|
|
1213
|
-
// since we don't need to and that would be wasting memory
|
|
1214
|
-
// we return them so that they are rendered in a style tag
|
|
1215
|
-
if (shouldCache) {
|
|
1216
|
-
cache.inserted[name] = true;
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
return rules;
|
|
1220
|
-
} else {
|
|
1221
|
-
// in compat mode, we put the styles on the inserted cache so
|
|
1222
|
-
// that emotion-server can pull out the styles
|
|
1223
|
-
// except when we don't want to cache it which was in Global but now
|
|
1224
|
-
// is nowhere but we don't want to do a major right now
|
|
1225
|
-
// and just in case we're going to leave the case here
|
|
1226
|
-
// it's also not affecting client side bundle size
|
|
1227
|
-
// so it's really not a big deal
|
|
1228
|
-
if (shouldCache) {
|
|
1229
|
-
cache.inserted[name] = rules;
|
|
1230
|
-
} else {
|
|
1231
|
-
return rules;
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
};
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
var cache = {
|
|
1238
|
-
key: key,
|
|
1239
|
-
sheet: new StyleSheet({
|
|
1240
|
-
key: key,
|
|
1241
|
-
container: container,
|
|
1242
|
-
nonce: options.nonce,
|
|
1243
|
-
speedy: options.speedy,
|
|
1244
|
-
prepend: options.prepend,
|
|
1245
|
-
insertionPoint: options.insertionPoint
|
|
1246
|
-
}),
|
|
1247
|
-
nonce: options.nonce,
|
|
1248
|
-
inserted: inserted,
|
|
1249
|
-
registered: {},
|
|
1250
|
-
insert: _insert
|
|
1251
|
-
};
|
|
1252
|
-
cache.sheet.hydrate(nodesToHydrate);
|
|
1253
|
-
return cache;
|
|
1254
|
-
};
|
|
1255
|
-
|
|
1256
|
-
function _extends() {
|
|
1257
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
1258
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1259
|
-
var t = arguments[e];
|
|
1260
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1261
|
-
}
|
|
1262
|
-
return n;
|
|
1263
|
-
}, _extends.apply(null, arguments);
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
var reactIs$1 = {exports: {}};
|
|
1267
|
-
|
|
1268
|
-
var reactIs_production_min = {};
|
|
1269
|
-
|
|
1270
|
-
/** @license React v16.13.1
|
|
1271
|
-
* react-is.production.min.js
|
|
1272
|
-
*
|
|
1273
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1274
|
-
*
|
|
1275
|
-
* This source code is licensed under the MIT license found in the
|
|
1276
|
-
* LICENSE file in the root directory of this source tree.
|
|
1277
|
-
*/
|
|
1278
|
-
|
|
1279
|
-
var hasRequiredReactIs_production_min;
|
|
1280
|
-
|
|
1281
|
-
function requireReactIs_production_min () {
|
|
1282
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
1283
|
-
hasRequiredReactIs_production_min = 1;
|
|
1284
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
1285
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
1286
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
1287
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
|
1288
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
1289
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
1290
|
-
return reactIs_production_min;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
var reactIs_development = {};
|
|
1294
|
-
|
|
1295
|
-
/** @license React v16.13.1
|
|
1296
|
-
* react-is.development.js
|
|
1297
|
-
*
|
|
1298
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1299
|
-
*
|
|
1300
|
-
* This source code is licensed under the MIT license found in the
|
|
1301
|
-
* LICENSE file in the root directory of this source tree.
|
|
1302
|
-
*/
|
|
1303
|
-
|
|
1304
|
-
var hasRequiredReactIs_development;
|
|
1305
|
-
|
|
1306
|
-
function requireReactIs_development () {
|
|
1307
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
1308
|
-
hasRequiredReactIs_development = 1;
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1313
|
-
(function() {
|
|
1314
|
-
|
|
1315
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
1316
|
-
// nor polyfill, then a plain number is used for performance.
|
|
1317
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
1318
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
1319
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
1320
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
1321
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
1322
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
1323
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
1324
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
1325
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
1326
|
-
|
|
1327
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
1328
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
1329
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
1330
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
1331
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
1332
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
1333
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
1334
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
1335
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
1336
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
1337
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
1338
|
-
|
|
1339
|
-
function isValidElementType(type) {
|
|
1340
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1341
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
function typeOf(object) {
|
|
1345
|
-
if (typeof object === 'object' && object !== null) {
|
|
1346
|
-
var $$typeof = object.$$typeof;
|
|
1347
|
-
|
|
1348
|
-
switch ($$typeof) {
|
|
1349
|
-
case REACT_ELEMENT_TYPE:
|
|
1350
|
-
var type = object.type;
|
|
1351
|
-
|
|
1352
|
-
switch (type) {
|
|
1353
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
1354
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
1355
|
-
case REACT_FRAGMENT_TYPE:
|
|
1356
|
-
case REACT_PROFILER_TYPE:
|
|
1357
|
-
case REACT_STRICT_MODE_TYPE:
|
|
1358
|
-
case REACT_SUSPENSE_TYPE:
|
|
1359
|
-
return type;
|
|
1360
|
-
|
|
1361
|
-
default:
|
|
1362
|
-
var $$typeofType = type && type.$$typeof;
|
|
1363
|
-
|
|
1364
|
-
switch ($$typeofType) {
|
|
1365
|
-
case REACT_CONTEXT_TYPE:
|
|
1366
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1367
|
-
case REACT_LAZY_TYPE:
|
|
1368
|
-
case REACT_MEMO_TYPE:
|
|
1369
|
-
case REACT_PROVIDER_TYPE:
|
|
1370
|
-
return $$typeofType;
|
|
1371
|
-
|
|
1372
|
-
default:
|
|
1373
|
-
return $$typeof;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
case REACT_PORTAL_TYPE:
|
|
1379
|
-
return $$typeof;
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
return undefined;
|
|
1384
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
1385
|
-
|
|
1386
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
1387
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
1388
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
1389
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
1390
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
1391
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1392
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
1393
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
1394
|
-
var Memo = REACT_MEMO_TYPE;
|
|
1395
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
1396
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
1397
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1398
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
1399
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
1400
|
-
|
|
1401
|
-
function isAsyncMode(object) {
|
|
1402
|
-
{
|
|
1403
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
1404
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
1405
|
-
|
|
1406
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
1411
|
-
}
|
|
1412
|
-
function isConcurrentMode(object) {
|
|
1413
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
1414
|
-
}
|
|
1415
|
-
function isContextConsumer(object) {
|
|
1416
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1417
|
-
}
|
|
1418
|
-
function isContextProvider(object) {
|
|
1419
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
1420
|
-
}
|
|
1421
|
-
function isElement(object) {
|
|
1422
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1423
|
-
}
|
|
1424
|
-
function isForwardRef(object) {
|
|
1425
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1426
|
-
}
|
|
1427
|
-
function isFragment(object) {
|
|
1428
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1429
|
-
}
|
|
1430
|
-
function isLazy(object) {
|
|
1431
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1432
|
-
}
|
|
1433
|
-
function isMemo(object) {
|
|
1434
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1435
|
-
}
|
|
1436
|
-
function isPortal(object) {
|
|
1437
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1438
|
-
}
|
|
1439
|
-
function isProfiler(object) {
|
|
1440
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1441
|
-
}
|
|
1442
|
-
function isStrictMode(object) {
|
|
1443
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1444
|
-
}
|
|
1445
|
-
function isSuspense(object) {
|
|
1446
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
1450
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
1451
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
1452
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
1453
|
-
reactIs_development.Element = Element;
|
|
1454
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
1455
|
-
reactIs_development.Fragment = Fragment;
|
|
1456
|
-
reactIs_development.Lazy = Lazy;
|
|
1457
|
-
reactIs_development.Memo = Memo;
|
|
1458
|
-
reactIs_development.Portal = Portal;
|
|
1459
|
-
reactIs_development.Profiler = Profiler;
|
|
1460
|
-
reactIs_development.StrictMode = StrictMode;
|
|
1461
|
-
reactIs_development.Suspense = Suspense;
|
|
1462
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
1463
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
1464
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
1465
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
1466
|
-
reactIs_development.isElement = isElement;
|
|
1467
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
1468
|
-
reactIs_development.isFragment = isFragment;
|
|
1469
|
-
reactIs_development.isLazy = isLazy;
|
|
1470
|
-
reactIs_development.isMemo = isMemo;
|
|
1471
|
-
reactIs_development.isPortal = isPortal;
|
|
1472
|
-
reactIs_development.isProfiler = isProfiler;
|
|
1473
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
1474
|
-
reactIs_development.isSuspense = isSuspense;
|
|
1475
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
1476
|
-
reactIs_development.typeOf = typeOf;
|
|
1477
|
-
})();
|
|
1478
|
-
}
|
|
1479
|
-
return reactIs_development;
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
if (process.env.NODE_ENV === 'production') {
|
|
1483
|
-
reactIs$1.exports = requireReactIs_production_min();
|
|
1484
|
-
} else {
|
|
1485
|
-
reactIs$1.exports = requireReactIs_development();
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
var reactIsExports = reactIs$1.exports;
|
|
1489
|
-
|
|
1490
|
-
var reactIs = reactIsExports;
|
|
1491
|
-
var FORWARD_REF_STATICS = {
|
|
1492
|
-
'$$typeof': true,
|
|
1493
|
-
render: true,
|
|
1494
|
-
defaultProps: true,
|
|
1495
|
-
displayName: true,
|
|
1496
|
-
propTypes: true
|
|
1497
|
-
};
|
|
1498
|
-
var MEMO_STATICS = {
|
|
1499
|
-
'$$typeof': true,
|
|
1500
|
-
compare: true,
|
|
1501
|
-
defaultProps: true,
|
|
1502
|
-
displayName: true,
|
|
1503
|
-
propTypes: true,
|
|
1504
|
-
type: true
|
|
1505
|
-
};
|
|
1506
|
-
var TYPE_STATICS = {};
|
|
1507
|
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
1508
|
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
1509
|
-
|
|
1510
|
-
var isBrowser$3 = typeof document !== 'undefined';
|
|
1511
|
-
|
|
1512
|
-
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1513
|
-
var rawClassName = '';
|
|
1514
|
-
classNames.split(' ').forEach(function (className) {
|
|
1515
|
-
if (registered[className] !== undefined) {
|
|
1516
|
-
registeredStyles.push(registered[className] + ";");
|
|
1517
|
-
} else if (className) {
|
|
1518
|
-
rawClassName += className + " ";
|
|
1519
|
-
}
|
|
1520
|
-
});
|
|
1521
|
-
return rawClassName;
|
|
1522
|
-
}
|
|
1523
|
-
var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
1524
|
-
var className = cache.key + "-" + serialized.name;
|
|
1525
|
-
|
|
1526
|
-
if ( // we only need to add the styles to the registered cache if the
|
|
1527
|
-
// class name could be used further down
|
|
1528
|
-
// the tree but if it's a string tag, we know it won't
|
|
1529
|
-
// so we don't have to add it to registered cache.
|
|
1530
|
-
// this improves memory usage since we can avoid storing the whole style string
|
|
1531
|
-
(isStringTag === false || // we need to always store it if we're in compat mode and
|
|
1532
|
-
// in node since emotion-server relies on whether a style is in
|
|
1533
|
-
// the registered cache to know whether a style is global or not
|
|
1534
|
-
// also, note that this check will be dead code eliminated in the browser
|
|
1535
|
-
isBrowser$3 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
1536
|
-
cache.registered[className] = serialized.styles;
|
|
1537
|
-
}
|
|
1538
|
-
};
|
|
1539
|
-
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
1540
|
-
registerStyles(cache, serialized, isStringTag);
|
|
1541
|
-
var className = cache.key + "-" + serialized.name;
|
|
1542
|
-
|
|
1543
|
-
if (cache.inserted[serialized.name] === undefined) {
|
|
1544
|
-
var stylesForSSR = '';
|
|
1545
|
-
var current = serialized;
|
|
1546
|
-
|
|
1547
|
-
do {
|
|
1548
|
-
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
1549
|
-
|
|
1550
|
-
if (!isBrowser$3 && maybeStyles !== undefined) {
|
|
1551
|
-
stylesForSSR += maybeStyles;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
current = current.next;
|
|
1555
|
-
} while (current !== undefined);
|
|
1556
|
-
|
|
1557
|
-
if (!isBrowser$3 && stylesForSSR.length !== 0) {
|
|
1558
|
-
return stylesForSSR;
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
};
|
|
1562
|
-
|
|
1563
|
-
/* eslint-disable */
|
|
1564
|
-
// Inspired by https://github.com/garycourt/murmurhash-js
|
|
1565
|
-
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
|
1566
|
-
function murmur2(str) {
|
|
1567
|
-
// 'm' and 'r' are mixing constants generated offline.
|
|
1568
|
-
// They're not really 'magic', they just happen to work well.
|
|
1569
|
-
// const m = 0x5bd1e995;
|
|
1570
|
-
// const r = 24;
|
|
1571
|
-
// Initialize the hash
|
|
1572
|
-
var h = 0; // Mix 4 bytes at a time into the hash
|
|
1573
|
-
|
|
1574
|
-
var k,
|
|
1575
|
-
i = 0,
|
|
1576
|
-
len = str.length;
|
|
1577
|
-
|
|
1578
|
-
for (; len >= 4; ++i, len -= 4) {
|
|
1579
|
-
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
|
1580
|
-
k =
|
|
1581
|
-
/* Math.imul(k, m): */
|
|
1582
|
-
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
|
1583
|
-
k ^=
|
|
1584
|
-
/* k >>> r: */
|
|
1585
|
-
k >>> 24;
|
|
1586
|
-
h =
|
|
1587
|
-
/* Math.imul(k, m): */
|
|
1588
|
-
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
|
|
1589
|
-
/* Math.imul(h, m): */
|
|
1590
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1591
|
-
} // Handle the last few bytes of the input array
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
switch (len) {
|
|
1595
|
-
case 3:
|
|
1596
|
-
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
|
1597
|
-
|
|
1598
|
-
case 2:
|
|
1599
|
-
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
|
1600
|
-
|
|
1601
|
-
case 1:
|
|
1602
|
-
h ^= str.charCodeAt(i) & 0xff;
|
|
1603
|
-
h =
|
|
1604
|
-
/* Math.imul(h, m): */
|
|
1605
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1606
|
-
} // Do a few final mixes of the hash to ensure the last few
|
|
1607
|
-
// bytes are well-incorporated.
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
h ^= h >>> 13;
|
|
1611
|
-
h =
|
|
1612
|
-
/* Math.imul(h, m): */
|
|
1613
|
-
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1614
|
-
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
var unitlessKeys = {
|
|
1618
|
-
animationIterationCount: 1,
|
|
1619
|
-
aspectRatio: 1,
|
|
1620
|
-
borderImageOutset: 1,
|
|
1621
|
-
borderImageSlice: 1,
|
|
1622
|
-
borderImageWidth: 1,
|
|
1623
|
-
boxFlex: 1,
|
|
1624
|
-
boxFlexGroup: 1,
|
|
1625
|
-
boxOrdinalGroup: 1,
|
|
1626
|
-
columnCount: 1,
|
|
1627
|
-
columns: 1,
|
|
1628
|
-
flex: 1,
|
|
1629
|
-
flexGrow: 1,
|
|
1630
|
-
flexPositive: 1,
|
|
1631
|
-
flexShrink: 1,
|
|
1632
|
-
flexNegative: 1,
|
|
1633
|
-
flexOrder: 1,
|
|
1634
|
-
gridRow: 1,
|
|
1635
|
-
gridRowEnd: 1,
|
|
1636
|
-
gridRowSpan: 1,
|
|
1637
|
-
gridRowStart: 1,
|
|
1638
|
-
gridColumn: 1,
|
|
1639
|
-
gridColumnEnd: 1,
|
|
1640
|
-
gridColumnSpan: 1,
|
|
1641
|
-
gridColumnStart: 1,
|
|
1642
|
-
msGridRow: 1,
|
|
1643
|
-
msGridRowSpan: 1,
|
|
1644
|
-
msGridColumn: 1,
|
|
1645
|
-
msGridColumnSpan: 1,
|
|
1646
|
-
fontWeight: 1,
|
|
1647
|
-
lineHeight: 1,
|
|
1648
|
-
opacity: 1,
|
|
1649
|
-
order: 1,
|
|
1650
|
-
orphans: 1,
|
|
1651
|
-
scale: 1,
|
|
1652
|
-
tabSize: 1,
|
|
1653
|
-
widows: 1,
|
|
1654
|
-
zIndex: 1,
|
|
1655
|
-
zoom: 1,
|
|
1656
|
-
WebkitLineClamp: 1,
|
|
1657
|
-
// SVG-related properties
|
|
1658
|
-
fillOpacity: 1,
|
|
1659
|
-
floodOpacity: 1,
|
|
1660
|
-
stopOpacity: 1,
|
|
1661
|
-
strokeDasharray: 1,
|
|
1662
|
-
strokeDashoffset: 1,
|
|
1663
|
-
strokeMiterlimit: 1,
|
|
1664
|
-
strokeOpacity: 1,
|
|
1665
|
-
strokeWidth: 1
|
|
1666
|
-
};
|
|
1667
|
-
|
|
1668
|
-
var isDevelopment$2 = false;
|
|
1669
|
-
|
|
1670
|
-
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
1671
|
-
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
1672
|
-
|
|
1673
|
-
var isCustomProperty = function isCustomProperty(property) {
|
|
1674
|
-
return property.charCodeAt(1) === 45;
|
|
1675
|
-
};
|
|
1676
|
-
|
|
1677
|
-
var isProcessableValue = function isProcessableValue(value) {
|
|
1678
|
-
return value != null && typeof value !== 'boolean';
|
|
1679
|
-
};
|
|
1680
|
-
|
|
1681
|
-
var processStyleName = /* #__PURE__ */memoize(function (styleName) {
|
|
1682
|
-
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
|
1683
|
-
});
|
|
1684
|
-
|
|
1685
|
-
var processStyleValue = function processStyleValue(key, value) {
|
|
1686
|
-
switch (key) {
|
|
1687
|
-
case 'animation':
|
|
1688
|
-
case 'animationName':
|
|
1689
|
-
{
|
|
1690
|
-
if (typeof value === 'string') {
|
|
1691
|
-
return value.replace(animationRegex, function (match, p1, p2) {
|
|
1692
|
-
cursor = {
|
|
1693
|
-
name: p1,
|
|
1694
|
-
styles: p2,
|
|
1695
|
-
next: cursor
|
|
1696
|
-
};
|
|
1697
|
-
return p1;
|
|
1698
|
-
});
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
|
|
1704
|
-
return value + 'px';
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
return value;
|
|
1708
|
-
};
|
|
1709
|
-
|
|
1710
|
-
var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
|
1711
|
-
|
|
1712
|
-
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
1713
|
-
if (interpolation == null) {
|
|
1714
|
-
return '';
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
var componentSelector = interpolation;
|
|
1718
|
-
|
|
1719
|
-
if (componentSelector.__emotion_styles !== undefined) {
|
|
1720
|
-
|
|
1721
|
-
return componentSelector;
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1724
|
-
switch (typeof interpolation) {
|
|
1725
|
-
case 'boolean':
|
|
1726
|
-
{
|
|
1727
|
-
return '';
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
case 'object':
|
|
1731
|
-
{
|
|
1732
|
-
var keyframes = interpolation;
|
|
1733
|
-
|
|
1734
|
-
if (keyframes.anim === 1) {
|
|
1735
|
-
cursor = {
|
|
1736
|
-
name: keyframes.name,
|
|
1737
|
-
styles: keyframes.styles,
|
|
1738
|
-
next: cursor
|
|
1739
|
-
};
|
|
1740
|
-
return keyframes.name;
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
var serializedStyles = interpolation;
|
|
1744
|
-
|
|
1745
|
-
if (serializedStyles.styles !== undefined) {
|
|
1746
|
-
var next = serializedStyles.next;
|
|
1747
|
-
|
|
1748
|
-
if (next !== undefined) {
|
|
1749
|
-
// not the most efficient thing ever but this is a pretty rare case
|
|
1750
|
-
// and there will be very few iterations of this generally
|
|
1751
|
-
while (next !== undefined) {
|
|
1752
|
-
cursor = {
|
|
1753
|
-
name: next.name,
|
|
1754
|
-
styles: next.styles,
|
|
1755
|
-
next: cursor
|
|
1756
|
-
};
|
|
1757
|
-
next = next.next;
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
var styles = serializedStyles.styles + ";";
|
|
1762
|
-
return styles;
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
return createStringFromObject(mergedProps, registered, interpolation);
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
case 'function':
|
|
1769
|
-
{
|
|
1770
|
-
if (mergedProps !== undefined) {
|
|
1771
|
-
var previousCursor = cursor;
|
|
1772
|
-
var result = interpolation(mergedProps);
|
|
1773
|
-
cursor = previousCursor;
|
|
1774
|
-
return handleInterpolation(mergedProps, registered, result);
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
break;
|
|
1778
|
-
}
|
|
1779
|
-
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
var asString = interpolation;
|
|
1783
|
-
|
|
1784
|
-
if (registered == null) {
|
|
1785
|
-
return asString;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
var cached = registered[asString];
|
|
1789
|
-
return cached !== undefined ? cached : asString;
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
function createStringFromObject(mergedProps, registered, obj) {
|
|
1793
|
-
var string = '';
|
|
1794
|
-
|
|
1795
|
-
if (Array.isArray(obj)) {
|
|
1796
|
-
for (var i = 0; i < obj.length; i++) {
|
|
1797
|
-
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
1798
|
-
}
|
|
1799
|
-
} else {
|
|
1800
|
-
for (var key in obj) {
|
|
1801
|
-
var value = obj[key];
|
|
1802
|
-
|
|
1803
|
-
if (typeof value !== 'object') {
|
|
1804
|
-
var asString = value;
|
|
1805
|
-
|
|
1806
|
-
if (registered != null && registered[asString] !== undefined) {
|
|
1807
|
-
string += key + "{" + registered[asString] + "}";
|
|
1808
|
-
} else if (isProcessableValue(asString)) {
|
|
1809
|
-
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
1810
|
-
}
|
|
1811
|
-
} else {
|
|
1812
|
-
if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment$2) {
|
|
1813
|
-
throw new Error(noComponentSelectorMessage);
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
1817
|
-
for (var _i = 0; _i < value.length; _i++) {
|
|
1818
|
-
if (isProcessableValue(value[_i])) {
|
|
1819
|
-
string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
} else {
|
|
1823
|
-
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
1824
|
-
|
|
1825
|
-
switch (key) {
|
|
1826
|
-
case 'animation':
|
|
1827
|
-
case 'animationName':
|
|
1828
|
-
{
|
|
1829
|
-
string += processStyleName(key) + ":" + interpolated + ";";
|
|
1830
|
-
break;
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
|
-
default:
|
|
1834
|
-
{
|
|
1835
|
-
|
|
1836
|
-
string += key + "{" + interpolated + "}";
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
return string;
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; // this is the cursor for keyframes
|
|
1848
|
-
// keyframes are stored on the SerializedStyles object as a linked list
|
|
1849
|
-
|
|
1850
|
-
var cursor;
|
|
1851
|
-
function serializeStyles(args, registered, mergedProps) {
|
|
1852
|
-
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
1853
|
-
return args[0];
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
var stringMode = true;
|
|
1857
|
-
var styles = '';
|
|
1858
|
-
cursor = undefined;
|
|
1859
|
-
var strings = args[0];
|
|
1860
|
-
|
|
1861
|
-
if (strings == null || strings.raw === undefined) {
|
|
1862
|
-
stringMode = false;
|
|
1863
|
-
styles += handleInterpolation(mergedProps, registered, strings);
|
|
1864
|
-
} else {
|
|
1865
|
-
var asTemplateStringsArr = strings;
|
|
1866
|
-
|
|
1867
|
-
styles += asTemplateStringsArr[0];
|
|
1868
|
-
} // we start at 1 since we've already handled the first arg
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
for (var i = 1; i < args.length; i++) {
|
|
1872
|
-
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
1873
|
-
|
|
1874
|
-
if (stringMode) {
|
|
1875
|
-
var templateStringsArr = strings;
|
|
1876
|
-
|
|
1877
|
-
styles += templateStringsArr[i];
|
|
1878
|
-
}
|
|
1879
|
-
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
labelPattern.lastIndex = 0;
|
|
1883
|
-
var identifierName = '';
|
|
1884
|
-
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
1885
|
-
|
|
1886
|
-
while ((match = labelPattern.exec(styles)) !== null) {
|
|
1887
|
-
identifierName += '-' + match[1];
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
var name = murmur2(styles) + identifierName;
|
|
1891
|
-
|
|
1892
|
-
return {
|
|
1893
|
-
name: name,
|
|
1894
|
-
styles: styles,
|
|
1895
|
-
next: cursor
|
|
1896
|
-
};
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
var isBrowser$2 = typeof document !== 'undefined';
|
|
1900
|
-
|
|
1901
|
-
var syncFallback = function syncFallback(create) {
|
|
1902
|
-
return create();
|
|
1903
|
-
};
|
|
1904
|
-
|
|
1905
|
-
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
|
|
1906
|
-
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
|
|
1907
|
-
|
|
1908
|
-
var isDevelopment$1 = false;
|
|
1909
|
-
|
|
1910
|
-
var isBrowser$1 = typeof document !== 'undefined';
|
|
1911
|
-
|
|
1912
|
-
var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1913
|
-
// because this module is primarily intended for the browser and node
|
|
1914
|
-
// but it's also required in react native and similar environments sometimes
|
|
1915
|
-
// and we could have a special build just for that
|
|
1916
|
-
// but this is much easier and the native packages
|
|
1917
|
-
// might use a different theme context in the future anyway
|
|
1918
|
-
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
1919
|
-
key: 'css'
|
|
1920
|
-
}) : null);
|
|
1921
|
-
|
|
1922
|
-
EmotionCacheContext.Provider;
|
|
1923
|
-
|
|
1924
|
-
var withEmotionCache = function withEmotionCache(func) {
|
|
1925
|
-
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
1926
|
-
// the cache will never be null in the browser
|
|
1927
|
-
var cache = useContext(EmotionCacheContext);
|
|
1928
|
-
return func(props, cache, ref);
|
|
1929
|
-
});
|
|
1930
|
-
};
|
|
1931
|
-
|
|
1932
|
-
if (!isBrowser$1) {
|
|
1933
|
-
withEmotionCache = function withEmotionCache(func) {
|
|
1934
|
-
return function (props) {
|
|
1935
|
-
var cache = useContext(EmotionCacheContext);
|
|
1936
|
-
|
|
1937
|
-
if (cache === null) {
|
|
1938
|
-
// yes, we're potentially creating this on every render
|
|
1939
|
-
// it doesn't actually matter though since it's only on the server
|
|
1940
|
-
// so there will only every be a single render
|
|
1941
|
-
// that could change in the future because of suspense and etc. but for now,
|
|
1942
|
-
// this works and i don't want to optimise for a future thing that we aren't sure about
|
|
1943
|
-
cache = createCache({
|
|
1944
|
-
key: 'css'
|
|
1945
|
-
});
|
|
1946
|
-
return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
|
|
1947
|
-
value: cache
|
|
1948
|
-
}, func(props, cache));
|
|
1949
|
-
} else {
|
|
1950
|
-
return func(props, cache);
|
|
1951
|
-
}
|
|
1952
|
-
};
|
|
1953
|
-
};
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
var ThemeContext = /* #__PURE__ */React.createContext({});
|
|
1957
|
-
|
|
1958
|
-
var hasOwn = {}.hasOwnProperty;
|
|
1959
|
-
|
|
1960
|
-
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
1961
|
-
var createEmotionProps = function createEmotionProps(type, props) {
|
|
1962
|
-
|
|
1963
|
-
var newProps = {};
|
|
1964
|
-
|
|
1965
|
-
for (var _key in props) {
|
|
1966
|
-
if (hasOwn.call(props, _key)) {
|
|
1967
|
-
newProps[_key] = props[_key];
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
|
|
1971
|
-
newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:
|
|
1972
|
-
|
|
1973
|
-
return newProps;
|
|
1974
|
-
};
|
|
1975
|
-
|
|
1976
|
-
var Insertion$1 = function Insertion(_ref) {
|
|
1977
|
-
var cache = _ref.cache,
|
|
1978
|
-
serialized = _ref.serialized,
|
|
1979
|
-
isStringTag = _ref.isStringTag;
|
|
1980
|
-
registerStyles(cache, serialized, isStringTag);
|
|
1981
|
-
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
1982
|
-
return insertStyles(cache, serialized, isStringTag);
|
|
1983
|
-
});
|
|
1984
|
-
|
|
1985
|
-
if (!isBrowser$1 && rules !== undefined) {
|
|
1986
|
-
var _ref2;
|
|
1987
|
-
|
|
1988
|
-
var serializedNames = serialized.name;
|
|
1989
|
-
var next = serialized.next;
|
|
1990
|
-
|
|
1991
|
-
while (next !== undefined) {
|
|
1992
|
-
serializedNames += ' ' + next.name;
|
|
1993
|
-
next = next.next;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
1997
|
-
__html: rules
|
|
1998
|
-
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
return null;
|
|
2002
|
-
};
|
|
2003
|
-
|
|
2004
|
-
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
2005
|
-
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
2006
|
-
// not passing the registered cache to serializeStyles because it would
|
|
2007
|
-
// make certain babel optimisations not possible
|
|
2008
|
-
|
|
2009
|
-
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
|
2010
|
-
cssProp = cache.registered[cssProp];
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
var WrappedComponent = props[typePropName];
|
|
2014
|
-
var registeredStyles = [cssProp];
|
|
2015
|
-
var className = '';
|
|
2016
|
-
|
|
2017
|
-
if (typeof props.className === 'string') {
|
|
2018
|
-
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
2019
|
-
} else if (props.className != null) {
|
|
2020
|
-
className = props.className + " ";
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
|
|
2024
|
-
|
|
2025
|
-
className += cache.key + "-" + serialized.name;
|
|
2026
|
-
var newProps = {};
|
|
2027
|
-
|
|
2028
|
-
for (var _key2 in props) {
|
|
2029
|
-
if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!isDevelopment$1 )) {
|
|
2030
|
-
newProps[_key2] = props[_key2];
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
newProps.className = className;
|
|
2035
|
-
|
|
2036
|
-
if (ref) {
|
|
2037
|
-
newProps.ref = ref;
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion$1, {
|
|
2041
|
-
cache: cache,
|
|
2042
|
-
serialized: serialized,
|
|
2043
|
-
isStringTag: typeof WrappedComponent === 'string'
|
|
2044
|
-
}), /*#__PURE__*/React.createElement(WrappedComponent, newProps));
|
|
2045
|
-
});
|
|
2046
|
-
|
|
2047
|
-
var Emotion$1 = Emotion;
|
|
2048
|
-
|
|
2049
|
-
var jsx$1 = function jsx(type, props, key) {
|
|
2050
|
-
if (!hasOwn.call(props, 'css')) {
|
|
2051
|
-
return ReactJSXRuntime.jsx(type, props, key);
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
return ReactJSXRuntime.jsx(Emotion$1, createEmotionProps(type, props), key);
|
|
2055
|
-
};
|
|
2056
|
-
var jsxs = function jsxs(type, props, key) {
|
|
2057
|
-
if (!hasOwn.call(props, 'css')) {
|
|
2058
|
-
return ReactJSXRuntime.jsxs(type, props, key);
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
return ReactJSXRuntime.jsxs(Emotion$1, createEmotionProps(type, props), key);
|
|
2062
|
-
};
|
|
2063
|
-
|
|
2064
|
-
var jsx = function jsx(type, props) {
|
|
2065
|
-
// eslint-disable-next-line prefer-rest-params
|
|
2066
|
-
var args = arguments;
|
|
2067
|
-
|
|
2068
|
-
if (props == null || !hasOwn.call(props, 'css')) {
|
|
2069
|
-
return React.createElement.apply(undefined, args);
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
var argsLength = args.length;
|
|
2073
|
-
var createElementArgArray = new Array(argsLength);
|
|
2074
|
-
createElementArgArray[0] = Emotion$1;
|
|
2075
|
-
createElementArgArray[1] = createEmotionProps(type, props);
|
|
2076
|
-
|
|
2077
|
-
for (var i = 2; i < argsLength; i++) {
|
|
2078
|
-
createElementArgArray[i] = args[i];
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
return React.createElement.apply(null, createElementArgArray);
|
|
2082
|
-
};
|
|
2083
|
-
|
|
2084
|
-
(function (_jsx) {
|
|
2085
|
-
var JSX;
|
|
2086
|
-
|
|
2087
|
-
(function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
2088
|
-
})(jsx || (jsx = {}));
|
|
2089
|
-
|
|
2090
|
-
function css() {
|
|
2091
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2092
|
-
args[_key] = arguments[_key];
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
return serializeStyles(args);
|
|
2096
|
-
}
|
|
2097
|
-
|
|
2098
|
-
// eslint-disable-next-line no-undef
|
|
2099
|
-
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|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|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|popover|popoverTarget|popoverTargetAction|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
|
|
2100
|
-
|
|
2101
|
-
var isPropValid = /* #__PURE__ */memoize(function (prop) {
|
|
2102
|
-
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
|
2103
|
-
/* o */
|
|
2104
|
-
&& prop.charCodeAt(1) === 110
|
|
2105
|
-
/* n */
|
|
2106
|
-
&& prop.charCodeAt(2) < 91;
|
|
2107
|
-
}
|
|
2108
|
-
/* Z+1 */
|
|
2109
|
-
);
|
|
2110
|
-
|
|
2111
|
-
var isBrowser = typeof document !== 'undefined';
|
|
2112
|
-
|
|
2113
|
-
var isDevelopment = false;
|
|
2114
|
-
|
|
2115
|
-
var testOmitPropsOnStringTag = isPropValid;
|
|
2116
|
-
|
|
2117
|
-
var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {
|
|
2118
|
-
return key !== 'theme';
|
|
2119
|
-
};
|
|
2120
|
-
|
|
2121
|
-
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {
|
|
2122
|
-
return typeof tag === 'string' && // 96 is one less than the char code
|
|
2123
|
-
// for "a" so this is checking that
|
|
2124
|
-
// it's a lowercase character
|
|
2125
|
-
tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
|
|
2126
|
-
};
|
|
2127
|
-
var composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {
|
|
2128
|
-
var shouldForwardProp;
|
|
2129
|
-
|
|
2130
|
-
if (options) {
|
|
2131
|
-
var optionsShouldForwardProp = options.shouldForwardProp;
|
|
2132
|
-
shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {
|
|
2133
|
-
return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
|
|
2134
|
-
} : optionsShouldForwardProp;
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
if (typeof shouldForwardProp !== 'function' && isReal) {
|
|
2138
|
-
shouldForwardProp = tag.__emotion_forwardProp;
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
|
-
return shouldForwardProp;
|
|
2142
|
-
};
|
|
2143
|
-
|
|
2144
|
-
var Insertion = function Insertion(_ref) {
|
|
2145
|
-
var cache = _ref.cache,
|
|
2146
|
-
serialized = _ref.serialized,
|
|
2147
|
-
isStringTag = _ref.isStringTag;
|
|
2148
|
-
registerStyles(cache, serialized, isStringTag);
|
|
2149
|
-
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
2150
|
-
return insertStyles(cache, serialized, isStringTag);
|
|
2151
|
-
});
|
|
2152
|
-
|
|
2153
|
-
if (!isBrowser && rules !== undefined) {
|
|
2154
|
-
var _ref2;
|
|
2155
|
-
|
|
2156
|
-
var serializedNames = serialized.name;
|
|
2157
|
-
var next = serialized.next;
|
|
2158
|
-
|
|
2159
|
-
while (next !== undefined) {
|
|
2160
|
-
serializedNames += ' ' + next.name;
|
|
2161
|
-
next = next.next;
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
2165
|
-
__html: rules
|
|
2166
|
-
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
return null;
|
|
2170
|
-
};
|
|
2171
|
-
|
|
2172
|
-
var createStyled = function createStyled(tag, options) {
|
|
2173
|
-
|
|
2174
|
-
var isReal = tag.__emotion_real === tag;
|
|
2175
|
-
var baseTag = isReal && tag.__emotion_base || tag;
|
|
2176
|
-
var identifierName;
|
|
2177
|
-
var targetClassName;
|
|
2178
|
-
|
|
2179
|
-
if (options !== undefined) {
|
|
2180
|
-
identifierName = options.label;
|
|
2181
|
-
targetClassName = options.target;
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
|
|
2185
|
-
var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
|
|
2186
|
-
var shouldUseAs = !defaultShouldForwardProp('as');
|
|
2187
|
-
return function () {
|
|
2188
|
-
// eslint-disable-next-line prefer-rest-params
|
|
2189
|
-
var args = arguments;
|
|
2190
|
-
var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];
|
|
2191
|
-
|
|
2192
|
-
if (identifierName !== undefined) {
|
|
2193
|
-
styles.push("label:" + identifierName + ";");
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2196
|
-
if (args[0] == null || args[0].raw === undefined) {
|
|
2197
|
-
// eslint-disable-next-line prefer-spread
|
|
2198
|
-
styles.push.apply(styles, args);
|
|
2199
|
-
} else {
|
|
2200
|
-
var templateStringsArr = args[0];
|
|
2201
|
-
|
|
2202
|
-
styles.push(templateStringsArr[0]);
|
|
2203
|
-
var len = args.length;
|
|
2204
|
-
var i = 1;
|
|
2205
|
-
|
|
2206
|
-
for (; i < len; i++) {
|
|
2207
|
-
|
|
2208
|
-
styles.push(args[i], templateStringsArr[i]);
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
|
|
2212
|
-
var Styled = withEmotionCache(function (props, cache, ref) {
|
|
2213
|
-
var FinalTag = shouldUseAs && props.as || baseTag;
|
|
2214
|
-
var className = '';
|
|
2215
|
-
var classInterpolations = [];
|
|
2216
|
-
var mergedProps = props;
|
|
2217
|
-
|
|
2218
|
-
if (props.theme == null) {
|
|
2219
|
-
mergedProps = {};
|
|
2220
|
-
|
|
2221
|
-
for (var key in props) {
|
|
2222
|
-
mergedProps[key] = props[key];
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
mergedProps.theme = React.useContext(ThemeContext);
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
if (typeof props.className === 'string') {
|
|
2229
|
-
className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
|
|
2230
|
-
} else if (props.className != null) {
|
|
2231
|
-
className = props.className + " ";
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
|
|
2235
|
-
className += cache.key + "-" + serialized.name;
|
|
2236
|
-
|
|
2237
|
-
if (targetClassName !== undefined) {
|
|
2238
|
-
className += " " + targetClassName;
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
|
|
2242
|
-
var newProps = {};
|
|
2243
|
-
|
|
2244
|
-
for (var _key in props) {
|
|
2245
|
-
if (shouldUseAs && _key === 'as') continue;
|
|
2246
|
-
|
|
2247
|
-
if (finalShouldForwardProp(_key)) {
|
|
2248
|
-
newProps[_key] = props[_key];
|
|
2249
|
-
}
|
|
2250
|
-
}
|
|
2251
|
-
|
|
2252
|
-
newProps.className = className;
|
|
2253
|
-
|
|
2254
|
-
if (ref) {
|
|
2255
|
-
newProps.ref = ref;
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
|
2259
|
-
cache: cache,
|
|
2260
|
-
serialized: serialized,
|
|
2261
|
-
isStringTag: typeof FinalTag === 'string'
|
|
2262
|
-
}), /*#__PURE__*/React.createElement(FinalTag, newProps));
|
|
2263
|
-
});
|
|
2264
|
-
Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")";
|
|
2265
|
-
Styled.defaultProps = tag.defaultProps;
|
|
2266
|
-
Styled.__emotion_real = Styled;
|
|
2267
|
-
Styled.__emotion_base = baseTag;
|
|
2268
|
-
Styled.__emotion_styles = styles;
|
|
2269
|
-
Styled.__emotion_forwardProp = shouldForwardProp;
|
|
2270
|
-
Object.defineProperty(Styled, 'toString', {
|
|
2271
|
-
value: function value() {
|
|
2272
|
-
if (targetClassName === undefined && isDevelopment) {
|
|
2273
|
-
return 'NO_COMPONENT_SELECTOR';
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
return "." + targetClassName;
|
|
2277
|
-
}
|
|
2278
|
-
});
|
|
2279
|
-
|
|
2280
|
-
Styled.withComponent = function (nextTag, nextOptions) {
|
|
2281
|
-
var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {
|
|
2282
|
-
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
|
2283
|
-
}));
|
|
2284
|
-
return newStyled.apply(void 0, styles);
|
|
2285
|
-
};
|
|
2286
|
-
|
|
2287
|
-
return Styled;
|
|
2288
|
-
};
|
|
2289
|
-
};
|
|
2290
|
-
|
|
2291
|
-
var tags = ['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', 'marquee', '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', 'var', 'video', 'wbr', // SVG
|
|
2292
|
-
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
|
2293
|
-
|
|
2294
|
-
// bind it to avoid mutating the original function
|
|
2295
|
-
var styled = createStyled.bind(null);
|
|
2296
|
-
tags.forEach(function (tagName) {
|
|
2297
|
-
styled[tagName] = styled(tagName);
|
|
2298
|
-
});
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import element from '../../assets/icons/checked.png';
|
|
6
|
+
import arrowDownIcon from '../../assets/icons/arrow-down.png';
|
|
7
|
+
import icon from '../../assets/icons/icon_size.png';
|
|
2299
8
|
|
|
2300
9
|
const colors = {
|
|
2301
10
|
//mode
|
|
@@ -3009,7 +718,7 @@ const getButtonSizeStyle = (size) => {
|
|
|
3009
718
|
`;
|
|
3010
719
|
}
|
|
3011
720
|
};
|
|
3012
|
-
styled.button `
|
|
721
|
+
const StyledButton = styled.button `
|
|
3013
722
|
display: inline-flex;
|
|
3014
723
|
align-items: center;
|
|
3015
724
|
justify-content: center;
|
|
@@ -3080,7 +789,11 @@ styled.button `
|
|
|
3080
789
|
}
|
|
3081
790
|
`;
|
|
3082
791
|
|
|
3083
|
-
|
|
792
|
+
const Button = ({ width, height, type = 'primary', size = 'medium', label = "Button", onClick, disabled = false, }) => {
|
|
793
|
+
return (jsx(StyledButton, { width: width, height: height, buttonType: type, buttonSize: size, onClick: onClick, disabled: disabled, children: label }));
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
const Wrapper$1 = styled.div `
|
|
3084
797
|
${({ size, select, state }) => {
|
|
3085
798
|
const dimensions = size === "large" ? "24px" : "20px";
|
|
3086
799
|
const borderRadius = size === "large" ? "8px" : "6px";
|
|
@@ -3125,12 +838,12 @@ styled.div `
|
|
|
3125
838
|
`;
|
|
3126
839
|
}}
|
|
3127
840
|
`;
|
|
3128
|
-
styled.svg `
|
|
841
|
+
const CheckIcon = styled.svg `
|
|
3129
842
|
width: 100%;
|
|
3130
843
|
height: 100%;
|
|
3131
844
|
padding: 2px;
|
|
3132
845
|
`;
|
|
3133
|
-
styled.div `
|
|
846
|
+
const DashIcon = styled.div `
|
|
3134
847
|
width: 60%;
|
|
3135
848
|
height: 2.5px;
|
|
3136
849
|
background-color: ${({ state }) => state === "disabled"
|
|
@@ -3139,6 +852,15 @@ styled.div `
|
|
|
3139
852
|
border-radius: 2px;
|
|
3140
853
|
`;
|
|
3141
854
|
|
|
855
|
+
const CheckBox = ({ size, select, state, onClick }) => {
|
|
856
|
+
const handleClick = () => {
|
|
857
|
+
if (state !== "disabled" && onClick) {
|
|
858
|
+
onClick();
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
return (jsxs(Wrapper$1, { size: size, select: select, state: state, onClick: handleClick, children: [select === "on" && (jsx(CheckIcon, { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M20 6L9 17L4 12", stroke: "white", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) })), select === "indeterminate" && jsx(DashIcon, { state: state })] }));
|
|
862
|
+
};
|
|
863
|
+
|
|
3142
864
|
const getButtonSize = (size) => {
|
|
3143
865
|
switch (size) {
|
|
3144
866
|
case 'small':
|
|
@@ -3267,7 +989,7 @@ const StyledLabel = styled.p `
|
|
|
3267
989
|
font-family: ${typography.fontFamily.primary};
|
|
3268
990
|
color: ${colors.text.static};
|
|
3269
991
|
`;
|
|
3270
|
-
const StyledIcon = styled.div `
|
|
992
|
+
const StyledIcon$1 = styled.div `
|
|
3271
993
|
${props => getIconSize(props.size)}
|
|
3272
994
|
`;
|
|
3273
995
|
const StyledOptions = styled.div `
|
|
@@ -3332,10 +1054,10 @@ const StyledOption = styled.div `
|
|
|
3332
1054
|
`;
|
|
3333
1055
|
|
|
3334
1056
|
function Dropdown({ size, options, onSelect, label, placeholder }) {
|
|
3335
|
-
const [open, setOpen] =
|
|
3336
|
-
const [selected, setSelected] =
|
|
3337
|
-
const ref =
|
|
3338
|
-
|
|
1057
|
+
const [open, setOpen] = React.useState(false);
|
|
1058
|
+
const [selected, setSelected] = React.useState(null);
|
|
1059
|
+
const ref = React.useRef(null);
|
|
1060
|
+
React.useEffect(() => {
|
|
3339
1061
|
const handleClickOutside = (e) => {
|
|
3340
1062
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
3341
1063
|
setOpen(false);
|
|
@@ -3349,21 +1071,97 @@ function Dropdown({ size, options, onSelect, label, placeholder }) {
|
|
|
3349
1071
|
onSelect?.(option);
|
|
3350
1072
|
setOpen(false);
|
|
3351
1073
|
};
|
|
3352
|
-
return (jsxs("div", { style: { position: 'relative' }, children: [jsx
|
|
1074
|
+
return (jsxs("div", { style: { position: 'relative' }, children: [jsx(StyledLabel, { children: label }), jsx(StyledDropDown, { onClick: () => setOpen((prev) => !prev), size: size, isOpen: open, children: jsxs(StyledBox, { children: [jsx(StyledText, { size: size, isOpen: open, children: selected ?? placeholder }), jsx(StyledIcon$1, { size: size, children: jsx("img", { src: arrowDownIcon, alt: "dropdown icon", style: { width: '100%', height: '100%' } }) })] }) }), open && (jsx(StyledOptions, { ref: ref, size: size, children: options?.map((option) => (jsx(StyledOption, { onClick: () => handleSelect(option), size: size, isSelected: option === selected, children: option }, option))) }))] }));
|
|
3353
1075
|
}
|
|
3354
1076
|
|
|
3355
|
-
({
|
|
1077
|
+
const getInputWrapperStyle = (size) => {
|
|
1078
|
+
let height = '48px';
|
|
1079
|
+
switch (size) {
|
|
1080
|
+
case 'small':
|
|
1081
|
+
height = '41px';
|
|
1082
|
+
break;
|
|
1083
|
+
case 'medium':
|
|
1084
|
+
height = '48px';
|
|
1085
|
+
break;
|
|
1086
|
+
case 'large':
|
|
1087
|
+
height = '56px';
|
|
1088
|
+
break;
|
|
1089
|
+
}
|
|
1090
|
+
return {
|
|
1091
|
+
display: 'flex',
|
|
1092
|
+
flexDirection: 'column',
|
|
1093
|
+
gap: '8px',
|
|
1094
|
+
width: '306px',
|
|
1095
|
+
height: height,
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
const labelStyle = {
|
|
3356
1099
|
...typography.label.small,
|
|
3357
1100
|
color: '#333',
|
|
3358
|
-
}
|
|
1101
|
+
};
|
|
1102
|
+
const getInputStyle = (inputSize, disabled, isFocused) => {
|
|
1103
|
+
let padding = '0px 16px';
|
|
1104
|
+
let fontSize = typography.label.medium.fontSize;
|
|
1105
|
+
let lineHeight = typography.label.medium.lineHeight;
|
|
1106
|
+
let fontWeight = typography.label.medium.fontWeight;
|
|
1107
|
+
let height = '48px';
|
|
1108
|
+
let width = '306px';
|
|
1109
|
+
switch (inputSize) {
|
|
1110
|
+
case 'small':
|
|
1111
|
+
fontSize = typography.label.small.fontSize;
|
|
1112
|
+
lineHeight = typography.label.small.lineHeight;
|
|
1113
|
+
fontWeight = typography.label.small.fontWeight;
|
|
1114
|
+
height = '40px';
|
|
1115
|
+
break;
|
|
1116
|
+
case 'medium':
|
|
1117
|
+
fontSize = typography.label.medium.fontSize;
|
|
1118
|
+
lineHeight = typography.label.medium.lineHeight;
|
|
1119
|
+
fontWeight = typography.label.medium.fontWeight;
|
|
1120
|
+
height = '48px';
|
|
1121
|
+
break;
|
|
1122
|
+
case 'large':
|
|
1123
|
+
fontSize = typography.label.large.fontSize;
|
|
1124
|
+
lineHeight = typography.label.large.lineHeight;
|
|
1125
|
+
fontWeight = typography.label.large.fontWeight;
|
|
1126
|
+
height = '56px';
|
|
1127
|
+
break;
|
|
1128
|
+
}
|
|
1129
|
+
return {
|
|
1130
|
+
width,
|
|
1131
|
+
height,
|
|
1132
|
+
minHeight: height,
|
|
1133
|
+
maxHeight: height,
|
|
1134
|
+
padding,
|
|
1135
|
+
fontSize,
|
|
1136
|
+
lineHeight,
|
|
1137
|
+
fontWeight,
|
|
1138
|
+
fontFamily: typography.fontFamily.primary,
|
|
1139
|
+
border: isFocused ? '1px solid #4a90e2' : '1px solid #ddd',
|
|
1140
|
+
borderRadius: '4px',
|
|
1141
|
+
outline: 'none',
|
|
1142
|
+
transition: 'all 0.2s ease',
|
|
1143
|
+
boxShadow: isFocused ? '0 0 0 3px rgba(74, 144, 226, 0.1)' : 'none',
|
|
1144
|
+
backgroundColor: disabled ? '#f5f5f5' : '#fff',
|
|
1145
|
+
cursor: disabled ? 'not-allowed' : 'text',
|
|
1146
|
+
color: '#333',
|
|
1147
|
+
boxSizing: 'border-box',
|
|
1148
|
+
display: 'flex',
|
|
1149
|
+
alignItems: 'center',
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
3359
1152
|
|
|
3360
|
-
|
|
1153
|
+
const Input = ({ size = 'medium', label = false, labelText = '', placeholder = '', value, onChange, disabled = false, }) => {
|
|
1154
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
1155
|
+
return (jsxs("div", { style: getInputWrapperStyle(size), children: [label && labelText && jsx("label", { style: labelStyle, children: labelText }), jsx("input", { style: getInputStyle(size, disabled, isFocused), placeholder: placeholder, value: value, onChange: onChange, disabled: disabled, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false) })] }));
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
const StyledIcon = styled.img `
|
|
3361
1159
|
width: 20px;
|
|
3362
1160
|
height: 20px;
|
|
3363
1161
|
transition: transform 0.3s ease;
|
|
3364
1162
|
transform: rotate(${props => (props.isOpen ? '0deg' : '90deg')});
|
|
3365
1163
|
`;
|
|
3366
|
-
styled.div `
|
|
1164
|
+
const StyledSidebar = styled.div `
|
|
3367
1165
|
display: flex;
|
|
3368
1166
|
width: 240px;
|
|
3369
1167
|
height: 100vh;
|
|
@@ -3374,7 +1172,7 @@ styled.div `
|
|
|
3374
1172
|
|
|
3375
1173
|
background: ${colors.background.white};
|
|
3376
1174
|
`;
|
|
3377
|
-
styled.div `
|
|
1175
|
+
const StyledDescription = styled.div `
|
|
3378
1176
|
width: 100%;
|
|
3379
1177
|
display: flex;
|
|
3380
1178
|
flex-direction: column;
|
|
@@ -3407,20 +1205,20 @@ styled.div `
|
|
|
3407
1205
|
background-color: ${colors.action["primary-active"]};
|
|
3408
1206
|
}
|
|
3409
1207
|
`;
|
|
3410
|
-
styled.div `
|
|
1208
|
+
const StyledButtonArea = styled.div `
|
|
3411
1209
|
display: flex;
|
|
3412
1210
|
align-items: center;
|
|
3413
1211
|
gap: 10px;
|
|
3414
1212
|
align-self: stretch;
|
|
3415
1213
|
|
|
3416
1214
|
`;
|
|
3417
|
-
styled.div `
|
|
1215
|
+
const StyledDisclosure = styled.div `
|
|
3418
1216
|
display: flex;
|
|
3419
1217
|
gap: 4px;
|
|
3420
1218
|
flex-direction: column;
|
|
3421
1219
|
|
|
3422
1220
|
`;
|
|
3423
|
-
styled.div `
|
|
1221
|
+
const StyledTitle = styled.div `
|
|
3424
1222
|
display: flex;
|
|
3425
1223
|
width: 147px;
|
|
3426
1224
|
align-items: center;
|
|
@@ -3428,7 +1226,7 @@ styled.div `
|
|
|
3428
1226
|
height: 26px;
|
|
3429
1227
|
user-select: none;
|
|
3430
1228
|
`;
|
|
3431
|
-
styled.div `
|
|
1229
|
+
const StyledOpenContents = styled.div `
|
|
3432
1230
|
display: flex;
|
|
3433
1231
|
padding: 12px 16px;
|
|
3434
1232
|
flex-direction: column;
|
|
@@ -3440,7 +1238,7 @@ styled.div `
|
|
|
3440
1238
|
border-radius: 12px;
|
|
3441
1239
|
background: ${colors.surface["gray-subtler"]};
|
|
3442
1240
|
`;
|
|
3443
|
-
styled.p `
|
|
1241
|
+
const StyledOpenContentsText = styled.p `
|
|
3444
1242
|
align-self: stretch;
|
|
3445
1243
|
|
|
3446
1244
|
color: ${colors.text.subtle};
|
|
@@ -3454,7 +1252,27 @@ styled.p `
|
|
|
3454
1252
|
margin: 0;
|
|
3455
1253
|
`;
|
|
3456
1254
|
|
|
3457
|
-
|
|
1255
|
+
function Sidebar({ buttonStyle, description, title }) {
|
|
1256
|
+
const [openSections, setOpenSections] = React.useState(Array(description.length).fill(true) // 기본적으로 모두 열려있게
|
|
1257
|
+
);
|
|
1258
|
+
const toggleSection = (index) => {
|
|
1259
|
+
const newState = [...openSections];
|
|
1260
|
+
newState[index] = !newState[index]; // 현재 인덱스 toggle
|
|
1261
|
+
setOpenSections(newState);
|
|
1262
|
+
};
|
|
1263
|
+
return (jsxs(StyledSidebar, { children: [jsx(StyledDescription, { children: title.map((item, index) => (jsxs(StyledDisclosure, { children: [jsxs(StyledTitle, { onClick: () => toggleSection(index), style: { cursor: 'pointer' }, children: [jsx(StyledIcon, { src: icon, alt: "icon", isOpen: openSections[index] }), item] }), openSections[index] && (jsx(StyledOpenContents, { children: description[index].map((option, i) => (jsx(StyledOpenContentsText, { children: option }, i))) }))] }))) }), buttonStyle === 'start' ? jsx(StartButton, {}) : buttonStyle === 'middle' ? jsx(MiddleButton, {}) : buttonStyle === 'end' ? jsx(EndButton, {}) : jsx(MiddleButton, {})] }));
|
|
1264
|
+
}
|
|
1265
|
+
function StartButton() {
|
|
1266
|
+
return (jsx(StyledButtonArea, { children: jsx(Button, { size: 'small', type: 'primary', label: '\uB2E4\uC74C\uC73C\uB85C', width: '240px', height: '40px' }) }));
|
|
1267
|
+
}
|
|
1268
|
+
function MiddleButton() {
|
|
1269
|
+
return (jsxs(StyledButtonArea, { children: [jsx(Button, { size: 'small', type: 'secondary', label: '\uC774\uC804\uC73C\uB85C', width: '115px', height: '40px' }), jsx(Button, { size: 'small', type: 'primary', label: '\uB2E4\uC74C\uC73C\uB85C', width: '115px', height: '40px' })] }));
|
|
1270
|
+
}
|
|
1271
|
+
function EndButton() {
|
|
1272
|
+
return (jsx(StyledButtonArea, { children: jsx(Button, { size: 'small', type: 'primary', label: '\uC774\uC804\uC73C\uB85C', width: '240px', height: '40px' }) }));
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
const Wrapper = styled.div `
|
|
3458
1276
|
display: flex;
|
|
3459
1277
|
flex-direction: column;
|
|
3460
1278
|
width: 160px;
|
|
@@ -3463,19 +1281,19 @@ styled.div `
|
|
|
3463
1281
|
background-color: ${colors.surface.white};
|
|
3464
1282
|
gap: 16px;
|
|
3465
1283
|
`;
|
|
3466
|
-
styled.span `
|
|
1284
|
+
const Title = styled.span `
|
|
3467
1285
|
padding: 4px 0;
|
|
3468
1286
|
margin: 0;
|
|
3469
1287
|
${typography.heading.xxsmall}
|
|
3470
1288
|
font-family:${typography.fontFamily.primary};
|
|
3471
1289
|
color: ${colors.text.bolder};
|
|
3472
1290
|
`;
|
|
3473
|
-
styled.div `
|
|
1291
|
+
const Tablist = styled.div `
|
|
3474
1292
|
display: flex;
|
|
3475
1293
|
flex-direction: column;
|
|
3476
1294
|
gap: 4px;
|
|
3477
1295
|
`;
|
|
3478
|
-
styled.div `
|
|
1296
|
+
const TabItem = styled.div `
|
|
3479
1297
|
padding: 8px 8px;
|
|
3480
1298
|
font-family: ${typography.fontFamily.primary};
|
|
3481
1299
|
${({ isSelected }) => isSelected ? typography.body.xsmallBold : typography.body.xsmall}
|
|
@@ -3495,5 +1313,16 @@ styled.div `
|
|
|
3495
1313
|
}
|
|
3496
1314
|
`;
|
|
3497
1315
|
|
|
3498
|
-
|
|
1316
|
+
const TabBar = ({ title, items, defaultSelectedId, onChange }) => {
|
|
1317
|
+
const [selectedId, setSelectedId] = useState(defaultSelectedId || items[0]?.id);
|
|
1318
|
+
const handleTabClick = (id) => {
|
|
1319
|
+
setSelectedId(id);
|
|
1320
|
+
if (onChange) {
|
|
1321
|
+
onChange(id);
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
return (jsxs(Wrapper, { children: [title && jsx(Title, { children: title }), jsx(Tablist, { children: items.map((item) => (jsx(TabItem, { isSelected: selectedId === item.id, onClick: () => handleTabClick(item.id), children: item.label }, item.id))) })] }));
|
|
1325
|
+
};
|
|
1326
|
+
|
|
1327
|
+
export { Button, CheckBox, Dropdown, Input, Sidebar, TabBar, colors, typography };
|
|
3499
1328
|
//# sourceMappingURL=index.esm.js.map
|