@trafilea/afrodita-components 2.2.0 → 2.3.3
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/build/dts/components/collection/index.d.ts +5 -0
- package/build/dts/components/collection/product/mobile/ProductItemMobile.d.ts +1 -1
- package/build/dts/components/collection/product/mobile/ProductItemMobile.stories.d.ts +1 -1
- package/build/dts/components/collection/product/types.d.ts +1 -0
- package/build/dts/components/color/selector/PatternSelector.d.ts +8 -0
- package/build/dts/components/color/selector/PatternSelector.test.d.ts +1 -0
- package/build/dts/components/filtering/Accordion.d.ts +8 -0
- package/build/dts/components/filtering/Filters.d.ts +15 -0
- package/build/dts/components/filtering/Filters.stories.d.ts +9 -0
- package/build/dts/components/filtering/Filters.test.d.ts +1 -0
- package/build/dts/components/filtering/FiltersStyled.d.ts +59 -0
- package/build/dts/components/icons/Actions/Close.d.ts +3 -0
- package/build/dts/components/icons/Actions/Trash.d.ts +3 -0
- package/build/dts/components/icons/Actions/index.d.ts +2 -0
- package/build/dts/components/icons/Arrows/ChevronRightVariant.d.ts +3 -0
- package/build/dts/components/icons/Arrows/index.d.ts +1 -0
- package/build/dts/components/index.d.ts +3 -1
- package/build/dts/components/slider/StyledSlider.d.ts +4 -4
- package/build/dts/types/types.d.ts +16 -1
- package/build/dts/utils/index.d.ts +1 -0
- package/build/dts/utils/simulateClick/simulateClick.d.ts +1 -0
- package/build/dts/utils/simulateClick/simulateClick.test.d.ts +1 -0
- package/build/index.css +170 -225
- package/build/index.d.ts +64 -2
- package/build/index.esm.css +170 -225
- package/build/index.esm.js +1089 -1392
- package/build/index.esm.js.map +1 -1
- package/build/index.js +1090 -1391
- package/build/index.js.map +1 -1
- package/package.json +2 -3
package/build/index.js
CHANGED
|
@@ -1327,8 +1327,8 @@ var createCache = function createCache(options) {
|
|
|
1327
1327
|
return cache;
|
|
1328
1328
|
};
|
|
1329
1329
|
|
|
1330
|
-
function _extends$
|
|
1331
|
-
_extends$
|
|
1330
|
+
function _extends$1() {
|
|
1331
|
+
_extends$1 = Object.assign || function (target) {
|
|
1332
1332
|
for (var i = 1; i < arguments.length; i++) {
|
|
1333
1333
|
var source = arguments[i];
|
|
1334
1334
|
|
|
@@ -1342,30 +1342,11 @@ function _extends$4() {
|
|
|
1342
1342
|
return target;
|
|
1343
1343
|
};
|
|
1344
1344
|
|
|
1345
|
-
return _extends$
|
|
1345
|
+
return _extends$1.apply(this, arguments);
|
|
1346
1346
|
}
|
|
1347
1347
|
|
|
1348
1348
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
1349
1349
|
|
|
1350
|
-
function getDefaultExportFromCjs (x) {
|
|
1351
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
function getAugmentedNamespace(n) {
|
|
1355
|
-
if (n.__esModule) return n;
|
|
1356
|
-
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
1357
|
-
Object.keys(n).forEach(function (k) {
|
|
1358
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
1359
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
1360
|
-
enumerable: true,
|
|
1361
|
-
get: function () {
|
|
1362
|
-
return n[k];
|
|
1363
|
-
}
|
|
1364
|
-
});
|
|
1365
|
-
});
|
|
1366
|
-
return a;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
1350
|
var reactIs$1 = {exports: {}};
|
|
1370
1351
|
|
|
1371
1352
|
var reactIs_production_min = {};
|
|
@@ -2053,7 +2034,7 @@ var serializeStyles$1 = function serializeStyles(args, registered, mergedProps)
|
|
|
2053
2034
|
};
|
|
2054
2035
|
|
|
2055
2036
|
var isBrowser$4 = typeof document !== 'undefined';
|
|
2056
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2037
|
+
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
2057
2038
|
|
|
2058
2039
|
var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2059
2040
|
// because this module is primarily intended for the browser and node
|
|
@@ -2119,7 +2100,7 @@ var getTheme = function getTheme(outerTheme, theme) {
|
|
|
2119
2100
|
throw new Error('[ThemeProvider] Please make your theme prop a plain object');
|
|
2120
2101
|
}
|
|
2121
2102
|
|
|
2122
|
-
return _extends$
|
|
2103
|
+
return _extends$1({}, outerTheme, theme);
|
|
2123
2104
|
};
|
|
2124
2105
|
|
|
2125
2106
|
var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
@@ -2156,7 +2137,7 @@ var createEmotionProps = function createEmotionProps(type, props) {
|
|
|
2156
2137
|
var newProps = {};
|
|
2157
2138
|
|
|
2158
2139
|
for (var key in props) {
|
|
2159
|
-
if (hasOwnProperty.call(props, key)) {
|
|
2140
|
+
if (hasOwnProperty$1.call(props, key)) {
|
|
2160
2141
|
newProps[key] = props[key];
|
|
2161
2142
|
}
|
|
2162
2143
|
}
|
|
@@ -2217,7 +2198,7 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
2217
2198
|
var newProps = {};
|
|
2218
2199
|
|
|
2219
2200
|
for (var key in props) {
|
|
2220
|
-
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
2201
|
+
if (hasOwnProperty$1.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
2221
2202
|
newProps[key] = props[key];
|
|
2222
2203
|
}
|
|
2223
2204
|
}
|
|
@@ -2442,7 +2423,7 @@ function css() {
|
|
|
2442
2423
|
return serializeStyles$1(args);
|
|
2443
2424
|
}
|
|
2444
2425
|
|
|
2445
|
-
var classnames$
|
|
2426
|
+
var classnames$2 = function classnames(args) {
|
|
2446
2427
|
var len = args.length;
|
|
2447
2428
|
var i = 0;
|
|
2448
2429
|
var cls = '';
|
|
@@ -2546,7 +2527,7 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
2546
2527
|
args[_key2] = arguments[_key2];
|
|
2547
2528
|
}
|
|
2548
2529
|
|
|
2549
|
-
return merge(cache.registered, css, classnames$
|
|
2530
|
+
return merge(cache.registered, css, classnames$2(args));
|
|
2550
2531
|
};
|
|
2551
2532
|
|
|
2552
2533
|
var content = {
|
|
@@ -2634,13 +2615,25 @@ var Question = function (_a) {
|
|
|
2634
2615
|
return (jsxRuntime.jsx(IconWrapper, __assign({ width: width, height: height, viewBoxX: 22, viewBoxY: 22, title: "Question" }, { children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 22C17.0751 22 22 17.0751 22 11C22 4.92487 17.0751 0 11 0C4.92487 0 0 4.92487 0 11C0 17.0751 4.92487 22 11 22ZM9.75807 15.9678C9.75807 15.2819 10.3141 14.7258 11 14.7258C11.6859 14.7258 12.2419 15.2819 12.2419 15.9678C12.2419 16.6537 11.6859 17.2097 11 17.2097C10.3141 17.2097 9.75807 16.6537 9.75807 15.9678ZM10.6305 13.6613H11.3402C11.6341 13.6613 11.8725 13.423 11.8725 13.1291V13.1122C11.8725 12.2512 12.5546 11.8053 13.3108 11.3109C14.2517 10.6958 15.3073 10.0058 15.3073 8.34809C15.3073 6.10995 13.306 4.79034 10.9854 4.79034C8.99703 4.79034 7.88 5.56717 6.93852 6.77482C6.75157 7.01461 6.80634 7.36288 7.05584 7.53671L7.6384 7.94255C7.86878 8.10307 8.18573 8.05805 8.35907 7.83717C9.022 6.99252 9.69269 6.56454 10.9854 6.56454C12.7453 6.56454 13.5331 7.46028 13.5331 8.34809C13.5331 9.20467 12.865 9.62547 12.1181 10.0959C11.1715 10.6922 10.0983 11.3681 10.0983 13.1122V13.1291C10.0983 13.423 10.3366 13.6613 10.6305 13.6613Z", fill: fill }, void 0) }), void 0));
|
|
2635
2616
|
};
|
|
2636
2617
|
|
|
2618
|
+
var Close = function (_a) {
|
|
2619
|
+
var height = _a.height, width = _a.width, fill = _a.fill;
|
|
2620
|
+
return (jsxRuntime.jsx(IconWrapper, __assign({ width: width, height: height, viewBoxX: 9, viewBoxY: 8, title: "close" }, { children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.2123 0.287701C0.919406 0.580594 0.919406 1.05547 1.2123 1.34836L3.86397 4.00003L1.21233 6.65167C0.919437 6.94456 0.919437 7.41944 1.21233 7.71233C1.50522 8.00522 1.9801 8.00522 2.27299 7.71233L4.92463 5.06069L7.57626 7.71232C7.86915 8.00522 8.34403 8.00522 8.63692 7.71232C8.92981 7.41943 8.92981 6.94456 8.63692 6.65166L5.98529 4.00003L8.63695 1.34837C8.92984 1.05548 8.92984 0.580602 8.63695 0.287709C8.34406 -0.00518426 7.86918 -0.00518393 7.57629 0.287709L4.92463 2.93937L2.27296 0.287701C1.98007 -0.00519271 1.50519 -0.00519269 1.2123 0.287701Z", fill: fill }, void 0) }), void 0));
|
|
2621
|
+
};
|
|
2622
|
+
|
|
2623
|
+
var Trash = function (_a) {
|
|
2624
|
+
var height = _a.height, width = _a.width, fill = _a.fill;
|
|
2625
|
+
return (jsxRuntime.jsx(IconWrapper, __assign({ width: width, height: height, viewBoxX: 16, viewBoxY: 20, title: "trash" }, { children: jsxRuntime.jsx("path", { d: "M10.5714 16.875H11.1429C11.2186 16.875 11.2913 16.8421 11.3449 16.7835C11.3985 16.7249 11.4286 16.6454 11.4286 16.5625V5.9375C11.4286 5.85462 11.3985 5.77513 11.3449 5.71653C11.2913 5.65792 11.2186 5.625 11.1429 5.625H10.5714C10.4957 5.625 10.423 5.65792 10.3694 5.71653C10.3158 5.77513 10.2857 5.85462 10.2857 5.9375V16.5625C10.2857 16.6454 10.3158 16.7249 10.3694 16.7835C10.423 16.8421 10.4957 16.875 10.5714 16.875ZM4.85714 16.875H5.42857C5.50435 16.875 5.57702 16.8421 5.6306 16.7835C5.68418 16.7249 5.71429 16.6454 5.71429 16.5625V5.9375C5.71429 5.85462 5.68418 5.77513 5.6306 5.71653C5.57702 5.65792 5.50435 5.625 5.42857 5.625H4.85714C4.78137 5.625 4.70869 5.65792 4.65511 5.71653C4.60153 5.77513 4.57143 5.85462 4.57143 5.9375V16.5625C4.57143 16.6454 4.60153 16.7249 4.65511 16.7835C4.70869 16.8421 4.78137 16.875 4.85714 16.875ZM15.7143 2.5H12L10.8 0.75C10.6403 0.517132 10.4333 0.328126 10.1952 0.197949C9.95719 0.067772 9.69471 0 9.42857 0L6.57143 0C6.30529 0 6.04282 0.067772 5.80478 0.197949C5.56674 0.328126 5.35968 0.517132 5.2 0.75L4 2.5H0.285714C0.209938 2.5 0.137266 2.53292 0.0836838 2.59153C0.030102 2.65013 0 2.72962 0 2.8125L0 3.4375C0 3.52038 0.030102 3.59987 0.0836838 3.65847C0.137266 3.71708 0.209938 3.75 0.285714 3.75H1.14286V18.125C1.14286 18.6223 1.32347 19.0992 1.64496 19.4508C1.96645 19.8025 2.40249 20 2.85714 20H13.1429C13.5975 20 14.0336 19.8025 14.355 19.4508C14.6765 19.0992 14.8571 18.6223 14.8571 18.125V3.75H15.7143C15.7901 3.75 15.8627 3.71708 15.9163 3.65847C15.9699 3.59987 16 3.52038 16 3.4375V2.8125C16 2.72962 15.9699 2.65013 15.9163 2.59153C15.8627 2.53292 15.7901 2.5 15.7143 2.5ZM6.11429 1.5C6.1677 1.4226 6.23676 1.35976 6.31607 1.31639C6.39537 1.27302 6.48277 1.2503 6.57143 1.25H9.42857C9.51723 1.2503 9.60463 1.27302 9.68394 1.31639C9.76324 1.35976 9.8323 1.4226 9.88571 1.5L10.5714 2.5H5.42857L6.11429 1.5ZM13.7143 18.125C13.7143 18.2908 13.6541 18.4497 13.5469 18.5669C13.4398 18.6842 13.2944 18.75 13.1429 18.75H2.85714C2.70559 18.75 2.56025 18.6842 2.45308 18.5669C2.34592 18.4497 2.28571 18.2908 2.28571 18.125V3.75H13.7143V18.125ZM7.71429 16.875H8.28572C8.36149 16.875 8.43416 16.8421 8.48775 16.7835C8.54133 16.7249 8.57143 16.6454 8.57143 16.5625V5.9375C8.57143 5.85462 8.54133 5.77513 8.48775 5.71653C8.43416 5.65792 8.36149 5.625 8.28572 5.625H7.71429C7.63851 5.625 7.56584 5.65792 7.51226 5.71653C7.45867 5.77513 7.42857 5.85462 7.42857 5.9375V16.5625C7.42857 16.6454 7.45867 16.7249 7.51226 16.7835C7.56584 16.8421 7.63851 16.875 7.71429 16.875Z", fill: fill }, void 0) }), void 0));
|
|
2626
|
+
};
|
|
2627
|
+
|
|
2637
2628
|
var Actions = /*#__PURE__*/Object.freeze({
|
|
2638
2629
|
__proto__: null,
|
|
2639
2630
|
Check: Check,
|
|
2640
2631
|
ClearLight: ClearLight,
|
|
2641
2632
|
LightExclamation: LightExclamation,
|
|
2642
2633
|
LightCheck: LightCheck,
|
|
2643
|
-
Question: Question
|
|
2634
|
+
Question: Question,
|
|
2635
|
+
Close: Close,
|
|
2636
|
+
Trash: Trash
|
|
2644
2637
|
});
|
|
2645
2638
|
|
|
2646
2639
|
var FitPredictor$1 = function (_a) {
|
|
@@ -2680,6 +2673,11 @@ var ChevronRight = function (_a) {
|
|
|
2680
2673
|
return (jsxRuntime.jsx(IconWrapper, __assign({ width: width, height: height, viewBoxX: 20, viewBoxY: 34, title: "chevron right" }, { children: jsxRuntime.jsx("g", __assign({ opacity: opacity }, { children: jsxRuntime.jsx("path", { d: "M4.14231 0.6657C3.22745 -0.2219 1.70267 -0.2219 0.787802 0.6657C-0.127065 1.5533 -0.127065 3.03263 0.787802 3.92023C4.44727 7.47063 8.10673 10.9224 11.7662 14.4728C11.7662 14.5714 14.2058 16.7411 14.2058 16.8397C14.2058 16.9384 11.6645 19.2067 11.6645 19.3053C8.00508 22.8557 4.34562 26.4061 0.68615 30.0551C-0.228717 30.9427 -0.228717 32.422 0.68615 33.3096C1.19441 33.8028 1.80432 34 2.41423 34C3.02414 34 3.63405 33.8028 4.14231 33.3096L19.2884 18.6149C19.695 18.2205 20 17.6287 20 16.9384C20 16.3466 19.695 15.7549 19.2884 15.2618L4.14231 0.6657Z", fill: fill }, void 0) }), void 0) }), void 0));
|
|
2681
2674
|
};
|
|
2682
2675
|
|
|
2676
|
+
var ChevronRightVariant = function (_a) {
|
|
2677
|
+
var height = _a.height, width = _a.width, fill = _a.fill;
|
|
2678
|
+
return (jsxRuntime.jsx(IconWrapper, __assign({ width: width, height: height, viewBoxX: 24, viewBoxY: 24, title: "chevron right variant" }, { children: jsxRuntime.jsx("path", { d: "M17.635 6.24942C17.3066 5.91686 16.8139 5.91686 16.4854 6.24942C16.1569 6.58199 16.1569 7.08083 16.4854 7.41339L20.208 11.127H1.82117C1.38321 11.1824 1 11.5704 1 12.0139C1 12.4573 1.38321 12.8453 1.82117 12.8453H20.208L16.4854 16.6143C16.1569 16.9469 16.1569 17.4457 16.4854 17.7783C16.6496 17.9446 16.8686 18 17.0876 18C17.3066 18 17.5255 17.9446 17.6898 17.7783L22.781 12.6236C22.9453 12.4573 23 12.2356 23 12.0139C23 11.7921 22.8905 11.5704 22.781 11.4042L17.635 6.24942Z", fill: fill }, void 0) }), void 0));
|
|
2679
|
+
};
|
|
2680
|
+
|
|
2683
2681
|
var ChevronUp = function (_a) {
|
|
2684
2682
|
var height = _a.height, width = _a.width, fill = _a.fill;
|
|
2685
2683
|
return (jsxRuntime.jsx(IconWrapper, __assign({ width: width, height: height, viewBoxX: 36, viewBoxY: 20, title: "chevron up" }, { children: jsxRuntime.jsx("path", { d: "M0.285774 18.1586L1.89534 19.7224C2.2763 20.0925 2.89398 20.0925 3.27501 19.7224L18 5.44992L32.7251 19.7223C33.106 20.0924 33.7237 20.0924 34.1047 19.7223L35.7143 18.1585C36.0952 17.7884 36.0952 17.1883 35.7143 16.8181L18.6898 0.277592C18.3088 -0.0925308 17.6911 -0.0925308 17.3101 0.277592L0.285774 16.8181C-0.095258 17.1883 -0.095258 17.7885 0.285774 18.1586Z", fill: fill }, void 0) }), void 0));
|
|
@@ -2700,6 +2698,7 @@ var Arrows = /*#__PURE__*/Object.freeze({
|
|
|
2700
2698
|
ChevronDown: ChevronDown,
|
|
2701
2699
|
ChevronLeft: ChevronLeft,
|
|
2702
2700
|
ChevronRight: ChevronRight,
|
|
2701
|
+
ChevronRightVariant: ChevronRightVariant,
|
|
2703
2702
|
ChevronUp: ChevronUp,
|
|
2704
2703
|
ChevronUpSolid: ChevronUpSolid,
|
|
2705
2704
|
CircleUp: CircleUp
|
|
@@ -3483,7 +3482,7 @@ var createStyled = function createStyled(tag, options) {
|
|
|
3483
3482
|
});
|
|
3484
3483
|
|
|
3485
3484
|
Styled.withComponent = function (nextTag, nextOptions) {
|
|
3486
|
-
return createStyled(nextTag, _extends$
|
|
3485
|
+
return createStyled(nextTag, _extends$1({}, options, nextOptions, {
|
|
3487
3486
|
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
|
3488
3487
|
})).apply(void 0, styles);
|
|
3489
3488
|
};
|
|
@@ -3527,7 +3526,7 @@ exports.InputValidationType = void 0;
|
|
|
3527
3526
|
InputValidationType[InputValidationType["Empty"] = 2] = "Empty";
|
|
3528
3527
|
})(exports.InputValidationType || (exports.InputValidationType = {}));
|
|
3529
3528
|
|
|
3530
|
-
var Section = newStyled.div(templateObject_1$
|
|
3529
|
+
var Section = newStyled.div(templateObject_1$M || (templateObject_1$M = __makeTemplateObject(["\n font-weight: 600;\n display: flex;\n flex-direction: row;\n align-items: center;\n align-text: left;\n width: 100%;\n box-sizing: border-box;\n align-self: flex-start;\n padding: ", ";\n"], ["\n font-weight: 600;\n display: flex;\n flex-direction: row;\n align-items: center;\n align-text: left;\n width: 100%;\n box-sizing: border-box;\n align-self: flex-start;\n padding: ", ";\n"])), function (props) {
|
|
3531
3530
|
return props.type === exports.CardSectionType.Header ? '0.5rem 1.5rem 0' : '0 1.5rem 0.5rem';
|
|
3532
3531
|
});
|
|
3533
3532
|
var CardHeader = function (_a) {
|
|
@@ -3538,16 +3537,16 @@ var CardFooter = function (_a) {
|
|
|
3538
3537
|
var children = _a.children;
|
|
3539
3538
|
return (jsxRuntime.jsx(Section, __assign({ type: exports.CardSectionType.Footer }, { children: children }), void 0));
|
|
3540
3539
|
};
|
|
3541
|
-
var templateObject_1$
|
|
3540
|
+
var templateObject_1$M;
|
|
3542
3541
|
|
|
3543
|
-
var Body = newStyled.div(templateObject_1$
|
|
3542
|
+
var Body = newStyled.div(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.5rem;\n align-self: flex-start;\n"], ["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.5rem;\n align-self: flex-start;\n"])));
|
|
3544
3543
|
var CardBody = function (_a) {
|
|
3545
3544
|
var children = _a.children;
|
|
3546
3545
|
return jsxRuntime.jsx(Body, { children: children }, void 0);
|
|
3547
3546
|
};
|
|
3548
|
-
var templateObject_1$
|
|
3547
|
+
var templateObject_1$L;
|
|
3549
3548
|
|
|
3550
|
-
var Container$
|
|
3549
|
+
var Container$t = newStyled.div(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n ", "\n width: ", ";\n background: ", ";\n border-radius: 0.5rem;\n border: ", ";\n"], ["\n ", "\n width: ", ";\n background: ", ";\n border-radius: 0.5rem;\n border: ", ";\n"])), function (_a) {
|
|
3551
3550
|
var flex = _a.flex;
|
|
3552
3551
|
return flex &&
|
|
3553
3552
|
"display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;";
|
|
@@ -3559,24 +3558,24 @@ var Container$q = newStyled.div(templateObject_1$H || (templateObject_1$H = __ma
|
|
|
3559
3558
|
});
|
|
3560
3559
|
var Card = function (_a) {
|
|
3561
3560
|
var children = _a.children, backgroundColor = _a.backgroundColor, _b = _a.widthAuto, widthAuto = _b === void 0 ? true : _b, border = _a.border, _c = _a.flex, flex = _c === void 0 ? true : _c;
|
|
3562
|
-
return (jsxRuntime.jsx(Container$
|
|
3561
|
+
return (jsxRuntime.jsx(Container$t, __assign({ backgroundColor: backgroundColor, widthAuto: widthAuto, border: border, flex: flex, "data-testid": "CardContainer" }, { children: children }), void 0));
|
|
3563
3562
|
};
|
|
3564
3563
|
var Card$1 = Object.assign(Card, {
|
|
3565
3564
|
Header: CardHeader,
|
|
3566
3565
|
Footer: CardFooter,
|
|
3567
3566
|
Body: CardBody,
|
|
3568
3567
|
});
|
|
3569
|
-
var templateObject_1$
|
|
3568
|
+
var templateObject_1$K;
|
|
3570
3569
|
|
|
3571
3570
|
function jsx(type, props, key) {
|
|
3572
|
-
if (!hasOwnProperty.call(props, 'css')) {
|
|
3571
|
+
if (!hasOwnProperty$1.call(props, 'css')) {
|
|
3573
3572
|
return jsxRuntime.jsx(type, props, key);
|
|
3574
3573
|
}
|
|
3575
3574
|
|
|
3576
3575
|
return jsxRuntime.jsx(Emotion, createEmotionProps(type, props), key);
|
|
3577
3576
|
}
|
|
3578
3577
|
function jsxs(type, props, key) {
|
|
3579
|
-
if (!hasOwnProperty.call(props, 'css')) {
|
|
3578
|
+
if (!hasOwnProperty$1.call(props, 'css')) {
|
|
3580
3579
|
return jsxRuntime.jsxs(type, props, key);
|
|
3581
3580
|
}
|
|
3582
3581
|
|
|
@@ -3596,7 +3595,7 @@ var BaseButton = function (_a) {
|
|
|
3596
3595
|
} }, { children: [renderLeading, children, renderTrailing] }), void 0));
|
|
3597
3596
|
};
|
|
3598
3597
|
|
|
3599
|
-
var getStylesBySize$
|
|
3598
|
+
var getStylesBySize$d = function (size) {
|
|
3600
3599
|
switch (size) {
|
|
3601
3600
|
case exports.ComponentSize.Large:
|
|
3602
3601
|
return {
|
|
@@ -3623,7 +3622,7 @@ var getStylesBySize$c = function (size) {
|
|
|
3623
3622
|
var BaseCTA = function (_a) {
|
|
3624
3623
|
var text = _a.text, onClick = _a.onClick, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.wide, wide = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? exports.ComponentSize.Medium : _d, type = _a.type, className = _a.className;
|
|
3625
3624
|
var theme = useTheme();
|
|
3626
|
-
var stylesBySize = getStylesBySize$
|
|
3625
|
+
var stylesBySize = getStylesBySize$d(size);
|
|
3627
3626
|
return (jsx(BaseButton, __assign({ onClick: onClick, disabled: disabled, className: className, type: type, css: __assign(__assign({ width: wide ? '100%' : '' }, stylesBySize), { fontWeight: 600, '&:hover': {
|
|
3628
3627
|
color: theme.shades.white,
|
|
3629
3628
|
cursor: 'pointer',
|
|
@@ -3686,8 +3685,8 @@ var ButtonSecondaryOutline = function (_a) {
|
|
|
3686
3685
|
}, text: text }, void 0));
|
|
3687
3686
|
};
|
|
3688
3687
|
|
|
3689
|
-
function _extends
|
|
3690
|
-
_extends
|
|
3688
|
+
function _extends() {
|
|
3689
|
+
_extends = Object.assign || function (target) {
|
|
3691
3690
|
for (var i = 1; i < arguments.length; i++) {
|
|
3692
3691
|
var source = arguments[i];
|
|
3693
3692
|
|
|
@@ -3701,7 +3700,7 @@ function _extends$3() {
|
|
|
3701
3700
|
return target;
|
|
3702
3701
|
};
|
|
3703
3702
|
|
|
3704
|
-
return _extends
|
|
3703
|
+
return _extends.apply(this, arguments);
|
|
3705
3704
|
}
|
|
3706
3705
|
|
|
3707
3706
|
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
@@ -3840,7 +3839,7 @@ function render(_ref) {
|
|
|
3840
3839
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
3841
3840
|
return null;
|
|
3842
3841
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
3843
|
-
return _render(_extends
|
|
3842
|
+
return _render(_extends({}, _rest, {
|
|
3844
3843
|
hidden: true,
|
|
3845
3844
|
style: {
|
|
3846
3845
|
display: 'none'
|
|
@@ -4312,12 +4311,12 @@ function Description(props) {
|
|
|
4312
4311
|
}, [id, context.register]);
|
|
4313
4312
|
var passThroughProps = props;
|
|
4314
4313
|
|
|
4315
|
-
var propsWeControl = _extends
|
|
4314
|
+
var propsWeControl = _extends({}, context.props, {
|
|
4316
4315
|
id: id
|
|
4317
4316
|
});
|
|
4318
4317
|
|
|
4319
4318
|
return render({
|
|
4320
|
-
props: _extends
|
|
4319
|
+
props: _extends({}, passThroughProps, propsWeControl),
|
|
4321
4320
|
slot: context.slot || {},
|
|
4322
4321
|
defaultTag: DEFAULT_DESCRIPTION_TAG,
|
|
4323
4322
|
name: context.name || 'Description'
|
|
@@ -4366,32 +4365,32 @@ var ActionTypes$2;
|
|
|
4366
4365
|
var reducers$2 = (_reducers$2 = {}, _reducers$2[ActionTypes$2.ToggleDisclosure] = function (state) {
|
|
4367
4366
|
var _match;
|
|
4368
4367
|
|
|
4369
|
-
return _extends
|
|
4368
|
+
return _extends({}, state, {
|
|
4370
4369
|
disclosureState: match(state.disclosureState, (_match = {}, _match[DisclosureStates.Open] = DisclosureStates.Closed, _match[DisclosureStates.Closed] = DisclosureStates.Open, _match))
|
|
4371
4370
|
});
|
|
4372
4371
|
}, _reducers$2[ActionTypes$2.CloseDisclosure] = function (state) {
|
|
4373
4372
|
if (state.disclosureState === DisclosureStates.Closed) return state;
|
|
4374
|
-
return _extends
|
|
4373
|
+
return _extends({}, state, {
|
|
4375
4374
|
disclosureState: DisclosureStates.Closed
|
|
4376
4375
|
});
|
|
4377
4376
|
}, _reducers$2[ActionTypes$2.LinkPanel] = function (state) {
|
|
4378
4377
|
if (state.linkedPanel === true) return state;
|
|
4379
|
-
return _extends
|
|
4378
|
+
return _extends({}, state, {
|
|
4380
4379
|
linkedPanel: true
|
|
4381
4380
|
});
|
|
4382
4381
|
}, _reducers$2[ActionTypes$2.UnlinkPanel] = function (state) {
|
|
4383
4382
|
if (state.linkedPanel === false) return state;
|
|
4384
|
-
return _extends
|
|
4383
|
+
return _extends({}, state, {
|
|
4385
4384
|
linkedPanel: false
|
|
4386
4385
|
});
|
|
4387
4386
|
}, _reducers$2[ActionTypes$2.SetButtonId] = function (state, action) {
|
|
4388
4387
|
if (state.buttonId === action.buttonId) return state;
|
|
4389
|
-
return _extends
|
|
4388
|
+
return _extends({}, state, {
|
|
4390
4389
|
buttonId: action.buttonId
|
|
4391
4390
|
});
|
|
4392
4391
|
}, _reducers$2[ActionTypes$2.SetPanelId] = function (state, action) {
|
|
4393
4392
|
if (state.panelId === action.panelId) return state;
|
|
4394
|
-
return _extends
|
|
4393
|
+
return _extends({}, state, {
|
|
4395
4394
|
panelId: action.panelId
|
|
4396
4395
|
});
|
|
4397
4396
|
}, _reducers$2);
|
|
@@ -4593,7 +4592,7 @@ var Button$5 = /*#__PURE__*/forwardRefWithAs(function Button(props, ref) {
|
|
|
4593
4592
|
onClick: handleClick
|
|
4594
4593
|
};
|
|
4595
4594
|
return render({
|
|
4596
|
-
props: _extends
|
|
4595
|
+
props: _extends({}, passthroughProps, propsWeControl),
|
|
4597
4596
|
slot: slot,
|
|
4598
4597
|
defaultTag: DEFAULT_BUTTON_TAG$1,
|
|
4599
4598
|
name: 'Disclosure.Button'
|
|
@@ -4658,7 +4657,7 @@ var Panel$2 = /*#__PURE__*/forwardRefWithAs(function Panel(props, ref) {
|
|
|
4658
4657
|
return React__default['default'].createElement(DisclosurePanelContext.Provider, {
|
|
4659
4658
|
value: state.panelId
|
|
4660
4659
|
}, render({
|
|
4661
|
-
props: _extends
|
|
4660
|
+
props: _extends({}, passthroughProps, propsWeControl),
|
|
4662
4661
|
slot: slot,
|
|
4663
4662
|
defaultTag: DEFAULT_PANEL_TAG,
|
|
4664
4663
|
features: PanelRenderFeatures,
|
|
@@ -4861,24 +4860,24 @@ var ActionTypes$1;
|
|
|
4861
4860
|
var reducers$1 = (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
4862
4861
|
if (state.disabled) return state;
|
|
4863
4862
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
4864
|
-
return _extends
|
|
4863
|
+
return _extends({}, state, {
|
|
4865
4864
|
activeOptionIndex: null,
|
|
4866
4865
|
listboxState: ListboxStates.Closed
|
|
4867
4866
|
});
|
|
4868
4867
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
4869
4868
|
if (state.disabled) return state;
|
|
4870
4869
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
4871
|
-
return _extends
|
|
4870
|
+
return _extends({}, state, {
|
|
4872
4871
|
listboxState: ListboxStates.Open
|
|
4873
4872
|
});
|
|
4874
4873
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
4875
4874
|
if (state.disabled === action.disabled) return state;
|
|
4876
|
-
return _extends
|
|
4875
|
+
return _extends({}, state, {
|
|
4877
4876
|
disabled: action.disabled
|
|
4878
4877
|
});
|
|
4879
4878
|
}, _reducers$1[ActionTypes$1.SetOrientation] = function (state, action) {
|
|
4880
4879
|
if (state.orientation === action.orientation) return state;
|
|
4881
|
-
return _extends
|
|
4880
|
+
return _extends({}, state, {
|
|
4882
4881
|
orientation: action.orientation
|
|
4883
4882
|
});
|
|
4884
4883
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -4899,7 +4898,7 @@ var reducers$1 = (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = fu
|
|
|
4899
4898
|
}
|
|
4900
4899
|
});
|
|
4901
4900
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
4902
|
-
return _extends
|
|
4901
|
+
return _extends({}, state, {
|
|
4903
4902
|
searchQuery: '',
|
|
4904
4903
|
activeOptionIndex: activeOptionIndex
|
|
4905
4904
|
});
|
|
@@ -4912,10 +4911,10 @@ var reducers$1 = (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = fu
|
|
|
4912
4911
|
|
|
4913
4912
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
4914
4913
|
});
|
|
4915
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends
|
|
4914
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends({}, state, {
|
|
4916
4915
|
searchQuery: searchQuery
|
|
4917
4916
|
});
|
|
4918
|
-
return _extends
|
|
4917
|
+
return _extends({}, state, {
|
|
4919
4918
|
searchQuery: searchQuery,
|
|
4920
4919
|
activeOptionIndex: match
|
|
4921
4920
|
});
|
|
@@ -4923,11 +4922,11 @@ var reducers$1 = (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = fu
|
|
|
4923
4922
|
if (state.disabled) return state;
|
|
4924
4923
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
4925
4924
|
if (state.searchQuery === '') return state;
|
|
4926
|
-
return _extends
|
|
4925
|
+
return _extends({}, state, {
|
|
4927
4926
|
searchQuery: ''
|
|
4928
4927
|
});
|
|
4929
4928
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
4930
|
-
return _extends
|
|
4929
|
+
return _extends({}, state, {
|
|
4931
4930
|
options: [].concat(state.options, [{
|
|
4932
4931
|
id: action.id,
|
|
4933
4932
|
dataRef: action.dataRef
|
|
@@ -4940,7 +4939,7 @@ var reducers$1 = (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = fu
|
|
|
4940
4939
|
return a.id === action.id;
|
|
4941
4940
|
});
|
|
4942
4941
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
4943
|
-
return _extends
|
|
4942
|
+
return _extends({}, state, {
|
|
4944
4943
|
options: nextOptions,
|
|
4945
4944
|
activeOptionIndex: function () {
|
|
4946
4945
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -5161,7 +5160,7 @@ var Button$4 = /*#__PURE__*/forwardRefWithAs(function Button(props, ref) {
|
|
|
5161
5160
|
onClick: handleClick
|
|
5162
5161
|
};
|
|
5163
5162
|
return render({
|
|
5164
|
-
props: _extends
|
|
5163
|
+
props: _extends({}, passthroughProps, propsWeControl),
|
|
5165
5164
|
slot: slot,
|
|
5166
5165
|
defaultTag: DEFAULT_BUTTON_TAG,
|
|
5167
5166
|
name: 'Listbox.Button'
|
|
@@ -5194,7 +5193,7 @@ function Label$3(props) {
|
|
|
5194
5193
|
onClick: handleClick
|
|
5195
5194
|
};
|
|
5196
5195
|
return render({
|
|
5197
|
-
props: _extends
|
|
5196
|
+
props: _extends({}, props, propsWeControl),
|
|
5198
5197
|
slot: slot,
|
|
5199
5198
|
defaultTag: DEFAULT_LABEL_TAG$1,
|
|
5200
5199
|
name: 'Listbox.Label'
|
|
@@ -5370,7 +5369,7 @@ var Options = /*#__PURE__*/forwardRefWithAs(function Options(props, ref) {
|
|
|
5370
5369
|
};
|
|
5371
5370
|
var passthroughProps = props;
|
|
5372
5371
|
return render({
|
|
5373
|
-
props: _extends
|
|
5372
|
+
props: _extends({}, passthroughProps, propsWeControl),
|
|
5374
5373
|
slot: slot,
|
|
5375
5374
|
defaultTag: DEFAULT_OPTIONS_TAG,
|
|
5376
5375
|
features: OptionsRenderFeatures,
|
|
@@ -5514,7 +5513,7 @@ function Option$2(props) {
|
|
|
5514
5513
|
onMouseLeave: handleLeave
|
|
5515
5514
|
};
|
|
5516
5515
|
return render({
|
|
5517
|
-
props: _extends
|
|
5516
|
+
props: _extends({}, passthroughProps, propsWeControl),
|
|
5518
5517
|
slot: slot,
|
|
5519
5518
|
defaultTag: DEFAULT_OPTION_TAG$1,
|
|
5520
5519
|
name: 'Listbox.Option'
|
|
@@ -5655,11 +5654,11 @@ function Label$2(props) {
|
|
|
5655
5654
|
return context.register(id);
|
|
5656
5655
|
}, [id, context.register]);
|
|
5657
5656
|
|
|
5658
|
-
var propsWeControl = _extends
|
|
5657
|
+
var propsWeControl = _extends({}, context.props, {
|
|
5659
5658
|
id: id
|
|
5660
5659
|
});
|
|
5661
5660
|
|
|
5662
|
-
var allProps = _extends
|
|
5661
|
+
var allProps = _extends({}, passThroughProps, propsWeControl); // @ts-expect-error props are dynamic via context, some components will
|
|
5663
5662
|
// provide an onClick then we can delete it.
|
|
5664
5663
|
|
|
5665
5664
|
|
|
@@ -5681,7 +5680,7 @@ var ActionTypes;
|
|
|
5681
5680
|
})(ActionTypes || (ActionTypes = {}));
|
|
5682
5681
|
|
|
5683
5682
|
var reducers = (_reducers = {}, _reducers[ActionTypes.RegisterOption] = function (state, action) {
|
|
5684
|
-
return _extends
|
|
5683
|
+
return _extends({}, state, {
|
|
5685
5684
|
options: [].concat(state.options, [{
|
|
5686
5685
|
id: action.id,
|
|
5687
5686
|
element: action.element,
|
|
@@ -5695,7 +5694,7 @@ var reducers = (_reducers = {}, _reducers[ActionTypes.RegisterOption] = function
|
|
|
5695
5694
|
});
|
|
5696
5695
|
if (idx === -1) return state;
|
|
5697
5696
|
options.splice(idx, 1);
|
|
5698
|
-
return _extends
|
|
5697
|
+
return _extends({}, state, {
|
|
5699
5698
|
options: options
|
|
5700
5699
|
});
|
|
5701
5700
|
}, _reducers);
|
|
@@ -5836,7 +5835,7 @@ function RadioGroup(props) {
|
|
|
5836
5835
|
}
|
|
5837
5836
|
}, [radioGroupRef, options, triggerChange]);
|
|
5838
5837
|
var registerOption = React.useCallback(function (option) {
|
|
5839
|
-
dispatch(_extends
|
|
5838
|
+
dispatch(_extends({
|
|
5840
5839
|
type: ActionTypes.RegisterOption
|
|
5841
5840
|
}, option));
|
|
5842
5841
|
return function () {
|
|
@@ -5871,7 +5870,7 @@ function RadioGroup(props) {
|
|
|
5871
5870
|
}, React__default['default'].createElement(RadioGroupContext.Provider, {
|
|
5872
5871
|
value: api
|
|
5873
5872
|
}, render({
|
|
5874
|
-
props: _extends
|
|
5873
|
+
props: _extends({}, passThroughProps, propsWeControl),
|
|
5875
5874
|
defaultTag: DEFAULT_RADIO_GROUP_TAG,
|
|
5876
5875
|
name: 'RadioGroup'
|
|
5877
5876
|
}))));
|
|
@@ -5980,7 +5979,7 @@ function Option$1(props) {
|
|
|
5980
5979
|
}, React__default['default'].createElement(LabelProvider, {
|
|
5981
5980
|
name: "RadioGroup.Label"
|
|
5982
5981
|
}, render({
|
|
5983
|
-
props: _extends
|
|
5982
|
+
props: _extends({}, passThroughProps, propsWeControl),
|
|
5984
5983
|
slot: slot,
|
|
5985
5984
|
defaultTag: DEFAULT_OPTION_TAG,
|
|
5986
5985
|
name: 'RadioGroup.Option'
|
|
@@ -6007,7 +6006,7 @@ function BaseSelectOption(_a) {
|
|
|
6007
6006
|
return (jsxRuntime.jsx(Listbox.Option, __assign({ className: className, as: as, value: value, disabled: disabled }, { children: children }), void 0));
|
|
6008
6007
|
}
|
|
6009
6008
|
|
|
6010
|
-
var CustomListBox = newStyled(Listbox)(templateObject_1$
|
|
6009
|
+
var CustomListBox = newStyled(Listbox)(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
6011
6010
|
function BaseSelect(_a) {
|
|
6012
6011
|
var value = _a.value, onChange = _a.onChange, disabled = _a.disabled, children = _a.children, className = _a.className;
|
|
6013
6012
|
return (jsxRuntime.jsx(CustomListBox, __assign({ disabled: disabled, as: "div", value: value, onChange: onChange, className: className }, { children: children }), void 0));
|
|
@@ -6017,7 +6016,7 @@ var BaseSelect$1 = Object.assign(BaseSelect, {
|
|
|
6017
6016
|
Options: BaseSelectOptions,
|
|
6018
6017
|
Option: BaseSelectOption,
|
|
6019
6018
|
});
|
|
6020
|
-
var templateObject_1$
|
|
6019
|
+
var templateObject_1$J;
|
|
6021
6020
|
|
|
6022
6021
|
var CustomButton = newStyled.button(function (_a) {
|
|
6023
6022
|
var theme = _a.theme, wide = _a.wide;
|
|
@@ -6154,7 +6153,7 @@ function SimpleDropdown(_a) {
|
|
|
6154
6153
|
return (jsxRuntime.jsxs(BaseDropdown$1, __assign({ value: selectedValue, onChange: onChangeHandler, disabled: disabled, wide: wide }, { children: [jsxRuntime.jsx(Button, __assign({ OpenIcon: Icon.Arrows.ChevronDown, CloseIcon: Icon.Arrows.ChevronUp, wide: wide }, { children: selectedOptionLabel() }), void 0), jsxRuntime.jsx(BaseDropdown$1.Options, { children: options.map(function (item) { return (jsxRuntime.jsx(BaseDropdown$1.Option, __assign({ value: item, disabled: false }, { children: item.label }), item.key)); }) }, void 0)] }), void 0));
|
|
6155
6154
|
}
|
|
6156
6155
|
|
|
6157
|
-
var getStylesBySize$
|
|
6156
|
+
var getStylesBySize$c = function (size) {
|
|
6158
6157
|
switch (size) {
|
|
6159
6158
|
case exports.ComponentSize.Medium:
|
|
6160
6159
|
return {
|
|
@@ -6170,7 +6169,7 @@ var getStylesBySize$b = function (size) {
|
|
|
6170
6169
|
var SimpleSelector = function (_a) {
|
|
6171
6170
|
var text = _a.text, className = _a.className, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? exports.ComponentSize.Medium : _c, _d = _a.active, active = _d === void 0 ? false : _d, onClick = _a.onClick;
|
|
6172
6171
|
var theme = useTheme();
|
|
6173
|
-
var stylesBySize = getStylesBySize$
|
|
6172
|
+
var stylesBySize = getStylesBySize$c(size);
|
|
6174
6173
|
var activeStyles = active ? { fontWeight: 600 } : { fontWeight: 0 };
|
|
6175
6174
|
return (jsx(BaseButton, __assign({ onClick: onClick, disabled: disabled, className: className, type: "button", css: __assign(__assign(__assign({}, stylesBySize), activeStyles), { boxSizing: 'border-box', fontSize: '0.75rem', cursor: 'pointer', '&:hover': {
|
|
6176
6175
|
fontWeight: 600,
|
|
@@ -6196,8 +6195,8 @@ var SelectorSecondary = function (_a) {
|
|
|
6196
6195
|
} }) }, void 0));
|
|
6197
6196
|
};
|
|
6198
6197
|
|
|
6199
|
-
var ButtonsContainer = newStyled.div(templateObject_1$
|
|
6200
|
-
var SizeParagraph = newStyled.p(templateObject_2$
|
|
6198
|
+
var ButtonsContainer = newStyled.div(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n"], ["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n"])));
|
|
6199
|
+
var SizeParagraph = newStyled.p(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n margin: 0 0 0.63rem 0;\n font-size: 0.88rem;\n"], ["\n margin: 0 0 0.63rem 0;\n font-size: 0.88rem;\n"])));
|
|
6201
6200
|
var getInitialValue$2 = function (options, selectedValue) {
|
|
6202
6201
|
if (selectedValue && selectedValue.disabled !== true && options.includes(selectedValue))
|
|
6203
6202
|
return selectedValue;
|
|
@@ -6222,9 +6221,9 @@ var SizeSelector = function (_a) {
|
|
|
6222
6221
|
}, size: exports.ComponentSize.Medium, text: size.label, active: active, disabled: size.disabled, onClick: function () { return onChangeHandler(size); } }, size.label));
|
|
6223
6222
|
}) }, void 0)] }, void 0));
|
|
6224
6223
|
};
|
|
6225
|
-
var templateObject_1$
|
|
6224
|
+
var templateObject_1$I, templateObject_2$v;
|
|
6226
6225
|
|
|
6227
|
-
var getStylesBySize$
|
|
6226
|
+
var getStylesBySize$b = function (size) {
|
|
6228
6227
|
switch (size) {
|
|
6229
6228
|
case exports.ComponentSize.Large:
|
|
6230
6229
|
case exports.ComponentSize.Medium:
|
|
@@ -6242,7 +6241,7 @@ var getStylesBySize$a = function (size) {
|
|
|
6242
6241
|
}
|
|
6243
6242
|
};
|
|
6244
6243
|
var textButtonStyles$1 = function (theme, size) {
|
|
6245
|
-
var stylesBySize = getStylesBySize$
|
|
6244
|
+
var stylesBySize = getStylesBySize$b(size);
|
|
6246
6245
|
return __assign(__assign({ border: 'none', background: 'transparent', padding: 0, color: theme.shades.gray550, alignItems: 'center', fontWeight: 600 }, stylesBySize), { '&:hover': {
|
|
6247
6246
|
textDecorationLine: 'underline',
|
|
6248
6247
|
}, '&:disabled': {
|
|
@@ -6251,7 +6250,7 @@ var textButtonStyles$1 = function (theme, size) {
|
|
|
6251
6250
|
} });
|
|
6252
6251
|
};
|
|
6253
6252
|
var withContainer = function (iconFill, isLeading, Icon) {
|
|
6254
|
-
return Icon && (jsx("span", __assign({ css: css(templateObject_1$
|
|
6253
|
+
return Icon && (jsx("span", __assign({ css: css(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n display: flex;\n align-items: center;\n ", "\n "], ["\n display: flex;\n align-items: center;\n ", "\n "])), isLeading ? 'margin-right: 5px' : 'margin-left: 5px') }, { children: jsx(Icon, { width: 1.25, height: 1.25, fill: iconFill }, void 0) }), void 0));
|
|
6255
6254
|
};
|
|
6256
6255
|
var getIconFill = function (theme, disabled, iconColor) {
|
|
6257
6256
|
if (disabled)
|
|
@@ -6267,18 +6266,18 @@ var TextButton = function (_a) {
|
|
|
6267
6266
|
var iconFill = getIconFill(theme, disabled, iconColor);
|
|
6268
6267
|
return (jsx(BaseButton, __assign({ renderLeading: withContainer(iconFill, true, LeadingIcon), renderTrailing: withContainer(iconFill, false, TrailingIcon), disabled: disabled, type: type, onClick: onClick, css: textButtonStyles$1(theme, size) }, { children: text }), void 0));
|
|
6269
6268
|
};
|
|
6270
|
-
var templateObject_1$
|
|
6269
|
+
var templateObject_1$H;
|
|
6271
6270
|
|
|
6272
|
-
var Container$
|
|
6273
|
-
var P$2 = newStyled.p(templateObject_2$
|
|
6271
|
+
var Container$s = newStyled.div(templateObject_1$G || (templateObject_1$G = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n font-size: 0.88rem;\n"], ["\n display: flex;\n justify-content: space-between;\n font-size: 0.88rem;\n"])));
|
|
6272
|
+
var P$2 = newStyled.p(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
6274
6273
|
var PercentageSpan = newStyled.span(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n font-weight: 700;\n text-decoration-line: underline;\n"], ["\n font-weight: 700;\n text-decoration-line: underline;\n"])));
|
|
6275
6274
|
var SizeFitGuide = function (_a) {
|
|
6276
6275
|
var title = _a.title, fitPercentageLabel = _a.fitPercentageLabel, fitPercentage = _a.fitPercentage, onClick = _a.onClick;
|
|
6277
|
-
return (jsxRuntime.jsxs(Container$
|
|
6276
|
+
return (jsxRuntime.jsxs(Container$s, { children: [jsxRuntime.jsx(TextButton, { LeadingIcon: Icon.PDP.Rule, size: exports.ComponentSize.Small, text: title, onClick: onClick }, void 0), jsxRuntime.jsxs(P$2, { children: [fitPercentageLabel, " ", jsxRuntime.jsxs(PercentageSpan, { children: [fitPercentage, "%"] }, void 0)] }, void 0)] }, void 0));
|
|
6278
6277
|
};
|
|
6279
|
-
var templateObject_1$
|
|
6278
|
+
var templateObject_1$G, templateObject_2$u, templateObject_3$j;
|
|
6280
6279
|
|
|
6281
|
-
var getStylesBySize$
|
|
6280
|
+
var getStylesBySize$a = function (size) {
|
|
6282
6281
|
switch (size) {
|
|
6283
6282
|
case exports.ComponentSize.Large:
|
|
6284
6283
|
return {
|
|
@@ -6306,7 +6305,7 @@ var getStylesBySize$9 = function (size) {
|
|
|
6306
6305
|
};
|
|
6307
6306
|
}
|
|
6308
6307
|
};
|
|
6309
|
-
var Container$
|
|
6308
|
+
var Container$r = newStyled.div(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n padding: ", ";\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: ", ";\n height: ", ";\n text-align: center;\n cursor: default;\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n padding: ", ";\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: ", ";\n height: ", ";\n text-align: center;\n cursor: default;\n"])), function (_a) {
|
|
6310
6309
|
var backgroundColor = _a.backgroundColor;
|
|
6311
6310
|
return backgroundColor;
|
|
6312
6311
|
}, function (_a) {
|
|
@@ -6315,39 +6314,39 @@ var Container$o = newStyled.div(templateObject_1$C || (templateObject_1$C = __ma
|
|
|
6315
6314
|
}, function (_a) {
|
|
6316
6315
|
var _b;
|
|
6317
6316
|
var size = _a.size;
|
|
6318
|
-
return (_b = getStylesBySize$
|
|
6317
|
+
return (_b = getStylesBySize$a(size)) === null || _b === void 0 ? void 0 : _b.borderRadius;
|
|
6319
6318
|
}, function (_a) {
|
|
6320
6319
|
var _b;
|
|
6321
6320
|
var size = _a.size;
|
|
6322
|
-
return (_b = getStylesBySize$
|
|
6321
|
+
return (_b = getStylesBySize$a(size)) === null || _b === void 0 ? void 0 : _b.padding;
|
|
6323
6322
|
}, function (_a) {
|
|
6324
6323
|
var size = _a.size;
|
|
6325
6324
|
return (size === exports.ComponentSize.Small ? '2rem' : 'unset');
|
|
6326
6325
|
}, function (_a) {
|
|
6327
6326
|
var _b;
|
|
6328
6327
|
var size = _a.size;
|
|
6329
|
-
return (_b = getStylesBySize$
|
|
6328
|
+
return (_b = getStylesBySize$a(size)) === null || _b === void 0 ? void 0 : _b.height;
|
|
6330
6329
|
});
|
|
6331
|
-
var H3$2 = newStyled.h3(templateObject_2$
|
|
6330
|
+
var H3$2 = newStyled.h3(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n color: ", ";\n font-weight: bold;\n margin: 0;\n font-size: ", ";\n line-height: ", ";\n"], ["\n color: ", ";\n font-weight: bold;\n margin: 0;\n font-size: ", ";\n line-height: ", ";\n"])), function (_a) {
|
|
6332
6331
|
var textColor = _a.textColor;
|
|
6333
6332
|
return textColor;
|
|
6334
6333
|
}, function (_a) {
|
|
6335
6334
|
var _b;
|
|
6336
6335
|
var size = _a.size;
|
|
6337
|
-
return (_b = getStylesBySize$
|
|
6336
|
+
return (_b = getStylesBySize$a(size)) === null || _b === void 0 ? void 0 : _b.fontSize;
|
|
6338
6337
|
}, function (_a) {
|
|
6339
6338
|
var _b;
|
|
6340
6339
|
var size = _a.size;
|
|
6341
|
-
return (_b = getStylesBySize$
|
|
6340
|
+
return (_b = getStylesBySize$a(size)) === null || _b === void 0 ? void 0 : _b.lineHeight;
|
|
6342
6341
|
});
|
|
6343
6342
|
var DiscountTag = function (_a) {
|
|
6344
6343
|
var discount = _a.discount, offText = _a.offText, disabled = _a.disabled, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#fff' : _b, _c = _a.borderColor, borderColor = _c === void 0 ? 'transparent' : _c, _d = _a.textColor, textColor = _d === void 0 ? '#fff' : _d, _e = _a.size, size = _e === void 0 ? exports.ComponentSize.Medium : _e;
|
|
6345
6344
|
var theme = useTheme();
|
|
6346
|
-
return (jsxRuntime.jsx(Container$
|
|
6345
|
+
return (jsxRuntime.jsx(Container$r, __assign({ backgroundColor: disabled ? theme.shades.gray050 : backgroundColor, borderColor: disabled ? theme.shades.gray050 : borderColor, size: size, "data-testid": "discount-container" }, { children: jsxRuntime.jsxs(H3$2, __assign({ textColor: disabled ? theme.shades.gray250 : textColor, size: size }, { children: [discount, "% ", offText] }), void 0) }), void 0));
|
|
6347
6346
|
};
|
|
6348
|
-
var templateObject_1$
|
|
6347
|
+
var templateObject_1$F, templateObject_2$t;
|
|
6349
6348
|
|
|
6350
|
-
var getStylesBySize$
|
|
6349
|
+
var getStylesBySize$9 = function (size) {
|
|
6351
6350
|
switch (size) {
|
|
6352
6351
|
case exports.ComponentSize.Large:
|
|
6353
6352
|
return {
|
|
@@ -6369,18 +6368,18 @@ var getStylesBySize$8 = function (size) {
|
|
|
6369
6368
|
};
|
|
6370
6369
|
}
|
|
6371
6370
|
};
|
|
6372
|
-
var Container$
|
|
6373
|
-
var Price = newStyled.h1(templateObject_2$
|
|
6371
|
+
var Container$q = newStyled.div(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
6372
|
+
var Price = newStyled.h1(templateObject_2$s || (templateObject_2$s = __makeTemplateObject(["\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: ", ";\n margin: ", ";\n"], ["\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n text-decoration: ", ";\n margin: ", ";\n"])), function (_a) {
|
|
6374
6373
|
var weight = _a.weight;
|
|
6375
6374
|
return (weight ? weight : '400');
|
|
6376
6375
|
}, function (_a) {
|
|
6377
6376
|
var _b;
|
|
6378
6377
|
var size = _a.size;
|
|
6379
|
-
return (_b = getStylesBySize$
|
|
6378
|
+
return (_b = getStylesBySize$9(size)) === null || _b === void 0 ? void 0 : _b.fontSize;
|
|
6380
6379
|
}, function (_a) {
|
|
6381
6380
|
var _b;
|
|
6382
6381
|
var size = _a.size;
|
|
6383
|
-
return (_b = getStylesBySize$
|
|
6382
|
+
return (_b = getStylesBySize$9(size)) === null || _b === void 0 ? void 0 : _b.lineHeight;
|
|
6384
6383
|
}, function (_a) {
|
|
6385
6384
|
var color = _a.color;
|
|
6386
6385
|
return color;
|
|
@@ -6390,19 +6389,19 @@ var Price = newStyled.h1(templateObject_2$q || (templateObject_2$q = __makeTempl
|
|
|
6390
6389
|
}, function (_a) {
|
|
6391
6390
|
var _b;
|
|
6392
6391
|
var margin = _a.margin, size = _a.size;
|
|
6393
|
-
return (margin ? (_b = getStylesBySize$
|
|
6392
|
+
return (margin ? (_b = getStylesBySize$9(size)) === null || _b === void 0 ? void 0 : _b.margin : '0');
|
|
6394
6393
|
});
|
|
6395
6394
|
var TagContainer = newStyled.h1(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n margin: ", ";\n display: flex;\n align-items: center;\n"], ["\n margin: ", ";\n display: flex;\n align-items: center;\n"])), function (_a) {
|
|
6396
6395
|
var _b;
|
|
6397
6396
|
var size = _a.size;
|
|
6398
|
-
return (_b = getStylesBySize$
|
|
6397
|
+
return (_b = getStylesBySize$9(size)) === null || _b === void 0 ? void 0 : _b.margin;
|
|
6399
6398
|
});
|
|
6400
6399
|
var PriceLabel = function (_a) {
|
|
6401
6400
|
var finalPrice = _a.finalPrice, originalPrice = _a.originalPrice, discount = _a.discount, color = _a.color, _b = _a.size, size = _b === void 0 ? exports.ComponentSize.Medium : _b;
|
|
6402
6401
|
var theme = useTheme();
|
|
6403
|
-
return (jsxRuntime.jsxs(Container$
|
|
6402
|
+
return (jsxRuntime.jsxs(Container$q, { children: [jsxRuntime.jsx(Price, __assign({ size: size, color: color || theme.palette.secondary.default, weight: 700, "data-testid": "price" }, { children: finalPrice }), void 0), originalPrice && (jsxRuntime.jsx(Price, __assign({ size: size, color: theme.shades.gray400, margin: true, underlined: true, "data-testid": "discount" }, { children: originalPrice }), void 0)), discount && (jsxRuntime.jsx(TagContainer, __assign({ size: size }, { children: jsxRuntime.jsx(DiscountTag, __assign({}, discount, { size: size }), void 0) }), void 0))] }, void 0));
|
|
6404
6403
|
};
|
|
6405
|
-
var templateObject_1$
|
|
6404
|
+
var templateObject_1$E, templateObject_2$s, templateObject_3$i;
|
|
6406
6405
|
|
|
6407
6406
|
var OneColorSelector = function (_a) {
|
|
6408
6407
|
var color = _a.color, selected = _a.selected, dataTestId = _a.dataTestId;
|
|
@@ -6441,8 +6440,8 @@ var OutOfStock = function (_a) {
|
|
|
6441
6440
|
return (jsxRuntime.jsxs("svg", __assign({ width: "32", height: "33", viewBox: "0 0 32 33", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [jsxRuntime.jsx("title", { children: title }, void 0), jsxRuntime.jsx("mask", __assign({ id: "path-1-inside-1", fill: "white" }, { children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.89435 9.60565C8.40619 10.0938 8.40619 10.8853 8.89435 11.3734L14.0209 16.5L8.89433 21.6266C8.40617 22.1147 8.40617 22.9062 8.89433 23.3943C9.38248 23.8825 10.1739 23.8825 10.6621 23.3943L15.7887 18.2677L21.2687 23.7478C21.7569 24.2359 22.5483 24.2359 23.0365 23.7478C23.5246 23.2596 23.5246 22.4682 23.0365 21.98L17.5564 16.5L23.0365 11.02C23.5246 10.5318 23.5246 9.74035 23.0365 9.25219C22.5483 8.76404 21.7568 8.76404 21.2687 9.25219L15.7887 14.7322L10.6621 9.60565C10.174 9.1175 9.3825 9.1175 8.89435 9.60565Z" }, void 0) }), void 0), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.89435 9.60565C8.40619 10.0938 8.40619 10.8853 8.89435 11.3734L14.0209 16.5L8.89433 21.6266C8.40617 22.1147 8.40617 22.9062 8.89433 23.3943C9.38248 23.8825 10.1739 23.8825 10.6621 23.3943L15.7887 18.2677L21.2687 23.7478C21.7569 24.2359 22.5483 24.2359 23.0365 23.7478C23.5246 23.2596 23.5246 22.4682 23.0365 21.98L17.5564 16.5L23.0365 11.02C23.5246 10.5318 23.5246 9.74035 23.0365 9.25219C22.5483 8.76404 21.7568 8.76404 21.2687 9.25219L15.7887 14.7322L10.6621 9.60565C10.174 9.1175 9.3825 9.1175 8.89435 9.60565Z", fill: theme.shades.gray300 }, void 0), jsxRuntime.jsx("path", { d: "M14.0209 16.5L14.5866 17.0657L15.1523 16.5L14.5866 15.9343L14.0209 16.5ZM8.89433 21.6266L9.46001 22.1922L8.89433 21.6266ZM10.6621 23.3943L11.2278 23.96L10.6621 23.3943ZM15.7887 18.2677L16.3544 17.7021L15.7887 17.1364L15.223 17.7021L15.7887 18.2677ZM17.5564 16.5L16.9908 15.9343L16.4251 16.5L16.9908 17.0657L17.5564 16.5ZM23.0365 11.02L23.6021 11.5856L23.0365 11.02ZM21.2687 9.25219L21.8344 9.81788L21.2687 9.25219ZM15.7887 14.7322L15.223 15.2979L15.7887 15.8636L16.3544 15.2979L15.7887 14.7322ZM9.46003 10.8077C9.2843 10.632 9.2843 10.3471 9.46003 10.1713L8.32866 9.03997C7.52809 9.84054 7.52809 11.1385 8.32866 11.9391L9.46003 10.8077ZM14.5866 15.9343L9.46003 10.8077L8.32866 11.9391L13.4552 17.0657L14.5866 15.9343ZM9.46001 22.1922L14.5866 17.0657L13.4552 15.9343L8.32864 21.0609L9.46001 22.1922ZM9.46001 22.8286C9.28428 22.6529 9.28428 22.368 9.46001 22.1922L8.32864 21.0609C7.52807 21.8614 7.52807 23.1594 8.32864 23.96L9.46001 22.8286ZM10.0964 22.8286C9.92067 23.0044 9.63575 23.0044 9.46001 22.8286L8.32864 23.96C9.12922 24.7606 10.4272 24.7606 11.2278 23.96L10.0964 22.8286ZM15.223 17.7021L10.0964 22.8286L11.2278 23.96L16.3544 18.8334L15.223 17.7021ZM21.8344 23.1821L16.3544 17.7021L15.223 18.8334L20.703 24.3135L21.8344 23.1821ZM22.4708 23.1821C22.2951 23.3578 22.0101 23.3578 21.8344 23.1821L20.703 24.3135C21.5036 25.114 22.8016 25.114 23.6022 24.3135L22.4708 23.1821ZM22.4708 22.5457C22.6465 22.7214 22.6465 23.0064 22.4708 23.1821L23.6022 24.3135C24.4027 23.5129 24.4027 22.2149 23.6022 21.4143L22.4708 22.5457ZM16.9908 17.0657L22.4708 22.5457L23.6022 21.4143L18.1221 15.9343L16.9908 17.0657ZM22.4708 10.4543L16.9908 15.9343L18.1221 17.0657L23.6021 11.5856L22.4708 10.4543ZM22.4708 9.81788C22.6465 9.99361 22.6465 10.2785 22.4708 10.4543L23.6021 11.5856C24.4027 10.7851 24.4027 9.48708 23.6021 8.68651L22.4708 9.81788ZM21.8344 9.81788C22.0101 9.64214 22.295 9.64214 22.4708 9.81788L23.6021 8.68651C22.8016 7.88593 21.5036 7.88593 20.703 8.68651L21.8344 9.81788ZM16.3544 15.2979L21.8344 9.81788L20.703 8.68651L15.223 14.1665L16.3544 15.2979ZM10.0964 10.1713L15.223 15.2979L16.3544 14.1665L11.2278 9.03997L10.0964 10.1713ZM9.46003 10.1713C9.63577 9.9956 9.92069 9.9956 10.0964 10.1713L11.2278 9.03997C10.4272 8.23939 9.12924 8.23939 8.32866 9.03997L9.46003 10.1713Z", fill: "white", mask: "url(#path-1-inside-1)" }, void 0), jsxRuntime.jsx("circle", { cx: "16", cy: "16.5", r: "12", stroke: theme.shades.gray300, strokeWidth: "0.5" }, void 0)] }), void 0));
|
|
6442
6441
|
};
|
|
6443
6442
|
|
|
6444
|
-
var CustomRadioGroup = newStyled(RadioGroup)(templateObject_1$
|
|
6445
|
-
var CustomRadioGroupLabel = newStyled(RadioGroup.Label)(templateObject_2$
|
|
6443
|
+
var CustomRadioGroup = newStyled(RadioGroup)(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
6444
|
+
var CustomRadioGroupLabel = newStyled(RadioGroup.Label)(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n font-size: 0.88rem;\n"], ["\n font-size: 0.88rem;\n"])));
|
|
6446
6445
|
var CustomRadioGroupOption = newStyled(RadioGroup.Option)(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n margin-right: 1rem;\n\n svg {\n cursor: pointer;\n }\n"], ["\n margin-right: 1rem;\n\n svg {\n cursor: pointer;\n }\n"])));
|
|
6447
6446
|
var Span = newStyled.span(templateObject_4$d || (templateObject_4$d = __makeTemplateObject(["\n font-weight: 600;\n"], ["\n font-weight: 600;\n"])));
|
|
6448
6447
|
var OptionsContainer = newStyled.div(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["\n display: flex;\n margin-top: 0.63rem;\n"], ["\n display: flex;\n margin-top: 0.63rem;\n"])));
|
|
@@ -6463,13 +6462,26 @@ var ColorRadioGroup$1 = Object.assign(ColorRadioGroup, {
|
|
|
6463
6462
|
Option: Option,
|
|
6464
6463
|
OptionsContainer: OptionsContainer,
|
|
6465
6464
|
});
|
|
6466
|
-
var templateObject_1$
|
|
6465
|
+
var templateObject_1$D, templateObject_2$r, templateObject_3$h, templateObject_4$d, templateObject_5$7;
|
|
6466
|
+
|
|
6467
|
+
var Container$p = newStyled.div(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n border: 0.081rem solid ", ";\n box-sizing: border-box;\n padding: 0.156rem;\n cursor: pointer;\n"], ["\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n border: 0.081rem solid ", ";\n box-sizing: border-box;\n padding: 0.156rem;\n cursor: pointer;\n"])), function (_a) {
|
|
6468
|
+
var borderColor = _a.borderColor;
|
|
6469
|
+
return borderColor;
|
|
6470
|
+
});
|
|
6471
|
+
var Image$3 = newStyled.img(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n border-radius: 50%;\n"], ["\n width: 100%;\n height: 100%;\n border-radius: 50%;\n"])));
|
|
6472
|
+
var PatternSelector = function (_a) {
|
|
6473
|
+
var url = _a.url, selected = _a.selected, dataTestId = _a.dataTestId;
|
|
6474
|
+
var theme = useTheme();
|
|
6475
|
+
var outerBorder = selected ? theme.shades.gray550 : 'transparent';
|
|
6476
|
+
return (jsxRuntime.jsx(Container$p, __assign({ "data-testid": dataTestId, borderColor: outerBorder }, { children: jsxRuntime.jsx(Image$3, { src: url, alt: "pattern" }, void 0) }), void 0));
|
|
6477
|
+
};
|
|
6478
|
+
var templateObject_1$C, templateObject_2$q;
|
|
6467
6479
|
|
|
6468
6480
|
var renderOptions$1 = function (options) {
|
|
6469
6481
|
if (options.length)
|
|
6470
6482
|
return options.map(function (option) { return (jsxRuntime.jsx(ColorRadioGroup$1.Option, __assign({ value: option }, { children: function (_a) {
|
|
6471
6483
|
var checked = _a.checked;
|
|
6472
|
-
return (jsxRuntime.jsx(ColorSelector, __assign({}, option.color, { selected: checked, dataTestId: option.label + "-selector" }), void 0));
|
|
6484
|
+
return option.color ? (jsxRuntime.jsx(ColorSelector, __assign({}, option.color, { selected: checked, dataTestId: option.label + "-selector" }), void 0)) : (option.pattern && jsxRuntime.jsx(PatternSelector, { url: option.pattern.url, selected: checked }, void 0));
|
|
6473
6485
|
} }), option.label)); });
|
|
6474
6486
|
else
|
|
6475
6487
|
return jsxRuntime.jsx(OutOfStock, { title: "out of stock color" }, void 0);
|
|
@@ -6495,7 +6507,7 @@ var SingleColorPicker = function (_a) {
|
|
|
6495
6507
|
|
|
6496
6508
|
var renderOptions = function (selectedColor, options) {
|
|
6497
6509
|
if (options && options.length)
|
|
6498
|
-
return options.map(function (option) { return (jsxRuntime.jsx(ColorRadioGroup$1.Option, __assign({ value: option }, { children: jsxRuntime.jsx(ColorSelector, __assign({}, option.color, { selected: selectedColor.has(option), dataTestId: option.label + "-selector" }), void 0) }), option.label)); });
|
|
6510
|
+
return options.map(function (option) { return (jsxRuntime.jsx(ColorRadioGroup$1.Option, __assign({ value: option }, { children: option.color ? (jsxRuntime.jsx(ColorSelector, __assign({}, option.color, { selected: selectedColor.has(option), dataTestId: option.label + "-selector" }), void 0)) : (option.pattern && (jsxRuntime.jsx(PatternSelector, { url: option.pattern.url, selected: selectedColor.has(option) }, void 0))) }), option.label)); });
|
|
6499
6511
|
else
|
|
6500
6512
|
return jsxRuntime.jsx(OutOfStock, { title: "out of stock color" }, void 0);
|
|
6501
6513
|
};
|
|
@@ -6529,7 +6541,7 @@ var MultiColorPicker = function (_a) {
|
|
|
6529
6541
|
return (jsxRuntime.jsxs(ColorRadioGroup$1, __assign({ value: selectedColor, onChange: onChangeHandler }, { children: [jsxRuntime.jsx(ColorRadioGroup$1.Label, { label: label, values: valueLabels }, void 0), jsxRuntime.jsx(ColorRadioGroup$1.OptionsContainer, { children: renderOptions(selectedColor, options) }, void 0)] }), void 0));
|
|
6530
6542
|
};
|
|
6531
6543
|
|
|
6532
|
-
var Image$2 = newStyled.img(templateObject_1$
|
|
6544
|
+
var Image$2 = newStyled.img(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n width: 4.063rem;\n height: 5.375rem;\n box-sizing: border-box;\n cursor: pointer;\n border: ", ";\n"], ["\n width: 4.063rem;\n height: 5.375rem;\n box-sizing: border-box;\n cursor: pointer;\n border: ", ";\n"])), function (_a) {
|
|
6533
6545
|
var selected = _a.selected, theme = _a.theme;
|
|
6534
6546
|
return selected ? "0.063rem solid " + theme.shades.gray700 : 'inherit';
|
|
6535
6547
|
});
|
|
@@ -6538,29 +6550,29 @@ var ImageSmallPreview = function (_a) {
|
|
|
6538
6550
|
var theme = useTheme();
|
|
6539
6551
|
return jsxRuntime.jsx(Image$2, { className: className, src: imageUrl, alt: alt, selected: selected, theme: theme }, void 0);
|
|
6540
6552
|
};
|
|
6541
|
-
var templateObject_1$
|
|
6553
|
+
var templateObject_1$B;
|
|
6542
6554
|
|
|
6543
|
-
var Container$
|
|
6544
|
-
var Button$3 = newStyled.button(templateObject_2$
|
|
6555
|
+
var Container$o = newStyled.div(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n padding-right: 1.25rem;\n overflow: auto;\n"], ["\n display: flex;\n flex-direction: column;\n padding-right: 1.25rem;\n overflow: auto;\n"])));
|
|
6556
|
+
var Button$3 = newStyled.button(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n"], ["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n"])));
|
|
6545
6557
|
var ImagePreviewList = function (_a) {
|
|
6546
6558
|
var images = _a.images, selectedImage = _a.selectedImage, onClick = _a.onClick, dataTestId = _a.dataTestId;
|
|
6547
|
-
return (jsx(Container$
|
|
6559
|
+
return (jsx(Container$o, __assign({ "data-testid": dataTestId }, { children: images.map(function (item) {
|
|
6548
6560
|
return (jsx(Button$3, __assign({ onClick: function () { return onClick(item); } }, { children: jsx(ImageSmallPreview, { css: { marginBottom: '1.25rem' }, imageUrl: item.imageUrl, alt: item.alt, selected: item.key === selectedImage.key }, void 0) }), item.key));
|
|
6549
6561
|
}) }), void 0));
|
|
6550
6562
|
};
|
|
6551
|
-
var templateObject_1$
|
|
6563
|
+
var templateObject_1$A, templateObject_2$p;
|
|
6552
6564
|
|
|
6553
|
-
var Container$
|
|
6554
|
-
var Image$1 = newStyled.img(templateObject_2$
|
|
6565
|
+
var Container$n = newStyled.div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n position: relative;\n max-height: 45rem;\n max-width: 33.125rem;\n"], ["\n position: relative;\n max-height: 45rem;\n max-width: 33.125rem;\n"])));
|
|
6566
|
+
var Image$1 = newStyled.img(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
6555
6567
|
var TopTagContainer = newStyled.div(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n position: absolute;\n left: 0;\n top: 0;\n"], ["\n position: absolute;\n left: 0;\n top: 0;\n"])));
|
|
6556
6568
|
var BottomTagContainer = newStyled.div(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"], ["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"])));
|
|
6557
6569
|
var ImageProductWithTags = function (_a) {
|
|
6558
6570
|
var image = _a.image, DiscountTagElement = _a.DiscountTagElement, BestSellerTagElement = _a.BestSellerTagElement, dataTestId = _a.dataTestId;
|
|
6559
|
-
return (jsxRuntime.jsxs(Container$
|
|
6571
|
+
return (jsxRuntime.jsxs(Container$n, __assign({ "data-testid": dataTestId }, { children: [jsxRuntime.jsx(Image$1, { src: image.imageUrl, alt: image.alt }, void 0), jsxRuntime.jsx(TopTagContainer, { children: DiscountTagElement }, void 0), jsxRuntime.jsx(BottomTagContainer, { children: BestSellerTagElement }, void 0)] }), void 0));
|
|
6560
6572
|
};
|
|
6561
|
-
var templateObject_1$
|
|
6573
|
+
var templateObject_1$z, templateObject_2$o, templateObject_3$g, templateObject_4$c;
|
|
6562
6574
|
|
|
6563
|
-
var Container$
|
|
6575
|
+
var Container$m = newStyled.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n width: fit-content;\n max-height: 45rem;\n"], ["\n display: flex;\n flex-direction: row;\n width: fit-content;\n max-height: 45rem;\n"])));
|
|
6564
6576
|
var ProductGallery = function (_a) {
|
|
6565
6577
|
var images = _a.images, selectedValue = _a.selectedValue, DiscountTagElement = _a.DiscountTagElement, BestSellerTagElement = _a.BestSellerTagElement, productImageDataTestId = _a.productImageDataTestId, previewListDataTestId = _a.previewListDataTestId;
|
|
6566
6578
|
var initialValue = selectedValue && images.includes(selectedValue) ? selectedValue : images[0];
|
|
@@ -6568,13 +6580,13 @@ var ProductGallery = function (_a) {
|
|
|
6568
6580
|
React.useEffect(function () {
|
|
6569
6581
|
setSelectedImage(initialValue);
|
|
6570
6582
|
}, [initialValue]);
|
|
6571
|
-
return (jsxRuntime.jsxs(Container$
|
|
6583
|
+
return (jsxRuntime.jsxs(Container$m, { children: [jsxRuntime.jsx(ImagePreviewList, { images: images, selectedImage: selectedImage, dataTestId: previewListDataTestId, onClick: function (value) {
|
|
6572
6584
|
setSelectedImage(value);
|
|
6573
6585
|
} }, void 0), jsxRuntime.jsx(ImageProductWithTags, { image: selectedImage, DiscountTagElement: DiscountTagElement, BestSellerTagElement: BestSellerTagElement, dataTestId: productImageDataTestId }, void 0)] }, void 0));
|
|
6574
6586
|
};
|
|
6575
|
-
var templateObject_1$
|
|
6587
|
+
var templateObject_1$y;
|
|
6576
6588
|
|
|
6577
|
-
var getStylesBySize$
|
|
6589
|
+
var getStylesBySize$8 = function (size) {
|
|
6578
6590
|
switch (size) {
|
|
6579
6591
|
case exports.ComponentSize.Large:
|
|
6580
6592
|
return {
|
|
@@ -6606,13 +6618,13 @@ var StarList = function (_a) {
|
|
|
6606
6618
|
var rating = _a.rating, starsNumber = _a.starsNumber, fill = _a.fill, _b = _a.size, size = _b === void 0 ? exports.ComponentSize.Medium : _b;
|
|
6607
6619
|
return (jsx("div", __assign({ style: { display: 'flex' } }, { children: __spreadArray([], new Array(starsNumber)).map(function (_, index) {
|
|
6608
6620
|
return (jsx("div", __assign({ "data-testid": "star-container", css: {
|
|
6609
|
-
marginRight: getStylesBySize$
|
|
6621
|
+
marginRight: getStylesBySize$8(size).marginRight,
|
|
6610
6622
|
display: 'flex',
|
|
6611
|
-
} }, { children: index < Math.floor(rating) ? (jsx(Icon.PDP.Star, __assign({}, getStylesBySize$
|
|
6623
|
+
} }, { children: index < Math.floor(rating) ? (jsx(Icon.PDP.Star, __assign({}, getStylesBySize$8(size), { fill: fill }), void 0)) : index === Math.floor(rating) && rating % 1 != 0 ? (jsx(Icon.PDP.StarHalf, __assign({}, getStylesBySize$8(size), { fill: fill }), void 0)) : (jsx(Icon.PDP.StarEmpty, __assign({}, getStylesBySize$8(size), { fill: fill }), void 0)) }), index));
|
|
6612
6624
|
}) }), void 0));
|
|
6613
6625
|
};
|
|
6614
6626
|
|
|
6615
|
-
var getStylesBySize$
|
|
6627
|
+
var getStylesBySize$7 = function (size) {
|
|
6616
6628
|
switch (size) {
|
|
6617
6629
|
case exports.ComponentSize.Large:
|
|
6618
6630
|
return {
|
|
@@ -6652,14 +6664,14 @@ var Rating = function (_a) {
|
|
|
6652
6664
|
fontStyle: 'normal',
|
|
6653
6665
|
fontWeight: 'normal',
|
|
6654
6666
|
color: theme.palette.secondary.default,
|
|
6655
|
-
fontSize: getStylesBySize$
|
|
6656
|
-
lineHeight: getStylesBySize$
|
|
6657
|
-
marginLeft: getStylesBySize$
|
|
6667
|
+
fontSize: getStylesBySize$7(size).fontSize,
|
|
6668
|
+
lineHeight: getStylesBySize$7(size).lineHeight,
|
|
6669
|
+
marginLeft: getStylesBySize$7(size).marginLeft,
|
|
6658
6670
|
} }, { children: [reviews, " ", reviewsText] }), void 0)] }), void 0));
|
|
6659
6671
|
};
|
|
6660
6672
|
|
|
6661
|
-
var Container$
|
|
6662
|
-
var P$1 = newStyled.p(templateObject_2$
|
|
6673
|
+
var Container$l = newStyled.div(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n display: flex;\n align-items: center;\n font-size: 0.88rem;\n"], ["\n display: flex;\n align-items: center;\n font-size: 0.88rem;\n"])));
|
|
6674
|
+
var P$1 = newStyled.p(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n margin: 0 0.25rem;\n font-weight: 700;\n color: ", ";\n"], ["\n margin: 0 0.25rem;\n font-weight: 700;\n color: ", ";\n"])), function (props) { return props.theme.shades.gray550; });
|
|
6663
6675
|
var textButtonStyles = function (theme) { return ({
|
|
6664
6676
|
border: 'none',
|
|
6665
6677
|
background: 'transparent',
|
|
@@ -6672,9 +6684,9 @@ var textButtonStyles = function (theme) { return ({
|
|
|
6672
6684
|
var FitPredictor = function (_a) {
|
|
6673
6685
|
var onClick = _a.onClick;
|
|
6674
6686
|
var theme = useTheme();
|
|
6675
|
-
return (jsxs(Container$
|
|
6687
|
+
return (jsxs(Container$l, __assign({ theme: theme }, { children: [jsx(Container$l, { children: jsx(Icon.Other.FitPredictor, { width: 1.125, height: 1.125, fill: theme.shades.gray550 }, void 0) }, void 0), jsx(P$1, __assign({ theme: theme }, { children: "FIT PREDICTOR" }), void 0), jsx(BaseButton, __assign({ css: textButtonStyles(theme), onClick: onClick }, { children: "Calculate your size" }), void 0)] }), void 0));
|
|
6676
6688
|
};
|
|
6677
|
-
var templateObject_1$
|
|
6689
|
+
var templateObject_1$x, templateObject_2$n;
|
|
6678
6690
|
|
|
6679
6691
|
var H2$1 = newStyled.h2(function (_a) {
|
|
6680
6692
|
var color = _a.color;
|
|
@@ -6688,7 +6700,7 @@ var H2$1 = newStyled.h2(function (_a) {
|
|
|
6688
6700
|
margin: '0.938rem 4.188rem',
|
|
6689
6701
|
});
|
|
6690
6702
|
});
|
|
6691
|
-
var Bar = newStyled.div(templateObject_1$
|
|
6703
|
+
var Bar = newStyled.div(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height: 0.5rem;\n background-color: ", ";\n width: ", ";\n border-radius: 0.25rem;\n position: absolute;\n left: ", ";\n animation: ", ";\n"], ["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height: 0.5rem;\n background-color: ", ";\n width: ", ";\n border-radius: 0.25rem;\n position: absolute;\n left: ", ";\n animation: ", ";\n"])), function (_a) {
|
|
6692
6704
|
var backgroundColor = _a.backgroundColor;
|
|
6693
6705
|
return backgroundColor;
|
|
6694
6706
|
}, function (_a) {
|
|
@@ -6711,7 +6723,7 @@ var Background = newStyled.div(function (_a) {
|
|
|
6711
6723
|
position: 'absolute',
|
|
6712
6724
|
});
|
|
6713
6725
|
});
|
|
6714
|
-
var Container$
|
|
6726
|
+
var Container$k = newStyled.div(function (_a) {
|
|
6715
6727
|
var widthAuto = _a.widthAuto;
|
|
6716
6728
|
return ({
|
|
6717
6729
|
width: widthAuto ? 'auto' : 'fit-content',
|
|
@@ -6725,11 +6737,11 @@ var getBarWithBasedOnPercent = function (percent) {
|
|
|
6725
6737
|
var ProgressBar = function (_a) {
|
|
6726
6738
|
var description = _a.description, fillColor = _a.fillColor, _b = _a.widthAuto, widthAuto = _b === void 0 ? true : _b, percent = _a.percent;
|
|
6727
6739
|
var theme = useTheme();
|
|
6728
|
-
return (jsxRuntime.jsxs(Container$
|
|
6740
|
+
return (jsxRuntime.jsxs(Container$k, __assign({ "data-testid": "PBContainer", widthAuto: widthAuto }, { children: [jsxRuntime.jsx(Background, __assign({ backgroundColor: theme.shades.gray100 }, { children: jsxRuntime.jsx(Bar, { "data-testid": "PBBar", backgroundColor: fillColor, percent: percent }, void 0) }), void 0), description && jsxRuntime.jsx(H2$1, __assign({ color: theme.palette.secondary.default }, { children: description }), void 0)] }), void 0));
|
|
6729
6741
|
};
|
|
6730
|
-
var templateObject_1$
|
|
6742
|
+
var templateObject_1$w;
|
|
6731
6743
|
|
|
6732
|
-
var getStylesBySize$
|
|
6744
|
+
var getStylesBySize$6 = function (size) {
|
|
6733
6745
|
switch (size) {
|
|
6734
6746
|
case exports.ComponentSize.Large:
|
|
6735
6747
|
return {
|
|
@@ -6748,21 +6760,21 @@ var getStylesBySize$5 = function (size) {
|
|
|
6748
6760
|
};
|
|
6749
6761
|
}
|
|
6750
6762
|
};
|
|
6751
|
-
var Container$
|
|
6763
|
+
var Container$j = newStyled.div(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n background-color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: background-color 0.1s ease;\n\n svg {\n margin: ", ";\n }\n\n &:hover {\n background-color: ", ";\n cursor: pointer;\n }\n\n &.disabled {\n background-color: ", ";\n cursor: not-allowed;\n\n svg path {\n fill: ", ";\n }\n }\n"], ["\n background-color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: background-color 0.1s ease;\n\n svg {\n margin: ", ";\n }\n\n &:hover {\n background-color: ", ";\n cursor: pointer;\n }\n\n &.disabled {\n background-color: ", ";\n cursor: not-allowed;\n\n svg path {\n fill: ", ";\n }\n }\n"])), function (_a) {
|
|
6752
6764
|
var backgroundColor = _a.backgroundColor;
|
|
6753
6765
|
return backgroundColor;
|
|
6754
6766
|
}, function (_a) {
|
|
6755
6767
|
var _b;
|
|
6756
6768
|
var size = _a.size;
|
|
6757
|
-
return (_b = getStylesBySize$
|
|
6769
|
+
return (_b = getStylesBySize$6(size)) === null || _b === void 0 ? void 0 : _b.widthHeight;
|
|
6758
6770
|
}, function (_a) {
|
|
6759
6771
|
var _b;
|
|
6760
6772
|
var size = _a.size;
|
|
6761
|
-
return (_b = getStylesBySize$
|
|
6773
|
+
return (_b = getStylesBySize$6(size)) === null || _b === void 0 ? void 0 : _b.widthHeight;
|
|
6762
6774
|
}, function (_a) {
|
|
6763
6775
|
var _b;
|
|
6764
6776
|
var size = _a.size;
|
|
6765
|
-
return (_b = getStylesBySize$
|
|
6777
|
+
return (_b = getStylesBySize$6(size)) === null || _b === void 0 ? void 0 : _b.margin;
|
|
6766
6778
|
}, function (_a) {
|
|
6767
6779
|
var hoverBackgroundColor = _a.hoverBackgroundColor;
|
|
6768
6780
|
return hoverBackgroundColor;
|
|
@@ -6776,9 +6788,9 @@ var Container$h = newStyled.div(templateObject_1$t || (templateObject_1$t = __ma
|
|
|
6776
6788
|
var IconButton = function (_a) {
|
|
6777
6789
|
var children = _a.children, disabled = _a.disabled, _b = _a.size, size = _b === void 0 ? exports.ComponentSize.Medium : _b, onClick = _a.onClick;
|
|
6778
6790
|
var theme = useTheme();
|
|
6779
|
-
return (jsxRuntime.jsx(Container$
|
|
6791
|
+
return (jsxRuntime.jsx(Container$j, __assign({ className: disabled ? 'disabled' : '', backgroundColor: theme.palette.primary.default, hoverBackgroundColor: theme.palette.secondary.default, disabledColor: theme.shades.gray050, disabledIconColor: theme.shades.gray200, size: size, "data-testid": "Container", onClick: disabled ? function () { } : onClick }, { children: children }), void 0));
|
|
6780
6792
|
};
|
|
6781
|
-
var templateObject_1$
|
|
6793
|
+
var templateObject_1$v;
|
|
6782
6794
|
|
|
6783
6795
|
var TooltipArrow = function (_a) {
|
|
6784
6796
|
var height = _a.height, width = _a.width, fill = _a.fill, stroke = _a.stroke;
|
|
@@ -6858,7 +6870,7 @@ var getTooltipAlignItems = function (position, align) {
|
|
|
6858
6870
|
}
|
|
6859
6871
|
};
|
|
6860
6872
|
|
|
6861
|
-
var Wrapper$5 = newStyled.div(templateObject_1$
|
|
6873
|
+
var Wrapper$5 = newStyled.div(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n align-items: center;\n cursor: pointer;\n\n &:hover {\n .tooltip-container {\n visibility: visible;\n opacity: 1;\n }\n }\n"], ["\n display: flex;\n flex-direction: ", ";\n align-items: center;\n cursor: pointer;\n\n &:hover {\n .tooltip-container {\n visibility: visible;\n opacity: 1;\n }\n }\n"])), function (_a) {
|
|
6862
6874
|
var position = _a.position;
|
|
6863
6875
|
return getWrapperFlexDirection(position);
|
|
6864
6876
|
});
|
|
@@ -6882,7 +6894,7 @@ var TooltipContainer = newStyled.div(function (_a) {
|
|
|
6882
6894
|
var getTooltipMargin = function (actual, expected, margin) {
|
|
6883
6895
|
return actual === expected ? margin : '0';
|
|
6884
6896
|
};
|
|
6885
|
-
var ContentWrapper = newStyled.div(templateObject_2$
|
|
6897
|
+
var ContentWrapper = newStyled.div(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n border: 0.063rem solid ", ";\n padding: 0.563rem 0.75rem;\n border-radius: 0.5rem;\n background-color: #fff;\n"], ["\n border: 0.063rem solid ", ";\n padding: 0.563rem 0.75rem;\n border-radius: 0.5rem;\n background-color: #fff;\n"])), function (_a) {
|
|
6886
6898
|
var borderColor = _a.borderColor;
|
|
6887
6899
|
return borderColor;
|
|
6888
6900
|
});
|
|
@@ -6906,7 +6918,7 @@ var Title$3 = newStyled.h1(templateObject_6$5 || (templateObject_6$5 = __makeTem
|
|
|
6906
6918
|
return color;
|
|
6907
6919
|
});
|
|
6908
6920
|
var IconContainer$3 = newStyled.div(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n width: 1.375rem;\n height: 1.125rem;\n margin-right: 0.563rem;\n"], ["\n width: 1.375rem;\n height: 1.125rem;\n margin-right: 0.563rem;\n"])));
|
|
6909
|
-
var templateObject_1$
|
|
6921
|
+
var templateObject_1$u, templateObject_2$m, templateObject_3$f, templateObject_4$b, templateObject_5$6, templateObject_6$5, templateObject_7$2;
|
|
6910
6922
|
|
|
6911
6923
|
var Tooltip = function (_a) {
|
|
6912
6924
|
var children = _a.children, position = _a.position, text = _a.text, _b = _a.align, align = _b === void 0 ? 'center' : _b, onClick = _a.onClick, header = _a.header;
|
|
@@ -6971,7 +6983,7 @@ var AccordionControlButton = function (_a) {
|
|
|
6971
6983
|
}, disabled: disabled, className: className }, { children: [children, controlIcon] }), void 0));
|
|
6972
6984
|
};
|
|
6973
6985
|
|
|
6974
|
-
var Container$
|
|
6986
|
+
var Container$i = newStyled(Accordion$1)(function (props) { return ({
|
|
6975
6987
|
border: "1px solid " + props.theme.shades.gray100,
|
|
6976
6988
|
padding: '1.25rem 2rem',
|
|
6977
6989
|
}); });
|
|
@@ -6993,14 +7005,14 @@ var Panel$1 = newStyled(Accordion$1.Panel)(function () { return ({
|
|
|
6993
7005
|
var AccordionBox = function (_a) {
|
|
6994
7006
|
var title = _a.title, text = _a.text, defaultOpen = _a.defaultOpen, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
|
|
6995
7007
|
var theme = useTheme();
|
|
6996
|
-
return (jsxRuntime.jsx(Container$
|
|
7008
|
+
return (jsxRuntime.jsx(Container$i, __assign({ theme: theme, defaultOpen: defaultOpen }, { children: function (_a) {
|
|
6997
7009
|
var open = _a.open;
|
|
6998
7010
|
var showPanel = open && !disabled;
|
|
6999
7011
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button$2, __assign({ disabled: disabled, open: open, openIcon: jsxRuntime.jsx(Icon.PDP.Plus, { width: 1.5, height: 1.5, title: "plus icon", fill: theme.shades.gray700 }, void 0), closeIcon: jsxRuntime.jsx(Icon.PDP.Minus, { width: 1.5, height: 1.5, title: "minus icon", fill: theme.shades.gray700 }, void 0) }, { children: title }), void 0), showPanel && jsxRuntime.jsx(Panel$1, __assign({ staticProp: true }, { children: text }), void 0)] }, void 0));
|
|
7000
7012
|
} }), void 0));
|
|
7001
7013
|
};
|
|
7002
7014
|
|
|
7003
|
-
var Container$
|
|
7015
|
+
var Container$h = newStyled(Accordion$1)(function (props) { return ({
|
|
7004
7016
|
borderTop: "1px solid " + props.theme.shades.gray100,
|
|
7005
7017
|
padding: '0.625rem 0',
|
|
7006
7018
|
}); });
|
|
@@ -7017,14 +7029,14 @@ var Panel = newStyled(Accordion$1.Panel)(function () { return ({
|
|
|
7017
7029
|
var AccordionIcon = function (_a) {
|
|
7018
7030
|
var title = _a.title, text = _a.text, leadingIcon = _a.leadingIcon, defaultOpen = _a.defaultOpen, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
|
|
7019
7031
|
var theme = useTheme();
|
|
7020
|
-
return (jsxRuntime.jsx(Container$
|
|
7032
|
+
return (jsxRuntime.jsx(Container$h, __assign({ theme: theme, defaultOpen: defaultOpen }, { children: function (_a) {
|
|
7021
7033
|
var open = _a.open;
|
|
7022
7034
|
var showPanel = open && !disabled;
|
|
7023
7035
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button$1, __assign({ open: open, openIcon: jsxRuntime.jsx(Icon.PDP.Plus, { width: 1, height: 1, title: "plus icon", fill: theme.shades.gray700 }, void 0), closeIcon: jsxRuntime.jsx(Icon.PDP.Minus, { width: 1, height: 1, title: "minus icon", fill: theme.shades.gray700 }, void 0), disabled: disabled }, { children: jsxRuntime.jsxs("span", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [leadingIcon, title] }), void 0) }), void 0), showPanel && jsxRuntime.jsx(Panel, __assign({ staticProp: true }, { children: text }), void 0)] }, void 0));
|
|
7024
7036
|
} }), void 0));
|
|
7025
7037
|
};
|
|
7026
7038
|
|
|
7027
|
-
var getStylesBySize$
|
|
7039
|
+
var getStylesBySize$5 = function (size) {
|
|
7028
7040
|
switch (size) {
|
|
7029
7041
|
case exports.ComponentSize.Large:
|
|
7030
7042
|
return {
|
|
@@ -7079,37 +7091,37 @@ var getStylesBySize$4 = function (size) {
|
|
|
7079
7091
|
};
|
|
7080
7092
|
}
|
|
7081
7093
|
};
|
|
7082
|
-
var Container$
|
|
7083
|
-
var CustomCheckbox = newStyled.div(templateObject_2$
|
|
7094
|
+
var Container$g = newStyled.div(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"])));
|
|
7095
|
+
var CustomCheckbox = newStyled.div(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n border: 0.094rem solid ", ";\n width: ", ";\n height: ", ";\n border-radius: ", ";\n margin-right: ", ";\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n width: ", ";\n height: ", ";\n }\n"], ["\n border: 0.094rem solid ", ";\n width: ", ";\n height: ", ";\n border-radius: ", ";\n margin-right: ", ";\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n width: ", ";\n height: ", ";\n }\n"])), function (_a) {
|
|
7084
7096
|
var color = _a.color;
|
|
7085
7097
|
return color;
|
|
7086
7098
|
}, function (_a) {
|
|
7087
7099
|
var _b, _c;
|
|
7088
7100
|
var size = _a.size;
|
|
7089
|
-
return (_c = (_b = getStylesBySize$
|
|
7101
|
+
return (_c = (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.input) === null || _c === void 0 ? void 0 : _c.width;
|
|
7090
7102
|
}, function (_a) {
|
|
7091
7103
|
var _b, _c;
|
|
7092
7104
|
var size = _a.size;
|
|
7093
|
-
return (_c = (_b = getStylesBySize$
|
|
7105
|
+
return (_c = (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.input) === null || _c === void 0 ? void 0 : _c.height;
|
|
7094
7106
|
}, function (_a) {
|
|
7095
7107
|
var _b, _c;
|
|
7096
7108
|
var size = _a.size;
|
|
7097
|
-
return (_c = (_b = getStylesBySize$
|
|
7109
|
+
return (_c = (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.input) === null || _c === void 0 ? void 0 : _c.borderRadius;
|
|
7098
7110
|
}, function (_a) {
|
|
7099
7111
|
var _b, _c;
|
|
7100
7112
|
var size = _a.size;
|
|
7101
|
-
return (_c = (_b = getStylesBySize$
|
|
7113
|
+
return (_c = (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.input) === null || _c === void 0 ? void 0 : _c.marginRight;
|
|
7102
7114
|
}, function (_a) {
|
|
7103
7115
|
var isChecked = _a.isChecked, color = _a.color;
|
|
7104
7116
|
return (isChecked ? color : '#fff');
|
|
7105
7117
|
}, function (_a) {
|
|
7106
7118
|
var _b, _c;
|
|
7107
7119
|
var size = _a.size;
|
|
7108
|
-
return (_c = (_b = getStylesBySize$
|
|
7120
|
+
return (_c = (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.icon) === null || _c === void 0 ? void 0 : _c.width;
|
|
7109
7121
|
}, function (_a) {
|
|
7110
7122
|
var _b, _c;
|
|
7111
7123
|
var size = _a.size;
|
|
7112
|
-
return (_c = (_b = getStylesBySize$
|
|
7124
|
+
return (_c = (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.icon) === null || _c === void 0 ? void 0 : _c.height;
|
|
7113
7125
|
});
|
|
7114
7126
|
var Input$2 = newStyled.input(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ", ";\n"], ["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ", ";\n"])), function (_a) {
|
|
7115
7127
|
var disabled = _a.disabled;
|
|
@@ -7118,11 +7130,11 @@ var Input$2 = newStyled.input(templateObject_3$e || (templateObject_3$e = __make
|
|
|
7118
7130
|
var Text$4 = newStyled.label(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n font-weight: ", ";\n"], ["\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n font-weight: ", ";\n"])), function (_a) {
|
|
7119
7131
|
var _b, _c;
|
|
7120
7132
|
var size = _a.size;
|
|
7121
|
-
return (_c = (_b = getStylesBySize$
|
|
7133
|
+
return (_c = (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.fontSize;
|
|
7122
7134
|
}, function (_a) {
|
|
7123
7135
|
var _b, _c;
|
|
7124
7136
|
var size = _a.size;
|
|
7125
|
-
return (_c = (_b = getStylesBySize$
|
|
7137
|
+
return (_c = (_b = getStylesBySize$5(size)) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.lineHeight;
|
|
7126
7138
|
}, function (_a) {
|
|
7127
7139
|
var color = _a.color;
|
|
7128
7140
|
return color;
|
|
@@ -7140,11 +7152,11 @@ var Checkbox = function (_a) {
|
|
|
7140
7152
|
return !checked;
|
|
7141
7153
|
});
|
|
7142
7154
|
};
|
|
7143
|
-
return (jsxRuntime.jsxs(Container$
|
|
7155
|
+
return (jsxRuntime.jsxs(Container$g, __assign({ disabled: disabled }, { children: [jsxRuntime.jsx(Input$2, { type: "checkbox", checked: isChecked, disabled: disabled, onChange: disabled ? function () { } : handleChange, id: id }, void 0), jsxRuntime.jsx(CustomCheckbox, __assign({ isChecked: isChecked, size: size, color: disabled ? theme.shades.gray250 : theme.shades.gray700, "data-testid": "checkbox" }, { children: isChecked && jsxRuntime.jsx(Icon.Actions.Check, { fill: "#fff" }, void 0) }), void 0), jsxRuntime.jsx(Text$4, __assign({ isChecked: isChecked, size: size, color: disabled ? theme.shades.gray250 : theme.shades.gray700, "data-testid": "checkbox-text", htmlFor: id }, { children: text }), void 0)] }), void 0));
|
|
7144
7156
|
};
|
|
7145
|
-
var templateObject_1$
|
|
7157
|
+
var templateObject_1$t, templateObject_2$l, templateObject_3$e, templateObject_4$a;
|
|
7146
7158
|
|
|
7147
|
-
var getStylesBySize$
|
|
7159
|
+
var getStylesBySize$4 = function (size) {
|
|
7148
7160
|
switch (size) {
|
|
7149
7161
|
case exports.ComponentSize.Large:
|
|
7150
7162
|
return {
|
|
@@ -7187,15 +7199,15 @@ var getStylesBySize$3 = function (size) {
|
|
|
7187
7199
|
};
|
|
7188
7200
|
}
|
|
7189
7201
|
};
|
|
7190
|
-
var Wrapper$4 = newStyled.div(templateObject_1$
|
|
7191
|
-
var Container$
|
|
7202
|
+
var Wrapper$4 = newStyled.div(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
7203
|
+
var Container$f = newStyled.div(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n position: relative;\n height: ", ";\n width: ", ";\n"], ["\n position: relative;\n height: ", ";\n width: ", ";\n"])), function (_a) {
|
|
7192
7204
|
var _b;
|
|
7193
7205
|
var size = _a.size;
|
|
7194
|
-
return (_b = getStylesBySize$
|
|
7206
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.container;
|
|
7195
7207
|
}, function (_a) {
|
|
7196
7208
|
var _b;
|
|
7197
7209
|
var size = _a.size;
|
|
7198
|
-
return (_b = getStylesBySize$
|
|
7210
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.container;
|
|
7199
7211
|
});
|
|
7200
7212
|
var Input$1 = newStyled.input(templateObject_3$d || (templateObject_3$d = __makeTemplateObject(["\n position: absolute;\n opacity: 0;\n cursor: ", ";\n height: 100%;\n width: 100%;\n margin: 0;\n"], ["\n position: absolute;\n opacity: 0;\n cursor: ", ";\n height: 100%;\n width: 100%;\n margin: 0;\n"])), function (_a) {
|
|
7201
7213
|
var disabled = _a.disabled;
|
|
@@ -7204,7 +7216,7 @@ var Input$1 = newStyled.input(templateObject_3$d || (templateObject_3$d = __make
|
|
|
7204
7216
|
var CustomRadio = newStyled.div(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n border: ", " solid\n ", ";\n border-radius: 50%;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n border: ", " solid\n ", ";\n border-radius: 50%;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_a) {
|
|
7205
7217
|
var _b;
|
|
7206
7218
|
var size = _a.size;
|
|
7207
|
-
return (_b = getStylesBySize$
|
|
7219
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.input.borderSize;
|
|
7208
7220
|
}, function (_a) {
|
|
7209
7221
|
var disabled = _a.disabled, color = _a.color, disabledColor = _a.disabledColor;
|
|
7210
7222
|
return (disabled ? disabledColor : color);
|
|
@@ -7215,24 +7227,24 @@ var CustomRadio = newStyled.div(templateObject_4$9 || (templateObject_4$9 = __ma
|
|
|
7215
7227
|
var CustomRadioCheck = newStyled.div(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n border-radius: 50%;\n height: ", ";\n width: ", ";\n background-color: #fff;\n"], ["\n border-radius: 50%;\n height: ", ";\n width: ", ";\n background-color: #fff;\n"])), function (_a) {
|
|
7216
7228
|
var _b;
|
|
7217
7229
|
var size = _a.size;
|
|
7218
|
-
return (_b = getStylesBySize$
|
|
7230
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.check;
|
|
7219
7231
|
}, function (_a) {
|
|
7220
7232
|
var _b;
|
|
7221
7233
|
var size = _a.size;
|
|
7222
|
-
return (_b = getStylesBySize$
|
|
7234
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.check;
|
|
7223
7235
|
});
|
|
7224
7236
|
var Text$3 = newStyled.label(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n margin-left: ", ";\n font-weight: 400;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n"], ["\n margin-left: ", ";\n font-weight: 400;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n"])), function (_a) {
|
|
7225
7237
|
var _b;
|
|
7226
7238
|
var size = _a.size;
|
|
7227
|
-
return (_b = getStylesBySize$
|
|
7239
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.text.marginLeft;
|
|
7228
7240
|
}, function (_a) {
|
|
7229
7241
|
var _b;
|
|
7230
7242
|
var size = _a.size;
|
|
7231
|
-
return (_b = getStylesBySize$
|
|
7243
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.text.fontSize;
|
|
7232
7244
|
}, function (_a) {
|
|
7233
7245
|
var _b;
|
|
7234
7246
|
var size = _a.size;
|
|
7235
|
-
return (_b = getStylesBySize$
|
|
7247
|
+
return (_b = getStylesBySize$4(size)) === null || _b === void 0 ? void 0 : _b.text.lineHeight;
|
|
7236
7248
|
}, function (_a) {
|
|
7237
7249
|
var disabled = _a.disabled, color = _a.color, disabledColor = _a.disabledColor;
|
|
7238
7250
|
return (disabled ? disabledColor : color);
|
|
@@ -7244,9 +7256,9 @@ var RadioInput = function (_a) {
|
|
|
7244
7256
|
var value = event.currentTarget.value;
|
|
7245
7257
|
onChange({ value: value, label: label });
|
|
7246
7258
|
};
|
|
7247
|
-
return (jsxRuntime.jsxs(Wrapper$4, { children: [jsxRuntime.jsxs(Container$
|
|
7259
|
+
return (jsxRuntime.jsxs(Wrapper$4, { children: [jsxRuntime.jsxs(Container$f, __assign({ size: size, "data-testid": "container" }, { children: [jsxRuntime.jsx(Input$1, { id: name + "-" + id, type: "radio", name: name, value: value, checked: checked, onChange: function (e) { return (disabled ? null : handleChange(e, label)); }, disabled: disabled }, void 0), jsxRuntime.jsx(CustomRadio, __assign({ size: size, isChecked: checked, disabled: disabled, color: theme.shades.gray700, disabledColor: theme.shades.gray250, "data-testid": "custom-radio" }, { children: checked && jsxRuntime.jsx(CustomRadioCheck, { size: size, "data-testid": "check" }, void 0) }), void 0)] }), void 0), jsxRuntime.jsx(Text$3, __assign({ size: size, disabled: disabled, color: theme.shades.gray700, disabledColor: theme.shades.gray250, "data-testid": "label", htmlFor: name + "-" + id }, { children: label }), void 0)] }, void 0));
|
|
7248
7260
|
};
|
|
7249
|
-
var templateObject_1$
|
|
7261
|
+
var templateObject_1$s, templateObject_2$k, templateObject_3$d, templateObject_4$9, templateObject_5$5, templateObject_6$4;
|
|
7250
7262
|
|
|
7251
7263
|
var RadioGroupInput = function (_a) {
|
|
7252
7264
|
var name = _a.name, _b = _a.options, options = _b === void 0 ? [] : _b, value = _a.value, onChange = _a.onChange, _c = _a.size, size = _c === void 0 ? exports.ComponentSize.Medium : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d;
|
|
@@ -7260,8 +7272,8 @@ var RadioGroupInput = function (_a) {
|
|
|
7260
7272
|
}) }), void 0));
|
|
7261
7273
|
};
|
|
7262
7274
|
|
|
7263
|
-
var Wrapper$3 = newStyled.div(templateObject_1$
|
|
7264
|
-
var Container$
|
|
7275
|
+
var Wrapper$3 = newStyled.div(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n padding: 0.625rem 1.5rem;\n"], ["\n padding: 0.625rem 1.5rem;\n"])));
|
|
7276
|
+
var Container$e = newStyled.div(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
7265
7277
|
var Text$2 = newStyled.h4(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n font-size: 0.875rem;\n line-height: 1.375rem;\n color: ", ";\n font-weight: ", ";\n margin: ", ";\n"], ["\n font-size: 0.875rem;\n line-height: 1.375rem;\n color: ", ";\n font-weight: ", ";\n margin: ", ";\n"])), function (_a) {
|
|
7266
7278
|
var color = _a.color;
|
|
7267
7279
|
return color;
|
|
@@ -7275,34 +7287,34 @@ var Text$2 = newStyled.h4(templateObject_3$c || (templateObject_3$c = __makeTemp
|
|
|
7275
7287
|
var Minimalistic = function (_a) {
|
|
7276
7288
|
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#FCFAF7' : _b, _c = _a.borderColor, borderColor = _c === void 0 ? '#E7C9B2' : _c, originalPrice = _a.originalPrice, price = _a.price, savingPrice = _a.savingPrice, getMorePayLessText = _a.getMorePayLessText, youAreSavingText = _a.youAreSavingText, getQtyForText = _a.getQtyForText, discount = _a.discount, offText = _a.offText, _d = _a.widthAuto, widthAuto = _d === void 0 ? false : _d;
|
|
7277
7289
|
var theme = useTheme();
|
|
7278
|
-
return (jsxRuntime.jsx(Card$1, __assign({ backgroundColor: backgroundColor, widthAuto: widthAuto, border: { borderColor: borderColor, borderWidth: '0.063rem' }, flex: false }, { children: jsxRuntime.jsxs(Wrapper$3, { children: [jsxRuntime.jsxs(Container$
|
|
7290
|
+
return (jsxRuntime.jsx(Card$1, __assign({ backgroundColor: backgroundColor, widthAuto: widthAuto, border: { borderColor: borderColor, borderWidth: '0.063rem' }, flex: false }, { children: jsxRuntime.jsxs(Wrapper$3, { children: [jsxRuntime.jsxs(Container$e, __assign({ "data-testid": "TopSection" }, { children: [jsxRuntime.jsx(Text$2, __assign({ color: theme.palette.secondary.default, weight: "600", margin: "0 1.25rem 0 0" }, { children: getMorePayLessText }), void 0), jsxRuntime.jsx(PriceLabel, { finalPrice: price, originalPrice: originalPrice, color: "#3A3A3A", size: exports.ComponentSize.Small }, void 0)] }), void 0), jsxRuntime.jsxs(Container$e, __assign({ "data-testid": "BottomSection" }, { children: [jsxRuntime.jsxs(Text$2, __assign({ color: "#d3373c", weight: "600", margin: "0 1.25rem 0 0" }, { children: [getQtyForText, " ", discount, "% ", offText] }), void 0), jsxRuntime.jsxs(Text$2, __assign({ color: theme.palette.secondary.default }, { children: [youAreSavingText, ": ", savingPrice] }), void 0)] }), void 0)] }, void 0) }), void 0));
|
|
7279
7291
|
};
|
|
7280
|
-
var templateObject_1$
|
|
7292
|
+
var templateObject_1$r, templateObject_2$j, templateObject_3$c;
|
|
7281
7293
|
|
|
7282
|
-
var Container$
|
|
7283
|
-
var Title$2 = newStyled.h1(templateObject_2$
|
|
7294
|
+
var Container$d = newStyled.div(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n padding: 0.625rem 1.5rem;\n"], ["\n padding: 0.625rem 1.5rem;\n"])));
|
|
7295
|
+
var Title$2 = newStyled.h1(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n font-weight: 700;\n font-size: 1rem;\n line-height: 1.25rem;\n color: ", ";\n margin: 0;\n margin-bottom: 0.125rem;\n text-align: center;\n"], ["\n font-weight: 700;\n font-size: 1rem;\n line-height: 1.25rem;\n color: ", ";\n margin: 0;\n margin-bottom: 0.125rem;\n text-align: center;\n"])), function (props) { return props.color; });
|
|
7284
7296
|
var Details$1 = newStyled.span(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n display: flex;\n align-items: center;\n font-weight: 400;\n font-size: 1rem;\n margin: 0;\n line-height: 1.5rem;\n justify-content: center;\n color: ", ";\n"], ["\n display: flex;\n align-items: center;\n font-weight: 400;\n font-size: 1rem;\n margin: 0;\n line-height: 1.5rem;\n justify-content: center;\n color: ", ";\n"])), function (props) { return props.color; });
|
|
7285
7297
|
var PriceContainer$1 = newStyled.span(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject(["\n margin: 0 0.313rem;\n display: flex;\n align-items: center;\n"], ["\n margin: 0 0.313rem;\n display: flex;\n align-items: center;\n"])));
|
|
7286
7298
|
var Simple = function (_a) {
|
|
7287
7299
|
var title = _a.title, freeShippingText = _a.freeShippingText, price = _a.price, anyQtyForText = _a.anyQtyForText, backgroundColor = _a.backgroundColor, _b = _a.widthAuto, widthAuto = _b === void 0 ? false : _b;
|
|
7288
7300
|
var theme = useTheme();
|
|
7289
|
-
return (jsxRuntime.jsx(Card$1, __assign({ backgroundColor: backgroundColor, widthAuto: widthAuto }, { children: jsxRuntime.jsxs(Container$
|
|
7301
|
+
return (jsxRuntime.jsx(Card$1, __assign({ backgroundColor: backgroundColor, widthAuto: widthAuto }, { children: jsxRuntime.jsxs(Container$d, { children: [jsxRuntime.jsx(Title$2, __assign({ color: theme.palette.secondary.default, "data-testid": "Title" }, { children: title }), void 0), jsxRuntime.jsxs(Details$1, __assign({ color: theme.palette.secondary.default, "data-testid": "Details" }, { children: [anyQtyForText, jsxRuntime.jsx(PriceContainer$1, __assign({ "data-testid": "Price" }, { children: jsxRuntime.jsx(PriceLabel, { finalPrice: price, color: "#d3373c", size: exports.ComponentSize.Small }, void 0) }), void 0), "+ ", freeShippingText] }), void 0)] }, void 0) }), void 0));
|
|
7290
7302
|
};
|
|
7291
|
-
var templateObject_1$
|
|
7303
|
+
var templateObject_1$q, templateObject_2$i, templateObject_3$b, templateObject_4$8;
|
|
7292
7304
|
|
|
7293
7305
|
var Bundle = {
|
|
7294
7306
|
Minimalistic: Minimalistic,
|
|
7295
7307
|
Simple: Simple,
|
|
7296
7308
|
};
|
|
7297
7309
|
|
|
7298
|
-
var Container$
|
|
7310
|
+
var Container$c = newStyled.div(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n"])));
|
|
7299
7311
|
var Tag = function (_a) {
|
|
7300
7312
|
var text = _a.text, className = _a.className;
|
|
7301
|
-
return jsxRuntime.jsx(Container$
|
|
7313
|
+
return jsxRuntime.jsx(Container$c, __assign({ className: className }, { children: text }), void 0);
|
|
7302
7314
|
};
|
|
7303
|
-
var templateObject_1$
|
|
7315
|
+
var templateObject_1$p;
|
|
7304
7316
|
|
|
7305
|
-
var getStylesBySize$
|
|
7317
|
+
var getStylesBySize$3 = function (size) {
|
|
7306
7318
|
switch (size) {
|
|
7307
7319
|
case exports.ComponentSize.Large:
|
|
7308
7320
|
return {
|
|
@@ -7333,11 +7345,11 @@ var getStylesBySize$2 = function (size) {
|
|
|
7333
7345
|
var CategoryTag = function (_a) {
|
|
7334
7346
|
var text = _a.text, size = _a.size, className = _a.className;
|
|
7335
7347
|
var theme = useTheme();
|
|
7336
|
-
var stylesBySize = getStylesBySize$
|
|
7348
|
+
var stylesBySize = getStylesBySize$3(size);
|
|
7337
7349
|
return (jsx(Tag, { css: __assign({ backgroundColor: theme.shades.white, fontWeight: 600, color: theme.shades.gray700 }, stylesBySize), text: text, className: className }, void 0));
|
|
7338
7350
|
};
|
|
7339
7351
|
|
|
7340
|
-
var getStylesBySize$
|
|
7352
|
+
var getStylesBySize$2 = function (size) {
|
|
7341
7353
|
switch (size) {
|
|
7342
7354
|
case exports.ComponentSize.Large:
|
|
7343
7355
|
return {
|
|
@@ -7367,7 +7379,7 @@ var getStylesBySize$1 = function (size) {
|
|
|
7367
7379
|
};
|
|
7368
7380
|
var SeasonOfferTag = function (_a) {
|
|
7369
7381
|
var text = _a.text, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#C64844' : _b, size = _a.size, className = _a.className;
|
|
7370
|
-
var stylesBySize = getStylesBySize$
|
|
7382
|
+
var stylesBySize = getStylesBySize$2(size);
|
|
7371
7383
|
return (jsx(Tag, { css: __assign({ backgroundColor: backgroundColor, fontWeight: 700, color: '#FFFFFF' }, stylesBySize), text: text, className: className }, void 0));
|
|
7372
7384
|
};
|
|
7373
7385
|
|
|
@@ -7401,11 +7413,11 @@ var Timer = function (_a) {
|
|
|
7401
7413
|
return (jsxRuntime.jsxs("div", __assign({ "data-testid": "Time" }, { children: [hours, "h ", minutes, "m ", seconds, "s"] }), void 0));
|
|
7402
7414
|
};
|
|
7403
7415
|
|
|
7404
|
-
var Label = newStyled.span(templateObject_1$
|
|
7416
|
+
var Label = newStyled.span(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n font-weight: 600;\n color: ", ";\n font-size: 1.125rem;\n line-height: 1.75rem;\n"], ["\n font-weight: 600;\n color: ", ";\n font-size: 1.125rem;\n line-height: 1.75rem;\n"])), function (_a) {
|
|
7405
7417
|
var color = _a.color;
|
|
7406
7418
|
return color;
|
|
7407
7419
|
});
|
|
7408
|
-
var MandatoryIcon = newStyled.span(templateObject_2$
|
|
7420
|
+
var MandatoryIcon = newStyled.span(templateObject_2$h || (templateObject_2$h = __makeTemplateObject(["\n color: ", ";\n margin-left: 0.25rem;\n"], ["\n color: ", ";\n margin-left: 0.25rem;\n"])), function (_a) {
|
|
7409
7421
|
var color = _a.color;
|
|
7410
7422
|
return color;
|
|
7411
7423
|
});
|
|
@@ -7414,26 +7426,26 @@ var InputLabel = function (_a) {
|
|
|
7414
7426
|
var theme = useTheme();
|
|
7415
7427
|
return (jsxRuntime.jsxs(Label, __assign({ color: isDisabled ? theme.shades.gray250 : theme.shades.gray700 }, { children: [label, isRequired && jsxRuntime.jsx(MandatoryIcon, __assign({ color: theme.semantic.alert }, { children: "*" }), void 0)] }), void 0));
|
|
7416
7428
|
};
|
|
7417
|
-
var templateObject_1$
|
|
7429
|
+
var templateObject_1$o, templateObject_2$h;
|
|
7418
7430
|
|
|
7419
7431
|
var isEmpty = function (value) {
|
|
7420
7432
|
return value.length === 0;
|
|
7421
7433
|
};
|
|
7422
7434
|
|
|
7423
|
-
var ErrorText = newStyled.h3(templateObject_1$
|
|
7424
|
-
var ErrorContainer = newStyled.div(templateObject_2$
|
|
7435
|
+
var ErrorText = newStyled.h3(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n color: ", " !important;\n font-size: 0.75rem;\n font-weight: 600;\n margin: 0;\n font-height: 1rem;\n margin-left: 0.313rem;\n"], ["\n color: ", " !important;\n font-size: 0.75rem;\n font-weight: 600;\n margin: 0;\n font-height: 1rem;\n margin-left: 0.313rem;\n"])), function (props) { return props.color; });
|
|
7436
|
+
var ErrorContainer = newStyled.div(templateObject_2$g || (templateObject_2$g = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 0.25rem;\n"], ["\n display: flex;\n align-items: center;\n margin-top: 0.25rem;\n"])));
|
|
7425
7437
|
var Error$1 = function (_a) {
|
|
7426
7438
|
var error = _a.error;
|
|
7427
7439
|
var theme = useTheme();
|
|
7428
7440
|
return (jsxRuntime.jsxs(ErrorContainer, { children: [jsxRuntime.jsx(Icon.Actions.LightExclamation, { fill: theme.semantic.alert, width: 0.875, height: 0.875 }, void 0), jsxRuntime.jsx(ErrorText, __assign({ color: theme.semantic.alert }, { children: error }), void 0)] }, void 0));
|
|
7429
7441
|
};
|
|
7430
|
-
var templateObject_1$
|
|
7442
|
+
var templateObject_1$n, templateObject_2$g;
|
|
7431
7443
|
|
|
7432
|
-
var Container$
|
|
7444
|
+
var Container$b = newStyled.div(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n height: 3rem;\n input {\n border-color: ", ";\n }\n"], ["\n height: 3rem;\n input {\n border-color: ", ";\n }\n"])), function (_a) {
|
|
7433
7445
|
var color = _a.color;
|
|
7434
7446
|
return color;
|
|
7435
7447
|
});
|
|
7436
|
-
var StyledInput = newStyled.input(templateObject_2$
|
|
7448
|
+
var StyledInput = newStyled.input(templateObject_2$f || (templateObject_2$f = __makeTemplateObject(["\n padding: 0.875rem 1rem 0.625rem;\n font-size: 1rem;\n border-radius: 0.5rem;\n border: 0.063rem solid ", ";\n line-height: 1.5rem;\n color: ", ";\n font-weight: 400;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n\n &::placeholder {\n color: ", ";\n }\n\n &:focus {\n outline: none;\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n border: 0.063rem solid ", ";\n color: ", ";\n\n &::placeholder {\n color: ", ";\n }\n }\n"], ["\n padding: 0.875rem 1rem 0.625rem;\n font-size: 1rem;\n border-radius: 0.5rem;\n border: 0.063rem solid ", ";\n line-height: 1.5rem;\n color: ", ";\n font-weight: 400;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n\n &::placeholder {\n color: ", ";\n }\n\n &:focus {\n outline: none;\n border-color: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n border: 0.063rem solid ", ";\n color: ", ";\n\n &::placeholder {\n color: ", ";\n }\n }\n"])), function (_a) {
|
|
7437
7449
|
var borderColor = _a.borderColor;
|
|
7438
7450
|
return borderColor;
|
|
7439
7451
|
}, function (_a) {
|
|
@@ -7459,7 +7471,7 @@ var StyledInput = newStyled.input(templateObject_2$e || (templateObject_2$e = __
|
|
|
7459
7471
|
return disabledColor;
|
|
7460
7472
|
});
|
|
7461
7473
|
var InputWrapper = newStyled.div(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n position: relative;\n display: flex;\n height: 100%;\n"], ["\n position: relative;\n display: flex;\n height: 100%;\n"])));
|
|
7462
|
-
var templateObject_1$
|
|
7474
|
+
var templateObject_1$m, templateObject_2$f, templateObject_3$a;
|
|
7463
7475
|
|
|
7464
7476
|
var BaseInput = function (_a) {
|
|
7465
7477
|
var onChange = _a.onChange, _b = _a.defaultValue, defaultValue = _b === void 0 ? '' : _b, label = _a.label, children = _a.children, required = _a.required, onValidation = _a.onValidation, rest = __rest(_a, ["onChange", "defaultValue", "label", "children", "required", "onValidation"]);
|
|
@@ -7493,15 +7505,15 @@ var BaseInput = function (_a) {
|
|
|
7493
7505
|
disabledBackgroundColor: theme.shades.gray010,
|
|
7494
7506
|
disabledColor: theme.shades.gray250,
|
|
7495
7507
|
};
|
|
7496
|
-
return (jsxRuntime.jsxs(Container$
|
|
7508
|
+
return (jsxRuntime.jsxs(Container$b, __assign({ color: status === exports.InputValidationType.Valid
|
|
7497
7509
|
? theme.shades.gray700
|
|
7498
7510
|
: status === exports.InputValidationType.Error
|
|
7499
7511
|
? theme.semantic.alert
|
|
7500
7512
|
: '' }, { children: [label && (jsxRuntime.jsx(InputLabel, { label: label, isDisabled: rest.disabled, isRequired: Boolean(required) }, void 0)), jsxRuntime.jsxs(InputWrapper, __assign({ className: "inputWrapper" }, { children: [jsxRuntime.jsx(StyledInput, __assign({ "data-testid": "base-input", type: "text", onChange: handleChange, onBlur: validate, required: Boolean(required), value: value }, rest, styling), void 0), children] }), void 0), required && status === exports.InputValidationType.Error && jsxRuntime.jsx(Error$1, { error: required }, void 0)] }), void 0));
|
|
7501
7513
|
};
|
|
7502
7514
|
|
|
7503
|
-
var Container$
|
|
7504
|
-
var ButtonContainer$1 = newStyled.div(templateObject_2$
|
|
7515
|
+
var Container$a = newStyled.div(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n input {\n border-radius: 0.5rem 1rem 1rem 0.5rem;\n }\n"], ["\n input {\n border-radius: 0.5rem 1rem 1rem 0.5rem;\n }\n"])));
|
|
7516
|
+
var ButtonContainer$1 = newStyled.div(templateObject_2$e || (templateObject_2$e = __makeTemplateObject(["\n width: 7.125rem;\n height: 100%;\n position: absolute;\n right: 0;\n\n button {\n width: 100%;\n height: 100%;\n border-radius: 0 0.5rem 0.5rem 0;\n }\n"], ["\n width: 7.125rem;\n height: 100%;\n position: absolute;\n right: 0;\n\n button {\n width: 100%;\n height: 100%;\n border-radius: 0 0.5rem 0.5rem 0;\n }\n"])));
|
|
7505
7517
|
var Custom = function (_a) {
|
|
7506
7518
|
var onClick = _a.onClick, text = _a.text, type = _a.type, rest = __rest(_a, ["onClick", "text", "type"]);
|
|
7507
7519
|
var props = {
|
|
@@ -7509,20 +7521,20 @@ var Custom = function (_a) {
|
|
|
7509
7521
|
text: text,
|
|
7510
7522
|
disabled: rest.disabled,
|
|
7511
7523
|
};
|
|
7512
|
-
return (jsxRuntime.jsx(Container$
|
|
7524
|
+
return (jsxRuntime.jsx(Container$a, { children: jsxRuntime.jsx(BaseInput, __assign({}, rest, { children: jsxRuntime.jsx(ButtonContainer$1, { children: type === 'primary' ? jsxRuntime.jsx(ButtonPrimary, __assign({}, props), void 0) : jsxRuntime.jsx(ButtonSecondary, __assign({}, props), void 0) }, void 0) }), void 0) }, void 0));
|
|
7513
7525
|
};
|
|
7514
|
-
var templateObject_1$
|
|
7526
|
+
var templateObject_1$l, templateObject_2$e;
|
|
7515
7527
|
|
|
7516
|
-
var SuccessContainer = newStyled.div(templateObject_1$
|
|
7517
|
-
var SuccessMessage = newStyled.div(templateObject_2$
|
|
7528
|
+
var SuccessContainer = newStyled.div(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n height: 3rem;\n display: flex;\n"], ["\n height: 3rem;\n display: flex;\n"])));
|
|
7529
|
+
var SuccessMessage = newStyled.div(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n background-color: #dfefe0;\n border: 0.063rem solid #5ead63;\n border-radius: 0.5rem;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 1rem;\n box-sizing: border-box;\n"], ["\n background-color: #dfefe0;\n border: 0.063rem solid #5ead63;\n border-radius: 0.5rem;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 1rem;\n box-sizing: border-box;\n"])));
|
|
7518
7530
|
var SuccessText = newStyled.span(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n margin: 0;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 600;\n margin-left: 0.313rem;\n"], ["\n margin: 0;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 600;\n margin-left: 0.313rem;\n"])));
|
|
7519
7531
|
var Success = function (_a) {
|
|
7520
7532
|
var children = _a.children, successText = _a.successText;
|
|
7521
7533
|
return (jsxRuntime.jsxs(SuccessContainer, { children: [jsxRuntime.jsxs(SuccessMessage, { children: [jsxRuntime.jsx(Icon.Actions.Check, { fill: "#5EAD63", width: 1.375, height: 1.063 }, void 0), jsxRuntime.jsx(SuccessText, { children: successText }, void 0)] }, void 0), children] }, void 0));
|
|
7522
7534
|
};
|
|
7523
|
-
var templateObject_1$
|
|
7535
|
+
var templateObject_1$k, templateObject_2$d, templateObject_3$9;
|
|
7524
7536
|
|
|
7525
|
-
var ButtonContainer = newStyled.div(templateObject_1$
|
|
7537
|
+
var ButtonContainer = newStyled.div(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n margin-left: 0.625rem;\n height: 100%;\n\n button {\n width: 100%;\n height: 100%;\n border-radius: 0.5rem;\n background-color: ", ";\n }\n"], ["\n margin-left: 0.625rem;\n height: 100%;\n\n button {\n width: 100%;\n height: 100%;\n border-radius: 0.5rem;\n background-color: ", ";\n }\n"])), function (_a) {
|
|
7526
7538
|
var status = _a.status, type = _a.type;
|
|
7527
7539
|
return status === exports.InputValidationType.Empty && type === 'primary' ? '#808080' : '';
|
|
7528
7540
|
});
|
|
@@ -7533,21 +7545,21 @@ var BasePlusButton = function (_a) {
|
|
|
7533
7545
|
var Input = (jsxRuntime.jsx(BaseInput, __assign({}, rest, { onValidation: setStatus }, { children: jsxRuntime.jsx(ButtonContainer, __assign({ status: status, type: "primary" }, { children: jsxRuntime.jsx(ButtonSecondary, { text: text, onClick: onClick, disabled: rest.disabled || status === exports.InputValidationType.Error }, void 0) }), void 0) }), void 0));
|
|
7534
7546
|
return success ? SuccessComponent : Input;
|
|
7535
7547
|
};
|
|
7536
|
-
var templateObject_1$
|
|
7548
|
+
var templateObject_1$j;
|
|
7537
7549
|
|
|
7538
|
-
var Container$
|
|
7539
|
-
var IconContainer$2 = newStyled.div(templateObject_2$
|
|
7550
|
+
var Container$9 = newStyled.div(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n input {\n padding-right: 2.688rem;\n }\n"], ["\n input {\n padding-right: 2.688rem;\n }\n"])));
|
|
7551
|
+
var IconContainer$2 = newStyled.div(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n position: absolute;\n right: 0.875rem;\n width: 1.125rem;\n height: 100%;\n\n svg path {\n fill: ", ";\n }\n"], ["\n position: absolute;\n right: 0.875rem;\n width: 1.125rem;\n height: 100%;\n\n svg path {\n fill: ", ";\n }\n"])), function (props) { return props.color; });
|
|
7540
7552
|
var BasePlusIcon = function (_a) {
|
|
7541
7553
|
var Icon = _a.Icon, rest = __rest(_a, ["Icon"]);
|
|
7542
7554
|
var theme = useTheme();
|
|
7543
7555
|
var _b = React.useState(exports.InputValidationType.Empty), status = _b[0], setStatus = _b[1];
|
|
7544
|
-
return (jsxRuntime.jsx(Container$
|
|
7556
|
+
return (jsxRuntime.jsx(Container$9, { children: jsxRuntime.jsx(BaseInput, __assign({}, rest, { onValidation: setStatus }, { children: jsxRuntime.jsx(IconContainer$2, __assign({ color: status === exports.InputValidationType.Valid
|
|
7545
7557
|
? theme.shades.gray700
|
|
7546
7558
|
: status === exports.InputValidationType.Error
|
|
7547
7559
|
? theme.semantic.alert
|
|
7548
7560
|
: '' }, { children: React.createElement(Icon, { fill: theme.shades.gray250 }) }), void 0) }), void 0) }, void 0));
|
|
7549
7561
|
};
|
|
7550
|
-
var templateObject_1$
|
|
7562
|
+
var templateObject_1$i, templateObject_2$c;
|
|
7551
7563
|
|
|
7552
7564
|
var Input = {
|
|
7553
7565
|
Simple: BaseInput,
|
|
@@ -7561,7 +7573,7 @@ var index$3 = /*#__PURE__*/Object.freeze({
|
|
|
7561
7573
|
Input: Input
|
|
7562
7574
|
});
|
|
7563
7575
|
|
|
7564
|
-
var Container$
|
|
7576
|
+
var Container$8 = newStyled.div(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n border: 0.063rem solid ", ";\n border-radius: 0.25rem;\n padding: 0.375rem;\n cursor: ", ";\n"], ["\n width: ", ";\n height: ", ";\n border: 0.063rem solid ", ";\n border-radius: 0.25rem;\n padding: 0.375rem;\n cursor: ", ";\n"])), function (_a) {
|
|
7565
7577
|
var width = _a.width;
|
|
7566
7578
|
return width;
|
|
7567
7579
|
}, function (_a) {
|
|
@@ -7577,11 +7589,11 @@ var Container$6 = newStyled.div(templateObject_1$f || (templateObject_1$f = __ma
|
|
|
7577
7589
|
var PaymentMethod = function (_a) {
|
|
7578
7590
|
var Icon = _a.Icon, width = _a.width, height = _a.height, onClick = _a.onClick;
|
|
7579
7591
|
var theme = useTheme();
|
|
7580
|
-
return (jsxRuntime.jsx(Container$
|
|
7592
|
+
return (jsxRuntime.jsx(Container$8, __assign({ width: width, height: height, borderColor: theme.shades.gray100, isClickable: Boolean(onClick), onClick: onClick, "data-testid": "payment-method-container" }, { children: React.createElement(Icon) }), void 0));
|
|
7581
7593
|
};
|
|
7582
|
-
var templateObject_1$
|
|
7594
|
+
var templateObject_1$h;
|
|
7583
7595
|
|
|
7584
|
-
var Text$1 = newStyled.h3(templateObject_1$
|
|
7596
|
+
var Text$1 = newStyled.h3(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n background-color: ", ";\n margin: 0;\n padding: 0.25rem 0.5rem;\n font-size: 0.625rem;\n font-weight: 700;\n line-height: 0.875rem;\n border-radius: 0.125rem;\n display: initial;\n color: ", ";\n"], ["\n background-color: ", ";\n margin: 0;\n padding: 0.25rem 0.5rem;\n font-size: 0.625rem;\n font-weight: 700;\n line-height: 0.875rem;\n border-radius: 0.125rem;\n display: initial;\n color: ", ";\n"])), function (_a) {
|
|
7585
7597
|
var backgroundColor = _a.backgroundColor;
|
|
7586
7598
|
return backgroundColor;
|
|
7587
7599
|
}, function (_a) {
|
|
@@ -7593,25 +7605,25 @@ var OfferBanner = function (_a) {
|
|
|
7593
7605
|
var theme = useTheme();
|
|
7594
7606
|
return (jsxRuntime.jsx(Text$1, __assign({ backgroundColor: backgroundColor, color: theme.shades.gray700, "data-testid": "OfferBanner" }, { children: discountAppliedText }), void 0));
|
|
7595
7607
|
};
|
|
7596
|
-
var templateObject_1$
|
|
7608
|
+
var templateObject_1$g;
|
|
7597
7609
|
|
|
7598
|
-
var Wrapper$2 = newStyled.div(templateObject_1$
|
|
7599
|
-
var GrandTotal = newStyled.h1(templateObject_2$
|
|
7610
|
+
var Wrapper$2 = newStyled.div(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"])));
|
|
7611
|
+
var GrandTotal = newStyled.h1(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ", ";\n display: flex;\n align-items: center;\n"], ["\n margin: 0;\n font-size: 1.5rem;\n line-height: 2rem;\n font-weight: 700;\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) { return props.color; });
|
|
7600
7612
|
var Currency = newStyled.span(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n margin: 0;\n margin-right: 0.625rem;\n font-size: 0.875rem;\n line-height: 1.375rem;\n font-weight: 600;\n"], ["\n margin: 0;\n margin-right: 0.625rem;\n font-size: 0.875rem;\n line-height: 1.375rem;\n font-weight: 600;\n"])));
|
|
7601
|
-
var Container$
|
|
7613
|
+
var Container$7 = newStyled.div(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ", ";\n"], ["\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 0.625rem;\n color: ", ";\n"])), function (props) { return props.highlightColor; });
|
|
7602
7614
|
var Discount = newStyled.h3(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n margin: 0;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 600;\n"], ["\n margin: 0;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 600;\n"])));
|
|
7603
7615
|
var Total = function (_a) {
|
|
7604
7616
|
var total = _a.total, currency = _a.currency, saving = _a.saving, _b = _a.highlightColor, highlightColor = _b === void 0 ? '#2f806a' : _b;
|
|
7605
7617
|
var theme = useTheme();
|
|
7606
|
-
return (jsxRuntime.jsxs(Wrapper$2, __assign({ "data-testid": "total-wrapper" }, { children: [jsxRuntime.jsxs(GrandTotal, __assign({ color: theme.shades.gray550 }, { children: [jsxRuntime.jsx(Currency, { children: currency }, void 0), total] }), void 0), saving && (jsxRuntime.jsxs(Container$
|
|
7618
|
+
return (jsxRuntime.jsxs(Wrapper$2, __assign({ "data-testid": "total-wrapper" }, { children: [jsxRuntime.jsxs(GrandTotal, __assign({ color: theme.shades.gray550 }, { children: [jsxRuntime.jsx(Currency, { children: currency }, void 0), total] }), void 0), saving && (jsxRuntime.jsxs(Container$7, __assign({ "data-testid": "subtotal-container", highlightColor: highlightColor }, { children: [jsxRuntime.jsx(Discount, { children: saving.savingText }, void 0), jsxRuntime.jsx(Discount, { children: saving.amount }, void 0)] }), void 0))] }), void 0));
|
|
7607
7619
|
};
|
|
7608
|
-
var templateObject_1$
|
|
7620
|
+
var templateObject_1$f, templateObject_2$b, templateObject_3$8, templateObject_4$7, templateObject_5$4;
|
|
7609
7621
|
|
|
7610
|
-
var Wrapper$1 = newStyled.div(templateObject_1$
|
|
7622
|
+
var Wrapper$1 = newStyled.div(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
7611
7623
|
var color = _a.color;
|
|
7612
7624
|
return color;
|
|
7613
7625
|
});
|
|
7614
|
-
var ItemContainer = newStyled.div(templateObject_2$
|
|
7626
|
+
var ItemContainer = newStyled.div(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.625rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n"], ["\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.625rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n"])));
|
|
7615
7627
|
var Item$1 = newStyled.h4(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject(["\n margin: 0;\n font-size: 0.875rem;\n line-height: 1.375rem;\n font-weight: 600;\n"], ["\n margin: 0;\n font-size: 0.875rem;\n line-height: 1.375rem;\n font-weight: 600;\n"])));
|
|
7616
7628
|
var CouponItem = newStyled(Item$1)(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
7617
7629
|
var color = _a.color;
|
|
@@ -7625,22 +7637,22 @@ var Subtotal = function (_a) {
|
|
|
7625
7637
|
return (jsxRuntime.jsxs(ItemContainer, { children: [jsxRuntime.jsxs(CouponItem, __assign({ color: highlightColor }, { children: [coupon.couponText, " ", c.code, " ", coupon.appliedText] }), void 0), jsxRuntime.jsx(CouponItem, __assign({ color: highlightColor }, { children: c.amount }), void 0)] }, i));
|
|
7626
7638
|
})] }), void 0));
|
|
7627
7639
|
};
|
|
7628
|
-
var templateObject_1$
|
|
7640
|
+
var templateObject_1$e, templateObject_2$a, templateObject_3$7, templateObject_4$6;
|
|
7629
7641
|
|
|
7630
7642
|
var Totals = {
|
|
7631
7643
|
Total: Total,
|
|
7632
7644
|
Subtotal: Subtotal,
|
|
7633
7645
|
};
|
|
7634
7646
|
|
|
7635
|
-
var Container$
|
|
7636
|
-
var IconContainer$1 = newStyled.div(templateObject_2$
|
|
7647
|
+
var Container$6 = newStyled.div(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n padding: 0.625rem 1.25rem;\n background-color: ", ";\n border-radius: 0.313rem;\n display: flex;\n margin-bottom: 0.938rem;\n"], ["\n padding: 0.625rem 1.25rem;\n background-color: ", ";\n border-radius: 0.313rem;\n display: flex;\n margin-bottom: 0.938rem;\n"])), function (props) { return props.color; });
|
|
7648
|
+
var IconContainer$1 = newStyled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n width: 1rem;\n height: 0.875rem;\n margin-right: 0.5rem;\n margin-top: 0.125rem;\n"], ["\n width: 1rem;\n height: 0.875rem;\n margin-right: 0.5rem;\n margin-top: 0.125rem;\n"])));
|
|
7637
7649
|
var Text = newStyled.p(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n font-size: 0.875rem;\n line-height: 1.375rem;\n font-weight: 400;\n margin: 0;\n color: ", ";\n"], ["\n font-size: 0.875rem;\n line-height: 1.375rem;\n font-weight: 400;\n margin: 0;\n color: ", ";\n"])), function (props) { return props.color; });
|
|
7638
7650
|
var Details = newStyled.span(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n color: ", ";\n font-weight: 700;\n"], ["\n color: ", ";\n font-weight: 700;\n"])), function (props) { return props.color; });
|
|
7639
7651
|
var Note = function (_a) {
|
|
7640
7652
|
var accentColor = _a.accentColor, color = _a.color, backgroundColor = _a.backgroundColor, importantNoteText = _a.importantNoteText, text = _a.text;
|
|
7641
|
-
return (jsxRuntime.jsxs(Container$
|
|
7653
|
+
return (jsxRuntime.jsxs(Container$6, __assign({ color: backgroundColor, "data-testid": "Container" }, { children: [jsxRuntime.jsx(IconContainer$1, { children: jsxRuntime.jsx(Icon.Actions.LightExclamation, { fill: accentColor }, void 0) }, void 0), jsxRuntime.jsx("div", { children: jsxRuntime.jsxs(Text, __assign({ color: color }, { children: [jsxRuntime.jsxs(Details, __assign({ color: accentColor }, { children: [importantNoteText, ":"] }), void 0), " ", text] }), void 0) }, void 0)] }), void 0));
|
|
7642
7654
|
};
|
|
7643
|
-
var templateObject_1$
|
|
7655
|
+
var templateObject_1$d, templateObject_2$9, templateObject_3$6, templateObject_4$5;
|
|
7644
7656
|
|
|
7645
7657
|
var Breakpoints = {
|
|
7646
7658
|
desktop: 1200,
|
|
@@ -7670,8 +7682,8 @@ var useWindowDimensions = function () {
|
|
|
7670
7682
|
};
|
|
7671
7683
|
};
|
|
7672
7684
|
|
|
7673
|
-
var Title$1 = newStyled.h1(templateObject_1$
|
|
7674
|
-
var Line = newStyled.div(templateObject_2$
|
|
7685
|
+
var Title$1 = newStyled.h1(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n color: ", ";\n font-size: 1.25rem;\n line-height: 1.75rem;\n font-weight: 600;\n margin: 0;\n text-align: center;\n"], ["\n color: ", ";\n font-size: 1.25rem;\n line-height: 1.75rem;\n font-weight: 600;\n margin: 0;\n text-align: center;\n"])), function (props) { return props.color; });
|
|
7686
|
+
var Line = newStyled.div(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject(["\n width: 100%;\n height: 0.063rem;\n background-color: ", ";\n margin: 0.938rem 0;\n"], ["\n width: 100%;\n height: 0.063rem;\n background-color: ", ";\n margin: 0.938rem 0;\n"])), function (props) { return props.backgroundColor; });
|
|
7675
7687
|
var Row$1 = newStyled.div(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n justify-content: space-between;\n align-items: flex-start;\n"], ["\n display: flex;\n flex-direction: ", ";\n justify-content: space-between;\n align-items: flex-start;\n"])), function (props) { return (props.isMobile ? 'column' : 'row'); });
|
|
7676
7688
|
var Col$1 = newStyled.div(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n flex: 1;\n margin: 0 1.25rem;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n flex: 1;\n margin: 0 1.25rem;\n\n ", "\n"])), function (props) {
|
|
7677
7689
|
return props.isMobile &&
|
|
@@ -7690,28 +7702,28 @@ var DeliveryDetails = function (_a) {
|
|
|
7690
7702
|
var isMobile = useWindowDimensions().isMobile;
|
|
7691
7703
|
return (jsxRuntime.jsxs("div", __assign({ "data-testid": "DeliveryDetails" }, { children: [jsxRuntime.jsx(Title$1, __assign({ color: theme.palette.secondary.default }, { children: deliveryDetailsText }), void 0), jsxRuntime.jsx(Line, { backgroundColor: theme.shades.gray100 }, void 0), note && jsxRuntime.jsx(Note, __assign({}, note), void 0), jsxRuntime.jsxs(Row$1, __assign({ isMobile: isMobile, "data-testid": "DD-row" }, { children: [jsxRuntime.jsxs(Col$1, __assign({ isMobile: isMobile }, { children: [jsxRuntime.jsxs(SectionTitle, __assign({ color: theme.shades.gray700, isMobile: isMobile }, { children: [jsxRuntime.jsx(IconContainer, __assign({ isMobile: isMobile }, { children: jsxRuntime.jsx(Icon.PDP.Clock, {}, void 0) }), void 0), arrivingBy.title] }), void 0), jsxRuntime.jsx(SectionDetails, __assign({ color: theme.shades.gray700 }, { children: arrivingBy.details }), void 0)] }), void 0), jsxRuntime.jsxs(Col$1, __assign({ isMobile: isMobile }, { children: [jsxRuntime.jsxs(SectionTitle, __assign({ color: theme.shades.gray700, isMobile: isMobile }, { children: [jsxRuntime.jsx(IconContainer, __assign({ isMobile: isMobile }, { children: jsxRuntime.jsx(Icon.Navigation.MapMarker, {}, void 0) }), void 0), shippingTo.title] }), void 0), jsxRuntime.jsx(SectionDetails, __assign({ color: theme.shades.gray700 }, { children: shippingTo.details }), void 0)] }), void 0), jsxRuntime.jsxs(Col$1, __assign({ isMobile: isMobile }, { children: [jsxRuntime.jsxs(SectionTitle, __assign({ color: theme.shades.gray700, isMobile: isMobile }, { children: [jsxRuntime.jsx(IconContainer, __assign({ isMobile: isMobile }, { children: jsxRuntime.jsx(Icon.Messaging.Messenger, {}, void 0) }), void 0), instantOrderUpdate.title] }), void 0), jsxRuntime.jsx(SectionDetails, __assign({ color: theme.shades.gray700 }, { children: instantOrderUpdate.details }), void 0), jsxRuntime.jsxs(KeepMeUpdated, __assign({ onClick: instantOrderUpdate.keepMeUpdated.onClick, borderColor: theme.shades.gray150 }, { children: [jsxRuntime.jsx(Icon.Messaging.Messenger, { width: 1, height: 1, fill: "#0078FF" }, void 0), instantOrderUpdate.keepMeUpdated.title] }), void 0)] }), void 0)] }), void 0)] }), void 0));
|
|
7692
7704
|
};
|
|
7693
|
-
var templateObject_1$
|
|
7705
|
+
var templateObject_1$c, templateObject_2$8, templateObject_3$5, templateObject_4$4, templateObject_5$3, templateObject_6$3, templateObject_7$1, templateObject_8;
|
|
7694
7706
|
|
|
7695
|
-
var Container$
|
|
7696
|
-
var H1$
|
|
7707
|
+
var Container$5 = newStyled.div(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n user-select: none;\n"], ["\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n user-select: none;\n"])));
|
|
7708
|
+
var H1$2 = newStyled.h1(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n margin: 0;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 700;\n color: ", ";\n margin-right: 0.313rem;\n"], ["\n margin: 0;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 700;\n color: ", ";\n margin-right: 0.313rem;\n"])), function (props) { return props.color; });
|
|
7697
7709
|
var ScrollToTop = function (_a) {
|
|
7698
7710
|
var scrollToTopText = _a.scrollToTopText, onClick = _a.onClick;
|
|
7699
7711
|
var theme = useTheme();
|
|
7700
|
-
return (jsxRuntime.jsxs(Container$
|
|
7712
|
+
return (jsxRuntime.jsxs(Container$5, __assign({ onClick: onClick, "data-testid": "Container" }, { children: [jsxRuntime.jsx(H1$2, __assign({ color: theme.shades.gray700 }, { children: scrollToTopText }), void 0), jsxRuntime.jsx(Icon.Arrows.ChevronUpSolid, { width: 1.375, height: 1.375, fill: theme.palette.primary.default }, void 0)] }), void 0));
|
|
7701
7713
|
};
|
|
7702
|
-
var templateObject_1$
|
|
7714
|
+
var templateObject_1$b, templateObject_2$7;
|
|
7703
7715
|
|
|
7704
|
-
var Container$
|
|
7705
|
-
var H1 = newStyled.h1(templateObject_2$
|
|
7716
|
+
var Container$4 = newStyled.div(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #dfefeb;\n padding: 0.75rem 0;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #dfefeb;\n padding: 0.75rem 0;\n"])));
|
|
7717
|
+
var H1$1 = newStyled.h1(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n margin: 0;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 600;\n color: ", ";\n margin-left: 0.625rem;\n"], ["\n margin: 0;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 600;\n color: ", ";\n margin-left: 0.625rem;\n"])), function (props) { return props.color; });
|
|
7706
7718
|
var OrderBar = function (_a) {
|
|
7707
7719
|
var message = _a.message;
|
|
7708
7720
|
var theme = useTheme();
|
|
7709
|
-
return (jsxRuntime.jsxs(Container$
|
|
7721
|
+
return (jsxRuntime.jsxs(Container$4, { children: [jsxRuntime.jsx(Icon.Actions.Check, { width: 1.25, height: 0.875, fill: "#2F806A" }, void 0), jsxRuntime.jsx(H1$1, __assign({ color: theme.shades.gray700 }, { children: message }), void 0)] }, void 0));
|
|
7710
7722
|
};
|
|
7711
|
-
var templateObject_1$
|
|
7723
|
+
var templateObject_1$a, templateObject_2$6;
|
|
7712
7724
|
|
|
7713
|
-
var TableElement = newStyled.table(templateObject_1$
|
|
7714
|
-
var TableCell = newStyled.td(templateObject_2$
|
|
7725
|
+
var TableElement = newStyled.table(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n box-sizing: border-box;\n border-radius: 0.5rem;\n border: 0.063rem solid ", ";\n border-spacing: 0;\n font-size: 0.875rem;\n line-height: 3.125rem;\n width: 100%;\n color: ", ";\n"], ["\n box-sizing: border-box;\n border-radius: 0.5rem;\n border: 0.063rem solid ", ";\n border-spacing: 0;\n font-size: 0.875rem;\n line-height: 3.125rem;\n width: 100%;\n color: ", ";\n"])), function (props) { return props.borderColor; }, function (props) { return props.color; });
|
|
7726
|
+
var TableCell = newStyled.td(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n border-bottom: 0.063rem solid ", ";\n border-right: 0.063rem solid ", ";\n padding: 0 1.25rem;\n text-align: center;\n\n &:last-child {\n border-right: none;\n }\n\n &:first-of-type {\n font-weight: 700;\n }\n"], ["\n border-bottom: 0.063rem solid ", ";\n border-right: 0.063rem solid ", ";\n padding: 0 1.25rem;\n text-align: center;\n\n &:last-child {\n border-right: none;\n }\n\n &:first-of-type {\n font-weight: 700;\n }\n"])), function (props) { return props.borderColor; }, function (props) { return props.borderColor; });
|
|
7715
7727
|
var TableHead = newStyled.th(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n border-bottom: 0.063rem solid ", ";\n border-right: 0.063rem solid ", ";\n font-weight: 700;\n\n &:last-child {\n border-right: none;\n }\n"], ["\n border-bottom: 0.063rem solid ", ";\n border-right: 0.063rem solid ", ";\n font-weight: 700;\n\n &:last-child {\n border-right: none;\n }\n"])), function (props) { return props.borderColor; }, function (props) { return props.borderColor; });
|
|
7716
7728
|
var TableRow = newStyled.tr(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n &:last-child {\n td {\n border-bottom: none;\n }\n }\n\n &.background {\n background-color: ", ";\n }\n"], ["\n &:last-child {\n td {\n border-bottom: none;\n }\n }\n\n &.background {\n background-color: ", ";\n }\n"])), function (props) { return props.backgroundColor; });
|
|
7717
7729
|
var SizeTable = function (_a) {
|
|
@@ -7719,7 +7731,7 @@ var SizeTable = function (_a) {
|
|
|
7719
7731
|
var theme = useTheme();
|
|
7720
7732
|
return (jsxRuntime.jsxs(TableElement, __assign({ color: theme.shades.gray700, borderColor: theme.shades.gray100 }, { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsx(TableRow, __assign({ backgroundColor: theme.shades.gray010 }, { children: headers.map(function (header, index) { return (jsxRuntime.jsx(TableHead, __assign({ borderColor: theme.shades.gray100 }, { children: header }), index)); }) }), void 0) }, void 0), jsxRuntime.jsx("tbody", { children: data.map(function (row, index) { return (jsxRuntime.jsx(TableRow, __assign({ className: index % 2 !== 0 ? '' : 'background', backgroundColor: theme.shades.gray010 }, { children: row.map(function (cell, index) { return (jsxRuntime.jsx(TableCell, __assign({ borderColor: theme.shades.gray100 }, { children: cell }), index)); }) }), index)); }) }, void 0)] }), void 0));
|
|
7721
7733
|
};
|
|
7722
|
-
var templateObject_1$
|
|
7734
|
+
var templateObject_1$9, templateObject_2$5, templateObject_3$4, templateObject_4$3;
|
|
7723
7735
|
|
|
7724
7736
|
/* eslint-disable no-param-reassign */
|
|
7725
7737
|
var index$2 = function (breakpoints) {
|
|
@@ -7807,15 +7819,15 @@ var breakpoints = {
|
|
|
7807
7819
|
};
|
|
7808
7820
|
var mediaQueries = index$2(Object.values(breakpoints).map(function (bp) { return "@media (min-width: " + bp + "px)"; }));
|
|
7809
7821
|
|
|
7810
|
-
var Img = newStyled.img(templateObject_1$
|
|
7822
|
+
var Img = newStyled.img(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n height: ", ";\n width: ", ";\n border-radius: ", ";\n object-fit: ", ";\n object-position: ", ";\n"], ["\n height: ", ";\n width: ", ";\n border-radius: ", ";\n object-fit: ", ";\n object-position: ", ";\n"])), function (props) { return props.height; }, function (props) { return props.width; }, function (props) { return props.borderRadius; }, function (props) { return props.objectFit; }, function (props) { return props.objectPosition; });
|
|
7811
7823
|
var Image = function (_a) {
|
|
7812
7824
|
var src = _a.src, alt = _a.alt, height = _a.height, width = _a.width, borderRadius = _a.borderRadius, objectFit = _a.objectFit, objectPosition = _a.objectPosition;
|
|
7813
7825
|
return (jsxRuntime.jsx(Img, { src: src, alt: alt, height: height, width: width, borderRadius: borderRadius, objectFit: objectFit, objectPosition: objectPosition }, void 0));
|
|
7814
7826
|
};
|
|
7815
|
-
var templateObject_1$
|
|
7827
|
+
var templateObject_1$8;
|
|
7816
7828
|
|
|
7817
|
-
var Container$
|
|
7818
|
-
var DescriptionContainer = newStyled.div(templateObject_2$
|
|
7829
|
+
var Container$3 = newStyled.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n width: auto;\n"], ["\n display: flex;\n flex-direction: row;\n width: auto;\n"])));
|
|
7830
|
+
var DescriptionContainer = newStyled.div(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n ", ";\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n ", ";\n width: 100%;\n"])), mediaQueries({
|
|
7819
7831
|
marginLeft: ['0.938rem', '1.875rem'],
|
|
7820
7832
|
}));
|
|
7821
7833
|
var Title = newStyled.h2(function (_a) {
|
|
@@ -7849,9 +7861,9 @@ var PriceContainer = newStyled.div(templateObject_3$3 || (templateObject_3$3 = _
|
|
|
7849
7861
|
var SimpleOrderItem = function (_a) {
|
|
7850
7862
|
var title = _a.title, subtitle = _a.subtitle, image = _a.image, price = _a.price, tag = _a.tag;
|
|
7851
7863
|
var theme = useTheme();
|
|
7852
|
-
return (jsxRuntime.jsxs(Container$
|
|
7864
|
+
return (jsxRuntime.jsxs(Container$3, { children: [jsxRuntime.jsx(Image, { src: image.src, alt: image.alt, width: "4.063rem", height: "5.375rem", objectFit: "cover", objectPosition: "center" }, void 0), jsxRuntime.jsxs(DescriptionContainer, __assign({ "data-testid": "order-item-description-container" }, { children: [jsxRuntime.jsx(Title, __assign({ color: theme.shades.gray700 }, { children: title }), void 0), jsxRuntime.jsx(Subtitle, __assign({ color: theme.shades.gray700 }, { children: subtitle }), void 0), jsxRuntime.jsxs(PriceContainer, __assign({ "data-testid": "order-item-price-container", withTag: !!tag }, { children: [tag && (jsxRuntime.jsx(OfferBanner, { discountAppliedText: tag === null || tag === void 0 ? void 0 : tag.text, backgroundColor: tag === null || tag === void 0 ? void 0 : tag.backgroundColor }, void 0)), jsxRuntime.jsx(PriceLabel, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, color: price.color || theme.shades.gray700, size: exports.ComponentSize.Small }, void 0)] }), void 0)] }), void 0)] }, void 0));
|
|
7853
7865
|
};
|
|
7854
|
-
var templateObject_1$
|
|
7866
|
+
var templateObject_1$7, templateObject_2$4, templateObject_3$3;
|
|
7855
7867
|
|
|
7856
7868
|
function formatDate(date) {
|
|
7857
7869
|
var day = date.getDate();
|
|
@@ -7860,8 +7872,8 @@ function formatDate(date) {
|
|
|
7860
7872
|
return month < 10 ? day + "/0" + month + "/" + year : day + "/" + month + "/" + year;
|
|
7861
7873
|
}
|
|
7862
7874
|
|
|
7863
|
-
var Container = newStyled.div(templateObject_1$
|
|
7864
|
-
var Heading = newStyled.div(templateObject_2$
|
|
7875
|
+
var Container$2 = newStyled.div(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"], ["\n display: flex;\n flex-direction: column;\n width: auto;\n color: #292929;\n"])));
|
|
7876
|
+
var Heading = newStyled.div(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n ", ";\n text-align: right;\n margin-bottom: 10px;\n"], ["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n ", ";\n text-align: right;\n margin-bottom: 10px;\n"])), mediaQueries({
|
|
7865
7877
|
fontSize: ['14px', '16px'],
|
|
7866
7878
|
lineHeight: ['22px', '24px'],
|
|
7867
7879
|
}));
|
|
@@ -7884,9 +7896,9 @@ var H3$1 = newStyled.h3(templateObject_6$2 || (templateObject_6$2 = __makeTempla
|
|
|
7884
7896
|
var P = newStyled.p(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n"], ["\n font-weight: normal;\n font-size: 16px;\n line-height: 24px;\n margin: 0;\n"])));
|
|
7885
7897
|
var Review = function (_a) {
|
|
7886
7898
|
var reviewerName = _a.reviewerName, date = _a.date, rating = _a.rating, stars = _a.stars, title = _a.title, description = _a.description, image = _a.image;
|
|
7887
|
-
return (jsxRuntime.jsxs(Container, { children: [jsxRuntime.jsxs(Heading, { children: [jsxRuntime.jsx(H2, { children: reviewerName }, void 0), formatDate(date)] }, void 0), jsxRuntime.jsx(StarList, { starsNumber: 5, rating: rating, fill: stars.color, size: stars.size }, void 0), jsxRuntime.jsxs(Content, __assign({ "data-testid": "review-content" }, { children: [jsxRuntime.jsxs(ReviewContainer, { children: [jsxRuntime.jsx(H3$1, { children: title }, void 0), jsxRuntime.jsx(P, { children: description }, void 0)] }, void 0), jsxRuntime.jsx(Image, { src: image.src, alt: image.alt, width: "7.5rem", height: "10rem" }, void 0)] }), void 0)] }, void 0));
|
|
7899
|
+
return (jsxRuntime.jsxs(Container$2, { children: [jsxRuntime.jsxs(Heading, { children: [jsxRuntime.jsx(H2, { children: reviewerName }, void 0), formatDate(date)] }, void 0), jsxRuntime.jsx(StarList, { starsNumber: 5, rating: rating, fill: stars.color, size: stars.size }, void 0), jsxRuntime.jsxs(Content, __assign({ "data-testid": "review-content" }, { children: [jsxRuntime.jsxs(ReviewContainer, { children: [jsxRuntime.jsx(H3$1, { children: title }, void 0), jsxRuntime.jsx(P, { children: description }, void 0)] }, void 0), jsxRuntime.jsx(Image, { src: image.src, alt: image.alt, width: "7.5rem", height: "10rem" }, void 0)] }), void 0)] }, void 0));
|
|
7888
7900
|
};
|
|
7889
|
-
var templateObject_1$
|
|
7901
|
+
var templateObject_1$6, templateObject_2$3, templateObject_3$2, templateObject_4$2, templateObject_5$2, templateObject_6$2, templateObject_7;
|
|
7890
7902
|
|
|
7891
7903
|
var Button = newStyled.button(function () { return ({
|
|
7892
7904
|
background: 'transparent',
|
|
@@ -7903,20 +7915,208 @@ var ArrowButton = function (_a) {
|
|
|
7903
7915
|
return (jsxRuntime.jsx(Button, __assign({ className: className, type: "button", onClick: onClick, "data-testid": "arrow-button-" + direction }, { children: direction === 'left' ? (jsxRuntime.jsx(Icon.Arrows.ChevronLeft, { width: width, height: height, opacity: 0.5 }, void 0)) : (jsxRuntime.jsx(Icon.Arrows.ChevronRight, { width: width, height: height, opacity: 0.5 }, void 0)) }), void 0));
|
|
7904
7916
|
};
|
|
7905
7917
|
|
|
7906
|
-
|
|
7918
|
+
function _defineProperty(obj, key, value) {
|
|
7919
|
+
if (key in obj) {
|
|
7920
|
+
Object.defineProperty(obj, key, {
|
|
7921
|
+
value: value,
|
|
7922
|
+
enumerable: true,
|
|
7923
|
+
configurable: true,
|
|
7924
|
+
writable: true
|
|
7925
|
+
});
|
|
7926
|
+
} else {
|
|
7927
|
+
obj[key] = value;
|
|
7928
|
+
}
|
|
7929
|
+
|
|
7930
|
+
return obj;
|
|
7931
|
+
}
|
|
7907
7932
|
|
|
7908
|
-
|
|
7933
|
+
function ownKeys(object, enumerableOnly) {
|
|
7934
|
+
var keys = Object.keys(object);
|
|
7909
7935
|
|
|
7910
|
-
|
|
7936
|
+
if (Object.getOwnPropertySymbols) {
|
|
7937
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
7911
7938
|
|
|
7912
|
-
|
|
7939
|
+
if (enumerableOnly) {
|
|
7940
|
+
symbols = symbols.filter(function (sym) {
|
|
7941
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
7942
|
+
});
|
|
7943
|
+
}
|
|
7913
7944
|
|
|
7914
|
-
(
|
|
7945
|
+
keys.push.apply(keys, symbols);
|
|
7946
|
+
}
|
|
7947
|
+
|
|
7948
|
+
return keys;
|
|
7949
|
+
}
|
|
7950
|
+
|
|
7951
|
+
function _objectSpread2(target) {
|
|
7952
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7953
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
7954
|
+
|
|
7955
|
+
if (i % 2) {
|
|
7956
|
+
ownKeys(Object(source), true).forEach(function (key) {
|
|
7957
|
+
_defineProperty(target, key, source[key]);
|
|
7958
|
+
});
|
|
7959
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
7960
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
7961
|
+
} else {
|
|
7962
|
+
ownKeys(Object(source)).forEach(function (key) {
|
|
7963
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
7964
|
+
});
|
|
7965
|
+
}
|
|
7966
|
+
}
|
|
7967
|
+
|
|
7968
|
+
return target;
|
|
7969
|
+
}
|
|
7970
|
+
|
|
7971
|
+
function _classCallCheck(instance, Constructor) {
|
|
7972
|
+
if (!(instance instanceof Constructor)) {
|
|
7973
|
+
throw new TypeError("Cannot call a class as a function");
|
|
7974
|
+
}
|
|
7975
|
+
}
|
|
7976
|
+
|
|
7977
|
+
function _defineProperties(target, props) {
|
|
7978
|
+
for (var i = 0; i < props.length; i++) {
|
|
7979
|
+
var descriptor = props[i];
|
|
7980
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
7981
|
+
descriptor.configurable = true;
|
|
7982
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
7983
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
7984
|
+
}
|
|
7985
|
+
}
|
|
7986
|
+
|
|
7987
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
7988
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
7989
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
7990
|
+
return Constructor;
|
|
7991
|
+
}
|
|
7992
|
+
|
|
7993
|
+
function _assertThisInitialized(self) {
|
|
7994
|
+
if (self === void 0) {
|
|
7995
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
7996
|
+
}
|
|
7997
|
+
|
|
7998
|
+
return self;
|
|
7999
|
+
}
|
|
8000
|
+
|
|
8001
|
+
function _setPrototypeOf(o, p) {
|
|
8002
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
8003
|
+
o.__proto__ = p;
|
|
8004
|
+
return o;
|
|
8005
|
+
};
|
|
8006
|
+
|
|
8007
|
+
return _setPrototypeOf(o, p);
|
|
8008
|
+
}
|
|
8009
|
+
|
|
8010
|
+
function _inherits(subClass, superClass) {
|
|
8011
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
8012
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
8013
|
+
}
|
|
8014
|
+
|
|
8015
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
8016
|
+
constructor: {
|
|
8017
|
+
value: subClass,
|
|
8018
|
+
writable: true,
|
|
8019
|
+
configurable: true
|
|
8020
|
+
}
|
|
8021
|
+
});
|
|
8022
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
8023
|
+
}
|
|
8024
|
+
|
|
8025
|
+
function _getPrototypeOf(o) {
|
|
8026
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
8027
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
8028
|
+
};
|
|
8029
|
+
return _getPrototypeOf(o);
|
|
8030
|
+
}
|
|
8031
|
+
|
|
8032
|
+
function _isNativeReflectConstruct() {
|
|
8033
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
8034
|
+
if (Reflect.construct.sham) return false;
|
|
8035
|
+
if (typeof Proxy === "function") return true;
|
|
8036
|
+
|
|
8037
|
+
try {
|
|
8038
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
8039
|
+
return true;
|
|
8040
|
+
} catch (e) {
|
|
8041
|
+
return false;
|
|
8042
|
+
}
|
|
8043
|
+
}
|
|
8044
|
+
|
|
8045
|
+
function _typeof(obj) {
|
|
8046
|
+
"@babel/helpers - typeof";
|
|
8047
|
+
|
|
8048
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
8049
|
+
_typeof = function _typeof(obj) {
|
|
8050
|
+
return typeof obj;
|
|
8051
|
+
};
|
|
8052
|
+
} else {
|
|
8053
|
+
_typeof = function _typeof(obj) {
|
|
8054
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
8055
|
+
};
|
|
8056
|
+
}
|
|
8057
|
+
|
|
8058
|
+
return _typeof(obj);
|
|
8059
|
+
}
|
|
8060
|
+
|
|
8061
|
+
function _possibleConstructorReturn(self, call) {
|
|
8062
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
8063
|
+
return call;
|
|
8064
|
+
}
|
|
8065
|
+
|
|
8066
|
+
return _assertThisInitialized(self);
|
|
8067
|
+
}
|
|
8068
|
+
|
|
8069
|
+
function _createSuper(Derived) {
|
|
8070
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
8071
|
+
return function _createSuperInternal() {
|
|
8072
|
+
var Super = _getPrototypeOf(Derived),
|
|
8073
|
+
result;
|
|
8074
|
+
|
|
8075
|
+
if (hasNativeReflectConstruct) {
|
|
8076
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
8077
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
8078
|
+
} else {
|
|
8079
|
+
result = Super.apply(this, arguments);
|
|
8080
|
+
}
|
|
8081
|
+
|
|
8082
|
+
return _possibleConstructorReturn(this, result);
|
|
8083
|
+
};
|
|
8084
|
+
}
|
|
8085
|
+
|
|
8086
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
8087
|
+
if (source == null) return {};
|
|
8088
|
+
var target = {};
|
|
8089
|
+
var sourceKeys = Object.keys(source);
|
|
8090
|
+
var key, i;
|
|
8091
|
+
|
|
8092
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
8093
|
+
key = sourceKeys[i];
|
|
8094
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
8095
|
+
target[key] = source[key];
|
|
8096
|
+
}
|
|
8097
|
+
|
|
8098
|
+
return target;
|
|
8099
|
+
}
|
|
8100
|
+
|
|
8101
|
+
function _objectWithoutProperties(source, excluded) {
|
|
8102
|
+
if (source == null) return {};
|
|
8103
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
8104
|
+
var key, i;
|
|
8105
|
+
|
|
8106
|
+
if (Object.getOwnPropertySymbols) {
|
|
8107
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
8108
|
+
|
|
8109
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
8110
|
+
key = sourceSymbolKeys[i];
|
|
8111
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
8112
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
8113
|
+
target[key] = source[key];
|
|
8114
|
+
}
|
|
8115
|
+
}
|
|
8116
|
+
|
|
8117
|
+
return target;
|
|
8118
|
+
}
|
|
7915
8119
|
|
|
7916
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7917
|
-
value: true
|
|
7918
|
-
});
|
|
7919
|
-
exports["default"] = void 0;
|
|
7920
8120
|
var initialState = {
|
|
7921
8121
|
animating: false,
|
|
7922
8122
|
autoplaying: null,
|
|
@@ -7948,65 +8148,57 @@ var initialState = {
|
|
|
7948
8148
|
trackWidth: 0,
|
|
7949
8149
|
targetSlide: 0
|
|
7950
8150
|
};
|
|
7951
|
-
var _default = initialState;
|
|
7952
|
-
exports["default"] = _default;
|
|
7953
|
-
}(initialState));
|
|
7954
8151
|
|
|
7955
8152
|
/**
|
|
7956
|
-
*
|
|
7957
|
-
*
|
|
7958
|
-
*
|
|
7959
|
-
*
|
|
7960
|
-
*
|
|
7961
|
-
*
|
|
8153
|
+
* Checks if `value` is the
|
|
8154
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
8155
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
8156
|
+
*
|
|
8157
|
+
* @static
|
|
8158
|
+
* @memberOf _
|
|
8159
|
+
* @since 0.1.0
|
|
8160
|
+
* @category Lang
|
|
8161
|
+
* @param {*} value The value to check.
|
|
8162
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
8163
|
+
* @example
|
|
8164
|
+
*
|
|
8165
|
+
* _.isObject({});
|
|
8166
|
+
* // => true
|
|
8167
|
+
*
|
|
8168
|
+
* _.isObject([1, 2, 3]);
|
|
8169
|
+
* // => true
|
|
8170
|
+
*
|
|
8171
|
+
* _.isObject(_.noop);
|
|
8172
|
+
* // => true
|
|
8173
|
+
*
|
|
8174
|
+
* _.isObject(null);
|
|
8175
|
+
* // => false
|
|
7962
8176
|
*/
|
|
7963
8177
|
|
|
7964
|
-
|
|
7965
|
-
var
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
var NAN = 0 / 0;
|
|
7969
|
-
|
|
7970
|
-
/** `Object#toString` result references. */
|
|
7971
|
-
var symbolTag = '[object Symbol]';
|
|
7972
|
-
|
|
7973
|
-
/** Used to match leading and trailing whitespace. */
|
|
7974
|
-
var reTrim = /^\s+|\s+$/g;
|
|
8178
|
+
function isObject$2(value) {
|
|
8179
|
+
var type = typeof value;
|
|
8180
|
+
return value != null && (type == 'object' || type == 'function');
|
|
8181
|
+
}
|
|
7975
8182
|
|
|
7976
|
-
|
|
7977
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
8183
|
+
var isObject_1 = isObject$2;
|
|
7978
8184
|
|
|
7979
|
-
/**
|
|
7980
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
8185
|
+
/** Detect free variable `global` from Node.js. */
|
|
7981
8186
|
|
|
7982
|
-
|
|
7983
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
8187
|
+
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
7984
8188
|
|
|
7985
|
-
|
|
7986
|
-
var freeParseInt = parseInt;
|
|
8189
|
+
var _freeGlobal = freeGlobal$1;
|
|
7987
8190
|
|
|
7988
|
-
|
|
7989
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
8191
|
+
var freeGlobal = _freeGlobal;
|
|
7990
8192
|
|
|
7991
8193
|
/** Detect free variable `self`. */
|
|
7992
8194
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
7993
8195
|
|
|
7994
8196
|
/** Used as a reference to the global object. */
|
|
7995
|
-
var root = freeGlobal || freeSelf || Function('return this')();
|
|
7996
|
-
|
|
7997
|
-
/** Used for built-in method references. */
|
|
7998
|
-
var objectProto = Object.prototype;
|
|
8197
|
+
var root$2 = freeGlobal || freeSelf || Function('return this')();
|
|
7999
8198
|
|
|
8000
|
-
|
|
8001
|
-
* Used to resolve the
|
|
8002
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
8003
|
-
* of values.
|
|
8004
|
-
*/
|
|
8005
|
-
var objectToString = objectProto.toString;
|
|
8199
|
+
var _root = root$2;
|
|
8006
8200
|
|
|
8007
|
-
|
|
8008
|
-
var nativeMax = Math.max,
|
|
8009
|
-
nativeMin = Math.min;
|
|
8201
|
+
var root$1 = _root;
|
|
8010
8202
|
|
|
8011
8203
|
/**
|
|
8012
8204
|
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
@@ -8024,45 +8216,332 @@ var nativeMax = Math.max,
|
|
|
8024
8216
|
* }, _.now());
|
|
8025
8217
|
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
8026
8218
|
*/
|
|
8027
|
-
var now = function() {
|
|
8028
|
-
return root.Date.now();
|
|
8219
|
+
var now$1 = function() {
|
|
8220
|
+
return root$1.Date.now();
|
|
8029
8221
|
};
|
|
8030
8222
|
|
|
8223
|
+
var now_1 = now$1;
|
|
8224
|
+
|
|
8225
|
+
/** Used to match a single whitespace character. */
|
|
8226
|
+
|
|
8227
|
+
var reWhitespace = /\s/;
|
|
8228
|
+
|
|
8031
8229
|
/**
|
|
8032
|
-
*
|
|
8033
|
-
*
|
|
8034
|
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
8035
|
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
8036
|
-
* Provide `options` to indicate whether `func` should be invoked on the
|
|
8037
|
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
8038
|
-
* with the last arguments provided to the debounced function. Subsequent
|
|
8039
|
-
* calls to the debounced function return the result of the last `func`
|
|
8040
|
-
* invocation.
|
|
8230
|
+
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
8231
|
+
* character of `string`.
|
|
8041
8232
|
*
|
|
8042
|
-
*
|
|
8043
|
-
*
|
|
8044
|
-
*
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8233
|
+
* @private
|
|
8234
|
+
* @param {string} string The string to inspect.
|
|
8235
|
+
* @returns {number} Returns the index of the last non-whitespace character.
|
|
8236
|
+
*/
|
|
8237
|
+
function trimmedEndIndex$1(string) {
|
|
8238
|
+
var index = string.length;
|
|
8239
|
+
|
|
8240
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
8241
|
+
return index;
|
|
8242
|
+
}
|
|
8243
|
+
|
|
8244
|
+
var _trimmedEndIndex = trimmedEndIndex$1;
|
|
8245
|
+
|
|
8246
|
+
var trimmedEndIndex = _trimmedEndIndex;
|
|
8247
|
+
|
|
8248
|
+
/** Used to match leading whitespace. */
|
|
8249
|
+
var reTrimStart = /^\s+/;
|
|
8250
|
+
|
|
8251
|
+
/**
|
|
8252
|
+
* The base implementation of `_.trim`.
|
|
8051
8253
|
*
|
|
8052
|
-
* @
|
|
8053
|
-
* @
|
|
8054
|
-
* @
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8254
|
+
* @private
|
|
8255
|
+
* @param {string} string The string to trim.
|
|
8256
|
+
* @returns {string} Returns the trimmed string.
|
|
8257
|
+
*/
|
|
8258
|
+
function baseTrim$1(string) {
|
|
8259
|
+
return string
|
|
8260
|
+
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|
8261
|
+
: string;
|
|
8262
|
+
}
|
|
8263
|
+
|
|
8264
|
+
var _baseTrim = baseTrim$1;
|
|
8265
|
+
|
|
8266
|
+
var root = _root;
|
|
8267
|
+
|
|
8268
|
+
/** Built-in value references. */
|
|
8269
|
+
var Symbol$3 = root.Symbol;
|
|
8270
|
+
|
|
8271
|
+
var _Symbol = Symbol$3;
|
|
8272
|
+
|
|
8273
|
+
var Symbol$2 = _Symbol;
|
|
8274
|
+
|
|
8275
|
+
/** Used for built-in method references. */
|
|
8276
|
+
var objectProto$1 = Object.prototype;
|
|
8277
|
+
|
|
8278
|
+
/** Used to check objects for own properties. */
|
|
8279
|
+
var hasOwnProperty = objectProto$1.hasOwnProperty;
|
|
8280
|
+
|
|
8281
|
+
/**
|
|
8282
|
+
* Used to resolve the
|
|
8283
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
8284
|
+
* of values.
|
|
8285
|
+
*/
|
|
8286
|
+
var nativeObjectToString$1 = objectProto$1.toString;
|
|
8287
|
+
|
|
8288
|
+
/** Built-in value references. */
|
|
8289
|
+
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
8290
|
+
|
|
8291
|
+
/**
|
|
8292
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
8293
|
+
*
|
|
8294
|
+
* @private
|
|
8295
|
+
* @param {*} value The value to query.
|
|
8296
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
8297
|
+
*/
|
|
8298
|
+
function getRawTag$1(value) {
|
|
8299
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag$1),
|
|
8300
|
+
tag = value[symToStringTag$1];
|
|
8301
|
+
|
|
8302
|
+
try {
|
|
8303
|
+
value[symToStringTag$1] = undefined;
|
|
8304
|
+
var unmasked = true;
|
|
8305
|
+
} catch (e) {}
|
|
8306
|
+
|
|
8307
|
+
var result = nativeObjectToString$1.call(value);
|
|
8308
|
+
if (unmasked) {
|
|
8309
|
+
if (isOwn) {
|
|
8310
|
+
value[symToStringTag$1] = tag;
|
|
8311
|
+
} else {
|
|
8312
|
+
delete value[symToStringTag$1];
|
|
8313
|
+
}
|
|
8314
|
+
}
|
|
8315
|
+
return result;
|
|
8316
|
+
}
|
|
8317
|
+
|
|
8318
|
+
var _getRawTag = getRawTag$1;
|
|
8319
|
+
|
|
8320
|
+
/** Used for built-in method references. */
|
|
8321
|
+
|
|
8322
|
+
var objectProto = Object.prototype;
|
|
8323
|
+
|
|
8324
|
+
/**
|
|
8325
|
+
* Used to resolve the
|
|
8326
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
8327
|
+
* of values.
|
|
8328
|
+
*/
|
|
8329
|
+
var nativeObjectToString = objectProto.toString;
|
|
8330
|
+
|
|
8331
|
+
/**
|
|
8332
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
8333
|
+
*
|
|
8334
|
+
* @private
|
|
8335
|
+
* @param {*} value The value to convert.
|
|
8336
|
+
* @returns {string} Returns the converted string.
|
|
8337
|
+
*/
|
|
8338
|
+
function objectToString$1(value) {
|
|
8339
|
+
return nativeObjectToString.call(value);
|
|
8340
|
+
}
|
|
8341
|
+
|
|
8342
|
+
var _objectToString = objectToString$1;
|
|
8343
|
+
|
|
8344
|
+
var Symbol$1 = _Symbol,
|
|
8345
|
+
getRawTag = _getRawTag,
|
|
8346
|
+
objectToString = _objectToString;
|
|
8347
|
+
|
|
8348
|
+
/** `Object#toString` result references. */
|
|
8349
|
+
var nullTag = '[object Null]',
|
|
8350
|
+
undefinedTag = '[object Undefined]';
|
|
8351
|
+
|
|
8352
|
+
/** Built-in value references. */
|
|
8353
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
8354
|
+
|
|
8355
|
+
/**
|
|
8356
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
8357
|
+
*
|
|
8358
|
+
* @private
|
|
8359
|
+
* @param {*} value The value to query.
|
|
8360
|
+
* @returns {string} Returns the `toStringTag`.
|
|
8361
|
+
*/
|
|
8362
|
+
function baseGetTag$1(value) {
|
|
8363
|
+
if (value == null) {
|
|
8364
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
8365
|
+
}
|
|
8366
|
+
return (symToStringTag && symToStringTag in Object(value))
|
|
8367
|
+
? getRawTag(value)
|
|
8368
|
+
: objectToString(value);
|
|
8369
|
+
}
|
|
8370
|
+
|
|
8371
|
+
var _baseGetTag = baseGetTag$1;
|
|
8372
|
+
|
|
8373
|
+
/**
|
|
8374
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
8375
|
+
* and has a `typeof` result of "object".
|
|
8376
|
+
*
|
|
8377
|
+
* @static
|
|
8378
|
+
* @memberOf _
|
|
8379
|
+
* @since 4.0.0
|
|
8380
|
+
* @category Lang
|
|
8381
|
+
* @param {*} value The value to check.
|
|
8382
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
8383
|
+
* @example
|
|
8384
|
+
*
|
|
8385
|
+
* _.isObjectLike({});
|
|
8386
|
+
* // => true
|
|
8387
|
+
*
|
|
8388
|
+
* _.isObjectLike([1, 2, 3]);
|
|
8389
|
+
* // => true
|
|
8390
|
+
*
|
|
8391
|
+
* _.isObjectLike(_.noop);
|
|
8392
|
+
* // => false
|
|
8393
|
+
*
|
|
8394
|
+
* _.isObjectLike(null);
|
|
8395
|
+
* // => false
|
|
8396
|
+
*/
|
|
8397
|
+
|
|
8398
|
+
function isObjectLike$1(value) {
|
|
8399
|
+
return value != null && typeof value == 'object';
|
|
8400
|
+
}
|
|
8401
|
+
|
|
8402
|
+
var isObjectLike_1 = isObjectLike$1;
|
|
8403
|
+
|
|
8404
|
+
var baseGetTag = _baseGetTag,
|
|
8405
|
+
isObjectLike = isObjectLike_1;
|
|
8406
|
+
|
|
8407
|
+
/** `Object#toString` result references. */
|
|
8408
|
+
var symbolTag = '[object Symbol]';
|
|
8409
|
+
|
|
8410
|
+
/**
|
|
8411
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
8412
|
+
*
|
|
8413
|
+
* @static
|
|
8414
|
+
* @memberOf _
|
|
8415
|
+
* @since 4.0.0
|
|
8416
|
+
* @category Lang
|
|
8417
|
+
* @param {*} value The value to check.
|
|
8418
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
8419
|
+
* @example
|
|
8420
|
+
*
|
|
8421
|
+
* _.isSymbol(Symbol.iterator);
|
|
8422
|
+
* // => true
|
|
8423
|
+
*
|
|
8424
|
+
* _.isSymbol('abc');
|
|
8425
|
+
* // => false
|
|
8426
|
+
*/
|
|
8427
|
+
function isSymbol$1(value) {
|
|
8428
|
+
return typeof value == 'symbol' ||
|
|
8429
|
+
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
8430
|
+
}
|
|
8431
|
+
|
|
8432
|
+
var isSymbol_1 = isSymbol$1;
|
|
8433
|
+
|
|
8434
|
+
var baseTrim = _baseTrim,
|
|
8435
|
+
isObject$1 = isObject_1,
|
|
8436
|
+
isSymbol = isSymbol_1;
|
|
8437
|
+
|
|
8438
|
+
/** Used as references for various `Number` constants. */
|
|
8439
|
+
var NAN = 0 / 0;
|
|
8440
|
+
|
|
8441
|
+
/** Used to detect bad signed hexadecimal string values. */
|
|
8442
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
8443
|
+
|
|
8444
|
+
/** Used to detect binary string values. */
|
|
8445
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
8446
|
+
|
|
8447
|
+
/** Used to detect octal string values. */
|
|
8448
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
8449
|
+
|
|
8450
|
+
/** Built-in method references without a dependency on `root`. */
|
|
8451
|
+
var freeParseInt = parseInt;
|
|
8452
|
+
|
|
8453
|
+
/**
|
|
8454
|
+
* Converts `value` to a number.
|
|
8455
|
+
*
|
|
8456
|
+
* @static
|
|
8457
|
+
* @memberOf _
|
|
8458
|
+
* @since 4.0.0
|
|
8459
|
+
* @category Lang
|
|
8460
|
+
* @param {*} value The value to process.
|
|
8461
|
+
* @returns {number} Returns the number.
|
|
8462
|
+
* @example
|
|
8463
|
+
*
|
|
8464
|
+
* _.toNumber(3.2);
|
|
8465
|
+
* // => 3.2
|
|
8466
|
+
*
|
|
8467
|
+
* _.toNumber(Number.MIN_VALUE);
|
|
8468
|
+
* // => 5e-324
|
|
8469
|
+
*
|
|
8470
|
+
* _.toNumber(Infinity);
|
|
8471
|
+
* // => Infinity
|
|
8472
|
+
*
|
|
8473
|
+
* _.toNumber('3.2');
|
|
8474
|
+
* // => 3.2
|
|
8475
|
+
*/
|
|
8476
|
+
function toNumber$1(value) {
|
|
8477
|
+
if (typeof value == 'number') {
|
|
8478
|
+
return value;
|
|
8479
|
+
}
|
|
8480
|
+
if (isSymbol(value)) {
|
|
8481
|
+
return NAN;
|
|
8482
|
+
}
|
|
8483
|
+
if (isObject$1(value)) {
|
|
8484
|
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
8485
|
+
value = isObject$1(other) ? (other + '') : other;
|
|
8486
|
+
}
|
|
8487
|
+
if (typeof value != 'string') {
|
|
8488
|
+
return value === 0 ? value : +value;
|
|
8489
|
+
}
|
|
8490
|
+
value = baseTrim(value);
|
|
8491
|
+
var isBinary = reIsBinary.test(value);
|
|
8492
|
+
return (isBinary || reIsOctal.test(value))
|
|
8493
|
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
8494
|
+
: (reIsBadHex.test(value) ? NAN : +value);
|
|
8495
|
+
}
|
|
8496
|
+
|
|
8497
|
+
var toNumber_1 = toNumber$1;
|
|
8498
|
+
|
|
8499
|
+
var isObject = isObject_1,
|
|
8500
|
+
now = now_1,
|
|
8501
|
+
toNumber = toNumber_1;
|
|
8502
|
+
|
|
8503
|
+
/** Error message constants. */
|
|
8504
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
8505
|
+
|
|
8506
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
8507
|
+
var nativeMax = Math.max,
|
|
8508
|
+
nativeMin = Math.min;
|
|
8509
|
+
|
|
8510
|
+
/**
|
|
8511
|
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
8512
|
+
* milliseconds have elapsed since the last time the debounced function was
|
|
8513
|
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
8514
|
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
8515
|
+
* Provide `options` to indicate whether `func` should be invoked on the
|
|
8516
|
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
8517
|
+
* with the last arguments provided to the debounced function. Subsequent
|
|
8518
|
+
* calls to the debounced function return the result of the last `func`
|
|
8519
|
+
* invocation.
|
|
8520
|
+
*
|
|
8521
|
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
8522
|
+
* invoked on the trailing edge of the timeout only if the debounced function
|
|
8523
|
+
* is invoked more than once during the `wait` timeout.
|
|
8524
|
+
*
|
|
8525
|
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
8526
|
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
8527
|
+
*
|
|
8528
|
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
8529
|
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
8530
|
+
*
|
|
8531
|
+
* @static
|
|
8532
|
+
* @memberOf _
|
|
8533
|
+
* @since 0.1.0
|
|
8534
|
+
* @category Function
|
|
8535
|
+
* @param {Function} func The function to debounce.
|
|
8536
|
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
8537
|
+
* @param {Object} [options={}] The options object.
|
|
8538
|
+
* @param {boolean} [options.leading=false]
|
|
8539
|
+
* Specify invoking on the leading edge of the timeout.
|
|
8540
|
+
* @param {number} [options.maxWait]
|
|
8541
|
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
8542
|
+
* @param {boolean} [options.trailing=true]
|
|
8543
|
+
* Specify invoking on the trailing edge of the timeout.
|
|
8544
|
+
* @returns {Function} Returns the new debounced function.
|
|
8066
8545
|
* @example
|
|
8067
8546
|
*
|
|
8068
8547
|
* // Avoid costly calculations while the window size is in flux.
|
|
@@ -8127,9 +8606,11 @@ function debounce(func, wait, options) {
|
|
|
8127
8606
|
function remainingWait(time) {
|
|
8128
8607
|
var timeSinceLastCall = time - lastCallTime,
|
|
8129
8608
|
timeSinceLastInvoke = time - lastInvokeTime,
|
|
8130
|
-
|
|
8609
|
+
timeWaiting = wait - timeSinceLastCall;
|
|
8131
8610
|
|
|
8132
|
-
return maxing
|
|
8611
|
+
return maxing
|
|
8612
|
+
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
8613
|
+
: timeWaiting;
|
|
8133
8614
|
}
|
|
8134
8615
|
|
|
8135
8616
|
function shouldInvoke(time) {
|
|
@@ -8190,6 +8671,7 @@ function debounce(func, wait, options) {
|
|
|
8190
8671
|
}
|
|
8191
8672
|
if (maxing) {
|
|
8192
8673
|
// Handle invocations in a tight loop.
|
|
8674
|
+
clearTimeout(timerId);
|
|
8193
8675
|
timerId = setTimeout(timerExpired, wait);
|
|
8194
8676
|
return invokeFunc(lastCallTime);
|
|
8195
8677
|
}
|
|
@@ -8204,133 +8686,9 @@ function debounce(func, wait, options) {
|
|
|
8204
8686
|
return debounced;
|
|
8205
8687
|
}
|
|
8206
8688
|
|
|
8207
|
-
|
|
8208
|
-
* Checks if `value` is the
|
|
8209
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
8210
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
8211
|
-
*
|
|
8212
|
-
* @static
|
|
8213
|
-
* @memberOf _
|
|
8214
|
-
* @since 0.1.0
|
|
8215
|
-
* @category Lang
|
|
8216
|
-
* @param {*} value The value to check.
|
|
8217
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
8218
|
-
* @example
|
|
8219
|
-
*
|
|
8220
|
-
* _.isObject({});
|
|
8221
|
-
* // => true
|
|
8222
|
-
*
|
|
8223
|
-
* _.isObject([1, 2, 3]);
|
|
8224
|
-
* // => true
|
|
8225
|
-
*
|
|
8226
|
-
* _.isObject(_.noop);
|
|
8227
|
-
* // => true
|
|
8228
|
-
*
|
|
8229
|
-
* _.isObject(null);
|
|
8230
|
-
* // => false
|
|
8231
|
-
*/
|
|
8232
|
-
function isObject(value) {
|
|
8233
|
-
var type = typeof value;
|
|
8234
|
-
return !!value && (type == 'object' || type == 'function');
|
|
8235
|
-
}
|
|
8236
|
-
|
|
8237
|
-
/**
|
|
8238
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
8239
|
-
* and has a `typeof` result of "object".
|
|
8240
|
-
*
|
|
8241
|
-
* @static
|
|
8242
|
-
* @memberOf _
|
|
8243
|
-
* @since 4.0.0
|
|
8244
|
-
* @category Lang
|
|
8245
|
-
* @param {*} value The value to check.
|
|
8246
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
8247
|
-
* @example
|
|
8248
|
-
*
|
|
8249
|
-
* _.isObjectLike({});
|
|
8250
|
-
* // => true
|
|
8251
|
-
*
|
|
8252
|
-
* _.isObjectLike([1, 2, 3]);
|
|
8253
|
-
* // => true
|
|
8254
|
-
*
|
|
8255
|
-
* _.isObjectLike(_.noop);
|
|
8256
|
-
* // => false
|
|
8257
|
-
*
|
|
8258
|
-
* _.isObjectLike(null);
|
|
8259
|
-
* // => false
|
|
8260
|
-
*/
|
|
8261
|
-
function isObjectLike(value) {
|
|
8262
|
-
return !!value && typeof value == 'object';
|
|
8263
|
-
}
|
|
8689
|
+
var debounce_1 = debounce;
|
|
8264
8690
|
|
|
8265
|
-
|
|
8266
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
8267
|
-
*
|
|
8268
|
-
* @static
|
|
8269
|
-
* @memberOf _
|
|
8270
|
-
* @since 4.0.0
|
|
8271
|
-
* @category Lang
|
|
8272
|
-
* @param {*} value The value to check.
|
|
8273
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
8274
|
-
* @example
|
|
8275
|
-
*
|
|
8276
|
-
* _.isSymbol(Symbol.iterator);
|
|
8277
|
-
* // => true
|
|
8278
|
-
*
|
|
8279
|
-
* _.isSymbol('abc');
|
|
8280
|
-
* // => false
|
|
8281
|
-
*/
|
|
8282
|
-
function isSymbol(value) {
|
|
8283
|
-
return typeof value == 'symbol' ||
|
|
8284
|
-
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
|
8285
|
-
}
|
|
8286
|
-
|
|
8287
|
-
/**
|
|
8288
|
-
* Converts `value` to a number.
|
|
8289
|
-
*
|
|
8290
|
-
* @static
|
|
8291
|
-
* @memberOf _
|
|
8292
|
-
* @since 4.0.0
|
|
8293
|
-
* @category Lang
|
|
8294
|
-
* @param {*} value The value to process.
|
|
8295
|
-
* @returns {number} Returns the number.
|
|
8296
|
-
* @example
|
|
8297
|
-
*
|
|
8298
|
-
* _.toNumber(3.2);
|
|
8299
|
-
* // => 3.2
|
|
8300
|
-
*
|
|
8301
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
8302
|
-
* // => 5e-324
|
|
8303
|
-
*
|
|
8304
|
-
* _.toNumber(Infinity);
|
|
8305
|
-
* // => Infinity
|
|
8306
|
-
*
|
|
8307
|
-
* _.toNumber('3.2');
|
|
8308
|
-
* // => 3.2
|
|
8309
|
-
*/
|
|
8310
|
-
function toNumber(value) {
|
|
8311
|
-
if (typeof value == 'number') {
|
|
8312
|
-
return value;
|
|
8313
|
-
}
|
|
8314
|
-
if (isSymbol(value)) {
|
|
8315
|
-
return NAN;
|
|
8316
|
-
}
|
|
8317
|
-
if (isObject(value)) {
|
|
8318
|
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
8319
|
-
value = isObject(other) ? (other + '') : other;
|
|
8320
|
-
}
|
|
8321
|
-
if (typeof value != 'string') {
|
|
8322
|
-
return value === 0 ? value : +value;
|
|
8323
|
-
}
|
|
8324
|
-
value = value.replace(reTrim, '');
|
|
8325
|
-
var isBinary = reIsBinary.test(value);
|
|
8326
|
-
return (isBinary || reIsOctal.test(value))
|
|
8327
|
-
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
8328
|
-
: (reIsBadHex.test(value) ? NAN : +value);
|
|
8329
|
-
}
|
|
8330
|
-
|
|
8331
|
-
var lodash_debounce = debounce;
|
|
8332
|
-
|
|
8333
|
-
var classnames = {exports: {}};
|
|
8691
|
+
var classnames$1 = {exports: {}};
|
|
8334
8692
|
|
|
8335
8693
|
/*!
|
|
8336
8694
|
Copyright (c) 2018 Jed Watson.
|
|
@@ -8386,30 +8744,13 @@ var classnames = {exports: {}};
|
|
|
8386
8744
|
window.classNames = classNames;
|
|
8387
8745
|
}
|
|
8388
8746
|
}());
|
|
8389
|
-
}(classnames));
|
|
8390
|
-
|
|
8391
|
-
var innerSliderUtils = {};
|
|
8392
|
-
|
|
8393
|
-
Object.defineProperty(innerSliderUtils, "__esModule", {
|
|
8394
|
-
value: true
|
|
8395
|
-
});
|
|
8396
|
-
innerSliderUtils.clamp = clamp;
|
|
8397
|
-
innerSliderUtils.canUseDOM = innerSliderUtils.slidesOnLeft = innerSliderUtils.slidesOnRight = innerSliderUtils.siblingDirection = innerSliderUtils.getTotalSlides = innerSliderUtils.getPostClones = innerSliderUtils.getPreClones = innerSliderUtils.getTrackLeft = innerSliderUtils.getTrackAnimateCSS = innerSliderUtils.getTrackCSS = innerSliderUtils.checkSpecKeys = innerSliderUtils.getSlideCount = innerSliderUtils.checkNavigable = innerSliderUtils.getNavigableIndexes = innerSliderUtils.swipeEnd = innerSliderUtils.swipeMove = innerSliderUtils.swipeStart = innerSliderUtils.keyHandler = innerSliderUtils.changeSlide = innerSliderUtils.slideHandler = innerSliderUtils.initializedState = innerSliderUtils.extractObject = innerSliderUtils.canGoNext = innerSliderUtils.getSwipeDirection = innerSliderUtils.getHeight = innerSliderUtils.getWidth = innerSliderUtils.lazySlidesOnRight = innerSliderUtils.lazySlidesOnLeft = innerSliderUtils.lazyEndIndex = innerSliderUtils.lazyStartIndex = innerSliderUtils.getRequiredLazySlides = innerSliderUtils.getOnDemandLazySlides = innerSliderUtils.safePreventDefault = void 0;
|
|
8398
|
-
|
|
8399
|
-
var _react$4 = _interopRequireDefault$4(React__default['default']);
|
|
8400
|
-
|
|
8401
|
-
function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
8402
|
-
|
|
8403
|
-
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
8747
|
+
}(classnames$1));
|
|
8404
8748
|
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
function _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8749
|
+
var classnames = classnames$1.exports;
|
|
8408
8750
|
|
|
8409
8751
|
function clamp(number, lowerBound, upperBound) {
|
|
8410
8752
|
return Math.max(lowerBound, Math.min(number, upperBound));
|
|
8411
8753
|
}
|
|
8412
|
-
|
|
8413
8754
|
var safePreventDefault = function safePreventDefault(event) {
|
|
8414
8755
|
var passiveEvents = ["onTouchStart", "onTouchMove", "onWheel"];
|
|
8415
8756
|
|
|
@@ -8417,9 +8758,6 @@ var safePreventDefault = function safePreventDefault(event) {
|
|
|
8417
8758
|
event.preventDefault();
|
|
8418
8759
|
}
|
|
8419
8760
|
};
|
|
8420
|
-
|
|
8421
|
-
innerSliderUtils.safePreventDefault = safePreventDefault;
|
|
8422
|
-
|
|
8423
8761
|
var getOnDemandLazySlides = function getOnDemandLazySlides(spec) {
|
|
8424
8762
|
var onDemandSlides = [];
|
|
8425
8763
|
var startIndex = lazyStartIndex(spec);
|
|
@@ -8434,61 +8772,25 @@ var getOnDemandLazySlides = function getOnDemandLazySlides(spec) {
|
|
|
8434
8772
|
return onDemandSlides;
|
|
8435
8773
|
}; // return list of slides that need to be present
|
|
8436
8774
|
|
|
8437
|
-
|
|
8438
|
-
innerSliderUtils.getOnDemandLazySlides = getOnDemandLazySlides;
|
|
8439
|
-
|
|
8440
|
-
var getRequiredLazySlides = function getRequiredLazySlides(spec) {
|
|
8441
|
-
var requiredSlides = [];
|
|
8442
|
-
var startIndex = lazyStartIndex(spec);
|
|
8443
|
-
var endIndex = lazyEndIndex(spec);
|
|
8444
|
-
|
|
8445
|
-
for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
|
|
8446
|
-
requiredSlides.push(slideIndex);
|
|
8447
|
-
}
|
|
8448
|
-
|
|
8449
|
-
return requiredSlides;
|
|
8450
|
-
}; // startIndex that needs to be present
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
innerSliderUtils.getRequiredLazySlides = getRequiredLazySlides;
|
|
8454
|
-
|
|
8455
8775
|
var lazyStartIndex = function lazyStartIndex(spec) {
|
|
8456
8776
|
return spec.currentSlide - lazySlidesOnLeft(spec);
|
|
8457
8777
|
};
|
|
8458
|
-
|
|
8459
|
-
innerSliderUtils.lazyStartIndex = lazyStartIndex;
|
|
8460
|
-
|
|
8461
8778
|
var lazyEndIndex = function lazyEndIndex(spec) {
|
|
8462
8779
|
return spec.currentSlide + lazySlidesOnRight(spec);
|
|
8463
8780
|
};
|
|
8464
|
-
|
|
8465
|
-
innerSliderUtils.lazyEndIndex = lazyEndIndex;
|
|
8466
|
-
|
|
8467
8781
|
var lazySlidesOnLeft = function lazySlidesOnLeft(spec) {
|
|
8468
8782
|
return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;
|
|
8469
8783
|
};
|
|
8470
|
-
|
|
8471
|
-
innerSliderUtils.lazySlidesOnLeft = lazySlidesOnLeft;
|
|
8472
|
-
|
|
8473
8784
|
var lazySlidesOnRight = function lazySlidesOnRight(spec) {
|
|
8474
8785
|
return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;
|
|
8475
8786
|
}; // get width of an element
|
|
8476
8787
|
|
|
8477
|
-
|
|
8478
|
-
innerSliderUtils.lazySlidesOnRight = lazySlidesOnRight;
|
|
8479
|
-
|
|
8480
8788
|
var getWidth = function getWidth(elem) {
|
|
8481
8789
|
return elem && elem.offsetWidth || 0;
|
|
8482
8790
|
};
|
|
8483
|
-
|
|
8484
|
-
innerSliderUtils.getWidth = getWidth;
|
|
8485
|
-
|
|
8486
8791
|
var getHeight = function getHeight(elem) {
|
|
8487
8792
|
return elem && elem.offsetHeight || 0;
|
|
8488
8793
|
};
|
|
8489
|
-
|
|
8490
|
-
innerSliderUtils.getHeight = getHeight;
|
|
8491
|
-
|
|
8492
8794
|
var getSwipeDirection = function getSwipeDirection(touchObject) {
|
|
8493
8795
|
var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
8494
8796
|
var xDist, yDist, r, swipeAngle;
|
|
@@ -8520,9 +8822,6 @@ var getSwipeDirection = function getSwipeDirection(touchObject) {
|
|
|
8520
8822
|
return "vertical";
|
|
8521
8823
|
}; // whether or not we can go next
|
|
8522
8824
|
|
|
8523
|
-
|
|
8524
|
-
innerSliderUtils.getSwipeDirection = getSwipeDirection;
|
|
8525
|
-
|
|
8526
8825
|
var canGoNext = function canGoNext(spec) {
|
|
8527
8826
|
var canGo = true;
|
|
8528
8827
|
|
|
@@ -8537,9 +8836,6 @@ var canGoNext = function canGoNext(spec) {
|
|
|
8537
8836
|
return canGo;
|
|
8538
8837
|
}; // given an object and a list of keys, return new object with given keys
|
|
8539
8838
|
|
|
8540
|
-
|
|
8541
|
-
innerSliderUtils.canGoNext = canGoNext;
|
|
8542
|
-
|
|
8543
8839
|
var extractObject = function extractObject(spec, keys) {
|
|
8544
8840
|
var newObject = {};
|
|
8545
8841
|
keys.forEach(function (key) {
|
|
@@ -8548,13 +8844,9 @@ var extractObject = function extractObject(spec, keys) {
|
|
|
8548
8844
|
return newObject;
|
|
8549
8845
|
}; // get initialized state
|
|
8550
8846
|
|
|
8551
|
-
|
|
8552
|
-
innerSliderUtils.extractObject = extractObject;
|
|
8553
|
-
|
|
8554
8847
|
var initializedState = function initializedState(spec) {
|
|
8555
8848
|
// spec also contains listRef, trackRef
|
|
8556
|
-
var slideCount =
|
|
8557
|
-
|
|
8849
|
+
var slideCount = React__default['default'].Children.count(spec.children);
|
|
8558
8850
|
var listNode = spec.listRef;
|
|
8559
8851
|
var listWidth = Math.ceil(getWidth(listNode));
|
|
8560
8852
|
var trackNode = spec.trackRef && spec.trackRef.node;
|
|
@@ -8582,7 +8874,7 @@ var initializedState = function initializedState(spec) {
|
|
|
8582
8874
|
}
|
|
8583
8875
|
|
|
8584
8876
|
var lazyLoadedList = spec.lazyLoadedList || [];
|
|
8585
|
-
var slidesToLoad = getOnDemandLazySlides(
|
|
8877
|
+
var slidesToLoad = getOnDemandLazySlides(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8586
8878
|
currentSlide: currentSlide,
|
|
8587
8879
|
lazyLoadedList: lazyLoadedList
|
|
8588
8880
|
}));
|
|
@@ -8604,9 +8896,6 @@ var initializedState = function initializedState(spec) {
|
|
|
8604
8896
|
|
|
8605
8897
|
return state;
|
|
8606
8898
|
};
|
|
8607
|
-
|
|
8608
|
-
innerSliderUtils.initializedState = initializedState;
|
|
8609
|
-
|
|
8610
8899
|
var slideHandler = function slideHandler(spec) {
|
|
8611
8900
|
var waitForAnimate = spec.waitForAnimate,
|
|
8612
8901
|
animating = spec.animating,
|
|
@@ -8673,10 +8962,10 @@ var slideHandler = function slideHandler(spec) {
|
|
|
8673
8962
|
finalSlide = slideCount - slidesToShow;
|
|
8674
8963
|
}
|
|
8675
8964
|
|
|
8676
|
-
animationLeft = getTrackLeft(
|
|
8965
|
+
animationLeft = getTrackLeft(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8677
8966
|
slideIndex: animationSlide
|
|
8678
8967
|
}));
|
|
8679
|
-
finalLeft = getTrackLeft(
|
|
8968
|
+
finalLeft = getTrackLeft(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8680
8969
|
slideIndex: finalSlide
|
|
8681
8970
|
}));
|
|
8682
8971
|
|
|
@@ -8686,7 +8975,7 @@ var slideHandler = function slideHandler(spec) {
|
|
|
8686
8975
|
}
|
|
8687
8976
|
|
|
8688
8977
|
if (lazyLoad) {
|
|
8689
|
-
lazyLoadedList = lazyLoadedList.concat(getOnDemandLazySlides(
|
|
8978
|
+
lazyLoadedList = lazyLoadedList.concat(getOnDemandLazySlides(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8690
8979
|
currentSlide: animationSlide
|
|
8691
8980
|
})));
|
|
8692
8981
|
}
|
|
@@ -8694,7 +8983,7 @@ var slideHandler = function slideHandler(spec) {
|
|
|
8694
8983
|
if (!useCSS) {
|
|
8695
8984
|
state = {
|
|
8696
8985
|
currentSlide: finalSlide,
|
|
8697
|
-
trackStyle: getTrackCSS(
|
|
8986
|
+
trackStyle: getTrackCSS(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8698
8987
|
left: finalLeft
|
|
8699
8988
|
})),
|
|
8700
8989
|
lazyLoadedList: lazyLoadedList,
|
|
@@ -8704,7 +8993,7 @@ var slideHandler = function slideHandler(spec) {
|
|
|
8704
8993
|
state = {
|
|
8705
8994
|
animating: true,
|
|
8706
8995
|
currentSlide: finalSlide,
|
|
8707
|
-
trackStyle: getTrackAnimateCSS(
|
|
8996
|
+
trackStyle: getTrackAnimateCSS(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8708
8997
|
left: animationLeft
|
|
8709
8998
|
})),
|
|
8710
8999
|
lazyLoadedList: lazyLoadedList,
|
|
@@ -8713,7 +9002,7 @@ var slideHandler = function slideHandler(spec) {
|
|
|
8713
9002
|
nextState = {
|
|
8714
9003
|
animating: false,
|
|
8715
9004
|
currentSlide: finalSlide,
|
|
8716
|
-
trackStyle: getTrackCSS(
|
|
9005
|
+
trackStyle: getTrackCSS(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8717
9006
|
left: finalLeft
|
|
8718
9007
|
})),
|
|
8719
9008
|
swipeLeft: null,
|
|
@@ -8727,9 +9016,6 @@ var slideHandler = function slideHandler(spec) {
|
|
|
8727
9016
|
nextState: nextState
|
|
8728
9017
|
};
|
|
8729
9018
|
};
|
|
8730
|
-
|
|
8731
|
-
innerSliderUtils.slideHandler = slideHandler;
|
|
8732
|
-
|
|
8733
9019
|
var changeSlide = function changeSlide(spec, options) {
|
|
8734
9020
|
var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;
|
|
8735
9021
|
var slidesToScroll = spec.slidesToScroll,
|
|
@@ -8773,7 +9059,7 @@ var changeSlide = function changeSlide(spec, options) {
|
|
|
8773
9059
|
targetSlide = options.index;
|
|
8774
9060
|
|
|
8775
9061
|
if (infinite) {
|
|
8776
|
-
var direction = siblingDirection(
|
|
9062
|
+
var direction = siblingDirection(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8777
9063
|
targetSlide: targetSlide
|
|
8778
9064
|
}));
|
|
8779
9065
|
|
|
@@ -8789,18 +9075,12 @@ var changeSlide = function changeSlide(spec, options) {
|
|
|
8789
9075
|
|
|
8790
9076
|
return targetSlide;
|
|
8791
9077
|
};
|
|
8792
|
-
|
|
8793
|
-
innerSliderUtils.changeSlide = changeSlide;
|
|
8794
|
-
|
|
8795
9078
|
var keyHandler = function keyHandler(e, accessibility, rtl) {
|
|
8796
9079
|
if (e.target.tagName.match("TEXTAREA|INPUT|SELECT") || !accessibility) return "";
|
|
8797
9080
|
if (e.keyCode === 37) return rtl ? "next" : "previous";
|
|
8798
9081
|
if (e.keyCode === 39) return rtl ? "previous" : "next";
|
|
8799
9082
|
return "";
|
|
8800
9083
|
};
|
|
8801
|
-
|
|
8802
|
-
innerSliderUtils.keyHandler = keyHandler;
|
|
8803
|
-
|
|
8804
9084
|
var swipeStart = function swipeStart(e, swipe, draggable) {
|
|
8805
9085
|
e.target.tagName === "IMG" && safePreventDefault(e);
|
|
8806
9086
|
if (!swipe || !draggable && e.type.indexOf("mouse") !== -1) return "";
|
|
@@ -8814,9 +9094,6 @@ var swipeStart = function swipeStart(e, swipe, draggable) {
|
|
|
8814
9094
|
}
|
|
8815
9095
|
};
|
|
8816
9096
|
};
|
|
8817
|
-
|
|
8818
|
-
innerSliderUtils.swipeStart = swipeStart;
|
|
8819
|
-
|
|
8820
9097
|
var swipeMove = function swipeMove(e, spec) {
|
|
8821
9098
|
// spec also contains, trackRef and slideIndex
|
|
8822
9099
|
var scrolling = spec.scrolling,
|
|
@@ -8892,10 +9169,10 @@ var swipeMove = function swipeMove(e, spec) {
|
|
|
8892
9169
|
swipeLeft = curLeft + touchSwipeLength * positionOffset;
|
|
8893
9170
|
}
|
|
8894
9171
|
|
|
8895
|
-
state =
|
|
9172
|
+
state = _objectSpread2(_objectSpread2({}, state), {}, {
|
|
8896
9173
|
touchObject: touchObject,
|
|
8897
9174
|
swipeLeft: swipeLeft,
|
|
8898
|
-
trackStyle: getTrackCSS(
|
|
9175
|
+
trackStyle: getTrackCSS(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8899
9176
|
left: swipeLeft
|
|
8900
9177
|
}))
|
|
8901
9178
|
});
|
|
@@ -8911,9 +9188,6 @@ var swipeMove = function swipeMove(e, spec) {
|
|
|
8911
9188
|
|
|
8912
9189
|
return state;
|
|
8913
9190
|
};
|
|
8914
|
-
|
|
8915
|
-
innerSliderUtils.swipeMove = swipeMove;
|
|
8916
|
-
|
|
8917
9191
|
var swipeEnd = function swipeEnd(e, spec) {
|
|
8918
9192
|
var dragging = spec.dragging,
|
|
8919
9193
|
swipe = spec.swipe,
|
|
@@ -8988,16 +9262,13 @@ var swipeEnd = function swipeEnd(e, spec) {
|
|
|
8988
9262
|
} else {
|
|
8989
9263
|
// Adjust the track back to it's original position.
|
|
8990
9264
|
var currentLeft = getTrackLeft(spec);
|
|
8991
|
-
state["trackStyle"] = getTrackAnimateCSS(
|
|
9265
|
+
state["trackStyle"] = getTrackAnimateCSS(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
8992
9266
|
left: currentLeft
|
|
8993
9267
|
}));
|
|
8994
9268
|
}
|
|
8995
9269
|
|
|
8996
9270
|
return state;
|
|
8997
9271
|
};
|
|
8998
|
-
|
|
8999
|
-
innerSliderUtils.swipeEnd = swipeEnd;
|
|
9000
|
-
|
|
9001
9272
|
var getNavigableIndexes = function getNavigableIndexes(spec) {
|
|
9002
9273
|
var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;
|
|
9003
9274
|
var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;
|
|
@@ -9012,9 +9283,6 @@ var getNavigableIndexes = function getNavigableIndexes(spec) {
|
|
|
9012
9283
|
|
|
9013
9284
|
return indexes;
|
|
9014
9285
|
};
|
|
9015
|
-
|
|
9016
|
-
innerSliderUtils.getNavigableIndexes = getNavigableIndexes;
|
|
9017
|
-
|
|
9018
9286
|
var checkNavigable = function checkNavigable(spec, index) {
|
|
9019
9287
|
var navigables = getNavigableIndexes(spec);
|
|
9020
9288
|
var prevNavigable = 0;
|
|
@@ -9034,9 +9302,6 @@ var checkNavigable = function checkNavigable(spec, index) {
|
|
|
9034
9302
|
|
|
9035
9303
|
return index;
|
|
9036
9304
|
};
|
|
9037
|
-
|
|
9038
|
-
innerSliderUtils.checkNavigable = checkNavigable;
|
|
9039
|
-
|
|
9040
9305
|
var getSlideCount = function getSlideCount(spec) {
|
|
9041
9306
|
var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;
|
|
9042
9307
|
|
|
@@ -9071,17 +9336,13 @@ var getSlideCount = function getSlideCount(spec) {
|
|
|
9071
9336
|
return spec.slidesToScroll;
|
|
9072
9337
|
}
|
|
9073
9338
|
};
|
|
9074
|
-
|
|
9075
|
-
innerSliderUtils.getSlideCount = getSlideCount;
|
|
9076
|
-
|
|
9077
9339
|
var checkSpecKeys = function checkSpecKeys(spec, keysArray) {
|
|
9078
|
-
return
|
|
9079
|
-
|
|
9080
|
-
|
|
9340
|
+
return (// eslint-disable-next-line no-prototype-builtins
|
|
9341
|
+
keysArray.reduce(function (value, key) {
|
|
9342
|
+
return value && spec.hasOwnProperty(key);
|
|
9343
|
+
}, true) ? null : console.error("Keys Missing:", spec)
|
|
9344
|
+
);
|
|
9081
9345
|
};
|
|
9082
|
-
|
|
9083
|
-
innerSliderUtils.checkSpecKeys = checkSpecKeys;
|
|
9084
|
-
|
|
9085
9346
|
var getTrackCSS = function getTrackCSS(spec) {
|
|
9086
9347
|
checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth"]);
|
|
9087
9348
|
var trackWidth, trackHeight;
|
|
@@ -9103,7 +9364,7 @@ var getTrackCSS = function getTrackCSS(spec) {
|
|
|
9103
9364
|
var WebkitTransform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
|
|
9104
9365
|
var transform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
|
|
9105
9366
|
var msTransform = !spec.vertical ? "translateX(" + spec.left + "px)" : "translateY(" + spec.left + "px)";
|
|
9106
|
-
style =
|
|
9367
|
+
style = _objectSpread2(_objectSpread2({}, style), {}, {
|
|
9107
9368
|
WebkitTransform: WebkitTransform,
|
|
9108
9369
|
transform: transform,
|
|
9109
9370
|
msTransform: msTransform
|
|
@@ -9132,9 +9393,6 @@ var getTrackCSS = function getTrackCSS(spec) {
|
|
|
9132
9393
|
|
|
9133
9394
|
return style;
|
|
9134
9395
|
};
|
|
9135
|
-
|
|
9136
|
-
innerSliderUtils.getTrackCSS = getTrackCSS;
|
|
9137
|
-
|
|
9138
9396
|
var getTrackAnimateCSS = function getTrackAnimateCSS(spec) {
|
|
9139
9397
|
checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth", "speed", "cssEase"]);
|
|
9140
9398
|
var style = getTrackCSS(spec); // useCSS is true by default so it can be undefined
|
|
@@ -9152,9 +9410,6 @@ var getTrackAnimateCSS = function getTrackAnimateCSS(spec) {
|
|
|
9152
9410
|
|
|
9153
9411
|
return style;
|
|
9154
9412
|
};
|
|
9155
|
-
|
|
9156
|
-
innerSliderUtils.getTrackAnimateCSS = getTrackAnimateCSS;
|
|
9157
|
-
|
|
9158
9413
|
var getTrackLeft = function getTrackLeft(spec) {
|
|
9159
9414
|
if (spec.unslick) {
|
|
9160
9415
|
return 0;
|
|
@@ -9239,9 +9494,6 @@ var getTrackLeft = function getTrackLeft(spec) {
|
|
|
9239
9494
|
|
|
9240
9495
|
return targetLeft;
|
|
9241
9496
|
};
|
|
9242
|
-
|
|
9243
|
-
innerSliderUtils.getTrackLeft = getTrackLeft;
|
|
9244
|
-
|
|
9245
9497
|
var getPreClones = function getPreClones(spec) {
|
|
9246
9498
|
if (spec.unslick || !spec.infinite) {
|
|
9247
9499
|
return 0;
|
|
@@ -9253,9 +9505,6 @@ var getPreClones = function getPreClones(spec) {
|
|
|
9253
9505
|
|
|
9254
9506
|
return spec.slidesToShow + (spec.centerMode ? 1 : 0);
|
|
9255
9507
|
};
|
|
9256
|
-
|
|
9257
|
-
innerSliderUtils.getPreClones = getPreClones;
|
|
9258
|
-
|
|
9259
9508
|
var getPostClones = function getPostClones(spec) {
|
|
9260
9509
|
if (spec.unslick || !spec.infinite) {
|
|
9261
9510
|
return 0;
|
|
@@ -9263,15 +9512,9 @@ var getPostClones = function getPostClones(spec) {
|
|
|
9263
9512
|
|
|
9264
9513
|
return spec.slideCount;
|
|
9265
9514
|
};
|
|
9266
|
-
|
|
9267
|
-
innerSliderUtils.getPostClones = getPostClones;
|
|
9268
|
-
|
|
9269
9515
|
var getTotalSlides = function getTotalSlides(spec) {
|
|
9270
9516
|
return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);
|
|
9271
9517
|
};
|
|
9272
|
-
|
|
9273
|
-
innerSliderUtils.getTotalSlides = getTotalSlides;
|
|
9274
|
-
|
|
9275
9518
|
var siblingDirection = function siblingDirection(spec) {
|
|
9276
9519
|
if (spec.targetSlide > spec.currentSlide) {
|
|
9277
9520
|
if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {
|
|
@@ -9287,9 +9530,6 @@ var siblingDirection = function siblingDirection(spec) {
|
|
|
9287
9530
|
return "left";
|
|
9288
9531
|
}
|
|
9289
9532
|
};
|
|
9290
|
-
|
|
9291
|
-
innerSliderUtils.siblingDirection = siblingDirection;
|
|
9292
|
-
|
|
9293
9533
|
var slidesOnRight = function slidesOnRight(_ref) {
|
|
9294
9534
|
var slidesToShow = _ref.slidesToShow,
|
|
9295
9535
|
centerMode = _ref.centerMode,
|
|
@@ -9310,9 +9550,6 @@ var slidesOnRight = function slidesOnRight(_ref) {
|
|
|
9310
9550
|
|
|
9311
9551
|
return slidesToShow - 1;
|
|
9312
9552
|
};
|
|
9313
|
-
|
|
9314
|
-
innerSliderUtils.slidesOnRight = slidesOnRight;
|
|
9315
|
-
|
|
9316
9553
|
var slidesOnLeft = function slidesOnLeft(_ref2) {
|
|
9317
9554
|
var slidesToShow = _ref2.slidesToShow,
|
|
9318
9555
|
centerMode = _ref2.centerMode,
|
|
@@ -9333,61 +9570,10 @@ var slidesOnLeft = function slidesOnLeft(_ref2) {
|
|
|
9333
9570
|
|
|
9334
9571
|
return 0;
|
|
9335
9572
|
};
|
|
9336
|
-
|
|
9337
|
-
innerSliderUtils.slidesOnLeft = slidesOnLeft;
|
|
9338
|
-
|
|
9339
9573
|
var canUseDOM = function canUseDOM() {
|
|
9340
9574
|
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
9341
9575
|
};
|
|
9342
9576
|
|
|
9343
|
-
innerSliderUtils.canUseDOM = canUseDOM;
|
|
9344
|
-
|
|
9345
|
-
var track = {};
|
|
9346
|
-
|
|
9347
|
-
Object.defineProperty(track, "__esModule", {
|
|
9348
|
-
value: true
|
|
9349
|
-
});
|
|
9350
|
-
track.Track = void 0;
|
|
9351
|
-
|
|
9352
|
-
var _react$3 = _interopRequireDefault$3(React__default['default']);
|
|
9353
|
-
|
|
9354
|
-
var _classnames$3 = _interopRequireDefault$3(classnames.exports);
|
|
9355
|
-
|
|
9356
|
-
var _innerSliderUtils$3 = innerSliderUtils;
|
|
9357
|
-
|
|
9358
|
-
function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9359
|
-
|
|
9360
|
-
function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
|
|
9361
|
-
|
|
9362
|
-
function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
9363
|
-
|
|
9364
|
-
function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9365
|
-
|
|
9366
|
-
function _defineProperties$3(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
9367
|
-
|
|
9368
|
-
function _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); if (staticProps) _defineProperties$3(Constructor, staticProps); return Constructor; }
|
|
9369
|
-
|
|
9370
|
-
function _inherits$3(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$3(subClass, superClass); }
|
|
9371
|
-
|
|
9372
|
-
function _setPrototypeOf$3(o, p) { _setPrototypeOf$3 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$3(o, p); }
|
|
9373
|
-
|
|
9374
|
-
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf$3(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$3(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$3(this, result); }; }
|
|
9375
|
-
|
|
9376
|
-
function _possibleConstructorReturn$3(self, call) { if (call && (_typeof$3(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$3(self); }
|
|
9377
|
-
|
|
9378
|
-
function _assertThisInitialized$3(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9379
|
-
|
|
9380
|
-
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9381
|
-
|
|
9382
|
-
function _getPrototypeOf$3(o) { _getPrototypeOf$3 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$3(o); }
|
|
9383
|
-
|
|
9384
|
-
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
9385
|
-
|
|
9386
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9387
|
-
|
|
9388
|
-
function _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9389
|
-
|
|
9390
|
-
// given specifications/props for a slide, fetch all the classes that need to be applied to the slide
|
|
9391
9577
|
var getSlideClasses = function getSlideClasses(spec) {
|
|
9392
9578
|
var slickActive, slickCenter, slickCloned;
|
|
9393
9579
|
var centerOffset, index;
|
|
@@ -9459,7 +9645,7 @@ var getSlideStyle = function getSlideStyle(spec) {
|
|
|
9459
9645
|
};
|
|
9460
9646
|
|
|
9461
9647
|
var getKey = function getKey(child, fallbackKey) {
|
|
9462
|
-
return child.key
|
|
9648
|
+
return child.key + "-" + fallbackKey;
|
|
9463
9649
|
};
|
|
9464
9650
|
|
|
9465
9651
|
var renderSlides = function renderSlides(spec) {
|
|
@@ -9467,13 +9653,10 @@ var renderSlides = function renderSlides(spec) {
|
|
|
9467
9653
|
var slides = [];
|
|
9468
9654
|
var preCloneSlides = [];
|
|
9469
9655
|
var postCloneSlides = [];
|
|
9470
|
-
|
|
9471
|
-
var
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
var endIndex = (0, _innerSliderUtils$3.lazyEndIndex)(spec);
|
|
9475
|
-
|
|
9476
|
-
_react$3["default"].Children.forEach(spec.children, function (elem, index) {
|
|
9656
|
+
var childrenCount = React__default['default'].Children.count(spec.children);
|
|
9657
|
+
var startIndex = lazyStartIndex(spec);
|
|
9658
|
+
var endIndex = lazyEndIndex(spec);
|
|
9659
|
+
React__default['default'].Children.forEach(spec.children, function (elem, index) {
|
|
9477
9660
|
var child;
|
|
9478
9661
|
var childOnClickOptions = {
|
|
9479
9662
|
message: "children",
|
|
@@ -9485,24 +9668,24 @@ var renderSlides = function renderSlides(spec) {
|
|
|
9485
9668
|
if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0) {
|
|
9486
9669
|
child = elem;
|
|
9487
9670
|
} else {
|
|
9488
|
-
child = /*#__PURE__*/
|
|
9671
|
+
child = /*#__PURE__*/React__default['default'].createElement("div", null);
|
|
9489
9672
|
}
|
|
9490
9673
|
|
|
9491
|
-
var childStyle = getSlideStyle(
|
|
9674
|
+
var childStyle = getSlideStyle(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
9492
9675
|
index: index
|
|
9493
9676
|
}));
|
|
9494
9677
|
var slideClass = child.props.className || "";
|
|
9495
|
-
var slideClasses = getSlideClasses(
|
|
9678
|
+
var slideClasses = getSlideClasses(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
9496
9679
|
index: index
|
|
9497
9680
|
})); // push a cloned element of the desired slide
|
|
9498
9681
|
|
|
9499
|
-
slides.push( /*#__PURE__*/
|
|
9682
|
+
slides.push( /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
9500
9683
|
key: "original" + getKey(child, index),
|
|
9501
9684
|
"data-index": index,
|
|
9502
|
-
className: (
|
|
9685
|
+
className: classnames(slideClasses, slideClass),
|
|
9503
9686
|
tabIndex: "-1",
|
|
9504
9687
|
"aria-hidden": !slideClasses["slick-active"],
|
|
9505
|
-
style:
|
|
9688
|
+
style: _objectSpread2(_objectSpread2({
|
|
9506
9689
|
outline: "none"
|
|
9507
9690
|
}, child.props.style || {}), childStyle),
|
|
9508
9691
|
onClick: function onClick(e) {
|
|
@@ -9517,23 +9700,23 @@ var renderSlides = function renderSlides(spec) {
|
|
|
9517
9700
|
if (spec.infinite && spec.fade === false) {
|
|
9518
9701
|
var preCloneNo = childrenCount - index;
|
|
9519
9702
|
|
|
9520
|
-
if (preCloneNo <=
|
|
9703
|
+
if (preCloneNo <= getPreClones(spec) && childrenCount !== spec.slidesToShow) {
|
|
9521
9704
|
key = -preCloneNo;
|
|
9522
9705
|
|
|
9523
9706
|
if (key >= startIndex) {
|
|
9524
9707
|
child = elem;
|
|
9525
9708
|
}
|
|
9526
9709
|
|
|
9527
|
-
slideClasses = getSlideClasses(
|
|
9710
|
+
slideClasses = getSlideClasses(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
9528
9711
|
index: key
|
|
9529
9712
|
}));
|
|
9530
|
-
preCloneSlides.push( /*#__PURE__*/
|
|
9713
|
+
preCloneSlides.push( /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
9531
9714
|
key: "precloned" + getKey(child, key),
|
|
9532
9715
|
"data-index": key,
|
|
9533
9716
|
tabIndex: "-1",
|
|
9534
|
-
className: (
|
|
9717
|
+
className: classnames(slideClasses, slideClass),
|
|
9535
9718
|
"aria-hidden": !slideClasses["slick-active"],
|
|
9536
|
-
style:
|
|
9719
|
+
style: _objectSpread2(_objectSpread2({}, child.props.style || {}), childStyle),
|
|
9537
9720
|
onClick: function onClick(e) {
|
|
9538
9721
|
child.props && child.props.onClick && child.props.onClick(e);
|
|
9539
9722
|
|
|
@@ -9551,16 +9734,16 @@ var renderSlides = function renderSlides(spec) {
|
|
|
9551
9734
|
child = elem;
|
|
9552
9735
|
}
|
|
9553
9736
|
|
|
9554
|
-
slideClasses = getSlideClasses(
|
|
9737
|
+
slideClasses = getSlideClasses(_objectSpread2(_objectSpread2({}, spec), {}, {
|
|
9555
9738
|
index: key
|
|
9556
9739
|
}));
|
|
9557
|
-
postCloneSlides.push( /*#__PURE__*/
|
|
9740
|
+
postCloneSlides.push( /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
9558
9741
|
key: "postcloned" + getKey(child, key),
|
|
9559
9742
|
"data-index": key,
|
|
9560
9743
|
tabIndex: "-1",
|
|
9561
|
-
className: (
|
|
9744
|
+
className: classnames(slideClasses, slideClass),
|
|
9562
9745
|
"aria-hidden": !slideClasses["slick-active"],
|
|
9563
|
-
style:
|
|
9746
|
+
style: _objectSpread2(_objectSpread2({}, child.props.style || {}), childStyle),
|
|
9564
9747
|
onClick: function onClick(e) {
|
|
9565
9748
|
child.props && child.props.onClick && child.props.onClick(e);
|
|
9566
9749
|
|
|
@@ -9581,14 +9764,14 @@ var renderSlides = function renderSlides(spec) {
|
|
|
9581
9764
|
};
|
|
9582
9765
|
|
|
9583
9766
|
var Track = /*#__PURE__*/function (_React$PureComponent) {
|
|
9584
|
-
_inherits
|
|
9767
|
+
_inherits(Track, _React$PureComponent);
|
|
9585
9768
|
|
|
9586
|
-
var _super = _createSuper
|
|
9769
|
+
var _super = _createSuper(Track);
|
|
9587
9770
|
|
|
9588
9771
|
function Track() {
|
|
9589
9772
|
var _this;
|
|
9590
9773
|
|
|
9591
|
-
_classCallCheck
|
|
9774
|
+
_classCallCheck(this, Track);
|
|
9592
9775
|
|
|
9593
9776
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9594
9777
|
args[_key] = arguments[_key];
|
|
@@ -9596,83 +9779,38 @@ var Track = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
9596
9779
|
|
|
9597
9780
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
9598
9781
|
|
|
9599
|
-
_defineProperty
|
|
9782
|
+
_defineProperty(_assertThisInitialized(_this), "node", null);
|
|
9600
9783
|
|
|
9601
|
-
_defineProperty
|
|
9784
|
+
_defineProperty(_assertThisInitialized(_this), "handleRef", function (ref) {
|
|
9602
9785
|
_this.node = ref;
|
|
9603
9786
|
});
|
|
9604
9787
|
|
|
9605
9788
|
return _this;
|
|
9606
9789
|
}
|
|
9607
9790
|
|
|
9608
|
-
_createClass
|
|
9791
|
+
_createClass(Track, [{
|
|
9609
9792
|
key: "render",
|
|
9610
|
-
value: function render() {
|
|
9611
|
-
var slides = renderSlides(this.props);
|
|
9612
|
-
var _this$props = this.props,
|
|
9613
|
-
onMouseEnter = _this$props.onMouseEnter,
|
|
9614
|
-
onMouseOver = _this$props.onMouseOver,
|
|
9615
|
-
onMouseLeave = _this$props.onMouseLeave;
|
|
9616
|
-
var mouseEvents = {
|
|
9617
|
-
onMouseEnter: onMouseEnter,
|
|
9618
|
-
onMouseOver: onMouseOver,
|
|
9619
|
-
onMouseLeave: onMouseLeave
|
|
9620
|
-
};
|
|
9621
|
-
return /*#__PURE__*/
|
|
9622
|
-
ref: this.handleRef,
|
|
9623
|
-
className: "slick-track",
|
|
9624
|
-
style: this.props.trackStyle
|
|
9625
|
-
}, mouseEvents), slides);
|
|
9626
|
-
}
|
|
9627
|
-
}]);
|
|
9628
|
-
|
|
9629
|
-
return Track;
|
|
9630
|
-
}(_react$3["default"].PureComponent);
|
|
9631
|
-
|
|
9632
|
-
track.Track = Track;
|
|
9633
|
-
|
|
9634
|
-
var dots = {};
|
|
9635
|
-
|
|
9636
|
-
Object.defineProperty(dots, "__esModule", {
|
|
9637
|
-
value: true
|
|
9638
|
-
});
|
|
9639
|
-
dots.Dots = void 0;
|
|
9640
|
-
|
|
9641
|
-
var _react$2 = _interopRequireDefault$2(React__default['default']);
|
|
9642
|
-
|
|
9643
|
-
var _classnames$2 = _interopRequireDefault$2(classnames.exports);
|
|
9644
|
-
|
|
9645
|
-
var _innerSliderUtils$2 = innerSliderUtils;
|
|
9646
|
-
|
|
9647
|
-
function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9648
|
-
|
|
9649
|
-
function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
|
|
9650
|
-
|
|
9651
|
-
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
9652
|
-
|
|
9653
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9654
|
-
|
|
9655
|
-
function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9656
|
-
|
|
9657
|
-
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9658
|
-
|
|
9659
|
-
function _defineProperties$2(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
9660
|
-
|
|
9661
|
-
function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); return Constructor; }
|
|
9662
|
-
|
|
9663
|
-
function _inherits$2(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }
|
|
9664
|
-
|
|
9665
|
-
function _setPrototypeOf$2(o, p) { _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$2(o, p); }
|
|
9666
|
-
|
|
9667
|
-
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf$2(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$2(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$2(this, result); }; }
|
|
9668
|
-
|
|
9669
|
-
function _possibleConstructorReturn$2(self, call) { if (call && (_typeof$2(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$2(self); }
|
|
9670
|
-
|
|
9671
|
-
function _assertThisInitialized$2(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9672
|
-
|
|
9673
|
-
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9793
|
+
value: function render() {
|
|
9794
|
+
var slides = renderSlides(this.props);
|
|
9795
|
+
var _this$props = this.props,
|
|
9796
|
+
onMouseEnter = _this$props.onMouseEnter,
|
|
9797
|
+
onMouseOver = _this$props.onMouseOver,
|
|
9798
|
+
onMouseLeave = _this$props.onMouseLeave;
|
|
9799
|
+
var mouseEvents = {
|
|
9800
|
+
onMouseEnter: onMouseEnter,
|
|
9801
|
+
onMouseOver: onMouseOver,
|
|
9802
|
+
onMouseLeave: onMouseLeave
|
|
9803
|
+
};
|
|
9804
|
+
return /*#__PURE__*/React__default['default'].createElement("div", _extends$1({
|
|
9805
|
+
ref: this.handleRef,
|
|
9806
|
+
className: "slick-track",
|
|
9807
|
+
style: this.props.trackStyle
|
|
9808
|
+
}, mouseEvents), slides);
|
|
9809
|
+
}
|
|
9810
|
+
}]);
|
|
9674
9811
|
|
|
9675
|
-
|
|
9812
|
+
return Track;
|
|
9813
|
+
}(React__default['default'].PureComponent);
|
|
9676
9814
|
|
|
9677
9815
|
var getDotCount = function getDotCount(spec) {
|
|
9678
9816
|
var dots;
|
|
@@ -9687,17 +9825,17 @@ var getDotCount = function getDotCount(spec) {
|
|
|
9687
9825
|
};
|
|
9688
9826
|
|
|
9689
9827
|
var Dots = /*#__PURE__*/function (_React$PureComponent) {
|
|
9690
|
-
_inherits
|
|
9828
|
+
_inherits(Dots, _React$PureComponent);
|
|
9691
9829
|
|
|
9692
|
-
var _super = _createSuper
|
|
9830
|
+
var _super = _createSuper(Dots);
|
|
9693
9831
|
|
|
9694
9832
|
function Dots() {
|
|
9695
|
-
_classCallCheck
|
|
9833
|
+
_classCallCheck(this, Dots);
|
|
9696
9834
|
|
|
9697
9835
|
return _super.apply(this, arguments);
|
|
9698
9836
|
}
|
|
9699
9837
|
|
|
9700
|
-
_createClass
|
|
9838
|
+
_createClass(Dots, [{
|
|
9701
9839
|
key: "clickHandler",
|
|
9702
9840
|
value: function clickHandler(options, e) {
|
|
9703
9841
|
// In Autoplay the focus stays on clicked button even after transition
|
|
@@ -9733,12 +9871,12 @@ var Dots = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
9733
9871
|
for (var i = 0; i < dotCount; i++) {
|
|
9734
9872
|
var _rightBound = (i + 1) * slidesToScroll - 1;
|
|
9735
9873
|
|
|
9736
|
-
var rightBound = infinite ? _rightBound :
|
|
9874
|
+
var rightBound = infinite ? _rightBound : clamp(_rightBound, 0, slideCount - 1);
|
|
9737
9875
|
|
|
9738
9876
|
var _leftBound = rightBound - (slidesToScroll - 1);
|
|
9739
9877
|
|
|
9740
|
-
var leftBound = infinite ? _leftBound :
|
|
9741
|
-
var className = (
|
|
9878
|
+
var leftBound = infinite ? _leftBound : clamp(_leftBound, 0, slideCount - 1);
|
|
9879
|
+
var className = classnames({
|
|
9742
9880
|
"slick-active": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound
|
|
9743
9881
|
});
|
|
9744
9882
|
var dotOptions = {
|
|
@@ -9748,82 +9886,35 @@ var Dots = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
9748
9886
|
currentSlide: currentSlide
|
|
9749
9887
|
};
|
|
9750
9888
|
var onClick = this.clickHandler.bind(this, dotOptions);
|
|
9751
|
-
dots = dots.concat( /*#__PURE__*/
|
|
9889
|
+
dots = dots.concat( /*#__PURE__*/React__default['default'].createElement("li", {
|
|
9752
9890
|
key: i,
|
|
9753
9891
|
className: className
|
|
9754
|
-
}, /*#__PURE__*/
|
|
9892
|
+
}, /*#__PURE__*/React__default['default'].cloneElement(this.props.customPaging(i), {
|
|
9755
9893
|
onClick: onClick
|
|
9756
9894
|
})));
|
|
9757
9895
|
}
|
|
9758
9896
|
|
|
9759
|
-
return /*#__PURE__*/
|
|
9897
|
+
return /*#__PURE__*/React__default['default'].cloneElement(this.props.appendDots(dots), _objectSpread2({
|
|
9760
9898
|
className: this.props.dotsClass
|
|
9761
9899
|
}, mouseEvents));
|
|
9762
9900
|
}
|
|
9763
9901
|
}]);
|
|
9764
9902
|
|
|
9765
9903
|
return Dots;
|
|
9766
|
-
}(
|
|
9767
|
-
|
|
9768
|
-
dots.Dots = Dots;
|
|
9769
|
-
|
|
9770
|
-
var arrows = {};
|
|
9771
|
-
|
|
9772
|
-
Object.defineProperty(arrows, "__esModule", {
|
|
9773
|
-
value: true
|
|
9774
|
-
});
|
|
9775
|
-
arrows.NextArrow = arrows.PrevArrow = void 0;
|
|
9776
|
-
|
|
9777
|
-
var _react$1 = _interopRequireDefault$1(React__default['default']);
|
|
9778
|
-
|
|
9779
|
-
var _classnames$1 = _interopRequireDefault$1(classnames.exports);
|
|
9780
|
-
|
|
9781
|
-
var _innerSliderUtils$1 = innerSliderUtils;
|
|
9782
|
-
|
|
9783
|
-
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9784
|
-
|
|
9785
|
-
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
9786
|
-
|
|
9787
|
-
function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
9788
|
-
|
|
9789
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
9790
|
-
|
|
9791
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9792
|
-
|
|
9793
|
-
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9794
|
-
|
|
9795
|
-
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9796
|
-
|
|
9797
|
-
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
9798
|
-
|
|
9799
|
-
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
9800
|
-
|
|
9801
|
-
function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
|
|
9802
|
-
|
|
9803
|
-
function _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }
|
|
9804
|
-
|
|
9805
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf$1(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$1(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$1(this, result); }; }
|
|
9806
|
-
|
|
9807
|
-
function _possibleConstructorReturn$1(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$1(self); }
|
|
9808
|
-
|
|
9809
|
-
function _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9810
|
-
|
|
9811
|
-
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9812
|
-
|
|
9813
|
-
function _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }
|
|
9904
|
+
}(React__default['default'].PureComponent);
|
|
9814
9905
|
|
|
9815
9906
|
var PrevArrow = /*#__PURE__*/function (_React$PureComponent) {
|
|
9816
|
-
_inherits
|
|
9907
|
+
_inherits(PrevArrow, _React$PureComponent);
|
|
9817
9908
|
|
|
9818
|
-
var _super = _createSuper
|
|
9909
|
+
var _super = _createSuper(PrevArrow);
|
|
9819
9910
|
|
|
9820
9911
|
function PrevArrow() {
|
|
9821
|
-
_classCallCheck
|
|
9912
|
+
_classCallCheck(this, PrevArrow);
|
|
9822
9913
|
|
|
9823
9914
|
return _super.apply(this, arguments);
|
|
9824
9915
|
}
|
|
9825
9916
|
|
|
9826
|
-
_createClass
|
|
9917
|
+
_createClass(PrevArrow, [{
|
|
9827
9918
|
key: "clickHandler",
|
|
9828
9919
|
value: function clickHandler(options, e) {
|
|
9829
9920
|
if (e) {
|
|
@@ -9851,7 +9942,7 @@ var PrevArrow = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
9851
9942
|
var prevArrowProps = {
|
|
9852
9943
|
key: "0",
|
|
9853
9944
|
"data-role": "none",
|
|
9854
|
-
className: (
|
|
9945
|
+
className: classnames(prevClasses),
|
|
9855
9946
|
style: {
|
|
9856
9947
|
display: "block"
|
|
9857
9948
|
},
|
|
@@ -9864,9 +9955,9 @@ var PrevArrow = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
9864
9955
|
var prevArrow;
|
|
9865
9956
|
|
|
9866
9957
|
if (this.props.prevArrow) {
|
|
9867
|
-
prevArrow = /*#__PURE__*/
|
|
9958
|
+
prevArrow = /*#__PURE__*/React__default['default'].cloneElement(this.props.prevArrow, _objectSpread2(_objectSpread2({}, prevArrowProps), customProps));
|
|
9868
9959
|
} else {
|
|
9869
|
-
prevArrow = /*#__PURE__*/
|
|
9960
|
+
prevArrow = /*#__PURE__*/React__default['default'].createElement("button", _extends$1({
|
|
9870
9961
|
key: "0",
|
|
9871
9962
|
type: "button"
|
|
9872
9963
|
}, prevArrowProps), " ", "Previous");
|
|
@@ -9877,22 +9968,19 @@ var PrevArrow = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
9877
9968
|
}]);
|
|
9878
9969
|
|
|
9879
9970
|
return PrevArrow;
|
|
9880
|
-
}(
|
|
9881
|
-
|
|
9882
|
-
arrows.PrevArrow = PrevArrow;
|
|
9883
|
-
|
|
9971
|
+
}(React__default['default'].PureComponent);
|
|
9884
9972
|
var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {
|
|
9885
|
-
_inherits
|
|
9973
|
+
_inherits(NextArrow, _React$PureComponent2);
|
|
9886
9974
|
|
|
9887
|
-
var _super2 = _createSuper
|
|
9975
|
+
var _super2 = _createSuper(NextArrow);
|
|
9888
9976
|
|
|
9889
9977
|
function NextArrow() {
|
|
9890
|
-
_classCallCheck
|
|
9978
|
+
_classCallCheck(this, NextArrow);
|
|
9891
9979
|
|
|
9892
9980
|
return _super2.apply(this, arguments);
|
|
9893
9981
|
}
|
|
9894
9982
|
|
|
9895
|
-
_createClass
|
|
9983
|
+
_createClass(NextArrow, [{
|
|
9896
9984
|
key: "clickHandler",
|
|
9897
9985
|
value: function clickHandler(options, e) {
|
|
9898
9986
|
if (e) {
|
|
@@ -9912,7 +10000,7 @@ var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
9912
10000
|
message: "next"
|
|
9913
10001
|
});
|
|
9914
10002
|
|
|
9915
|
-
if (!
|
|
10003
|
+
if (!canGoNext(this.props)) {
|
|
9916
10004
|
nextClasses["slick-disabled"] = true;
|
|
9917
10005
|
nextHandler = null;
|
|
9918
10006
|
}
|
|
@@ -9920,7 +10008,7 @@ var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
9920
10008
|
var nextArrowProps = {
|
|
9921
10009
|
key: "1",
|
|
9922
10010
|
"data-role": "none",
|
|
9923
|
-
className: (
|
|
10011
|
+
className: classnames(nextClasses),
|
|
9924
10012
|
style: {
|
|
9925
10013
|
display: "block"
|
|
9926
10014
|
},
|
|
@@ -9933,9 +10021,9 @@ var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
9933
10021
|
var nextArrow;
|
|
9934
10022
|
|
|
9935
10023
|
if (this.props.nextArrow) {
|
|
9936
|
-
nextArrow = /*#__PURE__*/
|
|
10024
|
+
nextArrow = /*#__PURE__*/React__default['default'].cloneElement(this.props.nextArrow, _objectSpread2(_objectSpread2({}, nextArrowProps), customProps));
|
|
9937
10025
|
} else {
|
|
9938
|
-
nextArrow = /*#__PURE__*/
|
|
10026
|
+
nextArrow = /*#__PURE__*/React__default['default'].createElement("button", _extends$1({
|
|
9939
10027
|
key: "1",
|
|
9940
10028
|
type: "button"
|
|
9941
10029
|
}, nextArrowProps), " ", "Next");
|
|
@@ -9946,9 +10034,7 @@ var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
9946
10034
|
}]);
|
|
9947
10035
|
|
|
9948
10036
|
return NextArrow;
|
|
9949
|
-
}(
|
|
9950
|
-
|
|
9951
|
-
arrows.NextArrow = NextArrow;
|
|
10037
|
+
}(React__default['default'].PureComponent);
|
|
9952
10038
|
|
|
9953
10039
|
/**
|
|
9954
10040
|
* A collection of shims that provide minimal functionality of the ES6 collections.
|
|
@@ -10877,72 +10963,6 @@ var index$1 = (function () {
|
|
|
10877
10963
|
return ResizeObserver;
|
|
10878
10964
|
})();
|
|
10879
10965
|
|
|
10880
|
-
var ResizeObserver_es = /*#__PURE__*/Object.freeze({
|
|
10881
|
-
__proto__: null,
|
|
10882
|
-
'default': index$1
|
|
10883
|
-
});
|
|
10884
|
-
|
|
10885
|
-
var require$$8 = /*@__PURE__*/getAugmentedNamespace(ResizeObserver_es);
|
|
10886
|
-
|
|
10887
|
-
Object.defineProperty(innerSlider, "__esModule", {
|
|
10888
|
-
value: true
|
|
10889
|
-
});
|
|
10890
|
-
innerSlider.InnerSlider = void 0;
|
|
10891
|
-
|
|
10892
|
-
var _react = _interopRequireDefault(React__default['default']);
|
|
10893
|
-
|
|
10894
|
-
var _initialState = _interopRequireDefault(initialState);
|
|
10895
|
-
|
|
10896
|
-
var _lodash = _interopRequireDefault(lodash_debounce);
|
|
10897
|
-
|
|
10898
|
-
var _classnames = _interopRequireDefault(classnames.exports);
|
|
10899
|
-
|
|
10900
|
-
var _innerSliderUtils = innerSliderUtils;
|
|
10901
|
-
|
|
10902
|
-
var _track = track;
|
|
10903
|
-
|
|
10904
|
-
var _dots = dots;
|
|
10905
|
-
|
|
10906
|
-
var _arrows = arrows;
|
|
10907
|
-
|
|
10908
|
-
var _resizeObserverPolyfill = _interopRequireDefault(require$$8);
|
|
10909
|
-
|
|
10910
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10911
|
-
|
|
10912
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
10913
|
-
|
|
10914
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10915
|
-
|
|
10916
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10917
|
-
|
|
10918
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10919
|
-
|
|
10920
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
10921
|
-
|
|
10922
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
10923
|
-
|
|
10924
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10925
|
-
|
|
10926
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
10927
|
-
|
|
10928
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10929
|
-
|
|
10930
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10931
|
-
|
|
10932
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10933
|
-
|
|
10934
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10935
|
-
|
|
10936
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10937
|
-
|
|
10938
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10939
|
-
|
|
10940
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10941
|
-
|
|
10942
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10943
|
-
|
|
10944
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10945
|
-
|
|
10946
10966
|
var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
10947
10967
|
_inherits(InnerSlider, _React$Component);
|
|
10948
10968
|
|
|
@@ -10967,7 +10987,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
10967
10987
|
if (_this.props.adaptiveHeight && _this.list) {
|
|
10968
10988
|
var elem = _this.list.querySelector("[data-index=\"".concat(_this.state.currentSlide, "\"]"));
|
|
10969
10989
|
|
|
10970
|
-
_this.list.style.height =
|
|
10990
|
+
_this.list.style.height = getHeight(elem) + "px";
|
|
10971
10991
|
}
|
|
10972
10992
|
});
|
|
10973
10993
|
|
|
@@ -10975,7 +10995,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
10975
10995
|
_this.props.onInit && _this.props.onInit();
|
|
10976
10996
|
|
|
10977
10997
|
if (_this.props.lazyLoad) {
|
|
10978
|
-
var slidesToLoad =
|
|
10998
|
+
var slidesToLoad = getOnDemandLazySlides(_objectSpread2(_objectSpread2({}, _this.props), _this.state));
|
|
10979
10999
|
|
|
10980
11000
|
if (slidesToLoad.length > 0) {
|
|
10981
11001
|
_this.setState(function (prevState) {
|
|
@@ -10990,7 +11010,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
10990
11010
|
}
|
|
10991
11011
|
}
|
|
10992
11012
|
|
|
10993
|
-
var spec =
|
|
11013
|
+
var spec = _objectSpread2({
|
|
10994
11014
|
listRef: _this.list,
|
|
10995
11015
|
trackRef: _this.track
|
|
10996
11016
|
}, _this.props);
|
|
@@ -10998,14 +11018,14 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
10998
11018
|
_this.updateState(spec, true, function () {
|
|
10999
11019
|
_this.adaptHeight();
|
|
11000
11020
|
|
|
11001
|
-
_this.props.autoplay && _this.autoPlay("
|
|
11021
|
+
_this.props.autoplay && _this.autoPlay("playing");
|
|
11002
11022
|
});
|
|
11003
11023
|
|
|
11004
11024
|
if (_this.props.lazyLoad === "progressive") {
|
|
11005
11025
|
_this.lazyLoadTimer = setInterval(_this.progressiveLazyLoad, 1000);
|
|
11006
11026
|
}
|
|
11007
11027
|
|
|
11008
|
-
_this.ro = new
|
|
11028
|
+
_this.ro = new index$1(function () {
|
|
11009
11029
|
if (_this.state.animating) {
|
|
11010
11030
|
_this.onWindowResized(false); // don't set trackStyle hence don't break animation
|
|
11011
11031
|
|
|
@@ -11068,7 +11088,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11068
11088
|
_this.props.onReInit && _this.props.onReInit();
|
|
11069
11089
|
|
|
11070
11090
|
if (_this.props.lazyLoad) {
|
|
11071
|
-
var slidesToLoad =
|
|
11091
|
+
var slidesToLoad = getOnDemandLazySlides(_objectSpread2(_objectSpread2({}, _this.props), _this.state));
|
|
11072
11092
|
|
|
11073
11093
|
if (slidesToLoad.length > 0) {
|
|
11074
11094
|
_this.setState(function (prevState) {
|
|
@@ -11088,7 +11108,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11088
11108
|
|
|
11089
11109
|
_this.adaptHeight();
|
|
11090
11110
|
|
|
11091
|
-
var spec =
|
|
11111
|
+
var spec = _objectSpread2(_objectSpread2({
|
|
11092
11112
|
listRef: _this.list,
|
|
11093
11113
|
trackRef: _this.track
|
|
11094
11114
|
}, _this.props), _this.state);
|
|
@@ -11096,25 +11116,29 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11096
11116
|
var setTrackStyle = _this.didPropsChange(prevProps);
|
|
11097
11117
|
|
|
11098
11118
|
setTrackStyle && _this.updateState(spec, setTrackStyle, function () {
|
|
11099
|
-
if (_this.state.currentSlide >=
|
|
11119
|
+
if (_this.state.currentSlide >= React__default['default'].Children.count(_this.props.children)) {
|
|
11100
11120
|
_this.changeSlide({
|
|
11101
11121
|
message: "index",
|
|
11102
|
-
index:
|
|
11122
|
+
index: React__default['default'].Children.count(_this.props.children) - _this.props.slidesToShow,
|
|
11103
11123
|
currentSlide: _this.state.currentSlide
|
|
11104
11124
|
});
|
|
11105
11125
|
}
|
|
11106
11126
|
|
|
11107
|
-
if (_this.props.autoplay) {
|
|
11108
|
-
_this.
|
|
11109
|
-
|
|
11110
|
-
_this.
|
|
11127
|
+
if (prevProps.autoplay !== _this.props.autoplay || prevProps.autoplaySpeed !== _this.props.autoplaySpeed) {
|
|
11128
|
+
if (!prevProps.autoplay && _this.props.autoplay) {
|
|
11129
|
+
_this.autoPlay("playing");
|
|
11130
|
+
} else if (_this.props.autoplay) {
|
|
11131
|
+
_this.autoPlay("update");
|
|
11132
|
+
} else {
|
|
11133
|
+
_this.pause("paused");
|
|
11134
|
+
}
|
|
11111
11135
|
}
|
|
11112
11136
|
});
|
|
11113
11137
|
});
|
|
11114
11138
|
|
|
11115
11139
|
_defineProperty(_assertThisInitialized(_this), "onWindowResized", function (setTrackStyle) {
|
|
11116
11140
|
if (_this.debouncedResize) _this.debouncedResize.cancel();
|
|
11117
|
-
_this.debouncedResize = (
|
|
11141
|
+
_this.debouncedResize = debounce_1(function () {
|
|
11118
11142
|
return _this.resizeWindow(setTrackStyle);
|
|
11119
11143
|
}, 50);
|
|
11120
11144
|
|
|
@@ -11127,7 +11151,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11127
11151
|
|
|
11128
11152
|
if (!isTrackMounted) return;
|
|
11129
11153
|
|
|
11130
|
-
var spec =
|
|
11154
|
+
var spec = _objectSpread2(_objectSpread2({
|
|
11131
11155
|
listRef: _this.list,
|
|
11132
11156
|
trackRef: _this.track
|
|
11133
11157
|
}, _this.props), _this.state);
|
|
@@ -11146,17 +11170,17 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11146
11170
|
});
|
|
11147
11171
|
|
|
11148
11172
|
_defineProperty(_assertThisInitialized(_this), "updateState", function (spec, setTrackStyle, callback) {
|
|
11149
|
-
var updatedState =
|
|
11150
|
-
spec =
|
|
11173
|
+
var updatedState = initializedState(spec);
|
|
11174
|
+
spec = _objectSpread2(_objectSpread2(_objectSpread2({}, spec), updatedState), {}, {
|
|
11151
11175
|
slideIndex: updatedState.currentSlide
|
|
11152
11176
|
});
|
|
11153
|
-
var targetLeft =
|
|
11154
|
-
spec =
|
|
11177
|
+
var targetLeft = getTrackLeft(spec);
|
|
11178
|
+
spec = _objectSpread2(_objectSpread2({}, spec), {}, {
|
|
11155
11179
|
left: targetLeft
|
|
11156
11180
|
});
|
|
11157
|
-
var trackStyle =
|
|
11181
|
+
var trackStyle = getTrackCSS(spec);
|
|
11158
11182
|
|
|
11159
|
-
if (setTrackStyle ||
|
|
11183
|
+
if (setTrackStyle || React__default['default'].Children.count(_this.props.children) !== React__default['default'].Children.count(spec.children)) {
|
|
11160
11184
|
updatedState["trackStyle"] = trackStyle;
|
|
11161
11185
|
}
|
|
11162
11186
|
|
|
@@ -11168,10 +11192,10 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11168
11192
|
var _trackWidth = 0,
|
|
11169
11193
|
_trackLeft = 0;
|
|
11170
11194
|
var childrenWidths = [];
|
|
11171
|
-
var preClones =
|
|
11195
|
+
var preClones = getPreClones(_objectSpread2(_objectSpread2(_objectSpread2({}, _this.props), _this.state), {}, {
|
|
11172
11196
|
slideCount: _this.props.children.length
|
|
11173
11197
|
}));
|
|
11174
|
-
var postClones =
|
|
11198
|
+
var postClones = getPostClones(_objectSpread2(_objectSpread2(_objectSpread2({}, _this.props), _this.state), {}, {
|
|
11175
11199
|
slideCount: _this.props.children.length
|
|
11176
11200
|
}));
|
|
11177
11201
|
|
|
@@ -11208,16 +11232,16 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11208
11232
|
};
|
|
11209
11233
|
}
|
|
11210
11234
|
|
|
11211
|
-
var childrenCount =
|
|
11235
|
+
var childrenCount = React__default['default'].Children.count(_this.props.children);
|
|
11212
11236
|
|
|
11213
|
-
var spec =
|
|
11237
|
+
var spec = _objectSpread2(_objectSpread2(_objectSpread2({}, _this.props), _this.state), {}, {
|
|
11214
11238
|
slideCount: childrenCount
|
|
11215
11239
|
});
|
|
11216
11240
|
|
|
11217
|
-
var slideCount =
|
|
11241
|
+
var slideCount = getPreClones(spec) + getPostClones(spec) + childrenCount;
|
|
11218
11242
|
var trackWidth = 100 / _this.props.slidesToShow * slideCount;
|
|
11219
11243
|
var slideWidth = 100 / slideCount;
|
|
11220
|
-
var trackLeft = -slideWidth * (
|
|
11244
|
+
var trackLeft = -slideWidth * (getPreClones(spec) + _this.state.currentSlide) * trackWidth / 100;
|
|
11221
11245
|
|
|
11222
11246
|
if (_this.props.centerMode) {
|
|
11223
11247
|
trackLeft += (100 - slideWidth * trackWidth / 100) / 2;
|
|
@@ -11277,16 +11301,16 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11277
11301
|
_defineProperty(_assertThisInitialized(_this), "progressiveLazyLoad", function () {
|
|
11278
11302
|
var slidesToLoad = [];
|
|
11279
11303
|
|
|
11280
|
-
var spec =
|
|
11304
|
+
var spec = _objectSpread2(_objectSpread2({}, _this.props), _this.state);
|
|
11281
11305
|
|
|
11282
|
-
for (var index = _this.state.currentSlide; index < _this.state.slideCount +
|
|
11306
|
+
for (var index = _this.state.currentSlide; index < _this.state.slideCount + getPostClones(spec); index++) {
|
|
11283
11307
|
if (_this.state.lazyLoadedList.indexOf(index) < 0) {
|
|
11284
11308
|
slidesToLoad.push(index);
|
|
11285
11309
|
break;
|
|
11286
11310
|
}
|
|
11287
11311
|
}
|
|
11288
11312
|
|
|
11289
|
-
for (var _index = _this.state.currentSlide - 1; _index >= -
|
|
11313
|
+
for (var _index = _this.state.currentSlide - 1; _index >= -getPreClones(spec); _index--) {
|
|
11290
11314
|
if (_this.state.lazyLoadedList.indexOf(_index) < 0) {
|
|
11291
11315
|
slidesToLoad.push(_index);
|
|
11292
11316
|
break;
|
|
@@ -11322,7 +11346,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11322
11346
|
|
|
11323
11347
|
var currentSlide = _this.state.currentSlide;
|
|
11324
11348
|
|
|
11325
|
-
var _slideHandler =
|
|
11349
|
+
var _slideHandler = slideHandler(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
11326
11350
|
index: index
|
|
11327
11351
|
}, _this.props), _this.state), {}, {
|
|
11328
11352
|
trackRef: _this.track,
|
|
@@ -11373,9 +11397,9 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11373
11397
|
_defineProperty(_assertThisInitialized(_this), "changeSlide", function (options) {
|
|
11374
11398
|
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
11375
11399
|
|
|
11376
|
-
var spec =
|
|
11400
|
+
var spec = _objectSpread2(_objectSpread2({}, _this.props), _this.state);
|
|
11377
11401
|
|
|
11378
|
-
var targetSlide =
|
|
11402
|
+
var targetSlide = changeSlide(spec, options);
|
|
11379
11403
|
if (targetSlide !== 0 && !targetSlide) return;
|
|
11380
11404
|
|
|
11381
11405
|
if (dontAnimate === true) {
|
|
@@ -11403,7 +11427,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11403
11427
|
});
|
|
11404
11428
|
|
|
11405
11429
|
_defineProperty(_assertThisInitialized(_this), "keyHandler", function (e) {
|
|
11406
|
-
var dir =
|
|
11430
|
+
var dir = keyHandler(e, _this.props.accessibility, _this.props.rtl);
|
|
11407
11431
|
dir !== "" && _this.changeSlide({
|
|
11408
11432
|
message: dir
|
|
11409
11433
|
});
|
|
@@ -11432,12 +11456,12 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11432
11456
|
_this.disableBodyScroll();
|
|
11433
11457
|
}
|
|
11434
11458
|
|
|
11435
|
-
var state =
|
|
11459
|
+
var state = swipeStart(e, _this.props.swipe, _this.props.draggable);
|
|
11436
11460
|
state !== "" && _this.setState(state);
|
|
11437
11461
|
});
|
|
11438
11462
|
|
|
11439
11463
|
_defineProperty(_assertThisInitialized(_this), "swipeMove", function (e) {
|
|
11440
|
-
var state =
|
|
11464
|
+
var state = swipeMove(e, _objectSpread2(_objectSpread2(_objectSpread2({}, _this.props), _this.state), {}, {
|
|
11441
11465
|
trackRef: _this.track,
|
|
11442
11466
|
listRef: _this.list,
|
|
11443
11467
|
slideIndex: _this.state.currentSlide
|
|
@@ -11452,7 +11476,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11452
11476
|
});
|
|
11453
11477
|
|
|
11454
11478
|
_defineProperty(_assertThisInitialized(_this), "swipeEnd", function (e) {
|
|
11455
|
-
var state =
|
|
11479
|
+
var state = swipeEnd(e, _objectSpread2(_objectSpread2(_objectSpread2({}, _this.props), _this.state), {}, {
|
|
11456
11480
|
trackRef: _this.track,
|
|
11457
11481
|
listRef: _this.list,
|
|
11458
11482
|
slideIndex: _this.state.currentSlide
|
|
@@ -11517,7 +11541,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11517
11541
|
if (_this.props.rtl) {
|
|
11518
11542
|
nextIndex = _this.state.currentSlide - _this.props.slidesToScroll;
|
|
11519
11543
|
} else {
|
|
11520
|
-
if (
|
|
11544
|
+
if (canGoNext(_objectSpread2(_objectSpread2({}, _this.props), _this.state))) {
|
|
11521
11545
|
nextIndex = _this.state.currentSlide + _this.props.slidesToScroll;
|
|
11522
11546
|
} else {
|
|
11523
11547
|
return false;
|
|
@@ -11608,16 +11632,16 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11608
11632
|
});
|
|
11609
11633
|
|
|
11610
11634
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
11611
|
-
var className = (
|
|
11635
|
+
var className = classnames("slick-slider", _this.props.className, {
|
|
11612
11636
|
"slick-vertical": _this.props.vertical,
|
|
11613
11637
|
"slick-initialized": true
|
|
11614
11638
|
});
|
|
11615
11639
|
|
|
11616
|
-
var spec =
|
|
11640
|
+
var spec = _objectSpread2(_objectSpread2({}, _this.props), _this.state);
|
|
11617
11641
|
|
|
11618
|
-
var trackProps =
|
|
11642
|
+
var trackProps = extractObject(spec, ["fade", "cssEase", "speed", "infinite", "centerMode", "focusOnSelect", "currentSlide", "lazyLoad", "lazyLoadedList", "rtl", "slideWidth", "slideHeight", "listHeight", "vertical", "slidesToShow", "slidesToScroll", "slideCount", "trackStyle", "variableWidth", "unslick", "centerPadding", "targetSlide", "useCSS"]);
|
|
11619
11643
|
var pauseOnHover = _this.props.pauseOnHover;
|
|
11620
|
-
trackProps =
|
|
11644
|
+
trackProps = _objectSpread2(_objectSpread2({}, trackProps), {}, {
|
|
11621
11645
|
onMouseEnter: pauseOnHover ? _this.onTrackOver : null,
|
|
11622
11646
|
onMouseLeave: pauseOnHover ? _this.onTrackLeave : null,
|
|
11623
11647
|
onMouseOver: pauseOnHover ? _this.onTrackOver : null,
|
|
@@ -11626,24 +11650,24 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11626
11650
|
var dots;
|
|
11627
11651
|
|
|
11628
11652
|
if (_this.props.dots === true && _this.state.slideCount >= _this.props.slidesToShow) {
|
|
11629
|
-
var dotProps =
|
|
11653
|
+
var dotProps = extractObject(spec, ["dotsClass", "slideCount", "slidesToShow", "currentSlide", "slidesToScroll", "clickHandler", "children", "customPaging", "infinite", "appendDots"]);
|
|
11630
11654
|
var pauseOnDotsHover = _this.props.pauseOnDotsHover;
|
|
11631
|
-
dotProps =
|
|
11655
|
+
dotProps = _objectSpread2(_objectSpread2({}, dotProps), {}, {
|
|
11632
11656
|
clickHandler: _this.changeSlide,
|
|
11633
11657
|
onMouseEnter: pauseOnDotsHover ? _this.onDotsLeave : null,
|
|
11634
11658
|
onMouseOver: pauseOnDotsHover ? _this.onDotsOver : null,
|
|
11635
11659
|
onMouseLeave: pauseOnDotsHover ? _this.onDotsLeave : null
|
|
11636
11660
|
});
|
|
11637
|
-
dots = /*#__PURE__*/
|
|
11661
|
+
dots = /*#__PURE__*/React__default['default'].createElement(Dots, dotProps);
|
|
11638
11662
|
}
|
|
11639
11663
|
|
|
11640
11664
|
var prevArrow, nextArrow;
|
|
11641
|
-
var arrowProps =
|
|
11665
|
+
var arrowProps = extractObject(spec, ["infinite", "centerMode", "currentSlide", "slideCount", "slidesToShow", "prevArrow", "nextArrow"]);
|
|
11642
11666
|
arrowProps.clickHandler = _this.changeSlide;
|
|
11643
11667
|
|
|
11644
11668
|
if (_this.props.arrows) {
|
|
11645
|
-
prevArrow = /*#__PURE__*/
|
|
11646
|
-
nextArrow = /*#__PURE__*/
|
|
11669
|
+
prevArrow = /*#__PURE__*/React__default['default'].createElement(PrevArrow, arrowProps);
|
|
11670
|
+
nextArrow = /*#__PURE__*/React__default['default'].createElement(NextArrow, arrowProps);
|
|
11647
11671
|
}
|
|
11648
11672
|
|
|
11649
11673
|
var verticalHeightStyle = null;
|
|
@@ -11670,7 +11694,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11670
11694
|
}
|
|
11671
11695
|
}
|
|
11672
11696
|
|
|
11673
|
-
var listStyle =
|
|
11697
|
+
var listStyle = _objectSpread2(_objectSpread2({}, verticalHeightStyle), centerPaddingStyle);
|
|
11674
11698
|
|
|
11675
11699
|
var touchMove = _this.props.touchMove;
|
|
11676
11700
|
var listProps = {
|
|
@@ -11702,18 +11726,18 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11702
11726
|
};
|
|
11703
11727
|
}
|
|
11704
11728
|
|
|
11705
|
-
return /*#__PURE__*/
|
|
11729
|
+
return /*#__PURE__*/React__default['default'].createElement("div", innerSliderProps, !_this.props.unslick ? prevArrow : "", /*#__PURE__*/React__default['default'].createElement("div", _extends$1({
|
|
11706
11730
|
ref: _this.listRefHandler
|
|
11707
|
-
}, listProps), /*#__PURE__*/
|
|
11731
|
+
}, listProps), /*#__PURE__*/React__default['default'].createElement(Track, _extends$1({
|
|
11708
11732
|
ref: _this.trackRefHandler
|
|
11709
11733
|
}, trackProps), _this.props.children)), !_this.props.unslick ? nextArrow : "", !_this.props.unslick ? dots : "");
|
|
11710
11734
|
});
|
|
11711
11735
|
|
|
11712
11736
|
_this.list = null;
|
|
11713
11737
|
_this.track = null;
|
|
11714
|
-
_this.state =
|
|
11738
|
+
_this.state = _objectSpread2(_objectSpread2({}, initialState), {}, {
|
|
11715
11739
|
currentSlide: _this.props.initialSlide,
|
|
11716
|
-
slideCount:
|
|
11740
|
+
slideCount: React__default['default'].Children.count(_this.props.children)
|
|
11717
11741
|
});
|
|
11718
11742
|
_this.callbackTimers = [];
|
|
11719
11743
|
_this.clickable = true;
|
|
@@ -11721,7 +11745,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11721
11745
|
|
|
11722
11746
|
var ssrState = _this.ssrInit();
|
|
11723
11747
|
|
|
11724
|
-
_this.state =
|
|
11748
|
+
_this.state = _objectSpread2(_objectSpread2({}, _this.state), ssrState);
|
|
11725
11749
|
return _this;
|
|
11726
11750
|
}
|
|
11727
11751
|
|
|
@@ -11733,6 +11757,7 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11733
11757
|
for (var _i3 = 0, _Object$keys = Object.keys(this.props); _i3 < _Object$keys.length; _i3++) {
|
|
11734
11758
|
var key = _Object$keys[_i3];
|
|
11735
11759
|
|
|
11760
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
11736
11761
|
if (!prevProps.hasOwnProperty(key)) {
|
|
11737
11762
|
setTrackStyle = true;
|
|
11738
11763
|
break;
|
|
@@ -11748,14 +11773,12 @@ var InnerSlider = /*#__PURE__*/function (_React$Component) {
|
|
|
11748
11773
|
}
|
|
11749
11774
|
}
|
|
11750
11775
|
|
|
11751
|
-
return setTrackStyle ||
|
|
11776
|
+
return setTrackStyle || React__default['default'].Children.count(this.props.children) !== React__default['default'].Children.count(prevProps.children);
|
|
11752
11777
|
}
|
|
11753
11778
|
}]);
|
|
11754
11779
|
|
|
11755
11780
|
return InnerSlider;
|
|
11756
|
-
}(
|
|
11757
|
-
|
|
11758
|
-
innerSlider.InnerSlider = InnerSlider;
|
|
11781
|
+
}(React__default['default'].Component);
|
|
11759
11782
|
|
|
11760
11783
|
var camel2hyphen$1 = function (str) {
|
|
11761
11784
|
return str
|
|
@@ -11819,25 +11842,12 @@ var json2mq = function (query) {
|
|
|
11819
11842
|
|
|
11820
11843
|
var json2mq_1 = json2mq;
|
|
11821
11844
|
|
|
11822
|
-
var defaultProps = {};
|
|
11823
|
-
|
|
11824
|
-
(function (exports) {
|
|
11825
|
-
|
|
11826
|
-
Object.defineProperty(exports, "__esModule", {
|
|
11827
|
-
value: true
|
|
11828
|
-
});
|
|
11829
|
-
exports["default"] = void 0;
|
|
11830
|
-
|
|
11831
|
-
var _react = _interopRequireDefault(React__default['default']);
|
|
11832
|
-
|
|
11833
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11834
|
-
|
|
11835
11845
|
var defaultProps = {
|
|
11836
11846
|
accessibility: true,
|
|
11837
11847
|
adaptiveHeight: false,
|
|
11838
11848
|
afterChange: null,
|
|
11839
11849
|
appendDots: function appendDots(dots) {
|
|
11840
|
-
return /*#__PURE__*/
|
|
11850
|
+
return /*#__PURE__*/React__default['default'].createElement("ul", {
|
|
11841
11851
|
style: {
|
|
11842
11852
|
display: "block"
|
|
11843
11853
|
}
|
|
@@ -11852,7 +11862,7 @@ var defaultProps = {
|
|
|
11852
11862
|
className: "",
|
|
11853
11863
|
cssEase: "ease",
|
|
11854
11864
|
customPaging: function customPaging(i) {
|
|
11855
|
-
return /*#__PURE__*/
|
|
11865
|
+
return /*#__PURE__*/React__default['default'].createElement("button", null, i + 1);
|
|
11856
11866
|
},
|
|
11857
11867
|
dots: false,
|
|
11858
11868
|
dotsClass: "slick-dots",
|
|
@@ -11892,365 +11902,6 @@ var defaultProps = {
|
|
|
11892
11902
|
vertical: false,
|
|
11893
11903
|
waitForAnimate: true
|
|
11894
11904
|
};
|
|
11895
|
-
var _default = defaultProps;
|
|
11896
|
-
exports["default"] = _default;
|
|
11897
|
-
}(defaultProps));
|
|
11898
|
-
|
|
11899
|
-
/**
|
|
11900
|
-
* Delegate to handle a media query being matched and unmatched.
|
|
11901
|
-
*
|
|
11902
|
-
* @param {object} options
|
|
11903
|
-
* @param {function} options.match callback for when the media query is matched
|
|
11904
|
-
* @param {function} [options.unmatch] callback for when the media query is unmatched
|
|
11905
|
-
* @param {function} [options.setup] one-time callback triggered the first time a query is matched
|
|
11906
|
-
* @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched?
|
|
11907
|
-
* @constructor
|
|
11908
|
-
*/
|
|
11909
|
-
|
|
11910
|
-
function QueryHandler$1(options) {
|
|
11911
|
-
this.options = options;
|
|
11912
|
-
!options.deferSetup && this.setup();
|
|
11913
|
-
}
|
|
11914
|
-
|
|
11915
|
-
QueryHandler$1.prototype = {
|
|
11916
|
-
|
|
11917
|
-
constructor : QueryHandler$1,
|
|
11918
|
-
|
|
11919
|
-
/**
|
|
11920
|
-
* coordinates setup of the handler
|
|
11921
|
-
*
|
|
11922
|
-
* @function
|
|
11923
|
-
*/
|
|
11924
|
-
setup : function() {
|
|
11925
|
-
if(this.options.setup) {
|
|
11926
|
-
this.options.setup();
|
|
11927
|
-
}
|
|
11928
|
-
this.initialised = true;
|
|
11929
|
-
},
|
|
11930
|
-
|
|
11931
|
-
/**
|
|
11932
|
-
* coordinates setup and triggering of the handler
|
|
11933
|
-
*
|
|
11934
|
-
* @function
|
|
11935
|
-
*/
|
|
11936
|
-
on : function() {
|
|
11937
|
-
!this.initialised && this.setup();
|
|
11938
|
-
this.options.match && this.options.match();
|
|
11939
|
-
},
|
|
11940
|
-
|
|
11941
|
-
/**
|
|
11942
|
-
* coordinates the unmatch event for the handler
|
|
11943
|
-
*
|
|
11944
|
-
* @function
|
|
11945
|
-
*/
|
|
11946
|
-
off : function() {
|
|
11947
|
-
this.options.unmatch && this.options.unmatch();
|
|
11948
|
-
},
|
|
11949
|
-
|
|
11950
|
-
/**
|
|
11951
|
-
* called when a handler is to be destroyed.
|
|
11952
|
-
* delegates to the destroy or unmatch callbacks, depending on availability.
|
|
11953
|
-
*
|
|
11954
|
-
* @function
|
|
11955
|
-
*/
|
|
11956
|
-
destroy : function() {
|
|
11957
|
-
this.options.destroy ? this.options.destroy() : this.off();
|
|
11958
|
-
},
|
|
11959
|
-
|
|
11960
|
-
/**
|
|
11961
|
-
* determines equality by reference.
|
|
11962
|
-
* if object is supplied compare options, if function, compare match callback
|
|
11963
|
-
*
|
|
11964
|
-
* @function
|
|
11965
|
-
* @param {object || function} [target] the target for comparison
|
|
11966
|
-
*/
|
|
11967
|
-
equals : function(target) {
|
|
11968
|
-
return this.options === target || this.options.match === target;
|
|
11969
|
-
}
|
|
11970
|
-
|
|
11971
|
-
};
|
|
11972
|
-
|
|
11973
|
-
var QueryHandler_1 = QueryHandler$1;
|
|
11974
|
-
|
|
11975
|
-
/**
|
|
11976
|
-
* Helper function for iterating over a collection
|
|
11977
|
-
*
|
|
11978
|
-
* @param collection
|
|
11979
|
-
* @param fn
|
|
11980
|
-
*/
|
|
11981
|
-
|
|
11982
|
-
function each$2(collection, fn) {
|
|
11983
|
-
var i = 0,
|
|
11984
|
-
length = collection.length,
|
|
11985
|
-
cont;
|
|
11986
|
-
|
|
11987
|
-
for(i; i < length; i++) {
|
|
11988
|
-
cont = fn(collection[i], i);
|
|
11989
|
-
if(cont === false) {
|
|
11990
|
-
break; //allow early exit
|
|
11991
|
-
}
|
|
11992
|
-
}
|
|
11993
|
-
}
|
|
11994
|
-
|
|
11995
|
-
/**
|
|
11996
|
-
* Helper function for determining whether target object is an array
|
|
11997
|
-
*
|
|
11998
|
-
* @param target the object under test
|
|
11999
|
-
* @return {Boolean} true if array, false otherwise
|
|
12000
|
-
*/
|
|
12001
|
-
function isArray$1(target) {
|
|
12002
|
-
return Object.prototype.toString.apply(target) === '[object Array]';
|
|
12003
|
-
}
|
|
12004
|
-
|
|
12005
|
-
/**
|
|
12006
|
-
* Helper function for determining whether target object is a function
|
|
12007
|
-
*
|
|
12008
|
-
* @param target the object under test
|
|
12009
|
-
* @return {Boolean} true if function, false otherwise
|
|
12010
|
-
*/
|
|
12011
|
-
function isFunction$1(target) {
|
|
12012
|
-
return typeof target === 'function';
|
|
12013
|
-
}
|
|
12014
|
-
|
|
12015
|
-
var Util$1 = {
|
|
12016
|
-
isFunction : isFunction$1,
|
|
12017
|
-
isArray : isArray$1,
|
|
12018
|
-
each : each$2
|
|
12019
|
-
};
|
|
12020
|
-
|
|
12021
|
-
var QueryHandler = QueryHandler_1;
|
|
12022
|
-
var each$1 = Util$1.each;
|
|
12023
|
-
|
|
12024
|
-
/**
|
|
12025
|
-
* Represents a single media query, manages it's state and registered handlers for this query
|
|
12026
|
-
*
|
|
12027
|
-
* @constructor
|
|
12028
|
-
* @param {string} query the media query string
|
|
12029
|
-
* @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design
|
|
12030
|
-
*/
|
|
12031
|
-
function MediaQuery$1(query, isUnconditional) {
|
|
12032
|
-
this.query = query;
|
|
12033
|
-
this.isUnconditional = isUnconditional;
|
|
12034
|
-
this.handlers = [];
|
|
12035
|
-
this.mql = window.matchMedia(query);
|
|
12036
|
-
|
|
12037
|
-
var self = this;
|
|
12038
|
-
this.listener = function(mql) {
|
|
12039
|
-
// Chrome passes an MediaQueryListEvent object, while other browsers pass MediaQueryList directly
|
|
12040
|
-
self.mql = mql.currentTarget || mql;
|
|
12041
|
-
self.assess();
|
|
12042
|
-
};
|
|
12043
|
-
this.mql.addListener(this.listener);
|
|
12044
|
-
}
|
|
12045
|
-
|
|
12046
|
-
MediaQuery$1.prototype = {
|
|
12047
|
-
|
|
12048
|
-
constuctor : MediaQuery$1,
|
|
12049
|
-
|
|
12050
|
-
/**
|
|
12051
|
-
* add a handler for this query, triggering if already active
|
|
12052
|
-
*
|
|
12053
|
-
* @param {object} handler
|
|
12054
|
-
* @param {function} handler.match callback for when query is activated
|
|
12055
|
-
* @param {function} [handler.unmatch] callback for when query is deactivated
|
|
12056
|
-
* @param {function} [handler.setup] callback for immediate execution when a query handler is registered
|
|
12057
|
-
* @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched?
|
|
12058
|
-
*/
|
|
12059
|
-
addHandler : function(handler) {
|
|
12060
|
-
var qh = new QueryHandler(handler);
|
|
12061
|
-
this.handlers.push(qh);
|
|
12062
|
-
|
|
12063
|
-
this.matches() && qh.on();
|
|
12064
|
-
},
|
|
12065
|
-
|
|
12066
|
-
/**
|
|
12067
|
-
* removes the given handler from the collection, and calls it's destroy methods
|
|
12068
|
-
*
|
|
12069
|
-
* @param {object || function} handler the handler to remove
|
|
12070
|
-
*/
|
|
12071
|
-
removeHandler : function(handler) {
|
|
12072
|
-
var handlers = this.handlers;
|
|
12073
|
-
each$1(handlers, function(h, i) {
|
|
12074
|
-
if(h.equals(handler)) {
|
|
12075
|
-
h.destroy();
|
|
12076
|
-
return !handlers.splice(i,1); //remove from array and exit each early
|
|
12077
|
-
}
|
|
12078
|
-
});
|
|
12079
|
-
},
|
|
12080
|
-
|
|
12081
|
-
/**
|
|
12082
|
-
* Determine whether the media query should be considered a match
|
|
12083
|
-
*
|
|
12084
|
-
* @return {Boolean} true if media query can be considered a match, false otherwise
|
|
12085
|
-
*/
|
|
12086
|
-
matches : function() {
|
|
12087
|
-
return this.mql.matches || this.isUnconditional;
|
|
12088
|
-
},
|
|
12089
|
-
|
|
12090
|
-
/**
|
|
12091
|
-
* Clears all handlers and unbinds events
|
|
12092
|
-
*/
|
|
12093
|
-
clear : function() {
|
|
12094
|
-
each$1(this.handlers, function(handler) {
|
|
12095
|
-
handler.destroy();
|
|
12096
|
-
});
|
|
12097
|
-
this.mql.removeListener(this.listener);
|
|
12098
|
-
this.handlers.length = 0; //clear array
|
|
12099
|
-
},
|
|
12100
|
-
|
|
12101
|
-
/*
|
|
12102
|
-
* Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match
|
|
12103
|
-
*/
|
|
12104
|
-
assess : function() {
|
|
12105
|
-
var action = this.matches() ? 'on' : 'off';
|
|
12106
|
-
|
|
12107
|
-
each$1(this.handlers, function(handler) {
|
|
12108
|
-
handler[action]();
|
|
12109
|
-
});
|
|
12110
|
-
}
|
|
12111
|
-
};
|
|
12112
|
-
|
|
12113
|
-
var MediaQuery_1 = MediaQuery$1;
|
|
12114
|
-
|
|
12115
|
-
var MediaQuery = MediaQuery_1;
|
|
12116
|
-
var Util = Util$1;
|
|
12117
|
-
var each = Util.each;
|
|
12118
|
-
var isFunction = Util.isFunction;
|
|
12119
|
-
var isArray = Util.isArray;
|
|
12120
|
-
|
|
12121
|
-
/**
|
|
12122
|
-
* Allows for registration of query handlers.
|
|
12123
|
-
* Manages the query handler's state and is responsible for wiring up browser events
|
|
12124
|
-
*
|
|
12125
|
-
* @constructor
|
|
12126
|
-
*/
|
|
12127
|
-
function MediaQueryDispatch$1 () {
|
|
12128
|
-
if(!window.matchMedia) {
|
|
12129
|
-
throw new Error('matchMedia not present, legacy browsers require a polyfill');
|
|
12130
|
-
}
|
|
12131
|
-
|
|
12132
|
-
this.queries = {};
|
|
12133
|
-
this.browserIsIncapable = !window.matchMedia('only all').matches;
|
|
12134
|
-
}
|
|
12135
|
-
|
|
12136
|
-
MediaQueryDispatch$1.prototype = {
|
|
12137
|
-
|
|
12138
|
-
constructor : MediaQueryDispatch$1,
|
|
12139
|
-
|
|
12140
|
-
/**
|
|
12141
|
-
* Registers a handler for the given media query
|
|
12142
|
-
*
|
|
12143
|
-
* @param {string} q the media query
|
|
12144
|
-
* @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers
|
|
12145
|
-
* @param {function} options.match fired when query matched
|
|
12146
|
-
* @param {function} [options.unmatch] fired when a query is no longer matched
|
|
12147
|
-
* @param {function} [options.setup] fired when handler first triggered
|
|
12148
|
-
* @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched
|
|
12149
|
-
* @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers
|
|
12150
|
-
*/
|
|
12151
|
-
register : function(q, options, shouldDegrade) {
|
|
12152
|
-
var queries = this.queries,
|
|
12153
|
-
isUnconditional = shouldDegrade && this.browserIsIncapable;
|
|
12154
|
-
|
|
12155
|
-
if(!queries[q]) {
|
|
12156
|
-
queries[q] = new MediaQuery(q, isUnconditional);
|
|
12157
|
-
}
|
|
12158
|
-
|
|
12159
|
-
//normalise to object in an array
|
|
12160
|
-
if(isFunction(options)) {
|
|
12161
|
-
options = { match : options };
|
|
12162
|
-
}
|
|
12163
|
-
if(!isArray(options)) {
|
|
12164
|
-
options = [options];
|
|
12165
|
-
}
|
|
12166
|
-
each(options, function(handler) {
|
|
12167
|
-
if (isFunction(handler)) {
|
|
12168
|
-
handler = { match : handler };
|
|
12169
|
-
}
|
|
12170
|
-
queries[q].addHandler(handler);
|
|
12171
|
-
});
|
|
12172
|
-
|
|
12173
|
-
return this;
|
|
12174
|
-
},
|
|
12175
|
-
|
|
12176
|
-
/**
|
|
12177
|
-
* unregisters a query and all it's handlers, or a specific handler for a query
|
|
12178
|
-
*
|
|
12179
|
-
* @param {string} q the media query to target
|
|
12180
|
-
* @param {object || function} [handler] specific handler to unregister
|
|
12181
|
-
*/
|
|
12182
|
-
unregister : function(q, handler) {
|
|
12183
|
-
var query = this.queries[q];
|
|
12184
|
-
|
|
12185
|
-
if(query) {
|
|
12186
|
-
if(handler) {
|
|
12187
|
-
query.removeHandler(handler);
|
|
12188
|
-
}
|
|
12189
|
-
else {
|
|
12190
|
-
query.clear();
|
|
12191
|
-
delete this.queries[q];
|
|
12192
|
-
}
|
|
12193
|
-
}
|
|
12194
|
-
|
|
12195
|
-
return this;
|
|
12196
|
-
}
|
|
12197
|
-
};
|
|
12198
|
-
|
|
12199
|
-
var MediaQueryDispatch_1 = MediaQueryDispatch$1;
|
|
12200
|
-
|
|
12201
|
-
var MediaQueryDispatch = MediaQueryDispatch_1;
|
|
12202
|
-
var src = new MediaQueryDispatch();
|
|
12203
|
-
|
|
12204
|
-
(function (exports) {
|
|
12205
|
-
|
|
12206
|
-
Object.defineProperty(exports, "__esModule", {
|
|
12207
|
-
value: true
|
|
12208
|
-
});
|
|
12209
|
-
exports["default"] = void 0;
|
|
12210
|
-
|
|
12211
|
-
var _react = _interopRequireDefault(React__default['default']);
|
|
12212
|
-
|
|
12213
|
-
var _innerSlider = innerSlider;
|
|
12214
|
-
|
|
12215
|
-
var _json2mq = _interopRequireDefault(json2mq_1);
|
|
12216
|
-
|
|
12217
|
-
var _defaultProps = _interopRequireDefault(defaultProps);
|
|
12218
|
-
|
|
12219
|
-
var _innerSliderUtils = innerSliderUtils;
|
|
12220
|
-
|
|
12221
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12222
|
-
|
|
12223
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
12224
|
-
|
|
12225
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12226
|
-
|
|
12227
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
12228
|
-
|
|
12229
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
12230
|
-
|
|
12231
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12232
|
-
|
|
12233
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
12234
|
-
|
|
12235
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12236
|
-
|
|
12237
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12238
|
-
|
|
12239
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12240
|
-
|
|
12241
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12242
|
-
|
|
12243
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12244
|
-
|
|
12245
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12246
|
-
|
|
12247
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
12248
|
-
|
|
12249
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12250
|
-
|
|
12251
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12252
|
-
|
|
12253
|
-
var enquire = (0, _innerSliderUtils.canUseDOM)() && src;
|
|
12254
11905
|
|
|
12255
11906
|
var Slider = /*#__PURE__*/function (_React$Component) {
|
|
12256
11907
|
_inherits(Slider, _React$Component);
|
|
@@ -12300,11 +11951,23 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12300
11951
|
key: "media",
|
|
12301
11952
|
value: function media(query, handler) {
|
|
12302
11953
|
// javascript handler for css media query
|
|
12303
|
-
|
|
11954
|
+
var mql = window.matchMedia(query);
|
|
11955
|
+
|
|
11956
|
+
var listener = function listener(_ref) {
|
|
11957
|
+
var matches = _ref.matches;
|
|
11958
|
+
|
|
11959
|
+
if (matches) {
|
|
11960
|
+
handler();
|
|
11961
|
+
}
|
|
11962
|
+
};
|
|
11963
|
+
|
|
11964
|
+
mql.addListener(listener);
|
|
11965
|
+
listener(mql);
|
|
12304
11966
|
|
|
12305
11967
|
this._responsiveMediaHandlers.push({
|
|
11968
|
+
mql: mql,
|
|
12306
11969
|
query: query,
|
|
12307
|
-
|
|
11970
|
+
listener: listener
|
|
12308
11971
|
});
|
|
12309
11972
|
} // handles responsive breakpoints
|
|
12310
11973
|
|
|
@@ -12331,19 +11994,19 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12331
11994
|
var bQuery;
|
|
12332
11995
|
|
|
12333
11996
|
if (index === 0) {
|
|
12334
|
-
bQuery = (
|
|
11997
|
+
bQuery = json2mq_1({
|
|
12335
11998
|
minWidth: 0,
|
|
12336
11999
|
maxWidth: breakpoint
|
|
12337
12000
|
});
|
|
12338
12001
|
} else {
|
|
12339
|
-
bQuery = (
|
|
12002
|
+
bQuery = json2mq_1({
|
|
12340
12003
|
minWidth: breakpoints[index - 1] + 1,
|
|
12341
12004
|
maxWidth: breakpoint
|
|
12342
12005
|
});
|
|
12343
12006
|
} // when not using server side rendering
|
|
12344
12007
|
|
|
12345
12008
|
|
|
12346
|
-
|
|
12009
|
+
canUseDOM() && _this2.media(bQuery, function () {
|
|
12347
12010
|
_this2.setState({
|
|
12348
12011
|
breakpoint: breakpoint
|
|
12349
12012
|
});
|
|
@@ -12351,10 +12014,10 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12351
12014
|
}); // Register media query for full screen. Need to support resize from small to large
|
|
12352
12015
|
// convert javascript object to media query string
|
|
12353
12016
|
|
|
12354
|
-
var query = (
|
|
12017
|
+
var query = json2mq_1({
|
|
12355
12018
|
minWidth: breakpoints.slice(-1)[0]
|
|
12356
12019
|
});
|
|
12357
|
-
|
|
12020
|
+
canUseDOM() && this.media(query, function () {
|
|
12358
12021
|
_this2.setState({
|
|
12359
12022
|
breakpoint: null
|
|
12360
12023
|
});
|
|
@@ -12365,7 +12028,7 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12365
12028
|
key: "componentWillUnmount",
|
|
12366
12029
|
value: function componentWillUnmount() {
|
|
12367
12030
|
this._responsiveMediaHandlers.forEach(function (obj) {
|
|
12368
|
-
|
|
12031
|
+
obj.mql.removeListener(obj.listener);
|
|
12369
12032
|
});
|
|
12370
12033
|
}
|
|
12371
12034
|
}, {
|
|
@@ -12380,9 +12043,9 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12380
12043
|
newProps = this.props.responsive.filter(function (resp) {
|
|
12381
12044
|
return resp.breakpoint === _this3.state.breakpoint;
|
|
12382
12045
|
});
|
|
12383
|
-
settings = newProps[0].settings === "unslick" ? "unslick" :
|
|
12046
|
+
settings = newProps[0].settings === "unslick" ? "unslick" : _objectSpread2(_objectSpread2(_objectSpread2({}, defaultProps), this.props), newProps[0].settings);
|
|
12384
12047
|
} else {
|
|
12385
|
-
settings =
|
|
12048
|
+
settings = _objectSpread2(_objectSpread2({}, defaultProps), this.props);
|
|
12386
12049
|
} // force scrolling by one if centerMode is on
|
|
12387
12050
|
|
|
12388
12051
|
|
|
@@ -12409,10 +12072,9 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12409
12072
|
} // makes sure that children is an array, even when there is only 1 child
|
|
12410
12073
|
|
|
12411
12074
|
|
|
12412
|
-
var children =
|
|
12075
|
+
var children = React__default['default'].Children.toArray(this.props.children); // Children may contain false or null, so we should filter them
|
|
12413
12076
|
// children may also contain string filled with spaces (in certain cases where we use jsx strings)
|
|
12414
12077
|
|
|
12415
|
-
|
|
12416
12078
|
children = children.filter(function (child) {
|
|
12417
12079
|
if (typeof child === "string") {
|
|
12418
12080
|
return !!child.trim();
|
|
@@ -12441,7 +12103,7 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12441
12103
|
}
|
|
12442
12104
|
|
|
12443
12105
|
if (k >= children.length) break;
|
|
12444
|
-
row.push( /*#__PURE__*/
|
|
12106
|
+
row.push( /*#__PURE__*/React__default['default'].cloneElement(children[k], {
|
|
12445
12107
|
key: 100 * i + 10 * j + k,
|
|
12446
12108
|
tabIndex: -1,
|
|
12447
12109
|
style: {
|
|
@@ -12451,20 +12113,20 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12451
12113
|
}));
|
|
12452
12114
|
}
|
|
12453
12115
|
|
|
12454
|
-
newSlide.push( /*#__PURE__*/
|
|
12116
|
+
newSlide.push( /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12455
12117
|
key: 10 * i + j
|
|
12456
12118
|
}, row));
|
|
12457
12119
|
}
|
|
12458
12120
|
|
|
12459
12121
|
if (settings.variableWidth) {
|
|
12460
|
-
newChildren.push( /*#__PURE__*/
|
|
12122
|
+
newChildren.push( /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12461
12123
|
key: i,
|
|
12462
12124
|
style: {
|
|
12463
12125
|
width: currentWidth
|
|
12464
12126
|
}
|
|
12465
12127
|
}, newSlide));
|
|
12466
12128
|
} else {
|
|
12467
|
-
newChildren.push( /*#__PURE__*/
|
|
12129
|
+
newChildren.push( /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12468
12130
|
key: i
|
|
12469
12131
|
}, newSlide));
|
|
12470
12132
|
}
|
|
@@ -12472,14 +12134,14 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12472
12134
|
|
|
12473
12135
|
if (settings === "unslick") {
|
|
12474
12136
|
var className = "regular slider " + (this.props.className || "");
|
|
12475
|
-
return /*#__PURE__*/
|
|
12137
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12476
12138
|
className: className
|
|
12477
12139
|
}, children);
|
|
12478
12140
|
} else if (newChildren.length <= settings.slidesToShow) {
|
|
12479
12141
|
settings.unslick = true;
|
|
12480
12142
|
}
|
|
12481
12143
|
|
|
12482
|
-
return /*#__PURE__*/
|
|
12144
|
+
return /*#__PURE__*/React__default['default'].createElement(InnerSlider, _extends$1({
|
|
12483
12145
|
style: this.props.style,
|
|
12484
12146
|
ref: this.innerSliderRefHandler
|
|
12485
12147
|
}, settings), newChildren);
|
|
@@ -12487,38 +12149,18 @@ var Slider = /*#__PURE__*/function (_React$Component) {
|
|
|
12487
12149
|
}]);
|
|
12488
12150
|
|
|
12489
12151
|
return Slider;
|
|
12490
|
-
}(
|
|
12491
|
-
|
|
12492
|
-
exports["default"] = Slider;
|
|
12493
|
-
}(slider));
|
|
12494
|
-
|
|
12495
|
-
(function (exports) {
|
|
12496
|
-
|
|
12497
|
-
Object.defineProperty(exports, "__esModule", {
|
|
12498
|
-
value: true
|
|
12499
|
-
});
|
|
12500
|
-
exports["default"] = void 0;
|
|
12501
|
-
|
|
12502
|
-
var _slider = _interopRequireDefault(slider);
|
|
12503
|
-
|
|
12504
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12505
|
-
|
|
12506
|
-
var _default = _slider["default"];
|
|
12507
|
-
exports["default"] = _default;
|
|
12508
|
-
}(lib));
|
|
12152
|
+
}(React__default['default'].Component);
|
|
12509
12153
|
|
|
12510
|
-
var Slider =
|
|
12511
|
-
|
|
12512
|
-
var StyledSlider = newStyled(Slider)(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n .slick-dots {\n position: static;\n display: flex !important;\n justify-content: center;\n column-gap: ", ";\n margin-top: ", ";\n }\n .slick-prev {\n left: ", ";\n }\n .slick-next {\n right: ", ";\n }\n .slick-prev,\n .slick-next {\n width: fit-content;\n height: fit-content;\n }\n .slick-prev:before,\n .slick-next:before {\n content: none;\n }\n .slick-dots li {\n margin: 0;\n width: auto;\n line-height: 0;\n height: auto;\n }\n"], ["\n .slick-dots {\n position: static;\n display: flex !important;\n justify-content: center;\n column-gap: ", ";\n margin-top: ", ";\n }\n .slick-prev {\n left: ", ";\n }\n .slick-next {\n right: ", ";\n }\n .slick-prev,\n .slick-next {\n width: fit-content;\n height: fit-content;\n }\n .slick-prev:before,\n .slick-next:before {\n content: none;\n }\n .slick-dots li {\n margin: 0;\n width: auto;\n line-height: 0;\n height: auto;\n }\n"])), function (props) { return props.dotsSpacing + "rem"; }, function (props) { return props.dotListMarginTop + "rem"; }, function (_a) {
|
|
12154
|
+
var StyledSlider = newStyled(Slider)(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n .slick-dots {\n position: static;\n display: flex !important;\n justify-content: center;\n column-gap: ", ";\n margin-top: ", ";\n }\n .slick-prev {\n left: ", ";\n }\n .slick-next {\n right: ", ";\n }\n .slick-prev,\n .slick-next {\n width: fit-content;\n height: fit-content;\n }\n .slick-prev:before,\n .slick-next:before {\n content: none;\n }\n .slick-dots li {\n margin: 0;\n width: auto;\n line-height: 0;\n height: auto;\n }\n"], ["\n .slick-dots {\n position: static;\n display: flex !important;\n justify-content: center;\n column-gap: ", ";\n margin-top: ", ";\n }\n .slick-prev {\n left: ", ";\n }\n .slick-next {\n right: ", ";\n }\n .slick-prev,\n .slick-next {\n width: fit-content;\n height: fit-content;\n }\n .slick-prev:before,\n .slick-next:before {\n content: none;\n }\n .slick-dots li {\n margin: 0;\n width: auto;\n line-height: 0;\n height: auto;\n }\n"])), function (props) { return props.dotsSpacing + "rem"; }, function (props) { return props.dotListMarginTop + "rem"; }, function (_a) {
|
|
12513
12155
|
var arrowPaddingOffset = _a.arrowPaddingOffset, _b = _a.arrowPadding, arrowPadding = _b === void 0 ? 0 : _b;
|
|
12514
12156
|
return "-" + (arrowPaddingOffset + arrowPadding) + "rem";
|
|
12515
12157
|
}, function (_a) {
|
|
12516
12158
|
var arrowPaddingOffset = _a.arrowPaddingOffset, _b = _a.arrowPadding, arrowPadding = _b === void 0 ? 0 : _b;
|
|
12517
12159
|
return "-" + (arrowPaddingOffset + arrowPadding) + "rem";
|
|
12518
12160
|
});
|
|
12519
|
-
var templateObject_1$
|
|
12161
|
+
var templateObject_1$5;
|
|
12520
12162
|
|
|
12521
|
-
var getStylesBySize = function (size) {
|
|
12163
|
+
var getStylesBySize$1 = function (size) {
|
|
12522
12164
|
// rem units
|
|
12523
12165
|
switch (size) {
|
|
12524
12166
|
case exports.ComponentSize.Large:
|
|
@@ -12550,7 +12192,7 @@ var getStylesBySize = function (size) {
|
|
|
12550
12192
|
var SliderNavigation = function (_a) {
|
|
12551
12193
|
var children = _a.children, infinite = _a.infinite, arrows = _a.arrows, adaptiveHeight = _a.adaptiveHeight, dotsSize = _a.dotsSize, dotListMarginTop = _a.dotListMarginTop, _b = _a.initialSlide, initialSlide = _b === void 0 ? 0 : _b;
|
|
12552
12194
|
var _c = React.useState(0), activeIndex = _c[0], setActiveIndex = _c[1];
|
|
12553
|
-
var styles = getStylesBySize(dotsSize);
|
|
12195
|
+
var styles = getStylesBySize$1(dotsSize);
|
|
12554
12196
|
var theme = useTheme();
|
|
12555
12197
|
var nextArrow = arrows && (jsx(ArrowButton, { direction: "right", width: arrows.arrowWidth, height: arrows.arrowHeight }, void 0));
|
|
12556
12198
|
var prevArrow = arrows && (jsx(ArrowButton, { direction: "left", width: arrows.arrowWidth, height: arrows.arrowHeight }, void 0));
|
|
@@ -12572,13 +12214,13 @@ var SliderNavigation = function (_a) {
|
|
|
12572
12214
|
return (jsx("div", __assign({ css: { padding: arrows ? "0 " + (arrows.arrowWidth + arrows.arrowPadding) + "rem" : 0 } }, { children: jsx(StyledSlider, __assign({}, settings, { arrowPadding: arrows && arrows.arrowPadding, dotListMarginTop: dotListMarginTop, arrowPaddingOffset: arrows ? arrows.arrowWidth : 0, dotsSpacing: styles.dotsSpacing }, { children: children }), void 0) }), void 0));
|
|
12573
12215
|
};
|
|
12574
12216
|
|
|
12575
|
-
var List = newStyled.ul(templateObject_1$
|
|
12576
|
-
var Item = newStyled.li(templateObject_2$
|
|
12217
|
+
var List = newStyled.ul(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n display: flex;\n margin: 0;\n padding: 0;\n"], ["\n display: flex;\n margin: 0;\n padding: 0;\n"])));
|
|
12218
|
+
var Item = newStyled.li(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n width: 1.25rem;\n list-style: none;\n margin-right: 1.5rem;\n position: relative;\n line-height: 0;\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover {\n .dropdownWrapper {\n visibility: visible;\n }\n }\n"], ["\n width: 1.25rem;\n list-style: none;\n margin-right: 1.5rem;\n position: relative;\n line-height: 0;\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover {\n .dropdownWrapper {\n visibility: visible;\n }\n }\n"])));
|
|
12577
12219
|
var DropdownWrapper = newStyled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n right: -0.938rem;\n min-width: 9.375rem;\n position: absolute;\n padding-top: 0.625rem;\n margin-top: -0.188rem;\n width: max-content;\n visibility: hidden;\n"], ["\n right: -0.938rem;\n min-width: 9.375rem;\n position: absolute;\n padding-top: 0.625rem;\n margin-top: -0.188rem;\n width: max-content;\n visibility: hidden;\n"])));
|
|
12578
12220
|
var ArrowContainer = newStyled.div(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n transform: rotate(180deg);\n display: flex;\n justify-content: flex-start;\n margin-bottom: -0.063rem;\n padding-left: 0.938rem;\n"], ["\n transform: rotate(180deg);\n display: flex;\n justify-content: flex-start;\n margin-bottom: -0.063rem;\n padding-left: 0.938rem;\n"])));
|
|
12579
12221
|
var StyledDropdown = newStyled.ul(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n margin: 0;\n padding: 0;\n border: 0.063rem solid ", ";\n border-radius: 0.5rem;\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n"], ["\n margin: 0;\n padding: 0;\n border: 0.063rem solid ", ";\n border-radius: 0.5rem;\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n"])), function (props) { return props.borderColor; });
|
|
12580
12222
|
var DropdownItem = newStyled.li(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n list-style: none;\n padding: 0.813rem;\n border-bottom: 0.063rem solid ", ";\n font-size: 0.875rem;\n line-height: 1.125rem;\n font-weight: 400;\n color: ", ";\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: ", ";\n }\n\n &:last-child {\n border-bottom: none;\n border-radius: 0 0 0.5rem 0.5rem;\n }\n\n &:first-of-type {\n border-radius: 0.5rem 0.5rem 0 0;\n }\n\n &:only-child {\n border-radius: 0.5rem;\n }\n"], ["\n list-style: none;\n padding: 0.813rem;\n border-bottom: 0.063rem solid ", ";\n font-size: 0.875rem;\n line-height: 1.125rem;\n font-weight: 400;\n color: ", ";\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: ", ";\n }\n\n &:last-child {\n border-bottom: none;\n border-radius: 0 0 0.5rem 0.5rem;\n }\n\n &:first-of-type {\n border-radius: 0.5rem 0.5rem 0 0;\n }\n\n &:only-child {\n border-radius: 0.5rem;\n }\n"])), function (props) { return props.borderColor; }, function (props) { return props.color; }, function (props) { return props.hoverColor; });
|
|
12581
|
-
var templateObject_1$
|
|
12223
|
+
var templateObject_1$4, templateObject_2$2, templateObject_3$1, templateObject_4$1, templateObject_5$1, templateObject_6$1;
|
|
12582
12224
|
|
|
12583
12225
|
var DropdownListIcons = function (_a) {
|
|
12584
12226
|
var items = _a.items;
|
|
@@ -12591,7 +12233,7 @@ var Dropdown = function (_a) {
|
|
|
12591
12233
|
return (jsxRuntime.jsxs(DropdownWrapper, __assign({ className: "dropdownWrapper", "data-testid": "Dropdown-wrapper" }, { children: [jsxRuntime.jsx(ArrowContainer, { children: jsxRuntime.jsx(TooltipArrow, { stroke: theme.shades.gray200, fill: "#fff", width: 1.25, height: 0.75 }, void 0) }, void 0), jsxRuntime.jsx(StyledDropdown, __assign({ borderColor: theme.shades.gray200 }, { children: items.map(function (item, index) { return (jsxRuntime.jsx(DropdownItem, __assign({ onClick: item.callback, borderColor: theme.shades.gray200, color: theme.shades.gray550, hoverColor: theme.shades.gray010 }, { children: item.description }), index)); }) }), void 0)] }), void 0));
|
|
12592
12234
|
};
|
|
12593
12235
|
|
|
12594
|
-
var StyledButton = newStyled(BaseButton)(templateObject_1$
|
|
12236
|
+
var StyledButton = newStyled(BaseButton)(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n width: 12.5rem;\n height: 2.5rem;\n background-color: ", ";\n cursor: pointer;\n border: none;\n\n &:hover {\n background-color: ", ";\n }\n"], ["\n width: 12.5rem;\n height: 2.5rem;\n background-color: ", ";\n cursor: pointer;\n border: none;\n\n &:hover {\n background-color: ", ";\n }\n"])), function (props) { return props.backgroundColor; }, function (props) { return props.hoverBackgroundColor; });
|
|
12595
12237
|
var AmazonButton = function (_a) {
|
|
12596
12238
|
var onClick = _a.onClick;
|
|
12597
12239
|
return (jsxRuntime.jsx(StyledButton, __assign({ backgroundColor: "#FED865", hoverBackgroundColor: "#F1CB58", onClick: onClick }, { children: jsxRuntime.jsx(Icon.Payment.Amazon, { width: 5.375, height: 1.25 }, void 0) }), void 0));
|
|
@@ -12600,7 +12242,7 @@ var PaypalButton = function (_a) {
|
|
|
12600
12242
|
var onClick = _a.onClick;
|
|
12601
12243
|
return (jsxRuntime.jsx(StyledButton, __assign({ backgroundColor: "#ffc439", hoverBackgroundColor: "#F4BF41", onClick: onClick }, { children: jsxRuntime.jsx(Icon.Payment.Paypal, { width: 4.938, height: 1.25 }, void 0) }), void 0));
|
|
12602
12244
|
};
|
|
12603
|
-
var templateObject_1$
|
|
12245
|
+
var templateObject_1$3;
|
|
12604
12246
|
|
|
12605
12247
|
var AmazonPaypalButtons = /*#__PURE__*/Object.freeze({
|
|
12606
12248
|
__proto__: null,
|
|
@@ -12608,8 +12250,8 @@ var AmazonPaypalButtons = /*#__PURE__*/Object.freeze({
|
|
|
12608
12250
|
PaypalButton: PaypalButton
|
|
12609
12251
|
});
|
|
12610
12252
|
|
|
12611
|
-
var Wrapper = newStyled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0.625rem 1.25rem;\n background-color: ", ";\n width: 36.875rem;\n max-width: 100%;\n border-radius: 0.5rem;\n\n img {\n margin-right: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n padding: 0.625rem 1.25rem;\n background-color: ", ";\n width: 36.875rem;\n max-width: 100%;\n border-radius: 0.5rem;\n\n img {\n margin-right: ", ";\n }\n"])), function (props) { return props.backgroundColor; }, function (props) { return (props.rightToLeft ? '0' : '1.25rem'); });
|
|
12612
|
-
var Col = newStyled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
12253
|
+
var Wrapper = newStyled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0.625rem 1.25rem;\n background-color: ", ";\n width: 36.875rem;\n max-width: 100%;\n border-radius: 0.5rem;\n\n img {\n margin-right: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n padding: 0.625rem 1.25rem;\n background-color: ", ";\n width: 36.875rem;\n max-width: 100%;\n border-radius: 0.5rem;\n\n img {\n margin-right: ", ";\n }\n"])), function (props) { return props.backgroundColor; }, function (props) { return (props.rightToLeft ? '0' : '1.25rem'); });
|
|
12254
|
+
var Col = newStyled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
12613
12255
|
var Row = newStyled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n width: 100%;\n margin-left: 10px;\n\n ", "};\n"], ["\n display: flex;\n align-items: center;\n width: 100%;\n margin-left: 10px;\n\n ", "};\n"])), function (props) {
|
|
12614
12256
|
return props.rightToLeft &&
|
|
12615
12257
|
"\n flex-direction: row-reverse;\n justify-content: space-between;\n ";
|
|
@@ -12622,13 +12264,68 @@ var CrossSellCheckbox = function (_a) {
|
|
|
12622
12264
|
var theme = useTheme();
|
|
12623
12265
|
return (jsxRuntime.jsxs(Wrapper, __assign({ backgroundColor: theme.shades.gray010, rightToLeft: Boolean(rightToLeft) }, { children: [jsxRuntime.jsx(Checkbox, { text: "", id: "checkbox", onChange: onChange, size: exports.ComponentSize.Small }, void 0), jsxRuntime.jsxs(Row, __assign({ rightToLeft: Boolean(rightToLeft) }, { children: [jsxRuntime.jsx(Image, { src: imageURL, alt: "Cross sell image", borderRadius: "0.5rem" }, void 0), jsxRuntime.jsxs(Col, { children: [jsxRuntime.jsx(H5, __assign({ color: theme.shades.gray700 }, { children: title }), void 0), jsxRuntime.jsxs(H3, __assign({ color: theme.semantic.alert }, { children: [description, jsxRuntime.jsxs(FreeShipping, __assign({ color: theme.shades.gray700 }, { children: [" + ", freeShippingText] }), void 0)] }), void 0)] }, void 0)] }), void 0)] }), void 0));
|
|
12624
12266
|
};
|
|
12625
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
12267
|
+
var templateObject_1$2, templateObject_2$1, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
12626
12268
|
|
|
12627
12269
|
var index = /*#__PURE__*/Object.freeze({
|
|
12628
12270
|
__proto__: null,
|
|
12629
12271
|
CrossSellCheckbox: CrossSellCheckbox
|
|
12630
12272
|
});
|
|
12631
12273
|
|
|
12274
|
+
var ImageContainer = newStyled.div(function (_a) {
|
|
12275
|
+
var width = _a.width, height = _a.height;
|
|
12276
|
+
return ({
|
|
12277
|
+
position: 'relative',
|
|
12278
|
+
width: width,
|
|
12279
|
+
height: height,
|
|
12280
|
+
});
|
|
12281
|
+
});
|
|
12282
|
+
var Container$1 = newStyled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n"])));
|
|
12283
|
+
var H1 = newStyled.h1(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 0.875rem;\n font-weight: normal;\n line-height: 1.375rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"], ["\n font-size: 0.875rem;\n font-weight: normal;\n line-height: 1.375rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"])), function (props) { return props.theme.palette.secondary.default; }, function (props) { return props.align; });
|
|
12284
|
+
var getStylesBySize = function (size) {
|
|
12285
|
+
switch (size) {
|
|
12286
|
+
case exports.ComponentSize.Medium:
|
|
12287
|
+
return {
|
|
12288
|
+
width: '10.75rem',
|
|
12289
|
+
height: '14.375rem',
|
|
12290
|
+
};
|
|
12291
|
+
case exports.ComponentSize.Small:
|
|
12292
|
+
return {
|
|
12293
|
+
width: '9.813rem',
|
|
12294
|
+
height: '13.125rem',
|
|
12295
|
+
};
|
|
12296
|
+
/* istanbul ignore next */
|
|
12297
|
+
default:
|
|
12298
|
+
return {
|
|
12299
|
+
width: '10.75rem',
|
|
12300
|
+
height: '14.375rem',
|
|
12301
|
+
};
|
|
12302
|
+
}
|
|
12303
|
+
};
|
|
12304
|
+
var ProductItemMobile = function (_a) {
|
|
12305
|
+
var title = _a.title, image = _a.image, price = _a.price, rating = _a.rating, size = _a.size, tags = _a.tags, _b = _a.alignName, alignName = _b === void 0 ? 'center' : _b;
|
|
12306
|
+
var theme = useTheme();
|
|
12307
|
+
var styles = getStylesBySize(size);
|
|
12308
|
+
return (jsxs(Container$1, { children: [tags ? (jsxs(ImageContainer, __assign({ width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height, "data-testid": "tags-image-container" }, { children: [jsx(Image, { src: image.src, alt: image.alt, width: "100%", height: "100%" }, void 0), jsx(SeasonOfferTag, { text: tags.seasonOfferTagText, size: exports.ComponentSize.Small, css: { position: 'absolute', top: 0, left: 0 } }, void 0), jsx(CategoryTag, { text: tags.categoryTagText, size: exports.ComponentSize.Small, css: { position: 'absolute', bottom: '1rem', left: 0 } }, void 0)] }), void 0)) : (jsx(Image, { src: image.src, alt: image.alt, width: styles === null || styles === void 0 ? void 0 : styles.width, height: styles === null || styles === void 0 ? void 0 : styles.height }, void 0)), jsx(H1, __assign({ theme: theme, align: alignName }, { children: title }), void 0), jsx(PriceLabel, { finalPrice: price.finalPrice, originalPrice: price.originalPrice, color: price.color, size: exports.ComponentSize.Small }, void 0), jsx(Rating, { size: exports.ComponentSize.XSmall, rating: rating.rating, reviews: rating.reviews, reviewsText: "" }, void 0)] }, void 0));
|
|
12309
|
+
};
|
|
12310
|
+
var templateObject_1$1, templateObject_2;
|
|
12311
|
+
|
|
12312
|
+
var Container = newStyled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n row-gap: 1.875rem;\n column-gap: 1.875rem;\n flex-wrap: wrap;\n"], ["\n display: flex;\n row-gap: 1.875rem;\n column-gap: 1.875rem;\n flex-wrap: wrap;\n"])));
|
|
12313
|
+
function withProductGrid(ProductItemComponent, data) {
|
|
12314
|
+
function WithProductGrid(props) {
|
|
12315
|
+
return (jsxRuntime.jsx(Container, __assign({ "data-testid": "product-grid-container" }, { children: data.map(function (product, index) { return (jsxRuntime.jsx(ProductItemComponent, __assign({}, product, props), index)); }) }), void 0));
|
|
12316
|
+
}
|
|
12317
|
+
/* istanbul ignore next */
|
|
12318
|
+
var wrappedComponentName = ProductItemComponent.displayName || ProductItemComponent.name || 'Component';
|
|
12319
|
+
WithProductGrid.displayName = "withGrid(" + wrappedComponentName + ")";
|
|
12320
|
+
return WithProductGrid;
|
|
12321
|
+
}
|
|
12322
|
+
var templateObject_1;
|
|
12323
|
+
|
|
12324
|
+
var Collection = {
|
|
12325
|
+
ProductItemMobile: ProductItemMobile,
|
|
12326
|
+
withProductGrid: withProductGrid,
|
|
12327
|
+
};
|
|
12328
|
+
|
|
12632
12329
|
exports.Accordion = Accordion$1;
|
|
12633
12330
|
exports.AccordionBox = AccordionBox;
|
|
12634
12331
|
exports.AccordionIcon = AccordionIcon;
|
|
@@ -12640,6 +12337,7 @@ exports.ButtonSecondaryOutline = ButtonSecondaryOutline;
|
|
|
12640
12337
|
exports.Card = Card$1;
|
|
12641
12338
|
exports.CategoryTag = CategoryTag;
|
|
12642
12339
|
exports.Checkbox = Checkbox;
|
|
12340
|
+
exports.Collection = Collection;
|
|
12643
12341
|
exports.CrossSell = index;
|
|
12644
12342
|
exports.DeliveryDetails = DeliveryDetails;
|
|
12645
12343
|
exports.DiscountTag = DiscountTag;
|
|
@@ -12668,6 +12366,7 @@ exports.SizeFitGuide = SizeFitGuide;
|
|
|
12668
12366
|
exports.SizeSelector = SizeSelector;
|
|
12669
12367
|
exports.SizeTable = SizeTable;
|
|
12670
12368
|
exports.SliderNavigation = SliderNavigation;
|
|
12369
|
+
exports.StarList = StarList;
|
|
12671
12370
|
exports.TextButton = TextButton;
|
|
12672
12371
|
exports.ThemeProvider = ThemeProvider;
|
|
12673
12372
|
exports.Timer = Timer;
|