@thecb/components 10.6.10-beta.1 → 10.7.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +807 -561
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +806 -560
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/molecules/.DS_Store +0 -0
- package/src/components/molecules/obligation/.DS_Store +0 -0
- package/src/components/molecules/obligation/Obligation.js +6 -2
- package/src/components/molecules/obligation/Obligation.theme.js +7 -0
- package/src/components/molecules/obligation/modules/AmountModule.js +1 -1
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +11 -11
- package/src/components/molecules/obligation/modules/IconModule.js +3 -7
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +1 -1
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +2 -4
- package/src/components/molecules/reset-confirmation-form/ResetConfirmationForm.js +3 -15
- package/src/components/molecules/reset-password-success/ResetPasswordSuccess.js +5 -17
- package/src/stories/Button.stories.ts +53 -0
- package/src/stories/Button.tsx +48 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.ts +33 -0
- package/src/stories/Header.tsx +56 -0
- package/src/stories/Page.stories.ts +32 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +5 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +15 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +3 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +12 -0
- package/src/stories/assets/youtube.svg +4 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +69 -0
- package/src/components/molecules/obligation/modules/AutopayModalModule.theme.js +0 -20
- package/src/components/molecules/reset-confirmation-form/ResetConfirmatForm.theme.js +0 -9
- package/src/components/molecules/reset-password-success/ResetPasswordSuccess.theme.js +0 -9
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) {
|
|
@@ -7240,104 +7078,6 @@ var Imposter = function Imposter(_ref) {
|
|
|
7240
7078
|
}, rest), safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
7241
7079
|
};
|
|
7242
7080
|
|
|
7243
|
-
/*! *****************************************************************************
|
|
7244
|
-
Copyright (c) Microsoft Corporation.
|
|
7245
|
-
|
|
7246
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7247
|
-
purpose with or without fee is hereby granted.
|
|
7248
|
-
|
|
7249
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7250
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7251
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7252
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7253
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7254
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7255
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
7256
|
-
***************************************************************************** */
|
|
7257
|
-
/* global Reflect, Promise */
|
|
7258
|
-
|
|
7259
|
-
var extendStatics$2 = function(d, b) {
|
|
7260
|
-
extendStatics$2 = Object.setPrototypeOf ||
|
|
7261
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7262
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7263
|
-
return extendStatics$2(d, b);
|
|
7264
|
-
};
|
|
7265
|
-
|
|
7266
|
-
function __extends$2(d, b) {
|
|
7267
|
-
extendStatics$2(d, b);
|
|
7268
|
-
function __() { this.constructor = d; }
|
|
7269
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
7270
|
-
}
|
|
7271
|
-
|
|
7272
|
-
var __assign$7 = function() {
|
|
7273
|
-
__assign$7 = Object.assign || function __assign(t) {
|
|
7274
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7275
|
-
s = arguments[i];
|
|
7276
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7277
|
-
}
|
|
7278
|
-
return t;
|
|
7279
|
-
};
|
|
7280
|
-
return __assign$7.apply(this, arguments);
|
|
7281
|
-
};
|
|
7282
|
-
|
|
7283
|
-
function __rest$5(s, e) {
|
|
7284
|
-
var t = {};
|
|
7285
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7286
|
-
t[p] = s[p];
|
|
7287
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7288
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7289
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7290
|
-
t[p[i]] = s[p[i]];
|
|
7291
|
-
}
|
|
7292
|
-
return t;
|
|
7293
|
-
}
|
|
7294
|
-
|
|
7295
|
-
function __spreadArrays$2() {
|
|
7296
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
7297
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
7298
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
7299
|
-
r[k] = a[j];
|
|
7300
|
-
return r;
|
|
7301
|
-
}
|
|
7302
|
-
|
|
7303
|
-
/*! *****************************************************************************
|
|
7304
|
-
Copyright (c) Microsoft Corporation.
|
|
7305
|
-
|
|
7306
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7307
|
-
purpose with or without fee is hereby granted.
|
|
7308
|
-
|
|
7309
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7310
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7311
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7312
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7313
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7314
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7315
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
7316
|
-
***************************************************************************** */
|
|
7317
|
-
|
|
7318
|
-
var __assign$8 = function() {
|
|
7319
|
-
__assign$8 = Object.assign || function __assign(t) {
|
|
7320
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7321
|
-
s = arguments[i];
|
|
7322
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7323
|
-
}
|
|
7324
|
-
return t;
|
|
7325
|
-
};
|
|
7326
|
-
return __assign$8.apply(this, arguments);
|
|
7327
|
-
};
|
|
7328
|
-
|
|
7329
|
-
function __rest$6(s, e) {
|
|
7330
|
-
var t = {};
|
|
7331
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7332
|
-
t[p] = s[p];
|
|
7333
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7334
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7335
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7336
|
-
t[p[i]] = s[p[i]];
|
|
7337
|
-
}
|
|
7338
|
-
return t;
|
|
7339
|
-
}
|
|
7340
|
-
|
|
7341
7081
|
var Observer$1 = /*#__PURE__*/function () {
|
|
7342
7082
|
function Observer(_a, observer) {
|
|
7343
7083
|
var _this = this;
|
|
@@ -7400,18 +7140,18 @@ var Action$1 = /*#__PURE__*/function () {
|
|
|
7400
7140
|
};
|
|
7401
7141
|
var _a = this.props,
|
|
7402
7142
|
init = _a.init,
|
|
7403
|
-
observerProps = __rest
|
|
7143
|
+
observerProps = __rest(_a, ["init"]);
|
|
7404
7144
|
var observer = createObserver$1(observerCandidate, observerProps, function () {
|
|
7405
7145
|
isComplete = true;
|
|
7406
7146
|
subscription.stop();
|
|
7407
7147
|
});
|
|
7408
7148
|
var api = init(observer);
|
|
7409
|
-
subscription = api ? __assign
|
|
7149
|
+
subscription = api ? __assign({}, subscription, api) : subscription;
|
|
7410
7150
|
if (isComplete) subscription.stop();
|
|
7411
7151
|
return subscription;
|
|
7412
7152
|
};
|
|
7413
7153
|
Action.prototype.applyMiddleware = function (middleware) {
|
|
7414
|
-
return this.create(__assign
|
|
7154
|
+
return this.create(__assign({}, this.props, { middleware: this.props.middleware ? [middleware].concat(this.props.middleware) : [middleware] }));
|
|
7415
7155
|
};
|
|
7416
7156
|
Action.prototype.pipe = function () {
|
|
7417
7157
|
var funcs = [];
|
|
@@ -7464,18 +7204,18 @@ var createAction$1 = function (action, props) {
|
|
|
7464
7204
|
var createUnitAction$1 = function (action, _a) {
|
|
7465
7205
|
var from = _a.from,
|
|
7466
7206
|
to = _a.to,
|
|
7467
|
-
props = __rest
|
|
7207
|
+
props = __rest(_a, ["from", "to"]);
|
|
7468
7208
|
var unitType = findUnitType$1(from) || findUnitType$1(to);
|
|
7469
7209
|
var transform = unitType.transform,
|
|
7470
7210
|
parse = unitType.parse;
|
|
7471
|
-
return action(__assign
|
|
7211
|
+
return action(__assign({}, props, { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
7472
7212
|
};
|
|
7473
7213
|
var createMixerAction$1 = function (mixer) {
|
|
7474
7214
|
return function (action, _a) {
|
|
7475
7215
|
var from = _a.from,
|
|
7476
7216
|
to = _a.to,
|
|
7477
|
-
props = __rest
|
|
7478
|
-
return action(__assign
|
|
7217
|
+
props = __rest(_a, ["from", "to"]);
|
|
7218
|
+
return action(__assign({}, props, { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
7479
7219
|
};
|
|
7480
7220
|
};
|
|
7481
7221
|
var createColorAction$1 = /*#__PURE__*/createMixerAction$1(mixColor);
|
|
@@ -7688,7 +7428,7 @@ var inertia = function (_a) {
|
|
|
7688
7428
|
};
|
|
7689
7429
|
var startSpring = function (props) {
|
|
7690
7430
|
isSpring = true;
|
|
7691
|
-
startAnimation(vectorSpring$1(__assign
|
|
7431
|
+
startAnimation(vectorSpring$1(__assign({}, props, { to: isLessThanMin(props.from) ? min : max, stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta })));
|
|
7692
7432
|
};
|
|
7693
7433
|
if (isOutOfBounds(from)) {
|
|
7694
7434
|
startSpring({ from: from, velocity: velocity });
|
|
@@ -7920,7 +7660,7 @@ var keyframes$1 = function (_a) {
|
|
|
7920
7660
|
ease = _b === void 0 ? linear : _b,
|
|
7921
7661
|
times = _a.times,
|
|
7922
7662
|
values = _a.values,
|
|
7923
|
-
tweenProps = __rest
|
|
7663
|
+
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
7924
7664
|
easings = Array.isArray(easings) ? easings : defaultEasings$1(values, easings);
|
|
7925
7665
|
times = times || defaultTimings$1(values);
|
|
7926
7666
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -7930,7 +7670,7 @@ var keyframes$1 = function (_a) {
|
|
|
7930
7670
|
ease: easing
|
|
7931
7671
|
});
|
|
7932
7672
|
});
|
|
7933
|
-
return tween$1(__assign
|
|
7673
|
+
return tween$1(__assign({}, tweenProps, { ease: ease })).applyMiddleware(function (update) {
|
|
7934
7674
|
return interpolateScrubbers$1(times, scrubbers, update);
|
|
7935
7675
|
});
|
|
7936
7676
|
};
|
|
@@ -8132,7 +7872,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
8132
7872
|
*/
|
|
8133
7873
|
MotionValue.prototype.addChild = function (config) {
|
|
8134
7874
|
if (config === void 0) { config = {}; }
|
|
8135
|
-
var child = new MotionValue(this.current, __assign
|
|
7875
|
+
var child = new MotionValue(this.current, __assign({ parent: this }, config));
|
|
8136
7876
|
if (!this.children)
|
|
8137
7877
|
this.children = new Set();
|
|
8138
7878
|
this.children.add(child);
|
|
@@ -8574,7 +8314,7 @@ var buildStyleAttr = function (values, styleProp, isStatic) {
|
|
|
8574
8314
|
? transformTemplate({}, styleProp.transform)
|
|
8575
8315
|
: transformTemplate;
|
|
8576
8316
|
}
|
|
8577
|
-
return buildStyleProperty(__assign
|
|
8317
|
+
return buildStyleProperty(__assign(__assign({}, styleProp), motionValueStyles), !isStatic);
|
|
8578
8318
|
};
|
|
8579
8319
|
var useMotionStyles = function (values, styleProp, isStatic, transformValues) {
|
|
8580
8320
|
if (styleProp === void 0) { styleProp = {}; }
|
|
@@ -8628,7 +8368,7 @@ var auto$1 = {
|
|
|
8628
8368
|
parse: function (v) { return v; },
|
|
8629
8369
|
};
|
|
8630
8370
|
var dimensionTypes = [number, px, percent, degrees, vw, vh, auto$1];
|
|
8631
|
-
var valueTypes$1 = __spreadArrays
|
|
8371
|
+
var valueTypes$1 = __spreadArrays(dimensionTypes, [color, complex]);
|
|
8632
8372
|
var testValueType$1 = function (v) { return function (type) { return type.test(v); }; };
|
|
8633
8373
|
var getDimensionValueType = function (v) {
|
|
8634
8374
|
return dimensionTypes.find(testValueType$1(v));
|
|
@@ -8681,7 +8421,7 @@ var getDefaultTransition = function (valueKey, to) {
|
|
|
8681
8421
|
transitionFactory =
|
|
8682
8422
|
defaultTransitions$1[valueKey] || defaultTransitions$1.default;
|
|
8683
8423
|
}
|
|
8684
|
-
return __assign
|
|
8424
|
+
return __assign({ to: to }, transitionFactory(to));
|
|
8685
8425
|
};
|
|
8686
8426
|
|
|
8687
8427
|
/**
|
|
@@ -8777,9 +8517,9 @@ var transitionOptionParser = {
|
|
|
8777
8517
|
return opts;
|
|
8778
8518
|
},
|
|
8779
8519
|
keyframes: function (_a) {
|
|
8780
|
-
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest
|
|
8520
|
+
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest(_a, ["from", "to", "velocity"]);
|
|
8781
8521
|
if (opts.values && opts.values[0] === null) {
|
|
8782
|
-
var values = __spreadArrays
|
|
8522
|
+
var values = __spreadArrays(opts.values);
|
|
8783
8523
|
values[0] = from;
|
|
8784
8524
|
opts.values = values;
|
|
8785
8525
|
}
|
|
@@ -8793,7 +8533,7 @@ var transitionOptionParser = {
|
|
|
8793
8533
|
},
|
|
8794
8534
|
};
|
|
8795
8535
|
var isTransitionDefined = function (_a) {
|
|
8796
|
-
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest
|
|
8536
|
+
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection"]);
|
|
8797
8537
|
return Object.keys(transition).length;
|
|
8798
8538
|
};
|
|
8799
8539
|
var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
@@ -8803,7 +8543,7 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8803
8543
|
// and see if there's any props remaining
|
|
8804
8544
|
if (transitionDefinition === undefined ||
|
|
8805
8545
|
!isTransitionDefined(transitionDefinition)) {
|
|
8806
|
-
return __assign
|
|
8546
|
+
return __assign({ delay: delay }, getDefaultTransition(key, to));
|
|
8807
8547
|
}
|
|
8808
8548
|
var valueTransitionDefinition = transitionDefinition[key] ||
|
|
8809
8549
|
transitionDefinition.default ||
|
|
@@ -8820,12 +8560,12 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8820
8560
|
};
|
|
8821
8561
|
}
|
|
8822
8562
|
else if (isKeyframesTarget(to)) {
|
|
8823
|
-
return __assign
|
|
8563
|
+
return __assign(__assign({ values: to, duration: 0.8, delay: delay, ease: "linear" }, valueTransitionDefinition), {
|
|
8824
8564
|
// This animation must be keyframes if we're animating through an array
|
|
8825
8565
|
type: "keyframes" });
|
|
8826
8566
|
}
|
|
8827
8567
|
else {
|
|
8828
|
-
return __assign
|
|
8568
|
+
return __assign({ type: "tween", to: to,
|
|
8829
8569
|
delay: delay }, valueTransitionDefinition);
|
|
8830
8570
|
}
|
|
8831
8571
|
};
|
|
@@ -8842,12 +8582,12 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8842
8582
|
// for instance 100 to #fff. This might live better in Popmotion.
|
|
8843
8583
|
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.");
|
|
8844
8584
|
// Parse the `transition` prop and return options for the Popmotion animation
|
|
8845
|
-
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest
|
|
8585
|
+
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
|
|
8846
8586
|
// If this is an animatable pair of values, return an animation, otherwise use `just`
|
|
8847
8587
|
var actionFactory = isOriginAnimatable && isTargetAnimatable
|
|
8848
8588
|
? transitions[type]
|
|
8849
8589
|
: just$1;
|
|
8850
|
-
var opts = preprocessOptions(type, __assign
|
|
8590
|
+
var opts = preprocessOptions(type, __assign({ from: origin, velocity: value.getVelocity() }, transitionDefinition));
|
|
8851
8591
|
// Convert duration from Framer Motion's seconds into Popmotion's milliseconds
|
|
8852
8592
|
if (isDurationAnimation(opts)) {
|
|
8853
8593
|
if (opts.duration) {
|
|
@@ -8865,10 +8605,10 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8865
8605
|
* @internal
|
|
8866
8606
|
*/
|
|
8867
8607
|
function startAnimation(key, value, target, _a) {
|
|
8868
|
-
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest
|
|
8608
|
+
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest(_a, ["delay"]);
|
|
8869
8609
|
return value.start(function (complete) {
|
|
8870
8610
|
var activeAnimation;
|
|
8871
|
-
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest
|
|
8611
|
+
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest(_b, ["delay"]);
|
|
8872
8612
|
if (valueDelay !== undefined) {
|
|
8873
8613
|
delay$1$1 = valueDelay;
|
|
8874
8614
|
}
|
|
@@ -9014,7 +8754,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9014
8754
|
var _this = this;
|
|
9015
8755
|
var _b = _a === void 0 ? {} : _a, _c = _b.isActive, isActive = _c === void 0 ? new Set() : _c, priority = _b.priority;
|
|
9016
8756
|
var _d = this.resolveVariant(definition), target = _d.target, transitionEnd = _d.transitionEnd;
|
|
9017
|
-
target = this.transformValues(__assign
|
|
8757
|
+
target = this.transformValues(__assign(__assign({}, target), transitionEnd));
|
|
9018
8758
|
return Object.keys(target).forEach(function (key) {
|
|
9019
8759
|
if (isActive.has(key))
|
|
9020
8760
|
return;
|
|
@@ -9104,7 +8844,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9104
8844
|
// resolve current and velocity
|
|
9105
8845
|
variant = variant(this.props.custom, getCurrent$1(this.values), getVelocity(this.values));
|
|
9106
8846
|
}
|
|
9107
|
-
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest
|
|
8847
|
+
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest(variant, ["transition", "transitionEnd"]);
|
|
9108
8848
|
return { transition: transition, transitionEnd: transitionEnd, target: target };
|
|
9109
8849
|
};
|
|
9110
8850
|
/**
|
|
@@ -9195,7 +8935,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9195
8935
|
ValueAnimationControls.prototype.applyVariantLabels = function (variantLabelList) {
|
|
9196
8936
|
var _this = this;
|
|
9197
8937
|
var isActive = new Set();
|
|
9198
|
-
var reversedList = __spreadArrays
|
|
8938
|
+
var reversedList = __spreadArrays(variantLabelList).reverse();
|
|
9199
8939
|
reversedList.forEach(function (key) {
|
|
9200
8940
|
var _a = _this.resolveVariant(_this.variants[key]), target = _a.target, transitionEnd = _a.transitionEnd;
|
|
9201
8941
|
if (transitionEnd) {
|
|
@@ -9266,7 +9006,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9266
9006
|
if (this.isAnimating.has(key))
|
|
9267
9007
|
continue;
|
|
9268
9008
|
this.isAnimating.add(key);
|
|
9269
|
-
animations.push(startAnimation(key, value, valueTarget, __assign
|
|
9009
|
+
animations.push(startAnimation(key, value, valueTarget, __assign({ delay: delay }, transition)));
|
|
9270
9010
|
}
|
|
9271
9011
|
var allAnimations = Promise.all(animations);
|
|
9272
9012
|
return transitionEnd
|
|
@@ -9277,7 +9017,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9277
9017
|
};
|
|
9278
9018
|
ValueAnimationControls.prototype.animateVariantLabels = function (variantLabels, opts) {
|
|
9279
9019
|
var _this = this;
|
|
9280
|
-
var animations = __spreadArrays
|
|
9020
|
+
var animations = __spreadArrays(variantLabels).reverse()
|
|
9281
9021
|
.map(function (label) { return _this.animateVariant(label, opts); });
|
|
9282
9022
|
return Promise.all(animations);
|
|
9283
9023
|
};
|
|
@@ -9721,7 +9461,7 @@ function useValueAnimationControls(config, props, subscribeToParentControls) {
|
|
|
9721
9461
|
// Remove reference to onAnimationComplete from controls. All the MotionValues
|
|
9722
9462
|
// are unsubscribed from this component separately. We let animations run out
|
|
9723
9463
|
// as they might be animating other components.
|
|
9724
|
-
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest
|
|
9464
|
+
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest(props, ["onAnimationComplete"]);
|
|
9725
9465
|
controls.setProps(unmountProps);
|
|
9726
9466
|
parentControls && parentControls.removeChild(controls);
|
|
9727
9467
|
};
|
|
@@ -10206,7 +9946,7 @@ var PanSession = /** @class */ (function () {
|
|
|
10206
9946
|
return;
|
|
10207
9947
|
var point = info.point;
|
|
10208
9948
|
var timestamp = getFrameData().timestamp;
|
|
10209
|
-
_this.history.push(__assign
|
|
9949
|
+
_this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));
|
|
10210
9950
|
var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;
|
|
10211
9951
|
if (!isPanStarted) {
|
|
10212
9952
|
onStart && onStart(_this.lastMoveEvent, info);
|
|
@@ -10223,7 +9963,7 @@ var PanSession = /** @class */ (function () {
|
|
|
10223
9963
|
var initialInfo = transformPoint(info, this.transformPagePoint);
|
|
10224
9964
|
var point = initialInfo.point;
|
|
10225
9965
|
var timestamp = getFrameData().timestamp;
|
|
10226
|
-
this.history = [__assign
|
|
9966
|
+
this.history = [__assign(__assign({}, point), { timestamp: timestamp })];
|
|
10227
9967
|
var onSessionStart = handlers.onSessionStart;
|
|
10228
9968
|
onSessionStart &&
|
|
10229
9969
|
onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
@@ -10551,7 +10291,7 @@ var Gestures = {
|
|
|
10551
10291
|
return gestureProps.some(function (key) { return props.hasOwnProperty(key); });
|
|
10552
10292
|
},
|
|
10553
10293
|
Component: makeRenderlessComponent(function (_a) {
|
|
10554
|
-
var innerRef = _a.innerRef, props = __rest
|
|
10294
|
+
var innerRef = _a.innerRef, props = __rest(_a, ["innerRef"]);
|
|
10555
10295
|
useGestures(props, innerRef);
|
|
10556
10296
|
}),
|
|
10557
10297
|
};
|
|
@@ -10791,8 +10531,8 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10791
10531
|
};
|
|
10792
10532
|
ComponentDragControls.prototype.updateProps = function (_a) {
|
|
10793
10533
|
var _this = this;
|
|
10794
|
-
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
|
|
10795
|
-
this.props = __assign
|
|
10534
|
+
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"]);
|
|
10535
|
+
this.props = __assign({ drag: drag,
|
|
10796
10536
|
dragDirectionLock: dragDirectionLock,
|
|
10797
10537
|
dragPropagation: dragPropagation,
|
|
10798
10538
|
dragConstraints: dragConstraints,
|
|
@@ -10848,7 +10588,7 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10848
10588
|
var bounceStiffness = dragElastic ? 200 : 1000000;
|
|
10849
10589
|
var bounceDamping = dragElastic ? 40 : 10000000;
|
|
10850
10590
|
var animationControls = _dragTransitionControls || _this.controls;
|
|
10851
|
-
var inertia = __assign
|
|
10591
|
+
var inertia = __assign(__assign({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness,
|
|
10852
10592
|
bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1 }, dragTransition), transition);
|
|
10853
10593
|
var externalAxisMotionValue = axis === "x" ? _dragValueX : _dragValueY;
|
|
10854
10594
|
// If we're not animating on an externally-provided `MotionValue` we can use the
|
|
@@ -10929,7 +10669,7 @@ function bothAxis(handler) {
|
|
|
10929
10669
|
return [handler("x"), handler("y")];
|
|
10930
10670
|
}
|
|
10931
10671
|
function convertPanToDrag(info, point) {
|
|
10932
|
-
return __assign
|
|
10672
|
+
return __assign(__assign({}, info), { point: {
|
|
10933
10673
|
x: point.x ? point.x.get() : 0,
|
|
10934
10674
|
y: point.y ? point.y.get() : 0,
|
|
10935
10675
|
} });
|
|
@@ -11040,7 +10780,7 @@ function useDrag(props, ref, values, controls) {
|
|
|
11040
10780
|
var groupDragControls = props.dragControls;
|
|
11041
10781
|
var transformPagePoint = React.useContext(MotionPluginContext).transformPagePoint;
|
|
11042
10782
|
var dragControls = useConstant(function () { return new ComponentDragControls({ ref: ref, values: values, controls: controls }); });
|
|
11043
|
-
dragControls.updateProps(__assign
|
|
10783
|
+
dragControls.updateProps(__assign(__assign({}, props), { transformPagePoint: transformPagePoint }));
|
|
11044
10784
|
React.useEffect(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls]);
|
|
11045
10785
|
React.useEffect(function () { return dragControls.mount(ref.current); }, []);
|
|
11046
10786
|
}
|
|
@@ -11049,7 +10789,7 @@ var Drag = {
|
|
|
11049
10789
|
key: "drag",
|
|
11050
10790
|
shouldRender: function (props) { return !!props.drag; },
|
|
11051
10791
|
Component: makeRenderlessComponent(function (_a) {
|
|
11052
|
-
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest
|
|
10792
|
+
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest(_a, ["innerRef", "values", "controls"]);
|
|
11053
10793
|
return useDrag(props, innerRef, values, controls);
|
|
11054
10794
|
}),
|
|
11055
10795
|
};
|
|
@@ -11101,14 +10841,14 @@ function getVariableValue(current, element, depth) {
|
|
|
11101
10841
|
* @internal
|
|
11102
10842
|
*/
|
|
11103
10843
|
function resolveCSSVariables(values, ref, _a, transitionEnd) {
|
|
11104
|
-
var target = __rest
|
|
10844
|
+
var target = __rest(_a, []);
|
|
11105
10845
|
var element = ref.current;
|
|
11106
10846
|
if (!(element instanceof HTMLElement))
|
|
11107
10847
|
return { target: target, transitionEnd: transitionEnd };
|
|
11108
10848
|
// If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
|
|
11109
10849
|
// only if they change but I think this reads clearer and this isn't a performance-critical path.
|
|
11110
10850
|
if (transitionEnd) {
|
|
11111
|
-
transitionEnd = __assign
|
|
10851
|
+
transitionEnd = __assign({}, transitionEnd);
|
|
11112
10852
|
}
|
|
11113
10853
|
// Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
|
|
11114
10854
|
values.forEach(function (value) {
|
|
@@ -11265,8 +11005,8 @@ var convertChangedValueTypes = function (target, values, element, elementStyler,
|
|
|
11265
11005
|
};
|
|
11266
11006
|
var checkAndConvertChangedValueTypes = function (values, ref, target, transitionEnd) {
|
|
11267
11007
|
if (transitionEnd === void 0) { transitionEnd = {}; }
|
|
11268
|
-
target = __assign
|
|
11269
|
-
transitionEnd = __assign
|
|
11008
|
+
target = __assign({}, target);
|
|
11009
|
+
transitionEnd = __assign({}, transitionEnd);
|
|
11270
11010
|
var element = ref.current;
|
|
11271
11011
|
var elementStyler = index(element);
|
|
11272
11012
|
var targetPositionalKeys = Object.keys(target).filter(isPositionalKey$1);
|
|
@@ -11494,7 +11234,7 @@ function calcAxisDelta(prev, next, names) {
|
|
|
11494
11234
|
return delta;
|
|
11495
11235
|
}
|
|
11496
11236
|
function calcDelta(prev, next) {
|
|
11497
|
-
var delta = __assign
|
|
11237
|
+
var delta = __assign(__assign({}, calcAxisDelta(prev, next, axisLabels.x)), calcAxisDelta(prev, next, axisLabels.y));
|
|
11498
11238
|
return delta;
|
|
11499
11239
|
}
|
|
11500
11240
|
var offset = {
|
|
@@ -11538,7 +11278,7 @@ function getTransition(_a) {
|
|
|
11538
11278
|
return layoutTransition || positionTransition;
|
|
11539
11279
|
}
|
|
11540
11280
|
var LayoutAnimation = /** @class */ (function (_super) {
|
|
11541
|
-
__extends
|
|
11281
|
+
__extends(LayoutAnimation, _super);
|
|
11542
11282
|
function LayoutAnimation() {
|
|
11543
11283
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
11544
11284
|
}
|
|
@@ -11605,11 +11345,11 @@ var LayoutAnimation = /** @class */ (function (_super) {
|
|
|
11605
11345
|
if (!delta[deltaKey])
|
|
11606
11346
|
return;
|
|
11607
11347
|
var baseTransition = typeof transitionDefinition === "boolean"
|
|
11608
|
-
? __assign
|
|
11348
|
+
? __assign({}, getDefaultLayoutTransition(isPositionOnly)) : transitionDefinition;
|
|
11609
11349
|
var value = values.get(transformKey, targetValue);
|
|
11610
11350
|
var velocity = value.getVelocity();
|
|
11611
11351
|
transition[transformKey] = baseTransition[transformKey]
|
|
11612
|
-
? __assign
|
|
11352
|
+
? __assign({}, baseTransition[transformKey]) : __assign({}, baseTransition);
|
|
11613
11353
|
if (transition[transformKey].velocity === undefined) {
|
|
11614
11354
|
transition[transformKey].velocity = velocity || 0;
|
|
11615
11355
|
}
|
|
@@ -11750,9 +11490,9 @@ var hasUpdated = function (prev, next) {
|
|
|
11750
11490
|
};
|
|
11751
11491
|
function targetWithoutTransition(_a, mergeTransitionEnd) {
|
|
11752
11492
|
if (mergeTransitionEnd === void 0) { mergeTransitionEnd = false; }
|
|
11753
|
-
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest
|
|
11493
|
+
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, ["transition", "transitionEnd"]);
|
|
11754
11494
|
return mergeTransitionEnd
|
|
11755
|
-
? __assign
|
|
11495
|
+
? __assign(__assign({}, target), transitionEnd)
|
|
11756
11496
|
: target;
|
|
11757
11497
|
}
|
|
11758
11498
|
/**
|
|
@@ -11804,9 +11544,9 @@ function useAnimateProp(targetAndTransition, controls, values, defaultTransition
|
|
|
11804
11544
|
}
|
|
11805
11545
|
}
|
|
11806
11546
|
isInitialRender.current = false;
|
|
11807
|
-
prevValues.current = __assign
|
|
11547
|
+
prevValues.current = __assign(__assign({}, prevValues.current), finalTarget);
|
|
11808
11548
|
if (Object.keys(targetToAnimate).length) {
|
|
11809
|
-
controls.start(__assign
|
|
11549
|
+
controls.start(__assign(__assign({}, targetToAnimate), { transition: targetAndTransition.transition || defaultTransition, transitionEnd: targetAndTransition.transitionEnd }));
|
|
11810
11550
|
}
|
|
11811
11551
|
}, [targetAndTransition]);
|
|
11812
11552
|
}
|
|
@@ -11980,7 +11720,7 @@ var Exit = {
|
|
|
11980
11720
|
React.useEffect(function () {
|
|
11981
11721
|
if (!isPresent) {
|
|
11982
11722
|
if (!isPlayingExitAnimation.current && exit) {
|
|
11983
|
-
controls.setProps(__assign
|
|
11723
|
+
controls.setProps(__assign(__assign({}, props), { custom: custom }));
|
|
11984
11724
|
controls.start(exit).then(onExitComplete);
|
|
11985
11725
|
}
|
|
11986
11726
|
isPlayingExitAnimation.current = true;
|
|
@@ -12051,7 +11791,7 @@ var buildHTMLProps = function (values, style, isStatic, isDrag) {
|
|
|
12051
11791
|
var buildSVGProps = function (values, style) {
|
|
12052
11792
|
var motionValueStyles = resolveCurrent(values);
|
|
12053
11793
|
var props = buildSVGAttrs(motionValueStyles, undefined, undefined, undefined, undefined, false);
|
|
12054
|
-
props.style = __assign
|
|
11794
|
+
props.style = __assign(__assign({}, style), props.style);
|
|
12055
11795
|
return props;
|
|
12056
11796
|
};
|
|
12057
11797
|
var functionalityComponents = [Layout, Drag, Gestures, Exit];
|
|
@@ -12070,7 +11810,7 @@ function createDomMotionConfig(Component) {
|
|
|
12070
11810
|
var staticVisualStyles = isSVG
|
|
12071
11811
|
? buildSVGProps(values, style)
|
|
12072
11812
|
: buildHTMLProps(values, style, isStatic, !!props.drag);
|
|
12073
|
-
return React.createElement(Component, __assign
|
|
11813
|
+
return React.createElement(Component, __assign(__assign(__assign({}, forwardedProps), { ref: ref }), staticVisualStyles));
|
|
12074
11814
|
},
|
|
12075
11815
|
/**
|
|
12076
11816
|
* loadFunctionalityComponents gets used by the `motion` component
|
|
@@ -12101,7 +11841,7 @@ function createDomMotionConfig(Component) {
|
|
|
12101
11841
|
for (var i = 0; i < numFunctionalityComponents; i++) {
|
|
12102
11842
|
var _a = functionalityComponents[i], shouldRender = _a.shouldRender, key = _a.key, Component_1 = _a.Component;
|
|
12103
11843
|
if (shouldRender(props, context)) {
|
|
12104
|
-
activeComponents.push(React.createElement(Component_1, __assign
|
|
11844
|
+
activeComponents.push(React.createElement(Component_1, __assign({ key: key }, props, { parentContext: context, values: values, controls: controls, innerRef: ref })));
|
|
12105
11845
|
}
|
|
12106
11846
|
}
|
|
12107
11847
|
return activeComponents;
|
|
@@ -12153,7 +11893,7 @@ var svgMotionComponents = svgElements.reduce(function (acc, Component) {
|
|
|
12153
11893
|
*
|
|
12154
11894
|
* @public
|
|
12155
11895
|
*/
|
|
12156
|
-
var motion = __assign
|
|
11896
|
+
var motion = __assign(__assign({
|
|
12157
11897
|
/**
|
|
12158
11898
|
* Convert a custom React component into a `motion` component.
|
|
12159
11899
|
*
|
|
@@ -12205,7 +11945,7 @@ var PresenceChild = function (_a) {
|
|
|
12205
11945
|
return function () { return numPresenceChildren.current--; };
|
|
12206
11946
|
};
|
|
12207
11947
|
}, [isPresent]);
|
|
12208
|
-
return (React.createElement(PresenceContext.Provider, { value: __assign
|
|
11948
|
+
return (React.createElement(PresenceContext.Provider, { value: __assign(__assign({}, context), { register: register }) }, children));
|
|
12209
11949
|
};
|
|
12210
11950
|
|
|
12211
11951
|
function getChildKey(child) {
|
|
@@ -12321,7 +12061,7 @@ var AnimatePresence = function (_a) {
|
|
|
12321
12061
|
return (React.createElement(React.Fragment, null, filteredChildren.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false }, child)); })));
|
|
12322
12062
|
}
|
|
12323
12063
|
// If this is a subsequent render, deal with entering and exiting children
|
|
12324
|
-
var childrenToRender = __spreadArrays
|
|
12064
|
+
var childrenToRender = __spreadArrays(filteredChildren);
|
|
12325
12065
|
// Diff the keys of the currently-present and target children to update our
|
|
12326
12066
|
// exiting list.
|
|
12327
12067
|
var presentKeys = presentChildren.current.map(getChildKey);
|
|
@@ -19629,7 +19369,6 @@ function _wrapNativeSuper(Class) {
|
|
|
19629
19369
|
}
|
|
19630
19370
|
|
|
19631
19371
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19632
|
-
|
|
19633
19372
|
/**
|
|
19634
19373
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
19635
19374
|
* @private
|
|
@@ -19714,84 +19453,71 @@ var ERRORS = {
|
|
|
19714
19453
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
19715
19454
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
19716
19455
|
};
|
|
19456
|
+
|
|
19717
19457
|
/**
|
|
19718
19458
|
* super basic version of sprintf
|
|
19719
19459
|
* @private
|
|
19720
19460
|
*/
|
|
19721
|
-
|
|
19722
19461
|
function format() {
|
|
19723
19462
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19724
19463
|
args[_key] = arguments[_key];
|
|
19725
19464
|
}
|
|
19726
|
-
|
|
19727
19465
|
var a = args[0];
|
|
19728
19466
|
var b = [];
|
|
19729
19467
|
var c;
|
|
19730
|
-
|
|
19731
19468
|
for (c = 1; c < args.length; c += 1) {
|
|
19732
19469
|
b.push(args[c]);
|
|
19733
19470
|
}
|
|
19734
|
-
|
|
19735
19471
|
b.forEach(function (d) {
|
|
19736
19472
|
a = a.replace(/%[a-z]/, d);
|
|
19737
19473
|
});
|
|
19738
19474
|
return a;
|
|
19739
19475
|
}
|
|
19476
|
+
|
|
19740
19477
|
/**
|
|
19741
19478
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19742
19479
|
* in production mode.
|
|
19743
19480
|
* @private
|
|
19744
19481
|
*/
|
|
19745
|
-
|
|
19746
|
-
|
|
19747
19482
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19748
19483
|
_inheritsLoose(PolishedError, _Error);
|
|
19749
|
-
|
|
19750
19484
|
function PolishedError(code) {
|
|
19751
19485
|
var _this;
|
|
19752
|
-
|
|
19753
19486
|
if (process.env.NODE_ENV === 'production') {
|
|
19754
19487
|
_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;
|
|
19755
19488
|
} else {
|
|
19756
19489
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19757
19490
|
args[_key2 - 1] = arguments[_key2];
|
|
19758
19491
|
}
|
|
19759
|
-
|
|
19760
19492
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19761
19493
|
}
|
|
19762
|
-
|
|
19763
19494
|
return _assertThisInitialized(_this);
|
|
19764
19495
|
}
|
|
19765
|
-
|
|
19766
19496
|
return PolishedError;
|
|
19767
19497
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19768
19498
|
|
|
19769
19499
|
function colorToInt(color) {
|
|
19770
19500
|
return Math.round(color * 255);
|
|
19771
19501
|
}
|
|
19772
|
-
|
|
19773
19502
|
function convertToInt(red, green, blue) {
|
|
19774
19503
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19775
19504
|
}
|
|
19776
|
-
|
|
19777
19505
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19778
19506
|
if (convert === void 0) {
|
|
19779
19507
|
convert = convertToInt;
|
|
19780
19508
|
}
|
|
19781
|
-
|
|
19782
19509
|
if (saturation === 0) {
|
|
19783
19510
|
// achromatic
|
|
19784
19511
|
return convert(lightness, lightness, lightness);
|
|
19785
|
-
}
|
|
19786
|
-
|
|
19512
|
+
}
|
|
19787
19513
|
|
|
19514
|
+
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19788
19515
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19789
19516
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19790
19517
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19791
19518
|
var red = 0;
|
|
19792
19519
|
var green = 0;
|
|
19793
19520
|
var blue = 0;
|
|
19794
|
-
|
|
19795
19521
|
if (huePrime >= 0 && huePrime < 1) {
|
|
19796
19522
|
red = chroma;
|
|
19797
19523
|
green = secondComponent;
|
|
@@ -19811,7 +19537,6 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
19811
19537
|
red = chroma;
|
|
19812
19538
|
blue = secondComponent;
|
|
19813
19539
|
}
|
|
19814
|
-
|
|
19815
19540
|
var lightnessModification = lightness - chroma / 2;
|
|
19816
19541
|
var finalRed = red + lightnessModification;
|
|
19817
19542
|
var finalGreen = green + lightnessModification;
|
|
@@ -19969,11 +19694,11 @@ var namedColorMap = {
|
|
|
19969
19694
|
yellow: 'ff0',
|
|
19970
19695
|
yellowgreen: '9acd32'
|
|
19971
19696
|
};
|
|
19697
|
+
|
|
19972
19698
|
/**
|
|
19973
19699
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
19974
19700
|
* @private
|
|
19975
19701
|
*/
|
|
19976
|
-
|
|
19977
19702
|
function nameToHex(color) {
|
|
19978
19703
|
if (typeof color !== 'string') return color;
|
|
19979
19704
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -19988,6 +19713,7 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
19988
19713
|
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
19989
19714
|
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;
|
|
19990
19715
|
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;
|
|
19716
|
+
|
|
19991
19717
|
/**
|
|
19992
19718
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
19993
19719
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -19999,14 +19725,11 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
19999
19725
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
20000
19726
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
20001
19727
|
*/
|
|
20002
|
-
|
|
20003
19728
|
function parseToRgb(color) {
|
|
20004
19729
|
if (typeof color !== 'string') {
|
|
20005
19730
|
throw new PolishedError(3);
|
|
20006
19731
|
}
|
|
20007
|
-
|
|
20008
19732
|
var normalizedColor = nameToHex(color);
|
|
20009
|
-
|
|
20010
19733
|
if (normalizedColor.match(hexRegex)) {
|
|
20011
19734
|
return {
|
|
20012
19735
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -20014,7 +19737,6 @@ function parseToRgb(color) {
|
|
|
20014
19737
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
20015
19738
|
};
|
|
20016
19739
|
}
|
|
20017
|
-
|
|
20018
19740
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
20019
19741
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
20020
19742
|
return {
|
|
@@ -20024,7 +19746,6 @@ function parseToRgb(color) {
|
|
|
20024
19746
|
alpha: alpha
|
|
20025
19747
|
};
|
|
20026
19748
|
}
|
|
20027
|
-
|
|
20028
19749
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
20029
19750
|
return {
|
|
20030
19751
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -20032,10 +19753,8 @@ function parseToRgb(color) {
|
|
|
20032
19753
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
20033
19754
|
};
|
|
20034
19755
|
}
|
|
20035
|
-
|
|
20036
19756
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
20037
19757
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
20038
|
-
|
|
20039
19758
|
return {
|
|
20040
19759
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
20041
19760
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -20043,9 +19762,7 @@ function parseToRgb(color) {
|
|
|
20043
19762
|
alpha: _alpha
|
|
20044
19763
|
};
|
|
20045
19764
|
}
|
|
20046
|
-
|
|
20047
19765
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
20048
|
-
|
|
20049
19766
|
if (rgbMatched) {
|
|
20050
19767
|
return {
|
|
20051
19768
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -20053,9 +19770,7 @@ function parseToRgb(color) {
|
|
|
20053
19770
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
20054
19771
|
};
|
|
20055
19772
|
}
|
|
20056
|
-
|
|
20057
19773
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
20058
|
-
|
|
20059
19774
|
if (rgbaMatched) {
|
|
20060
19775
|
return {
|
|
20061
19776
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -20064,44 +19779,32 @@ function parseToRgb(color) {
|
|
|
20064
19779
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
20065
19780
|
};
|
|
20066
19781
|
}
|
|
20067
|
-
|
|
20068
19782
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
20069
|
-
|
|
20070
19783
|
if (hslMatched) {
|
|
20071
19784
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
20072
19785
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
20073
19786
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
20074
19787
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
20075
19788
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
20076
|
-
|
|
20077
19789
|
if (!hslRgbMatched) {
|
|
20078
19790
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
20079
19791
|
}
|
|
20080
|
-
|
|
20081
19792
|
return {
|
|
20082
19793
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
20083
19794
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
20084
19795
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
20085
19796
|
};
|
|
20086
19797
|
}
|
|
20087
|
-
|
|
20088
19798
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
20089
|
-
|
|
20090
19799
|
if (hslaMatched) {
|
|
20091
19800
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
20092
|
-
|
|
20093
19801
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
20094
|
-
|
|
20095
19802
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
20096
|
-
|
|
20097
19803
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
20098
|
-
|
|
20099
19804
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
20100
|
-
|
|
20101
19805
|
if (!_hslRgbMatched) {
|
|
20102
19806
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
20103
19807
|
}
|
|
20104
|
-
|
|
20105
19808
|
return {
|
|
20106
19809
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
20107
19810
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -20109,10 +19812,82 @@ function parseToRgb(color) {
|
|
|
20109
19812
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
20110
19813
|
};
|
|
20111
19814
|
}
|
|
20112
|
-
|
|
20113
19815
|
throw new PolishedError(5);
|
|
20114
19816
|
}
|
|
20115
19817
|
|
|
19818
|
+
function rgbToHsl(color) {
|
|
19819
|
+
// make sure rgb are contained in a set of [0, 255]
|
|
19820
|
+
var red = color.red / 255;
|
|
19821
|
+
var green = color.green / 255;
|
|
19822
|
+
var blue = color.blue / 255;
|
|
19823
|
+
var max = Math.max(red, green, blue);
|
|
19824
|
+
var min = Math.min(red, green, blue);
|
|
19825
|
+
var lightness = (max + min) / 2;
|
|
19826
|
+
if (max === min) {
|
|
19827
|
+
// achromatic
|
|
19828
|
+
if (color.alpha !== undefined) {
|
|
19829
|
+
return {
|
|
19830
|
+
hue: 0,
|
|
19831
|
+
saturation: 0,
|
|
19832
|
+
lightness: lightness,
|
|
19833
|
+
alpha: color.alpha
|
|
19834
|
+
};
|
|
19835
|
+
} else {
|
|
19836
|
+
return {
|
|
19837
|
+
hue: 0,
|
|
19838
|
+
saturation: 0,
|
|
19839
|
+
lightness: lightness
|
|
19840
|
+
};
|
|
19841
|
+
}
|
|
19842
|
+
}
|
|
19843
|
+
var hue;
|
|
19844
|
+
var delta = max - min;
|
|
19845
|
+
var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
19846
|
+
switch (max) {
|
|
19847
|
+
case red:
|
|
19848
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
19849
|
+
break;
|
|
19850
|
+
case green:
|
|
19851
|
+
hue = (blue - red) / delta + 2;
|
|
19852
|
+
break;
|
|
19853
|
+
default:
|
|
19854
|
+
// blue case
|
|
19855
|
+
hue = (red - green) / delta + 4;
|
|
19856
|
+
break;
|
|
19857
|
+
}
|
|
19858
|
+
hue *= 60;
|
|
19859
|
+
if (color.alpha !== undefined) {
|
|
19860
|
+
return {
|
|
19861
|
+
hue: hue,
|
|
19862
|
+
saturation: saturation,
|
|
19863
|
+
lightness: lightness,
|
|
19864
|
+
alpha: color.alpha
|
|
19865
|
+
};
|
|
19866
|
+
}
|
|
19867
|
+
return {
|
|
19868
|
+
hue: hue,
|
|
19869
|
+
saturation: saturation,
|
|
19870
|
+
lightness: lightness
|
|
19871
|
+
};
|
|
19872
|
+
}
|
|
19873
|
+
|
|
19874
|
+
/**
|
|
19875
|
+
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
19876
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
19877
|
+
* can convert a HslColor or HslaColor object back to a string.
|
|
19878
|
+
*
|
|
19879
|
+
* @example
|
|
19880
|
+
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
19881
|
+
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
19882
|
+
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
19883
|
+
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
19884
|
+
*/
|
|
19885
|
+
function parseToHsl(color) {
|
|
19886
|
+
// Note: At a later stage we can optimize this function as right now a hsl
|
|
19887
|
+
// color would be parsed converted to rgb values and converted back to hsl.
|
|
19888
|
+
return rgbToHsl(parseToRgb(color));
|
|
19889
|
+
}
|
|
19890
|
+
|
|
20116
19891
|
/**
|
|
20117
19892
|
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
20118
19893
|
* @private
|
|
@@ -20121,10 +19896,8 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
20121
19896
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
20122
19897
|
return "#" + value[1] + value[3] + value[5];
|
|
20123
19898
|
}
|
|
20124
|
-
|
|
20125
19899
|
return value;
|
|
20126
19900
|
};
|
|
20127
|
-
|
|
20128
19901
|
var reduceHexValue$1 = reduceHexValue;
|
|
20129
19902
|
|
|
20130
19903
|
function numberToHex(value) {
|
|
@@ -20132,6 +19905,83 @@ function numberToHex(value) {
|
|
|
20132
19905
|
return hex.length === 1 ? "0" + hex : hex;
|
|
20133
19906
|
}
|
|
20134
19907
|
|
|
19908
|
+
function colorToHex(color) {
|
|
19909
|
+
return numberToHex(Math.round(color * 255));
|
|
19910
|
+
}
|
|
19911
|
+
function convertToHex(red, green, blue) {
|
|
19912
|
+
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
19913
|
+
}
|
|
19914
|
+
function hslToHex(hue, saturation, lightness) {
|
|
19915
|
+
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
19916
|
+
}
|
|
19917
|
+
|
|
19918
|
+
/**
|
|
19919
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
19920
|
+
*
|
|
19921
|
+
* @example
|
|
19922
|
+
* // Styles as object usage
|
|
19923
|
+
* const styles = {
|
|
19924
|
+
* background: hsl(359, 0.75, 0.4),
|
|
19925
|
+
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
19926
|
+
* }
|
|
19927
|
+
*
|
|
19928
|
+
* // styled-components usage
|
|
19929
|
+
* const div = styled.div`
|
|
19930
|
+
* background: ${hsl(359, 0.75, 0.4)};
|
|
19931
|
+
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
19932
|
+
* `
|
|
19933
|
+
*
|
|
19934
|
+
* // CSS in JS Output
|
|
19935
|
+
*
|
|
19936
|
+
* element {
|
|
19937
|
+
* background: "#b3191c";
|
|
19938
|
+
* background: "#b3191c";
|
|
19939
|
+
* }
|
|
19940
|
+
*/
|
|
19941
|
+
function hsl(value, saturation, lightness) {
|
|
19942
|
+
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
|
|
19943
|
+
return hslToHex(value, saturation, lightness);
|
|
19944
|
+
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
19945
|
+
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
19946
|
+
}
|
|
19947
|
+
throw new PolishedError(1);
|
|
19948
|
+
}
|
|
19949
|
+
|
|
19950
|
+
/**
|
|
19951
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
19952
|
+
*
|
|
19953
|
+
* @example
|
|
19954
|
+
* // Styles as object usage
|
|
19955
|
+
* const styles = {
|
|
19956
|
+
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
19957
|
+
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
19958
|
+
* background: hsla(359, 0.75, 0.4, 1),
|
|
19959
|
+
* }
|
|
19960
|
+
*
|
|
19961
|
+
* // styled-components usage
|
|
19962
|
+
* const div = styled.div`
|
|
19963
|
+
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
19964
|
+
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
19965
|
+
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
19966
|
+
* `
|
|
19967
|
+
*
|
|
19968
|
+
* // CSS in JS Output
|
|
19969
|
+
*
|
|
19970
|
+
* element {
|
|
19971
|
+
* background: "rgba(179,25,28,0.7)";
|
|
19972
|
+
* background: "rgba(179,25,28,0.7)";
|
|
19973
|
+
* background: "#b3191c";
|
|
19974
|
+
* }
|
|
19975
|
+
*/
|
|
19976
|
+
function hsla$1(value, saturation, lightness, alpha) {
|
|
19977
|
+
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
|
|
19978
|
+
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
19979
|
+
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
19980
|
+
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
19981
|
+
}
|
|
19982
|
+
throw new PolishedError(2);
|
|
19983
|
+
}
|
|
19984
|
+
|
|
20135
19985
|
/**
|
|
20136
19986
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
20137
19987
|
*
|
|
@@ -20161,7 +20011,6 @@ function rgb(value, green, blue) {
|
|
|
20161
20011
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
20162
20012
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
20163
20013
|
}
|
|
20164
|
-
|
|
20165
20014
|
throw new PolishedError(6);
|
|
20166
20015
|
}
|
|
20167
20016
|
|
|
@@ -20208,10 +20057,62 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
20208
20057
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
20209
20058
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
20210
20059
|
}
|
|
20211
|
-
|
|
20212
20060
|
throw new PolishedError(7);
|
|
20213
20061
|
}
|
|
20214
20062
|
|
|
20063
|
+
var isRgb = function isRgb(color) {
|
|
20064
|
+
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20065
|
+
};
|
|
20066
|
+
var isRgba$1 = function isRgba(color) {
|
|
20067
|
+
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
|
|
20068
|
+
};
|
|
20069
|
+
var isHsl = function isHsl(color) {
|
|
20070
|
+
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20071
|
+
};
|
|
20072
|
+
var isHsla$1 = function isHsla(color) {
|
|
20073
|
+
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
|
|
20074
|
+
};
|
|
20075
|
+
|
|
20076
|
+
/**
|
|
20077
|
+
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
20078
|
+
* This util is useful in case you only know on runtime which color object is
|
|
20079
|
+
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
20080
|
+
*
|
|
20081
|
+
* @example
|
|
20082
|
+
* // Styles as object usage
|
|
20083
|
+
* const styles = {
|
|
20084
|
+
* background: toColorString({ red: 255, green: 205, blue: 100 }),
|
|
20085
|
+
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
|
|
20086
|
+
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
|
|
20087
|
+
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
|
|
20088
|
+
* }
|
|
20089
|
+
*
|
|
20090
|
+
* // styled-components usage
|
|
20091
|
+
* const div = styled.div`
|
|
20092
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
20093
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
20094
|
+
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
20095
|
+
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
20096
|
+
* `
|
|
20097
|
+
*
|
|
20098
|
+
* // CSS in JS Output
|
|
20099
|
+
* element {
|
|
20100
|
+
* background: "#ffcd64";
|
|
20101
|
+
* background: "rgba(255,205,100,0.72)";
|
|
20102
|
+
* background: "#00f";
|
|
20103
|
+
* background: "rgba(179,25,25,0.72)";
|
|
20104
|
+
* }
|
|
20105
|
+
*/
|
|
20106
|
+
|
|
20107
|
+
function toColorString(color) {
|
|
20108
|
+
if (typeof color !== 'object') throw new PolishedError(8);
|
|
20109
|
+
if (isRgba$1(color)) return rgba$1(color);
|
|
20110
|
+
if (isRgb(color)) return rgb(color);
|
|
20111
|
+
if (isHsla$1(color)) return hsla$1(color);
|
|
20112
|
+
if (isHsl(color)) return hsl(color);
|
|
20113
|
+
throw new PolishedError(8);
|
|
20114
|
+
}
|
|
20115
|
+
|
|
20215
20116
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
20216
20117
|
// eslint-disable-next-line no-unused-vars
|
|
20217
20118
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -20222,14 +20123,156 @@ function curried(f, length, acc) {
|
|
|
20222
20123
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
20223
20124
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
20224
20125
|
};
|
|
20225
|
-
}
|
|
20226
|
-
|
|
20126
|
+
}
|
|
20227
20127
|
|
|
20128
|
+
// eslint-disable-next-line no-redeclare
|
|
20228
20129
|
function curry(f) {
|
|
20229
20130
|
// eslint-disable-line no-redeclare
|
|
20230
20131
|
return curried(f, f.length, []);
|
|
20231
20132
|
}
|
|
20232
20133
|
|
|
20134
|
+
/**
|
|
20135
|
+
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
20136
|
+
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
20137
|
+
* the color wheel, always producing a positive hue value.
|
|
20138
|
+
*
|
|
20139
|
+
* @example
|
|
20140
|
+
* // Styles as object usage
|
|
20141
|
+
* const styles = {
|
|
20142
|
+
* background: adjustHue(180, '#448'),
|
|
20143
|
+
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
20144
|
+
* }
|
|
20145
|
+
*
|
|
20146
|
+
* // styled-components usage
|
|
20147
|
+
* const div = styled.div`
|
|
20148
|
+
* background: ${adjustHue(180, '#448')};
|
|
20149
|
+
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
20150
|
+
* `
|
|
20151
|
+
*
|
|
20152
|
+
* // CSS in JS Output
|
|
20153
|
+
* element {
|
|
20154
|
+
* background: "#888844";
|
|
20155
|
+
* background: "rgba(136,136,68,0.7)";
|
|
20156
|
+
* }
|
|
20157
|
+
*/
|
|
20158
|
+
function adjustHue(degree, color) {
|
|
20159
|
+
if (color === 'transparent') return color;
|
|
20160
|
+
var hslColor = parseToHsl(color);
|
|
20161
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20162
|
+
hue: hslColor.hue + parseFloat(degree)
|
|
20163
|
+
}));
|
|
20164
|
+
}
|
|
20165
|
+
|
|
20166
|
+
// prettier-ignore
|
|
20167
|
+
var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
|
|
20168
|
+
|
|
20169
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
20170
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
20171
|
+
}
|
|
20172
|
+
|
|
20173
|
+
/**
|
|
20174
|
+
* Returns a string value for the darkened color.
|
|
20175
|
+
*
|
|
20176
|
+
* @example
|
|
20177
|
+
* // Styles as object usage
|
|
20178
|
+
* const styles = {
|
|
20179
|
+
* background: darken(0.2, '#FFCD64'),
|
|
20180
|
+
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
20181
|
+
* }
|
|
20182
|
+
*
|
|
20183
|
+
* // styled-components usage
|
|
20184
|
+
* const div = styled.div`
|
|
20185
|
+
* background: ${darken(0.2, '#FFCD64')};
|
|
20186
|
+
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
20187
|
+
* `
|
|
20188
|
+
*
|
|
20189
|
+
* // CSS in JS Output
|
|
20190
|
+
*
|
|
20191
|
+
* element {
|
|
20192
|
+
* background: "#ffbd31";
|
|
20193
|
+
* background: "rgba(255,189,49,0.7)";
|
|
20194
|
+
* }
|
|
20195
|
+
*/
|
|
20196
|
+
function darken(amount, color) {
|
|
20197
|
+
if (color === 'transparent') return color;
|
|
20198
|
+
var hslColor = parseToHsl(color);
|
|
20199
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20200
|
+
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
|
|
20201
|
+
}));
|
|
20202
|
+
}
|
|
20203
|
+
|
|
20204
|
+
// prettier-ignore
|
|
20205
|
+
var curriedDarken = curry /* ::<number | string, string, string> */(darken);
|
|
20206
|
+
|
|
20207
|
+
/**
|
|
20208
|
+
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
20209
|
+
* argument of the desaturate function is the amount by how much the color
|
|
20210
|
+
* intensity should be decreased.
|
|
20211
|
+
*
|
|
20212
|
+
* @example
|
|
20213
|
+
* // Styles as object usage
|
|
20214
|
+
* const styles = {
|
|
20215
|
+
* background: desaturate(0.2, '#CCCD64'),
|
|
20216
|
+
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20217
|
+
* }
|
|
20218
|
+
*
|
|
20219
|
+
* // styled-components usage
|
|
20220
|
+
* const div = styled.div`
|
|
20221
|
+
* background: ${desaturate(0.2, '#CCCD64')};
|
|
20222
|
+
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20223
|
+
* `
|
|
20224
|
+
*
|
|
20225
|
+
* // CSS in JS Output
|
|
20226
|
+
* element {
|
|
20227
|
+
* background: "#b8b979";
|
|
20228
|
+
* background: "rgba(184,185,121,0.7)";
|
|
20229
|
+
* }
|
|
20230
|
+
*/
|
|
20231
|
+
function desaturate(amount, color) {
|
|
20232
|
+
if (color === 'transparent') return color;
|
|
20233
|
+
var hslColor = parseToHsl(color);
|
|
20234
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20235
|
+
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
|
|
20236
|
+
}));
|
|
20237
|
+
}
|
|
20238
|
+
|
|
20239
|
+
// prettier-ignore
|
|
20240
|
+
var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
|
|
20241
|
+
|
|
20242
|
+
/**
|
|
20243
|
+
* Returns a string value for the lightened color.
|
|
20244
|
+
*
|
|
20245
|
+
* @example
|
|
20246
|
+
* // Styles as object usage
|
|
20247
|
+
* const styles = {
|
|
20248
|
+
* background: lighten(0.2, '#CCCD64'),
|
|
20249
|
+
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
20250
|
+
* }
|
|
20251
|
+
*
|
|
20252
|
+
* // styled-components usage
|
|
20253
|
+
* const div = styled.div`
|
|
20254
|
+
* background: ${lighten(0.2, '#FFCD64')};
|
|
20255
|
+
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
20256
|
+
* `
|
|
20257
|
+
*
|
|
20258
|
+
* // CSS in JS Output
|
|
20259
|
+
*
|
|
20260
|
+
* element {
|
|
20261
|
+
* background: "#e5e6b1";
|
|
20262
|
+
* background: "rgba(229,230,177,0.7)";
|
|
20263
|
+
* }
|
|
20264
|
+
*/
|
|
20265
|
+
function lighten(amount, color) {
|
|
20266
|
+
if (color === 'transparent') return color;
|
|
20267
|
+
var hslColor = parseToHsl(color);
|
|
20268
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20269
|
+
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
|
|
20270
|
+
}));
|
|
20271
|
+
}
|
|
20272
|
+
|
|
20273
|
+
// prettier-ignore
|
|
20274
|
+
var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
20275
|
+
|
|
20233
20276
|
/**
|
|
20234
20277
|
* 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.
|
|
20235
20278
|
*
|
|
@@ -20256,25 +20299,21 @@ function curry(f) {
|
|
|
20256
20299
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
20257
20300
|
* }
|
|
20258
20301
|
*/
|
|
20259
|
-
|
|
20260
20302
|
function mix$1(weight, color, otherColor) {
|
|
20261
20303
|
if (color === 'transparent') return otherColor;
|
|
20262
20304
|
if (otherColor === 'transparent') return color;
|
|
20263
20305
|
if (weight === 0) return otherColor;
|
|
20264
20306
|
var parsedColor1 = parseToRgb(color);
|
|
20265
|
-
|
|
20266
20307
|
var color1 = _extends$1({}, parsedColor1, {
|
|
20267
20308
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20268
20309
|
});
|
|
20269
|
-
|
|
20270
20310
|
var parsedColor2 = parseToRgb(otherColor);
|
|
20271
|
-
|
|
20272
20311
|
var color2 = _extends$1({}, parsedColor2, {
|
|
20273
20312
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
20274
|
-
});
|
|
20275
|
-
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20276
|
-
|
|
20313
|
+
});
|
|
20277
20314
|
|
|
20315
|
+
// The formula is copied from the original Sass implementation:
|
|
20316
|
+
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20278
20317
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
20279
20318
|
var x = parseFloat(weight) * 2 - 1;
|
|
20280
20319
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -20288,14 +20327,218 @@ function mix$1(weight, color, otherColor) {
|
|
|
20288
20327
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
20289
20328
|
};
|
|
20290
20329
|
return rgba$1(mixedColor);
|
|
20291
|
-
}
|
|
20292
|
-
|
|
20330
|
+
}
|
|
20293
20331
|
|
|
20294
|
-
|
|
20295
|
-
/* ::<number | string, string, string, string> */
|
|
20296
|
-
(mix$1);
|
|
20332
|
+
// prettier-ignore
|
|
20333
|
+
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
20297
20334
|
var mix$1$1 = curriedMix;
|
|
20298
20335
|
|
|
20336
|
+
/**
|
|
20337
|
+
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20338
|
+
*
|
|
20339
|
+
*
|
|
20340
|
+
* @example
|
|
20341
|
+
* // Styles as object usage
|
|
20342
|
+
* const styles = {
|
|
20343
|
+
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
20344
|
+
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
20345
|
+
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
20346
|
+
* }
|
|
20347
|
+
*
|
|
20348
|
+
* // styled-components usage
|
|
20349
|
+
* const div = styled.div`
|
|
20350
|
+
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
20351
|
+
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
20352
|
+
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
20353
|
+
* `
|
|
20354
|
+
*
|
|
20355
|
+
* // CSS in JS Output
|
|
20356
|
+
*
|
|
20357
|
+
* element {
|
|
20358
|
+
* background: "#fff";
|
|
20359
|
+
* background: "rgba(255,255,255,0.7)";
|
|
20360
|
+
* background: "rgba(255,0,0,0.7)";
|
|
20361
|
+
* }
|
|
20362
|
+
*/
|
|
20363
|
+
function opacify(amount, color) {
|
|
20364
|
+
if (color === 'transparent') return color;
|
|
20365
|
+
var parsedColor = parseToRgb(color);
|
|
20366
|
+
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20367
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20368
|
+
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
20369
|
+
});
|
|
20370
|
+
return rgba$1(colorWithAlpha);
|
|
20371
|
+
}
|
|
20372
|
+
|
|
20373
|
+
// prettier-ignore
|
|
20374
|
+
var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
|
|
20375
|
+
|
|
20376
|
+
/**
|
|
20377
|
+
* Increases the intensity of a color. Its range is between 0 to 1. The first
|
|
20378
|
+
* argument of the saturate function is the amount by how much the color
|
|
20379
|
+
* intensity should be increased.
|
|
20380
|
+
*
|
|
20381
|
+
* @example
|
|
20382
|
+
* // Styles as object usage
|
|
20383
|
+
* const styles = {
|
|
20384
|
+
* background: saturate(0.2, '#CCCD64'),
|
|
20385
|
+
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20386
|
+
* }
|
|
20387
|
+
*
|
|
20388
|
+
* // styled-components usage
|
|
20389
|
+
* const div = styled.div`
|
|
20390
|
+
* background: ${saturate(0.2, '#FFCD64')};
|
|
20391
|
+
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20392
|
+
* `
|
|
20393
|
+
*
|
|
20394
|
+
* // CSS in JS Output
|
|
20395
|
+
*
|
|
20396
|
+
* element {
|
|
20397
|
+
* background: "#e0e250";
|
|
20398
|
+
* background: "rgba(224,226,80,0.7)";
|
|
20399
|
+
* }
|
|
20400
|
+
*/
|
|
20401
|
+
function saturate(amount, color) {
|
|
20402
|
+
if (color === 'transparent') return color;
|
|
20403
|
+
var hslColor = parseToHsl(color);
|
|
20404
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20405
|
+
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
|
|
20406
|
+
}));
|
|
20407
|
+
}
|
|
20408
|
+
|
|
20409
|
+
// prettier-ignore
|
|
20410
|
+
var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
|
|
20411
|
+
|
|
20412
|
+
/**
|
|
20413
|
+
* Sets the hue of a color to the provided value. The hue range can be
|
|
20414
|
+
* from 0 and 359.
|
|
20415
|
+
*
|
|
20416
|
+
* @example
|
|
20417
|
+
* // Styles as object usage
|
|
20418
|
+
* const styles = {
|
|
20419
|
+
* background: setHue(42, '#CCCD64'),
|
|
20420
|
+
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
20421
|
+
* }
|
|
20422
|
+
*
|
|
20423
|
+
* // styled-components usage
|
|
20424
|
+
* const div = styled.div`
|
|
20425
|
+
* background: ${setHue(42, '#CCCD64')};
|
|
20426
|
+
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
20427
|
+
* `
|
|
20428
|
+
*
|
|
20429
|
+
* // CSS in JS Output
|
|
20430
|
+
* element {
|
|
20431
|
+
* background: "#cdae64";
|
|
20432
|
+
* background: "rgba(107,100,205,0.7)";
|
|
20433
|
+
* }
|
|
20434
|
+
*/
|
|
20435
|
+
function setHue(hue, color) {
|
|
20436
|
+
if (color === 'transparent') return color;
|
|
20437
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20438
|
+
hue: parseFloat(hue)
|
|
20439
|
+
}));
|
|
20440
|
+
}
|
|
20441
|
+
|
|
20442
|
+
// prettier-ignore
|
|
20443
|
+
var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
|
|
20444
|
+
|
|
20445
|
+
/**
|
|
20446
|
+
* Sets the lightness of a color to the provided value. The lightness range can be
|
|
20447
|
+
* from 0 and 1.
|
|
20448
|
+
*
|
|
20449
|
+
* @example
|
|
20450
|
+
* // Styles as object usage
|
|
20451
|
+
* const styles = {
|
|
20452
|
+
* background: setLightness(0.2, '#CCCD64'),
|
|
20453
|
+
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
20454
|
+
* }
|
|
20455
|
+
*
|
|
20456
|
+
* // styled-components usage
|
|
20457
|
+
* const div = styled.div`
|
|
20458
|
+
* background: ${setLightness(0.2, '#CCCD64')};
|
|
20459
|
+
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
20460
|
+
* `
|
|
20461
|
+
*
|
|
20462
|
+
* // CSS in JS Output
|
|
20463
|
+
* element {
|
|
20464
|
+
* background: "#4d4d19";
|
|
20465
|
+
* background: "rgba(223,224,159,0.7)";
|
|
20466
|
+
* }
|
|
20467
|
+
*/
|
|
20468
|
+
function setLightness(lightness, color) {
|
|
20469
|
+
if (color === 'transparent') return color;
|
|
20470
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20471
|
+
lightness: parseFloat(lightness)
|
|
20472
|
+
}));
|
|
20473
|
+
}
|
|
20474
|
+
|
|
20475
|
+
// prettier-ignore
|
|
20476
|
+
var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
|
|
20477
|
+
|
|
20478
|
+
/**
|
|
20479
|
+
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
20480
|
+
* from 0 and 1.
|
|
20481
|
+
*
|
|
20482
|
+
* @example
|
|
20483
|
+
* // Styles as object usage
|
|
20484
|
+
* const styles = {
|
|
20485
|
+
* background: setSaturation(0.2, '#CCCD64'),
|
|
20486
|
+
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
20487
|
+
* }
|
|
20488
|
+
*
|
|
20489
|
+
* // styled-components usage
|
|
20490
|
+
* const div = styled.div`
|
|
20491
|
+
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
20492
|
+
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
20493
|
+
* `
|
|
20494
|
+
*
|
|
20495
|
+
* // CSS in JS Output
|
|
20496
|
+
* element {
|
|
20497
|
+
* background: "#adad84";
|
|
20498
|
+
* background: "rgba(228,229,76,0.7)";
|
|
20499
|
+
* }
|
|
20500
|
+
*/
|
|
20501
|
+
function setSaturation(saturation, color) {
|
|
20502
|
+
if (color === 'transparent') return color;
|
|
20503
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20504
|
+
saturation: parseFloat(saturation)
|
|
20505
|
+
}));
|
|
20506
|
+
}
|
|
20507
|
+
|
|
20508
|
+
// prettier-ignore
|
|
20509
|
+
var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
|
|
20510
|
+
|
|
20511
|
+
/**
|
|
20512
|
+
* Shades a color by mixing it with black. `shade` can produce
|
|
20513
|
+
* hue shifts, where as `darken` manipulates the luminance channel and therefore
|
|
20514
|
+
* doesn't produce hue shifts.
|
|
20515
|
+
*
|
|
20516
|
+
* @example
|
|
20517
|
+
* // Styles as object usage
|
|
20518
|
+
* const styles = {
|
|
20519
|
+
* background: shade(0.25, '#00f')
|
|
20520
|
+
* }
|
|
20521
|
+
*
|
|
20522
|
+
* // styled-components usage
|
|
20523
|
+
* const div = styled.div`
|
|
20524
|
+
* background: ${shade(0.25, '#00f')};
|
|
20525
|
+
* `
|
|
20526
|
+
*
|
|
20527
|
+
* // CSS in JS Output
|
|
20528
|
+
*
|
|
20529
|
+
* element {
|
|
20530
|
+
* background: "#00003f";
|
|
20531
|
+
* }
|
|
20532
|
+
*/
|
|
20533
|
+
|
|
20534
|
+
function shade(percentage, color) {
|
|
20535
|
+
if (color === 'transparent') return color;
|
|
20536
|
+
return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
|
|
20537
|
+
}
|
|
20538
|
+
|
|
20539
|
+
// prettier-ignore
|
|
20540
|
+
var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
20541
|
+
|
|
20299
20542
|
/**
|
|
20300
20543
|
* Tints a color by mixing it with white. `tint` can produce
|
|
20301
20544
|
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
@@ -20322,14 +20565,52 @@ var mix$1$1 = curriedMix;
|
|
|
20322
20565
|
function tint(percentage, color) {
|
|
20323
20566
|
if (color === 'transparent') return color;
|
|
20324
20567
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20325
|
-
}
|
|
20326
|
-
|
|
20568
|
+
}
|
|
20327
20569
|
|
|
20328
|
-
|
|
20329
|
-
/* ::<number | string, string, string> */
|
|
20330
|
-
(tint);
|
|
20570
|
+
// prettier-ignore
|
|
20571
|
+
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
20331
20572
|
var curriedTint$1 = curriedTint;
|
|
20332
20573
|
|
|
20574
|
+
/**
|
|
20575
|
+
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20576
|
+
*
|
|
20577
|
+
*
|
|
20578
|
+
* @example
|
|
20579
|
+
* // Styles as object usage
|
|
20580
|
+
* const styles = {
|
|
20581
|
+
* background: transparentize(0.1, '#fff'),
|
|
20582
|
+
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
20583
|
+
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
20584
|
+
* }
|
|
20585
|
+
*
|
|
20586
|
+
* // styled-components usage
|
|
20587
|
+
* const div = styled.div`
|
|
20588
|
+
* background: ${transparentize(0.1, '#fff')};
|
|
20589
|
+
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
20590
|
+
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
20591
|
+
* `
|
|
20592
|
+
*
|
|
20593
|
+
* // CSS in JS Output
|
|
20594
|
+
*
|
|
20595
|
+
* element {
|
|
20596
|
+
* background: "rgba(255,255,255,0.9)";
|
|
20597
|
+
* background: "rgba(255,255,255,0.8)";
|
|
20598
|
+
* background: "rgba(255,0,0,0.3)";
|
|
20599
|
+
* }
|
|
20600
|
+
*/
|
|
20601
|
+
function transparentize(amount, color) {
|
|
20602
|
+
if (color === 'transparent') return color;
|
|
20603
|
+
var parsedColor = parseToRgb(color);
|
|
20604
|
+
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20605
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20606
|
+
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
20607
|
+
});
|
|
20608
|
+
return rgba$1(colorWithAlpha);
|
|
20609
|
+
}
|
|
20610
|
+
|
|
20611
|
+
// prettier-ignore
|
|
20612
|
+
var curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);
|
|
20613
|
+
|
|
20333
20614
|
var linkColor = MATISSE_BLUE;
|
|
20334
20615
|
var fallbackValues$8 = {
|
|
20335
20616
|
linkColor: linkColor
|
|
@@ -23019,32 +23300,19 @@ var toIndexedObject = function (it) {
|
|
|
23019
23300
|
return indexedObject(requireObjectCoercible(it));
|
|
23020
23301
|
};
|
|
23021
23302
|
|
|
23022
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
23023
|
-
|
|
23024
23303
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23025
|
-
|
|
23026
|
-
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
23027
|
-
|
|
23028
|
-
var documentAll_1 = {
|
|
23029
|
-
all: documentAll,
|
|
23030
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
23031
|
-
};
|
|
23032
|
-
|
|
23033
|
-
var documentAll$1 = documentAll_1.all;
|
|
23304
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
23034
23305
|
|
|
23035
23306
|
// `IsCallable` abstract operation
|
|
23036
23307
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
23037
|
-
|
|
23038
|
-
|
|
23308
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
23309
|
+
var isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
23310
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
23039
23311
|
} : function (argument) {
|
|
23040
23312
|
return typeof argument == 'function';
|
|
23041
23313
|
};
|
|
23042
23314
|
|
|
23043
|
-
var
|
|
23044
|
-
|
|
23045
|
-
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
23046
|
-
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
23047
|
-
} : function (it) {
|
|
23315
|
+
var isObject = function (it) {
|
|
23048
23316
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
23049
23317
|
};
|
|
23050
23318
|
|
|
@@ -23180,10 +23448,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
23180
23448
|
(module.exports = function (key, value) {
|
|
23181
23449
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
23182
23450
|
})('versions', []).push({
|
|
23183
|
-
version: '3.
|
|
23451
|
+
version: '3.35.1',
|
|
23184
23452
|
mode: 'global',
|
|
23185
|
-
copyright: '© 2014-
|
|
23186
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
23453
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
23454
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
|
|
23187
23455
|
source: 'https://github.com/zloirock/core-js'
|
|
23188
23456
|
});
|
|
23189
23457
|
});
|
|
@@ -23480,7 +23748,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
23480
23748
|
|
|
23481
23749
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23482
23750
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23483
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23751
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
23484
23752
|
}
|
|
23485
23753
|
if (options && options.getter) name = 'get ' + name;
|
|
23486
23754
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23568,7 +23836,8 @@ var min$1 = Math.min;
|
|
|
23568
23836
|
// `ToLength` abstract operation
|
|
23569
23837
|
// https://tc39.es/ecma262/#sec-tolength
|
|
23570
23838
|
var toLength = function (argument) {
|
|
23571
|
-
|
|
23839
|
+
var len = toIntegerOrInfinity(argument);
|
|
23840
|
+
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23572
23841
|
};
|
|
23573
23842
|
|
|
23574
23843
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -23728,7 +23997,7 @@ var _export = function (options, source) {
|
|
|
23728
23997
|
} else if (STATIC) {
|
|
23729
23998
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
23730
23999
|
} else {
|
|
23731
|
-
target =
|
|
24000
|
+
target = global_1[TARGET] && global_1[TARGET].prototype;
|
|
23732
24001
|
}
|
|
23733
24002
|
if (target) for (key in source) {
|
|
23734
24003
|
sourceProperty = source[key];
|
|
@@ -23991,11 +24260,15 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
23991
24260
|
} catch (error) { /* empty */ }
|
|
23992
24261
|
};
|
|
23993
24262
|
|
|
24263
|
+
var isPossiblePrototype = function (argument) {
|
|
24264
|
+
return isObject(argument) || argument === null;
|
|
24265
|
+
};
|
|
24266
|
+
|
|
23994
24267
|
var $String$4 = String;
|
|
23995
24268
|
var $TypeError$6 = TypeError;
|
|
23996
24269
|
|
|
23997
24270
|
var aPossiblePrototype = function (argument) {
|
|
23998
|
-
if (
|
|
24271
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
23999
24272
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
24000
24273
|
};
|
|
24001
24274
|
|
|
@@ -45841,15 +46114,13 @@ var NavMenuMobile = function NavMenuMobile(_ref2) {
|
|
|
45841
46114
|
};
|
|
45842
46115
|
var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$K, "profile");
|
|
45843
46116
|
|
|
45844
|
-
// Uses the theme values (singleIconColor) for the other icons, located in /atoms/icons
|
|
45845
|
-
|
|
45846
46117
|
var IconsModule = function IconsModule(_ref) {
|
|
45847
46118
|
var icon = _ref.icon,
|
|
45848
46119
|
iconDefault = _ref.iconDefault,
|
|
45849
46120
|
configIconMap = _ref.configIconMap,
|
|
45850
46121
|
iconValue = _ref.iconValue,
|
|
45851
46122
|
customAttributes = _ref.customAttributes,
|
|
45852
|
-
|
|
46123
|
+
iconColor = _ref.iconColor;
|
|
45853
46124
|
var Icon;
|
|
45854
46125
|
if (_typeof(icon) === "object") {
|
|
45855
46126
|
var _configIconMap$iconID;
|
|
@@ -45865,10 +46136,9 @@ var IconsModule = function IconsModule(_ref) {
|
|
|
45865
46136
|
justify: "center",
|
|
45866
46137
|
align: "center"
|
|
45867
46138
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
45868
|
-
color:
|
|
46139
|
+
color: iconColor
|
|
45869
46140
|
})));
|
|
45870
46141
|
};
|
|
45871
|
-
var IconModule = themeComponent(IconsModule, "Icon", fallbackValues$2, "primary");
|
|
45872
46142
|
|
|
45873
46143
|
var TitleModule = function TitleModule(_ref) {
|
|
45874
46144
|
var title = _ref.title,
|
|
@@ -45893,22 +46163,7 @@ var TitleModule = function TitleModule(_ref) {
|
|
|
45893
46163
|
}, subtitle)));
|
|
45894
46164
|
};
|
|
45895
46165
|
|
|
45896
|
-
var
|
|
45897
|
-
var hoverColor$5 = "#116285";
|
|
45898
|
-
var activeColor$8 = "#0E506D";
|
|
45899
|
-
var linkColor$4 = "#3176AA";
|
|
45900
|
-
var fontWeight$6 = FONT_WEIGHT_REGULAR;
|
|
45901
|
-
var modalLinkHoverFocus = "outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;";
|
|
45902
|
-
var fallbackValues$L = {
|
|
45903
|
-
color: color$c,
|
|
45904
|
-
hoverColor: hoverColor$5,
|
|
45905
|
-
activeColor: activeColor$8,
|
|
45906
|
-
linkColor: linkColor$4,
|
|
45907
|
-
fontWeight: fontWeight$6,
|
|
45908
|
-
modalLinkHoverFocus: modalLinkHoverFocus
|
|
45909
|
-
};
|
|
45910
|
-
|
|
45911
|
-
var AutopayModal = function AutopayModal(_ref) {
|
|
46166
|
+
var AutopayModalModule = function AutopayModalModule(_ref) {
|
|
45912
46167
|
var autoPayActive = _ref.autoPayActive,
|
|
45913
46168
|
autoPaySchedule = _ref.autoPaySchedule,
|
|
45914
46169
|
paymentPlanSchedule = _ref.paymentPlanSchedule,
|
|
@@ -45919,7 +46174,6 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
45919
46174
|
_ref$controlType = _ref.controlType,
|
|
45920
46175
|
controlType = _ref$controlType === void 0 ? "tertiary" : _ref$controlType,
|
|
45921
46176
|
isMobile = _ref.isMobile,
|
|
45922
|
-
themeValues = _ref.themeValues,
|
|
45923
46177
|
isPaymentPlan = _ref.isPaymentPlan,
|
|
45924
46178
|
nextAutopayDate = _ref.nextAutopayDate,
|
|
45925
46179
|
dueDate = _ref.dueDate,
|
|
@@ -45953,6 +46207,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
45953
46207
|
toggleModal(false);
|
|
45954
46208
|
} : navigateToSettings
|
|
45955
46209
|
};
|
|
46210
|
+
var modalLinkHoverFocus = "\n outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;\n ";
|
|
45956
46211
|
var hoverStyles = "text-decoration: underline;";
|
|
45957
46212
|
var activeStyles = "text-decoration: underline;";
|
|
45958
46213
|
var renderAutoPayControl = function renderAutoPayControl() {
|
|
@@ -46007,8 +46262,8 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46007
46262
|
tabIndex: "0",
|
|
46008
46263
|
dataQa: "".concat(shortPlan, " On"),
|
|
46009
46264
|
color: SEA_GREEN,
|
|
46010
|
-
weight:
|
|
46011
|
-
hoverStyles:
|
|
46265
|
+
weight: FONT_WEIGHT_REGULAR,
|
|
46266
|
+
hoverStyles: modalLinkHoverFocus,
|
|
46012
46267
|
extraStyles: "padding-left: 0.25rem;",
|
|
46013
46268
|
disabled: disableActions
|
|
46014
46269
|
}, "".concat(shortPlan, " ").concat(nextAutopayDate))));
|
|
@@ -46025,7 +46280,6 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46025
46280
|
modalOpen: modalOpen
|
|
46026
46281
|
}, modalExtraProps), renderAutoPayControl());
|
|
46027
46282
|
};
|
|
46028
|
-
var AutopayModalModule = themeComponent(AutopayModal, "AutopayModal", fallbackValues$L);
|
|
46029
46283
|
|
|
46030
46284
|
var AmountModule = function AmountModule(_ref) {
|
|
46031
46285
|
var totalAmountDue = _ref.totalAmountDue,
|
|
@@ -46221,10 +46475,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
46221
46475
|
width: "100%"
|
|
46222
46476
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46223
46477
|
isLoading: isLoading,
|
|
46224
|
-
action: function
|
|
46225
|
-
return
|
|
46226
|
-
return handleClick(obligations);
|
|
46227
|
-
};
|
|
46478
|
+
action: disableActions ? noop : function () {
|
|
46479
|
+
return handleClick(obligations);
|
|
46228
46480
|
},
|
|
46229
46481
|
text: "Pay Now",
|
|
46230
46482
|
variant: isMobile ? "smallSecondary" : "secondary",
|
|
@@ -46386,6 +46638,11 @@ var InactiveTitleModule = function InactiveTitleModule(_ref) {
|
|
|
46386
46638
|
}, "This may mean that the balance has been paid, or there was an error loading it.".concat(autoPayEnabled ? " You may disable autopay for this account by pressing the 'Turn off Autopay' button." : ""))));
|
|
46387
46639
|
};
|
|
46388
46640
|
|
|
46641
|
+
var iconColor = ROYAL_BLUE_VIVID;
|
|
46642
|
+
var fallbackValues$L = {
|
|
46643
|
+
iconColor: iconColor
|
|
46644
|
+
};
|
|
46645
|
+
|
|
46389
46646
|
var Obligation = function Obligation(_ref) {
|
|
46390
46647
|
var _obligations$, _firstObligation$cust;
|
|
46391
46648
|
var config = _ref.config,
|
|
@@ -46413,7 +46670,8 @@ var Obligation = function Obligation(_ref) {
|
|
|
46413
46670
|
_ref$inactiveLookupVa = _ref.inactiveLookupValue,
|
|
46414
46671
|
inactiveLookupValue = _ref$inactiveLookupVa === void 0 ? "" : _ref$inactiveLookupVa,
|
|
46415
46672
|
_ref$isInCustomerMana = _ref.isInCustomerManagement,
|
|
46416
|
-
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana
|
|
46673
|
+
isInCustomerManagement = _ref$isInCustomerMana === void 0 ? false : _ref$isInCustomerMana,
|
|
46674
|
+
themeValues = _ref.themeValues;
|
|
46417
46675
|
/*
|
|
46418
46676
|
The value of obligations is always an array. It can contain:
|
|
46419
46677
|
- A single obligation
|
|
@@ -46458,7 +46716,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
46458
46716
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
46459
46717
|
justify: "flex-start",
|
|
46460
46718
|
align: "center"
|
|
46461
|
-
}, !isMobile && /*#__PURE__*/React__default.createElement(
|
|
46719
|
+
}, !isMobile && /*#__PURE__*/React__default.createElement(IconsModule, {
|
|
46462
46720
|
icon: config.icon,
|
|
46463
46721
|
iconDefault: config.iconDefault,
|
|
46464
46722
|
configIconMap: config.iconMap,
|
|
@@ -46550,12 +46808,13 @@ var Obligation = function Obligation(_ref) {
|
|
|
46550
46808
|
justify: "flex-start",
|
|
46551
46809
|
align: "center",
|
|
46552
46810
|
nowrap: true
|
|
46553
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
46811
|
+
}, /*#__PURE__*/React__default.createElement(IconsModule, {
|
|
46554
46812
|
icon: config.icon,
|
|
46555
46813
|
iconDefault: config.iconDefault,
|
|
46556
46814
|
configIconMap: config.iconMap,
|
|
46557
46815
|
iconValue: config.iconValue,
|
|
46558
|
-
customAttributes: customAttributes
|
|
46816
|
+
customAttributes: customAttributes,
|
|
46817
|
+
iconColor: themeValues.iconColor
|
|
46559
46818
|
}), /*#__PURE__*/React__default.createElement(InactiveTitleModule, {
|
|
46560
46819
|
title: inactiveLookupTitle,
|
|
46561
46820
|
subtitle: "".concat(inactiveLookupInput, ": ").concat(inactiveLookupValue),
|
|
@@ -46601,6 +46860,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
46601
46860
|
}))));
|
|
46602
46861
|
return inactive ? inactiveObligation : activeObligation;
|
|
46603
46862
|
};
|
|
46863
|
+
var Obligation$1 = themeComponent(Obligation, "Obligation", fallbackValues$L);
|
|
46604
46864
|
|
|
46605
46865
|
var PartialAmountField = function PartialAmountField(_ref) {
|
|
46606
46866
|
var lineItem = _ref.lineItem,
|
|
@@ -46737,9 +46997,9 @@ var arrowColor = WHITE;
|
|
|
46737
46997
|
var numberColor = MATISSE_BLUE;
|
|
46738
46998
|
var hoverBackgroundColor$2 = ALABASTER_WHITE;
|
|
46739
46999
|
var activeBackgroundColor$2 = WHITE;
|
|
46740
|
-
var activeColor$
|
|
47000
|
+
var activeColor$8 = MATISSE_BLUE;
|
|
46741
47001
|
var fallbackValues$M = {
|
|
46742
|
-
activeColor: activeColor$
|
|
47002
|
+
activeColor: activeColor$8,
|
|
46743
47003
|
activeBackgroundColor: activeBackgroundColor$2,
|
|
46744
47004
|
arrowColor: arrowColor,
|
|
46745
47005
|
hoverBackgroundColor: hoverBackgroundColor$2,
|
|
@@ -47402,7 +47662,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47402
47662
|
};
|
|
47403
47663
|
var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$N, "default");
|
|
47404
47664
|
|
|
47405
|
-
var linkColor$
|
|
47665
|
+
var linkColor$4 = {
|
|
47406
47666
|
"default": "#3176AA"
|
|
47407
47667
|
};
|
|
47408
47668
|
var fontSize$a = {
|
|
@@ -47411,21 +47671,21 @@ var fontSize$a = {
|
|
|
47411
47671
|
var lineHeight$4 = {
|
|
47412
47672
|
"default": "1.5rem"
|
|
47413
47673
|
};
|
|
47414
|
-
var fontWeight$
|
|
47674
|
+
var fontWeight$6 = {
|
|
47415
47675
|
"default": FONT_WEIGHT_REGULAR
|
|
47416
47676
|
};
|
|
47417
|
-
var modalLinkHoverFocus
|
|
47677
|
+
var modalLinkHoverFocus = {
|
|
47418
47678
|
"default": "outline: none; text-decoration: underline;"
|
|
47419
47679
|
};
|
|
47420
47680
|
var linkTextDecoration = {
|
|
47421
47681
|
"default": LINK_TEXT_DECORATION
|
|
47422
47682
|
};
|
|
47423
47683
|
var fallbackValues$O = {
|
|
47424
|
-
linkColor: linkColor$
|
|
47684
|
+
linkColor: linkColor$4,
|
|
47425
47685
|
fontSize: fontSize$a,
|
|
47426
47686
|
lineHeight: lineHeight$4,
|
|
47427
|
-
fontWeight: fontWeight$
|
|
47428
|
-
modalLinkHoverFocus: modalLinkHoverFocus
|
|
47687
|
+
fontWeight: fontWeight$6,
|
|
47688
|
+
modalLinkHoverFocus: modalLinkHoverFocus,
|
|
47429
47689
|
linkTextDecoration: linkTextDecoration
|
|
47430
47690
|
};
|
|
47431
47691
|
|
|
@@ -47490,7 +47750,7 @@ var backgroundColor$d = {
|
|
|
47490
47750
|
"default": "#ffffff",
|
|
47491
47751
|
footer: "#ffffff"
|
|
47492
47752
|
};
|
|
47493
|
-
var linkColor$
|
|
47753
|
+
var linkColor$5 = {
|
|
47494
47754
|
"default": "#3176AA",
|
|
47495
47755
|
footer: "#ffffff"
|
|
47496
47756
|
};
|
|
@@ -47506,12 +47766,12 @@ var lineHeight$5 = {
|
|
|
47506
47766
|
"default": "1.5rem",
|
|
47507
47767
|
footer: "1.25rem"
|
|
47508
47768
|
};
|
|
47509
|
-
var fontWeight$
|
|
47769
|
+
var fontWeight$7 = {
|
|
47510
47770
|
"default": FONT_WEIGHT_REGULAR,
|
|
47511
47771
|
footer: FONT_WEIGHT_SEMIBOLD
|
|
47512
47772
|
};
|
|
47513
47773
|
var standardInteractionStyles = "\n &:hover {\n outline: none; \n text-decoration: underline;\n }\n &:focus {\n outline: 3px solid #3181E3;\n outline-offset: 2px;\n }\n";
|
|
47514
|
-
var modalLinkHoverFocus$
|
|
47774
|
+
var modalLinkHoverFocus$1 = {
|
|
47515
47775
|
"default": standardInteractionStyles,
|
|
47516
47776
|
footer: standardInteractionStyles
|
|
47517
47777
|
};
|
|
@@ -47521,12 +47781,12 @@ var modalLinkTextDecoration = {
|
|
|
47521
47781
|
};
|
|
47522
47782
|
var fallbackValues$P = {
|
|
47523
47783
|
backgroundColor: backgroundColor$d,
|
|
47524
|
-
linkColor: linkColor$
|
|
47784
|
+
linkColor: linkColor$5,
|
|
47525
47785
|
border: border$3,
|
|
47526
47786
|
fontSize: fontSize$b,
|
|
47527
47787
|
lineHeight: lineHeight$5,
|
|
47528
|
-
fontWeight: fontWeight$
|
|
47529
|
-
modalLinkHoverFocus: modalLinkHoverFocus$
|
|
47788
|
+
fontWeight: fontWeight$7,
|
|
47789
|
+
modalLinkHoverFocus: modalLinkHoverFocus$1,
|
|
47530
47790
|
modalLinkTextDecoration: modalLinkTextDecoration
|
|
47531
47791
|
};
|
|
47532
47792
|
|
|
@@ -48774,16 +49034,9 @@ RegistrationForm.reducer = reducer$9;
|
|
|
48774
49034
|
RegistrationForm.mapStateToProps = mapStateToProps$a;
|
|
48775
49035
|
RegistrationForm.mapDispatchToProps = mapDispatchToProps$9;
|
|
48776
49036
|
|
|
48777
|
-
var GRECIAN_GREY$1 = GRECIAN_GREY;
|
|
48778
|
-
var bannerBackgroundColor = GRECIAN_GREY$1;
|
|
48779
|
-
var fallbackValues$R = {
|
|
48780
|
-
bannerBackgroundColor: bannerBackgroundColor
|
|
48781
|
-
};
|
|
48782
|
-
|
|
48783
49037
|
var ResetConfirmationForm = function ResetConfirmationForm() {
|
|
48784
|
-
var
|
|
48785
|
-
|
|
48786
|
-
var isMobile = themeContext.isMobile;
|
|
49038
|
+
var _useContext = React.useContext(styled.ThemeContext),
|
|
49039
|
+
isMobile = _useContext.isMobile;
|
|
48787
49040
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
48788
49041
|
padding: "0",
|
|
48789
49042
|
width: isMobile ? "auto" : "576px",
|
|
@@ -48791,7 +49044,7 @@ var ResetConfirmationForm = function ResetConfirmationForm() {
|
|
|
48791
49044
|
background: WHITE,
|
|
48792
49045
|
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
|
|
48793
49046
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
48794
|
-
background:
|
|
49047
|
+
background: GRECIAN_GREY,
|
|
48795
49048
|
minWidth: "100%",
|
|
48796
49049
|
padding: "0.5rem"
|
|
48797
49050
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
@@ -48895,16 +49148,9 @@ ResetPasswordForm.reducer = reducer$a;
|
|
|
48895
49148
|
ResetPasswordForm.mapStateToProps = mapStateToProps$b;
|
|
48896
49149
|
ResetPasswordForm.mapDispatchToProps = mapDispatchToProps$a;
|
|
48897
49150
|
|
|
48898
|
-
var
|
|
48899
|
-
var
|
|
48900
|
-
|
|
48901
|
-
bannerBackgroundColor: bannerBackgroundColor$1
|
|
48902
|
-
};
|
|
48903
|
-
|
|
48904
|
-
var ResetPasswordSuccess = function ResetPasswordSuccess() {
|
|
48905
|
-
var themeContext = React.useContext(styled.ThemeContext);
|
|
48906
|
-
var themeValues = createThemeValues(themeContext, fallbackValues$S, "ResetPasswordSuccess");
|
|
48907
|
-
var isMobile = themeContext.isMobile;
|
|
49151
|
+
var ResetConfirmationForm$2 = function ResetConfirmationForm() {
|
|
49152
|
+
var _useContext = React.useContext(styled.ThemeContext),
|
|
49153
|
+
isMobile = _useContext.isMobile;
|
|
48908
49154
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
48909
49155
|
padding: "0",
|
|
48910
49156
|
width: isMobile ? "auto" : "576px",
|
|
@@ -48912,7 +49158,7 @@ var ResetPasswordSuccess = function ResetPasswordSuccess() {
|
|
|
48912
49158
|
background: WHITE,
|
|
48913
49159
|
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
|
|
48914
49160
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
48915
|
-
background:
|
|
49161
|
+
background: GRECIAN_GREY,
|
|
48916
49162
|
minWidth: "100%",
|
|
48917
49163
|
padding: "0.5rem"
|
|
48918
49164
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
@@ -48947,12 +49193,12 @@ var ResetPasswordSuccess = function ResetPasswordSuccess() {
|
|
|
48947
49193
|
linkExtraStyles: "width: 100%;"
|
|
48948
49194
|
}))))));
|
|
48949
49195
|
};
|
|
48950
|
-
var ResetPasswordSuccess
|
|
49196
|
+
var ResetPasswordSuccess = withWindowSize(ResetConfirmationForm$2);
|
|
48951
49197
|
|
|
48952
49198
|
var activeTabBackground = "#FFFFFF";
|
|
48953
49199
|
var activeTabAccent = "#15749D";
|
|
48954
49200
|
var activeTabHover = "#B8D5E1";
|
|
48955
|
-
var fallbackValues$
|
|
49201
|
+
var fallbackValues$R = {
|
|
48956
49202
|
activeTabBackground: activeTabBackground,
|
|
48957
49203
|
activeTabAccent: activeTabAccent,
|
|
48958
49204
|
activeTabHover: activeTabHover
|
|
@@ -49020,12 +49266,12 @@ var Tabs = function Tabs(_ref) {
|
|
|
49020
49266
|
}, tab.content);
|
|
49021
49267
|
}))));
|
|
49022
49268
|
};
|
|
49023
|
-
var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$
|
|
49269
|
+
var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$R);
|
|
49024
49270
|
|
|
49025
49271
|
var activeTabBackground$1 = "#FFFFFF";
|
|
49026
49272
|
var activeTabAccent$1 = "#15749D";
|
|
49027
49273
|
var activeTabHover$1 = "#B8D5E1";
|
|
49028
|
-
var fallbackValues$
|
|
49274
|
+
var fallbackValues$S = {
|
|
49029
49275
|
activeTabBackground: activeTabBackground$1,
|
|
49030
49276
|
activeTabAccent: activeTabAccent$1,
|
|
49031
49277
|
activeTabHover: activeTabHover$1
|
|
@@ -49080,7 +49326,7 @@ var TabSidebar = function TabSidebar(_ref) {
|
|
|
49080
49326
|
}, text)))));
|
|
49081
49327
|
})));
|
|
49082
49328
|
};
|
|
49083
|
-
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$
|
|
49329
|
+
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$S);
|
|
49084
49330
|
|
|
49085
49331
|
var Timeout = function Timeout(_ref) {
|
|
49086
49332
|
var onLogout = _ref.onLogout;
|
|
@@ -49175,13 +49421,13 @@ var ToastNotification = function ToastNotification(_ref) {
|
|
|
49175
49421
|
}, message))), /*#__PURE__*/React__default.createElement(IconQuitLarge, null)));
|
|
49176
49422
|
};
|
|
49177
49423
|
|
|
49178
|
-
var fontWeight$
|
|
49424
|
+
var fontWeight$8 = "600";
|
|
49179
49425
|
var fontColor$1 = WHITE;
|
|
49180
49426
|
var textAlign$1 = "left";
|
|
49181
49427
|
var headerBackgroundColor$1 = BRIGHT_GREY;
|
|
49182
49428
|
var imageBackgroundColor$1 = MATISSE_BLUE;
|
|
49183
|
-
var fallbackValues$
|
|
49184
|
-
fontWeight: fontWeight$
|
|
49429
|
+
var fallbackValues$T = {
|
|
49430
|
+
fontWeight: fontWeight$8,
|
|
49185
49431
|
fontColor: fontColor$1,
|
|
49186
49432
|
textAlign: textAlign$1,
|
|
49187
49433
|
headerBackgroundColor: headerBackgroundColor$1,
|
|
@@ -49225,7 +49471,7 @@ var WelcomeModule = function WelcomeModule(_ref) {
|
|
|
49225
49471
|
src: welcomeImage
|
|
49226
49472
|
})))));
|
|
49227
49473
|
};
|
|
49228
|
-
var WelcomeModule$1 = /*#__PURE__*/React.memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$
|
|
49474
|
+
var WelcomeModule$1 = /*#__PURE__*/React.memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$T));
|
|
49229
49475
|
|
|
49230
49476
|
var WorkflowTile = function WorkflowTile(_ref) {
|
|
49231
49477
|
var _ref$workflowName = _ref.workflowName,
|
|
@@ -49285,7 +49531,7 @@ var menuItemColorDelete = RAZZMATAZZ_RED;
|
|
|
49285
49531
|
var menuItemHoverBackgroundColor = CORNFLOWER_BLUE;
|
|
49286
49532
|
var menuItemHoverBackgroundColorDelete = BLUSH_RED;
|
|
49287
49533
|
var menuItemHoverColor = ROYAL_BLUE_VIVID;
|
|
49288
|
-
var fallbackValues$
|
|
49534
|
+
var fallbackValues$U = {
|
|
49289
49535
|
menuItemBackgroundColor: menuItemBackgroundColor,
|
|
49290
49536
|
menuItemColor: menuItemColor,
|
|
49291
49537
|
menuItemColorDelete: menuItemColorDelete,
|
|
@@ -49352,15 +49598,15 @@ var PopupMenuItem = function PopupMenuItem(_ref) {
|
|
|
49352
49598
|
extraStyles: textExtraStyles
|
|
49353
49599
|
}, text)));
|
|
49354
49600
|
};
|
|
49355
|
-
var PopupMenuItem$1 = themeComponent(PopupMenuItem, "PopupMenuItem", fallbackValues$
|
|
49601
|
+
var PopupMenuItem$1 = themeComponent(PopupMenuItem, "PopupMenuItem", fallbackValues$U);
|
|
49356
49602
|
|
|
49357
|
-
var hoverColor$
|
|
49358
|
-
var activeColor$
|
|
49603
|
+
var hoverColor$5 = "#116285";
|
|
49604
|
+
var activeColor$9 = "#0E506D";
|
|
49359
49605
|
var menuTriggerColor = "#15749D";
|
|
49360
49606
|
var backgroundColor$e = "white";
|
|
49361
|
-
var fallbackValues$
|
|
49362
|
-
hoverColor: hoverColor$
|
|
49363
|
-
activeColor: activeColor$
|
|
49607
|
+
var fallbackValues$V = {
|
|
49608
|
+
hoverColor: hoverColor$5,
|
|
49609
|
+
activeColor: activeColor$9,
|
|
49364
49610
|
menuTriggerColor: menuTriggerColor,
|
|
49365
49611
|
backgroundColor: backgroundColor$e
|
|
49366
49612
|
};
|
|
@@ -49494,10 +49740,10 @@ var PopupMenu = function PopupMenu(_ref) {
|
|
|
49494
49740
|
}, item));
|
|
49495
49741
|
})));
|
|
49496
49742
|
};
|
|
49497
|
-
var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$
|
|
49743
|
+
var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$V);
|
|
49498
49744
|
|
|
49499
49745
|
var pageBackground = "#FBFCFD";
|
|
49500
|
-
var fallbackValues$
|
|
49746
|
+
var fallbackValues$W = {
|
|
49501
49747
|
pageBackground: pageBackground
|
|
49502
49748
|
};
|
|
49503
49749
|
|
|
@@ -49545,7 +49791,7 @@ var CenterSingle = function CenterSingle(_ref) {
|
|
|
49545
49791
|
padding: "0"
|
|
49546
49792
|
})));
|
|
49547
49793
|
};
|
|
49548
|
-
var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$
|
|
49794
|
+
var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$W));
|
|
49549
49795
|
|
|
49550
49796
|
var CenterStack = function CenterStack(_ref) {
|
|
49551
49797
|
var header = _ref.header,
|
|
@@ -49588,7 +49834,7 @@ var CenterStack = function CenterStack(_ref) {
|
|
|
49588
49834
|
padding: "0"
|
|
49589
49835
|
})));
|
|
49590
49836
|
};
|
|
49591
|
-
var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$
|
|
49837
|
+
var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$W));
|
|
49592
49838
|
|
|
49593
49839
|
var CenterSingle$2 = function CenterSingle(_ref) {
|
|
49594
49840
|
var header = _ref.header,
|
|
@@ -49634,7 +49880,7 @@ var CenterSingle$2 = function CenterSingle(_ref) {
|
|
|
49634
49880
|
padding: "0"
|
|
49635
49881
|
})));
|
|
49636
49882
|
};
|
|
49637
|
-
var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$
|
|
49883
|
+
var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$W));
|
|
49638
49884
|
|
|
49639
49885
|
var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
49640
49886
|
var header = _ref.header,
|
|
@@ -49687,7 +49933,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
|
49687
49933
|
padding: "0"
|
|
49688
49934
|
})));
|
|
49689
49935
|
};
|
|
49690
|
-
var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$
|
|
49936
|
+
var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$W));
|
|
49691
49937
|
|
|
49692
49938
|
var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
49693
49939
|
var header = _ref.header,
|
|
@@ -49757,7 +50003,7 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
49757
50003
|
key: "footer-box"
|
|
49758
50004
|
})));
|
|
49759
50005
|
};
|
|
49760
|
-
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$
|
|
50006
|
+
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$W));
|
|
49761
50007
|
|
|
49762
50008
|
var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
|
|
49763
50009
|
var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
@@ -49911,7 +50157,7 @@ exports.NavTabs = NavTabs;
|
|
|
49911
50157
|
exports.NoCustomerResultsIcon = NoCustomerResultsIcon;
|
|
49912
50158
|
exports.NoPaymentResultsIcon = NoPaymentResultsIcon;
|
|
49913
50159
|
exports.NotFoundIcon = NotFoundIcon;
|
|
49914
|
-
exports.Obligation = Obligation;
|
|
50160
|
+
exports.Obligation = Obligation$1;
|
|
49915
50161
|
exports.ObligationIcons = iconsMap;
|
|
49916
50162
|
exports.Pagination = Pagination$1;
|
|
49917
50163
|
exports.Paragraph = Paragraph$1;
|
|
@@ -49955,7 +50201,7 @@ exports.RejectedVelocityIcon = RejectedVelocityIcon;
|
|
|
49955
50201
|
exports.ResetConfirmationForm = ResetConfirmationForm$1;
|
|
49956
50202
|
exports.ResetPasswordForm = ResetPasswordForm;
|
|
49957
50203
|
exports.ResetPasswordIcon = ResetPasswordIcon;
|
|
49958
|
-
exports.ResetPasswordSuccess = ResetPasswordSuccess
|
|
50204
|
+
exports.ResetPasswordSuccess = ResetPasswordSuccess;
|
|
49959
50205
|
exports.RevenueManagementImage = RevenueManagementImage;
|
|
49960
50206
|
exports.RoutingNumberImage = RoutingNumberImage;
|
|
49961
50207
|
exports.SearchIcon = SearchIcon;
|