@janiscommerce/ui-web 0.1.1 → 0.2.1
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/index.umd.js +89 -108
- package/index.umd.js.map +1 -1
- package/package.json +2 -3
package/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('react-
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.main = {}, global.React, global.
|
|
5
|
-
})(this, (function (exports, React,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.main = {}, global.React, global.require$$1));
|
|
5
|
+
})(this, (function (exports, React, require$$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -20244,7 +20244,7 @@
|
|
|
20244
20244
|
}, function (props) {
|
|
20245
20245
|
return props.hasText ? '50px' : '50%';
|
|
20246
20246
|
}, function (props) {
|
|
20247
|
-
return props.clickable || props.
|
|
20247
|
+
return props.clickable || props.hasLink ? 'auto' : 'none';
|
|
20248
20248
|
}, function (props) {
|
|
20249
20249
|
return props.hasText && '8px';
|
|
20250
20250
|
}, function (props) {
|
|
@@ -20282,62 +20282,7 @@
|
|
|
20282
20282
|
})(["text-overflow:ellipsis;overflow:hidden;"])
|
|
20283
20283
|
};
|
|
20284
20284
|
|
|
20285
|
-
var
|
|
20286
|
-
LinkWrapper: styled$a.div.withConfig({
|
|
20287
|
-
displayName: "styles__LinkWrapper",
|
|
20288
|
-
componentId: "sc-fhfdft-0"
|
|
20289
|
-
})(["display:flex;color:", ";align-items:center;font-size:13px;& a{text-decoration:none;color:inherit;}"], getColor$1('blue')),
|
|
20290
|
-
StyledIcon: styled$a(Icon).withConfig({
|
|
20291
|
-
displayName: "styles__StyledIcon",
|
|
20292
|
-
componentId: "sc-fhfdft-1"
|
|
20293
|
-
})(["margin-right:8px;"])
|
|
20294
|
-
};
|
|
20295
|
-
|
|
20296
|
-
var _excluded$4 = ["href", "children", "target", "icon"];
|
|
20297
|
-
|
|
20298
|
-
var Link = function Link(_ref) {
|
|
20299
|
-
var href = _ref.href,
|
|
20300
|
-
children = _ref.children,
|
|
20301
|
-
target = _ref.target,
|
|
20302
|
-
icon = _ref.icon,
|
|
20303
|
-
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
20304
|
-
|
|
20305
|
-
var origin = window.location.origin;
|
|
20306
|
-
var internalLink = !href.startsWith('http');
|
|
20307
|
-
|
|
20308
|
-
var renderIcon = function renderIcon() {
|
|
20309
|
-
return icon ? /*#__PURE__*/React__default["default"].createElement(styled$7.StyledIcon, {
|
|
20310
|
-
name: icon
|
|
20311
|
-
}) : null;
|
|
20312
|
-
};
|
|
20313
|
-
|
|
20314
|
-
if ((internalLink || href.includes("".concat(origin))) && target === '_self') {
|
|
20315
|
-
var path;
|
|
20316
|
-
|
|
20317
|
-
if (internalLink) {
|
|
20318
|
-
path = href.startsWith('/') ? href : "/".concat(href);
|
|
20319
|
-
} else {
|
|
20320
|
-
path = href.replace("".concat(origin), '');
|
|
20321
|
-
}
|
|
20322
|
-
|
|
20323
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$7.LinkWrapper, props, renderIcon(), /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
20324
|
-
to: path,
|
|
20325
|
-
"data-test": "react-router-link"
|
|
20326
|
-
}, children || href));
|
|
20327
|
-
}
|
|
20328
|
-
|
|
20329
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$7.LinkWrapper, props, renderIcon(), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
20330
|
-
href: href,
|
|
20331
|
-
target: target
|
|
20332
|
-
}, children || href));
|
|
20333
|
-
};
|
|
20334
|
-
|
|
20335
|
-
Link.defaultProps = {
|
|
20336
|
-
href: '',
|
|
20337
|
-
target: '_self'
|
|
20338
|
-
};
|
|
20339
|
-
|
|
20340
|
-
var _excluded$3 = ["backgroundColor", "borderColor", "children", "disabled", "icon", "iconColor", "onClick", "onDelete", "selected", "styles", "textColor", "variant", "linkField", "data"];
|
|
20285
|
+
var _excluded$4 = ["backgroundColor", "borderColor", "children", "disabled", "icon", "iconColor", "onClick", "onDelete", "selected", "styles", "textColor", "variant", "hasLink"];
|
|
20341
20286
|
|
|
20342
20287
|
var Chip = function Chip(_ref) {
|
|
20343
20288
|
var backgroundColor = _ref.backgroundColor,
|
|
@@ -20352,11 +20297,9 @@
|
|
|
20352
20297
|
styles = _ref.styles,
|
|
20353
20298
|
textColor = _ref.textColor,
|
|
20354
20299
|
variant = _ref.variant,
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
20300
|
+
hasLink = _ref.hasLink,
|
|
20301
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
20358
20302
|
|
|
20359
|
-
var linkForHref = linkField && data[linkField];
|
|
20360
20303
|
return /*#__PURE__*/React__default["default"].createElement(styled$8.Chip, _extends$1({
|
|
20361
20304
|
as: props.onClick ? 'button' : 'div',
|
|
20362
20305
|
backgroundColor: backgroundColor,
|
|
@@ -20371,15 +20314,13 @@
|
|
|
20371
20314
|
textColor: textColor,
|
|
20372
20315
|
variant: variant,
|
|
20373
20316
|
iconColor: iconColor,
|
|
20374
|
-
|
|
20317
|
+
hasLink: hasLink
|
|
20375
20318
|
}, props), icon && /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
20376
20319
|
className: "chip-icon",
|
|
20377
20320
|
name: icon,
|
|
20378
20321
|
color: iconColor,
|
|
20379
20322
|
pathStyles: styled$8.iconPathStyles
|
|
20380
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$8.Children, null,
|
|
20381
|
-
href: linkForHref
|
|
20382
|
-
}, children) : children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$8.DeleteButton, {
|
|
20323
|
+
}), /*#__PURE__*/React__default["default"].createElement(styled$8.Children, null, children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$8.DeleteButton, {
|
|
20383
20324
|
type: "button",
|
|
20384
20325
|
onClick: onDelete
|
|
20385
20326
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
@@ -20399,11 +20340,10 @@
|
|
|
20399
20340
|
selected: false,
|
|
20400
20341
|
textColor: '',
|
|
20401
20342
|
variant: 'outlined',
|
|
20402
|
-
|
|
20403
|
-
data: {}
|
|
20343
|
+
hasLink: false
|
|
20404
20344
|
};
|
|
20405
20345
|
|
|
20406
|
-
var styled$
|
|
20346
|
+
var styled$7 = {
|
|
20407
20347
|
Wrapper: styled$a.div.withConfig({
|
|
20408
20348
|
displayName: "styles__Wrapper",
|
|
20409
20349
|
componentId: "sc-zbd85t-0"
|
|
@@ -20437,9 +20377,9 @@
|
|
|
20437
20377
|
showLabel = _ref.showLabel;
|
|
20438
20378
|
if (!color) return null;
|
|
20439
20379
|
var colorCode = getColor$1(color);
|
|
20440
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20380
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$7.Wrapper, null, /*#__PURE__*/React__default["default"].createElement(styled$7.ColorSample, {
|
|
20441
20381
|
color: colorCode
|
|
20442
|
-
}), showLabel && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20382
|
+
}), showLabel && /*#__PURE__*/React__default["default"].createElement(styled$7.Label, {
|
|
20443
20383
|
color: colorCode
|
|
20444
20384
|
}, colorCode));
|
|
20445
20385
|
};
|
|
@@ -20476,7 +20416,7 @@
|
|
|
20476
20416
|
}, onlyPrint(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n\t\tfill: ", " !important;\n\t"])), function (props) {
|
|
20477
20417
|
return props.checked ? palette.black : palette.darkGrey;
|
|
20478
20418
|
}));
|
|
20479
|
-
var styled$
|
|
20419
|
+
var styled$6 = {
|
|
20480
20420
|
OuterContainer: styled$a.div.withConfig({
|
|
20481
20421
|
displayName: "styles__OuterContainer",
|
|
20482
20422
|
componentId: "sc-rtzdt3-1"
|
|
@@ -20501,7 +20441,7 @@
|
|
|
20501
20441
|
iconCheckStyles: iconCheckStyles
|
|
20502
20442
|
};
|
|
20503
20443
|
|
|
20504
|
-
var _excluded$
|
|
20444
|
+
var _excluded$3 = ["autoComplete", "defaultChecked", "disabled", "id", "name", "onChange", "value"];
|
|
20505
20445
|
|
|
20506
20446
|
var Switch = function Switch(_ref) {
|
|
20507
20447
|
var autoComplete = _ref.autoComplete,
|
|
@@ -20511,7 +20451,7 @@
|
|
|
20511
20451
|
name = _ref.name,
|
|
20512
20452
|
onChange = _ref.onChange,
|
|
20513
20453
|
value = _ref.value,
|
|
20514
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
20454
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
20515
20455
|
|
|
20516
20456
|
var _useState = React.useState(!!value || defaultChecked),
|
|
20517
20457
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -20526,10 +20466,10 @@
|
|
|
20526
20466
|
|
|
20527
20467
|
var _props$checked = props.checked,
|
|
20528
20468
|
controledChecked = _props$checked === void 0 ? checked : _props$checked;
|
|
20529
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20469
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$6.OuterContainer, {
|
|
20530
20470
|
disabled: disabled,
|
|
20531
20471
|
checked: checked
|
|
20532
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20472
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$6.Input, {
|
|
20533
20473
|
checked: controledChecked,
|
|
20534
20474
|
id: id,
|
|
20535
20475
|
name: name,
|
|
@@ -20537,10 +20477,10 @@
|
|
|
20537
20477
|
disabled: disabled,
|
|
20538
20478
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
20539
20479
|
onChange: handleChange
|
|
20540
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20480
|
+
}), /*#__PURE__*/React__default["default"].createElement(styled$6.Container, {
|
|
20541
20481
|
checked: controledChecked,
|
|
20542
20482
|
disabled: disabled
|
|
20543
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20483
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$6.Ball, {
|
|
20544
20484
|
checked: controledChecked,
|
|
20545
20485
|
disabled: disabled
|
|
20546
20486
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
@@ -20548,7 +20488,7 @@
|
|
|
20548
20488
|
disabled: disabled,
|
|
20549
20489
|
name: "check_bold",
|
|
20550
20490
|
size: 16,
|
|
20551
|
-
styles: styled$
|
|
20491
|
+
styles: styled$6.iconCheckStyles
|
|
20552
20492
|
}))));
|
|
20553
20493
|
};
|
|
20554
20494
|
|
|
@@ -20622,7 +20562,7 @@
|
|
|
20622
20562
|
}
|
|
20623
20563
|
};
|
|
20624
20564
|
|
|
20625
|
-
var styled$
|
|
20565
|
+
var styled$5 = {
|
|
20626
20566
|
Container: styled$a.div.withConfig({
|
|
20627
20567
|
displayName: "styles__Container",
|
|
20628
20568
|
componentId: "sc-1fhkfhs-0"
|
|
@@ -20675,7 +20615,7 @@
|
|
|
20675
20615
|
})(["position:absolute;flex-shrink:0;flex-grow:0;margin-right:8px;height:100%;"])
|
|
20676
20616
|
};
|
|
20677
20617
|
|
|
20678
|
-
var _excluded$
|
|
20618
|
+
var _excluded$2 = ["icon", "error", "disabled", "placeholder", "errorMessage", "autoComplete", "hasFloatingLabel", "value", "isTranslateActive", "defaultValue"];
|
|
20679
20619
|
|
|
20680
20620
|
var Input = /*#__PURE__*/function (_PureComponent) {
|
|
20681
20621
|
_inherits$2(Input, _PureComponent);
|
|
@@ -20771,15 +20711,15 @@
|
|
|
20771
20711
|
value = _this$props$value === void 0 ? stateValue : _this$props$value,
|
|
20772
20712
|
isTranslateActive = _this$props.isTranslateActive;
|
|
20773
20713
|
_this$props.defaultValue;
|
|
20774
|
-
var props = _objectWithoutProperties(_this$props, _excluded$
|
|
20714
|
+
var props = _objectWithoutProperties(_this$props, _excluded$2);
|
|
20775
20715
|
|
|
20776
20716
|
var autoCompleteOff = props.type === 'password' ? 'new-password' : 'off';
|
|
20777
20717
|
var isFloating = isFocused || !!value.toString();
|
|
20778
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20718
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$5.Container, {
|
|
20779
20719
|
fullWidth: props.fullWidth
|
|
20780
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20720
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$5.Container, {
|
|
20781
20721
|
fullWidth: props.fullWidth
|
|
20782
|
-
}, hasFloatingLabel && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20722
|
+
}, hasFloatingLabel && /*#__PURE__*/React__default["default"].createElement(styled$5.FloatingLabel, {
|
|
20783
20723
|
"data-test": "floatingLabel",
|
|
20784
20724
|
error: error,
|
|
20785
20725
|
onClick: this.handleLabelClick,
|
|
@@ -20788,10 +20728,10 @@
|
|
|
20788
20728
|
isFloating: isFloating,
|
|
20789
20729
|
hasIcon: !!icon,
|
|
20790
20730
|
isTranslateActive: isTranslateActive
|
|
20791
|
-
}, props.label), icon && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20731
|
+
}, props.label), icon && /*#__PURE__*/React__default["default"].createElement(styled$5.InputIcon, {
|
|
20792
20732
|
name: icon,
|
|
20793
20733
|
color: error ? 'error' : 'black'
|
|
20794
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20734
|
+
}), /*#__PURE__*/React__default["default"].createElement(styled$5.Input, _extends$1({}, props, {
|
|
20795
20735
|
ref: this.input,
|
|
20796
20736
|
placeholder: hasFloatingLabel && !isFloating ? '' : placeholder,
|
|
20797
20737
|
onBlur: this.handleBlur,
|
|
@@ -20804,7 +20744,7 @@
|
|
|
20804
20744
|
error: error,
|
|
20805
20745
|
hasIcon: !!icon,
|
|
20806
20746
|
onAnimationStart: this.handleFocus
|
|
20807
|
-
}))), error && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20747
|
+
}))), error && /*#__PURE__*/React__default["default"].createElement(styled$5.ErrorMessage, {
|
|
20808
20748
|
"data-test": "errorMessage"
|
|
20809
20749
|
}, errorMessage));
|
|
20810
20750
|
}
|
|
@@ -20862,7 +20802,7 @@
|
|
|
20862
20802
|
}
|
|
20863
20803
|
};
|
|
20864
20804
|
|
|
20865
|
-
var styled$
|
|
20805
|
+
var styled$4 = {
|
|
20866
20806
|
Container: styled$a.div.withConfig({
|
|
20867
20807
|
displayName: "styles__Container",
|
|
20868
20808
|
componentId: "sc-wtau65-0"
|
|
@@ -20896,7 +20836,7 @@
|
|
|
20896
20836
|
})(["color:", ";font-size:12px;line-height:14px;display:block;word-break:break-word;"], palette.error.main)
|
|
20897
20837
|
};
|
|
20898
20838
|
|
|
20899
|
-
var _excluded = ["label", "error", "disabled", "placeholder", "autoComplete", "errorMessage", "hasFloatingLabel", "isTranslateActive", "value", "defaultValue"];
|
|
20839
|
+
var _excluded$1 = ["label", "error", "disabled", "placeholder", "autoComplete", "errorMessage", "hasFloatingLabel", "isTranslateActive", "value", "defaultValue"];
|
|
20900
20840
|
|
|
20901
20841
|
var Textarea = /*#__PURE__*/function (_PureComponent) {
|
|
20902
20842
|
_inherits$2(Textarea, _PureComponent);
|
|
@@ -20998,12 +20938,12 @@
|
|
|
20998
20938
|
_this$props$value = _this$props.value,
|
|
20999
20939
|
value = _this$props$value === void 0 ? stateValue : _this$props$value;
|
|
21000
20940
|
_this$props.defaultValue;
|
|
21001
|
-
var props = _objectWithoutProperties(_this$props, _excluded);
|
|
20941
|
+
var props = _objectWithoutProperties(_this$props, _excluded$1);
|
|
21002
20942
|
|
|
21003
20943
|
var isFloating = isFocused || !!value;
|
|
21004
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20944
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$4.Container, {
|
|
21005
20945
|
fullWidth: props.fullWidth
|
|
21006
|
-
}, hasFloatingLabel && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20946
|
+
}, hasFloatingLabel && /*#__PURE__*/React__default["default"].createElement(styled$4.FloatingLabel, _extends$1({}, props, {
|
|
21007
20947
|
"data-test": "floatingLabel",
|
|
21008
20948
|
error: error,
|
|
21009
20949
|
onClick: this.handleLabelClick,
|
|
@@ -21011,7 +20951,7 @@
|
|
|
21011
20951
|
isFocused: isFocused,
|
|
21012
20952
|
isFloating: isFloating,
|
|
21013
20953
|
isTranslateActive: isTranslateActive
|
|
21014
|
-
}), label), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20954
|
+
}), label), /*#__PURE__*/React__default["default"].createElement(styled$4.Textarea, _extends$1({}, props, {
|
|
21015
20955
|
ref: this.textarea,
|
|
21016
20956
|
placeholder: hasFloatingLabel && !isFloating ? '' : placeholder,
|
|
21017
20957
|
onBlur: this.handleBlur,
|
|
@@ -21022,7 +20962,7 @@
|
|
|
21022
20962
|
value: value,
|
|
21023
20963
|
autoComplete: autoComplete ? 'on' : 'off',
|
|
21024
20964
|
disabled: disabled
|
|
21025
|
-
})), error && /*#__PURE__*/React__default["default"].createElement(styled$
|
|
20965
|
+
})), error && /*#__PURE__*/React__default["default"].createElement(styled$4.ErrorMessage, {
|
|
21026
20966
|
"data-test": "errorMessage"
|
|
21027
20967
|
}, errorMessage));
|
|
21028
20968
|
}
|
|
@@ -21058,7 +20998,7 @@
|
|
|
21058
20998
|
return 'initial';
|
|
21059
20999
|
};
|
|
21060
21000
|
|
|
21061
|
-
var styled$
|
|
21001
|
+
var styled$3 = {
|
|
21062
21002
|
ImageWrapper: styled$a.div.withConfig({
|
|
21063
21003
|
displayName: "styles__ImageWrapper",
|
|
21064
21004
|
componentId: "sc-vrvp1c-0"
|
|
@@ -21104,7 +21044,7 @@
|
|
|
21104
21044
|
errorImage = _useState2[0],
|
|
21105
21045
|
setErrorImage = _useState2[1];
|
|
21106
21046
|
|
|
21107
|
-
return errorImage ? /*#__PURE__*/React__default["default"].createElement(styled$
|
|
21047
|
+
return errorImage ? /*#__PURE__*/React__default["default"].createElement(styled$3.ImageWrapper, {
|
|
21108
21048
|
background: background,
|
|
21109
21049
|
width: width || height,
|
|
21110
21050
|
height: height || width
|
|
@@ -21112,7 +21052,7 @@
|
|
|
21112
21052
|
name: errorImage,
|
|
21113
21053
|
size: (width || height) * 0.35 || 20,
|
|
21114
21054
|
color: palette.lightGreyPressed
|
|
21115
|
-
})) : /*#__PURE__*/React__default["default"].createElement(styled$
|
|
21055
|
+
})) : /*#__PURE__*/React__default["default"].createElement(styled$3.Image, {
|
|
21116
21056
|
src: url,
|
|
21117
21057
|
alt: altText || url,
|
|
21118
21058
|
width: width,
|
|
@@ -21945,7 +21885,7 @@
|
|
|
21945
21885
|
return debounced;
|
|
21946
21886
|
}
|
|
21947
21887
|
|
|
21948
|
-
var styled$
|
|
21888
|
+
var styled$2 = {
|
|
21949
21889
|
ClickableWrapper: styled$a.div.withConfig({
|
|
21950
21890
|
displayName: "styles__ClickableWrapper",
|
|
21951
21891
|
componentId: "sc-lreg3c-0"
|
|
@@ -22010,13 +21950,13 @@
|
|
|
22010
21950
|
var value = colorValue || DEFAULT_COLOR;
|
|
22011
21951
|
|
|
22012
21952
|
if (isCollapsable) {
|
|
22013
|
-
return /*#__PURE__*/React__default["default"].createElement(styled$
|
|
21953
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$2.Wrapper, null, /*#__PURE__*/React__default["default"].createElement(styled$2.ClickableWrapper, {
|
|
22014
21954
|
"data-test": "collapsible-picker",
|
|
22015
21955
|
color: value,
|
|
22016
21956
|
role: "presentation",
|
|
22017
21957
|
onClick: toggleStateVisible,
|
|
22018
21958
|
error: error
|
|
22019
|
-
}, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
21959
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled$2.Input, {
|
|
22020
21960
|
value: colorValue,
|
|
22021
21961
|
fullWidth: true,
|
|
22022
21962
|
onChange: function onChange(_ref2) {
|
|
@@ -22025,10 +21965,10 @@
|
|
|
22025
21965
|
},
|
|
22026
21966
|
errorMessage: errorMessage,
|
|
22027
21967
|
error: error
|
|
22028
|
-
})), pickerVisible && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$
|
|
21968
|
+
})), pickerVisible && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled$2.ClosePickerWrapper, {
|
|
22029
21969
|
onClick: handleClosePicker,
|
|
22030
21970
|
role: "presentation"
|
|
22031
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$
|
|
21971
|
+
}), /*#__PURE__*/React__default["default"].createElement(styled$2.PickerWrapper, null, /*#__PURE__*/React__default["default"].createElement(J, {
|
|
22032
21972
|
color: value,
|
|
22033
21973
|
onChange: change
|
|
22034
21974
|
}))));
|
|
@@ -22374,7 +22314,7 @@
|
|
|
22374
22314
|
|
|
22375
22315
|
var Frame = /*@__PURE__*/getDefaultExportFromCjs(lib);
|
|
22376
22316
|
|
|
22377
|
-
var styled = {
|
|
22317
|
+
var styled$1 = {
|
|
22378
22318
|
Wrapper: styled$a.div.withConfig({
|
|
22379
22319
|
displayName: "styles__Wrapper",
|
|
22380
22320
|
componentId: "sc-3jodl7-0"
|
|
@@ -22387,7 +22327,7 @@
|
|
|
22387
22327
|
|
|
22388
22328
|
var DefaultError = function DefaultError(_ref) {
|
|
22389
22329
|
var message = _ref.message;
|
|
22390
|
-
return /*#__PURE__*/React__default["default"].createElement(styled.Wrapper, null, /*#__PURE__*/React__default["default"].createElement(styled.Icon, {
|
|
22330
|
+
return /*#__PURE__*/React__default["default"].createElement(styled$1.Wrapper, null, /*#__PURE__*/React__default["default"].createElement(styled$1.Icon, {
|
|
22391
22331
|
name: "exclamation_circle",
|
|
22392
22332
|
color: "statusRed"
|
|
22393
22333
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
@@ -22506,6 +22446,46 @@
|
|
|
22506
22446
|
height: 'medium'
|
|
22507
22447
|
};
|
|
22508
22448
|
|
|
22449
|
+
var styled = {
|
|
22450
|
+
LinkWrapper: styled$a.div.withConfig({
|
|
22451
|
+
displayName: "styles__LinkWrapper",
|
|
22452
|
+
componentId: "sc-fhfdft-0"
|
|
22453
|
+
})(["display:flex;color:", ";align-items:center;font-size:13px;& a{text-decoration:none;color:inherit;}"], getColor$1('blue')),
|
|
22454
|
+
StyledIcon: styled$a(Icon).withConfig({
|
|
22455
|
+
displayName: "styles__StyledIcon",
|
|
22456
|
+
componentId: "sc-fhfdft-1"
|
|
22457
|
+
})(["margin-right:8px;"])
|
|
22458
|
+
};
|
|
22459
|
+
|
|
22460
|
+
var _excluded = ["href", "children", "target", "icon"];
|
|
22461
|
+
|
|
22462
|
+
var Link = function Link(_ref) {
|
|
22463
|
+
var href = _ref.href,
|
|
22464
|
+
children = _ref.children,
|
|
22465
|
+
target = _ref.target,
|
|
22466
|
+
icon = _ref.icon,
|
|
22467
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22468
|
+
|
|
22469
|
+
if (href.startsWith('/')) return;
|
|
22470
|
+
|
|
22471
|
+
var renderIcon = function renderIcon() {
|
|
22472
|
+
return icon ? /*#__PURE__*/React__default["default"].createElement(styled.StyledIcon, {
|
|
22473
|
+
name: icon
|
|
22474
|
+
}) : null;
|
|
22475
|
+
};
|
|
22476
|
+
|
|
22477
|
+
var validHref = href.startsWith('http') ? href : "https://".concat(href);
|
|
22478
|
+
return /*#__PURE__*/React__default["default"].createElement(styled.LinkWrapper, props, renderIcon(), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
22479
|
+
href: validHref,
|
|
22480
|
+
target: target
|
|
22481
|
+
}, children || validHref));
|
|
22482
|
+
};
|
|
22483
|
+
|
|
22484
|
+
Link.defaultProps = {
|
|
22485
|
+
href: '',
|
|
22486
|
+
target: '_self'
|
|
22487
|
+
};
|
|
22488
|
+
|
|
22509
22489
|
exports.Button = Button;
|
|
22510
22490
|
exports.Checkbox = Checkbox;
|
|
22511
22491
|
exports.Chip = Chip;
|
|
@@ -22516,6 +22496,7 @@
|
|
|
22516
22496
|
exports.Icon = Icon;
|
|
22517
22497
|
exports.Image = Image;
|
|
22518
22498
|
exports.Input = Input;
|
|
22499
|
+
exports.Link = Link;
|
|
22519
22500
|
exports.QRCode = QRCode;
|
|
22520
22501
|
exports.Switch = Switch;
|
|
22521
22502
|
exports.Textarea = Textarea;
|