@janiscommerce/ui-web 1.2.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 +19 -0
- package/dist/index.esm.js +283 -124
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +264 -105
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +2 -1
- package/package.json +3 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('styled-components'), require('react-dom')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'styled-components', 'react-dom'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.main = {}, global.React, global.styled$
|
|
5
|
-
})(this, (function (exports, React, styled$
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('styled-components'), require('react-dom'), require('react-collapsed')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', 'styled-components', 'react-dom', 'react-collapsed'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.main = {}, global.React, global.styled$j, global.ReactDOM, global.reactCollapsed));
|
|
5
|
+
})(this, (function (exports, React, styled$j, ReactDOM, reactCollapsed) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
28
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled$
|
|
29
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled$j);
|
|
30
30
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
31
31
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
32
32
|
|
|
@@ -4937,6 +4937,9 @@
|
|
|
4937
4937
|
var isNumber = function isNumber(num) {
|
|
4938
4938
|
return typeof num === 'number' && !Number.isNaN(Number(num));
|
|
4939
4939
|
};
|
|
4940
|
+
var isFunction = function isFunction(value) {
|
|
4941
|
+
return typeof value === 'function';
|
|
4942
|
+
};
|
|
4940
4943
|
|
|
4941
4944
|
var breakpoints = {
|
|
4942
4945
|
values: {
|
|
@@ -4966,25 +4969,25 @@
|
|
|
4966
4969
|
};
|
|
4967
4970
|
var mediaBreaks = {
|
|
4968
4971
|
mobile: function mobile() {
|
|
4969
|
-
return styled$
|
|
4972
|
+
return styled$j.css(["", "{", "}"], devices.mobile, styled$j.css.apply(void 0, arguments));
|
|
4970
4973
|
},
|
|
4971
4974
|
tablet: function tablet() {
|
|
4972
|
-
return styled$
|
|
4975
|
+
return styled$j.css(["", "{", "}"], devices.tablet, styled$j.css.apply(void 0, arguments));
|
|
4973
4976
|
},
|
|
4974
4977
|
tabletLg: function tabletLg() {
|
|
4975
|
-
return styled$
|
|
4978
|
+
return styled$j.css(["", "{", "}"], devices.tabletLg, styled$j.css.apply(void 0, arguments));
|
|
4976
4979
|
},
|
|
4977
4980
|
onlyDesktop: function onlyDesktop() {
|
|
4978
|
-
return styled$
|
|
4981
|
+
return styled$j.css(["", "{", "}"], devices.onlyDesktop, styled$j.css.apply(void 0, arguments));
|
|
4979
4982
|
},
|
|
4980
4983
|
desktopSm: function desktopSm() {
|
|
4981
|
-
return styled$
|
|
4984
|
+
return styled$j.css(["", "{", "}"], devices.desktopSm, styled$j.css.apply(void 0, arguments));
|
|
4982
4985
|
},
|
|
4983
4986
|
desktopLg: function desktopLg() {
|
|
4984
|
-
return styled$
|
|
4987
|
+
return styled$j.css(["", "{", "}"], devices.desktopLg, styled$j.css.apply(void 0, arguments));
|
|
4985
4988
|
},
|
|
4986
4989
|
onlyPrint: function onlyPrint() {
|
|
4987
|
-
return styled$
|
|
4990
|
+
return styled$j.css(["@media print{", "}"], styled$j.css.apply(void 0, arguments));
|
|
4988
4991
|
}
|
|
4989
4992
|
};
|
|
4990
4993
|
|
|
@@ -5317,7 +5320,7 @@
|
|
|
5317
5320
|
width: '100%'
|
|
5318
5321
|
};
|
|
5319
5322
|
|
|
5320
|
-
var styled$
|
|
5323
|
+
var styled$i = {
|
|
5321
5324
|
Image: styled__default["default"].img.withConfig({
|
|
5322
5325
|
displayName: "styles__Image",
|
|
5323
5326
|
componentId: "sc-uljfj3-0"
|
|
@@ -5405,9 +5408,9 @@
|
|
|
5405
5408
|
accelerate: 'cubic-bezier(0.4, 0.0, 1, 1)'
|
|
5406
5409
|
};
|
|
5407
5410
|
var mixins = {
|
|
5408
|
-
flexCenter: styled$
|
|
5411
|
+
flexCenter: styled$j.css(["display:flex;align-items:center;justify-content:center;"]),
|
|
5409
5412
|
placeholder: function placeholder(styles) {
|
|
5410
|
-
return styled$
|
|
5413
|
+
return styled$j.css(["&::-moz-placeholder{", "}&::-webkit-input-placeholder{", "}&:-moz-placeholder{", "}&:-ms-input-placeholder{", "}&::placeholder{", "}"], styles, styles, styles, styles, styles);
|
|
5411
5414
|
},
|
|
5412
5415
|
transition: function transition() {
|
|
5413
5416
|
var property = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
|
|
@@ -5415,14 +5418,14 @@
|
|
|
5415
5418
|
var transitionProperty;
|
|
5416
5419
|
if (property.includes(',')) transitionProperty = "transition-property: ".concat(property);
|
|
5417
5420
|
var transition = "".concat(property.split(',')[0], " ").concat(time, " ").concat(timingFunctions.standard);
|
|
5418
|
-
return styled$
|
|
5421
|
+
return styled$j.css(["transition:", ";", ";"], transition, transitionProperty);
|
|
5419
5422
|
},
|
|
5420
5423
|
scrollbar: function scrollbar(thumbColor, shadowColor) {
|
|
5421
|
-
return styled$
|
|
5424
|
+
return styled$j.css(["&::-webkit-scrollbar{width:5px;}&::-webkit-scrollbar-track{box-shadow:inset 0 0 6px ", ";}&::-webkit-scrollbar-thumb{height:5px;width:4px;border-radius:50px;background-color:", ";}"], shadowColor || palette.white, thumbColor);
|
|
5422
5425
|
}
|
|
5423
5426
|
};
|
|
5424
5427
|
|
|
5425
|
-
var styled$
|
|
5428
|
+
var styled$h = {
|
|
5426
5429
|
Initials: styled__default["default"].div.withConfig({
|
|
5427
5430
|
displayName: "styles__Initials",
|
|
5428
5431
|
componentId: "sc-qlu7od-0"
|
|
@@ -5446,7 +5449,7 @@
|
|
|
5446
5449
|
mainColor = _ref.mainColor,
|
|
5447
5450
|
imageSize = _ref.imageSize,
|
|
5448
5451
|
rounded = _ref.rounded;
|
|
5449
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
5452
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$h.Initials, {
|
|
5450
5453
|
color: mainColor,
|
|
5451
5454
|
size: imageSize,
|
|
5452
5455
|
rounded: rounded
|
|
@@ -5612,7 +5615,7 @@
|
|
|
5612
5615
|
imageSize: imageSize,
|
|
5613
5616
|
rounded: rounded
|
|
5614
5617
|
});
|
|
5615
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
5618
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$i.Image, {
|
|
5616
5619
|
ref: imageRef,
|
|
5617
5620
|
src: url,
|
|
5618
5621
|
alt: "".concat(firstname, " ").concat(lastname),
|
|
@@ -7131,19 +7134,19 @@
|
|
|
7131
7134
|
variant = props.variant;
|
|
7132
7135
|
var variantStyles = {
|
|
7133
7136
|
outlined: function outlined() {
|
|
7134
|
-
return styled$
|
|
7137
|
+
return styled$j.css(["border:1px solid ", ";color:", ";&:hover{background-color:", ";}&:hover .chip-icon,&:hover .delete-button{fill:", ";}&:active{border-color:", ";color:", ";background-color:transparent;}&:active .chip-icon,&:active .delete-button{fill:", ";}"], selected ? palette.blue : '#EAEBED', selected ? palette.blue : palette.black, palette.lightGreyHover, selected ? palette.blue : palette.black, palette.blue, palette.blue, palette.blue);
|
|
7135
7138
|
},
|
|
7136
7139
|
contained: function contained() {
|
|
7137
|
-
return styled$
|
|
7140
|
+
return styled$j.css(["background-color:", ";color:", ";.chip-icon{fill:", ";}.delete-button{fill:", ";}&:hover{background-color:", ";}&:hover .delete-button{fill:", ";}&:active{background-color:", ";color:", ";}&:active .chip-icon,&:active .delete-button{fill:", ";}&:disabled{fill:", ";color:", ";}"], selected ? palette.blue : palette.lightGreyHover, selected ? palette.white : palette.black, selected ? palette.white : palette.black, selected ? palette.white : palette.darkGrey, selected ? palette.blueHover : palette.lightGrey, selected ? palette.white : palette.black, palette.blue, palette.white, palette.white, palette.grey, palette.grey);
|
|
7138
7141
|
},
|
|
7139
7142
|
status: function status() {
|
|
7140
|
-
return styled$
|
|
7143
|
+
return styled$j.css(["background-color:", ";color:", ";font-weight:700;border:none;height:24px;padding:0 17px;line-height:28px;max-width:170px;"], getColor(color || 'grey'), getColor(sizeColor || 'white'));
|
|
7141
7144
|
}
|
|
7142
7145
|
};
|
|
7143
7146
|
return variantStyles[variant] || '';
|
|
7144
7147
|
};
|
|
7145
7148
|
|
|
7146
|
-
var styled$
|
|
7149
|
+
var styled$g = {
|
|
7147
7150
|
Chip: styled__default["default"].button.withConfig({
|
|
7148
7151
|
displayName: "styles__Chip",
|
|
7149
7152
|
componentId: "sc-1vnh4co-0"
|
|
@@ -7201,7 +7204,7 @@
|
|
|
7201
7204
|
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
7202
7205
|
|
|
7203
7206
|
if (!children && !icon) return null;
|
|
7204
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7207
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$g.Chip, _extends$1({
|
|
7205
7208
|
as: props.onClick ? 'button' : 'div',
|
|
7206
7209
|
backgroundColor: backgroundColor,
|
|
7207
7210
|
borderColor: borderColor,
|
|
@@ -7219,7 +7222,7 @@
|
|
|
7219
7222
|
name: icon,
|
|
7220
7223
|
color: iconColor,
|
|
7221
7224
|
size: iconSize
|
|
7222
|
-
}), children && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7225
|
+
}), children && /*#__PURE__*/React__default["default"].createElement(styled$g.Children, null, children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$g.DeleteButton, {
|
|
7223
7226
|
type: "button",
|
|
7224
7227
|
onClick: onDelete
|
|
7225
7228
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
@@ -7241,14 +7244,14 @@
|
|
|
7241
7244
|
hasLink: false
|
|
7242
7245
|
};
|
|
7243
7246
|
|
|
7244
|
-
var styled$
|
|
7247
|
+
var styled$f = {
|
|
7245
7248
|
AvatarGroup: styled__default["default"](Chip).withConfig({
|
|
7246
7249
|
displayName: "styles__AvatarGroup",
|
|
7247
7250
|
componentId: "sc-1jnt2lr-0"
|
|
7248
7251
|
})(["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) {
|
|
7249
7252
|
var showFull = _ref.showFull,
|
|
7250
7253
|
backgroundColor = _ref.backgroundColor;
|
|
7251
|
-
return showFull ? styled$
|
|
7254
|
+
return showFull ? styled$j.css(["height:45px;padding-left:9px;padding-right:9px;max-width:inherit;&:hover,&:active{background:", ";}"], backgroundColor || palette.white) : styled$j.css(["height:33px;padding-left:5px;padding-right:5px;cursor:pointer;"]);
|
|
7252
7255
|
}, function (_ref2) {
|
|
7253
7256
|
var backgroundColor = _ref2.backgroundColor;
|
|
7254
7257
|
return backgroundColor || palette.white;
|
|
@@ -7377,7 +7380,7 @@
|
|
|
7377
7380
|
badgeColor = _ref.badgeColor;
|
|
7378
7381
|
var extraCount = users.length > usersToDisplay ? users.length - usersToDisplay : 0;
|
|
7379
7382
|
var hasExtraCount = extraCount > 0;
|
|
7380
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7383
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$f.AvatarGroup, {
|
|
7381
7384
|
disabled: true,
|
|
7382
7385
|
showFull: showFull
|
|
7383
7386
|
}, /*#__PURE__*/React__default["default"].createElement(AvatarList, {
|
|
@@ -7446,7 +7449,7 @@
|
|
|
7446
7449
|
};
|
|
7447
7450
|
|
|
7448
7451
|
var commonStyles = function commonStyles(iconColor, fontColor, color) {
|
|
7449
|
-
return styled$
|
|
7452
|
+
return styled$j.css(["color:", ";.button-icon{fill:", ";}background:none;&:focus,&:hover{background-color:", ";}&:active{background-color:", ";}&:disabled{color:", ";.button-icon{fill:", ";}}"], getColor(fontColor || color || blue), getColor(iconColor || color || blue), lightGreyHover, lightGrey, grey, grey);
|
|
7450
7453
|
};
|
|
7451
7454
|
|
|
7452
7455
|
var getButtonStyles = function getButtonStyles(_ref) {
|
|
@@ -7456,10 +7459,10 @@
|
|
|
7456
7459
|
iconColor = _ref.iconColor;
|
|
7457
7460
|
var variantStyles = {
|
|
7458
7461
|
contained: function contained() {
|
|
7459
|
-
return styled$
|
|
7462
|
+
return styled$j.css(["color:", ";&:before{background-color:", ";}.button-icon{fill:", ";}&:focus:after,&:hover:after{background-color:", ";}&:active{background-color:", ";}&:disabled{&:before,&:after{background-color:", ";}}"], getColor(fontColor || 'white'), getColor(color), white, getHoverColor(color), getPressedColor(color), grey);
|
|
7460
7463
|
},
|
|
7461
7464
|
outlined: function outlined() {
|
|
7462
|
-
return styled$
|
|
7465
|
+
return styled$j.css(["", ";border:1px solid ", ";"], commonStyles(iconColor, fontColor, color), getColor(grey));
|
|
7463
7466
|
},
|
|
7464
7467
|
cleaned: function cleaned() {
|
|
7465
7468
|
return commonStyles(iconColor, fontColor, color);
|
|
@@ -7468,7 +7471,7 @@
|
|
|
7468
7471
|
return variantStyles[variant] || '';
|
|
7469
7472
|
};
|
|
7470
7473
|
|
|
7471
|
-
var styled$
|
|
7474
|
+
var styled$e = {
|
|
7472
7475
|
Button: styled__default["default"].button.withConfig({
|
|
7473
7476
|
displayName: "styles__Button",
|
|
7474
7477
|
componentId: "sc-buf2do-0"
|
|
@@ -7517,7 +7520,7 @@
|
|
|
7517
7520
|
disabled = _ref.disabled,
|
|
7518
7521
|
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
7519
7522
|
|
|
7520
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7523
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$e.Button, _extends$1({
|
|
7521
7524
|
color: color,
|
|
7522
7525
|
iconColor: iconColor || fontColor,
|
|
7523
7526
|
fontColor: fontColor,
|
|
@@ -7542,7 +7545,7 @@
|
|
|
7542
7545
|
disabled: false
|
|
7543
7546
|
};
|
|
7544
7547
|
|
|
7545
|
-
var styled$
|
|
7548
|
+
var styled$d = {
|
|
7546
7549
|
Container: styled__default["default"].label.withConfig({
|
|
7547
7550
|
displayName: "styles__Container",
|
|
7548
7551
|
componentId: "sc-18bfcwf-0"
|
|
@@ -7559,7 +7562,7 @@
|
|
|
7559
7562
|
displayName: "styles__Input",
|
|
7560
7563
|
componentId: "sc-18bfcwf-1"
|
|
7561
7564
|
})(["opacity:0;position:absolute;cursor:pointer;"]),
|
|
7562
|
-
iconCheckStyles: styled$
|
|
7565
|
+
iconCheckStyles: styled$j.css(["transform:translateY(-5%);fill:", ";", ""], getColor('white'), function (props) {
|
|
7563
7566
|
return !!props.rounded && "\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 1px;\n\t\t";
|
|
7564
7567
|
})
|
|
7565
7568
|
};
|
|
@@ -7589,18 +7592,18 @@
|
|
|
7589
7592
|
|
|
7590
7593
|
var _props$checked = props.checked,
|
|
7591
7594
|
conntroledChecked = _props$checked === void 0 ? checked : _props$checked;
|
|
7592
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7595
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$d.Container, {
|
|
7593
7596
|
checked: conntroledChecked,
|
|
7594
7597
|
rounded: rounded,
|
|
7595
7598
|
styles: styles
|
|
7596
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7599
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$d.Input, _extends$1({}, props, {
|
|
7597
7600
|
type: "checkbox",
|
|
7598
7601
|
disabled: disabled,
|
|
7599
7602
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
7600
7603
|
onChange: handleChange
|
|
7601
7604
|
})), /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
7602
7605
|
name: "check_bold",
|
|
7603
|
-
styles: styled$
|
|
7606
|
+
styles: styled$d.iconCheckStyles,
|
|
7604
7607
|
rounded: rounded
|
|
7605
7608
|
}));
|
|
7606
7609
|
};
|
|
@@ -7612,7 +7615,7 @@
|
|
|
7612
7615
|
}
|
|
7613
7616
|
};
|
|
7614
7617
|
|
|
7615
|
-
var styled$
|
|
7618
|
+
var styled$c = {
|
|
7616
7619
|
Wrapper: styled__default["default"].div.withConfig({
|
|
7617
7620
|
displayName: "styles__Wrapper",
|
|
7618
7621
|
componentId: "sc-zbd85t-0"
|
|
@@ -7636,9 +7639,9 @@
|
|
|
7636
7639
|
showLabel = _ref.showLabel;
|
|
7637
7640
|
if (!color) return null;
|
|
7638
7641
|
var colorCode = getColor(color);
|
|
7639
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7642
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$c.Wrapper, null, /*#__PURE__*/React__default["default"].createElement(styled$c.ColorSample, {
|
|
7640
7643
|
color: colorCode
|
|
7641
|
-
}), showLabel && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7644
|
+
}), showLabel && /*#__PURE__*/React__default["default"].createElement(styled$c.Label, {
|
|
7642
7645
|
color: colorCode
|
|
7643
7646
|
}, colorCode));
|
|
7644
7647
|
};
|
|
@@ -7660,12 +7663,12 @@
|
|
|
7660
7663
|
})(["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) {
|
|
7661
7664
|
return props.checked && "\n\t\t\tleft: 100%;\n\t\t\tmargin-left: -20px;\n\t\t";
|
|
7662
7665
|
});
|
|
7663
|
-
var iconCheckStyles = styled$
|
|
7666
|
+
var iconCheckStyles = styled$j.css(["position:absolute;fill:", ";", ""], function (props) {
|
|
7664
7667
|
return statusColor(props);
|
|
7665
7668
|
}, onlyPrint(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n\t\tfill: ", " !important;\n\t"])), function (props) {
|
|
7666
7669
|
return props.checked ? palette.black : palette.darkGrey;
|
|
7667
7670
|
}));
|
|
7668
|
-
var styled$
|
|
7671
|
+
var styled$b = {
|
|
7669
7672
|
OuterContainer: styled__default["default"].div.withConfig({
|
|
7670
7673
|
displayName: "styles__OuterContainer",
|
|
7671
7674
|
componentId: "sc-rtzdt3-1"
|
|
@@ -7715,10 +7718,10 @@
|
|
|
7715
7718
|
|
|
7716
7719
|
var _props$checked = props.checked,
|
|
7717
7720
|
controledChecked = _props$checked === void 0 ? checked : _props$checked;
|
|
7718
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7721
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$b.OuterContainer, {
|
|
7719
7722
|
disabled: disabled,
|
|
7720
7723
|
checked: checked
|
|
7721
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7724
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$b.Input, {
|
|
7722
7725
|
checked: controledChecked,
|
|
7723
7726
|
id: id,
|
|
7724
7727
|
name: name,
|
|
@@ -7726,10 +7729,10 @@
|
|
|
7726
7729
|
disabled: disabled,
|
|
7727
7730
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
7728
7731
|
onChange: handleChange
|
|
7729
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7732
|
+
}), /*#__PURE__*/React__default["default"].createElement(styled$b.Container, {
|
|
7730
7733
|
checked: controledChecked,
|
|
7731
7734
|
disabled: disabled
|
|
7732
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7735
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$b.Ball, {
|
|
7733
7736
|
checked: controledChecked,
|
|
7734
7737
|
disabled: disabled
|
|
7735
7738
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
@@ -7737,7 +7740,7 @@
|
|
|
7737
7740
|
disabled: disabled,
|
|
7738
7741
|
name: "check_bold",
|
|
7739
7742
|
size: 16,
|
|
7740
|
-
styles: styled$
|
|
7743
|
+
styles: styled$b.iconCheckStyles
|
|
7741
7744
|
}))));
|
|
7742
7745
|
};
|
|
7743
7746
|
|
|
@@ -7819,7 +7822,7 @@
|
|
|
7819
7822
|
return palette.black;
|
|
7820
7823
|
};
|
|
7821
7824
|
|
|
7822
|
-
var styled$
|
|
7825
|
+
var styled$a = {
|
|
7823
7826
|
Container: styled__default["default"].div.withConfig({
|
|
7824
7827
|
displayName: "styles__Container",
|
|
7825
7828
|
componentId: "sc-1fhkfhs-0"
|
|
@@ -7852,7 +7855,7 @@
|
|
|
7852
7855
|
}, function (_ref4) {
|
|
7853
7856
|
var hasIcon = _ref4.hasIcon;
|
|
7854
7857
|
return hasIcon && "padding-left: 32px;";
|
|
7855
|
-
}, mixins.placeholder(styled$
|
|
7858
|
+
}, mixins.placeholder(styled$j.css(["font-weight:400;color:", ";"], function (_ref5) {
|
|
7856
7859
|
var error = _ref5.error;
|
|
7857
7860
|
return error ? palette.statusRed : palette.darkGreyPressed;
|
|
7858
7861
|
})), function (props) {
|
|
@@ -7972,11 +7975,11 @@
|
|
|
7972
7975
|
|
|
7973
7976
|
var autoCompleteOff = props.type === 'password' ? 'new-password' : 'off';
|
|
7974
7977
|
var isFloating = isFocused || !!value.toString();
|
|
7975
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7978
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$a.Container, {
|
|
7976
7979
|
fullWidth: props.fullWidth
|
|
7977
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7980
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$a.Container, {
|
|
7978
7981
|
fullWidth: props.fullWidth
|
|
7979
|
-
}, hasFloatingLabel && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7982
|
+
}, hasFloatingLabel && /*#__PURE__*/React__default["default"].createElement(styled$a.FloatingLabel, {
|
|
7980
7983
|
"data-test": "floatingLabel",
|
|
7981
7984
|
error: error,
|
|
7982
7985
|
onClick: this.handleLabelClick,
|
|
@@ -7985,10 +7988,10 @@
|
|
|
7985
7988
|
isFloating: isFloating,
|
|
7986
7989
|
hasIcon: !!icon,
|
|
7987
7990
|
isTranslateActive: isTranslateActive
|
|
7988
|
-
}, props.label), icon && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7991
|
+
}, props.label), icon && /*#__PURE__*/React__default["default"].createElement(styled$a.InputIcon, {
|
|
7989
7992
|
name: icon,
|
|
7990
7993
|
color: error ? 'statusRed' : 'black'
|
|
7991
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
7994
|
+
}), /*#__PURE__*/React__default["default"].createElement(styled$a.Input, _extends$1({}, props, {
|
|
7992
7995
|
ref: this.input,
|
|
7993
7996
|
placeholder: hasFloatingLabel && !isFloating ? '' : placeholder,
|
|
7994
7997
|
onBlur: this.handleBlur,
|
|
@@ -8001,7 +8004,7 @@
|
|
|
8001
8004
|
error: error,
|
|
8002
8005
|
hasIcon: !!icon,
|
|
8003
8006
|
onAnimationStart: this.handleFocus
|
|
8004
|
-
}))), error && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
8007
|
+
}))), error && /*#__PURE__*/React__default["default"].createElement(styled$a.ErrorMessage, {
|
|
8005
8008
|
"data-test": "errorMessage"
|
|
8006
8009
|
}, errorMessage));
|
|
8007
8010
|
}
|
|
@@ -8047,7 +8050,7 @@
|
|
|
8047
8050
|
return palette.darkGreyPressed;
|
|
8048
8051
|
};
|
|
8049
8052
|
|
|
8050
|
-
var styled$
|
|
8053
|
+
var styled$9 = {
|
|
8051
8054
|
Container: styled__default["default"].div.withConfig({
|
|
8052
8055
|
displayName: "styles__Container",
|
|
8053
8056
|
componentId: "sc-wtau65-0"
|
|
@@ -8059,7 +8062,7 @@
|
|
|
8059
8062
|
componentId: "sc-wtau65-1"
|
|
8060
8063
|
})(["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) {
|
|
8061
8064
|
return props.fullWidth ? '100%' : 'auto';
|
|
8062
|
-
}, mixins.placeholder(styled$
|
|
8065
|
+
}, mixins.placeholder(styled$j.css(["opacity:1;color:", ";"], function (props) {
|
|
8063
8066
|
return placeholderColor(props);
|
|
8064
8067
|
})), mixins.scrollbar(palette.grey, palette.base), palette.black, palette.blue, palette.blue, palette.white, palette.grey, palette.grey, function (props) {
|
|
8065
8068
|
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");
|
|
@@ -8186,9 +8189,9 @@
|
|
|
8186
8189
|
var props = _objectWithoutProperties(_this$props, _excluded$4);
|
|
8187
8190
|
|
|
8188
8191
|
var isFloating = isFocused || !!value;
|
|
8189
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
8192
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$9.Container, {
|
|
8190
8193
|
fullWidth: props.fullWidth
|
|
8191
|
-
}, hasFloatingLabel && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
8194
|
+
}, hasFloatingLabel && /*#__PURE__*/React__default["default"].createElement(styled$9.FloatingLabel, _extends$1({}, props, {
|
|
8192
8195
|
"data-test": "floatingLabel",
|
|
8193
8196
|
error: error,
|
|
8194
8197
|
onClick: this.handleLabelClick,
|
|
@@ -8196,7 +8199,7 @@
|
|
|
8196
8199
|
isFocused: isFocused,
|
|
8197
8200
|
isFloating: isFloating,
|
|
8198
8201
|
isTranslateActive: isTranslateActive
|
|
8199
|
-
}), label), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
8202
|
+
}), label), /*#__PURE__*/React__default["default"].createElement(styled$9.Textarea, _extends$1({}, props, {
|
|
8200
8203
|
ref: this.textarea,
|
|
8201
8204
|
placeholder: hasFloatingLabel && !isFloating ? '' : placeholder,
|
|
8202
8205
|
onBlur: this.handleBlur,
|
|
@@ -8207,7 +8210,7 @@
|
|
|
8207
8210
|
value: value,
|
|
8208
8211
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
8209
8212
|
disabled: disabled
|
|
8210
|
-
})), error && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
8213
|
+
})), error && /*#__PURE__*/React__default["default"].createElement(styled$9.ErrorMessage, {
|
|
8211
8214
|
"data-test": "errorMessage"
|
|
8212
8215
|
}, errorMessage));
|
|
8213
8216
|
}
|
|
@@ -8275,7 +8278,7 @@
|
|
|
8275
8278
|
return 'initial';
|
|
8276
8279
|
};
|
|
8277
8280
|
|
|
8278
|
-
var styled$
|
|
8281
|
+
var styled$8 = {
|
|
8279
8282
|
ImageWrapper: styled__default["default"].div.withConfig({
|
|
8280
8283
|
displayName: "styles__ImageWrapper",
|
|
8281
8284
|
componentId: "sc-vrvp1c-0"
|
|
@@ -8321,7 +8324,7 @@
|
|
|
8321
8324
|
errorImage = _useState2[0],
|
|
8322
8325
|
setErrorImage = _useState2[1];
|
|
8323
8326
|
|
|
8324
|
-
return errorImage ? /*#__PURE__*/React__default["default"].createElement(styled$
|
|
8327
|
+
return errorImage ? /*#__PURE__*/React__default["default"].createElement(styled$8.ImageWrapper, {
|
|
8325
8328
|
background: background,
|
|
8326
8329
|
width: width || height,
|
|
8327
8330
|
height: height || width
|
|
@@ -8329,7 +8332,7 @@
|
|
|
8329
8332
|
name: errorImage,
|
|
8330
8333
|
size: (width || height) * 0.35 || 20,
|
|
8331
8334
|
color: palette.lightGreyPressed
|
|
8332
|
-
})) : /*#__PURE__*/React__default["default"].createElement(styled$
|
|
8335
|
+
})) : /*#__PURE__*/React__default["default"].createElement(styled$8.Image, {
|
|
8333
8336
|
src: url,
|
|
8334
8337
|
alt: altText || url,
|
|
8335
8338
|
width: width,
|
|
@@ -9129,7 +9132,7 @@
|
|
|
9129
9132
|
|
|
9130
9133
|
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=React.useRef(e),n=React.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["default"].memo(function(o){var a=o.onMove,l=o.onKey,s=c(o,["onMove","onKey"]),m=React.useRef(null),g=i(a),p=i(l),b=React.useRef(null),_=React.useRef(!1),x=React.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 React.useEffect(function(){return H},[H]),React__default["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["default"].createElement("div",{className:l,style:{top:100*a+"%",left:100*n+"%"}},React__default["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["default"].memo(function(r){var t=r.hue,n=r.onChange,o=g(["react-colorful__hue",r.className]);return React__default["default"].createElement("div",{className:o},React__default["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["default"].createElement(p,{className:"react-colorful__hue-pointer",left:t/360,color:w({h:t,s:100,v:100,a:1})})))}),L=React__default["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["default"].createElement("div",{className:"react-colorful__saturation",style:o},React__default["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["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=React.useState(function(){return e.toHsva(t)}),s=c[0],f=c[1],v=React.useRef({color:t,hsva:s});React.useEffect(function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r);}},[t,e]),React.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=React.useCallback(function(e){f(function(r){return Object.assign({},r,e)});},[]);return [s,d]}var P="undefined"!=typeof window?React.useLayoutEffect:React.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=React.useRef(null);V(f);var v=T(o,l,i),d=v[0],h=v[1],m=g(["react-colorful",n]);return React__default["default"].createElement("div",u({},s,{ref:f,className:m}),React__default["default"].createElement(L,{hsva:d,onChange:h}),React__default["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["default"].createElement($$4,u({},r,{colorModel:G}))};
|
|
9131
9134
|
|
|
9132
|
-
var styled$
|
|
9135
|
+
var styled$7 = {
|
|
9133
9136
|
ClickableWrapper: styled__default["default"].div.withConfig({
|
|
9134
9137
|
displayName: "styles__ClickableWrapper",
|
|
9135
9138
|
componentId: "sc-lreg3c-0"
|
|
@@ -9194,13 +9197,13 @@
|
|
|
9194
9197
|
var value = colorValue || DEFAULT_COLOR;
|
|
9195
9198
|
|
|
9196
9199
|
if (isCollapsable) {
|
|
9197
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9200
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$7.Wrapper, null, /*#__PURE__*/React__default["default"].createElement(styled$7.ClickableWrapper, {
|
|
9198
9201
|
"data-test": "collapsible-picker",
|
|
9199
9202
|
color: value,
|
|
9200
9203
|
role: "presentation",
|
|
9201
9204
|
onClick: toggleStateVisible,
|
|
9202
9205
|
error: error
|
|
9203
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9206
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$7.Input, {
|
|
9204
9207
|
value: colorValue,
|
|
9205
9208
|
fullWidth: true,
|
|
9206
9209
|
onChange: function onChange(_ref2) {
|
|
@@ -9209,10 +9212,10 @@
|
|
|
9209
9212
|
},
|
|
9210
9213
|
errorMessage: errorMessage,
|
|
9211
9214
|
error: error
|
|
9212
|
-
})), pickerVisible && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9215
|
+
})), pickerVisible && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$7.ClosePickerWrapper, {
|
|
9213
9216
|
onClick: handleClosePicker,
|
|
9214
9217
|
role: "presentation"
|
|
9215
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9218
|
+
}), /*#__PURE__*/React__default["default"].createElement(styled$7.PickerWrapper, null, /*#__PURE__*/React__default["default"].createElement(J, {
|
|
9216
9219
|
color: value,
|
|
9217
9220
|
onChange: change
|
|
9218
9221
|
}))));
|
|
@@ -9576,7 +9579,7 @@
|
|
|
9576
9579
|
|
|
9577
9580
|
var Frame = /*@__PURE__*/getDefaultExportFromCjs(lib$1);
|
|
9578
9581
|
|
|
9579
|
-
var styled$
|
|
9582
|
+
var styled$6 = {
|
|
9580
9583
|
Wrapper: styled__default["default"].div.withConfig({
|
|
9581
9584
|
displayName: "styles__Wrapper",
|
|
9582
9585
|
componentId: "sc-3jodl7-0"
|
|
@@ -9589,7 +9592,7 @@
|
|
|
9589
9592
|
|
|
9590
9593
|
var DefaultError = function DefaultError(_ref) {
|
|
9591
9594
|
var message = _ref.message;
|
|
9592
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9595
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$6.Wrapper, null, /*#__PURE__*/React__default["default"].createElement(styled$6.Icon, {
|
|
9593
9596
|
name: "exclamation_circle",
|
|
9594
9597
|
color: "statusRed"
|
|
9595
9598
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
@@ -9701,7 +9704,7 @@
|
|
|
9701
9704
|
height: 'medium'
|
|
9702
9705
|
};
|
|
9703
9706
|
|
|
9704
|
-
var styled$
|
|
9707
|
+
var styled$5 = {
|
|
9705
9708
|
LinkWrapper: styled__default["default"].div.withConfig({
|
|
9706
9709
|
displayName: "styles__LinkWrapper",
|
|
9707
9710
|
componentId: "sc-fhfdft-0"
|
|
@@ -9722,12 +9725,12 @@
|
|
|
9722
9725
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
9723
9726
|
|
|
9724
9727
|
var renderIcon = function renderIcon() {
|
|
9725
|
-
return icon ? /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9728
|
+
return icon ? /*#__PURE__*/React__default["default"].createElement(styled$5.StyledIcon, {
|
|
9726
9729
|
name: icon
|
|
9727
9730
|
}) : null;
|
|
9728
9731
|
};
|
|
9729
9732
|
|
|
9730
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9733
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$5.LinkWrapper, props, renderIcon(), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
9731
9734
|
href: href,
|
|
9732
9735
|
target: target
|
|
9733
9736
|
}, children || href));
|
|
@@ -9773,14 +9776,14 @@
|
|
|
9773
9776
|
};
|
|
9774
9777
|
|
|
9775
9778
|
var verticalCommonStyles = function verticalCommonStyles(open) {
|
|
9776
|
-
return styled$
|
|
9779
|
+
return styled$j.css(["width:100%;", ";max-height:", ";left:0;right:0;"], function (_ref) {
|
|
9777
9780
|
var fullScreen = _ref.fullScreen;
|
|
9778
9781
|
return fullScreen && 'height: 100%';
|
|
9779
9782
|
}, open ? '100%' : 0);
|
|
9780
9783
|
};
|
|
9781
9784
|
|
|
9782
9785
|
var horizontalCommonStyles = function horizontalCommonStyles(open) {
|
|
9783
|
-
return styled$
|
|
9786
|
+
return styled$j.css(["height:100%;", ";max-width:", ";top:0;"], function (_ref2) {
|
|
9784
9787
|
var fullScreen = _ref2.fullScreen;
|
|
9785
9788
|
return fullScreen && 'width: 100%';
|
|
9786
9789
|
}, open ? '100%' : 0);
|
|
@@ -9789,16 +9792,16 @@
|
|
|
9789
9792
|
var setPosition = function setPosition(position, open) {
|
|
9790
9793
|
var positions = {
|
|
9791
9794
|
top: function top() {
|
|
9792
|
-
return styled$
|
|
9795
|
+
return styled$j.css(["", ";top:0;"], verticalCommonStyles(open));
|
|
9793
9796
|
},
|
|
9794
9797
|
bottom: function bottom() {
|
|
9795
|
-
return styled$
|
|
9798
|
+
return styled$j.css(["", ";bottom:0;"], verticalCommonStyles(open));
|
|
9796
9799
|
},
|
|
9797
9800
|
left: function left() {
|
|
9798
|
-
return styled$
|
|
9801
|
+
return styled$j.css(["", ";left:0;"], horizontalCommonStyles(open));
|
|
9799
9802
|
},
|
|
9800
9803
|
right: function right() {
|
|
9801
|
-
return styled$
|
|
9804
|
+
return styled$j.css(["", ";right:0;"], horizontalCommonStyles(open));
|
|
9802
9805
|
}
|
|
9803
9806
|
};
|
|
9804
9807
|
return positions[position];
|
|
@@ -9812,7 +9815,7 @@
|
|
|
9812
9815
|
open = _ref3.open,
|
|
9813
9816
|
transitionDuration = _ref3.transitionDuration;
|
|
9814
9817
|
var transitionTime = transitionDuration / 1000;
|
|
9815
|
-
return styled$
|
|
9818
|
+
return styled$j.css(["", ";", ";"], position && setPosition(position, open), transitionDuration && "transition: ".concat(getPropertyForTransition(position), " ").concat(transitionTime, "s ease"));
|
|
9816
9819
|
});
|
|
9817
9820
|
var Content$1 = styled__default["default"].div.withConfig({
|
|
9818
9821
|
displayName: "styles__Content",
|
|
@@ -9834,7 +9837,7 @@
|
|
|
9834
9837
|
displayName: "styles__Overlay",
|
|
9835
9838
|
componentId: "sc-1tz9fgf-5"
|
|
9836
9839
|
})(["position:absolute;width:100%;height:100%;top:0;left:0;visibility:hidden;pointer-events:none;z-index:998;"]);
|
|
9837
|
-
var styled$
|
|
9840
|
+
var styled$4 = {
|
|
9838
9841
|
Drawer: Drawer$1,
|
|
9839
9842
|
Content: Content$1,
|
|
9840
9843
|
Header: Header,
|
|
@@ -9858,16 +9861,16 @@
|
|
|
9858
9861
|
var drawerRef = React.useRef(null);
|
|
9859
9862
|
return /*#__PURE__*/React__default["default"].createElement(ClickAwayListener, {
|
|
9860
9863
|
onClickAway: closeOnClickAway && open && handleClose
|
|
9861
|
-
}, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9864
|
+
}, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$4.Drawer, _extends$1({
|
|
9862
9865
|
open: open,
|
|
9863
9866
|
position: position,
|
|
9864
9867
|
transitionDuration: transitionDuration,
|
|
9865
9868
|
fullScreen: fullScreen,
|
|
9866
9869
|
className: "drawer",
|
|
9867
9870
|
ref: drawerRef
|
|
9868
|
-
}, props), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9871
|
+
}, props), /*#__PURE__*/React__default["default"].createElement(styled$4.Content, {
|
|
9869
9872
|
className: "drawer__content"
|
|
9870
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9873
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$4.Header, null, handleClose && typeof handleClose === 'function' && /*#__PURE__*/React__default["default"].createElement(styled$4.CloseBtn, {
|
|
9871
9874
|
onClick: handleClose,
|
|
9872
9875
|
type: "button",
|
|
9873
9876
|
rounded: true
|
|
@@ -9876,7 +9879,7 @@
|
|
|
9876
9879
|
name: "cross_light",
|
|
9877
9880
|
width: 24,
|
|
9878
9881
|
height: 24
|
|
9879
|
-
}))), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
9882
|
+
}))), /*#__PURE__*/React__default["default"].createElement(styled$4.Children, null, children))), /*#__PURE__*/React__default["default"].createElement(styled$4.Overlay, {
|
|
9880
9883
|
className: "drawer__overlay",
|
|
9881
9884
|
transitionDuration: transitionDuration
|
|
9882
9885
|
})));
|
|
@@ -15947,17 +15950,27 @@
|
|
|
15947
15950
|
displayName: "styles__Content",
|
|
15948
15951
|
componentId: "sc-1sl7owm-0"
|
|
15949
15952
|
})(["padding:10px;"]);
|
|
15950
|
-
var styled$
|
|
15953
|
+
var styled$3 = {
|
|
15951
15954
|
Content: Content
|
|
15952
15955
|
};
|
|
15953
15956
|
|
|
15954
15957
|
var InfoWindow = function InfoWindow(_ref) {
|
|
15955
|
-
var
|
|
15956
|
-
|
|
15958
|
+
var data = _ref.data,
|
|
15959
|
+
_ref$infoWindowOption = _ref.infoWindowOptions,
|
|
15960
|
+
infoWindowOptions = _ref$infoWindowOption === void 0 ? {} : _ref$infoWindowOption,
|
|
15961
|
+
infoWindowHandles = _ref.infoWindowHandles,
|
|
15957
15962
|
children = _ref.children;
|
|
15963
|
+
var _infoWindowOptions$in = infoWindowOptions.infoWindowPosition,
|
|
15964
|
+
infoWindowPosition = _infoWindowOptions$in === void 0 ? {} : _infoWindowOptions$in;
|
|
15965
|
+
var pixelOffset = React.useMemo(function () {
|
|
15966
|
+
return new window.google.maps.Size(isNumber(infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.x) ? infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.x : 0, isNumber(infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.y) ? infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.y : -35);
|
|
15967
|
+
}, [infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.x, infoWindowPosition === null || infoWindowPosition === void 0 ? void 0 : infoWindowPosition.y]);
|
|
15958
15968
|
return /*#__PURE__*/React__default["default"].createElement(InfoWindow$1, {
|
|
15959
|
-
position: data
|
|
15960
|
-
|
|
15969
|
+
position: data,
|
|
15970
|
+
options: {
|
|
15971
|
+
pixelOffset: pixelOffset
|
|
15972
|
+
}
|
|
15973
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$3.Content, _extends$1({
|
|
15961
15974
|
className: "google-map-component__info-window--content"
|
|
15962
15975
|
}, infoWindowHandles), children));
|
|
15963
15976
|
};
|
|
@@ -16015,6 +16028,8 @@
|
|
|
16015
16028
|
infoWindowOpen = _ref2.infoWindowOpen;
|
|
16016
16029
|
|
|
16017
16030
|
var infoWindowContent = markerOptions.infoWindowContent,
|
|
16031
|
+
_markerOptions$infoWi = markerOptions.infoWindowOptions,
|
|
16032
|
+
infoWindowOptions = _markerOptions$infoWi === void 0 ? {} : _markerOptions$infoWi,
|
|
16018
16033
|
_markerOptions$onLoad = markerOptions.onLoad,
|
|
16019
16034
|
_onLoad = _markerOptions$onLoad === void 0 ? function () {} : _markerOptions$onLoad,
|
|
16020
16035
|
_markerOptions$onClic = markerOptions.onClick,
|
|
@@ -16143,6 +16158,7 @@
|
|
|
16143
16158
|
}, overlay()), infoWindowOpen && infoWindowContent && /*#__PURE__*/React__default["default"].createElement(InfoWindow, {
|
|
16144
16159
|
className: "google-map-component__info-window",
|
|
16145
16160
|
data: position,
|
|
16161
|
+
infoWindowOptions: infoWindowOptions,
|
|
16146
16162
|
infoWindowHandles: infoWindowHandles
|
|
16147
16163
|
}, infoWindowContent(markerData)));
|
|
16148
16164
|
};
|
|
@@ -35464,8 +35480,8 @@
|
|
|
35464
35480
|
}, _objectSpread2({}, parsedData));
|
|
35465
35481
|
});
|
|
35466
35482
|
|
|
35467
|
-
var InfoWindowStyles = styled$
|
|
35468
|
-
var styled$
|
|
35483
|
+
var InfoWindowStyles = styled$j.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;}}"]);
|
|
35484
|
+
var styled$2 = {
|
|
35469
35485
|
LoadingElement: styled__default["default"].div.withConfig({
|
|
35470
35486
|
displayName: "styles__LoadingElement",
|
|
35471
35487
|
componentId: "sc-z1wxm2-0"
|
|
@@ -35525,7 +35541,7 @@
|
|
|
35525
35541
|
return /*#__PURE__*/React__default["default"].createElement(StandaloneSearchBox, {
|
|
35526
35542
|
onPlacesChanged: onPlacesChanged,
|
|
35527
35543
|
onLoad: onLoad
|
|
35528
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
35544
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$2.SearchBoxWrapper, null, /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
35529
35545
|
placeholder: "Search",
|
|
35530
35546
|
hasFloatingLabel: false
|
|
35531
35547
|
})));
|
|
@@ -35633,7 +35649,7 @@
|
|
|
35633
35649
|
});
|
|
35634
35650
|
Map$1.displayName = 'Map';
|
|
35635
35651
|
|
|
35636
|
-
var rotate = styled$
|
|
35652
|
+
var rotate = styled$j.keyframes(["to{transform:rotate(360deg);}"]);
|
|
35637
35653
|
var Spinner$1 = styled__default["default"].div.withConfig({
|
|
35638
35654
|
displayName: "styles__Spinner",
|
|
35639
35655
|
componentId: "sc-1e490ps-0"
|
|
@@ -35643,7 +35659,7 @@
|
|
|
35643
35659
|
size = _ref.size,
|
|
35644
35660
|
thickness = _ref.thickness,
|
|
35645
35661
|
backSpinnerColor = _ref.backSpinnerColor;
|
|
35646
|
-
return styled$
|
|
35662
|
+
return styled$j.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);
|
|
35647
35663
|
});
|
|
35648
35664
|
var SpinnerWrapper = styled__default["default"].div.withConfig({
|
|
35649
35665
|
displayName: "styles__SpinnerWrapper",
|
|
@@ -35690,7 +35706,7 @@
|
|
|
35690
35706
|
}), children && /*#__PURE__*/React__default["default"].createElement(styles$1.CenterContent, null, children));
|
|
35691
35707
|
};
|
|
35692
35708
|
|
|
35693
|
-
var show = styled$
|
|
35709
|
+
var show = styled$j.keyframes(["0%{opacity:0;}to{opacity:1;}"]);
|
|
35694
35710
|
var Container = styled__default["default"].section.withConfig({
|
|
35695
35711
|
displayName: "styles__Container",
|
|
35696
35712
|
componentId: "sc-19kt9g-0"
|
|
@@ -35699,7 +35715,7 @@
|
|
|
35699
35715
|
return backgroundColor;
|
|
35700
35716
|
}, function (_ref2) {
|
|
35701
35717
|
var effect = _ref2.effect;
|
|
35702
|
-
return effect && styled$
|
|
35718
|
+
return effect && styled$j.css(effect);
|
|
35703
35719
|
}, show);
|
|
35704
35720
|
var LoaderContainer = styled__default["default"].div.withConfig({
|
|
35705
35721
|
displayName: "styles__LoaderContainer",
|
|
@@ -35743,7 +35759,7 @@
|
|
|
35743
35759
|
|
|
35744
35760
|
var progressAnimation = function progressAnimation() {
|
|
35745
35761
|
var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
35746
|
-
return styled$
|
|
35762
|
+
return styled$j.keyframes(["0%{transform:scaleX(0);}100%{transform:scaleX(", ");}"], scale);
|
|
35747
35763
|
};
|
|
35748
35764
|
|
|
35749
35765
|
var ProgressFill = styled__default["default"].div.withConfig({
|
|
@@ -35763,9 +35779,9 @@
|
|
|
35763
35779
|
_ref3$duration = _ref3.duration,
|
|
35764
35780
|
duration = _ref3$duration === void 0 ? 1 : _ref3$duration;
|
|
35765
35781
|
var scale = value / maxValue;
|
|
35766
|
-
return animated && isNumber(duration) && duration > 0 ? styled$
|
|
35782
|
+
return animated && isNumber(duration) && duration > 0 ? styled$j.css(["animation:", " ", " linear forwards;"], progressAnimation(scale), "".concat(duration, "s")) : styled$j.css(["transform:scaleX(", ");"], scale);
|
|
35767
35783
|
});
|
|
35768
|
-
var styled = {
|
|
35784
|
+
var styled$1 = {
|
|
35769
35785
|
Bar: Bar,
|
|
35770
35786
|
ProgressFill: ProgressFill
|
|
35771
35787
|
};
|
|
@@ -35792,7 +35808,7 @@
|
|
|
35792
35808
|
color = _ref$color === void 0 ? 'blue' : _ref$color;
|
|
35793
35809
|
if (!isValidValue(value) || !isValidMaxValue(maxValue) || value > maxValue) return null;
|
|
35794
35810
|
var progress = Math.max(0, Math.min(maxValue, value));
|
|
35795
|
-
return /*#__PURE__*/React__default["default"].createElement(styled.Bar, {
|
|
35811
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$1.Bar, {
|
|
35796
35812
|
height: height,
|
|
35797
35813
|
role: "progressbar",
|
|
35798
35814
|
"aria-valuemin": 0,
|
|
@@ -35800,7 +35816,7 @@
|
|
|
35800
35816
|
"aria-valuenow": animated ? undefined : Math.round(progress),
|
|
35801
35817
|
"aria-busy": animated || undefined,
|
|
35802
35818
|
"aria-valuetext": animated ? undefined : "".concat(Math.round(progress / maxValue * 100), "%")
|
|
35803
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled.ProgressFill, {
|
|
35819
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$1.ProgressFill, {
|
|
35804
35820
|
value: progress,
|
|
35805
35821
|
maxValue: maxValue,
|
|
35806
35822
|
animated: animated,
|
|
@@ -35809,12 +35825,155 @@
|
|
|
35809
35825
|
}));
|
|
35810
35826
|
};
|
|
35811
35827
|
|
|
35828
|
+
var Wrapper = styled__default["default"].div.withConfig({
|
|
35829
|
+
displayName: "styles__Wrapper",
|
|
35830
|
+
componentId: "sc-mlx2bu-0"
|
|
35831
|
+
})(["border-radius:3px;background-color:", ";"], palette.white);
|
|
35832
|
+
var HeaderWrapper = styled__default["default"].div.withConfig({
|
|
35833
|
+
displayName: "styles__HeaderWrapper",
|
|
35834
|
+
componentId: "sc-mlx2bu-1"
|
|
35835
|
+
})(["display:flex;gap:16px;", ";align-items:center;padding:8px 16px;"], function (_ref) {
|
|
35836
|
+
var position = _ref.position;
|
|
35837
|
+
return position === 'right' && 'flex-direction: row-reverse';
|
|
35838
|
+
});
|
|
35839
|
+
var CollapseButton = styled__default["default"](Button).withConfig({
|
|
35840
|
+
displayName: "styles__CollapseButton",
|
|
35841
|
+
componentId: "sc-mlx2bu-2"
|
|
35842
|
+
})(["padding:0;&:hover,&:focus,&:active{background-color:transparent;}"]);
|
|
35843
|
+
var ContentWrapper = styled__default["default"].section.withConfig({
|
|
35844
|
+
displayName: "styles__ContentWrapper",
|
|
35845
|
+
componentId: "sc-mlx2bu-3"
|
|
35846
|
+
})(["padding:16px;border-top:", ";"], function (_ref2) {
|
|
35847
|
+
var contentBorder = _ref2.contentBorder;
|
|
35848
|
+
return "1px solid ".concat(contentBorder ? palette.blue : 'transparent');
|
|
35849
|
+
});
|
|
35850
|
+
var styled = {
|
|
35851
|
+
Wrapper: Wrapper,
|
|
35852
|
+
HeaderWrapper: HeaderWrapper,
|
|
35853
|
+
CollapseButton: CollapseButton,
|
|
35854
|
+
ContentWrapper: ContentWrapper
|
|
35855
|
+
};
|
|
35856
|
+
|
|
35857
|
+
var AVAILABLE_ICONS = ['minus_big_light', 'plus_big_light', 'arrow_down_flat', 'arrow_up_flat'];
|
|
35858
|
+
var DEFAULT_TOGGLE_ICON = {
|
|
35859
|
+
iconNames: {
|
|
35860
|
+
opened: 'minus_big_light',
|
|
35861
|
+
closed: 'plus_big_light'
|
|
35862
|
+
},
|
|
35863
|
+
color: 'blue',
|
|
35864
|
+
position: 'left'
|
|
35865
|
+
};
|
|
35866
|
+
|
|
35867
|
+
var getIcon = function getIcon(iconName) {
|
|
35868
|
+
return AVAILABLE_ICONS.includes(iconName) ? iconName : null;
|
|
35869
|
+
};
|
|
35870
|
+
|
|
35871
|
+
var Collapse = function Collapse(_ref) {
|
|
35872
|
+
var _ref$disabled = _ref.disabled,
|
|
35873
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
35874
|
+
_ref$isOpen = _ref.isOpen,
|
|
35875
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
35876
|
+
renderHeader = _ref.renderHeader,
|
|
35877
|
+
renderContent = _ref.renderContent,
|
|
35878
|
+
_ref$toggleIcon = _ref.toggleIcon,
|
|
35879
|
+
toggleIcon = _ref$toggleIcon === void 0 ? {} : _ref$toggleIcon,
|
|
35880
|
+
_ref$contentBorder = _ref.contentBorder,
|
|
35881
|
+
contentBorder = _ref$contentBorder === void 0 ? true : _ref$contentBorder,
|
|
35882
|
+
_ref$expandStartHandl = _ref.expandStartHandler,
|
|
35883
|
+
expandStartHandler = _ref$expandStartHandl === void 0 ? function () {} : _ref$expandStartHandl,
|
|
35884
|
+
_ref$expandingHandler = _ref.expandingHandler,
|
|
35885
|
+
expandingHandler = _ref$expandingHandler === void 0 ? function () {} : _ref$expandingHandler,
|
|
35886
|
+
_ref$expandEndHandler = _ref.expandEndHandler,
|
|
35887
|
+
expandEndHandler = _ref$expandEndHandler === void 0 ? function () {} : _ref$expandEndHandler,
|
|
35888
|
+
_ref$collapseStartHan = _ref.collapseStartHandler,
|
|
35889
|
+
collapseStartHandler = _ref$collapseStartHan === void 0 ? function () {} : _ref$collapseStartHan,
|
|
35890
|
+
_ref$collapsingHandle = _ref.collapsingHandler,
|
|
35891
|
+
collapsingHandler = _ref$collapsingHandle === void 0 ? function () {} : _ref$collapsingHandle,
|
|
35892
|
+
_ref$collapseEndHandl = _ref.collapseEndHandler,
|
|
35893
|
+
collapseEndHandler = _ref$collapseEndHandl === void 0 ? function () {} : _ref$collapseEndHandl;
|
|
35894
|
+
|
|
35895
|
+
var _useState = React.useState(isOpen),
|
|
35896
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35897
|
+
isOpenState = _useState2[0],
|
|
35898
|
+
setIsOpenState = _useState2[1];
|
|
35899
|
+
|
|
35900
|
+
var collapseState = React.useMemo(function () {
|
|
35901
|
+
return {
|
|
35902
|
+
expandStart: expandStartHandler,
|
|
35903
|
+
expanding: expandingHandler,
|
|
35904
|
+
expandEnd: expandEndHandler,
|
|
35905
|
+
collapseStart: collapseStartHandler,
|
|
35906
|
+
collapsing: collapsingHandler,
|
|
35907
|
+
collapseEnd: collapseEndHandler
|
|
35908
|
+
};
|
|
35909
|
+
}, [expandStartHandler, expandingHandler, expandEndHandler, collapseStartHandler, collapsingHandler, collapseEndHandler]);
|
|
35910
|
+
|
|
35911
|
+
var triggerHandler = function triggerHandler(state) {
|
|
35912
|
+
var _collapseState$state;
|
|
35913
|
+
|
|
35914
|
+
return (_collapseState$state = collapseState[state]) === null || _collapseState$state === void 0 ? void 0 : _collapseState$state.call(collapseState);
|
|
35915
|
+
};
|
|
35916
|
+
|
|
35917
|
+
var _useCollapse = reactCollapsed.useCollapse({
|
|
35918
|
+
isExpanded: isOpenState,
|
|
35919
|
+
onTransitionStateChange: function onTransitionStateChange(state) {
|
|
35920
|
+
return !disabled && triggerHandler(state);
|
|
35921
|
+
}
|
|
35922
|
+
}),
|
|
35923
|
+
getCollapseProps = _useCollapse.getCollapseProps,
|
|
35924
|
+
getToggleProps = _useCollapse.getToggleProps;
|
|
35925
|
+
|
|
35926
|
+
var _DEFAULT_TOGGLE_ICON$ = _objectSpread2(_objectSpread2({}, DEFAULT_TOGGLE_ICON), toggleIcon),
|
|
35927
|
+
_DEFAULT_TOGGLE_ICON$2 = _DEFAULT_TOGGLE_ICON$.iconNames,
|
|
35928
|
+
iconNames = _DEFAULT_TOGGLE_ICON$2 === void 0 ? {} : _DEFAULT_TOGGLE_ICON$2,
|
|
35929
|
+
_DEFAULT_TOGGLE_ICON$3 = _DEFAULT_TOGGLE_ICON$.color,
|
|
35930
|
+
color = _DEFAULT_TOGGLE_ICON$3 === void 0 ? '' : _DEFAULT_TOGGLE_ICON$3,
|
|
35931
|
+
_DEFAULT_TOGGLE_ICON$4 = _DEFAULT_TOGGLE_ICON$.position,
|
|
35932
|
+
position = _DEFAULT_TOGGLE_ICON$4 === void 0 ? '' : _DEFAULT_TOGGLE_ICON$4;
|
|
35933
|
+
|
|
35934
|
+
var handleClick = React.useCallback(function () {
|
|
35935
|
+
return setIsOpenState(function (prevOpenState) {
|
|
35936
|
+
return !prevOpenState;
|
|
35937
|
+
});
|
|
35938
|
+
}, []);
|
|
35939
|
+
|
|
35940
|
+
var togglePropsParams = _objectSpread2({}, !disabled && {
|
|
35941
|
+
onClick: handleClick
|
|
35942
|
+
});
|
|
35943
|
+
|
|
35944
|
+
var buttonProps = {
|
|
35945
|
+
className: 'collapse__collapseButton',
|
|
35946
|
+
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',
|
|
35947
|
+
iconColor: color,
|
|
35948
|
+
disabled: disabled
|
|
35949
|
+
};
|
|
35950
|
+
React.useEffect(function () {
|
|
35951
|
+
setIsOpenState(isOpen);
|
|
35952
|
+
}, [isOpen]);
|
|
35953
|
+
if (!renderHeader || !isFunction(renderHeader) || !renderContent || !isFunction(renderContent)) return null;
|
|
35954
|
+
return /*#__PURE__*/React__default["default"].createElement(styled.Wrapper, {
|
|
35955
|
+
className: "collapse",
|
|
35956
|
+
isOpen: isOpenState
|
|
35957
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled.HeaderWrapper, _extends$1({
|
|
35958
|
+
className: "collapse__header"
|
|
35959
|
+
}, getToggleProps(togglePropsParams), {
|
|
35960
|
+
isOpen: isOpenState,
|
|
35961
|
+
position: position
|
|
35962
|
+
}), /*#__PURE__*/React__default["default"].createElement(styled.CollapseButton, buttonProps), renderHeader()), /*#__PURE__*/React__default["default"].createElement("div", getCollapseProps(), /*#__PURE__*/React__default["default"].createElement(styled.ContentWrapper, {
|
|
35963
|
+
className: "collapse__content",
|
|
35964
|
+
contentBorder: contentBorder
|
|
35965
|
+
}, renderContent())));
|
|
35966
|
+
};
|
|
35967
|
+
|
|
35968
|
+
var Collapse$1 = /*#__PURE__*/React__default["default"].memo(Collapse);
|
|
35969
|
+
|
|
35812
35970
|
exports.Avatar = Avatar;
|
|
35813
35971
|
exports.AvatarGroup = AvatarGroup$1;
|
|
35814
35972
|
exports.Button = Button;
|
|
35815
35973
|
exports.Checkbox = Checkbox;
|
|
35816
35974
|
exports.Chip = Chip;
|
|
35817
35975
|
exports.ClickAwayListener = ClickAwayListener;
|
|
35976
|
+
exports.Collapse = Collapse$1;
|
|
35818
35977
|
exports.Color = Color;
|
|
35819
35978
|
exports.ColorPicker = ColorPicker;
|
|
35820
35979
|
exports.Drawer = Drawer;
|