@thecb/components 11.0.1 → 11.0.2-beta.1
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 +227 -1003
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +227 -1003
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/link/ExternalLink.d.ts +1 -0
- package/src/components/atoms/link/ExternalLink.js +33 -19
- package/src/components/atoms/link/Link.stories.js +8 -0
- package/src/components/molecules/modal/ModalControlV1.js +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -236,58 +236,6 @@ function __rest(s, e) {
|
|
|
236
236
|
t[p[i]] = s[p[i]];
|
|
237
237
|
}
|
|
238
238
|
return t;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/*! *****************************************************************************
|
|
242
|
-
Copyright (c) Microsoft Corporation.
|
|
243
|
-
|
|
244
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
245
|
-
purpose with or without fee is hereby granted.
|
|
246
|
-
|
|
247
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
248
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
249
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
250
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
251
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
252
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
253
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
254
|
-
***************************************************************************** */
|
|
255
|
-
/* global Reflect, Promise */
|
|
256
|
-
|
|
257
|
-
var extendStatics$1 = function(d, b) {
|
|
258
|
-
extendStatics$1 = Object.setPrototypeOf ||
|
|
259
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
260
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
261
|
-
return extendStatics$1(d, b);
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
function __extends$1(d, b) {
|
|
265
|
-
extendStatics$1(d, b);
|
|
266
|
-
function __() { this.constructor = d; }
|
|
267
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
var __assign$1 = function() {
|
|
271
|
-
__assign$1 = Object.assign || function __assign(t) {
|
|
272
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
273
|
-
s = arguments[i];
|
|
274
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
275
|
-
}
|
|
276
|
-
return t;
|
|
277
|
-
};
|
|
278
|
-
return __assign$1.apply(this, arguments);
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
function __rest$1(s, e) {
|
|
282
|
-
var t = {};
|
|
283
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
284
|
-
t[p] = s[p];
|
|
285
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
286
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
287
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
288
|
-
t[p[i]] = s[p[i]];
|
|
289
|
-
}
|
|
290
|
-
return t;
|
|
291
239
|
}
|
|
292
240
|
|
|
293
241
|
function __spreadArrays() {
|
|
@@ -298,32 +246,6 @@ function __spreadArrays() {
|
|
|
298
246
|
return r;
|
|
299
247
|
}
|
|
300
248
|
|
|
301
|
-
/*! *****************************************************************************
|
|
302
|
-
Copyright (c) Microsoft Corporation.
|
|
303
|
-
|
|
304
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
305
|
-
purpose with or without fee is hereby granted.
|
|
306
|
-
|
|
307
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
308
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
309
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
310
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
311
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
312
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
313
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
314
|
-
***************************************************************************** */
|
|
315
|
-
|
|
316
|
-
var __assign$2 = function() {
|
|
317
|
-
__assign$2 = Object.assign || function __assign(t) {
|
|
318
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
319
|
-
s = arguments[i];
|
|
320
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
321
|
-
}
|
|
322
|
-
return t;
|
|
323
|
-
};
|
|
324
|
-
return __assign$2.apply(this, arguments);
|
|
325
|
-
};
|
|
326
|
-
|
|
327
249
|
var clamp = function (min, max) { return function (v) {
|
|
328
250
|
return Math.max(Math.min(v, max), min);
|
|
329
251
|
}; };
|
|
@@ -337,8 +259,8 @@ var number = {
|
|
|
337
259
|
parse: parseFloat,
|
|
338
260
|
transform: function (v) { return v; }
|
|
339
261
|
};
|
|
340
|
-
var alpha = __assign
|
|
341
|
-
var scale = __assign
|
|
262
|
+
var alpha = __assign(__assign({}, number), { transform: clamp(0, 1) });
|
|
263
|
+
var scale = __assign(__assign({}, number), { default: 1 });
|
|
342
264
|
|
|
343
265
|
var createUnitType = function (unit) { return ({
|
|
344
266
|
test: function (v) {
|
|
@@ -352,7 +274,7 @@ var percent = createUnitType('%');
|
|
|
352
274
|
var px = createUnitType('px');
|
|
353
275
|
var vh = createUnitType('vh');
|
|
354
276
|
var vw = createUnitType('vw');
|
|
355
|
-
var progressPercentage = __assign
|
|
277
|
+
var progressPercentage = __assign(__assign({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
|
|
356
278
|
|
|
357
279
|
var getValueFromFunctionString = function (value) {
|
|
358
280
|
return value.substring(value.indexOf('(') + 1, value.lastIndexOf(')'));
|
|
@@ -386,7 +308,7 @@ var hslaTemplate = function (_a) {
|
|
|
386
308
|
var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha = _b === void 0 ? 1 : _b;
|
|
387
309
|
return "hsla(" + hue + ", " + saturation + ", " + lightness + ", " + alpha + ")";
|
|
388
310
|
};
|
|
389
|
-
var rgbUnit = __assign
|
|
311
|
+
var rgbUnit = __assign(__assign({}, number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
|
|
390
312
|
function isColorString(color, colorType) {
|
|
391
313
|
return color.startsWith(colorType) && singleColorRegex.test(color);
|
|
392
314
|
}
|
|
@@ -416,7 +338,7 @@ var hsla = {
|
|
|
416
338
|
});
|
|
417
339
|
}
|
|
418
340
|
};
|
|
419
|
-
var hex = __assign
|
|
341
|
+
var hex = __assign(__assign({}, rgba), { test: function (v) { return typeof v === 'string' && isColorString(v, '#'); }, parse: function (v) {
|
|
420
342
|
var r = '';
|
|
421
343
|
var g = '';
|
|
422
344
|
var b = '';
|
|
@@ -952,15 +874,15 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
952
874
|
and limitations under the License.
|
|
953
875
|
***************************************************************************** */
|
|
954
876
|
|
|
955
|
-
var __assign$
|
|
956
|
-
__assign$
|
|
877
|
+
var __assign$1 = function() {
|
|
878
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
957
879
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
958
880
|
s = arguments[i];
|
|
959
881
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
960
882
|
}
|
|
961
883
|
return t;
|
|
962
884
|
};
|
|
963
|
-
return __assign$
|
|
885
|
+
return __assign$1.apply(this, arguments);
|
|
964
886
|
};
|
|
965
887
|
|
|
966
888
|
var mixLinearColor = function (from, to, v) {
|
|
@@ -983,7 +905,7 @@ var mixColor = (function (from, to) {
|
|
|
983
905
|
invariant(fromColorType.transform === toColorType.transform, 'Both colors must be hex/RGBA, OR both must be HSLA.');
|
|
984
906
|
var fromColor = fromColorType.parse(from);
|
|
985
907
|
var toColor = toColorType.parse(to);
|
|
986
|
-
var blended = __assign$
|
|
908
|
+
var blended = __assign$1({}, fromColor);
|
|
987
909
|
var mixFunc = fromColorType === hsla ? mix : mixLinearColor;
|
|
988
910
|
return function (v) {
|
|
989
911
|
for (var key in blended) {
|
|
@@ -1028,7 +950,7 @@ var mixArray = function (from, to) {
|
|
|
1028
950
|
};
|
|
1029
951
|
};
|
|
1030
952
|
var mixObject = function (origin, target) {
|
|
1031
|
-
var output = __assign$
|
|
953
|
+
var output = __assign$1({}, origin, target);
|
|
1032
954
|
var blendValue = {};
|
|
1033
955
|
for (var key in output) {
|
|
1034
956
|
if (origin[key] !== undefined && target[key] !== undefined) {
|
|
@@ -1240,44 +1162,6 @@ var wrap$1 = curryRange(wrap);
|
|
|
1240
1162
|
|
|
1241
1163
|
var clampProgress = clamp$1$1(0, 1);
|
|
1242
1164
|
|
|
1243
|
-
/*! *****************************************************************************
|
|
1244
|
-
Copyright (c) Microsoft Corporation.
|
|
1245
|
-
|
|
1246
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1247
|
-
purpose with or without fee is hereby granted.
|
|
1248
|
-
|
|
1249
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1250
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1251
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1252
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1253
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1254
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1255
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1256
|
-
***************************************************************************** */
|
|
1257
|
-
|
|
1258
|
-
var __assign$4 = function() {
|
|
1259
|
-
__assign$4 = Object.assign || function __assign(t) {
|
|
1260
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1261
|
-
s = arguments[i];
|
|
1262
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
1263
|
-
}
|
|
1264
|
-
return t;
|
|
1265
|
-
};
|
|
1266
|
-
return __assign$4.apply(this, arguments);
|
|
1267
|
-
};
|
|
1268
|
-
|
|
1269
|
-
function __rest$2(s, e) {
|
|
1270
|
-
var t = {};
|
|
1271
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1272
|
-
t[p] = s[p];
|
|
1273
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1274
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1275
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1276
|
-
t[p[i]] = s[p[i]];
|
|
1277
|
-
}
|
|
1278
|
-
return t;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
1165
|
var createStyler = function (_a) {
|
|
1282
1166
|
var onRead = _a.onRead,
|
|
1283
1167
|
onRender = _a.onRender,
|
|
@@ -1289,7 +1173,7 @@ var createStyler = function (_a) {
|
|
|
1289
1173
|
if (_a === void 0) {
|
|
1290
1174
|
_a = {};
|
|
1291
1175
|
}
|
|
1292
|
-
var props = __rest
|
|
1176
|
+
var props = __rest(_a, []);
|
|
1293
1177
|
var state = {};
|
|
1294
1178
|
var changedValues = [];
|
|
1295
1179
|
var hasChanged = false;
|
|
@@ -1409,7 +1293,7 @@ function isTransformOriginProp(key) {
|
|
|
1409
1293
|
return transformOriginProps.has(key);
|
|
1410
1294
|
}
|
|
1411
1295
|
|
|
1412
|
-
var int = /*#__PURE__*/__assign
|
|
1296
|
+
var int = /*#__PURE__*/__assign( /*#__PURE__*/__assign({}, number), { transform: Math.round });
|
|
1413
1297
|
var valueTypes = {
|
|
1414
1298
|
color: color,
|
|
1415
1299
|
backgroundColor: color,
|
|
@@ -1641,8 +1525,8 @@ function createCssStyler(element, _a) {
|
|
|
1641
1525
|
}
|
|
1642
1526
|
var enableHardwareAcceleration = _a.enableHardwareAcceleration,
|
|
1643
1527
|
allowTransformNone = _a.allowTransformNone,
|
|
1644
|
-
props = __rest
|
|
1645
|
-
return cssStyler(__assign
|
|
1528
|
+
props = __rest(_a, ["enableHardwareAcceleration", "allowTransformNone"]);
|
|
1529
|
+
return cssStyler(__assign({ element: element, buildStyles: createStyleBuilder({
|
|
1646
1530
|
enableHardwareAcceleration: enableHardwareAcceleration,
|
|
1647
1531
|
allowTransformNone: allowTransformNone
|
|
1648
1532
|
}), preparseOutput: true }, props));
|
|
@@ -1692,7 +1576,7 @@ function buildSVGAttrs(_a, dimensions, totalPathLength, cssBuilder, attrs, isDas
|
|
|
1692
1576
|
pathSpacing = _b === void 0 ? 1 : _b,
|
|
1693
1577
|
_c = _a.pathOffset,
|
|
1694
1578
|
pathOffset = _c === void 0 ? 0 : _c,
|
|
1695
|
-
state = __rest
|
|
1579
|
+
state = __rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
|
|
1696
1580
|
var style = cssBuilder(state);
|
|
1697
1581
|
for (var key in style) {
|
|
1698
1582
|
if (key === 'transform') {
|
|
@@ -1821,7 +1705,7 @@ var Chainable = /*#__PURE__*/function () {
|
|
|
1821
1705
|
this.props = props;
|
|
1822
1706
|
}
|
|
1823
1707
|
Chainable.prototype.applyMiddleware = function (middleware) {
|
|
1824
|
-
return this.create(__assign
|
|
1708
|
+
return this.create(__assign(__assign({}, this.props), { middleware: this.props.middleware ? __spreadArrays([middleware], this.props.middleware) : [middleware] }));
|
|
1825
1709
|
};
|
|
1826
1710
|
Chainable.prototype.pipe = function () {
|
|
1827
1711
|
var funcs = [];
|
|
@@ -1893,7 +1777,7 @@ var createObserver = function (observerCandidate, _a, onComplete) {
|
|
|
1893
1777
|
};
|
|
1894
1778
|
|
|
1895
1779
|
var Action = /*#__PURE__*/function (_super) {
|
|
1896
|
-
__extends
|
|
1780
|
+
__extends(Action, _super);
|
|
1897
1781
|
function Action() {
|
|
1898
1782
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1899
1783
|
}
|
|
@@ -1912,13 +1796,13 @@ var Action = /*#__PURE__*/function (_super) {
|
|
|
1912
1796
|
};
|
|
1913
1797
|
var _a = this.props,
|
|
1914
1798
|
init = _a.init,
|
|
1915
|
-
observerProps = __rest
|
|
1799
|
+
observerProps = __rest(_a, ["init"]);
|
|
1916
1800
|
var observer = createObserver(observerCandidate, observerProps, function () {
|
|
1917
1801
|
isComplete = true;
|
|
1918
1802
|
subscription.stop();
|
|
1919
1803
|
});
|
|
1920
1804
|
var api = init(observer);
|
|
1921
|
-
subscription = api ? __assign
|
|
1805
|
+
subscription = api ? __assign(__assign({}, subscription), api) : subscription;
|
|
1922
1806
|
if (observerCandidate.registerParent) {
|
|
1923
1807
|
observerCandidate.registerParent(subscription);
|
|
1924
1808
|
}
|
|
@@ -1932,7 +1816,7 @@ var action = function (init) {
|
|
|
1932
1816
|
};
|
|
1933
1817
|
|
|
1934
1818
|
var BaseMulticast = /*#__PURE__*/function (_super) {
|
|
1935
|
-
__extends
|
|
1819
|
+
__extends(BaseMulticast, _super);
|
|
1936
1820
|
function BaseMulticast() {
|
|
1937
1821
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1938
1822
|
_this.subscribers = [];
|
|
@@ -1992,7 +1876,7 @@ var isSingleValue = function (v) {
|
|
|
1992
1876
|
return typeOfV === 'string' || typeOfV === 'number';
|
|
1993
1877
|
};
|
|
1994
1878
|
var ValueReaction = /*#__PURE__*/function (_super) {
|
|
1995
|
-
__extends
|
|
1879
|
+
__extends(ValueReaction, _super);
|
|
1996
1880
|
function ValueReaction(props) {
|
|
1997
1881
|
var _this = _super.call(this, props) || this;
|
|
1998
1882
|
_this.scheduleVelocityCheck = function () {
|
|
@@ -2242,7 +2126,7 @@ var reduceArrayValue = function (i) {
|
|
|
2242
2126
|
var createArrayAction = function (action, props, vectorKeys) {
|
|
2243
2127
|
var firstVectorKey = vectorKeys[0];
|
|
2244
2128
|
var actionList = props[firstVectorKey].map(function (v, i) {
|
|
2245
|
-
var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign
|
|
2129
|
+
var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign({}, props));
|
|
2246
2130
|
return getActionCreator(v)(action, childActionProps);
|
|
2247
2131
|
});
|
|
2248
2132
|
return parallel$1.apply(void 0, actionList);
|
|
@@ -2256,7 +2140,7 @@ var reduceObjectValue = function (key) {
|
|
|
2256
2140
|
var createObjectAction = function (action, props, vectorKeys) {
|
|
2257
2141
|
var firstVectorKey = vectorKeys[0];
|
|
2258
2142
|
var actionMap = Object.keys(props[firstVectorKey]).reduce(function (map, key) {
|
|
2259
|
-
var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign
|
|
2143
|
+
var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign({}, props));
|
|
2260
2144
|
map[key] = getActionCreator(props[firstVectorKey][key])(action, childActionProps);
|
|
2261
2145
|
return map;
|
|
2262
2146
|
}, {});
|
|
@@ -2265,18 +2149,18 @@ var createObjectAction = function (action, props, vectorKeys) {
|
|
|
2265
2149
|
var createUnitAction = function (action, _a) {
|
|
2266
2150
|
var from = _a.from,
|
|
2267
2151
|
to = _a.to,
|
|
2268
|
-
props = __rest
|
|
2152
|
+
props = __rest(_a, ["from", "to"]);
|
|
2269
2153
|
var unitType = findUnitType(from) || findUnitType(to);
|
|
2270
2154
|
var transform = unitType.transform,
|
|
2271
2155
|
parse = unitType.parse;
|
|
2272
|
-
return action(__assign
|
|
2156
|
+
return action(__assign(__assign({}, props), { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
2273
2157
|
};
|
|
2274
2158
|
var createMixerAction = function (mixer) {
|
|
2275
2159
|
return function (action, _a) {
|
|
2276
2160
|
var from = _a.from,
|
|
2277
2161
|
to = _a.to,
|
|
2278
|
-
props = __rest
|
|
2279
|
-
return action(__assign
|
|
2162
|
+
props = __rest(_a, ["from", "to"]);
|
|
2163
|
+
return action(__assign(__assign({}, props), { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
2280
2164
|
};
|
|
2281
2165
|
};
|
|
2282
2166
|
var createColorAction = /*#__PURE__*/createMixerAction(mixColor);
|
|
@@ -2622,7 +2506,7 @@ var keyframes = function (_a) {
|
|
|
2622
2506
|
ease = _b === void 0 ? linear : _b,
|
|
2623
2507
|
times = _a.times,
|
|
2624
2508
|
values = _a.values,
|
|
2625
|
-
tweenProps = __rest
|
|
2509
|
+
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
2626
2510
|
easings = Array.isArray(easings) ? easings : defaultEasings(values, easings);
|
|
2627
2511
|
times = times || defaultTimings(values);
|
|
2628
2512
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -2632,7 +2516,7 @@ var keyframes = function (_a) {
|
|
|
2632
2516
|
ease: easing
|
|
2633
2517
|
});
|
|
2634
2518
|
});
|
|
2635
|
-
return tween(__assign
|
|
2519
|
+
return tween(__assign(__assign({}, tweenProps), { ease: ease })).applyMiddleware(function (update) {
|
|
2636
2520
|
return interpolateScrubbers(times, scrubbers, update);
|
|
2637
2521
|
});
|
|
2638
2522
|
};
|
|
@@ -2876,7 +2760,7 @@ var index$1 = function (_a) {
|
|
|
2876
2760
|
}
|
|
2877
2761
|
var x = _a.x,
|
|
2878
2762
|
y = _a.y,
|
|
2879
|
-
props = __rest
|
|
2763
|
+
props = __rest(_a, ["x", "y"]);
|
|
2880
2764
|
if (x !== undefined || y !== undefined) {
|
|
2881
2765
|
var applyXOffset_1 = applyOffset(x || 0);
|
|
2882
2766
|
var applyYOffset_1 = applyOffset(y || 0);
|
|
@@ -2950,7 +2834,7 @@ var steps$1 = function (st, min, max) {
|
|
|
2950
2834
|
};
|
|
2951
2835
|
var transformMap = function (childTransformers) {
|
|
2952
2836
|
return function (v) {
|
|
2953
|
-
var output = __assign
|
|
2837
|
+
var output = __assign({}, v);
|
|
2954
2838
|
for (var key in childTransformers) {
|
|
2955
2839
|
if (childTransformers.hasOwnProperty(key)) {
|
|
2956
2840
|
var childTransformer = childTransformers[key];
|
|
@@ -2981,52 +2865,6 @@ var transformers = /*#__PURE__*/Object.freeze({
|
|
|
2981
2865
|
transformMap: transformMap
|
|
2982
2866
|
});
|
|
2983
2867
|
|
|
2984
|
-
/*! *****************************************************************************
|
|
2985
|
-
Copyright (c) Microsoft Corporation.
|
|
2986
|
-
|
|
2987
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2988
|
-
purpose with or without fee is hereby granted.
|
|
2989
|
-
|
|
2990
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2991
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2992
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2993
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2994
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2995
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2996
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2997
|
-
***************************************************************************** */
|
|
2998
|
-
|
|
2999
|
-
var __assign$5 = function() {
|
|
3000
|
-
__assign$5 = Object.assign || function __assign(t) {
|
|
3001
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3002
|
-
s = arguments[i];
|
|
3003
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3004
|
-
}
|
|
3005
|
-
return t;
|
|
3006
|
-
};
|
|
3007
|
-
return __assign$5.apply(this, arguments);
|
|
3008
|
-
};
|
|
3009
|
-
|
|
3010
|
-
function __rest$3(s, e) {
|
|
3011
|
-
var t = {};
|
|
3012
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3013
|
-
t[p] = s[p];
|
|
3014
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3015
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3016
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3017
|
-
t[p[i]] = s[p[i]];
|
|
3018
|
-
}
|
|
3019
|
-
return t;
|
|
3020
|
-
}
|
|
3021
|
-
|
|
3022
|
-
function __spreadArrays$1() {
|
|
3023
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
3024
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
3025
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
3026
|
-
r[k] = a[j];
|
|
3027
|
-
return r;
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
2868
|
var getPoseValues = function (_a) {
|
|
3031
2869
|
var transition = _a.transition,
|
|
3032
2870
|
flip = _a.flip,
|
|
@@ -3039,7 +2877,7 @@ var getPoseValues = function (_a) {
|
|
|
3039
2877
|
preTransition = _a.preTransition,
|
|
3040
2878
|
applyAtStart = _a.applyAtStart,
|
|
3041
2879
|
applyAtEnd = _a.applyAtEnd,
|
|
3042
|
-
props = __rest
|
|
2880
|
+
props = __rest(_a, ["transition", "flip", "delay", "delayChildren", "staggerChildren", "staggerDirection", "afterChildren", "beforeChildren", "preTransition", "applyAtStart", "applyAtEnd"]);
|
|
3043
2881
|
return props;
|
|
3044
2882
|
};
|
|
3045
2883
|
var selectPoses = function (_a) {
|
|
@@ -3051,7 +2889,7 @@ var selectPoses = function (_a) {
|
|
|
3051
2889
|
onChange = _a.onChange,
|
|
3052
2890
|
passive = _a.passive,
|
|
3053
2891
|
initialPose = _a.initialPose,
|
|
3054
|
-
poses = __rest
|
|
2892
|
+
poses = __rest(_a, ["label", "props", "values", "parentValues", "ancestorValues", "onChange", "passive", "initialPose"]);
|
|
3055
2893
|
return poses;
|
|
3056
2894
|
};
|
|
3057
2895
|
var selectAllValues = function (values, selectValue) {
|
|
@@ -3151,7 +2989,7 @@ var createPoseSetter = function (setterProps) {
|
|
|
3151
2989
|
var _a = nextProps.delay,
|
|
3152
2990
|
delay = _a === void 0 ? 0 : _a;
|
|
3153
2991
|
var hasChildren = children.size;
|
|
3154
|
-
var baseTransitionProps = __assign
|
|
2992
|
+
var baseTransitionProps = __assign(__assign({}, props), nextProps);
|
|
3155
2993
|
var nextPose = poses[next];
|
|
3156
2994
|
var getChildAnimations = function () {
|
|
3157
2995
|
return hasChildren && propagate ? startChildAnimations(children, next, nextPose, baseTransitionProps) : [];
|
|
@@ -3177,11 +3015,11 @@ var createPoseSetter = function (setterProps) {
|
|
|
3177
3015
|
valuePoses.splice(insertionIndex, 0, next);
|
|
3178
3016
|
return insertionIndex === 0 ? new Promise(function (complete) {
|
|
3179
3017
|
var value = values.get(key);
|
|
3180
|
-
var transitionProps = __assign
|
|
3018
|
+
var transitionProps = __assign(__assign({}, baseTransitionProps), { key: key,
|
|
3181
3019
|
value: value });
|
|
3182
3020
|
var target = resolveTarget(value, resolveProp(nextPose[key], transitionProps));
|
|
3183
3021
|
if (activeActions.has(key)) stopAction(activeActions.get(key));
|
|
3184
|
-
var resolveTransitionProps = __assign
|
|
3022
|
+
var resolveTransitionProps = __assign(__assign({ to: target }, transitionProps), getTransitionProps(value, target, transitionProps));
|
|
3185
3023
|
var transition = resolveTransition(getTransition, key, value, resolveTransitionProps, convertTransitionDefinition, getInstantTransition);
|
|
3186
3024
|
var poseDelay = delay || resolveProp(nextPose.delay, transitionProps);
|
|
3187
3025
|
if (poseDelay) {
|
|
@@ -3205,7 +3043,7 @@ var createPoseSetter = function (setterProps) {
|
|
|
3205
3043
|
});
|
|
3206
3044
|
}
|
|
3207
3045
|
}
|
|
3208
|
-
return Promise.all(__spreadArrays
|
|
3046
|
+
return Promise.all(__spreadArrays(getParentAnimations(), getChildAnimations()));
|
|
3209
3047
|
};
|
|
3210
3048
|
};
|
|
3211
3049
|
|
|
@@ -3331,7 +3169,7 @@ var createValueMap = function (props) {
|
|
|
3331
3169
|
};
|
|
3332
3170
|
|
|
3333
3171
|
var applyDefaultTransition = function (pose, key, defaultTransitions) {
|
|
3334
|
-
return __assign
|
|
3172
|
+
return __assign(__assign({}, pose), { transition: defaultTransitions.has(key) ? defaultTransitions.get(key) : defaultTransitions.get('default') });
|
|
3335
3173
|
};
|
|
3336
3174
|
var generateTransitions = function (poses, defaultTransitions) {
|
|
3337
3175
|
Object.keys(poses).forEach(function (key) {
|
|
@@ -3385,7 +3223,7 @@ var poseFactory = function (_a) {
|
|
|
3385
3223
|
var poses = generateTransitions(selectPoses(config), defaultTransitions);
|
|
3386
3224
|
var _b = config.props,
|
|
3387
3225
|
props = _b === void 0 ? {} : _b;
|
|
3388
|
-
if (getDefaultProps) props = __assign
|
|
3226
|
+
if (getDefaultProps) props = __assign(__assign({}, getDefaultProps(config)), props);
|
|
3389
3227
|
var passive = config.passive,
|
|
3390
3228
|
userSetValues = config.values,
|
|
3391
3229
|
_c = config.initialPose,
|
|
@@ -3460,10 +3298,10 @@ var poseFactory = function (_a) {
|
|
|
3460
3298
|
},
|
|
3461
3299
|
has: has,
|
|
3462
3300
|
setProps: function (newProps) {
|
|
3463
|
-
return state.props = __assign
|
|
3301
|
+
return state.props = __assign(__assign({}, state.props), newProps);
|
|
3464
3302
|
},
|
|
3465
3303
|
_addChild: function (childConfig, factory) {
|
|
3466
|
-
var child = factory(__assign
|
|
3304
|
+
var child = factory(__assign(__assign({ initialPose: initialPose }, childConfig), { ancestorValues: __spreadArrays([{ label: config.label, values: values }], ancestorValues) }));
|
|
3467
3305
|
children.add(child);
|
|
3468
3306
|
return child;
|
|
3469
3307
|
},
|
|
@@ -3502,18 +3340,18 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
3502
3340
|
and limitations under the License.
|
|
3503
3341
|
***************************************************************************** */
|
|
3504
3342
|
|
|
3505
|
-
var __assign$
|
|
3506
|
-
__assign$
|
|
3343
|
+
var __assign$2 = function () {
|
|
3344
|
+
__assign$2 = Object.assign || function __assign(t) {
|
|
3507
3345
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3508
3346
|
s = arguments[i];
|
|
3509
3347
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3510
3348
|
}
|
|
3511
3349
|
return t;
|
|
3512
3350
|
};
|
|
3513
|
-
return __assign$
|
|
3351
|
+
return __assign$2.apply(this, arguments);
|
|
3514
3352
|
};
|
|
3515
3353
|
|
|
3516
|
-
function __rest$
|
|
3354
|
+
function __rest$1(s, e) {
|
|
3517
3355
|
var t = {};
|
|
3518
3356
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
3519
3357
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -3630,12 +3468,12 @@ var intelligentTransition = {
|
|
|
3630
3468
|
opacity: linearTween,
|
|
3631
3469
|
default: tween
|
|
3632
3470
|
};
|
|
3633
|
-
var dragAction = /*#__PURE__*/__assign$
|
|
3471
|
+
var dragAction = /*#__PURE__*/__assign$2( /*#__PURE__*/__assign$2({}, intelligentTransition), { x: /*#__PURE__*/createPointer(pointerX, 'left', 'right', BoundingBoxDimension.width), y: /*#__PURE__*/createPointer(pointerY, 'top', 'bottom', BoundingBoxDimension.height) });
|
|
3634
3472
|
var justAxis = function (_a) {
|
|
3635
3473
|
var from = _a.from;
|
|
3636
3474
|
return just(from);
|
|
3637
3475
|
};
|
|
3638
|
-
var intelligentDragEnd = /*#__PURE__*/__assign$
|
|
3476
|
+
var intelligentDragEnd = /*#__PURE__*/__assign$2( /*#__PURE__*/__assign$2({}, intelligentTransition), { x: justAxis, y: justAxis });
|
|
3639
3477
|
var defaultTransitions = /*#__PURE__*/new Map([['default', intelligentTransition], ['drag', dragAction], ['dragEnd', intelligentDragEnd]]);
|
|
3640
3478
|
|
|
3641
3479
|
var animationLookup = {
|
|
@@ -3705,7 +3543,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3705
3543
|
var _c = _a.type,
|
|
3706
3544
|
type = _c === void 0 ? 'tween' : _c,
|
|
3707
3545
|
definedEase = _a.ease,
|
|
3708
|
-
def = __rest$
|
|
3546
|
+
def = __rest$1(_a, ["type", "ease"]);
|
|
3709
3547
|
invariant(animationLookup[type] !== undefined, "Invalid transition type '" + type + "'. Valid transition types are: tween, spring, decay, physics and keyframes.");
|
|
3710
3548
|
var ease;
|
|
3711
3549
|
if (type === 'tween') {
|
|
@@ -3730,7 +3568,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3730
3568
|
velocity: velocity,
|
|
3731
3569
|
ease: ease
|
|
3732
3570
|
} : { ease: ease };
|
|
3733
|
-
return animationLookup[type](__assign$
|
|
3571
|
+
return animationLookup[type](__assign$2(__assign$2({}, baseProps), def));
|
|
3734
3572
|
};
|
|
3735
3573
|
var isAction = function (action$$1) {
|
|
3736
3574
|
return typeof action$$1.start !== 'undefined';
|
|
@@ -3815,7 +3653,7 @@ var pose = function (_a) {
|
|
|
3815
3653
|
min = def.min,
|
|
3816
3654
|
max = def.max,
|
|
3817
3655
|
round = def.round,
|
|
3818
|
-
remainingDef = __rest$
|
|
3656
|
+
remainingDef = __rest$1(def, ["delay", "min", "max", "round"]);
|
|
3819
3657
|
var action$$1 = getAction(val, remainingDef, props);
|
|
3820
3658
|
var outputPipe = [];
|
|
3821
3659
|
if (delay$$1) action$$1 = addActionDelay(delay$$1, action$$1);
|
|
@@ -3997,7 +3835,7 @@ var explicitlyFlipPose = function (state, nextPose) {
|
|
|
3997
3835
|
bottom = nextPose.bottom,
|
|
3998
3836
|
right = nextPose.right,
|
|
3999
3837
|
position = nextPose.position,
|
|
4000
|
-
remainingPose = __rest$
|
|
3838
|
+
remainingPose = __rest$1(nextPose, ["width", "height", "top", "left", "bottom", "right", "position"]);
|
|
4001
3839
|
var propsToSet = positionalProps.concat('position').reduce(function (acc, key) {
|
|
4002
3840
|
if (nextPose[key] !== undefined) {
|
|
4003
3841
|
acc[key] = resolveProp$1(nextPose[key], state.props);
|
|
@@ -4109,7 +3947,7 @@ var convertPositionalUnits = function (state, nextPose) {
|
|
|
4109
3947
|
changedPositionalKeys.push(key);
|
|
4110
3948
|
if (!applyAtEndHasBeenCopied) {
|
|
4111
3949
|
applyAtEndHasBeenCopied = true;
|
|
4112
|
-
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$
|
|
3950
|
+
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$2({}, nextPose.applyAtEnd) : {};
|
|
4113
3951
|
}
|
|
4114
3952
|
nextPose.applyAtEnd[key] = nextPose.applyAtEnd[key] || nextPose[key];
|
|
4115
3953
|
setValue(state, key, to);
|
|
@@ -4165,8 +4003,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
4165
4003
|
focusable = _a.focusable,
|
|
4166
4004
|
pressable = _a.pressable,
|
|
4167
4005
|
dragBounds = _a.dragBounds,
|
|
4168
|
-
config = __rest$
|
|
4169
|
-
var poseConfig = __assign$
|
|
4006
|
+
config = __rest$1(_a, ["onDragStart", "onDragEnd", "onPressStart", "onPressEnd", "draggable", "hoverable", "focusable", "pressable", "dragBounds"]);
|
|
4007
|
+
var poseConfig = __assign$2(__assign$2({ flip: {} }, config), { props: __assign$2(__assign$2({}, config.props), { onDragStart: onDragStart,
|
|
4170
4008
|
onDragEnd: onDragEnd,
|
|
4171
4009
|
onPressStart: onPressStart,
|
|
4172
4010
|
onPressEnd: onPressEnd,
|
|
@@ -4180,8 +4018,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
4180
4018
|
var _b = dragPoses(draggable),
|
|
4181
4019
|
drag = _b.drag,
|
|
4182
4020
|
dragEnd = _b.dragEnd;
|
|
4183
|
-
poseConfig.drag = __assign$
|
|
4184
|
-
poseConfig.dragEnd = __assign$
|
|
4021
|
+
poseConfig.drag = __assign$2(__assign$2({}, drag), poseConfig.drag);
|
|
4022
|
+
poseConfig.dragEnd = __assign$2(__assign$2({}, dragEnd), poseConfig.dragEnd);
|
|
4185
4023
|
}
|
|
4186
4024
|
return poseConfig;
|
|
4187
4025
|
};
|
|
@@ -4189,7 +4027,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4189
4027
|
posePriority: ['drag', 'press', 'focus', 'hover'],
|
|
4190
4028
|
transformPose: function (_a, name, state) {
|
|
4191
4029
|
var flip = _a.flip,
|
|
4192
|
-
pose$$1 = __rest$
|
|
4030
|
+
pose$$1 = __rest$1(_a, ["flip"]);
|
|
4193
4031
|
if (isFlipPose(flip, name, state)) {
|
|
4194
4032
|
return flipPose(state, pose$$1);
|
|
4195
4033
|
} else if (isPositional(pose$$1)) {
|
|
@@ -4227,7 +4065,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4227
4065
|
var props = _a.props,
|
|
4228
4066
|
activeActions = _a.activeActions;
|
|
4229
4067
|
var measure = props.dimensions.measure;
|
|
4230
|
-
var poserApi = __assign$
|
|
4068
|
+
var poserApi = __assign$2(__assign$2({}, api), { addChild: function (element, childConfig) {
|
|
4231
4069
|
return api._addChild(createPoseConfig(element, childConfig), domPose);
|
|
4232
4070
|
}, measure: measure, flip: function (op) {
|
|
4233
4071
|
if (op) {
|
|
@@ -7255,104 +7093,6 @@ var Imposter = function Imposter(_ref) {
|
|
|
7255
7093
|
}, rest), safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
7256
7094
|
};
|
|
7257
7095
|
|
|
7258
|
-
/*! *****************************************************************************
|
|
7259
|
-
Copyright (c) Microsoft Corporation.
|
|
7260
|
-
|
|
7261
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7262
|
-
purpose with or without fee is hereby granted.
|
|
7263
|
-
|
|
7264
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7265
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7266
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7267
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7268
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7269
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7270
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
7271
|
-
***************************************************************************** */
|
|
7272
|
-
/* global Reflect, Promise */
|
|
7273
|
-
|
|
7274
|
-
var extendStatics$2 = function(d, b) {
|
|
7275
|
-
extendStatics$2 = Object.setPrototypeOf ||
|
|
7276
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7277
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7278
|
-
return extendStatics$2(d, b);
|
|
7279
|
-
};
|
|
7280
|
-
|
|
7281
|
-
function __extends$2(d, b) {
|
|
7282
|
-
extendStatics$2(d, b);
|
|
7283
|
-
function __() { this.constructor = d; }
|
|
7284
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
7285
|
-
}
|
|
7286
|
-
|
|
7287
|
-
var __assign$7 = function() {
|
|
7288
|
-
__assign$7 = Object.assign || function __assign(t) {
|
|
7289
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7290
|
-
s = arguments[i];
|
|
7291
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7292
|
-
}
|
|
7293
|
-
return t;
|
|
7294
|
-
};
|
|
7295
|
-
return __assign$7.apply(this, arguments);
|
|
7296
|
-
};
|
|
7297
|
-
|
|
7298
|
-
function __rest$5(s, e) {
|
|
7299
|
-
var t = {};
|
|
7300
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7301
|
-
t[p] = s[p];
|
|
7302
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7303
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7304
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7305
|
-
t[p[i]] = s[p[i]];
|
|
7306
|
-
}
|
|
7307
|
-
return t;
|
|
7308
|
-
}
|
|
7309
|
-
|
|
7310
|
-
function __spreadArrays$2() {
|
|
7311
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
7312
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
7313
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
7314
|
-
r[k] = a[j];
|
|
7315
|
-
return r;
|
|
7316
|
-
}
|
|
7317
|
-
|
|
7318
|
-
/*! *****************************************************************************
|
|
7319
|
-
Copyright (c) Microsoft Corporation.
|
|
7320
|
-
|
|
7321
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7322
|
-
purpose with or without fee is hereby granted.
|
|
7323
|
-
|
|
7324
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7325
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7326
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7327
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7328
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7329
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7330
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
7331
|
-
***************************************************************************** */
|
|
7332
|
-
|
|
7333
|
-
var __assign$8 = function() {
|
|
7334
|
-
__assign$8 = Object.assign || function __assign(t) {
|
|
7335
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7336
|
-
s = arguments[i];
|
|
7337
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7338
|
-
}
|
|
7339
|
-
return t;
|
|
7340
|
-
};
|
|
7341
|
-
return __assign$8.apply(this, arguments);
|
|
7342
|
-
};
|
|
7343
|
-
|
|
7344
|
-
function __rest$6(s, e) {
|
|
7345
|
-
var t = {};
|
|
7346
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7347
|
-
t[p] = s[p];
|
|
7348
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7349
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7350
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7351
|
-
t[p[i]] = s[p[i]];
|
|
7352
|
-
}
|
|
7353
|
-
return t;
|
|
7354
|
-
}
|
|
7355
|
-
|
|
7356
7096
|
var Observer$1 = /*#__PURE__*/function () {
|
|
7357
7097
|
function Observer(_a, observer) {
|
|
7358
7098
|
var _this = this;
|
|
@@ -7415,18 +7155,18 @@ var Action$1 = /*#__PURE__*/function () {
|
|
|
7415
7155
|
};
|
|
7416
7156
|
var _a = this.props,
|
|
7417
7157
|
init = _a.init,
|
|
7418
|
-
observerProps = __rest
|
|
7158
|
+
observerProps = __rest(_a, ["init"]);
|
|
7419
7159
|
var observer = createObserver$1(observerCandidate, observerProps, function () {
|
|
7420
7160
|
isComplete = true;
|
|
7421
7161
|
subscription.stop();
|
|
7422
7162
|
});
|
|
7423
7163
|
var api = init(observer);
|
|
7424
|
-
subscription = api ? __assign
|
|
7164
|
+
subscription = api ? __assign({}, subscription, api) : subscription;
|
|
7425
7165
|
if (isComplete) subscription.stop();
|
|
7426
7166
|
return subscription;
|
|
7427
7167
|
};
|
|
7428
7168
|
Action.prototype.applyMiddleware = function (middleware) {
|
|
7429
|
-
return this.create(__assign
|
|
7169
|
+
return this.create(__assign({}, this.props, { middleware: this.props.middleware ? [middleware].concat(this.props.middleware) : [middleware] }));
|
|
7430
7170
|
};
|
|
7431
7171
|
Action.prototype.pipe = function () {
|
|
7432
7172
|
var funcs = [];
|
|
@@ -7479,18 +7219,18 @@ var createAction$1 = function (action, props) {
|
|
|
7479
7219
|
var createUnitAction$1 = function (action, _a) {
|
|
7480
7220
|
var from = _a.from,
|
|
7481
7221
|
to = _a.to,
|
|
7482
|
-
props = __rest
|
|
7222
|
+
props = __rest(_a, ["from", "to"]);
|
|
7483
7223
|
var unitType = findUnitType$1(from) || findUnitType$1(to);
|
|
7484
7224
|
var transform = unitType.transform,
|
|
7485
7225
|
parse = unitType.parse;
|
|
7486
|
-
return action(__assign
|
|
7226
|
+
return action(__assign({}, props, { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
7487
7227
|
};
|
|
7488
7228
|
var createMixerAction$1 = function (mixer) {
|
|
7489
7229
|
return function (action, _a) {
|
|
7490
7230
|
var from = _a.from,
|
|
7491
7231
|
to = _a.to,
|
|
7492
|
-
props = __rest
|
|
7493
|
-
return action(__assign
|
|
7232
|
+
props = __rest(_a, ["from", "to"]);
|
|
7233
|
+
return action(__assign({}, props, { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
7494
7234
|
};
|
|
7495
7235
|
};
|
|
7496
7236
|
var createColorAction$1 = /*#__PURE__*/createMixerAction$1(mixColor);
|
|
@@ -7703,7 +7443,7 @@ var inertia = function (_a) {
|
|
|
7703
7443
|
};
|
|
7704
7444
|
var startSpring = function (props) {
|
|
7705
7445
|
isSpring = true;
|
|
7706
|
-
startAnimation(vectorSpring$1(__assign
|
|
7446
|
+
startAnimation(vectorSpring$1(__assign({}, props, { to: isLessThanMin(props.from) ? min : max, stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta })));
|
|
7707
7447
|
};
|
|
7708
7448
|
if (isOutOfBounds(from)) {
|
|
7709
7449
|
startSpring({ from: from, velocity: velocity });
|
|
@@ -7935,7 +7675,7 @@ var keyframes$1 = function (_a) {
|
|
|
7935
7675
|
ease = _b === void 0 ? linear : _b,
|
|
7936
7676
|
times = _a.times,
|
|
7937
7677
|
values = _a.values,
|
|
7938
|
-
tweenProps = __rest
|
|
7678
|
+
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
7939
7679
|
easings = Array.isArray(easings) ? easings : defaultEasings$1(values, easings);
|
|
7940
7680
|
times = times || defaultTimings$1(values);
|
|
7941
7681
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -7945,7 +7685,7 @@ var keyframes$1 = function (_a) {
|
|
|
7945
7685
|
ease: easing
|
|
7946
7686
|
});
|
|
7947
7687
|
});
|
|
7948
|
-
return tween$1(__assign
|
|
7688
|
+
return tween$1(__assign({}, tweenProps, { ease: ease })).applyMiddleware(function (update) {
|
|
7949
7689
|
return interpolateScrubbers$1(times, scrubbers, update);
|
|
7950
7690
|
});
|
|
7951
7691
|
};
|
|
@@ -8147,7 +7887,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
8147
7887
|
*/
|
|
8148
7888
|
MotionValue.prototype.addChild = function (config) {
|
|
8149
7889
|
if (config === void 0) { config = {}; }
|
|
8150
|
-
var child = new MotionValue(this.current, __assign
|
|
7890
|
+
var child = new MotionValue(this.current, __assign({ parent: this }, config));
|
|
8151
7891
|
if (!this.children)
|
|
8152
7892
|
this.children = new Set();
|
|
8153
7893
|
this.children.add(child);
|
|
@@ -8589,7 +8329,7 @@ var buildStyleAttr = function (values, styleProp, isStatic) {
|
|
|
8589
8329
|
? transformTemplate({}, styleProp.transform)
|
|
8590
8330
|
: transformTemplate;
|
|
8591
8331
|
}
|
|
8592
|
-
return buildStyleProperty(__assign
|
|
8332
|
+
return buildStyleProperty(__assign(__assign({}, styleProp), motionValueStyles), !isStatic);
|
|
8593
8333
|
};
|
|
8594
8334
|
var useMotionStyles = function (values, styleProp, isStatic, transformValues) {
|
|
8595
8335
|
if (styleProp === void 0) { styleProp = {}; }
|
|
@@ -8643,7 +8383,7 @@ var auto$1 = {
|
|
|
8643
8383
|
parse: function (v) { return v; },
|
|
8644
8384
|
};
|
|
8645
8385
|
var dimensionTypes = [number, px, percent, degrees, vw, vh, auto$1];
|
|
8646
|
-
var valueTypes$1 = __spreadArrays
|
|
8386
|
+
var valueTypes$1 = __spreadArrays(dimensionTypes, [color, complex]);
|
|
8647
8387
|
var testValueType$1 = function (v) { return function (type) { return type.test(v); }; };
|
|
8648
8388
|
var getDimensionValueType = function (v) {
|
|
8649
8389
|
return dimensionTypes.find(testValueType$1(v));
|
|
@@ -8696,7 +8436,7 @@ var getDefaultTransition = function (valueKey, to) {
|
|
|
8696
8436
|
transitionFactory =
|
|
8697
8437
|
defaultTransitions$1[valueKey] || defaultTransitions$1.default;
|
|
8698
8438
|
}
|
|
8699
|
-
return __assign
|
|
8439
|
+
return __assign({ to: to }, transitionFactory(to));
|
|
8700
8440
|
};
|
|
8701
8441
|
|
|
8702
8442
|
/**
|
|
@@ -8792,9 +8532,9 @@ var transitionOptionParser = {
|
|
|
8792
8532
|
return opts;
|
|
8793
8533
|
},
|
|
8794
8534
|
keyframes: function (_a) {
|
|
8795
|
-
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest
|
|
8535
|
+
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest(_a, ["from", "to", "velocity"]);
|
|
8796
8536
|
if (opts.values && opts.values[0] === null) {
|
|
8797
|
-
var values = __spreadArrays
|
|
8537
|
+
var values = __spreadArrays(opts.values);
|
|
8798
8538
|
values[0] = from;
|
|
8799
8539
|
opts.values = values;
|
|
8800
8540
|
}
|
|
@@ -8808,7 +8548,7 @@ var transitionOptionParser = {
|
|
|
8808
8548
|
},
|
|
8809
8549
|
};
|
|
8810
8550
|
var isTransitionDefined = function (_a) {
|
|
8811
|
-
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest
|
|
8551
|
+
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection"]);
|
|
8812
8552
|
return Object.keys(transition).length;
|
|
8813
8553
|
};
|
|
8814
8554
|
var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
@@ -8818,7 +8558,7 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8818
8558
|
// and see if there's any props remaining
|
|
8819
8559
|
if (transitionDefinition === undefined ||
|
|
8820
8560
|
!isTransitionDefined(transitionDefinition)) {
|
|
8821
|
-
return __assign
|
|
8561
|
+
return __assign({ delay: delay }, getDefaultTransition(key, to));
|
|
8822
8562
|
}
|
|
8823
8563
|
var valueTransitionDefinition = transitionDefinition[key] ||
|
|
8824
8564
|
transitionDefinition.default ||
|
|
@@ -8835,12 +8575,12 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8835
8575
|
};
|
|
8836
8576
|
}
|
|
8837
8577
|
else if (isKeyframesTarget(to)) {
|
|
8838
|
-
return __assign
|
|
8578
|
+
return __assign(__assign({ values: to, duration: 0.8, delay: delay, ease: "linear" }, valueTransitionDefinition), {
|
|
8839
8579
|
// This animation must be keyframes if we're animating through an array
|
|
8840
8580
|
type: "keyframes" });
|
|
8841
8581
|
}
|
|
8842
8582
|
else {
|
|
8843
|
-
return __assign
|
|
8583
|
+
return __assign({ type: "tween", to: to,
|
|
8844
8584
|
delay: delay }, valueTransitionDefinition);
|
|
8845
8585
|
}
|
|
8846
8586
|
};
|
|
@@ -8857,12 +8597,12 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8857
8597
|
// for instance 100 to #fff. This might live better in Popmotion.
|
|
8858
8598
|
warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to " + target + ". \"" + origin + "\" is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property.");
|
|
8859
8599
|
// Parse the `transition` prop and return options for the Popmotion animation
|
|
8860
|
-
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest
|
|
8600
|
+
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
|
|
8861
8601
|
// If this is an animatable pair of values, return an animation, otherwise use `just`
|
|
8862
8602
|
var actionFactory = isOriginAnimatable && isTargetAnimatable
|
|
8863
8603
|
? transitions[type]
|
|
8864
8604
|
: just$1;
|
|
8865
|
-
var opts = preprocessOptions(type, __assign
|
|
8605
|
+
var opts = preprocessOptions(type, __assign({ from: origin, velocity: value.getVelocity() }, transitionDefinition));
|
|
8866
8606
|
// Convert duration from Framer Motion's seconds into Popmotion's milliseconds
|
|
8867
8607
|
if (isDurationAnimation(opts)) {
|
|
8868
8608
|
if (opts.duration) {
|
|
@@ -8880,10 +8620,10 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8880
8620
|
* @internal
|
|
8881
8621
|
*/
|
|
8882
8622
|
function startAnimation(key, value, target, _a) {
|
|
8883
|
-
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest
|
|
8623
|
+
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest(_a, ["delay"]);
|
|
8884
8624
|
return value.start(function (complete) {
|
|
8885
8625
|
var activeAnimation;
|
|
8886
|
-
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest
|
|
8626
|
+
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest(_b, ["delay"]);
|
|
8887
8627
|
if (valueDelay !== undefined) {
|
|
8888
8628
|
delay$1$1 = valueDelay;
|
|
8889
8629
|
}
|
|
@@ -9029,7 +8769,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9029
8769
|
var _this = this;
|
|
9030
8770
|
var _b = _a === void 0 ? {} : _a, _c = _b.isActive, isActive = _c === void 0 ? new Set() : _c, priority = _b.priority;
|
|
9031
8771
|
var _d = this.resolveVariant(definition), target = _d.target, transitionEnd = _d.transitionEnd;
|
|
9032
|
-
target = this.transformValues(__assign
|
|
8772
|
+
target = this.transformValues(__assign(__assign({}, target), transitionEnd));
|
|
9033
8773
|
return Object.keys(target).forEach(function (key) {
|
|
9034
8774
|
if (isActive.has(key))
|
|
9035
8775
|
return;
|
|
@@ -9119,7 +8859,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9119
8859
|
// resolve current and velocity
|
|
9120
8860
|
variant = variant(this.props.custom, getCurrent$1(this.values), getVelocity(this.values));
|
|
9121
8861
|
}
|
|
9122
|
-
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest
|
|
8862
|
+
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest(variant, ["transition", "transitionEnd"]);
|
|
9123
8863
|
return { transition: transition, transitionEnd: transitionEnd, target: target };
|
|
9124
8864
|
};
|
|
9125
8865
|
/**
|
|
@@ -9210,7 +8950,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9210
8950
|
ValueAnimationControls.prototype.applyVariantLabels = function (variantLabelList) {
|
|
9211
8951
|
var _this = this;
|
|
9212
8952
|
var isActive = new Set();
|
|
9213
|
-
var reversedList = __spreadArrays
|
|
8953
|
+
var reversedList = __spreadArrays(variantLabelList).reverse();
|
|
9214
8954
|
reversedList.forEach(function (key) {
|
|
9215
8955
|
var _a = _this.resolveVariant(_this.variants[key]), target = _a.target, transitionEnd = _a.transitionEnd;
|
|
9216
8956
|
if (transitionEnd) {
|
|
@@ -9281,7 +9021,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9281
9021
|
if (this.isAnimating.has(key))
|
|
9282
9022
|
continue;
|
|
9283
9023
|
this.isAnimating.add(key);
|
|
9284
|
-
animations.push(startAnimation(key, value, valueTarget, __assign
|
|
9024
|
+
animations.push(startAnimation(key, value, valueTarget, __assign({ delay: delay }, transition)));
|
|
9285
9025
|
}
|
|
9286
9026
|
var allAnimations = Promise.all(animations);
|
|
9287
9027
|
return transitionEnd
|
|
@@ -9292,7 +9032,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9292
9032
|
};
|
|
9293
9033
|
ValueAnimationControls.prototype.animateVariantLabels = function (variantLabels, opts) {
|
|
9294
9034
|
var _this = this;
|
|
9295
|
-
var animations = __spreadArrays
|
|
9035
|
+
var animations = __spreadArrays(variantLabels).reverse()
|
|
9296
9036
|
.map(function (label) { return _this.animateVariant(label, opts); });
|
|
9297
9037
|
return Promise.all(animations);
|
|
9298
9038
|
};
|
|
@@ -9736,7 +9476,7 @@ function useValueAnimationControls(config, props, subscribeToParentControls) {
|
|
|
9736
9476
|
// Remove reference to onAnimationComplete from controls. All the MotionValues
|
|
9737
9477
|
// are unsubscribed from this component separately. We let animations run out
|
|
9738
9478
|
// as they might be animating other components.
|
|
9739
|
-
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest
|
|
9479
|
+
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest(props, ["onAnimationComplete"]);
|
|
9740
9480
|
controls.setProps(unmountProps);
|
|
9741
9481
|
parentControls && parentControls.removeChild(controls);
|
|
9742
9482
|
};
|
|
@@ -10221,7 +9961,7 @@ var PanSession = /** @class */ (function () {
|
|
|
10221
9961
|
return;
|
|
10222
9962
|
var point = info.point;
|
|
10223
9963
|
var timestamp = getFrameData().timestamp;
|
|
10224
|
-
_this.history.push(__assign
|
|
9964
|
+
_this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));
|
|
10225
9965
|
var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;
|
|
10226
9966
|
if (!isPanStarted) {
|
|
10227
9967
|
onStart && onStart(_this.lastMoveEvent, info);
|
|
@@ -10238,7 +9978,7 @@ var PanSession = /** @class */ (function () {
|
|
|
10238
9978
|
var initialInfo = transformPoint(info, this.transformPagePoint);
|
|
10239
9979
|
var point = initialInfo.point;
|
|
10240
9980
|
var timestamp = getFrameData().timestamp;
|
|
10241
|
-
this.history = [__assign
|
|
9981
|
+
this.history = [__assign(__assign({}, point), { timestamp: timestamp })];
|
|
10242
9982
|
var onSessionStart = handlers.onSessionStart;
|
|
10243
9983
|
onSessionStart &&
|
|
10244
9984
|
onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
@@ -10566,7 +10306,7 @@ var Gestures = {
|
|
|
10566
10306
|
return gestureProps.some(function (key) { return props.hasOwnProperty(key); });
|
|
10567
10307
|
},
|
|
10568
10308
|
Component: makeRenderlessComponent(function (_a) {
|
|
10569
|
-
var innerRef = _a.innerRef, props = __rest
|
|
10309
|
+
var innerRef = _a.innerRef, props = __rest(_a, ["innerRef"]);
|
|
10570
10310
|
useGestures(props, innerRef);
|
|
10571
10311
|
}),
|
|
10572
10312
|
};
|
|
@@ -10806,8 +10546,8 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10806
10546
|
};
|
|
10807
10547
|
ComponentDragControls.prototype.updateProps = function (_a) {
|
|
10808
10548
|
var _this = this;
|
|
10809
|
-
var _b = _a.drag, drag = _b === void 0 ? false : _b, _c = _a.dragDirectionLock, dragDirectionLock = _c === void 0 ? false : _c, _d = _a.dragPropagation, dragPropagation = _d === void 0 ? false : _d, _e = _a.dragConstraints, dragConstraints = _e === void 0 ? false : _e, _f = _a.dragElastic, dragElastic = _f === void 0 ? true : _f, _g = _a.dragMomentum, dragMomentum = _g === void 0 ? true : _g, remainingProps = __rest
|
|
10810
|
-
this.props = __assign
|
|
10549
|
+
var _b = _a.drag, drag = _b === void 0 ? false : _b, _c = _a.dragDirectionLock, dragDirectionLock = _c === void 0 ? false : _c, _d = _a.dragPropagation, dragPropagation = _d === void 0 ? false : _d, _e = _a.dragConstraints, dragConstraints = _e === void 0 ? false : _e, _f = _a.dragElastic, dragElastic = _f === void 0 ? true : _f, _g = _a.dragMomentum, dragMomentum = _g === void 0 ? true : _g, remainingProps = __rest(_a, ["drag", "dragDirectionLock", "dragPropagation", "dragConstraints", "dragElastic", "dragMomentum"]);
|
|
10550
|
+
this.props = __assign({ drag: drag,
|
|
10811
10551
|
dragDirectionLock: dragDirectionLock,
|
|
10812
10552
|
dragPropagation: dragPropagation,
|
|
10813
10553
|
dragConstraints: dragConstraints,
|
|
@@ -10863,7 +10603,7 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10863
10603
|
var bounceStiffness = dragElastic ? 200 : 1000000;
|
|
10864
10604
|
var bounceDamping = dragElastic ? 40 : 10000000;
|
|
10865
10605
|
var animationControls = _dragTransitionControls || _this.controls;
|
|
10866
|
-
var inertia = __assign
|
|
10606
|
+
var inertia = __assign(__assign({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness,
|
|
10867
10607
|
bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1 }, dragTransition), transition);
|
|
10868
10608
|
var externalAxisMotionValue = axis === "x" ? _dragValueX : _dragValueY;
|
|
10869
10609
|
// If we're not animating on an externally-provided `MotionValue` we can use the
|
|
@@ -10944,7 +10684,7 @@ function bothAxis(handler) {
|
|
|
10944
10684
|
return [handler("x"), handler("y")];
|
|
10945
10685
|
}
|
|
10946
10686
|
function convertPanToDrag(info, point) {
|
|
10947
|
-
return __assign
|
|
10687
|
+
return __assign(__assign({}, info), { point: {
|
|
10948
10688
|
x: point.x ? point.x.get() : 0,
|
|
10949
10689
|
y: point.y ? point.y.get() : 0,
|
|
10950
10690
|
} });
|
|
@@ -11055,7 +10795,7 @@ function useDrag(props, ref, values, controls) {
|
|
|
11055
10795
|
var groupDragControls = props.dragControls;
|
|
11056
10796
|
var transformPagePoint = React.useContext(MotionPluginContext).transformPagePoint;
|
|
11057
10797
|
var dragControls = useConstant(function () { return new ComponentDragControls({ ref: ref, values: values, controls: controls }); });
|
|
11058
|
-
dragControls.updateProps(__assign
|
|
10798
|
+
dragControls.updateProps(__assign(__assign({}, props), { transformPagePoint: transformPagePoint }));
|
|
11059
10799
|
React.useEffect(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls]);
|
|
11060
10800
|
React.useEffect(function () { return dragControls.mount(ref.current); }, []);
|
|
11061
10801
|
}
|
|
@@ -11064,7 +10804,7 @@ var Drag = {
|
|
|
11064
10804
|
key: "drag",
|
|
11065
10805
|
shouldRender: function (props) { return !!props.drag; },
|
|
11066
10806
|
Component: makeRenderlessComponent(function (_a) {
|
|
11067
|
-
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest
|
|
10807
|
+
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest(_a, ["innerRef", "values", "controls"]);
|
|
11068
10808
|
return useDrag(props, innerRef, values, controls);
|
|
11069
10809
|
}),
|
|
11070
10810
|
};
|
|
@@ -11116,14 +10856,14 @@ function getVariableValue(current, element, depth) {
|
|
|
11116
10856
|
* @internal
|
|
11117
10857
|
*/
|
|
11118
10858
|
function resolveCSSVariables(values, ref, _a, transitionEnd) {
|
|
11119
|
-
var target = __rest
|
|
10859
|
+
var target = __rest(_a, []);
|
|
11120
10860
|
var element = ref.current;
|
|
11121
10861
|
if (!(element instanceof HTMLElement))
|
|
11122
10862
|
return { target: target, transitionEnd: transitionEnd };
|
|
11123
10863
|
// If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
|
|
11124
10864
|
// only if they change but I think this reads clearer and this isn't a performance-critical path.
|
|
11125
10865
|
if (transitionEnd) {
|
|
11126
|
-
transitionEnd = __assign
|
|
10866
|
+
transitionEnd = __assign({}, transitionEnd);
|
|
11127
10867
|
}
|
|
11128
10868
|
// Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
|
|
11129
10869
|
values.forEach(function (value) {
|
|
@@ -11280,8 +11020,8 @@ var convertChangedValueTypes = function (target, values, element, elementStyler,
|
|
|
11280
11020
|
};
|
|
11281
11021
|
var checkAndConvertChangedValueTypes = function (values, ref, target, transitionEnd) {
|
|
11282
11022
|
if (transitionEnd === void 0) { transitionEnd = {}; }
|
|
11283
|
-
target = __assign
|
|
11284
|
-
transitionEnd = __assign
|
|
11023
|
+
target = __assign({}, target);
|
|
11024
|
+
transitionEnd = __assign({}, transitionEnd);
|
|
11285
11025
|
var element = ref.current;
|
|
11286
11026
|
var elementStyler = index(element);
|
|
11287
11027
|
var targetPositionalKeys = Object.keys(target).filter(isPositionalKey$1);
|
|
@@ -11509,7 +11249,7 @@ function calcAxisDelta(prev, next, names) {
|
|
|
11509
11249
|
return delta;
|
|
11510
11250
|
}
|
|
11511
11251
|
function calcDelta(prev, next) {
|
|
11512
|
-
var delta = __assign
|
|
11252
|
+
var delta = __assign(__assign({}, calcAxisDelta(prev, next, axisLabels.x)), calcAxisDelta(prev, next, axisLabels.y));
|
|
11513
11253
|
return delta;
|
|
11514
11254
|
}
|
|
11515
11255
|
var offset = {
|
|
@@ -11553,7 +11293,7 @@ function getTransition(_a) {
|
|
|
11553
11293
|
return layoutTransition || positionTransition;
|
|
11554
11294
|
}
|
|
11555
11295
|
var LayoutAnimation = /** @class */ (function (_super) {
|
|
11556
|
-
__extends
|
|
11296
|
+
__extends(LayoutAnimation, _super);
|
|
11557
11297
|
function LayoutAnimation() {
|
|
11558
11298
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
11559
11299
|
}
|
|
@@ -11620,11 +11360,11 @@ var LayoutAnimation = /** @class */ (function (_super) {
|
|
|
11620
11360
|
if (!delta[deltaKey])
|
|
11621
11361
|
return;
|
|
11622
11362
|
var baseTransition = typeof transitionDefinition === "boolean"
|
|
11623
|
-
? __assign
|
|
11363
|
+
? __assign({}, getDefaultLayoutTransition(isPositionOnly)) : transitionDefinition;
|
|
11624
11364
|
var value = values.get(transformKey, targetValue);
|
|
11625
11365
|
var velocity = value.getVelocity();
|
|
11626
11366
|
transition[transformKey] = baseTransition[transformKey]
|
|
11627
|
-
? __assign
|
|
11367
|
+
? __assign({}, baseTransition[transformKey]) : __assign({}, baseTransition);
|
|
11628
11368
|
if (transition[transformKey].velocity === undefined) {
|
|
11629
11369
|
transition[transformKey].velocity = velocity || 0;
|
|
11630
11370
|
}
|
|
@@ -11765,9 +11505,9 @@ var hasUpdated = function (prev, next) {
|
|
|
11765
11505
|
};
|
|
11766
11506
|
function targetWithoutTransition(_a, mergeTransitionEnd) {
|
|
11767
11507
|
if (mergeTransitionEnd === void 0) { mergeTransitionEnd = false; }
|
|
11768
|
-
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest
|
|
11508
|
+
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, ["transition", "transitionEnd"]);
|
|
11769
11509
|
return mergeTransitionEnd
|
|
11770
|
-
? __assign
|
|
11510
|
+
? __assign(__assign({}, target), transitionEnd)
|
|
11771
11511
|
: target;
|
|
11772
11512
|
}
|
|
11773
11513
|
/**
|
|
@@ -11819,9 +11559,9 @@ function useAnimateProp(targetAndTransition, controls, values, defaultTransition
|
|
|
11819
11559
|
}
|
|
11820
11560
|
}
|
|
11821
11561
|
isInitialRender.current = false;
|
|
11822
|
-
prevValues.current = __assign
|
|
11562
|
+
prevValues.current = __assign(__assign({}, prevValues.current), finalTarget);
|
|
11823
11563
|
if (Object.keys(targetToAnimate).length) {
|
|
11824
|
-
controls.start(__assign
|
|
11564
|
+
controls.start(__assign(__assign({}, targetToAnimate), { transition: targetAndTransition.transition || defaultTransition, transitionEnd: targetAndTransition.transitionEnd }));
|
|
11825
11565
|
}
|
|
11826
11566
|
}, [targetAndTransition]);
|
|
11827
11567
|
}
|
|
@@ -11995,7 +11735,7 @@ var Exit = {
|
|
|
11995
11735
|
React.useEffect(function () {
|
|
11996
11736
|
if (!isPresent) {
|
|
11997
11737
|
if (!isPlayingExitAnimation.current && exit) {
|
|
11998
|
-
controls.setProps(__assign
|
|
11738
|
+
controls.setProps(__assign(__assign({}, props), { custom: custom }));
|
|
11999
11739
|
controls.start(exit).then(onExitComplete);
|
|
12000
11740
|
}
|
|
12001
11741
|
isPlayingExitAnimation.current = true;
|
|
@@ -12066,7 +11806,7 @@ var buildHTMLProps = function (values, style, isStatic, isDrag) {
|
|
|
12066
11806
|
var buildSVGProps = function (values, style) {
|
|
12067
11807
|
var motionValueStyles = resolveCurrent(values);
|
|
12068
11808
|
var props = buildSVGAttrs(motionValueStyles, undefined, undefined, undefined, undefined, false);
|
|
12069
|
-
props.style = __assign
|
|
11809
|
+
props.style = __assign(__assign({}, style), props.style);
|
|
12070
11810
|
return props;
|
|
12071
11811
|
};
|
|
12072
11812
|
var functionalityComponents = [Layout, Drag, Gestures, Exit];
|
|
@@ -12085,7 +11825,7 @@ function createDomMotionConfig(Component) {
|
|
|
12085
11825
|
var staticVisualStyles = isSVG
|
|
12086
11826
|
? buildSVGProps(values, style)
|
|
12087
11827
|
: buildHTMLProps(values, style, isStatic, !!props.drag);
|
|
12088
|
-
return React.createElement(Component, __assign
|
|
11828
|
+
return React.createElement(Component, __assign(__assign(__assign({}, forwardedProps), { ref: ref }), staticVisualStyles));
|
|
12089
11829
|
},
|
|
12090
11830
|
/**
|
|
12091
11831
|
* loadFunctionalityComponents gets used by the `motion` component
|
|
@@ -12116,7 +11856,7 @@ function createDomMotionConfig(Component) {
|
|
|
12116
11856
|
for (var i = 0; i < numFunctionalityComponents; i++) {
|
|
12117
11857
|
var _a = functionalityComponents[i], shouldRender = _a.shouldRender, key = _a.key, Component_1 = _a.Component;
|
|
12118
11858
|
if (shouldRender(props, context)) {
|
|
12119
|
-
activeComponents.push(React.createElement(Component_1, __assign
|
|
11859
|
+
activeComponents.push(React.createElement(Component_1, __assign({ key: key }, props, { parentContext: context, values: values, controls: controls, innerRef: ref })));
|
|
12120
11860
|
}
|
|
12121
11861
|
}
|
|
12122
11862
|
return activeComponents;
|
|
@@ -12168,7 +11908,7 @@ var svgMotionComponents = svgElements.reduce(function (acc, Component) {
|
|
|
12168
11908
|
*
|
|
12169
11909
|
* @public
|
|
12170
11910
|
*/
|
|
12171
|
-
var motion = __assign
|
|
11911
|
+
var motion = __assign(__assign({
|
|
12172
11912
|
/**
|
|
12173
11913
|
* Convert a custom React component into a `motion` component.
|
|
12174
11914
|
*
|
|
@@ -12220,7 +11960,7 @@ var PresenceChild = function (_a) {
|
|
|
12220
11960
|
return function () { return numPresenceChildren.current--; };
|
|
12221
11961
|
};
|
|
12222
11962
|
}, [isPresent]);
|
|
12223
|
-
return (React.createElement(PresenceContext.Provider, { value: __assign
|
|
11963
|
+
return (React.createElement(PresenceContext.Provider, { value: __assign(__assign({}, context), { register: register }) }, children));
|
|
12224
11964
|
};
|
|
12225
11965
|
|
|
12226
11966
|
function getChildKey(child) {
|
|
@@ -12336,7 +12076,7 @@ var AnimatePresence = function (_a) {
|
|
|
12336
12076
|
return (React.createElement(React.Fragment, null, filteredChildren.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false }, child)); })));
|
|
12337
12077
|
}
|
|
12338
12078
|
// If this is a subsequent render, deal with entering and exiting children
|
|
12339
|
-
var childrenToRender = __spreadArrays
|
|
12079
|
+
var childrenToRender = __spreadArrays(filteredChildren);
|
|
12340
12080
|
// Diff the keys of the currently-present and target children to update our
|
|
12341
12081
|
// exiting list.
|
|
12342
12082
|
var presentKeys = presentChildren.current.map(getChildKey);
|
|
@@ -21343,6 +21083,7 @@ function _wrapNativeSuper(Class) {
|
|
|
21343
21083
|
}
|
|
21344
21084
|
|
|
21345
21085
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
21086
|
+
|
|
21346
21087
|
/**
|
|
21347
21088
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
21348
21089
|
* @private
|
|
@@ -21427,71 +21168,84 @@ var ERRORS = {
|
|
|
21427
21168
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
21428
21169
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
21429
21170
|
};
|
|
21430
|
-
|
|
21431
21171
|
/**
|
|
21432
21172
|
* super basic version of sprintf
|
|
21433
21173
|
* @private
|
|
21434
21174
|
*/
|
|
21175
|
+
|
|
21435
21176
|
function format() {
|
|
21436
21177
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21437
21178
|
args[_key] = arguments[_key];
|
|
21438
21179
|
}
|
|
21180
|
+
|
|
21439
21181
|
var a = args[0];
|
|
21440
21182
|
var b = [];
|
|
21441
21183
|
var c;
|
|
21184
|
+
|
|
21442
21185
|
for (c = 1; c < args.length; c += 1) {
|
|
21443
21186
|
b.push(args[c]);
|
|
21444
21187
|
}
|
|
21188
|
+
|
|
21445
21189
|
b.forEach(function (d) {
|
|
21446
21190
|
a = a.replace(/%[a-z]/, d);
|
|
21447
21191
|
});
|
|
21448
21192
|
return a;
|
|
21449
21193
|
}
|
|
21450
|
-
|
|
21451
21194
|
/**
|
|
21452
21195
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
21453
21196
|
* in production mode.
|
|
21454
21197
|
* @private
|
|
21455
21198
|
*/
|
|
21199
|
+
|
|
21200
|
+
|
|
21456
21201
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
21457
21202
|
_inheritsLoose(PolishedError, _Error);
|
|
21203
|
+
|
|
21458
21204
|
function PolishedError(code) {
|
|
21459
21205
|
var _this;
|
|
21206
|
+
|
|
21460
21207
|
if (process.env.NODE_ENV === 'production') {
|
|
21461
21208
|
_this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
|
|
21462
21209
|
} else {
|
|
21463
21210
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
21464
21211
|
args[_key2 - 1] = arguments[_key2];
|
|
21465
21212
|
}
|
|
21213
|
+
|
|
21466
21214
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
21467
21215
|
}
|
|
21216
|
+
|
|
21468
21217
|
return _assertThisInitialized(_this);
|
|
21469
21218
|
}
|
|
21219
|
+
|
|
21470
21220
|
return PolishedError;
|
|
21471
21221
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
21472
21222
|
|
|
21473
21223
|
function colorToInt(color) {
|
|
21474
21224
|
return Math.round(color * 255);
|
|
21475
21225
|
}
|
|
21226
|
+
|
|
21476
21227
|
function convertToInt(red, green, blue) {
|
|
21477
21228
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
21478
21229
|
}
|
|
21230
|
+
|
|
21479
21231
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
21480
21232
|
if (convert === void 0) {
|
|
21481
21233
|
convert = convertToInt;
|
|
21482
21234
|
}
|
|
21235
|
+
|
|
21483
21236
|
if (saturation === 0) {
|
|
21484
21237
|
// achromatic
|
|
21485
21238
|
return convert(lightness, lightness, lightness);
|
|
21486
|
-
}
|
|
21239
|
+
} // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
21240
|
+
|
|
21487
21241
|
|
|
21488
|
-
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
21489
21242
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
21490
21243
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
21491
21244
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
21492
21245
|
var red = 0;
|
|
21493
21246
|
var green = 0;
|
|
21494
21247
|
var blue = 0;
|
|
21248
|
+
|
|
21495
21249
|
if (huePrime >= 0 && huePrime < 1) {
|
|
21496
21250
|
red = chroma;
|
|
21497
21251
|
green = secondComponent;
|
|
@@ -21511,6 +21265,7 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
21511
21265
|
red = chroma;
|
|
21512
21266
|
blue = secondComponent;
|
|
21513
21267
|
}
|
|
21268
|
+
|
|
21514
21269
|
var lightnessModification = lightness - chroma / 2;
|
|
21515
21270
|
var finalRed = red + lightnessModification;
|
|
21516
21271
|
var finalGreen = green + lightnessModification;
|
|
@@ -21668,11 +21423,11 @@ var namedColorMap = {
|
|
|
21668
21423
|
yellow: 'ff0',
|
|
21669
21424
|
yellowgreen: '9acd32'
|
|
21670
21425
|
};
|
|
21671
|
-
|
|
21672
21426
|
/**
|
|
21673
21427
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
21674
21428
|
* @private
|
|
21675
21429
|
*/
|
|
21430
|
+
|
|
21676
21431
|
function nameToHex(color) {
|
|
21677
21432
|
if (typeof color !== 'string') return color;
|
|
21678
21433
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -21687,7 +21442,6 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
21687
21442
|
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
21688
21443
|
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
21689
21444
|
var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
21690
|
-
|
|
21691
21445
|
/**
|
|
21692
21446
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
21693
21447
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -21699,11 +21453,14 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
21699
21453
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
21700
21454
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
21701
21455
|
*/
|
|
21456
|
+
|
|
21702
21457
|
function parseToRgb(color) {
|
|
21703
21458
|
if (typeof color !== 'string') {
|
|
21704
21459
|
throw new PolishedError(3);
|
|
21705
21460
|
}
|
|
21461
|
+
|
|
21706
21462
|
var normalizedColor = nameToHex(color);
|
|
21463
|
+
|
|
21707
21464
|
if (normalizedColor.match(hexRegex)) {
|
|
21708
21465
|
return {
|
|
21709
21466
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -21711,6 +21468,7 @@ function parseToRgb(color) {
|
|
|
21711
21468
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
21712
21469
|
};
|
|
21713
21470
|
}
|
|
21471
|
+
|
|
21714
21472
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
21715
21473
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
21716
21474
|
return {
|
|
@@ -21720,6 +21478,7 @@ function parseToRgb(color) {
|
|
|
21720
21478
|
alpha: alpha
|
|
21721
21479
|
};
|
|
21722
21480
|
}
|
|
21481
|
+
|
|
21723
21482
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
21724
21483
|
return {
|
|
21725
21484
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -21727,8 +21486,10 @@ function parseToRgb(color) {
|
|
|
21727
21486
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
21728
21487
|
};
|
|
21729
21488
|
}
|
|
21489
|
+
|
|
21730
21490
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
21731
21491
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
21492
|
+
|
|
21732
21493
|
return {
|
|
21733
21494
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
21734
21495
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -21736,7 +21497,9 @@ function parseToRgb(color) {
|
|
|
21736
21497
|
alpha: _alpha
|
|
21737
21498
|
};
|
|
21738
21499
|
}
|
|
21500
|
+
|
|
21739
21501
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
21502
|
+
|
|
21740
21503
|
if (rgbMatched) {
|
|
21741
21504
|
return {
|
|
21742
21505
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -21744,7 +21507,9 @@ function parseToRgb(color) {
|
|
|
21744
21507
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
21745
21508
|
};
|
|
21746
21509
|
}
|
|
21510
|
+
|
|
21747
21511
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
21512
|
+
|
|
21748
21513
|
if (rgbaMatched) {
|
|
21749
21514
|
return {
|
|
21750
21515
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -21753,32 +21518,44 @@ function parseToRgb(color) {
|
|
|
21753
21518
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
21754
21519
|
};
|
|
21755
21520
|
}
|
|
21521
|
+
|
|
21756
21522
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
21523
|
+
|
|
21757
21524
|
if (hslMatched) {
|
|
21758
21525
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
21759
21526
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
21760
21527
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
21761
21528
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
21762
21529
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
21530
|
+
|
|
21763
21531
|
if (!hslRgbMatched) {
|
|
21764
21532
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
21765
21533
|
}
|
|
21534
|
+
|
|
21766
21535
|
return {
|
|
21767
21536
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
21768
21537
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
21769
21538
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
21770
21539
|
};
|
|
21771
21540
|
}
|
|
21541
|
+
|
|
21772
21542
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
21543
|
+
|
|
21773
21544
|
if (hslaMatched) {
|
|
21774
21545
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
21546
|
+
|
|
21775
21547
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
21548
|
+
|
|
21776
21549
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
21550
|
+
|
|
21777
21551
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
21552
|
+
|
|
21778
21553
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
21554
|
+
|
|
21779
21555
|
if (!_hslRgbMatched) {
|
|
21780
21556
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
21781
21557
|
}
|
|
21558
|
+
|
|
21782
21559
|
return {
|
|
21783
21560
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
21784
21561
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -21786,80 +21563,8 @@ function parseToRgb(color) {
|
|
|
21786
21563
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
21787
21564
|
};
|
|
21788
21565
|
}
|
|
21789
|
-
throw new PolishedError(5);
|
|
21790
|
-
}
|
|
21791
|
-
|
|
21792
|
-
function rgbToHsl(color) {
|
|
21793
|
-
// make sure rgb are contained in a set of [0, 255]
|
|
21794
|
-
var red = color.red / 255;
|
|
21795
|
-
var green = color.green / 255;
|
|
21796
|
-
var blue = color.blue / 255;
|
|
21797
|
-
var max = Math.max(red, green, blue);
|
|
21798
|
-
var min = Math.min(red, green, blue);
|
|
21799
|
-
var lightness = (max + min) / 2;
|
|
21800
|
-
if (max === min) {
|
|
21801
|
-
// achromatic
|
|
21802
|
-
if (color.alpha !== undefined) {
|
|
21803
|
-
return {
|
|
21804
|
-
hue: 0,
|
|
21805
|
-
saturation: 0,
|
|
21806
|
-
lightness: lightness,
|
|
21807
|
-
alpha: color.alpha
|
|
21808
|
-
};
|
|
21809
|
-
} else {
|
|
21810
|
-
return {
|
|
21811
|
-
hue: 0,
|
|
21812
|
-
saturation: 0,
|
|
21813
|
-
lightness: lightness
|
|
21814
|
-
};
|
|
21815
|
-
}
|
|
21816
|
-
}
|
|
21817
|
-
var hue;
|
|
21818
|
-
var delta = max - min;
|
|
21819
|
-
var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
21820
|
-
switch (max) {
|
|
21821
|
-
case red:
|
|
21822
|
-
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
21823
|
-
break;
|
|
21824
|
-
case green:
|
|
21825
|
-
hue = (blue - red) / delta + 2;
|
|
21826
|
-
break;
|
|
21827
|
-
default:
|
|
21828
|
-
// blue case
|
|
21829
|
-
hue = (red - green) / delta + 4;
|
|
21830
|
-
break;
|
|
21831
|
-
}
|
|
21832
|
-
hue *= 60;
|
|
21833
|
-
if (color.alpha !== undefined) {
|
|
21834
|
-
return {
|
|
21835
|
-
hue: hue,
|
|
21836
|
-
saturation: saturation,
|
|
21837
|
-
lightness: lightness,
|
|
21838
|
-
alpha: color.alpha
|
|
21839
|
-
};
|
|
21840
|
-
}
|
|
21841
|
-
return {
|
|
21842
|
-
hue: hue,
|
|
21843
|
-
saturation: saturation,
|
|
21844
|
-
lightness: lightness
|
|
21845
|
-
};
|
|
21846
|
-
}
|
|
21847
21566
|
|
|
21848
|
-
|
|
21849
|
-
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
21850
|
-
* if want to extract a color component. With the color util `toColorString` you
|
|
21851
|
-
* can convert a HslColor or HslaColor object back to a string.
|
|
21852
|
-
*
|
|
21853
|
-
* @example
|
|
21854
|
-
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
21855
|
-
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
21856
|
-
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
21857
|
-
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
21858
|
-
*/
|
|
21859
|
-
function parseToHsl(color) {
|
|
21860
|
-
// Note: At a later stage we can optimize this function as right now a hsl
|
|
21861
|
-
// color would be parsed converted to rgb values and converted back to hsl.
|
|
21862
|
-
return rgbToHsl(parseToRgb(color));
|
|
21567
|
+
throw new PolishedError(5);
|
|
21863
21568
|
}
|
|
21864
21569
|
|
|
21865
21570
|
/**
|
|
@@ -21870,8 +21575,10 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
21870
21575
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
21871
21576
|
return "#" + value[1] + value[3] + value[5];
|
|
21872
21577
|
}
|
|
21578
|
+
|
|
21873
21579
|
return value;
|
|
21874
21580
|
};
|
|
21581
|
+
|
|
21875
21582
|
var reduceHexValue$1 = reduceHexValue;
|
|
21876
21583
|
|
|
21877
21584
|
function numberToHex(value) {
|
|
@@ -21879,83 +21586,6 @@ function numberToHex(value) {
|
|
|
21879
21586
|
return hex.length === 1 ? "0" + hex : hex;
|
|
21880
21587
|
}
|
|
21881
21588
|
|
|
21882
|
-
function colorToHex(color) {
|
|
21883
|
-
return numberToHex(Math.round(color * 255));
|
|
21884
|
-
}
|
|
21885
|
-
function convertToHex(red, green, blue) {
|
|
21886
|
-
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
21887
|
-
}
|
|
21888
|
-
function hslToHex(hue, saturation, lightness) {
|
|
21889
|
-
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
21890
|
-
}
|
|
21891
|
-
|
|
21892
|
-
/**
|
|
21893
|
-
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
21894
|
-
*
|
|
21895
|
-
* @example
|
|
21896
|
-
* // Styles as object usage
|
|
21897
|
-
* const styles = {
|
|
21898
|
-
* background: hsl(359, 0.75, 0.4),
|
|
21899
|
-
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
21900
|
-
* }
|
|
21901
|
-
*
|
|
21902
|
-
* // styled-components usage
|
|
21903
|
-
* const div = styled.div`
|
|
21904
|
-
* background: ${hsl(359, 0.75, 0.4)};
|
|
21905
|
-
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
21906
|
-
* `
|
|
21907
|
-
*
|
|
21908
|
-
* // CSS in JS Output
|
|
21909
|
-
*
|
|
21910
|
-
* element {
|
|
21911
|
-
* background: "#b3191c";
|
|
21912
|
-
* background: "#b3191c";
|
|
21913
|
-
* }
|
|
21914
|
-
*/
|
|
21915
|
-
function hsl(value, saturation, lightness) {
|
|
21916
|
-
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
|
|
21917
|
-
return hslToHex(value, saturation, lightness);
|
|
21918
|
-
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
21919
|
-
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
21920
|
-
}
|
|
21921
|
-
throw new PolishedError(1);
|
|
21922
|
-
}
|
|
21923
|
-
|
|
21924
|
-
/**
|
|
21925
|
-
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
21926
|
-
*
|
|
21927
|
-
* @example
|
|
21928
|
-
* // Styles as object usage
|
|
21929
|
-
* const styles = {
|
|
21930
|
-
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
21931
|
-
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
21932
|
-
* background: hsla(359, 0.75, 0.4, 1),
|
|
21933
|
-
* }
|
|
21934
|
-
*
|
|
21935
|
-
* // styled-components usage
|
|
21936
|
-
* const div = styled.div`
|
|
21937
|
-
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
21938
|
-
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
21939
|
-
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
21940
|
-
* `
|
|
21941
|
-
*
|
|
21942
|
-
* // CSS in JS Output
|
|
21943
|
-
*
|
|
21944
|
-
* element {
|
|
21945
|
-
* background: "rgba(179,25,28,0.7)";
|
|
21946
|
-
* background: "rgba(179,25,28,0.7)";
|
|
21947
|
-
* background: "#b3191c";
|
|
21948
|
-
* }
|
|
21949
|
-
*/
|
|
21950
|
-
function hsla$1(value, saturation, lightness, alpha) {
|
|
21951
|
-
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
|
|
21952
|
-
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
21953
|
-
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
21954
|
-
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
21955
|
-
}
|
|
21956
|
-
throw new PolishedError(2);
|
|
21957
|
-
}
|
|
21958
|
-
|
|
21959
21589
|
/**
|
|
21960
21590
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
21961
21591
|
*
|
|
@@ -21985,6 +21615,7 @@ function rgb(value, green, blue) {
|
|
|
21985
21615
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
21986
21616
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
21987
21617
|
}
|
|
21618
|
+
|
|
21988
21619
|
throw new PolishedError(6);
|
|
21989
21620
|
}
|
|
21990
21621
|
|
|
@@ -22031,60 +21662,8 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
22031
21662
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
22032
21663
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
22033
21664
|
}
|
|
22034
|
-
throw new PolishedError(7);
|
|
22035
|
-
}
|
|
22036
|
-
|
|
22037
|
-
var isRgb = function isRgb(color) {
|
|
22038
|
-
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
22039
|
-
};
|
|
22040
|
-
var isRgba$1 = function isRgba(color) {
|
|
22041
|
-
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
|
|
22042
|
-
};
|
|
22043
|
-
var isHsl = function isHsl(color) {
|
|
22044
|
-
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
22045
|
-
};
|
|
22046
|
-
var isHsla$1 = function isHsla(color) {
|
|
22047
|
-
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
|
|
22048
|
-
};
|
|
22049
21665
|
|
|
22050
|
-
|
|
22051
|
-
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
22052
|
-
* This util is useful in case you only know on runtime which color object is
|
|
22053
|
-
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
22054
|
-
*
|
|
22055
|
-
* @example
|
|
22056
|
-
* // Styles as object usage
|
|
22057
|
-
* const styles = {
|
|
22058
|
-
* background: toColorString({ red: 255, green: 205, blue: 100 }),
|
|
22059
|
-
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
|
|
22060
|
-
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
|
|
22061
|
-
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
|
|
22062
|
-
* }
|
|
22063
|
-
*
|
|
22064
|
-
* // styled-components usage
|
|
22065
|
-
* const div = styled.div`
|
|
22066
|
-
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
22067
|
-
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
22068
|
-
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
22069
|
-
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
22070
|
-
* `
|
|
22071
|
-
*
|
|
22072
|
-
* // CSS in JS Output
|
|
22073
|
-
* element {
|
|
22074
|
-
* background: "#ffcd64";
|
|
22075
|
-
* background: "rgba(255,205,100,0.72)";
|
|
22076
|
-
* background: "#00f";
|
|
22077
|
-
* background: "rgba(179,25,25,0.72)";
|
|
22078
|
-
* }
|
|
22079
|
-
*/
|
|
22080
|
-
|
|
22081
|
-
function toColorString(color) {
|
|
22082
|
-
if (typeof color !== 'object') throw new PolishedError(8);
|
|
22083
|
-
if (isRgba$1(color)) return rgba$1(color);
|
|
22084
|
-
if (isRgb(color)) return rgb(color);
|
|
22085
|
-
if (isHsla$1(color)) return hsla$1(color);
|
|
22086
|
-
if (isHsl(color)) return hsl(color);
|
|
22087
|
-
throw new PolishedError(8);
|
|
21666
|
+
throw new PolishedError(7);
|
|
22088
21667
|
}
|
|
22089
21668
|
|
|
22090
21669
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
@@ -22097,156 +21676,14 @@ function curried(f, length, acc) {
|
|
|
22097
21676
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
22098
21677
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
22099
21678
|
};
|
|
22100
|
-
}
|
|
21679
|
+
} // eslint-disable-next-line no-redeclare
|
|
21680
|
+
|
|
22101
21681
|
|
|
22102
|
-
// eslint-disable-next-line no-redeclare
|
|
22103
21682
|
function curry(f) {
|
|
22104
21683
|
// eslint-disable-line no-redeclare
|
|
22105
21684
|
return curried(f, f.length, []);
|
|
22106
21685
|
}
|
|
22107
21686
|
|
|
22108
|
-
/**
|
|
22109
|
-
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
22110
|
-
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
22111
|
-
* the color wheel, always producing a positive hue value.
|
|
22112
|
-
*
|
|
22113
|
-
* @example
|
|
22114
|
-
* // Styles as object usage
|
|
22115
|
-
* const styles = {
|
|
22116
|
-
* background: adjustHue(180, '#448'),
|
|
22117
|
-
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
22118
|
-
* }
|
|
22119
|
-
*
|
|
22120
|
-
* // styled-components usage
|
|
22121
|
-
* const div = styled.div`
|
|
22122
|
-
* background: ${adjustHue(180, '#448')};
|
|
22123
|
-
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
22124
|
-
* `
|
|
22125
|
-
*
|
|
22126
|
-
* // CSS in JS Output
|
|
22127
|
-
* element {
|
|
22128
|
-
* background: "#888844";
|
|
22129
|
-
* background: "rgba(136,136,68,0.7)";
|
|
22130
|
-
* }
|
|
22131
|
-
*/
|
|
22132
|
-
function adjustHue(degree, color) {
|
|
22133
|
-
if (color === 'transparent') return color;
|
|
22134
|
-
var hslColor = parseToHsl(color);
|
|
22135
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
22136
|
-
hue: hslColor.hue + parseFloat(degree)
|
|
22137
|
-
}));
|
|
22138
|
-
}
|
|
22139
|
-
|
|
22140
|
-
// prettier-ignore
|
|
22141
|
-
var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
|
|
22142
|
-
|
|
22143
|
-
function guard(lowerBoundary, upperBoundary, value) {
|
|
22144
|
-
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
22145
|
-
}
|
|
22146
|
-
|
|
22147
|
-
/**
|
|
22148
|
-
* Returns a string value for the darkened color.
|
|
22149
|
-
*
|
|
22150
|
-
* @example
|
|
22151
|
-
* // Styles as object usage
|
|
22152
|
-
* const styles = {
|
|
22153
|
-
* background: darken(0.2, '#FFCD64'),
|
|
22154
|
-
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
22155
|
-
* }
|
|
22156
|
-
*
|
|
22157
|
-
* // styled-components usage
|
|
22158
|
-
* const div = styled.div`
|
|
22159
|
-
* background: ${darken(0.2, '#FFCD64')};
|
|
22160
|
-
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
22161
|
-
* `
|
|
22162
|
-
*
|
|
22163
|
-
* // CSS in JS Output
|
|
22164
|
-
*
|
|
22165
|
-
* element {
|
|
22166
|
-
* background: "#ffbd31";
|
|
22167
|
-
* background: "rgba(255,189,49,0.7)";
|
|
22168
|
-
* }
|
|
22169
|
-
*/
|
|
22170
|
-
function darken(amount, color) {
|
|
22171
|
-
if (color === 'transparent') return color;
|
|
22172
|
-
var hslColor = parseToHsl(color);
|
|
22173
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
22174
|
-
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
|
|
22175
|
-
}));
|
|
22176
|
-
}
|
|
22177
|
-
|
|
22178
|
-
// prettier-ignore
|
|
22179
|
-
var curriedDarken = curry /* ::<number | string, string, string> */(darken);
|
|
22180
|
-
|
|
22181
|
-
/**
|
|
22182
|
-
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
22183
|
-
* argument of the desaturate function is the amount by how much the color
|
|
22184
|
-
* intensity should be decreased.
|
|
22185
|
-
*
|
|
22186
|
-
* @example
|
|
22187
|
-
* // Styles as object usage
|
|
22188
|
-
* const styles = {
|
|
22189
|
-
* background: desaturate(0.2, '#CCCD64'),
|
|
22190
|
-
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
22191
|
-
* }
|
|
22192
|
-
*
|
|
22193
|
-
* // styled-components usage
|
|
22194
|
-
* const div = styled.div`
|
|
22195
|
-
* background: ${desaturate(0.2, '#CCCD64')};
|
|
22196
|
-
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
22197
|
-
* `
|
|
22198
|
-
*
|
|
22199
|
-
* // CSS in JS Output
|
|
22200
|
-
* element {
|
|
22201
|
-
* background: "#b8b979";
|
|
22202
|
-
* background: "rgba(184,185,121,0.7)";
|
|
22203
|
-
* }
|
|
22204
|
-
*/
|
|
22205
|
-
function desaturate(amount, color) {
|
|
22206
|
-
if (color === 'transparent') return color;
|
|
22207
|
-
var hslColor = parseToHsl(color);
|
|
22208
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
22209
|
-
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
|
|
22210
|
-
}));
|
|
22211
|
-
}
|
|
22212
|
-
|
|
22213
|
-
// prettier-ignore
|
|
22214
|
-
var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
|
|
22215
|
-
|
|
22216
|
-
/**
|
|
22217
|
-
* Returns a string value for the lightened color.
|
|
22218
|
-
*
|
|
22219
|
-
* @example
|
|
22220
|
-
* // Styles as object usage
|
|
22221
|
-
* const styles = {
|
|
22222
|
-
* background: lighten(0.2, '#CCCD64'),
|
|
22223
|
-
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
22224
|
-
* }
|
|
22225
|
-
*
|
|
22226
|
-
* // styled-components usage
|
|
22227
|
-
* const div = styled.div`
|
|
22228
|
-
* background: ${lighten(0.2, '#FFCD64')};
|
|
22229
|
-
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
22230
|
-
* `
|
|
22231
|
-
*
|
|
22232
|
-
* // CSS in JS Output
|
|
22233
|
-
*
|
|
22234
|
-
* element {
|
|
22235
|
-
* background: "#e5e6b1";
|
|
22236
|
-
* background: "rgba(229,230,177,0.7)";
|
|
22237
|
-
* }
|
|
22238
|
-
*/
|
|
22239
|
-
function lighten(amount, color) {
|
|
22240
|
-
if (color === 'transparent') return color;
|
|
22241
|
-
var hslColor = parseToHsl(color);
|
|
22242
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
22243
|
-
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
|
|
22244
|
-
}));
|
|
22245
|
-
}
|
|
22246
|
-
|
|
22247
|
-
// prettier-ignore
|
|
22248
|
-
var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
22249
|
-
|
|
22250
21687
|
/**
|
|
22251
21688
|
* Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
|
|
22252
21689
|
*
|
|
@@ -22273,21 +21710,25 @@ var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
|
22273
21710
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
22274
21711
|
* }
|
|
22275
21712
|
*/
|
|
21713
|
+
|
|
22276
21714
|
function mix$1(weight, color, otherColor) {
|
|
22277
21715
|
if (color === 'transparent') return otherColor;
|
|
22278
21716
|
if (otherColor === 'transparent') return color;
|
|
22279
21717
|
if (weight === 0) return otherColor;
|
|
22280
21718
|
var parsedColor1 = parseToRgb(color);
|
|
21719
|
+
|
|
22281
21720
|
var color1 = _extends$1({}, parsedColor1, {
|
|
22282
21721
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
22283
21722
|
});
|
|
21723
|
+
|
|
22284
21724
|
var parsedColor2 = parseToRgb(otherColor);
|
|
21725
|
+
|
|
22285
21726
|
var color2 = _extends$1({}, parsedColor2, {
|
|
22286
21727
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
22287
|
-
});
|
|
22288
|
-
|
|
22289
|
-
// The formula is copied from the original Sass implementation:
|
|
21728
|
+
}); // The formula is copied from the original Sass implementation:
|
|
22290
21729
|
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
21730
|
+
|
|
21731
|
+
|
|
22291
21732
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
22292
21733
|
var x = parseFloat(weight) * 2 - 1;
|
|
22293
21734
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -22301,217 +21742,13 @@ function mix$1(weight, color, otherColor) {
|
|
|
22301
21742
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
22302
21743
|
};
|
|
22303
21744
|
return rgba$1(mixedColor);
|
|
22304
|
-
}
|
|
22305
|
-
|
|
22306
|
-
// prettier-ignore
|
|
22307
|
-
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
22308
|
-
var mix$1$1 = curriedMix;
|
|
22309
|
-
|
|
22310
|
-
/**
|
|
22311
|
-
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
22312
|
-
*
|
|
22313
|
-
*
|
|
22314
|
-
* @example
|
|
22315
|
-
* // Styles as object usage
|
|
22316
|
-
* const styles = {
|
|
22317
|
-
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
22318
|
-
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
22319
|
-
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
22320
|
-
* }
|
|
22321
|
-
*
|
|
22322
|
-
* // styled-components usage
|
|
22323
|
-
* const div = styled.div`
|
|
22324
|
-
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
22325
|
-
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
22326
|
-
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
22327
|
-
* `
|
|
22328
|
-
*
|
|
22329
|
-
* // CSS in JS Output
|
|
22330
|
-
*
|
|
22331
|
-
* element {
|
|
22332
|
-
* background: "#fff";
|
|
22333
|
-
* background: "rgba(255,255,255,0.7)";
|
|
22334
|
-
* background: "rgba(255,0,0,0.7)";
|
|
22335
|
-
* }
|
|
22336
|
-
*/
|
|
22337
|
-
function opacify(amount, color) {
|
|
22338
|
-
if (color === 'transparent') return color;
|
|
22339
|
-
var parsedColor = parseToRgb(color);
|
|
22340
|
-
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
22341
|
-
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
22342
|
-
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
22343
|
-
});
|
|
22344
|
-
return rgba$1(colorWithAlpha);
|
|
22345
|
-
}
|
|
22346
|
-
|
|
22347
|
-
// prettier-ignore
|
|
22348
|
-
var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
|
|
22349
|
-
|
|
22350
|
-
/**
|
|
22351
|
-
* Increases the intensity of a color. Its range is between 0 to 1. The first
|
|
22352
|
-
* argument of the saturate function is the amount by how much the color
|
|
22353
|
-
* intensity should be increased.
|
|
22354
|
-
*
|
|
22355
|
-
* @example
|
|
22356
|
-
* // Styles as object usage
|
|
22357
|
-
* const styles = {
|
|
22358
|
-
* background: saturate(0.2, '#CCCD64'),
|
|
22359
|
-
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
22360
|
-
* }
|
|
22361
|
-
*
|
|
22362
|
-
* // styled-components usage
|
|
22363
|
-
* const div = styled.div`
|
|
22364
|
-
* background: ${saturate(0.2, '#FFCD64')};
|
|
22365
|
-
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
22366
|
-
* `
|
|
22367
|
-
*
|
|
22368
|
-
* // CSS in JS Output
|
|
22369
|
-
*
|
|
22370
|
-
* element {
|
|
22371
|
-
* background: "#e0e250";
|
|
22372
|
-
* background: "rgba(224,226,80,0.7)";
|
|
22373
|
-
* }
|
|
22374
|
-
*/
|
|
22375
|
-
function saturate(amount, color) {
|
|
22376
|
-
if (color === 'transparent') return color;
|
|
22377
|
-
var hslColor = parseToHsl(color);
|
|
22378
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
22379
|
-
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
|
|
22380
|
-
}));
|
|
22381
|
-
}
|
|
22382
|
-
|
|
22383
|
-
// prettier-ignore
|
|
22384
|
-
var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
|
|
22385
|
-
|
|
22386
|
-
/**
|
|
22387
|
-
* Sets the hue of a color to the provided value. The hue range can be
|
|
22388
|
-
* from 0 and 359.
|
|
22389
|
-
*
|
|
22390
|
-
* @example
|
|
22391
|
-
* // Styles as object usage
|
|
22392
|
-
* const styles = {
|
|
22393
|
-
* background: setHue(42, '#CCCD64'),
|
|
22394
|
-
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
22395
|
-
* }
|
|
22396
|
-
*
|
|
22397
|
-
* // styled-components usage
|
|
22398
|
-
* const div = styled.div`
|
|
22399
|
-
* background: ${setHue(42, '#CCCD64')};
|
|
22400
|
-
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
22401
|
-
* `
|
|
22402
|
-
*
|
|
22403
|
-
* // CSS in JS Output
|
|
22404
|
-
* element {
|
|
22405
|
-
* background: "#cdae64";
|
|
22406
|
-
* background: "rgba(107,100,205,0.7)";
|
|
22407
|
-
* }
|
|
22408
|
-
*/
|
|
22409
|
-
function setHue(hue, color) {
|
|
22410
|
-
if (color === 'transparent') return color;
|
|
22411
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
22412
|
-
hue: parseFloat(hue)
|
|
22413
|
-
}));
|
|
22414
|
-
}
|
|
22415
|
-
|
|
22416
|
-
// prettier-ignore
|
|
22417
|
-
var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
|
|
22418
|
-
|
|
22419
|
-
/**
|
|
22420
|
-
* Sets the lightness of a color to the provided value. The lightness range can be
|
|
22421
|
-
* from 0 and 1.
|
|
22422
|
-
*
|
|
22423
|
-
* @example
|
|
22424
|
-
* // Styles as object usage
|
|
22425
|
-
* const styles = {
|
|
22426
|
-
* background: setLightness(0.2, '#CCCD64'),
|
|
22427
|
-
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
22428
|
-
* }
|
|
22429
|
-
*
|
|
22430
|
-
* // styled-components usage
|
|
22431
|
-
* const div = styled.div`
|
|
22432
|
-
* background: ${setLightness(0.2, '#CCCD64')};
|
|
22433
|
-
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
22434
|
-
* `
|
|
22435
|
-
*
|
|
22436
|
-
* // CSS in JS Output
|
|
22437
|
-
* element {
|
|
22438
|
-
* background: "#4d4d19";
|
|
22439
|
-
* background: "rgba(223,224,159,0.7)";
|
|
22440
|
-
* }
|
|
22441
|
-
*/
|
|
22442
|
-
function setLightness(lightness, color) {
|
|
22443
|
-
if (color === 'transparent') return color;
|
|
22444
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
22445
|
-
lightness: parseFloat(lightness)
|
|
22446
|
-
}));
|
|
22447
|
-
}
|
|
22448
|
-
|
|
22449
|
-
// prettier-ignore
|
|
22450
|
-
var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
|
|
22451
|
-
|
|
22452
|
-
/**
|
|
22453
|
-
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
22454
|
-
* from 0 and 1.
|
|
22455
|
-
*
|
|
22456
|
-
* @example
|
|
22457
|
-
* // Styles as object usage
|
|
22458
|
-
* const styles = {
|
|
22459
|
-
* background: setSaturation(0.2, '#CCCD64'),
|
|
22460
|
-
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
22461
|
-
* }
|
|
22462
|
-
*
|
|
22463
|
-
* // styled-components usage
|
|
22464
|
-
* const div = styled.div`
|
|
22465
|
-
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
22466
|
-
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
22467
|
-
* `
|
|
22468
|
-
*
|
|
22469
|
-
* // CSS in JS Output
|
|
22470
|
-
* element {
|
|
22471
|
-
* background: "#adad84";
|
|
22472
|
-
* background: "rgba(228,229,76,0.7)";
|
|
22473
|
-
* }
|
|
22474
|
-
*/
|
|
22475
|
-
function setSaturation(saturation, color) {
|
|
22476
|
-
if (color === 'transparent') return color;
|
|
22477
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
22478
|
-
saturation: parseFloat(saturation)
|
|
22479
|
-
}));
|
|
22480
|
-
}
|
|
21745
|
+
} // prettier-ignore
|
|
22481
21746
|
|
|
22482
|
-
// prettier-ignore
|
|
22483
|
-
var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
|
|
22484
21747
|
|
|
22485
|
-
|
|
22486
|
-
|
|
22487
|
-
|
|
22488
|
-
|
|
22489
|
-
*
|
|
22490
|
-
* @example
|
|
22491
|
-
* // Styles as object usage
|
|
22492
|
-
* const styles = {
|
|
22493
|
-
* background: shade(0.25, '#00f')
|
|
22494
|
-
* }
|
|
22495
|
-
*
|
|
22496
|
-
* // styled-components usage
|
|
22497
|
-
* const div = styled.div`
|
|
22498
|
-
* background: ${shade(0.25, '#00f')};
|
|
22499
|
-
* `
|
|
22500
|
-
*
|
|
22501
|
-
* // CSS in JS Output
|
|
22502
|
-
*
|
|
22503
|
-
* element {
|
|
22504
|
-
* background: "#00003f";
|
|
22505
|
-
* }
|
|
22506
|
-
*/
|
|
22507
|
-
|
|
22508
|
-
function shade(percentage, color) {
|
|
22509
|
-
if (color === 'transparent') return color;
|
|
22510
|
-
return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
|
|
22511
|
-
}
|
|
22512
|
-
|
|
22513
|
-
// prettier-ignore
|
|
22514
|
-
var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
21748
|
+
var curriedMix = /*#__PURE__*/curry
|
|
21749
|
+
/* ::<number | string, string, string, string> */
|
|
21750
|
+
(mix$1);
|
|
21751
|
+
var mix$1$1 = curriedMix;
|
|
22515
21752
|
|
|
22516
21753
|
/**
|
|
22517
21754
|
* Tints a color by mixing it with white. `tint` can produce
|
|
@@ -22539,51 +21776,13 @@ var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
|
22539
21776
|
function tint(percentage, color) {
|
|
22540
21777
|
if (color === 'transparent') return color;
|
|
22541
21778
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
22542
|
-
}
|
|
21779
|
+
} // prettier-ignore
|
|
22543
21780
|
|
|
22544
|
-
// prettier-ignore
|
|
22545
|
-
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
22546
|
-
var curriedTint$1 = curriedTint;
|
|
22547
21781
|
|
|
22548
|
-
|
|
22549
|
-
|
|
22550
|
-
|
|
22551
|
-
|
|
22552
|
-
* @example
|
|
22553
|
-
* // Styles as object usage
|
|
22554
|
-
* const styles = {
|
|
22555
|
-
* background: transparentize(0.1, '#fff'),
|
|
22556
|
-
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
22557
|
-
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
22558
|
-
* }
|
|
22559
|
-
*
|
|
22560
|
-
* // styled-components usage
|
|
22561
|
-
* const div = styled.div`
|
|
22562
|
-
* background: ${transparentize(0.1, '#fff')};
|
|
22563
|
-
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
22564
|
-
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
22565
|
-
* `
|
|
22566
|
-
*
|
|
22567
|
-
* // CSS in JS Output
|
|
22568
|
-
*
|
|
22569
|
-
* element {
|
|
22570
|
-
* background: "rgba(255,255,255,0.9)";
|
|
22571
|
-
* background: "rgba(255,255,255,0.8)";
|
|
22572
|
-
* background: "rgba(255,0,0,0.3)";
|
|
22573
|
-
* }
|
|
22574
|
-
*/
|
|
22575
|
-
function transparentize(amount, color) {
|
|
22576
|
-
if (color === 'transparent') return color;
|
|
22577
|
-
var parsedColor = parseToRgb(color);
|
|
22578
|
-
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
22579
|
-
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
22580
|
-
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
22581
|
-
});
|
|
22582
|
-
return rgba$1(colorWithAlpha);
|
|
22583
|
-
}
|
|
22584
|
-
|
|
22585
|
-
// prettier-ignore
|
|
22586
|
-
var curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);
|
|
21782
|
+
var curriedTint = /*#__PURE__*/curry
|
|
21783
|
+
/* ::<number | string, string, string> */
|
|
21784
|
+
(tint);
|
|
21785
|
+
var curriedTint$1 = curriedTint;
|
|
22587
21786
|
|
|
22588
21787
|
var linkColor = MATISSE_BLUE;
|
|
22589
21788
|
var fallbackValues$8 = {
|
|
@@ -22718,6 +21917,8 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
22718
21917
|
extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
|
|
22719
21918
|
_ref$variant = _ref.variant,
|
|
22720
21919
|
variant = _ref$variant === void 0 ? "primary" : _ref$variant,
|
|
21920
|
+
_ref$containerTabInde = _ref.containerTabIndex,
|
|
21921
|
+
containerTabIndex = _ref$containerTabInde === void 0 ? "-1" : _ref$containerTabInde,
|
|
22721
21922
|
_ref$tabIndex = _ref.tabIndex,
|
|
22722
21923
|
tabIndex = _ref$tabIndex === void 0 ? "0" : _ref$tabIndex,
|
|
22723
21924
|
dataQa = _ref.dataQa,
|
|
@@ -22725,7 +21926,21 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
22725
21926
|
children = _ref.children;
|
|
22726
21927
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
22727
21928
|
var themeValues = createThemeValues(themeContext, fallbackValues$a, "Link", variant);
|
|
22728
|
-
|
|
21929
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
21930
|
+
// This is to address an issue on Safari where the link's tab order and Enter key were not being recognized
|
|
21931
|
+
if (event.key === "Enter" || event.keyCode === 13) {
|
|
21932
|
+
if (newTab) {
|
|
21933
|
+
window.open(href, "_blank");
|
|
21934
|
+
} else {
|
|
21935
|
+
window.location.href = href;
|
|
21936
|
+
}
|
|
21937
|
+
}
|
|
21938
|
+
};
|
|
21939
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
21940
|
+
padding: "0",
|
|
21941
|
+
tabIndex: containerTabIndex,
|
|
21942
|
+
onKeyDown: handleKeyDown
|
|
21943
|
+
}, /*#__PURE__*/React__default.createElement(StyledExternalLink, {
|
|
22729
21944
|
href: href,
|
|
22730
21945
|
target: newTab ? "_blank" : "",
|
|
22731
21946
|
color: themeValues.externalLinkColor,
|
|
@@ -22741,7 +21956,7 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
22741
21956
|
"data-qa": dataQa,
|
|
22742
21957
|
"aria-label": ariaLabel,
|
|
22743
21958
|
ref: ref
|
|
22744
|
-
}, safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
|
|
21959
|
+
}, safeChildren(children, /*#__PURE__*/React__default.createElement("span", null))));
|
|
22745
21960
|
});
|
|
22746
21961
|
|
|
22747
21962
|
var _excluded$s = ["hoverColor", "activeColor", "active", "color", "extrastyles"];
|
|
@@ -23887,19 +23102,32 @@ var toIndexedObject = function (it) {
|
|
|
23887
23102
|
return indexedObject(requireObjectCoercible(it));
|
|
23888
23103
|
};
|
|
23889
23104
|
|
|
23890
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23891
23105
|
var documentAll = typeof document == 'object' && document.all;
|
|
23892
23106
|
|
|
23107
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23108
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
23109
|
+
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
23110
|
+
|
|
23111
|
+
var documentAll_1 = {
|
|
23112
|
+
all: documentAll,
|
|
23113
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
23114
|
+
};
|
|
23115
|
+
|
|
23116
|
+
var documentAll$1 = documentAll_1.all;
|
|
23117
|
+
|
|
23893
23118
|
// `IsCallable` abstract operation
|
|
23894
23119
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
23895
|
-
|
|
23896
|
-
|
|
23897
|
-
return typeof argument == 'function' || argument === documentAll;
|
|
23120
|
+
var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
|
|
23121
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
23898
23122
|
} : function (argument) {
|
|
23899
23123
|
return typeof argument == 'function';
|
|
23900
23124
|
};
|
|
23901
23125
|
|
|
23902
|
-
var
|
|
23126
|
+
var documentAll$2 = documentAll_1.all;
|
|
23127
|
+
|
|
23128
|
+
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
23129
|
+
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
23130
|
+
} : function (it) {
|
|
23903
23131
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
23904
23132
|
};
|
|
23905
23133
|
|
|
@@ -24035,10 +23263,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
24035
23263
|
(module.exports = function (key, value) {
|
|
24036
23264
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
24037
23265
|
})('versions', []).push({
|
|
24038
|
-
version: '3.
|
|
23266
|
+
version: '3.33.3',
|
|
24039
23267
|
mode: 'global',
|
|
24040
|
-
copyright: '© 2014-
|
|
24041
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
23268
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
23269
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
|
|
24042
23270
|
source: 'https://github.com/zloirock/core-js'
|
|
24043
23271
|
});
|
|
24044
23272
|
});
|
|
@@ -24335,7 +23563,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
24335
23563
|
|
|
24336
23564
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
24337
23565
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
24338
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23566
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
24339
23567
|
}
|
|
24340
23568
|
if (options && options.getter) name = 'get ' + name;
|
|
24341
23569
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -24423,8 +23651,7 @@ var min$1 = Math.min;
|
|
|
24423
23651
|
// `ToLength` abstract operation
|
|
24424
23652
|
// https://tc39.es/ecma262/#sec-tolength
|
|
24425
23653
|
var toLength = function (argument) {
|
|
24426
|
-
|
|
24427
|
-
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23654
|
+
return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
24428
23655
|
};
|
|
24429
23656
|
|
|
24430
23657
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -24584,7 +23811,7 @@ var _export = function (options, source) {
|
|
|
24584
23811
|
} else if (STATIC) {
|
|
24585
23812
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
24586
23813
|
} else {
|
|
24587
|
-
target = global_1[TARGET]
|
|
23814
|
+
target = (global_1[TARGET] || {}).prototype;
|
|
24588
23815
|
}
|
|
24589
23816
|
if (target) for (key in source) {
|
|
24590
23817
|
sourceProperty = source[key];
|
|
@@ -24847,15 +24074,11 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
24847
24074
|
} catch (error) { /* empty */ }
|
|
24848
24075
|
};
|
|
24849
24076
|
|
|
24850
|
-
var isPossiblePrototype = function (argument) {
|
|
24851
|
-
return isObject(argument) || argument === null;
|
|
24852
|
-
};
|
|
24853
|
-
|
|
24854
24077
|
var $String$4 = String;
|
|
24855
24078
|
var $TypeError$6 = TypeError;
|
|
24856
24079
|
|
|
24857
24080
|
var aPossiblePrototype = function (argument) {
|
|
24858
|
-
if (
|
|
24081
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
24859
24082
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
24860
24083
|
};
|
|
24861
24084
|
|
|
@@ -45747,6 +44970,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45747
44970
|
}))) : /*#__PURE__*/React__default.createElement(Box, {
|
|
45748
44971
|
padding: "0.5rem"
|
|
45749
44972
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
44973
|
+
tabIndex: "0",
|
|
45750
44974
|
action: hideModal,
|
|
45751
44975
|
variant: "primary",
|
|
45752
44976
|
text: closeButtonText,
|