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