@helpdice/ui 1.7.8 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breadcrumbs/index.js +10 -7
- package/dist/card/index.js +10 -7
- package/dist/carousal/CSSTranslate.d.ts +2 -0
- package/dist/carousal/component/Arrow.d.ts +9 -0
- package/dist/carousal/component/Indicator.d.ts +9 -0
- package/dist/carousal/component/Thumbs.d.ts +65 -0
- package/dist/carousal/component/animations.d.ts +27 -0
- package/dist/carousal/component/index.d.ts +87 -0
- package/dist/carousal/component/types.d.ts +79 -0
- package/dist/carousal/component/utils.d.ts +15 -0
- package/dist/carousal/cssClasses.d.ts +11 -0
- package/dist/carousal/dimensions.d.ts +1 -0
- package/dist/carousal/index.d.ts +3 -0
- package/dist/carousal/index.js +16085 -0
- package/dist/carousal/shims/document.d.ts +2 -0
- package/dist/carousal/shims/window.d.ts +2 -0
- package/dist/image/index.js +10 -7
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2793 -197
- package/dist/link/index.js +10 -7
- package/dist/link/link.d.ts +2 -1
- package/dist/swipe/index.d.ts +4 -0
- package/dist/swipe/index.js +1314 -0
- package/dist/swipe/react-swipe.d.ts +58 -0
- package/dist/user/index.js +10 -7
- package/esm/carousal/CSSTranslate.d.ts +2 -0
- package/esm/carousal/CSSTranslate.js +7 -0
- package/esm/carousal/component/Arrow.d.ts +9 -0
- package/esm/carousal/component/Arrow.js +21 -0
- package/esm/carousal/component/Indicator.d.ts +9 -0
- package/esm/carousal/component/Indicator.js +23 -0
- package/esm/carousal/component/Thumbs.d.ts +65 -0
- package/esm/carousal/{Thumbs.js → component/Thumbs.js} +41 -12
- package/esm/carousal/component/animations.d.ts +27 -0
- package/esm/carousal/{animations.js → component/animations.js} +1 -1
- package/esm/carousal/component/index.d.ts +87 -0
- package/esm/carousal/component/index.js +698 -0
- package/esm/carousal/component/types.d.ts +79 -0
- package/esm/carousal/component/utils.d.ts +15 -0
- package/esm/carousal/{utils.js → component/utils.js} +1 -1
- package/esm/carousal/cssClasses.d.ts +11 -0
- package/esm/carousal/cssClasses.js +56 -0
- package/esm/carousal/dimensions.d.ts +1 -0
- package/esm/carousal/dimensions.js +6 -0
- package/esm/carousal/index.d.ts +3 -0
- package/esm/carousal/index.js +2 -683
- package/esm/carousal/main.js +59 -0
- package/esm/carousal/shims/document.d.ts +2 -0
- package/esm/carousal/shims/document.js +3 -0
- package/esm/carousal/shims/window.d.ts +2 -0
- package/esm/carousal/shims/window.js +3 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +6 -1
- package/esm/link/link.d.ts +2 -1
- package/esm/link/link.js +10 -7
- package/esm/login-with/index.js +0 -2
- package/esm/swipe/demo.js +57 -0
- package/esm/swipe/index.d.ts +4 -0
- package/esm/swipe/index.js +2 -0
- package/esm/swipe/react-swipe.d.ts +58 -0
- package/esm/swipe/react-swipe.js +246 -0
- package/package.json +4 -3
- package/esm/carousal/Arrow.js +0 -18
- package/esm/carousal/Indicator.js +0 -20
- /package/esm/carousal/{types.js → component/types.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -3388,7 +3388,7 @@ var generateGetAllScaleProps = function generateGetAllScaleProps(props) {
|
|
|
3388
3388
|
return getAllScaleProps;
|
|
3389
3389
|
};
|
|
3390
3390
|
|
|
3391
|
-
var _excluded$
|
|
3391
|
+
var _excluded$1o = ["children"];
|
|
3392
3392
|
var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
|
|
3393
3393
|
if (scale === 1) return scale;
|
|
3394
3394
|
var diff = Math.abs((scale - 1) / 2);
|
|
@@ -3398,7 +3398,7 @@ var withScale = function withScale(Render) {
|
|
|
3398
3398
|
var ScaleFC = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3399
3399
|
var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
|
|
3400
3400
|
var children = _ref.children,
|
|
3401
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3401
|
+
props = _objectWithoutProperties(_ref, _excluded$1o);
|
|
3402
3402
|
var _useTheme = distExports.useTheme(),
|
|
3403
3403
|
layout = _useTheme.layout;
|
|
3404
3404
|
var paddingLeft = props.paddingLeft,
|
|
@@ -3481,7 +3481,7 @@ var withScale = function withScale(Render) {
|
|
|
3481
3481
|
return ScaleFC;
|
|
3482
3482
|
};
|
|
3483
3483
|
|
|
3484
|
-
var _excluded$
|
|
3484
|
+
var _excluded$1n = ["label", "labelRight", "color", "error", "type", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled"];
|
|
3485
3485
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
3486
3486
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
3487
3487
|
target: el,
|
|
@@ -3521,7 +3521,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3521
3521
|
children = _ref.children,
|
|
3522
3522
|
_ref$disabled = _ref.disabled,
|
|
3523
3523
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
3524
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3524
|
+
props = _objectWithoutProperties(_ref, _excluded$1n);
|
|
3525
3525
|
var theme = distExports.useTheme();
|
|
3526
3526
|
var _useScale = useScale(),
|
|
3527
3527
|
SCALES = _useScale.SCALES;
|
|
@@ -3670,7 +3670,7 @@ tuple('hover', 'click');
|
|
|
3670
3670
|
tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
|
|
3671
3671
|
tuple('start', 'center', 'end', 'left', 'right');
|
|
3672
3672
|
|
|
3673
|
-
var _excluded$
|
|
3673
|
+
var _excluded$1m = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className", "initialValue", "onChange", "value", "placeholder", "resize"];
|
|
3674
3674
|
tuple('none', 'both', 'horizontal', 'vertical', 'initial', 'inherit');
|
|
3675
3675
|
var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3676
3676
|
var _ref$type = _ref.type,
|
|
@@ -3690,7 +3690,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3690
3690
|
placeholder = _ref.placeholder,
|
|
3691
3691
|
_ref$resize = _ref.resize,
|
|
3692
3692
|
resize = _ref$resize === void 0 ? 'none' : _ref$resize,
|
|
3693
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3693
|
+
props = _objectWithoutProperties(_ref, _excluded$1m);
|
|
3694
3694
|
var theme = distExports.useTheme();
|
|
3695
3695
|
var _useScale = useScale(),
|
|
3696
3696
|
SCALES = _useScale.SCALES;
|
|
@@ -3790,11 +3790,11 @@ var PasswordIcon = function PasswordIcon(_ref) {
|
|
|
3790
3790
|
};
|
|
3791
3791
|
var MemoPasswordIcon = /*#__PURE__*/React.memo(PasswordIcon);
|
|
3792
3792
|
|
|
3793
|
-
var _excluded$
|
|
3793
|
+
var _excluded$1l = ["hideToggle", "children"];
|
|
3794
3794
|
var InputPasswordComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3795
3795
|
var hideToggle = _ref.hideToggle,
|
|
3796
3796
|
children = _ref.children,
|
|
3797
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3797
|
+
props = _objectWithoutProperties(_ref, _excluded$1l);
|
|
3798
3798
|
var _useScale = useScale(),
|
|
3799
3799
|
getAllScaleProps = _useScale.getAllScaleProps;
|
|
3800
3800
|
var inputRef = React.useRef(null);
|
|
@@ -3955,7 +3955,7 @@ var AutoCompleteEmpty = function AutoCompleteEmpty(_ref) {
|
|
|
3955
3955
|
};
|
|
3956
3956
|
AutoCompleteEmpty.displayName = 'AutoCompleteEmpty';
|
|
3957
3957
|
|
|
3958
|
-
var _excluded$
|
|
3958
|
+
var _excluded$1k = ["children", "type", "color", "className", "spaceRatio"];
|
|
3959
3959
|
var getIconBgColor = function getIconBgColor(type, palette, color) {
|
|
3960
3960
|
var colors = {
|
|
3961
3961
|
"default": palette.accents_6,
|
|
@@ -3975,7 +3975,7 @@ var LoadingComponent = function LoadingComponent(_ref) {
|
|
|
3975
3975
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
3976
3976
|
_ref$spaceRatio = _ref.spaceRatio,
|
|
3977
3977
|
spaceRatio = _ref$spaceRatio === void 0 ? 1 : _ref$spaceRatio,
|
|
3978
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3978
|
+
props = _objectWithoutProperties(_ref, _excluded$1k);
|
|
3979
3979
|
var theme = distExports.useTheme();
|
|
3980
3980
|
var _useScale = useScale(),
|
|
3981
3981
|
SCALES = _useScale.SCALES;
|
|
@@ -13879,7 +13879,7 @@ const HelpCircle = ({ color, strokeWidth, set }) => {
|
|
|
13879
13879
|
HelpCircle.displayName = "HelpCircle";
|
|
13880
13880
|
createIcon(HelpCircle);
|
|
13881
13881
|
|
|
13882
|
-
var _excluded$
|
|
13882
|
+
var _excluded$1j = ["options", "initialValue", "onSelect", "onSearch", "onChange", "searching", "children", "type", "color", "value", "clearable", "disabled", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "disableFreeSolo", "getPopupContainer"];
|
|
13883
13883
|
var childrenToOptionsNode = function childrenToOptionsNode(options) {
|
|
13884
13884
|
return options.map(function (item, index) {
|
|
13885
13885
|
var key = "auto-complete-item-".concat(index);
|
|
@@ -13928,7 +13928,7 @@ var AutoCompleteComponent = /*#__PURE__*/React.forwardRef(function (_ref, userRe
|
|
|
13928
13928
|
_ref$disableFreeSolo = _ref.disableFreeSolo,
|
|
13929
13929
|
disableFreeSolo = _ref$disableFreeSolo === void 0 ? false : _ref$disableFreeSolo,
|
|
13930
13930
|
getPopupContainer = _ref.getPopupContainer,
|
|
13931
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
13931
|
+
props = _objectWithoutProperties(_ref, _excluded$1j);
|
|
13932
13932
|
var resetTimer = React.useRef(0); // DEFAULT Value 0
|
|
13933
13933
|
var _useScale = useScale(),
|
|
13934
13934
|
SCALES = _useScale.SCALES,
|
|
@@ -14073,7 +14073,7 @@ AutoComplete.Option = AutoCompleteItemComponent;
|
|
|
14073
14073
|
AutoComplete.Searching = AutoCompleteSearch;
|
|
14074
14074
|
AutoComplete.Empty = AutoCompleteEmpty;
|
|
14075
14075
|
|
|
14076
|
-
var _excluded$
|
|
14076
|
+
var _excluded$1i = ["src", "stacked", "text", "isSquare", "className", "children"];
|
|
14077
14077
|
|
|
14078
14078
|
// type NativeAttrs = Omit<
|
|
14079
14079
|
// Partial<React.ImgHTMLAttributes<any> & React.HTMLAttributes<any>>,
|
|
@@ -14095,7 +14095,7 @@ var AvatarComponent = function AvatarComponent(_ref) {
|
|
|
14095
14095
|
_ref$className = _ref.className,
|
|
14096
14096
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14097
14097
|
children = _ref.children,
|
|
14098
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
14098
|
+
props = _objectWithoutProperties(_ref, _excluded$1i);
|
|
14099
14099
|
var theme = distExports.useTheme();
|
|
14100
14100
|
var _useScale = useScale(),
|
|
14101
14101
|
SCALES = _useScale.SCALES;
|
|
@@ -14145,7 +14145,7 @@ var AvatarGroup = withScale(AvatarGroupComponent);
|
|
|
14145
14145
|
|
|
14146
14146
|
Avatar.Group = AvatarGroup;
|
|
14147
14147
|
|
|
14148
|
-
var _excluded$
|
|
14148
|
+
var _excluded$1h = ["color", "className", "children", "dot"];
|
|
14149
14149
|
var getBgColor = function getBgColor(type, palette) {
|
|
14150
14150
|
var colors = {
|
|
14151
14151
|
"default": palette.foreground,
|
|
@@ -14164,7 +14164,7 @@ var BadgeComponent = function BadgeComponent(_ref) {
|
|
|
14164
14164
|
children = _ref.children,
|
|
14165
14165
|
_ref$dot = _ref.dot,
|
|
14166
14166
|
dot = _ref$dot === void 0 ? false : _ref$dot,
|
|
14167
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
14167
|
+
props = _objectWithoutProperties(_ref, _excluded$1h);
|
|
14168
14168
|
var theme = distExports.useTheme();
|
|
14169
14169
|
var _useScale = useScale(),
|
|
14170
14170
|
SCALES = _useScale.SCALES;
|
|
@@ -14365,7 +14365,7 @@ var LinkIconComponent = function LinkIconComponent() {
|
|
|
14365
14365
|
LinkIconComponent.displayName = 'LinkIcon';
|
|
14366
14366
|
var LinkIcon = /*#__PURE__*/React.memo(LinkIconComponent);
|
|
14367
14367
|
|
|
14368
|
-
var _excluded$
|
|
14368
|
+
var _excluded$1g = ["href", "showColor", "underline", "children", "className", "block", "arrow", "icon"];
|
|
14369
14369
|
var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14370
14370
|
var _ref$href = _ref.href,
|
|
14371
14371
|
href = _ref$href === void 0 ? '' : _ref$href,
|
|
@@ -14378,9 +14378,10 @@ var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14378
14378
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14379
14379
|
_ref$block = _ref.block,
|
|
14380
14380
|
block = _ref$block === void 0 ? false : _ref$block,
|
|
14381
|
-
_ref$
|
|
14382
|
-
|
|
14383
|
-
|
|
14381
|
+
_ref$arrow = _ref.arrow,
|
|
14382
|
+
arrow = _ref$arrow === void 0 ? false : _ref$arrow,
|
|
14383
|
+
icon = _ref.icon,
|
|
14384
|
+
props = _objectWithoutProperties(_ref, _excluded$1g);
|
|
14384
14385
|
var theme = distExports.useTheme();
|
|
14385
14386
|
var _useScale = useScale(),
|
|
14386
14387
|
SCALES = _useScale.SCALES;
|
|
@@ -14394,16 +14395,18 @@ var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14394
14395
|
href: href
|
|
14395
14396
|
}, props, {
|
|
14396
14397
|
ref: ref,
|
|
14397
|
-
className: _JSXStyle.dynamic([["
|
|
14398
|
-
}),
|
|
14399
|
-
|
|
14398
|
+
className: _JSXStyle.dynamic([["1742013413", [linkColor, block ? theme.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme.palette.link, 0.1) : 'unset', hoverColor]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
14399
|
+
}), icon && icon, /*#__PURE__*/React.createElement("span", {
|
|
14400
|
+
className: _JSXStyle.dynamic([["1742013413", [linkColor, block ? theme.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme.palette.link, 0.1) : 'unset', hoverColor]]])
|
|
14401
|
+
}, children, arrow && /*#__PURE__*/React.createElement(LinkIcon, null)), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
14402
|
+
id: "1742013413",
|
|
14400
14403
|
dynamic: [linkColor, block ? theme.layout.radius : 0, SCALES.font(1, 'inherit'), SCALES.width(1, 'fit-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.pt(0.125), SCALES.pr(0.25), SCALES.pb(0.125), SCALES.pl(0.25), SCALES.mt(0), SCALES.mr(-0.125), SCALES.mb(0), SCALES.ml(-0.125), decoration, block ? addColorAlpha(theme.palette.link, 0.1) : 'unset', hoverColor]
|
|
14401
|
-
}, ".link.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:
|
|
14404
|
+
}, ".link.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:inherit;gap:5px;color:".concat(linkColor, ";-webkit-text-decoration:none;text-decoration:none;border-radius:").concat(block ? theme.layout.radius : 0, ";-webkit-transition:color 200ms ease 0ms;transition:color 200ms ease 0ms;font-size:").concat(SCALES.font(1, 'inherit'), ";width:").concat(SCALES.width(1, 'fit-content'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";}.block.__jsx-style-dynamic-selector{padding:").concat(SCALES.pt(0.125), " ").concat(SCALES.pr(0.25), " ").concat(SCALES.pb(0.125), " ").concat(SCALES.pl(0.25), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(-0.125), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(-0.125), ";}.link.__jsx-style-dynamic-selector:hover,.link.__jsx-style-dynamic-selector:active,.link.__jsx-style-dynamic-selector:focus{-webkit-text-decoration:").concat(decoration, ";text-decoration:").concat(decoration, ";}.link.__jsx-style-dynamic-selector:hover{background-color:").concat(block ? addColorAlpha(theme.palette.link, 0.1) : 'unset', ";color:").concat(hoverColor, ";}")));
|
|
14402
14405
|
});
|
|
14403
14406
|
LinkComponent.displayName = 'Link';
|
|
14404
14407
|
var Link = withScale(LinkComponent);
|
|
14405
14408
|
|
|
14406
|
-
var _excluded$
|
|
14409
|
+
var _excluded$1f = ["href", "nextLink", "onClick", "children", "className"];
|
|
14407
14410
|
var BreadcrumbsItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14408
14411
|
var href = _ref.href,
|
|
14409
14412
|
_ref$nextLink = _ref.nextLink,
|
|
@@ -14412,7 +14415,7 @@ var BreadcrumbsItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14412
14415
|
children = _ref.children,
|
|
14413
14416
|
_ref$className = _ref.className,
|
|
14414
14417
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14415
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
14418
|
+
props = _objectWithoutProperties(_ref, _excluded$1f);
|
|
14416
14419
|
var isLink = React.useMemo(function () {
|
|
14417
14420
|
return href !== undefined || nextLink;
|
|
14418
14421
|
}, [href, nextLink]);
|
|
@@ -14509,7 +14512,7 @@ var ButtonLoading = function ButtonLoading(_ref) {
|
|
|
14509
14512
|
};
|
|
14510
14513
|
ButtonLoading.displayName = 'ButtonLoading';
|
|
14511
14514
|
|
|
14512
|
-
var _excluded$
|
|
14515
|
+
var _excluded$1e = ["isRight", "isSingle", "children", "className"];
|
|
14513
14516
|
var ButtonIcon = function ButtonIcon(_ref) {
|
|
14514
14517
|
var _ref$isRight = _ref.isRight,
|
|
14515
14518
|
isRight = _ref$isRight === void 0 ? false : _ref$isRight,
|
|
@@ -14517,7 +14520,7 @@ var ButtonIcon = function ButtonIcon(_ref) {
|
|
|
14517
14520
|
children = _ref.children,
|
|
14518
14521
|
_ref$className = _ref.className,
|
|
14519
14522
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14520
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
14523
|
+
props = _objectWithoutProperties(_ref, _excluded$1e);
|
|
14521
14524
|
var classes = distExports.useClasses('icon', {
|
|
14522
14525
|
right: isRight,
|
|
14523
14526
|
single: isSingle
|
|
@@ -14764,7 +14767,7 @@ var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
|
14764
14767
|
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
14765
14768
|
};
|
|
14766
14769
|
|
|
14767
|
-
var _excluded$
|
|
14770
|
+
var _excluded$1d = ["children", "disabled", "color", "loading", "shadow", "ghost", "effect", "round", "onClick", "auto", "icon", "type", "iconRight", "className", "crossOrigin"];
|
|
14768
14771
|
var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
14769
14772
|
var theme = distExports.useTheme();
|
|
14770
14773
|
var _useScale = useScale(),
|
|
@@ -14813,7 +14816,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
14813
14816
|
_filteredProps$classN = filteredProps.className,
|
|
14814
14817
|
className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
|
|
14815
14818
|
filteredProps.crossOrigin;
|
|
14816
|
-
var props = _objectWithoutProperties(filteredProps, _excluded$
|
|
14819
|
+
var props = _objectWithoutProperties(filteredProps, _excluded$1d);
|
|
14817
14820
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
14818
14821
|
|
|
14819
14822
|
var _useMemo = React.useMemo(function () {
|
|
@@ -15108,7 +15111,7 @@ var useButtonDropdown = function useButtonDropdown() {
|
|
|
15108
15111
|
return React.useContext(ButtonDropdownContext);
|
|
15109
15112
|
};
|
|
15110
15113
|
|
|
15111
|
-
var _excluded$
|
|
15114
|
+
var _excluded$1c = ["children", "onClick", "className", "main", "icon", "type"];
|
|
15112
15115
|
var ButtonDropdownItem = function ButtonDropdownItem(_ref) {
|
|
15113
15116
|
var children = _ref.children,
|
|
15114
15117
|
_ref$onClick = _ref.onClick,
|
|
@@ -15119,7 +15122,7 @@ var ButtonDropdownItem = function ButtonDropdownItem(_ref) {
|
|
|
15119
15122
|
main = _ref$main === void 0 ? false : _ref$main,
|
|
15120
15123
|
icon = _ref.icon,
|
|
15121
15124
|
selfType = _ref.type,
|
|
15122
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15125
|
+
props = _objectWithoutProperties(_ref, _excluded$1c);
|
|
15123
15126
|
var theme = distExports.useTheme();
|
|
15124
15127
|
var _useScale = useScale(),
|
|
15125
15128
|
SCALES = _useScale.SCALES;
|
|
@@ -15156,7 +15159,7 @@ var ButtonDropdownItem = function ButtonDropdownItem(_ref) {
|
|
|
15156
15159
|
};
|
|
15157
15160
|
ButtonDropdownItem.displayName = 'ButtonDropdownItem';
|
|
15158
15161
|
|
|
15159
|
-
var _excluded$
|
|
15162
|
+
var _excluded$1b = ["children", "type", "auto", "className", "disabled", "loading", "icon"];
|
|
15160
15163
|
var stopPropagation$1 = function stopPropagation(event) {
|
|
15161
15164
|
event.stopPropagation();
|
|
15162
15165
|
event.nativeEvent.stopImmediatePropagation();
|
|
@@ -15174,7 +15177,7 @@ var ButtonDropdownComponent = function ButtonDropdownComponent(_ref) {
|
|
|
15174
15177
|
_ref$loading = _ref.loading,
|
|
15175
15178
|
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
15176
15179
|
icon = _ref.icon,
|
|
15177
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15180
|
+
props = _objectWithoutProperties(_ref, _excluded$1b);
|
|
15178
15181
|
var _useScale = useScale(),
|
|
15179
15182
|
SCALES = _useScale.SCALES;
|
|
15180
15183
|
var ref = React.useRef(null);
|
|
@@ -15248,7 +15251,7 @@ var ButtonDropdown = withScale(ButtonDropdownComponent);
|
|
|
15248
15251
|
/* "use client" */
|
|
15249
15252
|
ButtonDropdown.Item = ButtonDropdownItem;
|
|
15250
15253
|
|
|
15251
|
-
var _excluded$
|
|
15254
|
+
var _excluded$1a = ["disabled", "type", "ghost", "vertical", "children", "className"];
|
|
15252
15255
|
var getGroupBorderColors = function getGroupBorderColors(palette, props) {
|
|
15253
15256
|
var _props$ghost = props.ghost,
|
|
15254
15257
|
ghost = _props$ghost === void 0 ? false : _props$ghost,
|
|
@@ -15275,7 +15278,7 @@ var ButtonGroupComponent = function ButtonGroupComponent(groupProps) {
|
|
|
15275
15278
|
vertical = groupProps.vertical,
|
|
15276
15279
|
children = groupProps.children,
|
|
15277
15280
|
className = groupProps.className,
|
|
15278
|
-
props = _objectWithoutProperties(groupProps, _excluded$
|
|
15281
|
+
props = _objectWithoutProperties(groupProps, _excluded$1a);
|
|
15279
15282
|
var initialValue = React.useMemo(function () {
|
|
15280
15283
|
return {
|
|
15281
15284
|
disabled: disabled,
|
|
@@ -15332,7 +15335,7 @@ var useProportions = function useProportions(value, max) {
|
|
|
15332
15335
|
}, [value, max, maxFixed]);
|
|
15333
15336
|
};
|
|
15334
15337
|
|
|
15335
|
-
var _excluded$
|
|
15338
|
+
var _excluded$19 = ["value", "limit", "color", "className"];
|
|
15336
15339
|
var getColor$3 = function getColor(val, palette) {
|
|
15337
15340
|
if (val < 33) return palette.cyan;
|
|
15338
15341
|
if (val < 66) return palette.warning;
|
|
@@ -15346,7 +15349,7 @@ var CapacityComponent = function CapacityComponent(_ref) {
|
|
|
15346
15349
|
userColor = _ref.color,
|
|
15347
15350
|
_ref$className = _ref.className,
|
|
15348
15351
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15349
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15352
|
+
props = _objectWithoutProperties(_ref, _excluded$19);
|
|
15350
15353
|
var theme = distExports.useTheme();
|
|
15351
15354
|
var _useScale = useScale(),
|
|
15352
15355
|
SCALES = _useScale.SCALES;
|
|
@@ -15423,14 +15426,14 @@ var getStyles$1 = function getStyles(type, palette, isShadow) {
|
|
|
15423
15426
|
});
|
|
15424
15427
|
};
|
|
15425
15428
|
|
|
15426
|
-
var _excluded$
|
|
15429
|
+
var _excluded$18 = ["children", "className", "disableAutoMargin"];
|
|
15427
15430
|
var CardFooterComponent = function CardFooterComponent(_ref) {
|
|
15428
15431
|
var children = _ref.children,
|
|
15429
15432
|
_ref$className = _ref.className,
|
|
15430
15433
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15431
15434
|
_ref$disableAutoMargi = _ref.disableAutoMargin,
|
|
15432
15435
|
disableAutoMargin = _ref$disableAutoMargi === void 0 ? false : _ref$disableAutoMargi,
|
|
15433
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15436
|
+
props = _objectWithoutProperties(_ref, _excluded$18);
|
|
15434
15437
|
var theme = distExports.useTheme();
|
|
15435
15438
|
var _useScale = useScale(),
|
|
15436
15439
|
SCALES = _useScale.SCALES;
|
|
@@ -15447,12 +15450,12 @@ var CardFooterComponent = function CardFooterComponent(_ref) {
|
|
|
15447
15450
|
CardFooterComponent.displayName = 'CardFooter';
|
|
15448
15451
|
var CardFooter = withScale(CardFooterComponent);
|
|
15449
15452
|
|
|
15450
|
-
var _excluded$
|
|
15453
|
+
var _excluded$17 = ["className", "children"];
|
|
15451
15454
|
var CardContentComponent = function CardContentComponent(_ref) {
|
|
15452
15455
|
var _ref$className = _ref.className,
|
|
15453
15456
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15454
15457
|
children = _ref.children,
|
|
15455
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15458
|
+
props = _objectWithoutProperties(_ref, _excluded$17);
|
|
15456
15459
|
var _useScale = useScale(),
|
|
15457
15460
|
SCALES = _useScale.SCALES;
|
|
15458
15461
|
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
@@ -15465,11 +15468,11 @@ var CardContentComponent = function CardContentComponent(_ref) {
|
|
|
15465
15468
|
CardContentComponent.displayName = 'CardContent';
|
|
15466
15469
|
var CardContent = withScale(CardContentComponent);
|
|
15467
15470
|
|
|
15468
|
-
var _excluded$
|
|
15471
|
+
var _excluded$16 = ["opacity"];
|
|
15469
15472
|
var ImageSkeleton = /*#__PURE__*/React.memo(function (_ref) {
|
|
15470
15473
|
var _ref$opacity = _ref.opacity,
|
|
15471
15474
|
opacity = _ref$opacity === void 0 ? 0.5 : _ref$opacity,
|
|
15472
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15475
|
+
props = _objectWithoutProperties(_ref, _excluded$16);
|
|
15473
15476
|
var theme = distExports.useTheme();
|
|
15474
15477
|
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
15475
15478
|
className: _JSXStyle.dynamic([["2946022605", [theme.palette.accents_1, theme.palette.accents_2, theme.palette.accents_2, theme.palette.accents_1, opacity]]]) + " " + (props && props.className != null && props.className || "skeleton")
|
|
@@ -15495,7 +15498,7 @@ var getHostFromUrl = function getHostFromUrl(url) {
|
|
|
15495
15498
|
}
|
|
15496
15499
|
};
|
|
15497
15500
|
|
|
15498
|
-
var _excluded$
|
|
15501
|
+
var _excluded$15 = ["src", "disableSkeleton", "className", "maxDelay"];
|
|
15499
15502
|
var ImageComponent = function ImageComponent(_ref) {
|
|
15500
15503
|
var src = _ref.src,
|
|
15501
15504
|
_ref$disableSkeleton = _ref.disableSkeleton,
|
|
@@ -15504,7 +15507,7 @@ var ImageComponent = function ImageComponent(_ref) {
|
|
|
15504
15507
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15505
15508
|
_ref$maxDelay = _ref.maxDelay,
|
|
15506
15509
|
maxDelay = _ref$maxDelay === void 0 ? 3000 : _ref$maxDelay,
|
|
15507
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15510
|
+
props = _objectWithoutProperties(_ref, _excluded$15);
|
|
15508
15511
|
var _useScale = useScale(),
|
|
15509
15512
|
SCALES = _useScale.SCALES,
|
|
15510
15513
|
getScaleProps = _useScale.getScaleProps;
|
|
@@ -15600,7 +15603,7 @@ var getBrowserColors = function getBrowserColors(invert, palette) {
|
|
|
15600
15603
|
};
|
|
15601
15604
|
};
|
|
15602
15605
|
|
|
15603
|
-
var _excluded$
|
|
15606
|
+
var _excluded$14 = ["url", "title", "children", "showFullLink", "invert", "anchorProps", "className"];
|
|
15604
15607
|
var getTitle = function getTitle(title, colors) {
|
|
15605
15608
|
return /*#__PURE__*/React.createElement("div", {
|
|
15606
15609
|
className: _JSXStyle.dynamic([["524099755", [colors.titleColor]]]) + " " + "title"
|
|
@@ -15635,7 +15638,7 @@ var ImageBrowserComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
15635
15638
|
anchorProps = _ref$anchorProps === void 0 ? {} : _ref$anchorProps,
|
|
15636
15639
|
_ref$className = _ref.className,
|
|
15637
15640
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15638
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15641
|
+
props = _objectWithoutProperties(_ref, _excluded$14);
|
|
15639
15642
|
var theme = distExports.useTheme();
|
|
15640
15643
|
var _useScale = useScale(),
|
|
15641
15644
|
SCALES = _useScale.SCALES;
|
|
@@ -15671,7 +15674,7 @@ var ImageBrowser = withScale(ImageBrowserComponent);
|
|
|
15671
15674
|
|
|
15672
15675
|
Image.Browser = ImageBrowser;
|
|
15673
15676
|
|
|
15674
|
-
var _excluded$
|
|
15677
|
+
var _excluded$13 = ["children", "hoverable", "className", "shadow", "type"];
|
|
15675
15678
|
var CardComponent = function CardComponent(_ref) {
|
|
15676
15679
|
var children = _ref.children,
|
|
15677
15680
|
_ref$hoverable = _ref.hoverable,
|
|
@@ -15682,7 +15685,7 @@ var CardComponent = function CardComponent(_ref) {
|
|
|
15682
15685
|
shadow = _ref$shadow === void 0 ? false : _ref$shadow,
|
|
15683
15686
|
_ref$type = _ref.type,
|
|
15684
15687
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
15685
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15688
|
+
props = _objectWithoutProperties(_ref, _excluded$13);
|
|
15686
15689
|
var theme = distExports.useTheme();
|
|
15687
15690
|
var _useScale = useScale(),
|
|
15688
15691
|
SCALES = _useScale.SCALES;
|
|
@@ -15817,7 +15820,7 @@ var getColors$6 = function getColors(palette, status) {
|
|
|
15817
15820
|
return colors[status];
|
|
15818
15821
|
};
|
|
15819
15822
|
|
|
15820
|
-
var _excluded$
|
|
15823
|
+
var _excluded$12 = ["checked", "initialChecked", "disabled", "onChange", "className", "children", "type", "value", "block"];
|
|
15821
15824
|
var CheckboxComponent = function CheckboxComponent(_ref) {
|
|
15822
15825
|
var checked = _ref.checked,
|
|
15823
15826
|
_ref$initialChecked = _ref.initialChecked,
|
|
@@ -15834,7 +15837,7 @@ var CheckboxComponent = function CheckboxComponent(_ref) {
|
|
|
15834
15837
|
value = _ref$value === void 0 ? '' : _ref$value,
|
|
15835
15838
|
_ref$block = _ref.block,
|
|
15836
15839
|
block = _ref$block === void 0 ? false : _ref$block,
|
|
15837
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15840
|
+
props = _objectWithoutProperties(_ref, _excluded$12);
|
|
15838
15841
|
var theme = distExports.useTheme();
|
|
15839
15842
|
var _useScale = useScale(),
|
|
15840
15843
|
SCALES = _useScale.SCALES;
|
|
@@ -15914,7 +15917,7 @@ var CheckboxComponent = function CheckboxComponent(_ref) {
|
|
|
15914
15917
|
CheckboxComponent.displayName = 'Checkbox';
|
|
15915
15918
|
var Checkbox = withScale(CheckboxComponent);
|
|
15916
15919
|
|
|
15917
|
-
var _excluded$
|
|
15920
|
+
var _excluded$11 = ["disabled", "onChange", "value", "children", "className"];
|
|
15918
15921
|
var CheckboxGroupComponent = function CheckboxGroupComponent(_ref) {
|
|
15919
15922
|
var _ref$disabled = _ref.disabled,
|
|
15920
15923
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -15923,7 +15926,7 @@ var CheckboxGroupComponent = function CheckboxGroupComponent(_ref) {
|
|
|
15923
15926
|
children = _ref.children,
|
|
15924
15927
|
_ref$className = _ref.className,
|
|
15925
15928
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15926
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15929
|
+
props = _objectWithoutProperties(_ref, _excluded$11);
|
|
15927
15930
|
var _useScale = useScale(),
|
|
15928
15931
|
SCALES = _useScale.SCALES;
|
|
15929
15932
|
var _useState = React.useState([]),
|
|
@@ -15970,7 +15973,7 @@ var CheckboxGroup = withScale(CheckboxGroupComponent);
|
|
|
15970
15973
|
|
|
15971
15974
|
Checkbox.Group = CheckboxGroup;
|
|
15972
15975
|
|
|
15973
|
-
var _excluded
|
|
15976
|
+
var _excluded$10 = ["children", "block", "className", "name", "classic"];
|
|
15974
15977
|
var CodeComponent = function CodeComponent(_ref) {
|
|
15975
15978
|
var children = _ref.children,
|
|
15976
15979
|
_ref$block = _ref.block,
|
|
@@ -15981,7 +15984,7 @@ var CodeComponent = function CodeComponent(_ref) {
|
|
|
15981
15984
|
name = _ref$name === void 0 ? '' : _ref$name,
|
|
15982
15985
|
_ref$classic = _ref.classic,
|
|
15983
15986
|
classic = _ref$classic === void 0 ? false : _ref$classic,
|
|
15984
|
-
props = _objectWithoutProperties(_ref, _excluded
|
|
15987
|
+
props = _objectWithoutProperties(_ref, _excluded$10);
|
|
15985
15988
|
var _useScale = useScale(),
|
|
15986
15989
|
SCALES = _useScale.SCALES;
|
|
15987
15990
|
var theme = distExports.useTheme();
|
|
@@ -16177,12 +16180,12 @@ _defineProperty$1(CircularProgressbar, "defaultProps", {
|
|
|
16177
16180
|
text: ''
|
|
16178
16181
|
});
|
|
16179
16182
|
|
|
16180
|
-
var _excluded
|
|
16183
|
+
var _excluded$$ = ["children"];
|
|
16181
16184
|
// This is a wrapper around CircularProgressbar that allows passing children,
|
|
16182
16185
|
// which will be vertically and horizontally centered inside the progressbar automatically.
|
|
16183
16186
|
function CircularProgressbarWithChildren(props) {
|
|
16184
16187
|
props.children;
|
|
16185
|
-
var circularProgressbarProps = _objectWithoutProperties(props, _excluded
|
|
16188
|
+
var circularProgressbarProps = _objectWithoutProperties(props, _excluded$$);
|
|
16186
16189
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
16187
16190
|
"data-test-id": "CircularProgressbarWithChildren"
|
|
16188
16191
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
@@ -16286,7 +16289,7 @@ var useCollapseContext = function useCollapseContext() {
|
|
|
16286
16289
|
return React.useContext(CollapseContext);
|
|
16287
16290
|
};
|
|
16288
16291
|
|
|
16289
|
-
var _excluded$
|
|
16292
|
+
var _excluded$_ = ["children", "title", "subtitle", "initialVisible", "shadow", "className", "index"];
|
|
16290
16293
|
var CollapseComponent = function CollapseComponent(_ref) {
|
|
16291
16294
|
var children = _ref.children,
|
|
16292
16295
|
title = _ref.title,
|
|
@@ -16298,7 +16301,7 @@ var CollapseComponent = function CollapseComponent(_ref) {
|
|
|
16298
16301
|
_ref$className = _ref.className,
|
|
16299
16302
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
16300
16303
|
index = _ref.index,
|
|
16301
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16304
|
+
props = _objectWithoutProperties(_ref, _excluded$_);
|
|
16302
16305
|
var theme = distExports.useTheme();
|
|
16303
16306
|
var _useScale = useScale(),
|
|
16304
16307
|
SCALES = _useScale.SCALES;
|
|
@@ -16354,14 +16357,14 @@ var CollapseComponent = function CollapseComponent(_ref) {
|
|
|
16354
16357
|
CollapseComponent.displayName = 'Collapse';
|
|
16355
16358
|
var Collapse = withScale(CollapseComponent);
|
|
16356
16359
|
|
|
16357
|
-
var _excluded$
|
|
16360
|
+
var _excluded$Z = ["children", "accordion", "className"];
|
|
16358
16361
|
var CollapseGroupComponent = function CollapseGroupComponent(_ref) {
|
|
16359
16362
|
var children = _ref.children,
|
|
16360
16363
|
_ref$accordion = _ref.accordion,
|
|
16361
16364
|
accordion = _ref$accordion === void 0 ? true : _ref$accordion,
|
|
16362
16365
|
_ref$className = _ref.className,
|
|
16363
16366
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
16364
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16367
|
+
props = _objectWithoutProperties(_ref, _excluded$Z);
|
|
16365
16368
|
var _useScale = useScale(),
|
|
16366
16369
|
SCALES = _useScale.SCALES;
|
|
16367
16370
|
var _useCurrentState = distExports.useCurrentState([]),
|
|
@@ -16414,7 +16417,7 @@ var CollapseGroup = withScale(CollapseGroupComponent);
|
|
|
16414
16417
|
|
|
16415
16418
|
Collapse.Group = CollapseGroup;
|
|
16416
16419
|
|
|
16417
|
-
var _excluded$
|
|
16420
|
+
var _excluded$Y = ["title", "content", "className"];
|
|
16418
16421
|
var DescriptionComponent = function DescriptionComponent(_ref) {
|
|
16419
16422
|
var _ref$title = _ref.title,
|
|
16420
16423
|
title = _ref$title === void 0 ? 'Title' : _ref$title,
|
|
@@ -16422,7 +16425,7 @@ var DescriptionComponent = function DescriptionComponent(_ref) {
|
|
|
16422
16425
|
content = _ref$content === void 0 ? '' : _ref$content,
|
|
16423
16426
|
_ref$className = _ref.className,
|
|
16424
16427
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
16425
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16428
|
+
props = _objectWithoutProperties(_ref, _excluded$Y);
|
|
16426
16429
|
var theme = distExports.useTheme();
|
|
16427
16430
|
var _useScale = useScale(),
|
|
16428
16431
|
SCALES = _useScale.SCALES;
|
|
@@ -16441,7 +16444,7 @@ var DescriptionComponent = function DescriptionComponent(_ref) {
|
|
|
16441
16444
|
DescriptionComponent.displayName = 'Description';
|
|
16442
16445
|
var Description = withScale(DescriptionComponent);
|
|
16443
16446
|
|
|
16444
|
-
var _excluded$
|
|
16447
|
+
var _excluded$X = ["children", "caption", "shadow", "className"];
|
|
16445
16448
|
var DisplayComponent = function DisplayComponent(_ref) {
|
|
16446
16449
|
var children = _ref.children,
|
|
16447
16450
|
_ref$caption = _ref.caption,
|
|
@@ -16450,7 +16453,7 @@ var DisplayComponent = function DisplayComponent(_ref) {
|
|
|
16450
16453
|
shadow = _ref$shadow === void 0 ? false : _ref$shadow,
|
|
16451
16454
|
_ref$className = _ref.className,
|
|
16452
16455
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
16453
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16456
|
+
props = _objectWithoutProperties(_ref, _excluded$X);
|
|
16454
16457
|
var theme = distExports.useTheme();
|
|
16455
16458
|
var _useScale = useScale(),
|
|
16456
16459
|
SCALES = _useScale.SCALES;
|
|
@@ -16472,7 +16475,7 @@ var DisplayComponent = function DisplayComponent(_ref) {
|
|
|
16472
16475
|
DisplayComponent.displayName = 'Display';
|
|
16473
16476
|
var Display = withScale(DisplayComponent);
|
|
16474
16477
|
|
|
16475
|
-
var _excluded$
|
|
16478
|
+
var _excluded$W = ["type", "align", "children", "className"];
|
|
16476
16479
|
var getColor$2 = function getColor(type, palette) {
|
|
16477
16480
|
var colors = {
|
|
16478
16481
|
"default": palette.border,
|
|
@@ -16493,7 +16496,7 @@ var DividerComponent = function DividerComponent(_ref) {
|
|
|
16493
16496
|
children = _ref.children,
|
|
16494
16497
|
_ref$className = _ref.className,
|
|
16495
16498
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
16496
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16499
|
+
props = _objectWithoutProperties(_ref, _excluded$W);
|
|
16497
16500
|
var theme = distExports.useTheme();
|
|
16498
16501
|
var _useScale = useScale(),
|
|
16499
16502
|
SCALES = _useScale.SCALES;
|
|
@@ -16522,7 +16525,7 @@ var DividerComponent = function DividerComponent(_ref) {
|
|
|
16522
16525
|
DividerComponent.displayName = 'Divider';
|
|
16523
16526
|
var Divider = withScale(DividerComponent);
|
|
16524
16527
|
|
|
16525
|
-
var _excluded$
|
|
16528
|
+
var _excluded$V = ["type", "children", "className"];
|
|
16526
16529
|
var getColor$1 = function getColor(type, theme) {
|
|
16527
16530
|
var colors = {
|
|
16528
16531
|
"default": theme.palette.accents_2,
|
|
@@ -16538,7 +16541,7 @@ var DotComponent = function DotComponent(_ref) {
|
|
|
16538
16541
|
children = _ref.children,
|
|
16539
16542
|
_ref$className = _ref.className,
|
|
16540
16543
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
16541
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16544
|
+
props = _objectWithoutProperties(_ref, _excluded$V);
|
|
16542
16545
|
var theme = distExports.useTheme();
|
|
16543
16546
|
var _useScale = useScale(),
|
|
16544
16547
|
SCALES = _useScale.SCALES;
|
|
@@ -16873,7 +16876,7 @@ var getDrawerTransform = function getDrawerTransform(placement) {
|
|
|
16873
16876
|
return translates[placement];
|
|
16874
16877
|
};
|
|
16875
16878
|
|
|
16876
|
-
var _excluded$
|
|
16879
|
+
var _excluded$U = ["className", "children", "visible", "placement"];
|
|
16877
16880
|
var DrawerWrapper = function DrawerWrapper(_ref) {
|
|
16878
16881
|
var _ref$className = _ref.className,
|
|
16879
16882
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -16881,7 +16884,7 @@ var DrawerWrapper = function DrawerWrapper(_ref) {
|
|
|
16881
16884
|
_ref$visible = _ref.visible,
|
|
16882
16885
|
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
16883
16886
|
placement = _ref.placement,
|
|
16884
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16887
|
+
props = _objectWithoutProperties(_ref, _excluded$U);
|
|
16885
16888
|
var theme = distExports.useTheme();
|
|
16886
16889
|
var _useScale = useScale(),
|
|
16887
16890
|
SCALES = _useScale.SCALES;
|
|
@@ -16941,7 +16944,7 @@ var DrawerWrapper = function DrawerWrapper(_ref) {
|
|
|
16941
16944
|
};
|
|
16942
16945
|
DrawerWrapper.displayName = 'DrawerWrapper';
|
|
16943
16946
|
|
|
16944
|
-
var _excluded$
|
|
16947
|
+
var _excluded$T = ["visible", "keyboard", "disableBackdropClick", "onClose", "onContentClick", "wrapClassName", "children", "placement"];
|
|
16945
16948
|
var DrawerComponent = function DrawerComponent(_ref) {
|
|
16946
16949
|
var customVisible = _ref.visible,
|
|
16947
16950
|
_ref$keyboard = _ref.keyboard,
|
|
@@ -16955,7 +16958,7 @@ var DrawerComponent = function DrawerComponent(_ref) {
|
|
|
16955
16958
|
children = _ref.children,
|
|
16956
16959
|
_ref$placement = _ref.placement,
|
|
16957
16960
|
placement = _ref$placement === void 0 ? 'right' : _ref$placement,
|
|
16958
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16961
|
+
props = _objectWithoutProperties(_ref, _excluded$T);
|
|
16959
16962
|
var portal = usePortal('drawer');
|
|
16960
16963
|
var _useState = React.useState(false),
|
|
16961
16964
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -17000,12 +17003,12 @@ var DrawerComponent = function DrawerComponent(_ref) {
|
|
|
17000
17003
|
};
|
|
17001
17004
|
DrawerComponent.displayName = 'Drawer';
|
|
17002
17005
|
|
|
17003
|
-
var _excluded$
|
|
17006
|
+
var _excluded$S = ["className", "children"];
|
|
17004
17007
|
var ModalTitleComponent = function ModalTitleComponent(_ref) {
|
|
17005
17008
|
var _ref$className = _ref.className,
|
|
17006
17009
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17007
17010
|
children = _ref.children,
|
|
17008
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17011
|
+
props = _objectWithoutProperties(_ref, _excluded$S);
|
|
17009
17012
|
var theme = distExports.useTheme();
|
|
17010
17013
|
var _useScale = useScale(),
|
|
17011
17014
|
SCALES = _useScale.SCALES;
|
|
@@ -17019,12 +17022,12 @@ var ModalTitleComponent = function ModalTitleComponent(_ref) {
|
|
|
17019
17022
|
ModalTitleComponent.displayName = 'ModalTitle';
|
|
17020
17023
|
var ModalTitle = withScale(ModalTitleComponent);
|
|
17021
17024
|
|
|
17022
|
-
var _excluded$
|
|
17025
|
+
var _excluded$R = ["className", "children"];
|
|
17023
17026
|
var ModalSubtitleComponent = function ModalSubtitleComponent(_ref) {
|
|
17024
17027
|
var _ref$className = _ref.className,
|
|
17025
17028
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17026
17029
|
children = _ref.children,
|
|
17027
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17030
|
+
props = _objectWithoutProperties(_ref, _excluded$R);
|
|
17028
17031
|
var theme = distExports.useTheme();
|
|
17029
17032
|
var _useScale = useScale(),
|
|
17030
17033
|
SCALES = _useScale.SCALES;
|
|
@@ -17038,12 +17041,12 @@ var ModalSubtitleComponent = function ModalSubtitleComponent(_ref) {
|
|
|
17038
17041
|
ModalSubtitleComponent.displayName = 'ModalSubtitle';
|
|
17039
17042
|
var ModalSubtitle = withScale(ModalSubtitleComponent);
|
|
17040
17043
|
|
|
17041
|
-
var _excluded$
|
|
17044
|
+
var _excluded$Q = ["className", "children"];
|
|
17042
17045
|
var ModalContentComponent = function ModalContentComponent(_ref) {
|
|
17043
17046
|
var _ref$className = _ref.className,
|
|
17044
17047
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17045
17048
|
children = _ref.children,
|
|
17046
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17049
|
+
props = _objectWithoutProperties(_ref, _excluded$Q);
|
|
17047
17050
|
var _useScale = useScale(),
|
|
17048
17051
|
SCALES = _useScale.SCALES;
|
|
17049
17052
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
@@ -17061,12 +17064,12 @@ DrawerComponent.Title = ModalTitle;
|
|
|
17061
17064
|
DrawerComponent.Subtitle = ModalSubtitle;
|
|
17062
17065
|
DrawerComponent.Content = ModalContent;
|
|
17063
17066
|
|
|
17064
|
-
var _excluded$
|
|
17067
|
+
var _excluded$P = ["className", "children"];
|
|
17065
17068
|
var FieldsetTitle = function FieldsetTitle(_ref) {
|
|
17066
17069
|
var _ref$className = _ref.className,
|
|
17067
17070
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17068
17071
|
children = _ref.children,
|
|
17069
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17072
|
+
props = _objectWithoutProperties(_ref, _excluded$P);
|
|
17070
17073
|
var classes = distExports.useClasses('title', className);
|
|
17071
17074
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
17072
17075
|
className: "jsx-4105044205" + " " + (props && props.className != null && props.className || classes || "")
|
|
@@ -17076,12 +17079,12 @@ var FieldsetTitle = function FieldsetTitle(_ref) {
|
|
|
17076
17079
|
};
|
|
17077
17080
|
FieldsetTitle.displayName = 'FieldsetTitle';
|
|
17078
17081
|
|
|
17079
|
-
var _excluded$
|
|
17082
|
+
var _excluded$O = ["className", "children"];
|
|
17080
17083
|
var FieldsetSubtitle = function FieldsetSubtitle(_ref) {
|
|
17081
17084
|
var _ref$className = _ref.className,
|
|
17082
17085
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17083
17086
|
children = _ref.children,
|
|
17084
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17087
|
+
props = _objectWithoutProperties(_ref, _excluded$O);
|
|
17085
17088
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
17086
17089
|
className: "jsx-2265168013" + " " + (props && props.className != null && props.className || className || "")
|
|
17087
17090
|
}), children), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
@@ -17090,12 +17093,12 @@ var FieldsetSubtitle = function FieldsetSubtitle(_ref) {
|
|
|
17090
17093
|
};
|
|
17091
17094
|
FieldsetSubtitle.displayName = 'FieldsetSubtitle';
|
|
17092
17095
|
|
|
17093
|
-
var _excluded$
|
|
17096
|
+
var _excluded$N = ["className", "children"];
|
|
17094
17097
|
var FieldsetFooterComponent = function FieldsetFooterComponent(_ref) {
|
|
17095
17098
|
var _ref$className = _ref.className,
|
|
17096
17099
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17097
17100
|
children = _ref.children,
|
|
17098
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17101
|
+
props = _objectWithoutProperties(_ref, _excluded$N);
|
|
17099
17102
|
var theme = distExports.useTheme();
|
|
17100
17103
|
var _useScale = useScale(),
|
|
17101
17104
|
SCALES = _useScale.SCALES;
|
|
@@ -17109,12 +17112,12 @@ var FieldsetFooterComponent = function FieldsetFooterComponent(_ref) {
|
|
|
17109
17112
|
FieldsetFooterComponent.displayName = 'FieldsetFooter';
|
|
17110
17113
|
var FieldsetFooter = withScale(FieldsetFooterComponent);
|
|
17111
17114
|
|
|
17112
|
-
var _excluded$
|
|
17115
|
+
var _excluded$M = ["className", "children"];
|
|
17113
17116
|
var FieldsetContentComponent = function FieldsetContentComponent(_ref) {
|
|
17114
17117
|
var _ref$className = _ref.className,
|
|
17115
17118
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17116
17119
|
children = _ref.children,
|
|
17117
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17120
|
+
props = _objectWithoutProperties(_ref, _excluded$M);
|
|
17118
17121
|
var _useScale = useScale(),
|
|
17119
17122
|
SCALES = _useScale.SCALES;
|
|
17120
17123
|
var classes = distExports.useClasses('content', className);
|
|
@@ -17139,7 +17142,7 @@ var useFieldset = function useFieldset() {
|
|
|
17139
17142
|
return React.useContext(FieldsetContext);
|
|
17140
17143
|
};
|
|
17141
17144
|
|
|
17142
|
-
var _excluded$
|
|
17145
|
+
var _excluded$L = ["className", "title", "subtitle", "children", "value", "label"];
|
|
17143
17146
|
var FieldsetComponent = function FieldsetComponent(_ref) {
|
|
17144
17147
|
var _ref$className = _ref.className,
|
|
17145
17148
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -17152,7 +17155,7 @@ var FieldsetComponent = function FieldsetComponent(_ref) {
|
|
|
17152
17155
|
value = _ref$value === void 0 ? '' : _ref$value,
|
|
17153
17156
|
_ref$label = _ref.label,
|
|
17154
17157
|
label = _ref$label === void 0 ? '' : _ref$label,
|
|
17155
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17158
|
+
props = _objectWithoutProperties(_ref, _excluded$L);
|
|
17156
17159
|
var theme = distExports.useTheme();
|
|
17157
17160
|
var _useScale = useScale(),
|
|
17158
17161
|
SCALES = _useScale.SCALES;
|
|
@@ -17206,14 +17209,14 @@ var FieldsetComponent = function FieldsetComponent(_ref) {
|
|
|
17206
17209
|
FieldsetComponent.displayName = 'Fieldset';
|
|
17207
17210
|
var Fieldset = withScale(FieldsetComponent);
|
|
17208
17211
|
|
|
17209
|
-
var _excluded$
|
|
17212
|
+
var _excluded$K = ["className", "children", "value", "onChange"];
|
|
17210
17213
|
var FieldsetGroupComponent = function FieldsetGroupComponent(_ref) {
|
|
17211
17214
|
var _ref$className = _ref.className,
|
|
17212
17215
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17213
17216
|
children = _ref.children,
|
|
17214
17217
|
value = _ref.value,
|
|
17215
17218
|
onChange = _ref.onChange,
|
|
17216
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
17219
|
+
props = _objectWithoutProperties(_ref, _excluded$K);
|
|
17217
17220
|
var theme = distExports.useTheme();
|
|
17218
17221
|
var _useScale = useScale(),
|
|
17219
17222
|
SCALES = _useScale.SCALES;
|
|
@@ -21919,7 +21922,7 @@ function setNestedObjectValues(object, value) {
|
|
|
21919
21922
|
|
|
21920
21923
|
var __DEV__ = true;
|
|
21921
21924
|
|
|
21922
|
-
var _excluded$
|
|
21925
|
+
var _excluded$J = ["validateOnChange", "validateOnBlur", "validateOnMount", "isInitialValid", "enableReinitialize", "onSubmit"];
|
|
21923
21926
|
// State reducer
|
|
21924
21927
|
function formikReducer(state, msg) {
|
|
21925
21928
|
switch (msg.type) {
|
|
@@ -22003,7 +22006,7 @@ function useFormik(_ref) {
|
|
|
22003
22006
|
_ref$enableReinitiali = _ref.enableReinitialize,
|
|
22004
22007
|
enableReinitialize = _ref$enableReinitiali === void 0 ? false : _ref$enableReinitiali,
|
|
22005
22008
|
onSubmit = _ref.onSubmit,
|
|
22006
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
22009
|
+
rest = _objectWithoutProperties(_ref, _excluded$J);
|
|
22007
22010
|
var props = _objectSpread2({
|
|
22008
22011
|
validateOnChange: validateOnChange,
|
|
22009
22012
|
validateOnBlur: validateOnBlur,
|
|
@@ -22875,7 +22878,7 @@ function useEventCallback(fn) {
|
|
|
22875
22878
|
}, []);
|
|
22876
22879
|
}
|
|
22877
22880
|
|
|
22878
|
-
var _excluded$
|
|
22881
|
+
var _excluded$I = ["mapPropsToValues"],
|
|
22879
22882
|
_excluded2 = ["children"];
|
|
22880
22883
|
|
|
22881
22884
|
/**
|
|
@@ -22908,7 +22911,7 @@ function withFormik(_ref) {
|
|
|
22908
22911
|
}
|
|
22909
22912
|
return val;
|
|
22910
22913
|
} : _ref$mapPropsToValues,
|
|
22911
|
-
config = _objectWithoutProperties(_ref, _excluded$
|
|
22914
|
+
config = _objectWithoutProperties(_ref, _excluded$I);
|
|
22912
22915
|
return function createFormik(Component) {
|
|
22913
22916
|
var componentDisplayName = Component.displayName || Component.name || Component.constructor && Component.constructor.name || 'Component';
|
|
22914
22917
|
/**
|
|
@@ -22968,7 +22971,7 @@ function withFormik(_ref) {
|
|
|
22968
22971
|
};
|
|
22969
22972
|
}
|
|
22970
22973
|
|
|
22971
|
-
var _excluded$
|
|
22974
|
+
var _excluded$H = ["component", "formik", "render", "children", "name"];
|
|
22972
22975
|
var ErrorMessageImpl = /*#__PURE__*/function (_React$Component) {
|
|
22973
22976
|
function ErrorMessageImpl() {
|
|
22974
22977
|
_classCallCheck(this, ErrorMessageImpl);
|
|
@@ -22993,7 +22996,7 @@ var ErrorMessageImpl = /*#__PURE__*/function (_React$Component) {
|
|
|
22993
22996
|
render = _this$props.render,
|
|
22994
22997
|
children = _this$props.children,
|
|
22995
22998
|
name = _this$props.name,
|
|
22996
|
-
rest = _objectWithoutProperties(_this$props, _excluded$
|
|
22999
|
+
rest = _objectWithoutProperties(_this$props, _excluded$H);
|
|
22997
23000
|
var touch = getIn(formik.touched, name);
|
|
22998
23001
|
var error = getIn(formik.errors, name);
|
|
22999
23002
|
return !!touch && !!error ? render ? isFunction(render) ? render(error) : null : children ? isFunction(children) ? children(error) : null : component ? /*#__PURE__*/React__namespace.createElement(component, rest, error) : error : null;
|
|
@@ -23002,7 +23005,7 @@ var ErrorMessageImpl = /*#__PURE__*/function (_React$Component) {
|
|
|
23002
23005
|
}(React__namespace.Component);
|
|
23003
23006
|
var ErrorMessage = connect(ErrorMessageImpl);
|
|
23004
23007
|
|
|
23005
|
-
var _excluded$
|
|
23008
|
+
var _excluded$G = ["xs", "sm", "md", "lg", "xl", "justify", "direction", "alignItems", "alignContent", "children", "className"];
|
|
23006
23009
|
var getItemLayout = function getItemLayout(val) {
|
|
23007
23010
|
var display = val === 0 ? 'display: none;' : 'display: inherit;';
|
|
23008
23011
|
if (typeof val === 'number') {
|
|
@@ -23040,7 +23043,7 @@ var GridBasicItem = function GridBasicItem(_ref) {
|
|
|
23040
23043
|
children = _ref.children,
|
|
23041
23044
|
_ref$className = _ref.className,
|
|
23042
23045
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23043
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
23046
|
+
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
23044
23047
|
var theme = distExports.useTheme();
|
|
23045
23048
|
var _useScale = useScale(),
|
|
23046
23049
|
SCALES = _useScale.SCALES;
|
|
@@ -23080,12 +23083,12 @@ var GridBasicItem = function GridBasicItem(_ref) {
|
|
|
23080
23083
|
};
|
|
23081
23084
|
GridBasicItem.displayName = 'GridBasicItem';
|
|
23082
23085
|
|
|
23083
|
-
var _excluded$
|
|
23086
|
+
var _excluded$F = ["children", "className"];
|
|
23084
23087
|
var GridComponent = function GridComponent(_ref) {
|
|
23085
23088
|
var children = _ref.children,
|
|
23086
23089
|
_ref$className = _ref.className,
|
|
23087
23090
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23088
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
23091
|
+
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
23089
23092
|
var _useScale = useScale(),
|
|
23090
23093
|
SCALES = _useScale.SCALES;
|
|
23091
23094
|
var _styles$className = {
|
|
@@ -23105,7 +23108,7 @@ var GridComponent = function GridComponent(_ref) {
|
|
|
23105
23108
|
GridComponent.displayName = 'Grid';
|
|
23106
23109
|
var Grid = withScale(GridComponent);
|
|
23107
23110
|
|
|
23108
|
-
var _excluded$
|
|
23111
|
+
var _excluded$E = ["gap", "wrap", "children", "className"];
|
|
23109
23112
|
var GridContainerComponent = function GridContainerComponent(_ref) {
|
|
23110
23113
|
var _ref$gap = _ref.gap,
|
|
23111
23114
|
gap = _ref$gap === void 0 ? 0 : _ref$gap,
|
|
@@ -23114,7 +23117,7 @@ var GridContainerComponent = function GridContainerComponent(_ref) {
|
|
|
23114
23117
|
children = _ref.children,
|
|
23115
23118
|
_ref$className = _ref.className,
|
|
23116
23119
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23117
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
23120
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
23118
23121
|
var _useScale = useScale(),
|
|
23119
23122
|
unit = _useScale.unit,
|
|
23120
23123
|
SCALES = _useScale.SCALES;
|
|
@@ -24485,7 +24488,7 @@ var HtmlRenderer = function HtmlRenderer(_ref) {
|
|
|
24485
24488
|
});
|
|
24486
24489
|
};
|
|
24487
24490
|
|
|
24488
|
-
var _excluded$
|
|
24491
|
+
var _excluded$D = ["command", "shift", "option", "ctrl", "children", "className"];
|
|
24489
24492
|
var KeyboardComponent = function KeyboardComponent(_ref) {
|
|
24490
24493
|
var _ref$command = _ref.command,
|
|
24491
24494
|
command = _ref$command === void 0 ? false : _ref$command,
|
|
@@ -24498,7 +24501,7 @@ var KeyboardComponent = function KeyboardComponent(_ref) {
|
|
|
24498
24501
|
children = _ref.children,
|
|
24499
24502
|
_ref$className = _ref.className,
|
|
24500
24503
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24501
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24504
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
24502
24505
|
var theme = distExports.useTheme();
|
|
24503
24506
|
var _useScale = useScale(),
|
|
24504
24507
|
SCALES = _useScale.SCALES;
|
|
@@ -24522,14 +24525,14 @@ var KeyboardComponent = function KeyboardComponent(_ref) {
|
|
|
24522
24525
|
KeyboardComponent.displayName = 'Keyboard';
|
|
24523
24526
|
var Keyboard = withScale(KeyboardComponent);
|
|
24524
24527
|
|
|
24525
|
-
var _excluded$
|
|
24528
|
+
var _excluded$C = ["className", "children", "visible"];
|
|
24526
24529
|
var ModalWrapper = function ModalWrapper(_ref) {
|
|
24527
24530
|
var _ref$className = _ref.className,
|
|
24528
24531
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24529
24532
|
children = _ref.children,
|
|
24530
24533
|
_ref$visible = _ref.visible,
|
|
24531
24534
|
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
24532
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24535
|
+
props = _objectWithoutProperties(_ref, _excluded$C);
|
|
24533
24536
|
var theme = distExports.useTheme();
|
|
24534
24537
|
var _useScale = useScale(),
|
|
24535
24538
|
SCALES = _useScale.SCALES;
|
|
@@ -24593,7 +24596,7 @@ var useModalContext = function useModalContext() {
|
|
|
24593
24596
|
return React.useContext(ModalContext);
|
|
24594
24597
|
};
|
|
24595
24598
|
|
|
24596
|
-
var _excluded$
|
|
24599
|
+
var _excluded$B = ["className", "children", "onClick", "passive", "disabled"];
|
|
24597
24600
|
var ModalActionComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
24598
24601
|
var _ref$className = _ref.className,
|
|
24599
24602
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -24603,7 +24606,7 @@ var ModalActionComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24603
24606
|
passive = _ref$passive === void 0 ? false : _ref$passive,
|
|
24604
24607
|
_ref$disabled = _ref.disabled,
|
|
24605
24608
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
24606
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24609
|
+
props = _objectWithoutProperties(_ref, _excluded$B);
|
|
24607
24610
|
var theme = distExports.useTheme();
|
|
24608
24611
|
var _useScale = useScale(),
|
|
24609
24612
|
SCALES = _useScale.SCALES;
|
|
@@ -24652,10 +24655,10 @@ var ModalActionComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24652
24655
|
ModalActionComponent.displayName = 'ModalAction';
|
|
24653
24656
|
var ModalAction = withScale(ModalActionComponent);
|
|
24654
24657
|
|
|
24655
|
-
var _excluded$
|
|
24658
|
+
var _excluded$A = ["children"];
|
|
24656
24659
|
var ModalActionsComponent = function ModalActionsComponent(_ref) {
|
|
24657
24660
|
var children = _ref.children,
|
|
24658
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24661
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
24659
24662
|
var theme = distExports.useTheme();
|
|
24660
24663
|
var ref = React.useRef(null);
|
|
24661
24664
|
var _useState = React.useState('auto'),
|
|
@@ -24763,7 +24766,7 @@ Modal.Subtitle = ModalSubtitle;
|
|
|
24763
24766
|
Modal.Content = ModalContent;
|
|
24764
24767
|
Modal.Action = ModalAction;
|
|
24765
24768
|
|
|
24766
|
-
var _excluded$
|
|
24769
|
+
var _excluded$z = ["children", "type", "label", "filled", "className"];
|
|
24767
24770
|
var getStatusColor = function getStatusColor(type, filled, theme) {
|
|
24768
24771
|
var colors = {
|
|
24769
24772
|
secondary: theme.palette.secondary,
|
|
@@ -24794,7 +24797,7 @@ var NoteComponent = function NoteComponent(_ref) {
|
|
|
24794
24797
|
filled = _ref$filled === void 0 ? false : _ref$filled,
|
|
24795
24798
|
_ref$className = _ref.className,
|
|
24796
24799
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24797
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24800
|
+
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
24798
24801
|
var theme = distExports.useTheme();
|
|
24799
24802
|
var _useScale = useScale(),
|
|
24800
24803
|
SCALES = _useScale.SCALES;
|
|
@@ -24818,12 +24821,12 @@ var NoteComponent = function NoteComponent(_ref) {
|
|
|
24818
24821
|
NoteComponent.displayName = 'Note';
|
|
24819
24822
|
var Note = withScale(NoteComponent);
|
|
24820
24823
|
|
|
24821
|
-
var _excluded$
|
|
24824
|
+
var _excluded$y = ["className", "children"];
|
|
24822
24825
|
var PageContentComponent = function PageContentComponent(_ref) {
|
|
24823
24826
|
var _ref$className = _ref.className,
|
|
24824
24827
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24825
24828
|
children = _ref.children,
|
|
24826
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24829
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
24827
24830
|
var _useScale = useScale(),
|
|
24828
24831
|
SCALES = _useScale.SCALES;
|
|
24829
24832
|
return /*#__PURE__*/React.createElement("main", _extends({}, props, {
|
|
@@ -24836,7 +24839,7 @@ var PageContentComponent = function PageContentComponent(_ref) {
|
|
|
24836
24839
|
PageContentComponent.displayName = 'PageContent';
|
|
24837
24840
|
var PageContent = withScale(PageContentComponent);
|
|
24838
24841
|
|
|
24839
|
-
var _excluded$
|
|
24842
|
+
var _excluded$x = ["children", "render", "dotBackdrop", "className", "dotSize", "dotSpace"];
|
|
24840
24843
|
tuple('default', 'effect', 'effect-seo');
|
|
24841
24844
|
var DotStyles = function DotStyles(_ref) {
|
|
24842
24845
|
var dotSpace = _ref.dotSpace,
|
|
@@ -24865,7 +24868,7 @@ var PageComponent = function PageComponent(_ref2) {
|
|
|
24865
24868
|
dotSize = _ref2$dotSize === void 0 ? '1px' : _ref2$dotSize,
|
|
24866
24869
|
_ref2$dotSpace = _ref2.dotSpace,
|
|
24867
24870
|
dotSpace = _ref2$dotSpace === void 0 ? 1 : _ref2$dotSpace,
|
|
24868
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
24871
|
+
props = _objectWithoutProperties(_ref2, _excluded$x);
|
|
24869
24872
|
var theme = distExports.useTheme();
|
|
24870
24873
|
var _useScale = useScale(),
|
|
24871
24874
|
SCALES = _useScale.SCALES;
|
|
@@ -24904,14 +24907,14 @@ var PageComponent = function PageComponent(_ref2) {
|
|
|
24904
24907
|
PageComponent.displayName = 'Page';
|
|
24905
24908
|
var Page = withScale(PageComponent);
|
|
24906
24909
|
|
|
24907
|
-
var _excluded$
|
|
24910
|
+
var _excluded$w = ["children", "center", "className"];
|
|
24908
24911
|
var PageHeaderComponent = function PageHeaderComponent(_ref) {
|
|
24909
24912
|
var children = _ref.children,
|
|
24910
24913
|
_ref$center = _ref.center,
|
|
24911
24914
|
center = _ref$center === void 0 ? false : _ref$center,
|
|
24912
24915
|
_ref$className = _ref.className,
|
|
24913
24916
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24914
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24917
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
24915
24918
|
var _useScale = useScale(),
|
|
24916
24919
|
SCALES = _useScale.SCALES;
|
|
24917
24920
|
var classes = distExports.useClasses({
|
|
@@ -24927,10 +24930,10 @@ var PageHeaderComponent = function PageHeaderComponent(_ref) {
|
|
|
24927
24930
|
PageHeaderComponent.displayName = 'PageHeader';
|
|
24928
24931
|
var PageHeader = withScale(PageHeaderComponent);
|
|
24929
24932
|
|
|
24930
|
-
var _excluded$
|
|
24933
|
+
var _excluded$v = ["children"];
|
|
24931
24934
|
var PageFooterComponent = function PageFooterComponent(_ref) {
|
|
24932
24935
|
var children = _ref.children,
|
|
24933
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24936
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
24934
24937
|
var _useScale = useScale(),
|
|
24935
24938
|
SCALES = _useScale.SCALES;
|
|
24936
24939
|
return /*#__PURE__*/React.createElement("footer", _extends({}, props, {
|
|
@@ -24948,13 +24951,13 @@ Page.Content = PageContent;
|
|
|
24948
24951
|
Page.Body = PageContent;
|
|
24949
24952
|
Page.Footer = PageFooter;
|
|
24950
24953
|
|
|
24951
|
-
var _excluded$
|
|
24954
|
+
var _excluded$u = ["active", "children", "disabled", "onClick"];
|
|
24952
24955
|
var PaginationItem = function PaginationItem(_ref) {
|
|
24953
24956
|
var active = _ref.active,
|
|
24954
24957
|
children = _ref.children,
|
|
24955
24958
|
disabled = _ref.disabled,
|
|
24956
24959
|
onClick = _ref.onClick,
|
|
24957
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
24960
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
24958
24961
|
var theme = distExports.useTheme();
|
|
24959
24962
|
var _useMemo = React.useMemo(function () {
|
|
24960
24963
|
return [addColorAlpha(theme.palette.success, 0.1), addColorAlpha(theme.palette.success, 0.8)];
|
|
@@ -24992,10 +24995,10 @@ var usePaginationContext = function usePaginationContext() {
|
|
|
24992
24995
|
return React.useContext(PaginationContext);
|
|
24993
24996
|
};
|
|
24994
24997
|
|
|
24995
|
-
var _excluded$
|
|
24998
|
+
var _excluded$t = ["children"];
|
|
24996
24999
|
var PaginationPrevious = function PaginationPrevious(_ref) {
|
|
24997
25000
|
var children = _ref.children,
|
|
24998
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
25001
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
24999
25002
|
var _usePaginationContext = usePaginationContext(),
|
|
25000
25003
|
update = _usePaginationContext.update,
|
|
25001
25004
|
isFirst = _usePaginationContext.isFirst;
|
|
@@ -25008,10 +25011,10 @@ var PaginationPrevious = function PaginationPrevious(_ref) {
|
|
|
25008
25011
|
};
|
|
25009
25012
|
PaginationPrevious.displayName = 'PaginationPrevious';
|
|
25010
25013
|
|
|
25011
|
-
var _excluded$
|
|
25014
|
+
var _excluded$s = ["children"];
|
|
25012
25015
|
var PaginationNext = function PaginationNext(_ref) {
|
|
25013
25016
|
var children = _ref.children,
|
|
25014
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
25017
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
25015
25018
|
var _usePaginationContext = usePaginationContext(),
|
|
25016
25019
|
update = _usePaginationContext.update,
|
|
25017
25020
|
isLast = _usePaginationContext.isLast;
|
|
@@ -25170,7 +25173,7 @@ var PaginationPages = function PaginationPages(_ref) {
|
|
|
25170
25173
|
};
|
|
25171
25174
|
PaginationPages.displayName = 'PaginationPages';
|
|
25172
25175
|
|
|
25173
|
-
var _excluded$
|
|
25176
|
+
var _excluded$r = ["page", "initialPage", "count", "limit", "children", "onChange", "className"];
|
|
25174
25177
|
var PaginationComponent = function PaginationComponent(_ref) {
|
|
25175
25178
|
var customPage = _ref.page,
|
|
25176
25179
|
_ref$initialPage = _ref.initialPage,
|
|
@@ -25183,7 +25186,7 @@ var PaginationComponent = function PaginationComponent(_ref) {
|
|
|
25183
25186
|
onChange = _ref.onChange,
|
|
25184
25187
|
_ref$className = _ref.className,
|
|
25185
25188
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
25186
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
25189
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
25187
25190
|
var _useScale = useScale(),
|
|
25188
25191
|
SCALES = _useScale.SCALES;
|
|
25189
25192
|
var _useCurrentState = distExports.useCurrentState(initialPage),
|
|
@@ -25309,7 +25312,7 @@ var defaultTooltipPosition = {
|
|
|
25309
25312
|
left: '-1000px',
|
|
25310
25313
|
transform: 'none'
|
|
25311
25314
|
};
|
|
25312
|
-
var getPosition = function getPosition(placement, rect, offset) {
|
|
25315
|
+
var getPosition$2 = function getPosition(placement, rect, offset) {
|
|
25313
25316
|
var positions = {
|
|
25314
25317
|
top: {
|
|
25315
25318
|
top: "".concat(rect.top - offset, "px"),
|
|
@@ -25536,7 +25539,7 @@ var TooltipContent = function TooltipContent(_ref) {
|
|
|
25536
25539
|
var classes = distExports.useClasses('tooltip-content', className);
|
|
25537
25540
|
if (!parent) return null;
|
|
25538
25541
|
var updateRect = function updateRect() {
|
|
25539
|
-
var position = getPosition(placement, getRect(parent), offset);
|
|
25542
|
+
var position = getPosition$2(placement, getRect(parent), offset);
|
|
25540
25543
|
setRect(position);
|
|
25541
25544
|
};
|
|
25542
25545
|
useResize(updateRect);
|
|
@@ -25568,7 +25571,7 @@ var TooltipContent = function TooltipContent(_ref) {
|
|
|
25568
25571
|
}, ".tooltip-content.__jsx-style-dynamic-selector{--tooltip-icon-offset-x:".concat(iconOffset.x, ";--tooltip-icon-offset-y:").concat(iconOffset.y, ";--tooltip-content-bg:").concat(colors.bgColor, ";box-sizing:border-box;position:absolute;top:").concat(rect.top, ";left:").concat(rect.left, ";-webkit-transform:").concat(rect.transform, ";-ms-transform:").concat(rect.transform, ";transform:").concat(rect.transform, ";background-color:var(--tooltip-content-bg);color:").concat(colors.color, ";border-radius:").concat(theme.layout.radius, ";padding:0;z-index:1000;box-shadow:").concat(hasShadow ? theme.expressiveness.shadowMedium : 'none', ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";}.inner.__jsx-style-dynamic-selector{box-sizing:border-box;position:relative;font-size:").concat(SCALES.font(1), ";padding:").concat(SCALES.pt(0.65), " ").concat(SCALES.pr(0.9), " ").concat(SCALES.pb(0.65), " ").concat(SCALES.pl(0.9), ";height:100%;}")))), el);
|
|
25569
25572
|
};
|
|
25570
25573
|
|
|
25571
|
-
var _excluded$
|
|
25574
|
+
var _excluded$q = ["children", "initialVisible", "text", "offset", "placement", "portalClassName", "enterDelay", "leaveDelay", "trigger", "type", "className", "onVisibleChange", "hideArrow", "visible"];
|
|
25572
25575
|
var TooltipComponent = function TooltipComponent(_ref) {
|
|
25573
25576
|
var children = _ref.children,
|
|
25574
25577
|
_ref$initialVisible = _ref.initialVisible,
|
|
@@ -25595,7 +25598,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
25595
25598
|
_ref$hideArrow = _ref.hideArrow,
|
|
25596
25599
|
hideArrow = _ref$hideArrow === void 0 ? false : _ref$hideArrow,
|
|
25597
25600
|
customVisible = _ref.visible,
|
|
25598
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
25601
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
25599
25602
|
var timer = React.useRef();
|
|
25600
25603
|
var ref = React.useRef(null);
|
|
25601
25604
|
var _useState = React.useState(initialVisible),
|
|
@@ -25687,7 +25690,7 @@ var usePopoverContext = function usePopoverContext() {
|
|
|
25687
25690
|
return React.useContext(PopoverContext);
|
|
25688
25691
|
};
|
|
25689
25692
|
|
|
25690
|
-
var _excluded$
|
|
25693
|
+
var _excluded$p = ["child", "children", "enterDelay", "leaveDelay", "offset", "type", "trigger", "placement", "initialVisible", "portalClassName", "disableItemsAutoClose", "onVisibleChange", "visible"];
|
|
25691
25694
|
var PopoverComponent = function PopoverComponent(_ref) {
|
|
25692
25695
|
var child = _ref.child,
|
|
25693
25696
|
children = _ref.children,
|
|
@@ -25712,7 +25715,7 @@ var PopoverComponent = function PopoverComponent(_ref) {
|
|
|
25712
25715
|
_ref$onVisibleChange = _ref.onVisibleChange,
|
|
25713
25716
|
onVisibleChange = _ref$onVisibleChange === void 0 ? function () {} : _ref$onVisibleChange,
|
|
25714
25717
|
customVisible = _ref.visible,
|
|
25715
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
25718
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
25716
25719
|
var _useScale = useScale(),
|
|
25717
25720
|
SCALES = _useScale.SCALES;
|
|
25718
25721
|
var _useState = React.useState(initialVisible),
|
|
@@ -25761,7 +25764,7 @@ var PopoverComponent = function PopoverComponent(_ref) {
|
|
|
25761
25764
|
PopoverComponent.displayName = 'Popover';
|
|
25762
25765
|
var Popover = withScale(PopoverComponent);
|
|
25763
25766
|
|
|
25764
|
-
var _excluded$
|
|
25767
|
+
var _excluded$o = ["children", "line", "showTitle", "className", "onClick", "selected", "disableAutoClose"];
|
|
25765
25768
|
var PopoverItemComponent = function PopoverItemComponent(_ref) {
|
|
25766
25769
|
var children = _ref.children,
|
|
25767
25770
|
_ref$line = _ref.line,
|
|
@@ -25775,7 +25778,7 @@ var PopoverItemComponent = function PopoverItemComponent(_ref) {
|
|
|
25775
25778
|
selected = _ref$selected === void 0 ? false : _ref$selected,
|
|
25776
25779
|
_ref$disableAutoClose = _ref.disableAutoClose,
|
|
25777
25780
|
disableAutoClose = _ref$disableAutoClose === void 0 ? false : _ref$disableAutoClose,
|
|
25778
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
25781
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
25779
25782
|
var theme = distExports.useTheme();
|
|
25780
25783
|
var _useScale = useScale(),
|
|
25781
25784
|
SCALES = _useScale.SCALES;
|
|
@@ -25842,7 +25845,7 @@ var ListComponent = function ListComponent(_ref) {
|
|
|
25842
25845
|
ListComponent.displayName = 'List';
|
|
25843
25846
|
var List = withScale(ListComponent);
|
|
25844
25847
|
|
|
25845
|
-
var _excluded$
|
|
25848
|
+
var _excluded$n = ["children", "direction", "justify", "alignItems", "line", "showTitle", "className", "onClick", "leading", "primary", "secondary", "trailing", "selected", "disableAutoClose"];
|
|
25846
25849
|
var ListItemComponent = function ListItemComponent(_ref) {
|
|
25847
25850
|
var children = _ref.children,
|
|
25848
25851
|
_ref$direction = _ref.direction,
|
|
@@ -25865,7 +25868,7 @@ var ListItemComponent = function ListItemComponent(_ref) {
|
|
|
25865
25868
|
_ref$selected = _ref.selected,
|
|
25866
25869
|
selected = _ref$selected === void 0 ? false : _ref$selected;
|
|
25867
25870
|
_ref.disableAutoClose;
|
|
25868
|
-
var props = _objectWithoutProperties(_ref, _excluded$
|
|
25871
|
+
var props = _objectWithoutProperties(_ref, _excluded$n);
|
|
25869
25872
|
var theme = distExports.useTheme();
|
|
25870
25873
|
var _useScale = useScale(),
|
|
25871
25874
|
SCALES = _useScale.SCALES;
|
|
@@ -26014,7 +26017,7 @@ function memo(callback) {
|
|
|
26014
26017
|
}
|
|
26015
26018
|
|
|
26016
26019
|
/*#__NO_SIDE_EFFECTS__*/
|
|
26017
|
-
const noop = (any) => any;
|
|
26020
|
+
const noop$1 = (any) => any;
|
|
26018
26021
|
|
|
26019
26022
|
/**
|
|
26020
26023
|
* Pipe
|
|
@@ -26152,7 +26155,7 @@ function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
|
|
|
26152
26155
|
function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
26153
26156
|
// If this is a linear gradient, return linear easing
|
|
26154
26157
|
if (mX1 === mY1 && mX2 === mY2)
|
|
26155
|
-
return noop;
|
|
26158
|
+
return noop$1;
|
|
26156
26159
|
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
|
|
26157
26160
|
// If animation is at start/end, return t without easing
|
|
26158
26161
|
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
|
|
@@ -26187,7 +26190,7 @@ const isEasingArray = (ease) => {
|
|
|
26187
26190
|
const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";
|
|
26188
26191
|
|
|
26189
26192
|
const easingLookup = {
|
|
26190
|
-
linear: noop,
|
|
26193
|
+
linear: noop$1,
|
|
26191
26194
|
easeIn,
|
|
26192
26195
|
easeInOut,
|
|
26193
26196
|
easeOut,
|
|
@@ -26374,7 +26377,7 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
26374
26377
|
return { schedule, cancel, state, steps };
|
|
26375
26378
|
}
|
|
26376
26379
|
|
|
26377
|
-
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop, true);
|
|
26380
|
+
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop$1, true);
|
|
26378
26381
|
|
|
26379
26382
|
let now;
|
|
26380
26383
|
function clearTime() {
|
|
@@ -27307,7 +27310,7 @@ function createMixers(output, ease, customMixer) {
|
|
|
27307
27310
|
for (let i = 0; i < numMixers; i++) {
|
|
27308
27311
|
let mixer = mixerFactory(output[i], output[i + 1]);
|
|
27309
27312
|
if (ease) {
|
|
27310
|
-
const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;
|
|
27313
|
+
const easingFunction = Array.isArray(ease) ? ease[i] || noop$1 : ease;
|
|
27311
27314
|
mixer = pipe(easingFunction, mixer);
|
|
27312
27315
|
}
|
|
27313
27316
|
mixers.push(mixer);
|
|
@@ -28340,7 +28343,7 @@ class NativeAnimation extends WithPromise {
|
|
|
28340
28343
|
this.animation.onfinish = null;
|
|
28341
28344
|
if (timeline && supportsScrollTimeline()) {
|
|
28342
28345
|
this.animation.timeline = timeline;
|
|
28343
|
-
return noop;
|
|
28346
|
+
return noop$1;
|
|
28344
28347
|
}
|
|
28345
28348
|
else {
|
|
28346
28349
|
return observe(this);
|
|
@@ -28621,7 +28624,7 @@ class AsyncMotionValueAnimation extends WithPromise {
|
|
|
28621
28624
|
element: resolvedOptions.motionValue.owner.current,
|
|
28622
28625
|
})
|
|
28623
28626
|
: new JSAnimation(resolvedOptions);
|
|
28624
|
-
animation.finished.then(() => this.notifyFinished()).catch(noop);
|
|
28627
|
+
animation.finished.then(() => this.notifyFinished()).catch(noop$1);
|
|
28625
28628
|
if (this.pendingTimeline) {
|
|
28626
28629
|
this.stopTimeline = animation.attachTimeline(this.pendingTimeline);
|
|
28627
28630
|
this.pendingTimeline = undefined;
|
|
@@ -33643,8 +33646,8 @@ function getCurrentDirection(offset, lockThreshold = 10) {
|
|
|
33643
33646
|
class DragGesture extends Feature {
|
|
33644
33647
|
constructor(node) {
|
|
33645
33648
|
super(node);
|
|
33646
|
-
this.removeGroupControls = noop;
|
|
33647
|
-
this.removeListeners = noop;
|
|
33649
|
+
this.removeGroupControls = noop$1;
|
|
33650
|
+
this.removeListeners = noop$1;
|
|
33648
33651
|
this.controls = new VisualElementDragControls(node);
|
|
33649
33652
|
}
|
|
33650
33653
|
mount() {
|
|
@@ -33654,7 +33657,7 @@ class DragGesture extends Feature {
|
|
|
33654
33657
|
if (dragControls) {
|
|
33655
33658
|
this.removeGroupControls = dragControls.subscribe(this.controls);
|
|
33656
33659
|
}
|
|
33657
|
-
this.removeListeners = this.controls.addListeners() || noop;
|
|
33660
|
+
this.removeListeners = this.controls.addListeners() || noop$1;
|
|
33658
33661
|
}
|
|
33659
33662
|
unmount() {
|
|
33660
33663
|
this.removeGroupControls();
|
|
@@ -33670,7 +33673,7 @@ const asyncHandler = (handler) => (event, info) => {
|
|
|
33670
33673
|
class PanGesture extends Feature {
|
|
33671
33674
|
constructor() {
|
|
33672
33675
|
super(...arguments);
|
|
33673
|
-
this.removePointerDownListener = noop;
|
|
33676
|
+
this.removePointerDownListener = noop$1;
|
|
33674
33677
|
}
|
|
33675
33678
|
onPointerDown(pointerDownEvent) {
|
|
33676
33679
|
this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {
|
|
@@ -34041,7 +34044,7 @@ function getRadius(values, radiusName) {
|
|
|
34041
34044
|
// )(p)
|
|
34042
34045
|
// }
|
|
34043
34046
|
const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut);
|
|
34044
|
-
const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop);
|
|
34047
|
+
const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop$1);
|
|
34045
34048
|
function compress(min, max, easing) {
|
|
34046
34049
|
return (p) => {
|
|
34047
34050
|
// Could replace ifs with clamp
|
|
@@ -35849,7 +35852,7 @@ const userAgentContains = (string) => typeof navigator !== "undefined" &&
|
|
|
35849
35852
|
*/
|
|
35850
35853
|
const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/")
|
|
35851
35854
|
? Math.round
|
|
35852
|
-
: noop;
|
|
35855
|
+
: noop$1;
|
|
35853
35856
|
function roundAxis(axis) {
|
|
35854
35857
|
// Round to the nearest .5 pixels to support subpixel layouts
|
|
35855
35858
|
axis.min = roundPoint(axis.min);
|
|
@@ -37637,7 +37640,7 @@ var PhoneInput = function PhoneInput(_ref) {
|
|
|
37637
37640
|
}, ".phone-input-container.__jsx-style-dynamic-selector{position:relative;min-width:200px;width:auto;}.phone-input-container.focused.__jsx-style-dynamic-selector{outline:1px solid ".concat(hoverBorder, ";border-radius:6px;}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid ").concat(borderColor, ";border-radius:6px;overflow:hidden;}.dropdown-toggle.__jsx-style-dynamic-selector{padding:7px 12px;border-radius:6px 0px 0px 6px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;border-right:1px solid ").concat(borderColor, ";}.phone-input.__jsx-style-dynamic-selector{-webkit-flex:1;-ms-flex:1;flex:1;padding:5px 10px;height:35px;background-color:transparent;font-size:14px;border:none;}.phone-input.__jsx-style-dynamic-selector:focus{outline:none;}.dropdown.__jsx-style-dynamic-selector{position:absolute;top:100%;left:0;width:100%;background:").concat(theme.type == 'dark' ? 'black' : 'white', ";border:1px solid ").concat(borderColor, ";border-radius:6px;margin-top:4px;z-index:999;box-shadow:0 4px 10px rgba(0,0,0,0.1);}.search-input.__jsx-style-dynamic-selector{width:100%;padding:8px 10px;border:none;background-color:transparent;border-bottom:1px solid ").concat(borderColor, ";font-size:14px;}.search-input.__jsx-style-dynamic-selector:focus{outline:none;}.country-list.__jsx-style-dynamic-selector{max-height:200px;overflow-y:auto;}.dropdown-item.__jsx-style-dynamic-selector{padding:10px;cursor:pointer;font-size:14px;}.dropdown-item.__jsx-style-dynamic-selector:hover{background:").concat(theme.type == 'dark' ? '#3a3d3d' : '#efefef', ";}.dropdown-item.disabled.__jsx-style-dynamic-selector{color:#888;cursor:default;}")));
|
|
37638
37641
|
};
|
|
37639
37642
|
|
|
37640
|
-
var _excluded$
|
|
37643
|
+
var _excluded$m = ["value", "max", "className", "type", "colors", "fixedTop", "fixedBottom"];
|
|
37641
37644
|
var getCurrentColor = function getCurrentColor(ratio, palette, type) {
|
|
37642
37645
|
var colors = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
37643
37646
|
var defaultColors = {
|
|
@@ -37669,7 +37672,7 @@ var ProgressComponent = function ProgressComponent(_ref) {
|
|
|
37669
37672
|
fixedTop = _ref$fixedTop === void 0 ? false : _ref$fixedTop,
|
|
37670
37673
|
_ref$fixedBottom = _ref.fixedBottom,
|
|
37671
37674
|
fixedBottom = _ref$fixedBottom === void 0 ? false : _ref$fixedBottom,
|
|
37672
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
37675
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
37673
37676
|
var theme = distExports.useTheme();
|
|
37674
37677
|
var _useScale = useScale(),
|
|
37675
37678
|
SCALES = _useScale.SCALES;
|
|
@@ -37708,12 +37711,12 @@ var useRadioContext = function useRadioContext() {
|
|
|
37708
37711
|
return React.useContext(RadioContext);
|
|
37709
37712
|
};
|
|
37710
37713
|
|
|
37711
|
-
var _excluded$
|
|
37714
|
+
var _excluded$l = ["className", "children"];
|
|
37712
37715
|
var RadioDescriptionComponent = function RadioDescriptionComponent(_ref) {
|
|
37713
37716
|
var _ref$className = _ref.className,
|
|
37714
37717
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
37715
37718
|
children = _ref.children,
|
|
37716
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
37719
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
37717
37720
|
var theme = distExports.useTheme();
|
|
37718
37721
|
var _useScale = useScale(),
|
|
37719
37722
|
SCALES = _useScale.SCALES;
|
|
@@ -37759,7 +37762,7 @@ var getColors$4 = function getColors(palette, status) {
|
|
|
37759
37762
|
return colors[status];
|
|
37760
37763
|
};
|
|
37761
37764
|
|
|
37762
|
-
var _excluded$
|
|
37765
|
+
var _excluded$k = ["className", "checked", "onChange", "disabled", "type", "value", "children"];
|
|
37763
37766
|
var RadioComponent = function RadioComponent(_ref) {
|
|
37764
37767
|
var _ref$className = _ref.className,
|
|
37765
37768
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -37771,7 +37774,7 @@ var RadioComponent = function RadioComponent(_ref) {
|
|
|
37771
37774
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
37772
37775
|
radioValue = _ref.value,
|
|
37773
37776
|
children = _ref.children,
|
|
37774
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
37777
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
37775
37778
|
var theme = distExports.useTheme();
|
|
37776
37779
|
var _useScale = useScale(),
|
|
37777
37780
|
SCALES = _useScale.SCALES;
|
|
@@ -37853,7 +37856,7 @@ var RadioComponent = function RadioComponent(_ref) {
|
|
|
37853
37856
|
RadioComponent.displayName = 'Radio';
|
|
37854
37857
|
var Radio = withScale(RadioComponent);
|
|
37855
37858
|
|
|
37856
|
-
var _excluded$
|
|
37859
|
+
var _excluded$j = ["disabled", "onChange", "value", "children", "className", "initialValue", "useRow"];
|
|
37857
37860
|
var RadioGroupComponent = function RadioGroupComponent(_ref) {
|
|
37858
37861
|
var _ref$disabled = _ref.disabled,
|
|
37859
37862
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -37865,7 +37868,7 @@ var RadioGroupComponent = function RadioGroupComponent(_ref) {
|
|
|
37865
37868
|
initialValue = _ref.initialValue,
|
|
37866
37869
|
_ref$useRow = _ref.useRow,
|
|
37867
37870
|
useRow = _ref$useRow === void 0 ? false : _ref$useRow,
|
|
37868
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
37871
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
37869
37872
|
var _useScale = useScale(),
|
|
37870
37873
|
SCALES = _useScale.SCALES;
|
|
37871
37874
|
var _useState = React.useState(initialValue),
|
|
@@ -37921,7 +37924,7 @@ var RatingIcon = function RatingIcon() {
|
|
|
37921
37924
|
};
|
|
37922
37925
|
RatingIcon.displayName = 'RatingIcon';
|
|
37923
37926
|
|
|
37924
|
-
var _excluded$
|
|
37927
|
+
var _excluded$i = ["type", "className", "icon", "count", "value", "initialValue", "onValueChange", "locked", "onLockedChange"];
|
|
37925
37928
|
tupleNumber(2, 3, 4, 5, 6, 7, 8, 9, 10);
|
|
37926
37929
|
tupleNumber(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
|
|
37927
37930
|
var getColor = function getColor(type, palette) {
|
|
@@ -37949,7 +37952,7 @@ var RatingComponent = function RatingComponent(_ref) {
|
|
|
37949
37952
|
_ref$locked = _ref.locked,
|
|
37950
37953
|
locked = _ref$locked === void 0 ? false : _ref$locked,
|
|
37951
37954
|
onLockedChange = _ref.onLockedChange,
|
|
37952
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
37955
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
37953
37956
|
var theme = distExports.useTheme();
|
|
37954
37957
|
var _useScale = useScale(),
|
|
37955
37958
|
SCALES = _useScale.SCALES;
|
|
@@ -38190,7 +38193,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function (_ref, inputRef) {
|
|
|
38190
38193
|
});
|
|
38191
38194
|
SelectInput.displayName = 'SelectInput';
|
|
38192
38195
|
|
|
38193
|
-
var _excluded$
|
|
38196
|
+
var _excluded$h = ["children", "label", "type", "disabled", "initialValue", "value", "icon", "onChange", "pure", "multiple", "clearable", "placeholder", "className", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "getPopupContainer", "onDropdownVisibleChange"];
|
|
38194
38197
|
var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
|
|
38195
38198
|
var children = _ref.children,
|
|
38196
38199
|
label = _ref.label,
|
|
@@ -38219,7 +38222,7 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
|
|
|
38219
38222
|
getPopupContainer = _ref.getPopupContainer,
|
|
38220
38223
|
_ref$onDropdownVisibl = _ref.onDropdownVisibleChange,
|
|
38221
38224
|
onDropdownVisibleChange = _ref$onDropdownVisibl === void 0 ? function () {} : _ref$onDropdownVisibl,
|
|
38222
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
38225
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
38223
38226
|
var theme = distExports.useTheme();
|
|
38224
38227
|
var _useScale = useScale(),
|
|
38225
38228
|
SCALES = _useScale.SCALES;
|
|
@@ -38391,7 +38394,7 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
|
|
|
38391
38394
|
SelectComponent.displayName = 'Select';
|
|
38392
38395
|
var Select = withScale(SelectComponent);
|
|
38393
38396
|
|
|
38394
|
-
var _excluded$
|
|
38397
|
+
var _excluded$g = ["value", "className", "children", "disabled", "divider", "label", "preventAllEvents"];
|
|
38395
38398
|
var SelectOptionComponent = function SelectOptionComponent(_ref) {
|
|
38396
38399
|
var identValue = _ref.value,
|
|
38397
38400
|
_ref$className = _ref.className,
|
|
@@ -38405,7 +38408,7 @@ var SelectOptionComponent = function SelectOptionComponent(_ref) {
|
|
|
38405
38408
|
label = _ref$label === void 0 ? false : _ref$label,
|
|
38406
38409
|
_ref$preventAllEvents = _ref.preventAllEvents,
|
|
38407
38410
|
preventAllEvents = _ref$preventAllEvents === void 0 ? false : _ref$preventAllEvents,
|
|
38408
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
38411
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
38409
38412
|
var theme = distExports.useTheme();
|
|
38410
38413
|
var _useScale = useScale(),
|
|
38411
38414
|
SCALES = _useScale.SCALES;
|
|
@@ -38606,7 +38609,7 @@ var getColors$2 = function getColors(palette, status) {
|
|
|
38606
38609
|
return colors[status];
|
|
38607
38610
|
};
|
|
38608
38611
|
|
|
38609
|
-
var _excluded$
|
|
38612
|
+
var _excluded$f = ["hideValue", "disabled", "type", "step", "max", "min", "initialValue", "value", "onChange", "className", "showMarkers"];
|
|
38610
38613
|
var getRefWidth = function getRefWidth(elementRef) {
|
|
38611
38614
|
if (!elementRef || !elementRef.current) return 0;
|
|
38612
38615
|
var rect = elementRef.current.getBoundingClientRect();
|
|
@@ -38641,7 +38644,7 @@ var SliderComponent = function SliderComponent(_ref) {
|
|
|
38641
38644
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
38642
38645
|
_ref$showMarkers = _ref.showMarkers,
|
|
38643
38646
|
showMarkers = _ref$showMarkers === void 0 ? false : _ref$showMarkers,
|
|
38644
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
38647
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
38645
38648
|
var theme = distExports.useTheme();
|
|
38646
38649
|
var _useScale = useScale(),
|
|
38647
38650
|
SCALES = _useScale.SCALES;
|
|
@@ -38846,7 +38849,7 @@ var useClipboard = function useClipboard() {
|
|
|
38846
38849
|
};
|
|
38847
38850
|
};
|
|
38848
38851
|
|
|
38849
|
-
var _excluded$
|
|
38852
|
+
var _excluded$e = ["type", "filled", "children", "symbol", "toastText", "toastType", "text", "copy", "className"];
|
|
38850
38853
|
var textArrayToString = function textArrayToString(text) {
|
|
38851
38854
|
return text.reduce(function (pre, current) {
|
|
38852
38855
|
if (!current) return pre;
|
|
@@ -38870,7 +38873,7 @@ var SnippetComponent = function SnippetComponent(_ref) {
|
|
|
38870
38873
|
copyType = _ref$copy === void 0 ? 'default' : _ref$copy,
|
|
38871
38874
|
_ref$className = _ref.className,
|
|
38872
38875
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
38873
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
38876
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
38874
38877
|
var theme = distExports.useTheme();
|
|
38875
38878
|
var _useScale = useScale(),
|
|
38876
38879
|
SCALES = _useScale.SCALES;
|
|
@@ -38926,13 +38929,13 @@ var SnippetComponent = function SnippetComponent(_ref) {
|
|
|
38926
38929
|
SnippetComponent.displayName = 'Snippet';
|
|
38927
38930
|
var Snippet = withScale(SnippetComponent);
|
|
38928
38931
|
|
|
38929
|
-
var _excluded$
|
|
38932
|
+
var _excluded$d = ["inline", "className"];
|
|
38930
38933
|
var SpacerComponent = function SpacerComponent(_ref) {
|
|
38931
38934
|
var _ref$inline = _ref.inline,
|
|
38932
38935
|
inline = _ref$inline === void 0 ? false : _ref$inline,
|
|
38933
38936
|
_ref$className = _ref.className,
|
|
38934
38937
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
38935
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
38938
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
38936
38939
|
var _useScale = useScale(),
|
|
38937
38940
|
SCALES = _useScale.SCALES;
|
|
38938
38941
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
@@ -38945,7 +38948,7 @@ var SpacerComponent = function SpacerComponent(_ref) {
|
|
|
38945
38948
|
SpacerComponent.displayName = 'Spacer';
|
|
38946
38949
|
var Spacer = withScale(SpacerComponent);
|
|
38947
38950
|
|
|
38948
|
-
var _excluded$
|
|
38951
|
+
var _excluded$c = ["className"];
|
|
38949
38952
|
var getSpans = function getSpans(theme) {
|
|
38950
38953
|
return _toConsumableArray(new Array(12)).map(function (_, index) {
|
|
38951
38954
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -38960,7 +38963,7 @@ var getSpans = function getSpans(theme) {
|
|
|
38960
38963
|
var SpinnerComponent = function SpinnerComponent(_ref) {
|
|
38961
38964
|
var _ref$className = _ref.className,
|
|
38962
38965
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
38963
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
38966
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
38964
38967
|
var theme = distExports.useTheme();
|
|
38965
38968
|
var _useScale = useScale(),
|
|
38966
38969
|
SCALES = _useScale.SCALES;
|
|
@@ -56701,7 +56704,7 @@ function Empty() {
|
|
|
56701
56704
|
}));
|
|
56702
56705
|
}
|
|
56703
56706
|
|
|
56704
|
-
var _excluded$
|
|
56707
|
+
var _excluded$b = ["children", "tag", "className", "color"];
|
|
56705
56708
|
var getTypeColor = function getTypeColor(type, palette) {
|
|
56706
56709
|
var colors = {
|
|
56707
56710
|
"default": 'inherit',
|
|
@@ -56719,7 +56722,7 @@ var TextChild = function TextChild(_ref) {
|
|
|
56719
56722
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
56720
56723
|
_ref$color = _ref.color,
|
|
56721
56724
|
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
56722
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
56725
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
56723
56726
|
var Component = tag;
|
|
56724
56727
|
var theme = distExports.useTheme();
|
|
56725
56728
|
var _useScale = useScale(),
|
|
@@ -56765,7 +56768,7 @@ var TextChild = function TextChild(_ref) {
|
|
|
56765
56768
|
};
|
|
56766
56769
|
TextChild.displayName = 'TextChild';
|
|
56767
56770
|
|
|
56768
|
-
var _excluded$
|
|
56771
|
+
var _excluded$a = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "children", "className"];
|
|
56769
56772
|
var _getModifierChild = function getModifierChild(tags, children) {
|
|
56770
56773
|
if (!tags.length) return children;
|
|
56771
56774
|
var nextTag = tags.slice(1, tags.length);
|
|
@@ -56807,7 +56810,7 @@ var TextComponent = function TextComponent(_ref) {
|
|
|
56807
56810
|
children = _ref.children,
|
|
56808
56811
|
_ref$className = _ref.className,
|
|
56809
56812
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
56810
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
56813
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
56811
56814
|
var elements = {
|
|
56812
56815
|
h1: h1,
|
|
56813
56816
|
h2: h2,
|
|
@@ -57199,7 +57202,7 @@ var TableColumn = function TableColumn(columnProps) {
|
|
|
57199
57202
|
};
|
|
57200
57203
|
TableColumn.displayName = 'TableColumn';
|
|
57201
57204
|
|
|
57202
|
-
var _excluded$
|
|
57205
|
+
var _excluded$9 = ["children", "data", "initialData", "hover", "emptyText", "rowDraggable", "readOnly", "cursorPagination", "previousCursor", "nextCursor", "hasMore", "onNextPage", "onPreviousPage", "onRow", "onCell", "onChange", "onFilters", "onPageChange", "showFilters", "stickyHeader", "textPlaceholder", "onSelected", "dataLength", "viewLength", "className", "rowClassName"];
|
|
57203
57206
|
function TableComponent(tableProps) {
|
|
57204
57207
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
57205
57208
|
var _ref = tableProps,
|
|
@@ -57242,7 +57245,7 @@ function TableComponent(tableProps) {
|
|
|
57242
57245
|
rowClassName = _ref$rowClassName === void 0 ? function () {
|
|
57243
57246
|
return '';
|
|
57244
57247
|
} : _ref$rowClassName,
|
|
57245
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
57248
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
57246
57249
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
57247
57250
|
var _useScale = useScale(),
|
|
57248
57251
|
SCALES = _useScale.SCALES;
|
|
@@ -57456,7 +57459,7 @@ var useRect = function useRect(initialState) {
|
|
|
57456
57459
|
};
|
|
57457
57460
|
};
|
|
57458
57461
|
|
|
57459
|
-
var _excluded$
|
|
57462
|
+
var _excluded$8 = ["initialValue", "value", "hideDivider", "hideBorder", "children", "onChange", "className", "leftSpace", "highlight", "hoverHeightRatio", "hoverWidthRatio", "activeClassName", "activeStyle", "align"];
|
|
57460
57463
|
var TabsComponent = function TabsComponent(_ref) {
|
|
57461
57464
|
var userCustomInitialValue = _ref.initialValue,
|
|
57462
57465
|
value = _ref.value,
|
|
@@ -57481,7 +57484,7 @@ var TabsComponent = function TabsComponent(_ref) {
|
|
|
57481
57484
|
activeStyle = _ref$activeStyle === void 0 ? {} : _ref$activeStyle,
|
|
57482
57485
|
_ref$align = _ref.align,
|
|
57483
57486
|
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
57484
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
57487
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
57485
57488
|
var theme = distExports.useTheme();
|
|
57486
57489
|
var _useScale = useScale(),
|
|
57487
57490
|
SCALES = _useScale.SCALES;
|
|
@@ -57645,7 +57648,7 @@ var TabsItem = withScale(TabsItemComponent);
|
|
|
57645
57648
|
Tabs.Item = TabsItem;
|
|
57646
57649
|
Tabs.Tab = TabsItem;
|
|
57647
57650
|
|
|
57648
|
-
var _excluded$
|
|
57651
|
+
var _excluded$7 = ["type", "children", "className", "invert"];
|
|
57649
57652
|
var getColors$1 = function getColors(type, palette, invert) {
|
|
57650
57653
|
var colors = {
|
|
57651
57654
|
"default": {
|
|
@@ -57690,7 +57693,7 @@ var TagComponent = function TagComponent(_ref) {
|
|
|
57690
57693
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
57691
57694
|
_ref$invert = _ref.invert,
|
|
57692
57695
|
invert = _ref$invert === void 0 ? false : _ref$invert,
|
|
57693
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
57696
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
57694
57697
|
var theme = distExports.useTheme();
|
|
57695
57698
|
var _useScale = useScale(),
|
|
57696
57699
|
SCALES = _useScale.SCALES;
|
|
@@ -57973,7 +57976,7 @@ var getColors = function getColors(palette, status) {
|
|
|
57973
57976
|
return colors[status];
|
|
57974
57977
|
};
|
|
57975
57978
|
|
|
57976
|
-
var _excluded$
|
|
57979
|
+
var _excluded$6 = ["initialChecked", "checked", "disabled", "onChange", "type", "className", "children"];
|
|
57977
57980
|
var ToggleComponent = function ToggleComponent(_ref) {
|
|
57978
57981
|
var _ref$initialChecked = _ref.initialChecked,
|
|
57979
57982
|
initialChecked = _ref$initialChecked === void 0 ? false : _ref$initialChecked,
|
|
@@ -57986,7 +57989,7 @@ var ToggleComponent = function ToggleComponent(_ref) {
|
|
|
57986
57989
|
_ref$className = _ref.className,
|
|
57987
57990
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
57988
57991
|
children = _ref.children,
|
|
57989
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
57992
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
57990
57993
|
var theme = distExports.useTheme();
|
|
57991
57994
|
var _useScale = useScale(),
|
|
57992
57995
|
SCALES = _useScale.SCALES;
|
|
@@ -58116,7 +58119,7 @@ var stopPropagation = function stopPropagation(event) {
|
|
|
58116
58119
|
event.nativeEvent.stopImmediatePropagation();
|
|
58117
58120
|
};
|
|
58118
58121
|
|
|
58119
|
-
var _excluded$
|
|
58122
|
+
var _excluded$5 = ["name", "parentPath", "level", "extra", "className"];
|
|
58120
58123
|
var TreeFile = function TreeFile(_ref) {
|
|
58121
58124
|
var name = _ref.name,
|
|
58122
58125
|
_ref$parentPath = _ref.parentPath,
|
|
@@ -58126,7 +58129,7 @@ var TreeFile = function TreeFile(_ref) {
|
|
|
58126
58129
|
extra = _ref.extra,
|
|
58127
58130
|
_ref$className = _ref.className,
|
|
58128
58131
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
58129
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
58132
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
58130
58133
|
var theme = distExports.useTheme();
|
|
58131
58134
|
var _useTreeContext = useTreeContext(),
|
|
58132
58135
|
onFileClick = _useTreeContext.onFileClick;
|
|
@@ -58227,7 +58230,7 @@ var TreeStatusIcon = function TreeStatusIcon(_ref) {
|
|
|
58227
58230
|
};
|
|
58228
58231
|
TreeStatusIcon.displayName = 'TreeStatusIcon';
|
|
58229
58232
|
|
|
58230
|
-
var _excluded$
|
|
58233
|
+
var _excluded$4 = ["name", "children", "parentPath", "level", "extra", "className"];
|
|
58231
58234
|
var _TreeFolder = function TreeFolder(_ref) {
|
|
58232
58235
|
var name = _ref.name,
|
|
58233
58236
|
_ref$children = _ref.children,
|
|
@@ -58238,7 +58241,7 @@ var _TreeFolder = function TreeFolder(_ref) {
|
|
|
58238
58241
|
parentLevel = _ref$level === void 0 ? 0 : _ref$level,
|
|
58239
58242
|
extra = _ref.extra,
|
|
58240
58243
|
className = _ref.className,
|
|
58241
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
58244
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
58242
58245
|
var theme = distExports.useTheme();
|
|
58243
58246
|
var _useTreeContext = useTreeContext(),
|
|
58244
58247
|
initialExpand = _useTreeContext.initialExpand,
|
|
@@ -58291,7 +58294,7 @@ var _TreeFolder = function TreeFolder(_ref) {
|
|
|
58291
58294
|
};
|
|
58292
58295
|
_TreeFolder.displayName = 'TreeFolder';
|
|
58293
58296
|
|
|
58294
|
-
var _excluded$
|
|
58297
|
+
var _excluded$3 = ["children", "onClick", "initialExpand", "value", "className"];
|
|
58295
58298
|
var FileTreeValueType = tuple('directory', 'file');
|
|
58296
58299
|
var directoryType = FileTreeValueType[0];
|
|
58297
58300
|
var _makeChildren = function makeChildren() {
|
|
@@ -58320,7 +58323,7 @@ var Tree = function Tree(_ref) {
|
|
|
58320
58323
|
initialExpand = _ref$initialExpand === void 0 ? false : _ref$initialExpand,
|
|
58321
58324
|
value = _ref.value,
|
|
58322
58325
|
className = _ref.className,
|
|
58323
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
58326
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
58324
58327
|
var isImperative = Boolean(value && value.length > 0);
|
|
58325
58328
|
var onFileClick = function onFileClick(path) {
|
|
58326
58329
|
onClick && onClick(path);
|
|
@@ -58611,7 +58614,7 @@ function useTime() {
|
|
|
58611
58614
|
return _objectSpread2({}, Time.getFormattedTimeFromSeconds(seconds, format));
|
|
58612
58615
|
}
|
|
58613
58616
|
|
|
58614
|
-
var _excluded$
|
|
58617
|
+
var _excluded$2 = ["src", "text", "name", "children", "className", "altText"];
|
|
58615
58618
|
var UserComponent = function UserComponent(_ref) {
|
|
58616
58619
|
var src = _ref.src,
|
|
58617
58620
|
text = _ref.text,
|
|
@@ -58620,7 +58623,7 @@ var UserComponent = function UserComponent(_ref) {
|
|
|
58620
58623
|
_ref$className = _ref.className,
|
|
58621
58624
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
58622
58625
|
altText = _ref.altText,
|
|
58623
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
58626
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
58624
58627
|
var theme = distExports.useTheme();
|
|
58625
58628
|
var _useScale = useScale(),
|
|
58626
58629
|
SCALES = _useScale.SCALES,
|
|
@@ -58647,13 +58650,13 @@ var UserComponent = function UserComponent(_ref) {
|
|
|
58647
58650
|
UserComponent.displayName = 'User';
|
|
58648
58651
|
var User = withScale(UserComponent);
|
|
58649
58652
|
|
|
58650
|
-
var _excluded = ["href", "className", "children"];
|
|
58653
|
+
var _excluded$1 = ["href", "className", "children"];
|
|
58651
58654
|
var UserLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
58652
58655
|
var href = _ref.href,
|
|
58653
58656
|
_ref$className = _ref.className,
|
|
58654
58657
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
58655
58658
|
children = _ref.children,
|
|
58656
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
58659
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
58657
58660
|
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
58658
58661
|
className: "jsx-3263947648" + " " + (props && props.className != null && props.className || className || "")
|
|
58659
58662
|
}), /*#__PURE__*/React.createElement(Link, {
|
|
@@ -60317,6 +60320,2597 @@ var LoginSocialGithub = function LoginSocialGithub(_ref) {
|
|
|
60317
60320
|
};
|
|
60318
60321
|
var index = /*#__PURE__*/React.memo(LoginSocialGithub);
|
|
60319
60322
|
|
|
60323
|
+
var propTypes = {exports: {}};
|
|
60324
|
+
|
|
60325
|
+
/*
|
|
60326
|
+
object-assign
|
|
60327
|
+
(c) Sindre Sorhus
|
|
60328
|
+
@license MIT
|
|
60329
|
+
*/
|
|
60330
|
+
|
|
60331
|
+
var objectAssign;
|
|
60332
|
+
var hasRequiredObjectAssign;
|
|
60333
|
+
|
|
60334
|
+
function requireObjectAssign () {
|
|
60335
|
+
if (hasRequiredObjectAssign) return objectAssign;
|
|
60336
|
+
hasRequiredObjectAssign = 1;
|
|
60337
|
+
/* eslint-disable no-unused-vars */
|
|
60338
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
60339
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
60340
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
60341
|
+
|
|
60342
|
+
function toObject(val) {
|
|
60343
|
+
if (val === null || val === undefined) {
|
|
60344
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
60345
|
+
}
|
|
60346
|
+
|
|
60347
|
+
return Object(val);
|
|
60348
|
+
}
|
|
60349
|
+
|
|
60350
|
+
function shouldUseNative() {
|
|
60351
|
+
try {
|
|
60352
|
+
if (!Object.assign) {
|
|
60353
|
+
return false;
|
|
60354
|
+
}
|
|
60355
|
+
|
|
60356
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
60357
|
+
|
|
60358
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
60359
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
60360
|
+
test1[5] = 'de';
|
|
60361
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
60362
|
+
return false;
|
|
60363
|
+
}
|
|
60364
|
+
|
|
60365
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
60366
|
+
var test2 = {};
|
|
60367
|
+
for (var i = 0; i < 10; i++) {
|
|
60368
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
60369
|
+
}
|
|
60370
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
60371
|
+
return test2[n];
|
|
60372
|
+
});
|
|
60373
|
+
if (order2.join('') !== '0123456789') {
|
|
60374
|
+
return false;
|
|
60375
|
+
}
|
|
60376
|
+
|
|
60377
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
60378
|
+
var test3 = {};
|
|
60379
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
60380
|
+
test3[letter] = letter;
|
|
60381
|
+
});
|
|
60382
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
60383
|
+
'abcdefghijklmnopqrst') {
|
|
60384
|
+
return false;
|
|
60385
|
+
}
|
|
60386
|
+
|
|
60387
|
+
return true;
|
|
60388
|
+
} catch (err) {
|
|
60389
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
60390
|
+
return false;
|
|
60391
|
+
}
|
|
60392
|
+
}
|
|
60393
|
+
|
|
60394
|
+
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
60395
|
+
var from;
|
|
60396
|
+
var to = toObject(target);
|
|
60397
|
+
var symbols;
|
|
60398
|
+
|
|
60399
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
60400
|
+
from = Object(arguments[s]);
|
|
60401
|
+
|
|
60402
|
+
for (var key in from) {
|
|
60403
|
+
if (hasOwnProperty.call(from, key)) {
|
|
60404
|
+
to[key] = from[key];
|
|
60405
|
+
}
|
|
60406
|
+
}
|
|
60407
|
+
|
|
60408
|
+
if (getOwnPropertySymbols) {
|
|
60409
|
+
symbols = getOwnPropertySymbols(from);
|
|
60410
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
60411
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
60412
|
+
to[symbols[i]] = from[symbols[i]];
|
|
60413
|
+
}
|
|
60414
|
+
}
|
|
60415
|
+
}
|
|
60416
|
+
}
|
|
60417
|
+
|
|
60418
|
+
return to;
|
|
60419
|
+
};
|
|
60420
|
+
return objectAssign;
|
|
60421
|
+
}
|
|
60422
|
+
|
|
60423
|
+
/**
|
|
60424
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
60425
|
+
*
|
|
60426
|
+
* This source code is licensed under the MIT license found in the
|
|
60427
|
+
* LICENSE file in the root directory of this source tree.
|
|
60428
|
+
*/
|
|
60429
|
+
|
|
60430
|
+
var ReactPropTypesSecret_1;
|
|
60431
|
+
var hasRequiredReactPropTypesSecret;
|
|
60432
|
+
|
|
60433
|
+
function requireReactPropTypesSecret () {
|
|
60434
|
+
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
60435
|
+
hasRequiredReactPropTypesSecret = 1;
|
|
60436
|
+
|
|
60437
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
60438
|
+
|
|
60439
|
+
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
60440
|
+
return ReactPropTypesSecret_1;
|
|
60441
|
+
}
|
|
60442
|
+
|
|
60443
|
+
var has;
|
|
60444
|
+
var hasRequiredHas;
|
|
60445
|
+
|
|
60446
|
+
function requireHas () {
|
|
60447
|
+
if (hasRequiredHas) return has;
|
|
60448
|
+
hasRequiredHas = 1;
|
|
60449
|
+
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
60450
|
+
return has;
|
|
60451
|
+
}
|
|
60452
|
+
|
|
60453
|
+
/**
|
|
60454
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
60455
|
+
*
|
|
60456
|
+
* This source code is licensed under the MIT license found in the
|
|
60457
|
+
* LICENSE file in the root directory of this source tree.
|
|
60458
|
+
*/
|
|
60459
|
+
|
|
60460
|
+
var checkPropTypes_1;
|
|
60461
|
+
var hasRequiredCheckPropTypes;
|
|
60462
|
+
|
|
60463
|
+
function requireCheckPropTypes () {
|
|
60464
|
+
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
60465
|
+
hasRequiredCheckPropTypes = 1;
|
|
60466
|
+
|
|
60467
|
+
var printWarning = function() {};
|
|
60468
|
+
|
|
60469
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
60470
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
|
|
60471
|
+
var loggedTypeFailures = {};
|
|
60472
|
+
var has = /*@__PURE__*/ requireHas();
|
|
60473
|
+
|
|
60474
|
+
printWarning = function(text) {
|
|
60475
|
+
var message = 'Warning: ' + text;
|
|
60476
|
+
if (typeof console !== 'undefined') {
|
|
60477
|
+
console.error(message);
|
|
60478
|
+
}
|
|
60479
|
+
try {
|
|
60480
|
+
// --- Welcome to debugging React ---
|
|
60481
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
60482
|
+
// to find the callsite that caused this warning to fire.
|
|
60483
|
+
throw new Error(message);
|
|
60484
|
+
} catch (x) { /**/ }
|
|
60485
|
+
};
|
|
60486
|
+
}
|
|
60487
|
+
|
|
60488
|
+
/**
|
|
60489
|
+
* Assert that the values match with the type specs.
|
|
60490
|
+
* Error messages are memorized and will only be shown once.
|
|
60491
|
+
*
|
|
60492
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
60493
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
60494
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
60495
|
+
* @param {string} componentName Name of the component for error messages.
|
|
60496
|
+
* @param {?Function} getStack Returns the component stack.
|
|
60497
|
+
* @private
|
|
60498
|
+
*/
|
|
60499
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
60500
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
60501
|
+
for (var typeSpecName in typeSpecs) {
|
|
60502
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
60503
|
+
var error;
|
|
60504
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
60505
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
60506
|
+
// After these have been cleaned up, we'll let them throw.
|
|
60507
|
+
try {
|
|
60508
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
60509
|
+
// behavior as without this statement except with a better message.
|
|
60510
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
60511
|
+
var err = Error(
|
|
60512
|
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
60513
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
60514
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
60515
|
+
);
|
|
60516
|
+
err.name = 'Invariant Violation';
|
|
60517
|
+
throw err;
|
|
60518
|
+
}
|
|
60519
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
60520
|
+
} catch (ex) {
|
|
60521
|
+
error = ex;
|
|
60522
|
+
}
|
|
60523
|
+
if (error && !(error instanceof Error)) {
|
|
60524
|
+
printWarning(
|
|
60525
|
+
(componentName || 'React class') + ': type specification of ' +
|
|
60526
|
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
60527
|
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
60528
|
+
'You may have forgotten to pass an argument to the type checker ' +
|
|
60529
|
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
60530
|
+
'shape all require an argument).'
|
|
60531
|
+
);
|
|
60532
|
+
}
|
|
60533
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
60534
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
60535
|
+
// same error.
|
|
60536
|
+
loggedTypeFailures[error.message] = true;
|
|
60537
|
+
|
|
60538
|
+
var stack = getStack ? getStack() : '';
|
|
60539
|
+
|
|
60540
|
+
printWarning(
|
|
60541
|
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
60542
|
+
);
|
|
60543
|
+
}
|
|
60544
|
+
}
|
|
60545
|
+
}
|
|
60546
|
+
}
|
|
60547
|
+
}
|
|
60548
|
+
|
|
60549
|
+
/**
|
|
60550
|
+
* Resets warning cache when testing.
|
|
60551
|
+
*
|
|
60552
|
+
* @private
|
|
60553
|
+
*/
|
|
60554
|
+
checkPropTypes.resetWarningCache = function() {
|
|
60555
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
60556
|
+
loggedTypeFailures = {};
|
|
60557
|
+
}
|
|
60558
|
+
};
|
|
60559
|
+
|
|
60560
|
+
checkPropTypes_1 = checkPropTypes;
|
|
60561
|
+
return checkPropTypes_1;
|
|
60562
|
+
}
|
|
60563
|
+
|
|
60564
|
+
/**
|
|
60565
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
60566
|
+
*
|
|
60567
|
+
* This source code is licensed under the MIT license found in the
|
|
60568
|
+
* LICENSE file in the root directory of this source tree.
|
|
60569
|
+
*/
|
|
60570
|
+
|
|
60571
|
+
var factoryWithTypeCheckers;
|
|
60572
|
+
var hasRequiredFactoryWithTypeCheckers;
|
|
60573
|
+
|
|
60574
|
+
function requireFactoryWithTypeCheckers () {
|
|
60575
|
+
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
60576
|
+
hasRequiredFactoryWithTypeCheckers = 1;
|
|
60577
|
+
|
|
60578
|
+
var ReactIs = require$$0;
|
|
60579
|
+
var assign = requireObjectAssign();
|
|
60580
|
+
|
|
60581
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
|
|
60582
|
+
var has = /*@__PURE__*/ requireHas();
|
|
60583
|
+
var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes();
|
|
60584
|
+
|
|
60585
|
+
var printWarning = function() {};
|
|
60586
|
+
|
|
60587
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
60588
|
+
printWarning = function(text) {
|
|
60589
|
+
var message = 'Warning: ' + text;
|
|
60590
|
+
if (typeof console !== 'undefined') {
|
|
60591
|
+
console.error(message);
|
|
60592
|
+
}
|
|
60593
|
+
try {
|
|
60594
|
+
// --- Welcome to debugging React ---
|
|
60595
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
60596
|
+
// to find the callsite that caused this warning to fire.
|
|
60597
|
+
throw new Error(message);
|
|
60598
|
+
} catch (x) {}
|
|
60599
|
+
};
|
|
60600
|
+
}
|
|
60601
|
+
|
|
60602
|
+
function emptyFunctionThatReturnsNull() {
|
|
60603
|
+
return null;
|
|
60604
|
+
}
|
|
60605
|
+
|
|
60606
|
+
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
60607
|
+
/* global Symbol */
|
|
60608
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
60609
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
60610
|
+
|
|
60611
|
+
/**
|
|
60612
|
+
* Returns the iterator method function contained on the iterable object.
|
|
60613
|
+
*
|
|
60614
|
+
* Be sure to invoke the function with the iterable as context:
|
|
60615
|
+
*
|
|
60616
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
60617
|
+
* if (iteratorFn) {
|
|
60618
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
60619
|
+
* ...
|
|
60620
|
+
* }
|
|
60621
|
+
*
|
|
60622
|
+
* @param {?object} maybeIterable
|
|
60623
|
+
* @return {?function}
|
|
60624
|
+
*/
|
|
60625
|
+
function getIteratorFn(maybeIterable) {
|
|
60626
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
60627
|
+
if (typeof iteratorFn === 'function') {
|
|
60628
|
+
return iteratorFn;
|
|
60629
|
+
}
|
|
60630
|
+
}
|
|
60631
|
+
|
|
60632
|
+
/**
|
|
60633
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
60634
|
+
* supplied to React components. Example usage:
|
|
60635
|
+
*
|
|
60636
|
+
* var Props = require('ReactPropTypes');
|
|
60637
|
+
* var MyArticle = React.createClass({
|
|
60638
|
+
* propTypes: {
|
|
60639
|
+
* // An optional string prop named "description".
|
|
60640
|
+
* description: Props.string,
|
|
60641
|
+
*
|
|
60642
|
+
* // A required enum prop named "category".
|
|
60643
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
60644
|
+
*
|
|
60645
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
60646
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
60647
|
+
* },
|
|
60648
|
+
* render: function() { ... }
|
|
60649
|
+
* });
|
|
60650
|
+
*
|
|
60651
|
+
* A more formal specification of how these methods are used:
|
|
60652
|
+
*
|
|
60653
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
60654
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
60655
|
+
*
|
|
60656
|
+
* Each and every declaration produces a function with the same signature. This
|
|
60657
|
+
* allows the creation of custom validation functions. For example:
|
|
60658
|
+
*
|
|
60659
|
+
* var MyLink = React.createClass({
|
|
60660
|
+
* propTypes: {
|
|
60661
|
+
* // An optional string or URI prop named "href".
|
|
60662
|
+
* href: function(props, propName, componentName) {
|
|
60663
|
+
* var propValue = props[propName];
|
|
60664
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
60665
|
+
* !(propValue instanceof URI)) {
|
|
60666
|
+
* return new Error(
|
|
60667
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
60668
|
+
* componentName
|
|
60669
|
+
* );
|
|
60670
|
+
* }
|
|
60671
|
+
* }
|
|
60672
|
+
* },
|
|
60673
|
+
* render: function() {...}
|
|
60674
|
+
* });
|
|
60675
|
+
*
|
|
60676
|
+
* @internal
|
|
60677
|
+
*/
|
|
60678
|
+
|
|
60679
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
60680
|
+
|
|
60681
|
+
// Important!
|
|
60682
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
60683
|
+
var ReactPropTypes = {
|
|
60684
|
+
array: createPrimitiveTypeChecker('array'),
|
|
60685
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
60686
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
60687
|
+
func: createPrimitiveTypeChecker('function'),
|
|
60688
|
+
number: createPrimitiveTypeChecker('number'),
|
|
60689
|
+
object: createPrimitiveTypeChecker('object'),
|
|
60690
|
+
string: createPrimitiveTypeChecker('string'),
|
|
60691
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
60692
|
+
|
|
60693
|
+
any: createAnyTypeChecker(),
|
|
60694
|
+
arrayOf: createArrayOfTypeChecker,
|
|
60695
|
+
element: createElementTypeChecker(),
|
|
60696
|
+
elementType: createElementTypeTypeChecker(),
|
|
60697
|
+
instanceOf: createInstanceTypeChecker,
|
|
60698
|
+
node: createNodeChecker(),
|
|
60699
|
+
objectOf: createObjectOfTypeChecker,
|
|
60700
|
+
oneOf: createEnumTypeChecker,
|
|
60701
|
+
oneOfType: createUnionTypeChecker,
|
|
60702
|
+
shape: createShapeTypeChecker,
|
|
60703
|
+
exact: createStrictShapeTypeChecker,
|
|
60704
|
+
};
|
|
60705
|
+
|
|
60706
|
+
/**
|
|
60707
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
60708
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
60709
|
+
*/
|
|
60710
|
+
/*eslint-disable no-self-compare*/
|
|
60711
|
+
function is(x, y) {
|
|
60712
|
+
// SameValue algorithm
|
|
60713
|
+
if (x === y) {
|
|
60714
|
+
// Steps 1-5, 7-10
|
|
60715
|
+
// Steps 6.b-6.e: +0 != -0
|
|
60716
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
60717
|
+
} else {
|
|
60718
|
+
// Step 6.a: NaN == NaN
|
|
60719
|
+
return x !== x && y !== y;
|
|
60720
|
+
}
|
|
60721
|
+
}
|
|
60722
|
+
/*eslint-enable no-self-compare*/
|
|
60723
|
+
|
|
60724
|
+
/**
|
|
60725
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
60726
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
60727
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
60728
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
60729
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
60730
|
+
*/
|
|
60731
|
+
function PropTypeError(message, data) {
|
|
60732
|
+
this.message = message;
|
|
60733
|
+
this.data = data && typeof data === 'object' ? data: {};
|
|
60734
|
+
this.stack = '';
|
|
60735
|
+
}
|
|
60736
|
+
// Make `instanceof Error` still work for returned errors.
|
|
60737
|
+
PropTypeError.prototype = Error.prototype;
|
|
60738
|
+
|
|
60739
|
+
function createChainableTypeChecker(validate) {
|
|
60740
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
60741
|
+
var manualPropTypeCallCache = {};
|
|
60742
|
+
var manualPropTypeWarningCount = 0;
|
|
60743
|
+
}
|
|
60744
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
60745
|
+
componentName = componentName || ANONYMOUS;
|
|
60746
|
+
propFullName = propFullName || propName;
|
|
60747
|
+
|
|
60748
|
+
if (secret !== ReactPropTypesSecret) {
|
|
60749
|
+
if (throwOnDirectAccess) {
|
|
60750
|
+
// New behavior only for users of `prop-types` package
|
|
60751
|
+
var err = new Error(
|
|
60752
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
60753
|
+
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
60754
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
60755
|
+
);
|
|
60756
|
+
err.name = 'Invariant Violation';
|
|
60757
|
+
throw err;
|
|
60758
|
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
60759
|
+
// Old behavior for people using React.PropTypes
|
|
60760
|
+
var cacheKey = componentName + ':' + propName;
|
|
60761
|
+
if (
|
|
60762
|
+
!manualPropTypeCallCache[cacheKey] &&
|
|
60763
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
60764
|
+
manualPropTypeWarningCount < 3
|
|
60765
|
+
) {
|
|
60766
|
+
printWarning(
|
|
60767
|
+
'You are manually calling a React.PropTypes validation ' +
|
|
60768
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
60769
|
+
'and will throw in the standalone `prop-types` package. ' +
|
|
60770
|
+
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
60771
|
+
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
60772
|
+
);
|
|
60773
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
60774
|
+
manualPropTypeWarningCount++;
|
|
60775
|
+
}
|
|
60776
|
+
}
|
|
60777
|
+
}
|
|
60778
|
+
if (props[propName] == null) {
|
|
60779
|
+
if (isRequired) {
|
|
60780
|
+
if (props[propName] === null) {
|
|
60781
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
60782
|
+
}
|
|
60783
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
60784
|
+
}
|
|
60785
|
+
return null;
|
|
60786
|
+
} else {
|
|
60787
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
60788
|
+
}
|
|
60789
|
+
}
|
|
60790
|
+
|
|
60791
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
60792
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
60793
|
+
|
|
60794
|
+
return chainedCheckType;
|
|
60795
|
+
}
|
|
60796
|
+
|
|
60797
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
60798
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
60799
|
+
var propValue = props[propName];
|
|
60800
|
+
var propType = getPropType(propValue);
|
|
60801
|
+
if (propType !== expectedType) {
|
|
60802
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
60803
|
+
// check, but we can offer a more precise error message here rather than
|
|
60804
|
+
// 'of type `object`'.
|
|
60805
|
+
var preciseType = getPreciseType(propValue);
|
|
60806
|
+
|
|
60807
|
+
return new PropTypeError(
|
|
60808
|
+
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
60809
|
+
{expectedType: expectedType}
|
|
60810
|
+
);
|
|
60811
|
+
}
|
|
60812
|
+
return null;
|
|
60813
|
+
}
|
|
60814
|
+
return createChainableTypeChecker(validate);
|
|
60815
|
+
}
|
|
60816
|
+
|
|
60817
|
+
function createAnyTypeChecker() {
|
|
60818
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
60819
|
+
}
|
|
60820
|
+
|
|
60821
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
60822
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60823
|
+
if (typeof typeChecker !== 'function') {
|
|
60824
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
60825
|
+
}
|
|
60826
|
+
var propValue = props[propName];
|
|
60827
|
+
if (!Array.isArray(propValue)) {
|
|
60828
|
+
var propType = getPropType(propValue);
|
|
60829
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
60830
|
+
}
|
|
60831
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
60832
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
60833
|
+
if (error instanceof Error) {
|
|
60834
|
+
return error;
|
|
60835
|
+
}
|
|
60836
|
+
}
|
|
60837
|
+
return null;
|
|
60838
|
+
}
|
|
60839
|
+
return createChainableTypeChecker(validate);
|
|
60840
|
+
}
|
|
60841
|
+
|
|
60842
|
+
function createElementTypeChecker() {
|
|
60843
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60844
|
+
var propValue = props[propName];
|
|
60845
|
+
if (!isValidElement(propValue)) {
|
|
60846
|
+
var propType = getPropType(propValue);
|
|
60847
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
60848
|
+
}
|
|
60849
|
+
return null;
|
|
60850
|
+
}
|
|
60851
|
+
return createChainableTypeChecker(validate);
|
|
60852
|
+
}
|
|
60853
|
+
|
|
60854
|
+
function createElementTypeTypeChecker() {
|
|
60855
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60856
|
+
var propValue = props[propName];
|
|
60857
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
60858
|
+
var propType = getPropType(propValue);
|
|
60859
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
60860
|
+
}
|
|
60861
|
+
return null;
|
|
60862
|
+
}
|
|
60863
|
+
return createChainableTypeChecker(validate);
|
|
60864
|
+
}
|
|
60865
|
+
|
|
60866
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
60867
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60868
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
60869
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
60870
|
+
var actualClassName = getClassName(props[propName]);
|
|
60871
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
60872
|
+
}
|
|
60873
|
+
return null;
|
|
60874
|
+
}
|
|
60875
|
+
return createChainableTypeChecker(validate);
|
|
60876
|
+
}
|
|
60877
|
+
|
|
60878
|
+
function createEnumTypeChecker(expectedValues) {
|
|
60879
|
+
if (!Array.isArray(expectedValues)) {
|
|
60880
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
60881
|
+
if (arguments.length > 1) {
|
|
60882
|
+
printWarning(
|
|
60883
|
+
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
60884
|
+
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
60885
|
+
);
|
|
60886
|
+
} else {
|
|
60887
|
+
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
60888
|
+
}
|
|
60889
|
+
}
|
|
60890
|
+
return emptyFunctionThatReturnsNull;
|
|
60891
|
+
}
|
|
60892
|
+
|
|
60893
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60894
|
+
var propValue = props[propName];
|
|
60895
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
60896
|
+
if (is(propValue, expectedValues[i])) {
|
|
60897
|
+
return null;
|
|
60898
|
+
}
|
|
60899
|
+
}
|
|
60900
|
+
|
|
60901
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
60902
|
+
var type = getPreciseType(value);
|
|
60903
|
+
if (type === 'symbol') {
|
|
60904
|
+
return String(value);
|
|
60905
|
+
}
|
|
60906
|
+
return value;
|
|
60907
|
+
});
|
|
60908
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
60909
|
+
}
|
|
60910
|
+
return createChainableTypeChecker(validate);
|
|
60911
|
+
}
|
|
60912
|
+
|
|
60913
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
60914
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60915
|
+
if (typeof typeChecker !== 'function') {
|
|
60916
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
60917
|
+
}
|
|
60918
|
+
var propValue = props[propName];
|
|
60919
|
+
var propType = getPropType(propValue);
|
|
60920
|
+
if (propType !== 'object') {
|
|
60921
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
60922
|
+
}
|
|
60923
|
+
for (var key in propValue) {
|
|
60924
|
+
if (has(propValue, key)) {
|
|
60925
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
60926
|
+
if (error instanceof Error) {
|
|
60927
|
+
return error;
|
|
60928
|
+
}
|
|
60929
|
+
}
|
|
60930
|
+
}
|
|
60931
|
+
return null;
|
|
60932
|
+
}
|
|
60933
|
+
return createChainableTypeChecker(validate);
|
|
60934
|
+
}
|
|
60935
|
+
|
|
60936
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
60937
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
60938
|
+
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
60939
|
+
return emptyFunctionThatReturnsNull;
|
|
60940
|
+
}
|
|
60941
|
+
|
|
60942
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
60943
|
+
var checker = arrayOfTypeCheckers[i];
|
|
60944
|
+
if (typeof checker !== 'function') {
|
|
60945
|
+
printWarning(
|
|
60946
|
+
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
60947
|
+
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
60948
|
+
);
|
|
60949
|
+
return emptyFunctionThatReturnsNull;
|
|
60950
|
+
}
|
|
60951
|
+
}
|
|
60952
|
+
|
|
60953
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60954
|
+
var expectedTypes = [];
|
|
60955
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
60956
|
+
var checker = arrayOfTypeCheckers[i];
|
|
60957
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
60958
|
+
if (checkerResult == null) {
|
|
60959
|
+
return null;
|
|
60960
|
+
}
|
|
60961
|
+
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
60962
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
60963
|
+
}
|
|
60964
|
+
}
|
|
60965
|
+
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
60966
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
60967
|
+
}
|
|
60968
|
+
return createChainableTypeChecker(validate);
|
|
60969
|
+
}
|
|
60970
|
+
|
|
60971
|
+
function createNodeChecker() {
|
|
60972
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60973
|
+
if (!isNode(props[propName])) {
|
|
60974
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
60975
|
+
}
|
|
60976
|
+
return null;
|
|
60977
|
+
}
|
|
60978
|
+
return createChainableTypeChecker(validate);
|
|
60979
|
+
}
|
|
60980
|
+
|
|
60981
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
60982
|
+
return new PropTypeError(
|
|
60983
|
+
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
60984
|
+
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
60985
|
+
);
|
|
60986
|
+
}
|
|
60987
|
+
|
|
60988
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
60989
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
60990
|
+
var propValue = props[propName];
|
|
60991
|
+
var propType = getPropType(propValue);
|
|
60992
|
+
if (propType !== 'object') {
|
|
60993
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
60994
|
+
}
|
|
60995
|
+
for (var key in shapeTypes) {
|
|
60996
|
+
var checker = shapeTypes[key];
|
|
60997
|
+
if (typeof checker !== 'function') {
|
|
60998
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
60999
|
+
}
|
|
61000
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
61001
|
+
if (error) {
|
|
61002
|
+
return error;
|
|
61003
|
+
}
|
|
61004
|
+
}
|
|
61005
|
+
return null;
|
|
61006
|
+
}
|
|
61007
|
+
return createChainableTypeChecker(validate);
|
|
61008
|
+
}
|
|
61009
|
+
|
|
61010
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
61011
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
61012
|
+
var propValue = props[propName];
|
|
61013
|
+
var propType = getPropType(propValue);
|
|
61014
|
+
if (propType !== 'object') {
|
|
61015
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
61016
|
+
}
|
|
61017
|
+
// We need to check all keys in case some are required but missing from props.
|
|
61018
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
61019
|
+
for (var key in allKeys) {
|
|
61020
|
+
var checker = shapeTypes[key];
|
|
61021
|
+
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
61022
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
61023
|
+
}
|
|
61024
|
+
if (!checker) {
|
|
61025
|
+
return new PropTypeError(
|
|
61026
|
+
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
61027
|
+
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
61028
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
61029
|
+
);
|
|
61030
|
+
}
|
|
61031
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
61032
|
+
if (error) {
|
|
61033
|
+
return error;
|
|
61034
|
+
}
|
|
61035
|
+
}
|
|
61036
|
+
return null;
|
|
61037
|
+
}
|
|
61038
|
+
|
|
61039
|
+
return createChainableTypeChecker(validate);
|
|
61040
|
+
}
|
|
61041
|
+
|
|
61042
|
+
function isNode(propValue) {
|
|
61043
|
+
switch (typeof propValue) {
|
|
61044
|
+
case 'number':
|
|
61045
|
+
case 'string':
|
|
61046
|
+
case 'undefined':
|
|
61047
|
+
return true;
|
|
61048
|
+
case 'boolean':
|
|
61049
|
+
return !propValue;
|
|
61050
|
+
case 'object':
|
|
61051
|
+
if (Array.isArray(propValue)) {
|
|
61052
|
+
return propValue.every(isNode);
|
|
61053
|
+
}
|
|
61054
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
61055
|
+
return true;
|
|
61056
|
+
}
|
|
61057
|
+
|
|
61058
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
61059
|
+
if (iteratorFn) {
|
|
61060
|
+
var iterator = iteratorFn.call(propValue);
|
|
61061
|
+
var step;
|
|
61062
|
+
if (iteratorFn !== propValue.entries) {
|
|
61063
|
+
while (!(step = iterator.next()).done) {
|
|
61064
|
+
if (!isNode(step.value)) {
|
|
61065
|
+
return false;
|
|
61066
|
+
}
|
|
61067
|
+
}
|
|
61068
|
+
} else {
|
|
61069
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
61070
|
+
while (!(step = iterator.next()).done) {
|
|
61071
|
+
var entry = step.value;
|
|
61072
|
+
if (entry) {
|
|
61073
|
+
if (!isNode(entry[1])) {
|
|
61074
|
+
return false;
|
|
61075
|
+
}
|
|
61076
|
+
}
|
|
61077
|
+
}
|
|
61078
|
+
}
|
|
61079
|
+
} else {
|
|
61080
|
+
return false;
|
|
61081
|
+
}
|
|
61082
|
+
|
|
61083
|
+
return true;
|
|
61084
|
+
default:
|
|
61085
|
+
return false;
|
|
61086
|
+
}
|
|
61087
|
+
}
|
|
61088
|
+
|
|
61089
|
+
function isSymbol(propType, propValue) {
|
|
61090
|
+
// Native Symbol.
|
|
61091
|
+
if (propType === 'symbol') {
|
|
61092
|
+
return true;
|
|
61093
|
+
}
|
|
61094
|
+
|
|
61095
|
+
// falsy value can't be a Symbol
|
|
61096
|
+
if (!propValue) {
|
|
61097
|
+
return false;
|
|
61098
|
+
}
|
|
61099
|
+
|
|
61100
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
61101
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
61102
|
+
return true;
|
|
61103
|
+
}
|
|
61104
|
+
|
|
61105
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
61106
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
61107
|
+
return true;
|
|
61108
|
+
}
|
|
61109
|
+
|
|
61110
|
+
return false;
|
|
61111
|
+
}
|
|
61112
|
+
|
|
61113
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
61114
|
+
function getPropType(propValue) {
|
|
61115
|
+
var propType = typeof propValue;
|
|
61116
|
+
if (Array.isArray(propValue)) {
|
|
61117
|
+
return 'array';
|
|
61118
|
+
}
|
|
61119
|
+
if (propValue instanceof RegExp) {
|
|
61120
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
61121
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
61122
|
+
// passes PropTypes.object.
|
|
61123
|
+
return 'object';
|
|
61124
|
+
}
|
|
61125
|
+
if (isSymbol(propType, propValue)) {
|
|
61126
|
+
return 'symbol';
|
|
61127
|
+
}
|
|
61128
|
+
return propType;
|
|
61129
|
+
}
|
|
61130
|
+
|
|
61131
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
61132
|
+
// See `createPrimitiveTypeChecker`.
|
|
61133
|
+
function getPreciseType(propValue) {
|
|
61134
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
61135
|
+
return '' + propValue;
|
|
61136
|
+
}
|
|
61137
|
+
var propType = getPropType(propValue);
|
|
61138
|
+
if (propType === 'object') {
|
|
61139
|
+
if (propValue instanceof Date) {
|
|
61140
|
+
return 'date';
|
|
61141
|
+
} else if (propValue instanceof RegExp) {
|
|
61142
|
+
return 'regexp';
|
|
61143
|
+
}
|
|
61144
|
+
}
|
|
61145
|
+
return propType;
|
|
61146
|
+
}
|
|
61147
|
+
|
|
61148
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
61149
|
+
// For example, "undefined" or "of type array"
|
|
61150
|
+
function getPostfixForTypeWarning(value) {
|
|
61151
|
+
var type = getPreciseType(value);
|
|
61152
|
+
switch (type) {
|
|
61153
|
+
case 'array':
|
|
61154
|
+
case 'object':
|
|
61155
|
+
return 'an ' + type;
|
|
61156
|
+
case 'boolean':
|
|
61157
|
+
case 'date':
|
|
61158
|
+
case 'regexp':
|
|
61159
|
+
return 'a ' + type;
|
|
61160
|
+
default:
|
|
61161
|
+
return type;
|
|
61162
|
+
}
|
|
61163
|
+
}
|
|
61164
|
+
|
|
61165
|
+
// Returns class name of the object, if any.
|
|
61166
|
+
function getClassName(propValue) {
|
|
61167
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
61168
|
+
return ANONYMOUS;
|
|
61169
|
+
}
|
|
61170
|
+
return propValue.constructor.name;
|
|
61171
|
+
}
|
|
61172
|
+
|
|
61173
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
61174
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
61175
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
61176
|
+
|
|
61177
|
+
return ReactPropTypes;
|
|
61178
|
+
};
|
|
61179
|
+
return factoryWithTypeCheckers;
|
|
61180
|
+
}
|
|
61181
|
+
|
|
61182
|
+
/**
|
|
61183
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
61184
|
+
*
|
|
61185
|
+
* This source code is licensed under the MIT license found in the
|
|
61186
|
+
* LICENSE file in the root directory of this source tree.
|
|
61187
|
+
*/
|
|
61188
|
+
|
|
61189
|
+
var factoryWithThrowingShims;
|
|
61190
|
+
var hasRequiredFactoryWithThrowingShims;
|
|
61191
|
+
|
|
61192
|
+
function requireFactoryWithThrowingShims () {
|
|
61193
|
+
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
61194
|
+
hasRequiredFactoryWithThrowingShims = 1;
|
|
61195
|
+
|
|
61196
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
|
|
61197
|
+
|
|
61198
|
+
function emptyFunction() {}
|
|
61199
|
+
function emptyFunctionWithReset() {}
|
|
61200
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
61201
|
+
|
|
61202
|
+
factoryWithThrowingShims = function() {
|
|
61203
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
61204
|
+
if (secret === ReactPropTypesSecret) {
|
|
61205
|
+
// It is still safe when called from React.
|
|
61206
|
+
return;
|
|
61207
|
+
}
|
|
61208
|
+
var err = new Error(
|
|
61209
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
61210
|
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
61211
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
61212
|
+
);
|
|
61213
|
+
err.name = 'Invariant Violation';
|
|
61214
|
+
throw err;
|
|
61215
|
+
} shim.isRequired = shim;
|
|
61216
|
+
function getShim() {
|
|
61217
|
+
return shim;
|
|
61218
|
+
} // Important!
|
|
61219
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
61220
|
+
var ReactPropTypes = {
|
|
61221
|
+
array: shim,
|
|
61222
|
+
bigint: shim,
|
|
61223
|
+
bool: shim,
|
|
61224
|
+
func: shim,
|
|
61225
|
+
number: shim,
|
|
61226
|
+
object: shim,
|
|
61227
|
+
string: shim,
|
|
61228
|
+
symbol: shim,
|
|
61229
|
+
|
|
61230
|
+
any: shim,
|
|
61231
|
+
arrayOf: getShim,
|
|
61232
|
+
element: shim,
|
|
61233
|
+
elementType: shim,
|
|
61234
|
+
instanceOf: getShim,
|
|
61235
|
+
node: shim,
|
|
61236
|
+
objectOf: getShim,
|
|
61237
|
+
oneOf: getShim,
|
|
61238
|
+
oneOfType: getShim,
|
|
61239
|
+
shape: getShim,
|
|
61240
|
+
exact: getShim,
|
|
61241
|
+
|
|
61242
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
61243
|
+
resetWarningCache: emptyFunction
|
|
61244
|
+
};
|
|
61245
|
+
|
|
61246
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
61247
|
+
|
|
61248
|
+
return ReactPropTypes;
|
|
61249
|
+
};
|
|
61250
|
+
return factoryWithThrowingShims;
|
|
61251
|
+
}
|
|
61252
|
+
|
|
61253
|
+
/**
|
|
61254
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
61255
|
+
*
|
|
61256
|
+
* This source code is licensed under the MIT license found in the
|
|
61257
|
+
* LICENSE file in the root directory of this source tree.
|
|
61258
|
+
*/
|
|
61259
|
+
|
|
61260
|
+
var hasRequiredPropTypes;
|
|
61261
|
+
|
|
61262
|
+
function requirePropTypes () {
|
|
61263
|
+
if (hasRequiredPropTypes) return propTypes.exports;
|
|
61264
|
+
hasRequiredPropTypes = 1;
|
|
61265
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
61266
|
+
var ReactIs = require$$0;
|
|
61267
|
+
|
|
61268
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
61269
|
+
// http://fb.me/prop-types-in-prod
|
|
61270
|
+
var throwOnDirectAccess = true;
|
|
61271
|
+
propTypes.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
61272
|
+
} else {
|
|
61273
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
61274
|
+
// http://fb.me/prop-types-in-prod
|
|
61275
|
+
propTypes.exports = /*@__PURE__*/ requireFactoryWithThrowingShims()();
|
|
61276
|
+
}
|
|
61277
|
+
return propTypes.exports;
|
|
61278
|
+
}
|
|
61279
|
+
|
|
61280
|
+
var propTypesExports = /*@__PURE__*/ requirePropTypes();
|
|
61281
|
+
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
61282
|
+
|
|
61283
|
+
var _excluded = ["tagName", "className", "style", "children", "allowMouseEvents", "onSwipeUp", "onSwipeDown", "onSwipeLeft", "onSwipeRight", "onSwipeStart", "onSwipeMove", "onSwipeEnd", "innerRef", "tolerance"];
|
|
61284
|
+
var supportsCaptureOption = false;
|
|
61285
|
+
function setHasSupportToCaptureOption(hasSupport) {
|
|
61286
|
+
supportsCaptureOption = hasSupport;
|
|
61287
|
+
}
|
|
61288
|
+
try {
|
|
61289
|
+
addEventListener('test', null, Object.defineProperty({}, 'capture', {
|
|
61290
|
+
get: function get() {
|
|
61291
|
+
setHasSupportToCaptureOption(true);
|
|
61292
|
+
}
|
|
61293
|
+
}));
|
|
61294
|
+
} catch (e) {} // eslint-disable-line no-empty
|
|
61295
|
+
|
|
61296
|
+
function getSafeEventHandlerOpts() {
|
|
61297
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
61298
|
+
capture: true
|
|
61299
|
+
};
|
|
61300
|
+
return supportsCaptureOption ? options : false;
|
|
61301
|
+
}
|
|
61302
|
+
|
|
61303
|
+
/**
|
|
61304
|
+
* [getPosition returns a position element that works for mouse or touch events]
|
|
61305
|
+
* @param {[Event]} event [the received event]
|
|
61306
|
+
* @return {[Object]} [x and y coords]
|
|
61307
|
+
*/
|
|
61308
|
+
function getPosition$1(event) {
|
|
61309
|
+
if ('touches' in event) {
|
|
61310
|
+
var _event$touches$ = event.touches[0],
|
|
61311
|
+
pageX = _event$touches$.pageX,
|
|
61312
|
+
pageY = _event$touches$.pageY;
|
|
61313
|
+
return {
|
|
61314
|
+
x: pageX,
|
|
61315
|
+
y: pageY
|
|
61316
|
+
};
|
|
61317
|
+
}
|
|
61318
|
+
var screenX = event.screenX,
|
|
61319
|
+
screenY = event.screenY;
|
|
61320
|
+
return {
|
|
61321
|
+
x: screenX,
|
|
61322
|
+
y: screenY
|
|
61323
|
+
};
|
|
61324
|
+
}
|
|
61325
|
+
var ReactSwipe = /*#__PURE__*/function (_Component) {
|
|
61326
|
+
function ReactSwipe() {
|
|
61327
|
+
var _this;
|
|
61328
|
+
_classCallCheck(this, ReactSwipe);
|
|
61329
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
61330
|
+
args[_key] = arguments[_key];
|
|
61331
|
+
}
|
|
61332
|
+
_this = _callSuper(this, ReactSwipe, [].concat(args));
|
|
61333
|
+
_this._handleSwipeStart = _this._handleSwipeStart.bind(_this);
|
|
61334
|
+
_this._handleSwipeMove = _this._handleSwipeMove.bind(_this);
|
|
61335
|
+
_this._handleSwipeEnd = _this._handleSwipeEnd.bind(_this);
|
|
61336
|
+
_this._onMouseDown = _this._onMouseDown.bind(_this);
|
|
61337
|
+
_this._onMouseMove = _this._onMouseMove.bind(_this);
|
|
61338
|
+
_this._onMouseUp = _this._onMouseUp.bind(_this);
|
|
61339
|
+
_this._setSwiperRef = _this._setSwiperRef.bind(_this);
|
|
61340
|
+
return _this;
|
|
61341
|
+
}
|
|
61342
|
+
_inherits(ReactSwipe, _Component);
|
|
61343
|
+
return _createClass(ReactSwipe, [{
|
|
61344
|
+
key: "componentDidMount",
|
|
61345
|
+
value: function componentDidMount() {
|
|
61346
|
+
if (this.swiper) {
|
|
61347
|
+
this.swiper.addEventListener('touchmove', this._handleSwipeMove, getSafeEventHandlerOpts({
|
|
61348
|
+
capture: true,
|
|
61349
|
+
passive: false
|
|
61350
|
+
}));
|
|
61351
|
+
}
|
|
61352
|
+
}
|
|
61353
|
+
}, {
|
|
61354
|
+
key: "componentWillUnmount",
|
|
61355
|
+
value: function componentWillUnmount() {
|
|
61356
|
+
if (this.swiper) {
|
|
61357
|
+
this.swiper.removeEventListener('touchmove', this._handleSwipeMove, getSafeEventHandlerOpts({
|
|
61358
|
+
capture: true,
|
|
61359
|
+
passive: false
|
|
61360
|
+
}));
|
|
61361
|
+
}
|
|
61362
|
+
}
|
|
61363
|
+
}, {
|
|
61364
|
+
key: "_onMouseDown",
|
|
61365
|
+
value: function _onMouseDown(event) {
|
|
61366
|
+
if (!this.props.allowMouseEvents) {
|
|
61367
|
+
return;
|
|
61368
|
+
}
|
|
61369
|
+
this.mouseDown = true;
|
|
61370
|
+
document.addEventListener('mouseup', this._onMouseUp);
|
|
61371
|
+
document.addEventListener('mousemove', this._onMouseMove);
|
|
61372
|
+
this._handleSwipeStart(event);
|
|
61373
|
+
}
|
|
61374
|
+
}, {
|
|
61375
|
+
key: "_onMouseMove",
|
|
61376
|
+
value: function _onMouseMove(event) {
|
|
61377
|
+
if (!this.mouseDown) {
|
|
61378
|
+
return;
|
|
61379
|
+
}
|
|
61380
|
+
this._handleSwipeMove(event);
|
|
61381
|
+
}
|
|
61382
|
+
}, {
|
|
61383
|
+
key: "_onMouseUp",
|
|
61384
|
+
value: function _onMouseUp(event) {
|
|
61385
|
+
this.mouseDown = false;
|
|
61386
|
+
document.removeEventListener('mouseup', this._onMouseUp);
|
|
61387
|
+
document.removeEventListener('mousemove', this._onMouseMove);
|
|
61388
|
+
this._handleSwipeEnd(event);
|
|
61389
|
+
}
|
|
61390
|
+
}, {
|
|
61391
|
+
key: "_handleSwipeStart",
|
|
61392
|
+
value: function _handleSwipeStart(event) {
|
|
61393
|
+
var _getPosition = getPosition$1(event),
|
|
61394
|
+
x = _getPosition.x,
|
|
61395
|
+
y = _getPosition.y;
|
|
61396
|
+
this.moveStart = {
|
|
61397
|
+
x: x,
|
|
61398
|
+
y: y
|
|
61399
|
+
};
|
|
61400
|
+
this.props.onSwipeStart(event);
|
|
61401
|
+
}
|
|
61402
|
+
}, {
|
|
61403
|
+
key: "_handleSwipeMove",
|
|
61404
|
+
value: function _handleSwipeMove(event) {
|
|
61405
|
+
if (!this.moveStart) {
|
|
61406
|
+
return;
|
|
61407
|
+
}
|
|
61408
|
+
var _getPosition2 = getPosition$1(event),
|
|
61409
|
+
x = _getPosition2.x,
|
|
61410
|
+
y = _getPosition2.y;
|
|
61411
|
+
var deltaX = x - this.moveStart.x;
|
|
61412
|
+
var deltaY = y - this.moveStart.y;
|
|
61413
|
+
this.moving = true;
|
|
61414
|
+
|
|
61415
|
+
// handling the responsability of cancelling the scroll to
|
|
61416
|
+
// the component handling the event
|
|
61417
|
+
var shouldPreventDefault = this.props.onSwipeMove({
|
|
61418
|
+
x: deltaX,
|
|
61419
|
+
y: deltaY
|
|
61420
|
+
}, event);
|
|
61421
|
+
if (shouldPreventDefault && event.cancelable) {
|
|
61422
|
+
event.preventDefault();
|
|
61423
|
+
}
|
|
61424
|
+
this.movePosition = {
|
|
61425
|
+
deltaX: deltaX,
|
|
61426
|
+
deltaY: deltaY
|
|
61427
|
+
};
|
|
61428
|
+
}
|
|
61429
|
+
}, {
|
|
61430
|
+
key: "_handleSwipeEnd",
|
|
61431
|
+
value: function _handleSwipeEnd(event) {
|
|
61432
|
+
this.props.onSwipeEnd(event);
|
|
61433
|
+
var tolerance = this.props.tolerance;
|
|
61434
|
+
if (this.moving && this.movePosition) {
|
|
61435
|
+
if (this.movePosition.deltaX < -tolerance) {
|
|
61436
|
+
this.props.onSwipeLeft(1, event);
|
|
61437
|
+
} else if (this.movePosition.deltaX > tolerance) {
|
|
61438
|
+
this.props.onSwipeRight(1, event);
|
|
61439
|
+
}
|
|
61440
|
+
if (this.movePosition.deltaY < -tolerance) {
|
|
61441
|
+
this.props.onSwipeUp(1, event);
|
|
61442
|
+
} else if (this.movePosition.deltaY > tolerance) {
|
|
61443
|
+
this.props.onSwipeDown(1, event);
|
|
61444
|
+
}
|
|
61445
|
+
}
|
|
61446
|
+
this.moveStart = null;
|
|
61447
|
+
this.moving = false;
|
|
61448
|
+
this.movePosition = null;
|
|
61449
|
+
}
|
|
61450
|
+
}, {
|
|
61451
|
+
key: "_setSwiperRef",
|
|
61452
|
+
value: function _setSwiperRef(node) {
|
|
61453
|
+
this.swiper = node;
|
|
61454
|
+
this.props.innerRef(node);
|
|
61455
|
+
}
|
|
61456
|
+
}, {
|
|
61457
|
+
key: "render",
|
|
61458
|
+
value: function render() {
|
|
61459
|
+
var _this$props = this.props;
|
|
61460
|
+
_this$props.tagName;
|
|
61461
|
+
var className = _this$props.className,
|
|
61462
|
+
style = _this$props.style,
|
|
61463
|
+
children = _this$props.children;
|
|
61464
|
+
_this$props.allowMouseEvents;
|
|
61465
|
+
_this$props.onSwipeUp;
|
|
61466
|
+
_this$props.onSwipeDown;
|
|
61467
|
+
_this$props.onSwipeLeft;
|
|
61468
|
+
_this$props.onSwipeRight;
|
|
61469
|
+
_this$props.onSwipeStart;
|
|
61470
|
+
_this$props.onSwipeMove;
|
|
61471
|
+
_this$props.onSwipeEnd;
|
|
61472
|
+
_this$props.innerRef;
|
|
61473
|
+
_this$props.tolerance;
|
|
61474
|
+
var props = _objectWithoutProperties(_this$props, _excluded);
|
|
61475
|
+
return /*#__PURE__*/React.createElement(this.props.tagName, _extends({
|
|
61476
|
+
ref: this._setSwiperRef,
|
|
61477
|
+
onMouseDown: this._onMouseDown,
|
|
61478
|
+
onTouchStart: this._handleSwipeStart,
|
|
61479
|
+
onTouchEnd: this._handleSwipeEnd,
|
|
61480
|
+
className: className,
|
|
61481
|
+
style: style
|
|
61482
|
+
}, props), children);
|
|
61483
|
+
}
|
|
61484
|
+
}]);
|
|
61485
|
+
}(React.Component);
|
|
61486
|
+
_defineProperty$1(ReactSwipe, "displayName", 'ReactSwipe');
|
|
61487
|
+
_defineProperty$1(ReactSwipe, "propTypes", {
|
|
61488
|
+
tagName: PropTypes.string,
|
|
61489
|
+
className: PropTypes.string,
|
|
61490
|
+
style: PropTypes.object,
|
|
61491
|
+
children: PropTypes.node,
|
|
61492
|
+
allowMouseEvents: PropTypes.bool,
|
|
61493
|
+
onSwipeUp: PropTypes.func,
|
|
61494
|
+
onSwipeDown: PropTypes.func,
|
|
61495
|
+
onSwipeLeft: PropTypes.func,
|
|
61496
|
+
onSwipeRight: PropTypes.func,
|
|
61497
|
+
onSwipeStart: PropTypes.func,
|
|
61498
|
+
onSwipeMove: PropTypes.func,
|
|
61499
|
+
onSwipeEnd: PropTypes.func,
|
|
61500
|
+
innerRef: PropTypes.func,
|
|
61501
|
+
tolerance: PropTypes.number.isRequired
|
|
61502
|
+
});
|
|
61503
|
+
_defineProperty$1(ReactSwipe, "defaultProps", {
|
|
61504
|
+
tagName: 'div',
|
|
61505
|
+
allowMouseEvents: false,
|
|
61506
|
+
onSwipeUp: function onSwipeUp() {},
|
|
61507
|
+
onSwipeDown: function onSwipeDown() {},
|
|
61508
|
+
onSwipeLeft: function onSwipeLeft() {},
|
|
61509
|
+
onSwipeRight: function onSwipeRight() {},
|
|
61510
|
+
onSwipeStart: function onSwipeStart() {},
|
|
61511
|
+
onSwipeMove: function onSwipeMove() {},
|
|
61512
|
+
onSwipeEnd: function onSwipeEnd() {},
|
|
61513
|
+
innerRef: function innerRef() {},
|
|
61514
|
+
tolerance: 0
|
|
61515
|
+
});
|
|
61516
|
+
|
|
61517
|
+
var classnames = {exports: {}};
|
|
61518
|
+
|
|
61519
|
+
/*!
|
|
61520
|
+
Copyright (c) 2018 Jed Watson.
|
|
61521
|
+
Licensed under the MIT License (MIT), see
|
|
61522
|
+
http://jedwatson.github.io/classnames
|
|
61523
|
+
*/
|
|
61524
|
+
|
|
61525
|
+
var hasRequiredClassnames;
|
|
61526
|
+
|
|
61527
|
+
function requireClassnames () {
|
|
61528
|
+
if (hasRequiredClassnames) return classnames.exports;
|
|
61529
|
+
hasRequiredClassnames = 1;
|
|
61530
|
+
(function (module) {
|
|
61531
|
+
/* global define */
|
|
61532
|
+
|
|
61533
|
+
(function () {
|
|
61534
|
+
|
|
61535
|
+
var hasOwn = {}.hasOwnProperty;
|
|
61536
|
+
|
|
61537
|
+
function classNames () {
|
|
61538
|
+
var classes = '';
|
|
61539
|
+
|
|
61540
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
61541
|
+
var arg = arguments[i];
|
|
61542
|
+
if (arg) {
|
|
61543
|
+
classes = appendClass(classes, parseValue(arg));
|
|
61544
|
+
}
|
|
61545
|
+
}
|
|
61546
|
+
|
|
61547
|
+
return classes;
|
|
61548
|
+
}
|
|
61549
|
+
|
|
61550
|
+
function parseValue (arg) {
|
|
61551
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
61552
|
+
return arg;
|
|
61553
|
+
}
|
|
61554
|
+
|
|
61555
|
+
if (typeof arg !== 'object') {
|
|
61556
|
+
return '';
|
|
61557
|
+
}
|
|
61558
|
+
|
|
61559
|
+
if (Array.isArray(arg)) {
|
|
61560
|
+
return classNames.apply(null, arg);
|
|
61561
|
+
}
|
|
61562
|
+
|
|
61563
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
61564
|
+
return arg.toString();
|
|
61565
|
+
}
|
|
61566
|
+
|
|
61567
|
+
var classes = '';
|
|
61568
|
+
|
|
61569
|
+
for (var key in arg) {
|
|
61570
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
61571
|
+
classes = appendClass(classes, key);
|
|
61572
|
+
}
|
|
61573
|
+
}
|
|
61574
|
+
|
|
61575
|
+
return classes;
|
|
61576
|
+
}
|
|
61577
|
+
|
|
61578
|
+
function appendClass (value, newClass) {
|
|
61579
|
+
if (!newClass) {
|
|
61580
|
+
return value;
|
|
61581
|
+
}
|
|
61582
|
+
|
|
61583
|
+
if (value) {
|
|
61584
|
+
return value + ' ' + newClass;
|
|
61585
|
+
}
|
|
61586
|
+
|
|
61587
|
+
return value + newClass;
|
|
61588
|
+
}
|
|
61589
|
+
|
|
61590
|
+
if (module.exports) {
|
|
61591
|
+
classNames.default = classNames;
|
|
61592
|
+
module.exports = classNames;
|
|
61593
|
+
} else {
|
|
61594
|
+
window.classNames = classNames;
|
|
61595
|
+
}
|
|
61596
|
+
}());
|
|
61597
|
+
} (classnames));
|
|
61598
|
+
return classnames.exports;
|
|
61599
|
+
}
|
|
61600
|
+
|
|
61601
|
+
var classnamesExports = requireClassnames();
|
|
61602
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
61603
|
+
|
|
61604
|
+
var klass = {
|
|
61605
|
+
ROOT: function ROOT(customClassName) {
|
|
61606
|
+
return classNames(_defineProperty$1({
|
|
61607
|
+
'carousel-root': true
|
|
61608
|
+
}, customClassName || '', !!customClassName));
|
|
61609
|
+
},
|
|
61610
|
+
CAROUSEL: function CAROUSEL(isSlider) {
|
|
61611
|
+
return classNames({
|
|
61612
|
+
carousel: true,
|
|
61613
|
+
'carousel-slider': isSlider
|
|
61614
|
+
});
|
|
61615
|
+
},
|
|
61616
|
+
WRAPPER: function WRAPPER(isSlider, axis) {
|
|
61617
|
+
return classNames({
|
|
61618
|
+
'thumbs-wrapper': !isSlider,
|
|
61619
|
+
'slider-wrapper': isSlider,
|
|
61620
|
+
'axis-horizontal': axis === 'horizontal',
|
|
61621
|
+
'axis-vertical': axis !== 'horizontal'
|
|
61622
|
+
});
|
|
61623
|
+
},
|
|
61624
|
+
SLIDER: function SLIDER(isSlider, isSwiping) {
|
|
61625
|
+
return classNames({
|
|
61626
|
+
thumbs: !isSlider,
|
|
61627
|
+
slider: isSlider,
|
|
61628
|
+
animated: !isSwiping
|
|
61629
|
+
});
|
|
61630
|
+
},
|
|
61631
|
+
ITEM: function ITEM(isSlider, selected, previous) {
|
|
61632
|
+
return classNames({
|
|
61633
|
+
thumb: !isSlider,
|
|
61634
|
+
slide: isSlider,
|
|
61635
|
+
selected: selected,
|
|
61636
|
+
previous: previous
|
|
61637
|
+
});
|
|
61638
|
+
},
|
|
61639
|
+
ARROW_PREV: function ARROW_PREV(disabled) {
|
|
61640
|
+
return classNames({
|
|
61641
|
+
'control-arrow control-prev': true,
|
|
61642
|
+
'control-disabled': disabled
|
|
61643
|
+
});
|
|
61644
|
+
},
|
|
61645
|
+
ARROW_NEXT: function ARROW_NEXT(disabled) {
|
|
61646
|
+
return classNames({
|
|
61647
|
+
'control-arrow control-next': true,
|
|
61648
|
+
'control-disabled': disabled
|
|
61649
|
+
});
|
|
61650
|
+
},
|
|
61651
|
+
DOT: function DOT(selected) {
|
|
61652
|
+
return classNames({
|
|
61653
|
+
dot: true,
|
|
61654
|
+
selected: selected
|
|
61655
|
+
});
|
|
61656
|
+
}
|
|
61657
|
+
};
|
|
61658
|
+
|
|
61659
|
+
var outerWidth = function outerWidth(el) {
|
|
61660
|
+
var width = el.offsetWidth;
|
|
61661
|
+
var style = getComputedStyle(el);
|
|
61662
|
+
width += parseInt(style.marginLeft) + parseInt(style.marginRight);
|
|
61663
|
+
return width;
|
|
61664
|
+
};
|
|
61665
|
+
|
|
61666
|
+
var CSSTranslate = (function (position, metric, axis) {
|
|
61667
|
+
var positionPercent = position === 0 ? position : position + metric;
|
|
61668
|
+
var positionCss = axis === 'horizontal' ? [positionPercent, 0, 0] : [0, positionPercent, 0];
|
|
61669
|
+
var transitionProp = 'translate3d';
|
|
61670
|
+
var translatedPosition = '(' + positionCss.join(',') + ')';
|
|
61671
|
+
return transitionProp + translatedPosition;
|
|
61672
|
+
});
|
|
61673
|
+
|
|
61674
|
+
var getWindow = (function () {
|
|
61675
|
+
return window;
|
|
61676
|
+
});
|
|
61677
|
+
|
|
61678
|
+
var isKeyboardEvent$1 = function isKeyboardEvent(e) {
|
|
61679
|
+
return e.hasOwnProperty('key');
|
|
61680
|
+
};
|
|
61681
|
+
var Thumbs = /*#__PURE__*/function (_Component) {
|
|
61682
|
+
function Thumbs(_props) {
|
|
61683
|
+
var _this;
|
|
61684
|
+
_classCallCheck(this, Thumbs);
|
|
61685
|
+
_this = _callSuper(this, Thumbs, [_props]);
|
|
61686
|
+
_defineProperty$1(_this, "setItemsWrapperRef", function (node) {
|
|
61687
|
+
_this.itemsWrapperRef = node;
|
|
61688
|
+
});
|
|
61689
|
+
_defineProperty$1(_this, "setItemsListRef", function (node) {
|
|
61690
|
+
_this.itemsListRef = node;
|
|
61691
|
+
});
|
|
61692
|
+
_defineProperty$1(_this, "setThumbsRef", function (node, index) {
|
|
61693
|
+
if (!_this.thumbsRef) {
|
|
61694
|
+
_this.thumbsRef = [];
|
|
61695
|
+
}
|
|
61696
|
+
_this.thumbsRef[index] = node;
|
|
61697
|
+
});
|
|
61698
|
+
_defineProperty$1(_this, "updateSizes", function () {
|
|
61699
|
+
if (!_this.props.children || !_this.itemsWrapperRef || !_this.thumbsRef) {
|
|
61700
|
+
return;
|
|
61701
|
+
}
|
|
61702
|
+
var total = React.Children.count(_this.props.children);
|
|
61703
|
+
var wrapperSize = _this.itemsWrapperRef.clientWidth;
|
|
61704
|
+
var itemSize = _this.props.thumbWidth ? _this.props.thumbWidth : outerWidth(_this.thumbsRef[0]);
|
|
61705
|
+
var visibleItems = Math.floor(wrapperSize / itemSize);
|
|
61706
|
+
var showArrows = visibleItems < total;
|
|
61707
|
+
var lastPosition = showArrows ? total - visibleItems : 0;
|
|
61708
|
+
_this.setState(function (_state, props) {
|
|
61709
|
+
return {
|
|
61710
|
+
itemSize: itemSize,
|
|
61711
|
+
visibleItems: visibleItems,
|
|
61712
|
+
firstItem: showArrows ? _this.getFirstItem(props.selectedItem) : 0,
|
|
61713
|
+
lastPosition: lastPosition,
|
|
61714
|
+
showArrows: showArrows
|
|
61715
|
+
};
|
|
61716
|
+
});
|
|
61717
|
+
});
|
|
61718
|
+
_defineProperty$1(_this, "handleClickItem", function (index, item, e) {
|
|
61719
|
+
if (!isKeyboardEvent$1(e) || e.key === 'Enter') {
|
|
61720
|
+
var handler = _this.props.onSelectItem;
|
|
61721
|
+
if (typeof handler === 'function') {
|
|
61722
|
+
handler(index, item);
|
|
61723
|
+
}
|
|
61724
|
+
}
|
|
61725
|
+
});
|
|
61726
|
+
_defineProperty$1(_this, "onSwipeStart", function () {
|
|
61727
|
+
_this.setState({
|
|
61728
|
+
swiping: true
|
|
61729
|
+
});
|
|
61730
|
+
});
|
|
61731
|
+
_defineProperty$1(_this, "onSwipeEnd", function () {
|
|
61732
|
+
_this.setState({
|
|
61733
|
+
swiping: false
|
|
61734
|
+
});
|
|
61735
|
+
});
|
|
61736
|
+
_defineProperty$1(_this, "onSwipeMove", function (delta) {
|
|
61737
|
+
var deltaX = delta.x;
|
|
61738
|
+
if (!_this.state.itemSize || !_this.itemsWrapperRef || !_this.state.visibleItems) {
|
|
61739
|
+
return false;
|
|
61740
|
+
}
|
|
61741
|
+
var leftBoundary = 0;
|
|
61742
|
+
var childrenLength = React.Children.count(_this.props.children);
|
|
61743
|
+
var currentPosition = -(_this.state.firstItem * 100) / _this.state.visibleItems;
|
|
61744
|
+
var lastLeftItem = Math.max(childrenLength - _this.state.visibleItems, 0);
|
|
61745
|
+
var lastLeftBoundary = -lastLeftItem * 100 / _this.state.visibleItems;
|
|
61746
|
+
|
|
61747
|
+
// prevent user from swiping left out of boundaries
|
|
61748
|
+
if (currentPosition === leftBoundary && deltaX > 0) {
|
|
61749
|
+
deltaX = 0;
|
|
61750
|
+
}
|
|
61751
|
+
|
|
61752
|
+
// prevent user from swiping right out of boundaries
|
|
61753
|
+
if (currentPosition === lastLeftBoundary && deltaX < 0) {
|
|
61754
|
+
deltaX = 0;
|
|
61755
|
+
}
|
|
61756
|
+
var wrapperSize = _this.itemsWrapperRef.clientWidth;
|
|
61757
|
+
var position = currentPosition + 100 / (wrapperSize / deltaX);
|
|
61758
|
+
// if 3d isn't available we will use left to move
|
|
61759
|
+
if (_this.itemsListRef) {
|
|
61760
|
+
['WebkitTransform', 'MozTransform', 'MsTransform', 'OTransform', 'transform', 'msTransform'].forEach(function (prop) {
|
|
61761
|
+
_this.itemsListRef.style[prop] = CSSTranslate(position, '%', _this.props.axis);
|
|
61762
|
+
});
|
|
61763
|
+
}
|
|
61764
|
+
return true;
|
|
61765
|
+
});
|
|
61766
|
+
_defineProperty$1(_this, "slideRight", function (positions) {
|
|
61767
|
+
_this.moveTo(_this.state.firstItem - (typeof positions === 'number' ? positions : 1));
|
|
61768
|
+
});
|
|
61769
|
+
_defineProperty$1(_this, "slideLeft", function (positions) {
|
|
61770
|
+
_this.moveTo(_this.state.firstItem + (typeof positions === 'number' ? positions : 1));
|
|
61771
|
+
});
|
|
61772
|
+
_defineProperty$1(_this, "moveTo", function (position) {
|
|
61773
|
+
// position can't be lower than 0
|
|
61774
|
+
position = position < 0 ? 0 : position;
|
|
61775
|
+
// position can't be higher than last postion
|
|
61776
|
+
position = position >= _this.state.lastPosition ? _this.state.lastPosition : position;
|
|
61777
|
+
_this.setState({
|
|
61778
|
+
firstItem: position
|
|
61779
|
+
});
|
|
61780
|
+
});
|
|
61781
|
+
_this.state = {
|
|
61782
|
+
selectedItem: _props.selectedItem,
|
|
61783
|
+
swiping: false,
|
|
61784
|
+
showArrows: false,
|
|
61785
|
+
firstItem: 0,
|
|
61786
|
+
visibleItems: 0,
|
|
61787
|
+
lastPosition: 0
|
|
61788
|
+
};
|
|
61789
|
+
return _this;
|
|
61790
|
+
}
|
|
61791
|
+
_inherits(Thumbs, _Component);
|
|
61792
|
+
return _createClass(Thumbs, [{
|
|
61793
|
+
key: "componentDidMount",
|
|
61794
|
+
value: function componentDidMount() {
|
|
61795
|
+
this.setupThumbs();
|
|
61796
|
+
}
|
|
61797
|
+
}, {
|
|
61798
|
+
key: "componentDidUpdate",
|
|
61799
|
+
value: function componentDidUpdate(prevProps) {
|
|
61800
|
+
if (this.props.selectedItem !== this.state.selectedItem) {
|
|
61801
|
+
this.setState({
|
|
61802
|
+
selectedItem: this.props.selectedItem,
|
|
61803
|
+
firstItem: this.getFirstItem(this.props.selectedItem)
|
|
61804
|
+
});
|
|
61805
|
+
}
|
|
61806
|
+
if (this.props.children === prevProps.children) {
|
|
61807
|
+
return;
|
|
61808
|
+
}
|
|
61809
|
+
|
|
61810
|
+
// This will capture any size changes for arrow adjustments etc.
|
|
61811
|
+
// usually in the same render cycle so we don't see any flickers
|
|
61812
|
+
this.updateSizes();
|
|
61813
|
+
}
|
|
61814
|
+
}, {
|
|
61815
|
+
key: "componentWillUnmount",
|
|
61816
|
+
value: function componentWillUnmount() {
|
|
61817
|
+
this.destroyThumbs();
|
|
61818
|
+
}
|
|
61819
|
+
}, {
|
|
61820
|
+
key: "setupThumbs",
|
|
61821
|
+
value: function setupThumbs() {
|
|
61822
|
+
// as the widths are calculated, we need to resize
|
|
61823
|
+
// the carousel when the window is resized
|
|
61824
|
+
getWindow().addEventListener('resize', this.updateSizes);
|
|
61825
|
+
// issue #2 - image loading smaller
|
|
61826
|
+
getWindow().addEventListener('DOMContentLoaded', this.updateSizes);
|
|
61827
|
+
|
|
61828
|
+
// when the component is rendered we need to calculate
|
|
61829
|
+
// the container size to adjust the responsive behaviour
|
|
61830
|
+
this.updateSizes();
|
|
61831
|
+
}
|
|
61832
|
+
}, {
|
|
61833
|
+
key: "destroyThumbs",
|
|
61834
|
+
value: function destroyThumbs() {
|
|
61835
|
+
// removing listeners
|
|
61836
|
+
getWindow().removeEventListener('resize', this.updateSizes);
|
|
61837
|
+
getWindow().removeEventListener('DOMContentLoaded', this.updateSizes);
|
|
61838
|
+
}
|
|
61839
|
+
}, {
|
|
61840
|
+
key: "getFirstItem",
|
|
61841
|
+
value: function getFirstItem(selectedItem) {
|
|
61842
|
+
var firstItem = selectedItem;
|
|
61843
|
+
if (selectedItem >= this.state.lastPosition) {
|
|
61844
|
+
firstItem = this.state.lastPosition;
|
|
61845
|
+
}
|
|
61846
|
+
if (selectedItem < this.state.firstItem + this.state.visibleItems) {
|
|
61847
|
+
firstItem = this.state.firstItem;
|
|
61848
|
+
}
|
|
61849
|
+
if (selectedItem < this.state.firstItem) {
|
|
61850
|
+
firstItem = selectedItem;
|
|
61851
|
+
}
|
|
61852
|
+
return firstItem;
|
|
61853
|
+
}
|
|
61854
|
+
}, {
|
|
61855
|
+
key: "renderItems",
|
|
61856
|
+
value: function renderItems() {
|
|
61857
|
+
var _this2 = this;
|
|
61858
|
+
return this.props.children.map(function (img, index) {
|
|
61859
|
+
var itemClass = klass.ITEM(false, index === _this2.state.selectedItem);
|
|
61860
|
+
var thumbProps = {
|
|
61861
|
+
key: index,
|
|
61862
|
+
ref: function ref(e) {
|
|
61863
|
+
return _this2.setThumbsRef(e, index);
|
|
61864
|
+
},
|
|
61865
|
+
className: itemClass,
|
|
61866
|
+
onClick: _this2.handleClickItem.bind(_this2, index, _this2.props.children[index]),
|
|
61867
|
+
onKeyDown: _this2.handleClickItem.bind(_this2, index, _this2.props.children[index]),
|
|
61868
|
+
'aria-label': "".concat(_this2.props.labels.item, " ").concat(index + 1),
|
|
61869
|
+
style: {
|
|
61870
|
+
width: _this2.props.thumbWidth
|
|
61871
|
+
}
|
|
61872
|
+
};
|
|
61873
|
+
return /*#__PURE__*/React.createElement("li", _extends({}, thumbProps, {
|
|
61874
|
+
role: "button",
|
|
61875
|
+
tabIndex: 0,
|
|
61876
|
+
className: "jsx-2129274269" + " " + (thumbProps && thumbProps.className != null && thumbProps.className || "")
|
|
61877
|
+
}), img, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
61878
|
+
id: "2129274269"
|
|
61879
|
+
}, ".thumb.jsx-2129274269{-webkit-transition:border 0.15s ease-in;transition:border 0.15s ease-in;display:inline-block;margin-right:6px;margin-bottom:0 !important;white-space:nowrap;overflow:hidden;border:3px solid #fff;padding:2px;}.thumb.jsx-2129274269:focus{border:3px solid #ccc;outline:none;}.thumb.selected.jsx-2129274269,.thumb.jsx-2129274269:hover{border:3px solid #0099ff;}.thumb.jsx-2129274269 img.jsx-2129274269{vertical-align:top;}"));
|
|
61880
|
+
});
|
|
61881
|
+
}
|
|
61882
|
+
}, {
|
|
61883
|
+
key: "render",
|
|
61884
|
+
value: function render() {
|
|
61885
|
+
var _this3 = this;
|
|
61886
|
+
if (!this.props.children) {
|
|
61887
|
+
return null;
|
|
61888
|
+
}
|
|
61889
|
+
var isSwipeable = React.Children.count(this.props.children) > 1;
|
|
61890
|
+
|
|
61891
|
+
// show left arrow?
|
|
61892
|
+
var hasPrev = this.state.showArrows && this.state.firstItem > 0;
|
|
61893
|
+
// show right arrow
|
|
61894
|
+
var hasNext = this.state.showArrows && this.state.firstItem < this.state.lastPosition;
|
|
61895
|
+
// obj to hold the transformations and styles
|
|
61896
|
+
var itemListStyles = {};
|
|
61897
|
+
var currentPosition = -this.state.firstItem * (this.state.itemSize || 0);
|
|
61898
|
+
var transformProp = CSSTranslate(currentPosition, 'px', this.props.axis);
|
|
61899
|
+
var transitionTime = this.props.transitionTime + 'ms';
|
|
61900
|
+
itemListStyles = {
|
|
61901
|
+
WebkitTransform: transformProp,
|
|
61902
|
+
MozTransform: transformProp,
|
|
61903
|
+
MsTransform: transformProp,
|
|
61904
|
+
OTransform: transformProp,
|
|
61905
|
+
transform: transformProp,
|
|
61906
|
+
msTransform: transformProp,
|
|
61907
|
+
WebkitTransitionDuration: transitionTime,
|
|
61908
|
+
MozTransitionDuration: transitionTime,
|
|
61909
|
+
MsTransitionDuration: transitionTime,
|
|
61910
|
+
OTransitionDuration: transitionTime,
|
|
61911
|
+
transitionDuration: transitionTime,
|
|
61912
|
+
msTransitionDuration: transitionTime
|
|
61913
|
+
};
|
|
61914
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
61915
|
+
className: "jsx-3452014152" + " " + (klass.CAROUSEL(false) || "")
|
|
61916
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
61917
|
+
ref: this.setItemsWrapperRef,
|
|
61918
|
+
className: "jsx-3452014152" + " " + (klass.WRAPPER(false) || "")
|
|
61919
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
61920
|
+
scale: 2 / 3,
|
|
61921
|
+
auto: true,
|
|
61922
|
+
px: 0.6,
|
|
61923
|
+
type: "button",
|
|
61924
|
+
style: {
|
|
61925
|
+
position: 'absolute',
|
|
61926
|
+
zIndex: '2',
|
|
61927
|
+
left: 0
|
|
61928
|
+
},
|
|
61929
|
+
iconRight: /*#__PURE__*/React.createElement(ChevronLeft$1, null),
|
|
61930
|
+
className: klass.ARROW_PREV(!hasPrev),
|
|
61931
|
+
onClick: function onClick() {
|
|
61932
|
+
return _this3.slideRight();
|
|
61933
|
+
},
|
|
61934
|
+
"aria-label": this.props.labels.leftArrow
|
|
61935
|
+
}), isSwipeable ? /*#__PURE__*/React.createElement(ReactSwipe, {
|
|
61936
|
+
tagName: "ul",
|
|
61937
|
+
className: klass.SLIDER(false, this.state.swiping),
|
|
61938
|
+
onSwipeLeft: this.slideLeft,
|
|
61939
|
+
onSwipeRight: this.slideRight,
|
|
61940
|
+
onSwipeMove: this.onSwipeMove,
|
|
61941
|
+
onSwipeStart: this.onSwipeStart,
|
|
61942
|
+
onSwipeEnd: this.onSwipeEnd,
|
|
61943
|
+
style: _objectSpread2({
|
|
61944
|
+
display: 'flex',
|
|
61945
|
+
margin: '20px 45px'
|
|
61946
|
+
}, itemListStyles),
|
|
61947
|
+
innerRef: this.setItemsListRef,
|
|
61948
|
+
allowMouseEvents: this.props.emulateTouch
|
|
61949
|
+
}, this.renderItems()) : /*#__PURE__*/React.createElement("ul", {
|
|
61950
|
+
ref: function ref(node) {
|
|
61951
|
+
return _this3.setItemsListRef(node);
|
|
61952
|
+
},
|
|
61953
|
+
style: itemListStyles,
|
|
61954
|
+
className: "jsx-3452014152" + " " + (klass.SLIDER(false, this.state.swiping) || "")
|
|
61955
|
+
}, this.renderItems()), /*#__PURE__*/React.createElement(Button, {
|
|
61956
|
+
type: "button",
|
|
61957
|
+
scale: 2 / 3,
|
|
61958
|
+
auto: true,
|
|
61959
|
+
px: 0.6,
|
|
61960
|
+
style: {
|
|
61961
|
+
position: 'absolute',
|
|
61962
|
+
zIndex: '2',
|
|
61963
|
+
right: 0
|
|
61964
|
+
},
|
|
61965
|
+
iconRight: /*#__PURE__*/React.createElement(ChevronRight$1, null),
|
|
61966
|
+
className: klass.ARROW_NEXT(!hasNext),
|
|
61967
|
+
onClick: function onClick() {
|
|
61968
|
+
return _this3.slideLeft();
|
|
61969
|
+
},
|
|
61970
|
+
"aria-label": this.props.labels.rightArrow
|
|
61971
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
61972
|
+
id: "3452014152"
|
|
61973
|
+
}, ".thumbs-wrapper.jsx-3452014152{margin:0;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.thumbs.jsx-3452014152{-webkit-transition:all 0.15s ease-in;transition:all 0.15s ease-in;position:relative;list-style:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;white-space:nowrap;margin:0 !important;}.control-arrow.control-prev.jsx-3452014152{left:0;}.control-arrow.control-prev.jsx-3452014152:before{border-right:8px solid #fff;}.control-arrow.control-next.jsx-3452014152{right:0;}.control-arrow.control-next.jsx-3452014152:before{border-left:8px solid #fff;}"));
|
|
61974
|
+
}
|
|
61975
|
+
}]);
|
|
61976
|
+
}(React.Component);
|
|
61977
|
+
_defineProperty$1(Thumbs, "displayName", 'Thumbs');
|
|
61978
|
+
_defineProperty$1(Thumbs, "defaultProps", {
|
|
61979
|
+
axis: 'horizontal',
|
|
61980
|
+
labels: {
|
|
61981
|
+
leftArrow: 'previous slide / item',
|
|
61982
|
+
rightArrow: 'next slide / item',
|
|
61983
|
+
item: 'slide item'
|
|
61984
|
+
},
|
|
61985
|
+
selectedItem: 0,
|
|
61986
|
+
thumbWidth: 80,
|
|
61987
|
+
transitionTime: 350
|
|
61988
|
+
});
|
|
61989
|
+
|
|
61990
|
+
var getDocument = (function () {
|
|
61991
|
+
return document;
|
|
61992
|
+
});
|
|
61993
|
+
|
|
61994
|
+
var noop = function noop() {};
|
|
61995
|
+
var defaultStatusFormatter = function defaultStatusFormatter(current, total) {
|
|
61996
|
+
return "".concat(current, " of ").concat(total);
|
|
61997
|
+
};
|
|
61998
|
+
var isKeyboardEvent = function isKeyboardEvent(e) {
|
|
61999
|
+
return e ? e.hasOwnProperty('key') : false;
|
|
62000
|
+
};
|
|
62001
|
+
|
|
62002
|
+
/**
|
|
62003
|
+
* Gets the list 'position' relative to a current index
|
|
62004
|
+
* @param index
|
|
62005
|
+
*/
|
|
62006
|
+
var getPosition = function getPosition(index, props) {
|
|
62007
|
+
if (props.infiniteLoop) {
|
|
62008
|
+
// index has to be added by 1 because of the first cloned slide
|
|
62009
|
+
++index;
|
|
62010
|
+
}
|
|
62011
|
+
if (index === 0) {
|
|
62012
|
+
return 0;
|
|
62013
|
+
}
|
|
62014
|
+
var childrenLength = React.Children.count(props.children);
|
|
62015
|
+
if (props.centerMode && props.axis === 'horizontal') {
|
|
62016
|
+
var currentPosition = -index * props.centerSlidePercentage;
|
|
62017
|
+
var lastPosition = childrenLength - 1;
|
|
62018
|
+
if (index && (index !== lastPosition || props.infiniteLoop)) {
|
|
62019
|
+
currentPosition += (100 - props.centerSlidePercentage) / 2;
|
|
62020
|
+
} else if (index === lastPosition) {
|
|
62021
|
+
currentPosition += 100 - props.centerSlidePercentage;
|
|
62022
|
+
}
|
|
62023
|
+
return currentPosition;
|
|
62024
|
+
}
|
|
62025
|
+
return -index * 100;
|
|
62026
|
+
};
|
|
62027
|
+
|
|
62028
|
+
/**
|
|
62029
|
+
* Sets the 'position' transform for sliding animations
|
|
62030
|
+
* @param position
|
|
62031
|
+
* @param forceReflow
|
|
62032
|
+
*/
|
|
62033
|
+
var setPosition = function setPosition(position, axis) {
|
|
62034
|
+
var style = {};
|
|
62035
|
+
['WebkitTransform', 'MozTransform', 'MsTransform', 'OTransform', 'transform', 'msTransform'].forEach(function (prop) {
|
|
62036
|
+
// @ts-ignore
|
|
62037
|
+
style[prop] = CSSTranslate(position, '%', axis);
|
|
62038
|
+
});
|
|
62039
|
+
return style;
|
|
62040
|
+
};
|
|
62041
|
+
|
|
62042
|
+
var Arrow = function Arrow(_ref) {
|
|
62043
|
+
var direction = _ref.direction,
|
|
62044
|
+
onClickHandler = _ref.onClickHandler,
|
|
62045
|
+
enabled = _ref.enabled,
|
|
62046
|
+
label = _ref.label;
|
|
62047
|
+
var isPrev = direction === 'prev';
|
|
62048
|
+
var arrowClassName = isPrev ? klass.ARROW_PREV(!enabled) : klass.ARROW_NEXT(!enabled);
|
|
62049
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
|
|
62050
|
+
type: "button",
|
|
62051
|
+
"aria-label": label,
|
|
62052
|
+
onClick: onClickHandler,
|
|
62053
|
+
className: "jsx-4058608807" + " " + (arrowClassName || "")
|
|
62054
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
62055
|
+
id: "4058608807"
|
|
62056
|
+
}, ".control-arrow.jsx-4058608807{position:absolute;z-index:2;top:0;bottom:0;background:none;border:0;font-size:26px;cursor:pointer;opacity:0.4;-webkit-transition:all 0.25s ease-in;transition:all 0.25s ease-in;margin-top:-13px;padding:5px;color:#fff;}.control-arrow.jsx-4058608807:hover{background:rgba(0,0,0,0.2);opacity:1;}.control-arrow.jsx-4058608807:hover,.control-arrow.jsx-4058608807:focus{opacity:1;}.control-arrow.control-arrow.jsx-4058608807:before{margin:0 5px;display:inline-block;border-top:8px solid transparent;border-bottom:8px solid transparent;content:'';}.control-arrow.control-disabled.jsx-4058608807{opacity:0;cursor:inherit;display:none;}.control-arrow.control-prev.jsx-4058608807{left:0;}.control-arrow.control-prev.jsx-4058608807:before{border-right:8px solid #fff;}.control-arrow.control-next.jsx-4058608807{right:0;}.control-arrow.control-next.jsx-4058608807:before{border-left:8px solid #fff;}"));
|
|
62057
|
+
};
|
|
62058
|
+
|
|
62059
|
+
var Indicator = function Indicator(_ref) {
|
|
62060
|
+
var onClickHandler = _ref.onClickHandler,
|
|
62061
|
+
isSelected = _ref.isSelected,
|
|
62062
|
+
index = _ref.index,
|
|
62063
|
+
label = _ref.label;
|
|
62064
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", {
|
|
62065
|
+
onClick: onClickHandler,
|
|
62066
|
+
onKeyDown: onClickHandler,
|
|
62067
|
+
value: index,
|
|
62068
|
+
key: index,
|
|
62069
|
+
role: "button",
|
|
62070
|
+
tabIndex: 0,
|
|
62071
|
+
"aria-label": "".concat(label, " ").concat(index + 1),
|
|
62072
|
+
className: "jsx-3056554148" + " " + (klass.DOT(isSelected) || "")
|
|
62073
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
62074
|
+
id: "3056554148"
|
|
62075
|
+
}, ".dot.jsx-3056554148{-webkit-transition:opacity 0.25s ease-in;transition:opacity 0.25s ease-in;opacity:0.3;box-shadow:1px 1px 2px rgba(0,0,0,0.9);background:#fff;border-radius:50%;width:8px;height:8px;cursor:pointer;display:inline-block;margin:0 8px;}.dot.selected.jsx-3056554148,.dot.jsx-3056554148:hover{opacity:1;}"));
|
|
62076
|
+
};
|
|
62077
|
+
|
|
62078
|
+
/**
|
|
62079
|
+
* Main animation handler for the default 'sliding' style animation
|
|
62080
|
+
* @param props
|
|
62081
|
+
* @param state
|
|
62082
|
+
*/
|
|
62083
|
+
var slideAnimationHandler = function slideAnimationHandler(props, state) {
|
|
62084
|
+
var returnStyles = {};
|
|
62085
|
+
var selectedItem = state.selectedItem;
|
|
62086
|
+
var previousItem = selectedItem;
|
|
62087
|
+
var lastPosition = React.Children.count(props.children) - 1;
|
|
62088
|
+
var needClonedSlide = props.infiniteLoop && (selectedItem < 0 || selectedItem > lastPosition);
|
|
62089
|
+
|
|
62090
|
+
// Handle list position if it needs a clone
|
|
62091
|
+
if (needClonedSlide) {
|
|
62092
|
+
if (previousItem < 0) {
|
|
62093
|
+
if (props.centerMode && props.centerSlidePercentage && props.axis === 'horizontal') {
|
|
62094
|
+
returnStyles.itemListStyle = setPosition(-(lastPosition + 2) * props.centerSlidePercentage - (100 - props.centerSlidePercentage) / 2, props.axis);
|
|
62095
|
+
} else {
|
|
62096
|
+
returnStyles.itemListStyle = setPosition(-(lastPosition + 2) * 100, props.axis);
|
|
62097
|
+
}
|
|
62098
|
+
} else if (previousItem > lastPosition) {
|
|
62099
|
+
returnStyles.itemListStyle = setPosition(0, props.axis);
|
|
62100
|
+
}
|
|
62101
|
+
return returnStyles;
|
|
62102
|
+
}
|
|
62103
|
+
var currentPosition = getPosition(selectedItem, props);
|
|
62104
|
+
|
|
62105
|
+
// if 3d is available, let's take advantage of the performance of transform
|
|
62106
|
+
var transformProp = CSSTranslate(currentPosition, '%', props.axis);
|
|
62107
|
+
var transitionTime = props.transitionTime + 'ms';
|
|
62108
|
+
returnStyles.itemListStyle = {
|
|
62109
|
+
WebkitTransform: transformProp,
|
|
62110
|
+
msTransform: transformProp,
|
|
62111
|
+
OTransform: transformProp,
|
|
62112
|
+
transform: transformProp
|
|
62113
|
+
};
|
|
62114
|
+
if (!state.swiping) {
|
|
62115
|
+
returnStyles.itemListStyle = _objectSpread2(_objectSpread2({}, returnStyles.itemListStyle), {}, {
|
|
62116
|
+
WebkitTransitionDuration: transitionTime,
|
|
62117
|
+
MozTransitionDuration: transitionTime,
|
|
62118
|
+
OTransitionDuration: transitionTime,
|
|
62119
|
+
transitionDuration: transitionTime,
|
|
62120
|
+
msTransitionDuration: transitionTime
|
|
62121
|
+
});
|
|
62122
|
+
}
|
|
62123
|
+
return returnStyles;
|
|
62124
|
+
};
|
|
62125
|
+
|
|
62126
|
+
/**
|
|
62127
|
+
* Swiping animation handler for the default 'sliding' style animation
|
|
62128
|
+
* @param delta
|
|
62129
|
+
* @param props
|
|
62130
|
+
* @param state
|
|
62131
|
+
* @param setState
|
|
62132
|
+
*/
|
|
62133
|
+
var slideSwipeAnimationHandler = function slideSwipeAnimationHandler(delta, props, state, setState) {
|
|
62134
|
+
var returnStyles = {};
|
|
62135
|
+
var isHorizontal = props.axis === 'horizontal';
|
|
62136
|
+
var childrenLength = React.Children.count(props.children);
|
|
62137
|
+
var initialBoundry = 0;
|
|
62138
|
+
var currentPosition = getPosition(state.selectedItem, props);
|
|
62139
|
+
var finalBoundry = props.infiniteLoop ? getPosition(childrenLength - 1, props) - 100 : getPosition(childrenLength - 1, props);
|
|
62140
|
+
var axisDelta = isHorizontal ? delta.x : delta.y;
|
|
62141
|
+
var handledDelta = axisDelta;
|
|
62142
|
+
|
|
62143
|
+
// prevent user from swiping left out of boundaries
|
|
62144
|
+
if (currentPosition === initialBoundry && axisDelta > 0) {
|
|
62145
|
+
handledDelta = 0;
|
|
62146
|
+
}
|
|
62147
|
+
|
|
62148
|
+
// prevent user from swiping right out of boundaries
|
|
62149
|
+
if (currentPosition === finalBoundry && axisDelta < 0) {
|
|
62150
|
+
handledDelta = 0;
|
|
62151
|
+
}
|
|
62152
|
+
var position = currentPosition + 100 / (state.itemSize / handledDelta);
|
|
62153
|
+
var hasMoved = Math.abs(axisDelta) > props.swipeScrollTolerance;
|
|
62154
|
+
if (props.infiniteLoop && hasMoved) {
|
|
62155
|
+
// When allowing infinite loop, if we slide left from position 0 we reveal the cloned last slide that appears before it
|
|
62156
|
+
// if we slide even further we need to jump to other side so it can continue - and vice versa for the last slide
|
|
62157
|
+
if (state.selectedItem === 0 && position > -100) {
|
|
62158
|
+
position -= childrenLength * 100;
|
|
62159
|
+
} else if (state.selectedItem === childrenLength - 1 && position < -childrenLength * 100) {
|
|
62160
|
+
position += childrenLength * 100;
|
|
62161
|
+
}
|
|
62162
|
+
}
|
|
62163
|
+
if (!props.preventMovementUntilSwipeScrollTolerance || hasMoved || state.swipeMovementStarted) {
|
|
62164
|
+
if (!state.swipeMovementStarted) {
|
|
62165
|
+
setState({
|
|
62166
|
+
swipeMovementStarted: true
|
|
62167
|
+
});
|
|
62168
|
+
}
|
|
62169
|
+
returnStyles.itemListStyle = setPosition(position, props.axis);
|
|
62170
|
+
}
|
|
62171
|
+
|
|
62172
|
+
//allows scroll if the swipe was within the tolerance
|
|
62173
|
+
if (hasMoved && !state.cancelClick) {
|
|
62174
|
+
setState({
|
|
62175
|
+
cancelClick: true
|
|
62176
|
+
});
|
|
62177
|
+
}
|
|
62178
|
+
return returnStyles;
|
|
62179
|
+
};
|
|
62180
|
+
|
|
62181
|
+
/**
|
|
62182
|
+
* Default 'sliding' style animination handler for when a swipe action stops.
|
|
62183
|
+
* @param props
|
|
62184
|
+
* @param state
|
|
62185
|
+
*/
|
|
62186
|
+
var slideStopSwipingHandler = function slideStopSwipingHandler(props, state) {
|
|
62187
|
+
var currentPosition = getPosition(state.selectedItem, props);
|
|
62188
|
+
var itemListStyle = setPosition(currentPosition, props.axis);
|
|
62189
|
+
return {
|
|
62190
|
+
itemListStyle: itemListStyle
|
|
62191
|
+
};
|
|
62192
|
+
};
|
|
62193
|
+
|
|
62194
|
+
/**
|
|
62195
|
+
* Main animation handler for the default 'fade' style animation
|
|
62196
|
+
* @param props
|
|
62197
|
+
* @param state
|
|
62198
|
+
*/
|
|
62199
|
+
var fadeAnimationHandler = function fadeAnimationHandler(props, state) {
|
|
62200
|
+
var transitionTime = props.transitionTime + 'ms';
|
|
62201
|
+
var transitionTimingFunction = 'ease-in-out';
|
|
62202
|
+
var slideStyle = {
|
|
62203
|
+
position: 'absolute',
|
|
62204
|
+
display: 'block',
|
|
62205
|
+
zIndex: -2,
|
|
62206
|
+
minHeight: '100%',
|
|
62207
|
+
opacity: 0,
|
|
62208
|
+
top: 0,
|
|
62209
|
+
right: 0,
|
|
62210
|
+
left: 0,
|
|
62211
|
+
bottom: 0,
|
|
62212
|
+
transitionTimingFunction: transitionTimingFunction,
|
|
62213
|
+
msTransitionTimingFunction: transitionTimingFunction,
|
|
62214
|
+
MozTransitionTimingFunction: transitionTimingFunction,
|
|
62215
|
+
WebkitTransitionTimingFunction: transitionTimingFunction,
|
|
62216
|
+
OTransitionTimingFunction: transitionTimingFunction
|
|
62217
|
+
};
|
|
62218
|
+
if (!state.swiping) {
|
|
62219
|
+
slideStyle = _objectSpread2(_objectSpread2({}, slideStyle), {}, {
|
|
62220
|
+
WebkitTransitionDuration: transitionTime,
|
|
62221
|
+
MozTransitionDuration: transitionTime,
|
|
62222
|
+
OTransitionDuration: transitionTime,
|
|
62223
|
+
transitionDuration: transitionTime,
|
|
62224
|
+
msTransitionDuration: transitionTime
|
|
62225
|
+
});
|
|
62226
|
+
}
|
|
62227
|
+
return {
|
|
62228
|
+
slideStyle: slideStyle,
|
|
62229
|
+
selectedStyle: _objectSpread2(_objectSpread2({}, slideStyle), {}, {
|
|
62230
|
+
opacity: 1,
|
|
62231
|
+
position: 'relative'
|
|
62232
|
+
}),
|
|
62233
|
+
prevStyle: _objectSpread2({}, slideStyle)
|
|
62234
|
+
};
|
|
62235
|
+
};
|
|
62236
|
+
|
|
62237
|
+
var Carousel = /*#__PURE__*/function (_React$Component) {
|
|
62238
|
+
function Carousel(props) {
|
|
62239
|
+
var _this;
|
|
62240
|
+
_classCallCheck(this, Carousel);
|
|
62241
|
+
_this = _callSuper(this, Carousel, [props]);
|
|
62242
|
+
_defineProperty$1(_this, "setThumbsRef", function (node) {
|
|
62243
|
+
_this.thumbsRef = node;
|
|
62244
|
+
});
|
|
62245
|
+
_defineProperty$1(_this, "setCarouselWrapperRef", function (node) {
|
|
62246
|
+
_this.carouselWrapperRef = node;
|
|
62247
|
+
});
|
|
62248
|
+
_defineProperty$1(_this, "setListRef", function (node) {
|
|
62249
|
+
_this.listRef = node;
|
|
62250
|
+
});
|
|
62251
|
+
_defineProperty$1(_this, "setItemsRef", function (node, index) {
|
|
62252
|
+
if (!_this.itemsRef) {
|
|
62253
|
+
_this.itemsRef = [];
|
|
62254
|
+
}
|
|
62255
|
+
_this.itemsRef[index] = node;
|
|
62256
|
+
});
|
|
62257
|
+
_defineProperty$1(_this, "autoPlay", function () {
|
|
62258
|
+
if (React.Children.count(_this.props.children) <= 1) {
|
|
62259
|
+
return;
|
|
62260
|
+
}
|
|
62261
|
+
_this.clearAutoPlay();
|
|
62262
|
+
if (!_this.props.autoPlay) {
|
|
62263
|
+
return;
|
|
62264
|
+
}
|
|
62265
|
+
_this.timer = setTimeout(function () {
|
|
62266
|
+
_this.increment();
|
|
62267
|
+
}, _this.props.interval);
|
|
62268
|
+
});
|
|
62269
|
+
_defineProperty$1(_this, "clearAutoPlay", function () {
|
|
62270
|
+
if (_this.timer) clearTimeout(_this.timer);
|
|
62271
|
+
});
|
|
62272
|
+
_defineProperty$1(_this, "resetAutoPlay", function () {
|
|
62273
|
+
_this.clearAutoPlay();
|
|
62274
|
+
_this.autoPlay();
|
|
62275
|
+
});
|
|
62276
|
+
_defineProperty$1(_this, "stopOnHover", function () {
|
|
62277
|
+
_this.setState({
|
|
62278
|
+
isMouseEntered: true
|
|
62279
|
+
}, _this.clearAutoPlay);
|
|
62280
|
+
});
|
|
62281
|
+
_defineProperty$1(_this, "startOnLeave", function () {
|
|
62282
|
+
_this.setState({
|
|
62283
|
+
isMouseEntered: false
|
|
62284
|
+
}, _this.autoPlay);
|
|
62285
|
+
});
|
|
62286
|
+
_defineProperty$1(_this, "isFocusWithinTheCarousel", function () {
|
|
62287
|
+
if (!_this.carouselWrapperRef) {
|
|
62288
|
+
return false;
|
|
62289
|
+
}
|
|
62290
|
+
if (getDocument().activeElement === _this.carouselWrapperRef || _this.carouselWrapperRef.contains(getDocument().activeElement)) {
|
|
62291
|
+
return true;
|
|
62292
|
+
}
|
|
62293
|
+
return false;
|
|
62294
|
+
});
|
|
62295
|
+
_defineProperty$1(_this, "navigateWithKeyboard", function (e) {
|
|
62296
|
+
if (!_this.isFocusWithinTheCarousel()) {
|
|
62297
|
+
return;
|
|
62298
|
+
}
|
|
62299
|
+
var axis = _this.props.axis;
|
|
62300
|
+
var isHorizontal = axis === 'horizontal';
|
|
62301
|
+
var keyNames = {
|
|
62302
|
+
ArrowUp: 38,
|
|
62303
|
+
ArrowRight: 39,
|
|
62304
|
+
ArrowDown: 40,
|
|
62305
|
+
ArrowLeft: 37
|
|
62306
|
+
};
|
|
62307
|
+
var nextKey = isHorizontal ? keyNames.ArrowRight : keyNames.ArrowDown;
|
|
62308
|
+
var prevKey = isHorizontal ? keyNames.ArrowLeft : keyNames.ArrowUp;
|
|
62309
|
+
if (nextKey === e.keyCode) {
|
|
62310
|
+
_this.increment();
|
|
62311
|
+
} else if (prevKey === e.keyCode) {
|
|
62312
|
+
_this.decrement();
|
|
62313
|
+
}
|
|
62314
|
+
});
|
|
62315
|
+
_defineProperty$1(_this, "updateSizes", function () {
|
|
62316
|
+
if (!_this.state.initialized || !_this.itemsRef || _this.itemsRef.length === 0) {
|
|
62317
|
+
return;
|
|
62318
|
+
}
|
|
62319
|
+
var isHorizontal = _this.props.axis === 'horizontal';
|
|
62320
|
+
var firstItem = _this.itemsRef[0];
|
|
62321
|
+
if (!firstItem) {
|
|
62322
|
+
return;
|
|
62323
|
+
}
|
|
62324
|
+
var itemSize = isHorizontal ? firstItem.clientWidth : firstItem.clientHeight;
|
|
62325
|
+
_this.setState({
|
|
62326
|
+
itemSize: itemSize
|
|
62327
|
+
});
|
|
62328
|
+
if (_this.thumbsRef) {
|
|
62329
|
+
_this.thumbsRef.updateSizes();
|
|
62330
|
+
}
|
|
62331
|
+
});
|
|
62332
|
+
_defineProperty$1(_this, "setMountState", function () {
|
|
62333
|
+
_this.setState({
|
|
62334
|
+
hasMount: true
|
|
62335
|
+
});
|
|
62336
|
+
_this.updateSizes();
|
|
62337
|
+
});
|
|
62338
|
+
_defineProperty$1(_this, "handleClickItem", function (index, item) {
|
|
62339
|
+
if (React.Children.count(_this.props.children) === 0) {
|
|
62340
|
+
return;
|
|
62341
|
+
}
|
|
62342
|
+
if (_this.state.cancelClick) {
|
|
62343
|
+
_this.setState({
|
|
62344
|
+
cancelClick: false
|
|
62345
|
+
});
|
|
62346
|
+
return;
|
|
62347
|
+
}
|
|
62348
|
+
_this.props.onClickItem(index, item);
|
|
62349
|
+
if (index !== _this.state.selectedItem) {
|
|
62350
|
+
_this.setState({
|
|
62351
|
+
selectedItem: index
|
|
62352
|
+
});
|
|
62353
|
+
}
|
|
62354
|
+
});
|
|
62355
|
+
/**
|
|
62356
|
+
* On Change handler, Passes the index and React node to the supplied onChange prop
|
|
62357
|
+
* @param index of the carousel item
|
|
62358
|
+
* @param item React node of the item being changed
|
|
62359
|
+
*/
|
|
62360
|
+
_defineProperty$1(_this, "handleOnChange", function (index, item) {
|
|
62361
|
+
if (React.Children.count(_this.props.children) <= 1) {
|
|
62362
|
+
return;
|
|
62363
|
+
}
|
|
62364
|
+
_this.props.onChange(index, item);
|
|
62365
|
+
});
|
|
62366
|
+
_defineProperty$1(_this, "handleClickThumb", function (index, item) {
|
|
62367
|
+
_this.props.onClickThumb(index, item);
|
|
62368
|
+
_this.moveTo(index);
|
|
62369
|
+
});
|
|
62370
|
+
_defineProperty$1(_this, "onSwipeStart", function (event) {
|
|
62371
|
+
_this.setState({
|
|
62372
|
+
swiping: true
|
|
62373
|
+
});
|
|
62374
|
+
_this.props.onSwipeStart(event);
|
|
62375
|
+
});
|
|
62376
|
+
_defineProperty$1(_this, "onSwipeEnd", function (event) {
|
|
62377
|
+
_this.setState({
|
|
62378
|
+
swiping: false,
|
|
62379
|
+
cancelClick: false,
|
|
62380
|
+
swipeMovementStarted: false
|
|
62381
|
+
});
|
|
62382
|
+
_this.props.onSwipeEnd(event);
|
|
62383
|
+
_this.clearAutoPlay();
|
|
62384
|
+
if (_this.state.autoPlay) {
|
|
62385
|
+
_this.autoPlay();
|
|
62386
|
+
}
|
|
62387
|
+
});
|
|
62388
|
+
_defineProperty$1(_this, "onSwipeMove", function (delta, event) {
|
|
62389
|
+
_this.props.onSwipeMove(event);
|
|
62390
|
+
var animationHandlerResponse = _this.props.swipeAnimationHandler(delta, _this.props, _this.state, _this.setState.bind(_this));
|
|
62391
|
+
_this.setState(_objectSpread2({}, animationHandlerResponse));
|
|
62392
|
+
|
|
62393
|
+
// If we have not moved, we should have an empty object returned
|
|
62394
|
+
// Return false to allow scrolling when not swiping
|
|
62395
|
+
return !!Object.keys(animationHandlerResponse).length;
|
|
62396
|
+
});
|
|
62397
|
+
/**
|
|
62398
|
+
* Decrements the selectedItem index a number of positions through the children list
|
|
62399
|
+
* @param positions
|
|
62400
|
+
* @param fromSwipe
|
|
62401
|
+
*/
|
|
62402
|
+
_defineProperty$1(_this, "decrement", function () {
|
|
62403
|
+
var positions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
62404
|
+
_this.moveTo(_this.state.selectedItem - (typeof positions === 'number' ? positions : 1));
|
|
62405
|
+
});
|
|
62406
|
+
/**
|
|
62407
|
+
* Increments the selectedItem index a number of positions through the children list
|
|
62408
|
+
* @param positions
|
|
62409
|
+
* @param fromSwipe
|
|
62410
|
+
*/
|
|
62411
|
+
_defineProperty$1(_this, "increment", function () {
|
|
62412
|
+
var positions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
62413
|
+
_this.moveTo(_this.state.selectedItem + (typeof positions === 'number' ? positions : 1));
|
|
62414
|
+
});
|
|
62415
|
+
/**
|
|
62416
|
+
* Moves the selected item to the position provided
|
|
62417
|
+
* @param position
|
|
62418
|
+
* @param fromSwipe
|
|
62419
|
+
*/
|
|
62420
|
+
_defineProperty$1(_this, "moveTo", function (position) {
|
|
62421
|
+
if (typeof position !== 'number') {
|
|
62422
|
+
return;
|
|
62423
|
+
}
|
|
62424
|
+
var lastPosition = React.Children.count(_this.props.children) - 1;
|
|
62425
|
+
if (position < 0) {
|
|
62426
|
+
position = _this.props.infiniteLoop ? lastPosition : 0;
|
|
62427
|
+
}
|
|
62428
|
+
if (position > lastPosition) {
|
|
62429
|
+
position = _this.props.infiniteLoop ? 0 : lastPosition;
|
|
62430
|
+
}
|
|
62431
|
+
_this.selectItem({
|
|
62432
|
+
// if it's not a slider, we don't need to set position here
|
|
62433
|
+
selectedItem: position
|
|
62434
|
+
});
|
|
62435
|
+
|
|
62436
|
+
// don't reset auto play when stop on hover is enabled, doing so will trigger a call to auto play more than once
|
|
62437
|
+
// and will result in the interval function not being cleared correctly.
|
|
62438
|
+
if (_this.state.autoPlay && _this.state.isMouseEntered === false) {
|
|
62439
|
+
_this.resetAutoPlay();
|
|
62440
|
+
}
|
|
62441
|
+
});
|
|
62442
|
+
_defineProperty$1(_this, "onClickNext", function () {
|
|
62443
|
+
_this.increment(1);
|
|
62444
|
+
});
|
|
62445
|
+
_defineProperty$1(_this, "onClickPrev", function () {
|
|
62446
|
+
_this.decrement(1);
|
|
62447
|
+
});
|
|
62448
|
+
_defineProperty$1(_this, "onSwipeForward", function () {
|
|
62449
|
+
_this.increment(1);
|
|
62450
|
+
if (_this.props.emulateTouch) {
|
|
62451
|
+
_this.setState({
|
|
62452
|
+
cancelClick: true
|
|
62453
|
+
});
|
|
62454
|
+
}
|
|
62455
|
+
});
|
|
62456
|
+
_defineProperty$1(_this, "onSwipeBackwards", function () {
|
|
62457
|
+
_this.decrement(1);
|
|
62458
|
+
if (_this.props.emulateTouch) {
|
|
62459
|
+
_this.setState({
|
|
62460
|
+
cancelClick: true
|
|
62461
|
+
});
|
|
62462
|
+
}
|
|
62463
|
+
});
|
|
62464
|
+
_defineProperty$1(_this, "changeItem", function (newIndex) {
|
|
62465
|
+
return function (e) {
|
|
62466
|
+
if (!isKeyboardEvent(e) || e.key === 'Enter') {
|
|
62467
|
+
_this.moveTo(newIndex);
|
|
62468
|
+
}
|
|
62469
|
+
};
|
|
62470
|
+
});
|
|
62471
|
+
/**
|
|
62472
|
+
* This function is called when you want to 'select' a new item, or rather move to a 'selected' item
|
|
62473
|
+
* It also handles the onChange callback wrapper
|
|
62474
|
+
* @param state state object with updated selected item, and swiping bool if relevant
|
|
62475
|
+
*/
|
|
62476
|
+
_defineProperty$1(_this, "selectItem", function (state) {
|
|
62477
|
+
// Merge in the new state while updating updating previous item
|
|
62478
|
+
_this.setState(_objectSpread2({
|
|
62479
|
+
previousItem: _this.state.selectedItem
|
|
62480
|
+
}, state), function () {
|
|
62481
|
+
// Run animation handler and update styles based on it
|
|
62482
|
+
_this.setState(_this.animationHandler(_this.props, _this.state));
|
|
62483
|
+
});
|
|
62484
|
+
_this.handleOnChange(state.selectedItem, React.Children.toArray(_this.props.children)[state.selectedItem]);
|
|
62485
|
+
});
|
|
62486
|
+
_defineProperty$1(_this, "getInitialImage", function () {
|
|
62487
|
+
var selectedItem = _this.props.selectedItem;
|
|
62488
|
+
var item = _this.itemsRef && _this.itemsRef[selectedItem];
|
|
62489
|
+
var images = item && item.getElementsByTagName('img') || [];
|
|
62490
|
+
return images[0];
|
|
62491
|
+
});
|
|
62492
|
+
_defineProperty$1(_this, "getVariableItemHeight", function (position) {
|
|
62493
|
+
var item = _this.itemsRef && _this.itemsRef[position];
|
|
62494
|
+
if (_this.state.hasMount && item && item.children.length) {
|
|
62495
|
+
var slideImages = item.children[0].getElementsByTagName('img') || [];
|
|
62496
|
+
if (slideImages.length > 0) {
|
|
62497
|
+
var image = slideImages[0];
|
|
62498
|
+
if (!image.complete) {
|
|
62499
|
+
// if the image is still loading, the size won't be available so we trigger a new render after it's done
|
|
62500
|
+
var _onImageLoad = function onImageLoad() {
|
|
62501
|
+
_this.forceUpdate();
|
|
62502
|
+
image.removeEventListener('load', _onImageLoad);
|
|
62503
|
+
};
|
|
62504
|
+
image.addEventListener('load', _onImageLoad);
|
|
62505
|
+
}
|
|
62506
|
+
}
|
|
62507
|
+
|
|
62508
|
+
// try to get img first, if img not there find first display tag
|
|
62509
|
+
var displayItem = slideImages[0] || item.children[0];
|
|
62510
|
+
var height = displayItem.clientHeight;
|
|
62511
|
+
return height > 0 ? height : null;
|
|
62512
|
+
}
|
|
62513
|
+
return null;
|
|
62514
|
+
});
|
|
62515
|
+
var initState = {
|
|
62516
|
+
initialized: false,
|
|
62517
|
+
previousItem: props.selectedItem,
|
|
62518
|
+
selectedItem: props.selectedItem,
|
|
62519
|
+
hasMount: false,
|
|
62520
|
+
isMouseEntered: false,
|
|
62521
|
+
autoPlay: props.autoPlay,
|
|
62522
|
+
swiping: false,
|
|
62523
|
+
swipeMovementStarted: false,
|
|
62524
|
+
cancelClick: false,
|
|
62525
|
+
itemSize: 1,
|
|
62526
|
+
itemListStyle: {},
|
|
62527
|
+
slideStyle: {},
|
|
62528
|
+
selectedStyle: {},
|
|
62529
|
+
prevStyle: {}
|
|
62530
|
+
};
|
|
62531
|
+
_this.animationHandler = typeof props.animationHandler === 'function' && props.animationHandler || props.animationHandler === 'fade' && fadeAnimationHandler || slideAnimationHandler;
|
|
62532
|
+
_this.state = _objectSpread2(_objectSpread2({}, initState), _this.animationHandler(props, initState));
|
|
62533
|
+
return _this;
|
|
62534
|
+
}
|
|
62535
|
+
_inherits(Carousel, _React$Component);
|
|
62536
|
+
return _createClass(Carousel, [{
|
|
62537
|
+
key: "componentDidMount",
|
|
62538
|
+
value: function componentDidMount() {
|
|
62539
|
+
if (!this.props.children) {
|
|
62540
|
+
return;
|
|
62541
|
+
}
|
|
62542
|
+
this.setupCarousel();
|
|
62543
|
+
}
|
|
62544
|
+
}, {
|
|
62545
|
+
key: "componentDidUpdate",
|
|
62546
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
62547
|
+
if (!prevProps.children && this.props.children && !this.state.initialized) {
|
|
62548
|
+
this.setupCarousel();
|
|
62549
|
+
}
|
|
62550
|
+
if (!prevProps.autoFocus && this.props.autoFocus) {
|
|
62551
|
+
this.forceFocus();
|
|
62552
|
+
}
|
|
62553
|
+
if (prevState.swiping && !this.state.swiping) {
|
|
62554
|
+
// We stopped swiping, ensure we are heading to the new/current slide and not stuck
|
|
62555
|
+
|
|
62556
|
+
this.setState(_objectSpread2({}, this.props.stopSwipingHandler(this.props, this.state)));
|
|
62557
|
+
}
|
|
62558
|
+
if (prevProps.selectedItem !== this.props.selectedItem || prevProps.centerMode !== this.props.centerMode) {
|
|
62559
|
+
this.updateSizes();
|
|
62560
|
+
this.moveTo(this.props.selectedItem);
|
|
62561
|
+
}
|
|
62562
|
+
if (prevProps.autoPlay !== this.props.autoPlay) {
|
|
62563
|
+
if (this.props.autoPlay) {
|
|
62564
|
+
this.setupAutoPlay();
|
|
62565
|
+
} else {
|
|
62566
|
+
this.destroyAutoPlay();
|
|
62567
|
+
}
|
|
62568
|
+
this.setState({
|
|
62569
|
+
autoPlay: this.props.autoPlay
|
|
62570
|
+
});
|
|
62571
|
+
}
|
|
62572
|
+
}
|
|
62573
|
+
}, {
|
|
62574
|
+
key: "componentWillUnmount",
|
|
62575
|
+
value: function componentWillUnmount() {
|
|
62576
|
+
this.destroyCarousel();
|
|
62577
|
+
}
|
|
62578
|
+
}, {
|
|
62579
|
+
key: "setupCarousel",
|
|
62580
|
+
value: function setupCarousel() {
|
|
62581
|
+
var _this2 = this;
|
|
62582
|
+
this.bindEvents();
|
|
62583
|
+
if (this.state.autoPlay && React.Children.count(this.props.children) > 1) {
|
|
62584
|
+
this.setupAutoPlay();
|
|
62585
|
+
}
|
|
62586
|
+
if (this.props.autoFocus) {
|
|
62587
|
+
this.forceFocus();
|
|
62588
|
+
}
|
|
62589
|
+
this.setState({
|
|
62590
|
+
initialized: true
|
|
62591
|
+
}, function () {
|
|
62592
|
+
var initialImage = _this2.getInitialImage();
|
|
62593
|
+
if (initialImage && !initialImage.complete) {
|
|
62594
|
+
// if it's a carousel of images, we set the mount state after the first image is loaded
|
|
62595
|
+
initialImage.addEventListener('load', _this2.setMountState);
|
|
62596
|
+
} else {
|
|
62597
|
+
_this2.setMountState();
|
|
62598
|
+
}
|
|
62599
|
+
});
|
|
62600
|
+
}
|
|
62601
|
+
}, {
|
|
62602
|
+
key: "destroyCarousel",
|
|
62603
|
+
value: function destroyCarousel() {
|
|
62604
|
+
if (this.state.initialized) {
|
|
62605
|
+
this.unbindEvents();
|
|
62606
|
+
this.destroyAutoPlay();
|
|
62607
|
+
}
|
|
62608
|
+
}
|
|
62609
|
+
}, {
|
|
62610
|
+
key: "setupAutoPlay",
|
|
62611
|
+
value: function setupAutoPlay() {
|
|
62612
|
+
this.autoPlay();
|
|
62613
|
+
var carouselWrapper = this.carouselWrapperRef;
|
|
62614
|
+
if (this.props.stopOnHover && carouselWrapper) {
|
|
62615
|
+
carouselWrapper.addEventListener('mouseenter', this.stopOnHover);
|
|
62616
|
+
carouselWrapper.addEventListener('mouseleave', this.startOnLeave);
|
|
62617
|
+
}
|
|
62618
|
+
}
|
|
62619
|
+
}, {
|
|
62620
|
+
key: "destroyAutoPlay",
|
|
62621
|
+
value: function destroyAutoPlay() {
|
|
62622
|
+
this.clearAutoPlay();
|
|
62623
|
+
var carouselWrapper = this.carouselWrapperRef;
|
|
62624
|
+
if (this.props.stopOnHover && carouselWrapper) {
|
|
62625
|
+
carouselWrapper.removeEventListener('mouseenter', this.stopOnHover);
|
|
62626
|
+
carouselWrapper.removeEventListener('mouseleave', this.startOnLeave);
|
|
62627
|
+
}
|
|
62628
|
+
}
|
|
62629
|
+
}, {
|
|
62630
|
+
key: "bindEvents",
|
|
62631
|
+
value: function bindEvents() {
|
|
62632
|
+
// as the widths are calculated, we need to resize
|
|
62633
|
+
// the carousel when the window is resized
|
|
62634
|
+
getWindow().addEventListener('resize', this.updateSizes);
|
|
62635
|
+
// issue #2 - image loading smaller
|
|
62636
|
+
getWindow().addEventListener('DOMContentLoaded', this.updateSizes);
|
|
62637
|
+
if (this.props.useKeyboardArrows) {
|
|
62638
|
+
getDocument().addEventListener('keydown', this.navigateWithKeyboard);
|
|
62639
|
+
}
|
|
62640
|
+
}
|
|
62641
|
+
}, {
|
|
62642
|
+
key: "unbindEvents",
|
|
62643
|
+
value: function unbindEvents() {
|
|
62644
|
+
// removing listeners
|
|
62645
|
+
getWindow().removeEventListener('resize', this.updateSizes);
|
|
62646
|
+
getWindow().removeEventListener('DOMContentLoaded', this.updateSizes);
|
|
62647
|
+
var initialImage = this.getInitialImage();
|
|
62648
|
+
if (initialImage) {
|
|
62649
|
+
initialImage.removeEventListener('load', this.setMountState);
|
|
62650
|
+
}
|
|
62651
|
+
if (this.props.useKeyboardArrows) {
|
|
62652
|
+
getDocument().removeEventListener('keydown', this.navigateWithKeyboard);
|
|
62653
|
+
}
|
|
62654
|
+
}
|
|
62655
|
+
}, {
|
|
62656
|
+
key: "forceFocus",
|
|
62657
|
+
value: function forceFocus() {
|
|
62658
|
+
var _this$carouselWrapper;
|
|
62659
|
+
(_this$carouselWrapper = this.carouselWrapperRef) === null || _this$carouselWrapper === void 0 || _this$carouselWrapper.focus();
|
|
62660
|
+
}
|
|
62661
|
+
}, {
|
|
62662
|
+
key: "renderItems",
|
|
62663
|
+
value: function renderItems(isClone) {
|
|
62664
|
+
var _this3 = this;
|
|
62665
|
+
if (!this.props.children) {
|
|
62666
|
+
return [];
|
|
62667
|
+
}
|
|
62668
|
+
return React.Children.map(this.props.children, function (item, index) {
|
|
62669
|
+
var isSelected = index === _this3.state.selectedItem;
|
|
62670
|
+
var isPrevious = index === _this3.state.previousItem;
|
|
62671
|
+
var style = isSelected && _this3.state.selectedStyle || isPrevious && _this3.state.prevStyle || _this3.state.slideStyle || {};
|
|
62672
|
+
if (_this3.props.centerMode && _this3.props.axis === 'horizontal') {
|
|
62673
|
+
style = _objectSpread2(_objectSpread2({}, style), {}, {
|
|
62674
|
+
minWidth: _this3.props.centerSlidePercentage + '%'
|
|
62675
|
+
});
|
|
62676
|
+
}
|
|
62677
|
+
if (_this3.state.swiping && _this3.state.swipeMovementStarted) {
|
|
62678
|
+
style = _objectSpread2(_objectSpread2({}, style), {}, {
|
|
62679
|
+
pointerEvents: 'none'
|
|
62680
|
+
});
|
|
62681
|
+
}
|
|
62682
|
+
var slideProps = {
|
|
62683
|
+
ref: function ref(e) {
|
|
62684
|
+
return _this3.setItemsRef(e, index);
|
|
62685
|
+
},
|
|
62686
|
+
key: 'itemKey' + index + (isClone ? 'clone' : ''),
|
|
62687
|
+
className: klass.ITEM(true, index === _this3.state.selectedItem, index === _this3.state.previousItem),
|
|
62688
|
+
onClick: _this3.handleClickItem.bind(_this3, index, item),
|
|
62689
|
+
style: style
|
|
62690
|
+
};
|
|
62691
|
+
return /*#__PURE__*/React.createElement("li", _extends({}, slideProps, {
|
|
62692
|
+
className: "jsx-2755164558" + " " + (slideProps && slideProps.className != null && slideProps.className || "")
|
|
62693
|
+
}), _this3.props.renderItem(item, {
|
|
62694
|
+
isSelected: index === _this3.state.selectedItem,
|
|
62695
|
+
isPrevious: index === _this3.state.previousItem
|
|
62696
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
62697
|
+
id: "2755164558"
|
|
62698
|
+
}, ".slide.jsx-2755164558{min-width:100%;margin:0;position:relative;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}img.jsx-2755164558{width:100%;vertical-align:top;border:0;}iframe.jsx-2755164558{display:inline-block;width:calc(100% - 80px);margin:0 40px 40px;border:0;}.legend.jsx-2755164558{-webkit-transition:opacity 0.35s ease-in-out;transition:opacity 0.35s ease-in-out;position:absolute;bottom:40px;left:50%;margin-left:-45%;width:90%;border-radius:10px;background:#000;color:#fff;padding:10px;font-size:12px;text-align:center;opacity:0.25;}.slide.jsx-2755164558 .legend.jsx-2755164558{opacity:1;}"));
|
|
62699
|
+
});
|
|
62700
|
+
}
|
|
62701
|
+
}, {
|
|
62702
|
+
key: "renderControls",
|
|
62703
|
+
value: function renderControls() {
|
|
62704
|
+
var _this4 = this;
|
|
62705
|
+
var _this$props = this.props,
|
|
62706
|
+
showIndicators = _this$props.showIndicators,
|
|
62707
|
+
labels = _this$props.labels,
|
|
62708
|
+
renderIndicator = _this$props.renderIndicator,
|
|
62709
|
+
children = _this$props.children;
|
|
62710
|
+
if (!showIndicators) {
|
|
62711
|
+
return null;
|
|
62712
|
+
}
|
|
62713
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
62714
|
+
className: "jsx-4140983776" + " " + "control-dots"
|
|
62715
|
+
}, React.Children.map(children, function (_, index) {
|
|
62716
|
+
return renderIndicator && renderIndicator(_this4.changeItem(index), index === _this4.state.selectedItem, index, labels.item);
|
|
62717
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
62718
|
+
id: "4140983776"
|
|
62719
|
+
}, ".control-dots.jsx-4140983776{position:absolute;bottom:0;margin:10px 0;padding:0;text-align:center;width:100%;z-index:1;}"));
|
|
62720
|
+
}
|
|
62721
|
+
}, {
|
|
62722
|
+
key: "renderStatus",
|
|
62723
|
+
value: function renderStatus() {
|
|
62724
|
+
if (!this.props.showStatus) {
|
|
62725
|
+
return null;
|
|
62726
|
+
}
|
|
62727
|
+
return /*#__PURE__*/React.createElement("p", {
|
|
62728
|
+
className: "jsx-2959489890" + " " + "carousel-status"
|
|
62729
|
+
}, this.props.statusFormatter(this.state.selectedItem + 1, React.Children.count(this.props.children)), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
62730
|
+
id: "2959489890"
|
|
62731
|
+
}, ".carousel-status.jsx-2959489890{position:absolute;top:0;right:0;padding:5px;font-size:10px;text-shadow:1px 1px 1px rgba(0,0,0,0.9);color:#fff;}"));
|
|
62732
|
+
}
|
|
62733
|
+
}, {
|
|
62734
|
+
key: "renderThumbs",
|
|
62735
|
+
value: function renderThumbs() {
|
|
62736
|
+
if (!this.props.showThumbs || !this.props.children || React.Children.count(this.props.children) === 0) {
|
|
62737
|
+
return null;
|
|
62738
|
+
}
|
|
62739
|
+
return /*#__PURE__*/React.createElement(Thumbs, {
|
|
62740
|
+
ref: this.setThumbsRef,
|
|
62741
|
+
onSelectItem: this.handleClickThumb,
|
|
62742
|
+
selectedItem: this.state.selectedItem,
|
|
62743
|
+
transitionTime: this.props.transitionTime,
|
|
62744
|
+
thumbWidth: this.props.thumbWidth,
|
|
62745
|
+
labels: this.props.labels,
|
|
62746
|
+
emulateTouch: this.props.emulateTouch
|
|
62747
|
+
}, this.props.renderThumbs(this.props.children));
|
|
62748
|
+
}
|
|
62749
|
+
}, {
|
|
62750
|
+
key: "render",
|
|
62751
|
+
value: function render() {
|
|
62752
|
+
var _this5 = this;
|
|
62753
|
+
if (!this.props.children || React.Children.count(this.props.children) === 0) {
|
|
62754
|
+
return null;
|
|
62755
|
+
}
|
|
62756
|
+
var isSwipeable = this.props.swipeable && React.Children.count(this.props.children) > 1;
|
|
62757
|
+
var isHorizontal = this.props.axis === 'horizontal';
|
|
62758
|
+
var canShowArrows = this.props.showArrows && React.Children.count(this.props.children) > 1;
|
|
62759
|
+
|
|
62760
|
+
// show left arrow?
|
|
62761
|
+
var hasPrev = canShowArrows && (this.state.selectedItem > 0 || this.props.infiniteLoop) || false;
|
|
62762
|
+
// show right arrow
|
|
62763
|
+
var hasNext = canShowArrows && (this.state.selectedItem < React.Children.count(this.props.children) - 1 || this.props.infiniteLoop) || false;
|
|
62764
|
+
var itemsClone = this.renderItems(true);
|
|
62765
|
+
var firstClone = itemsClone.shift();
|
|
62766
|
+
var lastClone = itemsClone.pop();
|
|
62767
|
+
var swiperProps = {
|
|
62768
|
+
className: klass.SLIDER(true, this.state.swiping),
|
|
62769
|
+
onSwipeMove: this.onSwipeMove,
|
|
62770
|
+
onSwipeStart: this.onSwipeStart,
|
|
62771
|
+
onSwipeEnd: this.onSwipeEnd,
|
|
62772
|
+
style: _objectSpread2({
|
|
62773
|
+
margin: 0,
|
|
62774
|
+
display: this.props.axis === 'horizontal' ? 'flex' : 'unset',
|
|
62775
|
+
flexDirection: this.props.axis === 'horizontal' ? 'row' : 'column'
|
|
62776
|
+
}, this.state.itemListStyle),
|
|
62777
|
+
tolerance: this.props.swipeScrollTolerance
|
|
62778
|
+
};
|
|
62779
|
+
var containerStyles = {};
|
|
62780
|
+
if (isHorizontal) {
|
|
62781
|
+
swiperProps.onSwipeLeft = this.onSwipeForward;
|
|
62782
|
+
swiperProps.onSwipeRight = this.onSwipeBackwards;
|
|
62783
|
+
if (this.props.dynamicHeight) {
|
|
62784
|
+
var itemHeight = this.getVariableItemHeight(this.state.selectedItem);
|
|
62785
|
+
// swiperProps.style.height = itemHeight || 'auto';
|
|
62786
|
+
containerStyles.height = itemHeight || 'auto';
|
|
62787
|
+
}
|
|
62788
|
+
} else {
|
|
62789
|
+
swiperProps.onSwipeUp = this.props.verticalSwipe === 'natural' ? this.onSwipeBackwards : this.onSwipeForward;
|
|
62790
|
+
swiperProps.onSwipeDown = this.props.verticalSwipe === 'natural' ? this.onSwipeForward : this.onSwipeBackwards;
|
|
62791
|
+
swiperProps.style = _objectSpread2(_objectSpread2({}, swiperProps.style), {}, {
|
|
62792
|
+
height: this.state.itemSize
|
|
62793
|
+
});
|
|
62794
|
+
containerStyles.height = this.state.itemSize;
|
|
62795
|
+
}
|
|
62796
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
62797
|
+
"aria-label": this.props.ariaLabel,
|
|
62798
|
+
ref: this.setCarouselWrapperRef,
|
|
62799
|
+
tabIndex: this.props.useKeyboardArrows ? 0 : undefined,
|
|
62800
|
+
className: "jsx-535322850" + " " + (klass.ROOT(this.props.className) || "")
|
|
62801
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62802
|
+
style: {
|
|
62803
|
+
width: this.props.width
|
|
62804
|
+
},
|
|
62805
|
+
className: "jsx-535322850" + " " + (klass.CAROUSEL(true) || "")
|
|
62806
|
+
}, this.renderControls(), this.props.renderArrowPrev(this.onClickPrev, hasPrev, this.props.labels.leftArrow), /*#__PURE__*/React.createElement("div", {
|
|
62807
|
+
style: containerStyles,
|
|
62808
|
+
className: "jsx-535322850" + " " + (klass.WRAPPER(true, this.props.axis) || "")
|
|
62809
|
+
}, isSwipeable ? /*#__PURE__*/React.createElement(ReactSwipe, _extends({
|
|
62810
|
+
tagName: "ul",
|
|
62811
|
+
innerRef: this.setListRef
|
|
62812
|
+
}, swiperProps, {
|
|
62813
|
+
allowMouseEvents: this.props.emulateTouch
|
|
62814
|
+
}), this.props.infiniteLoop && lastClone, this.renderItems(), this.props.infiniteLoop && firstClone) : /*#__PURE__*/React.createElement("ul", {
|
|
62815
|
+
ref: function ref(node) {
|
|
62816
|
+
return _this5.setListRef(node);
|
|
62817
|
+
},
|
|
62818
|
+
style: this.state.itemListStyle || {},
|
|
62819
|
+
className: "jsx-535322850" + " " + (klass.SLIDER(true, this.state.swiping) || "")
|
|
62820
|
+
}, this.props.infiniteLoop && lastClone, this.renderItems(), this.props.infiniteLoop && firstClone)), this.props.renderArrowNext(this.onClickNext, hasNext, this.props.labels.rightArrow), this.renderStatus()), this.renderThumbs(), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
62821
|
+
id: "535322850"
|
|
62822
|
+
}, ".carousel-root.jsx-535322850{outline:none;}.slider.jsx-535322850{margin:0 !important;padding:0;position:relative;list-style:none;width:100%;}.slider.jsx-535322850 .animated.jsx-535322850{-webkit-transition:all 0.35s ease-in-out;transition:all 0.35s ease-in-out;}.carousel.jsx-535322850{position:relative;width:100%;}.carousel.jsx-535322850 img.jsx-535322850{width:100%;display:inline-block;pointer-events:none;}.carousel.jsx-535322850 .carousel.jsx-535322850{position:relative;}.carousel-slider.jsx-535322850{position:relative;margin:0;overflow:hidden;}.slider-wrapper.jsx-535322850{overflow:hidden;margin:auto;width:100%;-webkit-transition:height 0.15s ease-in;transition:height 0.15s ease-in;}"));
|
|
62823
|
+
}
|
|
62824
|
+
}]);
|
|
62825
|
+
}(React.Component);
|
|
62826
|
+
// @ts-ignore
|
|
62827
|
+
_defineProperty$1(Carousel, "displayName", 'Carousel');
|
|
62828
|
+
_defineProperty$1(Carousel, "defaultProps", {
|
|
62829
|
+
ariaLabel: undefined,
|
|
62830
|
+
axis: 'horizontal',
|
|
62831
|
+
centerSlidePercentage: 80,
|
|
62832
|
+
interval: 3000,
|
|
62833
|
+
labels: {
|
|
62834
|
+
leftArrow: 'previous slide / item',
|
|
62835
|
+
rightArrow: 'next slide / item',
|
|
62836
|
+
item: 'slide item'
|
|
62837
|
+
},
|
|
62838
|
+
onClickItem: noop,
|
|
62839
|
+
onClickThumb: noop,
|
|
62840
|
+
onChange: noop,
|
|
62841
|
+
onSwipeStart: function onSwipeStart() {},
|
|
62842
|
+
onSwipeEnd: function onSwipeEnd() {},
|
|
62843
|
+
onSwipeMove: function onSwipeMove() {
|
|
62844
|
+
return false;
|
|
62845
|
+
},
|
|
62846
|
+
preventMovementUntilSwipeScrollTolerance: false,
|
|
62847
|
+
renderArrowPrev: function renderArrowPrev(onClickHandler, hasPrev, label) {
|
|
62848
|
+
return /*#__PURE__*/React.createElement(Arrow, {
|
|
62849
|
+
direction: "prev",
|
|
62850
|
+
onClickHandler: onClickHandler,
|
|
62851
|
+
enabled: hasPrev,
|
|
62852
|
+
label: label
|
|
62853
|
+
});
|
|
62854
|
+
},
|
|
62855
|
+
renderArrowNext: function renderArrowNext(onClickHandler, hasNext, label) {
|
|
62856
|
+
return /*#__PURE__*/React.createElement(Arrow, {
|
|
62857
|
+
direction: "next",
|
|
62858
|
+
onClickHandler: onClickHandler,
|
|
62859
|
+
enabled: hasNext,
|
|
62860
|
+
label: label
|
|
62861
|
+
});
|
|
62862
|
+
},
|
|
62863
|
+
renderIndicator: function renderIndicator(onClickHandler, isSelected, index, label) {
|
|
62864
|
+
return /*#__PURE__*/React.createElement(Indicator, {
|
|
62865
|
+
onClickHandler: onClickHandler,
|
|
62866
|
+
isSelected: isSelected,
|
|
62867
|
+
index: index,
|
|
62868
|
+
label: label
|
|
62869
|
+
});
|
|
62870
|
+
},
|
|
62871
|
+
renderItem: function renderItem(item) {
|
|
62872
|
+
return item;
|
|
62873
|
+
},
|
|
62874
|
+
renderThumbs: function renderThumbs(children) {
|
|
62875
|
+
var images = React.Children.map(children, function (item) {
|
|
62876
|
+
var img = item;
|
|
62877
|
+
|
|
62878
|
+
// if the item is not an image, try to find the first image in the item's children.
|
|
62879
|
+
if (item.type !== 'img') {
|
|
62880
|
+
img = React.Children.toArray(item.props.children).find(function (children) {
|
|
62881
|
+
return children.type === 'img';
|
|
62882
|
+
});
|
|
62883
|
+
}
|
|
62884
|
+
if (!img) {
|
|
62885
|
+
return undefined;
|
|
62886
|
+
}
|
|
62887
|
+
return img;
|
|
62888
|
+
});
|
|
62889
|
+
if (images.filter(function (image) {
|
|
62890
|
+
return image;
|
|
62891
|
+
}).length === 0) {
|
|
62892
|
+
console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md");
|
|
62893
|
+
return [];
|
|
62894
|
+
}
|
|
62895
|
+
return images;
|
|
62896
|
+
},
|
|
62897
|
+
statusFormatter: defaultStatusFormatter,
|
|
62898
|
+
selectedItem: 0,
|
|
62899
|
+
showArrows: true,
|
|
62900
|
+
showIndicators: true,
|
|
62901
|
+
showStatus: true,
|
|
62902
|
+
showThumbs: true,
|
|
62903
|
+
stopOnHover: true,
|
|
62904
|
+
swipeScrollTolerance: 5,
|
|
62905
|
+
swipeable: true,
|
|
62906
|
+
transitionTime: 350,
|
|
62907
|
+
verticalSwipe: 'standard',
|
|
62908
|
+
width: '100%',
|
|
62909
|
+
animationHandler: 'slide',
|
|
62910
|
+
swipeAnimationHandler: slideSwipeAnimationHandler,
|
|
62911
|
+
stopSwipingHandler: slideStopSwipingHandler
|
|
62912
|
+
});
|
|
62913
|
+
|
|
60320
62914
|
exports.AutoComplete = AutoComplete;
|
|
60321
62915
|
exports.Avatar = Avatar;
|
|
60322
62916
|
exports.Badge = Badge;
|
|
@@ -60326,6 +62920,7 @@ exports.ButtonDropdown = ButtonDropdown;
|
|
|
60326
62920
|
exports.ButtonGroup = ButtonGroup;
|
|
60327
62921
|
exports.Capacity = Capacity;
|
|
60328
62922
|
exports.Card = Card;
|
|
62923
|
+
exports.Carousel = Carousel;
|
|
60329
62924
|
exports.Checkbox = Checkbox;
|
|
60330
62925
|
exports.CircularProgress = CircularProgressbarWithChildren;
|
|
60331
62926
|
exports.CircularProgressBar = CircularProgressbar;
|
|
@@ -60384,6 +62979,7 @@ exports.Slider = Slider;
|
|
|
60384
62979
|
exports.Snippet = Snippet;
|
|
60385
62980
|
exports.Spacer = Spacer;
|
|
60386
62981
|
exports.Spinner = Spinner;
|
|
62982
|
+
exports.Swipe = ReactSwipe;
|
|
60387
62983
|
exports.Table = Table;
|
|
60388
62984
|
exports.Tabs = Tabs;
|
|
60389
62985
|
exports.Tag = Tag;
|