@janiscommerce/ui-web 1.3.0 → 1.4.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/CHANGELOG.md +13 -0
- package/dist/index.esm.js +267 -121
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +248 -102
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +2 -1
- package/package.json +3 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState, useEffect, useRef, PureComponent, useMemo, useCallback, useLayoutEffect, createContext, forwardRef, useImperativeHandle } from 'react';
|
|
3
|
-
import styled$
|
|
3
|
+
import styled$j, { css, createGlobalStyle, keyframes } from 'styled-components';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
5
|
import ReactDOM__default from 'react-dom';
|
|
6
|
+
import { useCollapse } from 'react-collapsed';
|
|
6
7
|
|
|
7
8
|
function ownKeys$2(object, enumerableOnly) {
|
|
8
9
|
var keys = Object.keys(object);
|
|
@@ -4911,6 +4912,9 @@ var isObject$2 = function isObject(value) {
|
|
|
4911
4912
|
var isNumber = function isNumber(num) {
|
|
4912
4913
|
return typeof num === 'number' && !Number.isNaN(Number(num));
|
|
4913
4914
|
};
|
|
4915
|
+
var isFunction = function isFunction(value) {
|
|
4916
|
+
return typeof value === 'function';
|
|
4917
|
+
};
|
|
4914
4918
|
|
|
4915
4919
|
var breakpoints = {
|
|
4916
4920
|
values: {
|
|
@@ -5246,7 +5250,7 @@ $$b({ target: 'Array', stat: true, forced: INCORRECT_ITERATION$1 }, {
|
|
|
5246
5250
|
from: from
|
|
5247
5251
|
});
|
|
5248
5252
|
|
|
5249
|
-
var SkeletonContainer = styled$
|
|
5253
|
+
var SkeletonContainer = styled$j.div.withConfig({
|
|
5250
5254
|
displayName: "styles__SkeletonContainer",
|
|
5251
5255
|
componentId: "sc-1xnupv9-0"
|
|
5252
5256
|
})(["border-radius:", ";height:", ";width:", ";background-color:", ";animation:pulse 1.5s ease-in-out infinite;@keyframes pulse{0%{opacity:0.4;}50%{opacity:0.8;}100%{opacity:0.4;}}"], function (_ref) {
|
|
@@ -5291,8 +5295,8 @@ Skeleton.defaultProps = {
|
|
|
5291
5295
|
width: '100%'
|
|
5292
5296
|
};
|
|
5293
5297
|
|
|
5294
|
-
var styled$
|
|
5295
|
-
Image: styled$
|
|
5298
|
+
var styled$i = {
|
|
5299
|
+
Image: styled$j.img.withConfig({
|
|
5296
5300
|
displayName: "styles__Image",
|
|
5297
5301
|
componentId: "sc-uljfj3-0"
|
|
5298
5302
|
})(["width:", ";height:", ";display:", ";border-radius:", ";"], function (_ref) {
|
|
@@ -5396,8 +5400,8 @@ var mixins = {
|
|
|
5396
5400
|
}
|
|
5397
5401
|
};
|
|
5398
5402
|
|
|
5399
|
-
var styled$
|
|
5400
|
-
Initials: styled$
|
|
5403
|
+
var styled$h = {
|
|
5404
|
+
Initials: styled$j.div.withConfig({
|
|
5401
5405
|
displayName: "styles__Initials",
|
|
5402
5406
|
componentId: "sc-qlu7od-0"
|
|
5403
5407
|
})(["width:", ";height:", ";border-radius:", ";font-weight:500;color:", ";background-color:", ";text-transform:uppercase;", ";"], function (_ref) {
|
|
@@ -5420,7 +5424,7 @@ var InitialsAvatar = function InitialsAvatar(_ref) {
|
|
|
5420
5424
|
mainColor = _ref.mainColor,
|
|
5421
5425
|
imageSize = _ref.imageSize,
|
|
5422
5426
|
rounded = _ref.rounded;
|
|
5423
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
5427
|
+
return /*#__PURE__*/React__default.createElement(styled$h.Initials, {
|
|
5424
5428
|
color: mainColor,
|
|
5425
5429
|
size: imageSize,
|
|
5426
5430
|
rounded: rounded
|
|
@@ -5586,7 +5590,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
5586
5590
|
imageSize: imageSize,
|
|
5587
5591
|
rounded: rounded
|
|
5588
5592
|
});
|
|
5589
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(styled$
|
|
5593
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(styled$i.Image, {
|
|
5590
5594
|
ref: imageRef,
|
|
5591
5595
|
src: url,
|
|
5592
5596
|
alt: "".concat(firstname, " ").concat(lastname),
|
|
@@ -5630,7 +5634,7 @@ $$7({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
|
5630
5634
|
|
|
5631
5635
|
var _templateObject$4;
|
|
5632
5636
|
var styles$2 = {
|
|
5633
|
-
Svg: styled$
|
|
5637
|
+
Svg: styled$j.svg.withConfig({
|
|
5634
5638
|
displayName: "styles__Svg",
|
|
5635
5639
|
componentId: "sc-jf3e5i-0"
|
|
5636
5640
|
})(["fill:", ";", " ", ";", ";"], function (props) {
|
|
@@ -5638,7 +5642,7 @@ var styles$2 = {
|
|
|
5638
5642
|
}, mediaBreaks.onlyPrint(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n\t\t\tfill: ", ";\n\t\t"])), palette.darkGrey), mixins.transition('fill'), function (props) {
|
|
5639
5643
|
return props.styles;
|
|
5640
5644
|
}),
|
|
5641
|
-
Path: styled$
|
|
5645
|
+
Path: styled$j.path.withConfig({
|
|
5642
5646
|
displayName: "styles__Path",
|
|
5643
5647
|
componentId: "sc-jf3e5i-1"
|
|
5644
5648
|
})(["fill:inherit;", ";"], function (props) {
|
|
@@ -5646,15 +5650,15 @@ var styles$2 = {
|
|
|
5646
5650
|
})
|
|
5647
5651
|
};
|
|
5648
5652
|
({
|
|
5649
|
-
Grid: styled$
|
|
5653
|
+
Grid: styled$j.div.withConfig({
|
|
5650
5654
|
displayName: "styles__Grid",
|
|
5651
5655
|
componentId: "sc-jf3e5i-2"
|
|
5652
5656
|
})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));grid-gap:15px;"]),
|
|
5653
|
-
Item: styled$
|
|
5657
|
+
Item: styled$j.div.withConfig({
|
|
5654
5658
|
displayName: "styles__Item",
|
|
5655
5659
|
componentId: "sc-jf3e5i-3"
|
|
5656
5660
|
})(["padding:5px;border:1px dashed #ccc;cursor:default;display:grid;justify-items:center;justify-content:center;grid-row-gap:5px;", ";& ", "{", ";}&:hover{color:", ";}&:hover ", "{fill:", ";}"], mixins.transition('color'), styles$2.Svg, mixins.transition('fill'), palette.blue, styles$2.Svg, palette.blue),
|
|
5657
|
-
SearchInput: styled$
|
|
5661
|
+
SearchInput: styled$j.input.withConfig({
|
|
5658
5662
|
displayName: "styles__SearchInput",
|
|
5659
5663
|
componentId: "sc-jf3e5i-4"
|
|
5660
5664
|
})(["margin-bottom:10px;padding:5px;"])
|
|
@@ -7117,8 +7121,8 @@ var getChipVariant = function getChipVariant(props) {
|
|
|
7117
7121
|
return variantStyles[variant] || '';
|
|
7118
7122
|
};
|
|
7119
7123
|
|
|
7120
|
-
var styled$
|
|
7121
|
-
Chip: styled$
|
|
7124
|
+
var styled$g = {
|
|
7125
|
+
Chip: styled$j.button.withConfig({
|
|
7122
7126
|
displayName: "styles__Chip",
|
|
7123
7127
|
componentId: "sc-1vnh4co-0"
|
|
7124
7128
|
})(["padding:", ";cursor:", ";font-size:13px;color:", ";height:", ";width:", ";min-width:36px;border-radius:", ";display:inline-flex;justify-content:center;align-items:center;pointer-events:", ";white-space:nowrap;.chip-icon{", ";}", ";", ";", " ", " ", " ", ""], function (props) {
|
|
@@ -7146,11 +7150,11 @@ var styled$f = {
|
|
|
7146
7150
|
}, function (props) {
|
|
7147
7151
|
return props.textColor && "color: ".concat(getColor(props.textColor), ";");
|
|
7148
7152
|
}, mediaBreaks.onlyPrint(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n\t\t\tborder: 1px solid ", ";\n\t\t"])), palette.darkGrey)),
|
|
7149
|
-
DeleteButton: styled$
|
|
7153
|
+
DeleteButton: styled$j.button.withConfig({
|
|
7150
7154
|
displayName: "styles__DeleteButton",
|
|
7151
7155
|
componentId: "sc-1vnh4co-1"
|
|
7152
7156
|
})(["width:16px;height:16px;margin-left:12px;"]),
|
|
7153
|
-
Children: styled$
|
|
7157
|
+
Children: styled$j.div.withConfig({
|
|
7154
7158
|
displayName: "styles__Children",
|
|
7155
7159
|
componentId: "sc-1vnh4co-2"
|
|
7156
7160
|
})(["text-overflow:ellipsis;overflow:hidden;"])
|
|
@@ -7175,7 +7179,7 @@ var Chip = function Chip(_ref) {
|
|
|
7175
7179
|
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
7176
7180
|
|
|
7177
7181
|
if (!children && !icon) return null;
|
|
7178
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
7182
|
+
return /*#__PURE__*/React__default.createElement(styled$g.Chip, _extends$1({
|
|
7179
7183
|
as: props.onClick ? 'button' : 'div',
|
|
7180
7184
|
backgroundColor: backgroundColor,
|
|
7181
7185
|
borderColor: borderColor,
|
|
@@ -7193,7 +7197,7 @@ var Chip = function Chip(_ref) {
|
|
|
7193
7197
|
name: icon,
|
|
7194
7198
|
color: iconColor,
|
|
7195
7199
|
size: iconSize
|
|
7196
|
-
}), children && /*#__PURE__*/React__default.createElement(styled$
|
|
7200
|
+
}), children && /*#__PURE__*/React__default.createElement(styled$g.Children, null, children), onDelete && /*#__PURE__*/React__default.createElement(styled$g.DeleteButton, {
|
|
7197
7201
|
type: "button",
|
|
7198
7202
|
onClick: onDelete
|
|
7199
7203
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
@@ -7215,8 +7219,8 @@ Chip.defaultProps = {
|
|
|
7215
7219
|
hasLink: false
|
|
7216
7220
|
};
|
|
7217
7221
|
|
|
7218
|
-
var styled$
|
|
7219
|
-
AvatarGroup: styled$
|
|
7222
|
+
var styled$f = {
|
|
7223
|
+
AvatarGroup: styled$j(Chip).withConfig({
|
|
7220
7224
|
displayName: "styles__AvatarGroup",
|
|
7221
7225
|
componentId: "sc-1jnt2lr-0"
|
|
7222
7226
|
})(["pointer-events:none;", " background:", ";", " & div{display:flex;& div,img,span{&:not(:first-child){margin-left:-4px;}}span:first-of-type{margin-left:0px;}}"], function (_ref) {
|
|
@@ -7351,7 +7355,7 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
7351
7355
|
badgeColor = _ref.badgeColor;
|
|
7352
7356
|
var extraCount = users.length > usersToDisplay ? users.length - usersToDisplay : 0;
|
|
7353
7357
|
var hasExtraCount = extraCount > 0;
|
|
7354
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
7358
|
+
return /*#__PURE__*/React__default.createElement(styled$f.AvatarGroup, {
|
|
7355
7359
|
disabled: true,
|
|
7356
7360
|
showFull: showFull
|
|
7357
7361
|
}, /*#__PURE__*/React__default.createElement(AvatarList, {
|
|
@@ -7442,8 +7446,8 @@ var getButtonStyles = function getButtonStyles(_ref) {
|
|
|
7442
7446
|
return variantStyles[variant] || '';
|
|
7443
7447
|
};
|
|
7444
7448
|
|
|
7445
|
-
var styled$
|
|
7446
|
-
Button: styled$
|
|
7449
|
+
var styled$e = {
|
|
7450
|
+
Button: styled$j.button.withConfig({
|
|
7447
7451
|
displayName: "styles__Button",
|
|
7448
7452
|
componentId: "sc-buf2do-0"
|
|
7449
7453
|
})(["display:flex;align-items:center;justify-content:center;height:36px;width:", ";flex-shrink:", ";border-radius:", ";padding:", ";cursor:", ";border:none;font-size:13px;font-weight:500;position:relative;", ";z-index:0;&:before{content:'';border-radius:50px;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;}&:after{content:'';border-radius:50px;position:absolute;z-index:-1;width:100%;height:100%;transition:all 0.25s ", ";transform:scale(0,0);top:0;bottom:0;left:0;right:0;}&:focus:after,&:hover:after,&:active:after{transform:scale(1,1);}&:active{-webkit-tap-highlight-color:", ";}.button-icon{margin-right:", ";fill:", ";", ";}&:disabled{&:hover{background-color:transparent;}}", " .button-icon{fill:", ";}", ";"], function (_ref2) {
|
|
@@ -7491,7 +7495,7 @@ var Button = function Button(_ref) {
|
|
|
7491
7495
|
disabled = _ref.disabled,
|
|
7492
7496
|
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
7493
7497
|
|
|
7494
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
7498
|
+
return /*#__PURE__*/React__default.createElement(styled$e.Button, _extends$1({
|
|
7495
7499
|
color: color,
|
|
7496
7500
|
iconColor: iconColor || fontColor,
|
|
7497
7501
|
fontColor: fontColor,
|
|
@@ -7516,8 +7520,8 @@ Button.defaultProps = {
|
|
|
7516
7520
|
disabled: false
|
|
7517
7521
|
};
|
|
7518
7522
|
|
|
7519
|
-
var styled$
|
|
7520
|
-
Container: styled$
|
|
7523
|
+
var styled$d = {
|
|
7524
|
+
Container: styled$j.label.withConfig({
|
|
7521
7525
|
displayName: "styles__Container",
|
|
7522
7526
|
componentId: "sc-18bfcwf-0"
|
|
7523
7527
|
})(["background:", ";border:1px solid ", ";border-radius:", "px;width:16px;height:16px;line-height:16px;position:relative;cursor:pointer;display:flex;transition:background ", " 0.2s;user-select:none;margin-right:12px;", ";"], function (props) {
|
|
@@ -7529,7 +7533,7 @@ var styled$c = {
|
|
|
7529
7533
|
}, timingFunctions$1.standard, function (props) {
|
|
7530
7534
|
return props.styles;
|
|
7531
7535
|
}),
|
|
7532
|
-
Input: styled$
|
|
7536
|
+
Input: styled$j.input.withConfig({
|
|
7533
7537
|
displayName: "styles__Input",
|
|
7534
7538
|
componentId: "sc-18bfcwf-1"
|
|
7535
7539
|
})(["opacity:0;position:absolute;cursor:pointer;"]),
|
|
@@ -7563,18 +7567,18 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
7563
7567
|
|
|
7564
7568
|
var _props$checked = props.checked,
|
|
7565
7569
|
conntroledChecked = _props$checked === void 0 ? checked : _props$checked;
|
|
7566
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
7570
|
+
return /*#__PURE__*/React__default.createElement(styled$d.Container, {
|
|
7567
7571
|
checked: conntroledChecked,
|
|
7568
7572
|
rounded: rounded,
|
|
7569
7573
|
styles: styles
|
|
7570
|
-
}, /*#__PURE__*/React__default.createElement(styled$
|
|
7574
|
+
}, /*#__PURE__*/React__default.createElement(styled$d.Input, _extends$1({}, props, {
|
|
7571
7575
|
type: "checkbox",
|
|
7572
7576
|
disabled: disabled,
|
|
7573
7577
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
7574
7578
|
onChange: handleChange
|
|
7575
7579
|
})), /*#__PURE__*/React__default.createElement(Icon, {
|
|
7576
7580
|
name: "check_bold",
|
|
7577
|
-
styles: styled$
|
|
7581
|
+
styles: styled$d.iconCheckStyles,
|
|
7578
7582
|
rounded: rounded
|
|
7579
7583
|
}));
|
|
7580
7584
|
};
|
|
@@ -7586,18 +7590,18 @@ Checkbox.defaultProps = {
|
|
|
7586
7590
|
}
|
|
7587
7591
|
};
|
|
7588
7592
|
|
|
7589
|
-
var styled$
|
|
7590
|
-
Wrapper: styled$
|
|
7593
|
+
var styled$c = {
|
|
7594
|
+
Wrapper: styled$j.div.withConfig({
|
|
7591
7595
|
displayName: "styles__Wrapper",
|
|
7592
7596
|
componentId: "sc-zbd85t-0"
|
|
7593
7597
|
})(["display:flex;align-items:center;"]),
|
|
7594
|
-
ColorSample: styled$
|
|
7598
|
+
ColorSample: styled$j.div.withConfig({
|
|
7595
7599
|
displayName: "styles__ColorSample",
|
|
7596
7600
|
componentId: "sc-zbd85t-1"
|
|
7597
7601
|
})(["display:block;width:16px;height:16px;background-color:", ";border:1px solid ", ";border-radius:50%;"], function (props) {
|
|
7598
7602
|
return props.color;
|
|
7599
7603
|
}, palette.grey),
|
|
7600
|
-
Label: styled$
|
|
7604
|
+
Label: styled$j.span.withConfig({
|
|
7601
7605
|
displayName: "styles__Label",
|
|
7602
7606
|
componentId: "sc-zbd85t-2"
|
|
7603
7607
|
})(["margin-left:5px;text-transform:", ";"], function (props) {
|
|
@@ -7610,9 +7614,9 @@ var Color = function Color(_ref) {
|
|
|
7610
7614
|
showLabel = _ref.showLabel;
|
|
7611
7615
|
if (!color) return null;
|
|
7612
7616
|
var colorCode = getColor(color);
|
|
7613
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
7617
|
+
return /*#__PURE__*/React__default.createElement(styled$c.Wrapper, null, /*#__PURE__*/React__default.createElement(styled$c.ColorSample, {
|
|
7614
7618
|
color: colorCode
|
|
7615
|
-
}), showLabel && /*#__PURE__*/React__default.createElement(styled$
|
|
7619
|
+
}), showLabel && /*#__PURE__*/React__default.createElement(styled$c.Label, {
|
|
7616
7620
|
color: colorCode
|
|
7617
7621
|
}, colorCode));
|
|
7618
7622
|
};
|
|
@@ -7628,7 +7632,7 @@ var statusColor = function statusColor(props) {
|
|
|
7628
7632
|
if (checked) return palette.blue;
|
|
7629
7633
|
return palette.darkGrey;
|
|
7630
7634
|
};
|
|
7631
|
-
var Ball = styled$
|
|
7635
|
+
var Ball = styled$j.div.withConfig({
|
|
7632
7636
|
displayName: "styles__Ball",
|
|
7633
7637
|
componentId: "sc-rtzdt3-0"
|
|
7634
7638
|
})(["width:16px;height:16px;border-radius:50%;position:absolute;top:4px;left:4px;background-color:", ";transition:all ", " 0.2s;", ""], palette.white, timingFunctions$1.standard, function (props) {
|
|
@@ -7639,8 +7643,8 @@ var iconCheckStyles = css(["position:absolute;fill:", ";", ""], function (props)
|
|
|
7639
7643
|
}, onlyPrint(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n\t\tfill: ", " !important;\n\t"])), function (props) {
|
|
7640
7644
|
return props.checked ? palette.black : palette.darkGrey;
|
|
7641
7645
|
}));
|
|
7642
|
-
var styled$
|
|
7643
|
-
OuterContainer: styled$
|
|
7646
|
+
var styled$b = {
|
|
7647
|
+
OuterContainer: styled$j.div.withConfig({
|
|
7644
7648
|
displayName: "styles__OuterContainer",
|
|
7645
7649
|
componentId: "sc-rtzdt3-1"
|
|
7646
7650
|
})(["display:flex;width:44px;align-items:center;pointer-events:", ";align-self:center;position:relative;", " &:active ", "{box-shadow:0px 0px 0px 10px ", ";", " svg{fill:", ";}}"], function (props) {
|
|
@@ -7650,12 +7654,12 @@ var styled$a = {
|
|
|
7650
7654
|
iconCheckStyles, function (props) {
|
|
7651
7655
|
return props.checked ? palette.blue : palette.darkGrey;
|
|
7652
7656
|
}),
|
|
7653
|
-
Input: styled$
|
|
7657
|
+
Input: styled$j.input.withConfig({
|
|
7654
7658
|
displayName: "styles__Input",
|
|
7655
7659
|
componentId: "sc-rtzdt3-2"
|
|
7656
7660
|
})(["position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:1;"]),
|
|
7657
7661
|
Ball: Ball,
|
|
7658
|
-
Container: styled$
|
|
7662
|
+
Container: styled$j.div.withConfig({
|
|
7659
7663
|
displayName: "styles__Container",
|
|
7660
7664
|
componentId: "sc-rtzdt3-3"
|
|
7661
7665
|
})(["width:44px;height:24px;background-color:", ";border-radius:50px;position:relative;", ""], function (props) {
|
|
@@ -7689,10 +7693,10 @@ var Switch = function Switch(_ref) {
|
|
|
7689
7693
|
|
|
7690
7694
|
var _props$checked = props.checked,
|
|
7691
7695
|
controledChecked = _props$checked === void 0 ? checked : _props$checked;
|
|
7692
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
7696
|
+
return /*#__PURE__*/React__default.createElement(styled$b.OuterContainer, {
|
|
7693
7697
|
disabled: disabled,
|
|
7694
7698
|
checked: checked
|
|
7695
|
-
}, /*#__PURE__*/React__default.createElement(styled$
|
|
7699
|
+
}, /*#__PURE__*/React__default.createElement(styled$b.Input, {
|
|
7696
7700
|
checked: controledChecked,
|
|
7697
7701
|
id: id,
|
|
7698
7702
|
name: name,
|
|
@@ -7700,10 +7704,10 @@ var Switch = function Switch(_ref) {
|
|
|
7700
7704
|
disabled: disabled,
|
|
7701
7705
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
7702
7706
|
onChange: handleChange
|
|
7703
|
-
}), /*#__PURE__*/React__default.createElement(styled$
|
|
7707
|
+
}), /*#__PURE__*/React__default.createElement(styled$b.Container, {
|
|
7704
7708
|
checked: controledChecked,
|
|
7705
7709
|
disabled: disabled
|
|
7706
|
-
}, /*#__PURE__*/React__default.createElement(styled$
|
|
7710
|
+
}, /*#__PURE__*/React__default.createElement(styled$b.Ball, {
|
|
7707
7711
|
checked: controledChecked,
|
|
7708
7712
|
disabled: disabled
|
|
7709
7713
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
@@ -7711,7 +7715,7 @@ var Switch = function Switch(_ref) {
|
|
|
7711
7715
|
disabled: disabled,
|
|
7712
7716
|
name: "check_bold",
|
|
7713
7717
|
size: 16,
|
|
7714
|
-
styles: styled$
|
|
7718
|
+
styles: styled$b.iconCheckStyles
|
|
7715
7719
|
}))));
|
|
7716
7720
|
};
|
|
7717
7721
|
|
|
@@ -7793,14 +7797,14 @@ var hoverAndFocusColor = function hoverAndFocusColor(props) {
|
|
|
7793
7797
|
return palette.black;
|
|
7794
7798
|
};
|
|
7795
7799
|
|
|
7796
|
-
var styled$
|
|
7797
|
-
Container: styled$
|
|
7800
|
+
var styled$a = {
|
|
7801
|
+
Container: styled$j.div.withConfig({
|
|
7798
7802
|
displayName: "styles__Container",
|
|
7799
7803
|
componentId: "sc-1fhkfhs-0"
|
|
7800
7804
|
})(["position:relative;width:", ";"], function (props) {
|
|
7801
7805
|
return props.fullWidth ? '100%' : 'auto';
|
|
7802
7806
|
}),
|
|
7803
|
-
FloatingLabel: styled$
|
|
7807
|
+
FloatingLabel: styled$j.div.withConfig({
|
|
7804
7808
|
displayName: "styles__FloatingLabel",
|
|
7805
7809
|
componentId: "sc-1fhkfhs-1"
|
|
7806
7810
|
})(["position:absolute;font-size:", ";font-weight:400;color:", ";height:30px;line-height:30px;bottom:0;left:0;", " transform-origin:top left;transform:", ";transition:all 0.2s ", ";", ""], fontSize$1, function (props) {
|
|
@@ -7815,7 +7819,7 @@ var styled$9 = {
|
|
|
7815
7819
|
isFloating = _ref2.isFloating;
|
|
7816
7820
|
return hasIcon && !isFloating && "padding-left: 32px";
|
|
7817
7821
|
}),
|
|
7818
|
-
Input: styled$
|
|
7822
|
+
Input: styled$j.input.withConfig({
|
|
7819
7823
|
displayName: "styles__Input",
|
|
7820
7824
|
componentId: "sc-1fhkfhs-2"
|
|
7821
7825
|
})(["@keyframes onAutoFill{}", " height:34px;border:none;font-size:", ";font-weight:400;color:", ";transition:color 0.2s ", ";cursor:pointer;width:100%;border-bottom:1px solid ", ";border-radius:0;", " ", " ", " &:hover{border-color:", ";}&:focus{border-color:", ";caret-color:", ";outline:none;}&:disabled{background-color:", ";color:", ";border-color:", ";cursor:default;}&:-webkit-autofill{animation-name:onAutoFill;}::-webkit-inner-spin-button{appearance:none;}", ""], function (props) {
|
|
@@ -7836,11 +7840,11 @@ var styled$9 = {
|
|
|
7836
7840
|
}, function (props) {
|
|
7837
7841
|
return hoverAndFocusColor(props);
|
|
7838
7842
|
}, palette.white, palette.grey, palette.grey, mediaBreaks.onlyPrint(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n\t\t\tborder-bottom: none;\n\t\t"])))),
|
|
7839
|
-
ErrorMessage: styled$
|
|
7843
|
+
ErrorMessage: styled$j.span.withConfig({
|
|
7840
7844
|
displayName: "styles__ErrorMessage",
|
|
7841
7845
|
componentId: "sc-1fhkfhs-3"
|
|
7842
7846
|
})(["color:", ";font-size:12px;line-height:14px;transform:translateY(-6px);word-break:break-word;"], palette.statusRed),
|
|
7843
|
-
InputIcon: styled$
|
|
7847
|
+
InputIcon: styled$j(Icon).withConfig({
|
|
7844
7848
|
displayName: "styles__InputIcon",
|
|
7845
7849
|
componentId: "sc-1fhkfhs-4"
|
|
7846
7850
|
})(["position:absolute;flex-shrink:0;flex-grow:0;margin-right:8px;height:100%;"])
|
|
@@ -7946,11 +7950,11 @@ var Input = /*#__PURE__*/function (_PureComponent) {
|
|
|
7946
7950
|
|
|
7947
7951
|
var autoCompleteOff = props.type === 'password' ? 'new-password' : 'off';
|
|
7948
7952
|
var isFloating = isFocused || !!value.toString();
|
|
7949
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
7953
|
+
return /*#__PURE__*/React__default.createElement(styled$a.Container, {
|
|
7950
7954
|
fullWidth: props.fullWidth
|
|
7951
|
-
}, /*#__PURE__*/React__default.createElement(styled$
|
|
7955
|
+
}, /*#__PURE__*/React__default.createElement(styled$a.Container, {
|
|
7952
7956
|
fullWidth: props.fullWidth
|
|
7953
|
-
}, hasFloatingLabel && /*#__PURE__*/React__default.createElement(styled$
|
|
7957
|
+
}, hasFloatingLabel && /*#__PURE__*/React__default.createElement(styled$a.FloatingLabel, {
|
|
7954
7958
|
"data-test": "floatingLabel",
|
|
7955
7959
|
error: error,
|
|
7956
7960
|
onClick: this.handleLabelClick,
|
|
@@ -7959,10 +7963,10 @@ var Input = /*#__PURE__*/function (_PureComponent) {
|
|
|
7959
7963
|
isFloating: isFloating,
|
|
7960
7964
|
hasIcon: !!icon,
|
|
7961
7965
|
isTranslateActive: isTranslateActive
|
|
7962
|
-
}, props.label), icon && /*#__PURE__*/React__default.createElement(styled$
|
|
7966
|
+
}, props.label), icon && /*#__PURE__*/React__default.createElement(styled$a.InputIcon, {
|
|
7963
7967
|
name: icon,
|
|
7964
7968
|
color: error ? 'statusRed' : 'black'
|
|
7965
|
-
}), /*#__PURE__*/React__default.createElement(styled$
|
|
7969
|
+
}), /*#__PURE__*/React__default.createElement(styled$a.Input, _extends$1({}, props, {
|
|
7966
7970
|
ref: this.input,
|
|
7967
7971
|
placeholder: hasFloatingLabel && !isFloating ? '' : placeholder,
|
|
7968
7972
|
onBlur: this.handleBlur,
|
|
@@ -7975,7 +7979,7 @@ var Input = /*#__PURE__*/function (_PureComponent) {
|
|
|
7975
7979
|
error: error,
|
|
7976
7980
|
hasIcon: !!icon,
|
|
7977
7981
|
onAnimationStart: this.handleFocus
|
|
7978
|
-
}))), error && /*#__PURE__*/React__default.createElement(styled$
|
|
7982
|
+
}))), error && /*#__PURE__*/React__default.createElement(styled$a.ErrorMessage, {
|
|
7979
7983
|
"data-test": "errorMessage"
|
|
7980
7984
|
}, errorMessage));
|
|
7981
7985
|
}
|
|
@@ -8021,14 +8025,14 @@ var placeholderColor = function placeholderColor(props) {
|
|
|
8021
8025
|
return palette.darkGreyPressed;
|
|
8022
8026
|
};
|
|
8023
8027
|
|
|
8024
|
-
var styled$
|
|
8025
|
-
Container: styled$
|
|
8028
|
+
var styled$9 = {
|
|
8029
|
+
Container: styled$j.div.withConfig({
|
|
8026
8030
|
displayName: "styles__Container",
|
|
8027
8031
|
componentId: "sc-wtau65-0"
|
|
8028
8032
|
})(["position:relative;width:", ";"], function (props) {
|
|
8029
8033
|
return props.fullWidth ? '100%' : 'auto';
|
|
8030
8034
|
}),
|
|
8031
|
-
Textarea: styled$
|
|
8035
|
+
Textarea: styled$j.textarea.withConfig({
|
|
8032
8036
|
displayName: "styles__Textarea",
|
|
8033
8037
|
componentId: "sc-wtau65-1"
|
|
8034
8038
|
})(["border:none;border-bottom:1px solid ", ";border-radius:0;height:23px;max-height:350px;padding:0 9px 4px 0;resize:none;font-size:", ";font-weight:400;color:", ";", ";width:", ";", " ", " &:hover{border-color:", ";}&:focus{border-color:", ";caret-color:", ";outline:none;}&:disabled{background-color:", ";color:", ";border-color:", ";cursor:default;}", " ", ""], palette.grey, fontSize, palette.black, mixins.transition('color,border-color', '0.2s'), function (props) {
|
|
@@ -8038,7 +8042,7 @@ var styled$8 = {
|
|
|
8038
8042
|
})), mixins.scrollbar(palette.grey, palette.base), palette.black, palette.blue, palette.blue, palette.white, palette.grey, palette.grey, function (props) {
|
|
8039
8043
|
return props.error && "\n\t\t\t&, &:hover, &:focus {\n\t\t\t\tborder-color: ".concat(palette.statusRed, "\n\t\t\t}\n\t\t");
|
|
8040
8044
|
}, mediaBreaks.onlyPrint(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\tmin-height: initial;\n\t\t\theight: auto !important;\n\t\t\tborder-bottom: none;\n\t\t"])))),
|
|
8041
|
-
FloatingLabel: styled$
|
|
8045
|
+
FloatingLabel: styled$j.div.withConfig({
|
|
8042
8046
|
displayName: "styles__FloatingLabel",
|
|
8043
8047
|
componentId: "sc-wtau65-2"
|
|
8044
8048
|
})(["position:absolute;font-size:", ";font-weight:400;color:", ";height:24px;line-height:22px;top:0;left:0;pointer-events:", ";transform-origin:top left;transform:", ";transition:all 0.2s ", ";"], fontSize, function (props) {
|
|
@@ -8049,7 +8053,7 @@ var styled$8 = {
|
|
|
8049
8053
|
}, function (props) {
|
|
8050
8054
|
return props.isFloating && 'translate(0, -18px) scale(0.75)';
|
|
8051
8055
|
}, timingFunctions.standard),
|
|
8052
|
-
ErrorMessage: styled$
|
|
8056
|
+
ErrorMessage: styled$j.span.withConfig({
|
|
8053
8057
|
displayName: "styles__ErrorMessage",
|
|
8054
8058
|
componentId: "sc-wtau65-3"
|
|
8055
8059
|
})(["color:", ";font-size:12px;line-height:14px;display:block;word-break:break-word;"], palette.statusRed)
|
|
@@ -8160,9 +8164,9 @@ var Textarea = /*#__PURE__*/function (_PureComponent) {
|
|
|
8160
8164
|
var props = _objectWithoutProperties(_this$props, _excluded$4);
|
|
8161
8165
|
|
|
8162
8166
|
var isFloating = isFocused || !!value;
|
|
8163
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
8167
|
+
return /*#__PURE__*/React__default.createElement(styled$9.Container, {
|
|
8164
8168
|
fullWidth: props.fullWidth
|
|
8165
|
-
}, hasFloatingLabel && /*#__PURE__*/React__default.createElement(styled$
|
|
8169
|
+
}, hasFloatingLabel && /*#__PURE__*/React__default.createElement(styled$9.FloatingLabel, _extends$1({}, props, {
|
|
8166
8170
|
"data-test": "floatingLabel",
|
|
8167
8171
|
error: error,
|
|
8168
8172
|
onClick: this.handleLabelClick,
|
|
@@ -8170,7 +8174,7 @@ var Textarea = /*#__PURE__*/function (_PureComponent) {
|
|
|
8170
8174
|
isFocused: isFocused,
|
|
8171
8175
|
isFloating: isFloating,
|
|
8172
8176
|
isTranslateActive: isTranslateActive
|
|
8173
|
-
}), label), /*#__PURE__*/React__default.createElement(styled$
|
|
8177
|
+
}), label), /*#__PURE__*/React__default.createElement(styled$9.Textarea, _extends$1({}, props, {
|
|
8174
8178
|
ref: this.textarea,
|
|
8175
8179
|
placeholder: hasFloatingLabel && !isFloating ? '' : placeholder,
|
|
8176
8180
|
onBlur: this.handleBlur,
|
|
@@ -8181,7 +8185,7 @@ var Textarea = /*#__PURE__*/function (_PureComponent) {
|
|
|
8181
8185
|
value: value,
|
|
8182
8186
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
8183
8187
|
disabled: disabled
|
|
8184
|
-
})), error && /*#__PURE__*/React__default.createElement(styled$
|
|
8188
|
+
})), error && /*#__PURE__*/React__default.createElement(styled$9.ErrorMessage, {
|
|
8185
8189
|
"data-test": "errorMessage"
|
|
8186
8190
|
}, errorMessage));
|
|
8187
8191
|
}
|
|
@@ -8249,8 +8253,8 @@ var getBorders = function getBorders(value) {
|
|
|
8249
8253
|
return 'initial';
|
|
8250
8254
|
};
|
|
8251
8255
|
|
|
8252
|
-
var styled$
|
|
8253
|
-
ImageWrapper: styled$
|
|
8256
|
+
var styled$8 = {
|
|
8257
|
+
ImageWrapper: styled$j.div.withConfig({
|
|
8254
8258
|
displayName: "styles__ImageWrapper",
|
|
8255
8259
|
componentId: "sc-vrvp1c-0"
|
|
8256
8260
|
})(["width:", ";height:", ";border-radius:", ";", ";overflow:hidden;display:flex;justify-content:center;align-items:center;"], function (_ref) {
|
|
@@ -8266,7 +8270,7 @@ var styled$7 = {
|
|
|
8266
8270
|
var background = _ref4.background;
|
|
8267
8271
|
return background && "background-color: ".concat(background);
|
|
8268
8272
|
}),
|
|
8269
|
-
Image: styled$
|
|
8273
|
+
Image: styled$j.img.withConfig({
|
|
8270
8274
|
displayName: "styles__Image",
|
|
8271
8275
|
componentId: "sc-vrvp1c-1"
|
|
8272
8276
|
})(["width:", ";height:", ";border-radius:", ";"], function (_ref5) {
|
|
@@ -8295,7 +8299,7 @@ var Image = function Image(_ref) {
|
|
|
8295
8299
|
errorImage = _useState2[0],
|
|
8296
8300
|
setErrorImage = _useState2[1];
|
|
8297
8301
|
|
|
8298
|
-
return errorImage ? /*#__PURE__*/React__default.createElement(styled$
|
|
8302
|
+
return errorImage ? /*#__PURE__*/React__default.createElement(styled$8.ImageWrapper, {
|
|
8299
8303
|
background: background,
|
|
8300
8304
|
width: width || height,
|
|
8301
8305
|
height: height || width
|
|
@@ -8303,7 +8307,7 @@ var Image = function Image(_ref) {
|
|
|
8303
8307
|
name: errorImage,
|
|
8304
8308
|
size: (width || height) * 0.35 || 20,
|
|
8305
8309
|
color: palette.lightGreyPressed
|
|
8306
|
-
})) : /*#__PURE__*/React__default.createElement(styled$
|
|
8310
|
+
})) : /*#__PURE__*/React__default.createElement(styled$8.Image, {
|
|
8307
8311
|
src: url,
|
|
8308
8312
|
alt: altText || url,
|
|
8309
8313
|
width: width,
|
|
@@ -9103,8 +9107,8 @@ QRCode.defaultProps = {
|
|
|
9103
9107
|
|
|
9104
9108
|
function u(){return (u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);}return e}).apply(this,arguments)}function c(e,r){if(null==e)return {};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r.indexOf(t=a[n])>=0||(o[t]=e[t]);return o}function i(e){var t=useRef(e),n=useRef(function(e){t.current&&t.current(e);});return t.current=e,n.current}var s=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e<r?r:e},f=function(e){return "touches"in e},v=function(e){return e&&e.ownerDocument.defaultView||self},d=function(e,r,t){var n=e.getBoundingClientRect(),o=f(r)?function(e,r){for(var t=0;t<e.length;t++)if(e[t].identifier===r)return e[t];return e[0]}(r.touches,t):r;return {left:s((o.pageX-(n.left+v(e).pageXOffset))/n.width),top:s((o.pageY-(n.top+v(e).pageYOffset))/n.height)}},h=function(e){!f(e)&&e.preventDefault();},m=React__default.memo(function(o){var a=o.onMove,l=o.onKey,s=c(o,["onMove","onKey"]),m=useRef(null),g=i(a),p=i(l),b=useRef(null),_=useRef(!1),x=useMemo(function(){var e=function(e){h(e),(f(e)?e.touches.length>0:e.buttons>0)&&m.current?g(d(m.current,e,b.current)):t(!1);},r=function(){return t(!1)};function t(t){var n=_.current,o=v(m.current),a=t?o.addEventListener:o.removeEventListener;a(n?"touchmove":"mousemove",e),a(n?"touchend":"mouseup",r);}return [function(e){var r=e.nativeEvent,n=m.current;if(n&&(h(r),!function(e,r){return r&&!f(e)}(r,_.current)&&n)){if(f(r)){_.current=!0;var o=r.changedTouches||[];o.length&&(b.current=o[0].identifier);}n.focus(),g(d(n,r,b.current)),t(!0);}},function(e){var r=e.which||e.keyCode;r<37||r>40||(e.preventDefault(),p({left:39===r?.05:37===r?-.05:0,top:40===r?.05:38===r?-.05:0}));},t]},[p,g]),C=x[0],E=x[1],H=x[2];return useEffect(function(){return H},[H]),React__default.createElement("div",u({},s,{onTouchStart:C,onMouseDown:C,className:"react-colorful__interactive",ref:m,onKeyDown:E,tabIndex:0,role:"slider"}))}),g=function(e){return e.filter(Boolean).join(" ")},p=function(r){var t=r.color,n=r.left,o=r.top,a=void 0===o?.5:o,l=g(["react-colorful__pointer",r.className]);return React__default.createElement("div",{className:l,style:{top:100*a+"%",left:100*n+"%"}},React__default.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},b=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=Math.pow(10,r)),Math.round(t*e)/t},x=function(e){return "#"===e[0]&&(e=e.substr(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}},N=function(e){var r=e.s,t=e.v,n=e.a,o=(200-r)*t/100;return {h:b(e.h),s:b(o>0&&o<200?r*t/100/(o<=100?o:200-o)*100:0),l:b(o/2),a:b(n,2)}},w=function(e){var r=N(e);return "hsl("+r.h+", "+r.s+"%, "+r.l+"%)"},q=function(e){var r=e.h,t=e.s,n=e.v,o=e.a;r=r/360*6,t/=100,n/=100;var a=Math.floor(r),l=n*(1-t),u=n*(1-(r-a)*t),c=n*(1-(1-r+a)*t),i=a%6;return {r:b(255*[n,u,l,l,c,n][i]),g:b(255*[c,n,n,u,l,l][i]),b:b(255*[l,l,c,n,n,u][i]),a:b(o,2)}},z=function(e){var r=e.toString(16);return r.length<2?"0"+r:r},B=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=Math.max(r,t,n),l=a-Math.min(r,t,n),u=l?a===r?(t-n)/l:a===t?2+(n-r)/l:4+(r-t)/l:0;return {h:b(60*(u<0?u+6:u)),s:b(a?l/a*100:0),v:b(a/255*100),a:o}},K=React__default.memo(function(r){var t=r.hue,n=r.onChange,o=g(["react-colorful__hue",r.className]);return React__default.createElement("div",{className:o},React__default.createElement(m,{onMove:function(e){n({h:360*e.left});},onKey:function(e){n({h:s(t+360*e.left,0,360)});},"aria-label":"Hue","aria-valuetext":b(t)},React__default.createElement(p,{className:"react-colorful__hue-pointer",left:t/360,color:w({h:t,s:100,v:100,a:1})})))}),L=React__default.memo(function(r){var t=r.hsva,n=r.onChange,o={backgroundColor:w({h:t.h,s:100,v:100,a:1})};return React__default.createElement("div",{className:"react-colorful__saturation",style:o},React__default.createElement(m,{onMove:function(e){n({s:100*e.left,v:100-100*e.top});},onKey:function(e){n({s:s(t.s+100*e.left,0,100),v:s(t.v-100*e.top,0,100)});},"aria-label":"Color","aria-valuetext":"Saturation "+b(t.s)+"%, Brightness "+b(t.v)+"%"},React__default.createElement(p,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:w(t)})))}),A=function(e,r){if(e===r)return !0;for(var t in e)if(e[t]!==r[t])return !1;return !0};function T(e,t,l){var u=i(l),c=useState(function(){return e.toHsva(t)}),s=c[0],f=c[1],v=useRef({color:t,hsva:s});useEffect(function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r);}},[t,e]),useEffect(function(){var r;A(s,v.current.hsva)||e.equal(r=e.fromHsva(s),v.current.color)||(v.current={hsva:s,color:r},u(r));},[s,e,u]);var d=useCallback(function(e){f(function(r){return Object.assign({},r,e)});},[]);return [s,d]}var P="undefined"!=typeof window?useLayoutEffect:useEffect,X=function(){return ("undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0)},R=new Map,V=function(e){P(function(){var r=e.current?e.current.ownerDocument:document;if(void 0!==r&&!R.has(r)){var t=r.createElement("style");t.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',R.set(r,t);var n=X();n&&t.setAttribute("nonce",n),r.head.appendChild(t);}},[]);},$$4=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,["className","colorModel","color","onChange"]),f=useRef(null);V(f);var v=T(o,l,i),d=v[0],h=v[1],m=g(["react-colorful",n]);return React__default.createElement("div",u({},s,{ref:f,className:m}),React__default.createElement(L,{hsva:d,onChange:h}),React__default.createElement(K,{hue:d.h,onChange:h,className:"react-colorful__last-control"}))},G={defaultColor:"000",toHsva:function(e){return B(x(e))},fromHsva:function(e){return t=(r=q(e)).g,n=r.b,"#"+z(r.r)+z(t)+z(n);var r,t,n;},equal:function(e,r){return e.toLowerCase()===r.toLowerCase()||A(x(e),x(r))}},J=function(r){return React__default.createElement($$4,u({},r,{colorModel:G}))};
|
|
9105
9109
|
|
|
9106
|
-
var styled$
|
|
9107
|
-
ClickableWrapper: styled$
|
|
9110
|
+
var styled$7 = {
|
|
9111
|
+
ClickableWrapper: styled$j.div.withConfig({
|
|
9108
9112
|
displayName: "styles__ClickableWrapper",
|
|
9109
9113
|
componentId: "sc-lreg3c-0"
|
|
9110
9114
|
})(["display:flex;align-items:center;border:none;cursor:pointer;&:before{content:'';z-index:1;display:inline-block;border:1px solid ", ";background-color:", ";border-radius:48%;width:14px;height:14px;margin:7px 4px;position:absolute;margin-bottom:", "px;}"], palette.grey, function (props) {
|
|
@@ -9112,19 +9116,19 @@ var styled$6 = {
|
|
|
9112
9116
|
}, function (props) {
|
|
9113
9117
|
return props.error ? '25' : '7';
|
|
9114
9118
|
}),
|
|
9115
|
-
ClosePickerWrapper: styled$
|
|
9119
|
+
ClosePickerWrapper: styled$j.div.withConfig({
|
|
9116
9120
|
displayName: "styles__ClosePickerWrapper",
|
|
9117
9121
|
componentId: "sc-lreg3c-1"
|
|
9118
9122
|
})(["position:fixed;top:0px;right:0px;bottom:0px;left:0px;"]),
|
|
9119
|
-
Input: styled$
|
|
9123
|
+
Input: styled$j(Input).withConfig({
|
|
9120
9124
|
displayName: "styles__Input",
|
|
9121
9125
|
componentId: "sc-lreg3c-2"
|
|
9122
9126
|
})(["padding-left:26px;"]),
|
|
9123
|
-
PickerWrapper: styled$
|
|
9127
|
+
PickerWrapper: styled$j.div.withConfig({
|
|
9124
9128
|
displayName: "styles__PickerWrapper",
|
|
9125
9129
|
componentId: "sc-lreg3c-3"
|
|
9126
9130
|
})(["position:absolute;top:31px;z-index:2;left:0;margin-top:15px;"]),
|
|
9127
|
-
Wrapper: styled$
|
|
9131
|
+
Wrapper: styled$j.div.withConfig({
|
|
9128
9132
|
displayName: "styles__Wrapper",
|
|
9129
9133
|
componentId: "sc-lreg3c-4"
|
|
9130
9134
|
})(["display:flex;flex-direction:column;width:100%;position:relative;"])
|
|
@@ -9168,13 +9172,13 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
9168
9172
|
var value = colorValue || DEFAULT_COLOR;
|
|
9169
9173
|
|
|
9170
9174
|
if (isCollapsable) {
|
|
9171
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
9175
|
+
return /*#__PURE__*/React__default.createElement(styled$7.Wrapper, null, /*#__PURE__*/React__default.createElement(styled$7.ClickableWrapper, {
|
|
9172
9176
|
"data-test": "collapsible-picker",
|
|
9173
9177
|
color: value,
|
|
9174
9178
|
role: "presentation",
|
|
9175
9179
|
onClick: toggleStateVisible,
|
|
9176
9180
|
error: error
|
|
9177
|
-
}, /*#__PURE__*/React__default.createElement(styled$
|
|
9181
|
+
}, /*#__PURE__*/React__default.createElement(styled$7.Input, {
|
|
9178
9182
|
value: colorValue,
|
|
9179
9183
|
fullWidth: true,
|
|
9180
9184
|
onChange: function onChange(_ref2) {
|
|
@@ -9183,10 +9187,10 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
9183
9187
|
},
|
|
9184
9188
|
errorMessage: errorMessage,
|
|
9185
9189
|
error: error
|
|
9186
|
-
})), pickerVisible && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(styled$
|
|
9190
|
+
})), pickerVisible && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(styled$7.ClosePickerWrapper, {
|
|
9187
9191
|
onClick: handleClosePicker,
|
|
9188
9192
|
role: "presentation"
|
|
9189
|
-
}), /*#__PURE__*/React__default.createElement(styled$
|
|
9193
|
+
}), /*#__PURE__*/React__default.createElement(styled$7.PickerWrapper, null, /*#__PURE__*/React__default.createElement(J, {
|
|
9190
9194
|
color: value,
|
|
9191
9195
|
onChange: change
|
|
9192
9196
|
}))));
|
|
@@ -9550,12 +9554,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
9550
9554
|
|
|
9551
9555
|
var Frame = /*@__PURE__*/getDefaultExportFromCjs(lib$1);
|
|
9552
9556
|
|
|
9553
|
-
var styled$
|
|
9554
|
-
Wrapper: styled$
|
|
9557
|
+
var styled$6 = {
|
|
9558
|
+
Wrapper: styled$j.div.withConfig({
|
|
9555
9559
|
displayName: "styles__Wrapper",
|
|
9556
9560
|
componentId: "sc-3jodl7-0"
|
|
9557
9561
|
})(["display:flex;align-items:center;align-self:center;height:100%;max-height:36px;overflow:hidden;white-space:nowrap;"]),
|
|
9558
|
-
Icon: styled$
|
|
9562
|
+
Icon: styled$j(Icon).withConfig({
|
|
9559
9563
|
displayName: "styles__Icon",
|
|
9560
9564
|
componentId: "sc-3jodl7-1"
|
|
9561
9565
|
})(["margin-right:6px;flex-shrink:0;"])
|
|
@@ -9563,7 +9567,7 @@ var styled$5 = {
|
|
|
9563
9567
|
|
|
9564
9568
|
var DefaultError = function DefaultError(_ref) {
|
|
9565
9569
|
var message = _ref.message;
|
|
9566
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
9570
|
+
return /*#__PURE__*/React__default.createElement(styled$6.Wrapper, null, /*#__PURE__*/React__default.createElement(styled$6.Icon, {
|
|
9567
9571
|
name: "exclamation_circle",
|
|
9568
9572
|
color: "statusRed"
|
|
9569
9573
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -9675,12 +9679,12 @@ HTML.defaultProps = {
|
|
|
9675
9679
|
height: 'medium'
|
|
9676
9680
|
};
|
|
9677
9681
|
|
|
9678
|
-
var styled$
|
|
9679
|
-
LinkWrapper: styled$
|
|
9682
|
+
var styled$5 = {
|
|
9683
|
+
LinkWrapper: styled$j.div.withConfig({
|
|
9680
9684
|
displayName: "styles__LinkWrapper",
|
|
9681
9685
|
componentId: "sc-fhfdft-0"
|
|
9682
9686
|
})(["display:flex;color:", ";align-items:center;font-size:13px;& a{text-decoration:none;color:inherit;}"], getColor('blue')),
|
|
9683
|
-
StyledIcon: styled$
|
|
9687
|
+
StyledIcon: styled$j(Icon).withConfig({
|
|
9684
9688
|
displayName: "styles__StyledIcon",
|
|
9685
9689
|
componentId: "sc-fhfdft-1"
|
|
9686
9690
|
})(["margin-right:8px;"])
|
|
@@ -9696,12 +9700,12 @@ var Link = function Link(_ref) {
|
|
|
9696
9700
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
9697
9701
|
|
|
9698
9702
|
var renderIcon = function renderIcon() {
|
|
9699
|
-
return icon ? /*#__PURE__*/React__default.createElement(styled$
|
|
9703
|
+
return icon ? /*#__PURE__*/React__default.createElement(styled$5.StyledIcon, {
|
|
9700
9704
|
name: icon
|
|
9701
9705
|
}) : null;
|
|
9702
9706
|
};
|
|
9703
9707
|
|
|
9704
|
-
return /*#__PURE__*/React__default.createElement(styled$
|
|
9708
|
+
return /*#__PURE__*/React__default.createElement(styled$5.LinkWrapper, props, renderIcon(), /*#__PURE__*/React__default.createElement("a", {
|
|
9705
9709
|
href: href,
|
|
9706
9710
|
target: target
|
|
9707
9711
|
}, children || href));
|
|
@@ -9778,7 +9782,7 @@ var setPosition = function setPosition(position, open) {
|
|
|
9778
9782
|
return positions[position];
|
|
9779
9783
|
};
|
|
9780
9784
|
|
|
9781
|
-
var Drawer$1 = styled$
|
|
9785
|
+
var Drawer$1 = styled$j.div.withConfig({
|
|
9782
9786
|
displayName: "styles__Drawer",
|
|
9783
9787
|
componentId: "sc-1tz9fgf-0"
|
|
9784
9788
|
})(["box-sizing:border-box;background-color:#ffffff;overflow:hidden;position:absolute;box-shadow:0px 2px 5px 0px #27394727;border-radius:3px;", ";z-index:999;"], function (_ref3) {
|
|
@@ -9788,27 +9792,27 @@ var Drawer$1 = styled$i.div.withConfig({
|
|
|
9788
9792
|
var transitionTime = transitionDuration / 1000;
|
|
9789
9793
|
return css(["", ";", ";"], position && setPosition(position, open), transitionDuration && "transition: ".concat(getPropertyForTransition(position), " ").concat(transitionTime, "s ease"));
|
|
9790
9794
|
});
|
|
9791
|
-
var Content$1 = styled$
|
|
9795
|
+
var Content$1 = styled$j.div.withConfig({
|
|
9792
9796
|
displayName: "styles__Content",
|
|
9793
9797
|
componentId: "sc-1tz9fgf-1"
|
|
9794
9798
|
})(["min-height:300px;min-width:300px;box-sizing:border-box;padding:16px 28px 32px 32px;"]);
|
|
9795
|
-
var Header = styled$
|
|
9799
|
+
var Header = styled$j.div.withConfig({
|
|
9796
9800
|
displayName: "styles__Header",
|
|
9797
9801
|
componentId: "sc-1tz9fgf-2"
|
|
9798
9802
|
})(["display:flex;justify-content:space-between;align-items:center;width:100%;box-sizing:border-box;"]);
|
|
9799
|
-
var CloseBtn = styled$
|
|
9803
|
+
var CloseBtn = styled$j(Button).withConfig({
|
|
9800
9804
|
displayName: "styles__CloseBtn",
|
|
9801
9805
|
componentId: "sc-1tz9fgf-3"
|
|
9802
9806
|
})(["padding:0;background-color:transparent;margin-left:auto;"]);
|
|
9803
|
-
var Children = styled$
|
|
9807
|
+
var Children = styled$j.div.withConfig({
|
|
9804
9808
|
displayName: "styles__Children",
|
|
9805
9809
|
componentId: "sc-1tz9fgf-4"
|
|
9806
9810
|
})(["width:inherit;"]);
|
|
9807
|
-
var Overlay = styled$
|
|
9811
|
+
var Overlay = styled$j.div.withConfig({
|
|
9808
9812
|
displayName: "styles__Overlay",
|
|
9809
9813
|
componentId: "sc-1tz9fgf-5"
|
|
9810
9814
|
})(["position:absolute;width:100%;height:100%;top:0;left:0;visibility:hidden;pointer-events:none;z-index:998;"]);
|
|
9811
|
-
var styled$
|
|
9815
|
+
var styled$4 = {
|
|
9812
9816
|
Drawer: Drawer$1,
|
|
9813
9817
|
Content: Content$1,
|
|
9814
9818
|
Header: Header,
|
|
@@ -9832,16 +9836,16 @@ var Drawer = function Drawer(_ref) {
|
|
|
9832
9836
|
var drawerRef = useRef(null);
|
|
9833
9837
|
return /*#__PURE__*/React__default.createElement(ClickAwayListener, {
|
|
9834
9838
|
onClickAway: closeOnClickAway && open && handleClose
|
|
9835
|
-
}, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(styled$
|
|
9839
|
+
}, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(styled$4.Drawer, _extends$1({
|
|
9836
9840
|
open: open,
|
|
9837
9841
|
position: position,
|
|
9838
9842
|
transitionDuration: transitionDuration,
|
|
9839
9843
|
fullScreen: fullScreen,
|
|
9840
9844
|
className: "drawer",
|
|
9841
9845
|
ref: drawerRef
|
|
9842
|
-
}, props), /*#__PURE__*/React__default.createElement(styled$
|
|
9846
|
+
}, props), /*#__PURE__*/React__default.createElement(styled$4.Content, {
|
|
9843
9847
|
className: "drawer__content"
|
|
9844
|
-
}, /*#__PURE__*/React__default.createElement(styled$
|
|
9848
|
+
}, /*#__PURE__*/React__default.createElement(styled$4.Header, null, handleClose && typeof handleClose === 'function' && /*#__PURE__*/React__default.createElement(styled$4.CloseBtn, {
|
|
9845
9849
|
onClick: handleClose,
|
|
9846
9850
|
type: "button",
|
|
9847
9851
|
rounded: true
|
|
@@ -9850,7 +9854,7 @@ var Drawer = function Drawer(_ref) {
|
|
|
9850
9854
|
name: "cross_light",
|
|
9851
9855
|
width: 24,
|
|
9852
9856
|
height: 24
|
|
9853
|
-
}))), /*#__PURE__*/React__default.createElement(styled$
|
|
9857
|
+
}))), /*#__PURE__*/React__default.createElement(styled$4.Children, null, children))), /*#__PURE__*/React__default.createElement(styled$4.Overlay, {
|
|
9854
9858
|
className: "drawer__overlay",
|
|
9855
9859
|
transitionDuration: transitionDuration
|
|
9856
9860
|
})));
|
|
@@ -15917,11 +15921,11 @@ class Autocomplete extends React.PureComponent {
|
|
|
15917
15921
|
}
|
|
15918
15922
|
Autocomplete.contextType = MapContext;
|
|
15919
15923
|
|
|
15920
|
-
var Content = styled$
|
|
15924
|
+
var Content = styled$j.div.withConfig({
|
|
15921
15925
|
displayName: "styles__Content",
|
|
15922
15926
|
componentId: "sc-1sl7owm-0"
|
|
15923
15927
|
})(["padding:10px;"]);
|
|
15924
|
-
var styled$
|
|
15928
|
+
var styled$3 = {
|
|
15925
15929
|
Content: Content
|
|
15926
15930
|
};
|
|
15927
15931
|
|
|
@@ -15941,7 +15945,7 @@ var InfoWindow = function InfoWindow(_ref) {
|
|
|
15941
15945
|
options: {
|
|
15942
15946
|
pixelOffset: pixelOffset
|
|
15943
15947
|
}
|
|
15944
|
-
}, /*#__PURE__*/React__default.createElement(styled$
|
|
15948
|
+
}, /*#__PURE__*/React__default.createElement(styled$3.Content, _extends$1({
|
|
15945
15949
|
className: "google-map-component__info-window--content"
|
|
15946
15950
|
}, infoWindowHandles), children));
|
|
15947
15951
|
};
|
|
@@ -35452,12 +35456,12 @@ var parsePlaces = (function (places, parsedData) {
|
|
|
35452
35456
|
});
|
|
35453
35457
|
|
|
35454
35458
|
var InfoWindowStyles = createGlobalStyle([".gm-style-iw{&.gm-style-iw-c{padding:0 !important;border-radius:0;border:none;max-height:unset !important;}&-chr{display:none;}&-tc,button.gm-ui-hover-effect{display:none !important;}&-d{overflow:unset !important;max-height:unset !important;}}"]);
|
|
35455
|
-
var styled$
|
|
35456
|
-
LoadingElement: styled$
|
|
35459
|
+
var styled$2 = {
|
|
35460
|
+
LoadingElement: styled$j.div.withConfig({
|
|
35457
35461
|
displayName: "styles__LoadingElement",
|
|
35458
35462
|
componentId: "sc-z1wxm2-0"
|
|
35459
35463
|
})(["height:100%;"]),
|
|
35460
|
-
SearchBoxWrapper: styled$
|
|
35464
|
+
SearchBoxWrapper: styled$j.div.withConfig({
|
|
35461
35465
|
displayName: "styles__SearchBoxWrapper",
|
|
35462
35466
|
componentId: "sc-z1wxm2-1"
|
|
35463
35467
|
})(["z-index:0;position:relative;right:0px;top:0px;background:", ";margin:10px;padding:4px 8px 6px;border-radius:2px;width:auto;box-shadow:rgba(0,0,0,0.3) 0px 1px 4px -1px;"], palette.white)
|
|
@@ -35512,7 +35516,7 @@ var SearchBox = function SearchBox(_ref) {
|
|
|
35512
35516
|
return /*#__PURE__*/React__default.createElement(StandaloneSearchBox, {
|
|
35513
35517
|
onPlacesChanged: onPlacesChanged,
|
|
35514
35518
|
onLoad: onLoad
|
|
35515
|
-
}, /*#__PURE__*/React__default.createElement(styled$
|
|
35519
|
+
}, /*#__PURE__*/React__default.createElement(styled$2.SearchBoxWrapper, null, /*#__PURE__*/React__default.createElement(Input, {
|
|
35516
35520
|
placeholder: "Search",
|
|
35517
35521
|
hasFloatingLabel: false
|
|
35518
35522
|
})));
|
|
@@ -35621,7 +35625,7 @@ var Map$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
35621
35625
|
Map$1.displayName = 'Map';
|
|
35622
35626
|
|
|
35623
35627
|
var rotate = keyframes(["to{transform:rotate(360deg);}"]);
|
|
35624
|
-
var Spinner$1 = styled$
|
|
35628
|
+
var Spinner$1 = styled$j.div.withConfig({
|
|
35625
35629
|
displayName: "styles__Spinner",
|
|
35626
35630
|
componentId: "sc-1e490ps-0"
|
|
35627
35631
|
})(["", ""], function (_ref) {
|
|
@@ -35632,7 +35636,7 @@ var Spinner$1 = styled$i.div.withConfig({
|
|
|
35632
35636
|
backSpinnerColor = _ref.backSpinnerColor;
|
|
35633
35637
|
return css(["width:", "px;height:", "px;border-radius:50%;background-color:transparent;border-top:", "px solid ", ";border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";animation:", " ", "s linear infinite;position:absolute;"], size, size, thickness, getColor(color), thickness, getColor(color), thickness, getColor(color), thickness, getColor(backSpinnerColor), rotate, duration);
|
|
35634
35638
|
});
|
|
35635
|
-
var SpinnerWrapper = styled$
|
|
35639
|
+
var SpinnerWrapper = styled$j.div.withConfig({
|
|
35636
35640
|
displayName: "styles__SpinnerWrapper",
|
|
35637
35641
|
componentId: "sc-1e490ps-1"
|
|
35638
35642
|
})(["position:relative;display:flex;justify-content:center;align-items:center;width:", "px;height:", "px;"], function (_ref2) {
|
|
@@ -35642,7 +35646,7 @@ var SpinnerWrapper = styled$i.div.withConfig({
|
|
|
35642
35646
|
var size = _ref3.size;
|
|
35643
35647
|
return size;
|
|
35644
35648
|
});
|
|
35645
|
-
var CenterContent = styled$
|
|
35649
|
+
var CenterContent = styled$j.div.withConfig({
|
|
35646
35650
|
displayName: "styles__CenterContent",
|
|
35647
35651
|
componentId: "sc-1e490ps-2"
|
|
35648
35652
|
})(["position:absolute;display:flex;justify-content:center;align-items:center;"]);
|
|
@@ -35678,7 +35682,7 @@ var Spinner = function Spinner(_ref) {
|
|
|
35678
35682
|
};
|
|
35679
35683
|
|
|
35680
35684
|
var show = keyframes(["0%{opacity:0;}to{opacity:1;}"]);
|
|
35681
|
-
var Container = styled$
|
|
35685
|
+
var Container = styled$j.section.withConfig({
|
|
35682
35686
|
displayName: "styles__Container",
|
|
35683
35687
|
componentId: "sc-19kt9g-0"
|
|
35684
35688
|
})(["display:flex;justify-content:center;align-items:center;width:100vw;height:100vh;position:fixed;top:0;left:0;background:", ";", ";z-index:100;animation:", " 0.2s ease-in;"], function (_ref) {
|
|
@@ -35688,7 +35692,7 @@ var Container = styled$i.section.withConfig({
|
|
|
35688
35692
|
var effect = _ref2.effect;
|
|
35689
35693
|
return effect && css(effect);
|
|
35690
35694
|
}, show);
|
|
35691
|
-
var LoaderContainer = styled$
|
|
35695
|
+
var LoaderContainer = styled$j.div.withConfig({
|
|
35692
35696
|
displayName: "styles__LoaderContainer",
|
|
35693
35697
|
componentId: "sc-19kt9g-1"
|
|
35694
35698
|
})(["position:relative;display:flex;justify-content:center;align-items:center;width:115px;height:115px;"]);
|
|
@@ -35719,7 +35723,7 @@ var FullLoader = function FullLoader(_ref) {
|
|
|
35719
35723
|
})));
|
|
35720
35724
|
};
|
|
35721
35725
|
|
|
35722
|
-
var Bar = styled$
|
|
35726
|
+
var Bar = styled$j.div.withConfig({
|
|
35723
35727
|
displayName: "styles__Bar",
|
|
35724
35728
|
componentId: "sc-1baov1w-0"
|
|
35725
35729
|
})(["width:100%;height:", ";background-color:", ";border-radius:10px;overflow:hidden;"], function (_ref) {
|
|
@@ -35733,7 +35737,7 @@ var progressAnimation = function progressAnimation() {
|
|
|
35733
35737
|
return keyframes(["0%{transform:scaleX(0);}100%{transform:scaleX(", ");}"], scale);
|
|
35734
35738
|
};
|
|
35735
35739
|
|
|
35736
|
-
var ProgressFill = styled$
|
|
35740
|
+
var ProgressFill = styled$j.div.withConfig({
|
|
35737
35741
|
displayName: "styles__ProgressFill",
|
|
35738
35742
|
componentId: "sc-1baov1w-1"
|
|
35739
35743
|
})(["width:100%;height:100%;transform-origin:left center;background-color:", ";", ""], function (_ref2) {
|
|
@@ -35752,7 +35756,7 @@ var ProgressFill = styled$i.div.withConfig({
|
|
|
35752
35756
|
var scale = value / maxValue;
|
|
35753
35757
|
return animated && isNumber(duration) && duration > 0 ? css(["animation:", " ", " linear forwards;"], progressAnimation(scale), "".concat(duration, "s")) : css(["transform:scaleX(", ");"], scale);
|
|
35754
35758
|
});
|
|
35755
|
-
var styled = {
|
|
35759
|
+
var styled$1 = {
|
|
35756
35760
|
Bar: Bar,
|
|
35757
35761
|
ProgressFill: ProgressFill
|
|
35758
35762
|
};
|
|
@@ -35779,7 +35783,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
35779
35783
|
color = _ref$color === void 0 ? 'blue' : _ref$color;
|
|
35780
35784
|
if (!isValidValue(value) || !isValidMaxValue(maxValue) || value > maxValue) return null;
|
|
35781
35785
|
var progress = Math.max(0, Math.min(maxValue, value));
|
|
35782
|
-
return /*#__PURE__*/React__default.createElement(styled.Bar, {
|
|
35786
|
+
return /*#__PURE__*/React__default.createElement(styled$1.Bar, {
|
|
35783
35787
|
height: height,
|
|
35784
35788
|
role: "progressbar",
|
|
35785
35789
|
"aria-valuemin": 0,
|
|
@@ -35787,7 +35791,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
35787
35791
|
"aria-valuenow": animated ? undefined : Math.round(progress),
|
|
35788
35792
|
"aria-busy": animated || undefined,
|
|
35789
35793
|
"aria-valuetext": animated ? undefined : "".concat(Math.round(progress / maxValue * 100), "%")
|
|
35790
|
-
}, /*#__PURE__*/React__default.createElement(styled.ProgressFill, {
|
|
35794
|
+
}, /*#__PURE__*/React__default.createElement(styled$1.ProgressFill, {
|
|
35791
35795
|
value: progress,
|
|
35792
35796
|
maxValue: maxValue,
|
|
35793
35797
|
animated: animated,
|
|
@@ -35796,5 +35800,147 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
35796
35800
|
}));
|
|
35797
35801
|
};
|
|
35798
35802
|
|
|
35799
|
-
|
|
35803
|
+
var Wrapper = styled$j.div.withConfig({
|
|
35804
|
+
displayName: "styles__Wrapper",
|
|
35805
|
+
componentId: "sc-mlx2bu-0"
|
|
35806
|
+
})(["border-radius:3px;background-color:", ";"], palette.white);
|
|
35807
|
+
var HeaderWrapper = styled$j.div.withConfig({
|
|
35808
|
+
displayName: "styles__HeaderWrapper",
|
|
35809
|
+
componentId: "sc-mlx2bu-1"
|
|
35810
|
+
})(["display:flex;gap:16px;", ";align-items:center;padding:8px 16px;"], function (_ref) {
|
|
35811
|
+
var position = _ref.position;
|
|
35812
|
+
return position === 'right' && 'flex-direction: row-reverse';
|
|
35813
|
+
});
|
|
35814
|
+
var CollapseButton = styled$j(Button).withConfig({
|
|
35815
|
+
displayName: "styles__CollapseButton",
|
|
35816
|
+
componentId: "sc-mlx2bu-2"
|
|
35817
|
+
})(["padding:0;&:hover,&:focus,&:active{background-color:transparent;}"]);
|
|
35818
|
+
var ContentWrapper = styled$j.section.withConfig({
|
|
35819
|
+
displayName: "styles__ContentWrapper",
|
|
35820
|
+
componentId: "sc-mlx2bu-3"
|
|
35821
|
+
})(["padding:16px;border-top:", ";"], function (_ref2) {
|
|
35822
|
+
var contentBorder = _ref2.contentBorder;
|
|
35823
|
+
return "1px solid ".concat(contentBorder ? palette.blue : 'transparent');
|
|
35824
|
+
});
|
|
35825
|
+
var styled = {
|
|
35826
|
+
Wrapper: Wrapper,
|
|
35827
|
+
HeaderWrapper: HeaderWrapper,
|
|
35828
|
+
CollapseButton: CollapseButton,
|
|
35829
|
+
ContentWrapper: ContentWrapper
|
|
35830
|
+
};
|
|
35831
|
+
|
|
35832
|
+
var AVAILABLE_ICONS = ['minus_big_light', 'plus_big_light', 'arrow_down_flat', 'arrow_up_flat'];
|
|
35833
|
+
var DEFAULT_TOGGLE_ICON = {
|
|
35834
|
+
iconNames: {
|
|
35835
|
+
opened: 'minus_big_light',
|
|
35836
|
+
closed: 'plus_big_light'
|
|
35837
|
+
},
|
|
35838
|
+
color: 'blue',
|
|
35839
|
+
position: 'left'
|
|
35840
|
+
};
|
|
35841
|
+
|
|
35842
|
+
var getIcon = function getIcon(iconName) {
|
|
35843
|
+
return AVAILABLE_ICONS.includes(iconName) ? iconName : null;
|
|
35844
|
+
};
|
|
35845
|
+
|
|
35846
|
+
var Collapse = function Collapse(_ref) {
|
|
35847
|
+
var _ref$disabled = _ref.disabled,
|
|
35848
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
35849
|
+
_ref$isOpen = _ref.isOpen,
|
|
35850
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
35851
|
+
renderHeader = _ref.renderHeader,
|
|
35852
|
+
renderContent = _ref.renderContent,
|
|
35853
|
+
_ref$toggleIcon = _ref.toggleIcon,
|
|
35854
|
+
toggleIcon = _ref$toggleIcon === void 0 ? {} : _ref$toggleIcon,
|
|
35855
|
+
_ref$contentBorder = _ref.contentBorder,
|
|
35856
|
+
contentBorder = _ref$contentBorder === void 0 ? true : _ref$contentBorder,
|
|
35857
|
+
_ref$expandStartHandl = _ref.expandStartHandler,
|
|
35858
|
+
expandStartHandler = _ref$expandStartHandl === void 0 ? function () {} : _ref$expandStartHandl,
|
|
35859
|
+
_ref$expandingHandler = _ref.expandingHandler,
|
|
35860
|
+
expandingHandler = _ref$expandingHandler === void 0 ? function () {} : _ref$expandingHandler,
|
|
35861
|
+
_ref$expandEndHandler = _ref.expandEndHandler,
|
|
35862
|
+
expandEndHandler = _ref$expandEndHandler === void 0 ? function () {} : _ref$expandEndHandler,
|
|
35863
|
+
_ref$collapseStartHan = _ref.collapseStartHandler,
|
|
35864
|
+
collapseStartHandler = _ref$collapseStartHan === void 0 ? function () {} : _ref$collapseStartHan,
|
|
35865
|
+
_ref$collapsingHandle = _ref.collapsingHandler,
|
|
35866
|
+
collapsingHandler = _ref$collapsingHandle === void 0 ? function () {} : _ref$collapsingHandle,
|
|
35867
|
+
_ref$collapseEndHandl = _ref.collapseEndHandler,
|
|
35868
|
+
collapseEndHandler = _ref$collapseEndHandl === void 0 ? function () {} : _ref$collapseEndHandl;
|
|
35869
|
+
|
|
35870
|
+
var _useState = useState(isOpen),
|
|
35871
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35872
|
+
isOpenState = _useState2[0],
|
|
35873
|
+
setIsOpenState = _useState2[1];
|
|
35874
|
+
|
|
35875
|
+
var collapseState = useMemo(function () {
|
|
35876
|
+
return {
|
|
35877
|
+
expandStart: expandStartHandler,
|
|
35878
|
+
expanding: expandingHandler,
|
|
35879
|
+
expandEnd: expandEndHandler,
|
|
35880
|
+
collapseStart: collapseStartHandler,
|
|
35881
|
+
collapsing: collapsingHandler,
|
|
35882
|
+
collapseEnd: collapseEndHandler
|
|
35883
|
+
};
|
|
35884
|
+
}, [expandStartHandler, expandingHandler, expandEndHandler, collapseStartHandler, collapsingHandler, collapseEndHandler]);
|
|
35885
|
+
|
|
35886
|
+
var triggerHandler = function triggerHandler(state) {
|
|
35887
|
+
var _collapseState$state;
|
|
35888
|
+
|
|
35889
|
+
return (_collapseState$state = collapseState[state]) === null || _collapseState$state === void 0 ? void 0 : _collapseState$state.call(collapseState);
|
|
35890
|
+
};
|
|
35891
|
+
|
|
35892
|
+
var _useCollapse = useCollapse({
|
|
35893
|
+
isExpanded: isOpenState,
|
|
35894
|
+
onTransitionStateChange: function onTransitionStateChange(state) {
|
|
35895
|
+
return !disabled && triggerHandler(state);
|
|
35896
|
+
}
|
|
35897
|
+
}),
|
|
35898
|
+
getCollapseProps = _useCollapse.getCollapseProps,
|
|
35899
|
+
getToggleProps = _useCollapse.getToggleProps;
|
|
35900
|
+
|
|
35901
|
+
var _DEFAULT_TOGGLE_ICON$ = _objectSpread2(_objectSpread2({}, DEFAULT_TOGGLE_ICON), toggleIcon),
|
|
35902
|
+
_DEFAULT_TOGGLE_ICON$2 = _DEFAULT_TOGGLE_ICON$.iconNames,
|
|
35903
|
+
iconNames = _DEFAULT_TOGGLE_ICON$2 === void 0 ? {} : _DEFAULT_TOGGLE_ICON$2,
|
|
35904
|
+
_DEFAULT_TOGGLE_ICON$3 = _DEFAULT_TOGGLE_ICON$.color,
|
|
35905
|
+
color = _DEFAULT_TOGGLE_ICON$3 === void 0 ? '' : _DEFAULT_TOGGLE_ICON$3,
|
|
35906
|
+
_DEFAULT_TOGGLE_ICON$4 = _DEFAULT_TOGGLE_ICON$.position,
|
|
35907
|
+
position = _DEFAULT_TOGGLE_ICON$4 === void 0 ? '' : _DEFAULT_TOGGLE_ICON$4;
|
|
35908
|
+
|
|
35909
|
+
var handleClick = useCallback(function () {
|
|
35910
|
+
return setIsOpenState(function (prevOpenState) {
|
|
35911
|
+
return !prevOpenState;
|
|
35912
|
+
});
|
|
35913
|
+
}, []);
|
|
35914
|
+
|
|
35915
|
+
var togglePropsParams = _objectSpread2({}, !disabled && {
|
|
35916
|
+
onClick: handleClick
|
|
35917
|
+
});
|
|
35918
|
+
|
|
35919
|
+
var buttonProps = {
|
|
35920
|
+
className: 'collapse__collapseButton',
|
|
35921
|
+
icon: isOpenState ? getIcon(iconNames === null || iconNames === void 0 ? void 0 : iconNames.opened) || 'minus_big_light' : getIcon(iconNames === null || iconNames === void 0 ? void 0 : iconNames.closed) || 'plus_big_light',
|
|
35922
|
+
iconColor: color,
|
|
35923
|
+
disabled: disabled
|
|
35924
|
+
};
|
|
35925
|
+
useEffect(function () {
|
|
35926
|
+
setIsOpenState(isOpen);
|
|
35927
|
+
}, [isOpen]);
|
|
35928
|
+
if (!renderHeader || !isFunction(renderHeader) || !renderContent || !isFunction(renderContent)) return null;
|
|
35929
|
+
return /*#__PURE__*/React__default.createElement(styled.Wrapper, {
|
|
35930
|
+
className: "collapse",
|
|
35931
|
+
isOpen: isOpenState
|
|
35932
|
+
}, /*#__PURE__*/React__default.createElement(styled.HeaderWrapper, _extends$1({
|
|
35933
|
+
className: "collapse__header"
|
|
35934
|
+
}, getToggleProps(togglePropsParams), {
|
|
35935
|
+
isOpen: isOpenState,
|
|
35936
|
+
position: position
|
|
35937
|
+
}), /*#__PURE__*/React__default.createElement(styled.CollapseButton, buttonProps), renderHeader()), /*#__PURE__*/React__default.createElement("div", getCollapseProps(), /*#__PURE__*/React__default.createElement(styled.ContentWrapper, {
|
|
35938
|
+
className: "collapse__content",
|
|
35939
|
+
contentBorder: contentBorder
|
|
35940
|
+
}, renderContent())));
|
|
35941
|
+
};
|
|
35942
|
+
|
|
35943
|
+
var Collapse$1 = /*#__PURE__*/React__default.memo(Collapse);
|
|
35944
|
+
|
|
35945
|
+
export { Avatar, AvatarGroup$1 as AvatarGroup, Button, Checkbox, Chip, ClickAwayListener, Collapse$1 as Collapse, Color, ColorPicker, Drawer, ErrorBoundary, FullLoader, HTML, Icon, Image, Input, Link, Map$1 as Map, ProgressBar, QRCode, Skeleton, Spinner, Switch, Textarea, icons, palette };
|
|
35800
35946
|
//# sourceMappingURL=index.esm.js.map
|