@thecb/components 11.0.1-beta.0 → 11.0.2-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 +134 -379
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +134 -379
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/link/ExternalLink.js +32 -19
- package/src/components/molecules/modal/ModalControlV1.js +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -236,58 +236,6 @@ function __rest(s, e) {
|
|
|
236
236
|
t[p[i]] = s[p[i]];
|
|
237
237
|
}
|
|
238
238
|
return t;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/*! *****************************************************************************
|
|
242
|
-
Copyright (c) Microsoft Corporation.
|
|
243
|
-
|
|
244
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
245
|
-
purpose with or without fee is hereby granted.
|
|
246
|
-
|
|
247
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
248
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
249
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
250
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
251
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
252
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
253
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
254
|
-
***************************************************************************** */
|
|
255
|
-
/* global Reflect, Promise */
|
|
256
|
-
|
|
257
|
-
var extendStatics$1 = function(d, b) {
|
|
258
|
-
extendStatics$1 = Object.setPrototypeOf ||
|
|
259
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
260
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
261
|
-
return extendStatics$1(d, b);
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
function __extends$1(d, b) {
|
|
265
|
-
extendStatics$1(d, b);
|
|
266
|
-
function __() { this.constructor = d; }
|
|
267
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
var __assign$1 = function() {
|
|
271
|
-
__assign$1 = Object.assign || function __assign(t) {
|
|
272
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
273
|
-
s = arguments[i];
|
|
274
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
275
|
-
}
|
|
276
|
-
return t;
|
|
277
|
-
};
|
|
278
|
-
return __assign$1.apply(this, arguments);
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
function __rest$1(s, e) {
|
|
282
|
-
var t = {};
|
|
283
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
284
|
-
t[p] = s[p];
|
|
285
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
286
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
287
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
288
|
-
t[p[i]] = s[p[i]];
|
|
289
|
-
}
|
|
290
|
-
return t;
|
|
291
239
|
}
|
|
292
240
|
|
|
293
241
|
function __spreadArrays() {
|
|
@@ -298,32 +246,6 @@ function __spreadArrays() {
|
|
|
298
246
|
return r;
|
|
299
247
|
}
|
|
300
248
|
|
|
301
|
-
/*! *****************************************************************************
|
|
302
|
-
Copyright (c) Microsoft Corporation.
|
|
303
|
-
|
|
304
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
305
|
-
purpose with or without fee is hereby granted.
|
|
306
|
-
|
|
307
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
308
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
309
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
310
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
311
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
312
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
313
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
314
|
-
***************************************************************************** */
|
|
315
|
-
|
|
316
|
-
var __assign$2 = function() {
|
|
317
|
-
__assign$2 = Object.assign || function __assign(t) {
|
|
318
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
319
|
-
s = arguments[i];
|
|
320
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
321
|
-
}
|
|
322
|
-
return t;
|
|
323
|
-
};
|
|
324
|
-
return __assign$2.apply(this, arguments);
|
|
325
|
-
};
|
|
326
|
-
|
|
327
249
|
var clamp = function (min, max) { return function (v) {
|
|
328
250
|
return Math.max(Math.min(v, max), min);
|
|
329
251
|
}; };
|
|
@@ -337,8 +259,8 @@ var number = {
|
|
|
337
259
|
parse: parseFloat,
|
|
338
260
|
transform: function (v) { return v; }
|
|
339
261
|
};
|
|
340
|
-
var alpha = __assign
|
|
341
|
-
var scale = __assign
|
|
262
|
+
var alpha = __assign(__assign({}, number), { transform: clamp(0, 1) });
|
|
263
|
+
var scale = __assign(__assign({}, number), { default: 1 });
|
|
342
264
|
|
|
343
265
|
var createUnitType = function (unit) { return ({
|
|
344
266
|
test: function (v) {
|
|
@@ -352,7 +274,7 @@ var percent = createUnitType('%');
|
|
|
352
274
|
var px = createUnitType('px');
|
|
353
275
|
var vh = createUnitType('vh');
|
|
354
276
|
var vw = createUnitType('vw');
|
|
355
|
-
var progressPercentage = __assign
|
|
277
|
+
var progressPercentage = __assign(__assign({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
|
|
356
278
|
|
|
357
279
|
var getValueFromFunctionString = function (value) {
|
|
358
280
|
return value.substring(value.indexOf('(') + 1, value.lastIndexOf(')'));
|
|
@@ -386,7 +308,7 @@ var hslaTemplate = function (_a) {
|
|
|
386
308
|
var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha = _b === void 0 ? 1 : _b;
|
|
387
309
|
return "hsla(" + hue + ", " + saturation + ", " + lightness + ", " + alpha + ")";
|
|
388
310
|
};
|
|
389
|
-
var rgbUnit = __assign
|
|
311
|
+
var rgbUnit = __assign(__assign({}, number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
|
|
390
312
|
function isColorString(color, colorType) {
|
|
391
313
|
return color.startsWith(colorType) && singleColorRegex.test(color);
|
|
392
314
|
}
|
|
@@ -416,7 +338,7 @@ var hsla = {
|
|
|
416
338
|
});
|
|
417
339
|
}
|
|
418
340
|
};
|
|
419
|
-
var hex = __assign
|
|
341
|
+
var hex = __assign(__assign({}, rgba), { test: function (v) { return typeof v === 'string' && isColorString(v, '#'); }, parse: function (v) {
|
|
420
342
|
var r = '';
|
|
421
343
|
var g = '';
|
|
422
344
|
var b = '';
|
|
@@ -952,15 +874,15 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
952
874
|
and limitations under the License.
|
|
953
875
|
***************************************************************************** */
|
|
954
876
|
|
|
955
|
-
var __assign$
|
|
956
|
-
__assign$
|
|
877
|
+
var __assign$1 = function() {
|
|
878
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
957
879
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
958
880
|
s = arguments[i];
|
|
959
881
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
960
882
|
}
|
|
961
883
|
return t;
|
|
962
884
|
};
|
|
963
|
-
return __assign$
|
|
885
|
+
return __assign$1.apply(this, arguments);
|
|
964
886
|
};
|
|
965
887
|
|
|
966
888
|
var mixLinearColor = function (from, to, v) {
|
|
@@ -983,7 +905,7 @@ var mixColor = (function (from, to) {
|
|
|
983
905
|
invariant(fromColorType.transform === toColorType.transform, 'Both colors must be hex/RGBA, OR both must be HSLA.');
|
|
984
906
|
var fromColor = fromColorType.parse(from);
|
|
985
907
|
var toColor = toColorType.parse(to);
|
|
986
|
-
var blended = __assign$
|
|
908
|
+
var blended = __assign$1({}, fromColor);
|
|
987
909
|
var mixFunc = fromColorType === hsla ? mix : mixLinearColor;
|
|
988
910
|
return function (v) {
|
|
989
911
|
for (var key in blended) {
|
|
@@ -1028,7 +950,7 @@ var mixArray = function (from, to) {
|
|
|
1028
950
|
};
|
|
1029
951
|
};
|
|
1030
952
|
var mixObject = function (origin, target) {
|
|
1031
|
-
var output = __assign$
|
|
953
|
+
var output = __assign$1({}, origin, target);
|
|
1032
954
|
var blendValue = {};
|
|
1033
955
|
for (var key in output) {
|
|
1034
956
|
if (origin[key] !== undefined && target[key] !== undefined) {
|
|
@@ -1240,44 +1162,6 @@ var wrap$1 = curryRange(wrap);
|
|
|
1240
1162
|
|
|
1241
1163
|
var clampProgress = clamp$1$1(0, 1);
|
|
1242
1164
|
|
|
1243
|
-
/*! *****************************************************************************
|
|
1244
|
-
Copyright (c) Microsoft Corporation.
|
|
1245
|
-
|
|
1246
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1247
|
-
purpose with or without fee is hereby granted.
|
|
1248
|
-
|
|
1249
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1250
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1251
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1252
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1253
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1254
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1255
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1256
|
-
***************************************************************************** */
|
|
1257
|
-
|
|
1258
|
-
var __assign$4 = function() {
|
|
1259
|
-
__assign$4 = Object.assign || function __assign(t) {
|
|
1260
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1261
|
-
s = arguments[i];
|
|
1262
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
1263
|
-
}
|
|
1264
|
-
return t;
|
|
1265
|
-
};
|
|
1266
|
-
return __assign$4.apply(this, arguments);
|
|
1267
|
-
};
|
|
1268
|
-
|
|
1269
|
-
function __rest$2(s, e) {
|
|
1270
|
-
var t = {};
|
|
1271
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1272
|
-
t[p] = s[p];
|
|
1273
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1274
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1275
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1276
|
-
t[p[i]] = s[p[i]];
|
|
1277
|
-
}
|
|
1278
|
-
return t;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
1165
|
var createStyler = function (_a) {
|
|
1282
1166
|
var onRead = _a.onRead,
|
|
1283
1167
|
onRender = _a.onRender,
|
|
@@ -1289,7 +1173,7 @@ var createStyler = function (_a) {
|
|
|
1289
1173
|
if (_a === void 0) {
|
|
1290
1174
|
_a = {};
|
|
1291
1175
|
}
|
|
1292
|
-
var props = __rest
|
|
1176
|
+
var props = __rest(_a, []);
|
|
1293
1177
|
var state = {};
|
|
1294
1178
|
var changedValues = [];
|
|
1295
1179
|
var hasChanged = false;
|
|
@@ -1409,7 +1293,7 @@ function isTransformOriginProp(key) {
|
|
|
1409
1293
|
return transformOriginProps.has(key);
|
|
1410
1294
|
}
|
|
1411
1295
|
|
|
1412
|
-
var int = /*#__PURE__*/__assign
|
|
1296
|
+
var int = /*#__PURE__*/__assign( /*#__PURE__*/__assign({}, number), { transform: Math.round });
|
|
1413
1297
|
var valueTypes = {
|
|
1414
1298
|
color: color,
|
|
1415
1299
|
backgroundColor: color,
|
|
@@ -1641,8 +1525,8 @@ function createCssStyler(element, _a) {
|
|
|
1641
1525
|
}
|
|
1642
1526
|
var enableHardwareAcceleration = _a.enableHardwareAcceleration,
|
|
1643
1527
|
allowTransformNone = _a.allowTransformNone,
|
|
1644
|
-
props = __rest
|
|
1645
|
-
return cssStyler(__assign
|
|
1528
|
+
props = __rest(_a, ["enableHardwareAcceleration", "allowTransformNone"]);
|
|
1529
|
+
return cssStyler(__assign({ element: element, buildStyles: createStyleBuilder({
|
|
1646
1530
|
enableHardwareAcceleration: enableHardwareAcceleration,
|
|
1647
1531
|
allowTransformNone: allowTransformNone
|
|
1648
1532
|
}), preparseOutput: true }, props));
|
|
@@ -1692,7 +1576,7 @@ function buildSVGAttrs(_a, dimensions, totalPathLength, cssBuilder, attrs, isDas
|
|
|
1692
1576
|
pathSpacing = _b === void 0 ? 1 : _b,
|
|
1693
1577
|
_c = _a.pathOffset,
|
|
1694
1578
|
pathOffset = _c === void 0 ? 0 : _c,
|
|
1695
|
-
state = __rest
|
|
1579
|
+
state = __rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
|
|
1696
1580
|
var style = cssBuilder(state);
|
|
1697
1581
|
for (var key in style) {
|
|
1698
1582
|
if (key === 'transform') {
|
|
@@ -1821,7 +1705,7 @@ var Chainable = /*#__PURE__*/function () {
|
|
|
1821
1705
|
this.props = props;
|
|
1822
1706
|
}
|
|
1823
1707
|
Chainable.prototype.applyMiddleware = function (middleware) {
|
|
1824
|
-
return this.create(__assign
|
|
1708
|
+
return this.create(__assign(__assign({}, this.props), { middleware: this.props.middleware ? __spreadArrays([middleware], this.props.middleware) : [middleware] }));
|
|
1825
1709
|
};
|
|
1826
1710
|
Chainable.prototype.pipe = function () {
|
|
1827
1711
|
var funcs = [];
|
|
@@ -1893,7 +1777,7 @@ var createObserver = function (observerCandidate, _a, onComplete) {
|
|
|
1893
1777
|
};
|
|
1894
1778
|
|
|
1895
1779
|
var Action = /*#__PURE__*/function (_super) {
|
|
1896
|
-
__extends
|
|
1780
|
+
__extends(Action, _super);
|
|
1897
1781
|
function Action() {
|
|
1898
1782
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1899
1783
|
}
|
|
@@ -1912,13 +1796,13 @@ var Action = /*#__PURE__*/function (_super) {
|
|
|
1912
1796
|
};
|
|
1913
1797
|
var _a = this.props,
|
|
1914
1798
|
init = _a.init,
|
|
1915
|
-
observerProps = __rest
|
|
1799
|
+
observerProps = __rest(_a, ["init"]);
|
|
1916
1800
|
var observer = createObserver(observerCandidate, observerProps, function () {
|
|
1917
1801
|
isComplete = true;
|
|
1918
1802
|
subscription.stop();
|
|
1919
1803
|
});
|
|
1920
1804
|
var api = init(observer);
|
|
1921
|
-
subscription = api ? __assign
|
|
1805
|
+
subscription = api ? __assign(__assign({}, subscription), api) : subscription;
|
|
1922
1806
|
if (observerCandidate.registerParent) {
|
|
1923
1807
|
observerCandidate.registerParent(subscription);
|
|
1924
1808
|
}
|
|
@@ -1932,7 +1816,7 @@ var action = function (init) {
|
|
|
1932
1816
|
};
|
|
1933
1817
|
|
|
1934
1818
|
var BaseMulticast = /*#__PURE__*/function (_super) {
|
|
1935
|
-
__extends
|
|
1819
|
+
__extends(BaseMulticast, _super);
|
|
1936
1820
|
function BaseMulticast() {
|
|
1937
1821
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1938
1822
|
_this.subscribers = [];
|
|
@@ -1992,7 +1876,7 @@ var isSingleValue = function (v) {
|
|
|
1992
1876
|
return typeOfV === 'string' || typeOfV === 'number';
|
|
1993
1877
|
};
|
|
1994
1878
|
var ValueReaction = /*#__PURE__*/function (_super) {
|
|
1995
|
-
__extends
|
|
1879
|
+
__extends(ValueReaction, _super);
|
|
1996
1880
|
function ValueReaction(props) {
|
|
1997
1881
|
var _this = _super.call(this, props) || this;
|
|
1998
1882
|
_this.scheduleVelocityCheck = function () {
|
|
@@ -2242,7 +2126,7 @@ var reduceArrayValue = function (i) {
|
|
|
2242
2126
|
var createArrayAction = function (action, props, vectorKeys) {
|
|
2243
2127
|
var firstVectorKey = vectorKeys[0];
|
|
2244
2128
|
var actionList = props[firstVectorKey].map(function (v, i) {
|
|
2245
|
-
var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign
|
|
2129
|
+
var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign({}, props));
|
|
2246
2130
|
return getActionCreator(v)(action, childActionProps);
|
|
2247
2131
|
});
|
|
2248
2132
|
return parallel$1.apply(void 0, actionList);
|
|
@@ -2256,7 +2140,7 @@ var reduceObjectValue = function (key) {
|
|
|
2256
2140
|
var createObjectAction = function (action, props, vectorKeys) {
|
|
2257
2141
|
var firstVectorKey = vectorKeys[0];
|
|
2258
2142
|
var actionMap = Object.keys(props[firstVectorKey]).reduce(function (map, key) {
|
|
2259
|
-
var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign
|
|
2143
|
+
var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign({}, props));
|
|
2260
2144
|
map[key] = getActionCreator(props[firstVectorKey][key])(action, childActionProps);
|
|
2261
2145
|
return map;
|
|
2262
2146
|
}, {});
|
|
@@ -2265,18 +2149,18 @@ var createObjectAction = function (action, props, vectorKeys) {
|
|
|
2265
2149
|
var createUnitAction = function (action, _a) {
|
|
2266
2150
|
var from = _a.from,
|
|
2267
2151
|
to = _a.to,
|
|
2268
|
-
props = __rest
|
|
2152
|
+
props = __rest(_a, ["from", "to"]);
|
|
2269
2153
|
var unitType = findUnitType(from) || findUnitType(to);
|
|
2270
2154
|
var transform = unitType.transform,
|
|
2271
2155
|
parse = unitType.parse;
|
|
2272
|
-
return action(__assign
|
|
2156
|
+
return action(__assign(__assign({}, props), { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
2273
2157
|
};
|
|
2274
2158
|
var createMixerAction = function (mixer) {
|
|
2275
2159
|
return function (action, _a) {
|
|
2276
2160
|
var from = _a.from,
|
|
2277
2161
|
to = _a.to,
|
|
2278
|
-
props = __rest
|
|
2279
|
-
return action(__assign
|
|
2162
|
+
props = __rest(_a, ["from", "to"]);
|
|
2163
|
+
return action(__assign(__assign({}, props), { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
2280
2164
|
};
|
|
2281
2165
|
};
|
|
2282
2166
|
var createColorAction = /*#__PURE__*/createMixerAction(mixColor);
|
|
@@ -2622,7 +2506,7 @@ var keyframes = function (_a) {
|
|
|
2622
2506
|
ease = _b === void 0 ? linear : _b,
|
|
2623
2507
|
times = _a.times,
|
|
2624
2508
|
values = _a.values,
|
|
2625
|
-
tweenProps = __rest
|
|
2509
|
+
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
2626
2510
|
easings = Array.isArray(easings) ? easings : defaultEasings(values, easings);
|
|
2627
2511
|
times = times || defaultTimings(values);
|
|
2628
2512
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -2632,7 +2516,7 @@ var keyframes = function (_a) {
|
|
|
2632
2516
|
ease: easing
|
|
2633
2517
|
});
|
|
2634
2518
|
});
|
|
2635
|
-
return tween(__assign
|
|
2519
|
+
return tween(__assign(__assign({}, tweenProps), { ease: ease })).applyMiddleware(function (update) {
|
|
2636
2520
|
return interpolateScrubbers(times, scrubbers, update);
|
|
2637
2521
|
});
|
|
2638
2522
|
};
|
|
@@ -2876,7 +2760,7 @@ var index$1 = function (_a) {
|
|
|
2876
2760
|
}
|
|
2877
2761
|
var x = _a.x,
|
|
2878
2762
|
y = _a.y,
|
|
2879
|
-
props = __rest
|
|
2763
|
+
props = __rest(_a, ["x", "y"]);
|
|
2880
2764
|
if (x !== undefined || y !== undefined) {
|
|
2881
2765
|
var applyXOffset_1 = applyOffset(x || 0);
|
|
2882
2766
|
var applyYOffset_1 = applyOffset(y || 0);
|
|
@@ -2950,7 +2834,7 @@ var steps$1 = function (st, min, max) {
|
|
|
2950
2834
|
};
|
|
2951
2835
|
var transformMap = function (childTransformers) {
|
|
2952
2836
|
return function (v) {
|
|
2953
|
-
var output = __assign
|
|
2837
|
+
var output = __assign({}, v);
|
|
2954
2838
|
for (var key in childTransformers) {
|
|
2955
2839
|
if (childTransformers.hasOwnProperty(key)) {
|
|
2956
2840
|
var childTransformer = childTransformers[key];
|
|
@@ -2981,52 +2865,6 @@ var transformers = /*#__PURE__*/Object.freeze({
|
|
|
2981
2865
|
transformMap: transformMap
|
|
2982
2866
|
});
|
|
2983
2867
|
|
|
2984
|
-
/*! *****************************************************************************
|
|
2985
|
-
Copyright (c) Microsoft Corporation.
|
|
2986
|
-
|
|
2987
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2988
|
-
purpose with or without fee is hereby granted.
|
|
2989
|
-
|
|
2990
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2991
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2992
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2993
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2994
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2995
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2996
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2997
|
-
***************************************************************************** */
|
|
2998
|
-
|
|
2999
|
-
var __assign$5 = function() {
|
|
3000
|
-
__assign$5 = Object.assign || function __assign(t) {
|
|
3001
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3002
|
-
s = arguments[i];
|
|
3003
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3004
|
-
}
|
|
3005
|
-
return t;
|
|
3006
|
-
};
|
|
3007
|
-
return __assign$5.apply(this, arguments);
|
|
3008
|
-
};
|
|
3009
|
-
|
|
3010
|
-
function __rest$3(s, e) {
|
|
3011
|
-
var t = {};
|
|
3012
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3013
|
-
t[p] = s[p];
|
|
3014
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3015
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3016
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3017
|
-
t[p[i]] = s[p[i]];
|
|
3018
|
-
}
|
|
3019
|
-
return t;
|
|
3020
|
-
}
|
|
3021
|
-
|
|
3022
|
-
function __spreadArrays$1() {
|
|
3023
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
3024
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
3025
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
3026
|
-
r[k] = a[j];
|
|
3027
|
-
return r;
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
2868
|
var getPoseValues = function (_a) {
|
|
3031
2869
|
var transition = _a.transition,
|
|
3032
2870
|
flip = _a.flip,
|
|
@@ -3039,7 +2877,7 @@ var getPoseValues = function (_a) {
|
|
|
3039
2877
|
preTransition = _a.preTransition,
|
|
3040
2878
|
applyAtStart = _a.applyAtStart,
|
|
3041
2879
|
applyAtEnd = _a.applyAtEnd,
|
|
3042
|
-
props = __rest
|
|
2880
|
+
props = __rest(_a, ["transition", "flip", "delay", "delayChildren", "staggerChildren", "staggerDirection", "afterChildren", "beforeChildren", "preTransition", "applyAtStart", "applyAtEnd"]);
|
|
3043
2881
|
return props;
|
|
3044
2882
|
};
|
|
3045
2883
|
var selectPoses = function (_a) {
|
|
@@ -3051,7 +2889,7 @@ var selectPoses = function (_a) {
|
|
|
3051
2889
|
onChange = _a.onChange,
|
|
3052
2890
|
passive = _a.passive,
|
|
3053
2891
|
initialPose = _a.initialPose,
|
|
3054
|
-
poses = __rest
|
|
2892
|
+
poses = __rest(_a, ["label", "props", "values", "parentValues", "ancestorValues", "onChange", "passive", "initialPose"]);
|
|
3055
2893
|
return poses;
|
|
3056
2894
|
};
|
|
3057
2895
|
var selectAllValues = function (values, selectValue) {
|
|
@@ -3151,7 +2989,7 @@ var createPoseSetter = function (setterProps) {
|
|
|
3151
2989
|
var _a = nextProps.delay,
|
|
3152
2990
|
delay = _a === void 0 ? 0 : _a;
|
|
3153
2991
|
var hasChildren = children.size;
|
|
3154
|
-
var baseTransitionProps = __assign
|
|
2992
|
+
var baseTransitionProps = __assign(__assign({}, props), nextProps);
|
|
3155
2993
|
var nextPose = poses[next];
|
|
3156
2994
|
var getChildAnimations = function () {
|
|
3157
2995
|
return hasChildren && propagate ? startChildAnimations(children, next, nextPose, baseTransitionProps) : [];
|
|
@@ -3177,11 +3015,11 @@ var createPoseSetter = function (setterProps) {
|
|
|
3177
3015
|
valuePoses.splice(insertionIndex, 0, next);
|
|
3178
3016
|
return insertionIndex === 0 ? new Promise(function (complete) {
|
|
3179
3017
|
var value = values.get(key);
|
|
3180
|
-
var transitionProps = __assign
|
|
3018
|
+
var transitionProps = __assign(__assign({}, baseTransitionProps), { key: key,
|
|
3181
3019
|
value: value });
|
|
3182
3020
|
var target = resolveTarget(value, resolveProp(nextPose[key], transitionProps));
|
|
3183
3021
|
if (activeActions.has(key)) stopAction(activeActions.get(key));
|
|
3184
|
-
var resolveTransitionProps = __assign
|
|
3022
|
+
var resolveTransitionProps = __assign(__assign({ to: target }, transitionProps), getTransitionProps(value, target, transitionProps));
|
|
3185
3023
|
var transition = resolveTransition(getTransition, key, value, resolveTransitionProps, convertTransitionDefinition, getInstantTransition);
|
|
3186
3024
|
var poseDelay = delay || resolveProp(nextPose.delay, transitionProps);
|
|
3187
3025
|
if (poseDelay) {
|
|
@@ -3205,7 +3043,7 @@ var createPoseSetter = function (setterProps) {
|
|
|
3205
3043
|
});
|
|
3206
3044
|
}
|
|
3207
3045
|
}
|
|
3208
|
-
return Promise.all(__spreadArrays
|
|
3046
|
+
return Promise.all(__spreadArrays(getParentAnimations(), getChildAnimations()));
|
|
3209
3047
|
};
|
|
3210
3048
|
};
|
|
3211
3049
|
|
|
@@ -3331,7 +3169,7 @@ var createValueMap = function (props) {
|
|
|
3331
3169
|
};
|
|
3332
3170
|
|
|
3333
3171
|
var applyDefaultTransition = function (pose, key, defaultTransitions) {
|
|
3334
|
-
return __assign
|
|
3172
|
+
return __assign(__assign({}, pose), { transition: defaultTransitions.has(key) ? defaultTransitions.get(key) : defaultTransitions.get('default') });
|
|
3335
3173
|
};
|
|
3336
3174
|
var generateTransitions = function (poses, defaultTransitions) {
|
|
3337
3175
|
Object.keys(poses).forEach(function (key) {
|
|
@@ -3385,7 +3223,7 @@ var poseFactory = function (_a) {
|
|
|
3385
3223
|
var poses = generateTransitions(selectPoses(config), defaultTransitions);
|
|
3386
3224
|
var _b = config.props,
|
|
3387
3225
|
props = _b === void 0 ? {} : _b;
|
|
3388
|
-
if (getDefaultProps) props = __assign
|
|
3226
|
+
if (getDefaultProps) props = __assign(__assign({}, getDefaultProps(config)), props);
|
|
3389
3227
|
var passive = config.passive,
|
|
3390
3228
|
userSetValues = config.values,
|
|
3391
3229
|
_c = config.initialPose,
|
|
@@ -3460,10 +3298,10 @@ var poseFactory = function (_a) {
|
|
|
3460
3298
|
},
|
|
3461
3299
|
has: has,
|
|
3462
3300
|
setProps: function (newProps) {
|
|
3463
|
-
return state.props = __assign
|
|
3301
|
+
return state.props = __assign(__assign({}, state.props), newProps);
|
|
3464
3302
|
},
|
|
3465
3303
|
_addChild: function (childConfig, factory) {
|
|
3466
|
-
var child = factory(__assign
|
|
3304
|
+
var child = factory(__assign(__assign({ initialPose: initialPose }, childConfig), { ancestorValues: __spreadArrays([{ label: config.label, values: values }], ancestorValues) }));
|
|
3467
3305
|
children.add(child);
|
|
3468
3306
|
return child;
|
|
3469
3307
|
},
|
|
@@ -3502,18 +3340,18 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
3502
3340
|
and limitations under the License.
|
|
3503
3341
|
***************************************************************************** */
|
|
3504
3342
|
|
|
3505
|
-
var __assign$
|
|
3506
|
-
__assign$
|
|
3343
|
+
var __assign$2 = function () {
|
|
3344
|
+
__assign$2 = Object.assign || function __assign(t) {
|
|
3507
3345
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3508
3346
|
s = arguments[i];
|
|
3509
3347
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3510
3348
|
}
|
|
3511
3349
|
return t;
|
|
3512
3350
|
};
|
|
3513
|
-
return __assign$
|
|
3351
|
+
return __assign$2.apply(this, arguments);
|
|
3514
3352
|
};
|
|
3515
3353
|
|
|
3516
|
-
function __rest$
|
|
3354
|
+
function __rest$1(s, e) {
|
|
3517
3355
|
var t = {};
|
|
3518
3356
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
3519
3357
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -3630,12 +3468,12 @@ var intelligentTransition = {
|
|
|
3630
3468
|
opacity: linearTween,
|
|
3631
3469
|
default: tween
|
|
3632
3470
|
};
|
|
3633
|
-
var dragAction = /*#__PURE__*/__assign$
|
|
3471
|
+
var dragAction = /*#__PURE__*/__assign$2( /*#__PURE__*/__assign$2({}, intelligentTransition), { x: /*#__PURE__*/createPointer(pointerX, 'left', 'right', BoundingBoxDimension.width), y: /*#__PURE__*/createPointer(pointerY, 'top', 'bottom', BoundingBoxDimension.height) });
|
|
3634
3472
|
var justAxis = function (_a) {
|
|
3635
3473
|
var from = _a.from;
|
|
3636
3474
|
return just(from);
|
|
3637
3475
|
};
|
|
3638
|
-
var intelligentDragEnd = /*#__PURE__*/__assign$
|
|
3476
|
+
var intelligentDragEnd = /*#__PURE__*/__assign$2( /*#__PURE__*/__assign$2({}, intelligentTransition), { x: justAxis, y: justAxis });
|
|
3639
3477
|
var defaultTransitions = /*#__PURE__*/new Map([['default', intelligentTransition], ['drag', dragAction], ['dragEnd', intelligentDragEnd]]);
|
|
3640
3478
|
|
|
3641
3479
|
var animationLookup = {
|
|
@@ -3705,7 +3543,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3705
3543
|
var _c = _a.type,
|
|
3706
3544
|
type = _c === void 0 ? 'tween' : _c,
|
|
3707
3545
|
definedEase = _a.ease,
|
|
3708
|
-
def = __rest$
|
|
3546
|
+
def = __rest$1(_a, ["type", "ease"]);
|
|
3709
3547
|
invariant(animationLookup[type] !== undefined, "Invalid transition type '" + type + "'. Valid transition types are: tween, spring, decay, physics and keyframes.");
|
|
3710
3548
|
var ease;
|
|
3711
3549
|
if (type === 'tween') {
|
|
@@ -3730,7 +3568,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3730
3568
|
velocity: velocity,
|
|
3731
3569
|
ease: ease
|
|
3732
3570
|
} : { ease: ease };
|
|
3733
|
-
return animationLookup[type](__assign$
|
|
3571
|
+
return animationLookup[type](__assign$2(__assign$2({}, baseProps), def));
|
|
3734
3572
|
};
|
|
3735
3573
|
var isAction = function (action$$1) {
|
|
3736
3574
|
return typeof action$$1.start !== 'undefined';
|
|
@@ -3815,7 +3653,7 @@ var pose = function (_a) {
|
|
|
3815
3653
|
min = def.min,
|
|
3816
3654
|
max = def.max,
|
|
3817
3655
|
round = def.round,
|
|
3818
|
-
remainingDef = __rest$
|
|
3656
|
+
remainingDef = __rest$1(def, ["delay", "min", "max", "round"]);
|
|
3819
3657
|
var action$$1 = getAction(val, remainingDef, props);
|
|
3820
3658
|
var outputPipe = [];
|
|
3821
3659
|
if (delay$$1) action$$1 = addActionDelay(delay$$1, action$$1);
|
|
@@ -3997,7 +3835,7 @@ var explicitlyFlipPose = function (state, nextPose) {
|
|
|
3997
3835
|
bottom = nextPose.bottom,
|
|
3998
3836
|
right = nextPose.right,
|
|
3999
3837
|
position = nextPose.position,
|
|
4000
|
-
remainingPose = __rest$
|
|
3838
|
+
remainingPose = __rest$1(nextPose, ["width", "height", "top", "left", "bottom", "right", "position"]);
|
|
4001
3839
|
var propsToSet = positionalProps.concat('position').reduce(function (acc, key) {
|
|
4002
3840
|
if (nextPose[key] !== undefined) {
|
|
4003
3841
|
acc[key] = resolveProp$1(nextPose[key], state.props);
|
|
@@ -4109,7 +3947,7 @@ var convertPositionalUnits = function (state, nextPose) {
|
|
|
4109
3947
|
changedPositionalKeys.push(key);
|
|
4110
3948
|
if (!applyAtEndHasBeenCopied) {
|
|
4111
3949
|
applyAtEndHasBeenCopied = true;
|
|
4112
|
-
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$
|
|
3950
|
+
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$2({}, nextPose.applyAtEnd) : {};
|
|
4113
3951
|
}
|
|
4114
3952
|
nextPose.applyAtEnd[key] = nextPose.applyAtEnd[key] || nextPose[key];
|
|
4115
3953
|
setValue(state, key, to);
|
|
@@ -4165,8 +4003,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
4165
4003
|
focusable = _a.focusable,
|
|
4166
4004
|
pressable = _a.pressable,
|
|
4167
4005
|
dragBounds = _a.dragBounds,
|
|
4168
|
-
config = __rest$
|
|
4169
|
-
var poseConfig = __assign$
|
|
4006
|
+
config = __rest$1(_a, ["onDragStart", "onDragEnd", "onPressStart", "onPressEnd", "draggable", "hoverable", "focusable", "pressable", "dragBounds"]);
|
|
4007
|
+
var poseConfig = __assign$2(__assign$2({ flip: {} }, config), { props: __assign$2(__assign$2({}, config.props), { onDragStart: onDragStart,
|
|
4170
4008
|
onDragEnd: onDragEnd,
|
|
4171
4009
|
onPressStart: onPressStart,
|
|
4172
4010
|
onPressEnd: onPressEnd,
|
|
@@ -4180,8 +4018,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
4180
4018
|
var _b = dragPoses(draggable),
|
|
4181
4019
|
drag = _b.drag,
|
|
4182
4020
|
dragEnd = _b.dragEnd;
|
|
4183
|
-
poseConfig.drag = __assign$
|
|
4184
|
-
poseConfig.dragEnd = __assign$
|
|
4021
|
+
poseConfig.drag = __assign$2(__assign$2({}, drag), poseConfig.drag);
|
|
4022
|
+
poseConfig.dragEnd = __assign$2(__assign$2({}, dragEnd), poseConfig.dragEnd);
|
|
4185
4023
|
}
|
|
4186
4024
|
return poseConfig;
|
|
4187
4025
|
};
|
|
@@ -4189,7 +4027,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4189
4027
|
posePriority: ['drag', 'press', 'focus', 'hover'],
|
|
4190
4028
|
transformPose: function (_a, name, state) {
|
|
4191
4029
|
var flip = _a.flip,
|
|
4192
|
-
pose$$1 = __rest$
|
|
4030
|
+
pose$$1 = __rest$1(_a, ["flip"]);
|
|
4193
4031
|
if (isFlipPose(flip, name, state)) {
|
|
4194
4032
|
return flipPose(state, pose$$1);
|
|
4195
4033
|
} else if (isPositional(pose$$1)) {
|
|
@@ -4227,7 +4065,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4227
4065
|
var props = _a.props,
|
|
4228
4066
|
activeActions = _a.activeActions;
|
|
4229
4067
|
var measure = props.dimensions.measure;
|
|
4230
|
-
var poserApi = __assign$
|
|
4068
|
+
var poserApi = __assign$2(__assign$2({}, api), { addChild: function (element, childConfig) {
|
|
4231
4069
|
return api._addChild(createPoseConfig(element, childConfig), domPose);
|
|
4232
4070
|
}, measure: measure, flip: function (op) {
|
|
4233
4071
|
if (op) {
|
|
@@ -7255,104 +7093,6 @@ var Imposter = function Imposter(_ref) {
|
|
|
7255
7093
|
}, rest), safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
7256
7094
|
};
|
|
7257
7095
|
|
|
7258
|
-
/*! *****************************************************************************
|
|
7259
|
-
Copyright (c) Microsoft Corporation.
|
|
7260
|
-
|
|
7261
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7262
|
-
purpose with or without fee is hereby granted.
|
|
7263
|
-
|
|
7264
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7265
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7266
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7267
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7268
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7269
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7270
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
7271
|
-
***************************************************************************** */
|
|
7272
|
-
/* global Reflect, Promise */
|
|
7273
|
-
|
|
7274
|
-
var extendStatics$2 = function(d, b) {
|
|
7275
|
-
extendStatics$2 = Object.setPrototypeOf ||
|
|
7276
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7277
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7278
|
-
return extendStatics$2(d, b);
|
|
7279
|
-
};
|
|
7280
|
-
|
|
7281
|
-
function __extends$2(d, b) {
|
|
7282
|
-
extendStatics$2(d, b);
|
|
7283
|
-
function __() { this.constructor = d; }
|
|
7284
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
7285
|
-
}
|
|
7286
|
-
|
|
7287
|
-
var __assign$7 = function() {
|
|
7288
|
-
__assign$7 = Object.assign || function __assign(t) {
|
|
7289
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7290
|
-
s = arguments[i];
|
|
7291
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7292
|
-
}
|
|
7293
|
-
return t;
|
|
7294
|
-
};
|
|
7295
|
-
return __assign$7.apply(this, arguments);
|
|
7296
|
-
};
|
|
7297
|
-
|
|
7298
|
-
function __rest$5(s, e) {
|
|
7299
|
-
var t = {};
|
|
7300
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7301
|
-
t[p] = s[p];
|
|
7302
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7303
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7304
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7305
|
-
t[p[i]] = s[p[i]];
|
|
7306
|
-
}
|
|
7307
|
-
return t;
|
|
7308
|
-
}
|
|
7309
|
-
|
|
7310
|
-
function __spreadArrays$2() {
|
|
7311
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
7312
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
7313
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
7314
|
-
r[k] = a[j];
|
|
7315
|
-
return r;
|
|
7316
|
-
}
|
|
7317
|
-
|
|
7318
|
-
/*! *****************************************************************************
|
|
7319
|
-
Copyright (c) Microsoft Corporation.
|
|
7320
|
-
|
|
7321
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7322
|
-
purpose with or without fee is hereby granted.
|
|
7323
|
-
|
|
7324
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7325
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7326
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7327
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7328
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7329
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7330
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
7331
|
-
***************************************************************************** */
|
|
7332
|
-
|
|
7333
|
-
var __assign$8 = function() {
|
|
7334
|
-
__assign$8 = Object.assign || function __assign(t) {
|
|
7335
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7336
|
-
s = arguments[i];
|
|
7337
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7338
|
-
}
|
|
7339
|
-
return t;
|
|
7340
|
-
};
|
|
7341
|
-
return __assign$8.apply(this, arguments);
|
|
7342
|
-
};
|
|
7343
|
-
|
|
7344
|
-
function __rest$6(s, e) {
|
|
7345
|
-
var t = {};
|
|
7346
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7347
|
-
t[p] = s[p];
|
|
7348
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7349
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7350
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7351
|
-
t[p[i]] = s[p[i]];
|
|
7352
|
-
}
|
|
7353
|
-
return t;
|
|
7354
|
-
}
|
|
7355
|
-
|
|
7356
7096
|
var Observer$1 = /*#__PURE__*/function () {
|
|
7357
7097
|
function Observer(_a, observer) {
|
|
7358
7098
|
var _this = this;
|
|
@@ -7415,18 +7155,18 @@ var Action$1 = /*#__PURE__*/function () {
|
|
|
7415
7155
|
};
|
|
7416
7156
|
var _a = this.props,
|
|
7417
7157
|
init = _a.init,
|
|
7418
|
-
observerProps = __rest
|
|
7158
|
+
observerProps = __rest(_a, ["init"]);
|
|
7419
7159
|
var observer = createObserver$1(observerCandidate, observerProps, function () {
|
|
7420
7160
|
isComplete = true;
|
|
7421
7161
|
subscription.stop();
|
|
7422
7162
|
});
|
|
7423
7163
|
var api = init(observer);
|
|
7424
|
-
subscription = api ? __assign
|
|
7164
|
+
subscription = api ? __assign({}, subscription, api) : subscription;
|
|
7425
7165
|
if (isComplete) subscription.stop();
|
|
7426
7166
|
return subscription;
|
|
7427
7167
|
};
|
|
7428
7168
|
Action.prototype.applyMiddleware = function (middleware) {
|
|
7429
|
-
return this.create(__assign
|
|
7169
|
+
return this.create(__assign({}, this.props, { middleware: this.props.middleware ? [middleware].concat(this.props.middleware) : [middleware] }));
|
|
7430
7170
|
};
|
|
7431
7171
|
Action.prototype.pipe = function () {
|
|
7432
7172
|
var funcs = [];
|
|
@@ -7479,18 +7219,18 @@ var createAction$1 = function (action, props) {
|
|
|
7479
7219
|
var createUnitAction$1 = function (action, _a) {
|
|
7480
7220
|
var from = _a.from,
|
|
7481
7221
|
to = _a.to,
|
|
7482
|
-
props = __rest
|
|
7222
|
+
props = __rest(_a, ["from", "to"]);
|
|
7483
7223
|
var unitType = findUnitType$1(from) || findUnitType$1(to);
|
|
7484
7224
|
var transform = unitType.transform,
|
|
7485
7225
|
parse = unitType.parse;
|
|
7486
|
-
return action(__assign
|
|
7226
|
+
return action(__assign({}, props, { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
7487
7227
|
};
|
|
7488
7228
|
var createMixerAction$1 = function (mixer) {
|
|
7489
7229
|
return function (action, _a) {
|
|
7490
7230
|
var from = _a.from,
|
|
7491
7231
|
to = _a.to,
|
|
7492
|
-
props = __rest
|
|
7493
|
-
return action(__assign
|
|
7232
|
+
props = __rest(_a, ["from", "to"]);
|
|
7233
|
+
return action(__assign({}, props, { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
7494
7234
|
};
|
|
7495
7235
|
};
|
|
7496
7236
|
var createColorAction$1 = /*#__PURE__*/createMixerAction$1(mixColor);
|
|
@@ -7703,7 +7443,7 @@ var inertia = function (_a) {
|
|
|
7703
7443
|
};
|
|
7704
7444
|
var startSpring = function (props) {
|
|
7705
7445
|
isSpring = true;
|
|
7706
|
-
startAnimation(vectorSpring$1(__assign
|
|
7446
|
+
startAnimation(vectorSpring$1(__assign({}, props, { to: isLessThanMin(props.from) ? min : max, stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta })));
|
|
7707
7447
|
};
|
|
7708
7448
|
if (isOutOfBounds(from)) {
|
|
7709
7449
|
startSpring({ from: from, velocity: velocity });
|
|
@@ -7935,7 +7675,7 @@ var keyframes$1 = function (_a) {
|
|
|
7935
7675
|
ease = _b === void 0 ? linear : _b,
|
|
7936
7676
|
times = _a.times,
|
|
7937
7677
|
values = _a.values,
|
|
7938
|
-
tweenProps = __rest
|
|
7678
|
+
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
7939
7679
|
easings = Array.isArray(easings) ? easings : defaultEasings$1(values, easings);
|
|
7940
7680
|
times = times || defaultTimings$1(values);
|
|
7941
7681
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -7945,7 +7685,7 @@ var keyframes$1 = function (_a) {
|
|
|
7945
7685
|
ease: easing
|
|
7946
7686
|
});
|
|
7947
7687
|
});
|
|
7948
|
-
return tween$1(__assign
|
|
7688
|
+
return tween$1(__assign({}, tweenProps, { ease: ease })).applyMiddleware(function (update) {
|
|
7949
7689
|
return interpolateScrubbers$1(times, scrubbers, update);
|
|
7950
7690
|
});
|
|
7951
7691
|
};
|
|
@@ -8147,7 +7887,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
8147
7887
|
*/
|
|
8148
7888
|
MotionValue.prototype.addChild = function (config) {
|
|
8149
7889
|
if (config === void 0) { config = {}; }
|
|
8150
|
-
var child = new MotionValue(this.current, __assign
|
|
7890
|
+
var child = new MotionValue(this.current, __assign({ parent: this }, config));
|
|
8151
7891
|
if (!this.children)
|
|
8152
7892
|
this.children = new Set();
|
|
8153
7893
|
this.children.add(child);
|
|
@@ -8589,7 +8329,7 @@ var buildStyleAttr = function (values, styleProp, isStatic) {
|
|
|
8589
8329
|
? transformTemplate({}, styleProp.transform)
|
|
8590
8330
|
: transformTemplate;
|
|
8591
8331
|
}
|
|
8592
|
-
return buildStyleProperty(__assign
|
|
8332
|
+
return buildStyleProperty(__assign(__assign({}, styleProp), motionValueStyles), !isStatic);
|
|
8593
8333
|
};
|
|
8594
8334
|
var useMotionStyles = function (values, styleProp, isStatic, transformValues) {
|
|
8595
8335
|
if (styleProp === void 0) { styleProp = {}; }
|
|
@@ -8643,7 +8383,7 @@ var auto$1 = {
|
|
|
8643
8383
|
parse: function (v) { return v; },
|
|
8644
8384
|
};
|
|
8645
8385
|
var dimensionTypes = [number, px, percent, degrees, vw, vh, auto$1];
|
|
8646
|
-
var valueTypes$1 = __spreadArrays
|
|
8386
|
+
var valueTypes$1 = __spreadArrays(dimensionTypes, [color, complex]);
|
|
8647
8387
|
var testValueType$1 = function (v) { return function (type) { return type.test(v); }; };
|
|
8648
8388
|
var getDimensionValueType = function (v) {
|
|
8649
8389
|
return dimensionTypes.find(testValueType$1(v));
|
|
@@ -8696,7 +8436,7 @@ var getDefaultTransition = function (valueKey, to) {
|
|
|
8696
8436
|
transitionFactory =
|
|
8697
8437
|
defaultTransitions$1[valueKey] || defaultTransitions$1.default;
|
|
8698
8438
|
}
|
|
8699
|
-
return __assign
|
|
8439
|
+
return __assign({ to: to }, transitionFactory(to));
|
|
8700
8440
|
};
|
|
8701
8441
|
|
|
8702
8442
|
/**
|
|
@@ -8792,9 +8532,9 @@ var transitionOptionParser = {
|
|
|
8792
8532
|
return opts;
|
|
8793
8533
|
},
|
|
8794
8534
|
keyframes: function (_a) {
|
|
8795
|
-
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest
|
|
8535
|
+
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest(_a, ["from", "to", "velocity"]);
|
|
8796
8536
|
if (opts.values && opts.values[0] === null) {
|
|
8797
|
-
var values = __spreadArrays
|
|
8537
|
+
var values = __spreadArrays(opts.values);
|
|
8798
8538
|
values[0] = from;
|
|
8799
8539
|
opts.values = values;
|
|
8800
8540
|
}
|
|
@@ -8808,7 +8548,7 @@ var transitionOptionParser = {
|
|
|
8808
8548
|
},
|
|
8809
8549
|
};
|
|
8810
8550
|
var isTransitionDefined = function (_a) {
|
|
8811
|
-
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest
|
|
8551
|
+
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection"]);
|
|
8812
8552
|
return Object.keys(transition).length;
|
|
8813
8553
|
};
|
|
8814
8554
|
var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
@@ -8818,7 +8558,7 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8818
8558
|
// and see if there's any props remaining
|
|
8819
8559
|
if (transitionDefinition === undefined ||
|
|
8820
8560
|
!isTransitionDefined(transitionDefinition)) {
|
|
8821
|
-
return __assign
|
|
8561
|
+
return __assign({ delay: delay }, getDefaultTransition(key, to));
|
|
8822
8562
|
}
|
|
8823
8563
|
var valueTransitionDefinition = transitionDefinition[key] ||
|
|
8824
8564
|
transitionDefinition.default ||
|
|
@@ -8835,12 +8575,12 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8835
8575
|
};
|
|
8836
8576
|
}
|
|
8837
8577
|
else if (isKeyframesTarget(to)) {
|
|
8838
|
-
return __assign
|
|
8578
|
+
return __assign(__assign({ values: to, duration: 0.8, delay: delay, ease: "linear" }, valueTransitionDefinition), {
|
|
8839
8579
|
// This animation must be keyframes if we're animating through an array
|
|
8840
8580
|
type: "keyframes" });
|
|
8841
8581
|
}
|
|
8842
8582
|
else {
|
|
8843
|
-
return __assign
|
|
8583
|
+
return __assign({ type: "tween", to: to,
|
|
8844
8584
|
delay: delay }, valueTransitionDefinition);
|
|
8845
8585
|
}
|
|
8846
8586
|
};
|
|
@@ -8857,12 +8597,12 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8857
8597
|
// for instance 100 to #fff. This might live better in Popmotion.
|
|
8858
8598
|
warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to " + target + ". \"" + origin + "\" is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property.");
|
|
8859
8599
|
// Parse the `transition` prop and return options for the Popmotion animation
|
|
8860
|
-
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest
|
|
8600
|
+
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
|
|
8861
8601
|
// If this is an animatable pair of values, return an animation, otherwise use `just`
|
|
8862
8602
|
var actionFactory = isOriginAnimatable && isTargetAnimatable
|
|
8863
8603
|
? transitions[type]
|
|
8864
8604
|
: just$1;
|
|
8865
|
-
var opts = preprocessOptions(type, __assign
|
|
8605
|
+
var opts = preprocessOptions(type, __assign({ from: origin, velocity: value.getVelocity() }, transitionDefinition));
|
|
8866
8606
|
// Convert duration from Framer Motion's seconds into Popmotion's milliseconds
|
|
8867
8607
|
if (isDurationAnimation(opts)) {
|
|
8868
8608
|
if (opts.duration) {
|
|
@@ -8880,10 +8620,10 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8880
8620
|
* @internal
|
|
8881
8621
|
*/
|
|
8882
8622
|
function startAnimation(key, value, target, _a) {
|
|
8883
|
-
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest
|
|
8623
|
+
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest(_a, ["delay"]);
|
|
8884
8624
|
return value.start(function (complete) {
|
|
8885
8625
|
var activeAnimation;
|
|
8886
|
-
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest
|
|
8626
|
+
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest(_b, ["delay"]);
|
|
8887
8627
|
if (valueDelay !== undefined) {
|
|
8888
8628
|
delay$1$1 = valueDelay;
|
|
8889
8629
|
}
|
|
@@ -9029,7 +8769,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9029
8769
|
var _this = this;
|
|
9030
8770
|
var _b = _a === void 0 ? {} : _a, _c = _b.isActive, isActive = _c === void 0 ? new Set() : _c, priority = _b.priority;
|
|
9031
8771
|
var _d = this.resolveVariant(definition), target = _d.target, transitionEnd = _d.transitionEnd;
|
|
9032
|
-
target = this.transformValues(__assign
|
|
8772
|
+
target = this.transformValues(__assign(__assign({}, target), transitionEnd));
|
|
9033
8773
|
return Object.keys(target).forEach(function (key) {
|
|
9034
8774
|
if (isActive.has(key))
|
|
9035
8775
|
return;
|
|
@@ -9119,7 +8859,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9119
8859
|
// resolve current and velocity
|
|
9120
8860
|
variant = variant(this.props.custom, getCurrent$1(this.values), getVelocity(this.values));
|
|
9121
8861
|
}
|
|
9122
|
-
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest
|
|
8862
|
+
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest(variant, ["transition", "transitionEnd"]);
|
|
9123
8863
|
return { transition: transition, transitionEnd: transitionEnd, target: target };
|
|
9124
8864
|
};
|
|
9125
8865
|
/**
|
|
@@ -9210,7 +8950,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9210
8950
|
ValueAnimationControls.prototype.applyVariantLabels = function (variantLabelList) {
|
|
9211
8951
|
var _this = this;
|
|
9212
8952
|
var isActive = new Set();
|
|
9213
|
-
var reversedList = __spreadArrays
|
|
8953
|
+
var reversedList = __spreadArrays(variantLabelList).reverse();
|
|
9214
8954
|
reversedList.forEach(function (key) {
|
|
9215
8955
|
var _a = _this.resolveVariant(_this.variants[key]), target = _a.target, transitionEnd = _a.transitionEnd;
|
|
9216
8956
|
if (transitionEnd) {
|
|
@@ -9281,7 +9021,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9281
9021
|
if (this.isAnimating.has(key))
|
|
9282
9022
|
continue;
|
|
9283
9023
|
this.isAnimating.add(key);
|
|
9284
|
-
animations.push(startAnimation(key, value, valueTarget, __assign
|
|
9024
|
+
animations.push(startAnimation(key, value, valueTarget, __assign({ delay: delay }, transition)));
|
|
9285
9025
|
}
|
|
9286
9026
|
var allAnimations = Promise.all(animations);
|
|
9287
9027
|
return transitionEnd
|
|
@@ -9292,7 +9032,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9292
9032
|
};
|
|
9293
9033
|
ValueAnimationControls.prototype.animateVariantLabels = function (variantLabels, opts) {
|
|
9294
9034
|
var _this = this;
|
|
9295
|
-
var animations = __spreadArrays
|
|
9035
|
+
var animations = __spreadArrays(variantLabels).reverse()
|
|
9296
9036
|
.map(function (label) { return _this.animateVariant(label, opts); });
|
|
9297
9037
|
return Promise.all(animations);
|
|
9298
9038
|
};
|
|
@@ -9736,7 +9476,7 @@ function useValueAnimationControls(config, props, subscribeToParentControls) {
|
|
|
9736
9476
|
// Remove reference to onAnimationComplete from controls. All the MotionValues
|
|
9737
9477
|
// are unsubscribed from this component separately. We let animations run out
|
|
9738
9478
|
// as they might be animating other components.
|
|
9739
|
-
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest
|
|
9479
|
+
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest(props, ["onAnimationComplete"]);
|
|
9740
9480
|
controls.setProps(unmountProps);
|
|
9741
9481
|
parentControls && parentControls.removeChild(controls);
|
|
9742
9482
|
};
|
|
@@ -10221,7 +9961,7 @@ var PanSession = /** @class */ (function () {
|
|
|
10221
9961
|
return;
|
|
10222
9962
|
var point = info.point;
|
|
10223
9963
|
var timestamp = getFrameData().timestamp;
|
|
10224
|
-
_this.history.push(__assign
|
|
9964
|
+
_this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));
|
|
10225
9965
|
var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;
|
|
10226
9966
|
if (!isPanStarted) {
|
|
10227
9967
|
onStart && onStart(_this.lastMoveEvent, info);
|
|
@@ -10238,7 +9978,7 @@ var PanSession = /** @class */ (function () {
|
|
|
10238
9978
|
var initialInfo = transformPoint(info, this.transformPagePoint);
|
|
10239
9979
|
var point = initialInfo.point;
|
|
10240
9980
|
var timestamp = getFrameData().timestamp;
|
|
10241
|
-
this.history = [__assign
|
|
9981
|
+
this.history = [__assign(__assign({}, point), { timestamp: timestamp })];
|
|
10242
9982
|
var onSessionStart = handlers.onSessionStart;
|
|
10243
9983
|
onSessionStart &&
|
|
10244
9984
|
onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
@@ -10566,7 +10306,7 @@ var Gestures = {
|
|
|
10566
10306
|
return gestureProps.some(function (key) { return props.hasOwnProperty(key); });
|
|
10567
10307
|
},
|
|
10568
10308
|
Component: makeRenderlessComponent(function (_a) {
|
|
10569
|
-
var innerRef = _a.innerRef, props = __rest
|
|
10309
|
+
var innerRef = _a.innerRef, props = __rest(_a, ["innerRef"]);
|
|
10570
10310
|
useGestures(props, innerRef);
|
|
10571
10311
|
}),
|
|
10572
10312
|
};
|
|
@@ -10806,8 +10546,8 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10806
10546
|
};
|
|
10807
10547
|
ComponentDragControls.prototype.updateProps = function (_a) {
|
|
10808
10548
|
var _this = this;
|
|
10809
|
-
var _b = _a.drag, drag = _b === void 0 ? false : _b, _c = _a.dragDirectionLock, dragDirectionLock = _c === void 0 ? false : _c, _d = _a.dragPropagation, dragPropagation = _d === void 0 ? false : _d, _e = _a.dragConstraints, dragConstraints = _e === void 0 ? false : _e, _f = _a.dragElastic, dragElastic = _f === void 0 ? true : _f, _g = _a.dragMomentum, dragMomentum = _g === void 0 ? true : _g, remainingProps = __rest
|
|
10810
|
-
this.props = __assign
|
|
10549
|
+
var _b = _a.drag, drag = _b === void 0 ? false : _b, _c = _a.dragDirectionLock, dragDirectionLock = _c === void 0 ? false : _c, _d = _a.dragPropagation, dragPropagation = _d === void 0 ? false : _d, _e = _a.dragConstraints, dragConstraints = _e === void 0 ? false : _e, _f = _a.dragElastic, dragElastic = _f === void 0 ? true : _f, _g = _a.dragMomentum, dragMomentum = _g === void 0 ? true : _g, remainingProps = __rest(_a, ["drag", "dragDirectionLock", "dragPropagation", "dragConstraints", "dragElastic", "dragMomentum"]);
|
|
10550
|
+
this.props = __assign({ drag: drag,
|
|
10811
10551
|
dragDirectionLock: dragDirectionLock,
|
|
10812
10552
|
dragPropagation: dragPropagation,
|
|
10813
10553
|
dragConstraints: dragConstraints,
|
|
@@ -10863,7 +10603,7 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10863
10603
|
var bounceStiffness = dragElastic ? 200 : 1000000;
|
|
10864
10604
|
var bounceDamping = dragElastic ? 40 : 10000000;
|
|
10865
10605
|
var animationControls = _dragTransitionControls || _this.controls;
|
|
10866
|
-
var inertia = __assign
|
|
10606
|
+
var inertia = __assign(__assign({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness,
|
|
10867
10607
|
bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1 }, dragTransition), transition);
|
|
10868
10608
|
var externalAxisMotionValue = axis === "x" ? _dragValueX : _dragValueY;
|
|
10869
10609
|
// If we're not animating on an externally-provided `MotionValue` we can use the
|
|
@@ -10944,7 +10684,7 @@ function bothAxis(handler) {
|
|
|
10944
10684
|
return [handler("x"), handler("y")];
|
|
10945
10685
|
}
|
|
10946
10686
|
function convertPanToDrag(info, point) {
|
|
10947
|
-
return __assign
|
|
10687
|
+
return __assign(__assign({}, info), { point: {
|
|
10948
10688
|
x: point.x ? point.x.get() : 0,
|
|
10949
10689
|
y: point.y ? point.y.get() : 0,
|
|
10950
10690
|
} });
|
|
@@ -11055,7 +10795,7 @@ function useDrag(props, ref, values, controls) {
|
|
|
11055
10795
|
var groupDragControls = props.dragControls;
|
|
11056
10796
|
var transformPagePoint = React.useContext(MotionPluginContext).transformPagePoint;
|
|
11057
10797
|
var dragControls = useConstant(function () { return new ComponentDragControls({ ref: ref, values: values, controls: controls }); });
|
|
11058
|
-
dragControls.updateProps(__assign
|
|
10798
|
+
dragControls.updateProps(__assign(__assign({}, props), { transformPagePoint: transformPagePoint }));
|
|
11059
10799
|
React.useEffect(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls]);
|
|
11060
10800
|
React.useEffect(function () { return dragControls.mount(ref.current); }, []);
|
|
11061
10801
|
}
|
|
@@ -11064,7 +10804,7 @@ var Drag = {
|
|
|
11064
10804
|
key: "drag",
|
|
11065
10805
|
shouldRender: function (props) { return !!props.drag; },
|
|
11066
10806
|
Component: makeRenderlessComponent(function (_a) {
|
|
11067
|
-
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest
|
|
10807
|
+
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest(_a, ["innerRef", "values", "controls"]);
|
|
11068
10808
|
return useDrag(props, innerRef, values, controls);
|
|
11069
10809
|
}),
|
|
11070
10810
|
};
|
|
@@ -11116,14 +10856,14 @@ function getVariableValue(current, element, depth) {
|
|
|
11116
10856
|
* @internal
|
|
11117
10857
|
*/
|
|
11118
10858
|
function resolveCSSVariables(values, ref, _a, transitionEnd) {
|
|
11119
|
-
var target = __rest
|
|
10859
|
+
var target = __rest(_a, []);
|
|
11120
10860
|
var element = ref.current;
|
|
11121
10861
|
if (!(element instanceof HTMLElement))
|
|
11122
10862
|
return { target: target, transitionEnd: transitionEnd };
|
|
11123
10863
|
// If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
|
|
11124
10864
|
// only if they change but I think this reads clearer and this isn't a performance-critical path.
|
|
11125
10865
|
if (transitionEnd) {
|
|
11126
|
-
transitionEnd = __assign
|
|
10866
|
+
transitionEnd = __assign({}, transitionEnd);
|
|
11127
10867
|
}
|
|
11128
10868
|
// Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
|
|
11129
10869
|
values.forEach(function (value) {
|
|
@@ -11280,8 +11020,8 @@ var convertChangedValueTypes = function (target, values, element, elementStyler,
|
|
|
11280
11020
|
};
|
|
11281
11021
|
var checkAndConvertChangedValueTypes = function (values, ref, target, transitionEnd) {
|
|
11282
11022
|
if (transitionEnd === void 0) { transitionEnd = {}; }
|
|
11283
|
-
target = __assign
|
|
11284
|
-
transitionEnd = __assign
|
|
11023
|
+
target = __assign({}, target);
|
|
11024
|
+
transitionEnd = __assign({}, transitionEnd);
|
|
11285
11025
|
var element = ref.current;
|
|
11286
11026
|
var elementStyler = index(element);
|
|
11287
11027
|
var targetPositionalKeys = Object.keys(target).filter(isPositionalKey$1);
|
|
@@ -11509,7 +11249,7 @@ function calcAxisDelta(prev, next, names) {
|
|
|
11509
11249
|
return delta;
|
|
11510
11250
|
}
|
|
11511
11251
|
function calcDelta(prev, next) {
|
|
11512
|
-
var delta = __assign
|
|
11252
|
+
var delta = __assign(__assign({}, calcAxisDelta(prev, next, axisLabels.x)), calcAxisDelta(prev, next, axisLabels.y));
|
|
11513
11253
|
return delta;
|
|
11514
11254
|
}
|
|
11515
11255
|
var offset = {
|
|
@@ -11553,7 +11293,7 @@ function getTransition(_a) {
|
|
|
11553
11293
|
return layoutTransition || positionTransition;
|
|
11554
11294
|
}
|
|
11555
11295
|
var LayoutAnimation = /** @class */ (function (_super) {
|
|
11556
|
-
__extends
|
|
11296
|
+
__extends(LayoutAnimation, _super);
|
|
11557
11297
|
function LayoutAnimation() {
|
|
11558
11298
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
11559
11299
|
}
|
|
@@ -11620,11 +11360,11 @@ var LayoutAnimation = /** @class */ (function (_super) {
|
|
|
11620
11360
|
if (!delta[deltaKey])
|
|
11621
11361
|
return;
|
|
11622
11362
|
var baseTransition = typeof transitionDefinition === "boolean"
|
|
11623
|
-
? __assign
|
|
11363
|
+
? __assign({}, getDefaultLayoutTransition(isPositionOnly)) : transitionDefinition;
|
|
11624
11364
|
var value = values.get(transformKey, targetValue);
|
|
11625
11365
|
var velocity = value.getVelocity();
|
|
11626
11366
|
transition[transformKey] = baseTransition[transformKey]
|
|
11627
|
-
? __assign
|
|
11367
|
+
? __assign({}, baseTransition[transformKey]) : __assign({}, baseTransition);
|
|
11628
11368
|
if (transition[transformKey].velocity === undefined) {
|
|
11629
11369
|
transition[transformKey].velocity = velocity || 0;
|
|
11630
11370
|
}
|
|
@@ -11765,9 +11505,9 @@ var hasUpdated = function (prev, next) {
|
|
|
11765
11505
|
};
|
|
11766
11506
|
function targetWithoutTransition(_a, mergeTransitionEnd) {
|
|
11767
11507
|
if (mergeTransitionEnd === void 0) { mergeTransitionEnd = false; }
|
|
11768
|
-
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest
|
|
11508
|
+
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, ["transition", "transitionEnd"]);
|
|
11769
11509
|
return mergeTransitionEnd
|
|
11770
|
-
? __assign
|
|
11510
|
+
? __assign(__assign({}, target), transitionEnd)
|
|
11771
11511
|
: target;
|
|
11772
11512
|
}
|
|
11773
11513
|
/**
|
|
@@ -11819,9 +11559,9 @@ function useAnimateProp(targetAndTransition, controls, values, defaultTransition
|
|
|
11819
11559
|
}
|
|
11820
11560
|
}
|
|
11821
11561
|
isInitialRender.current = false;
|
|
11822
|
-
prevValues.current = __assign
|
|
11562
|
+
prevValues.current = __assign(__assign({}, prevValues.current), finalTarget);
|
|
11823
11563
|
if (Object.keys(targetToAnimate).length) {
|
|
11824
|
-
controls.start(__assign
|
|
11564
|
+
controls.start(__assign(__assign({}, targetToAnimate), { transition: targetAndTransition.transition || defaultTransition, transitionEnd: targetAndTransition.transitionEnd }));
|
|
11825
11565
|
}
|
|
11826
11566
|
}, [targetAndTransition]);
|
|
11827
11567
|
}
|
|
@@ -11995,7 +11735,7 @@ var Exit = {
|
|
|
11995
11735
|
React.useEffect(function () {
|
|
11996
11736
|
if (!isPresent) {
|
|
11997
11737
|
if (!isPlayingExitAnimation.current && exit) {
|
|
11998
|
-
controls.setProps(__assign
|
|
11738
|
+
controls.setProps(__assign(__assign({}, props), { custom: custom }));
|
|
11999
11739
|
controls.start(exit).then(onExitComplete);
|
|
12000
11740
|
}
|
|
12001
11741
|
isPlayingExitAnimation.current = true;
|
|
@@ -12066,7 +11806,7 @@ var buildHTMLProps = function (values, style, isStatic, isDrag) {
|
|
|
12066
11806
|
var buildSVGProps = function (values, style) {
|
|
12067
11807
|
var motionValueStyles = resolveCurrent(values);
|
|
12068
11808
|
var props = buildSVGAttrs(motionValueStyles, undefined, undefined, undefined, undefined, false);
|
|
12069
|
-
props.style = __assign
|
|
11809
|
+
props.style = __assign(__assign({}, style), props.style);
|
|
12070
11810
|
return props;
|
|
12071
11811
|
};
|
|
12072
11812
|
var functionalityComponents = [Layout, Drag, Gestures, Exit];
|
|
@@ -12085,7 +11825,7 @@ function createDomMotionConfig(Component) {
|
|
|
12085
11825
|
var staticVisualStyles = isSVG
|
|
12086
11826
|
? buildSVGProps(values, style)
|
|
12087
11827
|
: buildHTMLProps(values, style, isStatic, !!props.drag);
|
|
12088
|
-
return React.createElement(Component, __assign
|
|
11828
|
+
return React.createElement(Component, __assign(__assign(__assign({}, forwardedProps), { ref: ref }), staticVisualStyles));
|
|
12089
11829
|
},
|
|
12090
11830
|
/**
|
|
12091
11831
|
* loadFunctionalityComponents gets used by the `motion` component
|
|
@@ -12116,7 +11856,7 @@ function createDomMotionConfig(Component) {
|
|
|
12116
11856
|
for (var i = 0; i < numFunctionalityComponents; i++) {
|
|
12117
11857
|
var _a = functionalityComponents[i], shouldRender = _a.shouldRender, key = _a.key, Component_1 = _a.Component;
|
|
12118
11858
|
if (shouldRender(props, context)) {
|
|
12119
|
-
activeComponents.push(React.createElement(Component_1, __assign
|
|
11859
|
+
activeComponents.push(React.createElement(Component_1, __assign({ key: key }, props, { parentContext: context, values: values, controls: controls, innerRef: ref })));
|
|
12120
11860
|
}
|
|
12121
11861
|
}
|
|
12122
11862
|
return activeComponents;
|
|
@@ -12168,7 +11908,7 @@ var svgMotionComponents = svgElements.reduce(function (acc, Component) {
|
|
|
12168
11908
|
*
|
|
12169
11909
|
* @public
|
|
12170
11910
|
*/
|
|
12171
|
-
var motion = __assign
|
|
11911
|
+
var motion = __assign(__assign({
|
|
12172
11912
|
/**
|
|
12173
11913
|
* Convert a custom React component into a `motion` component.
|
|
12174
11914
|
*
|
|
@@ -12220,7 +11960,7 @@ var PresenceChild = function (_a) {
|
|
|
12220
11960
|
return function () { return numPresenceChildren.current--; };
|
|
12221
11961
|
};
|
|
12222
11962
|
}, [isPresent]);
|
|
12223
|
-
return (React.createElement(PresenceContext.Provider, { value: __assign
|
|
11963
|
+
return (React.createElement(PresenceContext.Provider, { value: __assign(__assign({}, context), { register: register }) }, children));
|
|
12224
11964
|
};
|
|
12225
11965
|
|
|
12226
11966
|
function getChildKey(child) {
|
|
@@ -12336,7 +12076,7 @@ var AnimatePresence = function (_a) {
|
|
|
12336
12076
|
return (React.createElement(React.Fragment, null, filteredChildren.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false }, child)); })));
|
|
12337
12077
|
}
|
|
12338
12078
|
// If this is a subsequent render, deal with entering and exiting children
|
|
12339
|
-
var childrenToRender = __spreadArrays
|
|
12079
|
+
var childrenToRender = __spreadArrays(filteredChildren);
|
|
12340
12080
|
// Diff the keys of the currently-present and target children to update our
|
|
12341
12081
|
// exiting list.
|
|
12342
12082
|
var presentKeys = presentChildren.current.map(getChildKey);
|
|
@@ -22725,7 +22465,21 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
22725
22465
|
children = _ref.children;
|
|
22726
22466
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
22727
22467
|
var themeValues = createThemeValues(themeContext, fallbackValues$a, "Link", variant);
|
|
22728
|
-
|
|
22468
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
22469
|
+
// This is to address an issue on Safari where the link's tab order and Enter key were not being recognized
|
|
22470
|
+
if (event.key === "Enter" || event.keyCode === 13) {
|
|
22471
|
+
if (newTab) {
|
|
22472
|
+
window.open(href, "_blank");
|
|
22473
|
+
} else {
|
|
22474
|
+
window.location.href = href;
|
|
22475
|
+
}
|
|
22476
|
+
}
|
|
22477
|
+
};
|
|
22478
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
22479
|
+
padding: "0",
|
|
22480
|
+
tabIndex: tabIndex,
|
|
22481
|
+
onKeyDown: handleKeyDown
|
|
22482
|
+
}, /*#__PURE__*/React__default.createElement(StyledExternalLink, {
|
|
22729
22483
|
href: href,
|
|
22730
22484
|
target: newTab ? "_blank" : "",
|
|
22731
22485
|
color: themeValues.externalLinkColor,
|
|
@@ -22735,13 +22489,13 @@ var ExternalLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
22735
22489
|
hovercolor: themeValues.hoverColor,
|
|
22736
22490
|
activeColor: themeValues.activeColor,
|
|
22737
22491
|
fontFamily: themeValues.fontFamily,
|
|
22738
|
-
tabIndex:
|
|
22492
|
+
tabIndex: "-1",
|
|
22739
22493
|
extrastyles: extraStyles,
|
|
22740
22494
|
rel: newTab ? "noopener" : "",
|
|
22741
22495
|
"data-qa": dataQa,
|
|
22742
22496
|
"aria-label": ariaLabel,
|
|
22743
22497
|
ref: ref
|
|
22744
|
-
}, safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
|
|
22498
|
+
}, safeChildren(children, /*#__PURE__*/React__default.createElement("span", null))));
|
|
22745
22499
|
});
|
|
22746
22500
|
|
|
22747
22501
|
var _excluded$s = ["hoverColor", "activeColor", "active", "color", "extrastyles"];
|
|
@@ -45747,6 +45501,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45747
45501
|
}))) : /*#__PURE__*/React__default.createElement(Box, {
|
|
45748
45502
|
padding: "0.5rem"
|
|
45749
45503
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
45504
|
+
tabIndex: "0",
|
|
45750
45505
|
action: hideModal,
|
|
45751
45506
|
variant: "primary",
|
|
45752
45507
|
text: closeButtonText,
|