@animus-ui/core 0.1.1-beta.21 → 0.1.1-beta.23
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/CHANGELOG.md +16 -0
- package/dist/Animus.d.ts +3 -3
- package/dist/AnimusExtended.d.ts +3 -3
- package/dist/compatTheme.d.ts +1 -1
- package/dist/index.js +173 -413
- package/dist/legacy/config.d.ts +11 -11
- package/dist/properties/styledOptions.d.ts +3 -4
- package/dist/types/config.d.ts +9 -9
- package/dist/types/properties.d.ts +7 -7
- package/dist/types/props.d.ts +3 -3
- package/dist/types/scales.d.ts +2 -2
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/utils.d.ts +4 -4
- package/package.json +5 -5
- package/rollup.config.js +2 -2
- package/tsconfig.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,20 +1,44 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import isPropValid from '@emotion/is-prop-valid';
|
|
3
|
-
import { isArray, isObject, get, isString, isUndefined, identity, mapValues, omit, intersection, merge, pick, isEmpty,
|
|
3
|
+
import { isArray, isObject, get, isString, isUndefined, identity, mapValues, omit, intersection, merge, set, pick, isEmpty, isNumber, keys } from 'lodash';
|
|
4
4
|
|
|
5
|
+
function _iterableToArrayLimit(arr, i) {
|
|
6
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
7
|
+
if (null != _i) {
|
|
8
|
+
var _s,
|
|
9
|
+
_e,
|
|
10
|
+
_x,
|
|
11
|
+
_r,
|
|
12
|
+
_arr = [],
|
|
13
|
+
_n = !0,
|
|
14
|
+
_d = !1;
|
|
15
|
+
try {
|
|
16
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
17
|
+
if (Object(_i) !== _i) return;
|
|
18
|
+
_n = !1;
|
|
19
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
20
|
+
} catch (err) {
|
|
21
|
+
_d = !0, _e = err;
|
|
22
|
+
} finally {
|
|
23
|
+
try {
|
|
24
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
25
|
+
} finally {
|
|
26
|
+
if (_d) throw _e;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return _arr;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
5
32
|
function ownKeys(object, enumerableOnly) {
|
|
6
33
|
var keys = Object.keys(object);
|
|
7
|
-
|
|
8
34
|
if (Object.getOwnPropertySymbols) {
|
|
9
35
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
10
36
|
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
11
37
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12
38
|
})), keys.push.apply(keys, symbols);
|
|
13
39
|
}
|
|
14
|
-
|
|
15
40
|
return keys;
|
|
16
41
|
}
|
|
17
|
-
|
|
18
42
|
function _objectSpread2(target) {
|
|
19
43
|
for (var i = 1; i < arguments.length; i++) {
|
|
20
44
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
@@ -24,10 +48,8 @@ function _objectSpread2(target) {
|
|
|
24
48
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
25
49
|
});
|
|
26
50
|
}
|
|
27
|
-
|
|
28
51
|
return target;
|
|
29
52
|
}
|
|
30
|
-
|
|
31
53
|
function _typeof(obj) {
|
|
32
54
|
"@babel/helpers - typeof";
|
|
33
55
|
|
|
@@ -37,23 +59,20 @@ function _typeof(obj) {
|
|
|
37
59
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
38
60
|
}, _typeof(obj);
|
|
39
61
|
}
|
|
40
|
-
|
|
41
62
|
function _classCallCheck(instance, Constructor) {
|
|
42
63
|
if (!(instance instanceof Constructor)) {
|
|
43
64
|
throw new TypeError("Cannot call a class as a function");
|
|
44
65
|
}
|
|
45
66
|
}
|
|
46
|
-
|
|
47
67
|
function _defineProperties(target, props) {
|
|
48
68
|
for (var i = 0; i < props.length; i++) {
|
|
49
69
|
var descriptor = props[i];
|
|
50
70
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
51
71
|
descriptor.configurable = true;
|
|
52
72
|
if ("value" in descriptor) descriptor.writable = true;
|
|
53
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
73
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
54
74
|
}
|
|
55
75
|
}
|
|
56
|
-
|
|
57
76
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
58
77
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
59
78
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
@@ -62,8 +81,8 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
62
81
|
});
|
|
63
82
|
return Constructor;
|
|
64
83
|
}
|
|
65
|
-
|
|
66
84
|
function _defineProperty(obj, key, value) {
|
|
85
|
+
key = _toPropertyKey(key);
|
|
67
86
|
if (key in obj) {
|
|
68
87
|
Object.defineProperty(obj, key, {
|
|
69
88
|
value: value,
|
|
@@ -74,15 +93,12 @@ function _defineProperty(obj, key, value) {
|
|
|
74
93
|
} else {
|
|
75
94
|
obj[key] = value;
|
|
76
95
|
}
|
|
77
|
-
|
|
78
96
|
return obj;
|
|
79
97
|
}
|
|
80
|
-
|
|
81
98
|
function _inherits(subClass, superClass) {
|
|
82
99
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
83
100
|
throw new TypeError("Super expression must either be null or a function");
|
|
84
101
|
}
|
|
85
|
-
|
|
86
102
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
87
103
|
constructor: {
|
|
88
104
|
value: subClass,
|
|
@@ -95,28 +111,23 @@ function _inherits(subClass, superClass) {
|
|
|
95
111
|
});
|
|
96
112
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
97
113
|
}
|
|
98
|
-
|
|
99
114
|
function _getPrototypeOf(o) {
|
|
100
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
115
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
101
116
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
102
117
|
};
|
|
103
118
|
return _getPrototypeOf(o);
|
|
104
119
|
}
|
|
105
|
-
|
|
106
120
|
function _setPrototypeOf(o, p) {
|
|
107
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
121
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
108
122
|
o.__proto__ = p;
|
|
109
123
|
return o;
|
|
110
124
|
};
|
|
111
|
-
|
|
112
125
|
return _setPrototypeOf(o, p);
|
|
113
126
|
}
|
|
114
|
-
|
|
115
127
|
function _isNativeReflectConstruct() {
|
|
116
128
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
117
129
|
if (Reflect.construct.sham) return false;
|
|
118
130
|
if (typeof Proxy === "function") return true;
|
|
119
|
-
|
|
120
131
|
try {
|
|
121
132
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
122
133
|
return true;
|
|
@@ -124,32 +135,24 @@ function _isNativeReflectConstruct() {
|
|
|
124
135
|
return false;
|
|
125
136
|
}
|
|
126
137
|
}
|
|
127
|
-
|
|
128
138
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
129
139
|
if (source == null) return {};
|
|
130
140
|
var target = {};
|
|
131
141
|
var sourceKeys = Object.keys(source);
|
|
132
142
|
var key, i;
|
|
133
|
-
|
|
134
143
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
135
144
|
key = sourceKeys[i];
|
|
136
145
|
if (excluded.indexOf(key) >= 0) continue;
|
|
137
146
|
target[key] = source[key];
|
|
138
147
|
}
|
|
139
|
-
|
|
140
148
|
return target;
|
|
141
149
|
}
|
|
142
|
-
|
|
143
150
|
function _objectWithoutProperties(source, excluded) {
|
|
144
151
|
if (source == null) return {};
|
|
145
|
-
|
|
146
152
|
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
147
|
-
|
|
148
153
|
var key, i;
|
|
149
|
-
|
|
150
154
|
if (Object.getOwnPropertySymbols) {
|
|
151
155
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
152
|
-
|
|
153
156
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
154
157
|
key = sourceSymbolKeys[i];
|
|
155
158
|
if (excluded.indexOf(key) >= 0) continue;
|
|
@@ -157,101 +160,54 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
157
160
|
target[key] = source[key];
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
|
-
|
|
161
163
|
return target;
|
|
162
164
|
}
|
|
163
|
-
|
|
164
165
|
function _assertThisInitialized(self) {
|
|
165
166
|
if (self === void 0) {
|
|
166
167
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
167
168
|
}
|
|
168
|
-
|
|
169
169
|
return self;
|
|
170
170
|
}
|
|
171
|
-
|
|
172
171
|
function _possibleConstructorReturn(self, call) {
|
|
173
172
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
174
173
|
return call;
|
|
175
174
|
} else if (call !== void 0) {
|
|
176
175
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
177
176
|
}
|
|
178
|
-
|
|
179
177
|
return _assertThisInitialized(self);
|
|
180
178
|
}
|
|
181
|
-
|
|
182
179
|
function _createSuper(Derived) {
|
|
183
180
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
184
|
-
|
|
185
181
|
return function _createSuperInternal() {
|
|
186
182
|
var Super = _getPrototypeOf(Derived),
|
|
187
|
-
|
|
188
|
-
|
|
183
|
+
result;
|
|
189
184
|
if (hasNativeReflectConstruct) {
|
|
190
185
|
var NewTarget = _getPrototypeOf(this).constructor;
|
|
191
|
-
|
|
192
186
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
193
187
|
} else {
|
|
194
188
|
result = Super.apply(this, arguments);
|
|
195
189
|
}
|
|
196
|
-
|
|
197
190
|
return _possibleConstructorReturn(this, result);
|
|
198
191
|
};
|
|
199
192
|
}
|
|
200
|
-
|
|
201
193
|
function _slicedToArray(arr, i) {
|
|
202
194
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
203
195
|
}
|
|
204
|
-
|
|
205
196
|
function _toArray(arr) {
|
|
206
197
|
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
207
198
|
}
|
|
208
|
-
|
|
209
199
|
function _toConsumableArray(arr) {
|
|
210
200
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
211
201
|
}
|
|
212
|
-
|
|
213
202
|
function _arrayWithoutHoles(arr) {
|
|
214
203
|
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
215
204
|
}
|
|
216
|
-
|
|
217
205
|
function _arrayWithHoles(arr) {
|
|
218
206
|
if (Array.isArray(arr)) return arr;
|
|
219
207
|
}
|
|
220
|
-
|
|
221
208
|
function _iterableToArray(iter) {
|
|
222
209
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
223
210
|
}
|
|
224
|
-
|
|
225
|
-
function _iterableToArrayLimit(arr, i) {
|
|
226
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
227
|
-
|
|
228
|
-
if (_i == null) return;
|
|
229
|
-
var _arr = [];
|
|
230
|
-
var _n = true;
|
|
231
|
-
var _d = false;
|
|
232
|
-
|
|
233
|
-
var _s, _e;
|
|
234
|
-
|
|
235
|
-
try {
|
|
236
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
237
|
-
_arr.push(_s.value);
|
|
238
|
-
|
|
239
|
-
if (i && _arr.length === i) break;
|
|
240
|
-
}
|
|
241
|
-
} catch (err) {
|
|
242
|
-
_d = true;
|
|
243
|
-
_e = err;
|
|
244
|
-
} finally {
|
|
245
|
-
try {
|
|
246
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
247
|
-
} finally {
|
|
248
|
-
if (_d) throw _e;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return _arr;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
211
|
function _unsupportedIterableToArray(o, minLen) {
|
|
256
212
|
if (!o) return;
|
|
257
213
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -260,53 +216,52 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
260
216
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
261
217
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
262
218
|
}
|
|
263
|
-
|
|
264
219
|
function _arrayLikeToArray(arr, len) {
|
|
265
220
|
if (len == null || len > arr.length) len = arr.length;
|
|
266
|
-
|
|
267
221
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
268
|
-
|
|
269
222
|
return arr2;
|
|
270
223
|
}
|
|
271
|
-
|
|
272
224
|
function _nonIterableSpread() {
|
|
273
225
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
274
226
|
}
|
|
275
|
-
|
|
276
227
|
function _nonIterableRest() {
|
|
277
228
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
278
229
|
}
|
|
279
|
-
|
|
230
|
+
function _toPrimitive(input, hint) {
|
|
231
|
+
if (typeof input !== "object" || input === null) return input;
|
|
232
|
+
var prim = input[Symbol.toPrimitive];
|
|
233
|
+
if (prim !== undefined) {
|
|
234
|
+
var res = prim.call(input, hint || "default");
|
|
235
|
+
if (typeof res !== "object") return res;
|
|
236
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
237
|
+
}
|
|
238
|
+
return (hint === "string" ? String : Number)(input);
|
|
239
|
+
}
|
|
240
|
+
function _toPropertyKey(arg) {
|
|
241
|
+
var key = _toPrimitive(arg, "string");
|
|
242
|
+
return typeof key === "symbol" ? key : String(key);
|
|
243
|
+
}
|
|
280
244
|
function _classPrivateFieldGet(receiver, privateMap) {
|
|
281
245
|
var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get");
|
|
282
|
-
|
|
283
246
|
return _classApplyDescriptorGet(receiver, descriptor);
|
|
284
247
|
}
|
|
285
|
-
|
|
286
248
|
function _classPrivateFieldSet(receiver, privateMap, value) {
|
|
287
249
|
var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set");
|
|
288
|
-
|
|
289
250
|
_classApplyDescriptorSet(receiver, descriptor, value);
|
|
290
|
-
|
|
291
251
|
return value;
|
|
292
252
|
}
|
|
293
|
-
|
|
294
253
|
function _classExtractFieldDescriptor(receiver, privateMap, action) {
|
|
295
254
|
if (!privateMap.has(receiver)) {
|
|
296
255
|
throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
297
256
|
}
|
|
298
|
-
|
|
299
257
|
return privateMap.get(receiver);
|
|
300
258
|
}
|
|
301
|
-
|
|
302
259
|
function _classApplyDescriptorGet(receiver, descriptor) {
|
|
303
260
|
if (descriptor.get) {
|
|
304
261
|
return descriptor.get.call(receiver);
|
|
305
262
|
}
|
|
306
|
-
|
|
307
263
|
return descriptor.value;
|
|
308
264
|
}
|
|
309
|
-
|
|
310
265
|
function _classApplyDescriptorSet(receiver, descriptor, value) {
|
|
311
266
|
if (descriptor.set) {
|
|
312
267
|
descriptor.set.call(receiver, value);
|
|
@@ -314,20 +269,16 @@ function _classApplyDescriptorSet(receiver, descriptor, value) {
|
|
|
314
269
|
if (!descriptor.writable) {
|
|
315
270
|
throw new TypeError("attempted to set read only private field");
|
|
316
271
|
}
|
|
317
|
-
|
|
318
272
|
descriptor.value = value;
|
|
319
273
|
}
|
|
320
274
|
}
|
|
321
|
-
|
|
322
275
|
function _checkPrivateRedeclaration(obj, privateCollection) {
|
|
323
276
|
if (privateCollection.has(obj)) {
|
|
324
277
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
325
278
|
}
|
|
326
279
|
}
|
|
327
|
-
|
|
328
280
|
function _classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
329
281
|
_checkPrivateRedeclaration(obj, privateMap);
|
|
330
|
-
|
|
331
282
|
privateMap.set(obj, value);
|
|
332
283
|
}
|
|
333
284
|
|
|
@@ -372,7 +323,6 @@ var SORT = {
|
|
|
372
323
|
B_BEFORE_A: 1,
|
|
373
324
|
EQUAL: 1
|
|
374
325
|
};
|
|
375
|
-
|
|
376
326
|
var compare = function compare(a, b) {
|
|
377
327
|
if (a < b) return SORT.A_BEFORE_B;
|
|
378
328
|
if (b < a) return SORT.B_BEFORE_A;
|
|
@@ -382,37 +332,30 @@ var compare = function compare(a, b) {
|
|
|
382
332
|
* Orders all properties by the most dependent props
|
|
383
333
|
* @param config
|
|
384
334
|
*/
|
|
385
|
-
|
|
386
|
-
|
|
387
335
|
var orderPropNames = function orderPropNames(config) {
|
|
388
336
|
return Object.keys(config).sort(function (a, b) {
|
|
389
337
|
var aConf = config[a],
|
|
390
|
-
|
|
338
|
+
bConf = config[b];
|
|
391
339
|
var aProp = aConf.property,
|
|
392
|
-
|
|
393
|
-
|
|
340
|
+
_aConf$properties = aConf.properties,
|
|
341
|
+
aProperties = _aConf$properties === void 0 ? [] : _aConf$properties;
|
|
394
342
|
var bProp = bConf.property,
|
|
395
|
-
|
|
396
|
-
|
|
343
|
+
_bConf$properties = bConf.properties,
|
|
344
|
+
bProperties = _bConf$properties === void 0 ? [] : _bConf$properties;
|
|
397
345
|
var aIsShorthand = SHORTHAND_PROPERTIES.includes(aProp);
|
|
398
346
|
var bIsShorthand = SHORTHAND_PROPERTIES.includes(bProp);
|
|
399
|
-
|
|
400
347
|
if (aIsShorthand && bIsShorthand) {
|
|
401
348
|
var aNum = aProperties.length;
|
|
402
349
|
var bNum = bProperties.length;
|
|
403
|
-
|
|
404
350
|
if (aProp !== bProp) {
|
|
405
351
|
return compare(SHORTHAND_PROPERTIES.indexOf(aProp), SHORTHAND_PROPERTIES.indexOf(bProp));
|
|
406
352
|
}
|
|
407
|
-
|
|
408
353
|
if (aProp === bProp) {
|
|
409
354
|
if (aNum === 0) return SORT.A_BEFORE_B;
|
|
410
355
|
if (bNum === 0) return SORT.B_BEFORE_A;
|
|
411
356
|
}
|
|
412
|
-
|
|
413
357
|
return compare(bNum, aNum);
|
|
414
358
|
}
|
|
415
|
-
|
|
416
359
|
if (aIsShorthand) return SORT.A_BEFORE_B;
|
|
417
360
|
if (bIsShorthand) return SORT.B_BEFORE_A;
|
|
418
361
|
return SORT.EQUAL;
|
|
@@ -423,41 +366,34 @@ var lookupScaleValue = function lookupScaleValue(val, scale, theme) {
|
|
|
423
366
|
if (isArray(scale)) {
|
|
424
367
|
return val;
|
|
425
368
|
}
|
|
426
|
-
|
|
427
369
|
if (isObject(scale)) {
|
|
428
370
|
return get(scale, val);
|
|
429
371
|
}
|
|
430
|
-
|
|
431
372
|
if (isString(scale)) {
|
|
432
373
|
var usedScale = get(theme, scale, get(compatTheme, scale));
|
|
433
374
|
if (!usedScale) return undefined;
|
|
434
375
|
return isArray(usedScale) ? val : get(usedScale, val);
|
|
435
376
|
}
|
|
436
|
-
|
|
437
377
|
return undefined;
|
|
438
378
|
};
|
|
439
379
|
|
|
440
380
|
var createPropertyStyle = function createPropertyStyle(value, props, config) {
|
|
441
381
|
var _scaleValue;
|
|
442
|
-
|
|
443
382
|
var styles = {};
|
|
444
383
|
var _config$transform = config.transform,
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
384
|
+
transform = _config$transform === void 0 ? identity : _config$transform,
|
|
385
|
+
property = config.property,
|
|
386
|
+
_config$properties = config.properties,
|
|
387
|
+
properties = _config$properties === void 0 ? [property] : _config$properties,
|
|
388
|
+
scale = config.scale,
|
|
389
|
+
variable = config.variable;
|
|
451
390
|
var alwaysTransform = scale === undefined || isArray(scale);
|
|
452
|
-
|
|
453
391
|
if (isUndefined(value)) {
|
|
454
392
|
return styles;
|
|
455
393
|
}
|
|
456
|
-
|
|
457
394
|
var useTransform = false;
|
|
458
395
|
var intermediateValue;
|
|
459
396
|
var scaleValue;
|
|
460
|
-
|
|
461
397
|
switch (_typeof(value)) {
|
|
462
398
|
case 'number':
|
|
463
399
|
case 'string':
|
|
@@ -465,50 +401,39 @@ var createPropertyStyle = function createPropertyStyle(value, props, config) {
|
|
|
465
401
|
useTransform = scaleValue !== undefined || alwaysTransform;
|
|
466
402
|
intermediateValue = (_scaleValue = scaleValue) !== null && _scaleValue !== void 0 ? _scaleValue : value;
|
|
467
403
|
break;
|
|
468
|
-
|
|
469
404
|
case 'function':
|
|
470
405
|
if (props.theme) {
|
|
471
406
|
intermediateValue = value(props.theme);
|
|
472
407
|
}
|
|
473
|
-
|
|
474
408
|
break;
|
|
475
|
-
|
|
476
409
|
default:
|
|
477
410
|
return styles;
|
|
478
|
-
}
|
|
411
|
+
}
|
|
412
|
+
// for each property look up the scale value from theme if passed and apply any
|
|
479
413
|
// final transforms to the value
|
|
480
|
-
|
|
481
|
-
|
|
482
414
|
properties.forEach(function (property) {
|
|
483
415
|
var styleValue = intermediateValue;
|
|
484
|
-
|
|
485
416
|
if (useTransform && !isUndefined(styleValue)) {
|
|
486
417
|
styleValue = transform(styleValue, property, props);
|
|
487
418
|
}
|
|
488
|
-
|
|
489
419
|
switch (_typeof(styleValue)) {
|
|
490
420
|
case 'number':
|
|
491
421
|
case 'string':
|
|
492
422
|
return styles[property] = styleValue;
|
|
493
|
-
|
|
494
423
|
case 'object':
|
|
495
424
|
return Object.assign(styles, styleValue);
|
|
496
425
|
}
|
|
497
426
|
});
|
|
498
|
-
|
|
499
427
|
if (variable) {
|
|
500
428
|
var styleValue = intermediateValue;
|
|
501
|
-
|
|
502
429
|
if (useTransform && !isUndefined(styleValue)) {
|
|
503
430
|
styleValue = transform(styleValue, property, props);
|
|
504
431
|
}
|
|
505
|
-
|
|
506
432
|
if (styleValue && _typeof(styleValue) !== 'object') {
|
|
507
433
|
styles[variable] = styleValue;
|
|
508
434
|
}
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
|
|
435
|
+
}
|
|
436
|
+
// return the resulting styles object
|
|
512
437
|
return styles;
|
|
513
438
|
};
|
|
514
439
|
|
|
@@ -517,22 +442,18 @@ var BREAKPOINT_KEYS$1 = ['_', 'xs', 'sm', 'md', 'lg', 'xl'];
|
|
|
517
442
|
/**
|
|
518
443
|
* Destructures the themes breakpoints into an ordered structure to traverse
|
|
519
444
|
*/
|
|
520
|
-
|
|
521
445
|
var templateMediaQuery$1 = function templateMediaQuery(breakpoint) {
|
|
522
446
|
return "@media screen and (min-width: ".concat(breakpoint, "px)");
|
|
523
447
|
};
|
|
524
|
-
|
|
525
448
|
var createMediaQueries$1 = function createMediaQueries(breakpoints) {
|
|
526
449
|
if (breakpoints === undefined) return null;
|
|
527
|
-
|
|
528
450
|
var _ref = breakpoints !== null && breakpoints !== void 0 ? breakpoints : {},
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
451
|
+
xs = _ref.xs,
|
|
452
|
+
sm = _ref.sm,
|
|
453
|
+
md = _ref.md,
|
|
454
|
+
lg = _ref.lg,
|
|
455
|
+
xl = _ref.xl;
|
|
456
|
+
// Ensure order for mapping
|
|
536
457
|
return {
|
|
537
458
|
map: mapValues(breakpoints, templateMediaQuery$1),
|
|
538
459
|
array: [xs, sm, md, lg, xl].map(templateMediaQuery$1)
|
|
@@ -546,14 +467,12 @@ var isMediaMap$1 = function isMediaMap(val) {
|
|
|
546
467
|
};
|
|
547
468
|
var objectParser$1 = function objectParser(value, props, config, breakpoints) {
|
|
548
469
|
var styles = {};
|
|
549
|
-
|
|
550
470
|
var _ = value._,
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
471
|
+
rest = _objectWithoutProperties(value, _excluded$1);
|
|
472
|
+
// the keyof 'base' is base styles
|
|
473
|
+
if (_) Object.assign(styles, createPropertyStyle(_, props, config));
|
|
474
|
+
// Map over remaining keys and merge the corresponding breakpoint styles
|
|
555
475
|
// for that property.
|
|
556
|
-
|
|
557
476
|
Object.keys(breakpoints).forEach(function (breakpointKey) {
|
|
558
477
|
var bpStyles = rest[breakpointKey];
|
|
559
478
|
if (typeof bpStyles === 'undefined') return;
|
|
@@ -563,15 +482,13 @@ var objectParser$1 = function objectParser(value, props, config, breakpoints) {
|
|
|
563
482
|
};
|
|
564
483
|
var arrayParser$1 = function arrayParser(value, props, config, breakpoints) {
|
|
565
484
|
var styles = {};
|
|
566
|
-
|
|
567
485
|
var _value = _toArray(value),
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
486
|
+
_ = _value[0],
|
|
487
|
+
rest = _value.slice(1);
|
|
488
|
+
// the first index is base styles
|
|
489
|
+
if (_) Object.assign(styles, createPropertyStyle(_, props, config));
|
|
490
|
+
// Map over each value in the array and merge the corresponding breakpoint styles
|
|
573
491
|
// for that property.
|
|
574
|
-
|
|
575
492
|
rest.forEach(function (val, i) {
|
|
576
493
|
var breakpointKey = breakpoints[i];
|
|
577
494
|
if (!breakpointKey || typeof val === 'undefined') return;
|
|
@@ -591,32 +508,26 @@ var orderBreakpoints$1 = function orderBreakpoints(styles, breakpoints) {
|
|
|
591
508
|
|
|
592
509
|
var renderPropValue$1 = function renderPropValue(styles, prop, props, property, ctx) {
|
|
593
510
|
var value = get(props, prop);
|
|
594
|
-
|
|
595
511
|
switch (_typeof(value)) {
|
|
596
512
|
case 'string':
|
|
597
513
|
case 'number':
|
|
598
514
|
case 'function':
|
|
599
515
|
return Object.assign(styles, createPropertyStyle(value, props, property));
|
|
600
516
|
// handle any props configured with the responsive notation
|
|
601
|
-
|
|
602
517
|
case 'object':
|
|
603
518
|
if (!ctx.mediaQueries) {
|
|
604
519
|
return;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
|
|
520
|
+
}
|
|
521
|
+
// If it is an array the order of values is smallest to largest: [_, xs, ...]
|
|
608
522
|
if (isMediaArray$1(value)) {
|
|
609
523
|
return merge(styles, arrayParser$1(value, props, property, ctx.mediaQueries.array));
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
|
|
524
|
+
}
|
|
525
|
+
// Check to see if value is an object matching the responsive syntax and generate the styles.
|
|
613
526
|
if (value && isMediaMap$1(value)) {
|
|
614
527
|
return merge(styles, objectParser$1(value, props, property, ctx.mediaQueries.map));
|
|
615
528
|
}
|
|
616
|
-
|
|
617
529
|
}
|
|
618
530
|
};
|
|
619
|
-
|
|
620
531
|
function createParser$1(config) {
|
|
621
532
|
var omitProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
622
533
|
var propNames = orderPropNames(config).filter(function (name) {
|
|
@@ -625,19 +536,16 @@ function createParser$1(config) {
|
|
|
625
536
|
var ctx = {
|
|
626
537
|
mediaQueries: null
|
|
627
538
|
};
|
|
628
|
-
|
|
629
539
|
var parser = function parser(props) {
|
|
630
540
|
var isCss = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
631
541
|
var styles = {};
|
|
632
|
-
var theme = props.theme;
|
|
633
|
-
|
|
542
|
+
var theme = props.theme;
|
|
543
|
+
// Attempt to cache the breakpoints if we have not yet or if theme has become available.
|
|
634
544
|
if (ctx.mediaQueries === null) {
|
|
635
545
|
var _theme$breakpoints;
|
|
636
|
-
|
|
637
546
|
// Save the breakpoints if we can
|
|
638
547
|
ctx.mediaQueries = createMediaQueries$1((_theme$breakpoints = theme === null || theme === void 0 ? void 0 : theme.breakpoints) !== null && _theme$breakpoints !== void 0 ? _theme$breakpoints : compatTheme.breakpoints);
|
|
639
548
|
}
|
|
640
|
-
|
|
641
549
|
if (!isCss) {
|
|
642
550
|
// Loops over all prop names on the configured config to check for configured styles
|
|
643
551
|
propNames.forEach(function (prop) {
|
|
@@ -648,7 +556,6 @@ function createParser$1(config) {
|
|
|
648
556
|
// Loops over all prop names on the configured config to check for configured styles
|
|
649
557
|
Object.keys(props).forEach(function (prop) {
|
|
650
558
|
var property = config[prop];
|
|
651
|
-
|
|
652
559
|
if (property) {
|
|
653
560
|
renderPropValue$1(styles, prop, props, property, ctx);
|
|
654
561
|
} else if (prop !== 'theme') {
|
|
@@ -656,12 +563,10 @@ function createParser$1(config) {
|
|
|
656
563
|
}
|
|
657
564
|
});
|
|
658
565
|
}
|
|
659
|
-
|
|
660
566
|
if (ctx.mediaQueries !== null) return orderBreakpoints$1(styles, ctx.mediaQueries.array);
|
|
661
567
|
return styles;
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
|
|
568
|
+
};
|
|
569
|
+
// return the parser function with the resulting meta information for further composition
|
|
665
570
|
return Object.assign(parser, {
|
|
666
571
|
propNames: propNames,
|
|
667
572
|
config: config
|
|
@@ -676,9 +581,8 @@ var getSelectors = function getSelectors() {
|
|
|
676
581
|
var rules = {};
|
|
677
582
|
Object.entries(base).forEach(function (_ref) {
|
|
678
583
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
584
|
+
key = _ref2[0],
|
|
585
|
+
styles = _ref2[1];
|
|
682
586
|
if (!filters.includes(key) && isObject(styles)) {
|
|
683
587
|
set(rules, [key, 'base'], styles);
|
|
684
588
|
} else {
|
|
@@ -687,20 +591,17 @@ var getSelectors = function getSelectors() {
|
|
|
687
591
|
});
|
|
688
592
|
Object.entries(variants).forEach(function (_ref3) {
|
|
689
593
|
var _ref4 = _slicedToArray(_ref3, 2),
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
594
|
+
key = _ref4[0],
|
|
595
|
+
variantConfig = _ref4[1].variants;
|
|
693
596
|
Object.entries(variantConfig).forEach(function (_ref5) {
|
|
694
597
|
var _ref6 = _slicedToArray(_ref5, 2),
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
598
|
+
option = _ref6[0],
|
|
599
|
+
optionStyles = _ref6[1];
|
|
698
600
|
var optionId = "".concat(key, "-").concat(option);
|
|
699
601
|
Object.entries(optionStyles).forEach(function (_ref7) {
|
|
700
602
|
var _ref8 = _slicedToArray(_ref7, 2),
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
603
|
+
key = _ref8[0],
|
|
604
|
+
styles = _ref8[1];
|
|
704
605
|
if (!filters.includes(key) && isObject(styles)) {
|
|
705
606
|
set(rules, [key, optionId], styles);
|
|
706
607
|
} else {
|
|
@@ -711,14 +612,12 @@ var getSelectors = function getSelectors() {
|
|
|
711
612
|
});
|
|
712
613
|
Object.entries(states).forEach(function (_ref9) {
|
|
713
614
|
var _ref10 = _slicedToArray(_ref9, 2),
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
615
|
+
optionId = _ref10[0],
|
|
616
|
+
optionStyles = _ref10[1];
|
|
717
617
|
Object.entries(optionStyles).forEach(function (_ref11) {
|
|
718
618
|
var _ref12 = _slicedToArray(_ref11, 2),
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
619
|
+
key = _ref12[0],
|
|
620
|
+
styles = _ref12[1];
|
|
722
621
|
if (!filters.includes(key) && isObject(styles)) {
|
|
723
622
|
set(rules, [key, optionId], styles);
|
|
724
623
|
} else {
|
|
@@ -728,7 +627,6 @@ var getSelectors = function getSelectors() {
|
|
|
728
627
|
});
|
|
729
628
|
return rules;
|
|
730
629
|
};
|
|
731
|
-
|
|
732
630
|
var createGetActiveStyleIds = function createGetActiveStyleIds(variants, states) {
|
|
733
631
|
var vIds = Object.keys(variants);
|
|
734
632
|
var sIds = Object.keys(states);
|
|
@@ -747,21 +645,18 @@ var createGetActiveStyleIds = function createGetActiveStyleIds(variants, states)
|
|
|
747
645
|
return activeIds;
|
|
748
646
|
};
|
|
749
647
|
};
|
|
750
|
-
|
|
751
648
|
var extractBreakpointStyles = function extractBreakpointStyles(styles, medias) {
|
|
752
649
|
var unscoped = {};
|
|
753
650
|
var breakpoint = {};
|
|
754
651
|
Object.entries(styles).forEach(function (_ref13) {
|
|
755
652
|
var _ref14 = _slicedToArray(_ref13, 2),
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
653
|
+
rule = _ref14[0],
|
|
654
|
+
value = _ref14[1];
|
|
759
655
|
var target = medias.includes(rule) ? breakpoint : unscoped;
|
|
760
656
|
target[rule] = value;
|
|
761
657
|
});
|
|
762
658
|
return [unscoped, breakpoint];
|
|
763
659
|
};
|
|
764
|
-
|
|
765
660
|
var applyOverride = function applyOverride() {
|
|
766
661
|
var override = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
767
662
|
var baseResult = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -769,66 +664,54 @@ var applyOverride = function applyOverride() {
|
|
|
769
664
|
var parser = arguments.length > 3 ? arguments[3] : undefined;
|
|
770
665
|
var theme = arguments.length > 4 ? arguments[4] : undefined;
|
|
771
666
|
var media = arguments.length > 5 ? arguments[5] : undefined;
|
|
772
|
-
|
|
773
667
|
var _extractBreakpointSty = extractBreakpointStyles(parser(_objectSpread2(_objectSpread2({}, override), {}, {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
668
|
+
theme: theme
|
|
669
|
+
}), true), media),
|
|
670
|
+
_extractBreakpointSty2 = _slicedToArray(_extractBreakpointSty, 2),
|
|
671
|
+
overrideStyles = _extractBreakpointSty2[0],
|
|
672
|
+
overrideBreakpointStyles = _extractBreakpointSty2[1];
|
|
780
673
|
for (var rule in overrideStyles) {
|
|
781
674
|
baseResult[rule] = overrideStyles[rule];
|
|
782
675
|
}
|
|
783
|
-
|
|
784
676
|
media.forEach(function (mq) {
|
|
785
677
|
var mqOverride = overrideBreakpointStyles[mq];
|
|
786
678
|
if (!mqOverride || isEmpty(mqOverride)) return;
|
|
787
|
-
|
|
788
679
|
if (!breakpointResult[mq]) {
|
|
789
680
|
breakpointResult[mq] = {};
|
|
790
681
|
}
|
|
791
|
-
|
|
792
682
|
var mqStyle = breakpointResult[mq];
|
|
793
|
-
|
|
794
683
|
for (var _rule in mqOverride) {
|
|
795
684
|
mqStyle[_rule] = mqOverride[_rule];
|
|
796
685
|
}
|
|
797
686
|
});
|
|
798
687
|
};
|
|
799
|
-
|
|
800
688
|
var applyStyle = function applyStyle(resultStyles, config, props, ctx) {
|
|
801
689
|
var base = config.base;
|
|
802
690
|
var parser = ctx.parser,
|
|
803
|
-
|
|
804
|
-
|
|
691
|
+
getMediaSelectors = ctx.getMediaSelectors,
|
|
692
|
+
getActiveOverrides = ctx.getActiveOverrides;
|
|
805
693
|
var theme = props.theme;
|
|
806
694
|
var overrides = Object.values(pick(config, getActiveOverrides(props)));
|
|
807
695
|
var media = getMediaSelectors(props);
|
|
808
|
-
|
|
809
696
|
var _extractBreakpointSty3 = extractBreakpointStyles(parser(_objectSpread2(_objectSpread2({}, base), {}, {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
697
|
+
theme: theme
|
|
698
|
+
}), true), media),
|
|
699
|
+
_extractBreakpointSty4 = _slicedToArray(_extractBreakpointSty3, 2),
|
|
700
|
+
styles = _extractBreakpointSty4[0],
|
|
701
|
+
breakpointStyles = _extractBreakpointSty4[1];
|
|
816
702
|
for (var rule in styles) {
|
|
817
703
|
resultStyles[rule] = styles[rule];
|
|
818
704
|
}
|
|
819
|
-
|
|
820
705
|
overrides.forEach(function (override) {
|
|
821
706
|
applyOverride(override, resultStyles, breakpointStyles, parser, theme, media);
|
|
822
707
|
});
|
|
823
708
|
media.forEach(function (media) {
|
|
824
709
|
var bp = breakpointStyles[media];
|
|
825
|
-
|
|
826
710
|
if (!isEmpty(bp)) {
|
|
827
711
|
resultStyles[media] = bp;
|
|
828
712
|
}
|
|
829
713
|
});
|
|
830
714
|
};
|
|
831
|
-
|
|
832
715
|
var createStylist = function createStylist(parser) {
|
|
833
716
|
var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
834
717
|
var variants = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -838,7 +721,6 @@ var createStylist = function createStylist(parser) {
|
|
|
838
721
|
parser: parser,
|
|
839
722
|
getMediaSelectors: function getMediaSelectors(_ref15) {
|
|
840
723
|
var _theme$breakpoints;
|
|
841
|
-
|
|
842
724
|
var theme = _ref15.theme;
|
|
843
725
|
var breakpoints = (_theme$breakpoints = theme === null || theme === void 0 ? void 0 : theme.breakpoints) !== null && _theme$breakpoints !== void 0 ? _theme$breakpoints : compatTheme.breakpoints;
|
|
844
726
|
return ['xs', 'sm', 'md', 'lg', 'xl'].map(function (key) {
|
|
@@ -849,15 +731,12 @@ var createStylist = function createStylist(parser) {
|
|
|
849
731
|
};
|
|
850
732
|
return function (props) {
|
|
851
733
|
var vars = props.vars;
|
|
852
|
-
|
|
853
734
|
var result = _objectSpread2({}, vars);
|
|
854
|
-
|
|
855
735
|
Object.entries(selectorGroups).forEach(function (_ref16) {
|
|
856
736
|
var _ref17 = _slicedToArray(_ref16, 2),
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
737
|
+
selectorId = _ref17[0],
|
|
738
|
+
_ref17$ = _ref17[1],
|
|
739
|
+
config = _ref17$ === void 0 ? {} : _ref17$;
|
|
861
740
|
if (selectorId === 'primary') {
|
|
862
741
|
applyStyle(result, config, props, context);
|
|
863
742
|
} else {
|
|
@@ -875,23 +754,14 @@ var createStylist = function createStylist(parser) {
|
|
|
875
754
|
var AnimusExtended = /*#__PURE__*/function () {
|
|
876
755
|
function AnimusExtended(props, groups, parser, base, variants, states, activeGroups, custom) {
|
|
877
756
|
_classCallCheck(this, AnimusExtended);
|
|
878
|
-
|
|
879
757
|
_defineProperty(this, "propRegistry", {});
|
|
880
|
-
|
|
881
758
|
_defineProperty(this, "groupRegistry", {});
|
|
882
|
-
|
|
883
759
|
_defineProperty(this, "parser", {});
|
|
884
|
-
|
|
885
760
|
_defineProperty(this, "baseStyles", {});
|
|
886
|
-
|
|
887
761
|
_defineProperty(this, "statesConfig", {});
|
|
888
|
-
|
|
889
762
|
_defineProperty(this, "variants", {});
|
|
890
|
-
|
|
891
763
|
_defineProperty(this, "activeGroups", {});
|
|
892
|
-
|
|
893
764
|
_defineProperty(this, "custom", {});
|
|
894
|
-
|
|
895
765
|
this.propRegistry = props;
|
|
896
766
|
this.groupRegistry = groups;
|
|
897
767
|
this.parser = parser;
|
|
@@ -901,7 +771,6 @@ var AnimusExtended = /*#__PURE__*/function () {
|
|
|
901
771
|
this.activeGroups = activeGroups;
|
|
902
772
|
this.custom = custom;
|
|
903
773
|
}
|
|
904
|
-
|
|
905
774
|
_createClass(AnimusExtended, [{
|
|
906
775
|
key: "extend",
|
|
907
776
|
value: function extend() {
|
|
@@ -937,15 +806,13 @@ var AnimusExtended = /*#__PURE__*/function () {
|
|
|
937
806
|
key: "asElement",
|
|
938
807
|
value: function asElement(component) {
|
|
939
808
|
var propNames = Object.keys(this.propRegistry);
|
|
940
|
-
|
|
941
809
|
var StyledComponent = /*#__PURE__*/_styled(component, {
|
|
942
810
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
943
811
|
return isPropValid(prop) && !propNames.includes(prop);
|
|
944
812
|
},
|
|
945
813
|
target: "e1np124q1",
|
|
946
814
|
label: "AnimusExtended"
|
|
947
|
-
})(this.build(), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
948
|
-
|
|
815
|
+
})(this.build(), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFuaW11c0V4dGVuZGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZDZ0MiLCJmaWxlIjoiQW5pbXVzRXh0ZW5kZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgaXNQcm9wVmFsaWQgZnJvbSAnQGVtb3Rpb24vaXMtcHJvcC12YWxpZCc7XHJcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcclxuaW1wb3J0IHsgbWVyZ2UgfSBmcm9tICdsb2Rhc2gnO1xyXG5pbXBvcnQgeyBjcmVhdGVQYXJzZXIgfSBmcm9tICcuL3N0eWxlcy9jcmVhdGVQYXJzZXInO1xyXG5pbXBvcnQgeyBjcmVhdGVTdHlsaXN0IH0gZnJvbSAnLi9zdHlsZXMvY3JlYXRlU3R5bGlzdCc7XHJcbmV4cG9ydCBjbGFzcyBBbmltdXNFeHRlbmRlZCB7XHJcbiAgICBwcm9wUmVnaXN0cnkgPSB7fTtcclxuICAgIGdyb3VwUmVnaXN0cnkgPSB7fTtcclxuICAgIHBhcnNlciA9IHt9O1xyXG4gICAgYmFzZVN0eWxlcyA9IHt9O1xyXG4gICAgc3RhdGVzQ29uZmlnID0ge307XHJcbiAgICB2YXJpYW50cyA9IHt9O1xyXG4gICAgYWN0aXZlR3JvdXBzID0ge307XHJcbiAgICBjdXN0b20gPSB7fTtcclxuICAgIGNvbnN0cnVjdG9yKHByb3BzLCBncm91cHMsIHBhcnNlciwgYmFzZSwgdmFyaWFudHMsIHN0YXRlcywgYWN0aXZlR3JvdXBzLCBjdXN0b20pIHtcclxuICAgICAgICB0aGlzLnByb3BSZWdpc3RyeSA9IHByb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hpcy5wYXJzZXIuY29uZmlnLCAuLi50aGlzLmN1c3RvbSB9LCBbXHJcbiAgICAgICAgICAgIC4uLk9iamVjdC5rZXlzKHRoaXMudmFyaWFudHMpLFxyXG4gICAgICAgICAgICAuLi5PYmplY3Qua2V5cyh0aGlzLnN0YXRlc0NvbmZpZyksXHJcbiAgICAgICAgXSksIHRoaXMuYmFzZVN0eWxlcywgdGhpcy52YXJpYW50cywgdGhpcy5zdGF0ZXNDb25maWcpO1xyXG4gICAgICAgIHJldHVybiBoYW5kbGVyO1xyXG4gICAgfVxyXG59XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUFuaW11c0V4dGVuZGVkLmpzLm1hcCJdfQ== */");
|
|
949
816
|
return Object.assign(StyledComponent, {
|
|
950
817
|
extend: this.extend.bind(this)
|
|
951
818
|
});
|
|
@@ -953,11 +820,14 @@ var AnimusExtended = /*#__PURE__*/function () {
|
|
|
953
820
|
}, {
|
|
954
821
|
key: "asComponent",
|
|
955
822
|
value: function asComponent(AsComponent) {
|
|
823
|
+
var propNames = Object.keys(this.propRegistry);
|
|
956
824
|
var StyledComponent = /*#__PURE__*/_styled(AsComponent, {
|
|
825
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
826
|
+
return !propNames.includes(prop);
|
|
827
|
+
},
|
|
957
828
|
target: "e1np124q0",
|
|
958
829
|
label: "AnimusExtended"
|
|
959
|
-
})(this.build(), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
960
|
-
|
|
830
|
+
})(this.build(), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFuaW11c0V4dGVuZGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EZ0MiLCJmaWxlIjoiQW5pbXVzRXh0ZW5kZWQudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvc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ICAgfVxyXG59XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUFuaW11c0V4dGVuZGVkLmpzLm1hcCJdfQ== */");
|
|
961
831
|
return Object.assign(StyledComponent, {
|
|
962
832
|
extend: this.extend.bind(this)
|
|
963
833
|
});
|
|
@@ -969,30 +839,20 @@ var AnimusExtended = /*#__PURE__*/function () {
|
|
|
969
839
|
return handler;
|
|
970
840
|
}
|
|
971
841
|
}]);
|
|
972
|
-
|
|
973
842
|
return AnimusExtended;
|
|
974
843
|
}();
|
|
975
844
|
|
|
976
845
|
var AnimusWithAll = /*#__PURE__*/function () {
|
|
977
846
|
function AnimusWithAll(props, groups, parser, base, variants, states, activeGroups, custom) {
|
|
978
847
|
_classCallCheck(this, AnimusWithAll);
|
|
979
|
-
|
|
980
848
|
_defineProperty(this, "propRegistry", {});
|
|
981
|
-
|
|
982
849
|
_defineProperty(this, "groupRegistry", {});
|
|
983
|
-
|
|
984
850
|
_defineProperty(this, "parser", {});
|
|
985
|
-
|
|
986
851
|
_defineProperty(this, "baseStyles", {});
|
|
987
|
-
|
|
988
852
|
_defineProperty(this, "statesConfig", {});
|
|
989
|
-
|
|
990
853
|
_defineProperty(this, "variants", {});
|
|
991
|
-
|
|
992
854
|
_defineProperty(this, "activeGroups", {});
|
|
993
|
-
|
|
994
855
|
_defineProperty(this, "custom", {});
|
|
995
|
-
|
|
996
856
|
this.propRegistry = props;
|
|
997
857
|
this.groupRegistry = groups;
|
|
998
858
|
this.parser = parser;
|
|
@@ -1002,7 +862,6 @@ var AnimusWithAll = /*#__PURE__*/function () {
|
|
|
1002
862
|
this.activeGroups = activeGroups;
|
|
1003
863
|
this.custom = custom;
|
|
1004
864
|
}
|
|
1005
|
-
|
|
1006
865
|
_createClass(AnimusWithAll, [{
|
|
1007
866
|
key: "extend",
|
|
1008
867
|
value: function extend() {
|
|
@@ -1012,15 +871,13 @@ var AnimusWithAll = /*#__PURE__*/function () {
|
|
|
1012
871
|
key: "asElement",
|
|
1013
872
|
value: function asElement(component) {
|
|
1014
873
|
var propNames = Object.keys(this.propRegistry);
|
|
1015
|
-
|
|
1016
874
|
var Component = /*#__PURE__*/_styled(component, {
|
|
1017
875
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1018
876
|
return isPropValid(prop) && !propNames.includes(prop);
|
|
1019
877
|
},
|
|
1020
878
|
target: "e19x4vr1",
|
|
1021
879
|
label: "AnimusWithAll"
|
|
1022
|
-
})(this.build(), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFuaW11cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QjBCIiwiZmlsZSI6IkFuaW11cy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBpc1Byb3BWYWxpZCBmcm9tICdAZW1vdGlvbi9pcy1wcm9wLXZhbGlkJztcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBtZXJnZSB9IGZyb20gJ2xvZGFzaCc7XHJcbmltcG9ydCB7IEFuaW11c0V4dGVuZGVkIH0gZnJvbSAnLi9BbmltdXNFeHRlbmRlZCc7XHJcbmltcG9ydCB7IGNyZWF0ZVBhcnNlciB9IGZyb20gJy4vc3R5bGVzL2NyZWF0ZVBhcnNlcic7XHJcbmltcG9ydCB7IGNyZWF0ZVN0eWxpc3QgfSBmcm9tICcuL3N0eWxlcy9jcmVhdGVTdHlsaXN0JztcclxuZXhwb3J0IGNsYXNzIEFuaW11c1dpdGhBbGwge1xyXG4gICAgcHJvcFJlZ2lzdHJ5ID0ge307XHJcbiAgICBncm91cFJlZ2lzdHJ5ID0ge307XHJcbiAgICBwYXJzZXIgPSB7fTtcclxuICAgIGJhc2VTdHlsZXMgPSB7fTtcclxuICAgIHN0YXRlc0NvbmZpZyA9IHt9O1xyXG4gICAgdmFyaWFudHMgPSB7fTtc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b3ApID0+
|
|
1023
|
-
|
|
880
|
+
})(this.build(), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFuaW11cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QjBCIiwiZmlsZSI6IkFuaW11cy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBpc1Byb3BWYWxpZCBmcm9tICdAZW1vdGlvbi9pcy1wcm9wLXZhbGlkJztcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBtZXJnZSB9IGZyb20gJ2xvZGFzaCc7XHJcbmltcG9ydCB7IEFuaW11c0V4dGVuZGVkIH0gZnJvbSAnLi9BbmltdXNFeHRlbmRlZCc7XHJcbmltcG9ydCB7IGNyZWF0ZVBhcnNlciB9IGZyb20gJy4vc3R5bGVzL2NyZWF0ZVBhcnNlcic7XHJcbmltcG9ydCB7IGNyZWF0ZVN0eWxpc3QgfSBmcm9tICcuL3N0eWxlcy9jcmVhdGVTdHlsaXN0JztcclxuZXhwb3J0IGNsYXNzIEFuaW11c1dpdGhBbGwge1xyXG4gICAgcHJvcFJlZ2lzdHJ5ID0ge307XHJcbiAgICBncm91cFJlZ2lzdHJ5ID0ge307XHJcbiAgICBwYXJzZXIgPSB7fTtcclxuICAgIGJhc2VTdHlsZXMgPSB7fTtcclxuICAgIHN0YXRlc0NvbmZpZyA9IHt9O1xyXG4gICAgdmFyaWFudHMgPSB7fTtcclxuICAgIGFjdGl2ZUdyb3VwcyA9IHt9O1xyXG4gICAgY3VzdG9tID0ge307XHJcbiAgICBjb25zdHJ1Y3Rvcihwcm9wcywgZ3JvdXBzLCBwYXJzZXIsIGJhc2UsIHZhcmlhbnRzLCBzdGF0ZXMsIGFjdGl2ZUdyb3VwcywgY3VzdG9tKSB7XHJcbiAgICAgICAgdGhpcy5wcm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geyBbcHJvcF06IG9wdGlvbnMgfSkpO1xyXG4gICAgfVxyXG59XHJcbmV4cG9ydCBjbGFzcyBBbmltdXMgZXh0ZW5kcyBBbmltdXNXaXRoQmFzZSB7XHJcbiAgICBjb25zdHJ1Y3Rvcihwcm9wcywgZ3JvdXBzKSB7XHJcbiAgICAgICAgc3VwZXIocHJvcHMsIGdyb3VwcywgY3JlYXRlUGFyc2VyKHByb3BzKSwge30pO1xyXG4gICAgfVxyXG4gICAgc3R5bGVzKGNvbmZpZykge1xyXG4gICAgICAgIHJldHVybiBuZXcgQW5pbXVzV2l0aEJhc2UodGhpcy5wcm9wUmVnaXN0cnksIHRoaXMuZ3JvdXBSZWdpc3RyeSwgdGhpcy5wYXJzZXIsIGNvbmZpZyk7XHJcbiAgICB9XHJcbn1cclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9QW5pbXVzLmpzLm1hcCJdfQ== */");
|
|
1024
881
|
return Object.assign(Component, {
|
|
1025
882
|
extend: this.extend.bind(this)
|
|
1026
883
|
});
|
|
@@ -1028,11 +885,14 @@ var AnimusWithAll = /*#__PURE__*/function () {
|
|
|
1028
885
|
}, {
|
|
1029
886
|
key: "asComponent",
|
|
1030
887
|
value: function asComponent(AsComponent) {
|
|
888
|
+
var propNames = Object.keys(this.propRegistry);
|
|
1031
889
|
var StyledComponent = /*#__PURE__*/_styled(AsComponent, {
|
|
890
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
891
|
+
return !propNames.includes(prop);
|
|
892
|
+
},
|
|
1032
893
|
target: "e19x4vr0",
|
|
1033
894
|
label: "AnimusWithAll"
|
|
1034
|
-
})(this.build(), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
1035
|
-
|
|
895
|
+
})(this.build(), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFuaW11cy50cyJdLCJ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ihwcm9wcywgZ3JvdXBzKSB7XHJcbiAgICAgICAgc3VwZXIocHJvcHMsIGdyb3VwcywgY3JlYXRlUGFyc2VyKHByb3BzKSwge30pO1xyXG4gICAgfVxyXG4gICAgc3R5bGVzKGNvbmZpZykge1xyXG4gICAgICAgIHJldHVybiBuZXcgQW5pbXVzV2l0aEJhc2UodGhpcy5wcm9wUmVnaXN0cnksIHRoaXMuZ3JvdXBSZWdpc3RyeSwgdGhpcy5wYXJzZXIsIGNvbmZpZyk7XHJcbiAgICB9XHJcbn1cclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9QW5pbXVzLmpzLm1hcCJdfQ== */");
|
|
1036
896
|
return Object.assign(StyledComponent, {
|
|
1037
897
|
extend: this.extend.bind(this)
|
|
1038
898
|
});
|
|
@@ -1044,63 +904,45 @@ var AnimusWithAll = /*#__PURE__*/function () {
|
|
|
1044
904
|
return handler;
|
|
1045
905
|
}
|
|
1046
906
|
}]);
|
|
1047
|
-
|
|
1048
907
|
return AnimusWithAll;
|
|
1049
908
|
}();
|
|
1050
|
-
|
|
1051
909
|
var AnimusWithSystem = /*#__PURE__*/function (_AnimusWithAll) {
|
|
1052
910
|
_inherits(AnimusWithSystem, _AnimusWithAll);
|
|
1053
|
-
|
|
1054
911
|
var _super = _createSuper(AnimusWithSystem);
|
|
1055
|
-
|
|
1056
912
|
function AnimusWithSystem(props, groups, parser, base, variants, states, activeGroups) {
|
|
1057
913
|
_classCallCheck(this, AnimusWithSystem);
|
|
1058
|
-
|
|
1059
914
|
return _super.call(this, props, groups, parser, base, variants, states, activeGroups, {});
|
|
1060
915
|
}
|
|
1061
|
-
|
|
1062
916
|
_createClass(AnimusWithSystem, [{
|
|
1063
917
|
key: "props",
|
|
1064
918
|
value: function props(config) {
|
|
1065
919
|
return new AnimusWithAll(this.propRegistry, this.groupRegistry, this.parser, this.baseStyles, this.variants, this.statesConfig, this.activeGroups, config);
|
|
1066
920
|
}
|
|
1067
921
|
}]);
|
|
1068
|
-
|
|
1069
922
|
return AnimusWithSystem;
|
|
1070
923
|
}(AnimusWithAll);
|
|
1071
|
-
|
|
1072
924
|
var AnimusWithStates = /*#__PURE__*/function (_AnimusWithSystem) {
|
|
1073
925
|
_inherits(AnimusWithStates, _AnimusWithSystem);
|
|
1074
|
-
|
|
1075
926
|
var _super2 = _createSuper(AnimusWithStates);
|
|
1076
|
-
|
|
1077
927
|
function AnimusWithStates(props, groups, parser, base, variants, states) {
|
|
1078
928
|
_classCallCheck(this, AnimusWithStates);
|
|
1079
|
-
|
|
1080
929
|
return _super2.call(this, props, groups, parser, base, variants, states, {});
|
|
1081
930
|
}
|
|
1082
|
-
|
|
1083
931
|
_createClass(AnimusWithStates, [{
|
|
1084
932
|
key: "groups",
|
|
1085
933
|
value: function groups(config) {
|
|
1086
934
|
return new AnimusWithSystem(this.propRegistry, this.groupRegistry, this.parser, this.baseStyles, this.variants, this.statesConfig, config);
|
|
1087
935
|
}
|
|
1088
936
|
}]);
|
|
1089
|
-
|
|
1090
937
|
return AnimusWithStates;
|
|
1091
938
|
}(AnimusWithSystem);
|
|
1092
|
-
|
|
1093
939
|
var AnimusWithVariants = /*#__PURE__*/function (_AnimusWithStates) {
|
|
1094
940
|
_inherits(AnimusWithVariants, _AnimusWithStates);
|
|
1095
|
-
|
|
1096
941
|
var _super3 = _createSuper(AnimusWithVariants);
|
|
1097
|
-
|
|
1098
942
|
function AnimusWithVariants(props, groups, parser, base, variants) {
|
|
1099
943
|
_classCallCheck(this, AnimusWithVariants);
|
|
1100
|
-
|
|
1101
944
|
return _super3.call(this, props, groups, parser, base, variants, {});
|
|
1102
945
|
}
|
|
1103
|
-
|
|
1104
946
|
_createClass(AnimusWithVariants, [{
|
|
1105
947
|
key: "states",
|
|
1106
948
|
value: function states(config) {
|
|
@@ -1113,21 +955,15 @@ var AnimusWithVariants = /*#__PURE__*/function (_AnimusWithStates) {
|
|
|
1113
955
|
return new AnimusWithVariants(this.propRegistry, this.groupRegistry, this.parser, this.baseStyles, merge(this.variants, _defineProperty({}, prop, options)));
|
|
1114
956
|
}
|
|
1115
957
|
}]);
|
|
1116
|
-
|
|
1117
958
|
return AnimusWithVariants;
|
|
1118
959
|
}(AnimusWithStates);
|
|
1119
|
-
|
|
1120
960
|
var AnimusWithBase = /*#__PURE__*/function (_AnimusWithVariants) {
|
|
1121
961
|
_inherits(AnimusWithBase, _AnimusWithVariants);
|
|
1122
|
-
|
|
1123
962
|
var _super4 = _createSuper(AnimusWithBase);
|
|
1124
|
-
|
|
1125
963
|
function AnimusWithBase(props, groups, parser, base) {
|
|
1126
964
|
_classCallCheck(this, AnimusWithBase);
|
|
1127
|
-
|
|
1128
965
|
return _super4.call(this, props, groups, parser, base, {});
|
|
1129
966
|
}
|
|
1130
|
-
|
|
1131
967
|
_createClass(AnimusWithBase, [{
|
|
1132
968
|
key: "variant",
|
|
1133
969
|
value: function variant(options) {
|
|
@@ -1135,72 +971,54 @@ var AnimusWithBase = /*#__PURE__*/function (_AnimusWithVariants) {
|
|
|
1135
971
|
return new AnimusWithVariants(this.propRegistry, this.groupRegistry, this.parser, this.baseStyles, merge(this.variants, _defineProperty({}, prop, options)));
|
|
1136
972
|
}
|
|
1137
973
|
}]);
|
|
1138
|
-
|
|
1139
974
|
return AnimusWithBase;
|
|
1140
975
|
}(AnimusWithVariants);
|
|
1141
|
-
|
|
1142
976
|
var Animus = /*#__PURE__*/function (_AnimusWithBase) {
|
|
1143
977
|
_inherits(Animus, _AnimusWithBase);
|
|
1144
|
-
|
|
1145
978
|
var _super5 = _createSuper(Animus);
|
|
1146
|
-
|
|
1147
979
|
function Animus(props, groups) {
|
|
1148
980
|
_classCallCheck(this, Animus);
|
|
1149
|
-
|
|
1150
981
|
return _super5.call(this, props, groups, createParser$1(props), {});
|
|
1151
982
|
}
|
|
1152
|
-
|
|
1153
983
|
_createClass(Animus, [{
|
|
1154
984
|
key: "styles",
|
|
1155
985
|
value: function styles(config) {
|
|
1156
986
|
return new AnimusWithBase(this.propRegistry, this.groupRegistry, this.parser, config);
|
|
1157
987
|
}
|
|
1158
988
|
}]);
|
|
1159
|
-
|
|
1160
989
|
return Animus;
|
|
1161
990
|
}(AnimusWithBase);
|
|
1162
991
|
|
|
1163
992
|
var _props = /*#__PURE__*/new WeakMap();
|
|
1164
|
-
|
|
1165
993
|
var _groups = /*#__PURE__*/new WeakMap();
|
|
1166
|
-
|
|
1167
994
|
var AnimusConfig = /*#__PURE__*/function () {
|
|
1168
995
|
function AnimusConfig(config, groups) {
|
|
1169
996
|
_classCallCheck(this, AnimusConfig);
|
|
1170
|
-
|
|
1171
997
|
_classPrivateFieldInitSpec(this, _props, {
|
|
1172
998
|
writable: true,
|
|
1173
999
|
value: {}
|
|
1174
1000
|
});
|
|
1175
|
-
|
|
1176
1001
|
_classPrivateFieldInitSpec(this, _groups, {
|
|
1177
1002
|
writable: true,
|
|
1178
1003
|
value: {}
|
|
1179
1004
|
});
|
|
1180
|
-
|
|
1181
1005
|
_classPrivateFieldSet(this, _props, config || {});
|
|
1182
|
-
|
|
1183
1006
|
_classPrivateFieldSet(this, _groups, groups || {});
|
|
1184
1007
|
}
|
|
1185
|
-
|
|
1186
1008
|
_createClass(AnimusConfig, [{
|
|
1187
1009
|
key: "addGroup",
|
|
1188
1010
|
value: function addGroup(name, config) {
|
|
1189
1011
|
var newGroup = _defineProperty({}, name, Object.keys(config));
|
|
1190
|
-
|
|
1191
1012
|
return new AnimusConfig(_objectSpread2(_objectSpread2({}, _classPrivateFieldGet(this, _props)), config), _objectSpread2(_objectSpread2({}, _classPrivateFieldGet(this, _groups)), newGroup));
|
|
1192
1013
|
}
|
|
1193
1014
|
}, {
|
|
1194
1015
|
key: "build",
|
|
1195
1016
|
value: function build() {
|
|
1196
1017
|
var props = _classPrivateFieldGet(this, _props);
|
|
1197
|
-
|
|
1198
1018
|
var groups = _classPrivateFieldGet(this, _groups);
|
|
1199
|
-
|
|
1200
1019
|
return new Animus(props, groups);
|
|
1201
1020
|
}
|
|
1202
1021
|
}]);
|
|
1203
|
-
|
|
1204
1022
|
return AnimusConfig;
|
|
1205
1023
|
}();
|
|
1206
1024
|
|
|
@@ -1212,11 +1030,9 @@ var percentageOrAbsolute = function percentageOrAbsolute(coordinate) {
|
|
|
1212
1030
|
if (coordinate === 0) {
|
|
1213
1031
|
return coordinate;
|
|
1214
1032
|
}
|
|
1215
|
-
|
|
1216
1033
|
if (coordinate <= 1 && coordinate >= -1) {
|
|
1217
1034
|
return "".concat(coordinate * 100, "%");
|
|
1218
1035
|
}
|
|
1219
|
-
|
|
1220
1036
|
return "".concat(coordinate, "px");
|
|
1221
1037
|
};
|
|
1222
1038
|
var valueWithUnit = /(-?\d*\.?\d+)(%|\w*)/;
|
|
@@ -1224,21 +1040,17 @@ var size = function size(value) {
|
|
|
1224
1040
|
if (isNumber(value)) {
|
|
1225
1041
|
return percentageOrAbsolute(value);
|
|
1226
1042
|
}
|
|
1227
|
-
|
|
1228
1043
|
if (value.includes('calc')) {
|
|
1229
1044
|
return value;
|
|
1230
1045
|
}
|
|
1231
|
-
|
|
1232
1046
|
var _ref = valueWithUnit.exec(value) || [],
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1047
|
+
_ref2 = _slicedToArray(_ref, 3),
|
|
1048
|
+
match = _ref2[0],
|
|
1049
|
+
number = _ref2[1],
|
|
1050
|
+
unit = _ref2[2];
|
|
1238
1051
|
if (match === undefined) {
|
|
1239
1052
|
return value;
|
|
1240
1053
|
}
|
|
1241
|
-
|
|
1242
1054
|
var numericValue = parseFloat(number);
|
|
1243
1055
|
return !unit ? percentageOrAbsolute(numericValue) : "".concat(numericValue).concat(unit);
|
|
1244
1056
|
};
|
|
@@ -1248,11 +1060,9 @@ var gridItemMap = {
|
|
|
1248
1060
|
min: 'min-content'
|
|
1249
1061
|
};
|
|
1250
1062
|
var unitlessNumber = new RegExp(/^[0-9]*$/);
|
|
1251
|
-
|
|
1252
1063
|
var isUnitlessNumber = function isUnitlessNumber(val) {
|
|
1253
1064
|
return unitlessNumber.test(val);
|
|
1254
1065
|
};
|
|
1255
|
-
|
|
1256
1066
|
var gridItem = function gridItem(item) {
|
|
1257
1067
|
var template = isUnitlessNumber(item) ? "".concat(item, "fr") : get(gridItemMap, item, item);
|
|
1258
1068
|
return "minmax(0, ".concat(template, ")");
|
|
@@ -1265,13 +1075,10 @@ var parseGridRatio = function parseGridRatio(val) {
|
|
|
1265
1075
|
var items = val.split(':');
|
|
1266
1076
|
var repeated = ['', 0];
|
|
1267
1077
|
var gridStyle = '';
|
|
1268
|
-
|
|
1269
1078
|
for (var i = 0; i < items.length + 1; i += 1) {
|
|
1270
1079
|
var _repeated;
|
|
1271
|
-
|
|
1272
1080
|
var delimiter = gridStyle.length > 0 ? ' ' : '';
|
|
1273
1081
|
var curr = items[i];
|
|
1274
|
-
|
|
1275
1082
|
if (((_repeated = repeated) === null || _repeated === void 0 ? void 0 : _repeated[0]) !== curr) {
|
|
1276
1083
|
if (repeated[0].length) gridStyle += delimiter + repeatGridItem.apply(void 0, _toConsumableArray(repeated));
|
|
1277
1084
|
if (curr) repeated = [curr, 1];
|
|
@@ -1279,7 +1086,6 @@ var parseGridRatio = function parseGridRatio(val) {
|
|
|
1279
1086
|
repeated[1] += 1;
|
|
1280
1087
|
}
|
|
1281
1088
|
}
|
|
1282
|
-
|
|
1283
1089
|
return gridStyle;
|
|
1284
1090
|
};
|
|
1285
1091
|
var gridItemRatio = function gridItemRatio(val) {
|
|
@@ -1525,7 +1331,6 @@ var selfAlignments = {
|
|
|
1525
1331
|
property: 'gridArea'
|
|
1526
1332
|
}
|
|
1527
1333
|
};
|
|
1528
|
-
|
|
1529
1334
|
var alignments = _objectSpread2({
|
|
1530
1335
|
justifyContent: {
|
|
1531
1336
|
property: 'justifyContent'
|
|
@@ -1540,7 +1345,6 @@ var alignments = _objectSpread2({
|
|
|
1540
1345
|
property: 'alignContent'
|
|
1541
1346
|
}
|
|
1542
1347
|
}, selfAlignments);
|
|
1543
|
-
|
|
1544
1348
|
var flexItems = {
|
|
1545
1349
|
flexBasis: {
|
|
1546
1350
|
property: 'flexBasis'
|
|
@@ -1874,22 +1678,18 @@ var BREAKPOINT_KEYS = ['_', 'xs', 'sm', 'md', 'lg', 'xl'];
|
|
|
1874
1678
|
/**
|
|
1875
1679
|
* Destructures the themes breakpoints into an ordered structure to traverse
|
|
1876
1680
|
*/
|
|
1877
|
-
|
|
1878
1681
|
var templateMediaQuery = function templateMediaQuery(breakpoint) {
|
|
1879
1682
|
return "@media screen and (min-width: ".concat(breakpoint, "px)");
|
|
1880
1683
|
};
|
|
1881
|
-
|
|
1882
1684
|
var createMediaQueries = function createMediaQueries(breakpoints) {
|
|
1883
1685
|
if (breakpoints === undefined) return null;
|
|
1884
|
-
|
|
1885
1686
|
var _ref = breakpoints !== null && breakpoints !== void 0 ? breakpoints : {},
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1687
|
+
xs = _ref.xs,
|
|
1688
|
+
sm = _ref.sm,
|
|
1689
|
+
md = _ref.md,
|
|
1690
|
+
lg = _ref.lg,
|
|
1691
|
+
xl = _ref.xl;
|
|
1692
|
+
// Ensure order for mapping
|
|
1893
1693
|
return {
|
|
1894
1694
|
map: mapValues(breakpoints, templateMediaQuery),
|
|
1895
1695
|
array: [xs, sm, md, lg, xl].map(templateMediaQuery)
|
|
@@ -1904,15 +1704,13 @@ var isMediaMap = function isMediaMap(val) {
|
|
|
1904
1704
|
var objectParser = function objectParser(value, props, config, breakpoints) {
|
|
1905
1705
|
var styles = {};
|
|
1906
1706
|
var styleFn = config.styleFn,
|
|
1907
|
-
|
|
1908
|
-
|
|
1707
|
+
prop = config.prop;
|
|
1909
1708
|
var _ = value._,
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1709
|
+
rest = _objectWithoutProperties(value, _excluded);
|
|
1710
|
+
// the keyof 'base' is base styles
|
|
1711
|
+
if (_) Object.assign(styles, styleFn(_, prop, props));
|
|
1712
|
+
// Map over remaining keys and merge the corresponding breakpoint styles
|
|
1914
1713
|
// for that property.
|
|
1915
|
-
|
|
1916
1714
|
Object.keys(breakpoints).forEach(function (breakpointKey) {
|
|
1917
1715
|
var bpStyles = rest[breakpointKey];
|
|
1918
1716
|
if (typeof bpStyles === 'undefined') return;
|
|
@@ -1923,16 +1721,14 @@ var objectParser = function objectParser(value, props, config, breakpoints) {
|
|
|
1923
1721
|
var arrayParser = function arrayParser(value, props, config, breakpoints) {
|
|
1924
1722
|
var styles = {};
|
|
1925
1723
|
var styleFn = config.styleFn,
|
|
1926
|
-
|
|
1927
|
-
|
|
1724
|
+
prop = config.prop;
|
|
1928
1725
|
var _value = _toArray(value),
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1726
|
+
_ = _value[0],
|
|
1727
|
+
rest = _value.slice(1);
|
|
1728
|
+
// the first index is base styles
|
|
1729
|
+
if (_) Object.assign(styles, styleFn(_, prop, props));
|
|
1730
|
+
// Map over each value in the array and merge the corresponding breakpoint styles
|
|
1934
1731
|
// for that property.
|
|
1935
|
-
|
|
1936
1732
|
rest.forEach(function (val, i) {
|
|
1937
1733
|
var breakpointKey = breakpoints[i];
|
|
1938
1734
|
if (!breakpointKey || typeof val === 'undefined') return;
|
|
@@ -1952,50 +1748,41 @@ var orderBreakpoints = function orderBreakpoints(styles, breakpoints) {
|
|
|
1952
1748
|
|
|
1953
1749
|
var renderPropValue = function renderPropValue(styles, prop, props, property, ctx) {
|
|
1954
1750
|
var value = get(props, prop);
|
|
1955
|
-
|
|
1956
1751
|
switch (_typeof(value)) {
|
|
1957
1752
|
case 'string':
|
|
1958
1753
|
case 'number':
|
|
1959
1754
|
case 'function':
|
|
1960
1755
|
return Object.assign(styles, property.styleFn(value, prop, props));
|
|
1961
1756
|
// handle any props configured with the responsive notation
|
|
1962
|
-
|
|
1963
1757
|
case 'object':
|
|
1964
1758
|
if (!ctx.mediaQueries) {
|
|
1965
1759
|
return;
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
|
|
1760
|
+
}
|
|
1761
|
+
// If it is an array the order of values is smallest to largest: [_, xs, ...]
|
|
1969
1762
|
if (isMediaArray(value)) {
|
|
1970
1763
|
return merge(styles, arrayParser(value, props, property, ctx.mediaQueries.array));
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
|
|
1764
|
+
}
|
|
1765
|
+
// Check to see if value is an object matching the responsive syntax and generate the styles.
|
|
1974
1766
|
if (value && isMediaMap(value)) {
|
|
1975
1767
|
return merge(styles, objectParser(value, props, property, ctx.mediaQueries.map));
|
|
1976
1768
|
}
|
|
1977
|
-
|
|
1978
1769
|
}
|
|
1979
1770
|
};
|
|
1980
|
-
|
|
1981
1771
|
function createParser(config) {
|
|
1982
1772
|
var propNames = orderPropNames(config);
|
|
1983
1773
|
var ctx = {
|
|
1984
1774
|
mediaQueries: null
|
|
1985
1775
|
};
|
|
1986
|
-
|
|
1987
1776
|
var parser = function parser(props) {
|
|
1988
1777
|
var isCss = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1989
1778
|
var styles = {};
|
|
1990
|
-
var theme = props.theme;
|
|
1991
|
-
|
|
1779
|
+
var theme = props.theme;
|
|
1780
|
+
// Attempt to cache the breakpoints if we have not yet or if theme has become available.
|
|
1992
1781
|
if (ctx.mediaQueries === null) {
|
|
1993
1782
|
var _theme$breakpoints;
|
|
1994
|
-
|
|
1995
1783
|
// Save the breakpoints if we can
|
|
1996
1784
|
ctx.mediaQueries = createMediaQueries((_theme$breakpoints = theme === null || theme === void 0 ? void 0 : theme.breakpoints) !== null && _theme$breakpoints !== void 0 ? _theme$breakpoints : compatTheme.breakpoints);
|
|
1997
1785
|
}
|
|
1998
|
-
|
|
1999
1786
|
if (!isCss) {
|
|
2000
1787
|
// Loops over all prop names on the configured config to check for configured styles
|
|
2001
1788
|
propNames.forEach(function (prop) {
|
|
@@ -2006,7 +1793,6 @@ function createParser(config) {
|
|
|
2006
1793
|
// Loops over all prop names on the configured config to check for configured styles
|
|
2007
1794
|
Object.keys(props).forEach(function (prop) {
|
|
2008
1795
|
var property = config[prop];
|
|
2009
|
-
|
|
2010
1796
|
if (property) {
|
|
2011
1797
|
renderPropValue(styles, prop, props, property, ctx);
|
|
2012
1798
|
} else if (prop !== 'theme') {
|
|
@@ -2014,12 +1800,10 @@ function createParser(config) {
|
|
|
2014
1800
|
}
|
|
2015
1801
|
});
|
|
2016
1802
|
}
|
|
2017
|
-
|
|
2018
1803
|
if (ctx.mediaQueries !== null) return orderBreakpoints(styles, ctx.mediaQueries.array);
|
|
2019
1804
|
return styles;
|
|
2020
|
-
};
|
|
2021
|
-
|
|
2022
|
-
|
|
1805
|
+
};
|
|
1806
|
+
// return the parser function with the resulting meta information for further composition
|
|
2023
1807
|
return Object.assign(parser, {
|
|
2024
1808
|
propNames: propNames,
|
|
2025
1809
|
config: config
|
|
@@ -2030,7 +1814,6 @@ function compose() {
|
|
|
2030
1814
|
for (var _len = arguments.length, parsers = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2031
1815
|
parsers[_key] = arguments[_key];
|
|
2032
1816
|
}
|
|
2033
|
-
|
|
2034
1817
|
return createParser(parsers.reduce(function (carry, parser) {
|
|
2035
1818
|
return _objectSpread2(_objectSpread2({}, carry), parser.config);
|
|
2036
1819
|
}, {}));
|
|
@@ -2038,28 +1821,24 @@ function compose() {
|
|
|
2038
1821
|
|
|
2039
1822
|
function createTransform(prop, config) {
|
|
2040
1823
|
var _config$transform = config.transform,
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
1824
|
+
transform = _config$transform === void 0 ? identity : _config$transform,
|
|
1825
|
+
property = config.property,
|
|
1826
|
+
_config$properties = config.properties,
|
|
1827
|
+
properties = _config$properties === void 0 ? [property] : _config$properties,
|
|
1828
|
+
scale = config.scale,
|
|
1829
|
+
variable = config.variable;
|
|
2047
1830
|
var alwaysTransform = scale === undefined || isArray(scale);
|
|
2048
1831
|
return _objectSpread2(_objectSpread2({}, config), {}, {
|
|
2049
1832
|
prop: prop,
|
|
2050
1833
|
styleFn: function styleFn(value, prop, props) {
|
|
2051
1834
|
var _scaleValue;
|
|
2052
|
-
|
|
2053
1835
|
var styles = {};
|
|
2054
|
-
|
|
2055
1836
|
if (isUndefined(value)) {
|
|
2056
1837
|
return styles;
|
|
2057
1838
|
}
|
|
2058
|
-
|
|
2059
1839
|
var useTransform = false;
|
|
2060
1840
|
var intermediateValue;
|
|
2061
1841
|
var scaleValue;
|
|
2062
|
-
|
|
2063
1842
|
switch (_typeof(value)) {
|
|
2064
1843
|
case 'number':
|
|
2065
1844
|
case 'string':
|
|
@@ -2067,50 +1846,39 @@ function createTransform(prop, config) {
|
|
|
2067
1846
|
useTransform = scaleValue !== undefined || alwaysTransform;
|
|
2068
1847
|
intermediateValue = (_scaleValue = scaleValue) !== null && _scaleValue !== void 0 ? _scaleValue : value;
|
|
2069
1848
|
break;
|
|
2070
|
-
|
|
2071
1849
|
case 'function':
|
|
2072
1850
|
if (props.theme) {
|
|
2073
1851
|
intermediateValue = value(props.theme);
|
|
2074
1852
|
}
|
|
2075
|
-
|
|
2076
1853
|
break;
|
|
2077
|
-
|
|
2078
1854
|
default:
|
|
2079
1855
|
return styles;
|
|
2080
|
-
}
|
|
1856
|
+
}
|
|
1857
|
+
// for each property look up the scale value from theme if passed and apply any
|
|
2081
1858
|
// final transforms to the value
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
1859
|
properties.forEach(function (property) {
|
|
2085
1860
|
var styleValue = intermediateValue;
|
|
2086
|
-
|
|
2087
1861
|
if (useTransform && !isUndefined(styleValue)) {
|
|
2088
1862
|
styleValue = transform(styleValue, property, props);
|
|
2089
1863
|
}
|
|
2090
|
-
|
|
2091
1864
|
switch (_typeof(styleValue)) {
|
|
2092
1865
|
case 'number':
|
|
2093
1866
|
case 'string':
|
|
2094
1867
|
return styles[property] = styleValue;
|
|
2095
|
-
|
|
2096
1868
|
case 'object':
|
|
2097
1869
|
return Object.assign(styles, styleValue);
|
|
2098
1870
|
}
|
|
2099
1871
|
});
|
|
2100
|
-
|
|
2101
1872
|
if (variable) {
|
|
2102
1873
|
var styleValue = intermediateValue;
|
|
2103
|
-
|
|
2104
1874
|
if (useTransform && !isUndefined(styleValue)) {
|
|
2105
1875
|
styleValue = transform(styleValue, property, props);
|
|
2106
1876
|
}
|
|
2107
|
-
|
|
2108
1877
|
if (styleValue && _typeof(styleValue) !== 'object') {
|
|
2109
1878
|
styles[variable] = styleValue;
|
|
2110
1879
|
}
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
|
|
1880
|
+
}
|
|
1881
|
+
// return the resulting styles object
|
|
2114
1882
|
return styles;
|
|
2115
1883
|
}
|
|
2116
1884
|
});
|
|
@@ -2119,14 +1887,12 @@ function createTransform(prop, config) {
|
|
|
2119
1887
|
function create(config) {
|
|
2120
1888
|
// Create a transform function for each of the props
|
|
2121
1889
|
var transforms = {};
|
|
2122
|
-
|
|
2123
1890
|
for (var prop in config) {
|
|
2124
1891
|
if (typeof prop === 'string') {
|
|
2125
1892
|
transforms[prop] = createTransform(prop, config[prop]);
|
|
2126
1893
|
}
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
|
|
1894
|
+
}
|
|
1895
|
+
// Create a parser that handles all the props within the config
|
|
2130
1896
|
return createParser(transforms);
|
|
2131
1897
|
}
|
|
2132
1898
|
|
|
@@ -2143,12 +1909,10 @@ function createCss(config) {
|
|
|
2143
1909
|
var cache;
|
|
2144
1910
|
var allKeys = Object.keys(cssProps);
|
|
2145
1911
|
/** Any key of the CSSProps that is not a System Prop or a Static CSS Property is treated as a nested selector */
|
|
2146
|
-
|
|
2147
1912
|
var selectors = allKeys.filter(function (key) {
|
|
2148
1913
|
return !filteredProps.includes(key) && isObject(cssProps[key]);
|
|
2149
1914
|
});
|
|
2150
1915
|
/** Static CSS Properties get extracted if they match neither syntax */
|
|
2151
|
-
|
|
2152
1916
|
var staticCss = getStylePropNames(cssProps, ['theme'].concat(_toConsumableArray(selectors), _toConsumableArray(filteredProps)));
|
|
2153
1917
|
return function (_ref) {
|
|
2154
1918
|
var theme = _ref.theme;
|
|
@@ -2158,14 +1922,12 @@ function createCss(config) {
|
|
|
2158
1922
|
}));
|
|
2159
1923
|
selectors.forEach(function (selector) {
|
|
2160
1924
|
var _cssProps$selector;
|
|
2161
|
-
|
|
2162
1925
|
var selectorConfig = (_cssProps$selector = cssProps[selector]) !== null && _cssProps$selector !== void 0 ? _cssProps$selector : {};
|
|
2163
1926
|
css[selector] = _objectSpread2(_objectSpread2({}, getStylePropNames(selectorConfig, filteredProps)), parser(_objectSpread2(_objectSpread2({}, selectorConfig), {}, {
|
|
2164
1927
|
theme: theme
|
|
2165
1928
|
})));
|
|
2166
1929
|
});
|
|
2167
1930
|
/** Merge the static and generated css and save it to the cache */
|
|
2168
|
-
|
|
2169
1931
|
cache = _objectSpread2(_objectSpread2({}, staticCss), css);
|
|
2170
1932
|
return cache;
|
|
2171
1933
|
};
|
|
@@ -2196,11 +1958,11 @@ function createVariant(config) {
|
|
|
2196
1958
|
var css = createCss(config);
|
|
2197
1959
|
return function (_ref) {
|
|
2198
1960
|
var _ref$prop = _ref.prop,
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
1961
|
+
prop = _ref$prop === void 0 ? 'variant' : _ref$prop,
|
|
1962
|
+
defaultVariant = _ref.defaultVariant,
|
|
1963
|
+
_ref$base = _ref.base,
|
|
1964
|
+
base = _ref$base === void 0 ? {} : _ref$base,
|
|
1965
|
+
variants = _ref.variants;
|
|
2204
1966
|
var baseFn = css(base);
|
|
2205
1967
|
var variantFns = {};
|
|
2206
1968
|
Object.keys(variants).forEach(function (key) {
|
|
@@ -2210,9 +1972,8 @@ function createVariant(config) {
|
|
|
2210
1972
|
});
|
|
2211
1973
|
return function (props) {
|
|
2212
1974
|
var _variantFns$selected;
|
|
2213
|
-
|
|
2214
1975
|
var _props$prop = props[prop],
|
|
2215
|
-
|
|
1976
|
+
selected = _props$prop === void 0 ? defaultVariant : _props$prop;
|
|
2216
1977
|
var styles = {};
|
|
2217
1978
|
if (!selected) return styles;
|
|
2218
1979
|
return merge(styles, baseFn(props), variantFns === null || variantFns === void 0 ? void 0 : (_variantFns$selected = variantFns[selected]) === null || _variantFns$selected === void 0 ? void 0 : _variantFns$selected.call(variantFns, props));
|
|
@@ -2229,7 +1990,6 @@ var animusProps = {
|
|
|
2229
1990
|
};
|
|
2230
1991
|
|
|
2231
1992
|
/** Export full builder */
|
|
2232
|
-
|
|
2233
1993
|
var animus = config.build();
|
|
2234
1994
|
|
|
2235
1995
|
export { AnimusConfig, animus, animusProps, borderShorthand, compatTheme, config, createAnimus, createScale, gridItem, gridItemRatio, numberToPx, numberToTemplate, numericOrStringScale, numericScale, parseGridRatio, percentageOrAbsolute, repeatGridItem, size, stringScale };
|